@claudiolabs/claudin 1.0.12 → 1.0.13

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 (910) hide show
  1. package/dist/chunks/AgentTool-1.0.13-6b06g673.mjs +1 -0
  2. package/dist/chunks/App-1.0.13-ka050dp3.mjs +1 -0
  3. package/dist/chunks/ApproveApiKey-1.0.13-f6p2r5kq.mjs +1 -0
  4. package/dist/chunks/AssistantSessionChooser-1.0.13-ghffkhts.mjs +1 -0
  5. package/dist/chunks/AutoModeOptInDialog-1.0.13-5b244jsj.mjs +1 -0
  6. package/dist/chunks/BypassPermissionsModeDialog-1.0.13-eqq7qkpy.mjs +1 -0
  7. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.0.13-5279tcga.mjs +1 -0
  8. package/dist/chunks/ConsoleOAuthFlow-1.0.13-gwgar56n.mjs +1 -0
  9. package/dist/chunks/DiffDialog-1.0.13-2jaehz54.mjs +7 -0
  10. package/dist/chunks/Doctor-1.0.13-t887gwxz.mjs +1 -0
  11. package/dist/chunks/ExplorerDialog-1.0.13-85gxb6k8.mjs +6 -0
  12. package/dist/chunks/Grove-1.0.13-hdw88war.mjs +1 -0
  13. package/dist/chunks/ITermBackend-1.0.13-m0d78jq0.mjs +1 -0
  14. package/dist/chunks/InvalidConfigDialog-1.0.13-4z7zd6n8.mjs +1 -0
  15. package/dist/chunks/InvalidSettingsDialog-1.0.13-6xc5sc8a.mjs +1 -0
  16. package/dist/chunks/MigrationDialog-1.0.13-hhrgw5xc.mjs +1 -0
  17. package/dist/chunks/Onboarding-1.0.13-byv83gyv.mjs +1 -0
  18. package/dist/chunks/ProviderManager-1.0.13-gt6ntzcv.mjs +1 -0
  19. package/dist/chunks/REPL-1.0.13-wjxj6xgk.mjs +1 -0
  20. package/dist/chunks/ResumeConversation-1.0.13-tx1ek47f.mjs +1 -0
  21. package/dist/chunks/SnapshotUpdateDialog-1.0.13-4j2e4s72.mjs +1 -0
  22. package/dist/chunks/TeleportProgress-1.0.13-1rpjcxph.mjs +1 -0
  23. package/dist/chunks/TeleportRepoMismatchDialog-1.0.13-5fgav722.mjs +1 -0
  24. package/dist/chunks/TeleportResumeWrapper-1.0.13-gy4sr83e.mjs +1 -0
  25. package/dist/chunks/TmuxBackend-1.0.13-t98nfbxk.mjs +9 -0
  26. package/dist/chunks/ToolSearchTool-1.0.13-n5wg1rcd.mjs +1 -0
  27. package/dist/chunks/TrustDialog-1.0.13-xdkp37x2.mjs +1 -0
  28. package/dist/chunks/activeProvider-1.0.13-v0kphhga.mjs +1 -0
  29. package/dist/chunks/add-dir-1.0.13-7v5rg7km.mjs +1 -0
  30. package/dist/chunks/agentTypes-1.0.13-k5wckd5y.mjs +1 -0
  31. package/dist/chunks/agents-1.0.13-ngbk16a3.mjs +3 -0
  32. package/dist/chunks/agents-1.0.13-tcqasxmv.mjs +110 -0
  33. package/dist/chunks/api-1.0.13-bvwz0wzt.mjs +1 -0
  34. package/dist/chunks/asciicast-1.0.13-j8ad859r.mjs +1 -0
  35. package/dist/chunks/assistant-1.0.13-91499j0p.mjs +1 -0
  36. package/dist/chunks/auth-1.0.13-p0qrnz2b.mjs +1 -0
  37. package/dist/chunks/auth-1.0.13-s1vedchg.mjs +1 -0
  38. package/dist/chunks/autoMode-1.0.13-61pvskhh.mjs +48 -0
  39. package/dist/chunks/autoUpdater-1.0.13-fnpzj0bw.mjs +1 -0
  40. package/dist/chunks/backgroundHousekeeping-1.0.13-92x690ww.mjs +1 -0
  41. package/dist/chunks/branch-1.0.13-encr40nd.mjs +4 -0
  42. package/dist/chunks/bridge-1.0.13-xfcd961b.mjs +2 -0
  43. package/dist/chunks/bridgeConfig-1.0.13-m2jyf3zk.mjs +1 -0
  44. package/dist/chunks/bridgeEnabled-1.0.13-2chm7y0g.mjs +1 -0
  45. package/dist/chunks/bridgeMain-1.0.13-d64q1ebx.mjs +88 -0
  46. package/dist/chunks/bridgePointer-1.0.13-npck2cd4.mjs +1 -0
  47. package/dist/chunks/btw-1.0.13-55x872ns.mjs +1 -0
  48. package/dist/chunks/buddy-1.0.13-9dmgywzm.mjs +3 -0
  49. package/dist/chunks/cacache-1.0.13-3c5hrrs4.mjs +1 -0
  50. package/dist/chunks/cache-probe-1.0.13-n8g8y16c.mjs +21 -0
  51. package/dist/chunks/cacheStats-1.0.13-2kyncvct.mjs +4 -0
  52. package/dist/chunks/caches-1.0.13-md3zkabd.mjs +1 -0
  53. package/dist/chunks/claudeDesktop-1.0.13-crk87hee.mjs +1 -0
  54. package/dist/chunks/claudemd-1.0.13-y42xe571.mjs +1 -0
  55. package/dist/chunks/clear-1.0.13-g8a3zjew.mjs +1 -0
  56. package/dist/chunks/clearTerminal-1.0.13-4k4snh0r.mjs +1 -0
  57. package/dist/chunks/cli-1.0.13-01n6gr4q.mjs +2 -0
  58. package/dist/chunks/cli-1.0.13-0357cnwe.mjs +2 -0
  59. package/dist/chunks/cli-1.0.13-14c24kge.mjs +2 -0
  60. package/dist/chunks/cli-1.0.13-19k4k5jx.mjs +2 -0
  61. package/dist/chunks/cli-1.0.13-1dk8e4ny.mjs +3 -0
  62. package/dist/chunks/cli-1.0.13-1hcywhe5.mjs +2 -0
  63. package/dist/chunks/cli-1.0.13-1hdbaf71.mjs +3 -0
  64. package/dist/chunks/cli-1.0.13-1qbvvc2e.mjs +4 -0
  65. package/dist/chunks/cli-1.0.13-23ev2ept.mjs +45 -0
  66. package/dist/chunks/cli-1.0.13-29x94tf7.mjs +2 -0
  67. package/dist/chunks/cli-1.0.13-2x789qav.mjs +2 -0
  68. package/dist/chunks/cli-1.0.13-2xpprn71.mjs +1 -0
  69. package/dist/chunks/cli-1.0.13-2z8q1mtz.mjs +3 -0
  70. package/dist/chunks/cli-1.0.13-36yeyd1r.mjs +18 -0
  71. package/dist/chunks/cli-1.0.13-3767t4yj.mjs +4 -0
  72. package/dist/chunks/cli-1.0.13-3c13b00m.mjs +2 -0
  73. package/dist/chunks/cli-1.0.13-3dmmr756.mjs +2 -0
  74. package/dist/chunks/cli-1.0.13-3essvqs1.mjs +2 -0
  75. package/dist/chunks/cli-1.0.13-3f0zqjp8.mjs +2 -0
  76. package/dist/chunks/cli-1.0.13-3fs84evm.mjs +2 -0
  77. package/dist/chunks/cli-1.0.13-3pspajgg.mjs +15 -0
  78. package/dist/chunks/cli-1.0.13-3rqmqts3.mjs +2 -0
  79. package/dist/chunks/cli-1.0.13-449f1p6g.mjs +2 -0
  80. package/dist/chunks/cli-1.0.13-466jbd1q.mjs +2 -0
  81. package/dist/chunks/cli-1.0.13-4dp5a597.mjs +6 -0
  82. package/dist/chunks/cli-1.0.13-4x3mr6wk.mjs +2 -0
  83. package/dist/chunks/cli-1.0.13-57993qn6.mjs +2 -0
  84. package/dist/chunks/cli-1.0.13-57ez593b.mjs +3 -0
  85. package/dist/chunks/cli-1.0.13-5g7rhqvq.mjs +4 -0
  86. package/dist/chunks/cli-1.0.13-5keyjg3e.mjs +58 -0
  87. package/dist/chunks/cli-1.0.13-5m2br5vf.mjs +2 -0
  88. package/dist/chunks/cli-1.0.13-5sc2h2hm.mjs +2 -0
  89. package/dist/chunks/cli-1.0.13-5sq4jbf1.mjs +2 -0
  90. package/dist/chunks/cli-1.0.13-696y87my.mjs +18 -0
  91. package/dist/chunks/cli-1.0.13-6b6kn6sd.mjs +2 -0
  92. package/dist/chunks/cli-1.0.13-6thbqr6g.mjs +2 -0
  93. package/dist/chunks/cli-1.0.13-6vb140br.mjs +25 -0
  94. package/dist/chunks/cli-1.0.13-6w1rqgrf.mjs +2 -0
  95. package/dist/chunks/cli-1.0.13-6xc8qzyr.mjs +2 -0
  96. package/dist/chunks/cli-1.0.13-6xkw8tq6.mjs +2 -0
  97. package/dist/chunks/cli-1.0.13-7kg0qv18.mjs +2 -0
  98. package/dist/chunks/cli-1.0.13-7nmrp6gh.mjs +2 -0
  99. package/dist/chunks/cli-1.0.13-7rg014zx.mjs +5 -0
  100. package/dist/chunks/cli-1.0.13-7xfra4by.mjs +2 -0
  101. package/dist/chunks/cli-1.0.13-80pk1w5c.mjs +2 -0
  102. package/dist/chunks/cli-1.0.13-81s2z4sy.mjs +2 -0
  103. package/dist/chunks/cli-1.0.13-83vckpyr.mjs +6 -0
  104. package/dist/chunks/cli-1.0.13-8s33s84f.mjs +2 -0
  105. package/dist/chunks/cli-1.0.13-93twxc7q.mjs +2 -0
  106. package/dist/chunks/cli-1.0.13-98a94f4b.mjs +2 -0
  107. package/dist/chunks/cli-1.0.13-9ax4vv5d.mjs +2 -0
  108. package/dist/chunks/cli-1.0.13-9bh8f53y.mjs +9 -0
  109. package/dist/chunks/cli-1.0.13-9t0q538w.mjs +25 -0
  110. package/dist/chunks/cli-1.0.13-a2j673qk.mjs +2 -0
  111. package/dist/chunks/cli-1.0.13-a5641ktm.mjs +2 -0
  112. package/dist/chunks/cli-1.0.13-a77ea1ga.mjs +2 -0
  113. package/dist/chunks/cli-1.0.13-a8t9066b.mjs +2 -0
  114. package/dist/chunks/cli-1.0.13-afdk25h0.mjs +2 -0
  115. package/dist/chunks/cli-1.0.13-avxss6zg.mjs +9 -0
  116. package/dist/chunks/cli-1.0.13-bj2neb84.mjs +2 -0
  117. package/dist/chunks/cli-1.0.13-bs0esgv1.mjs +2 -0
  118. package/dist/chunks/cli-1.0.13-byhjhrrg.mjs +15 -0
  119. package/dist/chunks/cli-1.0.13-cm3q208z.mjs +2 -0
  120. package/dist/chunks/cli-1.0.13-cwce8b7b.mjs +34 -0
  121. package/dist/chunks/cli-1.0.13-d016ffc7.mjs +3 -0
  122. package/dist/chunks/cli-1.0.13-d4zr1yqd.mjs +2 -0
  123. package/dist/chunks/cli-1.0.13-d7kr7nkk.mjs +2 -0
  124. package/dist/chunks/cli-1.0.13-dg21ms7f.mjs +2 -0
  125. package/dist/chunks/cli-1.0.13-dwp60tja.mjs +2 -0
  126. package/dist/chunks/cli-1.0.13-e19bb64d.mjs +4 -0
  127. package/dist/chunks/cli-1.0.13-e1m0dx6a.mjs +2 -0
  128. package/dist/chunks/cli-1.0.13-e3ca1xwv.mjs +2 -0
  129. package/dist/chunks/cli-1.0.13-e464ab16.mjs +2 -0
  130. package/dist/chunks/cli-1.0.13-e8p0r9r9.mjs +2 -0
  131. package/dist/chunks/cli-1.0.13-e9q9245e.mjs +2 -0
  132. package/dist/chunks/cli-1.0.13-ecv0stcf.mjs +2 -0
  133. package/dist/chunks/cli-1.0.13-ey9smtb0.mjs +3 -0
  134. package/dist/chunks/cli-1.0.13-f38bh25k.mjs +12 -0
  135. package/dist/chunks/cli-1.0.13-f4dfekwp.mjs +133 -0
  136. package/dist/chunks/cli-1.0.13-fb695nhr.mjs +67 -0
  137. package/dist/chunks/cli-1.0.13-fjwhbyeh.mjs +2 -0
  138. package/dist/chunks/cli-1.0.13-fpwws3z2.mjs +2 -0
  139. package/dist/chunks/cli-1.0.13-frs40s6h.mjs +2 -0
  140. package/dist/chunks/cli-1.0.13-fsmjqwpj.mjs +2 -0
  141. package/dist/chunks/cli-1.0.13-fta82vnx.mjs +2 -0
  142. package/dist/chunks/cli-1.0.13-g1rr0zfh.mjs +8 -0
  143. package/dist/chunks/cli-1.0.13-g7daabde.mjs +3 -0
  144. package/dist/chunks/cli-1.0.13-gd9e7w43.mjs +2 -0
  145. package/dist/chunks/cli-1.0.13-gsz0cygn.mjs +2 -0
  146. package/dist/chunks/cli-1.0.13-h5mwwv8w.mjs +16 -0
  147. package/dist/chunks/cli-1.0.13-hbcgx6rs.mjs +2 -0
  148. package/dist/chunks/cli-1.0.13-j0m03dqz.mjs +39 -0
  149. package/dist/chunks/cli-1.0.13-j3gww2v8.mjs +2 -0
  150. package/dist/chunks/cli-1.0.13-jdxaky02.mjs +12 -0
  151. package/dist/chunks/cli-1.0.13-jkahzkac.mjs +12 -0
  152. package/dist/chunks/cli-1.0.13-jrjz42t8.mjs +2 -0
  153. package/dist/chunks/cli-1.0.13-jsezewz5.mjs +2 -0
  154. package/dist/chunks/cli-1.0.13-jxe94sbj.mjs +2 -0
  155. package/dist/chunks/cli-1.0.13-k4znag0a.mjs +2 -0
  156. package/dist/chunks/cli-1.0.13-k71bq854.mjs +2 -0
  157. package/dist/chunks/cli-1.0.13-k8vrp1kw.mjs +2 -0
  158. package/dist/chunks/cli-1.0.13-kc1q3k9n.mjs +2 -0
  159. package/dist/chunks/cli-1.0.13-kg25kqz0.mjs +12 -0
  160. package/dist/chunks/cli-1.0.13-kmmkpfh0.mjs +2 -0
  161. package/dist/chunks/cli-1.0.13-knb8ctbq.mjs +3 -0
  162. package/dist/chunks/cli-1.0.13-kpqaz90n.mjs +7 -0
  163. package/dist/chunks/cli-1.0.13-kq0mvqax.mjs +2 -0
  164. package/dist/chunks/cli-1.0.13-kr3d94dn.mjs +5495 -0
  165. package/dist/chunks/cli-1.0.13-m5hkpjvs.mjs +2 -0
  166. package/dist/chunks/cli-1.0.13-mazxedqg.mjs +4 -0
  167. package/dist/chunks/cli-1.0.13-mtnc53tx.mjs +2 -0
  168. package/dist/chunks/cli-1.0.13-mv57kk3c.mjs +59 -0
  169. package/dist/chunks/cli-1.0.13-n4fsyme7.mjs +2 -0
  170. package/dist/chunks/cli-1.0.13-ndthc14d.mjs +2 -0
  171. package/dist/chunks/cli-1.0.13-nqw7f2pt.mjs +2 -0
  172. package/dist/chunks/cli-1.0.13-ns8m0h8r.mjs +15 -0
  173. package/dist/chunks/cli-1.0.13-p1nsb8ay.mjs +202 -0
  174. package/dist/chunks/cli-1.0.13-p43t5py0.mjs +2 -0
  175. package/dist/chunks/cli-1.0.13-p7b51har.mjs +2 -0
  176. package/dist/chunks/cli-1.0.13-pajjrc2x.mjs +2 -0
  177. package/dist/chunks/cli-1.0.13-pf0ztxpx.mjs +6 -0
  178. package/dist/chunks/cli-1.0.13-ppdtae6a.mjs +2 -0
  179. package/dist/chunks/cli-1.0.13-pwfpt641.mjs +2 -0
  180. package/dist/chunks/cli-1.0.13-q03bdpb3.mjs +17 -0
  181. package/dist/chunks/cli-1.0.13-q40za40w.mjs +50 -0
  182. package/dist/chunks/cli-1.0.13-qpnp3w6h.mjs +2 -0
  183. package/dist/chunks/cli-1.0.13-qx079tft.mjs +2 -0
  184. package/dist/chunks/cli-1.0.13-qxebhem2.mjs +2 -0
  185. package/dist/chunks/cli-1.0.13-r6v8d7e7.mjs +2 -0
  186. package/dist/chunks/cli-1.0.13-r9nmkthw.mjs +2 -0
  187. package/dist/chunks/cli-1.0.13-rcrh6wfx.mjs +4 -0
  188. package/dist/chunks/cli-1.0.13-rgk2vrkz.mjs +2 -0
  189. package/dist/chunks/cli-1.0.13-rhptvh17.mjs +2 -0
  190. package/dist/chunks/cli-1.0.13-rxd329nn.mjs +24 -0
  191. package/dist/chunks/cli-1.0.13-ry9nsg8a.mjs +2 -0
  192. package/dist/chunks/cli-1.0.13-ryajgbr3.mjs +2 -0
  193. package/dist/chunks/cli-1.0.13-s15merj9.mjs +2 -0
  194. package/dist/chunks/cli-1.0.13-s16wgevn.mjs +2 -0
  195. package/dist/chunks/cli-1.0.13-s2czjfzp.mjs +2 -0
  196. package/dist/chunks/cli-1.0.13-s2sd6xfc.mjs +24 -0
  197. package/dist/chunks/cli-1.0.13-s5bfzdbk.mjs +2 -0
  198. package/dist/chunks/cli-1.0.13-sg6bkxg3.mjs +20 -0
  199. package/dist/chunks/cli-1.0.13-shrh1g4z.mjs +2 -0
  200. package/dist/chunks/cli-1.0.13-sj8rg9wk.mjs +24 -0
  201. package/dist/chunks/cli-1.0.13-smrxt9dh.mjs +2 -0
  202. package/dist/chunks/cli-1.0.13-smtbj9fm.mjs +2 -0
  203. package/dist/chunks/cli-1.0.13-sy93t0xx.mjs +2 -0
  204. package/dist/chunks/cli-1.0.13-t1z10ay5.mjs +2 -0
  205. package/dist/chunks/cli-1.0.13-t9wrrtrh.mjs +2 -0
  206. package/dist/chunks/cli-1.0.13-tfd5mr15.mjs +17 -0
  207. package/dist/chunks/cli-1.0.13-thxvtvt4.mjs +2 -0
  208. package/dist/chunks/cli-1.0.13-tmfvcmn3.mjs +2 -0
  209. package/dist/chunks/cli-1.0.13-tnq7z8s5.mjs +3 -0
  210. package/dist/chunks/cli-1.0.13-tp2w17kc.mjs +2 -0
  211. package/dist/chunks/cli-1.0.13-tq5m4f65.mjs +2 -0
  212. package/dist/chunks/cli-1.0.13-tr0fe3hn.mjs +2 -0
  213. package/dist/chunks/cli-1.0.13-trkevtw9.mjs +2 -0
  214. package/dist/chunks/cli-1.0.13-tyhtztew.mjs +2 -0
  215. package/dist/chunks/cli-1.0.13-v1tn9wpw.mjs +21 -0
  216. package/dist/chunks/cli-1.0.13-v38n7n4p.mjs +2 -0
  217. package/dist/chunks/cli-1.0.13-v4annnm3.mjs +2 -0
  218. package/dist/chunks/cli-1.0.13-v5gjxk3n.mjs +4 -0
  219. package/dist/chunks/cli-1.0.13-v7eb8n71.mjs +133 -0
  220. package/dist/chunks/cli-1.0.13-v8tce7qz.mjs +2 -0
  221. package/dist/chunks/cli-1.0.13-vb85p8we.mjs +2 -0
  222. package/dist/chunks/cli-1.0.13-vbby2x4m.mjs +2 -0
  223. package/dist/chunks/cli-1.0.13-vd01re4x.mjs +2 -0
  224. package/dist/chunks/cli-1.0.13-vp1h8f42.mjs +2 -0
  225. package/dist/chunks/cli-1.0.13-vs4d56js.mjs +2 -0
  226. package/dist/chunks/cli-1.0.13-vv5mtvhr.mjs +2 -0
  227. package/dist/chunks/cli-1.0.13-vvtdrd6j.mjs +5 -0
  228. package/dist/chunks/cli-1.0.13-vwmq6bde.mjs +2 -0
  229. package/dist/chunks/cli-1.0.13-w5jash5n.mjs +2 -0
  230. package/dist/chunks/cli-1.0.13-w7jh58qt.mjs +2 -0
  231. package/dist/chunks/cli-1.0.13-w8wwn19j.mjs +2 -0
  232. package/dist/chunks/cli-1.0.13-wmc6ft2f.mjs +6 -0
  233. package/dist/chunks/cli-1.0.13-wrcxv50n.mjs +2 -0
  234. package/dist/chunks/cli-1.0.13-wsk4823v.mjs +2 -0
  235. package/dist/chunks/cli-1.0.13-x4xwa6y3.mjs +4 -0
  236. package/dist/chunks/cli-1.0.13-x8j9z15q.mjs +3 -0
  237. package/dist/chunks/cli-1.0.13-xajnmhak.mjs +2 -0
  238. package/dist/chunks/cli-1.0.13-xg86t5j7.mjs +2 -0
  239. package/dist/chunks/cli-1.0.13-xpc2m6vc.mjs +2 -0
  240. package/dist/chunks/cli-1.0.13-xr55511t.mjs +2 -0
  241. package/dist/chunks/cli-1.0.13-xsvz53d6.mjs +42 -0
  242. package/dist/chunks/cli-1.0.13-y1kzayxj.mjs +18 -0
  243. package/dist/chunks/cli-1.0.13-y20sjx5k.mjs +6 -0
  244. package/dist/chunks/cli-1.0.13-y6y32j2s.mjs +2 -0
  245. package/dist/chunks/cli-1.0.13-y74xv34r.mjs +4 -0
  246. package/dist/chunks/cli-1.0.13-yb1smx77.mjs +2 -0
  247. package/dist/chunks/cli-1.0.13-ymvtrfgn.mjs +4 -0
  248. package/dist/chunks/cli-1.0.13-yq7961x3.mjs +4 -0
  249. package/dist/chunks/cli-1.0.13-yr590qbp.mjs +3 -0
  250. package/dist/chunks/cli-1.0.13-z72v7rwr.mjs +2 -0
  251. package/dist/chunks/cli-1.0.13-z8vs7cc1.mjs +2 -0
  252. package/dist/chunks/cli-1.0.13-zgdatr3s.mjs +3 -0
  253. package/dist/chunks/cli-1.0.13-zmyb9smk.mjs +2 -0
  254. package/dist/chunks/cli-1.0.13-zp9tvwgh.mjs +2 -0
  255. package/dist/chunks/cli-1.0.13-zt4bek0j.mjs +2 -0
  256. package/dist/chunks/cli-1.0.13-ztqnt3qp.mjs +2 -0
  257. package/dist/chunks/cli-1.0.13-zvemnxrj.mjs +2 -0
  258. package/dist/chunks/client-1.0.13-jj0v4n27.mjs +1 -0
  259. package/dist/chunks/color-1.0.13-3v7rvzdv.mjs +1 -0
  260. package/dist/chunks/compact-1.0.13-dbdbjtdk.mjs +3 -0
  261. package/dist/chunks/config-1.0.13-3qrt3cgm.mjs +1 -0
  262. package/dist/chunks/config-1.0.13-r3hkdrhb.mjs +1 -0
  263. package/dist/chunks/constants-1.0.13-rnw6yks8.mjs +1 -0
  264. package/dist/chunks/context-1.0.13-vzh7rmzp.mjs +1 -0
  265. package/dist/chunks/context-noninteractive-1.0.13-pch5w54p.mjs +1 -0
  266. package/dist/chunks/conversation-1.0.13-deetqyn0.mjs +1 -0
  267. package/dist/chunks/copilotHeaders-1.0.13-nt9wrgp5.mjs +1 -0
  268. package/dist/chunks/copy-1.0.13-hzdas7e3.mjs +9 -0
  269. package/dist/chunks/cost-1.0.13-6nzzt5ne.mjs +1 -0
  270. package/dist/chunks/createSSHSession-1.0.13-vy3mcz3k.mjs +1 -0
  271. package/dist/chunks/createSession-1.0.13-9f9eevz2.mjs +1 -0
  272. package/dist/chunks/debug-1.0.13-f3k3n0w9.mjs +1 -0
  273. package/dist/chunks/defaultActionDeps-1.0.13-cnw858jb.mjs +1446 -0
  274. package/dist/chunks/desktop-1.0.13-e005km58.mjs +1 -0
  275. package/dist/chunks/detectRepository-1.0.13-rjbmyf6j.mjs +1 -0
  276. package/dist/chunks/detection-1.0.13-fmg4e9cn.mjs +1 -0
  277. package/dist/chunks/diff-1.0.13-9jypv082.mjs +1 -0
  278. package/dist/chunks/doctor-1.0.13-8tdcwyds.mjs +1 -0
  279. package/dist/chunks/doctorDiagnostic-1.0.13-01b5f1qr.mjs +1 -0
  280. package/dist/chunks/earlyInput-1.0.13-qdaqzn87.mjs +1 -0
  281. package/dist/chunks/effort-1.0.13-xfj9x3jk.mjs +10 -0
  282. package/dist/chunks/engine-1.0.13-8zd1smqp.mjs +1 -0
  283. package/dist/chunks/envLessBridgeConfig-1.0.13-3pv6cjbw.mjs +1 -0
  284. package/dist/chunks/envUtils-1.0.13-vcp6531a.mjs +1 -0
  285. package/dist/chunks/environmentSelection-1.0.13-jeanv46d.mjs +1 -0
  286. package/dist/chunks/environments-1.0.13-w5a33d52.mjs +1 -0
  287. package/dist/chunks/errors-1.0.13-wrs4k863.mjs +1 -0
  288. package/dist/chunks/exampleCommands-1.0.13-f3v5223v.mjs +1 -0
  289. package/dist/chunks/execFileNoThrow-1.0.13-5qgqf50q.mjs +1 -0
  290. package/dist/chunks/exit-1.0.13-dkp2e02s.mjs +1 -0
  291. package/dist/chunks/explorer-1.0.13-0c0437ts.mjs +1 -0
  292. package/dist/chunks/export-1.0.13-cbatvd1c.mjs +2 -0
  293. package/dist/chunks/extra-usage-1.0.13-tm9dn26m.mjs +1 -0
  294. package/dist/chunks/extra-usage-noninteractive-1.0.13-tyfdd6zc.mjs +1 -0
  295. package/dist/chunks/fast-1.0.13-m2jj5axh.mjs +1 -0
  296. package/dist/chunks/feedback-1.0.13-3rc5sphe.mjs +14 -0
  297. package/dist/chunks/firstPartyEventLogger-1.0.13-9cqvyyy3.mjs +1 -0
  298. package/dist/chunks/git-1.0.13-9196pgzv.mjs +1 -0
  299. package/dist/chunks/githubModelsCredentials-1.0.13-h8fyv4hh.mjs +1 -0
  300. package/dist/chunks/goal-1.0.13-cty957vz.mjs +4 -0
  301. package/dist/chunks/grove-1.0.13-jew4jmvf.mjs +1 -0
  302. package/dist/chunks/growthbook-1.0.13-q8xh656p.mjs +1 -0
  303. package/dist/chunks/headless-1.0.13-h0c3ze3f.mjs +2 -0
  304. package/dist/chunks/heapdump-1.0.13-ndzc9093.mjs +6 -0
  305. package/dist/chunks/help-1.0.13-em333cwb.mjs +1 -0
  306. package/dist/chunks/hookChains-1.0.13-ytcm9p3p.mjs +3 -0
  307. package/dist/chunks/hooks-1.0.13-43xm69rv.mjs +79 -0
  308. package/dist/chunks/hooks-1.0.13-xa6gpzvq.mjs +1 -0
  309. package/dist/chunks/ide-1.0.13-4z1afk08.mjs +3 -0
  310. package/dist/chunks/image-processor-napi-1.0.13-e53cs6qw.mjs +1 -0
  311. package/dist/chunks/inboundAttachments-1.0.13-968zpe6v.mjs +1 -0
  312. package/dist/chunks/index-1.0.13-361h9v63.mjs +1 -0
  313. package/dist/chunks/index-1.0.13-4p1eb2pq.mjs +1 -0
  314. package/dist/chunks/index-1.0.13-55th4hhq.mjs +1 -0
  315. package/dist/chunks/index-1.0.13-55vgc9cr.mjs +1 -0
  316. package/dist/chunks/index-1.0.13-5gqy8x3m.mjs +1 -0
  317. package/dist/chunks/index-1.0.13-792fhv61.mjs +1 -0
  318. package/dist/chunks/index-1.0.13-8k0904bs.mjs +1 -0
  319. package/dist/chunks/index-1.0.13-ace8202d.mjs +2 -0
  320. package/dist/chunks/index-1.0.13-e20f9w6f.mjs +1 -0
  321. package/dist/chunks/index-1.0.13-efh2qbe0.mjs +1 -0
  322. package/dist/chunks/index-1.0.13-ej84k860.mjs +1 -0
  323. package/dist/chunks/index-1.0.13-fnd36467.mjs +2 -0
  324. package/dist/chunks/index-1.0.13-hdvj3xyt.mjs +30 -0
  325. package/dist/chunks/index-1.0.13-hgbqf3v1.mjs +1 -0
  326. package/dist/chunks/index-1.0.13-j0146ntq.mjs +1 -0
  327. package/dist/chunks/index-1.0.13-jackh0p4.mjs +17 -0
  328. package/dist/chunks/index-1.0.13-kfmh713v.mjs +9 -0
  329. package/dist/chunks/index-1.0.13-mrvd3mn4.mjs +1 -0
  330. package/dist/chunks/index-1.0.13-rrm8s54m.mjs +1 -0
  331. package/dist/chunks/index-1.0.13-vgmxqgw6.mjs +1 -0
  332. package/dist/chunks/index-1.0.13-xgbfdr5p.mjs +5 -0
  333. package/dist/chunks/index-1.0.13-y5wahjbd.mjs +9 -0
  334. package/dist/chunks/index-1.0.13-ykat42gv.mjs +1 -0
  335. package/dist/chunks/init-1.0.13-pyw980be.mjs +1 -0
  336. package/dist/chunks/initReplBridge-1.0.13-8pye5m3y.mjs +1 -0
  337. package/dist/chunks/ink-1.0.13-4ks3vqg1.mjs +1 -0
  338. package/dist/chunks/insights-1.0.13-8p04qt4e.mjs +870 -0
  339. package/dist/chunks/install-1.0.13-afmkvg4q.mjs +1 -0
  340. package/dist/chunks/install-github-app-1.0.13-nybxp9y9.mjs +149 -0
  341. package/dist/chunks/install-slack-app-1.0.13-ghycqjsr.mjs +1 -0
  342. package/dist/chunks/instrumentation-1.0.13-35rtw7fn.mjs +1 -0
  343. package/dist/chunks/interactiveHelpers-1.0.13-16ydy7kk.mjs +1 -0
  344. package/dist/chunks/keybindings-1.0.13-nt63s9bg.mjs +2 -0
  345. package/dist/chunks/knowledge-1.0.13-g9wcredx.mjs +2 -0
  346. package/dist/chunks/latestVersionCache-1.0.13-783kmyc1.mjs +1 -0
  347. package/dist/chunks/loadAgentsDir-1.0.13-btkcbfn1.mjs +1 -0
  348. package/dist/chunks/loadPluginHooks-1.0.13-6cxg0hz0.mjs +1 -0
  349. package/dist/chunks/loadPluginHooks-1.0.13-tf6npdgj.mjs +1 -0
  350. package/dist/chunks/log-1.0.13-3sscdqcx.mjs +1 -0
  351. package/dist/chunks/main-1.0.13-h958ytkv.mjs +1 -0
  352. package/dist/chunks/managedEnv-1.0.13-kcy78mg2.mjs +1 -0
  353. package/dist/chunks/mcp-1.0.13-gwfzhgtm.mjs +4 -0
  354. package/dist/chunks/mcp-1.0.13-s9hvy6a1.mjs +1 -0
  355. package/dist/chunks/mcp-1.0.13-vathcxfe.mjs +17 -0
  356. package/dist/chunks/mcpb-1.0.13-ynwdmrgy.mjs +1 -0
  357. package/dist/chunks/memory-1.0.13-y5pgdmp0.mjs +72 -0
  358. package/dist/chunks/model-1.0.13-28wkmva5.mjs +2 -0
  359. package/dist/chunks/model-1.0.13-wbne69bf.mjs +1 -0
  360. package/dist/chunks/node-1.0.13-jb6nf3sf.mjs +12 -0
  361. package/dist/chunks/oauth-1.0.13-x9g8753d.mjs +1 -0
  362. package/dist/chunks/openaiShim-1.0.13-dmzfpj84.mjs +14 -0
  363. package/dist/chunks/output-style-1.0.13-dkm9cvhh.mjs +1 -0
  364. package/dist/chunks/package-2VNCXFNY-1.0.13-c2rzk5s5.mjs +1 -0
  365. package/dist/chunks/parseConnectUrl-1.0.13-drfxxfbm.mjs +1 -0
  366. package/dist/chunks/parser-1.0.13-2a4gxkj4.mjs +1 -0
  367. package/dist/chunks/passes-1.0.13-xe1s3afm.mjs +1 -0
  368. package/dist/chunks/permissions-1.0.13-091a123r.mjs +1 -0
  369. package/dist/chunks/permissions-1.0.13-de2kak1c.mjs +3 -0
  370. package/dist/chunks/plan-1.0.13-nq51yj1w.mjs +1 -0
  371. package/dist/chunks/plist-1.0.13-9jnyqg5e.mjs +1 -0
  372. package/dist/chunks/plugin-1.0.13-ravfdrab.mjs +29 -0
  373. package/dist/chunks/pluginStartupCheck-1.0.13-bpnvrbf5.mjs +1 -0
  374. package/dist/chunks/plugins-1.0.13-2g0zcvmn.mjs +9 -0
  375. package/dist/chunks/preActionHook-1.0.13-sh1garss.mjs +2 -0
  376. package/dist/chunks/print-1.0.13-fbmdzf5h.mjs +57 -0
  377. package/dist/chunks/privacy-settings-1.0.13-xmggzdjb.mjs +1 -0
  378. package/dist/chunks/process-1.0.13-yvqmferw.mjs +1 -0
  379. package/dist/chunks/processBashCommand-1.0.13-vymx613b.mjs +1 -0
  380. package/dist/chunks/processSlashCommand-1.0.13-t2b59q54.mjs +9 -0
  381. package/dist/chunks/prompt-1.0.13-5rf0rmyz.mjs +1 -0
  382. package/dist/chunks/prompt-1.0.13-z2a6q0v3.mjs +1 -0
  383. package/dist/chunks/prompts-1.0.13-xntc8d09.mjs +1 -0
  384. package/dist/chunks/protocolHandler-1.0.13-c5pks46d.mjs +13 -0
  385. package/dist/chunks/provider-1.0.13-zfgjs99b.mjs +2 -0
  386. package/dist/chunks/providerProfiles-1.0.13-rk6z9ker.mjs +1 -0
  387. package/dist/chunks/providerValidation-1.0.13-w8m526k7.mjs +6 -0
  388. package/dist/chunks/rate-limit-options-1.0.13-2a7ezwjq.mjs +1 -0
  389. package/dist/chunks/registerSubcommands-1.0.13-fdj1d2vn.mjs +34 -0
  390. package/dist/chunks/registry-1.0.13-p4zgn33y.mjs +1 -0
  391. package/dist/chunks/release-notes-1.0.13-pgzcje06.mjs +5 -0
  392. package/dist/chunks/reload-plugins-1.0.13-6chpnefr.mjs +2 -0
  393. package/dist/chunks/remote-env-1.0.13-j1xk0q03.mjs +1 -0
  394. package/dist/chunks/remoteBridgeCore-1.0.13-ffh4q93x.mjs +1 -0
  395. package/dist/chunks/remoteSession-1.0.13-h715mcc6.mjs +1 -0
  396. package/dist/chunks/rename-1.0.13-x7fma5b1.mjs +1 -0
  397. package/dist/chunks/replBridgeHandle-1.0.13-d1r6xsjs.mjs +1 -0
  398. package/dist/chunks/replLauncher-1.0.13-bhshyrk2.mjs +1 -0
  399. package/dist/chunks/resume-1.0.13-g7w8k889.mjs +2 -0
  400. package/dist/chunks/rewind-1.0.13-9wf9gqtz.mjs +1 -0
  401. package/dist/chunks/rootOptions-1.0.13-7y485878.mjs +1 -0
  402. package/dist/chunks/runWorkflowHeadless-1.0.13-rv0anxz7.mjs +10 -0
  403. package/dist/chunks/sandbox-adapter-1.0.13-kvcvaae5.mjs +1 -0
  404. package/dist/chunks/sandbox-toggle-1.0.13-gzeexqb1.mjs +1 -0
  405. package/dist/chunks/session-1.0.13-hyhbhvkf.mjs +2 -0
  406. package/dist/chunks/sessionDiscovery-1.0.13-525ff4qc.mjs +1 -0
  407. package/dist/chunks/sessionFileAccessHooks-1.0.13-52whtstc.mjs +1 -0
  408. package/dist/chunks/sessionStorage-1.0.13-r00sygqv.mjs +1 -0
  409. package/dist/chunks/settings-1.0.13-sm1hpt00.mjs +1 -0
  410. package/dist/chunks/setup-1.0.13-7y88y2kn.mjs +5 -0
  411. package/dist/chunks/sinks-1.0.13-4g18qqzg.mjs +1 -0
  412. package/dist/chunks/skills-1.0.13-cpct3g7k.mjs +1 -0
  413. package/dist/chunks/startupProfiler-1.0.13-x0k3gz44.mjs +1 -0
  414. package/dist/chunks/startupUpdateCheck-1.0.13-n4bzta5q.mjs +1 -0
  415. package/dist/chunks/state-1.0.13-zq29wtdm.mjs +1 -0
  416. package/dist/chunks/stats-1.0.13-q0gfz40a.mjs +6 -0
  417. package/dist/chunks/status-1.0.13-t69r10gd.mjs +1 -0
  418. package/dist/chunks/stickers-1.0.13-1vnk8fs0.mjs +1 -0
  419. package/dist/chunks/subprocessEnv-1.0.13-1qaxx1mm.mjs +1 -0
  420. package/dist/chunks/tasks-1.0.13-xbf05jds.mjs +1 -0
  421. package/dist/chunks/teamHelpers-1.0.13-ajaffjmv.mjs +1 -0
  422. package/dist/chunks/teammateModeSnapshot-1.0.13-0se6apnj.mjs +1 -0
  423. package/dist/chunks/teleport-1.0.13-fy5929dz.mjs +1 -0
  424. package/dist/chunks/terminalSetup-1.0.13-6vb6xv4h.mjs +1 -0
  425. package/dist/chunks/theme-1.0.13-qh1caywb.mjs +1 -0
  426. package/dist/chunks/thinkback-1.0.13-yxqc5snt.mjs +1 -0
  427. package/dist/chunks/thinkback-play-1.0.13-4zdbm8qa.mjs +1 -0
  428. package/dist/chunks/toolPool-1.0.13-p41w5yd3.mjs +1 -0
  429. package/dist/chunks/toolSearch-1.0.13-4behydd7.mjs +1 -0
  430. package/dist/chunks/tools-1.0.13-vkf5gwtw.mjs +1 -0
  431. package/dist/chunks/trustedDevice-1.0.13-zafdrn99.mjs +1 -0
  432. package/dist/chunks/turndown.cjs-1.0.13-jyfkbj9m.mjs +69 -0
  433. package/dist/chunks/types-1.0.13-7xc46cqv.mjs +1 -0
  434. package/dist/chunks/ultrareviewCommand-1.0.13-3bz6pfy0.mjs +4 -0
  435. package/dist/chunks/update-1.0.13-yevsj7ad.mjs +88 -0
  436. package/dist/chunks/upgrade-1.0.13-exvdsfcj.mjs +1 -0
  437. package/dist/chunks/upload-1.0.13-hnnrtgrv.mjs +7 -0
  438. package/dist/chunks/upstreamproxy-1.0.13-qgbvmb0r.mjs +14 -0
  439. package/dist/chunks/url-handler-napi-1.0.13-7wjfhqg3.mjs +1 -0
  440. package/dist/chunks/usage-1.0.13-jvdr40ma.mjs +1 -0
  441. package/dist/chunks/util-1.0.13-87gxb90q.mjs +1 -0
  442. package/dist/chunks/utils-1.0.13-c5pe460e.mjs +1 -0
  443. package/dist/chunks/vim-1.0.13-nkrbsse9.mjs +1 -0
  444. package/dist/chunks/watchLoop-1.0.13-922mtars.mjs +13 -0
  445. package/dist/chunks/watcher-1.0.13-pt4sgafn.mjs +1 -0
  446. package/dist/chunks/wiki-1.0.13-swp7dc6p.mjs +132 -0
  447. package/dist/chunks/workflows-1.0.13-ykfca04r.mjs +1 -0
  448. package/dist/chunks/worktree-1.0.13-9m47x8ty.mjs +1 -0
  449. package/dist/chunks/worktreeModeEnabled-1.0.13-3jrpyzfm.mjs +1 -0
  450. package/dist/chunks/wrapper-1.0.13-2myaas4p.mjs +7 -0
  451. package/dist/cli.mjs +2 -2
  452. package/package.json +9 -9
  453. package/dist/chunks/AgentTool-1.0.12-abyv62fr.mjs +0 -1
  454. package/dist/chunks/App-1.0.12-dn7sszp8.mjs +0 -1
  455. package/dist/chunks/ApproveApiKey-1.0.12-vx8944sv.mjs +0 -1
  456. package/dist/chunks/AssistantSessionChooser-1.0.12-ke187zyp.mjs +0 -1
  457. package/dist/chunks/AutoModeOptInDialog-1.0.12-4evyjnv0.mjs +0 -1
  458. package/dist/chunks/BypassPermissionsModeDialog-1.0.12-d9mwxc90.mjs +0 -1
  459. package/dist/chunks/ClaudeMdExternalIncludesDialog-1.0.12-3jmx6cgy.mjs +0 -1
  460. package/dist/chunks/ConsoleOAuthFlow-1.0.12-3kmzdqzg.mjs +0 -1
  461. package/dist/chunks/DiffDialog-1.0.12-qj1xvjhw.mjs +0 -7
  462. package/dist/chunks/Doctor-1.0.12-51vy6wdx.mjs +0 -1
  463. package/dist/chunks/ExplorerDialog-1.0.12-96frvk0f.mjs +0 -6
  464. package/dist/chunks/Grove-1.0.12-56863ex7.mjs +0 -1
  465. package/dist/chunks/ITermBackend-1.0.12-r6mxvzaa.mjs +0 -1
  466. package/dist/chunks/InvalidConfigDialog-1.0.12-79dad11d.mjs +0 -1
  467. package/dist/chunks/InvalidSettingsDialog-1.0.12-stz0gsem.mjs +0 -1
  468. package/dist/chunks/MigrationDialog-1.0.12-zyd4mdh4.mjs +0 -1
  469. package/dist/chunks/Onboarding-1.0.12-zbfxpy94.mjs +0 -1
  470. package/dist/chunks/ProviderManager-1.0.12-p8zk25w6.mjs +0 -1
  471. package/dist/chunks/REPL-1.0.12-fqnth064.mjs +0 -1
  472. package/dist/chunks/ResumeConversation-1.0.12-0qfj43z7.mjs +0 -1
  473. package/dist/chunks/SnapshotUpdateDialog-1.0.12-bnjcb979.mjs +0 -1
  474. package/dist/chunks/TeleportProgress-1.0.12-c6fa4qje.mjs +0 -1
  475. package/dist/chunks/TeleportRepoMismatchDialog-1.0.12-ycm47j1m.mjs +0 -1
  476. package/dist/chunks/TeleportResumeWrapper-1.0.12-9rp6hs4x.mjs +0 -1
  477. package/dist/chunks/TmuxBackend-1.0.12-41jckn7c.mjs +0 -9
  478. package/dist/chunks/ToolSearchTool-1.0.12-c9n0hbpv.mjs +0 -1
  479. package/dist/chunks/TrustDialog-1.0.12-7fnas2qv.mjs +0 -1
  480. package/dist/chunks/activeProvider-1.0.12-gv2mp6kz.mjs +0 -1
  481. package/dist/chunks/add-dir-1.0.12-fpqr5x3k.mjs +0 -1
  482. package/dist/chunks/agentTypes-1.0.12-vrw22nhr.mjs +0 -1
  483. package/dist/chunks/agents-1.0.12-b7qmsh41.mjs +0 -3
  484. package/dist/chunks/agents-1.0.12-swx0yj99.mjs +0 -110
  485. package/dist/chunks/api-1.0.12-7ekn0cc8.mjs +0 -1
  486. package/dist/chunks/asciicast-1.0.12-bwarrcwq.mjs +0 -1
  487. package/dist/chunks/assistant-1.0.12-85mxf1m6.mjs +0 -1
  488. package/dist/chunks/auth-1.0.12-cefhne6z.mjs +0 -1
  489. package/dist/chunks/auth-1.0.12-snebfssk.mjs +0 -1
  490. package/dist/chunks/autoMode-1.0.12-9n08nqfk.mjs +0 -48
  491. package/dist/chunks/autoUpdater-1.0.12-h50vcbqf.mjs +0 -1
  492. package/dist/chunks/backgroundHousekeeping-1.0.12-tdh1q45w.mjs +0 -1
  493. package/dist/chunks/branch-1.0.12-863hng5d.mjs +0 -4
  494. package/dist/chunks/bridge-1.0.12-a5nw09de.mjs +0 -2
  495. package/dist/chunks/bridgeConfig-1.0.12-x66p8c5q.mjs +0 -1
  496. package/dist/chunks/bridgeEnabled-1.0.12-0wztb1hd.mjs +0 -1
  497. package/dist/chunks/bridgeMain-1.0.12-038n798h.mjs +0 -88
  498. package/dist/chunks/bridgePointer-1.0.12-9sjcxc3h.mjs +0 -1
  499. package/dist/chunks/btw-1.0.12-k26an2yc.mjs +0 -1
  500. package/dist/chunks/buddy-1.0.12-fpfpe288.mjs +0 -3
  501. package/dist/chunks/cacache-1.0.12-tee370hf.mjs +0 -1
  502. package/dist/chunks/cache-probe-1.0.12-ch8554yv.mjs +0 -21
  503. package/dist/chunks/cacheStats-1.0.12-9e5dx6pf.mjs +0 -4
  504. package/dist/chunks/caches-1.0.12-40h57pd6.mjs +0 -1
  505. package/dist/chunks/claudeDesktop-1.0.12-9cxdymhn.mjs +0 -1
  506. package/dist/chunks/claudemd-1.0.12-9dezcbgf.mjs +0 -1
  507. package/dist/chunks/clear-1.0.12-rhwxvjx8.mjs +0 -1
  508. package/dist/chunks/clearTerminal-1.0.12-33ecg1d7.mjs +0 -1
  509. package/dist/chunks/cli-1.0.12-05z376bz.mjs +0 -2
  510. package/dist/chunks/cli-1.0.12-0hs0n73e.mjs +0 -2
  511. package/dist/chunks/cli-1.0.12-0smh9wwk.mjs +0 -2
  512. package/dist/chunks/cli-1.0.12-0ttcqcck.mjs +0 -133
  513. package/dist/chunks/cli-1.0.12-18q23t16.mjs +0 -2
  514. package/dist/chunks/cli-1.0.12-1bcrzsgk.mjs +0 -45
  515. package/dist/chunks/cli-1.0.12-1cr9ram8.mjs +0 -21
  516. package/dist/chunks/cli-1.0.12-1dt50yfn.mjs +0 -4
  517. package/dist/chunks/cli-1.0.12-1n68xsye.mjs +0 -2
  518. package/dist/chunks/cli-1.0.12-1qc9gpzw.mjs +0 -12
  519. package/dist/chunks/cli-1.0.12-21c23686.mjs +0 -9
  520. package/dist/chunks/cli-1.0.12-22gbc57h.mjs +0 -2
  521. package/dist/chunks/cli-1.0.12-27qnbw76.mjs +0 -2
  522. package/dist/chunks/cli-1.0.12-2kt5mqgg.mjs +0 -2
  523. package/dist/chunks/cli-1.0.12-2nmjd3nj.mjs +0 -2
  524. package/dist/chunks/cli-1.0.12-2yt4jp97.mjs +0 -2
  525. package/dist/chunks/cli-1.0.12-321h968k.mjs +0 -2
  526. package/dist/chunks/cli-1.0.12-352e65vc.mjs +0 -2
  527. package/dist/chunks/cli-1.0.12-37c8ygq5.mjs +0 -6
  528. package/dist/chunks/cli-1.0.12-3fnggb5b.mjs +0 -133
  529. package/dist/chunks/cli-1.0.12-3n5xx9qt.mjs +0 -18
  530. package/dist/chunks/cli-1.0.12-3ncccq9x.mjs +0 -2
  531. package/dist/chunks/cli-1.0.12-3pn1zvqm.mjs +0 -2
  532. package/dist/chunks/cli-1.0.12-3r1201w4.mjs +0 -2
  533. package/dist/chunks/cli-1.0.12-3ya2dc5e.mjs +0 -2
  534. package/dist/chunks/cli-1.0.12-4hwr3sdf.mjs +0 -2
  535. package/dist/chunks/cli-1.0.12-4p7v89wr.mjs +0 -2
  536. package/dist/chunks/cli-1.0.12-57gs15yp.mjs +0 -18
  537. package/dist/chunks/cli-1.0.12-5efdpv3j.mjs +0 -2
  538. package/dist/chunks/cli-1.0.12-5sztdycm.mjs +0 -2
  539. package/dist/chunks/cli-1.0.12-65451rqd.mjs +0 -6
  540. package/dist/chunks/cli-1.0.12-67258wf2.mjs +0 -2
  541. package/dist/chunks/cli-1.0.12-6a3h6ptq.mjs +0 -2
  542. package/dist/chunks/cli-1.0.12-6p5xq1zz.mjs +0 -2
  543. package/dist/chunks/cli-1.0.12-6r2ap1g8.mjs +0 -4
  544. package/dist/chunks/cli-1.0.12-6rebetxb.mjs +0 -2
  545. package/dist/chunks/cli-1.0.12-6s4gq7fa.mjs +0 -2
  546. package/dist/chunks/cli-1.0.12-6tg9g6jd.mjs +0 -18
  547. package/dist/chunks/cli-1.0.12-76954fs2.mjs +0 -2
  548. package/dist/chunks/cli-1.0.12-769ev05r.mjs +0 -2
  549. package/dist/chunks/cli-1.0.12-7gt5bvcm.mjs +0 -16
  550. package/dist/chunks/cli-1.0.12-7ptw0hek.mjs +0 -3
  551. package/dist/chunks/cli-1.0.12-7tv5r0ph.mjs +0 -2
  552. package/dist/chunks/cli-1.0.12-7yabvp9r.mjs +0 -2
  553. package/dist/chunks/cli-1.0.12-7ynhsc1z.mjs +0 -4
  554. package/dist/chunks/cli-1.0.12-824tangf.mjs +0 -2
  555. package/dist/chunks/cli-1.0.12-86r9ty21.mjs +0 -5
  556. package/dist/chunks/cli-1.0.12-8751mzfs.mjs +0 -2
  557. package/dist/chunks/cli-1.0.12-87hs2fpz.mjs +0 -2
  558. package/dist/chunks/cli-1.0.12-88jecwwk.mjs +0 -2
  559. package/dist/chunks/cli-1.0.12-8neq4sr4.mjs +0 -2
  560. package/dist/chunks/cli-1.0.12-8ntn3ny6.mjs +0 -3
  561. package/dist/chunks/cli-1.0.12-8vjn5tt5.mjs +0 -2
  562. package/dist/chunks/cli-1.0.12-939eqyt0.mjs +0 -2
  563. package/dist/chunks/cli-1.0.12-93c97gc0.mjs +0 -7
  564. package/dist/chunks/cli-1.0.12-9xrez673.mjs +0 -6
  565. package/dist/chunks/cli-1.0.12-a3wknc82.mjs +0 -3
  566. package/dist/chunks/cli-1.0.12-a761j1gv.mjs +0 -2
  567. package/dist/chunks/cli-1.0.12-afqp6ccg.mjs +0 -5
  568. package/dist/chunks/cli-1.0.12-anfbb1k6.mjs +0 -199
  569. package/dist/chunks/cli-1.0.12-aqhk0pnq.mjs +0 -2
  570. package/dist/chunks/cli-1.0.12-aqvexw12.mjs +0 -4
  571. package/dist/chunks/cli-1.0.12-ar5q5p8k.mjs +0 -3
  572. package/dist/chunks/cli-1.0.12-arptj6sc.mjs +0 -2
  573. package/dist/chunks/cli-1.0.12-asf0zhhk.mjs +0 -2
  574. package/dist/chunks/cli-1.0.12-aswy8n6q.mjs +0 -2
  575. package/dist/chunks/cli-1.0.12-b0xdgvm3.mjs +0 -2
  576. package/dist/chunks/cli-1.0.12-b2kkbfqv.mjs +0 -2
  577. package/dist/chunks/cli-1.0.12-b54efth7.mjs +0 -3
  578. package/dist/chunks/cli-1.0.12-b55xwv7c.mjs +0 -12
  579. package/dist/chunks/cli-1.0.12-bavasn2m.mjs +0 -2
  580. package/dist/chunks/cli-1.0.12-bhvkmj7j.mjs +0 -2
  581. package/dist/chunks/cli-1.0.12-bphdbsee.mjs +0 -20
  582. package/dist/chunks/cli-1.0.12-bwhry5d9.mjs +0 -2
  583. package/dist/chunks/cli-1.0.12-bxrzeqxy.mjs +0 -2
  584. package/dist/chunks/cli-1.0.12-c3r1a6g5.mjs +0 -24
  585. package/dist/chunks/cli-1.0.12-c8eswgza.mjs +0 -2
  586. package/dist/chunks/cli-1.0.12-cdv6sj7q.mjs +0 -2
  587. package/dist/chunks/cli-1.0.12-ce2kb4jz.mjs +0 -2
  588. package/dist/chunks/cli-1.0.12-ce5a5631.mjs +0 -4
  589. package/dist/chunks/cli-1.0.12-cg6zadcf.mjs +0 -2
  590. package/dist/chunks/cli-1.0.12-ckpmw81j.mjs +0 -2
  591. package/dist/chunks/cli-1.0.12-crspnn4b.mjs +0 -6
  592. package/dist/chunks/cli-1.0.12-cveh4gy6.mjs +0 -34
  593. package/dist/chunks/cli-1.0.12-dcw582gx.mjs +0 -15
  594. package/dist/chunks/cli-1.0.12-ehp5ev2y.mjs +0 -2
  595. package/dist/chunks/cli-1.0.12-eptxz5fr.mjs +0 -2
  596. package/dist/chunks/cli-1.0.12-ets3kmf3.mjs +0 -2
  597. package/dist/chunks/cli-1.0.12-ev21p7g7.mjs +0 -1
  598. package/dist/chunks/cli-1.0.12-evtxsq88.mjs +0 -2
  599. package/dist/chunks/cli-1.0.12-f7s9vrvb.mjs +0 -2
  600. package/dist/chunks/cli-1.0.12-fc7czhyd.mjs +0 -2
  601. package/dist/chunks/cli-1.0.12-fr4x7p5q.mjs +0 -3
  602. package/dist/chunks/cli-1.0.12-fs27jw81.mjs +0 -59
  603. package/dist/chunks/cli-1.0.12-fs365rj0.mjs +0 -2
  604. package/dist/chunks/cli-1.0.12-fsgbmjzn.mjs +0 -2
  605. package/dist/chunks/cli-1.0.12-fttry6vt.mjs +0 -2
  606. package/dist/chunks/cli-1.0.12-g2qcnx8m.mjs +0 -2
  607. package/dist/chunks/cli-1.0.12-g2qsv3tc.mjs +0 -5494
  608. package/dist/chunks/cli-1.0.12-g6jjrjcj.mjs +0 -2
  609. package/dist/chunks/cli-1.0.12-gajn1gbg.mjs +0 -2
  610. package/dist/chunks/cli-1.0.12-gctwj61k.mjs +0 -4
  611. package/dist/chunks/cli-1.0.12-gd18f7hm.mjs +0 -2
  612. package/dist/chunks/cli-1.0.12-gden9vt3.mjs +0 -2
  613. package/dist/chunks/cli-1.0.12-gdjkhny3.mjs +0 -2
  614. package/dist/chunks/cli-1.0.12-geffmp8p.mjs +0 -2
  615. package/dist/chunks/cli-1.0.12-ggdecys5.mjs +0 -2
  616. package/dist/chunks/cli-1.0.12-gnjqhx0t.mjs +0 -3
  617. package/dist/chunks/cli-1.0.12-gvpmx85m.mjs +0 -58
  618. package/dist/chunks/cli-1.0.12-gz6fyqwk.mjs +0 -39
  619. package/dist/chunks/cli-1.0.12-gzdht3by.mjs +0 -2
  620. package/dist/chunks/cli-1.0.12-hcw51twk.mjs +0 -2
  621. package/dist/chunks/cli-1.0.12-hfjvcc88.mjs +0 -2
  622. package/dist/chunks/cli-1.0.12-hg7zn647.mjs +0 -2
  623. package/dist/chunks/cli-1.0.12-hhbfs4k4.mjs +0 -6
  624. package/dist/chunks/cli-1.0.12-hhr93g23.mjs +0 -2
  625. package/dist/chunks/cli-1.0.12-hkmqbg09.mjs +0 -2
  626. package/dist/chunks/cli-1.0.12-hqfw51ap.mjs +0 -4
  627. package/dist/chunks/cli-1.0.12-hs1b7q69.mjs +0 -2
  628. package/dist/chunks/cli-1.0.12-hxmg9ymn.mjs +0 -67
  629. package/dist/chunks/cli-1.0.12-j6jbtppw.mjs +0 -50
  630. package/dist/chunks/cli-1.0.12-jcpeegj0.mjs +0 -2
  631. package/dist/chunks/cli-1.0.12-jfhjds03.mjs +0 -2
  632. package/dist/chunks/cli-1.0.12-jfsy9ha5.mjs +0 -2
  633. package/dist/chunks/cli-1.0.12-jk3cz5bk.mjs +0 -2
  634. package/dist/chunks/cli-1.0.12-jv9bdyr3.mjs +0 -4
  635. package/dist/chunks/cli-1.0.12-jx132j1k.mjs +0 -25
  636. package/dist/chunks/cli-1.0.12-k1be9914.mjs +0 -12
  637. package/dist/chunks/cli-1.0.12-kamdx1jw.mjs +0 -2
  638. package/dist/chunks/cli-1.0.12-krksdpwy.mjs +0 -2
  639. package/dist/chunks/cli-1.0.12-krtzqxr0.mjs +0 -2
  640. package/dist/chunks/cli-1.0.12-kvbcb0np.mjs +0 -2
  641. package/dist/chunks/cli-1.0.12-kyxqyb1j.mjs +0 -2
  642. package/dist/chunks/cli-1.0.12-m46zb45g.mjs +0 -2
  643. package/dist/chunks/cli-1.0.12-m4ayadmp.mjs +0 -12
  644. package/dist/chunks/cli-1.0.12-mg5ma9ym.mjs +0 -15
  645. package/dist/chunks/cli-1.0.12-mx2xvdp9.mjs +0 -2
  646. package/dist/chunks/cli-1.0.12-n1m3pwwf.mjs +0 -2
  647. package/dist/chunks/cli-1.0.12-nanfnkp2.mjs +0 -2
  648. package/dist/chunks/cli-1.0.12-nn3vf2hn.mjs +0 -2
  649. package/dist/chunks/cli-1.0.12-nqhqcsq6.mjs +0 -2
  650. package/dist/chunks/cli-1.0.12-nvvpna9m.mjs +0 -3
  651. package/dist/chunks/cli-1.0.12-p4ezzhhd.mjs +0 -8
  652. package/dist/chunks/cli-1.0.12-pp2g923k.mjs +0 -2
  653. package/dist/chunks/cli-1.0.12-pp47fwxq.mjs +0 -2
  654. package/dist/chunks/cli-1.0.12-pr30kcgz.mjs +0 -2
  655. package/dist/chunks/cli-1.0.12-q0r16q04.mjs +0 -2
  656. package/dist/chunks/cli-1.0.12-q5pm96yt.mjs +0 -2
  657. package/dist/chunks/cli-1.0.12-q6d6aqp0.mjs +0 -2
  658. package/dist/chunks/cli-1.0.12-q6k5vz5c.mjs +0 -15
  659. package/dist/chunks/cli-1.0.12-qawr9s3v.mjs +0 -2
  660. package/dist/chunks/cli-1.0.12-qdw94y1a.mjs +0 -2
  661. package/dist/chunks/cli-1.0.12-r0h1nfgc.mjs +0 -2
  662. package/dist/chunks/cli-1.0.12-r5xssak6.mjs +0 -3
  663. package/dist/chunks/cli-1.0.12-rkm9m5nr.mjs +0 -4
  664. package/dist/chunks/cli-1.0.12-rndzs6hs.mjs +0 -3
  665. package/dist/chunks/cli-1.0.12-rx65fdkz.mjs +0 -2
  666. package/dist/chunks/cli-1.0.12-s5nznhbh.mjs +0 -3
  667. package/dist/chunks/cli-1.0.12-s6we79nr.mjs +0 -17
  668. package/dist/chunks/cli-1.0.12-samztxet.mjs +0 -2
  669. package/dist/chunks/cli-1.0.12-sav2q0qa.mjs +0 -42
  670. package/dist/chunks/cli-1.0.12-t40ecqfd.mjs +0 -2
  671. package/dist/chunks/cli-1.0.12-tj9ktjsh.mjs +0 -24
  672. package/dist/chunks/cli-1.0.12-tj9rj5jy.mjs +0 -2
  673. package/dist/chunks/cli-1.0.12-tjbtefn3.mjs +0 -2
  674. package/dist/chunks/cli-1.0.12-trd4dn34.mjs +0 -2
  675. package/dist/chunks/cli-1.0.12-tv0c63rt.mjs +0 -2
  676. package/dist/chunks/cli-1.0.12-tz4cb805.mjs +0 -2
  677. package/dist/chunks/cli-1.0.12-v4dwzr3x.mjs +0 -17
  678. package/dist/chunks/cli-1.0.12-vaj96q9j.mjs +0 -2
  679. package/dist/chunks/cli-1.0.12-vr2x1cvb.mjs +0 -2
  680. package/dist/chunks/cli-1.0.12-w1kw41q7.mjs +0 -2
  681. package/dist/chunks/cli-1.0.12-w7rfasq3.mjs +0 -9
  682. package/dist/chunks/cli-1.0.12-w8y086m4.mjs +0 -25
  683. package/dist/chunks/cli-1.0.12-wex4dg02.mjs +0 -4
  684. package/dist/chunks/cli-1.0.12-wg1cqvtp.mjs +0 -2
  685. package/dist/chunks/cli-1.0.12-wjsws708.mjs +0 -2
  686. package/dist/chunks/cli-1.0.12-wk1q0n53.mjs +0 -2
  687. package/dist/chunks/cli-1.0.12-wrzpekwj.mjs +0 -2
  688. package/dist/chunks/cli-1.0.12-wvndtz51.mjs +0 -24
  689. package/dist/chunks/cli-1.0.12-wz7n2nsd.mjs +0 -2
  690. package/dist/chunks/cli-1.0.12-x10h3tbg.mjs +0 -2
  691. package/dist/chunks/cli-1.0.12-x4ep25h9.mjs +0 -4
  692. package/dist/chunks/cli-1.0.12-xkytf9yh.mjs +0 -2
  693. package/dist/chunks/cli-1.0.12-xttdsx6k.mjs +0 -2
  694. package/dist/chunks/cli-1.0.12-y1c7c1a1.mjs +0 -2
  695. package/dist/chunks/cli-1.0.12-y84rjfz7.mjs +0 -2
  696. package/dist/chunks/cli-1.0.12-yhv467zj.mjs +0 -2
  697. package/dist/chunks/cli-1.0.12-ynve21xv.mjs +0 -2
  698. package/dist/chunks/cli-1.0.12-ys1t2bxz.mjs +0 -2
  699. package/dist/chunks/cli-1.0.12-yxtwvta2.mjs +0 -2
  700. package/dist/chunks/cli-1.0.12-z3a8jcm9.mjs +0 -3
  701. package/dist/chunks/cli-1.0.12-z3c340m4.mjs +0 -2
  702. package/dist/chunks/cli-1.0.12-z623f1kc.mjs +0 -2
  703. package/dist/chunks/cli-1.0.12-z9h568zf.mjs +0 -2
  704. package/dist/chunks/cli-1.0.12-z9sfhfkz.mjs +0 -2
  705. package/dist/chunks/cli-1.0.12-zeamr7yd.mjs +0 -2
  706. package/dist/chunks/cli-1.0.12-zeyjdjny.mjs +0 -2
  707. package/dist/chunks/cli-1.0.12-zfc8ad9g.mjs +0 -2
  708. package/dist/chunks/cli-1.0.12-zh892bg0.mjs +0 -2
  709. package/dist/chunks/cli-1.0.12-zjxsxtgp.mjs +0 -2
  710. package/dist/chunks/client-1.0.12-byhwssfy.mjs +0 -1
  711. package/dist/chunks/color-1.0.12-r9qemzca.mjs +0 -1
  712. package/dist/chunks/compact-1.0.12-e026vahr.mjs +0 -3
  713. package/dist/chunks/config-1.0.12-bzczt66c.mjs +0 -1
  714. package/dist/chunks/config-1.0.12-spq7sz3g.mjs +0 -1
  715. package/dist/chunks/constants-1.0.12-wfre6b4q.mjs +0 -1
  716. package/dist/chunks/context-1.0.12-062jh3t1.mjs +0 -1
  717. package/dist/chunks/context-noninteractive-1.0.12-2a33mwts.mjs +0 -1
  718. package/dist/chunks/conversation-1.0.12-84yx1v9g.mjs +0 -1
  719. package/dist/chunks/copilotHeaders-1.0.12-9p7nbsej.mjs +0 -1
  720. package/dist/chunks/copy-1.0.12-p0ehh4km.mjs +0 -9
  721. package/dist/chunks/cost-1.0.12-rp0mbkmr.mjs +0 -1
  722. package/dist/chunks/createSSHSession-1.0.12-wxq374vh.mjs +0 -1
  723. package/dist/chunks/createSession-1.0.12-1xvzax9p.mjs +0 -1
  724. package/dist/chunks/debug-1.0.12-94hz3csj.mjs +0 -1
  725. package/dist/chunks/defaultActionDeps-1.0.12-xampkk9g.mjs +0 -1446
  726. package/dist/chunks/desktop-1.0.12-sjnz496g.mjs +0 -1
  727. package/dist/chunks/detectRepository-1.0.12-ba7p74yk.mjs +0 -1
  728. package/dist/chunks/detection-1.0.12-a5q568s6.mjs +0 -1
  729. package/dist/chunks/diff-1.0.12-ndfx6mw0.mjs +0 -1
  730. package/dist/chunks/doctor-1.0.12-n0w9na8y.mjs +0 -1
  731. package/dist/chunks/doctorDiagnostic-1.0.12-9s7nqv0g.mjs +0 -1
  732. package/dist/chunks/earlyInput-1.0.12-zysskqm6.mjs +0 -1
  733. package/dist/chunks/effort-1.0.12-fv5hhe7x.mjs +0 -10
  734. package/dist/chunks/engine-1.0.12-h8g4mgyb.mjs +0 -1
  735. package/dist/chunks/envLessBridgeConfig-1.0.12-dgzmkpm2.mjs +0 -1
  736. package/dist/chunks/envUtils-1.0.12-sdf1kcja.mjs +0 -1
  737. package/dist/chunks/environmentSelection-1.0.12-8q9ret6b.mjs +0 -1
  738. package/dist/chunks/environments-1.0.12-a3zhfbhz.mjs +0 -1
  739. package/dist/chunks/errors-1.0.12-ct15bef4.mjs +0 -1
  740. package/dist/chunks/exampleCommands-1.0.12-df1dw74e.mjs +0 -1
  741. package/dist/chunks/execFileNoThrow-1.0.12-xfr44c3a.mjs +0 -1
  742. package/dist/chunks/exit-1.0.12-zvdfr5b8.mjs +0 -1
  743. package/dist/chunks/explorer-1.0.12-6y9xjy1q.mjs +0 -1
  744. package/dist/chunks/export-1.0.12-skd48sxc.mjs +0 -2
  745. package/dist/chunks/extra-usage-1.0.12-xfmqjtpj.mjs +0 -1
  746. package/dist/chunks/extra-usage-noninteractive-1.0.12-t1hm20j5.mjs +0 -1
  747. package/dist/chunks/fast-1.0.12-fhft5ey6.mjs +0 -1
  748. package/dist/chunks/feedback-1.0.12-3nxarzk5.mjs +0 -14
  749. package/dist/chunks/firstPartyEventLogger-1.0.12-wd3zscn0.mjs +0 -1
  750. package/dist/chunks/git-1.0.12-vdgymgzx.mjs +0 -1
  751. package/dist/chunks/githubModelsCredentials-1.0.12-4srnyf9v.mjs +0 -1
  752. package/dist/chunks/goal-1.0.12-h2359pb4.mjs +0 -4
  753. package/dist/chunks/grove-1.0.12-77sjjjn3.mjs +0 -1
  754. package/dist/chunks/growthbook-1.0.12-3n3fqtkt.mjs +0 -1
  755. package/dist/chunks/headless-1.0.12-yp3kbbxc.mjs +0 -2
  756. package/dist/chunks/heapdump-1.0.12-s91zbazj.mjs +0 -6
  757. package/dist/chunks/help-1.0.12-0xjr189z.mjs +0 -1
  758. package/dist/chunks/hookChains-1.0.12-ct9k5n1p.mjs +0 -3
  759. package/dist/chunks/hooks-1.0.12-3j1z9nnx.mjs +0 -79
  760. package/dist/chunks/hooks-1.0.12-70mxcsxh.mjs +0 -1
  761. package/dist/chunks/ide-1.0.12-28njrjbk.mjs +0 -3
  762. package/dist/chunks/image-processor-napi-1.0.12-6wgz5kvw.mjs +0 -1
  763. package/dist/chunks/inboundAttachments-1.0.12-jvjez1dn.mjs +0 -1
  764. package/dist/chunks/index-1.0.12-0da1bb49.mjs +0 -9
  765. package/dist/chunks/index-1.0.12-1e9j7vzg.mjs +0 -5
  766. package/dist/chunks/index-1.0.12-1mdaerd8.mjs +0 -1
  767. package/dist/chunks/index-1.0.12-24pswrth.mjs +0 -1
  768. package/dist/chunks/index-1.0.12-2v2em96v.mjs +0 -2
  769. package/dist/chunks/index-1.0.12-474c1qt4.mjs +0 -1
  770. package/dist/chunks/index-1.0.12-6mn5222v.mjs +0 -1
  771. package/dist/chunks/index-1.0.12-742qmav9.mjs +0 -1
  772. package/dist/chunks/index-1.0.12-7k7nz3zd.mjs +0 -1
  773. package/dist/chunks/index-1.0.12-9j0r9hj8.mjs +0 -1
  774. package/dist/chunks/index-1.0.12-b9j27arj.mjs +0 -1
  775. package/dist/chunks/index-1.0.12-bpttwsys.mjs +0 -9
  776. package/dist/chunks/index-1.0.12-c5e33bnp.mjs +0 -1
  777. package/dist/chunks/index-1.0.12-cqq21e0m.mjs +0 -2
  778. package/dist/chunks/index-1.0.12-cr5bmztw.mjs +0 -1
  779. package/dist/chunks/index-1.0.12-fmffckpa.mjs +0 -1
  780. package/dist/chunks/index-1.0.12-gq7wdwne.mjs +0 -1
  781. package/dist/chunks/index-1.0.12-hdkwtv7r.mjs +0 -30
  782. package/dist/chunks/index-1.0.12-hdncwsmp.mjs +0 -17
  783. package/dist/chunks/index-1.0.12-p087je6g.mjs +0 -1
  784. package/dist/chunks/index-1.0.12-v4fg3ddh.mjs +0 -1
  785. package/dist/chunks/index-1.0.12-vx8y4eyw.mjs +0 -1
  786. package/dist/chunks/index-1.0.12-wbyw0qj6.mjs +0 -1
  787. package/dist/chunks/init-1.0.12-z61mf946.mjs +0 -1
  788. package/dist/chunks/initReplBridge-1.0.12-x85m2bm7.mjs +0 -1
  789. package/dist/chunks/ink-1.0.12-zmy65h90.mjs +0 -1
  790. package/dist/chunks/insights-1.0.12-hmmb2hfq.mjs +0 -870
  791. package/dist/chunks/install-1.0.12-ayp0wk5h.mjs +0 -1
  792. package/dist/chunks/install-github-app-1.0.12-gp77dd3x.mjs +0 -149
  793. package/dist/chunks/install-slack-app-1.0.12-r3sn5vy9.mjs +0 -1
  794. package/dist/chunks/instrumentation-1.0.12-p992hkry.mjs +0 -1
  795. package/dist/chunks/interactiveHelpers-1.0.12-bpa40yg2.mjs +0 -1
  796. package/dist/chunks/keybindings-1.0.12-tzqxhe4y.mjs +0 -2
  797. package/dist/chunks/knowledge-1.0.12-4z117jz8.mjs +0 -2
  798. package/dist/chunks/latestVersionCache-1.0.12-v4exfmej.mjs +0 -1
  799. package/dist/chunks/loadAgentsDir-1.0.12-33qj54es.mjs +0 -1
  800. package/dist/chunks/loadPluginHooks-1.0.12-3e1ay1bg.mjs +0 -1
  801. package/dist/chunks/loadPluginHooks-1.0.12-s7htccwt.mjs +0 -1
  802. package/dist/chunks/log-1.0.12-qerp8m38.mjs +0 -1
  803. package/dist/chunks/main-1.0.12-eegz9vfx.mjs +0 -1
  804. package/dist/chunks/managedEnv-1.0.12-dsdjxx30.mjs +0 -1
  805. package/dist/chunks/mcp-1.0.12-6dgfh9jp.mjs +0 -17
  806. package/dist/chunks/mcp-1.0.12-j2h3k7hg.mjs +0 -4
  807. package/dist/chunks/mcp-1.0.12-kp37svg1.mjs +0 -1
  808. package/dist/chunks/mcpb-1.0.12-ca16ddb6.mjs +0 -1
  809. package/dist/chunks/memory-1.0.12-0k08f6b4.mjs +0 -72
  810. package/dist/chunks/model-1.0.12-2z9t0e24.mjs +0 -2
  811. package/dist/chunks/model-1.0.12-avtsadm7.mjs +0 -1
  812. package/dist/chunks/node-1.0.12-5zcm6b49.mjs +0 -12
  813. package/dist/chunks/oauth-1.0.12-t7s3r4ha.mjs +0 -1
  814. package/dist/chunks/openaiShim-1.0.12-y35cxvtm.mjs +0 -14
  815. package/dist/chunks/output-style-1.0.12-hwh89yg3.mjs +0 -1
  816. package/dist/chunks/package-ZZWOLTXM-1.0.12-jrq6q5gh.mjs +0 -1
  817. package/dist/chunks/parseConnectUrl-1.0.12-1ajk88cn.mjs +0 -1
  818. package/dist/chunks/parser-1.0.12-mnazf4dy.mjs +0 -1
  819. package/dist/chunks/passes-1.0.12-hvk4mc22.mjs +0 -1
  820. package/dist/chunks/permissions-1.0.12-8mr0v1ms.mjs +0 -1
  821. package/dist/chunks/permissions-1.0.12-bhr0jwb3.mjs +0 -3
  822. package/dist/chunks/plan-1.0.12-5bjaadcz.mjs +0 -1
  823. package/dist/chunks/plist-1.0.12-rkjbgan4.mjs +0 -1
  824. package/dist/chunks/plugin-1.0.12-pxgt2afc.mjs +0 -29
  825. package/dist/chunks/pluginStartupCheck-1.0.12-6gcazre9.mjs +0 -1
  826. package/dist/chunks/plugins-1.0.12-m5w6j4w1.mjs +0 -9
  827. package/dist/chunks/preActionHook-1.0.12-mf4w1185.mjs +0 -2
  828. package/dist/chunks/print-1.0.12-t6h31xzw.mjs +0 -57
  829. package/dist/chunks/privacy-settings-1.0.12-p99c9mr9.mjs +0 -1
  830. package/dist/chunks/process-1.0.12-514yxzk8.mjs +0 -1
  831. package/dist/chunks/processBashCommand-1.0.12-sg75g2bj.mjs +0 -1
  832. package/dist/chunks/processSlashCommand-1.0.12-yc9eq6vv.mjs +0 -9
  833. package/dist/chunks/prompt-1.0.12-0s0zhnqk.mjs +0 -1
  834. package/dist/chunks/prompt-1.0.12-yxsmhgt0.mjs +0 -1
  835. package/dist/chunks/prompts-1.0.12-0hkf5v5d.mjs +0 -1
  836. package/dist/chunks/protocolHandler-1.0.12-2s1b0744.mjs +0 -13
  837. package/dist/chunks/provider-1.0.12-br1hwfjc.mjs +0 -2
  838. package/dist/chunks/providerProfiles-1.0.12-1cvn3gk3.mjs +0 -1
  839. package/dist/chunks/providerValidation-1.0.12-e5hn1s9f.mjs +0 -6
  840. package/dist/chunks/rate-limit-options-1.0.12-2b1eehxk.mjs +0 -1
  841. package/dist/chunks/registerSubcommands-1.0.12-3w6n3hvp.mjs +0 -34
  842. package/dist/chunks/registry-1.0.12-416j15rh.mjs +0 -1
  843. package/dist/chunks/release-notes-1.0.12-cjkaspwe.mjs +0 -5
  844. package/dist/chunks/reload-plugins-1.0.12-kn31ddrr.mjs +0 -2
  845. package/dist/chunks/remote-env-1.0.12-wgzde32c.mjs +0 -1
  846. package/dist/chunks/remoteBridgeCore-1.0.12-0c89q3s7.mjs +0 -1
  847. package/dist/chunks/remoteSession-1.0.12-cs8aksk2.mjs +0 -1
  848. package/dist/chunks/rename-1.0.12-2a5n1bm7.mjs +0 -1
  849. package/dist/chunks/replBridgeHandle-1.0.12-1sgqwxsb.mjs +0 -1
  850. package/dist/chunks/replLauncher-1.0.12-380zfnph.mjs +0 -1
  851. package/dist/chunks/resume-1.0.12-xfc2cbkb.mjs +0 -2
  852. package/dist/chunks/rewind-1.0.12-r3d180dy.mjs +0 -1
  853. package/dist/chunks/rootOptions-1.0.12-pfhteve9.mjs +0 -1
  854. package/dist/chunks/runWorkflowHeadless-1.0.12-05semed9.mjs +0 -10
  855. package/dist/chunks/sandbox-adapter-1.0.12-6ty9e1sb.mjs +0 -1
  856. package/dist/chunks/sandbox-toggle-1.0.12-3s3mg79e.mjs +0 -1
  857. package/dist/chunks/session-1.0.12-xx9k18d5.mjs +0 -2
  858. package/dist/chunks/sessionDiscovery-1.0.12-k0eh44q5.mjs +0 -1
  859. package/dist/chunks/sessionFileAccessHooks-1.0.12-289cp1d9.mjs +0 -1
  860. package/dist/chunks/sessionStorage-1.0.12-af0sp63e.mjs +0 -1
  861. package/dist/chunks/settings-1.0.12-1kn5k4w3.mjs +0 -1
  862. package/dist/chunks/setup-1.0.12-sjx27cy2.mjs +0 -5
  863. package/dist/chunks/sinks-1.0.12-s5jc7mhb.mjs +0 -1
  864. package/dist/chunks/skills-1.0.12-rz6jxa0g.mjs +0 -1
  865. package/dist/chunks/startupProfiler-1.0.12-p1sagjpt.mjs +0 -1
  866. package/dist/chunks/startupUpdateCheck-1.0.12-0rynn7sy.mjs +0 -1
  867. package/dist/chunks/state-1.0.12-scv8d1ss.mjs +0 -1
  868. package/dist/chunks/stats-1.0.12-h73ksepe.mjs +0 -6
  869. package/dist/chunks/status-1.0.12-w3s8s4n7.mjs +0 -1
  870. package/dist/chunks/stickers-1.0.12-tytep2cy.mjs +0 -1
  871. package/dist/chunks/subprocessEnv-1.0.12-6kt4e9mh.mjs +0 -1
  872. package/dist/chunks/tasks-1.0.12-ezrpv3cr.mjs +0 -1
  873. package/dist/chunks/teamHelpers-1.0.12-yg34czgd.mjs +0 -1
  874. package/dist/chunks/teammateModeSnapshot-1.0.12-0b71sedv.mjs +0 -1
  875. package/dist/chunks/teleport-1.0.12-zq525vyn.mjs +0 -1
  876. package/dist/chunks/terminalSetup-1.0.12-z82kcb7p.mjs +0 -1
  877. package/dist/chunks/theme-1.0.12-1n4zhmvg.mjs +0 -1
  878. package/dist/chunks/thinkback-1.0.12-vegbsqqh.mjs +0 -1
  879. package/dist/chunks/thinkback-play-1.0.12-m2re0ysp.mjs +0 -1
  880. package/dist/chunks/toolPool-1.0.12-7k896ktz.mjs +0 -1
  881. package/dist/chunks/toolSearch-1.0.12-1t7z9s8n.mjs +0 -1
  882. package/dist/chunks/tools-1.0.12-m1q30sx2.mjs +0 -1
  883. package/dist/chunks/trustedDevice-1.0.12-d1ec8tgn.mjs +0 -1
  884. package/dist/chunks/turndown.cjs-1.0.12-gd906rm3.mjs +0 -69
  885. package/dist/chunks/types-1.0.12-bnkcne53.mjs +0 -1
  886. package/dist/chunks/ultrareviewCommand-1.0.12-d94wevag.mjs +0 -4
  887. package/dist/chunks/update-1.0.12-42sky6mj.mjs +0 -88
  888. package/dist/chunks/upgrade-1.0.12-dmpc55bj.mjs +0 -1
  889. package/dist/chunks/upload-1.0.12-nmk9n704.mjs +0 -7
  890. package/dist/chunks/upstreamproxy-1.0.12-91ksccx0.mjs +0 -14
  891. package/dist/chunks/url-handler-napi-1.0.12-dmb5xjpf.mjs +0 -1
  892. package/dist/chunks/usage-1.0.12-tjapt84n.mjs +0 -1
  893. package/dist/chunks/util-1.0.12-10z43mt9.mjs +0 -1
  894. package/dist/chunks/utils-1.0.12-w32argrx.mjs +0 -1
  895. package/dist/chunks/vim-1.0.12-wf8sb0mt.mjs +0 -1
  896. package/dist/chunks/watchLoop-1.0.12-3dxe0717.mjs +0 -13
  897. package/dist/chunks/watcher-1.0.12-7p840es5.mjs +0 -1
  898. package/dist/chunks/wiki-1.0.12-0ym9ejj5.mjs +0 -132
  899. package/dist/chunks/workflows-1.0.12-c270z4b2.mjs +0 -1
  900. package/dist/chunks/worktree-1.0.12-zeqk2tcs.mjs +0 -1
  901. package/dist/chunks/worktreeModeEnabled-1.0.12-kmtt3k2w.mjs +0 -1
  902. package/dist/chunks/wrapper-1.0.12-wzaxf903.mjs +0 -7
  903. /package/dist/chunks/{cli-1.0.12-w5g65qpt.mjs → cli-1.0.13-4z6c4gzk.mjs} +0 -0
  904. /package/dist/chunks/{cli-1.0.12-v6h16sq3.mjs → cli-1.0.13-ap2xrh2s.mjs} +0 -0
  905. /package/dist/chunks/{cli-1.0.12-ecf1es2x.mjs → cli-1.0.13-d9nvpqpw.mjs} +0 -0
  906. /package/dist/chunks/{cli-1.0.12-2sf9ww39.mjs → cli-1.0.13-n6bzzv7p.mjs} +0 -0
  907. /package/dist/chunks/{cli-1.0.12-h16hfwe6.mjs → cli-1.0.13-q9et56bj.mjs} +0 -0
  908. /package/dist/chunks/{cli-1.0.12-xya69wfx.mjs → cli-1.0.13-tzenmc0b.mjs} +0 -0
  909. /package/dist/chunks/{cli-1.0.12-8yzsm0t1.mjs → cli-1.0.13-v34fp7gq.mjs} +0 -0
  910. /package/dist/chunks/{cli-1.0.12-c9kgj61k.mjs → cli-1.0.13-wv7skbb9.mjs} +0 -0
@@ -1,199 +0,0 @@
1
- import{_ga as Z2,dha as MV}from"./cli-1.0.12-jv9bdyr3.mjs";import{lha as Aq,nha as a6,oha as OO}from"./cli-1.0.12-vr2x1cvb.mjs";import{Kha as Hq,yha as s1}from"./cli-1.0.12-krksdpwy.mjs";import{$ha as JV,Nha as uL,Qha as vx,Wha as iZ,_ha as fj,bia as G,cia as Dq,dia as r0,eia as j,fia as t1}from"./cli-1.0.12-hxmg9ymn.mjs";import{Mia as yx,iia as r,jia as Z1,tia as tL}from"./cli-1.0.12-pp2g923k.mjs";import{Nia as GW,Via as eB,Wia as KW}from"./cli-1.0.12-n1m3pwwf.mjs";import{Xia as s0,_ia as xU}from"./cli-1.0.12-2yt4jp97.mjs";import{Cja as Y7,Dja as m,Eja as Z0,Fja as cq,Gja as $L,Ija as z0,Jja as w1,Mja as N,Qja as F0,_ja as P,bja as V2,bka as K1,dja as GQ,eja as eZ,fja as DI,gja as TK,hja as cj,ija as lX,jja as v_,kja as bK,lja as QI,mja as z7,nja as hK,oja as dK,pja as WI,qja as cK,rja as VI,sja as vK,tja as sj,uja as eX,vja as g_,wja as lK,xja as BI,yja as nK,zja as LI}from"./cli-1.0.12-crspnn4b.mjs";import{Aka as p6,Dka as PU,Fka as o1,ska as Q5,xka as rL,zka as W0}from"./cli-1.0.12-x4ep25h9.mjs";import{Ika as G0,Lka as q0,Mka as pV,Nka as G2,Vka as o0}from"./cli-1.0.12-bhvkmj7j.mjs";import{Cla as pK,Dla as UI,Fma as q6,Gma as q4,Goa as lq,Ioa as nq,Jna as HQ,Kla as _7,Lla as NK,Qoa as oL,Soa as sL,Wka as oK,Xka as zI,Yla as rX,Zla as b_,Zoa as rU,ama as w4,bma as dX,cma as cX,dma as E_,dpa as PV,ema as aX,fma as y_,gla as rZ,gma as R7,hla as HI,hma as YU,ima as tX,jma as h_,kma as jV,lma as IV,mma as OV,nma as wV,oma as kV,ooa as uV,pma as NV,ppa as bB,qla as L7,qma as m2,rla as kK,rma as xV,sla as tZ,tla as GI,ula as uK,uma as DU,vla as KI,wla as O4,xla as pX,yqa as _6}from"./cli-1.0.12-y1c7c1a1.mjs";import{Aqa as AK,Jqa as EK,Kqa as oj,Lqa as e0,Mqa as I4,Nqa as mK,Oqa as YI,Xqa as u,Yqa as O1,zqa as B7}from"./cli-1.0.12-jk3cz5bk.mjs";import{dsa as A9,esa as V4,fsa as c,gsa as Mq,hsa as B,isa as Y0,jsa as b6,ksa as h6}from"./cli-1.0.12-ecf1es2x.mjs";var $X=c((tx,QX)=>{QX.exports=XX;XX.sync=X_;var qX=Y0("fs");function J_(Z,q){var J=q.pathExt!==void 0?q.pathExt:process.env.PATHEXT;if(!J)return!0;if(J=J.split(";"),J.indexOf("")!==-1)return!0;for(var X=0;X<J.length;X++){var Q=J[X].toLowerCase();if(Q&&Z.substr(-Q.length).toLowerCase()===Q)return!0}return!1}function JX(Z,q,J){if(!Z.isSymbolicLink()&&!Z.isFile())return!1;return J_(q,J)}function XX(Z,q,J){qX.stat(Z,function(X,Q){J(X,X?!1:JX(Q,Z,q))})}function X_(Z,q){return JX(qX.statSync(Z),Z,q)}});var UX=c((ex,KX)=>{KX.exports=HX;HX.sync=Q_;var YX=Y0("fs");function HX(Z,q,J){YX.stat(Z,function(X,Q){J(X,X?!1:GX(Q,q))})}function Q_(Z,q){return GX(YX.statSync(Z),q)}function GX(Z,q){return Z.isFile()&&$_(Z,q)}function $_(Z,q){var{mode:J,uid:X,gid:Q}=Z,$=q.uid!==void 0?q.uid:process.getuid&&process.getuid(),Y=q.gid!==void 0?q.gid:process.getgid&&process.getgid(),H=parseInt("100",8),K=parseInt("010",8),W=parseInt("001",8),U=H|K,V=J&W||J&K&&Q===Y||J&H&&X===$||J&U&&$===0;return V}});var VX=c((qP,WX)=>{var ZP=Y0("fs"),j4;if(process.platform==="win32"||global.TESTING_WINDOWS)j4=$X();else j4=UX();WX.exports=v5;v5.sync=Y_;function v5(Z,q,J){if(typeof q==="function")J=q,q={};if(!J){if(typeof Promise!=="function")throw TypeError("callback not provided");return new Promise(function(X,Q){v5(Z,q||{},function($,Y){if($)Q($);else X(Y)})})}j4(Z,q||{},function(X,Q){if(X){if(X.code==="EACCES"||q&&q.ignoreErrors)X=null,Q=!1}J(X,Q)})}function Y_(Z,q){try{return j4.sync(Z,q||{})}catch(J){if(q&&q.ignoreErrors||J.code==="EACCES")return!1;else throw J}}});var MX=c((JP,FX)=>{var V6=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",BX=Y0("path"),H_=V6?";":":",LX=VX(),_X=(Z)=>Object.assign(Error(`not found: ${Z}`),{code:"ENOENT"}),zX=(Z,q)=>{let J=q.colon||H_,X=Z.match(/\//)||V6&&Z.match(/\\/)?[""]:[...V6?[process.cwd()]:[],...(q.path||process.env.PATH||"").split(J)],Q=V6?q.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",$=V6?Q.split(J):[""];if(V6){if(Z.indexOf(".")!==-1&&$[0]!=="")$.unshift("")}return{pathEnv:X,pathExt:$,pathExtExe:Q}},RX=(Z,q,J)=>{if(typeof q==="function")J=q,q={};if(!q)q={};let{pathEnv:X,pathExt:Q,pathExtExe:$}=zX(Z,q),Y=[],H=(W)=>new Promise((U,V)=>{if(W===X.length)return q.all&&Y.length?U(Y):V(_X(Z));let L=X[W],_=/^".*"$/.test(L)?L.slice(1,-1):L,z=BX.join(_,Z),R=!_&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+z:z;U(K(R,W,0))}),K=(W,U,V)=>new Promise((L,_)=>{if(V===Q.length)return L(H(U+1));let z=Q[V];LX(W+z,{pathExt:$},(R,D)=>{if(!R&&D)if(q.all)Y.push(W+z);else return L(W+z);return L(K(W,U,V+1))})});return J?H(0).then((W)=>J(null,W),J):H(0)},G_=(Z,q)=>{q=q||{};let{pathEnv:J,pathExt:X,pathExtExe:Q}=zX(Z,q),$=[];for(let Y=0;Y<J.length;Y++){let H=J[Y],K=/^".*"$/.test(H)?H.slice(1,-1):H,W=BX.join(K,Z),U=!K&&/^\.[\\\/]/.test(Z)?Z.slice(0,2)+W:W;for(let V=0;V<X.length;V++){let L=U+X[V];try{if(LX.sync(L,{pathExt:Q}))if(q.all)$.push(L);else return L}catch(_){}}}if(q.all&&$.length)return $;if(q.nothrow)return null;throw _X(Z)};FX.exports=RX;RX.sync=G_});var AX=c((XP,C5)=>{var DX=(Z={})=>{let q=Z.env||process.env;if((Z.platform||process.platform)!=="win32")return"PATH";return Object.keys(q).reverse().find((X)=>X.toUpperCase()==="PATH")||"Path"};C5.exports=DX;C5.exports.default=DX});var OX=c((QP,IX)=>{var TX=Y0("path"),K_=MX(),U_=AX();function jX(Z,q){let J=Z.options.env||process.env,X=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=K_.sync(Z.command,{path:J[U_({env:J})],pathExt:q?TX.delimiter:void 0})}catch(H){}finally{if($)process.chdir(X)}if(Y)Y=TX.resolve(Q?Z.options.cwd:"",Y);return Y}function W_(Z){return jX(Z)||jX(Z,!0)}IX.exports=W_});var wX=c((L_,S5)=>{var y5=/([()\][%!^"`<>&|;, *?])/g;function V_(Z){return Z=Z.replace(y5,"^$1"),Z}function B_(Z,q){if(Z=`${Z}`,Z=Z.replace(/(?=(\\+?)?)\1"/g,"$1$1\\\""),Z=Z.replace(/(?=(\\+?)?)\1$/,"$1$1"),Z=`"${Z}"`,Z=Z.replace(y5,"^$1"),q)Z=Z.replace(y5,"^$1");return Z}L_.command=V_;L_.argument=B_});var NX=c(($P,kX)=>{kX.exports=/^#!(.*)/});var PX=c((YP,xX)=>{var R_=NX();xX.exports=(Z="")=>{let q=Z.match(R_);if(!q)return null;let[J,X]=q[0].replace(/#! ?/,"").split(" "),Q=J.split("/").pop();if(Q==="env")return X;return X?`${Q} ${X}`:Q}});var vX=c((HP,EX)=>{var b5=Y0("fs"),F_=PX();function M_(Z){let J=Buffer.alloc(150),X;try{X=b5.openSync(Z,"r"),b5.readSync(X,J,0,150,0),b5.closeSync(X)}catch(Q){}return F_(J.toString())}EX.exports=M_});var bX=c((GP,SX)=>{var D_=Y0("path"),CX=OX(),yX=wX(),A_=vX(),T_=process.platform==="win32",j_=/\.(?:com|exe)$/i,I_=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function O_(Z){Z.file=CX(Z);let q=Z.file&&A_(Z.file);if(q)return Z.args.unshift(Z.file),Z.command=q,CX(Z);return Z.file}function w_(Z){if(!T_)return Z;let q=O_(Z),J=!j_.test(q);if(Z.options.forceShell||J){let X=I_.test(q);Z.command=D_.normalize(Z.command),Z.command=yX.command(Z.command),Z.args=Z.args.map(($)=>yX.argument($,X));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 k_(Z,q,J){if(q&&!Array.isArray(q))J=q,q=null;q=q?q.slice(0):[],J=Object.assign({},J);let X={command:Z,args:q,options:J,file:void 0,original:{command:Z,args:q}};return J.shell?X:w_(X)}SX.exports=k_});var fX=c((KP,gX)=>{var h5=process.platform==="win32";function g5(Z,q){return Object.assign(Error(`${q} ${Z.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${q} ${Z.command}`,path:Z.command,spawnargs:Z.args})}function N_(Z,q){if(!h5)return;let J=Z.emit;Z.emit=function(X,Q){if(X==="exit"){let $=hX(Q,q);if($)return J.call(Z,"error",$)}return J.apply(Z,arguments)}}function hX(Z,q){if(h5&&Z===1&&!q.file)return g5(q.original,"spawn");return null}function x_(Z,q){if(h5&&Z===1&&!q.file)return g5(q.original,"spawnSync");return null}gX.exports={hookChildProcess:N_,verifyENOENT:hX,verifyENOENTSync:x_,notFoundError:g5}});var u5=c((UP,B6)=>{var mX=Y0("child_process"),f5=bX(),m5=fX();function uX(Z,q,J){let X=f5(Z,q,J),Q=mX.spawn(X.command,X.args,X.options);return m5.hookChildProcess(Q,X),Q}function P_(Z,q,J){let X=f5(Z,q,J),Q=mX.spawnSync(X.command,X.args,X.options);return Q.error=Q.error||m5.verifyENOENTSync(Q.status,X),Q}B6.exports=uX;B6.exports.spawn=uX;B6.exports.sync=P_;B6.exports._parse=f5;B6.exports._enoent=m5});function C_(Z,q,J,X){if(!e0(Z))return Z;q=w4(q,Z);var Q=-1,$=q.length,Y=$-1,H=Z;while(H!=null&&++Q<$){var K=cX(q[Q]),W=J;if(K==="__proto__"||K==="constructor"||K==="prototype")return Z;if(Q!=Y){var U=H[K];if(W=X?X(U,K,H):void 0,W===void 0)W=e0(U)?U:O4(q[Q+1])?[]:{}}lX(H,K,W),H=H[K]}return Z}var nX;var iX=B(()=>{v_();dX();pX();I4();E_();nX=C_});function S_(Z,q,J){var X=-1,Q=q.length,$={};while(++X<Q){var Y=q[X],H=aX(Z,Y);if(J(H,Y))nX($,w4(Y,Z),H)}return $}var oX;var sX=B(()=>{y_();iX();dX();oX=S_});function f_(Z,q){if(Z==null)return{};var J=rX(eX(Z),function(X){return[X]});return q=tX(q),oX(Z,J,function(X,Q){return q(X,Q[0])})}var p5;var ZQ=B(()=>{b_();h_();sX();g_();p5=f_});function qQ(Z){let q=Z.slice(Z.lastIndexOf(".")).toLowerCase();return m_.has(q)}function JQ(Z){let q=Math.min(Z.length,u_),J=0;for(let X=0;X<q;X++){let Q=Z[X];if(Q===0)return!0;if(Q<32&&Q!==9&&Q!==10&&Q!==13)J++}return J/q>0.1}var m_,u_=8192;var XQ=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"])});import{dirname as p_}from"path";function H0(Z,q,J){let X=d_();if(!X)return;let Q={timestamp:new Date().toISOString(),level:Z,event:q,data:J??{}},$=N(),Y=m(Q)+`
2
- `;try{$.appendFileSync(X,Y)}catch{try{$.mkdirSync(p_(X)),$.appendFileSync(X,Y)}catch{}}}function d_(){return process.env.CLAUDE_CODE_DIAGNOSTICS_FILE}async function PP(Z,q,J){let X=Date.now();H0("info",`${Z}_started`);try{let Q=await q(),$=J?J(Q):{};return H0("info",`${Z}_completed`,{duration_ms:Date.now()-X,...$}),Q}catch(Q){throw H0("error",`${Z}_failed`,{duration_ms:Date.now()-X}),Q}}var U2=B(()=>{F0();z0()});import{readFile as c_}from"fs/promises";import{join as l_}from"path";async function W2(Z,q,J,X){try{let Q=await c_(l_(Z,"config"),"utf-8");return n_(Q,q,J,X)}catch{return null}}function n_(Z,q,J,X){let Q=Z.split(`
3
- `),$=q.toLowerCase(),Y=X.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=s_(W,$,J);continue}if(!H)continue;let U=i_(W);if(U&&U.key.toLowerCase()===Y)return U.value}return null}function i_(Z){let q=0;while(q<Z.length&&r_(Z[q]))q++;if(q===0)return null;let J=Z.slice(0,q);while(q<Z.length&&(Z[q]===" "||Z[q]==="\t"))q++;if(q>=Z.length||Z[q]!=="=")return null;q++;while(q<Z.length&&(Z[q]===" "||Z[q]==="\t"))q++;let X=a_(Z,q);return{key:J,value:X}}function a_(Z,q){let J="",X=!1,Q=q;while(Q<Z.length){let $=Z[Q];if(!X&&($==="#"||$===";"))break;if($==='"'){X=!X,Q++;continue}if($==="\\"&&Q+1<Z.length){let Y=Z[Q+1];if(X){switch(Y){case"n":J+=`
4
- `;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(!X)J=o_(J);return J}function o_(Z){let q=Z.length;while(q>0&&(Z[q-1]===" "||Z[q-1]==="\t"))q--;return Z.slice(0,q)}function s_(Z,q,J){let X=1;while(X<Z.length&&Z[X]!=="]"&&Z[X]!==" "&&Z[X]!=="\t"&&Z[X]!=='"')X++;if(Z.slice(1,X).toLowerCase()!==q)return!1;if(J===null)return X<Z.length&&Z[X]==="]";while(X<Z.length&&(Z[X]===" "||Z[X]==="\t"))X++;if(X>=Z.length||Z[X]!=='"')return!1;X++;let $="";while(X<Z.length&&Z[X]!=='"'){if(Z[X]==="\\"&&X+1<Z.length){let Y=Z[X+1];if(Y==="\\"||Y==='"'){$+=Y,X+=2;continue}$+=Y,X+=2;continue}$+=Z[X],X++}if(X>=Z.length||Z[X]!=='"')return!1;if(X++,X>=Z.length||Z[X]!=="]")return!1;return $===J}function r_(Z){return Z>="a"&&Z<="z"||Z>="A"&&Z<="Z"||Z>="0"&&Z<="9"||Z==="-"}var QQ=()=>{};import{unwatchFile as $Q,watchFile as t_}from"fs";import{readdir as e_,readFile as C1,stat as KQ}from"fs/promises";import{join as w0,resolve as k4}from"path";function dP(){L6.clear()}async function S0(Z){let q=k4(Z??r()),J=L6.get(q);if(J!==void 0)return J;let X=R6(q);if(!X)return L6.set(q,null),null;let Q=w0(X,".git");try{if((await KQ(Q)).isFile()){let Y=(await C1(Q,"utf-8")).trim();if(Y.startsWith("gitdir:")){let H=Y.slice(7).trim(),K=k4(X,H);return L6.set(q,K),K}}return L6.set(q,Q),Q}catch{return L6.set(q,null),null}}function N4(Z){if(!Z||Z.startsWith("-")||Z.startsWith("/"))return!1;if(Z.includes(".."))return!1;if(Z.split("/").some((q)=>q==="."||q===""))return!1;if(!/^[a-zA-Z0-9/._+@-]+$/.test(Z))return!1;return!0}function d5(Z){return/^[0-9a-f]{40}$/.test(Z)||/^[0-9a-f]{64}$/.test(Z)}async function B2(Z){try{let q=(await C1(w0(Z,"HEAD"),"utf-8")).trim();if(q.startsWith("ref:")){let J=q.slice(4).trim();if(J.startsWith("refs/heads/")){let Q=J.slice(11);if(!N4(Q))return null;return{type:"branch",name:Q}}if(!N4(J))return null;let X=await z6(Z,J);return X?{type:"detached",sha:X}:{type:"detached",sha:""}}if(!d5(q))return null;return{type:"detached",sha:q}}catch{return null}}async function z6(Z,q){let J=await YQ(Z,q);if(J)return J;let X=await y1(Z);if(X&&X!==Z)return YQ(X,q);return null}async function YQ(Z,q){try{let J=(await C1(w0(Z,q),"utf-8")).trim();if(J.startsWith("ref:")){let X=J.slice(4).trim();if(!N4(X))return null;return z6(Z,X)}if(!d5(J))return null;return J}catch{}try{let J=await C1(w0(Z,"packed-refs"),"utf-8");for(let X of J.split(`
5
- `)){if(X.startsWith("#")||X.startsWith("^"))continue;let Q=X.indexOf(" ");if(Q===-1)continue;if(X.slice(Q+1)===q){let $=X.slice(0,Q);return d5($)?$:null}}}catch{}return null}async function y1(Z){try{let q=(await C1(w0(Z,"commondir"),"utf-8")).trim();return k4(Z,q)}catch{return null}}async function Zz(Z,q,J){try{let X=(await C1(w0(Z,q),"utf-8")).trim();if(X.startsWith("ref:")){let Q=X.slice(4).trim();if(Q.startsWith(J)){let $=Q.slice(J.length);if(!N4($))return null;return $}}}catch{}return null}class UQ{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 S0(),this.initialized=!0,!this.gitDir)return;this.commonDir=await y1(this.gitDir),this.watchPath(w0(this.gitDir,"HEAD"),()=>{this.onHeadChanged()}),this.watchPath(w0(this.commonDir??this.gitDir,"config"),()=>{this.invalidate()}),await this.watchCurrentBranchRef(),V2(async()=>{this.stopWatching()})}watchPath(Z,q){this.watchedPaths.push(Z),t_(Z,{interval:qz},q)}async watchCurrentBranchRef(){if(!this.gitDir)return;let Z=await B2(this.gitDir),q=this.commonDir??this.gitDir,J=Z?.type==="branch"?w0(q,"refs","heads",Z.name):null;if(J===this.branchRefPath)return;if(this.branchRefPath)$Q(this.branchRefPath),this.watchedPaths=this.watchedPaths.filter((X)=>X!==this.branchRefPath);if(this.branchRefPath=J,!J)return;this.watchPath(J,()=>{this.invalidate()})}async onHeadChanged(){this.invalidate(),await HQ(),await this.watchCurrentBranchRef()}invalidate(){for(let Z of this.cache.values())Z.dirty=!0}stopWatching(){for(let Z of this.watchedPaths)$Q(Z);this.watchedPaths=[],this.branchRefPath=null}async get(Z,q){await this.ensureStarted();let J=this.cache.get(Z);if(J&&!J.dirty)return J.value;if(J)J.dirty=!1;let X=await q(),Q=this.cache.get(Z);if(Q&&!Q.dirty)Q.value=X;if(!Q)this.cache.set(Z,{value:X,dirty:!1,compute:q});return X}reset(){this.stopWatching(),this.cache.clear(),this.initialized=!1,this.initPromise=null,this.gitDir=null,this.commonDir=null}}async function Jz(){let Z=await S0();if(!Z)return"HEAD";let q=await B2(Z);if(!q)return"HEAD";return q.type==="branch"?q.name:"HEAD"}async function Xz(){let Z=await S0();if(!Z)return"";let q=await B2(Z);if(!q)return"";if(q.type==="branch")return await z6(Z,`refs/heads/${q.name}`)??"";return q.sha}async function Qz(){let Z=await S0();if(!Z)return null;let q=await W2(Z,"remote","origin","url");if(q)return q;let J=await y1(Z);if(J&&J!==Z)return W2(J,"remote","origin","url");return null}async function $z(){let Z=await S0();if(!Z)return"main";let q=await y1(Z)??Z,J=await Zz(q,"refs/remotes/origin/HEAD","refs/remotes/origin/");if(J)return J;for(let X of["main","master"])if(await z6(q,`refs/remotes/origin/${X}`))return X;return"main"}function WQ(){return x4.get("branch",Jz)}function VQ(){return x4.get("head",Xz)}function BQ(){return x4.get("remoteUrl",Qz)}function LQ(){return x4.get("defaultBranch",$z)}async function cP(Z){let q=await S0(Z);if(!q)return null;let J=await B2(q);if(!J)return null;if(J.type==="branch")return z6(q,`refs/heads/${J.name}`);return J.sha}async function lP(Z){let q;try{let X=(await C1(w0(Z,".git"),"utf-8")).trim();if(!X.startsWith("gitdir:"))return null;q=k4(Z,X.slice(7).trim())}catch{return null}let J=await B2(q);if(!J)return null;if(J.type==="branch")return z6(q,`refs/heads/${J.name}`);return J.sha}async function nP(Z){let q=await S0(Z);if(!q)return null;let J=await W2(q,"remote","origin","url");if(J)return J;let X=await y1(q);if(X&&X!==q)return W2(X,"remote","origin","url");return null}async function _Q(){let Z=await S0();if(!Z)return!1;let q=await y1(Z)??Z;try{return await KQ(w0(q,"shallow")),!0}catch{return!1}}async function zQ(){try{let Z=await S0();if(!Z)return 0;let q=await y1(Z)??Z;return(await e_(w0(q,"worktrees"))).length+1}catch{return 1}}var L6,qz=1000,x4;var RQ=B(()=>{_6();GQ();Z1();L2();QQ();L6=new Map;x4=new UQ});import{tracingChannel as Yz,channel as Hz}from"node:diagnostics_channel";var U0,_2,Gz,c5=()=>U0.hasSubscribers||_2.hasSubscribers,MQ,FQ,Kz=(Z,q,J,X)=>{typeof FQ.emitWarning=="function"?FQ.emitWarning(Z,q,J,X):console.error(`[${J}] ${q}: ${Z}`)},Uz=(Z)=>!MQ.has(Z),R1=(Z)=>!!Z&&Z===Math.floor(Z)&&Z>0&&isFinite(Z),DQ=(Z)=>R1(Z)?Z<=Math.pow(2,8)?Uint8Array:Z<=Math.pow(2,16)?Uint16Array:Z<=Math.pow(2,32)?Uint32Array:Z<=Number.MAX_SAFE_INTEGER?P4:null:null,P4,Wz=class Z{heap;length;static#J=!1;static create(q){let J=DQ(q);if(!J)return[];Z.#J=!0;let X=new Z(q,J);return Z.#J=!1,X}constructor(q,J){if(!Z.#J)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new J(q),this.length=0}push(q){this.heap[this.length++]=q}pop(){return this.heap[--this.length]}},AQ;var TQ=B(()=>{U0=Hz("lru-cache:metrics"),_2=Yz("lru-cache"),Gz=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,MQ=new Set,FQ=typeof process=="object"&&process?process:{},P4=class extends Array{constructor(Z){super(Z),this.fill(0)}},AQ=class Z{#J;#X;#q;#Y;#G;#V;#A;#z;get perf(){return this.#z}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#H;#T;#K;#$;#Z;#L;#R;#B;#U;#j;#W;#I;#O;#F;#M;#w;#h;#_;#v;static unsafeExposeInternals(q){return{starts:q.#O,ttls:q.#F,autopurgeTimers:q.#M,sizes:q.#I,keyMap:q.#K,keyList:q.#$,valList:q.#Z,next:q.#L,prev:q.#R,get head(){return q.#B},get tail(){return q.#U},free:q.#j,isBackgroundFetch:(J)=>q.#Q(J),backgroundFetch:(J,X,Q,$)=>q.#m(J,X,Q,$),moveToTail:(J)=>q.#b(J),indexes:(J)=>q.#k(J),rindexes:(J)=>q.#N(J),isStale:(J)=>q.#D(J)}}get max(){return this.#J}get maxSize(){return this.#X}get calculatedSize(){return this.#T}get size(){return this.#H}get fetchMethod(){return this.#V}get memoMethod(){return this.#A}get dispose(){return this.#q}get onInsert(){return this.#Y}get disposeAfter(){return this.#G}constructor(q){let{max:J=0,ttl:X,ttlResolution:Q=1,ttlAutopurge:$,updateAgeOnGet:Y,updateAgeOnHas:H,allowStale:K,dispose:W,onInsert:U,disposeAfter:V,noDisposeOnSet:L,noUpdateTTL:_,maxSize:z=0,maxEntrySize:R=0,sizeCalculation:D,fetchMethod:F,memoMethod:k,noDeleteOnFetchRejection:M,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:I,ignoreFetchAbort:A,backgroundFetchSize:b=1,perf:w}=q;if(this.backgroundFetchSize=b,w!==void 0&&typeof w?.now!="function")throw TypeError("perf option must have a now() method if specified");if(this.#z=w??Gz,J!==0&&!R1(J))throw TypeError("max option must be a nonnegative integer");let x=J?DQ(J):Array;if(!x)throw Error("invalid max value: "+J);if(this.#J=J,this.#X=z,this.maxEntrySize=R||this.#X,this.sizeCalculation=D,this.sizeCalculation){if(!this.#X&&!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(k!==void 0&&typeof k!="function")throw TypeError("memoMethod must be a function if defined");if(this.#A=k,F!==void 0&&typeof F!="function")throw TypeError("fetchMethod must be a function if specified");if(this.#V=F,this.#h=!!F,this.#K=new Map,this.#$=Array.from({length:J}).fill(void 0),this.#Z=Array.from({length:J}).fill(void 0),this.#L=new x(J),this.#R=new x(J),this.#B=0,this.#U=0,this.#j=Wz.create(J),this.#H=0,this.#T=0,typeof W=="function"&&(this.#q=W),typeof U=="function"&&(this.#Y=U),typeof V=="function"?(this.#G=V,this.#W=[]):(this.#G=void 0,this.#W=void 0),this.#w=!!this.#q,this.#v=!!this.#Y,this.#_=!!this.#G,this.noDisposeOnSet=!!L,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!M,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#X!==0&&!R1(this.#X))throw TypeError("maxSize must be a positive integer if specified");if(!R1(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#a()}if(this.allowStale=!!K,this.noDeleteOnStaleGet=!!O,this.updateAgeOnGet=!!Y,this.updateAgeOnHas=!!H,this.ttlResolution=R1(Q)||Q===0?Q:1,this.ttlAutopurge=!!$,this.ttl=X||0,this.ttl){if(!R1(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#u()}if(this.#J===0&&this.ttl===0&&this.#X===0)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#J&&!this.#X){let v="LRU_CACHE_UNBOUNDED";Uz(v)&&(MQ.add(v),Kz("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",v,Z))}}getRemainingTTL(q){return this.#K.has(q)?1/0:0}#u(){let q=new P4(this.#J),J=new P4(this.#J);this.#F=q,this.#O=J;let X=this.ttlAutopurge?Array.from({length:this.#J}):void 0;this.#M=X,this.#p=(K,W,U=this.#z.now())=>{J[K]=W!==0?U:0,q[K]=W,Q(K,W)},this.#C=(K)=>{J[K]=q[K]!==0?this.#z.now():0,Q(K,q[K])};let Q=this.ttlAutopurge?(K,W)=>{if(X?.[K]&&(clearTimeout(X[K]),X[K]=void 0),W&&W!==0&&X){let U=setTimeout(()=>{this.#D(K)?(this.#x(this.#$[K],"expire"),X[K]=void 0):Q(K,H(K))},W+1);U.unref&&U.unref(),X[K]=U}}:()=>{};this.#P=(K,W)=>{if(q[W]){let U=q[W],V=J[W];if(!U||!V)return;K.ttl=U,K.start=V,K.now=$||Y();let L=K.now-V;K.remainingTTL=U-L}};let $=0,Y=()=>{let K=this.#z.now();if(this.ttlResolution>0){$=K;let W=setTimeout(()=>$=0,this.ttlResolution);W.unref&&W.unref()}return K};this.getRemainingTTL=(K)=>{let W=this.#K.get(K);return W===void 0?0:H(W)};let H=(K)=>{let W=q[K],U=J[K];if(!W||!U)return 1/0;let V=($||Y())-U;return W-V};this.#D=(K)=>{let W=J[K],U=q[K];return!!U&&!!W&&($||Y())-W>U}}#C=()=>{};#P=()=>{};#p=()=>{};#D=()=>!1;#a(){let q=new P4(this.#J);this.#T=0,this.#I=q,this.#y=(J)=>{this.#T-=q[J],q[J]=0},this.#d=(J,X,Q,$)=>{if(!R1(Q)){if(this.#Q(X))return this.backgroundFetchSize;if($){if(typeof $!="function")throw TypeError("sizeCalculation must be a function");if(Q=$(X,J),!R1(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.#g=(J,X,Q)=>{if(q[J]=X,this.#X){let $=this.#X-q[J];for(;this.#T>$;)this.#f(!0)}this.#T+=q[J],Q&&(Q.entrySize=X,Q.totalCalculatedSize=this.#T)}}#y=(q)=>{};#g=(q,J,X)=>{};#d=(q,J,X,Q)=>{if(X||Q)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#k({allowStale:q=this.allowStale}={}){if(this.#H)for(let J=this.#U;this.#c(J)&&((q||!this.#D(J))&&(yield J),J!==this.#B);)J=this.#R[J]}*#N({allowStale:q=this.allowStale}={}){if(this.#H)for(let J=this.#B;this.#c(J)&&((q||!this.#D(J))&&(yield J),J!==this.#U);)J=this.#L[J]}#c(q){return q!==void 0&&this.#K.get(this.#$[q])===q}*entries(){for(let q of this.#k())this.#Z[q]!==void 0&&this.#$[q]!==void 0&&!this.#Q(this.#Z[q])&&(yield[this.#$[q],this.#Z[q]])}*rentries(){for(let q of this.#N())this.#Z[q]!==void 0&&this.#$[q]!==void 0&&!this.#Q(this.#Z[q])&&(yield[this.#$[q],this.#Z[q]])}*keys(){for(let q of this.#k()){let J=this.#$[q];J!==void 0&&!this.#Q(this.#Z[q])&&(yield J)}}*rkeys(){for(let q of this.#N()){let J=this.#$[q];J!==void 0&&!this.#Q(this.#Z[q])&&(yield J)}}*values(){for(let q of this.#k())this.#Z[q]!==void 0&&!this.#Q(this.#Z[q])&&(yield this.#Z[q])}*rvalues(){for(let q of this.#N())this.#Z[q]!==void 0&&!this.#Q(this.#Z[q])&&(yield this.#Z[q])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(q,J={}){for(let X of this.#k()){let Q=this.#Z[X],$=this.#Q(Q)?Q.__staleWhileFetching:Q;if($!==void 0&&q($,this.#$[X],this))return this.#S(this.#$[X],J)}}forEach(q,J=this){for(let X of this.#k()){let Q=this.#Z[X],$=this.#Q(Q)?Q.__staleWhileFetching:Q;$!==void 0&&q.call(J,$,this.#$[X],this)}}rforEach(q,J=this){for(let X of this.#N()){let Q=this.#Z[X],$=this.#Q(Q)?Q.__staleWhileFetching:Q;$!==void 0&&q.call(J,$,this.#$[X],this)}}purgeStale(){let q=!1;for(let J of this.#N({allowStale:!0}))this.#D(J)&&(this.#x(this.#$[J],"expire"),q=!0);return q}info(q){let J=this.#K.get(q);if(J===void 0)return;let X=this.#Z[J],Q=this.#Q(X)?X.__staleWhileFetching:X;if(Q===void 0)return;let $={value:Q};if(this.#F&&this.#O){let Y=this.#F[J],H=this.#O[J];if(Y&&H){let K=Y-(this.#z.now()-H);$.ttl=K,$.start=Date.now()}}return this.#I&&($.size=this.#I[J]),$}dump(){let q=[];for(let J of this.#k({allowStale:!0})){let X=this.#$[J],Q=this.#Z[J],$=this.#Q(Q)?Q.__staleWhileFetching:Q;if($===void 0||X===void 0)continue;let Y={value:$};if(this.#F&&this.#O){Y.ttl=this.#F[J];let H=this.#z.now()-this.#O[J];Y.start=Math.floor(Date.now()-H)}this.#I&&(Y.size=this.#I[J]),q.unshift([X,Y])}return q}load(q){this.clear();for(let[J,X]of q){if(X.start){let Q=Date.now()-X.start;X.start=this.#z.now()-Q}this.#E(J,X.value,X)}}set(q,J,X={}){let{status:Q=U0.hasSubscribers?{}:void 0}=X;X.status=Q,Q&&(Q.op="set",Q.key=q,J!==void 0&&(Q.value=J),Q.cache=this);let $=this.#E(q,J,X);return Q&&U0.hasSubscribers&&U0.publish(Q),$}#E(q,J,X,Q){let{ttl:$=this.ttl,start:Y,noDisposeOnSet:H=this.noDisposeOnSet,sizeCalculation:K=this.sizeCalculation,status:W}=X,U=this.#Q(J);if(J===void 0)return W&&(W.set="deleted"),this.delete(q),this;let{noUpdateTTL:V=this.noUpdateTTL}=X;W&&!U&&(W.value=J);let L=this.#d(q,J,X.size||0,K,W);if(this.maxEntrySize&&L>this.maxEntrySize)return this.#x(q,"set"),W&&(W.set="miss",W.maxEntrySizeExceeded=!0),this;let _=this.#H===0?void 0:this.#K.get(q);if(_===void 0)_=this.#H===0?this.#U:this.#j.length!==0?this.#j.pop():this.#H===this.#J?this.#f(!1):this.#H,this.#$[_]=q,this.#Z[_]=J,this.#K.set(q,_),this.#L[this.#U]=_,this.#R[_]=this.#U,this.#U=_,this.#H++,this.#g(_,L,W),W&&(W.set="add"),V=!1,this.#v&&!U&&this.#Y?.(J,q,"add");else{this.#b(_);let z=this.#Z[_];if(J!==z){if(!H)if(this.#Q(z)){z!==Q&&z.__abortController.abort(Error("replaced"));let{__staleWhileFetching:R}=z;R!==void 0&&R!==J&&(this.#w&&this.#q?.(R,q,"set"),this.#_&&this.#W?.push([R,q,"set"]))}else this.#w&&this.#q?.(z,q,"set"),this.#_&&this.#W?.push([z,q,"set"]);if(this.#y(_),this.#g(_,L,W),this.#Z[_]=J,!U){let R=z&&this.#Q(z)?z.__staleWhileFetching:z,D=R===void 0?"add":J!==R?"replace":"update";W&&(W.set=D,R!==void 0&&(W.oldValue=R)),this.#v&&this.onInsert?.(J,q,D)}}else U||(W&&(W.set="update"),this.#v&&this.onInsert?.(J,q,"update"))}if($!==0&&!this.#F&&this.#u(),this.#F&&(V||this.#p(_,$,Y),W&&this.#P(W,_)),!H&&this.#_&&this.#W){let z=this.#W,R;for(;R=z?.shift();)this.#G?.(...R)}return this}pop(){try{for(;this.#H;){let q=this.#Z[this.#B];if(this.#f(!0),this.#Q(q)){if(q.__staleWhileFetching)return q.__staleWhileFetching}else if(q!==void 0)return q}}finally{if(this.#_&&this.#W){let q=this.#W,J;for(;J=q?.shift();)this.#G?.(...J)}}}#f(q){let J=this.#B,X=this.#$[J],Q=this.#Z[J],$=this.#Q(Q);$&&Q.__abortController.abort(Error("evicted"));let Y=$?Q.__staleWhileFetching:Q;return(this.#w||this.#_)&&Y!==void 0&&(this.#w&&this.#q?.(Y,X,"evict"),this.#_&&this.#W?.push([Y,X,"evict"])),this.#y(J),this.#M?.[J]&&(clearTimeout(this.#M[J]),this.#M[J]=void 0),q&&(this.#$[J]=void 0,this.#Z[J]=void 0,this.#j.push(J)),this.#H===1?(this.#B=this.#U=0,this.#j.length=0):this.#B=this.#L[J],this.#K.delete(X),this.#H--,J}has(q,J={}){let{status:X=U0.hasSubscribers?{}:void 0}=J;J.status=X,X&&(X.op="has",X.key=q,X.cache=this);let Q=this.#o(q,J);return U0.hasSubscribers&&U0.publish(X),Q}#o(q,J={}){let{updateAgeOnHas:X=this.updateAgeOnHas,status:Q}=J,$=this.#K.get(q);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.#P(Q,$));else return X&&this.#C($),Q&&(Q.has="hit",this.#P(Q,$)),!0}else Q&&(Q.has="miss");return!1}peek(q,J={}){let{status:X=c5()?{}:void 0}=J;X&&(X.op="peek",X.key=q,X.cache=this),J.status=X;let Q=this.#s(q,J);return U0.hasSubscribers&&U0.publish(X),Q}#s(q,J){let{status:X,allowStale:Q=this.allowStale}=J,$=this.#K.get(q);if($===void 0||!Q&&this.#D($)){X&&(X.peek=$===void 0?"miss":"stale");return}let Y=this.#Z[$],H=this.#Q(Y)?Y.__staleWhileFetching:Y;return X&&(H!==void 0?(X.peek="hit",X.value=H):X.peek="miss"),H}#m(q,J,X,Q){let $=J===void 0?void 0:this.#Z[J];if(this.#Q($))return $;let Y=new AbortController,{signal:H}=X;H?.addEventListener("abort",()=>Y.abort(H.reason),{signal:Y.signal});let K={signal:Y.signal,options:X,context:Q},W=(R,D=!1)=>{let{aborted:F}=Y.signal,k=X.ignoreFetchAbort&&R!==void 0,M=X.ignoreFetchAbort||!!(X.allowStaleOnFetchAbort&&R!==void 0);if(X.status&&(F&&!D?(X.status.fetchAborted=!0,X.status.fetchError=Y.signal.reason,k&&(X.status.fetchAbortIgnored=!0)):X.status.fetchResolved=!0),F&&!k&&!D)return V(Y.signal.reason,M);let O=_,T=this.#Z[J];return(T===_||T===void 0&&k&&D)&&(R===void 0?O.__staleWhileFetching!==void 0?this.#Z[J]=O.__staleWhileFetching:this.#x(q,"fetch"):(X.status&&(X.status.fetchUpdated=!0),this.#E(q,R,K.options,O))),R},U=(R)=>(X.status&&(X.status.fetchRejected=!0,X.status.fetchError=R),V(R,!1)),V=(R,D)=>{let{aborted:F}=Y.signal,k=F&&X.allowStaleOnFetchAbort,M=k||X.allowStaleOnFetchRejection,O=M||X.noDeleteOnFetchRejection,T=_;if(this.#Z[J]===_&&(!O||!D&&T.__staleWhileFetching===void 0?this.#x(q,"fetch"):k||(this.#Z[J]=T.__staleWhileFetching)),M)return X.status&&T.__staleWhileFetching!==void 0&&(X.status.returnedStale=!0),T.__staleWhileFetching;if(T.__returned===T)throw R},L=(R,D)=>{let F=this.#V?.(q,$,K);Y.signal.addEventListener("abort",()=>{(!X.ignoreFetchAbort||X.allowStaleOnFetchAbort)&&(R(void 0),X.allowStaleOnFetchAbort&&(R=(k)=>W(k,!0)))}),F&&F instanceof Promise?F.then((k)=>R(k===void 0?void 0:k),D):F!==void 0&&R(F)};X.status&&(X.status.fetchDispatched=!0);let _=new Promise(L).then(W,U),z=Object.assign(_,{__abortController:Y,__staleWhileFetching:$,__returned:void 0});return J===void 0?(this.#E(q,z,{...K.options,status:void 0}),J=this.#K.get(q)):this.#Z[J]=z,z}#Q(q){if(!this.#h)return!1;let J=q;return!!J&&J instanceof Promise&&J.hasOwnProperty("__staleWhileFetching")&&J.__abortController instanceof AbortController}fetch(q,J={}){let X=_2.hasSubscribers,{status:Q=c5()?{}:void 0}=J;J.status=Q,Q&&J.context&&(Q.context=J.context);let $=this.#l(q,J);return Q&&X&&(Q.trace=!0,_2.tracePromise(()=>$,Q).catch(()=>{})),$}async#l(q,J={}){let{allowStale:X=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:U=this.noUpdateTTL,noDeleteOnFetchRejection:V=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:L=this.allowStaleOnFetchRejection,ignoreFetchAbort:_=this.ignoreFetchAbort,allowStaleOnFetchAbort:z=this.allowStaleOnFetchAbort,context:R,forceRefresh:D=!1,status:F,signal:k}=J;if(F&&(F.op="fetch",F.key=q,D&&(F.forceRefresh=!0),F.cache=this),!this.#h)return F&&(F.fetch="get"),this.#S(q,{allowStale:X,updateAgeOnGet:Q,noDeleteOnStaleGet:$,status:F});let M={allowStale:X,updateAgeOnGet:Q,noDeleteOnStaleGet:$,ttl:Y,noDisposeOnSet:H,size:K,sizeCalculation:W,noUpdateTTL:U,noDeleteOnFetchRejection:V,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:z,ignoreFetchAbort:_,status:F,signal:k},O=this.#K.get(q);if(O===void 0){F&&(F.fetch="miss");let T=this.#m(q,O,M,R);return T.__returned=T}else{let T=this.#Z[O];if(this.#Q(T)){let w=X&&T.__staleWhileFetching!==void 0;return F&&(F.fetch="inflight",w&&(F.returnedStale=!0)),w?T.__staleWhileFetching:T.__returned=T}let I=this.#D(O);if(!D&&!I)return F&&(F.fetch="hit"),this.#b(O),Q&&this.#C(O),F&&this.#P(F,O),T;let A=this.#m(q,O,M,R),b=A.__staleWhileFetching!==void 0&&X;return F&&(F.fetch=I?"stale":"refresh",b&&I&&(F.returnedStale=!0)),b?A.__staleWhileFetching:A.__returned=A}}forceFetch(q,J={}){let X=_2.hasSubscribers,{status:Q=c5()?{}:void 0}=J;J.status=Q,Q&&J.context&&(Q.context=J.context);let $=this.#r(q,J);return Q&&X&&(Q.trace=!0,_2.tracePromise(()=>$,Q).catch(()=>{})),$}async#r(q,J={}){let X=await this.#l(q,J);if(X===void 0)throw Error("fetch() returned undefined");return X}memo(q,J={}){let{status:X=U0.hasSubscribers?{}:void 0}=J;J.status=X,X&&(X.op="memo",X.key=q,J.context&&(X.context=J.context),X.cache=this);let Q=this.#t(q,J);return X&&(X.value=Q),U0.hasSubscribers&&U0.publish(X),Q}#t(q,J={}){let X=this.#A;if(!X)throw Error("no memoMethod provided to constructor");let{context:Q,status:$,forceRefresh:Y,...H}=J;$&&Y&&($.forceRefresh=!0);let K=this.#S(q,H),W=Y||K===void 0;if($&&($.memo=W?"miss":"hit",W||($.value=K)),!W)return K;let U=X(q,K,{options:H,context:Q});return $&&($.value=U),this.#E(q,U,H),U}get(q,J={}){let{status:X=U0.hasSubscribers?{}:void 0}=J;J.status=X,X&&(X.op="get",X.key=q,X.cache=this);let Q=this.#S(q,J);return X&&(Q!==void 0&&(X.value=Q),U0.hasSubscribers&&U0.publish(X)),Q}#S(q,J={}){let{allowStale:X=this.allowStale,updateAgeOnGet:Q=this.updateAgeOnGet,noDeleteOnStaleGet:$=this.noDeleteOnStaleGet,status:Y}=J,H=this.#K.get(q);if(H===void 0){Y&&(Y.get="miss");return}let K=this.#Z[H],W=this.#Q(K);return Y&&this.#P(Y,H),this.#D(H)?W?(Y&&(Y.get="stale-fetching"),X&&K.__staleWhileFetching!==void 0?(Y&&(Y.returnedStale=!0),K.__staleWhileFetching):void 0):($||this.#x(q,"expire"),Y&&(Y.get="stale"),X?(Y&&(Y.returnedStale=!0),K):void 0):(Y&&(Y.get=W?"fetching":"hit"),this.#b(H),Q&&this.#C(H),W?K.__staleWhileFetching:K)}#n(q,J){this.#R[J]=q,this.#L[q]=J}#b(q){q!==this.#U&&(q===this.#B?this.#B=this.#L[q]:this.#n(this.#R[q],this.#L[q]),this.#n(this.#U,q),this.#U=q)}delete(q){return this.#x(q,"delete")}#x(q,J){U0.hasSubscribers&&U0.publish({op:"delete",delete:J,key:q,cache:this});let X=!1;if(this.#H!==0){let Q=this.#K.get(q);if(Q!==void 0)if(this.#M?.[Q]&&(clearTimeout(this.#M[Q]),this.#M[Q]=void 0),X=!0,this.#H===1)this.#i(J);else{this.#y(Q);let $=this.#Z[Q];if(this.#Q($)?$.__abortController.abort(Error("deleted")):(this.#w||this.#_)&&(this.#w&&this.#q?.($,q,J),this.#_&&this.#W?.push([$,q,J])),this.#K.delete(q),this.#$[Q]=void 0,this.#Z[Q]=void 0,Q===this.#U)this.#U=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.#j.push(Q)}}if(this.#_&&this.#W?.length){let Q=this.#W,$;for(;$=Q?.shift();)this.#G?.(...$)}return X}clear(){return this.#i("delete")}#i(q){for(let J of this.#N({allowStale:!0})){let X=this.#Z[J];if(this.#Q(X))X.__abortController.abort(Error("deleted"));else{let Q=this.#$[J];this.#w&&this.#q?.(X,Q,q),this.#_&&this.#W?.push([X,Q,q])}}if(this.#K.clear(),this.#Z.fill(void 0),this.#$.fill(void 0),this.#F&&this.#O){this.#F.fill(0),this.#O.fill(0);for(let J of this.#M??[])J!==void 0&&clearTimeout(J);this.#M?.fill(void 0)}if(this.#I&&this.#I.fill(0),this.#B=0,this.#U=0,this.#j.length=0,this.#T=0,this.#H=0,this.#_&&this.#W){let J=this.#W,X;for(;X=J?.shift();)this.#G?.(...X)}}}});function ZE(Z,q=300000){let J=new Map,X=new Map,Q=async(...$)=>{let Y=m($),H=J.get(Y),K=Date.now();if(!H){let W=X.get(Y);if(W)return W;let U=Z(...$);X.set(Y,U);try{let V=await U;if(X.get(Y)===U)J.set(Y,{value:V,timestamp:K,refreshing:!1});return V}finally{if(X.get(Y)===U)X.delete(Y)}}if(H&&K-H.timestamp>q&&!H.refreshing){H.refreshing=!0;let W=H;return Z(...$).then((U)=>{if(J.get(Y)===W)J.set(Y,{value:U,timestamp:Date.now(),refreshing:!1})}).catch((U)=>{if(S(U),J.get(Y)===W)J.delete(Y)}),H.value}return J.get(Y).value};return Q.cache={clear:()=>{J.clear(),X.clear()}},Q}function F1(Z,q,J=100){let X=new AQ({max:J}),Q=(...$)=>{let Y=q(...$),H=X.get(Y);if(H!==void 0)return H;let K=Z(...$);return X.set(Y,K),K};return Q.cache={clear:()=>X.clear(),size:()=>X.size,delete:($)=>X.delete($),get:($)=>X.peek($),has:($)=>X.has($)},Q}var E4=B(()=>{TQ();k0();z0()});function e(Z){if(typeof Z!=="object"||Z===null)return!1;let q=Object.getPrototypeOf(Z);return(q===null||q===Object.prototype||Object.getPrototypeOf(q)===null)&&!(Symbol.toStringTag in Z)&&!(Symbol.iterator in Z)}var q1=()=>{};import{fileURLToPath as Vz}from"node:url";var F6=(Z,q)=>{let J=n5(Bz(Z));if(typeof J!=="string")throw TypeError(`${q} must be a string or a file URL: ${J}.`);return J},Bz=(Z)=>l5(Z)?Z.toString():Z,l5=(Z)=>typeof Z!=="string"&&Z&&Object.getPrototypeOf(Z)===String.prototype,n5=(Z)=>Z instanceof URL?Vz(Z):Z;var M6=()=>{};var v4=(Z,q=[],J={})=>{let X=F6(Z,"First argument"),[Q,$]=e(q)?[[],q]:[q,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(!e($))throw TypeError(`Last argument must be an options object: ${$}`);return[X,Y,$]};var i5=B(()=>{q1();M6()});import{StringDecoder as Lz}from"node:string_decoder";var jQ,IQ=(Z)=>jQ.call(Z)==="[object ArrayBuffer]",J0=(Z)=>jQ.call(Z)==="[object Uint8Array]",J1=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),_z,OQ=(Z)=>_z.encode(Z),zz,C4=(Z)=>zz.decode(Z),wQ=(Z,q)=>{return Rz(Z,q).join("")},Rz=(Z,q)=>{if(q==="utf8"&&Z.every(($)=>typeof $==="string"))return Z;let J=new Lz(q),X=Z.map(($)=>typeof $==="string"?OQ($):$).map(($)=>J.write($)),Q=J.end();return Q===""?X:[...X,Q]},z2=(Z)=>{if(Z.length===1&&J0(Z[0]))return Z[0];return a5(Fz(Z))},Fz=(Z)=>Z.map((q)=>typeof q==="string"?OQ(q):q),a5=(Z)=>{let q=new Uint8Array(Mz(Z)),J=0;for(let X of Z)q.set(X,J),J+=X.length;return q},Mz=(Z)=>{let q=0;for(let J of Z)q+=J.length;return q};var T0=B(()=>{({toString:jQ}=Object.prototype),_z=new TextEncoder,zz=new TextDecoder});import{ChildProcess as Dz}from"node:child_process";var PQ=(Z)=>Array.isArray(Z)&&Array.isArray(Z.raw),EQ=(Z,q)=>{let J=[];for(let[$,Y]of Z.entries())J=Az({templates:Z,expressions:q,tokens:J,index:$,template:Y});if(J.length===0)throw TypeError("Template script must not be empty");let[X,...Q]=J;return[X,Q,{}]},Az=({templates:Z,expressions:q,tokens:J,index:X,template:Q})=>{if(Q===void 0)throw TypeError(`Invalid backslash sequence: ${Z.raw[X]}`);let{nextTokens:$,leadingWhitespaces:Y,trailingWhitespaces:H}=Tz(Q,Z.raw[X]),K=NQ(J,$,Y);if(X===q.length)return K;let W=q[X],U=Array.isArray(W)?W.map((V)=>xQ(V)):[xQ(W)];return NQ(K,U,H)},Tz=(Z,q)=>{if(q.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let J=[],X=0,Q=kQ.has(q[0]);for(let Y=0,H=0;Y<Z.length;Y+=1,H+=1){let K=q[H];if(kQ.has(K)){if(X!==Y)J.push(Z.slice(X,Y));X=Y+1}else if(K==="\\"){let W=q[H+1];if(W===`
6
- `)Y-=1,H+=1;else if(W==="u"&&q[H+2]==="{")H=q.indexOf("}",H+3);else H+=jz[W]??1}}let $=X===Z.length;if(!$)J.push(Z.slice(X));return{nextTokens:J,leadingWhitespaces:Q,trailingWhitespaces:$}},kQ,jz,NQ=(Z,q,J)=>J||Z.length===0||q.length===0?[...Z,...q]:[...Z.slice(0,-1),`${Z.at(-1)}${q[0]}`,...q.slice(1)],xQ=(Z)=>{let q=typeof Z;if(q==="string")return Z;if(q==="number")return String(Z);if(e(Z)&&(("stdout"in Z)||("isMaxBuffer"in Z)))return Iz(Z);if(Z instanceof Dz||Object.prototype.toString.call(Z)==="[object Promise]")throw TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");throw TypeError(`Unexpected "${q}" in template expression`)},Iz=({stdout:Z})=>{if(typeof Z==="string")return Z;if(J0(Z))return C4(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 vQ=B(()=>{q1();T0();kQ=new Set([" ","\t","\r",`
7
- `]),jz={x:3,u:5}});import o5 from"node:process";var b0=(Z)=>y4.includes(Z),y4,N0,S4=(Z)=>N0[Z]??`stdio[${Z}]`;var X1=B(()=>{y4=[o5.stdin,o5.stdout,o5.stderr],N0=["stdin","stdout","stderr"]});import{debuglog as Oz}from"node:util";var yQ=(Z)=>{let q={...Z};for(let J of t5)q[J]=s5(Z,J);return q},s5=(Z,q)=>{let J=Array.from({length:wz(Z)+1}),X=kz(Z[q],J,q);return vz(X,q)},wz=({stdio:Z})=>Array.isArray(Z)?Math.max(Z.length,N0.length):N0.length,kz=(Z,q,J)=>e(Z)?Nz(Z,q,J):q.fill(Z),Nz=(Z,q,J)=>{for(let X of Object.keys(Z).sort(xz))for(let Q of Pz(X,J,q))q[Q]=Z[X];return q},xz=(Z,q)=>CQ(Z)<CQ(q)?1:-1,CQ=(Z)=>{if(Z==="stdout"||Z==="stderr")return 0;return Z==="all"?2:1},Pz=(Z,q,J)=>{if(Z==="ipc")return[J.length-1];let X=r5(Z);if(X===void 0||X===0)throw TypeError(`"${q}.${Z}" is invalid.
8
- It must be "${q}.stdout", "${q}.stderr", "${q}.all", "${q}.ipc", or "${q}.fd3", "${q}.fd4" (and so on).`);if(X>=J.length)throw TypeError(`"${q}.${Z}" is invalid: that file descriptor does not exist.
9
- Please set the "stdio" option to ensure that file descriptor exists.`);return X==="all"?[1,2]:[X]},r5=(Z)=>{if(Z==="all")return Z;if(N0.includes(Z))return N0.indexOf(Z);let q=Ez.exec(Z);if(q!==null)return Number(q[1])},Ez,vz=(Z,q)=>Z.map((J)=>J===void 0?yz[q]:J),Cz,yz,t5,Q1=(Z,q)=>q==="ipc"?Z.at(-1):Z[q];var $1=B(()=>{q1();X1();Ez=/^fd(\d+)$/,Cz=Oz("execa").enabled?"full":"none",yz={lines:!1,buffer:!0,maxBuffer:1e8,verbose:Cz,stripFinalNewline:!0},t5=["lines","buffer","maxBuffer","verbose","stripFinalNewline"]});var D6=({verbose:Z},q)=>e5(Z,q)!=="none",A6=({verbose:Z},q)=>!["none","short"].includes(e5(Z,q)),SQ=({verbose:Z},q)=>{let J=e5(Z,q);return b4(J)?J:void 0},e5=(Z,q)=>q===void 0?Sz(Z):Q1(Z,q),Sz=(Z)=>Z.find((q)=>b4(q))??h4.findLast((q)=>Z.includes(q)),b4=(Z)=>typeof Z==="function",h4;var M1=B(()=>{$1();h4=["none","short","full"]});import{platform as bz}from"node:process";import{stripVTControlCharacters as hz}from"node:util";var bQ=(Z,q)=>{let J=[Z,...q],X=J.join(" "),Q=J.map(($)=>dz(hQ($))).join(" ");return{command:X,escapedCommand:Q}},R2=(Z)=>hz(Z).split(`
10
- `).map((q)=>hQ(q)).join(`
11
- `),hQ=(Z)=>Z.replaceAll(mz,(q)=>gz(q)),gz=(Z)=>{let q=uz[Z];if(q!==void 0)return q;let J=Z.codePointAt(0),X=J.toString(16);return J<=pz?`\\u${X.padStart(4,"0")}`:`\\U${X}`},fz=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},mz,uz,pz=65535,dz=(Z)=>{if(cz.test(Z))return Z;return bz==="win32"?`"${Z.replaceAll('"','""')}"`:`'${Z.replaceAll("'","'\\''")}'`},cz;var g4=B(()=>{mz=fz(),uz={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},cz=/^[\w./-]+$/});import gQ from"node:process";function Z3(){let{env:Z}=gQ,{TERM:q,TERM_PROGRAM:J}=Z;if(gQ.platform!=="win32")return q!=="linux";return Boolean(Z.WT_SESSION)||Boolean(Z.TERMINUS_SUBLIME)||Z.ConEmuTask==="{cmd::Cmder}"||J==="Terminus-Sublime"||J==="vscode"||q==="xterm-256color"||q==="alacritty"||q==="rxvt-unicode"||q==="rxvt-unicode-256color"||Z.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var fQ=()=>{};var mQ,uQ,lz,nz,iz,az,oz,f4,NE;var pQ=B(()=>{fQ();mQ={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:"╱"},uQ={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:"⅒"},lz={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"},nz={...mQ,...uQ},iz={...mQ,...lz},az=Z3(),oz=az?nz:iz,f4=oz,NE=Object.entries(uQ)});import sz from"node:tty";var rz,y=(Z,q)=>{if(!rz)return(Q)=>Q;let J=`\x1B[${Z}m`,X=`\x1B[${q}m`;return(Q)=>{let $=Q+"",Y=$.indexOf(X);if(Y===-1)return J+$+X;let H=J,K=0,U=(q===22?X:"")+J;while(Y!==-1)H+=$.slice(K,Y)+U,K=Y+X.length,Y=$.indexOf(X,K);return H+=$.slice(K)+X,H}},EE,dQ,vE,CE,yE,SE,bE,hE,gE,fE,mE,uE,pE,dE,cE,lE,nE,m4,iE,aE,oE,sE,rE,tE,eE,Zv,qv,cQ,Jv,lQ,Xv,Qv,$v,Yv,Hv,Gv,Kv,Uv,Wv,Vv,Bv;var nQ=B(()=>{rz=sz?.WriteStream?.prototype?.hasColors?.()??!1,EE=y(0,0),dQ=y(1,22),vE=y(2,22),CE=y(3,23),yE=y(4,24),SE=y(53,55),bE=y(7,27),hE=y(8,28),gE=y(9,29),fE=y(30,39),mE=y(31,39),uE=y(32,39),pE=y(33,39),dE=y(34,39),cE=y(35,39),lE=y(36,39),nE=y(37,39),m4=y(90,39),iE=y(40,49),aE=y(41,49),oE=y(42,49),sE=y(43,49),rE=y(44,49),tE=y(45,49),eE=y(46,49),Zv=y(47,49),qv=y(100,49),cQ=y(91,39),Jv=y(92,39),lQ=y(93,39),Xv=y(94,39),Qv=y(95,39),$v=y(96,39),Yv=y(97,39),Hv=y(101,49),Gv=y(102,49),Kv=y(103,49),Uv=y(104,49),Wv=y(105,49),Vv=y(106,49),Bv=y(107,49)});var iQ=B(()=>{nQ()});var sQ=({type:Z,message:q,timestamp:J,piped:X,commandId:Q,result:{failed:$=!1}={},options:{reject:Y=!0}})=>{let H=tz(J),K=ez[Z]({failed:$,reject:Y,piped:X}),W=ZR[Z]({reject:Y});return`${m4(`[${H}]`)} ${m4(`[${Q}]`)} ${W(K)} ${W(q)}`},tz=(Z)=>`${u4(Z.getHours(),2)}:${u4(Z.getMinutes(),2)}:${u4(Z.getSeconds(),2)}.${u4(Z.getMilliseconds(),3)}`,u4=(Z,q)=>String(Z).padStart(q,"0"),aQ=({failed:Z,reject:q})=>{if(!Z)return f4.tick;return q?f4.cross:f4.warning},ez,oQ=(Z)=>Z,ZR;var rQ=B(()=>{pQ();iQ();ez={command:({piped:Z})=>Z?"|":"$",output:()=>" ",ipc:()=>"*",error:aQ,duration:aQ},ZR={command:()=>dQ,output:()=>oQ,ipc:()=>oQ,error:({reject:Z})=>Z?cQ:lQ,duration:()=>m4}});var tQ=(Z,q,J)=>{let X=SQ(q,J);return Z.map(({verboseLine:Q,verboseObject:$})=>qR(Q,$,X)).filter((Q)=>Q!==void 0).map((Q)=>JR(Q)).join("")},qR=(Z,q,J)=>{if(J===void 0)return Z;let X=J(Z,q);if(typeof X==="string")return X},JR=(Z)=>Z.endsWith(`
12
- `)?Z:`${Z}
13
- `;var eQ=B(()=>{M1()});import{inspect as XR}from"node:util";var c0=({type:Z,verboseMessage:q,fdNumber:J,verboseInfo:X,result:Q})=>{let $=QR({type:Z,result:Q,verboseInfo:X}),Y=$R(q,$),H=tQ(Y,X,J);if(H!=="")console.warn(H.slice(0,-1))},QR=({type:Z,result:q,verboseInfo:{escapedCommand:J,commandId:X,rawOptions:{piped:Q=!1,...$}}})=>({type:Z,escapedCommand:J,commandId:`${X}`,timestamp:new Date,piped:Q,result:q,options:$}),$R=(Z,q)=>Z.split(`
14
- `).map((J)=>YR({...q,message:J})),YR=(Z)=>{return{verboseLine:sQ(Z),verboseObject:Z}},p4=(Z)=>{let q=typeof Z==="string"?Z:XR(Z);return R2(q).replaceAll("\t"," ".repeat(HR))},HR=2;var T6=B(()=>{g4();rQ();eQ()});var Z$=(Z,q)=>{if(!D6(q))return;c0({type:"command",verboseMessage:Z,verboseInfo:q})};var q$=B(()=>{M1();T6()});var J$=(Z,q,J)=>{UR(Z);let X=GR(Z);return{verbose:Z,escapedCommand:q,commandId:X,rawOptions:J}},GR=(Z)=>D6({verbose:Z})?KR++:void 0,KR=0n,UR=(Z)=>{for(let q of Z){if(q===!1)throw TypeError(`The "verbose: false" option was renamed to "verbose: 'none'".`);if(q===!0)throw TypeError(`The "verbose: true" option was renamed to "verbose: 'short'".`);if(!h4.includes(q)&&!b4(q)){let J=h4.map((X)=>`'${X}'`).join(", ");throw TypeError(`The "verbose" option must not be ${q}. Allowed values are: ${J} or a function.`)}}};var X$=B(()=>{M1()});import{hrtime as Q$}from"node:process";var d4=()=>Q$.bigint(),q3=(Z)=>Number(Q$.bigint()-Z)/1e6;var c4=()=>{};var l4=(Z,q,J)=>{let X=d4(),{command:Q,escapedCommand:$}=bQ(Z,q),Y=s5(J,"verbose"),H=J$(Y,$,{...J});return Z$($,H),{command:Q,escapedCommand:$,startTime:X,verboseInfo:H}};var J3=B(()=>{q$();X$();c4();g4();$1()});function n4(Z={}){let{env:q=process.env,platform:J=process.platform}=Z;if(J!=="win32")return"PATH";return Object.keys(q).reverse().find((X)=>X.toUpperCase()==="PATH")||"Path"}var $$=()=>{};var Y$=()=>{};import{promisify as WR}from"node:util";import{execFile as VR,execFileSync as lv}from"node:child_process";import H$ from"node:path";import{fileURLToPath as BR}from"node:url";function i4(Z){return Z instanceof URL?BR(Z):Z}function G$(Z){return{*[Symbol.iterator](){let q=H$.resolve(i4(Z)),J;while(J!==q)yield q,J=q,q=H$.resolve(q,"..")}}}var av;var K$=B(()=>{Y$();av=WR(VR)});import a4 from"node:process";import S1 from"node:path";var LR=({cwd:Z=a4.cwd(),path:q=a4.env[n4()],preferLocal:J=!0,execPath:X=a4.execPath,addExecPath:Q=!0}={})=>{let $=S1.resolve(i4(Z)),Y=[],H=q.split(S1.delimiter);if(J)_R(Y,H,$);if(Q)zR(Y,H,X,$);return q===""||q===S1.delimiter?`${Y.join(S1.delimiter)}${q}`:[...Y,q].join(S1.delimiter)},_R=(Z,q,J)=>{for(let X of G$(J)){let Q=S1.join(X,"node_modules/.bin");if(!q.includes(Q))Z.push(Q)}},zR=(Z,q,J,X)=>{let Q=S1.resolve(X,i4(J),"..");if(!q.includes(Q))Z.push(Q)},U$=({env:Z=a4.env,...q}={})=>{Z={...Z};let J=n4({env:Z});return q.path=Z[J],Z[J]=LR(q),Z};var W$=B(()=>{$$();K$()});var V$=(Z,q,J)=>{let X=J?s4:o4,Q=Z instanceof l0?{}:{cause:Z};return new X(q,Q)},l0,B$=(Z,q)=>{Object.defineProperty(Z.prototype,"name",{value:q,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(Z.prototype,_$,{value:!0,writable:!1,enumerable:!1,configurable:!1})},L$=(Z)=>r4(Z)&&(_$ in Z),_$,r4=(Z)=>Object.prototype.toString.call(Z)==="[object Error]",o4,s4;var b1=B(()=>{l0=class l0 extends Error{};_$=Symbol("isExecaError");o4=class o4 extends Error{};B$(o4,o4.name);s4=class s4 extends Error{};B$(s4,s4.name)});var z$=()=>{let Z=X3-R$+1;return Array.from({length:Z},RR)},RR=(Z,q)=>({name:`SIGRT${q+1}`,number:R$+q,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),R$=34,X3=64;var Q3=()=>{};var F$;var M$=B(()=>{F$=[{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 FR}from"node:os";var $3=()=>{let Z=z$();return[...F$,...Z].map(MR)},MR=({name:Z,number:q,description:J,action:X,forced:Q=!1,standard:$})=>{let{signals:{[Z]:Y}}=FR,H=Y!==void 0;return{name:Z,number:H?Y:q,description:J,supported:H,action:X,forced:Q,standard:$}};var D$=B(()=>{M$();Q3()});import{constants as DR}from"node:os";var AR=()=>{let Z=$3();return Object.fromEntries(Z.map(TR))},TR=({name:Z,number:q,description:J,supported:X,action:Q,forced:$,standard:Y})=>[Z,{name:Z,number:q,description:J,supported:X,action:Q,forced:$,standard:Y}],A$,jR=()=>{let Z=$3(),q=X3+1,J=Array.from({length:q},(X,Q)=>IR(Q,Z));return Object.assign({},...J)},IR=(Z,q)=>{let J=OR(Z,q);if(J===void 0)return{};let{name:X,description:Q,supported:$,action:Y,forced:H,standard:K}=J;return{[Z]:{name:X,number:Z,description:Q,supported:$,action:Y,forced:H,standard:K}}},OR=(Z,q)=>{let J=q.find(({name:X})=>DR.signals[X]===Z);if(J!==void 0)return J;return q.find((X)=>X.number===Z)},VC;var T$=B(()=>{Q3();D$();A$=AR(),VC=jR()});import{constants as F2}from"node:os";var I$=(Z)=>{if(Z===0)throw TypeError("Invalid option `killSignal`: 0 cannot be used.");return w$(Z,"option `killSignal`")},O$=(Z)=>Z===0?Z:w$(Z,"`subprocess.kill()`'s argument"),w$=(Z,q)=>{if(Number.isInteger(Z))return wR(Z,q);if(typeof Z==="string")return NR(Z,q);throw TypeError(`Invalid ${q} ${String(Z)}: it must be a string or an integer.
15
- ${Y3()}`)},wR=(Z,q)=>{if(j$.has(Z))return j$.get(Z);throw TypeError(`Invalid ${q} ${Z}: this signal integer does not exist.
16
- ${Y3()}`)},kR=()=>new Map(Object.entries(F2.signals).reverse().map(([Z,q])=>[q,Z])),j$,NR=(Z,q)=>{if(Z in F2.signals)return Z;if(Z.toUpperCase()in F2.signals)throw TypeError(`Invalid ${q} '${Z}': please rename it to '${Z.toUpperCase()}'.`);throw TypeError(`Invalid ${q} '${Z}': this signal name does not exist.
17
- ${Y3()}`)},Y3=()=>`Available signal names: ${xR()}.
18
- Available signal numbers: ${PR()}.`,xR=()=>Object.keys(F2.signals).sort().map((Z)=>`'${Z}'`).join(", "),PR=()=>[...new Set(Object.values(F2.signals).sort((Z,q)=>Z-q))].join(", "),t4=(Z)=>A$[Z].description;var M2=B(()=>{T$();j$=kR()});import{setTimeout as ER}from"node:timers/promises";var k$=(Z)=>{if(Z===!1)return Z;if(Z===!0)return vR;if(!Number.isFinite(Z)||Z<0)throw TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${Z}\` (${typeof Z})`);return Z},vR=5000,N$=({kill:Z,options:{forceKillAfterDelay:q,killSignal:J},onInternalError:X,context:Q,controller:$},Y,H)=>{let{signal:K,error:W}=CR(Y,H,J);yR(W,X);let U=Z(K);return SR({kill:Z,signal:K,forceKillAfterDelay:q,killSignal:J,killResult:U,context:Q,controller:$}),U},CR=(Z,q,J)=>{let[X=J,Q]=r4(Z)?[void 0,Z]:[Z,q];if(typeof X!=="string"&&!Number.isInteger(X))throw TypeError(`The first argument must be an error instance or a signal name string/integer: ${String(X)}`);if(Q!==void 0&&!r4(Q))throw TypeError(`The second argument is optional. If specified, it must be an error instance: ${Q}`);return{signal:O$(X),error:Q}},yR=(Z,q)=>{if(Z!==void 0)q.reject(Z)},SR=async({kill:Z,signal:q,forceKillAfterDelay:J,killSignal:X,killResult:Q,context:$,controller:Y})=>{if(q===X&&Q)H3({kill:Z,forceKillAfterDelay:J,context:$,controllerSignal:Y.signal})},H3=async({kill:Z,forceKillAfterDelay:q,context:J,controllerSignal:X})=>{if(q===!1)return;try{if(await ER(q,void 0,{signal:X}),Z("SIGKILL"))J.isForcefullyTerminated??=!0}catch{}};var e4=B(()=>{b1();M2()});import{once as bR}from"node:events";var Z8=async(Z,q)=>{if(!Z.aborted)await bR(Z,"abort",{signal:q})};var G3=()=>{};var x$=({cancelSignal:Z})=>{if(Z!==void 0&&Object.prototype.toString.call(Z)!=="[object AbortSignal]")throw Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(Z)}`)},P$=({subprocess:Z,cancelSignal:q,gracefulCancel:J,context:X,controller:Q})=>q===void 0||J?[]:[hR(Z,q,X,Q)],hR=async(Z,q,J,{signal:X})=>{throw await Z8(q,X),J.terminationReason??="cancel",Z.kill(),q.reason};var K3=B(()=>{G3()});var j6=({methodName:Z,isSubprocess:q,ipc:J,isConnected:X})=>{gR(Z,q,J),U3(Z,q,X)},gR=(Z,q,J)=>{if(!J)throw Error(`${h0(Z,q)} can only be used if the \`ipc\` option is \`true\`.`)},U3=(Z,q,J)=>{if(!J)throw Error(`${h0(Z,q)} cannot be used: the ${D1(q)} has already exited or disconnected.`)},E$=(Z)=>{throw Error(`${h0("getOneMessage",Z)} could not complete: the ${D1(Z)} exited or disconnected.`)},v$=(Z)=>{throw Error(`${h0("sendMessage",Z)} failed: the ${D1(Z)} is sending a message too, instead of listening to incoming messages.
19
- This can be fixed by both sending a message and listening to incoming messages at the same time:
20
-
21
- const [receivedMessage] = await Promise.all([
22
- ${h0("getOneMessage",Z)},
23
- ${h0("sendMessage",Z,"message, {strict: true}")},
24
- ]);`)},q8=(Z,q)=>Error(`${h0("sendMessage",q)} failed when sending an acknowledgment response to the ${D1(q)}.`,{cause:Z}),C$=(Z)=>{throw Error(`${h0("sendMessage",Z)} failed: the ${D1(Z)} is not listening to incoming messages.`)},y$=(Z)=>{throw Error(`${h0("sendMessage",Z)} failed: the ${D1(Z)} exited without listening to incoming messages.`)},S$=()=>Error(`\`cancelSignal\` aborted: the ${D1(!0)} disconnected.`),b$=()=>{throw Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},h$=({error:Z,methodName:q,isSubprocess:J})=>{if(Z.code==="EPIPE")throw Error(`${h0(q,J)} cannot be used: the ${D1(J)} is disconnecting.`,{cause:Z})},g$=({error:Z,methodName:q,isSubprocess:J,message:X})=>{if(fR(Z))throw Error(`${h0(q,J)}'s argument type is invalid: the message cannot be serialized: ${String(X)}.`,{cause:Z})},fR=({code:Z,message:q})=>mR.has(Z)||uR.some((J)=>q.includes(J)),mR,uR,h0=(Z,q,J="")=>Z==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${pR(q)}${Z}(${J})`,pR=(Z)=>Z?"":"subprocess.",D1=(Z)=>Z?"parent process":"subprocess",I6=(Z)=>{if(Z.connected)Z.disconnect()};var O6=B(()=>{mR=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),uR=["could not be cloned","circular structure","call stack size exceeded"]});var n0=()=>{let Z={},q=new Promise((J,X)=>{Object.assign(Z,{resolve:J,reject:X})});return Object.assign(q,Z)};var w6=()=>{};var X8=(Z,q="stdin")=>{let{options:X,fileDescriptors:Q}=i0.get(Z),$=f$(Q,q,!0),Y=Z.stdio[$];if(Y===null)throw TypeError(m$($,q,X,!0));return Y},k6=(Z,q="stdout")=>{let{options:X,fileDescriptors:Q}=i0.get(Z),$=f$(Q,q,!1),Y=$==="all"?Z.all:Z.stdio[$];if(Y===null||Y===void 0)throw TypeError(m$($,q,X,!1));return Y},i0,f$=(Z,q,J)=>{let X=dR(q,J);return cR(X,q,J,Z),X},dR=(Z,q)=>{let J=r5(Z);if(J!==void 0)return J;let{validOptions:X,defaultValue:Q}=q?{validOptions:'"stdin"',defaultValue:"stdin"}:{validOptions:'"stdout", "stderr", "all"',defaultValue:"stdout"};throw TypeError(`"${D2(q)}" must not be "${Z}".
25
- It must be ${X} or "fd3", "fd4" (and so on).
26
- It is optional and defaults to "${Q}".`)},cR=(Z,q,J,X)=>{let Q=X[u$(Z)];if(Q===void 0)throw TypeError(`"${D2(J)}" must not be ${q}. That file descriptor does not exist.
27
- Please set the "stdio" option to ensure that file descriptor exists.`);if(Q.direction==="input"&&!J)throw TypeError(`"${D2(J)}" must not be ${q}. It must be a readable stream, not writable.`);if(Q.direction!=="input"&&J)throw TypeError(`"${D2(J)}" must not be ${q}. It must be a writable stream, not readable.`)},m$=(Z,q,J,X)=>{if(Z==="all"&&!J.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:Q,optionValue:$}=lR(Z,J);return`The "${Q}: ${J8($)}" option is incompatible with using "${D2(X)}: ${J8(q)}".
28
- Please set this option with "pipe" instead.`},lR=(Z,{stdin:q,stdout:J,stderr:X,stdio:Q})=>{let $=u$(Z);if($===0&&q!==void 0)return{optionName:"stdin",optionValue:q};if($===1&&J!==void 0)return{optionName:"stdout",optionValue:J};if($===2&&X!==void 0)return{optionName:"stderr",optionValue:X};return{optionName:`stdio[${$}]`,optionValue:Q[$]}},u$=(Z)=>Z==="all"?1:Z,D2=(Z)=>Z?"to":"from",J8=(Z)=>{if(typeof Z==="string")return`'${Z}'`;return typeof Z==="number"?`${Z}`:"Stream"};var A1=B(()=>{$1();i0=new WeakMap});import{addAbortListener as nR}from"node:events";var h1=(Z,q,J)=>{let X=Z.getMaxListeners();if(X===0||X===Number.POSITIVE_INFINITY)return;Z.setMaxListeners(X+q),nR(J,()=>{Z.setMaxListeners(Z.getMaxListeners()-q)})};var Q8=()=>{};var $8=(Z,q)=>{if(q)W3(Z)},W3=(Z)=>{Z.refCounted()},Y8=(Z,q)=>{if(q)V3(Z)},V3=(Z)=>{Z.unrefCounted()},p$=(Z,q)=>{if(q)V3(Z),V3(Z)},d$=(Z,q)=>{if(q)W3(Z),W3(Z)};var A2=()=>{};import{once as iR}from"node:events";import{scheduler as aR}from"node:timers/promises";var c$=async({anyProcess:Z,channel:q,isSubprocess:J,ipcEmitter:X},Q)=>{if(a$(Q)||s$(Q))return;if(!H8.has(Z))H8.set(Z,[]);let $=H8.get(Z);if($.push(Q),$.length>1)return;while($.length>0){await o$(Z,X,Q),await aR.yield();let Y=await i$({wrappedMessage:$[0],anyProcess:Z,channel:q,isSubprocess:J,ipcEmitter:X});$.shift(),X.emit("message",Y),X.emit("message:done")}},l$=async({anyProcess:Z,channel:q,isSubprocess:J,ipcEmitter:X,boundOnMessage:Q})=>{B3();let $=H8.get(Z);while($?.length>0)await iR(X,"message:done");Z.removeListener("message",Q),d$(q,J),X.connected=!1,X.emit("disconnect")},H8;var n$=B(()=>{K8();A2();G8();U8();H8=new WeakMap});import{EventEmitter as oR}from"node:events";var T1=(Z,q,J)=>{if(W8.has(Z))return W8.get(Z);let X=new oR;return X.connected=!0,W8.set(Z,X),sR({ipcEmitter:X,anyProcess:Z,channel:q,isSubprocess:J}),X},W8,sR=({ipcEmitter:Z,anyProcess:q,channel:J,isSubprocess:X})=>{let Q=c$.bind(void 0,{anyProcess:q,channel:J,isSubprocess:X,ipcEmitter:Z});q.on("message",Q),q.once("disconnect",l$.bind(void 0,{anyProcess:q,channel:J,isSubprocess:X,ipcEmitter:Z,boundOnMessage:Q})),p$(J,X)},V8=(Z)=>{let q=W8.get(Z);return q===void 0?Z.channel!==null:q.connected};var T2=B(()=>{n$();A2();W8=new WeakMap});import{once as rR}from"node:events";var r$=({anyProcess:Z,channel:q,isSubprocess:J,message:X,strict:Q})=>{if(!Q)return X;let $=T1(Z,q,J),Y=_8(Z,$);return{id:tR++,type:L8,message:X,hasListeners:Y}},tR=0n,t$=(Z,q)=>{if(q?.type!==L8||q.hasListeners)return;for(let{id:J}of Z)if(J!==void 0)B8[J].resolve({isDeadlock:!0,hasListeners:!1})},i$=async({wrappedMessage:Z,anyProcess:q,channel:J,isSubprocess:X,ipcEmitter:Q})=>{if(Z?.type!==L8||!q.connected)return Z;let{id:$,message:Y}=Z,H={id:$,type:Z9,message:_8(q,Q)};try{await z8({anyProcess:q,channel:J,isSubprocess:X,ipc:!0},H)}catch(K){Q.emit("strict:error",K)}return Y},a$=(Z)=>{if(Z?.type!==Z9)return!1;let{id:q,message:J}=Z;return B8[q]?.resolve({isDeadlock:!1,hasListeners:J}),!0},e$=async(Z,q,J)=>{if(Z?.type!==L8)return;let X=n0();B8[Z.id]=X;let Q=new AbortController;try{let{isDeadlock:$,hasListeners:Y}=await Promise.race([X,eR(q,J,Q)]);if($)v$(J);if(!Y)C$(J)}finally{Q.abort(),delete B8[Z.id]}},B8,eR=async(Z,q,{signal:J})=>{h1(Z,1,J),await rR(Z,"disconnect",{signal:J}),y$(q)},L8="execa:ipc:request",Z9="execa:ipc:response";var G8=B(()=>{w6();Q8();R8();O6();T2();K8();B8={}});var q9=(Z,q,J)=>{if(!j2.has(Z))j2.set(Z,new Set);let X=j2.get(Z),Q=n0(),$=J?q.id:void 0,Y={onMessageSent:Q,id:$};return X.add(Y),{outgoingMessages:X,outgoingMessage:Y}},J9=({outgoingMessages:Z,outgoingMessage:q})=>{Z.delete(q),q.onMessageSent.resolve()},o$=async(Z,q,J)=>{while(!_8(Z,q)&&j2.get(Z)?.size>0){let X=[...j2.get(Z)];t$(X,J),await Promise.all(X.map(({onMessageSent:Q})=>Q))}},j2,_8=(Z,q)=>q.listenerCount("message")>ZF(Z),ZF=(Z)=>i0.has(Z)&&!Q1(i0.get(Z).options.buffer,"ipc")?1:0;var K8=B(()=>{w6();$1();A1();G8();j2=new WeakMap});import{promisify as qF}from"node:util";var z8=({anyProcess:Z,channel:q,isSubprocess:J,ipc:X},Q,{strict:$=!1}={})=>{return j6({methodName:"sendMessage",isSubprocess:J,ipc:X,isConnected:Z.connected}),JF({anyProcess:Z,channel:q,methodName:"sendMessage",isSubprocess:J,message:Q,strict:$})},JF=async({anyProcess:Z,channel:q,methodName:J,isSubprocess:X,message:Q,strict:$})=>{let Y=r$({anyProcess:Z,channel:q,isSubprocess:X,message:Q,strict:$}),H=q9(Z,Y,$);try{await _3({anyProcess:Z,methodName:J,isSubprocess:X,wrappedMessage:Y,message:Q})}catch(K){throw I6(Z),K}finally{J9(H)}},_3=async({anyProcess:Z,methodName:q,isSubprocess:J,wrappedMessage:X,message:Q})=>{let $=XF(Z);try{await Promise.all([e$(X,Z,J),$(X)])}catch(Y){throw h$({error:Y,methodName:q,isSubprocess:J}),g$({error:Y,methodName:q,isSubprocess:J,message:Q}),Y}},XF=(Z)=>{if(L3.has(Z))return L3.get(Z);let q=qF(Z.send.bind(Z));return L3.set(Z,q),q},L3;var R8=B(()=>{O6();K8();G8();L3=new WeakMap});import{scheduler as QF}from"node:timers/promises";var Q9=(Z,q)=>{return U3("cancelSignal",!1,Z.connected),_3({anyProcess:Z,methodName:"cancelSignal",isSubprocess:!1,wrappedMessage:{type:Y9,message:q},message:q})},$9=async({anyProcess:Z,channel:q,isSubprocess:J,ipc:X})=>{return await $F({anyProcess:Z,channel:q,isSubprocess:J,ipc:X}),z3.signal},$F=async({anyProcess:Z,channel:q,isSubprocess:J,ipc:X})=>{if(X9)return;if(X9=!0,!X){b$();return}if(q===null){B3();return}T1(Z,q,J),await QF.yield()},X9=!1,s$=(Z)=>{if(Z?.type!==Y9)return!1;return z3.abort(Z.message),!0},Y9="execa:ipc:cancel",B3=()=>{z3.abort(S$())},z3;var U8=B(()=>{R8();T2();O6();z3=new AbortController});var H9=({gracefulCancel:Z,cancelSignal:q,ipc:J,serialization:X})=>{if(!Z)return;if(q===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(X==="json")throw Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")},G9=({subprocess:Z,cancelSignal:q,gracefulCancel:J,forceKillAfterDelay:X,context:Q,controller:$})=>J?[YF({subprocess:Z,cancelSignal:q,forceKillAfterDelay:X,context:Q,controller:$})]:[],YF=async({subprocess:Z,cancelSignal:q,forceKillAfterDelay:J,context:X,controller:{signal:Q}})=>{await Z8(q,Q);let $=HF(q);throw await Q9(Z,$),H3({kill:Z.kill,forceKillAfterDelay:J,context:X,controllerSignal:Q}),X.terminationReason??="gracefulCancel",q.reason},HF=({reason:Z})=>{if(!(Z instanceof DOMException))return Z;let q=Error(Z.message);return Object.defineProperty(q,"stack",{value:Z.stack,enumerable:!1,configurable:!0,writable:!0}),q};var R3=B(()=>{G3();U8();e4()});import{setTimeout as GF}from"node:timers/promises";var K9=({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})`)},U9=(Z,q,J,X)=>q===0||q===void 0?[]:[KF(Z,q,J,X)],KF=async(Z,q,J,{signal:X})=>{throw await GF(q,void 0,{signal:X}),J.terminationReason??="timeout",Z.kill(),new l0};var F3=B(()=>{b1()});import{execPath as UF,execArgv as WF}from"node:process";import W9 from"node:path";var V9=({options:Z})=>{if(Z.node===!1)throw TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...Z,node:!0}}},B9=(Z,q,{node:J=!1,nodePath:X=UF,nodeOptions:Q=WF.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=F6(X,'The "nodePath" option'),W=W9.resolve($,K),U={...H,nodePath:W,node:J,cwd:$};if(!J)return[Z,q,U];if(W9.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,...q],{ipc:!0,...U,shell:!1}]};var M3=B(()=>{M6()});import{serialize as VF}from"node:v8";var L9=({ipcInput:Z,ipc:q,serialization:J})=>{if(Z===void 0)return;if(!q)throw Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");_F[J](Z)},BF=(Z)=>{try{VF(Z)}catch(q){throw Error("The `ipcInput` option is not serializable with a structured clone.",{cause:q})}},LF=(Z)=>{try{JSON.stringify(Z)}catch(q){throw Error("The `ipcInput` option is not serializable with JSON.",{cause:q})}},_F,_9=async(Z,q)=>{if(q===void 0)return;await Z.sendMessage(q)};var D3=B(()=>{_F={advanced:BF,json:LF}});var R9=({encoding:Z})=>{if(A3.has(Z))return;let q=RF(Z);if(q!==void 0)throw TypeError(`Invalid option \`encoding: ${F8(Z)}\`.
29
- Please rename it to ${F8(q)}.`);let J=[...A3].map((X)=>F8(X)).join(", ");throw TypeError(`Invalid option \`encoding: ${F8(Z)}\`.
30
- Please rename it to one of: ${J}.`)},zF,j0,A3,RF=(Z)=>{if(Z===null)return"buffer";if(typeof Z!=="string")return;let q=Z.toLowerCase();if(q in z9)return z9[q];if(A3.has(q))return q},z9,F8=(Z)=>typeof Z==="string"?`"${Z}"`:String(Z);var g1=B(()=>{zF=new Set(["utf8","utf16le"]),j0=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),A3=new Set([...zF,...j0]),z9={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"}});import{statSync as FF}from"node:fs";import MF from"node:path";import DF from"node:process";var F9=(Z=M9())=>{let q=F6(Z,'The "cwd" option');return MF.resolve(q)},M9=()=>{try{return DF.cwd()}catch(Z){throw Z.message=`The current directory does not exist.
31
- ${Z.message}`,Z}},D9=(Z,q)=>{if(q===M9())return Z;let J;try{J=FF(q)}catch(X){return`The "cwd" option is invalid: ${q}.
32
- ${X.message}
33
- ${Z}`}if(!J.isDirectory())return`The "cwd" option is not a directory: ${q}.
34
- ${Z}`;return Z};var T3=B(()=>{M6()});import AF from"node:path";import T9 from"node:process";var j9,M8=(Z,q,J)=>{J.cwd=F9(J.cwd);let[X,Q,$]=B9(Z,q,J),{command:Y,args:H,options:K}=j9.default._parse(X,Q,$),W=yQ(K),U=TF(W);if(K9(U),R9(U),L9(U),x$(U),H9(U),U.shell=n5(U.shell),U.env=jF(U),U.killSignal=I$(U.killSignal),U.forceKillAfterDelay=k$(U.forceKillAfterDelay),U.lines=U.lines.map((V,L)=>V&&!j0.has(U.encoding)&&U.buffer[L]),T9.platform==="win32"&&AF.basename(Y,".exe")==="cmd")H.unshift("/q");return{file:Y,commandArguments:H,options:U}},TF=({extendEnv:Z=!0,preferLocal:q=!1,cwd:J,localDir:X=J,encoding:Q="utf8",reject:$=!0,cleanup:Y=!0,all:H=!1,windowsHide:K=!0,killSignal:W="SIGTERM",forceKillAfterDelay:U=!0,gracefulCancel:V=!1,ipcInput:L,ipc:_=L!==void 0||V,serialization:z="advanced",...R})=>({...R,extendEnv:Z,preferLocal:q,cwd:J,localDirectory:X,encoding:Q,reject:$,cleanup:Y,all:H,windowsHide:K,killSignal:W,forceKillAfterDelay:U,gracefulCancel:V,ipcInput:L,ipc:_,serialization:z}),jF=({env:Z,extendEnv:q,preferLocal:J,node:X,localDirectory:Q,nodePath:$})=>{let Y=q?{...T9.env,...Z}:Z;if(J||X)return U$({env:Y,cwd:Q,execPath:$,preferLocal:J,addExecPath:X});return Y};var j3=B(()=>{W$();e4();M2();K3();R3();F3();M3();D3();g1();T3();M6();$1();j9=A9(u5(),1)});var D8=(Z,q,J)=>J.shell&&q.length>0?[[Z,...q].join(" "),[],J]:[Z,q,J];var I3=()=>{};function N6(Z){if(typeof Z==="string")return IF(Z);if(!(ArrayBuffer.isView(Z)&&Z.BYTES_PER_ELEMENT===1))throw Error("Input must be a string or a Uint8Array");return OF(Z)}var IF=(Z)=>Z.at(-1)===I9?Z.slice(0,Z.at(-2)===O9?-2:-1):Z,OF=(Z)=>Z.at(-1)===wF?Z.subarray(0,Z.at(-2)===kF?-2:-1):Z,I9=`
35
- `,wF,O9="\r",kF;var O3=B(()=>{wF=I9.codePointAt(0),kF=O9.codePointAt(0)});function g0(Z,{checkOpen:q=!0}={}){return Z!==null&&typeof Z==="object"&&(Z.writable||Z.readable||!q||Z.writable===void 0&&Z.readable===void 0)&&typeof Z.pipe==="function"}function w3(Z,{checkOpen:q=!0}={}){return g0(Z,{checkOpen:q})&&(Z.writable||!q)&&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 f1(Z,{checkOpen:q=!0}={}){return g0(Z,{checkOpen:q})&&(Z.readable||!q)&&typeof Z.read==="function"&&typeof Z.readable==="boolean"&&typeof Z.readableObjectMode==="boolean"&&typeof Z.destroy==="function"&&typeof Z.destroyed==="boolean"}function k3(Z,q){return w3(Z,q)&&f1(Z,q)}var m1=()=>{};class w9{#J;#X;#q=!1;#Y=void 0;constructor(Z,q){this.#J=Z,this.#X=q}next(){let Z=()=>this.#G();return this.#Y=this.#Y?this.#Y.then(Z,Z):Z(),this.#Y}return(Z){let q=()=>this.#V(Z);return this.#Y?this.#Y.then(q,q):q()}async#G(){if(this.#q)return{done:!0,value:void 0};let Z;try{Z=await this.#J.read()}catch(q){throw this.#Y=void 0,this.#q=!0,this.#J.releaseLock(),q}return Z.done&&(this.#Y=void 0,this.#q=!0,this.#J.releaseLock()),Z}async#V(Z){if(this.#q)return{done:!0,value:Z};if(this.#q=!0,!this.#X){let q=this.#J.cancel(Z);return this.#J.releaseLock(),await q,{done:!0,value:Z}}return this.#J.releaseLock(),{done:!0,value:Z}}}function k9(){return this[N3].next()}function N9(Z){return this[N3].return(Z)}function x3({preventCancel:Z=!1}={}){let q=this.getReader(),J=new w9(q,Z),X=Object.create(xF);return X[N3]=J,X}var NF,N3,xF;var x9=B(()=>{NF=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);N3=Symbol();Object.defineProperty(k9,"name",{value:"next"});Object.defineProperty(N9,"name",{value:"return"});xF=Object.create(NF,{next:{enumerable:!0,configurable:!0,writable:!0,value:k9},return:{enumerable:!0,configurable:!0,writable:!0,value:N9}})});var P9=()=>{};var E9=B(()=>{x9();P9()});var v9=(Z)=>{if(f1(Z,{checkOpen:!1})&&I2.on!==void 0)return EF(Z);if(typeof Z?.[Symbol.asyncIterator]==="function")return Z;if(PF.call(Z)==="[object ReadableStream]")return x3.call(Z);throw TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},PF,EF=async function*(Z){let q=new AbortController,J={};vF(Z,q,J);try{for await(let[X]of I2.on(Z,"data",{signal:q.signal}))yield X}catch(X){if(J.error!==void 0)throw J.error;else if(!q.signal.aborted)throw X}finally{Z.destroy()}},vF=async(Z,q,J)=>{try{await I2.finished(Z,{cleanup:!0,readable:!0,writable:!1,error:!1})}catch(X){J.error=X}finally{q.abort()}},I2;var P3=B(()=>{m1();E9();({toString:PF}=Object.prototype),I2={}});var x6=async(Z,{init:q,convertChunk:J,getSize:X,truncateChunk:Q,addChunk:$,getFinalChunk:Y,finalize:H},{maxBuffer:K=Number.POSITIVE_INFINITY}={})=>{let W=v9(Z),U=q();U.length=0;try{for await(let V of W){let L=yF(V),_=J[L](V,U);S9({convertedChunk:_,state:U,getSize:X,truncateChunk:Q,addChunk:$,maxBuffer:K})}return CF({state:U,convertChunk:J,getSize:X,truncateChunk:Q,addChunk:$,getFinalChunk:Y,maxBuffer:K}),H(U)}catch(V){let L=typeof V==="object"&&V!==null?V:Error(V);throw L.bufferedData=H(U),L}},CF=({state:Z,getSize:q,truncateChunk:J,addChunk:X,getFinalChunk:Q,maxBuffer:$})=>{let Y=Q(Z);if(Y!==void 0)S9({convertedChunk:Y,state:Z,getSize:q,truncateChunk:J,addChunk:X,maxBuffer:$})},S9=({convertedChunk:Z,state:q,getSize:J,truncateChunk:X,addChunk:Q,maxBuffer:$})=>{let Y=J(Z),H=q.length+Y;if(H<=$){C9(Z,q,Q,H);return}let K=X(Z,$-q.length);if(K!==void 0)C9(K,q,Q,$);throw new Y1},C9=(Z,q,J,X)=>{q.contents=J(Z,q,X),q.length=X},yF=(Z)=>{let q=typeof Z;if(q==="string")return"string";if(q!=="object"||Z===null)return"others";if(globalThis.Buffer?.isBuffer(Z))return"buffer";let J=y9.call(Z);if(J==="[object ArrayBuffer]")return"arrayBuffer";if(J==="[object DataView]")return"dataView";if(Number.isInteger(Z.byteLength)&&Number.isInteger(Z.byteOffset)&&y9.call(Z.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},y9,Y1;var O2=B(()=>{P3();({toString:y9}=Object.prototype);Y1=class Y1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var H1=(Z)=>Z,w2=()=>{return},A8=({contents:Z})=>Z,T8=(Z)=>{throw Error(`Streams in object mode are not supported: ${String(Z)}`)},j8=(Z)=>Z.length;var I8=()=>{};async function O8(Z,q){return x6(Z,gF,q)}var SF=()=>({contents:[]}),bF=()=>1,hF=(Z,{contents:q})=>{return q.push(Z),q},gF;var b9=B(()=>{O2();I8();gF={init:SF,convertChunk:{string:H1,buffer:H1,arrayBuffer:H1,dataView:H1,typedArray:H1,others:H1},getSize:bF,truncateChunk:w2,addChunk:hF,getFinalChunk:w2,finalize:A8}});async function w8(Z,q){return x6(Z,iF,q)}var fF=()=>({contents:new ArrayBuffer(0)}),mF=(Z)=>uF.encode(Z),uF,h9=(Z)=>new Uint8Array(Z),g9=(Z)=>new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),pF=(Z,q)=>Z.slice(0,q),dF=(Z,{contents:q,length:J},X)=>{let Q=u9()?lF(q,X):cF(q,X);return new Uint8Array(Q).set(Z,J),Q},cF=(Z,q)=>{if(q<=Z.byteLength)return Z;let J=new ArrayBuffer(m9(q));return new Uint8Array(J).set(new Uint8Array(Z),0),J},lF=(Z,q)=>{if(q<=Z.maxByteLength)return Z.resize(q),Z;let J=new ArrayBuffer(q,{maxByteLength:m9(q)});return new Uint8Array(J).set(new Uint8Array(Z),0),J},m9=(Z)=>f9**Math.ceil(Math.log(Z)/Math.log(f9)),f9=2,nF=({contents:Z,length:q})=>u9()?Z:Z.slice(0,q),u9=()=>("resize"in ArrayBuffer.prototype),iF;var p9=B(()=>{O2();I8();uF=new TextEncoder,iF={init:fF,convertChunk:{string:mF,buffer:h9,arrayBuffer:h9,dataView:g9,typedArray:g9,others:T8},getSize:j8,truncateChunk:pF,addChunk:dF,getFinalChunk:w2,finalize:nF}});async function N8(Z,q){return x6(Z,tF,q)}var aF=()=>({contents:"",textDecoder:new TextDecoder}),k8=(Z,{textDecoder:q})=>q.decode(Z,{stream:!0}),oF=(Z,{contents:q})=>q+Z,sF=(Z,q)=>Z.slice(0,q),rF=({textDecoder:Z})=>{let q=Z.decode();return q===""?void 0:q},tF;var d9=B(()=>{O2();I8();tF={init:aF,convertChunk:{string:H1,buffer:k8,arrayBuffer:k8,dataView:k8,typedArray:k8,others:T8},getSize:j8,truncateChunk:sF,addChunk:oF,getFinalChunk:rF,finalize:A8}});var c9=B(()=>{b9();p9();d9();O2()});import{on as eF}from"node:events";import{finished as ZM}from"node:stream/promises";var x8=B(()=>{P3();c9();Object.assign(I2,{on:eF,finished:ZM})});var l9=({error:Z,stream:q,readableObjectMode:J,lines:X,encoding:Q,fdNumber:$})=>{if(!(Z instanceof Y1))throw Z;if($==="all")return Z;let Y=qM(J,X,Q);throw Z.maxBufferInfo={fdNumber:$,unit:Y},q.destroy(),Z},qM=(Z,q,J)=>{if(Z)return"objects";if(q)return"lines";if(J==="buffer")return"bytes";return"characters"},n9=(Z,q,J)=>{if(q.length!==J)return;let X=new Y1;throw X.maxBufferInfo={fdNumber:"ipc"},X},i9=(Z,q)=>{let{streamName:J,threshold:X,unit:Q}=JM(Z,q);return`Command's ${J} was larger than ${X} ${Q}`},JM=(Z,q)=>{if(Z?.maxBufferInfo===void 0)return{streamName:"output",threshold:q[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:J,unit:X}}=Z;delete Z.maxBufferInfo;let Q=Q1(q,J);if(J==="ipc")return{streamName:"IPC output",threshold:Q,unit:"messages"};return{streamName:S4(J),threshold:Q,unit:X}},a9=(Z,q,J)=>Z?.code==="ENOBUFS"&&q!==null&&q.some((X)=>X!==null&&X.length>P8(J)),o9=(Z,q,J)=>{if(!q)return Z;let X=P8(J);return Z.length>X?Z.slice(0,X):Z},P8=([,Z])=>Z;var u1=B(()=>{x8();X1();$1()});import{inspect as XM}from"node:util";var r9=({stdio:Z,all:q,ipcOutput:J,originalError:X,signal:Q,signalDescription:$,exitCode:Y,escapedCommand:H,timedOut:K,isCanceled:W,isGracefullyCanceled:U,isMaxBuffer:V,isForcefullyTerminated:L,forceKillAfterDelay:_,killSignal:z,maxBuffer:R,timeout:D,cwd:F})=>{let k=X?.code,M=QM({originalError:X,timedOut:K,timeout:D,isMaxBuffer:V,maxBuffer:R,errorCode:k,signal:Q,signalDescription:$,exitCode:Y,isCanceled:W,isGracefullyCanceled:U,isForcefullyTerminated:L,forceKillAfterDelay:_,killSignal:z}),O=YM(X,F),T=O===void 0?"":`
36
- ${O}`,I=`${M}: ${H}${T}`,A=q===void 0?[Z[2],Z[1]]:[q],b=[I,...A,...Z.slice(3),J.map((w)=>HM(w)).join(`
37
- `)].map((w)=>R2(N6(GM(w)))).filter(Boolean).join(`
38
-
39
- `);return{originalMessage:O,shortMessage:I,message:b}},QM=({originalError:Z,timedOut:q,timeout:J,isMaxBuffer:X,maxBuffer:Q,errorCode:$,signal:Y,signalDescription:H,exitCode:K,isCanceled:W,isGracefullyCanceled:U,isForcefullyTerminated:V,forceKillAfterDelay:L,killSignal:_})=>{let z=$M(V,L);if(q)return`Command timed out after ${J} milliseconds${z}`;if(U){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(X)return`${i9(Z,Q)}${z}`;if($!==void 0)return`Command failed with ${$}${z}`;if(V)return`Command was killed with ${_} (${t4(_)})${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"},$M=(Z,q)=>Z?` and was forcefully terminated after ${q} milliseconds`:"",YM=(Z,q)=>{if(Z instanceof l0)return;let J=L$(Z)?Z.originalMessage:String(Z?.message??Z),X=R2(D9(J,q));return X===""?void 0:X},HM=(Z)=>typeof Z==="string"?Z:XM(Z),GM=(Z)=>Array.isArray(Z)?Z.map((q)=>N6(s9(q))).filter(Boolean).join(`
40
- `):s9(Z),s9=(Z)=>{if(typeof Z==="string")return Z;if(J0(Z))return C4(Z);return""};var t9=B(()=>{O3();T0();T3();g4();u1();M2();b1()});var E8=({command:Z,escapedCommand:q,stdio:J,all:X,ipcOutput:Q,options:{cwd:$},startTime:Y})=>e9({command:Z,escapedCommand:q,cwd:$,durationMs:q3(Y),failed:!1,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isTerminated:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,exitCode:0,stdout:J[1],stderr:J[2],all:X,stdio:J,ipcOutput:Q,pipedFrom:[]}),P6=({error:Z,command:q,escapedCommand:J,fileDescriptors:X,options:Q,startTime:$,isSync:Y})=>k2({error:Z,command:q,escapedCommand:J,startTime:$,timedOut:!1,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:!1,isForcefullyTerminated:!1,stdio:Array.from({length:X.length}),ipcOutput:[],options:Q,isSync:Y}),k2=({error:Z,command:q,escapedCommand:J,startTime:X,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:W,signal:U,stdio:V,all:L,ipcOutput:_,options:{timeoutDuration:z,timeout:R=z,forceKillAfterDelay:D,killSignal:F,cwd:k,maxBuffer:M},isSync:O})=>{let{exitCode:T,signal:I,signalDescription:A}=UM(W,U),{originalMessage:b,shortMessage:w,message:x}=r9({stdio:V,all:L,ipcOutput:_,originalError:Z,signal:I,signalDescription:A,exitCode:T,escapedCommand:J,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,forceKillAfterDelay:D,killSignal:F,maxBuffer:M,timeout:R,cwd:k}),v=V$(Z,x,O);return Object.assign(v,KM({error:v,command:q,escapedCommand:J,startTime:X,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:T,signal:I,signalDescription:A,stdio:V,all:L,ipcOutput:_,cwd:k,originalMessage:b,shortMessage:w})),v},KM=({error:Z,command:q,escapedCommand:J,startTime:X,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:W,signal:U,signalDescription:V,stdio:L,all:_,ipcOutput:z,cwd:R,originalMessage:D,shortMessage:F})=>e9({shortMessage:F,originalMessage:D,command:q,escapedCommand:J,cwd:R,durationMs:q3(X),failed:!0,timedOut:Q,isCanceled:$,isGracefullyCanceled:Y,isTerminated:U!==void 0,isMaxBuffer:H,isForcefullyTerminated:K,exitCode:W,signal:U,signalDescription:V,code:Z.cause?.code,stdout:L[1],stderr:L[2],all:_,stdio:L,ipcOutput:z,pipedFrom:[]}),e9=(Z)=>Object.fromEntries(Object.entries(Z).filter(([,q])=>q!==void 0)),UM=(Z,q)=>{let J=Z===null?void 0:Z,X=q===null?void 0:q,Q=X===void 0?void 0:t4(q);return{exitCode:J,signal:X,signalDescription:Q}};var N2=B(()=>{M2();c4();b1();t9()});function WM(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(ZY(Z*1000)%1000),nanoseconds:Math.trunc(ZY(Z*1e6)%1000)}}function VM(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 E3(Z){switch(typeof Z){case"number":{if(Number.isFinite(Z))return WM(Z);break}case"bigint":return VM(Z)}throw TypeError("Expected a finite number or bigint")}var ZY=(Z)=>Number.isFinite(Z)?Z:0;var qY=()=>{};function v3(Z,q){let J=typeof Z==="bigint";if(!J&&!Number.isFinite(Z))throw TypeError("Expected a finite number or bigint");q={...q};let X=Z<0?"-":"";if(Z=Z<0?-Z:Z,q.colonNotation)q.compact=!1,q.formatSubMilliseconds=!1,q.separateMilliseconds=!1,q.verbose=!1;if(q.compact)q.unitCount=1,q.secondsDecimalDigits=0,q.millisecondsDecimalDigits=0;let Q=[],$=(U,V)=>{let L=Math.floor(U*10**V+_M);return(Math.round(L)/10**V).toFixed(V)},Y=(U,V,L,_)=>{if((Q.length===0||!q.colonNotation)&&BM(U)&&!(q.colonNotation&&L==="m"))return;if(_??=String(U),q.colonNotation){let z=_.includes(".")?_.split(".")[0].length:_.length,R=Q.length>0?2:1;_="0".repeat(Math.max(0,R-z))+_}else _+=q.verbose?" "+LM(V,U):L;Q.push(_)},H=E3(Z),K=BigInt(H.days);if(q.hideYearAndDays)Y(BigInt(K)*24n+BigInt(H.hours),"hour","h");else{if(q.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"),!q.hideSeconds)if(q.separateMilliseconds||q.formatSubMilliseconds||!q.colonNotation&&Z<1000&&!q.subSecondsAsDecimals){let U=Number(H.seconds),V=Number(H.milliseconds),L=Number(H.microseconds),_=Number(H.nanoseconds);if(Y(U,"second","s"),q.formatSubMilliseconds)Y(V,"millisecond","ms"),Y(L,"microsecond","µs"),Y(_,"nanosecond","ns");else{let z=V+L/1000+_/1e6,R=typeof q.millisecondsDecimalDigits==="number"?q.millisecondsDecimalDigits:0,D=z>=1?Math.round(z):Math.ceil(z),F=R?z.toFixed(R):D;Y(Number.parseFloat(F),"millisecond","ms",F)}}else{let U=(J?Number(Z%zM):Z)/1000%60,V=typeof q.secondsDecimalDigits==="number"?q.secondsDecimalDigits:1,L=$(U,V),_=q.keepDecimalsOnWholeSeconds?L:L.replace(/\.0+$/,"");Y(Number.parseFloat(_),"second","s",_)}if(Q.length===0)return X+"0"+(q.verbose?" milliseconds":"ms");let W=q.colonNotation?":":" ";if(typeof q.unitCount==="number")Q=Q.slice(0,Math.max(q.unitCount,1));return X+Q.join(W)}var BM=(Z)=>Z===0||Z===0n,LM=(Z,q)=>q===1||q===1n?Z:`${Z}s`,_M=0.0000001,zM;var JY=B(()=>{qY();zM=24n*60n*60n*1000n});var XY=(Z,q)=>{if(Z.failed)c0({type:"error",verboseMessage:Z.shortMessage,verboseInfo:q,result:Z})};var QY=B(()=>{T6()});var $Y=(Z,q)=>{if(!D6(q))return;XY(Z,q),RM(Z,q)},RM=(Z,q)=>{let J=`(done in ${v3(Z.durationMs)})`;c0({type:"duration",verboseMessage:J,verboseInfo:q,result:Z})};var YY=B(()=>{JY();M1();T6();QY()});var E6=(Z,q,{reject:J})=>{if($Y(Z,q),Z.failed&&J)throw Z;return Z};var v8=B(()=>{YY()});var KY=(Z,q)=>{if(p1(Z))return"asyncGenerator";if(VY(Z))return"generator";if(C8(Z))return"fileUrl";if(TM(Z))return"filePath";if(OM(Z))return"webStream";if(g0(Z,{checkOpen:!1}))return"native";if(J0(Z))return"uint8Array";if(wM(Z))return"asyncIterable";if(kM(Z))return"iterable";if(S3(Z))return UY({transform:Z},q);if(AM(Z))return FM(Z,q);return"native"},FM=(Z,q)=>{if(k3(Z.transform,{checkOpen:!1}))return MM(Z,q);if(S3(Z.transform))return UY(Z,q);return DM(Z,q)},MM=(Z,q)=>{return WY(Z,q,"Duplex stream"),"duplex"},UY=(Z,q)=>{return WY(Z,q,"web TransformStream"),"webTransform"},WY=({final:Z,binary:q,objectMode:J},X,Q)=>{HY(Z,`${X}.final`,Q),HY(q,`${X}.binary`,Q),C3(J,`${X}.objectMode`)},HY=(Z,q,J)=>{if(Z!==void 0)throw TypeError(`The \`${q}\` option can only be defined when using a generator, not a ${J}.`)},DM=({transform:Z,final:q,binary:J,objectMode:X},Q)=>{if(Z!==void 0&&!GY(Z))throw TypeError(`The \`${Q}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(k3(q,{checkOpen:!1}))throw TypeError(`The \`${Q}.final\` option must not be a Duplex stream.`);if(S3(q))throw TypeError(`The \`${Q}.final\` option must not be a web TransformStream.`);if(q!==void 0&&!GY(q))throw TypeError(`The \`${Q}.final\` option must be a generator.`);return C3(J,`${Q}.binary`),C3(X,`${Q}.objectMode`),p1(Z)||p1(q)?"asyncGenerator":"generator"},C3=(Z,q)=>{if(Z!==void 0&&typeof Z!=="boolean")throw TypeError(`The \`${q}\` option must use a boolean.`)},GY=(Z)=>p1(Z)||VY(Z),p1=(Z)=>Object.prototype.toString.call(Z)==="[object AsyncGeneratorFunction]",VY=(Z)=>Object.prototype.toString.call(Z)==="[object GeneratorFunction]",AM=(Z)=>e(Z)&&(Z.transform!==void 0||Z.final!==void 0),C8=(Z)=>Object.prototype.toString.call(Z)==="[object URL]",BY=(Z)=>C8(Z)&&Z.protocol!=="file:",TM=(Z)=>e(Z)&&Object.keys(Z).length>0&&Object.keys(Z).every((q)=>jM.has(q))&&y3(Z.file),jM,y3=(Z)=>typeof Z==="string",LY=(Z,q)=>Z==="native"&&typeof q==="string"&&!IM.has(q),IM,_Y=(Z)=>Object.prototype.toString.call(Z)==="[object ReadableStream]",y8=(Z)=>Object.prototype.toString.call(Z)==="[object WritableStream]",OM=(Z)=>_Y(Z)||y8(Z),S3=(Z)=>_Y(Z?.readable)&&y8(Z?.writable),wM=(Z)=>zY(Z)&&typeof Z[Symbol.asyncIterator]==="function",kM=(Z)=>zY(Z)&&typeof Z[Symbol.iterator]==="function",zY=(Z)=>typeof Z==="object"&&Z!==null,x0,S8,b3,RY,FY,j1;var R0=B(()=>{m1();q1();T0();jM=new Set(["file","append"]),IM=new Set(["ipc","ignore","inherit","overlapped","pipe"]),x0=new Set(["generator","asyncGenerator","duplex","webTransform"]),S8=new Set(["fileUrl","filePath","fileNumber"]),b3=new Set(["fileUrl","filePath"]),RY=new Set([...b3,"webStream","nodeStream"]),FY=new Set(["webTransform","duplex"]),j1={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 h3=(Z,q,J,X)=>X==="output"?NM(Z,q,J):xM(Z,q,J),NM=(Z,q,J)=>{let X=q!==0&&J[q-1].value.readableObjectMode;return{writableObjectMode:X,readableObjectMode:Z??X}},xM=(Z,q,J)=>{let X=q===0?Z===!0:J[q-1].value.readableObjectMode,Q=q!==J.length-1&&(Z??X);return{writableObjectMode:X,readableObjectMode:Q}},MY=(Z,q)=>{let J=Z.findLast(({type:X})=>x0.has(X));if(J===void 0)return!1;return q==="input"?J.value.writableObjectMode:J.value.readableObjectMode};var g3=B(()=>{R0()});var DY=(Z,q,J,X)=>[...Z.filter(({type:Q})=>!x0.has(Q)),...PM(Z,q,J,X)],PM=(Z,q,J,{encoding:X})=>{let Q=Z.filter(({type:Y})=>x0.has(Y)),$=Array.from({length:Q.length});for(let[Y,H]of Object.entries(Q))$[Y]=EM({stdioItem:H,index:Number(Y),newTransforms:$,optionName:q,direction:J,encoding:X});return SM($,J)},EM=({stdioItem:Z,stdioItem:{type:q},index:J,newTransforms:X,optionName:Q,direction:$,encoding:Y})=>{if(q==="duplex")return vM({stdioItem:Z,optionName:Q});if(q==="webTransform")return CM({stdioItem:Z,index:J,newTransforms:X,direction:$});return yM({stdioItem:Z,index:J,newTransforms:X,direction:$,encoding:Y})},vM=({stdioItem:Z,stdioItem:{value:{transform:q,transform:{writableObjectMode:J,readableObjectMode:X},objectMode:Q=X}},optionName:$})=>{if(Q&&!X)throw TypeError(`The \`${$}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!Q&&X)throw TypeError(`The \`${$}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...Z,value:{transform:q,writableObjectMode:J,readableObjectMode:X}}},CM=({stdioItem:Z,stdioItem:{value:q},index:J,newTransforms:X,direction:Q})=>{let{transform:$,objectMode:Y}=e(q)?q:{transform:q},{writableObjectMode:H,readableObjectMode:K}=h3(Y,J,X,Q);return{...Z,value:{transform:$,writableObjectMode:H,readableObjectMode:K}}},yM=({stdioItem:Z,stdioItem:{value:q},index:J,newTransforms:X,direction:Q,encoding:$})=>{let{transform:Y,final:H,binary:K=!1,preserveNewlines:W=!1,objectMode:U}=e(q)?q:{transform:q},V=K||j0.has($),{writableObjectMode:L,readableObjectMode:_}=h3(U,J,X,Q);return{...Z,value:{transform:Y,final:H,binary:V,preserveNewlines:W,writableObjectMode:L,readableObjectMode:_}}},SM=(Z,q)=>q==="input"?Z.reverse():Z;var AY=B(()=>{q1();g1();R0();g3()});import f3 from"node:process";var TY=(Z,q,J)=>{let X=Z.map((Q)=>bM(Q,q));if(X.includes("input")&&X.includes("output"))throw TypeError(`The \`${J}\` option must not be an array of both readable and writable values.`);return X.find(Boolean)??fM},bM=({type:Z,value:q},J)=>hM[J]??jY[Z](q),hM,v6=()=>{return},m3=()=>"input",jY,gM=(Z)=>{if([0,f3.stdin].includes(Z))return"input";if([1,2,f3.stdout,f3.stderr].includes(Z))return"output"},fM="output";var IY=B(()=>{m1();R0();hM=["input","output","output"],jY={generator:v6,asyncGenerator:v6,fileUrl:v6,filePath:v6,iterable:m3,asyncIterable:m3,uint8Array:m3,webStream:(Z)=>y8(Z)?"output":"input",nodeStream(Z){if(!f1(Z,{checkOpen:!1}))return"output";return w3(Z,{checkOpen:!1})?void 0:"input"},webTransform:v6,duplex:v6,native(Z){let q=gM(Z);if(q!==void 0)return q;if(g0(Z,{checkOpen:!1}))return jY.nodeStream(Z)}}});var OY=(Z,q)=>q&&!Z.includes("ipc")?[...Z,"ipc"]:Z;var wY=()=>{};var kY=({stdio:Z,ipc:q,buffer:J,...X},Q,$)=>{let Y=mM(Z,X).map((H,K)=>NY(H,K));return $?pM(Y,J,Q):OY(Y,q)},mM=(Z,q)=>{if(Z===void 0)return N0.map((X)=>q[X]);if(uM(q))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${N0.map((X)=>`\`${X}\``).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,N0.length);return Array.from({length:J},(X,Q)=>Z[Q])},uM=(Z)=>N0.some((q)=>Z[q]!==void 0),NY=(Z,q)=>{if(Array.isArray(Z))return Z.map((J)=>NY(J,q));if(Z===null||Z===void 0)return q>=N0.length?"ignore":"pipe";return Z},pM=(Z,q,J)=>Z.map((X,Q)=>!q[Q]&&Q!==0&&!A6(J,Q)&&dM(X)?"ignore":X),dM=(Z)=>Z==="pipe"||Array.isArray(Z)&&Z.every((q)=>q==="pipe");var xY=B(()=>{X1();wY();M1()});import{readFileSync as cM}from"node:fs";import lM from"node:tty";var EY=({stdioItem:Z,stdioItem:{type:q},isStdioArray:J,fdNumber:X,direction:Q,isSync:$})=>{if(!J||q!=="native")return Z;return $?nM({stdioItem:Z,fdNumber:X,direction:Q}):oM({stdioItem:Z,fdNumber:X})},nM=({stdioItem:Z,stdioItem:{value:q,optionName:J},fdNumber:X,direction:Q})=>{let $=iM({value:q,optionName:J,fdNumber:X,direction:Q});if($!==void 0)return $;if(g0(q,{checkOpen:!1}))throw TypeError(`The \`${J}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return Z},iM=({value:Z,optionName:q,fdNumber:J,direction:X})=>{let Q=aM(Z,J);if(Q===void 0)return;if(X==="output")return{type:"fileNumber",value:Q,optionName:q};if(lM.isatty(Q))throw TypeError(`The \`${q}: ${J8(Z)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:J1(cM(Q)),optionName:q}},aM=(Z,q)=>{if(Z==="inherit")return q;if(typeof Z==="number")return Z;let J=y4.indexOf(Z);if(J!==-1)return J},oM=({stdioItem:Z,stdioItem:{value:q,optionName:J},fdNumber:X})=>{if(q==="inherit")return{type:"nodeStream",value:PY(X,q,J),optionName:J};if(typeof q==="number")return{type:"nodeStream",value:PY(q,q,J),optionName:J};if(g0(q,{checkOpen:!1}))return{type:"nodeStream",value:q,optionName:J};return Z},PY=(Z,q,J)=>{let X=y4[Z];if(X===void 0)throw TypeError(`The \`${J}: ${q}\` option is invalid: no such standard stream.`);return X};var vY=B(()=>{m1();X1();T0();A1()});var CY=({input:Z,inputFile:q},J)=>J===0?[...sM(Z),...tM(q)]:[],sM=(Z)=>Z===void 0?[]:[{type:rM(Z),value:Z,optionName:"input"}],rM=(Z)=>{if(f1(Z,{checkOpen:!1}))return"nodeStream";if(typeof Z==="string")return"string";if(J0(Z))return"uint8Array";throw Error("The `input` option must be a string, a Uint8Array or a Node.js Readable stream.")},tM=(Z)=>Z===void 0?[]:[{...eM(Z),optionName:"inputFile"}],eM=(Z)=>{if(C8(Z))return{type:"fileUrl",value:Z};if(y3(Z))return{type:"filePath",value:{file:Z}};throw Error("The `inputFile` option must be a file path string or a file URL.")};var yY=B(()=>{m1();T0();R0()});var SY=(Z)=>Z.filter((q,J)=>Z.every((X,Q)=>q.value!==X.value||J>=Q||q.type==="generator"||q.type==="asyncGenerator")),bY=({stdioItem:{type:Z,value:q,optionName:J},direction:X,fileDescriptors:Q,isSync:$})=>{let Y=ZD(Q,Z);if(Y.length===0)return;if($){qD({otherStdioItems:Y,type:Z,value:q,optionName:J,direction:X});return}if(RY.has(Z))return hY({otherStdioItems:Y,type:Z,value:q,optionName:J,direction:X});if(FY.has(Z))XD({otherStdioItems:Y,type:Z,value:q,optionName:J})},ZD=(Z,q)=>Z.flatMap(({direction:J,stdioItems:X})=>X.filter((Q)=>Q.type===q).map((Q)=>({...Q,direction:J}))),qD=({otherStdioItems:Z,type:q,value:J,optionName:X,direction:Q})=>{if(b3.has(q))hY({otherStdioItems:Z,type:q,value:J,optionName:X,direction:Q})},hY=({otherStdioItems:Z,type:q,value:J,optionName:X,direction:Q})=>{let $=Z.filter((H)=>JD(H,J));if($.length===0)return;let Y=$.find((H)=>H.direction!==Q);return gY(Y,X,q),Q==="output"?$[0].stream:void 0},JD=({type:Z,value:q},J)=>{if(Z==="filePath")return q.file===J.file;if(Z==="fileUrl")return q.href===J.href;return q===J},XD=({otherStdioItems:Z,type:q,value:J,optionName:X})=>{let Q=Z.find(({value:{transform:$}})=>$===J.transform);gY(Q,X,q)},gY=(Z,q,J)=>{if(Z!==void 0)throw TypeError(`The \`${Z.optionName}\` and \`${q}\` options must not target ${j1[J]} that is the same.`)};var fY=B(()=>{R0()});var b8=(Z,q,J,X)=>{let $=kY(q,J,X).map((H,K)=>QD({stdioOption:H,fdNumber:K,options:q,isSync:X})),Y=VD({initialFileDescriptors:$,addProperties:Z,options:q,isSync:X});return q.stdio=Y.map(({stdioItems:H})=>_D(H)),Y},QD=({stdioOption:Z,fdNumber:q,options:J,isSync:X})=>{let Q=S4(q),{stdioItems:$,isStdioArray:Y}=$D({stdioOption:Z,fdNumber:q,options:J,optionName:Q}),H=TY($,q,Q),K=$.map((V)=>EY({stdioItem:V,isStdioArray:Y,fdNumber:q,direction:H,isSync:X})),W=DY(K,Q,H,J),U=MY(W,H);return WD(W,U),{direction:H,objectMode:U,stdioItems:W}},$D=({stdioOption:Z,fdNumber:q,options:J,optionName:X})=>{let $=[...(Array.isArray(Z)?Z:[Z]).map((K)=>YD(K,X)),...CY(J,q)],Y=SY($),H=Y.length>1;return HD(Y,H,X),KD(Y),{stdioItems:Y,isStdioArray:H}},YD=(Z,q)=>({type:KY(Z,q),value:Z,optionName:q}),HD=(Z,q,J)=>{if(Z.length===0)throw TypeError(`The \`${J}\` option must not be an empty array.`);if(!q)return;for(let{value:X,optionName:Q}of Z)if(GD.has(X))throw Error(`The \`${Q}\` option must not include \`${X}\`.`)},GD,KD=(Z)=>{for(let q of Z)UD(q)},UD=({type:Z,value:q,optionName:J})=>{if(BY(q))throw TypeError(`The \`${J}: URL\` option must use the \`file:\` scheme.
41
- For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(LY(Z,q))throw TypeError(`The \`${J}: { file: '...' }\` option must be used instead of \`${J}: '...'\`.`)},WD=(Z,q)=>{if(!q)return;let J=Z.find(({type:X})=>S8.has(X));if(J!==void 0)throw TypeError(`The \`${J.optionName}\` option cannot use both files and transforms in objectMode.`)},VD=({initialFileDescriptors:Z,addProperties:q,options:J,isSync:X})=>{let Q=[];try{for(let $ of Z)Q.push(BD({fileDescriptor:$,fileDescriptors:Q,addProperties:q,options:J,isSync:X}));return Q}catch($){throw u3(Q),$}},BD=({fileDescriptor:{direction:Z,objectMode:q,stdioItems:J},fileDescriptors:X,addProperties:Q,options:$,isSync:Y})=>{let H=J.map((K)=>LD({stdioItem:K,addProperties:Q,direction:Z,options:$,fileDescriptors:X,isSync:Y}));return{direction:Z,objectMode:q,stdioItems:H}},LD=({stdioItem:Z,addProperties:q,direction:J,options:X,fileDescriptors:Q,isSync:$})=>{let Y=bY({stdioItem:Z,direction:J,fileDescriptors:Q,isSync:$});if(Y!==void 0)return{...Z,stream:Y};return{...Z,...q[J][Z.type](Z,X)}},u3=(Z)=>{for(let{stdioItems:q}of Z)for(let{stream:J}of q)if(J!==void 0&&!b0(J))J.destroy()},_D=(Z)=>{if(Z.length>1)return Z.some(({value:X})=>X==="overlapped")?"overlapped":"pipe";let[{type:q,value:J}]=Z;return q==="native"?J:"pipe"};var h8=B(()=>{X1();AY();g3();R0();IY();xY();vY();yY();fY();GD=new Set(["ignore","ipc"])});import{readFileSync as mY}from"node:fs";var pY=(Z,q)=>b8(RD,Z,q,!0),a0=({type:Z,optionName:q})=>{dY(q,j1[Z])},zD=({optionName:Z,value:q})=>{if(q==="ipc"||q==="overlapped")dY(Z,`"${q}"`);return{}},dY=(Z,q)=>{throw TypeError(`The \`${Z}\` option cannot be ${q} with synchronous methods.`)},uY,RD;var cY=B(()=>{T0();h8();R0();uY={generator(){},asyncGenerator:a0,webStream:a0,nodeStream:a0,webTransform:a0,duplex:a0,asyncIterable:a0,native:zD},RD={input:{...uY,fileUrl:({value:Z})=>({contents:[J1(mY(Z))]}),filePath:({value:{file:Z}})=>({contents:[J1(mY(Z))]}),fileNumber:a0,iterable:({value:Z})=>({contents:[...Z]}),string:({value:Z})=>({contents:[Z]}),uint8Array:({value:Z})=>({contents:[Z]})},output:{...uY,fileUrl:({value:Z})=>({path:Z}),filePath:({value:{file:Z,append:q}})=>({path:Z,append:q}),fileNumber:({value:Z})=>({path:Z}),iterable:a0,string:a0,uint8Array:a0}}});var G1=(Z,{stripFinalNewline:q},J)=>p3(q,J)&&Z!==void 0&&!Array.isArray(Z)?N6(Z):Z,p3=(Z,q)=>q==="all"?Z[1]||Z[2]:Z[q];var x2=B(()=>{O3()});var g8=(Z,q,J,X)=>Z||J?void 0:nY(q,X),c3=(Z,q,J)=>J?Z.flatMap((X)=>lY(X,q)):lY(Z,q),lY=(Z,q)=>{let{transform:J,final:X}=nY(q,{});return[...J(Z),...X()]},nY=(Z,q)=>{return q.previousChunks="",{transform:FD.bind(void 0,q,Z),final:DD.bind(void 0,q)}},FD=function*(Z,q,J){if(typeof J!=="string"){yield J;return}let{previousChunks:X}=Z,Q=-1;for(let $=0;$<J.length;$+=1)if(J[$]===`
42
- `){let Y=MD(J,$,q,Z),H=J.slice(Q+1,$+1-Y);if(X.length>0)H=d3(X,H),X="";yield H,Q=$}if(Q!==J.length-1)X=d3(X,J.slice(Q+1));Z.previousChunks=X},MD=(Z,q,J,X)=>{if(J)return 0;return X.isWindowsNewline=q!==0&&Z[q-1]==="\r",X.isWindowsNewline?2:1},DD=function*({previousChunks:Z}){if(Z.length>0)yield Z},iY=({binary:Z,preserveNewlines:q,readableObjectMode:J,state:X})=>Z||q||J?void 0:{transform:AD.bind(void 0,X)},AD=function*({isWindowsNewline:Z=!1},q){let{unixNewline:J,windowsNewline:X,LF:Q,concatBytes:$}=typeof q==="string"?TD:ID;if(q.at(-1)===Q){yield q;return}yield $(q,Z?X:J)},d3=(Z,q)=>`${Z}${q}`,TD,jD=(Z,q)=>{let J=new Uint8Array(Z.length+q.length);return J.set(Z,0),J.set(q,Z.length),J},ID;var f8=B(()=>{TD={windowsNewline:`\r
43
- `,unixNewline:`
44
- `,LF:`
45
- `,concatBytes:d3},ID={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:jD}});import{Buffer as OD}from"node:buffer";var aY=(Z,q)=>Z?void 0:wD.bind(void 0,q),wD=function*(Z,q){if(typeof q!=="string"&&!J0(q)&&!OD.isBuffer(q))throw TypeError(`The \`${Z}\` option's transform must use "objectMode: true" to receive as input: ${typeof q}.`);yield q},oY=(Z,q)=>Z?kD.bind(void 0,q):ND.bind(void 0,q),kD=function*(Z,q){sY(Z,q),yield q},ND=function*(Z,q){if(sY(Z,q),typeof q!=="string"&&!J0(q))throw TypeError(`The \`${Z}\` option's function must yield a string or an Uint8Array, not ${typeof q}.`);yield q},sY=(Z,q)=>{if(q===null||q===void 0)throw TypeError(`The \`${Z}\` option's function must not call \`yield ${q}\`.
46
- Instead, \`yield\` should either be called with a value, or not be called at all. For example:
47
- if (condition) { yield value; }`)};var rY=B(()=>{T0()});import{Buffer as xD}from"node:buffer";import{StringDecoder as PD}from"node:string_decoder";var m8=(Z,q,J)=>{if(J)return;if(Z)return{transform:ED.bind(void 0,new TextEncoder)};let X=new PD(q);return{transform:vD.bind(void 0,X),final:CD.bind(void 0,X)}},ED=function*(Z,q){if(xD.isBuffer(q))yield J1(q);else if(typeof q==="string")yield Z.encode(q);else yield q},vD=function*(Z,q){yield J0(q)?Z.write(q):q},CD=function*(Z){let q=Z.end();if(q!=="")yield q};var l3=B(()=>{T0()});import{callbackify as tY}from"node:util";var n3,u8=async function*(Z,q,J){if(J===q.length){yield Z;return}let{transform:X=SD}=q[J];for await(let Q of X(Z))yield*u8(Q,q,J+1)},eY=async function*(Z){for(let[q,{final:J}]of Object.entries(Z))yield*yD(J,Number(q),Z)},yD=async function*(Z,q,J){if(Z===void 0)return;for await(let X of Z())yield*u8(X,J,q+1)},ZH,SD=function*(Z){yield Z};var qH=B(()=>{n3=tY(async(Z,q,J,X)=>{q.currentIterable=Z(...J);try{for await(let Q of q.currentIterable)X.push(Q)}finally{delete q.currentIterable}}),ZH=tY(async({currentIterable:Z},q)=>{if(Z!==void 0){await(q?Z.throw(q):Z.return());return}if(q)throw q})});var i3=(Z,q,J,X)=>{try{for(let Q of Z(...q))J.push(Q);X()}catch(Q){X(Q)}},JH=(Z,q)=>[...q.flatMap((J)=>[...d1(J,Z,0)]),...P2(Z)],d1=function*(Z,q,J){if(J===q.length){yield Z;return}let{transform:X=hD}=q[J];for(let Q of X(Z))yield*d1(Q,q,J+1)},P2=function*(Z){for(let[q,{final:J}]of Object.entries(Z))yield*bD(J,Number(q),Z)},bD=function*(Z,q,J){if(Z===void 0)return;for(let X of Z())yield*d1(X,J,q+1)},hD=function*(Z){yield Z};var a3=()=>{};import{Transform as gD,getDefaultHighWaterMark as XH}from"node:stream";var o3=({value:Z,value:{transform:q,final:J,writableObjectMode:X,readableObjectMode:Q},optionName:$},{encoding:Y})=>{let H={},K=QH(Z,Y,$),W=p1(q),U=p1(J),V=W?n3.bind(void 0,u8,H):i3.bind(void 0,d1),L=W||U?n3.bind(void 0,eY,H):i3.bind(void 0,P2),_=W||U?ZH.bind(void 0,H):void 0;return{stream:new gD({writableObjectMode:X,writableHighWaterMark:XH(X),readableObjectMode:Q,readableHighWaterMark:XH(Q),transform(R,D,F){V([R,K,0],this,F)},flush(R){L([K],this,R)},destroy:_})}},p8=(Z,q,J,X)=>{let Q=q.filter(({type:Y})=>Y==="generator"),$=X?Q.reverse():Q;for(let{value:Y,optionName:H}of $){let K=QH(Y,J,H);Z=JH(K,Z)}return Z},QH=({transform:Z,final:q,binary:J,writableObjectMode:X,readableObjectMode:Q,preserveNewlines:$},Y,H)=>{let K={};return[{transform:aY(X,H)},m8(J,Y,X),g8(J,$,X,K),{transform:Z,final:q},{transform:oY(Q,H)},iY({binary:J,preserveNewlines:$,readableObjectMode:Q,state:K})].filter(Boolean)};var d8=B(()=>{R0();f8();rY();l3();qH();a3()});var $H=(Z,q)=>{for(let J of fD(Z))mD(Z,J,q)},fD=(Z)=>new Set(Object.entries(Z).filter(([,{direction:q}])=>q==="input").map(([q])=>Number(q))),mD=(Z,q,J)=>{let{stdioItems:X}=Z[q],Q=X.filter(({contents:H})=>H!==void 0);if(Q.length===0)return;if(q!==0){let[{type:H,optionName:K}]=Q;throw TypeError(`Only the \`stdin\` option, not \`${K}\`, can be ${j1[H]} with synchronous methods.`)}let Y=Q.map(({contents:H})=>H).map((H)=>uD(H,X));J.input=z2(Y)},uD=(Z,q)=>{let J=p8(Z,q,"utf8",!0);return pD(J),z2(J)},pD=(Z)=>{let q=Z.find((J)=>typeof J!=="string"&&!J0(J));if(q!==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: ${q}.`)};var YH=B(()=>{d8();T0();R0()});var c8=({stdioItems:Z,encoding:q,verboseInfo:J,fdNumber:X})=>X!=="all"&&A6(J,X)&&!j0.has(q)&&dD(X)&&(Z.some(({type:Q,value:$})=>Q==="native"&&cD.has($))||Z.every(({type:Q})=>x0.has(Q))),dD=(Z)=>Z===1||Z===2,cD,HH=async(Z,q,J,X)=>{for await(let Q of Z)if(!lD(q))KH(Q,J,X)},GH=(Z,q,J)=>{for(let X of Z)KH(X,q,J)},lD=(Z)=>Z._readableState.pipes.length>0,KH=(Z,q,J)=>{let X=p4(Z);c0({type:"output",verboseMessage:X,fdNumber:q,verboseInfo:J})};var s3=B(()=>{g1();R0();T6();M1();cD=new Set(["pipe","overlapped"])});import{writeFileSync as nD,appendFileSync as iD}from"node:fs";var UH=({fileDescriptors:Z,syncResult:{output:q},options:J,isMaxBuffer:X,verboseInfo:Q})=>{if(q===null)return{output:Array.from({length:3})};let $={},Y=new Set([]);return{output:q.map((K,W)=>aD({result:K,fileDescriptors:Z,fdNumber:W,state:$,outputFiles:Y,isMaxBuffer:X,verboseInfo:Q},J)),...$}},aD=({result:Z,fileDescriptors:q,fdNumber:J,state:X,outputFiles:Q,isMaxBuffer:$,verboseInfo:Y},{buffer:H,encoding:K,lines:W,stripFinalNewline:U,maxBuffer:V})=>{if(Z===null)return;let L=o9(Z,$,V),_=J1(L),{stdioItems:z,objectMode:R}=q[J],D=oD([_],z,K,X),{serializedResult:F,finalResult:k=F}=sD({chunks:D,objectMode:R,encoding:K,lines:W,stripFinalNewline:U,fdNumber:J});rD({serializedResult:F,fdNumber:J,state:X,verboseInfo:Y,encoding:K,stdioItems:z,objectMode:R});let M=H[J]?k:void 0;try{if(X.error===void 0)tD(F,z,Q);return M}catch(O){return X.error=O,M}},oD=(Z,q,J,X)=>{try{return p8(Z,q,J,!1)}catch(Q){return X.error=Q,Z}},sD=({chunks:Z,objectMode:q,encoding:J,lines:X,stripFinalNewline:Q,fdNumber:$})=>{if(q)return{serializedResult:Z};if(J==="buffer")return{serializedResult:z2(Z)};let Y=wQ(Z,J);if(X[$])return{serializedResult:Y,finalResult:c3(Y,!Q[$],q)};return{serializedResult:Y}},rD=({serializedResult:Z,fdNumber:q,state:J,verboseInfo:X,encoding:Q,stdioItems:$,objectMode:Y})=>{if(!c8({stdioItems:$,encoding:Q,verboseInfo:X,fdNumber:q}))return;let H=c3(Z,!1,Y);try{GH(H,q,X)}catch(K){J.error??=K}},tD=(Z,q,J)=>{for(let{path:X,append:Q}of q.filter(({type:$})=>S8.has($))){let $=typeof X==="string"?X:X.toString();if(Q||J.has($))iD(X,Z);else J.add($),nD(X,Z)}};var WH=B(()=>{s3();d8();f8();T0();R0();u1()});var VH=([,Z,q],J)=>{if(!J.all)return;if(Z===void 0)return q;if(q===void 0)return Z;if(Array.isArray(Z))return Array.isArray(q)?[...Z,...q]:[...Z,G1(q,J,"all")];if(Array.isArray(q))return[G1(Z,J,"all"),...q];if(J0(Z)&&J0(q))return a5([Z,q]);return`${Z}${q}`};var BH=B(()=>{T0();x2()});import{once as r3}from"node:events";var LH=async(Z,q)=>{let[J,X]=await eD(Z);return q.isForcefullyTerminated??=!1,[J,X]},eD=async(Z)=>{let[q,J]=await Promise.allSettled([r3(Z,"spawn"),r3(Z,"exit")]);if(q.status==="rejected")return[];return J.status==="rejected"?_H(Z):J.value},_H=async(Z)=>{try{return await r3(Z,"exit")}catch{return _H(Z)}},zH=async(Z)=>{let[q,J]=await Z;if(!ZA(q,J)&&t3(q,J))throw new l0;return[q,J]},ZA=(Z,q)=>Z===void 0&&q===void 0,t3=(Z,q)=>Z!==0||q!==null;var e3=B(()=>{b1()});var RH=({error:Z,status:q,signal:J,output:X},{maxBuffer:Q})=>{let $=qA(Z,q,J),Y=$?.code==="ETIMEDOUT",H=a9($,X,Q);return{resultError:$,exitCode:q,signal:J,timedOut:Y,isMaxBuffer:H}},qA=(Z,q,J)=>{if(Z!==void 0)return Z;return t3(q,J)?new l0:void 0};var FH=B(()=>{b1();u1();e3()});import{spawnSync as JA}from"node:child_process";var MH=(Z,q,J)=>{let{file:X,commandArguments:Q,command:$,escapedCommand:Y,startTime:H,verboseInfo:K,options:W,fileDescriptors:U}=XA(Z,q,J),V=YA({file:X,commandArguments:Q,options:W,command:$,escapedCommand:Y,verboseInfo:K,fileDescriptors:U,startTime:H});return E6(V,K,W)},XA=(Z,q,J)=>{let{command:X,escapedCommand:Q,startTime:$,verboseInfo:Y}=l4(Z,q,J),H=QA(J),{file:K,commandArguments:W,options:U}=M8(Z,q,H);$A(U);let V=pY(U,Y);return{file:K,commandArguments:W,command:X,escapedCommand:Q,startTime:$,verboseInfo:Y,options:U,fileDescriptors:V}},QA=(Z)=>Z.node&&!Z.ipc?{...Z,ipc:!1}:Z,$A=({ipc:Z,ipcInput:q,detached:J,cancelSignal:X})=>{if(q)l8("ipcInput");if(Z)l8("ipc: true");if(J)l8("detached: true");if(X)l8("cancelSignal")},l8=(Z)=>{throw TypeError(`The "${Z}" option cannot be used with synchronous methods.`)},YA=({file:Z,commandArguments:q,options:J,command:X,escapedCommand:Q,verboseInfo:$,fileDescriptors:Y,startTime:H})=>{let K=HA({file:Z,commandArguments:q,options:J,command:X,escapedCommand:Q,fileDescriptors:Y,startTime:H});if(K.failed)return K;let{resultError:W,exitCode:U,signal:V,timedOut:L,isMaxBuffer:_}=RH(K,J),{output:z,error:R=W}=UH({fileDescriptors:Y,syncResult:K,options:J,isMaxBuffer:_,verboseInfo:$}),D=z.map((k,M)=>G1(k,J,M)),F=G1(VH(z,J),J,"all");return KA({error:R,exitCode:U,signal:V,timedOut:L,isMaxBuffer:_,stdio:D,all:F,options:J,command:X,escapedCommand:Q,startTime:H})},HA=({file:Z,commandArguments:q,options:J,command:X,escapedCommand:Q,fileDescriptors:$,startTime:Y})=>{try{$H($,J);let H=GA(J);return JA(...D8(Z,q,H))}catch(H){return P6({error:H,command:X,escapedCommand:Q,fileDescriptors:$,options:J,startTime:Y,isSync:!0})}},GA=({encoding:Z,maxBuffer:q,...J})=>({...J,encoding:"buffer",maxBuffer:P8(q)}),KA=({error:Z,exitCode:q,signal:J,timedOut:X,isMaxBuffer:Q,stdio:$,all:Y,options:H,command:K,escapedCommand:W,startTime:U})=>Z===void 0?E8({command:K,escapedCommand:W,stdio:$,all:Y,ipcOutput:[],options:H,startTime:U}):k2({error:Z,command:K,escapedCommand:W,timedOut:X,isCanceled:!1,isGracefullyCanceled:!1,isMaxBuffer:Q,isForcefullyTerminated:!1,exitCode:q,signal:J,stdio:$,all:Y,ipcOutput:[],options:H,startTime:U,isSync:!0});var DH=B(()=>{J3();j3();I3();N2();v8();cY();x2();YH();WH();u1();BH();FH()});import{once as ZZ,on as UA}from"node:events";var AH=({anyProcess:Z,channel:q,isSubprocess:J,ipc:X},{reference:Q=!0,filter:$}={})=>{return j6({methodName:"getOneMessage",isSubprocess:J,ipc:X,isConnected:V8(Z)}),WA({anyProcess:Z,channel:q,isSubprocess:J,filter:$,reference:Q})},WA=async({anyProcess:Z,channel:q,isSubprocess:J,filter:X,reference:Q})=>{$8(q,Q);let $=T1(Z,q,J),Y=new AbortController;try{return await Promise.race([VA($,X,Y),BA($,J,Y),LA($,J,Y)])}catch(H){throw I6(Z),H}finally{Y.abort(),Y8(q,Q)}},VA=async(Z,q,{signal:J})=>{if(q===void 0){let[X]=await ZZ(Z,"message",{signal:J});return X}for await(let[X]of UA(Z,"message",{signal:J}))if(q(X))return X},BA=async(Z,q,{signal:J})=>{await ZZ(Z,"disconnect",{signal:J}),E$(q)},LA=async(Z,q,{signal:J})=>{let[X]=await ZZ(Z,"strict:error",{signal:J});throw q8(X,q)};var TH=B(()=>{O6();T2();A2()});import{once as IH,on as _A}from"node:events";var OH=({anyProcess:Z,channel:q,isSubprocess:J,ipc:X},{reference:Q=!0}={})=>qZ({anyProcess:Z,channel:q,isSubprocess:J,ipc:X,shouldAwait:!J,reference:Q}),qZ=({anyProcess:Z,channel:q,isSubprocess:J,ipc:X,shouldAwait:Q,reference:$})=>{j6({methodName:"getEachMessage",isSubprocess:J,ipc:X,isConnected:V8(Z)}),$8(q,$);let Y=T1(Z,q,J),H=new AbortController,K={};return zA(Z,Y,H),RA({ipcEmitter:Y,isSubprocess:J,controller:H,state:K}),FA({anyProcess:Z,channel:q,ipcEmitter:Y,isSubprocess:J,shouldAwait:Q,controller:H,state:K,reference:$})},zA=async(Z,q,J)=>{try{await IH(q,"disconnect",{signal:J.signal}),J.abort()}catch{}},RA=async({ipcEmitter:Z,isSubprocess:q,controller:J,state:X})=>{try{let[Q]=await IH(Z,"strict:error",{signal:J.signal});X.error=q8(Q,q),J.abort()}catch{}},FA=async function*({anyProcess:Z,channel:q,ipcEmitter:J,isSubprocess:X,shouldAwait:Q,controller:$,state:Y,reference:H}){try{for await(let[K]of _A(J,"message",{signal:$.signal}))jH(Y),yield K}catch{jH(Y)}finally{if($.abort(),Y8(q,H),!X)I6(Z);if(Q)await Z}},jH=({error:Z})=>{if(Z)throw Z};var JZ=B(()=>{O6();T2();A2()});import wH from"node:process";var kH=(Z,{ipc:q})=>{Object.assign(Z,xH(Z,!1,q))},NH=()=>{let Z=wH,q=!0,J=wH.channel!==void 0;return{...xH(Z,!0,J),getCancelSignal:$9.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:!0,ipc:J})}},xH=(Z,q,J)=>({sendMessage:z8.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:q,ipc:J}),getOneMessage:AH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:q,ipc:J}),getEachMessage:OH.bind(void 0,{anyProcess:Z,channel:Z.channel,isSubprocess:q,ipc:J})});var XZ=B(()=>{R8();TH();JZ();U8()});import{ChildProcess as MA}from"node:child_process";import{PassThrough as DA,Readable as AA,Writable as TA,Duplex as jA}from"node:stream";var PH=({error:Z,command:q,escapedCommand:J,fileDescriptors:X,options:Q,startTime:$,verboseInfo:Y})=>{u3(X);let H=new MA;IA(H,X),Object.assign(H,{readable:OA,writable:wA,duplex:kA});let K=P6({error:Z,command:q,escapedCommand:J,fileDescriptors:X,options:Q,startTime:$,isSync:!1}),W=NA(K,Y,Q);return{subprocess:H,promise:W}},IA=(Z,q)=>{let J=E2(),X=E2(),Q=E2(),$=Array.from({length:q.length-3},E2),Y=E2(),H=[J,X,Q,...$];Object.assign(Z,{stdin:J,stdout:X,stderr:Q,all:Y,stdio:H})},E2=()=>{let Z=new DA;return Z.end(),Z},OA=()=>new AA({read(){}}),wA=()=>new TA({write(){}}),kA=()=>new jA({read(){},write(){}}),NA=async(Z,q,J)=>E6(Z,q,J);var EH=B(()=>{h8();N2();v8()});import{createReadStream as vH,createWriteStream as CH}from"node:fs";import{Buffer as xA}from"node:buffer";import{Readable as v2,Writable as PA,Duplex as EA}from"node:stream";var SH=(Z,q)=>b8(vA,Z,q,!1),C2=({type:Z,optionName:q})=>{throw TypeError(`The \`${q}\` option cannot be ${j1[Z]}.`)},yH,vA;var bH=B(()=>{d8();h8();R0();yH={fileNumber:C2,generator:o3,asyncGenerator:o3,nodeStream:({value:Z})=>({stream:Z}),webTransform({value:{transform:Z,writableObjectMode:q,readableObjectMode:J}}){let X=q||J;return{stream:EA.fromWeb(Z,{objectMode:X})}},duplex:({value:{transform:Z}})=>({stream:Z}),native(){}},vA={input:{...yH,fileUrl:({value:Z})=>({stream:vH(Z)}),filePath:({value:{file:Z}})=>({stream:vH(Z)}),webStream:({value:Z})=>({stream:v2.fromWeb(Z)}),iterable:({value:Z})=>({stream:v2.from(Z)}),asyncIterable:({value:Z})=>({stream:v2.from(Z)}),string:({value:Z})=>({stream:v2.from(Z)}),uint8Array:({value:Z})=>({stream:v2.from(xA.from(Z))})},output:{...yH,fileUrl:({value:Z})=>({stream:CH(Z)}),filePath:({value:{file:Z,append:q}})=>({stream:CH(Z,q?{flags:"a"}:{})}),webStream:({value:Z})=>({stream:PA.fromWeb(Z)}),iterable:C2,asyncIterable:C2,string:C2,uint8Array:C2}}});import{on as CA,once as hH}from"node:events";import{PassThrough as yA,getDefaultHighWaterMark as SA}from"node:stream";import{finished as mH}from"node:stream/promises";function c1(Z){if(!Array.isArray(Z))throw TypeError(`Expected an array, got \`${typeof Z}\`.`);for(let Q of Z)QZ(Q);let q=Z.some(({readableObjectMode:Q})=>Q),J=bA(Z,q),X=new uH({objectMode:q,writableHighWaterMark:J,readableHighWaterMark:J});for(let Q of Z)X.add(Q);return X}var bA=(Z,q)=>{if(Z.length===0)return SA(q);let J=Z.filter(({readableObjectMode:X})=>X===q).map(({readableHighWaterMark:X})=>X);return Math.max(...J)},uH,hA=async(Z,q,J)=>{n8(Z,gH);let X=new AbortController;try{await Promise.race([gA(Z,X),fA(Z,q,J,X)])}finally{X.abort(),n8(Z,-gH)}},gA=async(Z,{signal:q})=>{try{await mH(Z,{signal:q,cleanup:!0})}catch(J){throw pH(Z,J),J}},fA=async(Z,q,J,{signal:X})=>{for await(let[Q]of CA(Z,"unpipe",{signal:X}))if(q.has(Q))Q.emit(J)},QZ=(Z)=>{if(typeof Z?.pipe!=="function")throw TypeError(`Expected a readable stream, got: \`${typeof Z}\`.`)},mA=async({passThroughStream:Z,stream:q,streams:J,ended:X,aborted:Q,onFinished:$,unpipeEvent:Y})=>{n8(Z,fH);let H=new AbortController;try{await Promise.race([uA($,q,H),pA({passThroughStream:Z,stream:q,streams:J,ended:X,aborted:Q,controller:H}),dA({stream:q,streams:J,ended:X,aborted:Q,unpipeEvent:Y,controller:H})])}finally{H.abort(),n8(Z,-fH)}if(J.size>0&&J.size===X.size+Q.size)if(X.size===0&&Q.size>0)$Z(Z);else cA(Z)},uA=async(Z,q,{signal:J})=>{try{if(await Z,!J.aborted)$Z(q)}catch(X){if(!J.aborted)pH(q,X)}},pA=async({passThroughStream:Z,stream:q,streams:J,ended:X,aborted:Q,controller:{signal:$}})=>{try{if(await mH(q,{signal:$,cleanup:!0,readable:!0,writable:!1}),J.has(q))X.add(q)}catch(Y){if($.aborted||!J.has(q))return;if(dH(Y))Q.add(q);else cH(Z,Y)}},dA=async({stream:Z,streams:q,ended:J,aborted:X,unpipeEvent:Q,controller:{signal:$}})=>{if(await hH(Z,Q,{signal:$}),!Z.readable)return hH($,"abort",{signal:$});q.delete(Z),J.delete(Z),X.delete(Z)},cA=(Z)=>{if(Z.writable)Z.end()},pH=(Z,q)=>{if(dH(q))$Z(Z);else cH(Z,q)},dH=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",$Z=(Z)=>{if(Z.readable||Z.writable)Z.destroy()},cH=(Z,q)=>{if(!Z.destroyed)Z.once("error",lA),Z.destroy(q)},lA=()=>{},n8=(Z,q)=>{let J=Z.getMaxListeners();if(J!==0&&J!==Number.POSITIVE_INFINITY)Z.setMaxListeners(J+q)},gH=2,fH=1;var i8=B(()=>{uH=class uH extends yA{#J=new Set([]);#X=new Set([]);#q=new Set([]);#Y;#G=Symbol("unpipe");#V=new WeakMap;add(Z){if(QZ(Z),this.#J.has(Z))return;this.#J.add(Z),this.#Y??=hA(this,this.#J,this.#G);let q=mA({passThroughStream:this,stream:Z,streams:this.#J,ended:this.#X,aborted:this.#q,onFinished:this.#Y,unpipeEvent:this.#G});this.#V.set(Z,q),Z.pipe(this,{end:!1})}async remove(Z){if(QZ(Z),!this.#J.has(Z))return!1;let q=this.#V.get(Z);if(q===void 0)return!1;return this.#V.delete(Z),Z.unpipe(this),await q,!0}}});import{finished as lH}from"node:stream/promises";var C6=(Z,q)=>{Z.pipe(q),nA(Z,q),iA(Z,q)},nA=async(Z,q)=>{if(b0(Z)||b0(q))return;try{await lH(Z,{cleanup:!0,readable:!0,writable:!1})}catch{}YZ(q)},YZ=(Z)=>{if(Z.writable)Z.end()},iA=async(Z,q)=>{if(b0(Z)||b0(q))return;try{await lH(q,{cleanup:!0,readable:!1,writable:!0})}catch{}HZ(Z)},HZ=(Z)=>{if(Z.readable)Z.destroy()};var a8=B(()=>{X1()});var nH=(Z,q,J)=>{let X=new Map;for(let[Q,{stdioItems:$,direction:Y}]of Object.entries(q)){for(let{stream:H}of $.filter(({type:K})=>x0.has(K)))aA(Z,H,Y,Q);for(let{stream:H}of $.filter(({type:K})=>!x0.has(K)))sA({subprocess:Z,stream:H,direction:Y,fdNumber:Q,pipeGroups:X,controller:J})}for(let[Q,$]of X.entries()){let Y=$.length===1?$[0]:c1($);C6(Y,Q)}},aA=(Z,q,J,X)=>{if(J==="output")C6(Z.stdio[X],q);else C6(q,Z.stdio[X]);let Q=oA[X];if(Q!==void 0)Z[Q]=q;Z.stdio[X]=q},oA,sA=({subprocess:Z,stream:q,direction:J,fdNumber:X,pipeGroups:Q,controller:$})=>{if(q===void 0)return;rA(q,$);let[Y,H]=J==="output"?[q,Z.stdio[X]]:[Z.stdio[X],q],K=Q.get(Y)??[];Q.set(Y,[...K,H])},rA=(Z,{signal:q})=>{if(b0(Z))h1(Z,tA,q)},tA=2;var iH=B(()=>{i8();X1();Q8();R0();a8();oA=["stdin","stdout","stderr"]});var l1;var aH=B(()=>{l1=[];l1.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")l1.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")l1.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class oH{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(KZ[GZ])return KZ[GZ];eA(KZ,GZ,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(Z,q){this.listeners[Z].push(q)}removeListener(Z,q){let J=this.listeners[Z],X=J.indexOf(q);if(X===-1)return;if(X===0&&J.length===1)J.length=0;else J.splice(X,1)}emit(Z,q,J){if(this.emitted[Z])return!1;this.emitted[Z]=!0;let X=!1;for(let Q of this.listeners[Z])X=Q(q,J)===!0||X;if(Z==="exit")X=this.emit("afterExit",q,J)||X;return X}}class WZ{}var o8=(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",GZ,KZ,eA,ZT=(Z)=>{return{onExit(q,J){return Z.onExit(q,J)},load(){return Z.load()},unload(){return Z.unload()}}},sH,rH,UZ,tH,og,sg;var eH=B(()=>{aH();GZ=Symbol.for("signal-exit emitter"),KZ=globalThis,eA=Object.defineProperty.bind(Object);sH=class sH extends WZ{onExit(){return()=>{}}load(){}unload(){}};rH=class rH extends WZ{#J=UZ.platform==="win32"?"SIGINT":"SIGHUP";#X=new oH;#q;#Y;#G;#V={};#A=!1;constructor(Z){super();this.#q=Z,this.#V={};for(let q of l1)this.#V[q]=()=>{let J=this.#q.listeners(q),{count:X}=this.#X,Q=Z;if(typeof Q.__signal_exit_emitter__==="object"&&typeof Q.__signal_exit_emitter__.count==="number")X+=Q.__signal_exit_emitter__.count;if(J.length===X){this.unload();let $=this.#X.emit("exit",null,q),Y=q==="SIGHUP"?this.#J:q;if(!$)Z.kill(Z.pid,Y)}};this.#G=Z.reallyExit,this.#Y=Z.emit}onExit(Z,q){if(!o8(this.#q))return()=>{};if(this.#A===!1)this.load();let J=q?.alwaysLast?"afterExit":"exit";return this.#X.on(J,Z),()=>{if(this.#X.removeListener(J,Z),this.#X.listeners.exit.length===0&&this.#X.listeners.afterExit.length===0)this.unload()}}load(){if(this.#A)return;this.#A=!0,this.#X.count+=1;for(let Z of l1)try{let q=this.#V[Z];if(q)this.#q.on(Z,q)}catch(q){}this.#q.emit=(Z,...q)=>{return this.#H(Z,...q)},this.#q.reallyExit=(Z)=>{return this.#z(Z)}}unload(){if(!this.#A)return;this.#A=!1,l1.forEach((Z)=>{let q=this.#V[Z];if(!q)throw Error("Listener not defined for signal: "+Z);try{this.#q.removeListener(Z,q)}catch(J){}}),this.#q.emit=this.#Y,this.#q.reallyExit=this.#G,this.#X.count-=1}#z(Z){if(!o8(this.#q))return 0;return this.#q.exitCode=Z||0,this.#X.emit("exit",this.#q.exitCode,null),this.#G.call(this.#q,this.#q.exitCode)}#H(Z,...q){let J=this.#Y;if(Z==="exit"&&o8(this.#q)){if(typeof q[0]==="number")this.#q.exitCode=q[0];let X=J.call(this.#q,Z,...q);return this.#X.emit("exit",this.#q.exitCode,null),X}else return J.call(this.#q,Z,...q)}};UZ=globalThis.process,{onExit:tH,load:og,unload:sg}=ZT(o8(UZ)?new rH(UZ):new sH)});import{addAbortListener as qT}from"node:events";var ZG=(Z,{cleanup:q,detached:J},{signal:X})=>{if(!q||J)return;let Q=tH(()=>{Z.kill()});qT(X,()=>{Q()})};var qG=B(()=>{eH()});var XG=({source:Z,sourcePromise:q,boundOptions:J,createNested:X},...Q)=>{let $=d4(),{destination:Y,destinationStream:H,destinationError:K,from:W,unpipeSignal:U}=JT(J,X,Q),{sourceStream:V,sourceError:L}=QT(Z,W),{options:_,fileDescriptors:z}=i0.get(Z);return{sourcePromise:q,sourceStream:V,sourceOptions:_,sourceError:L,destination:Y,destinationStream:H,destinationError:K,unpipeSignal:U,fileDescriptors:z,startTime:$}},JT=(Z,q,J)=>{try{let{destination:X,pipeOptions:{from:Q,to:$,unpipeSignal:Y}={}}=XT(Z,q,...J),H=X8(X,$);return{destination:X,destinationStream:H,from:Q,unpipeSignal:Y}}catch(X){return{destinationError:X}}},XT=(Z,q,J,...X)=>{if(Array.isArray(J))return{destination:q(JG,Z)(J,...X),pipeOptions:Z};if(typeof J==="string"||J instanceof URL||l5(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]=v4(J,...X);return{destination:q(JG)(Q,$,Y),pipeOptions:Y}}if(i0.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:X[0]}}throw TypeError(`The first argument must be a template string, an options object, or an Execa subprocess: ${J}`)},JG=({options:Z})=>({options:{...Z,stdin:"pipe",piped:!0}}),QT=(Z,q)=>{try{return{sourceStream:k6(Z,q)}}catch(J){return{sourceError:J}}};var QG=B(()=>{i5();c4();A1();M6()});var YG=({sourceStream:Z,sourceError:q,destinationStream:J,destinationError:X,fileDescriptors:Q,sourceOptions:$,startTime:Y})=>{let H=$T({sourceStream:Z,sourceError:q,destinationStream:J,destinationError:X});if(H!==void 0)throw VZ({error:H,fileDescriptors:Q,sourceOptions:$,startTime:Y})},$T=({sourceStream:Z,sourceError:q,destinationStream:J,destinationError:X})=>{if(q!==void 0&&X!==void 0)return X;if(X!==void 0)return HZ(Z),X;if(q!==void 0)return YZ(J),q},VZ=({error:Z,fileDescriptors:q,sourceOptions:J,startTime:X})=>P6({error:Z,command:$G,escapedCommand:$G,fileDescriptors:q,options:J,startTime:X,isSync:!1}),$G="source.pipe(destination)";var BZ=B(()=>{N2();a8()});var HG=async(Z)=>{let[{status:q,reason:J,value:X=J},{status:Q,reason:$,value:Y=$}]=await Z;if(!Y.pipedFrom.includes(X))Y.pipedFrom.push(X);if(Q==="rejected")throw Y;if(q==="rejected")throw X;return Y};var GG=()=>{};import{finished as YT}from"node:stream/promises";var KG=(Z,q,J)=>{let X=s8.has(q)?GT(Z,q):HT(Z,q);return h1(Z,UT,J.signal),h1(q,WT,J.signal),KT(q),X},HT=(Z,q)=>{let J=c1([Z]);return C6(J,q),s8.set(q,J),J},GT=(Z,q)=>{let J=s8.get(q);return J.add(Z),J},KT=async(Z)=>{try{await YT(Z,{cleanup:!0,readable:!1,writable:!0})}catch{}s8.delete(Z)},s8,UT=2,WT=1;var UG=B(()=>{i8();Q8();a8();s8=new WeakMap});import{aborted as VT}from"node:util";var WG=(Z,q)=>Z===void 0?[]:[BT(Z,q)],BT=async(Z,{sourceStream:q,mergedStream:J,fileDescriptors:X,sourceOptions:Q,startTime:$})=>{await VT(Z,q),await J.remove(q);let Y=Error("Pipe canceled by `unpipeSignal` option.");throw VZ({error:Y,fileDescriptors:X,sourceOptions:Q,startTime:$})};var VG=B(()=>{BZ()});var r8=(Z,...q)=>{if(e(q[0]))return r8.bind(void 0,{...Z,boundOptions:{...Z.boundOptions,...q[0]}});let{destination:J,...X}=XG(Z,...q),Q=LT({...X,destination:J});return Q.pipe=r8.bind(void 0,{...Z,source:J,sourcePromise:Q,boundOptions:{}}),Q},LT=async({sourcePromise:Z,sourceStream:q,sourceOptions:J,sourceError:X,destination:Q,destinationStream:$,destinationError:Y,unpipeSignal:H,fileDescriptors:K,startTime:W})=>{let U=_T(Z,Q);YG({sourceStream:q,sourceError:X,destinationStream:$,destinationError:Y,fileDescriptors:K,sourceOptions:J,startTime:W});let V=new AbortController;try{let L=KG(q,$,V);return await Promise.race([HG(U),...WG(H,{sourceStream:q,mergedStream:L,sourceOptions:J,fileDescriptors:K,startTime:W})])}finally{V.abort()}},_T=(Z,q)=>Promise.allSettled([Z,q]);var BG=B(()=>{q1();QG();BZ();GG();UG();VG()});import{on as zT}from"node:events";import{getDefaultHighWaterMark as RT}from"node:stream";var t8=({subprocessStdout:Z,subprocess:q,binary:J,shouldEncode:X,encoding:Q,preserveNewlines:$})=>{let Y=new AbortController;return FT(q,Y),_G({stream:Z,controller:Y,binary:J,shouldEncode:!Z.readableObjectMode&&X,encoding:Q,shouldSplit:!Z.readableObjectMode,preserveNewlines:$})},FT=async(Z,q)=>{try{await Z}catch{}finally{q.abort()}},LZ=({stream:Z,onStreamEnd:q,lines:J,encoding:X,stripFinalNewline:Q,allMixed:$})=>{let Y=new AbortController;MT(q,Y,Z);let H=Z.readableObjectMode&&!$;return _G({stream:Z,controller:Y,binary:X==="buffer",shouldEncode:!H,encoding:X,shouldSplit:!H&&J,preserveNewlines:!Q})},MT=async(Z,q,J)=>{try{await Z}catch{J.destroy()}finally{q.abort()}},_G=({stream:Z,controller:q,binary:J,shouldEncode:X,encoding:Q,shouldSplit:$,preserveNewlines:Y})=>{let H=zT(Z,"data",{signal:q.signal,highWaterMark:LG,highWatermark:LG});return DT({onStdoutChunk:H,controller:q,binary:J,shouldEncode:X,encoding:Q,shouldSplit:$,preserveNewlines:Y})},_Z,LG,DT=async function*({onStdoutChunk:Z,controller:q,binary:J,shouldEncode:X,encoding:Q,shouldSplit:$,preserveNewlines:Y}){let H=AT({binary:J,shouldEncode:X,encoding:Q,shouldSplit:$,preserveNewlines:Y});try{for await(let[K]of Z)yield*d1(K,H,0)}catch(K){if(!q.signal.aborted)throw K}finally{yield*P2(H)}},AT=({binary:Z,shouldEncode:q,encoding:J,shouldSplit:X,preserveNewlines:Q})=>[m8(Z,J,!q),g8(Z,Q,!X,{})].filter(Boolean);var e8=B(()=>{l3();f8();a3();_Z=RT(!0),LG=_Z});import{setImmediate as TT}from"node:timers/promises";var zG=async({stream:Z,onStreamEnd:q,fdNumber:J,encoding:X,buffer:Q,maxBuffer:$,lines:Y,allMixed:H,stripFinalNewline:K,verboseInfo:W,streamInfo:U})=>{let V=jT({stream:Z,onStreamEnd:q,fdNumber:J,encoding:X,allMixed:H,verboseInfo:W,streamInfo:U});if(!Q){await Promise.all([IT(Z),V]);return}let L=p3(K,J),_=LZ({stream:Z,onStreamEnd:q,lines:Y,encoding:X,stripFinalNewline:L,allMixed:H}),[z]=await Promise.all([OT({stream:Z,iterable:_,fdNumber:J,encoding:X,maxBuffer:$,lines:Y}),V]);return z},jT=async({stream:Z,onStreamEnd:q,fdNumber:J,encoding:X,allMixed:Q,verboseInfo:$,streamInfo:{fileDescriptors:Y}})=>{if(!c8({stdioItems:Y[J]?.stdioItems,encoding:X,verboseInfo:$,fdNumber:J}))return;let H=LZ({stream:Z,onStreamEnd:q,lines:!0,encoding:X,stripFinalNewline:!0,allMixed:Q});await HH(H,Z,J,$)},IT=async(Z)=>{if(await TT(),Z.readableFlowing===null)Z.resume()},OT=async({stream:Z,stream:{readableObjectMode:q},iterable:J,fdNumber:X,encoding:Q,maxBuffer:$,lines:Y})=>{try{if(q||Y)return await O8(J,{maxBuffer:$});if(Q==="buffer")return new Uint8Array(await w8(J,{maxBuffer:$}));return await N8(J,{maxBuffer:$})}catch(H){return RG(l9({error:H,stream:Z,readableObjectMode:q,lines:Y,encoding:Q,fdNumber:X}))}},zZ=async(Z)=>{try{return await Z}catch(q){return RG(q)}},RG=({bufferedData:Z})=>IQ(Z)?new Uint8Array(Z):Z;var RZ=B(()=>{x8();T0();s3();e8();u1();x2()});import{finished as wT}from"node:stream/promises";var y2=async(Z,q,J,{isSameDirection:X,stopOnExit:Q=!1}={})=>{let $=kT(Z,J),Y=new AbortController;try{await Promise.race([...Q?[J.exitPromise]:[],wT(Z,{cleanup:!0,signal:Y.signal})])}catch(H){if(!$.stdinCleanedUp)PT(H,q,J,X)}finally{Y.abort()}},kT=(Z,{originalStreams:[q],subprocess:J})=>{let X={stdinCleanedUp:!1};if(Z===q)NT(Z,J,X);return X},NT=(Z,q,J)=>{let{_destroy:X}=Z;Z._destroy=(...Q)=>{xT(q,J),X.call(Z,...Q)}},xT=({exitCode:Z,signalCode:q},J)=>{if(Z!==null||q!==null)J.stdinCleanedUp=!0},PT=(Z,q,J,X)=>{if(!ET(Z,q,J,X))throw Z},ET=(Z,q,J,X=!0)=>{if(J.propagating)return FG(Z)||Z7(Z);return J.propagating=!0,FZ(J,q)===X?FG(Z):Z7(Z)},FZ=({fileDescriptors:Z},q)=>q!=="all"&&Z[q].direction==="input",Z7=(Z)=>Z?.code==="ERR_STREAM_PREMATURE_CLOSE",FG=(Z)=>Z?.code==="EPIPE";var q7=()=>{};var MG=({subprocess:Z,encoding:q,buffer:J,maxBuffer:X,lines:Q,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>Z.stdio.map((K,W)=>MZ({stream:K,fdNumber:W,encoding:q,buffer:J[W],maxBuffer:X[W],lines:Q[W],allMixed:!1,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})),MZ=async({stream:Z,fdNumber:q,encoding:J,buffer:X,maxBuffer:Q,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:W})=>{if(!Z)return;let U=y2(Z,q,W);if(FZ(W,q)){await U;return}let[V]=await Promise.all([zG({stream:Z,onStreamEnd:U,fdNumber:q,encoding:J,buffer:X,maxBuffer:Q,lines:$,allMixed:Y,stripFinalNewline:H,verboseInfo:K,streamInfo:W}),U]);return V};var DZ=B(()=>{RZ();q7()});var DG=({stdout:Z,stderr:q},{all:J})=>J&&(Z||q)?c1([Z,q].filter(Boolean)):void 0,AG=({subprocess:Z,encoding:q,buffer:J,maxBuffer:X,lines:Q,stripFinalNewline:$,verboseInfo:Y,streamInfo:H})=>MZ({...vT(Z,J),fdNumber:"all",encoding:q,maxBuffer:X[1]+X[2],lines:Q[1]||Q[2],allMixed:CT(Z),stripFinalNewline:$,verboseInfo:Y,streamInfo:H}),vT=({stdout:Z,stderr:q,all:J},[,X,Q])=>{let $=X||Q;if(!$)return{stream:J,buffer:$};if(!X)return{stream:q,buffer:$};if(!Q)return{stream:Z,buffer:$};return{stream:J,buffer:$}},CT=({all:Z,stdout:q,stderr:J})=>Z&&q&&J&&q.readableObjectMode!==J.readableObjectMode;var AZ=B(()=>{i8();DZ()});var TG=(Z)=>A6(Z,"ipc"),jG=(Z,q)=>{let J=p4(Z);c0({type:"ipc",verboseMessage:J,fdNumber:"ipc",verboseInfo:q})};var IG=B(()=>{T6();M1()});var OG=async({subprocess:Z,buffer:q,maxBuffer:J,ipc:X,ipcOutput:Q,verboseInfo:$})=>{if(!X)return Q;let Y=TG($),H=Q1(q,"ipc"),K=Q1(J,"ipc");for await(let W of qZ({anyProcess:Z,channel:Z.channel,isSubprocess:!1,ipc:X,shouldAwait:!1,reference:!0})){if(H)n9(Z,Q,K),Q.push(W);if(Y)jG(W,$)}return Q},wG=async(Z,q)=>{return await Promise.allSettled([Z]),q};var kG=B(()=>{u1();IG();$1();JZ()});import{once as yT}from"node:events";var NG=async({subprocess:Z,options:{encoding:q,buffer:J,maxBuffer:X,lines:Q,timeoutDuration:$,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:K,stripFinalNewline:W,ipc:U,ipcInput:V},context:L,verboseInfo:_,fileDescriptors:z,originalStreams:R,onInternalError:D,controller:F})=>{let k=LH(Z,L),M={originalStreams:R,fileDescriptors:z,subprocess:Z,exitPromise:k,propagating:!1},O=MG({subprocess:Z,encoding:q,buffer:J,maxBuffer:X,lines:Q,stripFinalNewline:W,verboseInfo:_,streamInfo:M}),T=AG({subprocess:Z,encoding:q,buffer:J,maxBuffer:X,lines:Q,stripFinalNewline:W,verboseInfo:_,streamInfo:M}),I=[],A=OG({subprocess:Z,buffer:J,maxBuffer:X,ipc:U,ipcOutput:I,verboseInfo:_}),b=ST(R,Z,M),w=bT(z,M);try{return await Promise.race([Promise.all([{},zH(k),Promise.all(O),T,A,_9(Z,V),...b,...w]),D,hT(Z,F),...U9(Z,$,L,F),...P$({subprocess:Z,cancelSignal:Y,gracefulCancel:H,context:L,controller:F}),...G9({subprocess:Z,cancelSignal:Y,gracefulCancel:H,forceKillAfterDelay:K,context:L,controller:F})])}catch(x){return L.terminationReason??="other",Promise.all([{error:x},k,Promise.all(O.map((v)=>zZ(v))),zZ(T),wG(A,I),Promise.allSettled(b),Promise.allSettled(w)])}},ST=(Z,q,J)=>Z.map((X,Q)=>X===q.stdio[Q]?void 0:y2(X,Q,J)),bT=(Z,q)=>Z.flatMap(({stdioItems:J},X)=>J.filter(({value:Q,stream:$=Q})=>g0($,{checkOpen:!1})&&!b0($)).map(({type:Q,value:$,stream:Y=$})=>y2(Y,X,q,{isSameDirection:x0.has(Q),stopOnExit:Q==="native"}))),hT=async(Z,{signal:q})=>{let[J]=await yT(Z,"error",{signal:q});throw J};var xG=B(()=>{m1();F3();K3();R3();X1();R0();RZ();kG();D3();AZ();DZ();e3();q7()});var PG=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),S2=(Z,q,J)=>{let X=Z[J];if(!X.has(q))X.set(q,[]);let Q=X.get(q),$=n0();return Q.push($),{resolve:$.resolve.bind($),promises:Q}},y6=async({resolve:Z,promises:q},J)=>{Z();let[X]=await Promise.race([Promise.allSettled([!0,J]),Promise.all([!1,...q])]);return!X};var J7=B(()=>{w6()});import{finished as EG}from"node:stream/promises";var TZ=async(Z)=>{if(Z===void 0)return;try{await jZ(Z)}catch{}},vG=async(Z)=>{if(Z===void 0)return;try{await IZ(Z)}catch{}},jZ=async(Z)=>{await EG(Z,{cleanup:!0,readable:!1,writable:!0})},IZ=async(Z)=>{await EG(Z,{cleanup:!0,readable:!0,writable:!1})},X7=async(Z,q)=>{if(await Z,q)throw q},Q7=(Z,q,J)=>{if(J&&!Z7(J))Z.destroy(J);else if(q)Z.destroy()};var OZ=B(()=>{q7()});import{Readable as gT}from"node:stream";import{callbackify as fT}from"node:util";var CG=({subprocess:Z,concurrentStreams:q,encoding:J},{from:X,binary:Q=!0,preserveNewlines:$=!0}={})=>{let Y=Q||j0.has(J),{subprocessStdout:H,waitReadableDestroy:K}=wZ(Z,X,q),{readableEncoding:W,readableObjectMode:U,readableHighWaterMark:V}=kZ(H,Y),{read:L,onStdoutDataDone:_}=NZ({subprocessStdout:H,subprocess:Z,binary:Y,encoding:J,preserveNewlines:$}),z=new gT({read:L,destroy:fT(PZ.bind(void 0,{subprocessStdout:H,subprocess:Z,waitReadableDestroy:K})),highWaterMark:V,objectMode:U,encoding:W});return xZ({subprocessStdout:H,onStdoutDataDone:_,readable:z,subprocess:Z}),z},wZ=(Z,q,J)=>{let X=k6(Z,q),Q=S2(J,X,"readableDestroy");return{subprocessStdout:X,waitReadableDestroy:Q}},kZ=({readableEncoding:Z,readableObjectMode:q,readableHighWaterMark:J},X)=>X?{readableEncoding:Z,readableObjectMode:q,readableHighWaterMark:J}:{readableEncoding:Z,readableObjectMode:!0,readableHighWaterMark:_Z},NZ=({subprocessStdout:Z,subprocess:q,binary:J,encoding:X,preserveNewlines:Q})=>{let $=n0(),Y=t8({subprocessStdout:Z,subprocess:q,binary:J,shouldEncode:!J,encoding:X,preserveNewlines:Q});return{read(){mT(this,Y,$)},onStdoutDataDone:$}},mT=async(Z,q,J)=>{try{let{value:X,done:Q}=await q.next();if(Q)J.resolve();else Z.push(X)}catch{}},xZ=async({subprocessStdout:Z,onStdoutDataDone:q,readable:J,subprocess:X,subprocessStdin:Q})=>{try{if(await IZ(Z),await X,await TZ(Q),await q,J.readable)J.push(null)}catch($){await TZ(Q),yG(J,$)}},PZ=async({subprocessStdout:Z,subprocess:q,waitReadableDestroy:J},X)=>{if(await y6(J,q))yG(Z,X),await X7(q,X)},yG=(Z,q)=>{Q7(Z,Z.readable,q)};var EZ=B(()=>{g1();A1();e8();w6();J7();OZ()});import{Writable as uT}from"node:stream";import{callbackify as SG}from"node:util";var bG=({subprocess:Z,concurrentStreams:q},{to:J}={})=>{let{subprocessStdin:X,waitWritableFinal:Q,waitWritableDestroy:$}=vZ(Z,J,q),Y=new uT({...CZ(X,Z,Q),destroy:SG(SZ.bind(void 0,{subprocessStdin:X,subprocess:Z,waitWritableFinal:Q,waitWritableDestroy:$})),highWaterMark:X.writableHighWaterMark,objectMode:X.writableObjectMode});return yZ(X,Y),Y},vZ=(Z,q,J)=>{let X=X8(Z,q),Q=S2(J,X,"writableFinal"),$=S2(J,X,"writableDestroy");return{subprocessStdin:X,waitWritableFinal:Q,waitWritableDestroy:$}},CZ=(Z,q,J)=>({write:pT.bind(void 0,Z),final:SG(dT.bind(void 0,Z,q,J))}),pT=(Z,q,J,X)=>{if(Z.write(q,J))X();else Z.once("drain",X)},dT=async(Z,q,J)=>{if(await y6(J,q)){if(Z.writable)Z.end();await q}},yZ=async(Z,q,J)=>{try{if(await jZ(Z),q.writable)q.end()}catch(X){await vG(J),hG(q,X)}},SZ=async({subprocessStdin:Z,subprocess:q,waitWritableFinal:J,waitWritableDestroy:X},Q)=>{if(await y6(J,q),await y6(X,q))hG(Z,Q),await X7(q,Q)},hG=(Z,q)=>{Q7(Z,Z.writable,q)};var bZ=B(()=>{A1();J7();OZ()});import{Duplex as cT}from"node:stream";import{callbackify as lT}from"node:util";var gG=({subprocess:Z,concurrentStreams:q,encoding:J},{from:X,to:Q,binary:$=!0,preserveNewlines:Y=!0}={})=>{let H=$||j0.has(J),{subprocessStdout:K,waitReadableDestroy:W}=wZ(Z,X,q),{subprocessStdin:U,waitWritableFinal:V,waitWritableDestroy:L}=vZ(Z,Q,q),{readableEncoding:_,readableObjectMode:z,readableHighWaterMark:R}=kZ(K,H),{read:D,onStdoutDataDone:F}=NZ({subprocessStdout:K,subprocess:Z,binary:H,encoding:J,preserveNewlines:Y}),k=new cT({read:D,...CZ(U,Z,V),destroy:lT(nT.bind(void 0,{subprocessStdout:K,subprocessStdin:U,subprocess:Z,waitReadableDestroy:W,waitWritableFinal:V,waitWritableDestroy:L})),readableHighWaterMark:R,writableHighWaterMark:U.writableHighWaterMark,readableObjectMode:z,writableObjectMode:U.writableObjectMode,encoding:_});return xZ({subprocessStdout:K,onStdoutDataDone:F,readable:k,subprocess:Z,subprocessStdin:U}),yZ(U,k,K),k},nT=async({subprocessStdout:Z,subprocessStdin:q,subprocess:J,waitReadableDestroy:X,waitWritableFinal:Q,waitWritableDestroy:$},Y)=>{await Promise.all([PZ({subprocessStdout:Z,subprocess:J,waitReadableDestroy:X},Y),SZ({subprocessStdin:q,subprocess:J,waitWritableFinal:Q,waitWritableDestroy:$},Y)])};var fG=B(()=>{g1();EZ();bZ()});var hZ=(Z,q,{from:J,binary:X=!1,preserveNewlines:Q=!1}={})=>{let $=X||j0.has(q),Y=k6(Z,J),H=t8({subprocessStdout:Y,subprocess:Z,binary:$,shouldEncode:!0,encoding:q,preserveNewlines:Q});return iT(H,Y,Z)},iT=async function*(Z,q,J){try{yield*Z}finally{if(q.readable)q.destroy();await J}};var mG=B(()=>{g1();A1();e8()});var uG=(Z,{encoding:q})=>{let J=PG();Z.readable=CG.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:q}),Z.writable=bG.bind(void 0,{subprocess:Z,concurrentStreams:J}),Z.duplex=gG.bind(void 0,{subprocess:Z,concurrentStreams:J,encoding:q}),Z.iterable=hZ.bind(void 0,Z,q),Z[Symbol.asyncIterator]=hZ.bind(void 0,Z,q,{})};var pG=B(()=>{J7();EZ();bZ();fG();mG()});var dG=(Z,q)=>{for(let[J,X]of oT){let Q=X.value.bind(q);Reflect.defineProperty(Z,J,{...X,value:Q})}},aT,oT;var cG=B(()=>{aT=(async()=>{})().constructor.prototype,oT=["then","catch","finally"].map((Z)=>[Z,Reflect.getOwnPropertyDescriptor(aT,Z)])});import{setMaxListeners as sT}from"node:events";import{spawn as rT}from"node:child_process";var lG=(Z,q,J,X)=>{let{file:Q,commandArguments:$,command:Y,escapedCommand:H,startTime:K,verboseInfo:W,options:U,fileDescriptors:V}=tT(Z,q,J),{subprocess:L,promise:_}=Zj({file:Q,commandArguments:$,options:U,startTime:K,verboseInfo:W,command:Y,escapedCommand:H,fileDescriptors:V});return L.pipe=r8.bind(void 0,{source:L,sourcePromise:_,boundOptions:{},createNested:X}),dG(L,_),i0.set(L,{options:U,fileDescriptors:V}),L},tT=(Z,q,J)=>{let{command:X,escapedCommand:Q,startTime:$,verboseInfo:Y}=l4(Z,q,J),{file:H,commandArguments:K,options:W}=M8(Z,q,J),U=eT(W),V=SH(U,Y);return{file:H,commandArguments:K,command:X,escapedCommand:Q,startTime:$,verboseInfo:Y,options:U,fileDescriptors:V}},eT=({timeout:Z,signal:q,...J})=>{if(q!==void 0)throw TypeError('The "signal" option has been renamed to "cancelSignal" instead.');return{...J,timeoutDuration:Z}},Zj=({file:Z,commandArguments:q,options:J,startTime:X,verboseInfo:Q,command:$,escapedCommand:Y,fileDescriptors:H})=>{let K;try{K=rT(...D8(Z,q,J))}catch(z){return PH({error:z,command:$,escapedCommand:Y,fileDescriptors:H,options:J,startTime:X,verboseInfo:Q})}let W=new AbortController;sT(Number.POSITIVE_INFINITY,W.signal);let U=[...K.stdio];nH(K,H,W),ZG(K,J,W);let V={},L=n0();K.kill=N$.bind(void 0,{kill:K.kill.bind(K),options:J,onInternalError:L,context:V,controller:W}),K.all=DG(K,J),uG(K,J),kH(K,J);let _=qj({subprocess:K,options:J,startTime:X,verboseInfo:Q,fileDescriptors:H,originalStreams:U,command:$,escapedCommand:Y,context:V,onInternalError:L,controller:W});return{subprocess:K,promise:_}},qj=async({subprocess:Z,options:q,startTime:J,verboseInfo:X,fileDescriptors:Q,originalStreams:$,command:Y,escapedCommand:H,context:K,onInternalError:W,controller:U})=>{let[V,[L,_],z,R,D]=await NG({subprocess:Z,options:q,context:K,verboseInfo:X,fileDescriptors:Q,originalStreams:$,onInternalError:W,controller:U});U.abort(),W.resolve();let F=z.map((O,T)=>G1(O,q,T)),k=G1(R,q,"all"),M=Jj({errorInfo:V,exitCode:L,signal:_,stdio:F,all:k,ipcOutput:D,context:K,options:q,command:Y,escapedCommand:H,startTime:J});return E6(M,X,q)},Jj=({errorInfo:Z,exitCode:q,signal:J,stdio:X,all:Q,ipcOutput:$,context:Y,options:H,command:K,escapedCommand:W,startTime:U})=>("error"in Z)?k2({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:q,signal:J,stdio:X,all:Q,ipcOutput:$,options:H,startTime:U,isSync:!1}):E8({command:K,escapedCommand:W,stdio:X,all:Q,ipcOutput:$,options:H,startTime:U});var nG=B(()=>{x8();J3();j3();A1();I3();XZ();N2();v8();EH();bH();x2();iH();e4();qG();BG();AZ();xG();pG();w6();cG()});var $7=(Z,q)=>{let J=Object.fromEntries(Object.entries(q).map(([X,Q])=>[X,Xj(X,Z[X],Q)]));return{...Z,...J}},Xj=(Z,q,J)=>{if(Qj.has(Z)&&e(q)&&e(J))return{...q,...J};return J},Qj;var iG=B(()=>{q1();$1();Qj=new Set(["env",...t5])});var I1=(Z,q,J,X)=>{let Q=(Y,H,K)=>I1(Y,H,J,K),$=(...Y)=>$j({mapArguments:Z,deepOptions:J,boundOptions:q,setBoundExeca:X,createNested:Q},...Y);if(X!==void 0)X($,Q,q);return $},$j=({mapArguments:Z,deepOptions:q={},boundOptions:J={},setBoundExeca:X,createNested:Q},$,...Y)=>{if(e($))return Q(Z,$7(J,$),X);let{file:H,commandArguments:K,options:W,isSync:U}=Yj({mapArguments:Z,firstArgument:$,nextArguments:Y,deepOptions:q,boundOptions:J});return U?MH(H,K,W):lG(H,K,W,Q)},Yj=({mapArguments:Z,firstArgument:q,nextArguments:J,deepOptions:X,boundOptions:Q})=>{let $=PQ(q)?EQ(q,J):[q,...J],[Y,H,K]=v4(...$),W=$7($7(X,Q),K),{file:U=Y,commandArguments:V=H,options:L=W,isSync:_=!1}=Z({file:Y,commandArguments:H,options:W});return{file:U,commandArguments:V,options:L,isSync:_}};var aG=B(()=>{q1();i5();vQ();DH();nG();iG()});var oG=({file:Z,commandArguments:q})=>rG(Z,q),sG=({file:Z,commandArguments:q})=>({...rG(Z,q),isSync:!0}),rG=(Z,q)=>{if(q.length>0)throw TypeError(`The command and its arguments must be passed as a single string: ${Z} ${q}.`);let[J,...X]=Hj(Z);return{file:J,commandArguments:X}},Hj=(Z)=>{if(typeof Z!=="string")throw TypeError(`The command must be a string: ${String(Z)}.`);let q=Z.trim();if(q==="")return[];let J=[];for(let X of q.split(Gj)){let Q=J.at(-1);if(Q&&Q.endsWith("\\"))J[J.length-1]=`${Q.slice(0,-1)} ${X}`;else J.push(X)}return J},Gj;var tG=B(()=>{Gj=/ +/g});var eG=(Z,q,J)=>{Z.sync=q(Kj,J),Z.s=Z.sync},ZK=({options:Z})=>qK(Z),Kj=({options:Z})=>({...qK(Z),isSync:!0}),qK=(Z)=>({options:{...Uj(Z),...Z}}),Uj=({input:Z,inputFile:q,stdio:J})=>Z===void 0&&q===void 0&&J===void 0?{stdin:"inherit"}:{},JK;var XK=B(()=>{JK={preferLocal:!0}});var gZ,P0,mu,uu,pu,du,cu,lu,nu,iu;var S6=B(()=>{aG();tG();M3();XK();XZ();gZ=I1(()=>({})),P0=I1(()=>({isSync:!0})),mu=I1(oG),uu=I1(sG),pu=I1(V9),du=I1(ZK,{},JK,eG),{sendMessage:cu,getOneMessage:lu,getEachMessage:nu,getCancelSignal:iu}=NH()});import{execSync as Wj}from"child_process";function g6(Z,q){let X=[];try{const J=b6(X,Y7`execSync: ${Z.slice(0,100)}`,0);return Wj(Z,q)}catch(Q){var $=Q,Y=1}finally{h6(X,$,Y)}}var fZ=B(()=>{z0()});async function Vj(Z){if(process.platform==="win32"){let J=await gZ(`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 q=await gZ(`which ${Z}`,{shell:!0,stderr:"ignore",reject:!1});if(q.exitCode!==0||!q.stdout)return null;return q.stdout.trim()}function Bj(Z){if(process.platform==="win32")try{return g6(`where.exe ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return g6(`which ${Z}`,{encoding:"utf-8",stdio:["ignore","pipe","ignore"]}).toString().trim()||null}catch{return null}}var mZ,QK,H7;var G7=B(()=>{S6();fZ();mZ=typeof Bun<"u"&&typeof Bun.which==="function"?Bun.which:null,QK=mZ?async(Z)=>mZ(Z):Vj,H7=mZ??Bj});import{createHash as Lj}from"crypto";import{readFileSync as uZ,realpathSync as $K,statSync as YK}from"fs";import{open as _j,readdir as zj,readFile as Rj,realpath as HK,stat as BK}from"fs/promises";import{basename as Fj,dirname as pZ,join as M0,resolve as U7,sep as GK}from"path";function Mj(){function Z(q){let J=KK(q);return J===LK?null:J}return Z.cache=KK.cache,Z}function Dj(){function Z(q){let J=R6(q);if(!J)return null;return dZ(J)}return Z.cache=dZ.cache,Z}function Aj(Z){let q=new Set,J=[];for(let X of Z){if(!X||q.has(X))continue;q.add(X),J.push(X)}return J}function Rp(Z,q){return Aj([n1(Z),...q.map((J)=>n1(J))])}async function Fp(Z,q){let J=q?.maxDepth??3,X=q?.maxDirs??1500,Q=[],$=0,Y=async(K)=>{try{return await BK(M0(K,".git")),!0}catch{return!1}},H=async(K,W)=>{if(W>J||$>=X)return;let U;try{U=await zj(K,{withFileTypes:!0})}catch{return}for(let V of U){if($>=X)return;if(!V.isDirectory())continue;if(V.name.startsWith(".")||Tj.has(V.name))continue;let L=M0(K,V.name);if($++,await Y(L)){Q.push(dZ(L.normalize("NFC")));continue}await H(L,W+1)}};return await H(Z,1),Q}function Mp(Z){return S0(Z)}async function Dp(){let Z=r(),q=R6(Z);if(!q)return!1;try{let[J,X]=await Promise.all([HK(Z),HK(q)]);return J===X}catch{return Z===q}}function wj(Z){let q=Z.trim();if(!q)return null;let J=q.match(/^git@([^:]+):(.+?)(?:\.git)?$/);if(J&&J[1]&&J[2])return`${J[1]}/${J[2]}`.toLowerCase();let X=q.match(/^(?:https?|ssh):\/\/(?:[^@]+@)?([^/]+)\/(.+?)(?:\.git)?$/);if(X&&X[1]&&X[2]){let Q=X[1],$=X[2];if(yj(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 Tp(){let Z=await cZ();if(!Z)return null;let q=wj(Z);if(!q)return null;return Lj("sha256").update(q).digest("hex").substring(0,16)}async function kp(){try{let[Z,q,J,X,Q,$]=await Promise.all([Ij(),Oj(),cZ(),kj(),Nj(),Pj()]);return{commitHash:Z,branchName:q,remoteUrl:J,isHeadOnRemote:X,isClean:Q,worktreeCount:$}}catch(Z){return null}}async function Np(){let{parseGitRemote:Z}=await import("./detectRepository-1.0.12-ba7p74yk.mjs"),q=await cZ();if(!q)return P("Local GitHub repo: unknown"),null;let J=Z(q);if(J&&J.host==="github.com"){let X=`${J.owner}/${J.name}`;return P(`Local GitHub repo: ${X}`),X}return P("Local GitHub repo: unknown"),null}async function vj(){let{stdout:Z,code:q}=await i(a(),["rev-parse","--abbrev-ref","--symbolic-full-name","@{u}"],{preserveOutputOnError:!1});if(q===0&&Z.trim())return Z.trim();let{stdout:J,code:X}=await i(a(),["remote","show","origin","--","HEAD"],{preserveOutputOnError:!1});if(X===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 i(a(),["rev-parse","--verify",$],{preserveOutputOnError:!1});if(Y===0)return $}return null}function Cj(){return _Q()}async function K7(){let{stdout:Z,code:q}=await i(a(),["ls-files","--others","--exclude-standard"],{preserveOutputOnError:!1}),J=Z.trim();if(q!==0||!J)return[];let X=J.split(`
48
- `).filter(Boolean),Q=[],$=0;for(let Y of X){if(Q.length>=VK){P(`Untracked file capture: reached max file count (${VK})`);break}if(qQ(Y))continue;try{let K=(await BK(Y)).size;if(K>UK){P(`Untracked file capture: skipping ${Y} (exceeds ${UK} bytes)`);continue}if($+K>WK){P(`Untracked file capture: reached total size limit (${WK} bytes)`);break}if(K===0){Q.push({path:Y,content:""});continue}let W=Math.min(Ej,K),U=await _j(Y,"r");try{let V=Buffer.alloc(W),{bytesRead:L}=await U.read(V,0,W,0),_=V.subarray(0,L);if(JQ(_))continue;let z;if(K<=W)z=_.toString("utf-8");else z=await Rj(Y,"utf-8");Q.push({path:Y,content:z}),$+=K}finally{await U.close()}}catch(H){P(`Failed to read untracked file ${Y}: ${H}`)}}return Q}async function xp(){try{if(!await jj())return null;if(await Cj()){P("Shallow clone detected, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([i(a(),["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=await vj();if(!q){P("No remote found, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([i(a(),["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:X}=await i(a(),["merge-base","HEAD",q],{preserveOutputOnError:!1});if(X!==0||!J.trim()){P("Merge-base failed, using HEAD-only mode for issue");let[{stdout:_},z]=await Promise.all([i(a(),["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:U}]=await Promise.all([i(a(),["diff",Q]),K7(),i(a(),["format-patch",`${Q}..HEAD`,"--stdout"]),i(a(),["rev-parse","HEAD"]),i(a(),["rev-parse","--abbrev-ref","HEAD"])]),V=null;if(K===0&&H&&H.trim())V=H;let L=U?.trim();return{remote_base_sha:Q,remote_base:q,patch:$||"",untracked_files:Y,format_patch:V,head_sha:W?.trim()||null,branch_name:L&&L!=="HEAD"?L:null}}catch(Z){return S(Z),null}}function yj(Z){let q=Z.split(":")[0]??"";return q==="localhost"||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(q)}function Pp(){let Z=N(),q=r(),J=M0(q,".git");try{let X=Z.statSync(J);if(X.isFile())return!1;if(X.isDirectory()){let Q=M0(J,"HEAD");try{if(Z.statSync(Q).isFile())return!1}catch{}}}catch{}try{if(Z.statSync(M0(q,"HEAD")).isFile())return!0}catch{}try{if(Z.statSync(M0(q,"objects")).isDirectory())return!0}catch{}try{if(Z.statSync(M0(q,"refs")).isDirectory())return!0}catch{}return!1}var LK,KK,R6,dZ,n1,Tj,a,jj,_K=async(Z)=>{return R6(Z)!==null},Ij=async()=>{return VQ()},Oj=async(Z)=>{if(Z){let{stdout:q,code:J}=await i1(a(),["--no-optional-locks","rev-parse","--abbrev-ref","HEAD"],{cwd:Z,timeout:5000,preserveOutputOnError:!1});return J===0?q.trim():""}return WQ()},Ap=async()=>{return LQ()},cZ=async()=>{return BQ()},kj=async()=>{let{code:Z}=await i(a(),["--no-optional-locks","rev-parse","@{u}"],{preserveOutputOnError:!1,useCwd:!0});return Z===0},jp=async()=>{let{stdout:Z,code:q}=await i(a(),["--no-optional-locks","rev-list","--count","@{u}..HEAD"],{preserveOutputOnError:!1,useCwd:!0});return q===0&&parseInt(Z.trim(),10)>0},Ip=async(Z)=>{let q=["--no-optional-locks","rev-list","--left-right","--count","@{u}...HEAD"],{stdout:J,code:X}=Z?await i1(a(),q,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await i(a(),q,{preserveOutputOnError:!1,useCwd:!0});if(X!==0)return{ahead:0,behind:0};let Q=J.trim().split(/\s+/);if(Q.length!==2)return{ahead:0,behind:0};let $=parseInt(Q[0],10),Y=parseInt(Q[1],10);return{ahead:Number.isFinite(Y)?Y:0,behind:Number.isFinite($)?$:0}},Nj=async(Z)=>{let q=["--no-optional-locks","status","--porcelain"];if(Z?.ignoreUntracked)q.push("-uno");let{stdout:J}=await i(a(),q,{preserveOutputOnError:!1});return J.trim().length===0},Op=async()=>{let{stdout:Z}=await i(a(),["--no-optional-locks","status","--porcelain"],{preserveOutputOnError:!1});return Z.trim().split(`
49
- `).map((q)=>q.trim().split(" ",2)[1]?.trim()).filter((q)=>typeof q==="string")},xj=async(Z)=>{let q=["--no-optional-locks","status","--porcelain"],{stdout:J}=Z?await i1(a(),q,{cwd:Z,timeout:5000,preserveOutputOnError:!1}):await i(a(),q,{preserveOutputOnError:!1}),X=[],Q=[];return J.trim().split(`
50
- `).filter(($)=>$.length>0).forEach(($)=>{let Y=$.substring(0,2),H=$.substring(2).trim();if(Y==="??")Q.push(H);else if(H)X.push(H)}),{tracked:X,untracked:Q}},Pj=async()=>{return zQ()},wp=async(Z)=>{try{let q=Z||`Claude Code auto-stash - ${new Date().toISOString()}`,{untracked:J}=await xj();if(J.length>0){let{code:Q}=await i(a(),["add",...J],{preserveOutputOnError:!1});if(Q!==0)return!1}let{code:X}=await i(a(),["stash","push","--message",q],{preserveOutputOnError:!1});return X===0}catch(q){return!1}},UK=524288000,WK=5368709120,VK=20000,Ej=65536;var L2=B(()=>{O1();XQ();Z1();K1();U2();W7();F0();RQ();k0();E4();G7();LK=Symbol("git-root-not-found"),KK=F1((Z)=>{let q=Date.now();H0("info","find_git_root_started");let J=U7(Z),X=J.substring(0,J.indexOf(GK)+1)||GK,Q=0;while(J!==X){try{let Y=M0(J,".git");Q++;let H=YK(Y);if(H.isDirectory()||H.isFile())return H0("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:Q,found:!0}),J.normalize("NFC")}catch{}let $=pZ(J);if($===J)break;J=$}try{let $=M0(X,".git");Q++;let Y=YK($);if(Y.isDirectory()||Y.isFile())return H0("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:Q,found:!0}),X.normalize("NFC")}catch{}return H0("info","find_git_root_completed",{duration_ms:Date.now()-q,stat_count:Q,found:!1}),LK},(Z)=>Z,50),R6=Mj();dZ=F1((Z)=>{try{let q=uZ(M0(Z,".git"),"utf-8").trim();if(!q.startsWith("gitdir:"))return Z;let J=U7(Z,q.slice(7).trim()),X=U7(J,uZ(M0(J,"commondir"),"utf-8").trim());if(U7(pZ(J))!==M0(X,"worktrees"))return Z;if($K(uZ(M0(J,"gitdir"),"utf-8").trim())!==M0($K(Z),".git"))return Z;if(Fj(X)!==".git")return X.normalize("NFC");return pZ(X).normalize("NFC")}catch{return Z}},(Z)=>Z,50),n1=Dj();Tj=new Set(["node_modules",".git","dist","build","out","target","vendor","coverage",".next",".turbo",".cache",".venv","venv","__pycache__"]);a=u(()=>{return H7("git")||"git"}),jj=u(async()=>{let Z=Date.now();H0("info","is_git_check_started");let q=R6(r())!==null;return H0("info","is_git_check_completed",{duration_ms:Date.now()-Z,is_git:q}),q})});import{readdir as Cp,readFile as Sj}from"fs/promises";import{release as bj}from"os";var gp,f0,fp,mp;var f6=B(()=>{O1();F0();k0();gp=["macos","wsl"],f0=u(()=>{try{if(process.platform==="darwin")return"macos";if(process.platform==="win32")return"windows";if(process.platform==="linux"){try{let Z=N().readFileSync("/proc/version",{encoding:"utf8"});if(Z.toLowerCase().includes("microsoft")||Z.toLowerCase().includes("wsl"))return"wsl"}catch(Z){S(Z)}return"linux"}return"unknown"}catch(Z){return S(Z),"unknown"}}),fp=u(()=>{if(process.platform!=="linux")return;try{let Z=N().readFileSync("/proc/version",{encoding:"utf8"}),q=Z.match(/WSL(\d+)/i);if(q&&q[1])return q[1];if(Z.toLowerCase().includes("microsoft"))return"1";return}catch(Z){S(Z);return}}),mp=u(async()=>{if(process.platform!=="linux")return;let Z={linuxKernel:bj()};try{let q=await Sj("/etc/os-release","utf8");for(let J of q.split(`
51
- `)){let X=J.match(/^(ID|VERSION_ID)=(.*)$/);if(X&&X[1]&&X[2]){let Q=X[2].replace(/^"|"$/g,"");if(X[1]==="ID")Z.linuxDistroId=Q;else Z.linuxDistroVersion=Q}}}catch{}return Z})});import*as m6 from"path";import*as zK from"path/win32";function lZ(Z){try{return g6(`dir "${Z}"`,{stdio:"pipe"}),!0}catch{return!1}}function hj(Z){if(Z==="git"){let q=["C:\\Program Files\\Git\\cmd\\git.exe","C:\\Program Files (x86)\\Git\\cmd\\git.exe"];for(let J of q)if(lZ(J))return J}try{let J=g6(`where.exe ${Z}`,{stdio:"pipe",encoding:"utf8"}).trim().split(`\r
52
- `).filter(Boolean),X=r().toLowerCase();for(let Q of J){let $=m6.resolve(Q).toLowerCase();if(m6.dirname($).toLowerCase()===X||$.startsWith(X+m6.sep)){P(`Skipping potentially malicious executable in current directory: ${Q}`);continue}return Q}return null}catch{return null}}function ap(){if(f0()==="windows"){let Z=gj();process.env.SHELL=Z,P(`Using bash path: "${Z}"`)}}var gj,op,RK;var FK=B(()=>{O1();Z1();K1();fZ();E4();f6();gj=u(()=>{if(process.env.CLAUDE_CODE_GIT_BASH_PATH){if(lZ(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=hj("git");if(Z){let q=zK.join(Z,"..","..","bin","bash.exe");if(lZ(q))return q}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)}),op=F1((Z)=>{if(Z.startsWith("\\\\"))return Z.replace(/\\/g,"/");let q=Z.match(/^([A-Za-z]):[/\\]/);if(q)return"/"+q[1].toLowerCase()+Z.slice(2).replace(/\\/g,"/");return Z.replace(/\\/g,"/")},(Z)=>Z,500),RK=F1((Z)=>{if(Z.startsWith("//"))return Z.replace(/\//g,"\\");let q=Z.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(q){let X=q[1].toUpperCase(),Q=Z.slice(("/cygdrive/"+q[1]).length);return X+":"+(Q||"\\").replace(/\//g,"\\")}let J=Z.match(/^\/([A-Za-z])(\/|$)/);if(J){let X=J[1].toUpperCase(),Q=Z.slice(2);return X+":"+(Q||"\\").replace(/\//g,"\\")}return Z.replace(/\//g,"\\")},(Z)=>Z,500)});import{homedir as MK}from"os";import{dirname as DK,isAbsolute as mj,join as uj,normalize as nZ,relative as pj,resolve as dj}from"path";function aZ(Z,q){let J=q??r()??N().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 X=Z.trim();if(!X)return nZ(J).normalize("NFC");if(X==="~")return MK().normalize("NFC");if(X.startsWith("~/"))return uj(MK(),X.slice(2)).normalize("NFC");let Q=X;if(f0()==="windows"&&X.match(/^\/[a-z]\//i))try{Q=RK(X)}catch{Q=X}if(mj(Q))return nZ(Q).normalize("NFC");return dj(J,Q).normalize("NFC")}function Xd(Z){let q=pj(r(),Z);return q.startsWith("..")?Z:q}function Qd(Z){let q=aZ(Z);if(q.startsWith("\\\\")||q.startsWith("//"))return DK(q);try{if(N().statSync(q).isDirectory())return q}catch{}return DK(q)}function $d(Z){return/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(Z)}function a1(Z){return nZ(Z).replace(/\\/g,"/")}var V7=B(()=>{Z1();F0();f6();FK();fj()});function lj(Z,q,J){if(J!==void 0&&!B7(Z[q],J)||J===void 0&&!(q in Z))TK(Z,q,J)}var b2;var oZ=B(()=>{cj();AK();b2=lj});function nj(Z){return function(q,J,X){var Q=-1,$=Object(q),Y=X(q),H=Y.length;while(H--){var K=Y[Z?H:++Q];if(J($[K],K,$)===!1)break}return q}}var jK;var IK=B(()=>{jK=nj});var ij,OK;var wK=B(()=>{IK();ij=jK(),OK=ij});function aj(Z){return L7(Z)&&_7(Z)}var xK;var PK=B(()=>{NK();kK();xK=aj});function JI(Z){if(!L7(Z)||EK(Z)!=rj)return!1;var q=vK(Z);if(q===null)return!0;var J=ZI.call(q,"constructor")&&q.constructor;return typeof J=="function"&&J instanceof J&&CK.call(J)==qI}var rj="[object Object]",tj,ej,CK,ZI,qI,yK;var SK=B(()=>{oj();sj();kK();tj=Function.prototype,ej=Object.prototype,CK=tj.toString,ZI=ej.hasOwnProperty,qI=CK.call(Object);yK=JI});function XI(Z,q){if(q==="constructor"&&typeof Z[q]==="function")return;if(q=="__proto__")return;return Z[q]}var h2;var sZ=B(()=>{h2=XI});function $I(Z){return bK(Z,z7(Z))}var gK;var fK=B(()=>{QI();hK();gK=$I});function _I(Z,q,J,X,Q,$,Y){var H=h2(Z,J),K=h2(q,J),W=Y.get(K);if(W){b2(Z,J,W);return}var U=$?$(H,K,J+"",Z,q,Y):void 0,V=U===void 0;if(V){var L=rZ(K),_=!L&&uK(K),z=!L&&!_&&pK(K);if(U=K,L||_||z)if(rZ(H))U=H;else if(xK(H))U=cK(H);else if(_)V=!1,U=dK(K,!0);else if(z)V=!1,U=lK(K,!0);else U=[];else if(yK(K)||tZ(K)){if(U=H,tZ(H))U=gK(H);else if(!e0(H)||mK(H))U=nK(K)}else V=!1}if(V)Y.set(K,U),Q(U,K,X,$,Y),Y.delete(K);b2(Z,J,U)}var iK;var aK=B(()=>{oZ();WI();BI();VI();LI();GI();HI();PK();KI();YI();I4();SK();UI();sZ();fK();iK=_I});function sK(Z,q,J,X,Q){if(Z===q)return;OK(q,function($,Y){if(Q||(Q=new oK),e0($))iK(Z,q,Y,J,sK,X,Q);else{var H=X?X(h2(Z,Y),$,Y+"",Z,q,Q):void 0;if(H===void 0)H=$;b2(Z,Y,H)}},z7)}var rK;var tK=B(()=>{zI();oZ();wK();aK();I4();hK();sZ();rK=sK});function RI(Z,q,J){switch(J.length){case 0:return Z.call(q);case 1:return Z.call(q,J[0]);case 2:return Z.call(q,J[0],J[1]);case 3:return Z.call(q,J[0],J[1],J[2])}return Z.apply(q,J)}var eK;var ZU=B(()=>{eK=RI});function FI(Z,q,J){return q=qU(q===void 0?Z.length-1:q,0),function(){var X=arguments,Q=-1,$=qU(X.length-q,0),Y=Array($);while(++Q<$)Y[Q]=X[q+Q];Q=-1;var H=Array(q+1);while(++Q<q)H[Q]=X[Q];return H[q]=J(Y),eK(Z,this,H)}}var qU,JU;var XU=B(()=>{ZU();qU=Math.max;JU=FI});function MI(Z){return function(){return Z}}var QU;var $U=B(()=>{QU=MI});var AI,HU;var GU=B(()=>{$U();DI();YU();AI=!eZ?R7:function(Z,q){return eZ(Z,"toString",{configurable:!0,enumerable:!1,value:QU(q),writable:!0})},HU=AI});function OI(Z){var q=0,J=0;return function(){var X=II(),Q=jI-(X-J);if(J=X,Q>0){if(++q>=TI)return arguments[0]}else q=0;return Z.apply(void 0,arguments)}}var TI=800,jI=16,II,KU;var UU=B(()=>{II=Date.now;KU=OI});var wI,WU;var VU=B(()=>{GU();UU();wI=KU(HU),WU=wI});function kI(Z,q){return WU(JU(Z,q,R7),Z+"")}var BU;var LU=B(()=>{YU();XU();VU();BU=kI});function NI(Z,q,J){if(!e0(J))return!1;var X=typeof q;if(X=="number"?_7(J)&&O4(q,J.length):X=="string"&&(q in J))return B7(J[q],Z);return!1}var _U;var zU=B(()=>{AK();NK();pX();I4();_U=NI});function xI(Z){return BU(function(q,J){var X=-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&&_U(J[0],J[1],Y))$=Q<3?void 0:$,Q=1;q=Object(q);while(++X<Q){var H=J[X];if(H)Z(q,H,X,$)}return q})}var RU;var FU=B(()=>{LU();zU();RU=xI});var PI,U1;var MU=B(()=>{tK();FU();PI=RU(function(Z,q,J,X){rK(Z,q,J,X)}),U1=PI});function Zq(Z){let{buffer:q,bytesRead:J}=N().readSync(Z,{length:4096});if(J===0)return"utf8";if(J>=2){if(q[0]===255&&q[1]===254)return"utf16le"}if(J>=3&&q[0]===239&&q[1]===187&&q[2]===191)return"utf8";return"utf8"}function qq(Z){let q=0,J=0;for(let X=0;X<Z.length;X++)if(Z[X]===`
53
- `)if(X>0&&Z[X-1]==="\r")q++;else J++;return q>J?"CRLF":"LF"}function EI(Z){let q=N(),{resolvedPath:J,isSymlink:X}=w1(q,Z);if(X)P(`Reading through symlink: ${Z} -> ${J}`);let Q=Zq(J),$=q.readFileSync(J,{encoding:Q}),Y=qq($.slice(0,4096));return{content:$.replaceAll(`\r
54
- `,`
55
- `),encoding:Q,lineEndings:Y}}function W1(Z){return EI(Z).content}var g2=B(()=>{K1();F0()});function E0(Z){return Z.startsWith("\uFEFF")?Z.slice(1):Z}var F7=()=>{};import{join as vI}from"path";function vc(Z){f2=Z}function Cc(){f2=null,Jq=void 0}function yc(Z){return Jq=Z,Z}function yI(){return vI(G0(),CI)}function SI(){try{let Z=W1(yI()),q=Z0(E0(Z));if(!q||typeof q!=="object"||Array.isArray(q))return null;return q}catch{return null}}function M7(){if(Jq!==!0)return null;if(f2)return f2;let Z=SI();if(Z)return f2=Z,m2(),Z;return null}var CI="remote-settings.json",f2=null,Jq;var AU=B(()=>{o0();g2();F7();DU();z0()});function bc(Z,q){return Z.flatMap((J,X)=>X?[q(X),J]:[J])}function Xq(Z,q){let J=0;for(let X of Z)J+=+!!q(X);return J}function TU(Z){return[...new Set(Z)]}var Qq=()=>{};class jU{cache=new Map;maxCacheSize=1000;maxEntryBytes=262144;readFile(Z){let q=N(),J;try{J=q.statSync(Z)}catch(Y){throw this.cache.delete(Z),Y}let X=this.cache.get(Z);if(X&&X.mtime===J.mtimeMs)return{content:X.content,encoding:X.encoding};let Q=OU(Z),$=q.readFileSync(Z,{encoding:Q}).replaceAll(`\r
56
- `,`
57
- `);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())}}get size(){return this.cache.size}}var $q;var IU=B(()=>{D7();F0();$q=new jU});import{chmodSync as bI,writeFileSync as wU}from"fs";import{realpath as hI,stat as EU}from"fs/promises";import{homedir as vU}from"os";import{basename as Yq,dirname as A7,extname as kU,isAbsolute as gI,join as u6,normalize as fI,relative as CU,resolve as mI,sep as u2}from"path";async function Jl(Z){try{return await EU(Z),!0}catch{return!1}}function Xl(Z){try{return N().readFileSync(Z,{encoding:"utf8"})}catch(q){return S(q),null}}function Ql(Z){let q=N();return Math.floor(q.statSync(Z).mtimeMs)}async function $l(Z){let q=await N().stat(Z);return Math.floor(q.mtimeMs)}function Yl(Z,q,J,X){let Q=q;if(X==="CRLF")Q=q.replaceAll(`\r
58
- `,`
59
- `).split(`
60
- `).join(`\r
61
- `);d6(Z,Q,{encoding:J}),$q.invalidate(Z)}function OU(Z){try{let q=N(),{resolvedPath:J}=w1(q,Z);return Zq(J)}catch(q){if(PU(q))P(`detectFileEncoding failed for expected reason: ${q.code}`,{level:"debug"});else S(q);return"utf8"}}function Hl(Z,q="utf8"){try{let J=N(),{resolvedPath:X}=w1(J,Z),{buffer:Q,bytesRead:$}=J.readSync(X,{length:4096}),Y=Q.toString(q,0,$);return qq(Y)}catch(J){return S(J),"LF"}}function Gl(Z){if(!Z.includes("\t"))return Z;return Z.replace(/^\t+/gm,(q)=>" ".repeat(q.length))}function pI(Z){let q=Z?aZ(Z):void 0,J=q?CU(r(),q):void 0;return{absolutePath:q,relativePath:J}}function Kl(Z){let{relativePath:q}=pI(Z);if(q&&!q.startsWith(".."))return q;let J=vU();if(Z.startsWith(J+u2))return"~"+Z.slice(J.length);return Z}function Ul(Z){let q=N();try{let J=A7(Z),X=Yq(Z,kU(Z)),Y=q.readdirSync(J).filter((H)=>Yq(H.name,kU(H.name))===X&&u6(J,H.name)!==Z)[0];if(Y)return Y.name;return}catch(J){if(!p6(J))S(J);return}}async function Vl(Z){let q=r(),J=A7(q),X=Z;try{let H=await hI(A7(Z));X=u6(H,Yq(Z))}catch{}let Q=J===u2?u2:J+u2;if(!X.startsWith(Q)||X.startsWith(q+u2)||X===q)return;let $=CU(J,X),Y=u6(q,$);try{return await EU(Y),Y}catch{return}}function dI(){return!s1("tengu_compact_line_prefix_killswitch",!1)}function Bl({content:Z,startLine:q}){if(!Z)return"";let J=Z.split(/\r?\n/);if(dI())return J.map((X,Q)=>`${Q+q}→${X}`).join(`
62
- `);return J.map((X,Q)=>{let $=String(Q+q);if($.length>=6)return`${$}→${X}`;return`${$.padStart(6," ")}→${X}`}).join(`
63
- `)}function Ll(Z){return Z.match(/^\s*\d+[\u2192\t](.*)$/)?.[1]??Z}function _l(Z){try{return N().isDirEmptySync(Z)}catch(q){return p6(q)}}function zl(Z){let{content:q}=$q.readFile(Z);return q}function d6(Z,q,J={encoding:"utf-8"}){let X=N(),Q=Z;try{let K=X.readlinkSync(Z);Q=gI(K)?K:mI(A7(Z),K),P(`Writing through symlink: ${Z} -> ${Q}`)}catch{}let $=`${Q}.tmp.${process.pid}.${Date.now()}`,Y,H=!1;try{Y=X.statSync(Q).mode,H=!0,P(`Preserving file permissions: ${Y.toString(8)}`)}catch(K){if(!p6(K))throw K;if(J.mode!==void 0)Y=J.mode,P(`Setting permissions for new file: ${Y.toString(8)}`)}try{P(`Writing to temp file: ${$}`);let K={encoding:J.encoding,flush:!0};if(!H&&J.mode!==void 0)K.mode=J.mode;if(wU($,q,K),P(`Temp file written successfully, size: ${q.length} bytes`),H&&Y!==void 0)bI($,Y),P("Applied original permissions to temp file");P(`Renaming ${$} to ${Q}`),X.renameSync($,Q),P(`File ${Q} written atomically`)}catch(K){P(`Failed to write file atomically: ${K}`,{level:"error"}),s0("tengu_atomic_write_error",{});try{P(`Cleaning up temp file: ${$}`),X.unlinkSync($)}catch(W){P(`Failed to clean up temp file: ${W}`)}P(`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;wU(Q,q,W),P(`File ${Q} written successfully with non-atomic fallback`)}catch(W){throw P(`Non-atomic write also failed: ${W}`),W}}}function Rl(){let Z=f0(),q=vU();if(Z==="macos")return u6(q,"Desktop");if(Z==="windows"){let X=process.env.USERPROFILE?process.env.USERPROFILE.replace(/\\/g,"/"):null;if(X){let $=`/mnt/c${X.replace(/^[A-Z]:/,"")}/Desktop`;if(N().existsSync($))return $}try{let $=N().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=u6("/mnt/c/Users",Y.name,"Desktop");if(N().existsSync(H))return H}}catch(Q){S(Q)}}let J=u6(q,"Desktop");if(N().existsSync(J))return J;return q}function Fl(Z,q=uI){try{return N().statSync(Z).size<=q}catch{return!1}}function NU(Z){let q=fI(Z);if(f0()==="windows")q=q.replace(/\//g,"\\").toLowerCase();return q}function Ml(Z,q){return NU(Z)===NU(q)}var uI=262144,Wl="Note: your current working directory is";var D7=B(()=>{xU();Hq();Z1();K1();o1();g2();IU();F0();k0();V7();f6()});import{appendFile as cI,mkdir as lI,readFile as nI,writeFile as iI}from"fs/promises";import{homedir as aI}from"os";import{dirname as oI,join as sI}from"path";async function rI(Z,q){let{code:J}=await i1("git",["check-ignore",Z],{preserveOutputOnError:!1,cwd:q});return J===0}function tI(){return sI(aI(),".config","git","ignore")}async function yU(Z,q=r()){try{if(!await _K(q))return;let J=`**/${Z}`,X=Z.endsWith("/")?`${Z}sample-file.txt`:Z;if(await rI(X,q))return;let Q=tI(),$=oI(Q);await lI($,{recursive:!0});try{if((await nI(Q,{encoding:"utf-8"})).includes(J))return;await cI(Q,`
64
- ${J}
65
- `)}catch(Y){if(W0(Y)==="ENOENT")await iI(Q,`${J}
66
- `,"utf-8");else throw Y}}catch(J){S(J)}}var SU=B(()=>{Z1();o1();W7();L2();k0()});function d2(Z,q=!1){let J=Z.length,X=0,Q="",$=0,Y=16,H=0,K=0,W=0,U=0,V=0;function L(M,O){let T=0,I=0;while(T<M||!O){let A=Z.charCodeAt(X);if(A>=48&&A<=57)I=I*16+A-48;else if(A>=65&&A<=70)I=I*16+A-65+10;else if(A>=97&&A<=102)I=I*16+A-97+10;else break;X++,T++}if(T<M)I=-1;return I}function _(M){X=M,Q="",$=0,Y=16,V=0}function z(){let M=X;if(Z.charCodeAt(X)===48)X++;else{X++;while(X<Z.length&&c6(Z.charCodeAt(X)))X++}if(X<Z.length&&Z.charCodeAt(X)===46)if(X++,X<Z.length&&c6(Z.charCodeAt(X))){X++;while(X<Z.length&&c6(Z.charCodeAt(X)))X++}else return V=3,Z.substring(M,X);let O=X;if(X<Z.length&&(Z.charCodeAt(X)===69||Z.charCodeAt(X)===101)){if(X++,X<Z.length&&Z.charCodeAt(X)===43||Z.charCodeAt(X)===45)X++;if(X<Z.length&&c6(Z.charCodeAt(X))){X++;while(X<Z.length&&c6(Z.charCodeAt(X)))X++;O=X}else V=3}return Z.substring(M,O)}function R(){let M="",O=X;while(!0){if(X>=J){M+=Z.substring(O,X),V=2;break}let T=Z.charCodeAt(X);if(T===34){M+=Z.substring(O,X),X++;break}if(T===92){if(M+=Z.substring(O,X),X++,X>=J){V=2;break}switch(Z.charCodeAt(X++)){case 34:M+='"';break;case 92:M+="\\";break;case 47:M+="/";break;case 98:M+="\b";break;case 102:M+="\f";break;case 110:M+=`
67
- `;break;case 114:M+="\r";break;case 116:M+="\t";break;case 117:let A=L(4,!0);if(A>=0)M+=String.fromCharCode(A);else V=4;break;default:V=5}O=X;continue}if(T>=0&&T<=31)if(p2(T)){M+=Z.substring(O,X),V=2;break}else V=6;X++}return M}function D(){if(Q="",V=0,$=X,K=H,U=W,X>=J)return $=J,Y=17;let M=Z.charCodeAt(X);if(Gq(M)){do X++,Q+=String.fromCharCode(M),M=Z.charCodeAt(X);while(Gq(M));return Y=15}if(p2(M)){if(X++,Q+=String.fromCharCode(M),M===13&&Z.charCodeAt(X)===10)X++,Q+=`
68
- `;return H++,W=X,Y=14}switch(M){case 123:return X++,Y=1;case 125:return X++,Y=2;case 91:return X++,Y=3;case 93:return X++,Y=4;case 58:return X++,Y=6;case 44:return X++,Y=5;case 34:return X++,Q=R(),Y=10;case 47:let O=X-1;if(Z.charCodeAt(X+1)===47){X+=2;while(X<J){if(p2(Z.charCodeAt(X)))break;X++}return Q=Z.substring(O,X),Y=12}if(Z.charCodeAt(X+1)===42){X+=2;let T=J-1,I=!1;while(X<T){let A=Z.charCodeAt(X);if(A===42&&Z.charCodeAt(X+1)===47){X+=2,I=!0;break}if(X++,p2(A)){if(A===13&&Z.charCodeAt(X)===10)X++;H++,W=X}}if(!I)X++,V=1;return Q=Z.substring(O,X),Y=13}return Q+=String.fromCharCode(M),X++,Y=16;case 45:if(Q+=String.fromCharCode(M),X++,X===J||!c6(Z.charCodeAt(X)))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(X<J&&F(M))X++,M=Z.charCodeAt(X);if($!==X){switch(Q=Z.substring($,X),Q){case"true":return Y=8;case"false":return Y=9;case"null":return Y=7}return Y=16}return Q+=String.fromCharCode(M),X++,Y=16}}function F(M){if(Gq(M)||p2(M))return!1;switch(M){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function k(){let M;do M=D();while(M>=12&&M<=15);return M}return{setPosition:_,getPosition:()=>X,scan:q?k:D,getToken:()=>Y,getTokenValue:()=>Q,getTokenOffset:()=>$,getTokenLength:()=>X-$,getTokenStartLine:()=>K,getTokenStartCharacter:()=>$-U,getTokenError:()=>V}}function Gq(Z){return Z===32||Z===9}function p2(Z){return Z===10||Z===13}function c6(Z){return Z>=48&&Z<=57}var bU;var T7=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"})(bU||(bU={}))});var I0,Kq,hU;var gU=B(()=>{I0=Array(20).fill(0).map((Z,q)=>{return" ".repeat(q)}),Kq={" ":{"\n":Array(200).fill(0).map((Z,q)=>{return`
69
- `+" ".repeat(q)}),"\r":Array(200).fill(0).map((Z,q)=>{return"\r"+" ".repeat(q)}),"\r\n":Array(200).fill(0).map((Z,q)=>{return`\r
70
- `+" ".repeat(q)})},"\t":{"\n":Array(200).fill(0).map((Z,q)=>{return`
71
- `+"\t".repeat(q)}),"\r":Array(200).fill(0).map((Z,q)=>{return"\r"+"\t".repeat(q)}),"\r\n":Array(200).fill(0).map((Z,q)=>{return`\r
72
- `+"\t".repeat(q)})}},hU=[`
73
- `,"\r",`\r
74
- `]});function Uq(Z,q,J){let X,Q,$,Y,H;if(q){Y=q.offset,H=Y+q.length,$=Y;while($>0&&!c2(Z,$-1))$--;let T=H;while(T<Z.length&&!c2(Z,T))T++;Q=Z.substring($,T),X=ZO(Q,J)}else Q=Z,X=0,$=0,Y=0,H=Z.length;let K=qO(J,Z),W=hU.includes(K),U=0,V=0,L;if(J.insertSpaces)L=I0[J.tabSize||4]??l6(I0[1],J.tabSize||4);else L="\t";let _=L==="\t"?"\t":" ",z=d2(Q,!1),R=!1;function D(){if(U>1)return l6(K,U)+l6(L,X+V);let T=L.length*(X+V);if(!W||T>Kq[_][K].length)return K+l6(L,X+V);if(T<=0)return K;return Kq[_][K][T]}function F(){let T=z.scan();U=0;while(T===15||T===14){if(T===14&&J.keepLines)U+=1;else if(T===14)U=1;T=z.scan()}return R=T===16||z.getTokenError()!==0,T}let k=[];function M(T,I,A){if(!R&&(!q||I<H&&A>Y)&&Z.substring(I,A)!==T)k.push({offset:I,length:A-I,content:T})}let O=F();if(J.keepLines&&U>0)M(l6(K,U),0,0);if(O!==17){let T=z.getTokenOffset()+$,I=L.length*X<20&&J.insertSpaces?I0[L.length*X]:l6(L,X);M(I,$,T)}while(O!==17){let T=z.getTokenOffset()+z.getTokenLength()+$,I=F(),A="",b=!1;while(U===0&&(I===12||I===13)){let x=z.getTokenOffset()+$;M(I0[1],T,x),T=z.getTokenOffset()+z.getTokenLength()+$,b=I===12,A=b?D():"",I=F()}if(I===2){if(O!==1)V--;if(J.keepLines&&U>0||!J.keepLines&&O!==1)A=D();else if(J.keepLines)A=I0[1]}else if(I===4){if(O!==3)V--;if(J.keepLines&&U>0||!J.keepLines&&O!==3)A=D();else if(J.keepLines)A=I0[1]}else{switch(O){case 3:case 1:if(V++,J.keepLines&&U>0||!J.keepLines)A=D();else A=I0[1];break;case 5:if(J.keepLines&&U>0||!J.keepLines)A=D();else A=I0[1];break;case 12:A=D();break;case 13:if(U>0)A=D();else if(!b)A=I0[1];break;case 6:if(J.keepLines&&U>0)A=D();else if(!b)A=I0[1];break;case 10:if(J.keepLines&&U>0)A=D();else if(I===6&&!b)A="";break;case 7:case 8:case 9:case 11:case 2:case 4:if(J.keepLines&&U>0)A=D();else if((I===12||I===13)&&!b)A=I0[1];else if(I!==5&&I!==17)R=!0;break;case 16:R=!0;break}if(U>0&&(I===12||I===13))A=D()}if(I===17)if(J.keepLines&&U>0)A=D();else A=J.insertFinalNewline?K:"";let w=z.getTokenOffset()+$;M(A,T,w),O=I}return k}function l6(Z,q){let J="";for(let X=0;X<q;X++)J+=Z;return J}function ZO(Z,q){let J=0,X=0,Q=q.tabSize||4;while(J<Z.length){let $=Z.charAt(J);if($===I0[1])X++;else if($==="\t")X+=Q;else break;J++}return Math.floor(X/Q)}function qO(Z,q){for(let J=0;J<q.length;J++){let X=q.charAt(J);if(X==="\r"){if(J+1<q.length&&q.charAt(J+1)===`
75
- `)return`\r
76
- `;return"\r"}else if(X===`
77
- `)return`
78
- `}return Z&&Z.eol||`
79
- `}function c2(Z,q){return`\r
80
- `.indexOf(Z.charAt(q))!==-1}var Wq=B(()=>{T7();gU()});function fU(Z,q=[],J=l2.DEFAULT){let X=null,Q=[],$=[];function Y(K){if(Array.isArray(Q))Q.push(K);else if(X!==null)Q[X]=K}return Bq(Z,{onObjectBegin:()=>{let K={};Y(K),$.push(Q),Q=K,X=null},onObjectProperty:(K)=>{X=K},onObjectEnd:()=>{Q=$.pop()},onArrayBegin:()=>{let K=[];Y(K),$.push(Q),Q=K,X=null},onArrayEnd:()=>{Q=$.pop()},onLiteralValue:Y,onError:(K,W,U)=>{q.push({error:K,offset:W,length:U})}},J),Q[0]}function Vq(Z,q=[],J=l2.DEFAULT){let X={type:"array",offset:-1,length:-1,children:[],parent:void 0};function Q(K){if(X.type==="property")X.length=K-X.offset,X=X.parent}function $(K){return X.children.push(K),K}Bq(Z,{onObjectBegin:(K)=>{X=$({type:"object",offset:K,length:-1,parent:X,children:[]})},onObjectProperty:(K,W,U)=>{X=$({type:"property",offset:W,length:-1,parent:X,children:[]}),X.children.push({type:"string",value:K,offset:W,length:U,parent:X})},onObjectEnd:(K,W)=>{Q(K+W),X.length=K+W-X.offset,X=X.parent,Q(K+W)},onArrayBegin:(K,W)=>{X=$({type:"array",offset:K,length:-1,parent:X,children:[]})},onArrayEnd:(K,W)=>{X.length=K+W-X.offset,X=X.parent,Q(K+W)},onLiteralValue:(K,W,U)=>{$({type:XO(K),offset:W,length:U,parent:X,value:K}),Q(W+U)},onSeparator:(K,W,U)=>{if(X.type==="property"){if(K===":")X.colonOffset=W;else if(K===",")Q(W)}},onError:(K,W,U)=>{q.push({error:K,offset:W,length:U})}},J);let H=X.children[0];if(H)delete H.parent;return H}function j7(Z,q){if(!Z)return;let J=Z;for(let X of q)if(typeof X==="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===X&&$.children.length===2){J=$.children[1],Q=!0;break}if(!Q)return}else{let Q=X;if(J.type!=="array"||Q<0||!Array.isArray(J.children)||Q>=J.children.length)return;J=J.children[Q]}return J}function Bq(Z,q,J=l2.DEFAULT){let X=d2(Z,!1),Q=[],$=0;function Y(E){return E?()=>$===0&&E(X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter()):()=>!0}function H(E){return E?(C)=>$===0&&E(C,X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter()):()=>!0}function K(E){return E?(C)=>$===0&&E(C,X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter(),()=>Q.slice()):()=>!0}function W(E){return E?()=>{if($>0)$++;else if(E(X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter(),()=>Q.slice())===!1)$=1}:()=>!0}function U(E){return E?()=>{if($>0)$--;if($===0)E(X.getTokenOffset(),X.getTokenLength(),X.getTokenStartLine(),X.getTokenStartCharacter())}:()=>!0}let V=W(q.onObjectBegin),L=K(q.onObjectProperty),_=U(q.onObjectEnd),z=W(q.onArrayBegin),R=U(q.onArrayEnd),D=K(q.onLiteralValue),F=H(q.onSeparator),k=Y(q.onComment),M=H(q.onError),O=J&&J.disallowComments,T=J&&J.allowTrailingComma;function I(){while(!0){let E=X.scan();switch(X.getTokenError()){case 4:A(14);break;case 5:A(15);break;case 3:A(13);break;case 1:if(!O)A(11);break;case 2:A(12);break;case 6:A(16);break}switch(E){case 12:case 13:if(O)A(10);else k();break;case 16:A(1);break;case 15:case 14:break;default:return E}}}function A(E,C=[],d=[]){if(M(E),C.length+d.length>0){let f=X.getToken();while(f!==17){if(C.indexOf(f)!==-1){I();break}else if(d.indexOf(f)!==-1)break;f=I()}}}function b(E){let C=X.getTokenValue();if(E)D(C);else L(C),Q.push(C);return I(),!0}function w(){switch(X.getToken()){case 11:let E=X.getTokenValue(),C=Number(E);if(isNaN(C))A(2),C=0;D(C);break;case 7:D(null);break;case 8:D(!0);break;case 9:D(!1);break;default:return!1}return I(),!0}function x(){if(X.getToken()!==10)return A(3,[],[2,5]),!1;if(b(!1),X.getToken()===6){if(F(":"),I(),!t())A(4,[],[2,5])}else A(5,[],[2,5]);return Q.pop(),!0}function v(){V(),I();let E=!1;while(X.getToken()!==2&&X.getToken()!==17){if(X.getToken()===5){if(!E)A(4,[],[]);if(F(","),I(),X.getToken()===2&&T)break}else if(E)A(6,[],[]);if(!x())A(4,[],[2,5]);E=!0}if(_(),X.getToken()!==2)A(7,[2],[]);else I();return!0}function g(){z(),I();let E=!0,C=!1;while(X.getToken()!==4&&X.getToken()!==17){if(X.getToken()===5){if(!C)A(4,[],[]);if(F(","),I(),X.getToken()===4&&T)break}else if(C)A(6,[],[]);if(E)Q.push(0),E=!1;else Q[Q.length-1]++;if(!t())A(4,[],[4,5]);C=!0}if(R(),!E)Q.pop();if(X.getToken()!==4)A(8,[4],[]);else I();return!0}function t(){switch(X.getToken()){case 3:return g();case 1:return v();case 10:return b(!0);default:return w()}}if(I(),X.getToken()===17){if(J.allowEmptyContent)return!0;return A(4,[],[]),!1}if(!t())return A(4,[],[]),!1;if(X.getToken()!==17)A(9,[],[]);return!0}function XO(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 l2;var Lq=B(()=>{T7();(function(Z){Z.DEFAULT={allowTrailingComma:!1}})(l2||(l2={}))});function mU(Z,q,J,X){let Q=q.slice(),Y=Vq(Z,[]),H=void 0,K=void 0;while(Q.length>0)if(K=Q.pop(),H=j7(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 r1(Z,{offset:Y?Y.offset:0,length:Y?Y.length:0,content:JSON.stringify(J)},X)}else if(H.type==="object"&&typeof K==="string"&&Array.isArray(H.children)){let W=j7(H,[K]);if(W!==void 0)if(J===void 0){if(!W.parent)throw Error("Malformed AST");let U=H.children.indexOf(W.parent),V,L=W.parent.offset+W.parent.length;if(U>0){let _=H.children[U-1];V=_.offset+_.length}else if(V=H.offset+1,H.children.length>1)L=H.children[1].offset;return r1(Z,{offset:V,length:L-V,content:""},X)}else return r1(Z,{offset:W.offset,length:W.length,content:JSON.stringify(J)},X);else{if(J===void 0)return[];let U=`${JSON.stringify(K)}: ${JSON.stringify(J)}`,V=X.getInsertionIndex?X.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:","+U}}else if(H.children.length===0)L={offset:H.offset+1,length:0,content:U};else L={offset:H.offset+1,length:0,content:U+","};return r1(Z,L,X)}}else if(H.type==="array"&&typeof K==="number"&&Array.isArray(H.children)){let W=K;if(W===-1){let U=`${JSON.stringify(J)}`,V;if(H.children.length===0)V={offset:H.offset+1,length:0,content:U};else{let L=H.children[H.children.length-1];V={offset:L.offset+L.length,length:0,content:","+U}}return r1(Z,V,X)}else if(J===void 0&&H.children.length>=0){let U=K,V=H.children[U],L;if(H.children.length===1)L={offset:H.offset+1,length:H.length-2,content:""};else if(H.children.length-1===U){let _=H.children[U-1],z=_.offset+_.length,R=H.offset+H.length;L={offset:z,length:R-2-z,content:""}}else L={offset:V.offset,length:H.children[U+1].offset-V.offset,content:""};return r1(Z,L,X)}else if(J!==void 0){let U,V=`${JSON.stringify(J)}`;if(!X.isArrayInsertion&&H.children.length>K){let L=H.children[K];U={offset:L.offset,length:L.length,content:V}}else if(H.children.length===0||K===0)U={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];U={offset:_.offset+_.length,length:0,content:","+V}}return r1(Z,U,X)}else throw Error(`Can not ${J===void 0?"remove":X.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 r1(Z,q,J){if(!J.formattingOptions)return[q];let X=I7(Z,q),Q=q.offset,$=q.offset+q.content.length;if(q.length===0||q.content.length===0){while(Q>0&&!c2(X,Q-1))Q--;while($<X.length&&!c2(X,$))$++}let Y=Uq(X,{offset:Q,length:$-Q},{...J.formattingOptions,keepLines:!1});for(let K=Y.length-1;K>=0;K--){let W=Y[K];X=I7(X,W),Q=Math.min(Q,W.offset),$=Math.max($,W.offset+W.length),$+=W.content.length-W.length}let H=Z.length-(X.length-$)-Q;return[{offset:Q,length:H,content:X.substring(Q,$)}]}function I7(Z,q){return Z.substring(0,q.offset)+q.content+Z.substring(q.offset+q.length)}var uU=B(()=>{Wq();Lq()});function lU(Z,q,J,X){return mU(Z,q,J,X)}function nU(Z,q){let J=q.slice(0).sort((Q,$)=>{let Y=Q.offset-$.offset;if(Y===0)return Q.length-$.length;return Y}),X=Z.length;for(let Q=J.length-1;Q>=0;Q--){let $=J[Q];if($.offset+$.length<=X)Z=I7(Z,$);else throw Error("Overlapping edit");X=$.offset}return Z}var pU,dU,_q,cU;var iU=B(()=>{Wq();uU();T7();Lq();(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"})(pU||(pU={}));(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"})(dU||(dU={}));_q=fU;(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"})(cU||(cU={}))});import{open as YO,readFile as HO,stat as GO}from"fs/promises";function oU(Z,q){try{return{ok:!0,value:JSON.parse(E0(Z))}}catch(J){if(q)S(J);return{ok:!1}}}function al(Z){if(!Z)return null;try{return _q(E0(Z))}catch(q){return S(q),null}}function UO(Z){let q=sU,J=Z.length,X=q(Z);if(!X.error||X.done||X.read>=J)return X.values;let{values:Q,read:$}=X;while($<J){let Y=typeof Z==="string"?Z.indexOf(`
81
- `,$):Z.indexOf(10,$);if(Y===-1)break;$=Y+1;let H=q(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 WO(Z){let q=Z.length,J=0;if(Z[0]===239&&Z[1]===187&&Z[2]===191)J=3;let X=[];while(J<q){let Q=Z.indexOf(10,J);if(Q===-1)Q=q;let $=Z.toString("utf8",J,Q).trim();if(J=Q+1,!$)continue;try{X.push(JSON.parse($))}catch{}}return X}function VO(Z){let q=E0(Z),J=q.length,X=0,Q=[];while(X<J){let $=q.indexOf(`
82
- `,X);if($===-1)$=J;let Y=q.substring(X,$).trim();if(X=$+1,!Y)continue;try{Q.push(JSON.parse(Y))}catch{}}return Q}function zq(Z){if(sU)return UO(Z);if(typeof Z==="string")return VO(Z);return WO(Z)}async function ol(Z){let H=[];try{let{size:q}=await GO(Z);if(q<=n2)return zq(await HO(Z));const J=b6(H,await YO(Z,"r"),1);let X=Buffer.allocUnsafe(n2);let Q=0;let $=q-n2;while(Q<n2){let{bytesRead:L}=await J.read(X,Q,n2-Q,$+Q);if(L===0)break;Q+=L}let Y=X.indexOf(10);if(Y!==-1&&Y<Q-1)return zq(X.subarray(Y+1,Q));return zq(X.subarray(0,Q))}catch(K){var W=K,U=1}finally{var V=h6(H,W,U);V&&await V}}function sl(Z,q){try{if(!Z||Z.trim()==="")return m([q],null,4);let J=E0(Z),X=_q(J);if(Array.isArray(X)){let Q=X.length,H=lU(J,Q===0?[0]:[Q],q,{formattingOptions:{insertSpaces:!0,tabSize:4},isArrayInsertion:!0});if(!H||H.length===0){let K=[...X,q];return m(K,null,4)}return nU(J,H)}else return m([q],null,4)}catch(J){return S(J),m([q],null,4)}}var KO=8192,aU,m0,sU,n2=104857600;var O7=B(()=>{iU();F7();k0();E4();z0();aU=F1(oU,(Z)=>Z,50),m0=Object.assign(function(q,J=!0){if(!q)return null;let X=q.length>KO?oU(q,J):aU(q,J);return X.ok?X.value:null},{cache:aU.cache});sU=(()=>{if(typeof Bun>"u")return!1;let q=Bun.JSONL;if(!q?.parseChunk)return!1;return q.parseChunk})()});function qn(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 Jn(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"bundled":case"built-in":return"Built-in"}}function Xn(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 Qn(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 $n(Z){if(Z==="")return[];let q=Z.split(",").map((X)=>X.trim()),J=[];for(let X of q)switch(X){case"user":J.push("userSettings");break;case"project":J.push("projectSettings");break;case"local":J.push("localSettings");break;default:throw Error(`Invalid setting source: ${X}. Valid options are: user, project, local`)}return J}function i2(){let Z=rU(),q=new Set(Z);return q.add("policySettings"),q.add("flagSettings"),Array.from(q)}function Yn(Z){return i2().includes(Z)}var Zn,Hn,tU="https://json.schemastore.org/claude-code-settings.json";var Rq=B(()=>{_6();Zn=["userSettings","projectSettings","localSettings","flagSettings","policySettings"];Hn=["localSettings","projectSettings","userSettings"]});function eU(Z){w7.set(Z,Date.now())}function Kn(Z,q){let J=w7.get(Z);if(J!==void 0&&Date.now()-J<q)return w7.delete(Z),!0;return!1}function Un(){w7.clear()}var w7;var ZW=B(()=>{w7=new Map});import{join as BO}from"path";var k1,a2;var k7=B(()=>{O1();f6();k1=u(function(){switch(f0()){case"macos":return"/Library/Application Support/ClaudeCode";case"windows":return"C:\\Program Files\\ClaudeCode";default:return"/etc/claude-code"}}),a2=u(function(){return BO(k1(),"managed-settings.d")})});var LO,_O,qW;var JW=B(()=>{r0();t1();LO=j(()=>G.object({allowedDomains:G.array(G.string()).optional(),allowManagedDomainsOnly:G.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:G.array(G.string()).optional().describe("macOS only: Unix socket paths to allow. Ignored on Linux (seccomp cannot filter by path)."),allowAllUnixSockets:G.boolean().optional().describe("If true, allow all Unix sockets (disables blocking on both platforms)."),allowLocalBinding:G.boolean().optional(),httpProxyPort:G.number().optional(),socksProxyPort:G.number().optional()}).optional()),_O=j(()=>G.object({allowWrite:G.array(G.string()).optional().describe("Additional paths to allow writing within the sandbox. Merged with paths from Edit(...) allow permission rules."),denyWrite:G.array(G.string()).optional().describe("Additional paths to deny writing within the sandbox. Merged with paths from Edit(...) deny permission rules."),denyRead:G.array(G.string()).optional().describe("Additional paths to deny reading within the sandbox. Merged with paths from Read(...) deny permission rules."),allowRead:G.array(G.string()).optional().describe("Paths to re-allow reading within denyRead regions. Takes precedence over denyRead for matching paths."),allowManagedReadPathsOnly:G.boolean().optional().describe("When true (set in managed settings), only allowRead paths from policySettings are used.")}).optional()),qW=j(()=>G.object({enabled:G.boolean().optional(),failIfUnavailable:G.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:G.boolean().optional(),allowUnsandboxedCommands:G.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:LO(),filesystem:_O(),ignoreViolations:G.record(G.string(),G.array(G.string())).optional(),enableWeakerNestedSandbox:G.boolean().optional(),enableWeakerNetworkIsolation:G.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:G.array(G.string()).optional(),ripgrep:G.object({command:G.string(),args:G.array(G.string()).optional()}).optional().describe("Custom ripgrep configuration for bundled ripgrep support")}).passthrough())});function XW(){return process.versions.bun!==void 0}function Mn(){return typeof Bun<"u"&&Array.isArray(Bun.embeddedFiles)&&Bun.embeddedFiles.length>0}var QW=()=>{};function $W(Z,q){return{cmd:H7(Z)??Z,args:q}}var YW=B(()=>{G7()});import{dirname as zO,join as HW}from"path";async function n6(Z){try{return!!await QK(Z)}catch{return!1}}function AO(){return process.env.__CFBundleIdentifier==="com.conductor.app"}function jO(){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 q of TO)if(Z.includes(q))return q}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(WW())return"ssh-session";if(process.env.TERM){let q=process.env.TERM;if(q.includes("alacritty"))return"alacritty";if(q.includes("rxvt"))return"rxvt";if(q.includes("termite"))return"termite";return process.env.TERM}if(!process.stdout.isTTY)return"non-interactive";return null}function WW(){return!!(process.env.SSH_CONNECTION||process.env.SSH_CLIENT||process.env.SSH_TTY)}function En(){let Z=process.env.CLAUDE_CODE_HOST_PLATFORM;if(Z==="win32"||Z==="darwin"||Z==="linux")return Z;return i6.platform}var L0,RO,FO,MO,UW,DO,TO,IO,i6;var Fq=B(()=>{O1();KW();QW();o0();YW();F0();G7();L0=u(()=>{let Z=GW(),q=G0(),J=HW(q,`config${Z}.json`);if(!N().existsSync(J)){let Q=process.env.CLAUDIN_CONFIG_DIR?q:zO(q),$=HW(Q,`.claudin${Z}.json`);if(N().existsSync($))return $}return J}),RO=u(async()=>{try{let{default:Z}=await import("./index-1.0.12-fmffckpa.mjs");return await Z.head("http://1.1.1.1",{signal:AbortSignal.timeout(1000)}),!0}catch{return!1}});FO=u(async()=>{let Z=[];if(await n6("npm"))Z.push("npm");if(await n6("yarn"))Z.push("yarn");if(await n6("pnpm"))Z.push("pnpm");return Z}),MO=u(async()=>{let Z=[];if(await n6("bun"))Z.push("bun");if(await n6("deno"))Z.push("deno");if(await n6("node"))Z.push("node");return Z}),UW=u(()=>{try{return N().existsSync("/proc/sys/fs/binfmt_misc/WSLInterop")}catch(Z){return!1}}),DO=u(()=>{try{if(!UW())return!1;let{cmd:Z}=$W("npm",[]);return Z.startsWith("/mnt/c/")}catch(Z){return!1}});TO=["pycharm","intellij","webstorm","phpstorm","rubymine","clion","goland","rider","datagrip","appcode","dataspell","aqua","gateway","fleet","jetbrains","androidstudio"];IO=u(()=>{if(q0(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(q0(process.env.VERCEL))return"vercel";if(process.env.RAILWAY_ENVIRONMENT_NAME||process.env.RAILWAY_SERVICE_NAME)return"railway";if(q0(process.env.RENDER))return"render";if(q0(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(q0(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(N().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(q0(process.env.GITHUB_ACTIONS))return"github-actions";if(q0(process.env.GITLAB_CI))return"gitlab-ci";if(process.env.CIRCLECI)return"circleci";if(process.env.BUILDKITE)return"buildkite";if(q0(process.env.CI))return"ci";if(process.env.KUBERNETES_SERVICE_HOST)return"kubernetes";try{if(N().existsSync("/.dockerenv"))return"docker"}catch{}if(i6.platform==="darwin")return"unknown-darwin";if(i6.platform==="linux")return"unknown-linux";if(i6.platform==="win32")return"unknown-win32";return"unknown"});i6={hasInternetAccess:RO,isCI:q0(process.env.CI),platform:["win32","darwin"].includes(process.platform)?process.platform:"linux",arch:process.arch,nodeVersion:process.version,terminal:jO(),isSSH:WW,getPackageManagers:FO,getRuntimes:MO,isRunningWithBun:u(XW),isWslEnvironment:UW,isNpmFromWindowsPath:DO,isConductor:AO,detectDeploymentEnvironment:IO}});var yn,Sn="∙",bn="✻",hn="↑",gn="↓",fn="↯",mn="○",un="◐",pn="●",dn="◎",cn="◉",ln="◍",nn="▶",VW="⏸",an="↻",on="◇",sn="◆",rn="※",tn="▎",en,Zi="·✔︎·",qi="×";var BW=B(()=>{Fq();yn=i6.platform==="darwin"?"⏺":"●",en=["·|·","·/·","·—·","·\\·"]});var bO={};Mq(bO,{toExternalPermissionMode:()=>xO,permissionModeTitle:()=>EO,permissionModeSymbol:()=>yO,permissionModeShortTitle:()=>CO,permissionModeSchema:()=>wO,permissionModeFromString:()=>PO,isExternalPermissionMode:()=>NO,isDefaultMode:()=>vO,getModeColor:()=>SO,externalPermissionModeSchema:()=>kO,PERMISSION_MODES:()=>a6,EXTERNAL_PERMISSION_MODES:()=>Aq});function NO(Z){return Z!=="auto"}function o2(Z){return LW[Z]??LW.default}function xO(Z){return o2(Z).external}function PO(Z){return a6.includes(Z)?Z:"default"}function EO(Z){return o2(Z).title}function vO(Z){return Z==="default"||Z===void 0}function CO(Z){return o2(Z).shortTitle}function yO(Z){return o2(Z).symbol}function SO(Z){return o2(Z).color}var wO,kO,LW;var _W=B(()=>{r0();BW();OO();t1();wO=j(()=>Dq.enum(a6)),kO=j(()=>Dq.enum(Aq)),LW={default:{title:"Default",shortTitle:"Default",symbol:"",color:"text",external:"default"},plan:{title:"Plan Mode",shortTitle:"Plan",symbol:VW,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 FW=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 MW=()=>{};var DW=()=>{};var AW=B(()=>{FW();MW();DW()});var TW,Bi="bash";var jW=B(()=>{TW=["bash","powershell"]});function hO(){let Z=G.object({type:G.literal("command").describe("Shell command hook type"),command:G.string().describe("Shell command to execute"),if:N7(),shell:G.enum(TW).optional().describe("Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash."),timeout:G.number().positive().optional().describe("Timeout in seconds for this specific command"),statusMessage:G.string().optional().describe("Custom status message to display in spinner while hook runs"),once:G.boolean().optional().describe("If true, hook runs once and is removed after execution"),async:G.boolean().optional().describe("If true, hook runs in background without blocking"),asyncRewake:G.boolean().optional().describe("If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async.")}),q=G.object({type:G.literal("prompt").describe("LLM prompt hook type"),prompt:G.string().describe("Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."),if:N7(),timeout:G.number().positive().optional().describe("Timeout in seconds for this specific prompt evaluation"),model:G.string().optional().describe('Model to use for this prompt hook (e.g., "claude-sonnet-5"). If not specified, uses the default small fast model.'),statusMessage:G.string().optional().describe("Custom status message to display in spinner while hook runs"),once:G.boolean().optional().describe("If true, hook runs once and is removed after execution")}),J=G.object({type:G.literal("http").describe("HTTP hook type"),url:G.string().url().describe("URL to POST the hook input JSON to"),if:N7(),timeout:G.number().positive().optional().describe("Timeout in seconds for this specific request"),headers:G.record(G.string(),G.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:G.array(G.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:G.string().optional().describe("Custom status message to display in spinner while hook runs"),once:G.boolean().optional().describe("If true, hook runs once and is removed after execution")}),X=G.object({type:G.literal("agent").describe("Agentic verifier hook type"),prompt:G.string().describe('Prompt describing what to verify (e.g. "Verify that unit tests ran and passed."). Use $ARGUMENTS placeholder for hook input JSON.'),if:N7(),timeout:G.number().positive().optional().describe("Timeout in seconds for agent execution (default 60)"),model:G.string().optional().describe('Model to use for this agent hook (e.g., "claude-sonnet-5"). If not specified, uses Haiku.'),statusMessage:G.string().optional().describe("Custom status message to display in spinner while hook runs"),once:G.boolean().optional().describe("If true, hook runs once and is removed after execution")});return{BashCommandHookSchema:Z,PromptHookSchema:q,HttpHookSchema:J,AgentHookSchema:X}}var N7,IW,OW,e1;var x7=B(()=>{AW();r0();t1();jW();N7=j(()=>G.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.'));IW=j(()=>{let{BashCommandHookSchema:Z,PromptHookSchema:q,AgentHookSchema:J,HttpHookSchema:X}=hO();return G.discriminatedUnion("type",[Z,q,J,X])}),OW=j(()=>G.object({matcher:G.string().optional().describe('String pattern to match (e.g. tool names like "Write")'),hooks:G.array(IW()).describe("List of hooks to execute when the matcher matches")})),e1=j(()=>G.partialRecord(G.enum(RW),G.array(OW())))});var Ti,ji,gO,fO,wW,mO,uO,pO,dO,cO,lO,nO,P7,Ii;var kW=B(()=>{r0();t1();Ti=j(()=>G.enum(["local","user","project","dynamic","enterprise","claudeai","managed"])),ji=j(()=>G.enum(["stdio","sse","sse-ide","http","ws","sdk"])),gO=j(()=>G.object({type:G.literal("stdio").optional(),command:G.string().min(1,"Command cannot be empty"),args:G.array(G.string()).default([]),env:G.record(G.string(),G.string()).optional()})),fO=j(()=>G.boolean()),wW=j(()=>G.object({clientId:G.string().optional(),callbackPort:G.number().int().positive().optional(),authServerMetadataUrl:G.string().url().startsWith("https://",{message:"authServerMetadataUrl must use https://"}).optional(),xaa:fO().optional()})),mO=j(()=>G.object({type:G.literal("sse"),url:G.string(),headers:G.record(G.string(),G.string()).optional(),headersHelper:G.string().optional(),oauth:wW().optional()})),uO=j(()=>G.object({type:G.literal("sse-ide"),url:G.string(),ideName:G.string(),ideRunningInWindows:G.boolean().optional()})),pO=j(()=>G.object({type:G.literal("ws-ide"),url:G.string(),ideName:G.string(),authToken:G.string().optional(),ideRunningInWindows:G.boolean().optional()})),dO=j(()=>G.object({type:G.literal("http"),url:G.string(),headers:G.record(G.string(),G.string()).optional(),headersHelper:G.string().optional(),oauth:wW().optional()})),cO=j(()=>G.object({type:G.literal("ws"),url:G.string(),headers:G.record(G.string(),G.string()).optional(),headersHelper:G.string().optional()})),lO=j(()=>G.object({type:G.literal("sdk"),name:G.string()})),nO=j(()=>G.object({type:G.literal("claudeai-proxy"),url:G.string(),id:G.string()})),P7=j(()=>G.union([gO(),mO(),uO(),pO(),dO(),cO(),lO(),nO()])),Ii=j(()=>G.object({mcpServers:G.record(G.string(),P7())}))});function Pi(Z,q){let J=Z.toLowerCase();return q.autoUpdate??(v7.has(J)&&!iO.has(J))}function sO(Z){if(v7.has(Z.toLowerCase()))return!1;if(oO.test(Z))return!0;return aO.test(Z)}function rO(Z){let q=Z.trim(),J=tO.exec(q);if(J)return J[1].toLowerCase()==="github.com"&&J[2].toLowerCase()===o6;try{let X=new URL(q);if(X.protocol!=="https:"&&X.protocol!=="ssh:")return!1;if(X.hostname.toLowerCase()!=="github.com")return!1;return X.pathname.split("/").filter(Boolean)[0]?.toLowerCase()===o6}catch{return!1}}function Ei(Z,q){let J=Z.toLowerCase();if(!v7.has(J))return null;if(q.source==="github"){if(!(q.repo||"").toLowerCase().startsWith(`${o6}/`))return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${o6}/' can use this name.`;return null}if(q.source==="git"&&q.url){if(rO(q.url))return null;return`The name '${Z}' is reserved for official Anthropic marketplaces. Only repositories from 'github.com/${o6}/' can use this name.`}return`The name '${Z}' is reserved for official Anthropic marketplaces and can only be used with GitHub sources from the '${o6}' organization.`}function Ci(Z){return typeof Z==="string"&&Z.startsWith("./")}function yi(Z){return Z.source==="file"||Z.source==="directory"}var v7,iO,aO,oO,o6="anthropics",tO,V1,s6,NW,jq,Iq,EW,Oq,eO,vi,Zw,qw,Jw,Xw,Qw,$w,xW,Yw,Hw,vW,Gw,Kw,PW,Uw,CW,Ww,Vw,s2,Tq,yW,Bw,Lw,Si,E7,_w,zw,bi,Rw,Fw,Mw,Dw,Aw,hi,Tw,gi;var SW=B(()=>{r0();x7();kW();t1();v7=new Set(["claude-code-marketplace","claude-code-plugins","claude-plugins-official","anthropic-marketplace","anthropic-plugins","agent-skills","life-sciences","knowledge-work-plugins"]),iO=new Set(["knowledge-work-plugins"]);aO=/(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i,oO=/[^\u0020-\u007E]/;tO=/^git@([^:]+):([^/]+)\//i;V1=j(()=>G.string().startsWith("./")),s6=j(()=>V1().endsWith(".json")),NW=j(()=>G.union([V1().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"),G.string().url().refine((Z)=>Z.endsWith(".mcpb")||Z.endsWith(".dxt"),{message:"MCPB URL must end with .mcpb or .dxt"}).describe("URL to MCPB file")])),jq=j(()=>V1().endsWith(".md")),Iq=j(()=>G.union([jq(),V1()])),EW=j(()=>G.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)=>!sO(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'})),Oq=j(()=>G.object({name:G.string().min(1,"Author name cannot be empty").describe("Display name of the plugin author or organization"),email:G.string().optional().describe("Contact email for support or feedback"),url:G.string().optional().describe("Website, GitHub profile, or organization URL")})),eO=j(()=>G.object({name:G.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:G.string().optional().describe("Semantic version (e.g., 1.2.3) following semver.org specification"),description:G.string().optional().describe("Brief, user-facing explanation of what the plugin provides"),author:Oq().optional().describe("Information about the plugin creator or maintainer"),homepage:G.string().url().optional().describe("Plugin homepage or documentation URL"),repository:G.string().optional().describe("Source code repository URL"),license:G.string().optional().describe("SPDX license identifier (e.g., MIT, Apache-2.0)"),keywords:G.array(G.string()).optional().describe("Tags for plugin discovery and categorization"),dependencies:G.array(zw()).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.`)})),vi=j(()=>G.object({description:G.string().optional().describe("Brief, user-facing explanation of what these hooks provide"),hooks:G.lazy(()=>e1()).describe("The hooks provided by the plugin, in the same format as the one used for settings")})),Zw=j(()=>G.object({hooks:G.union([s6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),G.lazy(()=>e1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)"),G.array(G.union([s6().describe("Path to file with additional hooks (in addition to those in hooks/hooks.json, if it exists), relative to the plugin root"),G.lazy(()=>e1()).describe("Additional hooks (in addition to those in hooks/hooks.json, if it exists)")]))])})),qw=j(()=>G.object({source:Iq().optional().describe("Path to command markdown file, relative to plugin root"),content:G.string().optional().describe("Inline markdown content for the command"),description:G.string().optional().describe("Command description override"),argumentHint:G.string().optional().describe('Hint for command arguments (e.g., "[file]")'),model:G.string().optional().describe("Default model for this command"),allowedTools:G.array(G.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'})),Jw=j(()=>G.object({commands:G.union([Iq().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"),G.array(Iq().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"),G.record(G.string(),qw()).describe('Object mapping of command names to their metadata and source files. Command name becomes the slash command name (e.g., "about" → "/plugin:about")')])})),Xw=j(()=>G.object({agents:G.union([jq().describe("Path to additional agent file (in addition to those in the agents/ directory, if it exists), relative to the plugin root"),G.array(jq().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")])})),Qw=j(()=>G.object({skills:G.union([V1().describe("Path to additional skill directory (in addition to those in the skills/ directory, if it exists), relative to the plugin root"),G.array(V1().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")])})),$w=j(()=>G.object({outputStyles:G.union([V1().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"),G.array(V1().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=j(()=>G.string().min(1)),Yw=j(()=>G.string().min(2).refine((Z)=>Z.startsWith("."),{message:'File extensions must start with dot (e.g., ".ts", not "ts")'})),Hw=j(()=>G.object({mcpServers:G.union([s6().describe("MCP servers to include in the plugin (in addition to those in the .mcp.json file, if it exists)"),NW().describe("Path or URL to MCPB file containing MCP server configuration"),G.record(G.string(),P7()).describe("MCP server configurations keyed by server name"),G.array(G.union([s6().describe("Path to MCP servers configuration file"),NW().describe("Path or URL to MCPB file"),G.record(G.string(),P7()).describe("Inline MCP server configurations")])).describe("Array of MCP server configurations (paths, MCPB files, or inline definitions)")])})),vW=j(()=>G.object({type:G.enum(["string","number","boolean","directory","file"]).describe("Type of the configuration value"),title:G.string().describe("Human-readable label shown in the config dialog"),description:G.string().describe("Help text shown beneath the field in the config dialog"),required:G.boolean().optional().describe("If true, validation fails when this field is empty"),default:G.union([G.string(),G.number(),G.boolean(),G.array(G.string())]).optional().describe("Default value used when the user provides nothing"),multiple:G.boolean().optional().describe("For string type: allow an array of strings"),sensitive:G.boolean().optional().describe("If true, masks dialog input and stores value in secure storage (keychain/credentials file) instead of settings.json"),min:G.number().optional().describe("Minimum value (number type only)"),max:G.number().optional().describe("Maximum value (number type only)")}).strict()),Gw=j(()=>G.object({userConfig:G.record(G.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).")})),Kw=j(()=>G.object({channels:G.array(G.object({server:G.string().min(1).describe("Name of the MCP server this channel binds to. Must match a key in this plugin's mcpServers."),displayName:G.string().optional().describe('Human-readable name shown in the config dialog title (e.g., "Telegram"). Defaults to the server name.'),userConfig:G.record(G.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.")})),PW=j(()=>G.strictObject({command:G.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:G.array(xW()).optional().describe("Command-line arguments to pass to the server"),extensionToLanguage:G.record(Yw(),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:G.enum(["stdio","socket"]).default("stdio").describe("Communication transport mechanism"),env:G.record(G.string(),G.string()).optional().describe("Environment variables to set when starting the server"),initializationOptions:G.unknown().optional().describe("Initialization options passed to the server during initialization"),settings:G.unknown().optional().describe("Settings passed to the server via workspace/didChangeConfiguration"),workspaceFolder:G.string().optional().describe("Workspace folder path to use for the server"),startupTimeout:G.number().int().positive().optional().describe("Maximum time to wait for server startup (milliseconds)"),shutdownTimeout:G.number().int().positive().optional().describe("Maximum time to wait for graceful shutdown (milliseconds)"),restartOnCrash:G.boolean().optional().describe("Whether to restart the server if it crashes"),maxRestarts:G.number().int().nonnegative().optional().describe("Maximum number of restart attempts before giving up")})),Uw=j(()=>G.object({lspServers:G.union([s6().describe("Path to .lsp.json configuration file relative to plugin root"),G.record(G.string(),PW()).describe("LSP server configurations keyed by server name"),G.array(G.union([s6().describe("Path to LSP configuration file"),G.record(G.string(),PW()).describe("Inline LSP server configurations")])).describe("Array of LSP server configurations (paths or inline definitions)")])})),CW=j(()=>G.string().refine((Z)=>!Z.includes("..")&&!Z.includes("//"),"Package name cannot contain path traversal patterns").refine((Z)=>{let q=/^@[a-z0-9][a-z0-9-._]*\/[a-z0-9][a-z0-9-._]*$/,J=/^[a-z0-9][a-z0-9-._]*$/;return q.test(Z)||J.test(Z)},"Invalid npm package name format")),Ww=j(()=>G.object({settings:G.record(G.string(),G.unknown()).optional().describe("Settings to merge when plugin is enabled. Only allowlisted keys are kept (currently: agent)")})),Vw=j(()=>G.object({...eO().shape,...Zw().partial().shape,...Jw().partial().shape,...Xw().partial().shape,...Qw().partial().shape,...$w().partial().shape,...Kw().partial().shape,...Hw().partial().shape,...Uw().partial().shape,...Ww().partial().shape,...Gw().partial().shape})),s2=j(()=>G.discriminatedUnion("source",[G.object({source:G.literal("url"),url:G.string().url().describe("Direct URL to marketplace.json file"),headers:G.record(G.string(),G.string()).optional().describe("Custom HTTP headers (e.g., for authentication)")}),G.object({source:G.literal("github"),repo:G.string().describe("GitHub repository in owner/repo format"),ref:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:G.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:G.array(G.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.')}),G.object({source:G.literal("git"),url:G.string().describe("Full git repository URL"),ref:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),path:G.string().optional().describe("Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json)"),sparsePaths:G.array(G.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.')}),G.object({source:G.literal("npm"),package:CW().describe("NPM package containing marketplace.json")}),G.object({source:G.literal("file"),path:G.string().describe("Local file path to marketplace.json")}),G.object({source:G.literal("directory"),path:G.string().describe("Local directory containing .claude-plugin/marketplace.json")}),G.object({source:G.literal("hostPattern"),hostPattern:G.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$").')}),G.object({source:G.literal("pathPattern"),pathPattern:G.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.')}),G.object({source:G.literal("settings"),name:EW().refine((Z)=>!v7.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:G.array(Bw()).describe("Plugin entries declared inline in settings.json"),owner:Oq().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).")])),Tq=j(()=>G.string().length(40).regex(/^[a-f0-9]{40}$/,"Must be a full 40-character lowercase git commit SHA")),yW=j(()=>G.union([V1().describe("Path to the plugin root, relative to the marketplace root (the directory containing .claude-plugin/, not .claude-plugin/ itself)"),G.object({source:G.literal("npm"),package:CW().or(G.string()).describe("Package name (or url, or local path, or anything else that can be passed to `npm` as a package)"),version:G.string().optional().describe("Specific version or version range (e.g., ^1.0.0, ~2.1.0)"),registry:G.string().url().optional().describe("Custom NPM registry URL (defaults to using system default, likely npmjs.org)")}).describe("NPM package as plugin source"),G.object({source:G.literal("pip"),package:G.string().describe("Python package name as it appears on PyPI"),version:G.string().optional().describe("Version specifier (e.g., ==1.0.0, >=2.0.0, <3.0.0)"),registry:G.string().url().optional().describe("Custom PyPI registry URL (defaults to using system default, likely pypi.org)")}).describe("Python package as plugin source"),G.object({source:G.literal("url"),url:G.string().describe("Full git repository URL (https:// or git@)"),ref:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:Tq().optional().describe("Specific commit SHA to use")}),G.object({source:G.literal("github"),repo:G.string().describe("GitHub repository in owner/repo format"),ref:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:Tq().optional().describe("Specific commit SHA to use")}),G.object({source:G.literal("git-subdir"),url:G.string().describe("Git repository: GitHub owner/repo shorthand, https://, or git@ URL"),path:G.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:G.string().optional().describe('Git branch or tag to use (e.g., "main", "v1.0.0"). Defaults to repository default branch.'),sha:Tq().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.")])),Bw=j(()=>G.object({name:G.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:G.string().optional(),version:G.string().optional(),strict:G.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.'}));Lw=j(()=>Vw().partial().extend({name:G.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:G.string().optional().describe('Category for organizing plugins (e.g., "productivity", "development")'),tags:G.array(G.string()).optional().describe("Tags for searchability and discovery"),strict:G.boolean().optional().default(!0).describe("Require the plugin manifest to be present in the plugin folder. If false, the marketplace entry provides the manifest.")})),Si=j(()=>G.object({name:EW(),owner:Oq().describe("Marketplace maintainer or curator information"),plugins:G.array(Lw()).describe("Collection of available plugins in this marketplace"),forceRemoveDeletedPlugins:G.boolean().optional().describe("When true, plugins removed from this marketplace will be automatically uninstalled and flagged for users"),metadata:G.object({pluginRoot:G.string().optional().describe("Base path for relative plugin sources"),version:G.string().optional().describe("Marketplace version"),description:G.string().optional().describe("Marketplace description")}).optional().describe("Optional marketplace metadata"),allowCrossMarketplaceDependenciesOn:G.array(G.string()).optional().describe("Marketplace names whose plugins may be auto-installed as dependencies. Only the root marketplace's allowlist applies — no transitive trust.")})),E7=j(()=>G.string().regex(/^[a-z0-9][-a-z0-9._]*@[a-z0-9][-a-z0-9._]*$/i,"Plugin ID must be in format: plugin@marketplace")),_w=/^[a-z0-9][-a-z0-9._]*(@[a-z0-9][-a-z0-9._]*)?(@\^[^@]*)?$/i,zw=j(()=>G.union([G.string().regex(_w,"Dependency must be a plugin name, optionally qualified with @marketplace").transform((Z)=>Z.replace(/@\^[^@]*$/,"")),G.object({name:G.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i),marketplace:G.string().min(1).regex(/^[a-z0-9][-a-z0-9._]*$/i).optional()}).loose().transform((Z)=>Z.marketplace?`${Z.name}@${Z.marketplace}`:Z.name)])),bi=j(()=>G.union([E7(),G.object({id:E7().describe('Plugin identifier (e.g., "formatter@tools")'),version:G.string().optional().describe('Version constraint (e.g., "^2.0.0")'),required:G.boolean().optional().describe("If true, cannot be disabled"),config:G.record(G.string(),G.unknown()).optional().describe("Plugin-specific configuration")})])),Rw=j(()=>G.object({version:G.string().describe("Currently installed version"),installedAt:G.string().describe("ISO 8601 timestamp of installation"),lastUpdated:G.string().optional().describe("ISO 8601 timestamp of last update"),installPath:G.string().describe("Absolute path to the installed plugin directory"),gitCommitSha:G.string().optional().describe("Git commit SHA for git-based plugins (for version tracking)")})),Fw=j(()=>G.object({version:G.literal(1).describe("Schema version 1"),plugins:G.record(E7(),Rw()).describe("Map of plugin IDs to their installation metadata")})),Mw=j(()=>G.enum(["managed","user","project","local"])),Dw=j(()=>G.object({scope:Mw().describe("Installation scope"),projectPath:G.string().optional().describe("Project path (required for project/local scopes)"),installPath:G.string().describe("Absolute path to the versioned plugin directory"),version:G.string().optional().describe("Currently installed version"),installedAt:G.string().optional().describe("ISO 8601 timestamp of installation"),lastUpdated:G.string().optional().describe("ISO 8601 timestamp of last update"),gitCommitSha:G.string().optional().describe("Git commit SHA for git-based plugins")})),Aw=j(()=>G.object({version:G.literal(2).describe("Schema version 2"),plugins:G.record(E7(),G.array(Dw())).describe("Map of plugin IDs to arrays of installation entries")})),hi=j(()=>G.union([Fw(),Aw()])),Tw=j(()=>G.object({source:s2().describe("Where to fetch the marketplace from"),installLocation:G.string().describe("Local cache path where marketplace manifest is stored"),lastUpdated:G.string().describe("ISO 8601 timestamp of last marketplace refresh"),autoUpdate:G.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),gi=j(()=>G.record(G.string(),Tw()))});function mi(Z){return Z.startsWith("claude.ai ")}function C7(Z){let q=Z.replace(/[^a-zA-Z0-9_-]/g,"_");if(Z.startsWith("claude.ai "))q=q.replace(/_+/g,"_").replace(/^_|_$/g,"");return q}var bW=()=>{};function hW(Z){let q=Z.split("__"),[J,X,...Q]=q;if(J!=="mcp"||!X)return null;let $=Q.length>0?Q.join("__"):void 0;return{serverName:X,toolName:$}}function jw(Z){return`mcp__${C7(Z)}__`}function Iw(Z,q){return`${jw(Z)}${C7(q)}`}function di(Z){return Z.mcpInfo?Iw(Z.mcpInfo.serverName,Z.mcpInfo.toolName):Z.name}function ci(Z,q){let J=`mcp__${C7(q)}__`;return Z.replace(J,"")}function li(Z){let q=Z.replace(/\s*\(MCP\)\s*$/,"");q=q.trim();let J=q.indexOf(" - ");if(J!==-1)return q.substring(J+3).trim();return q}var gW=B(()=>{bW()});var fW="Agent",ii="Task",ai;var mW=B(()=>{ai=new Set(["Explore","Plan","WebResearcher","WebResearcherManager"])});var wq="TaskOutput";var uW=()=>{};var pW="TaskStop",ri=`
83
- - Stops a running background task by its ID
84
- - Takes a task_id parameter identifying the task to stop
85
- - Returns a success or failure status
86
- - Use this tool when you need to terminate a long-running task
87
- `;var dW=()=>{};function r6(Z){return Object.hasOwn(kq,Z)?kq[Z]:Z}function Ja(Z){let q=[];for(let[J,X]of Object.entries(kq))if(X===Z)q.push(J);return q}function Ow(Z){return Z.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")}function ww(Z){return Z.replace(/\\\(/g,"(").replace(/\\\)/g,")").replace(/\\\\/g,"\\")}function cW(Z){let q=kw(Z,"(");if(q===-1)return{toolName:r6(Z)};let J=Nw(Z,")");if(J===-1||J<=q)return{toolName:r6(Z)};if(J!==Z.length-1)return{toolName:r6(Z)};let X=Z.substring(0,q),Q=Z.substring(q+1,J);if(!X)return{toolName:r6(Z)};if(Q===""||Q==="*")return{toolName:r6(X)};let $=ww(Q);return{toolName:r6(X),ruleContent:$}}function Xa(Z){if(!Z.ruleContent)return Z.toolName;let q=Ow(Z.ruleContent);return`${Z.toolName}(${q})`}function kw(Z,q){for(let J=0;J<Z.length;J++)if(Z[J]===q){let X=0,Q=J-1;while(Q>=0&&Z[Q]==="\\")X++,Q--;if(X%2===0)return J}return-1}function Nw(Z,q){for(let J=Z.length-1;J>=0;J--)if(Z[J]===q){let X=0,Q=J-1;while(Q>=0&&Z[Q]==="\\")X++,Q--;if(X%2===0)return J}return-1}var kq;var lW=B(()=>{mW();uW();dW();kq={Task:fW,KillShell:pW,AgentOutputTool:wq,BashOutputTool:wq,...{}}});function $a(Z){return Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function nW(Z){return Z.charAt(0).toUpperCase()+Z.slice(1)}function iW(Z,q,J=q+"s"){return Z===1?q:J}function Ya(Z){let q=Z.indexOf(`
88
- `);return q===-1?Z:Z.slice(0,q)}function Ha(Z,q,J=0){let X=0,Q=Z.indexOf(q,J);while(Q!==-1)X++,Q=Z.indexOf(q,Q+1);return X}function Ga(Z){return Z.replace(/[0-9]/g,(q)=>String.fromCharCode(q.charCodeAt(0)-65248))}function Ka(Z){return Z.replace(/\u3000/g," ")}function Ua(Z,q=",",J=aW){let Q="";for(let $ of Z){let Y=Q?q:"",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 xw{maxSize;content="";isTruncated=!1;totalBytesReceived=0;constructor(Z=aW){this.maxSize=Z}append(Z){let q=typeof Z==="string"?Z:Z.toString();if(this.totalBytesReceived+=q.length,this.isTruncated&&this.content.length>=this.maxSize)return;if(this.content.length+q.length>this.maxSize){let J=this.maxSize-this.content.length;if(J>0)this.content+=q.slice(0,J);this.isTruncated=!0}else this.content+=q}toString(){if(!this.isTruncated)return this.content;let Z=this.totalBytesReceived-this.maxSize,q=Math.round(Z/1024);return this.content+`
89
- ... [output truncated - ${q}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 Wa(Z,q){let J=Z.split(`
90
- `);if(J.length<=q)return Z;return J.slice(0,q).join(`
91
- `)+"…"}var aW=33554432;var Nq=()=>{};function oW(Z){return xq.filePatternTools.includes(Z)}function sW(Z){return xq.bashPrefixTools.includes(Z)}function rW(Z){return xq.customValidation[Z]}var xq;var tW=B(()=>{xq={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,q){let J=0,X=q-1;while(X>=0&&Z[X]==="\\")J++,X--;return J%2!==0}function Pq(Z,q){let J=0;for(let X=0;X<Z.length;X++)if(Z[X]===q&&!eW(Z,X))J++;return J}function Pw(Z){for(let q=0;q<Z.length-1;q++)if(Z[q]==="("&&Z[q+1]===")"){if(!eW(Z,q))return!0}return!1}function Eq(Z){if(!Z||Z.trim()==="")return{valid:!1,error:"Permission rule cannot be empty"};let q=Pq(Z,"("),J=Pq(Z,")");if(q!==J)return{valid:!1,error:"Mismatched parentheses",suggestion:"Ensure all opening parentheses have matching closing parentheses"};if(Pw(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 X=cW(Z),Q=hW(X.toolName);if(Q){if(X.ruleContent!==void 0||Pq(Z,"(")>0)return{valid:!1,error:"MCP rules do not support patterns in parentheses",suggestion:`Use "${X.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(!X.toolName||X.toolName.length===0)return{valid:!1,error:"Tool name cannot be empty"};if(X.toolName[0]!==X.toolName[0]?.toUpperCase())return{valid:!1,error:"Tool names must start with uppercase",suggestion:`Use "${nW(String(X.toolName))}"`};let $=rW(X.toolName);if($&&X.ruleContent!==void 0){let Y=$(X.ruleContent);if(!Y.valid)return Y}if(sW(X.toolName)&&X.ruleContent!==void 0){let Y=X.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(X.toolName)&&X.ruleContent!==void 0){let Y=X.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:[`${X.toolName}(*.ts) - matches .ts files`,`${X.toolName}(src/**) - matches all files in src`,`${X.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:[`${X.toolName}(*.js) - all .js files`,`${X.toolName}(src/*) - all files directly in src`,`${X.toolName}(src/**) - all files recursively in src`]}}return{valid:!0}}var y7;var vq=B(()=>{r0();gW();t1();lW();Nq();tW();y7=j(()=>G.string().superRefine((Z,q)=>{let J=Eq(Z);if(!J.valid){let X=J.error;if(J.suggestion)X+=`. ${J.suggestion}`;if(J.examples&&J.examples.length>0)X+=`. Examples: ${J.examples.join(", ")}`;q.addIssue({code:G.ZodIssueCode.custom,message:X,params:{received:Z}})}}))});function Ta(Z){if(!Z||typeof Z!=="object")return null;let q=Cq.safeParse(Z);if(!q.success)return null;if(!q.data.enabled)return null;return q.data}var Cq;var ZV=B(()=>{r0();Cq=G.object({enabled:G.boolean().describe("Whether auto-fix is enabled"),lint:G.string().optional().describe('Lint command to run after file edits (e.g. "eslint . --fix")'),test:G.string().optional().describe('Test command to run after file edits (e.g. "bun test")'),maxRetries:G.number().int().min(0).max(10).default(3).describe("Maximum number of auto-fix retry attempts (default: 3)"),timeout:G.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 ba(Z){return"serverName"in Z&&Z.serverName!==void 0}function ha(Z){return"serverCommand"in Z&&Z.serverCommand!==void 0}function ga(Z){return"serverUrl"in Z&&Z.serverUrl!==void 0}var Ew,vw,Cw,yw,Sw,qV,v0;var r2=B(()=>{r0();JW();o0();t1();_W();SW();Rq();vq();x7();x7();ZV();Qq();Ew=j(()=>G.record(G.string(),G.coerce.string())),vw=j(()=>G.object({allow:G.array(y7()).optional().describe("List of permission rules for allowed operations"),deny:G.array(y7()).optional().describe("List of permission rules for denied operations"),ask:G.array(y7()).optional().describe("List of permission rules that should always prompt for confirmation"),defaultMode:G.enum(a6).optional().describe("Default permission mode when Claude Code needs access"),disableBypassPermissionsMode:G.enum(["disable"]).optional().describe("Disable the ability to bypass permission prompts"),allowBypassPermissionsMode:G.boolean().optional().describe("Allow bypass permissions mode to appear in the mode list without requiring the CLI flag"),...{disableAutoMode:G.enum(["disable"]).optional().describe("Disable auto mode")},additionalDirectories:G.array(G.string()).optional().describe("Additional directories to include in the permission scope")}).passthrough()),Cw=j(()=>G.object({source:s2().describe("Where to fetch the marketplace from"),installLocation:G.string().optional().describe("Local cache path where marketplace manifest is stored (auto-generated if not provided)"),autoUpdate:G.boolean().optional().describe("Whether to automatically update this marketplace and its installed plugins on startup")})),yw=j(()=>G.object({serverName:G.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:G.array(G.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:G.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for allowed remote MCP servers')}).refine((Z)=>{return Xq([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"'})),Sw=j(()=>G.object({serverName:G.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:G.array(G.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:G.string().optional().describe('URL pattern with wildcard support (e.g., "https://*.example.com/*") for blocked remote MCP servers')}).refine((Z)=>{return Xq([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"'})),qV=["skills","agents","hooks","mcp"],v0=j(()=>G.object({$schema:G.literal(tU).optional().describe("JSON Schema reference for Claude Code settings"),apiKeyHelper:G.string().optional().describe("Path to a script that outputs authentication values"),awsCredentialExport:G.string().optional().describe("Path to a script that exports AWS credentials"),awsAuthRefresh:G.string().optional().describe("Path to a script that refreshes AWS authentication"),gcpAuthRefresh:G.string().optional().describe("Command to refresh GCP authentication (e.g., gcloud auth application-default login)"),...q0(process.env.CLAUDE_CODE_ENABLE_XAA)?{xaaIdp:G.object({issuer:G.string().url().describe("IdP issuer URL for OIDC discovery"),clientId:G.string().describe("Claude Code's client_id registered at the IdP"),callbackPort:G.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:G.object({type:G.literal("command"),command:G.string()}).optional().describe("Custom file suggestion configuration for @ mentions"),respectGitignore:G.boolean().optional().describe("Whether file picker should respect .gitignore files (default: true). Note: .ignore files are always respected."),cleanupPeriodDays:G.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:Ew().optional().describe("Environment variables to set for Claude Code sessions"),attribution:G.object({commit:G.string().optional().describe("Attribution text for git commits, including any trailers. Empty string hides attribution."),pr:G.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."),includeGitInstructions:G.boolean().optional().describe("Include built-in commit and PR workflow instructions in Claude's system prompt (default: true)"),permissions:vw().optional().describe("Tool usage permissions configuration"),model:G.string().optional().describe("Override the default model used by Claude Code"),availableModels:G.array(G.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:G.record(G.string(),G.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:G.boolean().optional().describe("Whether to automatically approve all MCP servers in the project"),enabledMcpjsonServers:G.array(G.string()).optional().describe("List of approved MCP servers from .mcp.json"),disabledMcpjsonServers:G.array(G.string()).optional().describe("List of rejected MCP servers from .mcp.json"),allowedMcpServers:G.array(yw()).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:G.array(Sw()).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:e1().optional().describe("Custom commands to run before/after tool executions"),autoFix:Cq.optional().describe("Auto-fix configuration: automatically run lint/test after AI file edits and feed errors back for self-repair."),worktree:G.object({symlinkDirectories:G.array(G.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:G.array(G.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."),baseRef:G.enum(["fresh","head"]).optional().describe('Base ref for new worktrees. "fresh" (default) branches from origin/<default-branch>; "head" branches from the current local HEAD.')}).optional().describe("Git worktree configuration for --worktree flag."),lsp:G.object({enabled:G.boolean().optional(),diagnosticsTimeoutMs:G.number().min(100).max(5000).optional().describe("Per-edit diagnostic injection timeout in ms (default 1500, min 100, max 5000). After FileEdit/FileWrite, Claudin waits up to this duration for the LSP server to publish diagnostics so they can be attached to the same turn.")}).optional().describe("LSP subsystem configuration. Set enabled:false to disable the entire LSP subsystem (default: true). Set diagnosticsTimeoutMs to tune per-edit diagnostic injection (default 1500). LSP servers themselves are provided exclusively by enabled plugins (.lsp.json)."),disableAllHooks:G.boolean().optional().describe("Disable all hooks and statusLine execution"),defaultShell:G.enum(["bash","powershell"]).optional().describe("Default shell for input-box ! commands. Defaults to 'bash' on all platforms (no Windows auto-flip)."),allowManagedHooksOnly:G.boolean().optional().describe("When true (and set in managed settings), only hooks from managed settings run. User, project, and local hooks are ignored."),allowedHttpHookUrls:G.array(G.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:G.array(G.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:G.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:G.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:G.preprocess((Z)=>Array.isArray(Z)?Z.filter((q)=>qV.includes(q)):Z,G.union([G.boolean(),G.array(G.enum(qV))])).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:G.object({type:G.literal("command"),command:G.string(),padding:G.number().optional()}).optional().describe("Custom status line display configuration"),enabledPlugins:G.record(G.string(),G.union([G.array(G.string()),G.boolean()])).optional().describe('Enabled plugins using plugin-id@marketplace-id format. Example: { "formatter@anthropic-tools": true }. Also supports extended format with version constraints.'),extraKnownMarketplaces:G.record(G.string(),Cw()).check((Z)=>{for(let[q,J]of Object.entries(Z.value))if(J.source.source==="settings"&&J.source.name!==q)Z.issues.push({code:"custom",input:J.source.name,path:[q,"source","name"],message:`Settings-sourced marketplace name must match its extraKnownMarketplaces key (got key "${q}" but source.name "${J.source.name}")`})}).optional().describe("Additional marketplaces to make available for this repository. Typically used in repository .claudin/settings.json to ensure team members have required plugin sources."),strictKnownMarketplaces:G.array(s2()).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:G.array(s2()).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:G.enum(["claudeai","console"]).optional().describe('Force a specific login method: "claudeai" for Claude Pro/Max, "console" for Console billing'),forceLoginOrgUUID:G.string().optional().describe("Organization UUID to use for OAuth login"),otelHeadersHelper:G.string().optional().describe("Path to a script that outputs OpenTelemetry headers"),outputStyle:G.string().optional().describe("Controls the output style for assistant responses"),language:G.string().optional().describe('Preferred language for Claude responses and voice dictation (e.g., "japanese", "spanish")'),skipWebFetchPreflight:G.boolean().optional().describe("Skip the WebFetch blocklist check for enterprise environments with restrictive security policies"),sandbox:qW().optional(),feedbackSurveyRate:G.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:G.boolean().optional().describe("Whether to show tips in the spinner"),spinnerVerbs:G.object({mode:G.enum(["append","replace"]),verbs:G.array(G.string())}).optional().describe('Customize spinner verbs. mode: "append" adds verbs to defaults, "replace" uses only your verbs.'),spinnerTipsOverride:G.object({excludeDefault:G.boolean().optional(),tips:G.array(G.string())}).optional().describe("Override spinner tips. tips: array of tip strings. excludeDefault: if true, only show custom tips (default: false)."),syntaxHighlightingDisabled:G.boolean().optional().describe("Whether to disable syntax highlighting in diffs"),terminalTitleFromRename:G.boolean().optional().describe("Whether /rename updates the terminal tab title (defaults to true). Set to false to keep auto-generated topic titles."),alwaysThinkingEnabled:G.boolean().optional().describe("When false, thinking is disabled. When absent or true, thinking is enabled automatically for supported models."),effortLevel:G.enum(["low","medium","high","xhigh","max","adaptive"]).optional().catch(void 0).describe("Persisted effort level for supported models. 'adaptive' sends no effort field so the model scales per request."),codingLoopXhighDefault:G.boolean().optional().catch(void 0).describe("When true, defaults effort to xhigh for Opus 4.8 (coding/high-autonomy loops). Overrides the medium default for Pro/Max/Team and ultrathink. Opus 4.8 only; other models are unaffected. Defaults to false."),advisorModel:G.string().optional().describe("Advisor model for the server-side advisor tool."),fastMode:G.boolean().optional().describe("When true, fast mode is enabled. When absent or false, fast mode is off."),fastModePerSessionOptIn:G.boolean().optional().describe("When true, fast mode does not persist across sessions. Each session starts with fast mode off."),promptSuggestionEnabled:G.boolean().optional().describe("When false, prompt suggestions are disabled. When absent or true, prompt suggestions are enabled."),showClearContextOnPlanAccept:G.boolean().optional().describe('When true, the plan-approval dialog offers a "clear context" option. Defaults to false.'),agent:G.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:G.array(G.string()).optional().describe("Company announcements to display at startup (one will be randomly selected if multiple are provided)"),pluginConfigs:G.record(G.string(),G.object({mcpServers:G.record(G.string(),G.record(G.string(),G.union([G.string(),G.number(),G.boolean(),G.array(G.string())]))).optional().describe("User configuration values for MCP servers keyed by server name"),options:G.record(G.string(),G.union([G.string(),G.number(),G.boolean(),G.array(G.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:G.object({defaultEnvironmentId:G.string().optional().describe("Default environment ID to use for remote sessions")}).optional().describe("Remote session configuration"),autoUpdatesChannel:G.enum(["latest","stable"]).optional().describe("Release channel for auto-updates (latest or stable)"),...{},minimumVersion:G.string().optional().describe("Minimum version to stay on - prevents downgrades when switching to stable channel"),plansDirectory:G.string().optional().describe("Custom directory for plan files, relative to project root. If not set, defaults to .claudin/plans/ in the project root."),...{},...{},...{},channelsEnabled:G.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:G.array(G.object({marketplace:G.string(),plugin:G.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:G.boolean().optional().describe("Reduce or disable animations for accessibility (spinner shimmer, flash effects, etc.)"),autoMemoryEnabled:G.boolean().optional().describe("Enable auto-memory for this project. When false, Claude will not read from or write to the auto-memory directory."),autoMemoryDirectory:G.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/."),autoMemoryProjectLocal:G.boolean().optional().describe("When true (the default), auto-memory for a git project defaults to <project>/.claudin/memory/ instead of the global ~/.claudin/projects/<sanitized-cwd>/memory/. Set to false to force the legacy global-only location. Ignored if set in projectSettings for security, same as autoMemoryDirectory."),autoDreamEnabled:G.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),showThinkingSummaries:G.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),skipDangerousModePermissionPrompt:G.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),...{skipAutoPermissionPrompt:G.boolean().optional().describe("Whether the user has accepted the auto mode opt-in dialog"),useAutoModeDuringPlan:G.boolean().optional().describe("Whether plan mode uses auto mode semantics when auto mode is available (default: true)"),autoMode:G.object({allow:G.array(G.string()).optional().describe("Rules for the auto mode classifier allow section"),soft_deny:G.array(G.string()).optional().describe("Rules for the auto mode classifier deny section"),environment:G.array(G.string()).optional().describe("Entries for the auto mode classifier environment section")}).optional().describe("Auto mode classifier prompt customization")},disableAutoMode:G.enum(["disable"]).optional().describe("Disable auto mode"),sshConfigs:G.array(G.object({id:G.string().describe("Unique identifier for this SSH config. Used to match configs across settings sources."),name:G.string().describe("Display name for the SSH connection"),sshHost:G.string().describe('SSH host in format "user@hostname" or "hostname", or a host alias from ~/.ssh/config'),sshPort:G.number().int().optional().describe("SSH port (default: 22)"),sshIdentityFile:G.string().optional().describe("Path to SSH identity file (private key)"),startDirectory:G.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:G.array(G.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:G.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 yq(){let Z=JV(v0(),{unrepresentable:"any"});return m(Z,null,2)}var XV=B(()=>{r0();z0();r2()});function QV(Z){let q=bw.find((X)=>X.matches(Z));if(!q)return null;let J={...q.tip};if(Z.code==="invalid_value"&&Z.enumValues&&!J.suggestion)J.suggestion=`Valid values: ${Z.enumValues.map((X)=>`"${X}"`).join(", ")}`;if(!J.docLink&&Z.path){let X=Z.path.split(".")[0];if(X)J.docLink=hw[X]}return J}var bw,hw;var $V=B(()=>{bw=[{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: "includeGitInstructions": 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'}}],hw={}});function YV(Z){return Z.code==="invalid_type"}function HV(Z){return Z.code==="invalid_value"}function gw(Z){return Z.code==="unrecognized_keys"}function GV(Z){return Z.code==="too_small"}function Sq(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 q=Z.match(/received (\w+)/);return q?q[1]:void 0}function t6(Z,q){return Z.issues.map((J)=>{let X=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??Sq(J.input),W=V??Sq(J.input)}else if(GV(J))H=String(J.minimum);else if(J.code==="custom"&&"params"in J)K=J.params.received,W=K;let U=QV({path:X,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)??Sq(J.input);if(J.expected==="object"&&V==="null"&&X==="")Q="Invalid or malformed JSON";else Q=`Expected ${J.expected}, but received ${V}`}else if(gw(J)){let V=J.keys.join(", ");Q=`Unrecognized ${iW(J.keys.length,"field")}: ${V}`}else if(GV(J))Q=`Number must be greater than or equal to ${J.minimum}`,$=String(J.minimum);return{file:q,path:X,message:Q,expected:$,invalidValue:W,suggestion:U?.suggestion,docLink:U?.docLink}})}function ta(Z){try{let q=Z0(Z),J=v0().strict().safeParse(q);if(J.success)return{isValid:!0};return{isValid:!1,error:`Settings validation failed:
92
- `+t6(J.error,"settings").map(($)=>`- ${$.path}: ${$.message}`).join(`
93
- `),fullSchema:yq()}}catch(q){return{isValid:!1,error:`Invalid JSON: ${q instanceof Error?q.message:"Unknown parsing error"}`,fullSchema:yq()}}}function S7(Z,q){if(!Z||typeof Z!=="object")return[];let J=Z;if(!J.permissions||typeof J.permissions!=="object")return[];let X=J.permissions,Q=[];for(let $ of["allow","deny","ask"]){let Y=X[$];if(!Array.isArray(Y))continue;X[$]=Y.filter((H)=>{if(typeof H!=="string")return Q.push({file:q,path:`permissions.${$}`,message:`Non-string value in ${$} array was removed`,invalidValue:H}),!1;let K=Eq(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:q,path:`permissions.${$}`,message:W,invalidValue:H}),!1}return!0})}return Q}var bq=B(()=>{z0();Nq();vq();XV();r2();$V()});import{userInfo as fw}from"os";function LV(){let Z="";try{Z=fw().username}catch{}let q=[];if(Z)q.push({path:`/Library/Managed Preferences/${Z}/${UV}.plist`,label:"per-user managed preferences"});return q.push({path:`/Library/Managed Preferences/${UV}.plist`,label:"device-level managed preferences"}),q}var UV="com.anthropic.claudecode",b7="HKLM\\SOFTWARE\\Policies\\ClaudeCode",h7="HKCU\\SOFTWARE\\Policies\\ClaudeCode",e6="Settings",WV="/usr/bin/plutil",VV,BV=5000;var hq=B(()=>{VV=["-convert","json","-o","-","--"]});import{execFile as mw}from"child_process";import{existsSync as uw}from"fs";function gq(Z,q){return new Promise((J)=>{mw(Z,q,{encoding:"utf-8",timeout:BV},(X,Q)=>{J({stdout:Q??"",code:X?1:0})})})}function g7(){return(async()=>{if(process.platform==="darwin"){let Z=LV(),J=(await Promise.all(Z.map(async({path:X,label:Q})=>{if(!uw(X))return{stdout:"",label:Q,ok:!1};let{stdout:$,code:Y}=await gq(WV,[...VV,X]);return{stdout:$,label:Q,ok:Y===0&&!!$}}))).find((X)=>X.ok);return{plistStdouts:J?[{stdout:J.stdout,label:J.label}]:[],hklmStdout:null,hkcuStdout:null}}if(process.platform==="win32"){let[Z,q]=await Promise.all([gq("reg",["query",b7,"/v",e6]),gq("reg",["query",h7,"/v",e6])]);return{plistStdouts:null,hklmStdout:Z.code===0?Z.stdout:null,hkcuStdout:q.code===0?q.stdout:null}}return{plistStdouts:null,hklmStdout:null,hkcuStdout:null}})()}function $o(){if(fq)return;fq=g7()}function _V(){return fq}var fq=null;var zV=B(()=>{hq()});import{join as RV}from"path";function pw(){if(f7)return;f7=(async()=>{Z2("mdm_load_start");let Z=Date.now(),q=_V()??g7(),{mdm:J,hkcu:X}=DV(await q);uq=J,pq=X,Z2("mdm_load_end");let Q=Date.now()-Z;if(P(`MDM settings load completed in ${Q}ms`),Object.keys(J.settings).length>0){P(`MDM settings found: ${Object.keys(J.settings).join(", ")}`);try{H0("info","mdm_settings_loaded",{duration_ms:Q,key_count:Object.keys(J.settings).length,error_count:J.errors.length})}catch{}}})()}async function Mo(){if(!f7)pw();await f7}function m7(){return uq??B1}function u7(){return pq??B1}function Do(Z,q){uq=Z,pq=q}async function Ao(){let Z=await g7();return DV(Z)}function mq(Z,q){let J=m0(Z,!1);if(!J||typeof J!=="object")return{settings:{},errors:[]};let X=S7(J,q),Q=v0().safeParse(J);if(!Q.success){let $=t6(Q.error,q);return{settings:{},errors:[...X,...$]}}return{settings:Q.data,errors:X}}function FV(Z,q="Settings"){let J=Z.split(/\r?\n/),X=q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Q=new RegExp(`^\\s+${X}\\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:q,label:J}=Z.plistStdouts[0],X=mq(q,J);if(Object.keys(X.settings).length>0)return{mdm:X,hkcu:B1}}if(Z.hklmStdout){let q=FV(Z.hklmStdout);if(q){let J=mq(q,`Registry: ${b7}\\${e6}`);if(Object.keys(J.settings).length>0)return{mdm:J,hkcu:B1}}}if(dw())return{mdm:B1,hkcu:B1};if(Z.hkcuStdout){let q=FV(Z.hkcuStdout);if(q){let J=mq(q,`Registry: ${h7}\\${e6}`);return{mdm:B1,hkcu:J}}}return{mdm:B1,hkcu:B1}}function dw(){try{let Z=RV(k1(),"managed-settings.json"),q=W1(Z),J=m0(q,!1);if(J&&typeof J==="object"&&Object.keys(J).length>0)return!0}catch{}try{let Z=a2(),q=N().readdirSync(Z);for(let J of q){if(!(J.isFile()||J.isSymbolicLink())||!J.name.endsWith(".json")||J.name.startsWith("."))continue;try{let X=W1(RV(Z,J.name)),Q=m0(X,!1);if(Q&&typeof Q==="object"&&Object.keys(Q).length>0)return!0}catch{}}}catch{}return!1}var B1,uq=null,pq=null,f7=null;var AV=B(()=>{K1();U2();g2();F0();O7();MV();k7();r2();bq();hq();zV();B1=Object.freeze({settings:{},errors:[]})});import{dirname as EV,join as p7,resolve as t2}from"path";function iq(){return p7(k1(),"managed-settings.json")}function aq(){let Z=[],q={},J=!1,{settings:X,errors:Q}=e2(iq());if(Z.push(...Q),X&&Object.keys(X).length>0)q=U1(q,X,Z6),J=!0;let $=a2();try{let Y=N().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}=e2(p7($,H));if(Z.push(...W),K&&Object.keys(K).length>0)q=U1(q,K,Z6),J=!0}}catch(Y){let H=W0(Y);if(H!=="ENOENT"&&H!=="ENOTDIR")S(Y)}return{settings:J?q:null,errors:Z}}function so(){let{settings:Z}=e2(iq()),q=!!Z&&Object.keys(Z).length>0,J=!1,X=a2();try{J=N().readdirSync(X).some((Q)=>(Q.isFile()||Q.isSymbolicLink())&&Q.name.endsWith(".json")&&!Q.name.startsWith("."))}catch{}return{hasBase:q,hasDropIns:J}}function vV(Z,q){if(typeof Z==="object"&&Z&&"code"in Z&&Z.code==="ENOENT")P(`Broken symlink or missing file encountered for settings.json at path: ${q}`);else S(Z)}function e2(Z){let q=kV(Z);if(q)return{settings:q.settings?cq(q.settings):null,errors:q.errors};let J=cw(Z);return NV(Z,J),{settings:J.settings?cq(J.settings):null,errors:J.errors}}function cw(Z){try{let{resolvedPath:q}=w1(N(),Z),J=W1(q);if(J.trim()==="")return{settings:{},errors:[]};let X=m0(J,!1),Q=S7(X,Z),$=v0().safeParse(X);if(!$.success){let Y=t6($.error,Z);return{settings:null,errors:[...Q,...Y]}}return{settings:$.data,errors:Q}}catch(q){return vV(q,Z),{settings:null,errors:[]}}}function TV(Z){switch(Z){case"userSettings":return t2(G0());case"policySettings":case"projectSettings":case"localSettings":return t2(q6());case"flagSettings":{let q=lq();return q?EV(t2(q)):t2(q6())}}}function lw(){if(PV()||q0(process.env.CLAUDE_CODE_USE_COWORK_PLUGINS))return"cowork_settings.json";return"settings.json"}function d7(Z){switch(Z){case"userSettings":return p7(TV(Z),lw());case"projectSettings":case"localSettings":return p7(TV(Z),CV(Z));case"policySettings":return iq();case"flagSettings":return lq()}}function CV(Z){switch(Z){case"projectSettings":return".claudin/settings.json";case"localSettings":return".claudin/settings.local.json"}}function p(Z){let q=OV(Z);if(q!==void 0)return q;let J=yV(Z);return wV(Z,J),J}function yV(Z){if(Z==="policySettings"){let X=M7();if(X&&Object.keys(X).length>0)return X;let Q=m7();if(Object.keys(Q.settings).length>0)return Q.settings;let{settings:$}=aq();if($)return $;let Y=u7();if(Object.keys(Y.settings).length>0)return Y.settings;return null}let q=d7(Z),{settings:J}=q?e2(q):{settings:null};if(Z==="flagSettings"){let X=nq();if(X){let Q=v0().safeParse(X);if(Q.success)return U1(J||{},Q.data,Z6)}}return J}function ro(){let Z=M7();if(Z&&Object.keys(Z).length>0)return"remote";let q=m7();if(Object.keys(q.settings).length>0)return f0()==="macos"?"plist":"hklm";let{settings:J}=aq();if(J)return"file";let X=u7();if(Object.keys(X.settings).length>0)return"hkcu";return null}function to(Z,q){if(Z==="policySettings"||Z==="flagSettings")return{error:null};let J=d7(Z);if(!J)return{error:null};try{N().mkdirSync(EV(J));let X=yV(Z);if(!X){let $=null;try{$=W1(J)}catch(Y){if(!p6(Y))throw Y}if($!==null){let Y=m0($);if(Y===null)return{error:Error(`Invalid JSON syntax in settings file at ${J}`)};if(Y&&typeof Y==="object")X=Y,P(`Using raw settings from ${J} due to validation failure`)}}let Q=U1(X||{},q,($,Y,H,K)=>{if(Y===void 0&&K&&typeof H==="string"){delete K[H];return}if(Array.isArray(Y))return Y;return});if(eU(J),d6(J,m(Q,null,2)+`
94
- `),m2(),Z==="localSettings")yU(CV("localSettings"),q6())}catch(X){let Q=Error(`Failed to read raw settings from ${J}: ${X}`);return S(Q),{error:Q}}return{error:null}}function nw(Z,q){return TU([...Z,...q])}function Z6(Z,q){if(Array.isArray(Z)&&Array.isArray(q))return nw(Z,q);return}function eo(Z){let q=v0().strip().parse(Z),J=["permissions","sandbox","hooks"],X=[],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(q))if(J.includes($)&&q[$]&&typeof q[$]==="object"){let Y=q[$],H=Q[$];if(H){for(let K of Object.keys(Y))if(H.has(K))X.push(`${$}.${K}`)}}else X.push($);return X.sort()}function iw(){if(dq)return{settings:{},errors:[]};let Z=Date.now();Z2("loadSettingsFromDisk_start"),H0("info","settings_load_started"),dq=!0;try{let q=xV(),J={};if(q)J=U1(J,q,Z6);let X=[],Q=new Set,$=new Set;for(let Y of i2()){if(Y==="policySettings"){let K=null,W=[],U=M7();if(U&&Object.keys(U).length>0){let V=v0().safeParse(U);if(V.success)K=V.data;else W.push(...t6(V.error,"remote managed settings"))}if(!K){let V=m7();if(Object.keys(V.settings).length>0)K=V.settings;W.push(...V.errors)}if(!K){let{settings:V,errors:L}=aq();if(V)K=V;W.push(...L)}if(!K){let V=u7();if(Object.keys(V.settings).length>0)K=V.settings;W.push(...V.errors)}if(K)J=U1(J,K,Z6);for(let V of W){let L=`${V.file}:${V.path}:${V.message}`;if(!Q.has(L))Q.add(L),X.push(V)}continue}let H=d7(Y);if(H){let K=t2(H);if(!$.has(K)){$.add(K);let{settings:W,errors:U}=e2(H);for(let V of U){let L=`${V.file}:${V.path}:${V.message}`;if(!Q.has(L))Q.add(L),X.push(V)}if(W)J=U1(J,W,Z6)}}if(Y==="flagSettings"){let K=nq();if(K){let W=v0().safeParse(K);if(W.success)J=U1(J,W.data,Z6)}}}return H0("info","settings_load_completed",{duration_ms:Date.now()-Z,source_count:$.size,error_count:X.length}),{settings:J,errors:X}}finally{dq=!1}}function c7(){let{settings:Z}=aw();return Z||{}}function qs(){m2();let Z=[];for(let q of i2()){let J=p(q);if(J&&Object.keys(J).length>0)Z.push({source:q,settings:J})}return{effective:c7(),sources:Z}}function aw(){let Z=jV();if(Z!==null)return Z;let q=iw();return Z2("loadSettingsFromDisk_end"),IV(q),q}function Js(){return!!(p("userSettings")?.skipDangerousModePermissionPrompt||p("localSettings")?.skipDangerousModePermissionPrompt||p("flagSettings")?.skipDangerousModePermissionPrompt||p("policySettings")?.skipDangerousModePermissionPrompt)}function Xs(){return!!(p("userSettings")?.permissions?.allowBypassPermissionsMode||p("localSettings")?.permissions?.allowBypassPermissionsMode||p("flagSettings")?.permissions?.allowBypassPermissionsMode||p("policySettings")?.permissions?.allowBypassPermissionsMode)}function Qs(){{let Z=p("userSettings")?.skipAutoPermissionPrompt,q=p("localSettings")?.skipAutoPermissionPrompt,J=p("flagSettings")?.skipAutoPermissionPrompt,X=p("policySettings")?.skipAutoPermissionPrompt,Q=!!(Z||q||J||X);return P(`[auto-mode] hasAutoModeOptIn=${Q} skipAutoPermissionPrompt: user=${Z} local=${q} flag=${J} policy=${X}`),Q}return!1}function $s(){return p("policySettings")?.useAutoModeDuringPlan!==!1&&p("flagSettings")?.useAutoModeDuringPlan!==!1&&p("userSettings")?.useAutoModeDuringPlan!==!1&&p("localSettings")?.useAutoModeDuringPlan!==!1}function Ys(){{let Z=G.object({allow:G.array(G.string()).optional(),soft_deny:G.array(G.string()).optional(),deny:G.array(G.string()).optional(),environment:G.array(G.string()).optional()}),q=[],J=[],X=[];for(let Q of["userSettings","localSettings","flagSettings","policySettings"]){let $=p(Q);if(!$)continue;let Y=Z.safeParse($.autoMode);if(Y.success){if(Y.data.allow)q.push(...Y.data.allow);if(Y.data.soft_deny)J.push(...Y.data.soft_deny);if(Y.data.environment)X.push(...Y.data.environment)}}if(q.length>0||J.length>0||X.length>0)return{...q.length>0&&{allow:q},...J.length>0&&{soft_deny:J},...X.length>0&&{environment:X}}}return}function Hs(Z){for(let q of i2()){if(q==="policySettings")continue;let J=d7(q);if(!J)continue;try{let{resolvedPath:X}=w1(N(),J),Q=W1(X);if(!Q.trim())continue;let $=m0(Q,!1);if($&&typeof $==="object"&&Z in $)return!0}catch(X){vV(X,J)}}return!1}var dq=!1,Zs;var SV=B(()=>{MU();r0();_6();AU();Qq();K1();U2();o0();o1();D7();g2();F0();SU();O7();k0();f6();z0();MV();Rq();ZW();k7();AV();DU();r2();bq();Zs=c7});import{cpSync as ow,readFileSync as sw,readdirSync as rw}from"fs";import{join as tw}from"path";function gV(Z,q){if(Z===q)return;if(hV(q))return;if(!hV(Z))return;try{ow(Z,q,{recursive:!0,force:!1,errorOnExist:!1})}catch(J){S(Error(`Failed to migrate auto-memory from ${Z} to ${q}: ${J instanceof Error?J.message:String(J)}`))}}function hV(Z){try{if(sw(tw(Z,bV),"utf-8").trim())return!0}catch{}try{return rw(Z,{withFileTypes:!0}).some((q)=>q.isFile()&&q.name.endsWith(".md")&&q.name!==bV)}catch{return!1}}var bV="MEMORY.md";var fV=B(()=>{k0()});import{chmodSync as ew}from"fs";import{homedir as Zk}from"os";import{isAbsolute as qk,join as Z4,normalize as oq,sep as l7}from"path";function dV(){let Z=process.env.CLAUDE_CODE_DISABLE_AUTO_MEMORY;if(q0(Z))return!1;if(pV(Z))return!0;if(q0(process.env.CLAUDE_CODE_SIMPLE))return!1;if(q0(process.env.CLAUDE_CODE_REMOTE)&&!process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return!1;let q=c7();if(q.autoMemoryEnabled!==void 0)return q.autoMemoryEnabled;return!0}function ws(){if(!s1("tengu_passport_quail",!1))return!1;return!uV()||s1("tengu_slate_thimble",!1)}function Jk(){if(process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR)return process.env.CLAUDE_CODE_REMOTE_MEMORY_DIR;return G0()}function cV(Z,q){if(!Z)return;let J=Z;if(q&&(J.startsWith("~/")||J.startsWith("~\\"))){let Q=J.slice(2),$=oq(Q||".");if($==="."||$==="..")return;J=Z4(Zk(),Q)}let X=oq(J).replace(/[/\\]+$/,"");if(!qk(X)||X.length<3||/^[A-Za-z]:$/.test(X)||X.startsWith("\\\\")||X.startsWith("//")||X.includes("\x00"))return;return(X+l7).normalize("NFC")}function lV(){return cV(process.env.CLAUDE_COWORK_MEMORY_PATH_OVERRIDE,!1)}function Qk(){let Z=p("policySettings")?.autoMemoryDirectory??p("flagSettings")?.autoMemoryDirectory??p("localSettings")?.autoMemoryDirectory??p("userSettings")?.autoMemoryDirectory;return cV(Z,!0)}function ks(){return lV()!==void 0}function $k(){return(p("policySettings")?.autoMemoryProjectLocal??p("flagSettings")?.autoMemoryProjectLocal??p("localSettings")?.autoMemoryProjectLocal??p("userSettings")?.autoMemoryProjectLocal)!==!1}function Yk(){return n1(q4())??q4()}function nV(){return Z4(J4(),Xk)}function Ns(Z){return oq(Z).startsWith(J4())}var mV="memory",Xk="MEMORY.md",J4;var sq=B(()=>{O1();_6();Hq();o0();L2();k0();V7();SV();F0();fV();J4=u(()=>{let Z=lV()??Qk();if(Z)return Z;let q=Z4(Jk(),"projects"),J=(Z4(q,iZ(Yk()),mV)+l7).normalize("NFC");if(!$k())return J;let X=n1(q4());if(!X)return J;let Q=(Z4(X,".claudin",mV)+l7).normalize("NFC");try{N().mkdirSync(Q,{mode:448})}catch(Y){return S(Y),J}let $=!1;try{let Y=N().realpathSync(X),H=N().realpathSync(Q);if($=H===Y||H.startsWith(Y+l7),!$)S(Error(`Auto-memory directory escapes project root via symlink: ${Q} -> ${H}`))}catch(Y){S(Y)}if(!$)return J;try{ew(Q,448)}catch{}return gV(J,Q),Q},()=>q4())});var aV=c((Ps,iV)=>{var N1=Y0("constants"),Hk=process.cwd,n7=null,Gk=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!n7)n7=Hk.call(process);return n7};try{process.cwd()}catch(Z){}if(typeof process.chdir==="function"){if(i7=process.chdir,process.chdir=function(Z){n7=null,i7.call(process,Z)},Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,i7)}var i7;iV.exports=Kk;function Kk(Z){if(N1.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./))q(Z);if(!Z.lutimes)J(Z);if(Z.chown=$(Z.chown),Z.fchown=$(Z.fchown),Z.lchown=$(Z.lchown),Z.chmod=X(Z.chmod),Z.fchmod=X(Z.fchmod),Z.lchmod=X(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(U,V,L){if(L)process.nextTick(L)},Z.lchmodSync=function(){};if(Z.chown&&!Z.lchown)Z.lchown=function(U,V,L,_){if(_)process.nextTick(_)},Z.lchownSync=function(){};if(Gk==="win32")Z.rename=typeof Z.rename!=="function"?Z.rename:function(U){function V(L,_,z){var R=Date.now(),D=0;U(L,_,function F(k){if(k&&(k.code==="EACCES"||k.code==="EPERM"||k.code==="EBUSY")&&Date.now()-R<60000){if(setTimeout(function(){Z.stat(_,function(M,O){if(M&&M.code==="ENOENT")U(L,_,F);else z(k)})},D),D<100)D+=10;return}if(z)z(k)})}if(Object.setPrototypeOf)Object.setPrototypeOf(V,U);return V}(Z.rename);Z.read=typeof Z.read!=="function"?Z.read:function(U){function V(L,_,z,R,D,F){var k;if(F&&typeof F==="function"){var M=0;k=function(O,T,I){if(O&&O.code==="EAGAIN"&&M<10)return M++,U.call(Z,L,_,z,R,D,k);F.apply(this,arguments)}}return U.call(Z,L,_,z,R,D,k)}if(Object.setPrototypeOf)Object.setPrototypeOf(V,U);return V}(Z.read),Z.readSync=typeof Z.readSync!=="function"?Z.readSync:function(U){return function(V,L,_,z,R){var D=0;while(!0)try{return U.call(Z,V,L,_,z,R)}catch(F){if(F.code==="EAGAIN"&&D<10){D++;continue}throw F}}}(Z.readSync);function q(U){U.lchmod=function(V,L,_){U.open(V,N1.O_WRONLY|N1.O_SYMLINK,L,function(z,R){if(z){if(_)_(z);return}U.fchmod(R,L,function(D){U.close(R,function(F){if(_)_(D||F)})})})},U.lchmodSync=function(V,L){var _=U.openSync(V,N1.O_WRONLY|N1.O_SYMLINK,L),z=!0,R;try{R=U.fchmodSync(_,L),z=!1}finally{if(z)try{U.closeSync(_)}catch(D){}else U.closeSync(_)}return R}}function J(U){if(N1.hasOwnProperty("O_SYMLINK")&&U.futimes)U.lutimes=function(V,L,_,z){U.open(V,N1.O_SYMLINK,function(R,D){if(R){if(z)z(R);return}U.futimes(D,L,_,function(F){U.close(D,function(k){if(z)z(F||k)})})})},U.lutimesSync=function(V,L,_){var z=U.openSync(V,N1.O_SYMLINK),R,D=!0;try{R=U.futimesSync(z,L,_),D=!1}finally{if(D)try{U.closeSync(z)}catch(F){}else U.closeSync(z)}return R};else if(U.futimes)U.lutimes=function(V,L,_,z){if(z)process.nextTick(z)},U.lutimesSync=function(){}}function X(U){if(!U)return U;return function(V,L,_){return U.call(Z,V,L,function(z){if(W(z))z=null;if(_)_.apply(this,arguments)})}}function Q(U){if(!U)return U;return function(V,L){try{return U.call(Z,V,L)}catch(_){if(!W(_))throw _}}}function $(U){if(!U)return U;return function(V,L,_,z){return U.call(Z,V,L,_,function(R){if(W(R))R=null;if(z)z.apply(this,arguments)})}}function Y(U){if(!U)return U;return function(V,L,_){try{return U.call(Z,V,L,_)}catch(z){if(!W(z))throw z}}}function H(U){if(!U)return U;return function(V,L,_){if(typeof L==="function")_=L,L=null;function z(R,D){if(D){if(D.uid<0)D.uid+=4294967296;if(D.gid<0)D.gid+=4294967296}if(_)_.apply(this,arguments)}return L?U.call(Z,V,L,z):U.call(Z,V,z)}}function K(U){if(!U)return U;return function(V,L){var _=L?U.call(Z,V,L):U.call(Z,V);if(_){if(_.uid<0)_.uid+=4294967296;if(_.gid<0)_.gid+=4294967296}return _}}function W(U){if(!U)return!0;if(U.code==="ENOSYS")return!0;var V=!process.getuid||process.getuid()!==0;if(V){if(U.code==="EINVAL"||U.code==="EPERM")return!0}return!1}}});var rV=c((Es,sV)=>{var oV=Y0("stream").Stream;sV.exports=Uk;function Uk(Z){return{ReadStream:q,WriteStream:J};function q(X,Q){if(!(this instanceof q))return new q(X,Q);oV.call(this);var $=this;this.path=X,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(U,V){if(U){$.emit("error",U),$.readable=!1;return}$.fd=V,$.emit("open",V),$._read()})}function J(X,Q){if(!(this instanceof J))return new J(X,Q);oV.call(this),this.path=X,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 eV=c((vs,tV)=>{tV.exports=Vk;var Wk=Object.getPrototypeOf||function(Z){return Z.__proto__};function Vk(Z){if(Z===null||typeof Z!=="object")return Z;if(Z instanceof Object)var q={__proto__:Wk(Z)};else var q=Object.create(null);return Object.getOwnPropertyNames(Z).forEach(function(J){Object.defineProperty(q,J,Object.getOwnPropertyDescriptor(Z,J))}),q}});var qJ=c((Cs,ZJ)=>{var o=Y0("fs"),Bk=aV(),Lk=rV(),_k=eV(),a7=Y0("util"),V0,s7;if(typeof Symbol==="function"&&typeof Symbol.for==="function")V0=Symbol.for("graceful-fs.queue"),s7=Symbol.for("graceful-fs.previous");else V0="___graceful-fs.queue",s7="___graceful-fs.previous";function zk(){}function qB(Z,q){Object.defineProperty(Z,V0,{get:function(){return q}})}var J6=zk;if(a7.debuglog)J6=a7.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))J6=function(){var Z=a7.format.apply(a7,arguments);Z="GFS4: "+Z.split(/\n/).join(`
95
- GFS4: `),console.error(Z)};if(!o[V0]){if(rq=global[V0]||[],qB(o,rq),o.close=function(Z){function q(J,X){return Z.call(o,J,function(Q){if(!Q)ZB();if(typeof X==="function")X.apply(this,arguments)})}return Object.defineProperty(q,s7,{value:Z}),q}(o.close),o.closeSync=function(Z){function q(J){Z.apply(o,arguments),ZB()}return Object.defineProperty(q,s7,{value:Z}),q}(o.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))process.on("exit",function(){J6(o[V0]),Y0("assert").equal(o[V0].length,0)})}var rq;if(!global[V0])qB(global,o[V0]);ZJ.exports=tq(_k(o));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!o.__patched)ZJ.exports=tq(o),o.__patched=!0;function tq(Z){Bk(Z),Z.gracefulify=tq,Z.createReadStream=T,Z.createWriteStream=I;var q=Z.readFile;Z.readFile=J;function J(w,x,v){if(typeof x==="function")v=x,x=null;return g(w,x,v);function g(t,E,C,d){return q(t,E,function(f){if(f&&(f.code==="EMFILE"||f.code==="ENFILE"))q2([g,[t,E,C],f,d||Date.now(),Date.now()]);else if(typeof C==="function")C.apply(this,arguments)})}}var X=Z.writeFile;Z.writeFile=Q;function Q(w,x,v,g){if(typeof v==="function")g=v,v=null;return t(w,x,v,g);function t(E,C,d,f,K0){return X(E,C,d,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))q2([t,[E,C,d,f],l,K0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}var $=Z.appendFile;if($)Z.appendFile=Y;function Y(w,x,v,g){if(typeof v==="function")g=v,v=null;return t(w,x,v,g);function t(E,C,d,f,K0){return $(E,C,d,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))q2([t,[E,C,d,f],l,K0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}var H=Z.copyFile;if(H)Z.copyFile=K;function K(w,x,v,g){if(typeof v==="function")g=v,v=0;return t(w,x,v,g);function t(E,C,d,f,K0){return H(E,C,d,function(l){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))q2([t,[E,C,d,f],l,K0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}var W=Z.readdir;Z.readdir=V;var U=/^v[0-5]\./;function V(w,x,v){if(typeof x==="function")v=x,x=null;var g=U.test(process.version)?function(C,d,f,K0){return W(C,t(C,d,f,K0))}:function(C,d,f,K0){return W(C,d,t(C,d,f,K0))};return g(w,x,v);function t(E,C,d,f){return function(K0,l){if(K0&&(K0.code==="EMFILE"||K0.code==="ENFILE"))q2([g,[E,C,d],K0,f||Date.now(),Date.now()]);else{if(l&&l.sort)l.sort();if(typeof d==="function")d.call(this,K0,l)}}}}if(process.version.substr(0,4)==="v0.8"){var L=Lk(Z);F=L.ReadStream,M=L.WriteStream}var _=Z.ReadStream;if(_)F.prototype=Object.create(_.prototype),F.prototype.open=k;var z=Z.WriteStream;if(z)M.prototype=Object.create(z.prototype),M.prototype.open=O;Object.defineProperty(Z,"ReadStream",{get:function(){return F},set:function(w){F=w},enumerable:!0,configurable:!0}),Object.defineProperty(Z,"WriteStream",{get:function(){return M},set:function(w){M=w},enumerable:!0,configurable:!0});var R=F;Object.defineProperty(Z,"FileReadStream",{get:function(){return R},set:function(w){R=w},enumerable:!0,configurable:!0});var D=M;Object.defineProperty(Z,"FileWriteStream",{get:function(){return D},set:function(w){D=w},enumerable:!0,configurable:!0});function F(w,x){if(this instanceof F)return _.apply(this,arguments),this;else return F.apply(Object.create(F.prototype),arguments)}function k(){var w=this;b(w.path,w.flags,w.mode,function(x,v){if(x){if(w.autoClose)w.destroy();w.emit("error",x)}else w.fd=v,w.emit("open",v),w.read()})}function M(w,x){if(this instanceof M)return z.apply(this,arguments),this;else return M.apply(Object.create(M.prototype),arguments)}function O(){var w=this;b(w.path,w.flags,w.mode,function(x,v){if(x)w.destroy(),w.emit("error",x);else w.fd=v,w.emit("open",v)})}function T(w,x){return new Z.ReadStream(w,x)}function I(w,x){return new Z.WriteStream(w,x)}var A=Z.open;Z.open=b;function b(w,x,v,g){if(typeof v==="function")g=v,v=null;return t(w,x,v,g);function t(E,C,d,f,K0){return A(E,C,d,function(l,rx){if(l&&(l.code==="EMFILE"||l.code==="ENFILE"))q2([t,[E,C,d,f],l,K0||Date.now(),Date.now()]);else if(typeof f==="function")f.apply(this,arguments)})}}return Z}function q2(Z){J6("ENQUEUE",Z[0].name,Z[1]),o[V0].push(Z),eq()}var o7;function ZB(){var Z=Date.now();for(var q=0;q<o[V0].length;++q)if(o[V0][q].length>2)o[V0][q][3]=Z,o[V0][q][4]=Z;eq()}function eq(){if(clearTimeout(o7),o7=void 0,o[V0].length===0)return;var Z=o[V0].shift(),q=Z[0],J=Z[1],X=Z[2],Q=Z[3],$=Z[4];if(Q===void 0)J6("RETRY",q.name,J),q.apply(null,J);else if(Date.now()-Q>=60000){J6("TIMEOUT",q.name,J);var Y=J.pop();if(typeof Y==="function")Y.call(null,X)}else{var H=Date.now()-$,K=Math.max($-Q,1),W=Math.min(K*1.2,100);if(H>=W)J6("RETRY",q.name,J),q.apply(null,J.concat([Q]));else o[V0].push(Z)}if(o7===void 0)o7=setTimeout(eq,0)}});var XB=c((ys,JB)=>{function C0(Z,q){if(typeof q==="boolean")q={forever:q};if(this._originalTimeouts=JSON.parse(JSON.stringify(Z)),this._timeouts=Z,this._options=q||{},this._maxRetryTime=q&&q.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)}JB.exports=C0;C0.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};C0.prototype.stop=function(){if(this._timeout)clearTimeout(this._timeout);this._timeouts=[],this._cachedTimeouts=null};C0.prototype.retry=function(Z){if(this._timeout)clearTimeout(this._timeout);if(!Z)return!1;var q=new Date().getTime();if(Z&&q-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 X=this,Q=setTimeout(function(){if(X._attempts++,X._operationTimeoutCb){if(X._timeout=setTimeout(function(){X._operationTimeoutCb(X._attempts)},X._operationTimeout),X._options.unref)X._timeout.unref()}X._fn(X._attempts)},J);if(this._options.unref)Q.unref();return!0};C0.prototype.attempt=function(Z,q){if(this._fn=Z,q){if(q.timeout)this._operationTimeout=q.timeout;if(q.cb)this._operationTimeoutCb=q.cb}var J=this;if(this._operationTimeoutCb)this._timeout=setTimeout(function(){J._operationTimeoutCb()},J._operationTimeout);this._operationStart=new Date().getTime(),this._fn(this._attempts)};C0.prototype.try=function(Z){console.log("Using RetryOperation.try() is deprecated"),this.attempt(Z)};C0.prototype.start=function(Z){console.log("Using RetryOperation.start() is deprecated"),this.attempt(Z)};C0.prototype.start=C0.prototype.try;C0.prototype.errors=function(){return this._errors};C0.prototype.attempts=function(){return this._attempts};C0.prototype.mainError=function(){if(this._errors.length===0)return null;var Z={},q=null,J=0;for(var X=0;X<this._errors.length;X++){var Q=this._errors[X],$=Q.message,Y=(Z[$]||0)+1;if(Z[$]=Y,Y>=J)q=Q,J=Y}return q}});var $B=c((Fk)=>{var Rk=XB();Fk.operation=function(Z){var q=Fk.timeouts(Z);return new Rk(q,{forever:Z&&Z.forever,unref:Z&&Z.unref,maxRetryTime:Z&&Z.maxRetryTime})};Fk.timeouts=function(Z){if(Z instanceof Array)return[].concat(Z);var q={retries:10,factor:2,minTimeout:1000,maxTimeout:1/0,randomize:!1};for(var J in Z)q[J]=Z[J];if(q.minTimeout>q.maxTimeout)throw Error("minTimeout is greater than maxTimeout");var X=[];for(var Q=0;Q<q.retries;Q++)X.push(this.createTimeout(Q,q));if(Z&&Z.forever&&!X.length)X.push(this.createTimeout(Q,q));return X.sort(function($,Y){return $-Y}),X};Fk.createTimeout=function(Z,q){var J=q.randomize?Math.random()+1:1,X=Math.round(J*q.minTimeout*Math.pow(q.factor,Z));return X=Math.min(X,q.maxTimeout),X};Fk.wrap=function(Z,q,J){if(q instanceof Array)J=q,q=null;if(!J){J=[];for(var X in Z)if(typeof Z[X]==="function")J.push(X)}for(var Q=0;Q<J.length;Q++){var $=J[Q],Y=Z[$];Z[$]=function(K){var W=Fk.operation(q),U=Array.prototype.slice.call(arguments,1),V=U.pop();U.push(function(L){if(W.retry(L))return;if(L)arguments[0]=W.mainError();V.apply(this,arguments)}),W.attempt(function(){K.apply(Z,U)})}.bind(Z,Y),Z[$].options=q}}});var YB=c((bs,r7)=>{r7.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32")r7.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")r7.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var HB=c((hs,X2)=>{var n=global.process,X6=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(!X6(n))X2.exports=function(){return function(){}};else{if(JJ=Y0("assert"),Q6=YB(),XJ=/^win/i.test(n.platform),J2=Y0("events"),typeof J2!=="function")J2=J2.EventEmitter;if(n.__signal_exit_emitter__)X0=n.__signal_exit_emitter__;else X0=n.__signal_exit_emitter__=new J2,X0.count=0,X0.emitted={};if(!X0.infinite)X0.setMaxListeners(1/0),X0.infinite=!0;X2.exports=function(Z,q){if(!X6(global.process))return function(){};if(JJ.equal(typeof Z,"function","a callback must be provided for exit handler"),$6===!1)t7();var J="exit";if(q&&q.alwaysLast)J="afterexit";var X=function(){if(X0.removeListener(J,Z),X0.listeners("exit").length===0&&X0.listeners("afterexit").length===0)X4()};return X0.on(J,Z),X},X4=function(){if(!$6||!X6(global.process))return;$6=!1,Q6.forEach(function(q){try{n.removeListener(q,Q4[q])}catch(J){}}),n.emit=$4,n.reallyExit=e7,X0.count-=1},X2.exports.unload=X4,x1=function(q,J,X){if(X0.emitted[q])return;X0.emitted[q]=!0,X0.emit(q,J,X)},Q4={},Q6.forEach(function(Z){Q4[Z]=function(){if(!X6(global.process))return;var J=n.listeners(Z);if(J.length===X0.count){if(X4(),x1("exit",null,Z),x1("afterexit",null,Z),XJ&&Z==="SIGHUP")Z="SIGINT";n.kill(n.pid,Z)}}}),X2.exports.signals=function(){return Q6},$6=!1,t7=function(){if($6||!X6(global.process))return;$6=!0,X0.count+=1,Q6=Q6.filter(function(q){try{return n.on(q,Q4[q]),!0}catch(J){return!1}}),n.emit=$J,n.reallyExit=QJ},X2.exports.load=t7,e7=n.reallyExit,QJ=function(q){if(!X6(global.process))return;n.exitCode=q||0,x1("exit",n.exitCode,null),x1("afterexit",n.exitCode,null),e7.call(n,n.exitCode)},$4=n.emit,$J=function(q,J){if(q==="exit"&&X6(global.process)){if(J!==void 0)n.exitCode=J;var X=$4.apply(this,arguments);return x1("exit",n.exitCode,null),x1("afterexit",n.exitCode,null),X}else return $4.apply(this,arguments)}}var JJ,Q6,XJ,J2,X0,X4,x1,Q4,$6,t7,e7,QJ,$4,$J});var KB=c((Ik,YJ)=>{var GB=Symbol();function Tk(Z,q,J){let X=q[GB];if(X)return q.stat(Z,($,Y)=>{if($)return J($);J(null,Y.mtime,X)});let Q=new Date(Math.ceil(Date.now()/1000)*1000+5);q.utimes(Z,Q,Q,($)=>{if($)return J($);q.stat(Z,(Y,H)=>{if(Y)return J(Y);let K=H.mtime.getTime()%1000===0?"s":"ms";Object.defineProperty(q,GB,{value:K}),J(null,H.mtime,K)})})}function jk(Z){let q=Date.now();if(Z==="s")q=Math.ceil(q/1000)*1000;return new Date(q)}Ik.probe=Tk;Ik.getMtime=jk});var LB=c((Ck,H4)=>{var kk=Y0("path"),KJ=qJ(),Nk=$B(),xk=HB(),UB=KB(),L1={};function Y4(Z,q){return q.lockfilePath||`${Z}.lock`}function UJ(Z,q,J){if(!q.realpath)return J(null,kk.resolve(Z));q.fs.realpath(Z,J)}function GJ(Z,q,J){let X=Y4(Z,q);q.fs.mkdir(X,(Q)=>{if(!Q)return UB.probe(X,q.fs,($,Y,H)=>{if($)return q.fs.rmdir(X,()=>{}),J($);J(null,Y,H)});if(Q.code!=="EEXIST")return J(Q);if(q.stale<=0)return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));q.fs.stat(X,($,Y)=>{if($){if($.code==="ENOENT")return GJ(Z,{...q,stale:0},J);return J($)}if(!WB(Y,q))return J(Object.assign(Error("Lock file is already being held"),{code:"ELOCKED",file:Z}));VB(Z,q,(H)=>{if(H)return J(H);GJ(Z,{...q,stale:0},J)})})})}function WB(Z,q){return Z.mtime.getTime()<Date.now()-q.stale}function VB(Z,q,J){q.fs.rmdir(Y4(Z,q),(X)=>{if(X&&X.code!=="ENOENT")return J(X);J()})}function Z5(Z,q){let J=L1[Z];if(J.updateTimeout)return;if(J.updateDelay=J.updateDelay||q.update,J.updateTimeout=setTimeout(()=>{J.updateTimeout=null,q.fs.stat(J.lockfilePath,(X,Q)=>{let $=J.lastUpdate+q.stale<Date.now();if(X){if(X.code==="ENOENT"||$)return HJ(Z,J,Object.assign(X,{code:"ECOMPROMISED"}));return J.updateDelay=1000,Z5(Z,q)}if(J.mtime.getTime()!==Q.mtime.getTime())return HJ(Z,J,Object.assign(Error("Unable to update lock within the stale threshold"),{code:"ECOMPROMISED"}));let H=UB.getMtime(J.mtimePrecision);q.fs.utimes(J.lockfilePath,H,H,(K)=>{let W=J.lastUpdate+q.stale<Date.now();if(J.released)return;if(K){if(K.code==="ENOENT"||W)return HJ(Z,J,Object.assign(K,{code:"ECOMPROMISED"}));return J.updateDelay=1000,Z5(Z,q)}J.mtime=H,J.lastUpdate=Date.now(),J.updateDelay=null,Z5(Z,q)})})},J.updateDelay),J.updateTimeout.unref)J.updateTimeout.unref()}function HJ(Z,q,J){if(q.released=!0,q.updateTimeout)clearTimeout(q.updateTimeout);if(L1[Z]===q)delete L1[Z];q.options.onCompromised(J)}function Pk(Z,q,J){q={stale:1e4,update:null,realpath:!0,retries:0,fs:KJ,onCompromised:(X)=>{throw X},...q},q.retries=q.retries||0,q.retries=typeof q.retries==="number"?{retries:q.retries}:q.retries,q.stale=Math.max(q.stale||0,2000),q.update=q.update==null?q.stale/2:q.update||0,q.update=Math.max(Math.min(q.update,q.stale/2),1000),UJ(Z,q,(X,Q)=>{if(X)return J(X);let $=Nk.operation(q.retries);$.attempt(()=>{GJ(Q,q,(Y,H,K)=>{if($.retry(Y))return;if(Y)return J($.mainError());let W=L1[Q]={lockfilePath:Y4(Q,q),mtime:H,mtimePrecision:K,options:q,lastUpdate:Date.now()};Z5(Q,q),J(null,(U)=>{if(W.released)return U&&U(Object.assign(Error("Lock is already released"),{code:"ERELEASED"}));BB(Q,{...q,realpath:!1},U)})})})})}function BB(Z,q,J){q={fs:KJ,realpath:!0,...q},UJ(Z,q,(X,Q)=>{if(X)return J(X);let $=L1[Q];if(!$)return J(Object.assign(Error("Lock is not acquired/owned by you"),{code:"ENOTACQUIRED"}));$.updateTimeout&&clearTimeout($.updateTimeout),$.released=!0,delete L1[Q],VB(Q,q,J)})}function Ek(Z,q,J){q={stale:1e4,realpath:!0,fs:KJ,...q},q.stale=Math.max(q.stale||0,2000),UJ(Z,q,(X,Q)=>{if(X)return J(X);q.fs.stat(Y4(Q,q),($,Y)=>{if($)return $.code==="ENOENT"?J(null,!1):J($);return J(null,!WB(Y,q))})})}function vk(){return L1}xk(()=>{for(let Z in L1){let q=L1[Z].options;try{q.fs.rmdirSync(Y4(Z,q))}catch(J){}}});Ck.lock=Pk;Ck.unlock=BB;Ck.check=Ek;Ck.getLocks=vk});var zB=c((gs,_B)=>{var gk=qJ();function fk(Z){let q=["mkdir","realpath","stat","rmdir","utimes"],J={...Z};return q.forEach((X)=>{J[X]=(...Q)=>{let $=Q.pop(),Y;try{Y=Z[`${X}Sync`](...Q)}catch(H){return $(H)}$(null,Y)}}),J}function mk(Z){return(...q)=>new Promise((J,X)=>{q.push((Q,$)=>{if(Q)X(Q);else J($)}),Z(...q)})}function uk(Z){return(...q)=>{let J,X;if(q.push((Q,$)=>{J=Q,X=$}),Z(...q),J)throw J;return X}}function pk(Z){if(Z={...Z},Z.fs=fk(Z.fs||gk),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}_B.exports={toPromise:mk,toSync:uk,toSyncOptions:pk}});var FB=c((fs,P1)=>{var Q2=LB(),{toPromise:q5,toSync:J5,toSyncOptions:WJ}=zB();async function RB(Z,q){let J=await q5(Q2.lock)(Z,q);return q5(J)}function dk(Z,q){let J=J5(Q2.lock)(Z,WJ(q));return J5(J)}function ck(Z,q){return q5(Q2.unlock)(Z,q)}function lk(Z,q){return J5(Q2.unlock)(Z,WJ(q))}function nk(Z,q){return q5(Q2.check)(Z,q)}function ik(Z,q){return J5(Q2.check)(Z,WJ(q))}P1.exports=RB;P1.exports.lock=RB;P1.exports.unlock=ck;P1.exports.lockSync=dk;P1.exports.unlockSync=lk;P1.exports.check=nk;P1.exports.checkSync=ik});function BJ(){if(!VJ)VJ=FB();return VJ}function ms(Z,q){return BJ().lock(Z,q)}function MB(Z,q){return BJ().lockSync(Z,q)}function us(Z,q){return BJ().check(Z,q)}var VJ;var DB=()=>{};function G4(Z){if(Z===void 0)return!1;let q=Z.trim().toLowerCase();return q==="0"||q==="false"||q==="no"||q==="off"||q===""}function ok(){let Z=process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC,q=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&G4(Z)||q!==void 0&&G4(q)){if(process.env.DISABLE_TELEMETRY&&!G4(process.env.DISABLE_TELEMETRY))return"no-telemetry";return"default"}return"essential-traffic"}function LJ(){return ok()==="essential-traffic"}function _J(){if(!LJ())return null;let Z=process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC;if(Z!==void 0&&!G4(Z))return"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC";let q=process.env.ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC;if(q!==void 0&&!G4(q))return"ANTHROPIC_DISABLE_NONESSENTIAL_TRAFFIC";return"claudin-default"}function AB(){let Z=_J();return Z==="claudin-default"?null:Z}var zJ=()=>{};import{dirname as sk,join as TB}from"path";function IB(Z){return[TB(Z,X5),TB(Z,jB)]}function rk(Z,q){let[J,X]=IB(Z);return q(J)?J:X}function tk(Z,q){return IB(Z).some((J)=>q(J))}function cs(Z,q){let J=Z;while(!0){if(tk(J,q))return rk(J,q);let X=sk(J);if(X===J)return null;J=X}}function ls(Z){return Z===X5||Z===jB}var X5="AGENTS.md",jB="CLAUDE.md";var OB=()=>{};var ek,ZN;var wB=B(()=>{ek=["auto","iterm2","iterm2_with_bell","terminal_bell","kitty","ghostty","os_native","notifications_disabled"],ZN=["normal","vim"]});var CB={};Mq(CB,{validateTeamMemWritePath:()=>GN,validateTeamMemKey:()=>KN,isTeamMemoryEnabled:()=>xB,isTeamMemPath:()=>vB,isTeamMemLikelyGitIgnored:()=>HN,isTeamMemFile:()=>UN,getTeamMemPath:()=>U4,getTeamMemEntrypoint:()=>QN,PathTraversalError:()=>_0});import{readFileSync as qN}from"fs";import{lstat as JN,realpath as NB}from"fs/promises";import{dirname as kB,join as K4,resolve as RJ,sep as FJ}from"path";function XN(Z){if(Z.includes("\x00"))throw new _0(`Null byte in path key: "${Z}"`);let q;try{q=decodeURIComponent(Z)}catch{q=Z}if(q!==Z&&(q.includes("..")||q.includes("/")))throw new _0(`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 _0(`Unicode-normalized traversal in path key: "${Z}"`);if(Z.includes("\\"))throw new _0(`Backslash in path key: "${Z}"`);if(Z.startsWith("/"))throw new _0(`Absolute path key: "${Z}"`);return Z}function xB(){if(!dV())return!1;return s1("tengu_herring_clock",!0)}function U4(){return(K4(J4(),"team")+FJ).normalize("NFC")}function QN(){return K4(J4(),"team","MEMORY.md")}async function PB(Z){let q=[],J=Z;for(let X=kB(J);J!==X;X=kB(J))try{let Q=await NB(J);return q.length===0?Q:K4(Q,...q.reverse())}catch(Q){let $=W0(Q);if($==="ENOENT")try{if((await JN(J)).isSymbolicLink())throw new _0(`Dangling symlink detected (target does not exist): "${J}"`)}catch(Y){if(Y instanceof _0)throw Y}else if($==="ELOOP")throw new _0(`Symlink loop detected in path: "${J}"`);else if($!=="ENOTDIR"&&$!=="ENAMETOOLONG")throw new _0(`Cannot verify path containment (${$}): "${J}"`);q.push(J.slice(X.length+FJ.length)),J=X}return Z}async function EB(Z){let q;try{q=await NB(U4().replace(/[/\\]+$/,""))}catch(J){let X=W0(J);if(X==="ENOENT"||X==="ENOTDIR")return!0;return!1}if(Z===q)return!0;return Z.startsWith(q+FJ)}function vB(Z){let q=RJ(Z),J=U4();return q.startsWith(J)}async function GN(Z){if(Z.includes("\x00"))throw new _0(`Null byte in path: "${Z}"`);let q=RJ(Z),J=U4();if(!q.startsWith(J))throw new _0(`Path escapes team memory directory: "${Z}"`);let X=await PB(q);if(!await EB(X))throw new _0(`Path escapes team memory directory via symlink: "${Z}"`);return q}async function KN(Z){XN(Z);let q=U4(),J=K4(q,Z),X=RJ(J);if(!X.startsWith(q))throw new _0(`Key escapes team memory directory: "${Z}"`);let Q=await PB(X);if(!await EB(Q))throw new _0(`Key escapes team memory directory via symlink: "${Z}"`);return X}function UN(Z){return xB()&&vB(Z)}var _0,$N,YN,HN;var yB=B(()=>{O1();Hq();o1();sq();_0=class _0 extends Error{constructor(Z){super(Z);this.name="PathTraversalError"}};$N=/^\/?\.claudin\/?$/,YN=/^!\/?\.claudin\/memory\/team\/?/,HN=u((Z)=>{try{let q=qN(K4(Z,".gitignore"),"utf-8"),J=!1;for(let X of q.split(`
96
- `)){let Q=X.trim();if(!Q||Q.startsWith("#"))continue;if($N.test(Q))J=!0;else if(YN.test(Q))J=!1}return J}catch{return!1}})});import{randomBytes as WN}from"crypto";import{unwatchFile as VN,watchFile as BN}from"fs";import{basename as U5,dirname as W5,join as D0,resolve as Y5}from"path";function _1(){return{numStartups:0,installMethod:void 0,autoUpdates:void 0,theme:"dark",preferredNotifChannel:"auto",verbose:!1,editorMode:"normal",autoCompactEnabled:!0,collapseSubagentProgress:!0,summarizeSubagentResult:!1,thinkingHistoryRedactionEnabled:!0,narrationHistoryRedactionEnabled:!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,inlineImagesMode:"auto",autoBackgroundAgentsEnabled:!0,workflowsDefaultBackground:!1}}function kr(Z){return _N.includes(Z)}function Nr(){hB=!1}function xr(){return hB||=RN()}function RN(){if(bB())return!0;let Z=Q0(),q=wJ();if(Z.projects?.[q]?.hasTrustDialogAccepted)return!0;let X=a1(r());while(!0){if(Z.projects?.[X]?.hasTrustDialogAccepted)return!0;let $=a1(Y5(X,".."));if($===X)break;X=$}return!1}function Pr(Z){let q=Q0(),J=a1(Y5(Z));while(!0){if(q.projects?.[J]?.hasTrustDialogAccepted)return!0;let X=a1(Y5(J,".."));if(X===J)return!1;J=X}}function Er(){return}function vr(){return}function Cr(Z){return zN.includes(Z)}function B5(Z){let q=t0.config;if(!q)return!1;let J=q.oauthAccount!==void 0&&Z.oauthAccount===void 0,X=q.hasCompletedOnboarding===!0&&Z.hasCompletedOnboarding!==!0;return J||X}function gB(Z){return TJ.add(Z),()=>TJ.delete(Z)}function H5(){for(let Z of TJ)try{Z()}catch{}}function jJ(Z){return{...Z,projects:DN(Z.projects)}}function A0(Z){let q=null;try{if(mB(L0(),_1,(X)=>{let Q=Z(X);if(Q===X)return X;return q=jJ(Q),q})&&q)G5(q),H5()}catch(J){let X=W0(J);if(X==="EACCES"||X==="EPERM"||X==="EROFS"){P(`Skipping global config write due to permission error: ${J}`,{level:"error"});return}P(`Failed to save config with lock: ${J}`,{level:"error"});let Q=H6(L0(),_1);if(B5(Q)){P("saveGlobalConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),s0("tengu_config_auth_loss_prevented",{});return}let $=Z(Q);if($===Q)return;q=jJ($),fB(L0(),q,V5),G5(q),H5()}}function yr(){return OJ}function MN(){let Z=W4+$5;if(Z>0)s0("tengu_config_cache_stats",{cache_hits:W4,cache_misses:$5,hit_rate:W4/Z});W4=0,$5=0}function IJ(Z){if(Z.installMethod!==void 0)return Z;let q=Z,J="unknown",X=Z.autoUpdates??!0;switch(q.autoUpdaterStatus){case"migrated":J="local";break;case"installed":J="native";break;case"disabled":X=!1;break;case"enabled":case"no_permissions":case"not_configured":J="global";break;case void 0:break}return{...Z,installMethod:J,autoUpdates:X}}function DN(Z){if(!Z)return Z;let q={},J=!1;for(let[X,Q]of Object.entries(Z)){let $=Q;if($.history!==void 0){J=!0;let{history:Y,...H}=$;q[X]=H}else q[X]=Q}return J?q:Z}function TN(){if(AJ)return;AJ=!0;let Z=L0();BN(Z,{interval:AN,persistent:!1},(q)=>{if(q.mtimeMs<=t0.mtime)return;N().readFile(Z,{encoding:"utf-8"}).then((J)=>{if(q.mtimeMs<=t0.mtime)return;let X=m0(E0(J));if(X===null||typeof X!=="object")return;t0={config:IJ({..._1(),...X}),mtime:q.mtimeMs},E1={mtime:q.mtimeMs,size:q.size}}).catch(()=>{})}),V2(async()=>{VN(Z),AJ=!1})}function G5(Z){t0={config:Z,mtime:Date.now()},E1=null}function Q0(){if(t0.config)return W4++,t0.config;$5++;try{let Z=null;try{Z=N().statSync(L0())}catch{}let q=IJ(H6(L0(),_1));return t0={config:q,mtime:Z?.mtimeMs??Date.now()},E1=Z?{mtime:Z.mtimeMs,size:Z.size}:null,TN(),q}catch{return IJ(H6(L0(),_1))}}function br(){let Z=Q0().remoteControlAtStartup;if(Z!==void 0)return Z;return!1}function hr(Z){let q=Q0();if(q.customApiKeyResponses?.approved?.includes(Z))return"approved";if(q.customApiKeyResponses?.rejected?.includes(Z))return"rejected";return"new"}function fB(Z,q,J){let X=W5(Z);N().mkdirSync(X);let $=p5(q,(Y,H)=>m(Y)!==m(J[H]));if(d6(Z,m($,null,2),{encoding:"utf-8",mode:384}),Z===L0())OJ++}function mB(Z,q,J){let X=q(),Q=W5(Z),$=N();$.mkdirSync(Q);let Y;try{let H=`${Z}.lock`,K=Date.now();Y=MB(Z,{lockfilePath:H,onCompromised:(_)=>{P(`Config lock compromised: ${_}`,{level:"error"})}});let W=Date.now()-K;if(W>100)P("Lock acquisition took longer than expected - another Claude instance may be running"),s0("tengu_config_lock_contention",{lock_time_ms:W});if(E1&&Z===L0())try{let _=$.statSync(Z);if(_.mtimeMs!==E1.mtime||_.size!==E1.size)s0("tengu_config_stale_write",{read_mtime:E1.mtime,write_mtime:_.mtimeMs,read_size:E1.size,write_size:_.size})}catch(_){if(W0(_)!=="ENOENT")throw _}let U=H6(Z,q);if(Z===L0()&&B5(U))return P("saveConfigWithLock: re-read config is missing auth that cache has; refusing to write to avoid wiping ~/.claudin/config.json. See GH #3117.",{level:"error"}),s0("tengu_config_auth_loss_prevented",{}),!1;let V=J(U);if(V===U)return!1;let L=p5(V,(_,z)=>m(_)!==m(X[z]));try{let _=U5(Z),z=L5();try{$.mkdirSync(z)}catch(I){if(W0(I)!=="EEXIST")throw I}let R=60000,D=$.readdirStringSync(z).filter((I)=>I.startsWith(`${_}.backup.`)).sort().reverse(),F=D[0],k=F?Number(F.split(".backup.").pop()):0,M=Number.isNaN(k)||Date.now()-k>=R,O=jN(Z),T=M&&O;if(T){let I=D0(z,`${_}.backup.${Date.now()}`);$.copyFileSync(Z,I)}if(O){let A=T?$.readdirStringSync(z).filter((b)=>b.startsWith(`${_}.backup.`)).sort().reverse():D;for(let b of A.slice(5))try{$.unlinkSync(D0(z,b))}catch{}}}catch(_){if(W0(_)!=="ENOENT")P(`Failed to backup config: ${_}`,{level:"error"})}if(d6(Z,m(L,null,2),{encoding:"utf-8",mode:384}),Z===L0())OJ++;return!0}finally{if(Y)Y()}}function gr(){return K5}function fr(){if(K5)return;let Z=Date.now();H0("info","enable_configs_started"),K5=!0,H6(L0(),_1,!0),H0("info","enable_configs_completed",{duration_ms:Date.now()-Z})}function L5(){return D0(G0(),"backups")}function SB(Z){let q=N(),J=U5(Z),X=L5();try{let Y=q.readdirStringSync(X).filter((H)=>H.startsWith(`${J}.backup.`)).sort().at(-1);if(Y)return D0(X,Y)}catch{}let Q=W5(Z);try{let Y=q.readdirStringSync(Q).filter((K)=>K.startsWith(`${J}.backup.`)).sort().at(-1);if(Y)return D0(Q,Y);let H=`${Z}.backup`;try{return q.statSync(H),H}catch{}}catch{}return null}function jN(Z){let q=N();try{return Z0(E0(q.readFileSync(Z,{encoding:"utf-8"}))),!0}catch{return!1}}function IN(Z,q){let J=N(),X=U5(Z),Q=new Set;for(let $ of[L5(),W5(Z)]){let Y;try{Y=J.readdirStringSync($).filter((H)=>H.startsWith(`${X}.backup.`)).sort().reverse()}catch{continue}for(let H of Y){let K=D0($,H);if(Q.has(K))continue;Q.add(K);try{let W=Z0(E0(J.readFileSync(K,{encoding:"utf-8"})));return{config:{...q(),...W},backupPath:K}}catch{}}}return null}function H6(Z,q,J){if(!K5)throw Error("Config accessed before allowed.");let X=N();try{let Q=X.readFileSync(Z,{encoding:"utf-8"});try{let $=Z0(E0(Q));return{...q(),...$}}catch($){let Y=$ instanceof Error?$.message:String($);throw new Q5(Y,Z,q())}}catch(Q){if(W0(Q)==="ENOENT"){let Y=SB(Z);if(Y)process.stderr.write(`
97
- Claude configuration file not found at: ${Z}
98
- A backup file exists at: ${Y}
99
- You can manually restore it by running: cp "${Y}" "${Z}"
100
-
101
- `);return q()}if(Q instanceof Q5&&J)throw Q;if(Q instanceof Q5){if(P(`Config file corrupted, resetting to defaults: ${Q.message}`,{level:"error"}),!MJ){MJ=!0;try{S(Q);let z=!1;try{X.statSync(`${Z}.backup`),z=!0}catch{}s0("tengu_config_parse_error",{has_backup:z})}finally{MJ=!1}}process.stderr.write(`
102
- Claude configuration file at ${Z} is corrupted: ${Q.message}
103
- `);let Y=U5(Z),H=L5();try{X.mkdirSync(H)}catch(z){if(W0(z)!=="EEXIST")throw z}let K=X.readdirStringSync(H).filter((z)=>z.startsWith(`${Y}.corrupted.`)),W,U=!1,V=X.readFileSync(Z,{encoding:"utf-8"});for(let z of K)try{let R=X.readFileSync(D0(H,z),{encoding:"utf-8"});if(V===R){U=!0;break}}catch{}if(!U){W=D0(H,`${Y}.corrupted.${Date.now()}`);try{X.copyFileSync(Z,W),P(`Corrupted config backed up to: ${W}`,{level:"error"})}catch{}}let L=IN(Z,q);if(L){if(W)process.stderr.write(`The corrupted file has been backed up to: ${W}
104
- `);let z=!1;try{X.copyFileSync(L.backupPath,Z),z=!0}catch{}return process.stderr.write(z?`Recovered configuration from backup: ${L.backupPath}
105
-
106
- `:`Recovered configuration from backup (in memory): ${L.backupPath}
107
-
108
- `),L.config}let _=SB(Z);if(W)process.stderr.write(`The corrupted file has been backed up to: ${W}
109
- `);else if(U)process.stderr.write(`The corrupted file has already been backed up.
110
- `);if(_)process.stderr.write(`A backup file exists at: ${_}
111
- You can manually restore it by running: cp "${_}" "${Z}"
112
-
113
- `);else process.stderr.write(`
114
- `)}return q()}}function wJ(){let Z=q6(),q=Y6.get(Z);if(q!==void 0)return Y6.delete(Z),Y6.set(Z,q),q;let J=n1(Z),X=J?a1(J):a1(Y5(Z));if(Y6.size>=ON){let Q=Y6.keys().next().value;if(Q!==void 0)Y6.delete(Q)}return Y6.set(Z,X),X}function _5(){let Z=wJ(),q=Q0();if(!q.projects)return $2;let J=q.projects[Z]??$2;if(typeof J.allowedTools==="string")J.allowedTools=m0(J.allowedTools)??[];return J}function kJ(Z){let q=wJ(),J=null;try{if(mB(L0(),_1,(Q)=>{let $=Q.projects?.[q]??$2,Y=Z($);if(Y===$)return Q;return J={...Q,projects:{...Q.projects,[q]:Y}},J})&&J)G5(J),H5()}catch(X){P(`Failed to save config with lock: ${X}`,{level:"error"});let Q=H6(L0(),_1);if(B5(Q)){P("saveCurrentProjectConfig fallback: re-read config is missing auth that cache has; refusing to write. See GH #3117.",{level:"error"}),s0("tengu_config_auth_loss_prevented",{});return}let $=Q.projects?.[q]??$2,Y=Z($);if(Y===$)return;J={...Q,projects:{...Q.projects,[q]:Y}},fB(L0(),J,V5),G5(J),H5()}}function wN(){return kN()!==null}function mr(){return wN()&&!q0(process.env.FORCE_AUTOUPDATE_PLUGINS)}function ur(Z){switch(Z.type){case"development":return"development build";case"env":return`${Z.envVar} set`;case"config":return"config"}}function kN(Z){if(q0(process.env.DISABLE_AUTOUPDATER))return{type:"env",envVar:"DISABLE_AUTOUPDATER"};let q=Z?.ignoreClaudinDefaultPrivacy?AB():_J();if(q)return{type:"env",envVar:q};let J=Q0();if(J.autoUpdates===!1&&(J.installMethod!=="native"||J.autoUpdatesProtectedForNative!==!0))return{type:"config"};return null}function pr(){let Z=Q0();if(Z.userID)return Z.userID;let q=WN(32).toString("hex");return A0((J)=>({...J,userID:q})),q}function dr(){if(!Q0().firstStartTime){let q=new Date().toISOString();A0((J)=>({...J,firstStartTime:J.firstStartTime??q}))}}function cr(Z){let q=q6();switch(Z){case"User":return D0(G0(),"CLAUDE.md");case"Local":return D0(q,"CLAUDE.local.md");case"Project":return D0(q,X5);case"Managed":return D0(k1(),"CLAUDE.md");case"AutoMem":return nV()}return LN.getTeamMemEntrypoint()}function lr(){return D0(k1(),".claudin","rules")}function nr(){return D0(G0(),"rules")}function sr(Z){t0.config=Z,t0.mtime=Z?Date.now():0}var LN,MJ=!1,$2,wr,V5,_N,zN,hB=!1,FN,DJ,TJ,t0,E1=null,W4=0,$5=0,OJ=0,Sr=20,AN=1000,AJ=!1,K5=!1,ON=32,Y6,ir,ar,or;var NJ=B(()=>{ZQ();_6();sq();xU();Z1();GQ();K1();U2();Fq();o0();o1();D7();F0();L2();O7();F7();DB();k0();V7();zJ();k7();OB();z0();wB();LN=(yB(),V4(CB)),$2={allowedTools:[],mcpContextUris:[],mcpServers:{},enabledMcpjsonServers:[],disabledMcpjsonServers:[],hasTrustDialogAccepted:!1,projectOnboardingSeenCount:0,hasClaudeMdExternalIncludesApproved:!1,hasClaudeMdExternalIncludesWarningShown:!1},wr=["off","compact","full"];V5=_1(),_N=["apiKeyHelper","installMethod","autoUpdates","autoUpdatesProtectedForNative","theme","verbose","preferredNotifChannel","shiftEnterKeyBindingInstalled","editorMode","hasUsedBackslashReturn","autoCompactEnabled","thinkingHistoryRedactionEnabled","narrationHistoryRedactionEnabled","toolResultSummarizerEnabled","showTurnDuration","showCacheStats","diffTool","env","tipsHistory","todoFeatureEnabled","showExpandedTodos","messageIdleNotifThresholdMs","autoConnectIde","autoInstallIdeExtension","fileCheckpointingEnabled","terminalProgressBarEnabled","showStatusInTerminalTab","taskCompleteNotifEnabled","inputNeededNotifEnabled","agentPushNotifEnabled","respectGitignore","copyFullResponse","copyOnSelect","flickerFreeMode","permissionExplainerEnabled","prStatusFooterEnabled","prStatusHosts","remoteControlAtStartup","remoteDialogSeen","knowledgeGraphEnabled","bashOutputFilterEnabled","bashOutputFilterRewriteEnabled","bashOutputFilterUserEnabled","autoBackgroundAgentsEnabled","workflowsDefaultBackground","oauthBrowser","inlineImagesMode"];zN=["allowedTools","hasTrustDialogAccepted","hasCompletedProjectOnboarding"];FN={...V5,autoUpdates:!1,knowledgeGraphEnabled:!0};DJ={...$2};TJ=new Set;t0={config:null,mtime:0};V2(async()=>{MN()});Y6=new Map;ir=H6,ar=B5,or=jJ});function z5(Z){return Z.split(/[;,]/).map((q)=>q.trim()).filter((q)=>q.length>0)}function uB(Z){let q=z5(Z);return q.length>0?q[0]:Z.trim()}var xJ=()=>{};import{randomBytes as NN}from"crypto";function Y2(Z){return Z?.trim()??""}function B0(Z){let q=Y2(Z);return q.length>0?q:void 0}function xN(Z){return Y2(Z).replace(/\/+$/,"")}function PN(Z){switch(Z){case"anthropic":case"mistral":case"gemini":case"bedrock":case"vertex":case"foundry":return Z;default:return"openai"}}function EN(Z){if(Z==="low"||Z==="medium"||Z==="high"||Z==="xhigh")return Z;return}function vN(Z){if(!Z||typeof Z!=="object"||Array.isArray(Z))return;let q={};for(let[J,X]of Object.entries(Z)){let Q=Y2(J),$=typeof X==="string"?X.trim():"";if(Q.length>0&&$.length>0)q[Q]=$}return Object.keys(q).length>0?q:void 0}function CN(Z){if(!Z||typeof Z!=="object")return;let q={},J=B0(Z.codexAuthPath);if(J)q.codexAuthPath=J;let X=B0(Z.codexAccountId);if(X)q.codexAccountId=X;let Q=B0(Z.githubToken);if(Q)q.githubToken=Q;let $=B0(Z.awsRegion);if($)q.awsRegion=$;let Y=B0(Z.gcpProject);if(Y)q.gcpProject=Y;let H=B0(Z.gcpRegion);if(H)q.gcpRegion=H;let K=B0(Z.azureResource);if(K)q.azureResource=K;let W=vN(Z.customHeaders);if(W)q.customHeaders=W;let U=EN(Z.reasoningEffort);if(U)q.reasoningEffort=U;return Object.keys(q).length>0?q:void 0}function nB(Z){let q=Y2(Z.id),J=Y2(Z.name),X=PN(Z.provider),Q=xN(Z.baseUrl),$=Y2(Z.model);if(!q||!J||!Q||X!=="anthropic"&&!$)return null;let H={id:q,name:J,provider:X,baseUrl:Q,model:$,apiKey:B0(Z.apiKey)},K=CN(Z.extras);if(K)H.extras=K;return H}function yN(Z){let q=new Set,J=[];for(let X of Z??[]){let Q=nB(X);if(!Q||q.has(Q.id))continue;q.add(Q.id),J.push(Q)}return J}function SN(){return`provider_${NN(6).toString("hex")}`}function iB(Z,q=SN()){return nB({id:q,provider:Z.provider??"openai",name:Z.name,baseUrl:Z.baseUrl,model:Z.model,apiKey:Z.apiKey,extras:Z.extras})}function aB(Z,q=Q0()){return q.openaiAdditionalModelOptionsCacheByProfile?.[Z]??[]}function Xt(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"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"opencode-zen":return{provider:"openai",name:"OpenCode Zen",baseUrl:"https://opencode.ai/zen/v1",model:"glm-5.1",apiKey:"",requiresApiKey:!0};case"opencode-go":return{provider:"openai",name:"OpenCode GO",baseUrl:"https://opencode.ai/zen/go/v1",model:"glm-5.1",apiKey:"",requiresApiKey:!0};case"zai":return{provider:"openai",name:"Z.AI (GLM Coding Plan)",baseUrl:"https://api.z.ai/api/coding/paas/v4",model:"glm-5.2",apiKey:"",requiresApiKey:!0};case"cloudflare-workers-ai":return{provider:"openai",name:"Cloudflare Workers AI",baseUrl:"https://api.cloudflare.com/client/v4/accounts/YOUR-ACCOUNT-ID/ai/v1",model:"@cf/meta/llama-3.3-70b-instruct-fp8-fast",apiKey:"",requiresApiKey:!0};case"cloudflare-ai-gateway":return{provider:"openai",name:"Cloudflare AI Gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/YOUR-ACCOUNT-ID/default/compat",model:"workers-ai/@cf/meta/llama-3.3-70b-instruct-fp8-fast",apiKey:"",requiresApiKey:!0};case"ollama":default:return{provider:"openai",name:"Ollama",baseUrl:pB,model:dB,apiKey:"",requiresApiKey:!1}}}function u0(Z=Q0()){return yN(Z.providerProfiles)}function Qt(Z=Q0()){return u0(Z).length>0}function z1(Z=Q0()){let q=u0(Z);if(q.length===0)return;let J=B0(_5().activeProviderProfileId);if(J){let Q=q.find(($)=>$.id===J);if(Q)return Q}let X=B0(Z.activeProviderProfileId);return q.find((Q)=>Q.id===X)??q[0]}function $t(){let Z=B0(_5().activeProviderProfileId);if(!Z)return;return u0().some((J)=>J.id===Z)?Z:void 0}function bN(){return B0(_5().activeProviderProfileId)}function Yt(){return bN()!==void 0}function hN(){return B0(Q0().activeProviderProfileId)}function Ht(Z,q){let J=iB(Z);if(!J)return null;let X=q?.makeActive??!0;if(A0((Q)=>{let Y=[...u0(Q),J],H=B0(Q.activeProviderProfileId),K=X||!H||!Y.some((W)=>W.id===H)?J.id:H;return{...Q,providerProfiles:Y,activeProviderProfileId:K}}),hN()===J.id)fN(J.id),uN();return J}function Gt(Z,q){let J=iB(q,Z);if(!J)return null;let X=!1;if(A0((Q)=>{let $=u0(Q),Y=$.findIndex((L)=>L.id===Z);if(Y<0)return Q;X=!0;let H=[...$];H[Y]=J;let K={...Q.openaiAdditionalModelOptionsCacheByProfile??{}};delete K[Z];let W=B0(Q.activeProviderProfileId),U=W&&H.some((L)=>L.id===W)?W:H[0]?.id;return{...Q,providerProfiles:H,activeProviderProfileId:U,openaiAdditionalModelOptionsCacheByProfile:K,openaiAdditionalModelOptionsCache:U===Z?[]:Q.openaiAdditionalModelOptionsCache}}),!X)return null;return J}function Kt(Z){let q=B0(Z);if(!q)return null;let J=z1();if(!J)return null;if(z5(J.model).includes(q))return J;A0(($)=>{let Y=u0($),H=Y.findIndex((V)=>V.id===J.id);if(H<0)return $;let K=Y[H];if(K.model===q)return $;let W=[...Y];W[H]={...K,model:q};let U={...$.openaiAdditionalModelOptionsCacheByProfile??{}};return delete U[J.id],{...$,providerProfiles:W,openaiAdditionalModelOptionsCacheByProfile:U,openaiAdditionalModelOptionsCache:[]}});let Q=z1();if(!Q||Q.id!==J.id)return null;return Q}function Ut(){let Z=z1();if(!Z)return;A0((q)=>{let J=u0(q),X=J.findIndex((H)=>H.id===Z.id);if(X<0)return q;let Q=J[X];if(!Q.model)return q;let $=[...J];$[X]={...Q,model:""};let Y={...q.openaiAdditionalModelOptionsCacheByProfile??{}};return delete Y[Z.id],{...q,providerProfiles:$,openaiAdditionalModelOptionsCacheByProfile:Y,openaiAdditionalModelOptionsCache:[]}})}function gN(Z){let q=z5(Z.model);if(q.length===0)return[];return q.map((J)=>({value:J,label:J,description:`Provider: ${Z.name}`}))}function PJ(Z,q){let J=gN(Z);return{openaiAdditionalModelOptionsCache:J.length>0?J:aB(Z.id,q),openaiAdditionalModelOptionsCacheByProfile:{...q.openaiAdditionalModelOptionsCacheByProfile??{},[Z.id]:J.length>0?J:q.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[]}}}function fN(Z){let q=Q0(),X=u0(q).find((Q)=>Q.id===Z);if(!X)return null;return A0((Q)=>({...Q,activeProviderProfileId:Z,...PJ(X,Q)})),X}function Wt(Z){if(Z===null){kJ(($)=>({...$,activeProviderProfileId:void 0,activeModelForProject:void 0,activeModelForProjectProfileId:void 0}));let Q=z1();if(Q)cB(Q);return null}let J=u0().find((Q)=>Q.id===Z);if(!J)return null;let X=!1;if(kJ((Q)=>{if(!u0().some((H)=>H.id===Z))return X=!0,Q;let Y={...Q,activeProviderProfileId:Z};if(Q.activeProviderProfileId!==Z)Y.activeModelForProject=void 0,Y.activeModelForProjectProfileId=void 0;return Y}),X)return null;return cB(J),J}function cB(Z){let q=Q0(),J=PJ(Z,q),X=q.openaiAdditionalModelOptionsCache??[],Q=q.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[],$=J.openaiAdditionalModelOptionsCacheByProfile?.[Z.id]??[];if(lB(X,J.openaiAdditionalModelOptionsCache??[])&&lB(Q,$))return;A0((Y)=>({...Y,...PJ(Z,Y)}))}function lB(Z,q){if(Z.length!==q.length)return!1;for(let J=0;J<Z.length;J++)if(Z[J]!==q[J])return!1;return!0}function mN(Z,q){if(!Z)return{projects:Z,stripped:[]};let J=($)=>{let Y=$?.activeProviderProfileId;return Y!=null&&q(Y)?Y:void 0};if(!Object.values(Z).some(($)=>J($)!==void 0))return{projects:Z,stripped:[]};let X=[];return{projects:Object.fromEntries(Object.entries(Z).map(([$,Y])=>{let H=J(Y);if(H!==void 0){let{activeProviderProfileId:K,activeModelForProject:W,activeModelForProjectProfileId:U,...V}=Y;return X.push({path:$,activeProviderProfileId:H,activeModelForProject:W??void 0}),[$,V]}return[$,Y]})),stripped:X}}function Vt(Z){let q=!1,J;return A0((X)=>{let Q=u0(X);if(!Q.find((L)=>L.id===Z))return X;q=!0;let Y=Q.filter((L)=>L.id!==Z),H=B0(X.activeProviderProfileId),W=!H||H===Z||!Y.some((L)=>L.id===H)?Y[0]?.id:H;if(W)J=Y.find((L)=>L.id===W)??Y[0];let U={...X.openaiAdditionalModelOptionsCacheByProfile??{}};delete U[Z];let{projects:V}=mN(X.projects,(L)=>L===Z);return{...X,providerProfiles:Y,activeProviderProfileId:W,openaiAdditionalModelOptionsCacheByProfile:U,openaiAdditionalModelOptionsCache:W?aB(W,{...X,openaiAdditionalModelOptionsCacheByProfile:U}):[],projects:V}}),{removed:q,activeProfileId:J?.id}}function Bt(Z=Q0()){let q=z1(Z);if(!q)return Z.openaiAdditionalModelOptionsCache??[];let J=Z.openaiAdditionalModelOptionsCacheByProfile?.[q.id];if(J)return J;if(Object.keys(Z.openaiAdditionalModelOptionsCacheByProfile??{}).length===0)return Z.openaiAdditionalModelOptionsCache??[];return[]}function Lt(Z){let q=z1();if(!q){A0((J)=>({...J,openaiAdditionalModelOptionsCache:Z}));return}A0((J)=>({...J,openaiAdditionalModelOptionsCache:Z,openaiAdditionalModelOptionsCacheByProfile:{...J.openaiAdditionalModelOptionsCacheByProfile??{},[q.id]:Z}}))}function uN(){let Z=z1();if(!Z){A0((q)=>({...q,openaiAdditionalModelOptionsCache:[]}));return}A0((q)=>{let J={...q.openaiAdditionalModelOptionsCacheByProfile??{}};return delete J[Z.id],{...q,openaiAdditionalModelOptionsCache:[],openaiAdditionalModelOptionsCacheByProfile:J}})}var pB="http://localhost:11434/v1",dB="llama3.1:8b";var oB=B(()=>{NJ();xJ()});function R5(Z,q){return{name:`${Z.name}-with-${q.name}-fallback`,read(){let J=Z.read();if(J!==null&&J!==void 0)return J;return q.read()||{}},async readAsync(){let J=await Z.readAsync();if(J!==null&&J!==void 0)return J;return await q.readAsync()||{}},update(J){let X=Z.read(),Q=Z.update(J);if(Q.success){if(X===null)q.delete();return Q}let $=q.update(J);if($.success){if(X!==null)Z.delete();return{success:!0,warning:$.warning}}return{success:!1}},delete(){let J=Z.delete(),X=q.delete();return J||X}}}var sB=()=>{};function F5(Z,q,J=10*tB*rB){let W=[];try{let X;if(q===void 0)X={};else if(q instanceof AbortSignal)X={abortSignal:q,timeout:J};else X=q;let{abortSignal:Q,timeout:$=10*tB*rB,input:Y,stdio:H=["ignore","pipe","pipe"]}=X;Q?.throwIfAborted();const K=b6(W,Y7`exec: ${Z.slice(0,200)}`,0);try{let _=P0(Z,{env:process.env,maxBuffer:1e6,timeout:$,cwd:r(),stdio:H,shell:!0,reject:!1,input:Y});if(!_.stdout)return null;return _.stdout.trim()||null}catch{return null}}catch(U){var V=U,L=1}finally{h6(W,V,L)}}var rB=1000,tB=60;var EJ=B(()=>{S6();Z1();z0()});import{createHash as pN}from"crypto";import{userInfo as dN}from"os";function G6(Z=""){let q=G0(),X=!process.env.CLAUDIN_CONFIG_DIR?"":`-${pN("sha256").update(q).digest("hex").substring(0,8)}`;return`Claude Code${eB().OAUTH_FILE_SUFFIX}${Z}${X}`}function B4(Z=""){return G6(Z)}function O0(){try{return process.env.USER||dN().username}catch{return"claude-code-user"}}function CJ(){$0.cache={data:null,cachedAt:0},$0.generation++,$0.readInFlight=null}function wt(Z){if($0.cache.cachedAt!==0)return;let q=null;if(Z)try{q=JSON.parse(Z)}catch{return}$0.cache={data:q,cachedAt:Date.now()}}var p0="-credentials",vJ=30000,$0;var M5=B(()=>{KW();o0();$0={cache:{data:null,cachedAt:0},generation:0,readInFlight:null}});async function lN(){try{let Z=B4(p0),q=O0(),{stdout:J,code:X}=await i("security",["find-generic-password","-a",q,"-w","-s",Z],{useCwd:!1,preserveOutputOnError:!1});if(X===0&&J)return Z0(J.trim())}catch(Z){}return null}function yt(){if(H2!==void 0)return H2;if(process.platform!=="darwin")return H2=!1,!1;try{H2=P0("security",["show-keychain-info"],{reject:!1,stdio:["ignore","pipe","pipe"]}).exitCode===36}catch{H2=!1}return H2}var cN=4032,yJ,H2;var ZL=B(()=>{S6();K1();W7();EJ();z0();M5();yJ={name:"keychain",read(){let Z=$0.cache;if(Date.now()-Z.cachedAt<vJ)return Z.data;try{let q=B4(p0),J=O0(),X=F5(`security find-generic-password -a "${J}" -w -s "${q}"`);if(X){let Q=Z0(X);return $0.cache={data:Q,cachedAt:Date.now()},Q}}catch(q){}if(Z.data!==null)return P("[keychain] read failed; serving stale cache",{level:"warn"}),$0.cache={data:Z.data,cachedAt:Date.now()},Z.data;return $0.cache={data:null,cachedAt:Date.now()},null},async readAsync(){let Z=$0.cache;if(Date.now()-Z.cachedAt<vJ)return Z.data;if($0.readInFlight)return $0.readInFlight;let q=$0.generation,J=lN().then((X)=>{if(q===$0.generation){if(X===null&&Z.data!==null)P("[keychain] readAsync failed; serving stale cache",{level:"warn"});let Q=X??Z.data;return $0.cache={data:Q,cachedAt:Date.now()},$0.readInFlight=null,Q}return X});return $0.readInFlight=J,J},update(Z){CJ();try{let q=B4(p0),J=O0(),X=m(Z),Q=Buffer.from(X,"utf-8").toString("hex"),$=`add-generic-password -U -a "${J}" -s "${q}" -X "${Q}"
115
- `,Y;if($.length<=cN)Y=P0("security",["-i"],{input:$,stdio:["pipe","pipe","pipe"],reject:!1});else P(`Keychain payload (${X.length}B JSON) exceeds security -i stdin limit; using argv`,{level:"warn"}),Y=P0("security",["add-generic-password","-U","-a",J,"-s",q,"-X",Q],{stdio:["ignore","pipe","pipe"],reject:!1});if(Y.exitCode!==0)return{success:!1};return $0.cache={data:Z,cachedAt:Date.now()},{success:!0}}catch(q){return{success:!1}}},delete(){CJ();try{let Z=B4(p0),q=O0();return F5(`security delete-generic-password -a "${q}" -s "${Z}"`),!0}catch(Z){return!1}}}});var SJ;var qL=B(()=>{S6();z0();M5();SJ={name:"libsecret",read(){try{let Z=O0(),q=G6(p0),J=P0("secret-tool",["lookup","service",q,"account",Z],{reject:!1});if(J.exitCode===0&&J.stdout)return Z0(J.stdout)}catch{}return null},async readAsync(){return this.read()},update(Z){try{let q=O0(),J=G6(p0),X=m(Z);return{success:P0("secret-tool",["store","--label",J,"service",J,"account",q],{input:X,reject:!1}).exitCode===0}}catch{return{success:!1}}},delete(){try{let Z=O0(),q=G6(p0);return P0("secret-tool",["clear","service",q,"account",Z],{reject:!1}).exitCode===0}catch{return!1}}}});import{join as nN}from"path";function L4(Z){return Z.replace(/'/g,"''")}function D5(){return G6(p0)}function JL(){return`${D5()}:${O0()}`}function bJ(){let Z=D5().replace(/[^a-zA-Z0-9._-]/g,"_");return nN(G0(),`${Z}.secure.dpapi`)}function _4(Z,q){try{return P0("powershell.exe",["-Command",Z],{input:q?.input,reject:!1})}catch{return null}}function iN(Z,q){let J=Z?.stderr?.trim();if(J)return J;if(typeof Z?.exitCode==="number"&&Z.exitCode!==0)return`${q} (exit code ${Z.exitCode}).`;return q}function XL(){let Z=D5().replace(/"/g,'`"'),q=O0().replace(/"/g,'`"'),J=`
116
- Add-Type -AssemblyName System.Runtime.WindowsRuntime
117
- try {
118
- $vault = New-Object Windows.Security.Credentials.PasswordVault
119
- $cred = $vault.Retrieve("${Z}", "${q}")
120
- $cred.FillPassword()
121
- [Console]::Out.Write($cred.Password)
122
- } catch {
123
- exit 1
124
- }
125
- `,X=_4(J);if(X?.exitCode===0&&X.stdout)try{return Z0(X.stdout)}catch{return null}return null}var hJ;var QL=B(()=>{S6();o0();z0();M5();hJ={name:"credential-locker-dpapi",read(){let Z=L4(bJ()),q=L4(JL()),J=`
126
- try {
127
- Add-Type -AssemblyName System.Security
128
- $path = '${Z}'
129
- if (!(Test-Path -LiteralPath $path)) {
130
- exit 1
131
- }
132
-
133
- $protectedBase64 = [System.IO.File]::ReadAllText(
134
- $path,
135
- [System.Text.Encoding]::UTF8
136
- ).Trim()
137
- if (-not $protectedBase64) {
138
- exit 1
139
- }
140
-
141
- $protectedBytes = [Convert]::FromBase64String($protectedBase64)
142
- $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${q}')
143
- $bytes = [System.Security.Cryptography.ProtectedData]::Unprotect(
144
- $protectedBytes,
145
- $entropyBytes,
146
- [System.Security.Cryptography.DataProtectionScope]::CurrentUser
147
- )
148
- [Console]::Out.Write([System.Text.Encoding]::UTF8.GetString($bytes))
149
- } catch {
150
- exit 1
151
- }
152
- `,X=_4(J);if(X?.exitCode===0&&X.stdout)try{return Z0(X.stdout)}catch{return XL()}return XL()},async readAsync(){return this.read()},update(Z){let q=L4(bJ()),J=L4(JL()),X=m(Z),Q=`
153
- try {
154
- Add-Type -AssemblyName System.Security
155
- $path = '${q}'
156
- $directory = [System.IO.Path]::GetDirectoryName($path)
157
- if ($directory) {
158
- [System.IO.Directory]::CreateDirectory($directory) | Out-Null
159
- }
160
-
161
- $payload = [Console]::In.ReadToEnd()
162
- $bytes = [System.Text.Encoding]::UTF8.GetBytes($payload)
163
- $entropyBytes = [System.Text.Encoding]::UTF8.GetBytes('${J}')
164
- $protectedBytes = [System.Security.Cryptography.ProtectedData]::Protect(
165
- $bytes,
166
- $entropyBytes,
167
- [System.Security.Cryptography.DataProtectionScope]::CurrentUser
168
- )
169
- $protectedBase64 = [Convert]::ToBase64String($protectedBytes)
170
- [System.IO.File]::WriteAllText(
171
- $path,
172
- $protectedBase64,
173
- [System.Text.Encoding]::UTF8
174
- )
175
- } catch {
176
- Write-Error $_.Exception.Message
177
- exit 1
178
- }
179
- `,$=_4(Q,{input:X});if($?.exitCode===0)return{success:!0};return{success:!1,warning:iN($,"Windows secure storage could not encrypt credentials with DPAPI")}},delete(){let q=`
180
- try {
181
- $path = '${L4(bJ())}'
182
- if (Test-Path -LiteralPath $path) {
183
- Remove-Item -LiteralPath $path -Force
184
- }
185
- } catch {
186
- exit 1
187
- }
188
- `,J=_4(q),X=D5().replace(/"/g,'`"'),Q=O0().replace(/"/g,'`"'),$=`
189
- Add-Type -AssemblyName System.Runtime.WindowsRuntime
190
- try {
191
- $vault = New-Object Windows.Security.Credentials.PasswordVault
192
- $cred = $vault.Retrieve("${X}", "${Q}")
193
- $vault.Remove($cred)
194
- } catch {
195
- exit 0
196
- }
197
- `,Y=_4($);return(J?.exitCode??1)===0}}});import{chmodSync as aN}from"fs";import{join as oN}from"path";function A5(){let Z=G0(),q=".credentials.json";return{storageDir:Z,storagePath:oN(Z,".credentials.json")}}var z4;var YL=B(()=>{o0();o1();F0();z0();z4={name:"plaintext",read(){let{storagePath:Z}=A5();try{let q=N().readFileSync(Z,{encoding:"utf8"});return Z0(q)}catch{return null}},async readAsync(){let{storagePath:Z}=A5();try{let q=await N().readFile(Z,{encoding:"utf8"});return Z0(q)}catch{return null}},update(Z){try{let{storageDir:q,storagePath:J}=A5();try{N().mkdirSync(q)}catch(X){if(W0(X)!=="EEXIST")throw X}return $L(J,m(Z),{encoding:"utf8",flush:!1}),aN(J,384),{success:!0,warning:"Warning: Storing credentials in plaintext."}}catch{return{success:!1}}},delete(){let{storagePath:Z}=A5();try{return N().unlinkSync(Z),!0}catch(q){if(W0(q)==="ENOENT")return!0;return!1}}}});function HL(Z){let q=Z?.allowPlainTextFallback??!0;if(process.platform==="darwin")return q?R5(yJ,z4):yJ;if(process.platform==="linux")return q?R5(SJ,z4):SJ;if(process.platform==="win32")return q?R5(hJ,z4):hJ;return q?z4:sN}var sN;var GL=B(()=>{sB();ZL();qL();QL();YL();sN={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 h(Z){if(typeof Z!=="string")return;let q=Z.trim();return q?q:void 0}function gJ(Z=process.env){return h(Z.CODEX_OAUTH_CLIENT_ID)??"app_EMoamEEZ73f0CkXaXp7hrann"}function Ge(Z=process.env){let q=h(Z.CODEX_OAUTH_CALLBACK_PORT);if(!q)return 1455;let J=Number.parseInt(q,10);if(Number.isInteger(J)&&J>=0&&J<=65535)return J;return 1455}function fJ(Z){let q=Z.split(".");if(q.length<2)return;try{let J=q[1].replace(/-/g,"+").replace(/_/g,"/"),X=J+"=".repeat((4-J.length%4)%4),Q=Buffer.from(X,"base64").toString("utf8"),$=JSON.parse(Q);return $&&typeof $==="object"?$:void 0}catch{return}}function d0(Z){if(!Z)return;let q=fJ(Z),J=q?.["https://api.openai.com/auth"]&&typeof q["https://api.openai.com/auth"]==="object"?q["https://api.openai.com/auth"]:void 0,X=J?.organizations,Q=Array.isArray(X)&&X.length>0&&typeof X[0]==="object"?X[0].id:void 0;return h(J?.chatgpt_account_id??q?.["https://api.openai.com/auth.chatgpt_account_id"]??q?.chatgpt_account_id??Q)??void 0}function Ke(Z){return Z.replace(/[&<>"']/g,(q)=>{switch(q){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"'":return"&#39;";default:return q}})}async function UL(Z){let q=new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",client_id:gJ(),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:q,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 X=await J.json(),Q=h(X.access_token);if(!Q)throw Error("Codex API key exchange completed, but no API key token was returned.");return Q}var $e="https://auth.openai.com",KL="https://auth.openai.com/oauth/token",Ye="openid profile email offline_access api.connectors.read api.connectors.invoke",He="codex_cli_rs";var mJ=()=>{};function I5(){return HL({allowPlainTextFallback:!0})}function WL(Z){if(!Z)return;let J=fJ(Z)?.exp;if(typeof J==="number"&&Number.isFinite(J))return J*1000;return}function F4(Z){if(!Z||typeof Z!=="object")return;let q=Z,J=h(q.apiKey),X=h(q.accessToken);if(!X)return;let Q=h(q.refreshToken),$=h(q.idToken),Y=h(q.accountId)??d0($)??d0(X),H=h(q.profileId),K=typeof q.lastRefreshAt==="number"&&Number.isFinite(q.lastRefreshAt)?q.lastRefreshAt:void 0,W=typeof q.lastRefreshFailureAt==="number"&&Number.isFinite(q.lastRefreshFailureAt)?q.lastRefreshFailureAt:void 0;return{apiKey:J,accessToken:X,refreshToken:Q,idToken:$,accountId:Y,profileId:H,lastRefreshAt:K,lastRefreshFailureAt:W}}function eN(Z){let q=WL(Z.accessToken)??WL(Z.idToken);if(q===void 0)return!1;return q<=Date.now()+rN}function VL(Z,q=Date.now()){let J=Math.max(Z.lastRefreshFailureAt??0,j5??0);if(!J)return!1;return q-J<tN}function Zx(Z,q){if(!q.trim())return`Codex token refresh failed with status ${Z}.`;try{let J=JSON.parse(q),X=J.error&&typeof J.error==="object"?J.error:void 0,Q=h(X?.code??J.code),$=h(X?.message??J.error_description)??q.trim();return Q?`Codex token refresh failed (${Q}): ${$}`:`Codex token refresh failed with status ${Z}: ${$}`}catch{return`Codex token refresh failed with status ${Z}: ${q.trim()}`}}function BL(){if(G2())return;try{let Z=I5().read();return F4(Z?.codex)}catch{return}}async function qx(){if(G2())return;try{let Z=await I5().readAsync();return F4(Z?.codex)}catch{return}}function LL(Z,q=Date.now()){return VL(Z,q)}function _L(Z){if(G2())return{success:!1,warning:"Bare mode: secure storage is disabled."};let q=F4(Z);if(!q)return{success:!1,warning:"Codex credentials are incomplete."};let J=I5(),X=J.read()||{},Q=F4(X[T5]),$={...X,[T5]:{...q,profileId:q.profileId??Q?.profileId,lastRefreshAt:q.lastRefreshAt??Date.now()}},Y=J.update($);if(Y.success)j5=F4($[T5])?.lastRefreshFailureAt??null;return Y}function Jx(Z,q){if(!_L({...Z,lastRefreshFailureAt:q}).success)j5=q}function ze(){if(G2())return{success:!0};let Z=I5(),J={...Z.read()||{}};delete J[T5];let X=Z.update(J);if(X.success)j5=null;return X}async function Re(Z){if(G2())return{refreshed:!1};if(M4()?.apiKey?.trim())return{refreshed:!1};let q=await qx();if(!q)return{refreshed:!1};if(!q.refreshToken)return{refreshed:!1,credentials:q};if(!Z?.force&&!eN(q))return{refreshed:!1,credentials:q};if(VL(q))return{refreshed:!1,credentials:q};if(R4)return R4;return R4=(async()=>{let J=Date.now();try{let X=new URLSearchParams({client_id:gJ(),grant_type:"refresh_token",refresh_token:q.refreshToken}),Q=await fetch(KL,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:X,signal:AbortSignal.timeout(15000)});if(!Q.ok){let U=await Q.text().catch(()=>"");throw Error(Zx(Q.status,U))}let $=await Q.json(),Y=h($.access_token);if(!Y)throw Error("Codex token refresh succeeded without a new access token.");let H={accessToken:Y,refreshToken:h($.refresh_token)??q.refreshToken,idToken:h($.id_token)??q.idToken,accountId:d0($.id_token)??d0($.access_token)??q.accountId,lastRefreshAt:Date.now()},K=H.idToken??q.idToken;if(K)H.apiKey=await UL(K).catch((U)=>{P(`[codex] id-token → API-key exchange failed; falling back to access_token bearer: ${U instanceof Error?U.message:String(U)}`,{level:"warn"});return});let W=_L(H);if(!W.success)throw Error(W.warning??"Codex token refresh succeeded but credentials could not be saved.");return{refreshed:!0,credentials:H}}catch(X){throw Jx(q,J),X}finally{R4=null}})(),R4}var T5="codex",rN=60000,tN=60000,R4=null,j5=null;var zL=B(()=>{K6();K1();o0();GL();mJ()});import{existsSync as Xx,readFileSync as Qx}from"node:fs";import{isIP as $x}from"node:net";import{homedir as Yx}from"node:os";import{join as RL}from"node:path";function we(Z){if(!Z)return!1;try{let{hostname:q}=new URL(Z);return q==="api.x.ai"}catch{return!1}}function ke(Z){if(!Z)return!1;try{let{hostname:q,pathname:J}=new URL(Z);return q==="api.kimi.com"&&J.startsWith("/coding")}catch{return!1}}function Ux(Z){let q=Z.split(".").map((J)=>Number.parseInt(J,10));if(q.length!==4||q.some((J)=>Number.isNaN(J)))return!1;return q[0]===10||q[0]===172&&q[1]>=16&&q[1]<=31||q[0]===192&&q[1]===168}function Wx(Z){let q=Z.split(":",1)[0];if(!q)return!1;let J=Number.parseInt(q,16);if(Number.isNaN(J))return!1;return(J&65024)===64512||(J&65472)===65152}function dJ(Z){if(!Z)return;let q=Z.trim();if(!q)return;if(q==="undefined")return;return q}function uJ(Z,q){for(let J of q){let X=Z,Q=!0;for(let Y of J){if(!X||typeof X!=="object"||!(Y in X)){Q=!1;break}X=X[Y]}if(!Q)continue;let $=h(X);if($)return $}return}function Vx(Z){if(!Z)return;let q=Z.trim().toLowerCase();if(q==="low"||q==="medium"||q==="high"||q==="xhigh"||q==="max")return q;return}function FL(Z){let q=Z.trim(),J=q.indexOf("?");if(J===-1){let W=q.toLowerCase(),U=w5[W];if(U)return{raw:q,baseModel:U.model,reasoning:U.reasoningEffort?{effort:U.reasoningEffort}:void 0};return{raw:q,baseModel:q}}let X=q.slice(0,J).trim(),Q=new URLSearchParams(q.slice(J+1)),$=X.toLowerCase(),Y=w5[$],H=Y?.model??X,K=Vx(Q.get("reasoning")??void 0)??(Y?.reasoningEffort?{effort:Y.reasoningEffort}:void 0);return{raw:q,baseModel:H,reasoning:typeof K==="string"?{effort:K}:K}}function jL(Z){let q=Z.trim().toLowerCase();return(q.split("?",1)[0]??q)in w5}function cJ(Z){let q=Z.trim().toLowerCase(),J=q.split("?",1)[0]??q;return Gx.has(J)}function IL(Z){return cJ(Z)}function Bx(Z,q){let J=dJ(q);return Dx(J)||!J&&jL(Z)}function Rx(Z){let q=Z.trim().toLowerCase();if(q.includes("codex"))return!0;let J=Lx.exec(q);if(!J)return!1;if(Number(J[1])<5)return!1;if(q.startsWith("gpt-5-mini"))return!1;return!0}function OL(Z){if(!Z)return!1;try{let q=new URL(Z).hostname.toLowerCase();if(q.startsWith("[")&&q.endsWith("]"))q=q.slice(1,-1);let J=q.indexOf("%25");if(J!==-1)q=q.slice(0,J);if(Kx.has(q)||q==="0.0.0.0")return!0;if(q.endsWith(".local"))return!0;let X=$x(q);if(X===4)return Number.parseInt(q.split(".",1)[0]??"",10)===127||Ux(q);if(X===6)return Wx(q);return!1}catch{return!1}}function O5(Z){return Z.replace(lJ,"")}function Fx(Z){let q=O5(Z);if(!q||q==="/")return"/v1";if(q.toLowerCase().endsWith("/v1"))return q;return`${q}/v1`}function Mx(Z){try{let q=new URL(Z),J=q.hostname.toLowerCase(),X=q.pathname.toLowerCase();if(q.port==="11434")return!0;return J.includes("ollama")||X.includes("ollama")}catch{return!1}}function Ne(Z){if(!OL(Z))return[];try{let q=new URL(Z),J=O5(q.toString()),X=new Set([J]),Q=[],$=(K,W)=>{let U=new URL(q.toString());U.hostname=K,U.pathname=W,U.search="",U.hash="";let V=O5(U.toString());if(X.has(V))return;X.add(V),Q.push(V)},Y=Fx(q.pathname);if(Y!==O5(q.pathname))$(q.hostname,Y);let H=q.hostname.toLowerCase().replace(zx,"");if(H==="localhost"||H==="::1")$("127.0.0.1",q.pathname||"/"),$("127.0.0.1",Y);return Q}catch{return[]}}function xe(Z){if(!Z.hasTools)return!1;if(!OL(Z.baseUrl))return!1;return Mx(Z.baseUrl)}function Dx(Z){if(!Z)return!1;try{let q=new URL(Z);return q.hostname==="chatgpt.com"&&q.pathname.replace(lJ,"")==="/backend-api/codex"}catch{return!1}}function Ax(Z){let q=Z.split("?",1)[0]??Z,J=q.includes(":")?q.split(":",2)[1].trim():q.trim();if(!J||J.toLowerCase()==="copilot")return TL;let X=J.indexOf("/");if(X!==-1)return J.slice(X+1);return J}function ML(Z){let q=Z.split("?",1)[0]??Z,J=q.includes(":")?q.split(":",2)[1].trim():q.trim();if(!J||J.toLowerCase()==="copilot")return TL;return J}function AL(Z){if(!Z)return"copilot";try{let q=new URL(Z).hostname.toLowerCase();if(q==="api.githubcopilot.com"||q.endsWith(".githubcopilot.com")||q.startsWith("copilot-api."))return"copilot";if(q==="models.github.ai"||q.endsWith(".github.ai"))return"models";return"custom"}catch{return"copilot"}}function wL(Z){let q=null;try{let{tryGetActiveProvider:g}=(K6(),V4(D4));q=g()}catch{q=null}let X=q?.transport==="github_copilot",Q=q?.model?.trim(),$=dJ(q?.baseUrl),Y=Z?.model?.trim()||Q||Z?.fallbackModel?.trim()||(X?"github:copilot":"gpt-4o"),H=FL(Y),K=dJ(Z?.baseUrl),W=K??$,V=X&&jL(Y)&&W&&AL(W)==="custom"?void 0:W,L=K??V,_=Q??"",R=cJ(_)?FL(_).baseModel:null,D=Boolean(Z?.model)&&Boolean(R)&&H.baseModel===R,F=cJ(Y)||D,M=!X&&F&&!(L&&L!==pJ)?Hx:L,O=X?AL(L):"custom",T=X&&O==="copilot",I=X&&O==="models",A=X&&O==="custom",b=X?ML(Y):Y,w=Bx(Y,M)||T&&Rx(b)?"codex_responses":"chat_completions",x=T?Ax(H.baseModel):I||A?ML(H.baseModel):H.baseModel,v=Z?.reasoningEffortOverride?{effort:Z.reasoningEffortOverride}:H.reasoning??(q?.extras?.reasoningEffort?{effort:q.extras.reasoningEffort}:void 0);return{transport:w,requestedModel:Y,resolvedModel:x,baseUrl:(M??(T&&w==="codex_responses"?DL:X?DL:pJ)).replace(lJ,""),reasoning:v}}function Pe(){let Z=null;try{let{tryGetActiveProvider:X}=(K6(),V4(D4));Z=X()}catch{Z=null}let q=Z?.transport;if(q!=="openai_compat"&&q!=="codex_responses"){if(!q||q==="anthropic")return"firstParty";return null}let J=wL();if(J.transport!=="chat_completions")return null;return`openai:${J.baseUrl.toLowerCase()}`}function Ee(){let Z=wL();if(Z.transport!=="chat_completions")return!1;let q=Z.baseUrl.toLowerCase();try{return new URL(q).hostname==="api.openai.com"}catch{return q===pJ}}function kL(Z=process.env){let q=nJ();if(q)return q;let J=h(Z.CODEX_AUTH_JSON_PATH);if(J)return J;let X=h(Z.CODEX_HOME);if(X)return RL(X,"auth.json");return RL(Yx(),".codex","auth.json")}function nJ(){try{let{tryGetActiveProvider:Z}=(K6(),V4(D4));return h(Z()?.extras?.codexAuthPath)}catch{return}}function iJ(){try{let{tryGetActiveProvider:Z}=(K6(),V4(D4));return h(Z()?.extras?.codexAccountId)}catch{return}}function NL(Z){if(!Xx(Z))return;try{let q=Qx(Z,"utf8"),J=JSON.parse(q);return J&&typeof J==="object"?J:void 0}catch{return}}function xL(Z){let{authJson:q,authPath:J,envAccountId:X}=Z;if(!q)return{apiKey:"",authPath:J,source:Z.missingSource??"none"};let Q=uJ(q,[["openai_api_key"],["openaiApiKey"],["access_token"],["accessToken"],["tokens","access_token"],["tokens","accessToken"],["auth","access_token"],["auth","accessToken"],["token","access_token"],["token","accessToken"]]),$=uJ(q,[["id_token"],["idToken"],["tokens","id_token"],["tokens","idToken"]]),Y=X??uJ(q,[["account_id"],["accountId"],["tokens","account_id"],["tokens","accountId"],["auth","account_id"],["auth","accountId"]])??d0(Q)??d0($);if(!Q)return{apiKey:"",accountId:Y,authPath:J,source:Z.missingSource??"none"};return{apiKey:Q,accountId:Y,authPath:J,source:"auth.json"}}function PL(Z){let{storedCredentials:q,envAccountId:J}=Z;return{apiKey:q.apiKey??q.accessToken,accountId:J??q.accountId??d0(q.idToken)??d0(q.accessToken),source:"secure-storage"}}function k5(Z,q){let J=h(Z.CODEX_API_KEY),Q=iJ()??h(Z.CODEX_ACCOUNT_ID)??h(Z.CHATGPT_ACCOUNT_ID);if(J)return{apiKey:J,accountId:Q??d0(J),source:"env"};let $=nJ();if(!Boolean($??h(Z.CODEX_AUTH_JSON_PATH)??h(Z.CODEX_HOME))&&q?.explicitAuthPathOnly)return{apiKey:"",accountId:Q,source:"none"};let H=kL(Z),K=NL(H);return xL({authJson:K,authPath:H,envAccountId:Q})}function ve(Z){let q=Z?.env??process.env,J=k5(q,{explicitAuthPathOnly:!0}),X=Boolean(nJ()??h(q.CODEX_AUTH_JSON_PATH)??h(q.CODEX_HOME)),Q=Boolean(Z&&Object.prototype.hasOwnProperty.call(Z,"storedCredentials"));if(X||J.source==="env"||J.source==="auth.json")return J;if(Z?.storedCredentials?.accessToken)return PL({storedCredentials:Z.storedCredentials,envAccountId:iJ()??h(q.CODEX_ACCOUNT_ID)??h(q.CHATGPT_ACCOUNT_ID)});if(Q)return k5(q);return Tx(q)}function Tx(Z=process.env){let q=iJ()??h(Z.CODEX_ACCOUNT_ID)??h(Z.CHATGPT_ACCOUNT_ID),J=k5(Z,{explicitAuthPathOnly:!0});if(J.source==="env"||J.source==="auth.json"||J.authPath)return J;let X=BL();if(X?.accessToken){let Q=PL({storedCredentials:X,envAccountId:q});if(!(!Q.accountId||LL(X)))return Q;let Y=kL(Z),H=NL(Y),K=xL({authJson:H,authPath:Y,envAccountId:q});if(K.apiKey)return{...K,accountId:K.accountId??Q.accountId};return Q}return k5(Z)}function jx(Z){let q=Z.trim().toLowerCase(),X=q.split("?",1)[0]??q;return w5[X]?.reasoningEffort}function Ce(Z){let q=Z.trim().toLowerCase(),J=q.split("?",1)[0]??q;if(J==="gpt-5.3-codex-spark"||J==="codexspark")return!1;if(jx(J)!==void 0)return!0;return _x.test(J)}var pJ="https://api.openai.com/v1",Hx="https://chatgpt.com/backend-api/codex",Oe="https://api.x.ai/v1",TL="gpt-4o",w5,Gx,Kx,Lx,_x,lJ,zx,DL="https://api.githubcopilot.com";var EL=B(()=>{zL();mJ();w5={codexplan:{model:"gpt-5.5",reasoningEffort:"high"},"gpt-5.6":{model:"gpt-5.6-sol",reasoningEffort:"high"},"gpt-5.6-sol":{model:"gpt-5.6-sol",reasoningEffort:"high"},"gpt-5.6-terra":{model:"gpt-5.6-terra",reasoningEffort:"high"},"gpt-5.6-luna":{model:"gpt-5.6-luna",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"}},Gx=new Set(["codexplan","codexspark"]),Kx=new Set(["localhost","127.0.0.1","::1"]);Lx=/^gpt-(\d+)/,_x=/^gpt-5(?:[.-]|$)/,lJ=/\/+$/,zx=/^\[|\]$/g});var D4={};Mq(D4,{tryGetActiveProvider:()=>M4,invalidateActiveProviderCache:()=>kx,getActiveProvider:()=>CL,_peekActiveProviderCacheForTesting:()=>Nx,ActiveProviderNotConfiguredError:()=>N5});function Ix(){if(vL)return;vL=!0,gB(()=>{U6=null})}function Ox(Z,q){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(IL(q))return"codex_responses";return"openai_compat"}}}function wx(Z){let q=uB(Z.model);return{transport:Ox(Z,q),baseUrl:Z.baseUrl,model:q,apiKey:Z.apiKey,extras:Z.extras,name:Z.name}}function CL(){if(Ix(),U6)return U6;let Z=z1(Q0());if(!Z)throw new N5;return U6=wx(Z),U6}function M4(){try{return CL()}catch(Z){if(Z instanceof N5)return null;throw Z}}function kx(){U6=null}function Nx(){return U6}var N5,U6=null,vL=!1;var K6=B(()=>{NJ();oB();xJ();EL();N5=class N5 extends Error{constructor(){super("No active provider profile is configured. Run /provider to set one up.");this.name="ActiveProviderNotConfiguredError"}}});function yL(Z){return Z.sort((q,J)=>{let X=J.modified.getTime()-q.modified.getTime();if(X!==0)return X;return J.created.getTime()-q.created.getTime()})}var SL=()=>{};function bL(Z){if(typeof Z!=="string")return!1;let q=Z.trim();return q!==""&&q!=="."&&q!==".."&&!Z.includes("/")&&!Z.includes("\\")&&!Z.includes("\x00")}function aJ(Z){if(typeof Z!=="string")throw TypeError("Expected a string");if(!bL(Z))throw Error(`Unsafe filename: ${JSON.stringify(Z)}`)}var me;var hL=B(()=>{me=Object.freeze([""," ",".",".."," .",". "," ..",".. ","../","../foo","foo/../bar","foo/bar","foo\\bar","foo\x00bar"])});import s from"node:path";import gL from"node:os";import oJ from"node:process";function rJ(Z,{suffix:q="nodejs"}={}){if(aJ(Z),q)Z+=`-${q}`;if(aJ(Z),oJ.platform==="darwin")return xx(Z);if(oJ.platform==="win32")return Px(Z);return Ex(Z)}var v1,sJ,K2,xx=(Z)=>{let q=s.join(v1,"Library");return{data:s.join(q,"Application Support",Z),config:s.join(q,"Preferences",Z),cache:s.join(q,"Caches",Z),log:s.join(q,"Logs",Z),temp:s.join(sJ,Z)}},Px=(Z)=>{let q=K2.APPDATA||s.join(v1,"AppData","Roaming"),J=K2.LOCALAPPDATA||s.join(v1,"AppData","Local");return{data:s.join(J,Z,"Data"),config:s.join(q,Z,"Config"),cache:s.join(J,Z,"Cache"),log:s.join(J,Z,"Log"),temp:s.join(sJ,Z)}},Ex=(Z)=>{let q=s.basename(v1);return{data:s.join(K2.XDG_DATA_HOME||s.join(v1,".local","share"),Z),config:s.join(K2.XDG_CONFIG_HOME||s.join(v1,".config"),Z),cache:s.join(K2.XDG_CACHE_HOME||s.join(v1,".cache"),Z),log:s.join(K2.XDG_STATE_HOME||s.join(v1,".local","state"),Z),temp:s.join(sJ,q,Z)}};var fL=B(()=>{hL();v1=gL.homedir(),sJ=gL.tmpdir(),{env:K2}=oJ});import{join as x5}from"path";function pL(Z){let q=Z.replace(/[^a-zA-Z0-9]/g,"-");if(q.length<=mL)return q;return`${q.slice(0,mL)}-${Math.abs(uL(Z)).toString(36)}`}function E5(Z){return pL(Z)}var P5,mL=200,dL;var cL=B(()=>{fL();F0();vx();P5=rJ("claude-cli");dL={baseLogs:()=>x5(P5.cache,E5(N().cwd())),errors:()=>x5(P5.cache,E5(N().cwd()),"errors"),messages:()=>x5(P5.cache,E5(N().cwd()),"messages"),mcpLogs:(Z)=>x5(P5.cache,E5(N().cwd()),`mcp-logs-${pL(Z)}`)}});function nL(Z){return Z.replace(lL,"").trim()||Z}function iL(Z){return Z.replace(lL,"").trim()}function te(Z){return Z.replace(Cx,"").trim()}var lL,Cx;var aL=B(()=>{lL=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;Cx=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});import{readdir as Sx,readFile as bx,stat as hx}from"fs/promises";import{join as gx}from"path";function V00(Z,q){let J=Z.firstPrompt?.startsWith(`<${tL}>`),X=Z.firstPrompt?iL(Z.firstPrompt):"",Q=X&&!J,$=Z.agentName||Z.customTitle||Z.summary||(Q?X:void 0)||q||(J?"Autonomous session":void 0)||(Z.sessionId?Z.sessionId.slice(0,8):"")||"";return nL($).trim()}function fx(Z){return Z.toISOString().replace(/[:.]/g,"-")}function ux(Z){if(A4.length>=mx)A4.shift();A4.push(Z)}function B00(Z){if(y0!==null)return;if(y0=Z,W6.length>0){let q=[...W6];W6.length=0;for(let J of q)switch(J.type){case"error":y0.logError(J.error);break;case"mcpError":y0.logMCPError(J.serverName,J.error);break;case"mcpDebug":y0.logMCPDebug(J.serverName,J.message);break}}}function S(Z){let q=rL(Z);try{let J=M4()?.transport;if(J==="bedrock"||J==="vertex"||J==="foundry"||process.env.DISABLE_ERROR_REPORTING||LJ())return;let Q={error:q.stack||q.message,timestamp:new Date().toISOString()};if(ux(Q),y0===null){W6.push({type:"error",error:q});return}y0.logError(q)}catch{}}function _00(){return[...A4]}function px(){return dx(dL.errors())}async function z00(Z){return(await px())[Z]||null}async function dx(Z){let q;try{q=await Sx(Z,{withFileTypes:!0})}catch{return S(Error(`No logs found at ${Z}`)),[]}let J=await Promise.all(q.map(async(X,Q)=>{let $=gx(Z,X.name),Y=await bx($,{encoding:"utf8"}),H=Z0(Y),K=H[0],W=H[H.length-1],U=K?.type==="user"&&typeof K?.message?.content==="string"?K?.message?.content:"No prompt",V=await hx($),L=$.includes("sidechain"),_=fx(V.mtime);return{date:_,fullPath:$,messages:H,value:Q,created:tJ(K?.timestamp||_),modified:W?.timestamp?tJ(W.timestamp):tJ(_),firstPrompt:U.split(`
198
- `)[0]?.slice(0,50)+(U.length>50?"…":"")||"No prompt",messageCount:H.length,isSidechain:L}}));return yL(J.filter((X)=>X!==null)).map((X,Q)=>({...X,value:Q}))}function tJ(Z){let q=Z.split(/\D+/);return new Date(Date.UTC(parseInt(q[0],10),parseInt(q[1],10)-1,parseInt(q[2],10),parseInt(q[3],10),parseInt(q[4],10),parseInt(q[5],10),parseInt(q[6],10)))}function R00(Z,q){try{if(y0===null){W6.push({type:"mcpError",serverName:Z,error:q});return}y0.logMCPError(Z,q)}catch{}}function F00(Z,q){try{if(y0===null){W6.push({type:"mcpDebug",serverName:Z,message:q});return}y0.logMCPDebug(Z,q)}catch{}}function M00(Z,q){if(!q||!q.startsWith("repl_main_thread"))return;let{messages:J,...X}=Z;oL(X),sL(null)}function D00(){y0=null,W6.length=0,A4=[]}var mx=100,A4,W6,y0=null,L00;var k0=B(()=>{O1();_6();K6();yx();SL();cL();aL();o1();zJ();z0();A4=[];W6=[];L00=u(()=>{return process.argv.includes("--hard-fail")})});import eL from"node:path";function lx(Z){return Z.includes(eL.sep)||Z.includes("/")||eL.isAbsolute(Z)}function nx(Z){let q=Z.trim();if(!q)return"Unsafe executable: empty command";if(T4.test(q))return"Unsafe executable: control characters are not allowed";if(!lx(q)&&!cx.test(q))return'Unsafe executable: bare command names may only contain letters, numbers, ".", "_" and "-"';return null}function ix(Z){for(let q of Z)if(T4.test(q))return"Unsafe argument: control characters are not allowed";return null}function ax(Z){if(!Z)return null;if(T4.test(Z))return"Unsafe working directory: control characters are not allowed";return null}function ox(Z){if(!Z)return{};for(let[q,J]of Object.entries(Z)){if(T4.test(q))return{error:"Unsafe environment: control characters are not allowed in keys"};if(typeof J==="string"&&T4.test(J))return{error:"Unsafe environment: control characters are not allowed in values"}}return{value:Z}}function sx(Z,q){if(typeof Z.signal==="string")return Z.signal;return String(q)}function i(Z,q,J={timeout:10*ZX*eJ,preserveOutputOnError:!0,useCwd:!0}){return i1(Z,q,{abortSignal:J.abortSignal,timeout:J.timeout,preserveOutputOnError:J.preserveOutputOnError,cwd:J.useCwd?r():void 0,env:J.env,stdin:J.stdin,input:J.input})}function i1(Z,q,{abortSignal:J,timeout:X=10*ZX*eJ,preserveOutputOnError:Q=!0,cwd:$,env:Y,maxBuffer:H=Z_,stdin:K,input:W}={timeout:10*ZX*eJ,preserveOutputOnError:!0,maxBuffer:Z_}){let U=nx(Z);if(U)return Promise.resolve({stdout:"",stderr:"",code:1,error:U});let V=ix(q);if(V)return Promise.resolve({stdout:"",stderr:"",code:1,error:V});let L=ax($);if(L)return Promise.resolve({stdout:"",stderr:"",code:1,error:L});let _=ox(Y);if(_.error)return Promise.resolve({stdout:"",stderr:"",code:1,error:_.error});return new Promise((z)=>{let R=W!==void 0?"pipe":K??"pipe",D=q_.spawn(Z,q,{cwd:$,env:_.value,shell:!1,signal:J,stdio:[R,"pipe","pipe"]}),F=!1,k="",M="",O=0,T,I=!1,A=(x)=>{if(F)return;F=!0,z(x)},b=(x,v)=>{let g=typeof x==="string"?x:x.toString("utf8");if(O+=Buffer.byteLength(g,"utf8"),O>H){D.kill(),A({stdout:Q?k:"",stderr:Q?M:"",code:1,error:"maxBuffer exceeded"});return}if(v==="stdout")k+=g;else M+=g};D.stdout?.on("data",(x)=>b(x,"stdout")),D.stderr?.on("data",(x)=>b(x,"stderr")),D.once("spawn",()=>{if(R==="pipe"&&D.stdin)if(W!==void 0)D.stdin.end(W);else D.stdin.end()}),D.once("error",(x)=>{S(x),A({stdout:"",stderr:"",code:1,error:x.message})});let w=X>0?setTimeout(()=>{I=!0,D.kill()},X):void 0;D.once("close",(x,v)=>{if(w)clearTimeout(w);T=v??void 0;let g=x??1;if(I){A({stdout:Q?k:"",stderr:Q?M:"",code:g,error:`Command timed out after ${X}ms`});return}if(g!==0){if(Q)A({stdout:k,stderr:M,code:g,error:sx({signal:T},g)});else A({stdout:"",stderr:"",code:g});return}A({stdout:k,stderr:M,code:0})})})}var q_,eJ=1000,ZX=60,Z_=1e6,T4,cx;var W7=B(()=>{Z1();k0();EJ();q_=A9(u5(),1),T4=/[\0\r\n]/,cx=/^[A-Za-z0-9_.-]+$/});
199
- export{$o as Z9,zV as _9,p0 as $9,B4 as a_,O0 as b_,CJ as c_,wt as d_,M5 as e_,f4 as f_,pQ as g_,u5 as h_,tH as i_,eH as j_,gZ as k_,S6 as l_,nX as m_,iX as n_,p5 as o_,ZQ as p_,qQ as q_,XQ as r_,H0 as s_,PP as t_,U2 as u_,F5 as v_,i as w_,i1 as x_,W7 as y_,W2 as z_,QQ as A_,dP as B_,S0 as C_,z6 as D_,y1 as E_,cP as F_,lP as G_,nP as H_,RQ as I_,AQ as J_,TQ as K_,ZE as L_,F1 as M_,E4 as N_,g6 as O_,fZ as P_,QK as Q_,H7 as R_,G7 as S_,R6 as T_,n1 as U_,Aj as V_,Rp as W_,Fp as X_,a as Y_,jj as Z_,Mp as __,Dp as $_,_K as a$,Ij as b$,Oj as c$,Ap as d$,cZ as e$,wj as f$,Tp as g$,kj as h$,jp as i$,Ip as j$,Nj as k$,Op as l$,xj as m$,Pj as n$,wp as o$,kp as p$,Np as q$,vj as r$,xp as s$,Pp as t$,L2 as u$,gp as v$,f0 as w$,f6 as x$,ap as y$,gj as z$,op as A$,RK as B$,FK as C$,aZ as D$,Xd as E$,Qd as F$,$d as G$,V7 as H$,OK as I$,wK as J$,yK as K$,SK as L$,JU as M$,XU as N$,WU as O$,VU as P$,Zq as Q$,EI as R$,W1 as S$,g2 as T$,vc as U$,Cc as V$,yc as W$,yI as X$,M7 as Y$,AU as Z$,bc as _$,Xq as $$,TU as aaa,Qq as baa,$q as caa,IU as daa,Jl as eaa,uI as faa,Xl as gaa,Ql as haa,$l as iaa,Yl as jaa,OU as kaa,Hl as laa,Gl as maa,Kl as naa,Ul as oaa,Wl as paa,Vl as qaa,dI as raa,Bl as saa,Ll as taa,_l as uaa,zl as vaa,d6 as waa,Rl as xaa,Fl as yaa,NU as zaa,Ml as Aaa,D7 as Baa,rI as Caa,yU as Daa,SU as Eaa,m0 as Faa,al as Gaa,zq as Haa,ol as Iaa,sl as Jaa,O7 as Kaa,Zn as Laa,qn as Maa,Jn as Naa,Xn as Oaa,Qn as Paa,$n as Qaa,i2 as Raa,Yn as Saa,Hn as Taa,Rq as Uaa,Kn as Vaa,Un as Waa,ZW as Xaa,k1 as Yaa,a2 as Zaa,k7 as _aa,XW as $aa,Mn as aba,QW as bba,$W as cba,YW as dba,L0 as eba,TO as fba,i6 as gba,En as hba,Fq as iba,yn as jba,Sn as kba,bn as lba,hn as mba,gn as nba,fn as oba,mn as pba,un as qba,pn as rba,dn as sba,cn as tba,ln as uba,nn as vba,VW as wba,an as xba,on as yba,sn as zba,rn as Aba,tn as Bba,en as Cba,Zi as Dba,qi as Eba,BW as Fba,wO as Gba,kO as Hba,NO as Iba,xO as Jba,PO as Kba,EO as Lba,vO as Mba,yO as Nba,SO as Oba,bO as Pba,_W as Qba,RW as Rba,FW as Sba,AW as Tba,Bi as Uba,jW as Vba,e1 as Wba,Ti as Xba,gO as Yba,P7 as Zba,Ii as _ba,kW as $ba,v7 as aca,Pi as bca,Ei as cca,vi as dca,PW as eca,Vw as fca,Ci as gca,yi as hca,Lw as ica,Si as jca,E7 as kca,Fw as lca,Aw as mca,gi as nca,SW as oca,mi as pca,C7 as qca,bW as rca,hW as sca,jw as tca,Iw as uca,di as vca,ci as wca,li as xca,gW as yca,fW as zca,ii as Aca,ai as Bca,mW as Cca,wq as Dca,uW as Eca,pW as Fca,ri as Gca,dW as Hca,r6 as Ica,Ja as Jca,cW as Kca,Xa as Lca,lW as Mca,$a as Nca,nW as Oca,iW as Pca,Ya as Qca,Ha as Rca,Ga as Sca,Ka as Tca,Ua as Uca,xw as Vca,Wa as Wca,Nq as Xca,Ta as Yca,ZV as Zca,qV as _ca,v0 as $ca,ba as ada,ha as bda,ga as cda,r2 as dda,ta as eda,bq as fda,Mo as gda,m7 as hda,u7 as ida,Do as jda,Ao as kda,AV as lda,aq as mda,so as nda,e2 as oda,TV as pda,d7 as qda,CV as rda,p as sda,ro as tda,to as uda,Z6 as vda,eo as wda,c7 as xda,Zs as yda,qs as zda,aw as Ada,Js as Bda,Xs as Cda,Qs as Dda,$s as Eda,Ys as Fda,Hs as Gda,SV as Hda,dV as Ida,ws as Jda,Jk as Kda,ks as Lda,J4 as Mda,nV as Nda,Ns as Oda,sq as Pda,ms as Qda,us as Rda,DB as Sda,LJ as Tda,zJ as Uda,X5 as Vda,IB as Wda,rk as Xda,cs as Yda,ls as Zda,OB as _da,ek as $da,ZN as aea,_0 as bea,xB as cea,U4 as dea,HN as eea,KN as fea,UN as gea,CB as hea,yB as iea,wr as jea,V5 as kea,_N as lea,kr as mea,zN as nea,Nr as oea,xr as pea,Pr as qea,Er as rea,vr as sea,Cr as tea,gB as uea,A0 as vea,yr as wea,Sr as xea,Q0 as yea,br as zea,hr as Aea,gr as Bea,fr as Cea,wJ as Dea,_5 as Eea,kJ as Fea,wN as Gea,mr as Hea,ur as Iea,kN as Jea,pr as Kea,dr as Lea,cr as Mea,lr as Nea,nr as Oea,ir as Pea,ar as Qea,or as Rea,sr as Sea,NJ as Tea,z5 as Uea,uB as Vea,xJ as Wea,Xt as Xea,u0 as Yea,Qt as Zea,z1 as _ea,$t as $ea,bN as afa,Yt as bfa,hN as cfa,Ht as dfa,Gt as efa,Kt as ffa,Ut as gfa,gN as hfa,fN as ifa,Wt as jfa,mN as kfa,Vt as lfa,Bt as mfa,Lt as nfa,uN as ofa,oB as pfa,yt as qfa,ZL as rfa,HL as sfa,GL as tfa,$e as ufa,Ye as vfa,He as wfa,h as xfa,gJ as yfa,Ge as zfa,d0 as Afa,Ke as Bfa,UL as Cfa,mJ as Dfa,qx as Efa,_L as Ffa,ze as Gfa,Re as Hfa,zL as Ifa,pJ as Jfa,Hx as Kfa,Oe as Lfa,we as Mfa,ke as Nfa,OL as Ofa,Ne as Pfa,xe as Qfa,Dx as Rfa,AL as Sfa,wL as Tfa,Pe as Ufa,Ee as Vfa,ve as Wfa,Tx as Xfa,jx as Yfa,Ce as Zfa,EL as _fa,N5 as $fa,CL as aga,M4 as bga,kx as cga,Nx as dga,K6 as ega,yL as fga,SL as gga,dL as hga,cL as iga,nL as jga,iL as kga,te as lga,aL as mga,V00 as nga,fx as oga,B00 as pga,S as qga,_00 as rga,px as sga,z00 as tga,R00 as uga,F00 as vga,M00 as wga,D00 as xga,k0 as yga};