@qqbrowser/qbot-dsh 0.0.15 → 0.1.1

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 (737) hide show
  1. package/config/agent-presets/code/agent.cordis.yml +2 -2
  2. package/config/agent-presets/standard/agent.cordis.yml +2 -2
  3. package/cordis.patch.yml +50 -0
  4. package/lib/args-w1okyL78.js +9 -0
  5. package/lib/bin.js +2 -2
  6. package/lib/client.js +1 -0
  7. package/lib/content-review-CqDoh3wY.js +1 -0
  8. package/lib/content-review.js +1 -0
  9. package/lib/dump-config-CIL0Goqj.js +1 -0
  10. package/lib/gateway-port-CSFbDyoZ.js +1 -0
  11. package/lib/index.js +1 -0
  12. package/lib/llm-gateway-openai.js +17 -0
  13. package/lib/native-protocol-DdrIh89-.js +2 -0
  14. package/lib/{plugin-DNAeLZbb.js → plugin-viWCLnSr.js} +1 -1
  15. package/lib/profile-boot-CxJUSdnu.js +1 -0
  16. package/lib/profile-boot-DCgBQ4qO.js +8 -0
  17. package/lib/qb-auth-C2ofR1zn.js +4 -0
  18. package/lib/qb-auth.js +1 -0
  19. package/lib/web-search-dsh.js +1 -0
  20. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +7 -2
  21. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +3 -0
  22. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -0
  23. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +1 -1
  24. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +7 -2
  25. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +3 -0
  26. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -0
  27. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +1 -1
  28. package/node_modules/@deepseek-ai/cordis-plugin-hmr/package.json +1 -1
  29. package/node_modules/@deepseek-ai/dsh-agent/package.json +1 -1
  30. package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +1 -1
  31. package/node_modules/@deepseek-ai/dsh-agent-instructions/lib/index.js +3 -3
  32. package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
  33. package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
  34. package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
  35. package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +1 -1
  36. package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
  37. package/node_modules/@deepseek-ai/dsh-api-gateway/package.json +1 -1
  38. package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
  39. package/node_modules/@deepseek-ai/dsh-app-boot/lib/index.js +12 -12
  40. package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
  41. package/node_modules/@deepseek-ai/dsh-atomic-write/package.json +1 -1
  42. package/node_modules/@deepseek-ai/dsh-attachment/lib/index.js +1 -1
  43. package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
  44. package/node_modules/@deepseek-ai/dsh-attachment-local/lib/index.js +1 -1
  45. package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
  46. package/node_modules/@deepseek-ai/dsh-base/cordis.patch.yml +6 -37
  47. package/node_modules/@deepseek-ai/dsh-base/package.json +1 -1
  48. package/node_modules/@deepseek-ai/dsh-bash-local/package.json +1 -1
  49. package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +1 -1
  50. package/node_modules/@deepseek-ai/dsh-brand/package.json +1 -1
  51. package/node_modules/@deepseek-ai/dsh-client-connection/lib/client.js +1 -1
  52. package/node_modules/@deepseek-ai/dsh-client-connection/package.json +1 -1
  53. package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +1 -1
  54. package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +1 -1
  55. package/node_modules/@deepseek-ai/dsh-client-locale/package.json +1 -1
  56. package/node_modules/@deepseek-ai/dsh-client-modules/package.json +1 -1
  57. package/node_modules/@deepseek-ai/dsh-client-runtime/lib/client.js +4 -4
  58. package/node_modules/@deepseek-ai/dsh-client-runtime/package.json +1 -1
  59. package/node_modules/@deepseek-ai/dsh-client-schema-form/package.json +1 -1
  60. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
  61. package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +1 -1
  62. package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +1 -1
  63. package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +1 -1
  64. package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +1 -1
  65. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +8 -8
  66. package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +1 -1
  67. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +3 -3
  68. package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +1 -1
  69. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +1 -1
  70. package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +1 -1
  71. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +1 -1
  72. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +1 -1
  73. package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +1 -1
  74. package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
  75. package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +1 -1
  76. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +1 -1
  77. package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +1 -1
  78. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +1 -1
  79. package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +1 -1
  80. package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +1 -1
  81. package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +1 -1
  82. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +1 -1
  83. package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +1 -1
  84. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +1 -1
  85. package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +1 -1
  86. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +1 -1
  87. package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +1 -1
  88. package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +1 -1
  89. package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +1 -1
  90. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/lib/index.js +22 -22
  91. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
  92. package/node_modules/@deepseek-ai/dsh-client-ui-settings/lib/client.js +1 -1
  93. package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
  94. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
  95. package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
  96. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +1 -1
  97. package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
  98. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
  99. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
  100. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +1 -1
  101. package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
  102. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  103. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +1 -1
  104. package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +1 -1
  105. package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
  106. package/node_modules/@deepseek-ai/dsh-client-ui-slots/package.json +1 -1
  107. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +1 -1
  108. package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
  109. package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
  110. package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
  111. package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +1 -1
  112. package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
  113. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +2 -2
  114. package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +1 -1
  115. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1 -1
  116. package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +1 -1
  117. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
  118. package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +1 -1
  119. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1 -1
  120. package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +1 -1
  121. package/node_modules/@deepseek-ai/dsh-client-web/package.json +1 -1
  122. package/node_modules/@deepseek-ai/dsh-client-web-react/package.json +1 -1
  123. package/node_modules/@deepseek-ai/dsh-cmdline/lib/index.js +1 -1
  124. package/node_modules/@deepseek-ai/dsh-cmdline/package.json +1 -1
  125. package/node_modules/@deepseek-ai/dsh-code-runtime/package.json +1 -1
  126. package/node_modules/@deepseek-ai/dsh-code-runtime-worker-thread/package.json +1 -1
  127. package/node_modules/@deepseek-ai/dsh-command-compact/package.json +1 -1
  128. package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +1 -1
  129. package/node_modules/@deepseek-ai/dsh-command-goal/package.json +1 -1
  130. package/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +5 -2
  131. package/node_modules/@deepseek-ai/dsh-commands/package.json +1 -1
  132. package/node_modules/@deepseek-ai/dsh-compaction/package.json +1 -1
  133. package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -1
  134. package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +1 -1
  135. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +4 -4
  136. package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
  137. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +10 -4
  138. package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +1 -1
  139. package/node_modules/@deepseek-ai/dsh-credentials/package.json +1 -1
  140. package/node_modules/@deepseek-ai/dsh-credentials-local/lib/index.js +1 -1
  141. package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +1 -1
  142. package/node_modules/@deepseek-ai/dsh-fs/package.json +1 -1
  143. package/node_modules/@deepseek-ai/dsh-fs-local/package.json +1 -1
  144. package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +1 -1
  145. package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +1 -1
  146. package/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +5 -2
  147. package/node_modules/@deepseek-ai/dsh-goal/package.json +1 -1
  148. package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +1 -1
  149. package/node_modules/@deepseek-ai/dsh-headless/lib/index.js +4 -4
  150. package/node_modules/@deepseek-ai/dsh-headless/lib/startup.js +3 -3
  151. package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
  152. package/node_modules/@deepseek-ai/dsh-home-paths/lib/index.js +1 -1
  153. package/node_modules/@deepseek-ai/dsh-home-paths/package.json +1 -1
  154. package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/index.js +7 -7
  155. package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/types/api/rpc.schema.js +1 -1
  156. package/node_modules/@deepseek-ai/dsh-host-apiproxy/lib/types/api-proxy.js +1 -1
  157. package/node_modules/@deepseek-ai/dsh-host-apiproxy/package.json +1 -1
  158. package/node_modules/@deepseek-ai/dsh-host-directory-picker/package.json +1 -1
  159. package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +1 -1
  160. package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +1 -1
  161. package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +1 -1
  162. package/node_modules/@deepseek-ai/dsh-host-frontend-static/package.json +1 -1
  163. package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +1 -1
  164. package/node_modules/@deepseek-ai/dsh-host-webserver/lib/index.js +1 -1
  165. package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
  166. package/node_modules/@deepseek-ai/dsh-invariants/package.json +1 -1
  167. package/node_modules/@deepseek-ai/dsh-jobs/package.json +1 -1
  168. package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +1 -1
  169. package/node_modules/@deepseek-ai/dsh-launch-environment/package.json +1 -1
  170. package/node_modules/@deepseek-ai/dsh-llm/lib/index.js +1 -1
  171. package/node_modules/@deepseek-ai/dsh-llm/lib/types/assembler.js +1 -1
  172. package/node_modules/@deepseek-ai/dsh-llm/package.json +1 -1
  173. package/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +1 -1
  174. package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +1 -1
  175. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +1 -1
  176. package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
  177. package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +1 -1
  178. package/node_modules/@deepseek-ai/dsh-mcp-client/lib/index.js +3 -2
  179. package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +1 -1
  180. package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +1 -1
  181. package/node_modules/@deepseek-ai/dsh-native-command/package.json +1 -1
  182. package/node_modules/@deepseek-ai/dsh-output-retention/package.json +1 -1
  183. package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +1 -1
  184. package/node_modules/@deepseek-ai/dsh-persona/package.json +1 -1
  185. package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +1 -1
  186. package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +1 -1
  187. package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
  188. package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +1 -1
  189. package/node_modules/@deepseek-ai/dsh-sandbox/package.json +1 -1
  190. package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
  191. package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
  192. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/index.js +1 -1
  193. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/runner.js +1 -1
  194. package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +1 -1
  195. package/node_modules/@deepseek-ai/dsh-schedule/package.json +1 -1
  196. package/node_modules/@deepseek-ai/dsh-scope/package.json +1 -1
  197. package/node_modules/@deepseek-ai/dsh-session/package.json +1 -1
  198. package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +1 -1
  199. package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +1 -1
  200. package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +1 -1
  201. package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +1 -1
  202. package/node_modules/@deepseek-ai/dsh-session-projection/package.json +1 -1
  203. package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +1 -1
  204. package/node_modules/@deepseek-ai/dsh-session-query/lib/index.js +2 -2
  205. package/node_modules/@deepseek-ai/dsh-session-query/package.json +1 -1
  206. package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +1 -1
  207. package/node_modules/@deepseek-ai/dsh-session-reference/package.json +1 -1
  208. package/node_modules/@deepseek-ai/dsh-session-stats/package.json +1 -1
  209. package/node_modules/@deepseek-ai/dsh-session-telemetry/package.json +1 -1
  210. package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +1 -1
  211. package/node_modules/@deepseek-ai/dsh-session-title/package.json +1 -1
  212. package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +1 -1
  213. package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +1 -1
  214. package/node_modules/@deepseek-ai/dsh-settings/package.json +1 -1
  215. package/node_modules/@deepseek-ai/dsh-settings-file/package.json +1 -1
  216. package/node_modules/@deepseek-ai/dsh-shell/package.json +1 -1
  217. package/node_modules/@deepseek-ai/dsh-shell-env/lib/index.js +1 -1
  218. package/node_modules/@deepseek-ai/dsh-shell-env/package.json +1 -1
  219. package/node_modules/@deepseek-ai/dsh-skill/package.json +1 -1
  220. package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +1 -1
  221. package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +1 -1
  222. package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
  223. package/node_modules/@deepseek-ai/dsh-spill-local/package.json +1 -1
  224. package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +1 -1
  225. package/node_modules/@deepseek-ai/dsh-storage/package.json +1 -1
  226. package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +1 -1
  227. package/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -1
  228. package/node_modules/@deepseek-ai/dsh-subagent/package.json +1 -1
  229. package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +1 -1
  230. package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +1 -1
  231. package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +1 -1
  232. package/node_modules/@deepseek-ai/dsh-subprocess/lib/index.js +1 -1
  233. package/node_modules/@deepseek-ai/dsh-subprocess/package.json +1 -1
  234. package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +1 -1
  235. package/node_modules/@deepseek-ai/dsh-system-prompt/package.json +1 -1
  236. package/node_modules/@deepseek-ai/dsh-terminal/package.json +1 -1
  237. package/node_modules/@deepseek-ai/dsh-terminal-bash/lib/index.js +1 -1
  238. package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +1 -1
  239. package/node_modules/@deepseek-ai/dsh-time-context/package.json +1 -1
  240. package/node_modules/@deepseek-ai/dsh-timeout/package.json +1 -1
  241. package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +1 -1
  242. package/node_modules/@deepseek-ai/dsh-token-meter/package.json +1 -1
  243. package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +1 -1
  244. package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +1 -1
  245. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/lib/index.js +7 -10
  246. package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +1 -1
  247. package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +1 -1
  248. package/node_modules/@deepseek-ai/dsh-tool-cordis/lib/index.js +9 -30
  249. package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
  250. package/node_modules/@deepseek-ai/dsh-tool-fs/lib/index.js +8 -8
  251. package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +1 -1
  252. package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +1 -1
  253. package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +1 -1
  254. package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +1 -1
  255. package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +1 -1
  256. package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +1 -1
  257. package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +1 -1
  258. package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +1 -1
  259. package/node_modules/@deepseek-ai/dsh-tool-subagent/lib/index.js +2 -2
  260. package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +1 -1
  261. package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +1 -1
  262. package/node_modules/@deepseek-ai/dsh-tool-subagent-report/package.json +1 -1
  263. package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +1 -1
  264. package/node_modules/@deepseek-ai/dsh-tool-web/package.json +1 -1
  265. package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +1 -1
  266. package/node_modules/@deepseek-ai/dsh-tools/lib/index.js +15 -15
  267. package/node_modules/@deepseek-ai/dsh-tools/lib/types/code-mode.js +8 -8
  268. package/node_modules/@deepseek-ai/dsh-tools/lib/types/py-types.js +3 -3
  269. package/node_modules/@deepseek-ai/dsh-tools/lib/types/ts-types.js +4 -4
  270. package/node_modules/@deepseek-ai/dsh-tools/package.json +1 -1
  271. package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +1 -1
  272. package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +1 -1
  273. package/node_modules/@deepseek-ai/dsh-typert-registry/package.json +1 -1
  274. package/node_modules/@deepseek-ai/dsh-user-approval/package.json +1 -1
  275. package/node_modules/@deepseek-ai/dsh-user-questions/package.json +1 -1
  276. package/node_modules/@deepseek-ai/dsh-web/lib/index.js +1 -1
  277. package/node_modules/@deepseek-ai/dsh-web/package.json +1 -1
  278. package/node_modules/@deepseek-ai/dsh-web-app/cordis.patch.yml +0 -1
  279. package/node_modules/@deepseek-ai/dsh-web-app/lib/index.js +1 -1
  280. package/node_modules/@deepseek-ai/dsh-web-app/lib/startup.js +4 -5
  281. package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -1
  282. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/assets/{index-BQQQ5Qt-.js → index-fPGOmJjK.js} +25 -25
  283. package/node_modules/@deepseek-ai/dsh-web-frontend/dist/index.html +1 -1
  284. package/node_modules/@deepseek-ai/dsh-web-frontend/package.json +1 -1
  285. package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +1 -1
  286. package/node_modules/@deepseek-ai/dsh-workflow/package.json +1 -1
  287. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/lib/worker.cjs +9 -8
  288. package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/package.json +1 -1
  289. package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
  290. package/node_modules/@deepseek-ai/node-addon-landlock-run/package.json +1 -1
  291. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +5 -5
  292. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +1 -1
  293. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +1 -1
  294. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +1 -1
  295. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +1 -1
  296. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +3 -3
  297. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +4 -4
  298. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +5 -5
  299. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +6 -6
  300. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +1 -1
  301. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +1 -1
  302. package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +2 -2
  303. package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +1 -1
  304. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +1 -1
  305. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +1 -1
  306. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  307. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  308. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  309. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  310. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  311. package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
  312. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  313. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  314. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  315. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  316. package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  317. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  318. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
  319. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
  320. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +5 -5
  321. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  322. package/node_modules/@koromix/koffi-darwin-arm64/darwin_arm64/koffi.node +0 -0
  323. package/node_modules/@koromix/koffi-darwin-arm64/package.json +1 -1
  324. package/node_modules/@koromix/koffi-darwin-x64/darwin_x64/koffi.node +0 -0
  325. package/node_modules/@koromix/koffi-darwin-x64/package.json +1 -1
  326. package/node_modules/@koromix/koffi-win32-x64/package.json +1 -1
  327. package/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.node +0 -0
  328. package/node_modules/@smithy/core/dist-cjs/index.js +3 -1
  329. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +126 -39
  330. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +14 -3
  331. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +3 -1
  332. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +3 -1
  333. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +10 -1
  334. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +10 -1
  335. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +16 -2
  336. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +4 -1
  337. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +4 -1
  338. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -1
  339. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +4 -1
  340. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -1
  341. package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +7 -0
  342. package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +3 -0
  343. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +29 -13
  344. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +12 -4
  345. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +9 -0
  346. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +7 -0
  347. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +44 -15
  348. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +22 -4
  349. package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +5 -0
  350. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +3 -0
  351. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +4 -1
  352. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +6 -1
  353. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +4 -1
  354. package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +3 -0
  355. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +7 -0
  356. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +4 -1
  357. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +9 -0
  358. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +5 -0
  359. package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +3 -0
  360. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +4 -1
  361. package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
  362. package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
  363. package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
  364. package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +3 -0
  365. package/node_modules/@smithy/core/dist-es/submodules/transport/hasOwn.js +3 -0
  366. package/node_modules/@smithy/core/dist-es/submodules/transport/index.js +1 -0
  367. package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +3 -0
  368. package/node_modules/@smithy/core/package.json +1 -1
  369. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +19 -7
  370. package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -1
  371. package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +4 -1
  372. package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +4 -1
  373. package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +10 -3
  374. package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +4 -1
  375. package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +4 -1
  376. package/node_modules/@smithy/signature-v4/package.json +1 -1
  377. package/node_modules/@tanstack/react-virtual/package.json +1 -1
  378. package/node_modules/@tanstack/virtual-core/dist/cjs/index.cjs +7 -1
  379. package/node_modules/@tanstack/virtual-core/dist/cjs/utils.cjs +14 -4
  380. package/node_modules/@tanstack/virtual-core/dist/esm/index.js +1 -1
  381. package/node_modules/@tanstack/virtual-core/dist/esm/utils.js +2 -2
  382. package/node_modules/@tanstack/virtual-core/package.json +1 -1
  383. package/node_modules/hono/dist/cjs/client/utils.js +1 -1
  384. package/node_modules/hono/dist/cjs/context.js +4 -0
  385. package/node_modules/hono/dist/cjs/middleware/cors/index.js +1 -1
  386. package/node_modules/hono/dist/cjs/middleware/csrf/index.js +1 -1
  387. package/node_modules/hono/dist/cjs/middleware/etag/digest.js +1 -1
  388. package/node_modules/hono/dist/cjs/middleware/etag/index.js +2 -2
  389. package/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +3 -1
  390. package/node_modules/hono/dist/cjs/router/linear-router/router.js +7 -2
  391. package/node_modules/hono/dist/cjs/router/pattern-router/router.js +3 -9
  392. package/node_modules/hono/dist/cjs/router/trie-router/node.js +43 -67
  393. package/node_modules/hono/dist/cjs/router/trie-router/router.js +3 -11
  394. package/node_modules/hono/dist/cjs/utils/ipaddr.js +5 -3
  395. package/node_modules/hono/dist/client/utils.js +1 -1
  396. package/node_modules/hono/dist/middleware/cors/index.js +1 -1
  397. package/node_modules/hono/dist/middleware/csrf/index.js +1 -1
  398. package/node_modules/hono/dist/middleware/etag/digest.js +1 -1
  399. package/node_modules/hono/dist/middleware/etag/index.js +1 -1
  400. package/node_modules/hono/dist/middleware/pretty-json/index.js +1 -1
  401. package/node_modules/hono/dist/router/linear-router/router.js +1 -1
  402. package/node_modules/hono/dist/router/pattern-router/router.js +1 -1
  403. package/node_modules/hono/dist/router/trie-router/node.js +1 -1
  404. package/node_modules/hono/dist/router/trie-router/router.js +1 -1
  405. package/node_modules/hono/dist/utils/ipaddr.js +1 -1
  406. package/node_modules/hono/package.json +1 -1
  407. package/node_modules/koffi/package.json +1 -1
  408. package/node_modules/koffi/src/koffi/index.cjs +1 -1
  409. package/node_modules/koffi/src/koffi/index.js +1 -1
  410. package/node_modules/koffi/src/koffi/indirect.cjs +1 -1
  411. package/node_modules/koffi/src/koffi/indirect.js +1 -1
  412. package/node_modules/negotiator/lib/accept.js +54 -0
  413. package/node_modules/negotiator/lib/charset.js +10 -34
  414. package/node_modules/negotiator/lib/encoding.js +9 -30
  415. package/node_modules/negotiator/lib/language.js +15 -36
  416. package/node_modules/negotiator/lib/mediaType.js +16 -134
  417. package/node_modules/negotiator/node_modules/content-type/LICENSE +22 -0
  418. package/node_modules/negotiator/node_modules/content-type/dist/index.js +176 -0
  419. package/node_modules/negotiator/node_modules/content-type/package.json +1 -0
  420. package/node_modules/negotiator/package.json +1 -1
  421. package/node_modules/node-pty/lib/conpty_console_list_agent.js +11 -2
  422. package/node_modules/node-pty/lib/index.js +6 -6
  423. package/node_modules/node-pty/lib/shared/conout.js +2 -3
  424. package/node_modules/node-pty/lib/terminal.js +2 -2
  425. package/node_modules/node-pty/lib/unixTerminal.js +11 -6
  426. package/node_modules/node-pty/lib/utils.js +6 -7
  427. package/node_modules/node-pty/lib/windowsConoutConnection.js +24 -18
  428. package/node_modules/node-pty/lib/windowsPtyAgent.js +125 -101
  429. package/node_modules/node-pty/lib/windowsTerminal.js +14 -4
  430. package/node_modules/node-pty/lib/worker/conoutSocketWorker.js +3 -3
  431. package/node_modules/node-pty/package.json +1 -1
  432. package/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
  433. package/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
  434. package/node_modules/node-pty/prebuilds/darwin-x64/pty.node +0 -0
  435. package/node_modules/node-pty/prebuilds/darwin-x64/spawn-helper +0 -0
  436. package/node_modules/node-pty/prebuilds/win32-x64/conpty/OpenConsole.exe +0 -0
  437. package/node_modules/node-pty/prebuilds/win32-x64/conpty/conpty.dll +0 -0
  438. package/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
  439. package/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
  440. package/node_modules/node-pty/scripts/post-install.js +1 -5
  441. package/node_modules/node-pty/third_party/conpty/1.25.260303002/win10-arm64/OpenConsole.exe +0 -0
  442. package/node_modules/node-pty/third_party/conpty/{1.23.251008001 → 1.25.260303002}/win10-arm64/conpty.dll +0 -0
  443. package/node_modules/node-pty/third_party/conpty/1.25.260303002/win10-x64/OpenConsole.exe +0 -0
  444. package/node_modules/node-pty/third_party/conpty/1.25.260303002/win10-x64/conpty.dll +0 -0
  445. package/node_modules/typebox/build/compile/validator.mjs +1 -1
  446. package/node_modules/typebox/build/format/_idna.mjs +1 -1
  447. package/node_modules/typebox/build/format/_puny.mjs +1 -1
  448. package/node_modules/typebox/build/format/uuid.mjs +1 -1
  449. package/node_modules/typebox/build/guard/emit.mjs +1 -1
  450. package/node_modules/typebox/build/guard/guard.mjs +1 -1
  451. package/node_modules/typebox/build/guard/string.mjs +1 -1
  452. package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
  453. package/node_modules/typebox/build/schema/engine/_guard.mjs +1 -0
  454. package/node_modules/typebox/build/schema/engine/boolean.mjs +1 -1
  455. package/node_modules/typebox/build/schema/engine/index.mjs +1 -1
  456. package/node_modules/typebox/build/schema/engine/schema.mjs +1 -1
  457. package/node_modules/typebox/build/schema/engine/type.mjs +1 -1
  458. package/node_modules/typebox/build/schema/types/_guard.mjs +1 -0
  459. package/node_modules/typebox/build/schema/types/index.mjs +1 -1
  460. package/node_modules/typebox/build/schema/types/schema.mjs +1 -1
  461. package/node_modules/typebox/build/system/locale/ar_001.mjs +1 -1
  462. package/node_modules/typebox/build/system/locale/bn_BD.mjs +1 -1
  463. package/node_modules/typebox/build/system/locale/cs_CZ.mjs +1 -1
  464. package/node_modules/typebox/build/system/locale/de_DE.mjs +1 -1
  465. package/node_modules/typebox/build/system/locale/el_GR.mjs +1 -1
  466. package/node_modules/typebox/build/system/locale/en_US.mjs +1 -1
  467. package/node_modules/typebox/build/system/locale/es_419.mjs +1 -1
  468. package/node_modules/typebox/build/system/locale/es_AR.mjs +1 -1
  469. package/node_modules/typebox/build/system/locale/es_ES.mjs +1 -1
  470. package/node_modules/typebox/build/system/locale/es_MX.mjs +1 -1
  471. package/node_modules/typebox/build/system/locale/fa_IR.mjs +1 -1
  472. package/node_modules/typebox/build/system/locale/fil_PH.mjs +1 -1
  473. package/node_modules/typebox/build/system/locale/fr_CA.mjs +1 -1
  474. package/node_modules/typebox/build/system/locale/fr_FR.mjs +1 -1
  475. package/node_modules/typebox/build/system/locale/ha_NG.mjs +1 -1
  476. package/node_modules/typebox/build/system/locale/hi_IN.mjs +1 -1
  477. package/node_modules/typebox/build/system/locale/hu_HU.mjs +1 -1
  478. package/node_modules/typebox/build/system/locale/id_ID.mjs +1 -1
  479. package/node_modules/typebox/build/system/locale/it_IT.mjs +1 -1
  480. package/node_modules/typebox/build/system/locale/ja_JP.mjs +1 -1
  481. package/node_modules/typebox/build/system/locale/ko_KR.mjs +1 -1
  482. package/node_modules/typebox/build/system/locale/ms_MY.mjs +1 -1
  483. package/node_modules/typebox/build/system/locale/nl_NL.mjs +1 -1
  484. package/node_modules/typebox/build/system/locale/pl_PL.mjs +1 -1
  485. package/node_modules/typebox/build/system/locale/pt_BR.mjs +1 -1
  486. package/node_modules/typebox/build/system/locale/pt_PT.mjs +1 -1
  487. package/node_modules/typebox/build/system/locale/ro_RO.mjs +1 -1
  488. package/node_modules/typebox/build/system/locale/ru_RU.mjs +1 -1
  489. package/node_modules/typebox/build/system/locale/sv_SE.mjs +1 -1
  490. package/node_modules/typebox/build/system/locale/sw_TZ.mjs +1 -1
  491. package/node_modules/typebox/build/system/locale/th_TH.mjs +1 -1
  492. package/node_modules/typebox/build/system/locale/tr_TR.mjs +1 -1
  493. package/node_modules/typebox/build/system/locale/uk_UA.mjs +1 -1
  494. package/node_modules/typebox/build/system/locale/ur_PK.mjs +1 -1
  495. package/node_modules/typebox/build/system/locale/vi_VN.mjs +1 -1
  496. package/node_modules/typebox/build/system/locale/yo_NG.mjs +1 -1
  497. package/node_modules/typebox/build/system/locale/zh_Hans.mjs +1 -1
  498. package/node_modules/typebox/build/system/locale/zh_Hant.mjs +1 -1
  499. package/node_modules/typebox/build/system/memory/clone.mjs +1 -1
  500. package/node_modules/typebox/build/system/settings/settings.mjs +1 -1
  501. package/node_modules/typebox/build/type/action/_optional.mjs +1 -0
  502. package/node_modules/typebox/build/type/action/_readonly.mjs +1 -0
  503. package/node_modules/typebox/build/type/action/awaited.mjs +1 -0
  504. package/node_modules/typebox/build/type/action/conditional.mjs +1 -1
  505. package/node_modules/typebox/build/type/action/index.mjs +1 -1
  506. package/node_modules/typebox/build/type/action/mapped.mjs +1 -1
  507. package/node_modules/typebox/build/type/action/module.mjs +1 -1
  508. package/node_modules/typebox/build/type/action/options.mjs +1 -0
  509. package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +1 -0
  510. package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +1 -1
  511. package/node_modules/typebox/build/type/engine/call/instantiate.mjs +1 -1
  512. package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +1 -1
  513. package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +1 -1
  514. package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +1 -1
  515. package/node_modules/typebox/build/type/engine/cyclic/check.mjs +1 -1
  516. package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +1 -1
  517. package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +1 -1
  518. package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +1 -1
  519. package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +1 -0
  520. package/node_modules/typebox/build/type/engine/enum/index.mjs +1 -1
  521. package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +1 -1
  522. package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +1 -1
  523. package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +1 -1
  524. package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +1 -1
  525. package/node_modules/typebox/build/type/engine/exclude/operation.mjs +1 -1
  526. package/node_modules/typebox/build/type/engine/extract/operation.mjs +1 -1
  527. package/node_modules/typebox/build/type/engine/index.mjs +1 -1
  528. package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +1 -1
  529. package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +1 -1
  530. package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +1 -1
  531. package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +1 -1
  532. package/node_modules/typebox/build/type/engine/instantiate.mjs +1 -1
  533. package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +1 -1
  534. package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +1 -1
  535. package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +1 -1
  536. package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +1 -1
  537. package/node_modules/typebox/build/type/engine/module/instantiate.mjs +1 -1
  538. package/node_modules/typebox/build/type/engine/object/from_type.mjs +1 -1
  539. package/node_modules/typebox/build/type/engine/object/from_union.mjs +1 -1
  540. package/node_modules/typebox/build/type/engine/options/index.mjs +1 -0
  541. package/node_modules/typebox/build/type/engine/options/instantiate.mjs +1 -0
  542. package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +1 -1
  543. package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +1 -1
  544. package/node_modules/typebox/build/type/engine/partial/from_object.mjs +1 -1
  545. package/node_modules/typebox/build/type/engine/partial/from_type.mjs +1 -1
  546. package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +1 -1
  547. package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +1 -1
  548. package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +1 -1
  549. package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +1 -1
  550. package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +1 -1
  551. package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +1 -1
  552. package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +1 -1
  553. package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +1 -1
  554. package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +1 -1
  555. package/node_modules/typebox/build/type/engine/required/from_object.mjs +1 -1
  556. package/node_modules/typebox/build/type/engine/required/from_type.mjs +1 -1
  557. package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +1 -1
  558. package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +1 -1
  559. package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +1 -1
  560. package/node_modules/typebox/build/type/engine/this/expand_this.mjs +1 -1
  561. package/node_modules/typebox/build/type/extends/async_iterator.mjs +1 -0
  562. package/node_modules/typebox/build/type/extends/enum.mjs +1 -1
  563. package/node_modules/typebox/build/type/extends/extends_left.mjs +1 -1
  564. package/node_modules/typebox/build/type/extends/extends_right.mjs +1 -1
  565. package/node_modules/typebox/build/type/extends/inference.mjs +1 -1
  566. package/node_modules/typebox/build/type/extends/iterator.mjs +1 -0
  567. package/node_modules/typebox/build/type/extends/object.mjs +1 -1
  568. package/node_modules/typebox/build/type/extends/parameters.mjs +1 -1
  569. package/node_modules/typebox/build/type/extends/promise.mjs +1 -0
  570. package/node_modules/typebox/build/type/extends/template_literal.mjs +1 -1
  571. package/node_modules/typebox/build/type/extends/tuple.mjs +1 -1
  572. package/node_modules/typebox/build/type/extends/union.mjs +1 -1
  573. package/node_modules/typebox/build/type/script/mapping.mjs +1 -1
  574. package/node_modules/typebox/build/type/script/parser.mjs +6 -6
  575. package/node_modules/typebox/build/type/script/script.mjs +1 -1
  576. package/node_modules/typebox/build/type/script/token/internal/guard.mjs +1 -1
  577. package/node_modules/typebox/build/type/script/token/until.mjs +1 -1
  578. package/node_modules/typebox/build/type/types/_immutable.mjs +1 -1
  579. package/node_modules/typebox/build/type/types/_optional.mjs +1 -1
  580. package/node_modules/typebox/build/type/types/_readonly.mjs +1 -1
  581. package/node_modules/typebox/build/type/types/_refine.mjs +1 -1
  582. package/node_modules/typebox/build/type/types/async_iterator.mjs +1 -0
  583. package/node_modules/typebox/build/type/types/base.mjs +1 -0
  584. package/node_modules/typebox/build/type/types/call.mjs +1 -1
  585. package/node_modules/typebox/build/type/types/deferred.mjs +1 -1
  586. package/node_modules/typebox/build/type/types/enum.mjs +1 -1
  587. package/node_modules/typebox/build/type/types/index.mjs +1 -1
  588. package/node_modules/typebox/build/type/types/iterator.mjs +1 -0
  589. package/node_modules/typebox/build/type/types/number.mjs +1 -1
  590. package/node_modules/typebox/build/type/types/promise.mjs +1 -0
  591. package/node_modules/typebox/build/type/types/record.mjs +1 -1
  592. package/node_modules/typebox/build/typebox.mjs +1 -1
  593. package/node_modules/typebox/build/value/clean/clean.mjs +1 -1
  594. package/node_modules/typebox/build/value/clean/from_base.mjs +1 -0
  595. package/node_modules/typebox/build/value/clean/from_intersect.mjs +1 -1
  596. package/node_modules/typebox/build/value/clean/from_type.mjs +1 -1
  597. package/node_modules/typebox/build/value/clean/from_union.mjs +1 -1
  598. package/node_modules/typebox/build/value/clone/clone.mjs +1 -1
  599. package/node_modules/typebox/build/value/codec/decode.mjs +1 -1
  600. package/node_modules/typebox/build/value/codec/encode.mjs +1 -1
  601. package/node_modules/typebox/build/value/codec/from_array.mjs +1 -1
  602. package/node_modules/typebox/build/value/codec/from_object.mjs +1 -1
  603. package/node_modules/typebox/build/value/codec/from_record.mjs +1 -1
  604. package/node_modules/typebox/build/value/codec/from_tuple.mjs +1 -1
  605. package/node_modules/typebox/build/value/codec/from_union.mjs +1 -1
  606. package/node_modules/typebox/build/value/convert/from_base.mjs +1 -0
  607. package/node_modules/typebox/build/value/convert/from_enum.mjs +1 -1
  608. package/node_modules/typebox/build/value/convert/from_template_literal.mjs +1 -1
  609. package/node_modules/typebox/build/value/convert/from_type.mjs +1 -1
  610. package/node_modules/typebox/build/value/create/from_async_iterator.mjs +1 -0
  611. package/node_modules/typebox/build/value/create/from_base.mjs +1 -0
  612. package/node_modules/typebox/build/value/create/from_enum.mjs +1 -1
  613. package/node_modules/typebox/build/value/create/from_iterator.mjs +1 -0
  614. package/node_modules/typebox/build/value/create/from_promise.mjs +1 -0
  615. package/node_modules/typebox/build/value/create/from_type.mjs +1 -1
  616. package/node_modules/typebox/build/value/default/from_base.mjs +1 -0
  617. package/node_modules/typebox/build/value/default/from_object.mjs +1 -1
  618. package/node_modules/typebox/build/value/default/from_type.mjs +1 -1
  619. package/node_modules/typebox/build/value/index.mjs +1 -1
  620. package/node_modules/typebox/build/value/mutate/error.mjs +1 -0
  621. package/node_modules/typebox/build/value/mutate/from_array.mjs +1 -0
  622. package/node_modules/typebox/build/value/mutate/from_object.mjs +1 -0
  623. package/node_modules/typebox/build/value/mutate/from_unknown.mjs +1 -0
  624. package/node_modules/typebox/build/value/mutate/from_value.mjs +1 -0
  625. package/node_modules/typebox/build/value/mutate/index.mjs +1 -0
  626. package/node_modules/typebox/build/value/mutate/mutate.mjs +1 -0
  627. package/node_modules/typebox/build/value/repair/from_base.mjs +1 -0
  628. package/node_modules/typebox/build/value/repair/from_enum.mjs +1 -1
  629. package/node_modules/typebox/build/value/repair/from_type.mjs +1 -1
  630. package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +1 -1
  631. package/node_modules/typebox/build/value/value.mjs +1 -1
  632. package/node_modules/typebox/package.json +1 -1
  633. package/package.json +1 -1
  634. package/lib/args-DcHS9iff.js +0 -9
  635. package/lib/dump-config-xQTUTTDD.js +0 -1
  636. package/lib/profile-boot-BkordgJK.js +0 -1
  637. package/lib/profile-boot-DDo03lXi.js +0 -8
  638. package/node_modules/@deepseek-ai/dsh-content-review/LICENSE +0 -21
  639. package/node_modules/@deepseek-ai/dsh-content-review/lib/index.js +0 -1
  640. package/node_modules/@deepseek-ai/dsh-content-review/lib/invariant.js +0 -1
  641. package/node_modules/@deepseek-ai/dsh-content-review/package.json +0 -1
  642. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/LICENSE +0 -21
  643. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/lib/index.js +0 -1
  644. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/lib/invariant.js +0 -1
  645. package/node_modules/@deepseek-ai/dsh-home-quarantine-macos/package.json +0 -1
  646. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/LICENSE +0 -21
  647. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/lib/index.js +0 -17
  648. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/lib/invariant.js +0 -1
  649. package/node_modules/@deepseek-ai/dsh-llm-gateway-openai/package.json +0 -1
  650. package/node_modules/@deepseek-ai/dsh-qb-auth/LICENSE +0 -21
  651. package/node_modules/@deepseek-ai/dsh-qb-auth/lib/index.js +0 -4
  652. package/node_modules/@deepseek-ai/dsh-qb-auth/lib/invariant.js +0 -1
  653. package/node_modules/@deepseek-ai/dsh-qb-auth/package.json +0 -1
  654. package/node_modules/@deepseek-ai/dsh-web-search-dsh/LICENSE +0 -21
  655. package/node_modules/@deepseek-ai/dsh-web-search-dsh/lib/index.js +0 -1
  656. package/node_modules/@deepseek-ai/dsh-web-search-dsh/lib/invariant.js +0 -1
  657. package/node_modules/@deepseek-ai/dsh-web-search-dsh/package.json +0 -1
  658. package/node_modules/@napi-rs/xattr/LICENSE +0 -21
  659. package/node_modules/@napi-rs/xattr/index.js +0 -567
  660. package/node_modules/@napi-rs/xattr/package.json +0 -1
  661. package/node_modules/@napi-rs/xattr-darwin-arm64/package.json +0 -1
  662. package/node_modules/@napi-rs/xattr-darwin-arm64/xattr.darwin-arm64.node +0 -0
  663. package/node_modules/@napi-rs/xattr-darwin-x64/package.json +0 -1
  664. package/node_modules/@napi-rs/xattr-darwin-x64/xattr.darwin-x64.node +0 -0
  665. package/node_modules/@parcel/watcher/LICENSE +0 -21
  666. package/node_modules/@parcel/watcher/index.js +0 -44
  667. package/node_modules/@parcel/watcher/index.js.flow +0 -45
  668. package/node_modules/@parcel/watcher/package.json +0 -1
  669. package/node_modules/@parcel/watcher/scripts/build-from-source.js +0 -16
  670. package/node_modules/@parcel/watcher/wrapper.js +0 -88
  671. package/node_modules/@parcel/watcher-darwin-arm64/LICENSE +0 -21
  672. package/node_modules/@parcel/watcher-darwin-arm64/package.json +0 -1
  673. package/node_modules/@parcel/watcher-darwin-arm64/watcher.node +0 -0
  674. package/node_modules/@parcel/watcher-darwin-x64/LICENSE +0 -21
  675. package/node_modules/@parcel/watcher-darwin-x64/package.json +0 -1
  676. package/node_modules/@parcel/watcher-darwin-x64/watcher.node +0 -0
  677. package/node_modules/@parcel/watcher-win32-x64/LICENSE +0 -21
  678. package/node_modules/@parcel/watcher-win32-x64/package.json +0 -1
  679. package/node_modules/@parcel/watcher-win32-x64/watcher.node +0 -0
  680. package/node_modules/is-extglob/LICENSE +0 -21
  681. package/node_modules/is-extglob/index.js +0 -20
  682. package/node_modules/is-extglob/package.json +0 -1
  683. package/node_modules/is-glob/LICENSE +0 -21
  684. package/node_modules/is-glob/index.js +0 -150
  685. package/node_modules/is-glob/package.json +0 -1
  686. package/node_modules/node-pty/deps/winpty/.drone.yml +0 -15
  687. package/node_modules/node-pty/deps/winpty/LICENSE +0 -21
  688. package/node_modules/node-pty/deps/winpty/configure +0 -167
  689. package/node_modules/node-pty/deps/winpty/misc/ConinMode.ps1 +0 -116
  690. package/node_modules/node-pty/deps/winpty/misc/IdentifyConsoleWindow.ps1 +0 -51
  691. package/node_modules/node-pty/deps/winpty/misc/build32.sh +0 -9
  692. package/node_modules/node-pty/deps/winpty/misc/build64.sh +0 -9
  693. package/node_modules/node-pty/deps/winpty/misc/color-test.sh +0 -212
  694. package/node_modules/node-pty/deps/winpty/ship/build-pty4j-libpty.bat +0 -36
  695. package/node_modules/node-pty/deps/winpty/src/shared/GetCommitHash.bat +0 -13
  696. package/node_modules/node-pty/deps/winpty/src/shared/UpdateGenVersion.bat +0 -20
  697. package/node_modules/node-pty/deps/winpty/vcbuild.bat +0 -83
  698. package/node_modules/node-pty/lib/eventEmitter2.test.js +0 -30
  699. package/node_modules/node-pty/lib/terminal.test.js +0 -139
  700. package/node_modules/node-pty/lib/testUtils.test.js +0 -28
  701. package/node_modules/node-pty/lib/unixTerminal.test.js +0 -351
  702. package/node_modules/node-pty/lib/windowsPtyAgent.test.js +0 -90
  703. package/node_modules/node-pty/lib/windowsTerminal.test.js +0 -219
  704. package/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
  705. package/node_modules/node-pty/prebuilds/win32-x64/winpty-agent.exe +0 -0
  706. package/node_modules/node-pty/prebuilds/win32-x64/winpty.dll +0 -0
  707. package/node_modules/node-pty/scripts/gen-compile-commands.js +0 -8
  708. package/node_modules/node-pty/scripts/increment-version.js +0 -54
  709. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-arm64/OpenConsole.exe +0 -0
  710. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/OpenConsole.exe +0 -0
  711. package/node_modules/node-pty/third_party/conpty/1.23.251008001/win10-x64/conpty.dll +0 -0
  712. package/node_modules/typebox/build/type/action/_add_immutable.mjs +0 -1
  713. package/node_modules/typebox/build/type/action/_add_optional.mjs +0 -1
  714. package/node_modules/typebox/build/type/action/_add_readonly.mjs +0 -1
  715. package/node_modules/typebox/build/type/action/_remove_immutable.mjs +0 -1
  716. package/node_modules/typebox/build/type/action/_remove_optional.mjs +0 -1
  717. package/node_modules/typebox/build/type/action/_remove_readonly.mjs +0 -1
  718. package/node_modules/typebox/build/type/action/with.mjs +0 -1
  719. package/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +0 -1
  720. package/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +0 -1
  721. package/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +0 -1
  722. package/node_modules/typebox/build/type/engine/object/from_dependent.mjs +0 -1
  723. package/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +0 -1
  724. package/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +0 -1
  725. package/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +0 -1
  726. package/node_modules/typebox/build/type/engine/priority/index.mjs +0 -1
  727. package/node_modules/typebox/build/type/engine/priority/priority.mjs +0 -1
  728. package/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +0 -1
  729. package/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +0 -1
  730. package/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +0 -1
  731. package/node_modules/typebox/build/type/engine/required/from_dependent.mjs +0 -1
  732. package/node_modules/typebox/build/type/engine/with/instantiate.mjs +0 -1
  733. package/node_modules/typebox/build/type/extends/dependent.mjs +0 -1
  734. package/node_modules/typebox/build/type/extends/record.mjs +0 -1
  735. package/node_modules/typebox/build/type/types/dependent.mjs +0 -1
  736. /package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/lib/{types-D2_FQYSK.js → types-DE3U0cmQ.js} +0 -0
  737. /package/node_modules/typebox/build/type/engine/{with → awaited}/index.mjs +0 -0
