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