@sugarmo/aicommits 1.13.2 → 1.13.4
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 +13 -8
- package/dist/cli.mjs +98 -98
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -74,9 +74,17 @@ aicommits --generate <i> # or -g <i>
|
|
|
74
74
|
|
|
75
75
|
> Warning: this uses more tokens, meaning it costs more.
|
|
76
76
|
|
|
77
|
-
####
|
|
77
|
+
#### Non-interactive environments (Git GUI, external clients, CI)
|
|
78
78
|
|
|
79
|
-
If
|
|
79
|
+
If your environment does not provide an interactive TTY, skip prompts explicitly:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
aicommits --confirm # or -y / --yes
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
#### Generate title + optional details
|
|
86
|
+
|
|
87
|
+
Enable `details` when you want a body only when the title is not clear enough on its own:
|
|
80
88
|
|
|
81
89
|
```sh
|
|
82
90
|
aicommits --details
|
|
@@ -292,7 +300,7 @@ aicommits config set type=conventional
|
|
|
292
300
|
|
|
293
301
|
Default: `false`
|
|
294
302
|
|
|
295
|
-
Set this to `true` to
|
|
303
|
+
Set this to `true` to allow optional body details. If the title already explains the change clearly, it can still return title only:
|
|
296
304
|
|
|
297
305
|
```sh
|
|
298
306
|
aicommits config set details=true
|
|
@@ -377,12 +385,9 @@ Video coming soon where I rebuild it from scratch to show you how to easily buil
|
|
|
377
385
|
|
|
378
386
|
## Maintainers
|
|
379
387
|
|
|
380
|
-
- **
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
- **Hiroki Osame**: [@privatenumber](https://github.com/privatenumber) [<img src="https://img.shields.io/twitter/follow/privatenumbr?style=flat&label=privatenumbr&logo=twitter&color=0bf&logoColor=fff" align="center">](https://twitter.com/privatenumbr)
|
|
388
|
+
- **Steven Mok**: [@sugarmo](https://github.com/sugarmo)
|
|
384
389
|
|
|
385
390
|
|
|
386
391
|
## Contributing
|
|
387
392
|
|
|
388
|
-
If you want to help fix a bug or implement a feature in [Issues](https://github.com/
|
|
393
|
+
If you want to help fix a bug or implement a feature in [Issues](https://github.com/sugarmo/aicommits/issues), checkout the [Contribution Guide](CONTRIBUTING.md) to learn how to setup and test the project.
|
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 Qu,{ChildProcess as Cn}from"node:child_process";import T,{stdin as dn,stdout as pn}from"node:process";import mn from"child_process";import z from"path";import He from"fs";import{fileURLToPath as et}from"node:url";import hn,{constants as ut}from"node:os";import tt from"assert";import Dt from"events";import{createWriteStream as En,createReadStream as gn}from"node:fs";import yn from"buffer";import Ve from"stream";import nt from"util";import{debuglog as Bn}from"node:util";import rt from"node:readline";import{WriteStream as bn}from"node:tty";import _ from"fs/promises";import ve from"os";import wn from"https";import An from"net";import vn from"tls";import $n,{fileURLToPath as xn,pathToFileURL as Sn}from"url";const Tn="known-flag",On="unknown-flag",Pn="argument",{stringify:ae}=JSON,In=/\B([A-Z])/g,kn=e=>e.replace(In,"-$1").toLowerCase(),{hasOwnProperty:Mn}=Object.prototype,ce=(e,u)=>Mn.call(e,u),Rn=e=>Array.isArray(e),ot=e=>typeof e=="function"?[e,!1]:Rn(e)?[e[0],!0]:ot(e.type),jn=(e,u)=>e===Boolean?u!=="false":u,_n=(e,u)=>typeof u=="boolean"?u:e===Number&&u===""?Number.NaN:e(u),Ln=/[\s.:=]/,Nn=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(Ln);if(t)throw new Error(`${u} cannot contain ${ae(t?.[0])}`)},Gn=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;Nn(D);const r=e[D],o=[[],...ot(r),r];t(D,o);const n=kn(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},zn=(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="--",Wn=/[.:=]/,Un=/^-{1,2}\w/,qn=e=>{if(!Un.test(e))return;const u=!e.startsWith($e);let t=e.slice(u?1:2),D;const r=t.match(Wn);if(r){const{index:o}=r;D=t.slice(o+1),t=t.slice(0,o)}return[t,D,u]},Hn=(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=qn(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()},Vn=(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)}},Kn=(e,u=process.argv.slice(2),{ignore:t}={})=>{const D=[],r=Gn(e),o={},n=[];return n[$e]=[],Hn(u,{onFlag(i,s,c){const f=ce(r,i);if(!t?.(f?Tn:On,i,s)){if(f){const[a,l]=r[i],F=jn(l,s),C=(p,d)=>{D.push(c),d&&D.push(d),a.push(_n(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?.(Pn,u[s[0]])||(n.push(...i),c?(n[$e]=i,u.splice(s[0])):D.push(s))}}),Vn(u,D),{flags:zn(e,r),unknownFlags:o,_:n}};var Jn=Object.create,xe=Object.defineProperty,Yn=Object.defineProperties,Zn=Object.getOwnPropertyDescriptor,Xn=Object.getOwnPropertyDescriptors,Qn=Object.getOwnPropertyNames,it=Object.getOwnPropertySymbols,er=Object.getPrototypeOf,st=Object.prototype.hasOwnProperty,ur=Object.prototype.propertyIsEnumerable,at=(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={}))st.call(u,t)&&at(e,t,u[t]);if(it)for(var t of it(u))ur.call(u,t)&&at(e,t,u[t]);return e},Ke=(e,u)=>Yn(e,Xn(u)),tr=e=>xe(e,"__esModule",{value:!0}),Dr=(e,u)=>()=>(e&&(u=e(e=0)),u),nr=(e,u)=>()=>(u||e((u={exports:{}}).exports,u),u.exports),rr=(e,u,t,D)=>{if(u&&typeof u=="object"||typeof u=="function")for(let r of Qn(u))!st.call(e,r)&&(t||r!=="default")&&xe(e,r,{get:()=>u[r],enumerable:!(D=Zn(u,r))||D.enumerable});return e},or=(e,u)=>rr(tr(xe(e!=null?Jn(er(e)):{},"default",!u&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),j=Dr(()=>{}),ir=nr((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 sr=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 ar({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 ct(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(ar(),"")}j();function cr(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 lr=or(ir(),1);function K(e){if(typeof e!="string"||e.length===0||(e=ct(e),e.length===0))return 0;e=e.replace((0,lr.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+=cr(D)?2:1)}return u}var lt=e=>Math.max(...e.split(`
|
|
3
|
+
`).map(K)),fr=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=lt(t[o]);n>u[o]&&(u[o]=n)}}return u};j();var ft=/^\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"&&ft.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 Cr(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"&&ft.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 Ct=()=>Object.assign([],{columns:0});function dr(e,u){let t=[Ct()],[D]=t;for(let r of e){let o=r.width+r.horizontalPadding;D.columns+o>u&&(D=Ct(),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 pr(e,u,t){let D=Fr(t,u);return Cr(D,e),dr(D,e)}j(),j(),j();var Je=10,dt=(e=0)=>u=>`\x1B[${u+e}m`,pt=(e=0)=>u=>`\x1B[${38+e};5;${u}m`,mt=(e=0)=>(u,t,D)=>`\x1B[${38+e};2;${u};${t};${D}m`;function mr(){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=dt(),u.color.ansi256=pt(),u.color.ansi16m=mt(),u.bgColor.ansi=dt(Je),u.bgColor.ansi256=pt(Je),u.bgColor.ansi16m=mt(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 hr=mr(),Er=hr,Te=new Set(["\x1B","\x9B"]),gr=39,Ye="\x07",ht="[",yr="]",Et="m",Ze=`${yr}8;;`,gt=e=>`${Te.values().next().value}${ht}${e}${Et}`,yt=e=>`${Te.values().next().value}${Ze}${e}${Ye}`,Br=e=>e.split(" ").map(u=>K(u)),Xe=(e,u,t)=>{let D=[...u],r=!1,o=!1,n=K(ct(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===Et&&(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("")},wr=(e,u,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let D="",r,o,n=Br(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(`(?:\\${ht}(?<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===gr?void 0:F}else l.uri!==void 0&&(o=l.uri.length===0?void 0:l.uri)}let a=Er.codes.get(Number(r));s[c+1]===`
|
|
5
|
+
`?(o&&(D+=yt("")),r&&a&&(D+=gt(a))):f===`
|
|
6
|
+
`&&(r&&a&&(D+=gt(r)),o&&(D+=yt(o)))}return D};function Ar(e,u,t){return String(e).normalize().replace(/\r\n/g,`
|
|
7
7
|
`).split(`
|
|
8
|
-
`).map(D=>
|
|
9
|
-
`)}var
|
|
10
|
-
`);if(
|
|
8
|
+
`).map(D=>wr(D,u,t)).join(`
|
|
9
|
+
`)}var Bt=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)),lt(f)>s.width&&(f=Ar(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(...Bt(s.paddingTop)),s.paddingBottom&&a.push(...Bt(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 $r(e,u){if(!e||e.length===0)return"";let t=fr(e),D=t.length;if(D===0)return"";let{stdoutColumns:r,columns:o}=sr(u);if(o.length>D)throw new Error(`${o.length} columns defined, but only ${D} columns found`);let n=pr(r,o,t);return e.map(i=>vr(n,i)).join(`
|
|
13
|
+
`)}j();var xr=["<",">","=",">=","<="];function Sr(e){if(!xr.includes(e))throw new TypeError(`Invalid breakpoint operator: ${e}`)}function Tr(e){let u=Object.keys(e).map(t=>{let[D,r]=t.split(" ");Sr(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 Or=e=>e.replace(/[\W_]([a-z\d])?/gi,(u,t)=>t?t.toUpperCase():""),Pr=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 kr(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:`--${Pr(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)),wt=e=>{const u="parent"in e&&e.parent?.name;return(u?`${u} `:"")+e.name};function Mr(e){const u=[];e.name&&u.push(wt(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 Rr(e){const{help:u}=e;if(!(!u||!u.description))return{id:"description",type:"text",data:`${u.description}
|
|
15
|
+
`}}function jr(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=[wt(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 _r(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 Lr(e){if(!(!e.flags||Object.keys(e.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:kr(e.flags),indentBody:0}}}function Nr(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 Gr(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 zr=e=>[Mr,Rr,jr,_r,Lr,Nr,Gr].map(u=>u(e)).filter(Boolean),Wr=qe.WriteStream.prototype.hasColors();class Ur{text(u){return u}bold(u){return Wr?`\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 $r(u.map(r=>r.map(o=>this.render(o))),D?Tr(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:q}=JSON,qr=/[|\\{}()[\]^$+*?.]/;function eu(e){const u=[];let t,D;for(const r of e){if(D)throw new Error(`Invalid parameter: Spread parameter ${q(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 ${q(r)} cannot come after optional parameter ${q(t)}`);if(o==="["&&n==="]"&&(i=!1,t=r),i===void 0)throw new Error(`Invalid parameter: ${q(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(qr);if(f)throw new Error(`Invalid parameter: ${q(r)}. Invalid character found ${q(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=Or(o);if(s in e)throw new Error(`Invalid parameter: ${q(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 ${q(o)}
|
|
22
|
+
`),D(),process.exit(1);e[s]=c}}function Hr(e){return e===void 0||e!==!1}function At(e,u,t,D){const r={...u.flags},o=u.version;o&&(r.version={type:Boolean,description:"Show version"});const{help:n}=u,i=Hr(n);i&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const s=Kn(r,D,{ignore:u.ignoreArgv}),c=()=>{console.log(u.version)};if(o&&s.flags.version===!0)return c(),process.exit(0);const f=new Ur,a=i&&n?.render?n.render:C=>f.render(C),l=C=>{const p=zr({...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 Vr(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: ${q(n)}`);t.set(n,D)}}return t.get(e)}function Kr(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: ${q(e.name)}`);const D=t[0];if(e.commands&&D&&Qe(D)){const r=Vr(D,e.commands);if(r)return At(r.options.name,{...r.options,parent:e},r.callback,t.slice(1))}return At(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 Jr="1.13.4",Yr="Writes your git commit messages for you with AI",Zr="sugarmo/aicommits",I=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,$t;function Xr(){if($t)return tu;$t=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,xt;function Qr(){if(xt)return Du;xt=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"||I.TESTING_WINDOWS?Oe=Xr():Oe=Qr();var eo=nu;nu.sync=uo;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 uo(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",St=z,to=De?";":":",Tt=eo,Ot=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Pt=(e,u)=>{const t=u.colon||to,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}=Pt(e,u),n=[],i=c=>new Promise((f,a)=>{if(c===D.length)return u.all&&n.length?f(n):a(Ot(e));const l=D[c],F=/^".*"$/.test(l)?l.slice(1,-1):l,C=St.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];Tt(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)},Do=(e,u)=>{u=u||{};const{pathEnv:t,pathExt:D,pathExtExe:r}=Pt(e,u),o=[];for(let n=0;n<t.length;n++){const i=t[n],s=/^".*"$/.test(i)?i.slice(1,-1):i,c=St.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(Tt.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 Ot(e)};var no=It;It.sync=Do;var ru={exports:{}};const kt=(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=kt,ru.exports.default=kt;var ro=ru.exports;const Mt=z,oo=no,io=ro;function Rt(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=oo.sync(e.command,{path:t[io({env:t})],pathExt:u?Mt.delimiter:void 0})}catch{}finally{o&&process.chdir(D)}return n&&(n=Mt.resolve(r?e.options.cwd:"",n)),n}function so(e){return Rt(e)||Rt(e,!0)}var ao=so,ou={};const iu=/([()\][%!^"`<>&|;, *?])/g;function co(e){return e=e.replace(iu,"^$1"),e}function lo(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=co,ou.argument=lo;var fo=/^#!(.*)/;const Fo=fo;var Co=(e="")=>{const u=e.match(Fo);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,po=Co;function mo(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 po(t.toString())}var ho=mo;const Eo=z,jt=ao,_t=ou,go=ho,yo=process.platform==="win32",Bo=/\.(?:com|exe)$/i,bo=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function wo(e){e.file=jt(e);const u=e.file&&go(e.file);return u?(e.args.unshift(e.file),e.command=u,jt(e)):e.file}function Ao(e){if(!yo)return e;const u=wo(e),t=!Bo.test(u);if(e.options.forceShell||t){const D=bo.test(u);e.command=Eo.normalize(e.command),e.command=_t.command(e.command),e.args=e.args.map(o=>_t.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 vo(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:Ao(D)}var $o=vo;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 xo(e,u){if(!au)return;const t=e.emit;e.emit=function(D,r){if(D==="exit"){const o=Lt(r,u);if(o)return t.call(e,"error",o)}return t.apply(e,arguments)}}function Lt(e,u){return au&&e===1&&!u.file?cu(u.original,"spawn"):null}function So(e,u){return au&&e===1&&!u.file?cu(u.original,"spawnSync"):null}var To={hookChildProcess:xo,verifyENOENT:Lt,verifyENOENTSync:So,notFoundError:cu};const Nt=mn,lu=$o,fu=To;function Gt(e,u,t){const D=lu(e,u,t),r=Nt.spawn(D.command,D.args,D.options);return fu.hookChildProcess(r,D),r}function Oo(e,u,t){const D=lu(e,u,t),r=Nt.spawnSync(D.command,D.args,D.options);return r.error=r.error||fu.verifyENOENTSync(r.status,D),r}te.exports=Gt,te.exports.spawn=Gt,te.exports.sync=Oo,te.exports._parse=lu,te.exports._enoent=fu;var Po=te.exports,Io=ue(Po);function ko(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 zt(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 Mo=({cwd:e=T.cwd(),path:u=T.env[zt()],preferLocal:t=!0,execPath:D=T.execPath,addExecPath:r=!0}={})=>{const o=e instanceof URL?et(e):e,n=ee.resolve(o),i=[];return t&&Ro(i,n),r&&jo(i,D,n),[...i,u].join(ee.delimiter)},Ro=(e,u)=>{let t;for(;t!==u;)e.push(ee.join(u,"node_modules/.bin")),t=u,u=ee.resolve(u,"..")},jo=(e,u,t)=>{const D=u instanceof URL?et(u):u;e.push(ee.resolve(t,D,".."))},_o=({env:e=T.env,...u}={})=>{e={...e};const t=zt({env:e});return u.path=e[t],e[t]=Mo(u),e},Lo=(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);!No(r,o)&&D||Object.defineProperty(e,t,o)},No=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)},Go=(e,u)=>{const t=Object.getPrototypeOf(u);t!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,t)},zo=(e,u)=>`/* Wrapped ${e}*/
|
|
25
|
+
${u}`,Wo=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Uo=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),qo=(e,u,t)=>{const D=t===""?"":`with ${t.trim()}() `,r=zo.bind(null,D,u.toString());Object.defineProperty(r,"name",Uo),Object.defineProperty(e,"toString",{...Wo,value:r})};function Ho(e,u,{ignoreNonConfigurable:t=!1}={}){const{name:D}=e;for(const r of Reflect.ownKeys(u))Lo(e,u,r,t);return Go(e,u),qo(e,u,D),e}const Pe=new WeakMap,Wt=(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(Pe.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 Ho(o,e),Pe.set(o,D),o};Wt.callCount=e=>{if(!Pe.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Pe.get(e)};const Vo=()=>{const e=qt-Ut+1;return Array.from({length:e},Ko)},Ko=(e,u)=>({name:`SIGRT${u+1}`,number:Ut+u,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Ut=34,qt=64,Jo=[{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"}],Ht=()=>{const e=Vo();return[...Jo,...e].map(Yo)},Yo=({name:e,number:u,description:t,action:D,forced:r=!1,standard:o})=>{const{signals:{[e]:n}}=ut,i=n!==void 0;return{name:e,number:i?n:u,description:t,supported:i,action:D,forced:r,standard:o}},Zo=()=>{const e=Ht();return Object.fromEntries(e.map(Xo))},Xo=({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}],Qo=Zo(),ei=()=>{const e=Ht(),u=qt+1,t=Array.from({length:u},(D,r)=>ui(r,e));return Object.assign({},...t)},ui=(e,u)=>{const t=ti(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}}},ti=(e,u)=>{const t=u.find(({name:D})=>ut.signals[D]===e);return t!==void 0?t:u.find(D=>D.number===e)};ei();const Di=({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",Vt=({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:Qo[r].description,C=D&&D.code,d=`Command ${Di({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},Ie=["stdin","stdout","stderr"],ni=e=>Ie.some(u=>e[u]!==void 0),ri=e=>{if(!e)return;const{stdio:u}=e;if(u===void 0)return Ie.map(D=>e[D]);if(ni(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Ie.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,Ie.length);return Array.from({length:t},(D,r)=>u[r])};var ne={exports:{}},ke={exports:{}};ke.exports;var Kt;function oi(){return Kt||(Kt=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 A=I.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(A))ne.exports=function(){return function(){}};else{var ii=tt,le=oi(),si=/^win/i.test(A.platform),Me=Dt;typeof Me!="function"&&(Me=Me.EventEmitter);var R;A.__signal_exit_emitter__?R=A.__signal_exit_emitter__:(R=A.__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(I.process))return function(){};ii.equal(typeof e,"function","a callback must be provided for exit handler"),fe===!1&&Jt();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(I.process)||(fe=!1,le.forEach(function(u){try{A.removeListener(u,Cu[u])}catch{}}),A.emit=du,A.reallyExit=Yt,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(I.process)){var t=A.listeners(e);t.length===R.count&&(Fu(),re("exit",null,e),re("afterexit",null,e),si&&e==="SIGHUP"&&(e="SIGINT"),A.kill(A.pid,e))}}}),ne.exports.signals=function(){return le};var fe=!1,Jt=function(){fe||!J(I.process)||(fe=!0,R.count+=1,le=le.filter(function(u){try{return A.on(u,Cu[u]),!0}catch{return!1}}),A.emit=ci,A.reallyExit=ai)};ne.exports.load=Jt;var Yt=A.reallyExit,ai=function(u){J(I.process)&&(A.exitCode=u||0,re("exit",A.exitCode,null),re("afterexit",A.exitCode,null),Yt.call(A,A.exitCode))},du=A.emit,ci=function(u,t){if(u==="exit"&&J(I.process)){t!==void 0&&(A.exitCode=t);var D=du.apply(this,arguments);return re("exit",A.exitCode,null),re("afterexit",A.exitCode,null),D}else return du.apply(this,arguments)}}var li=ne.exports,fi=ue(li);const Fi=1e3*5,Ci=(e,u="SIGTERM",t={})=>{const D=e(u);return di(e,u,t,D),D},di=(e,u,t,D)=>{if(!pi(u,t,D))return;const r=hi(t),o=setTimeout(()=>{e("SIGKILL")},r);o.unref&&o.unref()},pi=(e,{forceKillAfterTimeout:u},t)=>mi(e)&&u!==!1&&t,mi=e=>e===hn.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",hi=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return Fi;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},Ei=(e,u)=>{e.kill()&&(u.isCanceled=!0)},gi=(e,u,t)=>{e.kill(u),t(Object.assign(new Error("Timed out"),{timedOut:!0,signal:u}))},yi=(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(()=>{gi(e,t,s)},u)}),n=D.finally(()=>{clearTimeout(r)});return Promise.race([o,n])},Bi=({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})`)},bi=async(e,{cleanup:u,detached:t},D)=>{if(!u||t)return D;const r=fi(()=>{e.kill()});return D.finally(()=>{r()})};function Zt(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"}function Xt(e){return Zt(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object"}const wi=e=>e instanceof Cn&&typeof e.then=="function",pu=(e,u,t)=>{if(typeof t=="string")return e[u].pipe(En(t)),e;if(Xt(t))return e[u].pipe(t),e;if(!wi(t))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!Xt(t.stdin))throw new TypeError("The target child process's stdin must be available.");return e[u].pipe(t.stdin),t},Ai=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:vi}=Ve;var $i=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 vi({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:xi}=yn,Si=Ve,{promisify:Ti}=nt,Oi=$i,Pi=Ti(Si.pipeline);class Qt 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=Oi(u);return await new Promise((r,o)=>{const n=i=>{i&&D.getBufferedLength()<=xi.MAX_LENGTH&&(i.bufferedData=D.getBufferedValue()),o(i)};(async()=>{try{await Pi(e,D),r()}catch(i){n(i)}})(),D.on("data",()=>{D.getBufferedLength()>t&&n(new Qt)})}),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=Qt;var Ii=Fe.exports,eD=ue(Ii);const{PassThrough:ki}=Ve;var Mi=function(){var e=[],u=new ki({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()}},Ri=ue(Mi);const ji=e=>{if(e!==void 0)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},_i=({input:e,inputFile:u})=>typeof u!="string"?e:(ji(e),gn(u)),Li=(e,u)=>{const t=_i(u);t!==void 0&&(Zt(t)?t.pipe(e.stdin):e.stdin.end(t))},Ni=(e,{all:u})=>{if(!u||!e.stdout&&!e.stderr)return;const t=Ri();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?eD(e,{encoding:u,maxBuffer:D}):eD.buffer(e,{maxBuffer:D})},Gi=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)])}},zi=(async()=>{})().constructor.prototype,Wi=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(zi,e)]),uD=(e,u)=>{for(const[t,D]of Wi){const r=typeof u=="function"?(...o)=>Reflect.apply(D.value,u(),o):D.value.bind(u);Reflect.defineProperty(e,t,{...D,value:r})}},Ui=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)})}),tD=(e,u=[])=>Array.isArray(u)?[e,...u]:[e],qi=/^[\w.-]+$/,Hi=/"/g,Vi=e=>typeof e!="string"||qi.test(e)?e:`"${e.replace(Hi,'\\"')}"`,Ki=(e,u)=>tD(e,u).join(" "),Ji=(e,u)=>tD(e,u).map(t=>Vi(t)).join(" "),Yi=Bn("execa").enabled,Re=(e,u)=>String(e).padStart(u,"0"),Zi=()=>{const e=new Date;return`${Re(e.getHours(),2)}:${Re(e.getMinutes(),2)}:${Re(e.getSeconds(),2)}.${Re(e.getMilliseconds(),3)}`},Xi=(e,{verbose:u})=>{u&&T.stderr.write(`[${Zi()}] ${e}
|
|
28
|
+
`)},Qi=1e3*1e3*100,es=({env:e,extendEnv:u,preferLocal:t,localDir:D,execPath:r})=>{const o=u?{...T.env,...e}:e;return t?_o({env:o,cwd:D,execPath:r}):o},us=(e,u,t={})=>{const D=Io._parse(e,u,t);return e=D.command,u=D.args,t=D.options,t={maxBuffer:Qi,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:Yi,...t},t.env=es(t),t.stdio=ri(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?ko(u):u;function oe(e,u,t){const D=us(e,u,t),r=Ki(e,u),o=Ji(e,u);Xi(o,D.options),Bi(D.options);let n;try{n=Qu.spawn(D.file,D.args,D.options)}catch(F){const C=new Qu.ChildProcess,p=Promise.reject(Vt({error:F,stdout:"",stderr:"",all:"",command:r,escapedCommand:o,parsed:D,timedOut:!1,isCanceled:!1,killed:!1}));return uD(C,p),C}const i=Ui(n),s=yi(n,D.options,i),c=bi(n,D.options,s),f={isCanceled:!1};n.kill=Ci.bind(null,n.kill.bind(n)),n.cancel=Ei.bind(null,n,f);const l=Wt(async()=>{const[{error:F,exitCode:C,signal:p,timedOut:d},h,y,m]=await Gi(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=Vt({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 Li(n,D.options),n.all=Ni(n,D.options),Ai(n),uD(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 DD={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=>DD.enabled&&DD.supportLevel>=t?D+(""+n).replace(o,D)+r:""+n}const de=Z(2,22),ts=Z(30,39),yu=Z(31,39),je=Z(32,39),Ds=Z(35,39),ns=Z(90,39),rs=Z(46,49),Bu="\x1B",x=`${Bu}[`,os="\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`},is={up:(e=1)=>`${x}S`.repeat(e),down:(e=1)=>`${x}T`.repeat(e)},ss={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 W={cursor:bu,scroll:is,erase:ss,beep:os},wu={exports:{}};let _e=process||{},nD=_e.argv||[],Le=_e.env||{},as=!(Le.NO_COLOR||nD.includes("--no-color"))&&(!!Le.FORCE_COLOR||nD.includes("--color")||_e.platform==="win32"||(_e.stdout||{}).isTTY&&Le.TERM!=="dumb"||!!Le.CI),cs=(e,u,t=e)=>D=>{let r=""+D,o=r.indexOf(u,e.length);return~o?e+ls(r,u,t,o)+u:e+r+u},ls=(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)},rD=(e=as)=>{let u=e?cs:()=>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=rD(),wu.exports.createColors=rD;var fs=wu.exports,E=ue(fs);function Fs({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 Cs=Fs();function oD(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Cs,"")}function iD(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sD={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}})(sD);var ds=sD.exports;const ps=iD(ds);var ms=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 hs=iD(ms);function pe(e,u={}){if(typeof e!="string"||e.length===0||(u={ambiguousIsNarrow:!0,...u},e=oD(e),e.length===0))return 0;e=e.replace(hs()," ");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(ps.eastAsianWidth(r)){case"F":case"W":D+=2;break;case"A":D+=t;break;default:D+=1}}return D}const Au=10,aD=(e=0)=>u=>`\x1B[${u+e}m`,cD=(e=0)=>u=>`\x1B[${38+e};5;${u}m`,lD=(e=0)=>(u,t,D)=>`\x1B[${38+e};2;${u};${t};${D}m`,v={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(v.modifier);const Es=Object.keys(v.color),gs=Object.keys(v.bgColor);[...Es,...gs];function ys(){const e=new Map;for(const[u,t]of Object.entries(v)){for(const[D,r]of Object.entries(t))v[D]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},t[D]=v[D],e.set(r[0],r[1]);Object.defineProperty(v,u,{value:t,enumerable:!1})}return Object.defineProperty(v,"codes",{value:e,enumerable:!1}),v.color.close="\x1B[39m",v.bgColor.close="\x1B[49m",v.color.ansi=aD(),v.color.ansi256=cD(),v.color.ansi16m=lD(),v.bgColor.ansi=aD(Au),v.bgColor.ansi256=cD(Au),v.bgColor.ansi16m=lD(Au),Object.defineProperties(v,{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=>v.rgbToAnsi256(...v.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)=>v.ansi256ToAnsi(v.rgbToAnsi256(u,t,D)),enumerable:!1},hexToAnsi:{value:u=>v.ansi256ToAnsi(v.hexToAnsi256(u)),enumerable:!1}}),v}const Bs=ys(),Ne=new Set(["\x1B","\x9B"]),bs=39,vu="\x07",fD="[",ws="]",FD="m",$u=`${ws}8;;`,CD=e=>`${Ne.values().next().value}${fD}${e}${FD}`,dD=e=>`${Ne.values().next().value}${$u}${e}${vu}`,As=e=>e.split(" ").map(u=>pe(u)),xu=(e,u,t)=>{const D=[...u];let r=!1,o=!1,n=pe(oD(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===vu&&(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())},vs=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("")},$s=(e,u,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let D="",r,o;const n=As(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=>vs(c)));const s=[...i.join(`
|
|
29
|
+
`)];for(const[c,f]of s.entries()){if(D+=f,Ne.has(f)){const{groups:l}=new RegExp(`(?:\\${fD}(?<code>\\d+)m|\\${$u}(?<uri>.*)${vu})`).exec(s.slice(c).join(""))||{groups:{}};if(l.code!==void 0){const F=Number.parseFloat(l.code);r=F===bs?void 0:F}else l.uri!==void 0&&(o=l.uri.length===0?void 0:l.uri)}const a=Bs.codes.get(Number(r));s[c+1]===`
|
|
30
|
+
`?(o&&(D+=dD("")),r&&a&&(D+=CD(a))):f===`
|
|
31
|
+
`&&(r&&a&&(D+=CD(r)),o&&(D+=dD(o)))}return D};function pD(e,u,t){return String(e).normalize().replace(/\r\n/g,`
|
|
32
32
|
`).split(`
|
|
33
|
-
`).map(D
|
|
34
|
-
`)}var
|
|
33
|
+
`).map(D=>$s(D,u,t)).join(`
|
|
34
|
+
`)}var xs=Object.defineProperty,Ss=(e,u,t)=>u in e?xs(e,u,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[u]=t,N=(e,u,t)=>(Ss(e,typeof u!="symbol"?u+"":u,t),t);function Ts(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(
|
|
39
|
-
`);this.output.write(r[D]),this._prevFrame=u,this.output.write(
|
|
36
|
+
`),r=[];for(let o=0;o<Math.max(t.length,D.length);o++)t[o]!==D[o]&&r.push(o);return r}const mD=Symbol("clack:cancel");function hD(e){return e===mD}function Ge(e,u){e.isTTY&&e.setRawMode(u)}const ED=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),Os=new Set(["up","down","left","right","space","enter"]);class gD{constructor({render:u,input:t=dn,output:D=pn,...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=rt.createInterface({input:this.input,output:u,tabSize:2,prompt:"",escapeCodeTimeout:50}),rt.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(W.cursor.show),this.output.off("resize",this.render),Ge(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(W.cursor.show),this.output.off("resize",this.render),Ge(this.input,!1),t(mD)})})}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&&ED.has(t.name)&&this.emit("cursor",ED.get(t.name)),t?.name&&Os.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=pD(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
38
|
+
`).length-1;this.output.write(W.cursor.move(-999,u*-1))}render(){const u=pD(this._render(this)??"",process.stdout.columns,{hard:!0});if(u!==this._prevFrame){if(this.state==="initial")this.output.write(W.cursor.hide);else{const t=Ts(this._prevFrame,u);if(this.restoreCursor(),t&&t?.length===1){const D=t[0];this.output.write(W.cursor.move(0,D)),this.output.write(W.erase.lines(1));const r=u.split(`
|
|
39
|
+
`);this.output.write(r[D]),this._prevFrame=u,this.output.write(W.cursor.move(0,r.length-D-1));return}else if(t&&t?.length>1){const D=t[0];this.output.write(W.cursor.move(0,D)),this.output.write(W.erase.down());const r=u.split(`
|
|
40
40
|
`).slice(D);this.output.write(r.join(`
|
|
41
|
-
`)),this._prevFrame=u;return}this.output.write(
|
|
42
|
-
${
|
|
41
|
+
`)),this._prevFrame=u;return}this.output.write(W.erase.down())}this.output.write(u),this.state==="initial"&&(this.state="active"),this._prevFrame=u}}}class Ps extends gD{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(W.cursor.move(0,-1)),this.value=t,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var Is=Object.defineProperty,ks=(e,u,t)=>u in e?Is(e,u,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[u]=t,yD=(e,u,t)=>(ks(e,typeof u!="symbol"?u+"":u,t),t);let Ms=class extends gD{constructor(e){super(e,!1),yD(this,"options"),yD(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 Rs(){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 js=Rs(),H=(e,u)=>js?e:u,_s=H("\u25C6","*"),Ls=H("\u25A0","x"),Ns=H("\u25B2","x"),Gs=H("\u25C7","o"),zs=H("\u250C","T"),G=H("\u2502","|"),Su=H("\u2514","\u2014"),Tu=H("\u25CF",">"),Ou=H("\u25CB"," "),BD=e=>{switch(e){case"initial":case"active":return E.cyan(_s);case"cancel":return E.red(Ls);case"error":return E.yellow(Ns);case"submit":return E.green(Gs)}},Ws=e=>{const u=e.active??"Yes",t=e.inactive??"No";return new Ps({active:u,inactive:t,initialValue:e.initialValue??!0,render(){const D=`${E.gray(G)}
|
|
42
|
+
${BD(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()},Us=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 Ms({options:e.options,initialValue:e.initialValue,render(){const t=`${E.gray(G)}
|
|
47
|
+
${BD(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()},qs=(e="")=>{process.stdout.write(`${E.gray(zs)} ${e}
|
|
53
|
+
`)},ze=(e="")=>{process.stdout.write(`${E.gray(G)}
|
|
54
|
+
${E.gray(Su)} ${e}
|
|
55
55
|
|
|
56
|
-
`)},
|
|
56
|
+
`)},bD=e=>Jr,Hs=bD();class g extends Error{}const Pu=" ",Vs="https://github.com/sugarmo/aicommits/issues/new/choose",Ks=e=>e.trim().replace(/^github:/,"").replace(/^git\+/,"").replace(/\.git$/,""),wD=e=>{if(typeof e=="string"){const u=Ks(e);if(/^[^/\s]+\/[^/\s]+$/.test(u))return u;const t=u.match(/^git@github\.com:([^/\s]+\/[^/\s]+)$/);if(t?.[1])return t[1];const D=u.match(/^https?:\/\/github\.com\/([^/\s]+\/[^/\s]+)$/);if(D?.[1])return D[1]}if(e&&typeof e=="object"&&"url"in e)return wD(e.url)},Js=(()=>{const e=wD(Zr);return e?`https://github.com/${e}/issues/new/choose`:Vs})(),Iu=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
|
+
${Pu}${de(`aicommits v${Hs}`)}`),console.error(`
|
|
60
|
+
${Pu}Please open a Bug report with the information above:`),console.error(`${Pu}${Js}`))},AD=async(e,u)=>{const{stdout:t,failed:D}=await oe("git",["rev-parse",...e],{reject:!1,cwd:u});if(D)throw new g("The current directory must be a Git repository!");return t.trim()},vD=async()=>AD(["--show-toplevel"]),Ys=async(e,u)=>{const t=u||process.cwd(),D=await AD(["--git-path",e],t);return z.isAbsolute(D)?D:z.resolve(t,D)},ku=e=>`:(exclude)${e}`,$D=["package-lock.json","pnpm-lock.yaml","*.lock"].map(ku),xD=async e=>{const u=["diff","--cached","--diff-algorithm=minimal"],{stdout:t}=await oe("git",[...u,"--name-only",...$D,...e?e.map(ku):[]]);if(!t)return;const{stdout:D}=await oe("git",[...u,...$D,...e?e.map(ku):[]]);return{files:t.split(`
|
|
61
|
+
`),diff:D}},Zs=e=>`Detected ${e.length.toLocaleString()} staged file${e.length>1?"s":""}`,Xs=["","conventional"],{hasOwnProperty:Qs}=Object.prototype,SD=(e,u)=>Qs.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,ea={cn:"zh-CN","zh-cn":"zh-CN","zh-hans":"zh-CN",zh:"zh-CN","zh-tw":"zh-TW","zh-hant":"zh-TW"},ua=e=>{const u=e.trim().replace(/_/g,"-");return ea[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)`)},ta=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=ua(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",Xs.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 ta(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"]},TD=z.join(ve.homedir(),".aicommits"),OD=z.join(TD,"config.toml"),Da=[z.join(ve.homedir(),"aicommits.toml"),z.join(ve.homedir(),".aicommits")],na=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},PD=e=>{const u=e.trim();return u.startsWith('"')&&u.endsWith('"')||u.startsWith("'")&&u.endsWith("'")?u.slice(1,-1):u},ra=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},oa=(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},ia=e=>{const u=Object.create(null);let t=u;for(const D of e.split(/\r?\n/)){const r=na(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(PD).map(f=>f.trim()).filter(Boolean);if(c.length===0){t=u;continue}t=oa(u,c);continue}const o=r.indexOf("=");if(o<=0)continue;const n=PD(r.slice(0,o));if(!n)continue;const i=ra(r.slice(o+1));t[n]=i}return u},ID=e=>typeof e=="string"?JSON.stringify(e):String(e),sa=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} = ${ID(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} = ${ID(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
|
+
`)},kD=async e=>{try{if(!(await _.lstat(e)).isFile())return;const t=await _.readFile(e,"utf8");return ia(t)}catch{return}},MD=async()=>{const e=await kD(OD);if(e)return e;for(const u of Da){const t=await kD(u);if(t)return t}return Object.create(null)},RD=(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}},aa=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]}},ca=(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 MD(),D={},r=e?.profile??V(t.profile)??RD("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:ca(t,o,n))??V(t[n])??RD(n,t);if(u)try{D[n]=i(s)}catch{}else D[n]=i(s)}return D},la=async e=>{const u=await MD();aa(u);for(const[D,r]of e){if(!SD(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(TD,{recursive:!0});const t=sa(u);await _.writeFile(OD,`${t}
|
|
63
|
+
`,"utf8")};var _u={},Lu={exports:{}},Ee={exports:{}},Nu,jD;function fa(){if(jD)return Nu;jD=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,_D;function LD(){if(_D)return Gu;_D=1;function e(u){D.debug=D,D.default=D,D.coerce=c,D.disable=i,D.enable=o,D.enabled=s,D.humanize=fa(),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,P)=>{if(w==="%%")return"%";B++;const L=D.formatters[P];if(typeof L=="function"){const U=h[B];w=L.call(y,U),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 ND;function Fa(){return ND||(ND=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=LD()(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,GD;function Ca(){return GD||(GD=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,zD;function da(){if(zD)return Wu;zD=1;const e=ve,u=qe,t=Ca(),{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 WD;function pa(){return WD||(WD=1,function(e,u){const t=qe,D=nt;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=da();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=LD()(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=Fa():Lu.exports=pa();var Uu=Lu.exports,qu={};Object.defineProperty(qu,"__esModule",{value:!0});function ma(e){return function(u,t){return new Promise((D,r)=>{e.call(this,u,t,(o,n)=>{o?r(o):D(n)})})}}qu.default=ma;var UD=I&&I.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const ha=Dt,Ea=UD(Uu),ga=UD(qu),ye=Ea.default("agent-base");function ya(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 ha.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),ya(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=ga.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 Ba=We,Vu={},ba=I&&I.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vu,"__esModule",{value:!0});const wa=ba(Uu),Be=wa.default("https-proxy-agent:parse-proxy-response");function Aa(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""},
|
|
79
|
-
`):["
|
|
80
|
-
`):"Provide only the title, no description or body.",
|
|
81
|
-
`),
|
|
82
|
-
${e.trim()}`:"",
|
|
83
|
-
`),
|
|
84
|
-
`)},
|
|
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=Aa;var va=I&&I.__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=I&&I.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_u,"__esModule",{value:!0});const qD=se(An),HD=se(vn),$a=se($n),xa=se(tt),Sa=se(Uu),Ta=Ba,Oa=se(Vu),be=Sa.default("https-proxy-agent:agent");class Pa extends Ta.Agent{constructor(u){let t;if(typeof u=="string"?t=$a.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||Ma(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 va(this,void 0,void 0,function*(){const{proxy:D,secureProxy:r}=this;let o;r?(be("Creating `tls.Socket`: %o",D),o=HD.default.connect(D)):(be("Creating `net.Socket`: %o",D),o=qD.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;ka(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=Oa.default(o);o.write(`${s}\r
|
|
74
|
+
`);const{statusCode:F,buffered:C}=yield l;if(F===200){if(u.once("socket",Ia),t.secureEndpoint){be("Upgrading socket connection to TLS");const d=t.servername||t.host;return HD.default.connect(Object.assign(Object.assign({},Ra(t,"host","hostname","path","port")),{socket:o,servername:d}))}return o}o.destroy();const p=new qD.default.Socket({writable:!1});return p.readable=!0,u.once("socket",d=>{be("replaying proxy buffer for failed request"),xa.default(d.listenerCount("data")>0),d.push(C),d.push(null)}),p})}}_u.default=Pa;function Ia(e){e.resume()}function ka(e,u){return!!(!u&&e===80||u&&e===443)}function Ma(e){return typeof e=="string"?/^https:?$/i.test(e):!1}function Ra(e,...u){const t={};let D;for(D in e)u.includes(D)||(t[D]=e[D]);return t}var ja=I&&I.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const Ku=ja(_u);function Ju(e){return new Ku.default(e)}(function(e){e.HttpsProxyAgent=Ku.default,e.prototype=Ku.default.prototype})(Ju||(Ju={}));var _a=Ju,La=ue(_a);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"},VD={"":"<commit message>",conventional:"<type>[optional (<scope>)]: <commit message>"},KD=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}},JD=(e,u,t=!1)=>e==="conventional"?!t&&!u?.trim()?"<type>: <commit message>":u?.trim()||VD.conventional:VD[e],Na=(e,u,t,D)=>D?`The commit title line must be in format:
|
|
75
|
+
${JD(e,u,t)}`:`The output response must be in format:
|
|
76
|
+
${JD(e,u,t)}`,Ga=(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(KD(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""},za=(e,u)=>e?u==="list"?["When details are enabled, first decide whether the title alone already clearly explains what changed.","If the title is already sufficient, output only the title.","Do not add any explanation for omitting the body.","If the title is not sufficient, 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
|
+
`):["When details are enabled, first decide whether the title alone already clearly explains what changed.","If the title is already sufficient, output only the title.","Do not add any explanation for omitting the body.","If the title is not sufficient, 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.",Wa=()=>["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
|
+
`),Ua=e=>e?.trim()?`Additional instructions from user:
|
|
82
|
+
${e.trim()}`:"",qa=e=>[`Message language: ${e}`,"You must write the commit message strictly in this language."].join(`
|
|
83
|
+
`),Ha=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
|
+
`)},Va=(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
|
+
`)},Ka=(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
|
+
`),Ja=(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.",za(r,o),qa(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.",Ha(D.changedFiles),Va(t,n),Ka(t,n),Ga(t,D.conventionalTypes,D.lockedConventionalType),Na(t,D.conventionalFormat,n,r),Wa(),Ua(D.instructions)].filter(Boolean).join(`
|
|
88
|
+
`)},Ya=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?La(o):void 0},l=wn.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()}),Za=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`}},YD=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,P=typeof w.reasoning_content=="string"?w.reasoning_content:typeof w.reasoning=="string"?w.reasoning:"";P&&o({kind:"reasoning",text:P}),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 P=w.slice(5).trim();if(!(!P||P==="[DONE]"))try{const L=JSON.parse(P);s(L)}catch{}}b=i.indexOf(`
|
|
93
93
|
|
|
94
|
-
`)}},f=
|
|
94
|
+
`)}},f=Za(r),{response:a,data:l}=await Ya(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,P=h.get(w)||{index:w,contentParts:[],reasoningParts:[]},{delta:L}=O;if(typeof L=="object"&&L!==null){const k=L;typeof k.role=="string"&&(P.role=k.role),typeof k.content=="string"&&P.contentParts.push(k.content),typeof k.reasoning_content=="string"&&P.reasoningParts.push(k.reasoning_content),typeof k.reasoning=="string"&&P.reasoningParts.push(k.reasoning)}const U=O.finish_reason;(typeof U=="string"||U===null)&&(P.finishReason=U),h.set(w,P)}}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}},ZD=(e,u)=>({model:e,messages:u}),Xa=e=>e.replace(/\r\n?/g,`
|
|
97
|
+
`),XD=e=>{const u=e.match(/```[\w-]*\n([\s\S]*?)```/);return u?.[1]?u[1].trim():e.replace(/```/g,"").trim()},QD=e=>e.trim().replace(/^title:\s*/i,"").replace(/(\w)\.$/,"$1").replace(/^["'`]|["'`]$/g,""),Qa=e=>e.replace(/^\s*(body|description|details)\s*:\s*/i,"").replace(/^\s*(主要改动包括|主要改动|改动包括)\s*[::]\s*/,"").replace(/^\s*(impact|影响)\s*[::]\s*/i,""),ec=e=>e.split(/(?<=[。!?.!?])\s+/u).map(u=>u.trim()).filter(Boolean),en=/^(?:[-*•]+|\d+[.)])\s*/u,uc=/^[\s\-–—_*•.,;:!?()[\]{}"'`]+$/u,tc=e=>{let u=e.trim();if(!u)return"";for(;en.test(u);){const t=u.replace(en,"").trim();if(!t||t===u)break;u=t}return!u||uc.test(u)?"":u},Dc=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},nc=e=>{if(!e.trim())return{paragraph:"",listItems:[]};const u=e.split(`
|
|
98
|
+
`).map(n=>Qa(n.trim())).filter(Boolean);if(u.length===0)return{paragraph:"",listItems:[]};const t=[],D=[];for(const n of u){const i=Dc(n);i?t.push(i):(D.push(n.trim()),t.push(...ec(n)))}const r=[...D,...t].join(" ").replace(/\s{2,}/g," ").replace(/\s+([,.;:!?])/g,"$1").trim(),o=Array.from(new Set(t.map(tc).filter(Boolean)));return{paragraph:r,listItems:o}},we=e=>{const u=Xa(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=QD(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}},Ae=(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,un=e=>QD(XD(e).trim().split(`
|
|
103
|
+
`)[0]||""),rc=(e,u)=>{const t=XD(e),{title:D,body:r}=we(t),o=nc(r);if(u==="list"){const n=o.listItems.slice(0,6).map(i=>`- ${i}`).join(`
|
|
104
|
+
`);return Ae(D,n)}return Ae(D,o.paragraph)},oc=(e,u,t)=>u?rc(e,t):un(e),X=e=>e.trim().toLowerCase(),ic=e=>Array.from(new Set(e)),sc=/[\u3400-\u9FFF]/,tn=/^([a-z]+(?:\([^)]+\))?: )(.+)$/i,Dn=/^([a-z]+)(\([^)]+\))?: (.+)$/i,ac=/^([a-z]+)(?:\s+|[:-])/i,cc={feature:"feat",features:"feat",bug:"fix",bugfix:"fix",performance:"perf"},lc=e=>{const u=e.trim().toLowerCase();return u==="cn"||u.startsWith("zh")},nn=e=>{const u=e.match(tn);return u?{prefix:u[1],subject:(u[2]||"").trim()}:{prefix:"",subject:e.trim()}},fc=e=>{const u=new Map,t=KD(e);for(const D of Object.keys(t))u.set(X(D),D);for(const[D,r]of Object.entries(cc)){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)),Fc=(e,u)=>{const t=e.trim().match(ac);if(t?.[1])return Yu(t[1],u)},Cc=(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},dc=(e,u)=>{const t=e.match(Dn);if(!t)return e;const[,D,r="",o=""]=t,n=o.trim();if(!n)return e;const i=Yu(D,u)||D.toLowerCase(),c=Fc(n,u)||i,f=Cc(n,c,u);return`${c}${r}: ${f||n}`},pc=(e,u,t)=>{const{title:D,body:r}=u?we(e):{title:e.trim(),body:""},o=dc(D,t);return u?Ae(o,r):o},mc=(e,u)=>{const{title:t,body:D}=u?we(e):{title:e.trim(),body:""},r=t.match(Dn);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?Ae(c,D):c},hc=/^[a-z]+\([^)\s][^)]*\):\s*\S/i,Ec=(e,u)=>u?we(e).title:e.trim(),gc=e=>e?.trim()?/<\s*scope\s*>/i.test(e):!0,rn=(e,u)=>hc.test(Ec(e,u)),yc=(e,u)=>{if(!lc(u))return!1;const{subject:t}=nn(e);return t.length===0?!1:!sc.test(t)},Bc=async(e,u,t,D,r,o,n,i,s)=>{const{prefix:c,subject:f}=nn(D),a=ZD(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 YD(e,a,o,n,i,s)).choices.map(d=>d.message?.content).find(d=>typeof d=="string");if(!F)return D;const C=un(F);if(!C)return D;if(!c)return C;const p=C.replace(tn,"$2").trim();return`${c}${p||f}`},bc=async(e,u,t,D,r,o,n,i,s,c)=>{const{title:f,body:a}=r?we(D):{title:D.trim(),body:""};if(!yc(f,t))return D;try{const l=await Bc(e,u,t,f,o,n,i,s,c);return r?Ae(l,a):l}catch{return D}},on=async(e,u,t,D,r,o,n,i,s,c,f)=>{const a=c??{},l=a.includeDetails??!1,F=a.detailsStyle??"paragraph",C=fc(a.conventionalTypes),p=n==="conventional"&&(a.conventionalScope??!1)&&gc(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:Ja(t,o,n,b)},{role:"user",content:D}],O=Math.max(1,r),P=(await Promise.all(Array.from({length:O},()=>YD(e,ZD(u,B),i,s,f,M=>a.onStreamEvent?.({phase:"message",...M}))))).flatMap(M=>M.choices).flatMap(M=>{const $=M.message?.content;return typeof $!="string"?[]:[oc($,l,F)]}).filter(Boolean),L=await Promise.all(P.map(M=>bc(e,u,t,M,l,o,i,s,f,$=>a.onStreamEvent?.({phase:"title-rewrite",...$})))),U=n==="conventional"?L.map(M=>pc(M,l,C)):L,k=n==="conventional"&&a.conventionalScope===!1?U.map(M=>mc(M,l)):U;return ic(k.filter(Boolean))};try{const h=await d();if(!p)return h;const y=h.filter(B=>rn(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=>rn(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}},sn=()=>{const e=["|","/","-","\\"],u=process.stdout.isTTY?120:1e4;let t=0,D="",r=!1,o;const n=ns("\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(`${Ds("\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
|
+
`)}}}},wc=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`},Ac=(e,u)=>{const t=Date.now(),D=1e3,r=()=>e.update(`Thinking for ${wc(Date.now()-t)} (${u})`);r();const o=setInterval(r,D);return()=>clearInterval(o)};var vc=async(e,u,t,D,r,o,n,i,s,c,f,a,l,F)=>(async()=>{qs(rs(ts(" aicommits "))),await vD();const C=sn();t&&await oe("git",["add","--update"]),C.start("Detecting staged files");const p=await xD(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(`${Zs(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=sn();m.start(`The AI (${d.model}) is analyzing your changes`);let b,B=!1,O=!0,w=!1,P;const L={message:"Message Generation","title-rewrite":"Title Rewrite"},U=$=>{if(!($.kind!=="reasoning"||!$.text)){if(!y){B||(b=Ac(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!==P&&(P=$.phase,process.stdout.write(`${de(`[${L[$.phase]}]
|
|
117
|
+
`)}`)),process.stdout.write($.text)}};let k;try{k=await on(d["api-key"],d.model,d.locale,p.diff,d.generate,d["max-length"],d.type,d.timeout,d.proxy,{...h,onStreamEvent:U},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 Ws({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(!$||hD($)){ze("Commit cancelled");return}}else{const $=await Us({message:`Pick a commit message to use: ${de("(Ctrl+c to exit)")}`,options:k.map(Q=>({label:Q,value:Q}))});if(hD($)){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}`),Iu(C),process.exit(1)});const $c="prepare-commit-msg-hook",xc=()=>{const e=process.argv.slice(2);return e[0]===$c?e.slice(1):e},Sc=async()=>{const{stdout:e}=await oe("git",["rev-parse","--git-path","COMMIT_EDITMSG"],{reject:!1}),u=e.trim();return u===""?void 0:u},Tc=async e=>_.readFile(e,"utf8").catch(u=>{if(u.code==="ENOENT")return"";throw u});var Oc=()=>(async()=>{const[e,u]=xc(),t=e?.trim()||await Sc();if(!t)return;const D=await Tc(t);if(u==="message"&&D.trim()!=="")return;const o=await xD();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 on(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 Pc=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 Ic=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)SD(D,r)&&console.log(`${r}=${D[r]}`);return}if(u==="set"){await la(t.map(Pc));return}throw new g(`Invalid mode: ${u}`)})().catch(u=>{console.error(`${yu("\u2716")} ${u.message}`),Iu(u),process.exit(1)})});const kc=e=>_.lstat(e).then(()=>!0,()=>!1),Zu="prepare-commit-msg",Mc="prepare-commit-msg-hook",Rc=`/hooks/${Zu}`,an=xn(new URL("cli.mjs",import.meta.url)),cn=`
|
|
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(Mc)});
|
|
125
|
+
import(${JSON.stringify(Sn(an))})
|
|
126
|
+
`.trim(),jc=(process.argv[1]||"").replace(/\\/g,"/").endsWith(Rc),ln=async e=>await _.readFile(e,"utf8").catch(()=>{})===cn,fn=async e=>await _.realpath(e).catch(()=>{})===an;var _c=vt({name:"hook",parameters:["<install/uninstall>"]},e=>{(async()=>{const u=await vD(),{installUninstall:t}=e._,D=await Ys("hooks",u),r=z.join(D,Zu),o=await kc(r);if(t==="install"){if(o){if(await ln(r)){console.warn("The hook is already installed");return}if(await fn(r))await _.rm(r);else throw new g(`A different ${Zu} hook seems to be installed. Please remove it before installing aicommits.`)}await _.mkdir(z.dirname(r),{recursive:!0}),await _.writeFile(r,cn),await _.chmod(r,493),console.log(`${je("\u2714")} Hook installed`);return}if(t==="uninstall"){if(!o){console.warn("Hook is not installed");return}if(!(await ln(r)||await fn(r))){console.warn("Hook is not installed");return}await _.rm(r),console.log(`${je("\u2714")} Hook uninstalled`);return}throw new g(`Invalid mode: ${t}`)})().catch(u=>{console.error(`${yu("\u2716")} ${u.message}`),Iu(u),process.exit(1)})});const Lc=bD(),Xu=process.argv.slice(2),Nc=Xu[0]==="prepare-commit-msg-hook";Kr({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:[Ic,_c],help:{description:Yr},ignoreArgv:e=>e==="unknown-flag"||e==="argument"},e=>{e.flags.version&&(console.log(Lc),process.exit(0)),jc||Nc?Oc():vc(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,Xu)},Xu);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sugarmo/aicommits",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"repository": "sugarmo/aicommits",
|
|
15
|
-
"author": "
|
|
15
|
+
"author": "Steven Mok (@sugarmo)",
|
|
16
16
|
"type": "module",
|
|
17
17
|
"files": [
|
|
18
18
|
"dist"
|