claude-code-zanii 2.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (669) hide show
  1. package/README.md +146 -0
  2. package/dist/chunks/AddWorkspaceDirectory-y_rd6sRl.js +1 -0
  3. package/dist/chunks/App-DgWSavG1.js +1 -0
  4. package/dist/chunks/ApproveApiKey-CJKWha-a.js +1 -0
  5. package/dist/chunks/ApproveApiKey-DTs2ExZH.js +1 -0
  6. package/dist/chunks/AssistantSessionChooser-BAhVk4id.js +1 -0
  7. package/dist/chunks/BackgroundTasksDialog-XU_JPh7R.js +2 -0
  8. package/dist/chunks/BypassPermissionsModeDialog-DV0Pi7ys.js +1 -0
  9. package/dist/chunks/ClaudeInChromeOnboarding-6erm_8Fn.js +1 -0
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-CjBvzB5s.js +1 -0
  11. package/dist/chunks/ClaudeMdExternalIncludesDialog-ts0XnWwl.js +1 -0
  12. package/dist/chunks/ConsoleOAuthFlow-DySPdSqQ.js +1 -0
  13. package/dist/chunks/CustomSelect-DqZxzBZP.js +1 -0
  14. package/dist/chunks/DesktopHandoff-5c90JK88.js +1 -0
  15. package/dist/chunks/DevChannelsDialog-DCMderzu.js +1 -0
  16. package/dist/chunks/Dialog-Dgg8bqcG.js +1 -0
  17. package/dist/chunks/DiffDialog-BU765aqh.js +6 -0
  18. package/dist/chunks/Doctor-B73iDB-d.js +3 -0
  19. package/dist/chunks/Doctor-CLZDdNRo.js +1 -0
  20. package/dist/chunks/ExitFlow-DBqn2mUf.js +2 -0
  21. package/dist/chunks/Feedback-D-JHabwi.js +2 -0
  22. package/dist/chunks/Grove-D-uQNMMo.js +11 -0
  23. package/dist/chunks/HybridTransport-B-G4QJcy.js +4 -0
  24. package/dist/chunks/ITermBackend-KP1vKsRN.js +1 -0
  25. package/dist/chunks/InProcessTransport-ByBEKxrQ.js +1 -0
  26. package/dist/chunks/InvalidConfigDialog-CMqiZ5nG.js +1 -0
  27. package/dist/chunks/InvalidSettingsDialog-CjPCKzVZ.js +1 -0
  28. package/dist/chunks/ListItem-B6MyhHvM.js +1 -0
  29. package/dist/chunks/MCPConnectionManager-BJ8PcYPe.js +1 -0
  30. package/dist/chunks/Message-DNxJ_tMS.js +1 -0
  31. package/dist/chunks/MessageSelector-D79Ug71B.js +3 -0
  32. package/dist/chunks/Messages-CtIbkB2M.js +11 -0
  33. package/dist/chunks/Onboarding-DVrgKrI9.js +1 -0
  34. package/dist/chunks/OverageCreditUpsell-D_td1ss4.js +1 -0
  35. package/dist/chunks/PermissionDialog-BCS22yEO.js +1 -0
  36. package/dist/chunks/PermissionDialog-C5O1fL53.js +1 -0
  37. package/dist/chunks/PermissionRequestTitle-CtlbBU9t.js +1 -0
  38. package/dist/chunks/PluginSettings-OPrg-_3N.js +17 -0
  39. package/dist/chunks/PressEnterToContinue-DmzxIgbZ.js +1 -0
  40. package/dist/chunks/PromptInputFooterSuggestions-CcsKj5DK.js +1 -0
  41. package/dist/chunks/PromptInputHelpMenu-JedFdsxU.js +1 -0
  42. package/dist/chunks/REPL-ByhyIRnf.js +1 -0
  43. package/dist/chunks/REPL-Clve-8zC.js +157 -0
  44. package/dist/chunks/RemoteCallout-BZcabEKb.js +1 -0
  45. package/dist/chunks/RemoteSessionManager-C2PIFDHt.js +1 -0
  46. package/dist/chunks/ResumeConversation-D3ZRTFcF.js +1 -0
  47. package/dist/chunks/SSETransport-DmZWnH0k.js +4 -0
  48. package/dist/chunks/SearchBox-DQg2Ph0V.js +1 -0
  49. package/dist/chunks/SearchExtraToolsTool-CLO4nt6N.js +1 -0
  50. package/dist/chunks/SentryErrorBoundary-BVfBaOOU.js +2 -0
  51. package/dist/chunks/SentryErrorBoundary-DIaVFad-.js +1 -0
  52. package/dist/chunks/Settings-rOCxQdS8.js +2 -0
  53. package/dist/chunks/TeleportProgress-CP8IY6bz.js +1 -0
  54. package/dist/chunks/TeleportRepoMismatchDialog-DMmHgBqo.js +1 -0
  55. package/dist/chunks/TeleportResumeWrapper-D5wEAW1-.js +1 -0
  56. package/dist/chunks/ThemePicker-Bgr7yOQB.js +1 -0
  57. package/dist/chunks/TmuxBackend-BzbtUtP1.js +9 -0
  58. package/dist/chunks/TrustDialog-BI5U3BQ0.js +1 -0
  59. package/dist/chunks/TungstenTool-CiQclNwj.js +1 -0
  60. package/dist/chunks/TungstenTool-kMqy-ifa.js +1 -0
  61. package/dist/chunks/ValidationErrorsList-DprGtB2w.js +2 -0
  62. package/dist/chunks/WelcomeV2-C4vfBnIy.js +1 -0
  63. package/dist/chunks/WindowsTerminalBackend-BSoezOCE.js +2 -0
  64. package/dist/chunks/add-dir-DpOmv6kv.js +1 -0
  65. package/dist/chunks/agentDisplay-DuYEwOwO.js +1 -0
  66. package/dist/chunks/agents-BlurXZrF.js +2 -0
  67. package/dist/chunks/agents-DhZf7ftU.js +103 -0
  68. package/dist/chunks/ajv-CDrSAj3O.js +8 -0
  69. package/dist/chunks/analytics-i6X1et4O.js +1 -0
  70. package/dist/chunks/ant-D9hd_iYy.js +1 -0
  71. package/dist/chunks/api-CoaOHwDQ.js +4 -0
  72. package/dist/chunks/api-DvyGR-L7.js +1 -0
  73. package/dist/chunks/api-YHYC4Zdk.js +1 -0
  74. package/dist/chunks/artifacts-BMAYdaqh.js +1 -0
  75. package/dist/chunks/asciicast-DpHRoebc.js +1 -0
  76. package/dist/chunks/asciicast-HG1EoAQe.js +4 -0
  77. package/dist/chunks/assistant-D4-qcNT1.js +1 -0
  78. package/dist/chunks/assistant-DO2ZmZn1.js +1 -0
  79. package/dist/chunks/assistant-Dd86NmJM.js +1 -0
  80. package/dist/chunks/attributionHooks-BUmHrLhB.js +1 -0
  81. package/dist/chunks/attributionTrailer-r2Pbpu2N.js +1 -0
  82. package/dist/chunks/auth-CF3BGNYT.js +1 -0
  83. package/dist/chunks/auth-DwWwG43F.js +1 -0
  84. package/dist/chunks/auth-V_Xk2iea.js +1 -0
  85. package/dist/chunks/autoMode-DUksX5_i.js +45 -0
  86. package/dist/chunks/autoModeDenials-0CPO-Jbu.js +1 -0
  87. package/dist/chunks/autonomy-C5mNhAdz.js +21 -0
  88. package/dist/chunks/autonomy-CLt1dWaC.js +1 -0
  89. package/dist/chunks/autonomyPanel-rioFnrQO.js +1 -0
  90. package/dist/chunks/axios-DPuSPBlH.js +1 -0
  91. package/dist/chunks/axios-Zh7qGPze.js +12 -0
  92. package/dist/chunks/backgroundHousekeeping-BGtfqu-J.js +1 -0
  93. package/dist/chunks/backgroundHousekeeping-BqKZEvy0.js +17 -0
  94. package/dist/chunks/banner-BGLr3KYQ.js +2 -0
  95. package/dist/chunks/base64-js-B1tFNiG0.js +1 -0
  96. package/dist/chunks/bedrockClient-BFzWuhQK.js +15 -0
  97. package/dist/chunks/bg-B-YgGwLj.js +9 -0
  98. package/dist/chunks/bg-IU4gG3jc.js +1 -0
  99. package/dist/chunks/branch-BWY5W7hf.js +3 -0
  100. package/dist/chunks/break-cache-CY-O23fJ.js +8 -0
  101. package/dist/chunks/bridge-CqWd70vK.js +2 -0
  102. package/dist/chunks/bridgeConfig-CWO8AmCY.js +1 -0
  103. package/dist/chunks/bridgeConfig-D38y9eXn.js +1 -0
  104. package/dist/chunks/bridgeConfig-EwUq__ct.js +1 -0
  105. package/dist/chunks/bridgeConfig-GYR-LUiu.js +1 -0
  106. package/dist/chunks/bridgeEnabled-DKqmLnKO.js +1 -0
  107. package/dist/chunks/bridgeEnabled-DZIGDtfY.js +1 -0
  108. package/dist/chunks/bridgeMain-CXVks2ND.js +1 -0
  109. package/dist/chunks/bridgeMain-D4nsECwJ.js +68 -0
  110. package/dist/chunks/bridgeMessaging-BUOZU_ba.js +1 -0
  111. package/dist/chunks/bridgePointer-BpzIEsD_.js +1 -0
  112. package/dist/chunks/browser-D1vC3BNd.js +1 -0
  113. package/dist/chunks/btw-CVXJwoXo.js +1 -0
  114. package/dist/chunks/buddy-BLcvL8lP.js +3 -0
  115. package/dist/chunks/bundledMode-DQNSSQbt.js +1 -0
  116. package/dist/chunks/caches-BrfvzKn5.js +1 -0
  117. package/dist/chunks/caches-CkSv3MfC.js +3 -0
  118. package/dist/chunks/capacityWake-BWCSatN6.js +1 -0
  119. package/dist/chunks/changeDetector-DEZU6tum.js +1 -0
  120. package/dist/chunks/changeDetector-Df7c6U3d.js +1 -0
  121. package/dist/chunks/channelAllowlist-BApjAS0V.js +1 -0
  122. package/dist/chunks/channelNotification-BjWwF85R.js +1 -0
  123. package/dist/chunks/channelNotification-D01YVwNj.js +1 -0
  124. package/dist/chunks/chokidar-DPwMBcWI.js +1 -0
  125. package/dist/chunks/chokidar-DkDXNCTz.js +1 -0
  126. package/dist/chunks/chrome-D7coxEOI.js +1 -0
  127. package/dist/chunks/chromeNativeHost-CPj9M_4-.js +1 -0
  128. package/dist/chunks/chunk-DR8-3Aex.js +1 -0
  129. package/dist/chunks/classPrivateFieldSet2-DZkxcFPS.js +1 -0
  130. package/dist/chunks/claudeAiLimitsHook-ATshVrOH.js +1 -0
  131. package/dist/chunks/claudeDesktop-PVa9tWsM.js +1 -0
  132. package/dist/chunks/cleanup-C-PGmKpV.js +1 -0
  133. package/dist/chunks/clear-CxGE9Ntr.js +1 -0
  134. package/dist/chunks/cliLaunch-CMXoY_LO.js +1 -0
  135. package/dist/chunks/client-BWED8Tbu.js +35 -0
  136. package/dist/chunks/client-CinDjeSq.js +7 -0
  137. package/dist/chunks/client-CpXGg9e0.js +1 -0
  138. package/dist/chunks/color-B3w_VQTn.js +1 -0
  139. package/dist/chunks/color-convert-BQZnVz_5.js +1 -0
  140. package/dist/chunks/commands-DFp48zwy.js +1 -0
  141. package/dist/chunks/commitAttribution-B0cXmbvv.js +2 -0
  142. package/dist/chunks/commitAttribution-DRSKRoH6.js +1 -0
  143. package/dist/chunks/common-BX7bn3hg.js +1 -0
  144. package/dist/chunks/common-Ce3LanTX.js +1 -0
  145. package/dist/chunks/common-DdLQuE2_.js +1 -0
  146. package/dist/chunks/common-HfKcqOYK.js +1 -0
  147. package/dist/chunks/compact-C8ljGMdo.js +3 -0
  148. package/dist/chunks/companion-mD1jw6xX.js +1 -0
  149. package/dist/chunks/completionCache-BqQXVTa9.js +1 -0
  150. package/dist/chunks/completionCache-BtP4vfAi.js +4 -0
  151. package/dist/chunks/computerUseLock-ADE_PhIK.js +1 -0
  152. package/dist/chunks/config-CmyaIIOY.js +1 -0
  153. package/dist/chunks/config-Rl1Y_Dtq.js +1 -0
  154. package/dist/chunks/connectHeadless-MFABhXpz.js +1 -0
  155. package/dist/chunks/constants-BM62Vf_X.js +1 -0
  156. package/dist/chunks/constants-BfXy-5cI.js +1 -0
  157. package/dist/chunks/context-BeiZkUNq.js +1 -0
  158. package/dist/chunks/context-noninteractive-CRdF3iv8.js +54 -0
  159. package/dist/chunks/controlMessageCompat-591iGHUK.js +1 -0
  160. package/dist/chunks/conversation-BoguXZEI.js +1 -0
  161. package/dist/chunks/conversation-yhs7tT-g.js +1 -0
  162. package/dist/chunks/copy-BpeUcqku.js +7 -0
  163. package/dist/chunks/createSSHSession-B3JOB4TE.js +6 -0
  164. package/dist/chunks/createSession-BJSnFBGt.js +1 -0
  165. package/dist/chunks/createSession-CnRHI3RU.js +1 -0
  166. package/dist/chunks/cron-iqTFGIos.js +1 -0
  167. package/dist/chunks/cronScheduler-zRXhgEEU.js +6 -0
  168. package/dist/chunks/cronTasks-CMJldfoP.js +2 -0
  169. package/dist/chunks/crossProjectResume-DxO6TX30.js +40 -0
  170. package/dist/chunks/cwd-B2guYBbl.js +1 -0
  171. package/dist/chunks/cwd-B5bbyUwz.js +1 -0
  172. package/dist/chunks/cwd-BXiaJzLh.js +1 -0
  173. package/dist/chunks/daemon-B3v4OoOu.js +2 -0
  174. package/dist/chunks/dangerousBackend-OmCzoW35.js +1 -0
  175. package/dist/chunks/datadog-3-Vvz0yz.js +1 -0
  176. package/dist/chunks/datadog-BQlp3bTs.js +1 -0
  177. package/dist/chunks/debug-BDBIipC1.js +2 -0
  178. package/dist/chunks/debug-C7tW7DFW.js +1 -0
  179. package/dist/chunks/debug-CjIaNjpK.js +5 -0
  180. package/dist/chunks/debugUtils-Dsg-UHeg.js +1 -0
  181. package/dist/chunks/defineProperty-CaCI0a5T.js +1 -0
  182. package/dist/chunks/desktop-C_SS0068.js +1 -0
  183. package/dist/chunks/detached-B7RNZeyl.js +5 -0
  184. package/dist/chunks/detect-libc-DFFGDzPC.js +1 -0
  185. package/dist/chunks/detectRepository-BnTCJAXR.js +1 -0
  186. package/dist/chunks/detectRepository-Gobn9eFt.js +1 -0
  187. package/dist/chunks/detection-CN_uLGU2.js +1 -0
  188. package/dist/chunks/detection-DW6grIlc.js +1 -0
  189. package/dist/chunks/diff-B8YmRG5T.js +1 -0
  190. package/dist/chunks/directoryCompletion-J560aATd.js +1 -0
  191. package/dist/chunks/dist-B1wOprSs.js +29 -0
  192. package/dist/chunks/dist-DZQOarNX.js +5 -0
  193. package/dist/chunks/dist-HZfkKiUF.js +20 -0
  194. package/dist/chunks/dist-es-4xyrZoNc2.js +1 -0
  195. package/dist/chunks/dist-es-6kjvVbJd.js +1 -0
  196. package/dist/chunks/dist-es-BJldFHbt.js +3 -0
  197. package/dist/chunks/dist-es-BM013UFT.js +1 -0
  198. package/dist/chunks/dist-es-BPPewn1A.js +1 -0
  199. package/dist/chunks/dist-es-BZGG3Hnm.js +1 -0
  200. package/dist/chunks/dist-es-BZjJL64k2.js +1 -0
  201. package/dist/chunks/dist-es-BctcPxLN.js +1 -0
  202. package/dist/chunks/dist-es-Bf2jR30y.js +1 -0
  203. package/dist/chunks/dist-es-BgLoR-hQ.js +1 -0
  204. package/dist/chunks/dist-es-BismPcTW.js +1 -0
  205. package/dist/chunks/dist-es-BrPzXmSP.js +1 -0
  206. package/dist/chunks/dist-es-Bu21Wvhs.js +1 -0
  207. package/dist/chunks/dist-es-BuWNNAXW.js +1 -0
  208. package/dist/chunks/dist-es-Bz11sFiK2.js +1 -0
  209. package/dist/chunks/dist-es-C5VplyPL2.js +5 -0
  210. package/dist/chunks/dist-es-C66BuLgn.js +1 -0
  211. package/dist/chunks/dist-es-CCIzgNln2.js +1 -0
  212. package/dist/chunks/dist-es-CLyx7Kge2.js +1 -0
  213. package/dist/chunks/dist-es-CUbatGdn.js +1 -0
  214. package/dist/chunks/dist-es-CYe_-TbD.js +1 -0
  215. package/dist/chunks/dist-es-C_IHUdzL.js +1 -0
  216. package/dist/chunks/dist-es-Ci_rKlMr.js +1 -0
  217. package/dist/chunks/dist-es-ClDZBAj7.js +1 -0
  218. package/dist/chunks/dist-es-Cp--qjOi.js +1 -0
  219. package/dist/chunks/dist-es-CzE4kW1L.js +9 -0
  220. package/dist/chunks/dist-es-DUg5w7-v.js +1 -0
  221. package/dist/chunks/dist-es-Dl0ZRczY.js +1 -0
  222. package/dist/chunks/dist-es-Do_155z5.js +1 -0
  223. package/dist/chunks/dist-es-DxIM0jd82.js +1 -0
  224. package/dist/chunks/dist-es-Fav2oBDs.js +1 -0
  225. package/dist/chunks/dist-es-TZjwPaGn.js +1 -0
  226. package/dist/chunks/dist-es-W22ud2el2.js +1 -0
  227. package/dist/chunks/dist-es-aU8-02YH.js +1 -0
  228. package/dist/chunks/dist-es-b3yZSGx82.js +1 -0
  229. package/dist/chunks/dist-es-dIP5JtXz.js +5 -0
  230. package/dist/chunks/dist-es-mQ4HvnYs2.js +1 -0
  231. package/dist/chunks/distRoot-CJaacAHy.js +1 -0
  232. package/dist/chunks/doctor-DLZPF4iY.js +1 -0
  233. package/dist/chunks/earlyInput-BTI1CSNt.js +2 -0
  234. package/dist/chunks/earlyInput-BwGtzhhP.js +1 -0
  235. package/dist/chunks/effort-BaHvpBWr.js +9 -0
  236. package/dist/chunks/entry-_e-lyRwv.js +14 -0
  237. package/dist/chunks/env-CesrOJJq.js +1 -0
  238. package/dist/chunks/envLessBridgeConfig-4oys0_9A.js +1 -0
  239. package/dist/chunks/envLessBridgeConfig-DJ1Sts3F.js +1 -0
  240. package/dist/chunks/envUtils-CFG7IQID.js +1 -0
  241. package/dist/chunks/errorLogSink-Ti4Suoz6.js +2 -0
  242. package/dist/chunks/escHotkey-CVn_80xM.js +259 -0
  243. package/dist/chunks/esm-BFnjHW38.js +1 -0
  244. package/dist/chunks/esm-BQg_LX3V.js +1 -0
  245. package/dist/chunks/esm-BtC6CMmM.js +1 -0
  246. package/dist/chunks/esm-BwzC0MQp.js +1 -0
  247. package/dist/chunks/esm-CFybeQ_Q.js +1 -0
  248. package/dist/chunks/esm-CK-5CT5X.js +1 -0
  249. package/dist/chunks/esm-CL1OwlZB.js +1 -0
  250. package/dist/chunks/esm-CMzgSTAl.js +1 -0
  251. package/dist/chunks/esm-CPE_H2Lx.js +1 -0
  252. package/dist/chunks/esm-CcWquv5a.js +10 -0
  253. package/dist/chunks/esm-CeNEpRZt.js +1 -0
  254. package/dist/chunks/esm-D7hykoRB.js +1 -0
  255. package/dist/chunks/esm-DUtcefEV.js +1 -0
  256. package/dist/chunks/esm-DhrUwJBp.js +1 -0
  257. package/dist/chunks/esm-Duu1fRQ8.js +1 -0
  258. package/dist/chunks/esm-Ght2BaU2.js +1 -0
  259. package/dist/chunks/esm-Q6Yz2GMx.js +56 -0
  260. package/dist/chunks/esm-WONEiurY.js +13 -0
  261. package/dist/chunks/event-streams-BumpU1aB.js +1 -0
  262. package/dist/chunks/eventLoopStallDetector-DxyFdg1h.js +1 -0
  263. package/dist/chunks/execAsync-ChKxDZ8C.js +1 -0
  264. package/dist/chunks/execFileNoThrow-DdmR1mBS.js +1 -0
  265. package/dist/chunks/execSyncWrapper-Ch4TNj8u.js +1 -0
  266. package/dist/chunks/execa-BMaINL7N.js +34 -0
  267. package/dist/chunks/executor-C7INr19-.js +1 -0
  268. package/dist/chunks/executor-Dnf3YYma.js +1604 -0
  269. package/dist/chunks/exit-BakzsOD0.js +1 -0
  270. package/dist/chunks/exit-CiDn2tN9.js +2 -0
  271. package/dist/chunks/export-b-6pqMqz.js +2 -0
  272. package/dist/chunks/exportRenderer-RxtEIyTm.js +1 -0
  273. package/dist/chunks/extra-usage-7EPJNjNW.js +1 -0
  274. package/dist/chunks/extra-usage-ChvuewCq.js +1 -0
  275. package/dist/chunks/extra-usage-core-BVhLtoDF.js +1 -0
  276. package/dist/chunks/extra-usage-noninteractive-_Njh6q-q.js +1 -0
  277. package/dist/chunks/extraUsage-qOBMQB6g.js +1 -0
  278. package/dist/chunks/extractMemories-CRBVNiG1.js +1 -0
  279. package/dist/chunks/fast-C4uw_g7o.js +1 -0
  280. package/dist/chunks/fast-CEaIzaPl.js +1 -0
  281. package/dist/chunks/featureCheck-B1GSTyhh.js +1 -0
  282. package/dist/chunks/featureCheck-DKigAPal.js +1 -0
  283. package/dist/chunks/feedback-Bf3TjjuD.js +1 -0
  284. package/dist/chunks/figures-fES5sASd.js +1 -0
  285. package/dist/chunks/fileStateCache-DAsLEZau.js +1 -0
  286. package/dist/chunks/files-B-m_4X8b.js +2 -0
  287. package/dist/chunks/findExecutable-D8vJrFnO.js +1 -0
  288. package/dist/chunks/firstPartyEventLogger-BtrGagNa.js +1 -0
  289. package/dist/chunks/flushGate-2zqab-Pp.js +1 -0
  290. package/dist/chunks/foundry-sdk-CtX8C0x3.js +1 -0
  291. package/dist/chunks/fpsMetrics-ts_jaF3g.js +1 -0
  292. package/dist/chunks/fuse-ivQ_eRwF.js +1 -0
  293. package/dist/chunks/gates-CmKoQ0O-.js +1 -0
  294. package/dist/chunks/gates-_wbPDQ3M.js +1 -0
  295. package/dist/chunks/gemini-DRx495gn.js +3 -0
  296. package/dist/chunks/generateRecap-Cv8gd_QF.js +1 -0
  297. package/dist/chunks/generateSessionName-Dpjg-u_x.js +1 -0
  298. package/dist/chunks/genericProcessUtils-BFJMxLqn.js +23 -0
  299. package/dist/chunks/getMachineId-bsd-C9pL9Ajr.js +1 -0
  300. package/dist/chunks/getMachineId-darwin-Ma4F9rJg.js +2 -0
  301. package/dist/chunks/getMachineId-linux-C0lXMqsj.js +1 -0
  302. package/dist/chunks/getMachineId-unsupported-ByHQTXat.js +1 -0
  303. package/dist/chunks/getMachineId-win-DZsXZmTz.js +1 -0
  304. package/dist/chunks/git-Bj8Ow4pJ.js +6 -0
  305. package/dist/chunks/git-Q_b4oZ17.js +1 -0
  306. package/dist/chunks/githubRepoPathMapping-DGivBX9h.js +1 -0
  307. package/dist/chunks/goal-BrHEJv8o.js +3 -0
  308. package/dist/chunks/goalStorage-CsuPOQbk.js +1 -0
  309. package/dist/chunks/graceful-fs-BuPWC-vB.js +2 -0
  310. package/dist/chunks/grok-CDkDDaY_.js +1 -0
  311. package/dist/chunks/growthbook-D3_Cr9n-.js +1 -0
  312. package/dist/chunks/growthbook-p4aJ_UMv.js +32 -0
  313. package/dist/chunks/hash-KW-tVnPp.js +1 -0
  314. package/dist/chunks/heapdump-CloylIZ9.js +5 -0
  315. package/dist/chunks/help-DpSJlHIc.js +1 -0
  316. package/dist/chunks/hooks-2pogt8nv.js +79 -0
  317. package/dist/chunks/hooks-BBODdwnE.js +1 -0
  318. package/dist/chunks/hostAdapter-B5KTUqhv.js +1 -0
  319. package/dist/chunks/hostGuard-DyWr2TwE.js +1 -0
  320. package/dist/chunks/httpAuthSchemes-CgPbtGos.js +13 -0
  321. package/dist/chunks/ide-CJEcfBZq.js +2 -0
  322. package/dist/chunks/inboundAttachments-RNpYpRTO.js +1 -0
  323. package/dist/chunks/index.min-DCDiLq-j.js +1 -0
  324. package/dist/chunks/initReplBridge-D2E6IM2B.js +1 -0
  325. package/dist/chunks/initReplBridge-p2uwDBPx.js +1 -0
  326. package/dist/chunks/insights-DnpZScKs.js +822 -0
  327. package/dist/chunks/install-D_vTxUlG.js +1 -0
  328. package/dist/chunks/install-github-app-BK8A7g3i.js +147 -0
  329. package/dist/chunks/install-slack-app-C47R9VoI.js +1 -0
  330. package/dist/chunks/instinctParser-DxKdI3JC.js +1 -0
  331. package/dist/chunks/instrumentation-DkdAJFrZ.js +12 -0
  332. package/dist/chunks/intl-Pse97ORk.js +1 -0
  333. package/dist/chunks/isObject-DaxDnPKm.js +1 -0
  334. package/dist/chunks/isSymbol-D7QeUnS5.js +1 -0
  335. package/dist/chunks/job-opl00C4l.js +2 -0
  336. package/dist/chunks/json-bigint-BRRVs1dv.js +8 -0
  337. package/dist/chunks/jsx-runtime-BTgGEFjL.js +1 -0
  338. package/dist/chunks/jws-B_ieuaZg.js +3 -0
  339. package/dist/chunks/jwtUtils-D-tJzoJY.js +1 -0
  340. package/dist/chunks/keybindings-mRf9VSe8.js +2 -0
  341. package/dist/chunks/lang-eH4EJErj.js +1 -0
  342. package/dist/chunks/language-DD9ar6RA.js +1 -0
  343. package/dist/chunks/language-EZLNdETg.js +1 -0
  344. package/dist/chunks/launchAgentsPlatform-Cq0_7-IM.js +1 -0
  345. package/dist/chunks/launchAutofixPr-Bw7aUHUs.js +18 -0
  346. package/dist/chunks/launchCommand-Bk1Fn-qZ.js +1 -0
  347. package/dist/chunks/launchLocalMemory-CLBCUgwd.js +3 -0
  348. package/dist/chunks/launchLocalVault-BfWJWrBg.js +3 -0
  349. package/dist/chunks/launchMemoryStores-DdnSVSDZ.js +1 -0
  350. package/dist/chunks/launchOnboarding-ziCEX3GI.js +8 -0
  351. package/dist/chunks/launchSchedule-G_c7sgmy.js +1 -0
  352. package/dist/chunks/launchSkillStore-Z1Kd7nCg.js +1 -0
  353. package/dist/chunks/launchTeleport-Dp9AFbPx.js +3 -0
  354. package/dist/chunks/launchVault-hwK-Ljek.js +1 -0
  355. package/dist/chunks/lazySchema-2sOku3cX.js +1 -0
  356. package/dist/chunks/lib-BHRYgENJ.js +8 -0
  357. package/dist/chunks/lib-DRyNc7xD.js +2 -0
  358. package/dist/chunks/lib-Ddq71jM5.js +14 -0
  359. package/dist/chunks/loadAgentsDir-Bz0FfcVt.js +5620 -0
  360. package/dist/chunks/loadAgentsDir-CLM0ws7u.js +1 -0
  361. package/dist/chunks/loadPluginHooks-B5SIS2uo.js +1 -0
  362. package/dist/chunks/loadSso-RY87rrJO.js +1 -0
  363. package/dist/chunks/localSearch-BLF6PSv2.js +1 -0
  364. package/dist/chunks/localSearch-CTycGe3E.js +1 -0
  365. package/dist/chunks/localSearch-inDahM8I.js +1 -0
  366. package/dist/chunks/lockfile--gk1HDM6.js +1 -0
  367. package/dist/chunks/log-B-Nj3Yed.js +1 -0
  368. package/dist/chunks/log-DVv8YiNo.js +1 -0
  369. package/dist/chunks/login-BeLvLowc.js +1 -0
  370. package/dist/chunks/login-DUUOeNoz.js +1 -0
  371. package/dist/chunks/logoV2Utils-D5SpeZ3C.js +1 -0
  372. package/dist/chunks/logout-C2QuTBdS.js +1 -0
  373. package/dist/chunks/magicDocs-CUXKi-Wv.js +57 -0
  374. package/dist/chunks/main-CFhpWtpC.js +1420 -0
  375. package/dist/chunks/main-sboa5RKc.js +31 -0
  376. package/dist/chunks/mappers-DLkk0PZz.js +1 -0
  377. package/dist/chunks/mcp-C2f6IgAp.js +2 -0
  378. package/dist/chunks/mcp-Djui9m3_.js +6 -0
  379. package/dist/chunks/mcp-DvTSxrJ4.js +1 -0
  380. package/dist/chunks/mcpServer-DMA0bdFC.js +1 -0
  381. package/dist/chunks/mcpServer-DxEHfW2v.js +1 -0
  382. package/dist/chunks/memoize-Bg2dXTzV.js +1 -0
  383. package/dist/chunks/memoize-DNnuA2aU.js +1 -0
  384. package/dist/chunks/memory-B9io9Zcv.js +1 -0
  385. package/dist/chunks/mobile-CPnnvkQV.js +2 -0
  386. package/dist/chunks/modalContext-B1b0Gsro.js +1 -0
  387. package/dist/chunks/mode-BDgwh_Xb.js +2 -0
  388. package/dist/chunks/model-B6cpEh-s.js +1 -0
  389. package/dist/chunks/model-BcunOCC9.js +1 -0
  390. package/dist/chunks/modelOptions-CHUHQ9WG.js +1 -0
  391. package/dist/chunks/normalization-cjPqid31.js +1 -0
  392. package/dist/chunks/oauth-CnBLewrU.js +1 -0
  393. package/dist/chunks/oauth-DMPGYAoZ.js +1 -0
  394. package/dist/chunks/observationStore-DVBxrSdI.js +4 -0
  395. package/dist/chunks/onChangeAppState-M61XDN6V.js +1 -0
  396. package/dist/chunks/open-CsUNPSNx.js +1 -0
  397. package/dist/chunks/openai-BHvlYW3m.js +2 -0
  398. package/dist/chunks/output-style-BtKuBrs4.js +1 -0
  399. package/dist/chunks/outputStyles-hHuIBkRB.js +84 -0
  400. package/dist/chunks/overageCreditGrant-BLFT-rF3.js +1 -0
  401. package/dist/chunks/p-map-C-WNcN6g.js +1 -0
  402. package/dist/chunks/p-map-CQ2NythB.js +1 -0
  403. package/dist/chunks/package-9IAs5Qf0.js +1 -0
  404. package/dist/chunks/panel-27xLZI7c.js +1 -0
  405. package/dist/chunks/panel-NoDfShEZ.js +1 -0
  406. package/dist/chunks/panelCall-CEOWVNCM.js +1 -0
  407. package/dist/chunks/parseConnectUrl-CxU4IX9o.js +1 -0
  408. package/dist/chunks/parser-DGlAnaNj.js +1 -0
  409. package/dist/chunks/parser-DGoLe2RS.js +1 -0
  410. package/dist/chunks/passes-CExcqu66.js +1 -0
  411. package/dist/chunks/path-uaxlnhva.js +1 -0
  412. package/dist/chunks/permissions-B3PceQul.js +1 -0
  413. package/dist/chunks/permissions-DezIL2xF.js +3 -0
  414. package/dist/chunks/permissions-DnpI8Whh.js +1 -0
  415. package/dist/chunks/pipeTransport-CB_Wq_Kx.js +1 -0
  416. package/dist/chunks/plan-cfZBclh9.js +1 -0
  417. package/dist/chunks/platform-BXz_rgpy.js +2 -0
  418. package/dist/chunks/plist-DLGDWBD6.js +6 -0
  419. package/dist/chunks/plugin-CuhENLRs.js +1 -0
  420. package/dist/chunks/pluginAutoupdate-wTeOXfQe.js +1 -0
  421. package/dist/chunks/pluginBlocklist-D6pkKfXr.js +1 -0
  422. package/dist/chunks/pluginCliCommands-DqxdCwsq.js +1 -0
  423. package/dist/chunks/pluginFlagging-CjH48f-K.js +1 -0
  424. package/dist/chunks/pluginOperations-DMFYB3pK.js +2 -0
  425. package/dist/chunks/pluginStartupCheck-BW3_KfZz.js +1 -0
  426. package/dist/chunks/pluginStartupCheck-Cj2BMjVw.js +1 -0
  427. package/dist/chunks/plugins-CarsG2v8.js +4 -0
  428. package/dist/chunks/policyLimits-DFn1vHkN.js +1 -0
  429. package/dist/chunks/pollConfig-C8nODJY1.js +1 -0
  430. package/dist/chunks/poller-DXZJ-dUP.js +1 -0
  431. package/dist/chunks/poor-C7GQ4a5X.js +1 -0
  432. package/dist/chunks/poorMode-CBe0rfxB.js +1 -0
  433. package/dist/chunks/poorMode-CbZTudtw.js +1 -0
  434. package/dist/chunks/postCommitAttribution--vvAWIqD.js +1 -0
  435. package/dist/chunks/print-CwwtGSbK.js +114 -0
  436. package/dist/chunks/privacy-settings-Bz8cAVp5.js +11 -0
  437. package/dist/chunks/privacyLevel-CRCHhztk.js +1 -0
  438. package/dist/chunks/process-CnhUplBr.js +1 -0
  439. package/dist/chunks/process-X4vCP9x0.js +1 -0
  440. package/dist/chunks/processBashCommand-NL0YEUqW.js +3 -0
  441. package/dist/chunks/processSlashCommand-FPMWElsI.js +6 -0
  442. package/dist/chunks/processSlashCommand-_oJs6_w8.js +6 -0
  443. package/dist/chunks/processUserInput-QAJK0XSn.js +1 -0
  444. package/dist/chunks/projectContext-B21hXj9q.js +1 -0
  445. package/dist/chunks/projectContext-DbTQHQS3.js +1 -0
  446. package/dist/chunks/prompt-C6eleu4x.js +1 -0
  447. package/dist/chunks/prompt-CUdoQXyN.js +1 -0
  448. package/dist/chunks/prompt-CsBCtw4l.js +228 -0
  449. package/dist/chunks/prompt-hnIDYhP4.js +54 -0
  450. package/dist/chunks/promptEditor-CrlVcc17.js +4 -0
  451. package/dist/chunks/protectedNamespace-Cn4901XG.js +1 -0
  452. package/dist/chunks/protocolHandler-DM_w7sJ5.js +13 -0
  453. package/dist/chunks/protocols-CpoQzjyI.js +7 -0
  454. package/dist/chunks/proxy-9WvtUy8E.js +99 -0
  455. package/dist/chunks/rate-limit-options-BehQ3MoX.js +1 -0
  456. package/dist/chunks/rcDebugLog-BbHlIxCm.js +11 -0
  457. package/dist/chunks/referral-BfAZEIZL.js +1 -0
  458. package/dist/chunks/refresh-Bl3Miver.js +1 -0
  459. package/dist/chunks/registerProtocol-BHZ3vZED.js +36 -0
  460. package/dist/chunks/registerSkillHooks-BR7v5qDA.js +1 -0
  461. package/dist/chunks/registry-C2igpRd-.js +1 -0
  462. package/dist/chunks/release-notes-C_Cou6ye.js +4 -0
  463. package/dist/chunks/releaseNotes-DveQShyB.js +2 -0
  464. package/dist/chunks/reload-plugins-D-pAUoB5.js +1 -0
  465. package/dist/chunks/remote-env-C_dBgbgo.js +1 -0
  466. package/dist/chunks/remoteBridgeCore-BxWhTy1u.js +1 -0
  467. package/dist/chunks/remoteControlServer-D3OjUlB-.js +3 -0
  468. package/dist/chunks/rename-f3m0ETSt.js +1 -0
  469. package/dist/chunks/renderOptions-QZLxGnh_.js +1 -0
  470. package/dist/chunks/replBridge-qeVmCJOb.js +1 -0
  471. package/dist/chunks/resume-CM_8p9Iu.js +2 -0
  472. package/dist/chunks/rewind-0cB7o6fx.js +1 -0
  473. package/dist/chunks/ripgrep-BEWqxrpl.js +5 -0
  474. package/dist/chunks/ripgrep-G82m12Ng.js +1 -0
  475. package/dist/chunks/rollback-CVo2gqgR.js +11 -0
  476. package/dist/chunks/runtimeObserver-1EdvvoYw.js +1 -0
  477. package/dist/chunks/runtimeObserver-CX6vepq9.js +10 -0
  478. package/dist/chunks/sandbox-adapter-DzHfW2tH.js +1 -0
  479. package/dist/chunks/sandbox-toggle-N6KgmH2T.js +1 -0
  480. package/dist/chunks/sanitization-CIBpY9KT.js +1 -0
  481. package/dist/chunks/satisfies-B7ZvBUQP.js +1 -0
  482. package/dist/chunks/schemas-Bwt-7U5W.js +40 -0
  483. package/dist/chunks/sdk-Drp69kIx.js +1 -0
  484. package/dist/chunks/sdkHeapDumpMonitor-B9GVkISU.js +1 -0
  485. package/dist/chunks/searchExtraTools-BphNJsl8.js +1 -0
  486. package/dist/chunks/semver-BsItM2Z4.js +1 -0
  487. package/dist/chunks/semver-D3lOjiBN.js +1 -0
  488. package/dist/chunks/sentry-ySzRCXGd.js +1 -0
  489. package/dist/chunks/server-C8nMDji6.js +1 -0
  490. package/dist/chunks/server-XZG51Slr.js +1 -0
  491. package/dist/chunks/serverBanner-D68EBGzH.js +1 -0
  492. package/dist/chunks/serverLog-hv2hc5US.js +1 -0
  493. package/dist/chunks/session-CVoGFb8a.js +2 -0
  494. package/dist/chunks/sessionDataUploader-BaD1Q7v3.js +1 -0
  495. package/dist/chunks/sessionDiscovery-D7g66TX6.js +1 -0
  496. package/dist/chunks/sessionFileAccessHooks-9lPjspRX.js +1 -0
  497. package/dist/chunks/sessionManager-BhOjMNAP.js +1 -0
  498. package/dist/chunks/sessionMemory-BA6cdxqP.js +1 -0
  499. package/dist/chunks/sessionMemory-CtEhIRGF.js +1 -0
  500. package/dist/chunks/sessionMemoryUtils-D_B92ypa.js +1 -0
  501. package/dist/chunks/sessionObserver-CESI-uVZ.js +1 -0
  502. package/dist/chunks/sessionObserver-SpE_eglb.js +20 -0
  503. package/dist/chunks/sessionRestore-DqsqYK4K.js +1 -0
  504. package/dist/chunks/sessionState-Dgky34M4.js +1 -0
  505. package/dist/chunks/sessionStorage-DJb5HKhQ.js +1 -0
  506. package/dist/chunks/sessionStorage-DSMfHTcg.js +1 -0
  507. package/dist/chunks/sessionStoragePortable-DyM_hZnp.js +3 -0
  508. package/dist/chunks/sessionTitle-Bzxk_EW9.js +14 -0
  509. package/dist/chunks/sessionTracing-DR8O0686.js +12 -0
  510. package/dist/chunks/setup-BHNS9sBS.js +9 -0
  511. package/dist/chunks/setup-BafJxZ0F.js +4 -0
  512. package/dist/chunks/setup-MLNNYLi6.js +1 -0
  513. package/dist/chunks/shadowedRuleDetection-Ch9gTxfD.js +1 -0
  514. package/dist/chunks/shellQuote-3s6tV-hK.js +1 -0
  515. package/dist/chunks/sideQuestion-BBn6XIOD.js +20 -0
  516. package/dist/chunks/signal-BTxmab6r.js +1 -0
  517. package/dist/chunks/signin-ChbUAEGq.js +1 -0
  518. package/dist/chunks/sink-B1qICbRh.js +1 -0
  519. package/dist/chunks/sink-yBIcxQf1.js +1 -0
  520. package/dist/chunks/sinks-C7weduDR.js +1 -0
  521. package/dist/chunks/skill-learning-08nEdOJ2.js +5 -0
  522. package/dist/chunks/skillGapStore-CuvWGqFb.js +5 -0
  523. package/dist/chunks/skillGapStore-DmMuDXKO.js +1 -0
  524. package/dist/chunks/skillGenerator-mEMjcmmm.js +8 -0
  525. package/dist/chunks/skillLearning-B3a-8Ys3.js +1 -0
  526. package/dist/chunks/skillLearning-q5T6o0mH.js +1 -0
  527. package/dist/chunks/skillPanel-BuUMhONI.js +28 -0
  528. package/dist/chunks/skillSearchPanel-BUEv7Sm9.js +21 -0
  529. package/dist/chunks/skillUsageTracking-BBTiWOKB.js +1 -0
  530. package/dist/chunks/skills-DvQuQfDW.js +1 -0
  531. package/dist/chunks/slashCommandParsing-BkTC3GRb.js +1 -0
  532. package/dist/chunks/sleep-CC8jykQd.js +1 -0
  533. package/dist/chunks/slowOperations-niPqC54V.js +1 -0
  534. package/dist/chunks/sprites-C5X62Vyh.js +1 -0
  535. package/dist/chunks/src-58uAJYF_.js +6 -0
  536. package/dist/chunks/src-7Y8fx6gl.js +2 -0
  537. package/dist/chunks/src-BuserDTl.js +1 -0
  538. package/dist/chunks/src-CMY4XoRy.js +1 -0
  539. package/dist/chunks/src-CfeAM1FB.js +1 -0
  540. package/dist/chunks/src-CxT2FDXy.js +1 -0
  541. package/dist/chunks/src-CyQf7rVu.js +26 -0
  542. package/dist/chunks/src-DJLbU8sT.js +1 -0
  543. package/dist/chunks/src-DJQlyVK6.js +5 -0
  544. package/dist/chunks/src-DNHWYkls.js +53 -0
  545. package/dist/chunks/src-DU_g0n_Q.js +1 -0
  546. package/dist/chunks/src-DhqzQjMg.js +19 -0
  547. package/dist/chunks/src-Duzv1Znh.js +1 -0
  548. package/dist/chunks/src-OBx6GAig.js +1 -0
  549. package/dist/chunks/src-WjnK2Dbo.js +1 -0
  550. package/dist/chunks/src-hjAMxWFj.js +7 -0
  551. package/dist/chunks/src-lLwoqdC0.js +9 -0
  552. package/dist/chunks/src-yRsWbJp_.js +2 -0
  553. package/dist/chunks/sso-oidc-yfC-A2A2.js +1 -0
  554. package/dist/chunks/startupProfiler-4P7GdVw6.js +3 -0
  555. package/dist/chunks/startupProfiler-CipS0otN.js +1 -0
  556. package/dist/chunks/state-9wSimHaL.js +1 -0
  557. package/dist/chunks/state-BQkyHx88.js +1 -0
  558. package/dist/chunks/state-CEAUTY3A.js +1 -0
  559. package/dist/chunks/state-CUZTq6r0.js +1 -0
  560. package/dist/chunks/state-U0HNbTx8.js +1 -0
  561. package/dist/chunks/staticRender-BB3CisKd.js +1 -0
  562. package/dist/chunks/stats-Dyi2U_mq.js +1 -0
  563. package/dist/chunks/status-CSL-GMou.js +1 -0
  564. package/dist/chunks/statusNoticeHelpers-BaXE951d.js +1 -0
  565. package/dist/chunks/stdio-BuUJYJFs.js +3 -0
  566. package/dist/chunks/stdio-iX0TTmbp.js +1 -0
  567. package/dist/chunks/stickers-2CRSckfH.js +1 -0
  568. package/dist/chunks/store-DdfsZvtr.js +1 -0
  569. package/dist/chunks/stringUtils-U7kMYMJq.js +4 -0
  570. package/dist/chunks/sts-CJmdeT7s.js +1 -0
  571. package/dist/chunks/subprocessEnv-DKTILev5.js +1 -0
  572. package/dist/chunks/subprocessEnv-WjRguKWf.js +1 -0
  573. package/dist/chunks/supports-color-DaytqqjM.js +1 -0
  574. package/dist/chunks/systemPromptSections-BnrxBWdc.js +1 -0
  575. package/dist/chunks/systemPromptSections-Dk6azdAb.js +1 -0
  576. package/dist/chunks/systemTheme-C1GNqIfy.js +1 -0
  577. package/dist/chunks/tag-C4cH016L.js +11 -0
  578. package/dist/chunks/tasks-CEdUW3RQ.js +1 -0
  579. package/dist/chunks/teamHelpers-CTA_CtTT.js +1 -0
  580. package/dist/chunks/teamHelpers-D65qZInv.js +1 -0
  581. package/dist/chunks/teammate-C-FiRloZ.js +1 -0
  582. package/dist/chunks/teammateModeSnapshot-DWRG5-Us.js +1 -0
  583. package/dist/chunks/teammateModeSnapshot-DtgsNj1G.js +1 -0
  584. package/dist/chunks/teleport-C_UgMy0V.js +1 -0
  585. package/dist/chunks/templateJobs-CMbS0tuk.js +12 -0
  586. package/dist/chunks/terminalSetup--jwGVap8.js +33 -0
  587. package/dist/chunks/terminalSetup-zID-wokH.js +1 -0
  588. package/dist/chunks/theme-C6XwTpVy.js +1 -0
  589. package/dist/chunks/thinkback-CVLnmLAT.js +1 -0
  590. package/dist/chunks/thinkback-MeOOO7gf.js +1 -0
  591. package/dist/chunks/thinkback-play-D7G260F4.js +1 -0
  592. package/dist/chunks/tmux-DtYJuTWh.js +1 -0
  593. package/dist/chunks/toolEventObserver-BtC9xDYY.js +1 -0
  594. package/dist/chunks/toolEventObserver-MfsHAt8h.js +1 -0
  595. package/dist/chunks/toolPool-CEi_2xIH.js +1 -0
  596. package/dist/chunks/toolPool-CdYJcCnc.js +1 -0
  597. package/dist/chunks/trustedDevice-CjQTGAa4.js +1 -0
  598. package/dist/chunks/trustedDevice-DADcxAAs.js +1 -0
  599. package/dist/chunks/tui-B8Ijq4Pk.js +6 -0
  600. package/dist/chunks/turndown.es-T-Xe93nc.js +69 -0
  601. package/dist/chunks/types-BVelRhgb.js +17 -0
  602. package/dist/chunks/types-Bqp3meR4.js +1 -0
  603. package/dist/chunks/types-CNmINIu3.js +1 -0
  604. package/dist/chunks/types-DgzOOCDl.js +3 -0
  605. package/dist/chunks/udsClient-ClY_0CKr.js +1 -0
  606. package/dist/chunks/ultrareviewCommand-CqvHj9Io.js +3 -0
  607. package/dist/chunks/undercover-CVCVOSrs.js +1 -0
  608. package/dist/chunks/undercover-CbxiJO2b.js +31 -0
  609. package/dist/chunks/up-CBJhVVbd.js +12 -0
  610. package/dist/chunks/updateCCB-DPPpquAw.js +11 -0
  611. package/dist/chunks/upgrade-DaaHOvft.js +1 -0
  612. package/dist/chunks/upgrade-k7ZvAWZ0.js +1 -0
  613. package/dist/chunks/upload-CEDxwMa1.js +1 -0
  614. package/dist/chunks/upstreamproxy-BtGJ2LRi.js +11 -0
  615. package/dist/chunks/usage-CsUSu4fb.js +1 -0
  616. package/dist/chunks/usage-oABvixCs.js +1 -0
  617. package/dist/chunks/useExitOnCtrlCDWithKeybindings-CBce_-hb.js +1 -0
  618. package/dist/chunks/useExitOnCtrlCDWithKeybindings-CLYjTZXb.js +1 -0
  619. package/dist/chunks/useKeybinding-DAQL_dB_.js +1 -0
  620. package/dist/chunks/useMainLoopModel-QC_H3esG.js +1 -0
  621. package/dist/chunks/useManageMCPConnections-bf-VfJGD.js +1 -0
  622. package/dist/chunks/useManagePlugins-CXdYUpit.js +1 -0
  623. package/dist/chunks/useMergedTools-DERzhQOJ.js +1 -0
  624. package/dist/chunks/useSearchInput-nqhdILI2.js +1 -0
  625. package/dist/chunks/useTerminalSize-DzV4aaTi.js +1 -0
  626. package/dist/chunks/useVoice-CO69xtWC.js +1 -0
  627. package/dist/chunks/util-C8wqPqv0.js +1 -0
  628. package/dist/chunks/utils-CDFsSXHr.js +1 -0
  629. package/dist/chunks/utils-ZO5TryVH.js +1 -0
  630. package/dist/chunks/v4-DLhvDPkt.js +1 -0
  631. package/dist/chunks/validatePlugin-C4cd71Yz.js +1 -0
  632. package/dist/chunks/vertex-sdk-CC3U26o7.js +9 -0
  633. package/dist/chunks/vim-BNiQx5Vf.js +1 -0
  634. package/dist/chunks/voice-BCbnJzYL.js +8 -0
  635. package/dist/chunks/voice-BJyz9KZO.js +8 -0
  636. package/dist/chunks/voice-CP2ULpju.js +2 -0
  637. package/dist/chunks/voiceModeEnabled-C-pa8B3Q.js +1 -0
  638. package/dist/chunks/voiceModeEnabled-CMtRN2pa.js +1 -0
  639. package/dist/chunks/voiceStreamSTT-31b2u0rj.js +1 -0
  640. package/dist/chunks/voiceStreamSTT-Fkhm6Ftg.js +1 -0
  641. package/dist/chunks/voiceStreamSTT-sI-hg-aP.js +1 -0
  642. package/dist/chunks/web-tools-CLmlPgLk.js +1 -0
  643. package/dist/chunks/which-C0ex-06E.js +1 -0
  644. package/dist/chunks/windowsPaths-C5TNvKYu.js +1 -0
  645. package/dist/chunks/windowsPaths-Kue_7s52.js +1 -0
  646. package/dist/chunks/workSecret-Dh5Ayceu.js +1 -0
  647. package/dist/chunks/workerRegistry-B5iWYqpK.js +1 -0
  648. package/dist/chunks/worktree-BypJA0GB.js +1 -0
  649. package/dist/chunks/worktreeModeEnabled-DPTdK3JV.js +1 -0
  650. package/dist/chunks/worktreeModeEnabled-Dtrcn7eD.js +1 -0
  651. package/dist/chunks/wrapper-BDPb4PTV.js +6 -0
  652. package/dist/chunks/wrapper-DRTs77RK.js +1 -0
  653. package/dist/chunks/xdg-BaVL-FHd.js +1 -0
  654. package/dist/chunks/xml-E8VMPwdJ.js +1 -0
  655. package/dist/chunks/zod-B_P2Eo_D.js +1 -0
  656. package/dist/cli-bun.js +2 -0
  657. package/dist/cli-node.js +2 -0
  658. package/dist/cli.js +2 -0
  659. package/dist/vendor/audio-capture/arm64-darwin/audio-capture.node +0 -0
  660. package/dist/vendor/audio-capture/arm64-linux/audio-capture.node +0 -0
  661. package/dist/vendor/audio-capture/arm64-win32/audio-capture.node +0 -0
  662. package/dist/vendor/audio-capture/x64-darwin/audio-capture.node +0 -0
  663. package/dist/vendor/audio-capture/x64-linux/audio-capture.node +0 -0
  664. package/dist/vendor/audio-capture/x64-win32/audio-capture.node +0 -0
  665. package/dist/vendor/ripgrep/x64-win32/rg.exe +0 -0
  666. package/package.json +233 -0
  667. package/scripts/postinstall.cjs +389 -0
  668. package/scripts/run-parallel.mjs +10 -0
  669. package/scripts/setup-chrome-mcp.mjs +70 -0
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{_s as t,ls as n,xs as r}from"./growthbook-p4aJ_UMv.js";import{n as i,r as a}from"./analytics-i6X1et4O.js";var o;e((()=>{i(),t(),o=async()=>{let e=n().editorMode||`normal`;e===`emacs`&&(e=`normal`);let t=e===`normal`?`vim`:`normal`;return r(e=>({...e,editorMode:t})),a(`tengu_editor_mode_changed`,{mode:t,source:`command`}),{type:`text`,value:`Editor mode set to ${t}. ${t===`vim`?`Use Escape key to toggle between INSERT and NORMAL modes.`:`Using standard (readline) keyboard bindings.`}`}}}))();export{o as call};
@@ -0,0 +1,8 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{f as t,s as n,u as r}from"./envUtils-CFG7IQID.js";import{l as i,p as a}from"./debug-CjIaNjpK.js";import{o,s}from"./log-DVv8YiNo.js";import{i as c,o as l}from"./platform-BXz_rgpy.js";import{readFile as u}from"fs/promises";import{spawn as d,spawnSync as f}from"child_process";function p(){return E??(E=(async()=>{let e=Date.now(),t=await import(`./src-WjnK2Dbo.js`);return t.isNativeAudioAvailable(),T=t,a(`[voice] audio-capture-napi loaded in ${Date.now()-e}ms`),t})()),E}function m(e){return f(e,[`--version`],{stdio:`ignore`,timeout:3e3}).error===void 0}function h(){return j??(j=new Promise(e=>{let t=d(`arecord`,[`-f`,`S16_LE`,`-r`,String(D),`-c`,String(O),`-t`,`raw`,`/dev/null`],{stdio:[`ignore`,`ignore`,`pipe`]}),n=``;t.stderr?.on(`data`,e=>{n+=e.toString()});let r=setTimeout((e,t)=>{e.kill(`SIGTERM`),t({ok:!0,stderr:``})},150,t,e);t.once(`close`,t=>{clearTimeout(r),e({ok:t===0,stderr:n.trim()})}),t.once(`error`,()=>{clearTimeout(r),e({ok:!1,stderr:`arecord: command not found`})})})),j}function g(){return M??(M=u(`/proc/asound/cards`,`utf8`).then(e=>{let t=e.trim();return t!==``&&!t.includes(`no soundcards`)},()=>!1)),M}function _(){if(process.platform===`darwin`)return m(`brew`)?{cmd:`brew`,args:[`install`,`sox`],displayCommand:`brew install sox`}:null;if(process.platform===`linux`){if(m(`apt-get`))return{cmd:`sudo`,args:[`apt-get`,`install`,`-y`,`sox`],displayCommand:`sudo apt-get install sox`};if(m(`dnf`))return{cmd:`sudo`,args:[`dnf`,`install`,`-y`,`sox`],displayCommand:`sudo dnf install sox`};if(m(`pacman`))return{cmd:`sudo`,args:[`pacman`,`-S`,`--noconfirm`,`sox`],displayCommand:`sudo pacman -S sox`}}return null}async function v(){if((await p()).isNativeAudioAvailable())return{available:!0,missing:[],installCommand:null};if(process.platform===`win32`)return{available:!1,missing:[`Voice mode requires the native audio module (not loaded)`],installCommand:null};if(process.platform===`linux`&&m(`arecord`))return{available:!0,missing:[],installCommand:null};let e=[];m(`rec`)||e.push(`sox (rec command)`);let t=e.length>0?_():null;return{available:e.length===0,missing:e,installCommand:t?.displayCommand??null}}async function y(){return(await p()).isNativeAudioAvailable()?await x(e=>{},()=>{},{silenceDetection:!1})?(w(),!0):!1:!0}async function b(){if(t()||r(process.env.CLAUDE_CODE_REMOTE))return{available:!1,reason:`Voice mode requires microphone access, but no audio device is available in this environment.
2
+
3
+ To use voice mode, run Claude Code locally instead.`};if((await p()).isNativeAudioAvailable())return{available:!0,reason:null};if(process.platform===`win32`)return{available:!1,reason:`Voice recording requires the native audio module, which could not be loaded.`};let e=`Voice mode could not access an audio device in WSL.
4
+
5
+ WSL2 with WSLg (Windows 11) provides audio via PulseAudio — if you are on Windows 10 or WSL1, run Claude Code in native Windows instead.`;if(process.platform===`linux`&&m(`arecord`)){let t=await h();if(t.ok)return{available:!0,reason:null};if(c()===`wsl`)return{available:!1,reason:e};a(`[voice] arecord probe failed: ${t.stderr}`)}if(!m(`rec`)){if(c()===`wsl`)return{available:!1,reason:e};let t=_();return{available:!1,reason:t?`Voice mode requires SoX for audio recording. Install it with: ${t.displayCommand}`:`Voice mode requires SoX for audio recording. Install SoX manually:
6
+ macOS: brew install sox
7
+ Ubuntu/Debian: sudo apt-get install sox
8
+ Fedora: sudo dnf install sox`}}return{available:!0,reason:null}}async function x(e,t,n){a(`[voice] startRecording called, platform=${process.platform}`);let r=await p(),i=r.isNativeAudioAvailable()&&(process.platform!==`linux`||await g()),o=n?.silenceDetection!==!1;return i&&((P||r.isNativeRecordingActive())&&(r.stopNativeRecording(),P=!1),r.startNativeRecording(t=>{e(t)},()=>{o&&(P=!1,t())}))?(P=!0,!0):process.platform===`win32`?(a(`[voice] Windows native recording unavailable, no fallback`),!1):process.platform===`linux`&&m(`arecord`)&&(await h()).ok?C(e,t):S(e,t,n)}function S(e,t,n){let r=n?.silenceDetection!==!1,i=[`-q`,`--buffer`,`1024`,`-t`,`raw`,`-r`,String(D),`-e`,`signed`,`-b`,`16`,`-c`,String(O),`-`];r&&i.push(`silence`,`1`,`0.1`,A,`1`,k,A);let a=d(`rec`,i,{stdio:[`pipe`,`pipe`,`pipe`]});return N=a,a.stdout?.on(`data`,t=>{e(t)}),a.stderr?.on(`data`,()=>{}),a.on(`close`,()=>{N=null,t()}),a.on(`error`,e=>{s(e),N=null,t()}),!0}function C(e,t){let n=d(`arecord`,[`-f`,`S16_LE`,`-r`,String(D),`-c`,String(O),`-t`,`raw`,`-q`,`-`],{stdio:[`pipe`,`pipe`,`pipe`]});return N=n,n.stdout?.on(`data`,t=>{e(t)}),n.stderr?.on(`data`,()=>{}),n.on(`close`,()=>{N=null,t()}),n.on(`error`,e=>{s(e),N=null,t()}),!0}function w(){if(P&&T){T.stopNativeRecording(),P=!1;return}N&&(N.kill(`SIGTERM`),N=null)}var T,E,D,O,k,A,j,M,N,P;e((()=>{i(),n(),o(),l(),T=null,E=null,D=16e3,O=1,k=`2.0`,A=`3%`,j=null,M=null,N=null,P=!1}))();export{b as checkRecordingAvailability,v as checkVoiceDependencies,y as requestMicrophonePermission};
@@ -0,0 +1,8 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{f as t,s as n,u as r}from"./envUtils-CFG7IQID.js";import{l as i,p as a}from"./debug-CjIaNjpK.js";import{o,s}from"./log-DVv8YiNo.js";import{i as c,o as l}from"./platform-BXz_rgpy.js";import{readFile as u}from"fs/promises";import{spawn as d,spawnSync as f}from"child_process";function p(){return O??(O=(async()=>{let e=Date.now(),t=await import(`./src-WjnK2Dbo.js`);return t.isNativeAudioAvailable(),D=t,a(`[voice] audio-capture-napi loaded in ${Date.now()-e}ms`),t})()),O}function m(e){return f(e,[`--version`],{stdio:`ignore`,timeout:3e3}).error===void 0}function h(){return N??(N=new Promise(e=>{let t=d(`arecord`,[`-f`,`S16_LE`,`-r`,String(k),`-c`,String(A),`-t`,`raw`,`/dev/null`],{stdio:[`ignore`,`ignore`,`pipe`]}),n=``;t.stderr?.on(`data`,e=>{n+=e.toString()});let r=setTimeout((e,t)=>{e.kill(`SIGTERM`),t({ok:!0,stderr:``})},150,t,e);t.once(`close`,t=>{clearTimeout(r),e({ok:t===0,stderr:n.trim()})}),t.once(`error`,()=>{clearTimeout(r),e({ok:!1,stderr:`arecord: command not found`})})})),N}function g(){N=null}function _(){return P??(P=u(`/proc/asound/cards`,`utf8`).then(e=>{let t=e.trim();return t!==``&&!t.includes(`no soundcards`)},()=>!1)),P}function v(){P=null}function y(){if(process.platform===`darwin`)return m(`brew`)?{cmd:`brew`,args:[`install`,`sox`],displayCommand:`brew install sox`}:null;if(process.platform===`linux`){if(m(`apt-get`))return{cmd:`sudo`,args:[`apt-get`,`install`,`-y`,`sox`],displayCommand:`sudo apt-get install sox`};if(m(`dnf`))return{cmd:`sudo`,args:[`dnf`,`install`,`-y`,`sox`],displayCommand:`sudo dnf install sox`};if(m(`pacman`))return{cmd:`sudo`,args:[`pacman`,`-S`,`--noconfirm`,`sox`],displayCommand:`sudo pacman -S sox`}}return null}async function b(){if((await p()).isNativeAudioAvailable())return{available:!0,missing:[],installCommand:null};if(process.platform===`win32`)return{available:!1,missing:[`Voice mode requires the native audio module (not loaded)`],installCommand:null};if(process.platform===`linux`&&m(`arecord`))return{available:!0,missing:[],installCommand:null};let e=[];m(`rec`)||e.push(`sox (rec command)`);let t=e.length>0?y():null;return{available:e.length===0,missing:e,installCommand:t?.displayCommand??null}}async function x(){return(await p()).isNativeAudioAvailable()?await C(e=>{},()=>{},{silenceDetection:!1})?(E(),!0):!1:!0}async function S(){if(t()||r(process.env.CLAUDE_CODE_REMOTE))return{available:!1,reason:`Voice mode requires microphone access, but no audio device is available in this environment.
2
+
3
+ To use voice mode, run Claude Code locally instead.`};if((await p()).isNativeAudioAvailable())return{available:!0,reason:null};if(process.platform===`win32`)return{available:!1,reason:`Voice recording requires the native audio module, which could not be loaded.`};let e=`Voice mode could not access an audio device in WSL.
4
+
5
+ WSL2 with WSLg (Windows 11) provides audio via PulseAudio — if you are on Windows 10 or WSL1, run Claude Code in native Windows instead.`;if(process.platform===`linux`&&m(`arecord`)){let t=await h();if(t.ok)return{available:!0,reason:null};if(c()===`wsl`)return{available:!1,reason:e};a(`[voice] arecord probe failed: ${t.stderr}`)}if(!m(`rec`)){if(c()===`wsl`)return{available:!1,reason:e};let t=y();return{available:!1,reason:t?`Voice mode requires SoX for audio recording. Install it with: ${t.displayCommand}`:`Voice mode requires SoX for audio recording. Install SoX manually:
6
+ macOS: brew install sox
7
+ Ubuntu/Debian: sudo apt-get install sox
8
+ Fedora: sudo dnf install sox`}}return{available:!0,reason:null}}async function C(e,t,n){a(`[voice] startRecording called, platform=${process.platform}`);let r=await p(),i=r.isNativeAudioAvailable()&&(process.platform!==`linux`||await _()),o=n?.silenceDetection!==!1;return i&&((I||r.isNativeRecordingActive())&&(r.stopNativeRecording(),I=!1),r.startNativeRecording(t=>{e(t)},()=>{o&&(I=!1,t())}))?(I=!0,!0):process.platform===`win32`?(a(`[voice] Windows native recording unavailable, no fallback`),!1):process.platform===`linux`&&m(`arecord`)&&(await h()).ok?T(e,t):w(e,t,n)}function w(e,t,n){let r=n?.silenceDetection!==!1,i=[`-q`,`--buffer`,`1024`,`-t`,`raw`,`-r`,String(k),`-e`,`signed`,`-b`,`16`,`-c`,String(A),`-`];r&&i.push(`silence`,`1`,`0.1`,M,`1`,j,M);let a=d(`rec`,i,{stdio:[`pipe`,`pipe`,`pipe`]});return F=a,a.stdout?.on(`data`,t=>{e(t)}),a.stderr?.on(`data`,()=>{}),a.on(`close`,()=>{F=null,t()}),a.on(`error`,e=>{s(e),F=null,t()}),!0}function T(e,t){let n=d(`arecord`,[`-f`,`S16_LE`,`-r`,String(k),`-c`,String(A),`-t`,`raw`,`-q`,`-`],{stdio:[`pipe`,`pipe`,`pipe`]});return F=n,n.stdout?.on(`data`,t=>{e(t)}),n.stderr?.on(`data`,()=>{}),n.on(`close`,()=>{F=null,t()}),n.on(`error`,e=>{s(e),F=null,t()}),!0}function E(){if(I&&D){D.stopNativeRecording(),I=!1;return}F&&(F.kill(`SIGTERM`),F=null)}var D,O,k,A,j,M,N,P,F,I;e((()=>{i(),n(),o(),l(),D=null,O=null,k=16e3,A=1,j=`2.0`,M=`3%`,N=null,P=null,F=null,I=!1}))();export{v as _resetAlsaCardsForTesting,g as _resetArecordProbeForTesting,S as checkRecordingAvailability,b as checkVoiceDependencies,x as requestMicrophonePermission,C as startRecording,E as stopRecording};
@@ -0,0 +1,2 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Gs as t,Js as n,Ms as r,_s as i,ls as a,xs as o}from"./growthbook-p4aJ_UMv.js";import{n as s,r as c}from"./analytics-i6X1et4O.js";import{bI as l,gs as u,hs as d,iF as f,rF as p,xI as m}from"./loadAgentsDir-Bz0FfcVt.js";import{n as h,t as g}from"./useVoice-CO69xtWC.js";var _,v;e((()=>{g(),f(),s(),i(),l(),t(),d(),_=2,v=async e=>{if(!u())return{type:`text`,value:`Voice mode is not available.`};let t=r(),i=t.voiceEnabled===!0,s=e?.trim().toLowerCase();if(i&&s===`doubao`)return n(`userSettings`,{voiceProvider:`doubao`}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(m.notifyChange(`userSettings`),{type:`text`,value:`Voice mode switched to Doubao ASR. Hold ${p(`voice:pushToTalk`,`Chat`,`Space`)} to record.`});if(i&&s===`anthropic`)return n(`userSettings`,{voiceProvider:`anthropic`}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(m.notifyChange(`userSettings`),{type:`text`,value:`Voice mode switched to Anthropic STT. Hold ${p(`voice:pushToTalk`,`Chat`,`Space`)} to record.`});if(i)return n(`userSettings`,{voiceEnabled:!1}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(m.notifyChange(`userSettings`),c(`tengu_voice_toggled`,{enabled:!1}),{type:`text`,value:`Voice mode disabled.`});let l=s===`doubao`?`doubao`:`anthropic`,{isVoiceStreamAvailable:d}=await import(`./voiceStreamSTT-sI-hg-aP.js`),{checkRecordingAvailability:f}=await import(`./voice-BJyz9KZO.js`),g=await f();if(!g.available)return{type:`text`,value:g.reason??`Voice mode is not available in this environment.`};if(l!==`doubao`&&!d())return{type:`text`,value:`Voice mode requires a Claude.ai account. Please run /login to sign in.`};let{checkVoiceDependencies:v,requestMicrophonePermission:y}=await import(`./voice-BJyz9KZO.js`),b=await v();if(!b.available)return{type:`text`,value:`No audio recording tool found.${b.installCommand?`\nInstall audio recording tools? Run: ${b.installCommand}`:`
2
+ Install SoX manually for audio recording.`}`};if(!await y()){let e;return e=process.platform===`win32`?`Settings → Privacy → Microphone`:process.platform===`linux`?`your system's audio settings`:`System Settings → Privacy & Security → Microphone`,{type:`text`,value:`Microphone access is denied. To enable it, go to ${e}, then run /voice again.`}}if(n(`userSettings`,{voiceEnabled:!0,...l===`doubao`?{voiceProvider:`doubao`}:{}}).error)return{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`};m.notifyChange(`userSettings`),c(`tengu_voice_toggled`,{enabled:!0});let x=p(`voice:pushToTalk`,`Chat`,`Space`),S=``,C=l===`doubao`?`Doubao ASR`:`Anthropic`;if(l!==`doubao`){let e=h(t.language),n=a(),r=n.voiceLangHintLastLanguage!==e.code,i=r?0:n.voiceLangHintShownCount??0,s=!e.fellBackFrom&&i<_;e.fellBackFrom?S=` Note: "${e.fellBackFrom}" is not a supported dictation language; using English. Change it via /config.`:s&&(S=` Dictation language: ${e.code} (/config to change).`),(r||s)&&o(t=>({...t,voiceLangHintShownCount:i+ +!!s,voiceLangHintLastLanguage:e.code}))}return{type:`text`,value:`Voice mode enabled (${C}). Hold ${x} to record.${S}`}}}))();export{v as call};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{W as t,it as n,l as r,m as i,nt as a}from"./growthbook-p4aJ_UMv.js";function o(){return!r(`tengu_amber_quartz_disabled`,!1)}function s(){return n()?!!t()?.accessToken:!1}function c(){return s()&&o()}var l=e((()=>{i(),a()}));export{c as i,l as n,o as r,s as t};
@@ -0,0 +1 @@
1
+ import{i as e,n as t,r as n}from"./voiceModeEnabled-C-pa8B3Q.js";t();export{n as isVoiceGrowthBookEnabled,e as isVoiceModeEnabled};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,r as n}from"./wrapper-BDPb4PTV.js";import{A as r,E as i,T as a,W as o,it as s,l as c,m as l,nt as u}from"./growthbook-p4aJ_UMv.js";import{D as d,E as f,O as p,l as m,p as h}from"./debug-CjIaNjpK.js";import{o as g,s as _}from"./log-DVv8YiNo.js";import{l as v,u as y}from"./oauth-DMPGYAoZ.js";import{_ as b,c as x,g as S,l as C,u as w}from"./proxy-9WvtUy8E.js";function T(){if(!s())return!1;let e=o();return e!==null&&e.accessToken!==null}async function E(e,t){await r();let i=o();if(!i?.accessToken)return h(`[voice_stream] No OAuth token available`),null;let s=process.env.VOICE_STREAM_BASE_URL||v().BASE_API_URL.replace(`https://`,`wss://`).replace(`http://`,`ws://`);process.env.VOICE_STREAM_BASE_URL&&h(`[voice_stream] Using VOICE_STREAM_BASE_URL override: ${process.env.VOICE_STREAM_BASE_URL}`);let l=new URLSearchParams({encoding:`linear16`,sample_rate:`16000`,channels:`1`,endpointing_ms:`300`,utterance_end_ms:`1000`,language:t?.language??`en`}),u=c(`tengu_cobalt_frost`,!1);if(u&&(l.set(`use_conversation_engine`,`true`),l.set(`stt_provider`,`deepgram-nova3`),h(`[voice_stream] Nova 3 gate enabled (tengu_cobalt_frost)`)),t?.keyterms?.length)for(let e of t.keyterms)l.append(`keyterms`,e);let f=`${s}${k}?${l.toString()}`;h(`[voice_stream] Connecting to ${f}`);let m={Authorization:`Bearer ${i.accessToken}`,"User-Agent":a(),"x-app":`cli`},g=S(),y=new n(f,typeof Bun<`u`?{headers:m,proxy:C(f),tls:g||void 0}:{headers:m,agent:x(f),...g}),b=null,w=!1,T=!1,E=!1,M=!1,N=null,P=null,F={send(e){if(y.readyState===n.OPEN){if(T){h(`[voice_stream] Dropping audio chunk after CloseStream: ${String(e.length)} bytes`);return}h(`[voice_stream] Sending audio chunk: ${String(e.length)} bytes`),y.send(Buffer.from(e))}},finalize(){return E||T?Promise.resolve(`ws_already_closed`):(E=!0,new Promise(t=>{let r=setTimeout(()=>N?.(`safety_timeout`),j.safety),i=setTimeout(()=>N?.(`no_data_timeout`),j.noData);if(P=()=>{clearTimeout(i),P=null},N=n=>{if(clearTimeout(r),clearTimeout(i),N=null,P=null,I){h(`[voice_stream] Promoting unreported interim before ${n} resolve`);let t=I;I=``,e.onTranscript(t,!0)}h(`[voice_stream] Finalize resolved via ${n}`),t(n)},y.readyState===n.CLOSED||y.readyState===n.CLOSING){N(`ws_already_closed`);return}setTimeout(()=>{T=!0,y.readyState===n.OPEN&&(h(`[voice_stream] Sending CloseStream (finalize)`),y.send(O))},0)}))},close(){T=!0,b&&(clearInterval(b),b=null),w=!1,y.readyState===n.OPEN&&y.close()},isConnected(){return w&&y.readyState===n.OPEN}};y.on(`open`,()=>{h(`[voice_stream] WebSocket connected`),w=!0,h(`[voice_stream] Sending initial KeepAlive`),y.send(D),b=setInterval(e=>{e.readyState===n.OPEN&&(h(`[voice_stream] Sending periodic KeepAlive`),e.send(D))},A,y),e.onReady(F)});let I=``;return y.on(`message`,t=>{let n=t.toString();h(`[voice_stream] Message received (${String(n.length)} chars): ${n.slice(0,200)}`);let r;try{r=d(n)}catch{return}switch(r.type){case`TranscriptText`:{let t=r.data;if(h(`[voice_stream] TranscriptText: "${t??``}"`),T&&P?.(),t){if(!u&&I){let n=I.trimStart(),r=t.trimStart();n&&r&&!r.startsWith(n)&&!n.startsWith(r)&&(h(`[voice_stream] Auto-finalizing previous segment (new segment detected): "${I}"`),e.onTranscript(I,!0))}I=t,e.onTranscript(t,!1)}break}case`TranscriptEndpoint`:{h(`[voice_stream] TranscriptEndpoint received, lastTranscriptText="${I}"`);let t=I;I=``,t&&e.onTranscript(t,!0),T&&N?.(`post_closestream_endpoint`);break}case`TranscriptError`:{let t=r.description??r.error_code??`unknown transcription error`;h(`[voice_stream] TranscriptError: ${t}`),E||e.onError(t);break}case`error`:{let t=r.message??p(r);h(`[voice_stream] Server error: ${t}`),E||e.onError(t);break}default:break}}),y.on(`close`,(t,n)=>{let r=n?.toString()??``;if(h(`[voice_stream] WebSocket closed: code=${String(t)} reason="${r}"`),w=!1,b&&(clearInterval(b),b=null),I){h(`[voice_stream] Promoting unreported interim transcript to final on close`);let t=I;I=``,e.onTranscript(t,!0)}N?.(`ws_close`),!E&&!M&&t!==1e3&&t!==1005&&e.onError(`Connection closed: code ${String(t)}${r?` — ${r}`:``}`),e.onClose()}),y.on(`unexpected-response`,(t,n)=>{let r=n.statusCode??0;if(r===101){h(`[voice_stream] unexpected-response fired with 101; ignoring`);return}h(`[voice_stream] Upgrade rejected: status=${String(r)} cf-mitigated=${String(n.headers[`cf-mitigated`])} cf-ray=${String(n.headers[`cf-ray`])}`),M=!0,n.resume(),t.destroy(),!E&&e.onError(`WebSocket upgrade rejected with HTTP ${String(r)}`,{fatal:r>=400&&r<500})}),y.on(`error`,t=>{_(t),h(`[voice_stream] WebSocket error: ${t.message}`),E||e.onError(`Voice stream connection error: ${t.message}`)}),F}var D,O,k,A,j,M=e((()=>{t(),y(),u(),m(),i(),g(),b(),w(),f(),l(),D=`{"type":"KeepAlive"}`,O=`{"type":"CloseStream"}`,k=`/api/ws/speech_to_text/voice_stream`,A=8e3,j={safety:5e3,noData:1500}}));export{T as i,E as n,M as r,j as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t}from"./wrapper-BDPb4PTV.js";import{E as n,W as r,it as i,m as a,nt as o}from"./growthbook-p4aJ_UMv.js";import{E as s,l as c}from"./debug-CjIaNjpK.js";import{o as l}from"./log-DVv8YiNo.js";import{u}from"./oauth-DMPGYAoZ.js";import{_ as d,u as f}from"./proxy-9WvtUy8E.js";function p(){if(!i())return!1;let e=r();return e!==null&&e.accessToken!==null}e((()=>{t(),u(),o(),c(),n(),l(),d(),f(),s(),a()}))();export{p as isVoiceStreamAvailable};
@@ -0,0 +1 @@
1
+ import{i as e,r as t}from"./voiceStreamSTT-31b2u0rj.js";t();export{e as isVoiceStreamAvailable};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{F as n,Rn as r,b as i,n as a,r as o,t as s,x as c,xt as l}from"./src-DNHWYkls.js";import{t as u}from"./jsx-runtime-BTgGEFjL.js";import{Gs as d,Js as f,Vs as p}from"./growthbook-p4aJ_UMv.js";import{t as m}from"./useTerminalSize-DzV4aaTi.js";import{n as h,t as g}from"./useExitOnCtrlCDWithKeybindings-CBce_-hb.js";import{n as _,r as v}from"./modalContext-B1b0Gsro.js";function y({tab:e,adapters:t,current:n,fieldLabel:r,onConfigure:a,onSwitchTab:o,onSelectAdapter:s,onClose:u,contentHeight:d}){let[f,p]=(0,T.useState)(Math.max(0,t.findIndex(e=>e.key===n)));return l((n,r)=>{if(r.upArrow)p(e=>Math.max(0,e-1));else if(r.downArrow)p(e=>Math.min(e+1,t.length-1));else if(r.tab&&e===`search`)o(`fetch`),p(0);else if(r.tab&&e===`fetch`)o(`search`),p(0);else if(r.escape)u();else if(r.return){let e=t[f];e&&a(e)}else if(n===` `){let e=t[f];e&&s(e.key)}}),(0,E.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,E.jsx)(i,{bold:!0,children:r}),(0,E.jsx)(c,{flexDirection:`column`,marginTop:1,children:t.map((e,t)=>{let r=e.key===n,a=t===f,o=a||r;return(0,E.jsxs)(c,{flexDirection:`row`,children:[(0,E.jsxs)(i,{color:r?`success`:void 0,children:[a?`›`:` `,(0,E.jsxs)(i,{color:r?`success`:void 0,children:[` `,r?`●`:`○`,` `]})]}),(0,E.jsx)(i,{bold:r,backgroundColor:o?`suggestion`:void 0,color:o?`inverseText`:void 0,children:e.label}),(0,E.jsx)(i,{children:` `}),(0,E.jsx)(i,{dimColor:!r,children:e.description})]},e.key)})}),(0,E.jsxs)(c,{marginTop:1,flexDirection:`row`,gap:2,children:[(0,E.jsxs)(i,{dimColor:!0,children:[`↑↓`,` navigate · Space select · Enter config · Esc close`]}),(0,E.jsx)(i,{dimColor:!0,children:`Tab switch tab`})]})]})}function b(e){let t=[];switch(e.key){case`tavily`:t.push({key:`tavilyEndpointUrl`,label:`Endpoint URL`,placeholder:`https://tavily.claude-code-best.win`,maskInput:!1,getValue:e=>e.tavilyEndpointUrl??`https://tavily.claude-code-best.win`,setValue:(e,t)=>({...e,tavilyEndpointUrl:t||void 0})});break;case`brave`:t.push({key:`braveApiKey`,label:`API Key`,placeholder:`BSA...`,maskInput:!0,getValue:e=>e.braveApiKey??``,setValue:(e,t)=>({...e,braveApiKey:t||void 0})});break;case`exa`:t.push({key:`exaApiKey`,label:`API Key`,placeholder:`exa-...`,maskInput:!0,getValue:e=>e.exaApiKey??``,setValue:(e,t)=>({...e,exaApiKey:t||void 0})}),t.push({key:`exaEndpointUrl`,label:`Endpoint URL`,placeholder:`https://mcp.exa.ai/mcp`,maskInput:!1,getValue:e=>e.exaEndpointUrl??`https://mcp.exa.ai/mcp`,setValue:(e,t)=>({...e,exaEndpointUrl:t||void 0})});break;case`http`:t.push({key:`webFetchHttpTimeoutMs`,label:`Timeout (ms)`,placeholder:`60000`,maskInput:!1,getValue:e=>String(e.webFetchHttpTimeoutMs??6e4),setValue:(e,t)=>({...e,webFetchHttpTimeoutMs:t&&Number(t)||void 0})});break;default:break}return t}function x({adapter:e,onBack:t,onSave:n,onSelect:r}){let i=b(e),a=p();return i.length===0?(0,E.jsx)(S,{adapter:e,onBack:t,onSelect:r}):(0,E.jsx)(C,{fields:i,adapter:e,onBack:t,onSave:n,settings:a})}function S({adapter:e,onBack:t,onSelect:n}){let[r,a]=(0,T.useState)(0);return l((i,o)=>{o.upArrow||o.downArrow?a(e=>+(e===0)):o.escape?t():o.return&&(r===0?n(`Selected ${e.label}.`):t())}),(0,E.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,E.jsx)(i,{bold:!0,children:e.label}),(0,E.jsxs)(c,{flexDirection:`column`,marginTop:1,children:[(0,E.jsx)(i,{children:e.description}),(0,E.jsx)(c,{marginTop:1,children:(0,E.jsx)(i,{dimColor:!0,children:`No additional configuration needed.`})})]}),(0,E.jsxs)(c,{flexDirection:`column`,marginTop:1,children:[(0,E.jsxs)(c,{children:[(0,E.jsxs)(i,{children:[r===0?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:r===0?`suggestion`:void 0,color:r===0?`inverseText`:void 0,bold:!0,children:`[ Select & Close ]`})]}),(0,E.jsxs)(c,{children:[(0,E.jsxs)(i,{children:[r===1?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:r===1?`suggestion`:void 0,color:r===1?`inverseText`:void 0,children:`[ Back ]`})]})]}),(0,E.jsx)(c,{marginTop:1,children:(0,E.jsxs)(i,{dimColor:!0,children:[`↑↓`,` navigate · Enter confirm · Esc back`]})})]})}function C({fields:e,adapter:t,onBack:n,onSave:r,settings:a}){let[o,s]=(0,T.useState)(0),[u,d]=(0,T.useState)(!1),[p,m]=(0,T.useState)(``),[h,g]=(0,T.useState)(0),_=(0,T.useCallback)(()=>{d(!1),m(``),g(0)},[]);e.length-1;let v=e.length,y=e.length+1,b=(0,T.useCallback)(()=>{let n={...a};for(let t of e){let e=t.getValue(a);n=t.setValue(n,e)}f(`userSettings`,n),r(`Configuration saved for ${t.label}.`)},[e,a,t.label,r]),x=(0,T.useCallback)(()=>{let t=e[o];if(!t)return;let n=t.getValue(a);m(n),g(n.length),d(!0)},[o,e,a]),S=(0,T.useCallback)(()=>{let t=e[o];if(!t)return;let n=t.setValue({...a},p);Object.assign(a,n),d(!1)},[o,e,a,p]);return l((e,t)=>{u?t.escape?_():t.return?S():t.backspace||t.delete?m(e=>{let t=h;return t>0?(g(t-1),e.slice(0,t-1)+e.slice(t)):e}):t.leftArrow?g(e=>Math.max(0,e-1)):t.rightArrow?g(e=>Math.min(p.length,e+1)):e&&e.length===1&&!t.ctrl&&!t.meta&&m(t=>{let n=h;return g(n+1),t.slice(0,n)+e+t.slice(n)}):t.upArrow?s(e=>Math.max(0,e-1)):t.downArrow?s(e=>Math.min(y,e+1)):t.escape?n():t.return&&(o===v?b():o===y?n():x())}),(0,E.jsxs)(c,{flexDirection:`column`,padding:1,children:[(0,E.jsxs)(i,{bold:!0,children:[t.label,` Configuration`]}),(0,E.jsxs)(c,{flexDirection:`column`,marginTop:1,children:[e.map((e,t)=>{let n=t===o&&!u,r=e.getValue(a),s=u&&t===o?e.maskInput?`•`.repeat(p.length):p:e.maskInput&&r?`•`.repeat(Math.min(r.length,16)):r;return(0,E.jsxs)(c,{flexDirection:`row`,children:[(0,E.jsxs)(i,{children:[n?`›`:` `,` `]}),(0,E.jsxs)(i,{dimColor:!0,children:[e.label,`: `]}),(0,E.jsx)(i,{backgroundColor:n?`suggestion`:void 0,color:u&&t===o?`success`:n?`inverseText`:void 0,children:s||(0,E.jsx)(i,{dimColor:!0,children:`(empty)`})}),u&&t===o&&(0,E.jsxs)(i,{dimColor:!0,children:[` |`,` pos `,h,`/`,p.length]})]},e.key)}),(0,E.jsxs)(c,{marginTop:1,children:[(0,E.jsxs)(i,{children:[o===v?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:o===v?`suggestion`:void 0,color:o===v?`inverseText`:void 0,bold:!0,children:`[ Save ]`})]}),(0,E.jsxs)(c,{children:[(0,E.jsxs)(i,{children:[o===y?`›`:` `,` `]}),(0,E.jsx)(i,{backgroundColor:o===y?`suggestion`:void 0,color:o===y?`inverseText`:void 0,children:`[ Back ]`})]})]}),(0,E.jsx)(c,{marginTop:1,children:(0,E.jsx)(i,{dimColor:!0,children:u?`←→ move cursor · Type to edit · Enter confirm · Esc cancel edit`:`↑↓ navigate · Enter edit field · Esc go back`})})]})}function w({onClose:e,_context:t}){let[r,i]=(0,T.useState)(`search`),[s,c]=(0,T.useState)({kind:`main`}),l=p(),u=l.webSearchAdapter??`tavily`,d=l.webFetchAdapter??`tavily`,m=v(),{rows:g}=n(),_=m?g+1:Math.max(14,Math.min(Math.floor(g*.7),24));h();let b=(0,T.useCallback)(t=>{let n=r;f(`userSettings`,{[n===`search`?`webSearchAdapter`:`webFetchAdapter`]:t});let i=(n===`search`?D:O).find(e=>e.key===t)?.label??t;e(`${n===`search`?`Web search`:`Web fetch`} backend set to ${i}.`)},[r,e]),S=(0,T.useCallback)(e=>{c({kind:`config`,adapter:e})},[]),C=(0,T.useCallback)(()=>{c({kind:`main`})},[]),w=(0,T.useCallback)(t=>{e(t)},[e]),k=(0,T.useCallback)(t=>{let n=s.adapter;f(`userSettings`,{[(s.kind===`config`?D.some(e=>e.key===n.key)?`search`:`fetch`:r)===`search`?`webSearchAdapter`:`webFetchAdapter`]:n.key}),e(t)},[e,s,r]);return s.kind===`config`?(0,E.jsx)(x,{adapter:s.adapter,onBack:C,onSave:w,onSelect:k}):(0,E.jsxs)(o,{title:`Web Tools`,contentHeight:_,children:[(0,E.jsx)(a,{title:`Search`,children:(0,E.jsx)(y,{tab:r,adapters:D,current:u,fieldLabel:`Choose a web search backend:`,onConfigure:S,onSwitchTab:i,onSelectAdapter:b,onClose:()=>e(`Web tools panel dismissed`),contentHeight:_})},`search`),(0,E.jsx)(a,{title:`Fetch`,children:(0,E.jsx)(y,{tab:r,adapters:O,current:d,fieldLabel:`Choose a web fetch backend:`,onConfigure:S,onSwitchTab:i,onSelectAdapter:b,onClose:()=>e(`Web tools panel dismissed`),contentHeight:_})},`fetch`)]})}var T,E,D,O,k;e((()=>{r(),T=t(r(),1),s(),g(),m(),_(),d(),E=u(),D=[{key:`tavily`,label:`Tavily`,description:`Tavily Search API (default)`,hasConfig:!0},{key:`api`,label:`Anthropic API`,description:`Anthropic server-side web search`,hasConfig:!1},{key:`bing`,label:`Bing`,description:`Scrape Bing HTML results`,hasConfig:!1},{key:`brave`,label:`Brave`,description:`Brave Search API (needs API key)`,hasConfig:!0},{key:`exa`,label:`Exa`,description:`Exa AI search (MCP endpoint)`,hasConfig:!0}],O=[{key:`tavily`,label:`Tavily Extract`,description:`Use Tavily /extract (default)`,hasConfig:!0},{key:`http`,label:`HTTP Direct`,description:`Fetch URL directly via HTTP`,hasConfig:!0}],k=async(e,t)=>(0,E.jsx)(w,{onClose:e,_context:t})}))();export{k as call};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{r as t,t as n}from"./execa-BMaINL7N.js";import{n as r,t as i}from"./execSyncWrapper-Ch4TNj8u.js";async function a(e){if(process.platform===`win32`){let t=await n(`where.exe ${e}`,{shell:!0,stderr:`ignore`,reject:!1});return t.exitCode!==0||!t.stdout?null:t.stdout.trim().split(/\r?\n/)[0]||null}let t=await n(`which ${e}`,{shell:!0,stderr:`ignore`,reject:!1});return t.exitCode!==0||!t.stdout?null:t.stdout.trim()}function o(e){if(process.platform===`win32`)try{return i(`where.exe ${e}`,{encoding:`utf-8`,stdio:[`ignore`,`pipe`,`ignore`]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return i(`which ${e}`,{encoding:`utf-8`,stdio:[`ignore`,`pipe`,`ignore`]}).toString().trim()||null}catch{return null}}var s,c,l,u=e((()=>{t(),r(),s=typeof Bun<`u`&&typeof Bun.which==`function`?Bun.which:null,c=s?async e=>s(e):a,l=s??o}));export{c as n,l as r,u as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{l as r,p as i}from"./debug-CjIaNjpK.js";import{n as a,t as o}from"./cwd-B2guYBbl.js";import{n as s,t as c}from"./memoize-Bg2dXTzV.js";import{n as l,t as u}from"./execSyncWrapper-Ch4TNj8u.js";import{i as d,o as f}from"./platform-BXz_rgpy.js";import{existsSync as p}from"fs";import*as m from"path/win32";function h(){if(d()===`windows`){let e=y();process.env.SHELL=e,process.env.CLAUDE_CODE_GIT_BASH_PATH=e,i(`Using bash path: "${e}"`)}}function g(e,t){let n=[`C:\\Program Files\\Git\\bin\\bash.exe`,`C:\\Program Files\\Git\\usr\\bin\\bash.exe`,`C:\\Program Files (x86)\\Git\\bin\\bash.exe`,`C:\\Program Files (x86)\\Git\\usr\\bin\\bash.exe`];t&&n.push(`${t}\\scoop\\apps\\git\\current\\usr\\bin\\bash.exe`);for(let t of n)if(e(t))return t;return null}function _(e,t){if(e===`git`){for(let e of[`C:\\Program Files\\Git\\cmd\\git.exe`,`C:\\Program Files (x86)\\Git\\cmd\\git.exe`])if(t.checkExists(e))return e}try{let n=t.execCommand(`where.exe ${e}`).split(/\r?\n/).map(e=>e.trim()).filter(Boolean),r=m.resolve(t.cwdFn()).toLowerCase();for(let t of n){let n=m.resolve(t).toLowerCase(),a=m.dirname(n).toLowerCase(),o=m.relative(r,a);if(o===``||!o.startsWith(`..`)&&!m.isAbsolute(o)){i(`Skipping potentially malicious executable in current directory: ${t}`);continue}if(e===`bash`&&/(?:system32|windowsapps)\\bash\.exe$/.test(n)){i(`Skipping WSL bash launcher (not Git Bash): ${t}`);continue}return t}return null}catch{return null}}function v(e=b){let t=e.envOverride??process.env.CLAUDE_CODE_GIT_BASH_PATH;if(t)return e.checkExists(t)?t:null;let n=_(`bash`,e);if(n&&e.checkExists(n))return n;let r=_(`git`,e);if(r){let t=[m.join(r,`..`,`..`,`bin`,`bash.exe`),m.join(r,`..`,`..`,`usr`,`bin`,`bash.exe`),m.join(r,`..`,`bash.exe`)];for(let n of t)if(e.checkExists(n))return n}return g(e.checkExists,e.userProfile)}function y(){let e=x();if(e!==null)return e;let t=process.env.CLAUDE_CODE_GIT_BASH_PATH;console.error(t?`Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path "${t}"`:`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)}var b,x,S,C,w=e((()=>{n(),a(),r(),l(),c(),f(),b={checkExists:p,execCommand:e=>u(e,{stdio:`pipe`,encoding:`utf8`}).trim(),cwdFn:o,userProfile:process.env.USERPROFILE,envOverride:void 0},x=t(()=>v()),S=s(e=>{if(e.startsWith(`\\\\`))return e.replace(/\\/g,`/`);let t=e.match(/^([A-Za-z]):[/\\]/);return t?`/`+t[1].toLowerCase()+e.slice(2).replace(/\\/g,`/`):e.replace(/\\/g,`/`)},e=>e,500),C=s(e=>{if(e.startsWith(`//`))return e.replace(/\//g,`\\`);let t=e.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(t){let n=t[1].toUpperCase(),r=e.slice((`/cygdrive/`+t[1]).length);return n+`:`+(r||`\\`).replace(/\//g,`\\`)}let n=e.match(/^\/([A-Za-z])(\/|$)/);if(n){let t=n[1].toUpperCase(),r=e.slice(2);return t+`:`+(r||`\\`).replace(/\//g,`\\`)}return e.replace(/\//g,`\\`)},e=>e,500)}));export{C as a,w as i,x as n,h as o,v as r,S as s,y as t};
@@ -0,0 +1 @@
1
+ import{i as e,o as t}from"./windowsPaths-C5TNvKYu.js";e();export{t as setShellIfWindows};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./axios-Zh7qGPze.js";import{D as n,E as r,O as i}from"./debug-CjIaNjpK.js";t(),r();function a(e){let t=n(Buffer.from(e,`base64url`).toString(`utf-8`));if(!t||typeof t!=`object`||!(`version`in t)||t.version!==1)throw Error(`Unsupported work secret version: ${t&&typeof t==`object`&&`version`in t?t.version:`unknown`}`);let r=t;if(typeof r.session_ingress_token!=`string`||r.session_ingress_token.length===0)throw Error(`Invalid work secret: missing or empty session_ingress_token`);if(typeof r.api_base_url!=`string`)throw Error(`Invalid work secret: missing api_base_url`);return t}function o(e,t){let n=e.includes(`localhost`)||e.includes(`127.0.0.1`),r=e.startsWith(`https`)?`wss`:`ws`,i=n?`v2`:`v1`;return`${r}://${e.replace(/^https?:\/\//,``).replace(/\/+$/,``)}/${i}/session_ingress/ws/${t}`}function s(e,t){if(e===t)return!0;let n=e.slice(e.lastIndexOf(`_`)+1),r=t.slice(t.lastIndexOf(`_`)+1);return n.length>=4&&n===r}function c(e,t){return`${e.replace(/\/+$/,``)}/v1/code/sessions/${t}`}async function l(t,n){let r=await e.post(`${t}/worker/register`,{},{headers:{Authorization:`Bearer ${n}`,"Content-Type":`application/json`,"anthropic-version":`2023-06-01`},timeout:1e4}),a=r.data?.worker_epoch,o=typeof a==`string`?Number(a):a;if(typeof o!=`number`||!Number.isFinite(o)||!Number.isSafeInteger(o))throw Error(`registerWorker: invalid worker_epoch in response: ${i(r.data)}`);return o}export{s as a,l as i,o as n,a as r,c as t};
@@ -0,0 +1 @@
1
+ import{W as e,nt as t}from"./growthbook-p4aJ_UMv.js";import{U as n,z as r}from"./debug-CjIaNjpK.js";import{o as i,t as a}from"./bridgeMain-D4nsECwJ.js";import{resolve as o}from"path";t(),n();var s=78,c=1;async function l(e){if(!e){console.error(`Error: --daemon-worker requires a worker kind`),process.exitCode=s;return}switch(e){case`remoteControl`:await u();break;default:console.error(`Error: unknown daemon worker kind '${e}'`),process.exitCode=s}}async function u(){let t=process.env.DAEMON_WORKER_DIR||o(`.`),n=process.env.DAEMON_WORKER_NAME||void 0,l=process.env.DAEMON_WORKER_SPAWN_MODE||`same-dir`,u=parseInt(process.env.DAEMON_WORKER_CAPACITY||`4`,10),d=process.env.DAEMON_WORKER_PERMISSION||void 0,f=process.env.DAEMON_WORKER_SANDBOX===`1`,p=process.env.DAEMON_WORKER_TIMEOUT_MS?parseInt(process.env.DAEMON_WORKER_TIMEOUT_MS,10):void 0,m=process.env.DAEMON_WORKER_CREATE_SESSION!==`0`,h=new AbortController,g=()=>h.abort();process.on(`SIGTERM`,g),process.on(`SIGINT`,g);let _={dir:t,name:n,spawnMode:l,capacity:u,permissionMode:d,sandbox:f,sessionTimeoutMs:p,createSessionOnStart:m,getAccessToken:()=>e()?.accessToken,onAuth401:async t=>!!e()?.accessToken,log:e=>{console.log(`[remoteControl] ${e}`)}};try{await i(_,h.signal)}catch(e){e instanceof a?(console.error(`[remoteControl] permanent error: ${e.message}`),process.exitCode=s):(console.error(`[remoteControl] transient error: ${r(e)}`),process.exitCode=c)}finally{process.off(`SIGTERM`,g),process.off(`SIGINT`,g)}}export{l as runDaemonWorker};
@@ -0,0 +1 @@
1
+ import{pt as e,vt as t}from"./loadAgentsDir-Bz0FfcVt.js";t();export{e as execIntoTmuxWorktree};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./worktreeModeEnabled-Dtrcn7eD.js";t();export{e as isWorktreeModeEnabled};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";function t(){return!0}var n=e((()=>{}));export{t as n,n as t};
@@ -0,0 +1,6 @@
1
+ import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-DR8-3Aex.js";var o=a(((e,t)=>{var n=[`nodebuffer`,`arraybuffer`,`fragments`],r=typeof Blob<`u`;r&&n.push(`blob`),t.exports={BINARY_TYPES:n,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:`258EAFA5-E914-47DA-95CA-C5AB0DC85B11`,hasBlob:r,kForOnEventAttribute:Symbol(`kIsForOnEventAttribute`),kListener:Symbol(`kListener`),kStatusCode:Symbol(`status-code`),kWebSocket:Symbol(`websocket`),NOOP:()=>{}}})),s=i({default:()=>c}),c,l=n((()=>{throw c={},Error(`Could not resolve "bufferutil" imported by "ws". Is it installed?`)})),u=a(((t,n)=>{var{EMPTY_BUFFER:r}=o(),i=Buffer[Symbol.species];function a(e,t){if(e.length===0)return r;if(e.length===1)return e[0];let n=Buffer.allocUnsafe(t),a=0;for(let t=0;t<e.length;t++){let r=e[t];n.set(r,a),a+=r.length}return a<t?new i(n.buffer,n.byteOffset,a):n}function c(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]=e[a]^t[a&3]}function u(e,t){for(let n=0;n<e.length;n++)e[n]^=t[n&3]}function d(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function f(e){if(f.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new i(e):ArrayBuffer.isView(e)?t=new i(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),f.readOnly=!1),t}if(n.exports={concat:a,mask:c,toArrayBuffer:d,toBuffer:f,unmask:u},!process.env.WS_NO_BUFFER_UTIL)try{let t=(l(),e(s));n.exports.mask=function(e,n,r,i,a){a<48?c(e,n,r,i,a):t.mask(e,n,r,i,a)},n.exports.unmask=function(e,n){e.length<32?u(e,n):t.unmask(e,n)}}catch{}})),d=a(((e,t)=>{var n=Symbol(`kDone`),r=Symbol(`kRun`);t.exports=class{constructor(e){this[n]=()=>{this.pending--,this[r]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[r]()}[r](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[n])}}}})),f=a(((e,n)=>{var r=t(`zlib`),i=u(),a=d(),{kStatusCode:s}=o(),c=Buffer[Symbol.species],l=Buffer.from([0,0,255,255]),f=Symbol(`permessage-deflate`),p=Symbol(`total-length`),m=Symbol(`callback`),h=Symbol(`buffers`),g=Symbol(`error`),_;n.exports=class{constructor(e){this._options=e||{},this._threshold=this._options.threshold===void 0?1024:this._options.threshold,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,_||(_=new a(this._options.concurrencyLimit===void 0?10:this._options.concurrencyLimit))}static get extensionName(){return`permessage-deflate`}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits??(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[m];this._deflate.close(),this._deflate=null,e&&e(Error(`The deflate stream was closed while data was being processed`))}}acceptAsServer(e){let t=this._options,n=e.find(e=>!(t.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits==`number`&&t.serverMaxWindowBits>e.server_max_window_bits)||typeof t.clientMaxWindowBits==`number`&&!e.client_max_window_bits));if(!n)throw Error(`None of the extension offers can be accepted`);return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof t.serverMaxWindowBits==`number`&&(n.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits==`number`?n.client_max_window_bits=t.clientMaxWindowBits:(n.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw Error(`Unexpected parameter "client_no_context_takeover"`);if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits==`number`&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==`number`&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw Error(`Unexpected or invalid parameter "client_max_window_bits"`);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let n=e[t];if(n.length>1)throw Error(`Parameter "${t}" must have only a single value`);if(n=n[0],t===`client_max_window_bits`){if(n!==!0){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else if(t===`server_max_window_bits`){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(t===`client_no_context_takeover`||t===`server_no_context_takeover`){if(n!==!0)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else throw Error(`Unknown parameter "${t}"`);e[t]=n})}),e}decompress(e,t,n){_.add(r=>{this._decompress(e,t,(e,t)=>{r(),n(e,t)})})}compress(e,t,n){_.add(r=>{this._compress(e,t,(e,t)=>{r(),n(e,t)})})}_decompress(e,t,n){let a=this._isServer?`client`:`server`;if(!this._inflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:r.Z_DEFAULT_WINDOWBITS;this._inflate=r.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[f]=this,this._inflate[p]=0,this._inflate[h]=[],this._inflate.on(`error`,b),this._inflate.on(`data`,y)}this._inflate[m]=n,this._inflate.write(e),t&&this._inflate.write(l),this._inflate.flush(()=>{let e=this._inflate[g];if(e){this._inflate.close(),this._inflate=null,n(e);return}let r=i.concat(this._inflate[h],this._inflate[p]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[p]=0,this._inflate[h]=[],t&&this.params[`${a}_no_context_takeover`]&&this._inflate.reset()),n(null,r)})}_compress(e,t,n){let a=this._isServer?`server`:`client`;if(!this._deflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:r.Z_DEFAULT_WINDOWBITS;this._deflate=r.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[p]=0,this._deflate[h]=[],this._deflate.on(`data`,v)}this._deflate[m]=n,this._deflate.write(e),this._deflate.flush(r.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=i.concat(this._deflate[h],this._deflate[p]);t&&(e=new c(e.buffer,e.byteOffset,e.length-4)),this._deflate[m]=null,this._deflate[p]=0,this._deflate[h]=[],t&&this.params[`${a}_no_context_takeover`]&&this._deflate.reset(),n(null,e)})}};function v(e){this[h].push(e),this[p]+=e.length}function y(e){if(this[p]+=e.length,this[f]._maxPayload<1||this[p]<=this[f]._maxPayload){this[h].push(e);return}this[g]=RangeError(`Max payload size exceeded`),this[g].code=`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`,this[g][s]=1009,this.removeListener(`data`,y),this.reset()}function b(e){if(this[f]._inflate=null,this[g]){this[m](this[g]);return}e[s]=1007,this[m](e)}})),p=i({default:()=>m}),m,h=n((()=>{throw m={},Error(`Could not resolve "utf-8-validate" imported by "ws". Is it installed?`)})),g=a(((n,r)=>{var{isUtf8:i}=t(`buffer`),{hasBlob:a}=o(),s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function c(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}function l(e){let t=e.length,n=0;for(;n<t;)if(!(e[n]&128))n++;else if((e[n]&224)==192){if(n+1===t||(e[n+1]&192)!=128||(e[n]&254)==192)return!1;n+=2}else if((e[n]&240)==224){if(n+2>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||e[n]===224&&(e[n+1]&224)==128||e[n]===237&&(e[n+1]&224)==160)return!1;n+=3}else if((e[n]&248)==240){if(n+3>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||(e[n+3]&192)!=128||e[n]===240&&(e[n+1]&240)==128||e[n]===244&&e[n+1]>143||e[n]>244)return!1;n+=4}else return!1;return!0}function u(e){return a&&typeof e==`object`&&typeof e.arrayBuffer==`function`&&typeof e.type==`string`&&typeof e.stream==`function`&&(e[Symbol.toStringTag]===`Blob`||e[Symbol.toStringTag]===`File`)}if(r.exports={isBlob:u,isValidStatusCode:c,isValidUTF8:l,tokenChars:s},i)r.exports.isValidUTF8=function(e){return e.length<24?l(e):i(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=(h(),e(p));r.exports.isValidUTF8=function(e){return e.length<32?l(e):t(e)}}catch{}})),_=a(((e,n)=>{var{Writable:r}=t(`stream`),i=f(),{BINARY_TYPES:a,EMPTY_BUFFER:s,kStatusCode:c,kWebSocket:l}=o(),{concat:d,toArrayBuffer:p,unmask:m}=u(),{isValidStatusCode:h,isValidUTF8:_}=g(),v=Buffer[Symbol.species],y=0,b=1,x=2,S=3,C=4,w=5,T=6;n.exports=class extends r{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents===void 0?!0:e.allowSynchronousEvents,this._binaryType=e.binaryType||a[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[l]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=y}_write(e,t,n){if(this._opcode===8&&this._state==y)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let t=this._buffers[0];return this._buffers[0]=new v(t.buffer,t.byteOffset+e,t.length-e),new v(t.buffer,t.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new v(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case y:this.getInfo(e);break;case b:this.getPayloadLength16(e);break;case x:this.getPayloadLength64(e);break;case S:this.getMask();break;case C:this.getData(e);break;case w:case T:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if(t[0]&48){e(this.createError(RangeError,`RSV2 and RSV3 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_2_3`));return}let n=(t[0]&64)==64;if(n&&!this._extensions[i.extensionName]){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._fin=(t[0]&128)==128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(!this._fragmented){e(this.createError(RangeError,`invalid opcode 0`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){e(this.createError(RangeError,`FIN must be set`,!0,1002,`WS_ERR_EXPECTED_FIN`));return}if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,`WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH`));return}}else{e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)==128,this._isServer){if(!this._masked){e(this.createError(RangeError,`MASK must be set`,!0,1002,`WS_ERR_EXPECTED_MASK`));return}}else if(this._masked){e(this.createError(RangeError,`MASK must be clear`,!0,1002,`WS_ERR_UNEXPECTED_MASK`));return}this._payloadLength===126?this._state=b:this._payloadLength===127?this._state=x:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),n=t.readUInt32BE(0);if(n>2**21-1){e(this.createError(RangeError,`Unsupported WebSocket frame: payload length > 2^53 - 1`,!1,1009,`WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH`));return}this._payloadLength=n*2**32+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){e(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}this._masked?this._state=S:this._state=C}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=C}getData(e){let t=s;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&m(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=w,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[i.extensionName].decompress(e,this._fin,(e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){t(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}this._fragments.push(n)}this.dataMessage(t),this._state===y&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=y;return}let t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;r=this._binaryType===`nodebuffer`?d(n,t):this._binaryType===`arraybuffer`?p(d(n,t)):this._binaryType===`blob`?new Blob(n):n,this._allowSynchronousEvents?(this.emit(`message`,r,!0),this._state=y):(this._state=T,setImmediate(()=>{this.emit(`message`,r,!0),this._state=y,this.startLoop(e)}))}else{let r=d(n,t);if(!this._skipUTF8Validation&&!_(r)){e(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._state===w||this._allowSynchronousEvents?(this.emit(`message`,r,!1),this._state=y):(this._state=T,setImmediate(()=>{this.emit(`message`,r,!1),this._state=y,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit(`conclude`,1005,s),this.end();else{let n=e.readUInt16BE(0);if(!h(n)){t(this.createError(RangeError,`invalid status code ${n}`,!0,1002,`WS_ERR_INVALID_CLOSE_CODE`));return}let r=new v(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!_(r)){t(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._loop=!1,this.emit(`conclude`,n,r),this.end()}this._state=y;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?`ping`:`pong`,e),this._state=y):(this._state=T,setImmediate(()=>{this.emit(this._opcode===9?`ping`:`pong`,e),this._state=y,this.startLoop(t)}))}createError(e,t,n,r,i){this._loop=!1,this._errored=!0;let a=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,this.createError),a.code=i,a[c]=r,a}}})),v=a(((e,n)=>{var{Duplex:r}=t(`stream`),{randomFillSync:i}=t(`crypto`),a=f(),{EMPTY_BUFFER:s,kWebSocket:c,NOOP:l}=o(),{isBlob:d,isValidStatusCode:p}=g(),{mask:m,toBuffer:h}=u(),_=Symbol(`kByteLength`),v=Buffer.alloc(4),y=8*1024,b,x=y,S=0,C=1,w=2;n.exports=class e{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=S,this.onerror=l,this[c]=void 0}static frame(e,t){let n,r=!1,a=2,o=!1;t.mask&&(n=t.maskBuffer||v,t.generateMask?t.generateMask(n):(x===y&&(b===void 0&&(b=Buffer.alloc(y)),i(b,0,y),x=0),n[0]=b[x++],n[1]=b[x++],n[2]=b[x++],n[3]=b[x++]),o=(n[0]|n[1]|n[2]|n[3])===0,a=6);let s;typeof e==`string`?(!t.mask||o)&&t[_]!==void 0?s=t[_]:(e=Buffer.from(e),s=e.length):(s=e.length,r=t.mask&&t.readOnly&&!o);let c=s;s>=65536?(a+=8,c=127):s>125&&(a+=2,c=126);let l=Buffer.allocUnsafe(r?s+a:a);return l[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(l[0]|=64),l[1]=c,c===126?l.writeUInt16BE(s,2):c===127&&(l[2]=l[3]=0,l.writeUIntBE(s,4,6)),!t.mask||(l[1]|=128,l[a-4]=n[0],l[a-3]=n[1],l[a-2]=n[2],l[a-1]=n[3],o)?[l,e]:r?(m(e,n,l,a,s),[l]):(m(e,n,e,0,s),[l,e])}close(t,n,r,i){let a;if(t===void 0)a=s;else if(typeof t!=`number`||!p(t))throw TypeError(`First argument must be a valid error code number`);else if(n===void 0||!n.length)a=Buffer.allocUnsafe(2),a.writeUInt16BE(t,0);else{let e=Buffer.byteLength(n);if(e>123)throw RangeError(`The message must not be greater than 123 bytes`);a=Buffer.allocUnsafe(2+e),a.writeUInt16BE(t,0),typeof n==`string`?a.write(n,2):a.set(n,2)}let o={[_]:a.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state===S?this.sendFrame(e.frame(a,o),i):this.enqueue([this.dispatch,a,!1,o,i])}ping(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):d(t)?(i=t.size,a=!1):(t=h(t),i=t.length,a=h.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[_]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};d(t)?this._state===S?this.getBlobData(t,!1,o,r):this.enqueue([this.getBlobData,t,!1,o,r]):this._state===S?this.sendFrame(e.frame(t,o),r):this.enqueue([this.dispatch,t,!1,o,r])}pong(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):d(t)?(i=t.size,a=!1):(t=h(t),i=t.length,a=h.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[_]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};d(t)?this._state===S?this.getBlobData(t,!1,o,r):this.enqueue([this.getBlobData,t,!1,o,r]):this._state===S?this.sendFrame(e.frame(t,o),r):this.enqueue([this.dispatch,t,!1,o,r])}send(e,t,n){let r=this._extensions[a.extensionName],i=t.binary?2:1,o=t.compress,s,c;typeof e==`string`?(s=Buffer.byteLength(e),c=!1):d(e)?(s=e.size,c=!1):(e=h(e),s=e.length,c=h.readOnly),this._firstFragment?(this._firstFragment=!1,o&&r&&r.params[r._isServer?`server_no_context_takeover`:`client_no_context_takeover`]&&(o=s>=r._threshold),this._compress=o):(o=!1,i=0),t.fin&&(this._firstFragment=!0);let l={[_]:s,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:c,rsv1:o};d(e)?this._state===S?this.getBlobData(e,this._compress,l,n):this.enqueue([this.getBlobData,e,this._compress,l,n]):this._state===S?this.dispatch(e,this._compress,l,n):this.enqueue([this.dispatch,e,this._compress,l,n])}getBlobData(t,n,r,i){this._bufferedBytes+=r[_],this._state=w,t.arrayBuffer().then(t=>{if(this._socket.destroyed){let e=Error(`The socket was closed while the blob was being read`);process.nextTick(T,this,e,i);return}this._bufferedBytes-=r[_];let a=h(t);n?this.dispatch(a,n,r,i):(this._state=S,this.sendFrame(e.frame(a,r),i),this.dequeue())}).catch(e=>{process.nextTick(E,this,e,i)})}dispatch(t,n,r,i){if(!n){this.sendFrame(e.frame(t,r),i);return}let o=this._extensions[a.extensionName];this._bufferedBytes+=r[_],this._state=C,o.compress(t,r.fin,(t,n)=>{if(this._socket.destroyed){T(this,Error(`The socket was closed while data was being compressed`),i);return}this._bufferedBytes-=r[_],this._state=S,r.readOnly=!1,this.sendFrame(e.frame(n,r),i),this.dequeue()})}dequeue(){for(;this._state===S&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][_],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][_],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};function T(e,t,n){typeof n==`function`&&n(t);for(let n=0;n<e._queue.length;n++){let r=e._queue[n],i=r[r.length-1];typeof i==`function`&&i(t)}}function E(e,t,n){T(e,t,n),e.onerror(t)}})),y=a(((e,t)=>{var{kForOnEventAttribute:n,kListener:r}=o(),i=Symbol(`kCode`),a=Symbol(`kData`),s=Symbol(`kError`),c=Symbol(`kMessage`),l=Symbol(`kReason`),u=Symbol(`kTarget`),d=Symbol(`kType`),f=Symbol(`kWasClean`),p=class{constructor(e){this[u]=null,this[d]=e}get target(){return this[u]}get type(){return this[d]}};Object.defineProperty(p.prototype,`target`,{enumerable:!0}),Object.defineProperty(p.prototype,`type`,{enumerable:!0});var m=class extends p{constructor(e,t={}){super(e),this[i]=t.code===void 0?0:t.code,this[l]=t.reason===void 0?``:t.reason,this[f]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[i]}get reason(){return this[l]}get wasClean(){return this[f]}};Object.defineProperty(m.prototype,`code`,{enumerable:!0}),Object.defineProperty(m.prototype,`reason`,{enumerable:!0}),Object.defineProperty(m.prototype,`wasClean`,{enumerable:!0});var h=class extends p{constructor(e,t={}){super(e),this[s]=t.error===void 0?null:t.error,this[c]=t.message===void 0?``:t.message}get error(){return this[s]}get message(){return this[c]}};Object.defineProperty(h.prototype,`error`,{enumerable:!0}),Object.defineProperty(h.prototype,`message`,{enumerable:!0});var g=class extends p{constructor(e,t={}){super(e),this[a]=t.data===void 0?null:t.data}get data(){return this[a]}};Object.defineProperty(g.prototype,`data`,{enumerable:!0}),t.exports={CloseEvent:m,ErrorEvent:h,Event:p,EventTarget:{addEventListener(e,t,i={}){for(let a of this.listeners(e))if(!i[n]&&a[r]===t&&!a[n])return;let a;if(e===`message`)a=function(e,n){let r=new g(`message`,{data:n?e:e.toString()});r[u]=this,_(t,this,r)};else if(e===`close`)a=function(e,n){let r=new m(`close`,{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[u]=this,_(t,this,r)};else if(e===`error`)a=function(e){let n=new h(`error`,{error:e,message:e.message});n[u]=this,_(t,this,n)};else if(e===`open`)a=function(){let e=new p(`open`);e[u]=this,_(t,this,e)};else return;a[n]=!!i[n],a[r]=t,i.once?this.once(e,a):this.on(e,a)},removeEventListener(e,t){for(let i of this.listeners(e))if(i[r]===t&&!i[n]){this.removeListener(e,i);break}}},MessageEvent:g};function _(e,t,n){typeof e==`object`&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}})),b=a(((e,t)=>{var{tokenChars:n}=g();function r(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}function i(e){let t=Object.create(null),i=Object.create(null),a=!1,o=!1,s=!1,c,l,u=-1,d=-1,f=-1,p=0;for(;p<e.length;p++)if(d=e.charCodeAt(p),c===void 0)if(f===-1&&n[d]===1)u===-1&&(u=p);else if(p!==0&&(d===32||d===9))f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);d===44?(r(t,n,i),i=Object.create(null)):c=n,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`);else if(l===void 0)if(f===-1&&n[d]===1)u===-1&&(u=p);else if(d===32||d===9)f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p),r(i,e.slice(u,f),!0),d===44&&(r(t,c,i),i=Object.create(null),c=void 0),u=f=-1}else if(d===61&&u!==-1&&f===-1)l=e.slice(u,p),u=f=-1;else throw SyntaxError(`Unexpected character at index ${p}`);else if(o){if(n[d]!==1)throw SyntaxError(`Unexpected character at index ${p}`);u===-1?u=p:a||(a=!0),o=!1}else if(s)if(n[d]===1)u===-1&&(u=p);else if(d===34&&u!==-1)s=!1,f=p;else if(d===92)o=!0;else throw SyntaxError(`Unexpected character at index ${p}`);else if(d===34&&e.charCodeAt(p-1)===61)s=!0;else if(f===-1&&n[d]===1)u===-1&&(u=p);else if(u!==-1&&(d===32||d===9))f===-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);a&&(n=n.replace(/\\/g,``),a=!1),r(i,l,n),d===44&&(r(t,c,i),i=Object.create(null),c=void 0),l=void 0,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`);if(u===-1||s||d===32||d===9)throw SyntaxError(`Unexpected end of input`);f===-1&&(f=p);let m=e.slice(u,f);return c===void 0?r(t,m,i):(l===void 0?r(i,m,!0):a?r(i,l,m.replace(/\\/g,``)):r(i,l,m),r(t,c,i)),t}function a(e){return Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>[t].concat(Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>e===!0?t:`${t}=${e}`).join(`; `)})).join(`; `)).join(`, `)}).join(`, `)}t.exports={format:a,parse:i}})),x=a(((e,n)=>{var r=t(`events`),i=t(`https`),a=t(`http`),s=t(`net`),c=t(`tls`),{randomBytes:l,createHash:d}=t(`crypto`),{Duplex:p,Readable:m}=t(`stream`),{URL:h}=t(`url`),x=f(),S=_(),C=v(),{isBlob:w}=g(),{BINARY_TYPES:T,CLOSE_TIMEOUT:E,EMPTY_BUFFER:D,GUID:O,kForOnEventAttribute:k,kListener:A,kStatusCode:j,kWebSocket:M,NOOP:N}=o(),{EventTarget:{addEventListener:P,removeEventListener:ee}}=y(),{format:te,parse:ne}=b(),{toBuffer:F}=u(),I=Symbol(`kAborted`),L=[8,13],R=[`CONNECTING`,`OPEN`,`CLOSING`,`CLOSED`],z=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,B=class e extends r{constructor(t,n,r){super(),this._binaryType=T[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=D,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol=``,this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t===null?(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0):(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,n===void 0?n=[]:Array.isArray(n)||(typeof n==`object`&&n?(r=n,n=[]):n=[n]),V(this,t,n,r))}get binaryType(){return this._binaryType}set binaryType(e){T.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,n,r){let i=new S({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),a=new C(t,this._extensions,r.generateMask);this._receiver=i,this._sender=a,this._socket=t,i[M]=this,a[M]=this,t[M]=this,i.on(`conclude`,re),i.on(`drain`,ie),i.on(`error`,ae),i.on(`message`,oe),i.on(`ping`,se),i.on(`pong`,ce),a.onerror=le,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),n.length>0&&t.unshift(n),t.on(`close`,X),t.on(`data`,Z),t.on(`end`,Q),t.on(`error`,$),this._readyState=e.OPEN,this.emit(`open`)}emitClose(){if(!this._socket){this._readyState=e.CLOSED,this.emit(`close`,this._closeCode,this._closeMessage);return}this._extensions[x.extensionName]&&this._extensions[x.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit(`close`,this._closeCode,this._closeMessage)}close(t,n){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){G(this,this._req,`WebSocket was closed before the connection was established`);return}if(this.readyState===e.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=e.CLOSING,this._sender.close(t,n,!this._isServer,e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Y(this)}}pause(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof t==`function`?(r=t,t=n=void 0):typeof n==`function`&&(r=n,n=void 0),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){K(this,t,r);return}n===void 0&&(n=!this._isServer),this._sender.ping(t||D,n,r)}pong(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof t==`function`?(r=t,t=n=void 0):typeof n==`function`&&(r=n,n=void 0),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){K(this,t,r);return}n===void 0&&(n=!this._isServer),this._sender.pong(t||D,n,r)}resume(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof n==`function`&&(r=n,n={}),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){K(this,t,r);return}let i={binary:typeof t!=`string`,mask:!this._isServer,compress:!0,fin:!0,...n};this._extensions[x.extensionName]||(i.compress=!1),this._sender.send(t||D,i,r)}terminate(){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){G(this,this._req,`WebSocket was closed before the connection was established`);return}this._socket&&(this._readyState=e.CLOSING,this._socket.destroy())}}};Object.defineProperty(B,`CONNECTING`,{enumerable:!0,value:R.indexOf(`CONNECTING`)}),Object.defineProperty(B.prototype,`CONNECTING`,{enumerable:!0,value:R.indexOf(`CONNECTING`)}),Object.defineProperty(B,`OPEN`,{enumerable:!0,value:R.indexOf(`OPEN`)}),Object.defineProperty(B.prototype,`OPEN`,{enumerable:!0,value:R.indexOf(`OPEN`)}),Object.defineProperty(B,`CLOSING`,{enumerable:!0,value:R.indexOf(`CLOSING`)}),Object.defineProperty(B.prototype,`CLOSING`,{enumerable:!0,value:R.indexOf(`CLOSING`)}),Object.defineProperty(B,`CLOSED`,{enumerable:!0,value:R.indexOf(`CLOSED`)}),Object.defineProperty(B.prototype,`CLOSED`,{enumerable:!0,value:R.indexOf(`CLOSED`)}),[`binaryType`,`bufferedAmount`,`extensions`,`isPaused`,`protocol`,`readyState`,`url`].forEach(e=>{Object.defineProperty(B.prototype,e,{enumerable:!0})}),[`open`,`error`,`close`,`message`].forEach(e=>{Object.defineProperty(B.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[k])return t[A];return null},set(t){for(let t of this.listeners(e))if(t[k]){this.removeListener(e,t);break}typeof t==`function`&&this.addEventListener(e,t,{[k]:!0})}})}),B.prototype.addEventListener=P,B.prototype.removeEventListener=ee,n.exports=B;function V(e,t,n,r){let o={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:E,protocolVersion:L[1],maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:`GET`,host:void 0,path:void 0,port:void 0};if(e._autoPong=o.autoPong,e._closeTimeout=o.closeTimeout,!L.includes(o.protocolVersion))throw RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${L.join(`, `)})`);let s;if(t instanceof h)s=t;else try{s=new h(t)}catch{throw SyntaxError(`Invalid URL: ${t}`)}s.protocol===`http:`?s.protocol=`ws:`:s.protocol===`https:`&&(s.protocol=`wss:`),e._url=s.href;let c=s.protocol===`wss:`,u=s.protocol===`ws+unix:`,f;if(s.protocol!==`ws:`&&!c&&!u?f=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:u&&!s.pathname?f=`The URL's pathname is empty`:s.hash&&(f=`The URL contains a fragment identifier`),f){let t=SyntaxError(f);if(e._redirects===0)throw t;H(e,t);return}let p=c?443:80,m=l(16).toString(`base64`),g=c?i.request:a.request,_=new Set,v;if(o.createConnection=o.createConnection||(c?W:U),o.defaultPort=o.defaultPort||p,o.port=s.port||p,o.host=s.hostname.startsWith(`[`)?s.hostname.slice(1,-1):s.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":m,Connection:`Upgrade`,Upgrade:`websocket`},o.path=s.pathname+s.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(v=new x({...o.perMessageDeflate,isServer:!1,maxPayload:o.maxPayload}),o.headers[`Sec-WebSocket-Extensions`]=te({[x.extensionName]:v.offer()})),n.length){for(let e of n){if(typeof e!=`string`||!z.test(e)||_.has(e))throw SyntaxError(`An invalid or duplicated subprotocol was specified`);_.add(e)}o.headers[`Sec-WebSocket-Protocol`]=n.join(`,`)}if(o.origin&&(o.protocolVersion<13?o.headers[`Sec-WebSocket-Origin`]=o.origin:o.headers.Origin=o.origin),(s.username||s.password)&&(o.auth=`${s.username}:${s.password}`),u){let e=o.path.split(`:`);o.socketPath=e[0],o.path=e[1]}let y;if(o.followRedirects){if(e._redirects===0){e._originalIpc=u,e._originalSecure=c,e._originalHostOrSocketPath=u?o.socketPath:s.host;let t=r&&r.headers;if(r={...r,headers:{}},t)for(let[e,n]of Object.entries(t))r.headers[e.toLowerCase()]=n}else if(e.listenerCount(`redirect`)===0){let t=u?e._originalIpc?o.socketPath===e._originalHostOrSocketPath:!1:e._originalIpc?!1:s.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!c)&&(delete o.headers.authorization,delete o.headers.cookie,t||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization=`Basic `+Buffer.from(o.auth).toString(`base64`)),y=e._req=g(o),e._redirects&&e.emit(`redirect`,e.url,y)}else y=e._req=g(o);o.timeout&&y.on(`timeout`,()=>{G(e,y,`Opening handshake has timed out`)}),y.on(`error`,t=>{y===null||y[I]||(y=e._req=null,H(e,t))}),y.on(`response`,i=>{let a=i.headers.location,s=i.statusCode;if(a&&o.followRedirects&&s>=300&&s<400){if(++e._redirects>o.maxRedirects){G(e,y,`Maximum redirects exceeded`);return}y.abort();let i;try{i=new h(a,t)}catch{H(e,SyntaxError(`Invalid URL: ${a}`));return}V(e,i,n,r)}else e.emit(`unexpected-response`,y,i)||G(e,y,`Unexpected server response: ${i.statusCode}`)}),y.on(`upgrade`,(t,n,r)=>{if(e.emit(`upgrade`,t),e.readyState!==B.CONNECTING)return;y=e._req=null;let i=t.headers.upgrade;if(i===void 0||i.toLowerCase()!==`websocket`){G(e,n,`Invalid Upgrade header`);return}let a=d(`sha1`).update(m+O).digest(`base64`);if(t.headers[`sec-websocket-accept`]!==a){G(e,n,`Invalid Sec-WebSocket-Accept header`);return}let s=t.headers[`sec-websocket-protocol`],c;if(s===void 0?_.size&&(c=`Server sent no subprotocol`):_.size?_.has(s)||(c=`Server sent an invalid subprotocol`):c=`Server sent a subprotocol but none was requested`,c){G(e,n,c);return}s&&(e._protocol=s);let l=t.headers[`sec-websocket-extensions`];if(l!==void 0){if(!v){G(e,n,`Server sent a Sec-WebSocket-Extensions header but no extension was requested`);return}let t;try{t=ne(l)}catch{G(e,n,`Invalid Sec-WebSocket-Extensions header`);return}let r=Object.keys(t);if(r.length!==1||r[0]!==x.extensionName){G(e,n,`Server indicated an extension that was not requested`);return}try{v.accept(t[x.extensionName])}catch{G(e,n,`Invalid Sec-WebSocket-Extensions header`);return}e._extensions[x.extensionName]=v}e.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})}),o.finishRequest?o.finishRequest(y,e):y.end()}function H(e,t){e._readyState=B.CLOSING,e._errorEmitted=!0,e.emit(`error`,t),e.emitClose()}function U(e){return e.path=e.socketPath,s.connect(e)}function W(e){return e.path=void 0,!e.servername&&e.servername!==``&&(e.servername=s.isIP(e.host)?``:e.host),c.connect(e)}function G(e,t,n){e._readyState=B.CLOSING;let r=Error(n);Error.captureStackTrace(r,G),t.setHeader?(t[I]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(H,e,r)):(t.destroy(r),t.once(`error`,e.emit.bind(e,`error`)),t.once(`close`,e.emitClose.bind(e)))}function K(e,t,n){if(t){let n=w(t)?t.size:F(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){let t=Error(`WebSocket is not open: readyState ${e.readyState} (${R[e.readyState]})`);process.nextTick(n,t)}}function re(e,t){let n=this[M];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,n._socket[M]!==void 0&&(n._socket.removeListener(`data`,Z),process.nextTick(J,n._socket),e===1005?n.close():n.close(e,t))}function ie(){let e=this[M];e.isPaused||e._socket.resume()}function ae(e){let t=this[M];t._socket[M]!==void 0&&(t._socket.removeListener(`data`,Z),process.nextTick(J,t._socket),t.close(e[j])),t._errorEmitted||(t._errorEmitted=!0,t.emit(`error`,e))}function q(){this[M].emitClose()}function oe(e,t){this[M].emit(`message`,e,t)}function se(e){let t=this[M];t._autoPong&&t.pong(e,!this._isServer,N),t.emit(`ping`,e)}function ce(e){this[M].emit(`pong`,e)}function J(e){e.resume()}function le(e){let t=this[M];t.readyState!==B.CLOSED&&(t.readyState===B.OPEN&&(t._readyState=B.CLOSING,Y(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit(`error`,e)))}function Y(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),e._closeTimeout)}function X(){let e=this[M];if(this.removeListener(`close`,X),this.removeListener(`data`,Z),this.removeListener(`end`,Q),e._readyState=B.CLOSING,!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&this._readableState.length!==0){let t=this.read(this._readableState.length);e._receiver.write(t)}e._receiver.end(),this[M]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on(`error`,q),e._receiver.on(`finish`,q))}function Z(e){this[M]._receiver.write(e)||this.pause()}function Q(){let e=this[M];e._readyState=B.CLOSING,e._receiver.end(),this.end()}function $(){let e=this[M];this.removeListener(`error`,$),this.on(`error`,N),e&&(e._readyState=B.CLOSING,this.destroy())}})),S=a(((e,n)=>{x();var{Duplex:r}=t(`stream`);function i(e){e.emit(`close`)}function a(){!this.destroyed&&this._writableState.finished&&this.destroy()}function o(e){this.removeListener(`error`,o),this.destroy(),this.listenerCount(`error`)===0&&this.emit(`error`,e)}function s(e,t){let n=!0,s=new r({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on(`message`,function(t,n){let r=!n&&s._readableState.objectMode?t.toString():t;s.push(r)||e.pause()}),e.once(`error`,function(e){s.destroyed||(n=!1,s.destroy(e))}),e.once(`close`,function(){s.destroyed||s.push(null)}),s._destroy=function(t,r){if(e.readyState===e.CLOSED){r(t),process.nextTick(i,s);return}let a=!1;e.once(`error`,function(e){a=!0,r(e)}),e.once(`close`,function(){a||r(t),process.nextTick(i,s)}),n&&e.terminate()},s._final=function(t){if(e.readyState===e.CONNECTING){e.once(`open`,function(){s._final(t)});return}e._socket!==null&&(e._socket._writableState.finished?(t(),s._readableState.endEmitted&&s.destroy()):(e._socket.once(`finish`,function(){t()}),e.close()))},s._read=function(){e.isPaused&&e.resume()},s._write=function(t,n,r){if(e.readyState===e.CONNECTING){e.once(`open`,function(){s._write(t,n,r)});return}e.send(t,r)},s.on(`end`,a),s.on(`error`,o),s}n.exports=s})),C=a(((e,t)=>{var{tokenChars:n}=g();function r(e){let t=new Set,r=-1,i=-1,a=0;for(;a<e.length;a++){let o=e.charCodeAt(a);if(i===-1&&n[o]===1)r===-1&&(r=a);else if(a!==0&&(o===32||o===9))i===-1&&r!==-1&&(i=a);else if(o===44){if(r===-1)throw SyntaxError(`Unexpected character at index ${a}`);i===-1&&(i=a);let n=e.slice(r,i);if(t.has(n))throw SyntaxError(`The "${n}" subprotocol is duplicated`);t.add(n),r=i=-1}else throw SyntaxError(`Unexpected character at index ${a}`)}if(r===-1||i!==-1)throw SyntaxError(`Unexpected end of input`);let o=e.slice(r,a);if(t.has(o))throw SyntaxError(`The "${o}" subprotocol is duplicated`);return t.add(o),t}t.exports={parse:r}})),w=a(((e,n)=>{var r=t(`events`),i=t(`http`),{Duplex:a}=t(`stream`),{createHash:s}=t(`crypto`),c=b(),l=f(),u=C(),d=x(),{CLOSE_TIMEOUT:p,GUID:m,kWebSocket:h}=o(),g=/^[+/0-9A-Za-z]{22}==$/,_=0,v=1,y=2;n.exports=class extends r{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:p,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:d,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw TypeError(`One and only one of the "port", "server", or "noServer" options must be specified`);if(e.port==null?e.server&&(this._server=e.server):(this._server=i.createServer((e,t)=>{let n=i.STATUS_CODES[426];t.writeHead(426,{"Content-Length":n.length,"Content-Type":`text/plain`}),t.end(n)}),this._server.listen(e.port,e.host,e.backlog,t)),this._server){let e=this.emit.bind(this,`connection`);this._removeListeners=S(this._server,{listening:this.emit.bind(this,`listening`),error:this.emit.bind(this,`error`),upgrade:(t,n,r)=>{this.handleUpgrade(t,n,r,e)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=_}address(){if(this.options.noServer)throw Error(`The server is operating in "noServer" mode`);return this._server?this._server.address():null}close(e){if(this._state===y){e&&this.once(`close`,()=>{e(Error(`The server is not running`))}),process.nextTick(w,this);return}if(e&&this.once(`close`,e),this._state!==v)if(this._state=v,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(w,this);else{let e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close(()=>{w(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf(`?`);if((t===-1?e.url:e.url.slice(0,t))!==this.options.path)return!1}return!0}handleUpgrade(e,t,n,r){t.on(`error`,T);let i=e.headers[`sec-websocket-key`],a=e.headers.upgrade,o=+e.headers[`sec-websocket-version`];if(e.method!==`GET`){D(this,e,t,405,`Invalid HTTP method`);return}if(a===void 0||a.toLowerCase()!==`websocket`){D(this,e,t,400,`Invalid Upgrade header`);return}if(i===void 0||!g.test(i)){D(this,e,t,400,`Missing or invalid Sec-WebSocket-Key header`);return}if(o!==13&&o!==8){D(this,e,t,400,`Missing or invalid Sec-WebSocket-Version header`,{"Sec-WebSocket-Version":`13, 8`});return}if(!this.shouldHandle(e)){E(t,400);return}let s=e.headers[`sec-websocket-protocol`],d=new Set;if(s!==void 0)try{d=u.parse(s)}catch{D(this,e,t,400,`Invalid Sec-WebSocket-Protocol header`);return}let f=e.headers[`sec-websocket-extensions`],p={};if(this.options.perMessageDeflate&&f!==void 0){let n=new l({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let e=c.parse(f);e[l.extensionName]&&(n.accept(e[l.extensionName]),p[l.extensionName]=n)}catch{D(this,e,t,400,`Invalid or unacceptable Sec-WebSocket-Extensions header`);return}}if(this.options.verifyClient){let a={origin:e.headers[`${o===8?`sec-websocket-origin`:`origin`}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(a,(a,o,s,c)=>{if(!a)return E(t,o||401,s,c);this.completeUpgrade(p,i,d,e,t,n,r)});return}if(!this.options.verifyClient(a))return E(t,401)}this.completeUpgrade(p,i,d,e,t,n,r)}completeUpgrade(e,t,n,r,i,a,o){if(!i.readable||!i.writable)return i.destroy();if(i[h])throw Error(`server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration`);if(this._state>_)return E(i,503);let u=[`HTTP/1.1 101 Switching Protocols`,`Upgrade: websocket`,`Connection: Upgrade`,`Sec-WebSocket-Accept: ${s(`sha1`).update(t+m).digest(`base64`)}`],d=new this.options.WebSocket(null,void 0,this.options);if(n.size){let e=this.options.handleProtocols?this.options.handleProtocols(n,r):n.values().next().value;e&&(u.push(`Sec-WebSocket-Protocol: ${e}`),d._protocol=e)}if(e[l.extensionName]){let t=e[l.extensionName].params,n=c.format({[l.extensionName]:[t]});u.push(`Sec-WebSocket-Extensions: ${n}`),d._extensions=e}this.emit(`headers`,u,r),i.write(u.concat(`\r
2
+ `).join(`\r
3
+ `)),i.removeListener(`error`,T),d.setSocket(i,a,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(d),d.on(`close`,()=>{this.clients.delete(d),this._shouldEmitClose&&!this.clients.size&&process.nextTick(w,this)})),o(d,r)}};function S(e,t){for(let n of Object.keys(t))e.on(n,t[n]);return function(){for(let n of Object.keys(t))e.removeListener(n,t[n])}}function w(e){e._state=y,e.emit(`close`)}function T(){this.destroy()}function E(e,t,n,r){n=n||i.STATUS_CODES[t],r={Connection:`close`,"Content-Type":`text/html`,"Content-Length":Buffer.byteLength(n),...r},e.once(`finish`,e.destroy),e.end(`HTTP/1.1 ${t} ${i.STATUS_CODES[t]}\r\n`+Object.keys(r).map(e=>`${e}: ${r[e]}`).join(`\r
4
+ `)+`\r
5
+ \r
6
+ `+n)}function D(e,t,n,r,i,a){if(e.listenerCount(`wsClientError`)){let r=Error(i);Error.captureStackTrace(r,D),e.emit(`wsClientError`,r,n,t)}else E(n,r,i,a)}})),T,E,D=n((()=>{S(),b(),f(),_(),v(),C(),T=r(x(),1),w(),E=T.default}));export{D as n,E as r,T as t};
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./wrapper-BDPb4PTV.js";e();export{t as default};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{homedir as t}from"os";import{join as n,posix as r}from"path";function i(e){return{env:e?.env??process.env,home:e?.homedir??process.env.HOME??t()}}function a(e,...t){return e.includes(`/`)&&!e.includes(`\\`)&&!/^[A-Za-z]:/.test(e)?r.join(e,...t):n(e,...t)}function o(e){let{env:t,home:n}=i(e);return t.XDG_STATE_HOME??a(n,`.local`,`state`)}function s(e){let{env:t,home:n}=i(e);return t.XDG_CACHE_HOME??a(n,`.cache`)}function c(e){let{env:t,home:n}=i(e);return t.XDG_DATA_HOME??a(n,`.local`,`share`)}function l(e){let{home:t}=i(e);return a(t,`.local`,`bin`)}var u=e((()=>{}));export{u as a,o as i,s as n,c as r,l as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Gs as t,Uc as n,Vs as r,el as i}from"./growthbook-p4aJ_UMv.js";function a(e){d.set(e.name,e)}function o(e){return e.endsWith(`@${f}`)}function s(e){return d.get(e)}function c(){let e=r(),t=[],n=[];for(let[r,i]of d){if(i.isAvailable&&!i.isAvailable())continue;let a=`${r}@${f}`,o=e?.enabledPlugins?.[a],s=o===void 0?i.defaultEnabled??!0:o===!0,c={name:r,manifest:{name:r,description:i.description,version:i.version},path:f,source:a,repository:a,enabled:s,isBuiltin:!0,hooksConfig:i.hooks,mcpServers:i.mcpServers};s?t.push(c):n.push(c)}return{enabled:t,disabled:n}}function l(){let{enabled:e}=c(),t=[];for(let n of e){let e=d.get(n.name);if(e?.skills)for(let n of e.skills)t.push(u(n))}return t}function u(e){return{type:`prompt`,name:e.name,description:e.description,hasUserSpecifiedDescription:!0,allowedTools:e.allowedTools??[],argumentHint:e.argumentHint,whenToUse:e.whenToUse,model:e.model,disableModelInvocation:e.disableModelInvocation??!1,userInvocable:e.userInvocable??!0,contentLength:0,source:`bundled`,loadedFrom:`bundled`,hooks:e.hooks,context:e.context,agent:e.agent,isEnabled:e.isEnabled??(()=>!0),isHidden:!(e.userInvocable??!0),progressMessage:`running`,getPromptForCommand:e.getPromptForCommand}}var d,f,p=e((()=>{t(),d=new Map,f=`builtin`}));function m(e){if(e.includes(`@`)){let t=e.split(`@`);return{name:t[0]||``,marketplace:t[1]}}return{name:e}}function h(e){return e!==void 0&&n.has(e.toLowerCase())}function g(e){if(e===`managed`)throw Error(`Cannot install plugins to managed scope`);return y[e]}function _(e){return v[e]}var v,y,b=e((()=>{i(),v={policySettings:`managed`,userSettings:`user`,projectSettings:`project`,localSettings:`local`,flagSettings:`flag`},y={user:`userSettings`,project:`projectSettings`,local:`localSettings`}}));function x(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function S(e){return x(e).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`)}var C=e((()=>{}));export{h as a,_ as c,l as d,c as f,a as h,b as i,f as l,o as m,S as n,m as o,p,C as r,g as s,x as t,s as u};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./chunk-DR8-3Aex.js";var n=t(((e,t)=>{function n(e){return Array.isArray(e)?e:[e]}var r=void 0,i=``,a=` `,o=`\\`,s=/^\s+$/,c=/(?:[^\\]|^)\\$/,l=/^\\!/,ee=/^\\#/,u=/\r?\n/g,te=/^\.{0,2}\/|^\.{1,2}$/,ne=/\/$/,d=`/`,f=`node-ignore`;typeof Symbol<`u`&&(f=Symbol.for(`node-ignore`));var p=f,m=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),h=/([0-z])-([0-z])/g,g=()=>!1,_=e=>e.replace(h,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:i),v=e=>{let{length:t}=e;return e.slice(0,t-t%2)},re=[[/^\uFEFF/,()=>i],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(n.indexOf(`\\`)===0?a:i)],[/(\\+?)\s/g,(e,t)=>{let{length:n}=t;return t.slice(0,n-n%2)+a}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>`[^/]`],[/^\//,()=>`^`],[/\//g,()=>`\\/`],[/^\^*\\\*\\\*\\\//,()=>`^(?:.*\\/)?`],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?`^`:`(?:^|\\/)`}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?`(?:\\/[^\\/]+)*`:`\\/.+`],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,`[^\\/]*`)],[/\\\\\\(?=[$.|*+(){^])/g,()=>o],[/\\\\/g,()=>o],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>t===o?`\\[${n}${v(r)}${i}`:i===`]`&&r.length%2==0?`[${_(n)}${r}]`:`[]`],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`]],ie=/(^|\\\/)?\\\*$/,y=`regex`,b=`checkRegex`,ae=`_`,oe={[y](e,t){return`${t?`${t}[^/]+`:`[^/]*`}(?=$|\\/$)`},[b](e,t){return`${t?`${t}[^/]*`:`[^/]*`}(?=$|\\/$)`}},x=e=>re.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e),S=e=>typeof e==`string`,C=e=>e&&S(e)&&!s.test(e)&&!c.test(e)&&e.indexOf(`#`)!==0,se=e=>e.split(u).filter(Boolean),ce=class{constructor(e,t,n,r,i,a){this.pattern=e,this.mark=t,this.negative=i,m(this,`body`,n),m(this,`ignoreCase`,r),m(this,`regexPrefix`,a)}get regex(){let e=ae+y;return this[e]?this[e]:this._make(y,e)}get checkRegex(){let e=ae+b;return this[e]?this[e]:this._make(b,e)}_make(e,t){let n=this.regexPrefix.replace(ie,oe[e]),r=this.ignoreCase?new RegExp(n,`i`):new RegExp(n);return m(this,t,r)}},le=({pattern:e,mark:t},n)=>{let r=!1,i=e;i.indexOf(`!`)===0&&(r=!0,i=i.substr(1)),i=i.replace(l,`!`).replace(ee,`#`);let a=x(i);return new ce(e,t,i,n,r,a)},ue=class{constructor(e){this._ignoreCase=e,this._rules=[]}_add(e){if(e&&e[p]){this._rules=this._rules.concat(e._rules._rules),this._added=!0;return}if(S(e)&&(e={pattern:e}),C(e.pattern)){let t=le(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,n(S(e)?se(e):e).forEach(this._add,this),this._added}test(e,t,n){let i=!1,a=!1,o;this._rules.forEach(s=>{let{negative:c}=s;a===c&&i!==a||c&&!i&&!a&&!t||s[n].test(e)&&(i=!c,a=c,o=c?r:s)});let s={ignored:i,unignored:a};return o&&(s.rule=o),s}},de=(e,t)=>{throw new t(e)},w=(e,t,n)=>S(e)?e?w.isNotRelative(e)?n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:n(`path must not be empty`,TypeError):n(`path must be a string, but got \`${t}\``,TypeError),fe=e=>te.test(e);w.isNotRelative=fe,w.convert=e=>e;var T=class{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){m(this,p,!0),this._rules=new ue(t),this._strictPathCheck=!n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(e){return this._rules.add(e)&&this._initCache(),this}addPattern(e){return this.add(e)}_test(e,t,n,r){let i=e&&w.convert(e);return w(i,e,this._strictPathCheck?de:g),this._t(i,t,n,r)}checkIgnore(e){if(!ne.test(e))return this.test(e);let t=e.split(d).filter(Boolean);if(t.pop(),t.length){let e=this._t(t.join(d)+d,this._testCache,!0,t);if(e.ignored)return e}return this._rules.test(e,!1,b)}_t(e,t,n,r){if(e in t)return t[e];if(r||(r=e.split(d).filter(Boolean)),r.pop(),!r.length)return t[e]=this._rules.test(e,n,y);let i=this._t(r.join(d)+d,t,n,r);return t[e]=i.ignored?i:this._rules.test(e,n,y)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return n(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},E=e=>new T(e),pe=e=>w(e&&w.convert(e),e,g),D=()=>{w.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,`/`);let e=/^[a-z]:\//i;w.isNotRelative=t=>e.test(t)||fe(t)};typeof process<`u`&&process.platform===`win32`&&D(),t.exports=E,E.default=E,t.exports.isPathValid=pe,m(t.exports,Symbol.for(`setupWindows`),D)})),r,i,a,o,s=e((()=>{(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(r||(r={})),(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(i||(i={})),a=r.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),o=e=>{switch(typeof e){case`undefined`:return a.undefined;case`string`:return a.string;case`number`:return Number.isNaN(e)?a.nan:a.number;case`boolean`:return a.boolean;case`function`:return a.function;case`bigint`:return a.bigint;case`symbol`:return a.symbol;case`object`:return Array.isArray(e)?a.array:e===null?a.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?a.promise:typeof Map<`u`&&e instanceof Map?a.map:typeof Set<`u`&&e instanceof Set?a.set:typeof Date<`u`&&e instanceof Date?a.date:a.object;default:return a.unknown}}})),c,l,ee=e((()=>{s(),c=r.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),l=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,r.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}},l.create=e=>new l(e)})),u,te=e((()=>{ee(),s(),u=(e,t)=>{let n;switch(e.code){case c.invalid_type:n=e.received===a.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case c.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,r.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:n=`Unrecognized key(s) in object: ${r.joinValues(e.keys,`, `)}`;break;case c.invalid_union:n=`Invalid input`;break;case c.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${r.joinValues(e.options)}`;break;case c.invalid_enum_value:n=`Invalid enum value. Expected ${r.joinValues(e.options)}, received '${e.received}'`;break;case c.invalid_arguments:n=`Invalid function arguments`;break;case c.invalid_return_type:n=`Invalid function return type`;break;case c.invalid_date:n=`Invalid date`;break;case c.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:r.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case c.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case c.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case c.custom:n=`Invalid input`;break;case c.invalid_intersection_types:n=`Intersection results could not be merged`;break;case c.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case c.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,r.assertNever(e)}return{message:n}}}));function ne(){return d}var d,f=e((()=>{te(),d=u}));function p(e,t){let n=ne(),r=m({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===u?void 0:u].filter(e=>!!e)});e.common.issues.push(r)}var m,h,g,_,v,re,ie,y,b,ae=e((()=>{f(),te(),m=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},h=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return g;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return g;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},g=Object.freeze({status:`aborted`}),_=e=>({status:`dirty`,value:e}),v=e=>({status:`valid`,value:e}),re=e=>e.status===`aborted`,ie=e=>e.status===`dirty`,y=e=>e.status===`valid`,b=e=>typeof Promise<`u`&&e instanceof Promise})),oe=e((()=>{})),x,S=e((()=>{(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(x||(x={}))}));function C(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}function se(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function ce(e){return RegExp(`^${se(e)}$`)}function le(e){let t=`${je}T${se(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function ue(e,t){return!!((t===`v4`||!t)&&Te.test(e)||(t===`v6`||!t)&&De.test(e))}function de(e,t){if(!be.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function w(e,t){return!!((t===`v4`||!t)&&Ee.test(e)||(t===`v6`||!t)&&Oe.test(e))}function fe(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}function T(e){if(e instanceof L){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=J.create(T(r))}return new L({...e._def,shape:()=>t})}else if(e instanceof I)return new I({...e._def,type:T(e.element)});else if(e instanceof J)return J.create(T(e.unwrap()));else if(e instanceof Y)return Y.create(T(e.unwrap()));else if(e instanceof V)return V.create(e.items.map(e=>T(e)));else return e}function E(e,t){let n=o(e),i=o(t);if(e===t)return{valid:!0,data:e};if(n===a.object&&i===a.object){let n=r.objectKeys(t),i=r.objectKeys(e).filter(e=>n.indexOf(e)!==-1),a={...e,...t};for(let n of i){let r=E(e[n],t[n]);if(!r.valid)return{valid:!1};a[n]=r.data}return{valid:!0,data:a}}else if(n===a.array&&i===a.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=E(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}else if(n===a.date&&i===a.date&&+e==+t)return{valid:!0,data:e};else return{valid:!1}}function pe(e,t){return new W({values:e,typeName:$.ZodEnum,...C(t)})}var D,me,O,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,k,Ne,Pe,Fe,A,j,M,N,Ie,P,F,Le,I,L,R,z,Re,B,V,ze,Be,Ve,He,H,U,W,G,K,q,J,Y,X,Z,Ue,We,Ge,Q,$,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt=e((()=>{ee(),f(),S(),ae(),s(),D=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},me=(e,t)=>{if(y(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){return this._error||(this._error=new l(e.common.issues)),this._error}}},O=class{get description(){return this._def.description}_getType(e){return o(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:o(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new h,ctx:{common:e.parent.common,data:e.data,parsedType:o(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(b(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:o(e)};return me(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:o(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return y(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>y(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:o(e)},r=this._parse({data:e,path:n.path,parent:n});return me(n,await(b(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:c.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new q({schema:this,typeName:$.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return J.create(this,this._def)}nullable(){return Y.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return I.create(this)}promise(){return K.create(this,this._def)}or(e){return R.create([this,e],this._def)}and(e){return B.create(this,e,this._def)}transform(e){return new q({...C(this._def),schema:this,typeName:$.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new X({...C(this._def),innerType:this,defaultValue:t,typeName:$.ZodDefault})}brand(){return new We({typeName:$.ZodBranded,type:this,...C(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new Z({...C(this._def),innerType:this,catchValue:t,typeName:$.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Ge.create(this,e)}readonly(){return Q.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},he=/^c[^\s-]{8,}$/i,ge=/^[0-9a-z]+$/,_e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ve=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ye=/^[a-z0-9_-]{21}$/i,be=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,xe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Se=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ce=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,Te=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ee=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,De=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Oe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ke=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ae=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,je=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,Me=RegExp(`^${je}$`),k=class e extends O{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==a.string){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.string,received:t.parsedType}),g}let t=new h,n;for(let i of this._def.checks)if(i.kind===`min`)e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_small,minimum:i.value,type:`string`,inclusive:!0,exact:!1,message:i.message}),t.dirty());else if(i.kind===`max`)e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_big,maximum:i.value,type:`string`,inclusive:!0,exact:!1,message:i.message}),t.dirty());else if(i.kind===`length`){let r=e.data.length>i.value,a=e.data.length<i.value;(r||a)&&(n=this._getOrReturnCtx(e,n),r?p(n,{code:c.too_big,maximum:i.value,type:`string`,inclusive:!0,exact:!0,message:i.message}):a&&p(n,{code:c.too_small,minimum:i.value,type:`string`,inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if(i.kind===`email`)Se.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`email`,code:c.invalid_string,message:i.message}),t.dirty());else if(i.kind===`emoji`)we||(we=new RegExp(Ce,`u`)),we.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`emoji`,code:c.invalid_string,message:i.message}),t.dirty());else if(i.kind===`uuid`)ve.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`uuid`,code:c.invalid_string,message:i.message}),t.dirty());else if(i.kind===`nanoid`)ye.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`nanoid`,code:c.invalid_string,message:i.message}),t.dirty());else if(i.kind===`cuid`)he.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`cuid`,code:c.invalid_string,message:i.message}),t.dirty());else if(i.kind===`cuid2`)ge.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`cuid2`,code:c.invalid_string,message:i.message}),t.dirty());else if(i.kind===`ulid`)_e.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`ulid`,code:c.invalid_string,message:i.message}),t.dirty());else if(i.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),p(n,{validation:`url`,code:c.invalid_string,message:i.message}),t.dirty()}else i.kind===`regex`?(i.regex.lastIndex=0,i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`regex`,code:c.invalid_string,message:i.message}),t.dirty())):i.kind===`trim`?e.data=e.data.trim():i.kind===`includes`?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),t.dirty()):i.kind===`toLowerCase`?e.data=e.data.toLowerCase():i.kind===`toUpperCase`?e.data=e.data.toUpperCase():i.kind===`startsWith`?e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty()):i.kind===`endsWith`?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty()):i.kind===`datetime`?le(i).test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:`datetime`,message:i.message}),t.dirty()):i.kind===`date`?Me.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:`date`,message:i.message}),t.dirty()):i.kind===`time`?ce(i).test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:`time`,message:i.message}),t.dirty()):i.kind===`duration`?xe.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`duration`,code:c.invalid_string,message:i.message}),t.dirty()):i.kind===`ip`?ue(e.data,i.version)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`ip`,code:c.invalid_string,message:i.message}),t.dirty()):i.kind===`jwt`?de(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`jwt`,code:c.invalid_string,message:i.message}),t.dirty()):i.kind===`cidr`?w(e.data,i.version)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`cidr`,code:c.invalid_string,message:i.message}),t.dirty()):i.kind===`base64`?ke.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`base64`,code:c.invalid_string,message:i.message}),t.dirty()):i.kind===`base64url`?Ae.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`base64url`,code:c.invalid_string,message:i.message}),t.dirty()):r.assertNever(i);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:c.invalid_string,...x.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...x.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...x.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...x.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...x.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...x.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...x.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...x.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...x.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...x.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...x.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...x.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...x.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...x.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...x.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...x.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...x.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...x.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...x.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...x.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...x.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...x.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...x.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...x.errToObj(t)})}nonempty(e){return this.min(1,x.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}},k.create=e=>new k({checks:[],typeName:$.ZodString,coerce:e?.coerce??!1,...C(e)}),Ne=class e extends O{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==a.number){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.number,received:t.parsedType}),g}let t,n=new h;for(let i of this._def.checks)i.kind===`int`?r.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),p(t,{code:c.invalid_type,expected:`integer`,received:`float`,message:i.message}),n.dirty()):i.kind===`min`?(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.too_small,minimum:i.value,type:`number`,inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind===`max`?(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.too_big,maximum:i.value,type:`number`,inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind===`multipleOf`?fe(e.data,i.value)!==0&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),p(t,{code:c.not_finite,message:i.message}),n.dirty()):r.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,x.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,x.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,x.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,x.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:x.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:x.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:x.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:x.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:x.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:x.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:x.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:x.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:x.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:x.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&r.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}},Ne.create=e=>new Ne({checks:[],typeName:$.ZodNumber,coerce:e?.coerce||!1,...C(e)}),Pe=class e extends O{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==a.bigint)return this._getInvalidInput(e);let t,n=new h;for(let i of this._def.checks)i.kind===`min`?(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.too_small,type:`bigint`,minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind===`max`?(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.too_big,type:`bigint`,maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind===`multipleOf`?e.data%i.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):r.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.bigint,received:t.parsedType}),g}gte(e,t){return this.setLimit(`min`,e,!0,x.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,x.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,x.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,x.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:x.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:x.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:x.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:x.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:x.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:x.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}},Pe.create=e=>new Pe({checks:[],typeName:$.ZodBigInt,coerce:e?.coerce??!1,...C(e)}),Fe=class extends O{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==a.boolean){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.boolean,received:t.parsedType}),g}return v(e.data)}},Fe.create=e=>new Fe({typeName:$.ZodBoolean,coerce:e?.coerce||!1,...C(e)}),A=class e extends O{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==a.date){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.date,received:t.parsedType}),g}if(Number.isNaN(e.data.getTime()))return p(this._getOrReturnCtx(e),{code:c.invalid_date}),g;let t=new h,n;for(let i of this._def.checks)i.kind===`min`?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:`date`}),t.dirty()):i.kind===`max`?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:`date`}),t.dirty()):r.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:x.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:x.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}},A.create=e=>new A({checks:[],coerce:e?.coerce||!1,typeName:$.ZodDate,...C(e)}),j=class extends O{_parse(e){if(this._getType(e)!==a.symbol){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.symbol,received:t.parsedType}),g}return v(e.data)}},j.create=e=>new j({typeName:$.ZodSymbol,...C(e)}),M=class extends O{_parse(e){if(this._getType(e)!==a.undefined){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.undefined,received:t.parsedType}),g}return v(e.data)}},M.create=e=>new M({typeName:$.ZodUndefined,...C(e)}),N=class extends O{_parse(e){if(this._getType(e)!==a.null){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.null,received:t.parsedType}),g}return v(e.data)}},N.create=e=>new N({typeName:$.ZodNull,...C(e)}),Ie=class extends O{constructor(){super(...arguments),this._any=!0}_parse(e){return v(e.data)}},Ie.create=e=>new Ie({typeName:$.ZodAny,...C(e)}),P=class extends O{constructor(){super(...arguments),this._unknown=!0}_parse(e){return v(e.data)}},P.create=e=>new P({typeName:$.ZodUnknown,...C(e)}),F=class extends O{_parse(e){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.never,received:t.parsedType}),g}},F.create=e=>new F({typeName:$.ZodNever,...C(e)}),Le=class extends O{_parse(e){if(this._getType(e)!==a.undefined){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.void,received:t.parsedType}),g}return v(e.data)}},Le.create=e=>new Le({typeName:$.ZodVoid,...C(e)}),I=class e extends O{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==a.array)return p(t,{code:c.invalid_type,expected:a.array,received:t.parsedType}),g;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(p(t,{code:e?c.too_big:c.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(p(t,{code:c.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(p(t,{code:c.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new D(t,e,t.path,n)))).then(e=>h.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new D(t,e,t.path,n)));return h.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:x.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:x.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:x.toString(n)}})}nonempty(e){return this.min(1,e)}},I.create=(e,t)=>new I({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...C(t)}),L=class e extends O{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape();return this._cached={shape:e,keys:r.objectKeys(e)},this._cached}_parse(e){if(this._getType(e)!==a.object){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.object,received:t.parsedType}),g}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof F&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||o.push(e);let s=[];for(let e of i){let t=r[e],i=n.data[e];s.push({key:{status:`valid`,value:e},value:t._parse(new D(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof F){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of o)s.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)o.length>0&&(p(n,{code:c.unrecognized_keys,keys:o}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of o){let r=n.data[t];s.push({key:{status:`valid`,value:t},value:e._parse(new D(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>h.mergeObjectSync(t,e)):h.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(t){return x.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:x.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of r.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of r.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return T(this)}partial(t){let n={};for(let e of r.objectKeys(this.shape)){let r=this.shape[e];t&&!t[e]?n[e]=r:n[e]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of r.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof J;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return pe(r.objectKeys(this.shape))}},L.create=(e,t)=>new L({shape:()=>e,unknownKeys:`strip`,catchall:F.create(),typeName:$.ZodObject,...C(t)}),L.strictCreate=(e,t)=>new L({shape:()=>e,unknownKeys:`strict`,catchall:F.create(),typeName:$.ZodObject,...C(t)}),L.lazycreate=(e,t)=>new L({shape:e,unknownKeys:`strip`,catchall:F.create(),typeName:$.ZodObject,...C(t)}),R=class extends O{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new l(e.ctx.common.issues));return p(t,{code:c.invalid_union,unionErrors:n}),g}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new l(e));return p(t,{code:c.invalid_union,unionErrors:i}),g}}get options(){return this._def.options}},R.create=(e,t)=>new R({options:e,typeName:$.ZodUnion,...C(t)}),z=e=>e instanceof H?z(e.schema):e instanceof q?z(e.innerType()):e instanceof U?[e.value]:e instanceof W?e.options:e instanceof G?r.objectValues(e.enum):e instanceof X?z(e._def.innerType):e instanceof M?[void 0]:e instanceof N?[null]:e instanceof J?[void 0,...z(e.unwrap())]:e instanceof Y?[null,...z(e.unwrap())]:e instanceof We||e instanceof Q?z(e.unwrap()):e instanceof Z?z(e._def.innerType):[],Re=class e extends O{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==a.object)return p(t,{code:c.invalid_type,expected:a.object,received:t.parsedType}),g;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(p(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),g)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=z(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:$.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...C(r)})}},B=class extends O{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(re(e)||re(r))return g;let i=E(e.value,r.value);return i.valid?((ie(e)||ie(r))&&t.dirty(),{status:t.value,value:i.data}):(p(n,{code:c.invalid_intersection_types}),g)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}},B.create=(e,t,n)=>new B({left:e,right:t,typeName:$.ZodIntersection,...C(n)}),V=class e extends O{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==a.array)return p(n,{code:c.invalid_type,expected:a.array,received:n.parsedType}),g;if(n.data.length<this._def.items.length)return p(n,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),g;!this._def.rest&&n.data.length>this._def.items.length&&(p(n,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new D(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>h.mergeArray(t,e)):h.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}},V.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new V({items:e,typeName:$.ZodTuple,rest:null,...C(t)})},ze=class e extends O{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==a.object)return p(n,{code:c.invalid_type,expected:a.object,received:n.parsedType}),g;let r=[],i=this._def.keyType,o=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new D(n,e,n.path,e)),value:o._parse(new D(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?h.mergeObjectAsync(t,r):h.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof O?new e({keyType:t,valueType:n,typeName:$.ZodRecord,...C(r)}):new e({keyType:k.create(),valueType:t,typeName:$.ZodRecord,...C(n)})}},Be=class extends O{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==a.map)return p(n,{code:c.invalid_type,expected:a.map,received:n.parsedType}),g;let r=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new D(n,e,n.path,[a,`key`])),value:i._parse(new D(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of o){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return g;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}else{let e=new Map;for(let n of o){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return g;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}},Be.create=(e,t,n)=>new Be({valueType:t,keyType:e,typeName:$.ZodMap,...C(n)}),Ve=class e extends O{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==a.set)return p(n,{code:c.invalid_type,expected:a.set,received:n.parsedType}),g;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(p(n,{code:c.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(p(n,{code:c.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function o(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return g;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let s=[...n.data.values()].map((e,t)=>i._parse(new D(n,e,n.path,t)));return n.common.async?Promise.all(s).then(e=>o(e)):o(s)}min(t,n){return new e({...this._def,minSize:{value:t,message:x.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:x.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}},Ve.create=(e,t)=>new Ve({valueType:e,minSize:null,maxSize:null,typeName:$.ZodSet,...C(t)}),He=class e extends O{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==a.function)return p(t,{code:c.invalid_type,expected:a.function,received:t.parsedType}),g;function n(e,n){return m({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ne(),u].filter(e=>!!e),issueData:{code:c.invalid_arguments,argumentsError:n}})}function r(e,n){return m({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ne(),u].filter(e=>!!e),issueData:{code:c.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof K){let e=this;return v(async function(...t){let a=new l([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw a.addIssue(n(t,e)),a}),c=await Reflect.apply(o,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw a.addIssue(r(c,e)),a})})}else{let e=this;return v(function(...t){let a=e._def.args.safeParse(t,i);if(!a.success)throw new l([n(t,a.error)]);let s=Reflect.apply(o,this,a.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new l([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:V.create(t).rest(P.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||V.create([]).rest(P.create()),returns:n||P.create(),typeName:$.ZodFunction,...C(r)})}},H=class extends O{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}},H.create=(e,t)=>new H({getter:e,typeName:$.ZodLazy,...C(t)}),U=class extends O{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return p(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),g}return{status:`valid`,value:e.data}}get value(){return this._def.value}},U.create=(e,t)=>new U({value:e,typeName:$.ZodLiteral,...C(t)}),W=class e extends O{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return p(t,{expected:r.joinValues(n),received:t.parsedType,code:c.invalid_type}),g}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return p(t,{received:t.data,code:c.invalid_enum_value,options:n}),g}return v(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}},W.create=pe,G=class extends O{_parse(e){let t=r.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==a.string&&n.parsedType!==a.number){let e=r.objectValues(t);return p(n,{expected:r.joinValues(e),received:n.parsedType,code:c.invalid_type}),g}if(this._cache||(this._cache=new Set(r.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=r.objectValues(t);return p(n,{received:n.data,code:c.invalid_enum_value,options:e}),g}return v(e.data)}get enum(){return this._def.values}},G.create=(e,t)=>new G({values:e,typeName:$.ZodNativeEnum,...C(t)}),K=class extends O{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==a.promise&&t.common.async===!1?(p(t,{code:c.invalid_type,expected:a.promise,received:t.parsedType}),g):v((t.parsedType===a.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}},K.create=(e,t)=>new K({type:e,typeName:$.ZodPromise,...C(t)}),q=class extends O{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,a={addIssue:e=>{p(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type===`preprocess`){let e=i.transform(n.data,a);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return g;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?g:r.status===`dirty`||t.value===`dirty`?_(r.value):r});{if(t.value===`aborted`)return g;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?g:r.status===`dirty`||t.value===`dirty`?_(r.value):r}}if(i.type===`refinement`){let e=e=>{let t=i.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?g:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?g:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(i.type===`transform`)if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!y(e))return g;let r=i.transform(e.value,a);if(r instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:r}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>y(e)?Promise.resolve(i.transform(e.value,a)).then(e=>({status:t.value,value:e})):g);r.assertNever(i)}},q.create=(e,t,n)=>new q({schema:e,typeName:$.ZodEffects,effect:t,...C(n)}),q.createWithPreprocess=(e,t,n)=>new q({schema:t,effect:{type:`preprocess`,transform:e},typeName:$.ZodEffects,...C(n)}),J=class extends O{_parse(e){return this._getType(e)===a.undefined?v(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},J.create=(e,t)=>new J({innerType:e,typeName:$.ZodOptional,...C(t)}),Y=class extends O{_parse(e){return this._getType(e)===a.null?v(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},Y.create=(e,t)=>new Y({innerType:e,typeName:$.ZodNullable,...C(t)}),X=class extends O{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===a.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}},X.create=(e,t)=>new X({innerType:e,typeName:$.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...C(t)}),Z=class extends O{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return b(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new l(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new l(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}},Z.create=(e,t)=>new Z({innerType:e,typeName:$.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...C(t)}),Ue=class extends O{_parse(e){if(this._getType(e)!==a.nan){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.nan,received:t.parsedType}),g}return{status:`valid`,value:e.data}}},Ue.create=e=>new Ue({typeName:$.ZodNaN,...C(e)}),We=class extends O{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},Ge=class e extends O{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?g:e.status===`dirty`?(t.dirty(),_(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?g:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:$.ZodPipeline})}},Q=class extends O{_parse(e){let t=this._def.innerType._parse(e),n=e=>(y(e)&&(e.value=Object.freeze(e.value)),e);return b(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}},Q.create=(e,t)=>new Q({innerType:e,typeName:$.ZodReadonly,...C(t)}),L.lazycreate,(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})($||($={})),Ke=k.create,qe=Ne.create,Ue.create,Pe.create,Je=Fe.create,A.create,j.create,M.create,N.create,Ye=Ie.create,P.create,F.create,Le.create,Xe=I.create,Ze=L.create,Qe=L.strictCreate,$e=R.create,Re.create,B.create,V.create,et=ze.create,Be.create,Ve.create,He.create,H.create,tt=U.create,nt=W.create,G.create,K.create,q.create,J.create,Y.create,q.createWithPreprocess,Ge.create})),it=e((()=>{f(),ae(),oe(),s(),rt(),ee()})),at=e((()=>{it(),it()}));export{nt as a,Ze as c,Ke as d,$e as f,Je as i,et as l,Ye as n,tt as o,n as p,Xe as r,qe as s,at as t,Qe as u};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bun
2
+ import "./cli.js"
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import "./cli.js"
package/dist/cli.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bun
2
+ import{s as e,u as t}from"./chunks/envUtils-CFG7IQID.js";var n=globalThis.performance,r=new Map,i=new Map;function a(){return n.now()}function o(e){return r.set(e,a()),{name:e,entryType:`mark`,startTime:r.get(e),duration:0}}function s(e,t,n){let o,s;if(typeof t==`string`){let e=r.get(t),i=n?r.get(n):a();o=e??a(),s=(i??a())-o}else t&&typeof t==`object`?(o=t.start??0,s=(t.end??a())-o):(o=0,s=a());i.set(e,{name:e,startTime:o,duration:s})}function c(e){return e===`mark`?[...r.entries()].map(([e,t])=>({name:e,entryType:`mark`,startTime:t,duration:0})):e===`measure`?[...i.values()].map(e=>({name:e.name,entryType:`measure`,startTime:e.startTime,duration:e.duration})):[]}function l(e,t){return c(t??`mark`).concat(t===void 0?c(`measure`):[]).filter(t=>t.name===e)}function u(e){e===void 0?r.clear():r.delete(e)}function d(e){e===void 0?i.clear():i.delete(e)}var f={now:a,mark:o,measure:s,getEntriesByType:c,getEntriesByName:l,clearMarks:u,clearMeasures:d,clearResourceTimings:(()=>{}),setResourceTimingBufferSize:(()=>{}),markResourceTiming:(()=>{}),get timeOrigin(){return n.timeOrigin},get onresourcetimingbufferfull(){return n.onresourcetimingbufferfull},set onresourcetimingbufferfull(e){},toJSON(){return n.toJSON()}};function p(){globalThis.__performanceShimInstalled||(globalThis.__performanceShimInstalled=!0,globalThis.performance=f)}if(p(),e(),globalThis.MACRO===void 0&&(globalThis.MACRO={VERSION:process.env.CLAUDE_CODE_VERSION||`2.1.888`,BUILD_TIME:new Date().toISOString(),FEEDBACK_CHANNEL:``,ISSUES_EXPLAINER:``,NATIVE_PACKAGE_URL:``,PACKAGE_URL:``,VERSION_CHANGELOG:``}),t(process.env.CLAUDE_CODE_FORCE_INTERACTIVE)){for(let e of[process.stdin,process.stdout,process.stderr])if(!e.isTTY)try{Object.defineProperty(e,`isTTY`,{value:!0,configurable:!0})}catch{}}if(process.env.COREPACK_ENABLE_AUTO_PIN=`0`,process.env.CLAUDE_CODE_REMOTE===`true`){let e=process.env.NODE_OPTIONS||``;process.env.NODE_OPTIONS=e?`${e} --max-old-space-size=8192`:`--max-old-space-size=8192`}async function m(){let e=process.argv.slice(2);if(e.length===1&&(e[0]===`--version`||e[0]===`-v`||e[0]===`-V`)){console.log(`2.8.4 (Claude Code Zanii)`);return}let{profileCheckpoint:t}=await import(`./chunks/startupProfiler-CipS0otN.js`);if(t(`cli_entry`),process.argv[2]===`--claude-in-chrome-mcp`){t(`cli_claude_in_chrome_mcp_path`);let{runClaudeInChromeMcpServer:e}=await import(`./chunks/mcpServer-DxEHfW2v.js`);await e();return}else if(process.argv[2]===`--chrome-native-host`){t(`cli_chrome_native_host_path`);let{runChromeNativeHost:e}=await import(`./chunks/chromeNativeHost-CPj9M_4-.js`);await e();return}else if(process.argv[2]===`--computer-use-mcp`){t(`cli_computer_use_mcp_path`);let{runComputerUseMcpServer:e}=await import(`./chunks/mcpServer-DMA0bdFC.js`);await e();return}if(process.argv[2]===`--acp`){t(`cli_acp_path`);let{runAcpAgent:e}=await import(`./chunks/entry-_e-lyRwv.js`);await e();return}if(e[0]===`weixin`){t(`cli_weixin_path`);let{handleWeixinCli:n}=await import(`./chunks/src-CyQf7rVu.js`),{enableConfigs:r}=await import(`./chunks/config-Rl1Y_Dtq.js`),{initializeAnalyticsSink:i}=await import(`./chunks/sink-B1qICbRh.js`),{shutdownDatadog:a}=await import(`./chunks/datadog-3-Vvz0yz.js`),{shutdown1PEventLogging:o}=await import(`./chunks/firstPartyEventLogger-BtrGagNa.js`),{logForDebugging:s}=await import(`./chunks/debug-C7tW7DFW.js`),{ChannelPermissionRequestNotificationSchema:c}=await import(`./chunks/channelNotification-D01YVwNj.js`);await n(e.slice(1),{enableConfigs:r,initializeAnalyticsSink:i,shutdownDatadog:a,shutdown1PEventLogging:o,logForDebugging:s,registerPermissionHandler(e,t){e.setNotificationHandler(c(),async e=>t(e.params))}},`2.8.4`);return}if(e[0]===`--daemon-worker`||e[0]?.startsWith(`--daemon-worker=`)){let t=e[0]===`--daemon-worker`?e[1]:e[0].split(`=`)[1],{runDaemonWorker:n}=await import(`./chunks/workerRegistry-B5iWYqpK.js`);await n(t);return}if(e[0]===`remote-control`||e[0]===`rc`||e[0]===`remote`||e[0]===`sync`||e[0]===`bridge`){t(`cli_bridge_path`);let{enableConfigs:n}=await import(`./chunks/config-Rl1Y_Dtq.js`);n();let{getBridgeDisabledReason:r,checkBridgeMinVersion:i}=await import(`./chunks/bridgeEnabled-DZIGDtfY.js`),{BRIDGE_LOGIN_ERROR:a}=await import(`./chunks/types-CNmINIu3.js`),{bridgeMain:o}=await import(`./chunks/bridgeMain-CXVks2ND.js`),{exitWithError:s}=await import(`./chunks/process-X4vCP9x0.js`),{getClaudeAIOAuthTokens:c}=await import(`./chunks/auth-V_Xk2iea.js`),{getBridgeAccessToken:l}=await import(`./chunks/bridgeConfig-D38y9eXn.js`);!c()?.accessToken&&!l()&&s(a);let u=await r();u&&s(`Error: ${u}`);let d=i();d&&s(d);let{waitForPolicyLimitsToLoad:f,isPolicyAllowed:p}=await import(`./chunks/policyLimits-DFn1vHkN.js`);await f(),p(`allow_remote_control`)||s(`Error: Remote Control is disabled by your organization's policy.`),await o(e.slice(1));return}if(e[0]===`daemon`){t(`cli_daemon_path`);let{enableConfigs:n}=await import(`./chunks/config-Rl1Y_Dtq.js`);n();let{setShellIfWindows:r}=await import(`./chunks/windowsPaths-Kue_7s52.js`);r();let{initSinks:i}=await import(`./chunks/sinks-C7weduDR.js`);i();let{daemonMain:a}=await import(`./chunks/main-sboa5RKc.js`);await a(e.slice(1));return}if(e[0]===`autonomy`){t(`cli_autonomy_path`);let{getAutonomyCommandText:n}=await import(`./chunks/autonomy-CLt1dWaC.js`),r=await n(e.slice(1).join(` `));await new Promise((e,t)=>{process.stdout.write(`${r}\n`,n=>{if(n){t(n);return}e()})}),process.exit(0)}if(e.includes(`--bg`)||e.includes(`--background`)){t(`cli_daemon_path`);let{enableConfigs:n}=await import(`./chunks/config-Rl1Y_Dtq.js`);n();let{setShellIfWindows:r}=await import(`./chunks/windowsPaths-Kue_7s52.js`);r(),await(await import(`./chunks/bg-IU4gG3jc.js`)).handleBgStart(e.filter(e=>e!==`--bg`&&e!==`--background`));return}if(e[0]===`ps`||e[0]===`logs`||e[0]===`attach`||e[0]===`kill`){let n=e[0]===`ps`?`status`:e[0];console.error(`[deprecated] Use: claude daemon ${n}${e[1]?` `+e[1]:``}`),t(`cli_daemon_path`);let{enableConfigs:r}=await import(`./chunks/config-Rl1Y_Dtq.js`);r();let{setShellIfWindows:i}=await import(`./chunks/windowsPaths-Kue_7s52.js`);i();let{initSinks:a}=await import(`./chunks/sinks-C7weduDR.js`);a();let{daemonMain:o}=await import(`./chunks/main-sboa5RKc.js`);await o([e[0]===`ps`?`status`:e[0],...e.slice(1)]);return}if(e[0]===`job`){t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-CMbS0tuk.js`);await n(e.slice(1)),process.exit(0)}if(e[0]===`new`||e[0]===`list`||e[0]===`reply`){console.error(`[deprecated] Use: claude job ${e[0]} ${e.slice(1).join(` `)}`.trim()),t(`cli_templates_path`);let{templatesMain:n}=await import(`./chunks/templateJobs-CMbS0tuk.js`);await n(e),process.exit(0)}if((e.includes(`--tmux`)||e.includes(`--tmux=classic`))&&(e.includes(`-w`)||e.includes(`--worktree`)||e.some(e=>e.startsWith(`--worktree=`)))){t(`cli_tmux_worktree_fast_path`);let{enableConfigs:n}=await import(`./chunks/config-Rl1Y_Dtq.js`);n();let{isWorktreeModeEnabled:r}=await import(`./chunks/worktreeModeEnabled-DPTdK3JV.js`);if(r()){let{execIntoTmuxWorktree:t}=await import(`./chunks/worktree-BypJA0GB.js`),n=await t(e);if(n.handled)return;if(n.error){let{exitWithError:e}=await import(`./chunks/process-X4vCP9x0.js`);e(n.error)}}}e.length===1&&(e[0]===`--update`||e[0]===`--upgrade`)&&(process.argv=[process.argv[0],process.argv[1],`update`]),e.includes(`--bare`)&&(process.env.CLAUDE_CODE_SIMPLE=`1`);let{startCapturingEarlyInput:n}=await import(`./chunks/earlyInput-BwGtzhhP.js`);n(),t(`cli_before_main_import`);let{main:r}=await import(`./chunks/main-CFhpWtpC.js`);t(`cli_after_main_import`),await r(),t(`cli_after_main_complete`)}await m();export{};