@sugarmo/aicommits 1.14.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -98
- package/dist/cli.mjs +114 -113
- package/package.json +2 -3
package/dist/cli.mjs
CHANGED
|
@@ -1,139 +1,140 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import Ke from"tty";import{Buffer as BD}from"node:buffer";import ue from"node:path";import uu,{ChildProcess as wD}from"node:child_process";import P,{stdin as vD,stdout as AD}from"node:process";import $D from"child_process";import U from"path";import Ve from"fs";import{fileURLToPath as nu}from"node:url";import xD,{constants as Du}from"node:os";import ru from"assert";import ou from"events";import{createWriteStream as SD,createReadStream as TD}from"node:fs";import OD from"buffer";import Ye from"stream";import iu from"util";import{debuglog as ID}from"node:util";import su from"node:readline";import{WriteStream as PD}from"node:tty";import _ from"fs/promises";import xe from"os";import kD from"https";import MD from"net";import RD from"tls";import jD,{fileURLToPath as _D,pathToFileURL as LD}from"url";const ND="known-flag",GD="unknown-flag",zD="argument",{stringify:ce}=JSON,WD=/\B([A-Z])/g,UD=e=>e.replace(WD,"-$1").toLowerCase(),{hasOwnProperty:qD}=Object.prototype,le=(e,t)=>qD.call(e,t),HD=e=>Array.isArray(e),au=e=>typeof e=="function"?[e,!1]:HD(e)?[e[0],!0]:au(e.type),JD=(e,t)=>e===Boolean?t!=="false":t,KD=(e,t)=>typeof t=="boolean"?t:e===Number&&t===""?Number.NaN:e(t),VD=/[\s.:=]/,YD=e=>{const t=`Flag name ${ce(e)}`;if(e.length===0)throw new Error(`${t} cannot be empty`);if(e.length===1)throw new Error(`${t} must be longer than a character`);const u=e.match(VD);if(u)throw new Error(`${t} cannot contain ${ce(u?.[0])}`)},ZD=e=>{const t={},u=(n,r)=>{if(le(t,n))throw new Error(`Duplicate flags named ${ce(n)}`);t[n]=r};for(const n in e){if(!le(e,n))continue;YD(n);const r=e[n],o=[[],...au(r),r];u(n,o);const D=UD(n);if(n!==D&&u(D,o),"alias"in r&&typeof r.alias=="string"){const{alias:i}=r,s=`Flag alias ${ce(i)} for flag ${ce(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`);u(i,o)}}return t},XD=(e,t)=>{const u={};for(const n in e){if(!le(e,n))continue;const[r,,o,D]=t[n];if(r.length===0&&"default"in D){let{default:i}=D;typeof i=="function"&&(i=i()),u[n]=i}else u[n]=o?r:r.pop()}return u},Se="--",QD=/[.:=]/,er=/^-{1,2}\w/,tr=e=>{if(!er.test(e))return;const t=!e.startsWith(Se);let u=e.slice(t?1:2),n;const r=u.match(QD);if(r){const{index:o}=r;n=u.slice(o+1),u=u.slice(0,o)}return[u,n,t]},ur=(e,{onFlag:t,onArgument:u})=>{let n;const r=(o,D)=>{if(typeof n!="function")return!0;n(o,D),n=void 0};for(let o=0;o<e.length;o+=1){const D=e[o];if(D===Se){r();const s=e.slice(o+1);u?.(s,[o],!0);break}const i=tr(D);if(i){if(r(),!t)continue;const[s,l,f]=i;if(f)for(let a=0;a<s.length;a+=1){r();const c=a===s.length-1;n=t(s[a],c?l:void 0,[o,a+1,c])}else n=t(s,l,[o])}else r(D,[o])&&u?.([D],[o])}r()},nr=(e,t)=>{for(const[u,n,r]of t.reverse()){if(n){const o=e[u];let D=o.slice(0,n);if(r||(D+=o.slice(n+1)),D!=="-"){e[u]=D;continue}}e.splice(u,1)}},Dr=(e,t=process.argv.slice(2),{ignore:u}={})=>{const n=[],r=ZD(e),o={},D=[];return D[Se]=[],ur(t,{onFlag(i,s,l){const f=le(r,i);if(!u?.(f?ND:GD,i,s)){if(f){const[a,c]=r[i],d=JD(c,s),F=(C,p)=>{n.push(l),p&&n.push(p),a.push(KD(c,C||""))};return d===void 0?F:F(d)}le(o,i)||(o[i]=[]),o[i].push(s===void 0?!0:s),n.push(l)}},onArgument(i,s,l){u?.(zD,t[s[0]])||(D.push(...i),l?(D[Se]=i,t.splice(s[0])):n.push(s))}}),nr(t,n),{flags:XD(e,r),unknownFlags:o,_:D}};var rr=Object.create,Te=Object.defineProperty,or=Object.defineProperties,ir=Object.getOwnPropertyDescriptor,sr=Object.getOwnPropertyDescriptors,ar=Object.getOwnPropertyNames,cu=Object.getOwnPropertySymbols,cr=Object.getPrototypeOf,lu=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,fu=(e,t,u)=>t in e?Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[t]=u,Oe=(e,t)=>{for(var u in t||(t={}))lu.call(t,u)&&fu(e,u,t[u]);if(cu)for(var u of cu(t))lr.call(t,u)&&fu(e,u,t[u]);return e},Ze=(e,t)=>or(e,sr(t)),fr=e=>Te(e,"__esModule",{value:!0}),dr=(e,t)=>()=>(e&&(t=e(e=0)),t),Fr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pr=(e,t,u,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ar(t))!lu.call(e,r)&&(u||r!=="default")&&Te(e,r,{get:()=>t[r],enumerable:!(n=ir(t,r))||n.enumerable});return e},Cr=(e,t)=>pr(fr(Te(e!=null?rr(cr(e)):{},"default",!t&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),j=dr(()=>{}),mr=Fr((e,t)=>{j(),t.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\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}});j(),j(),j();var hr=e=>{var t,u,n;let r=(t=process.stdout.columns)!=null?t:Number.POSITIVE_INFINITY;return typeof e=="function"&&(e=e(r)),e||(e={}),Array.isArray(e)?{columns:e,stdoutColumns:r}:{columns:(u=e.columns)!=null?u:[],stdoutColumns:(n=e.stdoutColumns)!=null?n:r}};j(),j(),j(),j(),j();function Er({onlyFirst:e=!1}={}){let t=["[\\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(t,e?void 0:"g")}function du(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Er(),"")}j();function gr(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}var yr=Cr(mr(),1);function Z(e){if(typeof e!="string"||e.length===0||(e=du(e),e.length===0))return 0;e=e.replace((0,yr.default)()," ");let t=0;for(let u=0;u<e.length;u++){let n=e.codePointAt(u);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&u++,t+=gr(n)?2:1)}return t}var Fu=e=>Math.max(...e.split(`
|
|
3
|
-
`).map(
|
|
4
|
-
`)];for(let[
|
|
5
|
-
`?(o&&(n+=
|
|
6
|
-
`&&(r&&
|
|
2
|
+
import Qe from"tty";import{Buffer as PD}from"node:buffer";import ne from"node:path";import lu,{ChildProcess as RD}from"node:child_process";import M,{stdin as _D,stdout as jD}from"node:process";import ND from"child_process";import N from"path";import et from"fs";import{fileURLToPath as fu}from"node:url";import LD,{constants as du}from"node:os";import Fu from"assert";import pu from"events";import{createWriteStream as GD,createReadStream as zD}from"node:fs";import WD from"buffer";import tt from"stream";import Cu from"util";import{debuglog as UD}from"node:util";import mu from"node:readline";import{WriteStream as qD}from"node:tty";import $ from"fs/promises";import Oe from"os";import HD from"https";import KD from"net";import JD from"tls";import VD,{fileURLToPath as hu,pathToFileURL as YD}from"url";const ZD="known-flag",XD="unknown-flag",QD="argument",{stringify:de}=JSON,er=/\B([A-Z])/g,tr=e=>e.replace(er,"-$1").toLowerCase(),{hasOwnProperty:ur}=Object.prototype,Fe=(e,t)=>ur.call(e,t),nr=e=>Array.isArray(e),gu=e=>typeof e=="function"?[e,!1]:nr(e)?[e[0],!0]:gu(e.type),Dr=(e,t)=>e===Boolean?t!=="false":t,rr=(e,t)=>typeof t=="boolean"?t:e===Number&&t===""?Number.NaN:e(t),or=/[\s.:=]/,sr=e=>{const t=`Flag name ${de(e)}`;if(e.length===0)throw new Error(`${t} cannot be empty`);if(e.length===1)throw new Error(`${t} must be longer than a character`);const u=e.match(or);if(u)throw new Error(`${t} cannot contain ${de(u?.[0])}`)},ir=e=>{const t={},u=(n,r)=>{if(Fe(t,n))throw new Error(`Duplicate flags named ${de(n)}`);t[n]=r};for(const n in e){if(!Fe(e,n))continue;sr(n);const r=e[n],o=[[],...gu(r),r];u(n,o);const D=tr(n);if(n!==D&&u(D,o),"alias"in r&&typeof r.alias=="string"){const{alias:i}=r,s=`Flag alias ${de(i)} for flag ${de(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`);u(i,o)}}return t},ar=(e,t)=>{const u={};for(const n in e){if(!Fe(e,n))continue;const[r,,o,D]=t[n];if(r.length===0&&"default"in D){let{default:i}=D;typeof i=="function"&&(i=i()),u[n]=i}else u[n]=o?r:r.pop()}return u},Ie="--",cr=/[.:=]/,lr=/^-{1,2}\w/,fr=e=>{if(!lr.test(e))return;const t=!e.startsWith(Ie);let u=e.slice(t?1:2),n;const r=u.match(cr);if(r){const{index:o}=r;n=u.slice(o+1),u=u.slice(0,o)}return[u,n,t]},dr=(e,{onFlag:t,onArgument:u})=>{let n;const r=(o,D)=>{if(typeof n!="function")return!0;n(o,D),n=void 0};for(let o=0;o<e.length;o+=1){const D=e[o];if(D===Ie){r();const s=e.slice(o+1);u?.(s,[o],!0);break}const i=fr(D);if(i){if(r(),!t)continue;const[s,c,f]=i;if(f)for(let l=0;l<s.length;l+=1){r();const a=l===s.length-1;n=t(s[l],a?c:void 0,[o,l+1,a])}else n=t(s,c,[o])}else r(D,[o])&&u?.([D],[o])}r()},Fr=(e,t)=>{for(const[u,n,r]of t.reverse()){if(n){const o=e[u];let D=o.slice(0,n);if(r||(D+=o.slice(n+1)),D!=="-"){e[u]=D;continue}}e.splice(u,1)}},pr=(e,t=process.argv.slice(2),{ignore:u}={})=>{const n=[],r=ir(e),o={},D=[];return D[Ie]=[],dr(t,{onFlag(i,s,c){const f=Fe(r,i);if(!u?.(f?ZD:XD,i,s)){if(f){const[l,a]=r[i],d=Dr(a,s),F=(p,C)=>{n.push(c),C&&n.push(C),l.push(rr(a,p||""))};return d===void 0?F:F(d)}Fe(o,i)||(o[i]=[]),o[i].push(s===void 0?!0:s),n.push(c)}},onArgument(i,s,c){u?.(QD,t[s[0]])||(D.push(...i),c?(D[Ie]=i,t.splice(s[0])):n.push(s))}}),Fr(t,n),{flags:ar(e,r),unknownFlags:o,_:D}};var Cr=Object.create,Me=Object.defineProperty,mr=Object.defineProperties,hr=Object.getOwnPropertyDescriptor,gr=Object.getOwnPropertyDescriptors,Er=Object.getOwnPropertyNames,Eu=Object.getOwnPropertySymbols,yr=Object.getPrototypeOf,yu=Object.prototype.hasOwnProperty,Br=Object.prototype.propertyIsEnumerable,Bu=(e,t,u)=>t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[t]=u,Te=(e,t)=>{for(var u in t||(t={}))yu.call(t,u)&&Bu(e,u,t[u]);if(Eu)for(var u of Eu(t))Br.call(t,u)&&Bu(e,u,t[u]);return e},ut=(e,t)=>mr(e,gr(t)),br=e=>Me(e,"__esModule",{value:!0}),wr=(e,t)=>()=>(e&&(t=e(e=0)),t),Ar=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vr=(e,t,u,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Er(t))!yu.call(e,r)&&(u||r!=="default")&&Me(e,r,{get:()=>t[r],enumerable:!(n=hr(t,r))||n.enumerable});return e},$r=(e,t)=>vr(br(Me(e!=null?Cr(yr(e)):{},"default",!t&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),L=wr(()=>{}),xr=Ar((e,t)=>{L(),t.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\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}});L(),L(),L();var Sr=e=>{var t,u,n;let r=(t=process.stdout.columns)!=null?t:Number.POSITIVE_INFINITY;return typeof e=="function"&&(e=e(r)),e||(e={}),Array.isArray(e)?{columns:e,stdoutColumns:r}:{columns:(u=e.columns)!=null?u:[],stdoutColumns:(n=e.stdoutColumns)!=null?n:r}};L(),L(),L(),L(),L();function Or({onlyFirst:e=!1}={}){let t=["[\\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(t,e?void 0:"g")}function bu(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Or(),"")}L();function Ir(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}var Mr=$r(xr(),1);function Q(e){if(typeof e!="string"||e.length===0||(e=bu(e),e.length===0))return 0;e=e.replace((0,Mr.default)()," ");let t=0;for(let u=0;u<e.length;u++){let n=e.codePointAt(u);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&u++,t+=Ir(n)?2:1)}return t}var wu=e=>Math.max(...e.split(`
|
|
3
|
+
`).map(Q)),Tr=e=>{let t=[];for(let u of e){let{length:n}=u,r=n-t.length;for(let o=0;o<r;o+=1)t.push(0);for(let o=0;o<n;o+=1){let D=wu(u[o]);D>t[o]&&(t[o]=D)}}return t};L();var Au=/^\d+%$/,vu={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},kr=(e,t)=>{var u;let n=[];for(let r=0;r<e.length;r+=1){let o=(u=t[r])!=null?u:"auto";if(typeof o=="number"||o==="auto"||o==="content-width"||typeof o=="string"&&Au.test(o)){n.push(ut(Te({},vu),{width:o,contentWidth:e[r]}));continue}if(o&&typeof o=="object"){let D=ut(Te(Te({},vu),o),{contentWidth:e[r]});D.horizontalPadding=D.paddingLeft+D.paddingRight,n.push(D);continue}throw new Error(`Invalid column width: ${JSON.stringify(o)}`)}return n};function Pr(e,t){for(let u of e){let{width:n}=u;if(n==="content-width"&&(u.width=u.contentWidth),n==="auto"){let s=Math.min(20,u.contentWidth);u.width=s,u.autoOverflow=u.contentWidth-s}if(typeof n=="string"&&Au.test(n)){let s=Number.parseFloat(n.slice(0,-1))/100;u.width=Math.floor(t*s)-(u.paddingLeft+u.paddingRight)}let{horizontalPadding:r}=u,o=1,D=o+r;if(D>=t){let s=D-t,c=Math.ceil(u.paddingLeft/r*s),f=s-c;u.paddingLeft-=c,u.paddingRight-=f,u.horizontalPadding=u.paddingLeft+u.paddingRight}u.paddingLeftString=u.paddingLeft?" ".repeat(u.paddingLeft):"",u.paddingRightString=u.paddingRight?" ".repeat(u.paddingRight):"";let i=t-u.horizontalPadding;u.width=Math.max(Math.min(u.width,i),o)}}var $u=()=>Object.assign([],{columns:0});function Rr(e,t){let u=[$u()],[n]=u;for(let r of e){let o=r.width+r.horizontalPadding;n.columns+o>t&&(n=$u(),u.push(n)),n.push(r),n.columns+=o}for(let r of u){let o=r.reduce((a,d)=>a+d.width+d.horizontalPadding,0),D=t-o;if(D===0)continue;let i=r.filter(a=>"autoOverflow"in a),s=i.filter(a=>a.autoOverflow>0),c=s.reduce((a,d)=>a+d.autoOverflow,0),f=Math.min(c,D);for(let a of s){let d=Math.floor(a.autoOverflow/c*f);a.width+=d,D-=d}let l=Math.floor(D/i.length);for(let a=0;a<i.length;a+=1){let d=i[a];a===i.length-1?d.width+=D:d.width+=l,D-=l}}return u}function _r(e,t,u){let n=kr(u,t);return Pr(n,e),Rr(n,e)}L(),L(),L();var nt=10,xu=(e=0)=>t=>`\x1B[${t+e}m`,Su=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Ou=(e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}m`;function jr(){let e=new Map,t={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]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(let[u,n]of Object.entries(t)){for(let[r,o]of Object.entries(n))t[r]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},n[r]=t[r],e.set(o[0],o[1]);Object.defineProperty(t,u,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",t.color.ansi=xu(),t.color.ansi256=Su(),t.color.ansi16m=Ou(),t.bgColor.ansi=xu(nt),t.bgColor.ansi256=Su(nt),t.bgColor.ansi16m=Ou(nt),Object.defineProperties(t,{rgbToAnsi256:{value:(u,n,r)=>u===n&&n===r?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:u=>{let n=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(u.toString(16));if(!n)return[0,0,0];let{colorString:r}=n.groups;r.length===3&&(r=r.split("").map(D=>D+D).join(""));let o=Number.parseInt(r,16);return[o>>16&255,o>>8&255,o&255]},enumerable:!1},hexToAnsi256:{value:u=>t.rgbToAnsi256(...t.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let n,r,o;if(u>=232)n=((u-232)*10+8)/255,r=n,o=n;else{u-=16;let s=u%36;n=Math.floor(u/36)/5,r=Math.floor(s/6)/5,o=s%6/5}let D=Math.max(n,r,o)*2;if(D===0)return 30;let i=30+(Math.round(o)<<2|Math.round(r)<<1|Math.round(n));return D===2&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(u,n,r)=>t.ansi256ToAnsi(t.rgbToAnsi256(u,n,r)),enumerable:!1},hexToAnsi:{value:u=>t.ansi256ToAnsi(t.hexToAnsi256(u)),enumerable:!1}}),t}var Nr=jr(),Lr=Nr,ke=new Set(["\x1B","\x9B"]),Gr=39,Dt="\x07",Iu="[",zr="]",Mu="m",rt=`${zr}8;;`,Tu=e=>`${ke.values().next().value}${Iu}${e}${Mu}`,ku=e=>`${ke.values().next().value}${rt}${e}${Dt}`,Wr=e=>e.split(" ").map(t=>Q(t)),ot=(e,t,u)=>{let n=[...t],r=!1,o=!1,D=Q(bu(e[e.length-1]));for(let[i,s]of n.entries()){let c=Q(s);if(D+c<=u?e[e.length-1]+=s:(e.push(s),D=0),ke.has(s)&&(r=!0,o=n.slice(i+1).join("").startsWith(rt)),r){o?s===Dt&&(r=!1,o=!1):s===Mu&&(r=!1);continue}D+=c,D===u&&i<n.length-1&&(e.push(""),D=0)}!D&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Ur=e=>{let t=e.split(" "),u=t.length;for(;u>0&&!(Q(t[u-1])>0);)u--;return u===t.length?e:t.slice(0,u).join(" ")+t.slice(u).join("")},qr=(e,t,u={})=>{if(u.trim!==!1&&e.trim()==="")return"";let n="",r,o,D=Wr(e),i=[""];for(let[c,f]of e.split(" ").entries()){u.trim!==!1&&(i[i.length-1]=i[i.length-1].trimStart());let l=Q(i[i.length-1]);if(c!==0&&(l>=t&&(u.wordWrap===!1||u.trim===!1)&&(i.push(""),l=0),(l>0||u.trim===!1)&&(i[i.length-1]+=" ",l++)),u.hard&&D[c]>t){let a=t-l,d=1+Math.floor((D[c]-a-1)/t);Math.floor((D[c]-1)/t)<d&&i.push(""),ot(i,f,t);continue}if(l+D[c]>t&&l>0&&D[c]>0){if(u.wordWrap===!1&&l<t){ot(i,f,t);continue}i.push("")}if(l+D[c]>t&&u.wordWrap===!1){ot(i,f,t);continue}i[i.length-1]+=f}u.trim!==!1&&(i=i.map(c=>Ur(c)));let s=[...i.join(`
|
|
4
|
+
`)];for(let[c,f]of s.entries()){if(n+=f,ke.has(f)){let{groups:a}=new RegExp(`(?:\\${Iu}(?<code>\\d+)m|\\${rt}(?<uri>.*)${Dt})`).exec(s.slice(c).join(""))||{groups:{}};if(a.code!==void 0){let d=Number.parseFloat(a.code);r=d===Gr?void 0:d}else a.uri!==void 0&&(o=a.uri.length===0?void 0:a.uri)}let l=Lr.codes.get(Number(r));s[c+1]===`
|
|
5
|
+
`?(o&&(n+=ku("")),r&&l&&(n+=Tu(l))):f===`
|
|
6
|
+
`&&(r&&l&&(n+=Tu(r)),o&&(n+=ku(o)))}return n};function Hr(e,t,u){return String(e).normalize().replace(/\r\n/g,`
|
|
7
7
|
`).split(`
|
|
8
|
-
`).map(n=>
|
|
9
|
-
`)}var
|
|
10
|
-
`);if(s.postprocess){let{postprocess:
|
|
8
|
+
`).map(n=>qr(n,t,u)).join(`
|
|
9
|
+
`)}var Pu=e=>Array.from({length:e}).fill("");function Kr(e,t){let u=[],n=0;for(let r of e){let o=0,D=r.map(s=>{var c;let f=(c=t[n])!=null?c:"";n+=1,s.preprocess&&(f=s.preprocess(f)),wu(f)>s.width&&(f=Hr(f,s.width,{hard:!0}));let l=f.split(`
|
|
10
|
+
`);if(s.postprocess){let{postprocess:a}=s;l=l.map((d,F)=>a.call(s,d,F))}return s.paddingTop&&l.unshift(...Pu(s.paddingTop)),s.paddingBottom&&l.push(...Pu(s.paddingBottom)),l.length>o&&(o=l.length),ut(Te({},s),{lines:l})}),i=[];for(let s=0;s<o;s+=1){let c=D.map(f=>{var l;let a=(l=f.lines[s])!=null?l:"",d=Number.isFinite(f.width)?" ".repeat(f.width-Q(a)):"",F=f.paddingLeftString;return f.align==="right"&&(F+=d),F+=a,f.align==="left"&&(F+=d),F+f.paddingRightString}).join("");i.push(c)}u.push(i.join(`
|
|
11
11
|
`))}return u.join(`
|
|
12
|
-
`)}function
|
|
13
|
-
`)}
|
|
14
|
-
`}}function
|
|
15
|
-
`}}function
|
|
16
|
-
`):t.usage}}:void 0;if(e.name){const u=[],n=[
|
|
17
|
-
`)}}}}function
|
|
18
|
-
`)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}function
|
|
12
|
+
`)}function Jr(e,t){if(!e||e.length===0)return"";let u=Tr(e),n=u.length;if(n===0)return"";let{stdoutColumns:r,columns:o}=Sr(t);if(o.length>n)throw new Error(`${o.length} columns defined, but only ${n} columns found`);let D=_r(r,o,u);return e.map(i=>Kr(D,i)).join(`
|
|
13
|
+
`)}L();var Vr=["<",">","=",">=","<="];function Yr(e){if(!Vr.includes(e))throw new TypeError(`Invalid breakpoint operator: ${e}`)}function Zr(e){let t=Object.keys(e).map(u=>{let[n,r]=u.split(" ");Yr(n);let o=Number.parseInt(r,10);if(Number.isNaN(o))throw new TypeError(`Invalid breakpoint value: ${r}`);let D=e[u];return{operator:n,breakpoint:o,value:D}}).sort((u,n)=>n.breakpoint-u.breakpoint);return u=>{var n;return(n=t.find(({operator:r,breakpoint:o})=>r==="="&&u===o||r===">"&&u>o||r==="<"&&u<o||r===">="&&u>=o||r==="<="&&u<=o))==null?void 0:n.value}}const Xr=e=>e.replace(/[\W_]([a-z\d])?/gi,(t,u)=>u?u.toUpperCase():""),Qr=e=>e.replace(/\B([A-Z])/g,"-$1").toLowerCase(),eo={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:e=>e.trim()},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function to(e){let t=!1;return{type:"table",data:{tableData:Object.keys(e).sort((u,n)=>u.localeCompare(n)).map(u=>{const n=e[u],r="alias"in n;return r&&(t=!0),{name:u,flag:n,flagFormatted:`--${Qr(u)}`,aliasesEnabled:t,aliasFormatted:r?`-${n.alias}`:void 0}}).map(u=>(u.aliasesEnabled=t,[{type:"flagName",data:u},{type:"flagDescription",data:u}])),tableBreakpoints:eo}}}const Ru=e=>!e||(e.version??(e.help?e.help.version:void 0)),_u=e=>{const t="parent"in e&&e.parent?.name;return(t?`${t} `:"")+e.name};function uo(e){const t=[];e.name&&t.push(_u(e));const u=Ru(e)??("parent"in e&&Ru(e.parent));if(u&&t.push(`v${u}`),t.length!==0)return{id:"name",type:"text",data:`${t.join(" ")}
|
|
14
|
+
`}}function no(e){const{help:t}=e;if(!(!t||!t.description))return{id:"description",type:"text",data:`${t.description}
|
|
15
|
+
`}}function Do(e){const t=e.help||{};if("usage"in t)return t.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(t.usage)?t.usage.join(`
|
|
16
|
+
`):t.usage}}:void 0;if(e.name){const u=[],n=[_u(e)];if(e.flags&&Object.keys(e.flags).length>0&&n.push("[flags...]"),e.parameters&&e.parameters.length>0){const{parameters:r}=e,o=r.indexOf("--"),D=o>-1&&r.slice(o+1).some(i=>i.startsWith("<"));n.push(r.map(i=>i!=="--"?i:D?"--":"[--]").join(" "))}if(n.length>1&&u.push(n.join(" ")),"commands"in e&&e.commands?.length&&u.push(`${e.name} <command>`),u.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:u.join(`
|
|
17
|
+
`)}}}}function ro(e){return!("commands"in e)||!e.commands?.length?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:e.commands.map(t=>[t.options.name,t.options.help?t.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}function oo(e){if(!(!e.flags||Object.keys(e.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:to(e.flags),indentBody:0}}}function so(e){const{help:t}=e;if(!t||!t.examples||t.examples.length===0)return;let{examples:u}=t;if(Array.isArray(u)&&(u=u.join(`
|
|
18
|
+
`)),u)return{id:"examples",type:"section",data:{title:"Examples:",body:u}}}function io(e){if(!("alias"in e)||!e.alias)return;const{alias:t}=e;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(t)?t.join(", "):t}}}const ao=e=>[uo,no,Do,ro,oo,so,io].map(t=>t(e)).filter(Boolean),co=Qe.WriteStream.prototype.hasColors();class lo{text(t){return t}bold(t){return co?`\x1B[1m${t}\x1B[22m`:t.toLocaleUpperCase()}indentText({text:t,spaces:u}){return t.replace(/^/gm," ".repeat(u))}heading(t){return this.bold(t)}section({title:t,body:u,indentBody:n=2}){return`${(t?`${this.heading(t)}
|
|
19
19
|
`:"")+(u?this.indentText({text:this.render(u),spaces:n}):"")}
|
|
20
|
-
`}table({tableData:t,tableOptions:u,tableBreakpoints:n}){return
|
|
21
|
-
`);if("type"in t&&this[t.type]){const u=this[t.type];if(typeof u=="function")return u.call(this,t.data)}throw new Error(`Invalid node type: ${JSON.stringify(t)}`)}}const
|
|
22
|
-
`),n(),process.exit(1);e[s]=
|
|
20
|
+
`}table({tableData:t,tableOptions:u,tableBreakpoints:n}){return Jr(t.map(r=>r.map(o=>this.render(o))),n?Zr(n):u)}flagParameter(t){return t===Boolean?"":t===String?"<string>":t===Number?"<number>":Array.isArray(t)?this.flagParameter(t[0]):"<value>"}flagOperator(t){return" "}flagName(t){const{flag:u,flagFormatted:n,aliasesEnabled:r,aliasFormatted:o}=t;let D="";if(o?D+=`${o}, `:r&&(D+=" "),D+=n,"placeholder"in u&&typeof u.placeholder=="string")D+=`${this.flagOperator(t)}${u.placeholder}`;else{const i=this.flagParameter("type"in u?u.type:u);i&&(D+=`${this.flagOperator(t)}${i}`)}return D}flagDefault(t){return JSON.stringify(t)}flagDescription({flag:t}){let u="description"in t?t.description??"":"";if("default"in t){let{default:n}=t;typeof n=="function"&&(n=n()),n&&(u+=` (default: ${this.flagDefault(n)})`)}return u}render(t){if(typeof t=="string")return t;if(Array.isArray(t))return t.map(u=>this.render(u)).join(`
|
|
21
|
+
`);if("type"in t&&this[t.type]){const u=this[t.type];if(typeof u=="function")return u.call(this,t.data)}throw new Error(`Invalid node type: ${JSON.stringify(t)}`)}}const st=e=>e.length>0&&!e.includes(" "),{stringify:K}=JSON,fo=/[|\\{}()[\]^$+*?.]/;function it(e){const t=[];let u,n;for(const r of e){if(n)throw new Error(`Invalid parameter: Spread parameter ${K(n)} must be last`);const o=r[0],D=r[r.length-1];let i;if(o==="<"&&D===">"&&(i=!0,u))throw new Error(`Invalid parameter: Required parameter ${K(r)} cannot come after optional parameter ${K(u)}`);if(o==="["&&D==="]"&&(i=!1,u=r),i===void 0)throw new Error(`Invalid parameter: ${K(r)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let s=r.slice(1,-1);const c=s.slice(-3)==="...";c&&(n=r,s=s.slice(0,-3));const f=s.match(fo);if(f)throw new Error(`Invalid parameter: ${K(r)}. Invalid character found ${K(f[0])}`);t.push({name:s,required:i,spread:c})}return t}function at(e,t,u,n){for(let r=0;r<t.length;r+=1){const{name:o,required:D,spread:i}=t[r],s=Xr(o);if(s in e)throw new Error(`Invalid parameter: ${K(o)} is used more than once.`);const c=i?u.slice(r):u[r];if(i&&(r=t.length),D&&(!c||i&&c.length===0))return console.error(`Error: Missing required parameter ${K(o)}
|
|
22
|
+
`),n(),process.exit(1);e[s]=c}}function Fo(e){return e===void 0||e!==!1}function ju(e,t,u,n){const r={...t.flags},o=t.version;o&&(r.version={type:Boolean,description:"Show version"});const{help:D}=t,i=Fo(D);i&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const s=pr(r,n,{ignore:t.ignoreArgv}),c=()=>{console.log(t.version)};if(o&&s.flags.version===!0)return c(),process.exit(0);const f=new lo,l=i&&D?.render?D.render:F=>f.render(F),a=F=>{const p=ao({...t,...F?{help:F}:{},flags:r});console.log(l(p,f))};if(i&&s.flags.help===!0)return a(),process.exit(0);if(t.parameters){let{parameters:F}=t,p=s._;const C=F.indexOf("--"),h=F.slice(C+1),y=Object.create(null);if(C>-1&&h.length>0){F=F.slice(0,C);const A=s._["--"];p=p.slice(0,-A.length||void 0),at(y,it(F),p,a),at(y,it(h),A,a)}else at(y,it(F),p,a);Object.assign(s._,y)}const d={...s,showVersion:c,showHelp:a};return typeof u=="function"&&u(d),{command:e,...d}}function po(e,t){const u=new Map;for(const n of t){const r=[n.options.name],{alias:o}=n.options;o&&(Array.isArray(o)?r.push(...o):r.push(o));for(const D of r){if(u.has(D))throw new Error(`Duplicate command name found: ${K(D)}`);u.set(D,n)}}return u.get(e)}function Co(e,t,u=process.argv.slice(2)){if(!e)throw new Error("Options is required");if("name"in e&&(!e.name||!st(e.name)))throw new Error(`Invalid script name: ${K(e.name)}`);const n=u[0];if(e.commands&&n&&st(n)){const r=po(n,e.commands);if(r)return ju(r.options.name,{...r.options,parent:e},r.callback,u.slice(1))}return ju(void 0,e,t,u)}function Nu(e,t){if(!e)throw new Error("Command options are required");const{name:u}=e;if(u===void 0)throw new Error("Command name is required");if(!st(u))throw new Error(`Invalid command name ${JSON.stringify(u)}. Command names must be one word.`);return{options:e,callback:t}}var mo="1.16.0",ho="Writes your git commit messages for you with AI",go="sugarmo/aicommits",k=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function De(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var re={exports:{}},ct,Lu;function Eo(){if(Lu)return ct;Lu=1,ct=n,n.sync=r;var e=et;function t(o,D){var i=D.pathExt!==void 0?D.pathExt:process.env.PATHEXT;if(!i||(i=i.split(";"),i.indexOf("")!==-1))return!0;for(var s=0;s<i.length;s++){var c=i[s].toLowerCase();if(c&&o.substr(-c.length).toLowerCase()===c)return!0}return!1}function u(o,D,i){return!o.isSymbolicLink()&&!o.isFile()?!1:t(D,i)}function n(o,D,i){e.stat(o,function(s,c){i(s,s?!1:u(c,o,D))})}function r(o,D){return u(e.statSync(o),o,D)}return ct}var lt,Gu;function yo(){if(Gu)return lt;Gu=1,lt=t,t.sync=u;var e=et;function t(o,D,i){e.stat(o,function(s,c){i(s,s?!1:n(c,D))})}function u(o,D){return n(e.statSync(o),D)}function n(o,D){return o.isFile()&&r(o,D)}function r(o,D){var i=o.mode,s=o.uid,c=o.gid,f=D.uid!==void 0?D.uid:process.getuid&&process.getuid(),l=D.gid!==void 0?D.gid:process.getgid&&process.getgid(),a=parseInt("100",8),d=parseInt("010",8),F=parseInt("001",8),p=a|d,C=i&F||i&d&&c===l||i&a&&s===f||i&p&&f===0;return C}return lt}var Pe;process.platform==="win32"||k.TESTING_WINDOWS?Pe=Eo():Pe=yo();var Bo=ft;ft.sync=bo;function ft(e,t,u){if(typeof t=="function"&&(u=t,t={}),!u){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(n,r){ft(e,t||{},function(o,D){o?r(o):n(D)})})}Pe(e,t||{},function(n,r){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,r=!1),u(n,r)})}function bo(e,t){try{return Pe.sync(e,t||{})}catch(u){if(t&&t.ignoreErrors||u.code==="EACCES")return!1;throw u}}const oe=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",zu=N,wo=oe?";":":",Wu=Bo,Uu=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),qu=(e,t)=>{const u=t.colon||wo,n=e.match(/\//)||oe&&e.match(/\\/)?[""]:[...oe?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(u)],r=oe?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=oe?r.split(u):[""];return oe&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:r}},Hu=(e,t,u)=>{typeof t=="function"&&(u=t,t={}),t||(t={});const{pathEnv:n,pathExt:r,pathExtExe:o}=qu(e,t),D=[],i=c=>new Promise((f,l)=>{if(c===n.length)return t.all&&D.length?f(D):l(Uu(e));const a=n[c],d=/^".*"$/.test(a)?a.slice(1,-1):a,F=zu.join(d,e),p=!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+F:F;f(s(p,c,0))}),s=(c,f,l)=>new Promise((a,d)=>{if(l===r.length)return a(i(f+1));const F=r[l];Wu(c+F,{pathExt:o},(p,C)=>{if(!p&&C)if(t.all)D.push(c+F);else return a(c+F);return a(s(c,f,l+1))})});return u?i(0).then(c=>u(null,c),u):i(0)},Ao=(e,t)=>{t=t||{};const{pathEnv:u,pathExt:n,pathExtExe:r}=qu(e,t),o=[];for(let D=0;D<u.length;D++){const i=u[D],s=/^".*"$/.test(i)?i.slice(1,-1):i,c=zu.join(s,e),f=!s&&/^\.[\\\/]/.test(e)?e.slice(0,2)+c:c;for(let l=0;l<n.length;l++){const a=f+n[l];try{if(Wu.sync(a,{pathExt:r}))if(t.all)o.push(a);else return a}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw Uu(e)};var vo=Hu;Hu.sync=Ao;var dt={exports:{}};const Ku=(e={})=>{const t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};dt.exports=Ku,dt.exports.default=Ku;var $o=dt.exports;const Ju=N,xo=vo,So=$o;function Vu(e,t){const u=e.options.env||process.env,n=process.cwd(),r=e.options.cwd!=null,o=r&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let D;try{D=xo.sync(e.command,{path:u[So({env:u})],pathExt:t?Ju.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return D&&(D=Ju.resolve(r?e.options.cwd:"",D)),D}function Oo(e){return Vu(e)||Vu(e,!0)}var Io=Oo,Ft={};const pt=/([()\][%!^"`<>&|;, *?])/g;function Mo(e){return e=e.replace(pt,"^$1"),e}function To(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(pt,"^$1"),t&&(e=e.replace(pt,"^$1")),e}Ft.command=Mo,Ft.argument=To;var ko=/^#!(.*)/;const Po=ko;var Ro=(e="")=>{const t=e.match(Po);if(!t)return null;const[u,n]=t[0].replace(/#! ?/,"").split(" "),r=u.split("/").pop();return r==="env"?n:n?`${r} ${n}`:r};const Ct=et,_o=Ro;function jo(e){const u=Buffer.alloc(150);let n;try{n=Ct.openSync(e,"r"),Ct.readSync(n,u,0,150,0),Ct.closeSync(n)}catch{}return _o(u.toString())}var No=jo;const Lo=N,Yu=Io,Zu=Ft,Go=No,zo=process.platform==="win32",Wo=/\.(?:com|exe)$/i,Uo=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function qo(e){e.file=Yu(e);const t=e.file&&Go(e.file);return t?(e.args.unshift(e.file),e.command=t,Yu(e)):e.file}function Ho(e){if(!zo)return e;const t=qo(e),u=!Wo.test(t);if(e.options.forceShell||u){const n=Uo.test(t);e.command=Lo.normalize(e.command),e.command=Zu.command(e.command),e.args=e.args.map(o=>Zu.argument(o,n));const r=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${r}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Ko(e,t,u){t&&!Array.isArray(t)&&(u=t,t=null),t=t?t.slice(0):[],u=Object.assign({},u);const n={command:e,args:t,options:u,file:void 0,original:{command:e,args:t}};return u.shell?n:Ho(n)}var Jo=Ko;const mt=process.platform==="win32";function ht(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function Vo(e,t){if(!mt)return;const u=e.emit;e.emit=function(n,r){if(n==="exit"){const o=Xu(r,t);if(o)return u.call(e,"error",o)}return u.apply(e,arguments)}}function Xu(e,t){return mt&&e===1&&!t.file?ht(t.original,"spawn"):null}function Yo(e,t){return mt&&e===1&&!t.file?ht(t.original,"spawnSync"):null}var Zo={hookChildProcess:Vo,verifyENOENT:Xu,verifyENOENTSync:Yo,notFoundError:ht};const Qu=ND,gt=Jo,Et=Zo;function en(e,t,u){const n=gt(e,t,u),r=Qu.spawn(n.command,n.args,n.options);return Et.hookChildProcess(r,n),r}function Xo(e,t,u){const n=gt(e,t,u),r=Qu.spawnSync(n.command,n.args,n.options);return r.error=r.error||Et.verifyENOENTSync(r.status,n),r}re.exports=en,re.exports.spawn=en,re.exports.sync=Xo,re.exports._parse=gt,re.exports._enoent=Et;var Qo=re.exports,es=De(Qo);function ts(e){const t=typeof e=="string"?`
|
|
23
23
|
`:`
|
|
24
|
-
`.charCodeAt(),u=typeof e=="string"?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===u&&(e=e.slice(0,-1)),e}function
|
|
25
|
-
${t}`,
|
|
26
|
-
${n.message}`:
|
|
27
|
-
`);return
|
|
28
|
-
`)},as=1e3*1e3*100,cs=({env:e,extendEnv:t,preferLocal:u,localDir:n,execPath:r})=>{const o=t?{...P.env,...e}:e;return u?Ko({env:o,cwd:n,execPath:r}):o},ls=(e,t,u={})=>{const n=Wo._parse(e,t,u);return e=n.command,t=n.args,u=n.options,u={maxBuffer:as,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:u.cwd||P.cwd(),execPath:P.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:os,...u},u.env=cs(u),u.stdio=pi(u),P.platform==="win32"&&ue.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:u,parsed:n}},Bt=(e,t,u)=>typeof t!="string"&&!BD.isBuffer(t)?u===void 0?void 0:"":e.stripFinalNewline?Uo(t):t;function J(e,t,u){const n=ls(e,t,u),r=Ds(e,t),o=rs(e,t);ss(o,n.options),Ii(n.options);let D;try{D=uu.spawn(n.file,n.args,n.options)}catch(d){const F=new uu.ChildProcess,C=Promise.reject(Yu({error:d,stdout:"",stderr:"",all:"",command:r,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return Dn(F,C),F}const i=es(D),s=Oi(D,n.options,i),l=Pi(D,n.options,s),f={isCanceled:!1};D.kill=wi.bind(null,D.kill.bind(D)),D.cancel=Si.bind(null,D,f);const c=Hu(async()=>{const[{error:d,exitCode:F,signal:C,timedOut:p},m,w,O]=await Zi(D,n.options,l),E=Bt(n.options,m),y=Bt(n.options,w),b=Bt(n.options,O);if(d||F!==0||C!==null){const v=Yu({error:d,exitCode:F,signal:C,stdout:E,stderr:y,all:b,command:r,escapedCommand:o,parsed:n,timedOut:p,isCanceled:f.isCanceled||(n.options.signal?n.options.signal.aborted:!1),killed:D.killed});if(!n.options.reject)return v;throw v}return{command:r,escapedCommand:o,exitCode:0,stdout:E,stderr:y,all:b,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return Vi(D,n.options),D.all=Yi(D,n.options),Mi(D),Dn(D,c),D}let Q=!0;const se=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let pe=0;if(se.process&&se.process.env&&se.process.stdout){const{FORCE_COLOR:e,NODE_DISABLE_COLORS:t,NO_COLOR:u,TERM:n,COLORTERM:r}=se.process.env;t||u||e==="0"?Q=!1:e==="1"||e==="2"||e==="3"?Q=!0:n==="dumb"?Q=!1:"CI"in se.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in se.process.env)?Q=!0:Q=process.stdout.isTTY,Q&&(process.platform==="win32"||r&&(r==="truecolor"||r==="24bit")?pe=3:n&&(n.endsWith("-256color")||n.endsWith("256"))?pe=2:pe=1)}let on={enabled:Q,supportLevel:pe};function ee(e,t,u=1){const n=`\x1B[${e}m`,r=`\x1B[${t}m`,o=new RegExp(`\\x1b\\[${t}m`,"g");return D=>on.enabled&&on.supportLevel>=u?n+(""+D).replace(o,n)+r:""+D}const Ce=ee(2,22),fs=ee(30,39),wt=ee(31,39),Le=ee(32,39),ds=ee(35,39),Fs=ee(90,39),ps=ee(46,49),vt="\x1B",T=`${vt}[`,Cs="\x07",At={to(e,t){return t?`${T}${t+1};${e+1}H`:`${T}${e+1}G`},move(e,t){let u="";return e<0?u+=`${T}${-e}D`:e>0&&(u+=`${T}${e}C`),t<0?u+=`${T}${-t}A`:t>0&&(u+=`${T}${t}B`),u},up:(e=1)=>`${T}${e}A`,down:(e=1)=>`${T}${e}B`,forward:(e=1)=>`${T}${e}C`,backward:(e=1)=>`${T}${e}D`,nextLine:(e=1)=>`${T}E`.repeat(e),prevLine:(e=1)=>`${T}F`.repeat(e),left:`${T}G`,hide:`${T}?25l`,show:`${T}?25h`,save:`${vt}7`,restore:`${vt}8`},ms={up:(e=1)=>`${T}S`.repeat(e),down:(e=1)=>`${T}T`.repeat(e)},hs={screen:`${T}2J`,up:(e=1)=>`${T}1J`.repeat(e),down:(e=1)=>`${T}J`.repeat(e),line:`${T}2K`,lineEnd:`${T}K`,lineStart:`${T}1K`,lines(e){let t="";for(let u=0;u<e;u++)t+=this.line+(u<e-1?At.up():"");return e&&(t+=At.left),t}};var q={cursor:At,scroll:ms,erase:hs,beep:Cs},$t={exports:{}};let Ne=process||{},sn=Ne.argv||[],Ge=Ne.env||{},Es=!(Ge.NO_COLOR||sn.includes("--no-color"))&&(!!Ge.FORCE_COLOR||sn.includes("--color")||Ne.platform==="win32"||(Ne.stdout||{}).isTTY&&Ge.TERM!=="dumb"||!!Ge.CI),gs=(e,t,u=e)=>n=>{let r=""+n,o=r.indexOf(t,e.length);return~o?e+ys(r,t,u,o)+t:e+r+t},ys=(e,t,u,n)=>{let r="",o=0;do r+=e.substring(o,n)+u,o=n+t.length,n=e.indexOf(t,o);while(~n);return r+e.substring(o)},an=(e=Es)=>{let t=e?gs:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};$t.exports=an(),$t.exports.createColors=an;var bs=$t.exports,g=ne(bs);function Bs({onlyFirst:e=!1}={}){const t=["[\\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(t,e?void 0:"g")}const ws=Bs();function cn(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(ws,"")}function ln(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fn={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(n){var r=n.charCodeAt(0),o=n.length==2?n.charCodeAt(1):0,D=r;return 55296<=r&&r<=56319&&56320<=o&&o<=57343&&(r&=1023,o&=1023,D=r<<10|o,D+=65536),D==12288||65281<=D&&D<=65376||65504<=D&&D<=65510?"F":D==8361||65377<=D&&D<=65470||65474<=D&&D<=65479||65482<=D&&D<=65487||65490<=D&&D<=65495||65498<=D&&D<=65500||65512<=D&&D<=65518?"H":4352<=D&&D<=4447||4515<=D&&D<=4519||4602<=D&&D<=4607||9001<=D&&D<=9002||11904<=D&&D<=11929||11931<=D&&D<=12019||12032<=D&&D<=12245||12272<=D&&D<=12283||12289<=D&&D<=12350||12353<=D&&D<=12438||12441<=D&&D<=12543||12549<=D&&D<=12589||12593<=D&&D<=12686||12688<=D&&D<=12730||12736<=D&&D<=12771||12784<=D&&D<=12830||12832<=D&&D<=12871||12880<=D&&D<=13054||13056<=D&&D<=19903||19968<=D&&D<=42124||42128<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||55216<=D&&D<=55238||55243<=D&&D<=55291||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65106||65108<=D&&D<=65126||65128<=D&&D<=65131||110592<=D&&D<=110593||127488<=D&&D<=127490||127504<=D&&D<=127546||127552<=D&&D<=127560||127568<=D&&D<=127569||131072<=D&&D<=194367||177984<=D&&D<=196605||196608<=D&&D<=262141?"W":32<=D&&D<=126||162<=D&&D<=163||165<=D&&D<=166||D==172||D==175||10214<=D&&D<=10221||10629<=D&&D<=10630?"Na":D==161||D==164||167<=D&&D<=168||D==170||173<=D&&D<=174||176<=D&&D<=180||182<=D&&D<=186||188<=D&&D<=191||D==198||D==208||215<=D&&D<=216||222<=D&&D<=225||D==230||232<=D&&D<=234||236<=D&&D<=237||D==240||242<=D&&D<=243||247<=D&&D<=250||D==252||D==254||D==257||D==273||D==275||D==283||294<=D&&D<=295||D==299||305<=D&&D<=307||D==312||319<=D&&D<=322||D==324||328<=D&&D<=331||D==333||338<=D&&D<=339||358<=D&&D<=359||D==363||D==462||D==464||D==466||D==468||D==470||D==472||D==474||D==476||D==593||D==609||D==708||D==711||713<=D&&D<=715||D==717||D==720||728<=D&&D<=731||D==733||D==735||768<=D&&D<=879||913<=D&&D<=929||931<=D&&D<=937||945<=D&&D<=961||963<=D&&D<=969||D==1025||1040<=D&&D<=1103||D==1105||D==8208||8211<=D&&D<=8214||8216<=D&&D<=8217||8220<=D&&D<=8221||8224<=D&&D<=8226||8228<=D&&D<=8231||D==8240||8242<=D&&D<=8243||D==8245||D==8251||D==8254||D==8308||D==8319||8321<=D&&D<=8324||D==8364||D==8451||D==8453||D==8457||D==8467||D==8470||8481<=D&&D<=8482||D==8486||D==8491||8531<=D&&D<=8532||8539<=D&&D<=8542||8544<=D&&D<=8555||8560<=D&&D<=8569||D==8585||8592<=D&&D<=8601||8632<=D&&D<=8633||D==8658||D==8660||D==8679||D==8704||8706<=D&&D<=8707||8711<=D&&D<=8712||D==8715||D==8719||D==8721||D==8725||D==8730||8733<=D&&D<=8736||D==8739||D==8741||8743<=D&&D<=8748||D==8750||8756<=D&&D<=8759||8764<=D&&D<=8765||D==8776||D==8780||D==8786||8800<=D&&D<=8801||8804<=D&&D<=8807||8810<=D&&D<=8811||8814<=D&&D<=8815||8834<=D&&D<=8835||8838<=D&&D<=8839||D==8853||D==8857||D==8869||D==8895||D==8978||9312<=D&&D<=9449||9451<=D&&D<=9547||9552<=D&&D<=9587||9600<=D&&D<=9615||9618<=D&&D<=9621||9632<=D&&D<=9633||9635<=D&&D<=9641||9650<=D&&D<=9651||9654<=D&&D<=9655||9660<=D&&D<=9661||9664<=D&&D<=9665||9670<=D&&D<=9672||D==9675||9678<=D&&D<=9681||9698<=D&&D<=9701||D==9711||9733<=D&&D<=9734||D==9737||9742<=D&&D<=9743||9748<=D&&D<=9749||D==9756||D==9758||D==9792||D==9794||9824<=D&&D<=9825||9827<=D&&D<=9829||9831<=D&&D<=9834||9836<=D&&D<=9837||D==9839||9886<=D&&D<=9887||9918<=D&&D<=9919||9924<=D&&D<=9933||9935<=D&&D<=9953||D==9955||9960<=D&&D<=9983||D==10045||D==10071||10102<=D&&D<=10111||11093<=D&&D<=11097||12872<=D&&D<=12879||57344<=D&&D<=63743||65024<=D&&D<=65039||D==65533||127232<=D&&D<=127242||127248<=D&&D<=127277||127280<=D&&D<=127337||127344<=D&&D<=127386||917760<=D&&D<=917999||983040<=D&&D<=1048573||1048576<=D&&D<=1114109?"A":"N"},t.characterLength=function(n){var r=this.eastAsianWidth(n);return r=="F"||r=="W"||r=="A"?2:1};function u(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(n){for(var r=u(n),o=0,D=0;D<r.length;D++)o=o+this.characterLength(r[D]);return o},t.slice=function(n,r,o){textLen=t.length(n),r=r||0,o=o||1,r<0&&(r=textLen+r),o<0&&(o=textLen+o);for(var D="",i=0,s=u(n),l=0;l<s.length;l++){var f=s[l],a=t.length(f);if(i>=r-(a==2?1:0))if(i+a<=o)D+=f;else break;i+=a}return D}})(fn);var vs=fn.exports;const As=ln(vs);var $s=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};const xs=ln($s);function me(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=cn(e),e.length===0))return 0;e=e.replace(xs()," ");const u=t.ambiguousIsNarrow?1:2;let n=0;for(const r of e){const o=r.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(As.eastAsianWidth(r)){case"F":case"W":n+=2;break;case"A":n+=u;break;default:n+=1}}return n}const xt=10,dn=(e=0)=>t=>`\x1B[${t+e}m`,Fn=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,pn=(e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}m`,S={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(S.modifier);const Ss=Object.keys(S.color),Ts=Object.keys(S.bgColor);[...Ss,...Ts];function Os(){const e=new Map;for(const[t,u]of Object.entries(S)){for(const[n,r]of Object.entries(u))S[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},u[n]=S[n],e.set(r[0],r[1]);Object.defineProperty(S,t,{value:u,enumerable:!1})}return Object.defineProperty(S,"codes",{value:e,enumerable:!1}),S.color.close="\x1B[39m",S.bgColor.close="\x1B[49m",S.color.ansi=dn(),S.color.ansi256=Fn(),S.color.ansi16m=pn(),S.bgColor.ansi=dn(xt),S.bgColor.ansi256=Fn(xt),S.bgColor.ansi16m=pn(xt),Object.defineProperties(S,{rgbToAnsi256:{value:(t,u,n)=>t===u&&u===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(u/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{const u=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!u)return[0,0,0];let[n]=u;n.length===3&&(n=[...n].map(o=>o+o).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>S.rgbToAnsi256(...S.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let u,n,r;if(t>=232)u=((t-232)*10+8)/255,n=u,r=u;else{t-=16;const i=t%36;u=Math.floor(t/36)/5,n=Math.floor(i/6)/5,r=i%6/5}const o=Math.max(u,n,r)*2;if(o===0)return 30;let D=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(u));return o===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(t,u,n)=>S.ansi256ToAnsi(S.rgbToAnsi256(t,u,n)),enumerable:!1},hexToAnsi:{value:t=>S.ansi256ToAnsi(S.hexToAnsi256(t)),enumerable:!1}}),S}const Is=Os(),ze=new Set(["\x1B","\x9B"]),Ps=39,St="\x07",Cn="[",ks="]",mn="m",Tt=`${ks}8;;`,hn=e=>`${ze.values().next().value}${Cn}${e}${mn}`,En=e=>`${ze.values().next().value}${Tt}${e}${St}`,Ms=e=>e.split(" ").map(t=>me(t)),Ot=(e,t,u)=>{const n=[...t];let r=!1,o=!1,D=me(cn(e[e.length-1]));for(const[i,s]of n.entries()){const l=me(s);if(D+l<=u?e[e.length-1]+=s:(e.push(s),D=0),ze.has(s)&&(r=!0,o=n.slice(i+1).join("").startsWith(Tt)),r){o?s===St&&(r=!1,o=!1):s===mn&&(r=!1);continue}D+=l,D===u&&i<n.length-1&&(e.push(""),D=0)}!D&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Rs=e=>{const t=e.split(" ");let u=t.length;for(;u>0&&!(me(t[u-1])>0);)u--;return u===t.length?e:t.slice(0,u).join(" ")+t.slice(u).join("")},js=(e,t,u={})=>{if(u.trim!==!1&&e.trim()==="")return"";let n="",r,o;const D=Ms(e);let i=[""];for(const[l,f]of e.split(" ").entries()){u.trim!==!1&&(i[i.length-1]=i[i.length-1].trimStart());let a=me(i[i.length-1]);if(l!==0&&(a>=t&&(u.wordWrap===!1||u.trim===!1)&&(i.push(""),a=0),(a>0||u.trim===!1)&&(i[i.length-1]+=" ",a++)),u.hard&&D[l]>t){const c=t-a,d=1+Math.floor((D[l]-c-1)/t);Math.floor((D[l]-1)/t)<d&&i.push(""),Ot(i,f,t);continue}if(a+D[l]>t&&a>0&&D[l]>0){if(u.wordWrap===!1&&a<t){Ot(i,f,t);continue}i.push("")}if(a+D[l]>t&&u.wordWrap===!1){Ot(i,f,t);continue}i[i.length-1]+=f}u.trim!==!1&&(i=i.map(l=>Rs(l)));const s=[...i.join(`
|
|
29
|
-
`)];for(const[
|
|
30
|
-
`?(o&&(n+=
|
|
31
|
-
`&&(r&&
|
|
24
|
+
`.charCodeAt(),u=typeof e=="string"?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===u&&(e=e.slice(0,-1)),e}function tn(e={}){const{env:t=process.env,platform:u=process.platform}=e;return u!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"}const us=({cwd:e=M.cwd(),path:t=M.env[tn()],preferLocal:u=!0,execPath:n=M.execPath,addExecPath:r=!0}={})=>{const o=e instanceof URL?fu(e):e,D=ne.resolve(o),i=[];return u&&ns(i,D),r&&Ds(i,n,D),[...i,t].join(ne.delimiter)},ns=(e,t)=>{let u;for(;u!==t;)e.push(ne.join(t,"node_modules/.bin")),u=t,t=ne.resolve(t,"..")},Ds=(e,t,u)=>{const n=t instanceof URL?fu(t):t;e.push(ne.resolve(u,n,".."))},rs=({env:e=M.env,...t}={})=>{e={...e};const u=tn({env:e});return t.path=e[u],e[u]=us(t),e},os=(e,t,u,n)=>{if(u==="length"||u==="prototype"||u==="arguments"||u==="caller")return;const r=Object.getOwnPropertyDescriptor(e,u),o=Object.getOwnPropertyDescriptor(t,u);!ss(r,o)&&n||Object.defineProperty(e,u,o)},ss=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},is=(e,t)=>{const u=Object.getPrototypeOf(t);u!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,u)},as=(e,t)=>`/* Wrapped ${e}*/
|
|
25
|
+
${t}`,cs=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),ls=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),fs=(e,t,u)=>{const n=u===""?"":`with ${u.trim()}() `,r=as.bind(null,n,t.toString());Object.defineProperty(r,"name",ls),Object.defineProperty(e,"toString",{...cs,value:r})};function ds(e,t,{ignoreNonConfigurable:u=!1}={}){const{name:n}=e;for(const r of Reflect.ownKeys(t))os(e,t,r,u);return is(e,t),fs(e,t,n),e}const Re=new WeakMap,un=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let u,n=0;const r=e.displayName||e.name||"<anonymous>",o=function(...D){if(Re.set(o,++n),n===1)u=e.apply(this,D),e=null;else if(t.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return u};return ds(o,e),Re.set(o,n),o};un.callCount=e=>{if(!Re.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Re.get(e)};const Fs=()=>{const e=Dn-nn+1;return Array.from({length:e},ps)},ps=(e,t)=>({name:`SIGRT${t+1}`,number:nn+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),nn=34,Dn=64,Cs=[{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"}],rn=()=>{const e=Fs();return[...Cs,...e].map(ms)},ms=({name:e,number:t,description:u,action:n,forced:r=!1,standard:o})=>{const{signals:{[e]:D}}=du,i=D!==void 0;return{name:e,number:i?D:t,description:u,supported:i,action:n,forced:r,standard:o}},hs=()=>{const e=rn();return Object.fromEntries(e.map(gs))},gs=({name:e,number:t,description:u,supported:n,action:r,forced:o,standard:D})=>[e,{name:e,number:t,description:u,supported:n,action:r,forced:o,standard:D}],Es=hs(),ys=()=>{const e=rn(),t=Dn+1,u=Array.from({length:t},(n,r)=>Bs(r,e));return Object.assign({},...u)},Bs=(e,t)=>{const u=bs(e,t);if(u===void 0)return{};const{name:n,description:r,supported:o,action:D,forced:i,standard:s}=u;return{[e]:{name:n,number:e,description:r,supported:o,action:D,forced:i,standard:s}}},bs=(e,t)=>{const u=t.find(({name:n})=>du.signals[n]===e);return u!==void 0?u:t.find(n=>n.number===e)};ys();const ws=({timedOut:e,timeout:t,errorCode:u,signal:n,signalDescription:r,exitCode:o,isCanceled:D})=>e?`timed out after ${t} milliseconds`:D?"was canceled":u!==void 0?`failed with ${u}`:n!==void 0?`was killed with ${n} (${r})`:o!==void 0?`failed with exit code ${o}`:"failed",on=({stdout:e,stderr:t,all:u,error:n,signal:r,exitCode:o,command:D,escapedCommand:i,timedOut:s,isCanceled:c,killed:f,parsed:{options:{timeout:l,cwd:a=M.cwd()}}})=>{o=o===null?void 0:o,r=r===null?void 0:r;const d=r===void 0?void 0:Es[r].description,F=n&&n.code,C=`Command ${ws({timedOut:s,timeout:l,errorCode:F,signal:r,signalDescription:d,exitCode:o,isCanceled:c})}: ${D}`,h=Object.prototype.toString.call(n)==="[object Error]",y=h?`${C}
|
|
26
|
+
${n.message}`:C,A=[y,t,e].filter(Boolean).join(`
|
|
27
|
+
`);return h?(n.originalMessage=n.message,n.message=A):n=new Error(A),n.shortMessage=y,n.command=D,n.escapedCommand=i,n.exitCode=o,n.signal=r,n.signalDescription=d,n.stdout=e,n.stderr=t,n.cwd=a,u!==void 0&&(n.all=u),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!s,n.isCanceled=c,n.killed=f&&!s,n},_e=["stdin","stdout","stderr"],As=e=>_e.some(t=>e[t]!==void 0),vs=e=>{if(!e)return;const{stdio:t}=e;if(t===void 0)return _e.map(n=>e[n]);if(As(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${_e.map(n=>`\`${n}\``).join(", ")}`);if(typeof t=="string")return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);const u=Math.max(t.length,_e.length);return Array.from({length:u},(n,r)=>t[r])};var se={exports:{}},je={exports:{}};je.exports;var sn;function $s(){return sn||(sn=1,function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}(je)),je.exports}var S=k.process;const ee=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};if(!ee(S))se.exports=function(){return function(){}};else{var xs=Fu,pe=$s(),Ss=/^win/i.test(S.platform),Ne=pu;typeof Ne!="function"&&(Ne=Ne.EventEmitter);var R;S.__signal_exit_emitter__?R=S.__signal_exit_emitter__:(R=S.__signal_exit_emitter__=new Ne,R.count=0,R.emitted={}),R.infinite||(R.setMaxListeners(1/0),R.infinite=!0),se.exports=function(e,t){if(!ee(k.process))return function(){};xs.equal(typeof e,"function","a callback must be provided for exit handler"),Ce===!1&&an();var u="exit";t&&t.alwaysLast&&(u="afterexit");var n=function(){R.removeListener(u,e),R.listeners("exit").length===0&&R.listeners("afterexit").length===0&&yt()};return R.on(u,e),n};var yt=function(){!Ce||!ee(k.process)||(Ce=!1,pe.forEach(function(t){try{S.removeListener(t,Bt[t])}catch{}}),S.emit=bt,S.reallyExit=cn,R.count-=1)};se.exports.unload=yt;var ie=function(t,u,n){R.emitted[t]||(R.emitted[t]=!0,R.emit(t,u,n))},Bt={};pe.forEach(function(e){Bt[e]=function(){if(ee(k.process)){var u=S.listeners(e);u.length===R.count&&(yt(),ie("exit",null,e),ie("afterexit",null,e),Ss&&e==="SIGHUP"&&(e="SIGINT"),S.kill(S.pid,e))}}}),se.exports.signals=function(){return pe};var Ce=!1,an=function(){Ce||!ee(k.process)||(Ce=!0,R.count+=1,pe=pe.filter(function(t){try{return S.on(t,Bt[t]),!0}catch{return!1}}),S.emit=Is,S.reallyExit=Os)};se.exports.load=an;var cn=S.reallyExit,Os=function(t){ee(k.process)&&(S.exitCode=t||0,ie("exit",S.exitCode,null),ie("afterexit",S.exitCode,null),cn.call(S,S.exitCode))},bt=S.emit,Is=function(t,u){if(t==="exit"&&ee(k.process)){u!==void 0&&(S.exitCode=u);var n=bt.apply(this,arguments);return ie("exit",S.exitCode,null),ie("afterexit",S.exitCode,null),n}else return bt.apply(this,arguments)}}var Ms=se.exports,Ts=De(Ms);const ks=1e3*5,Ps=(e,t="SIGTERM",u={})=>{const n=e(t);return Rs(e,t,u,n),n},Rs=(e,t,u,n)=>{if(!_s(t,u,n))return;const r=Ns(u),o=setTimeout(()=>{e("SIGKILL")},r);o.unref&&o.unref()},_s=(e,{forceKillAfterTimeout:t},u)=>js(e)&&t!==!1&&u,js=e=>e===LD.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",Ns=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return ks;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Ls=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Gs=(e,t,u)=>{e.kill(t),u(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},zs=(e,{timeout:t,killSignal:u="SIGTERM"},n)=>{if(t===0||t===void 0)return n;let r;const o=new Promise((i,s)=>{r=setTimeout(()=>{Gs(e,u,s)},t)}),D=n.finally(()=>{clearTimeout(r)});return Promise.race([o,D])},Ws=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},Us=async(e,{cleanup:t,detached:u},n)=>{if(!t||u)return n;const r=Ts(()=>{e.kill()});return n.finally(()=>{r()})};function ln(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"}function fn(e){return ln(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object"}const qs=e=>e instanceof RD&&typeof e.then=="function",wt=(e,t,u)=>{if(typeof u=="string")return e[t].pipe(GD(u)),e;if(fn(u))return e[t].pipe(u),e;if(!qs(u))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!fn(u.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(u.stdin),u},Hs=e=>{e.stdout!==null&&(e.pipeStdout=wt.bind(void 0,e,"stdout")),e.stderr!==null&&(e.pipeStderr=wt.bind(void 0,e,"stderr")),e.all!==void 0&&(e.pipeAll=wt.bind(void 0,e,"all"))};var me={exports:{}};const{PassThrough:Ks}=tt;var Js=e=>{e={...e};const{array:t}=e;let{encoding:u}=e;const n=u==="buffer";let r=!1;t?r=!(u||n):u=u||"utf8",n&&(u=null);const o=new Ks({objectMode:r});u&&o.setEncoding(u);let D=0;const i=[];return o.on("data",s=>{i.push(s),r?D=i.length:D+=s.length}),o.getBufferedValue=()=>t?i:n?Buffer.concat(i,D):i.join(""),o.getBufferedLength=()=>D,o};const{constants:Vs}=WD,Ys=tt,{promisify:Zs}=Cu,Xs=Js,Qs=Zs(Ys.pipeline);class dn extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function At(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:u}=t,n=Xs(t);return await new Promise((r,o)=>{const D=i=>{i&&n.getBufferedLength()<=Vs.MAX_LENGTH&&(i.bufferedData=n.getBufferedValue()),o(i)};(async()=>{try{await Qs(e,n),r()}catch(i){D(i)}})(),n.on("data",()=>{n.getBufferedLength()>u&&D(new dn)})}),n.getBufferedValue()}me.exports=At,me.exports.buffer=(e,t)=>At(e,{...t,encoding:"buffer"}),me.exports.array=(e,t)=>At(e,{...t,array:!0}),me.exports.MaxBufferError=dn;var ei=me.exports,Fn=De(ei);const{PassThrough:ti}=tt;var ui=function(){var e=[],t=new ti({objectMode:!0});return t.setMaxListeners(0),t.add=u,t.isEmpty=n,t.on("unpipe",r),Array.prototype.slice.call(arguments).forEach(u),t;function u(o){return Array.isArray(o)?(o.forEach(u),this):(e.push(o),o.once("end",r.bind(null,o)),o.once("error",t.emit.bind(t,"error")),o.pipe(t,{end:!1}),this)}function n(){return e.length==0}function r(o){e=e.filter(function(D){return D!==o}),!e.length&&t.readable&&t.end()}},ni=De(ui);const Di=e=>{if(e!==void 0)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},ri=({input:e,inputFile:t})=>typeof t!="string"?e:(Di(e),zD(t)),oi=(e,t)=>{const u=ri(t);u!==void 0&&(ln(u)?u.pipe(e.stdin):e.stdin.end(u))},si=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const u=ni();return e.stdout&&u.add(e.stdout),e.stderr&&u.add(e.stderr),u},vt=async(e,t)=>{if(!(!e||t===void 0)){e.destroy();try{return await t}catch(u){return u.bufferedData}}},$t=(e,{encoding:t,buffer:u,maxBuffer:n})=>{if(!(!e||!u))return t?Fn(e,{encoding:t,maxBuffer:n}):Fn.buffer(e,{maxBuffer:n})},ii=async({stdout:e,stderr:t,all:u},{encoding:n,buffer:r,maxBuffer:o},D)=>{const i=$t(e,{encoding:n,buffer:r,maxBuffer:o}),s=$t(t,{encoding:n,buffer:r,maxBuffer:o}),c=$t(u,{encoding:n,buffer:r,maxBuffer:o*2});try{return await Promise.all([D,i,s,c])}catch(f){return Promise.all([{error:f,signal:f.signal,timedOut:f.timedOut},vt(e,i),vt(t,s),vt(u,c)])}},ai=(async()=>{})().constructor.prototype,ci=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(ai,e)]),pn=(e,t)=>{for(const[u,n]of ci){const r=typeof t=="function"?(...o)=>Reflect.apply(n.value,t(),o):n.value.bind(t);Reflect.defineProperty(e,u,{...n,value:r})}},li=e=>new Promise((t,u)=>{e.on("exit",(n,r)=>{t({exitCode:n,signal:r})}),e.on("error",n=>{u(n)}),e.stdin&&e.stdin.on("error",n=>{u(n)})}),Cn=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],fi=/^[\w.-]+$/,di=/"/g,Fi=e=>typeof e!="string"||fi.test(e)?e:`"${e.replace(di,'\\"')}"`,pi=(e,t)=>Cn(e,t).join(" "),Ci=(e,t)=>Cn(e,t).map(u=>Fi(u)).join(" "),mi=UD("execa").enabled,Le=(e,t)=>String(e).padStart(t,"0"),hi=()=>{const e=new Date;return`${Le(e.getHours(),2)}:${Le(e.getMinutes(),2)}:${Le(e.getSeconds(),2)}.${Le(e.getMilliseconds(),3)}`},gi=(e,{verbose:t})=>{t&&M.stderr.write(`[${hi()}] ${e}
|
|
28
|
+
`)},Ei=1e3*1e3*100,yi=({env:e,extendEnv:t,preferLocal:u,localDir:n,execPath:r})=>{const o=t?{...M.env,...e}:e;return u?rs({env:o,cwd:n,execPath:r}):o},Bi=(e,t,u={})=>{const n=es._parse(e,t,u);return e=n.command,t=n.args,u=n.options,u={maxBuffer:Ei,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:u.cwd||M.cwd(),execPath:M.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:mi,...u},u.env=yi(u),u.stdio=vs(u),M.platform==="win32"&&ne.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:u,parsed:n}},xt=(e,t,u)=>typeof t!="string"&&!PD.isBuffer(t)?u===void 0?void 0:"":e.stripFinalNewline?ts(t):t;function U(e,t,u){const n=Bi(e,t,u),r=pi(e,t),o=Ci(e,t);gi(o,n.options),Ws(n.options);let D;try{D=lu.spawn(n.file,n.args,n.options)}catch(d){const F=new lu.ChildProcess,p=Promise.reject(on({error:d,stdout:"",stderr:"",all:"",command:r,escapedCommand:o,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return pn(F,p),F}const i=li(D),s=zs(D,n.options,i),c=Us(D,n.options,s),f={isCanceled:!1};D.kill=Ps.bind(null,D.kill.bind(D)),D.cancel=Ls.bind(null,D,f);const a=un(async()=>{const[{error:d,exitCode:F,signal:p,timedOut:C},h,y,A]=await ii(D,n.options,c),_=xt(n.options,h),j=xt(n.options,y),E=xt(n.options,A);if(d||F!==0||p!==null){const v=on({error:d,exitCode:F,signal:p,stdout:_,stderr:j,all:E,command:r,escapedCommand:o,parsed:n,timedOut:C,isCanceled:f.isCanceled||(n.options.signal?n.options.signal.aborted:!1),killed:D.killed});if(!n.options.reject)return v;throw v}return{command:r,escapedCommand:o,exitCode:0,stdout:_,stderr:j,all:E,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return oi(D,n.options),D.all=si(D,n.options),Hs(D),pn(D,a),D}let te=!0;const ae=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let he=0;if(ae.process&&ae.process.env&&ae.process.stdout){const{FORCE_COLOR:e,NODE_DISABLE_COLORS:t,NO_COLOR:u,TERM:n,COLORTERM:r}=ae.process.env;t||u||e==="0"?te=!1:e==="1"||e==="2"||e==="3"?te=!0:n==="dumb"?te=!1:"CI"in ae.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in ae.process.env)?te=!0:te=process.stdout.isTTY,te&&(process.platform==="win32"||r&&(r==="truecolor"||r==="24bit")?he=3:n&&(n.endsWith("-256color")||n.endsWith("256"))?he=2:he=1)}let mn={enabled:te,supportLevel:he};function ue(e,t,u=1){const n=`\x1B[${e}m`,r=`\x1B[${t}m`,o=new RegExp(`\\x1b\\[${t}m`,"g");return D=>mn.enabled&&mn.supportLevel>=u?n+(""+D).replace(o,n)+r:""+D}const ge=ue(2,22),bi=ue(30,39),St=ue(31,39),Ge=ue(32,39),wi=ue(35,39),Ai=ue(90,39),vi=ue(46,49),Ot="\x1B",I=`${Ot}[`,$i="\x07",It={to(e,t){return t?`${I}${t+1};${e+1}H`:`${I}${e+1}G`},move(e,t){let u="";return e<0?u+=`${I}${-e}D`:e>0&&(u+=`${I}${e}C`),t<0?u+=`${I}${-t}A`:t>0&&(u+=`${I}${t}B`),u},up:(e=1)=>`${I}${e}A`,down:(e=1)=>`${I}${e}B`,forward:(e=1)=>`${I}${e}C`,backward:(e=1)=>`${I}${e}D`,nextLine:(e=1)=>`${I}E`.repeat(e),prevLine:(e=1)=>`${I}F`.repeat(e),left:`${I}G`,hide:`${I}?25l`,show:`${I}?25h`,save:`${Ot}7`,restore:`${Ot}8`},xi={up:(e=1)=>`${I}S`.repeat(e),down:(e=1)=>`${I}T`.repeat(e)},Si={screen:`${I}2J`,up:(e=1)=>`${I}1J`.repeat(e),down:(e=1)=>`${I}J`.repeat(e),line:`${I}2K`,lineEnd:`${I}K`,lineStart:`${I}1K`,lines(e){let t="";for(let u=0;u<e;u++)t+=this.line+(u<e-1?It.up():"");return e&&(t+=It.left),t}};var q={cursor:It,scroll:xi,erase:Si,beep:$i},Mt={exports:{}};let ze=process||{},hn=ze.argv||[],We=ze.env||{},Oi=!(We.NO_COLOR||hn.includes("--no-color"))&&(!!We.FORCE_COLOR||hn.includes("--color")||ze.platform==="win32"||(ze.stdout||{}).isTTY&&We.TERM!=="dumb"||!!We.CI),Ii=(e,t,u=e)=>n=>{let r=""+n,o=r.indexOf(t,e.length);return~o?e+Mi(r,t,u,o)+t:e+r+t},Mi=(e,t,u,n)=>{let r="",o=0;do r+=e.substring(o,n)+u,o=n+t.length,n=e.indexOf(t,o);while(~n);return r+e.substring(o)},gn=(e=Oi)=>{let t=e?Ii:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Mt.exports=gn(),Mt.exports.createColors=gn;var Ti=Mt.exports,b=De(Ti);function ki({onlyFirst:e=!1}={}){const t=["[\\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(t,e?void 0:"g")}const Pi=ki();function En(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Pi,"")}function yn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bn={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(n){var r=n.charCodeAt(0),o=n.length==2?n.charCodeAt(1):0,D=r;return 55296<=r&&r<=56319&&56320<=o&&o<=57343&&(r&=1023,o&=1023,D=r<<10|o,D+=65536),D==12288||65281<=D&&D<=65376||65504<=D&&D<=65510?"F":D==8361||65377<=D&&D<=65470||65474<=D&&D<=65479||65482<=D&&D<=65487||65490<=D&&D<=65495||65498<=D&&D<=65500||65512<=D&&D<=65518?"H":4352<=D&&D<=4447||4515<=D&&D<=4519||4602<=D&&D<=4607||9001<=D&&D<=9002||11904<=D&&D<=11929||11931<=D&&D<=12019||12032<=D&&D<=12245||12272<=D&&D<=12283||12289<=D&&D<=12350||12353<=D&&D<=12438||12441<=D&&D<=12543||12549<=D&&D<=12589||12593<=D&&D<=12686||12688<=D&&D<=12730||12736<=D&&D<=12771||12784<=D&&D<=12830||12832<=D&&D<=12871||12880<=D&&D<=13054||13056<=D&&D<=19903||19968<=D&&D<=42124||42128<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||55216<=D&&D<=55238||55243<=D&&D<=55291||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65106||65108<=D&&D<=65126||65128<=D&&D<=65131||110592<=D&&D<=110593||127488<=D&&D<=127490||127504<=D&&D<=127546||127552<=D&&D<=127560||127568<=D&&D<=127569||131072<=D&&D<=194367||177984<=D&&D<=196605||196608<=D&&D<=262141?"W":32<=D&&D<=126||162<=D&&D<=163||165<=D&&D<=166||D==172||D==175||10214<=D&&D<=10221||10629<=D&&D<=10630?"Na":D==161||D==164||167<=D&&D<=168||D==170||173<=D&&D<=174||176<=D&&D<=180||182<=D&&D<=186||188<=D&&D<=191||D==198||D==208||215<=D&&D<=216||222<=D&&D<=225||D==230||232<=D&&D<=234||236<=D&&D<=237||D==240||242<=D&&D<=243||247<=D&&D<=250||D==252||D==254||D==257||D==273||D==275||D==283||294<=D&&D<=295||D==299||305<=D&&D<=307||D==312||319<=D&&D<=322||D==324||328<=D&&D<=331||D==333||338<=D&&D<=339||358<=D&&D<=359||D==363||D==462||D==464||D==466||D==468||D==470||D==472||D==474||D==476||D==593||D==609||D==708||D==711||713<=D&&D<=715||D==717||D==720||728<=D&&D<=731||D==733||D==735||768<=D&&D<=879||913<=D&&D<=929||931<=D&&D<=937||945<=D&&D<=961||963<=D&&D<=969||D==1025||1040<=D&&D<=1103||D==1105||D==8208||8211<=D&&D<=8214||8216<=D&&D<=8217||8220<=D&&D<=8221||8224<=D&&D<=8226||8228<=D&&D<=8231||D==8240||8242<=D&&D<=8243||D==8245||D==8251||D==8254||D==8308||D==8319||8321<=D&&D<=8324||D==8364||D==8451||D==8453||D==8457||D==8467||D==8470||8481<=D&&D<=8482||D==8486||D==8491||8531<=D&&D<=8532||8539<=D&&D<=8542||8544<=D&&D<=8555||8560<=D&&D<=8569||D==8585||8592<=D&&D<=8601||8632<=D&&D<=8633||D==8658||D==8660||D==8679||D==8704||8706<=D&&D<=8707||8711<=D&&D<=8712||D==8715||D==8719||D==8721||D==8725||D==8730||8733<=D&&D<=8736||D==8739||D==8741||8743<=D&&D<=8748||D==8750||8756<=D&&D<=8759||8764<=D&&D<=8765||D==8776||D==8780||D==8786||8800<=D&&D<=8801||8804<=D&&D<=8807||8810<=D&&D<=8811||8814<=D&&D<=8815||8834<=D&&D<=8835||8838<=D&&D<=8839||D==8853||D==8857||D==8869||D==8895||D==8978||9312<=D&&D<=9449||9451<=D&&D<=9547||9552<=D&&D<=9587||9600<=D&&D<=9615||9618<=D&&D<=9621||9632<=D&&D<=9633||9635<=D&&D<=9641||9650<=D&&D<=9651||9654<=D&&D<=9655||9660<=D&&D<=9661||9664<=D&&D<=9665||9670<=D&&D<=9672||D==9675||9678<=D&&D<=9681||9698<=D&&D<=9701||D==9711||9733<=D&&D<=9734||D==9737||9742<=D&&D<=9743||9748<=D&&D<=9749||D==9756||D==9758||D==9792||D==9794||9824<=D&&D<=9825||9827<=D&&D<=9829||9831<=D&&D<=9834||9836<=D&&D<=9837||D==9839||9886<=D&&D<=9887||9918<=D&&D<=9919||9924<=D&&D<=9933||9935<=D&&D<=9953||D==9955||9960<=D&&D<=9983||D==10045||D==10071||10102<=D&&D<=10111||11093<=D&&D<=11097||12872<=D&&D<=12879||57344<=D&&D<=63743||65024<=D&&D<=65039||D==65533||127232<=D&&D<=127242||127248<=D&&D<=127277||127280<=D&&D<=127337||127344<=D&&D<=127386||917760<=D&&D<=917999||983040<=D&&D<=1048573||1048576<=D&&D<=1114109?"A":"N"},t.characterLength=function(n){var r=this.eastAsianWidth(n);return r=="F"||r=="W"||r=="A"?2:1};function u(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(n){for(var r=u(n),o=0,D=0;D<r.length;D++)o=o+this.characterLength(r[D]);return o},t.slice=function(n,r,o){textLen=t.length(n),r=r||0,o=o||1,r<0&&(r=textLen+r),o<0&&(o=textLen+o);for(var D="",i=0,s=u(n),c=0;c<s.length;c++){var f=s[c],l=t.length(f);if(i>=r-(l==2?1:0))if(i+l<=o)D+=f;else break;i+=l}return D}})(Bn);var Ri=Bn.exports;const _i=yn(Ri);var ji=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};const Ni=yn(ji);function Ee(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=En(e),e.length===0))return 0;e=e.replace(Ni()," ");const u=t.ambiguousIsNarrow?1:2;let n=0;for(const r of e){const o=r.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(_i.eastAsianWidth(r)){case"F":case"W":n+=2;break;case"A":n+=u;break;default:n+=1}}return n}const Tt=10,bn=(e=0)=>t=>`\x1B[${t+e}m`,wn=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,An=(e=0)=>(t,u,n)=>`\x1B[${38+e};2;${t};${u};${n}m`,O={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(O.modifier);const Li=Object.keys(O.color),Gi=Object.keys(O.bgColor);[...Li,...Gi];function zi(){const e=new Map;for(const[t,u]of Object.entries(O)){for(const[n,r]of Object.entries(u))O[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},u[n]=O[n],e.set(r[0],r[1]);Object.defineProperty(O,t,{value:u,enumerable:!1})}return Object.defineProperty(O,"codes",{value:e,enumerable:!1}),O.color.close="\x1B[39m",O.bgColor.close="\x1B[49m",O.color.ansi=bn(),O.color.ansi256=wn(),O.color.ansi16m=An(),O.bgColor.ansi=bn(Tt),O.bgColor.ansi256=wn(Tt),O.bgColor.ansi16m=An(Tt),Object.defineProperties(O,{rgbToAnsi256:{value:(t,u,n)=>t===u&&u===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(u/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{const u=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!u)return[0,0,0];let[n]=u;n.length===3&&(n=[...n].map(o=>o+o).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>O.rgbToAnsi256(...O.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let u,n,r;if(t>=232)u=((t-232)*10+8)/255,n=u,r=u;else{t-=16;const i=t%36;u=Math.floor(t/36)/5,n=Math.floor(i/6)/5,r=i%6/5}const o=Math.max(u,n,r)*2;if(o===0)return 30;let D=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(u));return o===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(t,u,n)=>O.ansi256ToAnsi(O.rgbToAnsi256(t,u,n)),enumerable:!1},hexToAnsi:{value:t=>O.ansi256ToAnsi(O.hexToAnsi256(t)),enumerable:!1}}),O}const Wi=zi(),Ue=new Set(["\x1B","\x9B"]),Ui=39,kt="\x07",vn="[",qi="]",$n="m",Pt=`${qi}8;;`,xn=e=>`${Ue.values().next().value}${vn}${e}${$n}`,Sn=e=>`${Ue.values().next().value}${Pt}${e}${kt}`,Hi=e=>e.split(" ").map(t=>Ee(t)),Rt=(e,t,u)=>{const n=[...t];let r=!1,o=!1,D=Ee(En(e[e.length-1]));for(const[i,s]of n.entries()){const c=Ee(s);if(D+c<=u?e[e.length-1]+=s:(e.push(s),D=0),Ue.has(s)&&(r=!0,o=n.slice(i+1).join("").startsWith(Pt)),r){o?s===kt&&(r=!1,o=!1):s===$n&&(r=!1);continue}D+=c,D===u&&i<n.length-1&&(e.push(""),D=0)}!D&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},Ki=e=>{const t=e.split(" ");let u=t.length;for(;u>0&&!(Ee(t[u-1])>0);)u--;return u===t.length?e:t.slice(0,u).join(" ")+t.slice(u).join("")},Ji=(e,t,u={})=>{if(u.trim!==!1&&e.trim()==="")return"";let n="",r,o;const D=Hi(e);let i=[""];for(const[c,f]of e.split(" ").entries()){u.trim!==!1&&(i[i.length-1]=i[i.length-1].trimStart());let l=Ee(i[i.length-1]);if(c!==0&&(l>=t&&(u.wordWrap===!1||u.trim===!1)&&(i.push(""),l=0),(l>0||u.trim===!1)&&(i[i.length-1]+=" ",l++)),u.hard&&D[c]>t){const a=t-l,d=1+Math.floor((D[c]-a-1)/t);Math.floor((D[c]-1)/t)<d&&i.push(""),Rt(i,f,t);continue}if(l+D[c]>t&&l>0&&D[c]>0){if(u.wordWrap===!1&&l<t){Rt(i,f,t);continue}i.push("")}if(l+D[c]>t&&u.wordWrap===!1){Rt(i,f,t);continue}i[i.length-1]+=f}u.trim!==!1&&(i=i.map(c=>Ki(c)));const s=[...i.join(`
|
|
29
|
+
`)];for(const[c,f]of s.entries()){if(n+=f,Ue.has(f)){const{groups:a}=new RegExp(`(?:\\${vn}(?<code>\\d+)m|\\${Pt}(?<uri>.*)${kt})`).exec(s.slice(c).join(""))||{groups:{}};if(a.code!==void 0){const d=Number.parseFloat(a.code);r=d===Ui?void 0:d}else a.uri!==void 0&&(o=a.uri.length===0?void 0:a.uri)}const l=Wi.codes.get(Number(r));s[c+1]===`
|
|
30
|
+
`?(o&&(n+=Sn("")),r&&l&&(n+=xn(l))):f===`
|
|
31
|
+
`&&(r&&l&&(n+=xn(r)),o&&(n+=Sn(o)))}return n};function On(e,t,u){return String(e).normalize().replace(/\r\n/g,`
|
|
32
32
|
`).split(`
|
|
33
|
-
`).map(n=>
|
|
34
|
-
`)}var
|
|
33
|
+
`).map(n=>Ji(n,t,u)).join(`
|
|
34
|
+
`)}var Vi=Object.defineProperty,Yi=(e,t,u)=>t in e?Vi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[t]=u,G=(e,t,u)=>(Yi(e,typeof t!="symbol"?t+"":t,u),u);function Zi(e,t){if(e===t)return;const u=e.split(`
|
|
35
35
|
`),n=t.split(`
|
|
36
|
-
`),r=[];for(let o=0;o<Math.max(u.length,n.length);o++)u[o]!==n[o]&&r.push(o);return r}const
|
|
37
|
-
`),
|
|
38
|
-
`).length-1;this.output.write(q.cursor.move(-999,t*-1))}render(){const t=
|
|
36
|
+
`),r=[];for(let o=0;o<Math.max(u.length,n.length);o++)u[o]!==n[o]&&r.push(o);return r}const In=Symbol("clack:cancel");function Mn(e){return e===In}function qe(e,t){e.isTTY&&e.setRawMode(t)}const Tn=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),Xi=new Set(["up","down","left","right","space","enter"]);class kn{constructor({render:t,input:u=_D,output:n=jD,...r},o=!0){G(this,"input"),G(this,"output"),G(this,"rl"),G(this,"opts"),G(this,"_track",!1),G(this,"_render"),G(this,"_cursor",0),G(this,"state","initial"),G(this,"value"),G(this,"error",""),G(this,"subscribers",new Map),G(this,"_prevFrame",""),this.opts=r,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=t.bind(this),this._track=o,this.input=u,this.output=n}prompt(){const t=new qD(0);return t._write=(u,n,r)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),r()},this.input.pipe(t),this.rl=mu.createInterface({input:this.input,output:t,tabSize:2,prompt:"",escapeCodeTimeout:50}),mu.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),qe(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((u,n)=>{this.once("submit",()=>{this.output.write(q.cursor.show),this.output.off("resize",this.render),qe(this.input,!1),u(this.value)}),this.once("cancel",()=>{this.output.write(q.cursor.show),this.output.off("resize",this.render),qe(this.input,!1),u(In)})})}on(t,u){const n=this.subscribers.get(t)??[];n.push({cb:u}),this.subscribers.set(t,n)}once(t,u){const n=this.subscribers.get(t)??[];n.push({cb:u,once:!0}),this.subscribers.set(t,n)}emit(t,...u){const n=this.subscribers.get(t)??[],r=[];for(const o of n)o.cb(...u),o.once&&r.push(()=>n.splice(n.indexOf(o),1));for(const o of r)o()}unsubscribe(){this.subscribers.clear()}onKeypress(t,u){if(this.state==="error"&&(this.state="active"),u?.name&&!this._track&&Tn.has(u.name)&&this.emit("cursor",Tn.get(u.name)),u?.name&&Xi.has(u.name)&&this.emit("cursor",u.name),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),u?.name==="return"){if(this.opts.validate){const n=this.opts.validate(this.value);n&&(this.error=n,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}t===""&&(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(`
|
|
37
|
+
`),qe(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const t=On(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
38
|
+
`).length-1;this.output.write(q.cursor.move(-999,t*-1))}render(){const t=On(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(q.cursor.hide);else{const u=Zi(this._prevFrame,t);if(this.restoreCursor(),u&&u?.length===1){const n=u[0];this.output.write(q.cursor.move(0,n)),this.output.write(q.erase.lines(1));const r=t.split(`
|
|
39
39
|
`);this.output.write(r[n]),this._prevFrame=t,this.output.write(q.cursor.move(0,r.length-n-1));return}else if(u&&u?.length>1){const n=u[0];this.output.write(q.cursor.move(0,n)),this.output.write(q.erase.down());const r=t.split(`
|
|
40
40
|
`).slice(n);this.output.write(r.join(`
|
|
41
|
-
`)),this._prevFrame=t;return}this.output.write(q.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}}class
|
|
42
|
-
${
|
|
43
|
-
`,r=this.value?t:u;switch(this.state){case"submit":return`${n}${
|
|
44
|
-
${
|
|
45
|
-
${
|
|
46
|
-
`}}}).prompt()},
|
|
47
|
-
${
|
|
48
|
-
`;switch(this.state){case"submit":return`${u}${
|
|
49
|
-
${
|
|
50
|
-
${
|
|
51
|
-
${
|
|
52
|
-
`}}}).prompt()},
|
|
53
|
-
`)},
|
|
54
|
-
${
|
|
41
|
+
`)),this._prevFrame=t;return}this.output.write(q.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}}class Qi extends kn{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",u=>{this.output.write(q.cursor.move(0,-1)),this.value=u,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var ea=Object.defineProperty,ta=(e,t,u)=>t in e?ea(e,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[t]=u,Pn=(e,t,u)=>(ta(e,typeof t!="symbol"?t+"":t,u),u);let ua=class extends kn{constructor(e){super(e,!1),Pn(this,"options"),Pn(this,"cursor",0),this.options=e.options,this.cursor=this.options.findIndex(({value:t})=>t===e.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",t=>{switch(t){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}};globalThis.process.platform.startsWith("win");function na(){return M.platform!=="win32"?M.env.TERM!=="linux":!!M.env.CI||!!M.env.WT_SESSION||!!M.env.TERMINUS_SUBLIME||M.env.ConEmuTask==="{cmd::Cmder}"||M.env.TERM_PROGRAM==="Terminus-Sublime"||M.env.TERM_PROGRAM==="vscode"||M.env.TERM==="xterm-256color"||M.env.TERM==="alacritty"||M.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const Da=na(),Z=(e,t)=>Da?e:t,ra=Z("\u25C6","*"),oa=Z("\u25A0","x"),sa=Z("\u25B2","x"),ia=Z("\u25C7","o"),aa=Z("\u250C","T"),z=Z("\u2502","|"),_t=Z("\u2514","\u2014"),jt=Z("\u25CF",">"),Nt=Z("\u25CB"," "),Rn=e=>{switch(e){case"initial":case"active":return b.cyan(ra);case"cancel":return b.red(oa);case"error":return b.yellow(sa);case"submit":return b.green(ia)}},ca=e=>{const t=e.active??"Yes",u=e.inactive??"No";return new Qi({active:t,inactive:u,initialValue:e.initialValue??!0,render(){const n=`${b.gray(z)}
|
|
42
|
+
${Rn(this.state)} ${e.message}
|
|
43
|
+
`,r=this.value?t:u;switch(this.state){case"submit":return`${n}${b.gray(z)} ${b.dim(r)}`;case"cancel":return`${n}${b.gray(z)} ${b.strikethrough(b.dim(r))}
|
|
44
|
+
${b.gray(z)}`;default:return`${n}${b.cyan(z)} ${this.value?`${b.green(jt)} ${t}`:`${b.dim(Nt)} ${b.dim(t)}`} ${b.dim("/")} ${this.value?`${b.dim(Nt)} ${b.dim(u)}`:`${b.green(jt)} ${u}`}
|
|
45
|
+
${b.cyan(_t)}
|
|
46
|
+
`}}}).prompt()},la=e=>{const t=(u,n)=>{const r=u.label??String(u.value);return n==="active"?`${b.green(jt)} ${r} ${u.hint?b.dim(`(${u.hint})`):""}`:n==="selected"?`${b.dim(r)}`:n==="cancelled"?`${b.strikethrough(b.dim(r))}`:`${b.dim(Nt)} ${b.dim(r)}`};return new ua({options:e.options,initialValue:e.initialValue,render(){const u=`${b.gray(z)}
|
|
47
|
+
${Rn(this.state)} ${e.message}
|
|
48
|
+
`;switch(this.state){case"submit":return`${u}${b.gray(z)} ${t(this.options[this.cursor],"selected")}`;case"cancel":return`${u}${b.gray(z)} ${t(this.options[this.cursor],"cancelled")}
|
|
49
|
+
${b.gray(z)}`;default:return`${u}${b.cyan(z)} ${this.options.map((n,r)=>t(n,r===this.cursor?"active":"inactive")).join(`
|
|
50
|
+
${b.cyan(z)} `)}
|
|
51
|
+
${b.cyan(_t)}
|
|
52
|
+
`}}}).prompt()},fa=(e="")=>{process.stdout.write(`${b.gray(aa)} ${e}
|
|
53
|
+
`)},He=(e="")=>{process.stdout.write(`${b.gray(z)}
|
|
54
|
+
${b.gray(_t)} ${e}
|
|
55
55
|
|
|
56
|
-
`)}
|
|
56
|
+
`)},_n=e=>mo,da=_n();class m extends Error{}const Lt=" ",Fa="https://github.com/sugarmo/aicommits/issues/new/choose",pa=e=>e.trim().replace(/^github:/,"").replace(/^git\+/,"").replace(/\.git$/,""),jn=e=>{if(typeof e=="string"){const t=pa(e);if(/^[^/\s]+\/[^/\s]+$/.test(t))return t;const u=t.match(/^git@github\.com:([^/\s]+\/[^/\s]+)$/);if(u?.[1])return u[1];const n=t.match(/^https?:\/\/github\.com\/([^/\s]+\/[^/\s]+)$/);if(n?.[1])return n[1]}if(e&&typeof e=="object"&&"url"in e)return jn(e.url)},Ca=(()=>{const e=jn(go);return e?`https://github.com/${e}/issues/new/choose`:Fa})(),Gt=e=>{e instanceof Error&&!(e instanceof m)&&(e.stack&&console.error(ge(e.stack.split(`
|
|
57
57
|
`).slice(1).join(`
|
|
58
58
|
`))),console.error(`
|
|
59
|
-
${
|
|
60
|
-
${
|
|
61
|
-
`).filter(Boolean),
|
|
59
|
+
${Lt}${ge(`aicommits v${da}`)}`),console.error(`
|
|
60
|
+
${Lt}Please open a Bug report with the information above:`),console.error(`${Lt}${Ca}`))},Nn=async(e,t)=>{const{stdout:u,failed:n}=await U("git",["rev-parse",...e],{reject:!1,cwd:t});if(n)throw new m("The current directory must be a Git repository!");return u.trim()},Ln=async()=>Nn(["--show-toplevel"]),ma=async(e,t)=>{const u=t||process.cwd(),n=await Nn(["--git-path",e],u);return N.isAbsolute(n)?n:N.resolve(u,n)},Gn=e=>`:(exclude)${e}`,ha=["package-lock.json","pnpm-lock.yaml","*.lock"].map(Gn),zn=e=>e.split(`
|
|
61
|
+
`).filter(Boolean),Wn=e=>[...ha,...e?e.map(Gn):[]],Un=async(e,t,u)=>{const n=Wn(t),{stdout:r}=await U("git",[...e,"--name-only",...n],{cwd:u});if(!r)return;const{stdout:o}=await U("git",[...e,...n],{cwd:u});return{files:zn(r),diff:o}},ga=async(e,t)=>{const{stdout:u}=await U("git",["ls-files","--others","--exclude-standard","--",".",...Wn(e)],{cwd:t});return u?zn(u):[]},Ea=async(e,t)=>{if(e.length===0)return"";const u=[];for(const n of e){const{stdout:r}=await U("git",["diff","--no-index","--diff-algorithm=minimal","--","/dev/null",n],{reject:!1,cwd:t});r&&u.push(r)}return u.join(`
|
|
62
62
|
|
|
63
|
-
`)},
|
|
63
|
+
`)},ya=async e=>{const{stdout:t}=await U("git",["diff","--cached","--name-only"],{cwd:e});return t.trim().length>0},qn=async(e,t)=>{const n=await Un(["diff","--cached","--diff-algorithm=minimal"],e,t);if(n)return{...n,source:"staged"}},Ba=async(e,t)=>{const n=await Un(["diff","--diff-algorithm=minimal"],e,t),r=await ga(e,t);if(!n&&r.length===0)return;const o=await Ea(r,t),D=Array.from(new Set([...n?.files??[],...r])),i=[n?.diff,o].filter(Boolean).join(`
|
|
64
64
|
|
|
65
|
-
`);return{files:D,diff:i,source:"uncommitted"}},
|
|
66
|
-
`)
|
|
67
|
-
`,"utf8")
|
|
65
|
+
`);return{files:D,diff:i,source:"uncommitted"}},ba=async(e,t)=>{const u=await qn(e,t);if(u)return u;if(!await ya(t))return Ba(e,t)},wa=(e,t="staged")=>`Detected ${e.length.toLocaleString()} ${t} file${e.length>1?"s":""}`,Hn="message.md",Kn=["# Commit Message Instructions","","## Language","- Write the commit message in English.","","## Format","- Output a plain git commit title, not a conventional commit prefix.","- Return only a single title line with no body.","- Use concise imperative wording.","","## Focus","- Lead with the dominant user-facing, product-facing, or operational outcome.","- Prefer the end result over the implementation mechanism.","- Describe what the change enables, fixes, prevents, or improves.","- Mention a concrete file, module, class, or subsystem only when it helps disambiguate the change.","","## Constraints","- Keep the title around 50 characters when practical.",'- Avoid vague subjects like "update", "improve", "refactor", or "cleanup" unless the diff is genuinely dominated by maintenance work.'].join(`
|
|
66
|
+
`),Ke=(e,t,u="")=>{const n=t?.trim()||u.trim();return n?N.isAbsolute(n)?n:N.join(e,n):""},Aa=async e=>{await $.mkdir(N.dirname(e),{recursive:!0})},va=async(e,t)=>{let u;try{u=await $.lstat(e)}catch(n){throw n.code==="ENOENT"?new m(`${t} was not created: ${e}`):n}if(!u.isFile())throw new m(`${t} must point to a file: ${e}`)},$a=async(e,t)=>{try{if(!(await $.lstat(e)).isFile())throw new m(`Message Markdown file must point to a file: ${e}`);return}catch(u){if(u.code!=="ENOENT")throw u}await Aa(e),await $.writeFile(e,`${t.trimEnd()}
|
|
67
|
+
`,"utf8"),await va(e,"Message Markdown file")},Jn=async(e,t)=>{const u=Ke(e,t,Hn);await $a(u,Kn);const n=await $.readFile(u,"utf8");return{messageFilePath:u,messageInstructionsMarkdown:n}},zt=(e,t)=>Ke(e,t)||void 0,xa=async({configDirectoryPath:e,messagePathValue:t,postResponseScriptValue:u,suppressErrors:n=!1})=>{if(n)try{return{...await Jn(e,t),postResponseScriptPath:zt(e,u)}}catch{return{messageFilePath:Ke(e,t,Hn),messageInstructionsMarkdown:Kn,postResponseScriptPath:zt(e,u)}}return{...await Jn(e,t),postResponseScriptPath:zt(e,u)}},Wt=e=>`Flag "${e}" has been removed. Move commit message instructions into ~/.aicommits/message.md or point --message-file at another Markdown file.`,Sa={cn:"zh-CN","zh-cn":"zh-CN","zh-hans":"zh-CN",zh:"zh-CN","zh-tw":"zh-TW","zh-hant":"zh-TW"},Oa="message.md",Ut=["locale","type","details","details-style","instructions","conventional-format","conventional-types","conventional-scope","title-length-guide","detail-column-guide"],Vn={"title-length-guide":["max-length"]},Ia=new Set([...Ut,"max-length"]),W=(e,t,u)=>{if(!t)throw new m(`Invalid config property ${e}: ${u}`)},qt=e=>typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:void 0,Yn=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Zn=(e,t,u)=>{if(t==null||t==="")return u;if(typeof t=="boolean")return t;if(typeof t=="number"){if(t===1)return!0;if(t===0)return!1}if(typeof t=="string"){const n=t.trim().toLowerCase();if(["true","1","yes","on"].includes(n))return!0;if(["false","0","no","off"].includes(n))return!1}throw new m(`Invalid config property ${e}: Must be a boolean (true/false)`)},Ma=e=>{const t=e.trim().replace(/_/g,"-");return Sa[t.toLowerCase()]??t},Ta=e=>e?(W("type",typeof e=="string","Must be a string"),W("type",["","conventional"].includes(e),"Invalid commit type"),e):"",ka=e=>{if(e==null||e==="")return"paragraph";if(typeof e!="string")throw new m("Invalid config property details-style: Must be a string");const t=e.trim().toLowerCase();return W("details-style",["paragraph","list","markdown"].includes(t),"Must be one of: paragraph, list, markdown"),t},Pa=e=>{if(e==null)return"";if(typeof e!="string")throw new m("Invalid config property instructions: Must be a string");return e.trim()},Ra=e=>{if(e==null)return"";if(typeof e!="string")throw new m("Invalid config property conventional-format: Must be a string");return e.trim()},_a=e=>{if(!e)return"";if(typeof e!="string")throw new m("Invalid config property conventional-types: Must be valid JSON");let t;try{t=JSON.parse(e)}catch{throw new m("Invalid config property conventional-types: Must be valid JSON")}W("conventional-types",typeof t=="object"&&t!==null&&!Array.isArray(t),'Must be a JSON object with "type":"description" pairs');const u=Object.entries(t).map(([n,r])=>[n.trim(),String(r).trim()]).filter(([n,r])=>n.length>0&&r.length>0);return W("conventional-types",u.length>0,"Must contain at least one type"),JSON.stringify(Object.fromEntries(u))},ja=e=>{if(!e)return 50;W("title-length-guide",typeof e=="string"||typeof e=="number","Must be an integer");const t=Number(e);return W("title-length-guide",Number.isInteger(t),"Must be an integer"),W("title-length-guide",t>=20,"Must be greater than 20 characters"),t},Na=e=>{if(!e)return 72;W("detail-column-guide",typeof e=="string"||typeof e=="number","Must be an integer");const t=Number(e);return W("detail-column-guide",Number.isInteger(t),"Must be an integer"),W("detail-column-guide",t>=20,"Must be greater than 20 characters"),t},J={locale(e){if(!e)return"en";if(typeof e!="string")throw new m("Invalid config property locale: Must be a string");const t=Ma(e);return W("locale",/^[a-z]{2,3}(?:-[a-z\d]{2,8})*$/i.test(t),"Must be a valid locale (letters and dashes/underscores). You can consult the list of codes in: https://wikipedia.org/wiki/List_of_ISO_639-1_codes"),t},type:Ta,details(e){return Zn("details",e,!1)},"details-style":ka,instructions:Pa,"conventional-format":Ra,"conventional-types":_a,"conventional-scope"(e){return Zn("conventional-scope",e,!1)},"title-length-guide":ja,"detail-column-guide":Na},H=(e,t)=>{const u=qt(e[t]);if(u!==void 0)return u;const n=Vn[t]||[];for(const r of n){const o=qt(e[r]);if(o!==void 0)return o}},La=e=>Ut.some(t=>H(e,t)!==void 0),Ga=e=>e.trim().replace(/[^\w.-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")||"profile",za=e=>{if(e.type!=="conventional")return["## Commit Type","- Output a plain commit title, not a conventional commit prefix."].join(`
|
|
68
|
+
`);const t=["## Commit Type","- Use conventional commit formatting."];return e["conventional-scope"]?t.push("- Prefer `type(scope): subject` and only omit scope when there is no clear dominant module, file, class, or subsystem."):t.push("- Prefer `type: subject` without a scope."),e["conventional-format"]&&t.push(`- Use this title format exactly: \`${e["conventional-format"]}\`.`),e["conventional-types"]&&t.push("- Use these conventional type definitions:","```json",e["conventional-types"],"```"),t.join(`
|
|
69
|
+
`)},Wa=e=>{if(!e.details)return["## Body","- Return only the title line with no body."].join(`
|
|
70
|
+
`);const t=["## Body","- Include a body only when the title alone is not sufficient."];return e["details-style"]==="list"?t.push("- When a body is needed, use concise bullet points.",`- Wrap bullet lines around column ${e["detail-column-guide"]} when practical.`):e["details-style"]==="markdown"?t.push("- When a body is needed, use concise markdown without fenced code blocks."):t.push("- When a body is needed, write concise prose paragraphs.",`- Wrap body text around column ${e["detail-column-guide"]} when practical.`),t.join(`
|
|
71
|
+
`)},Ua=e=>["# Commit Message Instructions","","## Language",`- Write the commit message strictly in ${e.locale}.`,"",za(e),"","## Title","- Use concise imperative wording.","- Focus on the dominant user-facing, product-facing, or operational outcome first.","- Prefer the end result over the implementation mechanism.",`- Keep the title around ${e["title-length-guide"]} characters when practical.`,"",Wa(e),"","## Style","- Describe what the change enables, fixes, prevents, or improves.",'- Avoid vague subjects like "update", "improve", "refactor", or "cleanup" unless the diff is genuinely dominated by maintenance work.',...e.instructions?["","## Additional Instructions",e.instructions]:[]].join(`
|
|
72
|
+
`),qa=async e=>{await $.mkdir(N.dirname(e),{recursive:!0})},Ha=async(e,t)=>{let u;try{u=await $.lstat(e)}catch(n){throw n.code==="ENOENT"?new m(`${t} was not created: ${e}`):n}if(!u.isFile())throw new m(`${t} must point to a file: ${e}`)},Ka=async(e,t)=>{try{if(!(await $.lstat(e)).isFile())throw new m(`Migrated message Markdown file must point to a file: ${e}`);return}catch(u){if(u.code!=="ENOENT")throw u}await qa(e),await $.writeFile(e,`${t.trimEnd()}
|
|
73
|
+
`,"utf8"),await Ha(e,"Migrated message Markdown file")},Ja=e=>({locale:J.locale(H(e,"locale")),type:J.type(H(e,"type")),details:J.details(H(e,"details")),"details-style":J["details-style"](H(e,"details-style")),instructions:J.instructions(H(e,"instructions")),"conventional-format":J["conventional-format"](H(e,"conventional-format")),"conventional-types":J["conventional-types"](H(e,"conventional-types")),"conventional-scope":J["conventional-scope"](H(e,"conventional-scope")),"title-length-guide":J["title-length-guide"](H(e,"title-length-guide")),"detail-column-guide":J["detail-column-guide"](H(e,"detail-column-guide"))}),Va=e=>{for(const t of Ut){delete e[t];const u=Vn[t]||[];for(const n of u)delete e[n]}},Xn=async(e,t,u,n)=>{if(!La(e))return!1;const r=Ja(e),o=qt(e["message-path"]),D=typeof o=="string"&&o.trim()?o.trim():u,i=Ke(t,D,u);return await Ka(i,Ua(r)),n&&(e["message-path"]=D),Va(e),!0},Ht=async({backupConfig:e,config:t,configDirectoryPath:u,normalizeLegacyConfigKeys:n,writeConfig:r})=>{let o=!1;o=await Xn(t,u,Oa,!1)||o;const{profiles:D}=t;if(Yn(D))for(const[i,s]of Object.entries(D)){if(!Yn(s))continue;const c=`message.${Ga(i)}.md`;o=await Xn(s,u,c,!0)||o}o&&(n(t),await e?.(),await r(t))},Ya=e=>{const t=e.trim();if(Ia.has(t))return`Config property "${t}" has moved to your message Markdown file. Edit ~/.aicommits/message.md or set message-path instead.`},Za=["responses","chat"],Xa=["none","low","medium","high","xhigh"],{hasOwnProperty:Qa}=Object.prototype,Qn=(e,t)=>Qa.call(e,t),T=(e,t,u)=>{if(!t)throw new m(`Invalid config property ${e}: ${u}`)},ye=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),X=e=>typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:void 0,ec=(e,t,u)=>{if(t==null||t==="")return u;if(typeof t=="boolean")return t;if(typeof t=="number"){if(t===1)return!0;if(t===0)return!1}if(typeof t=="string"){const n=t.trim().toLowerCase();if(["true","1","yes","on"].includes(n))return!0;if(["false","0","no","off"].includes(n))return!1}throw new m(`Invalid config property ${e}: Must be a boolean (true/false)`)},tc=e=>{let t;try{t=JSON.parse(e)}catch{throw new m("Invalid config property request-options: Must be valid JSON")}return T("request-options",typeof t=="object"&&t!==null&&!Array.isArray(t),"Must be a JSON object"),JSON.stringify(t)},uc=e=>{if(typeof e=="number")return T("context-window",Number.isInteger(e),"Must be an integer or use K/M suffix"),e;const u=e.trim().match(/^([+-]?\d+)([kKmM])?$/);if(T("context-window",!!u,"Must be an integer or use K/M suffix"),!u?.[1])return Number.NaN;const n=Number(u[1]),r=u[2]?.toLowerCase();let o=1;return r==="k"?o=1024:r==="m"&&(o=1024*1024),n*o},eD=(e,t="")=>{if(e==null)return t;if(typeof e!="string")throw new m("Path values must be strings");return e.trim()||t},Be={"api-key"(e){if(!e)throw new m("Please set your API key via `aicommits config set api-key=<your token>`");if(typeof e!="string")throw new m("Invalid config property api-key: Must be a string");const t=e.trim();return T("api-key",t.length>0,"Cannot be empty"),t},"base-url"(e){if(e==null||e==="")throw new m("Please set your API base URL via `aicommits config set base-url=<https://...>`");if(typeof e!="string")throw new m("Invalid config property base-url: Must be a valid URL");const t=e.trim();let u;try{u=new URL(t)}catch{throw new m("Invalid config property base-url: Must be a valid URL")}T("base-url",u.protocol==="https:","Must be an HTTPS URL"),T("base-url",u.hash==="","Must not include URL fragments"),T("base-url",u.search==="","Must not include query parameters");const n=u.pathname.replace(/\/+$/,"");return`${u.origin}${n}`},profile(e){if(e==null)return"";if(typeof e!="string")throw new m("Invalid config property profile: Must be a string");return e.trim()},generate(e){if(!e)return 1;T("generate",typeof e=="string"||typeof e=="number","Must be an integer");const t=Number(e);return T("generate",Number.isInteger(t),"Must be an integer"),T("generate",t>0,"Must be greater than 0"),T("generate",t<=5,"Must be less or equal to 5"),t},proxy(e){if(!(e==null||e==="")){if(typeof e!="string")throw new m("Invalid config property proxy: Must be a valid URL");return T("proxy",/^https?:\/\//.test(e),"Must be a valid URL"),e}},model(e){if(e==null||e==="")return"gpt-3.5-turbo";if(typeof e!="string")throw new m("Invalid config property model: Must be a string");return e},timeout(e){if(!e)return 1e4;T("timeout",typeof e=="string"||typeof e=="number","Must be an integer");const t=Number(e);return T("timeout",Number.isInteger(t),"Must be an integer"),T("timeout",t>=500,"Must be greater than 500ms"),t},"context-window"(e){if(!e)return 0;if(typeof e!="string"&&typeof e!="number")throw new m("Invalid config property context-window: Must be an integer or use K/M suffix");const t=uc(e);return T("context-window",Number.isInteger(t),"Must be an integer"),T("context-window",t===0||t>=1024,"Must be 0 (auto) or greater than or equal to 1024 tokens"),t},"show-reasoning"(e){return ec("show-reasoning",e,!1)},"reasoning-effort"(e){if(e==null||e==="")return"";if(typeof e!="string")throw new m("Invalid config property reasoning-effort: Must be one of: none, low, medium, high, xhigh");const t=e.trim().toLowerCase();return T("reasoning-effort",Xa.includes(t),"Must be one of: none, low, medium, high, xhigh"),t},"api-mode"(e){if(e==null||e==="")return"responses";if(typeof e!="string")throw new m('Invalid config property api-mode: Must be "responses" or "chat"');const t=e.trim().toLowerCase();return T("api-mode",Za.includes(t),"Must be one of: responses, chat"),t},"request-options"(e){if(e==null||e==="")return"";if(typeof e!="string")throw new m("Invalid config property request-options: Must be valid JSON");return tc(e)},"message-path"(e){try{return eD(e,"message.md")}catch{throw new m("Invalid config property message-path: Must be a string")}},"post-response-script"(e){try{return eD(e,"")}catch{throw new m("Invalid config property post-response-script: Must be a string")}}},nc={},Kt={"api-key":["openai-key","OPENAI_KEY","OPENAI_API_KEY"],"base-url":["openai-base-url","OPENAI_BASE_URL"],model:["OPENAI_MODEL"]},V=N.join(Oe.homedir(),".aicommits"),tD=N.join(V,"config.toml"),Dc=[N.join(Oe.homedir(),"aicommits.toml"),N.join(Oe.homedir(),".aicommits")],rc=e=>{let t=!1,u=!1,n=!1;for(let r=0;r<e.length;r+=1){const o=e[r];if(o==="\\"&&u&&!n){n=!0;continue}if(o==='"'&&!t&&!n)u=!u;else if(o==="'"&&!u)t=!t;else if(o==="#"&&!t&&!u)return e.slice(0,r);n=!1}return e},uD=e=>{const t=e.trim();return t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):t},oc=e=>{const t=e.trim();if(t==="")return"";if(t.startsWith('"')&&t.endsWith('"'))try{return JSON.parse(t)}catch{return t.slice(1,-1)}return t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):/^(?:true|false)$/i.test(t)?t.toLowerCase()==="true":/^[+-]?\d+$/.test(t)||/^[+-]?\d+\.\d+$/.test(t)?Number(t):t},sc=(e,t)=>{let u=e;for(const n of t){const r=u[n];if(!ye(r)){const o=Object.create(null);u[n]=o,u=o;continue}u=r}return u},ic=e=>{const t=Object.create(null);let u=t;for(const n of e.split(/\r?\n/)){const r=rc(n).trim();if(!r)continue;if(r.startsWith("[")&&r.endsWith("]")){const s=r.slice(1,-1).trim();if(!s){u=t;continue}const c=s.split(".").map(uD).map(f=>f.trim()).filter(Boolean);if(c.length===0){u=t;continue}u=sc(t,c);continue}const o=r.indexOf("=");if(o<=0)continue;const D=uD(r.slice(0,o));if(!D)continue;const i=oc(r.slice(o+1));u[D]=i}return t},nD=e=>typeof e=="string"?JSON.stringify(e):String(e),ac=e=>{const t=[],u=[],n=(r,o)=>{const D=[],i=[];for(const[s,c]of Object.entries(o)){const f=X(c);if(f!==void 0){D.push(`${s} = ${nD(f)}`);continue}ye(c)&&i.push([s,c])}r.length>0&&D.length>0&&u.push(`[${r.join(".")}]`,...D,"");for(const[s,c]of i)n([...r,s],c)};for(const[r,o]of Object.entries(e)){const D=X(o);if(D!==void 0){t.push(`${r} = ${nD(D)}`);continue}ye(o)&&n([r],o)}for(;u[u.length-1]==="";)u.pop();return[...t,...t.length>0&&u.length>0?[""]:[],...u].join(`
|
|
74
|
+
`)},be=async e=>{await $.mkdir(V,{recursive:!0});const t=ac(e);await $.writeFile(tD,`${t}
|
|
75
|
+
`,"utf8")},cc=async(e,t)=>{try{if((await $.lstat(e)).isFile())return;throw new m(`Backup path must point to a file: ${e}`)}catch(u){if(u.code!=="ENOENT")throw u}await $.mkdir(N.dirname(e),{recursive:!0}),await $.writeFile(e,t,"utf8")},Jt=async(e,t)=>{!e||t===void 0||await cc(`${e}.bak`,t)},DD=async(e,t,u)=>{await Jt(t,u),await $.rm(t),await $.mkdir(V,{recursive:!0}),await Ht({config:e,configDirectoryPath:V,normalizeLegacyConfigKeys:we,writeConfig:be}),await be(e)},rD=async e=>{try{if(!(await $.lstat(e)).isFile())return;const u=await $.readFile(e,"utf8");return{config:ic(u),content:u,path:e}}catch{return}},oD=async()=>{const e=await rD(tD);if(e)return{config:e.config,sourceContent:e.content,sourcePath:e.path};for(const t of Dc){const u=await rD(t);if(u)return{config:u.config,sourceContent:u.content,sourcePath:u.path}}return{config:Object.create(null)}},lc=(e,t)=>{const u=Kt[e];if(!(!u||u.length===0))for(const n of u){const r=X(t[n]);if(r!==void 0)return r}},we=e=>{for(const[t,u]of Object.entries(Kt)){if(X(e[t])===void 0)for(const n of u){const r=X(e[n]);if(r!==void 0){e[t]=r;break}}for(const n of u)delete e[n]}},fc=(e,t,u)=>{if(!t)return;const{profiles:n}=e;if(!ye(n))return;const r=n[t];if(ye(r))return X(r[u])},sD=e=>{const t=e.trim();return Qn(Be,t)?t:nc[t]},Vt=async(e,t)=>{const{config:u,sourceContent:n,sourcePath:r}=await oD(),o=r===V;we(u),o&&r?await DD(u,r,n):await Ht({backupConfig:async()=>Jt(r,n),config:u,configDirectoryPath:V,normalizeLegacyConfigKeys:we,writeConfig:be});const D={},i=e?.profile??X(u.profile);let s="";try{s=Be.profile(i)}catch{if(!t)throw new m("Invalid config property profile: Must be a string")}for(const a of Object.keys(Be)){const d=Be[a],F=e?.[a]??(a==="profile"?void 0:fc(u,s,a))??X(u[a])??lc(a,u);if(t)try{D[a]=d(F)}catch{}else D[a]=d(F)}const c=D["message-path"]||"message.md",f=D["post-response-script"]||"",l=await xa({configDirectoryPath:V,messagePathValue:c,postResponseScriptValue:f,suppressErrors:t});return{...D,configDirectoryPath:V,...l}},dc=async e=>{const{config:t,sourceContent:u,sourcePath:n}=await oD(),r=n===V;we(t),r&&n?await DD(t,n,u):await Ht({backupConfig:async()=>Jt(n,u),config:t,configDirectoryPath:V,normalizeLegacyConfigKeys:we,writeConfig:be});for(const[o,D]of e){const i=Ya(o);if(i)throw new m(i);const s=sD(o);if(!s)throw new m(`Invalid config property: ${o}`);const c=Be[s](D);t[s]=c;const f=Kt[s]||[];for(const l of f)delete t[l]}await be(t)};var Yt={},Zt={exports:{}},Ae={exports:{}},Xt,iD;function Fc(){if(iD)return Xt;iD=1;var e=1e3,t=e*60,u=t*60,n=u*24,r=n*7,o=n*365.25;Xt=function(f,l){l=l||{};var a=typeof f;if(a==="string"&&f.length>0)return D(f);if(a==="number"&&isFinite(f))return l.long?s(f):i(f);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(f))};function D(f){if(f=String(f),!(f.length>100)){var l=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(f);if(l){var a=parseFloat(l[1]),d=(l[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return a*o;case"weeks":case"week":case"w":return a*r;case"days":case"day":case"d":return a*n;case"hours":case"hour":case"hrs":case"hr":case"h":return a*u;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function i(f){var l=Math.abs(f);return l>=n?Math.round(f/n)+"d":l>=u?Math.round(f/u)+"h":l>=t?Math.round(f/t)+"m":l>=e?Math.round(f/e)+"s":f+"ms"}function s(f){var l=Math.abs(f);return l>=n?c(f,l,n,"day"):l>=u?c(f,l,u,"hour"):l>=t?c(f,l,t,"minute"):l>=e?c(f,l,e,"second"):f+" ms"}function c(f,l,a,d){var F=l>=a*1.5;return Math.round(f/a)+" "+d+(F?"s":"")}return Xt}var Qt,aD;function cD(){if(aD)return Qt;aD=1;function e(t){n.debug=n,n.default=n,n.coerce=c,n.disable=i,n.enable=o,n.enabled=s,n.humanize=Fc(),n.destroy=f,Object.keys(t).forEach(l=>{n[l]=t[l]}),n.names=[],n.skips=[],n.formatters={};function u(l){let a=0;for(let d=0;d<l.length;d++)a=(a<<5)-a+l.charCodeAt(d),a|=0;return n.colors[Math.abs(a)%n.colors.length]}n.selectColor=u;function n(l){let a,d=null,F,p;function C(...h){if(!C.enabled)return;const y=C,A=Number(new Date),_=A-(a||A);y.diff=_,y.prev=a,y.curr=A,a=A,h[0]=n.coerce(h[0]),typeof h[0]!="string"&&h.unshift("%O");let j=0;h[0]=h[0].replace(/%([a-zA-Z%])/g,(v,B)=>{if(v==="%%")return"%";j++;const x=n.formatters[B];if(typeof x=="function"){const g=h[j];v=x.call(y,g),h.splice(j,1),j--}return v}),n.formatArgs.call(y,h),(y.log||n.log).apply(y,h)}return C.namespace=l,C.useColors=n.useColors(),C.color=n.selectColor(l),C.extend=r,C.destroy=n.destroy,Object.defineProperty(C,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(F!==n.namespaces&&(F=n.namespaces,p=n.enabled(l)),p),set:h=>{d=h}}),typeof n.init=="function"&&n.init(C),C}function r(l,a){const d=n(this.namespace+(typeof a>"u"?":":a)+l);return d.log=this.log,d}function o(l){n.save(l),n.namespaces=l,n.names=[],n.skips=[];const a=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const d of a)d[0]==="-"?n.skips.push(d.slice(1)):n.names.push(d)}function D(l,a){let d=0,F=0,p=-1,C=0;for(;d<l.length;)if(F<a.length&&(a[F]===l[d]||a[F]==="*"))a[F]==="*"?(p=F,C=d,F++):(d++,F++);else if(p!==-1)F=p+1,C++,d=C;else return!1;for(;F<a.length&&a[F]==="*";)F++;return F===a.length}function i(){const l=[...n.names,...n.skips.map(a=>"-"+a)].join(",");return n.enable(""),l}function s(l){for(const a of n.skips)if(D(l,a))return!1;for(const a of n.names)if(D(l,a))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}return Qt=e,Qt}Ae.exports;var lD;function pc(){return lD||(lD=1,function(e,t){t.formatArgs=n,t.save=r,t.load=o,t.useColors=u,t.storage=D(),t.destroy=(()=>{let s=!1;return()=>{s||(s=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function u(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let s;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(s=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(s[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(s){if(s[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+s[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;s.splice(1,0,c,"color: inherit");let f=0,l=0;s[0].replace(/%[a-zA-Z%]/g,a=>{a!=="%%"&&(f++,a==="%c"&&(l=f))}),s.splice(l,0,c)}t.log=console.debug||console.log||(()=>{});function r(s){try{s?t.storage.setItem("debug",s):t.storage.removeItem("debug")}catch{}}function o(){let s;try{s=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!s&&typeof process<"u"&&"env"in process&&(s=process.env.DEBUG),s}function D(){try{return localStorage}catch{}}e.exports=cD()(t);const{formatters:i}=e.exports;i.j=function(s){try{return JSON.stringify(s)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}}(Ae,Ae.exports)),Ae.exports}var ve={exports:{}},eu,fD;function Cc(){return fD||(fD=1,eu=(e,t=process.argv)=>{const u=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(u+e),r=t.indexOf("--");return n!==-1&&(r===-1||n<r)}),eu}var tu,dD;function mc(){if(dD)return tu;dD=1;const e=Oe,t=Qe,u=Cc(),{env:n}=process;let r;u("no-color")||u("no-colors")||u("color=false")||u("color=never")?r=0:(u("color")||u("colors")||u("color=true")||u("color=always"))&&(r=1),"FORCE_COLOR"in n&&(n.FORCE_COLOR==="true"?r=1:n.FORCE_COLOR==="false"?r=0:r=n.FORCE_COLOR.length===0?1:Math.min(parseInt(n.FORCE_COLOR,10),3));function o(s){return s===0?!1:{level:s,hasBasic:!0,has256:s>=2,has16m:s>=3}}function D(s,c){if(r===0)return 0;if(u("color=16m")||u("color=full")||u("color=truecolor"))return 3;if(u("color=256"))return 2;if(s&&!c&&r===void 0)return 0;const f=r||0;if(n.TERM==="dumb")return f;if(process.platform==="win32"){const l=e.release().split(".");return Number(l[0])>=10&&Number(l[2])>=10586?Number(l[2])>=14931?3:2:1}if("CI"in n)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(l=>l in n)||n.CI_NAME==="codeship"?1:f;if("TEAMCITY_VERSION"in n)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(n.TEAMCITY_VERSION)?1:0;if(n.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in n){const l=parseInt((n.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(n.TERM_PROGRAM){case"iTerm.app":return l>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(n.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(n.TERM)||"COLORTERM"in n?1:f}function i(s){const c=D(s,s&&s.isTTY);return o(c)}return tu={supportsColor:i,stdout:o(D(!0,t.isatty(1))),stderr:o(D(!0,t.isatty(2)))},tu}ve.exports;var FD;function hc(){return FD||(FD=1,function(e,t){const u=Qe,n=Cu;t.init=f,t.log=i,t.formatArgs=o,t.save=s,t.load=c,t.useColors=r,t.destroy=n.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const a=mc();a&&(a.stderr||a).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}t.inspectOpts=Object.keys(process.env).filter(a=>/^debug_/i.test(a)).reduce((a,d)=>{const F=d.substring(6).toLowerCase().replace(/_([a-z])/g,(C,h)=>h.toUpperCase());let p=process.env[d];return/^(yes|on|true|enabled)$/i.test(p)?p=!0:/^(no|off|false|disabled)$/i.test(p)?p=!1:p==="null"?p=null:p=Number(p),a[F]=p,a},{});function r(){return"colors"in t.inspectOpts?!!t.inspectOpts.colors:u.isatty(process.stderr.fd)}function o(a){const{namespace:d,useColors:F}=this;if(F){const p=this.color,C="\x1B[3"+(p<8?p:"8;5;"+p),h=` ${C};1m${d} \x1B[0m`;a[0]=h+a[0].split(`
|
|
68
76
|
`).join(`
|
|
69
|
-
`+
|
|
70
|
-
`)}function s(
|
|
71
|
-
`).map(d=>d.trim()).join(" ")},
|
|
72
|
-
`).some(t=>t.indexOf("(https.js:")!==-1||t.indexOf("node:https:")!==-1)}function
|
|
77
|
+
`+h),a.push(C+"m+"+e.exports.humanize(this.diff)+"\x1B[0m")}else a[0]=D()+d+" "+a[0]}function D(){return t.inspectOpts.hideDate?"":new Date().toISOString()+" "}function i(...a){return process.stderr.write(n.formatWithOptions(t.inspectOpts,...a)+`
|
|
78
|
+
`)}function s(a){a?process.env.DEBUG=a:delete process.env.DEBUG}function c(){return process.env.DEBUG}function f(a){a.inspectOpts={};const d=Object.keys(t.inspectOpts);for(let F=0;F<d.length;F++)a.inspectOpts[d[F]]=t.inspectOpts[d[F]]}e.exports=cD()(t);const{formatters:l}=e.exports;l.o=function(a){return this.inspectOpts.colors=this.useColors,n.inspect(a,this.inspectOpts).split(`
|
|
79
|
+
`).map(d=>d.trim()).join(" ")},l.O=function(a){return this.inspectOpts.colors=this.useColors,n.inspect(a,this.inspectOpts)}}(ve,ve.exports)),ve.exports}typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Zt.exports=pc():Zt.exports=hc();var uu=Zt.exports,nu={};Object.defineProperty(nu,"__esModule",{value:!0});function gc(e){return function(t,u){return new Promise((n,r)=>{e.call(this,t,u,(o,D)=>{o?r(o):n(D)})})}}nu.default=gc;var pD=k&&k.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const Ec=pu,yc=pD(uu),Bc=pD(nu),$e=yc.default("agent-base");function bc(e){return!!e&&typeof e.addRequest=="function"}function Du(){const{stack:e}=new Error;return typeof e!="string"?!1:e.split(`
|
|
80
|
+
`).some(t=>t.indexOf("(https.js:")!==-1||t.indexOf("node:https:")!==-1)}function Je(e,t){return new Je.Agent(e,t)}(function(e){class t extends Ec.EventEmitter{constructor(n,r){super();let o=r;typeof n=="function"?this.callback=n:n&&(o=n),this.timeout=null,o&&typeof o.timeout=="number"&&(this.timeout=o.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:Du()?443:80}set defaultPort(n){this.explicitDefaultPort=n}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:Du()?"https:":"http:"}set protocol(n){this.explicitProtocol=n}callback(n,r,o){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(n,r){const o=Object.assign({},r);typeof o.secureEndpoint!="boolean"&&(o.secureEndpoint=Du()),o.host==null&&(o.host="localhost"),o.port==null&&(o.port=o.secureEndpoint?443:80),o.protocol==null&&(o.protocol=o.secureEndpoint?"https:":"http:"),o.host&&o.path&&delete o.path,delete o.agent,delete o.hostname,delete o._defaultAgent,delete o.defaultPort,delete o.createConnection,n._last=!0,n.shouldKeepAlive=!1;let D=!1,i=null;const s=o.timeout||this.timeout,c=d=>{n._hadError||(n.emit("error",d),n._hadError=!0)},f=()=>{i=null,D=!0;const d=new Error(`A "socket" was not created for HTTP request before ${s}ms`);d.code="ETIMEOUT",c(d)},l=d=>{D||(i!==null&&(clearTimeout(i),i=null),c(d))},a=d=>{if(D)return;if(i!=null&&(clearTimeout(i),i=null),bc(d)){$e("Callback returned another Agent instance %o",d.constructor.name),d.addRequest(n,o);return}if(d){d.once("free",()=>{this.freeSocket(d,o)}),n.onSocket(d);return}const F=new Error(`no Duplex stream was returned to agent-base for \`${n.method} ${n.path}\``);c(F)};if(typeof this.callback!="function"){c(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?($e("Converting legacy callback function to promise"),this.promisifiedCallback=Bc.default(this.callback)):this.promisifiedCallback=this.callback),typeof s=="number"&&s>0&&(i=setTimeout(f,s)),"port"in o&&typeof o.port!="number"&&(o.port=Number(o.port));try{$e("Resolving socket for %o request: %o",o.protocol,`${n.method} ${n.path}`),Promise.resolve(this.promisifiedCallback(n,o)).then(a,l)}catch(d){Promise.reject(d).catch(l)}}freeSocket(n,r){$e("Freeing socket %o %o",n.constructor.name,r),n.destroy()}destroy(){$e("Destroying agent %o",this.constructor.name)}}e.Agent=t,e.prototype=e.Agent.prototype})(Je||(Je={}));var wc=Je,ru={},Ac=k&&k.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ru,"__esModule",{value:!0});const vc=Ac(uu),xe=vc.default("https-proxy-agent:parse-proxy-response");function $c(e){return new Promise((t,u)=>{let n=0;const r=[];function o(){const l=e.read();l?f(l):e.once("readable",o)}function D(){e.removeListener("end",s),e.removeListener("error",c),e.removeListener("close",i),e.removeListener("readable",o)}function i(l){xe("onclose had error %o",l)}function s(){xe("onend")}function c(l){D(),xe("onerror %o",l),u(l)}function f(l){r.push(l),n+=l.length;const a=Buffer.concat(r,n);if(a.indexOf(`\r
|
|
73
81
|
\r
|
|
74
|
-
`)===-1){
|
|
75
|
-
`)),
|
|
76
|
-
`;n.auth&&(D["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`);let{host:
|
|
77
|
-
`;const
|
|
78
|
-
`);const{statusCode:d,buffered:F}=yield
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
`):
|
|
82
|
-
`)
|
|
83
|
-
|
|
84
|
-
`)
|
|
85
|
-
`)
|
|
86
|
-
|
|
87
|
-
`),
|
|
88
|
-
|
|
89
|
-
`)}
|
|
90
|
-
`)}return["Title anchor requirement:","- The commit title must mention at least one concrete anchor from the diff (file, class/type, module, or subsystem).","- Prefer class/type/module/subsystem names over raw file paths when possible.","- Avoid titles that only mention function names without file/class context."].join(`
|
|
91
|
-
`)},Cc=(e,t)=>e!=="conventional"?"":["Conventional title subject rules:",`- The subject text after ${t?'"<type>(<scope>): "':'"<type>: "'} must not start with the same type word.`,'- Example to avoid: "refactor: refactor ...".','- The selected prefix must stay semantically consistent with the subject action; never output titles like "feat: refactor ..." or "fix: refactor ...".',"- For alphabetic languages (for example English), capitalize the first word in the subject.","- Run a final self-check before output: if subject starts with the selected type word, rewrite the subject."].join(`
|
|
92
|
-
`),mc=(e,t,u,n={})=>{const r=n.includeDetails??!1,o=n.detailsStyle??"paragraph",D=n.conventionalScope??!1,i=lc(n.changedFiles,n.diffWasCompacted);return["Generate a concise git commit message in present tense that precisely describes the key changes in the following code diff. Focus on what was changed, not just file names.",oc(r,o),ac(e),`Commit title must be a maximum of ${t} characters.`,"Exclude anything unnecessary such as translation. Your entire response will be passed directly into git commit.",`IMPORTANT: Do not include any explanations, introductions, or additional text. Do not wrap the commit message in quotes or any other formatting. The commit title must not exceed ${t} characters. Respond with ONLY the commit message text.`,fc(i),dc(r,o),Fc(r,o,i),cc(n.changedFiles),pc(u,D),Cc(u,D),rc(u,n.conventionalTypes,n.lockedConventionalType),Dc(u,n.conventionalFormat,D,r),ic(),sc(n.instructions)].filter(Boolean).join(`
|
|
93
|
-
`)},hc=async(e,t,u,n,r,o,D,i)=>new Promise((s,l)=>{const f=JSON.stringify(n),a={port:D??443,hostname:e,path:t,method:"POST",headers:{...u,"Content-Type":"application/json","Content-Length":Buffer.byteLength(f)},timeout:r,agent:o?nc(o):void 0},c=kD.request(a,d=>{const F=[];d.on("data",C=>{F.push(C),i?.(C.toString())}),d.on("end",()=>{s({request:c,response:d,data:Buffer.concat(F).toString()})})});c.on("error",l),c.on("timeout",()=>{c.destroy(),l(new h(`Time out error: request took over ${r}ms. Try increasing the \`timeout\` config, or checking your API provider status.`))}),c.write(f),c.end()}),Ec=e=>{if(!e?.trim())throw new h("Please set your API base URL via `aicommits config set base-url=<https://...>`");const t=e.trim(),u=new URL(t),n=u.pathname.replace(/\/+$/,"");return{hostname:u.hostname,port:u.port?Number(u.port):443,path:`${n}/chat/completions`}},nD=async(e,t,u,n,r,o,D)=>{const i={...t,...D,stream:!0};let s="";const l=E=>{if(!o)return;const y=Array.isArray(E.choices)?E.choices:[];for(const b of y){if(typeof b!="object"||b===null)continue;const{delta:v}=b;if(typeof v!="object"||v===null)continue;const A=v,$=typeof A.reasoning_content=="string"?A.reasoning_content:typeof A.reasoning=="string"?A.reasoning:"";$&&o({kind:"reasoning",text:$}),typeof A.content=="string"&&A.content.length>0&&o({kind:"content",text:A.content})}},f=E=>{if(!o)return;s+=E.replace(/\r\n/g,`
|
|
82
|
+
`)===-1){xe("have not received end of HTTP headers yet..."),o();return}const F=a.toString("ascii",0,a.indexOf(`\r
|
|
83
|
+
`)),p=+F.split(" ")[1];xe("got proxy server response: %o",F),t({statusCode:p,buffered:a})}e.on("error",c),e.on("close",i),e.on("end",s),o()})}ru.default=$c;var xc=k&&k.__awaiter||function(e,t,u,n){function r(o){return o instanceof u?o:new u(function(D){D(o)})}return new(u||(u=Promise))(function(o,D){function i(f){try{c(n.next(f))}catch(l){D(l)}}function s(f){try{c(n.throw(f))}catch(l){D(l)}}function c(f){f.done?o(f.value):r(f.value).then(i,s)}c((n=n.apply(e,t||[])).next())})},ce=k&&k.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yt,"__esModule",{value:!0});const CD=ce(KD),mD=ce(JD),Sc=ce(VD),Oc=ce(Fu),Ic=ce(uu),Mc=wc,Tc=ce(ru),Se=Ic.default("https-proxy-agent:agent");class kc extends Mc.Agent{constructor(t){let u;if(typeof t=="string"?u=Sc.default.parse(t):u=t,!u)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");Se("creating new HttpsProxyAgent instance: %o",u),super(u);const n=Object.assign({},u);this.secureProxy=u.secureProxy||_c(n.protocol),n.host=n.hostname||n.host,typeof n.port=="string"&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(t,u){return xc(this,void 0,void 0,function*(){const{proxy:n,secureProxy:r}=this;let o;r?(Se("Creating `tls.Socket`: %o",n),o=mD.default.connect(n)):(Se("Creating `net.Socket`: %o",n),o=CD.default.connect(n));const D=Object.assign({},n.headers);let s=`CONNECT ${`${u.host}:${u.port}`} HTTP/1.1\r
|
|
84
|
+
`;n.auth&&(D["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`);let{host:c,port:f,secureEndpoint:l}=u;Rc(f,l)||(c+=`:${f}`),D.Host=c,D.Connection="close";for(const C of Object.keys(D))s+=`${C}: ${D[C]}\r
|
|
85
|
+
`;const a=Tc.default(o);o.write(`${s}\r
|
|
86
|
+
`);const{statusCode:d,buffered:F}=yield a;if(d===200){if(t.once("socket",Pc),u.secureEndpoint){Se("Upgrading socket connection to TLS");const C=u.servername||u.host;return mD.default.connect(Object.assign(Object.assign({},jc(u,"host","hostname","path","port")),{socket:o,servername:C}))}return o}o.destroy();const p=new CD.default.Socket({writable:!1});return p.readable=!0,t.once("socket",C=>{Se("replaying proxy buffer for failed request"),Oc.default(C.listenerCount("data")>0),C.push(F),C.push(null)}),p})}}Yt.default=kc;function Pc(e){e.resume()}function Rc(e,t){return!!(!t&&e===80||t&&e===443)}function _c(e){return typeof e=="string"?/^https:?$/i.test(e):!1}function jc(e,...t){const u={};let n;for(n in e)t.includes(n)||(u[n]=e[n]);return u}var Nc=k&&k.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const ou=Nc(Yt);function su(e){return new ou.default(e)}(function(e){e.HttpsProxyAgent=ou.default,e.prototype=ou.default.prototype})(su||(su={}));var Lc=su,Gc=De(Lc);const zc=e=>{if(!e||e.length===0)return"";const t=e.map(r=>r.trim()).filter(Boolean);if(t.length===0)return"";const u=t.slice(0,12),n=t.length-u.length;return["Changed files:",...u.map(r=>`- ${r}`),...n>0?[`- ...and ${n} more file(s)`]:[]].join(`
|
|
87
|
+
`)},Wc=e=>["Generate a git commit message for the provided code diff.","The output will be passed directly into git commit.","Return ONLY the final commit message text.","Do not add explanations, quotes, markdown fences, or surrounding commentary.","You may use the changed file list as supporting context, but the diff is the source of truth.",...e.diffWasCompacted?["The diff may be compacted to fit the model context. Infer the dominant outcome from the available patches without pretending to have seen omitted content."]:[],zc(e.changedFiles),"Markdown instructions:",e.messageInstructionsMarkdown.trim()].filter(Boolean).join(`
|
|
88
|
+
|
|
89
|
+
`),Uc="<think>",qc="</think>",Ve=()=>({carry:"",inReasoningBlock:!1}),Hc=(e,t)=>{const u=Math.min(e.length,t.length-1);for(let n=u;n>0;n-=1)if(t.startsWith(e.slice(-n)))return n;return 0},iu=(e,t)=>{let u=`${t.carry}${e}`;const n={carry:"",inReasoningBlock:t.inReasoningBlock};let r="",o="";for(;u.length>0;){const D=n.inReasoningBlock?qc:Uc,i=u.indexOf(D);if(i===-1){const c=Hc(u,D),f=u.slice(0,u.length-c);n.inReasoningBlock?o+=f:r+=f,n.carry=u.slice(u.length-c);break}const s=u.slice(0,i);n.inReasoningBlock?o+=s:r+=s,n.inReasoningBlock=!n.inReasoningBlock,u=u.slice(i+D.length)}return{content:r,reasoning:o,state:n}},hD=e=>({content:e.inReasoningBlock?"":e.carry,reasoning:e.inReasoningBlock?e.carry:"",state:Ve()}),Kc=e=>{let t=Ve(),u="",n="";for(const o of e){const D=iu(o,t);u+=D.content,n+=D.reasoning,t=D.state}const r=hD(t);return u+=r.content,n+=r.reasoning,{content:u,reasoning:n}},Jc=e=>Kc([e]).content,gD=async(e,t,u,n,r,o,D,i)=>new Promise((s,c)=>{const f=JSON.stringify(n),l={port:D??443,hostname:e,path:t,method:"POST",headers:{...u,"Content-Type":"application/json","Content-Length":Buffer.byteLength(f)},timeout:r,agent:o?Gc(o):void 0},a=HD.request(l,d=>{const F=[];d.on("data",p=>{F.push(p),i?.(p.toString())}),d.on("end",()=>{s({request:a,response:d,data:Buffer.concat(F).toString()})})});a.on("error",c),a.on("timeout",()=>{a.destroy(),c(new m(`Time out error: request took over ${r}ms. Try increasing the \`timeout\` config, or checking your API provider status.`))}),a.write(f),a.end()}),ED=(e,t)=>{if(!e?.trim())throw new m("Please set your API base URL via `aicommits config set base-url=<https://...>`");const u=e.trim(),n=new URL(u),r=n.pathname.replace(/\/+$/,"");return{hostname:n.hostname,port:n.port?Number(n.port):443,path:`${r}${t}`}},Vc=e=>ED(e,"/chat/completions"),Yc=e=>ED(e,"/responses"),Zc=async(e,t,u,n,r,o,D)=>{const i={...t,...D,stream:!0};let s="";const c=new Map,f=E=>{if(!o)return;const v=Array.isArray(E.choices)?E.choices:[];for(const B of v){if(typeof B!="object"||B===null)continue;const{delta:x}=B;if(typeof x!="object"||x===null)continue;const g=x,w=typeof g.reasoning_content=="string"?g.reasoning_content:typeof g.reasoning=="string"?g.reasoning:"";if(w&&o({kind:"reasoning",text:w}),typeof g.content=="string"&&g.content.length>0){const Y=typeof B.index=="number"?B.index:0;if(w){o({kind:"content",text:g.content});continue}const le=c.get(Y)||Ve(),P=iu(g.content,le);c.set(Y,P.state),P.reasoning&&o({kind:"reasoning",text:P.reasoning}),P.content&&o({kind:"content",text:P.content})}}},l=E=>{if(!o)return;s+=E.replace(/\r\n/g,`
|
|
90
|
+
`);let v=s.indexOf(`
|
|
91
|
+
|
|
92
|
+
`);for(;v!==-1;){const B=s.slice(0,v);s=s.slice(v+2);for(const x of B.split(`
|
|
93
|
+
`)){const g=x.trim();if(!g.startsWith("data:"))continue;const w=g.slice(5).trim();if(!(!w||w==="[DONE]"))try{const Y=JSON.parse(w);f(Y)}catch{}}v=s.indexOf(`
|
|
94
|
+
|
|
95
|
+
`)}},a=Vc(r),{response:d,data:F}=await gD(a.hostname,a.path,{Authorization:`Bearer ${e}`},i,u,n,a.port,l);if(!d.statusCode||d.statusCode<200||d.statusCode>299){let E=`API Error: ${d.statusCode} - ${d.statusMessage}`;throw F&&(E+=`
|
|
96
|
+
|
|
97
|
+
${F}`),new m(E)}const p=F.trim();if(!p)throw new m("API Error: Empty response body");if(p.startsWith("{")){const E=JSON.parse(p),v=Array.isArray(E.choices)?E.choices:[];return{model:typeof E.model=="string"?E.model:"",choices:v.map((B,x)=>{const g=typeof B=="object"&&B!==null?B:{},w=typeof g.message=="object"&&g.message!==null?g.message:{};return{index:typeof g.index=="number"?g.index:x,finish_reason:typeof g.finish_reason=="string"||g.finish_reason===null?g.finish_reason:void 0,message:{role:typeof w.role=="string"?w.role:"assistant",content:typeof w.content=="string"?w.content:"",...typeof w.reasoning_content=="string"?{reasoning_content:w.reasoning_content}:{}}}})}}const C=[];for(const E of p.split(/\r?\n/)){const v=E.trim();if(!v.startsWith("data:"))continue;const B=v.slice(5).trim();if(!(!B||B==="[DONE]"))try{C.push(JSON.parse(B))}catch{}}if(C.length===0)throw new m("API Error: Unable to parse streamed response");const h=C.find(E=>typeof E.error=="object"&&E.error!==null);if(h?.error&&typeof h.error=="object"&&h.error!==null){const E="message"in h.error&&typeof h.error.message=="string"?h.error.message:JSON.stringify(h.error);throw new m(`API Error: ${E}`)}const y=C.find(E=>typeof E.model=="string")||C[0],A=new Map,_=new Map;for(const E of C){const v=Array.isArray(E.choices)?E.choices:[];for(const B of v){if(typeof B!="object"||B===null)continue;const x=B,g=typeof x.index=="number"?x.index:0,w=A.get(g)||{index:g,contentParts:[],reasoningParts:[]},{delta:Y}=x;if(typeof Y=="object"&&Y!==null){const P=Y;if(typeof P.role=="string"&&(w.role=P.role),typeof P.content=="string")if(typeof P.reasoning_content=="string"||typeof P.reasoning=="string")w.contentParts.push(P.content);else{const kD=_.get(g)||Ve(),fe=iu(P.content,kD);_.set(g,fe.state),fe.content&&w.contentParts.push(fe.content),fe.reasoning&&w.reasoningParts.push(fe.reasoning)}typeof P.reasoning_content=="string"&&w.reasoningParts.push(P.reasoning_content),typeof P.reasoning=="string"&&w.reasoningParts.push(P.reasoning)}const le=x.finish_reason;(typeof le=="string"||le===null)&&(w.finishReason=le),A.set(g,w)}}for(const[E,v]of _.entries()){const B=A.get(E);if(!B)continue;const x=hD(v);x.content&&B.contentParts.push(x.content),x.reasoning&&B.reasoningParts.push(x.reasoning)}const j=Array.from(A.values()).sort((E,v)=>E.index-v.index).map(E=>{const v={role:E.role||"assistant",content:E.contentParts.join("")},B=E.reasoningParts.join("");return B&&(v.reasoning_content=B),{index:E.index,finish_reason:E.finishReason??"stop",message:v}});if(j.length===0)throw new m("API Error: Streamed response did not include any choices");return{model:typeof y.model=="string"?y.model:"",choices:j}},Xc=(e,t)=>({model:e,messages:t}),Qc=(e,t,u)=>({model:e,instructions:t,input:u}),yD=e=>Array.isArray(e)?e.flatMap(t=>{if(typeof t!="object"||t===null)return[];const u="text"in t&&typeof t.text=="string"?t.text:"";return u?[u]:[]}).join(""):"",BD=e=>{const t=Array.isArray(e.output)?e.output:[],u=t.filter(r=>r?.type==="message"||r?.role==="assistant").map(r=>yD(r.content)).join(""),n=t.filter(r=>r?.type==="reasoning").map(r=>yD(r.summary)).join("");return{model:typeof e.model=="string"?e.model:"",choices:[{index:0,finish_reason:"stop",message:{role:"assistant",content:u,...n?{reasoning_content:n}:{}}}]}},el=e=>{const t=e.find(r=>r.type==="response.completed");if(t&&typeof t.response=="object"&&t.response!==null)return BD(t.response);const u=e.filter(r=>typeof r.type=="string"&&r.type.includes("output_text")&&r.type.endsWith(".delta")&&typeof r.delta=="string").map(r=>r.delta).join(""),n=e.filter(r=>typeof r.type=="string"&&r.type.includes("reasoning")&&r.type.endsWith(".delta")&&typeof r.delta=="string").map(r=>r.delta).join("");return{model:"",choices:[{index:0,finish_reason:"stop",message:{role:"assistant",content:u,...n?{reasoning_content:n}:{}}}]}},tl=async(e,t,u,n,r,o,D)=>{const i={...t,...D,stream:!0};let s="";const c=h=>{if(!(!o||typeof h.type!="string")){if(h.type.includes("reasoning")&&h.type.endsWith(".delta")&&typeof h.delta=="string"){o({kind:"reasoning",text:h.delta});return}h.type.includes("output_text")&&h.type.endsWith(".delta")&&typeof h.delta=="string"&&o({kind:"content",text:h.delta})}},f=h=>{if(!o)return;s+=h.replace(/\r\n/g,`
|
|
94
98
|
`);let y=s.indexOf(`
|
|
95
99
|
|
|
96
|
-
`);for(;y!==-1;){const
|
|
97
|
-
`)){const
|
|
100
|
+
`);for(;y!==-1;){const A=s.slice(0,y);s=s.slice(y+2);for(const _ of A.split(`
|
|
101
|
+
`)){const j=_.trim();if(!j.startsWith("data:"))continue;const E=j.slice(5).trim();if(!(!E||E==="[DONE]"))try{c(JSON.parse(E))}catch{}}y=s.indexOf(`
|
|
98
102
|
|
|
99
|
-
`)}},
|
|
103
|
+
`)}},l=Yc(r),{response:a,data:d}=await gD(l.hostname,l.path,{Authorization:`Bearer ${e}`},i,u,n,l.port,f);if(!a.statusCode||a.statusCode<200||a.statusCode>299){let h=`API Error: ${a.statusCode} - ${a.statusMessage}`;throw d&&(h+=`
|
|
100
104
|
|
|
101
|
-
${d}`),new h
|
|
102
|
-
`),
|
|
103
|
-
`).map(
|
|
104
|
-
`).
|
|
105
|
-
`).trim();return{title:n,body:r}},Ae=(e,t)=>t?`${e}
|
|
105
|
+
${d}`),new m(h)}const F=d.trim();if(!F)throw new m("API Error: Empty response body");if(F.startsWith("{"))return BD(JSON.parse(F));const p=[];for(const h of F.split(/\r?\n/)){const y=h.trim();if(!y.startsWith("data:"))continue;const A=y.slice(5).trim();if(!(!A||A==="[DONE]"))try{p.push(JSON.parse(A))}catch{}}if(p.length===0)throw new m("API Error: Unable to parse streamed response");const C=p.find(h=>h.type==="error"||typeof h.error=="object"&&h.error!==null);if(C){if(typeof C.error=="object"&&C.error!==null){const h="message"in C.error&&typeof C.error.message=="string"?C.error.message:JSON.stringify(C.error);throw new m(`API Error: ${h}`)}if(typeof C.message=="string")throw new m(`API Error: ${C.message}`)}return el(p)},au=e=>e.replace(/\r\n?/g,`
|
|
106
|
+
`),ul=e=>{const t=e.match(/```[\w-]*\n([\s\S]*?)```/);return t?.[1]?t[1].trim():e.replace(/```/g,"").trim()},nl=e=>e.trim().replace(/^title:\s*/i,"").replace(/(\w)\.$/,"$1").replace(/^["'`]|["'`]$/g,""),Dl=e=>{const t=au(e).trim();if(!t)return{title:"",body:""};const u=t.split(`
|
|
107
|
+
`).map(o=>o.replace(/\s+$/g,""));for(;u[0]?.trim()==="";)u.shift();const n=nl(u.shift()||"");for(;u[0]?.trim()==="";)u.shift();u[0]?.trim().toLowerCase().startsWith("body:")&&(u[0]=u[0].replace(/^body:\s*/i,""));const r=u.join(`
|
|
108
|
+
`).trim();return{title:n,body:r}},rl=(e,t)=>t?`${e}
|
|
106
109
|
|
|
107
|
-
${t}`:e,
|
|
108
|
-
`)
|
|
109
|
-
`);return
|
|
110
|
-
|
|
111
|
-
${
|
|
112
|
-
${f}`.slice(0,t):e.slice(0,t)},el=(e,t=FD)=>{const u=rD(e).trim();if(!u)return u;if(t<=0)return"";const n=Je.length+2;if(u.length<=t)return u;if(t<=n)return u.slice(0,t);const r=t-n,o=Qc(u);if(o.length<=1)return`${CD(u,r)}
|
|
110
|
+
${t}`:e,ol=(e,t,u,n)=>{const r=ul(e),{title:o,body:D}=Dl(r);if(!o)return"";const i=au(D).split(`
|
|
111
|
+
`).map(s=>s.replace(/\s+$/u,"")).join(`
|
|
112
|
+
`).trim();return i?rl(o,i):o},sl=["none","low","medium","high","xhigh"],Ye=e=>{if(typeof e!="string")return;const t=e.trim().toLowerCase();return sl.includes(t)?t:void 0},il=(e,t)=>{if(!e?.trim())return{};let u;try{u=JSON.parse(e)}catch{throw new m("Invalid config property request-options: Must be valid JSON")}if(typeof u!="object"||u===null||Array.isArray(u))throw new m("Invalid config property request-options: Must be a JSON object");const n={...u};if(delete n.model,delete n.messages,delete n.input,delete n.instructions,delete n.stream,t==="responses"){const o=Ye(n.reasoning_effort);return o&&(typeof n.reasoning!="object"||n.reasoning===null||Array.isArray(n.reasoning))?n.reasoning={effort:o}:o&&typeof n.reasoning=="object"&&n.reasoning!==null&&!Array.isArray(n.reasoning)&&Ye(n.reasoning.effort)===void 0&&(n.reasoning={...n.reasoning,effort:o}),delete n.reasoning_effort,delete n.max_completion_tokens,n}const r=typeof n.reasoning=="object"&&n.reasoning!==null&&!Array.isArray(n.reasoning)?Ye(n.reasoning.effort):void 0;return r&&Ye(n.reasoning_effort)===void 0&&(n.reasoning_effort=r),delete n.reasoning,delete n.max_output_tokens,n},al=(e,t,u)=>{const n=il(e,t);if(!u)return n;if(t==="responses"){const r=typeof n.reasoning=="object"&&n.reasoning!==null&&!Array.isArray(n.reasoning)?n.reasoning:{};return{...n,reasoning:{...r,effort:u}}}return{...n,reasoning_effort:u}},cl=e=>Array.from(new Set(e)),bD=12e4,ll=1024,fl=3,dl=900,Fl=700,pl=450,Cl=.85,Ze="[Diff compacted to fit model context. Each file is represented with abbreviated hunks when needed.]",wD="@@ ... patch content truncated ... @@",ml=(e=0)=>{if(!Number.isInteger(e)||e<=0)return bD;const t=dl+Fl+pl,u=Math.floor((e-t)*Cl),n=Math.max(128,u);return Math.max(ll,n*fl)},hl=e=>{const t=/^diff --git .+$/gm,u=Array.from(e.matchAll(t));if(u.length===0)return[e];const n=[],r=u[0]?.index??0;if(r>0){const o=e.slice(0,r).trim();o&&n.push(o)}for(const[o,D]of u.entries()){const i=D.index??0,s=u[o+1]?.index??e.length,c=e.slice(i,s).trim();c&&n.push(c)}return n},AD=(e,t)=>{if(t<=0)return"";if(e.length<=t)return e;const u=wD.length+2;if(t<=u)return e.slice(0,t);const n=t-u,r=Math.floor(n*.7),o=Math.min(60,n),D=Math.min(40,Math.max(0,n-o)),i=Math.max(o,Math.min(r,n-D)),s=n-i;if(s<=0)return e.slice(0,t);const c=e.slice(0,i).trimEnd(),f=e.slice(-s).trimStart();return f?`${c}
|
|
113
|
+
${wD}
|
|
114
|
+
${f}`.slice(0,t):e.slice(0,t)},gl=(e,t=bD)=>{const u=au(e).trim();if(!u)return u;if(t<=0)return"";const n=Ze.length+2;if(u.length<=t)return u;if(t<=n)return u.slice(0,t);const r=t-n,o=hl(u);if(o.length<=1)return`${AD(u,r)}
|
|
113
115
|
|
|
114
|
-
${
|
|
116
|
+
${Ze}`;const D=`
|
|
115
117
|
|
|
116
|
-
`,i=D.length*Math.max(0,o.length-1),s=Math.max(1,r-i),
|
|
118
|
+
`,i=D.length*Math.max(0,o.length-1),s=Math.max(1,r-i),c=Math.max(1,Math.floor(s/o.length));return`${o.map(a=>AD(a,c)).filter(Boolean).join(D)}
|
|
117
119
|
|
|
118
|
-
${
|
|
119
|
-
`)
|
|
120
|
-
`)
|
|
121
|
-
`);
|
|
122
|
-
`)
|
|
123
|
-
`);
|
|
124
|
-
|
|
125
|
-
`)}
|
|
126
|
-
${
|
|
127
|
-
`)
|
|
128
|
-
|
|
129
|
-
`)
|
|
130
|
-
`)}`)),process.stdout.write(I.text)}};let z;try{z=await mD(p["api-key"],p.model,p.locale,C.diff,p.generate,p["max-length"],p.type,p.timeout,p.proxy,{...m,onStreamEvent:G},p["base-url"])}finally{E?.(),b?O.stop("Changes analyzed"):w&&process.stdout.write(`
|
|
131
|
-
`)}if(z.length===0)throw new h("No commit messages were generated. Try again.");let R;if(c)[R]=z;else try{if(z.length===1){[R]=z;const I=await Qs({message:`Use this commit message?
|
|
120
|
+
${Ze}`},vD=async(e,t,u,n,r,o,D,i)=>{const s=D??{messageInstructionsMarkdown:""},c=s.apiMode??"responses",f=al(s.requestOptionsJson,c,s.reasoningEffort),l=ml(s.contextWindowTokens),a=gl(u,l),d=a.includes(Ze);try{const F=Wc({messageInstructionsMarkdown:s.messageInstructionsMarkdown||"",changedFiles:s.changedFiles,diffWasCompacted:d}),p=Math.max(1,n),h=(await Promise.all(Array.from({length:p},()=>c==="responses"?tl(e,Qc(t,F,a),r,o,i,y=>s.onStreamEvent?.({phase:"message",...y}),f):Zc(e,Xc(t,[{role:"system",content:F},{role:"user",content:a}]),r,o,i,y=>s.onStreamEvent?.({phase:"message",...y}),f)))).flatMap(y=>y.choices).flatMap(y=>{const A=y.message?.content;if(typeof A!="string")return[];const _=ol(Jc(A));return _?[_]:[]});return cl(h)}catch(F){const p=F;throw p.code==="ENOTFOUND"?new m(`Error connecting to ${p.hostname} (${p.syscall}). Are you connected to the internet?`):p}},$D=()=>{const e=["|","/","-","\\"],t=process.stdout.isTTY?120:1e4;let u=0,n="",r=!1,o;const D=Ai("\u2502"),i=c=>{if(!process.stdout.isTTY){process.stdout.write(`${c}
|
|
121
|
+
`);return}process.stdout.write(`\r\x1B[2K${c}`)},s=()=>{const c=e[u];i(`${wi("\u25C6")} ${c} ${n}`),u=(u+1)%e.length};return{start(c){if(n=c,r){s();return}if(r=!0,process.stdout.isTTY){process.stdout.write(`${D}
|
|
122
|
+
`),s(),o=setInterval(s,t);return}i(n)},update(c){n=c,!(!r||!process.stdout.isTTY)&&s()},stop(c){if(r){if(r=!1,o&&(clearInterval(o),o=void 0),process.stdout.isTTY){const f=c.split(/\r?\n/),l=f.shift()??"";process.stdout.write(`\r\x1B[2K${Ge("\u25C6")} ${l}
|
|
123
|
+
`);for(const a of f)process.stdout.write(`${D} ${a}
|
|
124
|
+
`);return}process.stdout.write(`${c}
|
|
125
|
+
`)}}}},El=e=>e.replace(/\s+$/u,""),xD=async(e,t,u)=>{if(!t)return e;const n=await U(t,[],{cwd:u.cwd,input:e,reject:!1,env:{AICOMMITS_CWD:u.cwd,AICOMMITS_CONFIG_DIR:u.configDirectoryPath,AICOMMITS_MESSAGE_FILE:u.messageFilePath,AICOMMITS_CANDIDATE_INDEX:String(u.candidateIndex),AICOMMITS_CANDIDATE_COUNT:String(u.candidateCount),AICOMMITS_COMMIT_SOURCE:u.commitSource}});if(n.exitCode!==0){const o=n.stderr.trim();throw new m(o?`Post-response script failed: ${o}`:`Post-response script failed with exit code ${n.exitCode}.`)}const r=El(n.stdout);if(!r)throw new m("Post-response script produced an empty commit message.");return r},yl=e=>{const t=Math.max(0,Math.floor(e/1e3)),u=Math.floor(t/3600),n=Math.floor(t%3600/60),r=t%60;return u>0?`${u}h ${n}m ${r}s`:n>0?`${n}m ${r}s`:`${r}s`},Bl=(e,t)=>{const u=Date.now(),n=1e3,r=()=>e.update(`The AI (${t}) is thinking for ${yl(Date.now()-u)}`);r();const o=setInterval(r,n);return()=>clearInterval(o)};var bl=async(e,t,u,n,r,o,D,i,s,c,f)=>(async()=>{fa(vi(bi(" aicommits "))),await Ln();const l=$D();u&&await U("git",["add","--update"]),l.start("Detecting git changes");const a=await ba(t);if(!a)throw l.stop("Detecting git changes"),new m("No staged changes found. Stage your changes manually, or automatically stage all changes with the `--all` flag.");l.stop(`${wa(a.files,a.source)}:
|
|
126
|
+
${a.files.map(g=>` ${g}`).join(`
|
|
127
|
+
`)}`);const d=await Vt({generate:e?.toString(),"show-reasoning":n===!0?"true":void 0,"reasoning-effort":r,"api-mode":o,"message-path":D,"post-response-script":i,"base-url":s}),F={messageInstructionsMarkdown:d.messageInstructionsMarkdown,reasoningEffort:d["reasoning-effort"],requestOptionsJson:d["request-options"],apiMode:d["api-mode"],contextWindowTokens:d["context-window"],changedFiles:a.files},p=d["show-reasoning"]===!0,C=$D();C.start(`The AI (${d.model}) is analyzing your changes`);let h,y=!1,A=!0,_=!1,j;const E={message:"Message Generation"},v=g=>{if(!(g.kind!=="reasoning"||!g.text)){if(!p){y||(h=Bl(C,d.model),y=!0);return}A&&(C.stop(`The AI (${d.model}) is thinking`),A=!1),_||(process.stdout.write(`${ge(`
|
|
128
|
+
The AI (${d.model}) is thinking`)}
|
|
129
|
+
`),_=!0),g.phase!==j&&(j=g.phase,process.stdout.write(`${ge(`[${E[g.phase]}]
|
|
130
|
+
`)}`)),process.stdout.write(g.text)}};let B;try{B=await vD(d["api-key"],d.model,a.diff,d.generate,d.timeout,d.proxy,{...F,onStreamEvent:v},d["base-url"])}finally{h?.(),A?C.stop("Changes analyzed"):p&&process.stdout.write(`
|
|
131
|
+
`)}if(B.length===0)throw new m("No commit messages were generated. Try again.");B=await Promise.all(B.map((g,w)=>xD(g,d.postResponseScriptPath,{candidateCount:B.length,candidateIndex:w,commitSource:"cli",configDirectoryPath:d.configDirectoryPath,cwd:process.cwd(),messageFilePath:d.messageFilePath})));let x;if(c)[x]=B;else try{if(B.length===1){[x]=B;const g=await ca({message:`Use this commit message?
|
|
132
132
|
|
|
133
|
-
${
|
|
134
|
-
`});if(!
|
|
135
|
-
`;await
|
|
133
|
+
${x}
|
|
134
|
+
`});if(!g||Mn(g)){He("Commit cancelled");return}}else{const g=await la({message:`Pick a commit message to use: ${ge("(Ctrl+c to exit)")}`,options:B.map(w=>({label:w,value:w}))});if(Mn(g)){He("Commit cancelled");return}x=g}}catch(g){const w=g instanceof Error?g.message:"";throw w.includes("TTY initialization failed")||w.includes("uv_tty_init returned EINVAL")||w.includes("ERR_TTY_INIT_FAILED")?new m("Interactive terminal initialization failed in this environment. Re-run with `--confirm` or `--yes` to skip prompts."):g}a.source==="uncommitted"&&await U("git",["add","--all","--",...a.files]),await U("git",["commit","-m",x,...f]),He(`${Ge("\u2714")} Successfully committed!`)})().catch(l=>{He(`${St("\u2716")} ${l.message}`),Gt(l),process.exit(1)});const wl="prepare-commit-msg-hook",Al=()=>{const e=process.argv.slice(2);return e[0]===wl?e.slice(1):e},vl=async()=>{const{stdout:e}=await U("git",["rev-parse","--git-path","COMMIT_EDITMSG"],{reject:!1}),t=e.trim();return t===""?void 0:t},$l=async e=>$.readFile(e,"utf8").catch(t=>{if(t.code==="ENOENT")return"";throw t});var xl=()=>(async()=>{const[e,t]=Al(),u=e?.trim()||await vl();if(!u)return;const n=await $l(u);if(t==="message"&&n.trim()!=="")return;const o=await qn();if(!o)return;const D=await Vt({}),i={messageInstructionsMarkdown:D.messageInstructionsMarkdown,reasoningEffort:D["reasoning-effort"],requestOptionsJson:D["request-options"],apiMode:D["api-mode"],contextWindowTokens:D["context-window"],changedFiles:o.files},s=await vD(D["api-key"],D.model,o.diff,D.generate,D.timeout,D.proxy,i,D["base-url"]);if(s.length===0)return;const c=s[0]?.trim();if(!c)return;let f=c;try{f=await xD(c,D.postResponseScriptPath,{candidateCount:1,candidateIndex:0,commitSource:"hook",configDirectoryPath:D.configDirectoryPath,cwd:process.cwd(),messageFilePath:D.messageFilePath})}catch{}const l=`${f}
|
|
135
|
+
`;await $.writeFile(u,l),process.stdout.write(l)})().catch(()=>{});const Sl=e=>{const t=e.indexOf("=");if(t<=0)throw new m(`Invalid config assignment: "${e}". Use <key>=<value>.`);return[e.slice(0,t),e.slice(t+1)]};var Ol=Nu({name:"config",parameters:["<mode>","<key=value...>"]},e=>{(async()=>{const{mode:t,keyValue:u}=e._;if(t==="get"){const n=await Vt({},!0);for(const r of u){const o=sD(r);o&&Qn(n,o)&&console.log(`${o}=${n[o]}`)}return}if(t==="set"){await dc(u.map(Sl));return}throw new m(`Invalid mode: ${t}`)})().catch(t=>{console.error(`${St("\u2716")} ${t.message}`),Gt(t),process.exit(1)})});const Il=e=>$.lstat(e).then(()=>!0,()=>!1),cu="prepare-commit-msg",Ml="prepare-commit-msg-hook",Tl=`/hooks/${cu}`,SD=new URL(import.meta.url.endsWith(".ts")?"../cli.ts":"../cli.mjs",import.meta.url),OD=hu(SD),kl=import.meta.url.endsWith(".ts")?new URL("../../node_modules/tsx/dist/cli.mjs",import.meta.url):SD,Pl=hu(kl),ID=`
|
|
136
136
|
#!/usr/bin/env node
|
|
137
|
-
process.argv.splice(2, 0, ${JSON.stringify(
|
|
138
|
-
import(${JSON.stringify(
|
|
139
|
-
|
|
137
|
+
process.argv.splice(2, 0, ${JSON.stringify(Ml)});
|
|
138
|
+
${import.meta.url.endsWith(".ts")?`process.argv.splice(2, 0, ${JSON.stringify(OD)});`:""}
|
|
139
|
+
import(${JSON.stringify(YD(Pl))})
|
|
140
|
+
`.trim(),Rl=(process.argv[1]||"").replace(/\\/g,"/").endsWith(Tl),MD=async e=>await $.readFile(e,"utf8").catch(()=>{})===ID,TD=async e=>await $.realpath(e).catch(()=>{})===OD;var _l=Nu({name:"hook",parameters:["<install/uninstall>"]},e=>{(async()=>{const t=await Ln(),{installUninstall:u}=e._,n=await ma("hooks",t),r=N.join(n,cu),o=await Il(r);if(u==="install"){if(o){if(await MD(r)){console.warn("The hook is already installed");return}if(await TD(r))await $.rm(r);else throw new m(`A different ${cu} hook seems to be installed. Please remove it before installing aicommits.`)}await $.mkdir(N.dirname(r),{recursive:!0}),await $.writeFile(r,ID),await $.chmod(r,493),console.log(`${Ge("\u2714")} Hook installed`);return}if(u==="uninstall"){if(!o){console.warn("Hook is not installed");return}if(!(await MD(r)||await TD(r))){console.warn("Hook is not installed");return}await $.rm(r),console.log(`${Ge("\u2714")} Hook uninstalled`);return}throw new m(`Invalid mode: ${u}`)})().catch(t=>{console.error(`${St("\u2716")} ${t.message}`),Gt(t),process.exit(1)})});const jl=_n(),Xe=process.argv.slice(2),Nl=Xe[0]==="prepare-commit-msg-hook",Ll=[{flag:"--type",matches:["--type","-t"]},{flag:"--details",matches:["--details"]},{flag:"--details-style",matches:["--details-style"]},{flag:"--instructions",matches:["--instructions"]},{flag:"--conventional-format",matches:["--conventional-format"]},{flag:"--conventional-types",matches:["--conventional-types"]},{flag:"--conventional-scope",matches:["--conventional-scope"]}];Co({name:"aicommits",flags:{generate:{type:Number,description:"Number of messages to generate (Warning: generating multiple costs more) (default: 1)",alias:"g"},exclude:{type:[String],description:"Files to exclude from AI analysis",alias:"x"},all:{type:Boolean,description:"Automatically stage changes in tracked files for the commit",alias:"a",default:!1},type:{type:String,description:"Git commit message format (default: plain). Supports conventional",alias:"t"},details:{type:Boolean,description:"Generate commit message details/body in addition to the title"},showReasoning:{type:Boolean,description:"Stream and print model reasoning while generating messages"},reasoningEffort:{type:String,description:"Reasoning effort to request: none, low, medium, high, or xhigh"},apiMode:{type:String,description:"API mode to use: responses (default) or chat"},messageFile:{type:String,description:"Markdown file used to guide commit message generation"},postResponseScript:{type:String,description:"Executable script that can rewrite the AI response via stdin/stdout"},baseUrl:{type:String,description:"API base URL for Responses API (default) or Chat Completions (for example https://api.openai.com/v1)"},confirm:{type:Boolean,description:"Skip interactive confirmation/selection prompts and use the first generated message",alias:"y",default:!1},yes:{type:Boolean,description:"Alias for --confirm",default:!1},version:{type:Boolean,description:"Show version number",alias:"v"}},commands:[Ol,_l],help:{description:ho},ignoreArgv:e=>e==="unknown-flag"||e==="argument"},e=>{if(e.flags.type!==void 0)throw new m(Wt("--type"));if(e.flags.details!==void 0)throw new m(Wt("--details"));for(const{flag:t,matches:u}of Ll)if(Xe.some(n=>u.some(r=>n===r||n.startsWith(`${r}=`))))throw new m(Wt(t));e.flags.version&&(console.log(jl),process.exit(0)),Rl||Nl?xl():bl(e.flags.generate,e.flags.exclude,e.flags.all,e.flags.showReasoning,e.flags.reasoningEffort,e.flags.apiMode,e.flags.messageFile,e.flags.postResponseScript,e.flags.baseUrl,e.flags.confirm||e.flags.yes,Xe)},Xe);
|