gemcommits
Version:
Writes your git commit messages for you with AI
25 lines • 112 kB
JavaScript
#!/usr/bin/env node
import pt from"tty";import{Buffer as mt}from"node:buffer";import G from"node:path";import wD,{ChildProcess as ht}from"node:child_process";import h,{stdin as $D,stdout as vD}from"node:process";import gt from"child_process";import L from"path";import $u from"fs";import{fileURLToPath as xD}from"node:url";import Bt,{constants as SD}from"node:os";import bt from"assert";import At from"events";import{createWriteStream as yt,createReadStream as wt}from"node:fs";import $t from"buffer";import vu from"stream";import vt from"util";import{debuglog as xt}from"node:util";import*as ru from"node:readline";import TD from"node:readline";import{WriteStream as St}from"node:tty";import $ from"fs/promises";import Tt from"os";import{GoogleGenAI as It}from"@google/genai";import{fileURLToPath as Ot,pathToFileURL as Pt}from"url";const kt="known-flag",Rt="unknown-flag",Mt="argument",{stringify:V}=JSON,jt=/\B([A-Z])/g,_t=u=>u.replace(jt,"-$1").toLowerCase(),{hasOwnProperty:Nt}=Object.prototype,J=(u,D)=>Nt.call(u,D),Gt=u=>Array.isArray(u),ID=u=>typeof u=="function"?[u,!1]:Gt(u)?[u[0],!0]:ID(u.type),Lt=(u,D)=>u===Boolean?D!=="false":D,Wt=(u,D)=>typeof D=="boolean"?D:u===Number&&D===""?Number.NaN:u(D),Ut=/[\s.:=]/,zt=u=>{const D=`Flag name ${V(u)}`;if(u.length===0)throw new Error(`${D} cannot be empty`);if(u.length===1)throw new Error(`${D} must be longer than a character`);const t=u.match(Ut);if(t)throw new Error(`${D} cannot contain ${V(t?.[0])}`)},Kt=u=>{const D={},t=(n,r)=>{if(J(D,n))throw new Error(`Duplicate flags named ${V(n)}`);D[n]=r};for(const n in u){if(!J(u,n))continue;zt(n);const r=u[n],o=[[],...ID(r),r];t(n,o);const e=_t(n);if(n!==e&&t(e,o),"alias"in r&&typeof r.alias=="string"){const{alias:i}=r,s=`Flag alias ${V(i)} for flag ${V(n)}`;if(i.length===0)throw new Error(`${s} cannot be empty`);if(i.length>1)throw new Error(`${s} must be a single character`);t(i,o)}}return D},Ht=(u,D)=>{const t={};for(const n in u){if(!J(u,n))continue;const[r,,o,e]=D[n];if(r.length===0&&"default"in e){let{default:i}=e;typeof i=="function"&&(i=i()),t[n]=i}else t[n]=o?r:r.pop()}return t},ou="--",qt=/[.:=]/,Yt=/^-{1,2}\w/,Vt=u=>{if(!Yt.test(u))return;const D=!u.startsWith(ou);let t=u.slice(D?1:2),n;const r=t.match(qt);if(r){const{index:o}=r;n=t.slice(o+1),t=t.slice(0,o)}return[t,n,D]},Jt=(u,{onFlag:D,onArgument:t})=>{let n;const r=(o,e)=>{if(typeof n!="function")return!0;n(o,e),n=void 0};for(let o=0;o<u.length;o+=1){const e=u[o];if(e===ou){r();const s=u.slice(o+1);t?.(s,[o],!0);break}const i=Vt(e);if(i){if(r(),!D)continue;const[s,a,F]=i;if(F)for(let c=0;c<s.length;c+=1){r();const l=c===s.length-1;n=D(s[c],l?a:void 0,[o,c+1,l])}else n=D(s,a,[o])}else r(e,[o])&&t?.([e],[o])}r()},Xt=(u,D)=>{for(const[t,n,r]of D.reverse()){if(n){const o=u[t];let e=o.slice(0,n);if(r||(e+=o.slice(n+1)),e!=="-"){u[t]=e;continue}}u.splice(t,1)}},Zt=(u,D=process.argv.slice(2),{ignore:t}={})=>{const n=[],r=Kt(u),o={},e=[];return e[ou]=[],Jt(D,{onFlag(i,s,a){const F=J(r,i);if(!t?.(F?kt:Rt,i,s)){if(F){const[c,l]=r[i],C=Lt(l,s),f=(g,y)=>{n.push(a),y&&n.push(y),c.push(Wt(l,g||""))};return C===void 0?f:f(C)}J(o,i)||(o[i]=[]),o[i].push(s===void 0?!0:s),n.push(a)}},onArgument(i,s,a){t?.(Mt,D[s[0]])||(e.push(...i),a?(e[ou]=i,D.splice(s[0])):n.push(s))}}),Xt(D,n),{flags:Ht(u,r),unknownFlags:o,_:e}};var Qt=Object.create,iu=Object.defineProperty,un=Object.defineProperties,Dn=Object.getOwnPropertyDescriptor,en=Object.getOwnPropertyDescriptors,tn=Object.getOwnPropertyNames,OD=Object.getOwnPropertySymbols,nn=Object.getPrototypeOf,PD=Object.prototype.hasOwnProperty,rn=Object.prototype.propertyIsEnumerable,kD=(u,D,t)=>D in u?iu(u,D,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[D]=t,su=(u,D)=>{for(var t in D||(D={}))PD.call(D,t)&&kD(u,t,D[t]);if(OD)for(var t of OD(D))rn.call(D,t)&&kD(u,t,D[t]);return u},xu=(u,D)=>un(u,en(D)),on=u=>iu(u,"__esModule",{value:!0}),sn=(u,D)=>()=>(u&&(D=u(u=0)),D),an=(u,D)=>()=>(D||u((D={exports:{}}).exports,D),D.exports),cn=(u,D,t,n)=>{if(D&&typeof D=="object"||typeof D=="function")for(let r of tn(D))!PD.call(u,r)&&(t||r!=="default")&&iu(u,r,{get:()=>D[r],enumerable:!(n=Dn(D,r))||n.enumerable});return u},Fn=(u,D)=>cn(on(iu(u!=null?Qt(nn(u)):{},"default",!D&&u&&u.__esModule?{get:()=>u.default,enumerable:!0}:{value:u,enumerable:!0})),u),w=sn(()=>{}),ln=an((u,D)=>{w(),D.exports=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\uD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\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\u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\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\u2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B8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});w(),w(),w();var Cn=u=>{var D,t,n;let r=(D=process.stdout.columns)!=null?D:Number.POSITIVE_INFINITY;return typeof u=="function"&&(u=u(r)),u||(u={}),Array.isArray(u)?{columns:u,stdoutColumns:r}:{columns:(t=u.columns)!=null?t:[],stdoutColumns:(n=u.stdoutColumns)!=null?n:r}};w(),w(),w(),w(),w();function En({onlyFirst:u=!1}={}){let D=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(D,u?void 0:"g")}function RD(u){if(typeof u!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof u}\``);return u.replace(En(),"")}w();function fn(u){return Number.isInteger(u)?u>=4352&&(u<=4447||u===9001||u===9002||11904<=u&&u<=12871&&u!==12351||12880<=u&&u<=19903||19968<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65131||65281<=u&&u<=65376||65504<=u&&u<=65510||110592<=u&&u<=110593||127488<=u&&u<=127569||131072<=u&&u<=262141):!1}var dn=Fn(ln(),1);function M(u){if(typeof u!="string"||u.length===0||(u=RD(u),u.length===0))return 0;u=u.replace((0,dn.default)()," ");let D=0;for(let t=0;t<u.length;t++){let n=u.codePointAt(t);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&t++,D+=fn(n)?2:1)}return D}var MD=u=>Math.max(...u.split(`
`).map(M)),pn=u=>{let D=[];for(let t of u){let{length:n}=t,r=n-D.length;for(let o=0;o<r;o+=1)D.push(0);for(let o=0;o<n;o+=1){let e=MD(t[o]);e>D[o]&&(D[o]=e)}}return D};w();var jD=/^\d+%$/,_D={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},mn=(u,D)=>{var t;let n=[];for(let r=0;r<u.length;r+=1){let o=(t=D[r])!=null?t:"auto";if(typeof o=="number"||o==="auto"||o==="content-width"||typeof o=="string"&&jD.test(o)){n.push(xu(su({},_D),{width:o,contentWidth:u[r]}));continue}if(o&&typeof o=="object"){let e=xu(su(su({},_D),o),{contentWidth:u[r]});e.horizontalPadding=e.paddingLeft+e.paddingRight,n.push(e);continue}throw new Error(`Invalid column width: ${JSON.stringify(o)}`)}return n};function hn(u,D){for(let t of u){let{width:n}=t;if(n==="content-width"&&(t.width=t.contentWidth),n==="auto"){let s=Math.min(20,t.contentWidth);t.width=s,t.autoOverflow=t.contentWidth-s}if(typeof n=="string"&&jD.test(n)){let s=Number.parseFloat(n.slice(0,-1))/100;t.width=Math.floor(D*s)-(t.paddingLeft+t.paddingRight)}let{horizontalPadding:r}=t,o=1,e=o+r;if(e>=D){let s=e-D,a=Math.ceil(t.paddingLeft/r*s),F=s-a;t.paddingLeft-=a,t.paddingRight-=F,t.horizontalPadding=t.paddingLeft+t.paddingRight}t.paddingLeftString=t.paddingLeft?" ".repeat(t.paddingLeft):"",t.paddingRightString=t.paddingRight?" ".repeat(t.paddingRight):"";let i=D-t.horizontalPadding;t.width=Math.max(Math.min(t.width,i),o)}}var ND=()=>Object.assign([],{columns:0});function gn(u,D){let t=[ND()],[n]=t;for(let r of u){let o=r.width+r.horizontalPadding;n.columns+o>D&&(n=ND(),t.push(n)),n.push(r),n.columns+=o}for(let r of t){let o=r.reduce((l,C)=>l+C.width+C.horizontalPadding,0),e=D-o;if(e===0)continue;let i=r.filter(l=>"autoOverflow"in l),s=i.filter(l=>l.autoOverflow>0),a=s.reduce((l,C)=>l+C.autoOverflow,0),F=Math.min(a,e);for(let l of s){let C=Math.floor(l.autoOverflow/a*F);l.width+=C,e-=C}let c=Math.floor(e/i.length);for(let l=0;l<i.length;l+=1){let C=i[l];l===i.length-1?C.width+=e:C.width+=c,e-=c}}return t}function Bn(u,D,t){let n=mn(t,D);return hn(n,u),gn(n,u)}w(),w(),w();var Su=10,GD=(u=0)=>D=>`\x1B[${D+u}m`,LD=(u=0)=>D=>`\x1B[${38+u};5;${D}m`,WD=(u=0)=>(D,t,n)=>`\x1B[${38+u};2;${D};${t};${n}m`;function bn(){let u=new Map,D={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],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],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};D.color.gray=D.color.blackBright,D.bgColor.bgGray=D.bgColor.bgBlackBright,D.color.grey=D.color.blackBright,D.bgColor.bgGrey=D.bgColor.bgBlackBright;for(let[t,n]of Object.entries(D)){for(let[r,o]of Object.entries(n))D[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[r]=D[r],u.set(o[0],o[1]);Object.defineProperty(D,t,{value:n,enumerable:!1})}return Object.defineProperty(D,"codes",{value:u,enumerable:!1}),D.color.close="\x1B[39m",D.bgColor.close="\x1B[49m",D.color.ansi=GD(),D.color.ansi256=LD(),D.color.ansi16m=WD(),D.bgColor.ansi=GD(Su),D.bgColor.ansi256=LD(Su),D.bgColor.ansi16m=WD(Su),Object.defineProperties(D,{rgbToAnsi256:{value:(t,n,r)=>t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:t=>{let n=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(t.toString(16));if(!n)return[0,0,0];let{colorString:r}=n.groups;r.length===3&&(r=r.split("").map(e=>e+e).join(""));let o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:t=>D.rgbToAnsi256(...D.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,r,o;if(t>=232)n=((t-232)*10+8)/255,r=n,o=n;else{t-=16;let s=t%36;n=Math.floor(t/36)/5,r=Math.floor(s/6)/5,o=s%6/5}let e=Math.max(n,r,o)*2;if(e===0)return 30;let i=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(n));return e===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(t,n,r)=>D.ansi256ToAnsi(D.rgbToAnsi256(t,n,r)),enumerable:!1},hexToAnsi:{value:t=>D.ansi256ToAnsi(D.hexToAnsi256(t)),enumerable:!1}}),D}var An=bn(),yn=An,au=new Set(["\x1B","\x9B"]),wn=39,Tu="\x07",UD="[",$n="]",zD="m",Iu=`${$n}8;;`,KD=u=>`${au.values().next().value}${UD}${u}${zD}`,HD=u=>`${au.values().next().value}${Iu}${u}${Tu}`,vn=u=>u.split(" ").map(D=>M(D)),Ou=(u,D,t)=>{let n=[...D],r=!1,o=!1,e=M(RD(u[u.length-1]));for(let[i,s]of n.entries()){let a=M(s);if(e+a<=t?u[u.length-1]+=s:(u.push(s),e=0),au.has(s)&&(r=!0,o=n.slice(i+1).join("").startsWith(Iu)),r){o?s===Tu&&(r=!1,o=!1):s===zD&&(r=!1);continue}e+=a,e===t&&i<n.length-1&&(u.push(""),e=0)}!e&&u[u.length-1].length>0&&u.length>1&&(u[u.length-2]+=u.pop())},xn=u=>{let D=u.split(" "),t=D.length;for(;t>0&&!(M(D[t-1])>0);)t--;return t===D.length?u:D.slice(0,t).join(" ")+D.slice(t).join("")},Sn=(u,D,t={})=>{if(t.trim!==!1&&u.trim()==="")return"";let n="",r,o,e=vn(u),i=[""];for(let[a,F]of u.split(" ").entries()){t.trim!==!1&&(i[i.length-1]=i[i.length-1].trimStart());let c=M(i[i.length-1]);if(a!==0&&(c>=D&&(t.wordWrap===!1||t.trim===!1)&&(i.push(""),c=0),(c>0||t.trim===!1)&&(i[i.length-1]+=" ",c++)),t.hard&&e[a]>D){let l=D-c,C=1+Math.floor((e[a]-l-1)/D);Math.floor((e[a]-1)/D)<C&&i.push(""),Ou(i,F,D);continue}if(c+e[a]>D&&c>0&&e[a]>0){if(t.wordWrap===!1&&c<D){Ou(i,F,D);continue}i.push("")}if(c+e[a]>D&&t.wordWrap===!1){Ou(i,F,D);continue}i[i.length-1]+=F}t.trim!==!1&&(i=i.map(a=>xn(a)));let s=[...i.join(`
`)];for(let[a,F]of s.entries()){if(n+=F,au.has(F)){let{groups:l}=new RegExp(`(?:\\${UD}(?<code>\\d+)m|\\${Iu}(?<uri>.*)${Tu})`).exec(s.slice(a).join(""))||{groups:{}};if(l.code!==void 0){let C=Number.parseFloat(l.code);r=C===wn?void 0:C}else l.uri!==void 0&&(o=l.uri.length===0?void 0:l.uri)}let c=yn.codes.get(Number(r));s[a+1]===`
`?(o&&(n+=HD("")),r&&c&&(n+=KD(c))):F===`
`&&(r&&c&&(n+=KD(r)),o&&(n+=HD(o)))}return n};function Tn(u,D,t){return String(u).normalize().replace(/\r\n/g,`
`).split(`
`).map(n=>Sn(n,D,t)).join(`
`)}var qD=u=>Array.from({length:u}).fill("");function In(u,D){let t=[],n=0;for(let r of u){let o=0,e=r.map(s=>{var a;let F=(a=D[n])!=null?a:"";n+=1,s.preprocess&&(F=s.preprocess(F)),MD(F)>s.width&&(F=Tn(F,s.width,{hard:!0}));let c=F.split(`
`);if(s.postprocess){let{postprocess:l}=s;c=c.map((C,f)=>l.call(s,C,f))}return s.paddingTop&&c.unshift(...qD(s.paddingTop)),s.paddingBottom&&c.push(...qD(s.paddingBottom)),c.length>o&&(o=c.length),xu(su({},s),{lines:c})}),i=[];for(let s=0;s<o;s+=1){let a=e.map(F=>{var c;let l=(c=F.lines[s])!=null?c:"",C=Number.isFinite(F.width)?" ".repeat(F.width-M(l)):"",f=F.paddingLeftString;return F.align==="right"&&(f+=C),f+=l,F.align==="left"&&(f+=C),f+F.paddingRightString}).join("");i.push(a)}t.push(i.join(`
`))}return t.join(`
`)}function On(u,D){if(!u||u.length===0)return"";let t=pn(u),n=t.length;if(n===0)return"";let{stdoutColumns:r,columns:o}=Cn(D);if(o.length>n)throw new Error(`${o.length} columns defined, but only ${n} columns found`);let e=Bn(r,o,t);return u.map(i=>In(e,i)).join(`
`)}w();var Pn=["<",">","=",">=","<="];function kn(u){if(!Pn.includes(u))throw new TypeError(`Invalid breakpoint operator: ${u}`)}function Rn(u){let D=Object.keys(u).map(t=>{let[n,r]=t.split(" ");kn(n);let o=Number.parseInt(r,10);if(Number.isNaN(o))throw new TypeError(`Invalid breakpoint value: ${r}`);let e=u[t];return{operator:n,breakpoint:o,value:e}}).sort((t,n)=>n.breakpoint-t.breakpoint);return t=>{var n;return(n=D.find(({operator:r,breakpoint:o})=>r==="="&&t===o||r===">"&&t>o||r==="<"&&t<o||r===">="&&t>=o||r==="<="&&t<=o))==null?void 0:n.value}}const Mn=u=>u.replace(/[\W_]([a-z\d])?/gi,(D,t)=>t?t.toUpperCase():""),jn=u=>u.replace(/\B([A-Z])/g,"-$1").toLowerCase(),_n={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:u=>u.trim()},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function Nn(u){let D=!1;return{type:"table",data:{tableData:Object.keys(u).sort((t,n)=>t.localeCompare(n)).map(t=>{const n=u[t],r="alias"in n;return r&&(D=!0),{name:t,flag:n,flagFormatted:`--${jn(t)}`,aliasesEnabled:D,aliasFormatted:r?`-${n.alias}`:void 0}}).map(t=>(t.aliasesEnabled=D,[{type:"flagName",data:t},{type:"flagDescription",data:t}])),tableBreakpoints:_n}}}const YD=u=>!u||(u.version??(u.help?u.help.version:void 0)),VD=u=>{const D="parent"in u&&u.parent?.name;return(D?`${D} `:"")+u.name};function Gn(u){const D=[];u.name&&D.push(VD(u));const t=YD(u)??("parent"in u&&YD(u.parent));if(t&&D.push(`v${t}`),D.length!==0)return{id:"name",type:"text",data:`${D.join(" ")}
`}}function Ln(u){const{help:D}=u;if(!(!D||!D.description))return{id:"description",type:"text",data:`${D.description}
`}}function Wn(u){const D=u.help||{};if("usage"in D)return D.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(D.usage)?D.usage.join(`
`):D.usage}}:void 0;if(u.name){const t=[],n=[VD(u)];if(u.flags&&Object.keys(u.flags).length>0&&n.push("[flags...]"),u.parameters&&u.parameters.length>0){const{parameters:r}=u,o=r.indexOf("--"),e=o>-1&&r.slice(o+1).some(i=>i.startsWith("<"));n.push(r.map(i=>i!=="--"?i:e?"--":"[--]").join(" "))}if(n.length>1&&t.push(n.join(" ")),"commands"in u&&u.commands?.length&&t.push(`${u.name} <command>`),t.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:t.join(`
`)}}}}function Un(u){return!("commands"in u)||!u.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:u.commands.map(D=>[D.options.name,D.options.help?D.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}function zn(u){if(!(!u.flags||Object.keys(u.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:Nn(u.flags),indentBody:0}}}function Kn(u){const{help:D}=u;if(!D||!D.examples||D.examples.length===0)return;let{examples:t}=D;if(Array.isArray(t)&&(t=t.join(`
`)),t)return{id:"examples",type:"section",data:{title:"Examples:",body:t}}}function Hn(u){if(!("alias"in u)||!u.alias)return;const{alias:D}=u;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(D)?D.join(", "):D}}}const qn=u=>[Gn,Ln,Wn,Un,zn,Kn,Hn].map(D=>D(u)).filter(Boolean),Yn=pt.WriteStream.prototype.hasColors();class Vn{text(D){return D}bold(D){return Yn?`\x1B[1m${D}\x1B[22m`:D.toLocaleUpperCase()}indentText({text:D,spaces:t}){return D.replace(/^/gm," ".repeat(t))}heading(D){return this.bold(D)}section({title:D,body:t,indentBody:n=2}){return`${(D?`${this.heading(D)}
`:"")+(t?this.indentText({text:this.render(t),spaces:n}):"")}
`}table({tableData:D,tableOptions:t,tableBreakpoints:n}){return On(D.map(r=>r.map(o=>this.render(o))),n?Rn(n):t)}flagParameter(D){return D===Boolean?"":D===String?"<string>":D===Number?"<number>":Array.isArray(D)?this.flagParameter(D[0]):"<value>"}flagOperator(D){return" "}flagName(D){const{flag:t,flagFormatted:n,aliasesEnabled:r,aliasFormatted:o}=D;let e="";if(o?e+=`${o}, `:r&&(e+=" "),e+=n,"placeholder"in t&&typeof t.placeholder=="string")e+=`${this.flagOperator(D)}${t.placeholder}`;else{const i=this.flagParameter("type"in t?t.type:t);i&&(e+=`${this.flagOperator(D)}${i}`)}return e}flagDefault(D){return JSON.stringify(D)}flagDescription({flag:D}){let t="description"in D?D.description??"":"";if("default"in D){let{default:n}=D;typeof n=="function"&&(n=n()),n&&(t+=` (default: ${this.flagDefault(n)})`)}return t}render(D){if(typeof D=="string")return D;if(Array.isArray(D))return D.map(t=>this.render(t)).join(`
`);if("type"in D&&this[D.type]){const t=this[D.type];if(typeof t=="function")return t.call(this,D.data)}throw new Error(`Invalid node type: ${JSON.stringify(D)}`)}}const Pu=u=>u.length>0&&!u.includes(" "),{stringify:T}=JSON,Jn=/[|\\{}()[\]^$+*?.]/;function ku(u){const D=[];let t,n;for(const r of u){if(n)throw new Error(`Invalid parameter: Spread parameter ${T(n)} must be last`);const o=r[0],e=r[r.length-1];let i;if(o==="<"&&e===">"&&(i=!0,t))throw new Error(`Invalid parameter: Required parameter ${T(r)} cannot come after optional parameter ${T(t)}`);if(o==="["&&e==="]"&&(i=!1,t=r),i===void 0)throw new Error(`Invalid parameter: ${T(r)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let s=r.slice(1,-1);const a=s.slice(-3)==="...";a&&(n=r,s=s.slice(0,-3));const F=s.match(Jn);if(F)throw new Error(`Invalid parameter: ${T(r)}. Invalid character found ${T(F[0])}`);D.push({name:s,required:i,spread:a})}return D}function Ru(u,D,t,n){for(let r=0;r<D.length;r+=1){const{name:o,required:e,spread:i}=D[r],s=Mn(o);if(s in u)throw new Error(`Invalid parameter: ${T(o)} is used more than once.`);const a=i?t.slice(r):t[r];if(i&&(r=D.length),e&&(!a||i&&a.length===0))return console.error(`Error: Missing required parameter ${T(o)}
`),n(),process.exit(1);u[s]=a}}function Xn(u){return u===void 0||u!==!1}function JD(u,D,t,n){const r={...D.flags},o=D.version;o&&(r.version={type:Boolean,description:"Show version"});const{help:e}=D,i=Xn(e);i&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const s=Zt(r,n,{ignore:D.ignoreArgv}),a=()=>{console.log(D.version)};if(o&&s.flags.version===!0)return a(),process.exit(0);const F=new Vn,c=i&&e?.render?e.render:f=>F.render(f),l=f=>{const g=qn({...D,...f?{help:f}:{},flags:r});console.log(c(g,F))};if(i&&s.flags.help===!0)return l(),process.exit(0);if(D.parameters){let{parameters:f}=D,g=s._;const y=f.indexOf("--"),k=f.slice(y+1),I=Object.create(null);if(y>-1&&k.length>0){f=f.slice(0,y);const R=s._["--"];g=g.slice(0,-R.length||void 0),Ru(I,ku(f),g,l),Ru(I,ku(k),R,l)}else Ru(I,ku(f),g,l);Object.assign(s._,I)}const C={...s,showVersion:a,showHelp:l};return typeof t=="function"&&t(C),{command:u,...C}}function Zn(u,D){const t=new Map;for(const n of D){const r=[n.options.name],{alias:o}=n.options;o&&(Array.isArray(o)?r.push(...o):r.push(o));for(const e of r){if(t.has(e))throw new Error(`Duplicate command name found: ${T(e)}`);t.set(e,n)}}return t.get(u)}function Qn(u,D,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!Pu(u.name)))throw new Error(`Invalid script name: ${T(u.name)}`);const n=t[0];if(u.commands&&n&&Pu(n)){const r=Zn(n,u.commands);if(r)return JD(r.options.name,{...r.options,parent:u},r.callback,t.slice(1))}return JD(void 0,u,D,t)}function XD(u,D){if(!u)throw new Error("Command options are required");const{name:t}=u;if(t===void 0)throw new Error("Command name is required");if(!Pu(t))throw new Error(`Invalid command name ${JSON.stringify(t)}. Command names must be one word.`);return{options:u,callback:D}}var ZD="0.0.0-semantic-release",ur="Writes your git commit messages for you with AI",P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function W(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var U={exports:{}},Mu,QD;function Dr(){if(QD)return Mu;QD=1,Mu=n,n.sync=r;var u=$u;function D(o,e){var i=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!i||(i=i.split(";"),i.indexOf("")!==-1))return!0;for(var s=0;s<i.length;s++){var a=i[s].toLowerCase();if(a&&o.substr(-a.length).toLowerCase()===a)return!0}return!1}function t(o,e,i){return!o.isSymbolicLink()&&!o.isFile()?!1:D(e,i)}function n(o,e,i){u.stat(o,function(s,a){i(s,s?!1:t(a,o,e))})}function r(o,e){return t(u.statSync(o),o,e)}return Mu}var ju,ue;function er(){if(ue)return ju;ue=1,ju=D,D.sync=t;var u=$u;function D(o,e,i){u.stat(o,function(s,a){i(s,s?!1:n(a,e))})}function t(o,e){return n(u.statSync(o),e)}function n(o,e){return o.isFile()&&r(o,e)}function r(o,e){var i=o.mode,s=o.uid,a=o.gid,F=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),c=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),l=parseInt("100",8),C=parseInt("010",8),f=parseInt("001",8),g=l|C,y=i&f||i&C&&a===c||i&l&&s===F||i&g&&F===0;return y}return ju}var cu;process.platform==="win32"||P.TESTING_WINDOWS?cu=Dr():cu=er();var tr=_u;_u.sync=nr;function _u(u,D,t){if(typeof D=="function"&&(t=D,D={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,r){_u(u,D||{},function(o,e){o?r(o):n(e)})})}cu(u,D||{},function(n,r){n&&(n.code==="EACCES"||D&&D.ignoreErrors)&&(n=null,r=!1),t(n,r)})}function nr(u,D){try{return cu.sync(u,D||{})}catch(t){if(D&&D.ignoreErrors||t.code==="EACCES")return!1;throw t}}const z=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",De=L,rr=z?";":":",ee=tr,te=u=>Object.assign(new Error(`not found: ${u}`),{code:"ENOENT"}),ne=(u,D)=>{const t=D.colon||rr,n=u.match(/\//)||z&&u.match(/\\/)?[""]:[...z?[process.cwd()]:[],...(D.path||process.env.PATH||"").split(t)],r=z?D.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=z?r.split(t):[""];return z&&u.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:r}},re=(u,D,t)=>{typeof D=="function"&&(t=D,D={}),D||(D={});const{pathEnv:n,pathExt:r,pathExtExe:o}=ne(u,D),e=[],i=a=>new Promise((F,c)=>{if(a===n.length)return D.all&&e.length?F(e):c(te(u));const l=n[a],C=/^".*"$/.test(l)?l.slice(1,-1):l,f=De.join(C,u),g=!C&&/^\.[\\\/]/.test(u)?u.slice(0,2)+f:f;F(s(g,a,0))}),s=(a,F,c)=>new Promise((l,C)=>{if(c===r.length)return l(i(F+1));const f=r[c];ee(a+f,{pathExt:o},(g,y)=>{if(!g&&y)if(D.all)e.push(a+f);else return l(a+f);return l(s(a,F,c+1))})});return t?i(0).then(a=>t(null,a),t):i(0)},or=(u,D)=>{D=D||{};const{pathEnv:t,pathExt:n,pathExtExe:r}=ne(u,D),o=[];for(let e=0;e<t.length;e++){const i=t[e],s=/^".*"$/.test(i)?i.slice(1,-1):i,a=De.join(s,u),F=!s&&/^\.[\\\/]/.test(u)?u.slice(0,2)+a:a;for(let c=0;c<n.length;c++){const l=F+n[c];try{if(ee.sync(l,{pathExt:r}))if(D.all)o.push(l);else return l}catch{}}}if(D.all&&o.length)return o;if(D.nothrow)return null;throw te(u)};var ir=re;re.sync=or;var Nu={exports:{}};const oe=(u={})=>{const D=u.env||process.env;return(u.platform||process.platform)!=="win32"?"PATH":Object.keys(D).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Nu.exports=oe,Nu.exports.default=oe;var sr=Nu.exports;const ie=L,ar=ir,cr=sr;function se(u,D){const t=u.options.env||process.env,n=process.cwd(),r=u.options.cwd!=null,o=r&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(u.options.cwd)}catch{}let e;try{e=ar.sync(u.command,{path:t[cr({env:t})],pathExt:D?ie.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return e&&(e=ie.resolve(r?u.options.cwd:"",e)),e}function Fr(u){return se(u)||se(u,!0)}var lr=Fr,Gu={};const Lu=/([()\][%!^"`<>&|;, *?])/g;function Cr(u){return u=u.replace(Lu,"^$1"),u}function Er(u,D){return u=`${u}`,u=u.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),u=u.replace(/(?=(\\+?)?)\1$/,"$1$1"),u=`"${u}"`,u=u.replace(Lu,"^$1"),D&&(u=u.replace(Lu,"^$1")),u}Gu.command=Cr,Gu.argument=Er;var fr=/^#!(.*)/;const dr=fr;var pr=(u="")=>{const D=u.match(dr);if(!D)return null;const[t,n]=D[0].replace(/#! ?/,"").split(" "),r=t.split("/").pop();return r==="env"?n:n?`${r} ${n}`:r};const Wu=$u,mr=pr;function hr(u){const t=Buffer.alloc(150);let n;try{n=Wu.openSync(u,"r"),Wu.readSync(n,t,0,150,0),Wu.closeSync(n)}catch{}return mr(t.toString())}var gr=hr;const Br=L,ae=lr,ce=Gu,br=gr,Ar=process.platform==="win32",yr=/\.(?:com|exe)$/i,wr=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function $r(u){u.file=ae(u);const D=u.file&&br(u.file);return D?(u.args.unshift(u.file),u.command=D,ae(u)):u.file}function vr(u){if(!Ar)return u;const D=$r(u),t=!yr.test(D);if(u.options.forceShell||t){const n=wr.test(D);u.command=Br.normalize(u.command),u.command=ce.command(u.command),u.args=u.args.map(o=>ce.argument(o,n));const r=[u.command].concat(u.args).join(" ");u.args=["/d","/s","/c",`"${r}"`],u.command=process.env.comspec||"cmd.exe",u.options.windowsVerbatimArguments=!0}return u}function xr(u,D,t){D&&!Array.isArray(D)&&(t=D,D=null),D=D?D.slice(0):[],t=Object.assign({},t);const n={command:u,args:D,options:t,file:void 0,original:{command:u,args:D}};return t.shell?n:vr(n)}var Sr=xr;const Uu=process.platform==="win32";function zu(u,D){return Object.assign(new Error(`${D} ${u.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${D} ${u.command}`,path:u.command,spawnargs:u.args})}function Tr(u,D){if(!Uu)return;const t=u.emit;u.emit=function(n,r){if(n==="exit"){const o=Fe(r,D);if(o)return t.call(u,"error",o)}return t.apply(u,arguments)}}function Fe(u,D){return Uu&&u===1&&!D.file?zu(D.original,"spawn"):null}function Ir(u,D){return Uu&&u===1&&!D.file?zu(D.original,"spawnSync"):null}var Or={hookChildProcess:Tr,verifyENOENT:Fe,verifyENOENTSync:Ir,notFoundError:zu};const le=gt,Ku=Sr,Hu=Or;function Ce(u,D,t){const n=Ku(u,D,t),r=le.spawn(n.command,n.args,n.options);return Hu.hookChildProcess(r,n),r}function Pr(u,D,t){const n=Ku(u,D,t),r=le.spawnSync(n.command,n.args,n.options);return r.error=r.error||Hu.verifyENOENTSync(r.status,n),r}U.exports=Ce,U.exports.spawn=Ce,U.exports.sync=Pr,U.exports._parse=Ku,U.exports._enoent=Hu;var kr=U.exports,Rr=W(kr);function Mr(u){const D=typeof u=="string"?`
`:`
`.charCodeAt(),t=typeof u=="string"?"\r":"\r".charCodeAt();return u[u.length-1]===D&&(u=u.slice(0,-1)),u[u.length-1]===t&&(u=u.slice(0,-1)),u}function Ee(u={}){const{env:D=process.env,platform:t=process.platform}=u;return t!=="win32"?"PATH":Object.keys(D).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"}const jr=({cwd:u=h.cwd(),path:D=h.env[Ee()],preferLocal:t=!0,execPath:n=h.execPath,addExecPath:r=!0}={})=>{const o=u instanceof URL?xD(u):u,e=G.resolve(o),i=[];return t&&_r(i,e),r&&Nr(i,n,e),[...i,D].join(G.delimiter)},_r=(u,D)=>{let t;for(;t!==D;)u.push(G.join(D,"node_modules/.bin")),t=D,D=G.resolve(D,"..")},Nr=(u,D,t)=>{const n=D instanceof URL?xD(D):D;u.push(G.resolve(t,n,".."))},Gr=({env:u=h.env,...D}={})=>{u={...u};const t=Ee({env:u});return D.path=u[t],u[t]=jr(D),u},Lr=(u,D,t,n)=>{if(t==="length"||t==="prototype"||t==="arguments"||t==="caller")return;const r=Object.getOwnPropertyDescriptor(u,t),o=Object.getOwnPropertyDescriptor(D,t);!Wr(r,o)&&n||Object.defineProperty(u,t,o)},Wr=function(u,D){return u===void 0||u.configurable||u.writable===D.writable&&u.enumerable===D.enumerable&&u.configurable===D.configurable&&(u.writable||u.value===D.value)},Ur=(u,D)=>{const t=Object.getPrototypeOf(D);t!==Object.getPrototypeOf(u)&&Object.setPrototypeOf(u,t)},zr=(u,D)=>`/* Wrapped ${u}*/
${D}`,Kr=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Hr=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),qr=(u,D,t)=>{const n=t===""?"":`with ${t.trim()}() `,r=zr.bind(null,n,D.toString());Object.defineProperty(r,"name",Hr),Object.defineProperty(u,"toString",{...Kr,value:r})};function Yr(u,D,{ignoreNonConfigurable:t=!1}={}){const{name:n}=u;for(const r of Reflect.ownKeys(D))Lr(u,D,r,t);return Ur(u,D),qr(u,D,n),u}const Fu=new WeakMap,fe=(u,D={})=>{if(typeof u!="function")throw new TypeError("Expected a function");let t,n=0;const r=u.displayName||u.name||"<anonymous>",o=function(...e){if(Fu.set(o,++n),n===1)t=u.apply(this,e),u=null;else if(D.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return t};return Yr(o,u),Fu.set(o,n),o};fe.callCount=u=>{if(!Fu.has(u))throw new Error(`The given function \`${u.name}\` is not wrapped by the \`onetime\` package`);return Fu.get(u)};const Vr=()=>{const u=pe-de+1;return Array.from({length:u},Jr)},Jr=(u,D)=>({name:`SIGRT${D+1}`,number:de+D,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),de=34,pe=64,Xr=[{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"}],me=()=>{const u=Vr();return[...Xr,...u].map(Zr)},Zr=({name:u,number:D,description:t,action:n,forced:r=!1,standard:o})=>{const{signals:{[u]:e}}=SD,i=e!==void 0;return{name:u,number:i?e:D,description:t,supported:i,action:n,forced:r,standard:o}},Qr=()=>{const u=me();return Object.fromEntries(u.map(uo))},uo=({name:u,number:D,description:t,supported:n,action:r,forced:o,standard:e})=>[u,{name:u,number:D,description:t,supported:n,action:r,forced:o,standard:e}],Do=Qr(),eo=()=>{const u=me(),D=pe+1,t=Array.from({length:D},(n,r)=>to(r,u));return Object.assign({},...t)},to=(u,D)=>{const t=no(u,D);if(t===void 0)return{};const{name:n,description:r,supported:o,action:e,forced:i,standard:s}=t;return{[u]:{name:n,number:u,description:r,supported: