@activade/open-workflows 2.0.3 → 2.0.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 CHANGED
@@ -115,6 +115,7 @@ OPTIONS
115
115
 
116
116
  Fork this repository and modify:
117
117
  - `actions/*/skill.md` - AI behavior for AI-powered actions
118
+ - `scripts/*.ts` - OpenCode custom tools (submit-review, apply-labels)
118
119
  - `actions/release/src/publish.ts` - Release logic
119
120
 
120
121
  ## License
@@ -26,19 +26,22 @@ runs:
26
26
  run: |
27
27
  git config user.name "github-actions[bot]"
28
28
  git config user.email "github-actions[bot]@users.noreply.github.com"
29
-
29
+ - name: Install opencode-ai
30
+ shell: bash
31
+ run: |
32
+ curl -fsSL https://opencode.ai/install | bash
30
33
  - name: Install skill and tools
31
34
  shell: bash
32
35
  run: |
33
36
  mkdir -p .opencode/skill/doc-sync
34
37
  cp "${{ github.action_path }}/skill.md" .opencode/skill/doc-sync/SKILL.md
35
38
  mkdir -p ~/.config/opencode/tool
36
- cp "${{ github.action_path }}/../../.opencode/tool/"*.ts ~/.config/opencode/tool/ 2>/dev/null || true
37
-
39
+ cp "${{ github.action_path }}/../../scripts/"*.ts ~/.config/opencode/tool/ 2>/dev/null || true
40
+ cd ~/.config/opencode && bun add @opencode-ai/plugin
38
41
  - name: Sync Documentation
39
42
  shell: bash
40
43
  run: |
41
- bunx opencode-ai@latest run --model "${{ inputs.model }}" \
44
+ opencode run --model "${{ inputs.model }}" \
42
45
  "Load the doc-sync skill and sync documentation for PR ${{ github.event.pull_request.number }}"
43
46
  env:
44
47
  GITHUB_TOKEN: ${{ github.token }}
@@ -20,19 +20,23 @@ runs:
20
20
  run: |
21
21
  mkdir -p ~/.local/share/opencode
22
22
  echo "$OPENCODE_AUTH" > ~/.local/share/opencode/auth.json
23
-
23
+ - name: Install opencode-ai
24
+ shell: bash
25
+ run: |
26
+ curl -fsSL https://opencode.ai/install | bash
24
27
  - name: Install skill and tools
25
28
  shell: bash
26
29
  run: |
27
30
  mkdir -p .opencode/skill/issue-label
28
31
  cp "${{ github.action_path }}/skill.md" .opencode/skill/issue-label/SKILL.md
29
32
  mkdir -p ~/.config/opencode/tool
30
- cp "${{ github.action_path }}/../../.opencode/tool/"*.ts ~/.config/opencode/tool/
33
+ cp "${{ github.action_path }}/../../scripts/"*.ts ~/.config/opencode/tool/
34
+ cd ~/.config/opencode && bun add @opencode-ai/plugin
31
35
 
32
36
  - name: Label Issue
33
37
  shell: bash
34
38
  run: |
35
- bunx opencode-ai@latest run --model "${{ inputs.model }}" \
39
+ opencode run --model "${{ inputs.model }}" \
36
40
  "Load the issue-label skill. Label issue ${{ github.event.issue.number }}"
37
41
  env:
38
42
  GITHUB_TOKEN: ${{ github.token }}
@@ -52,37 +52,28 @@ Prefer existing labels over creating new ones. Check the repository's label taxo
52
52
 
53
53
  ## Applying Labels
54
54
 
55
- The script path is provided in your task message. Run the apply-labels script:
56
-
57
- ```bash
58
- bun "<script_path>/apply-labels.ts" \
59
- --repo "owner/repo" \
60
- --issue 123 \
61
- --labels "bug,needs-triage" \
62
- --explanation "Issue describes broken functionality in auth module"
63
- ```
55
+ Use the `apply-labels` tool to apply labels. The tool is automatically available.
64
56
 
65
- ### Arguments
57
+ ### Tool Arguments
66
58
 
67
59
  | Argument | Required | Description |
68
60
  |----------|----------|-------------|
69
- | `--repo` | Yes | Repository in owner/repo format |
70
- | `--issue` | Yes | Issue number |
71
- | `--labels` | Yes | Comma-separated label names (max 3) |
72
- | `--explanation` | Yes | Brief reason for label choices |
73
- | `--new-labels` | No | JSON array of new labels to create first |
61
+ | `repository` | Yes | Repository in owner/repo format |
62
+ | `issueNumber` | Yes | Issue number |
63
+ | `labels` | Yes | Array of existing label names (max 3 total) |
64
+ | `explanation` | Yes | Brief reason for label choices |
65
+ | `newLabels` | No | Array of new labels to create first |
74
66
 
75
67
  ### Creating New Labels
76
68
 
77
- If you need to create new labels (use sparingly):
69
+ If you need to create new labels (use sparingly), provide `newLabels`:
78
70
 
79
- ```bash
80
- bun "<script_path>/apply-labels.ts" \
81
- --repo "owner/repo" \
82
- --issue 123 \
83
- --labels "bug,needs-reproduction" \
84
- --explanation "Bug report lacking steps to reproduce" \
85
- --new-labels '[{"name":"needs-reproduction","color":"d93f0b","description":"Issue needs steps to reproduce"}]'
71
+ ```json
72
+ {
73
+ "newLabels": [
74
+ {"name": "needs-reproduction", "color": "d93f0b", "description": "Issue needs steps to reproduce"}
75
+ ]
76
+ }
86
77
  ```
87
78
 
88
79
  Color is a hex string WITHOUT the leading `#`.
@@ -104,7 +95,7 @@ Color is a hex string WITHOUT the leading `#`.
104
95
  - Do NOT overuse broad labels like `question` when specific ones exist
105
96
  - Do NOT create duplicate labels with slight name variations
106
97
  - Do NOT omit the explanation argument
107
- - Do NOT run the script more than once
98
+ - Do NOT call the apply-labels tool more than once
108
99
 
109
100
  ## Example Explanation
110
101
 
@@ -20,19 +20,23 @@ runs:
20
20
  run: |
21
21
  mkdir -p ~/.local/share/opencode
22
22
  echo "$OPENCODE_AUTH" > ~/.local/share/opencode/auth.json
23
-
23
+ - name: Install opencode-ai
24
+ shell: bash
25
+ run: |
26
+ curl -fsSL https://opencode.ai/install | bash
24
27
  - name: Install skill and tools
25
28
  shell: bash
26
29
  run: |
27
30
  mkdir -p .opencode/skill/pr-review
28
31
  cp "${{ github.action_path }}/skill.md" .opencode/skill/pr-review/SKILL.md
29
32
  mkdir -p ~/.config/opencode/tool
30
- cp "${{ github.action_path }}/../../.opencode/tool/"*.ts ~/.config/opencode/tool/
33
+ cp "${{ github.action_path }}/../../scripts/"*.ts ~/.config/opencode/tool/
34
+ cd ~/.config/opencode && bun add @opencode-ai/plugin
31
35
 
32
36
  - name: Review PR
33
37
  shell: bash
34
38
  run: |
35
- bunx opencode-ai@latest run --model "${{ inputs.model }}" \
39
+ opencode run --model "${{ inputs.model }}" \
36
40
  "Load the pr-review skill. Review PR ${{ github.event.pull_request.number }}"
37
41
  env:
38
42
  GITHUB_TOKEN: ${{ github.token }}
@@ -125,28 +125,18 @@ Before starting your review:
125
125
 
126
126
  ## Posting Review
127
127
 
128
- The script path is provided in your task message. Run the submit-review script:
129
-
130
- ```bash
131
- bun "<script_path>/submit-review.ts" \
132
- --repo "owner/repo" \
133
- --pr 123 \
134
- --commit "abc1234" \
135
- --verdict "approve" \
136
- --summary "Your overall assessment" \
137
- --issues '[{"file":"src/foo.ts","line":42,"severity":"high","title":"Issue title","explanation":"Why this matters","suggestion":"Optional fix"}]'
138
- ```
128
+ Use the `submit-review` tool to post your review. The tool is automatically available.
139
129
 
140
- ### Arguments
130
+ ### Tool Arguments
141
131
 
142
132
  | Argument | Required | Description |
143
133
  |----------|----------|-------------|
144
- | `--repo` | Yes | Repository in owner/repo format |
145
- | `--pr` | Yes | Pull request number |
146
- | `--commit` | No | Commit SHA (first 7 chars shown in review) |
147
- | `--verdict` | Yes | `approve` or `request_changes` |
148
- | `--summary` | Yes | 1-3 sentence overall assessment |
149
- | `--issues` | No | JSON array of issues found |
134
+ | `repository` | Yes | Repository in owner/repo format |
135
+ | `pullNumber` | Yes | Pull request number |
136
+ | `commitSha` | Yes | Commit SHA (first 7 chars shown in review) |
137
+ | `verdict` | Yes | `approve` or `request_changes` |
138
+ | `summary` | Yes | 1-3 sentence overall assessment |
139
+ | `issues` | Yes | Array of issues found (can be empty for approvals) |
150
140
 
151
141
  ### Issue Format
152
142
 
@@ -186,7 +176,7 @@ Each issue in the array:
186
176
 
187
177
  ## Common Mistakes to Avoid
188
178
 
189
- - Do NOT run the script more than once per review
179
+ - Do NOT call the submit-review tool more than once per review
190
180
  - Do NOT use line numbers from the left (old) side of the diff
191
181
  - Do NOT skip the per-file todo workflow
192
182
  - Do NOT guess repository, PR number, or commit SHA - derive from git/gh commands
