@gilbert_oliveira/commit-wizard 1.2.2 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env bun
2
+
3
+ import { intro, outro, log } from '@clack/prompts';
4
+ import { main } from '../src/core/index.ts';
5
+ import { parseArgs, showHelp, showVersion } from '../src/utils/args.ts';
6
+
7
+ async function run() {
8
+ try {
9
+ // Processar argumentos da linha de comando
10
+ const args = parseArgs(process.argv.slice(2));
11
+
12
+ // Mostrar ajuda se solicitado
13
+ if (args.help) {
14
+ showHelp();
15
+ process.exit(0);
16
+ }
17
+
18
+ // Mostrar versão se solicitado
19
+ if (args.version) {
20
+ showVersion();
21
+ process.exit(0);
22
+ }
23
+
24
+ // Modo automático = silent + yes
25
+ if (args.auto) {
26
+ args.silent = true;
27
+ args.yes = true;
28
+ }
29
+
30
+ // Intro apenas se não for modo silencioso
31
+ if (!args.silent) {
32
+ intro('🧙‍♂️ Commit Wizard');
33
+ }
34
+
35
+ await main(args);
36
+
37
+ // Outro apenas se não for modo silencioso
38
+ if (!args.silent) {
39
+ outro('Até logo! ✨');
40
+ }
41
+ } catch (error) {
42
+ log.error(
43
+ `Erro: ${error instanceof Error ? error.message : 'Erro desconhecido'}`
44
+ );
45
+ process.exit(1);
46
+ }
47
+ }
48
+
49
+ if (import.meta.main) {
50
+ run();
51
+ }
@@ -0,0 +1,195 @@
1
+ #!/usr/bin/env bun
2
+ // @bun
3
+ var f9=Object.create;var{getPrototypeOf:d9,defineProperty:g1,getOwnPropertyNames:c9}=Object;var g9=Object.prototype.hasOwnProperty;var F=(b,I,$)=>{$=b!=null?f9(d9(b)):{};let H=I||!b||!b.__esModule?g1($,"default",{value:b,enumerable:!0}):$;for(let Y of c9(b))if(!g9.call(H,Y))g1(H,Y,{get:()=>b[Y],enumerable:!0});return H};var M=(b,I)=>()=>(I||b((I={exports:{}}).exports,I),I.exports);var e=(b,I)=>{for(var $ in I)g1(b,$,{get:I[$],enumerable:!0,configurable:!0,set:(H)=>I[$]=()=>H})};var S=(b,I)=>()=>(b&&(I=b(b=0)),I);var O=import.meta.require;var p1=M((w$,JI)=>{var u1={to(b,I){if(!I)return`\x1B[${b+1}G`;return`\x1B[${I+1};${b+1}H`},move(b,I){let $="";if(b<0)$+=`\x1B[${-b}D`;else if(b>0)$+=`\x1B[${b}C`;if(I<0)$+=`\x1B[${-I}A`;else if(I>0)$+=`\x1B[${I}B`;return $},up:(b=1)=>`\x1B[${b}A`,down:(b=1)=>`\x1B[${b}B`,forward:(b=1)=>`\x1B[${b}C`,backward:(b=1)=>`\x1B[${b}D`,nextLine:(b=1)=>"\x1B[E".repeat(b),prevLine:(b=1)=>"\x1B[F".repeat(b),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},u9={up:(b=1)=>"\x1B[S".repeat(b),down:(b=1)=>"\x1B[T".repeat(b)},p9={screen:"\x1B[2J",up:(b=1)=>"\x1B[1J".repeat(b),down:(b=1)=>"\x1B[J".repeat(b),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(b){let I="";for(let $=0;$<b;$++)I+=this.line+($<b-1?u1.up():"");if(b)I+=u1.left;return I}};JI.exports={cursor:u1,scroll:u9,erase:p9,beep:"\x07"}});var l1=M((k$,n1)=>{var z1=process||{},qI=z1.argv||[],W1=z1.env||{},n9=!(!!W1.NO_COLOR||qI.includes("--no-color"))&&(!!W1.FORCE_COLOR||qI.includes("--color")||z1.platform==="win32"||(z1.stdout||{}).isTTY&&W1.TERM!=="dumb"||!!W1.CI),l9=(b,I,$=b)=>(H)=>{let Y=""+H,X=Y.indexOf(I,b.length);return~X?b+a9(Y,I,$,X)+I:b+Y+I},a9=(b,I,$,H)=>{let Y="",X=0;do Y+=b.substring(X,H)+$,X=H+I.length,H=b.indexOf(I,X);while(~H);return Y+b.substring(X)},QI=(b=n9)=>{let I=b?l9:()=>String;return{isColorSupported:b,reset:I("\x1B[0m","\x1B[0m"),bold:I("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:I("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:I("\x1B[3m","\x1B[23m"),underline:I("\x1B[4m","\x1B[24m"),inverse:I("\x1B[7m","\x1B[27m"),hidden:I("\x1B[8m","\x1B[28m"),strikethrough:I("\x1B[9m","\x1B[29m"),black:I("\x1B[30m","\x1B[39m"),red:I("\x1B[31m","\x1B[39m"),green:I("\x1B[32m","\x1B[39m"),yellow:I("\x1B[33m","\x1B[39m"),blue:I("\x1B[34m","\x1B[39m"),magenta:I("\x1B[35m","\x1B[39m"),cyan:I("\x1B[36m","\x1B[39m"),white:I("\x1B[37m","\x1B[39m"),gray:I("\x1B[90m","\x1B[39m"),bgBlack:I("\x1B[40m","\x1B[49m"),bgRed:I("\x1B[41m","\x1B[49m"),bgGreen:I("\x1B[42m","\x1B[49m"),bgYellow:I("\x1B[43m","\x1B[49m"),bgBlue:I("\x1B[44m","\x1B[49m"),bgMagenta:I("\x1B[45m","\x1B[49m"),bgCyan:I("\x1B[46m","\x1B[49m"),bgWhite:I("\x1B[47m","\x1B[49m"),blackBright:I("\x1B[90m","\x1B[39m"),redBright:I("\x1B[91m","\x1B[39m"),greenBright:I("\x1B[92m","\x1B[39m"),yellowBright:I("\x1B[93m","\x1B[39m"),blueBright:I("\x1B[94m","\x1B[39m"),magentaBright:I("\x1B[95m","\x1B[39m"),cyanBright:I("\x1B[96m","\x1B[39m"),whiteBright:I("\x1B[97m","\x1B[39m"),bgBlackBright:I("\x1B[100m","\x1B[49m"),bgRedBright:I("\x1B[101m","\x1B[49m"),bgGreenBright:I("\x1B[102m","\x1B[49m"),bgYellowBright:I("\x1B[103m","\x1B[49m"),bgBlueBright:I("\x1B[104m","\x1B[49m"),bgMagentaBright:I("\x1B[105m","\x1B[49m"),bgCyanBright:I("\x1B[106m","\x1B[49m"),bgWhiteBright:I("\x1B[107m","\x1B[49m")}};n1.exports=QI();n1.exports.createColors=QI});import{stdin as i9,stdout as r9}from"process";import UI from"readline";import{Writable as t9}from"stream";function o9({onlyFirst:b=!1}={}){let I=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(I,b?void 0:"g")}function LI(b){if(typeof b!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof b}\``);return b.replace(s9,"")}function BI(b){return b&&b.__esModule&&Object.prototype.hasOwnProperty.call(b,"default")?b.default:b}function b1(b,I={}){if(typeof b!="string"||b.length===0||(I={ambiguousIsNarrow:!0,...I},b=LI(b),b.length===0))return 0;b=b.replace(G4()," ");let $=I.ambiguousIsNarrow?1:2,H=0;for(let Y of b){let X=Y.codePointAt(0);if(X<=31||X>=127&&X<=159||X>=768&&X<=879)continue;switch(b4.eastAsianWidth(Y)){case"F":case"W":H+=2;break;case"A":H+=$;break;default:H+=1}}return H}function Y4(){let b=new Map;for(let[I,$]of Object.entries(L)){for(let[H,Y]of Object.entries($))L[H]={open:`\x1B[${Y[0]}m`,close:`\x1B[${Y[1]}m`},$[H]=L[H],b.set(Y[0],Y[1]);Object.defineProperty(L,I,{value:$,enumerable:!1})}return Object.defineProperty(L,"codes",{value:b,enumerable:!1}),L.color.close="\x1B[39m",L.bgColor.close="\x1B[49m",L.color.ansi=VI(),L.color.ansi256=WI(),L.color.ansi16m=zI(),L.bgColor.ansi=VI(a1),L.bgColor.ansi256=WI(a1),L.bgColor.ansi16m=zI(a1),Object.defineProperties(L,{rgbToAnsi256:{value:(I,$,H)=>I===$&&$===H?I<8?16:I>248?231:Math.round((I-8)/247*24)+232:16+36*Math.round(I/255*5)+6*Math.round($/255*5)+Math.round(H/255*5),enumerable:!1},hexToRgb:{value:(I)=>{let $=/[a-f\d]{6}|[a-f\d]{3}/i.exec(I.toString(16));if(!$)return[0,0,0];let[H]=$;H.length===3&&(H=[...H].map((X)=>X+X).join(""));let Y=Number.parseInt(H,16);return[Y>>16&255,Y>>8&255,Y&255]},enumerable:!1},hexToAnsi256:{value:(I)=>L.rgbToAnsi256(...L.hexToRgb(I)),enumerable:!1},ansi256ToAnsi:{value:(I)=>{if(I<8)return 30+I;if(I<16)return 90+(I-8);let $,H,Y;if(I>=232)$=((I-232)*10+8)/255,H=$,Y=$;else{I-=16;let Z=I%36;$=Math.floor(I/36)/5,H=Math.floor(Z/6)/5,Y=Z%6/5}let X=Math.max($,H,Y)*2;if(X===0)return 30;let G=30+(Math.round(Y)<<2|Math.round(H)<<1|Math.round($));return X===2&&(G+=60),G},enumerable:!1},rgbToAnsi:{value:(I,$,H)=>L.ansi256ToAnsi(L.rgbToAnsi256(I,$,H)),enumerable:!1},hexToAnsi:{value:(I)=>L.ansi256ToAnsi(L.hexToAnsi256(I)),enumerable:!1}}),L}function KI(b,I,$){return String(b).normalize().replace(/\r\n/g,`
4
+ `).split(`
5
+ `).map((H)=>U4(H,I,$)).join(`
6
+ `)}function OI(b,I){if(typeof b=="string")return N1.aliases.get(b)===I;for(let $ of b)if($!==void 0&&OI($,I))return!0;return!1}function W4(b,I){if(b===I)return;let $=b.split(`
7
+ `),H=I.split(`
8
+ `),Y=[];for(let X=0;X<Math.max($.length,H.length);X++)$[X]!==H[X]&&Y.push(X);return Y}function P(b){return b===r1}function S1(b,I){let $=b;$.isTTY&&$.setRawMode(I)}class j1{constructor(b,I=!0){E(this,"input"),E(this,"output"),E(this,"_abortSignal"),E(this,"rl"),E(this,"opts"),E(this,"_render"),E(this,"_track",!1),E(this,"_prevFrame",""),E(this,"_subscribers",new Map),E(this,"_cursor",0),E(this,"state","initial"),E(this,"error",""),E(this,"value");let{input:$=i9,output:H=r9,render:Y,signal:X,...G}=b;this.opts=G,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=Y.bind(this),this._track=I,this._abortSignal=X,this.input=$,this.output=H}unsubscribe(){this._subscribers.clear()}setSubscriber(b,I){let $=this._subscribers.get(b)??[];$.push(I),this._subscribers.set(b,$)}on(b,I){this.setSubscriber(b,{cb:I})}once(b,I){this.setSubscriber(b,{cb:I,once:!0})}emit(b,...I){let $=this._subscribers.get(b)??[],H=[];for(let Y of $)Y.cb(...I),Y.once&&H.push(()=>$.splice($.indexOf(Y),1));for(let Y of H)Y()}prompt(){return new Promise((b,I)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),b(r1);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let $=new t9;$._write=(H,Y,X)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),X()},this.input.pipe($),this.rl=UI.createInterface({input:this.input,output:$,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),UI.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),S1(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(y.cursor.show),this.output.off("resize",this.render),S1(this.input,!1),b(this.value)}),this.once("cancel",()=>{this.output.write(y.cursor.show),this.output.off("resize",this.render),S1(this.input,!1),b(r1)})})}onKeypress(b,I){if(this.state==="error"&&(this.state="active"),I?.name&&(!this._track&&N1.aliases.has(I.name)&&this.emit("cursor",N1.aliases.get(I.name)),N1.actions.has(I.name)&&this.emit("cursor",I.name)),b&&(b.toLowerCase()==="y"||b.toLowerCase()==="n")&&this.emit("confirm",b.toLowerCase()==="y"),b==="\t"&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),b&&this.emit("key",b.toLowerCase()),I?.name==="return"){if(this.opts.validate){let $=this.opts.validate(this.value);$&&(this.error=$ instanceof Error?$.message:$,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}OI([b,I?.name,I?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
9
+ `),S1(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let b=KI(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
10
+ `).length-1;this.output.write(y.cursor.move(-999,b*-1))}render(){let b=KI(this._render(this)??"",process.stdout.columns,{hard:!0});if(b!==this._prevFrame){if(this.state==="initial")this.output.write(y.cursor.hide);else{let I=W4(this._prevFrame,b);if(this.restoreCursor(),I&&I?.length===1){let $=I[0];this.output.write(y.cursor.move(0,$)),this.output.write(y.erase.lines(1));let H=b.split(`
11
+ `);this.output.write(H[$]),this._prevFrame=b,this.output.write(y.cursor.move(0,H.length-$-1));return}if(I&&I?.length>1){let $=I[0];this.output.write(y.cursor.move(0,$)),this.output.write(y.erase.down());let H=b.split(`
12
+ `).slice($);this.output.write(H.join(`
13
+ `)),this._prevFrame=b;return}this.output.write(y.erase.down())}this.output.write(b),this.state==="initial"&&(this.state="active"),this._prevFrame=b}}}var y,TI,s9,_I,e9,b4,I4=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},G4,a1=10,VI=(b=0)=>(I)=>`\x1B[${I+b}m`,WI=(b=0)=>(I)=>`\x1B[${38+b};5;${I}m`,zI=(b=0)=>(I,$,H)=>`\x1B[${38+b};2;${I};${$};${H}m`,L,$4,H4,X4,K1,Z4=39,t1="\x07",MI="[",J4="]",AI="m",o1,SI=(b)=>`${K1.values().next().value}${MI}${b}${AI}`,NI=(b)=>`${K1.values().next().value}${o1}${b}${t1}`,q4=(b)=>b.split(" ").map((I)=>b1(I)),i1=(b,I,$)=>{let H=[...I],Y=!1,X=!1,G=b1(LI(b[b.length-1]));for(let[Z,J]of H.entries()){let q=b1(J);if(G+q<=$?b[b.length-1]+=J:(b.push(J),G=0),K1.has(J)&&(Y=!0,X=H.slice(Z+1).join("").startsWith(o1)),Y){X?J===t1&&(Y=!1,X=!1):J===AI&&(Y=!1);continue}G+=q,G===$&&Z<H.length-1&&(b.push(""),G=0)}!G&&b[b.length-1].length>0&&b.length>1&&(b[b.length-2]+=b.pop())},Q4=(b)=>{let I=b.split(" "),$=I.length;for(;$>0&&!(b1(I[$-1])>0);)$--;return $===I.length?b:I.slice(0,$).join(" ")+I.slice($).join("")},U4=(b,I,$={})=>{if($.trim!==!1&&b.trim()==="")return"";let H="",Y,X,G=q4(b),Z=[""];for(let[q,Q]of b.split(" ").entries()){$.trim!==!1&&(Z[Z.length-1]=Z[Z.length-1].trimStart());let W=b1(Z[Z.length-1]);if(q!==0&&(W>=I&&($.wordWrap===!1||$.trim===!1)&&(Z.push(""),W=0),(W>0||$.trim===!1)&&(Z[Z.length-1]+=" ",W++)),$.hard&&G[q]>I){let z=I-W,N=1+Math.floor((G[q]-z-1)/I);Math.floor((G[q]-1)/I)<N&&Z.push(""),i1(Z,Q,I);continue}if(W+G[q]>I&&W>0&&G[q]>0){if($.wordWrap===!1&&W<I){i1(Z,Q,I);continue}Z.push("")}if(W+G[q]>I&&$.wordWrap===!1){i1(Z,Q,I);continue}Z[Z.length-1]+=Q}$.trim!==!1&&(Z=Z.map((q)=>Q4(q)));let J=[...Z.join(`
14
+ `)];for(let[q,Q]of J.entries()){if(H+=Q,K1.has(Q)){let{groups:z}=new RegExp(`(?:\\${MI}(?<code>\\d+)m|\\${o1}(?<uri>.*)${t1})`).exec(J.slice(q).join(""))||{groups:{}};if(z.code!==void 0){let N=Number.parseFloat(z.code);Y=N===Z4?void 0:N}else z.uri!==void 0&&(X=z.uri.length===0?void 0:z.uri)}let W=X4.codes.get(Number(Y));J[q+1]===`
15
+ `?(X&&(H+=NI("")),Y&&W&&(H+=SI(W))):Q===`
16
+ `&&(Y&&W&&(H+=SI(Y)),X&&(H+=NI(X)))}return H},V4,N1,h$,r1,z4,S4=(b,I,$)=>(I in b)?z4(b,I,{enumerable:!0,configurable:!0,writable:!0,value:$}):b[I]=$,E=(b,I,$)=>(S4(b,typeof I!="symbol"?I+"":I,$),$),s1,N4,K4,j4=(b,I,$)=>(I in b)?K4(b,I,{enumerable:!0,configurable:!0,writable:!0,value:$}):b[I]=$,jI=(b,I,$)=>(j4(b,typeof I!="symbol"?I+"":I,$),$),e1,bb;var Ib=S(()=>{y=F(p1(),1),TI=F(l1(),1);s9=o9();_I={exports:{}};(function(b){var I={};b.exports=I,I.eastAsianWidth=function(H){var Y=H.charCodeAt(0),X=H.length==2?H.charCodeAt(1):0,G=Y;return 55296<=Y&&Y<=56319&&56320<=X&&X<=57343&&(Y&=1023,X&=1023,G=Y<<10|X,G+=65536),G==12288||65281<=G&&G<=65376||65504<=G&&G<=65510?"F":G==8361||65377<=G&&G<=65470||65474<=G&&G<=65479||65482<=G&&G<=65487||65490<=G&&G<=65495||65498<=G&&G<=65500||65512<=G&&G<=65518?"H":4352<=G&&G<=4447||4515<=G&&G<=4519||4602<=G&&G<=4607||9001<=G&&G<=9002||11904<=G&&G<=11929||11931<=G&&G<=12019||12032<=G&&G<=12245||12272<=G&&G<=12283||12289<=G&&G<=12350||12353<=G&&G<=12438||12441<=G&&G<=12543||12549<=G&&G<=12589||12593<=G&&G<=12686||12688<=G&&G<=12730||12736<=G&&G<=12771||12784<=G&&G<=12830||12832<=G&&G<=12871||12880<=G&&G<=13054||13056<=G&&G<=19903||19968<=G&&G<=42124||42128<=G&&G<=42182||43360<=G&&G<=43388||44032<=G&&G<=55203||55216<=G&&G<=55238||55243<=G&&G<=55291||63744<=G&&G<=64255||65040<=G&&G<=65049||65072<=G&&G<=65106||65108<=G&&G<=65126||65128<=G&&G<=65131||110592<=G&&G<=110593||127488<=G&&G<=127490||127504<=G&&G<=127546||127552<=G&&G<=127560||127568<=G&&G<=127569||131072<=G&&G<=194367||177984<=G&&G<=196605||196608<=G&&G<=262141?"W":32<=G&&G<=126||162<=G&&G<=163||165<=G&&G<=166||G==172||G==175||10214<=G&&G<=10221||10629<=G&&G<=10630?"Na":G==161||G==164||167<=G&&G<=168||G==170||173<=G&&G<=174||176<=G&&G<=180||182<=G&&G<=186||188<=G&&G<=191||G==198||G==208||215<=G&&G<=216||222<=G&&G<=225||G==230||232<=G&&G<=234||236<=G&&G<=237||G==240||242<=G&&G<=243||247<=G&&G<=250||G==252||G==254||G==257||G==273||G==275||G==283||294<=G&&G<=295||G==299||305<=G&&G<=307||G==312||319<=G&&G<=322||G==324||328<=G&&G<=331||G==333||338<=G&&G<=339||358<=G&&G<=359||G==363||G==462||G==464||G==466||G==468||G==470||G==472||G==474||G==476||G==593||G==609||G==708||G==711||713<=G&&G<=715||G==717||G==720||728<=G&&G<=731||G==733||G==735||768<=G&&G<=879||913<=G&&G<=929||931<=G&&G<=937||945<=G&&G<=961||963<=G&&G<=969||G==1025||1040<=G&&G<=1103||G==1105||G==8208||8211<=G&&G<=8214||8216<=G&&G<=8217||8220<=G&&G<=8221||8224<=G&&G<=8226||8228<=G&&G<=8231||G==8240||8242<=G&&G<=8243||G==8245||G==8251||G==8254||G==8308||G==8319||8321<=G&&G<=8324||G==8364||G==8451||G==8453||G==8457||G==8467||G==8470||8481<=G&&G<=8482||G==8486||G==8491||8531<=G&&G<=8532||8539<=G&&G<=8542||8544<=G&&G<=8555||8560<=G&&G<=8569||G==8585||8592<=G&&G<=8601||8632<=G&&G<=8633||G==8658||G==8660||G==8679||G==8704||8706<=G&&G<=8707||8711<=G&&G<=8712||G==8715||G==8719||G==8721||G==8725||G==8730||8733<=G&&G<=8736||G==8739||G==8741||8743<=G&&G<=8748||G==8750||8756<=G&&G<=8759||8764<=G&&G<=8765||G==8776||G==8780||G==8786||8800<=G&&G<=8801||8804<=G&&G<=8807||8810<=G&&G<=8811||8814<=G&&G<=8815||8834<=G&&G<=8835||8838<=G&&G<=8839||G==8853||G==8857||G==8869||G==8895||G==8978||9312<=G&&G<=9449||9451<=G&&G<=9547||9552<=G&&G<=9587||9600<=G&&G<=9615||9618<=G&&G<=9621||9632<=G&&G<=9633||9635<=G&&G<=9641||9650<=G&&G<=9651||9654<=G&&G<=9655||9660<=G&&G<=9661||9664<=G&&G<=9665||9670<=G&&G<=9672||G==9675||9678<=G&&G<=9681||9698<=G&&G<=9701||G==9711||9733<=G&&G<=9734||G==9737||9742<=G&&G<=9743||9748<=G&&G<=9749||G==9756||G==9758||G==9792||G==9794||9824<=G&&G<=9825||9827<=G&&G<=9829||9831<=G&&G<=9834||9836<=G&&G<=9837||G==9839||9886<=G&&G<=9887||9918<=G&&G<=9919||9924<=G&&G<=9933||9935<=G&&G<=9953||G==9955||9960<=G&&G<=9983||G==10045||G==10071||10102<=G&&G<=10111||11093<=G&&G<=11097||12872<=G&&G<=12879||57344<=G&&G<=63743||65024<=G&&G<=65039||G==65533||127232<=G&&G<=127242||127248<=G&&G<=127277||127280<=G&&G<=127337||127344<=G&&G<=127386||917760<=G&&G<=917999||983040<=G&&G<=1048573||1048576<=G&&G<=1114109?"A":"N"},I.characterLength=function(H){var Y=this.eastAsianWidth(H);return Y=="F"||Y=="W"||Y=="A"?2:1};function $(H){return H.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}I.length=function(H){for(var Y=$(H),X=0,G=0;G<Y.length;G++)X=X+this.characterLength(Y[G]);return X},I.slice=function(H,Y,X){textLen=I.length(H),Y=Y||0,X=X||1,Y<0&&(Y=textLen+Y),X<0&&(X=textLen+X);for(var G="",Z=0,J=$(H),q=0;q<J.length;q++){var Q=J[q],W=I.length(Q);if(Z>=Y-(W==2?1:0))if(Z+W<=X)G+=Q;else break;Z+=W}return G}})(_I);e9=_I.exports,b4=BI(e9),G4=BI(I4);L={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(L.modifier);$4=Object.keys(L.color),H4=Object.keys(L.bgColor);[...$4];X4=Y4(),K1=new Set(["\x1B","\x9B"]),o1=`${J4}8;;`;V4=["up","down","left","right","space","enter","cancel"],N1={actions:new Set(V4),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]])};h$=globalThis.process.platform.startsWith("win"),r1=Symbol("clack:cancel");z4=Object.defineProperty;s1=class s1 extends j1{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(b){super(b,!1),this.value=!!b.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(I)=>{this.output.write(y.cursor.move(0,-1)),this.value=I,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};N4=new WeakMap;K4=Object.defineProperty;e1=class e1 extends j1{constructor(b){super(b,!1),jI(this,"options"),jI(this,"cursor",0),this.options=b.options,this.cursor=this.options.findIndex(({value:I})=>I===b.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",(I)=>{switch(I){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};bb=class bb extends j1{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;let b=this.value.slice(0,this.cursor),[I,...$]=this.value.slice(this.cursor);return`${b}${TI.default.inverse(I)}${$.join("")}`}get cursor(){return this._cursor}constructor(b){super(b),this.on("finalize",()=>{this.value||(this.value=b.defaultValue)})}}});import{stripVTControlCharacters as Gb}from"util";import v from"process";function T4(){return v.platform!=="win32"?v.env.TERM!=="linux":!!v.env.CI||!!v.env.WT_SESSION||!!v.env.TERMINUS_SUBLIME||v.env.ConEmuTask==="{cmd::Cmder}"||v.env.TERM_PROGRAM==="Terminus-Sublime"||v.env.TERM_PROGRAM==="vscode"||v.env.TERM==="xterm-256color"||v.env.TERM==="alacritty"||v.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var U,EI,L4,B=(b,I)=>L4?b:I,B4,_4,M4,Yb,A4,T,n,$b,Hb,a$,i$,r$,t$,RI,O4,R4,E4,y4,P4,x4,w4,Xb=(b)=>{switch(b){case"initial":case"active":return U.default.cyan(B4);case"cancel":return U.default.red(_4);case"error":return U.default.yellow(M4);case"submit":return U.default.green(Yb)}},k4=(b)=>{let{cursor:I,options:$,style:H}=b,Y=b.maxItems??Number.POSITIVE_INFINITY,X=Math.max(process.stdout.rows-4,0),G=Math.min(X,Math.max(Y,5)),Z=0;I>=Z+G-3?Z=Math.max(Math.min(I-G+3,$.length-G),0):I<Z+2&&(Z=Math.max(I-2,0));let J=G<$.length&&Z>0,q=G<$.length&&Z+G<$.length;return $.slice(Z,Z+G).map((Q,W,z)=>{let N=W===0&&J,j=W===z.length-1&&q;return N||j?U.default.dim("..."):H(Q,W+Z===I)})},yI=(b)=>new bb({validate:b.validate,placeholder:b.placeholder,defaultValue:b.defaultValue,initialValue:b.initialValue,render(){let I=`${U.default.gray(T)}
17
+ ${Xb(this.state)} ${b.message}
18
+ `,$=b.placeholder?U.default.inverse(b.placeholder[0])+U.default.dim(b.placeholder.slice(1)):U.default.inverse(U.default.hidden("_")),H=this.value?this.valueWithCursor:$;switch(this.state){case"error":return`${I.trim()}
19
+ ${U.default.yellow(T)} ${H}
20
+ ${U.default.yellow(n)} ${U.default.yellow(this.error)}
21
+ `;case"submit":return`${I}${U.default.gray(T)} ${U.default.dim(this.value||b.placeholder)}`;case"cancel":return`${I}${U.default.gray(T)} ${U.default.strikethrough(U.default.dim(this.value??""))}${this.value?.trim()?`
22
+ ${U.default.gray(T)}`:""}`;default:return`${I}${U.default.cyan(T)} ${H}
23
+ ${U.default.cyan(n)}
24
+ `}}}).prompt(),d=(b)=>{let I=b.active??"Yes",$=b.inactive??"No";return new s1({active:I,inactive:$,initialValue:b.initialValue??!0,render(){let H=`${U.default.gray(T)}
25
+ ${Xb(this.state)} ${b.message}
26
+ `,Y=this.value?I:$;switch(this.state){case"submit":return`${H}${U.default.gray(T)} ${U.default.dim(Y)}`;case"cancel":return`${H}${U.default.gray(T)} ${U.default.strikethrough(U.default.dim(Y))}
27
+ ${U.default.gray(T)}`;default:return`${H}${U.default.cyan(T)} ${this.value?`${U.default.green($b)} ${I}`:`${U.default.dim(Hb)} ${U.default.dim(I)}`} ${U.default.dim("/")} ${this.value?`${U.default.dim(Hb)} ${U.default.dim($)}`:`${U.default.green($b)} ${$}`}
28
+ ${U.default.cyan(n)}
29
+ `}}}).prompt()},I1=(b)=>{let I=($,H)=>{let Y=$.label??String($.value);switch(H){case"selected":return`${U.default.dim(Y)}`;case"active":return`${U.default.green($b)} ${Y} ${$.hint?U.default.dim(`(${$.hint})`):""}`;case"cancelled":return`${U.default.strikethrough(U.default.dim(Y))}`;default:return`${U.default.dim(Hb)} ${U.default.dim(Y)}`}};return new e1({options:b.options,initialValue:b.initialValue,render(){let $=`${U.default.gray(T)}
30
+ ${Xb(this.state)} ${b.message}
31
+ `;switch(this.state){case"submit":return`${$}${U.default.gray(T)} ${I(this.options[this.cursor],"selected")}`;case"cancel":return`${$}${U.default.gray(T)} ${I(this.options[this.cursor],"cancelled")}
32
+ ${U.default.gray(T)}`;default:return`${$}${U.default.cyan(T)} ${k4({cursor:this.cursor,options:this.options,maxItems:b.maxItems,style:(H,Y)=>I(H,Y?"active":"inactive")}).join(`
33
+ ${U.default.cyan(T)} `)}
34
+ ${U.default.cyan(n)}
35
+ `}}}).prompt()},l=(b="",I="")=>{let $=`
36
+ ${b}
37
+ `.split(`
38
+ `),H=Gb(I).length,Y=Math.max($.reduce((G,Z)=>{let J=Gb(Z);return J.length>G?J.length:G},0),H)+2,X=$.map((G)=>`${U.default.gray(T)} ${U.default.dim(G)}${" ".repeat(Y-Gb(G).length)}${U.default.gray(T)}`).join(`
39
+ `);process.stdout.write(`${U.default.gray(T)}
40
+ ${U.default.green(Yb)} ${U.default.reset(I)} ${U.default.gray(RI.repeat(Math.max(Y-H-1,1))+O4)}
41
+ ${X}
42
+ ${U.default.gray(R4+RI.repeat(Y+2)+E4)}
43
+ `)},PI=(b="")=>{process.stdout.write(`${U.default.gray(n)} ${U.default.red(b)}
44
+
45
+ `)},xI=(b="")=>{process.stdout.write(`${U.default.gray(A4)} ${b}
46
+ `)},wI=(b="")=>{process.stdout.write(`${U.default.gray(T)}
47
+ ${U.default.gray(n)} ${b}
48
+
49
+ `)},V,o$;var a=S(()=>{Ib();Ib();U=F(l1(),1),EI=F(p1(),1);L4=T4(),B4=B("\u25C6","*"),_4=B("\u25A0","x"),M4=B("\u25B2","x"),Yb=B("\u25C7","o"),A4=B("\u250C","T"),T=B("\u2502","|"),n=B("\u2514","\u2014"),$b=B("\u25CF",">"),Hb=B("\u25CB"," "),a$=B("\u25FB","[\u2022]"),i$=B("\u25FC","[+]"),r$=B("\u25FB","[ ]"),t$=B("\u25AA","\u2022"),RI=B("\u2500","-"),O4=B("\u256E","+"),R4=B("\u251C","+"),E4=B("\u256F","+"),y4=B("\u25CF","\u2022"),P4=B("\u25C6","*"),x4=B("\u25B2","!"),w4=B("\u25A0","x"),V={message:(b="",{symbol:I=U.default.gray(T)}={})=>{let $=[`${U.default.gray(T)}`];if(b){let[H,...Y]=b.split(`
50
+ `);$.push(`${I} ${H}`,...Y.map((X)=>`${U.default.gray(T)} ${X}`))}process.stdout.write(`${$.join(`
51
+ `)}
52
+ `)},info:(b)=>{V.message(b,{symbol:U.default.blue(y4)})},success:(b)=>{V.message(b,{symbol:U.default.green(P4)})},step:(b)=>{V.message(b,{symbol:U.default.green(Yb)})},warn:(b)=>{V.message(b,{symbol:U.default.yellow(x4)})},warning:(b)=>{V.warn(b)},error:(b)=>{V.message(b,{symbol:U.default.red(w4)})}},o$=`${U.default.gray(T)} `});var kI=M((b6,F4)=>{F4.exports={name:"dotenv",version:"17.2.0",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var DI=M((I6,m)=>{var Zb=O("fs"),T1=O("path"),v4=O("os"),C4=O("crypto"),h4=kI(),Jb=h4.version,FI=["\uD83D\uDD10 encrypt with dotenvx: https://dotenvx.com","\uD83D\uDD10 prevent committing .env to code: https://dotenvx.com/precommit","\uD83D\uDD10 prevent building .env in docker: https://dotenvx.com/prebuild","\uD83D\uDEE0\uFE0F run anywhere with `dotenvx run -- yourcommand`","\u2699\uFE0F specify custom .env file path with { path: '/custom/path/.env' }","\u2699\uFE0F enable debug logging with { debug: true }","\u2699\uFE0F override existing env vars with { override: true }","\u2699\uFE0F suppress all logs with { quiet: true }","\u2699\uFE0F write to custom object with { processEnv: myObject }","\u2699\uFE0F load multiple .env files with { path: ['.env.local', '.env'] }"];function m4(){return FI[Math.floor(Math.random()*FI.length)]}function i(b){if(typeof b==="string")return!["false","0","no","off",""].includes(b.toLowerCase());return Boolean(b)}function D4(){return process.stdout.isTTY}function f4(b){return D4()?`\x1B[2m${b}\x1B[0m`:b}var d4=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function c4(b){let I={},$=b.toString();$=$.replace(/\r\n?/mg,`
53
+ `);let H;while((H=d4.exec($))!=null){let Y=H[1],X=H[2]||"";X=X.trim();let G=X[0];if(X=X.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),G==='"')X=X.replace(/\\n/g,`
54
+ `),X=X.replace(/\\r/g,"\r");I[Y]=X}return I}function g4(b){b=b||{};let I=mI(b);b.path=I;let $=_.configDotenv(b);if(!$.parsed){let G=new Error(`MISSING_DATA: Cannot parse ${I} for an unknown reason`);throw G.code="MISSING_DATA",G}let H=hI(b).split(","),Y=H.length,X;for(let G=0;G<Y;G++)try{let Z=H[G].trim(),J=p4($,Z);X=_.decrypt(J.ciphertext,J.key);break}catch(Z){if(G+1>=Y)throw Z}return _.parse(X)}function u4(b){console.error(`[dotenv@${Jb}][WARN] ${b}`)}function G1(b){console.log(`[dotenv@${Jb}][DEBUG] ${b}`)}function CI(b){console.log(`[dotenv@${Jb}] ${b}`)}function hI(b){if(b&&b.DOTENV_KEY&&b.DOTENV_KEY.length>0)return b.DOTENV_KEY;if(process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0)return process.env.DOTENV_KEY;return""}function p4(b,I){let $;try{$=new URL(I)}catch(Z){if(Z.code==="ERR_INVALID_URL"){let J=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw J.code="INVALID_DOTENV_KEY",J}throw Z}let H=$.password;if(!H){let Z=new Error("INVALID_DOTENV_KEY: Missing key part");throw Z.code="INVALID_DOTENV_KEY",Z}let Y=$.searchParams.get("environment");if(!Y){let Z=new Error("INVALID_DOTENV_KEY: Missing environment part");throw Z.code="INVALID_DOTENV_KEY",Z}let X=`DOTENV_VAULT_${Y.toUpperCase()}`,G=b.parsed[X];if(!G){let Z=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${X} in your .env.vault file.`);throw Z.code="NOT_FOUND_DOTENV_ENVIRONMENT",Z}return{ciphertext:G,key:H}}function mI(b){let I=null;if(b&&b.path&&b.path.length>0)if(Array.isArray(b.path)){for(let $ of b.path)if(Zb.existsSync($))I=$.endsWith(".vault")?$:`${$}.vault`}else I=b.path.endsWith(".vault")?b.path:`${b.path}.vault`;else I=T1.resolve(process.cwd(),".env.vault");if(Zb.existsSync(I))return I;return null}function vI(b){return b[0]==="~"?T1.join(v4.homedir(),b.slice(1)):b}function n4(b){let I=i(process.env.DOTENV_CONFIG_DEBUG||b&&b.debug),$=i(process.env.DOTENV_CONFIG_QUIET||b&&b.quiet);if(I||!$)CI("Loading env from encrypted .env.vault");let H=_._parseVault(b),Y=process.env;if(b&&b.processEnv!=null)Y=b.processEnv;return _.populate(Y,H,b),{parsed:H}}function l4(b){let I=T1.resolve(process.cwd(),".env"),$="utf8",H=process.env;if(b&&b.processEnv!=null)H=b.processEnv;let Y=i(H.DOTENV_CONFIG_DEBUG||b&&b.debug),X=i(H.DOTENV_CONFIG_QUIET||b&&b.quiet);if(b&&b.encoding)$=b.encoding;else if(Y)G1("No encoding is specified. UTF-8 is used by default");let G=[I];if(b&&b.path)if(!Array.isArray(b.path))G=[vI(b.path)];else{G=[];for(let Q of b.path)G.push(vI(Q))}let Z,J={};for(let Q of G)try{let W=_.parse(Zb.readFileSync(Q,{encoding:$}));_.populate(J,W,b)}catch(W){if(Y)G1(`Failed to load ${Q} ${W.message}`);Z=W}let q=_.populate(H,J,b);if(Y=i(H.DOTENV_CONFIG_DEBUG||Y),X=i(H.DOTENV_CONFIG_QUIET||X),Y||!X){let Q=Object.keys(q).length,W=[];for(let z of G)try{let N=T1.relative(process.cwd(),z);W.push(N)}catch(N){if(Y)G1(`Failed to load ${z} ${N.message}`);Z=N}CI(`injecting env (${Q}) from ${W.join(",")} ${f4(`(tip: ${m4()})`)}`)}if(Z)return{parsed:J,error:Z};else return{parsed:J}}function a4(b){if(hI(b).length===0)return _.configDotenv(b);let I=mI(b);if(!I)return u4(`You set DOTENV_KEY but you are missing a .env.vault file at ${I}. Did you forget to build it?`),_.configDotenv(b);return _._configVault(b)}function i4(b,I){let $=Buffer.from(I.slice(-64),"hex"),H=Buffer.from(b,"base64"),Y=H.subarray(0,12),X=H.subarray(-16);H=H.subarray(12,-16);try{let G=C4.createDecipheriv("aes-256-gcm",$,Y);return G.setAuthTag(X),`${G.update(H)}${G.final()}`}catch(G){let Z=G instanceof RangeError,J=G.message==="Invalid key length",q=G.message==="Unsupported state or unable to authenticate data";if(Z||J){let Q=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw Q.code="INVALID_DOTENV_KEY",Q}else if(q){let Q=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw Q.code="DECRYPTION_FAILED",Q}else throw G}}function r4(b,I,$={}){let H=Boolean($&&$.debug),Y=Boolean($&&$.override),X={};if(typeof I!=="object"){let G=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw G.code="OBJECT_REQUIRED",G}for(let G of Object.keys(I))if(Object.prototype.hasOwnProperty.call(b,G)){if(Y===!0)b[G]=I[G],X[G]=I[G];if(H)if(Y===!0)G1(`"${G}" is already defined and WAS overwritten`);else G1(`"${G}" is already defined and was NOT overwritten`)}else b[G]=I[G],X[G]=I[G];return X}var _={configDotenv:l4,_configVault:n4,_parseVault:g4,config:a4,decrypt:i4,parse:c4,populate:r4};I6.configDotenv=_.configDotenv;I6._configVault=_._configVault;I6._parseVault=_._parseVault;I6.config=_.config;I6.decrypt=_.decrypt;I6.parse=_.parse;I6.populate=_.populate;m.exports=_});import{existsSync as fI,readFileSync as dI}from"fs";import{join as cI}from"path";function pI(b){let I;try{I=cI(process.cwd(),".commit-wizardrc")}catch{I="/tmp/.commit-wizardrc"}let $=cI(process.env.HOME||process.env.USERPROFILE||"/tmp",".commit-wizardrc"),H={...$3};try{if(fI($)){let X=dI($,"utf-8"),G=JSON.parse(X);H=gI(H,G)}}catch{console.warn("\u26A0\uFE0F Erro ao ler configura\xE7\xE3o global: Erro desconhecido")}let Y=b||I;try{if(fI(Y)){let X=dI(Y,"utf-8"),G=JSON.parse(X);H=gI(H,G)}}catch{console.warn("\u26A0\uFE0F Erro ao ler .commit-wizardrc: Erro desconhecido")}if(H.openai.apiKey=process.env.OPENAI_API_KEY,process.env.COMMIT_WIZARD_DEBUG==="true");if(process.env.COMMIT_WIZARD_DRY_RUN==="true")H.dryRun=!0;return H}function gI(b,I){return{...b,...I,openai:{...b.openai,...I.openai},smartSplit:{...b.smartSplit,...I.smartSplit},cache:{...b.cache,...I.cache}}}function nI(b){let I=[];if(!b.openai.apiKey)I.push("OPENAI_API_KEY n\xE3o encontrada nas vari\xE1veis de ambiente");if(b.openai.maxTokens<10||b.openai.maxTokens>4000)I.push("maxTokens deve estar entre 10 e 4000");if(b.openai.temperature<0||b.openai.temperature>2)I.push("temperature deve estar entre 0 e 2");if(!["pt","en","es","fr","de","it","ja","ko","zh"].includes(b.language))I.push("language deve ser um idioma suportado (pt, en, es, fr, de, it, ja, ko, zh)");if(!["conventional","simple","detailed"].includes(b.commitStyle))I.push("commitStyle deve ser conventional, simple ou detailed");if(b.smartSplit.minGroupSize<1)I.push("smartSplit.minGroupSize deve ser pelo menos 1");if(b.smartSplit.maxGroups<1||b.smartSplit.maxGroups>10)I.push("smartSplit.maxGroups deve estar entre 1 e 10");if(b.smartSplit.confidenceThreshold<0||b.smartSplit.confidenceThreshold>1)I.push("smartSplit.confidenceThreshold deve estar entre 0 e 1");if(b.cache.ttl<1)I.push("cache.ttl deve ser pelo menos 1 minuto");if(b.cache.maxSize<1)I.push("cache.maxSize deve ser pelo menos 1");return I}var uI,$3;var lI=S(()=>{uI=F(DI(),1);uI.default.config();$3={openai:{model:"gpt-4o",maxTokens:150,temperature:0.7,timeout:30000,retries:2},language:"pt",commitStyle:"conventional",autoCommit:!1,splitCommits:!1,dryRun:!1,smartSplit:{enabled:!0,minGroupSize:1,maxGroups:5,confidenceThreshold:0.7},cache:{enabled:!0,ttl:60,maxSize:100}}});var r={};e(r,{isGitRepository:()=>qb,getGitStatus:()=>Qb,getFileDiff:()=>H3,getDiffStats:()=>Ub,executeFileCommit:()=>$1,executeCommit:()=>f});import{execSync as D}from"child_process";function qb(){try{return D("git rev-parse --git-dir",{stdio:"ignore"}),!0}catch{return!1}}function Qb(){try{let I=D("git diff --cached --name-only",{encoding:"utf-8",stdio:"pipe"}).trim().split(`
55
+ `).filter((H)=>H.length>0),$=I.length>0?D("git diff --cached",{encoding:"utf-8",stdio:"pipe"}):"";return{hasStaged:I.length>0,stagedFiles:I,diff:$.trim()}}catch(b){throw new Error(`Erro ao obter status do Git: ${b instanceof Error?b.message:"Erro desconhecido"}`)}}function H3(b){try{return D(`git diff --cached -- "${b}"`,{encoding:"utf-8",stdio:"pipe"})}catch(I){throw new Error(`Erro ao obter diff do arquivo ${b}: ${I instanceof Error?I.message:"Erro desconhecido"}`)}}function f(b){try{return D(`git commit -m "${b.replace(/"/g,"\\\"")}"`,{stdio:"pipe"}),{success:!0,hash:D("git rev-parse HEAD",{encoding:"utf-8",stdio:"pipe"}).trim(),message:b}}catch(I){return{success:!1,error:I instanceof Error?I.message:"Erro desconhecido ao executar commit"}}}function $1(b,I){try{return D(`git commit "${b}" -m "${I.replace(/"/g,"\\\"")}"`,{stdio:"pipe"}),{success:!0,hash:D("git rev-parse HEAD",{encoding:"utf-8",stdio:"pipe"}).trim(),message:I}}catch($){return{success:!1,error:$ instanceof Error?$.message:"Erro desconhecido ao executar commit do arquivo"}}}function Ub(){try{let I=D("git diff --cached --numstat",{encoding:"utf-8",stdio:"pipe"}).trim().split(`
56
+ `).filter((Y)=>Y.length>0),$=0,H=0;return I.forEach((Y)=>{let[X,G]=Y.split("\t");if(X&&X!=="-")$+=parseInt(X)||0;if(G&&G!=="-")H+=parseInt(G)||0}),{added:$,removed:H,files:I.length}}catch{return{added:0,removed:0,files:0}}}var c=()=>{};var oI={};e(oI,{generateWithRetry:()=>L1,generateCommitMessage:()=>tI,extractCommitTypeFromMessage:()=>iI,detectCommitType:()=>rI,buildPrompt:()=>aI});function aI(b,I,$){let H=I.language==="pt"?"portugu\xEAs":"english",Y=Y3(I.commitStyle,I.language),X=6000,G=b.length>6000?b.substring(0,6000)+`
57
+ ... (diff truncado)`:b,Z=$.length>10?`${$.length} arquivos: ${$.slice(0,5).join(", ")}...`:$.join(", ");return`Gere mensagem de commit em ${H} (${I.commitStyle}).
58
+
59
+ Arquivos: ${Z}
60
+
61
+ ${Y}
62
+
63
+ Diff:
64
+ \`\`\`
65
+ ${G}
66
+ \`\`\`
67
+
68
+ Mensagem:`}function Y3(b,I){let $={pt:{conventional:`- Use formato: tipo(escopo): descri\xE7\xE3o
69
+ - Tipos v\xE1lidos: feat, fix, docs, style, refactor, test, chore, build, ci
70
+ - Exemplo: "feat(auth): adicionar valida\xE7\xE3o de email"
71
+ - Mantenha a primeira linha com at\xE9 50 caracteres`,simple:`- Use formato simples e direto
72
+ - Comece com verbo no infinitivo
73
+ - Exemplo: "corrigir valida\xE7\xE3o de formul\xE1rio"
74
+ - M\xE1ximo 50 caracteres`,detailed:`- Primeira linha: resumo em at\xE9 50 caracteres
75
+ - Se necess\xE1rio, adicione corpo explicativo
76
+ - Use presente do indicativo
77
+ - Seja descritivo mas conciso`},en:{conventional:`- Use format: type(scope): description
78
+ - Valid types: feat, fix, docs, style, refactor, test, chore, build, ci
79
+ - Example: "feat(auth): add email validation"
80
+ - Keep first line under 50 characters`,simple:`- Use simple and direct format
81
+ - Start with imperative verb
82
+ - Example: "fix form validation"
83
+ - Maximum 50 characters`,detailed:`- First line: summary under 50 characters
84
+ - Add explanatory body if needed
85
+ - Use imperative mood
86
+ - Be descriptive but concise`}},H=I==="pt"?"pt":"en";return $[H][b]||$[H].conventional}function iI(b){let I={feat:/^(feat|feature)(\([^)]+\))?:/i,fix:/^(fix|bugfix)(\([^)]+\))?:/i,docs:/^(docs|documentation)(\([^)]+\))?:/i,style:/^(style|format)(\([^)]+\))?:/i,refactor:/^(refactor|refactoring)(\([^)]+\))?:/i,test:/^(test|testing)(\([^)]+\))?:/i,chore:/^(chore|maintenance)(\([^)]+\))?:/i,build:/^(build|ci)(\([^)]+\))?:/i,ci:/^(ci|continuous-integration)(\([^)]+\))?:/i};for(let[$,H]of Object.entries(I))if(H.test(b))return $;return null}function rI(b,I){let $=b.toLowerCase(),H=I.join(" ").toLowerCase();if(H.includes("test")||H.includes("spec")||$.includes("test("))return"test";if(H.includes("readme")||H.includes(".md")||H.includes("docs"))return"docs";if(H.includes("package.json")||H.includes("dockerfile")||H.includes(".yml")||H.includes(".yaml")||H.includes("webpack")||H.includes("tsconfig"))return"build";if(H.includes(".css")||H.includes(".scss")||$.includes("style")||$.includes("format"))return"style";if($.includes("fix")||$.includes("bug")||$.includes("error")||$.includes("issue"))return"fix";if($.includes("add")||$.includes("new")||$.includes("create")||$.includes("implement"))return"feat";if($.includes("refactor")||$.includes("restructure")||$.includes("rename"))return"refactor";return"chore"}async function tI(b,I,$){try{if(!I.openai.apiKey)return{success:!1,error:"Chave da OpenAI n\xE3o encontrada. Configure OPENAI_API_KEY nas vari\xE1veis de ambiente."};let H=aI(b,I,$),Y=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{Authorization:`Bearer ${I.openai.apiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:I.openai.model,messages:[{role:"user",content:H}],max_tokens:Math.min(I.openai.maxTokens,150),temperature:I.openai.temperature})});if(!Y.ok){let q=await Y.json().catch(()=>({}));return{success:!1,error:`Erro da OpenAI (${Y.status}): ${q.error?.message||"Erro desconhecido"}`}}let G=(await Y.json()).choices?.[0]?.message?.content?.trim();if(!G)return{success:!1,error:"OpenAI retornou resposta vazia"};G=G.replace(/^```\s*/,"").replace(/\s*```$/,""),G=G.trim();let Z=iI(G),J=rI(b,$);return{success:!0,suggestion:{message:G,type:Z||J,confidence:0.8}}}catch(H){return{success:!1,error:`Erro ao conectar com OpenAI: ${H instanceof Error?H.message:"Erro desconhecido"}`}}}async function L1(b,I,$,H=3){let Y="";for(let X=0;X<H;X++){let G=await tI(b,I,$);if(G.success)return G;if(Y=G.error||"Erro desconhecido",X<H-1)await new Promise((Z)=>setTimeout(Z,Math.pow(2,X)*1000))}return{success:!1,error:`Falha ap\xF3s ${H} tentativas. \xDAltimo erro: ${Y}`}}import sI from"fs";function X3(){try{return sI.statSync("/.dockerenv"),!0}catch{return!1}}function Z3(){try{return sI.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function Wb(){if(Vb===void 0)Vb=X3()||Z3();return Vb}var Vb;var eI=()=>{};import J3 from"fs";function B1(){if(zb===void 0)zb=q3()||Wb();return zb}var zb,q3=()=>{try{return J3.statSync("/run/.containerenv"),!0}catch{return!1}};var b0=S(()=>{eI()});import G0 from"process";import Q3 from"os";import U3 from"fs";var I0=()=>{if(G0.platform!=="linux")return!1;if(Q3.release().toLowerCase().includes("microsoft")){if(B1())return!1;return!0}try{return U3.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!B1():!1}catch{return!1}},$0;var H0=S(()=>{b0();$0=G0.env.__IS_WSL_TEST__?I0:I0()});var q0=M((N6,J0)=>{J0.exports=Z0;Z0.sync=W3;var Y0=O("fs");function V3(b,I){var $=I.pathExt!==void 0?I.pathExt:process.env.PATHEXT;if(!$)return!0;if($=$.split(";"),$.indexOf("")!==-1)return!0;for(var H=0;H<$.length;H++){var Y=$[H].toLowerCase();if(Y&&b.substr(-Y.length).toLowerCase()===Y)return!0}return!1}function X0(b,I,$){if(!b.isSymbolicLink()&&!b.isFile())return!1;return V3(I,$)}function Z0(b,I,$){Y0.stat(b,function(H,Y){$(H,H?!1:X0(Y,b,I))})}function W3(b,I){return X0(Y0.statSync(b),b,I)}});var z0=M((K6,W0)=>{W0.exports=U0;U0.sync=z3;var Q0=O("fs");function U0(b,I,$){Q0.stat(b,function(H,Y){$(H,H?!1:V0(Y,I))})}function z3(b,I){return V0(Q0.statSync(b),I)}function V0(b,I){return b.isFile()&&S3(b,I)}function S3(b,I){var{mode:$,uid:H,gid:Y}=b,X=I.uid!==void 0?I.uid:process.getuid&&process.getuid(),G=I.gid!==void 0?I.gid:process.getgid&&process.getgid(),Z=parseInt("100",8),J=parseInt("010",8),q=parseInt("001",8),Q=Z|J,W=$&q||$&J&&Y===G||$&Z&&H===X||$&Q&&X===0;return W}});var N0=M((T6,S0)=>{var j6=O("fs"),_1;if(process.platform==="win32"||global.TESTING_WINDOWS)_1=q0();else _1=z0();S0.exports=Sb;Sb.sync=N3;function Sb(b,I,$){if(typeof I==="function")$=I,I={};if(!$){if(typeof Promise!=="function")throw new TypeError("callback not provided");return new Promise(function(H,Y){Sb(b,I||{},function(X,G){if(X)Y(X);else H(G)})})}_1(b,I||{},function(H,Y){if(H){if(H.code==="EACCES"||I&&I.ignoreErrors)H=null,Y=!1}$(H,Y)})}function N3(b,I){try{return _1.sync(b,I||{})}catch($){if(I&&I.ignoreErrors||$.code==="EACCES")return!1;else throw $}}});var M0=M((L6,_0)=>{var t=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",K0=O("path"),K3=t?";":":",j0=N0(),T0=(b)=>Object.assign(new Error(`not found: ${b}`),{code:"ENOENT"}),L0=(b,I)=>{let $=I.colon||K3,H=b.match(/\//)||t&&b.match(/\\/)?[""]:[...t?[process.cwd()]:[],...(I.path||process.env.PATH||"").split($)],Y=t?I.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",X=t?Y.split($):[""];if(t){if(b.indexOf(".")!==-1&&X[0]!=="")X.unshift("")}return{pathEnv:H,pathExt:X,pathExtExe:Y}},B0=(b,I,$)=>{if(typeof I==="function")$=I,I={};if(!I)I={};let{pathEnv:H,pathExt:Y,pathExtExe:X}=L0(b,I),G=[],Z=(q)=>new Promise((Q,W)=>{if(q===H.length)return I.all&&G.length?Q(G):W(T0(b));let z=H[q],N=/^".*"$/.test(z)?z.slice(1,-1):z,j=K0.join(N,b),K=!N&&/^\.[\\\/]/.test(b)?b.slice(0,2)+j:j;Q(J(K,q,0))}),J=(q,Q,W)=>new Promise((z,N)=>{if(W===Y.length)return z(Z(Q+1));let j=Y[W];j0(q+j,{pathExt:X},(K,A)=>{if(!K&&A)if(I.all)G.push(q+j);else return z(q+j);return z(J(q,Q,W+1))})});return $?Z(0).then((q)=>$(null,q),$):Z(0)},j3=(b,I)=>{I=I||{};let{pathEnv:$,pathExt:H,pathExtExe:Y}=L0(b,I),X=[];for(let G=0;G<$.length;G++){let Z=$[G],J=/^".*"$/.test(Z)?Z.slice(1,-1):Z,q=K0.join(J,b),Q=!J&&/^\.[\\\/]/.test(b)?b.slice(0,2)+q:q;for(let W=0;W<H.length;W++){let z=Q+H[W];try{if(j0.sync(z,{pathExt:Y}))if(I.all)X.push(z);else return z}catch(N){}}}if(I.all&&X.length)return X;if(I.nothrow)return null;throw T0(b)};_0.exports=B0;B0.sync=j3});var O0=M((B6,Nb)=>{var A0=(b={})=>{let I=b.env||process.env;if((b.platform||process.platform)!=="win32")return"PATH";return Object.keys(I).reverse().find((H)=>H.toUpperCase()==="PATH")||"Path"};Nb.exports=A0;Nb.exports.default=A0});var P0=M((_6,y0)=>{var R0=O("path"),T3=M0(),L3=O0();function E0(b,I){let $=b.options.env||process.env,H=process.cwd(),Y=b.options.cwd!=null,X=Y&&process.chdir!==void 0&&!process.chdir.disabled;if(X)try{process.chdir(b.options.cwd)}catch(Z){}let G;try{G=T3.sync(b.command,{path:$[L3({env:$})],pathExt:I?R0.delimiter:void 0})}catch(Z){}finally{if(X)process.chdir(H)}if(G)G=R0.resolve(Y?b.options.cwd:"",G);return G}function B3(b){return E0(b)||E0(b,!0)}y0.exports=B3});var x0=M((A3,jb)=>{var Kb=/([()\][%!^"`<>&|;, *?])/g;function _3(b){return b=b.replace(Kb,"^$1"),b}function M3(b,I){if(b=`${b}`,b=b.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),b=b.replace(/(?=(\\+?)?)\1$/,"$1$1"),b=`"${b}"`,b=b.replace(Kb,"^$1"),I)b=b.replace(Kb,"^$1");return b}A3.command=_3;A3.argument=M3});var k0=M((M6,w0)=>{w0.exports=/^#!(.*)/});var v0=M((A6,F0)=>{var E3=k0();F0.exports=(b="")=>{let I=b.match(E3);if(!I)return null;let[$,H]=I[0].replace(/#! ?/,"").split(" "),Y=$.split("/").pop();if(Y==="env")return H;return H?`${Y} ${H}`:Y}});var h0=M((O6,C0)=>{var Tb=O("fs"),y3=v0();function P3(b){let $=Buffer.alloc(150),H;try{H=Tb.openSync(b,"r"),Tb.readSync(H,$,0,150,0),Tb.closeSync(H)}catch(Y){}return y3($.toString())}C0.exports=P3});var d0=M((R6,f0)=>{var x3=O("path"),m0=P0(),D0=x0(),w3=h0(),k3=process.platform==="win32",F3=/\.(?:com|exe)$/i,v3=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function C3(b){b.file=m0(b);let I=b.file&&w3(b.file);if(I)return b.args.unshift(b.file),b.command=I,m0(b);return b.file}function h3(b){if(!k3)return b;let I=C3(b),$=!F3.test(I);if(b.options.forceShell||$){let H=v3.test(I);b.command=x3.normalize(b.command),b.command=D0.command(b.command),b.args=b.args.map((X)=>D0.argument(X,H));let Y=[b.command].concat(b.args).join(" ");b.args=["/d","/s","/c",`"${Y}"`],b.command=process.env.comspec||"cmd.exe",b.options.windowsVerbatimArguments=!0}return b}function m3(b,I,$){if(I&&!Array.isArray(I))$=I,I=null;I=I?I.slice(0):[],$=Object.assign({},$);let H={command:b,args:I,options:$,file:void 0,original:{command:b,args:I}};return $.shell?H:h3(H)}f0.exports=m3});var u0=M((E6,g0)=>{var Lb=process.platform==="win32";function Bb(b,I){return Object.assign(new Error(`${I} ${b.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${I} ${b.command}`,path:b.command,spawnargs:b.args})}function D3(b,I){if(!Lb)return;let $=b.emit;b.emit=function(H,Y){if(H==="exit"){let X=c0(Y,I);if(X)return $.call(b,"error",X)}return $.apply(b,arguments)}}function c0(b,I){if(Lb&&b===1&&!I.file)return Bb(I.original,"spawn");return null}function f3(b,I){if(Lb&&b===1&&!I.file)return Bb(I.original,"spawnSync");return null}g0.exports={hookChildProcess:D3,verifyENOENT:c0,verifyENOENTSync:f3,notFoundError:Bb}});var l0=M((y6,o)=>{var p0=O("child_process"),_b=d0(),Mb=u0();function n0(b,I,$){let H=_b(b,I,$),Y=p0.spawn(H.command,H.args,H.options);return Mb.hookChildProcess(Y,H),Y}function d3(b,I,$){let H=_b(b,I,$),Y=p0.spawnSync(H.command,H.args,H.options);return Y.error=Y.error||Mb.verifyENOENTSync(Y.status,H),Y}o.exports=n0;o.exports.spawn=n0;o.exports.sync=d3;o.exports._parse=_b;o.exports._enoent=Mb});function Ab(b){let I=typeof b==="string"?`
87
+ `:`
88
+ `.charCodeAt(),$=typeof b==="string"?"\r":"\r".charCodeAt();if(b[b.length-1]===I)b=b.slice(0,-1);if(b[b.length-1]===$)b=b.slice(0,-1);return b}function M1(b={}){let{env:I=process.env,platform:$=process.platform}=b;if($!=="win32")return"PATH";return Object.keys(I).reverse().find((H)=>H.toUpperCase()==="PATH")||"Path"}import A1 from"process";import H1 from"path";import{fileURLToPath as a0}from"url";var c3=({cwd:b=A1.cwd(),path:I=A1.env[M1()],preferLocal:$=!0,execPath:H=A1.execPath,addExecPath:Y=!0}={})=>{let X=b instanceof URL?a0(b):b,G=H1.resolve(X),Z=[];if($)g3(Z,G);if(Y)u3(Z,H,G);return[...Z,I].join(H1.delimiter)},g3=(b,I)=>{let $;while($!==I)b.push(H1.join(I,"node_modules/.bin")),$=I,I=H1.resolve(I,"..")},u3=(b,I,$)=>{let H=I instanceof URL?a0(I):I;b.push(H1.resolve($,H,".."))},i0=({env:b=A1.env,...I}={})=>{b={...b};let $=M1({env:b});return I.path=b[$],b[$]=c3(I),b};var r0=()=>{};function Ob(b,I,{ignoreNonConfigurable:$=!1}={}){let{name:H}=b;for(let Y of Reflect.ownKeys(I))p3(b,I,Y,$);return l3(b,I),t3(b,I,H),b}var p3=(b,I,$,H)=>{if($==="length"||$==="prototype")return;if($==="arguments"||$==="caller")return;let Y=Object.getOwnPropertyDescriptor(b,$),X=Object.getOwnPropertyDescriptor(I,$);if(!n3(Y,X)&&H)return;Object.defineProperty(b,$,X)},n3=function(b,I){return b===void 0||b.configurable||b.writable===I.writable&&b.enumerable===I.enumerable&&b.configurable===I.configurable&&(b.writable||b.value===I.value)},l3=(b,I)=>{let $=Object.getPrototypeOf(I);if($===Object.getPrototypeOf(b))return;Object.setPrototypeOf(b,$)},a3=(b,I)=>`/* Wrapped ${b}*/
89
+ ${I}`,i3,r3,t3=(b,I,$)=>{let H=$===""?"":`with ${$.trim()}() `,Y=a3.bind(null,H,I.toString());Object.defineProperty(Y,"name",r3),Object.defineProperty(b,"toString",{...i3,value:Y})};var t0=S(()=>{i3=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),r3=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name")});var O1,o0=(b,I={})=>{if(typeof b!=="function")throw new TypeError("Expected a function");let $,H=0,Y=b.displayName||b.name||"<anonymous>",X=function(...G){if(O1.set(X,++H),H===1)$=b.apply(this,G),b=null;else if(I.throw===!0)throw new Error(`Function \`${Y}\` can only be called once`);return $};return Ob(X,b),O1.set(X,H),X},s0;var e0=S(()=>{t0();O1=new WeakMap;o0.callCount=(b)=>{if(!O1.has(b))throw new Error(`The given function \`${b.name}\` is not wrapped by the \`onetime\` package`);return O1.get(b)};s0=o0});var b2=()=>{let b=Rb-I2+1;return Array.from({length:b},o3)},o3=(b,I)=>({name:`SIGRT${I+1}`,number:I2+I,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),I2=34,Rb=64;var G2;var $2=S(()=>{G2=[{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"}]});import{constants as s3}from"os";var Eb=()=>{let b=b2();return[...G2,...b].map(e3)},e3=({name:b,number:I,description:$,action:H,forced:Y=!1,standard:X})=>{let{signals:{[b]:G}}=s3,Z=G!==void 0;return{name:b,number:Z?G:I,description:$,supported:Z,action:H,forced:Y,standard:X}};var H2=S(()=>{$2()});import{constants as bG}from"os";var IG=()=>{let b=Eb();return Object.fromEntries(b.map(GG))},GG=({name:b,number:I,description:$,supported:H,action:Y,forced:X,standard:G})=>[b,{name:b,number:I,description:$,supported:H,action:Y,forced:X,standard:G}],Y2,$G=()=>{let b=Eb(),I=Rb+1,$=Array.from({length:I},(H,Y)=>HG(Y,b));return Object.assign({},...$)},HG=(b,I)=>{let $=YG(b,I);if($===void 0)return{};let{name:H,description:Y,supported:X,action:G,forced:Z,standard:J}=$;return{[b]:{name:H,number:b,description:Y,supported:X,action:G,forced:Z,standard:J}}},YG=(b,I)=>{let $=I.find(({name:H})=>bG.signals[H]===b);if($!==void 0)return $;return I.find((H)=>H.number===b)},i6;var X2=S(()=>{H2();Y2=IG(),i6=$G()});import XG from"process";var ZG=({timedOut:b,timeout:I,errorCode:$,signal:H,signalDescription:Y,exitCode:X,isCanceled:G})=>{if(b)return`timed out after ${I} milliseconds`;if(G)return"was canceled";if($!==void 0)return`failed with ${$}`;if(H!==void 0)return`was killed with ${H} (${Y})`;if(X!==void 0)return`failed with exit code ${X}`;return"failed"},Y1=({stdout:b,stderr:I,all:$,error:H,signal:Y,exitCode:X,command:G,escapedCommand:Z,timedOut:J,isCanceled:q,killed:Q,parsed:{options:{timeout:W,cwd:z=XG.cwd()}}})=>{X=X===null?void 0:X,Y=Y===null?void 0:Y;let N=Y===void 0?void 0:Y2[Y].description,j=H&&H.code,A=`Command ${ZG({timedOut:J,timeout:W,errorCode:j,signal:Y,signalDescription:N,exitCode:X,isCanceled:q})}: ${G}`,h=Object.prototype.toString.call(H)==="[object Error]",R=h?`${A}
90
+ ${H.message}`:A,u=[R,I,b].filter(Boolean).join(`
91
+ `);if(h)H.originalMessage=H.message,H.message=u;else H=new Error(u);if(H.shortMessage=R,H.command=G,H.escapedCommand=Z,H.exitCode=X,H.signal=Y,H.signalDescription=N,H.stdout=b,H.stderr=I,H.cwd=z,$!==void 0)H.all=$;if("bufferedData"in H)delete H.bufferedData;return H.failed=!0,H.timedOut=Boolean(J),H.isCanceled=q,H.killed=Q&&!J,H};var Z2=S(()=>{X2()});var R1,JG=(b)=>R1.some((I)=>b[I]!==void 0),J2=(b)=>{if(!b)return;let{stdio:I}=b;if(I===void 0)return R1.map((H)=>b[H]);if(JG(b))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${R1.map((H)=>`\`${H}\``).join(", ")}`);if(typeof I==="string")return I;if(!Array.isArray(I))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof I}\``);let $=Math.max(I.length,R1.length);return Array.from({length:$},(H,Y)=>I[Y])};var q2=S(()=>{R1=["stdin","stdout","stderr"]});var g;var Q2=S(()=>{g=[];g.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")g.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")g.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class U2{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Pb[yb])return Pb[yb];qG(Pb,yb,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(b,I){this.listeners[b].push(I)}removeListener(b,I){let $=this.listeners[b],H=$.indexOf(I);if(H===-1)return;if(H===0&&$.length===1)$.length=0;else $.splice(H,1)}emit(b,I,$){if(this.emitted[b])return!1;this.emitted[b]=!0;let H=!1;for(let Y of this.listeners[b])H=Y(I,$)===!0||H;if(b==="exit")H=this.emit("afterExit",I,$)||H;return H}}class wb{}var E1=(b)=>!!b&&typeof b==="object"&&typeof b.removeListener==="function"&&typeof b.emit==="function"&&typeof b.reallyExit==="function"&&typeof b.listeners==="function"&&typeof b.kill==="function"&&typeof b.pid==="number"&&typeof b.on==="function",yb,Pb,qG,QG=(b)=>{return{onExit(I,$){return b.onExit(I,$)},load(){return b.load()},unload(){return b.unload()}}},V2,W2,xb,z2,G8,$8;var S2=S(()=>{Q2();yb=Symbol.for("signal-exit emitter"),Pb=globalThis,qG=Object.defineProperty.bind(Object);V2=class V2 extends wb{onExit(){return()=>{}}load(){}unload(){}};W2=class W2 extends wb{#X=xb.platform==="win32"?"SIGINT":"SIGHUP";#I=new U2;#b;#H;#Y;#$={};#G=!1;constructor(b){super();this.#b=b,this.#$={};for(let I of g)this.#$[I]=()=>{let $=this.#b.listeners(I),{count:H}=this.#I,Y=b;if(typeof Y.__signal_exit_emitter__==="object"&&typeof Y.__signal_exit_emitter__.count==="number")H+=Y.__signal_exit_emitter__.count;if($.length===H){this.unload();let X=this.#I.emit("exit",null,I),G=I==="SIGHUP"?this.#X:I;if(!X)b.kill(b.pid,G)}};this.#Y=b.reallyExit,this.#H=b.emit}onExit(b,I){if(!E1(this.#b))return()=>{};if(this.#G===!1)this.load();let $=I?.alwaysLast?"afterExit":"exit";return this.#I.on($,b),()=>{if(this.#I.removeListener($,b),this.#I.listeners.exit.length===0&&this.#I.listeners.afterExit.length===0)this.unload()}}load(){if(this.#G)return;this.#G=!0,this.#I.count+=1;for(let b of g)try{let I=this.#$[b];if(I)this.#b.on(b,I)}catch(I){}this.#b.emit=(b,...I)=>{return this.#J(b,...I)},this.#b.reallyExit=(b)=>{return this.#Z(b)}}unload(){if(!this.#G)return;this.#G=!1,g.forEach((b)=>{let I=this.#$[b];if(!I)throw new Error("Listener not defined for signal: "+b);try{this.#b.removeListener(b,I)}catch($){}}),this.#b.emit=this.#H,this.#b.reallyExit=this.#Y,this.#I.count-=1}#Z(b){if(!E1(this.#b))return 0;return this.#b.exitCode=b||0,this.#I.emit("exit",this.#b.exitCode,null),this.#Y.call(this.#b,this.#b.exitCode)}#J(b,...I){let $=this.#H;if(b==="exit"&&E1(this.#b)){if(typeof I[0]==="number")this.#b.exitCode=I[0];let H=$.call(this.#b,b,...I);return this.#I.emit("exit",this.#b.exitCode,null),H}else return $.call(this.#b,b,...I)}};xb=globalThis.process,{onExit:z2,load:G8,unload:$8}=QG(E1(xb)?new W2(xb):new V2)});import UG from"os";var VG=5000,N2=(b,I="SIGTERM",$={})=>{let H=b(I);return WG(b,I,$,H),H},WG=(b,I,$,H)=>{if(!zG(I,$,H))return;let Y=NG($),X=setTimeout(()=>{b("SIGKILL")},Y);if(X.unref)X.unref()},zG=(b,{forceKillAfterTimeout:I},$)=>SG(b)&&I!==!1&&$,SG=(b)=>b===UG.constants.signals.SIGTERM||typeof b==="string"&&b.toUpperCase()==="SIGTERM",NG=({forceKillAfterTimeout:b=!0})=>{if(b===!0)return VG;if(!Number.isFinite(b)||b<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${b}\` (${typeof b})`);return b},K2=(b,I)=>{if(b.kill())I.isCanceled=!0},KG=(b,I,$)=>{b.kill(I),$(Object.assign(new Error("Timed out"),{timedOut:!0,signal:I}))},j2=(b,{timeout:I,killSignal:$="SIGTERM"},H)=>{if(I===0||I===void 0)return H;let Y,X=new Promise((Z,J)=>{Y=setTimeout(()=>{KG(b,$,J)},I)}),G=H.finally(()=>{clearTimeout(Y)});return Promise.race([X,G])},T2=({timeout:b})=>{if(b!==void 0&&(!Number.isFinite(b)||b<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${b}\` (${typeof b})`)},L2=async(b,{cleanup:I,detached:$},H)=>{if(!I||$)return H;let Y=z2(()=>{b.kill()});return H.finally(()=>{Y()})};var B2=S(()=>{S2()});function y1(b){return b!==null&&typeof b==="object"&&typeof b.pipe==="function"}function kb(b){return y1(b)&&b.writable!==!1&&typeof b._write==="function"&&typeof b._writableState==="object"}import{createWriteStream as jG}from"fs";import{ChildProcess as TG}from"child_process";var LG=(b)=>b instanceof TG&&typeof b.then==="function",Fb=(b,I,$)=>{if(typeof $==="string")return b[I].pipe(jG($)),b;if(kb($))return b[I].pipe($),b;if(!LG($))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!kb($.stdin))throw new TypeError("The target child process's stdin must be available.");return b[I].pipe($.stdin),$},_2=(b)=>{if(b.stdout!==null)b.pipeStdout=Fb.bind(void 0,b,"stdout");if(b.stderr!==null)b.pipeStderr=Fb.bind(void 0,b,"stderr");if(b.all!==void 0)b.pipeAll=Fb.bind(void 0,b,"all")};var M2=()=>{};var X1=async(b,{init:I,convertChunk:$,getSize:H,truncateChunk:Y,addChunk:X,getFinalChunk:G,finalize:Z},{maxBuffer:J=Number.POSITIVE_INFINITY}={})=>{if(!_G(b))throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");let q=I();q.length=0;try{for await(let Q of b){let W=MG(Q),z=$[W](Q,q);R2({convertedChunk:z,state:q,getSize:H,truncateChunk:Y,addChunk:X,maxBuffer:J})}return BG({state:q,convertChunk:$,getSize:H,truncateChunk:Y,addChunk:X,getFinalChunk:G,maxBuffer:J}),Z(q)}catch(Q){throw Q.bufferedData=Z(q),Q}},BG=({state:b,getSize:I,truncateChunk:$,addChunk:H,getFinalChunk:Y,maxBuffer:X})=>{let G=Y(b);if(G!==void 0)R2({convertedChunk:G,state:b,getSize:I,truncateChunk:$,addChunk:H,maxBuffer:X})},R2=({convertedChunk:b,state:I,getSize:$,truncateChunk:H,addChunk:Y,maxBuffer:X})=>{let G=$(b),Z=I.length+G;if(Z<=X){A2(b,I,Y,Z);return}let J=H(b,X-I.length);if(J!==void 0)A2(J,I,Y,X);throw new vb},A2=(b,I,$,H)=>{I.contents=$(b,I,H),I.length=H},_G=(b)=>typeof b==="object"&&b!==null&&typeof b[Symbol.asyncIterator]==="function",MG=(b)=>{let I=typeof b;if(I==="string")return"string";if(I!=="object"||b===null)return"others";if(globalThis.Buffer?.isBuffer(b))return"buffer";let $=O2.call(b);if($==="[object ArrayBuffer]")return"arrayBuffer";if($==="[object DataView]")return"dataView";if(Number.isInteger(b.byteLength)&&Number.isInteger(b.byteOffset)&&O2.call(b.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},O2,vb;var Z1=S(()=>{({toString:O2}=Object.prototype);vb=class vb extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var Cb=(b)=>b,hb=()=>{return},mb=({contents:b})=>b,P1=(b)=>{throw new Error(`Streams in object mode are not supported: ${String(b)}`)},x1=(b)=>b.length;var E2=S(()=>{Z1()});async function Db(b,I){return X1(b,kG,I)}var AG=()=>({contents:new ArrayBuffer(0)}),OG=(b)=>RG.encode(b),RG,y2=(b)=>new Uint8Array(b),P2=(b)=>new Uint8Array(b.buffer,b.byteOffset,b.byteLength),EG=(b,I)=>b.slice(0,I),yG=(b,{contents:I,length:$},H)=>{let Y=k2()?xG(I,H):PG(I,H);return new Uint8Array(Y).set(b,$),Y},PG=(b,I)=>{if(I<=b.byteLength)return b;let $=new ArrayBuffer(w2(I));return new Uint8Array($).set(new Uint8Array(b),0),$},xG=(b,I)=>{if(I<=b.maxByteLength)return b.resize(I),b;let $=new ArrayBuffer(I,{maxByteLength:w2(I)});return new Uint8Array($).set(new Uint8Array(b),0),$},w2=(b)=>x2**Math.ceil(Math.log(b)/Math.log(x2)),x2=2,wG=({contents:b,length:I})=>k2()?b:b.slice(0,I),k2=()=>("resize"in ArrayBuffer.prototype),kG;var fb=S(()=>{Z1();RG=new TextEncoder,kG={init:AG,convertChunk:{string:OG,buffer:y2,arrayBuffer:y2,dataView:P2,typedArray:P2,others:P1},getSize:x1,truncateChunk:EG,addChunk:yG,getFinalChunk:hb,finalize:wG}});async function w1(b,I){if(!("Buffer"in globalThis))throw new Error("getStreamAsBuffer() is only supported in Node.js");try{return F2(await Db(b,I))}catch($){if($.bufferedData!==void 0)$.bufferedData=F2($.bufferedData);throw $}}var F2=(b)=>globalThis.Buffer.from(b);var v2=S(()=>{fb()});async function db(b,I){return X1(b,mG,I)}var FG=()=>({contents:"",textDecoder:new TextDecoder}),k1=(b,{textDecoder:I})=>I.decode(b,{stream:!0}),vG=(b,{contents:I})=>I+b,CG=(b,I)=>b.slice(0,I),hG=({textDecoder:b})=>{let I=b.decode();return I===""?void 0:I},mG;var C2=S(()=>{Z1();mG={init:FG,convertChunk:{string:Cb,buffer:k1,arrayBuffer:k1,dataView:k1,typedArray:k1,others:P1},getSize:x1,truncateChunk:CG,addChunk:vG,getFinalChunk:hG,finalize:mb}});var h2=S(()=>{E2();fb();v2();C2();Z1()});var D2=M((F8,m2)=>{var{PassThrough:DG}=O("stream");m2.exports=function(){var b=[],I=new DG({objectMode:!0});return I.setMaxListeners(0),I.add=$,I.isEmpty=H,I.on("unpipe",Y),Array.prototype.slice.call(arguments).forEach($),I;function $(X){if(Array.isArray(X))return X.forEach($),this;return b.push(X),X.once("end",Y.bind(null,X)),X.once("error",I.emit.bind(I,"error")),X.pipe(I,{end:!1}),this}function H(){return b.length==0}function Y(X){if(b=b.filter(function(G){return G!==X}),!b.length&&I.readable)I.end()}}});import{createReadStream as fG,readFileSync as dG}from"fs";import{setTimeout as cG}from"timers/promises";var f2,d2=(b)=>{if(b!==void 0)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},gG=({input:b,inputFile:I})=>{if(typeof I!=="string")return b;return d2(b),dG(I)},c2=(b)=>{let I=gG(b);if(y1(I))throw new TypeError("The `input` option cannot be a stream in sync mode");return I},uG=({input:b,inputFile:I})=>{if(typeof I!=="string")return b;return d2(b),fG(I)},g2=(b,I)=>{let $=uG(I);if($===void 0)return;if(y1($))$.pipe(b.stdin);else b.stdin.end($)},u2=(b,{all:I})=>{if(!I||!b.stdout&&!b.stderr)return;let $=f2.default();if(b.stdout)$.add(b.stdout);if(b.stderr)$.add(b.stderr);return $},cb=async(b,I)=>{if(!b||I===void 0)return;await cG(0),b.destroy();try{return await I}catch($){return $.bufferedData}},gb=(b,{encoding:I,buffer:$,maxBuffer:H})=>{if(!b||!$)return;if(I==="utf8"||I==="utf-8")return db(b,{maxBuffer:H});if(I===null||I==="buffer")return w1(b,{maxBuffer:H});return pG(b,H,I)},pG=async(b,I,$)=>{return(await w1(b,{maxBuffer:I})).toString($)},p2=async({stdout:b,stderr:I,all:$},{encoding:H,buffer:Y,maxBuffer:X},G)=>{let Z=gb(b,{encoding:H,buffer:Y,maxBuffer:X}),J=gb(I,{encoding:H,buffer:Y,maxBuffer:X}),q=gb($,{encoding:H,buffer:Y,maxBuffer:X*2});try{return await Promise.all([G,Z,J,q])}catch(Q){return Promise.all([{error:Q,signal:Q.signal,timedOut:Q.timedOut},cb(b,Z),cb(I,J),cb($,q)])}};var n2=S(()=>{h2();f2=F(D2(),1)});var nG,lG,ub=(b,I)=>{for(let[$,H]of lG){let Y=typeof I==="function"?(...X)=>Reflect.apply(H.value,I(),X):H.value.bind(I);Reflect.defineProperty(b,$,{...H,value:Y})}},l2=(b)=>new Promise((I,$)=>{if(b.on("exit",(H,Y)=>{I({exitCode:H,signal:Y})}),b.on("error",(H)=>{$(H)}),b.stdin)b.stdin.on("error",(H)=>{$(H)})});var a2=S(()=>{nG=(async()=>{})().constructor.prototype,lG=["then","catch","finally"].map((b)=>[b,Reflect.getOwnPropertyDescriptor(nG,b)])});import{Buffer as aG}from"buffer";import{ChildProcess as iG}from"child_process";var t2=(b,I=[])=>{if(!Array.isArray(I))return[b];return[b,...I]},rG,tG=(b)=>{if(typeof b!=="string"||rG.test(b))return b;return`"${b.replaceAll('"',"\\\"")}"`},pb=(b,I)=>t2(b,I).join(" "),nb=(b,I)=>t2(b,I).map(($)=>tG($)).join(" "),oG,i2=(b)=>{let I=typeof b;if(I==="string")return b;if(I==="number")return String(b);if(I==="object"&&b!==null&&!(b instanceof iG)&&"stdout"in b){let $=typeof b.stdout;if($==="string")return b.stdout;if(aG.isBuffer(b.stdout))return b.stdout.toString();throw new TypeError(`Unexpected "${$}" stdout in template expression`)}throw new TypeError(`Unexpected "${I}" in template expression`)},r2=(b,I,$)=>$||b.length===0||I.length===0?[...b,...I]:[...b.slice(0,-1),`${b.at(-1)}${I[0]}`,...I.slice(1)],sG=({templates:b,expressions:I,tokens:$,index:H,template:Y})=>{let X=Y??b.raw[H],G=X.split(oG).filter(Boolean),Z=r2($,G,X.startsWith(" "));if(H===I.length)return Z;let J=I[H],q=Array.isArray(J)?J.map((Q)=>i2(Q)):[i2(J)];return r2(Z,q,X.endsWith(" "))},lb=(b,I)=>{let $=[];for(let[H,Y]of b.entries())$=sG({templates:b,expressions:I,tokens:$,index:H,template:Y});return $};var o2=S(()=>{rG=/^[\w.-]+$/,oG=/ +/g});import{debuglog as eG}from"util";import b$ from"process";var s2,F1=(b,I)=>String(b).padStart(I,"0"),I$=()=>{let b=new Date;return`${F1(b.getHours(),2)}:${F1(b.getMinutes(),2)}:${F1(b.getSeconds(),2)}.${F1(b.getMilliseconds(),3)}`},ab=(b,{verbose:I})=>{if(!I)return;b$.stderr.write(`[${I$()}] ${b}
92
+ `)};var e2=S(()=>{s2=eG("execa").enabled});import{Buffer as G$}from"buffer";import $$ from"path";import ib from"child_process";import v1 from"process";function x(b,I,$){let H=G9(b,I,$),Y=pb(b,I),X=nb(b,I);ab(X,H.options),T2(H.options);let G;try{G=ib.spawn(H.file,H.args,H.options)}catch(N){let j=new ib.ChildProcess,K=Promise.reject(Y1({error:N,stdout:"",stderr:"",all:"",command:Y,escapedCommand:X,parsed:H,timedOut:!1,isCanceled:!1,killed:!1}));return ub(j,K),j}let Z=l2(G),J=j2(G,H.options,Z),q=L2(G,H.options,J),Q={isCanceled:!1};G.kill=N2.bind(null,G.kill.bind(G)),G.cancel=K2.bind(null,G,Q);let z=s0(async()=>{let[{error:N,exitCode:j,signal:K,timedOut:A},h,R,u]=await p2(G,H.options,q),p=J1(H.options,h),YI=J1(H.options,R),XI=J1(H.options,u);if(N||j!==0||K!==null){let ZI=Y1({error:N,exitCode:j,signal:K,stdout:p,stderr:YI,all:XI,command:Y,escapedCommand:X,parsed:H,timedOut:A,isCanceled:Q.isCanceled||(H.options.signal?H.options.signal.aborted:!1),killed:G.killed});if(!H.options.reject)return ZI;throw ZI}return{command:Y,escapedCommand:X,exitCode:0,stdout:p,stderr:YI,all:XI,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return g2(G,H.options),G.all=u2(G,H.options),_2(G),ub(G,z),G}function w(b,I,$){let H=G9(b,I,$),Y=pb(b,I),X=nb(b,I);ab(X,H.options);let G=c2(H.options),Z;try{Z=ib.spawnSync(H.file,H.args,{...H.options,input:G})}catch(Q){throw Y1({error:Q,stdout:"",stderr:"",all:"",command:Y,escapedCommand:X,parsed:H,timedOut:!1,isCanceled:!1,killed:!1})}let J=J1(H.options,Z.stdout,Z.error),q=J1(H.options,Z.stderr,Z.error);if(Z.error||Z.status!==0||Z.signal!==null){let Q=Y1({stdout:J,stderr:q,error:Z.error,signal:Z.signal,exitCode:Z.status,command:Y,escapedCommand:X,parsed:H,timedOut:Z.error&&Z.error.code==="ETIMEDOUT",isCanceled:!1,killed:Z.signal!==null});if(!H.options.reject)return Q;throw Q}return{command:Y,escapedCommand:X,exitCode:0,stdout:J,stderr:q,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}function $9(b){function I($,...H){if(!Array.isArray($))return $9({...b,...$});let[Y,...X]=lb($,H);return x(Y,X,b9(b))}return I.sync=($,...H)=>{if(!Array.isArray($))throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");let[Y,...X]=lb($,H);return w(Y,X,b9(b))},I}var I9,H$=1e8,Y$=({env:b,extendEnv:I,preferLocal:$,localDir:H,execPath:Y})=>{let X=I?{...v1.env,...b}:b;if($)return i0({env:X,cwd:H,execPath:Y});return X},G9=(b,I,$={})=>{let H=I9.default._parse(b,I,$);if(b=H.command,I=H.args,$=H.options,$={maxBuffer:H$,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:$.cwd||v1.cwd(),execPath:v1.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:s2,...$},$.env=Y$($),$.stdio=J2($),v1.platform==="win32"&&$$.basename(b,".exe")==="cmd")I.unshift("/q");return{file:b,args:I,options:$,parsed:H}},J1=(b,I,$)=>{if(typeof I!=="string"&&!G$.isBuffer(I))return $===void 0?void 0:"";if(b.stripFinalNewline)return Ab(I);return I},X$=({input:b,inputFile:I,stdio:$})=>b===void 0&&I===void 0&&$===void 0?{stdin:"inherit"}:{},b9=(b={})=>({preferLocal:!0,...X$(b),...b}),q7;var q1=S(()=>{I9=F(l0(),1);r0();e0();Z2();q2();B2();M2();n2();a2();o2();e2();q7=$9()});var C1=(b)=>{if(b.code==="ENOENT")throw new Error("Couldn't find the termux-api scripts. You can install them with: apt install termux-api");throw b},Z$,H9;var Y9=S(()=>{q1();Z$={async copy(b){try{await x("termux-clipboard-set",b)}catch(I){C1(I)}},async paste(b){try{let{stdout:I}=await x("termux-clipboard-get",b);return I}catch(I){C1(I)}},copySync(b){try{w("termux-clipboard-set",b)}catch(I){C1(I)}},pasteSync(b){try{return w("termux-clipboard-get",b).stdout}catch(I){C1(I)}}},H9=Z$});import Q9 from"path";import{fileURLToPath as J$}from"url";var q$,U9="xsel",V9,X9,Z9,W9=(b,I)=>{let $;if(b.code==="ENOENT")$=new Error("Couldn't find the `xsel` binary and fallback didn't work. On Debian/Ubuntu you can install xsel with: sudo apt install xsel");else $=new Error("Both xsel and fallback failed"),$.xselError=b;return $.fallbackError=I,$},J9=async(b,I)=>{try{let{stdout:$}=await x(U9,b,I);return $}catch($){try{let{stdout:H}=await x(V9,b,I);return H}catch(H){throw W9($,H)}}},q9=(b,I)=>{try{return w(U9,b,I).stdout}catch($){try{return w(V9,b,I).stdout}catch(H){throw W9($,H)}}},Q$,z9;var S9=S(()=>{q1();q$=Q9.dirname(J$(import.meta.url)),V9=Q9.join(q$,"../fallbacks/linux/xsel"),X9=["--clipboard","--input"],Z9=["--clipboard","--output"],Q$={async copy(b){await J9(X9,b)},copySync(b){q9(X9,b)},paste:(b)=>J9(Z9,b),pasteSync:(b)=>q9(Z9,b)},z9=Q$});var h1,U$,N9;var K9=S(()=>{q1();h1={LC_CTYPE:"UTF-8"},U$={copy:async(b)=>x("pbcopy",{...b,env:h1}),async paste(b){let{stdout:I}=await x("pbpaste",{...b,env:h1});return I},copySync:(b)=>w("pbcopy",{...b,env:h1}),pasteSync:(b)=>w("pbpaste",{...b,env:h1}).stdout},N9=U$});import{promisify as V$}from"util";import W$ from"process";import Q1 from"child_process";function j9(){let{arch:b,platform:I,env:$}=W$;if(I==="darwin"&&b==="x64")return Q1.execFileSync("sysctl",["-inq","sysctl.proc_translated"],{encoding:"utf8"}).trim()==="1"?"arm64":"x64";if(b==="arm64"||b==="x64")return b;if(I==="win32"&&Object.hasOwn($,"PROCESSOR_ARCHITEW6432"))return"x64";if(I==="linux"){if(Q1.execFileSync("getconf",["LONG_BIT"],{encoding:"utf8"}).trim()==="64")return"x64"}return b}var _7;var T9=S(()=>{_7=V$(Q1.execFile)});function L9(){return z$.has(j9())}var z$;var B9=S(()=>{T9();z$=new Set(["arm64","x64","ppc64","riscv64"])});import _9 from"path";import{fileURLToPath as S$}from"url";var N$,K$,m1,j$,rb;var M9=S(()=>{q1();B9();N$=_9.dirname(S$(import.meta.url)),K$=L9()?"x86_64":"i686",m1=_9.join(N$,`../fallbacks/windows/clipboard_${K$}.exe`),j$={copy:async(b)=>x(m1,["--copy"],b),async paste(b){let{stdout:I}=await x(m1,["--paste"],b);return I},copySync:(b)=>w(m1,["--copy"],b),pasteSync:(b)=>w(m1,["--paste"],b).stdout},rb=j$});import A9 from"process";var D1,U1,O9;var R9=S(()=>{H0();Y9();S9();K9();M9();D1=(()=>{switch(A9.platform){case"darwin":return N9;case"win32":return rb;case"android":{if(A9.env.PREFIX!=="/data/data/com.termux/files/usr")throw new Error("You need to install Termux for this module to work on Android: https://termux.com");return H9}default:{if($0)return rb;return z9}}})(),U1={};U1.write=async(b)=>{if(typeof b!=="string")throw new TypeError(`Expected a string, got ${typeof b}`);await D1.copy({input:b})};U1.read=async()=>D1.paste({stripFinalNewline:!1});U1.writeSync=(b)=>{if(typeof b!=="string")throw new TypeError(`Expected a string, got ${typeof b}`);D1.copySync({input:b})};U1.readSync=()=>D1.pasteSync({stripFinalNewline:!1});O9=U1});var sb={};e(sb,{showCommitResult:()=>k,showCommitPreview:()=>f1,showCancellation:()=>s,selectFilesForCommit:()=>tb,editCommitMessage:()=>d1,copyToClipboard:()=>c1,confirmCommit:()=>T$,askContinueCommits:()=>ob});async function f1(b){l(`Tipo: ${b.type}
93
+ Mensagem: "${b.message}"`,"\uD83D\uDCAD Sugest\xE3o de Commit");let I=await I1({message:"O que voc\xEA gostaria de fazer?",options:[{value:"commit",label:"\u2705 Fazer commit com esta mensagem",hint:"Executar git commit imediatamente"},{value:"edit",label:"\u270F\uFE0F Editar mensagem",hint:"Modificar a mensagem antes de commitar"},{value:"copy",label:"\uD83D\uDCCB Copiar para clipboard",hint:"Copiar mensagem e sair sem commitar"},{value:"cancel",label:"\u274C Cancelar",hint:"Sair sem fazer nada"}]});if(P(I))return{action:"cancel"};return{action:I}}async function d1(b){let I=await yI({message:"Edite a mensagem do commit:",initialValue:b,placeholder:"Digite a mensagem do commit...",validate:(H)=>{if(!H||H.trim().length===0)return"A mensagem n\xE3o pode estar vazia";if(H.trim().length>72)return"A mensagem est\xE1 muito longa (m\xE1ximo 72 caracteres recomendado)"}});if(P(I))return{action:"cancel"};let $=await d({message:`Confirma a mensagem editada: "${I}"?`});if(P($)||!$)return{action:"cancel"};return{action:"commit",message:I}}async function c1(b){try{return await O9.write(b),V.success("\u2705 Mensagem copiada para a \xE1rea de transfer\xEAncia!"),!0}catch(I){return V.error(`\u274C Erro ao copiar: ${I instanceof Error?I.message:"Erro desconhecido"}`),!1}}async function T$(b){l(`"${b}"`,"\uD83D\uDE80 Confirmar Commit");let I=await d({message:"Executar o commit agora?"});if(P(I))return!1;return I}function k(b,I,$){if(b&&I)V.success("\u2705 Commit realizado com sucesso!"),V.info(`\uD83D\uDD17 Hash: ${I.substring(0,8)}`);else V.error(`\u274C Erro ao realizar commit: ${$||"Erro desconhecido"}`)}async function tb(b){V.info("\uD83D\uDCCB Modo Split: Selecione os arquivos para este commit");let I=[];for(let $ of b){let H=await d({message:`Incluir "${$}" neste commit?`});if(P(H))break;if(H)I.push($)}return I}async function ob(b){if(b.length===0)return!1;V.info(`\uD83D\uDCC4 Arquivos restantes: ${b.join(", ")}`);let I=await d({message:"Gerar commit para os arquivos restantes?"});if(P(I))return!1;return I}function s(){PI("Opera\xE7\xE3o cancelada pelo usu\xE1rio")}var V1=S(()=>{a();R9()});var E9={};e(E9,{showSmartSplitProgress:()=>_$,showSmartSplitGroups:()=>L$,confirmGroupCommit:()=>B$,chooseSplitMode:()=>eb});async function eb(){let b=await I1({message:"Como voc\xEA gostaria de organizar os commits?",options:[{value:"smart",label:"\uD83E\uDDE0 Smart Split (Recomendado)",hint:"IA analisa contexto e agrupa automaticamente"},{value:"manual",label:"\u270B Split Manual",hint:"Voc\xEA escolhe arquivos manualmente"},{value:"cancel",label:"\u274C Cancelar",hint:"Voltar ao modo normal"}]});if(P(b))return{action:"cancel"};if(b==="manual")return{action:"manual"};if(b==="smart")return{action:"proceed"};return{action:"cancel"}}async function L$(b){l(`Identificamos ${b.length} grupo(s) l\xF3gico(s) para seus commits:
94
+
95
+ `+b.map(($,H)=>`${H+1}. **${$.name}**
96
+ `+` \uD83D\uDCC4 ${$.files.join(", ")}
97
+ `+` \uD83D\uDCA1 ${$.description}
98
+ `+` \uD83C\uDFAF Confian\xE7a: ${Math.round($.confidence*100)}%`).join(`
99
+
100
+ `),"\uD83E\uDDE0 An\xE1lise de Contexto");let I=await I1({message:"O que voc\xEA gostaria de fazer?",options:[{value:"proceed",label:"\u2705 Prosseguir com esta organiza\xE7\xE3o",hint:"Usar os grupos como sugeridos pela IA"},{value:"manual",label:"\u270B Fazer split manual",hint:"Escolher arquivos manualmente"},{value:"cancel",label:"\u274C Cancelar",hint:"Voltar ao modo normal"}]});if(P(I))return{action:"cancel"};if(I==="proceed")return{action:"proceed",groups:b};return{action:I}}async function B$(b,I){l(`**Grupo:** ${b.name}
101
+ **Arquivos:** ${b.files.join(", ")}
102
+ **Mensagem:** "${I}"`,"\uD83D\uDE80 Confirmar Commit do Grupo");let $=await d({message:`Fazer commit para "${b.name}"?`});if(P($))return!1;return $}function _$(b,I,$){let H=Math.round(b/I*100),Y="\u2588".repeat(Math.floor(H/10))+"\u2591".repeat(10-Math.floor(H/10));V.info(`\uD83D\uDD04 Progresso: [${Y}] ${H}% (${b}/${I})`),V.info(`\uD83D\uDCCB Processando: ${$}`)}var bI=S(()=>{a()});import M$ from"crypto";class y9{cache=new Map;config;constructor(b){this.config=b}generateHash(b,I){let $={files:b.sort(),diff:I.substring(0,1000),model:this.config.openai.model,temperature:this.config.openai.temperature};return M$.createHash("md5").update(JSON.stringify($)).digest("hex")}get(b,I){if(!this.config.cache.enabled)return{hit:!1};let $=this.generateHash(b,I),H=this.cache.get($);if(!H)return{hit:!1};let Y=Date.now(),X=this.config.cache.ttl*60*1000;if(Y-H.timestamp>X)return this.cache.delete($),{hit:!1};return{hit:!0,groups:H.groups}}set(b,I,$){if(!this.config.cache.enabled)return;if(this.cache.size>=this.config.cache.maxSize)this.cleanup();if(this.cache.size>=this.config.cache.maxSize)return;let H=this.generateHash(b,I),Y={groups:$,timestamp:Date.now(),hash:H};this.cache.set(H,Y)}cleanup(){let b=Date.now(),I=this.config.cache.ttl*60*1000;for(let[$,H]of this.cache.entries())if(b-H.timestamp>I)this.cache.delete($);if(this.cache.size>=this.config.cache.maxSize){let H=Array.from(this.cache.entries()).sort((Y,X)=>Y[1].timestamp-X[1].timestamp).slice(0,Math.ceil(this.config.cache.maxSize*0.5));for(let[Y]of H)this.cache.delete(Y)}}clear(){this.cache.clear()}getStats(){return{size:this.cache.size,maxSize:this.config.cache.maxSize,enabled:this.config.cache.enabled}}}function x9(b){P9=new y9(b)}function w9(){return P9}function k9(b,I){let $=w9();return $?$.get(b,I):{hit:!1}}function F9(b,I,$){let H=w9();if(H)H.set(b,I,$)}var P9=null;var II=()=>{};function A$(b,I){let H=I.length>8000?I.substring(0,8000)+`
103
+ ... (diff truncado)`:I,Y=b.length,X=b.reduce((Z,J)=>{let q=J.split(".").pop()||"sem-extensao";return Z[q]=(Z[q]||0)+1,Z},{}),G=Object.entries(X).map(([Z,J])=>`${Z}: ${J}`).join(", ");return`Analise os arquivos modificados e agrupe em commits l\xF3gicos.
104
+
105
+ ARQUIVOS (${Y}): ${b.join(", ")}
106
+ TIPOS: ${G}
107
+
108
+ DIFF RESUMIDO:
109
+ \`\`\`
110
+ ${H}
111
+ \`\`\`
112
+
113
+ Agrupe arquivos relacionados. M\xE1ximo 5 grupos. Responda em JSON:
114
+ {
115
+ "groups": [
116
+ {
117
+ "id": "grupo-1",
118
+ "name": "Nome do Grupo",
119
+ "description": "Descri\xE7\xE3o breve",
120
+ "files": ["arquivo1.ts", "arquivo2.ts"],
121
+ "confidence": 0.8
122
+ }
123
+ ]
124
+ }`}function O$(b){let I=b.reduce((H,Y)=>{let X=Y.split("/").slice(0,-1).join("/")||"root";if(!H[X])H[X]=[];return H[X].push(Y),H},{});return`Agrupe estes arquivos em commits l\xF3gicos baseado nos diret\xF3rios:
125
+
126
+ ARQUIVOS POR DIRET\xD3RIO:
127
+ ${Object.entries(I).map(([H,Y])=>`${H}: ${Y.length} arquivo(s)`).join(`
128
+ `)}
129
+
130
+ LISTA COMPLETA: ${b.join(", ")}
131
+
132
+ Agrupe por funcionalidade relacionada. M\xE1ximo 5 grupos. JSON:
133
+ {
134
+ "groups": [
135
+ {
136
+ "id": "grupo-1",
137
+ "name": "Nome do Grupo",
138
+ "description": "Descri\xE7\xE3o breve",
139
+ "files": ["arquivo1.ts", "arquivo2.ts"],
140
+ "confidence": 0.7
141
+ }
142
+ ]
143
+ }`}async function R$(b,I,$){try{if(!$.openai.apiKey)return{success:!1,error:"Chave da OpenAI n\xE3o encontrada"};let H=k9(b,I);if(H.hit&&H.groups)return{success:!0,groups:H.groups};let Y=6000,X=I.length>Y,G=X?O$(b):A$(b,I);if(X)console.warn(`\u26A0\uFE0F Diff muito grande (${I.length} chars), usando an\xE1lise baseada em nomes de arquivos`);let Z=await fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{Authorization:`Bearer ${$.openai.apiKey}`,"Content-Type":"application/json"},body:JSON.stringify({model:$.openai.model,messages:[{role:"user",content:G}],max_tokens:800,temperature:0.3})});if(!Z.ok){let K=await Z.json().catch(()=>({}));return{success:!1,error:`Erro da OpenAI (${Z.status}): ${K.error?.message||"Erro desconhecido"}`}}let q=(await Z.json()).choices?.[0]?.message?.content?.trim();if(!q)return{success:!1,error:"OpenAI retornou resposta vazia"};let Q=q.match(/\{[\s\S]*\}/);if(!Q)return{success:!1,error:"Resposta da OpenAI n\xE3o cont\xE9m JSON v\xE1lido"};let W=JSON.parse(Q[0]);if(!W.groups||!Array.isArray(W.groups))return{success:!1,error:"Formato de resposta inv\xE1lido da OpenAI"};let z=W.groups.flatMap((K)=>K.files||[]),N=b.filter((K)=>!z.includes(K));if(N.length>0)W.groups[0].files=[...W.groups[0].files||[],...N];let j=W.groups.map((K)=>({id:K.id||`group-${Math.random().toString(36).substr(2,9)}`,name:K.name||"Grupo sem nome",description:K.description||"Sem descri\xE7\xE3o",files:K.files||[],diff:"",confidence:K.confidence||0.5}));return F9(b,I,j),{success:!0,groups:j}}catch(H){return{success:!1,error:`Erro ao analisar contexto: ${H instanceof Error?H.message:"Erro desconhecido"}`}}}async function E$(b){let{getFileDiff:I}=await Promise.resolve().then(() => (c(),r)),$=b.files.map((X)=>{try{let G=I(X),Z=4000;return G.length>4000?G.substring(0,4000)+`
144
+ ... (diff truncado)`:G}catch{return""}}).filter((X)=>X.length>0);if($.length===0&&b.files.length>0){let{execSync:X}=await import("child_process"),G=b.files.filter((J)=>{try{return X(`test -f "${J}"`,{stdio:"ignore"}),X(`git status --porcelain -- "${J}"`,{encoding:"utf-8",stdio:"pipe"}).trim().startsWith("??")}catch{return!1}});if(G.length>0)return G.map((J)=>{try{let q=X(`cat "${J}"`,{encoding:"utf-8",stdio:"pipe"}),Q=2000,W=q.length>2000?q.substring(0,2000)+`
145
+ ... (conte\xFAdo truncado)`:q;return`diff --git a/${J} b/${J}
146
+ new file mode 100644
147
+ index 0000000..${Math.random().toString(36).substr(2,7)}
148
+ --- /dev/null
149
+ +++ b/${J}
150
+ @@ -0,0 +1,${W.split(`
151
+ `).length} @@
152
+ ${W.split(`
153
+ `).map((z)=>`+${z}`).join(`
154
+ `)}`}catch{return""}}).filter((J)=>J.length>0).join(`
155
+ `);let Z=b.files.filter((J)=>{try{return X(`test -f "${J}"`,{stdio:"ignore"}),X("git diff --cached --name-only",{encoding:"utf-8",stdio:"pipe"}).trim().split(`
156
+ `).includes(J)}catch{return!1}});if(Z.length>0)return Z.map((J)=>{try{let q=X(`cat "${J}"`,{encoding:"utf-8",stdio:"pipe"}),Q=2000,W=q.length>2000?q.substring(0,2000)+`
157
+ ... (conte\xFAdo truncado)`:q;return`diff --git a/${J} b/${J}
158
+ index 0000000..${Math.random().toString(36).substr(2,7)} 100644
159
+ --- a/${J}
160
+ +++ b/${J}
161
+ @@ -1 +1,${W.split(`
162
+ `).length} @@
163
+ ${W.split(`
164
+ `).map((z)=>`+${z}`).join(`
165
+ `)}`}catch{return""}}).filter((J)=>J.length>0).join(`
166
+ `)}let H=$.join(`
167
+ `),Y=8000;return H.length>Y?H.substring(0,Y)+`
168
+ ... (diff total truncado)`:H}async function GI(b,I,$){if(!$.silent)V.info("\uD83E\uDDE0 Modo Smart Split ativado - Agrupando arquivos por contexto");if(!$.silent)V.info("\uD83E\uDD16 Analisando contexto das mudan\xE7as...");let H=await R$(b.stagedFiles,b.diff,I);if(!H.success){if(!$.silent)V.error(`\u274C Erro na an\xE1lise de contexto: ${H.error}`);return}if(!H.groups||H.groups.length===0){if(!$.silent)V.error("\u274C Nenhum grupo foi criado pela an\xE1lise");return}if(!$.silent)V.success(`\u2705 ${H.groups.length} grupo(s) identificado(s):`),H.groups.forEach((Y,X)=>{V.info(` ${X+1}. ${Y.name} (${Y.files.length} arquivo(s))`),V.info(` \uD83D\uDCC4 ${Y.files.join(", ")}`)});if(!$.yes&&!$.silent){let{showSmartSplitGroups:Y}=await Promise.resolve().then(() => (bI(),E9)),X=await Y(H.groups);if(X.action==="cancel"){if(!$.silent)V.info("\u274C Opera\xE7\xE3o cancelada pelo usu\xE1rio");return}if(X.action==="manual"){let G={...$,split:!0,smartSplit:!1},{main:Z}=await Promise.resolve().then(() => ($I(),C9));await Z(G);return}}for(let Y=0;Y<H.groups.length;Y++){let X=H.groups[Y];if(!X){if(!$.silent)V.error(`\u274C Grupo ${Y+1} \xE9 undefined`);continue}if(!$.silent)V.info(`
169
+ \uD83D\uDD04 Processando grupo ${Y+1}/${H.groups.length}: ${X.name}`);let G=await E$(X);if(!G){if(!$.silent)V.warn(`\u26A0\uFE0F Nenhum diff encontrado para o grupo: ${X.name}`),V.info(` \uD83D\uDCC4 Arquivos: ${X.files.join(", ")}`),V.info(" \uD83D\uDCA1 Poss\xEDvel causa: arquivos novos, deletados/recriados, ou sem mudan\xE7as");continue}if(!$.silent)V.info(`\uD83E\uDD16 Gerando commit para: ${X.name}`);let{generateWithRetry:Z}=await Promise.resolve().then(() => oI),J=await Z(G,I,X.files);if(!J.success){if(!$.silent)V.error(`\u274C Erro ao gerar commit para ${X.name}: ${J.error}`);continue}if(!J.suggestion){if(!$.silent)V.error(`\u274C Nenhuma sugest\xE3o gerada para ${X.name}`);continue}if(I.dryRun){if(!$.silent)V.info(`\uD83D\uDD0D Dry Run - Grupo: ${X.name}`),V.info(`\uD83D\uDCC4 Arquivos: ${X.files.join(", ")}`),V.info(`\uD83D\uDCAD Mensagem: "${J.suggestion.message}"`);continue}if($.yes){let{executeFileCommit:q}=await Promise.resolve().then(() => (c(),r)),Q;if(X.files.length===1&&X.files[0])Q=q(X.files[0],J.suggestion.message||"");else{let{execSync:W}=await import("child_process");try{let z=X.files.map((j)=>`"${j}"`).join(" ");W(`git commit ${z} -m "${(J.suggestion.message||"").replace(/"/g,"\\\"")}"`,{stdio:"pipe"}),Q={success:!0,hash:W("git rev-parse HEAD",{encoding:"utf-8",stdio:"pipe"}).trim(),message:J.suggestion.message||""}}catch(z){Q={success:!1,error:z instanceof Error?z.message:"Erro desconhecido ao executar commit"}}}k(Q.success,Q.hash,Q.error)}else{let{showCommitPreview:q,editCommitMessage:Q,copyToClipboard:W,showCancellation:z}=await Promise.resolve().then(() => (V1(),sb));switch((await q(J.suggestion)).action){case"commit":{let{executeFileCommit:j}=await Promise.resolve().then(() => (c(),r)),K,A=J.suggestion.message||"Atualiza\xE7\xE3o de arquivos";if(X.files.length===1&&X.files[0])K=j(X.files[0],A);else{let{execSync:h}=await import("child_process");try{let R=X.files.map((p)=>`"${p}"`).join(" ");h(`git commit ${R} -m "${A.replace(/"/g,'"')}"`,{stdio:"pipe"}),K={success:!0,hash:h("git rev-parse HEAD",{encoding:"utf-8",stdio:"pipe"}).trim(),message:A}}catch(R){K={success:!1,error:R instanceof Error?R.message:"Erro desconhecido ao executar commit"}}}k(K.success,K.hash,K.error);break}case"edit":{let j=await Q(J.suggestion.message);if(j.action==="commit"&&j.message){let{executeFileCommit:K}=await Promise.resolve().then(() => (c(),r)),A;if(X.files.length===1&&X.files[0])A=K(X.files[0],j.message||"");else{let{execSync:h}=await import("child_process");try{let R=X.files.map((p)=>`"${p}"`).join(" ");h(`git commit ${R} -m "${(j.message||"").replace(/"/g,'"')}"`,{stdio:"pipe"}),A={success:!0,hash:h("git rev-parse HEAD",{encoding:"utf-8",stdio:"pipe"}).trim(),message:j.message||""}}catch(R){A={success:!1,error:R instanceof Error?R.message:"Erro desconhecido ao executar commit"}}}k(A.success,A.hash,A.error)}break}case"copy":{if(await W(J.suggestion.message),!$.silent)V.info("\uD83C\uDFAF Mensagem copiada para clipboard");break}case"cancel":{z();return}}}if(Y<H.groups.length-1&&!$.yes){let{askContinueCommits:q}=await Promise.resolve().then(() => (V1(),sb)),Q=H.groups.slice(Y+1).filter((z)=>z!==void 0).map((z)=>z.name);if(!await q(Q))break}}if(!$.silent)V.success("\u2705 Smart Split conclu\xEDdo!")}var v9=S(()=>{II();V1();a()});var C9={};e(C9,{main:()=>HI});async function HI(b={silent:!1,yes:!1,auto:!1,split:!1,smartSplit:!1,dryRun:!1,help:!1,version:!1}){if(!b.silent)V.info("\uD83D\uDE80 Commit Wizard iniciado!");if(!qb()){if(V.error("\u274C N\xE3o foi encontrado um reposit\xF3rio Git neste diret\xF3rio."),!b.silent)V.info("\uD83D\uDCA1 Execute o comando em um diret\xF3rio com reposit\xF3rio Git inicializado.");process.exit(1)}if(!b.silent)V.info("\u2699\uFE0F Carregando configura\xE7\xE3o...");let I=pI();if(x9(I),b.split)I.splitCommits=!0;if(b.dryRun)I.dryRun=!0;let $=nI(I);if($.length>0)V.error("\u274C Erros na configura\xE7\xE3o:"),$.forEach((G)=>V.error(` \u2022 ${G}`)),process.exit(1);if(!b.silent)V.success(`\u2705 Configura\xE7\xE3o carregada (modelo: ${I.openai.model}, idioma: ${I.language})`);if(!b.silent)V.info("\uD83D\uDCCB Verificando arquivos staged...");let H=Qb();if(!H.hasStaged){if(V.warn("\u26A0\uFE0F Nenhum arquivo foi encontrado no stage."),!b.silent)V.info("\uD83D\uDCA1 Use `git add <arquivo>` para adicionar arquivos ao stage antes de gerar o commit.");process.exit(0)}let Y=Ub();if(!b.silent)V.success(`\u2705 Encontrados ${H.stagedFiles.length} arquivo(s) staged:`),H.stagedFiles.forEach((G)=>V.info(` \uD83D\uDCC4 ${G}`)),V.info(`\uD83D\uDCCA Estat\xEDsticas: +${Y.added} -${Y.removed} linhas`);if(I.splitCommits||b.smartSplit)if(b.yes)return await GI(H,I,b);else switch((await eb()).action){case"proceed":return await GI(H,I,b);case"manual":return await y$(H,I,b);case"cancel":s();return}if(!b.silent)V.info("\uD83E\uDD16 Gerando mensagem de commit com IA...");let X=await L1(H.diff,I,H.stagedFiles);if(!X.success)V.error(`\u274C Erro ao gerar commit: ${X.error}`),process.exit(1);if(!X.suggestion)V.error("\u274C Nenhuma sugest\xE3o foi gerada"),process.exit(1);if(!b.silent)V.success("\u2728 Mensagem de commit gerada!");if(I.dryRun){V.info("\uD83D\uDD0D Modo Dry Run - Mensagem gerada:"),V.info(`"${X.suggestion.message}"`),V.info("\uD83D\uDCA1 Execute sem --dry-run para fazer o commit");return}if(b.yes){let G=f(X.suggestion.message);k(G.success,G.hash,G.error);return}while(!0)switch((await f1(X.suggestion)).action){case"commit":{let Z=f(X.suggestion.message);k(Z.success,Z.hash,Z.error);return}case"edit":{let Z=await d1(X.suggestion.message);if(Z.action==="cancel"){s();return}if(Z.action==="commit"&&Z.message){let J=f(Z.message);k(J.success,J.hash,J.error);return}break}case"copy":{if(await c1(X.suggestion.message),!b.silent)V.info('\uD83C\uDFAF Voc\xEA pode usar a mensagem copiada com: git commit -m "mensagem"');return}case"cancel":{s();return}}}async function y$(b,I,$){if(!$.silent)V.info("\uD83D\uDD04 Modo Split ativado - Commits separados por arquivo");let H=[...b.stagedFiles];while(H.length>0){let Y=$.yes?[H[0]]:await tb(H);if(Y.length===0){if(!$.silent)V.info("\u274C Nenhum arquivo selecionado");break}let{getFileDiff:X}=await Promise.resolve().then(() => (c(),r)),G=Y.filter((J)=>J!==void 0).map((J)=>{try{return X(J)}catch(q){return V.error(`\u274C Erro ao obter diff do arquivo ${J}: ${q instanceof Error?q.message:"Erro desconhecido"}`),""}}).filter((J)=>J.length>0).join(`
170
+ `);if(!G){if(!$.silent)V.warn("\u26A0\uFE0F Nenhum diff encontrado para os arquivos selecionados");H=H.filter((J)=>!Y.includes(J));continue}if(!$.silent)V.info(`\uD83E\uDD16 Gerando commit para: ${Y.join(", ")}`);let Z=await L1(G,I,Y.filter((J)=>J!==void 0));if(!Z.success){V.error(`\u274C Erro ao gerar commit: ${Z.error}`),H=H.filter((J)=>!Y.includes(J));continue}if(!Z.suggestion){V.error("\u274C Nenhuma sugest\xE3o foi gerada"),H=H.filter((J)=>!Y.includes(J));continue}if(I.dryRun){V.info(`\uD83D\uDD0D Dry Run - Mensagem para ${Y.join(", ")}:`),V.info(`"${Z.suggestion.message}"`),H=H.filter((J)=>!Y.includes(J));continue}if($.yes){let J=Y.length===1&&Y[0]?await $1(Y[0],Z.suggestion.message):await f(Z.suggestion.message);k(J.success,J.hash,J.error)}else{let J=await f1(Z.suggestion);if(J.action==="commit"){let q=Y.length===1&&Y[0]?await $1(Y[0],Z.suggestion.message):await f(Z.suggestion.message);k(q.success,q.hash,q.error)}else if(J.action==="edit"){let q=await d1(Z.suggestion.message);if(q.action==="commit"&&q.message){let Q=Y.length===1&&Y[0]?await $1(Y[0],q.message):await f(q.message);k(Q.success,Q.hash,Q.error)}}else if(J.action==="copy"){if(await c1(Z.suggestion.message),!$.silent)V.info("\uD83C\uDFAF Mensagem copiada para clipboard")}else if(J.action==="cancel"){s();return}}if(H=H.filter((J)=>!Y.includes(J)),H.length>0&&!$.yes){if(!await ob(H))break}}if(!$.silent)V.success("\u2705 Modo Split conclu\xEDdo!")}var $I=S(()=>{a();lI();c();V1();bI();v9();II()});a();$I();function h9(b){return{silent:b.includes("--silent")||b.includes("-s"),yes:b.includes("--yes")||b.includes("-y"),auto:b.includes("--auto")||b.includes("-a"),split:b.includes("--split"),smartSplit:b.includes("--smart-split"),dryRun:b.includes("--dry-run")||b.includes("-n"),help:b.includes("--help")||b.includes("-h"),version:b.includes("--version")||b.includes("-v")}}function m9(){console.log(`
171
+ \uD83E\uDDD9\u200D\u2642\uFE0F Commit Wizard - Gerador inteligente de mensagens de commit
172
+
173
+ USAGE:
174
+ commit-wizard [OPTIONS]
175
+
176
+ OPTIONS:
177
+ -s, --silent Modo silencioso (sem logs detalhados)
178
+ -y, --yes Confirmar automaticamente sem prompts
179
+ -a, --auto Modo autom\xE1tico (--yes + --silent)
180
+ --split Modo split manual (commits separados por arquivo)
181
+ --smart-split Modo smart split (IA agrupa por contexto)
182
+ -n, --dry-run Visualizar mensagem sem fazer commit
183
+ -h, --help Mostrar esta ajuda
184
+ -v, --version Mostrar vers\xE3o
185
+
186
+ EXAMPLES:
187
+ commit-wizard # Modo interativo padr\xE3o
188
+ commit-wizard --yes # Commit autom\xE1tico
189
+ commit-wizard --split # Split manual por arquivo
190
+ commit-wizard --smart-split # Smart split com IA
191
+ commit-wizard --dry-run # Apenas visualizar mensagem
192
+ commit-wizard --auto # Modo totalmente autom\xE1tico
193
+
194
+ Para mais informa\xE7\xF5es, visite: https://github.com/user/commit-wizard
195
+ `)}function D9(){console.log("commit-wizard v1.0.0")}async function P$(){try{let b=h9(process.argv.slice(2));if(b.help)m9(),process.exit(0);if(b.version)D9(),process.exit(0);if(b.auto)b.silent=!0,b.yes=!0;if(!b.silent)xI("\uD83E\uDDD9\u200D\u2642\uFE0F Commit Wizard");if(await HI(b),!b.silent)wI("At\xE9 logo! \u2728")}catch(b){V.error(`Erro: ${b instanceof Error?b.message:"Erro desconhecido"}`),process.exit(1)}}if(import.meta.main)P$();