@turbo/codemod 1.13.1-canary.2 → 1.13.1

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/cli.js CHANGED
@@ -1,51 +1,51 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var Zb=Object.create;var _a=Object.defineProperty;var Jb=Object.getOwnPropertyDescriptor;var Xb=Object.getOwnPropertyNames;var Qb=Object.getPrototypeOf,e_=Object.prototype.hasOwnProperty;var $=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),t_=(t,e)=>{for(var r in e)_a(t,r,{get:e[r],enumerable:!0})},r_=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Xb(e))!e_.call(t,n)&&n!==r&&_a(t,n,{get:()=>e[n],enumerable:!(i=Jb(e,n))||i.enumerable});return t};var J=(t,e,r)=>(r=t!=null?Zb(Qb(t)):{},r_(e||!t||!t.__esModule?_a(r,"default",{value:t,enumerable:!0}):r,t));var Zh=$((CL,Pt)=>{function wa(t){return Pt.exports=wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pt.exports.__esModule=!0,Pt.exports.default=Pt.exports,wa(t)}Pt.exports=wa,Pt.exports.__esModule=!0,Pt.exports.default=Pt.exports});var Xh=$((xL,It)=>{var i_=Zh().default;function Jh(){"use strict";It.exports=Jh=function(){return t},It.exports.__esModule=!0,It.exports.default=It.exports;var t={},e=Object.prototype,r=e.hasOwnProperty,i=Object.defineProperty||function(T,I,j){T[I]=j.value},n=typeof Symbol=="function"?Symbol:{},s=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(T,I,j){return Object.defineProperty(T,I,{value:j,enumerable:!0,configurable:!0,writable:!0}),T[I]}try{u({},"")}catch{u=function(j,x,D){return j[x]=D}}function l(T,I,j,x){var D=I&&I.prototype instanceof h?I:h,A=Object.create(D.prototype),N=new M(x||[]);return i(A,"_invoke",{value:R(T,j,N)}),A}function c(T,I,j){try{return{type:"normal",arg:T.call(I,j)}}catch(x){return{type:"throw",arg:x}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var m={};u(m,s,function(){return this});var g=Object.getPrototypeOf,v=g&&g(g(U([])));v&&v!==e&&r.call(v,s)&&(m=v);var F=d.prototype=h.prototype=Object.create(m);function k(T){["next","throw","return"].forEach(function(I){u(T,I,function(j){return this._invoke(I,j)})})}function O(T,I){function j(D,A,N,Y){var W=c(T[D],T,A);if(W.type!=="throw"){var E=W.arg,y=E.value;return y&&i_(y)=="object"&&r.call(y,"__await")?I.resolve(y.__await).then(function(b){j("next",b,N,Y)},function(b){j("throw",b,N,Y)}):I.resolve(y).then(function(b){E.value=b,N(E)},function(b){return j("throw",b,N,Y)})}Y(W.arg)}var x;i(this,"_invoke",{value:function(A,N){function Y(){return new I(function(W,E){j(A,N,W,E)})}return x=x?x.then(Y,Y):Y()}})}function R(T,I,j){var x="suspendedStart";return function(D,A){if(x==="executing")throw new Error("Generator is already running");if(x==="completed"){if(D==="throw")throw A;return L()}for(j.method=D,j.arg=A;;){var N=j.delegate;if(N){var Y=B(N,j);if(Y){if(Y===f)continue;return Y}}if(j.method==="next")j.sent=j._sent=j.arg;else if(j.method==="throw"){if(x==="suspendedStart")throw x="completed",j.arg;j.dispatchException(j.arg)}else j.method==="return"&&j.abrupt("return",j.arg);x="executing";var W=c(T,I,j);if(W.type==="normal"){if(x=j.done?"completed":"suspendedYield",W.arg===f)continue;return{value:W.arg,done:j.done}}W.type==="throw"&&(x="completed",j.method="throw",j.arg=W.arg)}}}function B(T,I){var j=I.method,x=T.iterator[j];if(x===void 0)return I.delegate=null,j==="throw"&&T.iterator.return&&(I.method="return",I.arg=void 0,B(T,I),I.method==="throw")||j!=="return"&&(I.method="throw",I.arg=new TypeError("The iterator does not provide a '"+j+"' method")),f;var D=c(x,T.iterator,I.arg);if(D.type==="throw")return I.method="throw",I.arg=D.arg,I.delegate=null,f;var A=D.arg;return A?A.done?(I[T.resultName]=A.value,I.next=T.nextLoc,I.method!=="return"&&(I.method="next",I.arg=void 0),I.delegate=null,f):A:(I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,f)}function _(T){var I={tryLoc:T[0]};1 in T&&(I.catchLoc=T[1]),2 in T&&(I.finallyLoc=T[2],I.afterLoc=T[3]),this.tryEntries.push(I)}function S(T){var I=T.completion||{};I.type="normal",delete I.arg,T.completion=I}function M(T){this.tryEntries=[{tryLoc:"root"}],T.forEach(_,this),this.reset(!0)}function U(T){if(T){var I=T[s];if(I)return I.call(T);if(typeof T.next=="function")return T;if(!isNaN(T.length)){var j=-1,x=function D(){for(;++j<T.length;)if(r.call(T,j))return D.value=T[j],D.done=!1,D;return D.value=void 0,D.done=!0,D};return x.next=x}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=d,i(F,"constructor",{value:d,configurable:!0}),i(d,"constructor",{value:p,configurable:!0}),p.displayName=u(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(T){var I=typeof T=="function"&&T.constructor;return!!I&&(I===p||(I.displayName||I.name)==="GeneratorFunction")},t.mark=function(T){return Object.setPrototypeOf?Object.setPrototypeOf(T,d):(T.__proto__=d,u(T,a,"GeneratorFunction")),T.prototype=Object.create(F),T},t.awrap=function(T){return{__await:T}},k(O.prototype),u(O.prototype,o,function(){return this}),t.AsyncIterator=O,t.async=function(T,I,j,x,D){D===void 0&&(D=Promise);var A=new O(l(T,I,j,x),D);return t.isGeneratorFunction(I)?A:A.next().then(function(N){return N.done?N.value:A.next()})},k(F),u(F,a,"Generator"),u(F,s,function(){return this}),u(F,"toString",function(){return"[object Generator]"}),t.keys=function(T){var I=Object(T),j=[];for(var x in I)j.push(x);return j.reverse(),function D(){for(;j.length;){var A=j.pop();if(A in I)return D.value=A,D.done=!1,D}return D.done=!0,D}},t.values=U,M.prototype={constructor:M,reset:function(I){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!I)for(var j in this)j.charAt(0)==="t"&&r.call(this,j)&&!isNaN(+j.slice(1))&&(this[j]=void 0)},stop:function(){this.done=!0;var I=this.tryEntries[0].completion;if(I.type==="throw")throw I.arg;return this.rval},dispatchException:function(I){if(this.done)throw I;var j=this;function x(E,y){return N.type="throw",N.arg=I,j.next=E,y&&(j.method="next",j.arg=void 0),!!y}for(var D=this.tryEntries.length-1;D>=0;--D){var A=this.tryEntries[D],N=A.completion;if(A.tryLoc==="root")return x("end");if(A.tryLoc<=this.prev){var Y=r.call(A,"catchLoc"),W=r.call(A,"finallyLoc");if(Y&&W){if(this.prev<A.catchLoc)return x(A.catchLoc,!0);if(this.prev<A.finallyLoc)return x(A.finallyLoc)}else if(Y){if(this.prev<A.catchLoc)return x(A.catchLoc,!0)}else{if(!W)throw new Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return x(A.finallyLoc)}}}},abrupt:function(I,j){for(var x=this.tryEntries.length-1;x>=0;--x){var D=this.tryEntries[x];if(D.tryLoc<=this.prev&&r.call(D,"finallyLoc")&&this.prev<D.finallyLoc){var A=D;break}}A&&(I==="break"||I==="continue")&&A.tryLoc<=j&&j<=A.finallyLoc&&(A=null);var N=A?A.completion:{};return N.type=I,N.arg=j,A?(this.method="next",this.next=A.finallyLoc,f):this.complete(N)},complete:function(I,j){if(I.type==="throw")throw I.arg;return I.type==="break"||I.type==="continue"?this.next=I.arg:I.type==="return"?(this.rval=this.arg=I.arg,this.method="return",this.next="end"):I.type==="normal"&&j&&(this.next=j),f},finish:function(I){for(var j=this.tryEntries.length-1;j>=0;--j){var x=this.tryEntries[j];if(x.finallyLoc===I)return this.complete(x.completion,x.afterLoc),S(x),f}},catch:function(I){for(var j=this.tryEntries.length-1;j>=0;--j){var x=this.tryEntries[j];if(x.tryLoc===I){var D=x.completion;if(D.type==="throw"){var A=D.arg;S(x)}return A}}throw new Error("illegal catch attempt")},delegateYield:function(I,j,x){return this.delegate={iterator:U(I),resultName:j,nextLoc:x},this.method==="next"&&(this.arg=void 0),f}},t}It.exports=Jh,It.exports.__esModule=!0,It.exports.default=It.exports});var ef=$((RL,Qh)=>{var rs=Xh()();Qh.exports=rs;try{regeneratorRuntime=rs}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=rs:Function("r","regeneratorRuntime = r")(rs)}});var sp=$(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.splitWhen=ui.flatten=void 0;function OS(t){return t.reduce((e,r)=>[].concat(e,r),[])}ui.flatten=OS;function kS(t,e){let r=[[]],i=0;for(let n of t)e(n)?(i++,r[i]=[]):r[i].push(n);return r}ui.splitWhen=kS});var op=$(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});ls.isEnoentCodeError=void 0;function TS(t){return t.code==="ENOENT"}ls.isEnoentCodeError=TS});var ap=$(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.createDirentFromStats=void 0;var Ga=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function LS(t,e){return new Ga(t,e)}cs.createDirentFromStats=LS});var up=$(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.removeLeadingDotSegment=Dt.escape=Dt.makeAbsolute=Dt.unixify=void 0;var BS=require("path"),PS=2,IS=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function NS(t){return t.replace(/\\/g,"/")}Dt.unixify=NS;function MS(t,e){return BS.resolve(t,e)}Dt.makeAbsolute=MS;function jS(t){return t.replace(IS,"\\$2")}Dt.escape=jS;function $S(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(PS)}return t}Dt.removeLeadingDotSegment=$S});var cp=$((yB,lp)=>{lp.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var pp=$((EB,fp)=>{var HS=cp(),hp={"{":"}","(":")","[":"]"},qS=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,i=-2,n=-2,s=-2,o=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||i!==-1&&t[e]==="["&&t[e+1]!=="]"&&(i<e&&(i=t.indexOf("]",e)),i>e&&(o===-1||o>i||(o=t.indexOf("\\",e),o===-1||o>i)))||n!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(n=t.indexOf("}",e),n>e&&(o=t.indexOf("\\",e),o===-1||o>n))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(o=t.indexOf("\\",e),o===-1||o>s))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(s=t.indexOf(")",r),s>r&&(o=t.indexOf("\\",r),o===-1||o>s))))return!0;if(t[e]==="\\"){var a=t[e+1];e+=2;var u=hp[a];if(u){var l=t.indexOf(u,e);l!==-1&&(e=l+1)}if(t[e]==="!")return!0}else e++}return!1},US=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var i=hp[r];if(i){var n=t.indexOf(i,e);n!==-1&&(e=n+1)}if(t[e]==="!")return!0}else e++}return!1};fp.exports=function(e,r){if(typeof e!="string"||e==="")return!1;if(HS(e))return!0;var i=qS;return r&&r.strict===!1&&(i=US),i(e)}});var mp=$((DB,dp)=>{"use strict";var GS=pp(),zS=require("path").posix.dirname,WS=require("os").platform()==="win32",za="/",YS=/\\/g,VS=/[\{\[].*[\}\]]$/,KS=/(^|[^\\])([\{\[]|\([^\)]+$)/,ZS=/\\([\!\*\?\|\[\]\(\)\{\}])/g;dp.exports=function(e,r){var i=Object.assign({flipBackslashes:!0},r);i.flipBackslashes&&WS&&e.indexOf(za)<0&&(e=e.replace(YS,za)),VS.test(e)&&(e+=za),e+="a";do e=zS(e);while(GS(e)||KS.test(e));return e.replace(ZS,"$1")}});var hs=$(it=>{"use strict";it.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;it.find=(t,e)=>t.nodes.find(r=>r.type===e);it.exceedsLimit=(t,e,r=1,i)=>i===!1||!it.isInteger(t)||!it.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=i;it.escapeNode=(t,e=0,r)=>{let i=t.nodes[e];i&&(r&&i.type===r||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)};it.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);it.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;it.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;it.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);it.flatten=(...t)=>{let e=[],r=i=>{for(let n=0;n<i.length;n++){let s=i[n];Array.isArray(s)?r(s,e):s!==void 0&&e.push(s)}return e};return r(t),e}});var fs=$((_B,yp)=>{"use strict";var gp=hs();yp.exports=(t,e={})=>{let r=(i,n={})=>{let s=e.escapeInvalid&&gp.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a="";if(i.value)return(s||o)&&gp.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(let u of i.nodes)a+=r(u);return a};return r(t)}});var Dp=$((wB,Ep)=>{"use strict";Ep.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var Rp=$((SB,xp)=>{"use strict";var bp=Dp(),Lr=(t,e,r)=>{if(bp(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(bp(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let i={relaxZeros:!0,...r};typeof i.strictZeros=="boolean"&&(i.relaxZeros=i.strictZeros===!1);let n=String(i.relaxZeros),s=String(i.shorthand),o=String(i.capture),a=String(i.wrap),u=t+":"+e+"="+n+s+o+a;if(Lr.cache.hasOwnProperty(u))return Lr.cache[u].result;let l=Math.min(t,e),c=Math.max(t,e);if(Math.abs(l-c)===1){let m=t+"|"+e;return i.capture?`(${m})`:i.wrap===!1?m:`(?:${m})`}let f=Cp(t)||Cp(e),h={min:t,max:e,a:l,b:c},p=[],d=[];if(f&&(h.isPadded=f,h.maxLen=String(h.max).length),l<0){let m=c<0?Math.abs(c):1;d=_p(m,Math.abs(l),h,i),l=h.a=0}return c>=0&&(p=_p(l,c,h,i)),h.negatives=d,h.positives=p,h.result=JS(d,p,i),i.capture===!0?h.result=`(${h.result})`:i.wrap!==!1&&p.length+d.length>1&&(h.result=`(?:${h.result})`),Lr.cache[u]=h,h.result};function JS(t,e,r){let i=Wa(t,e,"-",!1,r)||[],n=Wa(e,t,"",!1,r)||[],s=Wa(t,e,"-?",!0,r)||[];return i.concat(s).concat(n).join("|")}function XS(t,e){let r=1,i=1,n=Sp(t,r),s=new Set([e]);for(;t<=n&&n<=e;)s.add(n),r+=1,n=Sp(t,r);for(n=Ap(e+1,i)-1;t<n&&n<=e;)s.add(n),i+=1,n=Ap(e+1,i)-1;return s=[...s],s.sort(tA),s}function QS(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let i=eA(t,e),n=i.length,s="",o=0;for(let a=0;a<n;a++){let[u,l]=i[a];u===l?s+=u:u!=="0"||l!=="9"?s+=rA(u,l,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:n}}function _p(t,e,r,i){let n=XS(t,e),s=[],o=t,a;for(let u=0;u<n.length;u++){let l=n[u],c=QS(String(o),String(l),i),f="";if(!r.isPadded&&a&&a.pattern===c.pattern){a.count.length>1&&a.count.pop(),a.count.push(c.count[0]),a.string=a.pattern+vp(a.count),o=l+1;continue}r.isPadded&&(f=iA(l,r,i)),c.string=f+c.pattern+vp(c.count),s.push(c),o=l+1,a=c}return s}function Wa(t,e,r,i,n){let s=[];for(let o of t){let{string:a}=o;!i&&!wp(e,"string",a)&&s.push(r+a),i&&wp(e,"string",a)&&s.push(r+a)}return s}function eA(t,e){let r=[];for(let i=0;i<t.length;i++)r.push([t[i],e[i]]);return r}function tA(t,e){return t>e?1:e>t?-1:0}function wp(t,e,r){return t.some(i=>i[e]===r)}function Sp(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function Ap(t,e){return t-t%Math.pow(10,e)}function vp(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function rA(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function Cp(t){return/^-?(0+)\d/.test(t)}function iA(t,e,r){if(!e.isPadded)return t;let i=Math.abs(e.maxLen-String(t).length),n=r.relaxZeros!==!1;switch(i){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${i}}`:`0{${i}}`}}Lr.cache={};Lr.clearCache=()=>Lr.cache={};xp.exports=Lr});var Ka=$((AB,Ip)=>{"use strict";var nA=require("util"),kp=Rp(),Fp=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),sA=t=>e=>t===!0?Number(e):String(e),Ya=t=>typeof t=="number"||typeof t=="string"&&t!=="",gn=t=>Number.isInteger(+t),Va=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},oA=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,aA=(t,e,r)=>{if(e>0){let i=t[0]==="-"?"-":"";i&&(t=t.slice(1)),t=i+t.padStart(i?e-1:e,"0")}return r===!1?String(t):t},Op=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},uA=(t,e)=>{t.negatives.sort((o,a)=>o<a?-1:o>a?1:0),t.positives.sort((o,a)=>o<a?-1:o>a?1:0);let r=e.capture?"":"?:",i="",n="",s;return t.positives.length&&(i=t.positives.join("|")),t.negatives.length&&(n=`-(${r}${t.negatives.join("|")})`),i&&n?s=`${i}|${n}`:s=i||n,e.wrap?`(${r}${s})`:s},Tp=(t,e,r,i)=>{if(r)return kp(t,e,{wrap:!1,...i});let n=String.fromCharCode(t);if(t===e)return n;let s=String.fromCharCode(e);return`[${n}-${s}]`},Lp=(t,e,r)=>{if(Array.isArray(t)){let i=r.wrap===!0,n=r.capture?"":"?:";return i?`(${n}${t.join("|")})`:t.join("|")}return kp(t,e,r)},Bp=(...t)=>new RangeError("Invalid range arguments: "+nA.inspect(...t)),Pp=(t,e,r)=>{if(r.strictRanges===!0)throw Bp([t,e]);return[]},lA=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},cA=(t,e,r=1,i={})=>{let n=Number(t),s=Number(e);if(!Number.isInteger(n)||!Number.isInteger(s)){if(i.strictRanges===!0)throw Bp([t,e]);return[]}n===0&&(n=0),s===0&&(s=0);let o=n>s,a=String(t),u=String(e),l=String(r);r=Math.max(Math.abs(r),1);let c=Va(a)||Va(u)||Va(l),f=c?Math.max(a.length,u.length,l.length):0,h=c===!1&&oA(t,e,i)===!1,p=i.transform||sA(h);if(i.toRegex&&r===1)return Tp(Op(t,f),Op(e,f),!0,i);let d={negatives:[],positives:[]},m=F=>d[F<0?"negatives":"positives"].push(Math.abs(F)),g=[],v=0;for(;o?n>=s:n<=s;)i.toRegex===!0&&r>1?m(n):g.push(aA(p(n,v),f,h)),n=o?n-r:n+r,v++;return i.toRegex===!0?r>1?uA(d,i):Lp(g,null,{wrap:!1,...i}):g},hA=(t,e,r=1,i={})=>{if(!gn(t)&&t.length>1||!gn(e)&&e.length>1)return Pp(t,e,i);let n=i.transform||(h=>String.fromCharCode(h)),s=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,u=Math.min(s,o),l=Math.max(s,o);if(i.toRegex&&r===1)return Tp(u,l,!1,i);let c=[],f=0;for(;a?s>=o:s<=o;)c.push(n(s,f)),s=a?s-r:s+r,f++;return i.toRegex===!0?Lp(c,null,{wrap:!1,options:i}):c},ps=(t,e,r,i={})=>{if(e==null&&Ya(t))return[t];if(!Ya(t)||!Ya(e))return Pp(t,e,i);if(typeof r=="function")return ps(t,e,1,{transform:r});if(Fp(r))return ps(t,e,0,r);let n={...i};return n.capture===!0&&(n.wrap=!0),r=r||n.step||1,gn(r)?gn(t)&&gn(e)?cA(t,e,r,n):hA(t,e,Math.max(Math.abs(r),1),n):r!=null&&!Fp(r)?lA(r,n):ps(t,e,1,r)};Ip.exports=ps});var jp=$((vB,Mp)=>{"use strict";var fA=Ka(),Np=hs(),pA=(t,e={})=>{let r=(i,n={})=>{let s=Np.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,u=e.escapeInvalid===!0?"\\":"",l="";if(i.isOpen===!0||i.isClose===!0)return u+i.value;if(i.type==="open")return a?u+i.value:"(";if(i.type==="close")return a?u+i.value:")";if(i.type==="comma")return i.prev.type==="comma"?"":a?i.value:"|";if(i.value)return i.value;if(i.nodes&&i.ranges>0){let c=Np.reduce(i.nodes),f=fA(...c,{...e,wrap:!1,toRegex:!0});if(f.length!==0)return c.length>1&&f.length>1?`(${f})`:f}if(i.nodes)for(let c of i.nodes)l+=r(c,i);return l};return r(t)};Mp.exports=pA});var qp=$((CB,Hp)=>{"use strict";var dA=Ka(),$p=fs(),li=hs(),Br=(t="",e="",r=!1)=>{let i=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?li.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let s of n)i.push(Br(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),i.push(Array.isArray(s)?Br(n,s,r):n+s);return li.flatten(i)},mA=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,i=(n,s={})=>{n.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(n.invalid||n.dollar){a.push(Br(a.pop(),$p(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){a.push(Br(a.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let f=li.reduce(n.nodes);if(li.exceedsLimit(...f,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let h=dA(...f,e);h.length===0&&(h=$p(n,e)),a.push(Br(a.pop(),h)),n.nodes=[];return}let u=li.encloseBrace(n),l=n.queue,c=n;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,l=c.queue;for(let f=0;f<n.nodes.length;f++){let h=n.nodes[f];if(h.type==="comma"&&n.type==="brace"){f===1&&l.push(""),l.push("");continue}if(h.type==="close"){a.push(Br(a.pop(),l,u));continue}if(h.value&&h.type!=="open"){l.push(Br(l.pop(),h.value));continue}h.nodes&&i(h,n)}return l};return li.flatten(i(t))};Hp.exports=mA});var Gp=$((xB,Up)=>{"use strict";Up.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
3
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Kp=$((RB,Vp)=>{"use strict";var gA=fs(),{MAX_LENGTH:zp,CHAR_BACKSLASH:Za,CHAR_BACKTICK:yA,CHAR_COMMA:EA,CHAR_DOT:DA,CHAR_LEFT_PARENTHESES:bA,CHAR_RIGHT_PARENTHESES:_A,CHAR_LEFT_CURLY_BRACE:wA,CHAR_RIGHT_CURLY_BRACE:SA,CHAR_LEFT_SQUARE_BRACKET:Wp,CHAR_RIGHT_SQUARE_BRACKET:Yp,CHAR_DOUBLE_QUOTE:AA,CHAR_SINGLE_QUOTE:vA,CHAR_NO_BREAK_SPACE:CA,CHAR_ZERO_WIDTH_NOBREAK_SPACE:xA}=Gp(),RA=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},i=typeof r.maxLength=="number"?Math.min(zp,r.maxLength):zp;if(t.length>i)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${i})`);let n={type:"root",input:t,nodes:[]},s=[n],o=n,a=n,u=0,l=t.length,c=0,f=0,h,p={},d=()=>t[c++],m=g=>{if(g.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&g.type==="text"){a.value+=g.value;return}return o.nodes.push(g),g.parent=o,g.prev=a,a=g,g};for(m({type:"bos"});c<l;)if(o=s[s.length-1],h=d(),!(h===xA||h===CA)){if(h===Za){m({type:"text",value:(e.keepEscaping?h:"")+d()});continue}if(h===Yp){m({type:"text",value:"\\"+h});continue}if(h===Wp){u++;let g=!0,v;for(;c<l&&(v=d());){if(h+=v,v===Wp){u++;continue}if(v===Za){h+=d();continue}if(v===Yp&&(u--,u===0))break}m({type:"text",value:h});continue}if(h===bA){o=m({type:"paren",nodes:[]}),s.push(o),m({type:"text",value:h});continue}if(h===_A){if(o.type!=="paren"){m({type:"text",value:h});continue}o=s.pop(),m({type:"text",value:h}),o=s[s.length-1];continue}if(h===AA||h===vA||h===yA){let g=h,v;for(e.keepQuotes!==!0&&(h="");c<l&&(v=d());){if(v===Za){h+=v+d();continue}if(v===g){e.keepQuotes===!0&&(h+=v);break}h+=v}m({type:"text",value:h});continue}if(h===wA){f++;let v={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:f,commas:0,ranges:0,nodes:[]};o=m(v),s.push(o),m({type:"open",value:h});continue}if(h===SA){if(o.type!=="brace"){m({type:"text",value:h});continue}let g="close";o=s.pop(),o.close=!0,m({type:g,value:h}),f--,o=s[s.length-1];continue}if(h===EA&&f>0){if(o.ranges>0){o.ranges=0;let g=o.nodes.shift();o.nodes=[g,{type:"text",value:gA(o)}]}m({type:"comma",value:h}),o.commas++;continue}if(h===DA&&f>0&&o.commas===0){let g=o.nodes;if(f===0||g.length===0){m({type:"text",value:h});continue}if(a.type==="dot"){if(o.range=[],a.value+=h,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){g.pop();let v=g[g.length-1];v.value+=a.value+h,a=v,o.ranges--;continue}m({type:"dot",value:h});continue}m({type:"text",value:h})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(F=>{F.nodes||(F.type==="open"&&(F.isOpen=!0),F.type==="close"&&(F.isClose=!0),F.nodes||(F.type="text"),F.invalid=!0)});let g=s[s.length-1],v=g.nodes.indexOf(o);g.nodes.splice(v,1,...o.nodes)}while(s.length>0);return m({type:"eos"}),n};Vp.exports=RA});var Xp=$((FB,Jp)=>{"use strict";var Zp=fs(),FA=jp(),OA=qp(),kA=Kp(),Ze=(t,e={})=>{let r=[];if(Array.isArray(t))for(let i of t){let n=Ze.create(i,e);Array.isArray(n)?r.push(...n):r.push(n)}else r=[].concat(Ze.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};Ze.parse=(t,e={})=>kA(t,e);Ze.stringify=(t,e={})=>Zp(typeof t=="string"?Ze.parse(t,e):t,e);Ze.compile=(t,e={})=>(typeof t=="string"&&(t=Ze.parse(t,e)),FA(t,e));Ze.expand=(t,e={})=>{typeof t=="string"&&(t=Ze.parse(t,e));let r=OA(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};Ze.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Ze.compile(t,e):Ze.expand(t,e);Jp.exports=Ze});var yn=$((OB,id)=>{"use strict";var TA=require("path"),bt="\\\\/",Qp=`[^${bt}]`,jt="\\.",LA="\\+",BA="\\?",ds="\\/",PA="(?=.)",ed="[^/]",Ja=`(?:${ds}|$)`,td=`(?:^|${ds})`,Xa=`${jt}{1,2}${Ja}`,IA=`(?!${jt})`,NA=`(?!${td}${Xa})`,MA=`(?!${jt}{0,1}${Ja})`,jA=`(?!${Xa})`,$A=`[^.${ds}]`,HA=`${ed}*?`,rd={DOT_LITERAL:jt,PLUS_LITERAL:LA,QMARK_LITERAL:BA,SLASH_LITERAL:ds,ONE_CHAR:PA,QMARK:ed,END_ANCHOR:Ja,DOTS_SLASH:Xa,NO_DOT:IA,NO_DOTS:NA,NO_DOT_SLASH:MA,NO_DOTS_SLASH:jA,QMARK_NO_DOT:$A,STAR:HA,START_ANCHOR:td},qA={...rd,SLASH_LITERAL:`[${bt}]`,QMARK:Qp,STAR:`${Qp}*?`,DOTS_SLASH:`${jt}{1,2}(?:[${bt}]|$)`,NO_DOT:`(?!${jt})`,NO_DOTS:`(?!(?:^|[${bt}])${jt}{1,2}(?:[${bt}]|$))`,NO_DOT_SLASH:`(?!${jt}{0,1}(?:[${bt}]|$))`,NO_DOTS_SLASH:`(?!${jt}{1,2}(?:[${bt}]|$))`,QMARK_NO_DOT:`[^.${bt}]`,START_ANCHOR:`(?:^|[${bt}])`,END_ANCHOR:`(?:[${bt}]|$)`},UA={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};id.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:UA,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:TA.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?qA:rd}}});var En=$(Ge=>{"use strict";var GA=require("path"),zA=process.platform==="win32",{REGEX_BACKSLASH:WA,REGEX_REMOVE_BACKSLASH:YA,REGEX_SPECIAL_CHARS:VA,REGEX_SPECIAL_CHARS_GLOBAL:KA}=yn();Ge.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);Ge.hasRegexChars=t=>VA.test(t);Ge.isRegexChar=t=>t.length===1&&Ge.hasRegexChars(t);Ge.escapeRegex=t=>t.replace(KA,"\\$1");Ge.toPosixSlashes=t=>t.replace(WA,"/");Ge.removeBackslashes=t=>t.replace(YA,e=>e==="\\"?"":e);Ge.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};Ge.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:zA===!0||GA.sep==="\\";Ge.escapeLast=(t,e,r)=>{let i=t.lastIndexOf(e,r);return i===-1?t:t[i-1]==="\\"?Ge.escapeLast(t,e,i-1):`${t.slice(0,i)}\\${t.slice(i)}`};Ge.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};Ge.wrapOutput=(t,e={},r={})=>{let i=r.contains?"":"^",n=r.contains?"":"$",s=`${i}(?:${t})${n}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var hd=$((TB,cd)=>{"use strict";var nd=En(),{CHAR_ASTERISK:Qa,CHAR_AT:ZA,CHAR_BACKWARD_SLASH:Dn,CHAR_COMMA:JA,CHAR_DOT:eu,CHAR_EXCLAMATION_MARK:tu,CHAR_FORWARD_SLASH:ld,CHAR_LEFT_CURLY_BRACE:ru,CHAR_LEFT_PARENTHESES:iu,CHAR_LEFT_SQUARE_BRACKET:XA,CHAR_PLUS:QA,CHAR_QUESTION_MARK:sd,CHAR_RIGHT_CURLY_BRACE:ev,CHAR_RIGHT_PARENTHESES:od,CHAR_RIGHT_SQUARE_BRACKET:tv}=yn(),ad=t=>t===ld||t===Dn,ud=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},rv=(t,e)=>{let r=e||{},i=t.length-1,n=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],u=t,l=-1,c=0,f=0,h=!1,p=!1,d=!1,m=!1,g=!1,v=!1,F=!1,k=!1,O=!1,R=!1,B=0,_,S,M={value:"",depth:0,isGlob:!1},U=()=>l>=i,L=()=>u.charCodeAt(l+1),T=()=>(_=S,u.charCodeAt(++l));for(;l<i;){S=T();let A;if(S===Dn){F=M.backslashes=!0,S=T(),S===ru&&(v=!0);continue}if(v===!0||S===ru){for(B++;U()!==!0&&(S=T());){if(S===Dn){F=M.backslashes=!0,T();continue}if(S===ru){B++;continue}if(v!==!0&&S===eu&&(S=T())===eu){if(h=M.isBrace=!0,d=M.isGlob=!0,R=!0,n===!0)continue;break}if(v!==!0&&S===JA){if(h=M.isBrace=!0,d=M.isGlob=!0,R=!0,n===!0)continue;break}if(S===ev&&(B--,B===0)){v=!1,h=M.isBrace=!0,R=!0;break}}if(n===!0)continue;break}if(S===ld){if(s.push(l),o.push(M),M={value:"",depth:0,isGlob:!1},R===!0)continue;if(_===eu&&l===c+1){c+=2;continue}f=l+1;continue}if(r.noext!==!0&&(S===QA||S===ZA||S===Qa||S===sd||S===tu)===!0&&L()===iu){if(d=M.isGlob=!0,m=M.isExtglob=!0,R=!0,S===tu&&l===c&&(O=!0),n===!0){for(;U()!==!0&&(S=T());){if(S===Dn){F=M.backslashes=!0,S=T();continue}if(S===od){d=M.isGlob=!0,R=!0;break}}continue}break}if(S===Qa){if(_===Qa&&(g=M.isGlobstar=!0),d=M.isGlob=!0,R=!0,n===!0)continue;break}if(S===sd){if(d=M.isGlob=!0,R=!0,n===!0)continue;break}if(S===XA){for(;U()!==!0&&(A=T());){if(A===Dn){F=M.backslashes=!0,T();continue}if(A===tv){p=M.isBracket=!0,d=M.isGlob=!0,R=!0;break}}if(n===!0)continue;break}if(r.nonegate!==!0&&S===tu&&l===c){k=M.negated=!0,c++;continue}if(r.noparen!==!0&&S===iu){if(d=M.isGlob=!0,n===!0){for(;U()!==!0&&(S=T());){if(S===iu){F=M.backslashes=!0,S=T();continue}if(S===od){R=!0;break}}continue}break}if(d===!0){if(R=!0,n===!0)continue;break}}r.noext===!0&&(m=!1,d=!1);let I=u,j="",x="";c>0&&(j=u.slice(0,c),u=u.slice(c),f-=c),I&&d===!0&&f>0?(I=u.slice(0,f),x=u.slice(f)):d===!0?(I="",x=u):I=u,I&&I!==""&&I!=="/"&&I!==u&&ad(I.charCodeAt(I.length-1))&&(I=I.slice(0,-1)),r.unescape===!0&&(x&&(x=nd.removeBackslashes(x)),I&&F===!0&&(I=nd.removeBackslashes(I)));let D={prefix:j,input:t,start:c,base:I,glob:x,isBrace:h,isBracket:p,isGlob:d,isExtglob:m,isGlobstar:g,negated:k,negatedExtglob:O};if(r.tokens===!0&&(D.maxDepth=0,ad(S)||o.push(M),D.tokens=o),r.parts===!0||r.tokens===!0){let A;for(let N=0;N<s.length;N++){let Y=A?A+1:c,W=s[N],E=t.slice(Y,W);r.tokens&&(N===0&&c!==0?(o[N].isPrefix=!0,o[N].value=j):o[N].value=E,ud(o[N]),D.maxDepth+=o[N].depth),(N!==0||E!=="")&&a.push(E),A=W}if(A&&A+1<t.length){let N=t.slice(A+1);a.push(N),r.tokens&&(o[o.length-1].value=N,ud(o[o.length-1]),D.maxDepth+=o[o.length-1].depth)}D.slashes=s,D.parts=a}return D};cd.exports=rv});var dd=$((LB,pd)=>{"use strict";var ms=yn(),Je=En(),{MAX_LENGTH:gs,POSIX_REGEX_SOURCE:iv,REGEX_NON_SPECIAL_CHARS:nv,REGEX_SPECIAL_CHARS_BACKREF:sv,REPLACEMENTS:fd}=ms,ov=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(n=>Je.escapeRegex(n)).join("..")}return r},ci=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,nu=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=fd[t]||t;let r={...e},i=typeof r.maxLength=="number"?Math.min(gs,r.maxLength):gs,n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",u=Je.isWindows(e),l=ms.globChars(u),c=ms.extglobChars(l),{DOT_LITERAL:f,PLUS_LITERAL:h,SLASH_LITERAL:p,ONE_CHAR:d,DOTS_SLASH:m,NO_DOT:g,NO_DOT_SLASH:v,NO_DOTS_SLASH:F,QMARK:k,QMARK_NO_DOT:O,STAR:R,START_ANCHOR:B}=l,_=G=>`(${a}(?:(?!${B}${G.dot?m:f}).)*?)`,S=r.dot?"":g,M=r.dot?k:O,U=r.bash===!0?_(r):R;r.capture&&(U=`(${U})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let L={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=Je.removePrefix(t,L),n=t.length;let T=[],I=[],j=[],x=s,D,A=()=>L.index===n-1,N=L.peek=(G=1)=>t[L.index+G],Y=L.advance=()=>t[++L.index]||"",W=()=>t.slice(L.index+1),E=(G="",te=0)=>{L.consumed+=G,L.index+=te},y=G=>{L.output+=G.output!=null?G.output:G.value,E(G.value)},b=()=>{let G=1;for(;N()==="!"&&(N(2)!=="("||N(3)==="?");)Y(),L.start++,G++;return G%2===0?!1:(L.negated=!0,L.start++,!0)},P=G=>{L[G]++,j.push(G)},C=G=>{L[G]--,j.pop()},q=G=>{if(x.type==="globstar"){let te=L.braces>0&&(G.type==="comma"||G.type==="brace"),z=G.extglob===!0||T.length&&(G.type==="pipe"||G.type==="paren");G.type!=="slash"&&G.type!=="paren"&&!te&&!z&&(L.output=L.output.slice(0,-x.output.length),x.type="star",x.value="*",x.output=U,L.output+=x.output)}if(T.length&&G.type!=="paren"&&(T[T.length-1].inner+=G.value),(G.value||G.output)&&y(G),x&&x.type==="text"&&G.type==="text"){x.value+=G.value,x.output=(x.output||"")+G.value;return}G.prev=x,o.push(G),x=G},H=(G,te)=>{let z={...c[te],conditions:1,inner:""};z.prev=x,z.parens=L.parens,z.output=L.output;let ie=(r.capture?"(":"")+z.open;P("parens"),q({type:G,value:te,output:L.output?"":d}),q({type:"paren",extglob:!0,value:Y(),output:ie}),T.push(z)},Z=G=>{let te=G.close+(r.capture?")":""),z;if(G.type==="negate"){let ie=U;if(G.inner&&G.inner.length>1&&G.inner.includes("/")&&(ie=_(r)),(ie!==U||A()||/^\)+$/.test(W()))&&(te=G.close=`)$))${ie}`),G.inner.includes("*")&&(z=W())&&/^\.[^\\/.]+$/.test(z)){let ce=nu(z,{...e,fastpaths:!1}).output;te=G.close=`)${ce})${ie})`}G.prev.type==="bos"&&(L.negatedExtglob=!0)}q({type:"paren",extglob:!0,value:D,output:te}),C("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let G=!1,te=t.replace(sv,(z,ie,ce,we,De,w)=>we==="\\"?(G=!0,z):we==="?"?ie?ie+we+(De?k.repeat(De.length):""):w===0?M+(De?k.repeat(De.length):""):k.repeat(ce.length):we==="."?f.repeat(ce.length):we==="*"?ie?ie+we+(De?U:""):U:ie?z:`\\${z}`);return G===!0&&(r.unescape===!0?te=te.replace(/\\/g,""):te=te.replace(/\\+/g,z=>z.length%2===0?"\\\\":z?"\\":"")),te===t&&r.contains===!0?(L.output=t,L):(L.output=Je.wrapOutput(te,L,e),L)}for(;!A();){if(D=Y(),D==="\0")continue;if(D==="\\"){let z=N();if(z==="/"&&r.bash!==!0||z==="."||z===";")continue;if(!z){D+="\\",q({type:"text",value:D});continue}let ie=/^\\+/.exec(W()),ce=0;if(ie&&ie[0].length>2&&(ce=ie[0].length,L.index+=ce,ce%2!==0&&(D+="\\")),r.unescape===!0?D=Y():D+=Y(),L.brackets===0){q({type:"text",value:D});continue}}if(L.brackets>0&&(D!=="]"||x.value==="["||x.value==="[^")){if(r.posix!==!1&&D===":"){let z=x.value.slice(1);if(z.includes("[")&&(x.posix=!0,z.includes(":"))){let ie=x.value.lastIndexOf("["),ce=x.value.slice(0,ie),we=x.value.slice(ie+2),De=iv[we];if(De){x.value=ce+De,L.backtrack=!0,Y(),!s.output&&o.indexOf(x)===1&&(s.output=d);continue}}}(D==="["&&N()!==":"||D==="-"&&N()==="]")&&(D=`\\${D}`),D==="]"&&(x.value==="["||x.value==="[^")&&(D=`\\${D}`),r.posix===!0&&D==="!"&&x.value==="["&&(D="^"),x.value+=D,y({value:D});continue}if(L.quotes===1&&D!=='"'){D=Je.escapeRegex(D),x.value+=D,y({value:D});continue}if(D==='"'){L.quotes=L.quotes===1?0:1,r.keepQuotes===!0&&q({type:"text",value:D});continue}if(D==="("){P("parens"),q({type:"paren",value:D});continue}if(D===")"){if(L.parens===0&&r.strictBrackets===!0)throw new SyntaxError(ci("opening","("));let z=T[T.length-1];if(z&&L.parens===z.parens+1){Z(T.pop());continue}q({type:"paren",value:D,output:L.parens?")":"\\)"}),C("parens");continue}if(D==="["){if(r.nobracket===!0||!W().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(ci("closing","]"));D=`\\${D}`}else P("brackets");q({type:"bracket",value:D});continue}if(D==="]"){if(r.nobracket===!0||x&&x.type==="bracket"&&x.value.length===1){q({type:"text",value:D,output:`\\${D}`});continue}if(L.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(ci("opening","["));q({type:"text",value:D,output:`\\${D}`});continue}C("brackets");let z=x.value.slice(1);if(x.posix!==!0&&z[0]==="^"&&!z.includes("/")&&(D=`/${D}`),x.value+=D,y({value:D}),r.literalBrackets===!1||Je.hasRegexChars(z))continue;let ie=Je.escapeRegex(x.value);if(L.output=L.output.slice(0,-x.value.length),r.literalBrackets===!0){L.output+=ie,x.value=ie;continue}x.value=`(${a}${ie}|${x.value})`,L.output+=x.value;continue}if(D==="{"&&r.nobrace!==!0){P("braces");let z={type:"brace",value:D,output:"(",outputIndex:L.output.length,tokensIndex:L.tokens.length};I.push(z),q(z);continue}if(D==="}"){let z=I[I.length-1];if(r.nobrace===!0||!z){q({type:"text",value:D,output:D});continue}let ie=")";if(z.dots===!0){let ce=o.slice(),we=[];for(let De=ce.length-1;De>=0&&(o.pop(),ce[De].type!=="brace");De--)ce[De].type!=="dots"&&we.unshift(ce[De].value);ie=ov(we,r),L.backtrack=!0}if(z.comma!==!0&&z.dots!==!0){let ce=L.output.slice(0,z.outputIndex),we=L.tokens.slice(z.tokensIndex);z.value=z.output="\\{",D=ie="\\}",L.output=ce;for(let De of we)L.output+=De.output||De.value}q({type:"brace",value:D,output:ie}),C("braces"),I.pop();continue}if(D==="|"){T.length>0&&T[T.length-1].conditions++,q({type:"text",value:D});continue}if(D===","){let z=D,ie=I[I.length-1];ie&&j[j.length-1]==="braces"&&(ie.comma=!0,z="|"),q({type:"comma",value:D,output:z});continue}if(D==="/"){if(x.type==="dot"&&L.index===L.start+1){L.start=L.index+1,L.consumed="",L.output="",o.pop(),x=s;continue}q({type:"slash",value:D,output:p});continue}if(D==="."){if(L.braces>0&&x.type==="dot"){x.value==="."&&(x.output=f);let z=I[I.length-1];x.type="dots",x.output+=D,x.value+=D,z.dots=!0;continue}if(L.braces+L.parens===0&&x.type!=="bos"&&x.type!=="slash"){q({type:"text",value:D,output:f});continue}q({type:"dot",value:D,output:f});continue}if(D==="?"){if(!(x&&x.value==="(")&&r.noextglob!==!0&&N()==="("&&N(2)!=="?"){H("qmark",D);continue}if(x&&x.type==="paren"){let ie=N(),ce=D;if(ie==="<"&&!Je.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(x.value==="("&&!/[!=<:]/.test(ie)||ie==="<"&&!/<([!=]|\w+>)/.test(W()))&&(ce=`\\${D}`),q({type:"text",value:D,output:ce});continue}if(r.dot!==!0&&(x.type==="slash"||x.type==="bos")){q({type:"qmark",value:D,output:O});continue}q({type:"qmark",value:D,output:k});continue}if(D==="!"){if(r.noextglob!==!0&&N()==="("&&(N(2)!=="?"||!/[!=<:]/.test(N(3)))){H("negate",D);continue}if(r.nonegate!==!0&&L.index===0){b();continue}}if(D==="+"){if(r.noextglob!==!0&&N()==="("&&N(2)!=="?"){H("plus",D);continue}if(x&&x.value==="("||r.regex===!1){q({type:"plus",value:D,output:h});continue}if(x&&(x.type==="bracket"||x.type==="paren"||x.type==="brace")||L.parens>0){q({type:"plus",value:D});continue}q({type:"plus",value:h});continue}if(D==="@"){if(r.noextglob!==!0&&N()==="("&&N(2)!=="?"){q({type:"at",extglob:!0,value:D,output:""});continue}q({type:"text",value:D});continue}if(D!=="*"){(D==="$"||D==="^")&&(D=`\\${D}`);let z=nv.exec(W());z&&(D+=z[0],L.index+=z[0].length),q({type:"text",value:D});continue}if(x&&(x.type==="globstar"||x.star===!0)){x.type="star",x.star=!0,x.value+=D,x.output=U,L.backtrack=!0,L.globstar=!0,E(D);continue}let G=W();if(r.noextglob!==!0&&/^\([^?]/.test(G)){H("star",D);continue}if(x.type==="star"){if(r.noglobstar===!0){E(D);continue}let z=x.prev,ie=z.prev,ce=z.type==="slash"||z.type==="bos",we=ie&&(ie.type==="star"||ie.type==="globstar");if(r.bash===!0&&(!ce||G[0]&&G[0]!=="/")){q({type:"star",value:D,output:""});continue}let De=L.braces>0&&(z.type==="comma"||z.type==="brace"),w=T.length&&(z.type==="pipe"||z.type==="paren");if(!ce&&z.type!=="paren"&&!De&&!w){q({type:"star",value:D,output:""});continue}for(;G.slice(0,3)==="/**";){let K=t[L.index+4];if(K&&K!=="/")break;G=G.slice(3),E("/**",3)}if(z.type==="bos"&&A()){x.type="globstar",x.value+=D,x.output=_(r),L.output=x.output,L.globstar=!0,E(D);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&!we&&A()){L.output=L.output.slice(0,-(z.output+x.output).length),z.output=`(?:${z.output}`,x.type="globstar",x.output=_(r)+(r.strictSlashes?")":"|$)"),x.value+=D,L.globstar=!0,L.output+=z.output+x.output,E(D);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&G[0]==="/"){let K=G[1]!==void 0?"|$":"";L.output=L.output.slice(0,-(z.output+x.output).length),z.output=`(?:${z.output}`,x.type="globstar",x.output=`${_(r)}${p}|${p}${K})`,x.value+=D,L.output+=z.output+x.output,L.globstar=!0,E(D+Y()),q({type:"slash",value:"/",output:""});continue}if(z.type==="bos"&&G[0]==="/"){x.type="globstar",x.value+=D,x.output=`(?:^|${p}|${_(r)}${p})`,L.output=x.output,L.globstar=!0,E(D+Y()),q({type:"slash",value:"/",output:""});continue}L.output=L.output.slice(0,-x.output.length),x.type="globstar",x.output=_(r),x.value+=D,L.output+=x.output,L.globstar=!0,E(D);continue}let te={type:"star",value:D,output:U};if(r.bash===!0){te.output=".*?",(x.type==="bos"||x.type==="slash")&&(te.output=S+te.output),q(te);continue}if(x&&(x.type==="bracket"||x.type==="paren")&&r.regex===!0){te.output=D,q(te);continue}(L.index===L.start||x.type==="slash"||x.type==="dot")&&(x.type==="dot"?(L.output+=v,x.output+=v):r.dot===!0?(L.output+=F,x.output+=F):(L.output+=S,x.output+=S),N()!=="*"&&(L.output+=d,x.output+=d)),q(te)}for(;L.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(ci("closing","]"));L.output=Je.escapeLast(L.output,"["),C("brackets")}for(;L.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(ci("closing",")"));L.output=Je.escapeLast(L.output,"("),C("parens")}for(;L.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(ci("closing","}"));L.output=Je.escapeLast(L.output,"{"),C("braces")}if(r.strictSlashes!==!0&&(x.type==="star"||x.type==="bracket")&&q({type:"maybe_slash",value:"",output:`${p}?`}),L.backtrack===!0){L.output="";for(let G of L.tokens)L.output+=G.output!=null?G.output:G.value,G.suffix&&(L.output+=G.suffix)}return L};nu.fastpaths=(t,e)=>{let r={...e},i=typeof r.maxLength=="number"?Math.min(gs,r.maxLength):gs,n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);t=fd[t]||t;let s=Je.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:l,NO_DOT:c,NO_DOTS:f,NO_DOTS_SLASH:h,STAR:p,START_ANCHOR:d}=ms.globChars(s),m=r.dot?f:c,g=r.dot?h:c,v=r.capture?"":"?:",F={negated:!1,prefix:""},k=r.bash===!0?".*?":p;r.capture&&(k=`(${k})`);let O=S=>S.noglobstar===!0?k:`(${v}(?:(?!${d}${S.dot?l:o}).)*?)`,R=S=>{switch(S){case"*":return`${m}${u}${k}`;case".*":return`${o}${u}${k}`;case"*.*":return`${m}${k}${o}${u}${k}`;case"*/*":return`${m}${k}${a}${u}${g}${k}`;case"**":return m+O(r);case"**/*":return`(?:${m}${O(r)}${a})?${g}${u}${k}`;case"**/*.*":return`(?:${m}${O(r)}${a})?${g}${k}${o}${u}${k}`;case"**/.*":return`(?:${m}${O(r)}${a})?${o}${u}${k}`;default:{let M=/^(.*?)\.(\w+)$/.exec(S);if(!M)return;let U=R(M[1]);return U?U+o+M[2]:void 0}}},B=Je.removePrefix(t,F),_=R(B);return _&&r.strictSlashes!==!0&&(_+=`${a}?`),_};pd.exports=nu});var gd=$((BB,md)=>{"use strict";var av=require("path"),uv=hd(),su=dd(),ou=En(),lv=yn(),cv=t=>t&&typeof t=="object"&&!Array.isArray(t),be=(t,e,r=!1)=>{if(Array.isArray(t)){let c=t.map(h=>be(h,e,r));return h=>{for(let p of c){let d=p(h);if(d)return d}return!1}}let i=cv(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!i)throw new TypeError("Expected pattern to be a non-empty string");let n=e||{},s=ou.isWindows(e),o=i?be.compileRe(t,e):be.makeRe(t,e,!1,!0),a=o.state;delete o.state;let u=()=>!1;if(n.ignore){let c={...e,ignore:null,onMatch:null,onResult:null};u=be(n.ignore,c,r)}let l=(c,f=!1)=>{let{isMatch:h,match:p,output:d}=be.test(c,o,e,{glob:t,posix:s}),m={glob:t,state:a,regex:o,posix:s,input:c,output:d,match:p,isMatch:h};return typeof n.onResult=="function"&&n.onResult(m),h===!1?(m.isMatch=!1,f?m:!1):u(c)?(typeof n.onIgnore=="function"&&n.onIgnore(m),m.isMatch=!1,f?m:!1):(typeof n.onMatch=="function"&&n.onMatch(m),f?m:!0)};return r&&(l.state=a),l};be.test=(t,e,r,{glob:i,posix:n}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(n?ou.toPosixSlashes:null),a=t===i,u=a&&o?o(t):t;return a===!1&&(u=o?o(t):t,a=u===i),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=be.matchBase(t,e,r,n):a=e.exec(u)),{isMatch:!!a,match:a,output:u}};be.matchBase=(t,e,r,i=ou.isWindows(r))=>(e instanceof RegExp?e:be.makeRe(e,r)).test(av.basename(t));be.isMatch=(t,e,r)=>be(e,r)(t);be.parse=(t,e)=>Array.isArray(t)?t.map(r=>be.parse(r,e)):su(t,{...e,fastpaths:!1});be.scan=(t,e)=>uv(t,e);be.compileRe=(t,e,r=!1,i=!1)=>{if(r===!0)return t.output;let n=e||{},s=n.contains?"":"^",o=n.contains?"":"$",a=`${s}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let u=be.toRegex(a,e);return i===!0&&(u.state=t),u};be.makeRe=(t,e={},r=!1,i=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(n.output=su.fastpaths(t,e)),n.output||(n=su(t,e)),be.compileRe(n,e,r,i)};be.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};be.constants=lv;md.exports=be});var Ed=$((PB,yd)=>{"use strict";yd.exports=gd()});var Sd=$((IB,wd)=>{"use strict";var bd=require("util"),_d=Xp(),_t=Ed(),au=En(),Dd=t=>t===""||t==="./",ge=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let i=new Set,n=new Set,s=new Set,o=0,a=c=>{s.add(c.output),r&&r.onResult&&r.onResult(c)};for(let c=0;c<e.length;c++){let f=_t(String(e[c]),{...r,onResult:a},!0),h=f.state.negated||f.state.negatedExtglob;h&&o++;for(let p of t){let d=f(p,!0);(h?!d.isMatch:d.isMatch)&&(h?i.add(d.output):(i.delete(d.output),n.add(d.output)))}}let l=(o===e.length?[...s]:[...n]).filter(c=>!i.has(c));if(r&&l.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(c=>c.replace(/\\/g,"")):e}return l};ge.match=ge;ge.matcher=(t,e)=>_t(t,e);ge.isMatch=(t,e,r)=>_t(e,r)(t);ge.any=ge.isMatch;ge.not=(t,e,r={})=>{e=[].concat(e).map(String);let i=new Set,n=[],s=a=>{r.onResult&&r.onResult(a),n.push(a.output)},o=new Set(ge(t,e,{...r,onResult:s}));for(let a of n)o.has(a)||i.add(a);return[...i]};ge.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${bd.inspect(t)}"`);if(Array.isArray(e))return e.some(i=>ge.contains(t,i,r));if(typeof e=="string"){if(Dd(t)||Dd(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return ge.isMatch(t,e,{...r,contains:!0})};ge.matchKeys=(t,e,r)=>{if(!au.isObject(t))throw new TypeError("Expected the first argument to be an object");let i=ge(Object.keys(t),e,r),n={};for(let s of i)n[s]=t[s];return n};ge.some=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=_t(String(n),r);if(i.some(o=>s(o)))return!0}return!1};ge.every=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=_t(String(n),r);if(!i.every(o=>s(o)))return!1}return!0};ge.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${bd.inspect(t)}"`);return[].concat(e).every(i=>_t(i,r)(t))};ge.capture=(t,e,r)=>{let i=au.isWindows(r),s=_t.makeRe(String(t),{...r,capture:!0}).exec(i?au.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};ge.makeRe=(...t)=>_t.makeRe(...t);ge.scan=(...t)=>_t.scan(...t);ge.parse=(t,e)=>{let r=[];for(let i of[].concat(t||[]))for(let n of _d(String(i),e))r.push(_t.parse(n,e));return r};ge.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:_d(t,e)};ge.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return ge.braces(t,{...e,expand:!0})};wd.exports=ge});var kd=$(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.matchAny=se.convertPatternsToRe=se.makeRe=se.getPatternParts=se.expandBraceExpansion=se.expandPatternsWithBraceExpansion=se.isAffectDepthOfReadingPattern=se.endsWithSlashGlobStar=se.hasGlobStar=se.getBaseDirectory=se.isPatternRelatedToParentDirectory=se.getPatternsOutsideCurrentDirectory=se.getPatternsInsideCurrentDirectory=se.getPositivePatterns=se.getNegativePatterns=se.isPositivePattern=se.isNegativePattern=se.convertToNegativePattern=se.convertToPositivePattern=se.isDynamicPattern=se.isStaticPattern=void 0;var hv=require("path"),fv=mp(),uu=Sd(),Ad="**",pv="\\",dv=/[*?]|^!/,mv=/\[[^[]*]/,gv=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,yv=/[!*+?@]\([^(]*\)/,Ev=/,|\.\./;function vd(t,e={}){return!Cd(t,e)}se.isStaticPattern=vd;function Cd(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(pv)||dv.test(t)||mv.test(t)||gv.test(t)||e.extglob!==!1&&yv.test(t)||e.braceExpansion!==!1&&Dv(t))}se.isDynamicPattern=Cd;function Dv(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let i=t.slice(e,r);return Ev.test(i)}function bv(t){return ys(t)?t.slice(1):t}se.convertToPositivePattern=bv;function _v(t){return"!"+t}se.convertToNegativePattern=_v;function ys(t){return t.startsWith("!")&&t[1]!=="("}se.isNegativePattern=ys;function xd(t){return!ys(t)}se.isPositivePattern=xd;function wv(t){return t.filter(ys)}se.getNegativePatterns=wv;function Sv(t){return t.filter(xd)}se.getPositivePatterns=Sv;function Av(t){return t.filter(e=>!lu(e))}se.getPatternsInsideCurrentDirectory=Av;function vv(t){return t.filter(lu)}se.getPatternsOutsideCurrentDirectory=vv;function lu(t){return t.startsWith("..")||t.startsWith("./..")}se.isPatternRelatedToParentDirectory=lu;function Cv(t){return fv(t,{flipBackslashes:!1})}se.getBaseDirectory=Cv;function xv(t){return t.includes(Ad)}se.hasGlobStar=xv;function Rd(t){return t.endsWith("/"+Ad)}se.endsWithSlashGlobStar=Rd;function Rv(t){let e=hv.basename(t);return Rd(t)||vd(e)}se.isAffectDepthOfReadingPattern=Rv;function Fv(t){return t.reduce((e,r)=>e.concat(Fd(r)),[])}se.expandPatternsWithBraceExpansion=Fv;function Fd(t){return uu.braces(t,{expand:!0,nodupes:!0})}se.expandBraceExpansion=Fd;function Ov(t,e){let{parts:r}=uu.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}se.getPatternParts=Ov;function Od(t,e){return uu.makeRe(t,e)}se.makeRe=Od;function kv(t,e){return t.map(r=>Od(r,e))}se.convertPatternsToRe=kv;function Tv(t,e){return e.some(r=>r.test(t))}se.matchAny=Tv});var Pd=$((MB,Bd)=>{"use strict";var Lv=require("stream"),Td=Lv.PassThrough,Bv=Array.prototype.slice;Bd.exports=Pv;function Pv(){let t=[],e=Bv.call(arguments),r=!1,i=e[e.length-1];i&&!Array.isArray(i)&&i.pipe==null?e.pop():i={};let n=i.end!==!1,s=i.pipeError===!0;i.objectMode==null&&(i.objectMode=!0),i.highWaterMark==null&&(i.highWaterMark=64*1024);let o=Td(i);function a(){for(let c=0,f=arguments.length;c<f;c++)t.push(Ld(arguments[c],i));return u(),this}function u(){if(r)return;r=!0;let c=t.shift();if(!c){process.nextTick(l);return}Array.isArray(c)||(c=[c]);let f=c.length+1;function h(){--f>0||(r=!1,u())}function p(d){function m(){d.removeListener("merge2UnpipeEnd",m),d.removeListener("end",m),s&&d.removeListener("error",g),h()}function g(v){o.emit("error",v)}if(d._readableState.endEmitted)return h();d.on("merge2UnpipeEnd",m),d.on("end",m),s&&d.on("error",g),d.pipe(o,{end:!1}),d.resume()}for(let d=0;d<c.length;d++)p(c[d]);h()}function l(){r=!1,o.emit("queueDrain"),n&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(c){c.emit("merge2UnpipeEnd")}),e.length&&a.apply(null,e),o}function Ld(t,e){if(Array.isArray(t))for(let r=0,i=t.length;r<i;r++)t[r]=Ld(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(Td(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}});var Nd=$(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.merge=void 0;var Iv=Pd();function Nv(t){let e=Iv(t);return t.forEach(r=>{r.once("error",i=>e.emit("error",i))}),e.once("close",()=>Id(t)),e.once("end",()=>Id(t)),e}Es.merge=Nv;function Id(t){t.forEach(e=>e.emit("close"))}});var Md=$(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.isEmpty=hi.isString=void 0;function Mv(t){return typeof t=="string"}hi.isString=Mv;function jv(t){return t===""}hi.isEmpty=jv});var $t=$(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.string=Te.stream=Te.pattern=Te.path=Te.fs=Te.errno=Te.array=void 0;var $v=sp();Te.array=$v;var Hv=op();Te.errno=Hv;var qv=ap();Te.fs=qv;var Uv=up();Te.path=Uv;var Gv=kd();Te.pattern=Gv;var zv=Nd();Te.stream=zv;var Wv=Md();Te.string=Wv});var Hd=$(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.convertPatternGroupToTask=Le.convertPatternGroupsToTasks=Le.groupPatternsByBaseDirectory=Le.getNegativePatternsAsPositive=Le.getPositivePatterns=Le.convertPatternsToTasks=Le.generate=void 0;var Ht=$t();function Yv(t,e){let r=jd(t),i=$d(t,e.ignore),n=r.filter(u=>Ht.pattern.isStaticPattern(u,e)),s=r.filter(u=>Ht.pattern.isDynamicPattern(u,e)),o=cu(n,i,!1),a=cu(s,i,!0);return o.concat(a)}Le.generate=Yv;function cu(t,e,r){let i=[],n=Ht.pattern.getPatternsOutsideCurrentDirectory(t),s=Ht.pattern.getPatternsInsideCurrentDirectory(t),o=hu(n),a=hu(s);return i.push(...fu(o,e,r)),"."in a?i.push(pu(".",s,e,r)):i.push(...fu(a,e,r)),i}Le.convertPatternsToTasks=cu;function jd(t){return Ht.pattern.getPositivePatterns(t)}Le.getPositivePatterns=jd;function $d(t,e){return Ht.pattern.getNegativePatterns(t).concat(e).map(Ht.pattern.convertToPositivePattern)}Le.getNegativePatternsAsPositive=$d;function hu(t){let e={};return t.reduce((r,i)=>{let n=Ht.pattern.getBaseDirectory(i);return n in r?r[n].push(i):r[n]=[i],r},e)}Le.groupPatternsByBaseDirectory=hu;function fu(t,e,r){return Object.keys(t).map(i=>pu(i,t[i],e,r))}Le.convertPatternGroupsToTasks=fu;function pu(t,e,r,i){return{dynamic:i,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(Ht.pattern.convertToNegativePattern))}}Le.convertPatternGroupToTask=pu});var Ud=$(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.removeDuplicateSlashes=fi.transform=void 0;var Vv=/(?!^)\/{2,}/g;function Kv(t){return t.map(e=>qd(e))}fi.transform=Kv;function qd(t){return t.replace(Vv,"/")}fi.removeDuplicateSlashes=qd});var zd=$(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});Ds.read=void 0;function Zv(t,e,r){e.fs.lstat(t,(i,n)=>{if(i!==null){Gd(r,i);return}if(!n.isSymbolicLink()||!e.followSymbolicLink){du(r,n);return}e.fs.stat(t,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){Gd(r,s);return}du(r,n);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),du(r,o)})})}Ds.read=Zv;function Gd(t,e){t(e)}function du(t,e){t(null,e)}});var Wd=$(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});bs.read=void 0;function Jv(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let i=e.fs.statSync(t);return e.markSymbolicLink&&(i.isSymbolicLink=()=>!0),i}catch(i){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw i}}bs.read=Jv});var Yd=$(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.createFileSystemAdapter=sr.FILE_SYSTEM_ADAPTER=void 0;var _s=require("fs");sr.FILE_SYSTEM_ADAPTER={lstat:_s.lstat,stat:_s.stat,lstatSync:_s.lstatSync,statSync:_s.statSync};function Xv(t){return t===void 0?sr.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},sr.FILE_SYSTEM_ADAPTER),t)}sr.createFileSystemAdapter=Xv});var Vd=$(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});var Qv=Yd(),mu=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Qv.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e!=null?e:r}};gu.default=mu});var Pr=$(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.statSync=or.stat=or.Settings=void 0;var Kd=zd(),e1=Wd(),yu=Vd();or.Settings=yu.default;function t1(t,e,r){if(typeof e=="function"){Kd.read(t,Eu(),e);return}Kd.read(t,Eu(e),r)}or.stat=t1;function r1(t,e){let r=Eu(e);return e1.read(t,r)}or.statSync=r1;function Eu(t={}){return t instanceof yu.default?t:new yu.default(t)}});var Xd=$((KB,Jd)=>{var Zd;Jd.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window!="undefined"?window:global):t=>(Zd||(Zd=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var em=$((ZB,Qd)=>{Qd.exports=n1;var i1=Xd();function n1(t,e){let r,i,n,s=!0;Array.isArray(t)?(r=[],i=t.length):(n=Object.keys(t),r={},i=n.length);function o(u){function l(){e&&e(u,r),e=null}s?i1(l):l()}function a(u,l,c){r[u]=c,(--i===0||l)&&o(l)}i?n?n.forEach(function(u){t[u](function(l,c){a(u,l,c)})}):t.forEach(function(u,l){u(function(c,f){a(l,c,f)})}):o(null),s=!1}});var Du=$(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});Ss.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var ws=process.versions.node.split(".");if(ws[0]===void 0||ws[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var tm=Number.parseInt(ws[0],10),s1=Number.parseInt(ws[1],10),rm=10,o1=10,a1=tm>rm,u1=tm===rm&&s1>=o1;Ss.IS_SUPPORT_READDIR_WITH_FILE_TYPES=a1||u1});var im=$(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});As.createDirentFromStats=void 0;var bu=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function l1(t,e){return new bu(t,e)}As.createDirentFromStats=l1});var _u=$(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.fs=void 0;var c1=im();vs.fs=c1});var wu=$(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});Cs.joinPathSegments=void 0;function h1(t,e,r){return t.endsWith(r)?t+e:t+r+e}Cs.joinPathSegments=h1});var lm=$(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.readdir=ar.readdirWithFileTypes=ar.read=void 0;var f1=Pr(),nm=em(),p1=Du(),sm=_u(),om=wu();function d1(t,e,r){if(!e.stats&&p1.IS_SUPPORT_READDIR_WITH_FILE_TYPES){am(t,e,r);return}um(t,e,r)}ar.read=d1;function am(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(i,n)=>{if(i!==null){xs(r,i);return}let s=n.map(a=>({dirent:a,name:a.name,path:om.joinPathSegments(t,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){Su(r,s);return}let o=s.map(a=>m1(a,e));nm(o,(a,u)=>{if(a!==null){xs(r,a);return}Su(r,u)})})}ar.readdirWithFileTypes=am;function m1(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(i,n)=>{if(i!==null){if(e.throwErrorOnBrokenSymbolicLink){r(i);return}r(null,t);return}t.dirent=sm.fs.createDirentFromStats(t.name,n),r(null,t)})}}function um(t,e,r){e.fs.readdir(t,(i,n)=>{if(i!==null){xs(r,i);return}let s=n.map(o=>{let a=om.joinPathSegments(t,o,e.pathSegmentSeparator);return u=>{f1.stat(a,e.fsStatSettings,(l,c)=>{if(l!==null){u(l);return}let f={name:o,path:a,dirent:sm.fs.createDirentFromStats(o,c)};e.stats&&(f.stats=c),u(null,f)})}});nm(s,(o,a)=>{if(o!==null){xs(r,o);return}Su(r,a)})})}ar.readdir=um;function xs(t,e){t(e)}function Su(t,e){t(null,e)}});var dm=$(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.readdir=ur.readdirWithFileTypes=ur.read=void 0;var g1=Pr(),y1=Du(),cm=_u(),hm=wu();function E1(t,e){return!e.stats&&y1.IS_SUPPORT_READDIR_WITH_FILE_TYPES?fm(t,e):pm(t,e)}ur.read=E1;function fm(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(i=>{let n={dirent:i,name:i.name,path:hm.joinPathSegments(t,i.name,e.pathSegmentSeparator)};if(n.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(n.path);n.dirent=cm.fs.createDirentFromStats(n.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return n})}ur.readdirWithFileTypes=fm;function pm(t,e){return e.fs.readdirSync(t).map(i=>{let n=hm.joinPathSegments(t,i,e.pathSegmentSeparator),s=g1.statSync(n,e.fsStatSettings),o={name:i,path:n,dirent:cm.fs.createDirentFromStats(i,s)};return e.stats&&(o.stats=s),o})}ur.readdir=pm});var mm=$(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.createFileSystemAdapter=lr.FILE_SYSTEM_ADAPTER=void 0;var pi=require("fs");lr.FILE_SYSTEM_ADAPTER={lstat:pi.lstat,stat:pi.stat,lstatSync:pi.lstatSync,statSync:pi.statSync,readdir:pi.readdir,readdirSync:pi.readdirSync};function D1(t){return t===void 0?lr.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},lr.FILE_SYSTEM_ADAPTER),t)}lr.createFileSystemAdapter=D1});var gm=$(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});var b1=require("path"),_1=Pr(),w1=mm(),Au=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=w1.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,b1.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new _1.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e!=null?e:r}};vu.default=Au});var Rs=$(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.Settings=cr.scandirSync=cr.scandir=void 0;var ym=lm(),S1=dm(),Cu=gm();cr.Settings=Cu.default;function A1(t,e,r){if(typeof e=="function"){ym.read(t,xu(),e);return}ym.read(t,xu(e),r)}cr.scandir=A1;function v1(t,e){let r=xu(e);return S1.read(t,r)}cr.scandirSync=v1;function xu(t={}){return t instanceof Cu.default?t:new Cu.default(t)}});var Dm=$((o2,Em)=>{"use strict";function C1(t){var e=new t,r=e;function i(){var s=e;return s.next?e=s.next:(e=new t,r=e),s.next=null,s}function n(s){r.next=s,r=s}return{get:i,release:n}}Em.exports=C1});var _m=$((a2,Ru)=>{"use strict";var x1=Dm();function bm(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var i=x1(R1),n=null,s=null,o=0,a=null,u={push:m,drain:nt,saturated:nt,pause:c,paused:!1,concurrency:r,running:l,resume:p,idle:d,length:f,getQueue:h,unshift:g,empty:nt,kill:F,killAndDrain:k,error:O};return u;function l(){return o}function c(){u.paused=!0}function f(){for(var R=n,B=0;R;)R=R.next,B++;return B}function h(){for(var R=n,B=[];R;)B.push(R.value),R=R.next;return B}function p(){if(u.paused){u.paused=!1;for(var R=0;R<u.concurrency;R++)o++,v()}}function d(){return o===0&&u.length()===0}function m(R,B){var _=i.get();_.context=t,_.release=v,_.value=R,_.callback=B||nt,_.errorHandler=a,o===u.concurrency||u.paused?s?(s.next=_,s=_):(n=_,s=_,u.saturated()):(o++,e.call(t,_.value,_.worked))}function g(R,B){var _=i.get();_.context=t,_.release=v,_.value=R,_.callback=B||nt,o===u.concurrency||u.paused?n?(_.next=n,n=_):(n=_,s=_,u.saturated()):(o++,e.call(t,_.value,_.worked))}function v(R){R&&i.release(R);var B=n;B?u.paused?o--:(s===n&&(s=null),n=B.next,B.next=null,e.call(t,B.value,B.worked),s===null&&u.empty()):--o===0&&u.drain()}function F(){n=null,s=null,u.drain=nt}function k(){n=null,s=null,u.drain(),u.drain=nt}function O(R){a=R}}function nt(){}function R1(){this.value=null,this.callback=nt,this.next=null,this.release=nt,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,i){var n=t.callback,s=t.errorHandler,o=t.value;t.value=null,t.callback=nt,t.errorHandler&&s(r,o),n.call(t.context,r,i),t.release(t)}}function F1(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function i(c,f){e.call(this,c).then(function(h){f(null,h)},f)}var n=bm(t,i,r),s=n.push,o=n.unshift;return n.push=a,n.unshift=u,n.drained=l,n;function a(c){var f=new Promise(function(h,p){s(c,function(d,m){if(d){p(d);return}h(m)})});return f.catch(nt),f}function u(c){var f=new Promise(function(h,p){o(c,function(d,m){if(d){p(d);return}h(m)})});return f.catch(nt),f}function l(){var c=n.drain,f=new Promise(function(h){n.drain=function(){c(),h()}});return f}}Ru.exports=bm;Ru.exports.promise=F1});var Fs=$(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.joinPathSegments=wt.replacePathSegmentSeparator=wt.isAppliedFilter=wt.isFatalError=void 0;function O1(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}wt.isFatalError=O1;function k1(t,e){return t===null||t(e)}wt.isAppliedFilter=k1;function T1(t,e){return t.split(/[/\\]/).join(e)}wt.replacePathSegmentSeparator=T1;function L1(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}wt.joinPathSegments=L1});var ku=$(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});var B1=Fs(),Fu=class{constructor(e,r){this._root=e,this._settings=r,this._root=B1.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};Ou.default=Fu});var Bu=$(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});var P1=require("events"),I1=Rs(),N1=_m(),Os=Fs(),M1=ku(),Tu=class extends M1.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=I1.scandir,this._emitter=new P1.EventEmitter,this._queue=N1(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let i={directory:e,base:r};this._queue.push(i,n=>{n!==null&&this._handleError(n)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(i,n)=>{if(i!==null){r(i,void 0);return}for(let s of n)this._handleEntry(s,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!Os.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let i=e.path;r!==void 0&&(e.path=Os.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Os.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&Os.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(i,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};Lu.default=Tu});var wm=$(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});var j1=Bu(),Pu=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new j1.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{$1(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{H1(e,this._storage)}),this._reader.read()}};Iu.default=Pu;function $1(t,e){t(e)}function H1(t,e){t(null,e)}});var Sm=$(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});var q1=require("stream"),U1=Bu(),Nu=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new U1.default(this._root,this._settings),this._stream=new q1.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};Mu.default=Nu});var Am=$($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});var G1=Rs(),ks=Fs(),z1=ku(),ju=class extends z1.default{constructor(){super(...arguments),this._scandir=G1.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let i=this._scandir(e,this._settings.fsScandirSettings);for(let n of i)this._handleEntry(n,r)}catch(i){this._handleError(i)}}_handleError(e){if(ks.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let i=e.path;r!==void 0&&(e.path=ks.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),ks.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&ks.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(i,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};$u.default=ju});var vm=$(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});var W1=Am(),Hu=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new W1.default(this._root,this._settings)}read(){return this._reader.read()}};qu.default=Hu});var Cm=$(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var Y1=require("path"),V1=Rs(),Uu=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Y1.sep),this.fsScandirSettings=new V1.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e!=null?e:r}};Gu.default=Uu});var Ls=$(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.Settings=St.walkStream=St.walkSync=St.walk=void 0;var xm=wm(),K1=Sm(),Z1=vm(),zu=Cm();St.Settings=zu.default;function J1(t,e,r){if(typeof e=="function"){new xm.default(t,Ts()).read(e);return}new xm.default(t,Ts(e)).read(r)}St.walk=J1;function X1(t,e){let r=Ts(e);return new Z1.default(t,r).read()}St.walkSync=X1;function Q1(t,e){let r=Ts(e);return new K1.default(t,r).read()}St.walkStream=Q1;function Ts(t={}){return t instanceof zu.default?t:new zu.default(t)}});var Bs=$(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var eC=require("path"),tC=Pr(),Rm=$t(),Wu=class{constructor(e){this._settings=e,this._fsStatSettings=new tC.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return eC.resolve(this._settings.cwd,e)}_makeEntry(e,r){let i={name:r,path:r,dirent:Rm.fs.createDirentFromStats(r,e)};return this._settings.stats&&(i.stats=e),i}_isFatalError(e){return!Rm.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};Yu.default=Wu});var Zu=$(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var rC=require("stream"),iC=Pr(),nC=Ls(),sC=Bs(),Vu=class extends sC.default{constructor(){super(...arguments),this._walkStream=nC.walkStream,this._stat=iC.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let i=e.map(this._getFullEntryPath,this),n=new rC.PassThrough({objectMode:!0});n._write=(s,o,a)=>this._getEntry(i[s],e[s],r).then(u=>{u!==null&&r.entryFilter(u)&&n.push(u),s===i.length-1&&n.end(),a()}).catch(a);for(let s=0;s<i.length;s++)n.write(s);return n}_getEntry(e,r,i){return this._getStat(e).then(n=>this._makeEntry(n,r)).catch(n=>{if(i.errorFilter(n))return null;throw n})}_getStat(e){return new Promise((r,i)=>{this._stat(e,this._fsStatSettings,(n,s)=>n===null?r(s):i(n))})}};Ku.default=Vu});var Fm=$(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});var oC=Ls(),aC=Bs(),uC=Zu(),Ju=class extends aC.default{constructor(){super(...arguments),this._walkAsync=oC.walk,this._readerStream=new uC.default(this._settings)}dynamic(e,r){return new Promise((i,n)=>{this._walkAsync(e,r,(s,o)=>{s===null?i(o):n(s)})})}async static(e,r){let i=[],n=this._readerStream.static(e,r);return new Promise((s,o)=>{n.once("error",o),n.on("data",a=>i.push(a)),n.once("end",()=>s(i))})}};Xu.default=Ju});var Om=$(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});var di=$t(),Qu=class{constructor(e,r,i){this._patterns=e,this._settings=r,this._micromatchOptions=i,this._storage=[],this._fillStorage()}_fillStorage(){let e=di.pattern.expandPatternsWithBraceExpansion(this._patterns);for(let r of e){let i=this._getPatternSegments(r),n=this._splitSegmentsIntoSections(i);this._storage.push({complete:n.length<=1,pattern:r,segments:i,sections:n})}}_getPatternSegments(e){return di.pattern.getPatternParts(e,this._micromatchOptions).map(i=>di.pattern.isDynamicPattern(i,this._settings)?{dynamic:!0,pattern:i,patternRe:di.pattern.makeRe(i,this._micromatchOptions)}:{dynamic:!1,pattern:i})}_splitSegmentsIntoSections(e){return di.array.splitWhen(e,r=>r.dynamic&&di.pattern.hasGlobStar(r.pattern))}};el.default=Qu});var km=$(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});var lC=Om(),tl=class extends lC.default{match(e){let r=e.split("/"),i=r.length,n=this._storage.filter(s=>!s.complete||s.segments.length>i);for(let s of n){let o=s.sections[0];if(!s.complete&&i>o.length||r.every((u,l)=>{let c=s.segments[l];return!!(c.dynamic&&c.patternRe.test(u)||!c.dynamic&&c.pattern===u)}))return!0}return!1}};rl.default=tl});var Tm=$(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});var Ps=$t(),cC=km(),il=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,i){let n=this._getMatcher(r),s=this._getNegativePatternsRe(i);return o=>this._filter(e,o,n,s)}_getMatcher(e){return new cC.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(Ps.pattern.isAffectDepthOfReadingPattern);return Ps.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,i,n){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let s=Ps.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,i)?!1:this._isSkippedByNegativePatterns(s,n)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let i=r.split("/").length;if(e==="")return i;let n=e.split("/").length;return i-n}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!Ps.pattern.matchAny(e,r)}};nl.default=il});var Lm=$(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var Ir=$t(),sl=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let i=Ir.pattern.convertPatternsToRe(e,this._micromatchOptions),n=Ir.pattern.convertPatternsToRe(r,this._micromatchOptions);return s=>this._filter(s,i,n)}_filter(e,r,i){if(this._settings.unique&&this._isDuplicateEntry(e)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(e.path,i))return!1;let n=this._settings.baseNameMatch?e.name:e.path,s=e.dirent.isDirectory(),o=this._isMatchToPatterns(n,r,s)&&!this._isMatchToPatterns(e.path,i,s);return this._settings.unique&&o&&this._createIndexRecord(e),o}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;let i=Ir.path.makeAbsolute(this._settings.cwd,e);return Ir.pattern.matchAny(i,r)}_isMatchToPatterns(e,r,i){let n=Ir.path.removeLeadingDotSegment(e),s=Ir.pattern.matchAny(n,r);return!s&&i?Ir.pattern.matchAny(n+"/",r):s}};ol.default=sl});var Bm=$(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});var hC=$t(),al=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return hC.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};ul.default=al});var Im=$(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});var Pm=$t(),ll=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=Pm.path.makeAbsolute(this._settings.cwd,r),r=Pm.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};cl.default=ll});var Is=$(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});var fC=require("path"),pC=Tm(),dC=Lm(),mC=Bm(),gC=Im(),hl=class{constructor(e){this._settings=e,this.errorFilter=new mC.default(this._settings),this.entryFilter=new dC.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new pC.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new gC.default(this._settings)}_getRootDirectory(e){return fC.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};fl.default=hl});var Nm=$(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});var yC=Fm(),EC=Is(),pl=class extends EC.default{constructor(){super(...arguments),this._reader=new yC.default(this._settings)}async read(e){let r=this._getRootDirectory(e),i=this._getReaderOptions(e);return(await this.api(r,e,i)).map(s=>i.transform(s))}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}};dl.default=pl});var Mm=$(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});var DC=require("stream"),bC=Zu(),_C=Is(),ml=class extends _C.default{constructor(){super(...arguments),this._reader=new bC.default(this._settings)}read(e){let r=this._getRootDirectory(e),i=this._getReaderOptions(e),n=this.api(r,e,i),s=new DC.Readable({objectMode:!0,read:()=>{}});return n.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",i.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>n.destroy()),s}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}};gl.default=ml});var jm=$(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});var wC=Pr(),SC=Ls(),AC=Bs(),yl=class extends AC.default{constructor(){super(...arguments),this._walkSync=SC.walkSync,this._statSync=wC.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let i=[];for(let n of e){let s=this._getFullEntryPath(n),o=this._getEntry(s,n,r);o===null||!r.entryFilter(o)||i.push(o)}return i}_getEntry(e,r,i){try{let n=this._getStat(e);return this._makeEntry(n,r)}catch(n){if(i.errorFilter(n))return null;throw n}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};El.default=yl});var $m=$(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});var vC=jm(),CC=Is(),Dl=class extends CC.default{constructor(){super(...arguments),this._reader=new vC.default(this._settings)}read(e){let r=this._getRootDirectory(e),i=this._getReaderOptions(e);return this.api(r,e,i).map(i.transform)}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}};bl.default=Dl});var Hm=$(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var mi=require("fs"),xC=require("os"),RC=Math.max(xC.cpus().length,1);gi.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:mi.lstat,lstatSync:mi.lstatSync,stat:mi.stat,statSync:mi.statSync,readdir:mi.readdir,readdirSync:mi.readdirSync};var _l=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,RC),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},gi.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};gi.default=_l});var Ns=$((T2,Gm)=>{"use strict";var qm=Hd(),Um=Ud(),FC=Nm(),OC=Mm(),kC=$m(),wl=Hm(),Nr=$t();async function Sl(t,e){yi(t);let r=Al(t,FC.default,e),i=await Promise.all(r);return Nr.array.flatten(i)}(function(t){function e(o,a){yi(o);let u=Al(o,kC.default,a);return Nr.array.flatten(u)}t.sync=e;function r(o,a){yi(o);let u=Al(o,OC.default,a);return Nr.stream.merge(u)}t.stream=r;function i(o,a){yi(o);let u=Um.transform([].concat(o)),l=new wl.default(a);return qm.generate(u,l)}t.generateTasks=i;function n(o,a){yi(o);let u=new wl.default(a);return Nr.pattern.isDynamicPattern(o,u)}t.isDynamicPattern=n;function s(o){return yi(o),Nr.path.escape(o)}t.escapePath=s})(Sl||(Sl={}));function Al(t,e,r){let i=Um.transform([].concat(t)),n=new wl.default(r),s=qm.generate(i,n),o=new e(n);return s.map(o.read,o)}function yi(t){if(![].concat(t).every(i=>Nr.string.isString(i)&&!Nr.string.isEmpty(i)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}Gm.exports=Sl});var n0=$((N2,i0)=>{i0.exports=r0;r0.sync=UC;var e0=require("fs");function qC(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var i=0;i<r.length;i++){var n=r[i].toLowerCase();if(n&&t.substr(-n.length).toLowerCase()===n)return!0}return!1}function t0(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:qC(e,r)}function r0(t,e,r){e0.stat(t,function(i,n){r(i,i?!1:t0(n,t,e))})}function UC(t,e){return t0(e0.statSync(t),t,e)}});var l0=$((M2,u0)=>{u0.exports=o0;o0.sync=GC;var s0=require("fs");function o0(t,e,r){s0.stat(t,function(i,n){r(i,i?!1:a0(n,e))})}function GC(t,e){return a0(s0.statSync(t),e)}function a0(t,e){return t.isFile()&&zC(t,e)}function zC(t,e){var r=t.mode,i=t.uid,n=t.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8),l=parseInt("001",8),c=a|u,f=r&l||r&u&&n===o||r&a&&i===s||r&c&&s===0;return f}});var h0=$(($2,c0)=>{var j2=require("fs"),Ms;process.platform==="win32"||global.TESTING_WINDOWS?Ms=n0():Ms=l0();c0.exports=vl;vl.sync=WC;function vl(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){vl(t,e||{},function(s,o){s?n(s):i(o)})})}Ms(t,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),r(i,n)})}function WC(t,e){try{return Ms.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var E0=$((H2,y0)=>{var _i=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",f0=require("path"),YC=_i?";":":",p0=h0(),d0=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),m0=(t,e)=>{let r=e.colon||YC,i=t.match(/\//)||_i&&t.match(/\\/)?[""]:[..._i?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],n=_i?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=_i?n.split(r):[""];return _i&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},g0=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=m0(t,e),o=[],a=l=>new Promise((c,f)=>{if(l===i.length)return e.all&&o.length?c(o):f(d0(t));let h=i[l],p=/^".*"$/.test(h)?h.slice(1,-1):h,d=f0.join(p,t),m=!p&&/^\.[\\\/]/.test(t)?t.slice(0,2)+d:d;c(u(m,l,0))}),u=(l,c,f)=>new Promise((h,p)=>{if(f===n.length)return h(a(c+1));let d=n[f];p0(l+d,{pathExt:s},(m,g)=>{if(!m&&g)if(e.all)o.push(l+d);else return h(l+d);return h(u(l,c,f+1))})});return r?a(0).then(l=>r(null,l),r):a(0)},VC=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:i,pathExtExe:n}=m0(t,e),s=[];for(let o=0;o<r.length;o++){let a=r[o],u=/^".*"$/.test(a)?a.slice(1,-1):a,l=f0.join(u,t),c=!u&&/^\.[\\\/]/.test(t)?t.slice(0,2)+l:l;for(let f=0;f<i.length;f++){let h=c+i[f];try{if(p0.sync(h,{pathExt:n}))if(e.all)s.push(h);else return h}catch{}}}if(e.all&&s.length)return s;if(e.nothrow)return null;throw d0(t)};y0.exports=g0;g0.sync=VC});var xl=$((q2,Cl)=>{"use strict";var D0=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};Cl.exports=D0;Cl.exports.default=D0});var S0=$((U2,w0)=>{"use strict";var b0=require("path"),KC=E0(),ZC=xl();function _0(t,e){let r=t.options.env||process.env,i=process.cwd(),n=t.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch{}let o;try{o=KC.sync(t.command,{path:r[ZC({env:r})],pathExt:e?b0.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=b0.resolve(n?t.options.cwd:"",o)),o}function JC(t){return _0(t)||_0(t,!0)}w0.exports=JC});var A0=$((G2,Fl)=>{"use strict";var Rl=/([()\][%!^"`<>&|;, *?])/g;function XC(t){return t=t.replace(Rl,"^$1"),t}function QC(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(Rl,"^$1"),e&&(t=t.replace(Rl,"^$1")),t}Fl.exports.command=XC;Fl.exports.argument=QC});var C0=$((z2,v0)=>{"use strict";v0.exports=/^#!(.*)/});var R0=$((W2,x0)=>{"use strict";var ex=C0();x0.exports=(t="")=>{let e=t.match(ex);if(!e)return null;let[r,i]=e[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var O0=$((Y2,F0)=>{"use strict";var Ol=require("fs"),tx=R0();function rx(t){let r=Buffer.alloc(150),i;try{i=Ol.openSync(t,"r"),Ol.readSync(i,r,0,150,0),Ol.closeSync(i)}catch{}return tx(r.toString())}F0.exports=rx});var B0=$((V2,L0)=>{"use strict";var ix=require("path"),k0=S0(),T0=A0(),nx=O0(),sx=process.platform==="win32",ox=/\.(?:com|exe)$/i,ax=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function ux(t){t.file=k0(t);let e=t.file&&nx(t.file);return e?(t.args.unshift(t.file),t.command=e,k0(t)):t.file}function lx(t){if(!sx)return t;let e=ux(t),r=!ox.test(e);if(t.options.forceShell||r){let i=ax.test(e);t.command=ix.normalize(t.command),t.command=T0.command(t.command),t.args=t.args.map(s=>T0.argument(s,i));let n=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${n}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function cx(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let i={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?i:lx(i)}L0.exports=cx});var N0=$((K2,I0)=>{"use strict";var kl=process.platform==="win32";function Tl(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function hx(t,e){if(!kl)return;let r=t.emit;t.emit=function(i,n){if(i==="exit"){let s=P0(n,e,"spawn");if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}function P0(t,e){return kl&&t===1&&!e.file?Tl(e.original,"spawn"):null}function fx(t,e){return kl&&t===1&&!e.file?Tl(e.original,"spawnSync"):null}I0.exports={hookChildProcess:hx,verifyENOENT:P0,verifyENOENTSync:fx,notFoundError:Tl}});var $0=$((Z2,wi)=>{"use strict";var M0=require("child_process"),Ll=B0(),Bl=N0();function j0(t,e,r){let i=Ll(t,e,r),n=M0.spawn(i.command,i.args,i.options);return Bl.hookChildProcess(n,i),n}function px(t,e,r){let i=Ll(t,e,r),n=M0.spawnSync(i.command,i.args,i.options);return n.error=n.error||Bl.verifyENOENTSync(n.status,i),n}wi.exports=j0;wi.exports.spawn=j0;wi.exports.sync=px;wi.exports._parse=Ll;wi.exports._enoent=Bl});var q0=$((J2,H0)=>{"use strict";H0.exports=t=>{let e=typeof t=="string"?`
2
+ "use strict";var Jb=Object.create;var _a=Object.defineProperty;var Xb=Object.getOwnPropertyDescriptor;var Qb=Object.getOwnPropertyNames;var e_=Object.getPrototypeOf,t_=Object.prototype.hasOwnProperty;var $=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),r_=(t,e)=>{for(var r in e)_a(t,r,{get:e[r],enumerable:!0})},i_=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Qb(e))!t_.call(t,n)&&n!==r&&_a(t,n,{get:()=>e[n],enumerable:!(i=Xb(e,n))||i.enumerable});return t};var J=(t,e,r)=>(r=t!=null?Jb(e_(t)):{},i_(e||!t||!t.__esModule?_a(r,"default",{value:t,enumerable:!0}):r,t));var Zh=$((OL,Pt)=>{function wa(t){return Pt.exports=wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pt.exports.__esModule=!0,Pt.exports.default=Pt.exports,wa(t)}Pt.exports=wa,Pt.exports.__esModule=!0,Pt.exports.default=Pt.exports});var Qh=$((kL,It)=>{var Jh=Zh().default;function Xh(){"use strict";It.exports=Xh=function(){return e},It.exports.__esModule=!0,It.exports.default=It.exports;var t,e={},r=Object.prototype,i=r.hasOwnProperty,n=Object.defineProperty||function(C,k,j){C[k]=j.value},s=typeof Symbol=="function"?Symbol:{},o=s.iterator||"@@iterator",a=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function l(C,k,j){return Object.defineProperty(C,k,{value:j,enumerable:!0,configurable:!0,writable:!0}),C[k]}try{l({},"")}catch{l=function(j,z,P){return j[z]=P}}function c(C,k,j,z){var P=k&&k.prototype instanceof v?k:v,d=Object.create(P.prototype),m=new K(z||[]);return n(d,"_invoke",{value:H(C,j,m)}),d}function f(C,k,j){try{return{type:"normal",arg:C.call(k,j)}}catch(z){return{type:"throw",arg:z}}}e.wrap=c;var h="suspendedStart",p="suspendedYield",g="executing",y="completed",E={};function v(){}function F(){}function O(){}var R={};l(R,o,function(){return this});var x=Object.getPrototypeOf,L=x&&x(x(B([])));L&&L!==r&&i.call(L,o)&&(R=L);var b=O.prototype=v.prototype=Object.create(R);function S(C){["next","throw","return"].forEach(function(k){l(C,k,function(j){return this._invoke(k,j)})})}function N(C,k){function j(P,d,m,D){var A=f(C[P],C,d);if(A.type!=="throw"){var w=A.arg,I=w.value;return I&&Jh(I)=="object"&&i.call(I,"__await")?k.resolve(I.__await).then(function(M){j("next",M,m,D)},function(M){j("throw",M,m,D)}):k.resolve(I).then(function(M){w.value=M,m(w)},function(M){return j("throw",M,m,D)})}D(A.arg)}var z;n(this,"_invoke",{value:function(d,m){function D(){return new k(function(A,w){j(d,m,A,w)})}return z=z?z.then(D,D):D()}})}function H(C,k,j){var z=h;return function(P,d){if(z===g)throw new Error("Generator is already running");if(z===y){if(P==="throw")throw d;return{value:t,done:!0}}for(j.method=P,j.arg=d;;){var m=j.delegate;if(m){var D=T(m,j);if(D){if(D===E)continue;return D}}if(j.method==="next")j.sent=j._sent=j.arg;else if(j.method==="throw"){if(z===h)throw z=y,j.arg;j.dispatchException(j.arg)}else j.method==="return"&&j.abrupt("return",j.arg);z=g;var A=f(C,k,j);if(A.type==="normal"){if(z=j.done?y:p,A.arg===E)continue;return{value:A.arg,done:j.done}}A.type==="throw"&&(z=y,j.method="throw",j.arg=A.arg)}}}function T(C,k){var j=k.method,z=C.iterator[j];if(z===t)return k.delegate=null,j==="throw"&&C.iterator.return&&(k.method="return",k.arg=t,T(C,k),k.method==="throw")||j!=="return"&&(k.method="throw",k.arg=new TypeError("The iterator does not provide a '"+j+"' method")),E;var P=f(z,C.iterator,k.arg);if(P.type==="throw")return k.method="throw",k.arg=P.arg,k.delegate=null,E;var d=P.arg;return d?d.done?(k[C.resultName]=d.value,k.next=C.nextLoc,k.method!=="return"&&(k.method="next",k.arg=t),k.delegate=null,E):d:(k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,E)}function U(C){var k={tryLoc:C[0]};1 in C&&(k.catchLoc=C[1]),2 in C&&(k.finallyLoc=C[2],k.afterLoc=C[3]),this.tryEntries.push(k)}function V(C){var k=C.completion||{};k.type="normal",delete k.arg,C.completion=k}function K(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(U,this),this.reset(!0)}function B(C){if(C||C===""){var k=C[o];if(k)return k.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var j=-1,z=function P(){for(;++j<C.length;)if(i.call(C,j))return P.value=C[j],P.done=!1,P;return P.value=t,P.done=!0,P};return z.next=z}}throw new TypeError(Jh(C)+" is not iterable")}return F.prototype=O,n(b,"constructor",{value:O,configurable:!0}),n(O,"constructor",{value:F,configurable:!0}),F.displayName=l(O,u,"GeneratorFunction"),e.isGeneratorFunction=function(C){var k=typeof C=="function"&&C.constructor;return!!k&&(k===F||(k.displayName||k.name)==="GeneratorFunction")},e.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,O):(C.__proto__=O,l(C,u,"GeneratorFunction")),C.prototype=Object.create(b),C},e.awrap=function(C){return{__await:C}},S(N.prototype),l(N.prototype,a,function(){return this}),e.AsyncIterator=N,e.async=function(C,k,j,z,P){P===void 0&&(P=Promise);var d=new N(c(C,k,j,z),P);return e.isGeneratorFunction(k)?d:d.next().then(function(m){return m.done?m.value:d.next()})},S(b),l(b,u,"Generator"),l(b,o,function(){return this}),l(b,"toString",function(){return"[object Generator]"}),e.keys=function(C){var k=Object(C),j=[];for(var z in k)j.push(z);return j.reverse(),function P(){for(;j.length;){var d=j.pop();if(d in k)return P.value=d,P.done=!1,P}return P.done=!0,P}},e.values=B,K.prototype={constructor:K,reset:function(k){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(V),!k)for(var j in this)j.charAt(0)==="t"&&i.call(this,j)&&!isNaN(+j.slice(1))&&(this[j]=t)},stop:function(){this.done=!0;var k=this.tryEntries[0].completion;if(k.type==="throw")throw k.arg;return this.rval},dispatchException:function(k){if(this.done)throw k;var j=this;function z(w,I){return m.type="throw",m.arg=k,j.next=w,I&&(j.method="next",j.arg=t),!!I}for(var P=this.tryEntries.length-1;P>=0;--P){var d=this.tryEntries[P],m=d.completion;if(d.tryLoc==="root")return z("end");if(d.tryLoc<=this.prev){var D=i.call(d,"catchLoc"),A=i.call(d,"finallyLoc");if(D&&A){if(this.prev<d.catchLoc)return z(d.catchLoc,!0);if(this.prev<d.finallyLoc)return z(d.finallyLoc)}else if(D){if(this.prev<d.catchLoc)return z(d.catchLoc,!0)}else{if(!A)throw new Error("try statement without catch or finally");if(this.prev<d.finallyLoc)return z(d.finallyLoc)}}}},abrupt:function(k,j){for(var z=this.tryEntries.length-1;z>=0;--z){var P=this.tryEntries[z];if(P.tryLoc<=this.prev&&i.call(P,"finallyLoc")&&this.prev<P.finallyLoc){var d=P;break}}d&&(k==="break"||k==="continue")&&d.tryLoc<=j&&j<=d.finallyLoc&&(d=null);var m=d?d.completion:{};return m.type=k,m.arg=j,d?(this.method="next",this.next=d.finallyLoc,E):this.complete(m)},complete:function(k,j){if(k.type==="throw")throw k.arg;return k.type==="break"||k.type==="continue"?this.next=k.arg:k.type==="return"?(this.rval=this.arg=k.arg,this.method="return",this.next="end"):k.type==="normal"&&j&&(this.next=j),E},finish:function(k){for(var j=this.tryEntries.length-1;j>=0;--j){var z=this.tryEntries[j];if(z.finallyLoc===k)return this.complete(z.completion,z.afterLoc),V(z),E}},catch:function(k){for(var j=this.tryEntries.length-1;j>=0;--j){var z=this.tryEntries[j];if(z.tryLoc===k){var P=z.completion;if(P.type==="throw"){var d=P.arg;V(z)}return d}}throw new Error("illegal catch attempt")},delegateYield:function(k,j,z){return this.delegate={iterator:B(k),resultName:j,nextLoc:z},this.method==="next"&&(this.arg=t),E}},e}It.exports=Xh,It.exports.__esModule=!0,It.exports.default=It.exports});var tf=$((TL,ef)=>{var rs=Qh()();ef.exports=rs;try{regeneratorRuntime=rs}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=rs:Function("r","regeneratorRuntime = r")(rs)}});var op=$(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.splitWhen=fi.flatten=void 0;function OS(t){return t.reduce((e,r)=>[].concat(e,r),[])}fi.flatten=OS;function kS(t,e){let r=[[]],i=0;for(let n of t)e(n)?(i++,r[i]=[]):r[i].push(n);return r}fi.splitWhen=kS});var ap=$(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});ls.isEnoentCodeError=void 0;function TS(t){return t.code==="ENOENT"}ls.isEnoentCodeError=TS});var up=$(cs=>{"use strict";Object.defineProperty(cs,"__esModule",{value:!0});cs.createDirentFromStats=void 0;var Ga=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function LS(t,e){return new Ga(t,e)}cs.createDirentFromStats=LS});var lp=$(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.removeLeadingDotSegment=Dt.escape=Dt.makeAbsolute=Dt.unixify=void 0;var BS=require("path"),PS=2,IS=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function NS(t){return t.replace(/\\/g,"/")}Dt.unixify=NS;function MS(t,e){return BS.resolve(t,e)}Dt.makeAbsolute=MS;function jS(t){return t.replace(IS,"\\$2")}Dt.escape=jS;function $S(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(PS)}return t}Dt.removeLeadingDotSegment=$S});var hp=$((_B,cp)=>{cp.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var dp=$((wB,pp)=>{var HS=hp(),fp={"{":"}","(":")","[":"]"},qS=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,i=-2,n=-2,s=-2,o=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||i!==-1&&t[e]==="["&&t[e+1]!=="]"&&(i<e&&(i=t.indexOf("]",e)),i>e&&(o===-1||o>i||(o=t.indexOf("\\",e),o===-1||o>i)))||n!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(n=t.indexOf("}",e),n>e&&(o=t.indexOf("\\",e),o===-1||o>n))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(o=t.indexOf("\\",e),o===-1||o>s))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(s=t.indexOf(")",r),s>r&&(o=t.indexOf("\\",r),o===-1||o>s))))return!0;if(t[e]==="\\"){var a=t[e+1];e+=2;var u=fp[a];if(u){var l=t.indexOf(u,e);l!==-1&&(e=l+1)}if(t[e]==="!")return!0}else e++}return!1},US=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var i=fp[r];if(i){var n=t.indexOf(i,e);n!==-1&&(e=n+1)}if(t[e]==="!")return!0}else e++}return!1};pp.exports=function(e,r){if(typeof e!="string"||e==="")return!1;if(HS(e))return!0;var i=qS;return r&&r.strict===!1&&(i=US),i(e)}});var gp=$((SB,mp)=>{"use strict";var GS=dp(),zS=require("path").posix.dirname,WS=require("os").platform()==="win32",za="/",YS=/\\/g,VS=/[\{\[].*[\}\]]$/,KS=/(^|[^\\])([\{\[]|\([^\)]+$)/,ZS=/\\([\!\*\?\|\[\]\(\)\{\}])/g;mp.exports=function(e,r){var i=Object.assign({flipBackslashes:!0},r);i.flipBackslashes&&WS&&e.indexOf(za)<0&&(e=e.replace(YS,za)),VS.test(e)&&(e+=za),e+="a";do e=zS(e);while(GS(e)||KS.test(e));return e.replace(ZS,"$1")}});var hs=$(it=>{"use strict";it.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;it.find=(t,e)=>t.nodes.find(r=>r.type===e);it.exceedsLimit=(t,e,r=1,i)=>i===!1||!it.isInteger(t)||!it.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=i;it.escapeNode=(t,e=0,r)=>{let i=t.nodes[e];i&&(r&&i.type===r||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)};it.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);it.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;it.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;it.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);it.flatten=(...t)=>{let e=[],r=i=>{for(let n=0;n<i.length;n++){let s=i[n];Array.isArray(s)?r(s,e):s!==void 0&&e.push(s)}return e};return r(t),e}});var fs=$((vB,Ep)=>{"use strict";var yp=hs();Ep.exports=(t,e={})=>{let r=(i,n={})=>{let s=e.escapeInvalid&&yp.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a="";if(i.value)return(s||o)&&yp.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(let u of i.nodes)a+=r(u);return a};return r(t)}});var bp=$((CB,Dp)=>{"use strict";Dp.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var Fp=$((xB,Rp)=>{"use strict";var _p=bp(),Ir=(t,e,r)=>{if(_p(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(_p(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let i={relaxZeros:!0,...r};typeof i.strictZeros=="boolean"&&(i.relaxZeros=i.strictZeros===!1);let n=String(i.relaxZeros),s=String(i.shorthand),o=String(i.capture),a=String(i.wrap),u=t+":"+e+"="+n+s+o+a;if(Ir.cache.hasOwnProperty(u))return Ir.cache[u].result;let l=Math.min(t,e),c=Math.max(t,e);if(Math.abs(l-c)===1){let y=t+"|"+e;return i.capture?`(${y})`:i.wrap===!1?y:`(?:${y})`}let f=xp(t)||xp(e),h={min:t,max:e,a:l,b:c},p=[],g=[];if(f&&(h.isPadded=f,h.maxLen=String(h.max).length),l<0){let y=c<0?Math.abs(c):1;g=wp(y,Math.abs(l),h,i),l=h.a=0}return c>=0&&(p=wp(l,c,h,i)),h.negatives=g,h.positives=p,h.result=JS(g,p,i),i.capture===!0?h.result=`(${h.result})`:i.wrap!==!1&&p.length+g.length>1&&(h.result=`(?:${h.result})`),Ir.cache[u]=h,h.result};function JS(t,e,r){let i=Wa(t,e,"-",!1,r)||[],n=Wa(e,t,"",!1,r)||[],s=Wa(t,e,"-?",!0,r)||[];return i.concat(s).concat(n).join("|")}function XS(t,e){let r=1,i=1,n=Ap(t,r),s=new Set([e]);for(;t<=n&&n<=e;)s.add(n),r+=1,n=Ap(t,r);for(n=vp(e+1,i)-1;t<n&&n<=e;)s.add(n),i+=1,n=vp(e+1,i)-1;return s=[...s],s.sort(tA),s}function QS(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let i=eA(t,e),n=i.length,s="",o=0;for(let a=0;a<n;a++){let[u,l]=i[a];u===l?s+=u:u!=="0"||l!=="9"?s+=rA(u,l,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:n}}function wp(t,e,r,i){let n=XS(t,e),s=[],o=t,a;for(let u=0;u<n.length;u++){let l=n[u],c=QS(String(o),String(l),i),f="";if(!r.isPadded&&a&&a.pattern===c.pattern){a.count.length>1&&a.count.pop(),a.count.push(c.count[0]),a.string=a.pattern+Cp(a.count),o=l+1;continue}r.isPadded&&(f=iA(l,r,i)),c.string=f+c.pattern+Cp(c.count),s.push(c),o=l+1,a=c}return s}function Wa(t,e,r,i,n){let s=[];for(let o of t){let{string:a}=o;!i&&!Sp(e,"string",a)&&s.push(r+a),i&&Sp(e,"string",a)&&s.push(r+a)}return s}function eA(t,e){let r=[];for(let i=0;i<t.length;i++)r.push([t[i],e[i]]);return r}function tA(t,e){return t>e?1:e>t?-1:0}function Sp(t,e,r){return t.some(i=>i[e]===r)}function Ap(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function vp(t,e){return t-t%Math.pow(10,e)}function Cp(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function rA(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function xp(t){return/^-?(0+)\d/.test(t)}function iA(t,e,r){if(!e.isPadded)return t;let i=Math.abs(e.maxLen-String(t).length),n=r.relaxZeros!==!1;switch(i){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${i}}`:`0{${i}}`}}Ir.cache={};Ir.clearCache=()=>Ir.cache={};Rp.exports=Ir});var Ka=$((RB,Np)=>{"use strict";var nA=require("util"),Tp=Fp(),Op=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),sA=t=>e=>t===!0?Number(e):String(e),Ya=t=>typeof t=="number"||typeof t=="string"&&t!=="",yn=t=>Number.isInteger(+t),Va=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},oA=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,aA=(t,e,r)=>{if(e>0){let i=t[0]==="-"?"-":"";i&&(t=t.slice(1)),t=i+t.padStart(i?e-1:e,"0")}return r===!1?String(t):t},kp=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},uA=(t,e)=>{t.negatives.sort((o,a)=>o<a?-1:o>a?1:0),t.positives.sort((o,a)=>o<a?-1:o>a?1:0);let r=e.capture?"":"?:",i="",n="",s;return t.positives.length&&(i=t.positives.join("|")),t.negatives.length&&(n=`-(${r}${t.negatives.join("|")})`),i&&n?s=`${i}|${n}`:s=i||n,e.wrap?`(${r}${s})`:s},Lp=(t,e,r,i)=>{if(r)return Tp(t,e,{wrap:!1,...i});let n=String.fromCharCode(t);if(t===e)return n;let s=String.fromCharCode(e);return`[${n}-${s}]`},Bp=(t,e,r)=>{if(Array.isArray(t)){let i=r.wrap===!0,n=r.capture?"":"?:";return i?`(${n}${t.join("|")})`:t.join("|")}return Tp(t,e,r)},Pp=(...t)=>new RangeError("Invalid range arguments: "+nA.inspect(...t)),Ip=(t,e,r)=>{if(r.strictRanges===!0)throw Pp([t,e]);return[]},lA=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},cA=(t,e,r=1,i={})=>{let n=Number(t),s=Number(e);if(!Number.isInteger(n)||!Number.isInteger(s)){if(i.strictRanges===!0)throw Pp([t,e]);return[]}n===0&&(n=0),s===0&&(s=0);let o=n>s,a=String(t),u=String(e),l=String(r);r=Math.max(Math.abs(r),1);let c=Va(a)||Va(u)||Va(l),f=c?Math.max(a.length,u.length,l.length):0,h=c===!1&&oA(t,e,i)===!1,p=i.transform||sA(h);if(i.toRegex&&r===1)return Lp(kp(t,f),kp(e,f),!0,i);let g={negatives:[],positives:[]},y=F=>g[F<0?"negatives":"positives"].push(Math.abs(F)),E=[],v=0;for(;o?n>=s:n<=s;)i.toRegex===!0&&r>1?y(n):E.push(aA(p(n,v),f,h)),n=o?n-r:n+r,v++;return i.toRegex===!0?r>1?uA(g,i):Bp(E,null,{wrap:!1,...i}):E},hA=(t,e,r=1,i={})=>{if(!yn(t)&&t.length>1||!yn(e)&&e.length>1)return Ip(t,e,i);let n=i.transform||(h=>String.fromCharCode(h)),s=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,u=Math.min(s,o),l=Math.max(s,o);if(i.toRegex&&r===1)return Lp(u,l,!1,i);let c=[],f=0;for(;a?s>=o:s<=o;)c.push(n(s,f)),s=a?s-r:s+r,f++;return i.toRegex===!0?Bp(c,null,{wrap:!1,options:i}):c},ps=(t,e,r,i={})=>{if(e==null&&Ya(t))return[t];if(!Ya(t)||!Ya(e))return Ip(t,e,i);if(typeof r=="function")return ps(t,e,1,{transform:r});if(Op(r))return ps(t,e,0,r);let n={...i};return n.capture===!0&&(n.wrap=!0),r=r||n.step||1,yn(r)?yn(t)&&yn(e)?cA(t,e,r,n):hA(t,e,Math.max(Math.abs(r),1),n):r!=null&&!Op(r)?lA(r,n):ps(t,e,1,r)};Np.exports=ps});var $p=$((FB,jp)=>{"use strict";var fA=Ka(),Mp=hs(),pA=(t,e={})=>{let r=(i,n={})=>{let s=Mp.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,u=e.escapeInvalid===!0?"\\":"",l="";if(i.isOpen===!0||i.isClose===!0)return u+i.value;if(i.type==="open")return a?u+i.value:"(";if(i.type==="close")return a?u+i.value:")";if(i.type==="comma")return i.prev.type==="comma"?"":a?i.value:"|";if(i.value)return i.value;if(i.nodes&&i.ranges>0){let c=Mp.reduce(i.nodes),f=fA(...c,{...e,wrap:!1,toRegex:!0});if(f.length!==0)return c.length>1&&f.length>1?`(${f})`:f}if(i.nodes)for(let c of i.nodes)l+=r(c,i);return l};return r(t)};jp.exports=pA});var Up=$((OB,qp)=>{"use strict";var dA=Ka(),Hp=fs(),pi=hs(),Nr=(t="",e="",r=!1)=>{let i=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?pi.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let s of n)i.push(Nr(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),i.push(Array.isArray(s)?Nr(n,s,r):n+s);return pi.flatten(i)},mA=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,i=(n,s={})=>{n.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(n.invalid||n.dollar){a.push(Nr(a.pop(),Hp(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){a.push(Nr(a.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let f=pi.reduce(n.nodes);if(pi.exceedsLimit(...f,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let h=dA(...f,e);h.length===0&&(h=Hp(n,e)),a.push(Nr(a.pop(),h)),n.nodes=[];return}let u=pi.encloseBrace(n),l=n.queue,c=n;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,l=c.queue;for(let f=0;f<n.nodes.length;f++){let h=n.nodes[f];if(h.type==="comma"&&n.type==="brace"){f===1&&l.push(""),l.push("");continue}if(h.type==="close"){a.push(Nr(a.pop(),l,u));continue}if(h.value&&h.type!=="open"){l.push(Nr(l.pop(),h.value));continue}h.nodes&&i(h,n)}return l};return pi.flatten(i(t))};qp.exports=mA});var zp=$((kB,Gp)=>{"use strict";Gp.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
3
+ `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Zp=$((TB,Kp)=>{"use strict";var gA=fs(),{MAX_LENGTH:Wp,CHAR_BACKSLASH:Za,CHAR_BACKTICK:yA,CHAR_COMMA:EA,CHAR_DOT:DA,CHAR_LEFT_PARENTHESES:bA,CHAR_RIGHT_PARENTHESES:_A,CHAR_LEFT_CURLY_BRACE:wA,CHAR_RIGHT_CURLY_BRACE:SA,CHAR_LEFT_SQUARE_BRACKET:Yp,CHAR_RIGHT_SQUARE_BRACKET:Vp,CHAR_DOUBLE_QUOTE:AA,CHAR_SINGLE_QUOTE:vA,CHAR_NO_BREAK_SPACE:CA,CHAR_ZERO_WIDTH_NOBREAK_SPACE:xA}=zp(),RA=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},i=typeof r.maxLength=="number"?Math.min(Wp,r.maxLength):Wp;if(t.length>i)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${i})`);let n={type:"root",input:t,nodes:[]},s=[n],o=n,a=n,u=0,l=t.length,c=0,f=0,h,p={},g=()=>t[c++],y=E=>{if(E.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&E.type==="text"){a.value+=E.value;return}return o.nodes.push(E),E.parent=o,E.prev=a,a=E,E};for(y({type:"bos"});c<l;)if(o=s[s.length-1],h=g(),!(h===xA||h===CA)){if(h===Za){y({type:"text",value:(e.keepEscaping?h:"")+g()});continue}if(h===Vp){y({type:"text",value:"\\"+h});continue}if(h===Yp){u++;let E=!0,v;for(;c<l&&(v=g());){if(h+=v,v===Yp){u++;continue}if(v===Za){h+=g();continue}if(v===Vp&&(u--,u===0))break}y({type:"text",value:h});continue}if(h===bA){o=y({type:"paren",nodes:[]}),s.push(o),y({type:"text",value:h});continue}if(h===_A){if(o.type!=="paren"){y({type:"text",value:h});continue}o=s.pop(),y({type:"text",value:h}),o=s[s.length-1];continue}if(h===AA||h===vA||h===yA){let E=h,v;for(e.keepQuotes!==!0&&(h="");c<l&&(v=g());){if(v===Za){h+=v+g();continue}if(v===E){e.keepQuotes===!0&&(h+=v);break}h+=v}y({type:"text",value:h});continue}if(h===wA){f++;let v={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:f,commas:0,ranges:0,nodes:[]};o=y(v),s.push(o),y({type:"open",value:h});continue}if(h===SA){if(o.type!=="brace"){y({type:"text",value:h});continue}let E="close";o=s.pop(),o.close=!0,y({type:E,value:h}),f--,o=s[s.length-1];continue}if(h===EA&&f>0){if(o.ranges>0){o.ranges=0;let E=o.nodes.shift();o.nodes=[E,{type:"text",value:gA(o)}]}y({type:"comma",value:h}),o.commas++;continue}if(h===DA&&f>0&&o.commas===0){let E=o.nodes;if(f===0||E.length===0){y({type:"text",value:h});continue}if(a.type==="dot"){if(o.range=[],a.value+=h,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){E.pop();let v=E[E.length-1];v.value+=a.value+h,a=v,o.ranges--;continue}y({type:"dot",value:h});continue}y({type:"text",value:h})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(F=>{F.nodes||(F.type==="open"&&(F.isOpen=!0),F.type==="close"&&(F.isClose=!0),F.nodes||(F.type="text"),F.invalid=!0)});let E=s[s.length-1],v=E.nodes.indexOf(o);E.nodes.splice(v,1,...o.nodes)}while(s.length>0);return y({type:"eos"}),n};Kp.exports=RA});var Qp=$((LB,Xp)=>{"use strict";var Jp=fs(),FA=$p(),OA=Up(),kA=Zp(),Ze=(t,e={})=>{let r=[];if(Array.isArray(t))for(let i of t){let n=Ze.create(i,e);Array.isArray(n)?r.push(...n):r.push(n)}else r=[].concat(Ze.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};Ze.parse=(t,e={})=>kA(t,e);Ze.stringify=(t,e={})=>Jp(typeof t=="string"?Ze.parse(t,e):t,e);Ze.compile=(t,e={})=>(typeof t=="string"&&(t=Ze.parse(t,e)),FA(t,e));Ze.expand=(t,e={})=>{typeof t=="string"&&(t=Ze.parse(t,e));let r=OA(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};Ze.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Ze.compile(t,e):Ze.expand(t,e);Xp.exports=Ze});var En=$((BB,nd)=>{"use strict";var TA=require("path"),bt="\\\\/",ed=`[^${bt}]`,jt="\\.",LA="\\+",BA="\\?",ds="\\/",PA="(?=.)",td="[^/]",Ja=`(?:${ds}|$)`,rd=`(?:^|${ds})`,Xa=`${jt}{1,2}${Ja}`,IA=`(?!${jt})`,NA=`(?!${rd}${Xa})`,MA=`(?!${jt}{0,1}${Ja})`,jA=`(?!${Xa})`,$A=`[^.${ds}]`,HA=`${td}*?`,id={DOT_LITERAL:jt,PLUS_LITERAL:LA,QMARK_LITERAL:BA,SLASH_LITERAL:ds,ONE_CHAR:PA,QMARK:td,END_ANCHOR:Ja,DOTS_SLASH:Xa,NO_DOT:IA,NO_DOTS:NA,NO_DOT_SLASH:MA,NO_DOTS_SLASH:jA,QMARK_NO_DOT:$A,STAR:HA,START_ANCHOR:rd},qA={...id,SLASH_LITERAL:`[${bt}]`,QMARK:ed,STAR:`${ed}*?`,DOTS_SLASH:`${jt}{1,2}(?:[${bt}]|$)`,NO_DOT:`(?!${jt})`,NO_DOTS:`(?!(?:^|[${bt}])${jt}{1,2}(?:[${bt}]|$))`,NO_DOT_SLASH:`(?!${jt}{0,1}(?:[${bt}]|$))`,NO_DOTS_SLASH:`(?!${jt}{1,2}(?:[${bt}]|$))`,QMARK_NO_DOT:`[^.${bt}]`,START_ANCHOR:`(?:^|[${bt}])`,END_ANCHOR:`(?:[${bt}]|$)`},UA={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};nd.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:UA,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:TA.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?qA:id}}});var Dn=$(Ge=>{"use strict";var GA=require("path"),zA=process.platform==="win32",{REGEX_BACKSLASH:WA,REGEX_REMOVE_BACKSLASH:YA,REGEX_SPECIAL_CHARS:VA,REGEX_SPECIAL_CHARS_GLOBAL:KA}=En();Ge.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);Ge.hasRegexChars=t=>VA.test(t);Ge.isRegexChar=t=>t.length===1&&Ge.hasRegexChars(t);Ge.escapeRegex=t=>t.replace(KA,"\\$1");Ge.toPosixSlashes=t=>t.replace(WA,"/");Ge.removeBackslashes=t=>t.replace(YA,e=>e==="\\"?"":e);Ge.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};Ge.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:zA===!0||GA.sep==="\\";Ge.escapeLast=(t,e,r)=>{let i=t.lastIndexOf(e,r);return i===-1?t:t[i-1]==="\\"?Ge.escapeLast(t,e,i-1):`${t.slice(0,i)}\\${t.slice(i)}`};Ge.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};Ge.wrapOutput=(t,e={},r={})=>{let i=r.contains?"":"^",n=r.contains?"":"$",s=`${i}(?:${t})${n}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var fd=$((IB,hd)=>{"use strict";var sd=Dn(),{CHAR_ASTERISK:Qa,CHAR_AT:ZA,CHAR_BACKWARD_SLASH:bn,CHAR_COMMA:JA,CHAR_DOT:eu,CHAR_EXCLAMATION_MARK:tu,CHAR_FORWARD_SLASH:cd,CHAR_LEFT_CURLY_BRACE:ru,CHAR_LEFT_PARENTHESES:iu,CHAR_LEFT_SQUARE_BRACKET:XA,CHAR_PLUS:QA,CHAR_QUESTION_MARK:od,CHAR_RIGHT_CURLY_BRACE:ev,CHAR_RIGHT_PARENTHESES:ad,CHAR_RIGHT_SQUARE_BRACKET:tv}=En(),ud=t=>t===cd||t===bn,ld=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},rv=(t,e)=>{let r=e||{},i=t.length-1,n=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],u=t,l=-1,c=0,f=0,h=!1,p=!1,g=!1,y=!1,E=!1,v=!1,F=!1,O=!1,R=!1,x=!1,L=0,b,S,N={value:"",depth:0,isGlob:!1},H=()=>l>=i,T=()=>u.charCodeAt(l+1),U=()=>(b=S,u.charCodeAt(++l));for(;l<i;){S=U();let k;if(S===bn){F=N.backslashes=!0,S=U(),S===ru&&(v=!0);continue}if(v===!0||S===ru){for(L++;H()!==!0&&(S=U());){if(S===bn){F=N.backslashes=!0,U();continue}if(S===ru){L++;continue}if(v!==!0&&S===eu&&(S=U())===eu){if(h=N.isBrace=!0,g=N.isGlob=!0,x=!0,n===!0)continue;break}if(v!==!0&&S===JA){if(h=N.isBrace=!0,g=N.isGlob=!0,x=!0,n===!0)continue;break}if(S===ev&&(L--,L===0)){v=!1,h=N.isBrace=!0,x=!0;break}}if(n===!0)continue;break}if(S===cd){if(s.push(l),o.push(N),N={value:"",depth:0,isGlob:!1},x===!0)continue;if(b===eu&&l===c+1){c+=2;continue}f=l+1;continue}if(r.noext!==!0&&(S===QA||S===ZA||S===Qa||S===od||S===tu)===!0&&T()===iu){if(g=N.isGlob=!0,y=N.isExtglob=!0,x=!0,S===tu&&l===c&&(R=!0),n===!0){for(;H()!==!0&&(S=U());){if(S===bn){F=N.backslashes=!0,S=U();continue}if(S===ad){g=N.isGlob=!0,x=!0;break}}continue}break}if(S===Qa){if(b===Qa&&(E=N.isGlobstar=!0),g=N.isGlob=!0,x=!0,n===!0)continue;break}if(S===od){if(g=N.isGlob=!0,x=!0,n===!0)continue;break}if(S===XA){for(;H()!==!0&&(k=U());){if(k===bn){F=N.backslashes=!0,U();continue}if(k===tv){p=N.isBracket=!0,g=N.isGlob=!0,x=!0;break}}if(n===!0)continue;break}if(r.nonegate!==!0&&S===tu&&l===c){O=N.negated=!0,c++;continue}if(r.noparen!==!0&&S===iu){if(g=N.isGlob=!0,n===!0){for(;H()!==!0&&(S=U());){if(S===iu){F=N.backslashes=!0,S=U();continue}if(S===ad){x=!0;break}}continue}break}if(g===!0){if(x=!0,n===!0)continue;break}}r.noext===!0&&(y=!1,g=!1);let V=u,K="",B="";c>0&&(K=u.slice(0,c),u=u.slice(c),f-=c),V&&g===!0&&f>0?(V=u.slice(0,f),B=u.slice(f)):g===!0?(V="",B=u):V=u,V&&V!==""&&V!=="/"&&V!==u&&ud(V.charCodeAt(V.length-1))&&(V=V.slice(0,-1)),r.unescape===!0&&(B&&(B=sd.removeBackslashes(B)),V&&F===!0&&(V=sd.removeBackslashes(V)));let C={prefix:K,input:t,start:c,base:V,glob:B,isBrace:h,isBracket:p,isGlob:g,isExtglob:y,isGlobstar:E,negated:O,negatedExtglob:R};if(r.tokens===!0&&(C.maxDepth=0,ud(S)||o.push(N),C.tokens=o),r.parts===!0||r.tokens===!0){let k;for(let j=0;j<s.length;j++){let z=k?k+1:c,P=s[j],d=t.slice(z,P);r.tokens&&(j===0&&c!==0?(o[j].isPrefix=!0,o[j].value=K):o[j].value=d,ld(o[j]),C.maxDepth+=o[j].depth),(j!==0||d!=="")&&a.push(d),k=P}if(k&&k+1<t.length){let j=t.slice(k+1);a.push(j),r.tokens&&(o[o.length-1].value=j,ld(o[o.length-1]),C.maxDepth+=o[o.length-1].depth)}C.slashes=s,C.parts=a}return C};hd.exports=rv});var md=$((NB,dd)=>{"use strict";var ms=En(),Je=Dn(),{MAX_LENGTH:gs,POSIX_REGEX_SOURCE:iv,REGEX_NON_SPECIAL_CHARS:nv,REGEX_SPECIAL_CHARS_BACKREF:sv,REPLACEMENTS:pd}=ms,ov=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(n=>Je.escapeRegex(n)).join("..")}return r},di=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,nu=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=pd[t]||t;let r={...e},i=typeof r.maxLength=="number"?Math.min(gs,r.maxLength):gs,n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",u=Je.isWindows(e),l=ms.globChars(u),c=ms.extglobChars(l),{DOT_LITERAL:f,PLUS_LITERAL:h,SLASH_LITERAL:p,ONE_CHAR:g,DOTS_SLASH:y,NO_DOT:E,NO_DOT_SLASH:v,NO_DOTS_SLASH:F,QMARK:O,QMARK_NO_DOT:R,STAR:x,START_ANCHOR:L}=l,b=q=>`(${a}(?:(?!${L}${q.dot?y:f}).)*?)`,S=r.dot?"":E,N=r.dot?O:R,H=r.bash===!0?b(r):x;r.capture&&(H=`(${H})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let T={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=Je.removePrefix(t,T),n=t.length;let U=[],V=[],K=[],B=s,C,k=()=>T.index===n-1,j=T.peek=(q=1)=>t[T.index+q],z=T.advance=()=>t[++T.index]||"",P=()=>t.slice(T.index+1),d=(q="",Q=0)=>{T.consumed+=q,T.index+=Q},m=q=>{T.output+=q.output!=null?q.output:q.value,d(q.value)},D=()=>{let q=1;for(;j()==="!"&&(j(2)!=="("||j(3)==="?");)z(),T.start++,q++;return q%2===0?!1:(T.negated=!0,T.start++,!0)},A=q=>{T[q]++,K.push(q)},w=q=>{T[q]--,K.pop()},I=q=>{if(B.type==="globstar"){let Q=T.braces>0&&(q.type==="comma"||q.type==="brace"),G=q.extglob===!0||U.length&&(q.type==="pipe"||q.type==="paren");q.type!=="slash"&&q.type!=="paren"&&!Q&&!G&&(T.output=T.output.slice(0,-B.output.length),B.type="star",B.value="*",B.output=H,T.output+=B.output)}if(U.length&&q.type!=="paren"&&(U[U.length-1].inner+=q.value),(q.value||q.output)&&m(q),B&&B.type==="text"&&q.type==="text"){B.value+=q.value,B.output=(B.output||"")+q.value;return}q.prev=B,o.push(q),B=q},M=(q,Q)=>{let G={...c[Q],conditions:1,inner:""};G.prev=B,G.parens=T.parens,G.output=T.output;let ie=(r.capture?"(":"")+G.open;A("parens"),I({type:q,value:Q,output:T.output?"":g}),I({type:"paren",extglob:!0,value:z(),output:ie}),U.push(G)},Z=q=>{let Q=q.close+(r.capture?")":""),G;if(q.type==="negate"){let ie=H;if(q.inner&&q.inner.length>1&&q.inner.includes("/")&&(ie=b(r)),(ie!==H||k()||/^\)+$/.test(P()))&&(Q=q.close=`)$))${ie}`),q.inner.includes("*")&&(G=P())&&/^\.[^\\/.]+$/.test(G)){let ce=nu(G,{...e,fastpaths:!1}).output;Q=q.close=`)${ce})${ie})`}q.prev.type==="bos"&&(T.negatedExtglob=!0)}I({type:"paren",extglob:!0,value:C,output:Q}),w("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let q=!1,Q=t.replace(sv,(G,ie,ce,we,De,_)=>we==="\\"?(q=!0,G):we==="?"?ie?ie+we+(De?O.repeat(De.length):""):_===0?N+(De?O.repeat(De.length):""):O.repeat(ce.length):we==="."?f.repeat(ce.length):we==="*"?ie?ie+we+(De?H:""):H:ie?G:`\\${G}`);return q===!0&&(r.unescape===!0?Q=Q.replace(/\\/g,""):Q=Q.replace(/\\+/g,G=>G.length%2===0?"\\\\":G?"\\":"")),Q===t&&r.contains===!0?(T.output=t,T):(T.output=Je.wrapOutput(Q,T,e),T)}for(;!k();){if(C=z(),C==="\0")continue;if(C==="\\"){let G=j();if(G==="/"&&r.bash!==!0||G==="."||G===";")continue;if(!G){C+="\\",I({type:"text",value:C});continue}let ie=/^\\+/.exec(P()),ce=0;if(ie&&ie[0].length>2&&(ce=ie[0].length,T.index+=ce,ce%2!==0&&(C+="\\")),r.unescape===!0?C=z():C+=z(),T.brackets===0){I({type:"text",value:C});continue}}if(T.brackets>0&&(C!=="]"||B.value==="["||B.value==="[^")){if(r.posix!==!1&&C===":"){let G=B.value.slice(1);if(G.includes("[")&&(B.posix=!0,G.includes(":"))){let ie=B.value.lastIndexOf("["),ce=B.value.slice(0,ie),we=B.value.slice(ie+2),De=iv[we];if(De){B.value=ce+De,T.backtrack=!0,z(),!s.output&&o.indexOf(B)===1&&(s.output=g);continue}}}(C==="["&&j()!==":"||C==="-"&&j()==="]")&&(C=`\\${C}`),C==="]"&&(B.value==="["||B.value==="[^")&&(C=`\\${C}`),r.posix===!0&&C==="!"&&B.value==="["&&(C="^"),B.value+=C,m({value:C});continue}if(T.quotes===1&&C!=='"'){C=Je.escapeRegex(C),B.value+=C,m({value:C});continue}if(C==='"'){T.quotes=T.quotes===1?0:1,r.keepQuotes===!0&&I({type:"text",value:C});continue}if(C==="("){A("parens"),I({type:"paren",value:C});continue}if(C===")"){if(T.parens===0&&r.strictBrackets===!0)throw new SyntaxError(di("opening","("));let G=U[U.length-1];if(G&&T.parens===G.parens+1){Z(U.pop());continue}I({type:"paren",value:C,output:T.parens?")":"\\)"}),w("parens");continue}if(C==="["){if(r.nobracket===!0||!P().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(di("closing","]"));C=`\\${C}`}else A("brackets");I({type:"bracket",value:C});continue}if(C==="]"){if(r.nobracket===!0||B&&B.type==="bracket"&&B.value.length===1){I({type:"text",value:C,output:`\\${C}`});continue}if(T.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(di("opening","["));I({type:"text",value:C,output:`\\${C}`});continue}w("brackets");let G=B.value.slice(1);if(B.posix!==!0&&G[0]==="^"&&!G.includes("/")&&(C=`/${C}`),B.value+=C,m({value:C}),r.literalBrackets===!1||Je.hasRegexChars(G))continue;let ie=Je.escapeRegex(B.value);if(T.output=T.output.slice(0,-B.value.length),r.literalBrackets===!0){T.output+=ie,B.value=ie;continue}B.value=`(${a}${ie}|${B.value})`,T.output+=B.value;continue}if(C==="{"&&r.nobrace!==!0){A("braces");let G={type:"brace",value:C,output:"(",outputIndex:T.output.length,tokensIndex:T.tokens.length};V.push(G),I(G);continue}if(C==="}"){let G=V[V.length-1];if(r.nobrace===!0||!G){I({type:"text",value:C,output:C});continue}let ie=")";if(G.dots===!0){let ce=o.slice(),we=[];for(let De=ce.length-1;De>=0&&(o.pop(),ce[De].type!=="brace");De--)ce[De].type!=="dots"&&we.unshift(ce[De].value);ie=ov(we,r),T.backtrack=!0}if(G.comma!==!0&&G.dots!==!0){let ce=T.output.slice(0,G.outputIndex),we=T.tokens.slice(G.tokensIndex);G.value=G.output="\\{",C=ie="\\}",T.output=ce;for(let De of we)T.output+=De.output||De.value}I({type:"brace",value:C,output:ie}),w("braces"),V.pop();continue}if(C==="|"){U.length>0&&U[U.length-1].conditions++,I({type:"text",value:C});continue}if(C===","){let G=C,ie=V[V.length-1];ie&&K[K.length-1]==="braces"&&(ie.comma=!0,G="|"),I({type:"comma",value:C,output:G});continue}if(C==="/"){if(B.type==="dot"&&T.index===T.start+1){T.start=T.index+1,T.consumed="",T.output="",o.pop(),B=s;continue}I({type:"slash",value:C,output:p});continue}if(C==="."){if(T.braces>0&&B.type==="dot"){B.value==="."&&(B.output=f);let G=V[V.length-1];B.type="dots",B.output+=C,B.value+=C,G.dots=!0;continue}if(T.braces+T.parens===0&&B.type!=="bos"&&B.type!=="slash"){I({type:"text",value:C,output:f});continue}I({type:"dot",value:C,output:f});continue}if(C==="?"){if(!(B&&B.value==="(")&&r.noextglob!==!0&&j()==="("&&j(2)!=="?"){M("qmark",C);continue}if(B&&B.type==="paren"){let ie=j(),ce=C;if(ie==="<"&&!Je.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(B.value==="("&&!/[!=<:]/.test(ie)||ie==="<"&&!/<([!=]|\w+>)/.test(P()))&&(ce=`\\${C}`),I({type:"text",value:C,output:ce});continue}if(r.dot!==!0&&(B.type==="slash"||B.type==="bos")){I({type:"qmark",value:C,output:R});continue}I({type:"qmark",value:C,output:O});continue}if(C==="!"){if(r.noextglob!==!0&&j()==="("&&(j(2)!=="?"||!/[!=<:]/.test(j(3)))){M("negate",C);continue}if(r.nonegate!==!0&&T.index===0){D();continue}}if(C==="+"){if(r.noextglob!==!0&&j()==="("&&j(2)!=="?"){M("plus",C);continue}if(B&&B.value==="("||r.regex===!1){I({type:"plus",value:C,output:h});continue}if(B&&(B.type==="bracket"||B.type==="paren"||B.type==="brace")||T.parens>0){I({type:"plus",value:C});continue}I({type:"plus",value:h});continue}if(C==="@"){if(r.noextglob!==!0&&j()==="("&&j(2)!=="?"){I({type:"at",extglob:!0,value:C,output:""});continue}I({type:"text",value:C});continue}if(C!=="*"){(C==="$"||C==="^")&&(C=`\\${C}`);let G=nv.exec(P());G&&(C+=G[0],T.index+=G[0].length),I({type:"text",value:C});continue}if(B&&(B.type==="globstar"||B.star===!0)){B.type="star",B.star=!0,B.value+=C,B.output=H,T.backtrack=!0,T.globstar=!0,d(C);continue}let q=P();if(r.noextglob!==!0&&/^\([^?]/.test(q)){M("star",C);continue}if(B.type==="star"){if(r.noglobstar===!0){d(C);continue}let G=B.prev,ie=G.prev,ce=G.type==="slash"||G.type==="bos",we=ie&&(ie.type==="star"||ie.type==="globstar");if(r.bash===!0&&(!ce||q[0]&&q[0]!=="/")){I({type:"star",value:C,output:""});continue}let De=T.braces>0&&(G.type==="comma"||G.type==="brace"),_=U.length&&(G.type==="pipe"||G.type==="paren");if(!ce&&G.type!=="paren"&&!De&&!_){I({type:"star",value:C,output:""});continue}for(;q.slice(0,3)==="/**";){let Y=t[T.index+4];if(Y&&Y!=="/")break;q=q.slice(3),d("/**",3)}if(G.type==="bos"&&k()){B.type="globstar",B.value+=C,B.output=b(r),T.output=B.output,T.globstar=!0,d(C);continue}if(G.type==="slash"&&G.prev.type!=="bos"&&!we&&k()){T.output=T.output.slice(0,-(G.output+B.output).length),G.output=`(?:${G.output}`,B.type="globstar",B.output=b(r)+(r.strictSlashes?")":"|$)"),B.value+=C,T.globstar=!0,T.output+=G.output+B.output,d(C);continue}if(G.type==="slash"&&G.prev.type!=="bos"&&q[0]==="/"){let Y=q[1]!==void 0?"|$":"";T.output=T.output.slice(0,-(G.output+B.output).length),G.output=`(?:${G.output}`,B.type="globstar",B.output=`${b(r)}${p}|${p}${Y})`,B.value+=C,T.output+=G.output+B.output,T.globstar=!0,d(C+z()),I({type:"slash",value:"/",output:""});continue}if(G.type==="bos"&&q[0]==="/"){B.type="globstar",B.value+=C,B.output=`(?:^|${p}|${b(r)}${p})`,T.output=B.output,T.globstar=!0,d(C+z()),I({type:"slash",value:"/",output:""});continue}T.output=T.output.slice(0,-B.output.length),B.type="globstar",B.output=b(r),B.value+=C,T.output+=B.output,T.globstar=!0,d(C);continue}let Q={type:"star",value:C,output:H};if(r.bash===!0){Q.output=".*?",(B.type==="bos"||B.type==="slash")&&(Q.output=S+Q.output),I(Q);continue}if(B&&(B.type==="bracket"||B.type==="paren")&&r.regex===!0){Q.output=C,I(Q);continue}(T.index===T.start||B.type==="slash"||B.type==="dot")&&(B.type==="dot"?(T.output+=v,B.output+=v):r.dot===!0?(T.output+=F,B.output+=F):(T.output+=S,B.output+=S),j()!=="*"&&(T.output+=g,B.output+=g)),I(Q)}for(;T.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(di("closing","]"));T.output=Je.escapeLast(T.output,"["),w("brackets")}for(;T.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(di("closing",")"));T.output=Je.escapeLast(T.output,"("),w("parens")}for(;T.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(di("closing","}"));T.output=Je.escapeLast(T.output,"{"),w("braces")}if(r.strictSlashes!==!0&&(B.type==="star"||B.type==="bracket")&&I({type:"maybe_slash",value:"",output:`${p}?`}),T.backtrack===!0){T.output="";for(let q of T.tokens)T.output+=q.output!=null?q.output:q.value,q.suffix&&(T.output+=q.suffix)}return T};nu.fastpaths=(t,e)=>{let r={...e},i=typeof r.maxLength=="number"?Math.min(gs,r.maxLength):gs,n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);t=pd[t]||t;let s=Je.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:l,NO_DOT:c,NO_DOTS:f,NO_DOTS_SLASH:h,STAR:p,START_ANCHOR:g}=ms.globChars(s),y=r.dot?f:c,E=r.dot?h:c,v=r.capture?"":"?:",F={negated:!1,prefix:""},O=r.bash===!0?".*?":p;r.capture&&(O=`(${O})`);let R=S=>S.noglobstar===!0?O:`(${v}(?:(?!${g}${S.dot?l:o}).)*?)`,x=S=>{switch(S){case"*":return`${y}${u}${O}`;case".*":return`${o}${u}${O}`;case"*.*":return`${y}${O}${o}${u}${O}`;case"*/*":return`${y}${O}${a}${u}${E}${O}`;case"**":return y+R(r);case"**/*":return`(?:${y}${R(r)}${a})?${E}${u}${O}`;case"**/*.*":return`(?:${y}${R(r)}${a})?${E}${O}${o}${u}${O}`;case"**/.*":return`(?:${y}${R(r)}${a})?${o}${u}${O}`;default:{let N=/^(.*?)\.(\w+)$/.exec(S);if(!N)return;let H=x(N[1]);return H?H+o+N[2]:void 0}}},L=Je.removePrefix(t,F),b=x(L);return b&&r.strictSlashes!==!0&&(b+=`${a}?`),b};dd.exports=nu});var yd=$((MB,gd)=>{"use strict";var av=require("path"),uv=fd(),su=md(),ou=Dn(),lv=En(),cv=t=>t&&typeof t=="object"&&!Array.isArray(t),be=(t,e,r=!1)=>{if(Array.isArray(t)){let c=t.map(h=>be(h,e,r));return h=>{for(let p of c){let g=p(h);if(g)return g}return!1}}let i=cv(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!i)throw new TypeError("Expected pattern to be a non-empty string");let n=e||{},s=ou.isWindows(e),o=i?be.compileRe(t,e):be.makeRe(t,e,!1,!0),a=o.state;delete o.state;let u=()=>!1;if(n.ignore){let c={...e,ignore:null,onMatch:null,onResult:null};u=be(n.ignore,c,r)}let l=(c,f=!1)=>{let{isMatch:h,match:p,output:g}=be.test(c,o,e,{glob:t,posix:s}),y={glob:t,state:a,regex:o,posix:s,input:c,output:g,match:p,isMatch:h};return typeof n.onResult=="function"&&n.onResult(y),h===!1?(y.isMatch=!1,f?y:!1):u(c)?(typeof n.onIgnore=="function"&&n.onIgnore(y),y.isMatch=!1,f?y:!1):(typeof n.onMatch=="function"&&n.onMatch(y),f?y:!0)};return r&&(l.state=a),l};be.test=(t,e,r,{glob:i,posix:n}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(n?ou.toPosixSlashes:null),a=t===i,u=a&&o?o(t):t;return a===!1&&(u=o?o(t):t,a=u===i),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=be.matchBase(t,e,r,n):a=e.exec(u)),{isMatch:!!a,match:a,output:u}};be.matchBase=(t,e,r,i=ou.isWindows(r))=>(e instanceof RegExp?e:be.makeRe(e,r)).test(av.basename(t));be.isMatch=(t,e,r)=>be(e,r)(t);be.parse=(t,e)=>Array.isArray(t)?t.map(r=>be.parse(r,e)):su(t,{...e,fastpaths:!1});be.scan=(t,e)=>uv(t,e);be.compileRe=(t,e,r=!1,i=!1)=>{if(r===!0)return t.output;let n=e||{},s=n.contains?"":"^",o=n.contains?"":"$",a=`${s}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let u=be.toRegex(a,e);return i===!0&&(u.state=t),u};be.makeRe=(t,e={},r=!1,i=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(n.output=su.fastpaths(t,e)),n.output||(n=su(t,e)),be.compileRe(n,e,r,i)};be.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};be.constants=lv;gd.exports=be});var Dd=$((jB,Ed)=>{"use strict";Ed.exports=yd()});var Ad=$(($B,Sd)=>{"use strict";var _d=require("util"),wd=Qp(),_t=Dd(),au=Dn(),bd=t=>t===""||t==="./",ge=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let i=new Set,n=new Set,s=new Set,o=0,a=c=>{s.add(c.output),r&&r.onResult&&r.onResult(c)};for(let c=0;c<e.length;c++){let f=_t(String(e[c]),{...r,onResult:a},!0),h=f.state.negated||f.state.negatedExtglob;h&&o++;for(let p of t){let g=f(p,!0);(h?!g.isMatch:g.isMatch)&&(h?i.add(g.output):(i.delete(g.output),n.add(g.output)))}}let l=(o===e.length?[...s]:[...n]).filter(c=>!i.has(c));if(r&&l.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(c=>c.replace(/\\/g,"")):e}return l};ge.match=ge;ge.matcher=(t,e)=>_t(t,e);ge.isMatch=(t,e,r)=>_t(e,r)(t);ge.any=ge.isMatch;ge.not=(t,e,r={})=>{e=[].concat(e).map(String);let i=new Set,n=[],s=a=>{r.onResult&&r.onResult(a),n.push(a.output)},o=new Set(ge(t,e,{...r,onResult:s}));for(let a of n)o.has(a)||i.add(a);return[...i]};ge.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${_d.inspect(t)}"`);if(Array.isArray(e))return e.some(i=>ge.contains(t,i,r));if(typeof e=="string"){if(bd(t)||bd(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return ge.isMatch(t,e,{...r,contains:!0})};ge.matchKeys=(t,e,r)=>{if(!au.isObject(t))throw new TypeError("Expected the first argument to be an object");let i=ge(Object.keys(t),e,r),n={};for(let s of i)n[s]=t[s];return n};ge.some=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=_t(String(n),r);if(i.some(o=>s(o)))return!0}return!1};ge.every=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=_t(String(n),r);if(!i.every(o=>s(o)))return!1}return!0};ge.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${_d.inspect(t)}"`);return[].concat(e).every(i=>_t(i,r)(t))};ge.capture=(t,e,r)=>{let i=au.isWindows(r),s=_t.makeRe(String(t),{...r,capture:!0}).exec(i?au.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};ge.makeRe=(...t)=>_t.makeRe(...t);ge.scan=(...t)=>_t.scan(...t);ge.parse=(t,e)=>{let r=[];for(let i of[].concat(t||[]))for(let n of wd(String(i),e))r.push(_t.parse(n,e));return r};ge.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:wd(t,e)};ge.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return ge.braces(t,{...e,expand:!0})};Sd.exports=ge});var Td=$(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.matchAny=se.convertPatternsToRe=se.makeRe=se.getPatternParts=se.expandBraceExpansion=se.expandPatternsWithBraceExpansion=se.isAffectDepthOfReadingPattern=se.endsWithSlashGlobStar=se.hasGlobStar=se.getBaseDirectory=se.isPatternRelatedToParentDirectory=se.getPatternsOutsideCurrentDirectory=se.getPatternsInsideCurrentDirectory=se.getPositivePatterns=se.getNegativePatterns=se.isPositivePattern=se.isNegativePattern=se.convertToNegativePattern=se.convertToPositivePattern=se.isDynamicPattern=se.isStaticPattern=void 0;var hv=require("path"),fv=gp(),uu=Ad(),vd="**",pv="\\",dv=/[*?]|^!/,mv=/\[[^[]*]/,gv=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,yv=/[!*+?@]\([^(]*\)/,Ev=/,|\.\./;function Cd(t,e={}){return!xd(t,e)}se.isStaticPattern=Cd;function xd(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(pv)||dv.test(t)||mv.test(t)||gv.test(t)||e.extglob!==!1&&yv.test(t)||e.braceExpansion!==!1&&Dv(t))}se.isDynamicPattern=xd;function Dv(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let i=t.slice(e,r);return Ev.test(i)}function bv(t){return ys(t)?t.slice(1):t}se.convertToPositivePattern=bv;function _v(t){return"!"+t}se.convertToNegativePattern=_v;function ys(t){return t.startsWith("!")&&t[1]!=="("}se.isNegativePattern=ys;function Rd(t){return!ys(t)}se.isPositivePattern=Rd;function wv(t){return t.filter(ys)}se.getNegativePatterns=wv;function Sv(t){return t.filter(Rd)}se.getPositivePatterns=Sv;function Av(t){return t.filter(e=>!lu(e))}se.getPatternsInsideCurrentDirectory=Av;function vv(t){return t.filter(lu)}se.getPatternsOutsideCurrentDirectory=vv;function lu(t){return t.startsWith("..")||t.startsWith("./..")}se.isPatternRelatedToParentDirectory=lu;function Cv(t){return fv(t,{flipBackslashes:!1})}se.getBaseDirectory=Cv;function xv(t){return t.includes(vd)}se.hasGlobStar=xv;function Fd(t){return t.endsWith("/"+vd)}se.endsWithSlashGlobStar=Fd;function Rv(t){let e=hv.basename(t);return Fd(t)||Cd(e)}se.isAffectDepthOfReadingPattern=Rv;function Fv(t){return t.reduce((e,r)=>e.concat(Od(r)),[])}se.expandPatternsWithBraceExpansion=Fv;function Od(t){return uu.braces(t,{expand:!0,nodupes:!0})}se.expandBraceExpansion=Od;function Ov(t,e){let{parts:r}=uu.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}se.getPatternParts=Ov;function kd(t,e){return uu.makeRe(t,e)}se.makeRe=kd;function kv(t,e){return t.map(r=>kd(r,e))}se.convertPatternsToRe=kv;function Tv(t,e){return e.some(r=>r.test(t))}se.matchAny=Tv});var Id=$((qB,Pd)=>{"use strict";var Lv=require("stream"),Ld=Lv.PassThrough,Bv=Array.prototype.slice;Pd.exports=Pv;function Pv(){let t=[],e=Bv.call(arguments),r=!1,i=e[e.length-1];i&&!Array.isArray(i)&&i.pipe==null?e.pop():i={};let n=i.end!==!1,s=i.pipeError===!0;i.objectMode==null&&(i.objectMode=!0),i.highWaterMark==null&&(i.highWaterMark=64*1024);let o=Ld(i);function a(){for(let c=0,f=arguments.length;c<f;c++)t.push(Bd(arguments[c],i));return u(),this}function u(){if(r)return;r=!0;let c=t.shift();if(!c){process.nextTick(l);return}Array.isArray(c)||(c=[c]);let f=c.length+1;function h(){--f>0||(r=!1,u())}function p(g){function y(){g.removeListener("merge2UnpipeEnd",y),g.removeListener("end",y),s&&g.removeListener("error",E),h()}function E(v){o.emit("error",v)}if(g._readableState.endEmitted)return h();g.on("merge2UnpipeEnd",y),g.on("end",y),s&&g.on("error",E),g.pipe(o,{end:!1}),g.resume()}for(let g=0;g<c.length;g++)p(c[g]);h()}function l(){r=!1,o.emit("queueDrain"),n&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(c){c.emit("merge2UnpipeEnd")}),e.length&&a.apply(null,e),o}function Bd(t,e){if(Array.isArray(t))for(let r=0,i=t.length;r<i;r++)t[r]=Bd(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(Ld(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}});var Md=$(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.merge=void 0;var Iv=Id();function Nv(t){let e=Iv(t);return t.forEach(r=>{r.once("error",i=>e.emit("error",i))}),e.once("close",()=>Nd(t)),e.once("end",()=>Nd(t)),e}Es.merge=Nv;function Nd(t){t.forEach(e=>e.emit("close"))}});var jd=$(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.isEmpty=mi.isString=void 0;function Mv(t){return typeof t=="string"}mi.isString=Mv;function jv(t){return t===""}mi.isEmpty=jv});var $t=$(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.string=Te.stream=Te.pattern=Te.path=Te.fs=Te.errno=Te.array=void 0;var $v=op();Te.array=$v;var Hv=ap();Te.errno=Hv;var qv=up();Te.fs=qv;var Uv=lp();Te.path=Uv;var Gv=Td();Te.pattern=Gv;var zv=Md();Te.stream=zv;var Wv=jd();Te.string=Wv});var qd=$(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.convertPatternGroupToTask=Le.convertPatternGroupsToTasks=Le.groupPatternsByBaseDirectory=Le.getNegativePatternsAsPositive=Le.getPositivePatterns=Le.convertPatternsToTasks=Le.generate=void 0;var Ht=$t();function Yv(t,e){let r=$d(t),i=Hd(t,e.ignore),n=r.filter(u=>Ht.pattern.isStaticPattern(u,e)),s=r.filter(u=>Ht.pattern.isDynamicPattern(u,e)),o=cu(n,i,!1),a=cu(s,i,!0);return o.concat(a)}Le.generate=Yv;function cu(t,e,r){let i=[],n=Ht.pattern.getPatternsOutsideCurrentDirectory(t),s=Ht.pattern.getPatternsInsideCurrentDirectory(t),o=hu(n),a=hu(s);return i.push(...fu(o,e,r)),"."in a?i.push(pu(".",s,e,r)):i.push(...fu(a,e,r)),i}Le.convertPatternsToTasks=cu;function $d(t){return Ht.pattern.getPositivePatterns(t)}Le.getPositivePatterns=$d;function Hd(t,e){return Ht.pattern.getNegativePatterns(t).concat(e).map(Ht.pattern.convertToPositivePattern)}Le.getNegativePatternsAsPositive=Hd;function hu(t){let e={};return t.reduce((r,i)=>{let n=Ht.pattern.getBaseDirectory(i);return n in r?r[n].push(i):r[n]=[i],r},e)}Le.groupPatternsByBaseDirectory=hu;function fu(t,e,r){return Object.keys(t).map(i=>pu(i,t[i],e,r))}Le.convertPatternGroupsToTasks=fu;function pu(t,e,r,i){return{dynamic:i,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(Ht.pattern.convertToNegativePattern))}}Le.convertPatternGroupToTask=pu});var Gd=$(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.removeDuplicateSlashes=gi.transform=void 0;var Vv=/(?!^)\/{2,}/g;function Kv(t){return t.map(e=>Ud(e))}gi.transform=Kv;function Ud(t){return t.replace(Vv,"/")}gi.removeDuplicateSlashes=Ud});var Wd=$(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});Ds.read=void 0;function Zv(t,e,r){e.fs.lstat(t,(i,n)=>{if(i!==null){zd(r,i);return}if(!n.isSymbolicLink()||!e.followSymbolicLink){du(r,n);return}e.fs.stat(t,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){zd(r,s);return}du(r,n);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),du(r,o)})})}Ds.read=Zv;function zd(t,e){t(e)}function du(t,e){t(null,e)}});var Yd=$(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});bs.read=void 0;function Jv(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let i=e.fs.statSync(t);return e.markSymbolicLink&&(i.isSymbolicLink=()=>!0),i}catch(i){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw i}}bs.read=Jv});var Vd=$(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.createFileSystemAdapter=sr.FILE_SYSTEM_ADAPTER=void 0;var _s=require("fs");sr.FILE_SYSTEM_ADAPTER={lstat:_s.lstat,stat:_s.stat,lstatSync:_s.lstatSync,statSync:_s.statSync};function Xv(t){return t===void 0?sr.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},sr.FILE_SYSTEM_ADAPTER),t)}sr.createFileSystemAdapter=Xv});var Kd=$(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});var Qv=Vd(),mu=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Qv.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e!=null?e:r}};gu.default=mu});var Mr=$(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.statSync=or.stat=or.Settings=void 0;var Zd=Wd(),e1=Yd(),yu=Kd();or.Settings=yu.default;function t1(t,e,r){if(typeof e=="function"){Zd.read(t,Eu(),e);return}Zd.read(t,Eu(e),r)}or.stat=t1;function r1(t,e){let r=Eu(e);return e1.read(t,r)}or.statSync=r1;function Eu(t={}){return t instanceof yu.default?t:new yu.default(t)}});var Qd=$((QB,Xd)=>{var Jd;Xd.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window!="undefined"?window:global):t=>(Jd||(Jd=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var tm=$((eP,em)=>{em.exports=n1;var i1=Qd();function n1(t,e){let r,i,n,s=!0;Array.isArray(t)?(r=[],i=t.length):(n=Object.keys(t),r={},i=n.length);function o(u){function l(){e&&e(u,r),e=null}s?i1(l):l()}function a(u,l,c){r[u]=c,(--i===0||l)&&o(l)}i?n?n.forEach(function(u){t[u](function(l,c){a(u,l,c)})}):t.forEach(function(u,l){u(function(c,f){a(l,c,f)})}):o(null),s=!1}});var Du=$(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});Ss.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var ws=process.versions.node.split(".");if(ws[0]===void 0||ws[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var rm=Number.parseInt(ws[0],10),s1=Number.parseInt(ws[1],10),im=10,o1=10,a1=rm>im,u1=rm===im&&s1>=o1;Ss.IS_SUPPORT_READDIR_WITH_FILE_TYPES=a1||u1});var nm=$(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});As.createDirentFromStats=void 0;var bu=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function l1(t,e){return new bu(t,e)}As.createDirentFromStats=l1});var _u=$(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.fs=void 0;var c1=nm();vs.fs=c1});var wu=$(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});Cs.joinPathSegments=void 0;function h1(t,e,r){return t.endsWith(r)?t+e:t+r+e}Cs.joinPathSegments=h1});var cm=$(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.readdir=ar.readdirWithFileTypes=ar.read=void 0;var f1=Mr(),sm=tm(),p1=Du(),om=_u(),am=wu();function d1(t,e,r){if(!e.stats&&p1.IS_SUPPORT_READDIR_WITH_FILE_TYPES){um(t,e,r);return}lm(t,e,r)}ar.read=d1;function um(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(i,n)=>{if(i!==null){xs(r,i);return}let s=n.map(a=>({dirent:a,name:a.name,path:am.joinPathSegments(t,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){Su(r,s);return}let o=s.map(a=>m1(a,e));sm(o,(a,u)=>{if(a!==null){xs(r,a);return}Su(r,u)})})}ar.readdirWithFileTypes=um;function m1(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(i,n)=>{if(i!==null){if(e.throwErrorOnBrokenSymbolicLink){r(i);return}r(null,t);return}t.dirent=om.fs.createDirentFromStats(t.name,n),r(null,t)})}}function lm(t,e,r){e.fs.readdir(t,(i,n)=>{if(i!==null){xs(r,i);return}let s=n.map(o=>{let a=am.joinPathSegments(t,o,e.pathSegmentSeparator);return u=>{f1.stat(a,e.fsStatSettings,(l,c)=>{if(l!==null){u(l);return}let f={name:o,path:a,dirent:om.fs.createDirentFromStats(o,c)};e.stats&&(f.stats=c),u(null,f)})}});sm(s,(o,a)=>{if(o!==null){xs(r,o);return}Su(r,a)})})}ar.readdir=lm;function xs(t,e){t(e)}function Su(t,e){t(null,e)}});var mm=$(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.readdir=ur.readdirWithFileTypes=ur.read=void 0;var g1=Mr(),y1=Du(),hm=_u(),fm=wu();function E1(t,e){return!e.stats&&y1.IS_SUPPORT_READDIR_WITH_FILE_TYPES?pm(t,e):dm(t,e)}ur.read=E1;function pm(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(i=>{let n={dirent:i,name:i.name,path:fm.joinPathSegments(t,i.name,e.pathSegmentSeparator)};if(n.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(n.path);n.dirent=hm.fs.createDirentFromStats(n.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return n})}ur.readdirWithFileTypes=pm;function dm(t,e){return e.fs.readdirSync(t).map(i=>{let n=fm.joinPathSegments(t,i,e.pathSegmentSeparator),s=g1.statSync(n,e.fsStatSettings),o={name:i,path:n,dirent:hm.fs.createDirentFromStats(i,s)};return e.stats&&(o.stats=s),o})}ur.readdir=dm});var gm=$(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.createFileSystemAdapter=lr.FILE_SYSTEM_ADAPTER=void 0;var yi=require("fs");lr.FILE_SYSTEM_ADAPTER={lstat:yi.lstat,stat:yi.stat,lstatSync:yi.lstatSync,statSync:yi.statSync,readdir:yi.readdir,readdirSync:yi.readdirSync};function D1(t){return t===void 0?lr.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},lr.FILE_SYSTEM_ADAPTER),t)}lr.createFileSystemAdapter=D1});var ym=$(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});var b1=require("path"),_1=Mr(),w1=gm(),Au=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=w1.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,b1.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new _1.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e!=null?e:r}};vu.default=Au});var Rs=$(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.Settings=cr.scandirSync=cr.scandir=void 0;var Em=cm(),S1=mm(),Cu=ym();cr.Settings=Cu.default;function A1(t,e,r){if(typeof e=="function"){Em.read(t,xu(),e);return}Em.read(t,xu(e),r)}cr.scandir=A1;function v1(t,e){let r=xu(e);return S1.read(t,r)}cr.scandirSync=v1;function xu(t={}){return t instanceof Cu.default?t:new Cu.default(t)}});var bm=$((cP,Dm)=>{"use strict";function C1(t){var e=new t,r=e;function i(){var s=e;return s.next?e=s.next:(e=new t,r=e),s.next=null,s}function n(s){r.next=s,r=s}return{get:i,release:n}}Dm.exports=C1});var wm=$((hP,Ru)=>{"use strict";var x1=bm();function _m(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var i=x1(R1),n=null,s=null,o=0,a=null,u={push:y,drain:nt,saturated:nt,pause:c,paused:!1,concurrency:r,running:l,resume:p,idle:g,length:f,getQueue:h,unshift:E,empty:nt,kill:F,killAndDrain:O,error:R};return u;function l(){return o}function c(){u.paused=!0}function f(){for(var x=n,L=0;x;)x=x.next,L++;return L}function h(){for(var x=n,L=[];x;)L.push(x.value),x=x.next;return L}function p(){if(u.paused){u.paused=!1;for(var x=0;x<u.concurrency;x++)o++,v()}}function g(){return o===0&&u.length()===0}function y(x,L){var b=i.get();b.context=t,b.release=v,b.value=x,b.callback=L||nt,b.errorHandler=a,o===u.concurrency||u.paused?s?(s.next=b,s=b):(n=b,s=b,u.saturated()):(o++,e.call(t,b.value,b.worked))}function E(x,L){var b=i.get();b.context=t,b.release=v,b.value=x,b.callback=L||nt,o===u.concurrency||u.paused?n?(b.next=n,n=b):(n=b,s=b,u.saturated()):(o++,e.call(t,b.value,b.worked))}function v(x){x&&i.release(x);var L=n;L?u.paused?o--:(s===n&&(s=null),n=L.next,L.next=null,e.call(t,L.value,L.worked),s===null&&u.empty()):--o===0&&u.drain()}function F(){n=null,s=null,u.drain=nt}function O(){n=null,s=null,u.drain(),u.drain=nt}function R(x){a=x}}function nt(){}function R1(){this.value=null,this.callback=nt,this.next=null,this.release=nt,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,i){var n=t.callback,s=t.errorHandler,o=t.value;t.value=null,t.callback=nt,t.errorHandler&&s(r,o),n.call(t.context,r,i),t.release(t)}}function F1(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function i(c,f){e.call(this,c).then(function(h){f(null,h)},f)}var n=_m(t,i,r),s=n.push,o=n.unshift;return n.push=a,n.unshift=u,n.drained=l,n;function a(c){var f=new Promise(function(h,p){s(c,function(g,y){if(g){p(g);return}h(y)})});return f.catch(nt),f}function u(c){var f=new Promise(function(h,p){o(c,function(g,y){if(g){p(g);return}h(y)})});return f.catch(nt),f}function l(){var c=n.drain,f=new Promise(function(h){n.drain=function(){c(),h()}});return f}}Ru.exports=_m;Ru.exports.promise=F1});var Fs=$(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.joinPathSegments=wt.replacePathSegmentSeparator=wt.isAppliedFilter=wt.isFatalError=void 0;function O1(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}wt.isFatalError=O1;function k1(t,e){return t===null||t(e)}wt.isAppliedFilter=k1;function T1(t,e){return t.split(/[/\\]/).join(e)}wt.replacePathSegmentSeparator=T1;function L1(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}wt.joinPathSegments=L1});var ku=$(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});var B1=Fs(),Fu=class{constructor(e,r){this._root=e,this._settings=r,this._root=B1.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};Ou.default=Fu});var Bu=$(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});var P1=require("events"),I1=Rs(),N1=wm(),Os=Fs(),M1=ku(),Tu=class extends M1.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=I1.scandir,this._emitter=new P1.EventEmitter,this._queue=N1(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let i={directory:e,base:r};this._queue.push(i,n=>{n!==null&&this._handleError(n)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(i,n)=>{if(i!==null){r(i,void 0);return}for(let s of n)this._handleEntry(s,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!Os.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let i=e.path;r!==void 0&&(e.path=Os.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Os.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&Os.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(i,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};Lu.default=Tu});var Sm=$(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});var j1=Bu(),Pu=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new j1.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{$1(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{H1(e,this._storage)}),this._reader.read()}};Iu.default=Pu;function $1(t,e){t(e)}function H1(t,e){t(null,e)}});var Am=$(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});var q1=require("stream"),U1=Bu(),Nu=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new U1.default(this._root,this._settings),this._stream=new q1.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};Mu.default=Nu});var vm=$($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});var G1=Rs(),ks=Fs(),z1=ku(),ju=class extends z1.default{constructor(){super(...arguments),this._scandir=G1.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let i=this._scandir(e,this._settings.fsScandirSettings);for(let n of i)this._handleEntry(n,r)}catch(i){this._handleError(i)}}_handleError(e){if(ks.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let i=e.path;r!==void 0&&(e.path=ks.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),ks.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&ks.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(i,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};$u.default=ju});var Cm=$(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});var W1=vm(),Hu=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new W1.default(this._root,this._settings)}read(){return this._reader.read()}};qu.default=Hu});var xm=$(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var Y1=require("path"),V1=Rs(),Uu=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Y1.sep),this.fsScandirSettings=new V1.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e!=null?e:r}};Gu.default=Uu});var Ls=$(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.Settings=St.walkStream=St.walkSync=St.walk=void 0;var Rm=Sm(),K1=Am(),Z1=Cm(),zu=xm();St.Settings=zu.default;function J1(t,e,r){if(typeof e=="function"){new Rm.default(t,Ts()).read(e);return}new Rm.default(t,Ts(e)).read(r)}St.walk=J1;function X1(t,e){let r=Ts(e);return new Z1.default(t,r).read()}St.walkSync=X1;function Q1(t,e){let r=Ts(e);return new K1.default(t,r).read()}St.walkStream=Q1;function Ts(t={}){return t instanceof zu.default?t:new zu.default(t)}});var Bs=$(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var eC=require("path"),tC=Mr(),Fm=$t(),Wu=class{constructor(e){this._settings=e,this._fsStatSettings=new tC.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return eC.resolve(this._settings.cwd,e)}_makeEntry(e,r){let i={name:r,path:r,dirent:Fm.fs.createDirentFromStats(r,e)};return this._settings.stats&&(i.stats=e),i}_isFatalError(e){return!Fm.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};Yu.default=Wu});var Zu=$(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var rC=require("stream"),iC=Mr(),nC=Ls(),sC=Bs(),Vu=class extends sC.default{constructor(){super(...arguments),this._walkStream=nC.walkStream,this._stat=iC.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let i=e.map(this._getFullEntryPath,this),n=new rC.PassThrough({objectMode:!0});n._write=(s,o,a)=>this._getEntry(i[s],e[s],r).then(u=>{u!==null&&r.entryFilter(u)&&n.push(u),s===i.length-1&&n.end(),a()}).catch(a);for(let s=0;s<i.length;s++)n.write(s);return n}_getEntry(e,r,i){return this._getStat(e).then(n=>this._makeEntry(n,r)).catch(n=>{if(i.errorFilter(n))return null;throw n})}_getStat(e){return new Promise((r,i)=>{this._stat(e,this._fsStatSettings,(n,s)=>n===null?r(s):i(n))})}};Ku.default=Vu});var Om=$(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});var oC=Ls(),aC=Bs(),uC=Zu(),Ju=class extends aC.default{constructor(){super(...arguments),this._walkAsync=oC.walk,this._readerStream=new uC.default(this._settings)}dynamic(e,r){return new Promise((i,n)=>{this._walkAsync(e,r,(s,o)=>{s===null?i(o):n(s)})})}async static(e,r){let i=[],n=this._readerStream.static(e,r);return new Promise((s,o)=>{n.once("error",o),n.on("data",a=>i.push(a)),n.once("end",()=>s(i))})}};Xu.default=Ju});var km=$(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});var Ei=$t(),Qu=class{constructor(e,r,i){this._patterns=e,this._settings=r,this._micromatchOptions=i,this._storage=[],this._fillStorage()}_fillStorage(){let e=Ei.pattern.expandPatternsWithBraceExpansion(this._patterns);for(let r of e){let i=this._getPatternSegments(r),n=this._splitSegmentsIntoSections(i);this._storage.push({complete:n.length<=1,pattern:r,segments:i,sections:n})}}_getPatternSegments(e){return Ei.pattern.getPatternParts(e,this._micromatchOptions).map(i=>Ei.pattern.isDynamicPattern(i,this._settings)?{dynamic:!0,pattern:i,patternRe:Ei.pattern.makeRe(i,this._micromatchOptions)}:{dynamic:!1,pattern:i})}_splitSegmentsIntoSections(e){return Ei.array.splitWhen(e,r=>r.dynamic&&Ei.pattern.hasGlobStar(r.pattern))}};el.default=Qu});var Tm=$(rl=>{"use strict";Object.defineProperty(rl,"__esModule",{value:!0});var lC=km(),tl=class extends lC.default{match(e){let r=e.split("/"),i=r.length,n=this._storage.filter(s=>!s.complete||s.segments.length>i);for(let s of n){let o=s.sections[0];if(!s.complete&&i>o.length||r.every((u,l)=>{let c=s.segments[l];return!!(c.dynamic&&c.patternRe.test(u)||!c.dynamic&&c.pattern===u)}))return!0}return!1}};rl.default=tl});var Lm=$(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});var Ps=$t(),cC=Tm(),il=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,i){let n=this._getMatcher(r),s=this._getNegativePatternsRe(i);return o=>this._filter(e,o,n,s)}_getMatcher(e){return new cC.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(Ps.pattern.isAffectDepthOfReadingPattern);return Ps.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,i,n){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let s=Ps.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,i)?!1:this._isSkippedByNegativePatterns(s,n)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let i=r.split("/").length;if(e==="")return i;let n=e.split("/").length;return i-n}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!Ps.pattern.matchAny(e,r)}};nl.default=il});var Bm=$(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});var jr=$t(),sl=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let i=jr.pattern.convertPatternsToRe(e,this._micromatchOptions),n=jr.pattern.convertPatternsToRe(r,this._micromatchOptions);return s=>this._filter(s,i,n)}_filter(e,r,i){if(this._settings.unique&&this._isDuplicateEntry(e)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(e.path,i))return!1;let n=this._settings.baseNameMatch?e.name:e.path,s=e.dirent.isDirectory(),o=this._isMatchToPatterns(n,r,s)&&!this._isMatchToPatterns(e.path,i,s);return this._settings.unique&&o&&this._createIndexRecord(e),o}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;let i=jr.path.makeAbsolute(this._settings.cwd,e);return jr.pattern.matchAny(i,r)}_isMatchToPatterns(e,r,i){let n=jr.path.removeLeadingDotSegment(e),s=jr.pattern.matchAny(n,r);return!s&&i?jr.pattern.matchAny(n+"/",r):s}};ol.default=sl});var Pm=$(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});var hC=$t(),al=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return hC.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};ul.default=al});var Nm=$(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});var Im=$t(),ll=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=Im.path.makeAbsolute(this._settings.cwd,r),r=Im.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};cl.default=ll});var Is=$(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});var fC=require("path"),pC=Lm(),dC=Bm(),mC=Pm(),gC=Nm(),hl=class{constructor(e){this._settings=e,this.errorFilter=new mC.default(this._settings),this.entryFilter=new dC.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new pC.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new gC.default(this._settings)}_getRootDirectory(e){return fC.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};fl.default=hl});var Mm=$(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});var yC=Om(),EC=Is(),pl=class extends EC.default{constructor(){super(...arguments),this._reader=new yC.default(this._settings)}async read(e){let r=this._getRootDirectory(e),i=this._getReaderOptions(e);return(await this.api(r,e,i)).map(s=>i.transform(s))}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}};dl.default=pl});var jm=$(gl=>{"use strict";Object.defineProperty(gl,"__esModule",{value:!0});var DC=require("stream"),bC=Zu(),_C=Is(),ml=class extends _C.default{constructor(){super(...arguments),this._reader=new bC.default(this._settings)}read(e){let r=this._getRootDirectory(e),i=this._getReaderOptions(e),n=this.api(r,e,i),s=new DC.Readable({objectMode:!0,read:()=>{}});return n.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",i.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>n.destroy()),s}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}};gl.default=ml});var $m=$(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});var wC=Mr(),SC=Ls(),AC=Bs(),yl=class extends AC.default{constructor(){super(...arguments),this._walkSync=SC.walkSync,this._statSync=wC.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let i=[];for(let n of e){let s=this._getFullEntryPath(n),o=this._getEntry(s,n,r);o===null||!r.entryFilter(o)||i.push(o)}return i}_getEntry(e,r,i){try{let n=this._getStat(e);return this._makeEntry(n,r)}catch(n){if(i.errorFilter(n))return null;throw n}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};El.default=yl});var Hm=$(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});var vC=$m(),CC=Is(),Dl=class extends CC.default{constructor(){super(...arguments),this._reader=new vC.default(this._settings)}read(e){let r=this._getRootDirectory(e),i=this._getReaderOptions(e);return this.api(r,e,i).map(i.transform)}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}};bl.default=Dl});var qm=$(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var Di=require("fs"),xC=require("os"),RC=Math.max(xC.cpus().length,1);bi.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:Di.lstat,lstatSync:Di.lstatSync,stat:Di.stat,statSync:Di.statSync,readdir:Di.readdir,readdirSync:Di.readdirSync};var _l=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,RC),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},bi.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};bi.default=_l});var Ns=$((IP,zm)=>{"use strict";var Um=qd(),Gm=Gd(),FC=Mm(),OC=jm(),kC=Hm(),wl=qm(),$r=$t();async function Sl(t,e){_i(t);let r=Al(t,FC.default,e),i=await Promise.all(r);return $r.array.flatten(i)}(function(t){function e(o,a){_i(o);let u=Al(o,kC.default,a);return $r.array.flatten(u)}t.sync=e;function r(o,a){_i(o);let u=Al(o,OC.default,a);return $r.stream.merge(u)}t.stream=r;function i(o,a){_i(o);let u=Gm.transform([].concat(o)),l=new wl.default(a);return Um.generate(u,l)}t.generateTasks=i;function n(o,a){_i(o);let u=new wl.default(a);return $r.pattern.isDynamicPattern(o,u)}t.isDynamicPattern=n;function s(o){return _i(o),$r.path.escape(o)}t.escapePath=s})(Sl||(Sl={}));function Al(t,e,r){let i=Gm.transform([].concat(t)),n=new wl.default(r),s=Um.generate(i,n),o=new e(n);return s.map(o.read,o)}function _i(t){if(![].concat(t).every(i=>$r.string.isString(i)&&!$r.string.isEmpty(i)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}zm.exports=Sl});var s0=$((HP,n0)=>{n0.exports=i0;i0.sync=zC;var t0=require("fs");function GC(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var i=0;i<r.length;i++){var n=r[i].toLowerCase();if(n&&t.substr(-n.length).toLowerCase()===n)return!0}return!1}function r0(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:GC(e,r)}function i0(t,e,r){t0.stat(t,function(i,n){r(i,i?!1:r0(n,t,e))})}function zC(t,e){return r0(t0.statSync(t),t,e)}});var c0=$((qP,l0)=>{l0.exports=a0;a0.sync=WC;var o0=require("fs");function a0(t,e,r){o0.stat(t,function(i,n){r(i,i?!1:u0(n,e))})}function WC(t,e){return u0(o0.statSync(t),e)}function u0(t,e){return t.isFile()&&YC(t,e)}function YC(t,e){var r=t.mode,i=t.uid,n=t.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),u=parseInt("010",8),l=parseInt("001",8),c=a|u,f=r&l||r&u&&n===o||r&a&&i===s||r&c&&s===0;return f}});var f0=$((GP,h0)=>{var UP=require("fs"),Ms;process.platform==="win32"||global.TESTING_WINDOWS?Ms=s0():Ms=c0();h0.exports=vl;vl.sync=VC;function vl(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){vl(t,e||{},function(s,o){s?n(s):i(o)})})}Ms(t,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),r(i,n)})}function VC(t,e){try{return Ms.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var D0=$((zP,E0)=>{var Si=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",p0=require("path"),KC=Si?";":":",d0=f0(),m0=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),g0=(t,e)=>{let r=e.colon||KC,i=t.match(/\//)||Si&&t.match(/\\/)?[""]:[...Si?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],n=Si?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Si?n.split(r):[""];return Si&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},y0=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=g0(t,e),o=[],a=l=>new Promise((c,f)=>{if(l===i.length)return e.all&&o.length?c(o):f(m0(t));let h=i[l],p=/^".*"$/.test(h)?h.slice(1,-1):h,g=p0.join(p,t),y=!p&&/^\.[\\\/]/.test(t)?t.slice(0,2)+g:g;c(u(y,l,0))}),u=(l,c,f)=>new Promise((h,p)=>{if(f===n.length)return h(a(c+1));let g=n[f];d0(l+g,{pathExt:s},(y,E)=>{if(!y&&E)if(e.all)o.push(l+g);else return h(l+g);return h(u(l,c,f+1))})});return r?a(0).then(l=>r(null,l),r):a(0)},ZC=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:i,pathExtExe:n}=g0(t,e),s=[];for(let o=0;o<r.length;o++){let a=r[o],u=/^".*"$/.test(a)?a.slice(1,-1):a,l=p0.join(u,t),c=!u&&/^\.[\\\/]/.test(t)?t.slice(0,2)+l:l;for(let f=0;f<i.length;f++){let h=c+i[f];try{if(d0.sync(h,{pathExt:n}))if(e.all)s.push(h);else return h}catch{}}}if(e.all&&s.length)return s;if(e.nothrow)return null;throw m0(t)};E0.exports=y0;y0.sync=ZC});var xl=$((WP,Cl)=>{"use strict";var b0=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};Cl.exports=b0;Cl.exports.default=b0});var A0=$((YP,S0)=>{"use strict";var _0=require("path"),JC=D0(),XC=xl();function w0(t,e){let r=t.options.env||process.env,i=process.cwd(),n=t.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch{}let o;try{o=JC.sync(t.command,{path:r[XC({env:r})],pathExt:e?_0.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=_0.resolve(n?t.options.cwd:"",o)),o}function QC(t){return w0(t)||w0(t,!0)}S0.exports=QC});var v0=$((VP,Fl)=>{"use strict";var Rl=/([()\][%!^"`<>&|;, *?])/g;function ex(t){return t=t.replace(Rl,"^$1"),t}function tx(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(Rl,"^$1"),e&&(t=t.replace(Rl,"^$1")),t}Fl.exports.command=ex;Fl.exports.argument=tx});var x0=$((KP,C0)=>{"use strict";C0.exports=/^#!(.*)/});var F0=$((ZP,R0)=>{"use strict";var rx=x0();R0.exports=(t="")=>{let e=t.match(rx);if(!e)return null;let[r,i]=e[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var k0=$((JP,O0)=>{"use strict";var Ol=require("fs"),ix=F0();function nx(t){let r=Buffer.alloc(150),i;try{i=Ol.openSync(t,"r"),Ol.readSync(i,r,0,150,0),Ol.closeSync(i)}catch{}return ix(r.toString())}O0.exports=nx});var P0=$((XP,B0)=>{"use strict";var sx=require("path"),T0=A0(),L0=v0(),ox=k0(),ax=process.platform==="win32",ux=/\.(?:com|exe)$/i,lx=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function cx(t){t.file=T0(t);let e=t.file&&ox(t.file);return e?(t.args.unshift(t.file),t.command=e,T0(t)):t.file}function hx(t){if(!ax)return t;let e=cx(t),r=!ux.test(e);if(t.options.forceShell||r){let i=lx.test(e);t.command=sx.normalize(t.command),t.command=L0.command(t.command),t.args=t.args.map(s=>L0.argument(s,i));let n=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${n}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function fx(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let i={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?i:hx(i)}B0.exports=fx});var M0=$((QP,N0)=>{"use strict";var kl=process.platform==="win32";function Tl(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function px(t,e){if(!kl)return;let r=t.emit;t.emit=function(i,n){if(i==="exit"){let s=I0(n,e,"spawn");if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}function I0(t,e){return kl&&t===1&&!e.file?Tl(e.original,"spawn"):null}function dx(t,e){return kl&&t===1&&!e.file?Tl(e.original,"spawnSync"):null}N0.exports={hookChildProcess:px,verifyENOENT:I0,verifyENOENTSync:dx,notFoundError:Tl}});var H0=$((e2,Ai)=>{"use strict";var j0=require("child_process"),Ll=P0(),Bl=M0();function $0(t,e,r){let i=Ll(t,e,r),n=j0.spawn(i.command,i.args,i.options);return Bl.hookChildProcess(n,i),n}function mx(t,e,r){let i=Ll(t,e,r),n=j0.spawnSync(i.command,i.args,i.options);return n.error=n.error||Bl.verifyENOENTSync(n.status,i),n}Ai.exports=$0;Ai.exports.spawn=$0;Ai.exports.sync=mx;Ai.exports._parse=Ll;Ai.exports._enoent=Bl});var U0=$((t2,q0)=>{"use strict";q0.exports=t=>{let e=typeof t=="string"?`
4
4
  `:`
5
- `.charCodeAt(),r=typeof t=="string"?"\r":"\r".charCodeAt();return t[t.length-1]===e&&(t=t.slice(0,t.length-1)),t[t.length-1]===r&&(t=t.slice(0,t.length-1)),t}});var z0=$((X2,_n)=>{"use strict";var bn=require("path"),U0=xl(),G0=t=>{t={cwd:process.cwd(),path:process.env[U0()],execPath:process.execPath,...t};let e,r=bn.resolve(t.cwd),i=[];for(;e!==r;)i.push(bn.join(r,"node_modules/.bin")),e=r,r=bn.resolve(r,"..");let n=bn.resolve(t.cwd,t.execPath,"..");return i.push(n),i.concat(t.path).join(bn.delimiter)};_n.exports=G0;_n.exports.default=G0;_n.exports.env=t=>{t={env:process.env,...t};let e={...t.env},r=U0({env:e});return t.path=e[r],e[r]=_n.exports(t),e}});var Y0=$((Q2,Pl)=>{"use strict";var W0=(t,e)=>{for(let r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};Pl.exports=W0;Pl.exports.default=W0});var K0=$((eP,$s)=>{"use strict";var dx=Y0(),js=new WeakMap,V0=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,i=0,n=t.displayName||t.name||"<anonymous>",s=function(...o){if(js.set(s,++i),i===1)r=t.apply(this,o),t=null;else if(e.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return r};return dx(s,t),js.set(s,i),s};$s.exports=V0;$s.exports.default=V0;$s.exports.callCount=t=>{if(!js.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return js.get(t)}});var Z0=$(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.SIGNALS=void 0;var mx=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];Hs.SIGNALS=mx});var Il=$(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.SIGRTMAX=Si.getRealtimeSignals=void 0;var gx=function(){let t=X0-J0+1;return Array.from({length:t},yx)};Si.getRealtimeSignals=gx;var yx=function(t,e){return{name:`SIGRT${e+1}`,number:J0+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},J0=34,X0=64;Si.SIGRTMAX=X0});var Q0=$(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.getSignals=void 0;var Ex=require("os"),Dx=Z0(),bx=Il(),_x=function(){let t=(0,bx.getRealtimeSignals)();return[...Dx.SIGNALS,...t].map(wx)};qs.getSignals=_x;var wx=function({name:t,number:e,description:r,action:i,forced:n=!1,standard:s}){let{signals:{[t]:o}}=Ex.constants,a=o!==void 0;return{name:t,number:a?o:e,description:r,supported:a,action:i,forced:n,standard:s}}});var tg=$(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.signalsByNumber=Ai.signalsByName=void 0;var Sx=require("os"),eg=Q0(),Ax=Il(),vx=function(){return(0,eg.getSignals)().reduce(Cx,{})},Cx=function(t,{name:e,number:r,description:i,supported:n,action:s,forced:o,standard:a}){return{...t,[e]:{name:e,number:r,description:i,supported:n,action:s,forced:o,standard:a}}},xx=vx();Ai.signalsByName=xx;var Rx=function(){let t=(0,eg.getSignals)(),e=Ax.SIGRTMAX+1,r=Array.from({length:e},(i,n)=>Fx(n,t));return Object.assign({},...r)},Fx=function(t,e){let r=Ox(t,e);if(r===void 0)return{};let{name:i,description:n,supported:s,action:o,forced:a,standard:u}=r;return{[t]:{name:i,number:t,description:n,supported:s,action:o,forced:a,standard:u}}},Ox=function(t,e){let r=e.find(({name:i})=>Sx.constants.signals[i]===t);return r!==void 0?r:e.find(i=>i.number===t)},kx=Rx();Ai.signalsByNumber=kx});var ig=$((sP,rg)=>{"use strict";var{signalsByName:Tx}=tg(),Lx=({timedOut:t,timeout:e,errorCode:r,signal:i,signalDescription:n,exitCode:s,isCanceled:o})=>t?`timed out after ${e} milliseconds`:o?"was canceled":r!==void 0?`failed with ${r}`:i!==void 0?`was killed with ${i} (${n})`:s!==void 0?`failed with exit code ${s}`:"failed",Bx=({stdout:t,stderr:e,all:r,error:i,signal:n,exitCode:s,command:o,escapedCommand:a,timedOut:u,isCanceled:l,killed:c,parsed:{options:{timeout:f}}})=>{s=s===null?void 0:s,n=n===null?void 0:n;let h=n===void 0?void 0:Tx[n].description,p=i&&i.code,m=`Command ${Lx({timedOut:u,timeout:f,errorCode:p,signal:n,signalDescription:h,exitCode:s,isCanceled:l})}: ${o}`,g=Object.prototype.toString.call(i)==="[object Error]",v=g?`${m}
6
- ${i.message}`:m,F=[v,e,t].filter(Boolean).join(`
7
- `);return g?(i.originalMessage=i.message,i.message=F):i=new Error(F),i.shortMessage=v,i.command=o,i.escapedCommand=a,i.exitCode=s,i.signal=n,i.signalDescription=h,i.stdout=t,i.stderr=e,r!==void 0&&(i.all=r),"bufferedData"in i&&delete i.bufferedData,i.failed=!0,i.timedOut=!!u,i.isCanceled=l,i.killed=c&&!u,i};rg.exports=Bx});var sg=$((oP,Nl)=>{"use strict";var Us=["stdin","stdout","stderr"],Px=t=>Us.some(e=>t[e]!==void 0),ng=t=>{if(!t)return;let{stdio:e}=t;if(e===void 0)return Us.map(i=>t[i]);if(Px(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Us.map(i=>`\`${i}\``).join(", ")}`);if(typeof e=="string")return e;if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);let r=Math.max(e.length,Us.length);return Array.from({length:r},(i,n)=>e[n])};Nl.exports=ng;Nl.exports.node=t=>{let e=ng(t);return e==="ipc"?"ipc":e===void 0||typeof e=="string"?[e,e,e,"ipc"]:e.includes("ipc")?e:[...e,"ipc"]}});var og=$((aP,Gs)=>{Gs.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Gs.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Gs.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var hg=$((uP,xi)=>{var ye=global.process,Mr=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};Mr(ye)?(ag=require("assert"),vi=og(),ug=/^win/i.test(ye.platform),wn=require("events"),typeof wn!="function"&&(wn=wn.EventEmitter),ye.__signal_exit_emitter__?xe=ye.__signal_exit_emitter__:(xe=ye.__signal_exit_emitter__=new wn,xe.count=0,xe.emitted={}),xe.infinite||(xe.setMaxListeners(1/0),xe.infinite=!0),xi.exports=function(t,e){if(!Mr(global.process))return function(){};ag.equal(typeof t,"function","a callback must be provided for exit handler"),Ci===!1&&Ml();var r="exit";e&&e.alwaysLast&&(r="afterexit");var i=function(){xe.removeListener(r,t),xe.listeners("exit").length===0&&xe.listeners("afterexit").length===0&&zs()};return xe.on(r,t),i},zs=function(){!Ci||!Mr(global.process)||(Ci=!1,vi.forEach(function(e){try{ye.removeListener(e,Ws[e])}catch{}}),ye.emit=Ys,ye.reallyExit=jl,xe.count-=1)},xi.exports.unload=zs,jr=function(e,r,i){xe.emitted[e]||(xe.emitted[e]=!0,xe.emit(e,r,i))},Ws={},vi.forEach(function(t){Ws[t]=function(){if(Mr(global.process)){var r=ye.listeners(t);r.length===xe.count&&(zs(),jr("exit",null,t),jr("afterexit",null,t),ug&&t==="SIGHUP"&&(t="SIGINT"),ye.kill(ye.pid,t))}}}),xi.exports.signals=function(){return vi},Ci=!1,Ml=function(){Ci||!Mr(global.process)||(Ci=!0,xe.count+=1,vi=vi.filter(function(e){try{return ye.on(e,Ws[e]),!0}catch{return!1}}),ye.emit=cg,ye.reallyExit=lg)},xi.exports.load=Ml,jl=ye.reallyExit,lg=function(e){Mr(global.process)&&(ye.exitCode=e||0,jr("exit",ye.exitCode,null),jr("afterexit",ye.exitCode,null),jl.call(ye,ye.exitCode))},Ys=ye.emit,cg=function(e,r){if(e==="exit"&&Mr(global.process)){r!==void 0&&(ye.exitCode=r);var i=Ys.apply(this,arguments);return jr("exit",ye.exitCode,null),jr("afterexit",ye.exitCode,null),i}else return Ys.apply(this,arguments)}):xi.exports=function(){return function(){}};var ag,vi,ug,wn,xe,zs,jr,Ws,Ci,Ml,jl,lg,Ys,cg});var pg=$((lP,fg)=>{"use strict";var Ix=require("os"),Nx=hg(),Mx=1e3*5,jx=(t,e="SIGTERM",r={})=>{let i=t(e);return $x(t,e,r,i),i},$x=(t,e,r,i)=>{if(!Hx(e,r,i))return;let n=Ux(r),s=setTimeout(()=>{t("SIGKILL")},n);s.unref&&s.unref()},Hx=(t,{forceKillAfterTimeout:e},r)=>qx(t)&&e!==!1&&r,qx=t=>t===Ix.constants.signals.SIGTERM||typeof t=="string"&&t.toUpperCase()==="SIGTERM",Ux=({forceKillAfterTimeout:t=!0})=>{if(t===!0)return Mx;if(!Number.isFinite(t)||t<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);return t},Gx=(t,e)=>{t.kill()&&(e.isCanceled=!0)},zx=(t,e,r)=>{t.kill(e),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:e}))},Wx=(t,{timeout:e,killSignal:r="SIGTERM"},i)=>{if(e===0||e===void 0)return i;let n,s=new Promise((a,u)=>{n=setTimeout(()=>{zx(t,r,u)},e)}),o=i.finally(()=>{clearTimeout(n)});return Promise.race([s,o])},Yx=({timeout:t})=>{if(t!==void 0&&(!Number.isFinite(t)||t<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`)},Vx=async(t,{cleanup:e,detached:r},i)=>{if(!e||r)return i;let n=Nx(()=>{t.kill()});return i.finally(()=>{n()})};fg.exports={spawnedKill:jx,spawnedCancel:Gx,setupTimeout:Wx,validateTimeout:Yx,setExitHandler:Vx}});var mg=$((cP,dg)=>{"use strict";var At=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";At.writable=t=>At(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";At.readable=t=>At(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";At.duplex=t=>At.writable(t)&&At.readable(t);At.transform=t=>At.duplex(t)&&typeof t._transform=="function";dg.exports=At});var yg=$((hP,gg)=>{"use strict";var{PassThrough:Kx}=require("stream");gg.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,i=r==="buffer",n=!1;e?n=!(r||i):r=r||"utf8",i&&(r=null);let s=new Kx({objectMode:n});r&&s.setEncoding(r);let o=0,a=[];return s.on("data",u=>{a.push(u),n?o=a.length:o+=u.length}),s.getBufferedValue=()=>e?a:i?Buffer.concat(a,o):a.join(""),s.getBufferedLength=()=>o,s}});var Eg=$((fP,Sn)=>{"use strict";var{constants:Zx}=require("buffer"),Jx=require("stream"),{promisify:Xx}=require("util"),Qx=yg(),eR=Xx(Jx.pipeline),Vs=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function $l(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,i=Qx(e);return await new Promise((n,s)=>{let o=a=>{a&&i.getBufferedLength()<=Zx.MAX_LENGTH&&(a.bufferedData=i.getBufferedValue()),s(a)};(async()=>{try{await eR(t,i),n()}catch(a){o(a)}})(),i.on("data",()=>{i.getBufferedLength()>r&&o(new Vs)})}),i.getBufferedValue()}Sn.exports=$l;Sn.exports.buffer=(t,e)=>$l(t,{...e,encoding:"buffer"});Sn.exports.array=(t,e)=>$l(t,{...e,array:!0});Sn.exports.MaxBufferError=Vs});var bg=$((pP,Dg)=>{"use strict";var{PassThrough:tR}=require("stream");Dg.exports=function(){var t=[],e=new tR({objectMode:!0});return e.setMaxListeners(0),e.add=r,e.isEmpty=i,e.on("unpipe",n),Array.prototype.slice.call(arguments).forEach(r),e;function r(s){return Array.isArray(s)?(s.forEach(r),this):(t.push(s),s.once("end",n.bind(null,s)),s.once("error",e.emit.bind(e,"error")),s.pipe(e,{end:!1}),this)}function i(){return t.length==0}function n(s){t=t.filter(function(o){return o!==s}),!t.length&&e.readable&&e.end()}}});var Ag=$((dP,Sg)=>{"use strict";var wg=mg(),_g=Eg(),rR=bg(),iR=(t,e)=>{e===void 0||t.stdin===void 0||(wg(e)?e.pipe(t.stdin):t.stdin.end(e))},nR=(t,{all:e})=>{if(!e||!t.stdout&&!t.stderr)return;let r=rR();return t.stdout&&r.add(t.stdout),t.stderr&&r.add(t.stderr),r},Hl=async(t,e)=>{if(t){t.destroy();try{return await e}catch(r){return r.bufferedData}}},ql=(t,{encoding:e,buffer:r,maxBuffer:i})=>{if(!(!t||!r))return e?_g(t,{encoding:e,maxBuffer:i}):_g.buffer(t,{maxBuffer:i})},sR=async({stdout:t,stderr:e,all:r},{encoding:i,buffer:n,maxBuffer:s},o)=>{let a=ql(t,{encoding:i,buffer:n,maxBuffer:s}),u=ql(e,{encoding:i,buffer:n,maxBuffer:s}),l=ql(r,{encoding:i,buffer:n,maxBuffer:s*2});try{return await Promise.all([o,a,u,l])}catch(c){return Promise.all([{error:c,signal:c.signal,timedOut:c.timedOut},Hl(t,a),Hl(e,u),Hl(r,l)])}},oR=({input:t})=>{if(wg(t))throw new TypeError("The `input` option cannot be a stream in sync mode")};Sg.exports={handleInput:iR,makeAllStream:nR,getSpawnedResult:sR,validateInputSync:oR}});var Cg=$((mP,vg)=>{"use strict";var aR=(async()=>{})().constructor.prototype,uR=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(aR,t)]),lR=(t,e)=>{for(let[r,i]of uR){let n=typeof e=="function"?(...s)=>Reflect.apply(i.value,e(),s):i.value.bind(e);Reflect.defineProperty(t,r,{...i,value:n})}return t},cR=t=>new Promise((e,r)=>{t.on("exit",(i,n)=>{e({exitCode:i,signal:n})}),t.on("error",i=>{r(i)}),t.stdin&&t.stdin.on("error",i=>{r(i)})});vg.exports={mergePromise:lR,getSpawnedPromise:cR}});var Fg=$((gP,Rg)=>{"use strict";var xg=(t,e=[])=>Array.isArray(e)?[t,...e]:[t],hR=/^[\w.-]+$/,fR=/"/g,pR=t=>typeof t!="string"||hR.test(t)?t:`"${t.replace(fR,'\\"')}"`,dR=(t,e)=>xg(t,e).join(" "),mR=(t,e)=>xg(t,e).map(r=>pR(r)).join(" "),gR=/ +/g,yR=t=>{let e=[];for(let r of t.trim().split(gR)){let i=e[e.length-1];i&&i.endsWith("\\")?e[e.length-1]=`${i.slice(0,-1)} ${r}`:e.push(r)}return e};Rg.exports={joinCommand:dR,getEscapedCommand:mR,parseCommand:yR}});var Fi=$((yP,Ri)=>{"use strict";var ER=require("path"),Ul=require("child_process"),DR=$0(),bR=q0(),_R=z0(),wR=K0(),Ks=ig(),kg=sg(),{spawnedKill:SR,spawnedCancel:AR,setupTimeout:vR,validateTimeout:CR,setExitHandler:xR}=pg(),{handleInput:RR,getSpawnedResult:FR,makeAllStream:OR,validateInputSync:kR}=Ag(),{mergePromise:Og,getSpawnedPromise:TR}=Cg(),{joinCommand:Tg,parseCommand:Lg,getEscapedCommand:Bg}=Fg(),LR=1e3*1e3*100,BR=({env:t,extendEnv:e,preferLocal:r,localDir:i,execPath:n})=>{let s=e?{...process.env,...t}:t;return r?_R.env({env:s,cwd:i,execPath:n}):s},Pg=(t,e,r={})=>{let i=DR._parse(t,e,r);return t=i.command,e=i.args,r=i.options,r={maxBuffer:LR,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:r.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...r},r.env=BR(r),r.stdio=kg(r),process.platform==="win32"&&ER.basename(t,".exe")==="cmd"&&e.unshift("/q"),{file:t,args:e,options:r,parsed:i}},An=(t,e,r)=>typeof e!="string"&&!Buffer.isBuffer(e)?r===void 0?void 0:"":t.stripFinalNewline?bR(e):e,Zs=(t,e,r)=>{let i=Pg(t,e,r),n=Tg(t,e),s=Bg(t,e);CR(i.options);let o;try{o=Ul.spawn(i.file,i.args,i.options)}catch(p){let d=new Ul.ChildProcess,m=Promise.reject(Ks({error:p,stdout:"",stderr:"",all:"",command:n,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1}));return Og(d,m)}let a=TR(o),u=vR(o,i.options,a),l=xR(o,i.options,u),c={isCanceled:!1};o.kill=SR.bind(null,o.kill.bind(o)),o.cancel=AR.bind(null,o,c);let h=wR(async()=>{let[{error:p,exitCode:d,signal:m,timedOut:g},v,F,k]=await FR(o,i.options,l),O=An(i.options,v),R=An(i.options,F),B=An(i.options,k);if(p||d!==0||m!==null){let _=Ks({error:p,exitCode:d,signal:m,stdout:O,stderr:R,all:B,command:n,escapedCommand:s,parsed:i,timedOut:g,isCanceled:c.isCanceled,killed:o.killed});if(!i.options.reject)return _;throw _}return{command:n,escapedCommand:s,exitCode:0,stdout:O,stderr:R,all:B,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return RR(o,i.options.input),o.all=OR(o,i.options),Og(o,h)};Ri.exports=Zs;Ri.exports.sync=(t,e,r)=>{let i=Pg(t,e,r),n=Tg(t,e),s=Bg(t,e);kR(i.options);let o;try{o=Ul.spawnSync(i.file,i.args,i.options)}catch(l){throw Ks({error:l,stdout:"",stderr:"",all:"",command:n,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1})}let a=An(i.options,o.stdout,o.error),u=An(i.options,o.stderr,o.error);if(o.error||o.status!==0||o.signal!==null){let l=Ks({stdout:a,stderr:u,error:o.error,signal:o.signal,exitCode:o.status,command:n,escapedCommand:s,parsed:i,timedOut:o.error&&o.error.code==="ETIMEDOUT",isCanceled:!1,killed:o.signal!==null});if(!i.options.reject)return l;throw l}return{command:n,escapedCommand:s,exitCode:0,stdout:a,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};Ri.exports.command=(t,e)=>{let[r,...i]=Lg(t);return Zs(r,i,e)};Ri.exports.commandSync=(t,e)=>{let[r,...i]=Lg(t);return Zs.sync(r,i,e)};Ri.exports.node=(t,e,r={})=>{e&&!Array.isArray(e)&&typeof e=="object"&&(r=e,e=[]);let i=kg.node(r),n=process.execArgv.filter(a=>!a.startsWith("--inspect")),{nodePath:s=process.execPath,nodeOptions:o=n}=r;return Zs(s,[...o,t,...Array.isArray(e)?e:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:i,shell:!1})}});var Oi=$((wP,$g)=>{"use strict";var jg=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);$g.exports=t=>t?Object.keys(t).map(e=>[jg.has(e)?jg.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var ro=$((SP,Kg)=>{"use strict";var Hg=typeof process=="object"&&process?process:{stdout:null,stderr:null},jR=require("events"),qg=require("stream"),Ug=require("string_decoder").StringDecoder,qt=Symbol("EOF"),Ut=Symbol("maybeEmitEnd"),fr=Symbol("emittedEnd"),Js=Symbol("emittingEnd"),vn=Symbol("emittedError"),Xs=Symbol("closed"),Gg=Symbol("read"),Qs=Symbol("flush"),zg=Symbol("flushChunk"),ze=Symbol("encoding"),Gt=Symbol("decoder"),eo=Symbol("flowing"),Cn=Symbol("paused"),ki=Symbol("resume"),_e=Symbol("buffer"),vt=Symbol("pipes"),Re=Symbol("bufferLength"),Wl=Symbol("bufferPush"),Yl=Symbol("bufferShift"),Be=Symbol("objectMode"),Pe=Symbol("destroyed"),Vl=Symbol("emitData"),Wg=Symbol("emitEnd"),Kl=Symbol("emitEnd2"),zt=Symbol("async"),xn=t=>Promise.resolve().then(t),Yg=global._MP_NO_ITERATOR_SYMBOLS_!=="1",$R=Yg&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),HR=Yg&&Symbol.iterator||Symbol("iterator not implemented"),qR=t=>t==="end"||t==="finish"||t==="prefinish",UR=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,GR=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),to=class{constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[ki](),r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Zl=class extends to{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,i){super(e,r,i),this.proxyErrors=n=>r.emit("error",n),e.on("error",this.proxyErrors)}};Kg.exports=class Vg extends qg{constructor(e){super(),this[eo]=!1,this[Cn]=!1,this[vt]=[],this[_e]=[],this[Be]=e&&e.objectMode||!1,this[Be]?this[ze]=null:this[ze]=e&&e.encoding||null,this[ze]==="buffer"&&(this[ze]=null),this[zt]=e&&!!e.async||!1,this[Gt]=this[ze]?new Ug(this[ze]):null,this[qt]=!1,this[fr]=!1,this[Js]=!1,this[Xs]=!1,this[vn]=null,this.writable=!0,this.readable=!0,this[Re]=0,this[Pe]=!1,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[_e]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[vt]})}get bufferLength(){return this[Re]}get encoding(){return this[ze]}set encoding(e){if(this[Be])throw new Error("cannot set encoding in objectMode");if(this[ze]&&e!==this[ze]&&(this[Gt]&&this[Gt].lastNeed||this[Re]))throw new Error("cannot change encoding");this[ze]!==e&&(this[Gt]=e?new Ug(e):null,this[_e].length&&(this[_e]=this[_e].map(r=>this[Gt].write(r)))),this[ze]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Be]}set objectMode(e){this[Be]=this[Be]||!!e}get async(){return this[zt]}set async(e){this[zt]=this[zt]||!!e}write(e,r,i){if(this[qt])throw new Error("write after end");if(this[Pe])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[zt]?xn:s=>s();return!this[Be]&&!Buffer.isBuffer(e)&&(GR(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):UR(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[Be]?(this.flowing&&this[Re]!==0&&this[Qs](!0),this.flowing?this.emit("data",e):this[Wl](e),this[Re]!==0&&this.emit("readable"),i&&n(i),this.flowing):e.length?(typeof e=="string"&&!(r===this[ze]&&!this[Gt].lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[ze]&&(e=this[Gt].write(e)),this.flowing&&this[Re]!==0&&this[Qs](!0),this.flowing?this.emit("data",e):this[Wl](e),this[Re]!==0&&this.emit("readable"),i&&n(i),this.flowing):(this[Re]!==0&&this.emit("readable"),i&&n(i),this.flowing)}read(e){if(this[Pe])return null;if(this[Re]===0||e===0||e>this[Re])return this[Ut](),null;this[Be]&&(e=null),this[_e].length>1&&!this[Be]&&(this.encoding?this[_e]=[this[_e].join("")]:this[_e]=[Buffer.concat(this[_e],this[Re])]);let r=this[Gg](e||null,this[_e][0]);return this[Ut](),r}[Gg](e,r){return e===r.length||e===null?this[Yl]():(this[_e][0]=r.slice(e),r=r.slice(0,e),this[Re]-=e),this.emit("data",r),!this[_e].length&&!this[qt]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=null),typeof r=="function"&&(i=r,r="utf8"),e&&this.write(e,r),i&&this.once("end",i),this[qt]=!0,this.writable=!1,(this.flowing||!this[Cn])&&this[Ut](),this}[ki](){this[Pe]||(this[Cn]=!1,this[eo]=!0,this.emit("resume"),this[_e].length?this[Qs]():this[qt]?this[Ut]():this.emit("drain"))}resume(){return this[ki]()}pause(){this[eo]=!1,this[Cn]=!0}get destroyed(){return this[Pe]}get flowing(){return this[eo]}get paused(){return this[Cn]}[Wl](e){this[Be]?this[Re]+=1:this[Re]+=e.length,this[_e].push(e)}[Yl](){return this[_e].length&&(this[Be]?this[Re]-=1:this[Re]-=this[_e][0].length),this[_e].shift()}[Qs](e){do;while(this[zg](this[Yl]()));!e&&!this[_e].length&&!this[qt]&&this.emit("drain")}[zg](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,r){if(this[Pe])return;let i=this[fr];return r=r||{},e===Hg.stdout||e===Hg.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[vt].push(r.proxyErrors?new Zl(this,e,r):new to(this,e,r)),this[zt]?xn(()=>this[ki]()):this[ki]()),e}unpipe(e){let r=this[vt].find(i=>i.dest===e);r&&(this[vt].splice(this[vt].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);return e==="data"&&!this[vt].length&&!this.flowing?this[ki]():e==="readable"&&this[Re]!==0?super.emit("readable"):qR(e)&&this[fr]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[vn]&&(this[zt]?xn(()=>r.call(this,this[vn])):r.call(this,this[vn])),i}get emittedEnd(){return this[fr]}[Ut](){!this[Js]&&!this[fr]&&!this[Pe]&&this[_e].length===0&&this[qt]&&(this[Js]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Xs]&&this.emit("close"),this[Js]=!1)}emit(e,r,...i){if(e!=="error"&&e!=="close"&&e!==Pe&&this[Pe])return;if(e==="data")return r?this[zt]?xn(()=>this[Vl](r)):this[Vl](r):!1;if(e==="end")return this[Wg]();if(e==="close"){if(this[Xs]=!0,!this[fr]&&!this[Pe])return;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[vn]=r;let s=super.emit("error",r);return this[Ut](),s}else if(e==="resume"){let s=super.emit("resume");return this[Ut](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,r,...i);return this[Ut](),n}[Vl](e){for(let i of this[vt])i.dest.write(e)===!1&&this.pause();let r=super.emit("data",e);return this[Ut](),r}[Wg](){this[fr]||(this[fr]=!0,this.readable=!1,this[zt]?xn(()=>this[Kl]()):this[Kl]())}[Kl](){if(this[Gt]){let r=this[Gt].end();if(r){for(let i of this[vt])i.dest.write(r);super.emit("data",r)}}for(let r of this[vt])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[Be]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[Be]||(e.dataLength+=i.length)}),r.then(()=>e)}concat(){return this[Be]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[Be]?Promise.reject(new Error("cannot concat in objectMode")):this[ze]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,r)=>{this.on(Pe,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[$R](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[qt])return Promise.resolve({done:!0});let i=null,n=null,s=l=>{this.removeListener("data",o),this.removeListener("end",a),n(l)},o=l=>{this.removeListener("error",s),this.removeListener("end",a),this.pause(),i({value:l,done:!!this[qt]})},a=()=>{this.removeListener("error",s),this.removeListener("data",o),i({done:!0})},u=()=>s(new Error("stream destroyed"));return new Promise((l,c)=>{n=c,i=l,this.once(Pe,u),this.once("error",s),this.once("end",a),this.once("data",o)})}}}[HR](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(e){return this[Pe]?(e?this.emit("error",e):this.emit(Pe),this):(this[Pe]=!0,this[_e].length=0,this[Re]=0,typeof this.close=="function"&&!this[Xs]&&this.close(),e?this.emit("error",e):this.emit(Pe),this)}static isStream(e){return!!e&&(e instanceof Vg||e instanceof qg||e instanceof jR&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var Jg=$((AP,Zg)=>{var zR=require("zlib").constants||{ZLIB_VERNUM:4736};Zg.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},zR))});var rc=$((vP,oy)=>{"use strict";var Xg=typeof process=="object"&&process?process:{stdout:null,stderr:null},WR=require("events"),Qg=require("stream"),ey=require("string_decoder").StringDecoder,Wt=Symbol("EOF"),Yt=Symbol("maybeEmitEnd"),pr=Symbol("emittedEnd"),io=Symbol("emittingEnd"),Rn=Symbol("emittedError"),no=Symbol("closed"),ty=Symbol("read"),so=Symbol("flush"),ry=Symbol("flushChunk"),We=Symbol("encoding"),Vt=Symbol("decoder"),oo=Symbol("flowing"),Fn=Symbol("paused"),Ti=Symbol("resume"),Fe=Symbol("bufferLength"),Jl=Symbol("bufferPush"),Xl=Symbol("bufferShift"),Ie=Symbol("objectMode"),Ne=Symbol("destroyed"),Ql=Symbol("emitData"),iy=Symbol("emitEnd"),ec=Symbol("emitEnd2"),Kt=Symbol("async"),On=t=>Promise.resolve().then(t),ny=global._MP_NO_ITERATOR_SYMBOLS_!=="1",YR=ny&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),VR=ny&&Symbol.iterator||Symbol("iterator not implemented"),KR=t=>t==="end"||t==="finish"||t==="prefinish",ZR=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,JR=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),ao=class{constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[Ti](),r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},tc=class extends ao{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,i){super(e,r,i),this.proxyErrors=n=>r.emit("error",n),e.on("error",this.proxyErrors)}};oy.exports=class sy extends Qg{constructor(e){super(),this[oo]=!1,this[Fn]=!1,this.pipes=[],this.buffer=[],this[Ie]=e&&e.objectMode||!1,this[Ie]?this[We]=null:this[We]=e&&e.encoding||null,this[We]==="buffer"&&(this[We]=null),this[Kt]=e&&!!e.async||!1,this[Vt]=this[We]?new ey(this[We]):null,this[Wt]=!1,this[pr]=!1,this[io]=!1,this[no]=!1,this[Rn]=null,this.writable=!0,this.readable=!0,this[Fe]=0,this[Ne]=!1}get bufferLength(){return this[Fe]}get encoding(){return this[We]}set encoding(e){if(this[Ie])throw new Error("cannot set encoding in objectMode");if(this[We]&&e!==this[We]&&(this[Vt]&&this[Vt].lastNeed||this[Fe]))throw new Error("cannot change encoding");this[We]!==e&&(this[Vt]=e?new ey(e):null,this.buffer.length&&(this.buffer=this.buffer.map(r=>this[Vt].write(r)))),this[We]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Ie]}set objectMode(e){this[Ie]=this[Ie]||!!e}get async(){return this[Kt]}set async(e){this[Kt]=this[Kt]||!!e}write(e,r,i){if(this[Wt])throw new Error("write after end");if(this[Ne])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[Kt]?On:s=>s();return!this[Ie]&&!Buffer.isBuffer(e)&&(JR(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):ZR(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[Ie]?(this.flowing&&this[Fe]!==0&&this[so](!0),this.flowing?this.emit("data",e):this[Jl](e),this[Fe]!==0&&this.emit("readable"),i&&n(i),this.flowing):e.length?(typeof e=="string"&&!(r===this[We]&&!this[Vt].lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[We]&&(e=this[Vt].write(e)),this.flowing&&this[Fe]!==0&&this[so](!0),this.flowing?this.emit("data",e):this[Jl](e),this[Fe]!==0&&this.emit("readable"),i&&n(i),this.flowing):(this[Fe]!==0&&this.emit("readable"),i&&n(i),this.flowing)}read(e){if(this[Ne])return null;if(this[Fe]===0||e===0||e>this[Fe])return this[Yt](),null;this[Ie]&&(e=null),this.buffer.length>1&&!this[Ie]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[Fe])]);let r=this[ty](e||null,this.buffer[0]);return this[Yt](),r}[ty](e,r){return e===r.length||e===null?this[Xl]():(this.buffer[0]=r.slice(e),r=r.slice(0,e),this[Fe]-=e),this.emit("data",r),!this.buffer.length&&!this[Wt]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=null),typeof r=="function"&&(i=r,r="utf8"),e&&this.write(e,r),i&&this.once("end",i),this[Wt]=!0,this.writable=!1,(this.flowing||!this[Fn])&&this[Yt](),this}[Ti](){this[Ne]||(this[Fn]=!1,this[oo]=!0,this.emit("resume"),this.buffer.length?this[so]():this[Wt]?this[Yt]():this.emit("drain"))}resume(){return this[Ti]()}pause(){this[oo]=!1,this[Fn]=!0}get destroyed(){return this[Ne]}get flowing(){return this[oo]}get paused(){return this[Fn]}[Jl](e){this[Ie]?this[Fe]+=1:this[Fe]+=e.length,this.buffer.push(e)}[Xl](){return this.buffer.length&&(this[Ie]?this[Fe]-=1:this[Fe]-=this.buffer[0].length),this.buffer.shift()}[so](e){do;while(this[ry](this[Xl]()));!e&&!this.buffer.length&&!this[Wt]&&this.emit("drain")}[ry](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,r){if(this[Ne])return;let i=this[pr];return r=r||{},e===Xg.stdout||e===Xg.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this.pipes.push(r.proxyErrors?new tc(this,e,r):new ao(this,e,r)),this[Kt]?On(()=>this[Ti]()):this[Ti]()),e}unpipe(e){let r=this.pipes.find(i=>i.dest===e);r&&(this.pipes.splice(this.pipes.indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);return e==="data"&&!this.pipes.length&&!this.flowing?this[Ti]():e==="readable"&&this[Fe]!==0?super.emit("readable"):KR(e)&&this[pr]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[Rn]&&(this[Kt]?On(()=>r.call(this,this[Rn])):r.call(this,this[Rn])),i}get emittedEnd(){return this[pr]}[Yt](){!this[io]&&!this[pr]&&!this[Ne]&&this.buffer.length===0&&this[Wt]&&(this[io]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[no]&&this.emit("close"),this[io]=!1)}emit(e,r,...i){if(e!=="error"&&e!=="close"&&e!==Ne&&this[Ne])return;if(e==="data")return r?this[Kt]?On(()=>this[Ql](r)):this[Ql](r):!1;if(e==="end")return this[iy]();if(e==="close"){if(this[no]=!0,!this[pr]&&!this[Ne])return;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Rn]=r;let s=super.emit("error",r);return this[Yt](),s}else if(e==="resume"){let s=super.emit("resume");return this[Yt](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,r,...i);return this[Yt](),n}[Ql](e){for(let i of this.pipes)i.dest.write(e)===!1&&this.pause();let r=super.emit("data",e);return this[Yt](),r}[iy](){this[pr]||(this[pr]=!0,this.readable=!1,this[Kt]?On(()=>this[ec]()):this[ec]())}[ec](){if(this[Vt]){let r=this[Vt].end();if(r){for(let i of this.pipes)i.dest.write(r);super.emit("data",r)}}for(let r of this.pipes)r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[Ie]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[Ie]||(e.dataLength+=i.length)}),r.then(()=>e)}concat(){return this[Ie]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[Ie]?Promise.reject(new Error("cannot concat in objectMode")):this[We]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,r)=>{this.on(Ne,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[YR](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[Wt])return Promise.resolve({done:!0});let i=null,n=null,s=l=>{this.removeListener("data",o),this.removeListener("end",a),n(l)},o=l=>{this.removeListener("error",s),this.removeListener("end",a),this.pause(),i({value:l,done:!!this[Wt]})},a=()=>{this.removeListener("error",s),this.removeListener("data",o),i({done:!0})},u=()=>s(new Error("stream destroyed"));return new Promise((l,c)=>{n=c,i=l,this.once(Ne,u),this.once("error",s),this.once("end",a),this.once("data",o)})}}}[VR](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(e){return this[Ne]?(e?this.emit("error",e):this.emit(Ne),this):(this[Ne]=!0,this.buffer.length=0,this[Fe]=0,typeof this.close=="function"&&!this[no]&&this.close(),e?this.emit("error",e):this.emit(Ne),this)}static isStream(e){return!!e&&(e instanceof sy||e instanceof Qg||e instanceof WR&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var Ec=$(Xe=>{"use strict";var ac=require("assert"),dr=require("buffer").Buffer,ly=require("zlib"),$r=Xe.constants=Jg(),XR=rc(),ay=dr.concat,Hr=Symbol("_superWrite"),Bi=class extends Error{constructor(e){super("zlib: "+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},QR=Symbol("opts"),kn=Symbol("flushFlag"),uy=Symbol("finishFlushFlag"),yc=Symbol("fullFlushFlag"),de=Symbol("handle"),uo=Symbol("onError"),Li=Symbol("sawError"),ic=Symbol("level"),nc=Symbol("strategy"),sc=Symbol("ended"),CP=Symbol("_defaultFullFlush"),lo=class extends XR{constructor(e,r){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");super(e),this[Li]=!1,this[sc]=!1,this[QR]=e,this[kn]=e.flush,this[uy]=e.finishFlush;try{this[de]=new ly[r](e)}catch(i){throw new Bi(i)}this[uo]=i=>{this[Li]||(this[Li]=!0,this.close(),this.emit("error",i))},this[de].on("error",i=>this[uo](new Bi(i))),this.once("end",()=>this.close)}close(){this[de]&&(this[de].close(),this[de]=null,this.emit("close"))}reset(){if(!this[Li])return ac(this[de],"zlib binding closed"),this[de].reset()}flush(e){this.ended||(typeof e!="number"&&(e=this[yc]),this.write(Object.assign(dr.alloc(0),{[kn]:e})))}end(e,r,i){return e&&this.write(e,r),this.flush(this[uy]),this[sc]=!0,super.end(null,null,i)}get ended(){return this[sc]}write(e,r,i){if(typeof r=="function"&&(i=r,r="utf8"),typeof e=="string"&&(e=dr.from(e,r)),this[Li])return;ac(this[de],"zlib binding closed");let n=this[de]._handle,s=n.close;n.close=()=>{};let o=this[de].close;this[de].close=()=>{},dr.concat=l=>l;let a;try{let l=typeof e[kn]=="number"?e[kn]:this[kn];a=this[de]._processChunk(e,l),dr.concat=ay}catch(l){dr.concat=ay,this[uo](new Bi(l))}finally{this[de]&&(this[de]._handle=n,n.close=s,this[de].close=o,this[de].removeAllListeners("error"))}this[de]&&this[de].on("error",l=>this[uo](new Bi(l)));let u;if(a)if(Array.isArray(a)&&a.length>0){u=this[Hr](dr.from(a[0]));for(let l=1;l<a.length;l++)u=this[Hr](a[l])}else u=this[Hr](dr.from(a));return i&&i(),u}[Hr](e){return super.write(e)}},Zt=class extends lo{constructor(e,r){e=e||{},e.flush=e.flush||$r.Z_NO_FLUSH,e.finishFlush=e.finishFlush||$r.Z_FINISH,super(e,r),this[yc]=$r.Z_FULL_FLUSH,this[ic]=e.level,this[nc]=e.strategy}params(e,r){if(!this[Li]){if(!this[de])throw new Error("cannot switch params when binding is closed");if(!this[de].params)throw new Error("not supported in this implementation");if(this[ic]!==e||this[nc]!==r){this.flush($r.Z_SYNC_FLUSH),ac(this[de],"zlib binding closed");let i=this[de].flush;this[de].flush=(n,s)=>{this.flush(n),s()};try{this[de].params(e,r)}finally{this[de].flush=i}this[de]&&(this[ic]=e,this[nc]=r)}}}},uc=class extends Zt{constructor(e){super(e,"Deflate")}},lc=class extends Zt{constructor(e){super(e,"Inflate")}},oc=Symbol("_portable"),cc=class extends Zt{constructor(e){super(e,"Gzip"),this[oc]=e&&!!e.portable}[Hr](e){return this[oc]?(this[oc]=!1,e[9]=255,super[Hr](e)):super[Hr](e)}},hc=class extends Zt{constructor(e){super(e,"Gunzip")}},fc=class extends Zt{constructor(e){super(e,"DeflateRaw")}},pc=class extends Zt{constructor(e){super(e,"InflateRaw")}},dc=class extends Zt{constructor(e){super(e,"Unzip")}},co=class extends lo{constructor(e,r){e=e||{},e.flush=e.flush||$r.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||$r.BROTLI_OPERATION_FINISH,super(e,r),this[yc]=$r.BROTLI_OPERATION_FLUSH}},mc=class extends co{constructor(e){super(e,"BrotliCompress")}},gc=class extends co{constructor(e){super(e,"BrotliDecompress")}};Xe.Deflate=uc;Xe.Inflate=lc;Xe.Gzip=cc;Xe.Gunzip=hc;Xe.DeflateRaw=fc;Xe.InflateRaw=pc;Xe.Unzip=dc;typeof ly.BrotliCompress=="function"?(Xe.BrotliCompress=mc,Xe.BrotliDecompress=gc):Xe.BrotliCompress=Xe.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var Pi=$((FP,cy)=>{var eF=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;cy.exports=eF!=="win32"?t=>t:t=>t&&t.replace(/\\/g,"/")});var ho=$((kP,hy)=>{"use strict";var tF=ro(),Dc=Pi(),bc=Symbol("slurp");hy.exports=class extends tF{constructor(e,r,i){switch(super(),this.pause(),this.extended=r,this.globalExtended=i,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=Dc(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=Dc(e.linkpath),this.uname=e.uname,this.gname=e.gname,r&&this[bc](r),i&&this[bc](i,!0)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");let i=this.remain,n=this.blockRemain;return this.remain=Math.max(0,i-r),this.blockRemain=Math.max(0,n-r),this.ignore?!0:i>=r?super.write(e):super.write(e.slice(0,i))}[bc](e,r){for(let i in e)e[i]!==null&&e[i]!==void 0&&!(r&&i==="path")&&(this[i]=i==="path"||i==="linkpath"?Dc(e[i]):e[i])}}});var _c=$(fo=>{"use strict";fo.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);fo.code=new Map(Array.from(fo.name).map(t=>[t[1],t[0]]))});var my=$((LP,dy)=>{"use strict";var rF=(t,e)=>{if(Number.isSafeInteger(t))t<0?nF(t,e):iF(t,e);else throw Error("cannot encode number outside of javascript safe integer range");return e},iF=(t,e)=>{e[0]=128;for(var r=e.length;r>1;r--)e[r-1]=t&255,t=Math.floor(t/256)},nF=(t,e)=>{e[0]=255;var r=!1;t=t*-1;for(var i=e.length;i>1;i--){var n=t&255;t=Math.floor(t/256),r?e[i-1]=fy(n):n===0?e[i-1]=0:(r=!0,e[i-1]=py(n))}},sF=t=>{let e=t[0],r=e===128?aF(t.slice(1,t.length)):e===255?oF(t):null;if(r===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(r))throw Error("parsed number outside of javascript safe integer range");return r},oF=t=>{for(var e=t.length,r=0,i=!1,n=e-1;n>-1;n--){var s=t[n],o;i?o=fy(s):s===0?o=s:(i=!0,o=py(s)),o!==0&&(r-=o*Math.pow(256,e-n-1))}return r},aF=t=>{for(var e=t.length,r=0,i=e-1;i>-1;i--){var n=t[i];n!==0&&(r+=n*Math.pow(256,e-i-1))}return r},fy=t=>(255^t)&255,py=t=>(255^t)+1&255;dy.exports={encode:rF,parse:sF}});var Ni=$((BP,yy)=>{"use strict";var wc=_c(),Ii=require("path").posix,gy=my(),Sc=Symbol("slurp"),Qe=Symbol("type"),Cc=class{constructor(e,r,i,n){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[Qe]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,r||0,i,n):e&&this.set(e)}decode(e,r,i,n){if(r||(r=0),!e||!(e.length>=r+512))throw new Error("need 512 bytes for header");if(this.path=qr(e,r,100),this.mode=mr(e,r+100,8),this.uid=mr(e,r+108,8),this.gid=mr(e,r+116,8),this.size=mr(e,r+124,12),this.mtime=Ac(e,r+136,12),this.cksum=mr(e,r+148,12),this[Sc](i),this[Sc](n,!0),this[Qe]=qr(e,r+156,1),this[Qe]===""&&(this[Qe]="0"),this[Qe]==="0"&&this.path.slice(-1)==="/"&&(this[Qe]="5"),this[Qe]==="5"&&(this.size=0),this.linkpath=qr(e,r+157,100),e.slice(r+257,r+265).toString()==="ustar\x0000")if(this.uname=qr(e,r+265,32),this.gname=qr(e,r+297,32),this.devmaj=mr(e,r+329,8),this.devmin=mr(e,r+337,8),e[r+475]!==0){let o=qr(e,r+345,155);this.path=o+"/"+this.path}else{let o=qr(e,r+345,130);o&&(this.path=o+"/"+this.path),this.atime=Ac(e,r+476,12),this.ctime=Ac(e,r+488,12)}let s=8*32;for(let o=r;o<r+148;o++)s+=e[o];for(let o=r+156;o<r+512;o++)s+=e[o];this.cksumValid=s===this.cksum,this.cksum===null&&s===8*32&&(this.nullBlock=!0)}[Sc](e,r){for(let i in e)e[i]!==null&&e[i]!==void 0&&!(r&&i==="path")&&(this[i]=e[i])}encode(e,r){if(e||(e=this.block=Buffer.alloc(512),r=0),r||(r=0),!(e.length>=r+512))throw new Error("need 512 bytes for header");let i=this.ctime||this.atime?130:155,n=uF(this.path||"",i),s=n[0],o=n[1];this.needPax=n[2],this.needPax=Ur(e,r,100,s)||this.needPax,this.needPax=gr(e,r+100,8,this.mode)||this.needPax,this.needPax=gr(e,r+108,8,this.uid)||this.needPax,this.needPax=gr(e,r+116,8,this.gid)||this.needPax,this.needPax=gr(e,r+124,12,this.size)||this.needPax,this.needPax=vc(e,r+136,12,this.mtime)||this.needPax,e[r+156]=this[Qe].charCodeAt(0),this.needPax=Ur(e,r+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",r+257,8),this.needPax=Ur(e,r+265,32,this.uname)||this.needPax,this.needPax=Ur(e,r+297,32,this.gname)||this.needPax,this.needPax=gr(e,r+329,8,this.devmaj)||this.needPax,this.needPax=gr(e,r+337,8,this.devmin)||this.needPax,this.needPax=Ur(e,r+345,i,o)||this.needPax,e[r+475]!==0?this.needPax=Ur(e,r+345,155,o)||this.needPax:(this.needPax=Ur(e,r+345,130,o)||this.needPax,this.needPax=vc(e,r+476,12,this.atime)||this.needPax,this.needPax=vc(e,r+488,12,this.ctime)||this.needPax);let a=8*32;for(let u=r;u<r+148;u++)a+=e[u];for(let u=r+156;u<r+512;u++)a+=e[u];return this.cksum=a,gr(e,r+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(e){for(let r in e)e[r]!==null&&e[r]!==void 0&&(this[r]=e[r])}get type(){return wc.name.get(this[Qe])||this[Qe]}get typeKey(){return this[Qe]}set type(e){wc.code.has(e)?this[Qe]=wc.code.get(e):this[Qe]=e}},uF=(t,e)=>{let i=t,n="",s,o=Ii.parse(t).root||".";if(Buffer.byteLength(i)<100)s=[i,n,!1];else{n=Ii.dirname(i),i=Ii.basename(i);do Buffer.byteLength(i)<=100&&Buffer.byteLength(n)<=e?s=[i,n,!1]:Buffer.byteLength(i)>100&&Buffer.byteLength(n)<=e?s=[i.slice(0,100-1),n,!0]:(i=Ii.join(Ii.basename(n),i),n=Ii.dirname(n));while(n!==o&&!s);s||(s=[t.slice(0,100-1),"",!0])}return s},qr=(t,e,r)=>t.slice(e,e+r).toString("utf8").replace(/\0.*/,""),Ac=(t,e,r)=>lF(mr(t,e,r)),lF=t=>t===null?null:new Date(t*1e3),mr=(t,e,r)=>t[e]&128?gy.parse(t.slice(e,e+r)):hF(t,e,r),cF=t=>isNaN(t)?null:t,hF=(t,e,r)=>cF(parseInt(t.slice(e,e+r).toString("utf8").replace(/\0.*$/,"").trim(),8)),fF={12:8589934591,8:2097151},gr=(t,e,r,i)=>i===null?!1:i>fF[r]||i<0?(gy.encode(i,t.slice(e,e+r)),!0):(pF(t,e,r,i),!1),pF=(t,e,r,i)=>t.write(dF(i,r),e,r,"ascii"),dF=(t,e)=>mF(Math.floor(t).toString(8),e),mF=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join("0")+t+" ")+"\0",vc=(t,e,r,i)=>i===null?!1:gr(t,e,r,i.getTime()/1e3),gF=new Array(156).join("\0"),Ur=(t,e,r,i)=>i===null?!1:(t.write(i+gF,e,r,"utf8"),i.length!==Buffer.byteLength(i)||i.length>r);yy.exports=Cc});var po=$((PP,Ey)=>{"use strict";var yF=Ni(),EF=require("path"),Tn=class{constructor(e,r){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=r||!1}encode(){let e=this.encodeBody();if(e==="")return null;let r=Buffer.byteLength(e),i=512*Math.ceil(1+r/512),n=Buffer.allocUnsafe(i);for(let s=0;s<512;s++)n[s]=0;new yF({path:("PaxHeader/"+EF.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:r,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(n),n.write(e,512,r,"utf8");for(let s=r+512;s<n.length;s++)n[s]=0;return n}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(e){if(this[e]===null||this[e]===void 0)return"";let r=this[e]instanceof Date?this[e].getTime()/1e3:this[e],i=" "+(e==="dev"||e==="ino"||e==="nlink"?"SCHILY.":"")+e+"="+r+`
8
- `,n=Buffer.byteLength(i),s=Math.floor(Math.log(n)/Math.log(10))+1;return n+s>=Math.pow(10,s)&&(s+=1),s+n+i}};Tn.parse=(t,e,r)=>new Tn(DF(bF(t),e),r);var DF=(t,e)=>e?Object.keys(t).reduce((r,i)=>(r[i]=t[i],r),e):t,bF=t=>t.replace(/\n$/,"").split(`
9
- `).reduce(_F,Object.create(null)),_F=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.slice((r+" ").length);let i=e.split("="),n=i.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!n)return t;let s=i.join("=");return t[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(s*1e3):/^[0-9]+$/.test(s)?+s:s,t};Ey.exports=Tn});var Mi=$((IP,Dy)=>{Dy.exports=t=>{let e=t.length-1,r=-1;for(;e>-1&&t.charAt(e)==="/";)r=e,e--;return r===-1?t:t.slice(0,r)}});var mo=$((NP,by)=>{"use strict";by.exports=t=>class extends t{warn(e,r,i={}){this.file&&(i.file=this.file),this.cwd&&(i.cwd=this.cwd),i.code=r instanceof Error&&r.code||e,i.tarCode=e,!this.strict&&i.recoverable!==!1?(r instanceof Error&&(i=Object.assign(r,i),r=r.message),this.emit("warn",i.tarCode,r,i)):r instanceof Error?this.emit("error",Object.assign(r,i)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),i))}}});var Rc=$((jP,_y)=>{"use strict";var go=["|","<",">","?",":"],xc=go.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),wF=new Map(go.map((t,e)=>[t,xc[e]])),SF=new Map(xc.map((t,e)=>[t,go[e]]));_y.exports={encode:t=>go.reduce((e,r)=>e.split(r).join(wF.get(r)),t),decode:t=>xc.reduce((e,r)=>e.split(r).join(SF.get(r)),t)}});var Fc=$(($P,Sy)=>{var{isAbsolute:AF,parse:wy}=require("path").win32;Sy.exports=t=>{let e="",r=wy(t);for(;AF(t)||r.root;){let i=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":r.root;t=t.slice(i.length),e+=i,r=wy(t)}return[e,t]}});var vy=$((HP,Ay)=>{"use strict";Ay.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var jc=$((GP,jy)=>{"use strict";var Ty=ro(),Ly=po(),By=Ni(),xt=require("fs"),Cy=require("path"),Ct=Pi(),vF=Mi(),Py=(t,e)=>e?(t=Ct(t).replace(/^\.(\/|$)/,""),vF(e)+"/"+t):Ct(t),CF=16*1024*1024,xy=Symbol("process"),Ry=Symbol("file"),Fy=Symbol("directory"),kc=Symbol("symlink"),Oy=Symbol("hardlink"),Ln=Symbol("header"),yo=Symbol("read"),Tc=Symbol("lstat"),Eo=Symbol("onlstat"),Lc=Symbol("onread"),Bc=Symbol("onreadlink"),Pc=Symbol("openfile"),Ic=Symbol("onopenfile"),yr=Symbol("close"),Do=Symbol("mode"),Nc=Symbol("awaitDrain"),Oc=Symbol("ondrain"),Rt=Symbol("prefix"),ky=Symbol("hadError"),Iy=mo(),xF=Rc(),Ny=Fc(),My=vy(),bo=Iy(class extends Ty{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=Ct(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||CF,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=Ct(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?Ct(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let i=!1;if(!this.preservePaths){let[n,s]=Ny(this.path);n&&(this.path=s,i=n)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=xF.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=Ct(r.absolute||Cy.resolve(this.cwd,e)),this.path===""&&(this.path="./"),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.statCache.has(this.absolute)?this[Eo](this.statCache.get(this.absolute)):this[Tc]()}emit(e,...r){return e==="error"&&(this[ky]=!0),super.emit(e,...r)}[Tc](){xt.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[Eo](r)})}[Eo](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=FF(e),this.emit("stat",e),this[xy]()}[xy](){switch(this.type){case"File":return this[Ry]();case"Directory":return this[Fy]();case"SymbolicLink":return this[kc]();default:return this.end()}}[Do](e){return My(e,this.type==="Directory",this.portable)}[Rt](e){return Py(e,this.prefix)}[Ln](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new By({path:this[Rt](this.path),linkpath:this.type==="Link"?this[Rt](this.linkpath):this.linkpath,mode:this[Do](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new Ly({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[Rt](this.path),linkpath:this.type==="Link"?this[Rt](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[Fy](){this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[Ln](),this.end()}[kc](){xt.readlink(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[Bc](r)})}[Bc](e){this.linkpath=Ct(e),this[Ln](),this.end()}[Oy](e){this.type="Link",this.linkpath=Ct(Cy.relative(this.cwd,e)),this.stat.size=0,this[Ln](),this.end()}[Ry](){if(this.stat.nlink>1){let e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){let r=this.linkCache.get(e);if(r.indexOf(this.cwd)===0)return this[Oy](r)}this.linkCache.set(e,this.absolute)}if(this[Ln](),this.stat.size===0)return this.end();this[Pc]()}[Pc](){xt.open(this.absolute,"r",(e,r)=>{if(e)return this.emit("error",e);this[Ic](r)})}[Ic](e){if(this.fd=e,this[ky])return this[yr]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let r=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(r),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[yo]()}[yo](){let{fd:e,buf:r,offset:i,length:n,pos:s}=this;xt.read(e,r,i,n,s,(o,a)=>{if(o)return this[yr](()=>this.emit("error",o));this[Lc](a)})}[yr](e){xt.close(this.fd,e)}[Lc](e){if(e<=0&&this.remain>0){let n=new Error("encountered unexpected EOF");return n.path=this.absolute,n.syscall="read",n.code="EOF",this[yr](()=>this.emit("error",n))}if(e>this.remain){let n=new Error("did not encounter expected EOF");return n.path=this.absolute,n.syscall="read",n.code="EOF",this[yr](()=>this.emit("error",n))}if(e===this.remain)for(let n=e;n<this.length&&e<this.blockRemain;n++)this.buf[n+this.offset]=0,e++,this.remain++;let r=this.offset===0&&e===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+e);this.write(r)?this[Oc]():this[Nc](()=>this[Oc]())}[Nc](e){this.once("drain",e)}write(e){if(this.blockRemain<e.length){let r=new Error("writing more data than expected");return r.path=this.absolute,this.emit("error",r)}return this.remain-=e.length,this.blockRemain-=e.length,this.pos+=e.length,this.offset+=e.length,super.write(e)}[Oc](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[yr](e=>e?this.emit("error",e):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[yo]()}}),Mc=class extends bo{[Tc](){this[Eo](xt.lstatSync(this.absolute))}[kc](){this[Bc](xt.readlinkSync(this.absolute))}[Pc](){this[Ic](xt.openSync(this.absolute,"r"))}[yo](){let e=!0;try{let{fd:r,buf:i,offset:n,length:s,pos:o}=this,a=xt.readSync(r,i,n,s,o);this[Lc](a),e=!1}finally{if(e)try{this[yr](()=>{})}catch{}}}[Nc](e){e()}[yr](e){xt.closeSync(this.fd),e()}},RF=Iy(class extends Ty{constructor(e,r){r=r||{},super(r),this.preservePaths=!!r.preservePaths,this.portable=!!r.portable,this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.readEntry=e,this.type=e.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=r.prefix||null,this.path=Ct(e.path),this.mode=this[Do](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:r.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=Ct(e.linkpath),typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let i=!1;if(!this.preservePaths){let[n,s]=Ny(this.path);n&&(this.path=s,i=n)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new By({path:this[Rt](this.path),linkpath:this.type==="Link"?this[Rt](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.header.encode()&&!this.noPax&&super.write(new Ly({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[Rt](this.path),linkpath:this.type==="Link"?this[Rt](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[Rt](e){return Py(e,this.prefix)}[Do](e){return My(e,this.type==="Directory",this.portable)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});bo.Sync=Mc;bo.Tar=RF;var FF=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";jy.exports=bo});var Hy=$((zP,$y)=>{"use strict";$y.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var $c=$((WP,qy)=>{"use strict";qy.exports=ae;ae.Node=Gr;ae.create=ae;function ae(t){var e=this;if(e instanceof ae||(e=new ae),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)e.push(arguments[r]);return e}ae.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};ae.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};ae.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};ae.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)kF(this,arguments[t]);return this.length};ae.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)TF(this,arguments[t]);return this.length};ae.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};ae.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};ae.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,i=0;r!==null;i++)t.call(e,r.value,i,this),r=r.next};ae.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,i=this.length-1;r!==null;i--)t.call(e,r.value,i,this),r=r.prev};ae.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};ae.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};ae.prototype.map=function(t,e){e=e||this;for(var r=new ae,i=this.head;i!==null;)r.push(t.call(e,i.value,this)),i=i.next;return r};ae.prototype.mapReverse=function(t,e){e=e||this;for(var r=new ae,i=this.tail;i!==null;)r.push(t.call(e,i.value,this)),i=i.prev;return r};ae.prototype.reduce=function(t,e){var r,i=this.head;if(arguments.length>1)r=e;else if(this.head)i=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)r=t(r,i.value,n),i=i.next;return r};ae.prototype.reduceReverse=function(t,e){var r,i=this.tail;if(arguments.length>1)r=e;else if(this.tail)i=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)r=t(r,i.value,n),i=i.prev;return r};ae.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};ae.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};ae.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new ae;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&i<t;i++)n=n.next;for(;n!==null&&i<e;i++,n=n.next)r.push(n.value);return r};ae.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new ae;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>t;i--,n=n.prev)r.push(n.value);return r};ae.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var i=0,n=this.head;n!==null&&i<t;i++)n=n.next;for(var s=[],i=0;n&&i<e;i++)s.push(n.value),n=this.removeNode(n);n===null&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(var i=0;i<r.length;i++)n=OF(this,n,r[i]);return s};ae.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=e,this.tail=t,this};function OF(t,e,r){var i=e===t.head?new Gr(r,null,e,t):new Gr(r,e,e.next,t);return i.next===null&&(t.tail=i),i.prev===null&&(t.head=i),t.length++,i}function kF(t,e){t.tail=new Gr(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function TF(t,e){t.head=new Gr(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function Gr(t,e,r,i){if(!(this instanceof Gr))return new Gr(t,e,r,i);this.list=i,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Hy()(ae)}catch{}});var Fo=$((VP,Ky)=>{"use strict";var xo=class{constructor(e,r){this.path=e||"./",this.absolute=r,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},LF=ro(),BF=Ec(),PF=ho(),Kc=jc(),IF=Kc.Sync,NF=Kc.Tar,MF=$c(),Uy=Buffer.alloc(1024),So=Symbol("onStat"),_o=Symbol("ended"),Ft=Symbol("queue"),ji=Symbol("current"),zr=Symbol("process"),wo=Symbol("processing"),Gy=Symbol("processJob"),Ot=Symbol("jobs"),Hc=Symbol("jobDone"),Ao=Symbol("addFSEntry"),zy=Symbol("addTarEntry"),zc=Symbol("stat"),Wc=Symbol("readdir"),vo=Symbol("onreaddir"),Co=Symbol("pipe"),Wy=Symbol("entry"),qc=Symbol("entryOpt"),Yc=Symbol("writeEntryClass"),Vy=Symbol("write"),Uc=Symbol("ondrain"),Ro=require("fs"),Yy=require("path"),jF=mo(),Gc=Pi(),Zc=jF(class extends LF{constructor(e){super(e),e=e||Object.create(null),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=Gc(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[Yc]=Kc,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new BF.Gzip(e.gzip),this.zip.on("data",r=>super.write(r)),this.zip.on("end",r=>super.end()),this.zip.on("drain",r=>this[Uc]()),this.on("resume",r=>this.zip.resume())):this.on("drain",this[Uc]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter=="function"?e.filter:r=>!0,this[Ft]=new MF,this[Ot]=0,this.jobs=+e.jobs||4,this[wo]=!1,this[_o]=!1}[Vy](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[_o]=!0,this[zr](),this}write(e){if(this[_o])throw new Error("write after end");return e instanceof PF?this[zy](e):this[Ao](e),this.flowing}[zy](e){let r=Gc(Yy.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let i=new xo(e.path,r,!1);i.entry=new NF(e,this[qc](i)),i.entry.on("end",n=>this[Hc](i)),this[Ot]+=1,this[Ft].push(i)}this[zr]()}[Ao](e){let r=Gc(Yy.resolve(this.cwd,e));this[Ft].push(new xo(e,r)),this[zr]()}[zc](e){e.pending=!0,this[Ot]+=1;let r=this.follow?"stat":"lstat";Ro[r](e.absolute,(i,n)=>{e.pending=!1,this[Ot]-=1,i?this.emit("error",i):this[So](e,n)})}[So](e,r){this.statCache.set(e.absolute,r),e.stat=r,this.filter(e.path,r)||(e.ignore=!0),this[zr]()}[Wc](e){e.pending=!0,this[Ot]+=1,Ro.readdir(e.absolute,(r,i)=>{if(e.pending=!1,this[Ot]-=1,r)return this.emit("error",r);this[vo](e,i)})}[vo](e,r){this.readdirCache.set(e.absolute,r),e.readdir=r,this[zr]()}[zr](){if(!this[wo]){this[wo]=!0;for(let e=this[Ft].head;e!==null&&this[Ot]<this.jobs;e=e.next)if(this[Gy](e.value),e.value.ignore){let r=e.next;this[Ft].removeNode(e),e.next=r}this[wo]=!1,this[_o]&&!this[Ft].length&&this[Ot]===0&&(this.zip?this.zip.end(Uy):(super.write(Uy),super.end()))}}get[ji](){return this[Ft]&&this[Ft].head&&this[Ft].head.value}[Hc](e){this[Ft].shift(),this[Ot]-=1,this[zr]()}[Gy](e){if(!e.pending){if(e.entry){e===this[ji]&&!e.piped&&this[Co](e);return}if(e.stat||(this.statCache.has(e.absolute)?this[So](e,this.statCache.get(e.absolute)):this[zc](e)),!!e.stat&&!e.ignore&&!(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir&&(this.readdirCache.has(e.absolute)?this[vo](e,this.readdirCache.get(e.absolute)):this[Wc](e),!e.readdir))){if(e.entry=this[Wy](e),!e.entry){e.ignore=!0;return}e===this[ji]&&!e.piped&&this[Co](e)}}}[qc](e){return{onwarn:(r,i,n)=>this.warn(r,i,n),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[Wy](e){this[Ot]+=1;try{return new this[Yc](e.path,this[qc](e)).on("end",()=>this[Hc](e)).on("error",r=>this.emit("error",r))}catch(r){this.emit("error",r)}}[Uc](){this[ji]&&this[ji].entry&&this[ji].entry.resume()}[Co](e){e.piped=!0,e.readdir&&e.readdir.forEach(n=>{let s=e.path,o=s==="./"?"":s.replace(/\/*$/,"/");this[Ao](o+n)});let r=e.entry,i=this.zip;i?r.on("data",n=>{i.write(n)||r.pause()}):r.on("data",n=>{super.write(n)||r.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),Vc=class extends Zc{constructor(e){super(e),this[Yc]=IF}pause(){}resume(){}[zc](e){let r=this.follow?"statSync":"lstatSync";this[So](e,Ro[r](e.absolute))}[Wc](e,r){this[vo](e,Ro.readdirSync(e.absolute))}[Co](e){let r=e.entry,i=this.zip;e.readdir&&e.readdir.forEach(n=>{let s=e.path,o=s==="./"?"":s.replace(/\/*$/,"/");this[Ao](o+n)}),i?r.on("data",n=>{i.write(n)}):r.on("data",n=>{super[Vy](n)})}};Zc.Sync=Vc;Ky.exports=Zc});var Yi=$(Pn=>{"use strict";var $F=rc(),HF=require("events").EventEmitter,Ye=require("fs"),Qc=Ye.writev;if(!Qc){let t=process.binding("fs"),e=t.FSReqWrap||t.FSReqCallback;Qc=(r,i,n,s)=>{let o=(u,l)=>s(u,l,i),a=new e;a.oncomplete=o,t.writeBuffers(r,i,n,a)}}var zi=Symbol("_autoClose"),pt=Symbol("_close"),Bn=Symbol("_ended"),fe=Symbol("_fd"),Zy=Symbol("_finished"),Dr=Symbol("_flags"),Jc=Symbol("_flush"),eh=Symbol("_handleChunk"),th=Symbol("_makeBuf"),Bo=Symbol("_mode"),Oo=Symbol("_needDrain"),Ui=Symbol("_onerror"),Wi=Symbol("_onopen"),Xc=Symbol("_onread"),Hi=Symbol("_onwrite"),br=Symbol("_open"),Jt=Symbol("_path"),Wr=Symbol("_pos"),kt=Symbol("_queue"),qi=Symbol("_read"),Jy=Symbol("_readSize"),Er=Symbol("_reading"),ko=Symbol("_remain"),Xy=Symbol("_size"),To=Symbol("_write"),$i=Symbol("_writing"),Lo=Symbol("_defaultFlag"),Gi=Symbol("_errored"),Po=class extends $F{constructor(e,r){if(r=r||{},super(r),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[Gi]=!1,this[fe]=typeof r.fd=="number"?r.fd:null,this[Jt]=e,this[Jy]=r.readSize||16*1024*1024,this[Er]=!1,this[Xy]=typeof r.size=="number"?r.size:1/0,this[ko]=this[Xy],this[zi]=typeof r.autoClose=="boolean"?r.autoClose:!0,typeof this[fe]=="number"?this[qi]():this[br]()}get fd(){return this[fe]}get path(){return this[Jt]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[br](){Ye.open(this[Jt],"r",(e,r)=>this[Wi](e,r))}[Wi](e,r){e?this[Ui](e):(this[fe]=r,this.emit("open",r),this[qi]())}[th](){return Buffer.allocUnsafe(Math.min(this[Jy],this[ko]))}[qi](){if(!this[Er]){this[Er]=!0;let e=this[th]();if(e.length===0)return process.nextTick(()=>this[Xc](null,0,e));Ye.read(this[fe],e,0,e.length,null,(r,i,n)=>this[Xc](r,i,n))}}[Xc](e,r,i){this[Er]=!1,e?this[Ui](e):this[eh](r,i)&&this[qi]()}[pt](){if(this[zi]&&typeof this[fe]=="number"){let e=this[fe];this[fe]=null,Ye.close(e,r=>r?this.emit("error",r):this.emit("close"))}}[Ui](e){this[Er]=!0,this[pt](),this.emit("error",e)}[eh](e,r){let i=!1;return this[ko]-=e,e>0&&(i=super.write(e<r.length?r.slice(0,e):r)),(e===0||this[ko]<=0)&&(i=!1,this[pt](),super.end()),i}emit(e,r){switch(e){case"prefinish":case"finish":break;case"drain":typeof this[fe]=="number"&&this[qi]();break;case"error":return this[Gi]?void 0:(this[Gi]=!0,super.emit(e,r));default:return super.emit(e,r)}}},rh=class extends Po{[br](){let e=!0;try{this[Wi](null,Ye.openSync(this[Jt],"r")),e=!1}finally{e&&this[pt]()}}[qi](){let e=!0;try{if(!this[Er]){this[Er]=!0;do{let r=this[th](),i=r.length===0?0:Ye.readSync(this[fe],r,0,r.length,null);if(!this[eh](i,r))break}while(!0);this[Er]=!1}e=!1}finally{e&&this[pt]()}}[pt](){if(this[zi]&&typeof this[fe]=="number"){let e=this[fe];this[fe]=null,Ye.closeSync(e),this.emit("close")}}},Io=class extends HF{constructor(e,r){r=r||{},super(r),this.readable=!1,this.writable=!0,this[Gi]=!1,this[$i]=!1,this[Bn]=!1,this[Oo]=!1,this[kt]=[],this[Jt]=e,this[fe]=typeof r.fd=="number"?r.fd:null,this[Bo]=r.mode===void 0?438:r.mode,this[Wr]=typeof r.start=="number"?r.start:null,this[zi]=typeof r.autoClose=="boolean"?r.autoClose:!0;let i=this[Wr]!==null?"r+":"w";this[Lo]=r.flags===void 0,this[Dr]=this[Lo]?i:r.flags,this[fe]===null&&this[br]()}emit(e,r){if(e==="error"){if(this[Gi])return;this[Gi]=!0}return super.emit(e,r)}get fd(){return this[fe]}get path(){return this[Jt]}[Ui](e){this[pt](),this[$i]=!0,this.emit("error",e)}[br](){Ye.open(this[Jt],this[Dr],this[Bo],(e,r)=>this[Wi](e,r))}[Wi](e,r){this[Lo]&&this[Dr]==="r+"&&e&&e.code==="ENOENT"?(this[Dr]="w",this[br]()):e?this[Ui](e):(this[fe]=r,this.emit("open",r),this[Jc]())}end(e,r){return e&&this.write(e,r),this[Bn]=!0,!this[$i]&&!this[kt].length&&typeof this[fe]=="number"&&this[Hi](null,0),this}write(e,r){return typeof e=="string"&&(e=Buffer.from(e,r)),this[Bn]?(this.emit("error",new Error("write() after end()")),!1):this[fe]===null||this[$i]||this[kt].length?(this[kt].push(e),this[Oo]=!0,!1):(this[$i]=!0,this[To](e),!0)}[To](e){Ye.write(this[fe],e,0,e.length,this[Wr],(r,i)=>this[Hi](r,i))}[Hi](e,r){e?this[Ui](e):(this[Wr]!==null&&(this[Wr]+=r),this[kt].length?this[Jc]():(this[$i]=!1,this[Bn]&&!this[Zy]?(this[Zy]=!0,this[pt](),this.emit("finish")):this[Oo]&&(this[Oo]=!1,this.emit("drain"))))}[Jc](){if(this[kt].length===0)this[Bn]&&this[Hi](null,0);else if(this[kt].length===1)this[To](this[kt].pop());else{let e=this[kt];this[kt]=[],Qc(this[fe],e,this[Wr],(r,i)=>this[Hi](r,i))}}[pt](){if(this[zi]&&typeof this[fe]=="number"){let e=this[fe];this[fe]=null,Ye.close(e,r=>r?this.emit("error",r):this.emit("close"))}}},ih=class extends Io{[br](){let e;if(this[Lo]&&this[Dr]==="r+")try{e=Ye.openSync(this[Jt],this[Dr],this[Bo])}catch(r){if(r.code==="ENOENT")return this[Dr]="w",this[br]();throw r}else e=Ye.openSync(this[Jt],this[Dr],this[Bo]);this[Wi](null,e)}[pt](){if(this[zi]&&typeof this[fe]=="number"){let e=this[fe];this[fe]=null,Ye.closeSync(e),this.emit("close")}}[To](e){let r=!0;try{this[Hi](null,Ye.writeSync(this[fe],e,0,e.length,this[Wr])),r=!1}finally{if(r)try{this[pt]()}catch{}}}};Pn.ReadStream=Po;Pn.ReadStreamSync=rh;Pn.WriteStream=Io;Pn.WriteStreamSync=ih});var Uo=$((JP,oE)=>{"use strict";var qF=mo(),UF=Ni(),GF=require("events"),zF=$c(),WF=1024*1024,YF=ho(),Qy=po(),VF=Ec(),{nextTick:KF}=require("process"),nh=Buffer.from([31,139]),st=Symbol("state"),Yr=Symbol("writeEntry"),Xt=Symbol("readEntry"),sh=Symbol("nextEntry"),eE=Symbol("processEntry"),ot=Symbol("extendedHeader"),In=Symbol("globalExtendedHeader"),_r=Symbol("meta"),tE=Symbol("emitMeta"),me=Symbol("buffer"),Qt=Symbol("queue"),Vr=Symbol("ended"),rE=Symbol("emittedEnd"),Kr=Symbol("emit"),Ve=Symbol("unzip"),No=Symbol("consumeChunk"),Mo=Symbol("consumeChunkSub"),oh=Symbol("consumeBody"),iE=Symbol("consumeMeta"),nE=Symbol("consumeHeader"),jo=Symbol("consuming"),ah=Symbol("bufferConcat"),uh=Symbol("maybeEnd"),Nn=Symbol("writing"),wr=Symbol("aborted"),$o=Symbol("onDone"),Zr=Symbol("sawValidEntry"),Ho=Symbol("sawNullBlock"),qo=Symbol("sawEOF"),sE=Symbol("closeStream"),ZF=t=>!0;oE.exports=qF(class extends GF{constructor(e){e=e||{},super(e),this.file=e.file||"",this[Zr]=null,this.on($o,r=>{(this[st]==="begin"||this[Zr]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on($o,e.ondone):this.on($o,r=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||WF,this.filter=typeof e.filter=="function"?e.filter:ZF,this.writable=!0,this.readable=!1,this[Qt]=new zF,this[me]=null,this[Xt]=null,this[Yr]=null,this[st]="begin",this[_r]="",this[ot]=null,this[In]=null,this[Vr]=!1,this[Ve]=null,this[wr]=!1,this[Ho]=!1,this[qo]=!1,this.on("end",()=>this[sE]()),typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onentry=="function"&&this.on("entry",e.onentry)}[nE](e,r){this[Zr]===null&&(this[Zr]=!1);let i;try{i=new UF(e,r,this[ot],this[In])}catch(n){return this.warn("TAR_ENTRY_INVALID",n)}if(i.nullBlock)this[Ho]?(this[qo]=!0,this[st]==="begin"&&(this[st]="header"),this[Kr]("eof")):(this[Ho]=!0,this[Kr]("nullBlock"));else if(this[Ho]=!1,!i.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i});else if(!i.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:i});else{let n=i.type;if(/^(Symbolic)?Link$/.test(n)&&!i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i});else if(!/^(Symbolic)?Link$/.test(n)&&i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i});else{let s=this[Yr]=new YF(i,this[ot],this[In]);if(!this[Zr])if(s.remain){let o=()=>{s.invalid||(this[Zr]=!0)};s.on("end",o)}else this[Zr]=!0;s.meta?s.size>this.maxMetaEntrySize?(s.ignore=!0,this[Kr]("ignoredEntry",s),this[st]="ignore",s.resume()):s.size>0&&(this[_r]="",s.on("data",o=>this[_r]+=o),this[st]="meta"):(this[ot]=null,s.ignore=s.ignore||!this.filter(s.path,s),s.ignore?(this[Kr]("ignoredEntry",s),this[st]=s.remain?"ignore":"header",s.resume()):(s.remain?this[st]="body":(this[st]="header",s.end()),this[Xt]?this[Qt].push(s):(this[Qt].push(s),this[sh]())))}}}[sE](){KF(()=>this.emit("close"))}[eE](e){let r=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[Xt]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",i=>this[sh]()),r=!1)):(this[Xt]=null,r=!1),r}[sh](){do;while(this[eE](this[Qt].shift()));if(!this[Qt].length){let e=this[Xt];!e||e.flowing||e.size===e.remain?this[Nn]||this.emit("drain"):e.once("drain",i=>this.emit("drain"))}}[oh](e,r){let i=this[Yr],n=i.blockRemain,s=n>=e.length&&r===0?e:e.slice(r,r+n);return i.write(s),i.blockRemain||(this[st]="header",this[Yr]=null,i.end()),s.length}[iE](e,r){let i=this[Yr],n=this[oh](e,r);return this[Yr]||this[tE](i),n}[Kr](e,r,i){!this[Qt].length&&!this[Xt]?this.emit(e,r,i):this[Qt].push([e,r,i])}[tE](e){switch(this[Kr]("meta",this[_r]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[ot]=Qy.parse(this[_r],this[ot],!1);break;case"GlobalExtendedHeader":this[In]=Qy.parse(this[_r],this[In],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[ot]=this[ot]||Object.create(null),this[ot].path=this[_r].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[ot]=this[ot]||Object.create(null),this[ot].linkpath=this[_r].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[wr]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[wr])return;if(this[Ve]===null&&e){if(this[me]&&(e=Buffer.concat([this[me],e]),this[me]=null),e.length<nh.length)return this[me]=e,!0;for(let i=0;this[Ve]===null&&i<nh.length;i++)e[i]!==nh[i]&&(this[Ve]=!1);if(this[Ve]===null){let i=this[Vr];this[Vr]=!1,this[Ve]=new VF.Unzip,this[Ve].on("data",s=>this[No](s)),this[Ve].on("error",s=>this.abort(s)),this[Ve].on("end",s=>{this[Vr]=!0,this[No]()}),this[Nn]=!0;let n=this[Ve][i?"end":"write"](e);return this[Nn]=!1,n}}this[Nn]=!0,this[Ve]?this[Ve].write(e):this[No](e),this[Nn]=!1;let r=this[Qt].length?!1:this[Xt]?this[Xt].flowing:!0;return!r&&!this[Qt].length&&this[Xt].once("drain",i=>this.emit("drain")),r}[ah](e){e&&!this[wr]&&(this[me]=this[me]?Buffer.concat([this[me],e]):e)}[uh](){if(this[Vr]&&!this[rE]&&!this[wr]&&!this[jo]){this[rE]=!0;let e=this[Yr];if(e&&e.blockRemain){let r=this[me]?this[me].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${r} available)`,{entry:e}),this[me]&&e.write(this[me]),e.end()}this[Kr]($o)}}[No](e){if(this[jo])this[ah](e);else if(!e&&!this[me])this[uh]();else{if(this[jo]=!0,this[me]){this[ah](e);let r=this[me];this[me]=null,this[Mo](r)}else this[Mo](e);for(;this[me]&&this[me].length>=512&&!this[wr]&&!this[qo];){let r=this[me];this[me]=null,this[Mo](r)}this[jo]=!1}(!this[me]||this[Vr])&&this[uh]()}[Mo](e){let r=0,i=e.length;for(;r+512<=i&&!this[wr]&&!this[qo];)switch(this[st]){case"begin":case"header":this[nE](e,r),r+=512;break;case"ignore":case"body":r+=this[oh](e,r);break;case"meta":r+=this[iE](e,r);break;default:throw new Error("invalid state: "+this[st])}r<i&&(this[me]?this[me]=Buffer.concat([e.slice(r),this[me]]):this[me]=e.slice(r))}end(e){this[wr]||(this[Ve]?this[Ve].end(e):(this[Vr]=!0,this.write(e)))}})});var Go=$((XP,cE)=>{"use strict";var JF=Oi(),uE=Uo(),Vi=require("fs"),XF=Yi(),aE=require("path"),lh=Mi();cE.exports=(t,e,r)=>{typeof t=="function"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(r=e,e=null),e?e=Array.from(e):e=[];let i=JF(t);if(i.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return e.length&&eO(i,e),i.noResume||QF(i),i.file&&i.sync?tO(i):i.file?rO(i,r):lE(i)};var QF=t=>{let e=t.onentry;t.onentry=e?r=>{e(r),r.resume()}:r=>r.resume()},eO=(t,e)=>{let r=new Map(e.map(s=>[lh(s),!0])),i=t.filter,n=(s,o)=>{let a=o||aE.parse(s).root||".",u=s===a?!1:r.has(s)?r.get(s):n(aE.dirname(s),a);return r.set(s,u),u};t.filter=i?(s,o)=>i(s,o)&&n(lh(s)):s=>n(lh(s))},tO=t=>{let e=lE(t),r=t.file,i=!0,n;try{let s=Vi.statSync(r),o=t.maxReadSize||16*1024*1024;if(s.size<o)e.end(Vi.readFileSync(r));else{let a=0,u=Buffer.allocUnsafe(o);for(n=Vi.openSync(r,"r");a<s.size;){let l=Vi.readSync(n,u,0,o,a);a+=l,e.write(u.slice(0,l))}e.end()}i=!1}finally{if(i&&n)try{Vi.closeSync(n)}catch{}}},rO=(t,e)=>{let r=new uE(t),i=t.maxReadSize||16*1024*1024,n=t.file,s=new Promise((o,a)=>{r.on("error",a),r.on("end",o),Vi.stat(n,(u,l)=>{if(u)a(u);else{let c=new XF.ReadStream(n,{readSize:i,size:l.size});c.on("error",a),c.pipe(r)}})});return e?s.then(e,e):s},lE=t=>new uE(t)});var gE=$((QP,mE)=>{"use strict";var iO=Oi(),zo=Fo(),hE=Yi(),fE=Go(),pE=require("path");mE.exports=(t,e,r)=>{if(typeof e=="function"&&(r=e),Array.isArray(t)&&(e=t,t={}),!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");e=Array.from(e);let i=iO(t);if(i.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return i.file&&i.sync?nO(i,e):i.file?sO(i,e,r):i.sync?oO(i,e):aO(i,e)};var nO=(t,e)=>{let r=new zo.Sync(t),i=new hE.WriteStreamSync(t.file,{mode:t.mode||438});r.pipe(i),dE(r,e)},sO=(t,e,r)=>{let i=new zo(t),n=new hE.WriteStream(t.file,{mode:t.mode||438});i.pipe(n);let s=new Promise((o,a)=>{n.on("error",a),n.on("close",o),i.on("error",a)});return ch(i,e),r?s.then(r,r):s},dE=(t,e)=>{e.forEach(r=>{r.charAt(0)==="@"?fE({file:pE.resolve(t.cwd,r.slice(1)),sync:!0,noResume:!0,onentry:i=>t.add(i)}):t.add(r)}),t.end()},ch=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)==="@")return fE({file:pE.resolve(t.cwd,r.slice(1)),noResume:!0,onentry:i=>t.add(i)}).then(i=>ch(t,e));t.add(r)}t.end()},oO=(t,e)=>{let r=new zo.Sync(t);return dE(r,e),r},aO=(t,e)=>{let r=new zo(t);return ch(r,e),r}});var hh=$((eI,SE)=>{"use strict";var uO=Oi(),yE=Fo(),et=require("fs"),EE=Yi(),DE=Go(),bE=require("path"),_E=Ni();SE.exports=(t,e,r)=>{let i=uO(t);if(!i.file)throw new TypeError("file is required");if(i.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),i.sync?lO(i,e):hO(i,e,r)};var lO=(t,e)=>{let r=new yE.Sync(t),i=!0,n,s;try{try{n=et.openSync(t.file,"r+")}catch(u){if(u.code==="ENOENT")n=et.openSync(t.file,"w+");else throw u}let o=et.fstatSync(n),a=Buffer.alloc(512);e:for(s=0;s<o.size;s+=512){for(let c=0,f=0;c<512;c+=f){if(f=et.readSync(n,a,c,a.length-c,s+c),s===0&&a[0]===31&&a[1]===139)throw new Error("cannot append to compressed archives");if(!f)break e}let u=new _E(a);if(!u.cksumValid)break;let l=512*Math.ceil(u.size/512);if(s+l+512>o.size)break;s+=l,t.mtimeCache&&t.mtimeCache.set(u.path,u.mtime)}i=!1,cO(t,r,s,n,e)}finally{if(i)try{et.closeSync(n)}catch{}}},cO=(t,e,r,i,n)=>{let s=new EE.WriteStreamSync(t.file,{fd:i,start:r});e.pipe(s),fO(e,n)},hO=(t,e,r)=>{e=Array.from(e);let i=new yE(t),n=(o,a,u)=>{let l=(d,m)=>{d?et.close(o,g=>u(d)):u(null,m)},c=0;if(a===0)return l(null,0);let f=0,h=Buffer.alloc(512),p=(d,m)=>{if(d)return l(d);if(f+=m,f<512&&m)return et.read(o,h,f,h.length-f,c+f,p);if(c===0&&h[0]===31&&h[1]===139)return l(new Error("cannot append to compressed archives"));if(f<512)return l(null,c);let g=new _E(h);if(!g.cksumValid)return l(null,c);let v=512*Math.ceil(g.size/512);if(c+v+512>a||(c+=v+512,c>=a))return l(null,c);t.mtimeCache&&t.mtimeCache.set(g.path,g.mtime),f=0,et.read(o,h,0,512,c,p)};et.read(o,h,0,512,c,p)},s=new Promise((o,a)=>{i.on("error",a);let u="r+",l=(c,f)=>{if(c&&c.code==="ENOENT"&&u==="r+")return u="w+",et.open(t.file,u,l);if(c)return a(c);et.fstat(f,(h,p)=>{if(h)return et.close(f,()=>a(h));n(f,p.size,(d,m)=>{if(d)return a(d);let g=new EE.WriteStream(t.file,{fd:f,start:m});i.pipe(g),g.on("error",a),g.on("close",o),wE(i,e)})})};et.open(t.file,u,l)});return r?s.then(r,r):s},fO=(t,e)=>{e.forEach(r=>{r.charAt(0)==="@"?DE({file:bE.resolve(t.cwd,r.slice(1)),sync:!0,noResume:!0,onentry:i=>t.add(i)}):t.add(r)}),t.end()},wE=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)==="@")return DE({file:bE.resolve(t.cwd,r.slice(1)),noResume:!0,onentry:i=>t.add(i)}).then(i=>wE(t,e));t.add(r)}t.end()}});var vE=$((tI,AE)=>{"use strict";var pO=Oi(),dO=hh();AE.exports=(t,e,r)=>{let i=pO(t);if(!i.file)throw new TypeError("file is required");if(i.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),mO(i),dO(i,e,r)};var mO=t=>{let e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(r,i)=>e(r,i)&&!(t.mtimeCache.get(r)>i.mtime):(r,i)=>!(t.mtimeCache.get(r)>i.mtime)}});var RE=$((rI,xE)=>{var{promisify:CE}=require("util"),Sr=require("fs"),gO=t=>{if(!t)t={mode:511,fs:Sr};else if(typeof t=="object")t={mode:511,fs:Sr,...t};else if(typeof t=="number")t={mode:t,fs:Sr};else if(typeof t=="string")t={mode:parseInt(t,8),fs:Sr};else throw new TypeError("invalid options argument");return t.mkdir=t.mkdir||t.fs.mkdir||Sr.mkdir,t.mkdirAsync=CE(t.mkdir),t.stat=t.stat||t.fs.stat||Sr.stat,t.statAsync=CE(t.stat),t.statSync=t.statSync||t.fs.statSync||Sr.statSync,t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||Sr.mkdirSync,t};xE.exports=gO});var OE=$((iI,FE)=>{var yO=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:EO,parse:DO}=require("path"),bO=t=>{if(/\0/.test(t))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"});if(t=EO(t),yO==="win32"){let e=/[*|"<>?:]/,{root:r}=DO(t);if(e.test(t.substr(r.length)))throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}return t};FE.exports=bO});var PE=$((nI,BE)=>{var{dirname:kE}=require("path"),TE=(t,e,r=void 0)=>r===e?Promise.resolve():t.statAsync(e).then(i=>i.isDirectory()?r:void 0,i=>i.code==="ENOENT"?TE(t,kE(e),e):void 0),LE=(t,e,r=void 0)=>{if(r!==e)try{return t.statSync(e).isDirectory()?r:void 0}catch(i){return i.code==="ENOENT"?LE(t,kE(e),e):void 0}};BE.exports={findMade:TE,findMadeSync:LE}});var dh=$((sI,NE)=>{var{dirname:IE}=require("path"),fh=(t,e,r)=>{e.recursive=!1;let i=IE(t);return i===t?e.mkdirAsync(t,e).catch(n=>{if(n.code!=="EISDIR")throw n}):e.mkdirAsync(t,e).then(()=>r||t,n=>{if(n.code==="ENOENT")return fh(i,e).then(s=>fh(t,e,s));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;return e.statAsync(t).then(s=>{if(s.isDirectory())return r;throw n},()=>{throw n})})},ph=(t,e,r)=>{let i=IE(t);if(e.recursive=!1,i===t)try{return e.mkdirSync(t,e)}catch(n){if(n.code!=="EISDIR")throw n;return}try{return e.mkdirSync(t,e),r||t}catch(n){if(n.code==="ENOENT")return ph(t,e,ph(i,e,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;try{if(!e.statSync(t).isDirectory())throw n}catch{throw n}}};NE.exports={mkdirpManual:fh,mkdirpManualSync:ph}});var $E=$((oI,jE)=>{var{dirname:ME}=require("path"),{findMade:_O,findMadeSync:wO}=PE(),{mkdirpManual:SO,mkdirpManualSync:AO}=dh(),vO=(t,e)=>(e.recursive=!0,ME(t)===t?e.mkdirAsync(t,e):_O(e,t).then(i=>e.mkdirAsync(t,e).then(()=>i).catch(n=>{if(n.code==="ENOENT")return SO(t,e);throw n}))),CO=(t,e)=>{if(e.recursive=!0,ME(t)===t)return e.mkdirSync(t,e);let i=wO(e,t);try{return e.mkdirSync(t,e),i}catch(n){if(n.code==="ENOENT")return AO(t,e);throw n}};jE.exports={mkdirpNative:vO,mkdirpNativeSync:CO}});var GE=$((aI,UE)=>{var HE=require("fs"),xO=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version,mh=xO.replace(/^v/,"").split("."),qE=+mh[0]>10||+mh[0]==10&&+mh[1]>=12,RO=qE?t=>t.mkdir===HE.mkdir:()=>!1,FO=qE?t=>t.mkdirSync===HE.mkdirSync:()=>!1;UE.exports={useNative:RO,useNativeSync:FO}});var ZE=$((uI,KE)=>{var Ki=RE(),Zi=OE(),{mkdirpNative:zE,mkdirpNativeSync:WE}=$E(),{mkdirpManual:YE,mkdirpManualSync:VE}=dh(),{useNative:OO,useNativeSync:kO}=GE(),Ji=(t,e)=>(t=Zi(t),e=Ki(e),OO(e)?zE(t,e):YE(t,e)),TO=(t,e)=>(t=Zi(t),e=Ki(e),kO(e)?WE(t,e):VE(t,e));Ji.sync=TO;Ji.native=(t,e)=>zE(Zi(t),Ki(e));Ji.manual=(t,e)=>YE(Zi(t),Ki(e));Ji.nativeSync=(t,e)=>WE(Zi(t),Ki(e));Ji.manualSync=(t,e)=>VE(Zi(t),Ki(e));KE.exports=Ji});var iD=$((lI,rD)=>{"use strict";var at=require("fs"),Jr=require("path"),LO=at.lchown?"lchown":"chown",BO=at.lchownSync?"lchownSync":"chownSync",XE=at.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),JE=(t,e,r)=>{try{return at[BO](t,e,r)}catch(i){if(i.code!=="ENOENT")throw i}},PO=(t,e,r)=>{try{return at.chownSync(t,e,r)}catch(i){if(i.code!=="ENOENT")throw i}},IO=XE?(t,e,r,i)=>n=>{!n||n.code!=="EISDIR"?i(n):at.chown(t,e,r,i)}:(t,e,r,i)=>i,gh=XE?(t,e,r)=>{try{return JE(t,e,r)}catch(i){if(i.code!=="EISDIR")throw i;PO(t,e,r)}}:(t,e,r)=>JE(t,e,r),NO=process.version,QE=(t,e,r)=>at.readdir(t,e,r),MO=(t,e)=>at.readdirSync(t,e);/^v4\./.test(NO)&&(QE=(t,e,r)=>at.readdir(t,r));var Wo=(t,e,r,i)=>{at[LO](t,e,r,IO(t,e,r,n=>{i(n&&n.code!=="ENOENT"?n:null)}))},eD=(t,e,r,i,n)=>{if(typeof e=="string")return at.lstat(Jr.resolve(t,e),(s,o)=>{if(s)return n(s.code!=="ENOENT"?s:null);o.name=e,eD(t,o,r,i,n)});if(e.isDirectory())yh(Jr.resolve(t,e.name),r,i,s=>{if(s)return n(s);let o=Jr.resolve(t,e.name);Wo(o,r,i,n)});else{let s=Jr.resolve(t,e.name);Wo(s,r,i,n)}},yh=(t,e,r,i)=>{QE(t,{withFileTypes:!0},(n,s)=>{if(n){if(n.code==="ENOENT")return i();if(n.code!=="ENOTDIR"&&n.code!=="ENOTSUP")return i(n)}if(n||!s.length)return Wo(t,e,r,i);let o=s.length,a=null,u=l=>{if(!a){if(l)return i(a=l);if(--o===0)return Wo(t,e,r,i)}};s.forEach(l=>eD(t,l,e,r,u))})},jO=(t,e,r,i)=>{if(typeof e=="string")try{let n=at.lstatSync(Jr.resolve(t,e));n.name=e,e=n}catch(n){if(n.code==="ENOENT")return;throw n}e.isDirectory()&&tD(Jr.resolve(t,e.name),r,i),gh(Jr.resolve(t,e.name),r,i)},tD=(t,e,r)=>{let i;try{i=MO(t,{withFileTypes:!0})}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return gh(t,e,r);throw n}return i&&i.length&&i.forEach(n=>jO(t,n,e,r)),gh(t,e,r)};rD.exports=yh;yh.sync=tD});var aD=$((cI,Eh)=>{"use strict";var nD=ZE(),ut=require("fs"),Yo=require("path"),sD=iD(),dt=Pi(),Vo=class extends Error{constructor(e,r){super("Cannot extract through symbolic link"),this.path=r,this.symlink=e}get name(){return"SylinkError"}},Ko=class extends Error{constructor(e,r){super(r+": Cannot cd into '"+e+"'"),this.path=e,this.code=r}get name(){return"CwdError"}},Zo=(t,e)=>t.get(dt(e)),Mn=(t,e,r)=>t.set(dt(e),r),$O=(t,e)=>{ut.stat(t,(r,i)=>{(r||!i.isDirectory())&&(r=new Ko(t,r&&r.code||"ENOTDIR")),e(r)})};Eh.exports=(t,e,r)=>{t=dt(t);let i=e.umask,n=e.mode|448,s=(n&i)!==0,o=e.uid,a=e.gid,u=typeof o=="number"&&typeof a=="number"&&(o!==e.processUid||a!==e.processGid),l=e.preserve,c=e.unlink,f=e.cache,h=dt(e.cwd),p=(g,v)=>{g?r(g):(Mn(f,t,!0),v&&u?sD(v,o,a,F=>p(F)):s?ut.chmod(t,n,r):r())};if(f&&Zo(f,t)===!0)return p();if(t===h)return $O(t,p);if(l)return nD(t,{mode:n}).then(g=>p(null,g),p);let m=dt(Yo.relative(h,t)).split("/");Jo(h,m,n,f,c,h,null,p)};var Jo=(t,e,r,i,n,s,o,a)=>{if(!e.length)return a(null,o);let u=e.shift(),l=dt(Yo.resolve(t+"/"+u));if(Zo(i,l))return Jo(l,e,r,i,n,s,o,a);ut.mkdir(l,r,oD(l,e,r,i,n,s,o,a))},oD=(t,e,r,i,n,s,o,a)=>u=>{u?ut.lstat(t,(l,c)=>{if(l)l.path=l.path&&dt(l.path),a(l);else if(c.isDirectory())Jo(t,e,r,i,n,s,o,a);else if(n)ut.unlink(t,f=>{if(f)return a(f);ut.mkdir(t,r,oD(t,e,r,i,n,s,o,a))});else{if(c.isSymbolicLink())return a(new Vo(t,t+"/"+e.join("/")));a(u)}}):(o=o||t,Jo(t,e,r,i,n,s,o,a))},HO=t=>{let e=!1,r="ENOTDIR";try{e=ut.statSync(t).isDirectory()}catch(i){r=i.code}finally{if(!e)throw new Ko(t,r)}};Eh.exports.sync=(t,e)=>{t=dt(t);let r=e.umask,i=e.mode|448,n=(i&r)!==0,s=e.uid,o=e.gid,a=typeof s=="number"&&typeof o=="number"&&(s!==e.processUid||o!==e.processGid),u=e.preserve,l=e.unlink,c=e.cache,f=dt(e.cwd),h=g=>{Mn(c,t,!0),g&&a&&sD.sync(g,s,o),n&&ut.chmodSync(t,i)};if(c&&Zo(c,t)===!0)return h();if(t===f)return HO(f),h();if(u)return h(nD.sync(t,i));let d=dt(Yo.relative(f,t)).split("/"),m=null;for(let g=d.shift(),v=f;g&&(v+="/"+g);g=d.shift())if(v=dt(Yo.resolve(v)),!Zo(c,v))try{ut.mkdirSync(v,i),m=m||v,Mn(c,v,!0)}catch{let k=ut.lstatSync(v);if(k.isDirectory()){Mn(c,v,!0);continue}else if(l){ut.unlinkSync(v),ut.mkdirSync(v,i),m=m||v,Mn(c,v,!0);continue}else if(k.isSymbolicLink())return new Vo(v,v+"/"+d.join("/"))}return h(m)}});var bh=$((hI,uD)=>{var Dh=Object.create(null),{hasOwnProperty:qO}=Object.prototype;uD.exports=t=>(qO.call(Dh,t)||(Dh[t]=t.normalize("NFKD")),Dh[t])});var fD=$((fI,hD)=>{var lD=require("assert"),UO=bh(),GO=Mi(),{join:cD}=require("path"),zO=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,WO=zO==="win32";hD.exports=()=>{let t=new Map,e=new Map,r=l=>l.split("/").slice(0,-1).reduce((f,h)=>(f.length&&(h=cD(f[f.length-1],h)),f.push(h||"/"),f),[]),i=new Set,n=l=>{let c=e.get(l);if(!c)throw new Error("function does not have any path reservations");return{paths:c.paths.map(f=>t.get(f)),dirs:[...c.dirs].map(f=>t.get(f))}},s=l=>{let{paths:c,dirs:f}=n(l);return c.every(h=>h[0]===l)&&f.every(h=>h[0]instanceof Set&&h[0].has(l))},o=l=>i.has(l)||!s(l)?!1:(i.add(l),l(()=>a(l)),!0),a=l=>{if(!i.has(l))return!1;let{paths:c,dirs:f}=e.get(l),h=new Set;return c.forEach(p=>{let d=t.get(p);lD.equal(d[0],l),d.length===1?t.delete(p):(d.shift(),typeof d[0]=="function"?h.add(d[0]):d[0].forEach(m=>h.add(m)))}),f.forEach(p=>{let d=t.get(p);lD(d[0]instanceof Set),d[0].size===1&&d.length===1?t.delete(p):d[0].size===1?(d.shift(),h.add(d[0])):d[0].delete(l)}),i.delete(l),h.forEach(p=>o(p)),!0};return{check:s,reserve:(l,c)=>{l=WO?["win32 parallelization disabled"]:l.map(h=>UO(GO(cD(h))).toLowerCase());let f=new Set(l.map(h=>r(h)).reduce((h,p)=>h.concat(p)));return e.set(c,{dirs:f,paths:l}),l.forEach(h=>{let p=t.get(h);p?p.push(c):t.set(h,[c])}),f.forEach(h=>{let p=t.get(h);p?p[p.length-1]instanceof Set?p[p.length-1].add(c):p.push(new Set([c])):t.set(h,[new Set([c])])}),o(c)}}}});var mD=$((pI,dD)=>{var YO=process.env.__FAKE_PLATFORM__||process.platform,VO=YO==="win32",KO=global.__FAKE_TESTING_FS__||require("fs"),{O_CREAT:ZO,O_TRUNC:JO,O_WRONLY:XO,UV_FS_O_FILEMAP:pD=0}=KO.constants,QO=VO&&!!pD,ek=512*1024,tk=pD|JO|ZO|XO;dD.exports=QO?t=>t<ek?tk:"w":()=>"w"});var Fh=$((dI,FD)=>{"use strict";var rk=require("assert"),ik=Uo(),ue=require("fs"),nk=Yi(),er=require("path"),CD=aD(),gD=Rc(),sk=fD(),ok=Fc(),tt=Pi(),ak=Mi(),uk=bh(),yD=Symbol("onEntry"),Sh=Symbol("checkFs"),ED=Symbol("checkFs2"),ea=Symbol("pruneCache"),Ah=Symbol("isReusable"),lt=Symbol("makeFs"),vh=Symbol("file"),Ch=Symbol("directory"),ta=Symbol("link"),DD=Symbol("symlink"),bD=Symbol("hardlink"),_D=Symbol("unsupported"),wD=Symbol("checkPath"),Ar=Symbol("mkdir"),Me=Symbol("onError"),Xo=Symbol("pending"),SD=Symbol("pend"),Xi=Symbol("unpend"),_h=Symbol("ended"),wh=Symbol("maybeClose"),xh=Symbol("skip"),jn=Symbol("doChown"),$n=Symbol("uid"),Hn=Symbol("gid"),qn=Symbol("checkedCwd"),xD=require("crypto"),RD=mD(),lk=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Un=lk==="win32",ck=(t,e)=>{if(!Un)return ue.unlink(t,e);let r=t+".DELETE."+xD.randomBytes(16).toString("hex");ue.rename(t,r,i=>{if(i)return e(i);ue.unlink(r,e)})},hk=t=>{if(!Un)return ue.unlinkSync(t);let e=t+".DELETE."+xD.randomBytes(16).toString("hex");ue.renameSync(t,e),ue.unlinkSync(e)},AD=(t,e,r)=>t===t>>>0?t:e===e>>>0?e:r,vD=t=>uk(ak(tt(t))).toLowerCase(),fk=(t,e)=>{e=vD(e);for(let r of t.keys()){let i=vD(r);(i===e||i.indexOf(e+"/")===0)&&t.delete(r)}},pk=t=>{for(let e of t.keys())t.delete(e)},Gn=class extends ik{constructor(e){if(e||(e={}),e.ondone=r=>{this[_h]=!0,this[wh]()},super(e),this[qn]=!1,this.reservations=sk(),this.transform=typeof e.transform=="function"?e.transform:null,this.writable=!0,this.readable=!1,this[Xo]=0,this[_h]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||Un,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=tt(er.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",r=>this[yD](r))}warn(e,r,i={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(i.recoverable=!1),super.warn(e,r,i)}[wh](){this[_h]&&this[Xo]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[wD](e){if(this.strip){let r=tt(e.path).split("/");if(r.length<this.strip)return!1;if(e.path=r.slice(this.strip).join("/"),e.type==="Link"){let i=tt(e.linkpath).split("/");if(i.length>=this.strip)e.linkpath=i.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let r=tt(e.path),i=r.split("/");if(i.includes("..")||Un&&/^[a-z]:\.\.$/i.test(i[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:r}),!1;let[n,s]=ok(r);n&&(e.path=s,this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:e,path:r}))}if(er.isAbsolute(e.path)?e.absolute=tt(er.resolve(e.path)):e.absolute=tt(er.resolve(this.cwd,e.path)),!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:tt(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir")return!1;if(this.win32){let{root:r}=er.win32.parse(e.absolute);e.absolute=r+gD.encode(e.absolute.slice(r.length));let{root:i}=er.win32.parse(e.path);e.path=i+gD.encode(e.path.slice(i.length))}return!0}[yD](e){if(!this[wD](e))return e.resume();switch(rk.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Sh](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[_D](e)}}[Me](e,r){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:r}),this[Xi](),r.resume())}[Ar](e,r,i){CD(tt(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r,noChmod:this.noChmod},i)}[jn](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[$n](e){return AD(this.uid,e.uid,this.processUid)}[Hn](e){return AD(this.gid,e.gid,this.processGid)}[vh](e,r){let i=e.mode&4095||this.fmode,n=new nk.WriteStream(e.absolute,{flags:RD(e.size),mode:i,autoClose:!1});n.on("error",u=>{n.fd&&ue.close(n.fd,()=>{}),n.write=()=>!0,this[Me](u,e),r()});let s=1,o=u=>{if(u){n.fd&&ue.close(n.fd,()=>{}),this[Me](u,e),r();return}--s===0&&ue.close(n.fd,l=>{l?this[Me](l,e):this[Xi](),r()})};n.on("finish",u=>{let l=e.absolute,c=n.fd;if(e.mtime&&!this.noMtime){s++;let f=e.atime||new Date,h=e.mtime;ue.futimes(c,f,h,p=>p?ue.utimes(l,f,h,d=>o(d&&p)):o())}if(this[jn](e)){s++;let f=this[$n](e),h=this[Hn](e);ue.fchown(c,f,h,p=>p?ue.chown(l,f,h,d=>o(d&&p)):o())}o()});let a=this.transform&&this.transform(e)||e;a!==e&&(a.on("error",u=>{this[Me](u,e),r()}),e.pipe(a)),a.pipe(n)}[Ch](e,r){let i=e.mode&4095||this.dmode;this[Ar](e.absolute,i,n=>{if(n){this[Me](n,e),r();return}let s=1,o=a=>{--s===0&&(r(),this[Xi](),e.resume())};e.mtime&&!this.noMtime&&(s++,ue.utimes(e.absolute,e.atime||new Date,e.mtime,o)),this[jn](e)&&(s++,ue.chown(e.absolute,this[$n](e),this[Hn](e),o)),o()})}[_D](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[DD](e,r){this[ta](e,e.linkpath,"symlink",r)}[bD](e,r){let i=tt(er.resolve(this.cwd,e.linkpath));this[ta](e,i,"link",r)}[SD](){this[Xo]++}[Xi](){this[Xo]--,this[wh]()}[xh](e){this[Xi](),e.resume()}[Ah](e,r){return e.type==="File"&&!this.unlink&&r.isFile()&&r.nlink<=1&&!Un}[Sh](e){this[SD]();let r=[e.path];e.linkpath&&r.push(e.linkpath),this.reservations.reserve(r,i=>this[ED](e,i))}[ea](e){e.type==="SymbolicLink"?pk(this.dirCache):e.type!=="Directory"&&fk(this.dirCache,e.absolute)}[ED](e,r){this[ea](e);let i=a=>{this[ea](e),r(a)},n=()=>{this[Ar](this.cwd,this.dmode,a=>{if(a){this[Me](a,e),i();return}this[qn]=!0,s()})},s=()=>{if(e.absolute!==this.cwd){let a=tt(er.dirname(e.absolute));if(a!==this.cwd)return this[Ar](a,this.dmode,u=>{if(u){this[Me](u,e),i();return}o()})}o()},o=()=>{ue.lstat(e.absolute,(a,u)=>{if(u&&(this.keep||this.newer&&u.mtime>e.mtime)){this[xh](e),i();return}if(a||this[Ah](e,u))return this[lt](null,e,i);if(u.isDirectory()){if(e.type==="Directory"){let l=!this.noChmod&&e.mode&&(u.mode&4095)!==e.mode,c=f=>this[lt](f,e,i);return l?ue.chmod(e.absolute,e.mode,c):c()}if(e.absolute!==this.cwd)return ue.rmdir(e.absolute,l=>this[lt](l,e,i))}if(e.absolute===this.cwd)return this[lt](null,e,i);ck(e.absolute,l=>this[lt](l,e,i))})};this[qn]?s():n()}[lt](e,r,i){if(e){this[Me](e,r),i();return}switch(r.type){case"File":case"OldFile":case"ContiguousFile":return this[vh](r,i);case"Link":return this[bD](r,i);case"SymbolicLink":return this[DD](r,i);case"Directory":case"GNUDumpDir":return this[Ch](r,i)}}[ta](e,r,i,n){ue[i](r,e.absolute,s=>{s?this[Me](s,e):(this[Xi](),e.resume()),n()})}},Qo=t=>{try{return[null,t()]}catch(e){return[e,null]}},Rh=class extends Gn{[lt](e,r){return super[lt](e,r,()=>{})}[Sh](e){if(this[ea](e),!this[qn]){let s=this[Ar](this.cwd,this.dmode);if(s)return this[Me](s,e);this[qn]=!0}if(e.absolute!==this.cwd){let s=tt(er.dirname(e.absolute));if(s!==this.cwd){let o=this[Ar](s,this.dmode);if(o)return this[Me](o,e)}}let[r,i]=Qo(()=>ue.lstatSync(e.absolute));if(i&&(this.keep||this.newer&&i.mtime>e.mtime))return this[xh](e);if(r||this[Ah](e,i))return this[lt](null,e);if(i.isDirectory()){if(e.type==="Directory"){let o=!this.noChmod&&e.mode&&(i.mode&4095)!==e.mode,[a]=o?Qo(()=>{ue.chmodSync(e.absolute,e.mode)}):[];return this[lt](a,e)}let[s]=Qo(()=>ue.rmdirSync(e.absolute));this[lt](s,e)}let[n]=e.absolute===this.cwd?[]:Qo(()=>hk(e.absolute));this[lt](n,e)}[vh](e,r){let i=e.mode&4095||this.fmode,n=a=>{let u;try{ue.closeSync(s)}catch(l){u=l}(a||u)&&this[Me](a||u,e),r()},s;try{s=ue.openSync(e.absolute,RD(e.size),i)}catch(a){return n(a)}let o=this.transform&&this.transform(e)||e;o!==e&&(o.on("error",a=>this[Me](a,e)),e.pipe(o)),o.on("data",a=>{try{ue.writeSync(s,a,0,a.length)}catch(u){n(u)}}),o.on("end",a=>{let u=null;if(e.mtime&&!this.noMtime){let l=e.atime||new Date,c=e.mtime;try{ue.futimesSync(s,l,c)}catch(f){try{ue.utimesSync(e.absolute,l,c)}catch{u=f}}}if(this[jn](e)){let l=this[$n](e),c=this[Hn](e);try{ue.fchownSync(s,l,c)}catch(f){try{ue.chownSync(e.absolute,l,c)}catch{u=u||f}}}n(u)})}[Ch](e,r){let i=e.mode&4095||this.dmode,n=this[Ar](e.absolute,i);if(n){this[Me](n,e),r();return}if(e.mtime&&!this.noMtime)try{ue.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[jn](e))try{ue.chownSync(e.absolute,this[$n](e),this[Hn](e))}catch{}r(),e.resume()}[Ar](e,r){try{return CD.sync(tt(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r})}catch(i){return i}}[ta](e,r,i,n){try{ue[i+"Sync"](r,e.absolute),n(),e.resume()}catch(s){return this[Me](s,e)}}};Gn.Sync=Rh;FD.exports=Gn});var BD=$((mI,LD)=>{"use strict";var dk=Oi(),ra=Fh(),kD=require("fs"),TD=Yi(),OD=require("path"),Oh=Mi();LD.exports=(t,e,r)=>{typeof t=="function"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(r=e,e=null),e?e=Array.from(e):e=[];let i=dk(t);if(i.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return e.length&&mk(i,e),i.file&&i.sync?gk(i):i.file?yk(i,r):i.sync?Ek(i):Dk(i)};var mk=(t,e)=>{let r=new Map(e.map(s=>[Oh(s),!0])),i=t.filter,n=(s,o)=>{let a=o||OD.parse(s).root||".",u=s===a?!1:r.has(s)?r.get(s):n(OD.dirname(s),a);return r.set(s,u),u};t.filter=i?(s,o)=>i(s,o)&&n(Oh(s)):s=>n(Oh(s))},gk=t=>{let e=new ra.Sync(t),r=t.file,i=kD.statSync(r),n=t.maxReadSize||16*1024*1024;new TD.ReadStreamSync(r,{readSize:n,size:i.size}).pipe(e)},yk=(t,e)=>{let r=new ra(t),i=t.maxReadSize||16*1024*1024,n=t.file,s=new Promise((o,a)=>{r.on("error",a),r.on("close",o),kD.stat(n,(u,l)=>{if(u)a(u);else{let c=new TD.ReadStream(n,{readSize:i,size:l.size});c.on("error",a),c.pipe(r)}})});return e?s.then(e,e):s},Ek=t=>new ra.Sync(t),Dk=t=>new ra(t)});var PD=$(Ce=>{"use strict";Ce.c=Ce.create=gE();Ce.r=Ce.replace=hh();Ce.t=Ce.list=Go();Ce.u=Ce.update=vE();Ce.x=Ce.extract=BD();Ce.Pack=Fo();Ce.Unpack=Fh();Ce.Parse=Uo();Ce.ReadEntry=ho();Ce.WriteEntry=jc();Ce.Header=Ni();Ce.Pax=po();Ce.types=_c()});var HD=$((bI,$D)=>{function ct(t,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}$D.exports=ct;ct.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};ct.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};ct.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=new Date().getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.push(t),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1);else return!1;var i=this;return this._timer=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},r),this._options.unref&&this._timer.unref(),!0};ct.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};ct.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)};ct.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)};ct.prototype.start=ct.prototype.try;ct.prototype.errors=function(){return this._errors};ct.prototype.attempts=function(){return this._attempts};ct.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},e=null,r=0,i=0;i<this._errors.length;i++){var n=this._errors[i],s=n.message,o=(t[s]||0)+1;t[s]=o,o>=r&&(e=n,r=o)}return e}});var qD=$(Xr=>{var Sk=HD();Xr.operation=function(t){var e=Xr.timeouts(t);return new Sk(e,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};Xr.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var r in t)e[r]=t[r];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var i=[],n=0;n<e.retries;n++)i.push(this.createTimeout(n,e));return t&&t.forever&&!i.length&&i.push(this.createTimeout(n,e)),i.sort(function(s,o){return s-o}),i};Xr.createTimeout=function(t,e){var r=e.randomize?Math.random()+1:1,i=Math.round(r*Math.max(e.minTimeout,1)*Math.pow(e.factor,t));return i=Math.min(i,e.maxTimeout),i};Xr.wrap=function(t,e,r){if(e instanceof Array&&(r=e,e=null),!r){r=[];for(var i in t)typeof t[i]=="function"&&r.push(i)}for(var n=0;n<r.length;n++){var s=r[n],o=t[s];t[s]=function(u){var l=Xr.operation(e),c=Array.prototype.slice.call(arguments,1),f=c.pop();c.push(function(h){l.retry(h)||(h&&(arguments[0]=l.mainError()),f.apply(this,arguments))}),l.attempt(function(){u.apply(t,c)})}.bind(t,o),t[s].options=e}}});var GD=$((wI,UD)=>{UD.exports=qD()});var WD=$((SI,zD)=>{var Ak=GD();function vk(t,e){function r(i,n){var s=e||{},o;"randomize"in s||(s.randomize=!0),o=Ak.operation(s);function a(c){n(c||new Error("Aborted"))}function u(c,f){if(c.bail){a(c);return}o.retry(c)?s.onRetry&&s.onRetry(c,f):n(o.mainError())}function l(c){var f;try{f=t(a,c)}catch(h){u(h,c);return}Promise.resolve(f).then(i).catch(function(p){u(p,c)})}o.attempt(l)}return new Promise(r)}zD.exports=vk});var Vb=J(require("chalk"));var n_=J(ef());function Sa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ln(t){return ln=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ln(t)}function Aa(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function va(t,e){if(e&&(ln(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Aa(t)}function Or(t){return Or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Or(t)}function Nt(t,e){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},Nt(t,e)}function Ca(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nt(t,e)}function xa(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Ra(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ii(t,e,r){return Ra()?ii=Reflect.construct.bind():ii=function(n,s,o){var a=[null];a.push.apply(a,s);var u=Function.bind.apply(n,a),l=new u;return o&&Nt(l,o.prototype),l},ii.apply(null,arguments)}function cn(t){var e=typeof Map=="function"?new Map:void 0;return cn=function(i){if(i===null||!xa(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(i))return e.get(i);e.set(i,n)}function n(){return ii(i,arguments,Or(this).constructor)}return n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Nt(n,i)},cn(t)}var tf=J(require("find-up"));var s_=J(require("fs-extra")),iB=function(t){Ca(e,t);function e(r){var i;return Sa(this,e),i=va(this,Or(e).call(this,"No package.json could be found upwards from the directory ".concat(r))),i.directory=r,i}return e}(cn(Error));var o_=J(require("fs")),a_=J(require("path"));var jC=J(require("fs")),$C=J(require("path"));function Ef(t){return typeof t=="undefined"||t===null}function c_(t){return typeof t=="object"&&t!==null}function h_(t){return Array.isArray(t)?t:Ef(t)?[]:[t]}function f_(t,e){var r,i,n,s;if(e)for(s=Object.keys(e),r=0,i=s.length;r<i;r+=1)n=s[r],t[n]=e[n];return t}function p_(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function d_(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var m_=Ef,g_=c_,y_=h_,E_=p_,D_=d_,b_=f_,ve={isNothing:m_,isObject:g_,toArray:y_,repeat:E_,isNegativeZero:D_,extend:b_};function Df(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
5
+ `.charCodeAt(),r=typeof t=="string"?"\r":"\r".charCodeAt();return t[t.length-1]===e&&(t=t.slice(0,t.length-1)),t[t.length-1]===r&&(t=t.slice(0,t.length-1)),t}});var W0=$((r2,wn)=>{"use strict";var _n=require("path"),G0=xl(),z0=t=>{t={cwd:process.cwd(),path:process.env[G0()],execPath:process.execPath,...t};let e,r=_n.resolve(t.cwd),i=[];for(;e!==r;)i.push(_n.join(r,"node_modules/.bin")),e=r,r=_n.resolve(r,"..");let n=_n.resolve(t.cwd,t.execPath,"..");return i.push(n),i.concat(t.path).join(_n.delimiter)};wn.exports=z0;wn.exports.default=z0;wn.exports.env=t=>{t={env:process.env,...t};let e={...t.env},r=G0({env:e});return t.path=e[r],e[r]=wn.exports(t),e}});var V0=$((i2,Pl)=>{"use strict";var Y0=(t,e)=>{for(let r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};Pl.exports=Y0;Pl.exports.default=Y0});var Z0=$((n2,$s)=>{"use strict";var gx=V0(),js=new WeakMap,K0=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,i=0,n=t.displayName||t.name||"<anonymous>",s=function(...o){if(js.set(s,++i),i===1)r=t.apply(this,o),t=null;else if(e.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return r};return gx(s,t),js.set(s,i),s};$s.exports=K0;$s.exports.default=K0;$s.exports.callCount=t=>{if(!js.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return js.get(t)}});var J0=$(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.SIGNALS=void 0;var yx=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];Hs.SIGNALS=yx});var Il=$(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.SIGRTMAX=vi.getRealtimeSignals=void 0;var Ex=function(){let t=Q0-X0+1;return Array.from({length:t},Dx)};vi.getRealtimeSignals=Ex;var Dx=function(t,e){return{name:`SIGRT${e+1}`,number:X0+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},X0=34,Q0=64;vi.SIGRTMAX=Q0});var eg=$(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.getSignals=void 0;var bx=require("os"),_x=J0(),wx=Il(),Sx=function(){let t=(0,wx.getRealtimeSignals)();return[..._x.SIGNALS,...t].map(Ax)};qs.getSignals=Sx;var Ax=function({name:t,number:e,description:r,action:i,forced:n=!1,standard:s}){let{signals:{[t]:o}}=bx.constants,a=o!==void 0;return{name:t,number:a?o:e,description:r,supported:a,action:i,forced:n,standard:s}}});var rg=$(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.signalsByNumber=Ci.signalsByName=void 0;var vx=require("os"),tg=eg(),Cx=Il(),xx=function(){return(0,tg.getSignals)().reduce(Rx,{})},Rx=function(t,{name:e,number:r,description:i,supported:n,action:s,forced:o,standard:a}){return{...t,[e]:{name:e,number:r,description:i,supported:n,action:s,forced:o,standard:a}}},Fx=xx();Ci.signalsByName=Fx;var Ox=function(){let t=(0,tg.getSignals)(),e=Cx.SIGRTMAX+1,r=Array.from({length:e},(i,n)=>kx(n,t));return Object.assign({},...r)},kx=function(t,e){let r=Tx(t,e);if(r===void 0)return{};let{name:i,description:n,supported:s,action:o,forced:a,standard:u}=r;return{[t]:{name:i,number:t,description:n,supported:s,action:o,forced:a,standard:u}}},Tx=function(t,e){let r=e.find(({name:i})=>vx.constants.signals[i]===t);return r!==void 0?r:e.find(i=>i.number===t)},Lx=Ox();Ci.signalsByNumber=Lx});var ng=$((l2,ig)=>{"use strict";var{signalsByName:Bx}=rg(),Px=({timedOut:t,timeout:e,errorCode:r,signal:i,signalDescription:n,exitCode:s,isCanceled:o})=>t?`timed out after ${e} milliseconds`:o?"was canceled":r!==void 0?`failed with ${r}`:i!==void 0?`was killed with ${i} (${n})`:s!==void 0?`failed with exit code ${s}`:"failed",Ix=({stdout:t,stderr:e,all:r,error:i,signal:n,exitCode:s,command:o,escapedCommand:a,timedOut:u,isCanceled:l,killed:c,parsed:{options:{timeout:f}}})=>{s=s===null?void 0:s,n=n===null?void 0:n;let h=n===void 0?void 0:Bx[n].description,p=i&&i.code,y=`Command ${Px({timedOut:u,timeout:f,errorCode:p,signal:n,signalDescription:h,exitCode:s,isCanceled:l})}: ${o}`,E=Object.prototype.toString.call(i)==="[object Error]",v=E?`${y}
6
+ ${i.message}`:y,F=[v,e,t].filter(Boolean).join(`
7
+ `);return E?(i.originalMessage=i.message,i.message=F):i=new Error(F),i.shortMessage=v,i.command=o,i.escapedCommand=a,i.exitCode=s,i.signal=n,i.signalDescription=h,i.stdout=t,i.stderr=e,r!==void 0&&(i.all=r),"bufferedData"in i&&delete i.bufferedData,i.failed=!0,i.timedOut=!!u,i.isCanceled=l,i.killed=c&&!u,i};ig.exports=Ix});var og=$((c2,Nl)=>{"use strict";var Us=["stdin","stdout","stderr"],Nx=t=>Us.some(e=>t[e]!==void 0),sg=t=>{if(!t)return;let{stdio:e}=t;if(e===void 0)return Us.map(i=>t[i]);if(Nx(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Us.map(i=>`\`${i}\``).join(", ")}`);if(typeof e=="string")return e;if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);let r=Math.max(e.length,Us.length);return Array.from({length:r},(i,n)=>e[n])};Nl.exports=sg;Nl.exports.node=t=>{let e=sg(t);return e==="ipc"?"ipc":e===void 0||typeof e=="string"?[e,e,e,"ipc"]:e.includes("ipc")?e:[...e,"ipc"]}});var ag=$((h2,Gs)=>{Gs.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Gs.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Gs.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var fg=$((f2,Fi)=>{var ye=global.process,Hr=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};Hr(ye)?(ug=require("assert"),xi=ag(),lg=/^win/i.test(ye.platform),Sn=require("events"),typeof Sn!="function"&&(Sn=Sn.EventEmitter),ye.__signal_exit_emitter__?xe=ye.__signal_exit_emitter__:(xe=ye.__signal_exit_emitter__=new Sn,xe.count=0,xe.emitted={}),xe.infinite||(xe.setMaxListeners(1/0),xe.infinite=!0),Fi.exports=function(t,e){if(!Hr(global.process))return function(){};ug.equal(typeof t,"function","a callback must be provided for exit handler"),Ri===!1&&Ml();var r="exit";e&&e.alwaysLast&&(r="afterexit");var i=function(){xe.removeListener(r,t),xe.listeners("exit").length===0&&xe.listeners("afterexit").length===0&&zs()};return xe.on(r,t),i},zs=function(){!Ri||!Hr(global.process)||(Ri=!1,xi.forEach(function(e){try{ye.removeListener(e,Ws[e])}catch{}}),ye.emit=Ys,ye.reallyExit=jl,xe.count-=1)},Fi.exports.unload=zs,qr=function(e,r,i){xe.emitted[e]||(xe.emitted[e]=!0,xe.emit(e,r,i))},Ws={},xi.forEach(function(t){Ws[t]=function(){if(Hr(global.process)){var r=ye.listeners(t);r.length===xe.count&&(zs(),qr("exit",null,t),qr("afterexit",null,t),lg&&t==="SIGHUP"&&(t="SIGINT"),ye.kill(ye.pid,t))}}}),Fi.exports.signals=function(){return xi},Ri=!1,Ml=function(){Ri||!Hr(global.process)||(Ri=!0,xe.count+=1,xi=xi.filter(function(e){try{return ye.on(e,Ws[e]),!0}catch{return!1}}),ye.emit=hg,ye.reallyExit=cg)},Fi.exports.load=Ml,jl=ye.reallyExit,cg=function(e){Hr(global.process)&&(ye.exitCode=e||0,qr("exit",ye.exitCode,null),qr("afterexit",ye.exitCode,null),jl.call(ye,ye.exitCode))},Ys=ye.emit,hg=function(e,r){if(e==="exit"&&Hr(global.process)){r!==void 0&&(ye.exitCode=r);var i=Ys.apply(this,arguments);return qr("exit",ye.exitCode,null),qr("afterexit",ye.exitCode,null),i}else return Ys.apply(this,arguments)}):Fi.exports=function(){return function(){}};var ug,xi,lg,Sn,xe,zs,qr,Ws,Ri,Ml,jl,cg,Ys,hg});var dg=$((p2,pg)=>{"use strict";var Mx=require("os"),jx=fg(),$x=1e3*5,Hx=(t,e="SIGTERM",r={})=>{let i=t(e);return qx(t,e,r,i),i},qx=(t,e,r,i)=>{if(!Ux(e,r,i))return;let n=zx(r),s=setTimeout(()=>{t("SIGKILL")},n);s.unref&&s.unref()},Ux=(t,{forceKillAfterTimeout:e},r)=>Gx(t)&&e!==!1&&r,Gx=t=>t===Mx.constants.signals.SIGTERM||typeof t=="string"&&t.toUpperCase()==="SIGTERM",zx=({forceKillAfterTimeout:t=!0})=>{if(t===!0)return $x;if(!Number.isFinite(t)||t<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`);return t},Wx=(t,e)=>{t.kill()&&(e.isCanceled=!0)},Yx=(t,e,r)=>{t.kill(e),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:e}))},Vx=(t,{timeout:e,killSignal:r="SIGTERM"},i)=>{if(e===0||e===void 0)return i;let n,s=new Promise((a,u)=>{n=setTimeout(()=>{Yx(t,r,u)},e)}),o=i.finally(()=>{clearTimeout(n)});return Promise.race([s,o])},Kx=({timeout:t})=>{if(t!==void 0&&(!Number.isFinite(t)||t<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`)},Zx=async(t,{cleanup:e,detached:r},i)=>{if(!e||r)return i;let n=jx(()=>{t.kill()});return i.finally(()=>{n()})};pg.exports={spawnedKill:Hx,spawnedCancel:Wx,setupTimeout:Vx,validateTimeout:Kx,setExitHandler:Zx}});var gg=$((d2,mg)=>{"use strict";var At=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";At.writable=t=>At(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";At.readable=t=>At(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";At.duplex=t=>At.writable(t)&&At.readable(t);At.transform=t=>At.duplex(t)&&typeof t._transform=="function";mg.exports=At});var Eg=$((m2,yg)=>{"use strict";var{PassThrough:Jx}=require("stream");yg.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,i=r==="buffer",n=!1;e?n=!(r||i):r=r||"utf8",i&&(r=null);let s=new Jx({objectMode:n});r&&s.setEncoding(r);let o=0,a=[];return s.on("data",u=>{a.push(u),n?o=a.length:o+=u.length}),s.getBufferedValue=()=>e?a:i?Buffer.concat(a,o):a.join(""),s.getBufferedLength=()=>o,s}});var Dg=$((g2,An)=>{"use strict";var{constants:Xx}=require("buffer"),Qx=require("stream"),{promisify:eR}=require("util"),tR=Eg(),rR=eR(Qx.pipeline),Vs=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function $l(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,i=tR(e);return await new Promise((n,s)=>{let o=a=>{a&&i.getBufferedLength()<=Xx.MAX_LENGTH&&(a.bufferedData=i.getBufferedValue()),s(a)};(async()=>{try{await rR(t,i),n()}catch(a){o(a)}})(),i.on("data",()=>{i.getBufferedLength()>r&&o(new Vs)})}),i.getBufferedValue()}An.exports=$l;An.exports.buffer=(t,e)=>$l(t,{...e,encoding:"buffer"});An.exports.array=(t,e)=>$l(t,{...e,array:!0});An.exports.MaxBufferError=Vs});var _g=$((y2,bg)=>{"use strict";var{PassThrough:iR}=require("stream");bg.exports=function(){var t=[],e=new iR({objectMode:!0});return e.setMaxListeners(0),e.add=r,e.isEmpty=i,e.on("unpipe",n),Array.prototype.slice.call(arguments).forEach(r),e;function r(s){return Array.isArray(s)?(s.forEach(r),this):(t.push(s),s.once("end",n.bind(null,s)),s.once("error",e.emit.bind(e,"error")),s.pipe(e,{end:!1}),this)}function i(){return t.length==0}function n(s){t=t.filter(function(o){return o!==s}),!t.length&&e.readable&&e.end()}}});var vg=$((E2,Ag)=>{"use strict";var Sg=gg(),wg=Dg(),nR=_g(),sR=(t,e)=>{e===void 0||t.stdin===void 0||(Sg(e)?e.pipe(t.stdin):t.stdin.end(e))},oR=(t,{all:e})=>{if(!e||!t.stdout&&!t.stderr)return;let r=nR();return t.stdout&&r.add(t.stdout),t.stderr&&r.add(t.stderr),r},Hl=async(t,e)=>{if(t){t.destroy();try{return await e}catch(r){return r.bufferedData}}},ql=(t,{encoding:e,buffer:r,maxBuffer:i})=>{if(!(!t||!r))return e?wg(t,{encoding:e,maxBuffer:i}):wg.buffer(t,{maxBuffer:i})},aR=async({stdout:t,stderr:e,all:r},{encoding:i,buffer:n,maxBuffer:s},o)=>{let a=ql(t,{encoding:i,buffer:n,maxBuffer:s}),u=ql(e,{encoding:i,buffer:n,maxBuffer:s}),l=ql(r,{encoding:i,buffer:n,maxBuffer:s*2});try{return await Promise.all([o,a,u,l])}catch(c){return Promise.all([{error:c,signal:c.signal,timedOut:c.timedOut},Hl(t,a),Hl(e,u),Hl(r,l)])}},uR=({input:t})=>{if(Sg(t))throw new TypeError("The `input` option cannot be a stream in sync mode")};Ag.exports={handleInput:sR,makeAllStream:oR,getSpawnedResult:aR,validateInputSync:uR}});var xg=$((D2,Cg)=>{"use strict";var lR=(async()=>{})().constructor.prototype,cR=["then","catch","finally"].map(t=>[t,Reflect.getOwnPropertyDescriptor(lR,t)]),hR=(t,e)=>{for(let[r,i]of cR){let n=typeof e=="function"?(...s)=>Reflect.apply(i.value,e(),s):i.value.bind(e);Reflect.defineProperty(t,r,{...i,value:n})}return t},fR=t=>new Promise((e,r)=>{t.on("exit",(i,n)=>{e({exitCode:i,signal:n})}),t.on("error",i=>{r(i)}),t.stdin&&t.stdin.on("error",i=>{r(i)})});Cg.exports={mergePromise:hR,getSpawnedPromise:fR}});var Og=$((b2,Fg)=>{"use strict";var Rg=(t,e=[])=>Array.isArray(e)?[t,...e]:[t],pR=/^[\w.-]+$/,dR=/"/g,mR=t=>typeof t!="string"||pR.test(t)?t:`"${t.replace(dR,'\\"')}"`,gR=(t,e)=>Rg(t,e).join(" "),yR=(t,e)=>Rg(t,e).map(r=>mR(r)).join(" "),ER=/ +/g,DR=t=>{let e=[];for(let r of t.trim().split(ER)){let i=e[e.length-1];i&&i.endsWith("\\")?e[e.length-1]=`${i.slice(0,-1)} ${r}`:e.push(r)}return e};Fg.exports={joinCommand:gR,getEscapedCommand:yR,parseCommand:DR}});var ki=$((_2,Oi)=>{"use strict";var bR=require("path"),Ul=require("child_process"),_R=H0(),wR=U0(),SR=W0(),AR=Z0(),Ks=ng(),Tg=og(),{spawnedKill:vR,spawnedCancel:CR,setupTimeout:xR,validateTimeout:RR,setExitHandler:FR}=dg(),{handleInput:OR,getSpawnedResult:kR,makeAllStream:TR,validateInputSync:LR}=vg(),{mergePromise:kg,getSpawnedPromise:BR}=xg(),{joinCommand:Lg,parseCommand:Bg,getEscapedCommand:Pg}=Og(),PR=1e3*1e3*100,IR=({env:t,extendEnv:e,preferLocal:r,localDir:i,execPath:n})=>{let s=e?{...process.env,...t}:t;return r?SR.env({env:s,cwd:i,execPath:n}):s},Ig=(t,e,r={})=>{let i=_R._parse(t,e,r);return t=i.command,e=i.args,r=i.options,r={maxBuffer:PR,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:r.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...r},r.env=IR(r),r.stdio=Tg(r),process.platform==="win32"&&bR.basename(t,".exe")==="cmd"&&e.unshift("/q"),{file:t,args:e,options:r,parsed:i}},vn=(t,e,r)=>typeof e!="string"&&!Buffer.isBuffer(e)?r===void 0?void 0:"":t.stripFinalNewline?wR(e):e,Zs=(t,e,r)=>{let i=Ig(t,e,r),n=Lg(t,e),s=Pg(t,e);RR(i.options);let o;try{o=Ul.spawn(i.file,i.args,i.options)}catch(p){let g=new Ul.ChildProcess,y=Promise.reject(Ks({error:p,stdout:"",stderr:"",all:"",command:n,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1}));return kg(g,y)}let a=BR(o),u=xR(o,i.options,a),l=FR(o,i.options,u),c={isCanceled:!1};o.kill=vR.bind(null,o.kill.bind(o)),o.cancel=CR.bind(null,o,c);let h=AR(async()=>{let[{error:p,exitCode:g,signal:y,timedOut:E},v,F,O]=await kR(o,i.options,l),R=vn(i.options,v),x=vn(i.options,F),L=vn(i.options,O);if(p||g!==0||y!==null){let b=Ks({error:p,exitCode:g,signal:y,stdout:R,stderr:x,all:L,command:n,escapedCommand:s,parsed:i,timedOut:E,isCanceled:c.isCanceled,killed:o.killed});if(!i.options.reject)return b;throw b}return{command:n,escapedCommand:s,exitCode:0,stdout:R,stderr:x,all:L,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return OR(o,i.options.input),o.all=TR(o,i.options),kg(o,h)};Oi.exports=Zs;Oi.exports.sync=(t,e,r)=>{let i=Ig(t,e,r),n=Lg(t,e),s=Pg(t,e);LR(i.options);let o;try{o=Ul.spawnSync(i.file,i.args,i.options)}catch(l){throw Ks({error:l,stdout:"",stderr:"",all:"",command:n,escapedCommand:s,parsed:i,timedOut:!1,isCanceled:!1,killed:!1})}let a=vn(i.options,o.stdout,o.error),u=vn(i.options,o.stderr,o.error);if(o.error||o.status!==0||o.signal!==null){let l=Ks({stdout:a,stderr:u,error:o.error,signal:o.signal,exitCode:o.status,command:n,escapedCommand:s,parsed:i,timedOut:o.error&&o.error.code==="ETIMEDOUT",isCanceled:!1,killed:o.signal!==null});if(!i.options.reject)return l;throw l}return{command:n,escapedCommand:s,exitCode:0,stdout:a,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}};Oi.exports.command=(t,e)=>{let[r,...i]=Bg(t);return Zs(r,i,e)};Oi.exports.commandSync=(t,e)=>{let[r,...i]=Bg(t);return Zs.sync(r,i,e)};Oi.exports.node=(t,e,r={})=>{e&&!Array.isArray(e)&&typeof e=="object"&&(r=e,e=[]);let i=Tg.node(r),n=process.execArgv.filter(a=>!a.startsWith("--inspect")),{nodePath:s=process.execPath,nodeOptions:o=n}=r;return Zs(s,[...o,t,...Array.isArray(e)?e:[]],{...r,stdin:void 0,stdout:void 0,stderr:void 0,stdio:i,shell:!1})}});var Ti=$((C2,Hg)=>{"use strict";var $g=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);Hg.exports=t=>t?Object.keys(t).map(e=>[$g.has(e)?$g.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var ro=$((x2,Zg)=>{"use strict";var qg=typeof process=="object"&&process?process:{stdout:null,stderr:null},HR=require("events"),Ug=require("stream"),Gg=require("string_decoder").StringDecoder,qt=Symbol("EOF"),Ut=Symbol("maybeEmitEnd"),dr=Symbol("emittedEnd"),Js=Symbol("emittingEnd"),Cn=Symbol("emittedError"),Xs=Symbol("closed"),zg=Symbol("read"),Qs=Symbol("flush"),Wg=Symbol("flushChunk"),ze=Symbol("encoding"),Gt=Symbol("decoder"),eo=Symbol("flowing"),xn=Symbol("paused"),Li=Symbol("resume"),_e=Symbol("buffer"),vt=Symbol("pipes"),Re=Symbol("bufferLength"),Wl=Symbol("bufferPush"),Yl=Symbol("bufferShift"),Be=Symbol("objectMode"),Pe=Symbol("destroyed"),Vl=Symbol("emitData"),Yg=Symbol("emitEnd"),Kl=Symbol("emitEnd2"),zt=Symbol("async"),Rn=t=>Promise.resolve().then(t),Vg=global._MP_NO_ITERATOR_SYMBOLS_!=="1",qR=Vg&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),UR=Vg&&Symbol.iterator||Symbol("iterator not implemented"),GR=t=>t==="end"||t==="finish"||t==="prefinish",zR=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,WR=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),to=class{constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[Li](),r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Zl=class extends to{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,i){super(e,r,i),this.proxyErrors=n=>r.emit("error",n),e.on("error",this.proxyErrors)}};Zg.exports=class Kg extends Ug{constructor(e){super(),this[eo]=!1,this[xn]=!1,this[vt]=[],this[_e]=[],this[Be]=e&&e.objectMode||!1,this[Be]?this[ze]=null:this[ze]=e&&e.encoding||null,this[ze]==="buffer"&&(this[ze]=null),this[zt]=e&&!!e.async||!1,this[Gt]=this[ze]?new Gg(this[ze]):null,this[qt]=!1,this[dr]=!1,this[Js]=!1,this[Xs]=!1,this[Cn]=null,this.writable=!0,this.readable=!0,this[Re]=0,this[Pe]=!1,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[_e]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[vt]})}get bufferLength(){return this[Re]}get encoding(){return this[ze]}set encoding(e){if(this[Be])throw new Error("cannot set encoding in objectMode");if(this[ze]&&e!==this[ze]&&(this[Gt]&&this[Gt].lastNeed||this[Re]))throw new Error("cannot change encoding");this[ze]!==e&&(this[Gt]=e?new Gg(e):null,this[_e].length&&(this[_e]=this[_e].map(r=>this[Gt].write(r)))),this[ze]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Be]}set objectMode(e){this[Be]=this[Be]||!!e}get async(){return this[zt]}set async(e){this[zt]=this[zt]||!!e}write(e,r,i){if(this[qt])throw new Error("write after end");if(this[Pe])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[zt]?Rn:s=>s();return!this[Be]&&!Buffer.isBuffer(e)&&(WR(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):zR(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[Be]?(this.flowing&&this[Re]!==0&&this[Qs](!0),this.flowing?this.emit("data",e):this[Wl](e),this[Re]!==0&&this.emit("readable"),i&&n(i),this.flowing):e.length?(typeof e=="string"&&!(r===this[ze]&&!this[Gt].lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[ze]&&(e=this[Gt].write(e)),this.flowing&&this[Re]!==0&&this[Qs](!0),this.flowing?this.emit("data",e):this[Wl](e),this[Re]!==0&&this.emit("readable"),i&&n(i),this.flowing):(this[Re]!==0&&this.emit("readable"),i&&n(i),this.flowing)}read(e){if(this[Pe])return null;if(this[Re]===0||e===0||e>this[Re])return this[Ut](),null;this[Be]&&(e=null),this[_e].length>1&&!this[Be]&&(this.encoding?this[_e]=[this[_e].join("")]:this[_e]=[Buffer.concat(this[_e],this[Re])]);let r=this[zg](e||null,this[_e][0]);return this[Ut](),r}[zg](e,r){return e===r.length||e===null?this[Yl]():(this[_e][0]=r.slice(e),r=r.slice(0,e),this[Re]-=e),this.emit("data",r),!this[_e].length&&!this[qt]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=null),typeof r=="function"&&(i=r,r="utf8"),e&&this.write(e,r),i&&this.once("end",i),this[qt]=!0,this.writable=!1,(this.flowing||!this[xn])&&this[Ut](),this}[Li](){this[Pe]||(this[xn]=!1,this[eo]=!0,this.emit("resume"),this[_e].length?this[Qs]():this[qt]?this[Ut]():this.emit("drain"))}resume(){return this[Li]()}pause(){this[eo]=!1,this[xn]=!0}get destroyed(){return this[Pe]}get flowing(){return this[eo]}get paused(){return this[xn]}[Wl](e){this[Be]?this[Re]+=1:this[Re]+=e.length,this[_e].push(e)}[Yl](){return this[_e].length&&(this[Be]?this[Re]-=1:this[Re]-=this[_e][0].length),this[_e].shift()}[Qs](e){do;while(this[Wg](this[Yl]()));!e&&!this[_e].length&&!this[qt]&&this.emit("drain")}[Wg](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,r){if(this[Pe])return;let i=this[dr];return r=r||{},e===qg.stdout||e===qg.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[vt].push(r.proxyErrors?new Zl(this,e,r):new to(this,e,r)),this[zt]?Rn(()=>this[Li]()):this[Li]()),e}unpipe(e){let r=this[vt].find(i=>i.dest===e);r&&(this[vt].splice(this[vt].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);return e==="data"&&!this[vt].length&&!this.flowing?this[Li]():e==="readable"&&this[Re]!==0?super.emit("readable"):GR(e)&&this[dr]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[Cn]&&(this[zt]?Rn(()=>r.call(this,this[Cn])):r.call(this,this[Cn])),i}get emittedEnd(){return this[dr]}[Ut](){!this[Js]&&!this[dr]&&!this[Pe]&&this[_e].length===0&&this[qt]&&(this[Js]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Xs]&&this.emit("close"),this[Js]=!1)}emit(e,r,...i){if(e!=="error"&&e!=="close"&&e!==Pe&&this[Pe])return;if(e==="data")return r?this[zt]?Rn(()=>this[Vl](r)):this[Vl](r):!1;if(e==="end")return this[Yg]();if(e==="close"){if(this[Xs]=!0,!this[dr]&&!this[Pe])return;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Cn]=r;let s=super.emit("error",r);return this[Ut](),s}else if(e==="resume"){let s=super.emit("resume");return this[Ut](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,r,...i);return this[Ut](),n}[Vl](e){for(let i of this[vt])i.dest.write(e)===!1&&this.pause();let r=super.emit("data",e);return this[Ut](),r}[Yg](){this[dr]||(this[dr]=!0,this.readable=!1,this[zt]?Rn(()=>this[Kl]()):this[Kl]())}[Kl](){if(this[Gt]){let r=this[Gt].end();if(r){for(let i of this[vt])i.dest.write(r);super.emit("data",r)}}for(let r of this[vt])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[Be]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[Be]||(e.dataLength+=i.length)}),r.then(()=>e)}concat(){return this[Be]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[Be]?Promise.reject(new Error("cannot concat in objectMode")):this[ze]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,r)=>{this.on(Pe,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[qR](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[qt])return Promise.resolve({done:!0});let i=null,n=null,s=l=>{this.removeListener("data",o),this.removeListener("end",a),n(l)},o=l=>{this.removeListener("error",s),this.removeListener("end",a),this.pause(),i({value:l,done:!!this[qt]})},a=()=>{this.removeListener("error",s),this.removeListener("data",o),i({done:!0})},u=()=>s(new Error("stream destroyed"));return new Promise((l,c)=>{n=c,i=l,this.once(Pe,u),this.once("error",s),this.once("end",a),this.once("data",o)})}}}[UR](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(e){return this[Pe]?(e?this.emit("error",e):this.emit(Pe),this):(this[Pe]=!0,this[_e].length=0,this[Re]=0,typeof this.close=="function"&&!this[Xs]&&this.close(),e?this.emit("error",e):this.emit(Pe),this)}static isStream(e){return!!e&&(e instanceof Kg||e instanceof Ug||e instanceof HR&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var Xg=$((R2,Jg)=>{var YR=require("zlib").constants||{ZLIB_VERNUM:4736};Jg.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},YR))});var rc=$((F2,ay)=>{"use strict";var Qg=typeof process=="object"&&process?process:{stdout:null,stderr:null},VR=require("events"),ey=require("stream"),ty=require("string_decoder").StringDecoder,Wt=Symbol("EOF"),Yt=Symbol("maybeEmitEnd"),mr=Symbol("emittedEnd"),io=Symbol("emittingEnd"),Fn=Symbol("emittedError"),no=Symbol("closed"),ry=Symbol("read"),so=Symbol("flush"),iy=Symbol("flushChunk"),We=Symbol("encoding"),Vt=Symbol("decoder"),oo=Symbol("flowing"),On=Symbol("paused"),Bi=Symbol("resume"),Fe=Symbol("bufferLength"),Jl=Symbol("bufferPush"),Xl=Symbol("bufferShift"),Ie=Symbol("objectMode"),Ne=Symbol("destroyed"),Ql=Symbol("emitData"),ny=Symbol("emitEnd"),ec=Symbol("emitEnd2"),Kt=Symbol("async"),kn=t=>Promise.resolve().then(t),sy=global._MP_NO_ITERATOR_SYMBOLS_!=="1",KR=sy&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),ZR=sy&&Symbol.iterator||Symbol("iterator not implemented"),JR=t=>t==="end"||t==="finish"||t==="prefinish",XR=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,QR=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),ao=class{constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[Bi](),r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},tc=class extends ao{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,i){super(e,r,i),this.proxyErrors=n=>r.emit("error",n),e.on("error",this.proxyErrors)}};ay.exports=class oy extends ey{constructor(e){super(),this[oo]=!1,this[On]=!1,this.pipes=[],this.buffer=[],this[Ie]=e&&e.objectMode||!1,this[Ie]?this[We]=null:this[We]=e&&e.encoding||null,this[We]==="buffer"&&(this[We]=null),this[Kt]=e&&!!e.async||!1,this[Vt]=this[We]?new ty(this[We]):null,this[Wt]=!1,this[mr]=!1,this[io]=!1,this[no]=!1,this[Fn]=null,this.writable=!0,this.readable=!0,this[Fe]=0,this[Ne]=!1}get bufferLength(){return this[Fe]}get encoding(){return this[We]}set encoding(e){if(this[Ie])throw new Error("cannot set encoding in objectMode");if(this[We]&&e!==this[We]&&(this[Vt]&&this[Vt].lastNeed||this[Fe]))throw new Error("cannot change encoding");this[We]!==e&&(this[Vt]=e?new ty(e):null,this.buffer.length&&(this.buffer=this.buffer.map(r=>this[Vt].write(r)))),this[We]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Ie]}set objectMode(e){this[Ie]=this[Ie]||!!e}get async(){return this[Kt]}set async(e){this[Kt]=this[Kt]||!!e}write(e,r,i){if(this[Wt])throw new Error("write after end");if(this[Ne])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[Kt]?kn:s=>s();return!this[Ie]&&!Buffer.isBuffer(e)&&(QR(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):XR(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[Ie]?(this.flowing&&this[Fe]!==0&&this[so](!0),this.flowing?this.emit("data",e):this[Jl](e),this[Fe]!==0&&this.emit("readable"),i&&n(i),this.flowing):e.length?(typeof e=="string"&&!(r===this[We]&&!this[Vt].lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[We]&&(e=this[Vt].write(e)),this.flowing&&this[Fe]!==0&&this[so](!0),this.flowing?this.emit("data",e):this[Jl](e),this[Fe]!==0&&this.emit("readable"),i&&n(i),this.flowing):(this[Fe]!==0&&this.emit("readable"),i&&n(i),this.flowing)}read(e){if(this[Ne])return null;if(this[Fe]===0||e===0||e>this[Fe])return this[Yt](),null;this[Ie]&&(e=null),this.buffer.length>1&&!this[Ie]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[Fe])]);let r=this[ry](e||null,this.buffer[0]);return this[Yt](),r}[ry](e,r){return e===r.length||e===null?this[Xl]():(this.buffer[0]=r.slice(e),r=r.slice(0,e),this[Fe]-=e),this.emit("data",r),!this.buffer.length&&!this[Wt]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=null),typeof r=="function"&&(i=r,r="utf8"),e&&this.write(e,r),i&&this.once("end",i),this[Wt]=!0,this.writable=!1,(this.flowing||!this[On])&&this[Yt](),this}[Bi](){this[Ne]||(this[On]=!1,this[oo]=!0,this.emit("resume"),this.buffer.length?this[so]():this[Wt]?this[Yt]():this.emit("drain"))}resume(){return this[Bi]()}pause(){this[oo]=!1,this[On]=!0}get destroyed(){return this[Ne]}get flowing(){return this[oo]}get paused(){return this[On]}[Jl](e){this[Ie]?this[Fe]+=1:this[Fe]+=e.length,this.buffer.push(e)}[Xl](){return this.buffer.length&&(this[Ie]?this[Fe]-=1:this[Fe]-=this.buffer[0].length),this.buffer.shift()}[so](e){do;while(this[iy](this[Xl]()));!e&&!this.buffer.length&&!this[Wt]&&this.emit("drain")}[iy](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,r){if(this[Ne])return;let i=this[mr];return r=r||{},e===Qg.stdout||e===Qg.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this.pipes.push(r.proxyErrors?new tc(this,e,r):new ao(this,e,r)),this[Kt]?kn(()=>this[Bi]()):this[Bi]()),e}unpipe(e){let r=this.pipes.find(i=>i.dest===e);r&&(this.pipes.splice(this.pipes.indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);return e==="data"&&!this.pipes.length&&!this.flowing?this[Bi]():e==="readable"&&this[Fe]!==0?super.emit("readable"):JR(e)&&this[mr]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[Fn]&&(this[Kt]?kn(()=>r.call(this,this[Fn])):r.call(this,this[Fn])),i}get emittedEnd(){return this[mr]}[Yt](){!this[io]&&!this[mr]&&!this[Ne]&&this.buffer.length===0&&this[Wt]&&(this[io]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[no]&&this.emit("close"),this[io]=!1)}emit(e,r,...i){if(e!=="error"&&e!=="close"&&e!==Ne&&this[Ne])return;if(e==="data")return r?this[Kt]?kn(()=>this[Ql](r)):this[Ql](r):!1;if(e==="end")return this[ny]();if(e==="close"){if(this[no]=!0,!this[mr]&&!this[Ne])return;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Fn]=r;let s=super.emit("error",r);return this[Yt](),s}else if(e==="resume"){let s=super.emit("resume");return this[Yt](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,r,...i);return this[Yt](),n}[Ql](e){for(let i of this.pipes)i.dest.write(e)===!1&&this.pause();let r=super.emit("data",e);return this[Yt](),r}[ny](){this[mr]||(this[mr]=!0,this.readable=!1,this[Kt]?kn(()=>this[ec]()):this[ec]())}[ec](){if(this[Vt]){let r=this[Vt].end();if(r){for(let i of this.pipes)i.dest.write(r);super.emit("data",r)}}for(let r of this.pipes)r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[Ie]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[Ie]||(e.dataLength+=i.length)}),r.then(()=>e)}concat(){return this[Ie]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[Ie]?Promise.reject(new Error("cannot concat in objectMode")):this[We]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,r)=>{this.on(Ne,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[KR](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[Wt])return Promise.resolve({done:!0});let i=null,n=null,s=l=>{this.removeListener("data",o),this.removeListener("end",a),n(l)},o=l=>{this.removeListener("error",s),this.removeListener("end",a),this.pause(),i({value:l,done:!!this[Wt]})},a=()=>{this.removeListener("error",s),this.removeListener("data",o),i({done:!0})},u=()=>s(new Error("stream destroyed"));return new Promise((l,c)=>{n=c,i=l,this.once(Ne,u),this.once("error",s),this.once("end",a),this.once("data",o)})}}}[ZR](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(e){return this[Ne]?(e?this.emit("error",e):this.emit(Ne),this):(this[Ne]=!0,this.buffer.length=0,this[Fe]=0,typeof this.close=="function"&&!this[no]&&this.close(),e?this.emit("error",e):this.emit(Ne),this)}static isStream(e){return!!e&&(e instanceof oy||e instanceof ey||e instanceof VR&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var Ec=$(Xe=>{"use strict";var ac=require("assert"),gr=require("buffer").Buffer,cy=require("zlib"),Ur=Xe.constants=Xg(),eF=rc(),uy=gr.concat,Gr=Symbol("_superWrite"),Ii=class extends Error{constructor(e){super("zlib: "+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},tF=Symbol("opts"),Tn=Symbol("flushFlag"),ly=Symbol("finishFlushFlag"),yc=Symbol("fullFlushFlag"),de=Symbol("handle"),uo=Symbol("onError"),Pi=Symbol("sawError"),ic=Symbol("level"),nc=Symbol("strategy"),sc=Symbol("ended"),O2=Symbol("_defaultFullFlush"),lo=class extends eF{constructor(e,r){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");super(e),this[Pi]=!1,this[sc]=!1,this[tF]=e,this[Tn]=e.flush,this[ly]=e.finishFlush;try{this[de]=new cy[r](e)}catch(i){throw new Ii(i)}this[uo]=i=>{this[Pi]||(this[Pi]=!0,this.close(),this.emit("error",i))},this[de].on("error",i=>this[uo](new Ii(i))),this.once("end",()=>this.close)}close(){this[de]&&(this[de].close(),this[de]=null,this.emit("close"))}reset(){if(!this[Pi])return ac(this[de],"zlib binding closed"),this[de].reset()}flush(e){this.ended||(typeof e!="number"&&(e=this[yc]),this.write(Object.assign(gr.alloc(0),{[Tn]:e})))}end(e,r,i){return e&&this.write(e,r),this.flush(this[ly]),this[sc]=!0,super.end(null,null,i)}get ended(){return this[sc]}write(e,r,i){if(typeof r=="function"&&(i=r,r="utf8"),typeof e=="string"&&(e=gr.from(e,r)),this[Pi])return;ac(this[de],"zlib binding closed");let n=this[de]._handle,s=n.close;n.close=()=>{};let o=this[de].close;this[de].close=()=>{},gr.concat=l=>l;let a;try{let l=typeof e[Tn]=="number"?e[Tn]:this[Tn];a=this[de]._processChunk(e,l),gr.concat=uy}catch(l){gr.concat=uy,this[uo](new Ii(l))}finally{this[de]&&(this[de]._handle=n,n.close=s,this[de].close=o,this[de].removeAllListeners("error"))}this[de]&&this[de].on("error",l=>this[uo](new Ii(l)));let u;if(a)if(Array.isArray(a)&&a.length>0){u=this[Gr](gr.from(a[0]));for(let l=1;l<a.length;l++)u=this[Gr](a[l])}else u=this[Gr](gr.from(a));return i&&i(),u}[Gr](e){return super.write(e)}},Zt=class extends lo{constructor(e,r){e=e||{},e.flush=e.flush||Ur.Z_NO_FLUSH,e.finishFlush=e.finishFlush||Ur.Z_FINISH,super(e,r),this[yc]=Ur.Z_FULL_FLUSH,this[ic]=e.level,this[nc]=e.strategy}params(e,r){if(!this[Pi]){if(!this[de])throw new Error("cannot switch params when binding is closed");if(!this[de].params)throw new Error("not supported in this implementation");if(this[ic]!==e||this[nc]!==r){this.flush(Ur.Z_SYNC_FLUSH),ac(this[de],"zlib binding closed");let i=this[de].flush;this[de].flush=(n,s)=>{this.flush(n),s()};try{this[de].params(e,r)}finally{this[de].flush=i}this[de]&&(this[ic]=e,this[nc]=r)}}}},uc=class extends Zt{constructor(e){super(e,"Deflate")}},lc=class extends Zt{constructor(e){super(e,"Inflate")}},oc=Symbol("_portable"),cc=class extends Zt{constructor(e){super(e,"Gzip"),this[oc]=e&&!!e.portable}[Gr](e){return this[oc]?(this[oc]=!1,e[9]=255,super[Gr](e)):super[Gr](e)}},hc=class extends Zt{constructor(e){super(e,"Gunzip")}},fc=class extends Zt{constructor(e){super(e,"DeflateRaw")}},pc=class extends Zt{constructor(e){super(e,"InflateRaw")}},dc=class extends Zt{constructor(e){super(e,"Unzip")}},co=class extends lo{constructor(e,r){e=e||{},e.flush=e.flush||Ur.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||Ur.BROTLI_OPERATION_FINISH,super(e,r),this[yc]=Ur.BROTLI_OPERATION_FLUSH}},mc=class extends co{constructor(e){super(e,"BrotliCompress")}},gc=class extends co{constructor(e){super(e,"BrotliDecompress")}};Xe.Deflate=uc;Xe.Inflate=lc;Xe.Gzip=cc;Xe.Gunzip=hc;Xe.DeflateRaw=fc;Xe.InflateRaw=pc;Xe.Unzip=dc;typeof cy.BrotliCompress=="function"?(Xe.BrotliCompress=mc,Xe.BrotliDecompress=gc):Xe.BrotliCompress=Xe.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var Ni=$((L2,hy)=>{var rF=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;hy.exports=rF!=="win32"?t=>t:t=>t&&t.replace(/\\/g,"/")});var ho=$((P2,fy)=>{"use strict";var iF=ro(),Dc=Ni(),bc=Symbol("slurp");fy.exports=class extends iF{constructor(e,r,i){switch(super(),this.pause(),this.extended=r,this.globalExtended=i,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=Dc(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=Dc(e.linkpath),this.uname=e.uname,this.gname=e.gname,r&&this[bc](r),i&&this[bc](i,!0)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");let i=this.remain,n=this.blockRemain;return this.remain=Math.max(0,i-r),this.blockRemain=Math.max(0,n-r),this.ignore?!0:i>=r?super.write(e):super.write(e.slice(0,i))}[bc](e,r){for(let i in e)e[i]!==null&&e[i]!==void 0&&!(r&&i==="path")&&(this[i]=i==="path"||i==="linkpath"?Dc(e[i]):e[i])}}});var _c=$(fo=>{"use strict";fo.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);fo.code=new Map(Array.from(fo.name).map(t=>[t[1],t[0]]))});var gy=$((N2,my)=>{"use strict";var nF=(t,e)=>{if(Number.isSafeInteger(t))t<0?oF(t,e):sF(t,e);else throw Error("cannot encode number outside of javascript safe integer range");return e},sF=(t,e)=>{e[0]=128;for(var r=e.length;r>1;r--)e[r-1]=t&255,t=Math.floor(t/256)},oF=(t,e)=>{e[0]=255;var r=!1;t=t*-1;for(var i=e.length;i>1;i--){var n=t&255;t=Math.floor(t/256),r?e[i-1]=py(n):n===0?e[i-1]=0:(r=!0,e[i-1]=dy(n))}},aF=t=>{let e=t[0],r=e===128?lF(t.slice(1,t.length)):e===255?uF(t):null;if(r===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(r))throw Error("parsed number outside of javascript safe integer range");return r},uF=t=>{for(var e=t.length,r=0,i=!1,n=e-1;n>-1;n--){var s=t[n],o;i?o=py(s):s===0?o=s:(i=!0,o=dy(s)),o!==0&&(r-=o*Math.pow(256,e-n-1))}return r},lF=t=>{for(var e=t.length,r=0,i=e-1;i>-1;i--){var n=t[i];n!==0&&(r+=n*Math.pow(256,e-i-1))}return r},py=t=>(255^t)&255,dy=t=>(255^t)+1&255;my.exports={encode:nF,parse:aF}});var ji=$((M2,Ey)=>{"use strict";var wc=_c(),Mi=require("path").posix,yy=gy(),Sc=Symbol("slurp"),Qe=Symbol("type"),Cc=class{constructor(e,r,i,n){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[Qe]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,r||0,i,n):e&&this.set(e)}decode(e,r,i,n){if(r||(r=0),!e||!(e.length>=r+512))throw new Error("need 512 bytes for header");if(this.path=zr(e,r,100),this.mode=yr(e,r+100,8),this.uid=yr(e,r+108,8),this.gid=yr(e,r+116,8),this.size=yr(e,r+124,12),this.mtime=Ac(e,r+136,12),this.cksum=yr(e,r+148,12),this[Sc](i),this[Sc](n,!0),this[Qe]=zr(e,r+156,1),this[Qe]===""&&(this[Qe]="0"),this[Qe]==="0"&&this.path.slice(-1)==="/"&&(this[Qe]="5"),this[Qe]==="5"&&(this.size=0),this.linkpath=zr(e,r+157,100),e.slice(r+257,r+265).toString()==="ustar\x0000")if(this.uname=zr(e,r+265,32),this.gname=zr(e,r+297,32),this.devmaj=yr(e,r+329,8),this.devmin=yr(e,r+337,8),e[r+475]!==0){let o=zr(e,r+345,155);this.path=o+"/"+this.path}else{let o=zr(e,r+345,130);o&&(this.path=o+"/"+this.path),this.atime=Ac(e,r+476,12),this.ctime=Ac(e,r+488,12)}let s=8*32;for(let o=r;o<r+148;o++)s+=e[o];for(let o=r+156;o<r+512;o++)s+=e[o];this.cksumValid=s===this.cksum,this.cksum===null&&s===8*32&&(this.nullBlock=!0)}[Sc](e,r){for(let i in e)e[i]!==null&&e[i]!==void 0&&!(r&&i==="path")&&(this[i]=e[i])}encode(e,r){if(e||(e=this.block=Buffer.alloc(512),r=0),r||(r=0),!(e.length>=r+512))throw new Error("need 512 bytes for header");let i=this.ctime||this.atime?130:155,n=cF(this.path||"",i),s=n[0],o=n[1];this.needPax=n[2],this.needPax=Wr(e,r,100,s)||this.needPax,this.needPax=Er(e,r+100,8,this.mode)||this.needPax,this.needPax=Er(e,r+108,8,this.uid)||this.needPax,this.needPax=Er(e,r+116,8,this.gid)||this.needPax,this.needPax=Er(e,r+124,12,this.size)||this.needPax,this.needPax=vc(e,r+136,12,this.mtime)||this.needPax,e[r+156]=this[Qe].charCodeAt(0),this.needPax=Wr(e,r+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",r+257,8),this.needPax=Wr(e,r+265,32,this.uname)||this.needPax,this.needPax=Wr(e,r+297,32,this.gname)||this.needPax,this.needPax=Er(e,r+329,8,this.devmaj)||this.needPax,this.needPax=Er(e,r+337,8,this.devmin)||this.needPax,this.needPax=Wr(e,r+345,i,o)||this.needPax,e[r+475]!==0?this.needPax=Wr(e,r+345,155,o)||this.needPax:(this.needPax=Wr(e,r+345,130,o)||this.needPax,this.needPax=vc(e,r+476,12,this.atime)||this.needPax,this.needPax=vc(e,r+488,12,this.ctime)||this.needPax);let a=8*32;for(let u=r;u<r+148;u++)a+=e[u];for(let u=r+156;u<r+512;u++)a+=e[u];return this.cksum=a,Er(e,r+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(e){for(let r in e)e[r]!==null&&e[r]!==void 0&&(this[r]=e[r])}get type(){return wc.name.get(this[Qe])||this[Qe]}get typeKey(){return this[Qe]}set type(e){wc.code.has(e)?this[Qe]=wc.code.get(e):this[Qe]=e}},cF=(t,e)=>{let i=t,n="",s,o=Mi.parse(t).root||".";if(Buffer.byteLength(i)<100)s=[i,n,!1];else{n=Mi.dirname(i),i=Mi.basename(i);do Buffer.byteLength(i)<=100&&Buffer.byteLength(n)<=e?s=[i,n,!1]:Buffer.byteLength(i)>100&&Buffer.byteLength(n)<=e?s=[i.slice(0,100-1),n,!0]:(i=Mi.join(Mi.basename(n),i),n=Mi.dirname(n));while(n!==o&&!s);s||(s=[t.slice(0,100-1),"",!0])}return s},zr=(t,e,r)=>t.slice(e,e+r).toString("utf8").replace(/\0.*/,""),Ac=(t,e,r)=>hF(yr(t,e,r)),hF=t=>t===null?null:new Date(t*1e3),yr=(t,e,r)=>t[e]&128?yy.parse(t.slice(e,e+r)):pF(t,e,r),fF=t=>isNaN(t)?null:t,pF=(t,e,r)=>fF(parseInt(t.slice(e,e+r).toString("utf8").replace(/\0.*$/,"").trim(),8)),dF={12:8589934591,8:2097151},Er=(t,e,r,i)=>i===null?!1:i>dF[r]||i<0?(yy.encode(i,t.slice(e,e+r)),!0):(mF(t,e,r,i),!1),mF=(t,e,r,i)=>t.write(gF(i,r),e,r,"ascii"),gF=(t,e)=>yF(Math.floor(t).toString(8),e),yF=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join("0")+t+" ")+"\0",vc=(t,e,r,i)=>i===null?!1:Er(t,e,r,i.getTime()/1e3),EF=new Array(156).join("\0"),Wr=(t,e,r,i)=>i===null?!1:(t.write(i+EF,e,r,"utf8"),i.length!==Buffer.byteLength(i)||i.length>r);Ey.exports=Cc});var po=$((j2,Dy)=>{"use strict";var DF=ji(),bF=require("path"),Ln=class{constructor(e,r){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=r||!1}encode(){let e=this.encodeBody();if(e==="")return null;let r=Buffer.byteLength(e),i=512*Math.ceil(1+r/512),n=Buffer.allocUnsafe(i);for(let s=0;s<512;s++)n[s]=0;new DF({path:("PaxHeader/"+bF.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:r,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(n),n.write(e,512,r,"utf8");for(let s=r+512;s<n.length;s++)n[s]=0;return n}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(e){if(this[e]===null||this[e]===void 0)return"";let r=this[e]instanceof Date?this[e].getTime()/1e3:this[e],i=" "+(e==="dev"||e==="ino"||e==="nlink"?"SCHILY.":"")+e+"="+r+`
8
+ `,n=Buffer.byteLength(i),s=Math.floor(Math.log(n)/Math.log(10))+1;return n+s>=Math.pow(10,s)&&(s+=1),s+n+i}};Ln.parse=(t,e,r)=>new Ln(_F(wF(t),e),r);var _F=(t,e)=>e?Object.keys(t).reduce((r,i)=>(r[i]=t[i],r),e):t,wF=t=>t.replace(/\n$/,"").split(`
9
+ `).reduce(SF,Object.create(null)),SF=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.slice((r+" ").length);let i=e.split("="),n=i.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!n)return t;let s=i.join("=");return t[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(s*1e3):/^[0-9]+$/.test(s)?+s:s,t};Dy.exports=Ln});var $i=$(($2,by)=>{by.exports=t=>{let e=t.length-1,r=-1;for(;e>-1&&t.charAt(e)==="/";)r=e,e--;return r===-1?t:t.slice(0,r)}});var mo=$((H2,_y)=>{"use strict";_y.exports=t=>class extends t{warn(e,r,i={}){this.file&&(i.file=this.file),this.cwd&&(i.cwd=this.cwd),i.code=r instanceof Error&&r.code||e,i.tarCode=e,!this.strict&&i.recoverable!==!1?(r instanceof Error&&(i=Object.assign(r,i),r=r.message),this.emit("warn",i.tarCode,r,i)):r instanceof Error?this.emit("error",Object.assign(r,i)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),i))}}});var Rc=$((U2,wy)=>{"use strict";var go=["|","<",">","?",":"],xc=go.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),AF=new Map(go.map((t,e)=>[t,xc[e]])),vF=new Map(xc.map((t,e)=>[t,go[e]]));wy.exports={encode:t=>go.reduce((e,r)=>e.split(r).join(AF.get(r)),t),decode:t=>xc.reduce((e,r)=>e.split(r).join(vF.get(r)),t)}});var Fc=$((G2,Ay)=>{var{isAbsolute:CF,parse:Sy}=require("path").win32;Ay.exports=t=>{let e="",r=Sy(t);for(;CF(t)||r.root;){let i=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":r.root;t=t.slice(i.length),e+=i,r=Sy(t)}return[e,t]}});var Cy=$((z2,vy)=>{"use strict";vy.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var jc=$((V2,$y)=>{"use strict";var Ly=ro(),By=po(),Py=ji(),xt=require("fs"),xy=require("path"),Ct=Ni(),xF=$i(),Iy=(t,e)=>e?(t=Ct(t).replace(/^\.(\/|$)/,""),xF(e)+"/"+t):Ct(t),RF=16*1024*1024,Ry=Symbol("process"),Fy=Symbol("file"),Oy=Symbol("directory"),kc=Symbol("symlink"),ky=Symbol("hardlink"),Bn=Symbol("header"),yo=Symbol("read"),Tc=Symbol("lstat"),Eo=Symbol("onlstat"),Lc=Symbol("onread"),Bc=Symbol("onreadlink"),Pc=Symbol("openfile"),Ic=Symbol("onopenfile"),Dr=Symbol("close"),Do=Symbol("mode"),Nc=Symbol("awaitDrain"),Oc=Symbol("ondrain"),Rt=Symbol("prefix"),Ty=Symbol("hadError"),Ny=mo(),FF=Rc(),My=Fc(),jy=Cy(),bo=Ny(class extends Ly{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=Ct(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||RF,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=Ct(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?Ct(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let i=!1;if(!this.preservePaths){let[n,s]=My(this.path);n&&(this.path=s,i=n)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=FF.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=Ct(r.absolute||xy.resolve(this.cwd,e)),this.path===""&&(this.path="./"),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.statCache.has(this.absolute)?this[Eo](this.statCache.get(this.absolute)):this[Tc]()}emit(e,...r){return e==="error"&&(this[Ty]=!0),super.emit(e,...r)}[Tc](){xt.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[Eo](r)})}[Eo](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=kF(e),this.emit("stat",e),this[Ry]()}[Ry](){switch(this.type){case"File":return this[Fy]();case"Directory":return this[Oy]();case"SymbolicLink":return this[kc]();default:return this.end()}}[Do](e){return jy(e,this.type==="Directory",this.portable)}[Rt](e){return Iy(e,this.prefix)}[Bn](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new Py({path:this[Rt](this.path),linkpath:this.type==="Link"?this[Rt](this.linkpath):this.linkpath,mode:this[Do](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new By({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[Rt](this.path),linkpath:this.type==="Link"?this[Rt](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[Oy](){this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[Bn](),this.end()}[kc](){xt.readlink(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[Bc](r)})}[Bc](e){this.linkpath=Ct(e),this[Bn](),this.end()}[ky](e){this.type="Link",this.linkpath=Ct(xy.relative(this.cwd,e)),this.stat.size=0,this[Bn](),this.end()}[Fy](){if(this.stat.nlink>1){let e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){let r=this.linkCache.get(e);if(r.indexOf(this.cwd)===0)return this[ky](r)}this.linkCache.set(e,this.absolute)}if(this[Bn](),this.stat.size===0)return this.end();this[Pc]()}[Pc](){xt.open(this.absolute,"r",(e,r)=>{if(e)return this.emit("error",e);this[Ic](r)})}[Ic](e){if(this.fd=e,this[Ty])return this[Dr]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let r=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(r),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[yo]()}[yo](){let{fd:e,buf:r,offset:i,length:n,pos:s}=this;xt.read(e,r,i,n,s,(o,a)=>{if(o)return this[Dr](()=>this.emit("error",o));this[Lc](a)})}[Dr](e){xt.close(this.fd,e)}[Lc](e){if(e<=0&&this.remain>0){let n=new Error("encountered unexpected EOF");return n.path=this.absolute,n.syscall="read",n.code="EOF",this[Dr](()=>this.emit("error",n))}if(e>this.remain){let n=new Error("did not encounter expected EOF");return n.path=this.absolute,n.syscall="read",n.code="EOF",this[Dr](()=>this.emit("error",n))}if(e===this.remain)for(let n=e;n<this.length&&e<this.blockRemain;n++)this.buf[n+this.offset]=0,e++,this.remain++;let r=this.offset===0&&e===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+e);this.write(r)?this[Oc]():this[Nc](()=>this[Oc]())}[Nc](e){this.once("drain",e)}write(e){if(this.blockRemain<e.length){let r=new Error("writing more data than expected");return r.path=this.absolute,this.emit("error",r)}return this.remain-=e.length,this.blockRemain-=e.length,this.pos+=e.length,this.offset+=e.length,super.write(e)}[Oc](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[Dr](e=>e?this.emit("error",e):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[yo]()}}),Mc=class extends bo{[Tc](){this[Eo](xt.lstatSync(this.absolute))}[kc](){this[Bc](xt.readlinkSync(this.absolute))}[Pc](){this[Ic](xt.openSync(this.absolute,"r"))}[yo](){let e=!0;try{let{fd:r,buf:i,offset:n,length:s,pos:o}=this,a=xt.readSync(r,i,n,s,o);this[Lc](a),e=!1}finally{if(e)try{this[Dr](()=>{})}catch{}}}[Nc](e){e()}[Dr](e){xt.closeSync(this.fd),e()}},OF=Ny(class extends Ly{constructor(e,r){r=r||{},super(r),this.preservePaths=!!r.preservePaths,this.portable=!!r.portable,this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.readEntry=e,this.type=e.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=r.prefix||null,this.path=Ct(e.path),this.mode=this[Do](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:r.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=Ct(e.linkpath),typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let i=!1;if(!this.preservePaths){let[n,s]=My(this.path);n&&(this.path=s,i=n)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new Py({path:this[Rt](this.path),linkpath:this.type==="Link"?this[Rt](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.header.encode()&&!this.noPax&&super.write(new By({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[Rt](this.path),linkpath:this.type==="Link"?this[Rt](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[Rt](e){return Iy(e,this.prefix)}[Do](e){return jy(e,this.type==="Directory",this.portable)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});bo.Sync=Mc;bo.Tar=OF;var kF=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";$y.exports=bo});var qy=$((K2,Hy)=>{"use strict";Hy.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var $c=$((Z2,Uy)=>{"use strict";Uy.exports=ae;ae.Node=Yr;ae.create=ae;function ae(t){var e=this;if(e instanceof ae||(e=new ae),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)e.push(arguments[r]);return e}ae.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};ae.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};ae.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};ae.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)LF(this,arguments[t]);return this.length};ae.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)BF(this,arguments[t]);return this.length};ae.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};ae.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};ae.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,i=0;r!==null;i++)t.call(e,r.value,i,this),r=r.next};ae.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,i=this.length-1;r!==null;i--)t.call(e,r.value,i,this),r=r.prev};ae.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};ae.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};ae.prototype.map=function(t,e){e=e||this;for(var r=new ae,i=this.head;i!==null;)r.push(t.call(e,i.value,this)),i=i.next;return r};ae.prototype.mapReverse=function(t,e){e=e||this;for(var r=new ae,i=this.tail;i!==null;)r.push(t.call(e,i.value,this)),i=i.prev;return r};ae.prototype.reduce=function(t,e){var r,i=this.head;if(arguments.length>1)r=e;else if(this.head)i=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)r=t(r,i.value,n),i=i.next;return r};ae.prototype.reduceReverse=function(t,e){var r,i=this.tail;if(arguments.length>1)r=e;else if(this.tail)i=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)r=t(r,i.value,n),i=i.prev;return r};ae.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};ae.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};ae.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new ae;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&i<t;i++)n=n.next;for(;n!==null&&i<e;i++,n=n.next)r.push(n.value);return r};ae.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new ae;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>t;i--,n=n.prev)r.push(n.value);return r};ae.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var i=0,n=this.head;n!==null&&i<t;i++)n=n.next;for(var s=[],i=0;n&&i<e;i++)s.push(n.value),n=this.removeNode(n);n===null&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(var i=0;i<r.length;i++)n=TF(this,n,r[i]);return s};ae.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=e,this.tail=t,this};function TF(t,e,r){var i=e===t.head?new Yr(r,null,e,t):new Yr(r,e,e.next,t);return i.next===null&&(t.tail=i),i.prev===null&&(t.head=i),t.length++,i}function LF(t,e){t.tail=new Yr(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function BF(t,e){t.head=new Yr(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function Yr(t,e,r,i){if(!(this instanceof Yr))return new Yr(t,e,r,i);this.list=i,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{qy()(ae)}catch{}});var Fo=$((X2,Zy)=>{"use strict";var xo=class{constructor(e,r){this.path=e||"./",this.absolute=r,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},PF=ro(),IF=Ec(),NF=ho(),Kc=jc(),MF=Kc.Sync,jF=Kc.Tar,$F=$c(),Gy=Buffer.alloc(1024),So=Symbol("onStat"),_o=Symbol("ended"),Ft=Symbol("queue"),Hi=Symbol("current"),Vr=Symbol("process"),wo=Symbol("processing"),zy=Symbol("processJob"),Ot=Symbol("jobs"),Hc=Symbol("jobDone"),Ao=Symbol("addFSEntry"),Wy=Symbol("addTarEntry"),zc=Symbol("stat"),Wc=Symbol("readdir"),vo=Symbol("onreaddir"),Co=Symbol("pipe"),Yy=Symbol("entry"),qc=Symbol("entryOpt"),Yc=Symbol("writeEntryClass"),Ky=Symbol("write"),Uc=Symbol("ondrain"),Ro=require("fs"),Vy=require("path"),HF=mo(),Gc=Ni(),Zc=HF(class extends PF{constructor(e){super(e),e=e||Object.create(null),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=Gc(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[Yc]=Kc,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new IF.Gzip(e.gzip),this.zip.on("data",r=>super.write(r)),this.zip.on("end",r=>super.end()),this.zip.on("drain",r=>this[Uc]()),this.on("resume",r=>this.zip.resume())):this.on("drain",this[Uc]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter=="function"?e.filter:r=>!0,this[Ft]=new $F,this[Ot]=0,this.jobs=+e.jobs||4,this[wo]=!1,this[_o]=!1}[Ky](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[_o]=!0,this[Vr](),this}write(e){if(this[_o])throw new Error("write after end");return e instanceof NF?this[Wy](e):this[Ao](e),this.flowing}[Wy](e){let r=Gc(Vy.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let i=new xo(e.path,r,!1);i.entry=new jF(e,this[qc](i)),i.entry.on("end",n=>this[Hc](i)),this[Ot]+=1,this[Ft].push(i)}this[Vr]()}[Ao](e){let r=Gc(Vy.resolve(this.cwd,e));this[Ft].push(new xo(e,r)),this[Vr]()}[zc](e){e.pending=!0,this[Ot]+=1;let r=this.follow?"stat":"lstat";Ro[r](e.absolute,(i,n)=>{e.pending=!1,this[Ot]-=1,i?this.emit("error",i):this[So](e,n)})}[So](e,r){this.statCache.set(e.absolute,r),e.stat=r,this.filter(e.path,r)||(e.ignore=!0),this[Vr]()}[Wc](e){e.pending=!0,this[Ot]+=1,Ro.readdir(e.absolute,(r,i)=>{if(e.pending=!1,this[Ot]-=1,r)return this.emit("error",r);this[vo](e,i)})}[vo](e,r){this.readdirCache.set(e.absolute,r),e.readdir=r,this[Vr]()}[Vr](){if(!this[wo]){this[wo]=!0;for(let e=this[Ft].head;e!==null&&this[Ot]<this.jobs;e=e.next)if(this[zy](e.value),e.value.ignore){let r=e.next;this[Ft].removeNode(e),e.next=r}this[wo]=!1,this[_o]&&!this[Ft].length&&this[Ot]===0&&(this.zip?this.zip.end(Gy):(super.write(Gy),super.end()))}}get[Hi](){return this[Ft]&&this[Ft].head&&this[Ft].head.value}[Hc](e){this[Ft].shift(),this[Ot]-=1,this[Vr]()}[zy](e){if(!e.pending){if(e.entry){e===this[Hi]&&!e.piped&&this[Co](e);return}if(e.stat||(this.statCache.has(e.absolute)?this[So](e,this.statCache.get(e.absolute)):this[zc](e)),!!e.stat&&!e.ignore&&!(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir&&(this.readdirCache.has(e.absolute)?this[vo](e,this.readdirCache.get(e.absolute)):this[Wc](e),!e.readdir))){if(e.entry=this[Yy](e),!e.entry){e.ignore=!0;return}e===this[Hi]&&!e.piped&&this[Co](e)}}}[qc](e){return{onwarn:(r,i,n)=>this.warn(r,i,n),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[Yy](e){this[Ot]+=1;try{return new this[Yc](e.path,this[qc](e)).on("end",()=>this[Hc](e)).on("error",r=>this.emit("error",r))}catch(r){this.emit("error",r)}}[Uc](){this[Hi]&&this[Hi].entry&&this[Hi].entry.resume()}[Co](e){e.piped=!0,e.readdir&&e.readdir.forEach(n=>{let s=e.path,o=s==="./"?"":s.replace(/\/*$/,"/");this[Ao](o+n)});let r=e.entry,i=this.zip;i?r.on("data",n=>{i.write(n)||r.pause()}):r.on("data",n=>{super.write(n)||r.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),Vc=class extends Zc{constructor(e){super(e),this[Yc]=MF}pause(){}resume(){}[zc](e){let r=this.follow?"statSync":"lstatSync";this[So](e,Ro[r](e.absolute))}[Wc](e,r){this[vo](e,Ro.readdirSync(e.absolute))}[Co](e){let r=e.entry,i=this.zip;e.readdir&&e.readdir.forEach(n=>{let s=e.path,o=s==="./"?"":s.replace(/\/*$/,"/");this[Ao](o+n)}),i?r.on("data",n=>{i.write(n)}):r.on("data",n=>{super[Ky](n)})}};Zc.Sync=Vc;Zy.exports=Zc});var Ki=$(In=>{"use strict";var qF=rc(),UF=require("events").EventEmitter,Ye=require("fs"),Qc=Ye.writev;if(!Qc){let t=process.binding("fs"),e=t.FSReqWrap||t.FSReqCallback;Qc=(r,i,n,s)=>{let o=(u,l)=>s(u,l,i),a=new e;a.oncomplete=o,t.writeBuffers(r,i,n,a)}}var Yi=Symbol("_autoClose"),pt=Symbol("_close"),Pn=Symbol("_ended"),fe=Symbol("_fd"),Jy=Symbol("_finished"),_r=Symbol("_flags"),Jc=Symbol("_flush"),eh=Symbol("_handleChunk"),th=Symbol("_makeBuf"),Bo=Symbol("_mode"),Oo=Symbol("_needDrain"),zi=Symbol("_onerror"),Vi=Symbol("_onopen"),Xc=Symbol("_onread"),Ui=Symbol("_onwrite"),wr=Symbol("_open"),Jt=Symbol("_path"),Kr=Symbol("_pos"),kt=Symbol("_queue"),Gi=Symbol("_read"),Xy=Symbol("_readSize"),br=Symbol("_reading"),ko=Symbol("_remain"),Qy=Symbol("_size"),To=Symbol("_write"),qi=Symbol("_writing"),Lo=Symbol("_defaultFlag"),Wi=Symbol("_errored"),Po=class extends qF{constructor(e,r){if(r=r||{},super(r),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[Wi]=!1,this[fe]=typeof r.fd=="number"?r.fd:null,this[Jt]=e,this[Xy]=r.readSize||16*1024*1024,this[br]=!1,this[Qy]=typeof r.size=="number"?r.size:1/0,this[ko]=this[Qy],this[Yi]=typeof r.autoClose=="boolean"?r.autoClose:!0,typeof this[fe]=="number"?this[Gi]():this[wr]()}get fd(){return this[fe]}get path(){return this[Jt]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[wr](){Ye.open(this[Jt],"r",(e,r)=>this[Vi](e,r))}[Vi](e,r){e?this[zi](e):(this[fe]=r,this.emit("open",r),this[Gi]())}[th](){return Buffer.allocUnsafe(Math.min(this[Xy],this[ko]))}[Gi](){if(!this[br]){this[br]=!0;let e=this[th]();if(e.length===0)return process.nextTick(()=>this[Xc](null,0,e));Ye.read(this[fe],e,0,e.length,null,(r,i,n)=>this[Xc](r,i,n))}}[Xc](e,r,i){this[br]=!1,e?this[zi](e):this[eh](r,i)&&this[Gi]()}[pt](){if(this[Yi]&&typeof this[fe]=="number"){let e=this[fe];this[fe]=null,Ye.close(e,r=>r?this.emit("error",r):this.emit("close"))}}[zi](e){this[br]=!0,this[pt](),this.emit("error",e)}[eh](e,r){let i=!1;return this[ko]-=e,e>0&&(i=super.write(e<r.length?r.slice(0,e):r)),(e===0||this[ko]<=0)&&(i=!1,this[pt](),super.end()),i}emit(e,r){switch(e){case"prefinish":case"finish":break;case"drain":typeof this[fe]=="number"&&this[Gi]();break;case"error":return this[Wi]?void 0:(this[Wi]=!0,super.emit(e,r));default:return super.emit(e,r)}}},rh=class extends Po{[wr](){let e=!0;try{this[Vi](null,Ye.openSync(this[Jt],"r")),e=!1}finally{e&&this[pt]()}}[Gi](){let e=!0;try{if(!this[br]){this[br]=!0;do{let r=this[th](),i=r.length===0?0:Ye.readSync(this[fe],r,0,r.length,null);if(!this[eh](i,r))break}while(!0);this[br]=!1}e=!1}finally{e&&this[pt]()}}[pt](){if(this[Yi]&&typeof this[fe]=="number"){let e=this[fe];this[fe]=null,Ye.closeSync(e),this.emit("close")}}},Io=class extends UF{constructor(e,r){r=r||{},super(r),this.readable=!1,this.writable=!0,this[Wi]=!1,this[qi]=!1,this[Pn]=!1,this[Oo]=!1,this[kt]=[],this[Jt]=e,this[fe]=typeof r.fd=="number"?r.fd:null,this[Bo]=r.mode===void 0?438:r.mode,this[Kr]=typeof r.start=="number"?r.start:null,this[Yi]=typeof r.autoClose=="boolean"?r.autoClose:!0;let i=this[Kr]!==null?"r+":"w";this[Lo]=r.flags===void 0,this[_r]=this[Lo]?i:r.flags,this[fe]===null&&this[wr]()}emit(e,r){if(e==="error"){if(this[Wi])return;this[Wi]=!0}return super.emit(e,r)}get fd(){return this[fe]}get path(){return this[Jt]}[zi](e){this[pt](),this[qi]=!0,this.emit("error",e)}[wr](){Ye.open(this[Jt],this[_r],this[Bo],(e,r)=>this[Vi](e,r))}[Vi](e,r){this[Lo]&&this[_r]==="r+"&&e&&e.code==="ENOENT"?(this[_r]="w",this[wr]()):e?this[zi](e):(this[fe]=r,this.emit("open",r),this[Jc]())}end(e,r){return e&&this.write(e,r),this[Pn]=!0,!this[qi]&&!this[kt].length&&typeof this[fe]=="number"&&this[Ui](null,0),this}write(e,r){return typeof e=="string"&&(e=Buffer.from(e,r)),this[Pn]?(this.emit("error",new Error("write() after end()")),!1):this[fe]===null||this[qi]||this[kt].length?(this[kt].push(e),this[Oo]=!0,!1):(this[qi]=!0,this[To](e),!0)}[To](e){Ye.write(this[fe],e,0,e.length,this[Kr],(r,i)=>this[Ui](r,i))}[Ui](e,r){e?this[zi](e):(this[Kr]!==null&&(this[Kr]+=r),this[kt].length?this[Jc]():(this[qi]=!1,this[Pn]&&!this[Jy]?(this[Jy]=!0,this[pt](),this.emit("finish")):this[Oo]&&(this[Oo]=!1,this.emit("drain"))))}[Jc](){if(this[kt].length===0)this[Pn]&&this[Ui](null,0);else if(this[kt].length===1)this[To](this[kt].pop());else{let e=this[kt];this[kt]=[],Qc(this[fe],e,this[Kr],(r,i)=>this[Ui](r,i))}}[pt](){if(this[Yi]&&typeof this[fe]=="number"){let e=this[fe];this[fe]=null,Ye.close(e,r=>r?this.emit("error",r):this.emit("close"))}}},ih=class extends Io{[wr](){let e;if(this[Lo]&&this[_r]==="r+")try{e=Ye.openSync(this[Jt],this[_r],this[Bo])}catch(r){if(r.code==="ENOENT")return this[_r]="w",this[wr]();throw r}else e=Ye.openSync(this[Jt],this[_r],this[Bo]);this[Vi](null,e)}[pt](){if(this[Yi]&&typeof this[fe]=="number"){let e=this[fe];this[fe]=null,Ye.closeSync(e),this.emit("close")}}[To](e){let r=!0;try{this[Ui](null,Ye.writeSync(this[fe],e,0,e.length,this[Kr])),r=!1}finally{if(r)try{this[pt]()}catch{}}}};In.ReadStream=Po;In.ReadStreamSync=rh;In.WriteStream=Io;In.WriteStreamSync=ih});var Uo=$((tI,aE)=>{"use strict";var GF=mo(),zF=ji(),WF=require("events"),YF=$c(),VF=1024*1024,KF=ho(),eE=po(),ZF=Ec(),{nextTick:JF}=require("process"),nh=Buffer.from([31,139]),st=Symbol("state"),Zr=Symbol("writeEntry"),Xt=Symbol("readEntry"),sh=Symbol("nextEntry"),tE=Symbol("processEntry"),ot=Symbol("extendedHeader"),Nn=Symbol("globalExtendedHeader"),Sr=Symbol("meta"),rE=Symbol("emitMeta"),me=Symbol("buffer"),Qt=Symbol("queue"),Jr=Symbol("ended"),iE=Symbol("emittedEnd"),Xr=Symbol("emit"),Ve=Symbol("unzip"),No=Symbol("consumeChunk"),Mo=Symbol("consumeChunkSub"),oh=Symbol("consumeBody"),nE=Symbol("consumeMeta"),sE=Symbol("consumeHeader"),jo=Symbol("consuming"),ah=Symbol("bufferConcat"),uh=Symbol("maybeEnd"),Mn=Symbol("writing"),Ar=Symbol("aborted"),$o=Symbol("onDone"),Qr=Symbol("sawValidEntry"),Ho=Symbol("sawNullBlock"),qo=Symbol("sawEOF"),oE=Symbol("closeStream"),XF=t=>!0;aE.exports=GF(class extends WF{constructor(e){e=e||{},super(e),this.file=e.file||"",this[Qr]=null,this.on($o,r=>{(this[st]==="begin"||this[Qr]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on($o,e.ondone):this.on($o,r=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||VF,this.filter=typeof e.filter=="function"?e.filter:XF,this.writable=!0,this.readable=!1,this[Qt]=new YF,this[me]=null,this[Xt]=null,this[Zr]=null,this[st]="begin",this[Sr]="",this[ot]=null,this[Nn]=null,this[Jr]=!1,this[Ve]=null,this[Ar]=!1,this[Ho]=!1,this[qo]=!1,this.on("end",()=>this[oE]()),typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onentry=="function"&&this.on("entry",e.onentry)}[sE](e,r){this[Qr]===null&&(this[Qr]=!1);let i;try{i=new zF(e,r,this[ot],this[Nn])}catch(n){return this.warn("TAR_ENTRY_INVALID",n)}if(i.nullBlock)this[Ho]?(this[qo]=!0,this[st]==="begin"&&(this[st]="header"),this[Xr]("eof")):(this[Ho]=!0,this[Xr]("nullBlock"));else if(this[Ho]=!1,!i.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i});else if(!i.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:i});else{let n=i.type;if(/^(Symbolic)?Link$/.test(n)&&!i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i});else if(!/^(Symbolic)?Link$/.test(n)&&i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i});else{let s=this[Zr]=new KF(i,this[ot],this[Nn]);if(!this[Qr])if(s.remain){let o=()=>{s.invalid||(this[Qr]=!0)};s.on("end",o)}else this[Qr]=!0;s.meta?s.size>this.maxMetaEntrySize?(s.ignore=!0,this[Xr]("ignoredEntry",s),this[st]="ignore",s.resume()):s.size>0&&(this[Sr]="",s.on("data",o=>this[Sr]+=o),this[st]="meta"):(this[ot]=null,s.ignore=s.ignore||!this.filter(s.path,s),s.ignore?(this[Xr]("ignoredEntry",s),this[st]=s.remain?"ignore":"header",s.resume()):(s.remain?this[st]="body":(this[st]="header",s.end()),this[Xt]?this[Qt].push(s):(this[Qt].push(s),this[sh]())))}}}[oE](){JF(()=>this.emit("close"))}[tE](e){let r=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[Xt]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",i=>this[sh]()),r=!1)):(this[Xt]=null,r=!1),r}[sh](){do;while(this[tE](this[Qt].shift()));if(!this[Qt].length){let e=this[Xt];!e||e.flowing||e.size===e.remain?this[Mn]||this.emit("drain"):e.once("drain",i=>this.emit("drain"))}}[oh](e,r){let i=this[Zr],n=i.blockRemain,s=n>=e.length&&r===0?e:e.slice(r,r+n);return i.write(s),i.blockRemain||(this[st]="header",this[Zr]=null,i.end()),s.length}[nE](e,r){let i=this[Zr],n=this[oh](e,r);return this[Zr]||this[rE](i),n}[Xr](e,r,i){!this[Qt].length&&!this[Xt]?this.emit(e,r,i):this[Qt].push([e,r,i])}[rE](e){switch(this[Xr]("meta",this[Sr]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[ot]=eE.parse(this[Sr],this[ot],!1);break;case"GlobalExtendedHeader":this[Nn]=eE.parse(this[Sr],this[Nn],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[ot]=this[ot]||Object.create(null),this[ot].path=this[Sr].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[ot]=this[ot]||Object.create(null),this[ot].linkpath=this[Sr].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[Ar]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[Ar])return;if(this[Ve]===null&&e){if(this[me]&&(e=Buffer.concat([this[me],e]),this[me]=null),e.length<nh.length)return this[me]=e,!0;for(let i=0;this[Ve]===null&&i<nh.length;i++)e[i]!==nh[i]&&(this[Ve]=!1);if(this[Ve]===null){let i=this[Jr];this[Jr]=!1,this[Ve]=new ZF.Unzip,this[Ve].on("data",s=>this[No](s)),this[Ve].on("error",s=>this.abort(s)),this[Ve].on("end",s=>{this[Jr]=!0,this[No]()}),this[Mn]=!0;let n=this[Ve][i?"end":"write"](e);return this[Mn]=!1,n}}this[Mn]=!0,this[Ve]?this[Ve].write(e):this[No](e),this[Mn]=!1;let r=this[Qt].length?!1:this[Xt]?this[Xt].flowing:!0;return!r&&!this[Qt].length&&this[Xt].once("drain",i=>this.emit("drain")),r}[ah](e){e&&!this[Ar]&&(this[me]=this[me]?Buffer.concat([this[me],e]):e)}[uh](){if(this[Jr]&&!this[iE]&&!this[Ar]&&!this[jo]){this[iE]=!0;let e=this[Zr];if(e&&e.blockRemain){let r=this[me]?this[me].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${r} available)`,{entry:e}),this[me]&&e.write(this[me]),e.end()}this[Xr]($o)}}[No](e){if(this[jo])this[ah](e);else if(!e&&!this[me])this[uh]();else{if(this[jo]=!0,this[me]){this[ah](e);let r=this[me];this[me]=null,this[Mo](r)}else this[Mo](e);for(;this[me]&&this[me].length>=512&&!this[Ar]&&!this[qo];){let r=this[me];this[me]=null,this[Mo](r)}this[jo]=!1}(!this[me]||this[Jr])&&this[uh]()}[Mo](e){let r=0,i=e.length;for(;r+512<=i&&!this[Ar]&&!this[qo];)switch(this[st]){case"begin":case"header":this[sE](e,r),r+=512;break;case"ignore":case"body":r+=this[oh](e,r);break;case"meta":r+=this[nE](e,r);break;default:throw new Error("invalid state: "+this[st])}r<i&&(this[me]?this[me]=Buffer.concat([e.slice(r),this[me]]):this[me]=e.slice(r))}end(e){this[Ar]||(this[Ve]?this[Ve].end(e):(this[Jr]=!0,this.write(e)))}})});var Go=$((rI,hE)=>{"use strict";var QF=Ti(),lE=Uo(),Zi=require("fs"),eO=Ki(),uE=require("path"),lh=$i();hE.exports=(t,e,r)=>{typeof t=="function"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(r=e,e=null),e?e=Array.from(e):e=[];let i=QF(t);if(i.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return e.length&&rO(i,e),i.noResume||tO(i),i.file&&i.sync?iO(i):i.file?nO(i,r):cE(i)};var tO=t=>{let e=t.onentry;t.onentry=e?r=>{e(r),r.resume()}:r=>r.resume()},rO=(t,e)=>{let r=new Map(e.map(s=>[lh(s),!0])),i=t.filter,n=(s,o)=>{let a=o||uE.parse(s).root||".",u=s===a?!1:r.has(s)?r.get(s):n(uE.dirname(s),a);return r.set(s,u),u};t.filter=i?(s,o)=>i(s,o)&&n(lh(s)):s=>n(lh(s))},iO=t=>{let e=cE(t),r=t.file,i=!0,n;try{let s=Zi.statSync(r),o=t.maxReadSize||16*1024*1024;if(s.size<o)e.end(Zi.readFileSync(r));else{let a=0,u=Buffer.allocUnsafe(o);for(n=Zi.openSync(r,"r");a<s.size;){let l=Zi.readSync(n,u,0,o,a);a+=l,e.write(u.slice(0,l))}e.end()}i=!1}finally{if(i&&n)try{Zi.closeSync(n)}catch{}}},nO=(t,e)=>{let r=new lE(t),i=t.maxReadSize||16*1024*1024,n=t.file,s=new Promise((o,a)=>{r.on("error",a),r.on("end",o),Zi.stat(n,(u,l)=>{if(u)a(u);else{let c=new eO.ReadStream(n,{readSize:i,size:l.size});c.on("error",a),c.pipe(r)}})});return e?s.then(e,e):s},cE=t=>new lE(t)});var yE=$((iI,gE)=>{"use strict";var sO=Ti(),zo=Fo(),fE=Ki(),pE=Go(),dE=require("path");gE.exports=(t,e,r)=>{if(typeof e=="function"&&(r=e),Array.isArray(t)&&(e=t,t={}),!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");e=Array.from(e);let i=sO(t);if(i.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return i.file&&i.sync?oO(i,e):i.file?aO(i,e,r):i.sync?uO(i,e):lO(i,e)};var oO=(t,e)=>{let r=new zo.Sync(t),i=new fE.WriteStreamSync(t.file,{mode:t.mode||438});r.pipe(i),mE(r,e)},aO=(t,e,r)=>{let i=new zo(t),n=new fE.WriteStream(t.file,{mode:t.mode||438});i.pipe(n);let s=new Promise((o,a)=>{n.on("error",a),n.on("close",o),i.on("error",a)});return ch(i,e),r?s.then(r,r):s},mE=(t,e)=>{e.forEach(r=>{r.charAt(0)==="@"?pE({file:dE.resolve(t.cwd,r.slice(1)),sync:!0,noResume:!0,onentry:i=>t.add(i)}):t.add(r)}),t.end()},ch=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)==="@")return pE({file:dE.resolve(t.cwd,r.slice(1)),noResume:!0,onentry:i=>t.add(i)}).then(i=>ch(t,e));t.add(r)}t.end()},uO=(t,e)=>{let r=new zo.Sync(t);return mE(r,e),r},lO=(t,e)=>{let r=new zo(t);return ch(r,e),r}});var hh=$((nI,AE)=>{"use strict";var cO=Ti(),EE=Fo(),et=require("fs"),DE=Ki(),bE=Go(),_E=require("path"),wE=ji();AE.exports=(t,e,r)=>{let i=cO(t);if(!i.file)throw new TypeError("file is required");if(i.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),i.sync?hO(i,e):pO(i,e,r)};var hO=(t,e)=>{let r=new EE.Sync(t),i=!0,n,s;try{try{n=et.openSync(t.file,"r+")}catch(u){if(u.code==="ENOENT")n=et.openSync(t.file,"w+");else throw u}let o=et.fstatSync(n),a=Buffer.alloc(512);e:for(s=0;s<o.size;s+=512){for(let c=0,f=0;c<512;c+=f){if(f=et.readSync(n,a,c,a.length-c,s+c),s===0&&a[0]===31&&a[1]===139)throw new Error("cannot append to compressed archives");if(!f)break e}let u=new wE(a);if(!u.cksumValid)break;let l=512*Math.ceil(u.size/512);if(s+l+512>o.size)break;s+=l,t.mtimeCache&&t.mtimeCache.set(u.path,u.mtime)}i=!1,fO(t,r,s,n,e)}finally{if(i)try{et.closeSync(n)}catch{}}},fO=(t,e,r,i,n)=>{let s=new DE.WriteStreamSync(t.file,{fd:i,start:r});e.pipe(s),dO(e,n)},pO=(t,e,r)=>{e=Array.from(e);let i=new EE(t),n=(o,a,u)=>{let l=(g,y)=>{g?et.close(o,E=>u(g)):u(null,y)},c=0;if(a===0)return l(null,0);let f=0,h=Buffer.alloc(512),p=(g,y)=>{if(g)return l(g);if(f+=y,f<512&&y)return et.read(o,h,f,h.length-f,c+f,p);if(c===0&&h[0]===31&&h[1]===139)return l(new Error("cannot append to compressed archives"));if(f<512)return l(null,c);let E=new wE(h);if(!E.cksumValid)return l(null,c);let v=512*Math.ceil(E.size/512);if(c+v+512>a||(c+=v+512,c>=a))return l(null,c);t.mtimeCache&&t.mtimeCache.set(E.path,E.mtime),f=0,et.read(o,h,0,512,c,p)};et.read(o,h,0,512,c,p)},s=new Promise((o,a)=>{i.on("error",a);let u="r+",l=(c,f)=>{if(c&&c.code==="ENOENT"&&u==="r+")return u="w+",et.open(t.file,u,l);if(c)return a(c);et.fstat(f,(h,p)=>{if(h)return et.close(f,()=>a(h));n(f,p.size,(g,y)=>{if(g)return a(g);let E=new DE.WriteStream(t.file,{fd:f,start:y});i.pipe(E),E.on("error",a),E.on("close",o),SE(i,e)})})};et.open(t.file,u,l)});return r?s.then(r,r):s},dO=(t,e)=>{e.forEach(r=>{r.charAt(0)==="@"?bE({file:_E.resolve(t.cwd,r.slice(1)),sync:!0,noResume:!0,onentry:i=>t.add(i)}):t.add(r)}),t.end()},SE=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)==="@")return bE({file:_E.resolve(t.cwd,r.slice(1)),noResume:!0,onentry:i=>t.add(i)}).then(i=>SE(t,e));t.add(r)}t.end()}});var CE=$((sI,vE)=>{"use strict";var mO=Ti(),gO=hh();vE.exports=(t,e,r)=>{let i=mO(t);if(!i.file)throw new TypeError("file is required");if(i.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),yO(i),gO(i,e,r)};var yO=t=>{let e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(r,i)=>e(r,i)&&!(t.mtimeCache.get(r)>i.mtime):(r,i)=>!(t.mtimeCache.get(r)>i.mtime)}});var FE=$((oI,RE)=>{var{promisify:xE}=require("util"),vr=require("fs"),EO=t=>{if(!t)t={mode:511,fs:vr};else if(typeof t=="object")t={mode:511,fs:vr,...t};else if(typeof t=="number")t={mode:t,fs:vr};else if(typeof t=="string")t={mode:parseInt(t,8),fs:vr};else throw new TypeError("invalid options argument");return t.mkdir=t.mkdir||t.fs.mkdir||vr.mkdir,t.mkdirAsync=xE(t.mkdir),t.stat=t.stat||t.fs.stat||vr.stat,t.statAsync=xE(t.stat),t.statSync=t.statSync||t.fs.statSync||vr.statSync,t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||vr.mkdirSync,t};RE.exports=EO});var kE=$((aI,OE)=>{var DO=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:bO,parse:_O}=require("path"),wO=t=>{if(/\0/.test(t))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"});if(t=bO(t),DO==="win32"){let e=/[*|"<>?:]/,{root:r}=_O(t);if(e.test(t.substr(r.length)))throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}return t};OE.exports=wO});var IE=$((uI,PE)=>{var{dirname:TE}=require("path"),LE=(t,e,r=void 0)=>r===e?Promise.resolve():t.statAsync(e).then(i=>i.isDirectory()?r:void 0,i=>i.code==="ENOENT"?LE(t,TE(e),e):void 0),BE=(t,e,r=void 0)=>{if(r!==e)try{return t.statSync(e).isDirectory()?r:void 0}catch(i){return i.code==="ENOENT"?BE(t,TE(e),e):void 0}};PE.exports={findMade:LE,findMadeSync:BE}});var dh=$((lI,ME)=>{var{dirname:NE}=require("path"),fh=(t,e,r)=>{e.recursive=!1;let i=NE(t);return i===t?e.mkdirAsync(t,e).catch(n=>{if(n.code!=="EISDIR")throw n}):e.mkdirAsync(t,e).then(()=>r||t,n=>{if(n.code==="ENOENT")return fh(i,e).then(s=>fh(t,e,s));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;return e.statAsync(t).then(s=>{if(s.isDirectory())return r;throw n},()=>{throw n})})},ph=(t,e,r)=>{let i=NE(t);if(e.recursive=!1,i===t)try{return e.mkdirSync(t,e)}catch(n){if(n.code!=="EISDIR")throw n;return}try{return e.mkdirSync(t,e),r||t}catch(n){if(n.code==="ENOENT")return ph(t,e,ph(i,e,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;try{if(!e.statSync(t).isDirectory())throw n}catch{throw n}}};ME.exports={mkdirpManual:fh,mkdirpManualSync:ph}});var HE=$((cI,$E)=>{var{dirname:jE}=require("path"),{findMade:SO,findMadeSync:AO}=IE(),{mkdirpManual:vO,mkdirpManualSync:CO}=dh(),xO=(t,e)=>(e.recursive=!0,jE(t)===t?e.mkdirAsync(t,e):SO(e,t).then(i=>e.mkdirAsync(t,e).then(()=>i).catch(n=>{if(n.code==="ENOENT")return vO(t,e);throw n}))),RO=(t,e)=>{if(e.recursive=!0,jE(t)===t)return e.mkdirSync(t,e);let i=AO(e,t);try{return e.mkdirSync(t,e),i}catch(n){if(n.code==="ENOENT")return CO(t,e);throw n}};$E.exports={mkdirpNative:xO,mkdirpNativeSync:RO}});var zE=$((hI,GE)=>{var qE=require("fs"),FO=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version,mh=FO.replace(/^v/,"").split("."),UE=+mh[0]>10||+mh[0]==10&&+mh[1]>=12,OO=UE?t=>t.mkdir===qE.mkdir:()=>!1,kO=UE?t=>t.mkdirSync===qE.mkdirSync:()=>!1;GE.exports={useNative:OO,useNativeSync:kO}});var JE=$((fI,ZE)=>{var Ji=FE(),Xi=kE(),{mkdirpNative:WE,mkdirpNativeSync:YE}=HE(),{mkdirpManual:VE,mkdirpManualSync:KE}=dh(),{useNative:TO,useNativeSync:LO}=zE(),Qi=(t,e)=>(t=Xi(t),e=Ji(e),TO(e)?WE(t,e):VE(t,e)),BO=(t,e)=>(t=Xi(t),e=Ji(e),LO(e)?YE(t,e):KE(t,e));Qi.sync=BO;Qi.native=(t,e)=>WE(Xi(t),Ji(e));Qi.manual=(t,e)=>VE(Xi(t),Ji(e));Qi.nativeSync=(t,e)=>YE(Xi(t),Ji(e));Qi.manualSync=(t,e)=>KE(Xi(t),Ji(e));ZE.exports=Qi});var nD=$((pI,iD)=>{"use strict";var at=require("fs"),ei=require("path"),PO=at.lchown?"lchown":"chown",IO=at.lchownSync?"lchownSync":"chownSync",QE=at.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),XE=(t,e,r)=>{try{return at[IO](t,e,r)}catch(i){if(i.code!=="ENOENT")throw i}},NO=(t,e,r)=>{try{return at.chownSync(t,e,r)}catch(i){if(i.code!=="ENOENT")throw i}},MO=QE?(t,e,r,i)=>n=>{!n||n.code!=="EISDIR"?i(n):at.chown(t,e,r,i)}:(t,e,r,i)=>i,gh=QE?(t,e,r)=>{try{return XE(t,e,r)}catch(i){if(i.code!=="EISDIR")throw i;NO(t,e,r)}}:(t,e,r)=>XE(t,e,r),jO=process.version,eD=(t,e,r)=>at.readdir(t,e,r),$O=(t,e)=>at.readdirSync(t,e);/^v4\./.test(jO)&&(eD=(t,e,r)=>at.readdir(t,r));var Wo=(t,e,r,i)=>{at[PO](t,e,r,MO(t,e,r,n=>{i(n&&n.code!=="ENOENT"?n:null)}))},tD=(t,e,r,i,n)=>{if(typeof e=="string")return at.lstat(ei.resolve(t,e),(s,o)=>{if(s)return n(s.code!=="ENOENT"?s:null);o.name=e,tD(t,o,r,i,n)});if(e.isDirectory())yh(ei.resolve(t,e.name),r,i,s=>{if(s)return n(s);let o=ei.resolve(t,e.name);Wo(o,r,i,n)});else{let s=ei.resolve(t,e.name);Wo(s,r,i,n)}},yh=(t,e,r,i)=>{eD(t,{withFileTypes:!0},(n,s)=>{if(n){if(n.code==="ENOENT")return i();if(n.code!=="ENOTDIR"&&n.code!=="ENOTSUP")return i(n)}if(n||!s.length)return Wo(t,e,r,i);let o=s.length,a=null,u=l=>{if(!a){if(l)return i(a=l);if(--o===0)return Wo(t,e,r,i)}};s.forEach(l=>tD(t,l,e,r,u))})},HO=(t,e,r,i)=>{if(typeof e=="string")try{let n=at.lstatSync(ei.resolve(t,e));n.name=e,e=n}catch(n){if(n.code==="ENOENT")return;throw n}e.isDirectory()&&rD(ei.resolve(t,e.name),r,i),gh(ei.resolve(t,e.name),r,i)},rD=(t,e,r)=>{let i;try{i=$O(t,{withFileTypes:!0})}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return gh(t,e,r);throw n}return i&&i.length&&i.forEach(n=>HO(t,n,e,r)),gh(t,e,r)};iD.exports=yh;yh.sync=rD});var uD=$((dI,Eh)=>{"use strict";var sD=JE(),ut=require("fs"),Yo=require("path"),oD=nD(),dt=Ni(),Vo=class extends Error{constructor(e,r){super("Cannot extract through symbolic link"),this.path=r,this.symlink=e}get name(){return"SylinkError"}},Ko=class extends Error{constructor(e,r){super(r+": Cannot cd into '"+e+"'"),this.path=e,this.code=r}get name(){return"CwdError"}},Zo=(t,e)=>t.get(dt(e)),jn=(t,e,r)=>t.set(dt(e),r),qO=(t,e)=>{ut.stat(t,(r,i)=>{(r||!i.isDirectory())&&(r=new Ko(t,r&&r.code||"ENOTDIR")),e(r)})};Eh.exports=(t,e,r)=>{t=dt(t);let i=e.umask,n=e.mode|448,s=(n&i)!==0,o=e.uid,a=e.gid,u=typeof o=="number"&&typeof a=="number"&&(o!==e.processUid||a!==e.processGid),l=e.preserve,c=e.unlink,f=e.cache,h=dt(e.cwd),p=(E,v)=>{E?r(E):(jn(f,t,!0),v&&u?oD(v,o,a,F=>p(F)):s?ut.chmod(t,n,r):r())};if(f&&Zo(f,t)===!0)return p();if(t===h)return qO(t,p);if(l)return sD(t,{mode:n}).then(E=>p(null,E),p);let y=dt(Yo.relative(h,t)).split("/");Jo(h,y,n,f,c,h,null,p)};var Jo=(t,e,r,i,n,s,o,a)=>{if(!e.length)return a(null,o);let u=e.shift(),l=dt(Yo.resolve(t+"/"+u));if(Zo(i,l))return Jo(l,e,r,i,n,s,o,a);ut.mkdir(l,r,aD(l,e,r,i,n,s,o,a))},aD=(t,e,r,i,n,s,o,a)=>u=>{u?ut.lstat(t,(l,c)=>{if(l)l.path=l.path&&dt(l.path),a(l);else if(c.isDirectory())Jo(t,e,r,i,n,s,o,a);else if(n)ut.unlink(t,f=>{if(f)return a(f);ut.mkdir(t,r,aD(t,e,r,i,n,s,o,a))});else{if(c.isSymbolicLink())return a(new Vo(t,t+"/"+e.join("/")));a(u)}}):(o=o||t,Jo(t,e,r,i,n,s,o,a))},UO=t=>{let e=!1,r="ENOTDIR";try{e=ut.statSync(t).isDirectory()}catch(i){r=i.code}finally{if(!e)throw new Ko(t,r)}};Eh.exports.sync=(t,e)=>{t=dt(t);let r=e.umask,i=e.mode|448,n=(i&r)!==0,s=e.uid,o=e.gid,a=typeof s=="number"&&typeof o=="number"&&(s!==e.processUid||o!==e.processGid),u=e.preserve,l=e.unlink,c=e.cache,f=dt(e.cwd),h=E=>{jn(c,t,!0),E&&a&&oD.sync(E,s,o),n&&ut.chmodSync(t,i)};if(c&&Zo(c,t)===!0)return h();if(t===f)return UO(f),h();if(u)return h(sD.sync(t,i));let g=dt(Yo.relative(f,t)).split("/"),y=null;for(let E=g.shift(),v=f;E&&(v+="/"+E);E=g.shift())if(v=dt(Yo.resolve(v)),!Zo(c,v))try{ut.mkdirSync(v,i),y=y||v,jn(c,v,!0)}catch{let O=ut.lstatSync(v);if(O.isDirectory()){jn(c,v,!0);continue}else if(l){ut.unlinkSync(v),ut.mkdirSync(v,i),y=y||v,jn(c,v,!0);continue}else if(O.isSymbolicLink())return new Vo(v,v+"/"+g.join("/"))}return h(y)}});var bh=$((mI,lD)=>{var Dh=Object.create(null),{hasOwnProperty:GO}=Object.prototype;lD.exports=t=>(GO.call(Dh,t)||(Dh[t]=t.normalize("NFKD")),Dh[t])});var pD=$((gI,fD)=>{var cD=require("assert"),zO=bh(),WO=$i(),{join:hD}=require("path"),YO=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,VO=YO==="win32";fD.exports=()=>{let t=new Map,e=new Map,r=l=>l.split("/").slice(0,-1).reduce((f,h)=>(f.length&&(h=hD(f[f.length-1],h)),f.push(h||"/"),f),[]),i=new Set,n=l=>{let c=e.get(l);if(!c)throw new Error("function does not have any path reservations");return{paths:c.paths.map(f=>t.get(f)),dirs:[...c.dirs].map(f=>t.get(f))}},s=l=>{let{paths:c,dirs:f}=n(l);return c.every(h=>h[0]===l)&&f.every(h=>h[0]instanceof Set&&h[0].has(l))},o=l=>i.has(l)||!s(l)?!1:(i.add(l),l(()=>a(l)),!0),a=l=>{if(!i.has(l))return!1;let{paths:c,dirs:f}=e.get(l),h=new Set;return c.forEach(p=>{let g=t.get(p);cD.equal(g[0],l),g.length===1?t.delete(p):(g.shift(),typeof g[0]=="function"?h.add(g[0]):g[0].forEach(y=>h.add(y)))}),f.forEach(p=>{let g=t.get(p);cD(g[0]instanceof Set),g[0].size===1&&g.length===1?t.delete(p):g[0].size===1?(g.shift(),h.add(g[0])):g[0].delete(l)}),i.delete(l),h.forEach(p=>o(p)),!0};return{check:s,reserve:(l,c)=>{l=VO?["win32 parallelization disabled"]:l.map(h=>zO(WO(hD(h))).toLowerCase());let f=new Set(l.map(h=>r(h)).reduce((h,p)=>h.concat(p)));return e.set(c,{dirs:f,paths:l}),l.forEach(h=>{let p=t.get(h);p?p.push(c):t.set(h,[c])}),f.forEach(h=>{let p=t.get(h);p?p[p.length-1]instanceof Set?p[p.length-1].add(c):p.push(new Set([c])):t.set(h,[new Set([c])])}),o(c)}}}});var gD=$((yI,mD)=>{var KO=process.env.__FAKE_PLATFORM__||process.platform,ZO=KO==="win32",JO=global.__FAKE_TESTING_FS__||require("fs"),{O_CREAT:XO,O_TRUNC:QO,O_WRONLY:ek,UV_FS_O_FILEMAP:dD=0}=JO.constants,tk=ZO&&!!dD,rk=512*1024,ik=dD|QO|XO|ek;mD.exports=tk?t=>t<rk?ik:"w":()=>"w"});var Fh=$((EI,OD)=>{"use strict";var nk=require("assert"),sk=Uo(),ue=require("fs"),ok=Ki(),er=require("path"),xD=uD(),yD=Rc(),ak=pD(),uk=Fc(),tt=Ni(),lk=$i(),ck=bh(),ED=Symbol("onEntry"),Sh=Symbol("checkFs"),DD=Symbol("checkFs2"),ea=Symbol("pruneCache"),Ah=Symbol("isReusable"),lt=Symbol("makeFs"),vh=Symbol("file"),Ch=Symbol("directory"),ta=Symbol("link"),bD=Symbol("symlink"),_D=Symbol("hardlink"),wD=Symbol("unsupported"),SD=Symbol("checkPath"),Cr=Symbol("mkdir"),Me=Symbol("onError"),Xo=Symbol("pending"),AD=Symbol("pend"),en=Symbol("unpend"),_h=Symbol("ended"),wh=Symbol("maybeClose"),xh=Symbol("skip"),$n=Symbol("doChown"),Hn=Symbol("uid"),qn=Symbol("gid"),Un=Symbol("checkedCwd"),RD=require("crypto"),FD=gD(),hk=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Gn=hk==="win32",fk=(t,e)=>{if(!Gn)return ue.unlink(t,e);let r=t+".DELETE."+RD.randomBytes(16).toString("hex");ue.rename(t,r,i=>{if(i)return e(i);ue.unlink(r,e)})},pk=t=>{if(!Gn)return ue.unlinkSync(t);let e=t+".DELETE."+RD.randomBytes(16).toString("hex");ue.renameSync(t,e),ue.unlinkSync(e)},vD=(t,e,r)=>t===t>>>0?t:e===e>>>0?e:r,CD=t=>ck(lk(tt(t))).toLowerCase(),dk=(t,e)=>{e=CD(e);for(let r of t.keys()){let i=CD(r);(i===e||i.indexOf(e+"/")===0)&&t.delete(r)}},mk=t=>{for(let e of t.keys())t.delete(e)},zn=class extends sk{constructor(e){if(e||(e={}),e.ondone=r=>{this[_h]=!0,this[wh]()},super(e),this[Un]=!1,this.reservations=ak(),this.transform=typeof e.transform=="function"?e.transform:null,this.writable=!0,this.readable=!1,this[Xo]=0,this[_h]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||Gn,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=tt(er.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",r=>this[ED](r))}warn(e,r,i={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(i.recoverable=!1),super.warn(e,r,i)}[wh](){this[_h]&&this[Xo]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[SD](e){if(this.strip){let r=tt(e.path).split("/");if(r.length<this.strip)return!1;if(e.path=r.slice(this.strip).join("/"),e.type==="Link"){let i=tt(e.linkpath).split("/");if(i.length>=this.strip)e.linkpath=i.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let r=tt(e.path),i=r.split("/");if(i.includes("..")||Gn&&/^[a-z]:\.\.$/i.test(i[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:r}),!1;let[n,s]=uk(r);n&&(e.path=s,this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:e,path:r}))}if(er.isAbsolute(e.path)?e.absolute=tt(er.resolve(e.path)):e.absolute=tt(er.resolve(this.cwd,e.path)),!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:tt(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir")return!1;if(this.win32){let{root:r}=er.win32.parse(e.absolute);e.absolute=r+yD.encode(e.absolute.slice(r.length));let{root:i}=er.win32.parse(e.path);e.path=i+yD.encode(e.path.slice(i.length))}return!0}[ED](e){if(!this[SD](e))return e.resume();switch(nk.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Sh](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[wD](e)}}[Me](e,r){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:r}),this[en](),r.resume())}[Cr](e,r,i){xD(tt(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r,noChmod:this.noChmod},i)}[$n](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[Hn](e){return vD(this.uid,e.uid,this.processUid)}[qn](e){return vD(this.gid,e.gid,this.processGid)}[vh](e,r){let i=e.mode&4095||this.fmode,n=new ok.WriteStream(e.absolute,{flags:FD(e.size),mode:i,autoClose:!1});n.on("error",u=>{n.fd&&ue.close(n.fd,()=>{}),n.write=()=>!0,this[Me](u,e),r()});let s=1,o=u=>{if(u){n.fd&&ue.close(n.fd,()=>{}),this[Me](u,e),r();return}--s===0&&ue.close(n.fd,l=>{l?this[Me](l,e):this[en](),r()})};n.on("finish",u=>{let l=e.absolute,c=n.fd;if(e.mtime&&!this.noMtime){s++;let f=e.atime||new Date,h=e.mtime;ue.futimes(c,f,h,p=>p?ue.utimes(l,f,h,g=>o(g&&p)):o())}if(this[$n](e)){s++;let f=this[Hn](e),h=this[qn](e);ue.fchown(c,f,h,p=>p?ue.chown(l,f,h,g=>o(g&&p)):o())}o()});let a=this.transform&&this.transform(e)||e;a!==e&&(a.on("error",u=>{this[Me](u,e),r()}),e.pipe(a)),a.pipe(n)}[Ch](e,r){let i=e.mode&4095||this.dmode;this[Cr](e.absolute,i,n=>{if(n){this[Me](n,e),r();return}let s=1,o=a=>{--s===0&&(r(),this[en](),e.resume())};e.mtime&&!this.noMtime&&(s++,ue.utimes(e.absolute,e.atime||new Date,e.mtime,o)),this[$n](e)&&(s++,ue.chown(e.absolute,this[Hn](e),this[qn](e),o)),o()})}[wD](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[bD](e,r){this[ta](e,e.linkpath,"symlink",r)}[_D](e,r){let i=tt(er.resolve(this.cwd,e.linkpath));this[ta](e,i,"link",r)}[AD](){this[Xo]++}[en](){this[Xo]--,this[wh]()}[xh](e){this[en](),e.resume()}[Ah](e,r){return e.type==="File"&&!this.unlink&&r.isFile()&&r.nlink<=1&&!Gn}[Sh](e){this[AD]();let r=[e.path];e.linkpath&&r.push(e.linkpath),this.reservations.reserve(r,i=>this[DD](e,i))}[ea](e){e.type==="SymbolicLink"?mk(this.dirCache):e.type!=="Directory"&&dk(this.dirCache,e.absolute)}[DD](e,r){this[ea](e);let i=a=>{this[ea](e),r(a)},n=()=>{this[Cr](this.cwd,this.dmode,a=>{if(a){this[Me](a,e),i();return}this[Un]=!0,s()})},s=()=>{if(e.absolute!==this.cwd){let a=tt(er.dirname(e.absolute));if(a!==this.cwd)return this[Cr](a,this.dmode,u=>{if(u){this[Me](u,e),i();return}o()})}o()},o=()=>{ue.lstat(e.absolute,(a,u)=>{if(u&&(this.keep||this.newer&&u.mtime>e.mtime)){this[xh](e),i();return}if(a||this[Ah](e,u))return this[lt](null,e,i);if(u.isDirectory()){if(e.type==="Directory"){let l=!this.noChmod&&e.mode&&(u.mode&4095)!==e.mode,c=f=>this[lt](f,e,i);return l?ue.chmod(e.absolute,e.mode,c):c()}if(e.absolute!==this.cwd)return ue.rmdir(e.absolute,l=>this[lt](l,e,i))}if(e.absolute===this.cwd)return this[lt](null,e,i);fk(e.absolute,l=>this[lt](l,e,i))})};this[Un]?s():n()}[lt](e,r,i){if(e){this[Me](e,r),i();return}switch(r.type){case"File":case"OldFile":case"ContiguousFile":return this[vh](r,i);case"Link":return this[_D](r,i);case"SymbolicLink":return this[bD](r,i);case"Directory":case"GNUDumpDir":return this[Ch](r,i)}}[ta](e,r,i,n){ue[i](r,e.absolute,s=>{s?this[Me](s,e):(this[en](),e.resume()),n()})}},Qo=t=>{try{return[null,t()]}catch(e){return[e,null]}},Rh=class extends zn{[lt](e,r){return super[lt](e,r,()=>{})}[Sh](e){if(this[ea](e),!this[Un]){let s=this[Cr](this.cwd,this.dmode);if(s)return this[Me](s,e);this[Un]=!0}if(e.absolute!==this.cwd){let s=tt(er.dirname(e.absolute));if(s!==this.cwd){let o=this[Cr](s,this.dmode);if(o)return this[Me](o,e)}}let[r,i]=Qo(()=>ue.lstatSync(e.absolute));if(i&&(this.keep||this.newer&&i.mtime>e.mtime))return this[xh](e);if(r||this[Ah](e,i))return this[lt](null,e);if(i.isDirectory()){if(e.type==="Directory"){let o=!this.noChmod&&e.mode&&(i.mode&4095)!==e.mode,[a]=o?Qo(()=>{ue.chmodSync(e.absolute,e.mode)}):[];return this[lt](a,e)}let[s]=Qo(()=>ue.rmdirSync(e.absolute));this[lt](s,e)}let[n]=e.absolute===this.cwd?[]:Qo(()=>pk(e.absolute));this[lt](n,e)}[vh](e,r){let i=e.mode&4095||this.fmode,n=a=>{let u;try{ue.closeSync(s)}catch(l){u=l}(a||u)&&this[Me](a||u,e),r()},s;try{s=ue.openSync(e.absolute,FD(e.size),i)}catch(a){return n(a)}let o=this.transform&&this.transform(e)||e;o!==e&&(o.on("error",a=>this[Me](a,e)),e.pipe(o)),o.on("data",a=>{try{ue.writeSync(s,a,0,a.length)}catch(u){n(u)}}),o.on("end",a=>{let u=null;if(e.mtime&&!this.noMtime){let l=e.atime||new Date,c=e.mtime;try{ue.futimesSync(s,l,c)}catch(f){try{ue.utimesSync(e.absolute,l,c)}catch{u=f}}}if(this[$n](e)){let l=this[Hn](e),c=this[qn](e);try{ue.fchownSync(s,l,c)}catch(f){try{ue.chownSync(e.absolute,l,c)}catch{u=u||f}}}n(u)})}[Ch](e,r){let i=e.mode&4095||this.dmode,n=this[Cr](e.absolute,i);if(n){this[Me](n,e),r();return}if(e.mtime&&!this.noMtime)try{ue.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[$n](e))try{ue.chownSync(e.absolute,this[Hn](e),this[qn](e))}catch{}r(),e.resume()}[Cr](e,r){try{return xD.sync(tt(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r})}catch(i){return i}}[ta](e,r,i,n){try{ue[i+"Sync"](r,e.absolute),n(),e.resume()}catch(s){return this[Me](s,e)}}};zn.Sync=Rh;OD.exports=zn});var PD=$((DI,BD)=>{"use strict";var gk=Ti(),ra=Fh(),TD=require("fs"),LD=Ki(),kD=require("path"),Oh=$i();BD.exports=(t,e,r)=>{typeof t=="function"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(r=e,e=null),e?e=Array.from(e):e=[];let i=gk(t);if(i.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return e.length&&yk(i,e),i.file&&i.sync?Ek(i):i.file?Dk(i,r):i.sync?bk(i):_k(i)};var yk=(t,e)=>{let r=new Map(e.map(s=>[Oh(s),!0])),i=t.filter,n=(s,o)=>{let a=o||kD.parse(s).root||".",u=s===a?!1:r.has(s)?r.get(s):n(kD.dirname(s),a);return r.set(s,u),u};t.filter=i?(s,o)=>i(s,o)&&n(Oh(s)):s=>n(Oh(s))},Ek=t=>{let e=new ra.Sync(t),r=t.file,i=TD.statSync(r),n=t.maxReadSize||16*1024*1024;new LD.ReadStreamSync(r,{readSize:n,size:i.size}).pipe(e)},Dk=(t,e)=>{let r=new ra(t),i=t.maxReadSize||16*1024*1024,n=t.file,s=new Promise((o,a)=>{r.on("error",a),r.on("close",o),TD.stat(n,(u,l)=>{if(u)a(u);else{let c=new LD.ReadStream(n,{readSize:i,size:l.size});c.on("error",a),c.pipe(r)}})});return e?s.then(e,e):s},bk=t=>new ra.Sync(t),_k=t=>new ra(t)});var ID=$(Ce=>{"use strict";Ce.c=Ce.create=yE();Ce.r=Ce.replace=hh();Ce.t=Ce.list=Go();Ce.u=Ce.update=CE();Ce.x=Ce.extract=PD();Ce.Pack=Fo();Ce.Unpack=Fh();Ce.Parse=Uo();Ce.ReadEntry=ho();Ce.WriteEntry=jc();Ce.Header=ji();Ce.Pax=po();Ce.types=_c()});var qD=$((AI,HD)=>{function ct(t,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}HD.exports=ct;ct.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};ct.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};ct.prototype.retry=function(t){if(this._timeout&&clearTimeout(this._timeout),!t)return!1;var e=new Date().getTime();if(t&&e-this._operationStart>=this._maxRetryTime)return this._errors.push(t),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(t);var r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1);else return!1;var i=this;return this._timer=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},r),this._options.unref&&this._timer.unref(),!0};ct.prototype.attempt=function(t,e){this._fn=t,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};ct.prototype.try=function(t){console.log("Using RetryOperation.try() is deprecated"),this.attempt(t)};ct.prototype.start=function(t){console.log("Using RetryOperation.start() is deprecated"),this.attempt(t)};ct.prototype.start=ct.prototype.try;ct.prototype.errors=function(){return this._errors};ct.prototype.attempts=function(){return this._attempts};ct.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},e=null,r=0,i=0;i<this._errors.length;i++){var n=this._errors[i],s=n.message,o=(t[s]||0)+1;t[s]=o,o>=r&&(e=n,r=o)}return e}});var UD=$(ti=>{var vk=qD();ti.operation=function(t){var e=ti.timeouts(t);return new vk(e,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})};ti.timeouts=function(t){if(t instanceof Array)return[].concat(t);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var r in t)e[r]=t[r];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var i=[],n=0;n<e.retries;n++)i.push(this.createTimeout(n,e));return t&&t.forever&&!i.length&&i.push(this.createTimeout(n,e)),i.sort(function(s,o){return s-o}),i};ti.createTimeout=function(t,e){var r=e.randomize?Math.random()+1:1,i=Math.round(r*Math.max(e.minTimeout,1)*Math.pow(e.factor,t));return i=Math.min(i,e.maxTimeout),i};ti.wrap=function(t,e,r){if(e instanceof Array&&(r=e,e=null),!r){r=[];for(var i in t)typeof t[i]=="function"&&r.push(i)}for(var n=0;n<r.length;n++){var s=r[n],o=t[s];t[s]=function(u){var l=ti.operation(e),c=Array.prototype.slice.call(arguments,1),f=c.pop();c.push(function(h){l.retry(h)||(h&&(arguments[0]=l.mainError()),f.apply(this,arguments))}),l.attempt(function(){u.apply(t,c)})}.bind(t,o),t[s].options=e}}});var zD=$((CI,GD)=>{GD.exports=UD()});var YD=$((xI,WD)=>{var Ck=zD();function xk(t,e){function r(i,n){var s=e||{},o;"randomize"in s||(s.randomize=!0),o=Ck.operation(s);function a(c){n(c||new Error("Aborted"))}function u(c,f){if(c.bail){a(c);return}o.retry(c)?s.onRetry&&s.onRetry(c,f):n(o.mainError())}function l(c){var f;try{f=t(a,c)}catch(h){u(h,c);return}Promise.resolve(f).then(i).catch(function(p){u(p,c)})}o.attempt(l)}return new Promise(r)}WD.exports=xk});var Kb=J(require("chalk"));var n_=J(tf());function Sa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cn(t){return cn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cn(t)}function Aa(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function va(t,e){if(e&&(cn(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Aa(t)}function Lr(t){return Lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lr(t)}function Nt(t,e){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},Nt(t,e)}function Ca(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nt(t,e)}function xa(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Ra(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ai(t,e,r){return Ra()?ai=Reflect.construct.bind():ai=function(n,s,o){var a=[null];a.push.apply(a,s);var u=Function.bind.apply(n,a),l=new u;return o&&Nt(l,o.prototype),l},ai.apply(null,arguments)}function hn(t){var e=typeof Map=="function"?new Map:void 0;return hn=function(i){if(i===null||!xa(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(i))return e.get(i);e.set(i,n)}function n(){return ai(i,arguments,Lr(this).constructor)}return n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Nt(n,i)},hn(t)}var rf=J(require("find-up"));var s_=J(require("fs-extra")),aB=function(t){Ca(e,t);function e(r){var i;return Sa(this,e),i=va(this,Lr(e).call(this,"No package.json could be found upwards from the directory ".concat(r))),i.directory=r,i}return e}(hn(Error));var o_=J(require("fs")),a_=J(require("path"));var HC=J(require("fs")),qC=J(require("path"));function Df(t){return typeof t=="undefined"||t===null}function c_(t){return typeof t=="object"&&t!==null}function h_(t){return Array.isArray(t)?t:Df(t)?[]:[t]}function f_(t,e){var r,i,n,s;if(e)for(s=Object.keys(e),r=0,i=s.length;r<i;r+=1)n=s[r],t[n]=e[n];return t}function p_(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function d_(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var m_=Df,g_=c_,y_=h_,E_=p_,D_=d_,b_=f_,ve={isNothing:m_,isObject:g_,toArray:y_,repeat:E_,isNegativeZero:D_,extend:b_};function bf(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
10
10
 
11
- `+t.mark.snippet),i+" "+r):i}function fn(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Df(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}fn.prototype=Object.create(Error.prototype);fn.prototype.constructor=fn;fn.prototype.toString=function(e){return this.name+": "+Df(this,e)};var He=fn;function Fa(t,e,r,i,n){var s="",o="",a=Math.floor(n/2)-1;return i-e>a&&(s=" ... ",e=i-a+s.length),r-i>a&&(o=" ...",r=i+a-o.length),{str:s+t.slice(e,r).replace(/\t/g,"\u2192")+o,pos:i-e+s.length}}function Oa(t,e){return ve.repeat(" ",e-t.length)+t}function __(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],s,o=-1;s=r.exec(t.buffer);)n.push(s.index),i.push(s.index+s[0].length),t.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var a="",u,l,c=Math.min(t.line+e.linesAfter,n.length).toString().length,f=e.maxLength-(e.indent+c+3);for(u=1;u<=e.linesBefore&&!(o-u<0);u++)l=Fa(t.buffer,i[o-u],n[o-u],t.position-(i[o]-i[o-u]),f),a=ve.repeat(" ",e.indent)+Oa((t.line-u+1).toString(),c)+" | "+l.str+`
11
+ `+t.mark.snippet),i+" "+r):i}function pn(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=bf(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}pn.prototype=Object.create(Error.prototype);pn.prototype.constructor=pn;pn.prototype.toString=function(e){return this.name+": "+bf(this,e)};var He=pn;function Fa(t,e,r,i,n){var s="",o="",a=Math.floor(n/2)-1;return i-e>a&&(s=" ... ",e=i-a+s.length),r-i>a&&(o=" ...",r=i+a-o.length),{str:s+t.slice(e,r).replace(/\t/g,"\u2192")+o,pos:i-e+s.length}}function Oa(t,e){return ve.repeat(" ",e-t.length)+t}function __(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],s,o=-1;s=r.exec(t.buffer);)n.push(s.index),i.push(s.index+s[0].length),t.position<=s.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var a="",u,l,c=Math.min(t.line+e.linesAfter,n.length).toString().length,f=e.maxLength-(e.indent+c+3);for(u=1;u<=e.linesBefore&&!(o-u<0);u++)l=Fa(t.buffer,i[o-u],n[o-u],t.position-(i[o]-i[o-u]),f),a=ve.repeat(" ",e.indent)+Oa((t.line-u+1).toString(),c)+" | "+l.str+`
12
12
  `+a;for(l=Fa(t.buffer,i[o],n[o],t.position,f),a+=ve.repeat(" ",e.indent)+Oa((t.line+1).toString(),c)+" | "+l.str+`
13
13
  `,a+=ve.repeat("-",e.indent+c+3+l.pos)+`^
14
14
  `,u=1;u<=e.linesAfter&&!(o+u>=n.length);u++)l=Fa(t.buffer,i[o+u],n[o+u],t.position-(i[o]-i[o+u]),f),a+=ve.repeat(" ",e.indent)+Oa((t.line+u+1).toString(),c)+" | "+l.str+`
15
- `;return a.replace(/\n$/,"")}var w_=__,S_=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],A_=["scalar","sequence","mapping"];function v_(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function C_(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(S_.indexOf(r)===-1)throw new He('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=v_(e.styleAliases||null),A_.indexOf(this.kind)===-1)throw new He('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Oe=C_;function rf(t,e){var r=[];return t[e].forEach(function(i){var n=r.length;r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(n=o)}),r[n]=i}),r}function x_(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}function Ta(t){return this.extend(t)}Ta.prototype.extend=function(e){var r=[],i=[];if(e instanceof Oe)i.push(e);else if(Array.isArray(e))i=i.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(i=i.concat(e.explicit));else throw new He("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Oe))throw new He("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new He("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new He("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Oe))throw new He("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Ta.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=rf(n,"implicit"),n.compiledExplicit=rf(n,"explicit"),n.compiledTypeMap=x_(n.compiledImplicit,n.compiledExplicit),n};var bf=Ta,_f=new Oe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),wf=new Oe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Sf=new Oe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Af=new bf({explicit:[_f,wf,Sf]});function R_(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function F_(){return null}function O_(t){return t===null}var vf=new Oe("tag:yaml.org,2002:null",{kind:"scalar",resolve:R_,construct:F_,predicate:O_,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function k_(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function T_(t){return t==="true"||t==="True"||t==="TRUE"}function L_(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var Cf=new Oe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:k_,construct:T_,predicate:L_,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function B_(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function P_(t){return 48<=t&&t<=55}function I_(t){return 48<=t&&t<=57}function N_(t){if(t===null)return!1;var e=t.length,r=0,i=!1,n;if(!e)return!1;if(n=t[r],(n==="-"||n==="+")&&(n=t[++r]),n==="0"){if(r+1===e)return!0;if(n=t[++r],n==="b"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!B_(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!P_(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<e;r++)if(n=t[r],n!=="_"){if(!I_(t.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}function M_(t){var e=t,r=1,i;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),i=e[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),e=e.slice(1),i=e[0]),e==="0")return 0;if(i==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function j_(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!ve.isNegativeZero(t)}var xf=new Oe("tag:yaml.org,2002:int",{kind:"scalar",resolve:N_,construct:M_,predicate:j_,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),$_=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function H_(t){return!(t===null||!$_.test(t)||t[t.length-1]==="_")}function q_(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var U_=/^[-+]?[0-9]+e/;function G_(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ve.isNegativeZero(t))return"-0.0";return r=t.toString(10),U_.test(r)?r.replace("e",".e"):r}function z_(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||ve.isNegativeZero(t))}var Rf=new Oe("tag:yaml.org,2002:float",{kind:"scalar",resolve:H_,construct:q_,predicate:z_,represent:G_,defaultStyle:"lowercase"}),Ff=Af.extend({implicit:[vf,Cf,xf,Rf]}),Of=Ff,kf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Tf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function W_(t){return t===null?!1:kf.exec(t)!==null||Tf.exec(t)!==null}function Y_(t){var e,r,i,n,s,o,a,u=0,l=null,c,f,h;if(e=kf.exec(t),e===null&&(e=Tf.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(c=+e[10],f=+(e[11]||0),l=(c*60+f)*6e4,e[9]==="-"&&(l=-l)),h=new Date(Date.UTC(r,i,n,s,o,a,u)),l&&h.setTime(h.getTime()-l),h}function V_(t){return t.toISOString()}var Lf=new Oe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:W_,construct:Y_,instanceOf:Date,represent:V_});function K_(t){return t==="<<"||t===null}var Bf=new Oe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:K_}),Na=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
16
- \r`;function Z_(t){if(t===null)return!1;var e,r,i=0,n=t.length,s=Na;for(r=0;r<n;r++)if(e=s.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8===0}function J_(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,s=Na,o=0,a=[];for(e=0;e<n;e++)e%4===0&&e&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(e));return r=n%4*6,r===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):r===18?(a.push(o>>10&255),a.push(o>>2&255)):r===12&&a.push(o>>4&255),new Uint8Array(a)}function X_(t){var e="",r=0,i,n,s=t.length,o=Na;for(i=0;i<s;i++)i%3===0&&i&&(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[i];return n=s%3,n===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):n===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):n===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}function Q_(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var Pf=new Oe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Z_,construct:J_,predicate:Q_,represent:X_}),ew=Object.prototype.hasOwnProperty,tw=Object.prototype.toString;function rw(t){if(t===null)return!0;var e=[],r,i,n,s,o,a=t;for(r=0,i=a.length;r<i;r+=1){if(n=a[r],o=!1,tw.call(n)!=="[object Object]")return!1;for(s in n)if(ew.call(n,s))if(!o)o=!0;else return!1;if(!o)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}function iw(t){return t!==null?t:[]}var If=new Oe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:rw,construct:iw}),nw=Object.prototype.toString;function sw(t){if(t===null)return!0;var e,r,i,n,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(i=o[e],nw.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;s[e]=[n[0],i[n[0]]]}return!0}function ow(t){if(t===null)return[];var e,r,i,n,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1)i=o[e],n=Object.keys(i),s[e]=[n[0],i[n[0]]];return s}var Nf=new Oe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:sw,construct:ow}),aw=Object.prototype.hasOwnProperty;function uw(t){if(t===null)return!0;var e,r=t;for(e in r)if(aw.call(r,e)&&r[e]!==null)return!1;return!0}function lw(t){return t!==null?t:{}}var Mf=new Oe("tag:yaml.org,2002:set",{kind:"mapping",resolve:uw,construct:lw}),Ma=Of.extend({implicit:[Lf,Bf],explicit:[Pf,If,Nf,Mf]}),nr=Object.prototype.hasOwnProperty,is=1,jf=2,$f=3,ns=4,ka=1,cw=2,nf=3,hw=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,fw=/[\x85\u2028\u2029]/,pw=/[,\[\]\{\}]/,Hf=/^(?:!|!!|![a-z\-]+!)$/i,qf=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function sf(t){return Object.prototype.toString.call(t)}function Et(t){return t===10||t===13}function Tr(t){return t===9||t===32}function Ue(t){return t===9||t===32||t===10||t===13}function si(t){return t===44||t===91||t===93||t===123||t===125}function dw(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function mw(t){return t===120?2:t===117?4:t===85?8:0}function gw(t){return 48<=t&&t<=57?t-48:-1}function of(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
17
- `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function yw(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Uf=new Array(256),Gf=new Array(256);for(kr=0;kr<256;kr++)Uf[kr]=of(kr)?1:0,Gf[kr]=of(kr);var kr;function Ew(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Ma,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function zf(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=w_(r),new He(e,r)}function Q(t,e){throw zf(t,e)}function ss(t,e){t.onWarning&&t.onWarning.call(null,zf(t,e))}var af={YAML:function(e,r,i){var n,s,o;e.version!==null&&Q(e,"duplication of %YAML directive"),i.length!==1&&Q(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Q(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&&Q(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&ss(e,"unsupported YAML version of the document")},TAG:function(e,r,i){var n,s;i.length!==2&&Q(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],Hf.test(n)||Q(e,"ill-formed tag handle (first argument) of the TAG directive"),nr.call(e.tagMap,n)&&Q(e,'there is a previously declared suffix for "'+n+'" tag handle'),qf.test(s)||Q(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Q(e,"tag prefix is malformed: "+s)}e.tagMap[n]=s}};function ir(t,e,r,i){var n,s,o,a;if(e<r){if(a=t.input.slice(e,r),i)for(n=0,s=a.length;n<s;n+=1)o=a.charCodeAt(n),o===9||32<=o&&o<=1114111||Q(t,"expected valid JSON character");else hw.test(a)&&Q(t,"the stream contains non-printable characters");t.result+=a}}function uf(t,e,r,i){var n,s,o,a;for(ve.isObject(r)||Q(t,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),o=0,a=n.length;o<a;o+=1)s=n[o],nr.call(e,s)||(e[s]=r[s],i[s]=!0)}function oi(t,e,r,i,n,s,o,a,u){var l,c;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),l=0,c=n.length;l<c;l+=1)Array.isArray(n[l])&&Q(t,"nested arrays are not supported inside keys"),typeof n=="object"&&sf(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&sf(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(l=0,c=s.length;l<c;l+=1)uf(t,e,s[l],r);else uf(t,e,s,r);else!t.json&&!nr.call(r,n)&&nr.call(e,n)&&(t.line=o||t.line,t.lineStart=a||t.lineStart,t.position=u||t.position,Q(t,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:s}):e[n]=s,delete r[n];return e}function ja(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Q(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Se(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);n!==0;){for(;Tr(n);)n===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&n===35)do n=t.input.charCodeAt(++t.position);while(n!==10&&n!==13&&n!==0);if(Et(n))for(ja(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&ss(t,"deficient indentation"),i}function us(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Ue(r)))}function $a(t,e){e===1?t.result+=" ":e>1&&(t.result+=ve.repeat(`
18
- `,e-1))}function Dw(t,e,r){var i,n,s,o,a,u,l,c,f=t.kind,h=t.result,p;if(p=t.input.charCodeAt(t.position),Ue(p)||si(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(n=t.input.charCodeAt(t.position+1),Ue(n)||r&&si(n)))return!1;for(t.kind="scalar",t.result="",s=o=t.position,a=!1;p!==0;){if(p===58){if(n=t.input.charCodeAt(t.position+1),Ue(n)||r&&si(n))break}else if(p===35){if(i=t.input.charCodeAt(t.position-1),Ue(i))break}else{if(t.position===t.lineStart&&us(t)||r&&si(p))break;if(Et(p))if(u=t.line,l=t.lineStart,c=t.lineIndent,Se(t,!1,-1),t.lineIndent>=e){a=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=u,t.lineStart=l,t.lineIndent=c;break}}a&&(ir(t,s,o,!1),$a(t,t.line-u),s=o=t.position,a=!1),Tr(p)||(o=t.position+1),p=t.input.charCodeAt(++t.position)}return ir(t,s,o,!1),t.result?!0:(t.kind=f,t.result=h,!1)}function bw(t,e){var r,i,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(ir(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,n=t.position;else return!0;else Et(r)?(ir(t,i,n,!0),$a(t,Se(t,!1,e)),i=n=t.position):t.position===t.lineStart&&us(t)?Q(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);Q(t,"unexpected end of the stream within a single quoted scalar")}function _w(t,e){var r,i,n,s,o,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return ir(t,r,t.position,!0),t.position++,!0;if(a===92){if(ir(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),Et(a))Se(t,!1,e);else if(a<256&&Uf[a])t.result+=Gf[a],t.position++;else if((o=mw(a))>0){for(n=o,s=0;n>0;n--)a=t.input.charCodeAt(++t.position),(o=dw(a))>=0?s=(s<<4)+o:Q(t,"expected hexadecimal character");t.result+=yw(s),t.position++}else Q(t,"unknown escape sequence");r=i=t.position}else Et(a)?(ir(t,r,i,!0),$a(t,Se(t,!1,e)),r=i=t.position):t.position===t.lineStart&&us(t)?Q(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Q(t,"unexpected end of the stream within a double quoted scalar")}function ww(t,e){var r=!0,i,n,s,o=t.tag,a,u=t.anchor,l,c,f,h,p,d=Object.create(null),m,g,v,F;if(F=t.input.charCodeAt(t.position),F===91)c=93,p=!1,a=[];else if(F===123)c=125,p=!0,a={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),F=t.input.charCodeAt(++t.position);F!==0;){if(Se(t,!0,e),F=t.input.charCodeAt(t.position),F===c)return t.position++,t.tag=o,t.anchor=u,t.kind=p?"mapping":"sequence",t.result=a,!0;r?F===44&&Q(t,"expected the node content, but found ','"):Q(t,"missed comma between flow collection entries"),g=m=v=null,f=h=!1,F===63&&(l=t.input.charCodeAt(t.position+1),Ue(l)&&(f=h=!0,t.position++,Se(t,!0,e))),i=t.line,n=t.lineStart,s=t.position,ai(t,e,is,!1,!0),g=t.tag,m=t.result,Se(t,!0,e),F=t.input.charCodeAt(t.position),(h||t.line===i)&&F===58&&(f=!0,F=t.input.charCodeAt(++t.position),Se(t,!0,e),ai(t,e,is,!1,!0),v=t.result),p?oi(t,a,d,g,m,v,i,n,s):f?a.push(oi(t,null,d,g,m,v,i,n,s)):a.push(m),Se(t,!0,e),F=t.input.charCodeAt(t.position),F===44?(r=!0,F=t.input.charCodeAt(++t.position)):r=!1}Q(t,"unexpected end of the stream within a flow collection")}function Sw(t,e){var r,i,n=ka,s=!1,o=!1,a=e,u=0,l=!1,c,f;if(f=t.input.charCodeAt(t.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)ka===n?n=f===43?nf:cw:Q(t,"repeat of a chomping mode identifier");else if((c=gw(f))>=0)c===0?Q(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?Q(t,"repeat of an indentation width identifier"):(a=e+c-1,o=!0);else break;if(Tr(f)){do f=t.input.charCodeAt(++t.position);while(Tr(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!Et(f)&&f!==0)}for(;f!==0;){for(ja(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!o||t.lineIndent<a)&&f===32;)t.lineIndent++,f=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>a&&(a=t.lineIndent),Et(f)){u++;continue}if(t.lineIndent<a){n===nf?t.result+=ve.repeat(`
15
+ `;return a.replace(/\n$/,"")}var w_=__,S_=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],A_=["scalar","sequence","mapping"];function v_(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function C_(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(S_.indexOf(r)===-1)throw new He('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=v_(e.styleAliases||null),A_.indexOf(this.kind)===-1)throw new He('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Oe=C_;function nf(t,e){var r=[];return t[e].forEach(function(i){var n=r.length;r.forEach(function(s,o){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(n=o)}),r[n]=i}),r}function x_(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}function Ta(t){return this.extend(t)}Ta.prototype.extend=function(e){var r=[],i=[];if(e instanceof Oe)i.push(e);else if(Array.isArray(e))i=i.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(i=i.concat(e.explicit));else throw new He("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Oe))throw new He("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new He("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new He("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Oe))throw new He("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(Ta.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=nf(n,"implicit"),n.compiledExplicit=nf(n,"explicit"),n.compiledTypeMap=x_(n.compiledImplicit,n.compiledExplicit),n};var _f=Ta,wf=new Oe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),Sf=new Oe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Af=new Oe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),vf=new _f({explicit:[wf,Sf,Af]});function R_(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function F_(){return null}function O_(t){return t===null}var Cf=new Oe("tag:yaml.org,2002:null",{kind:"scalar",resolve:R_,construct:F_,predicate:O_,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function k_(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function T_(t){return t==="true"||t==="True"||t==="TRUE"}function L_(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var xf=new Oe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:k_,construct:T_,predicate:L_,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function B_(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function P_(t){return 48<=t&&t<=55}function I_(t){return 48<=t&&t<=57}function N_(t){if(t===null)return!1;var e=t.length,r=0,i=!1,n;if(!e)return!1;if(n=t[r],(n==="-"||n==="+")&&(n=t[++r]),n==="0"){if(r+1===e)return!0;if(n=t[++r],n==="b"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!B_(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!P_(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<e;r++)if(n=t[r],n!=="_"){if(!I_(t.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}function M_(t){var e=t,r=1,i;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),i=e[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),e=e.slice(1),i=e[0]),e==="0")return 0;if(i==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function j_(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!ve.isNegativeZero(t)}var Rf=new Oe("tag:yaml.org,2002:int",{kind:"scalar",resolve:N_,construct:M_,predicate:j_,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),$_=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function H_(t){return!(t===null||!$_.test(t)||t[t.length-1]==="_")}function q_(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var U_=/^[-+]?[0-9]+e/;function G_(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ve.isNegativeZero(t))return"-0.0";return r=t.toString(10),U_.test(r)?r.replace("e",".e"):r}function z_(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||ve.isNegativeZero(t))}var Ff=new Oe("tag:yaml.org,2002:float",{kind:"scalar",resolve:H_,construct:q_,predicate:z_,represent:G_,defaultStyle:"lowercase"}),Of=vf.extend({implicit:[Cf,xf,Rf,Ff]}),kf=Of,Tf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Lf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function W_(t){return t===null?!1:Tf.exec(t)!==null||Lf.exec(t)!==null}function Y_(t){var e,r,i,n,s,o,a,u=0,l=null,c,f,h;if(e=Tf.exec(t),e===null&&(e=Lf.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(c=+e[10],f=+(e[11]||0),l=(c*60+f)*6e4,e[9]==="-"&&(l=-l)),h=new Date(Date.UTC(r,i,n,s,o,a,u)),l&&h.setTime(h.getTime()-l),h}function V_(t){return t.toISOString()}var Bf=new Oe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:W_,construct:Y_,instanceOf:Date,represent:V_});function K_(t){return t==="<<"||t===null}var Pf=new Oe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:K_}),Na=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
16
+ \r`;function Z_(t){if(t===null)return!1;var e,r,i=0,n=t.length,s=Na;for(r=0;r<n;r++)if(e=s.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8===0}function J_(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,s=Na,o=0,a=[];for(e=0;e<n;e++)e%4===0&&e&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(e));return r=n%4*6,r===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):r===18?(a.push(o>>10&255),a.push(o>>2&255)):r===12&&a.push(o>>4&255),new Uint8Array(a)}function X_(t){var e="",r=0,i,n,s=t.length,o=Na;for(i=0;i<s;i++)i%3===0&&i&&(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[i];return n=s%3,n===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):n===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):n===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}function Q_(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var If=new Oe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Z_,construct:J_,predicate:Q_,represent:X_}),ew=Object.prototype.hasOwnProperty,tw=Object.prototype.toString;function rw(t){if(t===null)return!0;var e=[],r,i,n,s,o,a=t;for(r=0,i=a.length;r<i;r+=1){if(n=a[r],o=!1,tw.call(n)!=="[object Object]")return!1;for(s in n)if(ew.call(n,s))if(!o)o=!0;else return!1;if(!o)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}function iw(t){return t!==null?t:[]}var Nf=new Oe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:rw,construct:iw}),nw=Object.prototype.toString;function sw(t){if(t===null)return!0;var e,r,i,n,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(i=o[e],nw.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;s[e]=[n[0],i[n[0]]]}return!0}function ow(t){if(t===null)return[];var e,r,i,n,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1)i=o[e],n=Object.keys(i),s[e]=[n[0],i[n[0]]];return s}var Mf=new Oe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:sw,construct:ow}),aw=Object.prototype.hasOwnProperty;function uw(t){if(t===null)return!0;var e,r=t;for(e in r)if(aw.call(r,e)&&r[e]!==null)return!1;return!0}function lw(t){return t!==null?t:{}}var jf=new Oe("tag:yaml.org,2002:set",{kind:"mapping",resolve:uw,construct:lw}),Ma=kf.extend({implicit:[Bf,Pf],explicit:[If,Nf,Mf,jf]}),nr=Object.prototype.hasOwnProperty,is=1,$f=2,Hf=3,ns=4,ka=1,cw=2,sf=3,hw=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,fw=/[\x85\u2028\u2029]/,pw=/[,\[\]\{\}]/,qf=/^(?:!|!!|![a-z\-]+!)$/i,Uf=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function of(t){return Object.prototype.toString.call(t)}function Et(t){return t===10||t===13}function Pr(t){return t===9||t===32}function Ue(t){return t===9||t===32||t===10||t===13}function li(t){return t===44||t===91||t===93||t===123||t===125}function dw(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function mw(t){return t===120?2:t===117?4:t===85?8:0}function gw(t){return 48<=t&&t<=57?t-48:-1}function af(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
17
+ `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function yw(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Gf=new Array(256),zf=new Array(256);for(Br=0;Br<256;Br++)Gf[Br]=af(Br)?1:0,zf[Br]=af(Br);var Br;function Ew(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Ma,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Wf(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=w_(r),new He(e,r)}function ee(t,e){throw Wf(t,e)}function ss(t,e){t.onWarning&&t.onWarning.call(null,Wf(t,e))}var uf={YAML:function(e,r,i){var n,s,o;e.version!==null&&ee(e,"duplication of %YAML directive"),i.length!==1&&ee(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&ee(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&&ee(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&ss(e,"unsupported YAML version of the document")},TAG:function(e,r,i){var n,s;i.length!==2&&ee(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],qf.test(n)||ee(e,"ill-formed tag handle (first argument) of the TAG directive"),nr.call(e.tagMap,n)&&ee(e,'there is a previously declared suffix for "'+n+'" tag handle'),Uf.test(s)||ee(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{ee(e,"tag prefix is malformed: "+s)}e.tagMap[n]=s}};function ir(t,e,r,i){var n,s,o,a;if(e<r){if(a=t.input.slice(e,r),i)for(n=0,s=a.length;n<s;n+=1)o=a.charCodeAt(n),o===9||32<=o&&o<=1114111||ee(t,"expected valid JSON character");else hw.test(a)&&ee(t,"the stream contains non-printable characters");t.result+=a}}function lf(t,e,r,i){var n,s,o,a;for(ve.isObject(r)||ee(t,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),o=0,a=n.length;o<a;o+=1)s=n[o],nr.call(e,s)||(e[s]=r[s],i[s]=!0)}function ci(t,e,r,i,n,s,o,a,u){var l,c;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),l=0,c=n.length;l<c;l+=1)Array.isArray(n[l])&&ee(t,"nested arrays are not supported inside keys"),typeof n=="object"&&of(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&of(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(l=0,c=s.length;l<c;l+=1)lf(t,e,s[l],r);else lf(t,e,s,r);else!t.json&&!nr.call(r,n)&&nr.call(e,n)&&(t.line=o||t.line,t.lineStart=a||t.lineStart,t.position=u||t.position,ee(t,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:s}):e[n]=s,delete r[n];return e}function ja(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):ee(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Se(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);n!==0;){for(;Pr(n);)n===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&n===35)do n=t.input.charCodeAt(++t.position);while(n!==10&&n!==13&&n!==0);if(Et(n))for(ja(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&ss(t,"deficient indentation"),i}function us(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Ue(r)))}function $a(t,e){e===1?t.result+=" ":e>1&&(t.result+=ve.repeat(`
18
+ `,e-1))}function Dw(t,e,r){var i,n,s,o,a,u,l,c,f=t.kind,h=t.result,p;if(p=t.input.charCodeAt(t.position),Ue(p)||li(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(n=t.input.charCodeAt(t.position+1),Ue(n)||r&&li(n)))return!1;for(t.kind="scalar",t.result="",s=o=t.position,a=!1;p!==0;){if(p===58){if(n=t.input.charCodeAt(t.position+1),Ue(n)||r&&li(n))break}else if(p===35){if(i=t.input.charCodeAt(t.position-1),Ue(i))break}else{if(t.position===t.lineStart&&us(t)||r&&li(p))break;if(Et(p))if(u=t.line,l=t.lineStart,c=t.lineIndent,Se(t,!1,-1),t.lineIndent>=e){a=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=u,t.lineStart=l,t.lineIndent=c;break}}a&&(ir(t,s,o,!1),$a(t,t.line-u),s=o=t.position,a=!1),Pr(p)||(o=t.position+1),p=t.input.charCodeAt(++t.position)}return ir(t,s,o,!1),t.result?!0:(t.kind=f,t.result=h,!1)}function bw(t,e){var r,i,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(ir(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,n=t.position;else return!0;else Et(r)?(ir(t,i,n,!0),$a(t,Se(t,!1,e)),i=n=t.position):t.position===t.lineStart&&us(t)?ee(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);ee(t,"unexpected end of the stream within a single quoted scalar")}function _w(t,e){var r,i,n,s,o,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return ir(t,r,t.position,!0),t.position++,!0;if(a===92){if(ir(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),Et(a))Se(t,!1,e);else if(a<256&&Gf[a])t.result+=zf[a],t.position++;else if((o=mw(a))>0){for(n=o,s=0;n>0;n--)a=t.input.charCodeAt(++t.position),(o=dw(a))>=0?s=(s<<4)+o:ee(t,"expected hexadecimal character");t.result+=yw(s),t.position++}else ee(t,"unknown escape sequence");r=i=t.position}else Et(a)?(ir(t,r,i,!0),$a(t,Se(t,!1,e)),r=i=t.position):t.position===t.lineStart&&us(t)?ee(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}ee(t,"unexpected end of the stream within a double quoted scalar")}function ww(t,e){var r=!0,i,n,s,o=t.tag,a,u=t.anchor,l,c,f,h,p,g=Object.create(null),y,E,v,F;if(F=t.input.charCodeAt(t.position),F===91)c=93,p=!1,a=[];else if(F===123)c=125,p=!0,a={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),F=t.input.charCodeAt(++t.position);F!==0;){if(Se(t,!0,e),F=t.input.charCodeAt(t.position),F===c)return t.position++,t.tag=o,t.anchor=u,t.kind=p?"mapping":"sequence",t.result=a,!0;r?F===44&&ee(t,"expected the node content, but found ','"):ee(t,"missed comma between flow collection entries"),E=y=v=null,f=h=!1,F===63&&(l=t.input.charCodeAt(t.position+1),Ue(l)&&(f=h=!0,t.position++,Se(t,!0,e))),i=t.line,n=t.lineStart,s=t.position,hi(t,e,is,!1,!0),E=t.tag,y=t.result,Se(t,!0,e),F=t.input.charCodeAt(t.position),(h||t.line===i)&&F===58&&(f=!0,F=t.input.charCodeAt(++t.position),Se(t,!0,e),hi(t,e,is,!1,!0),v=t.result),p?ci(t,a,g,E,y,v,i,n,s):f?a.push(ci(t,null,g,E,y,v,i,n,s)):a.push(y),Se(t,!0,e),F=t.input.charCodeAt(t.position),F===44?(r=!0,F=t.input.charCodeAt(++t.position)):r=!1}ee(t,"unexpected end of the stream within a flow collection")}function Sw(t,e){var r,i,n=ka,s=!1,o=!1,a=e,u=0,l=!1,c,f;if(f=t.input.charCodeAt(t.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)ka===n?n=f===43?sf:cw:ee(t,"repeat of a chomping mode identifier");else if((c=gw(f))>=0)c===0?ee(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?ee(t,"repeat of an indentation width identifier"):(a=e+c-1,o=!0);else break;if(Pr(f)){do f=t.input.charCodeAt(++t.position);while(Pr(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!Et(f)&&f!==0)}for(;f!==0;){for(ja(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!o||t.lineIndent<a)&&f===32;)t.lineIndent++,f=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>a&&(a=t.lineIndent),Et(f)){u++;continue}if(t.lineIndent<a){n===sf?t.result+=ve.repeat(`
19
19
  `,s?1+u:u):n===ka&&s&&(t.result+=`
20
- `);break}for(i?Tr(f)?(l=!0,t.result+=ve.repeat(`
20
+ `);break}for(i?Pr(f)?(l=!0,t.result+=ve.repeat(`
21
21
  `,s?1+u:u)):l?(l=!1,t.result+=ve.repeat(`
22
22
  `,u+1)):u===0?s&&(t.result+=" "):t.result+=ve.repeat(`
23
23
  `,u):t.result+=ve.repeat(`
24
- `,s?1+u:u),s=!0,o=!0,u=0,r=t.position;!Et(f)&&f!==0;)f=t.input.charCodeAt(++t.position);ir(t,r,t.position,!1)}return!0}function lf(t,e){var r,i=t.tag,n=t.anchor,s=[],o,a=!1,u;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),u=t.input.charCodeAt(t.position);u!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Q(t,"tab characters must not be used in indentation")),!(u!==45||(o=t.input.charCodeAt(t.position+1),!Ue(o))));){if(a=!0,t.position++,Se(t,!0,-1)&&t.lineIndent<=e){s.push(null),u=t.input.charCodeAt(t.position);continue}if(r=t.line,ai(t,e,$f,!1,!0),s.push(t.result),Se(t,!0,-1),u=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&u!==0)Q(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=i,t.anchor=n,t.kind="sequence",t.result=s,!0):!1}function Aw(t,e,r){var i,n,s,o,a,u,l=t.tag,c=t.anchor,f={},h=Object.create(null),p=null,d=null,m=null,g=!1,v=!1,F;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),F=t.input.charCodeAt(t.position);F!==0;){if(!g&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Q(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),s=t.line,(F===63||F===58)&&Ue(i))F===63?(g&&(oi(t,f,h,p,d,null,o,a,u),p=d=m=null),v=!0,g=!0,n=!0):g?(g=!1,n=!0):Q(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,F=i;else{if(o=t.line,a=t.lineStart,u=t.position,!ai(t,r,jf,!1,!0))break;if(t.line===s){for(F=t.input.charCodeAt(t.position);Tr(F);)F=t.input.charCodeAt(++t.position);if(F===58)F=t.input.charCodeAt(++t.position),Ue(F)||Q(t,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(oi(t,f,h,p,d,null,o,a,u),p=d=m=null),v=!0,g=!1,n=!1,p=t.tag,d=t.result;else if(v)Q(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=l,t.anchor=c,!0}else if(v)Q(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=l,t.anchor=c,!0}if((t.line===s||t.lineIndent>e)&&(g&&(o=t.line,a=t.lineStart,u=t.position),ai(t,e,ns,!0,n)&&(g?d=t.result:m=t.result),g||(oi(t,f,h,p,d,m,o,a,u),p=d=m=null),Se(t,!0,-1),F=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&F!==0)Q(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return g&&oi(t,f,h,p,d,null,o,a,u),v&&(t.tag=l,t.anchor=c,t.kind="mapping",t.result=f),v}function vw(t){var e,r=!1,i=!1,n,s,o;if(o=t.input.charCodeAt(t.position),o!==33)return!1;if(t.tag!==null&&Q(t,"duplication of a tag property"),o=t.input.charCodeAt(++t.position),o===60?(r=!0,o=t.input.charCodeAt(++t.position)):o===33?(i=!0,n="!!",o=t.input.charCodeAt(++t.position)):n="!",e=t.position,r){do o=t.input.charCodeAt(++t.position);while(o!==0&&o!==62);t.position<t.length?(s=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):Q(t,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Ue(o);)o===33&&(i?Q(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),Hf.test(n)||Q(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),pw.test(s)&&Q(t,"tag suffix cannot contain flow indicator characters")}s&&!qf.test(s)&&Q(t,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Q(t,"tag name is malformed: "+s)}return r?t.tag=s:nr.call(t.tagMap,n)?t.tag=t.tagMap[n]+s:n==="!"?t.tag="!"+s:n==="!!"?t.tag="tag:yaml.org,2002:"+s:Q(t,'undeclared tag handle "'+n+'"'),!0}function Cw(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Q(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Ue(r)&&!si(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Q(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function xw(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!Ue(i)&&!si(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Q(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),nr.call(t.anchorMap,r)||Q(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Se(t,!0,-1),!0}function ai(t,e,r,i,n){var s,o,a,u=1,l=!1,c=!1,f,h,p,d,m,g;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=o=a=ns===r||$f===r,i&&Se(t,!0,-1)&&(l=!0,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)),u===1)for(;vw(t)||Cw(t);)Se(t,!0,-1)?(l=!0,a=s,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)):a=!1;if(a&&(a=l||n),(u===1||ns===r)&&(is===r||jf===r?m=e:m=e+1,g=t.position-t.lineStart,u===1?a&&(lf(t,g)||Aw(t,g,m))||ww(t,m)?c=!0:(o&&Sw(t,m)||bw(t,m)||_w(t,m)?c=!0:xw(t)?(c=!0,(t.tag!==null||t.anchor!==null)&&Q(t,"alias node should not have any properties")):Dw(t,m,is===r)&&(c=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):u===0&&(c=a&&lf(t,g))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Q(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,h=t.implicitTypes.length;f<h;f+=1)if(d=t.implicitTypes[f],d.resolve(t.result)){t.result=d.construct(t.result),t.tag=d.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(nr.call(t.typeMap[t.kind||"fallback"],t.tag))d=t.typeMap[t.kind||"fallback"][t.tag];else for(d=null,p=t.typeMap.multi[t.kind||"fallback"],f=0,h=p.length;f<h;f+=1)if(t.tag.slice(0,p[f].tag.length)===p[f].tag){d=p[f];break}d||Q(t,"unknown tag !<"+t.tag+">"),t.result!==null&&d.kind!==t.kind&&Q(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Q(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||c}function Rw(t){var e=t.position,r,i,n,s=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(o=t.input.charCodeAt(t.position))!==0&&(Se(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(s=!0,o=t.input.charCodeAt(++t.position),r=t.position;o!==0&&!Ue(o);)o=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),n=[],i.length<1&&Q(t,"directive name must not be less than one character in length");o!==0;){for(;Tr(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!Et(o));break}if(Et(o))break;for(r=t.position;o!==0&&!Ue(o);)o=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}o!==0&&ja(t),nr.call(af,i)?af[i](t,i,n):ss(t,'unknown document directive "'+i+'"')}if(Se(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Se(t,!0,-1)):s&&Q(t,"directives end mark is expected"),ai(t,t.lineIndent-1,ns,!1,!0),Se(t,!0,-1),t.checkLineBreaks&&fw.test(t.input.slice(e,t.position))&&ss(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&us(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Se(t,!0,-1));return}if(t.position<t.length-1)Q(t,"end of the stream or a document separator is expected");else return}function Wf(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
25
- `),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new Ew(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,Q(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Rw(r);return r.documents}function Fw(t,e,r){e!==null&&typeof e=="object"&&typeof r=="undefined"&&(r=e,e=null);var i=Wf(t,r);if(typeof e!="function")return i;for(var n=0,s=i.length;n<s;n+=1)e(i[n])}function Ow(t,e){var r=Wf(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new He("expected a single document in the stream, but found more")}}var kw=Fw,Tw=Ow,Yf={loadAll:kw,load:Tw},Vf=Object.prototype.toString,Kf=Object.prototype.hasOwnProperty,Ha=65279,Lw=9,pn=10,Bw=13,Pw=32,Iw=33,Nw=34,La=35,Mw=37,jw=38,$w=39,Hw=42,Zf=44,qw=45,os=58,Uw=61,Gw=62,zw=63,Ww=64,Jf=91,Xf=93,Yw=96,Qf=123,Vw=124,ep=125,ke={};ke[0]="\\0";ke[7]="\\a";ke[8]="\\b";ke[9]="\\t";ke[10]="\\n";ke[11]="\\v";ke[12]="\\f";ke[13]="\\r";ke[27]="\\e";ke[34]='\\"';ke[92]="\\\\";ke[133]="\\N";ke[160]="\\_";ke[8232]="\\L";ke[8233]="\\P";var Kw=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Zw=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Jw(t,e){var r,i,n,s,o,a,u;if(e===null)return{};for(r={},i=Object.keys(e),n=0,s=i.length;n<s;n+=1)o=i[n],a=String(e[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),u=t.compiledTypeMap.fallback[o],u&&Kf.call(u.styleAliases,a)&&(a=u.styleAliases[a]),r[o]=a;return r}function Xw(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else if(t<=4294967295)r="U",i=8;else throw new He("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+ve.repeat("0",i-e.length)+e}var Qw=1,dn=2;function eS(t){this.schema=t.schema||Ma,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=ve.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Jw(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?dn:Qw,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function cf(t,e){for(var r=ve.repeat(" ",e),i=0,n=-1,s="",o,a=t.length;i<a;)n=t.indexOf(`
24
+ `,s?1+u:u),s=!0,o=!0,u=0,r=t.position;!Et(f)&&f!==0;)f=t.input.charCodeAt(++t.position);ir(t,r,t.position,!1)}return!0}function cf(t,e){var r,i=t.tag,n=t.anchor,s=[],o,a=!1,u;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),u=t.input.charCodeAt(t.position);u!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ee(t,"tab characters must not be used in indentation")),!(u!==45||(o=t.input.charCodeAt(t.position+1),!Ue(o))));){if(a=!0,t.position++,Se(t,!0,-1)&&t.lineIndent<=e){s.push(null),u=t.input.charCodeAt(t.position);continue}if(r=t.line,hi(t,e,Hf,!1,!0),s.push(t.result),Se(t,!0,-1),u=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&u!==0)ee(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=i,t.anchor=n,t.kind="sequence",t.result=s,!0):!1}function Aw(t,e,r){var i,n,s,o,a,u,l=t.tag,c=t.anchor,f={},h=Object.create(null),p=null,g=null,y=null,E=!1,v=!1,F;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),F=t.input.charCodeAt(t.position);F!==0;){if(!E&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ee(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),s=t.line,(F===63||F===58)&&Ue(i))F===63?(E&&(ci(t,f,h,p,g,null,o,a,u),p=g=y=null),v=!0,E=!0,n=!0):E?(E=!1,n=!0):ee(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,F=i;else{if(o=t.line,a=t.lineStart,u=t.position,!hi(t,r,$f,!1,!0))break;if(t.line===s){for(F=t.input.charCodeAt(t.position);Pr(F);)F=t.input.charCodeAt(++t.position);if(F===58)F=t.input.charCodeAt(++t.position),Ue(F)||ee(t,"a whitespace character is expected after the key-value separator within a block mapping"),E&&(ci(t,f,h,p,g,null,o,a,u),p=g=y=null),v=!0,E=!1,n=!1,p=t.tag,g=t.result;else if(v)ee(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=l,t.anchor=c,!0}else if(v)ee(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=l,t.anchor=c,!0}if((t.line===s||t.lineIndent>e)&&(E&&(o=t.line,a=t.lineStart,u=t.position),hi(t,e,ns,!0,n)&&(E?g=t.result:y=t.result),E||(ci(t,f,h,p,g,y,o,a,u),p=g=y=null),Se(t,!0,-1),F=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&F!==0)ee(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return E&&ci(t,f,h,p,g,null,o,a,u),v&&(t.tag=l,t.anchor=c,t.kind="mapping",t.result=f),v}function vw(t){var e,r=!1,i=!1,n,s,o;if(o=t.input.charCodeAt(t.position),o!==33)return!1;if(t.tag!==null&&ee(t,"duplication of a tag property"),o=t.input.charCodeAt(++t.position),o===60?(r=!0,o=t.input.charCodeAt(++t.position)):o===33?(i=!0,n="!!",o=t.input.charCodeAt(++t.position)):n="!",e=t.position,r){do o=t.input.charCodeAt(++t.position);while(o!==0&&o!==62);t.position<t.length?(s=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):ee(t,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Ue(o);)o===33&&(i?ee(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),qf.test(n)||ee(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),pw.test(s)&&ee(t,"tag suffix cannot contain flow indicator characters")}s&&!Uf.test(s)&&ee(t,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{ee(t,"tag name is malformed: "+s)}return r?t.tag=s:nr.call(t.tagMap,n)?t.tag=t.tagMap[n]+s:n==="!"?t.tag="!"+s:n==="!!"?t.tag="tag:yaml.org,2002:"+s:ee(t,'undeclared tag handle "'+n+'"'),!0}function Cw(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&ee(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Ue(r)&&!li(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&ee(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function xw(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!Ue(i)&&!li(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&ee(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),nr.call(t.anchorMap,r)||ee(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Se(t,!0,-1),!0}function hi(t,e,r,i,n){var s,o,a,u=1,l=!1,c=!1,f,h,p,g,y,E;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=o=a=ns===r||Hf===r,i&&Se(t,!0,-1)&&(l=!0,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)),u===1)for(;vw(t)||Cw(t);)Se(t,!0,-1)?(l=!0,a=s,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)):a=!1;if(a&&(a=l||n),(u===1||ns===r)&&(is===r||$f===r?y=e:y=e+1,E=t.position-t.lineStart,u===1?a&&(cf(t,E)||Aw(t,E,y))||ww(t,y)?c=!0:(o&&Sw(t,y)||bw(t,y)||_w(t,y)?c=!0:xw(t)?(c=!0,(t.tag!==null||t.anchor!==null)&&ee(t,"alias node should not have any properties")):Dw(t,y,is===r)&&(c=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):u===0&&(c=a&&cf(t,E))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&ee(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,h=t.implicitTypes.length;f<h;f+=1)if(g=t.implicitTypes[f],g.resolve(t.result)){t.result=g.construct(t.result),t.tag=g.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(nr.call(t.typeMap[t.kind||"fallback"],t.tag))g=t.typeMap[t.kind||"fallback"][t.tag];else for(g=null,p=t.typeMap.multi[t.kind||"fallback"],f=0,h=p.length;f<h;f+=1)if(t.tag.slice(0,p[f].tag.length)===p[f].tag){g=p[f];break}g||ee(t,"unknown tag !<"+t.tag+">"),t.result!==null&&g.kind!==t.kind&&ee(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+g.kind+'", not "'+t.kind+'"'),g.resolve(t.result,t.tag)?(t.result=g.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):ee(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||c}function Rw(t){var e=t.position,r,i,n,s=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(o=t.input.charCodeAt(t.position))!==0&&(Se(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(s=!0,o=t.input.charCodeAt(++t.position),r=t.position;o!==0&&!Ue(o);)o=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),n=[],i.length<1&&ee(t,"directive name must not be less than one character in length");o!==0;){for(;Pr(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!Et(o));break}if(Et(o))break;for(r=t.position;o!==0&&!Ue(o);)o=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}o!==0&&ja(t),nr.call(uf,i)?uf[i](t,i,n):ss(t,'unknown document directive "'+i+'"')}if(Se(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Se(t,!0,-1)):s&&ee(t,"directives end mark is expected"),hi(t,t.lineIndent-1,ns,!1,!0),Se(t,!0,-1),t.checkLineBreaks&&fw.test(t.input.slice(e,t.position))&&ss(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&us(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Se(t,!0,-1));return}if(t.position<t.length-1)ee(t,"end of the stream or a document separator is expected");else return}function Yf(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
25
+ `),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new Ew(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,ee(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Rw(r);return r.documents}function Fw(t,e,r){e!==null&&typeof e=="object"&&typeof r=="undefined"&&(r=e,e=null);var i=Yf(t,r);if(typeof e!="function")return i;for(var n=0,s=i.length;n<s;n+=1)e(i[n])}function Ow(t,e){var r=Yf(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new He("expected a single document in the stream, but found more")}}var kw=Fw,Tw=Ow,Vf={loadAll:kw,load:Tw},Kf=Object.prototype.toString,Zf=Object.prototype.hasOwnProperty,Ha=65279,Lw=9,dn=10,Bw=13,Pw=32,Iw=33,Nw=34,La=35,Mw=37,jw=38,$w=39,Hw=42,Jf=44,qw=45,os=58,Uw=61,Gw=62,zw=63,Ww=64,Xf=91,Qf=93,Yw=96,ep=123,Vw=124,tp=125,ke={};ke[0]="\\0";ke[7]="\\a";ke[8]="\\b";ke[9]="\\t";ke[10]="\\n";ke[11]="\\v";ke[12]="\\f";ke[13]="\\r";ke[27]="\\e";ke[34]='\\"';ke[92]="\\\\";ke[133]="\\N";ke[160]="\\_";ke[8232]="\\L";ke[8233]="\\P";var Kw=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Zw=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Jw(t,e){var r,i,n,s,o,a,u;if(e===null)return{};for(r={},i=Object.keys(e),n=0,s=i.length;n<s;n+=1)o=i[n],a=String(e[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),u=t.compiledTypeMap.fallback[o],u&&Zf.call(u.styleAliases,a)&&(a=u.styleAliases[a]),r[o]=a;return r}function Xw(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else if(t<=4294967295)r="U",i=8;else throw new He("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+ve.repeat("0",i-e.length)+e}var Qw=1,mn=2;function eS(t){this.schema=t.schema||Ma,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=ve.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Jw(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?mn:Qw,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function hf(t,e){for(var r=ve.repeat(" ",e),i=0,n=-1,s="",o,a=t.length;i<a;)n=t.indexOf(`
26
26
  `,i),n===-1?(o=t.slice(i),i=a):(o=t.slice(i,n+1),i=n+1),o.length&&o!==`
27
27
  `&&(s+=r),s+=o;return s}function Ba(t,e){return`
28
- `+ve.repeat(" ",t.indent*e)}function tS(t,e){var r,i,n;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(n=t.implicitTypes[r],n.resolve(e))return!0;return!1}function as(t){return t===Pw||t===Lw}function mn(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==Ha||65536<=t&&t<=1114111}function hf(t){return mn(t)&&t!==Ha&&t!==Bw&&t!==pn}function ff(t,e,r){var i=hf(t),n=i&&!as(t);return(r?i:i&&t!==Zf&&t!==Jf&&t!==Xf&&t!==Qf&&t!==ep)&&t!==La&&!(e===os&&!n)||hf(e)&&!as(e)&&t===La||e===os&&n}function rS(t){return mn(t)&&t!==Ha&&!as(t)&&t!==qw&&t!==zw&&t!==os&&t!==Zf&&t!==Jf&&t!==Xf&&t!==Qf&&t!==ep&&t!==La&&t!==jw&&t!==Hw&&t!==Iw&&t!==Vw&&t!==Uw&&t!==Gw&&t!==$w&&t!==Nw&&t!==Mw&&t!==Ww&&t!==Yw}function iS(t){return!as(t)&&t!==os}function hn(t,e){var r=t.charCodeAt(e),i;return r>=55296&&r<=56319&&e+1<t.length&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function tp(t){var e=/^\n* /;return e.test(t)}var rp=1,Pa=2,ip=3,np=4,ni=5;function nS(t,e,r,i,n,s,o,a){var u,l=0,c=null,f=!1,h=!1,p=i!==-1,d=-1,m=rS(hn(t,0))&&iS(hn(t,t.length-1));if(e||o)for(u=0;u<t.length;l>=65536?u+=2:u++){if(l=hn(t,u),!mn(l))return ni;m=m&&ff(l,c,a),c=l}else{for(u=0;u<t.length;l>=65536?u+=2:u++){if(l=hn(t,u),l===pn)f=!0,p&&(h=h||u-d-1>i&&t[d+1]!==" ",d=u);else if(!mn(l))return ni;m=m&&ff(l,c,a),c=l}h=h||p&&u-d-1>i&&t[d+1]!==" "}return!f&&!h?m&&!o&&!n(t)?rp:s===dn?ni:Pa:r>9&&tp(t)?ni:o?s===dn?ni:Pa:h?np:ip}function sS(t,e,r,i,n){t.dump=function(){if(e.length===0)return t.quotingType===dn?'""':"''";if(!t.noCompatMode&&(Kw.indexOf(e)!==-1||Zw.test(e)))return t.quotingType===dn?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,r),o=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),a=i||t.flowLevel>-1&&r>=t.flowLevel;function u(l){return tS(t,l)}switch(nS(e,a,t.indent,o,u,t.quotingType,t.forceQuotes&&!i,n)){case rp:return e;case Pa:return"'"+e.replace(/'/g,"''")+"'";case ip:return"|"+pf(e,t.indent)+df(cf(e,s));case np:return">"+pf(e,t.indent)+df(cf(oS(e,o),s));case ni:return'"'+aS(e)+'"';default:throw new He("impossible error: invalid scalar style")}}()}function pf(t,e){var r=tp(t)?String(e):"",i=t[t.length-1]===`
28
+ `+ve.repeat(" ",t.indent*e)}function tS(t,e){var r,i,n;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(n=t.implicitTypes[r],n.resolve(e))return!0;return!1}function as(t){return t===Pw||t===Lw}function gn(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==Ha||65536<=t&&t<=1114111}function ff(t){return gn(t)&&t!==Ha&&t!==Bw&&t!==dn}function pf(t,e,r){var i=ff(t),n=i&&!as(t);return(r?i:i&&t!==Jf&&t!==Xf&&t!==Qf&&t!==ep&&t!==tp)&&t!==La&&!(e===os&&!n)||ff(e)&&!as(e)&&t===La||e===os&&n}function rS(t){return gn(t)&&t!==Ha&&!as(t)&&t!==qw&&t!==zw&&t!==os&&t!==Jf&&t!==Xf&&t!==Qf&&t!==ep&&t!==tp&&t!==La&&t!==jw&&t!==Hw&&t!==Iw&&t!==Vw&&t!==Uw&&t!==Gw&&t!==$w&&t!==Nw&&t!==Mw&&t!==Ww&&t!==Yw}function iS(t){return!as(t)&&t!==os}function fn(t,e){var r=t.charCodeAt(e),i;return r>=55296&&r<=56319&&e+1<t.length&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function rp(t){var e=/^\n* /;return e.test(t)}var ip=1,Pa=2,np=3,sp=4,ui=5;function nS(t,e,r,i,n,s,o,a){var u,l=0,c=null,f=!1,h=!1,p=i!==-1,g=-1,y=rS(fn(t,0))&&iS(fn(t,t.length-1));if(e||o)for(u=0;u<t.length;l>=65536?u+=2:u++){if(l=fn(t,u),!gn(l))return ui;y=y&&pf(l,c,a),c=l}else{for(u=0;u<t.length;l>=65536?u+=2:u++){if(l=fn(t,u),l===dn)f=!0,p&&(h=h||u-g-1>i&&t[g+1]!==" ",g=u);else if(!gn(l))return ui;y=y&&pf(l,c,a),c=l}h=h||p&&u-g-1>i&&t[g+1]!==" "}return!f&&!h?y&&!o&&!n(t)?ip:s===mn?ui:Pa:r>9&&rp(t)?ui:o?s===mn?ui:Pa:h?sp:np}function sS(t,e,r,i,n){t.dump=function(){if(e.length===0)return t.quotingType===mn?'""':"''";if(!t.noCompatMode&&(Kw.indexOf(e)!==-1||Zw.test(e)))return t.quotingType===mn?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,r),o=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),a=i||t.flowLevel>-1&&r>=t.flowLevel;function u(l){return tS(t,l)}switch(nS(e,a,t.indent,o,u,t.quotingType,t.forceQuotes&&!i,n)){case ip:return e;case Pa:return"'"+e.replace(/'/g,"''")+"'";case np:return"|"+df(e,t.indent)+mf(hf(e,s));case sp:return">"+df(e,t.indent)+mf(hf(oS(e,o),s));case ui:return'"'+aS(e)+'"';default:throw new He("impossible error: invalid scalar style")}}()}function df(t,e){var r=rp(t)?String(e):"",i=t[t.length-1]===`
29
29
  `,n=i&&(t[t.length-2]===`
30
30
  `||t===`
31
31
  `),s=n?"+":i?"":"-";return r+s+`
32
- `}function df(t){return t[t.length-1]===`
32
+ `}function mf(t){return t[t.length-1]===`
33
33
  `?t.slice(0,-1):t}function oS(t,e){for(var r=/(\n+)([^\n]*)/g,i=function(){var l=t.indexOf(`
34
- `);return l=l!==-1?l:t.length,r.lastIndex=l,mf(t.slice(0,l),e)}(),n=t[0]===`
34
+ `);return l=l!==-1?l:t.length,r.lastIndex=l,gf(t.slice(0,l),e)}(),n=t[0]===`
35
35
  `||t[0]===" ",s,o;o=r.exec(t);){var a=o[1],u=o[2];s=u[0]===" ",i+=a+(!n&&!s&&u!==""?`
36
- `:"")+mf(u,e),n=s}return i}function mf(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,i,n=0,s,o=0,a=0,u="";i=r.exec(t);)a=i.index,a-n>e&&(s=o>n?o:a,u+=`
36
+ `:"")+gf(u,e),n=s}return i}function gf(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,i,n=0,s,o=0,a=0,u="";i=r.exec(t);)a=i.index,a-n>e&&(s=o>n?o:a,u+=`
37
37
  `+t.slice(n,s),n=s+1),o=a;return u+=`
38
38
  `,t.length-n>e&&o>n?u+=t.slice(n,o)+`
39
- `+t.slice(o+1):u+=t.slice(n),u.slice(1)}function aS(t){for(var e="",r=0,i,n=0;n<t.length;r>=65536?n+=2:n++)r=hn(t,n),i=ke[r],!i&&mn(r)?(e+=t[n],r>=65536&&(e+=t[n+1])):e+=i||Xw(r);return e}function uS(t,e,r){var i="",n=t.tag,s,o,a;for(s=0,o=r.length;s<o;s+=1)a=r[s],t.replacer&&(a=t.replacer.call(r,String(s),a)),(Mt(t,e,a,!1,!1)||typeof a=="undefined"&&Mt(t,e,null,!1,!1))&&(i!==""&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump);t.tag=n,t.dump="["+i+"]"}function gf(t,e,r,i){var n="",s=t.tag,o,a,u;for(o=0,a=r.length;o<a;o+=1)u=r[o],t.replacer&&(u=t.replacer.call(r,String(o),u)),(Mt(t,e+1,u,!0,!0,!1,!0)||typeof u=="undefined"&&Mt(t,e+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Ba(t,e)),t.dump&&pn===t.dump.charCodeAt(0)?n+="-":n+="- ",n+=t.dump);t.tag=s,t.dump=n||"[]"}function lS(t,e,r){var i="",n=t.tag,s=Object.keys(r),o,a,u,l,c;for(o=0,a=s.length;o<a;o+=1)c="",i!==""&&(c+=", "),t.condenseFlow&&(c+='"'),u=s[o],l=r[u],t.replacer&&(l=t.replacer.call(r,u,l)),Mt(t,e,u,!1,!1)&&(t.dump.length>1024&&(c+="? "),c+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Mt(t,e,l,!1,!1)&&(c+=t.dump,i+=c));t.tag=n,t.dump="{"+i+"}"}function cS(t,e,r,i){var n="",s=t.tag,o=Object.keys(r),a,u,l,c,f,h;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new He("sortKeys must be a boolean or a function");for(a=0,u=o.length;a<u;a+=1)h="",(!i||n!=="")&&(h+=Ba(t,e)),l=o[a],c=r[l],t.replacer&&(c=t.replacer.call(r,l,c)),Mt(t,e+1,l,!0,!0,!0)&&(f=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,f&&(t.dump&&pn===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,f&&(h+=Ba(t,e)),Mt(t,e+1,c,!0,f)&&(t.dump&&pn===t.dump.charCodeAt(0)?h+=":":h+=": ",h+=t.dump,n+=h));t.tag=s,t.dump=n||"{}"}function yf(t,e,r){var i,n,s,o,a,u;for(n=r?t.explicitTypes:t.implicitTypes,s=0,o=n.length;s<o;s+=1)if(a=n[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(r?a.multi&&a.representName?t.tag=a.representName(e):t.tag=a.tag:t.tag="?",a.represent){if(u=t.styleMap[a.tag]||a.defaultStyle,Vf.call(a.represent)==="[object Function]")i=a.represent(e,u);else if(Kf.call(a.represent,u))i=a.represent[u](e,u);else throw new He("!<"+a.tag+'> tag resolver accepts not "'+u+'" style');t.dump=i}return!0}return!1}function Mt(t,e,r,i,n,s,o){t.tag=null,t.dump=r,yf(t,r,!1)||yf(t,r,!0);var a=Vf.call(t.dump),u=i,l;i&&(i=t.flowLevel<0||t.flowLevel>e);var c=a==="[object Object]"||a==="[object Array]",f,h;if(c&&(f=t.duplicates.indexOf(r),h=f!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(n=!1),h&&t.usedDuplicates[f])t.dump="*ref_"+f;else{if(c&&h&&!t.usedDuplicates[f]&&(t.usedDuplicates[f]=!0),a==="[object Object]")i&&Object.keys(t.dump).length!==0?(cS(t,e,t.dump,n),h&&(t.dump="&ref_"+f+t.dump)):(lS(t,e,t.dump),h&&(t.dump="&ref_"+f+" "+t.dump));else if(a==="[object Array]")i&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?gf(t,e-1,t.dump,n):gf(t,e,t.dump,n),h&&(t.dump="&ref_"+f+t.dump)):(uS(t,e,t.dump),h&&(t.dump="&ref_"+f+" "+t.dump));else if(a==="[object String]")t.tag!=="?"&&sS(t,t.dump,e,s,u);else{if(a==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new He("unacceptable kind of an object to dump "+a)}t.tag!==null&&t.tag!=="?"&&(l=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",t.dump=l+" "+t.dump)}return!0}function hS(t,e){var r=[],i=[],n,s;for(Ia(t,r,i),n=0,s=i.length;n<s;n+=1)e.duplicates.push(r[i[n]]);e.usedDuplicates=new Array(s)}function Ia(t,e,r){var i,n,s;if(t!==null&&typeof t=="object")if(n=e.indexOf(t),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(e.push(t),Array.isArray(t))for(n=0,s=t.length;n<s;n+=1)Ia(t[n],e,r);else for(i=Object.keys(t),n=0,s=i.length;n<s;n+=1)Ia(t[i[n]],e,r)}function fS(t,e){e=e||{};var r=new eS(e);r.noRefs||hS(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Mt(r,0,i,!0,!0)?r.dump+`
40
- `:""}var pS=fS,dS={dump:pS};function qa(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var mS=Oe,gS=bf,yS=Af,ES=Ff,DS=Of,bS=Ma,_S=Yf.load,wS=Yf.loadAll,SS=dS.dump,AS=He,vS={binary:Pf,float:Rf,map:Sf,null:vf,pairs:Nf,set:Mf,timestamp:Lf,bool:Cf,int:xf,merge:Bf,omap:If,seq:wf,str:_f},CS=qa("safeLoad","load"),xS=qa("safeLoadAll","loadAll"),RS=qa("safeDump","dump"),FS={Type:mS,Schema:gS,FAILSAFE_SCHEMA:yS,JSON_SCHEMA:ES,CORE_SCHEMA:DS,DEFAULT_SCHEMA:bS,load:_S,loadAll:wS,dump:SS,YAMLException:AS,types:vS,safeLoad:CS,safeLoadAll:xS,safeDump:RS},Ua=FS;var HC=J(Ns());var ne={};t_(ne,{bold:()=>PC,dimmed:()=>IC,error:()=>Qm,info:()=>BC,item:()=>NC,log:()=>bi,turboBlue:()=>Ei,turboGradient:()=>LC,turboLoader:()=>Jm,turboRed:()=>Km,warn:()=>Xm,yellow:()=>Zm});var Di=J(require("chalk")),zm=J(require("ora")),Wm=J(require("gradient-string")),Ym="#0099F7",Vm="#F11712",TC="#FFFF00",LC=(0,Wm.default)(Ym,Vm),Ei=Di.default.hex(Ym),Km=Di.default.hex(Vm),Zm=Di.default.hex(TC),Jm=t=>(0,zm.default)({text:t,spinner:{frames:[" ",Ei("> "),Ei(">> "),Ei(">>>")]}}),BC=(...t)=>{bi(Ei.bold(">>>"),...t)},PC=(...t)=>{bi(Di.default.bold(...t))},IC=(...t)=>{bi(Di.default.dim(...t))},NC=(...t)=>{bi(Ei.bold(" \u2022"),...t)},bi=(...t)=>{console.log(...t)},Xm=(...t)=>{console.error(Zm.bold(">>>"),...t)},Qm=(...t)=>{console.error(Km.bold(">>>"),...t)};var Ig=J(require("os")),Ng=J(Fi());async function hr(t,e=[],r){let i={cwd:Ig.default.tmpdir(),env:{COREPACK_ENABLE_STRICT:"0"},...r};try{let{stdout:n}=await(0,Ng.default)(t,e,i);return n.trim()}catch{return}}async function Gl(){let[t,e,r,i]=await Promise.all([hr("yarnpkg",["--version"]),hr("npm",["--version"]),hr("pnpm",["--version"]),hr("bun",["--version"])]);return{yarn:t,pnpm:r,npm:e,bun:i}}async function zl(){let[t,e,r,i]=await Promise.all([hr("yarnpkg",["global","bin"]),hr("npm",["config","get","prefix"]),hr("pnpm",["bin","--global"]),hr("bun",["pm","--g","bin"])]);return{yarn:t,pnpm:r,npm:e,bun:i}}var PR=J(require("fs-extra"));var IR=J(require("path")),NR=J(require("fs-extra")),MR=J(require("chalk"));var ID=require("stream"),ND=require("util"),bk=require("path"),_k=require("os"),MD=require("fs"),wk=J(PD());var yI=(0,ND.promisify)(ID.Stream.pipeline);var jD=require("fs-extra");var Tk=J(require("path")),Lk=J(WD()),Bk=J(require("chalk")),kh=require("fs-extra");var Kb=require("commander");var ia={name:"@turbo/codemod",version:"1.13.1-canary.2",description:"Provides Codemod transformations to help upgrade your Turborepo codebase when a feature is deprecated.",homepage:"https://turbo.build/repo",license:"MPL-2.0",repository:{type:"git",url:"https://github.com/vercel/turbo",directory:"packages/turbo-codemod"},bugs:{url:"https://github.com/vercel/turbo/issues"},bin:"dist/cli.js",scripts:{build:"tsup",test:"jest",lint:"eslint src/","check-types":"tsc --noEmit","add-transformer":"plop","lint:prettier":"prettier -c . --cache --ignore-path=../../.prettierignore"},dependencies:{axios:"0.27.2",chalk:"2.4.2",commander:"^9.5.0",diff:"^5.1.0","find-up":"4.1.0","fs-extra":"^10.0.0","gradient-string":"^2.0.0",inquirer:"^8.2.4","inquirer-file-tree-selection-prompt":"^1.0.19","is-git-clean":"^1.1.0",ora:"4.1.1",semver:"^7.3.7","update-check":"^1.5.4"},devDependencies:{"@turbo/eslint-config":"workspace:*","@turbo/gen":"workspace:*","@turbo/test-utils":"workspace:*","@turbo/tsconfig":"workspace:*","@turbo/types":"workspace:*","@turbo/utils":"workspace:*","@turbo/workspaces":"workspace:*","@types/chalk-animation":"^1.6.0","@types/diff":"^5.0.2","@types/fs-extra":"^9.0.13","@types/gradient-string":"^1.1.2","@types/inquirer":"^8.2.0","@types/jest":"^27.4.0","@types/node":"^18.17.2","@types/semver":"^7.3.9","@types/uuid":"^9.0.0",deepmerge:"^4.2.2",jest:"^27.4.3",plop:"^3.1.1",semver:"^7.3.5","ts-jest":"^27.1.1",tsup:"^6.7.0",typescript:"5.3.3"},files:["dist"],publishConfig:{access:"public"}};var on=J(require("os")),Gb=require("child_process"),$e=J(require("chalk")),zb=require("inquirer");var nn=J(require("chalk"),1),ab=J(require("ora"),1),ub=J(require("gradient-string"),1);var kT=J(Fi(),1),JI=require("fs-extra");var rN=J(Ns(),1),nN=require("fs-extra"),oN=require("fs-extra"),uN=require("chalk"),pb=require("stream"),db=require("util"),fN=require("fs-extra"),gN=require("chalk"),EN=require("fs-extra"),Qr=J(require("path"),1),qe=require("fs-extra"),mb=J(Fi(),1),gb=J(require("path"),1),yb=require("fs-extra"),Eb=J(require("chalk"),1),rr=J(require("path"),1),Db=J(Fi(),1),rt=require("fs-extra"),bb=J(Ns(),1);var Wn=J(require("path"),1),Tt=require("fs-extra"),tn=J(require("path"),1),Lt=require("fs-extra"),Yn=J(require("path"),1),Bt=require("fs-extra"),fL=J(require("chalk"),1),pL=J(require("gradient-string"),1),dL=J(Fi(),1),mL=J(require("ora"),1),gL=require("semver"),yL=J(require("chalk"),1),Ik=Object.create,Bh=Object.defineProperty,Nk=Object.getOwnPropertyDescriptor,Mk=Object.getOwnPropertyNames,jk=Object.getPrototypeOf,$k=Object.prototype.hasOwnProperty,re=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')}),Hk=(t,e)=>()=>(t&&(e=t(t=0)),e),ee=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),qk=(t,e)=>{for(var r in e)Bh(t,r,{get:e[r],enumerable:!0})},Uk=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Mk(e))!$k.call(t,n)&&n!==r&&Bh(t,n,{get:()=>e[n],enumerable:!(i=Nk(e,n))||i.enumerable});return t},oa=(t,e,r)=>(r=t!=null?Ik(jk(t)):{},Uk(e||!t||!t.__esModule?Bh(r,"default",{value:t,enumerable:!0}):r,t)),V=Hk(()=>{}),Gk=ee((t,e)=>{V();function r(i){return e.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,r(i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}),zk=ee((t,e)=>{V();var r=Gk().default;function i(){"use strict";e.exports=i=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var n={},s=Object.prototype,o=s.hasOwnProperty,a=Object.defineProperty||function(D,A,N){D[A]=N.value},u=typeof Symbol=="function"?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(D,A,N){return Object.defineProperty(D,A,{value:N,enumerable:!0,configurable:!0,writable:!0}),D[A]}try{h({},"")}catch{h=function(D,A,N){return D[A]=N}}function p(D,A,N,Y){var W=A&&A.prototype instanceof g?A:g,E=Object.create(W.prototype),y=new I(Y||[]);return a(E,"_invoke",{value:M(D,N,y)}),E}function d(D,A,N){try{return{type:"normal",arg:D.call(A,N)}}catch(Y){return{type:"throw",arg:Y}}}n.wrap=p;var m={};function g(){}function v(){}function F(){}var k={};h(k,l,function(){return this});var O=Object.getPrototypeOf,R=O&&O(O(j([])));R&&R!==s&&o.call(R,l)&&(k=R);var B=F.prototype=g.prototype=Object.create(k);function _(D){["next","throw","return"].forEach(function(A){h(D,A,function(N){return this._invoke(A,N)})})}function S(D,A){function N(W,E,y,b){var P=d(D[W],D,E);if(P.type!=="throw"){var C=P.arg,q=C.value;return q&&r(q)=="object"&&o.call(q,"__await")?A.resolve(q.__await).then(function(H){N("next",H,y,b)},function(H){N("throw",H,y,b)}):A.resolve(q).then(function(H){C.value=H,y(C)},function(H){return N("throw",H,y,b)})}b(P.arg)}var Y;a(this,"_invoke",{value:function(W,E){function y(){return new A(function(b,P){N(W,E,b,P)})}return Y=Y?Y.then(y,y):y()}})}function M(D,A,N){var Y="suspendedStart";return function(W,E){if(Y==="executing")throw new Error("Generator is already running");if(Y==="completed"){if(W==="throw")throw E;return x()}for(N.method=W,N.arg=E;;){var y=N.delegate;if(y){var b=U(y,N);if(b){if(b===m)continue;return b}}if(N.method==="next")N.sent=N._sent=N.arg;else if(N.method==="throw"){if(Y==="suspendedStart")throw Y="completed",N.arg;N.dispatchException(N.arg)}else N.method==="return"&&N.abrupt("return",N.arg);Y="executing";var P=d(D,A,N);if(P.type==="normal"){if(Y=N.done?"completed":"suspendedYield",P.arg===m)continue;return{value:P.arg,done:N.done}}P.type==="throw"&&(Y="completed",N.method="throw",N.arg=P.arg)}}}function U(D,A){var N=A.method,Y=D.iterator[N];if(Y===void 0)return A.delegate=null,N==="throw"&&D.iterator.return&&(A.method="return",A.arg=void 0,U(D,A),A.method==="throw")||N!=="return"&&(A.method="throw",A.arg=new TypeError("The iterator does not provide a '"+N+"' method")),m;var W=d(Y,D.iterator,A.arg);if(W.type==="throw")return A.method="throw",A.arg=W.arg,A.delegate=null,m;var E=W.arg;return E?E.done?(A[D.resultName]=E.value,A.next=D.nextLoc,A.method!=="return"&&(A.method="next",A.arg=void 0),A.delegate=null,m):E:(A.method="throw",A.arg=new TypeError("iterator result is not an object"),A.delegate=null,m)}function L(D){var A={tryLoc:D[0]};1 in D&&(A.catchLoc=D[1]),2 in D&&(A.finallyLoc=D[2],A.afterLoc=D[3]),this.tryEntries.push(A)}function T(D){var A=D.completion||{};A.type="normal",delete A.arg,D.completion=A}function I(D){this.tryEntries=[{tryLoc:"root"}],D.forEach(L,this),this.reset(!0)}function j(D){if(D){var A=D[l];if(A)return A.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length)){var N=-1,Y=function W(){for(;++N<D.length;)if(o.call(D,N))return W.value=D[N],W.done=!1,W;return W.value=void 0,W.done=!0,W};return Y.next=Y}}return{next:x}}function x(){return{value:void 0,done:!0}}return v.prototype=F,a(B,"constructor",{value:F,configurable:!0}),a(F,"constructor",{value:v,configurable:!0}),v.displayName=h(F,f,"GeneratorFunction"),n.isGeneratorFunction=function(D){var A=typeof D=="function"&&D.constructor;return!!A&&(A===v||(A.displayName||A.name)==="GeneratorFunction")},n.mark=function(D){return Object.setPrototypeOf?Object.setPrototypeOf(D,F):(D.__proto__=F,h(D,f,"GeneratorFunction")),D.prototype=Object.create(B),D},n.awrap=function(D){return{__await:D}},_(S.prototype),h(S.prototype,c,function(){return this}),n.AsyncIterator=S,n.async=function(D,A,N,Y,W){W===void 0&&(W=Promise);var E=new S(p(D,A,N,Y),W);return n.isGeneratorFunction(A)?E:E.next().then(function(y){return y.done?y.value:E.next()})},_(B),h(B,f,"Generator"),h(B,l,function(){return this}),h(B,"toString",function(){return"[object Generator]"}),n.keys=function(D){var A=Object(D),N=[];for(var Y in A)N.push(Y);return N.reverse(),function W(){for(;N.length;){var E=N.pop();if(E in A)return W.value=E,W.done=!1,W}return W.done=!0,W}},n.values=j,I.prototype={constructor:I,reset:function(D){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!D)for(var A in this)A.charAt(0)==="t"&&o.call(this,A)&&!isNaN(+A.slice(1))&&(this[A]=void 0)},stop:function(){this.done=!0;var D=this.tryEntries[0].completion;if(D.type==="throw")throw D.arg;return this.rval},dispatchException:function(D){if(this.done)throw D;var A=this;function N(P,C){return E.type="throw",E.arg=D,A.next=P,C&&(A.method="next",A.arg=void 0),!!C}for(var Y=this.tryEntries.length-1;Y>=0;--Y){var W=this.tryEntries[Y],E=W.completion;if(W.tryLoc==="root")return N("end");if(W.tryLoc<=this.prev){var y=o.call(W,"catchLoc"),b=o.call(W,"finallyLoc");if(y&&b){if(this.prev<W.catchLoc)return N(W.catchLoc,!0);if(this.prev<W.finallyLoc)return N(W.finallyLoc)}else if(y){if(this.prev<W.catchLoc)return N(W.catchLoc,!0)}else{if(!b)throw new Error("try statement without catch or finally");if(this.prev<W.finallyLoc)return N(W.finallyLoc)}}}},abrupt:function(D,A){for(var N=this.tryEntries.length-1;N>=0;--N){var Y=this.tryEntries[N];if(Y.tryLoc<=this.prev&&o.call(Y,"finallyLoc")&&this.prev<Y.finallyLoc){var W=Y;break}}W&&(D==="break"||D==="continue")&&W.tryLoc<=A&&A<=W.finallyLoc&&(W=null);var E=W?W.completion:{};return E.type=D,E.arg=A,W?(this.method="next",this.next=W.finallyLoc,m):this.complete(E)},complete:function(D,A){if(D.type==="throw")throw D.arg;return D.type==="break"||D.type==="continue"?this.next=D.arg:D.type==="return"?(this.rval=this.arg=D.arg,this.method="return",this.next="end"):D.type==="normal"&&A&&(this.next=A),m},finish:function(D){for(var A=this.tryEntries.length-1;A>=0;--A){var N=this.tryEntries[A];if(N.finallyLoc===D)return this.complete(N.completion,N.afterLoc),T(N),m}},catch:function(D){for(var A=this.tryEntries.length-1;A>=0;--A){var N=this.tryEntries[A];if(N.tryLoc===D){var Y=N.completion;if(Y.type==="throw"){var W=Y.arg;T(N)}return W}}throw new Error("illegal catch attempt")},delegateYield:function(D,A,N){return this.delegate={iterator:j(D),resultName:A,nextLoc:N},this.method==="next"&&(this.arg=void 0),m}},n}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}),Wk=ee((t,e)=>{V();var r=zk()();e.exports=r;try{regeneratorRuntime=r}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}),Yk=ee((t,e)=>{"use strict";V();var r=(i,...n)=>new Promise(s=>{s(i(...n))});e.exports=r,e.exports.default=r}),Vk=ee((t,e)=>{"use strict";V();var r=Yk(),i=n=>{if(!((Number.isInteger(n)||n===1/0)&&n>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));let s=[],o=0,a=()=>{o--,s.length>0&&s.shift()()},u=(f,h,...p)=>{o++;let d=r(f,...p);h(d),d.then(a,a)},l=(f,h,...p)=>{o<n?u(f,h,...p):s.push(u.bind(null,f,h,...p))},c=(f,...h)=>new Promise(p=>l(f,p,...h));return Object.defineProperties(c,{activeCount:{get:()=>o},pendingCount:{get:()=>s.length},clearQueue:{value:()=>{s.length=0}}}),c};e.exports=i,e.exports.default=i}),Kk=ee((t,e)=>{"use strict";V();var r=Vk(),i=class extends Error{constructor(a){super(),this.value=a}},n=async(a,u)=>u(await a),s=async a=>{let u=await Promise.all(a);if(u[1]===!0)throw new i(u[0]);return!1},o=async(a,u,l)=>{l={concurrency:1/0,preserveOrder:!0,...l};let c=r(l.concurrency),f=[...a].map(p=>[p,c(n,p,u)]),h=r(l.preserveOrder?1:1/0);try{await Promise.all(f.map(p=>h(s,p)))}catch(p){if(p instanceof i)return p.value;throw p}};e.exports=o,e.exports.default=o}),Zk=ee((t,e)=>{"use strict";V();var r=re("path"),i=re("fs"),{promisify:n}=re("util"),s=Kk(),o=n(i.stat),a=n(i.lstat),u={directory:"isDirectory",file:"isFile"};function l({type:f}){if(!(f in u))throw new Error(`Invalid type specified: ${f}`)}var c=(f,h)=>f===void 0||h[u[f]]();e.exports=async(f,h)=>{h={cwd:process.cwd(),type:"file",allowSymlinks:!0,...h},l(h);let p=h.allowSymlinks?o:a;return s(f,async d=>{try{let m=await p(r.resolve(h.cwd,d));return c(h.type,m)}catch{return!1}},h)},e.exports.sync=(f,h)=>{h={cwd:process.cwd(),allowSymlinks:!0,type:"file",...h},l(h);let p=h.allowSymlinks?i.statSync:i.lstatSync;for(let d of f)try{let m=p(r.resolve(h.cwd,d));if(c(h.type,m))return d}catch{}}}),Jk=ee((t,e)=>{"use strict";V();var r=re("fs"),{promisify:i}=re("util"),n=i(r.access);e.exports=async s=>{try{return await n(s),!0}catch{return!1}},e.exports.sync=s=>{try{return r.accessSync(s),!0}catch{return!1}}}),Xk=ee((t,e)=>{"use strict";V();var r=re("path"),i=Zk(),n=Jk(),s=Symbol("findUp.stop");e.exports=async(o,a={})=>{let u=r.resolve(a.cwd||""),{root:l}=r.parse(u),c=[].concat(o),f=async h=>{if(typeof o!="function")return i(c,h);let p=await o(h.cwd);return typeof p=="string"?i([p],h):p};for(;;){let h=await f({...a,cwd:u});if(h===s)return;if(h)return r.resolve(u,h);if(u===l)return;u=r.dirname(u)}},e.exports.sync=(o,a={})=>{let u=r.resolve(a.cwd||""),{root:l}=r.parse(u),c=[].concat(o),f=h=>{if(typeof o!="function")return i.sync(c,h);let p=o(h.cwd);return typeof p=="string"?i.sync([p],h):p};for(;;){let h=f({...a,cwd:u});if(h===s)return;if(h)return r.resolve(u,h);if(u===l)return;u=r.dirname(u)}},e.exports.exists=n,e.exports.sync.exists=n.sync,e.exports.stop=s}),Vn=ee((t,e)=>{"use strict";V();var r=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);e.exports=i=>i?Object.keys(i).map(n=>[r.has(n)?r.get(n):n,i[n]]).reduce((n,s)=>(n[s[0]]=s[1],n),Object.create(null)):{}}),Ph=ee((t,e)=>{"use strict";V();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=re("events"),n=re("stream"),s=re("string_decoder").StringDecoder,o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),u=Symbol("emittedEnd"),l=Symbol("emittingEnd"),c=Symbol("emittedError"),f=Symbol("closed"),h=Symbol("read"),p=Symbol("flush"),d=Symbol("flushChunk"),m=Symbol("encoding"),g=Symbol("decoder"),v=Symbol("flowing"),F=Symbol("paused"),k=Symbol("resume"),O=Symbol("buffer"),R=Symbol("pipes"),B=Symbol("bufferLength"),_=Symbol("bufferPush"),S=Symbol("bufferShift"),M=Symbol("objectMode"),U=Symbol("destroyed"),L=Symbol("emitData"),T=Symbol("emitEnd"),I=Symbol("emitEnd2"),j=Symbol("async"),x=P=>Promise.resolve().then(P),D=global._MP_NO_ITERATOR_SYMBOLS_!=="1",A=D&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),N=D&&Symbol.iterator||Symbol("iterator not implemented"),Y=P=>P==="end"||P==="finish"||P==="prefinish",W=P=>P instanceof ArrayBuffer||typeof P=="object"&&P.constructor&&P.constructor.name==="ArrayBuffer"&&P.byteLength>=0,E=P=>!Buffer.isBuffer(P)&&ArrayBuffer.isView(P),y=class{constructor(P,C,q){this.src=P,this.dest=C,this.opts=q,this.ondrain=()=>P[k](),C.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},b=class extends y{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(P,C,q){super(P,C,q),this.proxyErrors=H=>C.emit("error",H),P.on("error",this.proxyErrors)}};e.exports=class VD extends n{constructor(C){super(),this[v]=!1,this[F]=!1,this[R]=[],this[O]=[],this[M]=C&&C.objectMode||!1,this[M]?this[m]=null:this[m]=C&&C.encoding||null,this[m]==="buffer"&&(this[m]=null),this[j]=C&&!!C.async||!1,this[g]=this[m]?new s(this[m]):null,this[o]=!1,this[u]=!1,this[l]=!1,this[f]=!1,this[c]=null,this.writable=!0,this.readable=!0,this[B]=0,this[U]=!1,C&&C.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[O]}),C&&C.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[R]})}get bufferLength(){return this[B]}get encoding(){return this[m]}set encoding(C){if(this[M])throw new Error("cannot set encoding in objectMode");if(this[m]&&C!==this[m]&&(this[g]&&this[g].lastNeed||this[B]))throw new Error("cannot change encoding");this[m]!==C&&(this[g]=C?new s(C):null,this[O].length&&(this[O]=this[O].map(q=>this[g].write(q)))),this[m]=C}setEncoding(C){this.encoding=C}get objectMode(){return this[M]}set objectMode(C){this[M]=this[M]||!!C}get async(){return this[j]}set async(C){this[j]=this[j]||!!C}write(C,q,H){if(this[o])throw new Error("write after end");if(this[U])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof q=="function"&&(H=q,q="utf8"),q||(q="utf8");let Z=this[j]?x:G=>G();return!this[M]&&!Buffer.isBuffer(C)&&(E(C)?C=Buffer.from(C.buffer,C.byteOffset,C.byteLength):W(C)?C=Buffer.from(C):typeof C!="string"&&(this.objectMode=!0)),this[M]?(this.flowing&&this[B]!==0&&this[p](!0),this.flowing?this.emit("data",C):this[_](C),this[B]!==0&&this.emit("readable"),H&&Z(H),this.flowing):C.length?(typeof C=="string"&&!(q===this[m]&&!this[g].lastNeed)&&(C=Buffer.from(C,q)),Buffer.isBuffer(C)&&this[m]&&(C=this[g].write(C)),this.flowing&&this[B]!==0&&this[p](!0),this.flowing?this.emit("data",C):this[_](C),this[B]!==0&&this.emit("readable"),H&&Z(H),this.flowing):(this[B]!==0&&this.emit("readable"),H&&Z(H),this.flowing)}read(C){if(this[U])return null;if(this[B]===0||C===0||C>this[B])return this[a](),null;this[M]&&(C=null),this[O].length>1&&!this[M]&&(this.encoding?this[O]=[this[O].join("")]:this[O]=[Buffer.concat(this[O],this[B])]);let q=this[h](C||null,this[O][0]);return this[a](),q}[h](C,q){return C===q.length||C===null?this[S]():(this[O][0]=q.slice(C),q=q.slice(0,C),this[B]-=C),this.emit("data",q),!this[O].length&&!this[o]&&this.emit("drain"),q}end(C,q,H){return typeof C=="function"&&(H=C,C=null),typeof q=="function"&&(H=q,q="utf8"),C&&this.write(C,q),H&&this.once("end",H),this[o]=!0,this.writable=!1,(this.flowing||!this[F])&&this[a](),this}[k](){this[U]||(this[F]=!1,this[v]=!0,this.emit("resume"),this[O].length?this[p]():this[o]?this[a]():this.emit("drain"))}resume(){return this[k]()}pause(){this[v]=!1,this[F]=!0}get destroyed(){return this[U]}get flowing(){return this[v]}get paused(){return this[F]}[_](C){this[M]?this[B]+=1:this[B]+=C.length,this[O].push(C)}[S](){return this[O].length&&(this[M]?this[B]-=1:this[B]-=this[O][0].length),this[O].shift()}[p](C){do;while(this[d](this[S]()));!C&&!this[O].length&&!this[o]&&this.emit("drain")}[d](C){return C?(this.emit("data",C),this.flowing):!1}pipe(C,q){if(this[U])return;let H=this[u];return q=q||{},C===r.stdout||C===r.stderr?q.end=!1:q.end=q.end!==!1,q.proxyErrors=!!q.proxyErrors,H?q.end&&C.end():(this[R].push(q.proxyErrors?new b(this,C,q):new y(this,C,q)),this[j]?x(()=>this[k]()):this[k]()),C}unpipe(C){let q=this[R].find(H=>H.dest===C);q&&(this[R].splice(this[R].indexOf(q),1),q.unpipe())}addListener(C,q){return this.on(C,q)}on(C,q){let H=super.on(C,q);return C==="data"&&!this[R].length&&!this.flowing?this[k]():C==="readable"&&this[B]!==0?super.emit("readable"):Y(C)&&this[u]?(super.emit(C),this.removeAllListeners(C)):C==="error"&&this[c]&&(this[j]?x(()=>q.call(this,this[c])):q.call(this,this[c])),H}get emittedEnd(){return this[u]}[a](){!this[l]&&!this[u]&&!this[U]&&this[O].length===0&&this[o]&&(this[l]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[f]&&this.emit("close"),this[l]=!1)}emit(C,q,...H){if(C!=="error"&&C!=="close"&&C!==U&&this[U])return;if(C==="data")return q?this[j]?x(()=>this[L](q)):this[L](q):!1;if(C==="end")return this[T]();if(C==="close"){if(this[f]=!0,!this[u]&&!this[U])return;let G=super.emit("close");return this.removeAllListeners("close"),G}else if(C==="error"){this[c]=q;let G=super.emit("error",q);return this[a](),G}else if(C==="resume"){let G=super.emit("resume");return this[a](),G}else if(C==="finish"||C==="prefinish"){let G=super.emit(C);return this.removeAllListeners(C),G}let Z=super.emit(C,q,...H);return this[a](),Z}[L](C){for(let H of this[R])H.dest.write(C)===!1&&this.pause();let q=super.emit("data",C);return this[a](),q}[T](){this[u]||(this[u]=!0,this.readable=!1,this[j]?x(()=>this[I]()):this[I]())}[I](){if(this[g]){let q=this[g].end();if(q){for(let H of this[R])H.dest.write(q);super.emit("data",q)}}for(let q of this[R])q.end();let C=super.emit("end");return this.removeAllListeners("end"),C}collect(){let C=[];this[M]||(C.dataLength=0);let q=this.promise();return this.on("data",H=>{C.push(H),this[M]||(C.dataLength+=H.length)}),q.then(()=>C)}concat(){return this[M]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(C=>this[M]?Promise.reject(new Error("cannot concat in objectMode")):this[m]?C.join(""):Buffer.concat(C,C.dataLength))}promise(){return new Promise((C,q)=>{this.on(U,()=>q(new Error("stream destroyed"))),this.on("error",H=>q(H)),this.on("end",()=>C())})}[A](){return{next:()=>{let C=this.read();if(C!==null)return Promise.resolve({done:!1,value:C});if(this[o])return Promise.resolve({done:!0});let q=null,H=null,Z=ie=>{this.removeListener("data",G),this.removeListener("end",te),H(ie)},G=ie=>{this.removeListener("error",Z),this.removeListener("end",te),this.pause(),q({value:ie,done:!!this[o]})},te=()=>{this.removeListener("error",Z),this.removeListener("data",G),q({done:!0})},z=()=>Z(new Error("stream destroyed"));return new Promise((ie,ce)=>{H=ce,q=ie,this.once(U,z),this.once("error",Z),this.once("end",te),this.once("data",G)})}}}[N](){return{next:()=>{let C=this.read();return{value:C,done:C===null}}}}destroy(C){return this[U]?(C?this.emit("error",C):this.emit(U),this):(this[U]=!0,this[O].length=0,this[B]=0,typeof this.close=="function"&&!this[f]&&this.close(),C?this.emit("error",C):this.emit(U),this)}static isStream(C){return!!C&&(C instanceof VD||C instanceof n||C instanceof i&&(typeof C.pipe=="function"||typeof C.write=="function"&&typeof C.end=="function"))}}}),Qk=ee((t,e)=>{V();var r=re("zlib").constants||{ZLIB_VERNUM:4736};e.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},r))}),KD=ee((t,e)=>{"use strict";V();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=re("events"),n=re("stream"),s=re("string_decoder").StringDecoder,o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),u=Symbol("emittedEnd"),l=Symbol("emittingEnd"),c=Symbol("emittedError"),f=Symbol("closed"),h=Symbol("read"),p=Symbol("flush"),d=Symbol("flushChunk"),m=Symbol("encoding"),g=Symbol("decoder"),v=Symbol("flowing"),F=Symbol("paused"),k=Symbol("resume"),O=Symbol("bufferLength"),R=Symbol("bufferPush"),B=Symbol("bufferShift"),_=Symbol("objectMode"),S=Symbol("destroyed"),M=Symbol("emitData"),U=Symbol("emitEnd"),L=Symbol("emitEnd2"),T=Symbol("async"),I=y=>Promise.resolve().then(y),j=global._MP_NO_ITERATOR_SYMBOLS_!=="1",x=j&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),D=j&&Symbol.iterator||Symbol("iterator not implemented"),A=y=>y==="end"||y==="finish"||y==="prefinish",N=y=>y instanceof ArrayBuffer||typeof y=="object"&&y.constructor&&y.constructor.name==="ArrayBuffer"&&y.byteLength>=0,Y=y=>!Buffer.isBuffer(y)&&ArrayBuffer.isView(y),W=class{constructor(y,b,P){this.src=y,this.dest=b,this.opts=P,this.ondrain=()=>y[k](),b.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},E=class extends W{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(y,b,P){super(y,b,P),this.proxyErrors=C=>b.emit("error",C),y.on("error",this.proxyErrors)}};e.exports=class ZD extends n{constructor(b){super(),this[v]=!1,this[F]=!1,this.pipes=[],this.buffer=[],this[_]=b&&b.objectMode||!1,this[_]?this[m]=null:this[m]=b&&b.encoding||null,this[m]==="buffer"&&(this[m]=null),this[T]=b&&!!b.async||!1,this[g]=this[m]?new s(this[m]):null,this[o]=!1,this[u]=!1,this[l]=!1,this[f]=!1,this[c]=null,this.writable=!0,this.readable=!0,this[O]=0,this[S]=!1}get bufferLength(){return this[O]}get encoding(){return this[m]}set encoding(b){if(this[_])throw new Error("cannot set encoding in objectMode");if(this[m]&&b!==this[m]&&(this[g]&&this[g].lastNeed||this[O]))throw new Error("cannot change encoding");this[m]!==b&&(this[g]=b?new s(b):null,this.buffer.length&&(this.buffer=this.buffer.map(P=>this[g].write(P)))),this[m]=b}setEncoding(b){this.encoding=b}get objectMode(){return this[_]}set objectMode(b){this[_]=this[_]||!!b}get async(){return this[T]}set async(b){this[T]=this[T]||!!b}write(b,P,C){if(this[o])throw new Error("write after end");if(this[S])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof P=="function"&&(C=P,P="utf8"),P||(P="utf8");let q=this[T]?I:H=>H();return!this[_]&&!Buffer.isBuffer(b)&&(Y(b)?b=Buffer.from(b.buffer,b.byteOffset,b.byteLength):N(b)?b=Buffer.from(b):typeof b!="string"&&(this.objectMode=!0)),this[_]?(this.flowing&&this[O]!==0&&this[p](!0),this.flowing?this.emit("data",b):this[R](b),this[O]!==0&&this.emit("readable"),C&&q(C),this.flowing):b.length?(typeof b=="string"&&!(P===this[m]&&!this[g].lastNeed)&&(b=Buffer.from(b,P)),Buffer.isBuffer(b)&&this[m]&&(b=this[g].write(b)),this.flowing&&this[O]!==0&&this[p](!0),this.flowing?this.emit("data",b):this[R](b),this[O]!==0&&this.emit("readable"),C&&q(C),this.flowing):(this[O]!==0&&this.emit("readable"),C&&q(C),this.flowing)}read(b){if(this[S])return null;if(this[O]===0||b===0||b>this[O])return this[a](),null;this[_]&&(b=null),this.buffer.length>1&&!this[_]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[O])]);let P=this[h](b||null,this.buffer[0]);return this[a](),P}[h](b,P){return b===P.length||b===null?this[B]():(this.buffer[0]=P.slice(b),P=P.slice(0,b),this[O]-=b),this.emit("data",P),!this.buffer.length&&!this[o]&&this.emit("drain"),P}end(b,P,C){return typeof b=="function"&&(C=b,b=null),typeof P=="function"&&(C=P,P="utf8"),b&&this.write(b,P),C&&this.once("end",C),this[o]=!0,this.writable=!1,(this.flowing||!this[F])&&this[a](),this}[k](){this[S]||(this[F]=!1,this[v]=!0,this.emit("resume"),this.buffer.length?this[p]():this[o]?this[a]():this.emit("drain"))}resume(){return this[k]()}pause(){this[v]=!1,this[F]=!0}get destroyed(){return this[S]}get flowing(){return this[v]}get paused(){return this[F]}[R](b){this[_]?this[O]+=1:this[O]+=b.length,this.buffer.push(b)}[B](){return this.buffer.length&&(this[_]?this[O]-=1:this[O]-=this.buffer[0].length),this.buffer.shift()}[p](b){do;while(this[d](this[B]()));!b&&!this.buffer.length&&!this[o]&&this.emit("drain")}[d](b){return b?(this.emit("data",b),this.flowing):!1}pipe(b,P){if(this[S])return;let C=this[u];return P=P||{},b===r.stdout||b===r.stderr?P.end=!1:P.end=P.end!==!1,P.proxyErrors=!!P.proxyErrors,C?P.end&&b.end():(this.pipes.push(P.proxyErrors?new E(this,b,P):new W(this,b,P)),this[T]?I(()=>this[k]()):this[k]()),b}unpipe(b){let P=this.pipes.find(C=>C.dest===b);P&&(this.pipes.splice(this.pipes.indexOf(P),1),P.unpipe())}addListener(b,P){return this.on(b,P)}on(b,P){let C=super.on(b,P);return b==="data"&&!this.pipes.length&&!this.flowing?this[k]():b==="readable"&&this[O]!==0?super.emit("readable"):A(b)&&this[u]?(super.emit(b),this.removeAllListeners(b)):b==="error"&&this[c]&&(this[T]?I(()=>P.call(this,this[c])):P.call(this,this[c])),C}get emittedEnd(){return this[u]}[a](){!this[l]&&!this[u]&&!this[S]&&this.buffer.length===0&&this[o]&&(this[l]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[f]&&this.emit("close"),this[l]=!1)}emit(b,P,...C){if(b!=="error"&&b!=="close"&&b!==S&&this[S])return;if(b==="data")return P?this[T]?I(()=>this[M](P)):this[M](P):!1;if(b==="end")return this[U]();if(b==="close"){if(this[f]=!0,!this[u]&&!this[S])return;let H=super.emit("close");return this.removeAllListeners("close"),H}else if(b==="error"){this[c]=P;let H=super.emit("error",P);return this[a](),H}else if(b==="resume"){let H=super.emit("resume");return this[a](),H}else if(b==="finish"||b==="prefinish"){let H=super.emit(b);return this.removeAllListeners(b),H}let q=super.emit(b,P,...C);return this[a](),q}[M](b){for(let C of this.pipes)C.dest.write(b)===!1&&this.pause();let P=super.emit("data",b);return this[a](),P}[U](){this[u]||(this[u]=!0,this.readable=!1,this[T]?I(()=>this[L]()):this[L]())}[L](){if(this[g]){let P=this[g].end();if(P){for(let C of this.pipes)C.dest.write(P);super.emit("data",P)}}for(let P of this.pipes)P.end();let b=super.emit("end");return this.removeAllListeners("end"),b}collect(){let b=[];this[_]||(b.dataLength=0);let P=this.promise();return this.on("data",C=>{b.push(C),this[_]||(b.dataLength+=C.length)}),P.then(()=>b)}concat(){return this[_]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(b=>this[_]?Promise.reject(new Error("cannot concat in objectMode")):this[m]?b.join(""):Buffer.concat(b,b.dataLength))}promise(){return new Promise((b,P)=>{this.on(S,()=>P(new Error("stream destroyed"))),this.on("error",C=>P(C)),this.on("end",()=>b())})}[x](){return{next:()=>{let b=this.read();if(b!==null)return Promise.resolve({done:!1,value:b});if(this[o])return Promise.resolve({done:!0});let P=null,C=null,q=te=>{this.removeListener("data",H),this.removeListener("end",Z),C(te)},H=te=>{this.removeListener("error",q),this.removeListener("end",Z),this.pause(),P({value:te,done:!!this[o]})},Z=()=>{this.removeListener("error",q),this.removeListener("data",H),P({done:!0})},G=()=>q(new Error("stream destroyed"));return new Promise((te,z)=>{C=z,P=te,this.once(S,G),this.once("error",q),this.once("end",Z),this.once("data",H)})}}}[D](){return{next:()=>{let b=this.read();return{value:b,done:b===null}}}}destroy(b){return this[S]?(b?this.emit("error",b):this.emit(S),this):(this[S]=!0,this.buffer.length=0,this[O]=0,typeof this.close=="function"&&!this[f]&&this.close(),b?this.emit("error",b):this.emit(S),this)}static isStream(b){return!!b&&(b instanceof ZD||b instanceof n||b instanceof i&&(typeof b.pipe=="function"||typeof b.write=="function"&&typeof b.end=="function"))}}}),JD=ee(t=>{"use strict";V();var e=re("assert"),r=re("buffer").Buffer,i=re("zlib"),n=t.constants=Qk(),s=KD(),o=r.concat,a=Symbol("_superWrite"),u=class extends Error{constructor(A){super("zlib: "+A.message),this.code=A.code,this.errno=A.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+A.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},l=Symbol("opts"),c=Symbol("flushFlag"),f=Symbol("finishFlushFlag"),h=Symbol("fullFlushFlag"),p=Symbol("handle"),d=Symbol("onError"),m=Symbol("sawError"),g=Symbol("level"),v=Symbol("strategy"),F=Symbol("ended"),k=Symbol("_defaultFullFlush"),O=class extends s{constructor(A,N){if(!A||typeof A!="object")throw new TypeError("invalid options for ZlibBase constructor");super(A),this[m]=!1,this[F]=!1,this[l]=A,this[c]=A.flush,this[f]=A.finishFlush;try{this[p]=new i[N](A)}catch(Y){throw new u(Y)}this[d]=Y=>{this[m]||(this[m]=!0,this.close(),this.emit("error",Y))},this[p].on("error",Y=>this[d](new u(Y))),this.once("end",()=>this.close)}close(){this[p]&&(this[p].close(),this[p]=null,this.emit("close"))}reset(){if(!this[m])return e(this[p],"zlib binding closed"),this[p].reset()}flush(A){this.ended||(typeof A!="number"&&(A=this[h]),this.write(Object.assign(r.alloc(0),{[c]:A})))}end(A,N,Y){return A&&this.write(A,N),this.flush(this[f]),this[F]=!0,super.end(null,null,Y)}get ended(){return this[F]}write(A,N,Y){if(typeof N=="function"&&(Y=N,N="utf8"),typeof A=="string"&&(A=r.from(A,N)),this[m])return;e(this[p],"zlib binding closed");let W=this[p]._handle,E=W.close;W.close=()=>{};let y=this[p].close;this[p].close=()=>{},r.concat=C=>C;let b;try{let C=typeof A[c]=="number"?A[c]:this[c];b=this[p]._processChunk(A,C),r.concat=o}catch(C){r.concat=o,this[d](new u(C))}finally{this[p]&&(this[p]._handle=W,W.close=E,this[p].close=y,this[p].removeAllListeners("error"))}this[p]&&this[p].on("error",C=>this[d](new u(C)));let P;if(b)if(Array.isArray(b)&&b.length>0){P=this[a](r.from(b[0]));for(let C=1;C<b.length;C++)P=this[a](b[C])}else P=this[a](r.from(b));return Y&&Y(),P}[a](A){return super.write(A)}},R=class extends O{constructor(A,N){A=A||{},A.flush=A.flush||n.Z_NO_FLUSH,A.finishFlush=A.finishFlush||n.Z_FINISH,super(A,N),this[h]=n.Z_FULL_FLUSH,this[g]=A.level,this[v]=A.strategy}params(A,N){if(!this[m]){if(!this[p])throw new Error("cannot switch params when binding is closed");if(!this[p].params)throw new Error("not supported in this implementation");if(this[g]!==A||this[v]!==N){this.flush(n.Z_SYNC_FLUSH),e(this[p],"zlib binding closed");let Y=this[p].flush;this[p].flush=(W,E)=>{this.flush(W),E()};try{this[p].params(A,N)}finally{this[p].flush=Y}this[p]&&(this[g]=A,this[v]=N)}}}},B=class extends R{constructor(A){super(A,"Deflate")}},_=class extends R{constructor(A){super(A,"Inflate")}},S=Symbol("_portable"),M=class extends R{constructor(A){super(A,"Gzip"),this[S]=A&&!!A.portable}[a](A){return this[S]?(this[S]=!1,A[9]=255,super[a](A)):super[a](A)}},U=class extends R{constructor(A){super(A,"Gunzip")}},L=class extends R{constructor(A){super(A,"DeflateRaw")}},T=class extends R{constructor(A){super(A,"InflateRaw")}},I=class extends R{constructor(A){super(A,"Unzip")}},j=class extends O{constructor(A,N){A=A||{},A.flush=A.flush||n.BROTLI_OPERATION_PROCESS,A.finishFlush=A.finishFlush||n.BROTLI_OPERATION_FINISH,super(A,N),this[h]=n.BROTLI_OPERATION_FLUSH}},x=class extends j{constructor(A){super(A,"BrotliCompress")}},D=class extends j{constructor(A){super(A,"BrotliDecompress")}};t.Deflate=B,t.Inflate=_,t.Gzip=M,t.Gunzip=U,t.DeflateRaw=L,t.InflateRaw=T,t.Unzip=I,typeof i.BrotliCompress=="function"?(t.BrotliCompress=x,t.BrotliDecompress=D):t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}),Kn=ee((t,e)=>{V();var r=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports=r!=="win32"?i=>i:i=>i&&i.replace(/\\/g,"/")}),Ih=ee((t,e)=>{"use strict";V();var r=Ph(),i=Kn(),n=Symbol("slurp");e.exports=class extends r{constructor(s,o,a){switch(super(),this.pause(),this.extended=o,this.globalExtended=a,this.header=s,this.startBlockSize=512*Math.ceil(s.size/512),this.blockRemain=this.startBlockSize,this.remain=s.size,this.type=s.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=i(s.path),this.mode=s.mode,this.mode&&(this.mode=this.mode&4095),this.uid=s.uid,this.gid=s.gid,this.uname=s.uname,this.gname=s.gname,this.size=s.size,this.mtime=s.mtime,this.atime=s.atime,this.ctime=s.ctime,this.linkpath=i(s.linkpath),this.uname=s.uname,this.gname=s.gname,o&&this[n](o),a&&this[n](a,!0)}write(s){let o=s.length;if(o>this.blockRemain)throw new Error("writing more to entry than is appropriate");let a=this.remain,u=this.blockRemain;return this.remain=Math.max(0,a-o),this.blockRemain=Math.max(0,u-o),this.ignore?!0:a>=o?super.write(s):super.write(s.slice(0,a))}[n](s,o){for(let a in s)s[a]!==null&&s[a]!==void 0&&!(o&&a==="path")&&(this[a]=a==="path"||a==="linkpath"?i(s[a]):s[a])}}}),XD=ee(t=>{"use strict";V(),t.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),t.code=new Map(Array.from(t.name).map(e=>[e[1],e[0]]))}),eT=ee((t,e)=>{"use strict";V();var r=(c,f)=>{if(Number.isSafeInteger(c))c<0?n(c,f):i(c,f);else throw Error("cannot encode number outside of javascript safe integer range");return f},i=(c,f)=>{f[0]=128;for(var h=f.length;h>1;h--)f[h-1]=c&255,c=Math.floor(c/256)},n=(c,f)=>{f[0]=255;var h=!1;c=c*-1;for(var p=f.length;p>1;p--){var d=c&255;c=Math.floor(c/256),h?f[p-1]=u(d):d===0?f[p-1]=0:(h=!0,f[p-1]=l(d))}},s=c=>{let f=c[0],h=f===128?a(c.slice(1,c.length)):f===255?o(c):null;if(h===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(h))throw Error("parsed number outside of javascript safe integer range");return h},o=c=>{for(var f=c.length,h=0,p=!1,d=f-1;d>-1;d--){var m=c[d],g;p?g=u(m):m===0?g=m:(p=!0,g=l(m)),g!==0&&(h-=g*Math.pow(256,f-d-1))}return h},a=c=>{for(var f=c.length,h=0,p=f-1;p>-1;p--){var d=c[p];d!==0&&(h+=d*Math.pow(256,f-p-1))}return h},u=c=>(255^c)&255,l=c=>(255^c)+1&255;e.exports={encode:r,parse:s}}),Zn=ee((t,e)=>{"use strict";V();var r=XD(),i=re("path").posix,n=eT(),s=Symbol("slurp"),o=Symbol("type"),a=class{constructor(_,S,M,U){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[o]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(_)?this.decode(_,S||0,M,U):_&&this.set(_)}decode(_,S,M,U){if(S||(S=0),!_||!(_.length>=S+512))throw new Error("need 512 bytes for header");if(this.path=l(_,S,100),this.mode=h(_,S+100,8),this.uid=h(_,S+108,8),this.gid=h(_,S+116,8),this.size=h(_,S+124,12),this.mtime=c(_,S+136,12),this.cksum=h(_,S+148,12),this[s](M),this[s](U,!0),this[o]=l(_,S+156,1),this[o]===""&&(this[o]="0"),this[o]==="0"&&this.path.slice(-1)==="/"&&(this[o]="5"),this[o]==="5"&&(this.size=0),this.linkpath=l(_,S+157,100),_.slice(S+257,S+265).toString()==="ustar\x0000")if(this.uname=l(_,S+265,32),this.gname=l(_,S+297,32),this.devmaj=h(_,S+329,8),this.devmin=h(_,S+337,8),_[S+475]!==0){let T=l(_,S+345,155);this.path=T+"/"+this.path}else{let T=l(_,S+345,130);T&&(this.path=T+"/"+this.path),this.atime=c(_,S+476,12),this.ctime=c(_,S+488,12)}let L=8*32;for(let T=S;T<S+148;T++)L+=_[T];for(let T=S+156;T<S+512;T++)L+=_[T];this.cksumValid=L===this.cksum,this.cksum===null&&L===8*32&&(this.nullBlock=!0)}[s](_,S){for(let M in _)_[M]!==null&&_[M]!==void 0&&!(S&&M==="path")&&(this[M]=_[M])}encode(_,S){if(_||(_=this.block=Buffer.alloc(512),S=0),S||(S=0),!(_.length>=S+512))throw new Error("need 512 bytes for header");let M=this.ctime||this.atime?130:155,U=u(this.path||"",M),L=U[0],T=U[1];this.needPax=U[2],this.needPax=B(_,S,100,L)||this.needPax,this.needPax=g(_,S+100,8,this.mode)||this.needPax,this.needPax=g(_,S+108,8,this.uid)||this.needPax,this.needPax=g(_,S+116,8,this.gid)||this.needPax,this.needPax=g(_,S+124,12,this.size)||this.needPax,this.needPax=O(_,S+136,12,this.mtime)||this.needPax,_[S+156]=this[o].charCodeAt(0),this.needPax=B(_,S+157,100,this.linkpath)||this.needPax,_.write("ustar\x0000",S+257,8),this.needPax=B(_,S+265,32,this.uname)||this.needPax,this.needPax=B(_,S+297,32,this.gname)||this.needPax,this.needPax=g(_,S+329,8,this.devmaj)||this.needPax,this.needPax=g(_,S+337,8,this.devmin)||this.needPax,this.needPax=B(_,S+345,M,T)||this.needPax,_[S+475]!==0?this.needPax=B(_,S+345,155,T)||this.needPax:(this.needPax=B(_,S+345,130,T)||this.needPax,this.needPax=O(_,S+476,12,this.atime)||this.needPax,this.needPax=O(_,S+488,12,this.ctime)||this.needPax);let I=8*32;for(let j=S;j<S+148;j++)I+=_[j];for(let j=S+156;j<S+512;j++)I+=_[j];return this.cksum=I,g(_,S+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(_){for(let S in _)_[S]!==null&&_[S]!==void 0&&(this[S]=_[S])}get type(){return r.name.get(this[o])||this[o]}get typeKey(){return this[o]}set type(_){r.code.has(_)?this[o]=r.code.get(_):this[o]=_}},u=(_,S)=>{let M=_,U="",L,T=i.parse(_).root||".";if(Buffer.byteLength(M)<100)L=[M,U,!1];else{U=i.dirname(M),M=i.basename(M);do Buffer.byteLength(M)<=100&&Buffer.byteLength(U)<=S?L=[M,U,!1]:Buffer.byteLength(M)>100&&Buffer.byteLength(U)<=S?L=[M.slice(0,100-1),U,!0]:(M=i.join(i.basename(U),M),U=i.dirname(U));while(U!==T&&!L);L||(L=[_.slice(0,100-1),"",!0])}return L},l=(_,S,M)=>_.slice(S,S+M).toString("utf8").replace(/\0.*/,""),c=(_,S,M)=>f(h(_,S,M)),f=_=>_===null?null:new Date(_*1e3),h=(_,S,M)=>_[S]&128?n.parse(_.slice(S,S+M)):d(_,S,M),p=_=>isNaN(_)?null:_,d=(_,S,M)=>p(parseInt(_.slice(S,S+M).toString("utf8").replace(/\0.*$/,"").trim(),8)),m={12:8589934591,8:2097151},g=(_,S,M,U)=>U===null?!1:U>m[M]||U<0?(n.encode(U,_.slice(S,S+M)),!0):(v(_,S,M,U),!1),v=(_,S,M,U)=>_.write(F(U,M),S,M,"ascii"),F=(_,S)=>k(Math.floor(_).toString(8),S),k=(_,S)=>(_.length===S-1?_:new Array(S-_.length-1).join("0")+_+" ")+"\0",O=(_,S,M,U)=>U===null?!1:g(_,S,M,U.getTime()/1e3),R=new Array(156).join("\0"),B=(_,S,M,U)=>U===null?!1:(_.write(U+R,S,M,"utf8"),U.length!==Buffer.byteLength(U)||U.length>M);e.exports=a}),Nh=ee((t,e)=>{"use strict";V();var r=Zn(),i=re("path"),n=class{constructor(u,l){this.atime=u.atime||null,this.charset=u.charset||null,this.comment=u.comment||null,this.ctime=u.ctime||null,this.gid=u.gid||null,this.gname=u.gname||null,this.linkpath=u.linkpath||null,this.mtime=u.mtime||null,this.path=u.path||null,this.size=u.size||null,this.uid=u.uid||null,this.uname=u.uname||null,this.dev=u.dev||null,this.ino=u.ino||null,this.nlink=u.nlink||null,this.global=l||!1}encode(){let u=this.encodeBody();if(u==="")return null;let l=Buffer.byteLength(u),c=512*Math.ceil(1+l/512),f=Buffer.allocUnsafe(c);for(let h=0;h<512;h++)f[h]=0;new r({path:("PaxHeader/"+i.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:l,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(f),f.write(u,512,l,"utf8");for(let h=l+512;h<f.length;h++)f[h]=0;return f}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(u){if(this[u]===null||this[u]===void 0)return"";let l=this[u]instanceof Date?this[u].getTime()/1e3:this[u],c=" "+(u==="dev"||u==="ino"||u==="nlink"?"SCHILY.":"")+u+"="+l+`
39
+ `+t.slice(o+1):u+=t.slice(n),u.slice(1)}function aS(t){for(var e="",r=0,i,n=0;n<t.length;r>=65536?n+=2:n++)r=fn(t,n),i=ke[r],!i&&gn(r)?(e+=t[n],r>=65536&&(e+=t[n+1])):e+=i||Xw(r);return e}function uS(t,e,r){var i="",n=t.tag,s,o,a;for(s=0,o=r.length;s<o;s+=1)a=r[s],t.replacer&&(a=t.replacer.call(r,String(s),a)),(Mt(t,e,a,!1,!1)||typeof a=="undefined"&&Mt(t,e,null,!1,!1))&&(i!==""&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump);t.tag=n,t.dump="["+i+"]"}function yf(t,e,r,i){var n="",s=t.tag,o,a,u;for(o=0,a=r.length;o<a;o+=1)u=r[o],t.replacer&&(u=t.replacer.call(r,String(o),u)),(Mt(t,e+1,u,!0,!0,!1,!0)||typeof u=="undefined"&&Mt(t,e+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Ba(t,e)),t.dump&&dn===t.dump.charCodeAt(0)?n+="-":n+="- ",n+=t.dump);t.tag=s,t.dump=n||"[]"}function lS(t,e,r){var i="",n=t.tag,s=Object.keys(r),o,a,u,l,c;for(o=0,a=s.length;o<a;o+=1)c="",i!==""&&(c+=", "),t.condenseFlow&&(c+='"'),u=s[o],l=r[u],t.replacer&&(l=t.replacer.call(r,u,l)),Mt(t,e,u,!1,!1)&&(t.dump.length>1024&&(c+="? "),c+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Mt(t,e,l,!1,!1)&&(c+=t.dump,i+=c));t.tag=n,t.dump="{"+i+"}"}function cS(t,e,r,i){var n="",s=t.tag,o=Object.keys(r),a,u,l,c,f,h;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new He("sortKeys must be a boolean or a function");for(a=0,u=o.length;a<u;a+=1)h="",(!i||n!=="")&&(h+=Ba(t,e)),l=o[a],c=r[l],t.replacer&&(c=t.replacer.call(r,l,c)),Mt(t,e+1,l,!0,!0,!0)&&(f=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,f&&(t.dump&&dn===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,f&&(h+=Ba(t,e)),Mt(t,e+1,c,!0,f)&&(t.dump&&dn===t.dump.charCodeAt(0)?h+=":":h+=": ",h+=t.dump,n+=h));t.tag=s,t.dump=n||"{}"}function Ef(t,e,r){var i,n,s,o,a,u;for(n=r?t.explicitTypes:t.implicitTypes,s=0,o=n.length;s<o;s+=1)if(a=n[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(r?a.multi&&a.representName?t.tag=a.representName(e):t.tag=a.tag:t.tag="?",a.represent){if(u=t.styleMap[a.tag]||a.defaultStyle,Kf.call(a.represent)==="[object Function]")i=a.represent(e,u);else if(Zf.call(a.represent,u))i=a.represent[u](e,u);else throw new He("!<"+a.tag+'> tag resolver accepts not "'+u+'" style');t.dump=i}return!0}return!1}function Mt(t,e,r,i,n,s,o){t.tag=null,t.dump=r,Ef(t,r,!1)||Ef(t,r,!0);var a=Kf.call(t.dump),u=i,l;i&&(i=t.flowLevel<0||t.flowLevel>e);var c=a==="[object Object]"||a==="[object Array]",f,h;if(c&&(f=t.duplicates.indexOf(r),h=f!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(n=!1),h&&t.usedDuplicates[f])t.dump="*ref_"+f;else{if(c&&h&&!t.usedDuplicates[f]&&(t.usedDuplicates[f]=!0),a==="[object Object]")i&&Object.keys(t.dump).length!==0?(cS(t,e,t.dump,n),h&&(t.dump="&ref_"+f+t.dump)):(lS(t,e,t.dump),h&&(t.dump="&ref_"+f+" "+t.dump));else if(a==="[object Array]")i&&t.dump.length!==0?(t.noArrayIndent&&!o&&e>0?yf(t,e-1,t.dump,n):yf(t,e,t.dump,n),h&&(t.dump="&ref_"+f+t.dump)):(uS(t,e,t.dump),h&&(t.dump="&ref_"+f+" "+t.dump));else if(a==="[object String]")t.tag!=="?"&&sS(t,t.dump,e,s,u);else{if(a==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new He("unacceptable kind of an object to dump "+a)}t.tag!==null&&t.tag!=="?"&&(l=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",t.dump=l+" "+t.dump)}return!0}function hS(t,e){var r=[],i=[],n,s;for(Ia(t,r,i),n=0,s=i.length;n<s;n+=1)e.duplicates.push(r[i[n]]);e.usedDuplicates=new Array(s)}function Ia(t,e,r){var i,n,s;if(t!==null&&typeof t=="object")if(n=e.indexOf(t),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(e.push(t),Array.isArray(t))for(n=0,s=t.length;n<s;n+=1)Ia(t[n],e,r);else for(i=Object.keys(t),n=0,s=i.length;n<s;n+=1)Ia(t[i[n]],e,r)}function fS(t,e){e=e||{};var r=new eS(e);r.noRefs||hS(t,r);var i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Mt(r,0,i,!0,!0)?r.dump+`
40
+ `:""}var pS=fS,dS={dump:pS};function qa(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var mS=Oe,gS=_f,yS=vf,ES=Of,DS=kf,bS=Ma,_S=Vf.load,wS=Vf.loadAll,SS=dS.dump,AS=He,vS={binary:If,float:Ff,map:Af,null:Cf,pairs:Mf,set:jf,timestamp:Bf,bool:xf,int:Rf,merge:Pf,omap:Nf,seq:Sf,str:wf},CS=qa("safeLoad","load"),xS=qa("safeLoadAll","loadAll"),RS=qa("safeDump","dump"),FS={Type:mS,Schema:gS,FAILSAFE_SCHEMA:yS,JSON_SCHEMA:ES,CORE_SCHEMA:DS,DEFAULT_SCHEMA:bS,load:_S,loadAll:wS,dump:SS,YAMLException:AS,types:vS,safeLoad:CS,safeLoadAll:xS,safeDump:RS},Ua=FS;var UC=J(Ns());var ne={};r_(ne,{bold:()=>PC,dimmed:()=>NC,error:()=>e0,grey:()=>MC,info:()=>BC,item:()=>jC,log:()=>fr,turboBlue:()=>wi,turboGradient:()=>LC,turboLoader:()=>Xm,turboRed:()=>Zm,underline:()=>IC,warn:()=>Qm,yellow:()=>Jm});var hr=J(require("chalk")),Wm=J(require("ora")),Ym=J(require("gradient-string")),Vm="#0099F7",Km="#F11712",TC="#FFFF00",LC=(0,Ym.default)(Vm,Km),wi=hr.default.hex(Vm),Zm=hr.default.hex(Km),Jm=hr.default.hex(TC),Xm=t=>(0,Wm.default)({text:t,spinner:{frames:[" ",wi("> "),wi(">> "),wi(">>>")]}}),BC=(...t)=>{fr(wi.bold(">>>"),...t)},PC=(...t)=>{fr(hr.default.bold(...t))},IC=(...t)=>{fr(hr.default.underline(...t))},NC=(...t)=>{fr(hr.default.dim(...t))},MC=(...t)=>{fr(hr.default.grey(...t))},jC=(...t)=>{fr(wi.bold(" \u2022"),...t)},fr=(...t)=>{console.log(...t)},Qm=(...t)=>{console.error(Jm.bold(">>>"),...t)},e0=(...t)=>{console.error(Zm.bold(">>>"),...t)};var Ng=J(require("os")),Mg=J(ki());async function pr(t,e=[],r){let i={cwd:Ng.default.tmpdir(),env:{COREPACK_ENABLE_STRICT:"0"},...r};try{let{stdout:n}=await(0,Mg.default)(t,e,i);return n.trim()}catch{return}}async function Gl(){let[t,e,r,i]=await Promise.all([pr("yarnpkg",["--version"]),pr("npm",["--version"]),pr("pnpm",["--version"]),pr("bun",["--version"])]);return{yarn:t,pnpm:r,npm:e,bun:i}}async function zl(){let[t,e,r,i]=await Promise.all([pr("yarnpkg",["global","bin"]),pr("npm",["config","get","prefix"]),pr("pnpm",["bin","--global"]),pr("bun",["pm","--g","bin"])]);return{yarn:t,pnpm:r,npm:e,bun:i}}var NR=J(require("fs-extra"));var MR=J(require("path")),jR=J(require("fs-extra")),$R=J(require("chalk"));var ND=require("stream"),MD=require("util"),wk=require("path"),Sk=require("os"),jD=require("fs"),Ak=J(ID());var _I=(0,MD.promisify)(ND.Stream.pipeline);var $D=require("fs-extra");var Bk=J(require("path")),Pk=J(YD()),Ik=J(require("chalk")),kh=require("fs-extra");var Zb=require("commander");var ia={name:"@turbo/codemod",version:"1.13.1",description:"Provides Codemod transformations to help upgrade your Turborepo codebase when a feature is deprecated.",homepage:"https://turbo.build/repo",license:"MPL-2.0",repository:{type:"git",url:"https://github.com/vercel/turbo",directory:"packages/turbo-codemod"},bugs:{url:"https://github.com/vercel/turbo/issues"},bin:"dist/cli.js",scripts:{build:"tsup",test:"jest",lint:"eslint src/","check-types":"tsc --noEmit","add-transformer":"plop","lint:prettier":"prettier -c . --cache --ignore-path=../../.prettierignore"},dependencies:{axios:"0.27.2",chalk:"2.4.2",commander:"^9.5.0",diff:"^5.1.0","find-up":"4.1.0","fs-extra":"^10.0.0","gradient-string":"^2.0.0",inquirer:"^8.2.4","inquirer-file-tree-selection-prompt":"^1.0.19","is-git-clean":"^1.1.0",ora:"4.1.1",semver:"^7.3.7","update-check":"^1.5.4"},devDependencies:{"@turbo/eslint-config":"workspace:*","@turbo/gen":"workspace:*","@turbo/test-utils":"workspace:*","@turbo/tsconfig":"workspace:*","@turbo/types":"workspace:*","@turbo/utils":"workspace:*","@turbo/workspaces":"workspace:*","@types/chalk-animation":"^1.6.0","@types/diff":"^5.0.2","@types/fs-extra":"^9.0.13","@types/gradient-string":"^1.1.2","@types/inquirer":"^8.2.0","@types/jest":"^27.4.0","@types/node":"^18.17.2","@types/semver":"^7.3.9","@types/uuid":"^9.0.0",deepmerge:"^4.2.2",jest:"^27.4.3",plop:"^3.1.1",semver:"^7.3.5","ts-jest":"^27.1.1",tsup:"^6.7.0",typescript:"5.3.3"},files:["dist"],publishConfig:{access:"public"}};var an=J(require("os")),zb=require("child_process"),$e=J(require("chalk")),Wb=require("inquirer");var Fr=J(require("chalk"),1),ub=J(require("ora"),1),lb=J(require("gradient-string"),1);var PT=J(ki(),1),tN=require("fs-extra");var oN=J(Ns(),1),uN=require("fs-extra"),cN=require("fs-extra"),fN=require("chalk"),db=require("stream"),mb=require("util"),gN=require("fs-extra"),bN=require("chalk"),wN=require("fs-extra"),ri=J(require("path"),1),qe=require("fs-extra"),gb=J(ki(),1),yb=J(require("path"),1),Eb=require("fs-extra"),Db=J(require("chalk"),1),rr=J(require("path"),1),bb=J(ki(),1),rt=require("fs-extra"),_b=J(Ns(),1);var Yn=J(require("path"),1),Tt=require("fs-extra"),nn=J(require("path"),1),Lt=require("fs-extra"),Vn=J(require("path"),1),Bt=require("fs-extra"),gL=J(require("chalk"),1),yL=J(require("gradient-string"),1),EL=J(ki(),1),DL=J(require("ora"),1),bL=require("semver"),_L=J(require("chalk"),1),Mk=Object.create,Bh=Object.defineProperty,jk=Object.getOwnPropertyDescriptor,$k=Object.getOwnPropertyNames,Hk=Object.getPrototypeOf,qk=Object.prototype.hasOwnProperty,re=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')}),Uk=(t,e)=>()=>(t&&(e=t(t=0)),e),te=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Gk=(t,e)=>{for(var r in e)Bh(t,r,{get:e[r],enumerable:!0})},zk=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $k(e))!qk.call(t,n)&&n!==r&&Bh(t,n,{get:()=>e[n],enumerable:!(i=jk(e,n))||i.enumerable});return t},oa=(t,e,r)=>(r=t!=null?Mk(Hk(t)):{},zk(e||!t||!t.__esModule?Bh(r,"default",{value:t,enumerable:!0}):r,t)),W=Uk(()=>{}),Wk=te((t,e)=>{W();function r(i){return e.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,r(i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}),Yk=te((t,e)=>{W();var r=Wk().default;function i(){"use strict";e.exports=i=function(){return s},e.exports.__esModule=!0,e.exports.default=e.exports;var n,s={},o=Object.prototype,a=o.hasOwnProperty,u=Object.defineProperty||function(P,d,m){P[d]=m.value},l=typeof Symbol=="function"?Symbol:{},c=l.iterator||"@@iterator",f=l.asyncIterator||"@@asyncIterator",h=l.toStringTag||"@@toStringTag";function p(P,d,m){return Object.defineProperty(P,d,{value:m,enumerable:!0,configurable:!0,writable:!0}),P[d]}try{p({},"")}catch{p=function(P,d,m){return P[d]=m}}function g(P,d,m,D){var A=d&&d.prototype instanceof x?d:x,w=Object.create(A.prototype),I=new j(D||[]);return u(w,"_invoke",{value:K(P,m,I)}),w}function y(P,d,m){try{return{type:"normal",arg:P.call(d,m)}}catch(D){return{type:"throw",arg:D}}}s.wrap=g;var E="suspendedStart",v="suspendedYield",F="executing",O="completed",R={};function x(){}function L(){}function b(){}var S={};p(S,c,function(){return this});var N=Object.getPrototypeOf,H=N&&N(N(z([])));H&&H!==o&&a.call(H,c)&&(S=H);var T=b.prototype=x.prototype=Object.create(S);function U(P){["next","throw","return"].forEach(function(d){p(P,d,function(m){return this._invoke(d,m)})})}function V(P,d){function m(A,w,I,M){var Z=y(P[A],P,w);if(Z.type!=="throw"){var q=Z.arg,Q=q.value;return Q&&r(Q)=="object"&&a.call(Q,"__await")?d.resolve(Q.__await).then(function(G){m("next",G,I,M)},function(G){m("throw",G,I,M)}):d.resolve(Q).then(function(G){q.value=G,I(q)},function(G){return m("throw",G,I,M)})}M(Z.arg)}var D;u(this,"_invoke",{value:function(A,w){function I(){return new d(function(M,Z){m(A,w,M,Z)})}return D=D?D.then(I,I):I()}})}function K(P,d,m){var D=E;return function(A,w){if(D===F)throw new Error("Generator is already running");if(D===O){if(A==="throw")throw w;return{value:n,done:!0}}for(m.method=A,m.arg=w;;){var I=m.delegate;if(I){var M=B(I,m);if(M){if(M===R)continue;return M}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(D===E)throw D=O,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);D=F;var Z=y(P,d,m);if(Z.type==="normal"){if(D=m.done?O:v,Z.arg===R)continue;return{value:Z.arg,done:m.done}}Z.type==="throw"&&(D=O,m.method="throw",m.arg=Z.arg)}}}function B(P,d){var m=d.method,D=P.iterator[m];if(D===n)return d.delegate=null,m==="throw"&&P.iterator.return&&(d.method="return",d.arg=n,B(P,d),d.method==="throw")||m!=="return"&&(d.method="throw",d.arg=new TypeError("The iterator does not provide a '"+m+"' method")),R;var A=y(D,P.iterator,d.arg);if(A.type==="throw")return d.method="throw",d.arg=A.arg,d.delegate=null,R;var w=A.arg;return w?w.done?(d[P.resultName]=w.value,d.next=P.nextLoc,d.method!=="return"&&(d.method="next",d.arg=n),d.delegate=null,R):w:(d.method="throw",d.arg=new TypeError("iterator result is not an object"),d.delegate=null,R)}function C(P){var d={tryLoc:P[0]};1 in P&&(d.catchLoc=P[1]),2 in P&&(d.finallyLoc=P[2],d.afterLoc=P[3]),this.tryEntries.push(d)}function k(P){var d=P.completion||{};d.type="normal",delete d.arg,P.completion=d}function j(P){this.tryEntries=[{tryLoc:"root"}],P.forEach(C,this),this.reset(!0)}function z(P){if(P||P===""){var d=P[c];if(d)return d.call(P);if(typeof P.next=="function")return P;if(!isNaN(P.length)){var m=-1,D=function A(){for(;++m<P.length;)if(a.call(P,m))return A.value=P[m],A.done=!1,A;return A.value=n,A.done=!0,A};return D.next=D}}throw new TypeError(r(P)+" is not iterable")}return L.prototype=b,u(T,"constructor",{value:b,configurable:!0}),u(b,"constructor",{value:L,configurable:!0}),L.displayName=p(b,h,"GeneratorFunction"),s.isGeneratorFunction=function(P){var d=typeof P=="function"&&P.constructor;return!!d&&(d===L||(d.displayName||d.name)==="GeneratorFunction")},s.mark=function(P){return Object.setPrototypeOf?Object.setPrototypeOf(P,b):(P.__proto__=b,p(P,h,"GeneratorFunction")),P.prototype=Object.create(T),P},s.awrap=function(P){return{__await:P}},U(V.prototype),p(V.prototype,f,function(){return this}),s.AsyncIterator=V,s.async=function(P,d,m,D,A){A===void 0&&(A=Promise);var w=new V(g(P,d,m,D),A);return s.isGeneratorFunction(d)?w:w.next().then(function(I){return I.done?I.value:w.next()})},U(T),p(T,h,"Generator"),p(T,c,function(){return this}),p(T,"toString",function(){return"[object Generator]"}),s.keys=function(P){var d=Object(P),m=[];for(var D in d)m.push(D);return m.reverse(),function A(){for(;m.length;){var w=m.pop();if(w in d)return A.value=w,A.done=!1,A}return A.done=!0,A}},s.values=z,j.prototype={constructor:j,reset:function(P){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(k),!P)for(var d in this)d.charAt(0)==="t"&&a.call(this,d)&&!isNaN(+d.slice(1))&&(this[d]=n)},stop:function(){this.done=!0;var P=this.tryEntries[0].completion;if(P.type==="throw")throw P.arg;return this.rval},dispatchException:function(P){if(this.done)throw P;var d=this;function m(Z,q){return w.type="throw",w.arg=P,d.next=Z,q&&(d.method="next",d.arg=n),!!q}for(var D=this.tryEntries.length-1;D>=0;--D){var A=this.tryEntries[D],w=A.completion;if(A.tryLoc==="root")return m("end");if(A.tryLoc<=this.prev){var I=a.call(A,"catchLoc"),M=a.call(A,"finallyLoc");if(I&&M){if(this.prev<A.catchLoc)return m(A.catchLoc,!0);if(this.prev<A.finallyLoc)return m(A.finallyLoc)}else if(I){if(this.prev<A.catchLoc)return m(A.catchLoc,!0)}else{if(!M)throw new Error("try statement without catch or finally");if(this.prev<A.finallyLoc)return m(A.finallyLoc)}}}},abrupt:function(P,d){for(var m=this.tryEntries.length-1;m>=0;--m){var D=this.tryEntries[m];if(D.tryLoc<=this.prev&&a.call(D,"finallyLoc")&&this.prev<D.finallyLoc){var A=D;break}}A&&(P==="break"||P==="continue")&&A.tryLoc<=d&&d<=A.finallyLoc&&(A=null);var w=A?A.completion:{};return w.type=P,w.arg=d,A?(this.method="next",this.next=A.finallyLoc,R):this.complete(w)},complete:function(P,d){if(P.type==="throw")throw P.arg;return P.type==="break"||P.type==="continue"?this.next=P.arg:P.type==="return"?(this.rval=this.arg=P.arg,this.method="return",this.next="end"):P.type==="normal"&&d&&(this.next=d),R},finish:function(P){for(var d=this.tryEntries.length-1;d>=0;--d){var m=this.tryEntries[d];if(m.finallyLoc===P)return this.complete(m.completion,m.afterLoc),k(m),R}},catch:function(P){for(var d=this.tryEntries.length-1;d>=0;--d){var m=this.tryEntries[d];if(m.tryLoc===P){var D=m.completion;if(D.type==="throw"){var A=D.arg;k(m)}return A}}throw new Error("illegal catch attempt")},delegateYield:function(P,d,m){return this.delegate={iterator:z(P),resultName:d,nextLoc:m},this.method==="next"&&(this.arg=n),R}},s}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}),Vk=te((t,e)=>{W();var r=Yk()();e.exports=r;try{regeneratorRuntime=r}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}),Kk=te((t,e)=>{"use strict";W();var r=(i,...n)=>new Promise(s=>{s(i(...n))});e.exports=r,e.exports.default=r}),Zk=te((t,e)=>{"use strict";W();var r=Kk(),i=n=>{if(!((Number.isInteger(n)||n===1/0)&&n>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));let s=[],o=0,a=()=>{o--,s.length>0&&s.shift()()},u=(f,h,...p)=>{o++;let g=r(f,...p);h(g),g.then(a,a)},l=(f,h,...p)=>{o<n?u(f,h,...p):s.push(u.bind(null,f,h,...p))},c=(f,...h)=>new Promise(p=>l(f,p,...h));return Object.defineProperties(c,{activeCount:{get:()=>o},pendingCount:{get:()=>s.length},clearQueue:{value:()=>{s.length=0}}}),c};e.exports=i,e.exports.default=i}),Jk=te((t,e)=>{"use strict";W();var r=Zk(),i=class extends Error{constructor(a){super(),this.value=a}},n=async(a,u)=>u(await a),s=async a=>{let u=await Promise.all(a);if(u[1]===!0)throw new i(u[0]);return!1},o=async(a,u,l)=>{l={concurrency:1/0,preserveOrder:!0,...l};let c=r(l.concurrency),f=[...a].map(p=>[p,c(n,p,u)]),h=r(l.preserveOrder?1:1/0);try{await Promise.all(f.map(p=>h(s,p)))}catch(p){if(p instanceof i)return p.value;throw p}};e.exports=o,e.exports.default=o}),Xk=te((t,e)=>{"use strict";W();var r=re("path"),i=re("fs"),{promisify:n}=re("util"),s=Jk(),o=n(i.stat),a=n(i.lstat),u={directory:"isDirectory",file:"isFile"};function l({type:f}){if(!(f in u))throw new Error(`Invalid type specified: ${f}`)}var c=(f,h)=>f===void 0||h[u[f]]();e.exports=async(f,h)=>{h={cwd:process.cwd(),type:"file",allowSymlinks:!0,...h},l(h);let p=h.allowSymlinks?o:a;return s(f,async g=>{try{let y=await p(r.resolve(h.cwd,g));return c(h.type,y)}catch{return!1}},h)},e.exports.sync=(f,h)=>{h={cwd:process.cwd(),allowSymlinks:!0,type:"file",...h},l(h);let p=h.allowSymlinks?i.statSync:i.lstatSync;for(let g of f)try{let y=p(r.resolve(h.cwd,g));if(c(h.type,y))return g}catch{}}}),Qk=te((t,e)=>{"use strict";W();var r=re("fs"),{promisify:i}=re("util"),n=i(r.access);e.exports=async s=>{try{return await n(s),!0}catch{return!1}},e.exports.sync=s=>{try{return r.accessSync(s),!0}catch{return!1}}}),eT=te((t,e)=>{"use strict";W();var r=re("path"),i=Xk(),n=Qk(),s=Symbol("findUp.stop");e.exports=async(o,a={})=>{let u=r.resolve(a.cwd||""),{root:l}=r.parse(u),c=[].concat(o),f=async h=>{if(typeof o!="function")return i(c,h);let p=await o(h.cwd);return typeof p=="string"?i([p],h):p};for(;;){let h=await f({...a,cwd:u});if(h===s)return;if(h)return r.resolve(u,h);if(u===l)return;u=r.dirname(u)}},e.exports.sync=(o,a={})=>{let u=r.resolve(a.cwd||""),{root:l}=r.parse(u),c=[].concat(o),f=h=>{if(typeof o!="function")return i.sync(c,h);let p=o(h.cwd);return typeof p=="string"?i.sync([p],h):p};for(;;){let h=f({...a,cwd:u});if(h===s)return;if(h)return r.resolve(u,h);if(u===l)return;u=r.dirname(u)}},e.exports.exists=n,e.exports.sync.exists=n.sync,e.exports.stop=s}),Kn=te((t,e)=>{"use strict";W();var r=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);e.exports=i=>i?Object.keys(i).map(n=>[r.has(n)?r.get(n):n,i[n]]).reduce((n,s)=>(n[s[0]]=s[1],n),Object.create(null)):{}}),Ph=te((t,e)=>{"use strict";W();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=re("events"),n=re("stream"),s=re("string_decoder").StringDecoder,o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),u=Symbol("emittedEnd"),l=Symbol("emittingEnd"),c=Symbol("emittedError"),f=Symbol("closed"),h=Symbol("read"),p=Symbol("flush"),g=Symbol("flushChunk"),y=Symbol("encoding"),E=Symbol("decoder"),v=Symbol("flowing"),F=Symbol("paused"),O=Symbol("resume"),R=Symbol("buffer"),x=Symbol("pipes"),L=Symbol("bufferLength"),b=Symbol("bufferPush"),S=Symbol("bufferShift"),N=Symbol("objectMode"),H=Symbol("destroyed"),T=Symbol("emitData"),U=Symbol("emitEnd"),V=Symbol("emitEnd2"),K=Symbol("async"),B=A=>Promise.resolve().then(A),C=global._MP_NO_ITERATOR_SYMBOLS_!=="1",k=C&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),j=C&&Symbol.iterator||Symbol("iterator not implemented"),z=A=>A==="end"||A==="finish"||A==="prefinish",P=A=>A instanceof ArrayBuffer||typeof A=="object"&&A.constructor&&A.constructor.name==="ArrayBuffer"&&A.byteLength>=0,d=A=>!Buffer.isBuffer(A)&&ArrayBuffer.isView(A),m=class{constructor(A,w,I){this.src=A,this.dest=w,this.opts=I,this.ondrain=()=>A[O](),w.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},D=class extends m{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(A,w,I){super(A,w,I),this.proxyErrors=M=>w.emit("error",M),A.on("error",this.proxyErrors)}};e.exports=class KD extends n{constructor(w){super(),this[v]=!1,this[F]=!1,this[x]=[],this[R]=[],this[N]=w&&w.objectMode||!1,this[N]?this[y]=null:this[y]=w&&w.encoding||null,this[y]==="buffer"&&(this[y]=null),this[K]=w&&!!w.async||!1,this[E]=this[y]?new s(this[y]):null,this[o]=!1,this[u]=!1,this[l]=!1,this[f]=!1,this[c]=null,this.writable=!0,this.readable=!0,this[L]=0,this[H]=!1,w&&w.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[R]}),w&&w.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[x]})}get bufferLength(){return this[L]}get encoding(){return this[y]}set encoding(w){if(this[N])throw new Error("cannot set encoding in objectMode");if(this[y]&&w!==this[y]&&(this[E]&&this[E].lastNeed||this[L]))throw new Error("cannot change encoding");this[y]!==w&&(this[E]=w?new s(w):null,this[R].length&&(this[R]=this[R].map(I=>this[E].write(I)))),this[y]=w}setEncoding(w){this.encoding=w}get objectMode(){return this[N]}set objectMode(w){this[N]=this[N]||!!w}get async(){return this[K]}set async(w){this[K]=this[K]||!!w}write(w,I,M){if(this[o])throw new Error("write after end");if(this[H])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof I=="function"&&(M=I,I="utf8"),I||(I="utf8");let Z=this[K]?B:q=>q();return!this[N]&&!Buffer.isBuffer(w)&&(d(w)?w=Buffer.from(w.buffer,w.byteOffset,w.byteLength):P(w)?w=Buffer.from(w):typeof w!="string"&&(this.objectMode=!0)),this[N]?(this.flowing&&this[L]!==0&&this[p](!0),this.flowing?this.emit("data",w):this[b](w),this[L]!==0&&this.emit("readable"),M&&Z(M),this.flowing):w.length?(typeof w=="string"&&!(I===this[y]&&!this[E].lastNeed)&&(w=Buffer.from(w,I)),Buffer.isBuffer(w)&&this[y]&&(w=this[E].write(w)),this.flowing&&this[L]!==0&&this[p](!0),this.flowing?this.emit("data",w):this[b](w),this[L]!==0&&this.emit("readable"),M&&Z(M),this.flowing):(this[L]!==0&&this.emit("readable"),M&&Z(M),this.flowing)}read(w){if(this[H])return null;if(this[L]===0||w===0||w>this[L])return this[a](),null;this[N]&&(w=null),this[R].length>1&&!this[N]&&(this.encoding?this[R]=[this[R].join("")]:this[R]=[Buffer.concat(this[R],this[L])]);let I=this[h](w||null,this[R][0]);return this[a](),I}[h](w,I){return w===I.length||w===null?this[S]():(this[R][0]=I.slice(w),I=I.slice(0,w),this[L]-=w),this.emit("data",I),!this[R].length&&!this[o]&&this.emit("drain"),I}end(w,I,M){return typeof w=="function"&&(M=w,w=null),typeof I=="function"&&(M=I,I="utf8"),w&&this.write(w,I),M&&this.once("end",M),this[o]=!0,this.writable=!1,(this.flowing||!this[F])&&this[a](),this}[O](){this[H]||(this[F]=!1,this[v]=!0,this.emit("resume"),this[R].length?this[p]():this[o]?this[a]():this.emit("drain"))}resume(){return this[O]()}pause(){this[v]=!1,this[F]=!0}get destroyed(){return this[H]}get flowing(){return this[v]}get paused(){return this[F]}[b](w){this[N]?this[L]+=1:this[L]+=w.length,this[R].push(w)}[S](){return this[R].length&&(this[N]?this[L]-=1:this[L]-=this[R][0].length),this[R].shift()}[p](w){do;while(this[g](this[S]()));!w&&!this[R].length&&!this[o]&&this.emit("drain")}[g](w){return w?(this.emit("data",w),this.flowing):!1}pipe(w,I){if(this[H])return;let M=this[u];return I=I||{},w===r.stdout||w===r.stderr?I.end=!1:I.end=I.end!==!1,I.proxyErrors=!!I.proxyErrors,M?I.end&&w.end():(this[x].push(I.proxyErrors?new D(this,w,I):new m(this,w,I)),this[K]?B(()=>this[O]()):this[O]()),w}unpipe(w){let I=this[x].find(M=>M.dest===w);I&&(this[x].splice(this[x].indexOf(I),1),I.unpipe())}addListener(w,I){return this.on(w,I)}on(w,I){let M=super.on(w,I);return w==="data"&&!this[x].length&&!this.flowing?this[O]():w==="readable"&&this[L]!==0?super.emit("readable"):z(w)&&this[u]?(super.emit(w),this.removeAllListeners(w)):w==="error"&&this[c]&&(this[K]?B(()=>I.call(this,this[c])):I.call(this,this[c])),M}get emittedEnd(){return this[u]}[a](){!this[l]&&!this[u]&&!this[H]&&this[R].length===0&&this[o]&&(this[l]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[f]&&this.emit("close"),this[l]=!1)}emit(w,I,...M){if(w!=="error"&&w!=="close"&&w!==H&&this[H])return;if(w==="data")return I?this[K]?B(()=>this[T](I)):this[T](I):!1;if(w==="end")return this[U]();if(w==="close"){if(this[f]=!0,!this[u]&&!this[H])return;let q=super.emit("close");return this.removeAllListeners("close"),q}else if(w==="error"){this[c]=I;let q=super.emit("error",I);return this[a](),q}else if(w==="resume"){let q=super.emit("resume");return this[a](),q}else if(w==="finish"||w==="prefinish"){let q=super.emit(w);return this.removeAllListeners(w),q}let Z=super.emit(w,I,...M);return this[a](),Z}[T](w){for(let M of this[x])M.dest.write(w)===!1&&this.pause();let I=super.emit("data",w);return this[a](),I}[U](){this[u]||(this[u]=!0,this.readable=!1,this[K]?B(()=>this[V]()):this[V]())}[V](){if(this[E]){let I=this[E].end();if(I){for(let M of this[x])M.dest.write(I);super.emit("data",I)}}for(let I of this[x])I.end();let w=super.emit("end");return this.removeAllListeners("end"),w}collect(){let w=[];this[N]||(w.dataLength=0);let I=this.promise();return this.on("data",M=>{w.push(M),this[N]||(w.dataLength+=M.length)}),I.then(()=>w)}concat(){return this[N]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(w=>this[N]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?w.join(""):Buffer.concat(w,w.dataLength))}promise(){return new Promise((w,I)=>{this.on(H,()=>I(new Error("stream destroyed"))),this.on("error",M=>I(M)),this.on("end",()=>w())})}[k](){return{next:()=>{let w=this.read();if(w!==null)return Promise.resolve({done:!1,value:w});if(this[o])return Promise.resolve({done:!0});let I=null,M=null,Z=ie=>{this.removeListener("data",q),this.removeListener("end",Q),M(ie)},q=ie=>{this.removeListener("error",Z),this.removeListener("end",Q),this.pause(),I({value:ie,done:!!this[o]})},Q=()=>{this.removeListener("error",Z),this.removeListener("data",q),I({done:!0})},G=()=>Z(new Error("stream destroyed"));return new Promise((ie,ce)=>{M=ce,I=ie,this.once(H,G),this.once("error",Z),this.once("end",Q),this.once("data",q)})}}}[j](){return{next:()=>{let w=this.read();return{value:w,done:w===null}}}}destroy(w){return this[H]?(w?this.emit("error",w):this.emit(H),this):(this[H]=!0,this[R].length=0,this[L]=0,typeof this.close=="function"&&!this[f]&&this.close(),w?this.emit("error",w):this.emit(H),this)}static isStream(w){return!!w&&(w instanceof KD||w instanceof n||w instanceof i&&(typeof w.pipe=="function"||typeof w.write=="function"&&typeof w.end=="function"))}}}),tT=te((t,e)=>{W();var r=re("zlib").constants||{ZLIB_VERNUM:4736};e.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},r))}),ZD=te((t,e)=>{"use strict";W();var r=typeof process=="object"&&process?process:{stdout:null,stderr:null},i=re("events"),n=re("stream"),s=re("string_decoder").StringDecoder,o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),u=Symbol("emittedEnd"),l=Symbol("emittingEnd"),c=Symbol("emittedError"),f=Symbol("closed"),h=Symbol("read"),p=Symbol("flush"),g=Symbol("flushChunk"),y=Symbol("encoding"),E=Symbol("decoder"),v=Symbol("flowing"),F=Symbol("paused"),O=Symbol("resume"),R=Symbol("bufferLength"),x=Symbol("bufferPush"),L=Symbol("bufferShift"),b=Symbol("objectMode"),S=Symbol("destroyed"),N=Symbol("emitData"),H=Symbol("emitEnd"),T=Symbol("emitEnd2"),U=Symbol("async"),V=m=>Promise.resolve().then(m),K=global._MP_NO_ITERATOR_SYMBOLS_!=="1",B=K&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),C=K&&Symbol.iterator||Symbol("iterator not implemented"),k=m=>m==="end"||m==="finish"||m==="prefinish",j=m=>m instanceof ArrayBuffer||typeof m=="object"&&m.constructor&&m.constructor.name==="ArrayBuffer"&&m.byteLength>=0,z=m=>!Buffer.isBuffer(m)&&ArrayBuffer.isView(m),P=class{constructor(m,D,A){this.src=m,this.dest=D,this.opts=A,this.ondrain=()=>m[O](),D.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},d=class extends P{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(m,D,A){super(m,D,A),this.proxyErrors=w=>D.emit("error",w),m.on("error",this.proxyErrors)}};e.exports=class JD extends n{constructor(D){super(),this[v]=!1,this[F]=!1,this.pipes=[],this.buffer=[],this[b]=D&&D.objectMode||!1,this[b]?this[y]=null:this[y]=D&&D.encoding||null,this[y]==="buffer"&&(this[y]=null),this[U]=D&&!!D.async||!1,this[E]=this[y]?new s(this[y]):null,this[o]=!1,this[u]=!1,this[l]=!1,this[f]=!1,this[c]=null,this.writable=!0,this.readable=!0,this[R]=0,this[S]=!1}get bufferLength(){return this[R]}get encoding(){return this[y]}set encoding(D){if(this[b])throw new Error("cannot set encoding in objectMode");if(this[y]&&D!==this[y]&&(this[E]&&this[E].lastNeed||this[R]))throw new Error("cannot change encoding");this[y]!==D&&(this[E]=D?new s(D):null,this.buffer.length&&(this.buffer=this.buffer.map(A=>this[E].write(A)))),this[y]=D}setEncoding(D){this.encoding=D}get objectMode(){return this[b]}set objectMode(D){this[b]=this[b]||!!D}get async(){return this[U]}set async(D){this[U]=this[U]||!!D}write(D,A,w){if(this[o])throw new Error("write after end");if(this[S])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof A=="function"&&(w=A,A="utf8"),A||(A="utf8");let I=this[U]?V:M=>M();return!this[b]&&!Buffer.isBuffer(D)&&(z(D)?D=Buffer.from(D.buffer,D.byteOffset,D.byteLength):j(D)?D=Buffer.from(D):typeof D!="string"&&(this.objectMode=!0)),this[b]?(this.flowing&&this[R]!==0&&this[p](!0),this.flowing?this.emit("data",D):this[x](D),this[R]!==0&&this.emit("readable"),w&&I(w),this.flowing):D.length?(typeof D=="string"&&!(A===this[y]&&!this[E].lastNeed)&&(D=Buffer.from(D,A)),Buffer.isBuffer(D)&&this[y]&&(D=this[E].write(D)),this.flowing&&this[R]!==0&&this[p](!0),this.flowing?this.emit("data",D):this[x](D),this[R]!==0&&this.emit("readable"),w&&I(w),this.flowing):(this[R]!==0&&this.emit("readable"),w&&I(w),this.flowing)}read(D){if(this[S])return null;if(this[R]===0||D===0||D>this[R])return this[a](),null;this[b]&&(D=null),this.buffer.length>1&&!this[b]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[R])]);let A=this[h](D||null,this.buffer[0]);return this[a](),A}[h](D,A){return D===A.length||D===null?this[L]():(this.buffer[0]=A.slice(D),A=A.slice(0,D),this[R]-=D),this.emit("data",A),!this.buffer.length&&!this[o]&&this.emit("drain"),A}end(D,A,w){return typeof D=="function"&&(w=D,D=null),typeof A=="function"&&(w=A,A="utf8"),D&&this.write(D,A),w&&this.once("end",w),this[o]=!0,this.writable=!1,(this.flowing||!this[F])&&this[a](),this}[O](){this[S]||(this[F]=!1,this[v]=!0,this.emit("resume"),this.buffer.length?this[p]():this[o]?this[a]():this.emit("drain"))}resume(){return this[O]()}pause(){this[v]=!1,this[F]=!0}get destroyed(){return this[S]}get flowing(){return this[v]}get paused(){return this[F]}[x](D){this[b]?this[R]+=1:this[R]+=D.length,this.buffer.push(D)}[L](){return this.buffer.length&&(this[b]?this[R]-=1:this[R]-=this.buffer[0].length),this.buffer.shift()}[p](D){do;while(this[g](this[L]()));!D&&!this.buffer.length&&!this[o]&&this.emit("drain")}[g](D){return D?(this.emit("data",D),this.flowing):!1}pipe(D,A){if(this[S])return;let w=this[u];return A=A||{},D===r.stdout||D===r.stderr?A.end=!1:A.end=A.end!==!1,A.proxyErrors=!!A.proxyErrors,w?A.end&&D.end():(this.pipes.push(A.proxyErrors?new d(this,D,A):new P(this,D,A)),this[U]?V(()=>this[O]()):this[O]()),D}unpipe(D){let A=this.pipes.find(w=>w.dest===D);A&&(this.pipes.splice(this.pipes.indexOf(A),1),A.unpipe())}addListener(D,A){return this.on(D,A)}on(D,A){let w=super.on(D,A);return D==="data"&&!this.pipes.length&&!this.flowing?this[O]():D==="readable"&&this[R]!==0?super.emit("readable"):k(D)&&this[u]?(super.emit(D),this.removeAllListeners(D)):D==="error"&&this[c]&&(this[U]?V(()=>A.call(this,this[c])):A.call(this,this[c])),w}get emittedEnd(){return this[u]}[a](){!this[l]&&!this[u]&&!this[S]&&this.buffer.length===0&&this[o]&&(this[l]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[f]&&this.emit("close"),this[l]=!1)}emit(D,A,...w){if(D!=="error"&&D!=="close"&&D!==S&&this[S])return;if(D==="data")return A?this[U]?V(()=>this[N](A)):this[N](A):!1;if(D==="end")return this[H]();if(D==="close"){if(this[f]=!0,!this[u]&&!this[S])return;let M=super.emit("close");return this.removeAllListeners("close"),M}else if(D==="error"){this[c]=A;let M=super.emit("error",A);return this[a](),M}else if(D==="resume"){let M=super.emit("resume");return this[a](),M}else if(D==="finish"||D==="prefinish"){let M=super.emit(D);return this.removeAllListeners(D),M}let I=super.emit(D,A,...w);return this[a](),I}[N](D){for(let w of this.pipes)w.dest.write(D)===!1&&this.pause();let A=super.emit("data",D);return this[a](),A}[H](){this[u]||(this[u]=!0,this.readable=!1,this[U]?V(()=>this[T]()):this[T]())}[T](){if(this[E]){let A=this[E].end();if(A){for(let w of this.pipes)w.dest.write(A);super.emit("data",A)}}for(let A of this.pipes)A.end();let D=super.emit("end");return this.removeAllListeners("end"),D}collect(){let D=[];this[b]||(D.dataLength=0);let A=this.promise();return this.on("data",w=>{D.push(w),this[b]||(D.dataLength+=w.length)}),A.then(()=>D)}concat(){return this[b]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(D=>this[b]?Promise.reject(new Error("cannot concat in objectMode")):this[y]?D.join(""):Buffer.concat(D,D.dataLength))}promise(){return new Promise((D,A)=>{this.on(S,()=>A(new Error("stream destroyed"))),this.on("error",w=>A(w)),this.on("end",()=>D())})}[B](){return{next:()=>{let D=this.read();if(D!==null)return Promise.resolve({done:!1,value:D});if(this[o])return Promise.resolve({done:!0});let A=null,w=null,I=Q=>{this.removeListener("data",M),this.removeListener("end",Z),w(Q)},M=Q=>{this.removeListener("error",I),this.removeListener("end",Z),this.pause(),A({value:Q,done:!!this[o]})},Z=()=>{this.removeListener("error",I),this.removeListener("data",M),A({done:!0})},q=()=>I(new Error("stream destroyed"));return new Promise((Q,G)=>{w=G,A=Q,this.once(S,q),this.once("error",I),this.once("end",Z),this.once("data",M)})}}}[C](){return{next:()=>{let D=this.read();return{value:D,done:D===null}}}}destroy(D){return this[S]?(D?this.emit("error",D):this.emit(S),this):(this[S]=!0,this.buffer.length=0,this[R]=0,typeof this.close=="function"&&!this[f]&&this.close(),D?this.emit("error",D):this.emit(S),this)}static isStream(D){return!!D&&(D instanceof JD||D instanceof n||D instanceof i&&(typeof D.pipe=="function"||typeof D.write=="function"&&typeof D.end=="function"))}}}),XD=te(t=>{"use strict";W();var e=re("assert"),r=re("buffer").Buffer,i=re("zlib"),n=t.constants=tT(),s=ZD(),o=r.concat,a=Symbol("_superWrite"),u=class extends Error{constructor(k){super("zlib: "+k.message),this.code=k.code,this.errno=k.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+k.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},l=Symbol("opts"),c=Symbol("flushFlag"),f=Symbol("finishFlushFlag"),h=Symbol("fullFlushFlag"),p=Symbol("handle"),g=Symbol("onError"),y=Symbol("sawError"),E=Symbol("level"),v=Symbol("strategy"),F=Symbol("ended"),O=Symbol("_defaultFullFlush"),R=class extends s{constructor(k,j){if(!k||typeof k!="object")throw new TypeError("invalid options for ZlibBase constructor");super(k),this[y]=!1,this[F]=!1,this[l]=k,this[c]=k.flush,this[f]=k.finishFlush;try{this[p]=new i[j](k)}catch(z){throw new u(z)}this[g]=z=>{this[y]||(this[y]=!0,this.close(),this.emit("error",z))},this[p].on("error",z=>this[g](new u(z))),this.once("end",()=>this.close)}close(){this[p]&&(this[p].close(),this[p]=null,this.emit("close"))}reset(){if(!this[y])return e(this[p],"zlib binding closed"),this[p].reset()}flush(k){this.ended||(typeof k!="number"&&(k=this[h]),this.write(Object.assign(r.alloc(0),{[c]:k})))}end(k,j,z){return k&&this.write(k,j),this.flush(this[f]),this[F]=!0,super.end(null,null,z)}get ended(){return this[F]}write(k,j,z){if(typeof j=="function"&&(z=j,j="utf8"),typeof k=="string"&&(k=r.from(k,j)),this[y])return;e(this[p],"zlib binding closed");let P=this[p]._handle,d=P.close;P.close=()=>{};let m=this[p].close;this[p].close=()=>{},r.concat=w=>w;let D;try{let w=typeof k[c]=="number"?k[c]:this[c];D=this[p]._processChunk(k,w),r.concat=o}catch(w){r.concat=o,this[g](new u(w))}finally{this[p]&&(this[p]._handle=P,P.close=d,this[p].close=m,this[p].removeAllListeners("error"))}this[p]&&this[p].on("error",w=>this[g](new u(w)));let A;if(D)if(Array.isArray(D)&&D.length>0){A=this[a](r.from(D[0]));for(let w=1;w<D.length;w++)A=this[a](D[w])}else A=this[a](r.from(D));return z&&z(),A}[a](k){return super.write(k)}},x=class extends R{constructor(k,j){k=k||{},k.flush=k.flush||n.Z_NO_FLUSH,k.finishFlush=k.finishFlush||n.Z_FINISH,super(k,j),this[h]=n.Z_FULL_FLUSH,this[E]=k.level,this[v]=k.strategy}params(k,j){if(!this[y]){if(!this[p])throw new Error("cannot switch params when binding is closed");if(!this[p].params)throw new Error("not supported in this implementation");if(this[E]!==k||this[v]!==j){this.flush(n.Z_SYNC_FLUSH),e(this[p],"zlib binding closed");let z=this[p].flush;this[p].flush=(P,d)=>{this.flush(P),d()};try{this[p].params(k,j)}finally{this[p].flush=z}this[p]&&(this[E]=k,this[v]=j)}}}},L=class extends x{constructor(k){super(k,"Deflate")}},b=class extends x{constructor(k){super(k,"Inflate")}},S=Symbol("_portable"),N=class extends x{constructor(k){super(k,"Gzip"),this[S]=k&&!!k.portable}[a](k){return this[S]?(this[S]=!1,k[9]=255,super[a](k)):super[a](k)}},H=class extends x{constructor(k){super(k,"Gunzip")}},T=class extends x{constructor(k){super(k,"DeflateRaw")}},U=class extends x{constructor(k){super(k,"InflateRaw")}},V=class extends x{constructor(k){super(k,"Unzip")}},K=class extends R{constructor(k,j){k=k||{},k.flush=k.flush||n.BROTLI_OPERATION_PROCESS,k.finishFlush=k.finishFlush||n.BROTLI_OPERATION_FINISH,super(k,j),this[h]=n.BROTLI_OPERATION_FLUSH}},B=class extends K{constructor(k){super(k,"BrotliCompress")}},C=class extends K{constructor(k){super(k,"BrotliDecompress")}};t.Deflate=L,t.Inflate=b,t.Gzip=N,t.Gunzip=H,t.DeflateRaw=T,t.InflateRaw=U,t.Unzip=V,typeof i.BrotliCompress=="function"?(t.BrotliCompress=B,t.BrotliDecompress=C):t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}}),Zn=te((t,e)=>{W();var r=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports=r!=="win32"?i=>i:i=>i&&i.replace(/\\/g,"/")}),Ih=te((t,e)=>{"use strict";W();var r=Ph(),i=Zn(),n=Symbol("slurp");e.exports=class extends r{constructor(s,o,a){switch(super(),this.pause(),this.extended=o,this.globalExtended=a,this.header=s,this.startBlockSize=512*Math.ceil(s.size/512),this.blockRemain=this.startBlockSize,this.remain=s.size,this.type=s.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=i(s.path),this.mode=s.mode,this.mode&&(this.mode=this.mode&4095),this.uid=s.uid,this.gid=s.gid,this.uname=s.uname,this.gname=s.gname,this.size=s.size,this.mtime=s.mtime,this.atime=s.atime,this.ctime=s.ctime,this.linkpath=i(s.linkpath),this.uname=s.uname,this.gname=s.gname,o&&this[n](o),a&&this[n](a,!0)}write(s){let o=s.length;if(o>this.blockRemain)throw new Error("writing more to entry than is appropriate");let a=this.remain,u=this.blockRemain;return this.remain=Math.max(0,a-o),this.blockRemain=Math.max(0,u-o),this.ignore?!0:a>=o?super.write(s):super.write(s.slice(0,a))}[n](s,o){for(let a in s)s[a]!==null&&s[a]!==void 0&&!(o&&a==="path")&&(this[a]=a==="path"||a==="linkpath"?i(s[a]):s[a])}}}),QD=te(t=>{"use strict";W(),t.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),t.code=new Map(Array.from(t.name).map(e=>[e[1],e[0]]))}),rT=te((t,e)=>{"use strict";W();var r=(c,f)=>{if(Number.isSafeInteger(c))c<0?n(c,f):i(c,f);else throw Error("cannot encode number outside of javascript safe integer range");return f},i=(c,f)=>{f[0]=128;for(var h=f.length;h>1;h--)f[h-1]=c&255,c=Math.floor(c/256)},n=(c,f)=>{f[0]=255;var h=!1;c=c*-1;for(var p=f.length;p>1;p--){var g=c&255;c=Math.floor(c/256),h?f[p-1]=u(g):g===0?f[p-1]=0:(h=!0,f[p-1]=l(g))}},s=c=>{let f=c[0],h=f===128?a(c.slice(1,c.length)):f===255?o(c):null;if(h===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(h))throw Error("parsed number outside of javascript safe integer range");return h},o=c=>{for(var f=c.length,h=0,p=!1,g=f-1;g>-1;g--){var y=c[g],E;p?E=u(y):y===0?E=y:(p=!0,E=l(y)),E!==0&&(h-=E*Math.pow(256,f-g-1))}return h},a=c=>{for(var f=c.length,h=0,p=f-1;p>-1;p--){var g=c[p];g!==0&&(h+=g*Math.pow(256,f-p-1))}return h},u=c=>(255^c)&255,l=c=>(255^c)+1&255;e.exports={encode:r,parse:s}}),Jn=te((t,e)=>{"use strict";W();var r=QD(),i=re("path").posix,n=rT(),s=Symbol("slurp"),o=Symbol("type"),a=class{constructor(b,S,N,H){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[o]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(b)?this.decode(b,S||0,N,H):b&&this.set(b)}decode(b,S,N,H){if(S||(S=0),!b||!(b.length>=S+512))throw new Error("need 512 bytes for header");if(this.path=l(b,S,100),this.mode=h(b,S+100,8),this.uid=h(b,S+108,8),this.gid=h(b,S+116,8),this.size=h(b,S+124,12),this.mtime=c(b,S+136,12),this.cksum=h(b,S+148,12),this[s](N),this[s](H,!0),this[o]=l(b,S+156,1),this[o]===""&&(this[o]="0"),this[o]==="0"&&this.path.slice(-1)==="/"&&(this[o]="5"),this[o]==="5"&&(this.size=0),this.linkpath=l(b,S+157,100),b.slice(S+257,S+265).toString()==="ustar\x0000")if(this.uname=l(b,S+265,32),this.gname=l(b,S+297,32),this.devmaj=h(b,S+329,8),this.devmin=h(b,S+337,8),b[S+475]!==0){let U=l(b,S+345,155);this.path=U+"/"+this.path}else{let U=l(b,S+345,130);U&&(this.path=U+"/"+this.path),this.atime=c(b,S+476,12),this.ctime=c(b,S+488,12)}let T=8*32;for(let U=S;U<S+148;U++)T+=b[U];for(let U=S+156;U<S+512;U++)T+=b[U];this.cksumValid=T===this.cksum,this.cksum===null&&T===8*32&&(this.nullBlock=!0)}[s](b,S){for(let N in b)b[N]!==null&&b[N]!==void 0&&!(S&&N==="path")&&(this[N]=b[N])}encode(b,S){if(b||(b=this.block=Buffer.alloc(512),S=0),S||(S=0),!(b.length>=S+512))throw new Error("need 512 bytes for header");let N=this.ctime||this.atime?130:155,H=u(this.path||"",N),T=H[0],U=H[1];this.needPax=H[2],this.needPax=L(b,S,100,T)||this.needPax,this.needPax=E(b,S+100,8,this.mode)||this.needPax,this.needPax=E(b,S+108,8,this.uid)||this.needPax,this.needPax=E(b,S+116,8,this.gid)||this.needPax,this.needPax=E(b,S+124,12,this.size)||this.needPax,this.needPax=R(b,S+136,12,this.mtime)||this.needPax,b[S+156]=this[o].charCodeAt(0),this.needPax=L(b,S+157,100,this.linkpath)||this.needPax,b.write("ustar\x0000",S+257,8),this.needPax=L(b,S+265,32,this.uname)||this.needPax,this.needPax=L(b,S+297,32,this.gname)||this.needPax,this.needPax=E(b,S+329,8,this.devmaj)||this.needPax,this.needPax=E(b,S+337,8,this.devmin)||this.needPax,this.needPax=L(b,S+345,N,U)||this.needPax,b[S+475]!==0?this.needPax=L(b,S+345,155,U)||this.needPax:(this.needPax=L(b,S+345,130,U)||this.needPax,this.needPax=R(b,S+476,12,this.atime)||this.needPax,this.needPax=R(b,S+488,12,this.ctime)||this.needPax);let V=8*32;for(let K=S;K<S+148;K++)V+=b[K];for(let K=S+156;K<S+512;K++)V+=b[K];return this.cksum=V,E(b,S+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(b){for(let S in b)b[S]!==null&&b[S]!==void 0&&(this[S]=b[S])}get type(){return r.name.get(this[o])||this[o]}get typeKey(){return this[o]}set type(b){r.code.has(b)?this[o]=r.code.get(b):this[o]=b}},u=(b,S)=>{let N=b,H="",T,U=i.parse(b).root||".";if(Buffer.byteLength(N)<100)T=[N,H,!1];else{H=i.dirname(N),N=i.basename(N);do Buffer.byteLength(N)<=100&&Buffer.byteLength(H)<=S?T=[N,H,!1]:Buffer.byteLength(N)>100&&Buffer.byteLength(H)<=S?T=[N.slice(0,100-1),H,!0]:(N=i.join(i.basename(H),N),H=i.dirname(H));while(H!==U&&!T);T||(T=[b.slice(0,100-1),"",!0])}return T},l=(b,S,N)=>b.slice(S,S+N).toString("utf8").replace(/\0.*/,""),c=(b,S,N)=>f(h(b,S,N)),f=b=>b===null?null:new Date(b*1e3),h=(b,S,N)=>b[S]&128?n.parse(b.slice(S,S+N)):g(b,S,N),p=b=>isNaN(b)?null:b,g=(b,S,N)=>p(parseInt(b.slice(S,S+N).toString("utf8").replace(/\0.*$/,"").trim(),8)),y={12:8589934591,8:2097151},E=(b,S,N,H)=>H===null?!1:H>y[N]||H<0?(n.encode(H,b.slice(S,S+N)),!0):(v(b,S,N,H),!1),v=(b,S,N,H)=>b.write(F(H,N),S,N,"ascii"),F=(b,S)=>O(Math.floor(b).toString(8),S),O=(b,S)=>(b.length===S-1?b:new Array(S-b.length-1).join("0")+b+" ")+"\0",R=(b,S,N,H)=>H===null?!1:E(b,S,N,H.getTime()/1e3),x=new Array(156).join("\0"),L=(b,S,N,H)=>H===null?!1:(b.write(H+x,S,N,"utf8"),H.length!==Buffer.byteLength(H)||H.length>N);e.exports=a}),Nh=te((t,e)=>{"use strict";W();var r=Jn(),i=re("path"),n=class{constructor(u,l){this.atime=u.atime||null,this.charset=u.charset||null,this.comment=u.comment||null,this.ctime=u.ctime||null,this.gid=u.gid||null,this.gname=u.gname||null,this.linkpath=u.linkpath||null,this.mtime=u.mtime||null,this.path=u.path||null,this.size=u.size||null,this.uid=u.uid||null,this.uname=u.uname||null,this.dev=u.dev||null,this.ino=u.ino||null,this.nlink=u.nlink||null,this.global=l||!1}encode(){let u=this.encodeBody();if(u==="")return null;let l=Buffer.byteLength(u),c=512*Math.ceil(1+l/512),f=Buffer.allocUnsafe(c);for(let h=0;h<512;h++)f[h]=0;new r({path:("PaxHeader/"+i.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:l,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(f),f.write(u,512,l,"utf8");for(let h=l+512;h<f.length;h++)f[h]=0;return f}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(u){if(this[u]===null||this[u]===void 0)return"";let l=this[u]instanceof Date?this[u].getTime()/1e3:this[u],c=" "+(u==="dev"||u==="ino"||u==="nlink"?"SCHILY.":"")+u+"="+l+`
41
41
  `,f=Buffer.byteLength(c),h=Math.floor(Math.log(f)/Math.log(10))+1;return f+h>=Math.pow(10,h)&&(h+=1),h+f+c}};n.parse=(u,l,c)=>new n(s(o(u),l),c);var s=(u,l)=>l?Object.keys(u).reduce((c,f)=>(c[f]=u[f],c),l):u,o=u=>u.replace(/\n$/,"").split(`
42
- `).reduce(a,Object.create(null)),a=(u,l)=>{let c=parseInt(l,10);if(c!==Buffer.byteLength(l)+1)return u;l=l.slice((c+" ").length);let f=l.split("="),h=f.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!h)return u;let p=f.join("=");return u[h]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(h)?new Date(p*1e3):/^[0-9]+$/.test(p)?+p:p,u};e.exports=n}),Jn=ee((t,e)=>{V(),e.exports=r=>{let i=r.length-1,n=-1;for(;i>-1&&r.charAt(i)==="/";)n=i,i--;return n===-1?r:r.slice(0,n)}}),Mh=ee((t,e)=>{"use strict";V(),e.exports=r=>class extends r{warn(i,n,s={}){this.file&&(s.file=this.file),this.cwd&&(s.cwd=this.cwd),s.code=n instanceof Error&&n.code||i,s.tarCode=i,!this.strict&&s.recoverable!==!1?(n instanceof Error&&(s=Object.assign(n,s),n=n.message),this.emit("warn",s.tarCode,n,s)):n instanceof Error?this.emit("error",Object.assign(n,s)):this.emit("error",Object.assign(new Error(`${i}: ${n}`),s))}}}),QD=ee((t,e)=>{"use strict";V();var r=["|","<",">","?",":"],i=r.map(o=>String.fromCharCode(61440+o.charCodeAt(0))),n=new Map(r.map((o,a)=>[o,i[a]])),s=new Map(i.map((o,a)=>[o,r[a]]));e.exports={encode:o=>r.reduce((a,u)=>a.split(u).join(n.get(u)),o),decode:o=>i.reduce((a,u)=>a.split(u).join(s.get(u)),o)}}),eb=ee((t,e)=>{V();var{isAbsolute:r,parse:i}=re("path").win32;e.exports=n=>{let s="",o=i(n);for(;r(n)||o.root;){let a=n.charAt(0)==="/"&&n.slice(0,4)!=="//?/"?"/":o.root;n=n.slice(a.length),s+=a,o=i(n)}return[s,n]}}),tT=ee((t,e)=>{"use strict";V(),e.exports=(r,i,n)=>(r&=4095,n&&(r=(r|384)&-19),i&&(r&256&&(r|=64),r&32&&(r|=8),r&4&&(r|=1)),r)}),tb=ee((t,e)=>{"use strict";V();var r=Ph(),i=Nh(),n=Zn(),s=re("fs"),o=re("path"),a=Kn(),u=Jn(),l=(y,b)=>b?(y=a(y).replace(/^\.(\/|$)/,""),u(b)+"/"+y):a(y),c=16*1024*1024,f=Symbol("process"),h=Symbol("file"),p=Symbol("directory"),d=Symbol("symlink"),m=Symbol("hardlink"),g=Symbol("header"),v=Symbol("read"),F=Symbol("lstat"),k=Symbol("onlstat"),O=Symbol("onread"),R=Symbol("onreadlink"),B=Symbol("openfile"),_=Symbol("onopenfile"),S=Symbol("close"),M=Symbol("mode"),U=Symbol("awaitDrain"),L=Symbol("ondrain"),T=Symbol("prefix"),I=Symbol("hadError"),j=Mh(),x=QD(),D=eb(),A=tT(),N=j(class extends r{constructor(y,b){if(b=b||{},super(b),typeof y!="string")throw new TypeError("path is required");this.path=a(y),this.portable=!!b.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=b.maxReadSize||c,this.linkCache=b.linkCache||new Map,this.statCache=b.statCache||new Map,this.preservePaths=!!b.preservePaths,this.cwd=a(b.cwd||process.cwd()),this.strict=!!b.strict,this.noPax=!!b.noPax,this.noMtime=!!b.noMtime,this.mtime=b.mtime||null,this.prefix=b.prefix?a(b.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof b.onwarn=="function"&&this.on("warn",b.onwarn);let P=!1;if(!this.preservePaths){let[C,q]=D(this.path);C&&(this.path=q,P=C)}this.win32=!!b.win32||process.platform==="win32",this.win32&&(this.path=x.decode(this.path.replace(/\\/g,"/")),y=y.replace(/\\/g,"/")),this.absolute=a(b.absolute||o.resolve(this.cwd,y)),this.path===""&&(this.path="./"),P&&this.warn("TAR_ENTRY_INFO",`stripping ${P} from absolute path`,{entry:this,path:P+this.path}),this.statCache.has(this.absolute)?this[k](this.statCache.get(this.absolute)):this[F]()}emit(y,...b){return y==="error"&&(this[I]=!0),super.emit(y,...b)}[F](){s.lstat(this.absolute,(y,b)=>{if(y)return this.emit("error",y);this[k](b)})}[k](y){this.statCache.set(this.absolute,y),this.stat=y,y.isFile()||(y.size=0),this.type=E(y),this.emit("stat",y),this[f]()}[f](){switch(this.type){case"File":return this[h]();case"Directory":return this[p]();case"SymbolicLink":return this[d]();default:return this.end()}}[M](y){return A(y,this.type==="Directory",this.portable)}[T](y){return l(y,this.prefix)}[g](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new n({path:this[T](this.path),linkpath:this.type==="Link"?this[T](this.linkpath):this.linkpath,mode:this[M](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new i({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[T](this.path),linkpath:this.type==="Link"?this[T](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[p](){this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[g](),this.end()}[d](){s.readlink(this.absolute,(y,b)=>{if(y)return this.emit("error",y);this[R](b)})}[R](y){this.linkpath=a(y),this[g](),this.end()}[m](y){this.type="Link",this.linkpath=a(o.relative(this.cwd,y)),this.stat.size=0,this[g](),this.end()}[h](){if(this.stat.nlink>1){let y=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(y)){let b=this.linkCache.get(y);if(b.indexOf(this.cwd)===0)return this[m](b)}this.linkCache.set(y,this.absolute)}if(this[g](),this.stat.size===0)return this.end();this[B]()}[B](){s.open(this.absolute,"r",(y,b)=>{if(y)return this.emit("error",y);this[_](b)})}[_](y){if(this.fd=y,this[I])return this[S]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let b=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(b),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[v]()}[v](){let{fd:y,buf:b,offset:P,length:C,pos:q}=this;s.read(y,b,P,C,q,(H,Z)=>{if(H)return this[S](()=>this.emit("error",H));this[O](Z)})}[S](y){s.close(this.fd,y)}[O](y){if(y<=0&&this.remain>0){let P=new Error("encountered unexpected EOF");return P.path=this.absolute,P.syscall="read",P.code="EOF",this[S](()=>this.emit("error",P))}if(y>this.remain){let P=new Error("did not encounter expected EOF");return P.path=this.absolute,P.syscall="read",P.code="EOF",this[S](()=>this.emit("error",P))}if(y===this.remain)for(let P=y;P<this.length&&y<this.blockRemain;P++)this.buf[P+this.offset]=0,y++,this.remain++;let b=this.offset===0&&y===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+y);this.write(b)?this[L]():this[U](()=>this[L]())}[U](y){this.once("drain",y)}write(y){if(this.blockRemain<y.length){let b=new Error("writing more data than expected");return b.path=this.absolute,this.emit("error",b)}return this.remain-=y.length,this.blockRemain-=y.length,this.pos+=y.length,this.offset+=y.length,super.write(y)}[L](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[S](y=>y?this.emit("error",y):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[v]()}}),Y=class extends N{[F](){this[k](s.lstatSync(this.absolute))}[d](){this[R](s.readlinkSync(this.absolute))}[B](){this[_](s.openSync(this.absolute,"r"))}[v](){let y=!0;try{let{fd:b,buf:P,offset:C,length:q,pos:H}=this,Z=s.readSync(b,P,C,q,H);this[O](Z),y=!1}finally{if(y)try{this[S](()=>{})}catch{}}}[U](y){y()}[S](y){s.closeSync(this.fd),y()}},W=j(class extends r{constructor(y,b){b=b||{},super(b),this.preservePaths=!!b.preservePaths,this.portable=!!b.portable,this.strict=!!b.strict,this.noPax=!!b.noPax,this.noMtime=!!b.noMtime,this.readEntry=y,this.type=y.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=b.prefix||null,this.path=a(y.path),this.mode=this[M](y.mode),this.uid=this.portable?null:y.uid,this.gid=this.portable?null:y.gid,this.uname=this.portable?null:y.uname,this.gname=this.portable?null:y.gname,this.size=y.size,this.mtime=this.noMtime?null:b.mtime||y.mtime,this.atime=this.portable?null:y.atime,this.ctime=this.portable?null:y.ctime,this.linkpath=a(y.linkpath),typeof b.onwarn=="function"&&this.on("warn",b.onwarn);let P=!1;if(!this.preservePaths){let[C,q]=D(this.path);C&&(this.path=q,P=C)}this.remain=y.size,this.blockRemain=y.startBlockSize,this.header=new n({path:this[T](this.path),linkpath:this.type==="Link"?this[T](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),P&&this.warn("TAR_ENTRY_INFO",`stripping ${P} from absolute path`,{entry:this,path:P+this.path}),this.header.encode()&&!this.noPax&&super.write(new i({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[T](this.path),linkpath:this.type==="Link"?this[T](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),y.pipe(this)}[T](y){return l(y,this.prefix)}[M](y){return A(y,this.type==="Directory",this.portable)}write(y){let b=y.length;if(b>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=b,super.write(y)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});N.Sync=Y,N.Tar=W;var E=y=>y.isFile()?"File":y.isDirectory()?"Directory":y.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=N}),rT=ee((t,e)=>{"use strict";V(),e.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let i=this.head;i;i=i.next)yield i.value}}}),rb=ee((t,e)=>{"use strict";V(),e.exports=r,r.Node=o,r.create=r;function r(a){var u=this;if(u instanceof r||(u=new r),u.tail=null,u.head=null,u.length=0,a&&typeof a.forEach=="function")a.forEach(function(f){u.push(f)});else if(arguments.length>0)for(var l=0,c=arguments.length;l<c;l++)u.push(arguments[l]);return u}r.prototype.removeNode=function(a){if(a.list!==this)throw new Error("removing node which does not belong to this list");var u=a.next,l=a.prev;return u&&(u.prev=l),l&&(l.next=u),a===this.head&&(this.head=u),a===this.tail&&(this.tail=l),a.list.length--,a.next=null,a.prev=null,a.list=null,u},r.prototype.unshiftNode=function(a){if(a!==this.head){a.list&&a.list.removeNode(a);var u=this.head;a.list=this,a.next=u,u&&(u.prev=a),this.head=a,this.tail||(this.tail=a),this.length++}},r.prototype.pushNode=function(a){if(a!==this.tail){a.list&&a.list.removeNode(a);var u=this.tail;a.list=this,a.prev=u,u&&(u.next=a),this.tail=a,this.head||(this.head=a),this.length++}},r.prototype.push=function(){for(var a=0,u=arguments.length;a<u;a++)n(this,arguments[a]);return this.length},r.prototype.unshift=function(){for(var a=0,u=arguments.length;a<u;a++)s(this,arguments[a]);return this.length},r.prototype.pop=function(){if(this.tail){var a=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,a}},r.prototype.shift=function(){if(this.head){var a=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,a}},r.prototype.forEach=function(a,u){u=u||this;for(var l=this.head,c=0;l!==null;c++)a.call(u,l.value,c,this),l=l.next},r.prototype.forEachReverse=function(a,u){u=u||this;for(var l=this.tail,c=this.length-1;l!==null;c--)a.call(u,l.value,c,this),l=l.prev},r.prototype.get=function(a){for(var u=0,l=this.head;l!==null&&u<a;u++)l=l.next;if(u===a&&l!==null)return l.value},r.prototype.getReverse=function(a){for(var u=0,l=this.tail;l!==null&&u<a;u++)l=l.prev;if(u===a&&l!==null)return l.value},r.prototype.map=function(a,u){u=u||this;for(var l=new r,c=this.head;c!==null;)l.push(a.call(u,c.value,this)),c=c.next;return l},r.prototype.mapReverse=function(a,u){u=u||this;for(var l=new r,c=this.tail;c!==null;)l.push(a.call(u,c.value,this)),c=c.prev;return l},r.prototype.reduce=function(a,u){var l,c=this.head;if(arguments.length>1)l=u;else if(this.head)c=this.head.next,l=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var f=0;c!==null;f++)l=a(l,c.value,f),c=c.next;return l},r.prototype.reduceReverse=function(a,u){var l,c=this.tail;if(arguments.length>1)l=u;else if(this.tail)c=this.tail.prev,l=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var f=this.length-1;c!==null;f--)l=a(l,c.value,f),c=c.prev;return l},r.prototype.toArray=function(){for(var a=new Array(this.length),u=0,l=this.head;l!==null;u++)a[u]=l.value,l=l.next;return a},r.prototype.toArrayReverse=function(){for(var a=new Array(this.length),u=0,l=this.tail;l!==null;u++)a[u]=l.value,l=l.prev;return a},r.prototype.slice=function(a,u){u=u||this.length,u<0&&(u+=this.length),a=a||0,a<0&&(a+=this.length);var l=new r;if(u<a||u<0)return l;a<0&&(a=0),u>this.length&&(u=this.length);for(var c=0,f=this.head;f!==null&&c<a;c++)f=f.next;for(;f!==null&&c<u;c++,f=f.next)l.push(f.value);return l},r.prototype.sliceReverse=function(a,u){u=u||this.length,u<0&&(u+=this.length),a=a||0,a<0&&(a+=this.length);var l=new r;if(u<a||u<0)return l;a<0&&(a=0),u>this.length&&(u=this.length);for(var c=this.length,f=this.tail;f!==null&&c>u;c--)f=f.prev;for(;f!==null&&c>a;c--,f=f.prev)l.push(f.value);return l},r.prototype.splice=function(a,u,...l){a>this.length&&(a=this.length-1),a<0&&(a=this.length+a);for(var c=0,f=this.head;f!==null&&c<a;c++)f=f.next;for(var h=[],c=0;f&&c<u;c++)h.push(f.value),f=this.removeNode(f);f===null&&(f=this.tail),f!==this.head&&f!==this.tail&&(f=f.prev);for(var c=0;c<l.length;c++)f=i(this,f,l[c]);return h},r.prototype.reverse=function(){for(var a=this.head,u=this.tail,l=a;l!==null;l=l.prev){var c=l.prev;l.prev=l.next,l.next=c}return this.head=u,this.tail=a,this};function i(a,u,l){var c=u===a.head?new o(l,null,u,a):new o(l,u,u.next,a);return c.next===null&&(a.tail=c),c.prev===null&&(a.head=c),a.length++,c}function n(a,u){a.tail=new o(u,a.tail,null,a),a.head||(a.head=a.tail),a.length++}function s(a,u){a.head=new o(u,null,a.head,a),a.tail||(a.tail=a.head),a.length++}function o(a,u,l,c){if(!(this instanceof o))return new o(a,u,l,c);this.list=c,this.value=a,u?(u.next=this,this.prev=u):this.prev=null,l?(l.prev=this,this.next=l):this.next=null}try{rT()(r)}catch{}}),jh=ee((t,e)=>{"use strict";V();var r=class{constructor(E,y){this.path=E||"./",this.absolute=y,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},i=Ph(),n=JD(),s=Ih(),o=tb(),a=o.Sync,u=o.Tar,l=rb(),c=Buffer.alloc(1024),f=Symbol("onStat"),h=Symbol("ended"),p=Symbol("queue"),d=Symbol("current"),m=Symbol("process"),g=Symbol("processing"),v=Symbol("processJob"),F=Symbol("jobs"),k=Symbol("jobDone"),O=Symbol("addFSEntry"),R=Symbol("addTarEntry"),B=Symbol("stat"),_=Symbol("readdir"),S=Symbol("onreaddir"),M=Symbol("pipe"),U=Symbol("entry"),L=Symbol("entryOpt"),T=Symbol("writeEntryClass"),I=Symbol("write"),j=Symbol("ondrain"),x=re("fs"),D=re("path"),A=Mh(),N=Kn(),Y=A(class extends i{constructor(E){super(E),E=E||Object.create(null),this.opt=E,this.file=E.file||"",this.cwd=E.cwd||process.cwd(),this.maxReadSize=E.maxReadSize,this.preservePaths=!!E.preservePaths,this.strict=!!E.strict,this.noPax=!!E.noPax,this.prefix=N(E.prefix||""),this.linkCache=E.linkCache||new Map,this.statCache=E.statCache||new Map,this.readdirCache=E.readdirCache||new Map,this[T]=o,typeof E.onwarn=="function"&&this.on("warn",E.onwarn),this.portable=!!E.portable,this.zip=null,E.gzip?(typeof E.gzip!="object"&&(E.gzip={}),this.portable&&(E.gzip.portable=!0),this.zip=new n.Gzip(E.gzip),this.zip.on("data",y=>super.write(y)),this.zip.on("end",y=>super.end()),this.zip.on("drain",y=>this[j]()),this.on("resume",y=>this.zip.resume())):this.on("drain",this[j]),this.noDirRecurse=!!E.noDirRecurse,this.follow=!!E.follow,this.noMtime=!!E.noMtime,this.mtime=E.mtime||null,this.filter=typeof E.filter=="function"?E.filter:y=>!0,this[p]=new l,this[F]=0,this.jobs=+E.jobs||4,this[g]=!1,this[h]=!1}[I](E){return super.write(E)}add(E){return this.write(E),this}end(E){return E&&this.write(E),this[h]=!0,this[m](),this}write(E){if(this[h])throw new Error("write after end");return E instanceof s?this[R](E):this[O](E),this.flowing}[R](E){let y=N(D.resolve(this.cwd,E.path));if(!this.filter(E.path,E))E.resume();else{let b=new r(E.path,y,!1);b.entry=new u(E,this[L](b)),b.entry.on("end",P=>this[k](b)),this[F]+=1,this[p].push(b)}this[m]()}[O](E){let y=N(D.resolve(this.cwd,E));this[p].push(new r(E,y)),this[m]()}[B](E){E.pending=!0,this[F]+=1;let y=this.follow?"stat":"lstat";x[y](E.absolute,(b,P)=>{E.pending=!1,this[F]-=1,b?this.emit("error",b):this[f](E,P)})}[f](E,y){this.statCache.set(E.absolute,y),E.stat=y,this.filter(E.path,y)||(E.ignore=!0),this[m]()}[_](E){E.pending=!0,this[F]+=1,x.readdir(E.absolute,(y,b)=>{if(E.pending=!1,this[F]-=1,y)return this.emit("error",y);this[S](E,b)})}[S](E,y){this.readdirCache.set(E.absolute,y),E.readdir=y,this[m]()}[m](){if(!this[g]){this[g]=!0;for(let E=this[p].head;E!==null&&this[F]<this.jobs;E=E.next)if(this[v](E.value),E.value.ignore){let y=E.next;this[p].removeNode(E),E.next=y}this[g]=!1,this[h]&&!this[p].length&&this[F]===0&&(this.zip?this.zip.end(c):(super.write(c),super.end()))}}get[d](){return this[p]&&this[p].head&&this[p].head.value}[k](E){this[p].shift(),this[F]-=1,this[m]()}[v](E){if(!E.pending){if(E.entry){E===this[d]&&!E.piped&&this[M](E);return}if(E.stat||(this.statCache.has(E.absolute)?this[f](E,this.statCache.get(E.absolute)):this[B](E)),!!E.stat&&!E.ignore&&!(!this.noDirRecurse&&E.stat.isDirectory()&&!E.readdir&&(this.readdirCache.has(E.absolute)?this[S](E,this.readdirCache.get(E.absolute)):this[_](E),!E.readdir))){if(E.entry=this[U](E),!E.entry){E.ignore=!0;return}E===this[d]&&!E.piped&&this[M](E)}}}[L](E){return{onwarn:(y,b,P)=>this.warn(y,b,P),noPax:this.noPax,cwd:this.cwd,absolute:E.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[U](E){this[F]+=1;try{return new this[T](E.path,this[L](E)).on("end",()=>this[k](E)).on("error",y=>this.emit("error",y))}catch(y){this.emit("error",y)}}[j](){this[d]&&this[d].entry&&this[d].entry.resume()}[M](E){E.piped=!0,E.readdir&&E.readdir.forEach(P=>{let C=E.path,q=C==="./"?"":C.replace(/\/*$/,"/");this[O](q+P)});let y=E.entry,b=this.zip;b?y.on("data",P=>{b.write(P)||y.pause()}):y.on("data",P=>{super.write(P)||y.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),W=class extends Y{constructor(E){super(E),this[T]=a}pause(){}resume(){}[B](E){let y=this.follow?"statSync":"lstatSync";this[f](E,x[y](E.absolute))}[_](E,y){this[S](E,x.readdirSync(E.absolute))}[M](E){let y=E.entry,b=this.zip;E.readdir&&E.readdir.forEach(P=>{let C=E.path,q=C==="./"?"":C.replace(/\/*$/,"/");this[O](q+P)}),b?y.on("data",P=>{b.write(P)}):y.on("data",P=>{super[I](P)})}};Y.Sync=W,e.exports=Y}),Xn=ee(t=>{"use strict";V();var e=KD(),r=re("events").EventEmitter,i=re("fs"),n=i.writev;if(!n){let E=process.binding("fs"),y=E.FSReqWrap||E.FSReqCallback;n=(b,P,C,q)=>{let H=(G,te)=>q(G,te,P),Z=new y;Z.oncomplete=H,E.writeBuffers(b,P,C,Z)}}var s=Symbol("_autoClose"),o=Symbol("_close"),a=Symbol("_ended"),u=Symbol("_fd"),l=Symbol("_finished"),c=Symbol("_flags"),f=Symbol("_flush"),h=Symbol("_handleChunk"),p=Symbol("_makeBuf"),d=Symbol("_mode"),m=Symbol("_needDrain"),g=Symbol("_onerror"),v=Symbol("_onopen"),F=Symbol("_onread"),k=Symbol("_onwrite"),O=Symbol("_open"),R=Symbol("_path"),B=Symbol("_pos"),_=Symbol("_queue"),S=Symbol("_read"),M=Symbol("_readSize"),U=Symbol("_reading"),L=Symbol("_remain"),T=Symbol("_size"),I=Symbol("_write"),j=Symbol("_writing"),x=Symbol("_defaultFlag"),D=Symbol("_errored"),A=class extends e{constructor(E,y){if(y=y||{},super(y),this.readable=!0,this.writable=!1,typeof E!="string")throw new TypeError("path must be a string");this[D]=!1,this[u]=typeof y.fd=="number"?y.fd:null,this[R]=E,this[M]=y.readSize||16*1024*1024,this[U]=!1,this[T]=typeof y.size=="number"?y.size:1/0,this[L]=this[T],this[s]=typeof y.autoClose=="boolean"?y.autoClose:!0,typeof this[u]=="number"?this[S]():this[O]()}get fd(){return this[u]}get path(){return this[R]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[O](){i.open(this[R],"r",(E,y)=>this[v](E,y))}[v](E,y){E?this[g](E):(this[u]=y,this.emit("open",y),this[S]())}[p](){return Buffer.allocUnsafe(Math.min(this[M],this[L]))}[S](){if(!this[U]){this[U]=!0;let E=this[p]();if(E.length===0)return process.nextTick(()=>this[F](null,0,E));i.read(this[u],E,0,E.length,null,(y,b,P)=>this[F](y,b,P))}}[F](E,y,b){this[U]=!1,E?this[g](E):this[h](y,b)&&this[S]()}[o](){if(this[s]&&typeof this[u]=="number"){let E=this[u];this[u]=null,i.close(E,y=>y?this.emit("error",y):this.emit("close"))}}[g](E){this[U]=!0,this[o](),this.emit("error",E)}[h](E,y){let b=!1;return this[L]-=E,E>0&&(b=super.write(E<y.length?y.slice(0,E):y)),(E===0||this[L]<=0)&&(b=!1,this[o](),super.end()),b}emit(E,y){switch(E){case"prefinish":case"finish":break;case"drain":typeof this[u]=="number"&&this[S]();break;case"error":return this[D]?void 0:(this[D]=!0,super.emit(E,y));default:return super.emit(E,y)}}},N=class extends A{[O](){let E=!0;try{this[v](null,i.openSync(this[R],"r")),E=!1}finally{E&&this[o]()}}[S](){let E=!0;try{if(!this[U]){this[U]=!0;do{let y=this[p](),b=y.length===0?0:i.readSync(this[u],y,0,y.length,null);if(!this[h](b,y))break}while(!0);this[U]=!1}E=!1}finally{E&&this[o]()}}[o](){if(this[s]&&typeof this[u]=="number"){let E=this[u];this[u]=null,i.closeSync(E),this.emit("close")}}},Y=class extends r{constructor(E,y){y=y||{},super(y),this.readable=!1,this.writable=!0,this[D]=!1,this[j]=!1,this[a]=!1,this[m]=!1,this[_]=[],this[R]=E,this[u]=typeof y.fd=="number"?y.fd:null,this[d]=y.mode===void 0?438:y.mode,this[B]=typeof y.start=="number"?y.start:null,this[s]=typeof y.autoClose=="boolean"?y.autoClose:!0;let b=this[B]!==null?"r+":"w";this[x]=y.flags===void 0,this[c]=this[x]?b:y.flags,this[u]===null&&this[O]()}emit(E,y){if(E==="error"){if(this[D])return;this[D]=!0}return super.emit(E,y)}get fd(){return this[u]}get path(){return this[R]}[g](E){this[o](),this[j]=!0,this.emit("error",E)}[O](){i.open(this[R],this[c],this[d],(E,y)=>this[v](E,y))}[v](E,y){this[x]&&this[c]==="r+"&&E&&E.code==="ENOENT"?(this[c]="w",this[O]()):E?this[g](E):(this[u]=y,this.emit("open",y),this[f]())}end(E,y){return E&&this.write(E,y),this[a]=!0,!this[j]&&!this[_].length&&typeof this[u]=="number"&&this[k](null,0),this}write(E,y){return typeof E=="string"&&(E=Buffer.from(E,y)),this[a]?(this.emit("error",new Error("write() after end()")),!1):this[u]===null||this[j]||this[_].length?(this[_].push(E),this[m]=!0,!1):(this[j]=!0,this[I](E),!0)}[I](E){i.write(this[u],E,0,E.length,this[B],(y,b)=>this[k](y,b))}[k](E,y){E?this[g](E):(this[B]!==null&&(this[B]+=y),this[_].length?this[f]():(this[j]=!1,this[a]&&!this[l]?(this[l]=!0,this[o](),this.emit("finish")):this[m]&&(this[m]=!1,this.emit("drain"))))}[f](){if(this[_].length===0)this[a]&&this[k](null,0);else if(this[_].length===1)this[I](this[_].pop());else{let E=this[_];this[_]=[],n(this[u],E,this[B],(y,b)=>this[k](y,b))}}[o](){if(this[s]&&typeof this[u]=="number"){let E=this[u];this[u]=null,i.close(E,y=>y?this.emit("error",y):this.emit("close"))}}},W=class extends Y{[O](){let E;if(this[x]&&this[c]==="r+")try{E=i.openSync(this[R],this[c],this[d])}catch(y){if(y.code==="ENOENT")return this[c]="w",this[O]();throw y}else E=i.openSync(this[R],this[c],this[d]);this[v](null,E)}[o](){if(this[s]&&typeof this[u]=="number"){let E=this[u];this[u]=null,i.closeSync(E),this.emit("close")}}[I](E){let y=!0;try{this[k](null,i.writeSync(this[u],E,0,E.length,this[B])),y=!1}finally{if(y)try{this[o]()}catch{}}}};t.ReadStream=A,t.ReadStreamSync=N,t.WriteStream=Y,t.WriteStreamSync=W}),$h=ee((t,e)=>{"use strict";V();var r=Mh(),i=Zn(),n=re("events"),s=rb(),o=1024*1024,a=Ih(),u=Nh(),l=JD(),{nextTick:c}=re("process"),f=Buffer.from([31,139]),h=Symbol("state"),p=Symbol("writeEntry"),d=Symbol("readEntry"),m=Symbol("nextEntry"),g=Symbol("processEntry"),v=Symbol("extendedHeader"),F=Symbol("globalExtendedHeader"),k=Symbol("meta"),O=Symbol("emitMeta"),R=Symbol("buffer"),B=Symbol("queue"),_=Symbol("ended"),S=Symbol("emittedEnd"),M=Symbol("emit"),U=Symbol("unzip"),L=Symbol("consumeChunk"),T=Symbol("consumeChunkSub"),I=Symbol("consumeBody"),j=Symbol("consumeMeta"),x=Symbol("consumeHeader"),D=Symbol("consuming"),A=Symbol("bufferConcat"),N=Symbol("maybeEnd"),Y=Symbol("writing"),W=Symbol("aborted"),E=Symbol("onDone"),y=Symbol("sawValidEntry"),b=Symbol("sawNullBlock"),P=Symbol("sawEOF"),C=Symbol("closeStream"),q=H=>!0;e.exports=r(class extends n{constructor(H){H=H||{},super(H),this.file=H.file||"",this[y]=null,this.on(E,Z=>{(this[h]==="begin"||this[y]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),H.ondone?this.on(E,H.ondone):this.on(E,Z=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!H.strict,this.maxMetaEntrySize=H.maxMetaEntrySize||o,this.filter=typeof H.filter=="function"?H.filter:q,this.writable=!0,this.readable=!1,this[B]=new s,this[R]=null,this[d]=null,this[p]=null,this[h]="begin",this[k]="",this[v]=null,this[F]=null,this[_]=!1,this[U]=null,this[W]=!1,this[b]=!1,this[P]=!1,this.on("end",()=>this[C]()),typeof H.onwarn=="function"&&this.on("warn",H.onwarn),typeof H.onentry=="function"&&this.on("entry",H.onentry)}[x](H,Z){this[y]===null&&(this[y]=!1);let G;try{G=new i(H,Z,this[v],this[F])}catch(te){return this.warn("TAR_ENTRY_INVALID",te)}if(G.nullBlock)this[b]?(this[P]=!0,this[h]==="begin"&&(this[h]="header"),this[M]("eof")):(this[b]=!0,this[M]("nullBlock"));else if(this[b]=!1,!G.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:G});else if(!G.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:G});else{let te=G.type;if(/^(Symbolic)?Link$/.test(te)&&!G.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:G});else if(!/^(Symbolic)?Link$/.test(te)&&G.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:G});else{let z=this[p]=new a(G,this[v],this[F]);if(!this[y])if(z.remain){let ie=()=>{z.invalid||(this[y]=!0)};z.on("end",ie)}else this[y]=!0;z.meta?z.size>this.maxMetaEntrySize?(z.ignore=!0,this[M]("ignoredEntry",z),this[h]="ignore",z.resume()):z.size>0&&(this[k]="",z.on("data",ie=>this[k]+=ie),this[h]="meta"):(this[v]=null,z.ignore=z.ignore||!this.filter(z.path,z),z.ignore?(this[M]("ignoredEntry",z),this[h]=z.remain?"ignore":"header",z.resume()):(z.remain?this[h]="body":(this[h]="header",z.end()),this[d]?this[B].push(z):(this[B].push(z),this[m]())))}}}[C](){c(()=>this.emit("close"))}[g](H){let Z=!0;return H?Array.isArray(H)?this.emit.apply(this,H):(this[d]=H,this.emit("entry",H),H.emittedEnd||(H.on("end",G=>this[m]()),Z=!1)):(this[d]=null,Z=!1),Z}[m](){do;while(this[g](this[B].shift()));if(!this[B].length){let H=this[d];!H||H.flowing||H.size===H.remain?this[Y]||this.emit("drain"):H.once("drain",Z=>this.emit("drain"))}}[I](H,Z){let G=this[p],te=G.blockRemain,z=te>=H.length&&Z===0?H:H.slice(Z,Z+te);return G.write(z),G.blockRemain||(this[h]="header",this[p]=null,G.end()),z.length}[j](H,Z){let G=this[p],te=this[I](H,Z);return this[p]||this[O](G),te}[M](H,Z,G){!this[B].length&&!this[d]?this.emit(H,Z,G):this[B].push([H,Z,G])}[O](H){switch(this[M]("meta",this[k]),H.type){case"ExtendedHeader":case"OldExtendedHeader":this[v]=u.parse(this[k],this[v],!1);break;case"GlobalExtendedHeader":this[F]=u.parse(this[k],this[F],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[v]=this[v]||Object.create(null),this[v].path=this[k].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[v]=this[v]||Object.create(null),this[v].linkpath=this[k].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+H.type)}}abort(H){this[W]=!0,this.emit("abort",H),this.warn("TAR_ABORT",H,{recoverable:!1})}write(H){if(this[W])return;if(this[U]===null&&H){if(this[R]&&(H=Buffer.concat([this[R],H]),this[R]=null),H.length<f.length)return this[R]=H,!0;for(let G=0;this[U]===null&&G<f.length;G++)H[G]!==f[G]&&(this[U]=!1);if(this[U]===null){let G=this[_];this[_]=!1,this[U]=new l.Unzip,this[U].on("data",z=>this[L](z)),this[U].on("error",z=>this.abort(z)),this[U].on("end",z=>{this[_]=!0,this[L]()}),this[Y]=!0;let te=this[U][G?"end":"write"](H);return this[Y]=!1,te}}this[Y]=!0,this[U]?this[U].write(H):this[L](H),this[Y]=!1;let Z=this[B].length?!1:this[d]?this[d].flowing:!0;return!Z&&!this[B].length&&this[d].once("drain",G=>this.emit("drain")),Z}[A](H){H&&!this[W]&&(this[R]=this[R]?Buffer.concat([this[R],H]):H)}[N](){if(this[_]&&!this[S]&&!this[W]&&!this[D]){this[S]=!0;let H=this[p];if(H&&H.blockRemain){let Z=this[R]?this[R].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${H.blockRemain} more bytes, only ${Z} available)`,{entry:H}),this[R]&&H.write(this[R]),H.end()}this[M](E)}}[L](H){if(this[D])this[A](H);else if(!H&&!this[R])this[N]();else{if(this[D]=!0,this[R]){this[A](H);let Z=this[R];this[R]=null,this[T](Z)}else this[T](H);for(;this[R]&&this[R].length>=512&&!this[W]&&!this[P];){let Z=this[R];this[R]=null,this[T](Z)}this[D]=!1}(!this[R]||this[_])&&this[N]()}[T](H){let Z=0,G=H.length;for(;Z+512<=G&&!this[W]&&!this[P];)switch(this[h]){case"begin":case"header":this[x](H,Z),Z+=512;break;case"ignore":case"body":Z+=this[I](H,Z);break;case"meta":Z+=this[j](H,Z);break;default:throw new Error("invalid state: "+this[h])}Z<G&&(this[R]?this[R]=Buffer.concat([H.slice(Z),this[R]]):this[R]=H.slice(Z))}end(H){this[W]||(this[U]?this[U].end(H):(this[_]=!0,this.write(H)))}})}),Hh=ee((t,e)=>{"use strict";V();var r=Vn(),i=$h(),n=re("fs"),s=Xn(),o=re("path"),a=Jn();e.exports=(p,d,m)=>{typeof p=="function"?(m=p,d=null,p={}):Array.isArray(p)&&(d=p,p={}),typeof d=="function"&&(m=d,d=null),d?d=Array.from(d):d=[];let g=r(p);if(g.sync&&typeof m=="function")throw new TypeError("callback not supported for sync tar functions");if(!g.file&&typeof m=="function")throw new TypeError("callback only supported with file option");return d.length&&l(g,d),g.noResume||u(g),g.file&&g.sync?c(g):g.file?f(g,m):h(g)};var u=p=>{let d=p.onentry;p.onentry=d?m=>{d(m),m.resume()}:m=>m.resume()},l=(p,d)=>{let m=new Map(d.map(F=>[a(F),!0])),g=p.filter,v=(F,k)=>{let O=k||o.parse(F).root||".",R=F===O?!1:m.has(F)?m.get(F):v(o.dirname(F),O);return m.set(F,R),R};p.filter=g?(F,k)=>g(F,k)&&v(a(F)):F=>v(a(F))},c=p=>{let d=h(p),m=p.file,g=!0,v;try{let F=n.statSync(m),k=p.maxReadSize||16*1024*1024;if(F.size<k)d.end(n.readFileSync(m));else{let O=0,R=Buffer.allocUnsafe(k);for(v=n.openSync(m,"r");O<F.size;){let B=n.readSync(v,R,0,k,O);O+=B,d.write(R.slice(0,B))}d.end()}g=!1}finally{if(g&&v)try{n.closeSync(v)}catch{}}},f=(p,d)=>{let m=new i(p),g=p.maxReadSize||16*1024*1024,v=p.file,F=new Promise((k,O)=>{m.on("error",O),m.on("end",k),n.stat(v,(R,B)=>{if(R)O(R);else{let _=new s.ReadStream(v,{readSize:g,size:B.size});_.on("error",O),_.pipe(m)}})});return d?F.then(d,d):F},h=p=>new i(p)}),iT=ee((t,e)=>{"use strict";V();var r=Vn(),i=jh(),n=Xn(),s=Hh(),o=re("path");e.exports=(p,d,m)=>{if(typeof d=="function"&&(m=d),Array.isArray(p)&&(d=p,p={}),!d||!Array.isArray(d)||!d.length)throw new TypeError("no files or directories specified");d=Array.from(d);let g=r(p);if(g.sync&&typeof m=="function")throw new TypeError("callback not supported for sync tar functions");if(!g.file&&typeof m=="function")throw new TypeError("callback only supported with file option");return g.file&&g.sync?a(g,d):g.file?u(g,d,m):g.sync?f(g,d):h(g,d)};var a=(p,d)=>{let m=new i.Sync(p),g=new n.WriteStreamSync(p.file,{mode:p.mode||438});m.pipe(g),l(m,d)},u=(p,d,m)=>{let g=new i(p),v=new n.WriteStream(p.file,{mode:p.mode||438});g.pipe(v);let F=new Promise((k,O)=>{v.on("error",O),v.on("close",k),g.on("error",O)});return c(g,d),m?F.then(m,m):F},l=(p,d)=>{d.forEach(m=>{m.charAt(0)==="@"?s({file:o.resolve(p.cwd,m.slice(1)),sync:!0,noResume:!0,onentry:g=>p.add(g)}):p.add(m)}),p.end()},c=(p,d)=>{for(;d.length;){let m=d.shift();if(m.charAt(0)==="@")return s({file:o.resolve(p.cwd,m.slice(1)),noResume:!0,onentry:g=>p.add(g)}).then(g=>c(p,d));p.add(m)}p.end()},f=(p,d)=>{let m=new i.Sync(p);return l(m,d),m},h=(p,d)=>{let m=new i(p);return c(m,d),m}}),ib=ee((t,e)=>{"use strict";V();var r=Vn(),i=jh(),n=re("fs"),s=Xn(),o=Hh(),a=re("path"),u=Zn();e.exports=(d,m,g)=>{let v=r(d);if(!v.file)throw new TypeError("file is required");if(v.gzip)throw new TypeError("cannot append to compressed archives");if(!m||!Array.isArray(m)||!m.length)throw new TypeError("no files or directories specified");return m=Array.from(m),v.sync?l(v,m):f(v,m,g)};var l=(d,m)=>{let g=new i.Sync(d),v=!0,F,k;try{try{F=n.openSync(d.file,"r+")}catch(B){if(B.code==="ENOENT")F=n.openSync(d.file,"w+");else throw B}let O=n.fstatSync(F),R=Buffer.alloc(512);e:for(k=0;k<O.size;k+=512){for(let S=0,M=0;S<512;S+=M){if(M=n.readSync(F,R,S,R.length-S,k+S),k===0&&R[0]===31&&R[1]===139)throw new Error("cannot append to compressed archives");if(!M)break e}let B=new u(R);if(!B.cksumValid)break;let _=512*Math.ceil(B.size/512);if(k+_+512>O.size)break;k+=_,d.mtimeCache&&d.mtimeCache.set(B.path,B.mtime)}v=!1,c(d,g,k,F,m)}finally{if(v)try{n.closeSync(F)}catch{}}},c=(d,m,g,v,F)=>{let k=new s.WriteStreamSync(d.file,{fd:v,start:g});m.pipe(k),h(m,F)},f=(d,m,g)=>{m=Array.from(m);let v=new i(d),F=(O,R,B)=>{let _=(T,I)=>{T?n.close(O,j=>B(T)):B(null,I)},S=0;if(R===0)return _(null,0);let M=0,U=Buffer.alloc(512),L=(T,I)=>{if(T)return _(T);if(M+=I,M<512&&I)return n.read(O,U,M,U.length-M,S+M,L);if(S===0&&U[0]===31&&U[1]===139)return _(new Error("cannot append to compressed archives"));if(M<512)return _(null,S);let j=new u(U);if(!j.cksumValid)return _(null,S);let x=512*Math.ceil(j.size/512);if(S+x+512>R||(S+=x+512,S>=R))return _(null,S);d.mtimeCache&&d.mtimeCache.set(j.path,j.mtime),M=0,n.read(O,U,0,512,S,L)};n.read(O,U,0,512,S,L)},k=new Promise((O,R)=>{v.on("error",R);let B="r+",_=(S,M)=>{if(S&&S.code==="ENOENT"&&B==="r+")return B="w+",n.open(d.file,B,_);if(S)return R(S);n.fstat(M,(U,L)=>{if(U)return n.close(M,()=>R(U));F(M,L.size,(T,I)=>{if(T)return R(T);let j=new s.WriteStream(d.file,{fd:M,start:I});v.pipe(j),j.on("error",R),j.on("close",O),p(v,m)})})};n.open(d.file,B,_)});return g?k.then(g,g):k},h=(d,m)=>{m.forEach(g=>{g.charAt(0)==="@"?o({file:a.resolve(d.cwd,g.slice(1)),sync:!0,noResume:!0,onentry:v=>d.add(v)}):d.add(g)}),d.end()},p=(d,m)=>{for(;m.length;){let g=m.shift();if(g.charAt(0)==="@")return o({file:a.resolve(d.cwd,g.slice(1)),noResume:!0,onentry:v=>d.add(v)}).then(v=>p(d,m));d.add(g)}d.end()}}),nT=ee((t,e)=>{"use strict";V();var r=Vn(),i=ib();e.exports=(s,o,a)=>{let u=r(s);if(!u.file)throw new TypeError("file is required");if(u.gzip)throw new TypeError("cannot append to compressed archives");if(!o||!Array.isArray(o)||!o.length)throw new TypeError("no files or directories specified");return o=Array.from(o),n(u),i(u,o,a)};var n=s=>{let o=s.filter;s.mtimeCache||(s.mtimeCache=new Map),s.filter=o?(a,u)=>o(a,u)&&!(s.mtimeCache.get(a)>u.mtime):(a,u)=>!(s.mtimeCache.get(a)>u.mtime)}}),sT=ee((t,e)=>{V();var{promisify:r}=re("util"),i=re("fs"),n=s=>{if(!s)s={mode:511,fs:i};else if(typeof s=="object")s={mode:511,fs:i,...s};else if(typeof s=="number")s={mode:s,fs:i};else if(typeof s=="string")s={mode:parseInt(s,8),fs:i};else throw new TypeError("invalid options argument");return s.mkdir=s.mkdir||s.fs.mkdir||i.mkdir,s.mkdirAsync=r(s.mkdir),s.stat=s.stat||s.fs.stat||i.stat,s.statAsync=r(s.stat),s.statSync=s.statSync||s.fs.statSync||i.statSync,s.mkdirSync=s.mkdirSync||s.fs.mkdirSync||i.mkdirSync,s};e.exports=n}),oT=ee((t,e)=>{V();var r=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:i,parse:n}=re("path"),s=o=>{if(/\0/.test(o))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:o,code:"ERR_INVALID_ARG_VALUE"});if(o=i(o),r==="win32"){let a=/[*|"<>?:]/,{root:u}=n(o);if(a.test(o.substr(u.length)))throw Object.assign(new Error("Illegal characters in path."),{path:o,code:"EINVAL"})}return o};e.exports=s}),aT=ee((t,e)=>{V();var{dirname:r}=re("path"),i=(s,o,a=void 0)=>a===o?Promise.resolve():s.statAsync(o).then(u=>u.isDirectory()?a:void 0,u=>u.code==="ENOENT"?i(s,r(o),o):void 0),n=(s,o,a=void 0)=>{if(a!==o)try{return s.statSync(o).isDirectory()?a:void 0}catch(u){return u.code==="ENOENT"?n(s,r(o),o):void 0}};e.exports={findMade:i,findMadeSync:n}}),nb=ee((t,e)=>{V();var{dirname:r}=re("path"),i=(s,o,a)=>{o.recursive=!1;let u=r(s);return u===s?o.mkdirAsync(s,o).catch(l=>{if(l.code!=="EISDIR")throw l}):o.mkdirAsync(s,o).then(()=>a||s,l=>{if(l.code==="ENOENT")return i(u,o).then(c=>i(s,o,c));if(l.code!=="EEXIST"&&l.code!=="EROFS")throw l;return o.statAsync(s).then(c=>{if(c.isDirectory())return a;throw l},()=>{throw l})})},n=(s,o,a)=>{let u=r(s);if(o.recursive=!1,u===s)try{return o.mkdirSync(s,o)}catch(l){if(l.code!=="EISDIR")throw l;return}try{return o.mkdirSync(s,o),a||s}catch(l){if(l.code==="ENOENT")return n(s,o,n(u,o,a));if(l.code!=="EEXIST"&&l.code!=="EROFS")throw l;try{if(!o.statSync(s).isDirectory())throw l}catch{throw l}}};e.exports={mkdirpManual:i,mkdirpManualSync:n}}),uT=ee((t,e)=>{V();var{dirname:r}=re("path"),{findMade:i,findMadeSync:n}=aT(),{mkdirpManual:s,mkdirpManualSync:o}=nb(),a=(l,c)=>(c.recursive=!0,r(l)===l?c.mkdirAsync(l,c):i(c,l).then(f=>c.mkdirAsync(l,c).then(()=>f).catch(h=>{if(h.code==="ENOENT")return s(l,c);throw h}))),u=(l,c)=>{if(c.recursive=!0,r(l)===l)return c.mkdirSync(l,c);let f=n(c,l);try{return c.mkdirSync(l,c),f}catch(h){if(h.code==="ENOENT")return o(l,c);throw h}};e.exports={mkdirpNative:a,mkdirpNativeSync:u}}),lT=ee((t,e)=>{V();var r=re("fs"),i=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version,n=i.replace(/^v/,"").split("."),s=+n[0]>10||+n[0]==10&&+n[1]>=12,o=s?u=>u.mkdir===r.mkdir:()=>!1,a=s?u=>u.mkdirSync===r.mkdirSync:()=>!1;e.exports={useNative:o,useNativeSync:a}}),cT=ee((t,e)=>{V();var r=sT(),i=oT(),{mkdirpNative:n,mkdirpNativeSync:s}=uT(),{mkdirpManual:o,mkdirpManualSync:a}=nb(),{useNative:u,useNativeSync:l}=lT(),c=(h,p)=>(h=i(h),p=r(p),u(p)?n(h,p):o(h,p)),f=(h,p)=>(h=i(h),p=r(p),l(p)?s(h,p):a(h,p));c.sync=f,c.native=(h,p)=>n(i(h),r(p)),c.manual=(h,p)=>o(i(h),r(p)),c.nativeSync=(h,p)=>s(i(h),r(p)),c.manualSync=(h,p)=>a(i(h),r(p)),e.exports=c}),hT=ee((t,e)=>{"use strict";V();var r=re("fs"),i=re("path"),n=r.lchown?"lchown":"chown",s=r.lchownSync?"lchownSync":"chownSync",o=r.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),a=(k,O,R)=>{try{return r[s](k,O,R)}catch(B){if(B.code!=="ENOENT")throw B}},u=(k,O,R)=>{try{return r.chownSync(k,O,R)}catch(B){if(B.code!=="ENOENT")throw B}},l=o?(k,O,R,B)=>_=>{!_||_.code!=="EISDIR"?B(_):r.chown(k,O,R,B)}:(k,O,R,B)=>B,c=o?(k,O,R)=>{try{return a(k,O,R)}catch(B){if(B.code!=="EISDIR")throw B;u(k,O,R)}}:(k,O,R)=>a(k,O,R),f=process.version,h=(k,O,R)=>r.readdir(k,O,R),p=(k,O)=>r.readdirSync(k,O);/^v4\./.test(f)&&(h=(k,O,R)=>r.readdir(k,R));var d=(k,O,R,B)=>{r[n](k,O,R,l(k,O,R,_=>{B(_&&_.code!=="ENOENT"?_:null)}))},m=(k,O,R,B,_)=>{if(typeof O=="string")return r.lstat(i.resolve(k,O),(S,M)=>{if(S)return _(S.code!=="ENOENT"?S:null);M.name=O,m(k,M,R,B,_)});if(O.isDirectory())g(i.resolve(k,O.name),R,B,S=>{if(S)return _(S);let M=i.resolve(k,O.name);d(M,R,B,_)});else{let S=i.resolve(k,O.name);d(S,R,B,_)}},g=(k,O,R,B)=>{h(k,{withFileTypes:!0},(_,S)=>{if(_){if(_.code==="ENOENT")return B();if(_.code!=="ENOTDIR"&&_.code!=="ENOTSUP")return B(_)}if(_||!S.length)return d(k,O,R,B);let M=S.length,U=null,L=T=>{if(!U){if(T)return B(U=T);if(--M===0)return d(k,O,R,B)}};S.forEach(T=>m(k,T,O,R,L))})},v=(k,O,R,B)=>{if(typeof O=="string")try{let _=r.lstatSync(i.resolve(k,O));_.name=O,O=_}catch(_){if(_.code==="ENOENT")return;throw _}O.isDirectory()&&F(i.resolve(k,O.name),R,B),c(i.resolve(k,O.name),R,B)},F=(k,O,R)=>{let B;try{B=p(k,{withFileTypes:!0})}catch(_){if(_.code==="ENOENT")return;if(_.code==="ENOTDIR"||_.code==="ENOTSUP")return c(k,O,R);throw _}return B&&B.length&&B.forEach(_=>v(k,_,O,R)),c(k,O,R)};e.exports=g,g.sync=F}),fT=ee((t,e)=>{"use strict";V();var r=cT(),i=re("fs"),n=re("path"),s=hT(),o=Kn(),a=class extends Error{constructor(m,g){super("Cannot extract through symbolic link"),this.path=g,this.symlink=m}get name(){return"SylinkError"}},u=class extends Error{constructor(m,g){super(g+": Cannot cd into '"+m+"'"),this.path=m,this.code=g}get name(){return"CwdError"}},l=(m,g)=>m.get(o(g)),c=(m,g,v)=>m.set(o(g),v),f=(m,g)=>{i.stat(m,(v,F)=>{(v||!F.isDirectory())&&(v=new u(m,v&&v.code||"ENOTDIR")),g(v)})};e.exports=(m,g,v)=>{m=o(m);let F=g.umask,k=g.mode|448,O=(k&F)!==0,R=g.uid,B=g.gid,_=typeof R=="number"&&typeof B=="number"&&(R!==g.processUid||B!==g.processGid),S=g.preserve,M=g.unlink,U=g.cache,L=o(g.cwd),T=(j,x)=>{j?v(j):(c(U,m,!0),x&&_?s(x,R,B,D=>T(D)):O?i.chmod(m,k,v):v())};if(U&&l(U,m)===!0)return T();if(m===L)return f(m,T);if(S)return r(m,{mode:k}).then(j=>T(null,j),T);let I=o(n.relative(L,m)).split("/");h(L,I,k,U,M,L,null,T)};var h=(m,g,v,F,k,O,R,B)=>{if(!g.length)return B(null,R);let _=g.shift(),S=o(n.resolve(m+"/"+_));if(l(F,S))return h(S,g,v,F,k,O,R,B);i.mkdir(S,v,p(S,g,v,F,k,O,R,B))},p=(m,g,v,F,k,O,R,B)=>_=>{_?i.lstat(m,(S,M)=>{if(S)S.path=S.path&&o(S.path),B(S);else if(M.isDirectory())h(m,g,v,F,k,O,R,B);else if(k)i.unlink(m,U=>{if(U)return B(U);i.mkdir(m,v,p(m,g,v,F,k,O,R,B))});else{if(M.isSymbolicLink())return B(new a(m,m+"/"+g.join("/")));B(_)}}):(R=R||m,h(m,g,v,F,k,O,R,B))},d=m=>{let g=!1,v="ENOTDIR";try{g=i.statSync(m).isDirectory()}catch(F){v=F.code}finally{if(!g)throw new u(m,v)}};e.exports.sync=(m,g)=>{m=o(m);let v=g.umask,F=g.mode|448,k=(F&v)!==0,O=g.uid,R=g.gid,B=typeof O=="number"&&typeof R=="number"&&(O!==g.processUid||R!==g.processGid),_=g.preserve,S=g.unlink,M=g.cache,U=o(g.cwd),L=j=>{c(M,m,!0),j&&B&&s.sync(j,O,R),k&&i.chmodSync(m,F)};if(M&&l(M,m)===!0)return L();if(m===U)return d(U),L();if(_)return L(r.sync(m,F));let T=o(n.relative(U,m)).split("/"),I=null;for(let j=T.shift(),x=U;j&&(x+="/"+j);j=T.shift())if(x=o(n.resolve(x)),!l(M,x))try{i.mkdirSync(x,F),I=I||x,c(M,x,!0)}catch{let D=i.lstatSync(x);if(D.isDirectory()){c(M,x,!0);continue}else if(S){i.unlinkSync(x),i.mkdirSync(x,F),I=I||x,c(M,x,!0);continue}else if(D.isSymbolicLink())return new a(x,x+"/"+T.join("/"))}return L(I)}}),sb=ee((t,e)=>{V();var r=Object.create(null),{hasOwnProperty:i}=Object.prototype;e.exports=n=>(i.call(r,n)||(r[n]=n.normalize("NFKD")),r[n])}),pT=ee((t,e)=>{V();var r=re("assert"),i=sb(),n=Jn(),{join:s}=re("path"),o=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,a=o==="win32";e.exports=()=>{let u=new Map,l=new Map,c=g=>g.split("/").slice(0,-1).reduce((v,F)=>(v.length&&(F=s(v[v.length-1],F)),v.push(F||"/"),v),[]),f=new Set,h=g=>{let v=l.get(g);if(!v)throw new Error("function does not have any path reservations");return{paths:v.paths.map(F=>u.get(F)),dirs:[...v.dirs].map(F=>u.get(F))}},p=g=>{let{paths:v,dirs:F}=h(g);return v.every(k=>k[0]===g)&&F.every(k=>k[0]instanceof Set&&k[0].has(g))},d=g=>f.has(g)||!p(g)?!1:(f.add(g),g(()=>m(g)),!0),m=g=>{if(!f.has(g))return!1;let{paths:v,dirs:F}=l.get(g),k=new Set;return v.forEach(O=>{let R=u.get(O);r.equal(R[0],g),R.length===1?u.delete(O):(R.shift(),typeof R[0]=="function"?k.add(R[0]):R[0].forEach(B=>k.add(B)))}),F.forEach(O=>{let R=u.get(O);r(R[0]instanceof Set),R[0].size===1&&R.length===1?u.delete(O):R[0].size===1?(R.shift(),k.add(R[0])):R[0].delete(g)}),f.delete(g),k.forEach(O=>d(O)),!0};return{check:p,reserve:(g,v)=>{g=a?["win32 parallelization disabled"]:g.map(k=>i(n(s(k))).toLowerCase());let F=new Set(g.map(k=>c(k)).reduce((k,O)=>k.concat(O)));return l.set(v,{dirs:F,paths:g}),g.forEach(k=>{let O=u.get(k);O?O.push(v):u.set(k,[v])}),F.forEach(k=>{let O=u.get(k);O?O[O.length-1]instanceof Set?O[O.length-1].add(v):O.push(new Set([v])):u.set(k,[new Set([v])])}),d(v)}}}}),dT=ee((t,e)=>{V();var r=process.env.__FAKE_PLATFORM__||process.platform,i=r==="win32",n=global.__FAKE_TESTING_FS__||re("fs"),{O_CREAT:s,O_TRUNC:o,O_WRONLY:a,UV_FS_O_FILEMAP:u=0}=n.constants,l=i&&!!u,c=512*1024,f=u|o|s|a;e.exports=l?h=>h<c?f:"w":()=>"w"}),ob=ee((t,e)=>{"use strict";V();var r=re("assert"),i=$h(),n=re("fs"),s=Xn(),o=re("path"),a=fT(),u=QD(),l=pT(),c=eb(),f=Kn(),h=Jn(),p=sb(),d=Symbol("onEntry"),m=Symbol("checkFs"),g=Symbol("checkFs2"),v=Symbol("pruneCache"),F=Symbol("isReusable"),k=Symbol("makeFs"),O=Symbol("file"),R=Symbol("directory"),B=Symbol("link"),_=Symbol("symlink"),S=Symbol("hardlink"),M=Symbol("unsupported"),U=Symbol("checkPath"),L=Symbol("mkdir"),T=Symbol("onError"),I=Symbol("pending"),j=Symbol("pend"),x=Symbol("unpend"),D=Symbol("ended"),A=Symbol("maybeClose"),N=Symbol("skip"),Y=Symbol("doChown"),W=Symbol("uid"),E=Symbol("gid"),y=Symbol("checkedCwd"),b=re("crypto"),P=dT(),C=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,q=C==="win32",H=(w,K)=>{if(!q)return n.unlink(w,K);let X=w+".DELETE."+b.randomBytes(16).toString("hex");n.rename(w,X,oe=>{if(oe)return K(oe);n.unlink(X,K)})},Z=w=>{if(!q)return n.unlinkSync(w);let K=w+".DELETE."+b.randomBytes(16).toString("hex");n.renameSync(w,K),n.unlinkSync(K)},G=(w,K,X)=>w===w>>>0?w:K===K>>>0?K:X,te=w=>p(h(f(w))).toLowerCase(),z=(w,K)=>{K=te(K);for(let X of w.keys()){let oe=te(X);(oe===K||oe.indexOf(K+"/")===0)&&w.delete(X)}},ie=w=>{for(let K of w.keys())w.delete(K)},ce=class extends i{constructor(w){if(w||(w={}),w.ondone=K=>{this[D]=!0,this[A]()},super(w),this[y]=!1,this.reservations=l(),this.transform=typeof w.transform=="function"?w.transform:null,this.writable=!0,this.readable=!1,this[I]=0,this[D]=!1,this.dirCache=w.dirCache||new Map,typeof w.uid=="number"||typeof w.gid=="number"){if(typeof w.uid!="number"||typeof w.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(w.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=w.uid,this.gid=w.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;w.preserveOwner===void 0&&typeof w.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!w.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=w.forceChown===!0,this.win32=!!w.win32||q,this.newer=!!w.newer,this.keep=!!w.keep,this.noMtime=!!w.noMtime,this.preservePaths=!!w.preservePaths,this.unlink=!!w.unlink,this.cwd=f(o.resolve(w.cwd||process.cwd())),this.strip=+w.strip||0,this.processUmask=w.noChmod?0:process.umask(),this.umask=typeof w.umask=="number"?w.umask:this.processUmask,this.dmode=w.dmode||511&~this.umask,this.fmode=w.fmode||438&~this.umask,this.on("entry",K=>this[d](K))}warn(w,K,X={}){return(w==="TAR_BAD_ARCHIVE"||w==="TAR_ABORT")&&(X.recoverable=!1),super.warn(w,K,X)}[A](){this[D]&&this[I]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[U](w){if(this.strip){let K=f(w.path).split("/");if(K.length<this.strip)return!1;if(w.path=K.slice(this.strip).join("/"),w.type==="Link"){let X=f(w.linkpath).split("/");if(X.length>=this.strip)w.linkpath=X.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let K=f(w.path),X=K.split("/");if(X.includes("..")||q&&/^[a-z]:\.\.$/i.test(X[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:w,path:K}),!1;let[oe,le]=c(K);oe&&(w.path=le,this.warn("TAR_ENTRY_INFO",`stripping ${oe} from absolute path`,{entry:w,path:K}))}if(o.isAbsolute(w.path)?w.absolute=f(o.resolve(w.path)):w.absolute=f(o.resolve(this.cwd,w.path)),!this.preservePaths&&w.absolute.indexOf(this.cwd+"/")!==0&&w.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:w,path:f(w.path),resolvedPath:w.absolute,cwd:this.cwd}),!1;if(w.absolute===this.cwd&&w.type!=="Directory"&&w.type!=="GNUDumpDir")return!1;if(this.win32){let{root:K}=o.win32.parse(w.absolute);w.absolute=K+u.encode(w.absolute.slice(K.length));let{root:X}=o.win32.parse(w.path);w.path=X+u.encode(w.path.slice(X.length))}return!0}[d](w){if(!this[U](w))return w.resume();switch(r.equal(typeof w.absolute,"string"),w.type){case"Directory":case"GNUDumpDir":w.mode&&(w.mode=w.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[m](w);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[M](w)}}[T](w,K){w.name==="CwdError"?this.emit("error",w):(this.warn("TAR_ENTRY_ERROR",w,{entry:K}),this[x](),K.resume())}[L](w,K,X){a(f(w),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:K,noChmod:this.noChmod},X)}[Y](w){return this.forceChown||this.preserveOwner&&(typeof w.uid=="number"&&w.uid!==this.processUid||typeof w.gid=="number"&&w.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[W](w){return G(this.uid,w.uid,this.processUid)}[E](w){return G(this.gid,w.gid,this.processGid)}[O](w,K){let X=w.mode&4095||this.fmode,oe=new s.WriteStream(w.absolute,{flags:P(w.size),mode:X,autoClose:!1});oe.on("error",pe=>{oe.fd&&n.close(oe.fd,()=>{}),oe.write=()=>!0,this[T](pe,w),K()});let le=1,Ee=pe=>{if(pe){oe.fd&&n.close(oe.fd,()=>{}),this[T](pe,w),K();return}--le===0&&n.close(oe.fd,Ae=>{Ae?this[T](Ae,w):this[x](),K()})};oe.on("finish",pe=>{let Ae=w.absolute,ht=oe.fd;if(w.mtime&&!this.noMtime){le++;let ft=w.atime||new Date,an=w.mtime;n.futimes(ht,ft,an,un=>un?n.utimes(Ae,ft,an,ba=>Ee(ba&&un)):Ee())}if(this[Y](w)){le++;let ft=this[W](w),an=this[E](w);n.fchown(ht,ft,an,un=>un?n.chown(Ae,ft,an,ba=>Ee(ba&&un)):Ee())}Ee()});let he=this.transform&&this.transform(w)||w;he!==w&&(he.on("error",pe=>{this[T](pe,w),K()}),w.pipe(he)),he.pipe(oe)}[R](w,K){let X=w.mode&4095||this.dmode;this[L](w.absolute,X,oe=>{if(oe){this[T](oe,w),K();return}let le=1,Ee=he=>{--le===0&&(K(),this[x](),w.resume())};w.mtime&&!this.noMtime&&(le++,n.utimes(w.absolute,w.atime||new Date,w.mtime,Ee)),this[Y](w)&&(le++,n.chown(w.absolute,this[W](w),this[E](w),Ee)),Ee()})}[M](w){w.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${w.type}`,{entry:w}),w.resume()}[_](w,K){this[B](w,w.linkpath,"symlink",K)}[S](w,K){let X=f(o.resolve(this.cwd,w.linkpath));this[B](w,X,"link",K)}[j](){this[I]++}[x](){this[I]--,this[A]()}[N](w){this[x](),w.resume()}[F](w,K){return w.type==="File"&&!this.unlink&&K.isFile()&&K.nlink<=1&&!q}[m](w){this[j]();let K=[w.path];w.linkpath&&K.push(w.linkpath),this.reservations.reserve(K,X=>this[g](w,X))}[v](w){w.type==="SymbolicLink"?ie(this.dirCache):w.type!=="Directory"&&z(this.dirCache,w.absolute)}[g](w,K){this[v](w);let X=he=>{this[v](w),K(he)},oe=()=>{this[L](this.cwd,this.dmode,he=>{if(he){this[T](he,w),X();return}this[y]=!0,le()})},le=()=>{if(w.absolute!==this.cwd){let he=f(o.dirname(w.absolute));if(he!==this.cwd)return this[L](he,this.dmode,pe=>{if(pe){this[T](pe,w),X();return}Ee()})}Ee()},Ee=()=>{n.lstat(w.absolute,(he,pe)=>{if(pe&&(this.keep||this.newer&&pe.mtime>w.mtime)){this[N](w),X();return}if(he||this[F](w,pe))return this[k](null,w,X);if(pe.isDirectory()){if(w.type==="Directory"){let Ae=!this.noChmod&&w.mode&&(pe.mode&4095)!==w.mode,ht=ft=>this[k](ft,w,X);return Ae?n.chmod(w.absolute,w.mode,ht):ht()}if(w.absolute!==this.cwd)return n.rmdir(w.absolute,Ae=>this[k](Ae,w,X))}if(w.absolute===this.cwd)return this[k](null,w,X);H(w.absolute,Ae=>this[k](Ae,w,X))})};this[y]?le():oe()}[k](w,K,X){if(w){this[T](w,K),X();return}switch(K.type){case"File":case"OldFile":case"ContiguousFile":return this[O](K,X);case"Link":return this[S](K,X);case"SymbolicLink":return this[_](K,X);case"Directory":case"GNUDumpDir":return this[R](K,X)}}[B](w,K,X,oe){n[X](K,w.absolute,le=>{le?this[T](le,w):(this[x](),w.resume()),oe()})}},we=w=>{try{return[null,w()]}catch(K){return[K,null]}},De=class extends ce{[k](w,K){return super[k](w,K,()=>{})}[m](w){if(this[v](w),!this[y]){let le=this[L](this.cwd,this.dmode);if(le)return this[T](le,w);this[y]=!0}if(w.absolute!==this.cwd){let le=f(o.dirname(w.absolute));if(le!==this.cwd){let Ee=this[L](le,this.dmode);if(Ee)return this[T](Ee,w)}}let[K,X]=we(()=>n.lstatSync(w.absolute));if(X&&(this.keep||this.newer&&X.mtime>w.mtime))return this[N](w);if(K||this[F](w,X))return this[k](null,w);if(X.isDirectory()){if(w.type==="Directory"){let Ee=!this.noChmod&&w.mode&&(X.mode&4095)!==w.mode,[he]=Ee?we(()=>{n.chmodSync(w.absolute,w.mode)}):[];return this[k](he,w)}let[le]=we(()=>n.rmdirSync(w.absolute));this[k](le,w)}let[oe]=w.absolute===this.cwd?[]:we(()=>Z(w.absolute));this[k](oe,w)}[O](w,K){let X=w.mode&4095||this.fmode,oe=he=>{let pe;try{n.closeSync(le)}catch(Ae){pe=Ae}(he||pe)&&this[T](he||pe,w),K()},le;try{le=n.openSync(w.absolute,P(w.size),X)}catch(he){return oe(he)}let Ee=this.transform&&this.transform(w)||w;Ee!==w&&(Ee.on("error",he=>this[T](he,w)),w.pipe(Ee)),Ee.on("data",he=>{try{n.writeSync(le,he,0,he.length)}catch(pe){oe(pe)}}),Ee.on("end",he=>{let pe=null;if(w.mtime&&!this.noMtime){let Ae=w.atime||new Date,ht=w.mtime;try{n.futimesSync(le,Ae,ht)}catch(ft){try{n.utimesSync(w.absolute,Ae,ht)}catch{pe=ft}}}if(this[Y](w)){let Ae=this[W](w),ht=this[E](w);try{n.fchownSync(le,Ae,ht)}catch(ft){try{n.chownSync(w.absolute,Ae,ht)}catch{pe=pe||ft}}}oe(pe)})}[R](w,K){let X=w.mode&4095||this.dmode,oe=this[L](w.absolute,X);if(oe){this[T](oe,w),K();return}if(w.mtime&&!this.noMtime)try{n.utimesSync(w.absolute,w.atime||new Date,w.mtime)}catch{}if(this[Y](w))try{n.chownSync(w.absolute,this[W](w),this[E](w))}catch{}K(),w.resume()}[L](w,K){try{return a.sync(f(w),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:K})}catch(X){return X}}[B](w,K,X,oe){try{n[X+"Sync"](K,w.absolute),oe(),w.resume()}catch(le){return this[T](le,w)}}};ce.Sync=De,e.exports=ce}),mT=ee((t,e)=>{"use strict";V();var r=Vn(),i=ob(),n=re("fs"),s=Xn(),o=re("path"),a=Jn();e.exports=(p,d,m)=>{typeof p=="function"?(m=p,d=null,p={}):Array.isArray(p)&&(d=p,p={}),typeof d=="function"&&(m=d,d=null),d?d=Array.from(d):d=[];let g=r(p);if(g.sync&&typeof m=="function")throw new TypeError("callback not supported for sync tar functions");if(!g.file&&typeof m=="function")throw new TypeError("callback only supported with file option");return d.length&&u(g,d),g.file&&g.sync?l(g):g.file?c(g,m):g.sync?f(g):h(g)};var u=(p,d)=>{let m=new Map(d.map(F=>[a(F),!0])),g=p.filter,v=(F,k)=>{let O=k||o.parse(F).root||".",R=F===O?!1:m.has(F)?m.get(F):v(o.dirname(F),O);return m.set(F,R),R};p.filter=g?(F,k)=>g(F,k)&&v(a(F)):F=>v(a(F))},l=p=>{let d=new i.Sync(p),m=p.file,g=n.statSync(m),v=p.maxReadSize||16*1024*1024;new s.ReadStreamSync(m,{readSize:v,size:g.size}).pipe(d)},c=(p,d)=>{let m=new i(p),g=p.maxReadSize||16*1024*1024,v=p.file,F=new Promise((k,O)=>{m.on("error",O),m.on("close",k),n.stat(v,(R,B)=>{if(R)O(R);else{let _=new s.ReadStream(v,{readSize:g,size:B.size});_.on("error",O),_.pipe(m)}})});return d?F.then(d,d):F},f=p=>new i.Sync(p),h=p=>new i(p)}),gT=ee(t=>{"use strict";V(),t.c=t.create=iT(),t.r=t.replace=ib(),t.t=t.list=Hh(),t.u=t.update=nT(),t.x=t.extract=mT(),t.Pack=jh(),t.Unpack=ob(),t.Parse=$h(),t.ReadEntry=Ih(),t.WriteEntry=tb(),t.Header=Zn(),t.Pax=Nh(),t.types=XD()}),yT=ee((t,e)=>{V();function r(i,n){typeof n=="boolean"&&(n={forever:n}),this._originalTimeouts=JSON.parse(JSON.stringify(i)),this._timeouts=i,this._options=n||{},this._maxRetryTime=n&&n.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}e.exports=r,r.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},r.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},r.prototype.retry=function(i){if(this._timeout&&clearTimeout(this._timeout),!i)return!1;var n=new Date().getTime();if(i&&n-this._operationStart>=this._maxRetryTime)return this._errors.push(i),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(i);var s=this._timeouts.shift();if(s===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),s=this._cachedTimeouts.slice(-1);else return!1;var o=this;return this._timer=setTimeout(function(){o._attempts++,o._operationTimeoutCb&&(o._timeout=setTimeout(function(){o._operationTimeoutCb(o._attempts)},o._operationTimeout),o._options.unref&&o._timeout.unref()),o._fn(o._attempts)},s),this._options.unref&&this._timer.unref(),!0},r.prototype.attempt=function(i,n){this._fn=i,n&&(n.timeout&&(this._operationTimeout=n.timeout),n.cb&&(this._operationTimeoutCb=n.cb));var s=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){s._operationTimeoutCb()},s._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},r.prototype.try=function(i){console.log("Using RetryOperation.try() is deprecated"),this.attempt(i)},r.prototype.start=function(i){console.log("Using RetryOperation.start() is deprecated"),this.attempt(i)},r.prototype.start=r.prototype.try,r.prototype.errors=function(){return this._errors},r.prototype.attempts=function(){return this._attempts},r.prototype.mainError=function(){if(this._errors.length===0)return null;for(var i={},n=null,s=0,o=0;o<this._errors.length;o++){var a=this._errors[o],u=a.message,l=(i[u]||0)+1;i[u]=l,l>=s&&(n=a,s=l)}return n}}),ET=ee(t=>{V();var e=yT();t.operation=function(r){var i=t.timeouts(r);return new e(i,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})},t.timeouts=function(r){if(r instanceof Array)return[].concat(r);var i={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in r)i[n]=r[n];if(i.minTimeout>i.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var s=[],o=0;o<i.retries;o++)s.push(this.createTimeout(o,i));return r&&r.forever&&!s.length&&s.push(this.createTimeout(o,i)),s.sort(function(a,u){return a-u}),s},t.createTimeout=function(r,i){var n=i.randomize?Math.random()+1:1,s=Math.round(n*Math.max(i.minTimeout,1)*Math.pow(i.factor,r));return s=Math.min(s,i.maxTimeout),s},t.wrap=function(r,i,n){if(i instanceof Array&&(n=i,i=null),!n){n=[];for(var s in r)typeof r[s]=="function"&&n.push(s)}for(var o=0;o<n.length;o++){var a=n[o],u=r[a];r[a]=function(l){var c=t.operation(i),f=Array.prototype.slice.call(arguments,1),h=f.pop();f.push(function(p){c.retry(p)||(p&&(arguments[0]=c.mainError()),h.apply(this,arguments))}),c.attempt(function(){l.apply(r,f)})}.bind(r,u),r[a].options=i}}}),DT=ee((t,e)=>{V(),e.exports=ET()}),bT=ee((t,e)=>{V();var r=DT();function i(n,s){function o(a,u){var l=s||{},c;"randomize"in l||(l.randomize=!0),c=r.operation(l);function f(d){u(d||new Error("Aborted"))}function h(d,m){if(d.bail){f(d);return}c.retry(d)?l.onRetry&&l.onRetry(d,m):u(c.mainError())}function p(d){var m;try{m=n(f,d)}catch(g){h(g,d);return}Promise.resolve(m).then(a).catch(function(g){h(g,d)})}c.attempt(p)}return new Promise(o)}e.exports=i}),_T={};qk(_T,{bold:()=>CT,dimmed:()=>xT,error:()=>OT,info:()=>vT,item:()=>RT,log:()=>Qn,turboBlue:()=>Qi,turboGradient:()=>ST,turboLoader:()=>AT,turboRed:()=>hb,warn:()=>FT,yellow:()=>fb});V();var lb="#0099F7",cb="#F11712",wT="#FFFF00",ST=(0,ub.default)(lb,cb),Qi=nn.default.hex(lb),hb=nn.default.hex(cb),fb=nn.default.hex(wT),AT=t=>(0,ab.default)({text:t,spinner:{frames:[" ",Qi("> "),Qi(">> "),Qi(">>>")]}}),vT=(...t)=>{Qn(Qi.bold(">>>"),...t)},CT=(...t)=>{Qn(nn.default.bold(...t))},xT=(...t)=>{Qn(nn.default.dim(...t))},RT=(...t)=>{Qn(Qi.bold(" \u2022"),...t)},Qn=(...t)=>{console.log(...t)},FT=(...t)=>{console.error(fb.bold(">>>"),...t)},OT=(...t)=>{console.error(hb.bold(">>>"),...t)};V();V();V();V();var KI=oa(Wk());V();V();function TT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}V();V();function Th(t){return Th=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Th(t)}V();function LT(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function BT(t,e){if(e&&(Th(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return LT(t)}V();function sa(t){return sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sa(t)}V();V();function zn(t,e){return zn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},zn(t,e)}function PT(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zn(t,e)}V();V();function IT(t){return Function.toString.call(t).indexOf("[native code]")!==-1}V();V();function NT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function na(t,e,r){return NT()?na=Reflect.construct.bind():na=function(i,n,s){var o=[null];o.push.apply(o,n);var a=Function.bind.apply(i,o),u=new a;return s&&zn(u,s.prototype),u},na.apply(null,arguments)}function Lh(t){var e=typeof Map=="function"?new Map:void 0;return Lh=function(r){if(r===null||!IT(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return na(r,arguments,sa(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),zn(i,r)},Lh(t)}var ZI=oa(Xk()),QI=function(t){PT(e,t);function e(r){var i;return TT(this,e),i=BT(this,sa(e).call(this,"No package.json could be found upwards from the directory ".concat(r))),i.directory=r,i}return e}(Lh(Error));V();V();V();V();V();V();var cN=oa(gT()),hN=(0,db.promisify)(pb.Stream.pipeline);V();V();var mN=oa(bT());V();V();V();var je=class extends Error{constructor(t,e){var r;super(t),this.name="ConvertError",this.type=(r=e==null?void 0:e.type)!=null?r:"unknown",Error.captureStackTrace(this,je)}};V();V();V();V();var MT=/^(?!_)(?<manager>.+)@(?<version>.+)$/;function Ke({workspaceRoot:t}){let e=rr.default.join(t,"package.json");try{return(0,rt.readJsonSync)(e,"utf8")}catch(r){if(r&&typeof r=="object"&&"code"in r){if(r.code==="ENOENT")throw new je(`no "package.json" found at ${t}`,{type:"package_json-missing"});if(r.code==="EJSONPARSE")throw new je(`failed to parse "package.json" at ${t}`,{type:"package_json-parse_error"})}throw new Error(`unexpected error reading "package.json" at ${t}`)}}function aa({workspaceRoot:t}){let{packageManager:e}=Ke({workspaceRoot:t});if(e)try{let r=MT.exec(e);if(r){let[i,n]=r;return n}}catch{}}function es({workspaceRoot:t}){let e=Ke({workspaceRoot:t}),r=rr.default.basename(t),{name:i=r,description:n}=e;return{name:i,description:n}}function YD({workspaceRoot:t}){let e=rr.default.join(t,"pnpm-workspace.yaml");if((0,rt.existsSync)(e))try{let r=Ua.load((0,rt.readFileSync)(e,"utf8"));if(r instanceof Object&&"packages"in r&&Array.isArray(r.packages))return r.packages}catch{throw new je(`failed to parse ${e}`,{type:"pnpm-workspace_parse_error"})}return[]}function ua({root:t,lockFile:e,workspaceConfig:r}){let i=s=>rr.default.join(t,s),n={root:t,lockfile:i(e),packageJson:i("package.json"),nodeModules:i("node_modules")};return r&&(n.workspaceConfig=i(r)),n}function qh({workspaces:t}){var e;return t?Array.isArray(t)?t:"packages"in t?(e=t.packages)!=null?e:[]:[]:[]}function la({workspaceRoot:t,workspaceGlobs:e}){return e?e.flatMap(r=>{let i=[`${r}/package.json`];return(0,bb.sync)(i,{onlyFiles:!0,absolute:!0,cwd:t,ignore:["**/node_modules/**"]})}).map(r=>{let i=rr.default.dirname(r),{name:n,description:s}=es({workspaceRoot:i});return{name:n,description:s,paths:{root:i,packageJson:r,nodeModules:rr.default.join(i,"node_modules")}}}):[]}function jT({directory:t}){let e=rr.default.resolve(process.cwd(),t);return{exists:(0,rt.existsSync)(e),absolute:e}}function xr({packageManager:t,action:e,project:r}){let i=r.workspaceData.globs.length>0;return`${e==="remove"?"Removing":"Adding"} ${t} ${i?"workspaces":""} ${e==="remove"?"from":"to"} ${r.name}`}function $T({project:t}){let e=r=>!(r.includes("*")&&(r.includes("**")||r.split("/").slice(0,-1).join("/").includes("*"))||["!","[","]","{","}"].some(i=>r.includes(i)));return t.workspaceData.globs.every(e)}function tr({project:t,options:e}){e!=null&&e.dry||(0,rt.rmSync)(t.paths.lockfile,{force:!0})}async function _b({project:t,options:e}){if(!(e!=null&&e.dry)&&(0,rt.existsSync)(t.paths.lockfile))try{let{stdout:r}=await(0,Db.default)("bun",["bun.lockb"],{stdin:"ignore",cwd:t.paths.root});await(0,rt.writeFile)(rr.default.join(t.paths.root,"yarn.lock"),r)}catch{}finally{(0,rt.rmSync)(t.paths.lockfile,{force:!0})}}function HT({dependencyList:t,project:e,to:r}){let i=[];return e.workspaceData.workspaces.forEach(n=>{let{name:s}=n;if(t[s]){let o=t[s],a=o.startsWith("workspace:")?o.slice(10):o;t[s]=r.name==="pnpm"?`workspace:${a}`:a,i.push(s)}}),{dependencyList:t,updated:i}}function vr({project:t,workspace:e,to:r,logger:i,options:n}){if(["yarn","npm","bun"].includes(r.name)&&["yarn","npm","bun"].includes(t.packageManager))return;let s=Ke({workspaceRoot:e.paths.root}),o={dependencies:[],devDependencies:[],peerDependencies:[],optionalDependencies:[]},a=["dependencies","devDependencies","peerDependencies","optionalDependencies"];a.forEach(f=>{let h=s[f];if(h){let{updated:p,dependencyList:d}=HT({dependencyList:h,project:t,to:r});s[f]=d,o[f]=p}});let u=f=>{let h=o[f].length;if(h>0)return`${Eb.default.green(h.toString())} ${f}`},l=a.map(u).filter(Boolean),c=`./${gb.default.relative(t.paths.root,e.paths.packageJson)}`;if(l.length>=1){let f="updating";l.forEach((h,p)=>{l.length===1?f+=` ${h} in ${c}`:p===l.length-1?f+=`and ${h} in ${c}`:f+=` ${h}, `}),i.workspaceStep(f)}else i.workspaceStep(`no workspace dependencies found in ${c}`);n!=null&&n.dry||(0,yb.writeJSONSync)(e.paths.packageJson,s,{spaces:2})}var Cr={name:"pnpm",lock:"pnpm-lock.yaml"};async function wb(t){let e=Qr.default.join(t.workspaceRoot,Cr.lock),r=Qr.default.join(t.workspaceRoot,"pnpm-workspace.yaml"),i=aa({workspaceRoot:t.workspaceRoot});return(0,qe.existsSync)(e)||(0,qe.existsSync)(r)||i===Cr.name}async function qT(t){if(!await wb(t))throw new je("Not a pnpm project",{type:"package_manager-unexpected"});let{name:e,description:r}=es(t);return{name:e,description:r,packageManager:Cr.name,paths:ua({root:t.workspaceRoot,lockFile:Cr.lock,workspaceConfig:"pnpm-workspace.yaml"}),workspaceData:{globs:YD(t),workspaces:la({workspaceGlobs:YD(t),...t})}}}async function UT(t){let{project:e,to:r,logger:i,options:n}=t,s=e.workspaceData.globs.length>0;i.mainStep(xr({action:"create",packageManager:Cr.name,project:e}));let o=Ke({workspaceRoot:e.paths.root});i.rootHeader(),o.packageManager=`${r.name}@${r.version}`,i.rootStep(`adding "packageManager" field to ${e.name} root "package.json"`),n!=null&&n.dry||((0,qe.writeJSONSync)(e.paths.packageJson,o,{spaces:2}),s&&(i.rootStep('adding "pnpm-workspace.yaml"'),(0,qe.writeFileSync)(Qr.default.join(e.paths.root,"pnpm-workspace.yaml"),`packages:
42
+ `).reduce(a,Object.create(null)),a=(u,l)=>{let c=parseInt(l,10);if(c!==Buffer.byteLength(l)+1)return u;l=l.slice((c+" ").length);let f=l.split("="),h=f.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!h)return u;let p=f.join("=");return u[h]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(h)?new Date(p*1e3):/^[0-9]+$/.test(p)?+p:p,u};e.exports=n}),Xn=te((t,e)=>{W(),e.exports=r=>{let i=r.length-1,n=-1;for(;i>-1&&r.charAt(i)==="/";)n=i,i--;return n===-1?r:r.slice(0,n)}}),Mh=te((t,e)=>{"use strict";W(),e.exports=r=>class extends r{warn(i,n,s={}){this.file&&(s.file=this.file),this.cwd&&(s.cwd=this.cwd),s.code=n instanceof Error&&n.code||i,s.tarCode=i,!this.strict&&s.recoverable!==!1?(n instanceof Error&&(s=Object.assign(n,s),n=n.message),this.emit("warn",s.tarCode,n,s)):n instanceof Error?this.emit("error",Object.assign(n,s)):this.emit("error",Object.assign(new Error(`${i}: ${n}`),s))}}}),eb=te((t,e)=>{"use strict";W();var r=["|","<",">","?",":"],i=r.map(o=>String.fromCharCode(61440+o.charCodeAt(0))),n=new Map(r.map((o,a)=>[o,i[a]])),s=new Map(i.map((o,a)=>[o,r[a]]));e.exports={encode:o=>r.reduce((a,u)=>a.split(u).join(n.get(u)),o),decode:o=>i.reduce((a,u)=>a.split(u).join(s.get(u)),o)}}),tb=te((t,e)=>{W();var{isAbsolute:r,parse:i}=re("path").win32;e.exports=n=>{let s="",o=i(n);for(;r(n)||o.root;){let a=n.charAt(0)==="/"&&n.slice(0,4)!=="//?/"?"/":o.root;n=n.slice(a.length),s+=a,o=i(n)}return[s,n]}}),iT=te((t,e)=>{"use strict";W(),e.exports=(r,i,n)=>(r&=4095,n&&(r=(r|384)&-19),i&&(r&256&&(r|=64),r&32&&(r|=8),r&4&&(r|=1)),r)}),rb=te((t,e)=>{"use strict";W();var r=Ph(),i=Nh(),n=Jn(),s=re("fs"),o=re("path"),a=Zn(),u=Xn(),l=(m,D)=>D?(m=a(m).replace(/^\.(\/|$)/,""),u(D)+"/"+m):a(m),c=16*1024*1024,f=Symbol("process"),h=Symbol("file"),p=Symbol("directory"),g=Symbol("symlink"),y=Symbol("hardlink"),E=Symbol("header"),v=Symbol("read"),F=Symbol("lstat"),O=Symbol("onlstat"),R=Symbol("onread"),x=Symbol("onreadlink"),L=Symbol("openfile"),b=Symbol("onopenfile"),S=Symbol("close"),N=Symbol("mode"),H=Symbol("awaitDrain"),T=Symbol("ondrain"),U=Symbol("prefix"),V=Symbol("hadError"),K=Mh(),B=eb(),C=tb(),k=iT(),j=K(class extends r{constructor(m,D){if(D=D||{},super(D),typeof m!="string")throw new TypeError("path is required");this.path=a(m),this.portable=!!D.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=D.maxReadSize||c,this.linkCache=D.linkCache||new Map,this.statCache=D.statCache||new Map,this.preservePaths=!!D.preservePaths,this.cwd=a(D.cwd||process.cwd()),this.strict=!!D.strict,this.noPax=!!D.noPax,this.noMtime=!!D.noMtime,this.mtime=D.mtime||null,this.prefix=D.prefix?a(D.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof D.onwarn=="function"&&this.on("warn",D.onwarn);let A=!1;if(!this.preservePaths){let[w,I]=C(this.path);w&&(this.path=I,A=w)}this.win32=!!D.win32||process.platform==="win32",this.win32&&(this.path=B.decode(this.path.replace(/\\/g,"/")),m=m.replace(/\\/g,"/")),this.absolute=a(D.absolute||o.resolve(this.cwd,m)),this.path===""&&(this.path="./"),A&&this.warn("TAR_ENTRY_INFO",`stripping ${A} from absolute path`,{entry:this,path:A+this.path}),this.statCache.has(this.absolute)?this[O](this.statCache.get(this.absolute)):this[F]()}emit(m,...D){return m==="error"&&(this[V]=!0),super.emit(m,...D)}[F](){s.lstat(this.absolute,(m,D)=>{if(m)return this.emit("error",m);this[O](D)})}[O](m){this.statCache.set(this.absolute,m),this.stat=m,m.isFile()||(m.size=0),this.type=d(m),this.emit("stat",m),this[f]()}[f](){switch(this.type){case"File":return this[h]();case"Directory":return this[p]();case"SymbolicLink":return this[g]();default:return this.end()}}[N](m){return k(m,this.type==="Directory",this.portable)}[U](m){return l(m,this.prefix)}[E](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new n({path:this[U](this.path),linkpath:this.type==="Link"?this[U](this.linkpath):this.linkpath,mode:this[N](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new i({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[U](this.path),linkpath:this.type==="Link"?this[U](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[p](){this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[E](),this.end()}[g](){s.readlink(this.absolute,(m,D)=>{if(m)return this.emit("error",m);this[x](D)})}[x](m){this.linkpath=a(m),this[E](),this.end()}[y](m){this.type="Link",this.linkpath=a(o.relative(this.cwd,m)),this.stat.size=0,this[E](),this.end()}[h](){if(this.stat.nlink>1){let m=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(m)){let D=this.linkCache.get(m);if(D.indexOf(this.cwd)===0)return this[y](D)}this.linkCache.set(m,this.absolute)}if(this[E](),this.stat.size===0)return this.end();this[L]()}[L](){s.open(this.absolute,"r",(m,D)=>{if(m)return this.emit("error",m);this[b](D)})}[b](m){if(this.fd=m,this[V])return this[S]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let D=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(D),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[v]()}[v](){let{fd:m,buf:D,offset:A,length:w,pos:I}=this;s.read(m,D,A,w,I,(M,Z)=>{if(M)return this[S](()=>this.emit("error",M));this[R](Z)})}[S](m){s.close(this.fd,m)}[R](m){if(m<=0&&this.remain>0){let A=new Error("encountered unexpected EOF");return A.path=this.absolute,A.syscall="read",A.code="EOF",this[S](()=>this.emit("error",A))}if(m>this.remain){let A=new Error("did not encounter expected EOF");return A.path=this.absolute,A.syscall="read",A.code="EOF",this[S](()=>this.emit("error",A))}if(m===this.remain)for(let A=m;A<this.length&&m<this.blockRemain;A++)this.buf[A+this.offset]=0,m++,this.remain++;let D=this.offset===0&&m===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+m);this.write(D)?this[T]():this[H](()=>this[T]())}[H](m){this.once("drain",m)}write(m){if(this.blockRemain<m.length){let D=new Error("writing more data than expected");return D.path=this.absolute,this.emit("error",D)}return this.remain-=m.length,this.blockRemain-=m.length,this.pos+=m.length,this.offset+=m.length,super.write(m)}[T](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[S](m=>m?this.emit("error",m):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[v]()}}),z=class extends j{[F](){this[O](s.lstatSync(this.absolute))}[g](){this[x](s.readlinkSync(this.absolute))}[L](){this[b](s.openSync(this.absolute,"r"))}[v](){let m=!0;try{let{fd:D,buf:A,offset:w,length:I,pos:M}=this,Z=s.readSync(D,A,w,I,M);this[R](Z),m=!1}finally{if(m)try{this[S](()=>{})}catch{}}}[H](m){m()}[S](m){s.closeSync(this.fd),m()}},P=K(class extends r{constructor(m,D){D=D||{},super(D),this.preservePaths=!!D.preservePaths,this.portable=!!D.portable,this.strict=!!D.strict,this.noPax=!!D.noPax,this.noMtime=!!D.noMtime,this.readEntry=m,this.type=m.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=D.prefix||null,this.path=a(m.path),this.mode=this[N](m.mode),this.uid=this.portable?null:m.uid,this.gid=this.portable?null:m.gid,this.uname=this.portable?null:m.uname,this.gname=this.portable?null:m.gname,this.size=m.size,this.mtime=this.noMtime?null:D.mtime||m.mtime,this.atime=this.portable?null:m.atime,this.ctime=this.portable?null:m.ctime,this.linkpath=a(m.linkpath),typeof D.onwarn=="function"&&this.on("warn",D.onwarn);let A=!1;if(!this.preservePaths){let[w,I]=C(this.path);w&&(this.path=I,A=w)}this.remain=m.size,this.blockRemain=m.startBlockSize,this.header=new n({path:this[U](this.path),linkpath:this.type==="Link"?this[U](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),A&&this.warn("TAR_ENTRY_INFO",`stripping ${A} from absolute path`,{entry:this,path:A+this.path}),this.header.encode()&&!this.noPax&&super.write(new i({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[U](this.path),linkpath:this.type==="Link"?this[U](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),m.pipe(this)}[U](m){return l(m,this.prefix)}[N](m){return k(m,this.type==="Directory",this.portable)}write(m){let D=m.length;if(D>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=D,super.write(m)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});j.Sync=z,j.Tar=P;var d=m=>m.isFile()?"File":m.isDirectory()?"Directory":m.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=j}),nT=te((t,e)=>{"use strict";W(),e.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let i=this.head;i;i=i.next)yield i.value}}}),ib=te((t,e)=>{"use strict";W(),e.exports=r,r.Node=o,r.create=r;function r(a){var u=this;if(u instanceof r||(u=new r),u.tail=null,u.head=null,u.length=0,a&&typeof a.forEach=="function")a.forEach(function(f){u.push(f)});else if(arguments.length>0)for(var l=0,c=arguments.length;l<c;l++)u.push(arguments[l]);return u}r.prototype.removeNode=function(a){if(a.list!==this)throw new Error("removing node which does not belong to this list");var u=a.next,l=a.prev;return u&&(u.prev=l),l&&(l.next=u),a===this.head&&(this.head=u),a===this.tail&&(this.tail=l),a.list.length--,a.next=null,a.prev=null,a.list=null,u},r.prototype.unshiftNode=function(a){if(a!==this.head){a.list&&a.list.removeNode(a);var u=this.head;a.list=this,a.next=u,u&&(u.prev=a),this.head=a,this.tail||(this.tail=a),this.length++}},r.prototype.pushNode=function(a){if(a!==this.tail){a.list&&a.list.removeNode(a);var u=this.tail;a.list=this,a.prev=u,u&&(u.next=a),this.tail=a,this.head||(this.head=a),this.length++}},r.prototype.push=function(){for(var a=0,u=arguments.length;a<u;a++)n(this,arguments[a]);return this.length},r.prototype.unshift=function(){for(var a=0,u=arguments.length;a<u;a++)s(this,arguments[a]);return this.length},r.prototype.pop=function(){if(this.tail){var a=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,a}},r.prototype.shift=function(){if(this.head){var a=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,a}},r.prototype.forEach=function(a,u){u=u||this;for(var l=this.head,c=0;l!==null;c++)a.call(u,l.value,c,this),l=l.next},r.prototype.forEachReverse=function(a,u){u=u||this;for(var l=this.tail,c=this.length-1;l!==null;c--)a.call(u,l.value,c,this),l=l.prev},r.prototype.get=function(a){for(var u=0,l=this.head;l!==null&&u<a;u++)l=l.next;if(u===a&&l!==null)return l.value},r.prototype.getReverse=function(a){for(var u=0,l=this.tail;l!==null&&u<a;u++)l=l.prev;if(u===a&&l!==null)return l.value},r.prototype.map=function(a,u){u=u||this;for(var l=new r,c=this.head;c!==null;)l.push(a.call(u,c.value,this)),c=c.next;return l},r.prototype.mapReverse=function(a,u){u=u||this;for(var l=new r,c=this.tail;c!==null;)l.push(a.call(u,c.value,this)),c=c.prev;return l},r.prototype.reduce=function(a,u){var l,c=this.head;if(arguments.length>1)l=u;else if(this.head)c=this.head.next,l=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var f=0;c!==null;f++)l=a(l,c.value,f),c=c.next;return l},r.prototype.reduceReverse=function(a,u){var l,c=this.tail;if(arguments.length>1)l=u;else if(this.tail)c=this.tail.prev,l=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var f=this.length-1;c!==null;f--)l=a(l,c.value,f),c=c.prev;return l},r.prototype.toArray=function(){for(var a=new Array(this.length),u=0,l=this.head;l!==null;u++)a[u]=l.value,l=l.next;return a},r.prototype.toArrayReverse=function(){for(var a=new Array(this.length),u=0,l=this.tail;l!==null;u++)a[u]=l.value,l=l.prev;return a},r.prototype.slice=function(a,u){u=u||this.length,u<0&&(u+=this.length),a=a||0,a<0&&(a+=this.length);var l=new r;if(u<a||u<0)return l;a<0&&(a=0),u>this.length&&(u=this.length);for(var c=0,f=this.head;f!==null&&c<a;c++)f=f.next;for(;f!==null&&c<u;c++,f=f.next)l.push(f.value);return l},r.prototype.sliceReverse=function(a,u){u=u||this.length,u<0&&(u+=this.length),a=a||0,a<0&&(a+=this.length);var l=new r;if(u<a||u<0)return l;a<0&&(a=0),u>this.length&&(u=this.length);for(var c=this.length,f=this.tail;f!==null&&c>u;c--)f=f.prev;for(;f!==null&&c>a;c--,f=f.prev)l.push(f.value);return l},r.prototype.splice=function(a,u,...l){a>this.length&&(a=this.length-1),a<0&&(a=this.length+a);for(var c=0,f=this.head;f!==null&&c<a;c++)f=f.next;for(var h=[],c=0;f&&c<u;c++)h.push(f.value),f=this.removeNode(f);f===null&&(f=this.tail),f!==this.head&&f!==this.tail&&(f=f.prev);for(var c=0;c<l.length;c++)f=i(this,f,l[c]);return h},r.prototype.reverse=function(){for(var a=this.head,u=this.tail,l=a;l!==null;l=l.prev){var c=l.prev;l.prev=l.next,l.next=c}return this.head=u,this.tail=a,this};function i(a,u,l){var c=u===a.head?new o(l,null,u,a):new o(l,u,u.next,a);return c.next===null&&(a.tail=c),c.prev===null&&(a.head=c),a.length++,c}function n(a,u){a.tail=new o(u,a.tail,null,a),a.head||(a.head=a.tail),a.length++}function s(a,u){a.head=new o(u,null,a.head,a),a.tail||(a.tail=a.head),a.length++}function o(a,u,l,c){if(!(this instanceof o))return new o(a,u,l,c);this.list=c,this.value=a,u?(u.next=this,this.prev=u):this.prev=null,l?(l.prev=this,this.next=l):this.next=null}try{nT()(r)}catch{}}),jh=te((t,e)=>{"use strict";W();var r=class{constructor(d,m){this.path=d||"./",this.absolute=m,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},i=Ph(),n=XD(),s=Ih(),o=rb(),a=o.Sync,u=o.Tar,l=ib(),c=Buffer.alloc(1024),f=Symbol("onStat"),h=Symbol("ended"),p=Symbol("queue"),g=Symbol("current"),y=Symbol("process"),E=Symbol("processing"),v=Symbol("processJob"),F=Symbol("jobs"),O=Symbol("jobDone"),R=Symbol("addFSEntry"),x=Symbol("addTarEntry"),L=Symbol("stat"),b=Symbol("readdir"),S=Symbol("onreaddir"),N=Symbol("pipe"),H=Symbol("entry"),T=Symbol("entryOpt"),U=Symbol("writeEntryClass"),V=Symbol("write"),K=Symbol("ondrain"),B=re("fs"),C=re("path"),k=Mh(),j=Zn(),z=k(class extends i{constructor(d){super(d),d=d||Object.create(null),this.opt=d,this.file=d.file||"",this.cwd=d.cwd||process.cwd(),this.maxReadSize=d.maxReadSize,this.preservePaths=!!d.preservePaths,this.strict=!!d.strict,this.noPax=!!d.noPax,this.prefix=j(d.prefix||""),this.linkCache=d.linkCache||new Map,this.statCache=d.statCache||new Map,this.readdirCache=d.readdirCache||new Map,this[U]=o,typeof d.onwarn=="function"&&this.on("warn",d.onwarn),this.portable=!!d.portable,this.zip=null,d.gzip?(typeof d.gzip!="object"&&(d.gzip={}),this.portable&&(d.gzip.portable=!0),this.zip=new n.Gzip(d.gzip),this.zip.on("data",m=>super.write(m)),this.zip.on("end",m=>super.end()),this.zip.on("drain",m=>this[K]()),this.on("resume",m=>this.zip.resume())):this.on("drain",this[K]),this.noDirRecurse=!!d.noDirRecurse,this.follow=!!d.follow,this.noMtime=!!d.noMtime,this.mtime=d.mtime||null,this.filter=typeof d.filter=="function"?d.filter:m=>!0,this[p]=new l,this[F]=0,this.jobs=+d.jobs||4,this[E]=!1,this[h]=!1}[V](d){return super.write(d)}add(d){return this.write(d),this}end(d){return d&&this.write(d),this[h]=!0,this[y](),this}write(d){if(this[h])throw new Error("write after end");return d instanceof s?this[x](d):this[R](d),this.flowing}[x](d){let m=j(C.resolve(this.cwd,d.path));if(!this.filter(d.path,d))d.resume();else{let D=new r(d.path,m,!1);D.entry=new u(d,this[T](D)),D.entry.on("end",A=>this[O](D)),this[F]+=1,this[p].push(D)}this[y]()}[R](d){let m=j(C.resolve(this.cwd,d));this[p].push(new r(d,m)),this[y]()}[L](d){d.pending=!0,this[F]+=1;let m=this.follow?"stat":"lstat";B[m](d.absolute,(D,A)=>{d.pending=!1,this[F]-=1,D?this.emit("error",D):this[f](d,A)})}[f](d,m){this.statCache.set(d.absolute,m),d.stat=m,this.filter(d.path,m)||(d.ignore=!0),this[y]()}[b](d){d.pending=!0,this[F]+=1,B.readdir(d.absolute,(m,D)=>{if(d.pending=!1,this[F]-=1,m)return this.emit("error",m);this[S](d,D)})}[S](d,m){this.readdirCache.set(d.absolute,m),d.readdir=m,this[y]()}[y](){if(!this[E]){this[E]=!0;for(let d=this[p].head;d!==null&&this[F]<this.jobs;d=d.next)if(this[v](d.value),d.value.ignore){let m=d.next;this[p].removeNode(d),d.next=m}this[E]=!1,this[h]&&!this[p].length&&this[F]===0&&(this.zip?this.zip.end(c):(super.write(c),super.end()))}}get[g](){return this[p]&&this[p].head&&this[p].head.value}[O](d){this[p].shift(),this[F]-=1,this[y]()}[v](d){if(!d.pending){if(d.entry){d===this[g]&&!d.piped&&this[N](d);return}if(d.stat||(this.statCache.has(d.absolute)?this[f](d,this.statCache.get(d.absolute)):this[L](d)),!!d.stat&&!d.ignore&&!(!this.noDirRecurse&&d.stat.isDirectory()&&!d.readdir&&(this.readdirCache.has(d.absolute)?this[S](d,this.readdirCache.get(d.absolute)):this[b](d),!d.readdir))){if(d.entry=this[H](d),!d.entry){d.ignore=!0;return}d===this[g]&&!d.piped&&this[N](d)}}}[T](d){return{onwarn:(m,D,A)=>this.warn(m,D,A),noPax:this.noPax,cwd:this.cwd,absolute:d.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[H](d){this[F]+=1;try{return new this[U](d.path,this[T](d)).on("end",()=>this[O](d)).on("error",m=>this.emit("error",m))}catch(m){this.emit("error",m)}}[K](){this[g]&&this[g].entry&&this[g].entry.resume()}[N](d){d.piped=!0,d.readdir&&d.readdir.forEach(A=>{let w=d.path,I=w==="./"?"":w.replace(/\/*$/,"/");this[R](I+A)});let m=d.entry,D=this.zip;D?m.on("data",A=>{D.write(A)||m.pause()}):m.on("data",A=>{super.write(A)||m.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),P=class extends z{constructor(d){super(d),this[U]=a}pause(){}resume(){}[L](d){let m=this.follow?"statSync":"lstatSync";this[f](d,B[m](d.absolute))}[b](d,m){this[S](d,B.readdirSync(d.absolute))}[N](d){let m=d.entry,D=this.zip;d.readdir&&d.readdir.forEach(A=>{let w=d.path,I=w==="./"?"":w.replace(/\/*$/,"/");this[R](I+A)}),D?m.on("data",A=>{D.write(A)}):m.on("data",A=>{super[V](A)})}};z.Sync=P,e.exports=z}),Qn=te(t=>{"use strict";W();var e=ZD(),r=re("events").EventEmitter,i=re("fs"),n=i.writev;if(!n){let d=process.binding("fs"),m=d.FSReqWrap||d.FSReqCallback;n=(D,A,w,I)=>{let M=(q,Q)=>I(q,Q,A),Z=new m;Z.oncomplete=M,d.writeBuffers(D,A,w,Z)}}var s=Symbol("_autoClose"),o=Symbol("_close"),a=Symbol("_ended"),u=Symbol("_fd"),l=Symbol("_finished"),c=Symbol("_flags"),f=Symbol("_flush"),h=Symbol("_handleChunk"),p=Symbol("_makeBuf"),g=Symbol("_mode"),y=Symbol("_needDrain"),E=Symbol("_onerror"),v=Symbol("_onopen"),F=Symbol("_onread"),O=Symbol("_onwrite"),R=Symbol("_open"),x=Symbol("_path"),L=Symbol("_pos"),b=Symbol("_queue"),S=Symbol("_read"),N=Symbol("_readSize"),H=Symbol("_reading"),T=Symbol("_remain"),U=Symbol("_size"),V=Symbol("_write"),K=Symbol("_writing"),B=Symbol("_defaultFlag"),C=Symbol("_errored"),k=class extends e{constructor(d,m){if(m=m||{},super(m),this.readable=!0,this.writable=!1,typeof d!="string")throw new TypeError("path must be a string");this[C]=!1,this[u]=typeof m.fd=="number"?m.fd:null,this[x]=d,this[N]=m.readSize||16*1024*1024,this[H]=!1,this[U]=typeof m.size=="number"?m.size:1/0,this[T]=this[U],this[s]=typeof m.autoClose=="boolean"?m.autoClose:!0,typeof this[u]=="number"?this[S]():this[R]()}get fd(){return this[u]}get path(){return this[x]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[R](){i.open(this[x],"r",(d,m)=>this[v](d,m))}[v](d,m){d?this[E](d):(this[u]=m,this.emit("open",m),this[S]())}[p](){return Buffer.allocUnsafe(Math.min(this[N],this[T]))}[S](){if(!this[H]){this[H]=!0;let d=this[p]();if(d.length===0)return process.nextTick(()=>this[F](null,0,d));i.read(this[u],d,0,d.length,null,(m,D,A)=>this[F](m,D,A))}}[F](d,m,D){this[H]=!1,d?this[E](d):this[h](m,D)&&this[S]()}[o](){if(this[s]&&typeof this[u]=="number"){let d=this[u];this[u]=null,i.close(d,m=>m?this.emit("error",m):this.emit("close"))}}[E](d){this[H]=!0,this[o](),this.emit("error",d)}[h](d,m){let D=!1;return this[T]-=d,d>0&&(D=super.write(d<m.length?m.slice(0,d):m)),(d===0||this[T]<=0)&&(D=!1,this[o](),super.end()),D}emit(d,m){switch(d){case"prefinish":case"finish":break;case"drain":typeof this[u]=="number"&&this[S]();break;case"error":return this[C]?void 0:(this[C]=!0,super.emit(d,m));default:return super.emit(d,m)}}},j=class extends k{[R](){let d=!0;try{this[v](null,i.openSync(this[x],"r")),d=!1}finally{d&&this[o]()}}[S](){let d=!0;try{if(!this[H]){this[H]=!0;do{let m=this[p](),D=m.length===0?0:i.readSync(this[u],m,0,m.length,null);if(!this[h](D,m))break}while(!0);this[H]=!1}d=!1}finally{d&&this[o]()}}[o](){if(this[s]&&typeof this[u]=="number"){let d=this[u];this[u]=null,i.closeSync(d),this.emit("close")}}},z=class extends r{constructor(d,m){m=m||{},super(m),this.readable=!1,this.writable=!0,this[C]=!1,this[K]=!1,this[a]=!1,this[y]=!1,this[b]=[],this[x]=d,this[u]=typeof m.fd=="number"?m.fd:null,this[g]=m.mode===void 0?438:m.mode,this[L]=typeof m.start=="number"?m.start:null,this[s]=typeof m.autoClose=="boolean"?m.autoClose:!0;let D=this[L]!==null?"r+":"w";this[B]=m.flags===void 0,this[c]=this[B]?D:m.flags,this[u]===null&&this[R]()}emit(d,m){if(d==="error"){if(this[C])return;this[C]=!0}return super.emit(d,m)}get fd(){return this[u]}get path(){return this[x]}[E](d){this[o](),this[K]=!0,this.emit("error",d)}[R](){i.open(this[x],this[c],this[g],(d,m)=>this[v](d,m))}[v](d,m){this[B]&&this[c]==="r+"&&d&&d.code==="ENOENT"?(this[c]="w",this[R]()):d?this[E](d):(this[u]=m,this.emit("open",m),this[f]())}end(d,m){return d&&this.write(d,m),this[a]=!0,!this[K]&&!this[b].length&&typeof this[u]=="number"&&this[O](null,0),this}write(d,m){return typeof d=="string"&&(d=Buffer.from(d,m)),this[a]?(this.emit("error",new Error("write() after end()")),!1):this[u]===null||this[K]||this[b].length?(this[b].push(d),this[y]=!0,!1):(this[K]=!0,this[V](d),!0)}[V](d){i.write(this[u],d,0,d.length,this[L],(m,D)=>this[O](m,D))}[O](d,m){d?this[E](d):(this[L]!==null&&(this[L]+=m),this[b].length?this[f]():(this[K]=!1,this[a]&&!this[l]?(this[l]=!0,this[o](),this.emit("finish")):this[y]&&(this[y]=!1,this.emit("drain"))))}[f](){if(this[b].length===0)this[a]&&this[O](null,0);else if(this[b].length===1)this[V](this[b].pop());else{let d=this[b];this[b]=[],n(this[u],d,this[L],(m,D)=>this[O](m,D))}}[o](){if(this[s]&&typeof this[u]=="number"){let d=this[u];this[u]=null,i.close(d,m=>m?this.emit("error",m):this.emit("close"))}}},P=class extends z{[R](){let d;if(this[B]&&this[c]==="r+")try{d=i.openSync(this[x],this[c],this[g])}catch(m){if(m.code==="ENOENT")return this[c]="w",this[R]();throw m}else d=i.openSync(this[x],this[c],this[g]);this[v](null,d)}[o](){if(this[s]&&typeof this[u]=="number"){let d=this[u];this[u]=null,i.closeSync(d),this.emit("close")}}[V](d){let m=!0;try{this[O](null,i.writeSync(this[u],d,0,d.length,this[L])),m=!1}finally{if(m)try{this[o]()}catch{}}}};t.ReadStream=k,t.ReadStreamSync=j,t.WriteStream=z,t.WriteStreamSync=P}),$h=te((t,e)=>{"use strict";W();var r=Mh(),i=Jn(),n=re("events"),s=ib(),o=1024*1024,a=Ih(),u=Nh(),l=XD(),{nextTick:c}=re("process"),f=Buffer.from([31,139]),h=Symbol("state"),p=Symbol("writeEntry"),g=Symbol("readEntry"),y=Symbol("nextEntry"),E=Symbol("processEntry"),v=Symbol("extendedHeader"),F=Symbol("globalExtendedHeader"),O=Symbol("meta"),R=Symbol("emitMeta"),x=Symbol("buffer"),L=Symbol("queue"),b=Symbol("ended"),S=Symbol("emittedEnd"),N=Symbol("emit"),H=Symbol("unzip"),T=Symbol("consumeChunk"),U=Symbol("consumeChunkSub"),V=Symbol("consumeBody"),K=Symbol("consumeMeta"),B=Symbol("consumeHeader"),C=Symbol("consuming"),k=Symbol("bufferConcat"),j=Symbol("maybeEnd"),z=Symbol("writing"),P=Symbol("aborted"),d=Symbol("onDone"),m=Symbol("sawValidEntry"),D=Symbol("sawNullBlock"),A=Symbol("sawEOF"),w=Symbol("closeStream"),I=M=>!0;e.exports=r(class extends n{constructor(M){M=M||{},super(M),this.file=M.file||"",this[m]=null,this.on(d,Z=>{(this[h]==="begin"||this[m]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),M.ondone?this.on(d,M.ondone):this.on(d,Z=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!M.strict,this.maxMetaEntrySize=M.maxMetaEntrySize||o,this.filter=typeof M.filter=="function"?M.filter:I,this.writable=!0,this.readable=!1,this[L]=new s,this[x]=null,this[g]=null,this[p]=null,this[h]="begin",this[O]="",this[v]=null,this[F]=null,this[b]=!1,this[H]=null,this[P]=!1,this[D]=!1,this[A]=!1,this.on("end",()=>this[w]()),typeof M.onwarn=="function"&&this.on("warn",M.onwarn),typeof M.onentry=="function"&&this.on("entry",M.onentry)}[B](M,Z){this[m]===null&&(this[m]=!1);let q;try{q=new i(M,Z,this[v],this[F])}catch(Q){return this.warn("TAR_ENTRY_INVALID",Q)}if(q.nullBlock)this[D]?(this[A]=!0,this[h]==="begin"&&(this[h]="header"),this[N]("eof")):(this[D]=!0,this[N]("nullBlock"));else if(this[D]=!1,!q.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:q});else if(!q.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:q});else{let Q=q.type;if(/^(Symbolic)?Link$/.test(Q)&&!q.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:q});else if(!/^(Symbolic)?Link$/.test(Q)&&q.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:q});else{let G=this[p]=new a(q,this[v],this[F]);if(!this[m])if(G.remain){let ie=()=>{G.invalid||(this[m]=!0)};G.on("end",ie)}else this[m]=!0;G.meta?G.size>this.maxMetaEntrySize?(G.ignore=!0,this[N]("ignoredEntry",G),this[h]="ignore",G.resume()):G.size>0&&(this[O]="",G.on("data",ie=>this[O]+=ie),this[h]="meta"):(this[v]=null,G.ignore=G.ignore||!this.filter(G.path,G),G.ignore?(this[N]("ignoredEntry",G),this[h]=G.remain?"ignore":"header",G.resume()):(G.remain?this[h]="body":(this[h]="header",G.end()),this[g]?this[L].push(G):(this[L].push(G),this[y]())))}}}[w](){c(()=>this.emit("close"))}[E](M){let Z=!0;return M?Array.isArray(M)?this.emit.apply(this,M):(this[g]=M,this.emit("entry",M),M.emittedEnd||(M.on("end",q=>this[y]()),Z=!1)):(this[g]=null,Z=!1),Z}[y](){do;while(this[E](this[L].shift()));if(!this[L].length){let M=this[g];!M||M.flowing||M.size===M.remain?this[z]||this.emit("drain"):M.once("drain",Z=>this.emit("drain"))}}[V](M,Z){let q=this[p],Q=q.blockRemain,G=Q>=M.length&&Z===0?M:M.slice(Z,Z+Q);return q.write(G),q.blockRemain||(this[h]="header",this[p]=null,q.end()),G.length}[K](M,Z){let q=this[p],Q=this[V](M,Z);return this[p]||this[R](q),Q}[N](M,Z,q){!this[L].length&&!this[g]?this.emit(M,Z,q):this[L].push([M,Z,q])}[R](M){switch(this[N]("meta",this[O]),M.type){case"ExtendedHeader":case"OldExtendedHeader":this[v]=u.parse(this[O],this[v],!1);break;case"GlobalExtendedHeader":this[F]=u.parse(this[O],this[F],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[v]=this[v]||Object.create(null),this[v].path=this[O].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[v]=this[v]||Object.create(null),this[v].linkpath=this[O].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+M.type)}}abort(M){this[P]=!0,this.emit("abort",M),this.warn("TAR_ABORT",M,{recoverable:!1})}write(M){if(this[P])return;if(this[H]===null&&M){if(this[x]&&(M=Buffer.concat([this[x],M]),this[x]=null),M.length<f.length)return this[x]=M,!0;for(let q=0;this[H]===null&&q<f.length;q++)M[q]!==f[q]&&(this[H]=!1);if(this[H]===null){let q=this[b];this[b]=!1,this[H]=new l.Unzip,this[H].on("data",G=>this[T](G)),this[H].on("error",G=>this.abort(G)),this[H].on("end",G=>{this[b]=!0,this[T]()}),this[z]=!0;let Q=this[H][q?"end":"write"](M);return this[z]=!1,Q}}this[z]=!0,this[H]?this[H].write(M):this[T](M),this[z]=!1;let Z=this[L].length?!1:this[g]?this[g].flowing:!0;return!Z&&!this[L].length&&this[g].once("drain",q=>this.emit("drain")),Z}[k](M){M&&!this[P]&&(this[x]=this[x]?Buffer.concat([this[x],M]):M)}[j](){if(this[b]&&!this[S]&&!this[P]&&!this[C]){this[S]=!0;let M=this[p];if(M&&M.blockRemain){let Z=this[x]?this[x].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${M.blockRemain} more bytes, only ${Z} available)`,{entry:M}),this[x]&&M.write(this[x]),M.end()}this[N](d)}}[T](M){if(this[C])this[k](M);else if(!M&&!this[x])this[j]();else{if(this[C]=!0,this[x]){this[k](M);let Z=this[x];this[x]=null,this[U](Z)}else this[U](M);for(;this[x]&&this[x].length>=512&&!this[P]&&!this[A];){let Z=this[x];this[x]=null,this[U](Z)}this[C]=!1}(!this[x]||this[b])&&this[j]()}[U](M){let Z=0,q=M.length;for(;Z+512<=q&&!this[P]&&!this[A];)switch(this[h]){case"begin":case"header":this[B](M,Z),Z+=512;break;case"ignore":case"body":Z+=this[V](M,Z);break;case"meta":Z+=this[K](M,Z);break;default:throw new Error("invalid state: "+this[h])}Z<q&&(this[x]?this[x]=Buffer.concat([M.slice(Z),this[x]]):this[x]=M.slice(Z))}end(M){this[P]||(this[H]?this[H].end(M):(this[b]=!0,this.write(M)))}})}),Hh=te((t,e)=>{"use strict";W();var r=Kn(),i=$h(),n=re("fs"),s=Qn(),o=re("path"),a=Xn();e.exports=(p,g,y)=>{typeof p=="function"?(y=p,g=null,p={}):Array.isArray(p)&&(g=p,p={}),typeof g=="function"&&(y=g,g=null),g?g=Array.from(g):g=[];let E=r(p);if(E.sync&&typeof y=="function")throw new TypeError("callback not supported for sync tar functions");if(!E.file&&typeof y=="function")throw new TypeError("callback only supported with file option");return g.length&&l(E,g),E.noResume||u(E),E.file&&E.sync?c(E):E.file?f(E,y):h(E)};var u=p=>{let g=p.onentry;p.onentry=g?y=>{g(y),y.resume()}:y=>y.resume()},l=(p,g)=>{let y=new Map(g.map(F=>[a(F),!0])),E=p.filter,v=(F,O)=>{let R=O||o.parse(F).root||".",x=F===R?!1:y.has(F)?y.get(F):v(o.dirname(F),R);return y.set(F,x),x};p.filter=E?(F,O)=>E(F,O)&&v(a(F)):F=>v(a(F))},c=p=>{let g=h(p),y=p.file,E=!0,v;try{let F=n.statSync(y),O=p.maxReadSize||16*1024*1024;if(F.size<O)g.end(n.readFileSync(y));else{let R=0,x=Buffer.allocUnsafe(O);for(v=n.openSync(y,"r");R<F.size;){let L=n.readSync(v,x,0,O,R);R+=L,g.write(x.slice(0,L))}g.end()}E=!1}finally{if(E&&v)try{n.closeSync(v)}catch{}}},f=(p,g)=>{let y=new i(p),E=p.maxReadSize||16*1024*1024,v=p.file,F=new Promise((O,R)=>{y.on("error",R),y.on("end",O),n.stat(v,(x,L)=>{if(x)R(x);else{let b=new s.ReadStream(v,{readSize:E,size:L.size});b.on("error",R),b.pipe(y)}})});return g?F.then(g,g):F},h=p=>new i(p)}),sT=te((t,e)=>{"use strict";W();var r=Kn(),i=jh(),n=Qn(),s=Hh(),o=re("path");e.exports=(p,g,y)=>{if(typeof g=="function"&&(y=g),Array.isArray(p)&&(g=p,p={}),!g||!Array.isArray(g)||!g.length)throw new TypeError("no files or directories specified");g=Array.from(g);let E=r(p);if(E.sync&&typeof y=="function")throw new TypeError("callback not supported for sync tar functions");if(!E.file&&typeof y=="function")throw new TypeError("callback only supported with file option");return E.file&&E.sync?a(E,g):E.file?u(E,g,y):E.sync?f(E,g):h(E,g)};var a=(p,g)=>{let y=new i.Sync(p),E=new n.WriteStreamSync(p.file,{mode:p.mode||438});y.pipe(E),l(y,g)},u=(p,g,y)=>{let E=new i(p),v=new n.WriteStream(p.file,{mode:p.mode||438});E.pipe(v);let F=new Promise((O,R)=>{v.on("error",R),v.on("close",O),E.on("error",R)});return c(E,g),y?F.then(y,y):F},l=(p,g)=>{g.forEach(y=>{y.charAt(0)==="@"?s({file:o.resolve(p.cwd,y.slice(1)),sync:!0,noResume:!0,onentry:E=>p.add(E)}):p.add(y)}),p.end()},c=(p,g)=>{for(;g.length;){let y=g.shift();if(y.charAt(0)==="@")return s({file:o.resolve(p.cwd,y.slice(1)),noResume:!0,onentry:E=>p.add(E)}).then(E=>c(p,g));p.add(y)}p.end()},f=(p,g)=>{let y=new i.Sync(p);return l(y,g),y},h=(p,g)=>{let y=new i(p);return c(y,g),y}}),nb=te((t,e)=>{"use strict";W();var r=Kn(),i=jh(),n=re("fs"),s=Qn(),o=Hh(),a=re("path"),u=Jn();e.exports=(g,y,E)=>{let v=r(g);if(!v.file)throw new TypeError("file is required");if(v.gzip)throw new TypeError("cannot append to compressed archives");if(!y||!Array.isArray(y)||!y.length)throw new TypeError("no files or directories specified");return y=Array.from(y),v.sync?l(v,y):f(v,y,E)};var l=(g,y)=>{let E=new i.Sync(g),v=!0,F,O;try{try{F=n.openSync(g.file,"r+")}catch(L){if(L.code==="ENOENT")F=n.openSync(g.file,"w+");else throw L}let R=n.fstatSync(F),x=Buffer.alloc(512);e:for(O=0;O<R.size;O+=512){for(let S=0,N=0;S<512;S+=N){if(N=n.readSync(F,x,S,x.length-S,O+S),O===0&&x[0]===31&&x[1]===139)throw new Error("cannot append to compressed archives");if(!N)break e}let L=new u(x);if(!L.cksumValid)break;let b=512*Math.ceil(L.size/512);if(O+b+512>R.size)break;O+=b,g.mtimeCache&&g.mtimeCache.set(L.path,L.mtime)}v=!1,c(g,E,O,F,y)}finally{if(v)try{n.closeSync(F)}catch{}}},c=(g,y,E,v,F)=>{let O=new s.WriteStreamSync(g.file,{fd:v,start:E});y.pipe(O),h(y,F)},f=(g,y,E)=>{y=Array.from(y);let v=new i(g),F=(R,x,L)=>{let b=(U,V)=>{U?n.close(R,K=>L(U)):L(null,V)},S=0;if(x===0)return b(null,0);let N=0,H=Buffer.alloc(512),T=(U,V)=>{if(U)return b(U);if(N+=V,N<512&&V)return n.read(R,H,N,H.length-N,S+N,T);if(S===0&&H[0]===31&&H[1]===139)return b(new Error("cannot append to compressed archives"));if(N<512)return b(null,S);let K=new u(H);if(!K.cksumValid)return b(null,S);let B=512*Math.ceil(K.size/512);if(S+B+512>x||(S+=B+512,S>=x))return b(null,S);g.mtimeCache&&g.mtimeCache.set(K.path,K.mtime),N=0,n.read(R,H,0,512,S,T)};n.read(R,H,0,512,S,T)},O=new Promise((R,x)=>{v.on("error",x);let L="r+",b=(S,N)=>{if(S&&S.code==="ENOENT"&&L==="r+")return L="w+",n.open(g.file,L,b);if(S)return x(S);n.fstat(N,(H,T)=>{if(H)return n.close(N,()=>x(H));F(N,T.size,(U,V)=>{if(U)return x(U);let K=new s.WriteStream(g.file,{fd:N,start:V});v.pipe(K),K.on("error",x),K.on("close",R),p(v,y)})})};n.open(g.file,L,b)});return E?O.then(E,E):O},h=(g,y)=>{y.forEach(E=>{E.charAt(0)==="@"?o({file:a.resolve(g.cwd,E.slice(1)),sync:!0,noResume:!0,onentry:v=>g.add(v)}):g.add(E)}),g.end()},p=(g,y)=>{for(;y.length;){let E=y.shift();if(E.charAt(0)==="@")return o({file:a.resolve(g.cwd,E.slice(1)),noResume:!0,onentry:v=>g.add(v)}).then(v=>p(g,y));g.add(E)}g.end()}}),oT=te((t,e)=>{"use strict";W();var r=Kn(),i=nb();e.exports=(s,o,a)=>{let u=r(s);if(!u.file)throw new TypeError("file is required");if(u.gzip)throw new TypeError("cannot append to compressed archives");if(!o||!Array.isArray(o)||!o.length)throw new TypeError("no files or directories specified");return o=Array.from(o),n(u),i(u,o,a)};var n=s=>{let o=s.filter;s.mtimeCache||(s.mtimeCache=new Map),s.filter=o?(a,u)=>o(a,u)&&!(s.mtimeCache.get(a)>u.mtime):(a,u)=>!(s.mtimeCache.get(a)>u.mtime)}}),aT=te((t,e)=>{W();var{promisify:r}=re("util"),i=re("fs"),n=s=>{if(!s)s={mode:511,fs:i};else if(typeof s=="object")s={mode:511,fs:i,...s};else if(typeof s=="number")s={mode:s,fs:i};else if(typeof s=="string")s={mode:parseInt(s,8),fs:i};else throw new TypeError("invalid options argument");return s.mkdir=s.mkdir||s.fs.mkdir||i.mkdir,s.mkdirAsync=r(s.mkdir),s.stat=s.stat||s.fs.stat||i.stat,s.statAsync=r(s.stat),s.statSync=s.statSync||s.fs.statSync||i.statSync,s.mkdirSync=s.mkdirSync||s.fs.mkdirSync||i.mkdirSync,s};e.exports=n}),uT=te((t,e)=>{W();var r=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:i,parse:n}=re("path"),s=o=>{if(/\0/.test(o))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:o,code:"ERR_INVALID_ARG_VALUE"});if(o=i(o),r==="win32"){let a=/[*|"<>?:]/,{root:u}=n(o);if(a.test(o.substr(u.length)))throw Object.assign(new Error("Illegal characters in path."),{path:o,code:"EINVAL"})}return o};e.exports=s}),lT=te((t,e)=>{W();var{dirname:r}=re("path"),i=(s,o,a=void 0)=>a===o?Promise.resolve():s.statAsync(o).then(u=>u.isDirectory()?a:void 0,u=>u.code==="ENOENT"?i(s,r(o),o):void 0),n=(s,o,a=void 0)=>{if(a!==o)try{return s.statSync(o).isDirectory()?a:void 0}catch(u){return u.code==="ENOENT"?n(s,r(o),o):void 0}};e.exports={findMade:i,findMadeSync:n}}),sb=te((t,e)=>{W();var{dirname:r}=re("path"),i=(s,o,a)=>{o.recursive=!1;let u=r(s);return u===s?o.mkdirAsync(s,o).catch(l=>{if(l.code!=="EISDIR")throw l}):o.mkdirAsync(s,o).then(()=>a||s,l=>{if(l.code==="ENOENT")return i(u,o).then(c=>i(s,o,c));if(l.code!=="EEXIST"&&l.code!=="EROFS")throw l;return o.statAsync(s).then(c=>{if(c.isDirectory())return a;throw l},()=>{throw l})})},n=(s,o,a)=>{let u=r(s);if(o.recursive=!1,u===s)try{return o.mkdirSync(s,o)}catch(l){if(l.code!=="EISDIR")throw l;return}try{return o.mkdirSync(s,o),a||s}catch(l){if(l.code==="ENOENT")return n(s,o,n(u,o,a));if(l.code!=="EEXIST"&&l.code!=="EROFS")throw l;try{if(!o.statSync(s).isDirectory())throw l}catch{throw l}}};e.exports={mkdirpManual:i,mkdirpManualSync:n}}),cT=te((t,e)=>{W();var{dirname:r}=re("path"),{findMade:i,findMadeSync:n}=lT(),{mkdirpManual:s,mkdirpManualSync:o}=sb(),a=(l,c)=>(c.recursive=!0,r(l)===l?c.mkdirAsync(l,c):i(c,l).then(f=>c.mkdirAsync(l,c).then(()=>f).catch(h=>{if(h.code==="ENOENT")return s(l,c);throw h}))),u=(l,c)=>{if(c.recursive=!0,r(l)===l)return c.mkdirSync(l,c);let f=n(c,l);try{return c.mkdirSync(l,c),f}catch(h){if(h.code==="ENOENT")return o(l,c);throw h}};e.exports={mkdirpNative:a,mkdirpNativeSync:u}}),hT=te((t,e)=>{W();var r=re("fs"),i=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version,n=i.replace(/^v/,"").split("."),s=+n[0]>10||+n[0]==10&&+n[1]>=12,o=s?u=>u.mkdir===r.mkdir:()=>!1,a=s?u=>u.mkdirSync===r.mkdirSync:()=>!1;e.exports={useNative:o,useNativeSync:a}}),fT=te((t,e)=>{W();var r=aT(),i=uT(),{mkdirpNative:n,mkdirpNativeSync:s}=cT(),{mkdirpManual:o,mkdirpManualSync:a}=sb(),{useNative:u,useNativeSync:l}=hT(),c=(h,p)=>(h=i(h),p=r(p),u(p)?n(h,p):o(h,p)),f=(h,p)=>(h=i(h),p=r(p),l(p)?s(h,p):a(h,p));c.sync=f,c.native=(h,p)=>n(i(h),r(p)),c.manual=(h,p)=>o(i(h),r(p)),c.nativeSync=(h,p)=>s(i(h),r(p)),c.manualSync=(h,p)=>a(i(h),r(p)),e.exports=c}),pT=te((t,e)=>{"use strict";W();var r=re("fs"),i=re("path"),n=r.lchown?"lchown":"chown",s=r.lchownSync?"lchownSync":"chownSync",o=r.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),a=(O,R,x)=>{try{return r[s](O,R,x)}catch(L){if(L.code!=="ENOENT")throw L}},u=(O,R,x)=>{try{return r.chownSync(O,R,x)}catch(L){if(L.code!=="ENOENT")throw L}},l=o?(O,R,x,L)=>b=>{!b||b.code!=="EISDIR"?L(b):r.chown(O,R,x,L)}:(O,R,x,L)=>L,c=o?(O,R,x)=>{try{return a(O,R,x)}catch(L){if(L.code!=="EISDIR")throw L;u(O,R,x)}}:(O,R,x)=>a(O,R,x),f=process.version,h=(O,R,x)=>r.readdir(O,R,x),p=(O,R)=>r.readdirSync(O,R);/^v4\./.test(f)&&(h=(O,R,x)=>r.readdir(O,x));var g=(O,R,x,L)=>{r[n](O,R,x,l(O,R,x,b=>{L(b&&b.code!=="ENOENT"?b:null)}))},y=(O,R,x,L,b)=>{if(typeof R=="string")return r.lstat(i.resolve(O,R),(S,N)=>{if(S)return b(S.code!=="ENOENT"?S:null);N.name=R,y(O,N,x,L,b)});if(R.isDirectory())E(i.resolve(O,R.name),x,L,S=>{if(S)return b(S);let N=i.resolve(O,R.name);g(N,x,L,b)});else{let S=i.resolve(O,R.name);g(S,x,L,b)}},E=(O,R,x,L)=>{h(O,{withFileTypes:!0},(b,S)=>{if(b){if(b.code==="ENOENT")return L();if(b.code!=="ENOTDIR"&&b.code!=="ENOTSUP")return L(b)}if(b||!S.length)return g(O,R,x,L);let N=S.length,H=null,T=U=>{if(!H){if(U)return L(H=U);if(--N===0)return g(O,R,x,L)}};S.forEach(U=>y(O,U,R,x,T))})},v=(O,R,x,L)=>{if(typeof R=="string")try{let b=r.lstatSync(i.resolve(O,R));b.name=R,R=b}catch(b){if(b.code==="ENOENT")return;throw b}R.isDirectory()&&F(i.resolve(O,R.name),x,L),c(i.resolve(O,R.name),x,L)},F=(O,R,x)=>{let L;try{L=p(O,{withFileTypes:!0})}catch(b){if(b.code==="ENOENT")return;if(b.code==="ENOTDIR"||b.code==="ENOTSUP")return c(O,R,x);throw b}return L&&L.length&&L.forEach(b=>v(O,b,R,x)),c(O,R,x)};e.exports=E,E.sync=F}),dT=te((t,e)=>{"use strict";W();var r=fT(),i=re("fs"),n=re("path"),s=pT(),o=Zn(),a=class extends Error{constructor(y,E){super("Cannot extract through symbolic link"),this.path=E,this.symlink=y}get name(){return"SylinkError"}},u=class extends Error{constructor(y,E){super(E+": Cannot cd into '"+y+"'"),this.path=y,this.code=E}get name(){return"CwdError"}},l=(y,E)=>y.get(o(E)),c=(y,E,v)=>y.set(o(E),v),f=(y,E)=>{i.stat(y,(v,F)=>{(v||!F.isDirectory())&&(v=new u(y,v&&v.code||"ENOTDIR")),E(v)})};e.exports=(y,E,v)=>{y=o(y);let F=E.umask,O=E.mode|448,R=(O&F)!==0,x=E.uid,L=E.gid,b=typeof x=="number"&&typeof L=="number"&&(x!==E.processUid||L!==E.processGid),S=E.preserve,N=E.unlink,H=E.cache,T=o(E.cwd),U=(K,B)=>{K?v(K):(c(H,y,!0),B&&b?s(B,x,L,C=>U(C)):R?i.chmod(y,O,v):v())};if(H&&l(H,y)===!0)return U();if(y===T)return f(y,U);if(S)return r(y,{mode:O}).then(K=>U(null,K),U);let V=o(n.relative(T,y)).split("/");h(T,V,O,H,N,T,null,U)};var h=(y,E,v,F,O,R,x,L)=>{if(!E.length)return L(null,x);let b=E.shift(),S=o(n.resolve(y+"/"+b));if(l(F,S))return h(S,E,v,F,O,R,x,L);i.mkdir(S,v,p(S,E,v,F,O,R,x,L))},p=(y,E,v,F,O,R,x,L)=>b=>{b?i.lstat(y,(S,N)=>{if(S)S.path=S.path&&o(S.path),L(S);else if(N.isDirectory())h(y,E,v,F,O,R,x,L);else if(O)i.unlink(y,H=>{if(H)return L(H);i.mkdir(y,v,p(y,E,v,F,O,R,x,L))});else{if(N.isSymbolicLink())return L(new a(y,y+"/"+E.join("/")));L(b)}}):(x=x||y,h(y,E,v,F,O,R,x,L))},g=y=>{let E=!1,v="ENOTDIR";try{E=i.statSync(y).isDirectory()}catch(F){v=F.code}finally{if(!E)throw new u(y,v)}};e.exports.sync=(y,E)=>{y=o(y);let v=E.umask,F=E.mode|448,O=(F&v)!==0,R=E.uid,x=E.gid,L=typeof R=="number"&&typeof x=="number"&&(R!==E.processUid||x!==E.processGid),b=E.preserve,S=E.unlink,N=E.cache,H=o(E.cwd),T=K=>{c(N,y,!0),K&&L&&s.sync(K,R,x),O&&i.chmodSync(y,F)};if(N&&l(N,y)===!0)return T();if(y===H)return g(H),T();if(b)return T(r.sync(y,F));let U=o(n.relative(H,y)).split("/"),V=null;for(let K=U.shift(),B=H;K&&(B+="/"+K);K=U.shift())if(B=o(n.resolve(B)),!l(N,B))try{i.mkdirSync(B,F),V=V||B,c(N,B,!0)}catch{let C=i.lstatSync(B);if(C.isDirectory()){c(N,B,!0);continue}else if(S){i.unlinkSync(B),i.mkdirSync(B,F),V=V||B,c(N,B,!0);continue}else if(C.isSymbolicLink())return new a(B,B+"/"+U.join("/"))}return T(V)}}),ob=te((t,e)=>{W();var r=Object.create(null),{hasOwnProperty:i}=Object.prototype;e.exports=n=>(i.call(r,n)||(r[n]=n.normalize("NFKD")),r[n])}),mT=te((t,e)=>{W();var r=re("assert"),i=ob(),n=Xn(),{join:s}=re("path"),o=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,a=o==="win32";e.exports=()=>{let u=new Map,l=new Map,c=E=>E.split("/").slice(0,-1).reduce((v,F)=>(v.length&&(F=s(v[v.length-1],F)),v.push(F||"/"),v),[]),f=new Set,h=E=>{let v=l.get(E);if(!v)throw new Error("function does not have any path reservations");return{paths:v.paths.map(F=>u.get(F)),dirs:[...v.dirs].map(F=>u.get(F))}},p=E=>{let{paths:v,dirs:F}=h(E);return v.every(O=>O[0]===E)&&F.every(O=>O[0]instanceof Set&&O[0].has(E))},g=E=>f.has(E)||!p(E)?!1:(f.add(E),E(()=>y(E)),!0),y=E=>{if(!f.has(E))return!1;let{paths:v,dirs:F}=l.get(E),O=new Set;return v.forEach(R=>{let x=u.get(R);r.equal(x[0],E),x.length===1?u.delete(R):(x.shift(),typeof x[0]=="function"?O.add(x[0]):x[0].forEach(L=>O.add(L)))}),F.forEach(R=>{let x=u.get(R);r(x[0]instanceof Set),x[0].size===1&&x.length===1?u.delete(R):x[0].size===1?(x.shift(),O.add(x[0])):x[0].delete(E)}),f.delete(E),O.forEach(R=>g(R)),!0};return{check:p,reserve:(E,v)=>{E=a?["win32 parallelization disabled"]:E.map(O=>i(n(s(O))).toLowerCase());let F=new Set(E.map(O=>c(O)).reduce((O,R)=>O.concat(R)));return l.set(v,{dirs:F,paths:E}),E.forEach(O=>{let R=u.get(O);R?R.push(v):u.set(O,[v])}),F.forEach(O=>{let R=u.get(O);R?R[R.length-1]instanceof Set?R[R.length-1].add(v):R.push(new Set([v])):u.set(O,[new Set([v])])}),g(v)}}}}),gT=te((t,e)=>{W();var r=process.env.__FAKE_PLATFORM__||process.platform,i=r==="win32",n=global.__FAKE_TESTING_FS__||re("fs"),{O_CREAT:s,O_TRUNC:o,O_WRONLY:a,UV_FS_O_FILEMAP:u=0}=n.constants,l=i&&!!u,c=512*1024,f=u|o|s|a;e.exports=l?h=>h<c?f:"w":()=>"w"}),ab=te((t,e)=>{"use strict";W();var r=re("assert"),i=$h(),n=re("fs"),s=Qn(),o=re("path"),a=dT(),u=eb(),l=mT(),c=tb(),f=Zn(),h=Xn(),p=ob(),g=Symbol("onEntry"),y=Symbol("checkFs"),E=Symbol("checkFs2"),v=Symbol("pruneCache"),F=Symbol("isReusable"),O=Symbol("makeFs"),R=Symbol("file"),x=Symbol("directory"),L=Symbol("link"),b=Symbol("symlink"),S=Symbol("hardlink"),N=Symbol("unsupported"),H=Symbol("checkPath"),T=Symbol("mkdir"),U=Symbol("onError"),V=Symbol("pending"),K=Symbol("pend"),B=Symbol("unpend"),C=Symbol("ended"),k=Symbol("maybeClose"),j=Symbol("skip"),z=Symbol("doChown"),P=Symbol("uid"),d=Symbol("gid"),m=Symbol("checkedCwd"),D=re("crypto"),A=gT(),w=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,I=w==="win32",M=(_,Y)=>{if(!I)return n.unlink(_,Y);let X=_+".DELETE."+D.randomBytes(16).toString("hex");n.rename(_,X,oe=>{if(oe)return Y(oe);n.unlink(X,Y)})},Z=_=>{if(!I)return n.unlinkSync(_);let Y=_+".DELETE."+D.randomBytes(16).toString("hex");n.renameSync(_,Y),n.unlinkSync(Y)},q=(_,Y,X)=>_===_>>>0?_:Y===Y>>>0?Y:X,Q=_=>p(h(f(_))).toLowerCase(),G=(_,Y)=>{Y=Q(Y);for(let X of _.keys()){let oe=Q(X);(oe===Y||oe.indexOf(Y+"/")===0)&&_.delete(X)}},ie=_=>{for(let Y of _.keys())_.delete(Y)},ce=class extends i{constructor(_){if(_||(_={}),_.ondone=Y=>{this[C]=!0,this[k]()},super(_),this[m]=!1,this.reservations=l(),this.transform=typeof _.transform=="function"?_.transform:null,this.writable=!0,this.readable=!1,this[V]=0,this[C]=!1,this.dirCache=_.dirCache||new Map,typeof _.uid=="number"||typeof _.gid=="number"){if(typeof _.uid!="number"||typeof _.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(_.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=_.uid,this.gid=_.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;_.preserveOwner===void 0&&typeof _.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!_.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=_.forceChown===!0,this.win32=!!_.win32||I,this.newer=!!_.newer,this.keep=!!_.keep,this.noMtime=!!_.noMtime,this.preservePaths=!!_.preservePaths,this.unlink=!!_.unlink,this.cwd=f(o.resolve(_.cwd||process.cwd())),this.strip=+_.strip||0,this.processUmask=_.noChmod?0:process.umask(),this.umask=typeof _.umask=="number"?_.umask:this.processUmask,this.dmode=_.dmode||511&~this.umask,this.fmode=_.fmode||438&~this.umask,this.on("entry",Y=>this[g](Y))}warn(_,Y,X={}){return(_==="TAR_BAD_ARCHIVE"||_==="TAR_ABORT")&&(X.recoverable=!1),super.warn(_,Y,X)}[k](){this[C]&&this[V]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[H](_){if(this.strip){let Y=f(_.path).split("/");if(Y.length<this.strip)return!1;if(_.path=Y.slice(this.strip).join("/"),_.type==="Link"){let X=f(_.linkpath).split("/");if(X.length>=this.strip)_.linkpath=X.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let Y=f(_.path),X=Y.split("/");if(X.includes("..")||I&&/^[a-z]:\.\.$/i.test(X[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:_,path:Y}),!1;let[oe,le]=c(Y);oe&&(_.path=le,this.warn("TAR_ENTRY_INFO",`stripping ${oe} from absolute path`,{entry:_,path:Y}))}if(o.isAbsolute(_.path)?_.absolute=f(o.resolve(_.path)):_.absolute=f(o.resolve(this.cwd,_.path)),!this.preservePaths&&_.absolute.indexOf(this.cwd+"/")!==0&&_.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:_,path:f(_.path),resolvedPath:_.absolute,cwd:this.cwd}),!1;if(_.absolute===this.cwd&&_.type!=="Directory"&&_.type!=="GNUDumpDir")return!1;if(this.win32){let{root:Y}=o.win32.parse(_.absolute);_.absolute=Y+u.encode(_.absolute.slice(Y.length));let{root:X}=o.win32.parse(_.path);_.path=X+u.encode(_.path.slice(X.length))}return!0}[g](_){if(!this[H](_))return _.resume();switch(r.equal(typeof _.absolute,"string"),_.type){case"Directory":case"GNUDumpDir":_.mode&&(_.mode=_.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[y](_);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[N](_)}}[U](_,Y){_.name==="CwdError"?this.emit("error",_):(this.warn("TAR_ENTRY_ERROR",_,{entry:Y}),this[B](),Y.resume())}[T](_,Y,X){a(f(_),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:Y,noChmod:this.noChmod},X)}[z](_){return this.forceChown||this.preserveOwner&&(typeof _.uid=="number"&&_.uid!==this.processUid||typeof _.gid=="number"&&_.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[P](_){return q(this.uid,_.uid,this.processUid)}[d](_){return q(this.gid,_.gid,this.processGid)}[R](_,Y){let X=_.mode&4095||this.fmode,oe=new s.WriteStream(_.absolute,{flags:A(_.size),mode:X,autoClose:!1});oe.on("error",pe=>{oe.fd&&n.close(oe.fd,()=>{}),oe.write=()=>!0,this[U](pe,_),Y()});let le=1,Ee=pe=>{if(pe){oe.fd&&n.close(oe.fd,()=>{}),this[U](pe,_),Y();return}--le===0&&n.close(oe.fd,Ae=>{Ae?this[U](Ae,_):this[B](),Y()})};oe.on("finish",pe=>{let Ae=_.absolute,ht=oe.fd;if(_.mtime&&!this.noMtime){le++;let ft=_.atime||new Date,un=_.mtime;n.futimes(ht,ft,un,ln=>ln?n.utimes(Ae,ft,un,ba=>Ee(ba&&ln)):Ee())}if(this[z](_)){le++;let ft=this[P](_),un=this[d](_);n.fchown(ht,ft,un,ln=>ln?n.chown(Ae,ft,un,ba=>Ee(ba&&ln)):Ee())}Ee()});let he=this.transform&&this.transform(_)||_;he!==_&&(he.on("error",pe=>{this[U](pe,_),Y()}),_.pipe(he)),he.pipe(oe)}[x](_,Y){let X=_.mode&4095||this.dmode;this[T](_.absolute,X,oe=>{if(oe){this[U](oe,_),Y();return}let le=1,Ee=he=>{--le===0&&(Y(),this[B](),_.resume())};_.mtime&&!this.noMtime&&(le++,n.utimes(_.absolute,_.atime||new Date,_.mtime,Ee)),this[z](_)&&(le++,n.chown(_.absolute,this[P](_),this[d](_),Ee)),Ee()})}[N](_){_.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${_.type}`,{entry:_}),_.resume()}[b](_,Y){this[L](_,_.linkpath,"symlink",Y)}[S](_,Y){let X=f(o.resolve(this.cwd,_.linkpath));this[L](_,X,"link",Y)}[K](){this[V]++}[B](){this[V]--,this[k]()}[j](_){this[B](),_.resume()}[F](_,Y){return _.type==="File"&&!this.unlink&&Y.isFile()&&Y.nlink<=1&&!I}[y](_){this[K]();let Y=[_.path];_.linkpath&&Y.push(_.linkpath),this.reservations.reserve(Y,X=>this[E](_,X))}[v](_){_.type==="SymbolicLink"?ie(this.dirCache):_.type!=="Directory"&&G(this.dirCache,_.absolute)}[E](_,Y){this[v](_);let X=he=>{this[v](_),Y(he)},oe=()=>{this[T](this.cwd,this.dmode,he=>{if(he){this[U](he,_),X();return}this[m]=!0,le()})},le=()=>{if(_.absolute!==this.cwd){let he=f(o.dirname(_.absolute));if(he!==this.cwd)return this[T](he,this.dmode,pe=>{if(pe){this[U](pe,_),X();return}Ee()})}Ee()},Ee=()=>{n.lstat(_.absolute,(he,pe)=>{if(pe&&(this.keep||this.newer&&pe.mtime>_.mtime)){this[j](_),X();return}if(he||this[F](_,pe))return this[O](null,_,X);if(pe.isDirectory()){if(_.type==="Directory"){let Ae=!this.noChmod&&_.mode&&(pe.mode&4095)!==_.mode,ht=ft=>this[O](ft,_,X);return Ae?n.chmod(_.absolute,_.mode,ht):ht()}if(_.absolute!==this.cwd)return n.rmdir(_.absolute,Ae=>this[O](Ae,_,X))}if(_.absolute===this.cwd)return this[O](null,_,X);M(_.absolute,Ae=>this[O](Ae,_,X))})};this[m]?le():oe()}[O](_,Y,X){if(_){this[U](_,Y),X();return}switch(Y.type){case"File":case"OldFile":case"ContiguousFile":return this[R](Y,X);case"Link":return this[S](Y,X);case"SymbolicLink":return this[b](Y,X);case"Directory":case"GNUDumpDir":return this[x](Y,X)}}[L](_,Y,X,oe){n[X](Y,_.absolute,le=>{le?this[U](le,_):(this[B](),_.resume()),oe()})}},we=_=>{try{return[null,_()]}catch(Y){return[Y,null]}},De=class extends ce{[O](_,Y){return super[O](_,Y,()=>{})}[y](_){if(this[v](_),!this[m]){let le=this[T](this.cwd,this.dmode);if(le)return this[U](le,_);this[m]=!0}if(_.absolute!==this.cwd){let le=f(o.dirname(_.absolute));if(le!==this.cwd){let Ee=this[T](le,this.dmode);if(Ee)return this[U](Ee,_)}}let[Y,X]=we(()=>n.lstatSync(_.absolute));if(X&&(this.keep||this.newer&&X.mtime>_.mtime))return this[j](_);if(Y||this[F](_,X))return this[O](null,_);if(X.isDirectory()){if(_.type==="Directory"){let Ee=!this.noChmod&&_.mode&&(X.mode&4095)!==_.mode,[he]=Ee?we(()=>{n.chmodSync(_.absolute,_.mode)}):[];return this[O](he,_)}let[le]=we(()=>n.rmdirSync(_.absolute));this[O](le,_)}let[oe]=_.absolute===this.cwd?[]:we(()=>Z(_.absolute));this[O](oe,_)}[R](_,Y){let X=_.mode&4095||this.fmode,oe=he=>{let pe;try{n.closeSync(le)}catch(Ae){pe=Ae}(he||pe)&&this[U](he||pe,_),Y()},le;try{le=n.openSync(_.absolute,A(_.size),X)}catch(he){return oe(he)}let Ee=this.transform&&this.transform(_)||_;Ee!==_&&(Ee.on("error",he=>this[U](he,_)),_.pipe(Ee)),Ee.on("data",he=>{try{n.writeSync(le,he,0,he.length)}catch(pe){oe(pe)}}),Ee.on("end",he=>{let pe=null;if(_.mtime&&!this.noMtime){let Ae=_.atime||new Date,ht=_.mtime;try{n.futimesSync(le,Ae,ht)}catch(ft){try{n.utimesSync(_.absolute,Ae,ht)}catch{pe=ft}}}if(this[z](_)){let Ae=this[P](_),ht=this[d](_);try{n.fchownSync(le,Ae,ht)}catch(ft){try{n.chownSync(_.absolute,Ae,ht)}catch{pe=pe||ft}}}oe(pe)})}[x](_,Y){let X=_.mode&4095||this.dmode,oe=this[T](_.absolute,X);if(oe){this[U](oe,_),Y();return}if(_.mtime&&!this.noMtime)try{n.utimesSync(_.absolute,_.atime||new Date,_.mtime)}catch{}if(this[z](_))try{n.chownSync(_.absolute,this[P](_),this[d](_))}catch{}Y(),_.resume()}[T](_,Y){try{return a.sync(f(_),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:Y})}catch(X){return X}}[L](_,Y,X,oe){try{n[X+"Sync"](Y,_.absolute),oe(),_.resume()}catch(le){return this[U](le,_)}}};ce.Sync=De,e.exports=ce}),yT=te((t,e)=>{"use strict";W();var r=Kn(),i=ab(),n=re("fs"),s=Qn(),o=re("path"),a=Xn();e.exports=(p,g,y)=>{typeof p=="function"?(y=p,g=null,p={}):Array.isArray(p)&&(g=p,p={}),typeof g=="function"&&(y=g,g=null),g?g=Array.from(g):g=[];let E=r(p);if(E.sync&&typeof y=="function")throw new TypeError("callback not supported for sync tar functions");if(!E.file&&typeof y=="function")throw new TypeError("callback only supported with file option");return g.length&&u(E,g),E.file&&E.sync?l(E):E.file?c(E,y):E.sync?f(E):h(E)};var u=(p,g)=>{let y=new Map(g.map(F=>[a(F),!0])),E=p.filter,v=(F,O)=>{let R=O||o.parse(F).root||".",x=F===R?!1:y.has(F)?y.get(F):v(o.dirname(F),R);return y.set(F,x),x};p.filter=E?(F,O)=>E(F,O)&&v(a(F)):F=>v(a(F))},l=p=>{let g=new i.Sync(p),y=p.file,E=n.statSync(y),v=p.maxReadSize||16*1024*1024;new s.ReadStreamSync(y,{readSize:v,size:E.size}).pipe(g)},c=(p,g)=>{let y=new i(p),E=p.maxReadSize||16*1024*1024,v=p.file,F=new Promise((O,R)=>{y.on("error",R),y.on("close",O),n.stat(v,(x,L)=>{if(x)R(x);else{let b=new s.ReadStream(v,{readSize:E,size:L.size});b.on("error",R),b.pipe(y)}})});return g?F.then(g,g):F},f=p=>new i.Sync(p),h=p=>new i(p)}),ET=te(t=>{"use strict";W(),t.c=t.create=sT(),t.r=t.replace=nb(),t.t=t.list=Hh(),t.u=t.update=oT(),t.x=t.extract=yT(),t.Pack=jh(),t.Unpack=ab(),t.Parse=$h(),t.ReadEntry=Ih(),t.WriteEntry=rb(),t.Header=Jn(),t.Pax=Nh(),t.types=QD()}),DT=te((t,e)=>{W();function r(i,n){typeof n=="boolean"&&(n={forever:n}),this._originalTimeouts=JSON.parse(JSON.stringify(i)),this._timeouts=i,this._options=n||{},this._maxRetryTime=n&&n.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}e.exports=r,r.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},r.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},r.prototype.retry=function(i){if(this._timeout&&clearTimeout(this._timeout),!i)return!1;var n=new Date().getTime();if(i&&n-this._operationStart>=this._maxRetryTime)return this._errors.push(i),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(i);var s=this._timeouts.shift();if(s===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),s=this._cachedTimeouts.slice(-1);else return!1;var o=this;return this._timer=setTimeout(function(){o._attempts++,o._operationTimeoutCb&&(o._timeout=setTimeout(function(){o._operationTimeoutCb(o._attempts)},o._operationTimeout),o._options.unref&&o._timeout.unref()),o._fn(o._attempts)},s),this._options.unref&&this._timer.unref(),!0},r.prototype.attempt=function(i,n){this._fn=i,n&&(n.timeout&&(this._operationTimeout=n.timeout),n.cb&&(this._operationTimeoutCb=n.cb));var s=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){s._operationTimeoutCb()},s._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},r.prototype.try=function(i){console.log("Using RetryOperation.try() is deprecated"),this.attempt(i)},r.prototype.start=function(i){console.log("Using RetryOperation.start() is deprecated"),this.attempt(i)},r.prototype.start=r.prototype.try,r.prototype.errors=function(){return this._errors},r.prototype.attempts=function(){return this._attempts},r.prototype.mainError=function(){if(this._errors.length===0)return null;for(var i={},n=null,s=0,o=0;o<this._errors.length;o++){var a=this._errors[o],u=a.message,l=(i[u]||0)+1;i[u]=l,l>=s&&(n=a,s=l)}return n}}),bT=te(t=>{W();var e=DT();t.operation=function(r){var i=t.timeouts(r);return new e(i,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})},t.timeouts=function(r){if(r instanceof Array)return[].concat(r);var i={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in r)i[n]=r[n];if(i.minTimeout>i.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var s=[],o=0;o<i.retries;o++)s.push(this.createTimeout(o,i));return r&&r.forever&&!s.length&&s.push(this.createTimeout(o,i)),s.sort(function(a,u){return a-u}),s},t.createTimeout=function(r,i){var n=i.randomize?Math.random()+1:1,s=Math.round(n*Math.max(i.minTimeout,1)*Math.pow(i.factor,r));return s=Math.min(s,i.maxTimeout),s},t.wrap=function(r,i,n){if(i instanceof Array&&(n=i,i=null),!n){n=[];for(var s in r)typeof r[s]=="function"&&n.push(s)}for(var o=0;o<n.length;o++){var a=n[o],u=r[a];r[a]=function(l){var c=t.operation(i),f=Array.prototype.slice.call(arguments,1),h=f.pop();f.push(function(p){c.retry(p)||(p&&(arguments[0]=c.mainError()),h.apply(this,arguments))}),c.attempt(function(){l.apply(r,f)})}.bind(r,u),r[a].options=i}}}),_T=te((t,e)=>{W(),e.exports=bT()}),wT=te((t,e)=>{W();var r=_T();function i(n,s){function o(a,u){var l=s||{},c;"randomize"in l||(l.randomize=!0),c=r.operation(l);function f(g){u(g||new Error("Aborted"))}function h(g,y){if(g.bail){f(g);return}c.retry(g)?l.onRetry&&l.onRetry(g,y):u(c.mainError())}function p(g){var y;try{y=n(f,g)}catch(E){h(E,g);return}Promise.resolve(y).then(a).catch(function(E){h(E,g)})}c.attempt(p)}return new Promise(o)}e.exports=i}),ST={};Gk(ST,{bold:()=>RT,dimmed:()=>OT,error:()=>BT,grey:()=>kT,info:()=>xT,item:()=>TT,log:()=>ni,turboBlue:()=>tn,turboGradient:()=>vT,turboLoader:()=>CT,turboRed:()=>fb,underline:()=>FT,warn:()=>LT,yellow:()=>pb});W();var cb="#0099F7",hb="#F11712",AT="#FFFF00",vT=(0,lb.default)(cb,hb),tn=Fr.default.hex(cb),fb=Fr.default.hex(hb),pb=Fr.default.hex(AT),CT=t=>(0,ub.default)({text:t,spinner:{frames:[" ",tn("> "),tn(">> "),tn(">>>")]}}),xT=(...t)=>{ni(tn.bold(">>>"),...t)},RT=(...t)=>{ni(Fr.default.bold(...t))},FT=(...t)=>{ni(Fr.default.underline(...t))},OT=(...t)=>{ni(Fr.default.dim(...t))},kT=(...t)=>{ni(Fr.default.grey(...t))},TT=(...t)=>{ni(tn.bold(" \u2022"),...t)},ni=(...t)=>{console.log(...t)},LT=(...t)=>{console.error(pb.bold(">>>"),...t)},BT=(...t)=>{console.error(fb.bold(">>>"),...t)};W();W();W();W();var QI=oa(Vk());W();W();function IT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}W();W();function Th(t){return Th=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Th(t)}W();function NT(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function MT(t,e){if(e&&(Th(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NT(t)}W();function sa(t){return sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sa(t)}W();W();function Wn(t,e){return Wn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Wn(t,e)}function jT(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wn(t,e)}W();W();function $T(t){return Function.toString.call(t).indexOf("[native code]")!==-1}W();W();function HT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function na(t,e,r){return HT()?na=Reflect.construct.bind():na=function(i,n,s){var o=[null];o.push.apply(o,n);var a=Function.bind.apply(i,o),u=new a;return s&&Wn(u,s.prototype),u},na.apply(null,arguments)}function Lh(t){var e=typeof Map=="function"?new Map:void 0;return Lh=function(r){if(r===null||!$T(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,i)}function i(){return na(r,arguments,sa(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Wn(i,r)},Lh(t)}var eN=oa(eT()),iN=function(t){jT(e,t);function e(r){var i;return IT(this,e),i=MT(this,sa(e).call(this,"No package.json could be found upwards from the directory ".concat(r))),i.directory=r,i}return e}(Lh(Error));W();W();W();W();W();W();var dN=oa(ET()),mN=(0,mb.promisify)(db.Stream.pipeline);W();W();var DN=oa(wT());W();W();W();var je=class extends Error{constructor(t,e){var r;super(t),this.name="ConvertError",this.type=(r=e==null?void 0:e.type)!=null?r:"unknown",Error.captureStackTrace(this,je)}};W();W();W();W();var qT=/^(?!_)(?<manager>.+)@(?<version>.+)$/;function Ke({workspaceRoot:t}){let e=rr.default.join(t,"package.json");try{return(0,rt.readJsonSync)(e,"utf8")}catch(r){if(r&&typeof r=="object"&&"code"in r){if(r.code==="ENOENT")throw new je(`no "package.json" found at ${t}`,{type:"package_json-missing"});if(r.code==="EJSONPARSE")throw new je(`failed to parse "package.json" at ${t}`,{type:"package_json-parse_error"})}throw new Error(`unexpected error reading "package.json" at ${t}`)}}function aa({workspaceRoot:t}){let{packageManager:e}=Ke({workspaceRoot:t});if(e)try{let r=qT.exec(e);if(r){let[i,n]=r;return n}}catch{}}function es({workspaceRoot:t}){let e=Ke({workspaceRoot:t}),r=rr.default.basename(t),{name:i=r,description:n}=e;return{name:i,description:n}}function VD({workspaceRoot:t}){let e=rr.default.join(t,"pnpm-workspace.yaml");if((0,rt.existsSync)(e))try{let r=Ua.load((0,rt.readFileSync)(e,"utf8"));if(r instanceof Object&&"packages"in r&&Array.isArray(r.packages))return r.packages}catch{throw new je(`failed to parse ${e}`,{type:"pnpm-workspace_parse_error"})}return[]}function ua({root:t,lockFile:e,workspaceConfig:r}){let i=s=>rr.default.join(t,s),n={root:t,lockfile:i(e),packageJson:i("package.json"),nodeModules:i("node_modules")};return r&&(n.workspaceConfig=i(r)),n}function qh({workspaces:t}){var e;return t?Array.isArray(t)?t:"packages"in t?(e=t.packages)!=null?e:[]:[]:[]}function la({workspaceRoot:t,workspaceGlobs:e}){return e?e.flatMap(r=>{let i=[`${r}/package.json`];return(0,_b.sync)(i,{onlyFiles:!0,absolute:!0,cwd:t,ignore:["**/node_modules/**"]})}).map(r=>{let i=rr.default.dirname(r),{name:n,description:s}=es({workspaceRoot:i});return{name:n,description:s,paths:{root:i,packageJson:r,nodeModules:rr.default.join(i,"node_modules")}}}):[]}function UT({directory:t}){let e=rr.default.resolve(process.cwd(),t);return{exists:(0,rt.existsSync)(e),absolute:e}}function Or({packageManager:t,action:e,project:r}){let i=r.workspaceData.globs.length>0;return`${e==="remove"?"Removing":"Adding"} ${t} ${i?"workspaces":""} ${e==="remove"?"from":"to"} ${r.name}`}function GT({project:t}){let e=r=>!(r.includes("*")&&(r.includes("**")||r.split("/").slice(0,-1).join("/").includes("*"))||["!","[","]","{","}"].some(i=>r.includes(i)));return t.workspaceData.globs.every(e)}function tr({project:t,options:e}){e!=null&&e.dry||(0,rt.rmSync)(t.paths.lockfile,{force:!0})}async function wb({project:t,options:e}){if(!(e!=null&&e.dry)&&(0,rt.existsSync)(t.paths.lockfile))try{let{stdout:r}=await(0,bb.default)("bun",["bun.lockb"],{stdin:"ignore",cwd:t.paths.root});await(0,rt.writeFile)(rr.default.join(t.paths.root,"yarn.lock"),r)}catch{}finally{(0,rt.rmSync)(t.paths.lockfile,{force:!0})}}function zT({dependencyList:t,project:e,to:r}){let i=[];return e.workspaceData.workspaces.forEach(n=>{let{name:s}=n;if(t[s]){let o=t[s],a=o.startsWith("workspace:")?o.slice(10):o;t[s]=r.name==="pnpm"?`workspace:${a}`:a,i.push(s)}}),{dependencyList:t,updated:i}}function xr({project:t,workspace:e,to:r,logger:i,options:n}){if(["yarn","npm","bun"].includes(r.name)&&["yarn","npm","bun"].includes(t.packageManager))return;let s=Ke({workspaceRoot:e.paths.root}),o={dependencies:[],devDependencies:[],peerDependencies:[],optionalDependencies:[]},a=["dependencies","devDependencies","peerDependencies","optionalDependencies"];a.forEach(f=>{let h=s[f];if(h){let{updated:p,dependencyList:g}=zT({dependencyList:h,project:t,to:r});s[f]=g,o[f]=p}});let u=f=>{let h=o[f].length;if(h>0)return`${Db.default.green(h.toString())} ${f}`},l=a.map(u).filter(Boolean),c=`./${yb.default.relative(t.paths.root,e.paths.packageJson)}`;if(l.length>=1){let f="updating";l.forEach((h,p)=>{l.length===1?f+=` ${h} in ${c}`:p===l.length-1?f+=`and ${h} in ${c}`:f+=` ${h}, `}),i.workspaceStep(f)}else i.workspaceStep(`no workspace dependencies found in ${c}`);n!=null&&n.dry||(0,Eb.writeJSONSync)(e.paths.packageJson,s,{spaces:2})}var Rr={name:"pnpm",lock:"pnpm-lock.yaml"};async function Sb(t){let e=ri.default.join(t.workspaceRoot,Rr.lock),r=ri.default.join(t.workspaceRoot,"pnpm-workspace.yaml"),i=aa({workspaceRoot:t.workspaceRoot});return(0,qe.existsSync)(e)||(0,qe.existsSync)(r)||i===Rr.name}async function WT(t){if(!await Sb(t))throw new je("Not a pnpm project",{type:"package_manager-unexpected"});let{name:e,description:r}=es(t);return{name:e,description:r,packageManager:Rr.name,paths:ua({root:t.workspaceRoot,lockFile:Rr.lock,workspaceConfig:"pnpm-workspace.yaml"}),workspaceData:{globs:VD(t),workspaces:la({workspaceGlobs:VD(t),...t})}}}async function YT(t){let{project:e,to:r,logger:i,options:n}=t,s=e.workspaceData.globs.length>0;i.mainStep(Or({action:"create",packageManager:Rr.name,project:e}));let o=Ke({workspaceRoot:e.paths.root});i.rootHeader(),o.packageManager=`${r.name}@${r.version}`,i.rootStep(`adding "packageManager" field to ${e.name} root "package.json"`),n!=null&&n.dry||((0,qe.writeJSONSync)(e.paths.packageJson,o,{spaces:2}),s&&(i.rootStep('adding "pnpm-workspace.yaml"'),(0,qe.writeFileSync)(ri.default.join(e.paths.root,"pnpm-workspace.yaml"),`packages:
43
43
  ${e.workspaceData.globs.map(a=>` - "${a}"`).join(`
44
- `)}`))),s&&(vr({workspace:{name:"root",paths:e.paths},project:e,to:r,logger:i,options:n}),i.workspaceHeader(),e.workspaceData.workspaces.forEach(a=>{vr({workspace:a,project:e,to:r,logger:i,options:n})}))}async function GT(t){let{project:e,logger:r,options:i}=t,n=e.workspaceData.globs.length>0;r.mainStep(xr({action:"remove",packageManager:Cr.name,project:e}));let s=Ke({workspaceRoot:e.paths.root});if(e.paths.workspaceConfig&&n&&(r.subStep('removing "pnpm-workspace.yaml"'),i!=null&&i.dry||(0,qe.rmSync)(e.paths.workspaceConfig,{force:!0})),r.subStep(`removing "packageManager" field in ${e.name} root "package.json"`),delete s.packageManager,!(i!=null&&i.dry)){(0,qe.writeJSONSync)(e.paths.packageJson,s,{spaces:2});let o=[e.paths.nodeModules,...e.workspaceData.workspaces.map(a=>a.paths.nodeModules)];try{r.subStep('removing "node_modules"'),await Promise.all(o.map(a=>(0,qe.rm)(a,{recursive:!0,force:!0})))}catch{throw new je("Failed to remove node_modules",{type:"error_removing_node_modules"})}}}async function zT(t){let{project:e,logger:r,options:i}=t;r.subStep(`removing ${Qr.default.relative(e.paths.root,e.paths.lockfile)}`),i!=null&&i.dry||(0,qe.rmSync)(e.paths.lockfile,{force:!0})}async function WT(t){let{project:e,options:r,logger:i}=t,n=()=>{i.subStep(`converting ${Qr.default.relative(e.paths.root,e.paths.lockfile)} to ${Cr.lock}`)},s=async()=>{if(!(r!=null&&r.dry)&&(0,qe.existsSync)(e.paths.lockfile))try{await(0,mb.default)(Cr.name,["import"],{stdio:"ignore",cwd:e.paths.root})}catch{}finally{tr({project:e,options:r})}};switch(e.packageManager){case"pnpm":break;case"bun":n(),await _b({project:e,options:r}),await s(),(0,qe.rmSync)(Qr.default.join(e.paths.root,"yarn.lock"),{force:!0});break;case"npm":n(),await s();break;case"yarn":n(),await s();break}}var YT={detect:wb,read:qT,create:UT,remove:GT,clean:zT,convertLock:WT};V();var en={name:"npm",lock:"package-lock.json"};async function Sb(t){let e=Wn.default.join(t.workspaceRoot,en.lock),r=aa({workspaceRoot:t.workspaceRoot});return(0,Tt.existsSync)(e)||r===en.name}async function VT(t){if(!await Sb(t))throw new je("Not an npm project",{type:"package_manager-unexpected"});let e=Ke(t),{name:r,description:i}=es(t),n=qh({workspaces:e.workspaces});return{name:r,description:i,packageManager:en.name,paths:ua({root:t.workspaceRoot,lockFile:en.lock}),workspaceData:{globs:n,workspaces:la({workspaceGlobs:n,...t})}}}async function KT(t){let{project:e,options:r,to:i,logger:n}=t,s=e.workspaceData.globs.length>0;n.mainStep(xr({packageManager:en.name,action:"create",project:e}));let o=Ke({workspaceRoot:e.paths.root});n.rootHeader(),n.rootStep(`adding "packageManager" field to ${Wn.default.relative(e.paths.root,e.paths.packageJson)}`),o.packageManager=`${i.name}@${i.version}`,s?(n.rootStep(`adding "workspaces" field to ${Wn.default.relative(e.paths.root,e.paths.packageJson)}`),o.workspaces=e.workspaceData.globs,r!=null&&r.dry||(0,Tt.writeJSONSync)(e.paths.packageJson,o,{spaces:2}),vr({workspace:{name:"root",paths:e.paths},project:e,to:i,logger:n,options:r}),n.workspaceHeader(),e.workspaceData.workspaces.forEach(a=>{vr({workspace:a,project:e,to:i,logger:n,options:r})})):r!=null&&r.dry||(0,Tt.writeJSONSync)(e.paths.packageJson,o,{spaces:2})}async function ZT(t){let{project:e,logger:r,options:i}=t,n=e.workspaceData.globs.length>0;r.mainStep(xr({packageManager:en.name,action:"remove",project:e}));let s=Ke({workspaceRoot:e.paths.root});if(n&&(r.subStep(`removing "workspaces" field in ${e.name} root "package.json"`),delete s.workspaces),r.subStep(`removing "packageManager" field in ${e.name} root "package.json"`),delete s.packageManager,!(i!=null&&i.dry)){(0,Tt.writeJSONSync)(e.paths.packageJson,s,{spaces:2});let o=[e.paths.nodeModules,...e.workspaceData.workspaces.map(a=>a.paths.nodeModules)];try{r.subStep('removing "node_modules"'),await Promise.all(o.map(a=>(0,Tt.rm)(a,{recursive:!0,force:!0})))}catch{throw new je("Failed to remove node_modules",{type:"error_removing_node_modules"})}}}async function JT(t){let{project:e,logger:r,options:i}=t;r.subStep(`removing ${Wn.default.relative(e.paths.root,e.paths.lockfile)}`),i!=null&&i.dry||(0,Tt.rmSync)(e.paths.lockfile,{force:!0})}async function XT(t){let{project:e,options:r}=t;switch(e.packageManager){case"pnpm":tr({project:e,options:r});break;case"bun":tr({project:e,options:r});break;case"npm":break;case"yarn":tr({project:e,options:r});break}}var QT={detect:Sb,read:VT,create:KT,remove:ZT,clean:JT,convertLock:XT};V();var ei={name:"yarn",lock:"yarn.lock"};async function Ab(t){let e=tn.default.join(t.workspaceRoot,ei.lock),r=aa({workspaceRoot:t.workspaceRoot});return(0,Lt.existsSync)(e)||r===ei.name}async function eL(t){if(!await Ab(t))throw new je("Not a yarn project",{type:"package_manager-unexpected"});let e=Ke(t),{name:r,description:i}=es(t),n=qh({workspaces:e.workspaces});return{name:r,description:i,packageManager:ei.name,paths:ua({root:t.workspaceRoot,lockFile:ei.lock}),workspaceData:{globs:n,workspaces:la({workspaceGlobs:n,...t})}}}async function tL(t){let{project:e,to:r,logger:i,options:n}=t,s=e.workspaceData.globs.length>0;i.mainStep(xr({packageManager:ei.name,action:"create",project:e}));let o=Ke({workspaceRoot:e.paths.root});i.rootHeader(),i.rootStep(`adding "packageManager" field to ${tn.default.relative(e.paths.root,e.paths.packageJson)}`),o.packageManager=`${r.name}@${r.version}`,s?(i.rootStep(`adding "workspaces" field to ${tn.default.relative(e.paths.root,e.paths.packageJson)}`),o.workspaces=e.workspaceData.globs,n!=null&&n.dry||(0,Lt.writeJSONSync)(e.paths.packageJson,o,{spaces:2}),vr({workspace:{name:"root",paths:e.paths},project:e,to:r,logger:i,options:n}),i.workspaceHeader(),e.workspaceData.workspaces.forEach(a=>{vr({workspace:a,project:e,to:r,logger:i,options:n})})):n!=null&&n.dry||(0,Lt.writeJSONSync)(e.paths.packageJson,o,{spaces:2})}async function rL(t){let{project:e,logger:r,options:i}=t,n=e.workspaceData.globs.length>0;r.mainStep(xr({packageManager:ei.name,action:"remove",project:e}));let s=Ke({workspaceRoot:e.paths.root});if(n&&(r.subStep(`removing "workspaces" field in ${e.name} root "package.json"`),delete s.workspaces),r.subStep(`removing "packageManager" field in ${e.name} root "package.json"`),delete s.packageManager,!(i!=null&&i.dry)){(0,Lt.writeJSONSync)(e.paths.packageJson,s,{spaces:2});let o=[e.paths.nodeModules,...e.workspaceData.workspaces.map(a=>a.paths.nodeModules)];try{r.subStep('removing "node_modules"'),await Promise.all(o.map(a=>(0,Lt.rm)(a,{recursive:!0,force:!0})))}catch{throw new je("Failed to remove node_modules",{type:"error_removing_node_modules"})}}}async function iL(t){let{project:e,logger:r,options:i}=t;r.subStep(`removing ${tn.default.relative(e.paths.root,e.paths.lockfile)}`),i!=null&&i.dry||(0,Lt.rmSync)(e.paths.lockfile,{force:!0})}async function nL(t){let{project:e,options:r,logger:i}=t,n=()=>{i.subStep(`converting ${tn.default.relative(e.paths.root,e.paths.lockfile)} to ${ei.lock}`)};switch(e.packageManager){case"pnpm":tr({project:e,options:r});break;case"bun":n(),await _b({project:e,options:r});break;case"npm":tr({project:e,options:r});break;case"yarn":break}}var sL={detect:Ab,read:eL,create:tL,remove:rL,clean:iL,convertLock:nL};V();var rn={name:"bun",lock:"bun.lockb"};async function vb(t){let e=Yn.default.join(t.workspaceRoot,rn.lock),r=aa({workspaceRoot:t.workspaceRoot});return(0,Bt.existsSync)(e)||r===rn.name}async function oL(t){if(!await vb(t))throw new je("Not a bun project",{type:"package_manager-unexpected"});let e=Ke(t),{name:r,description:i}=es(t),n=qh({workspaces:e.workspaces});return{name:r,description:i,packageManager:rn.name,paths:ua({root:t.workspaceRoot,lockFile:rn.lock}),workspaceData:{globs:n,workspaces:la({workspaceGlobs:n,...t})}}}async function aL(t){let{project:e,to:r,logger:i,options:n}=t,s=e.workspaceData.globs.length>0;if(!$T({project:e}))throw new je("Unable to convert project to bun - workspace globs unsupported",{type:"bun-workspace_glob_error"});i.mainStep(xr({packageManager:rn.name,action:"create",project:e}));let o=Ke({workspaceRoot:e.paths.root});i.rootHeader(),i.rootStep(`adding "packageManager" field to ${Yn.default.relative(e.paths.root,e.paths.packageJson)}`),o.packageManager=`${r.name}@${r.version}`,s?(i.rootStep(`adding "workspaces" field to ${Yn.default.relative(e.paths.root,e.paths.packageJson)}`),o.workspaces=e.workspaceData.globs,n!=null&&n.dry||(0,Bt.writeJSONSync)(e.paths.packageJson,o,{spaces:2}),vr({workspace:{name:"root",paths:e.paths},project:e,to:r,logger:i,options:n}),i.workspaceHeader(),e.workspaceData.workspaces.forEach(a=>{vr({workspace:a,project:e,to:r,logger:i,options:n})})):n!=null&&n.dry||(0,Bt.writeJSONSync)(e.paths.packageJson,o,{spaces:2})}async function uL(t){let{project:e,logger:r,options:i}=t,n=e.workspaceData.globs.length>0;r.mainStep(xr({packageManager:rn.name,action:"remove",project:e}));let s=Ke({workspaceRoot:e.paths.root});if(n&&(r.subStep(`removing "workspaces" field in ${e.name} root "package.json"`),delete s.workspaces),r.subStep(`removing "packageManager" field in ${e.name} root "package.json"`),delete s.packageManager,!(i!=null&&i.dry)){(0,Bt.writeJSONSync)(e.paths.packageJson,s,{spaces:2});let o=[e.paths.nodeModules,...e.workspaceData.workspaces.map(a=>a.paths.nodeModules)];try{r.subStep('removing "node_modules"'),await Promise.all(o.map(a=>(0,Bt.rm)(a,{recursive:!0,force:!0})))}catch{throw new je("Failed to remove node_modules",{type:"error_removing_node_modules"})}}}async function lL(t){let{project:e,logger:r,options:i}=t;r.subStep(`removing ${Yn.default.relative(e.paths.root,e.paths.lockfile)}`),i!=null&&i.dry||(0,Bt.rmSync)(e.paths.lockfile,{force:!0})}async function cL(t){let{project:e,options:r}=t;switch(e.packageManager){case"pnpm":tr({project:e,options:r});break;case"bun":break;case"npm":tr({project:e,options:r});break;case"yarn":tr({project:e,options:r});break}}var hL={detect:vb,read:oL,create:aL,remove:uL,clean:lL,convertLock:cL},Cb={pnpm:YT,yarn:sL,npm:QT,bun:hL};V();async function ts({root:t}){let{exists:e,absolute:r}=jT({directory:t});if(!e)throw new je(`Could not find directory at ${r}. Ensure the directory exists.`,{type:"invalid_directory"});for(let{detect:i,read:n}of Object.values(Cb))if(await i({workspaceRoot:r}))return n({workspaceRoot:r});throw new je("Could not determine package manager. Add `packageManager` to `package.json` or ensure a lockfile is present.",{type:"package_manager-unable_to_detect"})}V();V();V();V();var Uh=J(require("chalk")),xb=J(require("is-git-clean"));function ca({directory:t,force:e}){var n;let r=!1,i="Unable to determine if git directory is clean";try{r=xb.default.sync(t||process.cwd()),i="Git directory is not clean"}catch(s){(n=s.stderr)!=null&&n.includes("not a git repository")&&(r=!0)}r||(e?ne.log(`${Uh.default.yellow("WARNING")}: ${i}. Forcibly continuing...`):(ne.log("Thank you for using @turbo/codemod!"),ne.log(Uh.default.yellow(`
44
+ `)}`))),s&&(xr({workspace:{name:"root",paths:e.paths},project:e,to:r,logger:i,options:n}),i.workspaceHeader(),e.workspaceData.workspaces.forEach(a=>{xr({workspace:a,project:e,to:r,logger:i,options:n})}))}async function VT(t){let{project:e,logger:r,options:i}=t,n=e.workspaceData.globs.length>0;r.mainStep(Or({action:"remove",packageManager:Rr.name,project:e}));let s=Ke({workspaceRoot:e.paths.root});if(e.paths.workspaceConfig&&n&&(r.subStep('removing "pnpm-workspace.yaml"'),i!=null&&i.dry||(0,qe.rmSync)(e.paths.workspaceConfig,{force:!0})),r.subStep(`removing "packageManager" field in ${e.name} root "package.json"`),delete s.packageManager,!(i!=null&&i.dry)){(0,qe.writeJSONSync)(e.paths.packageJson,s,{spaces:2});let o=[e.paths.nodeModules,...e.workspaceData.workspaces.map(a=>a.paths.nodeModules)];try{r.subStep('removing "node_modules"'),await Promise.all(o.map(a=>(0,qe.rm)(a,{recursive:!0,force:!0})))}catch{throw new je("Failed to remove node_modules",{type:"error_removing_node_modules"})}}}async function KT(t){let{project:e,logger:r,options:i}=t;r.subStep(`removing ${ri.default.relative(e.paths.root,e.paths.lockfile)}`),i!=null&&i.dry||(0,qe.rmSync)(e.paths.lockfile,{force:!0})}async function ZT(t){let{project:e,options:r,logger:i}=t,n=()=>{i.subStep(`converting ${ri.default.relative(e.paths.root,e.paths.lockfile)} to ${Rr.lock}`)},s=async()=>{if(!(r!=null&&r.dry)&&(0,qe.existsSync)(e.paths.lockfile))try{await(0,gb.default)(Rr.name,["import"],{stdio:"ignore",cwd:e.paths.root})}catch{}finally{tr({project:e,options:r})}};switch(e.packageManager){case"pnpm":break;case"bun":n(),await wb({project:e,options:r}),await s(),(0,qe.rmSync)(ri.default.join(e.paths.root,"yarn.lock"),{force:!0});break;case"npm":n(),await s();break;case"yarn":n(),await s();break}}var JT={detect:Sb,read:WT,create:YT,remove:VT,clean:KT,convertLock:ZT};W();var rn={name:"npm",lock:"package-lock.json"};async function Ab(t){let e=Yn.default.join(t.workspaceRoot,rn.lock),r=aa({workspaceRoot:t.workspaceRoot});return(0,Tt.existsSync)(e)||r===rn.name}async function XT(t){if(!await Ab(t))throw new je("Not an npm project",{type:"package_manager-unexpected"});let e=Ke(t),{name:r,description:i}=es(t),n=qh({workspaces:e.workspaces});return{name:r,description:i,packageManager:rn.name,paths:ua({root:t.workspaceRoot,lockFile:rn.lock}),workspaceData:{globs:n,workspaces:la({workspaceGlobs:n,...t})}}}async function QT(t){let{project:e,options:r,to:i,logger:n}=t,s=e.workspaceData.globs.length>0;n.mainStep(Or({packageManager:rn.name,action:"create",project:e}));let o=Ke({workspaceRoot:e.paths.root});n.rootHeader(),n.rootStep(`adding "packageManager" field to ${Yn.default.relative(e.paths.root,e.paths.packageJson)}`),o.packageManager=`${i.name}@${i.version}`,s?(n.rootStep(`adding "workspaces" field to ${Yn.default.relative(e.paths.root,e.paths.packageJson)}`),o.workspaces=e.workspaceData.globs,r!=null&&r.dry||(0,Tt.writeJSONSync)(e.paths.packageJson,o,{spaces:2}),xr({workspace:{name:"root",paths:e.paths},project:e,to:i,logger:n,options:r}),n.workspaceHeader(),e.workspaceData.workspaces.forEach(a=>{xr({workspace:a,project:e,to:i,logger:n,options:r})})):r!=null&&r.dry||(0,Tt.writeJSONSync)(e.paths.packageJson,o,{spaces:2})}async function eL(t){let{project:e,logger:r,options:i}=t,n=e.workspaceData.globs.length>0;r.mainStep(Or({packageManager:rn.name,action:"remove",project:e}));let s=Ke({workspaceRoot:e.paths.root});if(n&&(r.subStep(`removing "workspaces" field in ${e.name} root "package.json"`),delete s.workspaces),r.subStep(`removing "packageManager" field in ${e.name} root "package.json"`),delete s.packageManager,!(i!=null&&i.dry)){(0,Tt.writeJSONSync)(e.paths.packageJson,s,{spaces:2});let o=[e.paths.nodeModules,...e.workspaceData.workspaces.map(a=>a.paths.nodeModules)];try{r.subStep('removing "node_modules"'),await Promise.all(o.map(a=>(0,Tt.rm)(a,{recursive:!0,force:!0})))}catch{throw new je("Failed to remove node_modules",{type:"error_removing_node_modules"})}}}async function tL(t){let{project:e,logger:r,options:i}=t;r.subStep(`removing ${Yn.default.relative(e.paths.root,e.paths.lockfile)}`),i!=null&&i.dry||(0,Tt.rmSync)(e.paths.lockfile,{force:!0})}async function rL(t){let{project:e,options:r}=t;switch(e.packageManager){case"pnpm":tr({project:e,options:r});break;case"bun":tr({project:e,options:r});break;case"npm":break;case"yarn":tr({project:e,options:r});break}}var iL={detect:Ab,read:XT,create:QT,remove:eL,clean:tL,convertLock:rL};W();var ii={name:"yarn",lock:"yarn.lock"};async function vb(t){let e=nn.default.join(t.workspaceRoot,ii.lock),r=aa({workspaceRoot:t.workspaceRoot});return(0,Lt.existsSync)(e)||r===ii.name}async function nL(t){if(!await vb(t))throw new je("Not a yarn project",{type:"package_manager-unexpected"});let e=Ke(t),{name:r,description:i}=es(t),n=qh({workspaces:e.workspaces});return{name:r,description:i,packageManager:ii.name,paths:ua({root:t.workspaceRoot,lockFile:ii.lock}),workspaceData:{globs:n,workspaces:la({workspaceGlobs:n,...t})}}}async function sL(t){let{project:e,to:r,logger:i,options:n}=t,s=e.workspaceData.globs.length>0;i.mainStep(Or({packageManager:ii.name,action:"create",project:e}));let o=Ke({workspaceRoot:e.paths.root});i.rootHeader(),i.rootStep(`adding "packageManager" field to ${nn.default.relative(e.paths.root,e.paths.packageJson)}`),o.packageManager=`${r.name}@${r.version}`,s?(i.rootStep(`adding "workspaces" field to ${nn.default.relative(e.paths.root,e.paths.packageJson)}`),o.workspaces=e.workspaceData.globs,n!=null&&n.dry||(0,Lt.writeJSONSync)(e.paths.packageJson,o,{spaces:2}),xr({workspace:{name:"root",paths:e.paths},project:e,to:r,logger:i,options:n}),i.workspaceHeader(),e.workspaceData.workspaces.forEach(a=>{xr({workspace:a,project:e,to:r,logger:i,options:n})})):n!=null&&n.dry||(0,Lt.writeJSONSync)(e.paths.packageJson,o,{spaces:2})}async function oL(t){let{project:e,logger:r,options:i}=t,n=e.workspaceData.globs.length>0;r.mainStep(Or({packageManager:ii.name,action:"remove",project:e}));let s=Ke({workspaceRoot:e.paths.root});if(n&&(r.subStep(`removing "workspaces" field in ${e.name} root "package.json"`),delete s.workspaces),r.subStep(`removing "packageManager" field in ${e.name} root "package.json"`),delete s.packageManager,!(i!=null&&i.dry)){(0,Lt.writeJSONSync)(e.paths.packageJson,s,{spaces:2});let o=[e.paths.nodeModules,...e.workspaceData.workspaces.map(a=>a.paths.nodeModules)];try{r.subStep('removing "node_modules"'),await Promise.all(o.map(a=>(0,Lt.rm)(a,{recursive:!0,force:!0})))}catch{throw new je("Failed to remove node_modules",{type:"error_removing_node_modules"})}}}async function aL(t){let{project:e,logger:r,options:i}=t;r.subStep(`removing ${nn.default.relative(e.paths.root,e.paths.lockfile)}`),i!=null&&i.dry||(0,Lt.rmSync)(e.paths.lockfile,{force:!0})}async function uL(t){let{project:e,options:r,logger:i}=t,n=()=>{i.subStep(`converting ${nn.default.relative(e.paths.root,e.paths.lockfile)} to ${ii.lock}`)};switch(e.packageManager){case"pnpm":tr({project:e,options:r});break;case"bun":n(),await wb({project:e,options:r});break;case"npm":tr({project:e,options:r});break;case"yarn":break}}var lL={detect:vb,read:nL,create:sL,remove:oL,clean:aL,convertLock:uL};W();var sn={name:"bun",lock:"bun.lockb"};async function Cb(t){let e=Vn.default.join(t.workspaceRoot,sn.lock),r=aa({workspaceRoot:t.workspaceRoot});return(0,Bt.existsSync)(e)||r===sn.name}async function cL(t){if(!await Cb(t))throw new je("Not a bun project",{type:"package_manager-unexpected"});let e=Ke(t),{name:r,description:i}=es(t),n=qh({workspaces:e.workspaces});return{name:r,description:i,packageManager:sn.name,paths:ua({root:t.workspaceRoot,lockFile:sn.lock}),workspaceData:{globs:n,workspaces:la({workspaceGlobs:n,...t})}}}async function hL(t){let{project:e,to:r,logger:i,options:n}=t,s=e.workspaceData.globs.length>0;if(!GT({project:e}))throw new je("Unable to convert project to bun - workspace globs unsupported",{type:"bun-workspace_glob_error"});i.mainStep(Or({packageManager:sn.name,action:"create",project:e}));let o=Ke({workspaceRoot:e.paths.root});i.rootHeader(),i.rootStep(`adding "packageManager" field to ${Vn.default.relative(e.paths.root,e.paths.packageJson)}`),o.packageManager=`${r.name}@${r.version}`,s?(i.rootStep(`adding "workspaces" field to ${Vn.default.relative(e.paths.root,e.paths.packageJson)}`),o.workspaces=e.workspaceData.globs,n!=null&&n.dry||(0,Bt.writeJSONSync)(e.paths.packageJson,o,{spaces:2}),xr({workspace:{name:"root",paths:e.paths},project:e,to:r,logger:i,options:n}),i.workspaceHeader(),e.workspaceData.workspaces.forEach(a=>{xr({workspace:a,project:e,to:r,logger:i,options:n})})):n!=null&&n.dry||(0,Bt.writeJSONSync)(e.paths.packageJson,o,{spaces:2})}async function fL(t){let{project:e,logger:r,options:i}=t,n=e.workspaceData.globs.length>0;r.mainStep(Or({packageManager:sn.name,action:"remove",project:e}));let s=Ke({workspaceRoot:e.paths.root});if(n&&(r.subStep(`removing "workspaces" field in ${e.name} root "package.json"`),delete s.workspaces),r.subStep(`removing "packageManager" field in ${e.name} root "package.json"`),delete s.packageManager,!(i!=null&&i.dry)){(0,Bt.writeJSONSync)(e.paths.packageJson,s,{spaces:2});let o=[e.paths.nodeModules,...e.workspaceData.workspaces.map(a=>a.paths.nodeModules)];try{r.subStep('removing "node_modules"'),await Promise.all(o.map(a=>(0,Bt.rm)(a,{recursive:!0,force:!0})))}catch{throw new je("Failed to remove node_modules",{type:"error_removing_node_modules"})}}}async function pL(t){let{project:e,logger:r,options:i}=t;r.subStep(`removing ${Vn.default.relative(e.paths.root,e.paths.lockfile)}`),i!=null&&i.dry||(0,Bt.rmSync)(e.paths.lockfile,{force:!0})}async function dL(t){let{project:e,options:r}=t;switch(e.packageManager){case"pnpm":tr({project:e,options:r});break;case"bun":break;case"npm":tr({project:e,options:r});break;case"yarn":tr({project:e,options:r});break}}var mL={detect:Cb,read:cL,create:hL,remove:fL,clean:pL,convertLock:dL},xb={pnpm:JT,yarn:lL,npm:iL,bun:mL};W();async function ts({root:t}){let{exists:e,absolute:r}=UT({directory:t});if(!e)throw new je(`Could not find directory at ${r}. Ensure the directory exists.`,{type:"invalid_directory"});for(let{detect:i,read:n}of Object.values(xb))if(await i({workspaceRoot:r}))return n({workspaceRoot:r});throw new je("Could not determine package manager. Add `packageManager` to `package.json` or ensure a lockfile is present.",{type:"package_manager-unable_to_detect"})}W();W();W();W();var Uh=J(require("chalk")),Rb=J(require("is-git-clean"));function ca({directory:t,force:e}){var n;let r=!1,i="Unable to determine if git directory is clean";try{r=Rb.default.sync(t||process.cwd()),i="Git directory is not clean"}catch(s){(n=s.stderr)!=null&&n.includes("not a git repository")&&(r=!0)}r||(e?ne.log(`${Uh.default.yellow("WARNING")}: ${i}. Forcibly continuing...`):(ne.log("Thank you for using @turbo/codemod!"),ne.log(Uh.default.yellow(`
45
45
  But before we continue, please stash or commit your git changes.`)),ne.log(`
46
- You may use the --force flag to override this safety check.`),process.exit(1)))}var Gh=J(require("path")),Rb=J(require("fs"));function sn({directory:t}){let e=Gh.default.isAbsolute(t)?t:Gh.default.join(process.cwd(),t);return{exists:Rb.default.existsSync(e),absolute:e}}var ma=J(require("chalk"));var mt=J(require("chalk")),ha=class{constructor(e){this.transform=e.transformer,this.dry=e.dry}_log(...e){console.log(...e)}modified(...e){this._log(mt.default.green(" MODIFIED "),...e,this.dry?mt.default.dim("(dry run)"):"")}unchanged(...e){this._log(mt.default.gray(" UNCHANGED "),...e,this.dry?mt.default.dim("(dry run)"):"")}skipped(...e){this._log(mt.default.yellow(" SKIPPED "),...e,this.dry?mt.default.dim("(dry run)"):"")}error(...e){this._log(mt.default.red(" ERROR "),...e,this.dry?mt.default.dim("(dry run)"):"")}info(...e){this._log(mt.default.bold(" INFO "),...e,this.dry?mt.default.dim("(dry run)"):"")}};var Fb=J(require("os")),zh=J(require("path"));var fa=J(require("chalk")),da=require("diff"),Rr=require("fs-extra"),pa=class{constructor(e){this.changes=[];if(this.filePath=e.filePath,this.rootPath=e.rootPath,this.after=e.after,this.error=e.error,e.before===void 0)try{zh.default.extname(e.filePath)===".json"?this.before=(0,Rr.readJsonSync)(e.filePath):this.before=(0,Rr.readFileSync)(e.filePath)}catch{this.before=""}else e.before===null?this.before="":this.before=e.before;e.after?typeof this.before=="object"||typeof e.after=="object"?this.changes=(0,da.diffJson)(this.before,e.after):this.changes=(0,da.diffLines)(this.before,e.after):this.changes=[]}fileName(){return zh.default.relative(this.rootPath,this.filePath)}write(){this.after&&(typeof this.after=="object"?(0,Rr.writeJsonSync)(this.filePath,this.after,{spaces:2}):(0,Rr.writeFileSync)(this.filePath,this.after))}additions(){return this.changes.filter(e=>e.added).length}deletions(){return this.changes.filter(e=>e.removed).length}hasChanges(){return this.additions()>0||this.deletions()>0}log(e){e.diff?(this.changes.forEach(r=>{r.added?process.stdout.write(fa.default.green(r.value)):r.removed?process.stdout.write(fa.default.red(r.value)):process.stdout.write(fa.default.dim(r.value))}),ne.log(Fb.default.EOL)):ne.log(this.after)}};var ti=class{constructor(e){this.modifications={};this.transform=e.transformer,this.rootPath=e.rootPath,this.dry=e.dry,this.print=e.print,this.logger=new ha(e)}abortTransform(e){return this.logger.error(e.reason),{fatalError:new Error(e.reason),changes:e.changes||{}}}modifyFile(e){this.modifications[e.filePath]=new pa({rootPath:this.rootPath,...e})}finish(){let e={changes:{}};return Object.keys(this.modifications).forEach(i=>{let n=this.modifications[i],s={action:"unchanged",additions:n.additions(),deletions:n.deletions()};if(n.hasChanges()){if(this.dry)s.action="skipped",this.logger.skipped(ma.default.dim(n.fileName()));else try{n.write(),s.action="modified",this.logger.modified(ma.default.bold(n.fileName()))}catch(o){let a="Unknown error";o instanceof Error&&(a=o.message),s.error=new Error(a),s.action="error",this.logger.error(n.fileName(),a)}this.print&&n.log({diff:!0})}else this.logger.unchanged(ma.default.dim(n.fileName()));e.changes[n.fileName()]=s}),Object.keys(e.changes).some(i=>e.changes[i].action==="error")?this.abortTransform({reason:"Encountered an error while transforming files",changes:e.changes}):e}static logResults(e){let r=Object.keys(e.changes);if(ne.log(),r.length>0){ne.bold("Results:");let i={};r.forEach(n=>{var o;let s=e.changes[n];i[n]={action:s.action,additions:s.additions,deletions:s.deletions,error:((o=s.error)==null?void 0:o.message)||"None"}}),console.table(i),ne.log()}}};var Ob=J(require("path")),kb=require("fs-extra"),EL=["package.json","turbo.json",".git"];function Tb({directory:t}){return EL.some(e=>(0,kb.existsSync)(Ob.default.join(t,e)))}var Lb=require("child_process");function gt(t,e,r){try{return(0,Lb.execSync)(t,{stdio:"pipe",...e}).toString("utf8").trim()}catch{return r||void 0}}function Bb(t,e){let{from:r}=e;if(r)return r;let i=gt("turbo --version",{cwd:t.paths.root});if(i)return i;let{packageManager:n}=t;return n==="yarn"?gt("yarn turbo --version",{cwd:t.paths.root}):n==="pnpm"?gt("pnpm turbo --version",{cwd:t.paths.root}):gt("npm exec -c 'turbo --version'",{cwd:t.paths.root})}var Pb=J(require("axios")),DL="https://registry.npmjs.org";async function bL({packageName:t}){try{return(await Pb.default.get(`${DL}/${t}`)).data}catch{throw new Error(`Unable to fetch the latest version of ${t}`)}}async function Ib({to:t}){let e=await bL({packageName:"turbo"}),{"dist-tags":r,versions:i}=e;if(t){if(r[t]||t in i)return t;throw new Error(`turbo@${t} does not exist`)}return r.latest}var ri=require("semver");var ga=J(require("path")),Mb=J(require("fs-extra")),Nb=process.env.NODE_ENV==="test"?ga.default.join(__dirname,"../transforms"):ga.default.join(__dirname,"./transforms");function ya(){return Mb.default.readdirSync(Nb).map(e=>{let r=ga.default.join(Nb,e);try{return require(r).default}catch{return}}).filter(Boolean)}function jb({fromVersion:t,toVersion:e}){let r=ya().filter(i=>(0,ri.gt)(i.introducedIn,t)&&(0,ri.lte)(i.introducedIn,e));return r.sort((i,n)=>(0,ri.gt)(i.introducedIn,n.introducedIn)?1:(0,ri.eq)(i.introducedIn,n.introducedIn)?0:-1),r}var $b=J(require("path")),Ea=require("fs-extra"),Hb=require("semver");function _L(t,e="latest"){switch(t){case"yarn":return`yarn global add turbo@${e}`;case"npm":return`npm install turbo@${e} --global`;case"pnpm":return`pnpm add turbo@${e} --global`;case"bun":return`bun add turbo@${e} --global`}}function wL({packageManager:t,packageManagerVersion:e,installType:r,isUsingWorkspaces:i,to:n="latest"}){let s=o=>o.filter(Boolean).join(" ");switch(t){case"yarn":return(0,Hb.gte)(e,"2.0.0")?s(["yarn","add",`turbo@${n}`,r==="devDependencies"&&"--dev"]):s(["yarn","add",`turbo@${n}`,r==="devDependencies"&&"--dev",i&&"-W"]);case"npm":return s(["npm","install",`turbo@${n}`,r==="devDependencies"&&"--save-dev"]);case"pnpm":return s(["pnpm","add",`turbo@${n}`,r==="devDependencies"&&"--save-dev",i&&"-w"]);case"bun":return s(["bun","add",`turbo@${n}`,r==="devDependencies"&&"--dev"])}}function SL({root:t}){let e=$b.default.join(t,"package.json");if(!(0,Ea.existsSync)(e)){ne.error(`Unable to find package.json at ${e}`);return}let r=(0,Ea.readJsonSync)(e),i=r.devDependencies&&"turbo"in r.devDependencies,n=r.dependencies&&"turbo"in r.dependencies;if(n||i)return n?"dependencies":"devDependencies"}async function qb({project:t,to:e}){let r=gt("turbo bin",{cwd:t.paths.root,stdio:"pipe"}),i=await zl(),n=Object.keys(i).find(c=>{let f=i[c];return f&&r?r.includes(f):!1});if(r&&n)return _L(n,e);let{packageManager:s}=t,o=t.workspaceData.globs.length>0,a=SL({root:t.paths.root}),l=(await Gl())[s];if(l&&a)return wL({packageManager:s,packageManagerVersion:l,installType:a,isUsingWorkspaces:o,to:e})}function Ub({project:t}){try{let e={cwd:t.paths.root,stdio:"ignore"};if(gt("turbo bin",e))gt("turbo daemon stop",e);else{let i=`${t.packageManager} turbo daemon stop`;t.packageManager==="npm"&&(i="npm exec -c 'turbo daemon stop'"),gt(i,e)}}catch{}}function yt({message:t,success:e}){return e?(ne.bold($e.default.green("Migration completed")),t&&ne.log(t),process.exit(0)):(ne.bold($e.default.red("Migration failed")),t&&ne.log(t),process.exit(1))}async function Wh(t,e){e.dry||ca({directory:t,force:e.force});let r=await(0,zb.prompt)([{type:"input",name:"directoryInput",message:"Where is the root of the repo to migrate?",when:!t,default:".",validate:p=>{let{exists:d,absolute:m}=sn({directory:p});return d?!0:`Directory ${$e.default.dim(`(${m})`)} does not exist`},filter:p=>p.trim()}]),{directoryInput:i=t}=r,{exists:n,absolute:s}=sn({directory:i});if(!n)return yt({success:!1,message:`Directory ${$e.default.dim(`(${s})`)} does not exist`});if(!Tb({directory:s}))return yt({success:!1,message:`Directory (${$e.default.dim(s)}) does not appear to be a repository`});let o;try{o=await ts({root:s})}catch{return yt({success:!1,message:`Unable to read determine package manager details from ${$e.default.dim(s)}`})}let a=Bb(o,e);if(!a)return yt({success:!1,message:`Unable to infer the version of turbo being used by ${o.name}`});let u=e.to;try{u=await Ib(e)}catch(p){let d="UNKNOWN_ERROR";return p instanceof Error&&(d=p.message),yt({success:!1,message:d})}if(!u)return yt({success:!1,message:"Unable to fetch the latest version of turbo"});if(a===u)return yt({success:!0,message:`Nothing to do, current version (${$e.default.bold(a)}) is the same as the requested version (${$e.default.bold(u)})`});let l=jb({fromVersion:a,toVersion:u});l.length===0&&ne.log(`No codemods required to migrate from ${a} to ${u}`,on.default.EOL),e.dry||Ub({project:o}),ne.log(`Upgrading turbo from ${$e.default.bold(a)} to ${$e.default.bold(u)} (${l.length===0?"no codemods required":`${l.length} required codemod${l.length===1?"":"s"}`})`,on.default.EOL);let c=[];for(let[p,d]of l.entries()){ne.log(`(${p+1}/${l.length}) ${$e.default.bold(`Running ${d.name}`)}`);let m=await d.transformer({root:o.paths.root,options:e});ti.logResults(m),c.push(m)}if(c.some(p=>p.fatalError||Object.keys(p.changes).some(d=>p.changes[d].error)))return yt({success:!1,message:"Could not complete migration due to codemod errors. Please fix the errors and try again."});let h=await qb({project:o,to:e.to});if(!h)return yt({success:!1,message:"Unable to determine upgrade command"});if(e.install)if(e.dry)ne.log(`Upgrading turbo with ${$e.default.bold(h)} ${$e.default.dim("(dry run)")}`,on.default.EOL);else{ne.log(`Upgrading turbo with ${$e.default.bold(h)}`,on.default.EOL);try{(0,Gb.execSync)(h,{stdio:"pipe",cwd:o.paths.root})}catch(p){return yt({success:!1,message:`Unable to upgrade turbo: ${String(p)}`})}}else ne.log(`Upgrade turbo with ${$e.default.bold(h)}`,on.default.EOL);yt({success:!0})}var Fr=J(require("chalk")),Wb=require("inquirer");async function Yh(t,e,r){let i=ya();if(r.list)return ne.log(i.map(h=>`- ${Fr.default.cyan(h.name)}`).join(`
47
- `)),process.exit(0);r.dry||ca({directory:e,force:r.force});let n=await(0,Wb.prompt)([{type:"input",name:"directoryInput",message:"Where is the root of the repo where the transform should run?",when:!e,default:".",validate:h=>{let{exists:p,absolute:d}=sn({directory:h});return p?!0:`Directory ${Fr.default.dim(`(${d})`)} does not exist`},filter:h=>h.trim()},{type:"list",name:"transformerInput",message:"Which transform would you like to apply?",when:!t,pageSize:i.length,choices:i.map(h=>({name:`${Fr.default.bold(h.name)} - ${Fr.default.gray(h.description)} ${Fr.default.gray(`(${h.introducedIn})`)}`,value:h.name}))}]),{directoryInput:s=e,transformerInput:o=t}=n,{exists:a,absolute:u}=sn({directory:s});if(!a)return ne.error(`Directory ${Fr.default.dim(`(${u})`)} does not exist`),process.exit(1);let l=i.map(h=>h.name),c=i.find(h=>h.name===o);if(!c)return ne.error(`Invalid transform choice ${Fr.default.dim(`(${t})`)}, pick one of:`),ne.error(l.map(h=>`- ${h}`).join(`
48
- `)),process.exit(1);let f=await c.transformer({root:u,options:r});if(f.fatalError)return process.exit(1);ti.logResults(f)}var Vh=J(require("chalk")),Yb=J(require("update-check"));var AL=(0,Yb.default)(ia).catch(()=>null);async function Kh(){try{let t=await AL;if(t!=null&&t.latest){let{packageManager:e}=await ts({root:process.cwd()}),r="npm i -g @turbo/codemod";e==="yarn"?r="yarn global add @turbo/codemod":e==="pnpm"&&(r="pnpm i -g @turbo/codemod"),ne.log(),ne.log(Vh.default.yellow.bold("A new version of `@turbo/codemod` is available!")),ne.log(`You can update by running: ${Vh.default.cyan(r)}`),ne.log()}process.exit()}catch{}}var Da=new Kb.Command;Da.name("@turbo/codemod").description("Codemod transformations to help upgrade your Turborepo codebase when a feature is deprecated.").version(ia.version,"-v, --version","output the current version");Da.command("migrate").aliases(["update","upgrade"]).description("Migrate a project to the latest version of Turborepo").argument("[path]","Directory where the transforms should be applied").option("--from <version>","Specify the version to migrate from (default: current version)").option("--to <version>","Specify the version to migrate to (default: latest)").option("--install","Install new version of turbo after migration",!0).option("--force","Bypass Git safety checks and forcibly run codemods",!1).option("--dry","Dry run (no changes are made to files)",!1).option("--print","Print transformed files to your terminal",!1).action(Wh);Da.command("transform",{isDefault:!0}).description("Apply a single code transformation to a project").argument("[transform]","The transformer to run").argument("[path]","Directory where the transforms should be applied").option("--force","Bypass Git safety checks and forcibly run codemods",!1).option("--list","List all available transforms",!1).option("--dry","Dry run (no changes are made to files)",!1).option("--print","Print transformed files to your terminal",!1).action(Yh);Da.parseAsync().then(Kh).catch(async t=>{ne.log(),ne.log(Vb.default.red("Unexpected error. Please report it as a bug:")),ne.log(t),ne.log(),await Kh(),process.exit(1)});
46
+ You may use the --force flag to override this safety check.`),process.exit(1)))}var Gh=J(require("path")),Fb=J(require("fs"));function on({directory:t}){let e=Gh.default.isAbsolute(t)?t:Gh.default.join(process.cwd(),t);return{exists:Fb.default.existsSync(e),absolute:e}}var ma=J(require("chalk"));var mt=J(require("chalk")),ha=class{constructor(e){this.transform=e.transformer,this.dry=e.dry}_log(...e){console.log(...e)}modified(...e){this._log(mt.default.green(" MODIFIED "),...e,this.dry?mt.default.dim("(dry run)"):"")}unchanged(...e){this._log(mt.default.gray(" UNCHANGED "),...e,this.dry?mt.default.dim("(dry run)"):"")}skipped(...e){this._log(mt.default.yellow(" SKIPPED "),...e,this.dry?mt.default.dim("(dry run)"):"")}error(...e){this._log(mt.default.red(" ERROR "),...e,this.dry?mt.default.dim("(dry run)"):"")}info(...e){this._log(mt.default.bold(" INFO "),...e,this.dry?mt.default.dim("(dry run)"):"")}};var Ob=J(require("os")),zh=J(require("path"));var fa=J(require("chalk")),da=require("diff"),kr=require("fs-extra"),pa=class{constructor(e){this.changes=[];if(this.filePath=e.filePath,this.rootPath=e.rootPath,this.after=e.after,this.error=e.error,e.before===void 0)try{zh.default.extname(e.filePath)===".json"?this.before=(0,kr.readJsonSync)(e.filePath):this.before=(0,kr.readFileSync)(e.filePath)}catch{this.before=""}else e.before===null?this.before="":this.before=e.before;e.after?typeof this.before=="object"||typeof e.after=="object"?this.changes=(0,da.diffJson)(this.before,e.after):this.changes=(0,da.diffLines)(this.before,e.after):this.changes=[]}fileName(){return zh.default.relative(this.rootPath,this.filePath)}write(){this.after&&(typeof this.after=="object"?(0,kr.writeJsonSync)(this.filePath,this.after,{spaces:2}):(0,kr.writeFileSync)(this.filePath,this.after))}additions(){return this.changes.filter(e=>e.added).length}deletions(){return this.changes.filter(e=>e.removed).length}hasChanges(){return this.additions()>0||this.deletions()>0}log(e){e.diff?(this.changes.forEach(r=>{r.added?process.stdout.write(fa.default.green(r.value)):r.removed?process.stdout.write(fa.default.red(r.value)):process.stdout.write(fa.default.dim(r.value))}),ne.log(Ob.default.EOL)):ne.log(this.after)}};var si=class{constructor(e){this.modifications={};this.transform=e.transformer,this.rootPath=e.rootPath,this.dry=e.dry,this.print=e.print,this.logger=new ha(e)}abortTransform(e){return this.logger.error(e.reason),{fatalError:new Error(e.reason),changes:e.changes||{}}}modifyFile(e){this.modifications[e.filePath]=new pa({rootPath:this.rootPath,...e})}finish(){let e={changes:{}};return Object.keys(this.modifications).forEach(i=>{let n=this.modifications[i],s={action:"unchanged",additions:n.additions(),deletions:n.deletions()};if(n.hasChanges()){if(this.dry)s.action="skipped",this.logger.skipped(ma.default.dim(n.fileName()));else try{n.write(),s.action="modified",this.logger.modified(ma.default.bold(n.fileName()))}catch(o){let a="Unknown error";o instanceof Error&&(a=o.message),s.error=new Error(a),s.action="error",this.logger.error(n.fileName(),a)}this.print&&n.log({diff:!0})}else this.logger.unchanged(ma.default.dim(n.fileName()));e.changes[n.fileName()]=s}),Object.keys(e.changes).some(i=>e.changes[i].action==="error")?this.abortTransform({reason:"Encountered an error while transforming files",changes:e.changes}):e}static logResults(e){let r=Object.keys(e.changes);if(ne.log(),r.length>0){ne.bold("Results:");let i={};r.forEach(n=>{var o;let s=e.changes[n];i[n]={action:s.action,additions:s.additions,deletions:s.deletions,error:((o=s.error)==null?void 0:o.message)||"None"}}),console.table(i),ne.log()}}};var kb=J(require("path")),Tb=require("fs-extra"),wL=["package.json","turbo.json",".git"];function Lb({directory:t}){return wL.some(e=>(0,Tb.existsSync)(kb.default.join(t,e)))}var Bb=require("child_process");function gt(t,e,r){try{return(0,Bb.execSync)(t,{stdio:"pipe",...e}).toString("utf8").trim()}catch{return r||void 0}}function Pb(t,e){let{from:r}=e;if(r)return r;let i=gt("turbo --version",{cwd:t.paths.root});if(i)return i;let{packageManager:n}=t;return n==="yarn"?gt("yarn turbo --version",{cwd:t.paths.root}):n==="pnpm"?gt("pnpm turbo --version",{cwd:t.paths.root}):gt("npm exec -c 'turbo --version'",{cwd:t.paths.root})}var Ib=J(require("axios")),SL="https://registry.npmjs.org";async function AL({packageName:t}){try{return(await Ib.default.get(`${SL}/${t}`)).data}catch{throw new Error(`Unable to fetch the latest version of ${t}`)}}async function Nb({to:t}){let e=await AL({packageName:"turbo"}),{"dist-tags":r,versions:i}=e;if(t){if(r[t]||t in i)return t;throw new Error(`turbo@${t} does not exist`)}return r.latest}var oi=require("semver");var ga=J(require("path")),jb=J(require("fs-extra")),Mb=process.env.NODE_ENV==="test"?ga.default.join(__dirname,"../transforms"):ga.default.join(__dirname,"./transforms");function ya(){return jb.default.readdirSync(Mb).map(e=>{let r=ga.default.join(Mb,e);try{return require(r).default}catch{return}}).filter(Boolean)}function $b({fromVersion:t,toVersion:e}){let r=ya().filter(i=>(0,oi.gt)(i.introducedIn,t)&&(0,oi.lte)(i.introducedIn,e));return r.sort((i,n)=>(0,oi.gt)(i.introducedIn,n.introducedIn)?1:(0,oi.eq)(i.introducedIn,n.introducedIn)?0:-1),r}var Hb=J(require("path")),Ea=require("fs-extra"),qb=require("semver");function vL(t,e="latest"){switch(t){case"yarn":return`yarn global add turbo@${e}`;case"npm":return`npm install turbo@${e} --global`;case"pnpm":return`pnpm add turbo@${e} --global`;case"bun":return`bun add turbo@${e} --global`}}function CL({packageManager:t,packageManagerVersion:e,installType:r,isUsingWorkspaces:i,to:n="latest"}){let s=o=>o.filter(Boolean).join(" ");switch(t){case"yarn":return(0,qb.gte)(e,"2.0.0")?s(["yarn","add",`turbo@${n}`,r==="devDependencies"&&"--dev"]):s(["yarn","add",`turbo@${n}`,r==="devDependencies"&&"--dev",i&&"-W"]);case"npm":return s(["npm","install",`turbo@${n}`,r==="devDependencies"&&"--save-dev"]);case"pnpm":return s(["pnpm","add",`turbo@${n}`,r==="devDependencies"&&"--save-dev",i&&"-w"]);case"bun":return s(["bun","add",`turbo@${n}`,r==="devDependencies"&&"--dev"])}}function xL({root:t}){let e=Hb.default.join(t,"package.json");if(!(0,Ea.existsSync)(e)){ne.error(`Unable to find package.json at ${e}`);return}let r=(0,Ea.readJsonSync)(e),i=r.devDependencies&&"turbo"in r.devDependencies,n=r.dependencies&&"turbo"in r.dependencies;if(n||i)return n?"dependencies":"devDependencies"}async function Ub({project:t,to:e}){let r=gt("turbo bin",{cwd:t.paths.root,stdio:"pipe"}),i=await zl(),n=Object.keys(i).find(c=>{let f=i[c];return f&&r?r.includes(f):!1});if(r&&n)return vL(n,e);let{packageManager:s}=t,o=t.workspaceData.globs.length>0,a=xL({root:t.paths.root}),l=(await Gl())[s];if(l&&a)return CL({packageManager:s,packageManagerVersion:l,installType:a,isUsingWorkspaces:o,to:e})}function Gb({project:t}){try{let e={cwd:t.paths.root,stdio:"ignore"};if(gt("turbo bin",e))gt("turbo daemon stop",e);else{let i=`${t.packageManager} turbo daemon stop`;t.packageManager==="npm"&&(i="npm exec -c 'turbo daemon stop'"),gt(i,e)}}catch{}}function yt({message:t,success:e}){return e?(ne.bold($e.default.green("Migration completed")),t&&ne.log(t),process.exit(0)):(ne.bold($e.default.red("Migration failed")),t&&ne.log(t),process.exit(1))}async function Wh(t,e){e.dry||ca({directory:t,force:e.force});let r=await(0,Wb.prompt)([{type:"input",name:"directoryInput",message:"Where is the root of the repo to migrate?",when:!t,default:".",validate:p=>{let{exists:g,absolute:y}=on({directory:p});return g?!0:`Directory ${$e.default.dim(`(${y})`)} does not exist`},filter:p=>p.trim()}]),{directoryInput:i=t}=r,{exists:n,absolute:s}=on({directory:i});if(!n)return yt({success:!1,message:`Directory ${$e.default.dim(`(${s})`)} does not exist`});if(!Lb({directory:s}))return yt({success:!1,message:`Directory (${$e.default.dim(s)}) does not appear to be a repository`});let o;try{o=await ts({root:s})}catch{return yt({success:!1,message:`Unable to read determine package manager details from ${$e.default.dim(s)}`})}let a=Pb(o,e);if(!a)return yt({success:!1,message:`Unable to infer the version of turbo being used by ${o.name}`});let u=e.to;try{u=await Nb(e)}catch(p){let g="UNKNOWN_ERROR";return p instanceof Error&&(g=p.message),yt({success:!1,message:g})}if(!u)return yt({success:!1,message:"Unable to fetch the latest version of turbo"});if(a===u)return yt({success:!0,message:`Nothing to do, current version (${$e.default.bold(a)}) is the same as the requested version (${$e.default.bold(u)})`});let l=$b({fromVersion:a,toVersion:u});l.length===0&&ne.log(`No codemods required to migrate from ${a} to ${u}`,an.default.EOL),e.dry||Gb({project:o}),ne.log(`Upgrading turbo from ${$e.default.bold(a)} to ${$e.default.bold(u)} (${l.length===0?"no codemods required":`${l.length} required codemod${l.length===1?"":"s"}`})`,an.default.EOL);let c=[];for(let[p,g]of l.entries()){ne.log(`(${p+1}/${l.length}) ${$e.default.bold(`Running ${g.name}`)}`);let y=await g.transformer({root:o.paths.root,options:e});si.logResults(y),c.push(y)}if(c.some(p=>p.fatalError||Object.keys(p.changes).some(g=>p.changes[g].error)))return yt({success:!1,message:"Could not complete migration due to codemod errors. Please fix the errors and try again."});let h=await Ub({project:o,to:e.to});if(!h)return yt({success:!1,message:"Unable to determine upgrade command"});if(e.install)if(e.dry)ne.log(`Upgrading turbo with ${$e.default.bold(h)} ${$e.default.dim("(dry run)")}`,an.default.EOL);else{ne.log(`Upgrading turbo with ${$e.default.bold(h)}`,an.default.EOL);try{(0,zb.execSync)(h,{stdio:"pipe",cwd:o.paths.root})}catch(p){return yt({success:!1,message:`Unable to upgrade turbo: ${String(p)}`})}}else ne.log(`Upgrade turbo with ${$e.default.bold(h)}`,an.default.EOL);yt({success:!0})}var Tr=J(require("chalk")),Yb=require("inquirer");async function Yh(t,e,r){let i=ya();if(r.list)return ne.log(i.map(h=>`- ${Tr.default.cyan(h.name)}`).join(`
47
+ `)),process.exit(0);r.dry||ca({directory:e,force:r.force});let n=await(0,Yb.prompt)([{type:"input",name:"directoryInput",message:"Where is the root of the repo where the transform should run?",when:!e,default:".",validate:h=>{let{exists:p,absolute:g}=on({directory:h});return p?!0:`Directory ${Tr.default.dim(`(${g})`)} does not exist`},filter:h=>h.trim()},{type:"list",name:"transformerInput",message:"Which transform would you like to apply?",when:!t,pageSize:i.length,choices:i.map(h=>({name:`${Tr.default.bold(h.name)} - ${Tr.default.gray(h.description)} ${Tr.default.gray(`(${h.introducedIn})`)}`,value:h.name}))}]),{directoryInput:s=e,transformerInput:o=t}=n,{exists:a,absolute:u}=on({directory:s});if(!a)return ne.error(`Directory ${Tr.default.dim(`(${u})`)} does not exist`),process.exit(1);let l=i.map(h=>h.name),c=i.find(h=>h.name===o);if(!c)return ne.error(`Invalid transform choice ${Tr.default.dim(`(${t})`)}, pick one of:`),ne.error(l.map(h=>`- ${h}`).join(`
48
+ `)),process.exit(1);let f=await c.transformer({root:u,options:r});if(f.fatalError)return process.exit(1);si.logResults(f)}var Vh=J(require("chalk")),Vb=J(require("update-check"));var RL=(0,Vb.default)(ia).catch(()=>null);async function Kh(){try{let t=await RL;if(t!=null&&t.latest){let{packageManager:e}=await ts({root:process.cwd()}),r="npm i -g @turbo/codemod";e==="yarn"?r="yarn global add @turbo/codemod":e==="pnpm"&&(r="pnpm i -g @turbo/codemod"),ne.log(),ne.log(Vh.default.yellow.bold("A new version of `@turbo/codemod` is available!")),ne.log(`You can update by running: ${Vh.default.cyan(r)}`),ne.log()}process.exit()}catch{}}var Da=new Zb.Command;Da.name("@turbo/codemod").description("Codemod transformations to help upgrade your Turborepo codebase when a feature is deprecated.").version(ia.version,"-v, --version","output the current version");Da.command("migrate").aliases(["update","upgrade"]).description("Migrate a project to the latest version of Turborepo").argument("[path]","Directory where the transforms should be applied").option("--from <version>","Specify the version to migrate from (default: current version)").option("--to <version>","Specify the version to migrate to (default: latest)").option("--install","Install new version of turbo after migration",!0).option("--force","Bypass Git safety checks and forcibly run codemods",!1).option("--dry","Dry run (no changes are made to files)",!1).option("--print","Print transformed files to your terminal",!1).action(Wh);Da.command("transform",{isDefault:!0}).description("Apply a single code transformation to a project").argument("[transform]","The transformer to run").argument("[path]","Directory where the transforms should be applied").option("--force","Bypass Git safety checks and forcibly run codemods",!1).option("--list","List all available transforms",!1).option("--dry","Dry run (no changes are made to files)",!1).option("--print","Print transformed files to your terminal",!1).action(Yh);Da.parseAsync().then(Kh).catch(async t=>{ne.log(),ne.log(Kb.default.red("Unexpected error. Please report it as a bug:")),ne.log(t),ne.log(),await Kh(),process.exit(1)});
49
49
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
50
50
  /*! Bundled license information:
51
51