@sma1lboy/rove 0.9.238 → 0.9.240

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.
Files changed (237) hide show
  1. package/README.md +2 -2
  2. package/dist/cli/chunk-0mj358p5.js +3 -0
  3. package/dist/cli/{chunk-nntg9d85.js → chunk-0y4qgnby.js} +1 -1
  4. package/dist/cli/chunk-1brfxbvg.js +4 -0
  5. package/dist/cli/chunk-21fm5tks.js +2 -0
  6. package/dist/cli/{chunk-bkbmqec2.js → chunk-28zg6p31.js} +1 -1
  7. package/dist/cli/chunk-2andp9gs.js +2 -0
  8. package/dist/cli/{chunk-r2pztgm6.js → chunk-2bgmby1d.js} +1 -1
  9. package/dist/cli/chunk-2vgc5cyj.js +2 -0
  10. package/dist/cli/chunk-2x9yc5nx.js +2 -0
  11. package/dist/cli/chunk-30kjq5m7.js +2 -0
  12. package/dist/cli/{chunk-b503z32q.js → chunk-31y92jm8.js} +3 -3
  13. package/dist/cli/{chunk-mkksdcsw.js → chunk-3342qzve.js} +1 -1
  14. package/dist/cli/{chunk-0wgheepg.js → chunk-34261s0m.js} +3 -3
  15. package/dist/cli/chunk-3aqhytyy.js +3 -0
  16. package/dist/cli/chunk-3c58659p.js +2 -0
  17. package/dist/cli/chunk-3d1hjrq0.js +2 -0
  18. package/dist/cli/{chunk-pzbrj3gd.js → chunk-3vyk7bzb.js} +1 -1
  19. package/dist/cli/chunk-41x1hrqe.js +3 -0
  20. package/dist/cli/chunk-4dv0mgan.js +2 -0
  21. package/dist/cli/{chunk-mhg40es1.js → chunk-4hestsjp.js} +1 -1
  22. package/dist/cli/{chunk-77w83wgh.js → chunk-4tx2kayk.js} +1 -1
  23. package/dist/cli/{chunk-aj7fkrha.js → chunk-4xj52nx1.js} +1 -1
  24. package/dist/cli/{chunk-s1p650mm.js → chunk-53cyns0f.js} +1 -1
  25. package/dist/cli/chunk-576r5nht.js +5 -0
  26. package/dist/cli/{chunk-1bm6sryf.js → chunk-5nsvp4h7.js} +1 -1
  27. package/dist/cli/{chunk-zyd6k6ak.js → chunk-7q43tysm.js} +1 -1
  28. package/dist/cli/chunk-801h8bze.js +4 -0
  29. package/dist/cli/chunk-80ydqr3s.js +3 -0
  30. package/dist/cli/{chunk-cv1kaq8a.js → chunk-85zr7kph.js} +5 -5
  31. package/dist/cli/{chunk-zwgns5ce.js → chunk-8tadwbx9.js} +1 -1
  32. package/dist/cli/chunk-96cjpssp.js +3 -0
  33. package/dist/cli/{chunk-bs7v83x0.js → chunk-9aydqazr.js} +1 -1
  34. package/dist/cli/{chunk-7txq91d9.js → chunk-9jsm6h5y.js} +1 -1
  35. package/dist/cli/{chunk-pz907kve.js → chunk-9w5g7frx.js} +1 -1
  36. package/dist/cli/chunk-a0ave3g6.js +3 -0
  37. package/dist/cli/{chunk-vnpqemb0.js → chunk-a7kq09ke.js} +1 -1
  38. package/dist/cli/chunk-abyk3w2j.js +2 -0
  39. package/dist/cli/chunk-adkva3ep.js +6 -0
  40. package/dist/cli/{chunk-nvqdmx7q.js → chunk-ag3txfg2.js} +1 -1
  41. package/dist/cli/{chunk-2rg6aw59.js → chunk-atmaakwp.js} +1 -1
  42. package/dist/cli/chunk-axsm0gn5.js +3 -0
  43. package/dist/cli/chunk-b0ssvpht.js +3 -0
  44. package/dist/cli/chunk-b39sdtt0.js +3 -0
  45. package/dist/cli/{chunk-grt1e2s8.js → chunk-bb5zqmea.js} +2 -2
  46. package/dist/cli/{chunk-g56km26e.js → chunk-bn73kd6z.js} +1 -1
  47. package/dist/cli/chunk-c2m55b72.js +4 -0
  48. package/dist/cli/{chunk-ch0ehc06.js → chunk-cbc1h345.js} +1 -1
  49. package/dist/cli/{chunk-dnbh8hsm.js → chunk-cbjh43yc.js} +1 -1
  50. package/dist/cli/chunk-cst86kt3.js +2 -0
  51. package/dist/cli/chunk-des00203.js +2 -0
  52. package/dist/cli/chunk-dgs0m8r4.js +3 -0
  53. package/dist/cli/chunk-dkgxz9hf.js +5 -0
  54. package/dist/cli/{chunk-mb1e73jm.js → chunk-ekd274v3.js} +2 -2
  55. package/dist/cli/{chunk-gqphk56d.js → chunk-ekg3h5z3.js} +7 -7
  56. package/dist/cli/chunk-f1nf99hj.js +2 -0
  57. package/dist/cli/chunk-fert44x2.js +2 -0
  58. package/dist/cli/chunk-ff1h2qxd.js +2 -0
  59. package/dist/cli/{chunk-cv6r89jp.js → chunk-ffs26p85.js} +1 -1
  60. package/dist/cli/{chunk-hp32tbes.js → chunk-fg62y5fm.js} +1 -1
  61. package/dist/cli/{chunk-s9a974w9.js → chunk-fvmee0tr.js} +1 -1
  62. package/dist/cli/{chunk-8h0khkap.js → chunk-fwqd5ta2.js} +2 -2
  63. package/dist/cli/{chunk-acw32w13.js → chunk-g0eygcnq.js} +6 -5
  64. package/dist/cli/chunk-g4c4ffqp.js +20 -0
  65. package/dist/cli/{chunk-k7g060qr.js → chunk-g4j41mky.js} +2 -2
  66. package/dist/cli/{chunk-j6kataan.js → chunk-g5c5jytr.js} +1 -1
  67. package/dist/cli/{chunk-dqndd97s.js → chunk-gkdfct7t.js} +2 -2
  68. package/dist/cli/chunk-gvrtrvnz.js +96 -0
  69. package/dist/cli/chunk-h2m7em1e.js +3 -0
  70. package/dist/cli/chunk-h33m6cc6.js +8 -0
  71. package/dist/cli/{chunk-ynbfqbn9.js → chunk-h3fckxn3.js} +1 -1
  72. package/dist/cli/chunk-h7y9v8k1.js +4 -0
  73. package/dist/cli/{chunk-32mv1yy6.js → chunk-h9cg0j3a.js} +1 -1
  74. package/dist/cli/{chunk-h4qv19v8.js → chunk-hbn1t161.js} +1 -1
  75. package/dist/cli/{chunk-3es6spp4.js → chunk-hq9tbzqa.js} +2 -2
  76. package/dist/cli/{chunk-snjte1rd.js → chunk-hr2xky15.js} +1 -1
  77. package/dist/cli/chunk-jxqs4y9j.js +10 -0
  78. package/dist/cli/{chunk-s0snbj93.js → chunk-kb6xw0fw.js} +1 -1
  79. package/dist/cli/{chunk-vyb5a2rh.js → chunk-kg9kmwt9.js} +1 -1
  80. package/dist/cli/chunk-ktzbg4jg.js +2 -0
  81. package/dist/cli/chunk-kz4txj2e.js +8 -0
  82. package/dist/cli/{chunk-bhqracn8.js → chunk-m19q29wk.js} +1 -1
  83. package/dist/cli/chunk-m1ekbqyz.js +2 -0
  84. package/dist/cli/chunk-m4f5h05c.js +10 -0
  85. package/dist/cli/chunk-m5gx53yr.js +3 -0
  86. package/dist/cli/chunk-m6q44xc0.js +2 -0
  87. package/dist/cli/{chunk-hq2n27y1.js → chunk-mw0ysrpd.js} +1 -1
  88. package/dist/cli/{chunk-2cwb64fj.js → chunk-n5dea05t.js} +1 -1
  89. package/dist/cli/chunk-nc46gddg.js +3 -0
  90. package/dist/cli/{chunk-jhbc9nx2.js → chunk-nckmga7j.js} +1 -1
  91. package/dist/cli/chunk-nem2x959.js +2 -0
  92. package/dist/cli/chunk-ng12dprz.js +2 -0
  93. package/dist/cli/chunk-npwzmmv9.js +3 -0
  94. package/dist/cli/chunk-nzh30nty.js +4 -0
  95. package/dist/cli/{chunk-gqrh2gp1.js → chunk-p024scd4.js} +1 -1
  96. package/dist/cli/chunk-p18ehv9y.js +7 -0
  97. package/dist/cli/{chunk-3sg5v7cg.js → chunk-p83wf4zw.js} +2 -2
  98. package/dist/cli/{chunk-s278gjet.js → chunk-pdvyfz3n.js} +1 -1
  99. package/dist/cli/chunk-pe6wnsww.js +2 -0
  100. package/dist/cli/chunk-prqeddy7.js +3 -0
  101. package/dist/cli/chunk-pvm3fc44.js +2 -0
  102. package/dist/cli/{chunk-2yd128k1.js → chunk-q5eee34y.js} +6 -6
  103. package/dist/cli/{chunk-z5fnv7nk.js → chunk-q7zzycy7.js} +25 -23
  104. package/dist/cli/chunk-qvfdqrbf.js +3 -0
  105. package/dist/cli/{chunk-2xsem13q.js → chunk-qzsahxd9.js} +1 -1
  106. package/dist/cli/chunk-rqyaf0dw.js +4 -0
  107. package/dist/cli/chunk-s57vy3k3.js +2 -0
  108. package/dist/cli/{chunk-g2advs8t.js → chunk-sak1tphp.js} +1 -1
  109. package/dist/cli/{chunk-vdcn6h48.js → chunk-snhcvjdb.js} +1 -1
  110. package/dist/cli/{chunk-bav389wj.js → chunk-svm809bx.js} +1 -1
  111. package/dist/cli/chunk-szrfp0jq.js +2 -0
  112. package/dist/cli/chunk-t8v9rpdx.js +2 -0
  113. package/dist/cli/{chunk-j4xfsn9g.js → chunk-tbrkck2f.js} +1 -1
  114. package/dist/cli/chunk-tdhk4dz8.js +4 -0
  115. package/dist/cli/chunk-thsmzarw.js +3 -0
  116. package/dist/cli/{chunk-t3wwsz29.js → chunk-tvk46rfs.js} +1 -1
  117. package/dist/cli/{chunk-4d54zgc7.js → chunk-twyda1p8.js} +2 -2
  118. package/dist/cli/{chunk-s1e0e9hc.js → chunk-vej49hnt.js} +2 -2
  119. package/dist/cli/chunk-w2sp489k.js +3 -0
  120. package/dist/cli/{chunk-0wh2ff77.js → chunk-whbm14qr.js} +2 -2
  121. package/dist/cli/chunk-wp9bygh4.js +2 -0
  122. package/dist/cli/{chunk-ww4fbx8h.js → chunk-wtb8cycx.js} +2 -2
  123. package/dist/cli/chunk-x9s14ppv.js +4 -0
  124. package/dist/cli/{chunk-hk8mc43r.js → chunk-xckpezd9.js} +5 -5
  125. package/dist/cli/{chunk-dq2mh3b3.js → chunk-xv8fhxxm.js} +1 -1
  126. package/dist/cli/{chunk-85pk7c74.js → chunk-xx166cdv.js} +1 -1
  127. package/dist/cli/{chunk-ssfj9td0.js → chunk-y8tysjc2.js} +15 -13
  128. package/dist/cli/{chunk-y3k1accw.js → chunk-yexx8nec.js} +1 -1
  129. package/dist/cli/{chunk-9prawccj.js → chunk-yt15y085.js} +1 -1
  130. package/dist/cli/{chunk-n0mg67wn.js → chunk-ytxk6zqc.js} +1 -1
  131. package/dist/cli/chunk-yvjgwnb9.js +2 -0
  132. package/dist/cli/{chunk-n24dmy2r.js → chunk-yxt1y0n3.js} +9 -9
  133. package/dist/cli/chunk-ze0htjr5.js +2 -0
  134. package/dist/cli/chunk-zeb0sttx.js +2 -0
  135. package/dist/cli/chunk-znjcesdr.js +5 -0
  136. package/dist/cli/chunk-zsfyj36g.js +3 -0
  137. package/dist/cli/chunk-zt49bbg9.js +3 -0
  138. package/dist/cli/chunk-zt7wfnva.js +3 -0
  139. package/dist/cli/{chunk-6rvzzrd7.js → chunk-zx2n95qe.js} +1 -1
  140. package/dist/cli/index.js +12 -10
  141. package/dist/cli/pty-host-node.mjs +880 -169
  142. package/dist/cli/rove-run.js +1 -1
  143. package/dist/cli/rove.js +6 -6
  144. package/dist/skills/rove/SKILL.md +1 -1
  145. package/dist/skills/rove/references/api-flags.md +5 -5
  146. package/dist/web-ui/assets/{harness-CQ-1WI4q.js → harness-BHiciz5A.js} +2 -2
  147. package/dist/web-ui/assets/{index-_ttAn6pY.js → index-BkxJISAI.js} +2 -2
  148. package/dist/web-ui/assets/{index-C4dLQEqf.css → index-nMJ42IGm.css} +1 -1
  149. package/dist/web-ui/index.html +2 -2
  150. package/dist/web-ui/origin-policy.mjs +1 -1
  151. package/dist/web-ui/pty-server.mjs +24 -10
  152. package/dist/web-ui/pty-session-lifecycle.mjs +9 -13
  153. package/package.json +6 -8
  154. package/dist/cli/chunk-05jej26n.js +0 -3
  155. package/dist/cli/chunk-079cyb2e.js +0 -4
  156. package/dist/cli/chunk-1265fmzk.js +0 -3
  157. package/dist/cli/chunk-1da3bqjc.js +0 -4
  158. package/dist/cli/chunk-1tx1s5v6.js +0 -2
  159. package/dist/cli/chunk-507zn8rs.js +0 -3
  160. package/dist/cli/chunk-53afdybj.js +0 -3
  161. package/dist/cli/chunk-544bwsss.js +0 -4
  162. package/dist/cli/chunk-67ev8k22.js +0 -2
  163. package/dist/cli/chunk-6s5mev2n.js +0 -4
  164. package/dist/cli/chunk-6x5vzzpx.js +0 -3
  165. package/dist/cli/chunk-7s1kx9ez.js +0 -2
  166. package/dist/cli/chunk-85mk6j0s.js +0 -3
  167. package/dist/cli/chunk-8hbtca1g.js +0 -3
  168. package/dist/cli/chunk-8pa1ph1s.js +0 -7
  169. package/dist/cli/chunk-9ek7xm94.js +0 -8
  170. package/dist/cli/chunk-9k47xr7m.js +0 -2
  171. package/dist/cli/chunk-9mtxxsb3.js +0 -2
  172. package/dist/cli/chunk-a1k2z44b.js +0 -2
  173. package/dist/cli/chunk-a3yyrabb.js +0 -2
  174. package/dist/cli/chunk-ahnk6zx3.js +0 -2
  175. package/dist/cli/chunk-bc18gat5.js +0 -4
  176. package/dist/cli/chunk-be757xzj.js +0 -3
  177. package/dist/cli/chunk-bw73t1zw.js +0 -5
  178. package/dist/cli/chunk-c2tevj9f.js +0 -2
  179. package/dist/cli/chunk-d1agt94n.js +0 -8
  180. package/dist/cli/chunk-dc31fzrm.js +0 -2
  181. package/dist/cli/chunk-dw853n4w.js +0 -3
  182. package/dist/cli/chunk-eawt4n4g.js +0 -2
  183. package/dist/cli/chunk-egx76ah2.js +0 -5
  184. package/dist/cli/chunk-ex1a2djb.js +0 -2
  185. package/dist/cli/chunk-f5e3dcxe.js +0 -2
  186. package/dist/cli/chunk-fwb72vzc.js +0 -2
  187. package/dist/cli/chunk-fxs82dsx.js +0 -4
  188. package/dist/cli/chunk-g3r1dwy9.js +0 -3
  189. package/dist/cli/chunk-ge30p4s5.js +0 -3
  190. package/dist/cli/chunk-gmgsxdrf.js +0 -10
  191. package/dist/cli/chunk-he76emdm.js +0 -2
  192. package/dist/cli/chunk-hgx20x94.js +0 -2
  193. package/dist/cli/chunk-hnfp317x.js +0 -2
  194. package/dist/cli/chunk-hq4b3fca.js +0 -3
  195. package/dist/cli/chunk-janvvpv5.js +0 -8
  196. package/dist/cli/chunk-jvxh93nz.js +0 -3
  197. package/dist/cli/chunk-k6nxyxyh.js +0 -3
  198. package/dist/cli/chunk-k8tspshr.js +0 -2
  199. package/dist/cli/chunk-md8k7c5w.js +0 -2
  200. package/dist/cli/chunk-mppda1wq.js +0 -3
  201. package/dist/cli/chunk-ppwpjm39.js +0 -3
  202. package/dist/cli/chunk-pvw2y93q.js +0 -25
  203. package/dist/cli/chunk-pw6yfj10.js +0 -3
  204. package/dist/cli/chunk-q4nehkj9.js +0 -2
  205. package/dist/cli/chunk-qagek3wg.js +0 -5
  206. package/dist/cli/chunk-r8xqvg26.js +0 -2
  207. package/dist/cli/chunk-rz8zs7j8.js +0 -3
  208. package/dist/cli/chunk-sb0ns0c7.js +0 -3
  209. package/dist/cli/chunk-tcj36cqg.js +0 -2
  210. package/dist/cli/chunk-vejgnmcp.js +0 -2
  211. package/dist/cli/chunk-vzqrj32e.js +0 -2
  212. package/dist/cli/chunk-wpsbyq4s.js +0 -2
  213. package/dist/cli/chunk-wtqxv2rv.js +0 -39
  214. package/dist/cli/chunk-y05d79az.js +0 -2
  215. package/dist/cli/chunk-y4048296.js +0 -4
  216. package/dist/cli/chunk-y8fqdnh3.js +0 -3
  217. package/dist/cli/chunk-ygd572ee.js +0 -4
  218. package/dist/cli/chunk-yj5pjxx2.js +0 -2
  219. package/dist/cli/chunk-zja9chrd.js +0 -4
  220. package/dist/cli/chunk-zwej00t0.js +0 -5
  221. package/dist/cli/kobe-run.js +0 -3
  222. package/dist/cli/kobe.js +0 -7
  223. package/dist/completions/kobe.bash +0 -25
  224. package/dist/completions/kobe.fish +0 -27
  225. package/dist/completions/kobe.zsh +0 -35
  226. /package/dist/cli/{chunk-hqbmzz4t.js → chunk-0422g8ac.js} +0 -0
  227. /package/dist/cli/{chunk-khj0apc7.js → chunk-2tfnscxk.js} +0 -0
  228. /package/dist/cli/{chunk-7q67dz4c.js → chunk-4250pw6r.js} +0 -0
  229. /package/dist/cli/{chunk-xsrcwcjc.js → chunk-5mhvjytn.js} +0 -0
  230. /package/dist/cli/{chunk-ef39ym8f.js → chunk-7bgbansg.js} +0 -0
  231. /package/dist/cli/{chunk-nh4wvyz3.js → chunk-atn06ncf.js} +0 -0
  232. /package/dist/cli/{chunk-h4n8ffqy.js → chunk-dmzg9zdc.js} +0 -0
  233. /package/dist/cli/{chunk-w25b7xxz.js → chunk-etfh8f4z.js} +0 -0
  234. /package/dist/cli/{chunk-hape5vwj.js → chunk-hpay0ax8.js} +0 -0
  235. /package/dist/cli/{chunk-f10n6063.js → chunk-pn5ygqn6.js} +0 -0
  236. /package/dist/cli/{chunk-rcyasw34.js → chunk-rxqdw6s5.js} +0 -0
  237. /package/dist/cli/{chunk-exfyqsdd.js → chunk-vjvkkrzc.js} +0 -0
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- import{markRoveInvocation,prepareCliEnvironment,prepareCliStateLayout}from"./chunk-ppwpjm39.js";import"./chunk-fxs82dsx.js";import"./chunk-zyd6k6ak.js";import"./chunk-8hbtca1g.js";import"./chunk-hq2n27y1.js";import"./chunk-sb0ns0c7.js";import"./chunk-vnpqemb0.js";import"./chunk-9prawccj.js";import"./chunk-y8fqdnh3.js";import"./chunk-hq4b3fca.js";import{__require}from"./chunk-wqfp8d9w.js";markRoveInvocation();prepareCliEnvironment();prepareCliStateLayout();await import("./index.js");
3
+ import{migrateRoveClientStateLayout}from"./chunk-tdhk4dz8.js";import{updateStateFile}from"./chunk-7q43tysm.js";import"./chunk-mw0ysrpd.js";import"./chunk-a7kq09ke.js";import{kvStatePath}from"./chunk-prqeddy7.js";import"./chunk-zt7wfnva.js";import"./chunk-yt15y085.js";import"./chunk-npwzmmv9.js";import"./chunk-b39sdtt0.js";import"./chunk-nc46gddg.js";import{__require}from"./chunk-wqfp8d9w.js";import{readFileSync}from"fs";var RENAMED_KEY_PREFIXES=[{from:"autoEffort.",to:"autoRouting."}],NOTHING={moved:0,superseded:0};function legacyRename(key){for(let{from,to}of RENAMED_KEY_PREFIXES)if(key.startsWith(from))return`${to}${key.slice(from.length)}`;return}function isStateObject(text){try{let parsed=JSON.parse(text);return typeof parsed==="object"&&parsed!==null&&!Array.isArray(parsed)}catch{return!1}}function migrateRenamedStateKeys(){let text;try{text=readFileSync(kvStatePath(),"utf8")}catch{return NOTHING}if(!RENAMED_KEY_PREFIXES.some(({from})=>text.includes(`"${from}`)))return NOTHING;if(!isStateObject(text))return NOTHING;let moved=0,superseded=0;try{updateStateFile((state)=>{for(let[key,value]of Object.entries(state)){let renamed=legacyRename(key);if(renamed===void 0)continue;if(renamed in state)superseded+=1;else state[renamed]=value,moved+=1;delete state[key]}return moved+superseded>0})}catch{return NOTHING}return{moved,superseded}}function prepareCliStateLayout(env=process.env){let result=migrateRoveClientStateLayout(env);for(let warning of result.warnings)console.error(`[rove] state migration will retry: ${warning}`);migrateRenamedStateKeys()}prepareCliStateLayout();await import("./index.js");
package/dist/cli/rove.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import{join as G1}from"node:path";import{createInterface as K1}from"node:readline/promises";import{pathToFileURL as U1}from"node:url";import{spawnSync as V}from"node:child_process";import{constants as a,accessSync as e}from"node:fs";import{homedir as W1}from"node:os";import{basename as z1,delimiter as J1,dirname as Q1,join as G}from"node:path";import{fileURLToPath as N}from"node:url";var M={$schema:"https://json.schemastore.org/package.json",name:"@sma1lboy/rove",version:"0.9.238",description:"Rove — the agent multiplexer for your terminal. Run coding agents on parallel tasks with isolated worktrees and persistent sessions.",keywords:["terminal","tui","cli","multiplexer","ai-agents","coding-agent","ai-coding-assistant","agentic-ai","parallel-agents","git-worktree","claude-code","codex","llm","developer-tools"],type:"module",packageManager:"bun@1.3.13",bin:{kobe:"dist/cli/kobe.js",rove:"dist/cli/rove.js"},files:["dist/cli","dist/completions","dist/web-ui","dist/skills","dist/*.wav","README.md","LICENSE"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/Sma1lboy/rove.git"},homepage:"https://rove.run",bugs:{url:"https://github.com/Sma1lboy/rove/issues"},engines:{bun:">=1.3.11"},scripts:{dev:"ROVE_DEV=1 bun --conditions=browser ./src/cli/rove.ts","dev:kobe":"KOBE_DEV=1 bun --conditions=browser ./src/cli/kobe.ts","dev:mock":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:sandbox":"bun run scripts/dev-sandbox.ts run","dev:sandbox:reset":"bun run scripts/dev-sandbox.ts reset",build:"bun run scripts/build.ts","build:rubric":"bun run scripts/build-tier-rubric.ts",compile:"bun run scripts/compile.ts",typecheck:"tsc --noEmit","check-i18n":"bun run scripts/check-i18n.ts",test:"bun run test:fast && bun run test:socket","perf:golden":"bun scripts/perf-golden.ts","pty:soak":"bun scripts/pty-soak.ts","test:fast":"vitest run --passWithNoTests --minWorkers=1 --maxWorkers=8","test:socket":"KOBE_INCLUDE_SOCKET=1 vitest run test/daemon --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:socket:coverage":"KOBE_INCLUDE_SOCKET=1 KOBE_COVERAGE_DAEMON=1 vitest run test/daemon --coverage --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:behavior":"KOBE_INCLUDE_BEHAVIOR=1 vitest run test/behavior --pool forks --minWorkers=1 --maxWorkers=1 --retry=2 --passWithNoTests","test:render":"bun scripts/render-track.mjs",coverage:"vitest run --coverage --passWithNoTests",bench:"vitest bench --run",lint:"biome check .",knip:"knip-bun",postinstall:"bun run scripts/check-preview-deps.ts || true",prepublishOnly:"bun run typecheck && bun run build","plugin-sandbox":"bun run scripts/plugin-sandbox.ts"},"//":"biome.json + bunfig.toml live at the monorepo root since they apply repo-wide; bun.lock also lives at root (workspace-shared).",dependencies:{"@ansi-tools/parser":"^1.0.15","@opentui/core":"0.4.3","@opentui/react":"0.4.3","@xterm/addon-serialize":"^0.14.0","@xterm/addon-unicode11":"^0.9.0","@xterm/headless":"^6.0.0","node-pty":"^1.1.0",react:"^19.2.8","smol-toml":"^1.7.1",ws:"^8.21.3"},devDependencies:{"@biomejs/biome":"1.9.4","@sma1lboy/kobe-daemon":"0.7.19","@tsconfig/bun":"1.0.11","@types/bun":"1.3.14","@types/node":"25.6.2","@types/react":"^19.2.0","@vitest/coverage-v8":"2.1.9",knip:"^6.14.2","react-devtools-core":"^7.0.1",typescript:"5.8.2",vitest:"2.1.9"},trustedDependencies:[]};var O="rove",T="kobe";var I=T;var L=O;var t="ROVE_INVOKED_AS";function K(W=process.env){return W[t]===L?L:I}var U="ROVE_BUN",Z1="ROVE_NO_BUN_BOOTSTRAP",R="ROVE_SKIP_BUN_CHECK",x=M.engines.bun.match(/\d+\.\d+\.\d+/)?.[0]??"0.0.0",y=(W)=>{try{return e(W,a.X_OK),!0}catch{return!1}},$1=(W)=>W==="win32"?"bun.exe":"bun",X1=(W)=>{let z=V(W,["--version"],{encoding:"utf8",timeout:5000});if(z.error||z.status!==0)return null;return z.stdout?.split(`
3
- `)[0]?.trim()??""};function F(W){return W.trim().match(/^v?(\d+\.\d+\.\d+)/)?.[1]??null}function C(W,z=x){let J=F(W),$=F(z);if(!J||!$)return!0;let Z=J.split(".").map(Number),Q=$.split(".").map(Number);for(let X=0;X<3;X++){let Y=Z[X]??0,b=Q[X]??0;if(Y!==b)return Y>b}return!0}function j(W=process.env){return W[R]==="1"}function k(W={}){let z=W.env??process.env,J=W.platform??process.platform,$=W.home??z.HOME??z.USERPROFILE??W1(),Z=$1(J),Q=[],X=z[U]?.trim();if(X)Q.push(X);for(let w of(z.PATH??z.Path??"").split(J1))if(w)Q.push(G(w,Z));let Y=z.BUN_INSTALL?.trim();if(Y)Q.push(G(Y,"bin",Z));if($)Q.push(G($,".bun","bin",Z));let b=W.launcherDir;if(b)Q.push(G(b,"..","..","node_modules","bun","bin",Z)),Q.push(G(b,"..","..","..","bun","bin",Z));return Q}function q1(W={}){let z=W.isExecutable??y;return k(W).find((J)=>z(J))??null}function B(W={}){let z=W.isExecutable??y,J=W.bunVersionOf??X1;if(j(W.env??process.env))return{bun:q1(W),stale:null,unusable:null};let $=null,Z=null;for(let Q of k(W)){if(!z(Q))continue;let X=J(Q);if(X===null){Z??=Q;continue}if(C(X))return{bun:Q,stale:$,unusable:Z};$??={path:Q,version:F(X)??X}}return{bun:null,stale:$,unusable:Z}}function _(W){return Q1(N(W))}function P(W){return z1(N(W)).replace(/\.[cm]?[jt]s$/,"")}function b1(W=process.platform){return W==="win32"?["powershell","-NoProfile","-Command","irm bun.sh/install.ps1 | iex"]:["bash","-c","curl -fsSL https://bun.sh/install | bash"]}function D(W=K(),z=process.platform){let J=z==="win32"?'powershell -c "irm bun.sh/install.ps1 | iex"':"curl -fsSL https://bun.sh/install | bash";return[`${W}: Rove runs on the Bun runtime, and no Bun was found on this machine.`,"","Install Bun, then run this command again:",` ${J}`," npm install -g bun # any platform, if you already have npm","","Or install Bun and Rove together in one step:"," curl -fsSL https://rove.run/install.sh | sh","",`Already have Bun somewhere unusual? Point Rove at it: ${U}=/path/to/bun`,""].join(`
4
- `)}function g(W,z,J=K()){return[`${J}: this machine's Bun is too old for Rove — found ${z} at ${W}, need ${x} or newer.`,"","Rove's terminals are built on Bun's PTY API. An older Bun ignores it silently,","so every terminal and engine tab would open empty and stay empty.","","Upgrade Bun, then run this command again:"," bun upgrade # Bun installed itself (~/.bun)"," brew upgrade bun # Homebrew"," npm install -g bun@latest # npm-managed Bun","",`Have a newer Bun elsewhere? Point Rove at it: ${U}=/path/to/bun`,`Run on this one anyway (unsupported, terminals will be blank): ${R}=1`,""].join(`
5
- `)}function p(W,z=K()){return[`${z}: the Bun at ${W} could not be run — \`${W} --version\` failed or never returned.`,"","Rove skipped it rather than starting through it, which would hang or fail","with a message from that binary instead of this one.","","Reinstall Bun, then run this command again:"," curl -fsSL https://bun.sh/install | bash","",`Have a working Bun elsewhere? Point Rove at it: ${U}=/path/to/bun`,""].join(`
6
- `)}function S(W=process.env,z=process.stdin,J=process.stdout){if(W[Z1]==="1")return!1;if(W.CI==="true"||W.CI==="1")return!1;return Boolean(z.isTTY&&J.isTTY)}function v(W={},z=V){let J=W.platform??process.platform,[$,...Z]=b1(J);if(!$)return null;let Q=z($,Z,{stdio:"inherit"});if(Q.error||Q.status!==0)return null;return B(W).bun}function Y1(W){if(typeof W.status==="number")return W.status;if(W.signal)return 128+(Object.hasOwn(f,W.signal)?f[W.signal]:0);return 1}var f={SIGINT:2,SIGQUIT:3,SIGKILL:9,SIGTERM:15};function E(W,z,J,$=V){let Z=$(W,[z,...J],{stdio:"inherit"});if(Z.error)return process.stderr.write(`rove: could not start Bun at ${W}: ${Z.error.message}
7
- `),1;return Y1(Z)}var h=_(import.meta.url),q=P(import.meta.url),u=G1(h,`${q}-run.js`);async function x1(W){let z=K1({input:process.stdin,output:process.stdout});try{let J=(await z.question(W)).trim().toLowerCase();return J===""||J==="y"||J==="yes"}finally{z.close()}}async function H1(){let W={launcherDir:h},z=B(W);if(z.bun||!S())return z;let J=z.stale?`${q}: Bun ${z.stale.version} is too old for Rove (needs ${x}+). Install the latest Bun now? [Y/n] `:`${q}: Rove runs on the Bun runtime, and none is installed. Install Bun now? [Y/n] `;if(!await x1(J))return z;return{bun:v(W),stale:z.stale,unusable:z.unusable}}var c=globalThis.Bun;if(c){let W=c.version;if(W&&!j()&&!C(W))process.stderr.write(g(process.execPath,W,q)),process.exit(1);await import(U1(u).href)}else{let{bun:W,stale:z,unusable:J}=await H1();if(!W){let $=z?g(z.path,z.version,q):J?p(J,q):D(q);process.stderr.write($),process.exit(1)}process.exit(E(W,u,process.argv.slice(2)))}
2
+ import{join as n}from"node:path";import{createInterface as a}from"node:readline/promises";import{pathToFileURL as ss}from"node:url";import{spawnSync as Q}from"node:child_process";import{constants as d,accessSync as R}from"node:fs";import{homedir as I}from"node:os";import{basename as U,delimiter as _,dirname as o,join as r}from"node:path";import{fileURLToPath as T}from"node:url";var H={$schema:"https://json.schemastore.org/package.json",name:"@sma1lboy/rove",version:"0.9.240",description:"Rove — the agent multiplexer for your terminal. Run coding agents on parallel tasks with isolated worktrees and persistent sessions.",keywords:["terminal","tui","cli","multiplexer","ai-agents","coding-agent","ai-coding-assistant","agentic-ai","parallel-agents","git-worktree","claude-code","codex","llm","developer-tools"],type:"module",packageManager:"bun@1.3.13",bin:{rove:"dist/cli/rove.js"},files:["dist/cli","dist/completions","dist/web-ui","dist/skills","dist/*.wav","README.md","LICENSE"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/Sma1lboy/rove.git"},homepage:"https://rove.run",bugs:{url:"https://github.com/Sma1lboy/rove/issues"},engines:{bun:">=1.3.11"},scripts:{dev:"ROVE_DEV=1 bun --conditions=browser ./src/cli/rove.ts","dev:mock":"ROVE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:sandbox":"bun run scripts/dev-sandbox.ts run","dev:sandbox:reset":"bun run scripts/dev-sandbox.ts reset",build:"bun run scripts/build.ts","build:rubric":"bun run scripts/build-tier-rubric.ts",compile:"bun run scripts/compile.ts",typecheck:"tsc --noEmit","check-i18n":"bun run scripts/check-i18n.ts",test:"bun run test:fast && bun run test:socket","perf:golden":"bun scripts/perf-golden.ts","pty:soak":"bun scripts/pty-soak.ts","test:fast":"vitest run --passWithNoTests --minWorkers=1 --maxWorkers=8","test:socket":"ROVE_INCLUDE_SOCKET=1 vitest run test/daemon --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:socket:coverage":"ROVE_INCLUDE_SOCKET=1 ROVE_COVERAGE_DAEMON=1 vitest run test/daemon --coverage --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:behavior":"ROVE_INCLUDE_BEHAVIOR=1 vitest run test/behavior --pool forks --minWorkers=1 --maxWorkers=1 --retry=2 --passWithNoTests","test:render":"bun scripts/render-track.mjs",coverage:"vitest run --coverage --passWithNoTests",bench:"vitest bench --run",lint:"biome check .",knip:"knip-bun",postinstall:"bun run scripts/check-preview-deps.ts || true",prepublishOnly:"bun run typecheck && bun run build","plugin-sandbox":"bun run scripts/plugin-sandbox.ts"},"//":"biome.json + bunfig.toml live at the monorepo root since they apply repo-wide; bun.lock also lives at root (workspace-shared).",dependencies:{"@ansi-tools/parser":"^1.0.15","@opentui/core":"0.4.3","@opentui/react":"0.4.3","@xterm/addon-serialize":"^0.14.0","@xterm/addon-unicode11":"^0.9.0","@xterm/headless":"^6.0.0","node-pty":"^1.1.0",react:"^19.2.8","smol-toml":"^1.7.1",ws:"^8.21.3"},devDependencies:{"@biomejs/biome":"1.9.4","@sma1lboy/rove-daemon":"0.7.20","@tsconfig/bun":"1.0.11","@types/bun":"1.3.14","@types/node":"25.6.2","@types/react":"^19.2.0","@vitest/coverage-v8":"2.1.9",knip:"^6.14.2","react-devtools-core":"^7.0.1",typescript:"5.8.2",vitest:"2.1.9"},trustedDependencies:[]};var q="rove";var i=q;var z="ROVE_BUN",e="ROVE_NO_BUN_BOOTSTRAP",F="ROVE_SKIP_BUN_CHECK",$=H.engines.bun.match(/\d+\.\d+\.\d+/)?.[0]??"0.0.0",L=(s)=>{try{return R(s,d.X_OK),!0}catch{return!1}},B=(s)=>s==="win32"?"bun.exe":"bun",f=(s)=>{let t=Q(s,["--version"],{encoding:"utf8",timeout:5000});if(t.error||t.status!==0)return null;return t.stdout?.split(`
3
+ `)[0]?.trim()??""};function J(s){return s.trim().match(/^v?(\d+\.\d+\.\d+)/)?.[1]??null}function X(s,t=$){let c=J(s),b=J(t);if(!c||!b)return!0;let W=c.split(".").map(Number),g=b.split(".").map(Number);for(let p=0;p<3;p++){let k=W[p]??0,y=g[p]??0;if(k!==y)return k>y}return!0}function Y(s=process.env){return s[F]==="1"}function A(s={}){let t=s.env??process.env,c=s.platform??process.platform,b=s.home??t.HOME??t.USERPROFILE??I(),W=B(c),g=[],p=t[z]?.trim();if(p)g.push(p);for(let G of(t.PATH??t.Path??"").split(_))if(G)g.push(r(G,W));let k=t.BUN_INSTALL?.trim();if(k)g.push(r(k,"bin",W));if(b)g.push(r(b,".bun","bin",W));let y=s.launcherDir;if(y)g.push(r(y,"..","..","node_modules","bun","bin",W)),g.push(r(y,"..","..","..","bun","bin",W));return g}function N(s={}){let t=s.isExecutable??L;return A(s).find((c)=>t(c))??null}function Z(s={}){let t=s.isExecutable??L,c=s.bunVersionOf??f;if(Y(s.env??process.env))return{bun:N(s),stale:null,unusable:null};let b=null,W=null;for(let g of A(s)){if(!t(g))continue;let p=c(g);if(p===null){W??=g;continue}if(X(p))return{bun:g,stale:b,unusable:W};b??={path:g,version:J(p)??p}}return{bun:null,stale:b,unusable:W}}function h(s){return o(T(s))}function C(s){return U(T(s)).replace(/\.[cm]?[jt]s$/,"")}function u(s=process.platform){return s==="win32"?["powershell","-NoProfile","-Command","irm bun.sh/install.ps1 | iex"]:["bash","-c","curl -fsSL https://bun.sh/install | bash"]}function D(s=i,t=process.platform){let c=t==="win32"?'powershell -c "irm bun.sh/install.ps1 | iex"':"curl -fsSL https://bun.sh/install | bash";return[`${s}: Rove runs on the Bun runtime, and no Bun was found on this machine.`,"","Install Bun, then run this command again:",` ${c}`," npm install -g bun # any platform, if you already have npm","","Or install Bun and Rove together in one step:"," curl -fsSL https://rove.run/install.sh | sh","",`Already have Bun somewhere unusual? Point Rove at it: ${z}=/path/to/bun`,""].join(`
4
+ `)}function j(s,t,c=i){return[`${c}: this machine's Bun is too old for Rove — found ${t} at ${s}, need ${$} or newer.`,"","Rove's terminals are built on Bun's PTY API. An older Bun ignores it silently,","so every terminal and engine tab would open empty and stay empty.","","Upgrade Bun, then run this command again:"," bun upgrade # Bun installed itself (~/.bun)"," brew upgrade bun # Homebrew"," npm install -g bun@latest # npm-managed Bun","",`Have a newer Bun elsewhere? Point Rove at it: ${z}=/path/to/bun`,`Run on this one anyway (unsupported, terminals will be blank): ${F}=1`,""].join(`
5
+ `)}function v(s,t=i){return[`${t}: the Bun at ${s} could not be run — \`${s} --version\` failed or never returned.`,"","Rove skipped it rather than starting through it, which would hang or fail","with a message from that binary instead of this one.","","Reinstall Bun, then run this command again:"," curl -fsSL https://bun.sh/install | bash","",`Have a working Bun elsewhere? Point Rove at it: ${z}=/path/to/bun`,""].join(`
6
+ `)}function w(s=process.env,t=process.stdin,c=process.stdout){if(s[e]==="1")return!1;if(s.CI==="true"||s.CI==="1")return!1;return Boolean(t.isTTY&&c.isTTY)}function M(s={},t=Q){let c=s.platform??process.platform,[b,...W]=u(c);if(!b)return null;let g=t(b,W,{stdio:"inherit"});if(g.error||g.status!==0)return null;return Z(s).bun}function l(s){if(typeof s.status==="number")return s.status;if(s.signal)return 128+(Object.hasOwn(K,s.signal)?K[s.signal]:0);return 1}var K={SIGINT:2,SIGQUIT:3,SIGKILL:9,SIGTERM:15};function S(s,t,c,b=Q){let W=b(s,[t,...c],{stdio:"inherit"});if(W.error)return process.stderr.write(`rove: could not start Bun at ${s}: ${W.error.message}
7
+ `),1;return l(W)}var E=h(import.meta.url),x=C(import.meta.url),m=n(E,`${x}-run.js`);async function ts(s){let t=a({input:process.stdin,output:process.stdout});try{let c=(await t.question(s)).trim().toLowerCase();return c===""||c==="y"||c==="yes"}finally{t.close()}}async function cs(){let s={launcherDir:E},t=Z(s);if(t.bun||!w())return t;let c=t.stale?`${x}: Bun ${t.stale.version} is too old for Rove (needs ${$}+). Install the latest Bun now? [Y/n] `:`${x}: Rove runs on the Bun runtime, and none is installed. Install Bun now? [Y/n] `;if(!await ts(c))return t;return{bun:M(s),stale:t.stale,unusable:t.unusable}}var O=globalThis.Bun;if(O){let s=O.version;if(s&&!Y()&&!X(s))process.stderr.write(j(process.execPath,s,x)),process.exit(1);await import(ss(m).href)}else{let{bun:s,stale:t,unusable:c}=await cs();if(!s){let b=t?j(t.path,t.version,x):c?v(c,x):D(x);process.stderr.write(b),process.exit(1)}process.exit(S(s,m,process.argv.slice(2)))}
@@ -3,7 +3,7 @@ name: rove
3
3
  description: Use when controlling Rove tasks, parallel coding attempts, hosted agent sessions, task lifecycle, or the daemon-owned issue tracker from a shell. Also the ONLY channel for messaging another agent session on this machine — `rove api send`, never a peer/MCP side channel.
