@nice-move/cli 0.11.22 → 0.11.23

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/788.mjs ADDED
@@ -0,0 +1 @@
1
+ export const __webpack_id__=788;export const __webpack_ids__=[788];export const __webpack_modules__={303:(t,e,r)=>{const s=r(1811);t.exports=(t,e={})=>{const r=(t,n={})=>{const i=e.escapeInvalid&&s.isInvalidBrace(n),o=!0===t.invalid&&!0===e.escapeInvalid;let a="";if(t.value)return(i||o)&&s.isOpenOrClose(t)?"\\"+t.value:t.value;if(t.value)return t.value;if(t.nodes)for(const e of t.nodes)a+=r(e);return a};return r(t)}},433:(t,e,r)=>{var s=r(857),n=r(2775);t.exports=function(t){n("ps",["-A","-o","ppid,pid"],(function(e,r,n){if(e)return t(e);if(0!==n)return t(new Error("pidtree ps command exited with code "+n));try{r=r.split(s.EOL);for(var i=[],o=1;o<r.length;o++)r[o]=r[o].trim(),r[o]&&(r[o]=r[o].split(/\s+/),r[o][0]=parseInt(r[o][0],10),r[o][1]=parseInt(r[o][1],10),i.push(r[o]));t(null,i)}catch(e){t(e)}}))}},442:t=>{const e="win32"===process.platform;function r(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 s(t,s){return e&&1===t&&!s.file?r(s.original,"spawn"):null}t.exports={hookChildProcess:function(t,r){if(!e)return;const n=t.emit;t.emit=function(e,i){if("exit"===e){const e=s(i,r);if(e)return n.call(t,"error",e)}return n.apply(t,arguments)}},verifyENOENT:s,verifyENOENTSync:function(t,s){return e&&1===t&&!s.file?r(s.original,"spawnSync"):null},notFoundError:r}},600:(t,e,r)=>{const s=r(7257);t.exports=(t="")=>{const e=t.match(s);if(!e)return null;const[r,n]=e[0].replace(/#! ?/,"").split(" "),i=r.split("/").pop();return"env"===i?n:n?`${i} ${n}`:i}},709:(t,e,r)=>{t.exports=n,n.sync=function(t,e){return i(s.statSync(t),e)};var s=r(9896);function n(t,e,r){s.stat(t,(function(t,s){r(t,!t&&i(s,e))}))}function i(t,e){return t.isFile()&&function(t,e){var r=t.mode,s=t.uid,n=t.gid,i=void 0!==e.uid?e.uid:process.getuid&&process.getuid(),o=void 0!==e.gid?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8);return r&parseInt("001",8)||r&c&&n===o||r&a&&s===i||r&(a|c)&&0===i}(t,e)}},803:t=>{t.exports={MAX_LENGTH:1e4,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:"\n",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:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},1404:(t,e,r)=>{const{PassThrough:s}=r(2203);t.exports=function(){var t=[],e=new s({objectMode:!0});return e.setMaxListeners(0),e.add=r,e.isEmpty=function(){return 0==t.length},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 n(r){!(t=t.filter((function(t){return t!==r}))).length&&e.readable&&e.end()}}},1754:(t,e,r)=>{const s=r(857),n=r(4891),i=process.env;let o;function a(t){const e=function(t){if(!1===o)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!t.isTTY&&!0!==o)return 0;const e=o?1:0;if("win32"===process.platform){const t=s.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((t=>t in i))||"codeship"===i.CI_NAME?1:e;if("TEAMCITY_VERSION"in i)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION)?1:0;if("truecolor"===i.COLORTERM)return 3;if("TERM_PROGRAM"in i){const t=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:(i.TERM,e)}(t);return function(t){return 0!==t&&{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}(e)}n("no-color")||n("no-colors")||n("color=false")?o=!1:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(o=!0),"FORCE_COLOR"in i&&(o=0===i.FORCE_COLOR.length||0!==parseInt(i.FORCE_COLOR,10)),t.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},1811:(t,e)=>{e.isInteger=t=>"number"==typeof t?Number.isInteger(t):"string"==typeof t&&""!==t.trim()&&Number.isInteger(Number(t)),e.find=(t,e)=>t.nodes.find((t=>t.type===e)),e.exceedsLimit=(t,r,s=1,n)=>!1!==n&&!(!e.isInteger(t)||!e.isInteger(r))&&(Number(r)-Number(t))/Number(s)>=n,e.escapeNode=(t,e=0,r)=>{const s=t.nodes[e];s&&(r&&s.type===r||"open"===s.type||"close"===s.type)&&!0!==s.escaped&&(s.value="\\"+s.value,s.escaped=!0)},e.encloseBrace=t=>!("brace"!==t.type||t.commas>>0+t.ranges|0||(t.invalid=!0,0)),e.isInvalidBrace=t=>!("brace"!==t.type||!0!==t.invalid&&!t.dollar&&(t.commas>>0+t.ranges|0&&!0===t.open&&!0===t.close||(t.invalid=!0,0))),e.isOpenOrClose=t=>"open"===t.type||"close"===t.type||!0===t.open||!0===t.close,e.reduce=t=>t.reduce(((t,e)=>("text"===e.type&&t.push(e.value),"range"===e.type&&(e.type="text"),t)),[]),e.flatten=(...t)=>{const e=[],r=t=>{for(let s=0;s<t.length;s++){const n=t[s];Array.isArray(n)?r(n):void 0!==n&&e.push(n)}return e};return r(t),e}},1880:(t,e,r)=>{const s=r(9896),n=r(600);t.exports=function(t){const e=Buffer.alloc(150);let r;try{r=s.openSync(t,"r"),s.readSync(r,e,0,150,0),s.closeSync(r)}catch(t){}return n(e.toString())}},1905:(t,e,r)=>{const s="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,n=r(6928),i=s?";":":",o=r(9344),a=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),c=(t,e)=>{const r=e.colon||i,n=t.match(/\//)||s&&t.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],o=s?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",a=s?o.split(r):[""];return s&&-1!==t.indexOf(".")&&""!==a[0]&&a.unshift(""),{pathEnv:n,pathExt:a,pathExtExe:o}},l=(t,e,r)=>{"function"==typeof e&&(r=e,e={}),e||(e={});const{pathEnv:s,pathExt:i,pathExtExe:l}=c(t,e),u=[],p=r=>new Promise(((i,o)=>{if(r===s.length)return e.all&&u.length?i(u):o(a(t));const c=s[r],l=/^".*"$/.test(c)?c.slice(1,-1):c,p=n.join(l,t),h=!l&&/^\.[\\\/]/.test(t)?t.slice(0,2)+p:p;i(d(h,r,0))})),d=(t,r,s)=>new Promise(((n,a)=>{if(s===i.length)return n(p(r+1));const c=i[s];o(t+c,{pathExt:l},((i,o)=>{if(!i&&o){if(!e.all)return n(t+c);u.push(t+c)}return n(d(t,r,s+1))}))}));return r?p(0).then((t=>r(null,t)),r):p(0)};t.exports=l,l.sync=(t,e)=>{e=e||{};const{pathEnv:r,pathExt:s,pathExtExe:i}=c(t,e),l=[];for(let a=0;a<r.length;a++){const c=r[a],u=/^".*"$/.test(c)?c.slice(1,-1):c,p=n.join(u,t),d=!u&&/^\.[\\\/]/.test(t)?t.slice(0,2)+p:p;for(let t=0;t<s.length;t++){const r=d+s[t];try{if(o.sync(r,{pathExt:i})){if(!e.all)return r;l.push(r)}}catch(t){}}}if(e.all&&l.length)return l;if(e.nothrow)return null;throw a(t)}},2077:t=>{const e=/([()\][%!^"`<>&|;, *?])/g;t.exports.command=function(t){return t.replace(e,"^$1")},t.exports.argument=function(t,r){return t=(t=`"${t=(t=(t=`${t}`).replace(/(?=(\\+?)?)\1"/g,'$1$1\\"')).replace(/(?=(\\+?)?)\1$/,"$1$1")}"`).replace(e,"^$1"),r&&(t=t.replace(e,"^$1")),t}},2411:(t,e,r)=>{const s=r(9023),n=r(4710),i=t=>null!==t&&"object"==typeof t&&!Array.isArray(t),o=t=>"number"==typeof t||"string"==typeof t&&""!==t,a=t=>Number.isInteger(+t),c=t=>{let e=`${t}`,r=-1;if("-"===e[0]&&(e=e.slice(1)),"0"===e)return!1;for(;"0"===e[++r];);return r>0},l=(t,e,r)=>{if(e>0){let r="-"===t[0]?"-":"";r&&(t=t.slice(1)),t=r+t.padStart(r?e-1:e,"0")}return!1===r?String(t):t},u=(t,e)=>{let r="-"===t[0]?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},p=(t,e,r,s)=>{if(r)return n(t,e,{wrap:!1,...s});let i=String.fromCharCode(t);return t===e?i:`[${i}-${String.fromCharCode(e)}]`},d=(t,e,r)=>{if(Array.isArray(t)){let e=!0===r.wrap,s=r.capture?"":"?:";return e?`(${s}${t.join("|")})`:t.join("|")}return n(t,e,r)},h=(...t)=>new RangeError("Invalid range arguments: "+s.inspect(...t)),f=(t,e,r)=>{if(!0===r.strictRanges)throw h([t,e]);return[]},g=(t,e,r,s={})=>{if(null==e&&o(t))return[t];if(!o(t)||!o(e))return f(t,e,s);if("function"==typeof r)return g(t,e,1,{transform:r});if(i(r))return g(t,e,0,r);let n={...s};return!0===n.capture&&(n.wrap=!0),r=r||n.step||1,a(r)?a(t)&&a(e)?((t,e,r=1,s={})=>{let n=Number(t),i=Number(e);if(!Number.isInteger(n)||!Number.isInteger(i)){if(!0===s.strictRanges)throw h([t,e]);return[]}0===n&&(n=0),0===i&&(i=0);let o=n>i,a=String(t),f=String(e),g=String(r);r=Math.max(Math.abs(r),1);let m=c(a)||c(f)||c(g),y=m?Math.max(a.length,f.length,g.length):0,b=!1===m&&!1===((t,e,r)=>"string"==typeof t||"string"==typeof e||!0===r.stringify)(t,e,s),E=s.transform||(t=>e=>!0===t?Number(e):String(e))(b);if(s.toRegex&&1===r)return p(u(t,y),u(e,y),!0,s);let w={negatives:[],positives:[]},A=[],S=0;for(;o?n>=i:n<=i;)!0===s.toRegex&&r>1?w[(R=n)<0?"negatives":"positives"].push(Math.abs(R)):A.push(l(E(n,S),y,b)),n=o?n-r:n+r,S++;var R;return!0===s.toRegex?r>1?((t,e,r)=>{t.negatives.sort(((t,e)=>t<e?-1:t>e?1:0)),t.positives.sort(((t,e)=>t<e?-1:t>e?1:0));let s,n=e.capture?"":"?:",i="",o="";return t.positives.length&&(i=t.positives.map((t=>u(String(t),r))).join("|")),t.negatives.length&&(o=`-(${n}${t.negatives.map((t=>u(String(t),r))).join("|")})`),s=i&&o?`${i}|${o}`:i||o,e.wrap?`(${n}${s})`:s})(w,s,y):d(A,null,{wrap:!1,...s}):A})(t,e,r,n):((t,e,r=1,s={})=>{if(!a(t)&&t.length>1||!a(e)&&e.length>1)return f(t,e,s);let n=s.transform||(t=>String.fromCharCode(t)),i=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),c=i>o,l=Math.min(i,o),u=Math.max(i,o);if(s.toRegex&&1===r)return p(l,u,!1,s);let h=[],g=0;for(;c?i>=o:i<=o;)h.push(n(i,g)),i=c?i-r:i+r,g++;return!0===s.toRegex?d(h,null,{wrap:!1,options:s}):h})(t,e,Math.max(Math.abs(r),1),n):null==r||i(r)?g(t,e,1,r):((t,e)=>{if(!0===e.strictRanges)throw new TypeError(`Expected step "${t}" to be a number`);return[]})(r,n)};t.exports=g},2775:(t,e,r)=>{var s=r(5317).spawn;t.exports=function(t,e,r,n){"function"==typeof r&&(n=r,r=void 0);var i=!1,o=s(t,e,r),a="",c="";o.stdout.on("data",(function(t){a+=t.toString()})),o.stderr.on("data",(function(t){c+=t.toString()})),o.on("error",(function(t){i||(i=!0,n(new Error(t)))})),o.on("close",(function(t){if(!i){if(i=!0,c=function(t){if(t)return(t=(t=t.trim()).replace(/your \d+x\d+ screen size is bogus\. expect trouble/gi,"")).trim()}(c))return n(new Error(c));n(null,a,t)}}))}},3297:(t,e,r)=>{const s=r(6927),{CHAR_ASTERISK:n,CHAR_AT:i,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:l,CHAR_FORWARD_SLASH:u,CHAR_LEFT_CURLY_BRACE:p,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_PLUS:f,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:y,CHAR_RIGHT_SQUARE_BRACKET:b}=r(4751),E=t=>t===u||t===o,w=t=>{!0!==t.isPrefix&&(t.depth=t.isGlobstar?1/0:1)};t.exports=(t,e)=>{const r=e||{},A=t.length-1,S=!0===r.parts||!0===r.scanToEnd,R=[],C=[],v=[];let T,O,x=t,k=-1,_=0,L=0,P=!1,I=!1,$=!1,B=!1,H=!1,F=!1,D=!1,M=!1,N=!1,G=!1,U=0,j={value:"",depth:0,isGlob:!1};const K=()=>k>=A,W=()=>(T=O,x.charCodeAt(++k));for(;k<A;){let t;if(O=W(),O!==o){if(!0===F||O===p){for(U++;!0!==K()&&(O=W());)if(O!==o)if(O!==p){if(!0!==F&&O===c&&(O=W())===c){if(P=j.isBrace=!0,$=j.isGlob=!0,G=!0,!0===S)continue;break}if(!0!==F&&O===a){if(P=j.isBrace=!0,$=j.isGlob=!0,G=!0,!0===S)continue;break}if(O===m&&(U--,0===U)){F=!1,P=j.isBrace=!0,G=!0;break}}else U++;else D=j.backslashes=!0,W();if(!0===S)continue;break}if(O!==u){if(!0!==r.noext&&!0==(O===f||O===i||O===n||O===g||O===l)&&x.charCodeAt(k+1)===d){if($=j.isGlob=!0,B=j.isExtglob=!0,G=!0,O===l&&k===_&&(N=!0),!0===S){for(;!0!==K()&&(O=W());)if(O!==o){if(O===y){$=j.isGlob=!0,G=!0;break}}else D=j.backslashes=!0,O=W();continue}break}if(O===n){if(T===n&&(H=j.isGlobstar=!0),$=j.isGlob=!0,G=!0,!0===S)continue;break}if(O===g){if($=j.isGlob=!0,G=!0,!0===S)continue;break}if(O===h){for(;!0!==K()&&(t=W());)if(t!==o){if(t===b){I=j.isBracket=!0,$=j.isGlob=!0,G=!0;break}}else D=j.backslashes=!0,W();if(!0===S)continue;break}if(!0===r.nonegate||O!==l||k!==_){if(!0!==r.noparen&&O===d){if($=j.isGlob=!0,!0===S){for(;!0!==K()&&(O=W());)if(O!==d){if(O===y){G=!0;break}}else D=j.backslashes=!0,O=W();continue}break}if(!0===$){if(G=!0,!0===S)continue;break}}else M=j.negated=!0,_++}else{if(R.push(k),C.push(j),j={value:"",depth:0,isGlob:!1},!0===G)continue;if(T===c&&k===_+1){_+=2;continue}L=k+1}}else D=j.backslashes=!0,O=W(),O===p&&(F=!0)}!0===r.noext&&(B=!1,$=!1);let z=x,Y="",q="";_>0&&(Y=x.slice(0,_),x=x.slice(_),L-=_),z&&!0===$&&L>0?(z=x.slice(0,L),q=x.slice(L)):!0===$?(z="",q=x):z=x,z&&""!==z&&"/"!==z&&z!==x&&E(z.charCodeAt(z.length-1))&&(z=z.slice(0,-1)),!0===r.unescape&&(q&&(q=s.removeBackslashes(q)),z&&!0===D&&(z=s.removeBackslashes(z)));const V={prefix:Y,input:t,start:_,base:z,glob:q,isBrace:P,isBracket:I,isGlob:$,isExtglob:B,isGlobstar:H,negated:M,negatedExtglob:N};if(!0===r.tokens&&(V.maxDepth=0,E(O)||C.push(j),V.tokens=C),!0===r.parts||!0===r.tokens){let e;for(let s=0;s<R.length;s++){const n=e?e+1:_,i=R[s],o=t.slice(n,i);r.tokens&&(0===s&&0!==_?(C[s].isPrefix=!0,C[s].value=Y):C[s].value=o,w(C[s]),V.maxDepth+=C[s].depth),0===s&&""===o||v.push(o),e=i}if(e&&e+1<t.length){const s=t.slice(e+1);v.push(s),r.tokens&&(C[C.length-1].value=s,w(C[C.length-1]),V.maxDepth+=C[C.length-1].depth)}V.slashes=R,V.parts=v}return V}},3585:(t,e,r)=>{const s=r(303),{MAX_LENGTH:n,CHAR_BACKSLASH:i,CHAR_BACKTICK:o,CHAR_COMMA:a,CHAR_DOT:c,CHAR_LEFT_PARENTHESES:l,CHAR_RIGHT_PARENTHESES:u,CHAR_LEFT_CURLY_BRACE:p,CHAR_RIGHT_CURLY_BRACE:d,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_RIGHT_SQUARE_BRACKET:f,CHAR_DOUBLE_QUOTE:g,CHAR_SINGLE_QUOTE:m,CHAR_NO_BREAK_SPACE:y,CHAR_ZERO_WIDTH_NOBREAK_SPACE:b}=r(803);t.exports=(t,e={})=>{if("string"!=typeof t)throw new TypeError("Expected a string");const r=e||{},E="number"==typeof r.maxLength?Math.min(n,r.maxLength):n;if(t.length>E)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${E})`);const w={type:"root",input:t,nodes:[]},A=[w];let S=w,R=w,C=0;const v=t.length;let T,O=0,x=0;const k=()=>t[O++],_=t=>{if("text"===t.type&&"dot"===R.type&&(R.type="text"),!R||"text"!==R.type||"text"!==t.type)return S.nodes.push(t),t.parent=S,t.prev=R,R=t,t;R.value+=t.value};for(_({type:"bos"});O<v;)if(S=A[A.length-1],T=k(),T!==b&&T!==y)if(T!==i)if(T!==f)if(T!==h)if(T!==l)if(T!==u)if(T!==g&&T!==m&&T!==o)if(T!==p)if(T!==d)if(T===a&&x>0){if(S.ranges>0){S.ranges=0;const t=S.nodes.shift();S.nodes=[t,{type:"text",value:s(S)}]}_({type:"comma",value:T}),S.commas++}else if(T===c&&x>0&&0===S.commas){const t=S.nodes;if(0===x||0===t.length){_({type:"text",value:T});continue}if("dot"===R.type){if(S.range=[],R.value+=T,R.type="range",3!==S.nodes.length&&5!==S.nodes.length){S.invalid=!0,S.ranges=0,R.type="text";continue}S.ranges++,S.args=[];continue}if("range"===R.type){t.pop();const e=t[t.length-1];e.value+=R.value+T,R=e,S.ranges--;continue}_({type:"dot",value:T})}else _({type:"text",value:T});else{if("brace"!==S.type){_({type:"text",value:T});continue}const t="close";S=A.pop(),S.close=!0,_({type:t,value:T}),x--,S=A[A.length-1]}else{x++;const t=R.value&&"$"===R.value.slice(-1)||!0===S.dollar;S=_({type:"brace",open:!0,close:!1,dollar:t,depth:x,commas:0,ranges:0,nodes:[]}),A.push(S),_({type:"open",value:T})}else{const t=T;let r;for(!0!==e.keepQuotes&&(T="");O<v&&(r=k());)if(r!==i){if(r===t){!0===e.keepQuotes&&(T+=r);break}T+=r}else T+=r+k();_({type:"text",value:T})}else{if("paren"!==S.type){_({type:"text",value:T});continue}S=A.pop(),_({type:"text",value:T}),S=A[A.length-1]}else S=_({type:"paren",nodes:[]}),A.push(S),_({type:"text",value:T});else{let t;for(C++;O<v&&(t=k());)if(T+=t,t!==h)if(t!==i){if(t===f&&(C--,0===C))break}else T+=k();else C++;_({type:"text",value:T})}else _({type:"text",value:"\\"+T});else _({type:"text",value:(e.keepEscaping?T:"")+k()});do{if(S=A.pop(),"root"!==S.type){S.nodes.forEach((t=>{t.nodes||("open"===t.type&&(t.isOpen=!0),"close"===t.type&&(t.isClose=!0),t.nodes||(t.type="text"),t.invalid=!0)}));const t=A[A.length-1],e=t.nodes.indexOf(S);t.nodes.splice(e,1,...S.nodes)}}while(A.length>0);return _({type:"eos"}),w}},3637:(t,e,r)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?t.exports=r(4421):t.exports=r(9581)},3788:(t,e,r)=>{r.d(e,{default:()=>Dn});var s=r(3637),n=r(4573),i=r(6760),o=r(1421),a=r(1708),c=r(6507),l=r(3136),u=r(7235);const p=({env:t=a.env,...e}={})=>{t={...t};const r=(0,u.A)({env:t});return e.path=t[r],t[r]=(({cwd:t=a.cwd(),path:e=a.env[(0,u.A)()],preferLocal:r=!0,execPath:s=a.execPath,addExecPath:n=!0}={})=>{const o=t instanceof URL?(0,l.fileURLToPath)(t):t,c=i.resolve(o),p=[];return r&&((t,e)=>{let r;for(;r!==e;)t.push(i.join(e,"node_modules/.bin")),r=e,e=i.resolve(e,"..")})(p,c),n&&((t,e,r)=>{const s=e instanceof URL?(0,l.fileURLToPath)(e):e;t.push(i.resolve(r,s,".."))})(p,s,c),[...p,e].join(i.delimiter)})(e),t},d=(t,e,r,s)=>{if("length"===r||"prototype"===r)return;if("arguments"===r||"caller"===r)return;const n=Object.getOwnPropertyDescriptor(t,r),i=Object.getOwnPropertyDescriptor(e,r);!h(n,i)&&s||Object.defineProperty(t,r,i)},h=function(t,e){return void 0===t||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},f=(t,e)=>`/* Wrapped ${t}*/\n${e}`,g=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),m=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");const y=new WeakMap,b=(t,e={})=>{if("function"!=typeof t)throw new TypeError("Expected a function");let r,s=0;const n=t.displayName||t.name||"<anonymous>",i=function(...o){if(y.set(i,++s),1===s)r=t.apply(this,o),t=null;else if(!0===e.throw)throw new Error(`Function \`${n}\` can only be called once`);return r};return function(t,e,{ignoreNonConfigurable:r=!1}={}){const{name:s}=t;for(const s of Reflect.ownKeys(e))d(t,e,s,r);((t,e)=>{const r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)})(t,e),((t,e,r)=>{const s=""===r?"":`with ${r.trim()}() `,n=f.bind(null,s,e.toString());Object.defineProperty(n,"name",m),Object.defineProperty(t,"toString",{...g,value:n})})(t,e,s)}(i,t),y.set(i,s),i};b.callCount=t=>{if(!y.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return y.get(t)};const E=b;var w=r(8161);const A=(t,e)=>({name:`SIGRT${e+1}`,number:S+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),S=34,R=[{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"}],C=()=>{const t=(()=>{const t=64-S+1;return Array.from({length:t},A)})();return[...R,...t].map(v)},v=({name:t,number:e,description:r,action:s,forced:n=!1,standard:i})=>{const{signals:{[t]:o}}=w.constants,a=void 0!==o;return{name:t,number:a?o:e,description:r,supported:a,action:s,forced:n,standard:i}},T=({name:t,number:e,description:r,supported:s,action:n,forced:i,standard:o})=>[t,{name:t,number:e,description:r,supported:s,action:n,forced:i,standard:o}],O=(()=>{const t=C();return Object.fromEntries(t.map(T))})(),x=(t,e)=>{const r=e.find((({name:e})=>w.constants.signals[e]===t));return void 0!==r?r:e.find((e=>e.number===t))},k=((()=>{const t=C(),e=Array.from({length:65},((e,r)=>((t,e)=>{const r=x(t,e);if(void 0===r)return{};const{name:s,description:n,supported:i,action:o,forced:a,standard:c}=r;return{[t]:{name:s,number:t,description:n,supported:i,action:o,forced:a,standard:c}}})(r,t)));Object.assign({},...e)})(),({stdout:t,stderr:e,all:r,error:s,signal:n,exitCode:i,command:o,escapedCommand:c,timedOut:l,isCanceled:u,killed:p,parsed:{options:{timeout:d,cwd:h=a.cwd()}}})=>{i=null===i?void 0:i;const f=void 0===(n=null===n?void 0:n)?void 0:O[n].description,g=(({timedOut:t,timeout:e,errorCode:r,signal:s,signalDescription:n,exitCode:i,isCanceled:o})=>t?`timed out after ${e} milliseconds`:o?"was canceled":void 0!==r?`failed with ${r}`:void 0!==s?`was killed with ${s} (${n})`:void 0!==i?`failed with exit code ${i}`:"failed")({timedOut:l,timeout:d,errorCode:s&&s.code,signal:n,signalDescription:f,exitCode:i,isCanceled:u}),m=`Command ${g}: ${o}`,y="[object Error]"===Object.prototype.toString.call(s),b=y?`${m}\n${s.message}`:m,E=[b,e,t].filter(Boolean).join("\n");return y?(s.originalMessage=s.message,s.message=E):s=new Error(E),s.shortMessage=b,s.command=o,s.escapedCommand=c,s.exitCode=i,s.signal=n,s.signalDescription=f,s.stdout=t,s.stderr=e,s.cwd=h,void 0!==r&&(s.all=r),"bufferedData"in s&&delete s.bufferedData,s.failed=!0,s.timedOut=Boolean(l),s.isCanceled=u,s.killed=p&&!l,s}),_=["stdin","stdout","stderr"];var L=r(7017);const P=(t,e="SIGTERM",r={})=>{const s=t(e);return I(t,e,r,s),s},I=(t,e,r,s)=>{if(!$(e,r,s))return;const n=H(r),i=setTimeout((()=>{t("SIGKILL")}),n);i.unref&&i.unref()},$=(t,{forceKillAfterTimeout:e},r)=>B(t)&&!1!==e&&r,B=t=>t===w.constants.signals.SIGTERM||"string"==typeof t&&"SIGTERM"===t.toUpperCase(),H=({forceKillAfterTimeout:t=!0})=>{if(!0===t)return 5e3;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},F=(t,e)=>{t.kill()&&(e.isCanceled=!0)};var D=r(3024);function M(t){return null!==t&&"object"==typeof t&&"function"==typeof t.pipe}function N(t){return M(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState}const G=(t,e,r)=>{if("string"==typeof r)return t[e].pipe((0,D.createWriteStream)(r)),t;if(N(r))return t[e].pipe(r),t;if(!(t=>t instanceof o.ChildProcess&&"function"==typeof t.then)(r))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!N(r.stdin))throw new TypeError("The target child process's stdin must be available.");return t[e].pipe(r.stdin),r};var U=r(8500);const j=async(t,{init:e,convertChunk:r,getSize:s,truncateChunk:n,addChunk:i,getFinalChunk:o,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{if(!Y(t))throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");const l=e();l.length=0;try{for await(const e of t){const t=r[q(e)](e,l);W({convertedChunk:t,state:l,getSize:s,truncateChunk:n,addChunk:i,maxBuffer:c})}return K({state:l,convertChunk:r,getSize:s,truncateChunk:n,addChunk:i,getFinalChunk:o,maxBuffer:c}),a(l)}catch(t){throw t.bufferedData=a(l),t}},K=({state:t,getSize:e,truncateChunk:r,addChunk:s,getFinalChunk:n,maxBuffer:i})=>{const o=n(t);void 0!==o&&W({convertedChunk:o,state:t,getSize:e,truncateChunk:r,addChunk:s,maxBuffer:i})},W=({convertedChunk:t,state:e,getSize:r,truncateChunk:s,addChunk:n,maxBuffer:i})=>{const o=r(t),a=e.length+o;if(a<=i)return void z(t,e,n,a);const c=s(t,i-e.length);throw void 0!==c&&z(c,e,n,i),new X},z=(t,e,r,s)=>{e.contents=r(t,e,s),e.length=s},Y=t=>"object"==typeof t&&null!==t&&"function"==typeof t[Symbol.asyncIterator],q=t=>{const e=typeof t;if("string"===e)return"string";if("object"!==e||null===t)return"others";if(globalThis.Buffer?.isBuffer(t))return"buffer";const r=V.call(t);return"[object ArrayBuffer]"===r?"arrayBuffer":"[object DataView]"===r?"dataView":Number.isInteger(t.byteLength)&&Number.isInteger(t.byteOffset)&&"[object ArrayBuffer]"===V.call(t.buffer)?"typedArray":"others"},{toString:V}=Object.prototype;class X extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}const Q=t=>{throw new Error(`Streams in object mode are not supported: ${String(t)}`)},Z=t=>t.length,J=new TextEncoder,tt=t=>new Uint8Array(t),et=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength),rt=t=>st**Math.ceil(Math.log(t)/Math.log(st)),st=2,nt=()=>"resize"in ArrayBuffer.prototype,it={init:()=>({contents:new ArrayBuffer(0)}),convertChunk:{string:t=>J.encode(t),buffer:tt,arrayBuffer:tt,dataView:et,typedArray:et,others:Q},getSize:Z,truncateChunk:(t,e)=>t.slice(0,e),addChunk:(t,{contents:e,length:r},s)=>{const n=nt()?((t,e)=>{if(e<=t.maxByteLength)return t.resize(e),t;const r=new ArrayBuffer(e,{maxByteLength:rt(e)});return new Uint8Array(r).set(new Uint8Array(t),0),r})(e,s):((t,e)=>{if(e<=t.byteLength)return t;const r=new ArrayBuffer(rt(e));return new Uint8Array(r).set(new Uint8Array(t),0),r})(e,s);return new Uint8Array(n).set(t,r),n},getFinalChunk:()=>{},finalize:({contents:t,length:e})=>nt()?t:t.slice(0,e)};async function ot(t,e){if(!("Buffer"in globalThis))throw new Error("getStreamAsBuffer() is only supported in Node.js");try{return at(await async function(t,e){return j(t,it,e)}(t,e))}catch(t){throw void 0!==t.bufferedData&&(t.bufferedData=at(t.bufferedData)),t}}const at=t=>globalThis.Buffer.from(t),ct=(t,{textDecoder:e})=>e.decode(t,{stream:!0}),lt={init:()=>({contents:"",textDecoder:new TextDecoder}),convertChunk:{string:t=>t,buffer:ct,arrayBuffer:ct,dataView:ct,typedArray:ct,others:Q},getSize:Z,truncateChunk:(t,e)=>t.slice(0,e),addChunk:(t,{contents:e})=>e+t,getFinalChunk:({textDecoder:t})=>{const e=t.decode();return""===e?void 0:e},finalize:({contents:t})=>t};var ut=r(1404);const pt=t=>{if(void 0!==t)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},dt=async(t,e)=>{if(t&&void 0!==e){await(0,U.setTimeout)(0),t.destroy();try{return await e}catch(t){return t.bufferedData}}},ht=(t,{encoding:e,buffer:r,maxBuffer:s})=>{if(t&&r)return"utf8"===e||"utf-8"===e?async function(t,e){return j(t,lt,e)}(t,{maxBuffer:s}):null===e||"buffer"===e?ot(t,{maxBuffer:s}):ft(t,s,e)},ft=async(t,e,r)=>(await ot(t,{maxBuffer:e})).toString(r),gt=(async()=>{})().constructor.prototype,mt=["then","catch","finally"].map((t=>[t,Reflect.getOwnPropertyDescriptor(gt,t)])),yt=(t,e)=>{for(const[r,s]of mt){const n="function"==typeof e?(...t)=>Reflect.apply(s.value,e(),t):s.value.bind(e);Reflect.defineProperty(t,r,{...s,value:n})}},bt=(t,e=[])=>Array.isArray(e)?[t,...e]:[t],Et=/^[\w.-]+$/,wt=(t,e)=>bt(t,e).join(" "),At=(t,e)=>bt(t,e).map((t=>(t=>"string"!=typeof t||Et.test(t)?t:`"${t.replaceAll('"','\\"')}"`)(t))).join(" "),St=/ +/g,Rt=t=>{const e=typeof t;if("string"===e)return t;if("number"===e)return String(t);if("object"===e&&null!==t&&!(t instanceof o.ChildProcess)&&"stdout"in t){const e=typeof t.stdout;if("string"===e)return t.stdout;if(n.Buffer.isBuffer(t.stdout))return t.stdout.toString();throw new TypeError(`Unexpected "${e}" stdout in template expression`)}throw new TypeError(`Unexpected "${e}" in template expression`)},Ct=(t,e,r)=>r||0===t.length||0===e.length?[...t,...e]:[...t.slice(0,-1),`${t.at(-1)}${e[0]}`,...e.slice(1)],vt=({templates:t,expressions:e,tokens:r,index:s,template:n})=>{const i=n??t.raw[s],o=i.split(St).filter(Boolean),a=Ct(r,o,i.startsWith(" "));if(s===e.length)return a;const c=e[s],l=Array.isArray(c)?c.map((t=>Rt(t))):[Rt(c)];return Ct(a,l,i.endsWith(" "))},Tt=(t,e)=>{let r=[];for(const[s,n]of t.entries())r=vt({templates:t,expressions:e,tokens:r,index:s,template:n});return r};var Ot=r(7975);const xt=(0,Ot.debuglog)("execa").enabled,kt=(t,e)=>String(t).padStart(e,"0"),_t=(t,{verbose:e})=>{e&&a.stderr.write(`[${(()=>{const t=new Date;return`${kt(t.getHours(),2)}:${kt(t.getMinutes(),2)}:${kt(t.getSeconds(),2)}.${kt(t.getMilliseconds(),3)}`})()}] ${t}\n`)},Lt=(t,e,r={})=>{const s=c._parse(t,e,r);return t=s.command,e=s.args,(r={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:(r=s.options).cwd||a.cwd(),execPath:a.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:xt,...r}).env=(({env:t,extendEnv:e,preferLocal:r,localDir:s,execPath:n})=>{const i=e?{...a.env,...t}:t;return r?p({env:i,cwd:s,execPath:n}):i})(r),r.stdio=(t=>{if(!t)return;const{stdio:e}=t;if(void 0===e)return _.map((e=>t[e]));if((t=>_.some((e=>void 0!==t[e])))(t))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${_.map((t=>`\`${t}\``)).join(", ")}`);if("string"==typeof e)return e;if(!Array.isArray(e))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof e}\``);const r=Math.max(e.length,_.length);return Array.from({length:r},((t,r)=>e[r]))})(r),"win32"===a.platform&&"cmd"===i.basename(t,".exe")&&e.unshift("/q"),{file:t,args:e,options:r,parsed:s}},Pt=(t,e,r)=>"string"==typeof e||n.Buffer.isBuffer(e)?t.stripFinalNewline?function(t){const e="string"==typeof t?"\n":"\n".charCodeAt(),r="string"==typeof t?"\r":"\r".charCodeAt();return t[t.length-1]===e&&(t=t.slice(0,-1)),t[t.length-1]===r&&(t=t.slice(0,-1)),t}(e):e:void 0===r?void 0:"";function It(t,e,r){const s=Lt(t,e,r),n=wt(t,e),i=At(t,e);let a;_t(i,s.options),(({timeout:t})=>{if(void 0!==t&&(!Number.isFinite(t)||t<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`)})(s.options);try{a=o.spawn(s.file,s.args,s.options)}catch(t){const e=new o.ChildProcess,r=Promise.reject(k({error:t,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:s,timedOut:!1,isCanceled:!1,killed:!1}));return yt(e,r),e}const c=(t=>new Promise(((e,r)=>{t.on("exit",((t,r)=>{e({exitCode:t,signal:r})})),t.on("error",(t=>{r(t)})),t.stdin&&t.stdin.on("error",(t=>{r(t)}))})))(a),l=((t,{timeout:e,killSignal:r="SIGTERM"},s)=>{if(0===e||void 0===e)return s;let n;const i=new Promise(((s,i)=>{n=setTimeout((()=>{((t,e,r)=>{t.kill(e),r(Object.assign(new Error("Timed out"),{timedOut:!0,signal:e}))})(t,r,i)}),e)})),o=s.finally((()=>{clearTimeout(n)}));return Promise.race([i,o])})(a,s.options,c),u=(async(t,{cleanup:e,detached:r},s)=>{if(!e||r)return s;const n=(0,L.cf)((()=>{t.kill()}));return s.finally((()=>{n()}))})(a,s.options,l),p={isCanceled:!1};a.kill=P.bind(null,a.kill.bind(a)),a.cancel=F.bind(null,a,p);const d=E((async()=>{const[{error:t,exitCode:e,signal:r,timedOut:o},c,l,d]=await(async({stdout:t,stderr:e,all:r},{encoding:s,buffer:n,maxBuffer:i},o)=>{const a=ht(t,{encoding:s,buffer:n,maxBuffer:i}),c=ht(e,{encoding:s,buffer:n,maxBuffer:i}),l=ht(r,{encoding:s,buffer:n,maxBuffer:2*i});try{return await Promise.all([o,a,c,l])}catch(s){return Promise.all([{error:s,signal:s.signal,timedOut:s.timedOut},dt(t,a),dt(e,c),dt(r,l)])}})(a,s.options,u),h=Pt(s.options,c),f=Pt(s.options,l),g=Pt(s.options,d);if(t||0!==e||null!==r){const c=k({error:t,exitCode:e,signal:r,stdout:h,stderr:f,all:g,command:n,escapedCommand:i,parsed:s,timedOut:o,isCanceled:p.isCanceled||!!s.options.signal&&s.options.signal.aborted,killed:a.killed});if(!s.options.reject)return c;throw c}return{command:n,escapedCommand:i,exitCode:0,stdout:h,stderr:f,all:g,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return((t,e)=>{const r=(({input:t,inputFile:e})=>"string"!=typeof e?t:(pt(t),(0,D.createReadStream)(e)))(e);void 0!==r&&(M(r)?r.pipe(t.stdin):t.stdin.end(r))})(a,s.options),a.all=((t,{all:e})=>{if(!e||!t.stdout&&!t.stderr)return;const r=ut();return t.stdout&&r.add(t.stdout),t.stderr&&r.add(t.stderr),r})(a,s.options),(t=>{null!==t.stdout&&(t.pipeStdout=G.bind(void 0,t,"stdout")),null!==t.stderr&&(t.pipeStderr=G.bind(void 0,t,"stderr")),void 0!==t.all&&(t.pipeAll=G.bind(void 0,t,"all"))})(a),yt(a,d),a}function $t(t,e,r){const s=Lt(t,e,r),n=wt(t,e),i=At(t,e);_t(i,s.options);const a=(t=>{const e=(({input:t,inputFile:e})=>"string"!=typeof e?t:(pt(t),(0,D.readFileSync)(e)))(t);if(M(e))throw new TypeError("The `input` option cannot be a stream in sync mode");return e})(s.options);let c;try{c=o.spawnSync(s.file,s.args,{...s.options,input:a})}catch(t){throw k({error:t,stdout:"",stderr:"",all:"",command:n,escapedCommand:i,parsed:s,timedOut:!1,isCanceled:!1,killed:!1})}const l=Pt(s.options,c.stdout,c.error),u=Pt(s.options,c.stderr,c.error);if(c.error||0!==c.status||null!==c.signal){const t=k({stdout:l,stderr:u,error:c.error,signal:c.signal,exitCode:c.status,command:n,escapedCommand:i,parsed:s,timedOut:c.error&&"ETIMEDOUT"===c.error.code,isCanceled:!1,killed:null!==c.signal});if(!s.options.reject)return t;throw t}return{command:n,escapedCommand:i,exitCode:0,stdout:l,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}const Bt=({input:t,inputFile:e,stdio:r})=>void 0===t&&void 0===e&&void 0===r?{stdin:"inherit"}:{},Ht=(t={})=>({preferLocal:!0,...Bt(t),...t});!function t(e){function r(r,...s){if(!Array.isArray(r))return t({...e,...r});const[n,...i]=Tt(r,s);return It(n,i,Ht(e))}return r.sync=(t,...r)=>{if(!Array.isArray(t))throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");const[s,...n]=Tt(t,r);return $t(s,n,Ht(e))},r}();const Ft=s("lint-staged:execGit"),Dt=["-c","submodule.recurse=false"],Mt=async(t,e={})=>{Ft("Running git command",t);try{const{stdout:r}=await It("git",Dt.concat(t),{...e,all:!0,cwd:e.cwd||process.cwd(),stdin:"ignore"});return r}catch({all:t}){throw new Error(t)}};var Nt=r(8127);const Gt=r(6296);var Ut=r(2018),jt=r.t(Ut,2);const{env:Kt={},argv:Wt=[],platform:zt=""}="undefined"==typeof process?{}:process,Yt="NO_COLOR"in Kt||Wt.includes("--no-color"),qt="FORCE_COLOR"in Kt||Wt.includes("--color"),Vt="win32"===zt,Xt="dumb"===Kt.TERM,Qt=jt&&Ut.isatty&&Ut.isatty(1)&&Kt.TERM&&!Xt,Zt=!Yt&&(qt||Vt&&!Xt||Qt||"CI"in Kt&&("GITHUB_ACTIONS"in Kt||"GITLAB_CI"in Kt||"CIRCLECI"in Kt)),Jt=(t,e,r,s,n=e.substring(0,t)+s,i=e.substring(t+r.length),o=i.indexOf(r))=>n+(o<0?i:Jt(o,i,r,s)),te=(t,e,r)=>((t,e,r=t,s=t.length+1)=>n=>n||""!==n&&void 0!==n?((t,e,r,s,n)=>t<0?r+e+s:r+Jt(t,e,s,n)+s)((""+n).indexOf(e,s),n,t,e,r):"")(`\x1b[${t}m`,`\x1b[${e}m`,r),ee={reset:te(0,0),bold:te(1,22,"\x1b[22m\x1b[1m"),dim:te(2,22,"\x1b[22m\x1b[2m"),italic:te(3,23),underline:te(4,24),inverse:te(7,27),hidden:te(8,28),strikethrough:te(9,29),black:te(30,39),red:te(31,39),green:te(32,39),yellow:te(33,39),blue:te(34,39),magenta:te(35,39),cyan:te(36,39),white:te(37,39),gray:te(90,39),bgBlack:te(40,49),bgRed:te(41,49),bgGreen:te(42,49),bgYellow:te(43,49),bgBlue:te(44,49),bgMagenta:te(45,49),bgCyan:te(46,49),bgWhite:te(47,49),blackBright:te(90,39),redBright:te(91,39),greenBright:te(92,39),yellowBright:te(93,39),blueBright:te(94,39),magentaBright:te(95,39),cyanBright:te(96,39),whiteBright:te(97,39),bgBlackBright:te(100,49),bgRedBright:te(101,49),bgGreenBright:te(102,49),bgYellowBright:te(103,49),bgBlueBright:te(104,49),bgMagentaBright:te(105,49),bgCyanBright:te(106,49),bgWhiteBright:te(107,49)},re=({useColor:t=Zt}={})=>t?ee:Object.keys(ee).reduce(((t,e)=>({...t,[e]:String})),{}),{reset:se,bold:ne,dim:ie,italic:oe,underline:ae,inverse:ce,hidden:le,strikethrough:ue,black:pe,red:de,green:he,yellow:fe,blue:ge,magenta:me,cyan:ye,white:be,gray:Ee,bgBlack:we,bgRed:Ae,bgGreen:Se,bgYellow:Re,bgBlue:Ce,bgMagenta:ve,bgCyan:Te,bgWhite:Oe,blackBright:xe,redBright:ke,greenBright:_e,yellowBright:Le,blueBright:Pe,magentaBright:Ie,cyanBright:$e,whiteBright:Be,bgBlackBright:He,bgRedBright:Fe,bgGreenBright:De,bgYellowBright:Me,bgBlueBright:Ne,bgMagentaBright:Ge,bgCyanBright:Ue,bgWhiteBright:je}=re();var Ke=r(9023),We=r(857),ze=r(3193),Ye=r(2203),qe=r(9018),Ve=r(6982),Xe=Object.defineProperty,Qe=(t,e)=>Xe(t,"name",{value:e,configurable:!0}),Ze="\x1b[?25l",Je="\x1b[?25h",tr=(t=>(t.WAITING="WAITING",t.STARTED="STARTED",t.COMPLETED="COMPLETED",t.FAILED="FAILED",t.SKIPPED="SKIPPED",t.ROLLING_BACK="ROLLING_BACK",t.ROLLED_BACK="ROLLED_BACK",t.RETRY="RETRY",t.PAUSED="PAUSED",t.PROMPT="PROMPT",t.PROMPT_COMPLETED="PROMPT_COMPLETED",t.PROMPT_FAILED="PROMPT_FAILED",t))(tr||{}),er=class{static{Qe(this,"EventManager")}emitter=new Gt;emit(t,e){this.emitter.emit(t,e)}on(t,e){this.emitter.addListener(t,e)}once(t,e){this.emitter.once(t,e)}off(t,e){this.emitter.off(t,e)}complete(){this.emitter.removeAllListeners()}};function rr(t){return!!t&&"object"==typeof t&&"function"==typeof t.subscribe}function sr(t){return!!t&&"object"==typeof t&&!0===t.readable&&"function"==typeof t.read&&"function"==typeof t.on}function nr(){return!!process.env.LISTR_FORCE_UNICODE||"win32"!==process.platform||!!process.env.CI||!!process.env.WT_SESSION||"vscode"===process.env.TERM_PROGRAM||"xterm-256color"===process.env.TERM||"alacritty"===process.env.TERM}(class{static{Qe(this,"BaseEventMap")}}),Qe(rr,"isObservable"),Qe(sr,"isReadable"),Qe(nr,"isUnicodeSupported");var ir=/\u0007/;function or(t){return String(t).replace(new RegExp("(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+","gmi"),"").replace(new RegExp(ir,"gmi"),"").trim()}Qe(or,"cleanseAnsi");var ar=re();function cr(t,e){return t.replace(/^(?!\s*$)/gm," ".repeat(e))}Qe(cr,"indent");var lr={warning:"\u26a0",cross:"\u2716",arrowDown:"\u2193",tick:"\u2714",arrowRight:"\u2192",pointer:"\u276f",checkboxOn:"\u2612",arrowLeft:"\u2190",squareSmallFilled:"\u25fc",pointerSmall:"\u203a"},ur={...lr,warning:"\u203c",cross:"\xd7",tick:"\u221a",pointer:">",checkboxOn:"[\xd7]",squareSmallFilled:"\u25a0"},pr=nr()?lr:ur;function dr(t,...e){return(0,Ke.format)(String(t),...e)}Qe(dr,"splat");var hr={STARTED:pr.pointer,FAILED:pr.cross,SKIPPED:pr.arrowDown,COMPLETED:pr.tick,OUTPUT:pr.pointerSmall,TITLE:pr.arrowRight,RETRY:pr.warning,ROLLBACK:pr.arrowLeft,PAUSED:pr.squareSmallFilled},fr={STARTED:ar.yellow,FAILED:ar.red,SKIPPED:ar.yellow,COMPLETED:ar.green,RETRY:ar.yellowBright,ROLLBACK:ar.redBright,PAUSED:ar.yellowBright},gr=["RETRY","ROLLBACK","FAILED"],mr=class{constructor(t){this.options=t,this.options={useIcons:!0,toStderr:[],...t??{}},this.options.fields??={},this.options.fields.prefix??=[],this.options.fields.suffix??=[],this.process=this.options.processOutput??new Er}static{Qe(this,"ListrLogger")}process;log(t,e,r){const s=this.format(t,e,r);this.options.toStderr.includes(t)?this.process.toStderr(s):this.process.toStdout(s)}toStdout(t,e,r=!0){this.process.toStdout(this.format(null,t,e),r)}toStderr(t,e,r=!0){this.process.toStderr(this.format(null,t,e),r)}wrap(t,e){return t?this.applyFormat(`[${t}]`,e):t}splat(...t){const e=t.shift()??"";return 0===t.length?e:dr(e,t)}suffix(t,...e){return e.filter(Boolean).forEach((e=>{if(t+=this.spacing(t),"string"==typeof e)t+=this.wrap(e);else if("object"==typeof e){if(e.args??=[],"function"==typeof e.condition?!e.condition(...e.args):!(e.condition??1))return t;t+=this.wrap("function"==typeof e.field?e.field(...e.args):e.field,{format:e?.format(...e.args)})}})),t}prefix(t,...e){return e.filter(Boolean).forEach((e=>{if(t=this.spacing(t)+t,"string"==typeof e)t=this.wrap(e)+t;else if("object"==typeof e){if(e.args??=[],"function"==typeof e.condition?!e.condition(...e.args):!(e.condition??1))return t;t=this.wrap("function"==typeof e.field?e.field(...e.args):e.field,{format:e?.format()})+t}})),t}fields(t,e){return this.options?.fields?.prefix&&(t=this.prefix(t,...this.options.fields.prefix)),e?.prefix&&(t=this.prefix(t,...e.prefix)),e?.suffix&&(t=this.suffix(t,...e.suffix)),this.options?.fields?.suffix&&(t=this.suffix(t,...this.options.fields.suffix)),t}icon(t,e){if(!t)return null;if(!e){const r=this.options.icon?.[t];e="function"==typeof r?r():r}const r=this.options.color?.[t];return e&&r&&(e=r(e)),e}format(t,e,r){return Array.isArray(e)||(e=[e]),this.splat(e.shift(),...e).toString().split(We.EOL).filter((t=>!t||""!==t.trim())).map((e=>this.style(t,this.fields(e,{prefix:Array.isArray(r?.prefix)?r.prefix:[r?.prefix],suffix:Array.isArray(r?.suffix)?r.suffix:[r?.suffix]})))).join(We.EOL)}style(t,e){if(!t||!e)return e;const r=this.icon(t,!this.options.useIcons&&this.wrap(t));return r&&(e=r+" "+e),e}applyFormat(t,e){return e?.format?e.format(t):t}spacing(t){return void 0===t||""===t.trim()?"":" "}},yr=class{constructor(t){this.options=t}static{Qe(this,"ProcessOutputBuffer")}buffer=[];decoder=new ze.StringDecoder;get all(){return this.buffer}get last(){return this.buffer.at(-1)}get length(){return this.buffer.length}write(t,...e){const r=e[e.length-1];return this.buffer.push({time:Date.now(),stream:this.options?.stream,entry:this.decoder.write("string"==typeof t?Buffer.from(t,"string"==typeof e[0]?e[0]:void 0):Buffer.from(t))}),this.options?.limit&&(this.buffer=this.buffer.slice(-this.options.limit)),"function"==typeof r&&r(),!0}reset(){this.buffer=[]}},br=class{constructor(t){this.stream=t,this.method=t.write,this.buffer=new yr({stream:t})}static{Qe(this,"ProcessOutputStream")}method;buffer;get out(){return Object.assign({},this.stream,{write:this.write.bind(this)})}hijack(){this.stream.write=this.buffer.write.bind(this.buffer)}release(){this.stream.write=this.method;const t=[...this.buffer.all];return this.buffer.reset(),t}write(...t){return this.method.apply(this.stream,t)}},Er=class{constructor(t,e,r){this.options=r,this.stream={stdout:new br(t??process.stdout),stderr:new br(e??process.stderr)},this.options={dump:["stdout","stderr"],leaveEmptyLine:!0,...r}}static{Qe(this,"ProcessOutput")}stream;active;get stdout(){return this.stream.stdout.out}get stderr(){return this.stream.stderr.out}hijack(){if(this.active)throw new Error("ProcessOutput has been already hijacked!");this.stream.stdout.write(Ze),Object.values(this.stream).forEach((t=>t.hijack())),this.active=!0}release(){const t=Object.entries(this.stream).map((([t,e])=>({name:t,buffer:e.release()}))).filter((t=>this.options.dump.includes(t.name))).flatMap((t=>t.buffer)).sort(((t,e)=>t.time-e.time)).map((t=>({...t,entry:or(t.entry)}))).filter((t=>t.entry));t.length>0&&(this.options.leaveEmptyLine&&this.stdout.write(We.EOL),t.forEach((t=>{(t.stream??this.stdout).write(t.entry+We.EOL)}))),this.stream.stdout.write(Je),this.active=!1}toStdout(t,e=!0){return e&&(t+=We.EOL),this.stream.stdout.write(t)}toStderr(t,e=!0){return e&&(t+=We.EOL),this.stream.stderr.write(t)}};function wr(t){const e=new Ye.Writable;return e.rows=1/0,e.columns=1/0,e.write=e=>(t(e.toString()),!0),e}Qe(wr,"createWritable"),class{constructor(t,e){this.task=t,this.wrapper=e}static{Qe(this,"ListrPromptAdapter")}state;reportStarted(){if(this.state=this.task.state,this.task.prompt)throw new Ur("There is already an active prompt attached to this task which may not be cleaned up properly.");this.task.prompt=this,this.task.state$="PROMPT"}reportFailed(){this.task.state$="PROMPT_FAILED",this.restoreState()}reportCompleted(){this.task.state$="PROMPT_COMPLETED",this.restoreState()}restoreState(){this.task.prompt=void 0,this.state&&(this.task.state=this.state)}};var Ar=class{static{Qe(this,"Spinner")}spinner=nr()?["\u280b","\u2819","\u2839","\u2838","\u283c","\u2834","\u2826","\u2827","\u2807","\u280f"]:["-","\\","|","/"];id;spinnerPosition=0;spin(){this.spinnerPosition=++this.spinnerPosition%this.spinner.length}fetch(){return this.spinner[this.spinnerPosition]}isRunning(){return!!this.id}start(t,e=100){this.id=setInterval((()=>{this.spin(),t&&t()}),e)}stop(){clearInterval(this.id)}},Sr={SKIPPED_WITH_COLLAPSE:pr.arrowDown,SKIPPED_WITHOUT_COLLAPSE:pr.warning,OUTPUT:pr.pointerSmall,OUTPUT_WITH_BOTTOMBAR:pr.pointerSmall,PENDING:pr.pointer,COMPLETED:pr.tick,COMPLETED_WITH_FAILED_SUBTASKS:pr.warning,COMPLETED_WITH_SISTER_TASKS_FAILED:pr.squareSmallFilled,RETRY:pr.warning,ROLLING_BACK:pr.warning,ROLLED_BACK:pr.arrowLeft,FAILED:pr.cross,FAILED_WITH_SUBTASKS:pr.pointer,WAITING:pr.squareSmallFilled,PAUSED:pr.squareSmallFilled},Rr={SKIPPED_WITH_COLLAPSE:ar.yellow,SKIPPED_WITHOUT_COLLAPSE:ar.yellow,PENDING:ar.yellow,COMPLETED:ar.green,COMPLETED_WITH_FAILED_SUBTASKS:ar.yellow,COMPLETED_WITH_SISTER_TASKS_FAILED:ar.red,RETRY:ar.yellowBright,ROLLING_BACK:ar.redBright,ROLLED_BACK:ar.redBright,FAILED:ar.red,FAILED_WITH_SUBTASKS:ar.red,WAITING:ar.dim,PAUSED:ar.yellowBright};function Cr(t){const e=Math.floor(t/1e3),r=Math.floor(e/60);let s;return 0===e&&0===r&&(s=`0.${Math.floor(t/100)}s`),e>0&&(s=e%60+"s"),r>0&&(s=`${r}m${s}`),s}Qe(Cr,"parseTimer");var vr={condition:!0,field:Cr,format:Qe((()=>ar.dim),"format")};Qe((function(){const t=new Date;return String(t.getHours()).padStart(2,"0")+":"+String(t.getMinutes()).padStart(2,"0")+":"+String(t.getSeconds()).padStart(2,"0")}),"parseTimestamp");var Tr=class t{constructor(e,r,s){this.tasks=e,this.options=r,this.events=s,this.options={...t.rendererOptions,...this.options,icon:{...Sr,...r?.icon??{}},color:{...Rr,...r?.color??{}}},this.spinner=this.options.spinner??new Ar,this.logger=this.options.logger??new mr({useIcons:!0,toStderr:[]}),this.logger.options.icon=this.options.icon,this.logger.options.color=this.options.color}static{Qe(this,"DefaultRenderer")}static nonTTY=!1;static rendererOptions={indentation:2,clearOutput:!1,showSubtasks:!0,collapseSubtasks:!0,collapseSkips:!0,showSkipMessage:!0,suffixSkips:!1,collapseErrors:!0,showErrorMessage:!0,suffixRetries:!0,lazy:!1,removeEmptyLines:!0,formatOutput:"wrap",pausedTimer:{...vr,format:Qe((()=>ar.yellowBright),"format")}};static rendererTaskOptions={outputBar:!0};prompt;activePrompt;spinner;logger;updater;truncate;wrap;buffer={output:new Map,bottom:new Map};cache={render:new Map,rendererOptions:new Map,rendererTaskOptions:new Map};async render(){const{createLogUpdate:t}=await Promise.all([r.e(799),r.e(782),r.e(216)]).then(r.bind(r,2216)),{default:e}=await Promise.all([r.e(799),r.e(145)]).then(r.bind(r,5145)),{default:s}=await Promise.all([r.e(799),r.e(782)]).then(r.bind(r,782));this.updater=t(this.logger.process.stdout),this.truncate=e,this.wrap=s,this.logger.process.hijack(),this.options?.lazy||this.spinner.start((()=>{this.update()})),this.events.on("SHOUD_REFRESH_RENDER",(()=>{this.update()}))}update(){this.updater(this.create())}end(){this.spinner.stop(),this.updater.clear(),this.updater.done(),this.options.clearOutput||this.logger.process.toStdout(this.create({prompt:!1})),this.logger.process.release()}create(t){t={tasks:!0,bottomBar:!0,prompt:!0,...t};const e=[],r=this.renderer(this.tasks),s=this.renderBottomBar(),n=this.renderPrompt();return t.tasks&&r.length>0&&e.push(...r),t.bottomBar&&s.length>0&&(e.length>0&&e.push(""),e.push(...s)),t.prompt&&n.length>0&&(e.length>0&&e.push(""),e.push(...n)),e.join(We.EOL)}style(t,e=!1){const r=this.cache.rendererOptions.get(t.id);if(t.isSkipped()){if(e||r.collapseSkips)return this.logger.icon("SKIPPED_WITH_COLLAPSE");if(!1===r.collapseSkips)return this.logger.icon("SKIPPED_WITHOUT_COLLAPSE")}if(e)return this.shouldOutputToBottomBar(t)?this.logger.icon("OUTPUT_WITH_BOTTOMBAR"):this.logger.icon("OUTPUT");if(t.hasSubtasks()){if(t.isStarted()||t.isPrompt()&&!1!==r.showSubtasks&&!t.subtasks.every((t=>!t.hasTitle())))return this.logger.icon("PENDING");if(t.isCompleted()&&t.subtasks.some((t=>t.hasFailed())))return this.logger.icon("COMPLETED_WITH_FAILED_SUBTASKS");if(t.hasFailed())return this.logger.icon("FAILED_WITH_SUBTASKS")}return t.isStarted()||t.isPrompt()?this.logger.icon("PENDING",!this.options?.lazy&&this.spinner.fetch()):t.isCompleted()?this.logger.icon("COMPLETED"):t.isRetrying()?this.logger.icon("RETRY",!this.options?.lazy&&this.spinner.fetch()):t.isRollingBack()?this.logger.icon("ROLLING_BACK",!this.options?.lazy&&this.spinner.fetch()):t.hasRolledBack()?this.logger.icon("ROLLED_BACK"):t.hasFailed()?this.logger.icon("FAILED"):t.isPaused()?this.logger.icon("PAUSED"):this.logger.icon("WAITING")}format(t,e,r){if(""===t.trim())return[];let s;e&&(t=e+" "+t);const n=(process.stdout.columns??80)-r*this.options.indentation-2;switch(this.options.formatOutput){case"truncate":s=t.split(We.EOL).map(((t,e)=>this.truncate(this.indent(t,e),n)));break;case"wrap":s=this.wrap(t,n,{hard:!0,trim:!1}).split(We.EOL).map(((t,e)=>this.indent(t,e)));break;default:throw new Gr("Format option for the renderer is wrong.")}return this.options.removeEmptyLines&&(s=s.filter(Boolean)),s.map((t=>cr(t,r*this.options.indentation)))}shouldOutputToOutputBar(t){const e=this.cache.rendererTaskOptions.get(t.id).outputBar;return"number"==typeof e&&0!==e||"boolean"==typeof e&&!1!==e}shouldOutputToBottomBar(t){const e=this.cache.rendererTaskOptions.get(t.id).bottomBar;return"number"==typeof e&&0!==e||"boolean"==typeof e&&!1!==e||!t.hasTitle()}renderer(t,e=0){return t.flatMap((r=>{if(!r.isEnabled())return[];if(this.cache.render.has(r.id))return this.cache.render.get(r.id);this.calculate(r),this.setupBuffer(r);const s=this.cache.rendererOptions.get(r.id),n=this.cache.rendererTaskOptions.get(r.id),i=[];if(r.isPrompt()){if(this.activePrompt&&this.activePrompt!==r.id)throw new Gr("Only one prompt can be active at the given time, please re-evaluate your task design.");this.activePrompt||(r.on("PROMPT",(t=>{const e=or(t);e&&(this.prompt=e)})),r.on("STATE",(t=>{("PROMPT_COMPLETED"===t||r.hasFinalized()||r.hasReset())&&(this.prompt=null,this.activePrompt=null,r.off("PROMPT"))})),this.activePrompt=r.id)}if(r.hasTitle()&&(!t.some((t=>t.hasFailed()))||r.hasFailed()||!1===r.options.exitOnError||r.isCompleted()||r.isSkipped()?r.hasFailed()&&s.collapseErrors?i.push(...this.format(!r.hasSubtasks()&&r.message.error&&s.showErrorMessage?r.message.error:r.title,this.style(r),e)):r.isSkipped()&&s.collapseSkips?i.push(...this.format(this.logger.suffix(r.message.skip&&s.showSkipMessage?r.message.skip:r.title,{field:"SKIPPED",condition:s.suffixSkips,format:Qe((()=>ar.dim),"format")}),this.style(r),e)):r.isRetrying()?i.push(...this.format(this.logger.suffix(r.title,{field:`RETRY:${r.message.retry.count}`,format:Qe((()=>ar.yellow),"format"),condition:s.suffixRetries}),this.style(r),e)):r.isCompleted()&&r.hasTitle()&&Br(n.timer?.condition,r.message.duration)?i.push(...this.format(this.logger.suffix(r?.title,{...n.timer,args:[r.message.duration]}),this.style(r),e)):r.isPaused()?i.push(...this.format(this.logger.suffix(r.title,{...s.pausedTimer,args:[r.message.paused-Date.now()]}),this.style(r),e)):i.push(...this.format(r.title,this.style(r),e)):i.push(...this.format(r.title,this.logger.icon("COMPLETED_WITH_SISTER_TASKS_FAILED"),e))),r.hasSubtasks()&&s.showSubtasks||(!r.hasFailed()||!1!==s.collapseErrors||!s.showErrorMessage&&s.showSubtasks?!r.isSkipped()||!1!==s.collapseSkips||!s.showSkipMessage&&s.showSubtasks||i.push(...this.dump(r,e,"SKIPPED")):i.push(...this.dump(r,e,"FAILED"))),(r.isPending()||n.persistentOutput)&&i.push(...this.renderOutputBar(r,e)),!1!==s.showSubtasks&&r.hasSubtasks()&&(r.isPending()||r.hasFinalized()&&!r.hasTitle()||r.isCompleted()&&!1===s.collapseSubtasks&&!r.subtasks.some((t=>!0===this.cache.rendererOptions.get(t.id)?.collapseSubtasks))||r.subtasks.some((t=>!1===this.cache.rendererOptions.get(t.id)?.collapseSubtasks))||r.subtasks.some((t=>t.hasFailed()))||r.subtasks.some((t=>t.hasRolledBack())))){const t=r.hasTitle()?e+1:e,s=this.renderer(r.subtasks,t);i.push(...s)}return r.hasFinalized()&&(n.persistentOutput||(this.buffer.bottom.delete(r.id),this.buffer.output.delete(r.id))),r.isClosed()&&(this.cache.render.set(r.id,i),this.reset(r)),i}))}renderOutputBar(t,e){const r=this.buffer.output.get(t.id);return r?r.all.flatMap((r=>this.dump(t,e,"OUTPUT",r.entry))):[]}renderBottomBar(){return 0===this.buffer.bottom.size?[]:Array.from(this.buffer.bottom.values()).flatMap((t=>t.all)).sort(((t,e)=>t.time-e.time)).map((t=>t.entry))}renderPrompt(){return this.prompt?[this.prompt]:[]}calculate(e){if(this.cache.rendererOptions.has(e.id)&&this.cache.rendererTaskOptions.has(e.id))return;const r={...this.options,...e.rendererOptions};this.cache.rendererOptions.set(e.id,r),this.cache.rendererTaskOptions.set(e.id,{...t.rendererTaskOptions,timer:r.timer,...e.rendererTaskOptions})}setupBuffer(t){if(this.buffer.bottom.has(t.id)||this.buffer.output.has(t.id))return;const e=this.cache.rendererTaskOptions.get(t.id);this.shouldOutputToBottomBar(t)&&!this.buffer.bottom.has(t.id)?(this.buffer.bottom.set(t.id,new yr({limit:"number"==typeof e.bottomBar?e.bottomBar:1})),t.on("OUTPUT",(e=>{const r=this.dump(t,-1,"OUTPUT",e);this.buffer.bottom.get(t.id).write(r.join(We.EOL))})),t.on("STATE",(e=>{"RETRY"===e&&this.buffer.bottom.delete(t.id)}))):this.shouldOutputToOutputBar(t)&&!this.buffer.output.has(t.id)&&(this.buffer.output.set(t.id,new yr({limit:"number"==typeof e.outputBar?e.outputBar:1})),t.on("OUTPUT",(e=>{this.buffer.output.get(t.id).write(e)})),t.on("STATE",(e=>{"RETRY"===e&&this.buffer.output.delete(t.id)})))}reset(t){this.cache.rendererOptions.delete(t.id),this.cache.rendererTaskOptions.delete(t.id),this.buffer.output.delete(t.id)}dump(t,e,r="OUTPUT",s){if(!s)switch(r){case"OUTPUT":s=t.output;break;case"SKIPPED":s=t.message.skip;break;case"FAILED":s=t.message.error}return t.hasTitle()&&"FAILED"===r&&s===t.title||"string"!=typeof s?[]:("OUTPUT"===r&&(s=or(s)),this.format(s,this.style(t,!0),e+1))}indent(t,e){return e>0?cr(t.trimEnd(),this.options.indentation):t.trimEnd()}},Or=class{constructor(t,e){this.tasks=t,this.options=e}static{Qe(this,"SilentRenderer")}static nonTTY=!0;static rendererOptions;static rendererTaskOptions;render(){}end(){}},xr=class t{constructor(e,r){this.tasks=e,this.options=r,this.options={...t.rendererOptions,...r,icon:{...hr,...r?.icon??{}},color:{...fr,...r?.color??{}}},this.logger=this.options.logger??new mr({useIcons:!0,toStderr:gr}),this.logger.options.icon=this.options.icon,this.logger.options.color=this.options.color,this.options.timestamp&&this.logger.options.fields.prefix.unshift(this.options.timestamp)}static{Qe(this,"SimpleRenderer")}static nonTTY=!0;static rendererOptions={pausedTimer:{...vr,field:Qe((t=>`PAUSED:${t}`),"field"),format:Qe((()=>ar.yellowBright),"format")}};static rendererTaskOptions={};logger;cache={rendererOptions:new Map,rendererTaskOptions:new Map};end(){}render(){this.renderer(this.tasks)}renderer(t){t.forEach((t=>{this.calculate(t),t.once("CLOSED",(()=>{this.reset(t)}));const e=this.cache.rendererOptions.get(t.id),r=this.cache.rendererTaskOptions.get(t.id);t.on("SUBTASK",(t=>{this.renderer(t)})),t.on("STATE",(e=>{if(t.hasTitle())if("STARTED"===e)this.logger.log("STARTED",t.title);else if("COMPLETED"===e){const e=r?.timer;this.logger.log("COMPLETED",t.title,e&&{suffix:{...e,condition:!!t.message?.duration&&e.condition,args:[t.message.duration]}})}else"PROMPT"===e?(this.logger.process.hijack(),t.on("PROMPT",(t=>{this.logger.process.toStderr(t,!1)}))):"PROMPT_COMPLETED"===e&&(t.off("PROMPT"),this.logger.process.release())})),t.on("OUTPUT",(t=>{this.logger.log("OUTPUT",t)})),t.on("MESSAGE",(r=>{if(r.error)this.logger.log("FAILED",t.title,{suffix:{field:`FAILED: ${r.error}`,format:Qe((()=>ar.red),"format")}});else if(r.skip)this.logger.log("SKIPPED",t.title,{suffix:{field:`SKIPPED: ${r.skip}`,format:Qe((()=>ar.yellow),"format")}});else if(r.rollback)this.logger.log("ROLLBACK",t.title,{suffix:{field:`ROLLBACK: ${r.rollback}`,format:Qe((()=>ar.red),"format")}});else if(r.retry)this.logger.log("RETRY",t.title,{suffix:{field:`RETRY:${r.retry.count}`,format:Qe((()=>ar.red),"format")}});else if(r.paused){const s=e?.pausedTimer;this.logger.log("PAUSED",t.title,s&&{suffix:{...s,condition:!!r?.paused&&s.condition,args:[r.paused-Date.now()]}})}}))}))}calculate(e){if(this.cache.rendererOptions.has(e.id)&&this.cache.rendererTaskOptions.has(e.id))return;const r={...this.options,...e.rendererOptions};this.cache.rendererOptions.set(e.id,r),this.cache.rendererTaskOptions.set(e.id,{...t.rendererTaskOptions,timer:r.timer,...e.rendererTaskOptions})}reset(t){this.cache.rendererOptions.delete(t.id),this.cache.rendererTaskOptions.delete(t.id)}},kr=class{constructor(t){this.options=t}static{Qe(this,"TestRendererSerializer")}serialize(t,e,r){return JSON.stringify(this.generate(t,e,r))}generate(t,e,r){const s={event:t,data:e};if("boolean"!=typeof this.options?.task){const t=Object.fromEntries(this.options.task.map((t=>{const e=r[t];return"function"==typeof e?[t,e.call(r)]:[t,e]})));Object.keys(r).length>0&&(s.task=t)}return s}},_r=class t{constructor(e,r){this.tasks=e,this.options=r,this.options={...t.rendererOptions,...this.options},this.logger=this.options.logger??new mr({useIcons:!1}),this.serializer=new kr(this.options)}static{Qe(this,"TestRenderer")}static nonTTY=!0;static rendererOptions={subtasks:!0,state:Object.values(tr),output:!0,prompt:!0,title:!0,messages:["skip","error","retry","rollback","paused"],messagesToStderr:["error","rollback","retry"],task:["hasRolledBack","isRollingBack","isCompleted","isSkipped","hasFinalized","hasSubtasks","title","hasReset","hasTitle","isPrompt","isPaused","isPending","isSkipped","isStarted","hasFailed","isEnabled","isRetrying","path"]};static rendererTaskOptions;logger;serializer;render(){this.renderer(this.tasks)}end(){}renderer(t){t.forEach((t=>{this.options.subtasks&&t.on("SUBTASK",(t=>{this.renderer(t)})),this.options.state&&t.on("STATE",(e=>{this.logger.toStdout(this.serializer.serialize("STATE",e,t))})),this.options.output&&t.on("OUTPUT",(e=>{this.logger.toStdout(this.serializer.serialize("OUTPUT",e,t))})),this.options.prompt&&t.on("PROMPT",(e=>{this.logger.toStdout(this.serializer.serialize("PROMPT",e,t))})),this.options.title&&t.on("TITLE",(e=>{this.logger.toStdout(this.serializer.serialize("TITLE",e,t))})),t.on("MESSAGE",(e=>{const r=Object.fromEntries(Object.entries(e).map((([t,e])=>{if(this.options.messages.includes(t))return[t,e]})).filter(Boolean));if(Object.keys(r).length>0){const e=this.serializer.serialize("MESSAGE",r,t);this.options.messagesToStderr.some((t=>Object.keys(r).includes(t)))?this.logger.toStderr(e):this.logger.toStdout(e)}}))}))}},Lr={default:Tr,simple:xr,verbose:class t{constructor(e,r){this.tasks=e,this.options=r,this.options={...t.rendererOptions,...this.options,icon:{...hr,...r?.icon??{}},color:{...fr,...r?.color??{}}},this.logger=this.options.logger??new mr({useIcons:!1,toStderr:gr}),this.logger.options.icon=this.options.icon,this.logger.options.color=this.options.color,this.options.timestamp&&this.logger.options.fields.prefix.unshift(this.options.timestamp)}static{Qe(this,"VerboseRenderer")}static nonTTY=!0;static rendererOptions={logTitleChange:!1,pausedTimer:{...vr,format:Qe((()=>ar.yellowBright),"format")}};static rendererTaskOptions;logger;cache={rendererOptions:new Map,rendererTaskOptions:new Map};render(){this.renderer(this.tasks)}end(){}renderer(t){t.forEach((t=>{this.calculate(t),t.once("CLOSED",(()=>{this.reset(t)}));const e=this.cache.rendererOptions.get(t.id),r=this.cache.rendererTaskOptions.get(t.id);t.on("SUBTASK",(t=>{this.renderer(t)})),t.on("STATE",(e=>{if(t.hasTitle())if("STARTED"===e)this.logger.log("STARTED",t.title);else if("COMPLETED"===e){const e=r.timer;this.logger.log("COMPLETED",t.title,e&&{suffix:{...e,condition:!!t.message?.duration&&e.condition,args:[t.message.duration]}})}})),t.on("OUTPUT",(t=>{this.logger.log("OUTPUT",t)})),t.on("PROMPT",(t=>{const e=or(t);e&&this.logger.log("PROMPT",e)})),!1!==this.options?.logTitleChange&&t.on("TITLE",(t=>{this.logger.log("TITLE",t)})),t.on("MESSAGE",(r=>{if(r?.error)this.logger.log("FAILED",r.error);else if(r?.skip)this.logger.log("SKIPPED",r.skip);else if(r?.rollback)this.logger.log("ROLLBACK",r.rollback);else if(r?.retry)this.logger.log("RETRY",t.title,{suffix:r.retry.count.toString()});else if(r?.paused){const s=e?.pausedTimer;this.logger.log("PAUSED",t.title,s&&{suffix:{...s,condition:!!r?.paused&&s.condition,args:[r.paused-Date.now()]}})}}))}))}calculate(e){if(this.cache.rendererOptions.has(e.id)&&this.cache.rendererTaskOptions.has(e.id))return;const r={...this.options,...e.rendererOptions};this.cache.rendererOptions.set(e.id,r),this.cache.rendererTaskOptions.set(e.id,{...t.rendererTaskOptions,timer:r.timer,...e.rendererTaskOptions})}reset(t){this.cache.rendererOptions.delete(t.id),this.cache.rendererTaskOptions.delete(t.id)}},test:_r,silent:Or};function Pr(t){return!0===process.stdout.isTTY||!0===t.nonTTY}function Ir(t){return"string"==typeof t?Lr[t]??Lr.default:"function"==typeof t?t:Lr.default}function $r(t){if(Br(t?.silentRendererCondition))return{renderer:Ir("silent"),selection:"SILENT"};const e={renderer:Ir(t.renderer),options:t.rendererOptions,selection:"PRIMARY"};return!Pr(e.renderer)||Br(t?.fallbackRendererCondition)?{renderer:Ir(t.fallbackRenderer),options:t.fallbackRendererOptions,selection:"SECONDARY"}:e}function Br(t,...e){return"function"==typeof t?t(...e):t}Qe(Pr,"isRendererSupported"),Qe(Ir,"getRendererClass"),Qe($r,"getRenderer"),Qe(Br,"assertFunctionOrSelf");var Hr=qe({circles:!0});function Fr(t){return Hr(t)}Qe(Fr,"cloneObject");var Dr=class{static{Qe(this,"Concurrency")}concurrency;count;queue;constructor(t){this.concurrency=t.concurrency,this.count=0,this.queue=new Set}add(t){return this.count<this.concurrency?this.run(t):new Promise((e=>{const r=Qe((()=>e(this.run(t))),"callback");this.queue.add(r)}))}flush(){for(const t of this.queue){if(this.count>=this.concurrency)break;this.queue.delete(t),t()}}run(t){this.count++;const e=t(),r=Qe((()=>{this.count--,this.flush()}),"cleanup");return e.then(r,(()=>{this.queue.clear()})),e}};function Mr(t){return new Promise((e=>{setTimeout(e,t)}))}Qe(Mr,"delay");var Nr=class extends Error{constructor(t,e,r){super(t.message),this.error=t,this.type=e,this.task=r,this.name="ListrError",this.path=r.path,"full"===r?.options.collectErrors&&(this.task=Fr(r),this.ctx=Fr(r.listr.ctx)),this.stack=t?.stack}static{Qe(this,"ListrError")}path;ctx},Gr=class extends Error{static{Qe(this,"ListrRendererError")}},Ur=class extends Error{static{Qe(this,"PromptError")}},jr=class{constructor(t){this.task=t}static{Qe(this,"TaskWrapper")}get title(){return this.task.title}set title(t){t=Array.isArray(t)?t:[t],this.task.title$=dr(t.shift(),...t)}get output(){return this.task.output}set output(t){t=Array.isArray(t)?t:[t],this.task.output$=dr(t.shift(),...t)}set promptOutput(t){this.task.promptOutput$=t}newListr(t,e){let r;return r="function"==typeof t?t(this):t,new Yr(r,e,this.task)}report(t,e){!1!==this.task.options.collectErrors&&this.task.listr.errors.push(new Nr(t,e,this.task)),this.task.message$={error:t.message??this.task?.title}}skip(t,...e){this.task.state$="SKIPPED",t&&(this.task.message$={skip:t?dr(t,...e):this.task?.title})}isRetrying(){return this.task.isRetrying()?this.task.retry:{count:0}}prompt(t){return this.task.prompt?this.task.prompt:new t(this.task,this)}stdout(t){return wr((e=>{"PROMPT"===t?this.promptOutput=e:this.output=e}))}run(t){return this.task.run(t,this)}},Kr=class extends er{static{Qe(this,"ListrTaskEventManager")}},Wr=class extends Kr{constructor(t,e,r,s,n){if(super(),this.listr=t,this.task=e,this.options=r,this.rendererOptions=s,this.rendererTaskOptions=n,e.title){const t=Array.isArray(e?.title)?e.title:[e.title];this.title=dr(t.shift(),...t),this.initialTitle=this.title}this.taskFn=e.task,this.parent=t.parentTask}static{Qe(this,"Task")}id=(0,Ve.randomUUID)();state="WAITING";subtasks;title;initialTitle;output;retry;message={};prompt;parent;enabled;taskFn;closed;set state$(t){if(this.state=t,this.emit("STATE",t),this.hasSubtasks()&&this.hasFailed())for(const t of this.subtasks)"STARTED"===t.state&&(t.state$="FAILED");this.listr.events.emit("SHOUD_REFRESH_RENDER")}set output$(t){this.output=t,this.emit("OUTPUT",t),this.listr.events.emit("SHOUD_REFRESH_RENDER")}set promptOutput$(t){this.emit("PROMPT",t),or(t)&&this.listr.events.emit("SHOUD_REFRESH_RENDER")}set message$(t){this.message={...this.message,...t},this.emit("MESSAGE",t),this.listr.events.emit("SHOUD_REFRESH_RENDER")}set title$(t){this.title=t,this.emit("TITLE",t),this.listr.events.emit("SHOUD_REFRESH_RENDER")}get path(){return[...this.listr.path,this.initialTitle]}async check(t){return"WAITING"===this.state&&(this.enabled=await Br(this.task?.enabled??!0,t),this.emit("ENABLED",this.enabled),this.listr.events.emit("SHOUD_REFRESH_RENDER")),this.enabled}hasSubtasks(){return this.subtasks?.length>0}hasFinalized(){return this.isCompleted()||this.hasFailed()||this.isSkipped()||this.hasRolledBack()}isPending(){return this.isStarted()||this.isPrompt()||this.hasReset()}isStarted(){return"STARTED"===this.state}isSkipped(){return"SKIPPED"===this.state}isCompleted(){return"COMPLETED"===this.state}hasFailed(){return"FAILED"===this.state}isRollingBack(){return"ROLLING_BACK"===this.state}hasRolledBack(){return"ROLLED_BACK"===this.state}isRetrying(){return"RETRY"===this.state}hasReset(){return"RETRY"===this.state||"ROLLING_BACK"===this.state}isEnabled(){return this.enabled}hasTitle(){return"string"==typeof this?.title}isPrompt(){return"PROMPT"===this.state||"PROMPT_COMPLETED"===this.state}isPaused(){return"PAUSED"===this.state}isClosed(){return this.closed}async pause(t){const e=this.state;this.state$="PAUSED",this.message$={paused:Date.now()+t},await Mr(t),this.state$=e,this.message$={paused:null}}async run(t,e){const r=Qe((e=>(e instanceof Yr?(e.options={...this.options,...e.options},e.rendererClass=Ir("silent"),this.subtasks=e.tasks,e.errors=this.listr.errors,this.emit("SUBTASK",this.subtasks),e=e.run(t)):e instanceof Promise?e=e.then(r):sr(e)?e=new Promise(((t,r)=>{e.on("data",(t=>{this.output$=t.toString()})),e.on("error",(t=>r(t))),e.on("end",(()=>t(null)))})):rr(e)&&(e=new Promise(((t,r)=>{e.subscribe({next:Qe((t=>{this.output$=t}),"next"),error:r,complete:t})}))),e)),"handleResult"),s=Date.now();this.state$="STARTED";const n=await Br(this.task?.skip??!1,t);if(n)return"string"==typeof n?this.message$={skip:n}:this.hasTitle()?this.message$={skip:this.title}:this.message$={skip:"Skipped task without a title."},void(this.state$="SKIPPED");try{const n="number"==typeof this.task?.retry&&this.task.retry>0?this.task.retry+1:"object"==typeof this.task?.retry&&this.task.retry.tries>0?this.task.retry.tries+1:1,i="object"==typeof this.task.retry&&this.task.retry.delay;for(let s=1;s<=n;s++)try{await r(this.taskFn(t,e));break}catch(t){if(s===n)throw t;this.retry={count:s,error:t},this.message$={retry:this.retry},this.title$=this.initialTitle,this.output=void 0,e.report(t,"WILL_RETRY"),this.state$="RETRY",i&&await this.pause(i)}(this.isStarted()||this.isRetrying())&&(this.message$={duration:Date.now()-s},this.state$="COMPLETED")}catch(r){if(this.prompt instanceof Ur&&(r=this.prompt),this.task?.rollback){e.report(r,"WILL_ROLLBACK");try{this.state$="ROLLING_BACK",await this.task.rollback(t,e),this.message$={rollback:this.title},this.state$="ROLLED_BACK"}catch(t){throw this.state$="FAILED",e.report(t,"HAS_FAILED_TO_ROLLBACK"),this.close(),t}if(!1!==this.listr.options?.exitAfterRollback)throw this.close(),r}else{if(this.state$="FAILED",!1!==this.listr.options.exitOnError&&!1!==await Br(this.task?.exitOnError,t))throw e.report(r,"HAS_FAILED"),this.close(),r;this.hasSubtasks()||e.report(r,"HAS_FAILED_WITHOUT_ERROR")}}finally{this.close()}}close(){this.emit("CLOSED"),this.listr.events.emit("SHOUD_REFRESH_RENDER"),this.complete()}},zr=class extends er{static{Qe(this,"ListrEventManager")}},Yr=class{constructor(t,e,r){this.task=t,this.options=e,this.parentTask=r,this.options={concurrent:!1,renderer:"default",fallbackRenderer:"simple",exitOnError:!0,exitAfterRollback:!0,collectErrors:!1,registerSignalListeners:!0,...this.parentTask?.options??{},...e},!0===this.options.concurrent?this.options.concurrent=1/0:"number"!=typeof this.options.concurrent&&(this.options.concurrent=1),this.concurrency=new Dr({concurrency:this.options.concurrent}),r&&(this.path=[...r.listr.path,r.title],this.errors=r.listr.errors),this.parentTask?.listr.events instanceof zr?this.events=this.parentTask.listr.events:this.events=new zr,(this.options?.forceTTY||process.env.LISTR_FORCE_TTY)&&(process.stdout.isTTY=!0,process.stderr.isTTY=!0),this.options?.forceUnicode&&(process.env.LISTR_FORCE_UNICODE="1");const s=$r({renderer:this.options.renderer,rendererOptions:this.options.rendererOptions,fallbackRenderer:this.options.fallbackRenderer,fallbackRendererOptions:this.options.fallbackRendererOptions,fallbackRendererCondition:this.options?.fallbackRendererCondition,silentRendererCondition:this.options?.silentRendererCondition});this.rendererClass=s.renderer,this.rendererClassOptions=s.options,this.rendererSelection=s.selection,this.add(t??[]),this.options.registerSignalListeners&&(this.boundSignalHandler=this.signalHandler.bind(this),process.once("SIGINT",this.boundSignalHandler).setMaxListeners(0))}static{Qe(this,"Listr")}tasks=[];errors=[];ctx;events;path=[];rendererClass;rendererClassOptions;rendererSelection;boundSignalHandler;concurrency;renderer;isRoot(){return!this.parentTask}isSubtask(){return!!this.parentTask}add(t){this.tasks.push(...this.generate(t))}async run(t){this.renderer||(this.renderer=new this.rendererClass(this.tasks,this.rendererClassOptions,this.events)),await this.renderer.render(),this.ctx=this.options?.ctx??t??{},await Promise.all(this.tasks.map((t=>t.check(this.ctx))));try{await Promise.all(this.tasks.map((t=>this.concurrency.add((()=>this.runTask(t)))))),this.renderer.end(),this.removeSignalHandler()}catch(t){if(!1!==this.options.exitOnError)throw this.renderer.end(t),this.removeSignalHandler(),t}return this.ctx}generate(t){return(t=Array.isArray(t)?t:[t]).map((t=>{let e;return"PRIMARY"===this.rendererSelection?e=t.rendererOptions:"SECONDARY"===this.rendererSelection&&(e=t.fallbackRendererOptions),new Wr(this,t,this.options,this.rendererClassOptions,e)}))}async runTask(t){if(await t.check(this.ctx))return new jr(t).run(this.ctx)}signalHandler(){this.tasks?.forEach((async t=>{t.isPending()&&(t.state$="FAILED")})),this.isRoot()&&(this.renderer?.end(new Error("Interrupted.")),process.exit(127))}removeSignalHandler(){this.boundSignalHandler&&process.removeListener("SIGINT",this.boundSignalHandler)}};const qr=Nt.Ay.blue(pr.arrowRight),Vr=Nt.Ay.redBright(pr.cross),Xr=Nt.Ay.yellow(pr.warning),Qr=(t,e,r)=>`${Nt.Ay.redBright(`${Vr} Validation Error:`)}\n\n Invalid value for '${Nt.Ay.bold(t)}': ${Nt.Ay.bold((0,Ot.inspect)(r))}\n\n ${e}`,Zr=Nt.Ay.redBright(`${Vr} Current directory is not a git directory!`),Jr=Nt.Ay.redBright(`${Vr} Failed to get staged files!`),ts=`${Vr} No valid configuration found.`,es=`${qr} No staged files found.`,rs=`${qr} No staged files match any configured task.`,ss=Nt.Ay.yellow(`${Xr} Some of your tasks use \`git add\` command. Please remove it from the config since all modifications made by tasks will be automatically added to the git commit index.\n`),ns="Skipped because of errors from tasks.",is=`\n ${Nt.Ay.redBright(`${Vr} lint-staged failed due to a git error.`)}`,os=(t,e,r)=>`${Nt.Ay.redBright(`${Vr} Validation Error:`)}\n\n Invalid value for option '${Nt.Ay.bold(t)}': ${Nt.Ay.bold(e)}\n\n ${r}\n\nSee https://github.com/okonet/lint-staged#command-line-flags`,as=`\n ${Nt.Ay.yellow(`${Xr} lint-staged prevented an empty git commit.\n Use the --allow-empty option to continue, or check your task configuration`)}\n`,cs=(Nt.Ay.redBright(`${Vr} Failed to read config from stdin.`),(t,e)=>`${Nt.Ay.redBright(`${e} Failed to parse config from file "${t}".`)}\n\n${e}\n\nSee https://github.com/okonet/lint-staged#configuration.`),ls=(t={},e)=>{if(!Array.isArray(t.output))return;const r=t.errors?.size>0?e.error:e.log;for(const e of t.output)r(e)},us=t=>{if(t===i.posix.sep||t===i.win32.sep)return i.posix.sep;let e=t.split(/[/\\]+/).join(i.posix.sep);return(t.startsWith("\\\\?\\")||t.startsWith("\\\\.\\"))&&(e=e.replace(/^\/(\.|\?)/,"//$1")),e.endsWith(i.posix.sep)&&(e=e.slice(0,-1)),e},ps=s("lint-staged:chunkFiles"),ds=({files:t,baseDir:e,maxArgLength:r=null,relative:s=!1})=>{const n=t.map((t=>us(s||!e?t:i.resolve(e,t))));if(!r)return ps("Skip chunking files because of undefined maxArgLength"),[n];const o=n.join(" ").length;ps(`Resolved an argument string length of ${o} characters from ${n.length} files`);const a=Math.min(Math.ceil(o/r),n.length);return ps(`Creating ${a} chunks for maxArgLength of ${r}`),((t,e)=>{if(1===e)return[t];const r=[];let s=0;for(let n=0;n<e;n++){const i=Math.ceil((t.length-s)/(e-n));r.push([]),r[n]=t.slice(s,i+s),s+=i}return r})(n,a)};var hs=r(7498);const fs=s("lint-staged:generateTasks"),gs=({config:t,cwd:e=process.cwd(),files:r,relative:s=!1})=>{fs("Generating linter tasks");const n=r.map((t=>us(i.relative(e,t))));return Object.entries(t).map((([t,r])=>{const o=t.startsWith("../"),a=n.filter((t=>!!o||!t.startsWith("..")&&!i.isAbsolute(t))),c=hs(a,t,{cwd:e,dot:!0,matchBase:!t.includes("/"),posixSlashes:!0,strictBrackets:!0}),l={pattern:t,commands:r,fileList:c.map((t=>us(s?t:i.resolve(e,t))))};return fs("Generated task: \n%O",l),l}))};var ms=r(7075);const ys=new RegExp(w.EOL+"$"),bs=t=>new ms.Writable({write:function(e,r,s){t(e.toString().replace(ys,"")),s()}}),Es=({renderer:t},{FORCE_COLOR:e})=>"silent"===t||"test"===t||Number(e)>0?t:"verbose",ws=(t,e,r=process.env)=>{const s=(({debug:t,quiet:e},r,s)=>e?{renderer:"silent"}:"test"===s.NODE_ENV?{renderer:"test",rendererOptions:{logger:new mr({processOutput:new Er(bs(r.log),bs(r.error))})}}:t||"dumb"===s.TERM?{renderer:"verbose"}:{renderer:"update",rendererOptions:{formatOutput:"truncate"}})(t,e,r);return{...s,fallbackRenderer:Es(s,r)}},As=(t,e)=>["diff",`--diff-filter=${void 0!==e?e.trim():"ACMR"}`,...void 0!==t?t.trim().split(" "):["--staged"]],Ss=t=>t?t.replace(/\u0000$/,"").split("\0"):[];var Rs=r(1455);const Cs=s("lint-staged:file"),vs=async(t,e=!0)=>{Cs("Reading file `%s`",t);try{return await Rs.readFile(t)}catch(r){if(e&&"ENOENT"===r.code)return Cs("File `%s` doesn't exist, ignoring...",t),null;throw r}},Ts=async(t,e=!0)=>{Cs("Removing file `%s`",t);try{await Rs.unlink(t)}catch(r){if(!e||"ENOENT"!==r.code)throw r;Cs("File `%s` doesn't exist, ignoring...",t)}},Os=async(t,e)=>{Cs("Writing file `%s`",t),await Rs.writeFile(t,e)},xs=Symbol("ApplyEmptyCommitError"),ks=new Error("Configuration could not be found"),_s=new Error("Configuration should be an object or a function"),Ls=new Error("Configuration should not be empty"),Ps=Symbol("GetBackupStashError"),Is=Symbol("GetStagedFilesError"),$s=Symbol("GitError"),Bs=Symbol("GitRepoError"),Hs=Symbol("HideUnstagedChangesError"),Fs=new Error("Invalid Options"),Ds=Symbol("RestoreMergeStatusError"),Ms=Symbol("RestoreOriginalStateError"),Ns=Symbol("RestoreUnstagedChangesError"),Gs=Symbol("TaskError"),Us=s("lint-staged:GitWorkflow"),js=/\x00/,Ks=(t,e=!0)=>t.reduce(((t,r)=>{if(js.test(r)){const[s,n]=r.split(js);e&&t.push(n),t.push(s)}else t.push(r);return t}),[]),Ws="lint-staged automatic backup",zs="lint-staged_unstaged.patch",Ys=["--binary","--unified=0","--no-color","--no-ext-diff","--src-prefix=a/","--dst-prefix=b/","--patch","--submodule=short"],qs=["-v","--whitespace=nowarn","--recount","--unidiff-zero"],Vs=(t,e,r)=>{throw e.errors.add($s),r&&e.errors.add(r),t};class Xs{constructor({allowEmpty:t,gitConfigDir:e,topLevelDir:r,matchedFileChunks:s,diff:n,diffFilter:o}){this.execGit=(t,e={})=>Mt(t,{...e,cwd:r}),this.deletedFiles=[],this.gitConfigDir=e,this.topLevelDir=r,this.diff=n,this.diffFilter=o,this.allowEmpty=t,this.matchedFileChunks=s,this.mergeHeadFilename=i.resolve(e,"MERGE_HEAD"),this.mergeModeFilename=i.resolve(e,"MERGE_MODE"),this.mergeMsgFilename=i.resolve(e,"MERGE_MSG")}getHiddenFilepath(t){return i.resolve(this.gitConfigDir,`./${t}`)}async getBackupStash(t){const e=(await this.execGit(["stash","list"])).split("\n").findIndex((e=>e.includes(Ws)&&e.includes(t.backupHash)));if(-1===e)throw t.errors.add(Ps),new Error("lint-staged automatic backup is missing!");return String(e)}async getDeletedFiles(){Us("Getting deleted files...");const t=(await this.execGit(["ls-files","--deleted"])).split("\n").filter(Boolean).map((t=>i.resolve(this.topLevelDir,t)));return Us("Found deleted files:",t),t}async backupMergeStatus(){Us("Backing up merge state..."),await Promise.all([vs(this.mergeHeadFilename).then((t=>this.mergeHeadBuffer=t)),vs(this.mergeModeFilename).then((t=>this.mergeModeBuffer=t)),vs(this.mergeMsgFilename).then((t=>this.mergeMsgBuffer=t))]),Us("Done backing up merge state!")}async restoreMergeStatus(t){Us("Restoring merge state...");try{await Promise.all([this.mergeHeadBuffer&&Os(this.mergeHeadFilename,this.mergeHeadBuffer),this.mergeModeBuffer&&Os(this.mergeModeFilename,this.mergeModeBuffer),this.mergeMsgBuffer&&Os(this.mergeMsgFilename,this.mergeMsgBuffer)]),Us("Done restoring merge state!")}catch(e){Us("Failed restoring merge state with error:"),Us(e),Vs(new Error("Merge state could not be restored due to an error!"),t,Ds)}}async getPartiallyStagedFiles(){Us("Getting partially staged files...");const t=(await this.execGit(["status","-z"])).split(/\x00(?=[ AMDRCU?!]{2} |$)/).filter((t=>{const[e,r]=t;return" "!==e&&" "!==r&&"?"!==e&&"?"!==r})).map((t=>t.substr(3))).filter(Boolean);return Us("Found partially staged files:",t),t.length?t:null}async prepare(t,e){try{if(Us(e.title),this.partiallyStagedFiles=await this.getPartiallyStagedFiles(),this.partiallyStagedFiles){t.hasPartiallyStagedFiles=!0;const e=this.getHiddenFilepath(zs),r=Ks(this.partiallyStagedFiles);await this.execGit(["diff",...Ys,"--output",e,"--",...r])}else t.hasPartiallyStagedFiles=!1;if(!t.shouldBackup)return;await this.backupMergeStatus(),this.deletedFiles=await this.getDeletedFiles();const r=await this.execGit(["stash","create"]);t.backupHash=await this.execGit(["rev-parse","--short",r]),await this.execGit(["stash","store","--quiet","--message",`${Ws} (${t.backupHash})`,t.backupHash]),e.title=`Backed up original state in git stash (${t.backupHash})`,Us(e.title)}catch(e){Vs(e,t)}}async hideUnstagedChanges(t){try{const t=Ks(this.partiallyStagedFiles,!1);await this.execGit(["checkout","--force","--",...t])}catch(e){Vs(e,t,Hs)}}async applyModifications(t){Us("Adding task modifications to index...");for(const t of this.matchedFileChunks)await this.execGit(["add","--",...t]);Us("Done adding task modifications to index!"),await this.execGit([...As(this.diff,this.diffFilter),"--name-only","-z"])||this.allowEmpty||Vs(new Error("Prevented an empty git commit!"),t,xs)}async restoreUnstagedChanges(t){Us("Restoring unstaged changes...");const e=this.getHiddenFilepath(zs);try{await this.execGit(["apply",...qs,e])}catch(r){Us("Error while restoring changes:"),Us(r),Us("Retrying with 3-way merge");try{await this.execGit(["apply",...qs,"--3way",e])}catch(e){Us("Error while restoring unstaged changes using 3-way merge:"),Us(e),Vs(new Error("Unstaged changes could not be restored due to a merge conflict!"),t,Ns)}}}async restoreOriginalState(t){try{Us("Restoring original state..."),await this.execGit(["reset","--hard","HEAD"]),await this.execGit(["stash","apply","--quiet","--index",await this.getBackupStash(t)]),await this.restoreMergeStatus(t),await Promise.all(this.deletedFiles.map((t=>Ts(t)))),await Ts(this.getHiddenFilepath(zs)),Us("Done restoring original state!")}catch(e){Vs(e,t,Ms)}}async cleanup(t){try{Us("Dropping backup stash..."),await this.execGit(["stash","drop","--quiet",await this.getBackupStash(t)]),Us("Done dropping backup stash!")}catch(e){Vs(e,t)}}}const Qs=s("lint-staged:groupFilesByConfig");var Zs=r(6454);function Js(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0;r<t.length;r++){var s=t[r];if("string"==typeof s)return s}}var tn=r(4434);const en=({quiet:t=!1}={})=>({hasPartiallyStagedFiles:null,shouldBackup:null,backupHash:null,shouldHidePartiallyStaged:!0,errors:new Set([]),events:new tn,output:[],quiet:t}),rn=t=>t.hasPartiallyStagedFiles&&t.shouldHidePartiallyStaged,sn=t=>!!t.shouldBackup&&(t.errors.has($s)?is:t.errors.has(Gs)?ns:void 0),nn=t=>t.errors.has($s)?is:t.errors.has(Gs)?ns:void 0,on=t=>t.shouldBackup&&(t.errors.has(Gs)||t.errors.has(Ns)),an=t=>{if(t.errors.has($s)&&!t.errors.has(Ns))return is},cn=t=>t.shouldBackup,ln=t=>an(t)||t.errors.has(Ms)?is:void 0,un=t=>t.replaceAll(" ","\\ "),pn="lint-staged:taskError",dn=s("lint-staged:resolveTaskFn"),hn=({code:t,killed:e,signal:r})=>(e?"KILLED":r)||t||"FAILED",fn=(t,e,r,s=!1)=>{const{stderr:n,stdout:i}=e;if(n||i){const e=s?Nt.Ay.redBright(`${Vr} ${t}:`):`${qr} ${t}:`,o=[].concat(r.quiet?[]:["",e]).concat(n||[]).concat(i||[]);r.output.push(o.join("\n"))}else if(s){const s=hn(e),n=Nt.Ay.redBright(`\n${Vr} ${t} failed without output (${s}).`);r.quiet||r.output.push(n)}},gn=({command:t,cwd:e=process.cwd(),files:r,topLevelDir:s,isFn:n,shell:i=!1,verbose:o=!1})=>{const[a,...c]=function(t){var e,r=/([^\s'"]([^\s'"]*(['"])([^\3]*?)\3)+[^\s'"]*)|[^\s'"]+|(['"])([^\5]*?)\5/gi,s=t,n=[];do{null!==(e=r.exec(s))&&n.push(Js(e[1],e[6],e[0]))}while(null!==e);return n}(t);dn("cmd:",a),dn("args:",c);const l={cwd:/^git(\.exe)?/i.test(a)?s:e,preferLocal:!0,reject:!1,shell:i,stdin:"ignore"};return dn("execaOptions:",l),async(e=en())=>{const s=i?function(t,e){const[r,...s]=(t=>{const e=[];for(const r of t.trim().split(St)){const t=e.at(-1);t&&t.endsWith("\\")?e[e.length-1]=`${t.slice(0,-1)} ${r}`:e.push(r)}return e})(t);return It(r,s,e)}(n?t:`${t} ${r.map(un).join(" ")}`,l):It(a,n?c:c.concat(r),l),u=((t,e)=>{let r;const s=async()=>{r=(async t=>{try{const e=await Zs(t.pid);for(const t of e)try{process.kill(t)}catch(e){dn('Failed to kill process with pid "%d": %o',t,e)}}catch(e){dn('Failed to kill process with pid "%d": %o',t.pid,e)}t.kill()})(e),await r};return t.events.on(pn,s,{once:!0}),async()=>{t.events.off(pn,s),await r}})(e,s),p=await s;if(await u(),p.failed||p.killed||null!=p.signal)throw((t,e,r)=>{r.errors.add(Gs),r.events.emit(pn,Gs),fn(t,e,r,!0);const s=hn(e);return new Error(`${Nt.Ay.redBright(t)} ${Nt.Ay.dim(`[${s}]`)}`)})(t,p,e);o&&fn(t,p,e)}},mn=s("lint-staged:makeCmdTasks"),yn=async({commands:t,cwd:e,files:r,topLevelDir:s,shell:n,verbose:i})=>{mn("Creating listr tasks for commands %o",t);const o=Array.isArray(t)?t:[t],a=[];for(const t of o){const o="function"==typeof t,c=o?await t([...r]):t,l=Array.isArray(c)?c:[c];for(const t of l){if(o&&"string"!=typeof t)throw new Error(Qr("[Function]","Function task should return a string or an array of strings",c));const l=gn({command:t,cwd:e,files:r,topLevelDir:s,isFn:o,shell:n,verbose:i});a.push({title:t,command:t,task:l})}}return a},bn=s("lint-staged:resolveGitRepo"),En=["package.json","package.yaml","package.yml",".lintstagedrc",".lintstagedrc.json",".lintstagedrc.yaml",".lintstagedrc.yml",".lintstagedrc.mjs",".lintstagedrc.mts",".lintstagedrc.js",".lintstagedrc.ts",".lintstagedrc.cjs",".lintstagedrc.cts","lint-staged.config.mjs","lint-staged.config.mts","lint-staged.config.js","lint-staged.config.ts","lint-staged.config.cjs","lint-staged.config.cts"],wn=async()=>{},An=/(?<![\\$])({)(?:(?!(?<!\\),|\.\.|\{|\}).)*?(?<!\\)(})/g,Sn=/{{[^}{]*}}/,Rn=s("lint-staged:validateConfig"),Cn=t=>t&&"object"==typeof t&&!Array.isArray(t),vn=new Map([["concurrent",t=>"boolean"==typeof t],["chunkSize",t=>"number"==typeof t],["globOptions",Cn],["linters",Cn],["ignore",t=>Array.isArray(t)],["subTaskConcurrency",t=>"number"==typeof t],["renderer",t=>"string"==typeof t],["relative",t=>"boolean"==typeof t]]),Tn=(t,e,r)=>{try{return((t,e,r)=>{if(Rn("Validating config from `%s`...",e),!t||"object"!=typeof t&&"function"!=typeof t)throw _s;if("function"==typeof t)return{"*":t};if(0===Object.entries(t).length)throw Ls;const s=[],n=Object.entries(t).reduce(((t,[e,n])=>{if(vn.has(e))return vn.get(e)(n)&&s.push(Qr(e,"Advanced configuration has been deprecated.",n)),t;Array.isArray(n)&&!n.some((t=>"string"!=typeof t&&"function"!=typeof t))||"string"==typeof n||"function"==typeof n||s.push(Qr(e,"Should be a string, a function, or an array of strings and functions.",n));const i=((t,e)=>{const r=(t=>{let e=`${t}`;const r=Sn.exec(t)?.[0];if(r){const t=r.replace("{{","{").replace("}}","}");e=e.replace(r,t)}return e})((t=>{let e=`${t}`,r=null;for(;r=An.exec(t);){const t=r[0],s=t.replace(/{/,"").replace(/}/,"");e=e.replace(t,s)}return e})(t));var s,n;return r!==t&&e.warn((s=t,n=r,Nt.Ay.yellow(`${Xr} Detected incorrect braces with only single value: \`${s}\`. Reformatted as: \`${n}\`\n`))),r})(e,r);return Object.assign(t,{[i]:n})}),{});if(s.length){const t=s.join("\n\n");throw r.error(cs(e,t)),new Error(t)}return Rn("Validated config from `%s`:",e),Rn((0,Ot.inspect)(t,{compact:!1})),n})(t,e,r)}catch(t){throw r.error(cs(e,t)),t}},On=s("lint-staged:searchConfigs"),xn=["ls-files","-z","--full-name","-t"],kn=t=>En.includes(i.basename(t)),_n=t=>t.split("/").length,Ln=(t,e)=>_n(t)>_n(e)?-1:1,Pn=s("lint-staged:runAll"),In=t=>Object.assign(new Error("lint-staged failed"),{ctx:t}),$n=async({allowEmpty:t=!1,concurrent:e=!0,configObject:r,configPath:s,cwd:n,debug:o=!1,diff:a,diffFilter:c,maxArgLength:l,quiet:u=!1,relative:p=!1,shell:d=!1,stash:h=void 0===a,hidePartiallyStaged:f=h,verbose:g=!1},m=console)=>{Pn("Running all linter scripts...");const y=!!n;n=y?i.resolve(n):process.cwd(),Pn("Using working directory `%s`",n);const b=en({quiet:u}),{topLevelDir:E,gitConfigDir:w}=await(async(t=process.cwd())=>{try{bn("Resolving git repo from `%s`",t),bn("Unset GIT_DIR (was `%s`)",process.env.GIT_DIR),delete process.env.GIT_DIR,bn("Unset GIT_WORK_TREE (was `%s`)",process.env.GIT_WORK_TREE),delete process.env.GIT_WORK_TREE;const e=await Mt(["rev-parse","--show-cdup"],{cwd:t}),r=us(i.join(t,e));bn("Resolved git repository top-level directory to be `%s`",r);const s=await(async t=>{const e=Mt(["rev-parse","--show-toplevel"],{cwd:t}),r=Mt(["rev-parse","--absolute-git-dir"],{cwd:t}),[s,n]=await Promise.all([e,r]);return i.relative(s,n)})(t),n=us(i.join(r,s));return bn("Resolved git config directory to be `%s`",n),{topLevelDir:r,gitConfigDir:n}}catch(t){return bn("Failed to resolve git repo with error:",t),{error:t,topLevelDir:null,gitConfigDir:null}}})(n);if(!E)throw u||b.output.push(Zr),b.errors.add(Bs),In(b);const A=await Mt(["log","-1"],{cwd:E}).then((()=>!0)).catch((()=>!1));b.shouldBackup=A&&h,b.shouldBackup||u||m.warn(((t,e)=>{const r=void 0!==e?"`--diff` was used":t?"`--no-stash` was used":"there\u2019s no initial commit yet";return Nt.Ay.yellow(`${Xr} Skipping backup because ${r}.\n`)})(A,a)),b.shouldHidePartiallyStaged=f,b.shouldHidePartiallyStaged||u||m.warn(((t,e)=>{const r=void 0!==e?"`--diff` was used":t?"`--no-hide-partially-staged` was used":"`--no-stash` was used";return Nt.Ay.yellow(`${Xr} Skipping hiding unstaged changes from partially staged files because ${r}.\n`)})(A&&h,a));const S=await(async({cwd:t=process.cwd(),diff:e,diffFilter:r}={})=>{try{const s=await Mt([...As(e,r),"--raw","-z"],{cwd:t});return s?s.slice(1).split("\0:").map(Ss).flatMap((([e,r,s])=>{const[,n,,,,]=e.split(" ");if("160000"===n)return[];const o=s??r;return[us(i.resolve(t,o))]})):[]}catch{return null}})({cwd:E,diff:a,diffFilter:c});if(!S)throw u||b.output.push(Jr),b.errors.add(Is),In(b);if(Pn("Loaded list of staged files in git:\n%O",S),0===S.length)return u||b.output.push(es),b;const R=await(async({configObject:t,configPath:e,cwd:r=process.cwd(),topLevelDir:s=r},n)=>{if(On("Searching for configuration files..."),t)return On("Using single direct configuration object..."),{"":Tn(t,"config object",n)};if(e){On("Using single configuration path...");const{config:t,filepath:r}=await wn();return t?{[e]:Tn(t,r,n)}:{}}const[o,a]=await Promise.all([Mt(xn,{cwd:s}).then(Ss),Mt([...xn,"--others","--exclude-standard"],{cwd:s}).then(Ss)]),c=[...o,...a].flatMap((t=>t.startsWith("S ")?[]:[t.replace(/^[HSMRCK?U] /,"")])).filter(kn).map((t=>us(i.join(s,t)))).filter((l=r,t=>t.startsWith(us(l)))).sort(Ln);var l;On("Found possible config files:",c);const u=c.reduce(((t,e)=>Object.assign(t,{[e]:null})),{});await Promise.all(Object.keys(u).map((t=>wn().then((({config:e,filepath:r})=>{e&&(t!==r&&On('Config file "%s" resolved to "%s"',t,r),u[t]=Tn(e,r,n))})))));const p=Object.entries(u).filter((([,t])=>!!t)).reduce(((t,[e,r])=>Object.assign(t,{[e]:r})),{});if(!Object.keys(p).length){On('Could not find config files inside "%s"',r);const{config:t,filepath:e}=await wn();t?(On('Found parent configuration file from "%s"',e),p[e]=Tn(t,e,n)):On('Could not find parent configuration files from "%s"',r)}return On("Found %d config files",Object.keys(p).length),p})({configObject:r,configPath:s,cwd:n,topLevelDir:E},m),C=Object.keys(R).length;if(0===C)throw b.errors.add(ks),In(b);const v=await(async({configs:t,files:e,singleConfigMode:r})=>{Qs("Grouping %d files by %d configurations",e.length,Object.keys(t).length);const s=new Set(e),n={};for(const[o,a]of Object.entries(t)){if(r){n[o]={config:a,files:e};break}const t=i.normalize(i.dirname(o)),c=e=>{const r=i.relative(t,e);return r&&!r.startsWith("..")&&!i.isAbsolute(r)},l=Object.keys(a).some((t=>t.startsWith(".."))),u=new Set(l?s:void 0);l||s.forEach((t=>{c(t)&&u.add(t)})),u.forEach((t=>{s.delete(t)})),n[o]={config:a,files:Array.from(u)}}return n})({configs:R,files:S,singleConfigMode:r||void 0!==s}),T=C>1;let O=!1;const x={ctx:b,exitOnError:!1,registerSignalListeners:!1,...ws({debug:o,quiet:u},m)};let k=0;const _=[],L=new Set;for(const[t,{config:r,files:s}]of Object.entries(v)){const o=t?us(i.relative(n,t)):"Config object",a=ds({baseDir:E,files:s,maxArgLength:l,relative:p}),c=T&&!y?i.dirname(t):n,u=a.length;u>1&&Pn("Chunked staged files from `%s` into %d part",t,u);for(const[t,s]of a.entries()){const n=await Promise.all(gs({config:r,cwd:c,files:s,relative:p}).map((t=>yn({commands:t.commands,cwd:c,files:t.fileList,topLevelDir:E,shell:d,verbose:g}).then((e=>{t.fileList.forEach((t=>{const e=i.isAbsolute(t)?t:us(i.join(c,t));L.add(e)})),O=O||e.some((t=>"git add"===t.command));const r=t.fileList.length;return{title:`${t.pattern}${Nt.Ay.dim(` \u2014 ${r} ${1===r?"file":"files"}`)}`,task:async(t,r)=>r.newListr(e,{concurrent:!1,exitOnError:!0}),skip:()=>0===r&&`${t.pattern}${Nt.Ay.dim(" \u2014 no files")}`}})))));k+=n.length,_.push({title:`${o}${Nt.Ay.dim(` \u2014 ${s.length} ${s.length>1?"files":"file"}`)}`+(u>1?Nt.Ay.dim(` (chunk ${t+1}/${u})...`):""),task:(t,r)=>r.newListr(n,{concurrent:e,exitOnError:!0}),skip:()=>b.errors.has($s)?"Skipped because of previous git error.":!!n.every((t=>t.skip()))&&`${o}${Nt.Ay.dim(" \u2014 no tasks to run")}`})}}if(O&&!u&&m.warn(ss),_.every((t=>t.skip())))return u||b.output.push(rs),b;const P=ds({baseDir:n,files:Array.from(L),maxArgLength:l,relative:!1}),I=new Xs({allowEmpty:t,gitConfigDir:w,topLevelDir:E,matchedFileChunks:P,diff:a,diffFilter:c}),$=new Yr([{title:b.shouldBackup?"Backing up original state...":"Preparing lint-staged...",task:(t,e)=>I.prepare(t,e)},{title:"Hiding unstaged changes to partially staged files...",task:t=>I.hideUnstagedChanges(t),enabled:rn},{title:`Running tasks for ${a?"changed":"staged"} files...`,task:(t,r)=>r.newListr(_,{concurrent:e}),skip:()=>_.every((t=>t.skip()))},{title:"Applying modifications from tasks...",task:t=>I.applyModifications(t),skip:sn},{title:"Restoring unstaged changes to partially staged files...",task:t=>I.restoreUnstagedChanges(t),enabled:rn,skip:nn},{title:"Reverting to original state because of errors...",task:t=>I.restoreOriginalState(t),enabled:on,skip:an},{title:"Cleaning up temporary files...",task:t=>I.cleanup(t),enabled:cn,skip:ln}],x);if(Pn("Set max event listeners to the number of tasks: %i",k),b.events.setMaxListeners(k),await $.run(),b.errors.size>0)throw In(b);return b},Bn=s("lint-staged:validateOptions"),Hn=s("lint-staged"),Fn=()=>{switch(process.platform){case"darwin":return 262144;case"win32":return 8191;default:return 131072}},Dn=async({allowEmpty:t=!1,concurrent:e=!0,config:n,configPath:o,cwd:a,debug:c=!1,diff:l,diffFilter:u,maxArgLength:p=Fn()/2,quiet:d=!1,relative:h=!1,shell:f=!1,stash:g=void 0===l,hidePartiallyStaged:m=g,verbose:y=!1}={},b=console)=>{c&&(s.enable("lint-staged*"),Hn("Running `lint-staged@%s` on Node.js %s (%s)",await(async()=>JSON.parse(await Rs.readFile(new URL(r(4545),r.b))).version)(),process.version,process.platform));const E=await Mt(["version","--build-options"],{cwd:a});Hn("%s",E);const w={allowEmpty:t,concurrent:e,configObject:n,configPath:o,cwd:a,debug:c,diff:l,diffFilter:u,maxArgLength:p,quiet:d,relative:h,shell:f,stash:g,hidePartiallyStaged:m,verbose:y};await(async(t={},e)=>{if(Bn("Validating options..."),"string"==typeof t.cwd)try{const e=i.resolve(t.cwd);await Rs.access(e,D.constants.F_OK)}catch(r){throw Bn("Failed to validate options: %o",t),e.error(os("cwd",t.cwd,r.message)),Fs}if("string"==typeof t.shell)try{await Rs.access(t.shell,D.constants.X_OK)}catch(r){throw Bn("Failed to validate options: %o",t),e.error(os("shell",t.shell,r.message)),Fs}Bn("Validated options: %o",t)})(w,b),Hn("Unset GIT_LITERAL_PATHSPECS (was `%s`)",process.env.GIT_LITERAL_PATHSPECS),delete process.env.GIT_LITERAL_PATHSPECS;try{const t=await $n(w,b);return Hn("Tasks were executed successfully!"),ls(t,b),!0}catch(t){if(t?.ctx?.errors){const{ctx:e}=t;return e.errors.has(ks)?b.error(ts):e.errors.has(xs)?b.warn(as):!e.errors.has($s)&&!ln(e)||e.errors.has(Ps)||(b.error(is),e.shouldBackup&&b.error("Any lost modifications can be restored from a git stash:\n\n > git stash list\n stash@{0}: automatic lint-staged backup\n > git stash apply --index stash@{0}\n")),ls(e,b),!1}throw t}}},3803:(t,e,r)=>{const s=r(6928),n=r(1905),i=r(9695);function o(t,e){const r=t.options.env||process.env,o=process.cwd(),a=null!=t.options.cwd,c=a&&void 0!==process.chdir&&!process.chdir.disabled;if(c)try{process.chdir(t.options.cwd)}catch(t){}let l;try{l=n.sync(t.command,{path:r[i({env:r})],pathExt:e?s.delimiter:void 0})}catch(t){}finally{c&&process.chdir(o)}return l&&(l=s.resolve(a?t.options.cwd:"",l)),l}t.exports=function(t){return o(t)||o(t,!0)}},3866:t=>{var e=1e3,r=60*e,s=60*r,n=24*s,i=7*n;function o(t,e,r,s){var n=e>=1.5*r;return Math.round(t/r)+" "+s+(n?"s":"")}t.exports=function(t,a){a=a||{};var c,l,u=typeof t;if("string"===u&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var a=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*i;case"days":case"day":case"d":return a*n;case"hours":case"hour":case"hrs":case"hr":case"h":return a*s;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(t);if("number"===u&&isFinite(t))return a.long?(c=t,(l=Math.abs(c))>=n?o(c,l,n,"day"):l>=s?o(c,l,s,"hour"):l>=r?o(c,l,r,"minute"):l>=e?o(c,l,e,"second"):c+" ms"):function(t){var i=Math.abs(t);return i>=n?Math.round(t/n)+"d":i>=s?Math.round(t/s)+"h":i>=r?Math.round(t/r)+"m":i>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},4078:(t,e,r)=>{const s=r(303),n=r(5111),i=r(9288),o=r(3585),a=(t,e={})=>{let r=[];if(Array.isArray(t))for(const s of t){const t=a.create(s,e);Array.isArray(t)?r.push(...t):r.push(t)}else r=[].concat(a.create(t,e));return e&&!0===e.expand&&!0===e.nodupes&&(r=[...new Set(r)]),r};a.parse=(t,e={})=>o(t,e),a.stringify=(t,e={})=>s("string"==typeof t?a.parse(t,e):t,e),a.compile=(t,e={})=>("string"==typeof t&&(t=a.parse(t,e)),n(t,e)),a.expand=(t,e={})=>{"string"==typeof t&&(t=a.parse(t,e));let r=i(t,e);return!0===e.noempty&&(r=r.filter(Boolean)),!0===e.nodupes&&(r=[...new Set(r)]),r},a.create=(t,e={})=>""===t||t.length<3?[t]:!0!==e.expand?a.compile(t,e):a.expand(t,e),t.exports=a},4182:(t,e,r)=>{var s=r(857),n={ps:()=>r(433),wmic:()=>r(7868)},i=s.platform();i.startsWith("win")&&(i="win");var o={darwin:"ps",sunos:"ps",freebsd:"ps",netbsd:"ps",win:"wmic",linux:"ps",aix:"ps"}[i];t.exports=function(t){void 0===o&&t(new Error(s.platform()+" is not supported yet, please open an issue (https://github.com/simonepri/pidtree)")),n[o]()(t)}},4421:(t,e,r)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;e.splice(1,0,r,"color: inherit");let s=0,n=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(s++,"%c"===t&&(n=s))})),e.splice(n,0,r)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=r(4948)(e);const{formatters:s}=t.exports;s.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},4545:(t,e,r)=>{t.exports=r.p+"../../node_modules/.pnpm/lint-staged@15.5.2_patch_hash=c3594b9a865a9ce29084d773f4b9b07cc07efc27a806e0c04709fa6b66d5f315/node_modules/lint-staged/package.json"},4710:(t,e,r)=>{const s=r(9789),n=(t,e,r)=>{if(!1===s(t))throw new TypeError("toRegexRange: expected the first argument to be a number");if(void 0===e||t===e)return String(t);if(!1===s(e))throw new TypeError("toRegexRange: expected the second argument to be a number.");let i={relaxZeros:!0,...r};"boolean"==typeof i.strictZeros&&(i.relaxZeros=!1===i.strictZeros);let c=t+":"+e+"="+String(i.relaxZeros)+String(i.shorthand)+String(i.capture)+String(i.wrap);if(n.cache.hasOwnProperty(c))return n.cache[c].result;let l=Math.min(t,e),u=Math.max(t,e);if(1===Math.abs(l-u)){let r=t+"|"+e;return i.capture?`(${r})`:!1===i.wrap?r:`(?:${r})`}let p=h(t)||h(e),d={min:t,max:e,a:l,b:u},f=[],g=[];return p&&(d.isPadded=p,d.maxLen=String(d.max).length),l<0&&(g=o(u<0?Math.abs(u):1,Math.abs(l),d,i),l=d.a=0),u>=0&&(f=o(l,u,d,i)),d.negatives=g,d.positives=f,d.result=function(t,e){let r=a(t,e,"-",!1)||[],s=a(e,t,"",!1)||[],n=a(t,e,"-?",!0)||[];return r.concat(n).concat(s).join("|")}(g,f),!0===i.capture?d.result=`(${d.result})`:!1!==i.wrap&&f.length+g.length>1&&(d.result=`(?:${d.result})`),n.cache[c]=d,d.result};function i(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let s=function(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}(t,e),n=s.length,i="",o=0;for(let t=0;t<n;t++){let[e,r]=s[t];e===r?i+=e:"0"!==e||"9"!==r?i+=`[${a=e}${(c=r)-a===1?"":"-"}${c}]`:o++}var a,c;return o&&(i+=!0===r.shorthand?"\\d":"[0-9]"),{pattern:i,count:[o],digits:n}}function o(t,e,r,s){let n,o=function(t,e){let r=1,s=1,n=u(t,r),i=new Set([e]);for(;t<=n&&n<=e;)i.add(n),r+=1,n=u(t,r);for(n=p(e+1,s)-1;t<n&&n<=e;)i.add(n),s+=1,n=p(e+1,s)-1;return i=[...i],i.sort(c),i}(t,e),a=[],l=t;for(let t=0;t<o.length;t++){let e=o[t],c=i(String(l),String(e),s),u="";r.isPadded||!n||n.pattern!==c.pattern?(r.isPadded&&(u=f(e,r,s)),c.string=u+c.pattern+d(c.count),a.push(c),l=e+1,n=c):(n.count.length>1&&n.count.pop(),n.count.push(c.count[0]),n.string=n.pattern+d(n.count),l=e+1)}return a}function a(t,e,r,s,n){let i=[];for(let n of t){let{string:t}=n;s||l(e,"string",t)||i.push(r+t),s&&l(e,"string",t)&&i.push(r+t)}return i}function c(t,e){return t>e?1:e>t?-1:0}function l(t,e,r){return t.some((t=>t[e]===r))}function u(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function p(t,e){return t-t%Math.pow(10,e)}function d(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function h(t){return/^-?(0+)\d/.test(t)}function f(t,e,r){if(!e.isPadded)return t;let s=Math.abs(e.maxLen-String(t).length),n=!1!==r.relaxZeros;switch(s){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${s}}`:`0{${s}}`}}n.cache={},n.clearCache=()=>n.cache={},t.exports=n},4751:(t,e,r)=>{const s=r(6928),n="\\\\/",i=`[^${n}]`,o="\\.",a="\\/",c="[^/]",l=`(?:${a}|$)`,u=`(?:^|${a})`,p=`${o}{1,2}${l}`,d={DOT_LITERAL:o,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:a,ONE_CHAR:"(?=.)",QMARK:c,END_ANCHOR:l,DOTS_SLASH:p,NO_DOT:`(?!${o})`,NO_DOTS:`(?!${u}${p})`,NO_DOT_SLASH:`(?!${o}{0,1}${l})`,NO_DOTS_SLASH:`(?!${p})`,QMARK_NO_DOT:`[^.${a}]`,STAR:`${c}*?`,START_ANCHOR:u},h={...d,SLASH_LITERAL:`[${n}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${o}{1,2}(?:[${n}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${n}])${o}{1,2}(?:[${n}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${n}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${n}]|$))`,QMARK_NO_DOT:`[^.${n}]`,START_ANCHOR:`(?:^|[${n}])`,END_ANCHOR:`(?:[${n}]|$)`};t.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{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"},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:s.sep,extglobChars:t=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:t=>!0===t?h:d}},4891:t=>{t.exports=(t,e)=>{e=e||process.argv;const r=t.startsWith("-")?"":1===t.length?"-":"--",s=e.indexOf(r+t),n=e.indexOf("--");return-1!==s&&(-1===n||s<n)}},4948:(t,e,r)=>{t.exports=function(t){function e(t){let r,n,i,o=null;function a(...t){if(!a.enabled)return;const s=a,n=Number(new Date),i=n-(r||n);s.diff=i,s.prev=r,s.curr=n,r=n,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let o=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((r,n)=>{if("%%"===r)return"%";o++;const i=e.formatters[n];if("function"==typeof i){const e=t[o];r=i.call(s,e),t.splice(o,1),o--}return r})),e.formatArgs.call(s,t),(s.log||e.log).apply(s,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=s,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(n!==e.namespaces&&(n=e.namespaces,i=e.enabled(t)),i),set:t=>{o=t}}),"function"==typeof e.init&&e.init(a),a}function s(t,r){const s=e(this.namespace+(void 0===r?":":r)+t);return s.log=this.log,s}function n(t,e){let r=0,s=0,n=-1,i=0;for(;r<t.length;)if(s<e.length&&(e[s]===t[r]||"*"===e[s]))"*"===e[s]?(n=s,i=r,s++):(r++,s++);else{if(-1===n)return!1;s=n+1,i++,r=i}for(;s<e.length&&"*"===e[s];)s++;return s===e.length}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names,...e.skips.map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const t of r)"-"===t[0]?e.skips.push(t.slice(1)):e.names.push(t)},e.enabled=function(t){for(const r of e.skips)if(n(t,r))return!1;for(const r of e.names)if(n(t,r))return!0;return!1},e.humanize=r(3866),e.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach((r=>{e[r]=t[r]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let r=0;for(let e=0;e<t.length;e++)r=(r<<5)-r+t.charCodeAt(e),r|=0;return e.colors[Math.abs(r)%e.colors.length]},e.enable(e.load()),e}},5111:(t,e,r)=>{const s=r(2411),n=r(1811);t.exports=(t,e={})=>{const r=(t,i={})=>{const o=n.isInvalidBrace(i),a=!0===t.invalid&&!0===e.escapeInvalid,c=!0===o||!0===a,l=!0===e.escapeInvalid?"\\":"";let u="";if(!0===t.isOpen)return l+t.value;if(!0===t.isClose)return console.log("node.isClose",l,t.value),l+t.value;if("open"===t.type)return c?l+t.value:"(";if("close"===t.type)return c?l+t.value:")";if("comma"===t.type)return"comma"===t.prev.type?"":c?t.value:"|";if(t.value)return t.value;if(t.nodes&&t.ranges>0){const r=n.reduce(t.nodes),i=s(...r,{...e,wrap:!1,toRegex:!0,strictZeros:!0});if(0!==i.length)return r.length>1&&i.length>1?`(${i})`:i}if(t.nodes)for(const e of t.nodes)u+=r(e,t);return u};return r(t)}},5453:(t,e,r)=>{const s=r(4751),n=r(6927),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:l}=s,u=(t,e)=>{if("function"==typeof e.expandRange)return e.expandRange(...t,e);t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch(e){return t.map((t=>n.escapeRegex(t))).join("..")}return r},p=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,d=(t,e)=>{if("string"!=typeof t)throw new TypeError("Expected a string");t=l[t]||t;const r={...e},h="number"==typeof r.maxLength?Math.min(i,r.maxLength):i;let f=t.length;if(f>h)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${h}`);const g={type:"bos",value:"",output:r.prepend||""},m=[g],y=r.capture?"":"?:",b=n.isWindows(e),E=s.globChars(b),w=s.extglobChars(E),{DOT_LITERAL:A,PLUS_LITERAL:S,SLASH_LITERAL:R,ONE_CHAR:C,DOTS_SLASH:v,NO_DOT:T,NO_DOT_SLASH:O,NO_DOTS_SLASH:x,QMARK:k,QMARK_NO_DOT:_,STAR:L,START_ANCHOR:P}=E,I=t=>`(${y}(?:(?!${P}${t.dot?v:A}).)*?)`,$=r.dot?"":T,B=r.dot?k:_;let H=!0===r.bash?I(r):L;r.capture&&(H=`(${H})`),"boolean"==typeof r.noext&&(r.noextglob=r.noext);const F={input:t,index:-1,start:0,dot:!0===r.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:m};t=n.removePrefix(t,F),f=t.length;const D=[],M=[],N=[];let G,U=g;const j=()=>F.index===f-1,K=F.peek=(e=1)=>t[F.index+e],W=F.advance=()=>t[++F.index]||"",z=()=>t.slice(F.index+1),Y=(t="",e=0)=>{F.consumed+=t,F.index+=e},q=t=>{F.output+=null!=t.output?t.output:t.value,Y(t.value)},V=()=>{let t=1;for(;"!"===K()&&("("!==K(2)||"?"===K(3));)W(),F.start++,t++;return t%2!=0&&(F.negated=!0,F.start++,!0)},X=t=>{F[t]++,N.push(t)},Q=t=>{F[t]--,N.pop()},Z=t=>{if("globstar"===U.type){const e=F.braces>0&&("comma"===t.type||"brace"===t.type),r=!0===t.extglob||D.length&&("pipe"===t.type||"paren"===t.type);"slash"===t.type||"paren"===t.type||e||r||(F.output=F.output.slice(0,-U.output.length),U.type="star",U.value="*",U.output=H,F.output+=U.output)}if(D.length&&"paren"!==t.type&&(D[D.length-1].inner+=t.value),(t.value||t.output)&&q(t),U&&"text"===U.type&&"text"===t.type)return U.value+=t.value,void(U.output=(U.output||"")+t.value);t.prev=U,m.push(t),U=t},J=(t,e)=>{const s={...w[e],conditions:1,inner:""};s.prev=U,s.parens=F.parens,s.output=F.output;const n=(r.capture?"(":"")+s.open;X("parens"),Z({type:t,value:e,output:F.output?"":C}),Z({type:"paren",extglob:!0,value:W(),output:n}),D.push(s)},tt=t=>{let s,n=t.close+(r.capture?")":"");if("negate"===t.type){let i=H;if(t.inner&&t.inner.length>1&&t.inner.includes("/")&&(i=I(r)),(i!==H||j()||/^\)+$/.test(z()))&&(n=t.close=`)$))${i}`),t.inner.includes("*")&&(s=z())&&/^\.[^\\/.]+$/.test(s)){const r=d(s,{...e,fastpaths:!1}).output;n=t.close=`)${r})${i})`}"bos"===t.prev.type&&(F.negatedExtglob=!0)}Z({type:"paren",extglob:!0,value:G,output:n}),Q("parens")};if(!1!==r.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(t)){let s=!1,i=t.replace(c,((t,e,r,n,i,o)=>"\\"===n?(s=!0,t):"?"===n?e?e+n+(i?k.repeat(i.length):""):0===o?B+(i?k.repeat(i.length):""):k.repeat(r.length):"."===n?A.repeat(r.length):"*"===n?e?e+n+(i?H:""):H:e?t:`\\${t}`));return!0===s&&(i=!0===r.unescape?i.replace(/\\/g,""):i.replace(/\\+/g,(t=>t.length%2==0?"\\\\":t?"\\":""))),i===t&&!0===r.contains?(F.output=t,F):(F.output=n.wrapOutput(i,F,e),F)}for(;!j();){if(G=W(),"\0"===G)continue;if("\\"===G){const t=K();if("/"===t&&!0!==r.bash)continue;if("."===t||";"===t)continue;if(!t){G+="\\",Z({type:"text",value:G});continue}const e=/^\\+/.exec(z());let s=0;if(e&&e[0].length>2&&(s=e[0].length,F.index+=s,s%2!=0&&(G+="\\")),!0===r.unescape?G=W():G+=W(),0===F.brackets){Z({type:"text",value:G});continue}}if(F.brackets>0&&("]"!==G||"["===U.value||"[^"===U.value)){if(!1!==r.posix&&":"===G){const t=U.value.slice(1);if(t.includes("[")&&(U.posix=!0,t.includes(":"))){const t=U.value.lastIndexOf("["),e=U.value.slice(0,t),r=U.value.slice(t+2),s=o[r];if(s){U.value=e+s,F.backtrack=!0,W(),g.output||1!==m.indexOf(U)||(g.output=C);continue}}}("["===G&&":"!==K()||"-"===G&&"]"===K())&&(G=`\\${G}`),"]"!==G||"["!==U.value&&"[^"!==U.value||(G=`\\${G}`),!0===r.posix&&"!"===G&&"["===U.value&&(G="^"),U.value+=G,q({value:G});continue}if(1===F.quotes&&'"'!==G){G=n.escapeRegex(G),U.value+=G,q({value:G});continue}if('"'===G){F.quotes=1===F.quotes?0:1,!0===r.keepQuotes&&Z({type:"text",value:G});continue}if("("===G){X("parens"),Z({type:"paren",value:G});continue}if(")"===G){if(0===F.parens&&!0===r.strictBrackets)throw new SyntaxError(p("opening","("));const t=D[D.length-1];if(t&&F.parens===t.parens+1){tt(D.pop());continue}Z({type:"paren",value:G,output:F.parens?")":"\\)"}),Q("parens");continue}if("["===G){if(!0!==r.nobracket&&z().includes("]"))X("brackets");else{if(!0!==r.nobracket&&!0===r.strictBrackets)throw new SyntaxError(p("closing","]"));G=`\\${G}`}Z({type:"bracket",value:G});continue}if("]"===G){if(!0===r.nobracket||U&&"bracket"===U.type&&1===U.value.length){Z({type:"text",value:G,output:`\\${G}`});continue}if(0===F.brackets){if(!0===r.strictBrackets)throw new SyntaxError(p("opening","["));Z({type:"text",value:G,output:`\\${G}`});continue}Q("brackets");const t=U.value.slice(1);if(!0===U.posix||"^"!==t[0]||t.includes("/")||(G=`/${G}`),U.value+=G,q({value:G}),!1===r.literalBrackets||n.hasRegexChars(t))continue;const e=n.escapeRegex(U.value);if(F.output=F.output.slice(0,-U.value.length),!0===r.literalBrackets){F.output+=e,U.value=e;continue}U.value=`(${y}${e}|${U.value})`,F.output+=U.value;continue}if("{"===G&&!0!==r.nobrace){X("braces");const t={type:"brace",value:G,output:"(",outputIndex:F.output.length,tokensIndex:F.tokens.length};M.push(t),Z(t);continue}if("}"===G){const t=M[M.length-1];if(!0===r.nobrace||!t){Z({type:"text",value:G,output:G});continue}let e=")";if(!0===t.dots){const t=m.slice(),s=[];for(let e=t.length-1;e>=0&&(m.pop(),"brace"!==t[e].type);e--)"dots"!==t[e].type&&s.unshift(t[e].value);e=u(s,r),F.backtrack=!0}if(!0!==t.comma&&!0!==t.dots){const r=F.output.slice(0,t.outputIndex),s=F.tokens.slice(t.tokensIndex);t.value=t.output="\\{",G=e="\\}",F.output=r;for(const t of s)F.output+=t.output||t.value}Z({type:"brace",value:G,output:e}),Q("braces"),M.pop();continue}if("|"===G){D.length>0&&D[D.length-1].conditions++,Z({type:"text",value:G});continue}if(","===G){let t=G;const e=M[M.length-1];e&&"braces"===N[N.length-1]&&(e.comma=!0,t="|"),Z({type:"comma",value:G,output:t});continue}if("/"===G){if("dot"===U.type&&F.index===F.start+1){F.start=F.index+1,F.consumed="",F.output="",m.pop(),U=g;continue}Z({type:"slash",value:G,output:R});continue}if("."===G){if(F.braces>0&&"dot"===U.type){"."===U.value&&(U.output=A);const t=M[M.length-1];U.type="dots",U.output+=G,U.value+=G,t.dots=!0;continue}if(F.braces+F.parens===0&&"bos"!==U.type&&"slash"!==U.type){Z({type:"text",value:G,output:A});continue}Z({type:"dot",value:G,output:A});continue}if("?"===G){if((!U||"("!==U.value)&&!0!==r.noextglob&&"("===K()&&"?"!==K(2)){J("qmark",G);continue}if(U&&"paren"===U.type){const t=K();let e=G;if("<"===t&&!n.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");("("===U.value&&!/[!=<:]/.test(t)||"<"===t&&!/<([!=]|\w+>)/.test(z()))&&(e=`\\${G}`),Z({type:"text",value:G,output:e});continue}if(!0!==r.dot&&("slash"===U.type||"bos"===U.type)){Z({type:"qmark",value:G,output:_});continue}Z({type:"qmark",value:G,output:k});continue}if("!"===G){if(!0!==r.noextglob&&"("===K()&&("?"!==K(2)||!/[!=<:]/.test(K(3)))){J("negate",G);continue}if(!0!==r.nonegate&&0===F.index){V();continue}}if("+"===G){if(!0!==r.noextglob&&"("===K()&&"?"!==K(2)){J("plus",G);continue}if(U&&"("===U.value||!1===r.regex){Z({type:"plus",value:G,output:S});continue}if(U&&("bracket"===U.type||"paren"===U.type||"brace"===U.type)||F.parens>0){Z({type:"plus",value:G});continue}Z({type:"plus",value:S});continue}if("@"===G){if(!0!==r.noextglob&&"("===K()&&"?"!==K(2)){Z({type:"at",extglob:!0,value:G,output:""});continue}Z({type:"text",value:G});continue}if("*"!==G){"$"!==G&&"^"!==G||(G=`\\${G}`);const t=a.exec(z());t&&(G+=t[0],F.index+=t[0].length),Z({type:"text",value:G});continue}if(U&&("globstar"===U.type||!0===U.star)){U.type="star",U.star=!0,U.value+=G,U.output=H,F.backtrack=!0,F.globstar=!0,Y(G);continue}let e=z();if(!0!==r.noextglob&&/^\([^?]/.test(e)){J("star",G);continue}if("star"===U.type){if(!0===r.noglobstar){Y(G);continue}const s=U.prev,n=s.prev,i="slash"===s.type||"bos"===s.type,o=n&&("star"===n.type||"globstar"===n.type);if(!0===r.bash&&(!i||e[0]&&"/"!==e[0])){Z({type:"star",value:G,output:""});continue}const a=F.braces>0&&("comma"===s.type||"brace"===s.type),c=D.length&&("pipe"===s.type||"paren"===s.type);if(!i&&"paren"!==s.type&&!a&&!c){Z({type:"star",value:G,output:""});continue}for(;"/**"===e.slice(0,3);){const r=t[F.index+4];if(r&&"/"!==r)break;e=e.slice(3),Y("/**",3)}if("bos"===s.type&&j()){U.type="globstar",U.value+=G,U.output=I(r),F.output=U.output,F.globstar=!0,Y(G);continue}if("slash"===s.type&&"bos"!==s.prev.type&&!o&&j()){F.output=F.output.slice(0,-(s.output+U.output).length),s.output=`(?:${s.output}`,U.type="globstar",U.output=I(r)+(r.strictSlashes?")":"|$)"),U.value+=G,F.globstar=!0,F.output+=s.output+U.output,Y(G);continue}if("slash"===s.type&&"bos"!==s.prev.type&&"/"===e[0]){const t=void 0!==e[1]?"|$":"";F.output=F.output.slice(0,-(s.output+U.output).length),s.output=`(?:${s.output}`,U.type="globstar",U.output=`${I(r)}${R}|${R}${t})`,U.value+=G,F.output+=s.output+U.output,F.globstar=!0,Y(G+W()),Z({type:"slash",value:"/",output:""});continue}if("bos"===s.type&&"/"===e[0]){U.type="globstar",U.value+=G,U.output=`(?:^|${R}|${I(r)}${R})`,F.output=U.output,F.globstar=!0,Y(G+W()),Z({type:"slash",value:"/",output:""});continue}F.output=F.output.slice(0,-U.output.length),U.type="globstar",U.output=I(r),U.value+=G,F.output+=U.output,F.globstar=!0,Y(G);continue}const s={type:"star",value:G,output:H};!0!==r.bash?!U||"bracket"!==U.type&&"paren"!==U.type||!0!==r.regex?(F.index!==F.start&&"slash"!==U.type&&"dot"!==U.type||("dot"===U.type?(F.output+=O,U.output+=O):!0===r.dot?(F.output+=x,U.output+=x):(F.output+=$,U.output+=$),"*"!==K()&&(F.output+=C,U.output+=C)),Z(s)):(s.output=G,Z(s)):(s.output=".*?","bos"!==U.type&&"slash"!==U.type||(s.output=$+s.output),Z(s))}for(;F.brackets>0;){if(!0===r.strictBrackets)throw new SyntaxError(p("closing","]"));F.output=n.escapeLast(F.output,"["),Q("brackets")}for(;F.parens>0;){if(!0===r.strictBrackets)throw new SyntaxError(p("closing",")"));F.output=n.escapeLast(F.output,"("),Q("parens")}for(;F.braces>0;){if(!0===r.strictBrackets)throw new SyntaxError(p("closing","}"));F.output=n.escapeLast(F.output,"{"),Q("braces")}if(!0===r.strictSlashes||"star"!==U.type&&"bracket"!==U.type||Z({type:"maybe_slash",value:"",output:`${R}?`}),!0===F.backtrack){F.output="";for(const t of F.tokens)F.output+=null!=t.output?t.output:t.value,t.suffix&&(F.output+=t.suffix)}return F};d.fastpaths=(t,e)=>{const r={...e},o="number"==typeof r.maxLength?Math.min(i,r.maxLength):i,a=t.length;if(a>o)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);t=l[t]||t;const c=n.isWindows(e),{DOT_LITERAL:u,SLASH_LITERAL:p,ONE_CHAR:d,DOTS_SLASH:h,NO_DOT:f,NO_DOTS:g,NO_DOTS_SLASH:m,STAR:y,START_ANCHOR:b}=s.globChars(c),E=r.dot?g:f,w=r.dot?m:f,A=r.capture?"":"?:";let S=!0===r.bash?".*?":y;r.capture&&(S=`(${S})`);const R=t=>!0===t.noglobstar?S:`(${A}(?:(?!${b}${t.dot?h:u}).)*?)`,C=t=>{switch(t){case"*":return`${E}${d}${S}`;case".*":return`${u}${d}${S}`;case"*.*":return`${E}${S}${u}${d}${S}`;case"*/*":return`${E}${S}${p}${d}${w}${S}`;case"**":return E+R(r);case"**/*":return`(?:${E}${R(r)}${p})?${w}${d}${S}`;case"**/*.*":return`(?:${E}${R(r)}${p})?${w}${S}${u}${d}${S}`;case"**/.*":return`(?:${E}${R(r)}${p})?${u}${d}${S}`;default:{const e=/^(.*?)\.(\w+)$/.exec(t);if(!e)return;const r=C(e[1]);if(!r)return;return r+u+e[2]}}},v=n.removePrefix(t,{negated:!1,prefix:""});let T=C(v);return T&&!0!==r.strictSlashes&&(T+=`${p}?`),T},t.exports=d},5562:(t,e,r)=>{t.exports=r(8996)},6179:(t,e,r)=>{var s=r(4182);t.exports=function(t,e,r){"function"==typeof e&&(r=e,e={}),"object"!=typeof e&&(e={}),t=parseInt(t,10),isNaN(t)||t<-1?r(new TypeError("The pid provided is invalid")):s((function(s,n){if(s)r(s);else if(-1!==t){for(var i,o=0;o<n.length;o++){if(n[o][1]===t){i=e.advanced?{ppid:n[o][0],pid:t}:t;break}n[o][0]===t&&(i=e.advanced?{pid:t}:t)}if(i){for(var a={};n.length>0;){var c=n.pop();a[c[0]]?a[c[0]].push(c[1]):a[c[0]]=[c[1]]}for(var l=0,u=[i];l<u.length;){var p=e.advanced?u[l++].pid:u[l++];if(a[p]){for(var d=a[p].length,h=0;h<d;h++)u.push(e.advanced?{ppid:p,pid:a[p][h]}:a[p][h]);delete a[p]}}e.root||u.shift(),r(null,u)}else r(new Error("No matching pid found"))}else{for(var f=0;f<n.length;f++)n[f]=e.advanced?{ppid:n[f][0],pid:n[f][1]}:n[f]=n[f][1];r(null,n)}}))}},6296:t=>{var e=Object.prototype.hasOwnProperty,r="~";function s(){}function n(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function i(t,e,s,i,o){if("function"!=typeof s)throw new TypeError("The listener must be a function");var a=new n(s,i||t,o),c=r?r+e:e;return t._events[c]?t._events[c].fn?t._events[c]=[t._events[c],a]:t._events[c].push(a):(t._events[c]=a,t._eventsCount++),t}function o(t,e){0===--t._eventsCount?t._events=new s:delete t._events[e]}function a(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,s,n=[];if(0===this._eventsCount)return n;for(s in t=this._events)e.call(t,s)&&n.push(r?s.slice(1):s);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=r?r+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var n=0,i=s.length,o=new Array(i);n<i;n++)o[n]=s[n].fn;return o},a.prototype.listenerCount=function(t){var e=r?r+t:t,s=this._events[e];return s?s.fn?1:s.length:0},a.prototype.emit=function(t,e,s,n,i,o){var a=r?r+t:t;if(!this._events[a])return!1;var c,l,u=this._events[a],p=arguments.length;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),p){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,e),!0;case 3:return u.fn.call(u.context,e,s),!0;case 4:return u.fn.call(u.context,e,s,n),!0;case 5:return u.fn.call(u.context,e,s,n,i),!0;case 6:return u.fn.call(u.context,e,s,n,i,o),!0}for(l=1,c=new Array(p-1);l<p;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var d,h=u.length;for(l=0;l<h;l++)switch(u[l].once&&this.removeListener(t,u[l].fn,void 0,!0),p){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,e);break;case 3:u[l].fn.call(u[l].context,e,s);break;case 4:u[l].fn.call(u[l].context,e,s,n);break;default:if(!c)for(d=1,c=new Array(p-1);d<p;d++)c[d-1]=arguments[d];u[l].fn.apply(u[l].context,c)}}return!0},a.prototype.on=function(t,e,r){return i(this,t,e,r,!1)},a.prototype.once=function(t,e,r){return i(this,t,e,r,!0)},a.prototype.removeListener=function(t,e,s,n){var i=r?r+t:t;if(!this._events[i])return this;if(!e)return o(this,i),this;var a=this._events[i];if(a.fn)a.fn!==e||n&&!a.once||s&&a.context!==s||o(this,i);else{for(var c=0,l=[],u=a.length;c<u;c++)(a[c].fn!==e||n&&!a[c].once||s&&a[c].context!==s)&&l.push(a[c]);l.length?this._events[i]=1===l.length?l[0]:l:o(this,i)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&o(this,e)):(this._events=new s,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,t.exports=a},6454:(t,e,r)=>{String.prototype.startsWith||(String.prototype.startsWith=function(t){return this.substring(0,t.length)===t});var s=r(6179);t.exports=function(t,e,r){var n,i,o;if("function"==typeof e&&(r=e,e=void 0),"function"!=typeof r)return n=s,i=t,o=e,new Promise((function(t,e){n(i,o,(function(r,s){if(r)return e(r);t(s)}))}));s(t,e,r)}},6507:(t,e,r)=>{const s=r(5317),n=r(8388),i=r(442);function o(t,e,r){const o=n(t,e,r),a=s.spawn(o.command,o.args,o.options);return i.hookChildProcess(a,o),a}t.exports=o,t.exports.spawn=o,t.exports.sync=function(t,e,r){const o=n(t,e,r),a=s.spawnSync(o.command,o.args,o.options);return a.error=a.error||i.verifyENOENTSync(a.status,o),a},t.exports._parse=n,t.exports._enoent=i},6927:(t,e,r)=>{const s=r(6928),n="win32"===process.platform,{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:c}=r(4751);e.isObject=t=>null!==t&&"object"==typeof t&&!Array.isArray(t),e.hasRegexChars=t=>a.test(t),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=t=>t.replace(c,"\\$1"),e.toPosixSlashes=t=>t.replace(i,"/"),e.removeBackslashes=t=>t.replace(o,(t=>"\\"===t?"":t)),e.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);return 3===t.length&&t[0]>=9||8===t[0]&&t[1]>=10},e.isWindows=t=>t&&"boolean"==typeof t.windows?t.windows:!0===n||"\\"===s.sep,e.escapeLast=(t,r,s)=>{const n=t.lastIndexOf(r,s);return-1===n?t:"\\"===t[n-1]?e.escapeLast(t,r,n-1):`${t.slice(0,n)}\\${t.slice(n)}`},e.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r},e.wrapOutput=(t,e={},r={})=>{let s=`${r.contains?"":"^"}(?:${t})${r.contains?"":"$"}`;return!0===e.negated&&(s=`(?:^(?!${s}).*$)`),s}},7017:(t,e,r)=>{r.d(e,{cf:()=>p});const s=[];s.push("SIGHUP","SIGINT","SIGTERM"),"win32"!==process.platform&&s.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&s.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const n=t=>!!t&&"object"==typeof t&&"function"==typeof t.removeListener&&"function"==typeof t.emit&&"function"==typeof t.reallyExit&&"function"==typeof t.listeners&&"function"==typeof t.kill&&"number"==typeof t.pid&&"function"==typeof t.on,i=Symbol.for("signal-exit emitter"),o=globalThis,a=Object.defineProperty.bind(Object);class c{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(o[i])return o[i];a(o,i,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,e){this.listeners[t].push(e)}removeListener(t,e){const r=this.listeners[t],s=r.indexOf(e);-1!==s&&(0===s&&1===r.length?r.length=0:r.splice(s,1))}emit(t,e,r){if(this.emitted[t])return!1;this.emitted[t]=!0;let s=!1;for(const n of this.listeners[t])s=!0===n(e,r)||s;return"exit"===t&&(s=this.emit("afterExit",e,r)||s),s}}class l{}const u=globalThis.process,{onExit:p,load:d,unload:h}=(f=n(u)?new class extends l{#t="win32"===u.platform?"SIGINT":"SIGHUP";#e=new c;#r;#s;#n;#i={};#o=!1;constructor(t){super(),this.#r=t,this.#i={};for(const e of s)this.#i[e]=()=>{const r=this.#r.listeners(e);let{count:s}=this.#e;const n=t;if("object"==typeof n.__signal_exit_emitter__&&"number"==typeof n.__signal_exit_emitter__.count&&(s+=n.__signal_exit_emitter__.count),r.length===s){this.unload();const r=this.#e.emit("exit",null,e),s="SIGHUP"===e?this.#t:e;r||t.kill(t.pid,s)}};this.#n=t.reallyExit,this.#s=t.emit}onExit(t,e){if(!n(this.#r))return()=>{};!1===this.#o&&this.load();const r=e?.alwaysLast?"afterExit":"exit";return this.#e.on(r,t),()=>{this.#e.removeListener(r,t),0===this.#e.listeners.exit.length&&0===this.#e.listeners.afterExit.length&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#e.count+=1;for(const t of s)try{const e=this.#i[t];e&&this.#r.on(t,e)}catch(t){}this.#r.emit=(t,...e)=>this.#a(t,...e),this.#r.reallyExit=t=>this.#c(t)}}unload(){this.#o&&(this.#o=!1,s.forEach((t=>{const e=this.#i[t];if(!e)throw new Error("Listener not defined for signal: "+t);try{this.#r.removeListener(t,e)}catch(t){}})),this.#r.emit=this.#s,this.#r.reallyExit=this.#n,this.#e.count-=1)}#c(t){return n(this.#r)?(this.#r.exitCode=t||0,this.#e.emit("exit",this.#r.exitCode,null),this.#n.call(this.#r,this.#r.exitCode)):0}#a(t,...e){const r=this.#s;if("exit"===t&&n(this.#r)){"number"==typeof e[0]&&(this.#r.exitCode=e[0]);const s=r.call(this.#r,t,...e);return this.#e.emit("exit",this.#r.exitCode,null),s}return r.call(this.#r,t,...e)}}(u):new class extends l{onExit(){return()=>{}}load(){}unload(){}},{onExit:(t,e)=>f.onExit(t,e),load:()=>f.load(),unload:()=>f.unload()});var f},7235:(t,e,r)=>{function s(t={}){const{env:e=process.env,platform:r=process.platform}=t;return"win32"!==r?"PATH":Object.keys(e).reverse().find((t=>"PATH"===t.toUpperCase()))||"Path"}r.d(e,{A:()=>s})},7257:t=>{t.exports=/^#!(.*)/},7498:(t,e,r)=>{const s=r(9023),n=r(4078),i=r(5562),o=r(6927),a=t=>""===t||"./"===t,c=t=>{const e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1},l=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let s=new Set,n=new Set,o=new Set,a=0,c=t=>{o.add(t.output),r&&r.onResult&&r.onResult(t)};for(let o=0;o<e.length;o++){let l=i(String(e[o]),{...r,onResult:c},!0),u=l.state.negated||l.state.negatedExtglob;u&&a++;for(let e of t){let t=l(e,!0);(u?!t.isMatch:t.isMatch)&&(u?s.add(t.output):(s.delete(t.output),n.add(t.output)))}}let l=(a===e.length?[...o]:[...n]).filter((t=>!s.has(t)));if(r&&0===l.length){if(!0===r.failglob)throw new Error(`No matches found for "${e.join(", ")}"`);if(!0===r.nonull||!0===r.nullglob)return r.unescape?e.map((t=>t.replace(/\\/g,""))):e}return l};l.match=l,l.matcher=(t,e)=>i(t,e),l.any=l.isMatch=(t,e,r)=>i(e,r)(t),l.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set,n=[],i=new Set(l(t,e,{...r,onResult:t=>{r.onResult&&r.onResult(t),n.push(t.output)}}));for(let t of n)i.has(t)||s.add(t);return[...s]},l.contains=(t,e,r)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${s.inspect(t)}"`);if(Array.isArray(e))return e.some((e=>l.contains(t,e,r)));if("string"==typeof e){if(a(t)||a(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return l.isMatch(t,e,{...r,contains:!0})},l.matchKeys=(t,e,r)=>{if(!o.isObject(t))throw new TypeError("Expected the first argument to be an object");let s=l(Object.keys(t),e,r),n={};for(let e of s)n[e]=t[e];return n},l.some=(t,e,r)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=i(String(t),r);if(s.some((t=>e(t))))return!0}return!1},l.every=(t,e,r)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=i(String(t),r);if(!s.every((t=>e(t))))return!1}return!0},l.all=(t,e,r)=>{if("string"!=typeof t)throw new TypeError(`Expected a string: "${s.inspect(t)}"`);return[].concat(e).every((e=>i(e,r)(t)))},l.capture=(t,e,r)=>{let s=o.isWindows(r),n=i.makeRe(String(t),{...r,capture:!0}).exec(s?o.toPosixSlashes(e):e);if(n)return n.slice(1).map((t=>void 0===t?"":t))},l.makeRe=(...t)=>i.makeRe(...t),l.scan=(...t)=>i.scan(...t),l.parse=(t,e)=>{let r=[];for(let s of[].concat(t||[]))for(let t of n(String(s),e))r.push(i.parse(t,e));return r},l.braces=(t,e)=>{if("string"!=typeof t)throw new TypeError("Expected a string");return e&&!0===e.nobrace||!c(t)?[t]:n(t,e)},l.braceExpand=(t,e)=>{if("string"!=typeof t)throw new TypeError("Expected a string");return l.braces(t,{...e,expand:!0})},l.hasBraces=c,t.exports=l},7868:(t,e,r)=>{var s=r(857),n=r(2775);t.exports=function(t){n("wmic",["PROCESS","get","ParentProcessId,ProcessId"],{windowsHide:!0,windowsVerbatimArguments:!0},(function(e,r,n){if(e)t(e);else if(0===n)try{r=r.split(s.EOL);for(var i=[],o=1;o<r.length;o++)r[o]=r[o].trim(),r[o]&&(r[o]=r[o].split(/\s+/),r[o][0]=parseInt(r[o][0],10),r[o][1]=parseInt(r[o][1],10),i.push(r[o]));t(null,i)}catch(e){t(e)}else t(new Error("pidtree wmic command exited with code "+n))}))}},8388:(t,e,r)=>{const s=r(6928),n=r(3803),i=r(2077),o=r(1880),a="win32"===process.platform,c=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;t.exports=function(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null);const u={command:t,args:e=e?e.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:t,args:e}};return r.shell?u:function(t){if(!a)return t;const e=function(t){t.file=n(t);const e=t.file&&o(t.file);return e?(t.args.unshift(t.file),t.command=e,n(t)):t.file}(t),r=!c.test(e);if(t.options.forceShell||r){const r=l.test(e);t.command=s.normalize(t.command),t.command=i.command(t.command),t.args=t.args.map((t=>i.argument(t,r)));const 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}(u)}},8541:(t,e,r)=>{t.exports=i,i.sync=function(t,e){return n(s.statSync(t),t,e)};var s=r(9896);function n(t,e,r){return!(!t.isSymbolicLink()&&!t.isFile())&&function(t,e){var r=void 0!==e.pathExt?e.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var s=0;s<r.length;s++){var n=r[s].toLowerCase();if(n&&t.substr(-n.length).toLowerCase()===n)return!0}return!1}(e,r)}function i(t,e,r){s.stat(t,(function(s,i){r(s,!s&&n(i,t,e))}))}},8996:(t,e,r)=>{const s=r(6928),n=r(3297),i=r(5453),o=r(6927),a=r(4751),c=(t,e,r=!1)=>{if(Array.isArray(t)){const s=t.map((t=>c(t,e,r))),n=t=>{for(const e of s){const r=e(t);if(r)return r}return!1};return n}const s=(n=t)&&"object"==typeof n&&!Array.isArray(n)&&t.tokens&&t.input;var n;if(""===t||"string"!=typeof t&&!s)throw new TypeError("Expected pattern to be a non-empty string");const i=e||{},a=o.isWindows(e),l=s?c.compileRe(t,e):c.makeRe(t,e,!1,!0),u=l.state;delete l.state;let p=()=>!1;if(i.ignore){const t={...e,ignore:null,onMatch:null,onResult:null};p=c(i.ignore,t,r)}const d=(r,s=!1)=>{const{isMatch:n,match:o,output:d}=c.test(r,l,e,{glob:t,posix:a}),h={glob:t,state:u,regex:l,posix:a,input:r,output:d,match:o,isMatch:n};return"function"==typeof i.onResult&&i.onResult(h),!1===n?(h.isMatch=!1,!!s&&h):p(r)?("function"==typeof i.onIgnore&&i.onIgnore(h),h.isMatch=!1,!!s&&h):("function"==typeof i.onMatch&&i.onMatch(h),!s||h)};return r&&(d.state=u),d};c.test=(t,e,r,{glob:s,posix:n}={})=>{if("string"!=typeof t)throw new TypeError("Expected input to be a string");if(""===t)return{isMatch:!1,output:""};const i=r||{},a=i.format||(n?o.toPosixSlashes:null);let l=t===s,u=l&&a?a(t):t;return!1===l&&(u=a?a(t):t,l=u===s),!1!==l&&!0!==i.capture||(l=!0===i.matchBase||!0===i.basename?c.matchBase(t,e,r,n):e.exec(u)),{isMatch:Boolean(l),match:l,output:u}},c.matchBase=(t,e,r,n=o.isWindows(r))=>(e instanceof RegExp?e:c.makeRe(e,r)).test(s.basename(t)),c.isMatch=(t,e,r)=>c(e,r)(t),c.parse=(t,e)=>Array.isArray(t)?t.map((t=>c.parse(t,e))):i(t,{...e,fastpaths:!1}),c.scan=(t,e)=>n(t,e),c.compileRe=(t,e,r=!1,s=!1)=>{if(!0===r)return t.output;const n=e||{},i=n.contains?"":"^",o=n.contains?"":"$";let a=`${i}(?:${t.output})${o}`;t&&!0===t.negated&&(a=`^(?!${a}).*$`);const l=c.toRegex(a,e);return!0===s&&(l.state=t),l},c.makeRe=(t,e={},r=!1,s=!1)=>{if(!t||"string"!=typeof t)throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return!1===e.fastpaths||"."!==t[0]&&"*"!==t[0]||(n.output=i.fastpaths(t,e)),n.output||(n=i(t,e)),c.compileRe(n,e,r,s)},c.toRegex=(t,e)=>{try{const r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(t){if(e&&!0===e.debug)throw t;return/$^/}},c.constants=a,t.exports=c},9018:t=>{function e(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}t.exports=function(t){if((t=t||{}).circles)return function(t){const r=[],s=[],n=new Map;if(n.set(Date,(t=>new Date(t))),n.set(Map,((t,e)=>new Map(o(Array.from(t),e)))),n.set(Set,((t,e)=>new Set(o(Array.from(t),e)))),t.constructorHandlers)for(const e of t.constructorHandlers)n.set(e[0],e[1]);let i=null;return t.proto?function t(a){if("object"!=typeof a||null===a)return a;if(Array.isArray(a))return o(a,t);if(a.constructor!==Object&&(i=n.get(a.constructor)))return i(a,t);const c={};r.push(a),s.push(c);for(const o in a){const l=a[o];if("object"!=typeof l||null===l)c[o]=l;else if(l.constructor!==Object&&(i=n.get(l.constructor)))c[o]=i(l,t);else if(ArrayBuffer.isView(l))c[o]=e(l);else{const e=r.indexOf(l);c[o]=-1!==e?s[e]:t(l)}}return r.pop(),s.pop(),c}:function t(a){if("object"!=typeof a||null===a)return a;if(Array.isArray(a))return o(a,t);if(a.constructor!==Object&&(i=n.get(a.constructor)))return i(a,t);const c={};r.push(a),s.push(c);for(const o in a){if(!1===Object.hasOwnProperty.call(a,o))continue;const l=a[o];if("object"!=typeof l||null===l)c[o]=l;else if(l.constructor!==Object&&(i=n.get(l.constructor)))c[o]=i(l,t);else if(ArrayBuffer.isView(l))c[o]=e(l);else{const e=r.indexOf(l);c[o]=-1!==e?s[e]:t(l)}}return r.pop(),s.pop(),c};function o(t,o){const a=Object.keys(t),c=new Array(a.length);for(let l=0;l<a.length;l++){const u=a[l],p=t[u];if("object"!=typeof p||null===p)c[u]=p;else if(p.constructor!==Object&&(i=n.get(p.constructor)))c[u]=i(p,o);else if(ArrayBuffer.isView(p))c[u]=e(p);else{const t=r.indexOf(p);c[u]=-1!==t?s[t]:o(p)}}return c}}(t);const r=new Map;if(r.set(Date,(t=>new Date(t))),r.set(Map,((t,e)=>new Map(n(Array.from(t),e)))),r.set(Set,((t,e)=>new Set(n(Array.from(t),e)))),t.constructorHandlers)for(const e of t.constructorHandlers)r.set(e[0],e[1]);let s=null;return t.proto?function t(i){if("object"!=typeof i||null===i)return i;if(Array.isArray(i))return n(i,t);if(i.constructor!==Object&&(s=r.get(i.constructor)))return s(i,t);const o={};for(const n in i){const a=i[n];"object"!=typeof a||null===a?o[n]=a:a.constructor!==Object&&(s=r.get(a.constructor))?o[n]=s(a,t):ArrayBuffer.isView(a)?o[n]=e(a):o[n]=t(a)}return o}:function t(i){if("object"!=typeof i||null===i)return i;if(Array.isArray(i))return n(i,t);if(i.constructor!==Object&&(s=r.get(i.constructor)))return s(i,t);const o={};for(const n in i){if(!1===Object.hasOwnProperty.call(i,n))continue;const a=i[n];"object"!=typeof a||null===a?o[n]=a:a.constructor!==Object&&(s=r.get(a.constructor))?o[n]=s(a,t):ArrayBuffer.isView(a)?o[n]=e(a):o[n]=t(a)}return o};function n(t,n){const i=Object.keys(t),o=new Array(i.length);for(let a=0;a<i.length;a++){const c=i[a],l=t[c];"object"!=typeof l||null===l?o[c]=l:l.constructor!==Object&&(s=r.get(l.constructor))?o[c]=s(l,n):ArrayBuffer.isView(l)?o[c]=e(l):o[c]=n(l)}return o}}},9288:(t,e,r)=>{const s=r(2411),n=r(303),i=r(1811),o=(t="",e="",r=!1)=>{const s=[];if(t=[].concat(t),!(e=[].concat(e)).length)return t;if(!t.length)return r?i.flatten(e).map((t=>`{${t}}`)):e;for(const n of t)if(Array.isArray(n))for(const t of n)s.push(o(t,e,r));else for(let t of e)!0===r&&"string"==typeof t&&(t=`{${t}}`),s.push(Array.isArray(t)?o(n,t,r):n+t);return i.flatten(s)};t.exports=(t,e={})=>{const r=void 0===e.rangeLimit?1e3:e.rangeLimit,a=(t,c={})=>{t.queue=[];let l=c,u=c.queue;for(;"brace"!==l.type&&"root"!==l.type&&l.parent;)l=l.parent,u=l.queue;if(t.invalid||t.dollar)return void u.push(o(u.pop(),n(t,e)));if("brace"===t.type&&!0!==t.invalid&&2===t.nodes.length)return void u.push(o(u.pop(),["{}"]));if(t.nodes&&t.ranges>0){const a=i.reduce(t.nodes);if(i.exceedsLimit(...a,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let c=s(...a,e);return 0===c.length&&(c=n(t,e)),u.push(o(u.pop(),c)),void(t.nodes=[])}const p=i.encloseBrace(t);let d=t.queue,h=t;for(;"brace"!==h.type&&"root"!==h.type&&h.parent;)h=h.parent,d=h.queue;for(let e=0;e<t.nodes.length;e++){const r=t.nodes[e];"comma"!==r.type||"brace"!==t.type?"close"!==r.type?r.value&&"open"!==r.type?d.push(o(d.pop(),r.value)):r.nodes&&a(r,t):u.push(o(u.pop(),d,p)):(1===e&&d.push(""),d.push(""))}return d};return i.flatten(a(t))}},9344:(t,e,r)=>{var s;function n(t,e,r){if("function"==typeof e&&(r=e,e={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,s){n(t,e||{},(function(t,e){t?s(t):r(e)}))}))}s(t,e||{},(function(t,s){t&&("EACCES"===t.code||e&&e.ignoreErrors)&&(t=null,s=!1),r(t,s)}))}r(9896),s="win32"===process.platform||global.TESTING_WINDOWS?r(8541):r(709),t.exports=n,n.sync=function(t,e){try{return s.sync(t,e||{})}catch(t){if(e&&e.ignoreErrors||"EACCES"===t.code)return!1;throw t}}},9581:(t,e,r)=>{const s=r(2018),n=r(9023);e.init=function(t){t.inspectOpts={};const r=Object.keys(e.inspectOpts);for(let s=0;s<r.length;s++)t.inspectOpts[r[s]]=e.inspectOpts[r[s]]},e.log=function(...t){return process.stderr.write(n.formatWithOptions(e.inspectOpts,...t)+"\n")},e.formatArgs=function(r){const{namespace:s,useColors:n}=this;if(n){const e=this.color,n="\x1b[3"+(e<8?e:"8;5;"+e),i=` ${n};1m${s} \x1b[0m`;r[0]=i+r[0].split("\n").join("\n"+i),r.push(n+"m+"+t.exports.humanize(this.diff)+"\x1b[0m")}else r[0]=(e.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+s+" "+r[0]},e.save=function(t){t?process.env.DEBUG=t:delete process.env.DEBUG},e.load=function(){return process.env.DEBUG},e.useColors=function(){return"colors"in e.inspectOpts?Boolean(e.inspectOpts.colors):s.isatty(process.stderr.fd)},e.destroy=n.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{const t=r(1754);t&&(t.stderr||t).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(t){}e.inspectOpts=Object.keys(process.env).filter((t=>/^debug_/i.test(t))).reduce(((t,e)=>{const r=e.substring(6).toLowerCase().replace(/_([a-z])/g,((t,e)=>e.toUpperCase()));let s=process.env[e];return s=!!/^(yes|on|true|enabled)$/i.test(s)||!/^(no|off|false|disabled)$/i.test(s)&&("null"===s?null:Number(s)),t[r]=s,t}),{}),t.exports=r(4948)(e);const{formatters:i}=t.exports;i.o=function(t){return this.inspectOpts.colors=this.useColors,n.inspect(t,this.inspectOpts).split("\n").map((t=>t.trim())).join(" ")},i.O=function(t){return this.inspectOpts.colors=this.useColors,n.inspect(t,this.inspectOpts)}},9695:t=>{const e=(t={})=>{const e=t.env||process.env;return"win32"!==(t.platform||process.platform)?"PATH":Object.keys(e).reverse().find((t=>"PATH"===t.toUpperCase()))||"Path"};t.exports=e,t.exports.default=e},9789:t=>{t.exports=function(t){return"number"==typeof t?t-t===0:"string"==typeof t&&""!==t.trim()&&(Number.isFinite?Number.isFinite(+t):isFinite(+t))}}};
package/dist/cli.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import*as o from"cheetor";import{createRequire as e}from"node:module";export const __webpack_id__=27;export const __webpack_ids__=[27];export const __webpack_modules__={7642:(r,t,m)=>{const s=(n={Cheetor:()=>o.Cheetor},c={},m.d(c,n),c);var n,c,a=m(3938);const i=e(import.meta.url)("node:module");var p=m(1503),d=m(9948),g=m(9767);process.on("SIGINT",(()=>{})),new s.Cheetor("../package.json",import.meta.url).website("https://www.npmjs.com/org/nice-move").command(g).command(a).commandSmart((function(){if((0,d.kj)("svgo/package.json")&&(0,d.kj)("svgo-config/package.json"))return{command:"svgo",describe:"Run `svgo` to optimize `*.svg`",handler({_:[o,e="./"]}){const r=(0,i.createRequire)(import.meta.url);(0,p.Ho)("svgo",["-r","-q","--pretty","--indent","2","--config",r.resolve("svgo-config"),"-f",e]).then((()=>{console.log("Done: calling svgo")})).catch((o=>{process.exitCode=1,console.error("Error:",o.message)}))}}})).setup()}};import r from"./runtime.mjs";import*as t from"./cli.mjs";r.C(t);import*as m from"./vendor.mjs";r.C(m);import*as s from"./cmd/lint.mjs";r.C(s);import*as n from"./cmd/git.mjs";r.C(n),r(r.s=7642);
2
+ import*as o from"cheetor";import{createRequire as e}from"node:module";export const __webpack_id__=27;export const __webpack_ids__=[27];export const __webpack_modules__={7642:(r,t,m)=>{const s=(n={Cheetor:()=>o.Cheetor},c={},m.d(c,n),c);var n,c,a=m(3938);const i=e(import.meta.url)("node:module");var p=m(3208),d=m(9948),g=m(9767);process.on("SIGINT",(()=>{})),new s.Cheetor("../package.json",import.meta.url).website("https://www.npmjs.com/org/nice-move").command(g).command(a).commandSmart((function(){if((0,d.kj)("svgo/package.json")&&(0,d.kj)("svgo-config/package.json"))return{command:"svgo",describe:"Run `svgo` to optimize `*.svg`",handler({_:[o,e="./"]}){const r=(0,i.createRequire)(import.meta.url);(0,p.Ho)("svgo",["-r","-q","--pretty","--indent","2","--config",r.resolve("svgo-config"),"-f",e]).then((()=>{console.log("Done: calling svgo")})).catch((o=>{process.exitCode=1,console.error("Error:",o.message)}))}}})).setup()}};import r from"./runtime.mjs";import*as t from"./cli.mjs";r.C(t);import*as m from"./vendor.mjs";r.C(m);import*as s from"./cmd/lint.mjs";r.C(s);import*as n from"./cmd/git.mjs";r.C(n),r(r.s=7642);
package/dist/cmd/git.mjs CHANGED
@@ -1 +1 @@
1
- import{createRequire as o}from"node:module";export const __webpack_id__=60;export const __webpack_ids__=[60];export const __webpack_modules__={1421:t=>{t.exports=o(import.meta.url)("node:child_process")},1708:t=>{t.exports=o(import.meta.url)("node:process")},3024:t=>{t.exports=o(import.meta.url)("node:fs")},3136:t=>{t.exports=o(import.meta.url)("node:url")},3938:(o,t,r)=>{r.r(t),r.d(t,{builder:()=>n,command:()=>s,description:()=>i});var e=r(1503);const s="git",i="",m=process.cwd();function n(o){o.command("hooks","Set .githooks as git.hooksPath",{},(()=>{(function(){try{return function(){try{return Boolean((0,e.Kc)("git",["--version"],{cwd:m}).stdout)}catch{throw new Error("git is not installed")}}()&&function(){try{return"true"===(0,e.Kc)("git",["rev-parse","--is-inside-work-tree"],{cwd:m}).stdout}catch{throw new Error("not a git repository")}}()}catch(o){return console.error("Fail:",o.message),!1}})()&&(0,e.Ho)("git",["config","core.hooksPath",".githooks"],{cwd:m}).then((()=>{console.log("Done: set .githooks")})).catch((()=>{console.error("Fail:","setting hooks failed"),process.exitCode=1}))})),o.demandCommand(1,"Typing `hooks`")}},4573:t=>{t.exports=o(import.meta.url)("node:buffer")},5317:t=>{t.exports=o(import.meta.url)("child_process")},6193:t=>{t.exports=o(import.meta.url)("node:string_decoder")},6466:t=>{t.exports=o(import.meta.url)("node:stream/promises")},6760:t=>{t.exports=o(import.meta.url)("node:path")},6928:t=>{t.exports=o(import.meta.url)("path")},7066:t=>{t.exports=o(import.meta.url)("node:tty")},7075:t=>{t.exports=o(import.meta.url)("node:stream")},7975:t=>{t.exports=o(import.meta.url)("node:util")},8161:t=>{t.exports=o(import.meta.url)("node:os")},8474:t=>{t.exports=o(import.meta.url)("node:events")},8500:t=>{t.exports=o(import.meta.url)("node:timers/promises")},8877:t=>{t.exports=o(import.meta.url)("node:v8")},9896:t=>{t.exports=o(import.meta.url)("fs")}};import t from"../runtime.mjs";import*as r from"../vendor.mjs";t.C(r);import*as e from"./git.mjs";t.C(e);var s=t(t.s=3938);const i=s.builder,m=s.command,n=s.description;export{i as builder,m as command,n as description};
1
+ import{createRequire as o}from"node:module";export const __webpack_id__=60;export const __webpack_ids__=[60];export const __webpack_modules__={1421:t=>{t.exports=o(import.meta.url)("node:child_process")},1708:t=>{t.exports=o(import.meta.url)("node:process")},3024:t=>{t.exports=o(import.meta.url)("node:fs")},3136:t=>{t.exports=o(import.meta.url)("node:url")},3938:(o,t,r)=>{r.r(t),r.d(t,{builder:()=>n,command:()=>s,description:()=>i});var e=r(3208);const s="git",i="",m=process.cwd();function n(o){o.command("hooks","Set .githooks as git.hooksPath",{},(()=>{(function(){try{return function(){try{return Boolean((0,e.Kc)("git",["--version"],{cwd:m}).stdout)}catch{throw new Error("git is not installed")}}()&&function(){try{return"true"===(0,e.Kc)("git",["rev-parse","--is-inside-work-tree"],{cwd:m}).stdout}catch{throw new Error("not a git repository")}}()}catch(o){return console.error("Fail:",o.message),!1}})()&&(0,e.Ho)("git",["config","core.hooksPath",".githooks"],{cwd:m}).then((()=>{console.log("Done: set .githooks")})).catch((()=>{console.error("Fail:","setting hooks failed"),process.exitCode=1}))})),o.demandCommand(1,"Typing `hooks`")}},4573:t=>{t.exports=o(import.meta.url)("node:buffer")},5317:t=>{t.exports=o(import.meta.url)("child_process")},6193:t=>{t.exports=o(import.meta.url)("node:string_decoder")},6466:t=>{t.exports=o(import.meta.url)("node:stream/promises")},6760:t=>{t.exports=o(import.meta.url)("node:path")},6928:t=>{t.exports=o(import.meta.url)("path")},7066:t=>{t.exports=o(import.meta.url)("node:tty")},7075:t=>{t.exports=o(import.meta.url)("node:stream")},7975:t=>{t.exports=o(import.meta.url)("node:util")},8161:t=>{t.exports=o(import.meta.url)("node:os")},8474:t=>{t.exports=o(import.meta.url)("node:events")},8500:t=>{t.exports=o(import.meta.url)("node:timers/promises")},8877:t=>{t.exports=o(import.meta.url)("node:v8")},9896:t=>{t.exports=o(import.meta.url)("fs")}};import t from"../runtime.mjs";import*as r from"../vendor.mjs";t.C(r);import*as e from"./git.mjs";t.C(e);var s=t(t.s=3938);const i=s.builder,m=s.command,n=s.description;export{i as builder,m as command,n as description};
package/dist/cmd/lint.mjs CHANGED
@@ -1 +1 @@
1
- import{createRequire as e}from"node:module";export const __webpack_id__=67;export const __webpack_ids__=[67];export const __webpack_modules__={857:t=>{t.exports=e(import.meta.url)("os")},1421:t=>{t.exports=e(import.meta.url)("node:child_process")},1455:t=>{t.exports=e(import.meta.url)("node:fs/promises")},1708:t=>{t.exports=e(import.meta.url)("node:process")},2018:t=>{t.exports=e(import.meta.url)("tty")},2203:t=>{t.exports=e(import.meta.url)("stream")},3024:t=>{t.exports=e(import.meta.url)("node:fs")},3136:t=>{t.exports=e(import.meta.url)("node:url")},3193:t=>{t.exports=e(import.meta.url)("string_decoder")},3339:t=>{t.exports=e(import.meta.url)("module")},4434:t=>{t.exports=e(import.meta.url)("events")},5317:t=>{t.exports=e(import.meta.url)("child_process")},6466:t=>{t.exports=e(import.meta.url)("node:stream/promises")},6760:t=>{t.exports=e(import.meta.url)("node:path")},6848:t=>{t.exports=e(import.meta.url)("node:readline/promises")},6928:t=>{t.exports=e(import.meta.url)("path")},6982:t=>{t.exports=e(import.meta.url)("crypto")},7016:t=>{t.exports=e(import.meta.url)("url")},7066:t=>{t.exports=e(import.meta.url)("node:tty")},7075:t=>{t.exports=e(import.meta.url)("node:stream")},7975:t=>{t.exports=e(import.meta.url)("node:util")},8161:t=>{t.exports=e(import.meta.url)("node:os")},8474:t=>{t.exports=e(import.meta.url)("node:events")},9023:t=>{t.exports=e(import.meta.url)("util")},9767:(e,t,r)=>{r.r(t),r.d(t,{builder:()=>c,command:()=>m,description:()=>p});var o=r(1455),s=r(6760);const i={"body-leading-blank":[1,"always"],"body-max-line-length":[2,"always",100],"footer-leading-blank":[1,"always"],"footer-max-line-length":[2,"always",100],"header-max-length":[2,"always",100],"subject-case":[0],"subject-empty":[2,"never"],"subject-full-stop":[2,"never","."],"type-case":[2,"always","lower-case"],"type-empty":[2,"never"],"type-enum":[2,"always",["build","chore","ci","docs","feat","fix","perf","refactor","revert","style","test"]],"scope-case":[0],"body-case":[0],"header-case":[0]};function a(e){e.command("commit","Lint git commit message",{},(()=>{(async function(){const e=await(0,o.readFile)((0,s.resolve)(process.cwd(),".git/COMMIT_EDITMSG"),"utf8"),t=await r.e(652).then(r.bind(r,652)).then((e=>e.default.default||e.default)),a=await Promise.all([r.e(127),r.e(753)]).then(r.bind(r,2753)).then((e=>e.default.default||e.default)),n=await t(e,i);return{result:n,output:await a({results:[n]})}})().then((({result:e,output:t})=>{e.valid?console.log("Pass."):(console.log("Fail:"),console.log(t),process.exitCode=1)})).catch((e=>{console.error(e),process.exitCode=1}))}))}var n=r(9948);function l({garou:e,stylelint:t,eslint:r,prettier:o}){const s=process.stdin.isTTY?" --color":"";return function(e){const t=Object.entries(e).map((([e,t])=>[e,t.filter(Boolean)])).filter((([e,t])=>t.length));return t.length>0?Object.fromEntries(t):void 0}({"*.{vue,html,htm,md}":[e&&"garou",o&&`prettier -w -u${s}`,t&&`stylelint --fix -- ${s}`,r&&`eslint --fix ${s}`],"*.{ts,tsx,mts,cts}":[e&&"garou",o&&`prettier -w -u${s}`,r&&`eslint --fix ${s}`],"*.{js,jsx,mjs,cjs,wxs,qs}":[e&&"garou",o&&`prettier -w -u${s}`,r&&`eslint --fix ${s}`],"*.{c,sc,le,wx,q,tt,jx,ac}ss":[e&&"garou",o&&`prettier -w -u${s}`,t&&`stylelint --fix -- ${s}`],"*.{json,yml,yaml,svg}":[e&&"garou",o&&`prettier -w -u${s}`],"{*.{jsonc,webmanifest,editorconfig,toml},.{babel,npm}rc}":[o&&`prettier -w -u${s}`],"{*.jenkinsfile,{j,J}enkinsfile}":[o&&`prettier -w -u${s}`],"yarn.lock":[e&&"garou"]})}const m="lint",p="";function c(e){a(e),function(e){e.command("staged","Lint and format git staged files",{},(()=>{(async function(){const{default:e}=await Promise.all([r.e(127),r.e(284)]).then(r.bind(r,9284));return e({allowEmpty:!0,concurrent:!0,config:l(function(){const e=(0,n.t7)("devDependencies");return{garou:"garou"in e,stylelint:"stylelint"in e,eslint:"eslint"in e,prettier:"prettier"in e}}()),cwd:process.cwd(),debug:!1,quiet:!1,relative:!1,shell:!1,stash:!0})})().then((e=>{process.exitCode=e?0:1})).catch((e=>{console.error(e),process.exitCode=1}))}))}(e),e.demandCommand(1,"Typing `commit` or `staged`")}},9896:t=>{t.exports=e(import.meta.url)("fs")}};import t from"../runtime.mjs";import*as r from"../vendor.mjs";t.C(r);import*as o from"./lint.mjs";t.C(o);var s=t(t.s=9767);const i=s.builder,a=s.command,n=s.description;export{i as builder,a as command,n as description};
1
+ import{createRequire as e}from"node:module";export const __webpack_id__=67;export const __webpack_ids__=[67];export const __webpack_modules__={857:t=>{t.exports=e(import.meta.url)("os")},1421:t=>{t.exports=e(import.meta.url)("node:child_process")},1455:t=>{t.exports=e(import.meta.url)("node:fs/promises")},1708:t=>{t.exports=e(import.meta.url)("node:process")},2018:t=>{t.exports=e(import.meta.url)("tty")},2203:t=>{t.exports=e(import.meta.url)("stream")},3024:t=>{t.exports=e(import.meta.url)("node:fs")},3136:t=>{t.exports=e(import.meta.url)("node:url")},3193:t=>{t.exports=e(import.meta.url)("string_decoder")},3339:t=>{t.exports=e(import.meta.url)("module")},4434:t=>{t.exports=e(import.meta.url)("events")},4573:t=>{t.exports=e(import.meta.url)("node:buffer")},5317:t=>{t.exports=e(import.meta.url)("child_process")},6760:t=>{t.exports=e(import.meta.url)("node:path")},6928:t=>{t.exports=e(import.meta.url)("path")},6982:t=>{t.exports=e(import.meta.url)("crypto")},7016:t=>{t.exports=e(import.meta.url)("url")},7066:t=>{t.exports=e(import.meta.url)("node:tty")},7075:t=>{t.exports=e(import.meta.url)("node:stream")},7975:t=>{t.exports=e(import.meta.url)("node:util")},8161:t=>{t.exports=e(import.meta.url)("node:os")},8500:t=>{t.exports=e(import.meta.url)("node:timers/promises")},9023:t=>{t.exports=e(import.meta.url)("util")},9767:(e,t,r)=>{r.r(t),r.d(t,{builder:()=>c,command:()=>m,description:()=>p});var o=r(1455),s=r(6760);const i={"body-leading-blank":[1,"always"],"body-max-line-length":[2,"always",100],"footer-leading-blank":[1,"always"],"footer-max-line-length":[2,"always",100],"header-max-length":[2,"always",100],"subject-case":[0],"subject-empty":[2,"never"],"subject-full-stop":[2,"never","."],"type-case":[2,"always","lower-case"],"type-empty":[2,"never"],"type-enum":[2,"always",["build","chore","ci","docs","feat","fix","perf","refactor","revert","style","test"]],"scope-case":[0],"body-case":[0],"header-case":[0]};function a(e){e.command("commit","Lint git commit message",{},(()=>{(async function(){const e=await(0,o.readFile)((0,s.resolve)(process.cwd(),".git/COMMIT_EDITMSG"),"utf8"),t=await r.e(652).then(r.bind(r,652)).then((e=>e.default.default||e.default)),a=await Promise.all([r.e(127),r.e(753)]).then(r.bind(r,2753)).then((e=>e.default.default||e.default)),n=await t(e,i);return{result:n,output:await a({results:[n]})}})().then((({result:e,output:t})=>{e.valid?console.log("Pass."):(console.log("Fail:"),console.log(t),process.exitCode=1)})).catch((e=>{console.error(e),process.exitCode=1}))}))}var n=r(9948);function l({garou:e,stylelint:t,eslint:r,prettier:o}){const s=process.stdin.isTTY?" --color":"";return function(e){const t=Object.entries(e).map((([e,t])=>[e,t.filter(Boolean)])).filter((([e,t])=>t.length));return t.length>0?Object.fromEntries(t):void 0}({"*.{vue,html,htm,md}":[e&&"garou",o&&`prettier -w -u${s}`,t&&`stylelint --fix -- ${s}`,r&&`eslint --fix ${s}`],"*.{ts,tsx,mts,cts}":[e&&"garou",o&&`prettier -w -u${s}`,r&&`eslint --fix ${s}`],"*.{js,jsx,mjs,cjs,wxs,qs}":[e&&"garou",o&&`prettier -w -u${s}`,r&&`eslint --fix ${s}`],"*.{c,sc,le,wx,q,tt,jx,ac}ss":[e&&"garou",o&&`prettier -w -u${s}`,t&&`stylelint --fix -- ${s}`],"*.{json,yml,yaml,svg}":[e&&"garou",o&&`prettier -w -u${s}`],"{*.{jsonc,webmanifest,editorconfig,toml},.{babel,npm}rc}":[o&&`prettier -w -u${s}`],"{*.jenkinsfile,{j,J}enkinsfile}":[o&&`prettier -w -u${s}`],"yarn.lock":[e&&"garou"]})}const m="lint",p="";function c(e){a(e),function(e){e.command("staged","Lint and format git staged files",{},(()=>{(async function(){const{default:e}=await Promise.all([r.e(127),r.e(788)]).then(r.bind(r,3788));return e({allowEmpty:!0,concurrent:!0,config:l(function(){const e=(0,n.t7)("devDependencies");return{garou:"garou"in e,stylelint:"stylelint"in e,eslint:"eslint"in e,prettier:"prettier"in e}}()),cwd:process.cwd(),debug:!1,quiet:!1,relative:!1,shell:!1,stash:!0})})().then((e=>{process.exitCode=e?0:1})).catch((e=>{console.error(e),process.exitCode=1}))}))}(e),e.demandCommand(1,"Typing `commit` or `staged`")}},9896:t=>{t.exports=e(import.meta.url)("fs")}};import t from"../runtime.mjs";import*as r from"../vendor.mjs";t.C(r);import*as o from"./lint.mjs";t.C(o);var s=t(t.s=9767);const i=s.builder,a=s.command,n=s.description;export{i as builder,a as command,n as description};