@@ -61,7 +61,7 @@ var id=Object.defineProperty;var r=(on,He)=>id(on,"name",{value:He,configurable:
61
61
 
62
62
  `)}b.write("payload.value = newResult;"),b.write("return payload;");const Se=b.compile();return(te,F)=>Se(_,te,F)},"generateFastpass");let a;const i=je,u=!Ke.jitless,f=u&&So.value,m=t.catchall;let k;e._zod.parse=(_,b)=>{k??(k=s.value);const S=_.value;return i(S)?u&&f&&b?.async===!1&&b.jitless!==!0?(a||(a=o(t.shape)),_=a(_,b),m?Rn([],S,_,b,k,e):_):n(_,b):(_.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),_)}});function Zn(e,t,n,s){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const o=e.filter(a=>!ze(a));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(a=>a.issues.map(i=>fe(i,s,pe())))}),t)}r(Zn,"handleUnionResults");const Nn=y("$ZodUnion",(e,t)=>{V.init(e,t),N(e._zod,"optin",()=>t.options.some(s=>s._zod.optin==="optional")?"optional":void 0),N(e._zod,"optout",()=>t.options.some(s=>s._zod.optout==="optional")?"optional":void 0),N(e._zod,"values",()=>{if(t.options.every(s=>s._zod.values))return new Set(t.options.flatMap(s=>Array.from(s._zod.values)))}),N(e._zod,"pattern",()=>{if(t.options.every(s=>s._zod.pattern)){const s=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${s.map(o=>St(o.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(s,o)=>{if(n)return n(s,o);let a=!1;const i=[];for(const u of t.options){const f=u._zod.run({value:s.value,issues:[]},o);if(f instanceof Promise)i.push(f),a=!0;else{if(f.issues.length===0)return f;i.push(f)}}return a?Promise.all(i).then(u=>Zn(u,s,e,o)):Zn(i,s,e,o)}}),da=y("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Nn.init(e,t);const n=e._zod.parse;N(e._zod,"propValues",()=>{const o={};for(const a of t.options){const i=a._zod.propValues;if(!i||Object.keys(i).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const[u,f]of Object.entries(i)){o[u]||(o[u]=new Set);for(const m of f)o[u].add(m)}}return o});const s=Ye(()=>{const o=t.options,a=new Map;for(const i of o){const u=i._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const f of u){if(a.has(f))throw new Error(`Duplicate discriminator value "${String(f)}"`);a.set(f,i)}}return a});e._zod.parse=(o,a)=>{const i=o.value;if(!je(i))return o.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),o;const u=s.value.get(i?.[t.discriminator]);return u?u._zod.run(o,a):t.unionFallback||a.direction==="backward"?n(o,a):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(s.value.keys()),input:i,path:[t.discriminator],inst:e}),o)}}),pa=y("$ZodIntersection",(e,t)=>{V.init(e,t),e._zod.parse=(n,s)=>{const o=n.value,a=t.left._zod.run({value:o,issues:[]},s),i=t.right._zod.run({value:o,issues:[]},s);return a instanceof Promise||i instanceof Promise?Promise.all([a,i]).then(([u,f])=>jn(n,u,f)):jn(n,a,i)}});function zt(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if($e(e)&&$e(t)){const n=Object.keys(t),s=Object.keys(e).filter(a=>n.indexOf(a)!==-1),o={...e,...t};for(const a of s){const i=zt(e[a],t[a]);if(!i.valid)return{valid:!1,mergeErrorPath:[a,...i.mergeErrorPath]};o[a]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let s=0;s<e.length;s++){const o=e[s],a=t[s],i=zt(o,a);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}r(zt,"mergeValues");function jn(e,t,n){const s=new Map;let o;for(const u of t.issues)if(u.code==="unrecognized_keys"){o??(o=u);for(const f of u.keys)s.has(f)||s.set(f,{}),s.get(f).l=!0}else e.issues.push(u);for(const u of n.issues)if(u.code==="unrecognized_keys")for(const f of u.keys)s.has(f)||s.set(f,{}),s.get(f).r=!0;else e.issues.push(u);const a=[...s].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(a.length&&o&&e.issues.push({...o,keys:a}),ze(e))return e;const i=zt(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}r(jn,"handleIntersectionResults");const fa=y("$ZodRecord",(e,t)=>{V.init(e,t),e._zod.parse=(n,s)=>{const o=n.value;if(!$e(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const a=[],i=t.keyType._zod.values;if(i){n.value={};const u=new Set;for(const m of i)if(typeof m=="string"||typeof m=="number"||typeof m=="symbol"){u.add(typeof m=="number"?m.toString():m);const k=t.keyType._zod.run({value:m,issues:[]},s);if(k instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(k.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:k.issues.map(S=>fe(S,s,pe())),input:m,path:[m],inst:e});continue}const _=k.value,b=t.valueType._zod.run({value:o[m],issues:[]},s);b instanceof Promise?a.push(b.then(S=>{S.issues.length&&n.issues.push(...Ae(m,S.issues)),n.value[_]=S.value})):(b.issues.length&&n.issues.push(...Ae(m,b.issues)),n.value[_]=b.value)}let f;for(const m in o)u.has(m)||(f=f??[],f.push(m));f&&f.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:f})}else{n.value={};for(const u of Reflect.ownKeys(o)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,u))continue;let f=t.keyType._zod.run({value:u,issues:[]},s);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&xn.test(u)&&f.issues.length){const k=t.keyType._zod.run({value:Number(u),issues:[]},s);if(k instanceof Promise)throw new Error("Async schemas not supported in object keys currently");k.issues.length===0&&(f=k)}if(f.issues.length){t.mode==="loose"?n.value[u]=o[u]:n.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(k=>fe(k,s,pe())),input:u,path:[u],inst:e});continue}const m=t.valueType._zod.run({value:o[u],issues:[]},s);m instanceof Promise?a.push(m.then(k=>{k.issues.length&&n.issues.push(...Ae(u,k.issues)),n.value[f.value]=k.value})):(m.issues.length&&n.issues.push(...Ae(u,m.issues)),n.value[f.value]=m.value)}}return a.length?Promise.all(a).then(()=>n):n}}),ha=y("$ZodEnum",(e,t)=>{V.init(e,t);const n=fn(t.entries),s=new Set(n);e._zod.values=s,e._zod.pattern=new RegExp(`^(${n.filter(o=>Io.has(typeof o)).map(o=>typeof o=="string"?Ee(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{const i=o.value;return s.has(i)||o.issues.push({code:"invalid_value",values:n,input:i,inst:e}),o}}),ma=y("$ZodLiteral",(e,t)=>{if(V.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(s=>typeof s=="string"?Ee(s):s?Ee(s.toString()):String(s)).join("|")})$`),e._zod.parse=(s,o)=>{const a=s.value;return n.has(a)||s.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),s}}),ga=y("$ZodTransform",(e,t)=>{V.init(e,t),e._zod.optin="optional",e._zod.parse=(n,s)=>{if(s.direction==="backward")throw new pn(e.constructor.name);const o=t.transform(n.value,n);if(s.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(n.value=a,n.fallback=!0,n));if(o instanceof Promise)throw new xe;return n.value=o,n.fallback=!0,n}});function Mn(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}r(Mn,"handleOptionalResult");const Dn=y("$ZodOptional",(e,t)=>{V.init(e,t),e._zod.optin="optional",e._zod.optout="optional",N(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),N(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${St(n.source)})?$`):void 0}),e._zod.parse=(n,s)=>{if(t.innerType._zod.optin==="optional"){const o=n.value,a=t.innerType._zod.run(n,s);return a instanceof Promise?a.then(i=>Mn(i,o)):Mn(a,o)}return n.value===void 0?n:t.innerType._zod.run(n,s)}}),va=y("$ZodExactOptional",(e,t)=>{Dn.init(e,t),N(e._zod,"values",()=>t.innerType._zod.values),N(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,s)=>t.innerType._zod.run(n,s)}),ya=y("$ZodNullable",(e,t)=>{V.init(e,t),N(e._zod,"optin",()=>t.innerType._zod.optin),N(e._zod,"optout",()=>t.innerType._zod.optout),N(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${St(n.source)}|null)$`):void 0}),N(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,s)=>n.value===null?n:t.innerType._zod.run(n,s)}),wa=y("$ZodDefault",(e,t)=>{V.init(e,t),e._zod.optin="optional",N(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,s)=>{if(s.direction==="backward")return t.innerType._zod.run(n,s);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,s);return o instanceof Promise?o.then(a=>Cn(a,t)):Cn(o,t)}});function Cn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}r(Cn,"handleDefaultResult");const ka=y("$ZodPrefault",(e,t)=>{V.init(e,t),e._zod.optin="optional",N(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,s)=>(s.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,s))}),ba=y("$ZodNonOptional",(e,t)=>{V.init(e,t),N(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(s=>s!==void 0)):void 0}),e._zod.parse=(n,s)=>{const o=t.innerType._zod.run(n,s);return o instanceof Promise?o.then(a=>Un(a,e)):Un(o,e)}});function Un(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}r(Un,"handleNonOptionalResult");const _a=y("$ZodCatch",(e,t)=>{V.init(e,t),e._zod.optin="optional",N(e._zod,"optout",()=>t.innerType._zod.optout),N(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,s)=>{if(s.direction==="backward")return t.innerType._zod.run(n,s);const o=t.innerType._zod.run(n,s);return o instanceof Promise?o.then(a=>(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(i=>fe(i,s,pe()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>fe(a,s,pe()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Sa=y("$ZodPipe",(e,t)=>{V.init(e,t),N(e._zod,"values",()=>t.in._zod.values),N(e._zod,"optin",()=>t.in._zod.optin),N(e._zod,"optout",()=>t.out._zod.optout),N(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,s)=>{if(s.direction==="backward"){const a=t.out._zod.run(n,s);return a instanceof Promise?a.then(i=>nt(i,t.in,s)):nt(a,t.in,s)}const o=t.in._zod.run(n,s);return o instanceof Promise?o.then(a=>nt(a,t.out,s)):nt(o,t.out,s)}});function nt(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}r(nt,"handlePipeResult");const Ia=y("$ZodReadonly",(e,t)=>{V.init(e,t),N(e._zod,"propValues",()=>t.innerType._zod.propValues),N(e._zod,"values",()=>t.innerType._zod.values),N(e._zod,"optin",()=>t.innerType?._zod?.optin),N(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,s)=>{if(s.direction==="backward")return t.innerType._zod.run(n,s);const o=t.innerType._zod.run(n,s);return o instanceof Promise?o.then(Ln):Ln(o)}});function Ln(e){return e.value=Object.freeze(e.value),e}r(Ln,"handleReadonlyResult");const xa=y("$ZodLazy",(e,t)=>{V.init(e,t),N(e._zod,"innerType",()=>{const n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),N(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),N(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),N(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),N(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,s)=>e._zod.innerType._zod.run(n,s)}),$a=y("$ZodCustom",(e,t)=>{se.init(e,t),V.init(e,t),e._zod.parse=(n,s)=>n,e._zod.check=n=>{const s=n.value,o=t.fn(s);if(o instanceof Promise)return o.then(a=>Fn(a,n,s,e));Fn(o,n,s,e)}});function Fn(e,t,n,s){if(!e){const o={code:"custom",input:n,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};s._zod.def.params&&(o.params=s._zod.def.params),t.issues.push(Me(o))}}r(Fn,"handleRefineResult");var Vn,Ea=class{static{r(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const s={...n,...this._map.get(e)};return Object.keys(s).length?s:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function za(){return new Ea}r(za,"registry"),(Vn=globalThis).__zod_globalRegistry??(Vn.__zod_globalRegistry=za());const De=globalThis.__zod_globalRegistry;function Aa(e,t){return new e({type:"string",...x(t)})}r(Aa,"_string");function Ta(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...x(t)})}r(Ta,"_email");function Bn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...x(t)})}r(Bn,"_guid");function Oa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...x(t)})}r(Oa,"_uuid");function Pa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...x(t)})}r(Pa,"_uuidv4");function Ra(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...x(t)})}r(Ra,"_uuidv6");function Za(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...x(t)})}r(Za,"_uuidv7");function Na(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...x(t)})}r(Na,"_url");function ja(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...x(t)})}r(ja,"_emoji");function Ma(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...x(t)})}r(Ma,"_nanoid");function Da(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...x(t)})}r(Da,"_cuid");function Ca(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...x(t)})}r(Ca,"_cuid2");function Ua(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...x(t)})}r(Ua,"_ulid");function La(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...x(t)})}r(La,"_xid");function Fa(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...x(t)})}r(Fa,"_ksuid");function Va(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...x(t)})}r(Va,"_ipv4");function Ba(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...x(t)})}r(Ba,"_ipv6");function Ja(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...x(t)})}r(Ja,"_cidrv4");function Ga(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...x(t)})}r(Ga,"_cidrv6");function Wa(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...x(t)})}r(Wa,"_base64");function Ha(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...x(t)})}r(Ha,"_base64url");function Ka(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...x(t)})}r(Ka,"_e164");function Ya(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...x(t)})}r(Ya,"_jwt");function Xa(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...x(t)})}r(Xa,"_isoDateTime");function Qa(e,t){return new e({type:"string",format:"date",check:"string_format",...x(t)})}r(Qa,"_isoDate");function qa(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...x(t)})}r(qa,"_isoTime");function ei(e,t){return new e({type:"string",format:"duration",check:"string_format",...x(t)})}r(ei,"_isoDuration");function ti(e,t){return new e({type:"number",checks:[],...x(t)})}r(ti,"_number");function ni(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...x(t)})}r(ni,"_int");function si(e,t){return new e({type:"boolean",...x(t)})}r(si,"_boolean");function oi(e){return new e({type:"unknown"})}r(oi,"_unknown");function ri(e,t){return new e({type:"never",...x(t)})}r(ri,"_never");function Jn(e,t){return new En({check:"less_than",...x(t),value:e,inclusive:!1})}r(Jn,"_lt");function At(e,t){return new En({check:"less_than",...x(t),value:e,inclusive:!0})}r(At,"_lte");function Gn(e,t){return new zn({check:"greater_than",...x(t),value:e,inclusive:!1})}r(Gn,"_gt");function Tt(e,t){return new zn({check:"greater_than",...x(t),value:e,inclusive:!0})}r(Tt,"_gte");function Wn(e,t){return new wr({check:"multiple_of",...x(t),value:e})}r(Wn,"_multipleOf");function Hn(e,t){return new br({check:"max_length",...x(t),maximum:e})}r(Hn,"_maxLength");function st(e,t){return new _r({check:"min_length",...x(t),minimum:e})}r(st,"_minLength");function Kn(e,t){return new Sr({check:"length_equals",...x(t),length:e})}r(Kn,"_length");function ai(e,t){return new Ir({check:"string_format",format:"regex",...x(t),pattern:e})}r(ai,"_regex");function ii(e){return new xr({check:"string_format",format:"lowercase",...x(e)})}r(ii,"_lowercase");function ci(e){return new $r({check:"string_format",format:"uppercase",...x(e)})}r(ci,"_uppercase");function ui(e,t){return new Er({check:"string_format",format:"includes",...x(t),includes:e})}r(ui,"_includes");function li(e,t){return new zr({check:"string_format",format:"starts_with",...x(t),prefix:e})}r(li,"_startsWith");function di(e,t){return new Ar({check:"string_format",format:"ends_with",...x(t),suffix:e})}r(di,"_endsWith");function Te(e){return new Tr({check:"overwrite",tx:e})}r(Te,"_overwrite");function pi(e){return Te(t=>t.normalize(e))}r(pi,"_normalize");function fi(){return Te(e=>e.trim())}r(fi,"_trim");function hi(){return Te(e=>e.toLowerCase())}r(hi,"_toLowerCase");function mi(){return Te(e=>e.toUpperCase())}r(mi,"_toUpperCase");function gi(){return Te(e=>_o(e))}r(gi,"_slugify");function vi(e,t,n){return new e({type:"array",element:t,...x(n)})}r(vi,"_array");function yi(e,t,n){const s=x(n);return s.abort??(s.abort=!0),new e({type:"custom",check:"custom",fn:t,...s})}r(yi,"_custom");function wi(e,t,n){return new e({type:"custom",check:"custom",fn:t,...x(n)})}r(wi,"_refine");function ki(e,t){const n=bi(s=>(s.addIssue=o=>{if(typeof o=="string")s.issues.push(Me(o,s.value,n._zod.def));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=s.value),a.inst??(a.inst=n),a.continue??(a.continue=!n._zod.def.abort),s.issues.push(Me(a))}},e(s.value,s)),t);return n}r(ki,"_superRefine");function bi(e,t){const n=new se({check:"custom",...x(t)});return n._zod.check=e,n}r(bi,"_check");function Yn(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??De,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}r(Yn,"initializeContext");function K(e,t,n={path:[],schemaPath:[]}){var s;const o=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;const i={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,i);const u=e._zod.toJSONSchema?.();if(u)i.schema=u;else{const m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,i.schema,m);else{const _=i.schema,b=t.processors[o.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);b(e,t,_,m)}const k=e._zod.parent;k&&(i.ref||(i.ref=k),K(k,t,m),t.seen.get(k).isParent=!0)}const f=t.metadataRegistry.get(e);return f&&Object.assign(i.schema,f),t.io==="input"&&ee(e)&&(delete i.schema.examples,delete i.schema.default),t.io==="input"&&"_prefault"in i.schema&&((s=i.schema).default??(s.default=i.schema._prefault)),delete i.schema._prefault,t.seen.get(e).schema}r(K,"process");function Xn(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=new Map;for(const i of e.seen.entries()){const u=e.metadataRegistry.get(i[0])?.id;if(u){const f=s.get(u);if(f&&f!==i[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);s.set(u,i[0])}}const o=r(i=>{const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const k=e.external.registry.get(i[0])?.id,_=e.external.uri??(S=>S);if(k)return{ref:_(k)};const b=i[1].defId??i[1].schema.id??`schema${e.counter++}`;return i[1].defId=b,{defId:b,ref:`${_("__shared")}#/${u}/${b}`}}if(i[1]===n)return{ref:"#"};const f=`#/${u}/`,m=i[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:f+m}},"makeURI"),a=r(i=>{if(i[1].schema.$ref)return;const u=i[1],{ref:f,defId:m}=o(i);u.def={...u.schema},m&&(u.defId=m);const k=u.schema;for(const _ in k)delete k[_];k.$ref=f},"extractToDef");if(e.cycles==="throw")for(const i of e.seen.entries()){const u=i[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
63
63
 
64
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const u=i[1];if(t===i[0]){a(i);continue}if(e.external){const f=e.external.registry.get(i[0])?.id;if(t!==i[0]&&f){a(i);continue}}if(e.metadataRegistry.get(i[0])?.id){a(i);continue}if(u.cycle){a(i);continue}if(u.count>1&&e.reused==="ref"){a(i);continue}}}r(Xn,"extractDefs");function Qn(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=r(u=>{const f=e.seen.get(u);if(f.ref===null)return;const m=f.def??f.schema,k={...m},_=f.ref;if(f.ref=null,_){s(_);const S=e.seen.get(_),E=S.schema;if(E.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(E)):Object.assign(m,E),Object.assign(m,k),u._zod.parent===_)for(const D in m)D==="$ref"||D==="allOf"||D in k||delete m[D];if(E.$ref&&S.def)for(const D in m)D==="$ref"||D==="allOf"||D in S.def&&JSON.stringify(m[D])===JSON.stringify(S.def[D])&&delete m[D]}const b=u._zod.parent;if(b&&b!==_){s(b);const S=e.seen.get(b);if(S?.schema.$ref&&(m.$ref=S.schema.$ref,S.def))for(const E in m)E==="$ref"||E==="allOf"||E in S.def&&JSON.stringify(m[E])===JSON.stringify(S.def[E])&&delete m[E]}e.override({zodSchema:u,jsonSchema:m,path:f.path??[]})},"flattenRef");for(const u of[...e.seen.entries()].reverse())s(u[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}Object.assign(o,n.def??n.schema);const a=e.metadataRegistry.get(t)?.id;a!==void 0&&o.id===a&&delete o.id;const i=e.external?.defs??{};for(const u of e.seen.entries()){const f=u[1];f.def&&f.defId&&(f.def.id===f.defId&&delete f.def.id,i[f.defId]=f.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:ot(t,"input",e.processors),output:ot(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}r(Qn,"finalize");function ee(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const s=e._zod.def;if(s.type==="transform")return!0;if(s.type==="array")return ee(s.element,n);if(s.type==="set")return ee(s.valueType,n);if(s.type==="lazy")return ee(s.getter(),n);if(s.type==="promise"||s.type==="optional"||s.type==="nonoptional"||s.type==="nullable"||s.type==="readonly"||s.type==="default"||s.type==="prefault")return ee(s.innerType,n);if(s.type==="intersection")return ee(s.left,n)||ee(s.right,n);if(s.type==="record"||s.type==="map")return ee(s.keyType,n)||ee(s.valueType,n);if(s.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:ee(s.in,n)||ee(s.out,n);if(s.type==="object"){for(const o in s.shape)if(ee(s.shape[o],n))return!0;return!1}if(s.type==="union"){for(const o of s.options)if(ee(o,n))return!0;return!1}if(s.type==="tuple"){for(const o of s.items)if(ee(o,n))return!0;return!!(s.rest&&ee(s.rest,n))}return!1}r(ee,"isTransforming");const _i=r((e,t={})=>n=>{const s=Yn({...n,processors:t});return K(e,s),Xn(s,e),Qn(s,e)},"createToJSONSchemaMethod"),ot=r((e,t,n={})=>s=>{const{libraryOptions:o,target:a}=s??{},i=Yn({...o??{},target:a,io:t,processors:n});return K(e,i),Xn(i,e),Qn(i,e)},"createStandardJSONSchemaMethod"),Si={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ii=r((e,t,n,s)=>{const o=n;o.type="string";const{minimum:a,maximum:i,format:u,patterns:f,contentEncoding:m}=e._zod.bag;if(typeof a=="number"&&(o.minLength=a),typeof i=="number"&&(o.maxLength=i),u&&(o.format=Si[u]??u,o.format===""&&delete o.format,u==="time"&&delete o.format),m&&(o.contentEncoding=m),f&&f.size>0){const k=[...f];k.length===1?o.pattern=k[0].source:k.length>1&&(o.allOf=[...k.map(_=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:_.source}))])}},"stringProcessor"),xi=r((e,t,n,s)=>{const o=n,{minimum:a,maximum:i,format:u,multipleOf:f,exclusiveMaximum:m,exclusiveMinimum:k}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number";const _=typeof k=="number"&&k>=(a??Number.NEGATIVE_INFINITY),b=typeof m=="number"&&m<=(i??Number.POSITIVE_INFINITY),S=t.target==="draft-04"||t.target==="openapi-3.0";_?S?(o.minimum=k,o.exclusiveMinimum=!0):o.exclusiveMinimum=k:typeof a=="number"&&(o.minimum=a),b?S?(o.maximum=m,o.exclusiveMaximum=!0):o.exclusiveMaximum=m:typeof i=="number"&&(o.maximum=i),typeof f=="number"&&(o.multipleOf=f)},"numberProcessor"),$i=r((e,t,n,s)=>{n.type="boolean"},"booleanProcessor"),Ei=r((e,t,n,s)=>{n.not={}},"neverProcessor"),zi=r((e,t,n,s)=>{const o=e._zod.def,a=fn(o.entries);a.every(i=>typeof i=="number")&&(n.type="number"),a.every(i=>typeof i=="string")&&(n.type="string"),n.enum=a},"enumProcessor"),Ai=r((e,t,n,s)=>{const o=e._zod.def,a=[];for(const i of o.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(i))}else a.push(i);if(a.length!==0)if(a.length===1){const i=a[0];n.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[i]:n.const=i}else a.every(i=>typeof i=="number")&&(n.type="number"),a.every(i=>typeof i=="string")&&(n.type="string"),a.every(i=>typeof i=="boolean")&&(n.type="boolean"),a.every(i=>i===null)&&(n.type="null"),n.enum=a},"literalProcessor"),Ti=r((e,t,n,s)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),Oi=r((e,t,n,s)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),Pi=r((e,t,n,s)=>{const o=n,a=e._zod.def,{minimum:i,maximum:u}=e._zod.bag;typeof i=="number"&&(o.minItems=i),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=K(a.element,t,{...s,path:[...s.path,"items"]})},"arrayProcessor"),Ri=r((e,t,n,s)=>{const o=n,a=e._zod.def;o.type="object",o.properties={};const i=a.shape;for(const m in i)o.properties[m]=K(i[m],t,{...s,path:[...s.path,"properties",m]});const u=new Set(Object.keys(i)),f=new Set([...u].filter(m=>{const k=a.shape[m]._zod;return t.io==="input"?k.optin===void 0:k.optout===void 0}));f.size>0&&(o.required=Array.from(f)),a.catchall?._zod.def.type==="never"?o.additionalProperties=!1:a.catchall?a.catchall&&(o.additionalProperties=K(a.catchall,t,{...s,path:[...s.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},"objectProcessor"),Zi=r((e,t,n,s)=>{const o=e._zod.def,a=o.inclusive===!1,i=o.options.map((u,f)=>K(u,t,{...s,path:[...s.path,a?"oneOf":"anyOf",f]}));a?n.oneOf=i:n.anyOf=i},"unionProcessor"),Ni=r((e,t,n,s)=>{const o=e._zod.def,a=K(o.left,t,{...s,path:[...s.path,"allOf",0]}),i=K(o.right,t,{...s,path:[...s.path,"allOf",1]}),u=r(f=>"allOf"in f&&Object.keys(f).length===1,"isSimpleIntersection");n.allOf=[...u(a)?a.allOf:[a],...u(i)?i.allOf:[i]]},"intersectionProcessor"),ji=r((e,t,n,s)=>{const o=n,a=e._zod.def;o.type="object";const i=a.keyType,u=i._zod.bag?.patterns;if(a.mode==="loose"&&u&&u.size>0){const m=K(a.valueType,t,{...s,path:[...s.path,"patternProperties","*"]});o.patternProperties={};for(const k of u)o.patternProperties[k.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=K(a.keyType,t,{...s,path:[...s.path,"propertyNames"]})),o.additionalProperties=K(a.valueType,t,{...s,path:[...s.path,"additionalProperties"]});const f=i._zod.values;if(f){const m=[...f].filter(k=>typeof k=="string"||typeof k=="number");m.length>0&&(o.required=m)}},"recordProcessor"),Mi=r((e,t,n,s)=>{const o=e._zod.def,a=K(o.innerType,t,s),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=o.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},"nullableProcessor"),Di=r((e,t,n,s)=>{const o=e._zod.def;K(o.innerType,t,s);const a=t.seen.get(e);a.ref=o.innerType},"nonoptionalProcessor"),Ci=r((e,t,n,s)=>{const o=e._zod.def;K(o.innerType,t,s);const a=t.seen.get(e);a.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},"defaultProcessor"),Ui=r((e,t,n,s)=>{const o=e._zod.def;K(o.innerType,t,s);const a=t.seen.get(e);a.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},"prefaultProcessor"),Li=r((e,t,n,s)=>{const o=e._zod.def;K(o.innerType,t,s);const a=t.seen.get(e);a.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},"catchProcessor"),Fi=r((e,t,n,s)=>{const o=e._zod.def,a=o.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?a?o.out:o.in:o.out;K(i,t,s);const u=t.seen.get(e);u.ref=i},"pipeProcessor"),Vi=r((e,t,n,s)=>{const o=e._zod.def;K(o.innerType,t,s);const a=t.seen.get(e);a.ref=o.innerType,n.readOnly=!0},"readonlyProcessor"),qn=r((e,t,n,s)=>{const o=e._zod.def;K(o.innerType,t,s);const a=t.seen.get(e);a.ref=o.innerType},"optionalProcessor"),Bi=r((e,t,n,s)=>{const o=e._zod.innerType;K(o,t,s);const a=t.seen.get(e);a.ref=o},"lazyProcessor"),Ji=y("ZodISODateTime",(e,t)=>{Br.init(e,t),G.init(e,t)});function Gi(e){return Xa(Ji,e)}r(Gi,"datetime");const Wi=y("ZodISODate",(e,t)=>{Jr.init(e,t),G.init(e,t)});function Hi(e){return Qa(Wi,e)}r(Hi,"date");const Ki=y("ZodISOTime",(e,t)=>{Gr.init(e,t),G.init(e,t)});function Yi(e){return qa(Ki,e)}r(Yi,"time");const Xi=y("ZodISODuration",(e,t)=>{Wr.init(e,t),G.init(e,t)});function Qi(e){return ei(Xi,e)}r(Qi,"duration");const re=y("ZodError",r((e,t)=>{wn.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r(n=>jo(e,n),"value")},flatten:{value:r(n=>No(e,n),"value")},addIssue:{value:r(n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,bt,2)},"value")},addIssues:{value:r(n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,bt,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),{Parent:Error}),qi=xt(re),ec=$t(re),tc=Qe(re),nc=qe(re),sc=Co(re),oc=Uo(re),rc=Lo(re),ac=Fo(re),ic=Vo(re),cc=Bo(re),uc=Jo(re),lc=Go(re),es=new WeakMap;function Ce(e,t,n){const s=Object.getPrototypeOf(e);let o=es.get(s);if(o||(o=new Set,es.set(s,o)),!o.has(t)){o.add(t);for(const a in n){const i=n[a];Object.defineProperty(s,a,{configurable:!0,enumerable:!1,get(){const u=i.bind(this);return Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}}r(Ce,"_installLazyMethods");const J=y("ZodType",(e,t)=>(V.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ot(e,"input"),output:ot(e,"output")}}),e.toJSONSchema=_i(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,s)=>qi(e,n,s,{callee:e.parse}),e.safeParse=(n,s)=>tc(e,n,s),e.parseAsync=async(n,s)=>ec(e,n,s,{callee:e.parseAsync}),e.safeParseAsync=async(n,s)=>nc(e,n,s),e.spa=e.safeParseAsync,e.encode=(n,s)=>sc(e,n,s),e.decode=(n,s)=>oc(e,n,s),e.encodeAsync=async(n,s)=>rc(e,n,s),e.decodeAsync=async(n,s)=>ac(e,n,s),e.safeEncode=(n,s)=>ic(e,n,s),e.safeDecode=(n,s)=>cc(e,n,s),e.safeEncodeAsync=async(n,s)=>uc(e,n,s),e.safeDecodeAsync=async(n,s)=>lc(e,n,s),Ce(e,"ZodType",{check(...n){const s=this.def;return this.clone(ve(s,{checks:[...s.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,s){return ye(this,n,s)},brand(){return this},register(n,s){return n.add(this,s),this},refine(n,s){return this.check(ou(n,s))},superRefine(n,s){return this.check(ru(n,s))},overwrite(n){return this.check(Te(n))},optional(){return us(this)},exactOptional(){return Vc(this)},nullable(){return ls(this)},nullish(){return us(ls(this))},nonoptional(n){return Kc(this,n)},array(){return T(this)},or(n){return W([this,n])},and(n){return Mc(this,n)},transform(n){return ps(this,Lc(n))},default(n){return Gc(this,n)},prefault(n){return Hc(this,n)},catch(n){return Xc(this,n)},pipe(n){return ps(this,n)},readonly(){return eu(this)},describe(n){const s=this.clone();return De.add(s,{description:n}),s},meta(...n){if(n.length===0)return De.get(this);const s=this.clone();return De.add(s,n[0]),s},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return De.get(e)?.description},configurable:!0}),e)),ts=y("_ZodString",(e,t)=>{Et.init(e,t),J.init(e,t),e._zod.processJSONSchema=(s,o,a)=>Ii(e,s,o,a);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Ce(e,"_ZodString",{regex(...s){return this.check(ai(...s))},includes(...s){return this.check(ui(...s))},startsWith(...s){return this.check(li(...s))},endsWith(...s){return this.check(di(...s))},min(...s){return this.check(st(...s))},max(...s){return this.check(Hn(...s))},length(...s){return this.check(Kn(...s))},nonempty(...s){return this.check(st(1,...s))},lowercase(s){return this.check(ii(s))},uppercase(s){return this.check(ci(s))},trim(){return this.check(fi())},normalize(...s){return this.check(pi(...s))},toLowerCase(){return this.check(hi())},toUpperCase(){return this.check(mi())},slugify(){return this.check(gi())}})}),dc=y("ZodString",(e,t)=>{Et.init(e,t),ts.init(e,t),e.email=n=>e.check(Ta(pc,n)),e.url=n=>e.check(Na(fc,n)),e.jwt=n=>e.check(Ya(zc,n)),e.emoji=n=>e.check(ja(hc,n)),e.guid=n=>e.check(Bn(ns,n)),e.uuid=n=>e.check(Oa(rt,n)),e.uuidv4=n=>e.check(Pa(rt,n)),e.uuidv6=n=>e.check(Ra(rt,n)),e.uuidv7=n=>e.check(Za(rt,n)),e.nanoid=n=>e.check(Ma(mc,n)),e.guid=n=>e.check(Bn(ns,n)),e.cuid=n=>e.check(Da(gc,n)),e.cuid2=n=>e.check(Ca(vc,n)),e.ulid=n=>e.check(Ua(yc,n)),e.base64=n=>e.check(Wa(xc,n)),e.base64url=n=>e.check(Ha($c,n)),e.xid=n=>e.check(La(wc,n)),e.ksuid=n=>e.check(Fa(kc,n)),e.ipv4=n=>e.check(Va(bc,n)),e.ipv6=n=>e.check(Ba(_c,n)),e.cidrv4=n=>e.check(Ja(Sc,n)),e.cidrv6=n=>e.check(Ga(Ic,n)),e.e164=n=>e.check(Ka(Ec,n)),e.datetime=n=>e.check(Gi(n)),e.date=n=>e.check(Hi(n)),e.time=n=>e.check(Yi(n)),e.duration=n=>e.check(Qi(n))});function p(e){return Aa(dc,e)}r(p,"string");const G=y("ZodStringFormat",(e,t)=>{B.init(e,t),ts.init(e,t)}),pc=y("ZodEmail",(e,t)=>{Nr.init(e,t),G.init(e,t)}),ns=y("ZodGUID",(e,t)=>{Rr.init(e,t),G.init(e,t)}),rt=y("ZodUUID",(e,t)=>{Zr.init(e,t),G.init(e,t)}),fc=y("ZodURL",(e,t)=>{jr.init(e,t),G.init(e,t)}),hc=y("ZodEmoji",(e,t)=>{Mr.init(e,t),G.init(e,t)}),mc=y("ZodNanoID",(e,t)=>{Dr.init(e,t),G.init(e,t)}),gc=y("ZodCUID",(e,t)=>{Cr.init(e,t),G.init(e,t)}),vc=y("ZodCUID2",(e,t)=>{Ur.init(e,t),G.init(e,t)}),yc=y("ZodULID",(e,t)=>{Lr.init(e,t),G.init(e,t)}),wc=y("ZodXID",(e,t)=>{Fr.init(e,t),G.init(e,t)}),kc=y("ZodKSUID",(e,t)=>{Vr.init(e,t),G.init(e,t)}),bc=y("ZodIPv4",(e,t)=>{Hr.init(e,t),G.init(e,t)}),_c=y("ZodIPv6",(e,t)=>{Kr.init(e,t),G.init(e,t)}),Sc=y("ZodCIDRv4",(e,t)=>{Yr.init(e,t),G.init(e,t)}),Ic=y("ZodCIDRv6",(e,t)=>{Xr.init(e,t),G.init(e,t)}),xc=y("ZodBase64",(e,t)=>{Qr.init(e,t),G.init(e,t)}),$c=y("ZodBase64URL",(e,t)=>{ea.init(e,t),G.init(e,t)}),Ec=y("ZodE164",(e,t)=>{ta.init(e,t),G.init(e,t)}),zc=y("ZodJWT",(e,t)=>{sa.init(e,t),G.init(e,t)}),ss=y("ZodNumber",(e,t)=>{Tn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(s,o,a)=>xi(e,s,o,a),Ce(e,"ZodNumber",{gt(s,o){return this.check(Gn(s,o))},gte(s,o){return this.check(Tt(s,o))},min(s,o){return this.check(Tt(s,o))},lt(s,o){return this.check(Jn(s,o))},lte(s,o){return this.check(At(s,o))},max(s,o){return this.check(At(s,o))},int(s){return this.check(os(s))},safe(s){return this.check(os(s))},positive(s){return this.check(Gn(0,s))},nonnegative(s){return this.check(Tt(0,s))},negative(s){return this.check(Jn(0,s))},nonpositive(s){return this.check(At(0,s))},multipleOf(s,o){return this.check(Wn(s,o))},step(s,o){return this.check(Wn(s,o))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function R(e){return ti(ss,e)}r(R,"number");const Ac=y("ZodNumberFormat",(e,t)=>{oa.init(e,t),ss.init(e,t)});function os(e){return ni(Ac,e)}r(os,"int");const Tc=y("ZodBoolean",(e,t)=>{ra.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>$i(e,n,s,o)});function U(e){return si(Tc,e)}r(U,"boolean");const Oc=y("ZodUnknown",(e,t)=>{aa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>{}});function X(){return oi(Oc)}r(X,"unknown");const Pc=y("ZodNever",(e,t)=>{ia.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Ei(e,n,s,o)});function Rc(e){return ri(Pc,e)}r(Rc,"never");const Zc=y("ZodArray",(e,t)=>{ca.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Pi(e,n,s,o),e.element=t.element,Ce(e,"ZodArray",{min(n,s){return this.check(st(n,s))},nonempty(n){return this.check(st(1,n))},max(n,s){return this.check(Hn(n,s))},length(n,s){return this.check(Kn(n,s))},unwrap(){return this.element}})});function T(e,t){return vi(Zc,e,t)}r(T,"array");const rs=y("ZodObject",(e,t)=>{la.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Ri(e,n,s,o),N(e,"shape",()=>t.shape),Ce(e,"ZodObject",{keyof(){return Dc(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:X()})},loose(){return this.clone({...this._zod.def,catchall:X()})},strict(){return this.clone({...this._zod.def,catchall:Rc()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Ao(this,n)},safeExtend(n){return To(this,n)},merge(n){return Oo(this,n)},pick(n){return Eo(this,n)},omit(n){return zo(this,n)},partial(...n){return Po(cs,this,n[0])},required(...n){return Ro(ds,this,n[0])}})});function d(e,t){const n={type:"object",shape:e??{},...x(t)};return new rs(n)}r(d,"object");function at(e,t){return new rs({type:"object",shape:e,catchall:X(),...x(t)})}r(at,"looseObject");const as=y("ZodUnion",(e,t)=>{Nn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Zi(e,n,s,o),e.options=t.options});function W(e,t){return new as({type:"union",options:e,...x(t)})}r(W,"union");const Nc=y("ZodDiscriminatedUnion",(e,t)=>{as.init(e,t),da.init(e,t)});function he(e,t,n){return new Nc({type:"union",options:t,discriminator:e,...x(n)})}r(he,"discriminatedUnion");const jc=y("ZodIntersection",(e,t)=>{pa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Ni(e,n,s,o)});function Mc(e,t){return new jc({type:"intersection",left:e,right:t})}r(Mc,"intersection");const is=y("ZodRecord",(e,t)=>{fa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>ji(e,n,s,o),e.keyType=t.keyType,e.valueType=t.valueType});function it(e,t,n){return!t||!t._zod?new is({type:"record",keyType:p(),valueType:e,...x(t)}):new is({type:"record",keyType:e,valueType:t,...x(n)})}r(it,"record");const Ot=y("ZodEnum",(e,t)=>{ha.init(e,t),J.init(e,t),e._zod.processJSONSchema=(s,o,a)=>zi(e,s,o,a),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(s,o)=>{const a={};for(const i of s)if(n.has(i))a[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Ot({...t,checks:[],...x(o),entries:a})},e.exclude=(s,o)=>{const a={...t.entries};for(const i of s)if(n.has(i))delete a[i];else throw new Error(`Key ${i} not found in enum`);return new Ot({...t,checks:[],...x(o),entries:a})}});function Dc(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(s=>[s,s])):e;return new Ot({type:"enum",entries:n,...x(t)})}r(Dc,"_enum");const Cc=y("ZodLiteral",(e,t)=>{ma.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Ai(e,n,s,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function g(e,t){return new Cc({type:"literal",values:Array.isArray(e)?e:[e],...x(t)})}r(g,"literal");const Uc=y("ZodTransform",(e,t)=>{ga.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Oi(e,n,s,o),e._zod.parse=(n,s)=>{if(s.direction==="backward")throw new pn(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(Me(a,n.value,t));else{const i=a;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),n.issues.push(Me(i))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(a=>(n.value=a,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});function Lc(e){return new Uc({type:"transform",transform:e})}r(Lc,"transform");const cs=y("ZodOptional",(e,t)=>{Dn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>qn(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function us(e){return new cs({type:"optional",innerType:e})}r(us,"optional");const Fc=y("ZodExactOptional",(e,t)=>{va.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>qn(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function Vc(e){return new Fc({type:"optional",innerType:e})}r(Vc,"exactOptional");const Bc=y("ZodNullable",(e,t)=>{ya.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Mi(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function ls(e){return new Bc({type:"nullable",innerType:e})}r(ls,"nullable");const Jc=y("ZodDefault",(e,t)=>{wa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Ci(e,n,s,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Gc(e,t){return new Jc({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():vn(t)}})}r(Gc,"_default");const Wc=y("ZodPrefault",(e,t)=>{ka.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Ui(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function Hc(e,t){return new Wc({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():vn(t)}})}r(Hc,"prefault");const ds=y("ZodNonOptional",(e,t)=>{ba.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Di(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function Kc(e,t){return new ds({type:"nonoptional",innerType:e,...x(t)})}r(Kc,"nonoptional");const Yc=y("ZodCatch",(e,t)=>{_a.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Li(e,n,s,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Xc(e,t){return new Yc({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}r(Xc,"_catch");const Qc=y("ZodPipe",(e,t)=>{Sa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Fi(e,n,s,o),e.in=t.in,e.out=t.out});function ps(e,t){return new Qc({type:"pipe",in:e,out:t})}r(ps,"pipe");const qc=y("ZodReadonly",(e,t)=>{Ia.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Vi(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function eu(e){return new qc({type:"readonly",innerType:e})}r(eu,"readonly");const tu=y("ZodLazy",(e,t)=>{xa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Bi(e,n,s,o),e.unwrap=()=>e._zod.def.getter()});function nu(e){return new tu({type:"lazy",getter:e})}r(nu,"lazy");const fs=y("ZodCustom",(e,t)=>{$a.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Ti(e,n,s,o)});function su(e,t){return yi(fs,e??(()=>!0),t)}r(su,"custom");function ou(e,t={}){return wi(fs,e,t)}r(ou,"refine");function ru(e,t){return ki(e,t)}r(ru,"superRefine");const Ue=p(),Pt=he("code",[d({code:g("bad-request"),message:p(),details:d({issues:T(su())})}),d({code:g("cancelled"),message:p(),details:d({})}),d({code:g("session-not-found"),message:p(),details:d({sessionId:p()})}),d({code:g("model-unavailable"),message:p(),details:d({provider:p(),model:p()})}),d({code:g("session-conflict"),message:p(),details:d({sessionId:p(),requestedCwd:p(),existingCwd:p().optional()})}),d({code:g("invalid-time-zone"),message:p(),details:d({value:p()})}),d({code:g("workspace-attach-failed"),message:p(),details:d({sessionId:p(),workspaceId:p()})}),d({code:g("workspace-not-found"),message:p(),details:d({workspaceId:p()})}),d({code:g("workspace-invalid-path"),message:p(),details:d({path:p()})}),d({code:g("workspace-name-conflict"),message:p(),details:d({name:p()})}),d({code:g("workspace-move-invalid"),message:p(),details:d({workspaceId:p(),sessionId:p(),beforeSessionId:p().optional()})}),d({code:g("directory-unreadable"),message:p(),details:d({path:p()})}),d({code:g("directory-exists"),message:p(),details:d({path:p()})}),d({code:g("directory-create-failed"),message:p(),details:d({path:p()})}),d({code:g("directory-picker-unavailable"),message:p(),details:d({capability:p()})}),d({code:g("agent-preset-read-only"),message:p(),details:d({agentPreset:p(),reason:p()})}),d({code:g("agent-preset-locked"),message:p(),details:d({sessionId:p(),agentPreset:p()})}),d({code:g("agent-preset-conflict"),message:p(),details:d({sessionId:p(),requestedPreset:p(),existingPreset:p().optional()})}),d({code:g("agent-preset-not-found"),message:p(),details:d({agentPreset:p(),available:T(p())})}),d({code:g("agent-preset-invalid"),message:p(),details:d({agentPreset:p(),reason:p()})}),d({code:g("agent-busy"),message:p(),details:d({reason:p()})}),d({code:g("attachment-error"),message:p(),details:d({reason:p()})}),d({code:g("queue-item-not-found"),message:p(),details:d({itemId:p()})}),d({code:g("steer-unavailable"),message:p(),details:d({itemId:p()})}),d({code:g("command-error"),message:p(),details:d({})}),d({code:g("unknown-command"),message:p(),details:d({})}),d({code:g("settings-rejected"),message:p(),details:d({ns:p()})}),d({code:g("settings-not-exposed"),message:p(),details:d({ns:p()})}),d({code:g("settings-conflict"),message:p(),details:d({ns:p(),expected:R(),actual:R()})}),d({code:g("credential-rejected"),message:p(),details:d({ref:p()})}),d({code:g("model-discovery-failed"),message:p(),details:d({settingsNs:p(),baseURL:p().optional()})}),d({code:g("title-invalid"),message:p(),details:d({sessionId:p()})}),d({code:g("fork-unavailable"),message:p(),details:d({sessionId:p()})}),d({code:g("subagent-parent-unavailable"),message:p(),details:d({parentSessionId:p()})}),d({code:g("subagent-not-found"),message:p(),details:d({parentSessionId:p(),childSessionId:p()})}),d({code:g("subagent-catalog-diagnostic"),message:p(),details:d({parentSessionId:p(),childSessionId:p(),reason:W([g("corrupt"),g("unsupported"),g("unavailable")])})}),d({code:g("subagent-not-resumable"),message:p(),details:d({childSessionId:p()})}),d({code:g("subagent-unauthorized"),message:p(),details:d({childSessionId:p()})}),d({code:g("subagent-delivery-unavailable"),message:p(),details:d({childSessionId:p()})}),d({code:g("internal"),message:p(),details:d({})})]);function hs(e){return W([d({ok:g(!0),value:e}),d({ok:g(!1),error:Pt})])}r(hs,"rpcResultSchema");const au=d({type:g("client-request"),rpcId:Ue,method:p(),payload:X()}),Rt=d({type:g("server-response"),rpcId:Ue,result:hs(X().optional())}),Zt=d({type:g("server-request"),rpcId:Ue,method:p(),payload:X()});he("type",[au,Rt,Zt,d({type:g("client-response"),rpcId:Ue,result:hs(X().optional())})]);const iu=W([d({accepted:g(!0)}),d({accepted:g(!1),reason:W([g("not-pending"),g("bad-response")])})]);function cu(e,t){let n=0,s=0;for(const o of e){if(n===t)return e.slice(0,s);n++,s+=o.length}return e}r(cu,"truncateUnicodeCodePoints");const A=p().min(1),ms=p().min(1),de=p().min(1),gs=d({type:p(),seq:R().int().nonnegative(),time:R(),data:X(),sourceEventSeqs:T(R()).optional(),surfaceOp:X().optional(),ignorable:g(!0).optional()}),uu=d({sessionId:A,updatedAt:R(),running:U(),blank:U(),parentSessionId:A.optional(),origin:g("subagent").optional(),cwd:p().optional(),agentPreset:p().optional(),projections:nu(()=>Nt).optional()});d({cursor:p().optional()});const lu=d({items:T(uu)});d({query:p().trim().min(1).max(500).refine(e=>!e.includes("\0"),{message:"search query must not contain NUL"})});const du=d({items:T(d({sessionId:A,snippet:p().refine(e=>cu(e,240)===e,{message:"search snippet must contain at most 240 Unicode code points"})})).max(20),hasMore:U()});d({workspaceId:de.optional(),cwd:p().optional(),sessionId:A.optional(),agentPreset:p().optional()}).refine(e=>e.workspaceId===void 0||e.cwd===void 0,{message:"session.create accepts workspaceId or cwd, not both"});const pu=d({sessionId:A,agentPreset:p().optional()});d({sessionId:A,title:p()});const fu=d({title:p().min(1),seq:R().int().nonnegative()});d({sessionId:A,atSeq:R().int().nonnegative().optional()});const hu=d({sessionId:A});d({sessionId:A,beforeSeq:R().int().nonnegative().optional(),maxMessages:R().int().positive().optional()});const vs=d({provider:p().min(1),model:p().min(1),reasoningEffort:p().min(1).optional()}),mu=d({efforts:T(d({id:p().min(1),name:p().min(1),description:p().optional()})).min(1),defaultEffort:p().min(1).optional()}),gu=d({id:p().min(1),name:p().min(1),description:p().optional(),reasoning:mu.optional()}),ys=d({id:p().min(1),name:p().min(1),models:T(gu)}),ws=d({id:p().min(1),name:p().min(1),message:p()}),ks=he("for",[d({for:g("call"),view:at({card:p()})}),d({for:g("result"),view:at({card:p()})})]),bs=d({event:gs,view:ks.optional()}),Nt=d({asOfSeq:R().int().min(-1),values:it(p(),X())});d({blank:U(),lastPromptAt:R().nullable()}),d({maxImageBytes:R().int().positive(),maxImagesPerMessage:R().int().positive(),maxMessageImageBytes:R().int().positive(),maxImagePixels:R().int().positive(),mediaTypes:T(p())});const vu=d({events:T(bs),hasMore:U(),projections:Nt.optional()});d({sessionId:A});const yu=d({current:vs,routable:U(),groups:T(ys),failures:T(ws)});d({sessionId:A,provider:p().min(1),model:p().min(1),reasoningEffort:p().min(1).optional()});const wu=d({selected:vs}),jt=at({type:p()}),_s=W([g("image/png"),g("image/jpeg"),g("image/webp"),g("image/gif")]),ku=he("type",[d({type:g("text"),text:p()}),d({type:g("image"),mediaType:_s,data:p(),name:p().optional()})]);d({sessionId:A,mode:W([g("queue"),g("steer")]),content:T(ku),clientTimeZone:p().optional()});const bu=d({accepted:g(!0),command:d({kind:g("success"),text:p().optional()}).optional()}),Ss=p().min(1),_u=d({attachmentId:Ss,mediaType:_s,bytes:R().int().positive(),width:R().int().positive(),height:R().int().positive(),name:p().optional()});d({sessionId:A,attachmentId:Ss});const Su=d({attachment:_u,data:p()});d({sessionId:A,itemId:ms,action:he("kind",[d({kind:g("edit"),content:T(jt)}),d({kind:g("remove")}),d({kind:g("steer")})])});const Iu=d({accepted:g(!0)});d({sessionId:A});const xu=d({accepted:g(!0)}),Mt=p().min(1);d({sessionId:A,approvalId:Mt,outcome:W([g("allowed-once"),g("rejected")])});const $u=d({id:p().min(1),kind:p().min(1),label:p().min(1),status:W([g("running"),g("stopping"),g("completed"),g("killed"),g("failed")]),detail:p().optional(),startedAt:R().int().nonnegative(),finishedAt:R().int().nonnegative().optional()}),Le=d({workspaceId:de,path:p(),title:p(),sessionIds:T(A),createdAt:p(),updatedAt:p()});d({});const Eu=d({items:T(Le),archivedSessionIds:T(A)});d({path:p()});const zu=d({workspace:Le,created:U()});d({workspaceId:de,title:p()}).refine(e=>e.title.trim()!=="",{message:"workspace.rename requires a non-blank title"});const Au=d({workspace:Le});d({workspaceId:de});const Tu=d({deleted:g(!0)});d({workspaceId:de,beforeWorkspaceId:de.optional()});const Ou=d({workspaceIds:T(de)});d({workspaceId:de,sessionId:A,beforeSessionId:A.optional()});const Pu=d({workspace:Le});d({sessionId:A});const Ru=d({archivedSessionIds:T(A)}),Zu=d({id:p(),question:p(),header:p().optional(),detail:p().optional(),options:T(d({label:p(),description:p().optional()})).optional(),multiSelect:U().optional(),intent:he("kind",[d({kind:g("plan-review"),approve:p()})]).optional()}),Nu=d({id:p().min(1),role:W([g("system"),g("user"),g("assistant")]),content:T(jt),source:at({kind:p()})}),Is=he("type",[d({type:g("session/event"),sessionId:A,event:gs,view:ks.optional()}),d({type:g("session/subscribed"),sessionId:A,lastSeq:R().int()}),d({type:g("approval/requested"),sessionId:A,approvalId:Mt,toolName:p(),callId:p().optional(),reason:p().optional()}),d({type:g("approval/resolved"),sessionId:A,approvalId:Mt,outcome:W([g("allowed-once"),g("rejected"),g("cancelled"),g("unavailable")])}),d({type:g("question/requested"),sessionId:A,questions:T(Zu).min(1)}),d({type:g("question/resolved"),sessionId:A,questionRpcId:Ue,outcome:W([g("answered"),g("cancelled")])}),d({type:g("session/queue"),sessionId:A,items:T(d({id:ms,placement:W([g("queued"),g("steering"),g("context")]),message:Nu}))}),d({type:g("session/jobs"),sessionId:A,jobs:T($u)}),d({type:g("session/projection"),sessionId:A,key:p().min(1),value:X(),seq:R().int().nonnegative()}),d({type:g("stream/error"),error:Pt})]),xs=he("type",[d({type:g("host/session-added"),sessionId:A,blank:U(),parentSessionId:A.optional(),origin:g("subagent").optional(),cwd:p().optional(),agentPreset:p().optional()}),d({type:g("host/session-removed"),sessionId:A}),d({type:g("host/session-status"),sessionId:A,running:U()}),d({type:g("host/agent-error"),sessionId:A,message:p()}),d({type:g("host/workspace-changed"),workspace:Le}),d({type:g("host/workspace-removed"),workspaceId:de}),d({type:g("host/workspace-order-changed"),workspaceIds:T(de)}),d({type:g("host/archived-sessions-changed"),archivedSessionIds:T(A)}),d({type:g("host/remote-event"),event:p().min(1),args:T(X())}),d({type:g("stream/error"),error:Pt})]);d({});const ju=d({version:p(),cwd:p(),provider:p().optional(),model:p().optional(),attachedSessions:R().int().nonnegative(),canOpenPath:U()});d({});const Mu=d({path:p().nullable()}),$s=d({name:p(),path:p(),hidden:U()});d({path:p().optional()});const Du=d({path:p(),home:p(),crumbs:T($s),entries:T($s),truncated:U()});d({path:p(),name:p()}).refine(e=>e.name.trim()!==""&&e.name!=="."&&e.name!==".."&&!/[/\\]/.test(e.name),{message:"host.createDirectory requires a single non-blank path segment name"});const Cu=d({path:p()});d({path:p().min(1)});const Uu=d({opened:g(!0)}),Lu=d({name:p().min(1),description:p(),whenToUse:p().optional(),modelInvocable:U()});d({sessionId:A});const Fu=d({skills:T(Lu)}),Vu=d({id:p().min(1),trust:W([g("system"),g("user")]),isDefault:U(),name:p().optional(),description:p().optional(),broken:p().min(1).optional()});d({});const Bu=d({presets:T(Vu),authorable:U(),hasDocument:U()});d({sessionId:A,agentPreset:p().min(1)});const Ju=d({agentPreset:p()});d({agentPreset:p().min(1)});const Gu=d({agentPreset:p(),trust:W([g("system"),g("user")]),content:p(),name:p().optional(),description:p().optional()});d({from:p().min(1),agentPreset:p().min(1),name:p().optional()});const Wu=d({agentPreset:p()});d({agentPreset:p().min(1)});const Hu=W([d({opened:g(!0)}),d({opened:g(!1),path:p()})]);d({agentPreset:p().min(1)});const Ku=d({}),Oe=d({id:p(),revision:R().int().positive()}),Fe=d({ref:Oe});d({sessionId:p(),objective:p().min(1),maxGoalRounds:R().int().positive().optional()});const Yu=Fe;d({sessionId:p(),ref:Oe,objective:p().min(1).optional(),maxGoalRounds:R().int().positive().optional()}).refine(e=>e.objective!==void 0||e.maxGoalRounds!==void 0,{message:"goal.edit requires objective or maxGoalRounds"});const Xu=Fe;d({sessionId:p(),ref:Oe});const Qu=Fe;d({sessionId:p(),ref:Oe});const qu=Fe;d({sessionId:p(),ref:Oe});const el=Fe;d({sessionId:p(),ref:Oe});const tl=d({cleared:g(!0)}),nl=d({path:T(p()),set:U()}),ct=d({ns:p().min(1),schema:X(),value:X(),base:X().optional(),user:X().optional(),applies:W([g("live"),g("restart")]),secrets:T(nl),revision:R()});d({});const sl=d({writable:U(),hasDocument:U(),namespaces:T(ct)});d({});const ol=d({opened:g(!0)});d({ns:p().min(1),patch:it(p(),X()),expectedRevision:R().optional()});const rl=ct;d({ns:p().min(1),section:it(p(),X()),expectedRevision:R().optional()});const al=he("op",[d({op:g("set"),path:T(p()),value:X()}),d({op:g("unset"),path:T(p())})]);d({ns:p().min(1),ops:T(al),expectedRevision:R().optional()});const il=ct,cl=ct,Dt=p().regex(/^[A-Za-z_][A-Za-z0-9_]*$/),ul=d({configured:U(),source:p().optional(),writable:U()});d({refs:T(Dt).max(64)});const ll=d({credentials:it(p(),ul)});d({ref:Dt,value:p().min(1)});const dl=d({});d({ref:Dt});const pl=d({}),fl=d({provider:p().min(1),displayName:p().min(1),settingsNs:p(),settingsPath:T(p()),active:U(),declared:U().optional()});d({});const hl=d({providers:T(fl)});d({});const ml=d({groups:T(ys),failures:T(ws)}),gl=d({id:p().min(1),name:p().min(1).optional(),contextWindow:R().int().positive().optional(),maxTokens:R().int().positive().optional()});d({settingsNs:p().min(1),provider:p().min(1).optional(),baseURL:p().min(1).optional(),api:p().min(1).optional(),apiKey:p().min(1).optional()});const vl=d({models:T(gl)}),yl=W([d({kind:g("child"),id:A,mode:g("one-shot"),activity:W([g("running"),g("inactive")]),hasChildren:U(),label:p().optional()}),d({kind:g("child"),id:A,mode:g("continuable"),activity:W([g("running"),g("inactive")]),hasChildren:U(),label:p()}),d({kind:g("diagnostic"),id:A,reason:W([g("corrupt"),g("unsupported"),g("unavailable")])})]);d({parentSessionId:A});const wl=d({entries:T(yl),parentAvailable:U()});d({parentSessionId:A,childSessionId:A,mode:W([g("one-shot"),g("continuable")]),beforeSeq:R().int().nonnegative().optional(),maxMessages:R().int().positive().optional()});const kl=d({events:T(bs),hasMore:U(),projections:Nt.optional()});d({parentSessionId:A,childSessionId:A,mode:g("continuable"),content:T(jt),clientTimeZone:p().optional()}),d({parentSessionId:A,childSessionId:A,mode:g("continuable")});const bl=d({accepted:g(!0)}),_l={"session.list":lu,"session.search":du,"session.create":pu,"session.history":vu,"session.models":yu,"session.selectModel":wu,"session.rename":fu,"session.fork":hu,"session.prompt":bu,"session.attachment":Su,"session.updateQueue":Iu,"session.cancel":xu,"subagent.list":wl,"subagent.history":kl,"subagent.prompt":d({messageId:p()}),"subagent.interrupt":bl,"host.describe":ju,"host.pickDirectory":Mu,"host.listDirectory":Du,"host.createDirectory":Cu,"host.openPath":Uu,"workspace.list":Eu,"workspace.create":zu,"workspace.rename":Au,"workspace.delete":Tu,"workspace.insertBefore":Ou,"workspace.insertSessionBefore":Pu,"workspace.archiveSession":Ru,"skill.list":Fu,"agentPreset.list":Bu,"agentPreset.select":Ju,"agentPreset.read":Gu,"agentPreset.copy":Wu,"agentPreset.openDocument":Hu,"agentPreset.remove":Ku,"goal.create":Yu,"goal.edit":Xu,"goal.pause":Qu,"goal.resume":qu,"goal.complete":el,"goal.clear":tl,"settings.describe":sl,"settings.openDocument":ol,"settings.update":rl,"settings.replace":cl,"settings.mutate":il,"credentials.describe":ll,"credentials.set":dl,"credentials.unset":pl,"llm.providers":hl,"llm.models":ml,"llm.discoverModels":vl},Sl=3e4,Il="http://dsh.internal";var Ct=class{static{r(this,"AbstractApiClient")}timeoutMs;envelopeBatch=[];flushScheduled=!1;envelopeListeners=new Set;constructor(e=Sl){this.timeoutMs=e}subscribeEnvelopes(e){return this.envelopeListeners.add(e),()=>{this.envelopeListeners.delete(e)}}onEnvelope(e){this.envelopeListeners.size!==0&&(this.envelopeBatch.push(e),!this.flushScheduled&&(this.flushScheduled=!0,queueMicrotask(()=>{this.flushScheduled=!1;const t=this.envelopeBatch;this.envelopeBatch=[];for(const n of this.envelopeListeners)try{n(t)}catch(s){console.error("[apiproxy] envelope listener threw:",s)}})))}resolveBase(){const e=globalThis.location;return e?.origin!==void 0&&e.origin!=="null"?e.origin:Il}mintRpcId(){return crypto.randomUUID()}async postJson(e,t,n,s="default"){const o=s==="default"?n===void 0?AbortSignal.timeout(this.timeoutMs):AbortSignal.any([AbortSignal.timeout(this.timeoutMs),n]):n,a=await this.doFetch(new URL(e,this.resolveBase()),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t),...o===void 0?{}:{signal:o}});if(!a.ok)throw new Error(`transport failure for ${e}: HTTP ${a.status}`);return a}async callUnary(e,t,n,s="default"){const o={type:"client-request",rpcId:this.mintRpcId(),method:e,payload:t};this.onEnvelope(o);const a=await this.postJson(`/api/${e}`,o,n,s),i=Rt.parse(await a.json());if(this.onEnvelope(i),i.rpcId!==o.rpcId)throw new Error(`rpcId mismatch for ${e}: sent ${o.rpcId}, got ${i.rpcId}`);if(!i.result.ok)return{rpcId:i.rpcId,result:i.result};const u=_l[e].parse(i.result.value);return{rpcId:i.rpcId,result:{ok:!0,value:u}}}openMux(e,t,n){return this.readSse("/api/events.mux",t,Is,n)}openHost(e,t,n){return this.readSse("/api/events.host",t,xs,n)}async*readSse(e,t,n,s){const o=await this.doFetch(new URL(e,this.resolveBase()),{signal:t});if(!o.ok||o.body===null)throw new Error(`transport failure for ${e}: HTTP ${o.status}`);s?.();const a=o.body.getReader(),i=new TextDecoder;let u="";try{for(;;){const{done:f,value:m}=await a.read();if(f)return;u+=i.decode(m,{stream:!0});let k;for(;(k=u.indexOf(`
64
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const i of e.seen.entries()){const u=i[1];if(t===i[0]){a(i);continue}if(e.external){const f=e.external.registry.get(i[0])?.id;if(t!==i[0]&&f){a(i);continue}}if(e.metadataRegistry.get(i[0])?.id){a(i);continue}if(u.cycle){a(i);continue}if(u.count>1&&e.reused==="ref"){a(i);continue}}}r(Xn,"extractDefs");function Qn(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=r(u=>{const f=e.seen.get(u);if(f.ref===null)return;const m=f.def??f.schema,k={...m},_=f.ref;if(f.ref=null,_){s(_);const S=e.seen.get(_),E=S.schema;if(E.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(E)):Object.assign(m,E),Object.assign(m,k),u._zod.parent===_)for(const D in m)D==="$ref"||D==="allOf"||D in k||delete m[D];if(E.$ref&&S.def)for(const D in m)D==="$ref"||D==="allOf"||D in S.def&&JSON.stringify(m[D])===JSON.stringify(S.def[D])&&delete m[D]}const b=u._zod.parent;if(b&&b!==_){s(b);const S=e.seen.get(b);if(S?.schema.$ref&&(m.$ref=S.schema.$ref,S.def))for(const E in m)E==="$ref"||E==="allOf"||E in S.def&&JSON.stringify(m[E])===JSON.stringify(S.def[E])&&delete m[E]}e.override({zodSchema:u,jsonSchema:m,path:f.path??[]})},"flattenRef");for(const u of[...e.seen.entries()].reverse())s(u[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}Object.assign(o,n.def??n.schema);const a=e.metadataRegistry.get(t)?.id;a!==void 0&&o.id===a&&delete o.id;const i=e.external?.defs??{};for(const u of e.seen.entries()){const f=u[1];f.def&&f.defId&&(f.def.id===f.defId&&delete f.def.id,i[f.defId]=f.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:ot(t,"input",e.processors),output:ot(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}r(Qn,"finalize");function ee(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const s=e._zod.def;if(s.type==="transform")return!0;if(s.type==="array")return ee(s.element,n);if(s.type==="set")return ee(s.valueType,n);if(s.type==="lazy")return ee(s.getter(),n);if(s.type==="promise"||s.type==="optional"||s.type==="nonoptional"||s.type==="nullable"||s.type==="readonly"||s.type==="default"||s.type==="prefault")return ee(s.innerType,n);if(s.type==="intersection")return ee(s.left,n)||ee(s.right,n);if(s.type==="record"||s.type==="map")return ee(s.keyType,n)||ee(s.valueType,n);if(s.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:ee(s.in,n)||ee(s.out,n);if(s.type==="object"){for(const o in s.shape)if(ee(s.shape[o],n))return!0;return!1}if(s.type==="union"){for(const o of s.options)if(ee(o,n))return!0;return!1}if(s.type==="tuple"){for(const o of s.items)if(ee(o,n))return!0;return!!(s.rest&&ee(s.rest,n))}return!1}r(ee,"isTransforming");const _i=r((e,t={})=>n=>{const s=Yn({...n,processors:t});return K(e,s),Xn(s,e),Qn(s,e)},"createToJSONSchemaMethod"),ot=r((e,t,n={})=>s=>{const{libraryOptions:o,target:a}=s??{},i=Yn({...o??{},target:a,io:t,processors:n});return K(e,i),Xn(i,e),Qn(i,e)},"createStandardJSONSchemaMethod"),Si={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ii=r((e,t,n,s)=>{const o=n;o.type="string";const{minimum:a,maximum:i,format:u,patterns:f,contentEncoding:m}=e._zod.bag;if(typeof a=="number"&&(o.minLength=a),typeof i=="number"&&(o.maxLength=i),u&&(o.format=Si[u]??u,o.format===""&&delete o.format,u==="time"&&delete o.format),m&&(o.contentEncoding=m),f&&f.size>0){const k=[...f];k.length===1?o.pattern=k[0].source:k.length>1&&(o.allOf=[...k.map(_=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:_.source}))])}},"stringProcessor"),xi=r((e,t,n,s)=>{const o=n,{minimum:a,maximum:i,format:u,multipleOf:f,exclusiveMaximum:m,exclusiveMinimum:k}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number";const _=typeof k=="number"&&k>=(a??Number.NEGATIVE_INFINITY),b=typeof m=="number"&&m<=(i??Number.POSITIVE_INFINITY),S=t.target==="draft-04"||t.target==="openapi-3.0";_?S?(o.minimum=k,o.exclusiveMinimum=!0):o.exclusiveMinimum=k:typeof a=="number"&&(o.minimum=a),b?S?(o.maximum=m,o.exclusiveMaximum=!0):o.exclusiveMaximum=m:typeof i=="number"&&(o.maximum=i),typeof f=="number"&&(o.multipleOf=f)},"numberProcessor"),$i=r((e,t,n,s)=>{n.type="boolean"},"booleanProcessor"),Ei=r((e,t,n,s)=>{n.not={}},"neverProcessor"),zi=r((e,t,n,s)=>{const o=e._zod.def,a=fn(o.entries);a.every(i=>typeof i=="number")&&(n.type="number"),a.every(i=>typeof i=="string")&&(n.type="string"),n.enum=a},"enumProcessor"),Ai=r((e,t,n,s)=>{const o=e._zod.def,a=[];for(const i of o.values)if(i===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");a.push(Number(i))}else a.push(i);if(a.length!==0)if(a.length===1){const i=a[0];n.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[i]:n.const=i}else a.every(i=>typeof i=="number")&&(n.type="number"),a.every(i=>typeof i=="string")&&(n.type="string"),a.every(i=>typeof i=="boolean")&&(n.type="boolean"),a.every(i=>i===null)&&(n.type="null"),n.enum=a},"literalProcessor"),Ti=r((e,t,n,s)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},"customProcessor"),Oi=r((e,t,n,s)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},"transformProcessor"),Pi=r((e,t,n,s)=>{const o=n,a=e._zod.def,{minimum:i,maximum:u}=e._zod.bag;typeof i=="number"&&(o.minItems=i),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=K(a.element,t,{...s,path:[...s.path,"items"]})},"arrayProcessor"),Ri=r((e,t,n,s)=>{const o=n,a=e._zod.def;o.type="object",o.properties={};const i=a.shape;for(const m in i)o.properties[m]=K(i[m],t,{...s,path:[...s.path,"properties",m]});const u=new Set(Object.keys(i)),f=new Set([...u].filter(m=>{const k=a.shape[m]._zod;return t.io==="input"?k.optin===void 0:k.optout===void 0}));f.size>0&&(o.required=Array.from(f)),a.catchall?._zod.def.type==="never"?o.additionalProperties=!1:a.catchall?a.catchall&&(o.additionalProperties=K(a.catchall,t,{...s,path:[...s.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},"objectProcessor"),Zi=r((e,t,n,s)=>{const o=e._zod.def,a=o.inclusive===!1,i=o.options.map((u,f)=>K(u,t,{...s,path:[...s.path,a?"oneOf":"anyOf",f]}));a?n.oneOf=i:n.anyOf=i},"unionProcessor"),Ni=r((e,t,n,s)=>{const o=e._zod.def,a=K(o.left,t,{...s,path:[...s.path,"allOf",0]}),i=K(o.right,t,{...s,path:[...s.path,"allOf",1]}),u=r(f=>"allOf"in f&&Object.keys(f).length===1,"isSimpleIntersection");n.allOf=[...u(a)?a.allOf:[a],...u(i)?i.allOf:[i]]},"intersectionProcessor"),ji=r((e,t,n,s)=>{const o=n,a=e._zod.def;o.type="object";const i=a.keyType,u=i._zod.bag?.patterns;if(a.mode==="loose"&&u&&u.size>0){const m=K(a.valueType,t,{...s,path:[...s.path,"patternProperties","*"]});o.patternProperties={};for(const k of u)o.patternProperties[k.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=K(a.keyType,t,{...s,path:[...s.path,"propertyNames"]})),o.additionalProperties=K(a.valueType,t,{...s,path:[...s.path,"additionalProperties"]});const f=i._zod.values;if(f){const m=[...f].filter(k=>typeof k=="string"||typeof k=="number");m.length>0&&(o.required=m)}},"recordProcessor"),Mi=r((e,t,n,s)=>{const o=e._zod.def,a=K(o.innerType,t,s),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=o.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},"nullableProcessor"),Di=r((e,t,n,s)=>{const o=e._zod.def;K(o.innerType,t,s);const a=t.seen.get(e);a.ref=o.innerType},"nonoptionalProcessor"),Ci=r((e,t,n,s)=>{const o=e._zod.def;K(o.innerType,t,s);const a=t.seen.get(e);a.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},"defaultProcessor"),Ui=r((e,t,n,s)=>{const o=e._zod.def;K(o.innerType,t,s);const a=t.seen.get(e);a.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},"prefaultProcessor"),Li=r((e,t,n,s)=>{const o=e._zod.def;K(o.innerType,t,s);const a=t.seen.get(e);a.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=i},"catchProcessor"),Fi=r((e,t,n,s)=>{const o=e._zod.def,a=o.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?a?o.out:o.in:o.out;K(i,t,s);const u=t.seen.get(e);u.ref=i},"pipeProcessor"),Vi=r((e,t,n,s)=>{const o=e._zod.def;K(o.innerType,t,s);const a=t.seen.get(e);a.ref=o.innerType,n.readOnly=!0},"readonlyProcessor"),qn=r((e,t,n,s)=>{const o=e._zod.def;K(o.innerType,t,s);const a=t.seen.get(e);a.ref=o.innerType},"optionalProcessor"),Bi=r((e,t,n,s)=>{const o=e._zod.innerType;K(o,t,s);const a=t.seen.get(e);a.ref=o},"lazyProcessor"),Ji=y("ZodISODateTime",(e,t)=>{Br.init(e,t),G.init(e,t)});function Gi(e){return Xa(Ji,e)}r(Gi,"datetime");const Wi=y("ZodISODate",(e,t)=>{Jr.init(e,t),G.init(e,t)});function Hi(e){return Qa(Wi,e)}r(Hi,"date");const Ki=y("ZodISOTime",(e,t)=>{Gr.init(e,t),G.init(e,t)});function Yi(e){return qa(Ki,e)}r(Yi,"time");const Xi=y("ZodISODuration",(e,t)=>{Wr.init(e,t),G.init(e,t)});function Qi(e){return ei(Xi,e)}r(Qi,"duration");const re=y("ZodError",r((e,t)=>{wn.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r(n=>jo(e,n),"value")},flatten:{value:r(n=>No(e,n),"value")},addIssue:{value:r(n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,bt,2)},"value")},addIssues:{value:r(n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,bt,2)},"value")},isEmpty:{get(){return e.issues.length===0}}})},"initializer"),{Parent:Error}),qi=xt(re),ec=$t(re),tc=Qe(re),nc=qe(re),sc=Co(re),oc=Uo(re),rc=Lo(re),ac=Fo(re),ic=Vo(re),cc=Bo(re),uc=Jo(re),lc=Go(re),es=new WeakMap;function Ce(e,t,n){const s=Object.getPrototypeOf(e);let o=es.get(s);if(o||(o=new Set,es.set(s,o)),!o.has(t)){o.add(t);for(const a in n){const i=n[a];Object.defineProperty(s,a,{configurable:!0,enumerable:!1,get(){const u=i.bind(this);return Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}}r(Ce,"_installLazyMethods");const J=y("ZodType",(e,t)=>(V.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ot(e,"input"),output:ot(e,"output")}}),e.toJSONSchema=_i(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,s)=>qi(e,n,s,{callee:e.parse}),e.safeParse=(n,s)=>tc(e,n,s),e.parseAsync=async(n,s)=>ec(e,n,s,{callee:e.parseAsync}),e.safeParseAsync=async(n,s)=>nc(e,n,s),e.spa=e.safeParseAsync,e.encode=(n,s)=>sc(e,n,s),e.decode=(n,s)=>oc(e,n,s),e.encodeAsync=async(n,s)=>rc(e,n,s),e.decodeAsync=async(n,s)=>ac(e,n,s),e.safeEncode=(n,s)=>ic(e,n,s),e.safeDecode=(n,s)=>cc(e,n,s),e.safeEncodeAsync=async(n,s)=>uc(e,n,s),e.safeDecodeAsync=async(n,s)=>lc(e,n,s),Ce(e,"ZodType",{check(...n){const s=this.def;return this.clone(ve(s,{checks:[...s.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,s){return ye(this,n,s)},brand(){return this},register(n,s){return n.add(this,s),this},refine(n,s){return this.check(ou(n,s))},superRefine(n,s){return this.check(ru(n,s))},overwrite(n){return this.check(Te(n))},optional(){return us(this)},exactOptional(){return Vc(this)},nullable(){return ls(this)},nullish(){return us(ls(this))},nonoptional(n){return Kc(this,n)},array(){return T(this)},or(n){return W([this,n])},and(n){return Mc(this,n)},transform(n){return ps(this,Lc(n))},default(n){return Gc(this,n)},prefault(n){return Hc(this,n)},catch(n){return Xc(this,n)},pipe(n){return ps(this,n)},readonly(){return eu(this)},describe(n){const s=this.clone();return De.add(s,{description:n}),s},meta(...n){if(n.length===0)return De.get(this);const s=this.clone();return De.add(s,n[0]),s},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return De.get(e)?.description},configurable:!0}),e)),ts=y("_ZodString",(e,t)=>{Et.init(e,t),J.init(e,t),e._zod.processJSONSchema=(s,o,a)=>Ii(e,s,o,a);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Ce(e,"_ZodString",{regex(...s){return this.check(ai(...s))},includes(...s){return this.check(ui(...s))},startsWith(...s){return this.check(li(...s))},endsWith(...s){return this.check(di(...s))},min(...s){return this.check(st(...s))},max(...s){return this.check(Hn(...s))},length(...s){return this.check(Kn(...s))},nonempty(...s){return this.check(st(1,...s))},lowercase(s){return this.check(ii(s))},uppercase(s){return this.check(ci(s))},trim(){return this.check(fi())},normalize(...s){return this.check(pi(...s))},toLowerCase(){return this.check(hi())},toUpperCase(){return this.check(mi())},slugify(){return this.check(gi())}})}),dc=y("ZodString",(e,t)=>{Et.init(e,t),ts.init(e,t),e.email=n=>e.check(Ta(pc,n)),e.url=n=>e.check(Na(fc,n)),e.jwt=n=>e.check(Ya(zc,n)),e.emoji=n=>e.check(ja(hc,n)),e.guid=n=>e.check(Bn(ns,n)),e.uuid=n=>e.check(Oa(rt,n)),e.uuidv4=n=>e.check(Pa(rt,n)),e.uuidv6=n=>e.check(Ra(rt,n)),e.uuidv7=n=>e.check(Za(rt,n)),e.nanoid=n=>e.check(Ma(mc,n)),e.guid=n=>e.check(Bn(ns,n)),e.cuid=n=>e.check(Da(gc,n)),e.cuid2=n=>e.check(Ca(vc,n)),e.ulid=n=>e.check(Ua(yc,n)),e.base64=n=>e.check(Wa(xc,n)),e.base64url=n=>e.check(Ha($c,n)),e.xid=n=>e.check(La(wc,n)),e.ksuid=n=>e.check(Fa(kc,n)),e.ipv4=n=>e.check(Va(bc,n)),e.ipv6=n=>e.check(Ba(_c,n)),e.cidrv4=n=>e.check(Ja(Sc,n)),e.cidrv6=n=>e.check(Ga(Ic,n)),e.e164=n=>e.check(Ka(Ec,n)),e.datetime=n=>e.check(Gi(n)),e.date=n=>e.check(Hi(n)),e.time=n=>e.check(Yi(n)),e.duration=n=>e.check(Qi(n))});function p(e){return Aa(dc,e)}r(p,"string");const G=y("ZodStringFormat",(e,t)=>{B.init(e,t),ts.init(e,t)}),pc=y("ZodEmail",(e,t)=>{Nr.init(e,t),G.init(e,t)}),ns=y("ZodGUID",(e,t)=>{Rr.init(e,t),G.init(e,t)}),rt=y("ZodUUID",(e,t)=>{Zr.init(e,t),G.init(e,t)}),fc=y("ZodURL",(e,t)=>{jr.init(e,t),G.init(e,t)}),hc=y("ZodEmoji",(e,t)=>{Mr.init(e,t),G.init(e,t)}),mc=y("ZodNanoID",(e,t)=>{Dr.init(e,t),G.init(e,t)}),gc=y("ZodCUID",(e,t)=>{Cr.init(e,t),G.init(e,t)}),vc=y("ZodCUID2",(e,t)=>{Ur.init(e,t),G.init(e,t)}),yc=y("ZodULID",(e,t)=>{Lr.init(e,t),G.init(e,t)}),wc=y("ZodXID",(e,t)=>{Fr.init(e,t),G.init(e,t)}),kc=y("ZodKSUID",(e,t)=>{Vr.init(e,t),G.init(e,t)}),bc=y("ZodIPv4",(e,t)=>{Hr.init(e,t),G.init(e,t)}),_c=y("ZodIPv6",(e,t)=>{Kr.init(e,t),G.init(e,t)}),Sc=y("ZodCIDRv4",(e,t)=>{Yr.init(e,t),G.init(e,t)}),Ic=y("ZodCIDRv6",(e,t)=>{Xr.init(e,t),G.init(e,t)}),xc=y("ZodBase64",(e,t)=>{Qr.init(e,t),G.init(e,t)}),$c=y("ZodBase64URL",(e,t)=>{ea.init(e,t),G.init(e,t)}),Ec=y("ZodE164",(e,t)=>{ta.init(e,t),G.init(e,t)}),zc=y("ZodJWT",(e,t)=>{sa.init(e,t),G.init(e,t)}),ss=y("ZodNumber",(e,t)=>{Tn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(s,o,a)=>xi(e,s,o,a),Ce(e,"ZodNumber",{gt(s,o){return this.check(Gn(s,o))},gte(s,o){return this.check(Tt(s,o))},min(s,o){return this.check(Tt(s,o))},lt(s,o){return this.check(Jn(s,o))},lte(s,o){return this.check(At(s,o))},max(s,o){return this.check(At(s,o))},int(s){return this.check(os(s))},safe(s){return this.check(os(s))},positive(s){return this.check(Gn(0,s))},nonnegative(s){return this.check(Tt(0,s))},negative(s){return this.check(Jn(0,s))},nonpositive(s){return this.check(At(0,s))},multipleOf(s,o){return this.check(Wn(s,o))},step(s,o){return this.check(Wn(s,o))},finite(){return this}});const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function R(e){return ti(ss,e)}r(R,"number");const Ac=y("ZodNumberFormat",(e,t)=>{oa.init(e,t),ss.init(e,t)});function os(e){return ni(Ac,e)}r(os,"int");const Tc=y("ZodBoolean",(e,t)=>{ra.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>$i(e,n,s,o)});function U(e){return si(Tc,e)}r(U,"boolean");const Oc=y("ZodUnknown",(e,t)=>{aa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>{}});function X(){return oi(Oc)}r(X,"unknown");const Pc=y("ZodNever",(e,t)=>{ia.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Ei(e,n,s,o)});function Rc(e){return ri(Pc,e)}r(Rc,"never");const Zc=y("ZodArray",(e,t)=>{ca.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Pi(e,n,s,o),e.element=t.element,Ce(e,"ZodArray",{min(n,s){return this.check(st(n,s))},nonempty(n){return this.check(st(1,n))},max(n,s){return this.check(Hn(n,s))},length(n,s){return this.check(Kn(n,s))},unwrap(){return this.element}})});function T(e,t){return vi(Zc,e,t)}r(T,"array");const rs=y("ZodObject",(e,t)=>{la.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Ri(e,n,s,o),N(e,"shape",()=>t.shape),Ce(e,"ZodObject",{keyof(){return Dc(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:X()})},loose(){return this.clone({...this._zod.def,catchall:X()})},strict(){return this.clone({...this._zod.def,catchall:Rc()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Ao(this,n)},safeExtend(n){return To(this,n)},merge(n){return Oo(this,n)},pick(n){return Eo(this,n)},omit(n){return zo(this,n)},partial(...n){return Po(cs,this,n[0])},required(...n){return Ro(ds,this,n[0])}})});function d(e,t){const n={type:"object",shape:e??{},...x(t)};return new rs(n)}r(d,"object");function at(e,t){return new rs({type:"object",shape:e,catchall:X(),...x(t)})}r(at,"looseObject");const as=y("ZodUnion",(e,t)=>{Nn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Zi(e,n,s,o),e.options=t.options});function W(e,t){return new as({type:"union",options:e,...x(t)})}r(W,"union");const Nc=y("ZodDiscriminatedUnion",(e,t)=>{as.init(e,t),da.init(e,t)});function he(e,t,n){return new Nc({type:"union",options:t,discriminator:e,...x(n)})}r(he,"discriminatedUnion");const jc=y("ZodIntersection",(e,t)=>{pa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Ni(e,n,s,o)});function Mc(e,t){return new jc({type:"intersection",left:e,right:t})}r(Mc,"intersection");const is=y("ZodRecord",(e,t)=>{fa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>ji(e,n,s,o),e.keyType=t.keyType,e.valueType=t.valueType});function it(e,t,n){return!t||!t._zod?new is({type:"record",keyType:p(),valueType:e,...x(t)}):new is({type:"record",keyType:e,valueType:t,...x(n)})}r(it,"record");const Ot=y("ZodEnum",(e,t)=>{ha.init(e,t),J.init(e,t),e._zod.processJSONSchema=(s,o,a)=>zi(e,s,o,a),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(s,o)=>{const a={};for(const i of s)if(n.has(i))a[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Ot({...t,checks:[],...x(o),entries:a})},e.exclude=(s,o)=>{const a={...t.entries};for(const i of s)if(n.has(i))delete a[i];else throw new Error(`Key ${i} not found in enum`);return new Ot({...t,checks:[],...x(o),entries:a})}});function Dc(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(s=>[s,s])):e;return new Ot({type:"enum",entries:n,...x(t)})}r(Dc,"_enum");const Cc=y("ZodLiteral",(e,t)=>{ma.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Ai(e,n,s,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function g(e,t){return new Cc({type:"literal",values:Array.isArray(e)?e:[e],...x(t)})}r(g,"literal");const Uc=y("ZodTransform",(e,t)=>{ga.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Oi(e,n,s,o),e._zod.parse=(n,s)=>{if(s.direction==="backward")throw new pn(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(Me(a,n.value,t));else{const i=a;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),n.issues.push(Me(i))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(a=>(n.value=a,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});function Lc(e){return new Uc({type:"transform",transform:e})}r(Lc,"transform");const cs=y("ZodOptional",(e,t)=>{Dn.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>qn(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function us(e){return new cs({type:"optional",innerType:e})}r(us,"optional");const Fc=y("ZodExactOptional",(e,t)=>{va.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>qn(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function Vc(e){return new Fc({type:"optional",innerType:e})}r(Vc,"exactOptional");const Bc=y("ZodNullable",(e,t)=>{ya.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Mi(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function ls(e){return new Bc({type:"nullable",innerType:e})}r(ls,"nullable");const Jc=y("ZodDefault",(e,t)=>{wa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Ci(e,n,s,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Gc(e,t){return new Jc({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():vn(t)}})}r(Gc,"_default");const Wc=y("ZodPrefault",(e,t)=>{ka.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Ui(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function Hc(e,t){return new Wc({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():vn(t)}})}r(Hc,"prefault");const ds=y("ZodNonOptional",(e,t)=>{ba.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Di(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function Kc(e,t){return new ds({type:"nonoptional",innerType:e,...x(t)})}r(Kc,"nonoptional");const Yc=y("ZodCatch",(e,t)=>{_a.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Li(e,n,s,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Xc(e,t){return new Yc({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}r(Xc,"_catch");const Qc=y("ZodPipe",(e,t)=>{Sa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Fi(e,n,s,o),e.in=t.in,e.out=t.out});function ps(e,t){return new Qc({type:"pipe",in:e,out:t})}r(ps,"pipe");const qc=y("ZodReadonly",(e,t)=>{Ia.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Vi(e,n,s,o),e.unwrap=()=>e._zod.def.innerType});function eu(e){return new qc({type:"readonly",innerType:e})}r(eu,"readonly");const tu=y("ZodLazy",(e,t)=>{xa.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Bi(e,n,s,o),e.unwrap=()=>e._zod.def.getter()});function nu(e){return new tu({type:"lazy",getter:e})}r(nu,"lazy");const fs=y("ZodCustom",(e,t)=>{$a.init(e,t),J.init(e,t),e._zod.processJSONSchema=(n,s,o)=>Ti(e,n,s,o)});function su(e,t){return yi(fs,e??(()=>!0),t)}r(su,"custom");function ou(e,t={}){return wi(fs,e,t)}r(ou,"refine");function ru(e,t){return ki(e,t)}r(ru,"superRefine");const Ue=p(),Pt=he("code",[d({code:g("bad-request"),message:p(),details:d({issues:T(su())})}),d({code:g("cancelled"),message:p(),details:d({})}),d({code:g("session-not-found"),message:p(),details:d({sessionId:p()})}),d({code:g("model-unavailable"),message:p(),details:d({provider:p(),model:p()})}),d({code:g("session-conflict"),message:p(),details:d({sessionId:p(),requestedCwd:p(),existingCwd:p().optional()})}),d({code:g("invalid-time-zone"),message:p(),details:d({value:p()})}),d({code:g("workspace-attach-failed"),message:p(),details:d({sessionId:p(),workspaceId:p()})}),d({code:g("workspace-not-found"),message:p(),details:d({workspaceId:p()})}),d({code:g("workspace-invalid-path"),message:p(),details:d({path:p()})}),d({code:g("workspace-name-conflict"),message:p(),details:d({name:p()})}),d({code:g("workspace-move-invalid"),message:p(),details:d({workspaceId:p(),sessionId:p(),beforeSessionId:p().optional()})}),d({code:g("directory-unreadable"),message:p(),details:d({path:p()})}),d({code:g("directory-exists"),message:p(),details:d({path:p()})}),d({code:g("directory-create-failed"),message:p(),details:d({path:p()})}),d({code:g("directory-picker-unavailable"),message:p(),details:d({capability:p()})}),d({code:g("agent-preset-read-only"),message:p(),details:d({agentPreset:p(),reason:p()})}),d({code:g("agent-preset-locked"),message:p(),details:d({sessionId:p(),agentPreset:p()})}),d({code:g("agent-preset-conflict"),message:p(),details:d({sessionId:p(),requestedPreset:p(),existingPreset:p().optional()})}),d({code:g("agent-preset-not-found"),message:p(),details:d({agentPreset:p(),available:T(p())})}),d({code:g("agent-preset-invalid"),message:p(),details:d({agentPreset:p(),reason:p()})}),d({code:g("agent-busy"),message:p(),details:d({reason:p()})}),d({code:g("attachment-error"),message:p(),details:d({reason:p()})}),d({code:g("queue-item-not-found"),message:p(),details:d({itemId:p()})}),d({code:g("steer-unavailable"),message:p(),details:d({itemId:p()})}),d({code:g("command-error"),message:p(),details:d({})}),d({code:g("unknown-command"),message:p(),details:d({})}),d({code:g("settings-rejected"),message:p(),details:d({ns:p()})}),d({code:g("settings-conflict"),message:p(),details:d({ns:p(),expected:R(),actual:R()})}),d({code:g("credential-rejected"),message:p(),details:d({ref:p()})}),d({code:g("model-discovery-failed"),message:p(),details:d({settingsNs:p(),baseURL:p().optional()})}),d({code:g("title-invalid"),message:p(),details:d({sessionId:p()})}),d({code:g("fork-unavailable"),message:p(),details:d({sessionId:p()})}),d({code:g("subagent-parent-unavailable"),message:p(),details:d({parentSessionId:p()})}),d({code:g("subagent-not-found"),message:p(),details:d({parentSessionId:p(),childSessionId:p()})}),d({code:g("subagent-catalog-diagnostic"),message:p(),details:d({parentSessionId:p(),childSessionId:p(),reason:W([g("corrupt"),g("unsupported"),g("unavailable")])})}),d({code:g("subagent-not-resumable"),message:p(),details:d({childSessionId:p()})}),d({code:g("subagent-unauthorized"),message:p(),details:d({childSessionId:p()})}),d({code:g("subagent-delivery-unavailable"),message:p(),details:d({childSessionId:p()})}),d({code:g("internal"),message:p(),details:d({})})]);function hs(e){return W([d({ok:g(!0),value:e}),d({ok:g(!1),error:Pt})])}r(hs,"rpcResultSchema");const au=d({type:g("client-request"),rpcId:Ue,method:p(),payload:X()}),Rt=d({type:g("server-response"),rpcId:Ue,result:hs(X().optional())}),Zt=d({type:g("server-request"),rpcId:Ue,method:p(),payload:X()});he("type",[au,Rt,Zt,d({type:g("client-response"),rpcId:Ue,result:hs(X().optional())})]);const iu=W([d({accepted:g(!0)}),d({accepted:g(!1),reason:W([g("not-pending"),g("bad-response")])})]);function cu(e,t){let n=0,s=0;for(const o of e){if(n===t)return e.slice(0,s);n++,s+=o.length}return e}r(cu,"truncateUnicodeCodePoints");const A=p().min(1),ms=p().min(1),de=p().min(1),gs=d({type:p(),seq:R().int().nonnegative(),time:R(),data:X(),sourceEventSeqs:T(R()).optional(),surfaceOp:X().optional(),ignorable:g(!0).optional()}),uu=d({sessionId:A,updatedAt:R(),running:U(),blank:U(),parentSessionId:A.optional(),origin:g("subagent").optional(),cwd:p().optional(),agentPreset:p().optional(),projections:nu(()=>Nt).optional()});d({cursor:p().optional()});const lu=d({items:T(uu)});d({query:p().trim().min(1).max(500).refine(e=>!e.includes("\0"),{message:"search query must not contain NUL"})});const du=d({items:T(d({sessionId:A,snippet:p().refine(e=>cu(e,240)===e,{message:"search snippet must contain at most 240 Unicode code points"})})).max(20),hasMore:U()});d({workspaceId:de.optional(),cwd:p().optional(),sessionId:A.optional(),agentPreset:p().optional()}).refine(e=>e.workspaceId===void 0||e.cwd===void 0,{message:"session.create accepts workspaceId or cwd, not both"});const pu=d({sessionId:A,agentPreset:p().optional()});d({sessionId:A,title:p()});const fu=d({title:p().min(1),seq:R().int().nonnegative()});d({sessionId:A,atSeq:R().int().nonnegative().optional()});const hu=d({sessionId:A});d({sessionId:A,beforeSeq:R().int().nonnegative().optional(),maxMessages:R().int().positive().optional()});const vs=d({provider:p().min(1),model:p().min(1),reasoningEffort:p().min(1).optional()}),mu=d({efforts:T(d({id:p().min(1),name:p().min(1),description:p().optional()})).min(1),defaultEffort:p().min(1).optional()}),gu=d({id:p().min(1),name:p().min(1),description:p().optional(),reasoning:mu.optional()}),ys=d({id:p().min(1),name:p().min(1),models:T(gu)}),ws=d({id:p().min(1),name:p().min(1),message:p()}),ks=he("for",[d({for:g("call"),view:at({card:p()})}),d({for:g("result"),view:at({card:p()})})]),bs=d({event:gs,view:ks.optional()}),Nt=d({asOfSeq:R().int().min(-1),values:it(p(),X())});d({blank:U(),lastPromptAt:R().nullable()}),d({maxImageBytes:R().int().positive(),maxImagesPerMessage:R().int().positive(),maxMessageImageBytes:R().int().positive(),maxImagePixels:R().int().positive(),mediaTypes:T(p())});const vu=d({events:T(bs),hasMore:U(),projections:Nt.optional()});d({sessionId:A});const yu=d({current:vs,routable:U(),groups:T(ys),failures:T(ws)});d({sessionId:A,provider:p().min(1),model:p().min(1),reasoningEffort:p().min(1).optional()});const wu=d({selected:vs}),jt=at({type:p()}),_s=W([g("image/png"),g("image/jpeg"),g("image/webp"),g("image/gif")]),ku=he("type",[d({type:g("text"),text:p()}),d({type:g("image"),mediaType:_s,data:p(),name:p().optional()})]);d({sessionId:A,mode:W([g("queue"),g("steer")]),content:T(ku),clientTimeZone:p().optional()});const bu=d({accepted:g(!0),command:d({kind:g("success"),text:p().optional()}).optional()}),Ss=p().min(1),_u=d({attachmentId:Ss,mediaType:_s,bytes:R().int().positive(),width:R().int().positive(),height:R().int().positive(),name:p().optional()});d({sessionId:A,attachmentId:Ss});const Su=d({attachment:_u,data:p()});d({sessionId:A,itemId:ms,action:he("kind",[d({kind:g("edit"),content:T(jt)}),d({kind:g("remove")}),d({kind:g("steer")})])});const Iu=d({accepted:g(!0)});d({sessionId:A});const xu=d({accepted:g(!0)}),Mt=p().min(1);d({sessionId:A,approvalId:Mt,outcome:W([g("allowed-once"),g("rejected")])});const $u=d({id:p().min(1),kind:p().min(1),label:p().min(1),status:W([g("running"),g("stopping"),g("completed"),g("killed"),g("failed")]),detail:p().optional(),startedAt:R().int().nonnegative(),finishedAt:R().int().nonnegative().optional()}),Le=d({workspaceId:de,path:p(),title:p(),sessionIds:T(A),createdAt:p(),updatedAt:p()});d({});const Eu=d({items:T(Le),archivedSessionIds:T(A)});d({path:p()});const zu=d({workspace:Le,created:U()});d({workspaceId:de,title:p()}).refine(e=>e.title.trim()!=="",{message:"workspace.rename requires a non-blank title"});const Au=d({workspace:Le});d({workspaceId:de});const Tu=d({deleted:g(!0)});d({workspaceId:de,beforeWorkspaceId:de.optional()});const Ou=d({workspaceIds:T(de)});d({workspaceId:de,sessionId:A,beforeSessionId:A.optional()});const Pu=d({workspace:Le});d({sessionId:A});const Ru=d({archivedSessionIds:T(A)}),Zu=d({id:p(),question:p(),header:p().optional(),detail:p().optional(),options:T(d({label:p(),description:p().optional()})).optional(),multiSelect:U().optional(),intent:he("kind",[d({kind:g("plan-review"),approve:p()})]).optional()}),Nu=d({id:p().min(1),role:W([g("system"),g("user"),g("assistant")]),content:T(jt),source:at({kind:p()})}),Is=he("type",[d({type:g("session/event"),sessionId:A,event:gs,view:ks.optional()}),d({type:g("session/subscribed"),sessionId:A,lastSeq:R().int()}),d({type:g("approval/requested"),sessionId:A,approvalId:Mt,toolName:p(),callId:p().optional(),reason:p().optional()}),d({type:g("approval/resolved"),sessionId:A,approvalId:Mt,outcome:W([g("allowed-once"),g("rejected"),g("cancelled"),g("unavailable")])}),d({type:g("question/requested"),sessionId:A,questions:T(Zu).min(1)}),d({type:g("question/resolved"),sessionId:A,questionRpcId:Ue,outcome:W([g("answered"),g("cancelled")])}),d({type:g("session/queue"),sessionId:A,items:T(d({id:ms,placement:W([g("queued"),g("steering"),g("context")]),message:Nu}))}),d({type:g("session/jobs"),sessionId:A,jobs:T($u)}),d({type:g("session/projection"),sessionId:A,key:p().min(1),value:X(),seq:R().int().nonnegative()}),d({type:g("stream/error"),error:Pt})]),xs=he("type",[d({type:g("host/session-added"),sessionId:A,blank:U(),parentSessionId:A.optional(),origin:g("subagent").optional(),cwd:p().optional(),agentPreset:p().optional()}),d({type:g("host/session-removed"),sessionId:A}),d({type:g("host/session-status"),sessionId:A,running:U()}),d({type:g("host/agent-error"),sessionId:A,message:p()}),d({type:g("host/workspace-changed"),workspace:Le}),d({type:g("host/workspace-removed"),workspaceId:de}),d({type:g("host/workspace-order-changed"),workspaceIds:T(de)}),d({type:g("host/archived-sessions-changed"),archivedSessionIds:T(A)}),d({type:g("host/remote-event"),event:p().min(1),args:T(X())}),d({type:g("stream/error"),error:Pt})]);d({});const ju=d({version:p(),cwd:p(),provider:p().optional(),model:p().optional(),attachedSessions:R().int().nonnegative(),canOpenPath:U()});d({});const Mu=d({path:p().nullable()}),$s=d({name:p(),path:p(),hidden:U()});d({path:p().optional()});const Du=d({path:p(),home:p(),crumbs:T($s),entries:T($s),truncated:U()});d({path:p(),name:p()}).refine(e=>e.name.trim()!==""&&e.name!=="."&&e.name!==".."&&!/[/\\]/.test(e.name),{message:"host.createDirectory requires a single non-blank path segment name"});const Cu=d({path:p()});d({path:p().min(1)});const Uu=d({opened:g(!0)}),Lu=d({name:p().min(1),description:p(),whenToUse:p().optional(),modelInvocable:U()});d({sessionId:A});const Fu=d({skills:T(Lu)}),Vu=d({id:p().min(1),trust:W([g("system"),g("user")]),isDefault:U(),name:p().optional(),description:p().optional(),broken:p().min(1).optional()});d({});const Bu=d({presets:T(Vu),authorable:U(),hasDocument:U()});d({sessionId:A,agentPreset:p().min(1)});const Ju=d({agentPreset:p()});d({agentPreset:p().min(1)});const Gu=d({agentPreset:p(),trust:W([g("system"),g("user")]),content:p(),name:p().optional(),description:p().optional()});d({from:p().min(1),agentPreset:p().min(1),name:p().optional()});const Wu=d({agentPreset:p()});d({agentPreset:p().min(1)});const Hu=W([d({opened:g(!0)}),d({opened:g(!1),path:p()})]);d({agentPreset:p().min(1)});const Ku=d({}),Oe=d({id:p(),revision:R().int().positive()}),Fe=d({ref:Oe});d({sessionId:p(),objective:p().min(1),maxGoalRounds:R().int().positive().optional()});const Yu=Fe;d({sessionId:p(),ref:Oe,objective:p().min(1).optional(),maxGoalRounds:R().int().positive().optional()}).refine(e=>e.objective!==void 0||e.maxGoalRounds!==void 0,{message:"goal.edit requires objective or maxGoalRounds"});const Xu=Fe;d({sessionId:p(),ref:Oe});const Qu=Fe;d({sessionId:p(),ref:Oe});const qu=Fe;d({sessionId:p(),ref:Oe});const el=Fe;d({sessionId:p(),ref:Oe});const tl=d({cleared:g(!0)}),nl=d({path:T(p()),set:U()}),ct=d({ns:p().min(1),schema:X(),value:X(),base:X().optional(),user:X().optional(),applies:W([g("live"),g("restart")]),secrets:T(nl),revision:R()});d({});const sl=d({writable:U(),hasDocument:U(),namespaces:T(ct)});d({});const ol=d({opened:g(!0)});d({ns:p().min(1),patch:it(p(),X()),expectedRevision:R().optional()});const rl=ct;d({ns:p().min(1),section:it(p(),X()),expectedRevision:R().optional()});const al=he("op",[d({op:g("set"),path:T(p()),value:X()}),d({op:g("unset"),path:T(p())})]);d({ns:p().min(1),ops:T(al),expectedRevision:R().optional()});const il=ct,cl=ct,Dt=p().regex(/^[A-Za-z_][A-Za-z0-9_]*$/),ul=d({configured:U(),source:p().optional(),writable:U()});d({refs:T(Dt).max(64)});const ll=d({credentials:it(p(),ul)});d({ref:Dt,value:p().min(1)});const dl=d({});d({ref:Dt});const pl=d({}),fl=d({provider:p().min(1),displayName:p().min(1),settingsNs:p(),settingsPath:T(p()),active:U(),declared:U().optional()});d({});const hl=d({providers:T(fl)});d({});const ml=d({groups:T(ys),failures:T(ws)}),gl=d({id:p().min(1),name:p().min(1).optional(),contextWindow:R().int().positive().optional(),maxTokens:R().int().positive().optional()});d({settingsNs:p().min(1),provider:p().min(1).optional(),baseURL:p().min(1).optional(),api:p().min(1).optional(),apiKey:p().min(1).optional()});const vl=d({models:T(gl)}),yl=W([d({kind:g("child"),id:A,mode:g("one-shot"),activity:W([g("running"),g("inactive")]),hasChildren:U(),label:p().optional()}),d({kind:g("child"),id:A,mode:g("continuable"),activity:W([g("running"),g("inactive")]),hasChildren:U(),label:p()}),d({kind:g("diagnostic"),id:A,reason:W([g("corrupt"),g("unsupported"),g("unavailable")])})]);d({parentSessionId:A});const wl=d({entries:T(yl),parentAvailable:U()});d({parentSessionId:A,childSessionId:A,mode:W([g("one-shot"),g("continuable")]),beforeSeq:R().int().nonnegative().optional(),maxMessages:R().int().positive().optional()});const kl=d({events:T(bs),hasMore:U(),projections:Nt.optional()});d({parentSessionId:A,childSessionId:A,mode:g("continuable"),content:T(jt),clientTimeZone:p().optional()}),d({parentSessionId:A,childSessionId:A,mode:g("continuable")});const bl=d({accepted:g(!0)}),_l={"session.list":lu,"session.search":du,"session.create":pu,"session.history":vu,"session.models":yu,"session.selectModel":wu,"session.rename":fu,"session.fork":hu,"session.prompt":bu,"session.attachment":Su,"session.updateQueue":Iu,"session.cancel":xu,"subagent.list":wl,"subagent.history":kl,"subagent.prompt":d({messageId:p()}),"subagent.interrupt":bl,"host.describe":ju,"host.pickDirectory":Mu,"host.listDirectory":Du,"host.createDirectory":Cu,"host.openPath":Uu,"workspace.list":Eu,"workspace.create":zu,"workspace.rename":Au,"workspace.delete":Tu,"workspace.insertBefore":Ou,"workspace.insertSessionBefore":Pu,"workspace.archiveSession":Ru,"skill.list":Fu,"agentPreset.list":Bu,"agentPreset.select":Ju,"agentPreset.read":Gu,"agentPreset.copy":Wu,"agentPreset.openDocument":Hu,"agentPreset.remove":Ku,"goal.create":Yu,"goal.edit":Xu,"goal.pause":Qu,"goal.resume":qu,"goal.complete":el,"goal.clear":tl,"settings.describe":sl,"settings.openDocument":ol,"settings.update":rl,"settings.replace":cl,"settings.mutate":il,"credentials.describe":ll,"credentials.set":dl,"credentials.unset":pl,"llm.providers":hl,"llm.models":ml,"llm.discoverModels":vl},Sl=3e4,Il="http://dsh.internal";var Ct=class{static{r(this,"AbstractApiClient")}timeoutMs;envelopeBatch=[];flushScheduled=!1;envelopeListeners=new Set;constructor(e=Sl){this.timeoutMs=e}subscribeEnvelopes(e){return this.envelopeListeners.add(e),()=>{this.envelopeListeners.delete(e)}}onEnvelope(e){this.envelopeListeners.size!==0&&(this.envelopeBatch.push(e),!this.flushScheduled&&(this.flushScheduled=!0,queueMicrotask(()=>{this.flushScheduled=!1;const t=this.envelopeBatch;this.envelopeBatch=[];for(const n of this.envelopeListeners)try{n(t)}catch(s){console.error("[apiproxy] envelope listener threw:",s)}})))}resolveBase(){const e=globalThis.location;return e?.origin!==void 0&&e.origin!=="null"?e.origin:Il}mintRpcId(){return crypto.randomUUID()}async postJson(e,t,n,s="default"){const o=s==="default"?n===void 0?AbortSignal.timeout(this.timeoutMs):AbortSignal.any([AbortSignal.timeout(this.timeoutMs),n]):n,a=await this.doFetch(new URL(e,this.resolveBase()),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t),...o===void 0?{}:{signal:o}});if(!a.ok)throw new Error(`transport failure for ${e}: HTTP ${a.status}`);return a}async callUnary(e,t,n,s="default"){const o={type:"client-request",rpcId:this.mintRpcId(),method:e,payload:t};this.onEnvelope(o);const a=await this.postJson(`/api/${e}`,o,n,s),i=Rt.parse(await a.json());if(this.onEnvelope(i),i.rpcId!==o.rpcId)throw new Error(`rpcId mismatch for ${e}: sent ${o.rpcId}, got ${i.rpcId}`);if(!i.result.ok)return{rpcId:i.rpcId,result:i.result};const u=_l[e].parse(i.result.value);return{rpcId:i.rpcId,result:{ok:!0,value:u}}}openMux(e,t,n){return this.readSse("/api/events.mux",t,Is,n)}openHost(e,t,n){return this.readSse("/api/events.host",t,xs,n)}async*readSse(e,t,n,s){const o=await this.doFetch(new URL(e,this.resolveBase()),{signal:t});if(!o.ok||o.body===null)throw new Error(`transport failure for ${e}: HTTP ${o.status}`);s?.();const a=o.body.getReader(),i=new TextDecoder;let u="";try{for(;;){const{done:f,value:m}=await a.read();if(f)return;u+=i.decode(m,{stream:!0});let k;for(;(k=u.indexOf(`
65
65
 
66
66
  `))!==-1;){const _=u.slice(0,k);u=u.slice(k+2);const b=_.split(`
67
67
  `).filter(D=>D.startsWith("data: ")).map(D=>D.slice(6)).join("");if(b==="")continue;let S,E;try{S=Zt.parse(JSON.parse(b)),E=n.parse(S.payload)}catch(D){console.error(`[apiproxy] dropping malformed SSE frame on ${e}:`,D);continue}this.onEnvelope(S),yield{rpcId:S.rpcId,payload:E}}}}finally{await a.cancel().catch(()=>{})}}sessions={list:r((e,t)=>this.callUnary("session.list",e,t),"list"),search:r((e,t)=>this.callUnary("session.search",e,t),"search"),create:r((e,t)=>this.callUnary("session.create",e,t),"create"),history:r((e,t)=>this.callUnary("session.history",e,t),"history"),models:r((e,t)=>this.callUnary("session.models",e,t),"models"),selectModel:r((e,t)=>this.callUnary("session.selectModel",e,t),"selectModel"),rename:r((e,t)=>this.callUnary("session.rename",e,t),"rename"),fork:r((e,t)=>this.callUnary("session.fork",e,t),"fork"),prompt:r((e,t)=>this.callUnary("session.prompt",e,t),"prompt"),attachment:r((e,t)=>this.callUnary("session.attachment",e,t),"attachment"),updateQueue:r((e,t)=>this.callUnary("session.updateQueue",e,t),"updateQueue"),cancel:r((e,t)=>this.callUnary("session.cancel",e,t),"cancel")};subagents={list:r((e,t)=>this.callUnary("subagent.list",e,t),"list"),history:r((e,t)=>this.callUnary("subagent.history",e,t),"history"),prompt:r((e,t)=>this.callUnary("subagent.prompt",e,t),"prompt"),interrupt:r((e,t)=>this.callUnary("subagent.interrupt",e,t),"interrupt")};host={describe:r((e,t)=>this.callUnary("host.describe",e,t),"describe"),pickDirectory:r((e,t)=>this.callUnary("host.pickDirectory",e,t,"caller-signal-only"),"pickDirectory"),listDirectory:r((e,t)=>this.callUnary("host.listDirectory",e,t),"listDirectory"),createDirectory:r((e,t)=>this.callUnary("host.createDirectory",e,t),"createDirectory"),openPath:r((e,t)=>this.callUnary("host.openPath",e,t),"openPath")};workspace={list:r((e,t)=>this.callUnary("workspace.list",e,t),"list"),create:r((e,t)=>this.callUnary("workspace.create",e,t),"create"),rename:r((e,t)=>this.callUnary("workspace.rename",e,t),"rename"),delete:r((e,t)=>this.callUnary("workspace.delete",e,t),"delete"),insertBefore:r((e,t)=>this.callUnary("workspace.insertBefore",e,t),"insertBefore"),insertSessionBefore:r((e,t)=>this.callUnary("workspace.insertSessionBefore",e,t),"insertSessionBefore"),archiveSession:r((e,t)=>this.callUnary("workspace.archiveSession",e,t),"archiveSession")};skills={list:r((e,t)=>this.callUnary("skill.list",e,t),"list")};agentPresets={list:r((e,t)=>this.callUnary("agentPreset.list",e,t),"list"),select:r((e,t)=>this.callUnary("agentPreset.select",e,t),"select"),read:r((e,t)=>this.callUnary("agentPreset.read",e,t),"read"),copy:r((e,t)=>this.callUnary("agentPreset.copy",e,t),"copy"),openDocument:r((e,t)=>this.callUnary("agentPreset.openDocument",e,t),"openDocument"),remove:r((e,t)=>this.callUnary("agentPreset.remove",e,t),"remove")};goals={create:r((e,t)=>this.callUnary("goal.create",e,t),"create"),edit:r((e,t)=>this.callUnary("goal.edit",e,t),"edit"),pause:r((e,t)=>this.callUnary("goal.pause",e,t),"pause"),resume:r((e,t)=>this.callUnary("goal.resume",e,t),"resume"),complete:r((e,t)=>this.callUnary("goal.complete",e,t),"complete"),clear:r((e,t)=>this.callUnary("goal.clear",e,t),"clear")};settings={describe:r((e,t)=>this.callUnary("settings.describe",e,t),"describe"),openDocument:r((e,t)=>this.callUnary("settings.openDocument",e,t),"openDocument"),update:r((e,t)=>this.callUnary("settings.update",e,t),"update"),replace:r((e,t)=>this.callUnary("settings.replace",e,t),"replace"),mutate:r((e,t)=>this.callUnary("settings.mutate",e,t),"mutate")};credentials={describe:r((e,t)=>this.callUnary("credentials.describe",e,t),"describe"),set:r((e,t)=>this.callUnary("credentials.set",e,t),"set"),unset:r((e,t)=>this.callUnary("credentials.unset",e,t),"unset")};llm={providers:r((e,t)=>this.callUnary("llm.providers",e,t),"providers"),models:r((e,t)=>this.callUnary("llm.models",e,t),"models"),discoverModels:r((e,t)=>this.callUnary("llm.discoverModels",e,t),"discoverModels")};events={mux:r((e,t,n)=>this.openMux(e,t,n),"mux"),host:r((e,t,n)=>this.openHost(e,t,n),"host")};async respond(e,t){this.onEnvelope(e);const n=await this.postJson("/api/respond",e,t);return iu.parse(await n.json())}};function Ut(){const e=globalThis.crypto.getRandomValues(new Uint8Array(16)),t=new DataView(e.buffer,e.byteOffset,e.byteLength);t.setUint8(6,t.getUint8(6)&15|64),t.setUint8(8,t.getUint8(8)&63|128);const n=Array.from(e,s=>s.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}r(Ut,"randomUuid");function Lt(e){return{rpcId:Ut(),payload:e}}r(Lt,"rpcRequest");function Y(e){return[{type:"text",text:e}]}r(Y,"text");function ie(e,t={kind:"user"}){return cn({content:e,source:t})}r(ie,"userMessage");function me(e,t="fx-1"){return oo({content:e,source:{provider:"fixture",model:t}})}r(me,"assistantMessage");function Ft(e,t,n){return ro({callId:e,content:t,isError:n})}r(Ft,"toolResultMessage");const Es=["# Markdown fixture","","Assistant output renders **strong text**, *emphasis*, and `inline code`.","","- first item"," - nested item","","| Area | State |","| --- | --- |","| history | rendered |","| streaming | stable |","","[DeepSeek](https://www.deepseek.com)","","```ts","const markdown = true","```"].join(`
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-client-connection","version":"0.0.15","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":[],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"ws":"^8.21.0","@deepseek-ai/dsh-attachment":"^0.0.15","@deepseek-ai/dsh-host-apiproxy":"^0.0.15","@deepseek-ai/dsh-llm":"^0.0.15","@deepseek-ai/dsh-session":"^0.0.15","@deepseek-ai/dsh-commands":"^0.0.15","@deepseek-ai/dsh-tools":"^0.0.15","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.15","@deepseek-ai/dsh-host-webserver":"^0.0.15","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-client-connection","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":[],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"ws":"^8.21.0","@deepseek-ai/dsh-attachment":"^0.1.0-rc.7","@deepseek-ai/dsh-host-apiproxy":"^0.1.0-rc.7","@deepseek-ai/dsh-commands":"^0.1.0-rc.7","@deepseek-ai/dsh-llm":"^0.1.0-rc.7","@deepseek-ai/dsh-session":"^0.1.0-rc.7","@deepseek-ai/dsh-tools":"^0.1.0-rc.7","@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-host-webserver":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-client-hmr","version":"0.0.15","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":[],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-client-modules":"^0.0.15","@deepseek-ai/dsh-host-webserver":"^0.0.15","@deepseek-ai/dsh-invariants":"^0.0.15","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-client-hmr","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":[],"platform":"web","immediately":true}},"license":"MIT","dependencies":{"@deepseek-ai/schemastery":"^3.18.1"},"peerDependencies":{"@deepseek-ai/cordis-plugin-loader":"^1.0.2","@deepseek-ai/dsh-client-modules":"^0.1.0-rc.7","@deepseek-ai/dsh-host-webserver":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- var _e=Object.defineProperty;var l=(S,k)=>_e(S,"name",{value:k,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-client-locale",factory:l(S=>{var k={exports:{}},w=k.exports;Object.defineProperty(w,Symbol.toStringTag,{value:"Module"});let _=S("react/jsx-runtime"),W=S("react"),R=S("@deepseek-ai/dsh-client-ui-primitives"),Y=S("@deepseek-ai/dsh-client-runtime/client");function y(e){return e==null}l(y,"isNullable");function N(e){return e&&typeof e=="object"&&!Array.isArray(e)}l(N,"isPlainObject");function Q(e,t){return Object.fromEntries(Object.entries(e).filter(([r,n])=>t(r,n)))}l(Q,"filterKeys");function b(e,t){return Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t(n,r)]))}l(b,"mapValues");function X(e,t,r){if(!t)return{...e};const n={};for(const i of t)(r||e[i]!==void 0)&&(n[i]=e[i]);return n}l(X,"pick");function x(e,t){return arguments.length===1?r=>x(e,r):e in globalThis&&t instanceof globalThis[e]||Object.prototype.toString.call(t).slice(8,-1)===e}l(x,"is");function A(e){return x("ArrayBuffer",e)||x("SharedArrayBuffer",e)}l(A,"isArrayBufferLike");function Z(e){return A(e)||ArrayBuffer.isView(e)}l(Z,"isArrayBufferSource");let g;(function(e){e.is=A,e.isSource=Z;function t(o){return ArrayBuffer.isView(o)?o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength):o}l(t,"fromSource"),e.fromSource=t;function r(o){if(o=t(o),typeof Buffer<"u")return Buffer.from(o).toString("base64");let f="";const h=new Uint8Array(o);for(let m=0;m<h.byteLength;m++)f+=String.fromCharCode(h[m]);return btoa(f)}l(r,"toBase64"),e.toBase64=r;function n(o){return typeof Buffer<"u"?t(Buffer.from(o,"base64")):Uint8Array.from(atob(o),f=>f.charCodeAt(0))}l(n,"fromBase64"),e.fromBase64=n;function i(o){return o=t(o),typeof Buffer<"u"?Buffer.from(o).toString("hex"):Array.from(new Uint8Array(o),f=>f.toString(16).padStart(2,"0")).join("")}l(i,"toHex"),e.toHex=i;function s(o){if(typeof Buffer<"u")return t(Buffer.from(o,"hex"));const f=o.length%2===0?o:o.slice(0,o.length-1),h=[];for(let m=0;m<f.length;m+=2)h.push(parseInt(`${f[m]}${f[m+1]}`,16));return Uint8Array.from(h).buffer}l(s,"fromHex"),e.fromHex=s})(g||(g={})),g.fromBase64,g.toBase64,g.fromHex,g.toHex;function D(e,t=new Map){if(!e||typeof e!="object")return e;if(x("Date",e))return new Date(e.valueOf());if(x("RegExp",e))return new RegExp(e.source,e.flags);if(A(e))return e.slice(0);if(ArrayBuffer.isView(e))return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);const r=t.get(e);if(r)return r;if(Array.isArray(e)){const i=[];return t.set(e,i),e.forEach((s,o)=>{i[o]=Reflect.apply(D,null,[s,t])}),i}const n=Object.create(Object.getPrototypeOf(e));t.set(e,n);for(const i of Reflect.ownKeys(e)){const s={...Reflect.getOwnPropertyDescriptor(e,i)};"value"in s&&(s.value=Reflect.apply(D,null,[s.value,t])),Reflect.defineProperty(n,i,s)}return n}l(D,"clone");function $(e,t,r){if(e===t||!r&&y(e)&&y(t))return!0;if(typeof e!=typeof t||typeof e!="object"||!e||!t)return!1;function n(i,s){return i(e)?i(t)?s(e,t):!1:i(t)?!1:void 0}return l(n,"check"),n(Array.isArray,(i,s)=>i.length===s.length&&i.every((o,f)=>$(o,s[f])))??n(x("Date"),(i,s)=>i.valueOf()===s.valueOf())??n(x("RegExp"),(i,s)=>i.source===s.source&&i.flags===s.flags)??n(A,(i,s)=>{if(i.byteLength!==s.byteLength)return!1;const o=new Uint8Array(i),f=new Uint8Array(s);for(let h=0;h<o.length;h++)if(o[h]!==f[h])return!1;return!0})??Object.keys({...e,...t}).every(i=>$(e[i],t[i],r))}l($,"deepEqual");let T;(function(e){e.millisecond=1;const t=e.second=1e3,r=e.minute=t*60,n=e.hour=r*60,i=e.day=n*24,s=e.week=i*7;let o=new Date().getTimezoneOffset();function f(a){o=a}l(f,"setTimezoneOffset"),e.setTimezoneOffset=f;function h(){return o}l(h,"getTimezoneOffset"),e.getTimezoneOffset=h;function m(a=new Date,u){return typeof a=="number"&&(a=new Date(a)),u===void 0&&(u=o),Math.floor((a.valueOf()/r-u)/1440)}l(m,"getDateNumber"),e.getDateNumber=m;function ge(a,u){const Se=new Date(a*i);return u===void 0&&(u=o),new Date(+Se+u*r)}l(ge,"fromDateNumber"),e.fromDateNumber=ge;const me=/\d+(?:\.\d+)?/.source,be=new RegExp(`^${["w(?:eek(?:s)?)?","d(?:ay(?:s)?)?","h(?:our(?:s)?)?","m(?:in(?:ute)?(?:s)?)?","s(?:ec(?:ond)?(?:s)?)?"].map(a=>`(${me}${a})?`).join("")}$`);function G(a){const u=be.exec(a);return u?(parseFloat(u[1])*s||0)+(parseFloat(u[2])*i||0)+(parseFloat(u[3])*n||0)+(parseFloat(u[4])*r||0)+(parseFloat(u[5])*t||0):0}l(G,"parseTime"),e.parseTime=G;function we(a){const u=G(a);return u?a=Date.now()+u:/^\d{1,2}(:\d{1,2}){1,2}$/.test(a)?a=`${new Date().toLocaleDateString()}-${a}`:/^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(a)&&(a=`${new Date().getFullYear()}-${a}`),a?new Date(a):new Date}l(we,"parseDate"),e.parseDate=we;function xe(a){const u=Math.abs(a);return u>=i-n/2?Math.round(a/i)+"d":u>=n-r/2?Math.round(a/n)+"h":u>=r-t/2?Math.round(a/r)+"m":u>=t?Math.round(a/t)+"s":a+"ms"}l(xe,"format"),e.format=xe;function v(a,u=2){return a.toString().padStart(u,"0")}l(v,"toDigits"),e.toDigits=v;function ve(a,u=new Date){return a.replace("yyyy",u.getFullYear().toString()).replace("yy",u.getFullYear().toString().slice(2)).replace("MM",v(u.getMonth()+1)).replace("dd",v(u.getDate())).replace("hh",v(u.getHours())).replace("mm",v(u.getMinutes())).replace("ss",v(u.getSeconds())).replace("SSS",v(u.getMilliseconds(),3))}l(ve,"template"),e.template=ve})(T||(T={}));const E=Symbol.for("schemastery"),U=Symbol.for("ValidationError");globalThis.__schemastery_index__??=0,globalThis.__schemastery_refs__=void 0;var p=class extends TypeError{static{l(this,"ValidationError")}options;name="ValidationError";constructor(e,t){let r="$";for(const n of t.path||[])typeof n=="string"?r+="."+n:typeof n=="number"?r+="["+n+"]":typeof n=="symbol"&&(r+=`[Symbol(${n.toString()})]`);r.startsWith(".")&&(r=r.slice(1)),super((r==="$"?"":`${r} `)+e),this.options=t}static is(e){return!!e?.[U]}};Object.defineProperty(p.prototype,U,{value:!0});const c=l(function(e){const t=l(function(r,n={}){return c.resolve(r,t,n)[0]},"schema");if(e.refs){const r=b(e.refs,i=>new c(i)),n=l(i=>r[i],"getRef");for(const i in r){const s=r[i];s.sKey=n(s.sKey),s.inner=n(s.inner),s.list=s.list&&s.list.map(n),s.dict=s.dict&&b(s.dict,n)}return r[e.uid]}if(Object.assign(t,e),typeof t.callback=="string")try{t.callback=new Function("return "+t.callback)()}catch{}return Object.defineProperty(t,"uid",{value:globalThis.__schemastery_index__++}),Object.setPrototypeOf(t,c.prototype),t.meta||={},t.toString=t.toString.bind(t),t},"Schema");c.prototype=Object.create(Function.prototype),c.prototype[E]=!0,Object.defineProperty(c.prototype,"~standard",{get(){return{version:1,vendor:"schemastery",validate:l(e=>{try{return{value:c.resolve(e,this,{})[0]}}catch(t){if(p.is(t))return{issues:[{message:t.message,path:t.options.path}]};throw t}},"validate")}}}),c.ValidationError=p,c.prototype.toJSON=l(function(){if(globalThis.__schemastery_refs__)return globalThis.__schemastery_refs__[this.uid]??=JSON.parse(JSON.stringify({...this})),this.uid;globalThis.__schemastery_refs__={[this.uid]:{...this}},globalThis.__schemastery_refs__[this.uid]=JSON.parse(JSON.stringify({...this}));const t={uid:this.uid,refs:globalThis.__schemastery_refs__};return globalThis.__schemastery_refs__=void 0,t},"toJSON"),c.prototype.set=l(function(t,r){return this.dict[t]=r,this},"set"),c.prototype.push=l(function(t){return this.list.push(t),this},"push");function ee(e,t){const r=typeof e=="string"?{"":e}:{...e};for(const n in t){const i=t[n];i?.$description||i?.$desc?r[n]=i.$description||i.$desc:typeof i=="string"&&(r[n]=i)}return r}l(ee,"mergeDesc");function O(e){return e?.$value??e?.$inner}l(O,"getInner");function F(e){return Q(e??{},t=>!t.startsWith("$"))}l(F,"extractKeys"),c.prototype.i18n=l(function(t){const r=c(this),n=ee(r.meta.description,t);return Object.keys(n).length&&(r.meta.description=n),r.dict&&(r.dict=b(r.dict,(i,s)=>i.i18n(b(t,o=>O(o)?.[s]??o?.[s])))),r.list&&(r.list=r.list.map((i,s)=>i.i18n(b(t,(o={})=>Array.isArray(O(o))?O(o)[s]:Array.isArray(o)?o[s]:F(o))))),r.inner&&(r.inner=r.inner.i18n(b(t,i=>O(i)?O(i):F(i)))),r.sKey&&(r.sKey=r.sKey.i18n(b(t,i=>i?.$key))),r},"i18n"),c.prototype.extra=l(function(t,r){const n=c(this);return n.meta={...n.meta,[t]:r},n},"extra");for(const e of["required","disabled","collapse","hidden","loose"])Object.assign(c.prototype,{[e](t=!0){const r=c(this);return r.meta={...r.meta,[e]:t},r}});c.prototype.deprecated=l(function(){const t=c(this);return t.meta.badges||=[],t.meta.badges.push({text:"deprecated",type:"danger"}),t},"deprecated"),c.prototype.experimental=l(function(){const t=c(this);return t.meta.badges||=[],t.meta.badges.push({text:"experimental",type:"warning"}),t},"experimental"),c.prototype.pattern=l(function(t){const r=c(this),n=X(t,["source","flags"]);return r.meta={...r.meta,pattern:n},r},"pattern"),c.prototype.simplify=l(function(t){if($(t,this.meta.default,this.type==="dict"))return null;if(y(t))return t;if(this.type==="object"||this.type==="dict"){const r={};for(const n in t){const i=(this.type==="object"?this.dict[n]:this.inner)?.simplify(t[n]);(this.type==="dict"||!y(i))&&(r[n]=i)}return $(r,this.meta.default,this.type==="dict")?null:r}else if(this.type==="array"||this.type==="tuple"){const r=[];return t.forEach((n,i)=>{const s=this.type==="array"?this.inner:this.list[i],o=s?s.simplify(n):n;r.push(o)}),r}else if(this.type==="intersect"){const r={};for(const n of this.list)Object.assign(r,n.simplify(t));return r}else if(this.type==="union")for(const r of this.list)try{return c.resolve(t,r,{}),r.simplify(t)}catch{}return t},"simplify"),c.prototype.toString=l(function(t){return K[this.type]?.(this,t)??`Schema<${this.type}>`},"toString"),c.prototype.role=l(function(e,t){const r=c(this);return r.meta={...r.meta,role:e,extra:t},r},"role");for(const e of["default","link","comment","description","max","min","step"])Object.assign(c.prototype,{[e](t){const r=c(this);return r.meta={...r.meta,[e]:t},r}});const J={};c.extend=l(function(t,r){J[t]=r},"extend"),c.resolve=l(function(t,r,n={},i=!1){if(!r)return[t];if(n.ignore?.(t,r))return[t];if(y(t)&&r.type!=="lazy"){if(r.meta.required)throw new p("missing required value",n);let o=r,f=r.meta.default;for(;o?.type==="intersect"&&y(f);)o=o.list[0],f=o?.meta.default;if(y(f))return[t];t=D(f)}const s=J[r.type];if(!s)throw new p(`unsupported type "${r.type}"`,n);try{return s(t,r,n,i)}catch(o){if(!r.meta.loose)throw o;return[r.meta.default]}},"resolve"),c.from=l(function(t){if(y(t))return c.any();if(["string","number","boolean"].includes(typeof t))return c.const(t).required();if(t[E])return t;if(typeof t=="function")switch(t){case String:return c.string().required();case Number:return c.number().required();case Boolean:return c.boolean().required();case Function:return c.function().required();default:return c.is(t).required()}else throw new TypeError(`cannot infer schema from ${t}`)},"from"),c.lazy=l(function(t){const r=l(()=>(n.inner[E]||(n.inner=n.builder(),n.inner.meta={...n.meta,...n.inner.meta}),n.inner.toJSON()),"toJSON"),n=new c({type:"lazy",builder:t,inner:{toJSON:r}});return n},"lazy"),c.natural=l(function(){return c.number().step(1).min(0)},"natural"),c.percent=l(function(){return c.number().step(.01).min(0).max(1).role("slider")},"percent"),c.date=l(function(){return c.union([c.is(Date),c.transform(c.string().role("datetime"),(t,r)=>{const n=new Date(t);if(isNaN(+n))throw new p(`invalid date "${t}"`,r);return n},!0)])},"date"),c.regExp=l(function(t=""){return c.union([c.is(RegExp),c.transform(c.string().role("regexp",{flag:t}),(r,n)=>{try{return new RegExp(r,t)}catch(i){throw new p(i.message,n)}},!0)])},"regExp"),c.arrayBuffer=l(function(t){return c.union([c.is(ArrayBuffer),c.is(SharedArrayBuffer),c.transform(c.any(),(r,n)=>{if(g.isSource(r))return g.fromSource(r);throw new p(`expected ArrayBufferSource but got ${r}`,n)},!0),...t?[c.transform(c.string(),(r,n)=>{try{return t==="base64"?g.fromBase64(r):g.fromHex(r)}catch(i){throw new p(i.message,n)}},!0)]:[]])},"arrayBuffer"),c.extend("lazy",(e,t,r,n)=>(t.inner[E]||(t.inner=t.builder(),t.inner.meta={...t.meta,...t.inner.meta}),c.resolve(e,t.inner,r,n))),c.extend("any",e=>[e]),c.extend("never",(e,t,r)=>{throw new p(`expected nullable but got ${e}`,r)}),c.extend("const",(e,{value:t},r)=>{if($(e,t))return[t];throw new p(`expected ${t} but got ${e}`,r)});function M(e,t,r,n,i=!1){const{max:s=1/0,min:o=-1/0}=t;if(e>s)throw new p(`expected ${r} <= ${s} but got ${e}`,n);if(e<o&&!i)throw new p(`expected ${r} >= ${o} but got ${e}`,n)}l(M,"checkWithinRange"),c.extend("string",(e,{meta:t},r)=>{if(typeof e!="string")throw new p(`expected string but got ${e}`,r);if(t.pattern){const n=new RegExp(t.pattern.source,t.pattern.flags);if(!n.test(e))throw new p(`expect string to match regexp ${n}`,r)}return M(e.length,t,"string length",r),[e]});function B(e,t){const r=e.toString();if(r.includes("e"))return e*Math.pow(10,t);const n=r.indexOf(".");if(n===-1)return e*Math.pow(10,t);const i=r.slice(n+1),s=r.slice(0,n);return i.length<=t?+(s+i.padEnd(t,"0")):+(s+i.slice(0,t)+"."+i.slice(t))}l(B,"decimalShift");function te(e,t,r){if(r=Math.abs(r),!/^\d+\.\d+$/.test(r.toString()))return(e-t)%r===0;const n=r.toString().indexOf("."),i=r.toString().slice(n+1).length;return Math.abs(B(e,i)-B(t,i))%B(r,i)===0}l(te,"isMultipleOf"),c.extend("number",(e,{meta:t},r)=>{if(typeof e!="number")throw new p(`expected number but got ${e}`,r);M(e,t,"number",r);const{step:n}=t;if(n&&!te(e,t.min??0,n))throw new p(`expected number multiple of ${n} but got ${e}`,r);return[e]}),c.extend("boolean",(e,t,r)=>{if(typeof e=="boolean")return[e];throw new p(`expected boolean but got ${e}`,r)}),c.extend("bitset",(e,{bits:t,meta:r},n)=>{let i=0,s=[];if(typeof e=="number"){i=e;for(const o in t)e&t[o]&&s.push(o)}else if(Array.isArray(e)){s=e;for(const o of s){if(typeof o!="string")throw new p(`expected string but got ${o}`,n);o in t&&(i|=t[o])}}else throw new p(`expected number or array but got ${e}`,n);return i===r.default?[i]:[i,s]}),c.extend("function",(e,t,r)=>{if(typeof e=="function")return[e];throw new p(`expected function but got ${e}`,r)}),c.extend("is",(e,{constructor:t},r)=>{if(typeof t=="function"){if(e instanceof t)return[e];throw new p(`expected ${t.name} but got ${e}`,r)}else{if(y(e))throw new p(`expected ${t} but got ${e}`,r);let n=Object.getPrototypeOf(e);for(;n;){if(n.constructor?.name===t)return[e];n=Object.getPrototypeOf(n)}throw new p(`expected ${t} but got ${e}`,r)}});function L(e,t,r,n){try{const[i,s]=c.resolve(e[t],r,{...n,path:[...n.path||[],t]});return s!==void 0&&(e[t]=s),i}catch(i){if(!n?.autofix)throw i;return delete e[t],r.meta.default}}l(L,"property"),c.extend("array",(e,{inner:t,meta:r},n)=>{if(!Array.isArray(e))throw new p(`expected array but got ${e}`,n);return M(e.length,r,"array length",n,!y(t.meta.default)),[e.map((i,s)=>L(e,s,t,n))]}),c.extend("dict",(e,{inner:t,sKey:r},n,i)=>{if(!N(e))throw new p(`expected object but got ${e}`,n);const s={};for(const o in e){let f;try{f=c.resolve(o,r,n)[0]}catch(h){if(i)continue;throw h}s[f]=L(e,o,t,n),e[f]=e[o],o!==f&&delete e[o]}return[s]}),c.extend("tuple",(e,{list:t},r,n)=>{if(!Array.isArray(e))throw new p(`expected array but got ${e}`,r);const i=t.map((s,o)=>L(e,o,s,r));return n?[i]:(i.push(...e.slice(t.length)),[i])});function C(e,t){for(const r in t)r in e||(e[r]=t[r])}l(C,"merge"),c.extend("object",(e,{dict:t},r,n)=>{if(!N(e))throw new p(`expected object but got ${e}`,r);const i={};for(const s in t){const o=L(e,s,t[s],r);(!y(o)||s in e)&&(i[s]=o)}return n||C(i,e),[i]}),c.extend("union",(e,{list:t,toString:r},n,i)=>{const s=[];for(const o of t)try{return c.resolve(e,o,n,i)}catch(f){s.push(f)}throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n)}),c.extend("intersect",(e,{list:t,toString:r},n,i)=>{if(!t.length)return[e];let s;for(const o of t){const f=c.resolve(e,o,n,!0)[0];if(!y(f))if(y(s))s=f;else{if(typeof s!=typeof f)throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n);if(typeof f=="object")C(s??={},f);else if(s!==f)throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n)}}return!i&&N(e)&&C(s,e),[s]}),c.extend("transform",(e,{inner:t,callback:r,preserve:n},i)=>{const[s,o=e]=c.resolve(e,t,i,!0);return n?[r(s)]:[r(s),r(o)]});const K={};function d(e,t,r){K[e]=r,Object.assign(c,{[e](...n){const i=new c({type:e});return t.forEach((s,o)=>{switch(s){case"sKey":i.sKey=n[o]??c.string();break;case"inner":i.inner=c.from(n[o]);break;case"list":i.list=n[o].map(c.from);break;case"dict":i.dict=b(n[o],c.from);break;case"bits":i.bits={};for(const f in n[o])typeof n[o][f]=="number"&&(i.bits[f]=n[o][f]);break;case"callback":{const f=i.callback=n[o];f.toJSON||=()=>f.toString();break}case"constructor":{const f=i.constructor=n[o];typeof f=="function"&&(f.toJSON||=()=>f.name);break}default:i[s]=n[o]}}),e==="object"||e==="dict"?i.meta.default={}:e==="array"||e==="tuple"?i.meta.default=[]:e==="bitset"&&(i.meta.default=0),i}})}l(d,"defineMethod"),d("is",["constructor"],({constructor:e})=>typeof e=="function"?e.name:e),d("any",[],()=>"any"),d("never",[],()=>"never"),d("const",["value"],({value:e})=>typeof e=="string"?JSON.stringify(e):e),d("string",[],()=>"string"),d("number",[],()=>"number"),d("boolean",[],()=>"boolean"),d("bitset",["bits"],()=>"bitset"),d("function",[],()=>"function"),d("array",["inner"],({inner:e})=>`${e.toString(!0)}[]`),d("dict",["inner","sKey"],({inner:e,sKey:t})=>`{ [key: ${t.toString()}]: ${e.toString()} }`),d("tuple",["list"],({list:e})=>`[${e.map(t=>t.toString()).join(", ")}]`),d("object",["dict"],({dict:e})=>Object.keys(e).length===0?"{}":`{ ${Object.entries(e).map(([t,r])=>`${t}${r.meta.required?"":"?"}: ${r.toString()}`).join(", ")} }`),d("union",["list"],({list:e},t)=>{const r=e.map(({toString:n})=>n()).join(" | ");return t?`(${r})`:r}),d("intersect",["list"],({list:e})=>`${e.map(t=>t.toString(!0)).join(" & ")}`),d("transform",["inner","callback","preserve"],({inner:e},t)=>e.toString(t));const re="locale",P="preference",ne=["zh","en"];c.object({[P]:c.union([...ne]).required(!1)});const ie={ok:"确定",cancel:"取消",close:"关闭",copy:"复制",copied:"复制成功",retry:"重试",loading:"加载中…","load.failed":"加载失败",submit:"提交",submitting:"正在提交…",next:"下一步",previous:"上一步",skip:"跳过",delete:"删除",edit:"编辑",save:"保存",search:"搜索",more:"更多",collapse:"收起",expand:"展开",back:"返回",unknown:"未知",none:"无",truncated:"已截断"},oe={ok:"OK",cancel:"Cancel",close:"Close",copy:"Copy",copied:"Copied",retry:"Retry",loading:"Loading…","load.failed":"Failed to load",submit:"Submit",submitting:"Submitting…",next:"Next",previous:"Previous",skip:"Skip",delete:"Delete",edit:"Edit",save:"Save",search:"Search",more:"More",collapse:"Collapse",expand:"Expand",back:"Back",unknown:"Unknown",none:"None",truncated:"Truncated"},se={"language.title":"语言"},ce={"language.title":"Language"},le=".j_Uvsa_row{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}.j_Uvsa_rowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}.j_Uvsa_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}.j_Uvsa_selector{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.j_Uvsa_selector:hover{background:var(--dsw-alias-interactive-bg-hover)}.j_Uvsa_chevron{flex:none}",I="@deepseek-ai/dsh-client-locale/LanguageRow.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(I)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-locale",e.dataset.pluginCss=I,e.textContent=le,document.head.appendChild(e)}var j={chevron:"j_Uvsa_chevron",row:"j_Uvsa_row",rowText:"j_Uvsa_rowText",title:"j_Uvsa_title",selector:"j_Uvsa_selector"};function fe({t:e,setLocale:t,useStore:r}){const n=r(h=>h.active),i=r(h=>h.options),[s,o]=(0,W.useState)(!1),f=i.find(h=>h.id===n)?.label??n;return(0,_.jsxs)("div",{className:j.row,children:[(0,_.jsx)("div",{className:j.rowText,children:(0,_.jsx)("div",{className:j.title,children:e("language.title")})}),(0,_.jsx)(R.Menu,{open:s,onClose:l(()=>{o(!1)},"onClose"),items:i.map(h=>({id:h.id,label:h.label})),selectedId:n,onSelect:l(h=>{t(h),o(!1)},"onSelect"),align:"end",portal:!0,anchor:(0,_.jsxs)("button",{type:"button",className:j.selector,"aria-haspopup":"menu","aria-expanded":s,onClick:l(()=>{o(h=>!h)},"onClick"),children:[f,(0,_.jsx)(R.IconChevronDownOutline14,{className:j.chevron})]})})]})}l(fe,"LanguageRow");function ae(){return(0,Y.defineStore)({init:l(()=>({active:"",options:[],revision:-1}),"init"),actions:{sync:l((e,t,r,n)=>{n<=e.revision||(e.active=t,e.options=r,e.revision=n)},"sync")}})}l(ae,"createLanguageRowStore");const ue="zh",q="common",z="settings.locale",V=Object.freeze([{id:"zh",label:"中文"},{id:"en",label:"English"}]);var H=class{static{l(this,"LocaleRuntime")}dicts=new Map;bound=new Map;snapshot;listeners=new Set;ctx;host;provisional;constructor(e,t){this.ctx=e,this.host=t,this.provisional=pe(),this.snapshot=Object.freeze({active:this.provisional,locales:V,revision:0}),t!==void 0&&(e.effect(()=>t.subscribe(()=>{this.adopt(t)}),"locale: settings scope adoption"),this.adopt(t))}getLocale(){return this.snapshot}getSnapshot(){return this.snapshot}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setLocale(e){const t=this.snapshot.locales.find(r=>r.id===e);if(t===void 0)throw new Error(`locale "${e}" is not registered`);this.snapshot.active!==t.id&&(this.publish(t.id,!0),this.host?.set(P,t.id))}adopt(e){const t=e.getSnapshot().value;if(t===void 0)return;const r=t.preference??this.provisional;this.snapshot.active!==r&&this.publish(r,!0)}register(e,t,r){const n=typeof t=="string"?[[t,r]]:Object.entries(t);let i=this.dicts.get(e);i||(i=new Map,this.dicts.set(e,i));for(const[s]of n)if(i.has(s))throw new Error(`locale namespace "${e}" already has locale "${s}"`);for(const[s,o]of n)i.set(s,o);return this.publish(this.snapshot.active,!1),()=>{const s=this.dicts.get(e);if(!s)return;let o=!1;for(const[f,h]of n)s.get(f)===h&&(s.delete(f),o=!0);o&&this.publish(this.snapshot.active,!1)}}bind(e){let t=this.bound.get(e);return t||(t=l((r,n)=>this.translate(e,r,n),"t"),this.bound.set(e,t),t)}translate(e,t,r){const n=this.lookup(e,t)??(e!=="common"?this.lookup("common",t):void 0)??t;return r?n.replace(/\{(\w+)\}/g,(i,s)=>s in r?String(r[s]):i):n}lookup(e,t){const r=this.dicts.get(e);return r?.get(this.snapshot.active)?.[t]??r?.get("zh")?.[t]}publish(e,t){this.snapshot=Object.freeze({active:e,locales:this.snapshot.locales,revision:this.snapshot.revision+1}),t&&this.ctx.emit("locale/change",this.snapshot);for(const r of[...this.listeners])try{r()}catch(n){console.error("locale subscriber crashed:",n)}}};function pe(){return he()??"zh"}l(pe,"resolveInitialLocale");function he(){if(!(typeof window>"u"))for(const e of[...navigator.languages??[],navigator.language]){const t=e.toLowerCase().split("-")[0],r=V.find(n=>n.id===t);if(r)return r.id}}l(he,"detectBrowserLocale");const de=["slots","connection","remote","settingsScope"];function ye(e){const t=new H(e,e.settingsScope.bind({namespace:re}));t.register(q,{zh:ie,en:oe}),t.register(z,{zh:se,en:ce}),e.provide("locale",t),e.slots.installLocale(t);const r=ae();let n;const i=l(o=>{n?.sync(o.active,o.locales.map(f=>({id:f.id,label:f.label})),o.revision)},"sync");e.on("locale/change",i);const s=l(o=>(n=o,i(t.getLocale()),{setLocale:l(f=>{t.setLocale(f)},"setLocale")}),"injected");e.slots.inject("settings.general.item",()=>e.slots.register({name:"settings.general.item",id:"language",order:0,store:r,locale:z,inject:s},fe))}return l(ye,"apply"),w.COMMON_NS=q,w.FALLBACK_LOCALE=ue,w.LocaleRuntime=H,w.SETTINGS_NS=z,w.apply=ye,w.inject=de,k.exports},"factory")});
1
+ var _e=Object.defineProperty;var l=(S,k)=>_e(S,"name",{value:k,configurable:!0});window.__ModuleLoader__.load({id:"@deepseek-ai/dsh-client-locale",factory:l(S=>{var k={exports:{}},w=k.exports;Object.defineProperty(w,Symbol.toStringTag,{value:"Module"});let _=S("react/jsx-runtime"),W=S("react"),R=S("@deepseek-ai/dsh-client-ui-primitives"),Y=S("@deepseek-ai/dsh-client-runtime/client");function y(e){return e==null}l(y,"isNullable");function N(e){return e&&typeof e=="object"&&!Array.isArray(e)}l(N,"isPlainObject");function Q(e,t){return Object.fromEntries(Object.entries(e).filter(([r,n])=>t(r,n)))}l(Q,"filterKeys");function b(e,t){return Object.fromEntries(Object.entries(e).map(([r,n])=>[r,t(n,r)]))}l(b,"mapValues");function X(e,t,r){if(!t)return{...e};const n={};for(const i of t)(r||e[i]!==void 0)&&(n[i]=e[i]);return n}l(X,"pick");function x(e,t){return arguments.length===1?r=>x(e,r):e in globalThis&&t instanceof globalThis[e]||Object.prototype.toString.call(t).slice(8,-1)===e}l(x,"is");function A(e){return x("ArrayBuffer",e)||x("SharedArrayBuffer",e)}l(A,"isArrayBufferLike");function Z(e){return A(e)||ArrayBuffer.isView(e)}l(Z,"isArrayBufferSource");let g;(function(e){e.is=A,e.isSource=Z;function t(o){return ArrayBuffer.isView(o)?o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength):o}l(t,"fromSource"),e.fromSource=t;function r(o){if(o=t(o),typeof Buffer<"u")return Buffer.from(o).toString("base64");let f="";const h=new Uint8Array(o);for(let m=0;m<h.byteLength;m++)f+=String.fromCharCode(h[m]);return btoa(f)}l(r,"toBase64"),e.toBase64=r;function n(o){return typeof Buffer<"u"?t(Buffer.from(o,"base64")):Uint8Array.from(atob(o),f=>f.charCodeAt(0))}l(n,"fromBase64"),e.fromBase64=n;function i(o){return o=t(o),typeof Buffer<"u"?Buffer.from(o).toString("hex"):Array.from(new Uint8Array(o),f=>f.toString(16).padStart(2,"0")).join("")}l(i,"toHex"),e.toHex=i;function s(o){if(typeof Buffer<"u")return t(Buffer.from(o,"hex"));const f=o.length%2===0?o:o.slice(0,o.length-1),h=[];for(let m=0;m<f.length;m+=2)h.push(parseInt(`${f[m]}${f[m+1]}`,16));return Uint8Array.from(h).buffer}l(s,"fromHex"),e.fromHex=s})(g||(g={})),g.fromBase64,g.toBase64,g.fromHex,g.toHex;function D(e,t=new Map){if(!e||typeof e!="object")return e;if(x("Date",e))return new Date(e.valueOf());if(x("RegExp",e))return new RegExp(e.source,e.flags);if(A(e))return e.slice(0);if(ArrayBuffer.isView(e))return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);const r=t.get(e);if(r)return r;if(Array.isArray(e)){const i=[];return t.set(e,i),e.forEach((s,o)=>{i[o]=Reflect.apply(D,null,[s,t])}),i}const n=Object.create(Object.getPrototypeOf(e));t.set(e,n);for(const i of Reflect.ownKeys(e)){const s={...Reflect.getOwnPropertyDescriptor(e,i)};"value"in s&&(s.value=Reflect.apply(D,null,[s.value,t])),Reflect.defineProperty(n,i,s)}return n}l(D,"clone");function $(e,t,r){if(e===t||!r&&y(e)&&y(t))return!0;if(typeof e!=typeof t||typeof e!="object"||!e||!t)return!1;function n(i,s){return i(e)?i(t)?s(e,t):!1:i(t)?!1:void 0}return l(n,"check"),n(Array.isArray,(i,s)=>i.length===s.length&&i.every((o,f)=>$(o,s[f])))??n(x("Date"),(i,s)=>i.valueOf()===s.valueOf())??n(x("RegExp"),(i,s)=>i.source===s.source&&i.flags===s.flags)??n(A,(i,s)=>{if(i.byteLength!==s.byteLength)return!1;const o=new Uint8Array(i),f=new Uint8Array(s);for(let h=0;h<o.length;h++)if(o[h]!==f[h])return!1;return!0})??Object.keys({...e,...t}).every(i=>$(e[i],t[i],r))}l($,"deepEqual");let T;(function(e){e.millisecond=1;const t=e.second=1e3,r=e.minute=t*60,n=e.hour=r*60,i=e.day=n*24,s=e.week=i*7;let o=new Date().getTimezoneOffset();function f(a){o=a}l(f,"setTimezoneOffset"),e.setTimezoneOffset=f;function h(){return o}l(h,"getTimezoneOffset"),e.getTimezoneOffset=h;function m(a=new Date,u){return typeof a=="number"&&(a=new Date(a)),u===void 0&&(u=o),Math.floor((a.valueOf()/r-u)/1440)}l(m,"getDateNumber"),e.getDateNumber=m;function ge(a,u){const Se=new Date(a*i);return u===void 0&&(u=o),new Date(+Se+u*r)}l(ge,"fromDateNumber"),e.fromDateNumber=ge;const me=/\d+(?:\.\d+)?/.source,be=new RegExp(`^${["w(?:eek(?:s)?)?","d(?:ay(?:s)?)?","h(?:our(?:s)?)?","m(?:in(?:ute)?(?:s)?)?","s(?:ec(?:ond)?(?:s)?)?"].map(a=>`(${me}${a})?`).join("")}$`);function G(a){const u=be.exec(a);return u?(parseFloat(u[1])*s||0)+(parseFloat(u[2])*i||0)+(parseFloat(u[3])*n||0)+(parseFloat(u[4])*r||0)+(parseFloat(u[5])*t||0):0}l(G,"parseTime"),e.parseTime=G;function we(a){const u=G(a);return u?a=Date.now()+u:/^\d{1,2}(:\d{1,2}){1,2}$/.test(a)?a=`${new Date().toLocaleDateString()}-${a}`:/^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(a)&&(a=`${new Date().getFullYear()}-${a}`),a?new Date(a):new Date}l(we,"parseDate"),e.parseDate=we;function xe(a){const u=Math.abs(a);return u>=i-n/2?Math.round(a/i)+"d":u>=n-r/2?Math.round(a/n)+"h":u>=r-t/2?Math.round(a/r)+"m":u>=t?Math.round(a/t)+"s":a+"ms"}l(xe,"format"),e.format=xe;function v(a,u=2){return a.toString().padStart(u,"0")}l(v,"toDigits"),e.toDigits=v;function ve(a,u=new Date){return a.replace("yyyy",u.getFullYear().toString()).replace("yy",u.getFullYear().toString().slice(2)).replace("MM",v(u.getMonth()+1)).replace("dd",v(u.getDate())).replace("hh",v(u.getHours())).replace("mm",v(u.getMinutes())).replace("ss",v(u.getSeconds())).replace("SSS",v(u.getMilliseconds(),3))}l(ve,"template"),e.template=ve})(T||(T={}));const E=Symbol.for("schemastery"),U=Symbol.for("ValidationError");globalThis.__schemastery_index__??=0,globalThis.__schemastery_refs__=void 0;var p=class extends TypeError{static{l(this,"ValidationError")}options;name="ValidationError";constructor(e,t){let r="$";for(const n of t.path||[])typeof n=="string"?r+="."+n:typeof n=="number"?r+="["+n+"]":typeof n=="symbol"&&(r+=`[Symbol(${n.toString()})]`);r.startsWith(".")&&(r=r.slice(1)),super((r==="$"?"":`${r} `)+e),this.options=t}static is(e){return!!e?.[U]}};Object.defineProperty(p.prototype,U,{value:!0});const c=l(function(e){const t=l(function(r,n={}){return c.resolve(r,t,n)[0]},"schema");if(e.refs){const r=b(e.refs,i=>new c(i)),n=l(i=>r[i],"getRef");for(const i in r){const s=r[i];s.sKey=n(s.sKey),s.inner=n(s.inner),s.list=s.list&&s.list.map(n),s.dict=s.dict&&b(s.dict,n)}return r[e.uid]}if(Object.assign(t,e),typeof t.callback=="string")try{t.callback=new Function("return "+t.callback)()}catch{}return Object.defineProperty(t,"uid",{value:globalThis.__schemastery_index__++}),Object.setPrototypeOf(t,c.prototype),t.meta||={},t.toString=t.toString.bind(t),t},"Schema");c.prototype=Object.create(Function.prototype),c.prototype[E]=!0,Object.defineProperty(c.prototype,"~standard",{get(){return{version:1,vendor:"schemastery",validate:l(e=>{try{return{value:c.resolve(e,this,{})[0]}}catch(t){if(p.is(t))return{issues:[{message:t.message,path:t.options.path}]};throw t}},"validate")}}}),c.ValidationError=p,c.prototype.toJSON=l(function(){if(globalThis.__schemastery_refs__)return globalThis.__schemastery_refs__[this.uid]??=JSON.parse(JSON.stringify({...this})),this.uid;globalThis.__schemastery_refs__={[this.uid]:{...this}},globalThis.__schemastery_refs__[this.uid]=JSON.parse(JSON.stringify({...this}));const t={uid:this.uid,refs:globalThis.__schemastery_refs__};return globalThis.__schemastery_refs__=void 0,t},"toJSON"),c.prototype.set=l(function(t,r){return this.dict[t]=r,this},"set"),c.prototype.push=l(function(t){return this.list.push(t),this},"push");function ee(e,t){const r=typeof e=="string"?{"":e}:{...e};for(const n in t){const i=t[n];i?.$description||i?.$desc?r[n]=i.$description||i.$desc:typeof i=="string"&&(r[n]=i)}return r}l(ee,"mergeDesc");function O(e){return e?.$value??e?.$inner}l(O,"getInner");function F(e){return Q(e??{},t=>!t.startsWith("$"))}l(F,"extractKeys"),c.prototype.i18n=l(function(t){const r=c(this),n=ee(r.meta.description,t);return Object.keys(n).length&&(r.meta.description=n),r.dict&&(r.dict=b(r.dict,(i,s)=>i.i18n(b(t,o=>O(o)?.[s]??o?.[s])))),r.list&&(r.list=r.list.map((i,s)=>i.i18n(b(t,(o={})=>Array.isArray(O(o))?O(o)[s]:Array.isArray(o)?o[s]:F(o))))),r.inner&&(r.inner=r.inner.i18n(b(t,i=>O(i)?O(i):F(i)))),r.sKey&&(r.sKey=r.sKey.i18n(b(t,i=>i?.$key))),r},"i18n"),c.prototype.extra=l(function(t,r){const n=c(this);return n.meta={...n.meta,[t]:r},n},"extra");for(const e of["required","disabled","collapse","hidden","loose"])Object.assign(c.prototype,{[e](t=!0){const r=c(this);return r.meta={...r.meta,[e]:t},r}});c.prototype.deprecated=l(function(){const t=c(this);return t.meta.badges||=[],t.meta.badges.push({text:"deprecated",type:"danger"}),t},"deprecated"),c.prototype.experimental=l(function(){const t=c(this);return t.meta.badges||=[],t.meta.badges.push({text:"experimental",type:"warning"}),t},"experimental"),c.prototype.pattern=l(function(t){const r=c(this),n=X(t,["source","flags"]);return r.meta={...r.meta,pattern:n},r},"pattern"),c.prototype.simplify=l(function(t){if($(t,this.meta.default,this.type==="dict"))return null;if(y(t))return t;if(this.type==="object"||this.type==="dict"){const r={};for(const n in t){const i=(this.type==="object"?this.dict[n]:this.inner)?.simplify(t[n]);(this.type==="dict"||!y(i))&&(r[n]=i)}return $(r,this.meta.default,this.type==="dict")?null:r}else if(this.type==="array"||this.type==="tuple"){const r=[];return t.forEach((n,i)=>{const s=this.type==="array"?this.inner:this.list[i],o=s?s.simplify(n):n;r.push(o)}),r}else if(this.type==="intersect"){const r={};for(const n of this.list)Object.assign(r,n.simplify(t));return r}else if(this.type==="union")for(const r of this.list)try{return c.resolve(t,r,{}),r.simplify(t)}catch{}return t},"simplify"),c.prototype.toString=l(function(t){return K[this.type]?.(this,t)??`Schema<${this.type}>`},"toString"),c.prototype.role=l(function(e,t){const r=c(this);return r.meta={...r.meta,role:e,extra:t},r},"role");for(const e of["default","link","comment","description","max","min","step"])Object.assign(c.prototype,{[e](t){const r=c(this);return r.meta={...r.meta,[e]:t},r}});const J={};c.extend=l(function(t,r){J[t]=r},"extend"),c.resolve=l(function(t,r,n={},i=!1){if(!r)return[t];if(n.ignore?.(t,r))return[t];if(y(t)&&r.type!=="lazy"){if(r.meta.required)throw new p("missing required value",n);let o=r,f=r.meta.default;for(;o?.type==="intersect"&&y(f);)o=o.list[0],f=o?.meta.default;if(y(f))return[t];t=D(f)}const s=J[r.type];if(!s)throw new p(`unsupported type "${r.type}"`,n);try{return s(t,r,n,i)}catch(o){if(!r.meta.loose)throw o;return[r.meta.default]}},"resolve"),c.from=l(function(t){if(y(t))return c.any();if(["string","number","boolean"].includes(typeof t))return c.const(t).required();if(t[E])return t;if(typeof t=="function")switch(t){case String:return c.string().required();case Number:return c.number().required();case Boolean:return c.boolean().required();case Function:return c.function().required();default:return c.is(t).required()}else throw new TypeError(`cannot infer schema from ${t}`)},"from"),c.lazy=l(function(t){const r=l(()=>(n.inner[E]||(n.inner=n.builder(),n.inner.meta={...n.meta,...n.inner.meta}),n.inner.toJSON()),"toJSON"),n=new c({type:"lazy",builder:t,inner:{toJSON:r}});return n},"lazy"),c.natural=l(function(){return c.number().step(1).min(0)},"natural"),c.percent=l(function(){return c.number().step(.01).min(0).max(1).role("slider")},"percent"),c.date=l(function(){return c.union([c.is(Date),c.transform(c.string().role("datetime"),(t,r)=>{const n=new Date(t);if(isNaN(+n))throw new p(`invalid date "${t}"`,r);return n},!0)])},"date"),c.regExp=l(function(t=""){return c.union([c.is(RegExp),c.transform(c.string().role("regexp",{flag:t}),(r,n)=>{try{return new RegExp(r,t)}catch(i){throw new p(i.message,n)}},!0)])},"regExp"),c.arrayBuffer=l(function(t){return c.union([c.is(ArrayBuffer),c.is(SharedArrayBuffer),c.transform(c.any(),(r,n)=>{if(g.isSource(r))return g.fromSource(r);throw new p(`expected ArrayBufferSource but got ${r}`,n)},!0),...t?[c.transform(c.string(),(r,n)=>{try{return t==="base64"?g.fromBase64(r):g.fromHex(r)}catch(i){throw new p(i.message,n)}},!0)]:[]])},"arrayBuffer"),c.extend("lazy",(e,t,r,n)=>(t.inner[E]||(t.inner=t.builder(),t.inner.meta={...t.meta,...t.inner.meta}),c.resolve(e,t.inner,r,n))),c.extend("any",e=>[e]),c.extend("never",(e,t,r)=>{throw new p(`expected nullable but got ${e}`,r)}),c.extend("const",(e,{value:t},r)=>{if($(e,t))return[t];throw new p(`expected ${t} but got ${e}`,r)});function M(e,t,r,n,i=!1){const{max:s=1/0,min:o=-1/0}=t;if(e>s)throw new p(`expected ${r} <= ${s} but got ${e}`,n);if(e<o&&!i)throw new p(`expected ${r} >= ${o} but got ${e}`,n)}l(M,"checkWithinRange"),c.extend("string",(e,{meta:t},r)=>{if(typeof e!="string")throw new p(`expected string but got ${e}`,r);if(t.pattern){const n=new RegExp(t.pattern.source,t.pattern.flags);if(!n.test(e))throw new p(`expect string to match regexp ${n}`,r)}return M(e.length,t,"string length",r),[e]});function B(e,t){const r=e.toString();if(r.includes("e"))return e*Math.pow(10,t);const n=r.indexOf(".");if(n===-1)return e*Math.pow(10,t);const i=r.slice(n+1),s=r.slice(0,n);return i.length<=t?+(s+i.padEnd(t,"0")):+(s+i.slice(0,t)+"."+i.slice(t))}l(B,"decimalShift");function te(e,t,r){if(r=Math.abs(r),!/^\d+\.\d+$/.test(r.toString()))return(e-t)%r===0;const n=r.toString().indexOf("."),i=r.toString().slice(n+1).length;return Math.abs(B(e,i)-B(t,i))%B(r,i)===0}l(te,"isMultipleOf"),c.extend("number",(e,{meta:t},r)=>{if(typeof e!="number")throw new p(`expected number but got ${e}`,r);M(e,t,"number",r);const{step:n}=t;if(n&&!te(e,t.min??0,n))throw new p(`expected number multiple of ${n} but got ${e}`,r);return[e]}),c.extend("boolean",(e,t,r)=>{if(typeof e=="boolean")return[e];throw new p(`expected boolean but got ${e}`,r)}),c.extend("bitset",(e,{bits:t,meta:r},n)=>{let i=0,s=[];if(typeof e=="number"){i=e;for(const o in t)e&t[o]&&s.push(o)}else if(Array.isArray(e)){s=e;for(const o of s){if(typeof o!="string")throw new p(`expected string but got ${o}`,n);o in t&&(i|=t[o])}}else throw new p(`expected number or array but got ${e}`,n);return i===r.default?[i]:[i,s]}),c.extend("function",(e,t,r)=>{if(typeof e=="function")return[e];throw new p(`expected function but got ${e}`,r)}),c.extend("is",(e,{constructor:t},r)=>{if(typeof t=="function"){if(e instanceof t)return[e];throw new p(`expected ${t.name} but got ${e}`,r)}else{if(y(e))throw new p(`expected ${t} but got ${e}`,r);let n=Object.getPrototypeOf(e);for(;n;){if(n.constructor?.name===t)return[e];n=Object.getPrototypeOf(n)}throw new p(`expected ${t} but got ${e}`,r)}});function L(e,t,r,n){try{const[i,s]=c.resolve(e[t],r,{...n,path:[...n.path||[],t]});return s!==void 0&&(e[t]=s),i}catch(i){if(!n?.autofix)throw i;return delete e[t],r.meta.default}}l(L,"property"),c.extend("array",(e,{inner:t,meta:r},n)=>{if(!Array.isArray(e))throw new p(`expected array but got ${e}`,n);return M(e.length,r,"array length",n,!y(t.meta.default)),[e.map((i,s)=>L(e,s,t,n))]}),c.extend("dict",(e,{inner:t,sKey:r},n,i)=>{if(!N(e))throw new p(`expected object but got ${e}`,n);const s={};for(const o in e){let f;try{f=c.resolve(o,r,n)[0]}catch(h){if(i)continue;throw h}s[f]=L(e,o,t,n),e[f]=e[o],o!==f&&delete e[o]}return[s]}),c.extend("tuple",(e,{list:t},r,n)=>{if(!Array.isArray(e))throw new p(`expected array but got ${e}`,r);const i=t.map((s,o)=>L(e,o,s,r));return n?[i]:(i.push(...e.slice(t.length)),[i])});function C(e,t){for(const r in t)r in e||(e[r]=t[r])}l(C,"merge"),c.extend("object",(e,{dict:t},r,n)=>{if(!N(e))throw new p(`expected object but got ${e}`,r);const i={};for(const s in t){const o=L(e,s,t[s],r);(!y(o)||s in e)&&(i[s]=o)}return n||C(i,e),[i]}),c.extend("union",(e,{list:t,toString:r},n,i)=>{const s=[];for(const o of t)try{return c.resolve(e,o,n,i)}catch(f){s.push(f)}throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n)}),c.extend("intersect",(e,{list:t,toString:r},n,i)=>{if(!t.length)return[e];let s;for(const o of t){const f=c.resolve(e,o,n,!0)[0];if(!y(f))if(y(s))s=f;else{if(typeof s!=typeof f)throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n);if(typeof f=="object")C(s??={},f);else if(s!==f)throw new p(`expected ${r()} but got ${JSON.stringify(e)}`,n)}}return!i&&N(e)&&C(s,e),[s]}),c.extend("transform",(e,{inner:t,callback:r,preserve:n},i)=>{const[s,o=e]=c.resolve(e,t,i,!0);return n?[r(s)]:[r(s),r(o)]});const K={};function d(e,t,r){K[e]=r,Object.assign(c,{[e](...n){const i=new c({type:e});return t.forEach((s,o)=>{switch(s){case"sKey":i.sKey=n[o]??c.string();break;case"inner":i.inner=c.from(n[o]);break;case"list":i.list=n[o].map(c.from);break;case"dict":i.dict=b(n[o],c.from);break;case"bits":i.bits={};for(const f in n[o])typeof n[o][f]=="number"&&(i.bits[f]=n[o][f]);break;case"callback":{const f=i.callback=n[o];f.toJSON||=()=>f.toString();break}case"constructor":{const f=i.constructor=n[o];typeof f=="function"&&(f.toJSON||=()=>f.name);break}default:i[s]=n[o]}}),e==="object"||e==="dict"?i.meta.default={}:e==="array"||e==="tuple"?i.meta.default=[]:e==="bitset"&&(i.meta.default=0),i}})}l(d,"defineMethod"),d("is",["constructor"],({constructor:e})=>typeof e=="function"?e.name:e),d("any",[],()=>"any"),d("never",[],()=>"never"),d("const",["value"],({value:e})=>typeof e=="string"?JSON.stringify(e):e),d("string",[],()=>"string"),d("number",[],()=>"number"),d("boolean",[],()=>"boolean"),d("bitset",["bits"],()=>"bitset"),d("function",[],()=>"function"),d("array",["inner"],({inner:e})=>`${e.toString(!0)}[]`),d("dict",["inner","sKey"],({inner:e,sKey:t})=>`{ [key: ${t.toString()}]: ${e.toString()} }`),d("tuple",["list"],({list:e})=>`[${e.map(t=>t.toString()).join(", ")}]`),d("object",["dict"],({dict:e})=>Object.keys(e).length===0?"{}":`{ ${Object.entries(e).map(([t,r])=>`${t}${r.meta.required?"":"?"}: ${r.toString()}`).join(", ")} }`),d("union",["list"],({list:e},t)=>{const r=e.map(({toString:n})=>n()).join(" | ");return t?`(${r})`:r}),d("intersect",["list"],({list:e})=>`${e.map(t=>t.toString(!0)).join(" & ")}`),d("transform",["inner","callback","preserve"],({inner:e},t)=>e.toString(t));const re="locale",P="preference",ne=["zh","en"];c.object({[P]:c.union([...ne]).required(!1)});const ie={ok:"确定",cancel:"取消",close:"关闭",copy:"复制",copied:"复制成功",retry:"重试",loading:"加载中…","load.failed":"加载失败",submit:"提交",submitting:"正在提交…",next:"下一步",previous:"上一步",skip:"跳过",delete:"删除",edit:"编辑",save:"保存",search:"搜索",more:"更多",collapse:"收起",expand:"展开",back:"返回",unknown:"未知",none:"无",truncated:"已截断"},oe={ok:"OK",cancel:"Cancel",close:"Close",copy:"Copy",copied:"Copied",retry:"Retry",loading:"Loading…","load.failed":"Failed to load",submit:"Submit",submitting:"Submitting…",next:"Next",previous:"Previous",skip:"Skip",delete:"Delete",edit:"Edit",save:"Save",search:"Search",more:"More",collapse:"Collapse",expand:"Expand",back:"Back",unknown:"Unknown",none:"None",truncated:"Truncated"},se={"language.title":"语言"},ce={"language.title":"Language"},le=".j_Uvsa_row{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}.j_Uvsa_rowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}.j_Uvsa_title{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}.j_Uvsa_selector{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.j_Uvsa_selector:hover{background:var(--dsw-alias-interactive-bg-hover)}.j_Uvsa_chevron{flex:none}",I="@deepseek-ai/dsh-client-locale/LanguageRow.module.css";if(typeof document<"u"&&document.querySelector("style[data-plugin-css="+JSON.stringify(I)+"]")===null){const e=document.createElement("style");e.dataset.plugin="@deepseek-ai/dsh-client-locale",e.dataset.pluginCss=I,e.textContent=le,document.head.appendChild(e)}var j={title:"j_Uvsa_title",row:"j_Uvsa_row",rowText:"j_Uvsa_rowText",selector:"j_Uvsa_selector",chevron:"j_Uvsa_chevron"};function fe({t:e,setLocale:t,useStore:r}){const n=r(h=>h.active),i=r(h=>h.options),[s,o]=(0,W.useState)(!1),f=i.find(h=>h.id===n)?.label??n;return(0,_.jsxs)("div",{className:j.row,children:[(0,_.jsx)("div",{className:j.rowText,children:(0,_.jsx)("div",{className:j.title,children:e("language.title")})}),(0,_.jsx)(R.Menu,{open:s,onClose:l(()=>{o(!1)},"onClose"),items:i.map(h=>({id:h.id,label:h.label})),selectedId:n,onSelect:l(h=>{t(h),o(!1)},"onSelect"),align:"end",portal:!0,anchor:(0,_.jsxs)("button",{type:"button",className:j.selector,"aria-haspopup":"menu","aria-expanded":s,onClick:l(()=>{o(h=>!h)},"onClick"),children:[f,(0,_.jsx)(R.IconChevronDownOutline14,{className:j.chevron})]})})]})}l(fe,"LanguageRow");function ae(){return(0,Y.defineStore)({init:l(()=>({active:"",options:[],revision:-1}),"init"),actions:{sync:l((e,t,r,n)=>{n<=e.revision||(e.active=t,e.options=r,e.revision=n)},"sync")}})}l(ae,"createLanguageRowStore");const ue="zh",q="common",z="settings.locale",V=Object.freeze([{id:"zh",label:"中文"},{id:"en",label:"English"}]);var H=class{static{l(this,"LocaleRuntime")}dicts=new Map;bound=new Map;snapshot;listeners=new Set;ctx;host;provisional;constructor(e,t){this.ctx=e,this.host=t,this.provisional=pe(),this.snapshot=Object.freeze({active:this.provisional,locales:V,revision:0}),t!==void 0&&(e.effect(()=>t.subscribe(()=>{this.adopt(t)}),"locale: settings scope adoption"),this.adopt(t))}getLocale(){return this.snapshot}getSnapshot(){return this.snapshot}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setLocale(e){const t=this.snapshot.locales.find(r=>r.id===e);if(t===void 0)throw new Error(`locale "${e}" is not registered`);this.snapshot.active!==t.id&&(this.publish(t.id,!0),this.host?.set(P,t.id))}adopt(e){const t=e.getSnapshot().value;if(t===void 0)return;const r=t.preference??this.provisional;this.snapshot.active!==r&&this.publish(r,!0)}register(e,t,r){const n=typeof t=="string"?[[t,r]]:Object.entries(t);let i=this.dicts.get(e);i||(i=new Map,this.dicts.set(e,i));for(const[s]of n)if(i.has(s))throw new Error(`locale namespace "${e}" already has locale "${s}"`);for(const[s,o]of n)i.set(s,o);return this.publish(this.snapshot.active,!1),()=>{const s=this.dicts.get(e);if(!s)return;let o=!1;for(const[f,h]of n)s.get(f)===h&&(s.delete(f),o=!0);o&&this.publish(this.snapshot.active,!1)}}bind(e){let t=this.bound.get(e);return t||(t=l((r,n)=>this.translate(e,r,n),"t"),this.bound.set(e,t),t)}translate(e,t,r){const n=this.lookup(e,t)??(e!=="common"?this.lookup("common",t):void 0)??t;return r?n.replace(/\{(\w+)\}/g,(i,s)=>s in r?String(r[s]):i):n}lookup(e,t){const r=this.dicts.get(e);return r?.get(this.snapshot.active)?.[t]??r?.get("zh")?.[t]}publish(e,t){this.snapshot=Object.freeze({active:e,locales:this.snapshot.locales,revision:this.snapshot.revision+1}),t&&this.ctx.emit("locale/change",this.snapshot);for(const r of[...this.listeners])try{r()}catch(n){console.error("locale subscriber crashed:",n)}}};function pe(){return he()??"zh"}l(pe,"resolveInitialLocale");function he(){if(!(typeof window>"u"))for(const e of[...navigator.languages??[],navigator.language]){const t=e.toLowerCase().split("-")[0],r=V.find(n=>n.id===t);if(r)return r.id}}l(he,"detectBrowserLocale");const de=["slots","connection","remote","settingsScope"];function ye(e){const t=new H(e,e.settingsScope.bind({namespace:re}));t.register(q,{zh:ie,en:oe}),t.register(z,{zh:se,en:ce}),e.provide("locale",t),e.slots.installLocale(t);const r=ae();let n;const i=l(o=>{n?.sync(o.active,o.locales.map(f=>({id:f.id,label:f.label})),o.revision)},"sync");e.on("locale/change",i);const s=l(o=>(n=o,i(t.getLocale()),{setLocale:l(f=>{t.setLocale(f)},"setLocale")}),"injected");e.slots.inject("settings.general.item",()=>e.slots.register({name:"settings.general.item",id:"language",order:0,store:r,locale:z,inject:s},fe))}return l(ye,"apply"),w.COMMON_NS=q,w.FALLBACK_LOCALE=ue,w.LocaleRuntime=H,w.SETTINGS_NS=z,w.apply=ye,w.inject=de,k.exports},"factory")});
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-client-locale","version":"0.0.15","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-api-remotes"],"platform":"web","immediately":true}},"license":"MIT","peerDependencies":{"react":"^18.2.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-client-connection":"^0.0.15","@deepseek-ai/dsh-client-runtime":"^0.0.15","@deepseek-ai/dsh-client-ui-slots":"^0.0.15","@deepseek-ai/dsh-client-ui-primitives":"^0.0.15","@deepseek-ai/dsh-api-remotes":"^0.0.15","@deepseek-ai/dsh-invariants":"^0.0.15","@deepseek-ai/dsh-client-ui-settings":"^0.0.15"},"dependencies":{"@deepseek-ai/dsh-settings":"^0.0.15","@deepseek-ai/schemastery":"^3.18.1"}}
1
+ {"name":"@deepseek-ai/dsh-client-locale","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"inject":["@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-api-remotes"],"platform":"web","immediately":true}},"license":"MIT","peerDependencies":{"react":"^18.2.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-api-remotes":"^0.1.0-rc.7","@deepseek-ai/dsh-client-runtime":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-primitives":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-settings":"^0.1.0-rc.7","@deepseek-ai/dsh-client-ui-slots":"^0.1.0-rc.7","@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/dsh-client-connection":"^0.1.0-rc.7"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1","@deepseek-ai/dsh-settings":"^0.1.0-rc.7"}}
@@ -1 +1 @@
1
- {"name":"@deepseek-ai/dsh-client-modules","version":"0.0.15","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"platform":"web","inject":[],"immediately":true}},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.0.15","@deepseek-ai/cordis":"^4.0.1"}}
1
+ {"name":"@deepseek-ai/dsh-client-modules","version":"0.1.0-rc.7","publishConfig":{"access":"public"},"type":"module","main":"lib/index.js","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./invariant":{"types":"./lib/types/invariant.d.ts","default":"./lib/invariant.js"},"./src/*":"./src/*","./package.json":"./package.json"},"dsh":{"client":{"platform":"web","inject":[],"immediately":true}},"license":"MIT","peerDependencies":{"@deepseek-ai/dsh-invariants":"^0.1.0-rc.7","@deepseek-ai/cordis":"^4.0.1"}}