4
4
  ---
5
5
 
6
- <!-- rove-skill-version: 52 — bump in lockstep with KOBE_SKILL_VERSION (src/lib/skill-install.ts). -->
6
+ <!-- rove-skill-version: 54 — bump in lockstep with ROVE_SKILL_VERSION (src/lib/skill-install.ts). -->
7
7
 
8
8
  # Rove shell control
9
9
 
@@ -55,9 +55,9 @@ Four flag names that have actually been guessed wrong here, and what they are:
55
55
  Seeing one of these in guidance means that guidance predates the rename —
56
56
  `rove api schema` is the tiebreak.
57
57
 
58
- `$KOBE_TASK_ID` / `$KOBE_TAB_ID` are NOT retired: they are still exported into
58
+ `$ROVE_TASK_ID` / `$ROVE_TAB_ID` are NOT retired: they are still exported into
59
59
  every engine tab as aliases of `$ROVE_TASK_ID` / `$ROVE_TAB_ID`, and parts of
60
- the daemon still read the `KOBE_` spelling. Write the `ROVE_` names; expect to
60
+ the daemon still read the `ROVE_` spelling. Write the `ROVE_` names; expect to
61
61
  see both.
62
62
 
63
63
  ## read
@@ -235,7 +235,7 @@ own store. These are the INBOUND user reports; Rove issues are the backlog.
235
235
  ```text
236
236
  workitem-list --repo(REQ) --state{open|closed|all}(open) --limit(20) --search --assignee
237
237
  --label
238
- workitem-start --repo(REQ) --number(REQ) --vendor{claude|codex|copilot|kimi|pi|omp}
238
+ workitem-start --repo(REQ) --number(REQ) --vendor{claude|codex|copilot|kimi|pi|omp|bob}
239
239
  --base-branch
240
240
  ```
