@claudiolabs/claudio 0.1.10 → 0.1.11

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 (807) hide show
  1. package/bin/claudio +50 -1
  2. package/dist/chunks/AgentTool-0.1.11-m06x003m.mjs +1 -0
  3. package/dist/chunks/App-0.1.11-z60c27dk.mjs +1 -0
  4. package/dist/chunks/ApproveApiKey-0.1.11-dpm879x7.mjs +1 -0
  5. package/dist/chunks/AssistantSessionChooser-0.1.11-kb5jvw8n.mjs +1 -0
  6. package/dist/chunks/AutoModeOptInDialog-0.1.11-dnqj2p8g.mjs +1 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-0.1.11-h71pmj5p.mjs +1 -0
  8. package/dist/chunks/ClaudeInChromeOnboarding-0.1.11-vjwzqejw.mjs +1 -0
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-0.1.11-0wpjjdn9.mjs +1 -0
  10. package/dist/chunks/ConsoleOAuthFlow-0.1.11-xzbcx3cw.mjs +1 -0
  11. package/dist/chunks/DiffDialog-0.1.11-k3zsm9tz.mjs +3 -0
  12. package/dist/chunks/Doctor-0.1.11-958cxvhj.mjs +1 -0
  13. package/dist/chunks/Grove-0.1.11-93bnbcec.mjs +1 -0
  14. package/dist/chunks/ITermBackend-0.1.11-xbxm144g.mjs +1 -0
  15. package/dist/chunks/InProcessTransport-0.1.11-xecmx0sw.mjs +1 -0
  16. package/dist/chunks/InvalidConfigDialog-0.1.11-vbeef1wb.mjs +1 -0
  17. package/dist/chunks/InvalidSettingsDialog-0.1.11-5bct7bny.mjs +1 -0
  18. package/dist/chunks/MigrationDialog-0.1.11-13kfzmtt.mjs +1 -0
  19. package/dist/chunks/Onboarding-0.1.11-kz5hnpx3.mjs +1 -0
  20. package/dist/chunks/ProviderManager-0.1.11-nggswmdv.mjs +1 -0
  21. package/dist/chunks/REPL-0.1.11-ctxx4039.mjs +1 -0
  22. package/dist/chunks/ResumeConversation-0.1.11-gwxzn4yg.mjs +1 -0
  23. package/dist/chunks/SnapshotUpdateDialog-0.1.11-h881m192.mjs +1 -0
  24. package/dist/chunks/TeleportProgress-0.1.11-z1ez7pce.mjs +1 -0
  25. package/dist/chunks/TeleportRepoMismatchDialog-0.1.11-pjt2g9ss.mjs +1 -0
  26. package/dist/chunks/TeleportResumeWrapper-0.1.11-9y29zset.mjs +1 -0
  27. package/dist/chunks/TmuxBackend-0.1.11-5a4ddj92.mjs +9 -0
  28. package/dist/chunks/ToolSearchTool-0.1.11-w3cgae0s.mjs +1 -0
  29. package/dist/chunks/TrustDialog-0.1.11-3dsrj239.mjs +1 -0
  30. package/dist/chunks/activeProvider-0.1.11-qrn947by.mjs +1 -0
  31. package/dist/chunks/add-dir-0.1.11-9j7tq9gk.mjs +1 -0
  32. package/dist/chunks/agents-0.1.11-26pbss9x.mjs +3 -0
  33. package/dist/chunks/agents-0.1.11-m56gfjmy.mjs +111 -0
  34. package/dist/chunks/api-0.1.11-5ygenb1h.mjs +1 -0
  35. package/dist/chunks/asciicast-0.1.11-7mkaazy8.mjs +1 -0
  36. package/dist/chunks/assistant-0.1.11-5xbar4vv.mjs +1 -0
  37. package/dist/chunks/auth-0.1.11-2363mst5.mjs +1 -0
  38. package/dist/chunks/auth-0.1.11-p47wajra.mjs +1 -0
  39. package/dist/chunks/autoMode-0.1.11-nv8vsag0.mjs +48 -0
  40. package/dist/chunks/backgroundHousekeeping-0.1.11-fy6tykxe.mjs +1 -0
  41. package/dist/chunks/branch-0.1.11-aqhrj1x2.mjs +4 -0
  42. package/dist/chunks/bridgePointer-0.1.11-wr8dfs91.mjs +1 -0
  43. package/dist/chunks/btw-0.1.11-2kks7dfd.mjs +1 -0
  44. package/dist/chunks/buddy-0.1.11-gsj76spy.mjs +3 -0
  45. package/dist/chunks/cacache-0.1.11-wtz0ca19.mjs +1 -0
  46. package/dist/chunks/cache-probe-0.1.11-pgsemwpr.mjs +21 -0
  47. package/dist/chunks/cacheStats-0.1.11-1zqq6pm7.mjs +4 -0
  48. package/dist/chunks/caches-0.1.11-vewfnrya.mjs +1 -0
  49. package/dist/chunks/chrome-0.1.11-0g5459b5.mjs +1 -0
  50. package/dist/chunks/chromeNativeHost-0.1.11-m5kskzjw.mjs +2 -0
  51. package/dist/chunks/claude-for-chrome-mcp-0.1.11-h99xhv8j.mjs +1 -0
  52. package/dist/chunks/claudeDesktop-0.1.11-zpdtj6k8.mjs +1 -0
  53. package/dist/chunks/claudemd-0.1.11-qrr22x5b.mjs +1 -0
  54. package/dist/chunks/clear-0.1.11-c93nbam7.mjs +1 -0
  55. package/dist/chunks/clearTerminal-0.1.11-pdrc3735.mjs +1 -0
  56. package/dist/chunks/cli-0.1.11-036me3yr.mjs +2 -0
  57. package/dist/chunks/cli-0.1.11-05g86mrk.mjs +2 -0
  58. package/dist/chunks/cli-0.1.11-05ngjm8p.mjs +2 -0
  59. package/dist/chunks/cli-0.1.11-0fshz0ak.mjs +2 -0
  60. package/dist/chunks/cli-0.1.11-0n77qn68.mjs +2 -0
  61. package/dist/chunks/cli-0.1.11-0qwee9gy.mjs +2 -0
  62. package/dist/chunks/cli-0.1.11-0tge574q.mjs +2 -0
  63. package/dist/chunks/cli-0.1.11-10nmrfsz.mjs +8 -0
  64. package/dist/chunks/cli-0.1.11-16086k9e.mjs +2 -0
  65. package/dist/chunks/cli-0.1.11-1b48xqbe.mjs +2 -0
  66. package/dist/chunks/cli-0.1.11-1bmswdg3.mjs +2 -0
  67. package/dist/chunks/cli-0.1.11-1bryv90w.mjs +2 -0
  68. package/dist/chunks/cli-0.1.11-1bxwxewq.mjs +833 -0
  69. package/dist/chunks/cli-0.1.11-1e6fgnts.mjs +3 -0
  70. package/dist/chunks/cli-0.1.11-1xr9et85.mjs +2 -0
  71. package/dist/chunks/cli-0.1.11-21epc92q.mjs +2 -0
  72. package/dist/chunks/cli-0.1.11-23qqxmk4.mjs +2 -0
  73. package/dist/chunks/cli-0.1.11-2w8d5vqb.mjs +2 -0
  74. package/dist/chunks/cli-0.1.11-2xf0g9qc.mjs +45 -0
  75. package/dist/chunks/cli-0.1.11-3f5dv6mt.mjs +2 -0
  76. package/dist/chunks/cli-0.1.11-3p2f194m.mjs +2 -0
  77. package/dist/chunks/cli-0.1.11-3tqzgd9f.mjs +2 -0
  78. package/dist/chunks/cli-0.1.11-424zgj5k.mjs +4 -0
  79. package/dist/chunks/cli-0.1.11-4bn5ap1n.mjs +2 -0
  80. package/dist/chunks/cli-0.1.11-4cdyzvxv.mjs +3 -0
  81. package/dist/chunks/cli-0.1.11-4ggr81tw.mjs +2 -0
  82. package/dist/chunks/cli-0.1.11-4xsg15d1.mjs +2 -0
  83. package/dist/chunks/cli-0.1.11-50naxqgt.mjs +2 -0
  84. package/dist/chunks/cli-0.1.11-56bdg2vw.mjs +3 -0
  85. package/dist/chunks/cli-0.1.11-56p41bk3.mjs +2 -0
  86. package/dist/chunks/cli-0.1.11-5e45zda5.mjs +2 -0
  87. package/dist/chunks/cli-0.1.11-5hrysrcd.mjs +2 -0
  88. package/dist/chunks/cli-0.1.11-5hs4xyjq.mjs +2 -0
  89. package/dist/chunks/cli-0.1.11-5vqj6k7m.mjs +2 -0
  90. package/dist/chunks/cli-0.1.11-5zqfr92n.mjs +2 -0
  91. package/dist/chunks/cli-0.1.11-6r97rwda.mjs +2 -0
  92. package/dist/chunks/cli-0.1.11-6vqzqsdj.mjs +3 -0
  93. package/dist/chunks/cli-0.1.11-6zkfmcxp.mjs +2 -0
  94. package/dist/chunks/cli-0.1.11-70f778wy.mjs +2 -0
  95. package/dist/chunks/cli-0.1.11-71ewwy7m.mjs +50 -0
  96. package/dist/chunks/cli-0.1.11-7238rfy8.mjs +2 -0
  97. package/dist/chunks/cli-0.1.11-7mmhsc3x.mjs +2 -0
  98. package/dist/chunks/cli-0.1.11-7qpnfx56.mjs +2 -0
  99. package/dist/chunks/cli-0.1.11-7t04gqx2.mjs +3 -0
  100. package/dist/chunks/cli-0.1.11-7tybqg56.mjs +2 -0
  101. package/dist/chunks/cli-0.1.11-7vz357wm.mjs +58 -0
  102. package/dist/chunks/cli-0.1.11-7xr2ermy.mjs +2 -0
  103. package/dist/chunks/cli-0.1.11-84j34n0s.mjs +2 -0
  104. package/dist/chunks/cli-0.1.11-852v06g0.mjs +2 -0
  105. package/dist/chunks/cli-0.1.11-8qrhqvh5.mjs +2 -0
  106. package/dist/chunks/cli-0.1.11-91mf8dfr.mjs +2 -0
  107. package/dist/chunks/cli-0.1.11-96y2d09c.mjs +2 -0
  108. package/dist/chunks/cli-0.1.11-98zcwng9.mjs +2 -0
  109. package/dist/chunks/cli-0.1.11-anegs86e.mjs +7 -0
  110. package/dist/chunks/cli-0.1.11-anvzywg4.mjs +5 -0
  111. package/dist/chunks/cli-0.1.11-at3c85af.mjs +2 -0
  112. package/dist/chunks/cli-0.1.11-b0jasw23.mjs +9 -0
  113. package/dist/chunks/cli-0.1.11-bbx2h4x9.mjs +2 -0
  114. package/dist/chunks/cli-0.1.11-be28ty4m.mjs +2 -0
  115. package/dist/chunks/cli-0.1.11-bhqwqe2w.mjs +2 -0
  116. package/dist/chunks/cli-0.1.11-bqpcwywz.mjs +4 -0
  117. package/dist/chunks/cli-0.1.11-btayz9zj.mjs +2 -0
  118. package/dist/chunks/cli-0.1.11-bvd2r7an.mjs +252 -0
  119. package/dist/chunks/cli-0.1.11-bwn9ehxv.mjs +2 -0
  120. package/dist/chunks/cli-0.1.11-bwpemkht.mjs +2 -0
  121. package/dist/chunks/cli-0.1.11-cdpswj0n.mjs +2 -0
  122. package/dist/chunks/cli-0.1.11-cezypfbt.mjs +2 -0
  123. package/dist/chunks/cli-0.1.11-cf049e4w.mjs +134 -0
  124. package/dist/chunks/cli-0.1.11-chnrb9xx.mjs +10 -0
  125. package/dist/chunks/cli-0.1.11-ctjvkg5k.mjs +2 -0
  126. package/dist/chunks/cli-0.1.11-cw0ss3jw.mjs +4 -0
  127. package/dist/chunks/cli-0.1.11-cwptjaf7.mjs +12 -0
  128. package/dist/chunks/cli-0.1.11-d10nfa6g.mjs +11 -0
  129. package/dist/chunks/cli-0.1.11-d3exw047.mjs +2 -0
  130. package/dist/chunks/cli-0.1.11-d4ahh3jz.mjs +2 -0
  131. package/dist/chunks/cli-0.1.11-da6szcvw.mjs +2 -0
  132. package/dist/chunks/cli-0.1.11-dcswnc8x.mjs +24 -0
  133. package/dist/chunks/cli-0.1.11-dpfxvfty.mjs +2 -0
  134. package/dist/chunks/cli-0.1.11-e5ecf583.mjs +2 -0
  135. package/dist/chunks/cli-0.1.11-e66dak4h.mjs +4 -0
  136. package/dist/chunks/cli-0.1.11-e7gjxknm.mjs +16 -0
  137. package/dist/chunks/cli-0.1.11-egck69w4.mjs +2 -0
  138. package/dist/chunks/cli-0.1.11-eh7tjdab.mjs +18 -0
  139. package/dist/chunks/cli-0.1.11-ek6mck0j.mjs +2 -0
  140. package/dist/chunks/cli-0.1.11-emw2wfff.mjs +3 -0
  141. package/dist/chunks/cli-0.1.11-fag2wtke.mjs +2 -0
  142. package/dist/chunks/cli-0.1.11-fptq9w4t.mjs +2 -0
  143. package/dist/chunks/cli-0.1.11-fs3d0ajf.mjs +2 -0
  144. package/dist/chunks/cli-0.1.11-fstfs72j.mjs +2 -0
  145. package/dist/chunks/cli-0.1.11-ft47r1wq.mjs +2 -0
  146. package/dist/chunks/cli-0.1.11-fveg0t77.mjs +22 -0
  147. package/dist/chunks/cli-0.1.11-fx6ztxrs.mjs +5 -0
  148. package/dist/chunks/cli-0.1.11-g2202evh.mjs +2 -0
  149. package/dist/chunks/cli-0.1.11-g33qp0jz.mjs +2 -0
  150. package/dist/chunks/cli-0.1.11-gc069ne7.mjs +2 -0
  151. package/dist/chunks/cli-0.1.11-gdcvfp9f.mjs +2 -0
  152. package/dist/chunks/cli-0.1.11-ggrme14p.mjs +2 -0
  153. package/dist/chunks/cli-0.1.11-h02tyg8p.mjs +2 -0
  154. package/dist/chunks/cli-0.1.11-h2hxx8ma.mjs +12 -0
  155. package/dist/chunks/cli-0.1.11-h3jatwe1.mjs +2 -0
  156. package/dist/chunks/cli-0.1.11-h762f6hr.mjs +2 -0
  157. package/dist/chunks/cli-0.1.11-h7e4rkwk.mjs +31 -0
  158. package/dist/chunks/cli-0.1.11-h7phna9g.mjs +2 -0
  159. package/dist/chunks/cli-0.1.11-hgsa4nnp.mjs +2 -0
  160. package/dist/chunks/cli-0.1.11-hhs8ke9g.mjs +2 -0
  161. package/dist/chunks/cli-0.1.11-hmfevmz1.mjs +4 -0
  162. package/dist/chunks/cli-0.1.11-hrn726gf.mjs +2 -0
  163. package/dist/chunks/cli-0.1.11-hzezqkew.mjs +2 -0
  164. package/dist/chunks/cli-0.1.11-jj3s3dxd.mjs +15 -0
  165. package/dist/chunks/cli-0.1.11-jjgjkqqv.mjs +2 -0
  166. package/dist/chunks/cli-0.1.11-jkrt4znb.mjs +11 -0
  167. package/dist/chunks/cli-0.1.11-jne21ka1.mjs +2 -0
  168. package/dist/chunks/cli-0.1.11-jr50ahcv.mjs +3 -0
  169. package/dist/chunks/cli-0.1.11-jye250b3.mjs +2 -0
  170. package/dist/chunks/cli-0.1.11-kghg51gb.mjs +6 -0
  171. package/dist/chunks/cli-0.1.11-kk0qqs5v.mjs +7 -0
  172. package/dist/chunks/cli-0.1.11-kndj4a86.mjs +2 -0
  173. package/dist/chunks/cli-0.1.11-kthpxpj3.mjs +24 -0
  174. package/dist/chunks/cli-0.1.11-ktwtyqmp.mjs +2 -0
  175. package/dist/chunks/cli-0.1.11-m0aaey0g.mjs +4 -0
  176. package/dist/chunks/cli-0.1.11-m1dpnkp0.mjs +2 -0
  177. package/dist/chunks/cli-0.1.11-mj78w4sp.mjs +2 -0
  178. package/dist/chunks/cli-0.1.11-mr356stf.mjs +2 -0
  179. package/dist/chunks/cli-0.1.11-mstxxz33.mjs +2 -0
  180. package/dist/chunks/cli-0.1.11-n23d2wej.mjs +2 -0
  181. package/dist/chunks/cli-0.1.11-n24p2y0p.mjs +2 -0
  182. package/dist/chunks/cli-0.1.11-na9tsy21.mjs +2 -0
  183. package/dist/chunks/cli-0.1.11-nesh7dep.mjs +2 -0
  184. package/dist/chunks/cli-0.1.11-nhjbgc7t.mjs +2 -0
  185. package/dist/chunks/cli-0.1.11-nhwmv5g6.mjs +4 -0
  186. package/dist/chunks/cli-0.1.11-nx8a99hz.mjs +4 -0
  187. package/dist/chunks/cli-0.1.11-p22bdjhv.mjs +2 -0
  188. package/dist/chunks/cli-0.1.11-p4eeg584.mjs +5 -0
  189. package/dist/chunks/cli-0.1.11-pfgwwtw9.mjs +2 -0
  190. package/dist/chunks/cli-0.1.11-pr9jdfxt.mjs +3 -0
  191. package/dist/chunks/cli-0.1.11-q58q9jqr.mjs +2 -0
  192. package/dist/chunks/cli-0.1.11-q89t0xzx.mjs +2 -0
  193. package/dist/chunks/cli-0.1.11-qbcfg80y.mjs +16 -0
  194. package/dist/chunks/cli-0.1.11-qheffjft.mjs +2 -0
  195. package/dist/chunks/cli-0.1.11-qpzn4q17.mjs +15 -0
  196. package/dist/chunks/cli-0.1.11-qrq0sw0h.mjs +2 -0
  197. package/dist/chunks/cli-0.1.11-r990p54m.mjs +100 -0
  198. package/dist/chunks/cli-0.1.11-rj68n2kw.mjs +2 -0
  199. package/dist/chunks/cli-0.1.11-rj9ea3zn.mjs +2 -0
  200. package/dist/chunks/cli-0.1.11-rmyvg4yw.mjs +2 -0
  201. package/dist/chunks/cli-0.1.11-rrnr3ab1.mjs +2 -0
  202. package/dist/chunks/cli-0.1.11-rvk3t45h.mjs +2 -0
  203. package/dist/chunks/cli-0.1.11-s6yfjcm5.mjs +6 -0
  204. package/dist/chunks/cli-0.1.11-s8ygndzf.mjs +5036 -0
  205. package/dist/chunks/cli-0.1.11-sma2xhvv.mjs +2 -0
  206. package/dist/chunks/cli-0.1.11-sqqzwx4h.mjs +132 -0
  207. package/dist/chunks/cli-0.1.11-t07hba0z.mjs +2 -0
  208. package/dist/chunks/cli-0.1.11-t7dc7fbj.mjs +2 -0
  209. package/dist/chunks/cli-0.1.11-ta77hm2b.mjs +2 -0
  210. package/dist/chunks/cli-0.1.11-trcf78n1.mjs +2 -0
  211. package/dist/chunks/cli-0.1.11-tvfkn5mh.mjs +2 -0
  212. package/dist/chunks/cli-0.1.11-v2s8ey1n.mjs +12 -0
  213. package/dist/chunks/cli-0.1.11-v6kwgrqc.mjs +2 -0
  214. package/dist/chunks/cli-0.1.11-v7bwjqf0.mjs +192 -0
  215. package/dist/chunks/cli-0.1.11-v8j5bkfs.mjs +2 -0
  216. package/dist/chunks/cli-0.1.11-vb5f7c3a.mjs +2 -0
  217. package/dist/chunks/cli-0.1.11-vch8cn95.mjs +2 -0
  218. package/dist/chunks/cli-0.1.11-vq5fvf9m.mjs +44 -0
  219. package/dist/chunks/cli-0.1.11-vzet5m4y.mjs +2 -0
  220. package/dist/chunks/cli-0.1.11-w3fp9par.mjs +39 -0
  221. package/dist/chunks/cli-0.1.11-w3trj52p.mjs +21 -0
  222. package/dist/chunks/cli-0.1.11-w3ydpv9v.mjs +2 -0
  223. package/dist/chunks/cli-0.1.11-wc9bay3d.mjs +34 -0
  224. package/dist/chunks/cli-0.1.11-weav8142.mjs +2 -0
  225. package/dist/chunks/cli-0.1.11-wjxhn7j5.mjs +2 -0
  226. package/dist/chunks/cli-0.1.11-x37jysc0.mjs +14 -0
  227. package/dist/chunks/cli-0.1.11-x5nvafch.mjs +2 -0
  228. package/dist/chunks/cli-0.1.11-xhrk5hr0.mjs +2 -0
  229. package/dist/chunks/cli-0.1.11-xp93fxnp.mjs +2 -0
  230. package/dist/chunks/cli-0.1.11-xwj7cmkj.mjs +2 -0
  231. package/dist/chunks/cli-0.1.11-y4c6y87y.mjs +2 -0
  232. package/dist/chunks/cli-0.1.11-y909w8bb.mjs +2 -0
  233. package/dist/chunks/cli-0.1.11-yd6f29v2.mjs +2 -0
  234. package/dist/chunks/cli-0.1.11-yhk2y3c0.mjs +2 -0
  235. package/dist/chunks/cli-0.1.11-yrfxpjhr.mjs +2 -0
  236. package/dist/chunks/cli-0.1.11-yv5pfq6n.mjs +2 -0
  237. package/dist/chunks/cli-0.1.11-yvnhbsfn.mjs +3 -0
  238. package/dist/chunks/cli-0.1.11-z0thk4h0.mjs +2 -0
  239. package/dist/chunks/cli-0.1.11-z4hb2mcd.mjs +2 -0
  240. package/dist/chunks/cli-0.1.11-z62s8qx1.mjs +2 -0
  241. package/dist/chunks/cli-0.1.11-zb2sa3e2.mjs +13 -0
  242. package/dist/chunks/cli-0.1.11-zdyddegg.mjs +2 -0
  243. package/dist/chunks/cli-0.1.11-zfnmx1ny.mjs +2 -0
  244. package/dist/chunks/cli-0.1.11-zwkjaj0d.mjs +2 -0
  245. package/dist/chunks/client-0.1.11-h38k7vkj.mjs +1 -0
  246. package/dist/chunks/color-0.1.11-b7favzc8.mjs +1 -0
  247. package/dist/chunks/compact-0.1.11-damm234b.mjs +3 -0
  248. package/dist/chunks/config-0.1.11-bb6v0pwv.mjs +1 -0
  249. package/dist/chunks/config-0.1.11-cqy7fnab.mjs +1 -0
  250. package/dist/chunks/context-0.1.11-e2s56h3b.mjs +1 -0
  251. package/dist/chunks/context-noninteractive-0.1.11-s6b9q91h.mjs +1 -0
  252. package/dist/chunks/conversation-0.1.11-d8ejy4b9.mjs +1 -0
  253. package/dist/chunks/copy-0.1.11-aq32vn1b.mjs +9 -0
  254. package/dist/chunks/cost-0.1.11-3z9y6a5a.mjs +1 -0
  255. package/dist/chunks/createSession-0.1.11-rgaw7n2v.mjs +1 -0
  256. package/dist/chunks/desktop-0.1.11-k8ac4bfx.mjs +1 -0
  257. package/dist/chunks/detectRepository-0.1.11-m3chgqa1.mjs +1 -0
  258. package/dist/chunks/detection-0.1.11-aa9k5rxv.mjs +1 -0
  259. package/dist/chunks/devtools-0.1.11-fkz4akhx.mjs +1 -0
  260. package/dist/chunks/diff-0.1.11-tcqh42f6.mjs +1 -0
  261. package/dist/chunks/doctor-0.1.11-6fwwz8hp.mjs +1 -0
  262. package/dist/chunks/earlyInput-0.1.11-94asnfvh.mjs +1 -0
  263. package/dist/chunks/effort-0.1.11-zcxskzrb.mjs +8 -0
  264. package/dist/chunks/environmentSelection-0.1.11-6ngvrt1m.mjs +1 -0
  265. package/dist/chunks/environments-0.1.11-pdsv6dgq.mjs +1 -0
  266. package/dist/chunks/exit-0.1.11-2jab9tfm.mjs +1 -0
  267. package/dist/chunks/export-0.1.11-wv5bd05w.mjs +2 -0
  268. package/dist/chunks/extra-usage-0.1.11-f5rm0265.mjs +1 -0
  269. package/dist/chunks/extra-usage-noninteractive-0.1.11-dt7znwbn.mjs +1 -0
  270. package/dist/chunks/fast-0.1.11-a665n9kz.mjs +1 -0
  271. package/dist/chunks/feedback-0.1.11-q77qty87.mjs +14 -0
  272. package/dist/chunks/firstPartyEventLogger-0.1.11-y7qkhdj6.mjs +1 -0
  273. package/dist/chunks/git-0.1.11-g77ppr52.mjs +1 -0
  274. package/dist/chunks/githubModelsCredentials-0.1.11-9vhs3xqj.mjs +1 -0
  275. package/dist/chunks/growthbook-0.1.11-2w2b1mzd.mjs +1 -0
  276. package/dist/chunks/heapdump-0.1.11-b216wzt7.mjs +6 -0
  277. package/dist/chunks/help-0.1.11-byp88gen.mjs +1 -0
  278. package/dist/chunks/hookChains-0.1.11-jp8f82q7.mjs +3 -0
  279. package/dist/chunks/hooks-0.1.11-v9jan2ss.mjs +1 -0
  280. package/dist/chunks/hooks-0.1.11-vf6vcsgg.mjs +79 -0
  281. package/dist/chunks/ide-0.1.11-7nxbd03r.mjs +3 -0
  282. package/dist/chunks/image-processor-napi-0.1.11-dpg3ygnw.mjs +1 -0
  283. package/dist/chunks/index-0.1.11-3dfjfmc6.mjs +1 -0
  284. package/dist/chunks/index-0.1.11-82wnmfq3.mjs +9 -0
  285. package/dist/chunks/index-0.1.11-8gtaa17w.mjs +1 -0
  286. package/dist/chunks/index-0.1.11-ajdpkanw.mjs +1 -0
  287. package/dist/chunks/index-0.1.11-b2q967nq.mjs +30 -0
  288. package/dist/chunks/index-0.1.11-bhrstsgc.mjs +1 -0
  289. package/dist/chunks/index-0.1.11-d6qbzwah.mjs +1 -0
  290. package/dist/chunks/index-0.1.11-d9ft1b0s.mjs +1 -0
  291. package/dist/chunks/index-0.1.11-e52dzxjz.mjs +5 -0
  292. package/dist/chunks/index-0.1.11-gb3saayk.mjs +2 -0
  293. package/dist/chunks/index-0.1.11-kksxmkwe.mjs +1 -0
  294. package/dist/chunks/index-0.1.11-n564rmwy.mjs +1 -0
  295. package/dist/chunks/index-0.1.11-n90nxjqp.mjs +1 -0
  296. package/dist/chunks/index-0.1.11-p0j3w83p.mjs +1 -0
  297. package/dist/chunks/index-0.1.11-pmkgntay.mjs +7 -0
  298. package/dist/chunks/index-0.1.11-qspcw49p.mjs +1 -0
  299. package/dist/chunks/index-0.1.11-r6p77pf7.mjs +1 -0
  300. package/dist/chunks/index-0.1.11-s0w8xy7q.mjs +9 -0
  301. package/dist/chunks/index-0.1.11-wbhj1ny7.mjs +1 -0
  302. package/dist/chunks/index-0.1.11-wze82293.mjs +1 -0
  303. package/dist/chunks/index-0.1.11-xs4mng75.mjs +1 -0
  304. package/dist/chunks/index-0.1.11-yej3awws.mjs +2 -0
  305. package/dist/chunks/initReplBridge-0.1.11-71963wyw.mjs +1 -0
  306. package/dist/chunks/ink-0.1.11-tzp2q9bd.mjs +1 -0
  307. package/dist/chunks/insights-0.1.11-4yjg2bxs.mjs +870 -0
  308. package/dist/chunks/install-0.1.11-4zfvr6pk.mjs +1 -0
  309. package/dist/chunks/install-github-app-0.1.11-frqzdwsz.mjs +149 -0
  310. package/dist/chunks/install-slack-app-0.1.11-0yyjjvrw.mjs +1 -0
  311. package/dist/chunks/instrumentation-0.1.11-zyp2r390.mjs +12 -0
  312. package/dist/chunks/interactiveHelpers-0.1.11-chnsxp26.mjs +1 -0
  313. package/dist/chunks/keybindings-0.1.11-r2jke9h5.mjs +2 -0
  314. package/dist/chunks/knowledge-0.1.11-wpjw8ybd.mjs +2 -0
  315. package/dist/chunks/loadAgentsDir-0.1.11-bwymseqa.mjs +1 -0
  316. package/dist/chunks/loadPluginHooks-0.1.11-npf49gc4.mjs +1 -0
  317. package/dist/chunks/logout-0.1.11-48ynp610.mjs +1 -0
  318. package/dist/chunks/lsp-0.1.11-e4z6m5t5.mjs +1 -0
  319. package/dist/chunks/main-0.1.11-6sh6xycv.mjs +1 -0
  320. package/dist/chunks/managedEnv-0.1.11-6bnnpsm0.mjs +1 -0
  321. package/dist/chunks/mcp-0.1.11-vjjx8eer.mjs +17 -0
  322. package/dist/chunks/mcp-0.1.11-zf74a6am.mjs +4 -0
  323. package/dist/chunks/mcp-0.1.11-zw22jjqc.mjs +1 -0
  324. package/dist/chunks/mcpServer-0.1.11-czg51mvy.mjs +1 -0
  325. package/dist/chunks/mcpb-0.1.11-czkze48a.mjs +1 -0
  326. package/dist/chunks/memory-0.1.11-k7y98zqn.mjs +3 -0
  327. package/dist/chunks/mobile-0.1.11-2w5py2cb.mjs +2 -0
  328. package/dist/chunks/model-0.1.11-4v166f98.mjs +2 -0
  329. package/dist/chunks/model-0.1.11-qekc9c4w.mjs +1 -0
  330. package/dist/chunks/oauth-0.1.11-jkkd9wzq.mjs +1 -0
  331. package/dist/chunks/openaiShim-0.1.11-b9yqnc9c.mjs +14 -0
  332. package/dist/chunks/output-style-0.1.11-zwxn1knb.mjs +1 -0
  333. package/dist/chunks/package-HMBVQOZ4-0.1.11-n77wqhxr.mjs +1 -0
  334. package/dist/chunks/parser-0.1.11-vvhz2p5h.mjs +1 -0
  335. package/dist/chunks/passes-0.1.11-dgshr9c4.mjs +1 -0
  336. package/dist/chunks/permissions-0.1.11-71fn7rsk.mjs +3 -0
  337. package/dist/chunks/plan-0.1.11-1xyzxjgr.mjs +1 -0
  338. package/dist/chunks/plist-0.1.11-0sn6nqv3.mjs +1 -0
  339. package/dist/chunks/plugin-0.1.11-menj210d.mjs +29 -0
  340. package/dist/chunks/pluginStartupCheck-0.1.11-ytjn1kxg.mjs +1 -0
  341. package/dist/chunks/plugins-0.1.11-t3pgcpcj.mjs +9 -0
  342. package/dist/chunks/print-0.1.11-y9vz77h9.mjs +57 -0
  343. package/dist/chunks/privacy-settings-0.1.11-3ah0v02p.mjs +1 -0
  344. package/dist/chunks/process-0.1.11-s6jnx5xw.mjs +1 -0
  345. package/dist/chunks/processBashCommand-0.1.11-txp79ekj.mjs +1 -0
  346. package/dist/chunks/processSlashCommand-0.1.11-fdvs7etd.mjs +9 -0
  347. package/dist/chunks/prompt-0.1.11-4f7rsvd2.mjs +1 -0
  348. package/dist/chunks/prompt-0.1.11-bzkv3rsd.mjs +1 -0
  349. package/dist/chunks/prompts-0.1.11-xczb1nwa.mjs +1 -0
  350. package/dist/chunks/provider-0.1.11-cqeqqqbt.mjs +2 -0
  351. package/dist/chunks/providerProfiles-0.1.11-ewn8w0f1.mjs +1 -0
  352. package/dist/chunks/rate-limit-options-0.1.11-6bca3g5n.mjs +1 -0
  353. package/dist/chunks/registry-0.1.11-wjnpx9yf.mjs +1 -0
  354. package/dist/chunks/release-notes-0.1.11-dhe37z3c.mjs +5 -0
  355. package/dist/chunks/reload-plugins-0.1.11-gzep3pg3.mjs +2 -0
  356. package/dist/chunks/remote-env-0.1.11-yday97nq.mjs +1 -0
  357. package/dist/chunks/remoteBridgeCore-0.1.11-hn821p07.mjs +1 -0
  358. package/dist/chunks/remoteSession-0.1.11-g3h440pv.mjs +1 -0
  359. package/dist/chunks/rename-0.1.11-ke9btph2.mjs +1 -0
  360. package/dist/chunks/replBridgeHandle-0.1.11-t5njc196.mjs +1 -0
  361. package/dist/chunks/resume-0.1.11-d4bbgty9.mjs +2 -0
  362. package/dist/chunks/rewind-0.1.11-t4mfk815.mjs +1 -0
  363. package/dist/chunks/sandbox-adapter-0.1.11-3czn1nws.mjs +1 -0
  364. package/dist/chunks/sandbox-toggle-0.1.11-qxv2w9n1.mjs +1 -0
  365. package/dist/chunks/session-0.1.11-2z972raf.mjs +2 -0
  366. package/dist/chunks/sessionFileAccessHooks-0.1.11-f3exnspr.mjs +1 -0
  367. package/dist/chunks/sessionStorage-0.1.11-aa2ftdjn.mjs +1 -0
  368. package/dist/chunks/setup-0.1.11-epmpszzf.mjs +5 -0
  369. package/dist/chunks/sinks-0.1.11-q3zcj5me.mjs +1 -0
  370. package/dist/chunks/skills-0.1.11-9xbyp1p5.mjs +1 -0
  371. package/dist/chunks/startupProfiler-0.1.11-5s07826j.mjs +1 -0
  372. package/dist/chunks/state-0.1.11-3fjxywyv.mjs +1 -0
  373. package/dist/chunks/stats-0.1.11-hxzms6gg.mjs +6 -0
  374. package/dist/chunks/status-0.1.11-drvp15n8.mjs +1 -0
  375. package/dist/chunks/stickers-0.1.11-44f4tawn.mjs +1 -0
  376. package/dist/chunks/subprocessEnv-0.1.11-5w00fpez.mjs +1 -0
  377. package/dist/chunks/tasks-0.1.11-dn8h18fk.mjs +1 -0
  378. package/dist/chunks/teamHelpers-0.1.11-ca7kref8.mjs +1 -0
  379. package/dist/chunks/teammateModeSnapshot-0.1.11-an88rdgv.mjs +1 -0
  380. package/dist/chunks/teleport-0.1.11-8e3k0ex6.mjs +1 -0
  381. package/dist/chunks/terminalSetup-0.1.11-gtdwp0an.mjs +1 -0
  382. package/dist/chunks/theme-0.1.11-p447kczd.mjs +1 -0
  383. package/dist/chunks/thinkback-0.1.11-3f1xvkt5.mjs +1 -0
  384. package/dist/chunks/thinkback-play-0.1.11-0ax4h089.mjs +1 -0
  385. package/dist/chunks/toolPool-0.1.11-xrywy61j.mjs +1 -0
  386. package/dist/chunks/toolSearch-0.1.11-7yjvjxhp.mjs +1 -0
  387. package/dist/chunks/trustedDevice-0.1.11-070f1wch.mjs +1 -0
  388. package/dist/chunks/turndown.cjs-0.1.11-brwqmyse.mjs +69 -0
  389. package/dist/chunks/ultrareviewCommand-0.1.11-0m9b3kr5.mjs +4 -0
  390. package/dist/chunks/update-0.1.11-p33kxpg4.mjs +94 -0
  391. package/dist/chunks/upgrade-0.1.11-1aj14cqt.mjs +1 -0
  392. package/dist/chunks/upstreamproxy-0.1.11-vk16qw88.mjs +14 -0
  393. package/dist/chunks/usage-0.1.11-hch4v5jb.mjs +1 -0
  394. package/dist/chunks/util-0.1.11-sjkxad5k.mjs +1 -0
  395. package/dist/chunks/utils-0.1.11-2bk8zn4g.mjs +1 -0
  396. package/dist/chunks/vim-0.1.11-v1rz1d56.mjs +1 -0
  397. package/dist/chunks/watcher-0.1.11-v8mkv1xy.mjs +1 -0
  398. package/dist/chunks/wiki-0.1.11-v0twhcnn.mjs +132 -0
  399. package/dist/chunks/worktree-0.1.11-d7chpamf.mjs +1 -0
  400. package/dist/chunks/worktreeModeEnabled-0.1.11-tsxv6h6g.mjs +1 -0
  401. package/dist/chunks/wrapper-0.1.11-rt9xsnjh.mjs +7 -0
  402. package/dist/claudio-vscode.vsix +0 -0
  403. package/dist/cli.mjs +3 -3
  404. package/package.json +1 -1
  405. package/dist/chunks/AgentTool-0.1.10-6d1adwh4.mjs +0 -1
  406. package/dist/chunks/App-0.1.10-kcqgpy9v.mjs +0 -1
  407. package/dist/chunks/ApproveApiKey-0.1.10-276swzgm.mjs +0 -1
  408. package/dist/chunks/AssistantSessionChooser-0.1.10-zy1wpm5p.mjs +0 -1
  409. package/dist/chunks/AutoModeOptInDialog-0.1.10-wm40g3s8.mjs +0 -1
  410. package/dist/chunks/BypassPermissionsModeDialog-0.1.10-s6979mex.mjs +0 -1
  411. package/dist/chunks/ClaudeInChromeOnboarding-0.1.10-r7fr5krr.mjs +0 -1
  412. package/dist/chunks/ClaudeMdExternalIncludesDialog-0.1.10-r34sxess.mjs +0 -1
  413. package/dist/chunks/ConsoleOAuthFlow-0.1.10-fkrt161g.mjs +0 -1
  414. package/dist/chunks/DiffDialog-0.1.10-z3c417rj.mjs +0 -3
  415. package/dist/chunks/Doctor-0.1.10-hzxpkma0.mjs +0 -1
  416. package/dist/chunks/Grove-0.1.10-k7t0bk1q.mjs +0 -1
  417. package/dist/chunks/ITermBackend-0.1.10-9nmcsqzc.mjs +0 -1
  418. package/dist/chunks/InProcessTransport-0.1.10-wpgrvt4k.mjs +0 -1
  419. package/dist/chunks/InvalidConfigDialog-0.1.10-1yxptsrm.mjs +0 -1
  420. package/dist/chunks/InvalidSettingsDialog-0.1.10-2dx3wzpc.mjs +0 -1
  421. package/dist/chunks/MigrationDialog-0.1.10-52vcfe6j.mjs +0 -1
  422. package/dist/chunks/Onboarding-0.1.10-sshvgxhv.mjs +0 -1
  423. package/dist/chunks/ProviderManager-0.1.10-gk479qf3.mjs +0 -1
  424. package/dist/chunks/REPL-0.1.10-pzwdjhkc.mjs +0 -1
  425. package/dist/chunks/ResumeConversation-0.1.10-h4qtmeht.mjs +0 -1
  426. package/dist/chunks/SnapshotUpdateDialog-0.1.10-7pnzpe15.mjs +0 -1
  427. package/dist/chunks/TeleportProgress-0.1.10-pna8cvtz.mjs +0 -1
  428. package/dist/chunks/TeleportRepoMismatchDialog-0.1.10-qgt41j05.mjs +0 -1
  429. package/dist/chunks/TeleportResumeWrapper-0.1.10-yhws2rqe.mjs +0 -1
  430. package/dist/chunks/TmuxBackend-0.1.10-235npnf1.mjs +0 -9
  431. package/dist/chunks/ToolSearchTool-0.1.10-9dwz8tfs.mjs +0 -1
  432. package/dist/chunks/TrustDialog-0.1.10-j46d8gme.mjs +0 -1
  433. package/dist/chunks/activeProvider-0.1.10-mc05hsn1.mjs +0 -1
  434. package/dist/chunks/add-dir-0.1.10-67yt41qd.mjs +0 -1
  435. package/dist/chunks/agents-0.1.10-c6k1gjp7.mjs +0 -3
  436. package/dist/chunks/agents-0.1.10-ezzxfn1m.mjs +0 -111
  437. package/dist/chunks/api-0.1.10-712k136n.mjs +0 -1
  438. package/dist/chunks/asciicast-0.1.10-p5232pbe.mjs +0 -1
  439. package/dist/chunks/assistant-0.1.10-ghtz2fm5.mjs +0 -1
  440. package/dist/chunks/auth-0.1.10-ec2e3mg3.mjs +0 -1
  441. package/dist/chunks/auth-0.1.10-pnnxbpmz.mjs +0 -1
  442. package/dist/chunks/autoMode-0.1.10-en4g4zp3.mjs +0 -48
  443. package/dist/chunks/backgroundHousekeeping-0.1.10-w42bm2y9.mjs +0 -1
  444. package/dist/chunks/branch-0.1.10-z00acm0q.mjs +0 -4
  445. package/dist/chunks/bridgePointer-0.1.10-0fpe1aqp.mjs +0 -1
  446. package/dist/chunks/btw-0.1.10-zz9v05r2.mjs +0 -1
  447. package/dist/chunks/buddy-0.1.10-g62mmn7n.mjs +0 -3
  448. package/dist/chunks/cacache-0.1.10-jdqat7je.mjs +0 -1
  449. package/dist/chunks/cache-probe-0.1.10-m5je5wda.mjs +0 -21
  450. package/dist/chunks/cacheStats-0.1.10-h3wmx4ck.mjs +0 -4
  451. package/dist/chunks/caches-0.1.10-gfv0fw3r.mjs +0 -1
  452. package/dist/chunks/chrome-0.1.10-vn58ms2z.mjs +0 -1
  453. package/dist/chunks/chromeNativeHost-0.1.10-1546eayv.mjs +0 -2
  454. package/dist/chunks/claude-for-chrome-mcp-0.1.10-4pjczkdy.mjs +0 -1
  455. package/dist/chunks/claudeDesktop-0.1.10-gxr4sfek.mjs +0 -1
  456. package/dist/chunks/claudemd-0.1.10-fxjaqw0j.mjs +0 -1
  457. package/dist/chunks/clear-0.1.10-7a42j19v.mjs +0 -1
  458. package/dist/chunks/clearTerminal-0.1.10-vb1ec5bk.mjs +0 -1
  459. package/dist/chunks/cli-0.1.10-0n4bjm9z.mjs +0 -3
  460. package/dist/chunks/cli-0.1.10-0zwk2w6t.mjs +0 -3
  461. package/dist/chunks/cli-0.1.10-17f08ra3.mjs +0 -2
  462. package/dist/chunks/cli-0.1.10-19jdke0x.mjs +0 -2
  463. package/dist/chunks/cli-0.1.10-1faf50d6.mjs +0 -2
  464. package/dist/chunks/cli-0.1.10-1remt68x.mjs +0 -2
  465. package/dist/chunks/cli-0.1.10-1zgq248j.mjs +0 -2
  466. package/dist/chunks/cli-0.1.10-227xyew7.mjs +0 -2
  467. package/dist/chunks/cli-0.1.10-283zk2ee.mjs +0 -2
  468. package/dist/chunks/cli-0.1.10-28zx3btb.mjs +0 -14
  469. package/dist/chunks/cli-0.1.10-2a49sq4g.mjs +0 -2
  470. package/dist/chunks/cli-0.1.10-2ahvbvra.mjs +0 -2
  471. package/dist/chunks/cli-0.1.10-2gmmnep8.mjs +0 -2
  472. package/dist/chunks/cli-0.1.10-2k83cndj.mjs +0 -2
  473. package/dist/chunks/cli-0.1.10-2mqddc7q.mjs +0 -31
  474. package/dist/chunks/cli-0.1.10-2tygs780.mjs +0 -2
  475. package/dist/chunks/cli-0.1.10-3chjvgrj.mjs +0 -2
  476. package/dist/chunks/cli-0.1.10-3d0w3dmn.mjs +0 -12
  477. package/dist/chunks/cli-0.1.10-3q43p3wr.mjs +0 -11
  478. package/dist/chunks/cli-0.1.10-3s7cftaq.mjs +0 -39
  479. package/dist/chunks/cli-0.1.10-3zkqq9sp.mjs +0 -2
  480. package/dist/chunks/cli-0.1.10-4a42q38j.mjs +0 -2
  481. package/dist/chunks/cli-0.1.10-4c5p0gjr.mjs +0 -3
  482. package/dist/chunks/cli-0.1.10-4jsc4zm5.mjs +0 -2
  483. package/dist/chunks/cli-0.1.10-4md6sg2a.mjs +0 -2
  484. package/dist/chunks/cli-0.1.10-4n8p34vn.mjs +0 -2
  485. package/dist/chunks/cli-0.1.10-4n8rvtk0.mjs +0 -2
  486. package/dist/chunks/cli-0.1.10-4nrdrp9t.mjs +0 -21
  487. package/dist/chunks/cli-0.1.10-4q7m47pn.mjs +0 -3
  488. package/dist/chunks/cli-0.1.10-4vnky3f9.mjs +0 -3
  489. package/dist/chunks/cli-0.1.10-594z8zdp.mjs +0 -2
  490. package/dist/chunks/cli-0.1.10-5jnkne9q.mjs +0 -2
  491. package/dist/chunks/cli-0.1.10-5kg4wpz2.mjs +0 -2
  492. package/dist/chunks/cli-0.1.10-5tyyhz34.mjs +0 -833
  493. package/dist/chunks/cli-0.1.10-63qeecn7.mjs +0 -24
  494. package/dist/chunks/cli-0.1.10-6bn5q3gp.mjs +0 -2
  495. package/dist/chunks/cli-0.1.10-6f66h3s0.mjs +0 -2
  496. package/dist/chunks/cli-0.1.10-6g6ga1zd.mjs +0 -2
  497. package/dist/chunks/cli-0.1.10-6p8tttyp.mjs +0 -2
  498. package/dist/chunks/cli-0.1.10-6wf59qza.mjs +0 -58
  499. package/dist/chunks/cli-0.1.10-72ece2yk.mjs +0 -2
  500. package/dist/chunks/cli-0.1.10-73y7xdxy.mjs +0 -2
  501. package/dist/chunks/cli-0.1.10-7691mckr.mjs +0 -2
  502. package/dist/chunks/cli-0.1.10-77zcax57.mjs +0 -2
  503. package/dist/chunks/cli-0.1.10-7d7j1qyf.mjs +0 -2
  504. package/dist/chunks/cli-0.1.10-7ngfsh9h.mjs +0 -4
  505. package/dist/chunks/cli-0.1.10-7v1vvde4.mjs +0 -8
  506. package/dist/chunks/cli-0.1.10-7ydarbm4.mjs +0 -2
  507. package/dist/chunks/cli-0.1.10-8dyffagh.mjs +0 -2
  508. package/dist/chunks/cli-0.1.10-91tna7ay.mjs +0 -2
  509. package/dist/chunks/cli-0.1.10-977j0ey2.mjs +0 -2
  510. package/dist/chunks/cli-0.1.10-97rwbawt.mjs +0 -2
  511. package/dist/chunks/cli-0.1.10-9dfywk37.mjs +0 -2
  512. package/dist/chunks/cli-0.1.10-9rh1hjrr.mjs +0 -16
  513. package/dist/chunks/cli-0.1.10-9ybfn3a4.mjs +0 -50
  514. package/dist/chunks/cli-0.1.10-9zjhrr6j.mjs +0 -2
  515. package/dist/chunks/cli-0.1.10-a4p945wp.mjs +0 -2
  516. package/dist/chunks/cli-0.1.10-a53q2hat.mjs +0 -2
  517. package/dist/chunks/cli-0.1.10-a6j6www8.mjs +0 -10
  518. package/dist/chunks/cli-0.1.10-acy8ec7t.mjs +0 -2
  519. package/dist/chunks/cli-0.1.10-akaq0zte.mjs +0 -2
  520. package/dist/chunks/cli-0.1.10-aw4xkrf7.mjs +0 -2
  521. package/dist/chunks/cli-0.1.10-b59j6twr.mjs +0 -2
  522. package/dist/chunks/cli-0.1.10-be8dvtg8.mjs +0 -2
  523. package/dist/chunks/cli-0.1.10-bfw7yx17.mjs +0 -2
  524. package/dist/chunks/cli-0.1.10-bgxwxmv1.mjs +0 -2
  525. package/dist/chunks/cli-0.1.10-bqsa7eam.mjs +0 -2
  526. package/dist/chunks/cli-0.1.10-brfs5rdm.mjs +0 -4
  527. package/dist/chunks/cli-0.1.10-bw6411be.mjs +0 -3
  528. package/dist/chunks/cli-0.1.10-bxbkeycj.mjs +0 -4
  529. package/dist/chunks/cli-0.1.10-c7bkm855.mjs +0 -4
  530. package/dist/chunks/cli-0.1.10-cd9k16mb.mjs +0 -2
  531. package/dist/chunks/cli-0.1.10-ckb6d1wg.mjs +0 -5
  532. package/dist/chunks/cli-0.1.10-cp1bprrv.mjs +0 -2
  533. package/dist/chunks/cli-0.1.10-crwvcrfq.mjs +0 -2
  534. package/dist/chunks/cli-0.1.10-d48qgcag.mjs +0 -2
  535. package/dist/chunks/cli-0.1.10-d70y9y7x.mjs +0 -2
  536. package/dist/chunks/cli-0.1.10-dh7by4rw.mjs +0 -2
  537. package/dist/chunks/cli-0.1.10-dx1a4dz7.mjs +0 -2
  538. package/dist/chunks/cli-0.1.10-dx92txwb.mjs +0 -13
  539. package/dist/chunks/cli-0.1.10-e0ftjytk.mjs +0 -2
  540. package/dist/chunks/cli-0.1.10-e4qewc1p.mjs +0 -44
  541. package/dist/chunks/cli-0.1.10-e64kvn2p.mjs +0 -2
  542. package/dist/chunks/cli-0.1.10-eh248dzz.mjs +0 -15
  543. package/dist/chunks/cli-0.1.10-ejtn8grm.mjs +0 -2
  544. package/dist/chunks/cli-0.1.10-er8zk2kj.mjs +0 -2
  545. package/dist/chunks/cli-0.1.10-f1nw74m1.mjs +0 -2
  546. package/dist/chunks/cli-0.1.10-f2jh6yv0.mjs +0 -2
  547. package/dist/chunks/cli-0.1.10-f38gq0e0.mjs +0 -2
  548. package/dist/chunks/cli-0.1.10-f7wg8ttz.mjs +0 -2
  549. package/dist/chunks/cli-0.1.10-fay16q4v.mjs +0 -2
  550. package/dist/chunks/cli-0.1.10-fcarec7s.mjs +0 -2
  551. package/dist/chunks/cli-0.1.10-fh4zzwzq.mjs +0 -5
  552. package/dist/chunks/cli-0.1.10-fhvyzg2m.mjs +0 -2
  553. package/dist/chunks/cli-0.1.10-frs4kmth.mjs +0 -2
  554. package/dist/chunks/cli-0.1.10-g6rx9rdb.mjs +0 -132
  555. package/dist/chunks/cli-0.1.10-gccb3gw8.mjs +0 -4
  556. package/dist/chunks/cli-0.1.10-gdqbhzyr.mjs +0 -100
  557. package/dist/chunks/cli-0.1.10-gms4557v.mjs +0 -252
  558. package/dist/chunks/cli-0.1.10-gnds07ck.mjs +0 -2
  559. package/dist/chunks/cli-0.1.10-h7dsgrnw.mjs +0 -2
  560. package/dist/chunks/cli-0.1.10-h7egg5xp.mjs +0 -2
  561. package/dist/chunks/cli-0.1.10-hbk3dhq8.mjs +0 -24
  562. package/dist/chunks/cli-0.1.10-hpa8eyg4.mjs +0 -2
  563. package/dist/chunks/cli-0.1.10-hpg8gdm2.mjs +0 -2
  564. package/dist/chunks/cli-0.1.10-hrjh10v7.mjs +0 -2
  565. package/dist/chunks/cli-0.1.10-hwk5cfdc.mjs +0 -2
  566. package/dist/chunks/cli-0.1.10-hyxg32sc.mjs +0 -2
  567. package/dist/chunks/cli-0.1.10-jb7jbbms.mjs +0 -2
  568. package/dist/chunks/cli-0.1.10-jjdvb4je.mjs +0 -2
  569. package/dist/chunks/cli-0.1.10-js33z9dt.mjs +0 -2
  570. package/dist/chunks/cli-0.1.10-jy0nmcmp.mjs +0 -2
  571. package/dist/chunks/cli-0.1.10-jy7ds572.mjs +0 -2
  572. package/dist/chunks/cli-0.1.10-kdqsv63d.mjs +0 -3
  573. package/dist/chunks/cli-0.1.10-knbxee8j.mjs +0 -2
  574. package/dist/chunks/cli-0.1.10-kp2t4r8z.mjs +0 -2
  575. package/dist/chunks/cli-0.1.10-me1f9fvm.mjs +0 -2
  576. package/dist/chunks/cli-0.1.10-mjy2g3ce.mjs +0 -7
  577. package/dist/chunks/cli-0.1.10-mqgz2v10.mjs +0 -2
  578. package/dist/chunks/cli-0.1.10-mt4jf92z.mjs +0 -2
  579. package/dist/chunks/cli-0.1.10-mt6tj76h.mjs +0 -192
  580. package/dist/chunks/cli-0.1.10-mv1psn5z.mjs +0 -15
  581. package/dist/chunks/cli-0.1.10-n0kq1anb.mjs +0 -22
  582. package/dist/chunks/cli-0.1.10-nfnje7ew.mjs +0 -34
  583. package/dist/chunks/cli-0.1.10-nh3yfpyp.mjs +0 -2
  584. package/dist/chunks/cli-0.1.10-npkfteg7.mjs +0 -2
  585. package/dist/chunks/cli-0.1.10-nzvv74kz.mjs +0 -2
  586. package/dist/chunks/cli-0.1.10-nzxw7p2m.mjs +0 -4
  587. package/dist/chunks/cli-0.1.10-p42gvsdg.mjs +0 -2
  588. package/dist/chunks/cli-0.1.10-p4a151rw.mjs +0 -2
  589. package/dist/chunks/cli-0.1.10-p5wpvhbv.mjs +0 -2
  590. package/dist/chunks/cli-0.1.10-pagxn9ep.mjs +0 -2
  591. package/dist/chunks/cli-0.1.10-pw67rrjr.mjs +0 -2
  592. package/dist/chunks/cli-0.1.10-qez6cjt8.mjs +0 -2
  593. package/dist/chunks/cli-0.1.10-qf6ps98q.mjs +0 -2
  594. package/dist/chunks/cli-0.1.10-qhh8pa5t.mjs +0 -2
  595. package/dist/chunks/cli-0.1.10-qkv7g58s.mjs +0 -2
  596. package/dist/chunks/cli-0.1.10-qtq4gx83.mjs +0 -3
  597. package/dist/chunks/cli-0.1.10-qw2c8g14.mjs +0 -2
  598. package/dist/chunks/cli-0.1.10-qw7kdg27.mjs +0 -2
  599. package/dist/chunks/cli-0.1.10-rgtrj3k8.mjs +0 -2
  600. package/dist/chunks/cli-0.1.10-rjz4ymc4.mjs +0 -2
  601. package/dist/chunks/cli-0.1.10-rnwbgj0h.mjs +0 -134
  602. package/dist/chunks/cli-0.1.10-rpyv9ekb.mjs +0 -45
  603. package/dist/chunks/cli-0.1.10-rr3xpxx1.mjs +0 -2
  604. package/dist/chunks/cli-0.1.10-rvb440sp.mjs +0 -2
  605. package/dist/chunks/cli-0.1.10-s3x3vzah.mjs +0 -2
  606. package/dist/chunks/cli-0.1.10-s4x77tm0.mjs +0 -2
  607. package/dist/chunks/cli-0.1.10-s6jxst02.mjs +0 -2
  608. package/dist/chunks/cli-0.1.10-s7s5bgrq.mjs +0 -11
  609. package/dist/chunks/cli-0.1.10-s7zk0vc8.mjs +0 -18
  610. package/dist/chunks/cli-0.1.10-sab6x266.mjs +0 -2
  611. package/dist/chunks/cli-0.1.10-seekz53q.mjs +0 -2
  612. package/dist/chunks/cli-0.1.10-sre7cbsg.mjs +0 -2
  613. package/dist/chunks/cli-0.1.10-szz5tkt1.mjs +0 -4
  614. package/dist/chunks/cli-0.1.10-t0v9d184.mjs +0 -2
  615. package/dist/chunks/cli-0.1.10-t1zd86kd.mjs +0 -2
  616. package/dist/chunks/cli-0.1.10-t8rnwwhq.mjs +0 -2
  617. package/dist/chunks/cli-0.1.10-ta048zme.mjs +0 -3
  618. package/dist/chunks/cli-0.1.10-v0vhyf3h.mjs +0 -4
  619. package/dist/chunks/cli-0.1.10-v385rk98.mjs +0 -2
  620. package/dist/chunks/cli-0.1.10-v582vfad.mjs +0 -2
  621. package/dist/chunks/cli-0.1.10-v6gq9bxc.mjs +0 -7
  622. package/dist/chunks/cli-0.1.10-vrd90nhd.mjs +0 -16
  623. package/dist/chunks/cli-0.1.10-w1hqcxj1.mjs +0 -2
  624. package/dist/chunks/cli-0.1.10-w8np72sh.mjs +0 -2
  625. package/dist/chunks/cli-0.1.10-wajz23ff.mjs +0 -2
  626. package/dist/chunks/cli-0.1.10-wjmtd9vm.mjs +0 -6
  627. package/dist/chunks/cli-0.1.10-wm8pd1jq.mjs +0 -2
  628. package/dist/chunks/cli-0.1.10-wvhzawgv.mjs +0 -12
  629. package/dist/chunks/cli-0.1.10-x1qs5ctr.mjs +0 -2
  630. package/dist/chunks/cli-0.1.10-x2eaxa4s.mjs +0 -2
  631. package/dist/chunks/cli-0.1.10-xjpjs3y5.mjs +0 -2
  632. package/dist/chunks/cli-0.1.10-xzz1tdne.mjs +0 -2
  633. package/dist/chunks/cli-0.1.10-y17z0pes.mjs +0 -2
  634. package/dist/chunks/cli-0.1.10-y1bkenem.mjs +0 -2
  635. package/dist/chunks/cli-0.1.10-y2byece1.mjs +0 -12
  636. package/dist/chunks/cli-0.1.10-y3q22zvb.mjs +0 -2
  637. package/dist/chunks/cli-0.1.10-y6a8q1t3.mjs +0 -9
  638. package/dist/chunks/cli-0.1.10-y9mkzh11.mjs +0 -5036
  639. package/dist/chunks/cli-0.1.10-yq3dy7w2.mjs +0 -2
  640. package/dist/chunks/cli-0.1.10-yset0578.mjs +0 -2
  641. package/dist/chunks/cli-0.1.10-z20mk55m.mjs +0 -5
  642. package/dist/chunks/cli-0.1.10-z3f97n2d.mjs +0 -6
  643. package/dist/chunks/cli-0.1.10-z4a84y0c.mjs +0 -2
  644. package/dist/chunks/cli-0.1.10-z7ghb8z7.mjs +0 -2
  645. package/dist/chunks/cli-0.1.10-zeqsd250.mjs +0 -2
  646. package/dist/chunks/cli-0.1.10-zxcxqxwv.mjs +0 -2
  647. package/dist/chunks/cli-0.1.10-zxgw1kqq.mjs +0 -2
  648. package/dist/chunks/client-0.1.10-btm7zd17.mjs +0 -1
  649. package/dist/chunks/color-0.1.10-h3wdkq18.mjs +0 -1
  650. package/dist/chunks/compact-0.1.10-3vz0z7cj.mjs +0 -3
  651. package/dist/chunks/config-0.1.10-37452dtw.mjs +0 -1
  652. package/dist/chunks/config-0.1.10-apkj5t0e.mjs +0 -1
  653. package/dist/chunks/context-0.1.10-z4vfp64w.mjs +0 -1
  654. package/dist/chunks/context-noninteractive-0.1.10-xmmn39z5.mjs +0 -1
  655. package/dist/chunks/conversation-0.1.10-p82mc6k7.mjs +0 -1
  656. package/dist/chunks/copy-0.1.10-y1c1gb1w.mjs +0 -9
  657. package/dist/chunks/cost-0.1.10-d5wpnm54.mjs +0 -1
  658. package/dist/chunks/createSession-0.1.10-7bq5e7c3.mjs +0 -1
  659. package/dist/chunks/desktop-0.1.10-3f54fc1k.mjs +0 -1
  660. package/dist/chunks/detectRepository-0.1.10-1kyc0kvc.mjs +0 -1
  661. package/dist/chunks/detection-0.1.10-0h6d9cqt.mjs +0 -1
  662. package/dist/chunks/devtools-0.1.10-93f39njd.mjs +0 -1
  663. package/dist/chunks/diff-0.1.10-j17ke0k6.mjs +0 -1
  664. package/dist/chunks/doctor-0.1.10-wcq13152.mjs +0 -1
  665. package/dist/chunks/earlyInput-0.1.10-k1phbjt5.mjs +0 -1
  666. package/dist/chunks/effort-0.1.10-kanyae0a.mjs +0 -8
  667. package/dist/chunks/environmentSelection-0.1.10-ydckkyqx.mjs +0 -1
  668. package/dist/chunks/environments-0.1.10-7dht1svt.mjs +0 -1
  669. package/dist/chunks/exit-0.1.10-q7af8rb6.mjs +0 -1
  670. package/dist/chunks/export-0.1.10-tgsj9sg2.mjs +0 -2
  671. package/dist/chunks/extra-usage-0.1.10-qccdgzpk.mjs +0 -1
  672. package/dist/chunks/extra-usage-noninteractive-0.1.10-5rpbnmgs.mjs +0 -1
  673. package/dist/chunks/fast-0.1.10-eq1jgfqk.mjs +0 -1
  674. package/dist/chunks/feedback-0.1.10-yvpgv2wy.mjs +0 -14
  675. package/dist/chunks/firstPartyEventLogger-0.1.10-1q5vbtwp.mjs +0 -1
  676. package/dist/chunks/git-0.1.10-ngvcytb0.mjs +0 -1
  677. package/dist/chunks/githubModelsCredentials-0.1.10-w5g5cqhg.mjs +0 -1
  678. package/dist/chunks/growthbook-0.1.10-zkm4sham.mjs +0 -1
  679. package/dist/chunks/heapdump-0.1.10-29gq2jvb.mjs +0 -6
  680. package/dist/chunks/help-0.1.10-yj8ra443.mjs +0 -1
  681. package/dist/chunks/hookChains-0.1.10-32qn4nw8.mjs +0 -3
  682. package/dist/chunks/hooks-0.1.10-epp78p44.mjs +0 -79
  683. package/dist/chunks/hooks-0.1.10-fjrmscrk.mjs +0 -1
  684. package/dist/chunks/ide-0.1.10-361fyyet.mjs +0 -3
  685. package/dist/chunks/image-processor-napi-0.1.10-18yjap6z.mjs +0 -1
  686. package/dist/chunks/index-0.1.10-1cxj797w.mjs +0 -2
  687. package/dist/chunks/index-0.1.10-30c6wwdm.mjs +0 -30
  688. package/dist/chunks/index-0.1.10-80bh88yr.mjs +0 -1
  689. package/dist/chunks/index-0.1.10-8apwt1gk.mjs +0 -1
  690. package/dist/chunks/index-0.1.10-8c4f5nq6.mjs +0 -2
  691. package/dist/chunks/index-0.1.10-9mqxzarc.mjs +0 -5
  692. package/dist/chunks/index-0.1.10-c29w46aj.mjs +0 -1
  693. package/dist/chunks/index-0.1.10-c450y86m.mjs +0 -1
  694. package/dist/chunks/index-0.1.10-d1r31eyx.mjs +0 -9
  695. package/dist/chunks/index-0.1.10-drj30y1c.mjs +0 -1
  696. package/dist/chunks/index-0.1.10-g667a23q.mjs +0 -1
  697. package/dist/chunks/index-0.1.10-gz2mwwnj.mjs +0 -1
  698. package/dist/chunks/index-0.1.10-m1gd7g5v.mjs +0 -1
  699. package/dist/chunks/index-0.1.10-n4bkm7fr.mjs +0 -9
  700. package/dist/chunks/index-0.1.10-r42rb77w.mjs +0 -7
  701. package/dist/chunks/index-0.1.10-ra4k3x9k.mjs +0 -1
  702. package/dist/chunks/index-0.1.10-s32szzwg.mjs +0 -1
  703. package/dist/chunks/index-0.1.10-std21r3g.mjs +0 -1
  704. package/dist/chunks/index-0.1.10-t71jm4x7.mjs +0 -1
  705. package/dist/chunks/index-0.1.10-vpcq7nfa.mjs +0 -1
  706. package/dist/chunks/index-0.1.10-x6dkpkw7.mjs +0 -1
  707. package/dist/chunks/index-0.1.10-xqy1yh0c.mjs +0 -1
  708. package/dist/chunks/initReplBridge-0.1.10-4af5e275.mjs +0 -1
  709. package/dist/chunks/ink-0.1.10-57r8vscr.mjs +0 -1
  710. package/dist/chunks/insights-0.1.10-rptwhmpm.mjs +0 -870
  711. package/dist/chunks/install-0.1.10-9w2w5vre.mjs +0 -1
  712. package/dist/chunks/install-github-app-0.1.10-xhj1zyqh.mjs +0 -149
  713. package/dist/chunks/install-slack-app-0.1.10-tq51qy4s.mjs +0 -1
  714. package/dist/chunks/instrumentation-0.1.10-kyzfec48.mjs +0 -12
  715. package/dist/chunks/interactiveHelpers-0.1.10-1491802m.mjs +0 -1
  716. package/dist/chunks/keybindings-0.1.10-fpyw69y7.mjs +0 -2
  717. package/dist/chunks/knowledge-0.1.10-2aa0bb5w.mjs +0 -2
  718. package/dist/chunks/loadAgentsDir-0.1.10-h8t0ppav.mjs +0 -1
  719. package/dist/chunks/loadPluginHooks-0.1.10-ne71stmt.mjs +0 -1
  720. package/dist/chunks/logout-0.1.10-xxm4ydq9.mjs +0 -1
  721. package/dist/chunks/lsp-0.1.10-k53wta4y.mjs +0 -1
  722. package/dist/chunks/main-0.1.10-q3qenxfq.mjs +0 -1
  723. package/dist/chunks/managedEnv-0.1.10-s37qwcz1.mjs +0 -1
  724. package/dist/chunks/mcp-0.1.10-af795ewj.mjs +0 -1
  725. package/dist/chunks/mcp-0.1.10-b5z770fs.mjs +0 -17
  726. package/dist/chunks/mcp-0.1.10-nd17220r.mjs +0 -4
  727. package/dist/chunks/mcpServer-0.1.10-vrpfykem.mjs +0 -1
  728. package/dist/chunks/mcpb-0.1.10-jzxbat3k.mjs +0 -1
  729. package/dist/chunks/memory-0.1.10-zwzw20d5.mjs +0 -3
  730. package/dist/chunks/mobile-0.1.10-02fzsby3.mjs +0 -2
  731. package/dist/chunks/model-0.1.10-9g2nyrq7.mjs +0 -1
  732. package/dist/chunks/model-0.1.10-rygn5rc7.mjs +0 -2
  733. package/dist/chunks/oauth-0.1.10-t6fn448z.mjs +0 -1
  734. package/dist/chunks/openaiShim-0.1.10-gnhp89j2.mjs +0 -14
  735. package/dist/chunks/output-style-0.1.10-tnvcw858.mjs +0 -1
  736. package/dist/chunks/package-HMBVQOZ4-0.1.10-zd9nnmft.mjs +0 -1
  737. package/dist/chunks/parser-0.1.10-yemkwzb2.mjs +0 -1
  738. package/dist/chunks/passes-0.1.10-3zg7g2tp.mjs +0 -1
  739. package/dist/chunks/permissions-0.1.10-3tmntee5.mjs +0 -3
  740. package/dist/chunks/plan-0.1.10-sj11cbeb.mjs +0 -1
  741. package/dist/chunks/plist-0.1.10-mfhsxrkb.mjs +0 -1
  742. package/dist/chunks/plugin-0.1.10-c2rxcqb7.mjs +0 -29
  743. package/dist/chunks/pluginStartupCheck-0.1.10-n5esk5p9.mjs +0 -1
  744. package/dist/chunks/plugins-0.1.10-cyb1q58v.mjs +0 -9
  745. package/dist/chunks/print-0.1.10-s2t5nd3y.mjs +0 -57
  746. package/dist/chunks/privacy-settings-0.1.10-kxx4szxa.mjs +0 -1
  747. package/dist/chunks/process-0.1.10-kp51xxsy.mjs +0 -1
  748. package/dist/chunks/processBashCommand-0.1.10-t1cdkkjx.mjs +0 -1
  749. package/dist/chunks/processSlashCommand-0.1.10-pvndkc40.mjs +0 -9
  750. package/dist/chunks/prompt-0.1.10-2kjnmw4z.mjs +0 -1
  751. package/dist/chunks/prompt-0.1.10-v546t6x4.mjs +0 -1
  752. package/dist/chunks/prompts-0.1.10-8k80tabm.mjs +0 -1
  753. package/dist/chunks/provider-0.1.10-5p16y1p3.mjs +0 -2
  754. package/dist/chunks/providerProfiles-0.1.10-0r6j5m52.mjs +0 -1
  755. package/dist/chunks/rate-limit-options-0.1.10-0sgjcqvt.mjs +0 -1
  756. package/dist/chunks/registry-0.1.10-nyx80cwb.mjs +0 -1
  757. package/dist/chunks/release-notes-0.1.10-8bpsjmax.mjs +0 -5
  758. package/dist/chunks/reload-plugins-0.1.10-f8cj2ymj.mjs +0 -2
  759. package/dist/chunks/remote-env-0.1.10-x65rh1n3.mjs +0 -1
  760. package/dist/chunks/remoteBridgeCore-0.1.10-tk9vhzgk.mjs +0 -1
  761. package/dist/chunks/remoteSession-0.1.10-xx5eng27.mjs +0 -1
  762. package/dist/chunks/rename-0.1.10-zjwr9vqm.mjs +0 -1
  763. package/dist/chunks/replBridgeHandle-0.1.10-34e8jwrt.mjs +0 -1
  764. package/dist/chunks/resume-0.1.10-dc75n2zf.mjs +0 -2
  765. package/dist/chunks/rewind-0.1.10-kt2968kt.mjs +0 -1
  766. package/dist/chunks/sandbox-adapter-0.1.10-whhwsy1v.mjs +0 -1
  767. package/dist/chunks/sandbox-toggle-0.1.10-19w6767r.mjs +0 -1
  768. package/dist/chunks/session-0.1.10-pzsbjyqm.mjs +0 -2
  769. package/dist/chunks/sessionFileAccessHooks-0.1.10-jaadayzy.mjs +0 -1
  770. package/dist/chunks/sessionStorage-0.1.10-b72srv50.mjs +0 -1
  771. package/dist/chunks/setup-0.1.10-fbs90hdh.mjs +0 -5
  772. package/dist/chunks/sinks-0.1.10-02w5f1q9.mjs +0 -1
  773. package/dist/chunks/skills-0.1.10-pexnbjqd.mjs +0 -1
  774. package/dist/chunks/startupProfiler-0.1.10-gcv6ckp5.mjs +0 -1
  775. package/dist/chunks/state-0.1.10-embrgn1a.mjs +0 -1
  776. package/dist/chunks/stats-0.1.10-s0rzmsxx.mjs +0 -6
  777. package/dist/chunks/status-0.1.10-8r0jrc8n.mjs +0 -1
  778. package/dist/chunks/stickers-0.1.10-dj7ganhx.mjs +0 -1
  779. package/dist/chunks/subprocessEnv-0.1.10-hpv416jp.mjs +0 -1
  780. package/dist/chunks/tasks-0.1.10-cnvnk57k.mjs +0 -1
  781. package/dist/chunks/teamHelpers-0.1.10-j6sfy2zc.mjs +0 -1
  782. package/dist/chunks/teammateModeSnapshot-0.1.10-ddhe13pc.mjs +0 -1
  783. package/dist/chunks/teleport-0.1.10-saft8sby.mjs +0 -1
  784. package/dist/chunks/terminalSetup-0.1.10-4p5xvtyy.mjs +0 -1
  785. package/dist/chunks/theme-0.1.10-5xss74sp.mjs +0 -1
  786. package/dist/chunks/thinkback-0.1.10-e4bz61r1.mjs +0 -1
  787. package/dist/chunks/thinkback-play-0.1.10-0vjf0r8c.mjs +0 -1
  788. package/dist/chunks/toolPool-0.1.10-57jq29ct.mjs +0 -1
  789. package/dist/chunks/toolSearch-0.1.10-ysjw302j.mjs +0 -1
  790. package/dist/chunks/trustedDevice-0.1.10-zy988esg.mjs +0 -1
  791. package/dist/chunks/turndown.cjs-0.1.10-vhmcr6t6.mjs +0 -69
  792. package/dist/chunks/ultrareviewCommand-0.1.10-sqjsmw0x.mjs +0 -4
  793. package/dist/chunks/update-0.1.10-p7ctpbkr.mjs +0 -94
  794. package/dist/chunks/upgrade-0.1.10-8585sfbv.mjs +0 -1
  795. package/dist/chunks/upstreamproxy-0.1.10-ddbrjzqt.mjs +0 -14
  796. package/dist/chunks/usage-0.1.10-r8vznre6.mjs +0 -1
  797. package/dist/chunks/util-0.1.10-51fk6c0k.mjs +0 -1
  798. package/dist/chunks/utils-0.1.10-43r4vneb.mjs +0 -1
  799. package/dist/chunks/vim-0.1.10-3yzrqjw5.mjs +0 -1
  800. package/dist/chunks/watcher-0.1.10-xq2qsexd.mjs +0 -1
  801. package/dist/chunks/wiki-0.1.10-v3w4719f.mjs +0 -132
  802. package/dist/chunks/worktree-0.1.10-b5r0y9mr.mjs +0 -1
  803. package/dist/chunks/worktreeModeEnabled-0.1.10-ckcv927j.mjs +0 -1
  804. package/dist/chunks/wrapper-0.1.10-10976h3e.mjs +0 -7
  805. /package/dist/chunks/{cli-0.1.10-tf9dk84p.mjs → cli-0.1.11-4px8nt5r.mjs} +0 -0
  806. /package/dist/chunks/{cli-0.1.10-xfdakzcb.mjs → cli-0.1.11-tyh8gms9.mjs} +0 -0
  807. /package/dist/chunks/{cli-0.1.10-9xpgjxhj.mjs → cli-0.1.11-x3q39kf7.mjs} +0 -0
@@ -1,192 +0,0 @@
1
- import{Oda as U,Pda as DX,Qda as l0,Rda as O,Sda as b1,Zca as SL,ada as tk,ida as t7,mda as dz,qda as JV}from"./cli-0.1.10-2mqddc7q.mjs";import{Vda as s,Wda as t0,fea as lL,yea as Xx}from"./cli-0.1.10-4n8p34vn.mjs";import{Hea as rB,Iea as UW,zea as HW}from"./cli-0.1.10-594z8zdp.mjs";import{Jea as pW,Mea as Kj}from"./cli-0.1.10-a4p945wp.mjs";import{Wea as C1,gfa as W3}from"./cli-0.1.10-w1hqcxj1.mjs";import{Lfa as r6,Qfa as FV}from"./cli-0.1.10-nzxw7p2m.mjs";import{Yfa as c0,Zfa as n$}from"./cli-0.1.10-f2jh6yv0.mjs";import{Aga as l$,Cga as y1,Dga as k4,Ega as f,Fga as H0,Gga as pX,Hga as qL,Iga as L0,Jga as M1,Mga as k,Qga as R0,Wga as E,Zga as R1,aga as Y4,cga as bB,qga as q7,vga as cL,xga as K0,yga as A6}from"./cli-0.1.10-e4qewc1p.mjs";import{_ga as Y0,bha as e,cha as hV,dha as Q2,lha as d0}from"./cli-0.1.10-y1bkenem.mjs";import{$ia as s1,Aha as b7,Aia as NQ,Bha as n_,Bia as kz,Cia as EQ,Dia as Ez,Eha as Tq,Eia as y4,Fha as f_,Fia as A$,Gha as J3,Gia as yQ,Hha as UR,Hia as Cz,Iha as jq,Iia as IV,Ika as bV,Ila as SB,Jha as c_,Jia as OV,Kia as wV,Lia as jV,Mha as Aq,Mia as NV,Nha as m_,Nia as kV,Oha as Iq,Oia as _2,Oma as j6,Pha as u_,Pia as xV,Qha as C4,Rha as rQ,Sha as q3,Sia as b$,Tha as KR,Uha as H$,Vha as GR,Wha as j4,Xha as wQ,_ka as dX,aia as U$,aja as u5,ala as cX,bia as WR,bka as tL,cia as Wq,dia as P_,eia as D4,fia as Uq,gia as Dq,hia as h_,iia as W6,ila as pL,jia as C7,kla as dL,rla as L9,sha as CQ,tha as vz,uha as W$,vha as BR,yia as N4,zia as jQ,zla as EV}from"./cli-0.1.10-mqgz2v10.mjs";import{Rma as _q,Sma as C_,Vma as Z$,Wma as tz,Xma as z0,Yma as G6,Zma as Y$,_ma as HR,bna as qq,cna as D_,dna as K6,ena as P7,lna as u,mna as L1}from"./cli-0.1.10-akaq0zte.mjs";import{Gna as DH,Hna as $4,Ina as d,Jna as y7,Kna as B,Lna as $0,Mna as R6,Nna as M6}from"./cli-0.1.10-hyxg32sc.mjs";function Zq(Z){let X=Z.slice(Z.lastIndexOf(".")).toLowerCase();return M_.has(X)}function Xq(Z){let X=Math.min(Z.length,F_),J=0;for(let q=0;q<X;q++){let Q=Z[q];if(Q===0)return!0;if(Q<32&&Q!==9&&Q!==10&&Q!==13)J++}return J/X>0.1}var M_,F_=8192;var Jq=B(()=>{M_=new Set([".png",".jpg",".jpeg",".gif",".bmp",".ico",".webp",".tiff",".tif",".mp4",".mov",".avi",".mkv",".webm",".wmv",".flv",".m4v",".mpeg",".mpg",".mp3",".wav",".ogg",".flac",".aac",".m4a",".wma",".aiff",".opus",".zip",".tar",".gz",".bz2",".7z",".rar",".xz",".z",".tgz",".iso",".exe",".dll",".so",".dylib",".bin",".o",".a",".obj",".lib",".app",".msi",".deb",".rpm",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odt",".ods",".odp",".ttf",".otf",".woff",".woff2",".eot",".pyc",".pyo",".class",".jar",".war",".ear",".node",".wasm",".rlib",".sqlite",".sqlite3",".db",".mdb",".idx",".psd",".ai",".eps",".sketch",".fig",".xd",".blend",".3ds",".max",".swf",".fla",".lockb",".dat",".data"])});var T_,H6;var E7=B(()=>{D_();T_=function(){try{var Z=qq(Object,"defineProperty");return Z({},"",{}),Z}catch(X){}}(),H6=T_});function A_(Z,X,J){if(X=="__proto__"&&H6)H6(Z,X,{configurable:!0,enumerable:!0,value:J,writable:!0});else Z[X]=J}var U6;var M4=B(()=>{E7();U6=A_});function w_(Z,X,J){var q=Z[X];if(!(O_.call(Z,X)&&K6(q,J))||J===void 0&&!(X in Z))U6(Z,X,J)}var I_,O_,F4;var v7=B(()=>{M4();P7();I_=Object.prototype,O_=I_.hasOwnProperty;F4=w_});function j_(Z,X,J,q){var Q=!J;J||(J={});var $=-1,Y=X.length;while(++$<Y){var H=X[$],K=q?q(J[H],Z[H],H,J,Z):void 0;if(K===void 0)K=Z[H];if(Q)U6(J,H,K);else F4(J,H,K)}return J}var Qq;var $q=B(()=>{v7();M4();Qq=j_});function N_(Z){var X=[];if(Z!=null)for(var J in Object(Z))X.push(J);return X}var Yq;var Hq=B(()=>{Yq=N_});function E_(Z){if(!z0(Z))return Yq(Z);var X=D4(Z),J=[];for(var q in Z)if(!(q=="constructor"&&(X||!x_.call(Z,q))))J.push(q);return J}var k_,x_,Kq;var Gq=B(()=>{G6();Uq();Hq();k_=Object.prototype,x_=k_.hasOwnProperty;Kq=E_});function v_(Z){return W6(Z)?Wq(Z,!0):Kq(Z)}var V6;var T4=B(()=>{P_();Gq();C7();V6=v_});var I4={};y7(I4,{default:()=>S7});function S_(Z,X){if(X)return Z.slice();var J=Z.length,q=Lq?Lq(J):new Z.constructor(J);return Z.copy(q),q}var zq,Vq,y_,Bq,Lq,S7;var Rq=B(()=>{C_();zq=typeof I4=="object"&&I4&&!I4.nodeType&&I4,Vq=zq&&typeof A4=="object"&&A4&&!A4.nodeType&&A4,y_=Vq&&Vq.exports===zq,Bq=y_?_q.Buffer:void 0,Lq=Bq?Bq.allocUnsafe:void 0;S7=S_});function b_(Z,X){var J=-1,q=Z.length;X||(X=Array(q));while(++J<q)X[J]=Z[J];return X}var Mq;var Fq=B(()=>{Mq=b_});var g_,B6;var O4=B(()=>{h_();g_=Dq(Object.getPrototypeOf,Object),B6=g_});var p_,d_,Oq;var wq=B(()=>{f_();O4();u_();m_();p_=Object.getOwnPropertySymbols,d_=!p_?Aq:function(Z){var X=[];while(Z)Tq(X,Iq(Z)),Z=B6(Z);return X},Oq=d_});function l_(Z){return jq(Z,V6,Oq)}var Nq;var kq=B(()=>{c_();wq();T4();Nq=l_});function i_(Z){var X=new Z.constructor(Z.byteLength);return new b7(X).set(new b7(Z)),X}var xq;var Eq=B(()=>{n_();xq=i_});function a_(Z,X){var J=X?xq(Z.buffer):Z.buffer;return new Z.constructor(J,Z.byteOffset,Z.length)}var Pq;var vq=B(()=>{Eq();Pq=a_});var Cq,o_,yq;var Sq=B(()=>{G6();Cq=Object.create,o_=function(){function Z(){}return function(X){if(!z0(X))return{};if(Cq)return Cq(X);Z.prototype=X;var J=new Z;return Z.prototype=void 0,J}}(),yq=o_});function s_(Z){return typeof Z.constructor=="function"&&!D4(Z)?yq(B6(Z)):{}}var bq;var hq=B(()=>{Sq();O4();Uq();bq=s_});import{dirname as r_}from"path";function Q0(Z,X,J){let q=t_();if(!q)return;let Q={timestamp:new Date().toISOString(),level:Z,event:X,data:J??{}},$=k(),Y=f(Q)+`
2
- `;try{$.appendFileSync(q,Y)}catch{try{$.mkdirSync(r_(q)),$.appendFileSync(q,Y)}catch{}}}function t_(){return process.env.CLAUDE_CODE_DIAGNOSTICS_FILE}async function mE(Z,X,J){let q=Date.now();Q0("info",`${Z}_started`);try{let Q=await X(),$=J?J(Q):{};return Q0("info",`${Z}_completed`,{duration_ms:Date.now()-q,...$}),Q}catch(Q){throw Q0("error",`${Z}_failed`,{duration_ms:Date.now()-q}),Q}}var G2=B(()=>{R0();L0()});var pq=d((pE,uq)=>{uq.exports=mq;mq.sync=Zz;var gq=$0("fs");function e_(Z,X){var J=X.pathExt!==void 0?X.pathExt:process.env.PATHEXT;if(!J)return!0;if(J=J.split(";"),J.indexOf("")!==-1)return!0;for(var q=0;q<J.length;q++){var Q=J[q].toLowerCase();if(Q&&Z.substr(-Q.length).toLowerCase()===Q)return!0}return!1}function fq(Z,X,J){if(!Z.isSymbolicLink()&&!Z.isFile())return!1;return e_(X,J)}function mq(Z,X,J){gq.stat(Z,function(q,Q){J(q,q?!1:fq(Q,Z,X))})}function Zz(Z,X){return fq(gq.statSync(Z),Z,X)}});var iq=d((dE,nq)=>{nq.exports=cq;cq.sync=Xz;var dq=$0("fs");function cq(Z,X,J){dq.stat(Z,function(q,Q){J(q,q?!1:lq(Q,X))})}function Xz(Z,X){return lq(dq.statSync(Z),X)}function lq(Z,X){return Z.isFile()&&Jz(Z,X)}function Jz(Z,X){var{mode:J,uid:q,gid:Q}=Z,$=X.uid!==void 0?X.uid:process.getuid&&process.getuid(),Y=X.gid!==void 0?X.gid:process.getgid&&process.getgid(),H=parseInt("100",8),K=parseInt("010",8),W=parseInt("001",8),G=H|K,V=J&W||J&K&&Q===Y||J&H&&q===$||J&G&&$===0;return V}});var oq=d((lE,aq)=>{var cE=$0("fs"),w4;if(process.platform==="win32"||global.TESTING_WINDOWS)w4=pq();else w4=iq();aq.exports=h7;h7.sync=qz;function h7(Z,X,J){if(typeof X==="function")J=X,X={};if(!J){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(q,Q){h7(Z,X||{},function($,Y){if($)Q($);else q(Y)})})}w4(Z,X||{},function(q,Q){if(q){if(q.code==="EACCES"||X&&X.ignoreErrors)q=null,Q=!1}J(q,Q)})}function qz(Z,X){try{return w4.sync(Z,X||{})}catch(J){if(X&&X.ignoreErrors||J.code==="EACCES")return!1;else throw J}}});var JQ=d((nE,XQ)=>{var L6=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",sq=$0("path"),Qz=L6?";":":",rq=oq(),tq=(Z)=>Object.assign(Error(`not found: ${Z}`),{code:"ENOENT"}),eq=(Z,X)=>{let J=X.colon||Qz,q=Z.match(/\//)||L6&&Z.match(/\\/)?[""]:[...L6?[process.cwd()]:[],...(X.path||process.env.PATH||"").split(J)],Q=L6?X.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",$=L6?Q.split(J):[""];if(L6){if(Z.indexOf(".")!==-1&&$[0]!=="")$.unshift("")}return{pathEnv:q,pathExt:$,pathExtExe:Q}},ZQ=(Z,X,J)=>{if(typeof X==="function")J=X,X={};if(!X)X={};let{pathEnv:q,pathExt:Q,pathExtExe:$}=eq(Z,X),Y=[],H=(W)=>new Promise((G,V)=>{if(W===q.length)return X.all&&Y.length?G(Y):V(tq(Z));let L=q[W],_=/^".*"$/.test(L)?L.slice(1,-1):L,z=sq.join(_,Z),D=!_&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+z:z;G(K(D,W,0))}),K=(W,G,V)=>new Promise((L,_)=>{if(V===Q.length)return L(H(G+1));let z=Q[V];rq(W+z,{pathExt:$},(D,M)=>{if(!D&&M)if(X.all)Y.push(W+z);else return L(W+z);return L(K(W,G,V+1))})});return J?H(0).then((W)=>J(null,W),J):H(0)},$z=(Z,X)=>{X=X||{};let{pathEnv:J,pathExt:q,pathExtExe:Q}=eq(Z,X),$=[];for(let Y=0;Y<J.length;Y++){let H=J[Y],K=/^".*"$/.test(H)?H.slice(1,-1):H,W=sq.join(K,Z),G=!K&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+W:W;for(let V=0;V<q.length;V++){let L=G+q[V];try{if(rq.sync(L,{pathExt:Q}))if(X.all)$.push(L);else return L}catch(_){}}}if(X.all&&$.length)return $;if(X.nothrow)return null;throw tq(Z)};XQ.exports=ZQ;ZQ.sync=$z});var QQ=d((iE,g7)=>{var qQ=(Z={})=>{let X=Z.env||process.env;if((Z.platform||process.platform)!=="win32")return"PATH";return Object.keys(X).reverse().find((q)=>q.toUpperCase()==="PATH")||"Path"};g7.exports=qQ;g7.exports.default=qQ});var UQ=d((aE,HQ)=>{var $Q=$0("path"),Yz=JQ(),Hz=QQ();function YQ(Z,X){let J=Z.options.env||process.env,q=process.cwd(),Q=Z.options.cwd!=null,$=Q&&process.chdir!==void 0&&!process.chdir.disabled;if($)try{process.chdir(Z.options.cwd)}catch(H){}let Y;try{Y=Yz.sync(Z.command,{path:J[Hz({env:J})],pathExt:X?$Q.delimiter:void 0})}catch(H){}finally{if($)process.chdir(q)}if(Y)Y=$Q.resolve(Q?Z.options.cwd:"",Y);return Y}function Uz(Z){return YQ(Z)||YQ(Z,!0)}HQ.exports=Uz});var KQ=d((Wz,m7)=>{var f7=/([()\][%!^"`<>&|;, *?])/g;function Kz(Z){return Z=Z.replace(f7,"^$1"),Z}function Gz(Z,X){if(Z=`${Z}`,Z=Z.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),Z=Z.replace(/(?=(\\+?)?)\1$/,"$1$1"),Z=`"${Z}"`,Z=Z.replace(f7,"^$1"),X)Z=Z.replace(f7,"^$1");return Z}Wz.command=Kz;Wz.argument=Gz});var WQ=d((oE,GQ)=>{GQ.exports=/^#!(.*)/});var BQ=d((sE,VQ)=>{var Lz=WQ();VQ.exports=(Z="")=>{let X=Z.match(Lz);if(!X)return null;let[J,q]=X[0].replace(/#! ?/,"").split(" "),Q=J.split("/").pop();if(Q==="env")return q;return q?`${Q} ${q}`:Q}});var _Q=d((rE,LQ)=>{var u7=$0("fs"),_z=BQ();function zz(Z){let J=Buffer.alloc(150),q;try{q=u7.openSync(Z,"r"),u7.readSync(q,J,0,150,0),u7.closeSync(q)}catch(Q){}return _z(J.toString())}LQ.exports=zz});var FQ=d((tE,MQ)=>{var Rz=$0("path"),zQ=UQ(),RQ=KQ(),Mz=_Q(),Fz=process.platform==="win32",Dz=/\.(?:com|exe)$/i,Tz=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Az(Z){Z.file=zQ(Z);let X=Z.file&&Mz(Z.file);if(X)return Z.args.unshift(Z.file),Z.command=X,zQ(Z);return Z.file}function Iz(Z){if(!Fz)return Z;let X=Az(Z),J=!Dz.test(X);if(Z.options.forceShell||J){let q=Tz.test(X);Z.command=Rz.normalize(Z.command),Z.command=RQ.command(Z.command),Z.args=Z.args.map(($)=>RQ.argument($,q));let Q=[Z.command].concat(Z.args).join(" ");Z.args=["/d","/s","/c",`"${Q}"`],Z.command=process.env.comspec||"cmd.exe",Z.options.windowsVerbatimArguments=!0}return Z}function Oz(Z,X,J){if(X&&!Array.isArray(X))J=X,X=null;X=X?X.slice(0):[],J=Object.assign({},J);let q={command:Z,args:X,options:J,file:void 0,original:{command:Z,args:X}};return J.shell?q:Iz(q)}MQ.exports=Oz});var AQ=d((eE,TQ)=>{var p7=process.platform==="win32";function d7(Z,X){return Object.assign(Error(`${X} ${Z.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${X} ${Z.command}`,path:Z.command,spawnargs:Z.args})}function wz(Z,X){if(!p7)return;let J=Z.emit;Z.emit=function(q,Q){if(q==="exit"){let $=DQ(Q,X);if($)return J.call(Z,"error",$)}return J.apply(Z,arguments)}}function DQ(Z,X){if(p7&&Z===1&&!X.file)return d7(X.original,"spawn");return null}function jz(Z,X){if(p7&&Z===1&&!X.file)return d7(X.original,"spawnSync");return null}TQ.exports={hookChildProcess:wz,verifyENOENT:DQ,verifyENOENTSync:jz,notFoundError:d7}});var n7=d((ZP,_6)=>{var IQ=$0("child_process"),c7=FQ(),l7=AQ();function OQ(Z,X,J){let q=c7(Z,X,J),Q=IQ.spawn(q.command,q.args,q.options);return l7.hookChildProcess(Q,q),Q}function Nz(Z,X,J){let q=c7(Z,X,J),Q=IQ.spawnSync(q.command,q.args,q.options);return Q.error=Q.error||l7.verifyENOENTSync(Q.status,q),Q}_6.exports=OQ;_6.exports.spawn=OQ;_6.exports.sync=Nz;_6.exports._parse=c7;_6.exports._enoent=l7});function xz(Z,X,J,q){if(!z0(Z))return Z;X=N4(X,Z);var Q=-1,$=X.length,Y=$-1,H=Z;while(H!=null&&++Q<$){var K=NQ(X[Q]),W=J;if(K==="__proto__"||K==="constructor"||K==="prototype")return Z;if(Q!=Y){var G=H[K];if(W=q?q(G,K,H):void 0,W===void 0)W=z0(G)?G:j4(X[Q+1])?[]:{}}F4(H,K,W),H=H[K]}return Z}var kQ;var xQ=B(()=>{v7();jQ();wQ();G6();kz();kQ=xz});function Pz(Z,X,J){var q=-1,Q=X.length,$={};while(++q<Q){var Y=X[q],H=EQ(Z,Y);if(J(H,Y))kQ($,N4(Y,Z),H)}return $}var PQ;var vQ=B(()=>{Ez();xQ();jQ();PQ=Pz});function yz(Z,X){if(Z==null)return{};var J=CQ(Nq(Z),function(q){return[q]});return X=yQ(X),PQ(Z,J,function(q,Q){return X(q,Q[0])})}var i7;var SQ=B(()=>{vz();Cz();vQ();kq();i7=yz});import{readdir as RP,readFile as Sz}from"fs/promises";import{release as bz}from"os";var AP,v0,IP,OP;var z6=B(()=>{L1();R0();u0();AP=["macos","wsl"],v0=u(()=>{try{if(process.platform==="darwin")return"macos";if(process.platform==="win32")return"windows";if(process.platform==="linux"){try{let Z=k().readFileSync("/proc/version",{encoding:"utf8"});if(Z.toLowerCase().includes("microsoft")||Z.toLowerCase().includes("wsl"))return"wsl"}catch(Z){m(Z)}return"linux"}return"unknown"}catch(Z){return m(Z),"unknown"}}),IP=u(()=>{if(process.platform!=="linux")return;try{let Z=k().readFileSync("/proc/version",{encoding:"utf8"}),X=Z.match(/WSL(\d+)/i);if(X&&X[1])return X[1];if(Z.toLowerCase().includes("microsoft"))return"1";return}catch(Z){m(Z);return}}),OP=u(async()=>{if(process.platform!=="linux")return;let Z={linuxKernel:bz()};try{let X=await Sz("/etc/os-release","utf8");for(let J of X.split(`
3
- `)){let q=J.match(/^(ID|VERSION_ID)=(.*)$/);if(q&&q[1]&&q[2]){let Q=q[2].replace(/^"|"$/g,"");if(q[1]==="ID")Z.linuxDistroId=Q;else Z.linuxDistroVersion=Q}}}catch{}return Z})});import{execSync as hz}from"child_process";function F6(Z,X){let q=[];try{const J=R6(q,k4`execSync: ${Z.slice(0,100)}`,0);return hz(Z,X)}catch(Q){var $=Q,Y=1}finally{M6(q,$,Y)}}var a7=B(()=>{L0()});var gz,hQ,o7,gQ=(Z,X,J,q)=>{typeof o7.emitWarning=="function"?o7.emitWarning(Z,X,J,q):console.error(`[${J}] ${X}: ${Z}`)},E4,bQ,fz=(Z)=>!hQ.has(Z),EP,_1=(Z)=>Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),fQ=(Z)=>_1(Z)?Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?x4:null:null,x4,mz=class Z{heap;length;static#J=!1;static create(X){let J=fQ(X);if(!J)return[];Z.#J=!0;let q=new Z(X,J);return Z.#J=!1,q}constructor(X,J){if(!Z.#J)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new J(X),this.length=0}push(X){this.heap[this.length++]=X}pop(){return this.heap[--this.length]}},mQ;var uQ=B(()=>{gz=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,hQ=new Set,o7=typeof process=="object"&&process?process:{},E4=globalThis.AbortController,bQ=globalThis.AbortSignal;if(typeof E4>"u"){bQ=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(J,q){this._onabort.push(q)}},E4=class{constructor(){X()}signal=new bQ;abort(J){if(!this.signal.aborted){this.signal.reason=J,this.signal.aborted=!0;for(let q of this.signal._onabort)q(J);this.signal.onabort?.(J)}}};let Z=o7.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",X=()=>{Z&&(Z=!1,gQ("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",X))}}EP=Symbol("type"),x4=class extends Array{constructor(Z){super(Z),this.fill(0)}},mQ=class Z{#J;#q;#X;#Y;#U;#V;#T;#z;get perf(){return this.#z}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#H;#A;#K;#$;#Z;#L;#R;#B;#G;#I;#W;#O;#w;#M;#F;#j;#P;#_;#S;static unsafeExposeInternals(X){return{starts:X.#w,ttls:X.#M,autopurgeTimers:X.#F,sizes:X.#O,keyMap:X.#K,keyList:X.#$,valList:X.#Z,next:X.#L,prev:X.#R,get head(){return X.#B},get tail(){return X.#G},free:X.#I,isBackgroundFetch:(J)=>X.#Q(J),backgroundFetch:(J,q,Q,$)=>X.#g(J,q,Q,$),moveToTail:(J)=>X.#y(J),indexes:(J)=>X.#N(J),rindexes:(J)=>X.#k(J),isStale:(J)=>X.#D(J)}}get max(){return this.#J}get maxSize(){return this.#q}get calculatedSize(){return this.#A}get size(){return this.#H}get fetchMethod(){return this.#V}get memoMethod(){return this.#T}get dispose(){return this.#X}get onInsert(){return this.#Y}get disposeAfter(){return this.#U}constructor(X){let{max:J=0,ttl:q,ttlResolution:Q=1,ttlAutopurge:$,updateAgeOnGet:Y,updateAgeOnHas:H,allowStale:K,dispose:W,onInsert:G,disposeAfter:V,noDisposeOnSet:L,noUpdateTTL:_,maxSize:z=0,maxEntrySize:D=0,sizeCalculation:M,fetchMethod:F,memoMethod:N,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:A,allowStaleOnFetchAbort:I,ignoreFetchAbort:T,perf:b}=X;if(b!==void 0&&typeof b?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#z=b??gz,J!==0&&!_1(J))throw TypeError("max option must be a nonnegative integer");let j=J?fQ(J):Array;if(!j)throw Error("invalid max value: "+J);if(this.#J=J,this.#q=z,this.maxEntrySize=D||this.#q,this.sizeCalculation=M,this.sizeCalculation){if(!this.#q&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw TypeError("sizeCalculation set to non-function")}if(N!==void 0&&typeof N!="function")throw TypeError("memoMethod must be a function if defined");if(this.#T=N,F!==void 0&&typeof F!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#V=F,this.#P=!!F,this.#K=new Map,this.#$=Array(J).fill(void 0),this.#Z=Array(J).fill(void 0),this.#L=new j(J),this.#R=new j(J),this.#B=0,this.#G=0,this.#I=mz.create(J),this.#H=0,this.#A=0,typeof W=="function"&&(this.#X=W),typeof G=="function"&&(this.#Y=G),typeof V=="function"?(this.#U=V,this.#W=[]):(this.#U=void 0,this.#W=void 0),this.#j=!!this.#X,this.#S=!!this.#Y,this.#_=!!this.#U,this.noDisposeOnSet=!!L,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!A,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#q!==0&&!_1(this.#q))throw TypeError("maxSize must be a positive integer if specified");if(!_1(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#l()}if(this.allowStale=!!K,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!Y,this.updateAgeOnHas=!!H,this.ttlResolution=_1(Q)||Q===0?Q:1,this.ttlAutopurge=!!$,this.ttl=q||0,this.ttl){if(!_1(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#f()}if(this.#J===0&&this.ttl===0&&this.#q===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#J&&!this.#q){let x="LRU_CACHE_UNBOUNDED";fz(x)&&(hQ.add(x),gQ("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",x,Z))}}getRemainingTTL(X){return this.#K.has(X)?1/0:0}#f(){let X=new x4(this.#J),J=new x4(this.#J);this.#M=X,this.#w=J;let q=this.ttlAutopurge?Array(this.#J):void 0;this.#F=q,this.#m=(H,K,W=this.#z.now())=>{J[H]=K!==0?W:0,X[H]=K,Q(H,K)},this.#v=(H)=>{J[H]=X[H]!==0?this.#z.now():0,Q(H,X[H])};let Q=this.ttlAutopurge?(H,K)=>{if(q?.[H]&&(clearTimeout(q[H]),q[H]=void 0),K&&K!==0&&q){let W=setTimeout(()=>{this.#D(H)&&this.#x(this.#$[H],"expire")},K+1);W.unref&&W.unref(),q[H]=W}}:()=>{};this.#E=(H,K)=>{if(X[K]){let W=X[K],G=J[K];if(!W||!G)return;H.ttl=W,H.start=G,H.now=$||Y();let V=H.now-G;H.remainingTTL=W-V}};let $=0,Y=()=>{let H=this.#z.now();if(this.ttlResolution>0){$=H;let K=setTimeout(()=>$=0,this.ttlResolution);K.unref&&K.unref()}return H};this.getRemainingTTL=(H)=>{let K=this.#K.get(H);if(K===void 0)return 0;let W=X[K],G=J[K];if(!W||!G)return 1/0;let V=($||Y())-G;return W-V},this.#D=(H)=>{let K=J[H],W=X[H];return!!W&&!!K&&($||Y())-K>W}}#v=()=>{};#E=()=>{};#m=()=>{};#D=()=>!1;#l(){let X=new x4(this.#J);this.#A=0,this.#O=X,this.#C=(J)=>{this.#A-=X[J],X[J]=0},this.#u=(J,q,Q,$)=>{if(this.#Q(q))return 0;if(!_1(Q))if($){if(typeof $!="function")throw TypeError("sizeCalculation must be a function");if(Q=$(q,J),!_1(Q))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return Q},this.#b=(J,q,Q)=>{if(X[J]=q,this.#q){let $=this.#q-X[J];for(;this.#A>$;)this.#h(!0)}this.#A+=X[J],Q&&(Q.entrySize=q,Q.totalCalculatedSize=this.#A)}}#C=(X)=>{};#b=(X,J,q)=>{};#u=(X,J,q,Q)=>{if(q||Q)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#N({allowStale:X=this.allowStale}={}){if(this.#H)for(let J=this.#G;!(!this.#p(J)||((X||!this.#D(J))&&(yield J),J===this.#B));)J=this.#R[J]}*#k({allowStale:X=this.allowStale}={}){if(this.#H)for(let J=this.#B;!(!this.#p(J)||((X||!this.#D(J))&&(yield J),J===this.#G));)J=this.#L[J]}#p(X){return X!==void 0&&this.#K.get(this.#$[X])===X}*entries(){for(let X of this.#N())this.#Z[X]!==void 0&&this.#$[X]!==void 0&&!this.#Q(this.#Z[X])&&(yield[this.#$[X],this.#Z[X]])}*rentries(){for(let X of this.#k())this.#Z[X]!==void 0&&this.#$[X]!==void 0&&!this.#Q(this.#Z[X])&&(yield[this.#$[X],this.#Z[X]])}*keys(){for(let X of this.#N()){let J=this.#$[X];J!==void 0&&!this.#Q(this.#Z[X])&&(yield J)}}*rkeys(){for(let X of this.#k()){let J=this.#$[X];J!==void 0&&!this.#Q(this.#Z[X])&&(yield J)}}*values(){for(let X of this.#N())this.#Z[X]!==void 0&&!this.#Q(this.#Z[X])&&(yield this.#Z[X])}*rvalues(){for(let X of this.#k())this.#Z[X]!==void 0&&!this.#Q(this.#Z[X])&&(yield this.#Z[X])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(X,J={}){for(let q of this.#N()){let Q=this.#Z[q],$=this.#Q(Q)?Q.__staleWhileFetching:Q;if($!==void 0&&X($,this.#$[q],this))return this.get(this.#$[q],J)}}forEach(X,J=this){for(let q of this.#N()){let Q=this.#Z[q],$=this.#Q(Q)?Q.__staleWhileFetching:Q;$!==void 0&&X.call(J,$,this.#$[q],this)}}rforEach(X,J=this){for(let q of this.#k()){let Q=this.#Z[q],$=this.#Q(Q)?Q.__staleWhileFetching:Q;$!==void 0&&X.call(J,$,this.#$[q],this)}}purgeStale(){let X=!1;for(let J of this.#k({allowStale:!0}))this.#D(J)&&(this.#x(this.#$[J],"expire"),X=!0);return X}info(X){let J=this.#K.get(X);if(J===void 0)return;let q=this.#Z[J],Q=this.#Q(q)?q.__staleWhileFetching:q;if(Q===void 0)return;let $={value:Q};if(this.#M&&this.#w){let Y=this.#M[J],H=this.#w[J];if(Y&&H){let K=Y-(this.#z.now()-H);$.ttl=K,$.start=Date.now()}}return this.#O&&($.size=this.#O[J]),$}dump(){let X=[];for(let J of this.#N({allowStale:!0})){let q=this.#$[J],Q=this.#Z[J],$=this.#Q(Q)?Q.__staleWhileFetching:Q;if($===void 0||q===void 0)continue;let Y={value:$};if(this.#M&&this.#w){Y.ttl=this.#M[J];let H=this.#z.now()-this.#w[J];Y.start=Math.floor(Date.now()-H)}this.#O&&(Y.size=this.#O[J]),X.unshift([q,Y])}return X}load(X){this.clear();for(let[J,q]of X){if(q.start){let Q=Date.now()-q.start;q.start=this.#z.now()-Q}this.set(J,q.value,q)}}set(X,J,q={}){if(J===void 0)return this.delete(X),this;let{ttl:Q=this.ttl,start:$,noDisposeOnSet:Y=this.noDisposeOnSet,sizeCalculation:H=this.sizeCalculation,status:K}=q,{noUpdateTTL:W=this.noUpdateTTL}=q,G=this.#u(X,J,q.size||0,H);if(this.maxEntrySize&&G>this.maxEntrySize)return K&&(K.set="miss",K.maxEntrySizeExceeded=!0),this.#x(X,"set"),this;let V=this.#H===0?void 0:this.#K.get(X);if(V===void 0)V=this.#H===0?this.#G:this.#I.length!==0?this.#I.pop():this.#H===this.#J?this.#h(!1):this.#H,this.#$[V]=X,this.#Z[V]=J,this.#K.set(X,V),this.#L[this.#G]=V,this.#R[V]=this.#G,this.#G=V,this.#H++,this.#b(V,G,K),K&&(K.set="add"),W=!1,this.#S&&this.#Y?.(J,X,"add");else{this.#y(V);let L=this.#Z[V];if(J!==L){if(this.#P&&this.#Q(L)){L.__abortController.abort(Error("replaced"));let{__staleWhileFetching:_}=L;_!==void 0&&!Y&&(this.#j&&this.#X?.(_,X,"set"),this.#_&&this.#W?.push([_,X,"set"]))}else Y||(this.#j&&this.#X?.(L,X,"set"),this.#_&&this.#W?.push([L,X,"set"]));if(this.#C(V),this.#b(V,G,K),this.#Z[V]=J,K){K.set="replace";let _=L&&this.#Q(L)?L.__staleWhileFetching:L;_!==void 0&&(K.oldValue=_)}}else K&&(K.set="update");this.#S&&this.onInsert?.(J,X,J===L?"update":"replace")}if(Q!==0&&!this.#M&&this.#f(),this.#M&&(W||this.#m(V,Q,$),K&&this.#E(K,V)),!Y&&this.#_&&this.#W){let L=this.#W,_;for(;_=L?.shift();)this.#U?.(..._)}return this}pop(){try{for(;this.#H;){let X=this.#Z[this.#B];if(this.#h(!0),this.#Q(X)){if(X.__staleWhileFetching)return X.__staleWhileFetching}else if(X!==void 0)return X}}finally{if(this.#_&&this.#W){let X=this.#W,J;for(;J=X?.shift();)this.#U?.(...J)}}}#h(X){let J=this.#B,q=this.#$[J],Q=this.#Z[J];return this.#P&&this.#Q(Q)?Q.__abortController.abort(Error("evicted")):(this.#j||this.#_)&&(this.#j&&this.#X?.(Q,q,"evict"),this.#_&&this.#W?.push([Q,q,"evict"])),this.#C(J),this.#F?.[J]&&(clearTimeout(this.#F[J]),this.#F[J]=void 0),X&&(this.#$[J]=void 0,this.#Z[J]=void 0,this.#I.push(J)),this.#H===1?(this.#B=this.#G=0,this.#I.length=0):this.#B=this.#L[J],this.#K.delete(q),this.#H--,J}has(X,J={}){let{updateAgeOnHas:q=this.updateAgeOnHas,status:Q}=J,$=this.#K.get(X);if($!==void 0){let Y=this.#Z[$];if(this.#Q(Y)&&Y.__staleWhileFetching===void 0)return!1;if(this.#D($))Q&&(Q.has="stale",this.#E(Q,$));else return q&&this.#v($),Q&&(Q.has="hit",this.#E(Q,$)),!0}else Q&&(Q.has="miss");return!1}peek(X,J={}){let{allowStale:q=this.allowStale}=J,Q=this.#K.get(X);if(Q===void 0||!q&&this.#D(Q))return;let $=this.#Z[Q];return this.#Q($)?$.__staleWhileFetching:$}#g(X,J,q,Q){let $=J===void 0?void 0:this.#Z[J];if(this.#Q($))return $;let Y=new E4,{signal:H}=q;H?.addEventListener("abort",()=>Y.abort(H.reason),{signal:Y.signal});let K={signal:Y.signal,options:q,context:Q},W=(D,M=!1)=>{let{aborted:F}=Y.signal,N=q.ignoreFetchAbort&&D!==void 0,R=q.ignoreFetchAbort||!!(q.allowStaleOnFetchAbort&&D!==void 0);if(q.status&&(F&&!M?(q.status.fetchAborted=!0,q.status.fetchError=Y.signal.reason,N&&(q.status.fetchAbortIgnored=!0)):q.status.fetchResolved=!0),F&&!N&&!M)return V(Y.signal.reason,R);let w=_,A=this.#Z[J];return(A===_||N&&M&&A===void 0)&&(D===void 0?w.__staleWhileFetching!==void 0?this.#Z[J]=w.__staleWhileFetching:this.#x(X,"fetch"):(q.status&&(q.status.fetchUpdated=!0),this.set(X,D,K.options))),D},G=(D)=>(q.status&&(q.status.fetchRejected=!0,q.status.fetchError=D),V(D,!1)),V=(D,M)=>{let{aborted:F}=Y.signal,N=F&&q.allowStaleOnFetchAbort,R=N||q.allowStaleOnFetchRejection,w=R||q.noDeleteOnFetchRejection,A=_;if(this.#Z[J]===_&&(!w||!M&&A.__staleWhileFetching===void 0?this.#x(X,"fetch"):N||(this.#Z[J]=A.__staleWhileFetching)),R)return q.status&&A.__staleWhileFetching!==void 0&&(q.status.returnedStale=!0),A.__staleWhileFetching;if(A.__returned===A)throw D},L=(D,M)=>{let F=this.#V?.(X,$,K);F&&F instanceof Promise&&F.then((N)=>D(N===void 0?void 0:N),M),Y.signal.addEventListener("abort",()=>{(!q.ignoreFetchAbort||q.allowStaleOnFetchAbort)&&(D(void 0),q.allowStaleOnFetchAbort&&(D=(N)=>W(N,!0)))})};q.status&&(q.status.fetchDispatched=!0);let _=new Promise(L).then(W,G),z=Object.assign(_,{__abortController:Y,__staleWhileFetching:$,__returned:void 0});return J===void 0?(this.set(X,z,{...K.options,status:void 0}),J=this.#K.get(X)):this.#Z[J]=z,z}#Q(X){if(!this.#P)return!1;let J=X;return!!J&&J instanceof Promise&&J.hasOwnProperty("__staleWhileFetching")&&J.__abortController instanceof E4}async fetch(X,J={}){let{allowStale:q=this.allowStale,updateAgeOnGet:Q=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,ttl:Y=this.ttl,noDisposeOnSet:H=this.noDisposeOnSet,size:K=0,sizeCalculation:W=this.sizeCalculation,noUpdateTTL:G=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:L=this.allowStaleOnFetchRejection,ignoreFetchAbort:_=this.ignoreFetchAbort,allowStaleOnFetchAbort:z=this.allowStaleOnFetchAbort,context:D,forceRefresh:M=!1,status:F,signal:N}=J;if(!this.#P)return F&&(F.fetch="get"),this.get(X,{allowStale:q,updateAgeOnGet:Q,noDeleteOnStaleGet:$,status:F});let R={allowStale:q,updateAgeOnGet:Q,noDeleteOnStaleGet:$,ttl:Y,noDisposeOnSet:H,size:K,sizeCalculation:W,noUpdateTTL:G,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:z,ignoreFetchAbort:_,status:F,signal:N},w=this.#K.get(X);if(w===void 0){F&&(F.fetch="miss");let A=this.#g(X,w,R,D);return A.__returned=A}else{let A=this.#Z[w];if(this.#Q(A)){let j=q&&A.__staleWhileFetching!==void 0;return F&&(F.fetch="inflight",j&&(F.returnedStale=!0)),j?A.__staleWhileFetching:A.__returned=A}let I=this.#D(w);if(!M&&!I)return F&&(F.fetch="hit"),this.#y(w),Q&&this.#v(w),F&&this.#E(F,w),A;let T=this.#g(X,w,R,D),b=T.__staleWhileFetching!==void 0&&q;return F&&(F.fetch=I?"stale":"refresh",b&&I&&(F.returnedStale=!0)),b?T.__staleWhileFetching:T.__returned=T}}async forceFetch(X,J={}){let q=await this.fetch(X,J);if(q===void 0)throw Error("fetch() returned undefined");return q}memo(X,J={}){let q=this.#T;if(!q)throw Error("no memoMethod provided to constructor");let{context:Q,forceRefresh:$,...Y}=J,H=this.get(X,Y);if(!$&&H!==void 0)return H;let K=q(X,H,{options:Y,context:Q});return this.set(X,K,Y),K}get(X,J={}){let{allowStale:q=this.allowStale,updateAgeOnGet:Q=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,status:Y}=J,H=this.#K.get(X);if(H!==void 0){let K=this.#Z[H],W=this.#Q(K);return Y&&this.#E(Y,H),this.#D(H)?(Y&&(Y.get="stale"),W?(Y&&q&&K.__staleWhileFetching!==void 0&&(Y.returnedStale=!0),q?K.__staleWhileFetching:void 0):($||this.#x(X,"expire"),Y&&q&&(Y.returnedStale=!0),q?K:void 0)):(Y&&(Y.get="hit"),W?K.__staleWhileFetching:(this.#y(H),Q&&this.#v(H),K))}else Y&&(Y.get="miss")}#d(X,J){this.#R[J]=X,this.#L[X]=J}#y(X){X!==this.#G&&(X===this.#B?this.#B=this.#L[X]:this.#d(this.#R[X],this.#L[X]),this.#d(this.#G,X),this.#G=X)}delete(X){return this.#x(X,"delete")}#x(X,J){let q=!1;if(this.#H!==0){let Q=this.#K.get(X);if(Q!==void 0)if(this.#F?.[Q]&&(clearTimeout(this.#F?.[Q]),this.#F[Q]=void 0),q=!0,this.#H===1)this.#c(J);else{this.#C(Q);let $=this.#Z[Q];if(this.#Q($)?$.__abortController.abort(Error("deleted")):(this.#j||this.#_)&&(this.#j&&this.#X?.($,X,J),this.#_&&this.#W?.push([$,X,J])),this.#K.delete(X),this.#$[Q]=void 0,this.#Z[Q]=void 0,Q===this.#G)this.#G=this.#R[Q];else if(Q===this.#B)this.#B=this.#L[Q];else{let Y=this.#R[Q];this.#L[Y]=this.#L[Q];let H=this.#L[Q];this.#R[H]=this.#R[Q]}this.#H--,this.#I.push(Q)}}if(this.#_&&this.#W?.length){let Q=this.#W,$;for(;$=Q?.shift();)this.#U?.(...$)}return q}clear(){return this.#c("delete")}#c(X){for(let J of this.#k({allowStale:!0})){let q=this.#Z[J];if(this.#Q(q))q.__abortController.abort(Error("deleted"));else{let Q=this.#$[J];this.#j&&this.#X?.(q,Q,X),this.#_&&this.#W?.push([q,Q,X])}}if(this.#K.clear(),this.#Z.fill(void 0),this.#$.fill(void 0),this.#M&&this.#w){this.#M.fill(0),this.#w.fill(0);for(let J of this.#F??[])J!==void 0&&clearTimeout(J);this.#F?.fill(void 0)}if(this.#O&&this.#O.fill(0),this.#B=0,this.#G=0,this.#I.length=0,this.#A=0,this.#H=0,this.#_&&this.#W){let J=this.#W,q;for(;q=J?.shift();)this.#U?.(...q)}}}});function gP(Z,X=300000){let J=new Map,q=new Map,Q=async(...$)=>{let Y=f($),H=J.get(Y),K=Date.now();if(!H){let W=q.get(Y);if(W)return W;let G=Z(...$);q.set(Y,G);try{let V=await G;if(q.get(Y)===G)J.set(Y,{value:V,timestamp:K,refreshing:!1});return V}finally{if(q.get(Y)===G)q.delete(Y)}}if(H&&K-H.timestamp>X&&!H.refreshing){H.refreshing=!0;let W=H;return Z(...$).then((G)=>{if(J.get(Y)===W)J.set(Y,{value:G,timestamp:Date.now(),refreshing:!1})}).catch((G)=>{if(m(G),J.get(Y)===W)J.delete(Y)}),H.value}return J.get(Y).value};return Q.cache={clear:()=>{J.clear(),q.clear()}},Q}function z1(Z,X,J=100){let q=new mQ({max:J}),Q=(...$)=>{let Y=X(...$),H=q.get(Y);if(H!==void 0)return H;let K=Z(...$);return q.set(Y,K),K};return Q.cache={clear:()=>q.clear(),size:()=>q.size,delete:($)=>q.delete($),get:($)=>q.peek($),has:($)=>q.has($)},Q}var P4=B(()=>{uQ();u0();L0()});import*as D6 from"path";import*as pQ from"path/win32";function s7(Z){try{return F6(`dir "${Z}"`,{stdio:"pipe"}),!0}catch{return!1}}function uz(Z){if(Z==="git"){let X=["C:\\Program Files\\Git\\cmd\\git.exe","C:\\Program Files (x86)\\Git\\cmd\\git.exe"];for(let J of X)if(s7(J))return J}try{let J=F6(`where.exe ${Z}`,{stdio:"pipe",encoding:"utf8"}).trim().split(`\r
4
- `).filter(Boolean),q=s().toLowerCase();for(let Q of J){let $=D6.resolve(Q).toLowerCase();if(D6.dirname($).toLowerCase()===q||$.startsWith(q+D6.sep)){E(`Skipping potentially malicious executable in current directory: ${Q}`);continue}return Q}return null}catch{return null}}function nP(){if(v0()==="windows"){let Z=pz();process.env.SHELL=Z,E(`Using bash path: "${Z}"`)}}var pz,iP,dQ;var cQ=B(()=>{L1();t0();R1();a7();P4();z6();pz=u(()=>{if(process.env.CLAUDE_CODE_GIT_BASH_PATH){if(s7(process.env.CLAUDE_CODE_GIT_BASH_PATH))return process.env.CLAUDE_CODE_GIT_BASH_PATH;console.error(`Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path "${process.env.CLAUDE_CODE_GIT_BASH_PATH}"`),process.exit(1)}let Z=uz("git");if(Z){let X=pQ.join(Z,"..","..","bin","bash.exe");if(s7(X))return X}console.error("Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\\Program Files\\Git\\bin\\bash.exe"),process.exit(1)}),iP=z1((Z)=>{if(Z.startsWith("\\\\"))return Z.replace(/\\/g,"/");let X=Z.match(/^([A-Za-z]):[/\\]/);if(X)return"/"+X[1].toLowerCase()+Z.slice(2).replace(/\\/g,"/");return Z.replace(/\\/g,"/")},(Z)=>Z,500),dQ=z1((Z)=>{if(Z.startsWith("//"))return Z.replace(/\//g,"\\");let X=Z.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(X){let q=X[1].toUpperCase(),Q=Z.slice(("/cygdrive/"+X[1]).length);return q+":"+(Q||"\\").replace(/\//g,"\\")}let J=Z.match(/^\/([A-Za-z])(\/|$)/);if(J){let q=J[1].toUpperCase(),Q=Z.slice(2);return q+":"+(Q||"\\").replace(/\//g,"\\")}return Z.replace(/\//g,"\\")},(Z)=>Z,500)});import{homedir as lQ}from"os";import{dirname as nQ,isAbsolute as cz,join as lz,normalize as r7,relative as nz,resolve as iz}from"path";function e7(Z,X){let J=X??s()??k().cwd();if(typeof Z!=="string")throw TypeError(`Path must be a string, received ${typeof Z}`);if(typeof J!=="string")throw TypeError(`Base directory must be a string, received ${typeof J}`);if(Z.includes("\x00")||J.includes("\x00"))throw Error("Path contains null bytes");let q=Z.trim();if(!q)return r7(J).normalize("NFC");if(q==="~")return lQ().normalize("NFC");if(q.startsWith("~/"))return lz(lQ(),q.slice(2)).normalize("NFC");let Q=q;if(v0()==="windows"&&q.match(/^\/[a-z]\//i))try{Q=dQ(q)}catch{Q=q}if(cz(Q))return r7(Q).normalize("NFC");return iz(J,Q).normalize("NFC")}function Xv(Z){let X=nz(s(),Z);return X.startsWith("..")?Z:X}function Jv(Z){let X=e7(Z);if(X.startsWith("\\\\")||X.startsWith("//"))return nQ(X);try{if(k().statSync(X).isDirectory())return X}catch{}return nQ(X)}function qv(Z){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(Z)}function v1(Z){return r7(Z).replace(/\\/g,"/")}var v4=B(()=>{t0();R0();z6();cQ();dz()});function az(Z,X,J){if(J!==void 0&&!K6(Z[X],J)||J===void 0&&!(X in Z))U6(Z,X,J)}var W2;var Z3=B(()=>{M4();P7();W2=az});function oz(Z){return function(X,J,q){var Q=-1,$=Object(X),Y=q(X),H=Y.length;while(H--){var K=Y[Z?H:++Q];if(J($[K],K,$)===!1)break}return X}}var iQ;var aQ=B(()=>{iQ=oz});var sz,oQ;var sQ=B(()=>{aQ();sz=iQ(),oQ=sz});function rz(Z){return C4(Z)&&W6(Z)}var tQ;var eQ=B(()=>{C7();rQ();tQ=rz});function QR(Z){if(!C4(Z)||Z$(Z)!=ez)return!1;var X=B6(Z);if(X===null)return!0;var J=JR.call(X,"constructor")&&X.constructor;return typeof J=="function"&&J instanceof J&&X$.call(J)==qR}var ez="[object Object]",ZR,XR,X$,JR,qR,J$;var q$=B(()=>{tz();O4();rQ();ZR=Function.prototype,XR=Object.prototype,X$=ZR.toString,JR=XR.hasOwnProperty,qR=X$.call(Object);J$=QR});function $R(Z,X){if(X==="constructor"&&typeof Z[X]==="function")return;if(X=="__proto__")return;return Z[X]}var V2;var X3=B(()=>{V2=$R});function YR(Z){return Qq(Z,V6(Z))}var Q$;var $$=B(()=>{$q();T4();Q$=YR});function VR(Z,X,J,q,Q,$,Y){var H=V2(Z,J),K=V2(X,J),W=Y.get(K);if(W){W2(Z,J,W);return}var G=$?$(H,K,J+"",Z,X,Y):void 0,V=G===void 0;if(V){var L=J3(K),_=!L&&H$(K),z=!L&&!_&&U$(K);if(G=K,L||_||z)if(J3(H))G=H;else if(tQ(H))G=Mq(H);else if(_)V=!1,G=S7(K,!0);else if(z)V=!1,G=Pq(K,!0);else G=[];else if(J$(K)||q3(K)){if(G=H,q3(H))G=Q$(H);else if(!z0(H)||Y$(H))G=bq(K)}else V=!1}if(V)Y.set(K,G),Q(G,K,q,$,Y),Y.delete(K);W2(Z,J,G)}var K$;var G$=B(()=>{Z3();Rq();vq();Fq();hq();KR();UR();eQ();GR();HR();G6();q$();WR();X3();$$();K$=VR});function V$(Z,X,J,q,Q){if(Z===X)return;oQ(X,function($,Y){if(Q||(Q=new W$),z0($))K$(Z,X,Y,J,V$,q,Q);else{var H=q?q(V2(Z,Y),$,Y+"",Z,X,Q):void 0;if(H===void 0)H=$;W2(Z,Y,H)}},V6)}var B$;var L$=B(()=>{BR();Z3();sQ();G$();G6();T4();X3();B$=V$});function LR(Z,X,J){switch(J.length){case 0:return Z.call(X);case 1:return Z.call(X,J[0]);case 2:return Z.call(X,J[0],J[1]);case 3:return Z.call(X,J[0],J[1],J[2])}return Z.apply(X,J)}var _$;var z$=B(()=>{_$=LR});function _R(Z,X,J){return X=R$(X===void 0?Z.length-1:X,0),function(){var q=arguments,Q=-1,$=R$(q.length-X,0),Y=Array($);while(++Q<$)Y[Q]=q[X+Q];Q=-1;var H=Array(X+1);while(++Q<X)H[Q]=q[Q];return H[X]=J(Y),_$(Z,this,H)}}var R$,M$;var F$=B(()=>{z$();R$=Math.max;M$=_R});function zR(Z){return function(){return Z}}var D$;var T$=B(()=>{D$=zR});var RR,I$;var O$=B(()=>{T$();E7();A$();RR=!H6?y4:function(Z,X){return H6(Z,"toString",{configurable:!0,enumerable:!1,value:D$(X),writable:!0})},I$=RR});function TR(Z){var X=0,J=0;return function(){var q=DR(),Q=FR-(q-J);if(J=q,Q>0){if(++X>=MR)return arguments[0]}else X=0;return Z.apply(void 0,arguments)}}var MR=800,FR=16,DR,w$;var j$=B(()=>{DR=Date.now;w$=TR});var AR,N$;var k$=B(()=>{O$();j$();AR=w$(I$),N$=AR});function IR(Z,X){return N$(M$(Z,X,y4),Z+"")}var x$;var E$=B(()=>{A$();F$();k$();x$=IR});function OR(Z,X,J){if(!z0(J))return!1;var q=typeof X;if(q=="number"?W6(J)&&j4(X,J.length):q=="string"&&(X in J))return K6(J[X],Z);return!1}var P$;var v$=B(()=>{P7();C7();wQ();G6();P$=OR});function wR(Z){return x$(function(X,J){var q=-1,Q=J.length,$=Q>1?J[Q-1]:void 0,Y=Q>2?J[2]:void 0;if($=Z.length>3&&typeof $=="function"?(Q--,$):void 0,Y&&P$(J[0],J[1],Y))$=Q<3?void 0:$,Q=1;X=Object(X);while(++q<Q){var H=J[q];if(H)Z(X,H,q,$)}return X})}var C$;var y$=B(()=>{E$();v$();C$=wR});var jR,e0;var S$=B(()=>{L$();y$();jR=C$(function(Z,X,J,q){B$(Z,X,J,q)}),e0=jR});function Q3(Z){let{buffer:X,bytesRead:J}=k().readSync(Z,{length:4096});if(J===0)return"utf8";if(J>=2){if(X[0]===255&&X[1]===254)return"utf16le"}if(J>=3&&X[0]===239&&X[1]===187&&X[2]===191)return"utf8";return"utf8"}function $3(Z){let X=0,J=0;for(let q=0;q<Z.length;q++)if(Z[q]===`
5
- `)if(q>0&&Z[q-1]==="\r")X++;else J++;return X>J?"CRLF":"LF"}function NR(Z){let X=k(),{resolvedPath:J,isSymlink:q}=M1(X,Z);if(q)E(`Reading through symlink: ${Z} -> ${J}`);let Q=Q3(J),$=X.readFileSync(J,{encoding:Q}),Y=$3($.slice(0,4096));return{content:$.replaceAll(`\r
6
- `,`
7
- `),encoding:Q,lineEndings:Y}}function Z1(Z){return NR(Z).content}var B2=B(()=>{R1();R0()});function p0(Z){return Z.startsWith("\uFEFF")?Z.slice(1):Z}var S4=()=>{};import{join as kR}from"path";function EC(Z){L2=Z}function PC(){L2=null,Y3=void 0}function vC(Z){return Y3=Z,Z}function ER(){return kR(Y0(),xR)}function PR(){try{let Z=Z1(ER()),X=H0(p0(Z));if(!X||typeof X!=="object"||Array.isArray(X))return null;return X}catch{return null}}function b4(){if(Y3!==!0)return null;if(L2)return L2;let Z=PR();if(Z)return L2=Z,_2(),Z;return null}var xR="remote-settings.json",L2=null,Y3;var h$=B(()=>{d0();B2();S4();b$();L0()});function yC(Z,X){return Z.flatMap((J,q)=>q?[X(q),J]:[J])}function H3(Z,X){let J=0;for(let q of Z)J+=+!!X(q);return J}function g$(Z){return[...new Set(Z)]}var U3=()=>{};class f${cache=new Map;maxCacheSize=1000;maxEntryBytes=262144;readFile(Z){let X=k(),J;try{J=X.statSync(Z)}catch(Y){throw this.cache.delete(Z),Y}let q=this.cache.get(Z);if(q&&q.mtime===J.mtimeMs)return{content:q.content,encoding:q.encoding};let Q=u$(Z),$=X.readFileSync(Z,{encoding:Q}).replaceAll(`\r
8
- `,`
9
- `);if(J.size<=this.maxEntryBytes){if(this.cache.set(Z,{content:$,encoding:Q,mtime:J.mtimeMs}),this.cache.size>this.maxCacheSize){let Y=this.cache.keys().next().value;if(Y)this.cache.delete(Y)}}return{content:$,encoding:Q}}clear(){this.cache.clear()}invalidate(Z){this.cache.delete(Z)}getStats(){return{size:this.cache.size,entries:Array.from(this.cache.keys())}}}var K3;var m$=B(()=>{h4();R0();K3=new f$});import{chmodSync as vR,writeFileSync as p$}from"fs";import{realpath as CR,stat as i$}from"fs/promises";import{homedir as a$}from"os";import{basename as G3,dirname as g4,extname as d$,isAbsolute as yR,join as T6,normalize as SR,relative as o$,resolve as bR,sep as z2}from"path";async function Zy(Z){try{return await i$(Z),!0}catch{return!1}}function Xy(Z){try{return k().readFileSync(Z,{encoding:"utf8"})}catch(X){return m(X),null}}function Jy(Z){let X=k();return Math.floor(X.statSync(Z).mtimeMs)}async function qy(Z){let X=await k().stat(Z);return Math.floor(X.mtimeMs)}function Qy(Z,X,J,q){let Q=X;if(q==="CRLF")Q=X.replaceAll(`\r
10
- `,`
11
- `).split(`
12
- `).join(`\r
13
- `);I6(Z,Q,{encoding:J}),K3.invalidate(Z)}function u$(Z){try{let X=k(),{resolvedPath:J}=M1(X,Z);return Q3(J)}catch(X){if(l$(X))E(`detectFileEncoding failed for expected reason: ${X.code}`,{level:"debug"});else m(X);return"utf8"}}function $y(Z,X="utf8"){try{let J=k(),{resolvedPath:q}=M1(J,Z),{buffer:Q,bytesRead:$}=J.readSync(q,{length:4096}),Y=Q.toString(X,0,$);return $3(Y)}catch(J){return m(J),"LF"}}function Yy(Z){if(!Z.includes("\t"))return Z;return Z.replace(/^\t+/gm,(X)=>" ".repeat(X.length))}function gR(Z){let X=Z?e7(Z):void 0,J=X?o$(s(),X):void 0;return{absolutePath:X,relativePath:J}}function Hy(Z){let{relativePath:X}=gR(Z);if(X&&!X.startsWith(".."))return X;let J=a$();if(Z.startsWith(J+z2))return"~"+Z.slice(J.length);return Z}function Uy(Z){let X=k();try{let J=g4(Z),q=G3(Z,d$(Z)),Y=X.readdirSync(J).filter((H)=>G3(H.name,d$(H.name))===q&&T6(J,H.name)!==Z)[0];if(Y)return Y.name;return}catch(J){if(!A6(J))m(J);return}}async function Gy(Z){let X=s(),J=g4(X),q=Z;try{let H=await CR(g4(Z));q=T6(H,G3(Z))}catch{}let Q=J===z2?z2:J+z2;if(!q.startsWith(Q)||q.startsWith(X+z2)||q===X)return;let $=o$(J,q),Y=T6(X,$);try{return await i$(Y),Y}catch{return}}function fR(){return!C1("tengu_compact_line_prefix_killswitch",!1)}function Wy({content:Z,startLine:X}){if(!Z)return"";let J=Z.split(/\r?\n/);if(fR())return J.map((q,Q)=>`${Q+X}→${q}`).join(`
14
- `);return J.map((q,Q)=>{let $=String(Q+X);if($.length>=6)return`${$}→${q}`;return`${$.padStart(6," ")}→${q}`}).join(`
15
- `)}function Vy(Z){return Z.match(/^\s*\d+[\u2192\t](.*)$/)?.[1]??Z}function By(Z){try{return k().isDirEmptySync(Z)}catch(X){return A6(X)}}function Ly(Z){let{content:X}=K3.readFile(Z);return X}function I6(Z,X,J={encoding:"utf-8"}){let q=k(),Q=Z;try{let K=q.readlinkSync(Z);Q=yR(K)?K:bR(g4(Z),K),E(`Writing through symlink: ${Z} -> ${Q}`)}catch{}let $=`${Q}.tmp.${process.pid}.${Date.now()}`,Y,H=!1;try{Y=q.statSync(Q).mode,H=!0,E(`Preserving file permissions: ${Y.toString(8)}`)}catch(K){if(!A6(K))throw K;if(J.mode!==void 0)Y=J.mode,E(`Setting permissions for new file: ${Y.toString(8)}`)}try{E(`Writing to temp file: ${$}`);let K={encoding:J.encoding,flush:!0};if(!H&&J.mode!==void 0)K.mode=J.mode;if(p$($,X,K),E(`Temp file written successfully, size: ${X.length} bytes`),H&&Y!==void 0)vR($,Y),E("Applied original permissions to temp file");E(`Renaming ${$} to ${Q}`),q.renameSync($,Q),E(`File ${Q} written atomically`)}catch(K){E(`Failed to write file atomically: ${K}`,{level:"error"}),c0("tengu_atomic_write_error",{});try{E(`Cleaning up temp file: ${$}`),q.unlinkSync($)}catch(W){E(`Failed to clean up temp file: ${W}`)}E(`Falling back to non-atomic write for ${Q}`);try{let W={encoding:J.encoding,flush:!0};if(!H&&J.mode!==void 0)W.mode=J.mode;p$(Q,X,W),E(`File ${Q} written successfully with non-atomic fallback`)}catch(W){throw E(`Non-atomic write also failed: ${W}`),W}}}function _y(){let Z=v0(),X=a$();if(Z==="macos")return T6(X,"Desktop");if(Z==="windows"){let q=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(q){let $=`/mnt/c${q.replace(/^[A-Z]:/,"")}/Desktop`;if(k().existsSync($))return $}try{let $=k().readdirSync("/mnt/c/Users");for(let Y of $){if(Y.name==="Public"||Y.name==="Default"||Y.name==="Default User"||Y.name==="All Users")continue;let H=T6("/mnt/c/Users",Y.name,"Desktop");if(k().existsSync(H))return H}}catch(Q){m(Q)}}let J=T6(X,"Desktop");if(k().existsSync(J))return J;return X}function zy(Z,X=hR){try{return k().statSync(Z).size<=X}catch{return!1}}function c$(Z){let X=SR(Z);if(v0()==="windows")X=X.replace(/\//g,"\\").toLowerCase();return X}function Ry(Z,X){return c$(Z)===c$(X)}var hR=262144,Ky="Note: your current working directory is";var h4=B(()=>{n$();W3();t0();R1();y1();B2();m$();R0();u0();v4();z6()});import{appendFile as mR,mkdir as uR,readFile as pR,writeFile as dR}from"fs/promises";import{homedir as cR}from"os";import{dirname as lR,join as nR}from"path";async function iR(Z,X){let{code:J}=await V3("git",["check-ignore",Z],{preserveOutputOnError:!1,cwd:X});return J===0}function aR(){return nR(cR(),".config","git","ignore")}async function r$(Z,X=s()){try{if(!await s$(X))return;let J=`**/${Z}`,q=Z.endsWith("/")?`${Z}sample-file.txt`:Z;if(await iR(q,X))return;let Q=aR(),$=lR(Q);await uR($,{recursive:!0});try{if((await pR(Q,{encoding:"utf-8"})).includes(J))return;await mR(Q,`
16
- ${J}
17
- `)}catch(Y){if(K0(Y)==="ENOENT")await dR(Q,`${J}
18
- `,"utf-8");else throw Y}}catch(J){m(J)}}var t$=B(()=>{t0();y1();f4();R2();u0()});function F2(Z,X=!1){let J=Z.length,q=0,Q="",$=0,Y=16,H=0,K=0,W=0,G=0,V=0;function L(R,w){let A=0,I=0;while(A<R||!w){let T=Z.charCodeAt(q);if(T>=48&&T<=57)I=I*16+T-48;else if(T>=65&&T<=70)I=I*16+T-65+10;else if(T>=97&&T<=102)I=I*16+T-97+10;else break;q++,A++}if(A<R)I=-1;return I}function _(R){q=R,Q="",$=0,Y=16,V=0}function z(){let R=q;if(Z.charCodeAt(q)===48)q++;else{q++;while(q<Z.length&&O6(Z.charCodeAt(q)))q++}if(q<Z.length&&Z.charCodeAt(q)===46)if(q++,q<Z.length&&O6(Z.charCodeAt(q))){q++;while(q<Z.length&&O6(Z.charCodeAt(q)))q++}else return V=3,Z.substring(R,q);let w=q;if(q<Z.length&&(Z.charCodeAt(q)===69||Z.charCodeAt(q)===101)){if(q++,q<Z.length&&Z.charCodeAt(q)===43||Z.charCodeAt(q)===45)q++;if(q<Z.length&&O6(Z.charCodeAt(q))){q++;while(q<Z.length&&O6(Z.charCodeAt(q)))q++;w=q}else V=3}return Z.substring(R,w)}function D(){let R="",w=q;while(!0){if(q>=J){R+=Z.substring(w,q),V=2;break}let A=Z.charCodeAt(q);if(A===34){R+=Z.substring(w,q),q++;break}if(A===92){if(R+=Z.substring(w,q),q++,q>=J){V=2;break}switch(Z.charCodeAt(q++)){case 34:R+='"';break;case 92:R+="\\";break;case 47:R+="/";break;case 98:R+="\b";break;case 102:R+="\f";break;case 110:R+=`
19
- `;break;case 114:R+="\r";break;case 116:R+="\t";break;case 117:let T=L(4,!0);if(T>=0)R+=String.fromCharCode(T);else V=4;break;default:V=5}w=q;continue}if(A>=0&&A<=31)if(M2(A)){R+=Z.substring(w,q),V=2;break}else V=6;q++}return R}function M(){if(Q="",V=0,$=q,K=H,G=W,q>=J)return $=J,Y=17;let R=Z.charCodeAt(q);if(B3(R)){do q++,Q+=String.fromCharCode(R),R=Z.charCodeAt(q);while(B3(R));return Y=15}if(M2(R)){if(q++,Q+=String.fromCharCode(R),R===13&&Z.charCodeAt(q)===10)q++,Q+=`
20
- `;return H++,W=q,Y=14}switch(R){case 123:return q++,Y=1;case 125:return q++,Y=2;case 91:return q++,Y=3;case 93:return q++,Y=4;case 58:return q++,Y=6;case 44:return q++,Y=5;case 34:return q++,Q=D(),Y=10;case 47:let w=q-1;if(Z.charCodeAt(q+1)===47){q+=2;while(q<J){if(M2(Z.charCodeAt(q)))break;q++}return Q=Z.substring(w,q),Y=12}if(Z.charCodeAt(q+1)===42){q+=2;let A=J-1,I=!1;while(q<A){let T=Z.charCodeAt(q);if(T===42&&Z.charCodeAt(q+1)===47){q+=2,I=!0;break}if(q++,M2(T)){if(T===13&&Z.charCodeAt(q)===10)q++;H++,W=q}}if(!I)q++,V=1;return Q=Z.substring(w,q),Y=13}return Q+=String.fromCharCode(R),q++,Y=16;case 45:if(Q+=String.fromCharCode(R),q++,q===J||!O6(Z.charCodeAt(q)))return Y=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Q+=z(),Y=11;default:while(q<J&&F(R))q++,R=Z.charCodeAt(q);if($!==q){switch(Q=Z.substring($,q),Q){case"true":return Y=8;case"false":return Y=9;case"null":return Y=7}return Y=16}return Q+=String.fromCharCode(R),q++,Y=16}}function F(R){if(B3(R)||M2(R))return!1;switch(R){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function N(){let R;do R=M();while(R>=12&&R<=15);return R}return{setPosition:_,getPosition:()=>q,scan:X?N:M,getToken:()=>Y,getTokenValue:()=>Q,getTokenOffset:()=>$,getTokenLength:()=>q-$,getTokenStartLine:()=>K,getTokenStartCharacter:()=>$-G,getTokenError:()=>V}}function B3(Z){return Z===32||Z===9}function M2(Z){return Z===10||Z===13}function O6(Z){return Z>=48&&Z<=57}var e$;var m4=B(()=>{(function(Z){Z[Z.lineFeed=10]="lineFeed",Z[Z.carriageReturn=13]="carriageReturn",Z[Z.space=32]="space",Z[Z._0=48]="_0",Z[Z._1=49]="_1",Z[Z._2=50]="_2",Z[Z._3=51]="_3",Z[Z._4=52]="_4",Z[Z._5=53]="_5",Z[Z._6=54]="_6",Z[Z._7=55]="_7",Z[Z._8=56]="_8",Z[Z._9=57]="_9",Z[Z.a=97]="a",Z[Z.b=98]="b",Z[Z.c=99]="c",Z[Z.d=100]="d",Z[Z.e=101]="e",Z[Z.f=102]="f",Z[Z.g=103]="g",Z[Z.h=104]="h",Z[Z.i=105]="i",Z[Z.j=106]="j",Z[Z.k=107]="k",Z[Z.l=108]="l",Z[Z.m=109]="m",Z[Z.n=110]="n",Z[Z.o=111]="o",Z[Z.p=112]="p",Z[Z.q=113]="q",Z[Z.r=114]="r",Z[Z.s=115]="s",Z[Z.t=116]="t",Z[Z.u=117]="u",Z[Z.v=118]="v",Z[Z.w=119]="w",Z[Z.x=120]="x",Z[Z.y=121]="y",Z[Z.z=122]="z",Z[Z.A=65]="A",Z[Z.B=66]="B",Z[Z.C=67]="C",Z[Z.D=68]="D",Z[Z.E=69]="E",Z[Z.F=70]="F",Z[Z.G=71]="G",Z[Z.H=72]="H",Z[Z.I=73]="I",Z[Z.J=74]="J",Z[Z.K=75]="K",Z[Z.L=76]="L",Z[Z.M=77]="M",Z[Z.N=78]="N",Z[Z.O=79]="O",Z[Z.P=80]="P",Z[Z.Q=81]="Q",Z[Z.R=82]="R",Z[Z.S=83]="S",Z[Z.T=84]="T",Z[Z.U=85]="U",Z[Z.V=86]="V",Z[Z.W=87]="W",Z[Z.X=88]="X",Z[Z.Y=89]="Y",Z[Z.Z=90]="Z",Z[Z.asterisk=42]="asterisk",Z[Z.backslash=92]="backslash",Z[Z.closeBrace=125]="closeBrace",Z[Z.closeBracket=93]="closeBracket",Z[Z.colon=58]="colon",Z[Z.comma=44]="comma",Z[Z.dot=46]="dot",Z[Z.doubleQuote=34]="doubleQuote",Z[Z.minus=45]="minus",Z[Z.openBrace=123]="openBrace",Z[Z.openBracket=91]="openBracket",Z[Z.plus=43]="plus",Z[Z.slash=47]="slash",Z[Z.formFeed=12]="formFeed",Z[Z.tab=9]="tab"})(e$||(e$={}))});var M0,L3,Z9;var X9=B(()=>{M0=Array(20).fill(0).map((Z,X)=>{return" ".repeat(X)}),L3={" ":{"\n":Array(200).fill(0).map((Z,X)=>{return`
21
- `+" ".repeat(X)}),"\r":Array(200).fill(0).map((Z,X)=>{return"\r"+" ".repeat(X)}),"\r\n":Array(200).fill(0).map((Z,X)=>{return`\r
22
- `+" ".repeat(X)})},"\t":{"\n":Array(200).fill(0).map((Z,X)=>{return`
23
- `+"\t".repeat(X)}),"\r":Array(200).fill(0).map((Z,X)=>{return"\r"+"\t".repeat(X)}),"\r\n":Array(200).fill(0).map((Z,X)=>{return`\r
24
- `+"\t".repeat(X)})}},Z9=[`
25
- `,"\r",`\r
26
- `]});function _3(Z,X,J){let q,Q,$,Y,H;if(X){Y=X.offset,H=Y+X.length,$=Y;while($>0&&!D2(Z,$-1))$--;let A=H;while(A<Z.length&&!D2(Z,A))A++;Q=Z.substring($,A),q=sR(Q,J)}else Q=Z,q=0,$=0,Y=0,H=Z.length;let K=rR(J,Z),W=Z9.includes(K),G=0,V=0,L;if(J.insertSpaces)L=M0[J.tabSize||4]??w6(M0[1],J.tabSize||4);else L="\t";let _=L==="\t"?"\t":" ",z=F2(Q,!1),D=!1;function M(){if(G>1)return w6(K,G)+w6(L,q+V);let A=L.length*(q+V);if(!W||A>L3[_][K].length)return K+w6(L,q+V);if(A<=0)return K;return L3[_][K][A]}function F(){let A=z.scan();G=0;while(A===15||A===14){if(A===14&&J.keepLines)G+=1;else if(A===14)G=1;A=z.scan()}return D=A===16||z.getTokenError()!==0,A}let N=[];function R(A,I,T){if(!D&&(!X||I<H&&T>Y)&&Z.substring(I,T)!==A)N.push({offset:I,length:T-I,content:A})}let w=F();if(J.keepLines&&G>0)R(w6(K,G),0,0);if(w!==17){let A=z.getTokenOffset()+$,I=L.length*q<20&&J.insertSpaces?M0[L.length*q]:w6(L,q);R(I,$,A)}while(w!==17){let A=z.getTokenOffset()+z.getTokenLength()+$,I=F(),T="",b=!1;while(G===0&&(I===12||I===13)){let x=z.getTokenOffset()+$;R(M0[1],A,x),A=z.getTokenOffset()+z.getTokenLength()+$,b=I===12,T=b?M():"",I=F()}if(I===2){if(w!==1)V--;if(J.keepLines&&G>0||!J.keepLines&&w!==1)T=M();else if(J.keepLines)T=M0[1]}else if(I===4){if(w!==3)V--;if(J.keepLines&&G>0||!J.keepLines&&w!==3)T=M();else if(J.keepLines)T=M0[1]}else{switch(w){case 3:case 1:if(V++,J.keepLines&&G>0||!J.keepLines)T=M();else T=M0[1];break;case 5:if(J.keepLines&&G>0||!J.keepLines)T=M();else T=M0[1];break;case 12:T=M();break;case 13:if(G>0)T=M();else if(!b)T=M0[1];break;case 6:if(J.keepLines&&G>0)T=M();else if(!b)T=M0[1];break;case 10:if(J.keepLines&&G>0)T=M();else if(I===6&&!b)T="";break;case 7:case 8:case 9:case 11:case 2:case 4:if(J.keepLines&&G>0)T=M();else if((I===12||I===13)&&!b)T=M0[1];else if(I!==5&&I!==17)D=!0;break;case 16:D=!0;break}if(G>0&&(I===12||I===13))T=M()}if(I===17)if(J.keepLines&&G>0)T=M();else T=J.insertFinalNewline?K:"";let j=z.getTokenOffset()+$;R(T,A,j),w=I}return N}function w6(Z,X){let J="";for(let q=0;q<X;q++)J+=Z;return J}function sR(Z,X){let J=0,q=0,Q=X.tabSize||4;while(J<Z.length){let $=Z.charAt(J);if($===M0[1])q++;else if($==="\t")q+=Q;else break;J++}return Math.floor(q/Q)}function rR(Z,X){for(let J=0;J<X.length;J++){let q=X.charAt(J);if(q==="\r"){if(J+1<X.length&&X.charAt(J+1)===`
27
- `)return`\r
28
- `;return"\r"}else if(q===`
29
- `)return`
30
- `}return Z&&Z.eol||`
31
- `}function D2(Z,X){return`\r
32
- `.indexOf(Z.charAt(X))!==-1}var z3=B(()=>{m4();X9()});function J9(Z,X=[],J=T2.DEFAULT){let q=null,Q=[],$=[];function Y(K){if(Array.isArray(Q))Q.push(K);else if(q!==null)Q[q]=K}return M3(Z,{onObjectBegin:()=>{let K={};Y(K),$.push(Q),Q=K,q=null},onObjectProperty:(K)=>{q=K},onObjectEnd:()=>{Q=$.pop()},onArrayBegin:()=>{let K=[];Y(K),$.push(Q),Q=K,q=null},onArrayEnd:()=>{Q=$.pop()},onLiteralValue:Y,onError:(K,W,G)=>{X.push({error:K,offset:W,length:G})}},J),Q[0]}function R3(Z,X=[],J=T2.DEFAULT){let q={type:"array",offset:-1,length:-1,children:[],parent:void 0};function Q(K){if(q.type==="property")q.length=K-q.offset,q=q.parent}function $(K){return q.children.push(K),K}M3(Z,{onObjectBegin:(K)=>{q=$({type:"object",offset:K,length:-1,parent:q,children:[]})},onObjectProperty:(K,W,G)=>{q=$({type:"property",offset:W,length:-1,parent:q,children:[]}),q.children.push({type:"string",value:K,offset:W,length:G,parent:q})},onObjectEnd:(K,W)=>{Q(K+W),q.length=K+W-q.offset,q=q.parent,Q(K+W)},onArrayBegin:(K,W)=>{q=$({type:"array",offset:K,length:-1,parent:q,children:[]})},onArrayEnd:(K,W)=>{q.length=K+W-q.offset,q=q.parent,Q(K+W)},onLiteralValue:(K,W,G)=>{$({type:eR(K),offset:W,length:G,parent:q,value:K}),Q(W+G)},onSeparator:(K,W,G)=>{if(q.type==="property"){if(K===":")q.colonOffset=W;else if(K===",")Q(W)}},onError:(K,W,G)=>{X.push({error:K,offset:W,length:G})}},J);let H=q.children[0];if(H)delete H.parent;return H}function u4(Z,X){if(!Z)return;let J=Z;for(let q of X)if(typeof q==="string"){if(J.type!=="object"||!Array.isArray(J.children))return;let Q=!1;for(let $ of J.children)if(Array.isArray($.children)&&$.children[0].value===q&&$.children.length===2){J=$.children[1],Q=!0;break}if(!Q)return}else{let Q=q;if(J.type!=="array"||Q<0||!Array.isArray(J.children)||Q>=J.children.length)return;J=J.children[Q]}return J}function M3(Z,X,J=T2.DEFAULT){let q=F2(Z,!1),Q=[],$=0;function Y(P){return P?()=>$===0&&P(q.getTokenOffset(),q.getTokenLength(),q.getTokenStartLine(),q.getTokenStartCharacter()):()=>!0}function H(P){return P?(C)=>$===0&&P(C,q.getTokenOffset(),q.getTokenLength(),q.getTokenStartLine(),q.getTokenStartCharacter()):()=>!0}function K(P){return P?(C)=>$===0&&P(C,q.getTokenOffset(),q.getTokenLength(),q.getTokenStartLine(),q.getTokenStartCharacter(),()=>Q.slice()):()=>!0}function W(P){return P?()=>{if($>0)$++;else if(P(q.getTokenOffset(),q.getTokenLength(),q.getTokenStartLine(),q.getTokenStartCharacter(),()=>Q.slice())===!1)$=1}:()=>!0}function G(P){return P?()=>{if($>0)$--;if($===0)P(q.getTokenOffset(),q.getTokenLength(),q.getTokenStartLine(),q.getTokenStartCharacter())}:()=>!0}let V=W(X.onObjectBegin),L=K(X.onObjectProperty),_=G(X.onObjectEnd),z=W(X.onArrayBegin),D=G(X.onArrayEnd),M=K(X.onLiteralValue),F=H(X.onSeparator),N=Y(X.onComment),R=H(X.onError),w=J&&J.disallowComments,A=J&&J.allowTrailingComma;function I(){while(!0){let P=q.scan();switch(q.getTokenError()){case 4:T(14);break;case 5:T(15);break;case 3:T(13);break;case 1:if(!w)T(11);break;case 2:T(12);break;case 6:T(16);break}switch(P){case 12:case 13:if(w)T(10);else N();break;case 16:T(1);break;case 15:case 14:break;default:return P}}}function T(P,C=[],p=[]){if(R(P),C.length+p.length>0){let g=q.getToken();while(g!==17){if(C.indexOf(g)!==-1){I();break}else if(p.indexOf(g)!==-1)break;g=I()}}}function b(P){let C=q.getTokenValue();if(P)M(C);else L(C),Q.push(C);return I(),!0}function j(){switch(q.getToken()){case 11:let P=q.getTokenValue(),C=Number(P);if(isNaN(C))T(2),C=0;M(C);break;case 7:M(null);break;case 8:M(!0);break;case 9:M(!1);break;default:return!1}return I(),!0}function x(){if(q.getToken()!==10)return T(3,[],[2,5]),!1;if(b(!1),q.getToken()===6){if(F(":"),I(),!r())T(4,[],[2,5])}else T(5,[],[2,5]);return Q.pop(),!0}function v(){V(),I();let P=!1;while(q.getToken()!==2&&q.getToken()!==17){if(q.getToken()===5){if(!P)T(4,[],[]);if(F(","),I(),q.getToken()===2&&A)break}else if(P)T(6,[],[]);if(!x())T(4,[],[2,5]);P=!0}if(_(),q.getToken()!==2)T(7,[2],[]);else I();return!0}function h(){z(),I();let P=!0,C=!1;while(q.getToken()!==4&&q.getToken()!==17){if(q.getToken()===5){if(!C)T(4,[],[]);if(F(","),I(),q.getToken()===4&&A)break}else if(C)T(6,[],[]);if(P)Q.push(0),P=!1;else Q[Q.length-1]++;if(!r())T(4,[],[4,5]);C=!0}if(D(),!P)Q.pop();if(q.getToken()!==4)T(8,[4],[]);else I();return!0}function r(){switch(q.getToken()){case 3:return h();case 1:return v();case 10:return b(!0);default:return j()}}if(I(),q.getToken()===17){if(J.allowEmptyContent)return!0;return T(4,[],[]),!1}if(!r())return T(4,[],[]),!1;if(q.getToken()!==17)T(9,[],[]);return!0}function eR(Z){switch(typeof Z){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(!Z)return"null";else if(Array.isArray(Z))return"array";return"object"}default:return"null"}}var T2;var F3=B(()=>{m4();(function(Z){Z.DEFAULT={allowTrailingComma:!1}})(T2||(T2={}))});function q9(Z,X,J,q){let Q=X.slice(),Y=R3(Z,[]),H=void 0,K=void 0;while(Q.length>0)if(K=Q.pop(),H=u4(Y,Q),H===void 0&&J!==void 0)if(typeof K==="string")J={[K]:J};else J=[J];else break;if(!H){if(J===void 0)throw Error("Can not delete in empty document");return S1(Z,{offset:Y?Y.offset:0,length:Y?Y.length:0,content:JSON.stringify(J)},q)}else if(H.type==="object"&&typeof K==="string"&&Array.isArray(H.children)){let W=u4(H,[K]);if(W!==void 0)if(J===void 0){if(!W.parent)throw Error("Malformed AST");let G=H.children.indexOf(W.parent),V,L=W.parent.offset+W.parent.length;if(G>0){let _=H.children[G-1];V=_.offset+_.length}else if(V=H.offset+1,H.children.length>1)L=H.children[1].offset;return S1(Z,{offset:V,length:L-V,content:""},q)}else return S1(Z,{offset:W.offset,length:W.length,content:JSON.stringify(J)},q);else{if(J===void 0)return[];let G=`${JSON.stringify(K)}: ${JSON.stringify(J)}`,V=q.getInsertionIndex?q.getInsertionIndex(H.children.map((_)=>_.children[0].value)):H.children.length,L;if(V>0){let _=H.children[V-1];L={offset:_.offset+_.length,length:0,content:","+G}}else if(H.children.length===0)L={offset:H.offset+1,length:0,content:G};else L={offset:H.offset+1,length:0,content:G+","};return S1(Z,L,q)}}else if(H.type==="array"&&typeof K==="number"&&Array.isArray(H.children)){let W=K;if(W===-1){let G=`${JSON.stringify(J)}`,V;if(H.children.length===0)V={offset:H.offset+1,length:0,content:G};else{let L=H.children[H.children.length-1];V={offset:L.offset+L.length,length:0,content:","+G}}return S1(Z,V,q)}else if(J===void 0&&H.children.length>=0){let G=K,V=H.children[G],L;if(H.children.length===1)L={offset:H.offset+1,length:H.length-2,content:""};else if(H.children.length-1===G){let _=H.children[G-1],z=_.offset+_.length,D=H.offset+H.length;L={offset:z,length:D-2-z,content:""}}else L={offset:V.offset,length:H.children[G+1].offset-V.offset,content:""};return S1(Z,L,q)}else if(J!==void 0){let G,V=`${JSON.stringify(J)}`;if(!q.isArrayInsertion&&H.children.length>K){let L=H.children[K];G={offset:L.offset,length:L.length,content:V}}else if(H.children.length===0||K===0)G={offset:H.offset+1,length:0,content:H.children.length===0?V:V+","};else{let L=K>H.children.length?H.children.length:K,_=H.children[L-1];G={offset:_.offset+_.length,length:0,content:","+V}}return S1(Z,G,q)}else throw Error(`Can not ${J===void 0?"remove":q.isArrayInsertion?"insert":"modify"} Array index ${W} as length is not sufficient`)}else throw Error(`Can not add ${typeof K!=="number"?"index":"property"} to parent of type ${H.type}`)}function S1(Z,X,J){if(!J.formattingOptions)return[X];let q=p4(Z,X),Q=X.offset,$=X.offset+X.content.length;if(X.length===0||X.content.length===0){while(Q>0&&!D2(q,Q-1))Q--;while($<q.length&&!D2(q,$))$++}let Y=_3(q,{offset:Q,length:$-Q},{...J.formattingOptions,keepLines:!1});for(let K=Y.length-1;K>=0;K--){let W=Y[K];q=p4(q,W),Q=Math.min(Q,W.offset),$=Math.max($,W.offset+W.length),$+=W.content.length-W.length}let H=Z.length-(q.length-$)-Q;return[{offset:Q,length:H,content:q.substring(Q,$)}]}function p4(Z,X){return Z.substring(0,X.offset)+X.content+Z.substring(X.offset+X.length)}var Q9=B(()=>{z3();F3()});function U9(Z,X,J,q){return q9(Z,X,J,q)}function K9(Z,X){let J=X.slice(0).sort((Q,$)=>{let Y=Q.offset-$.offset;if(Y===0)return Q.length-$.length;return Y}),q=Z.length;for(let Q=J.length-1;Q>=0;Q--){let $=J[Q];if($.offset+$.length<=q)Z=p4(Z,$);else throw Error("Overlapping edit");q=$.offset}return Z}var $9,Y9,D3,H9;var G9=B(()=>{z3();Q9();m4();F3();(function(Z){Z[Z.None=0]="None",Z[Z.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",Z[Z.UnexpectedEndOfString=2]="UnexpectedEndOfString",Z[Z.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",Z[Z.InvalidUnicode=4]="InvalidUnicode",Z[Z.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",Z[Z.InvalidCharacter=6]="InvalidCharacter"})($9||($9={}));(function(Z){Z[Z.OpenBraceToken=1]="OpenBraceToken",Z[Z.CloseBraceToken=2]="CloseBraceToken",Z[Z.OpenBracketToken=3]="OpenBracketToken",Z[Z.CloseBracketToken=4]="CloseBracketToken",Z[Z.CommaToken=5]="CommaToken",Z[Z.ColonToken=6]="ColonToken",Z[Z.NullKeyword=7]="NullKeyword",Z[Z.TrueKeyword=8]="TrueKeyword",Z[Z.FalseKeyword=9]="FalseKeyword",Z[Z.StringLiteral=10]="StringLiteral",Z[Z.NumericLiteral=11]="NumericLiteral",Z[Z.LineCommentTrivia=12]="LineCommentTrivia",Z[Z.BlockCommentTrivia=13]="BlockCommentTrivia",Z[Z.LineBreakTrivia=14]="LineBreakTrivia",Z[Z.Trivia=15]="Trivia",Z[Z.Unknown=16]="Unknown",Z[Z.EOF=17]="EOF"})(Y9||(Y9={}));D3=J9;(function(Z){Z[Z.InvalidSymbol=1]="InvalidSymbol",Z[Z.InvalidNumberFormat=2]="InvalidNumberFormat",Z[Z.PropertyNameExpected=3]="PropertyNameExpected",Z[Z.ValueExpected=4]="ValueExpected",Z[Z.ColonExpected=5]="ColonExpected",Z[Z.CommaExpected=6]="CommaExpected",Z[Z.CloseBraceExpected=7]="CloseBraceExpected",Z[Z.CloseBracketExpected=8]="CloseBracketExpected",Z[Z.EndOfFileExpected=9]="EndOfFileExpected",Z[Z.InvalidCommentToken=10]="InvalidCommentToken",Z[Z.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",Z[Z.UnexpectedEndOfString=12]="UnexpectedEndOfString",Z[Z.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",Z[Z.InvalidUnicode=14]="InvalidUnicode",Z[Z.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",Z[Z.InvalidCharacter=16]="InvalidCharacter"})(H9||(H9={}))});import{open as JM,readFile as qM,stat as QM}from"fs/promises";function V9(Z,X){try{return{ok:!0,value:JSON.parse(p0(Z))}}catch(J){if(X)m(J);return{ok:!1}}}function ny(Z){if(!Z)return null;try{return D3(p0(Z))}catch(X){return m(X),null}}function YM(Z){let X=B9,J=Z.length,q=X(Z);if(!q.error||q.done||q.read>=J)return q.values;let{values:Q,read:$}=q;while($<J){let Y=typeof Z==="string"?Z.indexOf(`
33
- `,$):Z.indexOf(10,$);if(Y===-1)break;$=Y+1;let H=X(Z,$);if(H.values.length>0)Q=Q.concat(H.values);if(!H.error||H.done||H.read>=J)break;$=H.read}return Q}function HM(Z){let X=Z.length,J=0;if(Z[0]===239&&Z[1]===187&&Z[2]===191)J=3;let q=[];while(J<X){let Q=Z.indexOf(10,J);if(Q===-1)Q=X;let $=Z.toString("utf8",J,Q).trim();if(J=Q+1,!$)continue;try{q.push(JSON.parse($))}catch{}}return q}function UM(Z){let X=p0(Z),J=X.length,q=0,Q=[];while(q<J){let $=X.indexOf(`
34
- `,q);if($===-1)$=J;let Y=X.substring(q,$).trim();if(q=$+1,!Y)continue;try{Q.push(JSON.parse(Y))}catch{}}return Q}function T3(Z){if(B9)return YM(Z);if(typeof Z==="string")return UM(Z);return HM(Z)}async function iy(Z){let H=[];try{let{size:X}=await QM(Z);if(X<=A2)return T3(await qM(Z));const J=R6(H,await JM(Z,"r"),1);let q=Buffer.allocUnsafe(A2);let Q=0;let $=X-A2;while(Q<A2){let{bytesRead:L}=await J.read(q,Q,A2-Q,$+Q);if(L===0)break;Q+=L}let Y=q.indexOf(10);if(Y!==-1&&Y<Q-1)return T3(q.subarray(Y+1,Q));return T3(q.subarray(0,Q))}catch(K){var W=K,G=1}finally{var V=M6(H,W,G);V&&await V}}function ay(Z,X){try{if(!Z||Z.trim()==="")return f([X],null,4);let J=p0(Z),q=D3(J);if(Array.isArray(q)){let Q=q.length,H=U9(J,Q===0?[0]:[Q],X,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});if(!H||H.length===0){let K=[...q,X];return f(K,null,4)}return K9(J,H)}else return f([X],null,4)}catch(J){return m(J),f([X],null,4)}}var $M=8192,W9,C0,B9,A2=104857600;var d4=B(()=>{G9();S4();u0();P4();L0();W9=z1(V9,(Z)=>Z,50),C0=Object.assign(function(X,J=!0){if(!X)return null;let q=X.length>$M?V9(X,J):W9(X,J);return q.ok?q.value:null},{cache:W9.cache});B9=(()=>{if(typeof Bun>"u")return!1;let X=Bun.JSONL;if(!X?.parseChunk)return!1;return X.parseChunk})()});function ey(Z){switch(Z){case"userSettings":return"user";case"projectSettings":return"project";case"localSettings":return"project, gitignored";case"flagSettings":return"cli flag";case"policySettings":return"managed"}}function ZS(Z){switch(Z){case"userSettings":return"User";case"projectSettings":return"Project";case"localSettings":return"Local";case"flagSettings":return"Flag";case"policySettings":return"Managed";case"plugin":return"Plugin";case"built-in":return"Built-in"}}function XS(Z){switch(Z){case"userSettings":return"user settings";case"projectSettings":return"shared project settings";case"localSettings":return"project local settings";case"flagSettings":return"command line arguments";case"policySettings":return"enterprise managed settings";case"cliArg":return"CLI argument";case"command":return"command configuration";case"session":return"current session"}}function JS(Z){switch(Z){case"userSettings":return"User settings";case"projectSettings":return"Shared project settings";case"localSettings":return"Project local settings";case"flagSettings":return"Command line arguments";case"policySettings":return"Enterprise managed settings";case"cliArg":return"CLI argument";case"command":return"Command configuration";case"session":return"Current session"}}function qS(Z){if(Z==="")return[];let X=Z.split(",").map((q)=>q.trim()),J=[];for(let q of X)switch(q){case"user":J.push("userSettings");break;case"project":J.push("projectSettings");break;case"local":J.push("localSettings");break;default:throw Error(`Invalid setting source: ${q}. Valid options are: user, project, local`)}return J}function I2(){let Z=L9(),X=new Set(Z);return X.add("policySettings"),X.add("flagSettings"),Array.from(X)}function QS(Z){return I2().includes(Z)}var ty,$S,_9="https://json.schemastore.org/claude-code-settings.json";var A3=B(()=>{j6();ty=["userSettings","projectSettings","localSettings","flagSettings","policySettings"];$S=["localSettings","projectSettings","userSettings"]});function z9(Z){c4.set(Z,Date.now())}function HS(Z,X){let J=c4.get(Z);if(J!==void 0&&Date.now()-J<X)return c4.delete(Z),!0;return!1}function US(){c4.clear()}var c4;var R9=B(()=>{c4=new Map});import{join as KM}from"path";var F1,O2;var l4=B(()=>{L1();z6();F1=u(function(){switch(v0()){case"macos":return"/Library/Application Support/ClaudeCode";case"windows":return"C:\\Program Files\\ClaudeCode";default:return"/etc/claude-code"}}),O2=u(function(){return KM(F1(),"managed-settings.d")})});var GM,WM,M9;var F9=B(()=>{l0();b1();GM=O(()=>U.object({allowedDomains:U.array(U.string()).optional(),allowManagedDomainsOnly:U.boolean().optional().describe("When true (and set in managed settings), only allowedDomains and WebFetch(domain:...) allow rules from managed settings are respected. User, project, local, and flag settings domains are ignored. Denied domains are still respected from all sources."),allowUnixSockets:U.array(U.string()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path)."),allowAllUnixSockets:U.boolean().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms)."),allowLocalBinding:U.boolean().optional(),httpProxyPort:U.number().optional(),socksProxyPort:U.number().optional()}).optional()),WM=O(()=>U.object({allowWrite:U.array(U.string()).optional().describe("Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules."),denyWrite:U.array(U.string()).optional().describe("Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules."),denyRead:U.array(U.string()).optional().describe("Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules."),allowRead:U.array(U.string()).optional().describe("Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths."),allowManagedReadPathsOnly:U.boolean().optional().describe("When true (set in managed settings), only allowRead paths from policySettings are used.")}).optional()),M9=O(()=>U.object({enabled:U.boolean().optional(),failIfUnavailable:U.boolean().optional().describe("Exit with an error at startup if sandbox.enabled is true but the sandbox cannot start (missing dependencies, unsupported platform, or platform not in enabledPlatforms). When false (default), a warning is shown and commands run unsandboxed. Intended for managed-settings deployments that require sandboxing as a hard gate."),autoAllowBashIfSandboxed:U.boolean().optional(),allowUnsandboxedCommands:U.boolean().optional().describe("Allow trusted, user-initiated commands to run outside the sandbox. When false, sandbox override requests are ignored and all commands must run sandboxed. Default: true."),network:GM(),filesystem:WM(),ignoreViolations:U.record(U.string(),U.array(U.string())).optional(),enableWeakerNestedSandbox:U.boolean().optional(),enableWeakerNetworkIsolation:U.boolean().optional().describe("macOS only: Allow access to com.apple.trustd.agent in the sandbox. Needed for Go-based CLI tools (gh, gcloud, terraform, etc.) to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. "+"**Reduces security** — opens a potential data exfiltration vector through the trustd service. Default: false"),excludedCommands:U.array(U.string()).optional(),ripgrep:U.object({command:U.string(),args:U.array(U.string()).optional()}).optional().describe("Custom ripgrep configuration for bundled ripgrep support")}).passthrough())});function D9(){return process.versions.bun!==void 0}function RS(){return typeof Bun<"u"&&Array.isArray(Bun.embeddedFiles)&&Bun.embeddedFiles.length>0}var T9=()=>{};function t(Z){if(typeof Z!=="object"||Z===null)return!1;let X=Object.getPrototypeOf(Z);return(X===null||X===Object.prototype||Object.getPrototypeOf(X)===null)&&!(Symbol.toStringTag in Z)&&!(Symbol.iterator in Z)}var X1=()=>{};import{fileURLToPath as VM}from"node:url";var N6=(Z,X)=>{let J=O3(BM(Z));if(typeof J!=="string")throw TypeError(`${X} must be a string or a file URL: ${J}.`);return J},BM=(Z)=>I3(Z)?Z.toString():Z,I3=(Z)=>typeof Z!=="string"&&Z&&Object.getPrototypeOf(Z)===String.prototype,O3=(Z)=>Z instanceof URL?VM(Z):Z;var k6=()=>{};var n4=(Z,X=[],J={})=>{let q=N6(Z,"First argument"),[Q,$]=t(X)?[[],X]:[X,J];if(!Array.isArray(Q))throw TypeError(`Second argument must be either an array of arguments or an options object: ${Q}`);if(Q.some((K)=>typeof K==="object"&&K!==null))throw TypeError(`Second argument must be an array of strings: ${Q}`);let Y=Q.map(String),H=Y.find((K)=>K.includes("\x00"));if(H!==void 0)throw TypeError(`Arguments cannot contain null bytes ("\\0"): ${H}`);if(!t($))throw TypeError(`Last argument must be an options object: ${$}`);return[q,Y,$]};var w3=B(()=>{X1();k6()});import{StringDecoder as LM}from"node:string_decoder";var A9,I9=(Z)=>A9.call(Z)==="[object ArrayBuffer]",X0=(Z)=>A9.call(Z)==="[object Uint8Array]",J1=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),_M,O9=(Z)=>_M.encode(Z),zM,i4=(Z)=>zM.decode(Z),w9=(Z,X)=>{return RM(Z,X).join("")},RM=(Z,X)=>{if(X==="utf8"&&Z.every(($)=>typeof $==="string"))return Z;let J=new LM(X),q=Z.map(($)=>typeof $==="string"?O9($):$).map(($)=>J.write($)),Q=J.end();return Q===""?q:[...q,Q]},w2=(Z)=>{if(Z.length===1&&X0(Z[0]))return Z[0];return j3(MM(Z))},MM=(Z)=>Z.map((X)=>typeof X==="string"?O9(X):X),j3=(Z)=>{let X=new Uint8Array(FM(Z)),J=0;for(let q of Z)X.set(q,J),J+=q.length;return X},FM=(Z)=>{let X=0;for(let J of Z)X+=J.length;return X};var F0=B(()=>{({toString:A9}=Object.prototype),_M=new TextEncoder,zM=new TextDecoder});import{ChildProcess as DM}from"node:child_process";var x9=(Z)=>Array.isArray(Z)&&Array.isArray(Z.raw),E9=(Z,X)=>{let J=[];for(let[$,Y]of Z.entries())J=TM({templates:Z,expressions:X,tokens:J,index:$,template:Y});if(J.length===0)throw TypeError("Template script must not be empty");let[q,...Q]=J;return[q,Q,{}]},TM=({templates:Z,expressions:X,tokens:J,index:q,template:Q})=>{if(Q===void 0)throw TypeError(`Invalid backslash sequence: ${Z.raw[q]}`);let{nextTokens:$,leadingWhitespaces:Y,trailingWhitespaces:H}=AM(Q,Z.raw[q]),K=N9(J,$,Y);if(q===X.length)return K;let W=X[q],G=Array.isArray(W)?W.map((V)=>k9(V)):[k9(W)];return N9(K,G,H)},AM=(Z,X)=>{if(X.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let J=[],q=0,Q=j9.has(X[0]);for(let Y=0,H=0;Y<Z.length;Y+=1,H+=1){let K=X[H];if(j9.has(K)){if(q!==Y)J.push(Z.slice(q,Y));q=Y+1}else if(K==="\\"){let W=X[H+1];if(W===`
35
- `)Y-=1,H+=1;else if(W==="u"&&X[H+2]==="{")H=X.indexOf("}",H+3);else H+=IM[W]??1}}let $=q===Z.length;if(!$)J.push(Z.slice(q));return{nextTokens:J,leadingWhitespaces:Q,trailingWhitespaces:$}},j9,IM,N9=(Z,X,J)=>J||Z.length===0||X.length===0?[...Z,...X]:[...Z.slice(0,-1),`${Z.at(-1)}${X[0]}`,...X.slice(1)],k9=(Z)=>{let X=typeof Z;if(X==="string")return Z;if(X==="number")return String(Z);if(t(Z)&&(("stdout"in Z)||("isMaxBuffer"in Z)))return OM(Z);if(Z instanceof DM||Object.prototype.toString.call(Z)==="[object Promise]")throw TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw TypeError(`Unexpected "${X}" in template expression`)},OM=({stdout:Z})=>{if(typeof Z==="string")return Z;if(X0(Z))return i4(Z);if(Z===void 0)throw TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`);throw TypeError(`Unexpected "${typeof Z}" stdout in template expression`)};var P9=B(()=>{X1();F0();j9=new Set([" ","\t","\r",`
36
- `]),IM={x:3,u:5}});import N3 from"node:process";var y0=(Z)=>a4.includes(Z),a4,w0,o4=(Z)=>w0[Z]??`stdio[${Z}]`;var q1=B(()=>{a4=[N3.stdin,N3.stdout,N3.stderr],w0=["stdin","stdout","stderr"]});import{debuglog as wM}from"node:util";var C9=(Z)=>{let X={...Z};for(let J of E3)X[J]=k3(Z,J);return X},k3=(Z,X)=>{let J=Array.from({length:jM(Z)+1}),q=NM(Z[X],J,X);return vM(q,X)},jM=({stdio:Z})=>Array.isArray(Z)?Math.max(Z.length,w0.length):w0.length,NM=(Z,X,J)=>t(Z)?kM(Z,X,J):X.fill(Z),kM=(Z,X,J)=>{for(let q of Object.keys(Z).sort(xM))for(let Q of EM(q,J,X))X[Q]=Z[q];return X},xM=(Z,X)=>v9(Z)<v9(X)?1:-1,v9=(Z)=>{if(Z==="stdout"||Z==="stderr")return 0;return Z==="all"?2:1},EM=(Z,X,J)=>{if(Z==="ipc")return[J.length-1];let q=x3(Z);if(q===void 0||q===0)throw TypeError(`"${X}.${Z}" is invalid.
37
- It must be "${X}.stdout", "${X}.stderr", "${X}.all", "${X}.ipc", or "${X}.fd3", "${X}.fd4" (and so on).`);if(q>=J.length)throw TypeError(`"${X}.${Z}" is invalid: that file descriptor does not exist.
38
- Please set the "stdio" option to ensure that file descriptor exists.`);return q==="all"?[1,2]:[q]},x3=(Z)=>{if(Z==="all")return Z;if(w0.includes(Z))return w0.indexOf(Z);let X=PM.exec(Z);if(X!==null)return Number(X[1])},PM,vM=(Z,X)=>Z.map((J)=>J===void 0?yM[X]:J),CM,yM,E3,Q1=(Z,X)=>X==="ipc"?Z.at(-1):Z[X];var $1=B(()=>{X1();q1();PM=/^fd(\d+)$/,CM=wM("execa").enabled?"full":"none",yM={lines:!1,buffer:!0,maxBuffer:1e8,verbose:CM,stripFinalNewline:!0},E3=["lines","buffer","maxBuffer","verbose","stripFinalNewline"]});var x6=({verbose:Z},X)=>P3(Z,X)!=="none",E6=({verbose:Z},X)=>!["none","short"].includes(P3(Z,X)),y9=({verbose:Z},X)=>{let J=P3(Z,X);return s4(J)?J:void 0},P3=(Z,X)=>X===void 0?SM(Z):Q1(Z,X),SM=(Z)=>Z.find((X)=>s4(X))??r4.findLast((X)=>Z.includes(X)),s4=(Z)=>typeof Z==="function",r4;var D1=B(()=>{$1();r4=["none","short","full"]});import{platform as bM}from"node:process";import{stripVTControlCharacters as hM}from"node:util";var S9=(Z,X)=>{let J=[Z,...X],q=J.join(" "),Q=J.map(($)=>dM(b9($))).join(" ");return{command:q,escapedCommand:Q}},j2=(Z)=>hM(Z).split(`
39
- `).map((X)=>b9(X)).join(`
40
- `),b9=(Z)=>Z.replaceAll(mM,(X)=>gM(X)),gM=(Z)=>{let X=uM[Z];if(X!==void 0)return X;let J=Z.codePointAt(0),q=J.toString(16);return J<=pM?`\\u${q.padStart(4,"0")}`:`\\U${q}`},fM=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},mM,uM,pM=65535,dM=(Z)=>{if(cM.test(Z))return Z;return bM==="win32"?`"${Z.replaceAll('"','""')}"`:`'${Z.replaceAll("'","'\\''")}'`},cM;var t4=B(()=>{mM=fM(),uM={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},cM=/^[\w./-]+$/});import h9 from"node:process";function v3(){let{env:Z}=h9,{TERM:X,TERM_PROGRAM:J}=Z;if(h9.platform!=="win32")return X!=="linux";return Boolean(Z.WT_SESSION)||Boolean(Z.TERMINUS_SUBLIME)||Z.ConEmuTask==="{cmd::Cmder}"||J==="Terminus-Sublime"||J==="vscode"||X==="xterm-256color"||X==="alacritty"||X==="rxvt-unicode"||X==="rxvt-unicode-256color"||Z.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var g9=()=>{};var f9,m9,lM,nM,iM,aM,oM,e4,lS;var u9=B(()=>{g9();f9={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},m9={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},lM={tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},nM={...f9,...m9},iM={...f9,...lM},aM=v3(),oM=aM?nM:iM,e4=oM,lS=Object.entries(m9)});import sM from"node:tty";var rM,y=(Z,X)=>{if(!rM)return(Q)=>Q;let J=`\x1B[${Z}m`,q=`\x1B[${X}m`;return(Q)=>{let $=Q+"",Y=$.indexOf(q);if(Y===-1)return J+$+q;let H=J,K=0,G=(X===22?q:"")+J;while(Y!==-1)H+=$.slice(K,Y)+G,K=Y+q.length,Y=$.indexOf(q,K);return H+=$.slice(K)+q,H}},aS,p9,oS,sS,rS,tS,eS,Zb,Xb,Jb,qb,Qb,$b,Yb,Hb,Ub,Kb,Z8,Gb,Wb,Vb,Bb,Lb,_b,zb,Rb,Mb,d9,Fb,c9,Db,Tb,Ab,Ib,Ob,wb,jb,Nb,kb,xb,Eb;var l9=B(()=>{rM=sM?.WriteStream?.prototype?.hasColors?.()??!1,aS=y(0,0),p9=y(1,22),oS=y(2,22),sS=y(3,23),rS=y(4,24),tS=y(53,55),eS=y(7,27),Zb=y(8,28),Xb=y(9,29),Jb=y(30,39),qb=y(31,39),Qb=y(32,39),$b=y(33,39),Yb=y(34,39),Hb=y(35,39),Ub=y(36,39),Kb=y(37,39),Z8=y(90,39),Gb=y(40,49),Wb=y(41,49),Vb=y(42,49),Bb=y(43,49),Lb=y(44,49),_b=y(45,49),zb=y(46,49),Rb=y(47,49),Mb=y(100,49),d9=y(91,39),Fb=y(92,39),c9=y(93,39),Db=y(94,39),Tb=y(95,39),Ab=y(96,39),Ib=y(97,39),Ob=y(101,49),wb=y(102,49),jb=y(103,49),Nb=y(104,49),kb=y(105,49),xb=y(106,49),Eb=y(107,49)});var n9=B(()=>{l9()});var o9=({type:Z,message:X,timestamp:J,piped:q,commandId:Q,result:{failed:$=!1}={},options:{reject:Y=!0}})=>{let H=tM(J),K=eM[Z]({failed:$,reject:Y,piped:q}),W=ZF[Z]({reject:Y});return`${Z8(`[${H}]`)} ${Z8(`[${Q}]`)} ${W(K)} ${W(X)}`},tM=(Z)=>`${X8(Z.getHours(),2)}:${X8(Z.getMinutes(),2)}:${X8(Z.getSeconds(),2)}.${X8(Z.getMilliseconds(),3)}`,X8=(Z,X)=>String(Z).padStart(X,"0"),i9=({failed:Z,reject:X})=>{if(!Z)return e4.tick;return X?e4.cross:e4.warning},eM,a9=(Z)=>Z,ZF;var s9=B(()=>{u9();n9();eM={command:({piped:Z})=>Z?"|":"$",output:()=>" ",ipc:()=>"*",error:i9,duration:i9},ZF={command:()=>p9,output:()=>a9,ipc:()=>a9,error:({reject:Z})=>Z?d9:c9,duration:()=>Z8}});var r9=(Z,X,J)=>{let q=y9(X,J);return Z.map(({verboseLine:Q,verboseObject:$})=>XF(Q,$,q)).filter((Q)=>Q!==void 0).map((Q)=>JF(Q)).join("")},XF=(Z,X,J)=>{if(J===void 0)return Z;let q=J(Z,X);if(typeof q==="string")return q},JF=(Z)=>Z.endsWith(`
41
- `)?Z:`${Z}
42
- `;var t9=B(()=>{D1()});import{inspect as qF}from"node:util";var n0=({type:Z,verboseMessage:X,fdNumber:J,verboseInfo:q,result:Q})=>{let $=QF({type:Z,result:Q,verboseInfo:q}),Y=$F(X,$),H=r9(Y,q,J);if(H!=="")console.warn(H.slice(0,-1))},QF=({type:Z,result:X,verboseInfo:{escapedCommand:J,commandId:q,rawOptions:{piped:Q=!1,...$}}})=>({type:Z,escapedCommand:J,commandId:`${q}`,timestamp:new Date,piped:Q,result:X,options:$}),$F=(Z,X)=>Z.split(`
43
- `).map((J)=>YF({...X,message:J})),YF=(Z)=>{return{verboseLine:o9(Z),verboseObject:Z}},J8=(Z)=>{let X=typeof Z==="string"?Z:qF(Z);return j2(X).replaceAll("\t"," ".repeat(HF))},HF=2;var P6=B(()=>{t4();s9();t9()});var e9=(Z,X)=>{if(!x6(X))return;n0({type:"command",verboseMessage:Z,verboseInfo:X})};var ZY=B(()=>{D1();P6()});var XY=(Z,X,J)=>{GF(Z);let q=UF(Z);return{verbose:Z,escapedCommand:X,commandId:q,rawOptions:J}},UF=(Z)=>x6({verbose:Z})?KF++:void 0,KF=0n,GF=(Z)=>{for(let X of Z){if(X===!1)throw TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(X===!0)throw TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!r4.includes(X)&&!s4(X)){let J=r4.map((q)=>`'${q}'`).join(", ");throw TypeError(`The "verbose" option must not be ${X}. Allowed values are: ${J} or a function.`)}}};var JY=B(()=>{D1()});import{hrtime as qY}from"node:process";var q8=()=>qY.bigint(),C3=(Z)=>Number(qY.bigint()-Z)/1e6;var Q8=()=>{};var $8=(Z,X,J)=>{let q=q8(),{command:Q,escapedCommand:$}=S9(Z,X),Y=k3(J,"verbose"),H=XY(Y,$,{...J});return e9($,H),{command:Q,escapedCommand:$,startTime:q,verboseInfo:H}};var y3=B(()=>{ZY();JY();Q8();t4();$1()});function Y8(Z={}){let{env:X=process.env,platform:J=process.platform}=Z;if(J!=="win32")return"PATH";return Object.keys(X).reverse().find((q)=>q.toUpperCase()==="PATH")||"Path"}var QY=()=>{};var $Y=()=>{};import{promisify as WF}from"node:util";import{execFile as VF,execFileSync as Uh}from"node:child_process";import YY from"node:path";import{fileURLToPath as BF}from"node:url";function H8(Z){return Z instanceof URL?BF(Z):Z}function HY(Z){return{*[Symbol.iterator](){let X=YY.resolve(H8(Z)),J;while(J!==X)yield X,J=X,X=YY.resolve(X,"..")}}}var Wh;var UY=B(()=>{$Y();Wh=WF(VF)});import U8 from"node:process";import h1 from"node:path";var LF=({cwd:Z=U8.cwd(),path:X=U8.env[Y8()],preferLocal:J=!0,execPath:q=U8.execPath,addExecPath:Q=!0}={})=>{let $=h1.resolve(H8(Z)),Y=[],H=X.split(h1.delimiter);if(J)_F(Y,H,$);if(Q)zF(Y,H,q,$);return X===""||X===h1.delimiter?`${Y.join(h1.delimiter)}${X}`:[...Y,X].join(h1.delimiter)},_F=(Z,X,J)=>{for(let q of HY(J)){let Q=h1.join(q,"node_modules/.bin");if(!X.includes(Q))Z.push(Q)}},zF=(Z,X,J,q)=>{let Q=h1.resolve(q,H8(J),"..");if(!X.includes(Q))Z.push(Q)},KY=({env:Z=U8.env,...X}={})=>{Z={...Z};let J=Y8({env:Z});return X.path=Z[J],Z[J]=LF(X),Z};var GY=B(()=>{QY();UY()});var WY=(Z,X,J)=>{let q=J?G8:K8,Q=Z instanceof i0?{}:{cause:Z};return new q(X,Q)},i0,VY=(Z,X)=>{Object.defineProperty(Z.prototype,"name",{value:X,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,LY,{value:!0,writable:!1,enumerable:!1,configurable:!1})},BY=(Z)=>W8(Z)&&(LY in Z),LY,W8=(Z)=>Object.prototype.toString.call(Z)==="[object Error]",K8,G8;var g1=B(()=>{i0=class i0 extends Error{};LY=Symbol("isExecaError");K8=class K8 extends Error{};VY(K8,K8.name);G8=class G8 extends Error{};VY(G8,G8.name)});var _Y=()=>{let Z=S3-zY+1;return Array.from({length:Z},RF)},RF=(Z,X)=>({name:`SIGRT${X+1}`,number:zY+X,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),zY=34,S3=64;var b3=()=>{};var RY;var MY=B(()=>{RY=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]});import{constants as MF}from"node:os";var h3=()=>{let Z=_Y();return[...RY,...Z].map(FF)},FF=({name:Z,number:X,description:J,action:q,forced:Q=!1,standard:$})=>{let{signals:{[Z]:Y}}=MF,H=Y!==void 0;return{name:Z,number:H?Y:X,description:J,supported:H,action:q,forced:Q,standard:$}};var FY=B(()=>{MY();b3()});import{constants as DF}from"node:os";var TF=()=>{let Z=h3();return Object.fromEntries(Z.map(AF))},AF=({name:Z,number:X,description:J,supported:q,action:Q,forced:$,standard:Y})=>[Z,{name:Z,number:X,description:J,supported:q,action:Q,forced:$,standard:Y}],DY,IF=()=>{let Z=h3(),X=S3+1,J=Array.from({length:X},(q,Q)=>OF(Q,Z));return Object.assign({},...J)},OF=(Z,X)=>{let J=wF(Z,X);if(J===void 0)return{};let{name:q,description:Q,supported:$,action:Y,forced:H,standard:K}=J;return{[Z]:{name:q,number:Z,description:Q,supported:$,action:Y,forced:H,standard:K}}},wF=(Z,X)=>{let J=X.find(({name:q})=>DF.signals[q]===Z);if(J!==void 0)return J;return X.find((q)=>q.number===Z)},xh;var TY=B(()=>{b3();FY();DY=TF(),xh=IF()});import{constants as N2}from"node:os";var IY=(Z)=>{if(Z===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return wY(Z,"option `killSignal`")},OY=(Z)=>Z===0?Z:wY(Z,"`subprocess.kill()`'s argument"),wY=(Z,X)=>{if(Number.isInteger(Z))return jF(Z,X);if(typeof Z==="string")return kF(Z,X);throw TypeError(`Invalid ${X} ${String(Z)}: it must be a string or an integer.
44
- ${g3()}`)},jF=(Z,X)=>{if(AY.has(Z))return AY.get(Z);throw TypeError(`Invalid ${X} ${Z}: this signal integer does not exist.
45
- ${g3()}`)},NF=()=>new Map(Object.entries(N2.signals).reverse().map(([Z,X])=>[X,Z])),AY,kF=(Z,X)=>{if(Z in N2.signals)return Z;if(Z.toUpperCase()in N2.signals)throw TypeError(`Invalid ${X} '${Z}': please rename it to '${Z.toUpperCase()}'.`);throw TypeError(`Invalid ${X} '${Z}': this signal name does not exist.
46
- ${g3()}`)},g3=()=>`Available signal names: ${xF()}.
47
- Available signal numbers: ${EF()}.`,xF=()=>Object.keys(N2.signals).sort().map((Z)=>`'${Z}'`).join(", "),EF=()=>[...new Set(Object.values(N2.signals).sort((Z,X)=>Z-X))].join(", "),V8=(Z)=>DY[Z].description;var k2=B(()=>{TY();AY=NF()});import{setTimeout as PF}from"node:timers/promises";var jY=(Z)=>{if(Z===!1)return Z;if(Z===!0)return vF;if(!Number.isFinite(Z)||Z<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`);return Z},vF=5000,NY=({kill:Z,options:{forceKillAfterDelay:X,killSignal:J},onInternalError:q,context:Q,controller:$},Y,H)=>{let{signal:K,error:W}=CF(Y,H,J);yF(W,q);let G=Z(K);return SF({kill:Z,signal:K,forceKillAfterDelay:X,killSignal:J,killResult:G,context:Q,controller:$}),G},CF=(Z,X,J)=>{let[q=J,Q]=W8(Z)?[void 0,Z]:[Z,X];if(typeof q!=="string"&&!Number.isInteger(q))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(q)}`);if(Q!==void 0&&!W8(Q))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${Q}`);return{signal:OY(q),error:Q}},yF=(Z,X)=>{if(Z!==void 0)X.reject(Z)},SF=async({kill:Z,signal:X,forceKillAfterDelay:J,killSignal:q,killResult:Q,context:$,controller:Y})=>{if(X===q&&Q)f3({kill:Z,forceKillAfterDelay:J,context:$,controllerSignal:Y.signal})},f3=async({kill:Z,forceKillAfterDelay:X,context:J,controllerSignal:q})=>{if(X===!1)return;try{if(await PF(X,void 0,{signal:q}),Z("SIGKILL"))J.isForcefullyTerminated??=!0}catch{}};var B8=B(()=>{g1();k2()});import{once as bF}from"node:events";var L8=async(Z,X)=>{if(!Z.aborted)await bF(Z,"abort",{signal:X})};var m3=()=>{};var kY=({cancelSignal:Z})=>{if(Z!==void 0&&Object.prototype.toString.call(Z)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(Z)}`)},xY=({subprocess:Z,cancelSignal:X,gracefulCancel:J,context:q,controller:Q})=>X===void 0||J?[]:[hF(Z,X,q,Q)],hF=async(Z,X,J,{signal:q})=>{throw await L8(X,q),J.terminationReason??="cancel",Z.kill(),X.reason};var u3=B(()=>{m3()});var v6=({methodName:Z,isSubprocess:X,ipc:J,isConnected:q})=>{gF(Z,X,J),p3(Z,X,q)},gF=(Z,X,J)=>{if(!J)throw Error(`${S0(Z,X)} can only be used if the \`ipc\` option is \`true\`.`)},p3=(Z,X,J)=>{if(!J)throw Error(`${S0(Z,X)} cannot be used: the ${T1(X)} has already exited or disconnected.`)},EY=(Z)=>{throw Error(`${S0("getOneMessage",Z)} could not complete: the ${T1(Z)} exited or disconnected.`)},PY=(Z)=>{throw Error(`${S0("sendMessage",Z)} failed: the ${T1(Z)} is sending a message too, instead of listening to incoming messages.
48
- This can be fixed by both sending a message and listening to incoming messages at the same time:
49
-
50
- const [receivedMessage] = await Promise.all([
51
- ${S0("getOneMessage",Z)},
52
- ${S0("sendMessage",Z,"message, {strict: true}")},
53
- ]);`)},_8=(Z,X)=>Error(`${S0("sendMessage",X)} failed when sending an acknowledgment response to the ${T1(X)}.`,{cause:Z}),vY=(Z)=>{throw Error(`${S0("sendMessage",Z)} failed: the ${T1(Z)} is not listening to incoming messages.`)},CY=(Z)=>{throw Error(`${S0("sendMessage",Z)} failed: the ${T1(Z)} exited without listening to incoming messages.`)},yY=()=>Error(`\`cancelSignal\` aborted: the ${T1(!0)} disconnected.`),SY=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},bY=({error:Z,methodName:X,isSubprocess:J})=>{if(Z.code==="EPIPE")throw Error(`${S0(X,J)} cannot be used: the ${T1(J)} is disconnecting.`,{cause:Z})},hY=({error:Z,methodName:X,isSubprocess:J,message:q})=>{if(fF(Z))throw Error(`${S0(X,J)}'s argument type is invalid: the message cannot be serialized: ${String(q)}.`,{cause:Z})},fF=({code:Z,message:X})=>mF.has(Z)||uF.some((J)=>X.includes(J)),mF,uF,S0=(Z,X,J="")=>Z==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${pF(X)}${Z}(${J})`,pF=(Z)=>Z?"":"subprocess.",T1=(Z)=>Z?"parent process":"subprocess",C6=(Z)=>{if(Z.connected)Z.disconnect()};var y6=B(()=>{mF=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),uF=["could not be cloned","circular structure","call stack size exceeded"]});var a0=()=>{let Z={},X=new Promise((J,q)=>{Object.assign(Z,{resolve:J,reject:q})});return Object.assign(X,Z)};var S6=()=>{};var R8=(Z,X="stdin")=>{let{options:q,fileDescriptors:Q}=o0.get(Z),$=gY(Q,X,!0),Y=Z.stdio[$];if(Y===null)throw TypeError(fY($,X,q,!0));return Y},b6=(Z,X="stdout")=>{let{options:q,fileDescriptors:Q}=o0.get(Z),$=gY(Q,X,!1),Y=$==="all"?Z.all:Z.stdio[$];if(Y===null||Y===void 0)throw TypeError(fY($,X,q,!1));return Y},o0,gY=(Z,X,J)=>{let q=dF(X,J);return cF(q,X,J,Z),q},dF=(Z,X)=>{let J=x3(Z);if(J!==void 0)return J;let{validOptions:q,defaultValue:Q}=X?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${x2(X)}" must not be "${Z}".
54
- It must be ${q} or "fd3", "fd4" (and so on).
55
- It is optional and defaults to "${Q}".`)},cF=(Z,X,J,q)=>{let Q=q[mY(Z)];if(Q===void 0)throw TypeError(`"${x2(J)}" must not be ${X}. That file descriptor does not exist.
56
- Please set the "stdio" option to ensure that file descriptor exists.`);if(Q.direction==="input"&&!J)throw TypeError(`"${x2(J)}" must not be ${X}. It must be a readable stream, not writable.`);if(Q.direction!=="input"&&J)throw TypeError(`"${x2(J)}" must not be ${X}. It must be a writable stream, not readable.`)},fY=(Z,X,J,q)=>{if(Z==="all"&&!J.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:Q,optionValue:$}=lF(Z,J);return`The "${Q}: ${z8($)}" option is incompatible with using "${x2(q)}: ${z8(X)}".
57
- Please set this option with "pipe" instead.`},lF=(Z,{stdin:X,stdout:J,stderr:q,stdio:Q})=>{let $=mY(Z);if($===0&&X!==void 0)return{optionName:"stdin",optionValue:X};if($===1&&J!==void 0)return{optionName:"stdout",optionValue:J};if($===2&&q!==void 0)return{optionName:"stderr",optionValue:q};return{optionName:`stdio[${$}]`,optionValue:Q[$]}},mY=(Z)=>Z==="all"?1:Z,x2=(Z)=>Z?"to":"from",z8=(Z)=>{if(typeof Z==="string")return`'${Z}'`;return typeof Z==="number"?`${Z}`:"Stream"};var A1=B(()=>{$1();o0=new WeakMap});import{addAbortListener as nF}from"node:events";var f1=(Z,X,J)=>{let q=Z.getMaxListeners();if(q===0||q===Number.POSITIVE_INFINITY)return;Z.setMaxListeners(q+X),nF(J,()=>{Z.setMaxListeners(Z.getMaxListeners()-X)})};var M8=()=>{};var F8=(Z,X)=>{if(X)d3(Z)},d3=(Z)=>{Z.refCounted()},D8=(Z,X)=>{if(X)c3(Z)},c3=(Z)=>{Z.unrefCounted()},uY=(Z,X)=>{if(X)c3(Z),c3(Z)},pY=(Z,X)=>{if(X)d3(Z),d3(Z)};var E2=()=>{};import{once as iF}from"node:events";import{scheduler as aF}from"node:timers/promises";var dY=async({anyProcess:Z,channel:X,isSubprocess:J,ipcEmitter:q},Q)=>{if(iY(Q)||oY(Q))return;if(!T8.has(Z))T8.set(Z,[]);let $=T8.get(Z);if($.push(Q),$.length>1)return;while($.length>0){await aY(Z,q,Q),await aF.yield();let Y=await nY({wrappedMessage:$[0],anyProcess:Z,channel:X,isSubprocess:J,ipcEmitter:q});$.shift(),q.emit("message",Y),q.emit("message:done")}},cY=async({anyProcess:Z,channel:X,isSubprocess:J,ipcEmitter:q,boundOnMessage:Q})=>{l3();let $=T8.get(Z);while($?.length>0)await iF(q,"message:done");Z.removeListener("message",Q),pY(X,J),q.connected=!1,q.emit("disconnect")},T8;var lY=B(()=>{I8();E2();A8();O8();T8=new WeakMap});import{EventEmitter as oF}from"node:events";var I1=(Z,X,J)=>{if(w8.has(Z))return w8.get(Z);let q=new oF;return q.connected=!0,w8.set(Z,q),sF({ipcEmitter:q,anyProcess:Z,channel:X,isSubprocess:J}),q},w8,sF=({ipcEmitter:Z,anyProcess:X,channel:J,isSubprocess:q})=>{let Q=dY.bind(void 0,{anyProcess:X,channel:J,isSubprocess:q,ipcEmitter:Z});X.on("message",Q),X.once("disconnect",cY.bind(void 0,{anyProcess:X,channel:J,isSubprocess:q,ipcEmitter:Z,boundOnMessage:Q})),uY(J,q)},j8=(Z)=>{let X=w8.get(Z);return X===void 0?Z.channel!==null:X.connected};var P2=B(()=>{lY();E2();w8=new WeakMap});import{once as rF}from"node:events";var sY=({anyProcess:Z,channel:X,isSubprocess:J,message:q,strict:Q})=>{if(!Q)return q;let $=I1(Z,X,J),Y=x8(Z,$);return{id:tF++,type:k8,message:q,hasListeners:Y}},tF=0n,rY=(Z,X)=>{if(X?.type!==k8||X.hasListeners)return;for(let{id:J}of Z)if(J!==void 0)N8[J].resolve({isDeadlock:!0,hasListeners:!1})},nY=async({wrappedMessage:Z,anyProcess:X,channel:J,isSubprocess:q,ipcEmitter:Q})=>{if(Z?.type!==k8||!X.connected)return Z;let{id:$,message:Y}=Z,H={id:$,type:eY,message:x8(X,Q)};try{await E8({anyProcess:X,channel:J,isSubprocess:q,ipc:!0},H)}catch(K){Q.emit("strict:error",K)}return Y},iY=(Z)=>{if(Z?.type!==eY)return!1;let{id:X,message:J}=Z;return N8[X]?.resolve({isDeadlock:!1,hasListeners:J}),!0},tY=async(Z,X,J)=>{if(Z?.type!==k8)return;let q=a0();N8[Z.id]=q;let Q=new AbortController;try{let{isDeadlock:$,hasListeners:Y}=await Promise.race([q,eF(X,J,Q)]);if($)PY(J);if(!Y)vY(J)}finally{Q.abort(),delete N8[Z.id]}},N8,eF=async(Z,X,{signal:J})=>{f1(Z,1,J),await rF(Z,"disconnect",{signal:J}),CY(X)},k8="execa:ipc:request",eY="execa:ipc:response";var A8=B(()=>{S6();M8();P8();y6();P2();I8();N8={}});var ZH=(Z,X,J)=>{if(!v2.has(Z))v2.set(Z,new Set);let q=v2.get(Z),Q=a0(),$=J?X.id:void 0,Y={onMessageSent:Q,id:$};return q.add(Y),{outgoingMessages:q,outgoingMessage:Y}},XH=({outgoingMessages:Z,outgoingMessage:X})=>{Z.delete(X),X.onMessageSent.resolve()},aY=async(Z,X,J)=>{while(!x8(Z,X)&&v2.get(Z)?.size>0){let q=[...v2.get(Z)];rY(q,J),await Promise.all(q.map(({onMessageSent:Q})=>Q))}},v2,x8=(Z,X)=>X.listenerCount("message")>ZD(Z),ZD=(Z)=>o0.has(Z)&&!Q1(o0.get(Z).options.buffer,"ipc")?1:0;var I8=B(()=>{S6();$1();A1();A8();v2=new WeakMap});import{promisify as XD}from"node:util";var E8=({anyProcess:Z,channel:X,isSubprocess:J,ipc:q},Q,{strict:$=!1}={})=>{return v6({methodName:"sendMessage",isSubprocess:J,ipc:q,isConnected:Z.connected}),JD({anyProcess:Z,channel:X,methodName:"sendMessage",isSubprocess:J,message:Q,strict:$})},JD=async({anyProcess:Z,channel:X,methodName:J,isSubprocess:q,message:Q,strict:$})=>{let Y=sY({anyProcess:Z,channel:X,isSubprocess:q,message:Q,strict:$}),H=ZH(Z,Y,$);try{await i3({anyProcess:Z,methodName:J,isSubprocess:q,wrappedMessage:Y,message:Q})}catch(K){throw C6(Z),K}finally{XH(H)}},i3=async({anyProcess:Z,methodName:X,isSubprocess:J,wrappedMessage:q,message:Q})=>{let $=qD(Z);try{await Promise.all([tY(q,Z,J),$(q)])}catch(Y){throw bY({error:Y,methodName:X,isSubprocess:J}),hY({error:Y,methodName:X,isSubprocess:J,message:Q}),Y}},qD=(Z)=>{if(n3.has(Z))return n3.get(Z);let X=XD(Z.send.bind(Z));return n3.set(Z,X),X},n3;var P8=B(()=>{y6();I8();A8();n3=new WeakMap});import{scheduler as QD}from"node:timers/promises";var qH=(Z,X)=>{return p3("cancelSignal",!1,Z.connected),i3({anyProcess:Z,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:$H,message:X},message:X})},QH=async({anyProcess:Z,channel:X,isSubprocess:J,ipc:q})=>{return await $D({anyProcess:Z,channel:X,isSubprocess:J,ipc:q}),a3.signal},$D=async({anyProcess:Z,channel:X,isSubprocess:J,ipc:q})=>{if(JH)return;if(JH=!0,!q){SY();return}if(X===null){l3();return}I1(Z,X,J),await QD.yield()},JH=!1,oY=(Z)=>{if(Z?.type!==$H)return!1;return a3.abort(Z.message),!0},$H="execa:ipc:cancel",l3=()=>{a3.abort(yY())},a3;var O8=B(()=>{P8();P2();y6();a3=new AbortController});var YH=({gracefulCancel:Z,cancelSignal:X,ipc:J,serialization:q})=>{if(!Z)return;if(X===void 0)throw Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!J)throw Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(q==="json")throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")},HH=({subprocess:Z,cancelSignal:X,gracefulCancel:J,forceKillAfterDelay:q,context:Q,controller:$})=>J?[YD({subprocess:Z,cancelSignal:X,forceKillAfterDelay:q,context:Q,controller:$})]:[],YD=async({subprocess:Z,cancelSignal:X,forceKillAfterDelay:J,context:q,controller:{signal:Q}})=>{await L8(X,Q);let $=HD(X);throw await qH(Z,$),f3({kill:Z.kill,forceKillAfterDelay:J,context:q,controllerSignal:Q}),q.terminationReason??="gracefulCancel",X.reason},HD=({reason:Z})=>{if(!(Z instanceof DOMException))return Z;let X=Error(Z.message);return Object.defineProperty(X,"stack",{value:Z.stack,enumerable:!1,configurable:!0,writable:!0}),X};var o3=B(()=>{m3();O8();B8()});import{setTimeout as UD}from"node:timers/promises";var UH=({timeout:Z})=>{if(Z!==void 0&&(!Number.isFinite(Z)||Z<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`)},KH=(Z,X,J,q)=>X===0||X===void 0?[]:[KD(Z,X,J,q)],KD=async(Z,X,J,{signal:q})=>{throw await UD(X,void 0,{signal:q}),J.terminationReason??="timeout",Z.kill(),new i0};var s3=B(()=>{g1()});import{execPath as GD,execArgv as WD}from"node:process";import GH from"node:path";var WH=({options:Z})=>{if(Z.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...Z,node:!0}}},VH=(Z,X,{node:J=!1,nodePath:q=GD,nodeOptions:Q=WD.filter((K)=>!K.startsWith("--inspect")),cwd:$,execPath:Y,...H})=>{if(Y!==void 0)throw TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');let K=N6(q,'The "nodePath" option'),W=GH.resolve($,K),G={...H,nodePath:W,node:J,cwd:$};if(!J)return[Z,X,G];if(GH.basename(Z,".exe")==="node")throw TypeError('When the "node" option is true, the first argument does not need to be "node".');return[W,[...Q,Z,...X],{ipc:!0,...G,shell:!1}]};var r3=B(()=>{k6()});import{serialize as VD}from"node:v8";var BH=({ipcInput:Z,ipc:X,serialization:J})=>{if(Z===void 0)return;if(!X)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");_D[J](Z)},BD=(Z)=>{try{VD(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:X})}},LD=(Z)=>{try{JSON.stringify(Z)}catch(X){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:X})}},_D,LH=async(Z,X)=>{if(X===void 0)return;await Z.sendMessage(X)};var t3=B(()=>{_D={advanced:BD,json:LD}});var zH=({encoding:Z})=>{if(e3.has(Z))return;let X=RD(Z);if(X!==void 0)throw TypeError(`Invalid option \`encoding: ${v8(Z)}\`.
58
- Please rename it to ${v8(X)}.`);let J=[...e3].map((q)=>v8(q)).join(", ");throw TypeError(`Invalid option \`encoding: ${v8(Z)}\`.
59
- Please rename it to one of: ${J}.`)},zD,D0,e3,RD=(Z)=>{if(Z===null)return"buffer";if(typeof Z!=="string")return;let X=Z.toLowerCase();if(X in _H)return _H[X];if(e3.has(X))return X},_H,v8=(Z)=>typeof Z==="string"?`"${Z}"`:String(Z);var m1=B(()=>{zD=new Set(["utf8","utf16le"]),D0=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),e3=new Set([...zD,...D0]),_H={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"}});import{statSync as MD}from"node:fs";import FD from"node:path";import DD from"node:process";var RH=(Z=MH())=>{let X=N6(Z,'The "cwd" option');return FD.resolve(X)},MH=()=>{try{return DD.cwd()}catch(Z){throw Z.message=`The current directory does not exist.
60
- ${Z.message}`,Z}},FH=(Z,X)=>{if(X===MH())return Z;let J;try{J=MD(X)}catch(q){return`The "cwd" option is invalid: ${X}.
61
- ${q.message}
62
- ${Z}`}if(!J.isDirectory())return`The "cwd" option is not a directory: ${X}.
63
- ${Z}`;return Z};var ZZ=B(()=>{k6()});import TD from"node:path";import TH from"node:process";var AH,C8=(Z,X,J)=>{J.cwd=RH(J.cwd);let[q,Q,$]=VH(Z,X,J),{command:Y,args:H,options:K}=AH.default._parse(q,Q,$),W=C9(K),G=AD(W);if(UH(G),zH(G),BH(G),kY(G),YH(G),G.shell=O3(G.shell),G.env=ID(G),G.killSignal=IY(G.killSignal),G.forceKillAfterDelay=jY(G.forceKillAfterDelay),G.lines=G.lines.map((V,L)=>V&&!D0.has(G.encoding)&&G.buffer[L]),TH.platform==="win32"&&TD.basename(Y,".exe")==="cmd")H.unshift("/q");return{file:Y,commandArguments:H,options:G}},AD=({extendEnv:Z=!0,preferLocal:X=!1,cwd:J,localDir:q=J,encoding:Q="utf8",reject:$=!0,cleanup:Y=!0,all:H=!1,windowsHide:K=!0,killSignal:W="SIGTERM",forceKillAfterDelay:G=!0,gracefulCancel:V=!1,ipcInput:L,ipc:_=L!==void 0||V,serialization:z="advanced",...D})=>({...D,extendEnv:Z,preferLocal:X,cwd:J,localDirectory:q,encoding:Q,reject:$,cleanup:Y,all:H,windowsHide:K,killSignal:W,forceKillAfterDelay:G,gracefulCancel:V,ipcInput:L,ipc:_,serialization:z}),ID=({env:Z,extendEnv:X,preferLocal:J,node:q,localDirectory:Q,nodePath:$})=>{let Y=X?{...TH.env,...Z}:Z;if(J||q)return KY({env:Y,cwd:Q,execPath:$,preferLocal:J,addExecPath:q});return Y};var XZ=B(()=>{GY();B8();k2();u3();o3();s3();r3();t3();m1();ZZ();k6();$1();AH=DH(n7(),1)});var y8=(Z,X,J)=>J.shell&&X.length>0?[[Z,...X].join(" "),[],J]:[Z,X,J];var JZ=()=>{};function h6(Z){if(typeof Z==="string")return OD(Z);if(!(ArrayBuffer.isView(Z)&&Z.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return wD(Z)}var OD=(Z)=>Z.at(-1)===IH?Z.slice(0,Z.at(-2)===OH?-2:-1):Z,wD=(Z)=>Z.at(-1)===jD?Z.subarray(0,Z.at(-2)===ND?-2:-1):Z,IH=`
64
- `,jD,OH="\r",ND;var qZ=B(()=>{jD=IH.codePointAt(0),ND=OH.codePointAt(0)});function b0(Z,{checkOpen:X=!0}={}){return Z!==null&&typeof Z==="object"&&(Z.writable||Z.readable||!X||Z.writable===void 0&&Z.readable===void 0)&&typeof Z.pipe==="function"}function QZ(Z,{checkOpen:X=!0}={}){return b0(Z,{checkOpen:X})&&(Z.writable||!X)&&typeof Z.write==="function"&&typeof Z.end==="function"&&typeof Z.writable==="boolean"&&typeof Z.writableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function u1(Z,{checkOpen:X=!0}={}){return b0(Z,{checkOpen:X})&&(Z.readable||!X)&&typeof Z.read==="function"&&typeof Z.readable==="boolean"&&typeof Z.readableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function $Z(Z,X){return QZ(Z,X)&&u1(Z,X)}var p1=()=>{};class wH{#J;#q;#X=!1;#Y=void 0;constructor(Z,X){this.#J=Z,this.#q=X}next(){let Z=()=>this.#U();return this.#Y=this.#Y?this.#Y.then(Z,Z):Z(),this.#Y}return(Z){let X=()=>this.#V(Z);return this.#Y?this.#Y.then(X,X):X()}async#U(){if(this.#X)return{done:!0,value:void 0};let Z;try{Z=await this.#J.read()}catch(X){throw this.#Y=void 0,this.#X=!0,this.#J.releaseLock(),X}return Z.done&&(this.#Y=void 0,this.#X=!0,this.#J.releaseLock()),Z}async#V(Z){if(this.#X)return{done:!0,value:Z};if(this.#X=!0,!this.#q){let X=this.#J.cancel(Z);return this.#J.releaseLock(),await X,{done:!0,value:Z}}return this.#J.releaseLock(),{done:!0,value:Z}}}function jH(){return this[YZ].next()}function NH(Z){return this[YZ].return(Z)}function HZ({preventCancel:Z=!1}={}){let X=this.getReader(),J=new wH(X,Z),q=Object.create(xD);return q[YZ]=J,q}var kD,YZ,xD;var kH=B(()=>{kD=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);YZ=Symbol();Object.defineProperty(jH,"name",{value:"next"});Object.defineProperty(NH,"name",{value:"return"});xD=Object.create(kD,{next:{enumerable:!0,configurable:!0,writable:!0,value:jH},return:{enumerable:!0,configurable:!0,writable:!0,value:NH}})});var xH=()=>{};var EH=B(()=>{kH();xH()});var PH=(Z)=>{if(u1(Z,{checkOpen:!1})&&C2.on!==void 0)return PD(Z);if(typeof Z?.[Symbol.asyncIterator]==="function")return Z;if(ED.call(Z)==="[object ReadableStream]")return HZ.call(Z);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},ED,PD=async function*(Z){let X=new AbortController,J={};vD(Z,X,J);try{for await(let[q]of C2.on(Z,"data",{signal:X.signal}))yield q}catch(q){if(J.error!==void 0)throw J.error;else if(!X.signal.aborted)throw q}finally{Z.destroy()}},vD=async(Z,X,J)=>{try{await C2.finished(Z,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(q){J.error=q}finally{X.abort()}},C2;var UZ=B(()=>{p1();EH();({toString:ED}=Object.prototype),C2={}});var g6=async(Z,{init:X,convertChunk:J,getSize:q,truncateChunk:Q,addChunk:$,getFinalChunk:Y,finalize:H},{maxBuffer:K=Number.POSITIVE_INFINITY}={})=>{let W=PH(Z),G=X();G.length=0;try{for await(let V of W){let L=yD(V),_=J[L](V,G);yH({convertedChunk:_,state:G,getSize:q,truncateChunk:Q,addChunk:$,maxBuffer:K})}return CD({state:G,convertChunk:J,getSize:q,truncateChunk:Q,addChunk:$,getFinalChunk:Y,maxBuffer:K}),H(G)}catch(V){let L=typeof V==="object"&&V!==null?V:Error(V);throw L.bufferedData=H(G),L}},CD=({state:Z,getSize:X,truncateChunk:J,addChunk:q,getFinalChunk:Q,maxBuffer:$})=>{let Y=Q(Z);if(Y!==void 0)yH({convertedChunk:Y,state:Z,getSize:X,truncateChunk:J,addChunk:q,maxBuffer:$})},yH=({convertedChunk:Z,state:X,getSize:J,truncateChunk:q,addChunk:Q,maxBuffer:$})=>{let Y=J(Z),H=X.length+Y;if(H<=$){vH(Z,X,Q,H);return}let K=q(Z,$-X.length);if(K!==void 0)vH(K,X,Q,$);throw new Y1},vH=(Z,X,J,q)=>{X.contents=J(Z,X,q),X.length=q},yD=(Z)=>{let X=typeof Z;if(X==="string")return"string";if(X!=="object"||Z===null)return"others";if(globalThis.Buffer?.isBuffer(Z))return"buffer";let J=CH.call(Z);if(J==="[object ArrayBuffer]")return"arrayBuffer";if(J==="[object DataView]")return"dataView";if(Number.isInteger(Z.byteLength)&&Number.isInteger(Z.byteOffset)&&CH.call(Z.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},CH,Y1;var y2=B(()=>{UZ();({toString:CH}=Object.prototype);Y1=class Y1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var H1=(Z)=>Z,S2=()=>{return},S8=({contents:Z})=>Z,b8=(Z)=>{throw Error(`Streams in object mode are not supported: ${String(Z)}`)},h8=(Z)=>Z.length;var g8=()=>{};async function f8(Z,X){return g6(Z,gD,X)}var SD=()=>({contents:[]}),bD=()=>1,hD=(Z,{contents:X})=>{return X.push(Z),X},gD;var SH=B(()=>{y2();g8();gD={init:SD,convertChunk:{string:H1,buffer:H1,arrayBuffer:H1,dataView:H1,typedArray:H1,others:H1},getSize:bD,truncateChunk:S2,addChunk:hD,getFinalChunk:S2,finalize:S8}});async function m8(Z,X){return g6(Z,iD,X)}var fD=()=>({contents:new ArrayBuffer(0)}),mD=(Z)=>uD.encode(Z),uD,bH=(Z)=>new Uint8Array(Z),hH=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),pD=(Z,X)=>Z.slice(0,X),dD=(Z,{contents:X,length:J},q)=>{let Q=mH()?lD(X,q):cD(X,q);return new Uint8Array(Q).set(Z,J),Q},cD=(Z,X)=>{if(X<=Z.byteLength)return Z;let J=new ArrayBuffer(fH(X));return new Uint8Array(J).set(new Uint8Array(Z),0),J},lD=(Z,X)=>{if(X<=Z.maxByteLength)return Z.resize(X),Z;let J=new ArrayBuffer(X,{maxByteLength:fH(X)});return new Uint8Array(J).set(new Uint8Array(Z),0),J},fH=(Z)=>gH**Math.ceil(Math.log(Z)/Math.log(gH)),gH=2,nD=({contents:Z,length:X})=>mH()?Z:Z.slice(0,X),mH=()=>("resize"in ArrayBuffer.prototype),iD;var uH=B(()=>{y2();g8();uD=new TextEncoder,iD={init:fD,convertChunk:{string:mD,buffer:bH,arrayBuffer:bH,dataView:hH,typedArray:hH,others:b8},getSize:h8,truncateChunk:pD,addChunk:dD,getFinalChunk:S2,finalize:nD}});async function p8(Z,X){return g6(Z,tD,X)}var aD=()=>({contents:"",textDecoder:new TextDecoder}),u8=(Z,{textDecoder:X})=>X.decode(Z,{stream:!0}),oD=(Z,{contents:X})=>X+Z,sD=(Z,X)=>Z.slice(0,X),rD=({textDecoder:Z})=>{let X=Z.decode();return X===""?void 0:X},tD;var pH=B(()=>{y2();g8();tD={init:aD,convertChunk:{string:H1,buffer:u8,arrayBuffer:u8,dataView:u8,typedArray:u8,others:b8},getSize:h8,truncateChunk:sD,addChunk:oD,getFinalChunk:rD,finalize:S8}});var dH=B(()=>{SH();uH();pH();y2()});import{on as eD}from"node:events";import{finished as ZT}from"node:stream/promises";var d8=B(()=>{UZ();dH();Object.assign(C2,{on:eD,finished:ZT})});var cH=({error:Z,stream:X,readableObjectMode:J,lines:q,encoding:Q,fdNumber:$})=>{if(!(Z instanceof Y1))throw Z;if($==="all")return Z;let Y=XT(J,q,Q);throw Z.maxBufferInfo={fdNumber:$,unit:Y},X.destroy(),Z},XT=(Z,X,J)=>{if(Z)return"objects";if(X)return"lines";if(J==="buffer")return"bytes";return"characters"},lH=(Z,X,J)=>{if(X.length!==J)return;let q=new Y1;throw q.maxBufferInfo={fdNumber:"ipc"},q},nH=(Z,X)=>{let{streamName:J,threshold:q,unit:Q}=JT(Z,X);return`Command's ${J} was larger than ${q} ${Q}`},JT=(Z,X)=>{if(Z?.maxBufferInfo===void 0)return{streamName:"output",threshold:X[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:J,unit:q}}=Z;delete Z.maxBufferInfo;let Q=Q1(X,J);if(J==="ipc")return{streamName:"IPC output",threshold:Q,unit:"messages"};return{streamName:o4(J),threshold:Q,unit:q}},iH=(Z,X,J)=>Z?.code==="ENOBUFS"&&X!==null&&X.some((q)=>q!==null&&q.length>c8(J)),aH=(Z,X,J)=>{if(!X)return Z;let q=c8(J);return Z.length>q?Z.slice(0,q):Z},c8=([,Z])=>Z;var d1=B(()=>{d8();q1();$1()});import{inspect as qT}from"node:util";var sH=({stdio:Z,all:X,ipcOutput:J,originalError:q,signal:Q,signalDescription:$,exitCode:Y,escapedCommand:H,timedOut:K,isCanceled:W,isGracefullyCanceled:G,isMaxBuffer:V,isForcefullyTerminated:L,forceKillAfterDelay:_,killSignal:z,maxBuffer:D,timeout:M,cwd:F})=>{let N=q?.code,R=QT({originalError:q,timedOut:K,timeout:M,isMaxBuffer:V,maxBuffer:D,errorCode:N,signal:Q,signalDescription:$,exitCode:Y,isCanceled:W,isGracefullyCanceled:G,isForcefullyTerminated:L,forceKillAfterDelay:_,killSignal:z}),w=YT(q,F),A=w===void 0?"":`
65
- ${w}`,I=`${R}: ${H}${A}`,T=X===void 0?[Z[2],Z[1]]:[X],b=[I,...T,...Z.slice(3),J.map((j)=>HT(j)).join(`
66
- `)].map((j)=>j2(h6(UT(j)))).filter(Boolean).join(`
67
-
68
- `);return{originalMessage:w,shortMessage:I,message:b}},QT=({originalError:Z,timedOut:X,timeout:J,isMaxBuffer:q,maxBuffer:Q,errorCode:$,signal:Y,signalDescription:H,exitCode:K,isCanceled:W,isGracefullyCanceled:G,isForcefullyTerminated:V,forceKillAfterDelay:L,killSignal:_})=>{let z=$T(V,L);if(X)return`Command timed out after ${J} milliseconds${z}`;if(G){if(Y===void 0)return`Command was gracefully canceled with exit code ${K}`;return V?`Command was gracefully canceled${z}`:`Command was gracefully canceled with ${Y} (${H})`}if(W)return`Command was canceled${z}`;if(q)return`${nH(Z,Q)}${z}`;if($!==void 0)return`Command failed with ${$}${z}`;if(V)return`Command was killed with ${_} (${V8(_)})${z}`;if(Y!==void 0)return`Command was killed with ${Y} (${H})`;if(K!==void 0)return`Command failed with exit code ${K}`;return"Command failed"},$T=(Z,X)=>Z?` and was forcefully terminated after ${X} milliseconds`:"",YT=(Z,X)=>{if(Z instanceof i0)return;let J=BY(Z)?Z.originalMessage:String(Z?.message??Z),q=j2(FH(J,X));return q===""?void 0:q},HT=(Z)=>typeof Z==="string"?Z:qT(Z),UT=(Z)=>Array.isArray(Z)?Z.map((X)=>h6(oH(X))).filter(Boolean).join(`
69
- `):oH(Z),oH=(Z)=>{if(typeof Z==="string")return Z;if(X0(Z))return i4(Z);return""};var rH=B(()=>{qZ();F0();ZZ();t4();d1();k2();g1()});var l8=({command:Z,escapedCommand:X,stdio:J,all:q,ipcOutput:Q,options:{cwd:$},startTime:Y})=>tH({command:Z,escapedCommand:X,cwd:$,durationMs:C3(Y),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:J[1],stderr:J[2],all:q,stdio:J,ipcOutput:Q,pipedFrom:[]}),f6=({error:Z,command:X,escapedCommand:J,fileDescriptors:q,options:Q,startTime:$,isSync:Y})=>b2({error:Z,command:X,escapedCommand:J,startTime:$,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:q.length}),ipcOutput:[],options:Q,isSync:Y}),b2=({error:Z,command:X,escapedCommand:J,startTime:q,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:W,signal:G,stdio:V,all:L,ipcOutput:_,options:{timeoutDuration:z,timeout:D=z,forceKillAfterDelay:M,killSignal:F,cwd:N,maxBuffer:R},isSync:w})=>{let{exitCode:A,signal:I,signalDescription:T}=GT(W,G),{originalMessage:b,shortMessage:j,message:x}=sH({stdio:V,all:L,ipcOutput:_,originalError:Z,signal:I,signalDescription:T,exitCode:A,escapedCommand:J,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,forceKillAfterDelay:M,killSignal:F,maxBuffer:R,timeout:D,cwd:N}),v=WY(Z,x,w);return Object.assign(v,KT({error:v,command:X,escapedCommand:J,startTime:q,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:A,signal:I,signalDescription:T,stdio:V,all:L,ipcOutput:_,cwd:N,originalMessage:b,shortMessage:j})),v},KT=({error:Z,command:X,escapedCommand:J,startTime:q,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:W,signal:G,signalDescription:V,stdio:L,all:_,ipcOutput:z,cwd:D,originalMessage:M,shortMessage:F})=>tH({shortMessage:F,originalMessage:M,command:X,escapedCommand:J,cwd:D,durationMs:C3(q),failed:!0,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isTerminated:G!==void 0,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:W,signal:G,signalDescription:V,code:Z.cause?.code,stdout:L[1],stderr:L[2],all:_,stdio:L,ipcOutput:z,pipedFrom:[]}),tH=(Z)=>Object.fromEntries(Object.entries(Z).filter(([,X])=>X!==void 0)),GT=(Z,X)=>{let J=Z===null?void 0:Z,q=X===null?void 0:X,Q=q===void 0?void 0:V8(X);return{exitCode:J,signal:q,signalDescription:Q}};var h2=B(()=>{k2();Q8();g1();rH()});function WT(Z){return{days:Math.trunc(Z/86400000),hours:Math.trunc(Z/3600000%24),minutes:Math.trunc(Z/60000%60),seconds:Math.trunc(Z/1000%60),milliseconds:Math.trunc(Z%1000),microseconds:Math.trunc(eH(Z*1000)%1000),nanoseconds:Math.trunc(eH(Z*1e6)%1000)}}function VT(Z){return{days:Z/86400000n,hours:Z/3600000n%24n,minutes:Z/60000n%60n,seconds:Z/1000n%60n,milliseconds:Z%1000n,microseconds:0n,nanoseconds:0n}}function KZ(Z){switch(typeof Z){case"number":{if(Number.isFinite(Z))return WT(Z);break}case"bigint":return VT(Z)}throw TypeError("Expected a finite number or bigint")}var eH=(Z)=>Number.isFinite(Z)?Z:0;var ZU=()=>{};function GZ(Z,X){let J=typeof Z==="bigint";if(!J&&!Number.isFinite(Z))throw TypeError("Expected a finite number or bigint");X={...X};let q=Z<0?"-":"";if(Z=Z<0?-Z:Z,X.colonNotation)X.compact=!1,X.formatSubMilliseconds=!1,X.separateMilliseconds=!1,X.verbose=!1;if(X.compact)X.unitCount=1,X.secondsDecimalDigits=0,X.millisecondsDecimalDigits=0;let Q=[],$=(G,V)=>{let L=Math.floor(G*10**V+_T);return(Math.round(L)/10**V).toFixed(V)},Y=(G,V,L,_)=>{if((Q.length===0||!X.colonNotation)&&BT(G)&&!(X.colonNotation&&L==="m"))return;if(_??=String(G),X.colonNotation){let z=_.includes(".")?_.split(".")[0].length:_.length,D=Q.length>0?2:1;_="0".repeat(Math.max(0,D-z))+_}else _+=X.verbose?" "+LT(V,G):L;Q.push(_)},H=KZ(Z),K=BigInt(H.days);if(X.hideYearAndDays)Y(BigInt(K)*24n+BigInt(H.hours),"hour","h");else{if(X.hideYear)Y(K,"day","d");else Y(K/365n,"year","y"),Y(K%365n,"day","d");Y(Number(H.hours),"hour","h")}if(Y(Number(H.minutes),"minute","m"),!X.hideSeconds)if(X.separateMilliseconds||X.formatSubMilliseconds||!X.colonNotation&&Z<1000&&!X.subSecondsAsDecimals){let G=Number(H.seconds),V=Number(H.milliseconds),L=Number(H.microseconds),_=Number(H.nanoseconds);if(Y(G,"second","s"),X.formatSubMilliseconds)Y(V,"millisecond","ms"),Y(L,"microsecond","µs"),Y(_,"nanosecond","ns");else{let z=V+L/1000+_/1e6,D=typeof X.millisecondsDecimalDigits==="number"?X.millisecondsDecimalDigits:0,M=z>=1?Math.round(z):Math.ceil(z),F=D?z.toFixed(D):M;Y(Number.parseFloat(F),"millisecond","ms",F)}}else{let G=(J?Number(Z%zT):Z)/1000%60,V=typeof X.secondsDecimalDigits==="number"?X.secondsDecimalDigits:1,L=$(G,V),_=X.keepDecimalsOnWholeSeconds?L:L.replace(/\.0+$/,"");Y(Number.parseFloat(_),"second","s",_)}if(Q.length===0)return q+"0"+(X.verbose?" milliseconds":"ms");let W=X.colonNotation?":":" ";if(typeof X.unitCount==="number")Q=Q.slice(0,Math.max(X.unitCount,1));return q+Q.join(W)}var BT=(Z)=>Z===0||Z===0n,LT=(Z,X)=>X===1||X===1n?Z:`${Z}s`,_T=0.0000001,zT;var XU=B(()=>{ZU();zT=24n*60n*60n*1000n});var JU=(Z,X)=>{if(Z.failed)n0({type:"error",verboseMessage:Z.shortMessage,verboseInfo:X,result:Z})};var qU=B(()=>{P6()});var QU=(Z,X)=>{if(!x6(X))return;JU(Z,X),RT(Z,X)},RT=(Z,X)=>{let J=`(done in ${GZ(Z.durationMs)})`;n0({type:"duration",verboseMessage:J,verboseInfo:X,result:Z})};var $U=B(()=>{XU();D1();P6();qU()});var m6=(Z,X,{reject:J})=>{if(QU(Z,X),Z.failed&&J)throw Z;return Z};var n8=B(()=>{$U()});var UU=(Z,X)=>{if(c1(Z))return"asyncGenerator";if(WU(Z))return"generator";if(i8(Z))return"fileUrl";if(AT(Z))return"filePath";if(wT(Z))return"webStream";if(b0(Z,{checkOpen:!1}))return"native";if(X0(Z))return"uint8Array";if(jT(Z))return"asyncIterable";if(NT(Z))return"iterable";if(BZ(Z))return KU({transform:Z},X);if(TT(Z))return MT(Z,X);return"native"},MT=(Z,X)=>{if($Z(Z.transform,{checkOpen:!1}))return FT(Z,X);if(BZ(Z.transform))return KU(Z,X);return DT(Z,X)},FT=(Z,X)=>{return GU(Z,X,"Duplex stream"),"duplex"},KU=(Z,X)=>{return GU(Z,X,"web TransformStream"),"webTransform"},GU=({final:Z,binary:X,objectMode:J},q,Q)=>{YU(Z,`${q}.final`,Q),YU(X,`${q}.binary`,Q),WZ(J,`${q}.objectMode`)},YU=(Z,X,J)=>{if(Z!==void 0)throw TypeError(`The \`${X}\` option can only be defined when using a generator, not a ${J}.`)},DT=({transform:Z,final:X,binary:J,objectMode:q},Q)=>{if(Z!==void 0&&!HU(Z))throw TypeError(`The \`${Q}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if($Z(X,{checkOpen:!1}))throw TypeError(`The \`${Q}.final\` option must not be a Duplex stream.`);if(BZ(X))throw TypeError(`The \`${Q}.final\` option must not be a web TransformStream.`);if(X!==void 0&&!HU(X))throw TypeError(`The \`${Q}.final\` option must be a generator.`);return WZ(J,`${Q}.binary`),WZ(q,`${Q}.objectMode`),c1(Z)||c1(X)?"asyncGenerator":"generator"},WZ=(Z,X)=>{if(Z!==void 0&&typeof Z!=="boolean")throw TypeError(`The \`${X}\` option must use a boolean.`)},HU=(Z)=>c1(Z)||WU(Z),c1=(Z)=>Object.prototype.toString.call(Z)==="[object AsyncGeneratorFunction]",WU=(Z)=>Object.prototype.toString.call(Z)==="[object GeneratorFunction]",TT=(Z)=>t(Z)&&(Z.transform!==void 0||Z.final!==void 0),i8=(Z)=>Object.prototype.toString.call(Z)==="[object URL]",VU=(Z)=>i8(Z)&&Z.protocol!=="file:",AT=(Z)=>t(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((X)=>IT.has(X))&&VZ(Z.file),IT,VZ=(Z)=>typeof Z==="string",BU=(Z,X)=>Z==="native"&&typeof X==="string"&&!OT.has(X),OT,LU=(Z)=>Object.prototype.toString.call(Z)==="[object ReadableStream]",a8=(Z)=>Object.prototype.toString.call(Z)==="[object WritableStream]",wT=(Z)=>LU(Z)||a8(Z),BZ=(Z)=>LU(Z?.readable)&&a8(Z?.writable),jT=(Z)=>_U(Z)&&typeof Z[Symbol.asyncIterator]==="function",NT=(Z)=>_U(Z)&&typeof Z[Symbol.iterator]==="function",_U=(Z)=>typeof Z==="object"&&Z!==null,j0,o8,LZ,zU,RU,O1;var _0=B(()=>{p1();X1();F0();IT=new Set(["file","append"]),OT=new Set(["ipc","ignore","inherit","overlapped","pipe"]),j0=new Set(["generator","asyncGenerator","duplex","webTransform"]),o8=new Set(["fileUrl","filePath","fileNumber"]),LZ=new Set(["fileUrl","filePath"]),zU=new Set([...LZ,"webStream","nodeStream"]),RU=new Set(["webTransform","duplex"]),O1={generator:"a generator",asyncGenerator:"an async generator",fileUrl:"a file URL",filePath:"a file path string",fileNumber:"a file descriptor number",webStream:"a web stream",nodeStream:"a Node.js stream",webTransform:"a web TransformStream",duplex:"a Duplex stream",native:"any value",iterable:"an iterable",asyncIterable:"an async iterable",string:"a string",uint8Array:"a Uint8Array"}});var _Z=(Z,X,J,q)=>q==="output"?kT(Z,X,J):xT(Z,X,J),kT=(Z,X,J)=>{let q=X!==0&&J[X-1].value.readableObjectMode;return{writableObjectMode:q,readableObjectMode:Z??q}},xT=(Z,X,J)=>{let q=X===0?Z===!0:J[X-1].value.readableObjectMode,Q=X!==J.length-1&&(Z??q);return{writableObjectMode:q,readableObjectMode:Q}},MU=(Z,X)=>{let J=Z.findLast(({type:q})=>j0.has(q));if(J===void 0)return!1;return X==="input"?J.value.writableObjectMode:J.value.readableObjectMode};var zZ=B(()=>{_0()});var FU=(Z,X,J,q)=>[...Z.filter(({type:Q})=>!j0.has(Q)),...ET(Z,X,J,q)],ET=(Z,X,J,{encoding:q})=>{let Q=Z.filter(({type:Y})=>j0.has(Y)),$=Array.from({length:Q.length});for(let[Y,H]of Object.entries(Q))$[Y]=PT({stdioItem:H,index:Number(Y),newTransforms:$,optionName:X,direction:J,encoding:q});return ST($,J)},PT=({stdioItem:Z,stdioItem:{type:X},index:J,newTransforms:q,optionName:Q,direction:$,encoding:Y})=>{if(X==="duplex")return vT({stdioItem:Z,optionName:Q});if(X==="webTransform")return CT({stdioItem:Z,index:J,newTransforms:q,direction:$});return yT({stdioItem:Z,index:J,newTransforms:q,direction:$,encoding:Y})},vT=({stdioItem:Z,stdioItem:{value:{transform:X,transform:{writableObjectMode:J,readableObjectMode:q},objectMode:Q=q}},optionName:$})=>{if(Q&&!q)throw TypeError(`The \`${$}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!Q&&q)throw TypeError(`The \`${$}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...Z,value:{transform:X,writableObjectMode:J,readableObjectMode:q}}},CT=({stdioItem:Z,stdioItem:{value:X},index:J,newTransforms:q,direction:Q})=>{let{transform:$,objectMode:Y}=t(X)?X:{transform:X},{writableObjectMode:H,readableObjectMode:K}=_Z(Y,J,q,Q);return{...Z,value:{transform:$,writableObjectMode:H,readableObjectMode:K}}},yT=({stdioItem:Z,stdioItem:{value:X},index:J,newTransforms:q,direction:Q,encoding:$})=>{let{transform:Y,final:H,binary:K=!1,preserveNewlines:W=!1,objectMode:G}=t(X)?X:{transform:X},V=K||D0.has($),{writableObjectMode:L,readableObjectMode:_}=_Z(G,J,q,Q);return{...Z,value:{transform:Y,final:H,binary:V,preserveNewlines:W,writableObjectMode:L,readableObjectMode:_}}},ST=(Z,X)=>X==="input"?Z.reverse():Z;var DU=B(()=>{X1();m1();_0();zZ()});import RZ from"node:process";var TU=(Z,X,J)=>{let q=Z.map((Q)=>bT(Q,X));if(q.includes("input")&&q.includes("output"))throw TypeError(`The \`${J}\` option must not be an array of both readable and writable values.`);return q.find(Boolean)??fT},bT=({type:Z,value:X},J)=>hT[J]??AU[Z](X),hT,u6=()=>{return},MZ=()=>"input",AU,gT=(Z)=>{if([0,RZ.stdin].includes(Z))return"input";if([1,2,RZ.stdout,RZ.stderr].includes(Z))return"output"},fT="output";var IU=B(()=>{p1();_0();hT=["input","output","output"],AU={generator:u6,asyncGenerator:u6,fileUrl:u6,filePath:u6,iterable:MZ,asyncIterable:MZ,uint8Array:MZ,webStream:(Z)=>a8(Z)?"output":"input",nodeStream(Z){if(!u1(Z,{checkOpen:!1}))return"output";return QZ(Z,{checkOpen:!1})?void 0:"input"},webTransform:u6,duplex:u6,native(Z){let X=gT(Z);if(X!==void 0)return X;if(b0(Z,{checkOpen:!1}))return AU.nodeStream(Z)}}});var OU=(Z,X)=>X&&!Z.includes("ipc")?[...Z,"ipc"]:Z;var wU=()=>{};var jU=({stdio:Z,ipc:X,buffer:J,...q},Q,$)=>{let Y=mT(Z,q).map((H,K)=>NU(H,K));return $?pT(Y,J,Q):OU(Y,X)},mT=(Z,X)=>{if(Z===void 0)return w0.map((q)=>X[q]);if(uT(X))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${w0.map((q)=>`\`${q}\``).join(", ")}`);if(typeof Z==="string")return[Z,Z,Z];if(!Array.isArray(Z))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof Z}\``);let J=Math.max(Z.length,w0.length);return Array.from({length:J},(q,Q)=>Z[Q])},uT=(Z)=>w0.some((X)=>Z[X]!==void 0),NU=(Z,X)=>{if(Array.isArray(Z))return Z.map((J)=>NU(J,X));if(Z===null||Z===void 0)return X>=w0.length?"ignore":"pipe";return Z},pT=(Z,X,J)=>Z.map((q,Q)=>!X[Q]&&Q!==0&&!E6(J,Q)&&dT(q)?"ignore":q),dT=(Z)=>Z==="pipe"||Array.isArray(Z)&&Z.every((X)=>X==="pipe");var kU=B(()=>{q1();wU();D1()});import{readFileSync as cT}from"node:fs";import lT from"node:tty";var EU=({stdioItem:Z,stdioItem:{type:X},isStdioArray:J,fdNumber:q,direction:Q,isSync:$})=>{if(!J||X!=="native")return Z;return $?nT({stdioItem:Z,fdNumber:q,direction:Q}):oT({stdioItem:Z,fdNumber:q})},nT=({stdioItem:Z,stdioItem:{value:X,optionName:J},fdNumber:q,direction:Q})=>{let $=iT({value:X,optionName:J,fdNumber:q,direction:Q});if($!==void 0)return $;if(b0(X,{checkOpen:!1}))throw TypeError(`The \`${J}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return Z},iT=({value:Z,optionName:X,fdNumber:J,direction:q})=>{let Q=aT(Z,J);if(Q===void 0)return;if(q==="output")return{type:"fileNumber",value:Q,optionName:X};if(lT.isatty(Q))throw TypeError(`The \`${X}: ${z8(Z)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:J1(cT(Q)),optionName:X}},aT=(Z,X)=>{if(Z==="inherit")return X;if(typeof Z==="number")return Z;let J=a4.indexOf(Z);if(J!==-1)return J},oT=({stdioItem:Z,stdioItem:{value:X,optionName:J},fdNumber:q})=>{if(X==="inherit")return{type:"nodeStream",value:xU(q,X,J),optionName:J};if(typeof X==="number")return{type:"nodeStream",value:xU(X,X,J),optionName:J};if(b0(X,{checkOpen:!1}))return{type:"nodeStream",value:X,optionName:J};return Z},xU=(Z,X,J)=>{let q=a4[Z];if(q===void 0)throw TypeError(`The \`${J}: ${X}\` option is invalid: no such standard stream.`);return q};var PU=B(()=>{p1();q1();F0();A1()});var vU=({input:Z,inputFile:X},J)=>J===0?[...sT(Z),...tT(X)]:[],sT=(Z)=>Z===void 0?[]:[{type:rT(Z),value:Z,optionName:"input"}],rT=(Z)=>{if(u1(Z,{checkOpen:!1}))return"nodeStream";if(typeof Z==="string")return"string";if(X0(Z))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},tT=(Z)=>Z===void 0?[]:[{...eT(Z),optionName:"inputFile"}],eT=(Z)=>{if(i8(Z))return{type:"fileUrl",value:Z};if(VZ(Z))return{type:"filePath",value:{file:Z}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var CU=B(()=>{p1();F0();_0()});var yU=(Z)=>Z.filter((X,J)=>Z.every((q,Q)=>X.value!==q.value||J>=Q||X.type==="generator"||X.type==="asyncGenerator")),SU=({stdioItem:{type:Z,value:X,optionName:J},direction:q,fileDescriptors:Q,isSync:$})=>{let Y=ZA(Q,Z);if(Y.length===0)return;if($){XA({otherStdioItems:Y,type:Z,value:X,optionName:J,direction:q});return}if(zU.has(Z))return bU({otherStdioItems:Y,type:Z,value:X,optionName:J,direction:q});if(RU.has(Z))qA({otherStdioItems:Y,type:Z,value:X,optionName:J})},ZA=(Z,X)=>Z.flatMap(({direction:J,stdioItems:q})=>q.filter((Q)=>Q.type===X).map((Q)=>({...Q,direction:J}))),XA=({otherStdioItems:Z,type:X,value:J,optionName:q,direction:Q})=>{if(LZ.has(X))bU({otherStdioItems:Z,type:X,value:J,optionName:q,direction:Q})},bU=({otherStdioItems:Z,type:X,value:J,optionName:q,direction:Q})=>{let $=Z.filter((H)=>JA(H,J));if($.length===0)return;let Y=$.find((H)=>H.direction!==Q);return hU(Y,q,X),Q==="output"?$[0].stream:void 0},JA=({type:Z,value:X},J)=>{if(Z==="filePath")return X.file===J.file;if(Z==="fileUrl")return X.href===J.href;return X===J},qA=({otherStdioItems:Z,type:X,value:J,optionName:q})=>{let Q=Z.find(({value:{transform:$}})=>$===J.transform);hU(Q,q,X)},hU=(Z,X,J)=>{if(Z!==void 0)throw TypeError(`The \`${Z.optionName}\` and \`${X}\` options must not target ${O1[J]} that is the same.`)};var gU=B(()=>{_0()});var s8=(Z,X,J,q)=>{let $=jU(X,J,q).map((H,K)=>QA({stdioOption:H,fdNumber:K,options:X,isSync:q})),Y=VA({initialFileDescriptors:$,addProperties:Z,options:X,isSync:q});return X.stdio=Y.map(({stdioItems:H})=>_A(H)),Y},QA=({stdioOption:Z,fdNumber:X,options:J,isSync:q})=>{let Q=o4(X),{stdioItems:$,isStdioArray:Y}=$A({stdioOption:Z,fdNumber:X,options:J,optionName:Q}),H=TU($,X,Q),K=$.map((V)=>EU({stdioItem:V,isStdioArray:Y,fdNumber:X,direction:H,isSync:q})),W=FU(K,Q,H,J),G=MU(W,H);return WA(W,G),{direction:H,objectMode:G,stdioItems:W}},$A=({stdioOption:Z,fdNumber:X,options:J,optionName:q})=>{let $=[...(Array.isArray(Z)?Z:[Z]).map((K)=>YA(K,q)),...vU(J,X)],Y=yU($),H=Y.length>1;return HA(Y,H,q),KA(Y),{stdioItems:Y,isStdioArray:H}},YA=(Z,X)=>({type:UU(Z,X),value:Z,optionName:X}),HA=(Z,X,J)=>{if(Z.length===0)throw TypeError(`The \`${J}\` option must not be an empty array.`);if(!X)return;for(let{value:q,optionName:Q}of Z)if(UA.has(q))throw Error(`The \`${Q}\` option must not include \`${q}\`.`)},UA,KA=(Z)=>{for(let X of Z)GA(X)},GA=({type:Z,value:X,optionName:J})=>{if(VU(X))throw TypeError(`The \`${J}: URL\` option must use the \`file:\` scheme.
70
- For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(BU(Z,X))throw TypeError(`The \`${J}: { file: '...' }\` option must be used instead of \`${J}: '...'\`.`)},WA=(Z,X)=>{if(!X)return;let J=Z.find(({type:q})=>o8.has(q));if(J!==void 0)throw TypeError(`The \`${J.optionName}\` option cannot use both files and transforms in objectMode.`)},VA=({initialFileDescriptors:Z,addProperties:X,options:J,isSync:q})=>{let Q=[];try{for(let $ of Z)Q.push(BA({fileDescriptor:$,fileDescriptors:Q,addProperties:X,options:J,isSync:q}));return Q}catch($){throw FZ(Q),$}},BA=({fileDescriptor:{direction:Z,objectMode:X,stdioItems:J},fileDescriptors:q,addProperties:Q,options:$,isSync:Y})=>{let H=J.map((K)=>LA({stdioItem:K,addProperties:Q,direction:Z,options:$,fileDescriptors:q,isSync:Y}));return{direction:Z,objectMode:X,stdioItems:H}},LA=({stdioItem:Z,addProperties:X,direction:J,options:q,fileDescriptors:Q,isSync:$})=>{let Y=SU({stdioItem:Z,direction:J,fileDescriptors:Q,isSync:$});if(Y!==void 0)return{...Z,stream:Y};return{...Z,...X[J][Z.type](Z,q)}},FZ=(Z)=>{for(let{stdioItems:X}of Z)for(let{stream:J}of X)if(J!==void 0&&!y0(J))J.destroy()},_A=(Z)=>{if(Z.length>1)return Z.some(({value:q})=>q==="overlapped")?"overlapped":"pipe";let[{type:X,value:J}]=Z;return X==="native"?J:"pipe"};var r8=B(()=>{q1();DU();zZ();_0();IU();kU();PU();CU();gU();UA=new Set(["ignore","ipc"])});import{readFileSync as fU}from"node:fs";var uU=(Z,X)=>s8(RA,Z,X,!0),s0=({type:Z,optionName:X})=>{pU(X,O1[Z])},zA=({optionName:Z,value:X})=>{if(X==="ipc"||X==="overlapped")pU(Z,`"${X}"`);return{}},pU=(Z,X)=>{throw TypeError(`The \`${Z}\` option cannot be ${X} with synchronous methods.`)},mU,RA;var dU=B(()=>{F0();r8();_0();mU={generator(){},asyncGenerator:s0,webStream:s0,nodeStream:s0,webTransform:s0,duplex:s0,asyncIterable:s0,native:zA},RA={input:{...mU,fileUrl:({value:Z})=>({contents:[J1(fU(Z))]}),filePath:({value:{file:Z}})=>({contents:[J1(fU(Z))]}),fileNumber:s0,iterable:({value:Z})=>({contents:[...Z]}),string:({value:Z})=>({contents:[Z]}),uint8Array:({value:Z})=>({contents:[Z]})},output:{...mU,fileUrl:({value:Z})=>({path:Z}),filePath:({value:{file:Z,append:X}})=>({path:Z,append:X}),fileNumber:({value:Z})=>({path:Z}),iterable:s0,string:s0,uint8Array:s0}}});var U1=(Z,{stripFinalNewline:X},J)=>DZ(X,J)&&Z!==void 0&&!Array.isArray(Z)?h6(Z):Z,DZ=(Z,X)=>X==="all"?Z[1]||Z[2]:Z[X];var g2=B(()=>{qZ()});var t8=(Z,X,J,q)=>Z||J?void 0:lU(X,q),AZ=(Z,X,J)=>J?Z.flatMap((q)=>cU(q,X)):cU(Z,X),cU=(Z,X)=>{let{transform:J,final:q}=lU(X,{});return[...J(Z),...q()]},lU=(Z,X)=>{return X.previousChunks="",{transform:MA.bind(void 0,X,Z),final:DA.bind(void 0,X)}},MA=function*(Z,X,J){if(typeof J!=="string"){yield J;return}let{previousChunks:q}=Z,Q=-1;for(let $=0;$<J.length;$+=1)if(J[$]===`
71
- `){let Y=FA(J,$,X,Z),H=J.slice(Q+1,$+1-Y);if(q.length>0)H=TZ(q,H),q="";yield H,Q=$}if(Q!==J.length-1)q=TZ(q,J.slice(Q+1));Z.previousChunks=q},FA=(Z,X,J,q)=>{if(J)return 0;return q.isWindowsNewline=X!==0&&Z[X-1]==="\r",q.isWindowsNewline?2:1},DA=function*({previousChunks:Z}){if(Z.length>0)yield Z},nU=({binary:Z,preserveNewlines:X,readableObjectMode:J,state:q})=>Z||X||J?void 0:{transform:TA.bind(void 0,q)},TA=function*({isWindowsNewline:Z=!1},X){let{unixNewline:J,windowsNewline:q,LF:Q,concatBytes:$}=typeof X==="string"?AA:OA;if(X.at(-1)===Q){yield X;return}yield $(X,Z?q:J)},TZ=(Z,X)=>`${Z}${X}`,AA,IA=(Z,X)=>{let J=new Uint8Array(Z.length+X.length);return J.set(Z,0),J.set(X,Z.length),J},OA;var e8=B(()=>{AA={windowsNewline:`\r
72
- `,unixNewline:`
73
- `,LF:`
74
- `,concatBytes:TZ},OA={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:IA}});import{Buffer as wA}from"node:buffer";var iU=(Z,X)=>Z?void 0:jA.bind(void 0,X),jA=function*(Z,X){if(typeof X!=="string"&&!X0(X)&&!wA.isBuffer(X))throw TypeError(`The \`${Z}\` option's transform must use "objectMode: true" to receive as input: ${typeof X}.`);yield X},aU=(Z,X)=>Z?NA.bind(void 0,X):kA.bind(void 0,X),NA=function*(Z,X){oU(Z,X),yield X},kA=function*(Z,X){if(oU(Z,X),typeof X!=="string"&&!X0(X))throw TypeError(`The \`${Z}\` option's function must yield a string or an Uint8Array, not ${typeof X}.`);yield X},oU=(Z,X)=>{if(X===null||X===void 0)throw TypeError(`The \`${Z}\` option's function must not call \`yield ${X}\`.
75
- Instead, \`yield\` should either be called with a value, or not be called at all. For example:
76
- if (condition) { yield value; }`)};var sU=B(()=>{F0()});import{Buffer as xA}from"node:buffer";import{StringDecoder as EA}from"node:string_decoder";var Z5=(Z,X,J)=>{if(J)return;if(Z)return{transform:PA.bind(void 0,new TextEncoder)};let q=new EA(X);return{transform:vA.bind(void 0,q),final:CA.bind(void 0,q)}},PA=function*(Z,X){if(xA.isBuffer(X))yield J1(X);else if(typeof X==="string")yield Z.encode(X);else yield X},vA=function*(Z,X){yield X0(X)?Z.write(X):X},CA=function*(Z){let X=Z.end();if(X!=="")yield X};var IZ=B(()=>{F0()});import{callbackify as rU}from"node:util";var OZ,X5=async function*(Z,X,J){if(J===X.length){yield Z;return}let{transform:q=SA}=X[J];for await(let Q of q(Z))yield*X5(Q,X,J+1)},tU=async function*(Z){for(let[X,{final:J}]of Object.entries(Z))yield*yA(J,Number(X),Z)},yA=async function*(Z,X,J){if(Z===void 0)return;for await(let q of Z())yield*X5(q,J,X+1)},eU,SA=function*(Z){yield Z};var ZK=B(()=>{OZ=rU(async(Z,X,J,q)=>{X.currentIterable=Z(...J);try{for await(let Q of X.currentIterable)q.push(Q)}finally{delete X.currentIterable}}),eU=rU(async({currentIterable:Z},X)=>{if(Z!==void 0){await(X?Z.throw(X):Z.return());return}if(X)throw X})});var wZ=(Z,X,J,q)=>{try{for(let Q of Z(...X))J.push(Q);q()}catch(Q){q(Q)}},XK=(Z,X)=>[...X.flatMap((J)=>[...l1(J,Z,0)]),...f2(Z)],l1=function*(Z,X,J){if(J===X.length){yield Z;return}let{transform:q=hA}=X[J];for(let Q of q(Z))yield*l1(Q,X,J+1)},f2=function*(Z){for(let[X,{final:J}]of Object.entries(Z))yield*bA(J,Number(X),Z)},bA=function*(Z,X,J){if(Z===void 0)return;for(let q of Z())yield*l1(q,J,X+1)},hA=function*(Z){yield Z};var jZ=()=>{};import{Transform as gA,getDefaultHighWaterMark as JK}from"node:stream";var NZ=({value:Z,value:{transform:X,final:J,writableObjectMode:q,readableObjectMode:Q},optionName:$},{encoding:Y})=>{let H={},K=qK(Z,Y,$),W=c1(X),G=c1(J),V=W?OZ.bind(void 0,X5,H):wZ.bind(void 0,l1),L=W||G?OZ.bind(void 0,tU,H):wZ.bind(void 0,f2),_=W||G?eU.bind(void 0,H):void 0;return{stream:new gA({writableObjectMode:q,writableHighWaterMark:JK(q),readableObjectMode:Q,readableHighWaterMark:JK(Q),transform(D,M,F){V([D,K,0],this,F)},flush(D){L([K],this,D)},destroy:_})}},J5=(Z,X,J,q)=>{let Q=X.filter(({type:Y})=>Y==="generator"),$=q?Q.reverse():Q;for(let{value:Y,optionName:H}of $){let K=qK(Y,J,H);Z=XK(K,Z)}return Z},qK=({transform:Z,final:X,binary:J,writableObjectMode:q,readableObjectMode:Q,preserveNewlines:$},Y,H)=>{let K={};return[{transform:iU(q,H)},Z5(J,Y,q),t8(J,$,q,K),{transform:Z,final:X},{transform:aU(Q,H)},nU({binary:J,preserveNewlines:$,readableObjectMode:Q,state:K})].filter(Boolean)};var q5=B(()=>{_0();e8();sU();IZ();ZK();jZ()});var QK=(Z,X)=>{for(let J of fA(Z))mA(Z,J,X)},fA=(Z)=>new Set(Object.entries(Z).filter(([,{direction:X}])=>X==="input").map(([X])=>Number(X))),mA=(Z,X,J)=>{let{stdioItems:q}=Z[X],Q=q.filter(({contents:H})=>H!==void 0);if(Q.length===0)return;if(X!==0){let[{type:H,optionName:K}]=Q;throw TypeError(`Only the \`stdin\` option, not \`${K}\`, can be ${O1[H]} with synchronous methods.`)}let Y=Q.map(({contents:H})=>H).map((H)=>uA(H,q));J.input=w2(Y)},uA=(Z,X)=>{let J=J5(Z,X,"utf8",!0);return pA(J),w2(J)},pA=(Z)=>{let X=Z.find((J)=>typeof J!=="string"&&!X0(J));if(X!==void 0)throw TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${X}.`)};var $K=B(()=>{q5();F0();_0()});var Q5=({stdioItems:Z,encoding:X,verboseInfo:J,fdNumber:q})=>q!=="all"&&E6(J,q)&&!D0.has(X)&&dA(q)&&(Z.some(({type:Q,value:$})=>Q==="native"&&cA.has($))||Z.every(({type:Q})=>j0.has(Q))),dA=(Z)=>Z===1||Z===2,cA,YK=async(Z,X,J,q)=>{for await(let Q of Z)if(!lA(X))UK(Q,J,q)},HK=(Z,X,J)=>{for(let q of Z)UK(q,X,J)},lA=(Z)=>Z._readableState.pipes.length>0,UK=(Z,X,J)=>{let q=J8(Z);n0({type:"output",verboseMessage:q,fdNumber:X,verboseInfo:J})};var kZ=B(()=>{m1();_0();P6();D1();cA=new Set(["pipe","overlapped"])});import{writeFileSync as nA,appendFileSync as iA}from"node:fs";var KK=({fileDescriptors:Z,syncResult:{output:X},options:J,isMaxBuffer:q,verboseInfo:Q})=>{if(X===null)return{output:Array.from({length:3})};let $={},Y=new Set([]);return{output:X.map((K,W)=>aA({result:K,fileDescriptors:Z,fdNumber:W,state:$,outputFiles:Y,isMaxBuffer:q,verboseInfo:Q},J)),...$}},aA=({result:Z,fileDescriptors:X,fdNumber:J,state:q,outputFiles:Q,isMaxBuffer:$,verboseInfo:Y},{buffer:H,encoding:K,lines:W,stripFinalNewline:G,maxBuffer:V})=>{if(Z===null)return;let L=aH(Z,$,V),_=J1(L),{stdioItems:z,objectMode:D}=X[J],M=oA([_],z,K,q),{serializedResult:F,finalResult:N=F}=sA({chunks:M,objectMode:D,encoding:K,lines:W,stripFinalNewline:G,fdNumber:J});rA({serializedResult:F,fdNumber:J,state:q,verboseInfo:Y,encoding:K,stdioItems:z,objectMode:D});let R=H[J]?N:void 0;try{if(q.error===void 0)tA(F,z,Q);return R}catch(w){return q.error=w,R}},oA=(Z,X,J,q)=>{try{return J5(Z,X,J,!1)}catch(Q){return q.error=Q,Z}},sA=({chunks:Z,objectMode:X,encoding:J,lines:q,stripFinalNewline:Q,fdNumber:$})=>{if(X)return{serializedResult:Z};if(J==="buffer")return{serializedResult:w2(Z)};let Y=w9(Z,J);if(q[$])return{serializedResult:Y,finalResult:AZ(Y,!Q[$],X)};return{serializedResult:Y}},rA=({serializedResult:Z,fdNumber:X,state:J,verboseInfo:q,encoding:Q,stdioItems:$,objectMode:Y})=>{if(!Q5({stdioItems:$,encoding:Q,verboseInfo:q,fdNumber:X}))return;let H=AZ(Z,!1,Y);try{HK(H,X,q)}catch(K){J.error??=K}},tA=(Z,X,J)=>{for(let{path:q,append:Q}of X.filter(({type:$})=>o8.has($))){let $=typeof q==="string"?q:q.toString();if(Q||J.has($))iA(q,Z);else J.add($),nA(q,Z)}};var GK=B(()=>{kZ();q5();e8();F0();_0();d1()});var WK=([,Z,X],J)=>{if(!J.all)return;if(Z===void 0)return X;if(X===void 0)return Z;if(Array.isArray(Z))return Array.isArray(X)?[...Z,...X]:[...Z,U1(X,J,"all")];if(Array.isArray(X))return[U1(Z,J,"all"),...X];if(X0(Z)&&X0(X))return j3([Z,X]);return`${Z}${X}`};var VK=B(()=>{F0();g2()});import{once as xZ}from"node:events";var BK=async(Z,X)=>{let[J,q]=await eA(Z);return X.isForcefullyTerminated??=!1,[J,q]},eA=async(Z)=>{let[X,J]=await Promise.allSettled([xZ(Z,"spawn"),xZ(Z,"exit")]);if(X.status==="rejected")return[];return J.status==="rejected"?LK(Z):J.value},LK=async(Z)=>{try{return await xZ(Z,"exit")}catch{return LK(Z)}},_K=async(Z)=>{let[X,J]=await Z;if(!ZI(X,J)&&EZ(X,J))throw new i0;return[X,J]},ZI=(Z,X)=>Z===void 0&&X===void 0,EZ=(Z,X)=>Z!==0||X!==null;var PZ=B(()=>{g1()});var zK=({error:Z,status:X,signal:J,output:q},{maxBuffer:Q})=>{let $=XI(Z,X,J),Y=$?.code==="ETIMEDOUT",H=iH($,q,Q);return{resultError:$,exitCode:X,signal:J,timedOut:Y,isMaxBuffer:H}},XI=(Z,X,J)=>{if(Z!==void 0)return Z;return EZ(X,J)?new i0:void 0};var RK=B(()=>{g1();d1();PZ()});import{spawnSync as JI}from"node:child_process";var MK=(Z,X,J)=>{let{file:q,commandArguments:Q,command:$,escapedCommand:Y,startTime:H,verboseInfo:K,options:W,fileDescriptors:G}=qI(Z,X,J),V=YI({file:q,commandArguments:Q,options:W,command:$,escapedCommand:Y,verboseInfo:K,fileDescriptors:G,startTime:H});return m6(V,K,W)},qI=(Z,X,J)=>{let{command:q,escapedCommand:Q,startTime:$,verboseInfo:Y}=$8(Z,X,J),H=QI(J),{file:K,commandArguments:W,options:G}=C8(Z,X,H);$I(G);let V=uU(G,Y);return{file:K,commandArguments:W,command:q,escapedCommand:Q,startTime:$,verboseInfo:Y,options:G,fileDescriptors:V}},QI=(Z)=>Z.node&&!Z.ipc?{...Z,ipc:!1}:Z,$I=({ipc:Z,ipcInput:X,detached:J,cancelSignal:q})=>{if(X)$5("ipcInput");if(Z)$5("ipc: true");if(J)$5("detached: true");if(q)$5("cancelSignal")},$5=(Z)=>{throw TypeError(`The "${Z}" option cannot be used with synchronous methods.`)},YI=({file:Z,commandArguments:X,options:J,command:q,escapedCommand:Q,verboseInfo:$,fileDescriptors:Y,startTime:H})=>{let K=HI({file:Z,commandArguments:X,options:J,command:q,escapedCommand:Q,fileDescriptors:Y,startTime:H});if(K.failed)return K;let{resultError:W,exitCode:G,signal:V,timedOut:L,isMaxBuffer:_}=zK(K,J),{output:z,error:D=W}=KK({fileDescriptors:Y,syncResult:K,options:J,isMaxBuffer:_,verboseInfo:$}),M=z.map((N,R)=>U1(N,J,R)),F=U1(WK(z,J),J,"all");return KI({error:D,exitCode:G,signal:V,timedOut:L,isMaxBuffer:_,stdio:M,all:F,options:J,command:q,escapedCommand:Q,startTime:H})},HI=({file:Z,commandArguments:X,options:J,command:q,escapedCommand:Q,fileDescriptors:$,startTime:Y})=>{try{QK($,J);let H=UI(J);return JI(...y8(Z,X,H))}catch(H){return f6({error:H,command:q,escapedCommand:Q,fileDescriptors:$,options:J,startTime:Y,isSync:!0})}},UI=({encoding:Z,maxBuffer:X,...J})=>({...J,encoding:"buffer",maxBuffer:c8(X)}),KI=({error:Z,exitCode:X,signal:J,timedOut:q,isMaxBuffer:Q,stdio:$,all:Y,options:H,command:K,escapedCommand:W,startTime:G})=>Z===void 0?l8({command:K,escapedCommand:W,stdio:$,all:Y,ipcOutput:[],options:H,startTime:G}):b2({error:Z,command:K,escapedCommand:W,timedOut:q,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:Q,isForcefullyTerminated:!1,exitCode:X,signal:J,stdio:$,all:Y,ipcOutput:[],options:H,startTime:G,isSync:!0});var FK=B(()=>{y3();XZ();JZ();h2();n8();dU();g2();$K();GK();d1();VK();RK()});import{once as vZ,on as GI}from"node:events";var DK=({anyProcess:Z,channel:X,isSubprocess:J,ipc:q},{reference:Q=!0,filter:$}={})=>{return v6({methodName:"getOneMessage",isSubprocess:J,ipc:q,isConnected:j8(Z)}),WI({anyProcess:Z,channel:X,isSubprocess:J,filter:$,reference:Q})},WI=async({anyProcess:Z,channel:X,isSubprocess:J,filter:q,reference:Q})=>{F8(X,Q);let $=I1(Z,X,J),Y=new AbortController;try{return await Promise.race([VI($,q,Y),BI($,J,Y),LI($,J,Y)])}catch(H){throw C6(Z),H}finally{Y.abort(),D8(X,Q)}},VI=async(Z,X,{signal:J})=>{if(X===void 0){let[q]=await vZ(Z,"message",{signal:J});return q}for await(let[q]of GI(Z,"message",{signal:J}))if(X(q))return q},BI=async(Z,X,{signal:J})=>{await vZ(Z,"disconnect",{signal:J}),EY(X)},LI=async(Z,X,{signal:J})=>{let[q]=await vZ(Z,"strict:error",{signal:J});throw _8(q,X)};var TK=B(()=>{y6();P2();E2()});import{once as IK,on as _I}from"node:events";var OK=({anyProcess:Z,channel:X,isSubprocess:J,ipc:q},{reference:Q=!0}={})=>CZ({anyProcess:Z,channel:X,isSubprocess:J,ipc:q,shouldAwait:!J,reference:Q}),CZ=({anyProcess:Z,channel:X,isSubprocess:J,ipc:q,shouldAwait:Q,reference:$})=>{v6({methodName:"getEachMessage",isSubprocess:J,ipc:q,isConnected:j8(Z)}),F8(X,$);let Y=I1(Z,X,J),H=new AbortController,K={};return zI(Z,Y,H),RI({ipcEmitter:Y,isSubprocess:J,controller:H,state:K}),MI({anyProcess:Z,channel:X,ipcEmitter:Y,isSubprocess:J,shouldAwait:Q,controller:H,state:K,reference:$})},zI=async(Z,X,J)=>{try{await IK(X,"disconnect",{signal:J.signal}),J.abort()}catch{}},RI=async({ipcEmitter:Z,isSubprocess:X,controller:J,state:q})=>{try{let[Q]=await IK(Z,"strict:error",{signal:J.signal});q.error=_8(Q,X),J.abort()}catch{}},MI=async function*({anyProcess:Z,channel:X,ipcEmitter:J,isSubprocess:q,shouldAwait:Q,controller:$,state:Y,reference:H}){try{for await(let[K]of _I(J,"message",{signal:$.signal}))AK(Y),yield K}catch{AK(Y)}finally{if($.abort(),D8(X,H),!q)C6(Z);if(Q)await Z}},AK=({error:Z})=>{if(Z)throw Z};var yZ=B(()=>{y6();P2();E2()});import wK from"node:process";var jK=(Z,{ipc:X})=>{Object.assign(Z,kK(Z,!1,X))},NK=()=>{let Z=wK,X=!0,J=wK.channel!==void 0;return{...kK(Z,!0,J),getCancelSignal:QH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:!0,ipc:J})}},kK=(Z,X,J)=>({sendMessage:E8.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:J}),getOneMessage:DK.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:J}),getEachMessage:OK.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:X,ipc:J})});var SZ=B(()=>{P8();TK();yZ();O8()});import{ChildProcess as FI}from"node:child_process";import{PassThrough as DI,Readable as TI,Writable as AI,Duplex as II}from"node:stream";var xK=({error:Z,command:X,escapedCommand:J,fileDescriptors:q,options:Q,startTime:$,verboseInfo:Y})=>{FZ(q);let H=new FI;OI(H,q),Object.assign(H,{readable:wI,writable:jI,duplex:NI});let K=f6({error:Z,command:X,escapedCommand:J,fileDescriptors:q,options:Q,startTime:$,isSync:!1}),W=kI(K,Y,Q);return{subprocess:H,promise:W}},OI=(Z,X)=>{let J=m2(),q=m2(),Q=m2(),$=Array.from({length:X.length-3},m2),Y=m2(),H=[J,q,Q,...$];Object.assign(Z,{stdin:J,stdout:q,stderr:Q,all:Y,stdio:H})},m2=()=>{let Z=new DI;return Z.end(),Z},wI=()=>new TI({read(){}}),jI=()=>new AI({write(){}}),NI=()=>new II({read(){},write(){}}),kI=async(Z,X,J)=>m6(Z,X,J);var EK=B(()=>{r8();h2();n8()});import{createReadStream as PK,createWriteStream as vK}from"node:fs";import{Buffer as xI}from"node:buffer";import{Readable as u2,Writable as EI,Duplex as PI}from"node:stream";var yK=(Z,X)=>s8(vI,Z,X,!1),p2=({type:Z,optionName:X})=>{throw TypeError(`The \`${X}\` option cannot be ${O1[Z]}.`)},CK,vI;var SK=B(()=>{q5();r8();_0();CK={fileNumber:p2,generator:NZ,asyncGenerator:NZ,nodeStream:({value:Z})=>({stream:Z}),webTransform({value:{transform:Z,writableObjectMode:X,readableObjectMode:J}}){let q=X||J;return{stream:PI.fromWeb(Z,{objectMode:q})}},duplex:({value:{transform:Z}})=>({stream:Z}),native(){}},vI={input:{...CK,fileUrl:({value:Z})=>({stream:PK(Z)}),filePath:({value:{file:Z}})=>({stream:PK(Z)}),webStream:({value:Z})=>({stream:u2.fromWeb(Z)}),iterable:({value:Z})=>({stream:u2.from(Z)}),asyncIterable:({value:Z})=>({stream:u2.from(Z)}),string:({value:Z})=>({stream:u2.from(Z)}),uint8Array:({value:Z})=>({stream:u2.from(xI.from(Z))})},output:{...CK,fileUrl:({value:Z})=>({stream:vK(Z)}),filePath:({value:{file:Z,append:X}})=>({stream:vK(Z,X?{flags:"a"}:{})}),webStream:({value:Z})=>({stream:EI.fromWeb(Z)}),iterable:p2,asyncIterable:p2,string:p2,uint8Array:p2}}});import{on as CI,once as bK}from"node:events";import{PassThrough as yI,getDefaultHighWaterMark as SI}from"node:stream";import{finished as fK}from"node:stream/promises";function n1(Z){if(!Array.isArray(Z))throw TypeError(`Expected an array, got \`${typeof Z}\`.`);for(let Q of Z)bZ(Q);let X=Z.some(({readableObjectMode:Q})=>Q),J=bI(Z,X),q=new mK({objectMode:X,writableHighWaterMark:J,readableHighWaterMark:J});for(let Q of Z)q.add(Q);return q}var bI=(Z,X)=>{if(Z.length===0)return SI(X);let J=Z.filter(({readableObjectMode:q})=>q===X).map(({readableHighWaterMark:q})=>q);return Math.max(...J)},mK,hI=async(Z,X,J)=>{Y5(Z,hK);let q=new AbortController;try{await Promise.race([gI(Z,q),fI(Z,X,J,q)])}finally{q.abort(),Y5(Z,-hK)}},gI=async(Z,{signal:X})=>{try{await fK(Z,{signal:X,cleanup:!0})}catch(J){throw uK(Z,J),J}},fI=async(Z,X,J,{signal:q})=>{for await(let[Q]of CI(Z,"unpipe",{signal:q}))if(X.has(Q))Q.emit(J)},bZ=(Z)=>{if(typeof Z?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof Z}\`.`)},mI=async({passThroughStream:Z,stream:X,streams:J,ended:q,aborted:Q,onFinished:$,unpipeEvent:Y})=>{Y5(Z,gK);let H=new AbortController;try{await Promise.race([uI($,X,H),pI({passThroughStream:Z,stream:X,streams:J,ended:q,aborted:Q,controller:H}),dI({stream:X,streams:J,ended:q,aborted:Q,unpipeEvent:Y,controller:H})])}finally{H.abort(),Y5(Z,-gK)}if(J.size>0&&J.size===q.size+Q.size)if(q.size===0&&Q.size>0)hZ(Z);else cI(Z)},uI=async(Z,X,{signal:J})=>{try{if(await Z,!J.aborted)hZ(X)}catch(q){if(!J.aborted)uK(X,q)}},pI=async({passThroughStream:Z,stream:X,streams:J,ended:q,aborted:Q,controller:{signal:$}})=>{try{if(await fK(X,{signal:$,cleanup:!0,readable:!0,writable:!1}),J.has(X))q.add(X)}catch(Y){if($.aborted||!J.has(X))return;if(pK(Y))Q.add(X);else dK(Z,Y)}},dI=async({stream:Z,streams:X,ended:J,aborted:q,unpipeEvent:Q,controller:{signal:$}})=>{if(await bK(Z,Q,{signal:$}),!Z.readable)return bK($,"abort",{signal:$});X.delete(Z),J.delete(Z),q.delete(Z)},cI=(Z)=>{if(Z.writable)Z.end()},uK=(Z,X)=>{if(pK(X))hZ(Z);else dK(Z,X)},pK=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",hZ=(Z)=>{if(Z.readable||Z.writable)Z.destroy()},dK=(Z,X)=>{if(!Z.destroyed)Z.once("error",lI),Z.destroy(X)},lI=()=>{},Y5=(Z,X)=>{let J=Z.getMaxListeners();if(J!==0&&J!==Number.POSITIVE_INFINITY)Z.setMaxListeners(J+X)},hK=2,gK=1;var H5=B(()=>{mK=class mK extends yI{#J=new Set([]);#q=new Set([]);#X=new Set([]);#Y;#U=Symbol("unpipe");#V=new WeakMap;add(Z){if(bZ(Z),this.#J.has(Z))return;this.#J.add(Z),this.#Y??=hI(this,this.#J,this.#U);let X=mI({passThroughStream:this,stream:Z,streams:this.#J,ended:this.#q,aborted:this.#X,onFinished:this.#Y,unpipeEvent:this.#U});this.#V.set(Z,X),Z.pipe(this,{end:!1})}async remove(Z){if(bZ(Z),!this.#J.has(Z))return!1;let X=this.#V.get(Z);if(X===void 0)return!1;return this.#V.delete(Z),Z.unpipe(this),await X,!0}}});import{finished as cK}from"node:stream/promises";var p6=(Z,X)=>{Z.pipe(X),nI(Z,X),iI(Z,X)},nI=async(Z,X)=>{if(y0(Z)||y0(X))return;try{await cK(Z,{cleanup:!0,readable:!0,writable:!1})}catch{}gZ(X)},gZ=(Z)=>{if(Z.writable)Z.end()},iI=async(Z,X)=>{if(y0(Z)||y0(X))return;try{await cK(X,{cleanup:!0,readable:!1,writable:!0})}catch{}fZ(Z)},fZ=(Z)=>{if(Z.readable)Z.destroy()};var U5=B(()=>{q1()});var lK=(Z,X,J)=>{let q=new Map;for(let[Q,{stdioItems:$,direction:Y}]of Object.entries(X)){for(let{stream:H}of $.filter(({type:K})=>j0.has(K)))aI(Z,H,Y,Q);for(let{stream:H}of $.filter(({type:K})=>!j0.has(K)))sI({subprocess:Z,stream:H,direction:Y,fdNumber:Q,pipeGroups:q,controller:J})}for(let[Q,$]of q.entries()){let Y=$.length===1?$[0]:n1($);p6(Y,Q)}},aI=(Z,X,J,q)=>{if(J==="output")p6(Z.stdio[q],X);else p6(X,Z.stdio[q]);let Q=oI[q];if(Q!==void 0)Z[Q]=X;Z.stdio[q]=X},oI,sI=({subprocess:Z,stream:X,direction:J,fdNumber:q,pipeGroups:Q,controller:$})=>{if(X===void 0)return;rI(X,$);let[Y,H]=J==="output"?[X,Z.stdio[q]]:[Z.stdio[q],X],K=Q.get(Y)??[];Q.set(Y,[...K,H])},rI=(Z,{signal:X})=>{if(y0(Z))f1(Z,tI,X)},tI=2;var nK=B(()=>{H5();q1();M8();_0();U5();oI=["stdin","stdout","stderr"]});var i1;var iK=B(()=>{i1=[];i1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")i1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")i1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class aK{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(uZ[mZ])return uZ[mZ];eI(uZ,mZ,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(Z,X){this.listeners[Z].push(X)}removeListener(Z,X){let J=this.listeners[Z],q=J.indexOf(X);if(q===-1)return;if(q===0&&J.length===1)J.length=0;else J.splice(q,1)}emit(Z,X,J){if(this.emitted[Z])return!1;this.emitted[Z]=!0;let q=!1;for(let Q of this.listeners[Z])q=Q(X,J)===!0||q;if(Z==="exit")q=this.emit("afterExit",X,J)||q;return q}}class dZ{}var K5=(Z)=>!!Z&&typeof Z==="object"&&typeof Z.removeListener==="function"&&typeof Z.emit==="function"&&typeof Z.reallyExit==="function"&&typeof Z.listeners==="function"&&typeof Z.kill==="function"&&typeof Z.pid==="number"&&typeof Z.on==="function",mZ,uZ,eI,ZO=(Z)=>{return{onExit(X,J){return Z.onExit(X,J)},load(){return Z.load()},unload(){return Z.unload()}}},oK,sK,pZ,rK,Bd,Ld;var tK=B(()=>{iK();mZ=Symbol.for("signal-exit emitter"),uZ=globalThis,eI=Object.defineProperty.bind(Object);oK=class oK extends dZ{onExit(){return()=>{}}load(){}unload(){}};sK=class sK extends dZ{#J=pZ.platform==="win32"?"SIGINT":"SIGHUP";#q=new aK;#X;#Y;#U;#V={};#T=!1;constructor(Z){super();this.#X=Z,this.#V={};for(let X of i1)this.#V[X]=()=>{let J=this.#X.listeners(X),{count:q}=this.#q,Q=Z;if(typeof Q.__signal_exit_emitter__==="object"&&typeof Q.__signal_exit_emitter__.count==="number")q+=Q.__signal_exit_emitter__.count;if(J.length===q){this.unload();let $=this.#q.emit("exit",null,X),Y=X==="SIGHUP"?this.#J:X;if(!$)Z.kill(Z.pid,Y)}};this.#U=Z.reallyExit,this.#Y=Z.emit}onExit(Z,X){if(!K5(this.#X))return()=>{};if(this.#T===!1)this.load();let J=X?.alwaysLast?"afterExit":"exit";return this.#q.on(J,Z),()=>{if(this.#q.removeListener(J,Z),this.#q.listeners.exit.length===0&&this.#q.listeners.afterExit.length===0)this.unload()}}load(){if(this.#T)return;this.#T=!0,this.#q.count+=1;for(let Z of i1)try{let X=this.#V[Z];if(X)this.#X.on(Z,X)}catch(X){}this.#X.emit=(Z,...X)=>{return this.#H(Z,...X)},this.#X.reallyExit=(Z)=>{return this.#z(Z)}}unload(){if(!this.#T)return;this.#T=!1,i1.forEach((Z)=>{let X=this.#V[Z];if(!X)throw Error("Listener not defined for signal: "+Z);try{this.#X.removeListener(Z,X)}catch(J){}}),this.#X.emit=this.#Y,this.#X.reallyExit=this.#U,this.#q.count-=1}#z(Z){if(!K5(this.#X))return 0;return this.#X.exitCode=Z||0,this.#q.emit("exit",this.#X.exitCode,null),this.#U.call(this.#X,this.#X.exitCode)}#H(Z,...X){let J=this.#Y;if(Z==="exit"&&K5(this.#X)){if(typeof X[0]==="number")this.#X.exitCode=X[0];let q=J.call(this.#X,Z,...X);return this.#q.emit("exit",this.#X.exitCode,null),q}else return J.call(this.#X,Z,...X)}};pZ=globalThis.process,{onExit:rK,load:Bd,unload:Ld}=ZO(K5(pZ)?new sK(pZ):new oK)});import{addAbortListener as XO}from"node:events";var eK=(Z,{cleanup:X,detached:J},{signal:q})=>{if(!X||J)return;let Q=rK(()=>{Z.kill()});XO(q,()=>{Q()})};var ZG=B(()=>{tK()});var JG=({source:Z,sourcePromise:X,boundOptions:J,createNested:q},...Q)=>{let $=q8(),{destination:Y,destinationStream:H,destinationError:K,from:W,unpipeSignal:G}=JO(J,q,Q),{sourceStream:V,sourceError:L}=QO(Z,W),{options:_,fileDescriptors:z}=o0.get(Z);return{sourcePromise:X,sourceStream:V,sourceOptions:_,sourceError:L,destination:Y,destinationStream:H,destinationError:K,unpipeSignal:G,fileDescriptors:z,startTime:$}},JO=(Z,X,J)=>{try{let{destination:q,pipeOptions:{from:Q,to:$,unpipeSignal:Y}={}}=qO(Z,X,...J),H=R8(q,$);return{destination:q,destinationStream:H,from:Q,unpipeSignal:Y}}catch(q){return{destinationError:q}}},qO=(Z,X,J,...q)=>{if(Array.isArray(J))return{destination:X(XG,Z)(J,...q),pipeOptions:Z};if(typeof J==="string"||J instanceof URL||I3(J)){if(Object.keys(Z).length>0)throw TypeError('Please use .pipe("file", ..., options) or .pipe(execa("file", ..., options)) instead of .pipe(options)("file", ...).');let[Q,$,Y]=n4(J,...q);return{destination:X(XG)(Q,$,Y),pipeOptions:Y}}if(o0.has(J)){if(Object.keys(Z).length>0)throw TypeError("Please use .pipe(options)`command` or .pipe($(options)`command`) instead of .pipe(options)($`command`).");return{destination:J,pipeOptions:q[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${J}`)},XG=({options:Z})=>({options:{...Z,stdin:"pipe",piped:!0}}),QO=(Z,X)=>{try{return{sourceStream:b6(Z,X)}}catch(J){return{sourceError:J}}};var qG=B(()=>{w3();Q8();A1();k6()});var $G=({sourceStream:Z,sourceError:X,destinationStream:J,destinationError:q,fileDescriptors:Q,sourceOptions:$,startTime:Y})=>{let H=$O({sourceStream:Z,sourceError:X,destinationStream:J,destinationError:q});if(H!==void 0)throw cZ({error:H,fileDescriptors:Q,sourceOptions:$,startTime:Y})},$O=({sourceStream:Z,sourceError:X,destinationStream:J,destinationError:q})=>{if(X!==void 0&&q!==void 0)return q;if(q!==void 0)return fZ(Z),q;if(X!==void 0)return gZ(J),X},cZ=({error:Z,fileDescriptors:X,sourceOptions:J,startTime:q})=>f6({error:Z,command:QG,escapedCommand:QG,fileDescriptors:X,options:J,startTime:q,isSync:!1}),QG="source.pipe(destination)";var lZ=B(()=>{h2();U5()});var YG=async(Z)=>{let[{status:X,reason:J,value:q=J},{status:Q,reason:$,value:Y=$}]=await Z;if(!Y.pipedFrom.includes(q))Y.pipedFrom.push(q);if(Q==="rejected")throw Y;if(X==="rejected")throw q;return Y};var HG=()=>{};import{finished as YO}from"node:stream/promises";var UG=(Z,X,J)=>{let q=G5.has(X)?UO(Z,X):HO(Z,X);return f1(Z,GO,J.signal),f1(X,WO,J.signal),KO(X),q},HO=(Z,X)=>{let J=n1([Z]);return p6(J,X),G5.set(X,J),J},UO=(Z,X)=>{let J=G5.get(X);return J.add(Z),J},KO=async(Z)=>{try{await YO(Z,{cleanup:!0,readable:!1,writable:!0})}catch{}G5.delete(Z)},G5,GO=2,WO=1;var KG=B(()=>{H5();M8();U5();G5=new WeakMap});import{aborted as VO}from"node:util";var GG=(Z,X)=>Z===void 0?[]:[BO(Z,X)],BO=async(Z,{sourceStream:X,mergedStream:J,fileDescriptors:q,sourceOptions:Q,startTime:$})=>{await VO(Z,X),await J.remove(X);let Y=Error("Pipe canceled by `unpipeSignal` option.");throw cZ({error:Y,fileDescriptors:q,sourceOptions:Q,startTime:$})};var WG=B(()=>{lZ()});var W5=(Z,...X)=>{if(t(X[0]))return W5.bind(void 0,{...Z,boundOptions:{...Z.boundOptions,...X[0]}});let{destination:J,...q}=JG(Z,...X),Q=LO({...q,destination:J});return Q.pipe=W5.bind(void 0,{...Z,source:J,sourcePromise:Q,boundOptions:{}}),Q},LO=async({sourcePromise:Z,sourceStream:X,sourceOptions:J,sourceError:q,destination:Q,destinationStream:$,destinationError:Y,unpipeSignal:H,fileDescriptors:K,startTime:W})=>{let G=_O(Z,Q);$G({sourceStream:X,sourceError:q,destinationStream:$,destinationError:Y,fileDescriptors:K,sourceOptions:J,startTime:W});let V=new AbortController;try{let L=UG(X,$,V);return await Promise.race([YG(G),...GG(H,{sourceStream:X,mergedStream:L,sourceOptions:J,fileDescriptors:K,startTime:W})])}finally{V.abort()}},_O=(Z,X)=>Promise.allSettled([Z,X]);var VG=B(()=>{X1();qG();lZ();HG();KG();WG()});import{on as zO}from"node:events";import{getDefaultHighWaterMark as RO}from"node:stream";var V5=({subprocessStdout:Z,subprocess:X,binary:J,shouldEncode:q,encoding:Q,preserveNewlines:$})=>{let Y=new AbortController;return MO(X,Y),LG({stream:Z,controller:Y,binary:J,shouldEncode:!Z.readableObjectMode&&q,encoding:Q,shouldSplit:!Z.readableObjectMode,preserveNewlines:$})},MO=async(Z,X)=>{try{await Z}catch{}finally{X.abort()}},nZ=({stream:Z,onStreamEnd:X,lines:J,encoding:q,stripFinalNewline:Q,allMixed:$})=>{let Y=new AbortController;FO(X,Y,Z);let H=Z.readableObjectMode&&!$;return LG({stream:Z,controller:Y,binary:q==="buffer",shouldEncode:!H,encoding:q,shouldSplit:!H&&J,preserveNewlines:!Q})},FO=async(Z,X,J)=>{try{await Z}catch{J.destroy()}finally{X.abort()}},LG=({stream:Z,controller:X,binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y})=>{let H=zO(Z,"data",{signal:X.signal,highWaterMark:BG,highWatermark:BG});return DO({onStdoutChunk:H,controller:X,binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y})},iZ,BG,DO=async function*({onStdoutChunk:Z,controller:X,binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y}){let H=TO({binary:J,shouldEncode:q,encoding:Q,shouldSplit:$,preserveNewlines:Y});try{for await(let[K]of Z)yield*l1(K,H,0)}catch(K){if(!X.signal.aborted)throw K}finally{yield*f2(H)}},TO=({binary:Z,shouldEncode:X,encoding:J,shouldSplit:q,preserveNewlines:Q})=>[Z5(Z,J,!X),t8(Z,Q,!q,{})].filter(Boolean);var B5=B(()=>{IZ();e8();jZ();iZ=RO(!0),BG=iZ});import{setImmediate as AO}from"node:timers/promises";var _G=async({stream:Z,onStreamEnd:X,fdNumber:J,encoding:q,buffer:Q,maxBuffer:$,lines:Y,allMixed:H,stripFinalNewline:K,verboseInfo:W,streamInfo:G})=>{let V=IO({stream:Z,onStreamEnd:X,fdNumber:J,encoding:q,allMixed:H,verboseInfo:W,streamInfo:G});if(!Q){await Promise.all([OO(Z),V]);return}let L=DZ(K,J),_=nZ({stream:Z,onStreamEnd:X,lines:Y,encoding:q,stripFinalNewline:L,allMixed:H}),[z]=await Promise.all([wO({stream:Z,iterable:_,fdNumber:J,encoding:q,maxBuffer:$,lines:Y}),V]);return z},IO=async({stream:Z,onStreamEnd:X,fdNumber:J,encoding:q,allMixed:Q,verboseInfo:$,streamInfo:{fileDescriptors:Y}})=>{if(!Q5({stdioItems:Y[J]?.stdioItems,encoding:q,verboseInfo:$,fdNumber:J}))return;let H=nZ({stream:Z,onStreamEnd:X,lines:!0,encoding:q,stripFinalNewline:!0,allMixed:Q});await YK(H,Z,J,$)},OO=async(Z)=>{if(await AO(),Z.readableFlowing===null)Z.resume()},wO=async({stream:Z,stream:{readableObjectMode:X},iterable:J,fdNumber:q,encoding:Q,maxBuffer:$,lines:Y})=>{try{if(X||Y)return await f8(J,{maxBuffer:$});if(Q==="buffer")return new Uint8Array(await m8(J,{maxBuffer:$}));return await p8(J,{maxBuffer:$})}catch(H){return zG(cH({error:H,stream:Z,readableObjectMode:X,lines:Y,encoding:Q,fdNumber:q}))}},aZ=async(Z)=>{try{return await Z}catch(X){return zG(X)}},zG=({bufferedData:Z})=>I9(Z)?new Uint8Array(Z):Z;var oZ=B(()=>{d8();F0();kZ();B5();d1();g2()});import{finished as jO}from"node:stream/promises";var d2=async(Z,X,J,{isSameDirection:q,stopOnExit:Q=!1}={})=>{let $=NO(Z,J),Y=new AbortController;try{await Promise.race([...Q?[J.exitPromise]:[],jO(Z,{cleanup:!0,signal:Y.signal})])}catch(H){if(!$.stdinCleanedUp)EO(H,X,J,q)}finally{Y.abort()}},NO=(Z,{originalStreams:[X],subprocess:J})=>{let q={stdinCleanedUp:!1};if(Z===X)kO(Z,J,q);return q},kO=(Z,X,J)=>{let{_destroy:q}=Z;Z._destroy=(...Q)=>{xO(X,J),q.call(Z,...Q)}},xO=({exitCode:Z,signalCode:X},J)=>{if(Z!==null||X!==null)J.stdinCleanedUp=!0},EO=(Z,X,J,q)=>{if(!PO(Z,X,J,q))throw Z},PO=(Z,X,J,q=!0)=>{if(J.propagating)return RG(Z)||L5(Z);return J.propagating=!0,sZ(J,X)===q?RG(Z):L5(Z)},sZ=({fileDescriptors:Z},X)=>X!=="all"&&Z[X].direction==="input",L5=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",RG=(Z)=>Z?.code==="EPIPE";var _5=()=>{};var MG=({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>Z.stdio.map((K,W)=>rZ({stream:K,fdNumber:W,encoding:X,buffer:J[W],maxBuffer:q[W],lines:Q[W],allMixed:!1,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})),rZ=async({stream:Z,fdNumber:X,encoding:J,buffer:q,maxBuffer:Q,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:W})=>{if(!Z)return;let G=d2(Z,X,W);if(sZ(W,X)){await G;return}let[V]=await Promise.all([_G({stream:Z,onStreamEnd:G,fdNumber:X,encoding:J,buffer:q,maxBuffer:Q,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:W}),G]);return V};var tZ=B(()=>{oZ();_5()});var FG=({stdout:Z,stderr:X},{all:J})=>J&&(Z||X)?n1([Z,X].filter(Boolean)):void 0,DG=({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>rZ({...vO(Z,J),fdNumber:"all",encoding:X,maxBuffer:q[1]+q[2],lines:Q[1]||Q[2],allMixed:CO(Z),stripFinalNewline:$,verboseInfo:Y,streamInfo:H}),vO=({stdout:Z,stderr:X,all:J},[,q,Q])=>{let $=q||Q;if(!$)return{stream:J,buffer:$};if(!q)return{stream:X,buffer:$};if(!Q)return{stream:Z,buffer:$};return{stream:J,buffer:$}},CO=({all:Z,stdout:X,stderr:J})=>Z&&X&&J&&X.readableObjectMode!==J.readableObjectMode;var eZ=B(()=>{H5();tZ()});var TG=(Z)=>E6(Z,"ipc"),AG=(Z,X)=>{let J=J8(Z);n0({type:"ipc",verboseMessage:J,fdNumber:"ipc",verboseInfo:X})};var IG=B(()=>{P6();D1()});var OG=async({subprocess:Z,buffer:X,maxBuffer:J,ipc:q,ipcOutput:Q,verboseInfo:$})=>{if(!q)return Q;let Y=TG($),H=Q1(X,"ipc"),K=Q1(J,"ipc");for await(let W of CZ({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:q,shouldAwait:!1,reference:!0})){if(H)lH(Z,Q,K),Q.push(W);if(Y)AG(W,$)}return Q},wG=async(Z,X)=>{return await Promise.allSettled([Z]),X};var jG=B(()=>{d1();IG();$1();yZ()});import{once as yO}from"node:events";var NG=async({subprocess:Z,options:{encoding:X,buffer:J,maxBuffer:q,lines:Q,timeoutDuration:$,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:K,stripFinalNewline:W,ipc:G,ipcInput:V},context:L,verboseInfo:_,fileDescriptors:z,originalStreams:D,onInternalError:M,controller:F})=>{let N=BK(Z,L),R={originalStreams:D,fileDescriptors:z,subprocess:Z,exitPromise:N,propagating:!1},w=MG({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:W,verboseInfo:_,streamInfo:R}),A=DG({subprocess:Z,encoding:X,buffer:J,maxBuffer:q,lines:Q,stripFinalNewline:W,verboseInfo:_,streamInfo:R}),I=[],T=OG({subprocess:Z,buffer:J,maxBuffer:q,ipc:G,ipcOutput:I,verboseInfo:_}),b=SO(D,Z,R),j=bO(z,R);try{return await Promise.race([Promise.all([{},_K(N),Promise.all(w),A,T,LH(Z,V),...b,...j]),M,hO(Z,F),...KH(Z,$,L,F),...xY({subprocess:Z,cancelSignal:Y,gracefulCancel:H,context:L,controller:F}),...HH({subprocess:Z,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:K,context:L,controller:F})])}catch(x){return L.terminationReason??="other",Promise.all([{error:x},N,Promise.all(w.map((v)=>aZ(v))),aZ(A),wG(T,I),Promise.allSettled(b),Promise.allSettled(j)])}},SO=(Z,X,J)=>Z.map((q,Q)=>q===X.stdio[Q]?void 0:d2(q,Q,J)),bO=(Z,X)=>Z.flatMap(({stdioItems:J},q)=>J.filter(({value:Q,stream:$=Q})=>b0($,{checkOpen:!1})&&!y0($)).map(({type:Q,value:$,stream:Y=$})=>d2(Y,q,X,{isSameDirection:j0.has(Q),stopOnExit:Q==="native"}))),hO=async(Z,{signal:X})=>{let[J]=await yO(Z,"error",{signal:X});throw J};var kG=B(()=>{p1();s3();u3();o3();q1();_0();oZ();jG();t3();eZ();tZ();PZ();_5()});var xG=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),c2=(Z,X,J)=>{let q=Z[J];if(!q.has(X))q.set(X,[]);let Q=q.get(X),$=a0();return Q.push($),{resolve:$.resolve.bind($),promises:Q}},d6=async({resolve:Z,promises:X},J)=>{Z();let[q]=await Promise.race([Promise.allSettled([!0,J]),Promise.all([!1,...X])]);return!q};var z5=B(()=>{S6()});import{finished as EG}from"node:stream/promises";var ZX=async(Z)=>{if(Z===void 0)return;try{await XX(Z)}catch{}},PG=async(Z)=>{if(Z===void 0)return;try{await JX(Z)}catch{}},XX=async(Z)=>{await EG(Z,{cleanup:!0,readable:!1,writable:!0})},JX=async(Z)=>{await EG(Z,{cleanup:!0,readable:!0,writable:!1})},R5=async(Z,X)=>{if(await Z,X)throw X},M5=(Z,X,J)=>{if(J&&!L5(J))Z.destroy(J);else if(X)Z.destroy()};var qX=B(()=>{_5()});import{Readable as gO}from"node:stream";import{callbackify as fO}from"node:util";var vG=({subprocess:Z,concurrentStreams:X,encoding:J},{from:q,binary:Q=!0,preserveNewlines:$=!0}={})=>{let Y=Q||D0.has(J),{subprocessStdout:H,waitReadableDestroy:K}=QX(Z,q,X),{readableEncoding:W,readableObjectMode:G,readableHighWaterMark:V}=$X(H,Y),{read:L,onStdoutDataDone:_}=YX({subprocessStdout:H,subprocess:Z,binary:Y,encoding:J,preserveNewlines:$}),z=new gO({read:L,destroy:fO(UX.bind(void 0,{subprocessStdout:H,subprocess:Z,waitReadableDestroy:K})),highWaterMark:V,objectMode:G,encoding:W});return HX({subprocessStdout:H,onStdoutDataDone:_,readable:z,subprocess:Z}),z},QX=(Z,X,J)=>{let q=b6(Z,X),Q=c2(J,q,"readableDestroy");return{subprocessStdout:q,waitReadableDestroy:Q}},$X=({readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:J},q)=>q?{readableEncoding:Z,readableObjectMode:X,readableHighWaterMark:J}:{readableEncoding:Z,readableObjectMode:!0,readableHighWaterMark:iZ},YX=({subprocessStdout:Z,subprocess:X,binary:J,encoding:q,preserveNewlines:Q})=>{let $=a0(),Y=V5({subprocessStdout:Z,subprocess:X,binary:J,shouldEncode:!J,encoding:q,preserveNewlines:Q});return{read(){mO(this,Y,$)},onStdoutDataDone:$}},mO=async(Z,X,J)=>{try{let{value:q,done:Q}=await X.next();if(Q)J.resolve();else Z.push(q)}catch{}},HX=async({subprocessStdout:Z,onStdoutDataDone:X,readable:J,subprocess:q,subprocessStdin:Q})=>{try{if(await JX(Z),await q,await ZX(Q),await X,J.readable)J.push(null)}catch($){await ZX(Q),CG(J,$)}},UX=async({subprocessStdout:Z,subprocess:X,waitReadableDestroy:J},q)=>{if(await d6(J,X))CG(Z,q),await R5(X,q)},CG=(Z,X)=>{M5(Z,Z.readable,X)};var KX=B(()=>{m1();A1();B5();S6();z5();qX()});import{Writable as uO}from"node:stream";import{callbackify as yG}from"node:util";var SG=({subprocess:Z,concurrentStreams:X},{to:J}={})=>{let{subprocessStdin:q,waitWritableFinal:Q,waitWritableDestroy:$}=GX(Z,J,X),Y=new uO({...WX(q,Z,Q),destroy:yG(BX.bind(void 0,{subprocessStdin:q,subprocess:Z,waitWritableFinal:Q,waitWritableDestroy:$})),highWaterMark:q.writableHighWaterMark,objectMode:q.writableObjectMode});return VX(q,Y),Y},GX=(Z,X,J)=>{let q=R8(Z,X),Q=c2(J,q,"writableFinal"),$=c2(J,q,"writableDestroy");return{subprocessStdin:q,waitWritableFinal:Q,waitWritableDestroy:$}},WX=(Z,X,J)=>({write:pO.bind(void 0,Z),final:yG(dO.bind(void 0,Z,X,J))}),pO=(Z,X,J,q)=>{if(Z.write(X,J))q();else Z.once("drain",q)},dO=async(Z,X,J)=>{if(await d6(J,X)){if(Z.writable)Z.end();await X}},VX=async(Z,X,J)=>{try{if(await XX(Z),X.writable)X.end()}catch(q){await PG(J),bG(X,q)}},BX=async({subprocessStdin:Z,subprocess:X,waitWritableFinal:J,waitWritableDestroy:q},Q)=>{if(await d6(J,X),await d6(q,X))bG(Z,Q),await R5(X,Q)},bG=(Z,X)=>{M5(Z,Z.writable,X)};var LX=B(()=>{A1();z5();qX()});import{Duplex as cO}from"node:stream";import{callbackify as lO}from"node:util";var hG=({subprocess:Z,concurrentStreams:X,encoding:J},{from:q,to:Q,binary:$=!0,preserveNewlines:Y=!0}={})=>{let H=$||D0.has(J),{subprocessStdout:K,waitReadableDestroy:W}=QX(Z,q,X),{subprocessStdin:G,waitWritableFinal:V,waitWritableDestroy:L}=GX(Z,Q,X),{readableEncoding:_,readableObjectMode:z,readableHighWaterMark:D}=$X(K,H),{read:M,onStdoutDataDone:F}=YX({subprocessStdout:K,subprocess:Z,binary:H,encoding:J,preserveNewlines:Y}),N=new cO({read:M,...WX(G,Z,V),destroy:lO(nO.bind(void 0,{subprocessStdout:K,subprocessStdin:G,subprocess:Z,waitReadableDestroy:W,waitWritableFinal:V,waitWritableDestroy:L})),readableHighWaterMark:D,writableHighWaterMark:G.writableHighWaterMark,readableObjectMode:z,writableObjectMode:G.writableObjectMode,encoding:_});return HX({subprocessStdout:K,onStdoutDataDone:F,readable:N,subprocess:Z,subprocessStdin:G}),VX(G,N,K),N},nO=async({subprocessStdout:Z,subprocessStdin:X,subprocess:J,waitReadableDestroy:q,waitWritableFinal:Q,waitWritableDestroy:$},Y)=>{await Promise.all([UX({subprocessStdout:Z,subprocess:J,waitReadableDestroy:q},Y),BX({subprocessStdin:X,subprocess:J,waitWritableFinal:Q,waitWritableDestroy:$},Y)])};var gG=B(()=>{m1();KX();LX()});var _X=(Z,X,{from:J,binary:q=!1,preserveNewlines:Q=!1}={})=>{let $=q||D0.has(X),Y=b6(Z,J),H=V5({subprocessStdout:Y,subprocess:Z,binary:$,shouldEncode:!0,encoding:X,preserveNewlines:Q});return iO(H,Y,Z)},iO=async function*(Z,X,J){try{yield*Z}finally{if(X.readable)X.destroy();await J}};var fG=B(()=>{m1();A1();B5()});var mG=(Z,{encoding:X})=>{let J=xG();Z.readable=vG.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:X}),Z.writable=SG.bind(void 0,{subprocess:Z,concurrentStreams:J}),Z.duplex=hG.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:X}),Z.iterable=_X.bind(void 0,Z,X),Z[Symbol.asyncIterator]=_X.bind(void 0,Z,X,{})};var uG=B(()=>{z5();KX();LX();gG();fG()});var pG=(Z,X)=>{for(let[J,q]of oO){let Q=q.value.bind(X);Reflect.defineProperty(Z,J,{...q,value:Q})}},aO,oO;var dG=B(()=>{aO=(async()=>{})().constructor.prototype,oO=["then","catch","finally"].map((Z)=>[Z,Reflect.getOwnPropertyDescriptor(aO,Z)])});import{setMaxListeners as sO}from"node:events";import{spawn as rO}from"node:child_process";var cG=(Z,X,J,q)=>{let{file:Q,commandArguments:$,command:Y,escapedCommand:H,startTime:K,verboseInfo:W,options:G,fileDescriptors:V}=tO(Z,X,J),{subprocess:L,promise:_}=Zw({file:Q,commandArguments:$,options:G,startTime:K,verboseInfo:W,command:Y,escapedCommand:H,fileDescriptors:V});return L.pipe=W5.bind(void 0,{source:L,sourcePromise:_,boundOptions:{},createNested:q}),pG(L,_),o0.set(L,{options:G,fileDescriptors:V}),L},tO=(Z,X,J)=>{let{command:q,escapedCommand:Q,startTime:$,verboseInfo:Y}=$8(Z,X,J),{file:H,commandArguments:K,options:W}=C8(Z,X,J),G=eO(W),V=yK(G,Y);return{file:H,commandArguments:K,command:q,escapedCommand:Q,startTime:$,verboseInfo:Y,options:G,fileDescriptors:V}},eO=({timeout:Z,signal:X,...J})=>{if(X!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...J,timeoutDuration:Z}},Zw=({file:Z,commandArguments:X,options:J,startTime:q,verboseInfo:Q,command:$,escapedCommand:Y,fileDescriptors:H})=>{let K;try{K=rO(...y8(Z,X,J))}catch(z){return xK({error:z,command:$,escapedCommand:Y,fileDescriptors:H,options:J,startTime:q,verboseInfo:Q})}let W=new AbortController;sO(Number.POSITIVE_INFINITY,W.signal);let G=[...K.stdio];lK(K,H,W),eK(K,J,W);let V={},L=a0();K.kill=NY.bind(void 0,{kill:K.kill.bind(K),options:J,onInternalError:L,context:V,controller:W}),K.all=FG(K,J),mG(K,J),jK(K,J);let _=Xw({subprocess:K,options:J,startTime:q,verboseInfo:Q,fileDescriptors:H,originalStreams:G,command:$,escapedCommand:Y,context:V,onInternalError:L,controller:W});return{subprocess:K,promise:_}},Xw=async({subprocess:Z,options:X,startTime:J,verboseInfo:q,fileDescriptors:Q,originalStreams:$,command:Y,escapedCommand:H,context:K,onInternalError:W,controller:G})=>{let[V,[L,_],z,D,M]=await NG({subprocess:Z,options:X,context:K,verboseInfo:q,fileDescriptors:Q,originalStreams:$,onInternalError:W,controller:G});G.abort(),W.resolve();let F=z.map((w,A)=>U1(w,X,A)),N=U1(D,X,"all"),R=Jw({errorInfo:V,exitCode:L,signal:_,stdio:F,all:N,ipcOutput:M,context:K,options:X,command:Y,escapedCommand:H,startTime:J});return m6(R,q,X)},Jw=({errorInfo:Z,exitCode:X,signal:J,stdio:q,all:Q,ipcOutput:$,context:Y,options:H,command:K,escapedCommand:W,startTime:G})=>("error"in Z)?b2({error:Z.error,command:K,escapedCommand:W,timedOut:Y.terminationReason==="timeout",isCanceled:Y.terminationReason==="cancel"||Y.terminationReason==="gracefulCancel",isGracefullyCanceled:Y.terminationReason==="gracefulCancel",isMaxBuffer:Z.error instanceof Y1,isForcefullyTerminated:Y.isForcefullyTerminated,exitCode:X,signal:J,stdio:q,all:Q,ipcOutput:$,options:H,startTime:G,isSync:!1}):l8({command:K,escapedCommand:W,stdio:q,all:Q,ipcOutput:$,options:H,startTime:G});var lG=B(()=>{d8();y3();XZ();A1();JZ();SZ();h2();n8();EK();SK();g2();nK();B8();ZG();VG();eZ();kG();uG();S6();dG()});var F5=(Z,X)=>{let J=Object.fromEntries(Object.entries(X).map(([q,Q])=>[q,qw(q,Z[q],Q)]));return{...Z,...J}},qw=(Z,X,J)=>{if(Qw.has(Z)&&t(X)&&t(J))return{...X,...J};return J},Qw;var nG=B(()=>{X1();$1();Qw=new Set(["env",...E3])});var w1=(Z,X,J,q)=>{let Q=(Y,H,K)=>w1(Y,H,J,K),$=(...Y)=>$w({mapArguments:Z,deepOptions:J,boundOptions:X,setBoundExeca:q,createNested:Q},...Y);if(q!==void 0)q($,Q,X);return $},$w=({mapArguments:Z,deepOptions:X={},boundOptions:J={},setBoundExeca:q,createNested:Q},$,...Y)=>{if(t($))return Q(Z,F5(J,$),q);let{file:H,commandArguments:K,options:W,isSync:G}=Yw({mapArguments:Z,firstArgument:$,nextArguments:Y,deepOptions:X,boundOptions:J});return G?MK(H,K,W):cG(H,K,W,Q)},Yw=({mapArguments:Z,firstArgument:X,nextArguments:J,deepOptions:q,boundOptions:Q})=>{let $=x9(X)?E9(X,J):[X,...J],[Y,H,K]=n4(...$),W=F5(F5(q,Q),K),{file:G=Y,commandArguments:V=H,options:L=W,isSync:_=!1}=Z({file:Y,commandArguments:H,options:W});return{file:G,commandArguments:V,options:L,isSync:_}};var iG=B(()=>{X1();w3();P9();FK();lG();nG()});var aG=({file:Z,commandArguments:X})=>sG(Z,X),oG=({file:Z,commandArguments:X})=>({...sG(Z,X),isSync:!0}),sG=(Z,X)=>{if(X.length>0)throw TypeError(`The command and its arguments must be passed as a single string: ${Z} ${X}.`);let[J,...q]=Hw(Z);return{file:J,commandArguments:q}},Hw=(Z)=>{if(typeof Z!=="string")throw TypeError(`The command must be a string: ${String(Z)}.`);let X=Z.trim();if(X==="")return[];let J=[];for(let q of X.split(Uw)){let Q=J.at(-1);if(Q&&Q.endsWith("\\"))J[J.length-1]=`${Q.slice(0,-1)} ${q}`;else J.push(q)}return J},Uw;var rG=B(()=>{Uw=/ +/g});var tG=(Z,X,J)=>{Z.sync=X(Kw,J),Z.s=Z.sync},eG=({options:Z})=>ZW(Z),Kw=({options:Z})=>({...ZW(Z),isSync:!0}),ZW=(Z)=>({options:{...Gw(Z),...Z}}),Gw=({input:Z,inputFile:X,stdio:J})=>Z===void 0&&X===void 0&&J===void 0?{stdin:"inherit"}:{},XW;var JW=B(()=>{XW={preferLocal:!0}});var zX,N0,qn,Qn,$n,Yn,Hn,Un,Kn,Gn;var c6=B(()=>{iG();rG();r3();JW();SZ();zX=w1(()=>({})),N0=w1(()=>({isSync:!0})),qn=w1(aG),Qn=w1(oG),$n=w1(WH),Yn=w1(eG,{},XW,tG),{sendMessage:Hn,getOneMessage:Un,getEachMessage:Kn,getCancelSignal:Gn}=NK()});async function Ww(Z){if(process.platform==="win32"){let J=await zX(`where.exe ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(J.exitCode!==0||!J.stdout)return null;return J.stdout.trim().split(/\r?\n/)[0]||null}let X=await zX(`which ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(X.exitCode!==0||!X.stdout)return null;return X.stdout.trim()}function Vw(Z){if(process.platform==="win32")try{return F6(`where.exe ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return F6(`which ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var RX,qW,D5;var T5=B(()=>{c6();a7();RX=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,qW=RX?async(Z)=>RX(Z):Ww,D5=RX??Vw});function QW(Z,X){return{cmd:D5(Z)??Z,args:X}}var $W=B(()=>{T5()});import{dirname as Bw,join as YW}from"path";async function l6(Z){try{return!!await qW(Z)}catch{return!1}}function Mw(){return process.env.__CFBundleIdentifier==="com.conductor.app"}function Dw(){if(process.env.CURSOR_TRACE_ID)return"cursor";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("cursor"))return"cursor";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("windsurf"))return"windsurf";if(process.env.VSCODE_GIT_ASKPASS_MAIN?.includes("antigravity"))return"antigravity";let Z=process.env.__CFBundleIdentifier?.toLowerCase();if(Z?.includes("vscodium"))return"codium";if(Z?.includes("windsurf"))return"windsurf";if(Z?.includes("com.google.android.studio"))return"androidstudio";if(Z){for(let X of Fw)if(Z.includes(X))return X}if(process.env.VisualStudioVersion)return"visualstudio";if(process.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"){if(process.platform==="darwin")return"pycharm";return"pycharm"}if(process.env.TERM==="xterm-ghostty")return"ghostty";if(process.env.TERM?.includes("kitty"))return"kitty";if(process.env.TERM_PROGRAM)return process.env.TERM_PROGRAM;if(process.env.TMUX)return"tmux";if(process.env.STY)return"screen";if(process.env.KONSOLE_VERSION)return"konsole";if(process.env.GNOME_TERMINAL_SERVICE)return"gnome-terminal";if(process.env.XTERM_VERSION)return"xterm";if(process.env.VTE_VERSION)return"vte-based";if(process.env.TERMINATOR_UUID)return"terminator";if(process.env.KITTY_WINDOW_ID)return"kitty";if(process.env.ALACRITTY_LOG)return"alacritty";if(process.env.TILIX_ID)return"tilix";if(process.env.WT_SESSION)return"windows-terminal";if(process.env.SESSIONNAME&&process.env.TERM==="cygwin")return"cygwin";if(process.env.MSYSTEM)return process.env.MSYSTEM.toLowerCase();if(process.env.ConEmuANSI||process.env.ConEmuPID||process.env.ConEmuTask)return"conemu";if(process.env.WSL_DISTRO_NAME)return`wsl-${process.env.WSL_DISTRO_NAME}`;if(GW())return"ssh-session";if(process.env.TERM){let X=process.env.TERM;if(X.includes("alacritty"))return"alacritty";if(X.includes("rxvt"))return"rxvt";if(X.includes("termite"))return"termite";return process.env.TERM}if(!process.stdout.isTTY)return"non-interactive";return null}function GW(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function wn(){let Z=process.env.CLAUDE_CODE_HOST_PLATFORM;if(Z==="win32"||Z==="darwin"||Z==="linux")return Z;return n6.platform}var V0,Lw,_w,zw,KW,Rw,Fw,Tw,n6;var MX=B(()=>{L1();UW();T9();d0();$W();R0();T5();V0=u(()=>{let Z=HW(),X=Y0(),J=YW(X,`config${Z}.json`);if(!k().existsSync(J)){let Q=process.env.CLAUDIO_CONFIG_DIR?X:Bw(X),$=YW(Q,`.claudio${Z}.json`);if(k().existsSync($))return $}return J}),Lw=u(async()=>{try{let{default:Z}=await import("./index-0.1.10-ra4k3x9k.mjs");return await Z.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});_w=u(async()=>{let Z=[];if(await l6("npm"))Z.push("npm");if(await l6("yarn"))Z.push("yarn");if(await l6("pnpm"))Z.push("pnpm");return Z}),zw=u(async()=>{let Z=[];if(await l6("bun"))Z.push("bun");if(await l6("deno"))Z.push("deno");if(await l6("node"))Z.push("node");return Z}),KW=u(()=>{try{return k().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(Z){return!1}}),Rw=u(()=>{try{if(!KW())return!1;let{cmd:Z}=QW("npm",[]);return Z.startsWith("/mnt/c/")}catch(Z){return!1}});Fw=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];Tw=u(()=>{if(e(process.env.CODESPACES))return"codespaces";if(process.env.GITPOD_WORKSPACE_ID)return"gitpod";if(process.env.REPL_ID||process.env.REPL_SLUG)return"replit";if(process.env.PROJECT_DOMAIN)return"glitch";if(e(process.env.VERCEL))return"vercel";if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return"railway";if(e(process.env.RENDER))return"render";if(e(process.env.NETLIFY))return"netlify";if(process.env.DYNO)return"heroku";if(process.env.FLY_APP_NAME||process.env.FLY_MACHINE_ID)return"fly.io";if(e(process.env.CF_PAGES))return"cloudflare-pages";if(process.env.DENO_DEPLOYMENT_ID)return"deno-deploy";if(process.env.AWS_LAMBDA_FUNCTION_NAME)return"aws-lambda";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_FARGATE")return"aws-fargate";if(process.env.AWS_EXECUTION_ENV==="AWS_ECS_EC2")return"aws-ecs";try{if(k().readFileSync("/sys/hypervisor/uuid",{encoding:"utf8"}).trim().toLowerCase().startsWith("ec2"))return"aws-ec2"}catch{}if(process.env.K_SERVICE)return"gcp-cloud-run";if(process.env.GOOGLE_CLOUD_PROJECT)return"gcp";if(process.env.WEBSITE_SITE_NAME||process.env.WEBSITE_SKU)return"azure-app-service";if(process.env.AZURE_FUNCTIONS_ENVIRONMENT)return"azure-functions";if(process.env.APP_URL?.includes("ondigitalocean.app"))return"digitalocean-app-platform";if(process.env.SPACE_CREATOR_USER_ID)return"huggingface-spaces";if(e(process.env.GITHUB_ACTIONS))return"github-actions";if(e(process.env.GITLAB_CI))return"gitlab-ci";if(process.env.CIRCLECI)return"circleci";if(process.env.BUILDKITE)return"buildkite";if(e(process.env.CI))return"ci";if(process.env.KUBERNETES_SERVICE_HOST)return"kubernetes";try{if(k().existsSync("/.dockerenv"))return"docker"}catch{}if(n6.platform==="darwin")return"unknown-darwin";if(n6.platform==="linux")return"unknown-linux";if(n6.platform==="win32")return"unknown-win32";return"unknown"});n6={hasInternetAccess:Lw,isCI:e(process.env.CI),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:Dw(),isSSH:GW,getPackageManagers:_w,getRuntimes:zw,isRunningWithBun:u(D9),isWslEnvironment:KW,isNpmFromWindowsPath:Rw,isConductor:Mw,detectDeploymentEnvironment:Tw}});var kn,xn="∙",En="✻",Pn="↑",vn="↓",Cn="↯",yn="○",Sn="◐",bn="●",hn="◉",WW="⏸",gn="↻",fn="◇",mn="◆",un="※",pn="▎",dn="·✔︎·",cn="×";var VW=B(()=>{MX();kn=n6.platform==="darwin"?"⏺":"●"});var FX,Aw,l2;var BW=B(()=>{FX=["acceptEdits","bypassPermissions","default","dontAsk","plan"],Aw=[...FX,"auto"],l2=Aw});function Zi(Z){return!0}function A5(Z){return LW[Z]??LW.default}function Xi(Z){return A5(Z).external}function Ji(Z){return l2.includes(Z)?Z:"default"}function qi(Z){return A5(Z).title}function Qi(Z){return Z==="default"||Z===void 0}function $i(Z){return A5(Z).symbol}function Yi(Z){return A5(Z).color}var tn,en,LW;var _W=B(()=>{l0();VW();BW();b1();tn=O(()=>DX.enum(l2)),en=O(()=>DX.enum(FX)),LW={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:WW,color:"planMode",external:"plan"},acceptEdits:{title:"Accept edits",shortTitle:"Accept",symbol:"⏵⏵",color:"autoAccept",external:"acceptEdits"},bypassPermissions:{title:"Bypass Permissions",shortTitle:"Bypass",symbol:"⏵⏵",color:"error",external:"bypassPermissions"},dontAsk:{title:"Don't Ask",shortTitle:"DontAsk",symbol:"⏵⏵",color:"error",external:"dontAsk"},...{auto:{title:"Auto mode",shortTitle:"Auto",symbol:"⏵⏵",color:"warning",external:"default"}}}});var zW=()=>{};var RW;var MW=B(()=>{zW();RW=["PreToolUse","PostToolUse","PostToolUseFailure","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","StopFailure","SubagentStart","SubagentStop","PreCompact","PostCompact","PermissionRequest","PermissionDenied","Setup","TeammateIdle","TaskCreated","TaskCompleted","Elicitation","ElicitationResult","ConfigChange","WorktreeCreate","WorktreeRemove","InstructionsLoaded","CwdChanged","FileChanged"]});var FW=()=>{};var DW=()=>{};var TW=B(()=>{MW();FW();DW()});var AW,Li="bash";var IW=B(()=>{AW=["bash","powershell"]});function Iw(){let Z=U.object({type:U.literal("command").describe("Shell command hook type"),command:U.string().describe("Shell command to execute"),if:I5(),shell:U.enum(AW).optional().describe("Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash."),timeout:U.number().positive().optional().describe("Timeout in seconds for this specific command"),statusMessage:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution"),async:U.boolean().optional().describe("If true, hook runs in background without blocking"),asyncRewake:U.boolean().optional().describe("If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async.")}),X=U.object({type:U.literal("prompt").describe("LLM prompt hook type"),prompt:U.string().describe("Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."),if:I5(),timeout:U.number().positive().optional().describe("Timeout in seconds for this specific prompt evaluation"),model:U.string().optional().describe('Model to use for this prompt hook (e.g., "claude-sonnet-4-6"). If not specified, uses the default small fast model.'),statusMessage:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution")}),J=U.object({type:U.literal("http").describe("HTTP hook type"),url:U.string().url().describe("URL to POST the hook input JSON to"),if:I5(),timeout:U.number().positive().optional().describe("Timeout in seconds for this specific request"),headers:U.record(U.string(),U.string()).optional().describe('Additional headers to include in the request. Values may reference environment variables using $VAR_NAME or ${VAR_NAME} syntax (e.g., "Authorization": "Bearer $MY_TOKEN"). Only variables listed in allowedEnvVars will be interpolated.'),allowedEnvVars:U.array(U.string()).optional().describe("Explicit list of environment variable names that may be interpolated in header values. Only variables listed here will be resolved; all other $VAR references are left as empty strings. Required for env var interpolation to work."),statusMessage:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution")}),q=U.object({type:U.literal("agent").describe("Agentic verifier hook type"),prompt:U.string().describe('Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.'),if:I5(),timeout:U.number().positive().optional().describe("Timeout in seconds for agent execution (default 60)"),model:U.string().optional().describe('Model to use for this agent hook (e.g., "claude-sonnet-4-6"). If not specified, uses Haiku.'),statusMessage:U.string().optional().describe("Custom status message to display in spinner while hook runs"),once:U.boolean().optional().describe("If true, hook runs once and is removed after execution")});return{BashCommandHookSchema:Z,PromptHookSchema:X,HttpHookSchema:J,AgentHookSchema:q}}var I5,OW,wW,a1;var O5=B(()=>{TW();l0();b1();IW();I5=O(()=>U.string().optional().describe('Permission rule syntax to filter when this hook runs (e.g., "Bash(git *)"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands.'));OW=O(()=>{let{BashCommandHookSchema:Z,PromptHookSchema:X,AgentHookSchema:J,HttpHookSchema:q}=Iw();return U.discriminatedUnion("type",[Z,X,J,q])}),wW=O(()=>U.object({matcher:U.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:U.array(OW()).describe("List of hooks to execute when the matcher matches")})),a1=O(()=>U.partialRecord(U.enum(RW),U.array(wW())))});var Ii,Oi,Ow,ww,jW,jw,Nw,kw,xw,Ew,Pw,vw,w5,wi;var NW=B(()=>{l0();b1();Ii=O(()=>U.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),Oi=O(()=>U.enum(["stdio","sse","sse-ide","http","ws","sdk"])),Ow=O(()=>U.object({type:U.literal("stdio").optional(),command:U.string().min(1,"Command cannot be empty"),args:U.array(U.string()).default([]),env:U.record(U.string(),U.string()).optional()})),ww=O(()=>U.boolean()),jW=O(()=>U.object({clientId:U.string().optional(),callbackPort:U.number().int().positive().optional(),authServerMetadataUrl:U.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional(),xaa:ww().optional()})),jw=O(()=>U.object({type:U.literal("sse"),url:U.string(),headers:U.record(U.string(),U.string()).optional(),headersHelper:U.string().optional(),oauth:jW().optional()})),Nw=O(()=>U.object({type:U.literal("sse-ide"),url:U.string(),ideName:U.string(),ideRunningInWindows:U.boolean().optional()})),kw=O(()=>U.object({type:U.literal("ws-ide"),url:U.string(),ideName:U.string(),authToken:U.string().optional(),ideRunningInWindows:U.boolean().optional()})),xw=O(()=>U.object({type:U.literal("http"),url:U.string(),headers:U.record(U.string(),U.string()).optional(),headersHelper:U.string().optional(),oauth:jW().optional()})),Ew=O(()=>U.object({type:U.literal("ws"),url:U.string(),headers:U.record(U.string(),U.string()).optional(),headersHelper:U.string().optional()})),Pw=O(()=>U.object({type:U.literal("sdk"),name:U.string()})),vw=O(()=>U.object({type:U.literal("claudeai-proxy"),url:U.string(),id:U.string()})),w5=O(()=>U.union([Ow(),jw(),Nw(),kw(),xw(),Ew(),Pw(),vw()])),wi=O(()=>U.object({mcpServers:U.record(U.string(),w5())}))});function Pi(Z,X){let J=Z.toLowerCase();return X.autoUpdate??(k5.has(J)&&!Cw.has(J))}function bw(Z){if(k5.has(Z.toLowerCase()))return!1;if(Sw.test(Z))return!0;return yw.test(Z)}function vi(Z,X){let J=Z.toLowerCase();if(!k5.has(J))return null;if(X.source==="github"){if(!(X.repo||"").toLowerCase().startsWith(`${j5}/`))return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${j5}/' can use this name.`;return null}if(X.source==="git"&&X.url){let q=X.url.toLowerCase(),Q=q.includes("github.com/anthropics/"),$=q.includes("git@github.com:anthropics/");if(Q||$)return null;return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${j5}/' can use this name.`}return`The name '${Z}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${j5}' organization.`}function yi(Z){return typeof Z==="string"&&Z.startsWith("./")}function Si(Z){return Z.source==="file"||Z.source==="directory"}var k5,Cw,yw,Sw,j5="anthropics",K1,i6,kW,AX,IX,PW,OX,hw,Ci,gw,fw,mw,uw,pw,dw,xW,cw,lw,vW,nw,iw,EW,aw,CW,ow,sw,n2,TX,yW,rw,tw,bi,N5,ew,Zj,hi,Xj,Jj,qj,Qj,$j,gi,Yj,fi;var SW=B(()=>{l0();O5();NW();b1();k5=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),Cw=new Set(["knowledge-work-plugins"]);yw=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,Sw=/[^\u0020-\u007E]/;K1=O(()=>U.string().startsWith("./")),i6=O(()=>K1().endsWith(".json")),kW=O(()=>U.union([K1().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB file path must end with .mcpb or .dxt"}).describe("Path to MCPB file relative to plugin root"),U.string().url().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB URL must end with .mcpb or .dxt"}).describe("URL to MCPB file")])),AX=O(()=>K1().endsWith(".md")),IX=O(()=>U.union([AX(),K1()])),PW=O(()=>U.string().min(1,"Marketplace must have a name").refine((Z)=>!Z.includes(" "),{message:'Marketplace name cannot contain spaces. Use kebab-case (e.g., "my-marketplace")'}).refine((Z)=>!Z.includes("/")&&!Z.includes("\\")&&!Z.includes("..")&&Z!==".",{message:'Marketplace name cannot contain path separators (/ or \\), ".." sequences, or be "."'}).refine((Z)=>!bw(Z),{message:"Marketplace name impersonates an official Anthropic/Claude marketplace"}).refine((Z)=>Z.toLowerCase()!=="inline",{message:'Marketplace name "inline" is reserved for --plugin-dir session plugins'}).refine((Z)=>Z.toLowerCase()!=="builtin",{message:'Marketplace name "builtin" is reserved for built-in plugins'})),OX=O(()=>U.object({name:U.string().min(1,"Author name cannot be empty").describe("Display name of the plugin author or organization"),email:U.string().optional().describe("Contact email for support or feedback"),url:U.string().optional().describe("Website, GitHub profile, or organization URL")})),hw=O(()=>U.object({name:U.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Unique identifier for the plugin, used for namespacing (prefer kebab-case)"),version:U.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),description:U.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),author:OX().optional().describe("Information about the plugin creator or maintainer"),homepage:U.string().url().optional().describe("Plugin homepage or documentation URL"),repository:U.string().optional().describe("Source code repository URL"),license:U.string().optional().describe("SPDX license identifier (e.g., MIT, Apache-2.0)"),keywords:U.array(U.string()).optional().describe("Tags for plugin discovery and categorization"),dependencies:U.array(Zj()).optional().describe(`Plugins that must be enabled for this plugin to function. Bare names (no "@marketplace") are resolved against the declaring plugin's own marketplace.`)})),Ci=O(()=>U.object({description:U.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:U.lazy(()=>a1()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),gw=O(()=>U.object({hooks:U.union([i6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),U.lazy(()=>a1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),U.array(U.union([i6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),U.lazy(()=>a1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),fw=O(()=>U.object({source:IX().optional().describe("Path to command markdown file, relative to plugin root"),content:U.string().optional().describe("Inline markdown content for the command"),description:U.string().optional().describe("Command description override"),argumentHint:U.string().optional().describe('Hint for command arguments (e.g., "[file]")'),model:U.string().optional().describe("Default model for this command"),allowedTools:U.array(U.string()).optional().describe("Tools allowed when command runs")}).refine((Z)=>Z.source&&!Z.content||!Z.source&&Z.content,{message:'Command must have either "source" (file path) or "content" (inline markdown), but not both'})),mw=O(()=>U.object({commands:U.union([IX().describe("Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root"),U.array(IX().describe("Path to additional command file or skill directory (in addition to those in the commands/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional command files or skill directories"),U.record(U.string(),fw()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),uw=O(()=>U.object({agents:U.union([AX().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),U.array(AX().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional agent files")])})),pw=O(()=>U.object({skills:U.union([K1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),U.array(K1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional skill directories")])})),dw=O(()=>U.object({outputStyles:U.union([K1().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root"),U.array(K1().describe("Path to additional output styles directory or file (in addition to those in the output-styles/ directory, if it exists), relative to the plugin root")).describe("List of paths to additional output styles directories or files")])})),xW=O(()=>U.string().min(1)),cw=O(()=>U.string().min(2).refine((Z)=>Z.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),lw=O(()=>U.object({mcpServers:U.union([i6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),kW().describe("Path or URL to MCPB file containing MCP server configuration"),U.record(U.string(),w5()).describe("MCP server configurations keyed by server name"),U.array(U.union([i6().describe("Path to MCP servers configuration file"),kW().describe("Path or URL to MCPB file"),U.record(U.string(),w5()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),vW=O(()=>U.object({type:U.enum(["string","number","boolean","directory","file"]).describe("Type of the configuration value"),title:U.string().describe("Human-readable label shown in the config dialog"),description:U.string().describe("Help text shown beneath the field in the config dialog"),required:U.boolean().optional().describe("If true, validation fails when this field is empty"),default:U.union([U.string(),U.number(),U.boolean(),U.array(U.string())]).optional().describe("Default value used when the user provides nothing"),multiple:U.boolean().optional().describe("For string type: allow an array of strings"),sensitive:U.boolean().optional().describe("If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json"),min:U.number().optional().describe("Minimum value (number type only)"),max:U.number().optional().describe("Maximum value (number type only)")}).strict()),nw=O(()=>U.object({userConfig:U.record(U.string().regex(/^[A-Za-z_]\w*$/,"Option keys must be valid identifiers (letters, digits, underscore; no leading digit) — they become CLAUDE_PLUGIN_OPTION_<KEY> env vars in hooks"),vW()).optional().describe("User-configurable values this plugin needs. Prompted at enable time. Non-sensitive values saved to settings.json; sensitive values to secure storage (macOS keychain or .credentials.json). Available as ${user_config.KEY} in MCP/LSP server config, hook commands, and (non-sensitive only) skill/agent content. "+"Note: sensitive values share a single keychain entry with OAuth tokens — keep "+"secret counts small to stay under the ~2KB stdin-safe limit (see INC-3028).")})),iw=O(()=>U.object({channels:U.array(U.object({server:U.string().min(1).describe("Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers."),displayName:U.string().optional().describe('Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.'),userConfig:U.record(U.string(),vW()).optional().describe("Fields to prompt the user for when enabling this plugin in assistant mode. Saved values are substituted into ${user_config.KEY} references in the mcpServers env.")}).strict()).describe("Channels this plugin provides. Each entry declares an MCP server as a message channel and optionally specifies user configuration to prompt for at enable time.")})),EW=O(()=>U.strictObject({command:U.string().min(1).refine((Z)=>{if(Z.includes(" ")&&!Z.startsWith("/"))return!1;return!0},{message:"Command should not contain spaces. Use args array for arguments."}).describe('Command to execute the LSP server (e.g., "typescript-language-server")'),args:U.array(xW()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:U.record(cw(),xW()).refine((Z)=>Object.keys(Z).length>0,{message:"extensionToLanguage must have at least one mapping"}).describe("Mapping from file extension to LSP language ID. File extensions and languages are derived from this mapping."),transport:U.enum(["stdio","socket"]).default("stdio").describe("Communication transport mechanism"),env:U.record(U.string(),U.string()).optional().describe("Environment variables to set when starting the server"),initializationOptions:U.unknown().optional().describe("Initialization options passed to the server during initialization"),settings:U.unknown().optional().describe("Settings passed to the server via workspace/didChangeConfiguration"),workspaceFolder:U.string().optional().describe("Workspace folder path to use for the server"),startupTimeout:U.number().int().positive().optional().describe("Maximum time to wait for server startup (milliseconds)"),shutdownTimeout:U.number().int().positive().optional().describe("Maximum time to wait for graceful shutdown (milliseconds)"),restartOnCrash:U.boolean().optional().describe("Whether to restart the server if it crashes"),maxRestarts:U.number().int().nonnegative().optional().describe("Maximum number of restart attempts before giving up")})),aw=O(()=>U.object({lspServers:U.union([i6().describe("Path to .lsp.json configuration file relative to plugin root"),U.record(U.string(),EW()).describe("LSP server configurations keyed by server name"),U.array(U.union([i6().describe("Path to LSP configuration file"),U.record(U.string(),EW()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),CW=O(()=>U.string().refine((Z)=>!Z.includes("..")&&!Z.includes("//"),"Package name cannot contain path traversal patterns").refine((Z)=>{let X=/^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/,J=/^[a-z0-9][a-z0-9-._]*$/;return X.test(Z)||J.test(Z)},"Invalid npm package name format")),ow=O(()=>U.object({settings:U.record(U.string(),U.unknown()).optional().describe("Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)")})),sw=O(()=>U.object({...hw().shape,...gw().partial().shape,...mw().partial().shape,...uw().partial().shape,...pw().partial().shape,...dw().partial().shape,...iw().partial().shape,...lw().partial().shape,...aw().partial().shape,...ow().partial().shape,...nw().partial().shape})),n2=O(()=>U.discriminatedUnion("source",[U.object({source:U.literal("url"),url:U.string().url().describe("Direct URL to marketplace.json file"),headers:U.record(U.string(),U.string()).optional().describe("Custom HTTP headers (e.g., for authentication)")}),U.object({source:U.literal("github"),repo:U.string().describe("GitHub repository in owner/repo format"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:U.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:U.array(U.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.')}),U.object({source:U.literal("git"),url:U.string().describe("Full git repository URL"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:U.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:U.array(U.string()).optional().describe('Directories to include via git sparse-checkout (cone mode). Use for monorepos where the marketplace lives in a subdirectory. Example: [".claude-plugin", "plugins"]. If omitted, the full repository is cloned.')}),U.object({source:U.literal("npm"),package:CW().describe("NPM package containing marketplace.json")}),U.object({source:U.literal("file"),path:U.string().describe("Local file path to marketplace.json")}),U.object({source:U.literal("directory"),path:U.string().describe("Local directory containing .claude-plugin/marketplace.json")}),U.object({source:U.literal("hostPattern"),hostPattern:U.string().describe('Regex pattern to match the host/domain extracted from any marketplace source type. For github sources, matches against "github.com". For git sources (SSH or HTTPS), extracts the hostname from the URL. Use in strictKnownMarketplaces to allow all marketplaces from a specific host (e.g., "^github\\.mycompany\\.com$").')}),U.object({source:U.literal("pathPattern"),pathPattern:U.string().describe('Regex pattern matched against the .path field of file and directory sources. Use in strictKnownMarketplaces to allow filesystem-based marketplaces alongside hostPattern restrictions for network sources. Use ".*" to allow all filesystem paths, or a narrower pattern (e.g., "^/opt/approved/") to restrict to specific directories.')}),U.object({source:U.literal("settings"),name:PW().refine((Z)=>!k5.has(Z.toLowerCase()),{message:"Reserved official marketplace names cannot be used with settings sources. validateOfficialNameSource only accepts github/git sources from anthropics/* for these names; a settings source would be rejected after loadAndCacheMarketplace has already written to disk with cleanupNeeded=false."}).describe("Marketplace name. Must match the extraKnownMarketplaces key (enforced); the synthetic manifest is written under this name. Same validation "+"as PluginMarketplaceSchema plus reserved-name rejection — "+"validateOfficialNameSource runs after the disk write, too late to clean up."),plugins:U.array(rw()).describe("Plugin entries declared inline in settings.json"),owner:OX().optional()}).describe("Inline marketplace manifest defined directly in settings.json. The reconciler writes a synthetic marketplace.json to the cache; diffMarketplaces detects edits via isEqual on the stored source (the plugins array is inside this object, so edits surface as sourceChanged).")])),TX=O(()=>U.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),yW=O(()=>U.union([K1().describe("Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)"),U.object({source:U.literal("npm"),package:CW().or(U.string()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:U.string().optional().describe("Specific version or version range (e.g., ^1.0.0, ~2.1.0)"),registry:U.string().url().optional().describe("Custom NPM registry URL (defaults to using system default, likely npmjs.org)")}).describe("NPM package as plugin source"),U.object({source:U.literal("pip"),package:U.string().describe("Python package name as it appears on PyPI"),version:U.string().optional().describe("Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)"),registry:U.string().url().optional().describe("Custom PyPI registry URL (defaults to using system default, likely pypi.org)")}).describe("Python package as plugin source"),U.object({source:U.literal("url"),url:U.string().describe("Full git repository URL (https:// or git@)"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:TX().optional().describe("Specific commit SHA to use")}),U.object({source:U.literal("github"),repo:U.string().describe("GitHub repository in owner/repo format"),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:TX().optional().describe("Specific commit SHA to use")}),U.object({source:U.literal("git-subdir"),url:U.string().describe("Git repository: GitHub owner/repo shorthand, https://, or git@ URL"),path:U.string().min(1).describe('Subdirectory within the repo containing the plugin (e.g., "tools/claude-plugin"). Cloned sparsely using partial clone (--filter=tree:0) to minimize bandwidth for monorepos.'),ref:U.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:TX().optional().describe("Specific commit SHA to use")}).describe("Plugin located in a subdirectory of a larger repository (monorepo). Only the specified subdirectory is materialized; the rest of the repo is not downloaded.")])),rw=O(()=>U.object({name:U.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Plugin name as it appears in the target repository"),source:yW().describe("Where to fetch the plugin from. Must be a remote source — relative "+"paths have no marketplace repository to resolve against."),description:U.string().optional(),version:U.string().optional(),strict:U.boolean().optional()}).refine((Z)=>typeof Z.source!=="string",{message:'Plugins in a settings-sourced marketplace must use remote sources (github, git-subdir, npm, url, pip). Relative-path sources like "./foo" have no marketplace repository to resolve against.'}));tw=O(()=>sw().partial().extend({name:U.string().min(1,"Plugin name cannot be empty").refine((Z)=>!Z.includes(" "),{message:'Plugin name cannot contain spaces. Use kebab-case (e.g., "my-plugin")'}).describe("Unique identifier matching the plugin name"),source:yW().describe("Where to fetch the plugin from"),category:U.string().optional().describe('Category for organizing plugins (e.g., "productivity", "development")'),tags:U.array(U.string()).optional().describe("Tags for searchability and discovery"),strict:U.boolean().optional().default(!0).describe("Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.")})),bi=O(()=>U.object({name:PW(),owner:OX().describe("Marketplace maintainer or curator information"),plugins:U.array(tw()).describe("Collection of available plugins in this marketplace"),forceRemoveDeletedPlugins:U.boolean().optional().describe("When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users"),metadata:U.object({pluginRoot:U.string().optional().describe("Base path for relative plugin sources"),version:U.string().optional().describe("Marketplace version"),description:U.string().optional().describe("Marketplace description")}).optional().describe("Optional marketplace metadata"),allowCrossMarketplaceDependenciesOn:U.array(U.string()).optional().describe("Marketplace names whose plugins may be auto-installed as dependencies. Only the root marketplace's allowlist applies — no transitive trust.")})),N5=O(()=>U.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,"Plugin ID must be in format: plugin@marketplace")),ew=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,Zj=O(()=>U.union([U.string().regex(ew,"Dependency must be a plugin name, optionally qualified with @marketplace").transform((Z)=>Z.replace(/@\^[^@]*$/,"")),U.object({name:U.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i),marketplace:U.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i).optional()}).loose().transform((Z)=>Z.marketplace?`${Z.name}@${Z.marketplace}`:Z.name)])),hi=O(()=>U.union([N5(),U.object({id:N5().describe('Plugin identifier (e.g., "formatter@tools")'),version:U.string().optional().describe('Version constraint (e.g., "^2.0.0")'),required:U.boolean().optional().describe("If true, cannot be disabled"),config:U.record(U.string(),U.unknown()).optional().describe("Plugin-specific configuration")})])),Xj=O(()=>U.object({version:U.string().describe("Currently installed version"),installedAt:U.string().describe("ISO 8601 timestamp of installation"),lastUpdated:U.string().optional().describe("ISO 8601 timestamp of last update"),installPath:U.string().describe("Absolute path to the installed plugin directory"),gitCommitSha:U.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)")})),Jj=O(()=>U.object({version:U.literal(1).describe("Schema version 1"),plugins:U.record(N5(),Xj()).describe("Map of plugin IDs to their installation metadata")})),qj=O(()=>U.enum(["managed","user","project","local"])),Qj=O(()=>U.object({scope:qj().describe("Installation scope"),projectPath:U.string().optional().describe("Project path (required for project/local scopes)"),installPath:U.string().describe("Absolute path to the versioned plugin directory"),version:U.string().optional().describe("Currently installed version"),installedAt:U.string().optional().describe("ISO 8601 timestamp of installation"),lastUpdated:U.string().optional().describe("ISO 8601 timestamp of last update"),gitCommitSha:U.string().optional().describe("Git commit SHA for git-based plugins")})),$j=O(()=>U.object({version:U.literal(2).describe("Schema version 2"),plugins:U.record(N5(),U.array(Qj())).describe("Map of plugin IDs to arrays of installation entries")})),gi=O(()=>U.union([Jj(),$j()])),Yj=O(()=>U.object({source:n2().describe("Where to fetch the marketplace from"),installLocation:U.string().describe("Local cache path where marketplace manifest is stored"),lastUpdated:U.string().describe("ISO 8601 timestamp of last marketplace refresh"),autoUpdate:U.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),fi=O(()=>U.record(U.string(),Yj()))});function x5(Z){let X=Z.replace(/[^a-zA-Z0-9_-]/g,"_");if(Z.startsWith("claude.ai "))X=X.replace(/_+/g,"_").replace(/^_|_$/g,"");return X}var bW=()=>{};function hW(Z){let X=Z.split("__"),[J,q,...Q]=X;if(J!=="mcp"||!q)return null;let $=Q.length>0?Q.join("__"):void 0;return{serverName:q,toolName:$}}function Hj(Z){return`mcp__${x5(Z)}__`}function Uj(Z,X){return`${Hj(Z)}${x5(X)}`}function di(Z){return Z.mcpInfo?Uj(Z.mcpInfo.serverName,Z.mcpInfo.toolName):Z.name}function ci(Z,X){let J=`mcp__${x5(X)}__`;return Z.replace(J,"")}function li(Z){let X=Z.replace(/\s*\(MCP\)\s*$/,"");X=X.trim();let J=X.indexOf(" - ");if(J!==-1)return X.substring(J+3).trim();return X}var gW=B(()=>{bW()});var wX="TaskOutput";var fW=()=>{};var mW="TaskStop",ai=`
77
- - Stops a running background task by its ID
78
- - Takes a task_id parameter identifying the task to stop
79
- - Returns a success or failure status
80
- - Use this tool when you need to terminate a long-running task
81
- `;var uW=()=>{};function a6(Z){return dW[Z]??Z}function ei(Z){let X=[];for(let[J,q]of Object.entries(dW))if(q===Z)X.push(J);return X}function Gj(Z){return Z.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function Wj(Z){return Z.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\\/g,"\\")}function cW(Z){let X=Vj(Z,"(");if(X===-1)return{toolName:a6(Z)};let J=Bj(Z,")");if(J===-1||J<=X)return{toolName:a6(Z)};if(J!==Z.length-1)return{toolName:a6(Z)};let q=Z.substring(0,X),Q=Z.substring(X+1,J);if(!q)return{toolName:a6(Z)};if(Q===""||Q==="*")return{toolName:a6(q)};let $=Wj(Q);return{toolName:a6(q),ruleContent:$}}function Za(Z){if(!Z.ruleContent)return Z.toolName;let X=Gj(Z.ruleContent);return`${Z.toolName}(${X})`}function Vj(Z,X){for(let J=0;J<Z.length;J++)if(Z[J]===X){let q=0,Q=J-1;while(Q>=0&&Z[Q]==="\\")q++,Q--;if(q%2===0)return J}return-1}function Bj(Z,X){for(let J=Z.length-1;J>=0;J--)if(Z[J]===X){let q=0,Q=J-1;while(Q>=0&&Z[Q]==="\\")q++,Q--;if(q%2===0)return J}return-1}var dW;var lW=B(()=>{Kj();fW();uW();dW={Task:pW,KillShell:mW,AgentOutputTool:wX,BashOutputTool:wX,...{}}});function Ja(Z){return Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function nW(Z){return Z.charAt(0).toUpperCase()+Z.slice(1)}function iW(Z,X,J=X+"s"){return Z===1?X:J}function qa(Z){let X=Z.indexOf(`
82
- `);return X===-1?Z:Z.slice(0,X)}function Qa(Z,X,J=0){let q=0,Q=Z.indexOf(X,J);while(Q!==-1)q++,Q=Z.indexOf(X,Q+1);return q}function $a(Z){return Z.replace(/[0-9]/g,(X)=>String.fromCharCode(X.charCodeAt(0)-65248))}function Ya(Z){return Z.replace(/\u3000/g," ")}function Ha(Z,X=",",J=aW){let Q="";for(let $ of Z){let Y=Q?X:"",H=Y+$;if(Q.length+H.length<=J)Q+=H;else{let K=J-Q.length-Y.length-14;if(K>0)Q+=Y+$.slice(0,K)+"...[truncated]";else Q+="...[truncated]";return Q}}return Q}class Lj{maxSize;content="";isTruncated=!1;totalBytesReceived=0;constructor(Z=aW){this.maxSize=Z}append(Z){let X=typeof Z==="string"?Z:Z.toString();if(this.totalBytesReceived+=X.length,this.isTruncated&&this.content.length>=this.maxSize)return;if(this.content.length+X.length>this.maxSize){let J=this.maxSize-this.content.length;if(J>0)this.content+=X.slice(0,J);this.isTruncated=!0}else this.content+=X}toString(){if(!this.isTruncated)return this.content;let Z=this.totalBytesReceived-this.maxSize,X=Math.round(Z/1024);return this.content+`
83
- ... [output truncated - ${X}KB removed]`}clear(){this.content="",this.isTruncated=!1,this.totalBytesReceived=0}get length(){return this.content.length}get truncated(){return this.isTruncated}get totalBytes(){return this.totalBytesReceived}}function Ua(Z,X){let J=Z.split(`
84
- `);if(J.length<=X)return Z;return J.slice(0,X).join(`
85
- `)+"…"}var aW=33554432;var jX=()=>{};function oW(Z){return NX.filePatternTools.includes(Z)}function sW(Z){return NX.bashPrefixTools.includes(Z)}function rW(Z){return NX.customValidation[Z]}var NX;var tW=B(()=>{NX={filePatternTools:["Read","Write","Edit","Glob","NotebookRead","NotebookEdit"],bashPrefixTools:["Bash"],customValidation:{WebSearch:(Z)=>{if(Z.includes("*")||Z.includes("?"))return{valid:!1,error:"WebSearch does not support wildcards",suggestion:"Use exact search terms without * or ?",examples:["WebSearch(claude ai)","WebSearch(typescript tutorial)"]};return{valid:!0}},WebFetch:(Z)=>{if(Z.includes("://")||Z.startsWith("http"))return{valid:!1,error:"WebFetch permissions use domain format, not URLs",suggestion:'Use "domain:hostname" format',examples:["WebFetch(domain:example.com)","WebFetch(domain:github.com)"]};if(!Z.startsWith("domain:"))return{valid:!1,error:'WebFetch permissions must use "domain:" prefix',suggestion:'Use "domain:hostname" format',examples:["WebFetch(domain:example.com)","WebFetch(domain:*.google.com)"]};return{valid:!0}}}}});function eW(Z,X){let J=0,q=X-1;while(q>=0&&Z[q]==="\\")J++,q--;return J%2!==0}function kX(Z,X){let J=0;for(let q=0;q<Z.length;q++)if(Z[q]===X&&!eW(Z,q))J++;return J}function _j(Z){for(let X=0;X<Z.length-1;X++)if(Z[X]==="("&&Z[X+1]===")"){if(!eW(Z,X))return!0}return!1}function xX(Z){if(!Z||Z.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let X=kX(Z,"("),J=kX(Z,")");if(X!==J)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(_j(Z)){let Y=Z.substring(0,Z.indexOf("("));if(!Y)return{valid:!1,error:"Empty parentheses with no tool name",suggestion:"Specify a tool name before the parentheses"};return{valid:!1,error:"Empty parentheses",suggestion:`Either specify a pattern or use just "${Y}" without parentheses`,examples:[`${Y}`,`${Y}(some-pattern)`]}}let q=cW(Z),Q=hW(q.toolName);if(Q){if(q.ruleContent!==void 0||kX(Z,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${q.toolName}" without parentheses, or use "mcp__${Q.serverName}__*" for all tools`,examples:[`mcp__${Q.serverName}`,`mcp__${Q.serverName}__*`,Q.toolName&&Q.toolName!=="*"?`mcp__${Q.serverName}__${Q.toolName}`:void 0].filter(Boolean)};return{valid:!0}}if(!q.toolName||q.toolName.length===0)return{valid:!1,error:"Tool name cannot be empty"};if(q.toolName[0]!==q.toolName[0]?.toUpperCase())return{valid:!1,error:"Tool names must start with uppercase",suggestion:`Use "${nW(String(q.toolName))}"`};let $=rW(q.toolName);if($&&q.ruleContent!==void 0){let Y=$(q.ruleContent);if(!Y.valid)return Y}if(sW(q.toolName)&&q.ruleContent!==void 0){let Y=q.ruleContent;if(Y.includes(":*")&&!Y.endsWith(":*"))return{valid:!1,error:"The :* pattern must be at the end",suggestion:"Move :* to the end for prefix matching, or use * for wildcard matching",examples:["Bash(npm run:*) - prefix matching (legacy)","Bash(npm run *) - wildcard matching"]};if(Y===":*")return{valid:!1,error:"Prefix cannot be empty before :*",suggestion:"Specify a command prefix before :*",examples:["Bash(npm:*)","Bash(git:*)"]}}if(oW(q.toolName)&&q.ruleContent!==void 0){let Y=q.ruleContent;if(Y.includes(":*"))return{valid:!1,error:'The ":*" syntax is only for Bash prefix rules',suggestion:'Use glob patterns like "*" or "**" for file matching',examples:[`${q.toolName}(*.ts) - matches .ts files`,`${q.toolName}(src/**) - matches all files in src`,`${q.toolName}(**/*.test.ts) - matches test files`]};if(Y.includes("*")&&!Y.match(/^\*|\*$|\*\*|\/\*|\*\.|\*\)/)&&!Y.includes("**"))return{valid:!1,error:"Wildcard placement might be incorrect",suggestion:"Wildcards are typically used at path boundaries",examples:[`${q.toolName}(*.js) - all .js files`,`${q.toolName}(src/*) - all files directly in src`,`${q.toolName}(src/**) - all files recursively in src`]}}return{valid:!0}}var E5;var EX=B(()=>{l0();gW();b1();lW();jX();tW();E5=O(()=>U.string().superRefine((Z,X)=>{let J=xX(Z);if(!J.valid){let q=J.error;if(J.suggestion)q+=`. ${J.suggestion}`;if(J.examples&&J.examples.length>0)q+=`. Examples: ${J.examples.join(", ")}`;X.addIssue({code:U.ZodIssueCode.custom,message:q,params:{received:Z}})}}))});function Fa(Z){if(!Z||typeof Z!=="object")return null;let X=PX.safeParse(Z);if(!X.success)return null;if(!X.data.enabled)return null;return X.data}var PX;var ZV=B(()=>{l0();PX=U.object({enabled:U.boolean().describe("Whether auto-fix is enabled"),lint:U.string().optional().describe('Lint command to run after file edits (e.g. "eslint . --fix")'),test:U.string().optional().describe('Test command to run after file edits (e.g. "bun test")'),maxRetries:U.number().int().min(0).max(10).default(3).describe("Maximum number of auto-fix retry attempts (default: 3)"),timeout:U.number().int().min(1000).max(300000).default(30000).describe("Timeout in ms for each lint/test command (default: 30000)")}).refine((Z)=>!Z.enabled||Z.lint!==void 0||Z.test!==void 0,{message:'At least one of "lint" or "test" must be set when enabled'})});function Ca(Z){return"serverName"in Z&&Z.serverName!==void 0}function ya(Z){return"serverCommand"in Z&&Z.serverCommand!==void 0}function Sa(Z){return"serverUrl"in Z&&Z.serverUrl!==void 0}var zj,Rj,Mj,Fj,Dj,XV,k0;var i2=B(()=>{l0();F9();d0();b1();_W();SW();A3();EX();O5();O5();ZV();U3();zj=O(()=>U.record(U.string(),U.coerce.string())),Rj=O(()=>U.object({allow:U.array(E5()).optional().describe("List of permission rules for allowed operations"),deny:U.array(E5()).optional().describe("List of permission rules for denied operations"),ask:U.array(E5()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:U.enum(l2).optional().describe("Default permission mode when Claude Code needs access"),disableBypassPermissionsMode:U.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),allowBypassPermissionsMode:U.boolean().optional().describe("Allow bypass permissions mode to appear in the mode list without requiring the CLI flag"),...{disableAutoMode:U.enum(["disable"]).optional().describe("Disable auto mode")},additionalDirectories:U.array(U.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()),Mj=O(()=>U.object({source:n2().describe("Where to fetch the marketplace from"),installLocation:U.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:U.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),Fj=O(()=>U.object({serverName:U.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that users are allowed to configure"),serverCommand:U.array(U.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for allowed stdio servers"),serverUrl:U.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers')}).refine((Z)=>{return H3([Z.serverName!==void 0,Z.serverCommand!==void 0,Z.serverUrl!==void 0],Boolean)===1},{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),Dj=O(()=>U.object({serverName:U.string().regex(/^[a-zA-Z0-9_-]+$/,"Server name can only contain letters, numbers, hyphens, and underscores").optional().describe("Name of the MCP server that is explicitly blocked"),serverCommand:U.array(U.string()).min(1,"Server command must have at least one element (the command)").optional().describe("Command array [command, ...args] to match exactly for blocked stdio servers"),serverUrl:U.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((Z)=>{return H3([Z.serverName!==void 0,Z.serverCommand!==void 0,Z.serverUrl!==void 0],Boolean)===1},{message:'Entry must have exactly one of "serverName", "serverCommand", or "serverUrl"'})),XV=["skills","agents","hooks","mcp"],k0=O(()=>U.object({$schema:U.literal(_9).optional().describe("JSON Schema reference for Claude Code settings"),apiKeyHelper:U.string().optional().describe("Path to a script that outputs authentication values"),awsCredentialExport:U.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:U.string().optional().describe("Path to a script that refreshes AWS authentication"),gcpAuthRefresh:U.string().optional().describe("Command to refresh GCP authentication (e.g., gcloud auth application-default login)"),...e(process.env.CLAUDE_CODE_ENABLE_XAA)?{xaaIdp:U.object({issuer:U.string().url().describe("IdP issuer URL for OIDC discovery"),clientId:U.string().describe("Claude Code's client_id registered at the IdP"),callbackPort:U.number().int().positive().optional().describe("Fixed loopback callback port for the IdP OIDC login. Only needed if the IdP does not honor RFC 8252 port-any matching.")}).optional().describe("XAA (SEP-990) IdP connection. Configure once; all XAA-enabled MCP servers reuse this.")}:{},fileSuggestion:U.object({type:U.literal("command"),command:U.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:U.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),cleanupPeriodDays:U.number().nonnegative().int().optional().describe("Number of days to retain chat transcripts (default: 30). Setting to 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup."),env:zj().optional().describe("Environment variables to set for Claude Code sessions"),attribution:U.object({commit:U.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:U.string().optional().describe("Attribution text for pull request descriptions. Empty string hides attribution.")}).optional().describe("Customize attribution text for commits and PRs. Each field defaults to the standard Claude Code attribution if not set."),includeCoAuthoredBy:U.boolean().optional().describe("Deprecated: Use attribution instead. Whether to include Claude's co-authored by attribution in commits and PRs (defaults to true)"),includeGitInstructions:U.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:Rj().optional().describe("Tool usage permissions configuration"),model:U.string().optional().describe("Override the default model used by Claude Code"),availableModels:U.array(U.string()).optional().describe('Allowlist of models that users can select. Accepts family aliases ("opus" allows any opus version), version prefixes ("opus-4-5" allows only that version), and full model IDs. If undefined, all models are available. If empty array, only the default model is available. Typically set in managed settings by enterprise administrators.'),modelOverrides:U.record(U.string(),U.string()).optional().describe('Override mapping from Anthropic model ID (e.g. "claude-opus-4-6") to provider-specific model ID (e.g. a Bedrock inference profile ARN). Typically set in managed settings by enterprise administrators.'),enableAllProjectMcpServers:U.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:U.array(U.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:U.array(U.string()).optional().describe("List of rejected MCP servers from .mcp.json"),allowedMcpServers:U.array(Fj()).optional().describe("Enterprise allowlist of MCP servers that can be used. Applies to all scopes including enterprise servers from managed-mcp.json. If undefined, all servers are allowed. If empty array, no servers are allowed. Denylist takes precedence - if a server is on both lists, it is denied."),deniedMcpServers:U.array(Dj()).optional().describe("Enterprise denylist of MCP servers that are explicitly blocked. If a server is on the denylist, it will be blocked across all scopes including enterprise. Denylist takes precedence over allowlist - if a server is on both lists, it is denied."),hooks:a1().optional().describe("Custom commands to run before/after tool executions"),autoFix:PX.optional().describe("Auto-fix configuration: automatically run lint/test after AI file edits and feed errors back for self-repair."),worktree:U.object({symlinkDirectories:U.array(U.string()).optional().describe('Directories to symlink from main repository to worktrees to avoid disk bloat. Must be explicitly configured - no directories are symlinked by default. Common examples: "node_modules", ".cache", ".bin"'),sparsePaths:U.array(U.string()).optional().describe("Directories to include when creating worktrees, via git sparse-checkout (cone mode). "+"Dramatically faster in large monorepos — only the listed paths are written to disk.")}).optional().describe("Git worktree configuration for --worktree flag."),lsp:U.object({enabled:U.boolean().optional(),diagnosticsTimeoutMs:U.number().min(100).max(5000).optional().describe("Per-edit diagnostic injection timeout in ms (default 1500, min 100, max 5000). After FileEdit/FileWrite, Claudio waits up to this duration for the LSP server to publish diagnostics so they can be attached to the same turn.")}).catchall(U.object({disabled:U.boolean().optional(),command:U.array(U.string()).min(1).optional(),extensions:U.array(U.string()).optional()})).optional().describe("LSP server configuration. Set enabled:false to disable the entire LSP subsystem (default: true). Set diagnosticsTimeoutMs to tune per-edit diagnostic injection (default 1500). Other keys = server names. Set disabled:true to disable a built-in server. Set command to override or add a server."),disableAllHooks:U.boolean().optional().describe("Disable all hooks and statusLine execution"),defaultShell:U.enum(["bash","powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."),allowManagedHooksOnly:U.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored."),allowedHttpHookUrls:U.array(U.string()).optional().describe('Allowlist of URL patterns that HTTP hooks may target. Supports * as a wildcard (e.g. "https://hooks.example.com/*"). When set, HTTP hooks with non-matching URLs are blocked. If undefined, all URLs are allowed. If empty array, no HTTP hooks are allowed. Arrays merge across settings sources (same semantics as allowedMcpServers).'),httpHookAllowedEnvVars:U.array(U.string()).optional().describe("Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook's effective allowedEnvVars is the intersection with this list. If undefined, no restriction is applied. Arrays merge across settings sources (same semantics as allowedMcpServers)."),allowManagedPermissionRulesOnly:U.boolean().optional().describe("When true (and set in managed settings), only permission rules (allow/deny/ask) from managed settings are respected. User, project, local, and CLI argument permission rules are ignored."),allowManagedMcpServersOnly:U.boolean().optional().describe("When true (and set in managed settings), allowedMcpServers is only read from managed settings. deniedMcpServers still merges from all sources, so users can deny servers for themselves. Users can still add their own MCP servers, but only the admin-defined allowlist applies."),strictPluginOnlyCustomization:U.preprocess((Z)=>Array.isArray(Z)?Z.filter((X)=>XV.includes(X)):Z,U.union([U.boolean(),U.array(U.enum(XV))])).optional().catch(void 0).describe('When set in managed settings, blocks non-plugin customization sources for the listed surfaces. Array form locks specific surfaces (e.g. ["skills", "hooks"]); `true` locks all four; `false` is an explicit no-op. Blocked: ~/.claude/{surface}/, .claude/{surface}/ (project), settings.json hooks, .mcp.json. NOT blocked: managed (policySettings) sources, plugin-provided customizations. '+"Composes with strictKnownMarketplaces for end-to-end admin control — plugins gated by "+"marketplace allowlist, everything else blocked here."),statusLine:U.object({type:U.literal("command"),command:U.string(),padding:U.number().optional()}).optional().describe("Custom status line display configuration"),enabledPlugins:U.record(U.string(),U.union([U.array(U.string()),U.boolean()])).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.'),extraKnownMarketplaces:U.record(U.string(),Mj()).check((Z)=>{for(let[X,J]of Object.entries(Z.value))if(J.source.source==="settings"&&J.source.name!==X)Z.issues.push({code:"custom",input:J.source.name,path:[X,"source","name"],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${X}" but source.name "${J.source.name}")`})}).optional().describe("Additional marketplaces to make available for this repository. Typically used in repository .claude/settings.json to ensure team members have required plugin sources."),strictKnownMarketplaces:U.array(n2()).optional().describe("Enterprise strict list of allowed marketplace sources. When set in managed settings, ONLY these exact sources can be added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem. "+"Note: this is a policy gate only — it does NOT register marketplaces. "+"To pre-register allowed marketplaces for users, also set extraKnownMarketplaces."),blockedMarketplaces:U.array(n2()).optional().describe("Enterprise blocklist of marketplace sources. When set in managed settings, these exact sources are blocked from being added as marketplaces. The check happens BEFORE downloading, so blocked sources never touch the filesystem."),forceLoginMethod:U.enum(["claudeai","console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),forceLoginOrgUUID:U.string().optional().describe("Organization UUID to use for OAuth login"),otelHeadersHelper:U.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:U.string().optional().describe("Controls the output style for assistant responses"),language:U.string().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'),skipWebFetchPreflight:U.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:M9().optional(),feedbackSurveyRate:U.number().min(0).max(1).optional().describe("Probability (0–1) that the session quality survey appears when eligible. 0.05 is a reasonable starting point."),spinnerTipsEnabled:U.boolean().optional().describe("Whether to show tips in the spinner"),spinnerVerbs:U.object({mode:U.enum(["append","replace"]),verbs:U.array(U.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:U.object({excludeDefault:U.boolean().optional(),tips:U.array(U.string())}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),syntaxHighlightingDisabled:U.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),terminalTitleFromRename:U.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),alwaysThinkingEnabled:U.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),effortLevel:U.enum(["low","medium","high","max"]).optional().catch(void 0).describe("Persisted effort level for supported models."),advisorModel:U.string().optional().describe("Advisor model for the server-side advisor tool."),fastMode:U.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),fastModePerSessionOptIn:U.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:U.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),showClearContextOnPlanAccept:U.boolean().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'),agent:U.string().optional().describe("Name of an agent (built-in or custom) to use for the main thread. Applies the agent's system prompt, tool restrictions, and model."),companyAnnouncements:U.array(U.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:U.record(U.string(),U.object({mcpServers:U.record(U.string(),U.record(U.string(),U.union([U.string(),U.number(),U.boolean(),U.array(U.string())]))).optional().describe("User configuration values for MCP servers keyed by server name"),options:U.record(U.string(),U.union([U.string(),U.number(),U.boolean(),U.array(U.string())])).optional().describe("Non-sensitive option values from plugin manifest userConfig, keyed by option name. Sensitive values go to secure storage instead.")})).optional().describe("Per-plugin configuration including MCP server user configs, keyed by plugin ID (plugin@marketplace format)"),remote:U.object({defaultEnvironmentId:U.string().optional().describe("Default environment ID to use for remote sessions")}).optional().describe("Remote session configuration"),autoUpdatesChannel:U.enum(["latest","stable"]).optional().describe("Release channel for auto-updates (latest or stable)"),...{},minimumVersion:U.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),plansDirectory:U.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to ~/.claude/plans/"),...{},...{},...{},channelsEnabled:U.boolean().optional().describe("Teams/Enterprise opt-in for channel notifications (MCP servers with the claude/channel capability pushing inbound messages). Default off. Set true to allow; users then select servers via --channels."),allowedChannelPlugins:U.array(U.object({marketplace:U.string(),plugin:U.string()})).optional().describe("Teams/Enterprise allowlist of channel plugins. When set, "+"replaces the default Anthropic allowlist — admins decide which "+"plugins may push inbound messages. Undefined falls back to the default. Requires channelsEnabled: true."),...{},prefersReducedMotion:U.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),autoMemoryEnabled:U.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),autoMemoryDirectory:U.string().optional().describe("Custom directory path for auto-memory storage. Supports ~/ prefix for home directory expansion. Ignored if set in projectSettings (checked-in .claude/settings.json) for security. When unset, defaults to ~/.claude/projects/<sanitized-cwd>/memory/."),autoDreamEnabled:U.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),showThinkingSummaries:U.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),skipDangerousModePermissionPrompt:U.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),...{skipAutoPermissionPrompt:U.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),useAutoModeDuringPlan:U.boolean().optional().describe("Whether plan mode uses auto mode semantics when auto mode is available (default: true)"),autoMode:U.object({allow:U.array(U.string()).optional().describe("Rules for the auto mode classifier allow section"),soft_deny:U.array(U.string()).optional().describe("Rules for the auto mode classifier deny section"),environment:U.array(U.string()).optional().describe("Entries for the auto mode classifier environment section")}).optional().describe("Auto mode classifier prompt customization")},disableAutoMode:U.enum(["disable"]).optional().describe("Disable auto mode"),sshConfigs:U.array(U.object({id:U.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:U.string().describe("Display name for the SSH connection"),sshHost:U.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:U.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:U.string().optional().describe("Path to SSH identity file (private key)"),startDirectory:U.string().optional().describe("Default working directory on the remote host. Supports tilde expansion (e.g. ~/projects). If not specified, defaults to the remote user home directory. Can be overridden by the [dir] positional argument in `claude ssh <config> [dir]`.")})).optional().describe("SSH connection configurations for remote environments. Typically set in managed settings by enterprise administrators to pre-configure SSH connections for team members."),claudeMdExcludes:U.array(U.string()).optional().describe('Glob patterns or absolute paths of AGENTS.md/CLAUDE.md files to exclude from loading. Patterns are matched against absolute file paths using picomatch. Only applies to User, Project, and Local memory types (Managed/policy files cannot be excluded). Examples: "/home/user/monorepo/AGENTS.md", "**/code/CLAUDE.md", "**/some-dir/.claude/rules/**"'),pluginTrustMessage:U.string().optional().describe('Custom message to append to the plugin trust warning shown before installation. Only read from policy settings (managed-settings.json / MDM). Useful for enterprise administrators to add organization-specific context (e.g., "All plugins from our internal marketplace are vetted and approved.").')}).passthrough())});function vX(){let Z=JV(k0(),{unrepresentable:"any"});return f(Z,null,2)}var qV=B(()=>{l0();L0();i2()});function QV(Z){let X=Tj.find((q)=>q.matches(Z));if(!X)return null;let J={...X.tip};if(Z.code==="invalid_value"&&Z.enumValues&&!J.suggestion)J.suggestion=`Valid values: ${Z.enumValues.map((q)=>`"${q}"`).join(", ")}`;if(!J.docLink&&Z.path){let q=Z.path.split(".")[0];if(q)J.docLink=Aj[q]}return J}var Tj,Aj;var $V=B(()=>{Tj=[{matches:(Z)=>Z.path==="permissions.defaultMode"&&Z.code==="invalid_value",tip:{suggestion:'Valid modes: "acceptEdits" (ask before file changes), "plan" (analysis only), "bypassPermissions" (auto-accept all), or "default" (standard behavior)'}},{matches:(Z)=>Z.path==="apiKeyHelper"&&Z.code==="invalid_type",tip:{suggestion:'Provide a shell command that outputs your API key to stdout. The script should output only the API key. Example: "/bin/generate_temp_api_key.sh"'}},{matches:(Z)=>Z.path==="cleanupPeriodDays"&&Z.code==="too_small"&&Z.expected==="0",tip:{suggestion:"Must be 0 or greater. Set a positive number for days to retain transcripts (default is 30). Setting 0 disables session persistence entirely: no transcripts are written and existing transcripts are deleted at startup."}},{matches:(Z)=>Z.path.startsWith("env.")&&Z.code==="invalid_type",tip:{suggestion:'Environment variables must be strings. Wrap numbers and booleans in quotes. Example: "DEBUG": "true", "PORT": "3000"'}},{matches:(Z)=>(Z.path==="permissions.allow"||Z.path==="permissions.deny")&&Z.code==="invalid_type"&&Z.expected==="array",tip:{suggestion:'Permission rules must be in an array. Format: ["Tool(specifier)"]. Examples: ["Bash(npm run build)", "Edit(docs/**)", "Read(~/.zshrc)"]. Use * for wildcards.'}},{matches:(Z)=>Z.path.includes("hooks")&&Z.code==="invalid_type",tip:{suggestion:'Hooks use a matcher + hooks array. The matcher is a string: a tool name ("Bash"), pipe-separated list ("Edit|Write"), or empty to match all. Example: {"PostToolUse": [{"matcher": "Edit|Write", "hooks": [{"type": "command", "command": "echo Done"}]}]}'}},{matches:(Z)=>Z.code==="invalid_type"&&Z.expected==="boolean",tip:{suggestion:'Use true or false without quotes. Example: "includeCoAuthoredBy": true'}},{matches:(Z)=>Z.code==="unrecognized_keys",tip:{suggestion:"Check for typos or refer to the documentation for valid fields"}},{matches:(Z)=>Z.code==="invalid_value"&&Z.enumValues!==void 0,tip:{suggestion:void 0}},{matches:(Z)=>Z.code==="invalid_type"&&Z.expected==="object"&&Z.received===null&&Z.path==="",tip:{suggestion:"Check for missing commas, unmatched brackets, or trailing commas. Use a JSON validator to identify the exact syntax error."}},{matches:(Z)=>Z.path==="permissions.additionalDirectories"&&Z.code==="invalid_type",tip:{suggestion:'Must be an array of directory paths. Example: ["~/projects", "/tmp/workspace"]. You can also use --add-dir flag or /add-dir command'}}],Aj={}});function YV(Z){return Z.code==="invalid_type"}function HV(Z){return Z.code==="invalid_value"}function Ij(Z){return Z.code==="unrecognized_keys"}function UV(Z){return Z.code==="too_small"}function CX(Z){if(Z===null)return"null";if(Z===void 0)return"undefined";if(Array.isArray(Z))return"array";return typeof Z}function KV(Z){let X=Z.match(/received (\w+)/);return X?X[1]:void 0}function o6(Z,X){return Z.issues.map((J)=>{let q=J.path.map(String).join("."),Q=J.message,$,Y,H,K,W;if(HV(J))Y=J.values.map((V)=>String(V)),H=Y.join(" | "),K=void 0,W=void 0;else if(YV(J)){H=J.expected;let V=KV(J.message);K=V??CX(J.input),W=V??CX(J.input)}else if(UV(J))H=String(J.minimum);else if(J.code==="custom"&&"params"in J)K=J.params.received,W=K;let G=QV({path:q,code:J.code,expected:H,received:K,enumValues:Y,message:J.message,value:K});if(HV(J))$=Y?.map((V)=>`"${V}"`).join(", "),Q=`Invalid value. Expected one of: ${$}`;else if(YV(J)){let V=KV(J.message)??CX(J.input);if(J.expected==="object"&&V==="null"&&q==="")Q="Invalid or malformed JSON";else Q=`Expected ${J.expected}, but received ${V}`}else if(Ij(J)){let V=J.keys.join(", ");Q=`Unrecognized ${iW(J.keys.length,"field")}: ${V}`}else if(UV(J))Q=`Number must be greater than or equal to ${J.minimum}`,$=String(J.minimum);return{file:X,path:q,message:Q,expected:$,invalidValue:W,suggestion:G?.suggestion,docLink:G?.docLink}})}function oa(Z){try{let X=H0(Z),J=k0().strict().safeParse(X);if(J.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
86
- `+o6(J.error,"settings").map(($)=>`- ${$.path}: ${$.message}`).join(`
87
- `),fullSchema:vX()}}catch(X){return{isValid:!1,error:`Invalid JSON: ${X instanceof Error?X.message:"Unknown parsing error"}`,fullSchema:vX()}}}function P5(Z,X){if(!Z||typeof Z!=="object")return[];let J=Z;if(!J.permissions||typeof J.permissions!=="object")return[];let q=J.permissions,Q=[];for(let $ of["allow","deny","ask"]){let Y=q[$];if(!Array.isArray(Y))continue;q[$]=Y.filter((H)=>{if(typeof H!=="string")return Q.push({file:X,path:`permissions.${$}`,message:`Non-string value in ${$} array was removed`,invalidValue:H}),!1;let K=xX(H);if(!K.valid){let W=`Invalid permission rule "${H}" was skipped`;if(K.error)W+=`: ${K.error}`;if(K.suggestion)W+=`. ${K.suggestion}`;return Q.push({file:X,path:`permissions.${$}`,message:W,invalidValue:H}),!1}return!0})}return Q}var yX=B(()=>{L0();jX();EX();qV();i2();$V()});import{userInfo as Oj}from"os";function LV(){let Z="";try{Z=Oj().username}catch{}let X=[];if(Z)X.push({path:`/Library/Managed Preferences/${Z}/${GV}.plist`,label:"per-user managed preferences"});return X.push({path:`/Library/Managed Preferences/${GV}.plist`,label:"device-level managed preferences"}),X}var GV="com.anthropic.claudecode",v5="HKLM\\SOFTWARE\\Policies\\ClaudeCode",C5="HKCU\\SOFTWARE\\Policies\\ClaudeCode",s6="Settings",WV="/usr/bin/plutil",VV,BV=5000;var SX=B(()=>{VV=["-convert","json","-o","-","--"]});import{execFile as wj}from"child_process";import{existsSync as jj}from"fs";function bX(Z,X){return new Promise((J)=>{wj(Z,X,{encoding:"utf-8",timeout:BV},(q,Q)=>{J({stdout:Q??"",code:q?1:0})})})}function y5(){return(async()=>{if(process.platform==="darwin"){let Z=LV(),J=(await Promise.all(Z.map(async({path:q,label:Q})=>{if(!jj(q))return{stdout:"",label:Q,ok:!1};let{stdout:$,code:Y}=await bX(WV,[...VV,q]);return{stdout:$,label:Q,ok:Y===0&&!!$}}))).find((q)=>q.ok);return{plistStdouts:J?[{stdout:J.stdout,label:J.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform==="win32"){let[Z,X]=await Promise.all([bX("reg",["query",v5,"/v",s6]),bX("reg",["query",C5,"/v",s6])]);return{plistStdouts:null,hklmStdout:Z.code===0?Z.stdout:null,hkcuStdout:X.code===0?X.stdout:null}}return{plistStdouts:null,hklmStdout:null,hkcuStdout:null}})()}function Jo(){if(hX)return;hX=y5()}function _V(){return hX}var hX=null;var zV=B(()=>{SX()});import{join as RV}from"path";function Nj(){if(S5)return;S5=(async()=>{r6("mdm_load_start");let Z=Date.now(),X=_V()??y5(),{mdm:J,hkcu:q}=DV(await X);fX=J,mX=q,r6("mdm_load_end");let Q=Date.now()-Z;if(E(`MDM settings load completed in ${Q}ms`),Object.keys(J.settings).length>0){E(`MDM settings found: ${Object.keys(J.settings).join(", ")}`);try{Q0("info","mdm_settings_loaded",{duration_ms:Q,key_count:Object.keys(J.settings).length,error_count:J.errors.length})}catch{}}})()}async function zo(){if(!S5)Nj();await S5}function b5(){return fX??G1}function h5(){return mX??G1}function Ro(Z,X){fX=Z,mX=X}async function Mo(){let Z=await y5();return DV(Z)}function gX(Z,X){let J=C0(Z,!1);if(!J||typeof J!=="object")return{settings:{},errors:[]};let q=P5(J,X),Q=k0().safeParse(J);if(!Q.success){let $=o6(Q.error,X);return{settings:{},errors:[...q,...$]}}return{settings:Q.data,errors:q}}function MV(Z,X="Settings"){let J=Z.split(/\r?\n/),q=X.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Q=new RegExp(`^\\s+${q}\\s+REG_(?:EXPAND_)?SZ\\s+(.*)$`,"i");for(let $ of J){let Y=$.match(Q);if(Y&&Y[1])return Y[1].trimEnd()}return null}function DV(Z){if(Z.plistStdouts&&Z.plistStdouts.length>0){let{stdout:X,label:J}=Z.plistStdouts[0],q=gX(X,J);if(Object.keys(q.settings).length>0)return{mdm:q,hkcu:G1}}if(Z.hklmStdout){let X=MV(Z.hklmStdout);if(X){let J=gX(X,`Registry: ${v5}\\${s6}`);if(Object.keys(J.settings).length>0)return{mdm:J,hkcu:G1}}}if(kj())return{mdm:G1,hkcu:G1};if(Z.hkcuStdout){let X=MV(Z.hkcuStdout);if(X){let J=gX(X,`Registry: ${C5}\\${s6}`);return{mdm:G1,hkcu:J}}}return{mdm:G1,hkcu:G1}}function kj(){try{let Z=RV(F1(),"managed-settings.json"),X=Z1(Z),J=C0(X,!1);if(J&&typeof J==="object"&&Object.keys(J).length>0)return!0}catch{}try{let Z=O2(),X=k().readdirSync(Z);for(let J of X){if(!(J.isFile()||J.isSymbolicLink())||!J.name.endsWith(".json")||J.name.startsWith("."))continue;try{let q=Z1(RV(Z,J.name)),Q=C0(q,!1);if(Q&&typeof Q==="object"&&Object.keys(Q).length>0)return!0}catch{}}}catch{}return!1}var G1,fX=null,mX=null,S5=null;var TV=B(()=>{R1();G2();B2();R0();d4();FV();l4();i2();yX();SX();zV();G1=Object.freeze({settings:{},errors:[]})});import{dirname as PV,join as g5,resolve as a2}from"path";function lX(){return g5(F1(),"managed-settings.json")}function nX(){let Z=[],X={},J=!1,{settings:q,errors:Q}=o2(lX());if(Z.push(...Q),q&&Object.keys(q).length>0)X=e0(X,q,o1),J=!0;let $=O2();try{let Y=k().readdirSync($).filter((H)=>(H.isFile()||H.isSymbolicLink())&&H.name.endsWith(".json")&&!H.name.startsWith(".")).map((H)=>H.name).sort();for(let H of Y){let{settings:K,errors:W}=o2(g5($,H));if(Z.push(...W),K&&Object.keys(K).length>0)X=e0(X,K,o1),J=!0}}catch(Y){let H=K0(Y);if(H!=="ENOENT"&&H!=="ENOTDIR")m(Y)}return{settings:J?X:null,errors:Z}}function io(){let{settings:Z}=o2(lX()),X=!!Z&&Object.keys(Z).length>0,J=!1,q=O2();try{J=k().readdirSync(q).some((Q)=>(Q.isFile()||Q.isSymbolicLink())&&Q.name.endsWith(".json")&&!Q.name.startsWith("."))}catch{}return{hasBase:X,hasDropIns:J}}function vV(Z,X){if(typeof Z==="object"&&Z&&"code"in Z&&Z.code==="ENOENT")E(`Broken symlink or missing file encountered for settings.json at path: ${X}`);else m(Z)}function o2(Z){let X=NV(Z);if(X)return{settings:X.settings?pX(X.settings):null,errors:X.errors};let J=xj(Z);return kV(Z,J),{settings:J.settings?pX(J.settings):null,errors:J.errors}}function xj(Z){try{let{resolvedPath:X}=M1(k(),Z),J=Z1(X);if(J.trim()==="")return{settings:{},errors:[]};let q=C0(J,!1),Q=P5(q,Z),$=k0().safeParse(q);if(!$.success){let Y=o6($.error,Z);return{settings:null,errors:[...Q,...Y]}}return{settings:$.data,errors:Q}}catch(X){return vV(X,Z),{settings:null,errors:[]}}}function AV(Z){switch(Z){case"userSettings":return a2(Y0());case"policySettings":case"projectSettings":case"localSettings":return a2(s1());case"flagSettings":{let X=dX();return X?PV(a2(X)):a2(s1())}}}function Ej(){if(EV()||e(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return"cowork_settings.json";return"settings.json"}function f5(Z){switch(Z){case"userSettings":return g5(AV(Z),Ej());case"projectSettings":case"localSettings":return g5(AV(Z),CV(Z));case"policySettings":return lX();case"flagSettings":return dX()}}function CV(Z){switch(Z){case"projectSettings":return".claudio/settings.json";case"localSettings":return".claudio/settings.local.json"}}function n(Z){let X=wV(Z);if(X!==void 0)return X;let J=yV(Z);return jV(Z,J),J}function yV(Z){if(Z==="policySettings"){let q=b4();if(q&&Object.keys(q).length>0)return q;let Q=b5();if(Object.keys(Q.settings).length>0)return Q.settings;let{settings:$}=nX();if($)return $;let Y=h5();if(Object.keys(Y.settings).length>0)return Y.settings;return null}let X=f5(Z),{settings:J}=X?o2(X):{settings:null};if(Z==="flagSettings"){let q=cX();if(q){let Q=k0().safeParse(q);if(Q.success)return e0(J||{},Q.data,o1)}}return J}function ao(){let Z=b4();if(Z&&Object.keys(Z).length>0)return"remote";let X=b5();if(Object.keys(X.settings).length>0)return v0()==="macos"?"plist":"hklm";let{settings:J}=nX();if(J)return"file";let q=h5();if(Object.keys(q.settings).length>0)return"hkcu";return null}function oo(Z,X){if(Z==="policySettings"||Z==="flagSettings")return{error:null};let J=f5(Z);if(!J)return{error:null};try{k().mkdirSync(PV(J));let q=yV(Z);if(!q){let $=null;try{$=Z1(J)}catch(Y){if(!A6(Y))throw Y}if($!==null){let Y=C0($);if(Y===null)return{error:Error(`Invalid JSON syntax in settings file at ${J}`)};if(Y&&typeof Y==="object")q=Y,E(`Using raw settings from ${J} due to validation failure`)}}let Q=e0(q||{},X,($,Y,H,K)=>{if(Y===void 0&&K&&typeof H==="string"){delete K[H];return}if(Array.isArray(Y))return Y;return});if(z9(J),I6(J,f(Q,null,2)+`
88
- `),_2(),Z==="localSettings")r$(CV("localSettings"),s1())}catch(q){let Q=Error(`Failed to read raw settings from ${J}: ${q}`);return m(Q),{error:Q}}return{error:null}}function Pj(Z,X){return g$([...Z,...X])}function o1(Z,X){if(Array.isArray(Z)&&Array.isArray(X))return Pj(Z,X);return}function so(Z){let X=k0().strip().parse(Z),J=["permissions","sandbox","hooks"],q=[],Q={permissions:new Set(["allow","deny","ask","defaultMode","disableBypassPermissionsMode","allowBypassPermissionsMode","disableAutoMode","additionalDirectories"]),sandbox:new Set(["enabled","failIfUnavailable","allowUnsandboxedCommands","network","filesystem","ignoreViolations","excludedCommands","autoAllowBashIfSandboxed","enableWeakerNestedSandbox","enableWeakerNetworkIsolation","ripgrep"]),hooks:new Set(["PreToolUse","PostToolUse","Notification","UserPromptSubmit","SessionStart","SessionEnd","Stop","SubagentStop","PreCompact","PostCompact","TeammateIdle","TaskCreated","TaskCompleted"])};for(let $ of Object.keys(X))if(J.includes($)&&X[$]&&typeof X[$]==="object"){let Y=X[$],H=Q[$];if(H){for(let K of Object.keys(Y))if(H.has(K))q.push(`${$}.${K}`)}}else q.push($);return q.sort()}function vj(){if(uX)return{settings:{},errors:[]};let Z=Date.now();r6("loadSettingsFromDisk_start"),Q0("info","settings_load_started"),uX=!0;try{let X=xV(),J={};if(X)J=e0(J,X,o1);let q=[],Q=new Set,$=new Set;for(let Y of I2()){if(Y==="policySettings"){let K=null,W=[],G=b4();if(G&&Object.keys(G).length>0){let V=k0().safeParse(G);if(V.success)K=V.data;else W.push(...o6(V.error,"remote managed settings"))}if(!K){let V=b5();if(Object.keys(V.settings).length>0)K=V.settings;W.push(...V.errors)}if(!K){let{settings:V,errors:L}=nX();if(V)K=V;W.push(...L)}if(!K){let V=h5();if(Object.keys(V.settings).length>0)K=V.settings;W.push(...V.errors)}if(K)J=e0(J,K,o1);for(let V of W){let L=`${V.file}:${V.path}:${V.message}`;if(!Q.has(L))Q.add(L),q.push(V)}continue}let H=f5(Y);if(H){let K=a2(H);if(!$.has(K)){$.add(K);let{settings:W,errors:G}=o2(H);for(let V of G){let L=`${V.file}:${V.path}:${V.message}`;if(!Q.has(L))Q.add(L),q.push(V)}if(W)J=e0(J,W,o1)}}if(Y==="flagSettings"){let K=cX();if(K){let W=k0().safeParse(K);if(W.success)J=e0(J,W.data,o1)}}}return Q0("info","settings_load_completed",{duration_ms:Date.now()-Z,source_count:$.size,error_count:q.length}),{settings:J,errors:q}}finally{uX=!1}}function m5(){let{settings:Z}=Cj();return Z||{}}function to(){_2();let Z=[];for(let X of I2()){let J=n(X);if(J&&Object.keys(J).length>0)Z.push({source:X,settings:J})}return{effective:m5(),sources:Z}}function Cj(){let Z=IV();if(Z!==null)return Z;let X=vj();return r6("loadSettingsFromDisk_end"),OV(X),X}function eo(){return!!(n("userSettings")?.skipDangerousModePermissionPrompt||n("localSettings")?.skipDangerousModePermissionPrompt||n("flagSettings")?.skipDangerousModePermissionPrompt||n("policySettings")?.skipDangerousModePermissionPrompt)}function Zs(){return!!(n("userSettings")?.permissions?.allowBypassPermissionsMode||n("localSettings")?.permissions?.allowBypassPermissionsMode||n("flagSettings")?.permissions?.allowBypassPermissionsMode||n("policySettings")?.permissions?.allowBypassPermissionsMode)}function Xs(){{let Z=n("userSettings")?.skipAutoPermissionPrompt,X=n("localSettings")?.skipAutoPermissionPrompt,J=n("flagSettings")?.skipAutoPermissionPrompt,q=n("policySettings")?.skipAutoPermissionPrompt,Q=!!(Z||X||J||q);return E(`[auto-mode] hasAutoModeOptIn=${Q} skipAutoPermissionPrompt: user=${Z} local=${X} flag=${J} policy=${q}`),Q}return!1}function Js(){return n("policySettings")?.useAutoModeDuringPlan!==!1&&n("flagSettings")?.useAutoModeDuringPlan!==!1&&n("userSettings")?.useAutoModeDuringPlan!==!1&&n("localSettings")?.useAutoModeDuringPlan!==!1}function qs(){{let Z=U.object({allow:U.array(U.string()).optional(),soft_deny:U.array(U.string()).optional(),deny:U.array(U.string()).optional(),environment:U.array(U.string()).optional()}),X=[],J=[],q=[];for(let Q of["userSettings","localSettings","flagSettings","policySettings"]){let $=n(Q);if(!$)continue;let Y=Z.safeParse($.autoMode);if(Y.success){if(Y.data.allow)X.push(...Y.data.allow);if(Y.data.soft_deny)J.push(...Y.data.soft_deny);if(Y.data.environment)q.push(...Y.data.environment)}}if(X.length>0||J.length>0||q.length>0)return{...X.length>0&&{allow:X},...J.length>0&&{soft_deny:J},...q.length>0&&{environment:q}}}return}function Qs(Z){for(let X of I2()){if(X==="policySettings")continue;let J=f5(X);if(!J)continue;try{let{resolvedPath:q}=M1(k(),J),Q=Z1(q);if(!Q.trim())continue;let $=C0(Q,!1);if($&&typeof $==="object"&&Z in $)return!0}catch(q){vV(q,J)}}return!1}var uX=!1,ro;var SV=B(()=>{S$();l0();j6();h$();U3();R1();G2();d0();y1();h4();B2();R0();t$();d4();u0();z6();L0();FV();A3();R9();l4();TV();b$();i2();yX();ro=m5});import{homedir as yj}from"os";import{isAbsolute as Sj,join as p5,normalize as iX,sep as gV}from"path";function fV(){let Z=process.env.CLAUDE_CODE_DISABLE_AUTO_MEMORY;if(e(Z))return!1;if(hV(Z))return!0;if(e(process.env.CLAUDE_CODE_SIMPLE))return!1;if(e(process.env.CLAUDE_CODE_REMOTE)&&!process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return!1;let X=m5();if(X.autoMemoryEnabled!==void 0)return X.autoMemoryEnabled;return!0}function _s(){if(!C1("tengu_passport_quail",!1))return!1;return!bV()||C1("tengu_slate_thimble",!1)}function bj(){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR;return Y0()}function mV(Z,X){if(!Z)return;let J=Z;if(X&&(J.startsWith("~/")||J.startsWith("~\\"))){let Q=J.slice(2),$=iX(Q||".");if($==="."||$==="..")return;J=p5(yj(),Q)}let q=iX(J).replace(/[/\\]+$/,"");if(!Sj(q)||q.length<3||/^[A-Za-z]:$/.test(q)||q.startsWith("\\\\")||q.startsWith("//")||q.includes("\x00"))return;return(q+gV).normalize("NFC")}function uV(){return mV(process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE,!1)}function fj(){let Z=n("policySettings")?.autoMemoryDirectory??n("flagSettings")?.autoMemoryDirectory??n("localSettings")?.autoMemoryDirectory??n("userSettings")?.autoMemoryDirectory;return mV(Z,!0)}function zs(){return uV()!==void 0}function mj(){return d5(u5())??u5()}function pV(){return p5(s2(),gj)}function Rs(Z){return iX(Z).startsWith(s2())}var hj="memory",gj="MEMORY.md",s2;var aX=B(()=>{L1();j6();W3();d0();R2();v4();SV();s2=u(()=>{let Z=uV()??fj();if(Z)return Z;let X=p5(bj(),"projects");return(p5(X,t7(mj()),hj)+gV).normalize("NFC")},()=>u5())});var cV=d((Fs,dV)=>{var j1=$0("constants"),uj=process.cwd,c5=null,pj=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!c5)c5=uj.call(process);return c5};try{process.cwd()}catch(Z){}if(typeof process.chdir==="function"){if(l5=process.chdir,process.chdir=function(Z){c5=null,l5.call(process,Z)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,l5)}var l5;dV.exports=dj;function dj(Z){if(j1.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))X(Z);if(!Z.lutimes)J(Z);if(Z.chown=$(Z.chown),Z.fchown=$(Z.fchown),Z.lchown=$(Z.lchown),Z.chmod=q(Z.chmod),Z.fchmod=q(Z.fchmod),Z.lchmod=q(Z.lchmod),Z.chownSync=Y(Z.chownSync),Z.fchownSync=Y(Z.fchownSync),Z.lchownSync=Y(Z.lchownSync),Z.chmodSync=Q(Z.chmodSync),Z.fchmodSync=Q(Z.fchmodSync),Z.lchmodSync=Q(Z.lchmodSync),Z.stat=H(Z.stat),Z.fstat=H(Z.fstat),Z.lstat=H(Z.lstat),Z.statSync=K(Z.statSync),Z.fstatSync=K(Z.fstatSync),Z.lstatSync=K(Z.lstatSync),Z.chmod&&!Z.lchmod)Z.lchmod=function(G,V,L){if(L)process.nextTick(L)},Z.lchmodSync=function(){};if(Z.chown&&!Z.lchown)Z.lchown=function(G,V,L,_){if(_)process.nextTick(_)},Z.lchownSync=function(){};if(pj==="win32")Z.rename=typeof Z.rename!=="function"?Z.rename:function(G){function V(L,_,z){var D=Date.now(),M=0;G(L,_,function F(N){if(N&&(N.code==="EACCES"||N.code==="EPERM"||N.code==="EBUSY")&&Date.now()-D<60000){if(setTimeout(function(){Z.stat(_,function(R,w){if(R&&R.code==="ENOENT")G(L,_,F);else z(N)})},M),M<100)M+=10;return}if(z)z(N)})}if(Object.setPrototypeOf)Object.setPrototypeOf(V,G);return V}(Z.rename);Z.read=typeof Z.read!=="function"?Z.read:function(G){function V(L,_,z,D,M,F){var N;if(F&&typeof F==="function"){var R=0;N=function(w,A,I){if(w&&w.code==="EAGAIN"&&R<10)return R++,G.call(Z,L,_,z,D,M,N);F.apply(this,arguments)}}return G.call(Z,L,_,z,D,M,N)}if(Object.setPrototypeOf)Object.setPrototypeOf(V,G);return V}(Z.read),Z.readSync=typeof Z.readSync!=="function"?Z.readSync:function(G){return function(V,L,_,z,D){var M=0;while(!0)try{return G.call(Z,V,L,_,z,D)}catch(F){if(F.code==="EAGAIN"&&M<10){M++;continue}throw F}}}(Z.readSync);function X(G){G.lchmod=function(V,L,_){G.open(V,j1.O_WRONLY|j1.O_SYMLINK,L,function(z,D){if(z){if(_)_(z);return}G.fchmod(D,L,function(M){G.close(D,function(F){if(_)_(M||F)})})})},G.lchmodSync=function(V,L){var _=G.openSync(V,j1.O_WRONLY|j1.O_SYMLINK,L),z=!0,D;try{D=G.fchmodSync(_,L),z=!1}finally{if(z)try{G.closeSync(_)}catch(M){}else G.closeSync(_)}return D}}function J(G){if(j1.hasOwnProperty("O_SYMLINK")&&G.futimes)G.lutimes=function(V,L,_,z){G.open(V,j1.O_SYMLINK,function(D,M){if(D){if(z)z(D);return}G.futimes(M,L,_,function(F){G.close(M,function(N){if(z)z(F||N)})})})},G.lutimesSync=function(V,L,_){var z=G.openSync(V,j1.O_SYMLINK),D,M=!0;try{D=G.futimesSync(z,L,_),M=!1}finally{if(M)try{G.closeSync(z)}catch(F){}else G.closeSync(z)}return D};else if(G.futimes)G.lutimes=function(V,L,_,z){if(z)process.nextTick(z)},G.lutimesSync=function(){}}function q(G){if(!G)return G;return function(V,L,_){return G.call(Z,V,L,function(z){if(W(z))z=null;if(_)_.apply(this,arguments)})}}function Q(G){if(!G)return G;return function(V,L){try{return G.call(Z,V,L)}catch(_){if(!W(_))throw _}}}function $(G){if(!G)return G;return function(V,L,_,z){return G.call(Z,V,L,_,function(D){if(W(D))D=null;if(z)z.apply(this,arguments)})}}function Y(G){if(!G)return G;return function(V,L,_){try{return G.call(Z,V,L,_)}catch(z){if(!W(z))throw z}}}function H(G){if(!G)return G;return function(V,L,_){if(typeof L==="function")_=L,L=null;function z(D,M){if(M){if(M.uid<0)M.uid+=4294967296;if(M.gid<0)M.gid+=4294967296}if(_)_.apply(this,arguments)}return L?G.call(Z,V,L,z):G.call(Z,V,z)}}function K(G){if(!G)return G;return function(V,L){var _=L?G.call(Z,V,L):G.call(Z,V);if(_){if(_.uid<0)_.uid+=4294967296;if(_.gid<0)_.gid+=4294967296}return _}}function W(G){if(!G)return!0;if(G.code==="ENOSYS")return!0;var V=!process.getuid||process.getuid()!==0;if(V){if(G.code==="EINVAL"||G.code==="EPERM")return!0}return!1}}});var iV=d((Ds,nV)=>{var lV=$0("stream").Stream;nV.exports=cj;function cj(Z){return{ReadStream:X,WriteStream:J};function X(q,Q){if(!(this instanceof X))return new X(q,Q);lV.call(this);var $=this;this.path=q,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,Q=Q||{};var Y=Object.keys(Q);for(var H=0,K=Y.length;H<K;H++){var W=Y[H];this[W]=Q[W]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!=="number")throw TypeError("end must be a Number");if(this.start>this.end)throw Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){$._read()});return}Z.open(this.path,this.flags,this.mode,function(G,V){if(G){$.emit("error",G),$.readable=!1;return}$.fd=V,$.emit("open",V),$._read()})}function J(q,Q){if(!(this instanceof J))return new J(q,Q);lV.call(this),this.path=q,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,Q=Q||{};var $=Object.keys(Q);for(var Y=0,H=$.length;Y<H;Y++){var K=$[Y];this[K]=Q[K]}if(this.start!==void 0){if(typeof this.start!=="number")throw TypeError("start must be a Number");if(this.start<0)throw Error("start must be >= zero");this.pos=this.start}if(this.busy=!1,this._queue=[],this.fd===null)this._open=Z.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush()}}});var oV=d((Ts,aV)=>{aV.exports=nj;var lj=Object.getPrototypeOf||function(Z){return Z.__proto__};function nj(Z){if(Z===null||typeof Z!=="object")return Z;if(Z instanceof Object)var X={__proto__:lj(Z)};else var X=Object.create(null);return Object.getOwnPropertyNames(Z).forEach(function(J){Object.defineProperty(X,J,Object.getOwnPropertyDescriptor(Z,J))}),X}});var eX=d((As,tX)=>{var i=$0("fs"),ij=cV(),aj=iV(),oj=oV(),n5=$0("util"),G0,a5;if(typeof Symbol==="function"&&typeof Symbol.for==="function")G0=Symbol.for("graceful-fs.queue"),a5=Symbol.for("graceful-fs.previous");else G0="___graceful-fs.queue",a5="___graceful-fs.previous";function sj(){}function rV(Z,X){Object.defineProperty(Z,G0,{get:function(){return X}})}var r1=sj;if(n5.debuglog)r1=n5.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))r1=function(){var Z=n5.format.apply(n5,arguments);Z="GFS4: "+Z.split(/\n/).join(`
89
- GFS4: `),console.error(Z)};if(!i[G0]){if(oX=global[G0]||[],rV(i,oX),i.close=function(Z){function X(J,q){return Z.call(i,J,function(Q){if(!Q)sV();if(typeof q==="function")q.apply(this,arguments)})}return Object.defineProperty(X,a5,{value:Z}),X}(i.close),i.closeSync=function(Z){function X(J){Z.apply(i,arguments),sV()}return Object.defineProperty(X,a5,{value:Z}),X}(i.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){r1(i[G0]),$0("assert").equal(i[G0].length,0)})}var oX;if(!global[G0])rV(global,i[G0]);tX.exports=sX(oj(i));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!i.__patched)tX.exports=sX(i),i.__patched=!0;function sX(Z){ij(Z),Z.gracefulify=sX,Z.createReadStream=A,Z.createWriteStream=I;var X=Z.readFile;Z.readFile=J;function J(j,x,v){if(typeof x==="function")v=x,x=null;return h(j,x,v);function h(r,P,C,p){return X(r,P,function(g){if(g&&(g.code==="EMFILE"||g.code==="ENFILE"))t6([h,[r,P,C],g,p||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}var q=Z.writeFile;Z.writeFile=Q;function Q(j,x,v,h){if(typeof v==="function")h=v,v=null;return r(j,x,v,h);function r(P,C,p,g,U0){return q(P,C,p,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))t6([r,[P,C,p,g],c,U0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var $=Z.appendFile;if($)Z.appendFile=Y;function Y(j,x,v,h){if(typeof v==="function")h=v,v=null;return r(j,x,v,h);function r(P,C,p,g,U0){return $(P,C,p,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))t6([r,[P,C,p,g],c,U0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var H=Z.copyFile;if(H)Z.copyFile=K;function K(j,x,v,h){if(typeof v==="function")h=v,v=0;return r(j,x,v,h);function r(P,C,p,g,U0){return H(P,C,p,function(c){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))t6([r,[P,C,p,g],c,U0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}var W=Z.readdir;Z.readdir=V;var G=/^v[0-5]\./;function V(j,x,v){if(typeof x==="function")v=x,x=null;var h=G.test(process.version)?function(C,p,g,U0){return W(C,r(C,p,g,U0))}:function(C,p,g,U0){return W(C,p,r(C,p,g,U0))};return h(j,x,v);function r(P,C,p,g){return function(U0,c){if(U0&&(U0.code==="EMFILE"||U0.code==="ENFILE"))t6([h,[P,C,p],U0,g||Date.now(),Date.now()]);else{if(c&&c.sort)c.sort();if(typeof p==="function")p.call(this,U0,c)}}}}if(process.version.substr(0,4)==="v0.8"){var L=aj(Z);F=L.ReadStream,R=L.WriteStream}var _=Z.ReadStream;if(_)F.prototype=Object.create(_.prototype),F.prototype.open=N;var z=Z.WriteStream;if(z)R.prototype=Object.create(z.prototype),R.prototype.open=w;Object.defineProperty(Z,"ReadStream",{get:function(){return F},set:function(j){F=j},enumerable:!0,configurable:!0}),Object.defineProperty(Z,"WriteStream",{get:function(){return R},set:function(j){R=j},enumerable:!0,configurable:!0});var D=F;Object.defineProperty(Z,"FileReadStream",{get:function(){return D},set:function(j){D=j},enumerable:!0,configurable:!0});var M=R;Object.defineProperty(Z,"FileWriteStream",{get:function(){return M},set:function(j){M=j},enumerable:!0,configurable:!0});function F(j,x){if(this instanceof F)return _.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function N(){var j=this;b(j.path,j.flags,j.mode,function(x,v){if(x){if(j.autoClose)j.destroy();j.emit("error",x)}else j.fd=v,j.emit("open",v),j.read()})}function R(j,x){if(this instanceof R)return z.apply(this,arguments),this;else return R.apply(Object.create(R.prototype),arguments)}function w(){var j=this;b(j.path,j.flags,j.mode,function(x,v){if(x)j.destroy(),j.emit("error",x);else j.fd=v,j.emit("open",v)})}function A(j,x){return new Z.ReadStream(j,x)}function I(j,x){return new Z.WriteStream(j,x)}var T=Z.open;Z.open=b;function b(j,x,v,h){if(typeof v==="function")h=v,v=null;return r(j,x,v,h);function r(P,C,p,g,U0){return T(P,C,p,function(c,nx){if(c&&(c.code==="EMFILE"||c.code==="ENFILE"))t6([r,[P,C,p,g],c,U0||Date.now(),Date.now()]);else if(typeof g==="function")g.apply(this,arguments)})}}return Z}function t6(Z){r1("ENQUEUE",Z[0].name,Z[1]),i[G0].push(Z),rX()}var i5;function sV(){var Z=Date.now();for(var X=0;X<i[G0].length;++X)if(i[G0][X].length>2)i[G0][X][3]=Z,i[G0][X][4]=Z;rX()}function rX(){if(clearTimeout(i5),i5=void 0,i[G0].length===0)return;var Z=i[G0].shift(),X=Z[0],J=Z[1],q=Z[2],Q=Z[3],$=Z[4];if(Q===void 0)r1("RETRY",X.name,J),X.apply(null,J);else if(Date.now()-Q>=60000){r1("TIMEOUT",X.name,J);var Y=J.pop();if(typeof Y==="function")Y.call(null,q)}else{var H=Date.now()-$,K=Math.max($-Q,1),W=Math.min(K*1.2,100);if(H>=W)r1("RETRY",X.name,J),X.apply(null,J.concat([Q]));else i[G0].push(Z)}if(i5===void 0)i5=setTimeout(rX,0)}});var eV=d((Is,tV)=>{function x0(Z,X){if(typeof X==="boolean")X={forever:X};if(this._originalTimeouts=JSON.parse(JSON.stringify(Z)),this._timeouts=Z,this._options=X||{},this._maxRetryTime=X&&X.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever)this._cachedTimeouts=this._timeouts.slice(0)}tV.exports=x0;x0.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};x0.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};x0.prototype.retry=function(Z){if(this._timeout)clearTimeout(this._timeout);if(!Z)return!1;var X=new Date().getTime();if(Z&&X-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(Z);var J=this._timeouts.shift();if(J===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),J=this._timeouts.shift();else return!1;var q=this,Q=setTimeout(function(){if(q._attempts++,q._operationTimeoutCb){if(q._timeout=setTimeout(function(){q._operationTimeoutCb(q._attempts)},q._operationTimeout),q._options.unref)q._timeout.unref()}q._fn(q._attempts)},J);if(this._options.unref)Q.unref();return!0};x0.prototype.attempt=function(Z,X){if(this._fn=Z,X){if(X.timeout)this._operationTimeout=X.timeout;if(X.cb)this._operationTimeoutCb=X.cb}var J=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){J._operationTimeoutCb()},J._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};x0.prototype.try=function(Z){console.log("Using RetryOperation.try() is deprecated"),this.attempt(Z)};x0.prototype.start=function(Z){console.log("Using RetryOperation.start() is deprecated"),this.attempt(Z)};x0.prototype.start=x0.prototype.try;x0.prototype.errors=function(){return this._errors};x0.prototype.attempts=function(){return this._attempts};x0.prototype.mainError=function(){if(this._errors.length===0)return null;var Z={},X=null,J=0;for(var q=0;q<this._errors.length;q++){var Q=this._errors[q],$=Q.message,Y=(Z[$]||0)+1;if(Z[$]=Y,Y>=J)X=Q,J=Y}return X}});var XB=d((tj)=>{var rj=eV();tj.operation=function(Z){var X=tj.timeouts(Z);return new rj(X,{forever:Z&&Z.forever,unref:Z&&Z.unref,maxRetryTime:Z&&Z.maxRetryTime})};tj.timeouts=function(Z){if(Z instanceof Array)return[].concat(Z);var X={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var J in Z)X[J]=Z[J];if(X.minTimeout>X.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var q=[];for(var Q=0;Q<X.retries;Q++)q.push(this.createTimeout(Q,X));if(Z&&Z.forever&&!q.length)q.push(this.createTimeout(Q,X));return q.sort(function($,Y){return $-Y}),q};tj.createTimeout=function(Z,X){var J=X.randomize?Math.random()+1:1,q=Math.round(J*X.minTimeout*Math.pow(X.factor,Z));return q=Math.min(q,X.maxTimeout),q};tj.wrap=function(Z,X,J){if(X instanceof Array)J=X,X=null;if(!J){J=[];for(var q in Z)if(typeof Z[q]==="function")J.push(q)}for(var Q=0;Q<J.length;Q++){var $=J[Q],Y=Z[$];Z[$]=function(K){var W=tj.operation(X),G=Array.prototype.slice.call(arguments,1),V=G.pop();G.push(function(L){if(W.retry(L))return;if(L)arguments[0]=W.mainError();V.apply(this,arguments)}),W.attempt(function(){K.apply(Z,G)})}.bind(Z,Y),Z[$].options=X}}});var JB=d((ws,o5)=>{o5.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")o5.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")o5.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var qB=d((js,Z2)=>{var l=global.process,t1=function(Z){return Z&&typeof Z==="object"&&typeof Z.removeListener==="function"&&typeof Z.emit==="function"&&typeof Z.reallyExit==="function"&&typeof Z.listeners==="function"&&typeof Z.kill==="function"&&typeof Z.pid==="number"&&typeof Z.on==="function"};if(!t1(l))Z2.exports=function(){return function(){}};else{if(ZJ=$0("assert"),e1=JB(),XJ=/^win/i.test(l.platform),e6=$0("events"),typeof e6!=="function")e6=e6.EventEmitter;if(l.__signal_exit_emitter__)J0=l.__signal_exit_emitter__;else J0=l.__signal_exit_emitter__=new e6,J0.count=0,J0.emitted={};if(!J0.infinite)J0.setMaxListeners(1/0),J0.infinite=!0;Z2.exports=function(Z,X){if(!t1(global.process))return function(){};if(ZJ.equal(typeof Z,"function","a callback must be provided for exit handler"),Z6===!1)s5();var J="exit";if(X&&X.alwaysLast)J="afterexit";var q=function(){if(J0.removeListener(J,Z),J0.listeners("exit").length===0&&J0.listeners("afterexit").length===0)r2()};return J0.on(J,Z),q},r2=function(){if(!Z6||!t1(global.process))return;Z6=!1,e1.forEach(function(X){try{l.removeListener(X,t2[X])}catch(J){}}),l.emit=e2,l.reallyExit=r5,J0.count-=1},Z2.exports.unload=r2,N1=function(X,J,q){if(J0.emitted[X])return;J0.emitted[X]=!0,J0.emit(X,J,q)},t2={},e1.forEach(function(Z){t2[Z]=function(){if(!t1(global.process))return;var J=l.listeners(Z);if(J.length===J0.count){if(r2(),N1("exit",null,Z),N1("afterexit",null,Z),XJ&&Z==="SIGHUP")Z="SIGINT";l.kill(l.pid,Z)}}}),Z2.exports.signals=function(){return e1},Z6=!1,s5=function(){if(Z6||!t1(global.process))return;Z6=!0,J0.count+=1,e1=e1.filter(function(X){try{return l.on(X,t2[X]),!0}catch(J){return!1}}),l.emit=qJ,l.reallyExit=JJ},Z2.exports.load=s5,r5=l.reallyExit,JJ=function(X){if(!t1(global.process))return;l.exitCode=X||0,N1("exit",l.exitCode,null),N1("afterexit",l.exitCode,null),r5.call(l,l.exitCode)},e2=l.emit,qJ=function(X,J){if(X==="exit"&&t1(global.process)){if(J!==void 0)l.exitCode=J;var q=e2.apply(this,arguments);return N1("exit",l.exitCode,null),N1("afterexit",l.exitCode,null),q}else return e2.apply(this,arguments)}}var ZJ,e1,XJ,e6,J0,r2,N1,t2,Z6,s5,r5,JJ,e2,qJ});var $B=d((QN,QJ)=>{var QB=Symbol();function JN(Z,X,J){let q=X[QB];if(q)return X.stat(Z,($,Y)=>{if($)return J($);J(null,Y.mtime,q)});let Q=new Date(Math.ceil(Date.now()/1000)*1000+5);X.utimes(Z,Q,Q,($)=>{if($)return J($);X.stat(Z,(Y,H)=>{if(Y)return J(Y);let K=H.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(X,QB,{value:K}),J(null,H.mtime,K)})})}function qN(Z){let X=Date.now();if(Z==="s")X=Math.ceil(X/1000)*1000;return new Date(X)}QN.probe=JN;QN.getMtime=qN});var GB=d((BN,X4)=>{var HN=$0("path"),HJ=eX(),UN=XB(),KN=qB(),YB=$B(),W1={};function Z4(Z,X){return X.lockfilePath||`${Z}.lock`}function UJ(Z,X,J){if(!X.realpath)return J(null,HN.resolve(Z));X.fs.realpath(Z,J)}function YJ(Z,X,J){let q=Z4(Z,X);X.fs.mkdir(q,(Q)=>{if(!Q)return YB.probe(q,X.fs,($,Y,H)=>{if($)return X.fs.rmdir(q,()=>{}),J($);J(null,Y,H)});if(Q.code!=="EEXIST")return J(Q);if(X.stale<=0)return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));X.fs.stat(q,($,Y)=>{if($){if($.code==="ENOENT")return YJ(Z,{...X,stale:0},J);return J($)}if(!HB(Y,X))return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));UB(Z,X,(H)=>{if(H)return J(H);YJ(Z,{...X,stale:0},J)})})})}function HB(Z,X){return Z.mtime.getTime()<Date.now()-X.stale}function UB(Z,X,J){X.fs.rmdir(Z4(Z,X),(q)=>{if(q&&q.code!=="ENOENT")return J(q);J()})}function t5(Z,X){let J=W1[Z];if(J.updateTimeout)return;if(J.updateDelay=J.updateDelay||X.update,J.updateTimeout=setTimeout(()=>{J.updateTimeout=null,X.fs.stat(J.lockfilePath,(q,Q)=>{let $=J.lastUpdate+X.stale<Date.now();if(q){if(q.code==="ENOENT"||$)return $J(Z,J,Object.assign(q,{code:"ECOMPROMISED"}));return J.updateDelay=1000,t5(Z,X)}if(J.mtime.getTime()!==Q.mtime.getTime())return $J(Z,J,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let H=YB.getMtime(J.mtimePrecision);X.fs.utimes(J.lockfilePath,H,H,(K)=>{let W=J.lastUpdate+X.stale<Date.now();if(J.released)return;if(K){if(K.code==="ENOENT"||W)return $J(Z,J,Object.assign(K,{code:"ECOMPROMISED"}));return J.updateDelay=1000,t5(Z,X)}J.mtime=H,J.lastUpdate=Date.now(),J.updateDelay=null,t5(Z,X)})})},J.updateDelay),J.updateTimeout.unref)J.updateTimeout.unref()}function $J(Z,X,J){if(X.released=!0,X.updateTimeout)clearTimeout(X.updateTimeout);if(W1[Z]===X)delete W1[Z];X.options.onCompromised(J)}function GN(Z,X,J){X={stale:1e4,update:null,realpath:!0,retries:0,fs:HJ,onCompromised:(q)=>{throw q},...X},X.retries=X.retries||0,X.retries=typeof X.retries==="number"?{retries:X.retries}:X.retries,X.stale=Math.max(X.stale||0,2000),X.update=X.update==null?X.stale/2:X.update||0,X.update=Math.max(Math.min(X.update,X.stale/2),1000),UJ(Z,X,(q,Q)=>{if(q)return J(q);let $=UN.operation(X.retries);$.attempt(()=>{YJ(Q,X,(Y,H,K)=>{if($.retry(Y))return;if(Y)return J($.mainError());let W=W1[Q]={lockfilePath:Z4(Q,X),mtime:H,mtimePrecision:K,options:X,lastUpdate:Date.now()};t5(Q,X),J(null,(G)=>{if(W.released)return G&&G(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));KB(Q,{...X,realpath:!1},G)})})})})}function KB(Z,X,J){X={fs:HJ,realpath:!0,...X},UJ(Z,X,(q,Q)=>{if(q)return J(q);let $=W1[Q];if(!$)return J(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));$.updateTimeout&&clearTimeout($.updateTimeout),$.released=!0,delete W1[Q],UB(Q,X,J)})}function WN(Z,X,J){X={stale:1e4,realpath:!0,fs:HJ,...X},X.stale=Math.max(X.stale||0,2000),UJ(Z,X,(q,Q)=>{if(q)return J(q);X.fs.stat(Z4(Q,X),($,Y)=>{if($)return $.code==="ENOENT"?J(null,!1):J($);return J(null,!HB(Y,X))})})}function VN(){return W1}KN(()=>{for(let Z in W1){let X=W1[Z].options;try{X.fs.rmdirSync(Z4(Z,X))}catch(J){}}});BN.lock=GN;BN.unlock=KB;BN.check=WN;BN.getLocks=VN});var VB=d((Ns,WB)=>{var MN=eX();function FN(Z){let X=["mkdir","realpath","stat","rmdir","utimes"],J={...Z};return X.forEach((q)=>{J[q]=(...Q)=>{let $=Q.pop(),Y;try{Y=Z[`${q}Sync`](...Q)}catch(H){return $(H)}$(null,Y)}}),J}function DN(Z){return(...X)=>new Promise((J,q)=>{X.push((Q,$)=>{if(Q)q(Q);else J($)}),Z(...X)})}function TN(Z){return(...X)=>{let J,q;if(X.push((Q,$)=>{J=Q,q=$}),Z(...X),J)throw J;return q}}function AN(Z){if(Z={...Z},Z.fs=FN(Z.fs||MN),typeof Z.retries==="number"&&Z.retries>0||Z.retries&&typeof Z.retries.retries==="number"&&Z.retries.retries>0)throw Object.assign(Error("Cannot use retries with the sync api"),{code:"ESYNC"});return Z}WB.exports={toPromise:DN,toSync:TN,toSyncOptions:AN}});var LB=d((ks,k1)=>{var X2=GB(),{toPromise:e5,toSync:Z7,toSyncOptions:KJ}=VB();async function BB(Z,X){let J=await e5(X2.lock)(Z,X);return e5(J)}function IN(Z,X){let J=Z7(X2.lock)(Z,KJ(X));return Z7(J)}function ON(Z,X){return e5(X2.unlock)(Z,X)}function wN(Z,X){return Z7(X2.unlock)(Z,KJ(X))}function jN(Z,X){return e5(X2.check)(Z,X)}function NN(Z,X){return Z7(X2.check)(Z,KJ(X))}k1.exports=BB;k1.exports.lock=BB;k1.exports.unlock=ON;k1.exports.lockSync=IN;k1.exports.unlockSync=wN;k1.exports.check=jN;k1.exports.checkSync=NN});function WJ(){if(!GJ)GJ=LB();return GJ}function xs(Z,X){return WJ().lock(Z,X)}function _B(Z,X){return WJ().lockSync(Z,X)}function Es(Z,X){return WJ().check(Z,X)}var GJ;var zB=()=>{};function xN(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return"essential-traffic";if(process.env.DISABLE_TELEMETRY)return"no-telemetry";return"default"}function RB(){return xN()==="essential-traffic"}function MB(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC";return null}var VJ=()=>{};import{dirname as EN,join as FB}from"path";function TB(Z){return[FB(Z,X7),FB(Z,DB)]}function PN(Z,X){let[J,q]=TB(Z);return X(J)?J:q}function vN(Z,X){return TB(Z).some((J)=>X(J))}function Cs(Z,X){let J=Z;while(!0){if(vN(J,X))return PN(J,X);let q=EN(J);if(q===J)return null;J=q}}function ys(Z){return Z===X7||Z===DB}var X7="AGENTS.md",DB="CLAUDE.md";var AB=()=>{};var CN,yN;var IB=B(()=>{CN=["auto","iterm2","iterm2_with_bell","terminal_bell","kitty","ghostty","notifications_disabled"],yN=["normal","vim"]});var EB={};y7(EB,{validateTeamMemWritePath:()=>gN,validateTeamMemKey:()=>fN,isTeamMemoryEnabled:()=>jB,isTeamMemPath:()=>xB,isTeamMemFile:()=>mN,getTeamMemPath:()=>J4,getTeamMemEntrypoint:()=>hN,PathTraversalError:()=>B0});import{lstat as SN,realpath as wB}from"fs/promises";import{dirname as OB,join as J7,resolve as BJ,sep as LJ}from"path";function bN(Z){if(Z.includes("\x00"))throw new B0(`Null byte in path key: "${Z}"`);let X;try{X=decodeURIComponent(Z)}catch{X=Z}if(X!==Z&&(X.includes("..")||X.includes("/")))throw new B0(`URL-encoded traversal in path key: "${Z}"`);let J=Z.normalize("NFKC");if(J!==Z&&(J.includes("..")||J.includes("/")||J.includes("\\")||J.includes("\x00")))throw new B0(`Unicode-normalized traversal in path key: "${Z}"`);if(Z.includes("\\"))throw new B0(`Backslash in path key: "${Z}"`);if(Z.startsWith("/"))throw new B0(`Absolute path key: "${Z}"`);return Z}function jB(){if(!fV())return!1;return C1("tengu_herring_clock",!0)}function J4(){return(J7(s2(),"team")+LJ).normalize("NFC")}function hN(){return J7(s2(),"team","MEMORY.md")}async function NB(Z){let X=[],J=Z;for(let q=OB(J);J!==q;q=OB(J))try{let Q=await wB(J);return X.length===0?Q:J7(Q,...X.reverse())}catch(Q){let $=K0(Q);if($==="ENOENT")try{if((await SN(J)).isSymbolicLink())throw new B0(`Dangling symlink detected (target does not exist): "${J}"`)}catch(Y){if(Y instanceof B0)throw Y}else if($==="ELOOP")throw new B0(`Symlink loop detected in path: "${J}"`);else if($!=="ENOTDIR"&&$!=="ENAMETOOLONG")throw new B0(`Cannot verify path containment (${$}): "${J}"`);X.push(J.slice(q.length+LJ.length)),J=q}return Z}async function kB(Z){let X;try{X=await wB(J4().replace(/[/\\]+$/,""))}catch(J){let q=K0(J);if(q==="ENOENT"||q==="ENOTDIR")return!0;return!1}if(Z===X)return!0;return Z.startsWith(X+LJ)}function xB(Z){let X=BJ(Z),J=J4();return X.startsWith(J)}async function gN(Z){if(Z.includes("\x00"))throw new B0(`Null byte in path: "${Z}"`);let X=BJ(Z),J=J4();if(!X.startsWith(J))throw new B0(`Path escapes team memory directory: "${Z}"`);let q=await NB(X);if(!await kB(q))throw new B0(`Path escapes team memory directory via symlink: "${Z}"`);return X}async function fN(Z){bN(Z);let X=J4(),J=J7(X,Z),q=BJ(J);if(!q.startsWith(X))throw new B0(`Key escapes team memory directory: "${Z}"`);let Q=await NB(q);if(!await kB(Q))throw new B0(`Key escapes team memory directory via symlink: "${Z}"`);return q}function mN(Z){return jB()&&xB(Z)}var B0;var PB=B(()=>{W3();y1();aX();B0=class B0 extends Error{constructor(Z){super(Z);this.name="PathTraversalError"}}});import{randomBytes as uN}from"crypto";import{unwatchFile as pN,watchFile as dN}from"fs";import{basename as DJ,dirname as TJ,join as T0,resolve as $7}from"path";function V1(){return{numStartups:0,installMethod:void 0,autoUpdates:void 0,theme:"dark",preferredNotifChannel:"auto",verbose:!1,editorMode:"normal",autoCompactEnabled:!0,thinkingHistoryRedactionEnabled:!0,toolResultSummarizerEnabled:!0,showTurnDuration:!0,showCacheStats:"compact",hasSeenTasksHint:!1,hasUsedStash:!1,hasUsedBackgroundTask:!1,queuedCommandUpHintCount:0,diffTool:"auto",customApiKeyResponses:{approved:[],rejected:[]},env:{},tipsHistory:{},memoryUsageCount:0,promptQueueUseCount:0,btwUseCount:0,todoFeatureEnabled:!0,showExpandedTodos:!1,messageIdleNotifThresholdMs:60000,autoConnectIde:!1,autoInstallIdeExtension:!0,fileCheckpointingEnabled:!0,terminalProgressBarEnabled:!0,cachedStatsigGates:{},cachedDynamicConfigs:{},cachedGrowthBookFeatures:{},respectGitignore:!0,copyFullResponse:!1,providerProfiles:[],openaiAdditionalModelOptionsCacheByProfile:{},knowledgeGraphEnabled:!0}}function _r(Z){return lN.includes(Z)}function zr(){hB=!1}function Rr(){return hB||=iN()}function iN(){if(SB())return!0;let Z=W0(),X=wJ();if(Z.projects?.[X]?.hasTrustDialogAccepted)return!0;let q=v1(s());while(!0){if(Z.projects?.[q]?.hasTrustDialogAccepted)return!0;let $=v1($7(q,".."));if($===q)break;q=$}return!1}function Mr(Z){let X=W0(),J=v1($7(Z));while(!0){if(X.projects?.[J]?.hasTrustDialogAccepted)return!0;let q=v1($7(J,".."));if(q===J)return!1;J=q}}function Tr(Z){return nN.includes(Z)}function H7(Z){let X=r0.config;if(!X)return!1;let J=X.oauthAccount!==void 0&&Z.oauthAccount===void 0,q=X.hasCompletedOnboarding===!0&&Z.hasCompletedOnboarding!==!0;return J||q}function gB(Z){return RJ.add(Z),()=>RJ.delete(Z)}function vB(){for(let Z of RJ)try{Z()}catch{}}function A0(Z){let X=null;try{if(mB(V0(),V1,(q)=>{let Q=Z(q);if(Q===q)return q;return X={...Q,projects:CB(q.projects)},X})&&X)Y7(X),vB()}catch(J){let q=K0(J);if(q==="EACCES"||q==="EPERM"||q==="EROFS"){E(`Skipping global config write due to permission error: ${J}`,{level:"error"});return}E(`Failed to save config with lock: ${J}`,{level:"error"});let Q=X6(V0(),V1);if(H7(Q)){E("saveGlobalConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),c0("tengu_config_auth_loss_prevented",{});return}let $=Z(Q);if($===Q)return;X={...$,projects:CB(Q.projects)},fB(V0(),X,AJ),Y7(X),vB()}}function Ar(){return IJ}function aN(){let Z=q4+Q7;if(Z>0)c0("tengu_config_cache_stats",{cache_hits:q4,cache_misses:Q7,hit_rate:q4/Z});q4=0,Q7=0}function MJ(Z){if(Z.installMethod!==void 0)return Z;let X=Z,J="unknown",q=Z.autoUpdates??!0;switch(X.autoUpdaterStatus){case"migrated":J="local";break;case"installed":J="native";break;case"disabled":q=!1;break;case"enabled":case"no_permissions":case"not_configured":J="global";break;case void 0:break}return{...Z,installMethod:J,autoUpdates:q}}function CB(Z){if(!Z)return Z;let X={},J=!1;for(let[q,Q]of Object.entries(Z)){let $=Q;if($.history!==void 0){J=!0;let{history:Y,...H}=$;X[q]=H}else X[q]=Q}return J?X:Z}function sN(){if(zJ)return;zJ=!0;let Z=V0();dN(Z,{interval:oN,persistent:!1},(X)=>{if(X.mtimeMs<=r0.mtime)return;k().readFile(Z,{encoding:"utf-8"}).then((J)=>{if(X.mtimeMs<=r0.mtime)return;let q=C0(p0(J));if(q===null||typeof q!=="object")return;r0={config:MJ({...V1(),...q}),mtime:X.mtimeMs},x1={mtime:X.mtimeMs,size:X.size}}).catch(()=>{})}),Y4(async()=>{pN(Z),zJ=!1})}function Y7(Z){r0={config:Z,mtime:Date.now()},x1=null}function W0(){if(r0.config)return q4++,r0.config;Q7++;try{let Z=null;try{Z=k().statSync(V0())}catch{}let X=MJ(X6(V0(),V1));return r0={config:X,mtime:Z?.mtimeMs??Date.now()},x1=Z?{mtime:Z.mtimeMs,size:Z.size}:null,sN(),X}catch{return MJ(X6(V0(),V1))}}function Or(){let Z=W0().remoteControlAtStartup;if(Z!==void 0)return Z;return!1}function wr(Z){let X=W0();if(X.customApiKeyResponses?.approved?.includes(Z))return"approved";if(X.customApiKeyResponses?.rejected?.includes(Z))return"rejected";return"new"}function fB(Z,X,J){let q=TJ(Z);k().mkdirSync(q);let $=i7(X,(Y,H)=>f(Y)!==f(J[H]));if(I6(Z,f($,null,2),{encoding:"utf-8",mode:384}),Z===V0())IJ++}function mB(Z,X,J){let q=X(),Q=TJ(Z),$=k();$.mkdirSync(Q);let Y;try{let H=`${Z}.lock`,K=Date.now();Y=_B(Z,{lockfilePath:H,onCompromised:(_)=>{E(`Config lock compromised: ${_}`,{level:"error"})}});let W=Date.now()-K;if(W>100)E("Lock acquisition took longer than expected - another Claude instance may be running"),c0("tengu_config_lock_contention",{lock_time_ms:W});if(x1&&Z===V0())try{let _=$.statSync(Z);if(_.mtimeMs!==x1.mtime||_.size!==x1.size)c0("tengu_config_stale_write",{read_mtime:x1.mtime,write_mtime:_.mtimeMs,read_size:x1.size,write_size:_.size})}catch(_){if(K0(_)!=="ENOENT")throw _}let G=X6(Z,X);if(Z===V0()&&H7(G))return E("saveConfigWithLock: re-read config is missing auth that cache has; refusing to write to avoid wiping ~/.claudio/config.json. See GH #3117.",{level:"error"}),c0("tengu_config_auth_loss_prevented",{}),!1;let V=J(G);if(V===G)return!1;let L=i7(V,(_,z)=>f(_)!==f(q[z]));try{let _=DJ(Z),z=OJ();try{$.mkdirSync(z)}catch(I){if(K0(I)!=="EEXIST")throw I}let D=60000,M=$.readdirStringSync(z).filter((I)=>I.startsWith(`${_}.backup.`)).sort().reverse(),F=M[0],N=F?Number(F.split(".backup.").pop()):0,R=Number.isNaN(N)||Date.now()-N>=D;if(R){let I=T0(z,`${_}.backup.${Date.now()}`);$.copyFileSync(Z,I)}let w=5,A=R?$.readdirStringSync(z).filter((I)=>I.startsWith(`${_}.backup.`)).sort().reverse():M;for(let I of A.slice(w))try{$.unlinkSync(T0(z,I))}catch{}}catch(_){if(K0(_)!=="ENOENT")E(`Failed to backup config: ${_}`,{level:"error"})}if(I6(Z,f(L,null,2),{encoding:"utf-8",mode:384}),Z===V0())IJ++;return!0}finally{if(Y)Y()}}function jr(){if(FJ)return;let Z=Date.now();Q0("info","enable_configs_started"),FJ=!0,X6(V0(),V1,!0),Q0("info","enable_configs_completed",{duration_ms:Date.now()-Z})}function OJ(){return T0(Y0(),"backups")}function yB(Z){let X=k(),J=DJ(Z),q=OJ();try{let Y=X.readdirStringSync(q).filter((H)=>H.startsWith(`${J}.backup.`)).sort().at(-1);if(Y)return T0(q,Y)}catch{}let Q=TJ(Z);try{let Y=X.readdirStringSync(Q).filter((K)=>K.startsWith(`${J}.backup.`)).sort().at(-1);if(Y)return T0(Q,Y);let H=`${Z}.backup`;try{return X.statSync(H),H}catch{}}catch{}return null}function X6(Z,X,J){if(!FJ)throw Error("Config accessed before allowed.");let q=k();try{let Q=q.readFileSync(Z,{encoding:"utf-8"});try{let $=H0(p0(Q));return{...X(),...$}}catch($){let Y=$ instanceof Error?$.message:String($);throw new q7(Y,Z,X())}}catch(Q){if(K0(Q)==="ENOENT"){let Y=yB(Z);if(Y)process.stderr.write(`
90
- Claude configuration file not found at: ${Z}
91
- A backup file exists at: ${Y}
92
- You can manually restore it by running: cp "${Y}" "${Z}"
93
-
94
- `);return X()}if(Q instanceof q7&&J)throw Q;if(Q instanceof q7){if(E(`Config file corrupted, resetting to defaults: ${Q.message}`,{level:"error"}),!_J){_J=!0;try{m(Q);let _=!1;try{q.statSync(`${Z}.backup`),_=!0}catch{}c0("tengu_config_parse_error",{has_backup:_})}finally{_J=!1}}process.stderr.write(`
95
- Claude configuration file at ${Z} is corrupted: ${Q.message}
96
- `);let Y=DJ(Z),H=OJ();try{q.mkdirSync(H)}catch(_){if(K0(_)!=="EEXIST")throw _}let K=q.readdirStringSync(H).filter((_)=>_.startsWith(`${Y}.corrupted.`)),W,G=!1,V=q.readFileSync(Z,{encoding:"utf-8"});for(let _ of K)try{let z=q.readFileSync(T0(H,_),{encoding:"utf-8"});if(V===z){G=!0;break}}catch{}if(!G){W=T0(H,`${Y}.corrupted.${Date.now()}`);try{q.copyFileSync(Z,W),E(`Corrupted config backed up to: ${W}`,{level:"error"})}catch{}}let L=yB(Z);if(W)process.stderr.write(`The corrupted file has been backed up to: ${W}
97
- `);else if(G)process.stderr.write(`The corrupted file has already been backed up.
98
- `);if(L)process.stderr.write(`A backup file exists at: ${L}
99
- You can manually restore it by running: cp "${L}" "${Z}"
100
-
101
- `);else process.stderr.write(`
102
- `)}return X()}}function Nr(){let Z=wJ(),X=W0();if(!X.projects)return Q4;let J=X.projects[Z]??Q4;if(typeof J.allowedTools==="string")J.allowedTools=C0(J.allowedTools)??[];return J}function kr(Z){let X=wJ(),J=null;try{if(mB(V0(),V1,(Q)=>{let $=Q.projects?.[X]??Q4,Y=Z($);if(Y===$)return Q;return J={...Q,projects:{...Q.projects,[X]:Y}},J})&&J)Y7(J)}catch(q){E(`Failed to save config with lock: ${q}`,{level:"error"});let Q=X6(V0(),V1);if(H7(Q)){E("saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),c0("tengu_config_auth_loss_prevented",{});return}let $=Q.projects?.[X]??Q4,Y=Z($);if(Y===$)return;J={...Q,projects:{...Q.projects,[X]:Y}},fB(V0(),J,AJ),Y7(J)}}function rN(){return tN()!==null}function xr(){return rN()&&!e(process.env.FORCE_AUTOUPDATE_PLUGINS)}function Er(Z){switch(Z.type){case"development":return"development build";case"env":return`${Z.envVar} set`;case"config":return"config"}}function tN(){return{type:"development"}}function Pr(){let Z=W0();if(Z.userID)return Z.userID;let X=uN(32).toString("hex");return A0((J)=>({...J,userID:X})),X}function vr(){if(!W0().firstStartTime){let X=new Date().toISOString();A0((J)=>({...J,firstStartTime:J.firstStartTime??X}))}}function Cr(Z){let X=s1();switch(Z){case"User":return T0(Y0(),"CLAUDE.md");case"Local":return T0(X,"CLAUDE.local.md");case"Project":return T0(X,X7);case"Managed":return T0(F1(),"CLAUDE.md");case"AutoMem":return pV()}return cN.getTeamMemEntrypoint()}function yr(){return T0(F1(),".claude","rules")}function Sr(){return T0(Y0(),"rules")}function gr(Z){r0.config=Z,r0.mtime=Z?Date.now():0}var cN,_J=!1,Q4,Lr,AJ,lN,nN,hB=!1,Fr,Dr,RJ,r0,x1=null,q4=0,Q7=0,IJ=0,Ir=20,oN=1000,zJ=!1,FJ=!1,wJ,br,hr;var jJ=B(()=>{L1();SQ();j6();aX();n$();t0();bB();R1();G2();MX();d0();y1();h4();R0();R2();d4();S4();zB();u0();v4();VJ();l4();AB();L0();IB();cN=(PB(),$4(EB)),Q4={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1},Lr=["off","compact","full"];AJ=V1(),lN=["apiKeyHelper","installMethod","autoUpdates","autoUpdatesProtectedForNative","theme","verbose","preferredNotifChannel","shiftEnterKeyBindingInstalled","editorMode","hasUsedBackslashReturn","autoCompactEnabled","thinkingHistoryRedactionEnabled","toolResultSummarizerEnabled","showTurnDuration","showCacheStats","diffTool","env","tipsHistory","todoFeatureEnabled","showExpandedTodos","messageIdleNotifThresholdMs","autoConnectIde","autoInstallIdeExtension","fileCheckpointingEnabled","terminalProgressBarEnabled","showStatusInTerminalTab","taskCompleteNotifEnabled","inputNeededNotifEnabled","agentPushNotifEnabled","respectGitignore","claudeInChromeDefaultEnabled","hasCompletedClaudeInChromeOnboarding","lspRecommendationDisabled","lspRecommendationNeverPlugins","lspRecommendationIgnoredCount","copyFullResponse","copyOnSelect","flickerFreeMode","permissionExplainerEnabled","prStatusFooterEnabled","remoteControlAtStartup","remoteDialogSeen","knowledgeGraphEnabled"];nN=["allowedTools","hasTrustDialogAccepted","hasCompletedProjectOnboarding"];Fr={...AJ,autoUpdates:!1,knowledgeGraphEnabled:!0},Dr={...Q4};RJ=new Set;r0={config:null,mtime:0};Y4(async()=>{aN()});wJ=u(()=>{let Z=s1(),X=d5(Z);if(X)return v1(X);return v1($7(Z))});br=X6,hr=H7});function U7(Z){return Z.split(/[;,]/).map((X)=>X.trim()).filter((X)=>X.length>0)}function uB(Z){let X=U7(Z);return X.length>0?X[0]:Z.trim()}var NJ=()=>{};import{randomBytes as eN}from"crypto";function J2(Z){return Z?.trim()??""}function I0(Z){let X=J2(Z);return X.length>0?X:void 0}function Zk(Z){return J2(Z).replace(/\/+$/,"")}function Xk(Z){switch(Z){case"anthropic":case"mistral":case"gemini":case"bedrock":case"vertex":case"foundry":return Z;default:return"openai"}}function Jk(Z){if(Z==="low"||Z==="medium"||Z==="high"||Z==="xhigh")return Z;return}function qk(Z){if(!Z||typeof Z!=="object"||Array.isArray(Z))return;let X={};for(let[J,q]of Object.entries(Z)){let Q=J2(J),$=typeof q==="string"?q.trim():"";if(Q.length>0&&$.length>0)X[Q]=$}return Object.keys(X).length>0?X:void 0}function Qk(Z){if(!Z||typeof Z!=="object")return;let X={},J=I0(Z.codexAuthPath);if(J)X.codexAuthPath=J;let q=I0(Z.codexAccountId);if(q)X.codexAccountId=q;let Q=I0(Z.githubToken);if(Q)X.githubToken=Q;let $=I0(Z.awsRegion);if($)X.awsRegion=$;let Y=I0(Z.gcpProject);if(Y)X.gcpProject=Y;let H=I0(Z.gcpRegion);if(H)X.gcpRegion=H;let K=I0(Z.azureResource);if(K)X.azureResource=K;let W=qk(Z.customHeaders);if(W)X.customHeaders=W;let G=Jk(Z.reasoningEffort);if(G)X.reasoningEffort=G;return Object.keys(X).length>0?X:void 0}function cB(Z){let X=J2(Z.id),J=J2(Z.name),q=Xk(Z.provider),Q=Zk(Z.baseUrl),$=J2(Z.model);if(!X||!J||!Q||q!=="anthropic"&&!$)return null;let H={id:X,name:J,provider:q,baseUrl:Q,model:$,apiKey:I0(Z.apiKey)},K=Qk(Z.extras);if(K)H.extras=K;return H}function $k(Z){let X=new Set,J=[];for(let q of Z??[]){let Q=cB(q);if(!Q||X.has(Q.id))continue;X.add(Q.id),J.push(Q)}return J}function Yk(){return`provider_${eN(6).toString("hex")}`}function lB(Z,X=Yk()){return cB({id:X,provider:Z.provider??"openai",name:Z.name,baseUrl:Z.baseUrl,model:Z.model,apiKey:Z.apiKey,extras:Z.extras})}function nB(Z,X=W0()){return X.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}function lr(Z){switch(Z){case"anthropic":return{provider:"anthropic",name:"Anthropic",baseUrl:"https://api.anthropic.com",model:"",apiKey:"",requiresApiKey:!0};case"openai":return{provider:"openai",name:"OpenAI",baseUrl:"https://api.openai.com/v1",model:"gpt-5.4",apiKey:"",requiresApiKey:!0};case"kimi-code":return{provider:"openai",name:"Moonshot AI - Kimi Code",baseUrl:"https://api.kimi.com/coding/v1",model:"kimi-for-coding",apiKey:"",requiresApiKey:!0};case"moonshotai":return{provider:"openai",name:"Moonshot AI - API",baseUrl:"https://api.moonshot.ai/v1",model:"kimi-k2.5",apiKey:"",requiresApiKey:!0};case"deepseek":return{provider:"openai",name:"DeepSeek",baseUrl:"https://api.deepseek.com/v1",model:"deepseek-v4-flash, deepseek-v4-pro, deepseek-chat, deepseek-reasoner",apiKey:"",requiresApiKey:!0};case"gemini":return{provider:"gemini",name:"Google Gemini",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",model:"gemini-3-flash-preview",apiKey:"",requiresApiKey:!0};case"mistral":return{provider:"mistral",name:"Mistral",baseUrl:"https://api.mistral.ai/v1",model:"devstral-latest",apiKey:"",requiresApiKey:!0};case"together":return{provider:"openai",name:"Together AI",baseUrl:"https://api.together.xyz/v1",model:"Qwen/Qwen3.5-9B",apiKey:"",requiresApiKey:!0};case"groq":return{provider:"openai",name:"Groq",baseUrl:"https://api.groq.com/openai/v1",model:"llama-3.3-70b-versatile",apiKey:"",requiresApiKey:!0};case"azure-openai":return{provider:"openai",name:"Azure OpenAI",baseUrl:"https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1",model:"YOUR-DEPLOYMENT-NAME",apiKey:"",requiresApiKey:!0};case"openrouter":return{provider:"openai",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",model:"openai/gpt-5-mini",apiKey:"",requiresApiKey:!0};case"lmstudio":return{provider:"openai",name:"LM Studio",baseUrl:"http://localhost:1234/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"dashscope-cn":return{provider:"openai",name:"Alibaba Coding Plan (China)",baseUrl:"https://coding.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"dashscope-intl":return{provider:"openai",name:"Alibaba Coding Plan",baseUrl:"https://coding-intl.dashscope.aliyuncs.com/v1",model:"qwen3.6-plus",apiKey:"",requiresApiKey:!0};case"custom":return{provider:"openai",name:"Custom OpenAI-compatible",baseUrl:pB,model:dB,apiKey:"",requiresApiKey:!1};case"nvidia-nim":return{provider:"openai",name:"NVIDIA NIM",baseUrl:"https://integrate.api.nvidia.com/v1",model:"nvidia/llama-3.1-nemotron-70b-instruct",apiKey:"",requiresApiKey:!0};case"minimax":return{provider:"openai",name:"MiniMax",baseUrl:"https://api.minimax.io/v1",model:"MiniMax-M2.5",apiKey:"",requiresApiKey:!0};case"atomic-chat":return{provider:"openai",name:"Atomic Chat",baseUrl:"http://127.0.0.1:1337/v1",model:"local-model",apiKey:"",requiresApiKey:!1};case"bankr":return{provider:"openai",name:"Bankr",baseUrl:"https://llm.bankr.bot/v1",model:"claude-opus-4.6",apiKey:"",requiresApiKey:!0};case"bedrock":return{provider:"bedrock",name:"AWS Bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"vertex":return{provider:"vertex",name:"Google Vertex AI",baseUrl:"https://us-central1-aiplatform.googleapis.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"foundry":return{provider:"foundry",name:"Azure AI Foundry",baseUrl:"https://YOUR-RESOURCE-NAME.services.ai.azure.com",model:"claude-sonnet-4-6",apiKey:"",requiresApiKey:!1};case"ollama":default:return{provider:"openai",name:"Ollama",baseUrl:pB,model:dB,apiKey:"",requiresApiKey:!1}}}function E1(Z=W0()){return $k(Z.providerProfiles)}function nr(Z=W0()){return E1(Z).length>0}function B1(Z=W0()){let X=E1(Z);if(X.length===0)return;let J=I0(Z.activeProviderProfileId);return X.find((q)=>q.id===J)??X[0]}function ir(Z,X){let J=lB(Z);if(!J)return null;let q=X?.makeActive??!0;if(A0(($)=>{let H=[...E1($),J],K=I0($.activeProviderProfileId),W=q||!K||!H.some((G)=>G.id===K)?J.id:K;return{...$,providerProfiles:H,activeProviderProfileId:W}}),B1()?.id===J.id)Uk(J.id),Kk();return J}function ar(Z,X){let J=lB(X,Z);if(!J)return null;let q=!1;if(A0((Q)=>{let $=E1(Q),Y=$.findIndex((L)=>L.id===Z);if(Y<0)return Q;q=!0;let H=[...$];H[Y]=J;let K={...Q.openaiAdditionalModelOptionsCacheByProfile??{}};delete K[Z];let W=I0(Q.activeProviderProfileId),G=W&&H.some((L)=>L.id===W)?W:H[0]?.id;return{...Q,providerProfiles:H,activeProviderProfileId:G,openaiAdditionalModelOptionsCacheByProfile:K,openaiAdditionalModelOptionsCache:G===Z?[]:Q.openaiAdditionalModelOptionsCache}}),!q)return null;return J}function or(Z){let X=I0(Z);if(!X)return null;let J=B1();if(!J)return null;if(U7(J.model).includes(X))return J;A0(($)=>{let Y=E1($),H=Y.findIndex((G)=>G.id===J.id);if(H<0)return $;let K=Y[H];if(K.model===X)return $;let W=[...Y];return W[H]={...K,model:X},{...$,providerProfiles:W}});let Q=B1();if(!Q||Q.id!==J.id)return null;return Q}function sr(){let Z=B1();if(!Z)return;A0((X)=>{let J=E1(X),q=J.findIndex((Y)=>Y.id===Z.id);if(q<0)return X;let Q=J[q];if(!Q.model)return X;let $=[...J];return $[q]={...Q,model:""},{...X,providerProfiles:$}})}function Hk(Z){let X=U7(Z.model);if(X.length===0)return[];return X.map((J)=>({value:J,label:J,description:`Provider: ${Z.name}`}))}function Uk(Z){let X=W0(),q=E1(X).find(($)=>$.id===Z);if(!q)return null;let Q=Hk(q);return A0(($)=>({...$,activeProviderProfileId:Z,openaiAdditionalModelOptionsCache:Q.length>0?Q:nB(Z,$),openaiAdditionalModelOptionsCacheByProfile:{...$.openaiAdditionalModelOptionsCacheByProfile??{},[Z]:Q.length>0?Q:$.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}})),q}function rr(Z){let X=!1,J;return A0((q)=>{let Q=E1(q);if(!Q.find((V)=>V.id===Z))return q;X=!0;let Y=Q.filter((V)=>V.id!==Z),H=I0(q.activeProviderProfileId),W=!H||H===Z||!Y.some((V)=>V.id===H)?Y[0]?.id:H;if(W)J=Y.find((V)=>V.id===W)??Y[0];let G={...q.openaiAdditionalModelOptionsCacheByProfile??{}};return delete G[Z],{...q,providerProfiles:Y,activeProviderProfileId:W,openaiAdditionalModelOptionsCacheByProfile:G,openaiAdditionalModelOptionsCache:W?nB(W,{...q,openaiAdditionalModelOptionsCacheByProfile:G}):[]}}),{removed:X,activeProfileId:J?.id}}function tr(Z=W0()){let X=B1(Z);if(!X)return Z.openaiAdditionalModelOptionsCache??[];let J=Z.openaiAdditionalModelOptionsCacheByProfile?.[X.id];if(J)return J;if(Object.keys(Z.openaiAdditionalModelOptionsCacheByProfile??{}).length===0)return Z.openaiAdditionalModelOptionsCache??[];return[]}function er(Z){let X=B1();if(!X){A0((J)=>({...J,openaiAdditionalModelOptionsCache:Z}));return}A0((J)=>({...J,openaiAdditionalModelOptionsCache:Z,openaiAdditionalModelOptionsCacheByProfile:{...J.openaiAdditionalModelOptionsCacheByProfile??{},[X.id]:Z}}))}function Kk(){let Z=B1();if(!Z){A0((X)=>({...X,openaiAdditionalModelOptionsCache:[]}));return}A0((X)=>{let J={...X.openaiAdditionalModelOptionsCacheByProfile??{}};return delete J[Z.id],{...X,openaiAdditionalModelOptionsCache:[],openaiAdditionalModelOptionsCacheByProfile:J}})}var pB="http://localhost:11434/v1",dB="llama3.1:8b";var iB=B(()=>{jJ();NJ()});function K7(Z,X){return{name:`${Z.name}-with-${X.name}-fallback`,read(){let J=Z.read();if(J!==null&&J!==void 0)return J;return X.read()||{}},async readAsync(){let J=await Z.readAsync();if(J!==null&&J!==void 0)return J;return await X.readAsync()||{}},update(J){let q=Z.read(),Q=Z.update(J);if(Q.success){if(q===null)X.delete();return Q}let $=X.update(J);if($.success){if(q!==null)Z.delete();return{success:!0,warning:$.warning}}return{success:!1}},delete(){let J=Z.delete(),q=X.delete();return J||q}}}var aB=()=>{};function G7(Z,X,J=10*sB*oB){let W=[];try{let q;if(X===void 0)q={};else if(X instanceof AbortSignal)q={abortSignal:X,timeout:J};else q=X;let{abortSignal:Q,timeout:$=10*sB*oB,input:Y,stdio:H=["ignore","pipe","pipe"]}=q;Q?.throwIfAborted();const K=R6(W,k4`exec: ${Z.slice(0,200)}`,0);try{let _=N0(Z,{env:process.env,maxBuffer:1e6,timeout:$,cwd:s(),stdio:H,shell:!0,reject:!1,input:Y});if(!_.stdout)return null;return _.stdout.trim()||null}catch{return null}}catch(G){var V=G,L=1}finally{M6(W,V,L)}}var oB=1000,sB=60;var kJ=B(()=>{c6();t0();L0()});import{createHash as Gk}from"crypto";import{userInfo as Wk}from"os";function J6(Z=""){let X=Y0(),q=!process.env.CLAUDIO_CONFIG_DIR?"":`-${Gk("sha256").update(X).digest("hex").substring(0,8)}`;return`Claude Code${rB().OAUTH_FILE_SUFFIX}${Z}${q}`}function H4(Z=""){return J6(Z)}function O0(){try{return process.env.USER||Wk().username}catch{return"claude-code-user"}}function EJ(){q0.cache={data:null,cachedAt:0},q0.generation++,q0.readInFlight=null}function Wt(Z){if(q0.cache.cachedAt!==0)return;let X=null;if(Z)try{X=JSON.parse(Z)}catch{return}q0.cache={data:X,cachedAt:Date.now()}}var h0="-credentials",xJ=30000,q0;var W7=B(()=>{UW();d0();q0={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}});async function Bk(){try{let Z=H4(h0),X=O0(),{stdout:J,code:q}=await a("security",["find-generic-password","-a",X,"-w","-s",Z],{useCwd:!1,preserveOutputOnError:!1});if(q===0&&J)return H0(J.trim())}catch(Z){}return null}function Ft(){if(q2!==void 0)return q2;if(process.platform!=="darwin")return q2=!1,!1;try{q2=N0("security",["show-keychain-info"],{reject:!1,stdio:["ignore","pipe","pipe"]}).exitCode===36}catch{q2=!1}return q2}var Vk=4032,PJ,q2;var tB=B(()=>{c6();R1();f4();kJ();L0();W7();PJ={name:"keychain",read(){let Z=q0.cache;if(Date.now()-Z.cachedAt<xJ)return Z.data;try{let X=H4(h0),J=O0(),q=G7(`security find-generic-password -a "${J}" -w -s "${X}"`);if(q){let Q=H0(q);return q0.cache={data:Q,cachedAt:Date.now()},Q}}catch(X){}if(Z.data!==null)return E("[keychain] read failed; serving stale cache",{level:"warn"}),q0.cache={data:Z.data,cachedAt:Date.now()},Z.data;return q0.cache={data:null,cachedAt:Date.now()},null},async readAsync(){let Z=q0.cache;if(Date.now()-Z.cachedAt<xJ)return Z.data;if(q0.readInFlight)return q0.readInFlight;let X=q0.generation,J=Bk().then((q)=>{if(X===q0.generation){if(q===null&&Z.data!==null)E("[keychain] readAsync failed; serving stale cache",{level:"warn"});let Q=q??Z.data;return q0.cache={data:Q,cachedAt:Date.now()},q0.readInFlight=null,Q}return q});return q0.readInFlight=J,J},update(Z){EJ();try{let X=H4(h0),J=O0(),q=f(Z),Q=Buffer.from(q,"utf-8").toString("hex"),$=`add-generic-password -U -a "${J}" -s "${X}" -X "${Q}"
103
- `,Y;if($.length<=Vk)Y=N0("security",["-i"],{input:$,stdio:["pipe","pipe","pipe"],reject:!1});else E(`Keychain payload (${q.length}B JSON) exceeds security -i stdin limit; using argv`,{level:"warn"}),Y=N0("security",["add-generic-password","-U","-a",J,"-s",X,"-X",Q],{stdio:["ignore","pipe","pipe"],reject:!1});if(Y.exitCode!==0)return{success:!1};return q0.cache={data:Z,cachedAt:Date.now()},{success:!0}}catch(X){return{success:!1}}},delete(){EJ();try{let Z=H4(h0),X=O0();return G7(`security delete-generic-password -a "${X}" -s "${Z}"`),!0}catch(Z){return!1}}}});var vJ;var eB=B(()=>{c6();L0();W7();vJ={name:"libsecret",read(){try{let Z=O0(),X=J6(h0),J=N0("secret-tool",["lookup","service",X,"account",Z],{reject:!1});if(J.exitCode===0&&J.stdout)return H0(J.stdout)}catch{}return null},async readAsync(){return this.read()},update(Z){try{let X=O0(),J=J6(h0),q=f(Z);return{success:N0("secret-tool",["store","--label",J,"service",J,"account",X],{input:q,reject:!1}).exitCode===0}}catch{return{success:!1}}},delete(){try{let Z=O0(),X=J6(h0);return N0("secret-tool",["clear","service",X,"account",Z],{reject:!1}).exitCode===0}catch{return!1}}}});import{join as Lk}from"path";function U4(Z){return Z.replace(/'/g,"''")}function V7(){return J6(h0)}function ZL(){return`${V7()}:${O0()}`}function CJ(){let Z=V7().replace(/[^a-zA-Z0-9._-]/g,"_");return Lk(Y0(),`${Z}.secure.dpapi`)}function K4(Z,X){try{return N0("powershell.exe",["-Command",Z],{input:X?.input,reject:!1})}catch{return null}}function _k(Z,X){let J=Z?.stderr?.trim();if(J)return J;if(typeof Z?.exitCode==="number"&&Z.exitCode!==0)return`${X} (exit code ${Z.exitCode}).`;return X}function XL(){let Z=V7().replace(/"/g,'`"'),X=O0().replace(/"/g,'`"'),J=`
104
- Add-Type -AssemblyName System.Runtime.WindowsRuntime
105
- try {
106
- $vault = New-Object Windows.Security.Credentials.PasswordVault
107
- $cred = $vault.Retrieve("${Z}", "${X}")
108
- $cred.FillPassword()
109
- [Console]::Out.Write($cred.Password)
110
- } catch {
111
- exit 1
112
- }
113
- `,q=K4(J);if(q?.exitCode===0&&q.stdout)try{return H0(q.stdout)}catch{return null}return null}var yJ;var JL=B(()=>{c6();d0();L0();W7();yJ={name:"credential-locker-dpapi",read(){let Z=U4(CJ()),X=U4(ZL()),J=`
114
- try {
115
- Add-Type -AssemblyName System.Security
116
- $path = '${Z}'
117
- if (!(Test-Path -LiteralPath $path)) {
118
- exit 1
119
- }
120
-
121
- $protectedBase64 = [System.IO.File]::ReadAllText(
122
- $path,
123
- [System.Text.Encoding]::UTF8
124
- ).Trim()
125
- if (-not $protectedBase64) {
126
- exit 1
127
- }
128
-
129
- $protectedBytes = [Convert]::FromBase64String($protectedBase64)
130
- $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${X}')
131
- $bytes = [System.Security.Cryptography.ProtectedData]::Unprotect(
132
- $protectedBytes,
133
- $entropyBytes,
134
- [System.Security.Cryptography.DataProtectionScope]::CurrentUser
135
- )
136
- [Console]::Out.Write([System.Text.Encoding]::UTF8.GetString($bytes))
137
- } catch {
138
- exit 1
139
- }
140
- `,q=K4(J);if(q?.exitCode===0&&q.stdout)try{return H0(q.stdout)}catch{return XL()}return XL()},async readAsync(){return this.read()},update(Z){let X=U4(CJ()),J=U4(ZL()),q=f(Z),Q=`
141
- try {
142
- Add-Type -AssemblyName System.Security
143
- $path = '${X}'
144
- $directory = [System.IO.Path]::GetDirectoryName($path)
145
- if ($directory) {
146
- [System.IO.Directory]::CreateDirectory($directory) | Out-Null
147
- }
148
-
149
- $payload = [Console]::In.ReadToEnd()
150
- $bytes = [System.Text.Encoding]::UTF8.GetBytes($payload)
151
- $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${J}')
152
- $protectedBytes = [System.Security.Cryptography.ProtectedData]::Protect(
153
- $bytes,
154
- $entropyBytes,
155
- [System.Security.Cryptography.DataProtectionScope]::CurrentUser
156
- )
157
- $protectedBase64 = [Convert]::ToBase64String($protectedBytes)
158
- [System.IO.File]::WriteAllText(
159
- $path,
160
- $protectedBase64,
161
- [System.Text.Encoding]::UTF8
162
- )
163
- } catch {
164
- Write-Error $_.Exception.Message
165
- exit 1
166
- }
167
- `,$=K4(Q,{input:q});if($?.exitCode===0)return{success:!0};return{success:!1,warning:_k($,"Windows secure storage could not encrypt credentials with DPAPI")}},delete(){let X=`
168
- try {
169
- $path = '${U4(CJ())}'
170
- if (Test-Path -LiteralPath $path) {
171
- Remove-Item -LiteralPath $path -Force
172
- }
173
- } catch {
174
- exit 1
175
- }
176
- `,J=K4(X),q=V7().replace(/"/g,'`"'),Q=O0().replace(/"/g,'`"'),$=`
177
- Add-Type -AssemblyName System.Runtime.WindowsRuntime
178
- try {
179
- $vault = New-Object Windows.Security.Credentials.PasswordVault
180
- $cred = $vault.Retrieve("${q}", "${Q}")
181
- $vault.Remove($cred)
182
- } catch {
183
- exit 0
184
- }
185
- `,Y=K4($);return(J?.exitCode??1)===0}}});import{chmodSync as zk}from"fs";import{join as Rk}from"path";function B7(){let Z=Y0(),X=".credentials.json";return{storageDir:Z,storagePath:Rk(Z,".credentials.json")}}var G4;var QL=B(()=>{d0();y1();R0();L0();G4={name:"plaintext",read(){let{storagePath:Z}=B7();try{let X=k().readFileSync(Z,{encoding:"utf8"});return H0(X)}catch{return null}},async readAsync(){let{storagePath:Z}=B7();try{let X=await k().readFile(Z,{encoding:"utf8"});return H0(X)}catch{return null}},update(Z){try{let{storageDir:X,storagePath:J}=B7();try{k().mkdirSync(X)}catch(q){if(K0(q)!=="EEXIST")throw q}return qL(J,f(Z),{encoding:"utf8",flush:!1}),zk(J,384),{success:!0,warning:"Warning: Storing credentials in plaintext."}}catch{return{success:!1}}},delete(){let{storagePath:Z}=B7();try{return k().unlinkSync(Z),!0}catch(X){if(K0(X)==="ENOENT")return!0;return!1}}}});function $L(Z){let X=Z?.allowPlainTextFallback??!0;if(process.platform==="darwin")return X?K7(PJ,G4):PJ;if(process.platform==="linux")return X?K7(vJ,G4):vJ;if(process.platform==="win32")return X?K7(yJ,G4):yJ;return X?G4:Mk}var Mk;var YL=B(()=>{aB();tB();eB();JL();QL();Mk={name:"unavailable-secure-storage",read:()=>null,readAsync:async()=>null,update:()=>({success:!1,warning:"Secure storage is unavailable on this platform without plaintext fallback."}),delete:()=>!0}});function S(Z){if(typeof Z!=="string")return;let X=Z.trim();return X?X:void 0}function SJ(Z=process.env){return S(Z.CODEX_OAUTH_CLIENT_ID)??"app_EMoamEEZ73f0CkXaXp7hrann"}function it(Z=process.env){let X=S(Z.CODEX_OAUTH_CALLBACK_PORT);if(!X)return 1455;let J=Number.parseInt(X,10);if(Number.isInteger(J)&&J>=0&&J<=65535)return J;return 1455}function bJ(Z){let X=Z.split(".");if(X.length<2)return;try{let J=X[1].replace(/-/g,"+").replace(/_/g,"/"),q=J+"=".repeat((4-J.length%4)%4),Q=Buffer.from(q,"base64").toString("utf8"),$=JSON.parse(Q);return $&&typeof $==="object"?$:void 0}catch{return}}function g0(Z){if(!Z)return;let X=bJ(Z),J=X?.["https://api.openai.com/auth"]&&typeof X["https://api.openai.com/auth"]==="object"?X["https://api.openai.com/auth"]:void 0;return S(J?.chatgpt_account_id??X?.["https://api.openai.com/auth.chatgpt_account_id"]??X?.chatgpt_account_id)??void 0}function at(Z){return Z.replace(/[&<>"']/g,(X)=>{switch(X){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"'":return"&#39;";default:return X}})}async function UL(Z){let X=new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",client_id:SJ(),requested_token:"openai-api-key",subject_token:Z,subject_token_type:"urn:ietf:params:oauth:token-type:id_token"}),J=await fetch("https://auth.openai.com/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:X,signal:AbortSignal.timeout(15000)});if(!J.ok){let $=await J.text().catch(()=>"");throw Error($.trim()?`Codex API key exchange failed (${J.status}): ${$.trim()}`:`Codex API key exchange failed with status ${J.status}.`)}let q=await J.json(),Q=S(q.access_token);if(!Q)throw Error("Codex API key exchange completed, but no API key token was returned.");return Q}var ct="https://auth.openai.com",HL="https://auth.openai.com/oauth/token",lt="openid profile email offline_access api.connectors.read api.connectors.invoke",nt="codex_cli_rs";var hJ=()=>{};function z7(){return $L({allowPlainTextFallback:!1})}function KL(Z){if(!Z)return;let J=bJ(Z)?.exp;if(typeof J==="number"&&Number.isFinite(J))return J*1000;return}function V4(Z){if(!Z||typeof Z!=="object")return;let X=Z,J=S(X.apiKey),q=S(X.accessToken);if(!q)return;let Q=S(X.refreshToken),$=S(X.idToken),Y=S(X.accountId)??g0($)??g0(q),H=S(X.profileId),K=typeof X.lastRefreshAt==="number"&&Number.isFinite(X.lastRefreshAt)?X.lastRefreshAt:void 0,W=typeof X.lastRefreshFailureAt==="number"&&Number.isFinite(X.lastRefreshFailureAt)?X.lastRefreshFailureAt:void 0;return{apiKey:J,accessToken:q,refreshToken:Q,idToken:$,accountId:Y,profileId:H,lastRefreshAt:K,lastRefreshFailureAt:W}}function Tk(Z){let X=KL(Z.accessToken)??KL(Z.idToken);if(X===void 0)return!1;return X<=Date.now()+Fk}function GL(Z,X=Date.now()){let J=Math.max(Z.lastRefreshFailureAt??0,_7??0);if(!J)return!1;return X-J<Dk}function Ak(Z,X){if(!X.trim())return`Codex token refresh failed with status ${Z}.`;try{let J=JSON.parse(X),q=J.error&&typeof J.error==="object"?J.error:void 0,Q=S(q?.code??J.code),$=S(q?.message??J.error_description)??X.trim();return Q?`Codex token refresh failed (${Q}): ${$}`:`Codex token refresh failed with status ${Z}: ${$}`}catch{return`Codex token refresh failed with status ${Z}: ${X.trim()}`}}function WL(){if(Q2())return;try{let Z=z7().read();return V4(Z?.codex)}catch{return}}async function Ik(){if(Q2())return;try{let Z=await z7().readAsync();return V4(Z?.codex)}catch{return}}function VL(Z,X=Date.now()){return GL(Z,X)}function BL(Z){if(Q2())return{success:!1,warning:"Bare mode: secure storage is disabled."};let X=V4(Z);if(!X)return{success:!1,warning:"Codex credentials are incomplete."};let J=z7(),q=J.read()||{},Q=V4(q[L7]),$={...q,[L7]:{...X,profileId:X.profileId??Q?.profileId,lastRefreshAt:X.lastRefreshAt??Date.now()}},Y=J.update($);if(Y.success)_7=V4($[L7])?.lastRefreshFailureAt??null;return Y}function Ok(Z,X){if(!BL({...Z,lastRefreshFailureAt:X}).success)_7=X}function Ze(){if(Q2())return{success:!0};let Z=z7(),J={...Z.read()||{}};delete J[L7];let q=Z.update(J);if(q.success)_7=null;return q}async function Xe(Z){if(Q2())return{refreshed:!1};if(B4()?.apiKey?.trim())return{refreshed:!1};let X=await Ik();if(!X)return{refreshed:!1};if(!X.refreshToken)return{refreshed:!1,credentials:X};if(!Z?.force&&!Tk(X))return{refreshed:!1,credentials:X};if(!Z?.force&&GL(X))return{refreshed:!1,credentials:X};if(W4)return W4;return W4=(async()=>{let J=Date.now();try{let q=new URLSearchParams({client_id:SJ(),grant_type:"refresh_token",refresh_token:X.refreshToken}),Q=await fetch(HL,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:q,signal:AbortSignal.timeout(15000)});if(!Q.ok){let G=await Q.text().catch(()=>"");throw Error(Ak(Q.status,G))}let $=await Q.json(),Y=S($.access_token);if(!Y)throw Error("Codex token refresh succeeded without a new access token.");let H={accessToken:Y,refreshToken:S($.refresh_token)??X.refreshToken,idToken:S($.id_token)??X.idToken,accountId:g0($.id_token)??g0($.access_token)??X.accountId,lastRefreshAt:Date.now()},K=H.idToken??X.idToken;if(K)H.apiKey=await UL(K).catch(()=>{return});let W=BL(H);if(!W.success)throw Error(W.warning??"Codex token refresh succeeded but credentials could not be saved.");return{refreshed:!0,credentials:H}}catch(q){throw Ok(X,J),q}finally{W4=null}})(),W4}var L7="codex",Fk=60000,Dk=60000,W4=null,_7=null;var LL=B(()=>{q6();d0();YL();hJ()});import{existsSync as wk,readFileSync as jk}from"node:fs";import{isIP as Nk}from"node:net";import{homedir as kk}from"node:os";import{join as _L}from"node:path";function vk(Z){let X=Z.split(".").map((J)=>Number.parseInt(J,10));if(X.length!==4||X.some((J)=>Number.isNaN(J)))return!1;return X[0]===10||X[0]===172&&X[1]>=16&&X[1]<=31||X[0]===192&&X[1]===168}function Ck(Z){let X=Z.split(":",1)[0];if(!X)return!1;let J=Number.parseInt(X,16);if(Number.isNaN(J))return!1;return(J&65024)===64512||(J&65472)===65152}function mJ(Z){if(!Z)return;let X=Z.trim();if(!X)return;if(X==="undefined")return;return X}function gJ(Z,X){for(let J of X){let q=Z,Q=!0;for(let Y of J){if(!q||typeof q!=="object"||!(Y in q)){Q=!1;break}q=q[Y]}if(!Q)continue;let $=S(q);if($)return $}return}function yk(Z){if(!Z)return;let X=Z.trim().toLowerCase();if(X==="low"||X==="medium"||X==="high"||X==="xhigh")return X;return}function zL(Z){let X=Z.trim(),J=X.indexOf("?");if(J===-1){let W=X.toLowerCase(),G=M7[W];if(G)return{raw:X,baseModel:G.model,reasoning:G.reasoningEffort?{effort:G.reasoningEffort}:void 0};return{raw:X,baseModel:X}}let q=X.slice(0,J).trim(),Q=new URLSearchParams(X.slice(J+1)),$=q.toLowerCase(),Y=M7[$],H=Y?.model??q,K=yk(Q.get("reasoning")??void 0)??(Y?.reasoningEffort?{effort:Y.reasoningEffort}:void 0);return{raw:X,baseModel:H,reasoning:typeof K==="string"?{effort:K}:K}}function TL(Z){let X=Z.trim().toLowerCase();return(X.split("?",1)[0]??X)in M7}function uJ(Z){let X=Z.trim().toLowerCase(),J=X.split("?",1)[0]??X;return Ek.has(J)}function AL(Z){return uJ(Z)}function Sk(Z,X){let J=mJ(X);return fk(J)||!J&&TL(Z)}function bk(Z){let X=Z.trim().toLowerCase();if(X.includes("codex"))return!0;let J=/^gpt-(\d+)/.exec(X);if(!J)return!1;if(Number(J[1])<5)return!1;if(X.startsWith("gpt-5-mini"))return!1;return!0}function pJ(Z){if(!Z)return!1;try{let X=new URL(Z).hostname.toLowerCase();if(X.startsWith("[")&&X.endsWith("]"))X=X.slice(1,-1);let J=X.indexOf("%25");if(J!==-1)X=X.slice(0,J);if(Pk.has(X)||X==="0.0.0.0")return!0;if(X.endsWith(".local"))return!0;let q=Nk(X);if(q===4)return Number.parseInt(X.split(".",1)[0]??"",10)===127||vk(X);if(q===6)return Ck(X);return!1}catch{return!1}}function R7(Z){return Z.replace(/\/+$/,"")}function hk(Z){let X=R7(Z);if(!X||X==="/")return"/v1";if(X.toLowerCase().endsWith("/v1"))return X;return`${X}/v1`}function gk(Z){try{let X=new URL(Z),J=X.hostname.toLowerCase(),q=X.pathname.toLowerCase();if(X.port==="11434")return!0;return J.includes("ollama")||q.includes("ollama")}catch{return!1}}function Ke(Z){if(!pJ(Z))return[];try{let X=new URL(Z),J=R7(X.toString()),q=new Set([J]),Q=[],$=(K,W)=>{let G=new URL(X.toString());G.hostname=K,G.pathname=W,G.search="",G.hash="";let V=R7(G.toString());if(q.has(V))return;q.add(V),Q.push(V)},Y=hk(X.pathname);if(Y!==R7(X.pathname))$(X.hostname,Y);let H=X.hostname.toLowerCase().replace(/^\[|\]$/g,"");if(H==="localhost"||H==="::1")$("127.0.0.1",X.pathname||"/"),$("127.0.0.1",Y);return Q}catch{return[]}}function Ge(Z){if(!Z.hasTools)return!1;if(!pJ(Z.baseUrl))return!1;return gk(Z.baseUrl)}function fk(Z){if(!Z)return!1;try{let X=new URL(Z);return X.hostname==="chatgpt.com"&&X.pathname.replace(/\/+$/,"")==="/backend-api/codex"}catch{return!1}}function mk(Z){let X=Z.split("?",1)[0]??Z,J=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!J||J.toLowerCase()==="copilot")return DL;let q=J.indexOf("/");if(q!==-1)return J.slice(q+1);return J}function RL(Z){let X=Z.split("?",1)[0]??Z,J=X.includes(":")?X.split(":",2)[1].trim():X.trim();if(!J||J.toLowerCase()==="copilot")return DL;return J}function FL(Z){if(!Z)return"copilot";try{let X=new URL(Z).hostname.toLowerCase();if(X==="api.githubcopilot.com")return"copilot";if(X==="models.github.ai"||X.endsWith(".github.ai"))return"models";return"custom"}catch{return"copilot"}}function IL(Z){let X=null;try{let{tryGetActiveProvider:h}=(q6(),$4(L4));X=h()}catch{X=null}let q=X?.transport==="github_copilot",Q=X?.model?.trim(),$=mJ(X?.baseUrl),Y=Z?.model?.trim()||Q||Z?.fallbackModel?.trim()||(q?"github:copilot":"gpt-4o"),H=zL(Y),K=mJ(Z?.baseUrl),W=K??$,V=q&&TL(Y)&&W&&FL(W)==="custom"?void 0:W,L=K??V,_=Q??"",D=uJ(_)?zL(_).baseModel:null,M=Boolean(Z?.model)&&Boolean(D)&&H.baseModel===D,F=uJ(Y)||M,R=!q&&F&&!(L&&L!==fJ)?xk:L,w=q?FL(L):"custom",A=q&&w==="copilot",I=q&&w==="models",T=q&&w==="custom",b=q?RL(Y):Y,j=Sk(Y,R)||A&&bk(b)?"codex_responses":"chat_completions",x=A?mk(H.baseModel):I||T?RL(H.baseModel):H.baseModel,v=Z?.reasoningEffortOverride?{effort:Z.reasoningEffortOverride}:H.reasoning??(X?.extras?.reasoningEffort?{effort:X.extras.reasoningEffort}:void 0);return{transport:j,requestedModel:Y,resolvedModel:x,baseUrl:(R??(A&&j==="codex_responses"?ML:q?ML:fJ)).replace(/\/+$/,""),reasoning:v}}function We(){let Z=null;try{let{tryGetActiveProvider:q}=(q6(),$4(L4));Z=q()}catch{Z=null}let X=Z?.transport;if(X!=="openai_compat"&&X!=="codex_responses"){if(!X||X==="anthropic")return"firstParty";return null}let J=IL();if(J.transport!=="chat_completions")return null;if(!pJ(J.baseUrl))return null;return`openai:${J.baseUrl.toLowerCase()}`}function Ve(){let Z=IL();if(Z.transport!=="chat_completions")return!1;let X=Z.baseUrl.toLowerCase();return X.includes("api.openai.com")||X===fJ}function OL(Z=process.env){let X=dJ();if(X)return X;let J=S(Z.CODEX_AUTH_JSON_PATH);if(J)return J;let q=S(Z.CODEX_HOME);if(q)return _L(q,"auth.json");return _L(kk(),".codex","auth.json")}function dJ(){try{let{tryGetActiveProvider:Z}=(q6(),$4(L4));return S(Z()?.extras?.codexAuthPath)}catch{return}}function cJ(){try{let{tryGetActiveProvider:Z}=(q6(),$4(L4));return S(Z()?.extras?.codexAccountId)}catch{return}}function wL(Z){if(!wk(Z))return;try{let X=jk(Z,"utf8"),J=JSON.parse(X);return J&&typeof J==="object"?J:void 0}catch{return}}function jL(Z){let{authJson:X,authPath:J,envAccountId:q}=Z;if(!X)return{apiKey:"",authPath:J,source:Z.missingSource??"none"};let Q=gJ(X,[["openai_api_key"],["openaiApiKey"],["access_token"],["accessToken"],["tokens","access_token"],["tokens","accessToken"],["auth","access_token"],["auth","accessToken"],["token","access_token"],["token","accessToken"]]),$=gJ(X,[["id_token"],["idToken"],["tokens","id_token"],["tokens","idToken"]]),Y=q??gJ(X,[["account_id"],["accountId"],["tokens","account_id"],["tokens","accountId"],["auth","account_id"],["auth","accountId"]])??g0(Q)??g0($);if(!Q)return{apiKey:"",accountId:Y,authPath:J,source:Z.missingSource??"none"};return{apiKey:Q,accountId:Y,authPath:J,source:"auth.json"}}function NL(Z){let{storedCredentials:X,envAccountId:J}=Z;return{apiKey:X.apiKey??X.accessToken,accountId:J??X.accountId??g0(X.idToken)??g0(X.accessToken),source:"secure-storage"}}function F7(Z,X){let J=S(Z.CODEX_API_KEY),Q=cJ()??S(Z.CODEX_ACCOUNT_ID)??S(Z.CHATGPT_ACCOUNT_ID);if(J)return{apiKey:J,accountId:Q??g0(J),source:"env"};let $=dJ();if(!Boolean($??S(Z.CODEX_AUTH_JSON_PATH)??S(Z.CODEX_HOME))&&X?.explicitAuthPathOnly)return{apiKey:"",accountId:Q,source:"none"};let H=OL(Z),K=wL(H);return jL({authJson:K,authPath:H,envAccountId:Q})}function Be(Z){let X=Z?.env??process.env,J=F7(X,{explicitAuthPathOnly:!0}),q=Boolean(dJ()??S(X.CODEX_AUTH_JSON_PATH)??S(X.CODEX_HOME)),Q=Boolean(Z&&Object.prototype.hasOwnProperty.call(Z,"storedCredentials"));if(q||J.source==="env"||J.source==="auth.json")return J;if(Z?.storedCredentials?.accessToken)return NL({storedCredentials:Z.storedCredentials,envAccountId:cJ()??S(X.CODEX_ACCOUNT_ID)??S(X.CHATGPT_ACCOUNT_ID)});if(Q)return F7(X);return uk(X)}function uk(Z=process.env){let X=cJ()??S(Z.CODEX_ACCOUNT_ID)??S(Z.CHATGPT_ACCOUNT_ID),J=F7(Z,{explicitAuthPathOnly:!0});if(J.source==="env"||J.source==="auth.json"||J.authPath)return J;let q=WL();if(q?.accessToken){let Q=NL({storedCredentials:q,envAccountId:X});if(!(!Q.accountId||VL(q)))return Q;let Y=OL(Z),H=wL(Y),K=jL({authJson:H,authPath:Y,envAccountId:X});if(K.apiKey)return{...K,accountId:K.accountId??Q.accountId};return Q}return F7(Z)}function pk(Z){let X=Z.trim().toLowerCase(),q=X.split("?",1)[0]??X;return M7[q]?.reasoningEffort}function Le(Z){let X=Z.trim().toLowerCase(),J=X.split("?",1)[0]??X;if(J==="gpt-5.3-codex-spark"||J==="codexspark")return!1;if(pk(J)!==void 0)return!0;return/^gpt-5(?:[.-]|$)/.test(J)}var fJ="https://api.openai.com/v1",xk="https://chatgpt.com/backend-api/codex",DL="gpt-4o",M7,Ek,Pk,ML="https://api.githubcopilot.com";var kL=B(()=>{LL();hJ();M7={codexplan:{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.5":{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.4":{model:"gpt-5.4",reasoningEffort:"high"},"gpt-5.3-codex":{model:"gpt-5.3-codex",reasoningEffort:"high"},"gpt-5.3-codex-spark":{model:"gpt-5.3-codex-spark"},codexspark:{model:"gpt-5.3-codex-spark"},"gpt-5.2-codex":{model:"gpt-5.2-codex",reasoningEffort:"high"},"gpt-5.1-codex-max":{model:"gpt-5.1-codex-max",reasoningEffort:"high"},"gpt-5.1-codex-mini":{model:"gpt-5.1-codex-mini"},"gpt-5.5-mini":{model:"gpt-5.5-mini",reasoningEffort:"medium"},"gpt-5.4-mini":{model:"gpt-5.4-mini",reasoningEffort:"medium"},"gpt-5.2":{model:"gpt-5.2",reasoningEffort:"medium"}},Ek=new Set(["codexplan","codexspark"]),Pk=new Set(["localhost","127.0.0.1","::1"])});var L4={};y7(L4,{tryGetActiveProvider:()=>B4,invalidateActiveProviderCache:()=>nk,getActiveProvider:()=>EL,_peekActiveProviderCacheForTesting:()=>ik,ActiveProviderNotConfiguredError:()=>D7});function dk(){if(xL)return;xL=!0,gB(()=>{Q6=null})}function ck(Z,X){switch(Z.provider){case"anthropic":return"anthropic";case"gemini":return"gemini";case"mistral":return"mistral";case"bedrock":return"bedrock";case"vertex":return"vertex";case"foundry":return"foundry";case"openai":default:{if(Z.extras?.githubToken)return"github_copilot";if(AL(X))return"codex_responses";return"openai_compat"}}}function lk(Z){let X=uB(Z.model);return{transport:ck(Z,X),baseUrl:Z.baseUrl,model:X,apiKey:Z.apiKey,extras:Z.extras}}function EL(){if(dk(),Q6)return Q6;let Z=B1(W0());if(!Z)throw new D7;return Q6=lk(Z),Q6}function B4(){try{return EL()}catch(Z){if(Z instanceof D7)return null;throw Z}}function nk(){Q6=null}function ik(){return Q6}var D7,Q6=null,xL=!1;var q6=B(()=>{jJ();iB();NJ();kL();D7=class D7 extends Error{constructor(){super("No active provider profile is configured. Run /provider to set one up.");this.name="ActiveProviderNotConfiguredError"}}});function ak(Z){return Z.sort((X,J)=>{let q=J.modified.getTime()-X.modified.getTime();if(q!==0)return q;return J.created.getTime()-X.created.getTime()})}var PL=()=>{};import o from"node:path";import vL from"node:os";import lJ from"node:process";function iJ(Z,{suffix:X="nodejs"}={}){if(typeof Z!=="string")throw TypeError(`Expected a string, got ${typeof Z}`);if(X)Z+=`-${X}`;if(lJ.platform==="darwin")return ok(Z);if(lJ.platform==="win32")return sk(Z);return rk(Z)}var P1,nJ,$2,ok=(Z)=>{let X=o.join(P1,"Library");return{data:o.join(X,"Application Support",Z),config:o.join(X,"Preferences",Z),cache:o.join(X,"Caches",Z),log:o.join(X,"Logs",Z),temp:o.join(nJ,Z)}},sk=(Z)=>{let X=$2.APPDATA||o.join(P1,"AppData","Roaming"),J=$2.LOCALAPPDATA||o.join(P1,"AppData","Local");return{data:o.join(J,Z,"Data"),config:o.join(X,Z,"Config"),cache:o.join(J,Z,"Cache"),log:o.join(J,Z,"Log"),temp:o.join(nJ,Z)}},rk=(Z)=>{let X=o.basename(P1);return{data:o.join($2.XDG_DATA_HOME||o.join(P1,".local","share"),Z),config:o.join($2.XDG_CONFIG_HOME||o.join(P1,".config"),Z),cache:o.join($2.XDG_CACHE_HOME||o.join(P1,".cache"),Z),log:o.join($2.XDG_STATE_HOME||o.join(P1,".local","state"),Z),temp:o.join(nJ,X,Z)}};var CL=B(()=>{P1=vL.homedir(),nJ=vL.tmpdir(),{env:$2}=lJ});import{join as T7}from"path";function bL(Z){let X=Z.replace(/[^a-zA-Z0-9]/g,"-");if(X.length<=yL)return X;return`${X.slice(0,yL)}-${Math.abs(SL(Z)).toString(36)}`}function I7(Z){return bL(Z)}var A7,yL=200,ek;var hL=B(()=>{CL();R0();tk();A7=iJ("claude-cli");ek={baseLogs:()=>T7(A7.cache,I7(k().cwd())),errors:()=>T7(A7.cache,I7(k().cwd()),"errors"),messages:()=>T7(A7.cache,I7(k().cwd()),"messages"),mcpLogs:(Z)=>T7(A7.cache,I7(k().cwd()),`mcp-logs-${bL(Z)}`)}});function fL(Z){return Z.replace(gL,"").trim()||Z}function mL(Z){return Z.replace(gL,"").trim()}function Ee(Z){return Z.replace(Zx,"").trim()}var gL,Zx;var uL=B(()=>{gL=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;Zx=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});function pe(Z,X){let J=Z.firstPrompt?.startsWith(`<${lL}>`),q=Z.firstPrompt?mL(Z.firstPrompt):"",Q=q&&!J,$=Z.agentName||Z.customTitle||Z.summary||(Q?q:void 0)||X||(J?"Autonomous session":void 0)||(Z.sessionId?Z.sessionId.slice(0,8):"")||"";return fL($).trim()}function de(Z){return Z.toISOString().replace(/[:.]/g,"-")}function qx(Z){if(O7.length>=Jx)O7.shift();O7.push(Z)}function ce(Z){if(f0!==null)return;if(f0=Z,Y2.length>0){let X=[...Y2];Y2.length=0;for(let J of X)switch(J.type){case"error":f0.logError(J.error);break;case"mcpError":f0.logMCPError(J.serverName,J.error);break;case"mcpDebug":f0.logMCPDebug(J.serverName,J.message);break}}}function m(Z){let X=cL(Z);try{let J=B4()?.transport;if(J==="bedrock"||J==="vertex"||J==="foundry"||process.env.DISABLE_ERROR_REPORTING||RB())return;let Q={error:X.stack||X.message,timestamp:new Date().toISOString()};if(qx(Q),f0===null){Y2.push({type:"error",error:X});return}f0.logError(X)}catch{}}function ne(){return[...O7]}function ie(Z,X){try{if(f0===null){Y2.push({type:"mcpError",serverName:Z,error:X});return}f0.logMCPError(Z,X)}catch{}}function ae(Z,X){try{if(f0===null){Y2.push({type:"mcpDebug",serverName:Z,message:X});return}f0.logMCPDebug(Z,X)}catch{}}function oe(Z,X){if(!X||!X.startsWith("repl_main_thread"))return;let{messages:J,...q}=Z;pL(q),dL(null)}var Jx=100,O7,Y2,f0=null,le;var u0=B(()=>{L1();j6();q6();Xx();PL();hL();uL();y1();VJ();L0();O7=[];Y2=[];le=u(()=>{return process.argv.includes("--hard-fail")})});import nL from"node:path";function $x(Z){return Z.includes(nL.sep)||Z.includes("/")||nL.isAbsolute(Z)}function Yx(Z){let X=Z.trim();if(!X)return"Unsafe executable: empty command";if(_4.test(X))return"Unsafe executable: control characters are not allowed";if(!$x(X)&&!Qx.test(X))return'Unsafe executable: bare command names may only contain letters, numbers, ".", "_" and "-"';return null}function Hx(Z){for(let X of Z)if(_4.test(X))return"Unsafe argument: control characters are not allowed";return null}function Ux(Z){if(!Z)return null;if(_4.test(Z))return"Unsafe working directory: control characters are not allowed";return null}function Kx(Z){if(!Z)return{};for(let[X,J]of Object.entries(Z)){if(_4.test(X))return{error:"Unsafe environment: control characters are not allowed in keys"};if(typeof J==="string"&&_4.test(J))return{error:"Unsafe environment: control characters are not allowed in values"}}return{value:Z}}function Gx(Z,X){if(typeof Z.signal==="string")return Z.signal;return String(X)}function a(Z,X,J={timeout:10*oJ*aJ,preserveOutputOnError:!0,useCwd:!0}){return V3(Z,X,{abortSignal:J.abortSignal,timeout:J.timeout,preserveOutputOnError:J.preserveOutputOnError,cwd:J.useCwd?s():void 0,env:J.env,stdin:J.stdin,input:J.input})}function V3(Z,X,{abortSignal:J,timeout:q=10*oJ*aJ,preserveOutputOnError:Q=!0,cwd:$,env:Y,maxBuffer:H=iL,stdin:K,input:W}={timeout:10*oJ*aJ,preserveOutputOnError:!0,maxBuffer:iL}){let G=Yx(Z);if(G)return Promise.resolve({stdout:"",stderr:"",code:1,error:G});let V=Hx(X);if(V)return Promise.resolve({stdout:"",stderr:"",code:1,error:V});let L=Ux($);if(L)return Promise.resolve({stdout:"",stderr:"",code:1,error:L});let _=Kx(Y);if(_.error)return Promise.resolve({stdout:"",stderr:"",code:1,error:_.error});return new Promise((z)=>{let D=W!==void 0?"pipe":K??"pipe",M=aL.spawn(Z,X,{cwd:$,env:_.value,shell:!1,signal:J,stdio:[D,"pipe","pipe"]}),F=!1,N="",R="",w=0,A,I=!1,T=(x)=>{if(F)return;F=!0,z(x)},b=(x,v)=>{let h=typeof x==="string"?x:x.toString("utf8");if(w+=Buffer.byteLength(h,"utf8"),w>H){M.kill(),T({stdout:Q?N:"",stderr:Q?R:"",code:1,error:"maxBuffer exceeded"});return}if(v==="stdout")N+=h;else R+=h};M.stdout?.on("data",(x)=>b(x,"stdout")),M.stderr?.on("data",(x)=>b(x,"stderr")),M.once("spawn",()=>{if(D==="pipe"&&M.stdin)if(W!==void 0)M.stdin.end(W);else M.stdin.end()}),M.once("error",(x)=>{m(x),T({stdout:"",stderr:"",code:1,error:x.message})});let j=q>0?setTimeout(()=>{I=!0,M.kill()},q):void 0;M.once("close",(x,v)=>{if(j)clearTimeout(j);A=v??void 0;let h=x??1;if(I){T({stdout:Q?N:"",stderr:Q?R:"",code:h,error:`Command timed out after ${q}ms`});return}if(h!==0){if(Q)T({stdout:N,stderr:R,code:h,error:Gx({signal:A},h)});else T({stdout:"",stderr:"",code:h});return}T({stdout:N,stderr:R,code:0})})})}var aL,aJ=1000,oJ=60,iL=1e6,_4,Qx;var f4=B(()=>{t0();u0();kJ();aL=DH(n7(),1),_4=/[\0\r\n]/,Qx=/^[A-Za-z0-9_.-]+$/});import{readFile as Wx}from"fs/promises";import{join as Vx}from"path";async function z4(Z,X,J,q){try{let Q=await Wx(Vx(Z,"config"),"utf-8");return Bx(Q,X,J,q)}catch{return null}}function Bx(Z,X,J,q){let Q=Z.split(`
186
- `),$=X.toLowerCase(),Y=q.toLowerCase(),H=!1;for(let K of Q){let W=K.trim();if(W.length===0||W[0]==="#"||W[0]===";")continue;if(W[0]==="["){H=Rx(W,$,J);continue}if(!H)continue;let G=Lx(W);if(G&&G.key.toLowerCase()===Y)return G.value}return null}function Lx(Z){let X=0;while(X<Z.length&&Mx(Z[X]))X++;if(X===0)return null;let J=Z.slice(0,X);while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;if(X>=Z.length||Z[X]!=="=")return null;X++;while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;let q=_x(Z,X);return{key:J,value:q}}function _x(Z,X){let J="",q=!1,Q=X;while(Q<Z.length){let $=Z[Q];if(!q&&($==="#"||$===";"))break;if($==='"'){q=!q,Q++;continue}if($==="\\"&&Q+1<Z.length){let Y=Z[Q+1];if(q){switch(Y){case"n":J+=`
187
- `;break;case"t":J+="\t";break;case"b":J+="\b";break;case'"':J+='"';break;case"\\":J+="\\";break;default:J+=Y;break}Q+=2;continue}if(Y==="\\"){J+="\\",Q+=2;continue}}J+=$,Q++}if(!q)J=zx(J);return J}function zx(Z){let X=Z.length;while(X>0&&(Z[X-1]===" "||Z[X-1]==="\t"))X--;return Z.slice(0,X)}function Rx(Z,X,J){let q=1;while(q<Z.length&&Z[q]!=="]"&&Z[q]!==" "&&Z[q]!=="\t"&&Z[q]!=='"')q++;if(Z.slice(1,q).toLowerCase()!==X)return!1;if(J===null)return q<Z.length&&Z[q]==="]";while(q<Z.length&&(Z[q]===" "||Z[q]==="\t"))q++;if(q>=Z.length||Z[q]!=='"')return!1;q++;let $="";while(q<Z.length&&Z[q]!=='"'){if(Z[q]==="\\"&&q+1<Z.length){let Y=Z[q+1];if(Y==="\\"||Y==='"'){$+=Y,q+=2;continue}$+=Y,q+=2;continue}$+=Z[q],q++}if(q>=Z.length||Z[q]!=='"')return!1;if(q++,q>=Z.length||Z[q]!=="]")return!1;return $===J}function Mx(Z){return Z>="a"&&Z<="z"||Z>="A"&&Z<="Z"||Z>="0"&&Z<="9"||Z==="-"}var oL=()=>{};import{unwatchFile as sL,watchFile as Fx}from"fs";import{readdir as Dx,readFile as $6,stat as eL}from"fs/promises";import{join as E0,resolve as w7}from"path";function B00(){H2.clear()}async function m0(Z){let X=w7(Z??s()),J=H2.get(X);if(J!==void 0)return J;let q=K2(X);if(!q)return H2.set(X,null),null;let Q=E0(q,".git");try{if((await eL(Q)).isFile()){let Y=(await $6(Q,"utf-8")).trim();if(Y.startsWith("gitdir:")){let H=Y.slice(7).trim(),K=w7(q,H);return H2.set(X,K),K}}return H2.set(X,Q),Q}catch{return H2.set(X,null),null}}function j7(Z){if(!Z||Z.startsWith("-")||Z.startsWith("/"))return!1;if(Z.includes(".."))return!1;if(Z.split("/").some((X)=>X==="."||X===""))return!1;if(!/^[a-zA-Z0-9/._+@-]+$/.test(Z))return!1;return!0}function sJ(Z){return/^[0-9a-f]{40}$/.test(Z)||/^[0-9a-f]{64}$/.test(Z)}async function R4(Z){try{let X=(await $6(E0(Z,"HEAD"),"utf-8")).trim();if(X.startsWith("ref:")){let J=X.slice(4).trim();if(J.startsWith("refs/heads/")){let Q=J.slice(11);if(!j7(Q))return null;return{type:"branch",name:Q}}if(!j7(J))return null;let q=await U2(Z,J);return q?{type:"detached",sha:q}:{type:"detached",sha:""}}if(!sJ(X))return null;return{type:"detached",sha:X}}catch{return null}}async function U2(Z,X){let J=await rL(Z,X);if(J)return J;let q=await Y6(Z);if(q&&q!==Z)return rL(q,X);return null}async function rL(Z,X){try{let J=(await $6(E0(Z,X),"utf-8")).trim();if(J.startsWith("ref:")){let q=J.slice(4).trim();if(!j7(q))return null;return U2(Z,q)}if(!sJ(J))return null;return J}catch{}try{let J=await $6(E0(Z,"packed-refs"),"utf-8");for(let q of J.split(`
188
- `)){if(q.startsWith("#")||q.startsWith("^"))continue;let Q=q.indexOf(" ");if(Q===-1)continue;if(q.slice(Q+1)===X){let $=q.slice(0,Q);return sJ($)?$:null}}}catch{}return null}async function Y6(Z){try{let X=(await $6(E0(Z,"commondir"),"utf-8")).trim();return w7(Z,X)}catch{return null}}async function Tx(Z,X,J){try{let q=(await $6(E0(Z,X),"utf-8")).trim();if(q.startsWith("ref:")){let Q=q.slice(4).trim();if(Q.startsWith(J)){let $=Q.slice(J.length);if(!j7($))return null;return $}}}catch{}return null}class Z_{gitDir=null;commonDir=null;initialized=!1;initPromise=null;watchedPaths=[];branchRefPath=null;cache=new Map;async ensureStarted(){if(this.initialized)return;if(this.initPromise)return this.initPromise;return this.initPromise=this.start(),this.initPromise}async start(){if(this.gitDir=await m0(),this.initialized=!0,!this.gitDir)return;this.commonDir=await Y6(this.gitDir),this.watchPath(E0(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(E0(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),Y4(async()=>{this.stopWatching()})}watchPath(Z,X){this.watchedPaths.push(Z),Fx(Z,{interval:Ax},X)}async watchCurrentBranchRef(){if(!this.gitDir)return;let Z=await R4(this.gitDir),X=this.commonDir??this.gitDir,J=Z?.type==="branch"?E0(X,"refs","heads",Z.name):null;if(J===this.branchRefPath)return;if(this.branchRefPath)sL(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((q)=>q!==this.branchRefPath);if(this.branchRefPath=J,!J)return;this.watchPath(J,()=>{this.invalidate()})}async onHeadChanged(){this.invalidate(),await tL(),await this.watchCurrentBranchRef()}invalidate(){for(let Z of this.cache.values())Z.dirty=!0}stopWatching(){for(let Z of this.watchedPaths)sL(Z);this.watchedPaths=[],this.branchRefPath=null}async get(Z,X){await this.ensureStarted();let J=this.cache.get(Z);if(J&&!J.dirty)return J.value;if(J)J.dirty=!1;let q=await X(),Q=this.cache.get(Z);if(Q&&!Q.dirty)Q.value=q;if(!Q)this.cache.set(Z,{value:q,dirty:!1,compute:X});return q}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}}async function Ix(){let Z=await m0();if(!Z)return"HEAD";let X=await R4(Z);if(!X)return"HEAD";return X.type==="branch"?X.name:"HEAD"}async function Ox(){let Z=await m0();if(!Z)return"";let X=await R4(Z);if(!X)return"";if(X.type==="branch")return await U2(Z,`refs/heads/${X.name}`)??"";return X.sha}async function wx(){let Z=await m0();if(!Z)return null;let X=await z4(Z,"remote","origin","url");if(X)return X;let J=await Y6(Z);if(J&&J!==Z)return z4(J,"remote","origin","url");return null}async function jx(){let Z=await m0();if(!Z)return"main";let X=await Y6(Z)??Z,J=await Tx(X,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(J)return J;for(let q of["main","master"])if(await U2(X,`refs/remotes/origin/${q}`))return q;return"main"}function X_(){return N7.get("branch",Ix)}function J_(){return N7.get("head",Ox)}function q_(){return N7.get("remoteUrl",wx)}function Q_(){return N7.get("defaultBranch",jx)}async function L00(Z){let X=await m0(Z);if(!X)return null;let J=await R4(X);if(!J)return null;if(J.type==="branch")return U2(X,`refs/heads/${J.name}`);return J.sha}async function _00(Z){let X;try{let q=(await $6(E0(Z,".git"),"utf-8")).trim();if(!q.startsWith("gitdir:"))return null;X=w7(Z,q.slice(7).trim())}catch{return null}let J=await R4(X);if(!J)return null;if(J.type==="branch")return U2(X,`refs/heads/${J.name}`);return J.sha}async function z00(Z){let X=await m0(Z);if(!X)return null;let J=await z4(X,"remote","origin","url");if(J)return J;let q=await Y6(X);if(q&&q!==X)return z4(q,"remote","origin","url");return null}async function $_(){let Z=await m0();if(!Z)return!1;let X=await Y6(Z)??Z;try{return await eL(E0(X,"shallow")),!0}catch{return!1}}async function Y_(){try{let Z=await m0();if(!Z)return 0;let X=await Y6(Z)??Z;return(await Dx(E0(X,"worktrees"))).length+1}catch{return 1}}var H2,Ax=1000,N7;var H_=B(()=>{j6();bB();t0();R2();oL();H2=new Map;N7=new Z_});import{createHash as Nx}from"crypto";import{readFileSync as rJ,realpathSync as U_,statSync as K_}from"fs";import{open as kx,readFile as xx,realpath as G_,stat as Ex}from"fs/promises";import{basename as Px,dirname as tJ,join as P0,resolve as x7,sep as W_}from"path";function vx(){function Z(X){let J=V_(X);return J===R_?null:J}return Z.cache=V_.cache,Z}function Cx(){function Z(X){let J=K2(X);if(!J)return null;return B_(J)}return Z.cache=B_.cache,Z}function C00(Z){return m0(Z)}async function y00(){let Z=s(),X=K2(Z);if(!X)return!1;try{let[J,q]=await Promise.all([G_(Z),G_(X)]);return J===q}catch{return Z===X}}function hx(Z){let X=Z.trim();if(!X)return null;let J=X.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(J&&J[1]&&J[2])return`${J[1]}/${J[2]}`.toLowerCase();let q=X.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(q&&q[1]&&q[2]){let Q=q[1],$=q[2];if(lx(Q)&&$.startsWith("git/")){let Y=$.slice(4),H=Y.split("/");if(H.length>=3&&H[0].includes("."))return Y.toLowerCase();return`github.com/${Y}`.toLowerCase()}return`${Q}/${$}`.toLowerCase()}return null}async function b00(){let Z=await eJ();if(!Z)return null;let X=hx(Z);if(!X)return null;return Nx("sha256").update(X).digest("hex").substring(0,16)}async function u00(){try{let[Z,X,J,q,Q,$]=await Promise.all([Sx(),bx(),eJ(),gx(),fx(),ux()]);return{commitHash:Z,branchName:X,remoteUrl:J,isHeadOnRemote:q,isClean:Q,worktreeCount:$}}catch(Z){return null}}async function p00(){let{parseGitRemote:Z}=await import("./detectRepository-0.1.10-1kyc0kvc.mjs"),X=await eJ();if(!X)return E("Local GitHub repo: unknown"),null;let J=Z(X);if(J&&J.host==="github.com"){let q=`${J.owner}/${J.name}`;return E(`Local GitHub repo: ${q}`),q}return E("Local GitHub repo: unknown"),null}async function dx(){let{stdout:Z,code:X}=await a(Z0(),["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"],{preserveOutputOnError:!1});if(X===0&&Z.trim())return Z.trim();let{stdout:J,code:q}=await a(Z0(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(q===0){let $=J.match(/HEAD branch: (\S+)/);if($&&$[1])return`origin/${$[1]}`}let Q=["origin/main","origin/staging","origin/master"];for(let $ of Q){let{code:Y}=await a(Z0(),["rev-parse","--verify",$],{preserveOutputOnError:!1});if(Y===0)return $}return null}function cx(){return $_()}async function k7(){let{stdout:Z,code:X}=await a(Z0(),["ls-files","--others","--exclude-standard"],{preserveOutputOnError:!1}),J=Z.trim();if(X!==0||!J)return[];let q=J.split(`
189
- `).filter(Boolean),Q=[],$=0;for(let Y of q){if(Q.length>=z_){E(`Untracked file capture: reached max file count (${z_})`);break}if(Zq(Y))continue;try{let K=(await Ex(Y)).size;if(K>L_){E(`Untracked file capture: skipping ${Y} (exceeds ${L_} bytes)`);continue}if($+K>__){E(`Untracked file capture: reached total size limit (${__} bytes)`);break}if(K===0){Q.push({path:Y,content:""});continue}let W=Math.min(px,K),G=await kx(Y,"r");try{let V=Buffer.alloc(W),{bytesRead:L}=await G.read(V,0,W,0),_=V.subarray(0,L);if(Xq(_))continue;let z;if(K<=W)z=_.toString("utf-8");else z=await xx(Y,"utf-8");Q.push({path:Y,content:z}),$+=K}finally{await G.close()}}catch(H){E(`Failed to read untracked file ${Y}: ${H}`)}}return Q}async function d00(){try{if(!await yx())return null;if(await cx()){E("Shallow clone detected, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([a(Z0(),["diff","HEAD"]),k7()]);return{remote_base_sha:null,remote_base:null,patch:_||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let X=await dx();if(!X){E("No remote found, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([a(Z0(),["diff","HEAD"]),k7()]);return{remote_base_sha:null,remote_base:null,patch:_||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let{stdout:J,code:q}=await a(Z0(),["merge-base","HEAD",X],{preserveOutputOnError:!1});if(q!==0||!J.trim()){E("Merge-base failed, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([a(Z0(),["diff","HEAD"]),k7()]);return{remote_base_sha:null,remote_base:null,patch:_||"",untracked_files:z,format_patch:null,head_sha:null,branch_name:null}}let Q=J.trim(),[{stdout:$},Y,{stdout:H,code:K},{stdout:W},{stdout:G}]=await Promise.all([a(Z0(),["diff",Q]),k7(),a(Z0(),["format-patch",`${Q}..HEAD`,"--stdout"]),a(Z0(),["rev-parse","HEAD"]),a(Z0(),["rev-parse","--abbrev-ref","HEAD"])]),V=null;if(K===0&&H&&H.trim())V=H;let L=G?.trim();return{remote_base_sha:Q,remote_base:X,patch:$||"",untracked_files:Y,format_patch:V,head_sha:W?.trim()||null,branch_name:L&&L!=="HEAD"?L:null}}catch(Z){return m(Z),null}}function lx(Z){let X=Z.split(":")[0]??"";return X==="localhost"||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(X)}function c00(){let Z=k(),X=s(),J=P0(X,".git");try{let q=Z.statSync(J);if(q.isFile())return!1;if(q.isDirectory()){let Q=P0(J,"HEAD");try{if(Z.statSync(Q).isFile())return!1}catch{}}}catch{}try{if(Z.statSync(P0(X,"HEAD")).isFile())return!0}catch{}try{if(Z.statSync(P0(X,"objects")).isDirectory())return!0}catch{}try{if(Z.statSync(P0(X,"refs")).isDirectory())return!0}catch{}return!1}var R_,V_,K2,B_,d5,Z0,yx,s$=async(Z)=>{return K2(Z)!==null},Sx=async()=>{return J_()},bx=async()=>{return X_()},S00=async()=>{return Q_()},eJ=async()=>{return q_()},gx=async()=>{let{code:Z}=await a(Z0(),["--no-optional-locks","rev-parse","@{u}"],{preserveOutputOnError:!1,useCwd:!0});return Z===0},h00=async()=>{let{stdout:Z,code:X}=await a(Z0(),["--no-optional-locks","rev-list","--count","@{u}..HEAD"],{preserveOutputOnError:!1,useCwd:!0});return X===0&&parseInt(Z.trim(),10)>0},g00=async()=>{let{stdout:Z,code:X}=await a(Z0(),["--no-optional-locks","rev-list","--left-right","--count","@{u}...HEAD"],{preserveOutputOnError:!1,useCwd:!0});if(X!==0)return{ahead:0,behind:0};let J=Z.trim().split(/\s+/);if(J.length!==2)return{ahead:0,behind:0};let q=parseInt(J[0],10),Q=parseInt(J[1],10);return{ahead:Number.isFinite(Q)?Q:0,behind:Number.isFinite(q)?q:0}},fx=async(Z)=>{let X=["--no-optional-locks","status","--porcelain"];if(Z?.ignoreUntracked)X.push("-uno");let{stdout:J}=await a(Z0(),X,{preserveOutputOnError:!1});return J.trim().length===0},f00=async()=>{let{stdout:Z}=await a(Z0(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return Z.trim().split(`
190
- `).map((X)=>X.trim().split(" ",2)[1]?.trim()).filter((X)=>typeof X==="string")},mx=async()=>{let{stdout:Z}=await a(Z0(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1}),X=[],J=[];return Z.trim().split(`
191
- `).filter((q)=>q.length>0).forEach((q)=>{let Q=q.substring(0,2),$=q.substring(2).trim();if(Q==="??")J.push($);else if($)X.push($)}),{tracked:X,untracked:J}},ux=async()=>{return Y_()},m00=async(Z)=>{try{let X=Z||`Claude Code auto-stash - ${new Date().toISOString()}`,{untracked:J}=await mx();if(J.length>0){let{code:Q}=await a(Z0(),["add",...J],{preserveOutputOnError:!1});if(Q!==0)return!1}let{code:q}=await a(Z0(),["stash","push","--message",X],{preserveOutputOnError:!1});return q===0}catch(X){return!1}},L_=524288000,__=5368709120,z_=20000,px=65536;var R2=B(()=>{L1();Jq();t0();R1();G2();f4();R0();H_();u0();P4();T5();R_=Symbol("git-root-not-found"),V_=z1((Z)=>{let X=Date.now();Q0("info","find_git_root_started");let J=x7(Z),q=J.substring(0,J.indexOf(W_)+1)||W_,Q=0;while(J!==q){try{let Y=P0(J,".git");Q++;let H=K_(Y);if(H.isDirectory()||H.isFile())return Q0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:Q,found:!0}),J.normalize("NFC")}catch{}let $=tJ(J);if($===J)break;J=$}try{let $=P0(q,".git");Q++;let Y=K_($);if(Y.isDirectory()||Y.isFile())return Q0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:Q,found:!0}),q.normalize("NFC")}catch{}return Q0("info","find_git_root_completed",{duration_ms:Date.now()-X,stat_count:Q,found:!1}),R_},(Z)=>Z,50),K2=vx();B_=z1((Z)=>{try{let X=rJ(P0(Z,".git"),"utf-8").trim();if(!X.startsWith("gitdir:"))return Z;let J=x7(Z,X.slice(7).trim()),q=x7(J,rJ(P0(J,"commondir"),"utf-8").trim());if(x7(tJ(J))!==P0(q,"worktrees"))return Z;if(U_(rJ(P0(J,"gitdir"),"utf-8").trim())!==P0(U_(Z),".git"))return Z;if(Px(q)!==".git")return q.normalize("NFC");return tJ(q).normalize("NFC")}catch{return Z}},(Z)=>Z,50),d5=Cx();Z0=u(()=>{return D5("git")||"git"}),yx=u(async()=>{let Z=Date.now();Q0("info","is_git_check_started");let X=K2(s())!==null;return Q0("info","is_git_check_completed",{duration_ms:Date.now()-Z,is_git:X}),X})});
192
- export{U6 as H6,M4 as I6,F4 as J6,v7 as K6,kQ as L6,xQ as M6,Oq as N6,wq as O6,V6 as P6,T4 as Q6,Nq as R6,kq as S6,i7 as T6,SQ as U6,Zq as V6,Jq as W6,Qq as X6,$q as Y6,S7 as Z6,Rq as _6,Mq as $6,Fq as a7,xq as b7,Eq as c7,Pq as d7,vq as e7,bq as f7,hq as g7,Q0 as h7,mE as i7,G2 as j7,n7 as k7,ak as l7,PL as m7,ek as n7,hL as o7,fL as p7,mL as q7,Ee as r7,uL as s7,RB as t7,VJ as u7,pe as v7,de as w7,ce as x7,m as y7,ne as z7,ie as A7,ae as B7,oe as C7,u0 as D7,e4 as E7,u9 as F7,rK as G7,tK as H7,zX as I7,c6 as J7,G7 as K7,a as L7,V3 as M7,f4 as N7,z4 as O7,oL as P7,B00 as Q7,m0 as R7,U2 as S7,Y6 as T7,L00 as U7,_00 as V7,z00 as W7,H_ as X7,mQ as Y7,uQ as Z7,gP as _7,z1 as $7,P4 as a8,F6 as b8,a7 as c8,qW as d8,D5 as e8,T5 as f8,K2 as g8,d5 as h8,Z0 as i8,yx as j8,C00 as k8,y00 as l8,s$ as m8,Sx as n8,bx as o8,S00 as p8,eJ as q8,hx as r8,b00 as s8,gx as t8,h00 as u8,g00 as v8,fx as w8,f00 as x8,mx as y8,ux as z8,m00 as A8,u00 as B8,p00 as C8,dx as D8,d00 as E8,c00 as F8,R2 as G8,AP as H8,v0 as I8,IP as J8,z6 as K8,nP as L8,pz as M8,iP as N8,dQ as O8,cQ as P8,e7 as Q8,Xv as R8,Jv as S8,qv as T8,v4 as U8,oQ as V8,sQ as W8,J$ as X8,q$ as Y8,M$ as Z8,F$ as _8,N$ as $8,k$ as a9,Q3 as b9,NR as c9,Z1 as d9,B2 as e9,EC as f9,PC as g9,vC as h9,ER as i9,b4 as j9,h$ as k9,yC as l9,H3 as m9,g$ as n9,U3 as o9,K3 as p9,m$ as q9,Zy as r9,hR as s9,Xy as t9,Jy as u9,qy as v9,Qy as w9,u$ as x9,$y as y9,Yy as z9,Hy as A9,Uy as B9,Ky as C9,Gy as D9,fR as E9,Wy as F9,Vy as G9,By as H9,Ly as I9,_y as J9,zy as K9,c$ as L9,Ry as M9,h4 as N9,iR as O9,t$ as P9,C0 as Q9,ny as R9,T3 as S9,iy as T9,ay as U9,d4 as V9,ty as W9,ey as X9,ZS as Y9,XS as Z9,JS as _9,qS as $9,I2 as a_,QS as b_,$S as c_,A3 as d_,HS as e_,US as f_,R9 as g_,F1 as h_,O2 as i_,l4 as j_,D9 as k_,RS as l_,T9 as m_,QW as n_,$W as o_,V0 as p_,Fw as q_,n6 as r_,wn as s_,MX as t_,kn as u_,xn as v_,En as w_,Pn as x_,vn as y_,Cn as z_,yn as A_,Sn as B_,bn as C_,hn as D_,gn as E_,fn as F_,mn as G_,un as H_,pn as I_,dn as J_,cn as K_,VW as L_,l2 as M_,BW as N_,tn as O_,en as P_,Zi as Q_,Xi as R_,Ji as S_,qi as T_,Qi as U_,$i as V_,Yi as W_,_W as X_,RW as Y_,MW as Z_,TW as __,Li as $_,IW as a$,a1 as b$,Ii as c$,Ow as d$,w5 as e$,wi as f$,NW as g$,k5 as h$,Pi as i$,vi as j$,Ci as k$,EW as l$,sw as m$,yi as n$,Si as o$,tw as p$,bi as q$,N5 as r$,Jj as s$,$j as t$,fi as u$,SW as v$,x5 as w$,bW as x$,hW as y$,Hj as z$,Uj as A$,di as B$,ci as C$,li as D$,gW as E$,wX as F$,fW as G$,mW as H$,ai as I$,uW as J$,a6 as K$,ei as L$,cW as M$,Za as N$,lW as O$,Ja as P$,nW as Q$,iW as R$,qa as S$,Qa as T$,$a as U$,Ya as V$,Ha as W$,Lj as X$,Ua as Y$,jX as Z$,Fa as _$,ZV as $$,XV as aaa,k0 as baa,Ca as caa,ya as daa,Sa as eaa,i2 as faa,oa as gaa,yX as haa,Jo as iaa,zV as jaa,zo as kaa,b5 as laa,h5 as maa,Ro as naa,Mo as oaa,TV as paa,io as qaa,o2 as raa,AV as saa,f5 as taa,CV as uaa,n as vaa,ao as waa,oo as xaa,so as yaa,m5 as zaa,ro as Aaa,to as Baa,Cj as Caa,eo as Daa,Zs as Eaa,Xs as Faa,Js as Gaa,qs as Haa,Qs as Iaa,SV as Jaa,fV as Kaa,_s as Laa,bj as Maa,zs as Naa,s2 as Oaa,pV as Paa,Rs as Qaa,aX as Raa,xs as Saa,Es as Taa,zB as Uaa,X7 as Vaa,TB as Waa,PN as Xaa,Cs as Yaa,ys as Zaa,AB as _aa,CN as $aa,yN as aba,B0 as bba,jB as cba,J4 as dba,fN as eba,mN as fba,EB as gba,PB as hba,Lr as iba,AJ as jba,lN as kba,_r as lba,nN as mba,zr as nba,Rr as oba,Mr as pba,Tr as qba,gB as rba,A0 as sba,Ar as tba,Ir as uba,W0 as vba,Or as wba,wr as xba,jr as yba,wJ as zba,Nr as Aba,kr as Bba,rN as Cba,xr as Dba,Er as Eba,tN as Fba,Pr as Gba,vr as Hba,Cr as Iba,yr as Jba,Sr as Kba,br as Lba,hr as Mba,gr as Nba,jJ as Oba,U7 as Pba,uB as Qba,NJ as Rba,lr as Sba,E1 as Tba,nr as Uba,B1 as Vba,ir as Wba,ar as Xba,or as Yba,sr as Zba,Hk as _ba,Uk as $ba,rr as aca,tr as bca,er as cca,Kk as dca,iB as eca,h0 as fca,H4 as gca,O0 as hca,EJ as ica,Wt as jca,W7 as kca,Ft as lca,tB as mca,$L as nca,YL as oca,ct as pca,lt as qca,nt as rca,S as sca,SJ as tca,it as uca,g0 as vca,at as wca,UL as xca,hJ as yca,Ik as zca,BL as Aca,Ze as Bca,Xe as Cca,LL as Dca,fJ as Eca,xk as Fca,pJ as Gca,Ke as Hca,Ge as Ica,fk as Jca,FL as Kca,IL as Lca,We as Mca,Ve as Nca,Be as Oca,uk as Pca,pk as Qca,Le as Rca,kL as Sca,D7 as Tca,EL as Uca,B4 as Vca,nk as Wca,ik as Xca,q6 as Yca};