package/dist/cli/index.js CHANGED
@@ -1,63 +1,64 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- var xs=Object.create;var{getPrototypeOf:Es,defineProperty:To,getOwnPropertyNames:ks}=Object;var ys=Object.prototype.hasOwnProperty;var B=(s,e,n)=>{n=s!=null?xs(Es(s)):{};let l=e||!s||!s.__esModule?To(n,"default",{value:s,enumerable:!0}):n;for(let r of ks(s))if(!ys.call(l,r))To(l,r,{get:()=>s[r],enumerable:!0});return l};var M=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var F=M((ge,No)=>{var u={to(s,e){if(!e)return`\x1B[${s+1}G`;return`\x1B[${e+1};${s+1}H`},move(s,e){let n="";if(s<0)n+=`\x1B[${-s}D`;else if(s>0)n+=`\x1B[${s}C`;if(e<0)n+=`\x1B[${-e}A`;else if(e>0)n+=`\x1B[${e}B`;return n},up:(s=1)=>`\x1B[${s}A`,down:(s=1)=>`\x1B[${s}B`,forward:(s=1)=>`\x1B[${s}C`,backward:(s=1)=>`\x1B[${s}D`,nextLine:(s=1)=>"\x1B[E".repeat(s),prevLine:(s=1)=>"\x1B[F".repeat(s),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},Os={up:(s=1)=>"\x1B[S".repeat(s),down:(s=1)=>"\x1B[T".repeat(s)},Is={screen:"\x1B[2J",up:(s=1)=>"\x1B[1J".repeat(s),down:(s=1)=>"\x1B[J".repeat(s),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(s){let e="";for(let n=0;n<s;n++)e+=this.line+(n<s-1?u.up():"");if(s)e+=u.left;return e}};No.exports={cursor:u,scroll:Os,erase:Is,beep:"\x07"}});var oo=M((xe,D)=>{var j=process||{},Ro=j.argv||[],V=j.env||{},$s=!(!!V.NO_COLOR||Ro.includes("--no-color"))&&(!!V.FORCE_COLOR||Ro.includes("--color")||j.platform==="win32"||(j.stdout||{}).isTTY&&V.TERM!=="dumb"||!!V.CI),vs=(s,e,n=s)=>(l)=>{let r=""+l,t=r.indexOf(e,s.length);return~t?s+_s(r,e,n,t)+e:s+r+e},_s=(s,e,n,l)=>{let r="",t=0;do r+=s.substring(t,l)+n,t=l+e.length,l=s.indexOf(e,t);while(~l);return r+s.substring(t)},Po=(s=$s)=>{let e=s?vs:()=>String;return{isColorSupported:s,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};D.exports=Po();D.exports.createColors=Po});var ws=M((De,me)=>{me.exports={name:"@activade/open-workflows",version:"2.0.3",description:"AI-powered GitHub automation workflows via composite actions",keywords:["github","github-actions","ai","automation","code-review","pr-review","issue-labeling","opencode"],author:"activadee",license:"MIT",repository:{type:"git",url:"git+https://github.com/activadee/open-workflows.git"},type:"module",bin:{"open-workflows":"dist/cli/index.js"},files:["dist","actions","README.md","LICENSE"],scripts:{clean:"rm -rf dist",build:"bun run clean && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --minify",dev:"bun run build --watch",typecheck:"tsc --noEmit",test:"bun test",prepublishOnly:"bun run clean && bun run build && bun run typecheck"},dependencies:{"@clack/prompts":"^0.10.0",picocolors:"^1.1.1"},devDependencies:{"@types/node":"^22.0.0","@types/bun":"^1.3.5",typescript:"^5.6.0"},engines:{node:">=18.0.0"}}});import{stripVTControlCharacters as po}from"util";var g=B(F(),1);import{stdin as Vo,stdout as jo}from"process";import*as _ from"readline";import Ho from"readline";import{Writable as Ss}from"stream";function As({onlyFirst:s=!1}={}){let e=["[\\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(e,s?void 0:"g")}var Cs=As();function qo(s){if(typeof s!="string")throw TypeError(`Expected a \`string\`, got \`${typeof s}\``);return s.replace(Cs,"")}function zo(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Jo={exports:{}};(function(s){var e={};s.exports=e,e.eastAsianWidth=function(l){var r=l.charCodeAt(0),t=l.length==2?l.charCodeAt(1):0,o=r;return 55296<=r&&r<=56319&&56320<=t&&t<=57343&&(r&=1023,t&=1023,o=r<<10|t,o+=65536),o==12288||65281<=o&&o<=65376||65504<=o&&o<=65510?"F":o==8361||65377<=o&&o<=65470||65474<=o&&o<=65479||65482<=o&&o<=65487||65490<=o&&o<=65495||65498<=o&&o<=65500||65512<=o&&o<=65518?"H":4352<=o&&o<=4447||4515<=o&&o<=4519||4602<=o&&o<=4607||9001<=o&&o<=9002||11904<=o&&o<=11929||11931<=o&&o<=12019||12032<=o&&o<=12245||12272<=o&&o<=12283||12289<=o&&o<=12350||12353<=o&&o<=12438||12441<=o&&o<=12543||12549<=o&&o<=12589||12593<=o&&o<=12686||12688<=o&&o<=12730||12736<=o&&o<=12771||12784<=o&&o<=12830||12832<=o&&o<=12871||12880<=o&&o<=13054||13056<=o&&o<=19903||19968<=o&&o<=42124||42128<=o&&o<=42182||43360<=o&&o<=43388||44032<=o&&o<=55203||55216<=o&&o<=55238||55243<=o&&o<=55291||63744<=o&&o<=64255||65040<=o&&o<=65049||65072<=o&&o<=65106||65108<=o&&o<=65126||65128<=o&&o<=65131||110592<=o&&o<=110593||127488<=o&&o<=127490||127504<=o&&o<=127546||127552<=o&&o<=127560||127568<=o&&o<=127569||131072<=o&&o<=194367||177984<=o&&o<=196605||196608<=o&&o<=262141?"W":32<=o&&o<=126||162<=o&&o<=163||165<=o&&o<=166||o==172||o==175||10214<=o&&o<=10221||10629<=o&&o<=10630?"Na":o==161||o==164||167<=o&&o<=168||o==170||173<=o&&o<=174||176<=o&&o<=180||182<=o&&o<=186||188<=o&&o<=191||o==198||o==208||215<=o&&o<=216||222<=o&&o<=225||o==230||232<=o&&o<=234||236<=o&&o<=237||o==240||242<=o&&o<=243||247<=o&&o<=250||o==252||o==254||o==257||o==273||o==275||o==283||294<=o&&o<=295||o==299||305<=o&&o<=307||o==312||319<=o&&o<=322||o==324||328<=o&&o<=331||o==333||338<=o&&o<=339||358<=o&&o<=359||o==363||o==462||o==464||o==466||o==468||o==470||o==472||o==474||o==476||o==593||o==609||o==708||o==711||713<=o&&o<=715||o==717||o==720||728<=o&&o<=731||o==733||o==735||768<=o&&o<=879||913<=o&&o<=929||931<=o&&o<=937||945<=o&&o<=961||963<=o&&o<=969||o==1025||1040<=o&&o<=1103||o==1105||o==8208||8211<=o&&o<=8214||8216<=o&&o<=8217||8220<=o&&o<=8221||8224<=o&&o<=8226||8228<=o&&o<=8231||o==8240||8242<=o&&o<=8243||o==8245||o==8251||o==8254||o==8308||o==8319||8321<=o&&o<=8324||o==8364||o==8451||o==8453||o==8457||o==8467||o==8470||8481<=o&&o<=8482||o==8486||o==8491||8531<=o&&o<=8532||8539<=o&&o<=8542||8544<=o&&o<=8555||8560<=o&&o<=8569||o==8585||8592<=o&&o<=8601||8632<=o&&o<=8633||o==8658||o==8660||o==8679||o==8704||8706<=o&&o<=8707||8711<=o&&o<=8712||o==8715||o==8719||o==8721||o==8725||o==8730||8733<=o&&o<=8736||o==8739||o==8741||8743<=o&&o<=8748||o==8750||8756<=o&&o<=8759||8764<=o&&o<=8765||o==8776||o==8780||o==8786||8800<=o&&o<=8801||8804<=o&&o<=8807||8810<=o&&o<=8811||8814<=o&&o<=8815||8834<=o&&o<=8835||8838<=o&&o<=8839||o==8853||o==8857||o==8869||o==8895||o==8978||9312<=o&&o<=9449||9451<=o&&o<=9547||9552<=o&&o<=9587||9600<=o&&o<=9615||9618<=o&&o<=9621||9632<=o&&o<=9633||9635<=o&&o<=9641||9650<=o&&o<=9651||9654<=o&&o<=9655||9660<=o&&o<=9661||9664<=o&&o<=9665||9670<=o&&o<=9672||o==9675||9678<=o&&o<=9681||9698<=o&&o<=9701||o==9711||9733<=o&&o<=9734||o==9737||9742<=o&&o<=9743||9748<=o&&o<=9749||o==9756||o==9758||o==9792||o==9794||9824<=o&&o<=9825||9827<=o&&o<=9829||9831<=o&&o<=9834||9836<=o&&o<=9837||o==9839||9886<=o&&o<=9887||9918<=o&&o<=9919||9924<=o&&o<=9933||9935<=o&&o<=9953||o==9955||9960<=o&&o<=9983||o==10045||o==10071||10102<=o&&o<=10111||11093<=o&&o<=11097||12872<=o&&o<=12879||57344<=o&&o<=63743||65024<=o&&o<=65039||o==65533||127232<=o&&o<=127242||127248<=o&&o<=127277||127280<=o&&o<=127337||127344<=o&&o<=127386||917760<=o&&o<=917999||983040<=o&&o<=1048573||1048576<=o&&o<=1114109?"A":"N"},e.characterLength=function(l){var r=this.eastAsianWidth(l);return r=="F"||r=="W"||r=="A"?2:1};function n(l){return l.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(l){for(var r=n(l),t=0,o=0;o<r.length;o++)t=t+this.characterLength(r[o]);return t},e.slice=function(l,r,t){textLen=e.length(l),r=r||0,t=t||1,r<0&&(r=textLen+r),t<0&&(t=textLen+t);for(var o="",a=0,p=n(l),m=0;m<p.length;m++){var f=p[m],c=e.length(f);if(a>=r-(c==2?1:0))if(a+c<=t)o+=f;else break;a+=c}return o}})(Jo);var Ts=Jo.exports,Ns=zo(Ts),Rs=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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CBB\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(?:\u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D1E\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\u303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uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},Ps=zo(Rs);function U(s,e={}){if(typeof s!="string"||s.length===0||(e={ambiguousIsNarrow:!0,...e},s=qo(s),s.length===0))return 0;s=s.replace(Ps()," ");let n=e.ambiguousIsNarrow?1:2,l=0;for(let r of s){let t=r.codePointAt(0);if(t<=31||t>=127&&t<=159||t>=768&&t<=879)continue;switch(Ns.eastAsianWidth(r)){case"F":case"W":l+=2;break;case"A":l+=n;break;default:l+=1}}return l}var so=10,Bo=(s=0)=>(e)=>`\x1B[${e+s}m`,Uo=(s=0)=>(e)=>`\x1B[${38+s};5;${e}m`,Ko=(s=0)=>(e,n,l)=>`\x1B[${38+s};2;${e};${n};${l}m`,w={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(w.modifier);var Hs=Object.keys(w.color),Bs=Object.keys(w.bgColor);[...Hs,...Bs];function Us(){let s=new Map;for(let[e,n]of Object.entries(w)){for(let[l,r]of Object.entries(n))w[l]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[l]=w[l],s.set(r[0],r[1]);Object.defineProperty(w,e,{value:n,enumerable:!1})}return Object.defineProperty(w,"codes",{value:s,enumerable:!1}),w.color.close="\x1B[39m",w.bgColor.close="\x1B[49m",w.color.ansi=Bo(),w.color.ansi256=Uo(),w.color.ansi16m=Ko(),w.bgColor.ansi=Bo(so),w.bgColor.ansi256=Uo(so),w.bgColor.ansi16m=Ko(so),Object.defineProperties(w,{rgbToAnsi256:{value:(e,n,l)=>e===n&&n===l?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(l/255*5),enumerable:!1},hexToRgb:{value:(e)=>{let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!n)return[0,0,0];let[l]=n;l.length===3&&(l=[...l].map((t)=>t+t).join(""));let r=Number.parseInt(l,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:(e)=>w.rgbToAnsi256(...w.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:(e)=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let n,l,r;if(e>=232)n=((e-232)*10+8)/255,l=n,r=n;else{e-=16;let a=e%36;n=Math.floor(e/36)/5,l=Math.floor(a/6)/5,r=a%6/5}let t=Math.max(n,l,r)*2;if(t===0)return 30;let o=30+(Math.round(r)<<2|Math.round(l)<<1|Math.round(n));return t===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,n,l)=>w.ansi256ToAnsi(w.rgbToAnsi256(e,n,l)),enumerable:!1},hexToAnsi:{value:(e)=>w.ansi256ToAnsi(w.hexToAnsi256(e)),enumerable:!1}}),w}var Ks=Us(),J=new Set(["\x1B","\x9B"]),Ws=39,ro="\x07",Qo="[",Ls="]",Xo="m",lo=`${Ls}8;;`,Wo=(s)=>`${J.values().next().value}${Qo}${s}${Xo}`,Lo=(s)=>`${J.values().next().value}${lo}${s}${ro}`,Gs=(s)=>s.split(" ").map((e)=>U(e)),eo=(s,e,n)=>{let l=[...e],r=!1,t=!1,o=U(qo(s[s.length-1]));for(let[a,p]of l.entries()){let m=U(p);if(o+m<=n?s[s.length-1]+=p:(s.push(p),o=0),J.has(p)&&(r=!0,t=l.slice(a+1).join("").startsWith(lo)),r){t?p===ro&&(r=!1,t=!1):p===Xo&&(r=!1);continue}o+=m,o===n&&a<l.length-1&&(s.push(""),o=0)}!o&&s[s.length-1].length>0&&s.length>1&&(s[s.length-2]+=s.pop())},Ys=(s)=>{let e=s.split(" "),n=e.length;for(;n>0&&!(U(e[n-1])>0);)n--;return n===e.length?s:e.slice(0,n).join(" ")+e.slice(n).join("")},Vs=(s,e,n={})=>{if(n.trim!==!1&&s.trim()==="")return"";let l="",r,t,o=Gs(s),a=[""];for(let[m,f]of s.split(" ").entries()){n.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let c=U(a[a.length-1]);if(m!==0&&(c>=e&&(n.wordWrap===!1||n.trim===!1)&&(a.push(""),c=0),(c>0||n.trim===!1)&&(a[a.length-1]+=" ",c++)),n.hard&&o[m]>e){let d=e-c,O=1+Math.floor((o[m]-d-1)/e);Math.floor((o[m]-1)/e)<O&&a.push(""),eo(a,f,e);continue}if(c+o[m]>e&&c>0&&o[m]>0){if(n.wordWrap===!1&&c<e){eo(a,f,e);continue}a.push("")}if(c+o[m]>e&&n.wordWrap===!1){eo(a,f,e);continue}a[a.length-1]+=f}n.trim!==!1&&(a=a.map((m)=>Ys(m)));let p=[...a.join(`
4
- `)];for(let[m,f]of p.entries()){if(l+=f,J.has(f)){let{groups:d}=new RegExp(`(?:\\${Qo}(?<code>\\d+)m|\\${lo}(?<uri>.*)${ro})`).exec(p.slice(m).join(""))||{groups:{}};if(d.code!==void 0){let O=Number.parseFloat(d.code);r=O===Ws?void 0:O}else d.uri!==void 0&&(t=d.uri.length===0?void 0:d.uri)}let c=Ks.codes.get(Number(r));p[m+1]===`
5
- `?(t&&(l+=Lo("")),r&&c&&(l+=Wo(c))):f===`
3
+ var xs=Object.create;var{getPrototypeOf:Es,defineProperty:To,getOwnPropertyNames:ks}=Object;var ys=Object.prototype.hasOwnProperty;var B=(s,e,n)=>{n=s!=null?xs(Es(s)):{};let l=e||!s||!s.__esModule?To(n,"default",{value:s,enumerable:!0}):n;for(let r of ks(s))if(!ys.call(l,r))To(l,r,{get:()=>s[r],enumerable:!0});return l};var M=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var F=M((ge,No)=>{var u={to(s,e){if(!e)return`\x1B[${s+1}G`;return`\x1B[${e+1};${s+1}H`},move(s,e){let n="";if(s<0)n+=`\x1B[${-s}D`;else if(s>0)n+=`\x1B[${s}C`;if(e<0)n+=`\x1B[${-e}A`;else if(e>0)n+=`\x1B[${e}B`;return n},up:(s=1)=>`\x1B[${s}A`,down:(s=1)=>`\x1B[${s}B`,forward:(s=1)=>`\x1B[${s}C`,backward:(s=1)=>`\x1B[${s}D`,nextLine:(s=1)=>"\x1B[E".repeat(s),prevLine:(s=1)=>"\x1B[F".repeat(s),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},Os={up:(s=1)=>"\x1B[S".repeat(s),down:(s=1)=>"\x1B[T".repeat(s)},$s={screen:"\x1B[2J",up:(s=1)=>"\x1B[1J".repeat(s),down:(s=1)=>"\x1B[J".repeat(s),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(s){let e="";for(let n=0;n<s;n++)e+=this.line+(n<s-1?u.up():"");if(s)e+=u.left;return e}};No.exports={cursor:u,scroll:Os,erase:$s,beep:"\x07"}});var oo=M((xe,D)=>{var V=process||{},Ro=V.argv||[],j=V.env||{},vs=!(!!j.NO_COLOR||Ro.includes("--no-color"))&&(!!j.FORCE_COLOR||Ro.includes("--color")||V.platform==="win32"||(V.stdout||{}).isTTY&&j.TERM!=="dumb"||!!j.CI),Is=(s,e,n=s)=>(l)=>{let r=""+l,t=r.indexOf(e,s.length);return~t?s+_s(r,e,n,t)+e:s+r+e},_s=(s,e,n,l)=>{let r="",t=0;do r+=s.substring(t,l)+n,t=l+e.length,l=s.indexOf(e,t);while(~l);return r+s.substring(t)},Po=(s=vs)=>{let e=s?Is:()=>String;return{isColorSupported:s,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};D.exports=Po();D.exports.createColors=Po});var ws=M((De,me)=>{me.exports={name:"@activade/open-workflows",version:"2.0.4",description:"AI-powered GitHub automation workflows via composite actions",keywords:["github","github-actions","ai","automation","code-review","pr-review","issue-labeling","opencode"],author:"activadee",license:"MIT",repository:{type:"git",url:"git+https://github.com/activadee/open-workflows.git"},type:"module",bin:{"open-workflows":"dist/cli/index.js"},files:["dist","actions","README.md","LICENSE"],scripts:{clean:"rm -rf dist",build:"bun run clean && bun build src/cli/index.ts --outdir dist/cli --target bun --format esm --minify",dev:"bun run build --watch",typecheck:"tsc --noEmit",test:"bun test",prepublishOnly:"bun run clean && bun run build && bun run typecheck"},dependencies:{"@clack/prompts":"^0.10.0",picocolors:"^1.1.1"},devDependencies:{"@types/node":"^22.0.0","@types/bun":"^1.3.5",typescript:"^5.6.0"},engines:{node:">=18.0.0"}}});import{stripVTControlCharacters as po}from"util";var g=B(F(),1);import{stdin as jo,stdout as Vo}from"process";import*as _ from"readline";import Ho from"readline";import{Writable as Ss}from"stream";function As({onlyFirst:s=!1}={}){let e=["[\\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(e,s?void 0:"g")}var Cs=As();function qo(s){if(typeof s!="string")throw TypeError(`Expected a \`string\`, got \`${typeof s}\``);return s.replace(Cs,"")}function zo(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Jo={exports:{}};(function(s){var e={};s.exports=e,e.eastAsianWidth=function(l){var r=l.charCodeAt(0),t=l.length==2?l.charCodeAt(1):0,o=r;return 55296<=r&&r<=56319&&56320<=t&&t<=57343&&(r&=1023,t&=1023,o=r<<10|t,o+=65536),o==12288||65281<=o&&o<=65376||65504<=o&&o<=65510?"F":o==8361||65377<=o&&o<=65470||65474<=o&&o<=65479||65482<=o&&o<=65487||65490<=o&&o<=65495||65498<=o&&o<=65500||65512<=o&&o<=65518?"H":4352<=o&&o<=4447||4515<=o&&o<=4519||4602<=o&&o<=4607||9001<=o&&o<=9002||11904<=o&&o<=11929||11931<=o&&o<=12019||12032<=o&&o<=12245||12272<=o&&o<=12283||12289<=o&&o<=12350||12353<=o&&o<=12438||12441<=o&&o<=12543||12549<=o&&o<=12589||12593<=o&&o<=12686||12688<=o&&o<=12730||12736<=o&&o<=12771||12784<=o&&o<=12830||12832<=o&&o<=12871||12880<=o&&o<=13054||13056<=o&&o<=19903||19968<=o&&o<=42124||42128<=o&&o<=42182||43360<=o&&o<=43388||44032<=o&&o<=55203||55216<=o&&o<=55238||55243<=o&&o<=55291||63744<=o&&o<=64255||65040<=o&&o<=65049||65072<=o&&o<=65106||65108<=o&&o<=65126||65128<=o&&o<=65131||110592<=o&&o<=110593||127488<=o&&o<=127490||127504<=o&&o<=127546||127552<=o&&o<=127560||127568<=o&&o<=127569||131072<=o&&o<=194367||177984<=o&&o<=196605||196608<=o&&o<=262141?"W":32<=o&&o<=126||162<=o&&o<=163||165<=o&&o<=166||o==172||o==175||10214<=o&&o<=10221||10629<=o&&o<=10630?"Na":o==161||o==164||167<=o&&o<=168||o==170||173<=o&&o<=174||176<=o&&o<=180||182<=o&&o<=186||188<=o&&o<=191||o==198||o==208||215<=o&&o<=216||222<=o&&o<=225||o==230||232<=o&&o<=234||236<=o&&o<=237||o==240||242<=o&&o<=243||247<=o&&o<=250||o==252||o==254||o==257||o==273||o==275||o==283||294<=o&&o<=295||o==299||305<=o&&o<=307||o==312||319<=o&&o<=322||o==324||328<=o&&o<=331||o==333||338<=o&&o<=339||358<=o&&o<=359||o==363||o==462||o==464||o==466||o==468||o==470||o==472||o==474||o==476||o==593||o==609||o==708||o==711||713<=o&&o<=715||o==717||o==720||728<=o&&o<=731||o==733||o==735||768<=o&&o<=879||913<=o&&o<=929||931<=o&&o<=937||945<=o&&o<=961||963<=o&&o<=969||o==1025||1040<=o&&o<=1103||o==1105||o==8208||8211<=o&&o<=8214||8216<=o&&o<=8217||8220<=o&&o<=8221||8224<=o&&o<=8226||8228<=o&&o<=8231||o==8240||8242<=o&&o<=8243||o==8245||o==8251||o==8254||o==8308||o==8319||8321<=o&&o<=8324||o==8364||o==8451||o==8453||o==8457||o==8467||o==8470||8481<=o&&o<=8482||o==8486||o==8491||8531<=o&&o<=8532||8539<=o&&o<=8542||8544<=o&&o<=8555||8560<=o&&o<=8569||o==8585||8592<=o&&o<=8601||8632<=o&&o<=8633||o==8658||o==8660||o==8679||o==8704||8706<=o&&o<=8707||8711<=o&&o<=8712||o==8715||o==8719||o==8721||o==8725||o==8730||8733<=o&&o<=8736||o==8739||o==8741||8743<=o&&o<=8748||o==8750||8756<=o&&o<=8759||8764<=o&&o<=8765||o==8776||o==8780||o==8786||8800<=o&&o<=8801||8804<=o&&o<=8807||8810<=o&&o<=8811||8814<=o&&o<=8815||8834<=o&&o<=8835||8838<=o&&o<=8839||o==8853||o==8857||o==8869||o==8895||o==8978||9312<=o&&o<=9449||9451<=o&&o<=9547||9552<=o&&o<=9587||9600<=o&&o<=9615||9618<=o&&o<=9621||9632<=o&&o<=9633||9635<=o&&o<=9641||9650<=o&&o<=9651||9654<=o&&o<=9655||9660<=o&&o<=9661||9664<=o&&o<=9665||9670<=o&&o<=9672||o==9675||9678<=o&&o<=9681||9698<=o&&o<=9701||o==9711||9733<=o&&o<=9734||o==9737||9742<=o&&o<=9743||9748<=o&&o<=9749||o==9756||o==9758||o==9792||o==9794||9824<=o&&o<=9825||9827<=o&&o<=9829||9831<=o&&o<=9834||9836<=o&&o<=9837||o==9839||9886<=o&&o<=9887||9918<=o&&o<=9919||9924<=o&&o<=9933||9935<=o&&o<=9953||o==9955||9960<=o&&o<=9983||o==10045||o==10071||10102<=o&&o<=10111||11093<=o&&o<=11097||12872<=o&&o<=12879||57344<=o&&o<=63743||65024<=o&&o<=65039||o==65533||127232<=o&&o<=127242||127248<=o&&o<=127277||127280<=o&&o<=127337||127344<=o&&o<=127386||917760<=o&&o<=917999||983040<=o&&o<=1048573||1048576<=o&&o<=1114109?"A":"N"},e.characterLength=function(l){var r=this.eastAsianWidth(l);return r=="F"||r=="W"||r=="A"?2:1};function n(l){return l.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(l){for(var r=n(l),t=0,o=0;o<r.length;o++)t=t+this.characterLength(r[o]);return t},e.slice=function(l,r,t){textLen=e.length(l),r=r||0,t=t||1,r<0&&(r=textLen+r),t<0&&(t=textLen+t);for(var o="",i=0,p=n(l),m=0;m<p.length;m++){var b=p[m],c=e.length(b);if(i>=r-(c==2?1:0))if(i+c<=t)o+=b;else break;i+=c}return o}})(Jo);var Ts=Jo.exports,Ns=zo(Ts),Rs=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\uDE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FED]|\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])|\uD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DD18-\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\u2B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\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},Ps=zo(Rs);function U(s,e={}){if(typeof s!="string"||s.length===0||(e={ambiguousIsNarrow:!0,...e},s=qo(s),s.length===0))return 0;s=s.replace(Ps()," ");let n=e.ambiguousIsNarrow?1:2,l=0;for(let r of s){let t=r.codePointAt(0);if(t<=31||t>=127&&t<=159||t>=768&&t<=879)continue;switch(Ns.eastAsianWidth(r)){case"F":case"W":l+=2;break;case"A":l+=n;break;default:l+=1}}return l}var so=10,Bo=(s=0)=>(e)=>`\x1B[${e+s}m`,Uo=(s=0)=>(e)=>`\x1B[${38+s};5;${e}m`,Ko=(s=0)=>(e,n,l)=>`\x1B[${38+s};2;${e};${n};${l}m`,w={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(w.modifier);var Hs=Object.keys(w.color),Bs=Object.keys(w.bgColor);[...Hs,...Bs];function Us(){let s=new Map;for(let[e,n]of Object.entries(w)){for(let[l,r]of Object.entries(n))w[l]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[l]=w[l],s.set(r[0],r[1]);Object.defineProperty(w,e,{value:n,enumerable:!1})}return Object.defineProperty(w,"codes",{value:s,enumerable:!1}),w.color.close="\x1B[39m",w.bgColor.close="\x1B[49m",w.color.ansi=Bo(),w.color.ansi256=Uo(),w.color.ansi16m=Ko(),w.bgColor.ansi=Bo(so),w.bgColor.ansi256=Uo(so),w.bgColor.ansi16m=Ko(so),Object.defineProperties(w,{rgbToAnsi256:{value:(e,n,l)=>e===n&&n===l?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(l/255*5),enumerable:!1},hexToRgb:{value:(e)=>{let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!n)return[0,0,0];let[l]=n;l.length===3&&(l=[...l].map((t)=>t+t).join(""));let r=Number.parseInt(l,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:(e)=>w.rgbToAnsi256(...w.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:(e)=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let n,l,r;if(e>=232)n=((e-232)*10+8)/255,l=n,r=n;else{e-=16;let i=e%36;n=Math.floor(e/36)/5,l=Math.floor(i/6)/5,r=i%6/5}let t=Math.max(n,l,r)*2;if(t===0)return 30;let o=30+(Math.round(r)<<2|Math.round(l)<<1|Math.round(n));return t===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,n,l)=>w.ansi256ToAnsi(w.rgbToAnsi256(e,n,l)),enumerable:!1},hexToAnsi:{value:(e)=>w.ansi256ToAnsi(w.hexToAnsi256(e)),enumerable:!1}}),w}var Ks=Us(),J=new Set(["\x1B","\x9B"]),Ws=39,ro="\x07",Qo="[",Ls="]",Xo="m",lo=`${Ls}8;;`,Wo=(s)=>`${J.values().next().value}${Qo}${s}${Xo}`,Lo=(s)=>`${J.values().next().value}${lo}${s}${ro}`,Gs=(s)=>s.split(" ").map((e)=>U(e)),eo=(s,e,n)=>{let l=[...e],r=!1,t=!1,o=U(qo(s[s.length-1]));for(let[i,p]of l.entries()){let m=U(p);if(o+m<=n?s[s.length-1]+=p:(s.push(p),o=0),J.has(p)&&(r=!0,t=l.slice(i+1).join("").startsWith(lo)),r){t?p===ro&&(r=!1,t=!1):p===Xo&&(r=!1);continue}o+=m,o===n&&i<l.length-1&&(s.push(""),o=0)}!o&&s[s.length-1].length>0&&s.length>1&&(s[s.length-2]+=s.pop())},Ys=(s)=>{let e=s.split(" "),n=e.length;for(;n>0&&!(U(e[n-1])>0);)n--;return n===e.length?s:e.slice(0,n).join(" ")+e.slice(n).join("")},js=(s,e,n={})=>{if(n.trim!==!1&&s.trim()==="")return"";let l="",r,t,o=Gs(s),i=[""];for(let[m,b]of s.split(" ").entries()){n.trim!==!1&&(i[i.length-1]=i[i.length-1].trimStart());let c=U(i[i.length-1]);if(m!==0&&(c>=e&&(n.wordWrap===!1||n.trim===!1)&&(i.push(""),c=0),(c>0||n.trim===!1)&&(i[i.length-1]+=" ",c++)),n.hard&&o[m]>e){let d=e-c,O=1+Math.floor((o[m]-d-1)/e);Math.floor((o[m]-1)/e)<O&&i.push(""),eo(i,b,e);continue}if(c+o[m]>e&&c>0&&o[m]>0){if(n.wordWrap===!1&&c<e){eo(i,b,e);continue}i.push("")}if(c+o[m]>e&&n.wordWrap===!1){eo(i,b,e);continue}i[i.length-1]+=b}n.trim!==!1&&(i=i.map((m)=>Ys(m)));let p=[...i.join(`
4
+ `)];for(let[m,b]of p.entries()){if(l+=b,J.has(b)){let{groups:d}=new RegExp(`(?:\\${Qo}(?<code>\\d+)m|\\${lo}(?<uri>.*)${ro})`).exec(p.slice(m).join(""))||{groups:{}};if(d.code!==void 0){let O=Number.parseFloat(d.code);r=O===Ws?void 0:O}else d.uri!==void 0&&(t=d.uri.length===0?void 0:d.uri)}let c=Ks.codes.get(Number(r));p[m+1]===`
5
+ `?(t&&(l+=Lo("")),r&&c&&(l+=Wo(c))):b===`
6
6
  `&&(r&&c&&(l+=Wo(r)),t&&(l+=Lo(t)))}return l};function Go(s,e,n){return String(s).normalize().replace(/\r\n/g,`
7
7
  `).split(`
8
- `).map((l)=>Vs(l,e,n)).join(`
9
- `)}var js=["up","down","left","right","space","enter","cancel"],z={actions:new Set(js),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]])};function to(s,e){if(typeof s=="string")return z.aliases.get(s)===e;for(let n of s)if(n!==void 0&&to(n,e))return!0;return!1}function qs(s,e){if(s===e)return;let n=s.split(`
8
+ `).map((l)=>js(l,e,n)).join(`
9
+ `)}var Vs=["up","down","left","right","space","enter","cancel"],z={actions:new Set(Vs),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["\x03","cancel"],["escape","cancel"]])};function to(s,e){if(typeof s=="string")return z.aliases.get(s)===e;for(let n of s)if(n!==void 0&&to(n,e))return!0;return!1}function qs(s,e){if(s===e)return;let n=s.split(`
10
10
  `),l=e.split(`
11
- `),r=[];for(let t=0;t<Math.max(n.length,l.length);t++)n[t]!==l[t]&&r.push(t);return r}var zs=globalThis.process.platform.startsWith("win"),no=Symbol("clack:cancel");function K(s){return s===no}function q(s,e){let n=s;n.isTTY&&n.setRawMode(e)}function Zo({input:s=Vo,output:e=jo,overwrite:n=!0,hideCursor:l=!0}={}){let r=_.createInterface({input:s,output:e,prompt:"",tabSize:1});_.emitKeypressEvents(s,r),s.isTTY&&s.setRawMode(!0);let t=(o,{name:a,sequence:p})=>{let m=String(o);if(to([m,a,p],"cancel")){l&&e.write(g.cursor.show),process.exit(0);return}if(!n)return;_.moveCursor(e,a==="return"?0:-1,a==="return"?-1:0,()=>{_.clearLine(e,1,()=>{s.once("keypress",t)})})};return l&&e.write(g.cursor.hide),s.once("keypress",t),()=>{s.off("keypress",t),l&&e.write(g.cursor.show),s.isTTY&&!zs&&s.setRawMode(!1),r.terminal=!1,r.close()}}var Js=Object.defineProperty,Qs=(s,e,n)=>(e in s)?Js(s,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[e]=n,y=(s,e,n)=>(Qs(s,typeof e!="symbol"?e+"":e,n),n);class io{constructor(s,e=!0){y(this,"input"),y(this,"output"),y(this,"_abortSignal"),y(this,"rl"),y(this,"opts"),y(this,"_render"),y(this,"_track",!1),y(this,"_prevFrame",""),y(this,"_subscribers",new Map),y(this,"_cursor",0),y(this,"state","initial"),y(this,"error",""),y(this,"value");let{input:n=Vo,output:l=jo,render:r,signal:t,...o}=s;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=r.bind(this),this._track=e,this._abortSignal=t,this.input=n,this.output=l}unsubscribe(){this._subscribers.clear()}setSubscriber(s,e){let n=this._subscribers.get(s)??[];n.push(e),this._subscribers.set(s,n)}on(s,e){this.setSubscriber(s,{cb:e})}once(s,e){this.setSubscriber(s,{cb:e,once:!0})}emit(s,...e){let n=this._subscribers.get(s)??[],l=[];for(let r of n)r.cb(...e),r.once&&l.push(()=>n.splice(n.indexOf(r),1));for(let r of l)r()}prompt(){return new Promise((s,e)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),s(no);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let n=new Ss;n._write=(l,r,t)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),t()},this.input.pipe(n),this.rl=Ho.createInterface({input:this.input,output:n,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),Ho.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),q(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(g.cursor.show),this.output.off("resize",this.render),q(this.input,!1),s(this.value)}),this.once("cancel",()=>{this.output.write(g.cursor.show),this.output.off("resize",this.render),q(this.input,!1),s(no)})})}onKeypress(s,e){if(this.state==="error"&&(this.state="active"),e?.name&&(!this._track&&z.aliases.has(e.name)&&this.emit("cursor",z.aliases.get(e.name)),z.actions.has(e.name)&&this.emit("cursor",e.name)),s&&(s.toLowerCase()==="y"||s.toLowerCase()==="n")&&this.emit("confirm",s.toLowerCase()==="y"),s==="\t"&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),s&&this.emit("key",s.toLowerCase()),e?.name==="return"){if(!this.value&&this.opts.placeholder&&(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder)),this.opts.validate){let n=this.opts.validate(this.value);n&&(this.error=n instanceof Error?n.message:n,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}to([s,e?.name,e?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
11
+ `),r=[];for(let t=0;t<Math.max(n.length,l.length);t++)n[t]!==l[t]&&r.push(t);return r}var zs=globalThis.process.platform.startsWith("win"),no=Symbol("clack:cancel");function K(s){return s===no}function q(s,e){let n=s;n.isTTY&&n.setRawMode(e)}function Zo({input:s=jo,output:e=Vo,overwrite:n=!0,hideCursor:l=!0}={}){let r=_.createInterface({input:s,output:e,prompt:"",tabSize:1});_.emitKeypressEvents(s,r),s.isTTY&&s.setRawMode(!0);let t=(o,{name:i,sequence:p})=>{let m=String(o);if(to([m,i,p],"cancel")){l&&e.write(g.cursor.show),process.exit(0);return}if(!n)return;_.moveCursor(e,i==="return"?0:-1,i==="return"?-1:0,()=>{_.clearLine(e,1,()=>{s.once("keypress",t)})})};return l&&e.write(g.cursor.hide),s.once("keypress",t),()=>{s.off("keypress",t),l&&e.write(g.cursor.show),s.isTTY&&!zs&&s.setRawMode(!1),r.terminal=!1,r.close()}}var Js=Object.defineProperty,Qs=(s,e,n)=>(e in s)?Js(s,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[e]=n,y=(s,e,n)=>(Qs(s,typeof e!="symbol"?e+"":e,n),n);class ao{constructor(s,e=!0){y(this,"input"),y(this,"output"),y(this,"_abortSignal"),y(this,"rl"),y(this,"opts"),y(this,"_render"),y(this,"_track",!1),y(this,"_prevFrame",""),y(this,"_subscribers",new Map),y(this,"_cursor",0),y(this,"state","initial"),y(this,"error",""),y(this,"value");let{input:n=jo,output:l=Vo,render:r,signal:t,...o}=s;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=r.bind(this),this._track=e,this._abortSignal=t,this.input=n,this.output=l}unsubscribe(){this._subscribers.clear()}setSubscriber(s,e){let n=this._subscribers.get(s)??[];n.push(e),this._subscribers.set(s,n)}on(s,e){this.setSubscriber(s,{cb:e})}once(s,e){this.setSubscriber(s,{cb:e,once:!0})}emit(s,...e){let n=this._subscribers.get(s)??[],l=[];for(let r of n)r.cb(...e),r.once&&l.push(()=>n.splice(n.indexOf(r),1));for(let r of l)r()}prompt(){return new Promise((s,e)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),s(no);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let n=new Ss;n._write=(l,r,t)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),t()},this.input.pipe(n),this.rl=Ho.createInterface({input:this.input,output:n,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),Ho.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),q(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(g.cursor.show),this.output.off("resize",this.render),q(this.input,!1),s(this.value)}),this.once("cancel",()=>{this.output.write(g.cursor.show),this.output.off("resize",this.render),q(this.input,!1),s(no)})})}onKeypress(s,e){if(this.state==="error"&&(this.state="active"),e?.name&&(!this._track&&z.aliases.has(e.name)&&this.emit("cursor",z.aliases.get(e.name)),z.actions.has(e.name)&&this.emit("cursor",e.name)),s&&(s.toLowerCase()==="y"||s.toLowerCase()==="n")&&this.emit("confirm",s.toLowerCase()==="y"),s==="\t"&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),s&&this.emit("key",s.toLowerCase()),e?.name==="return"){if(!this.value&&this.opts.placeholder&&(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder)),this.opts.validate){let n=this.opts.validate(this.value);n&&(this.error=n instanceof Error?n.message:n,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}to([s,e?.name,e?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
12
12
  `),q(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let s=Go(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
13
13
  `).length-1;this.output.write(g.cursor.move(-999,s*-1))}render(){let s=Go(this._render(this)??"",process.stdout.columns,{hard:!0});if(s!==this._prevFrame){if(this.state==="initial")this.output.write(g.cursor.hide);else{let e=qs(this._prevFrame,s);if(this.restoreCursor(),e&&e?.length===1){let n=e[0];this.output.write(g.cursor.move(0,n)),this.output.write(g.erase.lines(1));let l=s.split(`
14
14
  `);this.output.write(l[n]),this._prevFrame=s,this.output.write(g.cursor.move(0,l.length-n-1));return}if(e&&e?.length>1){let n=e[0];this.output.write(g.cursor.move(0,n)),this.output.write(g.erase.down());let l=s.split(`
15
15
  `).slice(n);this.output.write(l.join(`
16
- `)),this._prevFrame=s;return}this.output.write(g.erase.down())}this.output.write(s),this.state==="initial"&&(this.state="active"),this._prevFrame=s}}}class ao extends io{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(s){super(s,!1),this.value=!!s.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(e)=>{this.output.write(g.cursor.move(0,-1)),this.value=e,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var Xs;Xs=new WeakMap;var Zs=Object.defineProperty,Ms=(s,e,n)=>(e in s)?Zs(s,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[e]=n,Yo=(s,e,n)=>(Ms(s,typeof e!="symbol"?e+"":e,n),n),Mo=class extends io{constructor(s){super(s,!1),Yo(this,"options"),Yo(this,"cursor",0),this.options=s.options,this.value=[...s.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:e})=>e===s.cursorAt),0),this.on("key",(e)=>{e==="a"&&this.toggleAll()}),this.on("cursor",(e)=>{switch(e){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;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let s=this.value.length===this.options.length;this.value=s?[]:this.options.map((e)=>e.value)}toggleValue(){let s=this.value.includes(this._value);this.value=s?this.value.filter((e)=>e!==this._value):[...this.value,this._value]}};var i=B(oo(),1),Q=B(F(),1);import $ from"process";function us(){return $.platform!=="win32"?$.env.TERM!=="linux":!!$.env.CI||!!$.env.WT_SESSION||!!$.env.TERMINUS_SUBLIME||$.env.ConEmuTask==="{cmd::Cmder}"||$.env.TERM_PROGRAM==="Terminus-Sublime"||$.env.TERM_PROGRAM==="vscode"||$.env.TERM==="xterm-256color"||$.env.TERM==="alacritty"||$.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var co=us(),h=(s,e)=>co?s:e,Fs=h("\u25C6","*"),es=h("\u25A0","x"),ns=h("\u25B2","x"),X=h("\u25C7","o"),Ds=h("\u250C","T"),b=h("\u2502","|"),W=h("\u2514","\u2014"),uo=h("\u25CF",">"),Fo=h("\u25CB"," "),oe=h("\u25FB","[\u2022]"),Do=h("\u25FC","[+]"),se=h("\u25FB","[ ]"),Pe=h("\u25AA","\u2022"),os=h("\u2500","-"),ee=h("\u256E","+"),ne=h("\u251C","+"),re=h("\u256F","+"),le=h("\u25CF","\u2022"),te=h("\u25C6","*"),ie=h("\u25B2","!"),ae=h("\u25A0","x"),rs=(s)=>{switch(s){case"initial":case"active":return i.default.cyan(Fs);case"cancel":return i.default.red(es);case"error":return i.default.yellow(ns);case"submit":return i.default.green(X)}},ss=(s)=>{let{cursor:e,options:n,style:l}=s,r=s.maxItems??Number.POSITIVE_INFINITY,t=Math.max(process.stdout.rows-4,0),o=Math.min(t,Math.max(r,5)),a=0;e>=a+o-3?a=Math.max(Math.min(e-o+3,n.length-o),0):e<a+2&&(a=Math.max(e-2,0));let p=o<n.length&&a>0,m=o<n.length&&a+o<n.length;return n.slice(a,a+o).map((f,c,d)=>{let O=c===0&&p,P=c===d.length-1&&m;return O||P?i.default.dim("..."):l(f,c+a===e)})};var mo=(s)=>{let e=s.active??"Yes",n=s.inactive??"No";return new ao({active:e,inactive:n,initialValue:s.initialValue??!0,render(){let l=`${i.default.gray(b)}
16
+ `)),this._prevFrame=s;return}this.output.write(g.erase.down())}this.output.write(s),this.state==="initial"&&(this.state="active"),this._prevFrame=s}}}class io extends ao{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(s){super(s,!1),this.value=!!s.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(e)=>{this.output.write(g.cursor.move(0,-1)),this.value=e,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}}var Xs;Xs=new WeakMap;var Zs=Object.defineProperty,Ms=(s,e,n)=>(e in s)?Zs(s,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[e]=n,Yo=(s,e,n)=>(Ms(s,typeof e!="symbol"?e+"":e,n),n),Mo=class extends ao{constructor(s){super(s,!1),Yo(this,"options"),Yo(this,"cursor",0),this.options=s.options,this.value=[...s.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:e})=>e===s.cursorAt),0),this.on("key",(e)=>{e==="a"&&this.toggleAll()}),this.on("cursor",(e)=>{switch(e){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;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let s=this.value.length===this.options.length;this.value=s?[]:this.options.map((e)=>e.value)}toggleValue(){let s=this.value.includes(this._value);this.value=s?this.value.filter((e)=>e!==this._value):[...this.value,this._value]}};var a=B(oo(),1),Q=B(F(),1);import v from"process";function us(){return v.platform!=="win32"?v.env.TERM!=="linux":!!v.env.CI||!!v.env.WT_SESSION||!!v.env.TERMINUS_SUBLIME||v.env.ConEmuTask==="{cmd::Cmder}"||v.env.TERM_PROGRAM==="Terminus-Sublime"||v.env.TERM_PROGRAM==="vscode"||v.env.TERM==="xterm-256color"||v.env.TERM==="alacritty"||v.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var co=us(),h=(s,e)=>co?s:e,Fs=h("\u25C6","*"),es=h("\u25A0","x"),ns=h("\u25B2","x"),X=h("\u25C7","o"),Ds=h("\u250C","T"),f=h("\u2502","|"),W=h("\u2514","\u2014"),uo=h("\u25CF",">"),Fo=h("\u25CB"," "),oe=h("\u25FB","[\u2022]"),Do=h("\u25FC","[+]"),se=h("\u25FB","[ ]"),Pe=h("\u25AA","\u2022"),os=h("\u2500","-"),ee=h("\u256E","+"),ne=h("\u251C","+"),re=h("\u256F","+"),le=h("\u25CF","\u2022"),te=h("\u25C6","*"),ae=h("\u25B2","!"),ie=h("\u25A0","x"),rs=(s)=>{switch(s){case"initial":case"active":return a.default.cyan(Fs);case"cancel":return a.default.red(es);case"error":return a.default.yellow(ns);case"submit":return a.default.green(X)}},ss=(s)=>{let{cursor:e,options:n,style:l}=s,r=s.maxItems??Number.POSITIVE_INFINITY,t=Math.max(process.stdout.rows-4,0),o=Math.min(t,Math.max(r,5)),i=0;e>=i+o-3?i=Math.max(Math.min(e-o+3,n.length-o),0):e<i+2&&(i=Math.max(e-2,0));let p=o<n.length&&i>0,m=o<n.length&&i+o<n.length;return n.slice(i,i+o).map((b,c,d)=>{let O=c===0&&p,P=c===d.length-1&&m;return O||P?a.default.dim("..."):l(b,c+i===e)})};var mo=(s)=>{let e=s.active??"Yes",n=s.inactive??"No";return new io({active:e,inactive:n,initialValue:s.initialValue??!0,render(){let l=`${a.default.gray(f)}
17
17
  ${rs(this.state)} ${s.message}
18
- `,r=this.value?e:n;switch(this.state){case"submit":return`${l}${i.default.gray(b)} ${i.default.dim(r)}`;case"cancel":return`${l}${i.default.gray(b)} ${i.default.strikethrough(i.default.dim(r))}
19
- ${i.default.gray(b)}`;default:return`${l}${i.default.cyan(b)} ${this.value?`${i.default.green(uo)} ${e}`:`${i.default.dim(Fo)} ${i.default.dim(e)}`} ${i.default.dim("/")} ${this.value?`${i.default.dim(Fo)} ${i.default.dim(n)}`:`${i.default.green(uo)} ${n}`}
20
- ${i.default.cyan(W)}
21
- `}}}).prompt()};var ls=(s)=>{let e=(n,l)=>{let r=n.label??String(n.value);return l==="active"?`${i.default.cyan(oe)} ${r} ${n.hint?i.default.dim(`(${n.hint})`):""}`:l==="selected"?`${i.default.green(Do)} ${i.default.dim(r)} ${n.hint?i.default.dim(`(${n.hint})`):""}`:l==="cancelled"?`${i.default.strikethrough(i.default.dim(r))}`:l==="active-selected"?`${i.default.green(Do)} ${r} ${n.hint?i.default.dim(`(${n.hint})`):""}`:l==="submitted"?`${i.default.dim(r)}`:`${i.default.dim(se)} ${i.default.dim(r)}`};return new Mo({options:s.options,initialValues:s.initialValues,required:s.required??!0,cursorAt:s.cursorAt,validate(n){if(this.required&&n.length===0)return`Please select at least one option.
22
- ${i.default.reset(i.default.dim(`Press ${i.default.gray(i.default.bgWhite(i.default.inverse(" space ")))} to select, ${i.default.gray(i.default.bgWhite(i.default.inverse(" enter ")))} to submit`))}`},render(){let n=`${i.default.gray(b)}
18
+ `,r=this.value?e:n;switch(this.state){case"submit":return`${l}${a.default.gray(f)} ${a.default.dim(r)}`;case"cancel":return`${l}${a.default.gray(f)} ${a.default.strikethrough(a.default.dim(r))}
19
+ ${a.default.gray(f)}`;default:return`${l}${a.default.cyan(f)} ${this.value?`${a.default.green(uo)} ${e}`:`${a.default.dim(Fo)} ${a.default.dim(e)}`} ${a.default.dim("/")} ${this.value?`${a.default.dim(Fo)} ${a.default.dim(n)}`:`${a.default.green(uo)} ${n}`}
20
+ ${a.default.cyan(W)}
21
+ `}}}).prompt()};var ls=(s)=>{let e=(n,l)=>{let r=n.label??String(n.value);return l==="active"?`${a.default.cyan(oe)} ${r} ${n.hint?a.default.dim(`(${n.hint})`):""}`:l==="selected"?`${a.default.green(Do)} ${a.default.dim(r)} ${n.hint?a.default.dim(`(${n.hint})`):""}`:l==="cancelled"?`${a.default.strikethrough(a.default.dim(r))}`:l==="active-selected"?`${a.default.green(Do)} ${r} ${n.hint?a.default.dim(`(${n.hint})`):""}`:l==="submitted"?`${a.default.dim(r)}`:`${a.default.dim(se)} ${a.default.dim(r)}`};return new Mo({options:s.options,initialValues:s.initialValues,required:s.required??!0,cursorAt:s.cursorAt,validate(n){if(this.required&&n.length===0)return`Please select at least one option.
22
+ ${a.default.reset(a.default.dim(`Press ${a.default.gray(a.default.bgWhite(a.default.inverse(" space ")))} to select, ${a.default.gray(a.default.bgWhite(a.default.inverse(" enter ")))} to submit`))}`},render(){let n=`${a.default.gray(f)}
23
23
  ${rs(this.state)} ${s.message}
24
- `,l=(r,t)=>{let o=this.value.includes(r.value);return t&&o?e(r,"active-selected"):o?e(r,"selected"):e(r,t?"active":"inactive")};switch(this.state){case"submit":return`${n}${i.default.gray(b)} ${this.options.filter(({value:r})=>this.value.includes(r)).map((r)=>e(r,"submitted")).join(i.default.dim(", "))||i.default.dim("none")}`;case"cancel":{let r=this.options.filter(({value:t})=>this.value.includes(t)).map((t)=>e(t,"cancelled")).join(i.default.dim(", "));return`${n}${i.default.gray(b)} ${r.trim()?`${r}
25
- ${i.default.gray(b)}`:""}`}case"error":{let r=this.error.split(`
26
- `).map((t,o)=>o===0?`${i.default.yellow(W)} ${i.default.yellow(t)}`:` ${t}`).join(`
27
- `);return`${n+i.default.yellow(b)} ${ss({options:this.options,cursor:this.cursor,maxItems:s.maxItems,style:l}).join(`
28
- ${i.default.yellow(b)} `)}
24
+ `,l=(r,t)=>{let o=this.value.includes(r.value);return t&&o?e(r,"active-selected"):o?e(r,"selected"):e(r,t?"active":"inactive")};switch(this.state){case"submit":return`${n}${a.default.gray(f)} ${this.options.filter(({value:r})=>this.value.includes(r)).map((r)=>e(r,"submitted")).join(a.default.dim(", "))||a.default.dim("none")}`;case"cancel":{let r=this.options.filter(({value:t})=>this.value.includes(t)).map((t)=>e(t,"cancelled")).join(a.default.dim(", "));return`${n}${a.default.gray(f)} ${r.trim()?`${r}
25
+ ${a.default.gray(f)}`:""}`}case"error":{let r=this.error.split(`
26
+ `).map((t,o)=>o===0?`${a.default.yellow(W)} ${a.default.yellow(t)}`:` ${t}`).join(`
27
+ `);return`${n+a.default.yellow(f)} ${ss({options:this.options,cursor:this.cursor,maxItems:s.maxItems,style:l}).join(`
28
+ ${a.default.yellow(f)} `)}
29
29
  ${r}
30
- `}default:return`${n}${i.default.cyan(b)} ${ss({options:this.options,cursor:this.cursor,maxItems:s.maxItems,style:l}).join(`
31
- ${i.default.cyan(b)} `)}
32
- ${i.default.cyan(W)}
30
+ `}default:return`${n}${a.default.cyan(f)} ${ss({options:this.options,cursor:this.cursor,maxItems:s.maxItems,style:l}).join(`
31
+ ${a.default.cyan(f)} `)}
32
+ ${a.default.cyan(W)}
33
33
  `}}}).prompt()};var wo=(s="",e="")=>{let n=`
34
34
  ${s}
35
35
  `.split(`
36
- `),l=po(e).length,r=Math.max(n.reduce((o,a)=>{let p=po(a);return p.length>o?p.length:o},0),l)+2,t=n.map((o)=>`${i.default.gray(b)} ${i.default.dim(o)}${" ".repeat(r-po(o).length)}${i.default.gray(b)}`).join(`
37
- `);process.stdout.write(`${i.default.gray(b)}
38
- ${i.default.green(X)} ${i.default.reset(e)} ${i.default.gray(os.repeat(Math.max(r-l-1,1))+ee)}
36
+ `),l=po(e).length,r=Math.max(n.reduce((o,i)=>{let p=po(i);return p.length>o?p.length:o},0),l)+2,t=n.map((o)=>`${a.default.gray(f)} ${a.default.dim(o)}${" ".repeat(r-po(o).length)}${a.default.gray(f)}`).join(`
37
+ `);process.stdout.write(`${a.default.gray(f)}
38
+ ${a.default.green(X)} ${a.default.reset(e)} ${a.default.gray(os.repeat(Math.max(r-l-1,1))+ee)}
39
39
  ${t}
40
- ${i.default.gray(ne+os.repeat(r+2)+re)}
41
- `)},fo=(s="")=>{process.stdout.write(`${i.default.gray(W)} ${i.default.red(s)}
40
+ ${a.default.gray(ne+os.repeat(r+2)+re)}
41
+ `)},bo=(s="")=>{process.stdout.write(`${a.default.gray(W)} ${a.default.red(s)}
42
42
 
43
- `)},ts=(s="")=>{process.stdout.write(`${i.default.gray(Ds)} ${s}
44
- `)},is=(s="")=>{process.stdout.write(`${i.default.gray(b)}
45
- ${i.default.gray(W)} ${s}
43
+ `)},ts=(s="")=>{process.stdout.write(`${a.default.gray(Ds)} ${s}
44
+ `)},as=(s="")=>{process.stdout.write(`${a.default.gray(f)}
45
+ ${a.default.gray(W)} ${s}
46
46
 
47
- `)},x={message:(s="",{symbol:e=i.default.gray(b)}={})=>{let n=[`${i.default.gray(b)}`];if(s){let[l,...r]=s.split(`
48
- `);n.push(`${e} ${l}`,...r.map((t)=>`${i.default.gray(b)} ${t}`))}process.stdout.write(`${n.join(`
47
+ `)},x={message:(s="",{symbol:e=a.default.gray(f)}={})=>{let n=[`${a.default.gray(f)}`];if(s){let[l,...r]=s.split(`
48
+ `);n.push(`${e} ${l}`,...r.map((t)=>`${a.default.gray(f)} ${t}`))}process.stdout.write(`${n.join(`
49
49
  `)}
50
- `)},info:(s)=>{x.message(s,{symbol:i.default.blue(le)})},success:(s)=>{x.message(s,{symbol:i.default.green(te)})},step:(s)=>{x.message(s,{symbol:i.default.green(X)})},warn:(s)=>{x.message(s,{symbol:i.default.yellow(ie)})},warning:(s)=>{x.warn(s)},error:(s)=>{x.message(s,{symbol:i.default.red(ae)})}},He=`${i.default.gray(b)} `;var as=({indicator:s="dots"}={})=>{let e=co?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],n=co?80:120,l=process.env.CI==="true",r,t,o=!1,a="",p,m=performance.now(),f=(k)=>{let I=k>1?"Something went wrong":"Canceled";o&&Co(I,k)},c=()=>f(2),d=()=>f(1),O=()=>{process.on("uncaughtExceptionMonitor",c),process.on("unhandledRejection",c),process.on("SIGINT",d),process.on("SIGTERM",d),process.on("exit",f)},P=()=>{process.removeListener("uncaughtExceptionMonitor",c),process.removeListener("unhandledRejection",c),process.removeListener("SIGINT",d),process.removeListener("SIGTERM",d),process.removeListener("exit",f)},H=()=>{if(p===void 0)return;l&&process.stdout.write(`
50
+ `)},info:(s)=>{x.message(s,{symbol:a.default.blue(le)})},success:(s)=>{x.message(s,{symbol:a.default.green(te)})},step:(s)=>{x.message(s,{symbol:a.default.green(X)})},warn:(s)=>{x.message(s,{symbol:a.default.yellow(ae)})},warning:(s)=>{x.warn(s)},error:(s)=>{x.message(s,{symbol:a.default.red(ie)})}},He=`${a.default.gray(f)} `;var is=({indicator:s="dots"}={})=>{let e=co?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],n=co?80:120,l=process.env.CI==="true",r,t,o=!1,i="",p,m=performance.now(),b=(k)=>{let $=k>1?"Something went wrong":"Canceled";o&&Co($,k)},c=()=>b(2),d=()=>b(1),O=()=>{process.on("uncaughtExceptionMonitor",c),process.on("unhandledRejection",c),process.on("SIGINT",d),process.on("SIGTERM",d),process.on("exit",b)},P=()=>{process.removeListener("uncaughtExceptionMonitor",c),process.removeListener("unhandledRejection",c),process.removeListener("SIGINT",d),process.removeListener("SIGTERM",d),process.removeListener("exit",b)},H=()=>{if(p===void 0)return;l&&process.stdout.write(`
51
51
  `);let k=p.split(`
52
- `);process.stdout.write(Q.cursor.move(-999,k.length-1)),process.stdout.write(Q.erase.down(k.length))},Z=(k)=>k.replace(/\.+$/,""),Ao=(k)=>{let I=(performance.now()-k)/1000,v=Math.floor(I/60),A=Math.floor(I%60);return v>0?`[${v}m ${A}s]`:`[${A}s]`},ds=(k="")=>{o=!0,r=Zo(),a=Z(k),m=performance.now(),process.stdout.write(`${i.default.gray(b)}
53
- `);let I=0,v=0;O(),t=setInterval(()=>{if(l&&a===p)return;H(),p=a;let A=i.default.magenta(e[I]);if(l)process.stdout.write(`${A} ${a}...`);else if(s==="timer")process.stdout.write(`${A} ${a} ${Ao(m)}`);else{let gs=".".repeat(Math.floor(v)).slice(0,3);process.stdout.write(`${A} ${a}${gs}`)}I=I+1<e.length?I+1:0,v=v<e.length?v+0.125:0},n)},Co=(k="",I=0)=>{o=!1,clearInterval(t),H();let v=I===0?i.default.green(X):I===1?i.default.red(es):i.default.red(ns);a=Z(k??a),s==="timer"?process.stdout.write(`${v} ${a} ${Ao(m)}
54
- `):process.stdout.write(`${v} ${a}
55
- `),P(),r()};return{start:ds,stop:Co,message:(k="")=>{a=Z(k??a)}}},ps=async(s,e)=>{let n={},l=Object.keys(s);for(let r of l){let t=s[r],o=await t({results:n})?.catch((a)=>{throw a});if(typeof e?.onCancel=="function"&&K(o)){n[r]="canceled",e.onCancel({results:n});continue}n[r]=o}return n};var E=B(oo(),1);import*as S from"fs";import*as L from"path";var C="\n OPENCODE_AUTH: ${{ secrets.OPENCODE_AUTH }}",T="\n ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}",N=`
52
+ `);process.stdout.write(Q.cursor.move(-999,k.length-1)),process.stdout.write(Q.erase.down(k.length))},Z=(k)=>k.replace(/\.+$/,""),Ao=(k)=>{let $=(performance.now()-k)/1000,I=Math.floor($/60),A=Math.floor($%60);return I>0?`[${I}m ${A}s]`:`[${A}s]`},ds=(k="")=>{o=!0,r=Zo(),i=Z(k),m=performance.now(),process.stdout.write(`${a.default.gray(f)}
53
+ `);let $=0,I=0;O(),t=setInterval(()=>{if(l&&i===p)return;H(),p=i;let A=a.default.magenta(e[$]);if(l)process.stdout.write(`${A} ${i}...`);else if(s==="timer")process.stdout.write(`${A} ${i} ${Ao(m)}`);else{let gs=".".repeat(Math.floor(I)).slice(0,3);process.stdout.write(`${A} ${i}${gs}`)}$=$+1<e.length?$+1:0,I=I<e.length?I+0.125:0},n)},Co=(k="",$=0)=>{o=!1,clearInterval(t),H();let I=$===0?a.default.green(X):$===1?a.default.red(es):a.default.red(ns);i=Z(k??i),s==="timer"?process.stdout.write(`${I} ${i} ${Ao(m)}
54
+ `):process.stdout.write(`${I} ${i}
55
+ `),P(),r()};return{start:ds,stop:Co,message:(k="")=>{i=Z(k??i)}}},ps=async(s,e)=>{let n={},l=Object.keys(s);for(let r of l){let t=s[r],o=await t({results:n})?.catch((i)=>{throw i});if(typeof e?.onCancel=="function"&&K(o)){n[r]="canceled",e.onCancel({results:n});continue}n[r]=o}return n};var E=B(oo(),1);import*as S from"fs";import*as L from"path";var C="\n OPENCODE_AUTH: ${{ secrets.OPENCODE_AUTH }}",T="\n ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}",N=`
56
56
  - uses: actions/cache/restore@v4
57
57
  with:
58
58
  path: ~/.local/share/opencode/auth.json
59
- key: opencode-auth
60
- `;var bo=(s)=>`name: PR Review
59
+ key: opencode-auth-
60
+ restore-keys: opencode-auth-
61
+ `;var fo=(s)=>`name: PR Review
61
62
 
62
63
  on:
63
64
  pull_request:
@@ -160,10 +161,11 @@ jobs:
160
161
  runs-on: ubuntu-latest
161
162
  steps:
162
163
  - id: cache
163
- uses: actions/cache@v4
164
+ uses: actions/cache/restore@v4
164
165
  with:
165
166
  path: ~/.local/share/opencode/auth.json
166
- key: opencode-auth
167
+ key: opencode-auth-\${{ github.run_id }}
168
+ restore-keys: opencode-auth-
167
169
 
168
170
  - if: steps.cache.outputs.cache-hit != 'true'
169
171
  run: |
@@ -173,8 +175,13 @@ jobs:
173
175
  - run: curl -fsSL https://opencode.ai/install | bash
174
176
 
175
177
  - run: opencode models
176
- `;var ko={review:"pr-review",label:"issue-label","doc-sync":"doc-sync",release:"release","opencode-auth":"opencode-auth"};var ce={"pr-review":bo,"issue-label":ho,"doc-sync":go,release:xo,"opencode-auth":Eo};function cs(s){let{workflows:e,cwd:n=process.cwd()}=s,l=L.join(n,".github","workflows"),r=[];for(let t of e){let o=ko[t],a=L.join(l,`${o}.yml`);if(S.existsSync(a))r.push({type:"workflow",name:t,path:`.github/workflows/${o}.yml`})}return r}function ms(s){let{workflows:e,cwd:n=process.cwd(),useOAuth:l=!1,override:r=!1,overrideNames:t}=s,o=[],a=L.join(n,".github","workflows");if(!S.existsSync(a))S.mkdirSync(a,{recursive:!0});for(let p of e){let m=ko[p],f=ce[m],c=L.join(a,`${m}.yml`);if(!f){o.push({type:"workflow",name:p,status:"error",path:c,message:`Unknown workflow: ${p}`});continue}let d=f(l);if(!d){o.push({type:"workflow",name:p,status:"error",path:c,message:`Unknown workflow: ${p}`});continue}let O=S.existsSync(c),P=r||t?.has(p);if(O&&!P){o.push({type:"workflow",name:p,status:"skipped",path:`.github/workflows/${m}.yml`,message:"Skipped: already exists"});continue}try{S.writeFileSync(c,d,"utf-8"),o.push({type:"workflow",name:p,status:O?"overwritten":"created",path:`.github/workflows/${m}.yml`,message:O?"Overwritten successfully":"Created successfully"})}catch(H){o.push({type:"workflow",name:p,status:"error",path:c,message:`Failed to write file: ${H instanceof Error?H.message:"Unknown error"}`})}}return o}var we=await Promise.resolve().then(() => B(ws(),1)).catch(()=>({version:"unknown"})),_o=we.version,R=process.argv.slice(2),fe=R.includes("--help")||R.includes("-h"),be=R.includes("--version")||R.includes("-v"),vo=R.includes("--force")||R.includes("-f");if(be)process.stdout.write(`@activade/open-workflows v${_o}
177
- `),process.exit(0);if(fe)process.stdout.write(`@activade/open-workflows v${_o}
178
+
179
+ - uses: actions/cache/save@v4
180
+ with:
181
+ path: ~/.local/share/opencode/auth.json
182
+ key: opencode-auth-\${{ github.run_id }}
183
+ `;var ko={review:"pr-review",label:"issue-label","doc-sync":"doc-sync",release:"release","opencode-auth":"opencode-auth"};var ce={"pr-review":fo,"issue-label":ho,"doc-sync":go,release:xo,"opencode-auth":Eo};function cs(s){let{workflows:e,cwd:n=process.cwd()}=s,l=L.join(n,".github","workflows"),r=[];for(let t of e){let o=ko[t],i=L.join(l,`${o}.yml`);if(S.existsSync(i))r.push({type:"workflow",name:t,path:`.github/workflows/${o}.yml`})}return r}function ms(s){let{workflows:e,cwd:n=process.cwd(),useOAuth:l=!1,override:r=!1,overrideNames:t}=s,o=[],i=L.join(n,".github","workflows");if(!S.existsSync(i))S.mkdirSync(i,{recursive:!0});for(let p of e){let m=ko[p],b=ce[m],c=L.join(i,`${m}.yml`);if(!b){o.push({type:"workflow",name:p,status:"error",path:c,message:`Unknown workflow: ${p}`});continue}let d=b(l);if(!d){o.push({type:"workflow",name:p,status:"error",path:c,message:`Unknown workflow: ${p}`});continue}let O=S.existsSync(c),P=r||t?.has(p);if(O&&!P){o.push({type:"workflow",name:p,status:"skipped",path:`.github/workflows/${m}.yml`,message:"Skipped: already exists"});continue}try{S.writeFileSync(c,d,"utf-8"),o.push({type:"workflow",name:p,status:O?"overwritten":"created",path:`.github/workflows/${m}.yml`,message:O?"Overwritten successfully":"Created successfully"})}catch(H){o.push({type:"workflow",name:p,status:"error",path:c,message:`Failed to write file: ${H instanceof Error?H.message:"Unknown error"}`})}}return o}var we=await Promise.resolve().then(() => B(ws(),1)).catch(()=>({version:"unknown"})),_o=we.version,R=process.argv.slice(2),be=R.includes("--help")||R.includes("-h"),fe=R.includes("--version")||R.includes("-v"),Io=R.includes("--force")||R.includes("-f");if(fe)process.stdout.write(`@activade/open-workflows v${_o}
184
+ `),process.exit(0);if(be)process.stdout.write(`@activade/open-workflows v${_o}
178
185
 
179
186
  AI-powered GitHub automation workflows.
180
187
 
@@ -202,7 +209,7 @@ REQUIRED SECRETS
202
209
  ANTHROPIC_API_KEY - Your Anthropic API key
203
210
 
204
211
  For more information: https://github.com/activadee/open-workflows
205
- `),process.exit(0);ts(E.default.bgCyan(E.default.black(` @activade/open-workflows v${_o} `)));var fs=await ps({workflows:()=>ls({message:"Select workflows to install:",options:[{value:"review",label:"PR Review",hint:"AI-powered code reviews"},{value:"label",label:"Issue Label",hint:"Auto-label issues"},{value:"doc-sync",label:"Doc Sync",hint:"Keep docs in sync"},{value:"release",label:"Release",hint:"Automated releases with notes"}],required:!0}),useOAuth:()=>mo({message:"Use Claude Max subscription (OAuth)? (No = API key)",initialValue:!1})},{onCancel:()=>{fo("Installation cancelled."),process.exit(0)}}),G=fs.workflows||[],So=Boolean(fs.useOAuth);if(So&&!G.includes("opencode-auth"))G=[...G,"opencode-auth"];var bs=new Set;if(!vo){let s=cs({workflows:G});if(s.length>0){x.warn(`Found ${s.length} existing file(s):`);for(let e of s){let n=await mo({message:`Override ${e.path}?`,initialValue:!1});if(K(n))fo("Installation cancelled."),process.exit(0);if(n)bs.add(e.name)}}}var hs=as();hs.start("Installing workflows...");var Y=ms({workflows:G,useOAuth:So,override:vo,overrideNames:vo?void 0:bs}),he=Y.some((s)=>s.status==="error");hs.stop(he?"Installation completed with errors":"Installation complete!");var yo=Y.filter((s)=>s.status==="created"),Oo=Y.filter((s)=>s.status==="overwritten"),Io=Y.filter((s)=>s.status==="skipped"),$o=Y.filter((s)=>s.status==="error");if(yo.length>0){x.success(`Created ${yo.length} file(s):`);for(let s of yo)x.message(` ${E.default.green("+")} ${s.path}`)}if(Oo.length>0){x.success(`Overwritten ${Oo.length} file(s):`);for(let s of Oo)x.message(` ${E.default.cyan("~")} ${s.path}`)}if(Io.length>0){x.warn(`Skipped ${Io.length} file(s) (already exist):`);for(let s of Io)x.message(` ${E.default.yellow("-")} ${s.path}`)}if($o.length>0){x.error(`Failed ${$o.length} file(s):`);for(let s of $o)x.message(` ${E.default.red("x")} ${s.path}: ${s.message}`)}if(So)wo(`${E.default.cyan("1.")} Export your OpenCode auth as a secret:
212
+ `),process.exit(0);ts(E.default.bgCyan(E.default.black(` @activade/open-workflows v${_o} `)));var bs=await ps({workflows:()=>ls({message:"Select workflows to install:",options:[{value:"review",label:"PR Review",hint:"AI-powered code reviews"},{value:"label",label:"Issue Label",hint:"Auto-label issues"},{value:"doc-sync",label:"Doc Sync",hint:"Keep docs in sync"},{value:"release",label:"Release",hint:"Automated releases with notes"}],required:!0}),useOAuth:()=>mo({message:"Use Claude Max subscription (OAuth)? (No = API key)",initialValue:!1})},{onCancel:()=>{bo("Installation cancelled."),process.exit(0)}}),G=bs.workflows||[],So=Boolean(bs.useOAuth);if(So&&!G.includes("opencode-auth"))G=[...G,"opencode-auth"];var fs=new Set;if(!Io){let s=cs({workflows:G});if(s.length>0){x.warn(`Found ${s.length} existing file(s):`);for(let e of s){let n=await mo({message:`Override ${e.path}?`,initialValue:!1});if(K(n))bo("Installation cancelled."),process.exit(0);if(n)fs.add(e.name)}}}var hs=is();hs.start("Installing workflows...");var Y=ms({workflows:G,useOAuth:So,override:Io,overrideNames:Io?void 0:fs}),he=Y.some((s)=>s.status==="error");hs.stop(he?"Installation completed with errors":"Installation complete!");var yo=Y.filter((s)=>s.status==="created"),Oo=Y.filter((s)=>s.status==="overwritten"),$o=Y.filter((s)=>s.status==="skipped"),vo=Y.filter((s)=>s.status==="error");if(yo.length>0){x.success(`Created ${yo.length} file(s):`);for(let s of yo)x.message(` ${E.default.green("+")} ${s.path}`)}if(Oo.length>0){x.success(`Overwritten ${Oo.length} file(s):`);for(let s of Oo)x.message(` ${E.default.cyan("~")} ${s.path}`)}if($o.length>0){x.warn(`Skipped ${$o.length} file(s) (already exist):`);for(let s of $o)x.message(` ${E.default.yellow("-")} ${s.path}`)}if(vo.length>0){x.error(`Failed ${vo.length} file(s):`);for(let s of vo)x.message(` ${E.default.red("x")} ${s.path}: ${s.message}`)}if(So)wo(`${E.default.cyan("1.")} Export your OpenCode auth as a secret:
206
213
  ${E.default.dim("gh secret set OPENCODE_AUTH < ~/.local/share/opencode/auth.json")}
207
214
 
208
215
  ${E.default.cyan("2.")} Commit and push the workflow files
@@ -211,4 +218,4 @@ ${E.default.cyan("3.")} Run the opencode-auth workflow manually to initialize th
211
218
  ${E.default.dim("gh workflow run opencode-auth.yml")}`,"Next steps (OAuth)");else wo(`${E.default.cyan("1.")} Add your Anthropic API key:
212
219
  ${E.default.dim("gh secret set ANTHROPIC_API_KEY")}
213
220
 
214
- ${E.default.cyan("2.")} Commit and push the workflow files`,"Next steps");is(E.default.green("Done!"));
221
+ ${E.default.cyan("2.")} Commit and push the workflow files`,"Next steps");as(E.default.green("Done!"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activade/open-workflows",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "AI-powered GitHub automation workflows via composite actions",
5
5
  "keywords": [
6
6
  "github",