241
241
  <!-- generated:end -->
@@ -258,8 +258,8 @@ it fires with no TUI attached.
258
258
  ```text
259
259
  routine-list (none)
260
260
  routine-create --repo(REQ) --name(REQ) --prompt|--prompt-file(REQ) --schedule(REQ)
261
- --vendor{claude|codex|copilot|kimi|pi|omp} --base-branch --precheck
262
- --precheck-timeout(120) --grace(60) --persistent-session
261
+ --vendor{claude|codex|copilot|kimi|pi|omp|bob} --base-branch
262
+ --precheck --precheck-timeout(120) --grace(60) --persistent-session
263
263
  --target-task --target-tab --disabled
264
264
  routine-update --id(REQ) --name --prompt|--prompt-file --schedule --vendor
265
265
  --base-branch --precheck --precheck-timeout(120) --grace(60)
@@ -1,4 +1,4 @@
1
- import{i as e,n as t,r as n,t as r}from"./index-_ttAn6pY.js";var i=e(t()),a=2,o=1,s=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),s=window.getComputedStyle(this._terminal.element),c={top:parseInt(s.getPropertyValue(`padding-top`)),bottom:parseInt(s.getPropertyValue(`padding-bottom`)),right:parseInt(s.getPropertyValue(`padding-right`)),left:parseInt(s.getPropertyValue(`padding-left`))},l=c.top+c.bottom,u=c.right+c.left,d=r-l,f=i-u-t;return{cols:Math.max(a,Math.floor(f/e.css.cell.width)),rows:Math.max(o,Math.floor(d/e.css.cell.height))}}},c=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),l=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),u=e=>{let t=l(e);return t.charAt(0).toUpperCase()+t.slice(1)},d=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),f=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},p={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},m=(0,i.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a=``,children:o,iconNode:s,...c},l)=>(0,i.createElement)(`svg`,{ref:l,...p,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:d(`lucide`,a),...!o&&!f(c)&&{"aria-hidden":`true`},...c},[...s.map(([e,t])=>(0,i.createElement)(e,t)),...Array.isArray(o)?o:[o]])),h=((e,t)=>{let n=(0,i.forwardRef)(({className:n,...r},a)=>(0,i.createElement)(m,{ref:a,iconNode:t,className:d(`lucide-${c(u(e))}`,`lucide-${e}`,n),...r}));return n.displayName=u(e),n})(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),g=`3.7.8`,_=g,v=typeof Buffer==`function`,y=typeof TextDecoder==`function`?new TextDecoder:void 0,ee=typeof TextEncoder==`function`?new TextEncoder:void 0,b=Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`),te=(e=>{let t={};return e.forEach((e,n)=>t[e]=n),t})(b),ne=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,x=String.fromCharCode.bind(String),re=typeof Uint8Array.from==`function`?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),ie=e=>e.replace(/=/g,``).replace(/[+\/]/g,e=>e==`+`?`-`:`_`),S=e=>e.replace(/[^A-Za-z0-9\+\/]/g,``),ae=e=>{let t,n,r,i,a=``,o=e.length%3;for(let o=0;o<e.length;){if((n=e.charCodeAt(o++))>255||(r=e.charCodeAt(o++))>255||(i=e.charCodeAt(o++))>255)throw TypeError(`invalid character found`);t=n<<16|r<<8|i,a+=b[t>>18&63]+b[t>>12&63]+b[t>>6&63]+b[t&63]}return o?a.slice(0,o-3)+`===`.substring(o):a},C=typeof btoa==`function`?e=>btoa(e):v?e=>Buffer.from(e,`binary`).toString(`base64`):ae,oe=v?e=>Buffer.from(e).toString(`base64`):e=>{let t=[];for(let n=0,r=e.length;n<r;n+=4096)t.push(x.apply(null,e.subarray(n,n+4096)));return C(t.join(``))},se=(e,t=!1)=>t?ie(oe(e)):oe(e),w=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?x(192|t>>>6)+x(128|t&63):x(224|t>>>12&15)+x(128|t>>>6&63)+x(128|t&63)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return x(240|t>>>18&7)+x(128|t>>>12&63)+x(128|t>>>6&63)+x(128|t&63)},T=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,E=e=>e.replace(T,w),D=v?e=>Buffer.from(e,`utf8`).toString(`base64`):ee?e=>oe(ee.encode(e)):e=>C(E(e)),ce=(e,t=!1)=>t?ie(D(e)):D(e),le=e=>ce(e,!0),O=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,k=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return x((t>>>10)+55296)+x((t&1023)+56320);case 3:return x((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return x((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},A=e=>e.replace(O,k),ue=e=>{if(e=e.replace(/\s+/g,``),!ne.test(e))throw TypeError(`malformed base64.`);e+=`==`.slice(2-(e.length&3));let t,n,r,i=[];for(let a=0;a<e.length;)t=te[e.charAt(a++)]<<18|te[e.charAt(a++)]<<12|(n=te[e.charAt(a++)])<<6|(r=te[e.charAt(a++)]),n===64?i.push(x(t>>16&255)):r===64?i.push(x(t>>16&255,t>>8&255)):i.push(x(t>>16&255,t>>8&255,t&255));return i.join(``)},de=typeof atob==`function`?e=>atob(S(e)):v?e=>Buffer.from(e,`base64`).toString(`binary`):ue,fe=v?e=>re(Buffer.from(e,`base64`)):e=>re(de(e).split(``).map(e=>e.charCodeAt(0))),pe=e=>fe(he(e)),me=v?e=>Buffer.from(e,`base64`).toString(`utf8`):y?e=>y.decode(fe(e)):e=>A(de(e)),he=e=>S(e.replace(/[-_]/g,e=>e==`-`?`+`:`/`)),ge=e=>me(he(e)),_e=e=>{if(typeof e!=`string`)return!1;let t=e.replace(/\s+/g,``).replace(/={0,2}$/,``);return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},ve=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),ye=function(){let e=(e,t)=>Object.defineProperty(String.prototype,e,ve(t));e(`fromBase64`,function(){return ge(this)}),e(`toBase64`,function(e){return ce(this,e)}),e(`toBase64URI`,function(){return ce(this,!0)}),e(`toBase64URL`,function(){return ce(this,!0)}),e(`toUint8Array`,function(){return pe(this)})},be=function(){let e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,ve(t));e(`toBase64`,function(e){return se(this,e)}),e(`toBase64URI`,function(){return se(this,!0)}),e(`toBase64URL`,function(){return se(this,!0)})},xe={version:g,VERSION:_,atob:de,atobPolyfill:ue,btoa:C,btoaPolyfill:ae,fromBase64:ge,toBase64:ce,encode:ce,encodeURI:le,encodeURL:le,utob:E,btou:A,decode:ge,isValid:_e,fromUint8Array:se,toUint8Array:pe,extendString:ye,extendUint8Array:be,extendBuiltins:()=>{ye(),be()}},Se=class{constructor(e=new we,t=new Ce){this._base64=e,this._provider=t}activate(e){this._terminal=e,this._disposable=e.parser.registerOscHandler(52,e=>this._setOrReportClipboard(e))}dispose(){return this._disposable?.dispose()}_readText(e,t){let n=this._base64.encodeText(t);this._terminal?.input(`\x1B]52;${e};${n}\x07`,!1)}_setOrReportClipboard(e){let t=e.split(`;`);if(t.length<2)return!0;let n=t[0],r=t[1];if(r===`?`){let e=this._provider.readText(n);return e instanceof Promise?e.then(e=>(this._readText(n,e),!0)):(this._readText(n,e),!0)}let i=``;try{i=this._base64.decodeText(r)}catch{}let a=this._provider.writeText(n,i);return a instanceof Promise?a.then(()=>!0):!0}},Ce=class{async readText(e){return e===`c`?navigator.clipboard.readText():Promise.resolve(``)}async writeText(e,t){return e===`c`?navigator.clipboard.writeText(t):Promise.resolve()}},we=class{encodeText(e){return xe.encode(e)}decodeText(e){let t=xe.decode(e);return!xe.isValid(e)||xe.encode(t)!==e?``:t}},Te=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],Ee=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],De;function Oe(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var ke=class{constructor(){if(this.version=`6`,!De){De=new Uint8Array(65536),De.fill(1),De[0]=0,De.fill(0,1,32),De.fill(0,127,160),De.fill(2,4352,4448),De[9001]=2,De[9002]=2,De.fill(2,11904,42192),De[12351]=1,De.fill(2,44032,55204),De.fill(2,63744,64256),De.fill(2,65040,65050),De.fill(2,65072,65136),De.fill(2,65280,65377),De.fill(2,65504,65511);for(let e=0;e<Te.length;++e)De.fill(0,Te[e][0],Te[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?De[e]:Oe(e,Ee)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let e=pt.extractWidth(t);e===0?r=!1:e>n&&(n=e)}return pt.createPropertyValue(0,n,r)}},Ae=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Fe.isErrorNoTelemetry(e)?new Fe(e.message+`
1
+ import{i as e,n as t,r as n,t as r}from"./index-BkxJISAI.js";var i=e(t()),a=2,o=1,s=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),s=window.getComputedStyle(this._terminal.element),c={top:parseInt(s.getPropertyValue(`padding-top`)),bottom:parseInt(s.getPropertyValue(`padding-bottom`)),right:parseInt(s.getPropertyValue(`padding-right`)),left:parseInt(s.getPropertyValue(`padding-left`))},l=c.top+c.bottom,u=c.right+c.left,d=r-l,f=i-u-t;return{cols:Math.max(a,Math.floor(f/e.css.cell.width)),rows:Math.max(o,Math.floor(d/e.css.cell.height))}}},c=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),l=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),u=e=>{let t=l(e);return t.charAt(0).toUpperCase()+t.slice(1)},d=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),f=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},p={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},m=(0,i.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a=``,children:o,iconNode:s,...c},l)=>(0,i.createElement)(`svg`,{ref:l,...p,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:d(`lucide`,a),...!o&&!f(c)&&{"aria-hidden":`true`},...c},[...s.map(([e,t])=>(0,i.createElement)(e,t)),...Array.isArray(o)?o:[o]])),h=((e,t)=>{let n=(0,i.forwardRef)(({className:n,...r},a)=>(0,i.createElement)(m,{ref:a,iconNode:t,className:d(`lucide-${c(u(e))}`,`lucide-${e}`,n),...r}));return n.displayName=u(e),n})(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),g=`3.7.8`,_=g,v=typeof Buffer==`function`,y=typeof TextDecoder==`function`?new TextDecoder:void 0,ee=typeof TextEncoder==`function`?new TextEncoder:void 0,b=Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`),te=(e=>{let t={};return e.forEach((e,n)=>t[e]=n),t})(b),ne=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,x=String.fromCharCode.bind(String),re=typeof Uint8Array.from==`function`?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),ie=e=>e.replace(/=/g,``).replace(/[+\/]/g,e=>e==`+`?`-`:`_`),S=e=>e.replace(/[^A-Za-z0-9\+\/]/g,``),ae=e=>{let t,n,r,i,a=``,o=e.length%3;for(let o=0;o<e.length;){if((n=e.charCodeAt(o++))>255||(r=e.charCodeAt(o++))>255||(i=e.charCodeAt(o++))>255)throw TypeError(`invalid character found`);t=n<<16|r<<8|i,a+=b[t>>18&63]+b[t>>12&63]+b[t>>6&63]+b[t&63]}return o?a.slice(0,o-3)+`===`.substring(o):a},C=typeof btoa==`function`?e=>btoa(e):v?e=>Buffer.from(e,`binary`).toString(`base64`):ae,oe=v?e=>Buffer.from(e).toString(`base64`):e=>{let t=[];for(let n=0,r=e.length;n<r;n+=4096)t.push(x.apply(null,e.subarray(n,n+4096)));return C(t.join(``))},se=(e,t=!1)=>t?ie(oe(e)):oe(e),w=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?x(192|t>>>6)+x(128|t&63):x(224|t>>>12&15)+x(128|t>>>6&63)+x(128|t&63)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return x(240|t>>>18&7)+x(128|t>>>12&63)+x(128|t>>>6&63)+x(128|t&63)},T=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,E=e=>e.replace(T,w),D=v?e=>Buffer.from(e,`utf8`).toString(`base64`):ee?e=>oe(ee.encode(e)):e=>C(E(e)),ce=(e,t=!1)=>t?ie(D(e)):D(e),le=e=>ce(e,!0),O=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,k=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return x((t>>>10)+55296)+x((t&1023)+56320);case 3:return x((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return x((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},A=e=>e.replace(O,k),ue=e=>{if(e=e.replace(/\s+/g,``),!ne.test(e))throw TypeError(`malformed base64.`);e+=`==`.slice(2-(e.length&3));let t,n,r,i=[];for(let a=0;a<e.length;)t=te[e.charAt(a++)]<<18|te[e.charAt(a++)]<<12|(n=te[e.charAt(a++)])<<6|(r=te[e.charAt(a++)]),n===64?i.push(x(t>>16&255)):r===64?i.push(x(t>>16&255,t>>8&255)):i.push(x(t>>16&255,t>>8&255,t&255));return i.join(``)},de=typeof atob==`function`?e=>atob(S(e)):v?e=>Buffer.from(e,`base64`).toString(`binary`):ue,fe=v?e=>re(Buffer.from(e,`base64`)):e=>re(de(e).split(``).map(e=>e.charCodeAt(0))),pe=e=>fe(he(e)),me=v?e=>Buffer.from(e,`base64`).toString(`utf8`):y?e=>y.decode(fe(e)):e=>A(de(e)),he=e=>S(e.replace(/[-_]/g,e=>e==`-`?`+`:`/`)),ge=e=>me(he(e)),_e=e=>{if(typeof e!=`string`)return!1;let t=e.replace(/\s+/g,``).replace(/={0,2}$/,``);return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},ve=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),ye=function(){let e=(e,t)=>Object.defineProperty(String.prototype,e,ve(t));e(`fromBase64`,function(){return ge(this)}),e(`toBase64`,function(e){return ce(this,e)}),e(`toBase64URI`,function(){return ce(this,!0)}),e(`toBase64URL`,function(){return ce(this,!0)}),e(`toUint8Array`,function(){return pe(this)})},be=function(){let e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,ve(t));e(`toBase64`,function(e){return se(this,e)}),e(`toBase64URI`,function(){return se(this,!0)}),e(`toBase64URL`,function(){return se(this,!0)})},xe={version:g,VERSION:_,atob:de,atobPolyfill:ue,btoa:C,btoaPolyfill:ae,fromBase64:ge,toBase64:ce,encode:ce,encodeURI:le,encodeURL:le,utob:E,btou:A,decode:ge,isValid:_e,fromUint8Array:se,toUint8Array:pe,extendString:ye,extendUint8Array:be,extendBuiltins:()=>{ye(),be()}},Se=class{constructor(e=new we,t=new Ce){this._base64=e,this._provider=t}activate(e){this._terminal=e,this._disposable=e.parser.registerOscHandler(52,e=>this._setOrReportClipboard(e))}dispose(){return this._disposable?.dispose()}_readText(e,t){let n=this._base64.encodeText(t);this._terminal?.input(`\x1B]52;${e};${n}\x07`,!1)}_setOrReportClipboard(e){let t=e.split(`;`);if(t.length<2)return!0;let n=t[0],r=t[1];if(r===`?`){let e=this._provider.readText(n);return e instanceof Promise?e.then(e=>(this._readText(n,e),!0)):(this._readText(n,e),!0)}let i=``;try{i=this._base64.decodeText(r)}catch{}let a=this._provider.writeText(n,i);return a instanceof Promise?a.then(()=>!0):!0}},Ce=class{async readText(e){return e===`c`?navigator.clipboard.readText():Promise.resolve(``)}async writeText(e,t){return e===`c`?navigator.clipboard.writeText(t):Promise.resolve()}},we=class{encodeText(e){return xe.encode(e)}decodeText(e){let t=xe.decode(e);return!xe.isValid(e)||xe.encode(t)!==e?``:t}},Te=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],Ee=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],De;function Oe(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var ke=class{constructor(){if(this.version=`6`,!De){De=new Uint8Array(65536),De.fill(1),De[0]=0,De.fill(0,1,32),De.fill(0,127,160),De.fill(2,4352,4448),De[9001]=2,De[9002]=2,De.fill(2,11904,42192),De[12351]=1,De.fill(2,44032,55204),De.fill(2,63744,64256),De.fill(2,65040,65050),De.fill(2,65072,65136),De.fill(2,65280,65377),De.fill(2,65504,65511);for(let e=0;e<Te.length;++e)De.fill(0,Te[e][0],Te[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?De[e]:Oe(e,Ee)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let e=pt.extractWidth(t);e===0?r=!1:e>n&&(n=e)}return pt.createPropertyValue(0,n,r)}},Ae=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Fe.isErrorNoTelemetry(e)?new Fe(e.message+`
2
2
 
3
3
  `+e.stack):Error(e.message+`
4
4
 
@@ -83,5 +83,5 @@ out vec4 outColor;
83
83
  void main() {
84
84
  outColor = v_color;
85
85
  }`,Jd=8,Yd=Jd*Float32Array.BYTES_PER_ELEMENT,Xd=20*Jd,Zd=class{constructor(){this.attributes=new Float32Array(Xd),this.count=0}},Qd=0,$d=0,ef=0,tf=0,nf=0,rf=0,af=0,of=class extends Il{constructor(e,t,n,r){super(),this._terminal=e,this._gl=t,this._dimensions=n,this._themeService=r,this._vertices=new Zd,this._verticesCursor=new Zd;let i=this._gl;this._program=X(Ed(i,Kd,qd)),this._register(Nl(()=>i.deleteProgram(this._program))),this._projectionLocation=X(i.getUniformLocation(this._program,`u_projection`)),this._vertexArrayObject=i.createVertexArray(),i.bindVertexArray(this._vertexArrayObject);let a=new Float32Array([0,0,1,0,0,1,1,1]),o=i.createBuffer();this._register(Nl(()=>i.deleteBuffer(o))),i.bindBuffer(i.ARRAY_BUFFER,o),i.bufferData(i.ARRAY_BUFFER,a,i.STATIC_DRAW),i.enableVertexAttribArray(3),i.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let s=new Uint8Array([0,1,2,3]),c=i.createBuffer();this._register(Nl(()=>i.deleteBuffer(c))),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,c),i.bufferData(i.ELEMENT_ARRAY_BUFFER,s,i.STATIC_DRAW),this._attributesBuffer=X(i.createBuffer()),this._register(Nl(()=>i.deleteBuffer(this._attributesBuffer))),i.bindBuffer(i.ARRAY_BUFFER,this._attributesBuffer),i.enableVertexAttribArray(0),i.vertexAttribPointer(0,2,i.FLOAT,!1,Yd,0),i.vertexAttribDivisor(0,1),i.enableVertexAttribArray(1),i.vertexAttribPointer(1,2,i.FLOAT,!1,Yd,2*Float32Array.BYTES_PER_ELEMENT),i.vertexAttribDivisor(1,1),i.enableVertexAttribArray(2),i.vertexAttribPointer(2,4,i.FLOAT,!1,Yd,4*Float32Array.BYTES_PER_ELEMENT),i.vertexAttribDivisor(2,1),this._updateCachedColors(r.colors),this._register(this._themeService.onChangeColors(e=>{this._updateCachedColors(e),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,Td),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,e.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(e){let t=this._terminal,n=this._vertices,r=1,i,a,o,s,c,l,u,d,f,p,m;for(i=0;i<t.rows;i++){for(o=-1,s=0,c=0,l=!1,a=0;a<t.cols;a++)u=(i*t.cols+a)*Bd,d=e.cells[u+Vd],f=e.cells[u+Hd],p=!!(f&67108864),(d!==s||f!==c&&(l||p))&&((s!==0||l&&c!==0)&&(m=r++*Jd,this._updateRectangle(n,m,c,s,o,a,i)),o=a,s=d,c=f,l=p);(s!==0||l&&c!==0)&&(m=r++*Jd,this._updateRectangle(n,m,c,s,o,t.cols,i))}n.count=r}updateCursor(e){let t=this._verticesCursor,n=e.cursor;if(!n||n.style===`block`){t.count=0;return}let r,i=0;(n.style===`bar`||n.style===`outline`)&&(r=i++*Jd,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,n.y*this._dimensions.device.cell.height,n.style===`bar`?n.dpr*n.cursorWidth:n.dpr,this._dimensions.device.cell.height,this._cursorFloat)),(n.style===`underline`||n.style===`outline`)&&(r=i++*Jd,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,(n.y+1)*this._dimensions.device.cell.height-n.dpr,n.width*this._dimensions.device.cell.width,n.dpr,this._cursorFloat)),n.style===`outline`&&(r=i++*Jd,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,n.y*this._dimensions.device.cell.height,n.width*this._dimensions.device.cell.width,n.dpr,this._cursorFloat),r=i++*Jd,this._addRectangleFloat(t.attributes,r,(n.x+n.width)*this._dimensions.device.cell.width-n.dpr,n.y*this._dimensions.device.cell.height,n.dpr,this._dimensions.device.cell.height,this._cursorFloat)),t.count=i}_updateRectangle(e,t,n,r,i,a,o){if(n&67108864)switch(n&50331648){case 16777216:case 33554432:Qd=this._themeService.colors.ansi[n&255].rgba;break;case 50331648:Qd=(n&16777215)<<8;break;default:Qd=this._themeService.colors.foreground.rgba}else switch(r&50331648){case 16777216:case 33554432:Qd=this._themeService.colors.ansi[r&255].rgba;break;case 50331648:Qd=(r&16777215)<<8;break;default:Qd=this._themeService.colors.background.rgba}e.attributes.length<t+4&&(e.attributes=Od(e.attributes,this._terminal.rows*this._terminal.cols*Jd)),$d=i*this._dimensions.device.cell.width,ef=o*this._dimensions.device.cell.height,tf=(Qd>>24&255)/255,nf=(Qd>>16&255)/255,rf=(Qd>>8&255)/255,af=1,this._addRectangle(e.attributes,t,$d,ef,(a-i)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,tf,nf,rf,af)}_addRectangle(e,t,n,r,i,a,o,s,c,l){e[t]=n/this._dimensions.device.canvas.width,e[t+1]=r/this._dimensions.device.canvas.height,e[t+2]=i/this._dimensions.device.canvas.width,e[t+3]=a/this._dimensions.device.canvas.height,e[t+4]=o,e[t+5]=s,e[t+6]=c,e[t+7]=l}_addRectangleFloat(e,t,n,r,i,a,o){e[t]=n/this._dimensions.device.canvas.width,e[t+1]=r/this._dimensions.device.canvas.height,e[t+2]=i/this._dimensions.device.canvas.width,e[t+3]=a/this._dimensions.device.canvas.height,e[t+4]=o[0],e[t+5]=o[1],e[t+6]=o[2],e[t+7]=o[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(e.rgba&255)/255])}},sf=class extends Il{constructor(e,t,n,r,i,a,o,s){super(),this._container=t,this._alpha=i,this._coreBrowserService=a,this._optionsService=o,this._themeService=s,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`),this._canvas.classList.add(`xterm-${n}-layer`),this._canvas.style.zIndex=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(t=>{this._refreshCharAtlas(e,t),this.reset(e)})),this._register(Nl(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=X(this._canvas.getContext(`2d`,{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,t,n){}handleSelectionChanged(e,t,n,r=!1){}_setTransparency(e,t){if(t===this._alpha)return;let n=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,n),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=vd(e,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,t,n=1){this._ctx.fillRect(e*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,n*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,t,n,r){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,r*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,r*this._deviceCellHeight))}_fillCharTrueColor(e,t,n,r){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=Su,this._clipCell(n,r,t.getWidth()),this._ctx.fillText(t.getChars(),n*this._deviceCellWidth+this._deviceCharLeft,r*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,t,n){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,t,n){let r=t?e.options.fontWeightBold:e.options.fontWeight;return`${n?`italic`:``} ${r} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},cf=class extends sf{constructor(e,t,n,r,i,a,o){super(n,e,`link`,t,!0,i,a,o),this._register(r.onShowLinkUnderline(e=>this._handleShowLinkUnderline(e))),this._register(r.onHideLinkUnderline(e=>this._handleHideLinkUnderline(e)))}resize(e,t){super.resize(e,t),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){if(e.fg===257?this._ctx.fillStyle=this._themeService.colors.background.css:e.fg!==void 0&&gd(e.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}},lf=typeof window==`object`?window:globalThis,uf=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new Z,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new Z,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(n,e),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToFullScreen.set(n,e),this._onDidChangeFullscreen.fire(n)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};uf.INSTANCE=new uf;var df=uf;function ff(e,t,n){typeof t==`string`&&(t=e.matchMedia(t)),t.addEventListener(`change`,n)}df.INSTANCE.onDidChangeZoomLevel,df.INSTANCE.onDidChangeFullscreen;var pf=typeof navigator==`object`?navigator.userAgent:``;pf.indexOf(`Firefox`);var mf=pf.indexOf(`AppleWebKit`)>=0;!(pf.indexOf(`Chrome`)>=0)&&pf.indexOf(`Safari`),pf.indexOf(`Electron/`),pf.indexOf(`Android`);var hf=!1;if(typeof lf.matchMedia==`function`){let e=lf.matchMedia(`(display-mode: standalone) or (display-mode: window-controls-overlay)`),t=lf.matchMedia(`(display-mode: fullscreen)`);hf=e.matches,ff(lf,e,({matches:e})=>{hf&&t.matches||(hf=e)})}function gf(){return hf}var _f=`en`,vf=!1,yf=!1,bf=!1,xf=_f,Sf,Cf=globalThis,wf;typeof Cf.vscode<`u`&&typeof Cf.vscode.process<`u`?wf=Cf.vscode.process:typeof process<`u`&&typeof process?.versions?.node==`string`&&(wf=process);var Tf=typeof wf?.versions?.electron==`string`&&wf?.type===`renderer`;if(typeof wf==`object`){wf.platform,wf.platform,vf=wf.platform===`linux`,vf&&wf.env.SNAP&&wf.env.SNAP_REVISION,wf.env.CI||wf.env.BUILD_ARTIFACTSTAGINGDIRECTORY,xf=_f;let e=wf.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,xf=t.resolvedLanguage||_f,t.languagePack?.translationsConfigFile}catch{}yf=!0}else typeof navigator==`object`&&!Tf?(Sf=navigator.userAgent,Sf.indexOf(`Windows`),Sf.indexOf(`Macintosh`),(Sf.indexOf(`Macintosh`)>=0||Sf.indexOf(`iPad`)>=0||Sf.indexOf(`iPhone`)>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,vf=Sf.indexOf(`Linux`)>=0,Sf?.indexOf(`Mobi`),bf=!0,xf=globalThis._VSCODE_NLS_LANGUAGE||_f,navigator.language.toLowerCase()):console.error(`Unable to resolve platform.`);var Ef=yf;bf&&typeof Cf.importScripts==`function`&&Cf.origin;var Df=Sf,Of=xf,kf;(e=>{function t(){return Of}e.value=t;function n(){return Of.length===2?Of===`en`:Of.length>=3&&Of[0]===`e`&&Of[1]===`n`&&Of[2]===`-`}e.isDefaultVariant=n;function r(){return Of===`en`}e.isDefault=r})(kf||={});var Af=typeof Cf.postMessage==`function`&&!Cf.importScripts;(()=>{if(Af){let e=[];Cf.addEventListener(`message`,t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n<r;n++){let r=e[n];if(r.id===t.data.vscodeScheduleAsyncWork){e.splice(n,1),r.callback();return}}});let t=0;return n=>{let r=++t;e.push({id:r,callback:n}),Cf.postMessage({vscodeScheduleAsyncWork:r},`*`)}}return e=>setTimeout(e)})();var jf=!!(Df&&Df.indexOf(`Chrome`)>=0);Df&&Df.indexOf(`Firefox`),!jf&&Df&&Df.indexOf(`Safari`),Df&&Df.indexOf(`Edg/`),Df&&Df.indexOf(`Android`);var Mf=typeof navigator==`object`?navigator:{};Ef||document.queryCommandSupported&&document.queryCommandSupported(`copy`)||Mf&&Mf.clipboard&&Mf.clipboard.writeText,Ef||Mf&&Mf.clipboard&&Mf.clipboard.readText,Ef||gf()||Mf.keyboard,`ontouchstart`in lf||Mf.maxTouchPoints,lf.PointerEvent&&(`ontouchstart`in lf||navigator.maxTouchPoints);var Nf=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},Pf=new Nf,Ff=new Nf,If=new Nf;Array(230);var Lf;(e=>{function t(e){return Pf.keyCodeToStr(e)}e.toString=t;function n(e){return Pf.strToKeyCode(e)}e.fromString=n;function r(e){return Ff.keyCodeToStr(e)}e.toUserSettingsUS=r;function i(e){return If.keyCodeToStr(e)}e.toUserSettingsGeneral=i;function a(e){return Ff.strToKeyCode(e)||If.strToKeyCode(e)}e.fromUserSettings=a;function o(e){if(e>=98&&e<=113)return null;switch(e){case 16:return`Up`;case 18:return`Down`;case 15:return`Left`;case 17:return`Right`}return Pf.keyCodeToStr(e)}e.toElectronAccelerator=o})(Lf||={});var Rf=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),zf;(e=>{function t(t){return t===e.None||t===e.Cancelled||t instanceof Bf?!0:!t||typeof t!=`object`?!1:typeof t.isCancellationRequested==`boolean`&&typeof t.onCancellationRequested==`function`}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:qu.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Rf})})(zf||={});var Bf=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Rf:(this._emitter||=new Z,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),null)}};(function(){typeof globalThis.requestIdleCallback!=`function`||globalThis.cancelIdleCallback})();var Vf;(e=>{async function t(e){let t,n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||=e})));if(typeof t<`u`)throw t;return n}e.settled=t;function n(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}e.withAsyncBody=n})(Vf||={});var Hf=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let n of t)e.emitOne(n)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new Z,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await qu.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new e(async e=>{for await(let r of t)e.emitOne(n(r))})}map(t){return e.map(this,t)}static filter(t,n){return new e(async e=>{for await(let r of t)n(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return e.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};Hf.EMPTY=Hf.fromArray([]);function Uf(e){return Wf(e,0)}function Wf(e,t){switch(typeof e){case`object`:return e===null?Gf(349,t):Array.isArray(e)?Jf(e,t):Yf(e,t);case`string`:return qf(e,t);case`boolean`:return Kf(e,t);case`number`:return Gf(e,t);case`undefined`:return Gf(937,t);default:return Gf(617,t)}}function Gf(e,t){return(t<<5)-t+e|0}function Kf(e,t){return Gf(e?433:863,t)}function qf(e,t){t=Gf(149417,t);for(let n=0,r=e.length;n<r;n++)t=Gf(e.charCodeAt(n),t);return t}function Jf(e,t){return t=Gf(104579,t),e.reduce((e,t)=>Wf(t,e),t)}function Yf(e,t){return t=Gf(181387,t),Object.keys(e).sort().reduce((t,n)=>(t=qf(n,t),Wf(e[n],t)),t)}var{registerWindow:Xf,getWindow:Zf,getDocument:Qf,getWindows:$f,getWindowsCount:ep,getWindowId:tp,getWindowById:np,hasWindow:rp,onDidRegisterWindow:ip,onWillUnregisterWindow:ap,onDidUnregisterWindow:op}=function(){let e=new Map,t={window:lf,disposables:new Fl};e.set(lf.vscodeWindowId,t);let n=new Z,r=new Z,i=new Z;function a(n,r){return(typeof n==`number`?e.get(n):void 0)??(r?t:void 0)}return{onDidRegisterWindow:n.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:r.event,registerWindow(t){if(e.has(t.vscodeWindowId))return Il.None;let a=new Fl,o={window:t,disposables:a.add(new Fl)};return e.set(t.vscodeWindowId,o),a.add(Nl(()=>{e.delete(t.vscodeWindowId),r.fire(t)})),a.add(cp(t,up.BEFORE_UNLOAD,()=>{i.fire(t)})),n.fire(o),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(e){return e.vscodeWindowId},hasWindow(t){return e.has(t)},getWindowById:a,getWindow(e){let t=e;if(t?.ownerDocument?.defaultView)return t.ownerDocument.defaultView.window;let n=e;return n?.view?n.view.window:lf},getDocument(e){return Zf(e).document}}}(),sp=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&=(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,null)}};function cp(e,t,n,r){return new sp(e,t,n,r)}var lp=class e{constructor(e,t){this.width=e,this.height=t}with(t=this.width,n=this.height){return t!==this.width||n!==this.height?new e(t,n):this}static is(e){return typeof e==`object`&&typeof e.height==`number`&&typeof e.width==`number`}static lift(t){return t instanceof e?t:new e(t.width,t.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};lp.None=new lp(0,0),new class{constructor(){this.mutationObservers=new Map}observe(e,t,n){let r=this.mutationObservers.get(e);r||(r=new Map,this.mutationObservers.set(e,r));let i=Uf(n),a=r.get(i);if(a)a.users+=1;else{let o=new Z,s=new MutationObserver(e=>o.fire(e));s.observe(e,n);let c=a={users:1,observer:s,onDidMutate:o.event};t.add(Nl(()=>{--c.users,c.users===0&&(o.dispose(),s.disconnect(),r?.delete(i),r?.size===0&&this.mutationObservers.delete(e))})),r.set(i,a)}return a.onDidMutate}};var up={CLICK:`click`,AUXCLICK:`auxclick`,DBLCLICK:`dblclick`,MOUSE_UP:`mouseup`,MOUSE_DOWN:`mousedown`,MOUSE_OVER:`mouseover`,MOUSE_MOVE:`mousemove`,MOUSE_OUT:`mouseout`,MOUSE_ENTER:`mouseenter`,MOUSE_LEAVE:`mouseleave`,MOUSE_WHEEL:`wheel`,POINTER_UP:`pointerup`,POINTER_DOWN:`pointerdown`,POINTER_MOVE:`pointermove`,POINTER_LEAVE:`pointerleave`,CONTEXT_MENU:`contextmenu`,WHEEL:`wheel`,KEY_DOWN:`keydown`,KEY_PRESS:`keypress`,KEY_UP:`keyup`,LOAD:`load`,BEFORE_UNLOAD:`beforeunload`,UNLOAD:`unload`,PAGE_SHOW:`pageshow`,PAGE_HIDE:`pagehide`,PASTE:`paste`,ABORT:`abort`,ERROR:`error`,RESIZE:`resize`,SCROLL:`scroll`,FULLSCREEN_CHANGE:`fullscreenchange`,WK_FULLSCREEN_CHANGE:`webkitfullscreenchange`,SELECT:`select`,CHANGE:`change`,SUBMIT:`submit`,RESET:`reset`,FOCUS:`focus`,FOCUS_IN:`focusin`,FOCUS_OUT:`focusout`,BLUR:`blur`,INPUT:`input`,STORAGE:`storage`,DRAG_START:`dragstart`,DRAG:`drag`,DRAG_ENTER:`dragenter`,DRAG_LEAVE:`dragleave`,DRAG_OVER:`dragover`,DROP:`drop`,DRAG_END:`dragend`,ANIMATION_START:mf?`webkitAnimationStart`:`animationstart`,ANIMATION_END:mf?`webkitAnimationEnd`:`animationend`,ANIMATION_ITERATION:mf?`webkitAnimationIteration`:`animationiteration`},dp=class extends Il{constructor(e,t,n,r,i,a,o,s,c){super(),this._terminal=e,this._characterJoinerService=t,this._charSizeService=n,this._coreBrowserService=r,this._coreService=i,this._decorationService=a,this._optionsService=o,this._themeService=s,this._cursorBlinkStateManager=new Ll,this._charAtlasDisposable=this._register(new Ll),this._observerDisposable=this._register(new Ll),this._model=new Gd,this._workCell=new wd,this._workCell2=new wd,this._rectangleRenderer=this._register(new Ll),this._glyphRenderer=this._register(new Ll),this._onChangeTextureAtlas=this._register(new Z),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new Z),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new Z),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new Z),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new Z),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`);let l={antialias:!1,depth:!1,preserveDrawingBuffer:c};if(this._gl=this._canvas.getContext(`webgl2`,l),!this._gl)throw Error(`WebGL2 not supported `+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new bu(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new cf(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,o,this._themeService)],this.dimensions=uu(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(o.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(cp(this._canvas,`webglcontextlost`,e=>{console.log(`webglcontextlost event received`),e.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn(`webgl context not restored; firing onContextLoss`),this._onContextLoss.fire(e)},3e3)})),this._register(cp(this._canvas,`webglcontextrestored`,e=>{console.warn(`webglcontextrestored event received`),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,yd(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=Sd(this._canvas,this._coreBrowserService.window,(e,t)=>this._setCanvasDevicePixelDimensions(e,t)),this._register(this._coreBrowserService.onWindowChange(e=>{this._observerDisposable.value=Sd(this._canvas,e,(e,t)=>this._setCanvasDevicePixelDimensions(e,t))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(Nl(()=>{for(let e of this._renderLayers)e.dispose();this._canvas.parentElement?.removeChild(this._canvas),yd(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(e,t){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(let e of this._renderLayers)e.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(e,t,n){for(let r of this._renderLayers)r.handleSelectionChanged(this._terminal,e,t,n);this._model.selection.update(this._core,e,t,n),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new of(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new Ld(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let e=vd(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=Ml(qu.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),qu.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(let e of this._renderLayers)e.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,t){if(!this._isAttached){if(this._core.screenElement?.isConnected&&this._charSizeService.width&&this._charSizeService.height)this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;else return}for(let n of this._renderLayers)n.handleGridChanged(this._terminal,e,t);!this._glyphRenderer.value||!this._rectangleRenderer.value||(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,t),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new xd(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,t){let n=this._core,r=this._workCell,i,a,o,s,c,l,u=0,d=!0,f,p,m,h,g,_,v,y,ee;e=pp(e,n.rows-1,0),t=pp(t,n.rows-1,0);let b=this._coreService.decPrivateModes.cursorStyle??n.options.cursorStyle??`block`,te=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,ne=te-n.buffer.ydisp,x=Math.min(this._terminal.buffer.active.cursorX,n.cols-1),re=-1,ie=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let S=!1;for(a=e;a<=t;a++)for(o=a+n.buffer.ydisp,s=n.buffer.lines.get(o),this._model.lineLengths[a]=0,m=te===o,u=0,c=this._characterJoinerService.getJoinedCharacters(o),y=0;y<n.cols;y++){if(i=this._cellColorResolver.result.bg,s.loadCell(y,r),y===0&&(i=this._cellColorResolver.result.bg),l=!1,d=y>=u,f=y,c.length>0&&y===c[0][0]&&d){p=c.shift();let e=this._model.selection.isCellSelected(this._terminal,p[0],o);for(v=p[0]+1;v<p[1];v++)d&&=e===this._model.selection.isCellSelected(this._terminal,v,o);d&&=!m||x<p[0]||x>=p[1],d?(l=!0,r=new fp(r,s.translateToString(!0,p[0],p[1]),p[1]-p[0]),f=p[1]-1):u=p[1]}if(h=r.getChars(),g=r.getCode(),v=(a*n.cols+y)*Bd,this._cellColorResolver.resolve(r,y,o,this.dimensions.device.cell.width),ie&&o===te&&(y===x&&(this._model.cursor={x,y:ne,width:r.getWidth(),style:this._coreBrowserService.isFocused?b:n.options.cursorInactiveStyle,cursorWidth:n.options.cursorWidth,dpr:this._devicePixelRatio},re=x+r.getWidth()-1),y>=x&&y<=re&&(this._coreBrowserService.isFocused&&b===`block`||this._coreBrowserService.isFocused===!1&&n.options.cursorInactiveStyle===`block`)&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),g!==0&&(this._model.lineLengths[a]=y+1),(this._model.cells[v]!==g||this._model.cells[v+Vd]!==this._cellColorResolver.result.bg||this._model.cells[v+Hd]!==this._cellColorResolver.result.fg||this._model.cells[v+Ud]!==this._cellColorResolver.result.ext)&&(S=!0,h.length>1&&(g|=Wd),this._model.cells[v]=g,this._model.cells[v+Vd]=this._cellColorResolver.result.bg,this._model.cells[v+Hd]=this._cellColorResolver.result.fg,this._model.cells[v+Ud]=this._cellColorResolver.result.ext,_=r.getWidth(),this._glyphRenderer.value.updateCell(y,a,g,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,h,_,i),l)){for(r=this._workCell,y++;y<=f;y++)ee=(a*n.cols+y)*Bd,this._glyphRenderer.value.updateCell(y,a,0,0,0,0,Gl,0,0),this._model.cells[ee]=0,this._model.cells[ee+Vd]=this._cellColorResolver.result.bg,this._model.cells[ee+Hd]=this._cellColorResolver.result.fg,this._model.cells[ee+Ud]=this._cellColorResolver.result.ext;y--}}S&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){!this._charSizeService.width||!this._charSizeService.height||(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(e,t){this._canvas.width===e&&this._canvas.height===t||(this._canvas.width=e,this._canvas.height=t,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},fp=class extends Hu{constructor(e,t,n){super(),this.content=0,this.combinedData=``,this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error(`not implemented`)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function pp(e,t,n=0){return Math.max(Math.min(e,t),n)}var mp=`di$target`,hp=`di$dependencies`,gp=new Map;function _p(e){if(gp.has(e))return gp.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);vp(t,e,r)};return t._id=e,gp.set(e,t),t}function vp(e,t,n){t[mp]===t?t[hp].push({id:e,index:n}):(t[hp]=[{id:e,index:n}],t[mp]=t)}_p(`BufferService`),_p(`CoreMouseService`),_p(`CoreService`),_p(`CharsetService`),_p(`InstantiationService`),_p(`LogService`);var yp=_p(`OptionsService`);_p(`OscLinkService`),_p(`UnicodeService`),_p(`DecorationService`);var bp={trace:0,debug:1,info:2,warn:3,error:4,off:5},xp=`xterm.js: `,Sp=class extends Il{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange(`logLevel`,()=>this._updateLogLevel())),Cp=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=bp[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]==`function`&&(e[t]=e[t]())}_log(e,t,n){this._evalLazyOptionalParams(n),e.call(console,(this._optionsService.options.logger?``:xp)+t,...n)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};Sp=hl([gl(0,yp)],Sp);var Cp,wp=class extends Il{constructor(e){if(Ul&&Wl()<16&&!document.createElement(`canvas`).getContext(`webgl2`,{antialias:!1,depth:!1,preserveDrawingBuffer:!0}))throw Error(`Webgl2 is only supported on Safari 16 and above`);super(),this._preserveDrawingBuffer=e,this._onChangeTextureAtlas=this._register(new Z),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new Z),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new Z),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new Z),this.onContextLoss=this._onContextLoss.event}activate(e){let t=e._core;if(!e.element){this._register(t.onWillOpen(()=>this.activate(e)));return}this._terminal=e;let n=t.coreService,r=t.optionsService,i=t,a=i._renderService,o=i._characterJoinerService,s=i._charSizeService,c=i._coreBrowserService,l=i._decorationService;i._logService;let u=i._themeService;this._renderer=this._register(new dp(e,o,s,c,n,l,r,u,this._preserveDrawingBuffer)),this._register(qu.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(qu.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(qu.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(qu.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),a.setRenderer(this._renderer),this._register(Nl(()=>{if(this._terminal._core._store._isDisposed)return;let t=this._terminal._core._renderService;t.setRenderer(this._terminal._core._createRenderer()),t.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}};function Tp(e){try{e.loadAddon(new fl.CanvasAddon)}catch{}}function Ep(e,t,n){if(t===`dom`)return;if(n){Tp(e);return}let r,i=()=>{try{r?.dispose()}catch{}Tp(e)};try{r=new wp,r.onContextLoss(i),e.loadAddon(r)}catch{i()}}var Dp={background:`#141413`,foreground:`#eae7df`,cursor:`#cc785c`,cursorAccent:`#141413`,selectionBackground:`#33312e`,black:`#141413`,red:`#d47563`,green:`#9aca86`,yellow:`#e8c96b`,blue:`#61aaf2`,magenta:`#9b87f5`,cyan:`#d4967e`,white:`#a9a39a`,brightBlack:`#6b665f`,brightRed:`#d47563`,brightGreen:`#9aca86`,brightYellow:`#e8c96b`,brightBlue:`#61aaf2`,brightMagenta:`#9b87f5`,brightCyan:`#e0ab96`,brightWhite:`#eae7df`},Op=`"JetBrains Mono", "JetBrainsMono Nerd Font", "MesloLGS NF", "Symbols Nerd Font Mono", "SF Mono", ui-monospace, Menlo, monospace`,kp=[`"JetBrains Mono"`,`"JetBrainsMono Nerd Font"`,`"MesloLGS NF"`,`"Symbols Nerd Font Mono"`];async function Ap(){if(`fonts`in document){await Promise.allSettled(kp.map(e=>document.fonts.load(`12px ${e}`)));try{await document.fonts.ready}catch{}}}function jp(e,{renderer:t,transparent:n,hostBackground:r,cursorBlink:i}){let a=new dl({theme:n?{...Dp,background:r??`rgba(0,0,0,0.01)`}:Dp,allowTransparency:n,fontFamily:Op,fontSize:12,cursorBlink:i,allowProposedApi:!0,scrollback:5e3});return a.loadAddon(new xt),a.unicode.activeVersion=`11`,a.loadAddon(new Se),a.loadAddon(new Dt),a.open(e),Ep(a,t,n),a}var Mp=`rove-web-token`;function Np(){try{return sessionStorage.getItem(Mp)?.trim()??``}catch{return``}}function Pp(e){try{sessionStorage.setItem(Mp,e)}catch{}}function Fp(){if(typeof document<`u`){let e=document.querySelector(`meta[name="rove-web-token"]`)?.getAttribute(`content`)?.trim();if(e)return Pp(e),e;let t=Np();if(t)return t}return``}var Ip=null;function Lp(){return Ip===null&&(Ip=Fp()),Ip}function Rp(e){let t=Lp();return t?`${e}${e.includes(`?`)?`&`:`?`}token=${encodeURIComponent(t)}`:e}function zp(){return`${location.protocol===`https:`?`wss`:`ws`}://${location.host}`}function Bp(e,t,n,r,i){let a=new URLSearchParams({tab:e,taskId:t,mode:n,cols:String(r),rows:String(i)});return Rp(`${zp()}/pty?${a.toString()}`)}var Vp=r(),Hp=new TextDecoder;function Up(e){let t=e.buffer.active,n=t.viewportY,r=Math.min(t.length,n+e.rows),i=[];for(let e=n;e<r;e+=1)i.push(t.getLine(e)?.translateToString(!0)??``);return i.join(`
86
- `)}function Wp({tabId:e,taskId:t,mode:n,testId:r,renderer:a=`automatic`,transparent:o=!1,hostBackground:c,onStatusChange:l,onBufferChange:u}){let d=(0,i.useRef)(null),f=(0,i.useRef)(null),[p,m]=(0,i.useState)(`connecting`),[g,_]=(0,i.useState)(0);return(0,i.useEffect)(()=>{let r=!1,i=d.current;if(!i)return;let p=null,h=null,g=null,_=null;m(`connecting`),l?.(`connecting`);let v=()=>{!p||!u||_!==null||(_=requestAnimationFrame(()=>{_=null,!r&&p&&u(Up(p))}))};return(async()=>{if(await Ap(),r)return;p=jp(i,{renderer:a,transparent:o,hostBackground:c,cursorBlink:!0});let u=new s;p.loadAddon(u);try{u.fit()}catch{}h=new WebSocket(Bp(e,t,n,p.cols,p.rows)),f.current=h,h.binaryType=`arraybuffer`,h.onopen=()=>{r||(m(`open`),l?.(`open`))},h.onmessage=e=>{if(r)return;let t=typeof e.data==`string`?e.data:Hp.decode(e.data);p?.write(t,v)},h.onclose=e=>{if(!r){let t=e.reason?`: ${e.reason}`:``;p?.writeln(`\r\n[detached${t} — reattach below]`,v),m(`closed`),l?.(`closed`)}},p.onData(e=>{h?.readyState===WebSocket.OPEN&&h.send(e)});let d=()=>{if(p){try{u.fit()}catch{return}h?.readyState===WebSocket.OPEN&&h.send(JSON.stringify({type:`resize`,cols:p.cols,rows:p.rows}))}};g=new ResizeObserver(()=>d()),g.observe(i)})(),()=>{r=!0,g?.disconnect(),_!==null&&cancelAnimationFrame(_),h?.close(),p?.dispose(),f.current=null}},[e,t,n,g,a,o,c,l,u]),(0,Vp.jsxs)(`div`,{className:`flex h-full w-full flex-col`,children:[(0,Vp.jsx)(`div`,{ref:d,"data-testid":r,"data-pty-status":r?p:void 0,className:`min-h-0 w-full flex-1 overflow-hidden`}),p===`closed`?(0,Vp.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center justify-between gap-2 border-t border-line bg-surface px-2`,children:[(0,Vp.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[11px] text-kobe-yellow`,children:`detached — the session keeps running`}),(0,Vp.jsxs)(`button`,{type:`button`,onClick:()=>_(e=>e+1),className:`flex shrink-0 items-center gap-1.5 border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg`,children:[(0,Vp.jsx)(h,{size:11,strokeWidth:2}),`Reattach`]})]}):null]})}function Gp(e){let[t,...n]=e.split(`
86
+ `)}function Wp({tabId:e,taskId:t,mode:n,testId:r,renderer:a=`automatic`,transparent:o=!1,hostBackground:c,onStatusChange:l,onBufferChange:u}){let d=(0,i.useRef)(null),f=(0,i.useRef)(null),[p,m]=(0,i.useState)(`connecting`),[g,_]=(0,i.useState)(0);return(0,i.useEffect)(()=>{let r=!1,i=d.current;if(!i)return;let p=null,h=null,g=null,_=null;m(`connecting`),l?.(`connecting`);let v=()=>{!p||!u||_!==null||(_=requestAnimationFrame(()=>{_=null,!r&&p&&u(Up(p))}))};return(async()=>{if(await Ap(),r)return;p=jp(i,{renderer:a,transparent:o,hostBackground:c,cursorBlink:!0});let u=new s;p.loadAddon(u);try{u.fit()}catch{}h=new WebSocket(Bp(e,t,n,p.cols,p.rows)),f.current=h,h.binaryType=`arraybuffer`,h.onopen=()=>{r||(m(`open`),l?.(`open`))},h.onmessage=e=>{if(r)return;let t=typeof e.data==`string`?e.data:Hp.decode(e.data);p?.write(t,v)},h.onclose=e=>{if(!r){let t=e.reason?`: ${e.reason}`:``;p?.writeln(`\r\n[detached${t} — reattach below]`,v),m(`closed`),l?.(`closed`)}},p.onData(e=>{h?.readyState===WebSocket.OPEN&&h.send(e)});let d=()=>{if(p){try{u.fit()}catch{return}h?.readyState===WebSocket.OPEN&&h.send(JSON.stringify({type:`resize`,cols:p.cols,rows:p.rows}))}};g=new ResizeObserver(()=>d()),g.observe(i)})(),()=>{r=!0,g?.disconnect(),_!==null&&cancelAnimationFrame(_),h?.close(),p?.dispose(),f.current=null}},[e,t,n,g,a,o,c,l,u]),(0,Vp.jsxs)(`div`,{className:`flex h-full w-full flex-col`,children:[(0,Vp.jsx)(`div`,{ref:d,"data-testid":r,"data-pty-status":r?p:void 0,className:`min-h-0 w-full flex-1 overflow-hidden`}),p===`closed`?(0,Vp.jsxs)(`div`,{className:`flex h-9 shrink-0 items-center justify-between gap-2 border-t border-line bg-surface px-2`,children:[(0,Vp.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[11px] text-rove-yellow`,children:`detached — the session keeps running`}),(0,Vp.jsxs)(`button`,{type:`button`,onClick:()=>_(e=>e+1),className:`flex shrink-0 items-center gap-1.5 border border-line bg-bg px-2 py-1 text-[11px] text-muted transition-colors hover:border-primary hover:text-fg`,children:[(0,Vp.jsx)(h,{size:11,strokeWidth:2}),`Reattach`]})]}):null]})}function Gp(e){let[t,...n]=e.split(`
87
87
  `).filter(e=>e.length>0);if(!t)throw Error(`empty cast`);let r=JSON.parse(t);if(r.version!==2||!r.width||!r.height)throw Error(`not an asciicast v2 recording`);let i=n.map(e=>JSON.parse(e));return{cols:r.width,rows:r.height,events:i}}function Kp(e){return e.events.filter(e=>e[1]===`m`).map(([e,,t])=>({t:e,label:t}))}function qp(e){return e.events.at(-1)?.[0]??0}function Jp(e,t,n){let r=t>0?e.events[t-1]:void 0,i=r!==void 0&&r[0]>n,a=i?0:t,o=[],s=``,c=()=>{s&&o.push({kind:`write`,data:s}),s=``};for(;a<e.events.length;a+=1){let[t,r,i]=e.events[a];if(t>n)break;if(r===`o`)s+=i;else if(r===`r`){c();let[e,t]=i.split(`x`).map(Number);o.push({kind:`resize`,cols:e,rows:t})}}return c(),{reset:i,steps:o,cursor:a}}function Yp(){let{promise:e,resolve:t}=Promise.withResolvers();return requestAnimationFrame(()=>requestAnimationFrame(()=>t())),e}function Xp({renderer:e,transparent:t,hostBackground:n}){let r=(0,i.useRef)(null);return(0,i.useEffect)(()=>{let i=r.current;if(!i)return;let a=!1,o=null;return(async()=>{if(await Ap(),a)return;let r=jp(i,{renderer:e,transparent:t,hostBackground:n,cursorBlink:!1});o=r;let s=null,c=0,l=e=>{r.reset(),r.resize(e.cols,e.rows)};window.__replay={async load(e){return s=Gp(e),c=0,l(s),await Yp(),{duration:qp(s),markers:Kp(s)}},async seek(e){if(!s)throw Error(`__replay.seek before load`);let t=Jp(s,c,e);t.reset&&l(s);for(let e of t.steps){if(e.kind===`resize`){r.resize(e.cols,e.rows);continue}let{promise:t,resolve:n}=Promise.withResolvers();r.write(e.data,n),await t}c=t.cursor;let n=t.reset||t.steps.length>0;return n&&await Yp(),n}},i.dataset.replayReady=`true`})(),()=>{a=!0,delete window.__replay,o?.dispose()}},[e,t,n]),(0,Vp.jsx)(`div`,{ref:r,"data-testid":`opentui-terminal`,className:`h-full w-full overflow-hidden`})}function Zp(e){return e.get(`renderer`)===`dom`?`dom`:`automatic`}function Qp(){let e=(new URLSearchParams(window.location.search).get(`run`)??`manual`).replace(/[^a-zA-Z0-9_-]/g,``).slice(0,48)||`manual`,t=Zp(new URLSearchParams(window.location.search)),n=new URLSearchParams(window.location.search).get(`wallpaper`),r=n?.startsWith(`/`)?n:null,a=new URLSearchParams(window.location.search).get(`hostbg`),o=a&&/^#[0-9a-fA-F]{6}$/.test(a)?a:null,s=`visual-${e}`,c=new URLSearchParams(window.location.search).has(`replay`),[l,u]=(0,i.useState)(`connecting`),[d,f]=(0,i.useState)(``);return(0,Vp.jsxs)(`div`,{"data-testid":`opentui-harness`,"data-pty-status":l,style:{position:`fixed`,inset:0,background:r?`#0F0E0D url("${r}") center/cover no-repeat`:o??`#141413`},children:[r||o?(0,Vp.jsx)(`style`,{children:`.xterm-viewport{background-color:transparent !important}`}):null,c?(0,Vp.jsx)(Xp,{renderer:t,transparent:r!==null||o!==null,hostBackground:o??void 0}):(0,Vp.jsxs)(Vp.Fragment,{children:[(0,Vp.jsx)(Wp,{tabId:s,taskId:s,mode:`shell`,testId:`opentui-terminal`,renderer:t,transparent:r!==null||o!==null,hostBackground:o??void 0,onStatusChange:u,onBufferChange:f}),(0,Vp.jsx)(`pre`,{"data-testid":`opentui-buffer`,style:{display:`none`},children:d})]})]})}export{Qp as component};