zevairouter 1.0.34 → 1.0.36

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 (1050) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/cli/app/.next-cli-build/BUILD_ID +1 -1
  3. package/cli/app/.next-cli-build/app-path-routes-manifest.json +10 -3
  4. package/cli/app/.next-cli-build/build-manifest.json +2 -2
  5. package/cli/app/.next-cli-build/prerender-manifest.json +3 -3
  6. package/cli/app/.next-cli-build/routes-manifest.json +49 -0
  7. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +2 -2
  8. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
  9. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
  10. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  11. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  12. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  13. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  14. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  15. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  16. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  17. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  18. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  19. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  20. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  21. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  22. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  23. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  24. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  25. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js +2 -2
  26. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
  27. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
  28. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  29. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  30. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  31. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  32. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  33. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  34. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  35. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  36. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  37. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  38. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  39. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  40. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  41. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  42. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  43. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  44. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  45. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  46. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  47. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  48. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  49. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  50. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  51. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  52. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  53. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  54. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  55. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  56. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  57. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  58. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  59. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  60. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  61. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  62. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  63. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  64. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  65. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  66. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  67. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  68. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  69. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  70. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  71. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  72. package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  73. package/cli/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  74. package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  75. package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  76. package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
  77. package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  78. package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  79. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  80. package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  81. package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  82. package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  83. package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  84. package/cli/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  85. package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  86. package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  87. package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
  88. package/cli/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  89. package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  90. package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  91. package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  92. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  93. package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  94. package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  95. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  96. package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  97. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  98. package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  99. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  100. package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  101. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  102. package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  103. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  104. package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  105. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  106. package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  107. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
  108. package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  109. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  110. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  111. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  112. package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  113. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  114. package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  115. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  116. package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  117. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
  118. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
  119. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  120. package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  121. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  122. package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  123. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  124. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  125. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  126. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  127. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  128. package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  129. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  130. package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  131. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  132. package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  133. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  134. package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  135. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  136. package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  137. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  138. package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  139. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  140. package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  141. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  142. package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  143. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  144. package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  145. package/cli/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  146. package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  147. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js +1 -1
  148. package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
  149. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js +1 -1
  150. package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
  151. package/cli/app/.next-cli-build/server/app/api/context/route.js +1 -1
  152. package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
  153. package/cli/app/.next-cli-build/server/app/api/health/route.js +1 -1
  154. package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  155. package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
  156. package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  157. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  158. package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  159. package/cli/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  160. package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  161. package/cli/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  162. package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  163. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  164. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  165. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  166. package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  167. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  168. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  169. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  170. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  171. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  172. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  173. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  174. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  175. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  176. package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  177. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  178. package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  179. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  180. package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  181. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  182. package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  183. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  184. package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  185. package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
  186. package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  187. package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  188. package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  189. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  190. package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  191. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
  192. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  193. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  194. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  195. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
  196. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
  197. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
  198. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
  199. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
  200. package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
  201. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/cancel/route.js +1 -1
  202. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  203. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  204. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  205. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/route.js +1 -1
  206. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/[jobId]/route.js.nft.json +1 -1
  207. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/latest/route.js +1 -1
  208. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/latest/route.js.nft.json +1 -1
  209. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/route.js +1 -1
  210. package/cli/app/.next-cli-build/server/app/api/oauth/autoclaw/bulk-import/route.js.nft.json +1 -1
  211. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js +1 -1
  212. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  213. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  214. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  215. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js +1 -1
  216. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
  217. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js +1 -1
  218. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
  219. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js +1 -1
  220. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
  221. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js +1 -1
  222. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
  223. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js +1 -1
  224. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
  225. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js +1 -0
  226. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -0
  227. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route_client-reference-manifest.js +1 -0
  228. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js +1 -0
  229. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -0
  230. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route_client-reference-manifest.js +1 -0
  231. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js +1 -0
  232. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -0
  233. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route_client-reference-manifest.js +1 -0
  234. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js +1 -0
  235. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -0
  236. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route_client-reference-manifest.js +1 -0
  237. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -0
  238. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -0
  239. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route_client-reference-manifest.js +1 -0
  240. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js +1 -0
  241. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -0
  242. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route_client-reference-manifest.js +1 -0
  243. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js +1 -0
  244. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -0
  245. package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route_client-reference-manifest.js +1 -0
  246. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  247. package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  248. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  249. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  250. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  251. package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  252. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  253. package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  254. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  255. package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  256. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  257. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  258. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js +1 -1
  259. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  260. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  261. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  262. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js +1 -1
  263. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
  264. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js +1 -1
  265. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
  266. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js +1 -1
  267. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
  268. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  269. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  270. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  271. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  272. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  273. package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  274. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js +1 -1
  275. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
  276. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
  277. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
  278. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js +1 -1
  279. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
  280. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js +1 -1
  281. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
  282. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js +1 -1
  283. package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
  284. package/cli/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  285. package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  286. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  287. package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  288. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  289. package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  290. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  291. package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  292. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  293. package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  294. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  295. package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  296. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  297. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  298. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  299. package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  300. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -1
  301. package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
  302. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  303. package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  304. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  305. package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  306. package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  307. package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  308. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  309. package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  310. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  311. package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  312. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  313. package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  314. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  315. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  316. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  317. package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  318. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  319. package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  320. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  321. package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  322. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  323. package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  324. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  325. package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  326. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  327. package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  328. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  329. package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  330. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  331. package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  332. package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  333. package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  334. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  335. package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  336. package/cli/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  337. package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  338. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  339. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  340. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  341. package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  342. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  343. package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  344. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  345. package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  346. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  347. package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  348. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  349. package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  350. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  351. package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  352. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  353. package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  354. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  355. package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  356. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  357. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  358. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  359. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  360. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  361. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  362. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  363. package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  364. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  365. package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  366. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
  367. package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
  368. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  369. package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  370. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  371. package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  372. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  373. package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  374. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  375. package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  376. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  377. package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  378. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  379. package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  380. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  381. package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  382. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  383. package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  384. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  385. package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  386. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  387. package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  388. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  389. package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  390. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  391. package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  392. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  393. package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  394. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  395. package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  396. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  397. package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  398. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  399. package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  400. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  401. package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  402. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  403. package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  404. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  405. package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  406. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  407. package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  408. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  409. package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  410. package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  411. package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  412. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  413. package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  414. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  415. package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  416. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  417. package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  418. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  419. package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  420. package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
  421. package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  422. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  423. package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  424. package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  425. package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  426. package/cli/app/.next-cli-build/server/app/callback/page.js +2 -2
  427. package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  428. package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  429. package/cli/app/.next-cli-build/server/app/callback.html +1 -1
  430. package/cli/app/.next-cli-build/server/app/callback.rsc +4 -4
  431. package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  432. package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  433. package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  434. package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  435. package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  436. package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  437. package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
  438. package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +6 -6
  439. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
  440. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
  441. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  442. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  443. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +6 -6
  444. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
  445. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +4 -4
  446. package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +2 -2
  447. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  448. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  449. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  450. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  451. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  452. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  453. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  454. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  455. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  456. package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  457. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  458. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  459. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  460. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  461. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  462. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  463. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  464. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  465. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  466. package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  467. package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  468. package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  469. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  470. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  471. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  472. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  473. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  474. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  475. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  476. package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  477. package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
  478. package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +6 -6
  479. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
  480. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
  481. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  482. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  483. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +6 -6
  484. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
  485. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +4 -4
  486. package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +2 -2
  487. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  488. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  489. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  490. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  491. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  492. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  493. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  494. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  495. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  496. package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  497. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  498. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  499. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  500. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  501. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  502. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  503. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  504. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  505. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  506. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  507. package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  508. package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  509. package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  510. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  511. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  512. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  513. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  514. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  515. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  516. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  517. package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  518. package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  519. package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  520. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  521. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  522. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  523. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  524. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  525. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  526. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  527. package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  528. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  529. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  530. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  531. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  532. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  533. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  534. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  535. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  536. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  537. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  538. package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  539. package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  540. package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  541. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  542. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  543. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  544. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  545. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  546. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  547. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  548. package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  549. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  550. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  551. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  552. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  553. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  554. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  555. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  556. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  557. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  558. package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  559. package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  560. package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  561. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  562. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  563. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  564. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  565. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  566. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  567. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  568. package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  569. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  570. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  571. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  572. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  573. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  574. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  575. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  576. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  577. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  578. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  579. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  580. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  581. package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  582. package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  583. package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  584. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  585. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  586. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  587. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  588. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  589. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  590. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  591. package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  592. package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  593. package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  594. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  595. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  596. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  597. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  598. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  599. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  600. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  601. package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  602. package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
  603. package/cli/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  604. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  605. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  606. package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  607. package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  608. package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  609. package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  610. package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  611. package/cli/app/.next-cli-build/server/app/index.html +1 -1
  612. package/cli/app/.next-cli-build/server/app/index.rsc +4 -4
  613. package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  614. package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  615. package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  616. package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
  617. package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  618. package/cli/app/.next-cli-build/server/app/landing/page.js +2 -2
  619. package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  620. package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  621. package/cli/app/.next-cli-build/server/app/landing.html +1 -1
  622. package/cli/app/.next-cli-build/server/app/landing.rsc +4 -4
  623. package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  624. package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  625. package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  626. package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  627. package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  628. package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  629. package/cli/app/.next-cli-build/server/app/login/page.js +2 -2
  630. package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  631. package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  632. package/cli/app/.next-cli-build/server/app/login.html +1 -1
  633. package/cli/app/.next-cli-build/server/app/login.rsc +5 -5
  634. package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  635. package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  636. package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  637. package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  638. package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  639. package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  640. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  641. package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  642. package/cli/app/.next-cli-build/server/app/page.js +2 -2
  643. package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  644. package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  645. package/cli/app/.next-cli-build/server/app-paths-manifest.json +10 -3
  646. package/cli/app/.next-cli-build/server/chunks/1396.js +1 -1
  647. package/cli/app/.next-cli-build/server/chunks/1939.js +1 -1
  648. package/cli/app/.next-cli-build/server/chunks/2777.js +1 -1
  649. package/cli/app/.next-cli-build/server/chunks/3110.js +2 -2
  650. package/cli/app/.next-cli-build/server/chunks/318.js +1 -1
  651. package/cli/app/.next-cli-build/server/chunks/412.js +1 -1
  652. package/cli/app/.next-cli-build/server/chunks/4746.js +1 -1
  653. package/cli/app/.next-cli-build/server/chunks/5000.js +1 -1
  654. package/cli/app/.next-cli-build/server/chunks/5827.js +1 -0
  655. package/cli/app/.next-cli-build/server/chunks/5949.js +1 -1
  656. package/cli/app/.next-cli-build/server/chunks/6652.js +1 -0
  657. package/cli/app/.next-cli-build/server/chunks/6896.js +1 -1
  658. package/cli/app/.next-cli-build/server/chunks/7153.js +1 -1
  659. package/cli/app/.next-cli-build/server/chunks/7774.js +27 -27
  660. package/cli/app/.next-cli-build/server/chunks/8242.js +2 -2
  661. package/cli/app/.next-cli-build/server/chunks/8371.js +1 -0
  662. package/cli/app/.next-cli-build/server/chunks/8590.js +1 -1
  663. package/cli/app/.next-cli-build/server/chunks/8895.js +7 -1
  664. package/cli/app/.next-cli-build/server/chunks/891.js +1 -1
  665. package/cli/app/.next-cli-build/server/chunks/9372.js +1 -0
  666. package/cli/app/.next-cli-build/server/chunks/9489.js +1 -1
  667. package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  668. package/cli/app/.next-cli-build/server/middleware.js +4 -4
  669. package/cli/app/.next-cli-build/server/pages/404.html +1 -1
  670. package/cli/app/.next-cli-build/server/pages/500.html +1 -1
  671. package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  672. package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  673. package/cli/app/.next-cli-build/static/chunks/{1321-0ce33d7bddd2dfe7.js → 1321-1915f34ac5033b82.js} +1 -1
  674. package/cli/app/.next-cli-build/static/chunks/523-9807fa9a0746de61.js +3 -0
  675. package/cli/app/.next-cli-build/static/chunks/{5497-15b3dc050a875ba5.js → 5497-f496fb3861cb944d.js} +3 -3
  676. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/automation/page-36dfe0b23bf48d41.js +1 -0
  677. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/layout-d9a30786a04fb360.js +1 -0
  678. package/cli/app/.next-cli-build/static/chunks/app/_global-error/page-47cd0604103a80c1.js +1 -0
  679. package/cli/app/.next-cli-build/static/chunks/app/api/auth/login/route-47cd0604103a80c1.js +1 -0
  680. package/cli/app/.next-cli-build/static/chunks/app/api/auth/logout/route-47cd0604103a80c1.js +1 -0
  681. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-47cd0604103a80c1.js +1 -0
  682. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-47cd0604103a80c1.js +1 -0
  683. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-47cd0604103a80c1.js +1 -0
  684. package/cli/app/.next-cli-build/static/chunks/app/api/auth/status/route-47cd0604103a80c1.js +1 -0
  685. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-47cd0604103a80c1.js +1 -0
  686. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-47cd0604103a80c1.js +1 -0
  687. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-47cd0604103a80c1.js +1 -0
  688. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-47cd0604103a80c1.js +1 -0
  689. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-47cd0604103a80c1.js +1 -0
  690. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-gateway/accounts/route-47cd0604103a80c1.js +1 -0
  691. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-47cd0604103a80c1.js +1 -0
  692. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-47cd0604103a80c1.js +1 -0
  693. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-47cd0604103a80c1.js +1 -0
  694. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-47cd0604103a80c1.js +1 -0
  695. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-47cd0604103a80c1.js +1 -0
  696. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-47cd0604103a80c1.js +1 -0
  697. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-47cd0604103a80c1.js +1 -0
  698. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-47cd0604103a80c1.js +1 -0
  699. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-47cd0604103a80c1.js +1 -0
  700. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-47cd0604103a80c1.js +1 -0
  701. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-47cd0604103a80c1.js +1 -0
  702. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-47cd0604103a80c1.js +1 -0
  703. package/cli/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-47cd0604103a80c1.js +1 -0
  704. package/cli/app/.next-cli-build/static/chunks/app/api/combos/route-47cd0604103a80c1.js +1 -0
  705. package/cli/app/.next-cli-build/static/chunks/app/api/context/[id]/route-47cd0604103a80c1.js +1 -0
  706. package/cli/app/.next-cli-build/static/chunks/app/api/context/bulk/route-47cd0604103a80c1.js +1 -0
  707. package/cli/app/.next-cli-build/static/chunks/app/api/context/route-47cd0604103a80c1.js +1 -0
  708. package/cli/app/.next-cli-build/static/chunks/app/api/health/route-47cd0604103a80c1.js +1 -0
  709. package/cli/app/.next-cli-build/static/chunks/app/api/init/route-47cd0604103a80c1.js +1 -0
  710. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-47cd0604103a80c1.js +1 -0
  711. package/cli/app/.next-cli-build/static/chunks/app/api/keys/route-47cd0604103a80c1.js +1 -0
  712. package/cli/app/.next-cli-build/static/chunks/app/api/locale/route-47cd0604103a80c1.js +1 -0
  713. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-47cd0604103a80c1.js +1 -0
  714. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-47cd0604103a80c1.js +1 -0
  715. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-47cd0604103a80c1.js +1 -0
  716. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-47cd0604103a80c1.js +1 -0
  717. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-47cd0604103a80c1.js +1 -0
  718. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-47cd0604103a80c1.js +1 -0
  719. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-47cd0604103a80c1.js +1 -0
  720. package/cli/app/.next-cli-build/static/chunks/app/api/models/alias/route-47cd0604103a80c1.js +1 -0
  721. package/cli/app/.next-cli-build/static/chunks/app/api/models/availability/route-47cd0604103a80c1.js +1 -0
  722. package/cli/app/.next-cli-build/static/chunks/app/api/models/custom/route-47cd0604103a80c1.js +1 -0
  723. package/cli/app/.next-cli-build/static/chunks/app/api/models/disabled/route-47cd0604103a80c1.js +1 -0
  724. package/cli/app/.next-cli-build/static/chunks/app/api/models/route-47cd0604103a80c1.js +1 -0
  725. package/cli/app/.next-cli-build/static/chunks/app/api/models/test/route-47cd0604103a80c1.js +1 -0
  726. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-47cd0604103a80c1.js +1 -0
  727. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route-47cd0604103a80c1.js +1 -0
  728. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route-47cd0604103a80c1.js +1 -0
  729. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/route-47cd0604103a80c1.js +1 -0
  730. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/latest/route-47cd0604103a80c1.js +1 -0
  731. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/route-47cd0604103a80c1.js +1 -0
  732. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/cancel/route-47cd0604103a80c1.js +1 -0
  733. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/manual/[workerId]/route-47cd0604103a80c1.js +1 -0
  734. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/route-47cd0604103a80c1.js +1 -0
  735. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/latest/route-47cd0604103a80c1.js +1 -0
  736. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/route-47cd0604103a80c1.js +1 -0
  737. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route-47cd0604103a80c1.js +1 -0
  738. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route-47cd0604103a80c1.js +1 -0
  739. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/route-47cd0604103a80c1.js +1 -0
  740. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/latest/route-47cd0604103a80c1.js +1 -0
  741. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/route-47cd0604103a80c1.js +1 -0
  742. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-token/route-47cd0604103a80c1.js +1 -0
  743. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/quota-cookie/route-47cd0604103a80c1.js +1 -0
  744. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route-47cd0604103a80c1.js +1 -0
  745. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route-47cd0604103a80c1.js +1 -0
  746. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route-47cd0604103a80c1.js +1 -0
  747. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/latest/route-47cd0604103a80c1.js +1 -0
  748. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-47cd0604103a80c1.js +1 -0
  749. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-token/route-47cd0604103a80c1.js +1 -0
  750. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/quota-cookie/route-47cd0604103a80c1.js +1 -0
  751. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-47cd0604103a80c1.js +1 -0
  752. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-47cd0604103a80c1.js +1 -0
  753. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-47cd0604103a80c1.js +1 -0
  754. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-47cd0604103a80c1.js +1 -0
  755. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-47cd0604103a80c1.js +1 -0
  756. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-47cd0604103a80c1.js +1 -0
  757. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route-47cd0604103a80c1.js +1 -0
  758. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route-47cd0604103a80c1.js +1 -0
  759. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/route-47cd0604103a80c1.js +1 -0
  760. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/latest/route-47cd0604103a80c1.js +1 -0
  761. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/route-47cd0604103a80c1.js +1 -0
  762. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-47cd0604103a80c1.js +1 -0
  763. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-47cd0604103a80c1.js +1 -0
  764. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-47cd0604103a80c1.js +1 -0
  765. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route-47cd0604103a80c1.js +1 -0
  766. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route-47cd0604103a80c1.js +1 -0
  767. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/route-47cd0604103a80c1.js +1 -0
  768. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/latest/route-47cd0604103a80c1.js +1 -0
  769. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/route-47cd0604103a80c1.js +1 -0
  770. package/cli/app/.next-cli-build/static/chunks/app/api/pricing/route-47cd0604103a80c1.js +1 -0
  771. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-47cd0604103a80c1.js +1 -0
  772. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-47cd0604103a80c1.js +1 -0
  773. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-47cd0604103a80c1.js +1 -0
  774. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-47cd0604103a80c1.js +1 -0
  775. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-47cd0604103a80c1.js +1 -0
  776. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-47cd0604103a80c1.js +1 -0
  777. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-47cd0604103a80c1.js +1 -0
  778. package/cli/app/.next-cli-build/static/chunks/app/api/providers/bulk-delete/route-47cd0604103a80c1.js +1 -0
  779. package/cli/app/.next-cli-build/static/chunks/app/api/providers/client/route-47cd0604103a80c1.js +1 -0
  780. package/cli/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-47cd0604103a80c1.js +1 -0
  781. package/cli/app/.next-cli-build/static/chunks/app/api/providers/route-47cd0604103a80c1.js +1 -0
  782. package/cli/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-47cd0604103a80c1.js +1 -0
  783. package/cli/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-47cd0604103a80c1.js +1 -0
  784. package/cli/app/.next-cli-build/static/chunks/app/api/providers/validate/route-47cd0604103a80c1.js +1 -0
  785. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-47cd0604103a80c1.js +1 -0
  786. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-47cd0604103a80c1.js +1 -0
  787. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-47cd0604103a80c1.js +1 -0
  788. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-47cd0604103a80c1.js +1 -0
  789. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-47cd0604103a80c1.js +1 -0
  790. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-47cd0604103a80c1.js +1 -0
  791. package/cli/app/.next-cli-build/static/chunks/app/api/settings/database/route-47cd0604103a80c1.js +1 -0
  792. package/cli/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-47cd0604103a80c1.js +1 -0
  793. package/cli/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-47cd0604103a80c1.js +1 -0
  794. package/cli/app/.next-cli-build/static/chunks/app/api/settings/route-47cd0604103a80c1.js +1 -0
  795. package/cli/app/.next-cli-build/static/chunks/app/api/shutdown/route-47cd0604103a80c1.js +1 -0
  796. package/cli/app/.next-cli-build/static/chunks/app/api/tags/route-47cd0604103a80c1.js +1 -0
  797. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-47cd0604103a80c1.js +1 -0
  798. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-47cd0604103a80c1.js +1 -0
  799. package/cli/app/.next-cli-build/static/chunks/app/api/translator/load/route-47cd0604103a80c1.js +1 -0
  800. package/cli/app/.next-cli-build/static/chunks/app/api/translator/save/route-47cd0604103a80c1.js +1 -0
  801. package/cli/app/.next-cli-build/static/chunks/app/api/translator/send/route-47cd0604103a80c1.js +1 -0
  802. package/cli/app/.next-cli-build/static/chunks/app/api/translator/translate/route-47cd0604103a80c1.js +1 -0
  803. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-47cd0604103a80c1.js +1 -0
  804. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-47cd0604103a80c1.js +1 -0
  805. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-47cd0604103a80c1.js +1 -0
  806. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-47cd0604103a80c1.js +1 -0
  807. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-47cd0604103a80c1.js +1 -0
  808. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-47cd0604103a80c1.js +1 -0
  809. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-47cd0604103a80c1.js +1 -0
  810. package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-47cd0604103a80c1.js +1 -0
  811. package/cli/app/.next-cli-build/static/chunks/app/api/usage/aggregate/route-47cd0604103a80c1.js +1 -0
  812. package/cli/app/.next-cli-build/static/chunks/app/api/usage/chart/route-47cd0604103a80c1.js +1 -0
  813. package/cli/app/.next-cli-build/static/chunks/app/api/usage/history/route-47cd0604103a80c1.js +1 -0
  814. package/cli/app/.next-cli-build/static/chunks/app/api/usage/providers/route-47cd0604103a80c1.js +1 -0
  815. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-47cd0604103a80c1.js +1 -0
  816. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-47cd0604103a80c1.js +1 -0
  817. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stats/route-47cd0604103a80c1.js +1 -0
  818. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stream/route-47cd0604103a80c1.js +1 -0
  819. package/cli/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-47cd0604103a80c1.js +1 -0
  820. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-47cd0604103a80c1.js +1 -0
  821. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-47cd0604103a80c1.js +1 -0
  822. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-47cd0604103a80c1.js +1 -0
  823. package/cli/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-47cd0604103a80c1.js +1 -0
  824. package/cli/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-47cd0604103a80c1.js +1 -0
  825. package/cli/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-47cd0604103a80c1.js +1 -0
  826. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-47cd0604103a80c1.js +1 -0
  827. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/route-47cd0604103a80c1.js +1 -0
  828. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-47cd0604103a80c1.js +1 -0
  829. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-47cd0604103a80c1.js +1 -0
  830. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/route-47cd0604103a80c1.js +1 -0
  831. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-47cd0604103a80c1.js +1 -0
  832. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/route-47cd0604103a80c1.js +1 -0
  833. package/cli/app/.next-cli-build/static/chunks/app/api/v1/route-47cd0604103a80c1.js +1 -0
  834. package/cli/app/.next-cli-build/static/chunks/app/api/v1/search/route-47cd0604103a80c1.js +1 -0
  835. package/cli/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-47cd0604103a80c1.js +1 -0
  836. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-47cd0604103a80c1.js +1 -0
  837. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-47cd0604103a80c1.js +1 -0
  838. package/cli/app/.next-cli-build/static/chunks/app/api/version/route-47cd0604103a80c1.js +1 -0
  839. package/cli/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-47cd0604103a80c1.js +1 -0
  840. package/cli/app/.next-cli-build/static/chunks/app/api/version/update/route-47cd0604103a80c1.js +1 -0
  841. package/cli/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-47cd0604103a80c1.js +1 -0
  842. package/cli/app/.next-cli-build/static/chunks/app/page-47cd0604103a80c1.js +1 -0
  843. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-47cd0604103a80c1.js +1 -0
  844. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-47cd0604103a80c1.js +1 -0
  845. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-47cd0604103a80c1.js +1 -0
  846. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-47cd0604103a80c1.js +1 -0
  847. package/cli/app/.next-cli-build/static/css/66603789c5d0bb89.css +1 -0
  848. package/cli/app/.next-cli-build/static/w0R4xFPIyjPTTgiJ8h4Lz/_buildManifest.js +1 -0
  849. package/cli/app/package.json +3 -3
  850. package/cli/app/src/lib/oauth/services/bulkImportBrowserEngine.js +40 -13
  851. package/cli/app/src/lib/oauth/services/socksHttpBridge.js +157 -0
  852. package/cli/package.json +1 -1
  853. package/open-sse/handlers/chatCore.js +8 -1
  854. package/open-sse/rtk/ponytail.js +91 -0
  855. package/open-sse/rtk/ponytailPrompts.js +44 -0
  856. package/open-sse/utils/proxyFetch.js +3 -2
  857. package/package.json +3 -3
  858. package/src/app/(dashboard)/dashboard/automation/page.js +153 -1
  859. package/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js +67 -0
  860. package/src/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js +19 -0
  861. package/src/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js +30 -0
  862. package/src/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js +26 -0
  863. package/src/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js +27 -0
  864. package/src/app/api/oauth/codebuddy-cn/bulk-import/route.js +61 -0
  865. package/src/app/api/oauth/codebuddy-cn/bulk-token/route.js +119 -0
  866. package/src/app/api/oauth/codebuddy-cn/quota-cookie/route.js +28 -0
  867. package/src/app/api/settings/route.js +11 -2
  868. package/src/lib/db/repos/settingsRepo.js +4 -0
  869. package/src/lib/oauth/services/bulkImportBrowserEngine.js +40 -13
  870. package/src/lib/oauth/services/codebuddyBulkImportManager.js +9 -7
  871. package/src/lib/oauth/services/codebuddyCnBulkImportManager.js +1004 -0
  872. package/src/lib/oauth/services/codebuddyCnPhoneAutomation.js +1029 -0
  873. package/src/lib/oauth/services/fiveSimClient.js +370 -0
  874. package/src/lib/oauth/services/kiroBulkImportManager.js +69 -7
  875. package/src/lib/oauth/services/proxyUtils.js +26 -0
  876. package/src/lib/oauth/services/socksHttpBridge.js +157 -0
  877. package/src/lib/usage/quotaService.js +10 -2
  878. package/src/shared/components/CodeBuddyCnPhoneRegisterModal.js +564 -0
  879. package/src/shared/components/index.js +1 -0
  880. package/src/sse/handlers/chat.js +2 -0
  881. package/cli/app/.next-cli-build/server/chunks/7340.js +0 -1
  882. package/cli/app/.next-cli-build/server/chunks/9326.js +0 -1
  883. package/cli/app/.next-cli-build/static/UXfWwOE9KjTymPMw7qKzq/_buildManifest.js +0 -1
  884. package/cli/app/.next-cli-build/static/chunks/523-afe352c06592ae73.js +0 -3
  885. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/automation/page-cf7cc045f80cb4b0.js +0 -1
  886. package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/layout-54ebc81f294cf670.js +0 -1
  887. package/cli/app/.next-cli-build/static/chunks/app/_global-error/page-576986aaa25d6ad2.js +0 -1
  888. package/cli/app/.next-cli-build/static/chunks/app/api/auth/login/route-576986aaa25d6ad2.js +0 -1
  889. package/cli/app/.next-cli-build/static/chunks/app/api/auth/logout/route-576986aaa25d6ad2.js +0 -1
  890. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-576986aaa25d6ad2.js +0 -1
  891. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-576986aaa25d6ad2.js +0 -1
  892. package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-576986aaa25d6ad2.js +0 -1
  893. package/cli/app/.next-cli-build/static/chunks/app/api/auth/status/route-576986aaa25d6ad2.js +0 -1
  894. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-576986aaa25d6ad2.js +0 -1
  895. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-576986aaa25d6ad2.js +0 -1
  896. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-576986aaa25d6ad2.js +0 -1
  897. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-576986aaa25d6ad2.js +0 -1
  898. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-576986aaa25d6ad2.js +0 -1
  899. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-gateway/accounts/route-576986aaa25d6ad2.js +0 -1
  900. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-576986aaa25d6ad2.js +0 -1
  901. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-576986aaa25d6ad2.js +0 -1
  902. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-576986aaa25d6ad2.js +0 -1
  903. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-576986aaa25d6ad2.js +0 -1
  904. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-576986aaa25d6ad2.js +0 -1
  905. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-576986aaa25d6ad2.js +0 -1
  906. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-576986aaa25d6ad2.js +0 -1
  907. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-576986aaa25d6ad2.js +0 -1
  908. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-576986aaa25d6ad2.js +0 -1
  909. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-576986aaa25d6ad2.js +0 -1
  910. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-576986aaa25d6ad2.js +0 -1
  911. package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-576986aaa25d6ad2.js +0 -1
  912. package/cli/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-576986aaa25d6ad2.js +0 -1
  913. package/cli/app/.next-cli-build/static/chunks/app/api/combos/route-576986aaa25d6ad2.js +0 -1
  914. package/cli/app/.next-cli-build/static/chunks/app/api/context/[id]/route-576986aaa25d6ad2.js +0 -1
  915. package/cli/app/.next-cli-build/static/chunks/app/api/context/bulk/route-576986aaa25d6ad2.js +0 -1
  916. package/cli/app/.next-cli-build/static/chunks/app/api/context/route-576986aaa25d6ad2.js +0 -1
  917. package/cli/app/.next-cli-build/static/chunks/app/api/health/route-576986aaa25d6ad2.js +0 -1
  918. package/cli/app/.next-cli-build/static/chunks/app/api/init/route-576986aaa25d6ad2.js +0 -1
  919. package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-576986aaa25d6ad2.js +0 -1
  920. package/cli/app/.next-cli-build/static/chunks/app/api/keys/route-576986aaa25d6ad2.js +0 -1
  921. package/cli/app/.next-cli-build/static/chunks/app/api/locale/route-576986aaa25d6ad2.js +0 -1
  922. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-576986aaa25d6ad2.js +0 -1
  923. package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-576986aaa25d6ad2.js +0 -1
  924. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-576986aaa25d6ad2.js +0 -1
  925. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-576986aaa25d6ad2.js +0 -1
  926. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-576986aaa25d6ad2.js +0 -1
  927. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-576986aaa25d6ad2.js +0 -1
  928. package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-576986aaa25d6ad2.js +0 -1
  929. package/cli/app/.next-cli-build/static/chunks/app/api/models/alias/route-576986aaa25d6ad2.js +0 -1
  930. package/cli/app/.next-cli-build/static/chunks/app/api/models/availability/route-576986aaa25d6ad2.js +0 -1
  931. package/cli/app/.next-cli-build/static/chunks/app/api/models/custom/route-576986aaa25d6ad2.js +0 -1
  932. package/cli/app/.next-cli-build/static/chunks/app/api/models/disabled/route-576986aaa25d6ad2.js +0 -1
  933. package/cli/app/.next-cli-build/static/chunks/app/api/models/route-576986aaa25d6ad2.js +0 -1
  934. package/cli/app/.next-cli-build/static/chunks/app/api/models/test/route-576986aaa25d6ad2.js +0 -1
  935. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-576986aaa25d6ad2.js +0 -1
  936. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route-576986aaa25d6ad2.js +0 -1
  937. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route-576986aaa25d6ad2.js +0 -1
  938. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/route-576986aaa25d6ad2.js +0 -1
  939. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/latest/route-576986aaa25d6ad2.js +0 -1
  940. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/route-576986aaa25d6ad2.js +0 -1
  941. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/cancel/route-576986aaa25d6ad2.js +0 -1
  942. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/manual/[workerId]/route-576986aaa25d6ad2.js +0 -1
  943. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/[jobId]/route-576986aaa25d6ad2.js +0 -1
  944. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/latest/route-576986aaa25d6ad2.js +0 -1
  945. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/autoclaw/bulk-import/route-576986aaa25d6ad2.js +0 -1
  946. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route-576986aaa25d6ad2.js +0 -1
  947. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route-576986aaa25d6ad2.js +0 -1
  948. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/route-576986aaa25d6ad2.js +0 -1
  949. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/latest/route-576986aaa25d6ad2.js +0 -1
  950. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/route-576986aaa25d6ad2.js +0 -1
  951. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-token/route-576986aaa25d6ad2.js +0 -1
  952. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/quota-cookie/route-576986aaa25d6ad2.js +0 -1
  953. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-576986aaa25d6ad2.js +0 -1
  954. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-576986aaa25d6ad2.js +0 -1
  955. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-576986aaa25d6ad2.js +0 -1
  956. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-576986aaa25d6ad2.js +0 -1
  957. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-576986aaa25d6ad2.js +0 -1
  958. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-576986aaa25d6ad2.js +0 -1
  959. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route-576986aaa25d6ad2.js +0 -1
  960. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route-576986aaa25d6ad2.js +0 -1
  961. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/route-576986aaa25d6ad2.js +0 -1
  962. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/latest/route-576986aaa25d6ad2.js +0 -1
  963. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/route-576986aaa25d6ad2.js +0 -1
  964. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-576986aaa25d6ad2.js +0 -1
  965. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-576986aaa25d6ad2.js +0 -1
  966. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-576986aaa25d6ad2.js +0 -1
  967. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route-576986aaa25d6ad2.js +0 -1
  968. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route-576986aaa25d6ad2.js +0 -1
  969. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/route-576986aaa25d6ad2.js +0 -1
  970. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/latest/route-576986aaa25d6ad2.js +0 -1
  971. package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/route-576986aaa25d6ad2.js +0 -1
  972. package/cli/app/.next-cli-build/static/chunks/app/api/pricing/route-576986aaa25d6ad2.js +0 -1
  973. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-576986aaa25d6ad2.js +0 -1
  974. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-576986aaa25d6ad2.js +0 -1
  975. package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-576986aaa25d6ad2.js +0 -1
  976. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-576986aaa25d6ad2.js +0 -1
  977. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-576986aaa25d6ad2.js +0 -1
  978. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-576986aaa25d6ad2.js +0 -1
  979. package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-576986aaa25d6ad2.js +0 -1
  980. package/cli/app/.next-cli-build/static/chunks/app/api/providers/bulk-delete/route-576986aaa25d6ad2.js +0 -1
  981. package/cli/app/.next-cli-build/static/chunks/app/api/providers/client/route-576986aaa25d6ad2.js +0 -1
  982. package/cli/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-576986aaa25d6ad2.js +0 -1
  983. package/cli/app/.next-cli-build/static/chunks/app/api/providers/route-576986aaa25d6ad2.js +0 -1
  984. package/cli/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-576986aaa25d6ad2.js +0 -1
  985. package/cli/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-576986aaa25d6ad2.js +0 -1
  986. package/cli/app/.next-cli-build/static/chunks/app/api/providers/validate/route-576986aaa25d6ad2.js +0 -1
  987. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-576986aaa25d6ad2.js +0 -1
  988. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-576986aaa25d6ad2.js +0 -1
  989. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-576986aaa25d6ad2.js +0 -1
  990. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-576986aaa25d6ad2.js +0 -1
  991. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-576986aaa25d6ad2.js +0 -1
  992. package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-576986aaa25d6ad2.js +0 -1
  993. package/cli/app/.next-cli-build/static/chunks/app/api/settings/database/route-576986aaa25d6ad2.js +0 -1
  994. package/cli/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-576986aaa25d6ad2.js +0 -1
  995. package/cli/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-576986aaa25d6ad2.js +0 -1
  996. package/cli/app/.next-cli-build/static/chunks/app/api/settings/route-576986aaa25d6ad2.js +0 -1
  997. package/cli/app/.next-cli-build/static/chunks/app/api/shutdown/route-576986aaa25d6ad2.js +0 -1
  998. package/cli/app/.next-cli-build/static/chunks/app/api/tags/route-576986aaa25d6ad2.js +0 -1
  999. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-576986aaa25d6ad2.js +0 -1
  1000. package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-576986aaa25d6ad2.js +0 -1
  1001. package/cli/app/.next-cli-build/static/chunks/app/api/translator/load/route-576986aaa25d6ad2.js +0 -1
  1002. package/cli/app/.next-cli-build/static/chunks/app/api/translator/save/route-576986aaa25d6ad2.js +0 -1
  1003. package/cli/app/.next-cli-build/static/chunks/app/api/translator/send/route-576986aaa25d6ad2.js +0 -1
  1004. package/cli/app/.next-cli-build/static/chunks/app/api/translator/translate/route-576986aaa25d6ad2.js +0 -1
  1005. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-576986aaa25d6ad2.js +0 -1
  1006. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-576986aaa25d6ad2.js +0 -1
  1007. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-576986aaa25d6ad2.js +0 -1
  1008. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-576986aaa25d6ad2.js +0 -1
  1009. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-576986aaa25d6ad2.js +0 -1
  1010. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-576986aaa25d6ad2.js +0 -1
  1011. package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-576986aaa25d6ad2.js +0 -1
  1012. package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-576986aaa25d6ad2.js +0 -1
  1013. package/cli/app/.next-cli-build/static/chunks/app/api/usage/aggregate/route-576986aaa25d6ad2.js +0 -1
  1014. package/cli/app/.next-cli-build/static/chunks/app/api/usage/chart/route-576986aaa25d6ad2.js +0 -1
  1015. package/cli/app/.next-cli-build/static/chunks/app/api/usage/history/route-576986aaa25d6ad2.js +0 -1
  1016. package/cli/app/.next-cli-build/static/chunks/app/api/usage/providers/route-576986aaa25d6ad2.js +0 -1
  1017. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-576986aaa25d6ad2.js +0 -1
  1018. package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-576986aaa25d6ad2.js +0 -1
  1019. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stats/route-576986aaa25d6ad2.js +0 -1
  1020. package/cli/app/.next-cli-build/static/chunks/app/api/usage/stream/route-576986aaa25d6ad2.js +0 -1
  1021. package/cli/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-576986aaa25d6ad2.js +0 -1
  1022. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-576986aaa25d6ad2.js +0 -1
  1023. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-576986aaa25d6ad2.js +0 -1
  1024. package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-576986aaa25d6ad2.js +0 -1
  1025. package/cli/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-576986aaa25d6ad2.js +0 -1
  1026. package/cli/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-576986aaa25d6ad2.js +0 -1
  1027. package/cli/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-576986aaa25d6ad2.js +0 -1
  1028. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-576986aaa25d6ad2.js +0 -1
  1029. package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/route-576986aaa25d6ad2.js +0 -1
  1030. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-576986aaa25d6ad2.js +0 -1
  1031. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-576986aaa25d6ad2.js +0 -1
  1032. package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/route-576986aaa25d6ad2.js +0 -1
  1033. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-576986aaa25d6ad2.js +0 -1
  1034. package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/route-576986aaa25d6ad2.js +0 -1
  1035. package/cli/app/.next-cli-build/static/chunks/app/api/v1/route-576986aaa25d6ad2.js +0 -1
  1036. package/cli/app/.next-cli-build/static/chunks/app/api/v1/search/route-576986aaa25d6ad2.js +0 -1
  1037. package/cli/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-576986aaa25d6ad2.js +0 -1
  1038. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-576986aaa25d6ad2.js +0 -1
  1039. package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-576986aaa25d6ad2.js +0 -1
  1040. package/cli/app/.next-cli-build/static/chunks/app/api/version/route-576986aaa25d6ad2.js +0 -1
  1041. package/cli/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-576986aaa25d6ad2.js +0 -1
  1042. package/cli/app/.next-cli-build/static/chunks/app/api/version/update/route-576986aaa25d6ad2.js +0 -1
  1043. package/cli/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-576986aaa25d6ad2.js +0 -1
  1044. package/cli/app/.next-cli-build/static/chunks/app/page-576986aaa25d6ad2.js +0 -1
  1045. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-576986aaa25d6ad2.js +0 -1
  1046. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-576986aaa25d6ad2.js +0 -1
  1047. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-576986aaa25d6ad2.js +0 -1
  1048. package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-576986aaa25d6ad2.js +0 -1
  1049. package/cli/app/.next-cli-build/static/css/6615840a16042b10.css +0 -1
  1050. /package/cli/app/.next-cli-build/static/{UXfWwOE9KjTymPMw7qKzq → w0R4xFPIyjPTTgiJ8h4Lz}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- exports.id=8242,exports.ids=[8242],exports.modules={43173:(a,b,c)=>{"use strict";c.d(b,{default:()=>m});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412),i=c(50377);c(99258);let j=["zh-CN","zh-TW"],k=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],l=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}];function m({machineId:a}){let[b,c]=(0,e.useState)([]),[f,g]=(0,e.useState)(!0),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(""),[v,w]=(0,e.useState)(null),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useState)(!1),[B,C]=(0,e.useState)(!0),[D,E]=(0,e.useState)(!0),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)(!0),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)("full"),[N,O]=(0,e.useState)("en"),[P,Q]=(0,e.useState)(!0),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(!1),[V,W]=(0,e.useState)(""),[X,Y]=(0,e.useState)(""),[Z,$]=(0,e.useState)(!1),[_,aa]=(0,e.useState)(""),[ab,ac]=(0,e.useState)(null),[ad,ae]=(0,e.useState)(!1),[af,ag]=(0,e.useState)(!1),[ah,ai]=(0,e.useState)(!1),[aj,ak]=(0,e.useState)(!1),[al,am]=(0,e.useState)(""),[an,ao]=(0,e.useState)(!1),[ap,aq]=(0,e.useState)(""),[ar,as]=(0,e.useState)(null),[at,au]=(0,e.useState)(""),[av,aw]=(0,e.useState)(""),[ax,ay]=(0,e.useState)(null),[az,aA]=(0,e.useState)(!1),[aB,aC]=(0,e.useState)([]),[aD,aE]=(0,e.useState)(""),[aF,aG]=(0,e.useState)(!1),[aH,aI]=(0,e.useState)(!1),[aJ,aK]=(0,e.useState)(!1),aL=(0,e.useRef)(null);(0,e.useRef)(0),(0,e.useRef)(0),(0,e.useRef)(!1),(0,e.useRef)(!1),(0,e.useRef)(!1),(0,e.useRef)(!1);let[aM,aN]=(0,e.useState)(!1),[aO,aP]=(0,e.useState)(!1),[aQ,aR]=(0,e.useState)(new Set),[aS,aT]=(0,e.useState)(!1),aU=j.includes(N)?l:l.filter(a=>!a.wenyan),{copied:aV,copy:aW}=(0,i.C)(),aX=!B||!D,aY=B?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,e.useCallback)((a,b,c,d,e,f)=>{b.current?(c.current=0,d(!0),e.current||(e.current=!0,f(!0))):(c.current+=1,c.current>=5&&d(!1))},[]);let aZ=async a=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelDashboardAccess:a})})).ok&&G(a)}catch(a){console.log("Error updating tunnelDashboardAccess:",a)}},a$=async a=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireApiKey:a})})).ok&&A(a)}catch(a){console.log("Error updating requireApiKey:",a)}},a_=async a=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:a})})).ok&&I(a)}catch(a){console.log("Error updating rtkEnabled:",a)}},a0=async a=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}catch(a){console.log("Error updating setting:",a)}},a1=async()=>{try{let a=await fetch("/api/keys"),b=await a.json();a.ok&&c(b.keys||[])}catch(a){console.log("Error fetching data:",a)}finally{g(!1)}},a2=async(...a)=>{$(!0),aa("Waiting for tunnel ready...");let b=a.filter(Boolean).map(a=>`${a}/api/health`),c=Date.now();for(;Date.now()-c<3e5;){if(await new Promise(a=>setTimeout(a,2e3)),await Promise.any(b.map(async a=>{if((await fetch(a,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return S(!0),$(!1),aa(""),!0;if((Date.now()-c)%1e4<2e3)try{let a=await fetch("/api/tunnel/status");if(a.ok){let b=await a.json();if(!b.tunnel?.enabled)return ac({type:"error",message:"Tunnel process stopped unexpectedly."}),$(!1),aa(""),!1}}catch{}}return ac({type:"error",message:"Tunnel created but not reachable. Please try again."}),$(!1),aa(""),!1},a3=async()=>{ae(!1),$(!0),ac(null),aa("Creating tunnel...");let a=!0;(async()=>{for(;a;){try{let b=await fetch("/api/tunnel/status");if(b.ok){let c=await b.json();c.download?.downloading?aa(`Downloading cloudflared... ${c.download.progress}%`):a&&aa("Creating tunnel...")}}catch{}await new Promise(a=>setTimeout(a,1e3))}})();try{let b=await fetch("/api/tunnel/enable",{method:"POST"});a=!1;let c=await b.json();if(!b.ok)return void ac({type:"error",message:c.error||"Failed to enable tunnel"});let d=c.tunnelUrl;if(!d)return void ac({type:"error",message:"No tunnel URL returned"});W(d),Y(c.publicUrl||""),await a2(c.publicUrl,d)}catch(a){ac({type:"error",message:a.message})}finally{a=!1,$(!1),aa("")}},a4=async()=>{$(!0),ac(null);try{let a=await fetch("/api/tunnel/disable",{method:"POST"}),b=await a.json();a.ok?(S(!1),W(""),ag(!1),ac({type:"success",message:"Tunnel disabled"})):ac({type:"error",message:b.error||"Failed to disable tunnel"})}catch(a){ac({type:"error",message:a.message})}finally{$(!1)}},a5=async()=>{ay(null);try{let a=await fetch("/api/tunnel/tailscale-check");if(a.ok){let b=await a.json();return ay(b.installed),b}}catch{}return ay(!1),{installed:!1}},a6=async()=>{aA(!0),as(null),aC([]);try{let a=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:aD})});aE("");let b=a.body.getReader(),c=new TextDecoder,d="";for(;;){let{done:a,value:e}=await b.read();if(a)break;let f=(d+=c.decode(e,{stream:!0})).split("\n\n");for(let a of(d=f.pop()||"",f)){let b=a.split("\n"),c="progress",d=null;for(let a of b)if(a.startsWith("event: ")&&(c=a.slice(7).trim()),a.startsWith("data: "))try{d=JSON.parse(a.slice(6))}catch{}if(d)if("progress"===c)aC(a=>[...a.slice(-50),d.message]);else if("done"===c){ay(!0),aA(!1),aI(!1),ba();return}else"error"===c&&as({type:"error",message:d.error||"Install failed"})}}}catch(a){as({type:"error",message:a.message})}finally{aA(!1)}},a7=async a=>{aq("Waiting for Tailscale ready...");let b=`${a}/api/health`,c=Date.now();for(;Date.now()-c<3e5;){await new Promise(a=>setTimeout(a,2e3));try{let a=await fetch(b,{mode:"no-cors",cache:"no-store"});if(a.ok||"opaque"===a.type)return!0}catch{}}return!1},a8=(a,b)=>{au(a),aw(b)},a9=()=>{au(""),aw("")},ba=async()=>{aI(!1),aG(!0),ao(!0),as(null),aq("Connecting..."),a9();try{let a=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),b=await a.json();if(a.ok&&b.success){am(b.tunnelUrl||"");let a=await a7(b.tunnelUrl);ai(!0),as(a?null:{type:"warning",message:"Connected but not reachable yet."});return}if(b.needsLogin&&b.authUrl){a8(b.authUrl,"Open Login Page"),aq('Login required — click "Open Login Page" to continue');for(let a=0;a<40;a++){await new Promise(a=>setTimeout(a,3e3));try{let a=await fetch("/api/tunnel/tailscale-check");if(a.ok&&(await a.json()).loggedIn){a9(),aq("Starting funnel...");let a=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),b=await a.json();if(a.ok&&b.success){am(b.tunnelUrl||"");let a=await a7(b.tunnelUrl);ai(!0),as(a?null:{type:"warning",message:"Connected but not reachable yet."})}else b.funnelNotEnabled&&b.enableUrl?await bb(b.enableUrl):as({type:"error",message:b.error||"Failed to start funnel"});return}}catch{}}a9(),as({type:"error",message:"Login timed out. Please try again."});return}if(b.funnelNotEnabled&&b.enableUrl)return void await bb(b.enableUrl);as({type:"error",message:b.error||"Failed to connect"})}catch(a){as({type:"error",message:a.message})}finally{ao(!1),aG(!1),aq(""),a9()}},bb=async a=>{a8(a,"Open Funnel Settings"),aq('Click "Open Funnel Settings" to enable Funnel...');for(let a=0;a<40;a++){await new Promise(a=>setTimeout(a,3e3));try{let a=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),b=await a.json();if(a.ok&&b.success){a9(),am(b.tunnelUrl||"");let a=await a7(b.tunnelUrl);ai(!0),as(a?null:{type:"warning",message:"Connected but not reachable yet."});return}if(b.funnelNotEnabled)continue;if(b.error){a9(),as({type:"error",message:b.error});return}}catch{}}a9(),as({type:"error",message:"Timed out waiting for Funnel to be enabled."})},bc=async()=>{ao(!0),as(null);try{let a=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),b=await a.json();a.ok?(ai(!1),am(""),aK(!1),as({type:"success",message:"Tailscale disabled"})):as({type:"error",message:b.error||"Failed to disable Tailscale"})}catch(a){as({type:"error",message:a.message})}finally{ao(!1)}},bd=async()=>{as(null),aC([]);let a=await a5();a?.installed&&a?.hasCachedPassword?ba():aI(!0)},be=async()=>{if(t.trim())try{let a=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})}),b=await a.json();a.ok&&(w(b.key),await a1(),u(""),s(!1))}catch(a){console.log("Error creating key:",a)}},bf=async a=>{y({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{y(null);try{(await fetch(`/api/keys/${a}`,{method:"DELETE"})).ok&&(c(b.filter(b=>b.id!==a)),aR(b=>{let c=new Set(b);return c.delete(a),c}))}catch(a){console.log("Error deleting key:",a)}}})},bg=async(a,b)=>{try{(await fetch(`/api/keys/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&c(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error toggling key:",a)}},[bh,bi]=(0,e.useState)("/v1");return f?(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(h.Qv,{}),(0,d.jsx)(h.Qv,{})]}):(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsxs)(h.Zp,{children:[(0,d.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)(n,{label:"Local",url:bh,copyId:"local_url",copied:aV,onCopy:aW}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${R?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tunnel"}),R&&!Z&&T?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.pd,{value:`${X||V}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,d.jsx)("button",{onClick:()=>aW(`${X||V}/v1`,"tunnel_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===aV?"check":"content_copy"})}),(0,d.jsx)("button",{onClick:()=>ag(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!R||Z||T?Z?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),_||"Creating tunnel..."]}),(0,d.jsx)("button",{onClick:()=>{$(!1),aa("")},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ab?.type==="error"?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ab.message]}),(0,d.jsx)(h.$n,{size:"sm",icon:"cloud_upload",onClick:()=>ae(!0),children:"Enable"})]}):P?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,d.jsx)("button",{onClick:()=>Q(!1),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,d.jsx)(h.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{aX?ac({type:"error",message:`Security required: ${aY}`}):z?ae(!0):ac({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),aM?"Tunnel reconnecting...":"Tunnel checking..."]}),(0,d.jsx)("button",{onClick:()=>ag(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${ah?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tailscale"}),ah&&!an&&aj?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.pd,{value:`${al}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,d.jsx)("button",{onClick:()=>aW(`${al}/v1`,"ts_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===aV?"check":"content_copy"})}),(0,d.jsx)("button",{onClick:()=>aK(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!ah||an||aj?an||aF?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),ap||"Connecting..."]}),at&&(0,d.jsx)(h.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(at,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:av||"Open"}),(0,d.jsx)("button",{onClick:()=>{ao(!1),aG(!1),aq(""),a9()},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ar?.type==="error"?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ar.message]}),(0,d.jsx)(h.$n,{size:"sm",icon:"vpn_lock",onClick:bd,children:"Enable"})]}):(0,d.jsx)(h.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{aX?as({type:"error",message:`Security required: ${aY}`}):bd()},className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Enable"}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),aO?"Tailscale reconnecting...":"Tailscale checking..."]}),(0,d.jsx)("button",{onClick:()=>aK(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]})]}),aX&&!R&&!ah&&(0,d.jsx)("div",{className:"mt-4",children:(0,d.jsx)(q,{message:aY,action:{label:"Open settings",href:"/dashboard/profile"}})}),(R||ah)&&(0,d.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!z&&(0,d.jsx)(q,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!B||!D)&&(0,d.jsx)(q,{message:B?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:B?"Change password":"Enable",href:"/dashboard/profile"}})]}),(R||ah)&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[(0,d.jsx)(h.lM,{checked:F,onChange:()=>aZ(!F)}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),(0,d.jsx)(p,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),(0,d.jsxs)(h.Zp,{id:"rtk",children:[(0,d.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,d.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,d.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,d.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,d.jsx)(h.lM,{checked:H,onChange:()=>a_(!H)})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,d.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[J&&(0,d.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,d.jsx)("div",{className:"flex items-center gap-1.5",children:aU.map(a=>(0,d.jsx)("button",{onClick:()=>{var b;M(b=a.id),a0({cavemanLevel:b})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${L===a.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:a.desc,children:a.label},a.id))}),(0,d.jsx)("p",{className:"text-xs text-primary",children:l.find(a=>a.id===L)?.desc})]}),(0,d.jsx)(h.lM,{checked:J,onChange:()=>{var a;K(a=!J),a0({cavemanEnabled:a})}})]})]})]}),(0,d.jsxs)(h.Zp,{id:"require-api-key",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,d.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,d.jsx)(h.$n,{icon:"add",onClick:()=>s(!0),children:"Create Key"})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,d.jsx)(h.lM,{checked:z,onChange:()=>a$(!z)})]}),aS&&!z&&(0,d.jsx)("div",{className:"mb-4 -mt-2",children:(0,d.jsx)(q,{message:"Endpoint is exposed without an API key."})}),0===b.length?(0,d.jsxs)("div",{className:"text-center py-12",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,d.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,d.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,d.jsx)(h.$n,{icon:"add",onClick:()=>s(!0),children:"Create Key"})]}):(0,d.jsx)("div",{className:"flex flex-col",children:b.map(a=>{var b;return(0,d.jsxs)("div",{className:`group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:a.name}),(0,d.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono",children:aQ.has(a.id)?a.key:(b=a.key)?b.length>8?b.slice(0,8)+"...":b:""}),(0,d.jsx)("button",{onClick:()=>{var b;return b=a.id,void aR(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:aQ.has(a.id)?"Hide key":"Show key",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:aQ.has(a.id)?"visibility_off":"visibility"})}),(0,d.jsx)("button",{onClick:()=>aW(a.key,a.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:aV===a.id?"check":"content_copy"})})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(a.createdAt).toLocaleDateString()]}),!1===a.isActive&&(0,d.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(h.lM,{size:"sm",checked:a.isActive??!0,onChange:b=>{a.isActive&&!b?y({title:"Pause API Key",message:`Pause API key "${a.name}"?
1
+ exports.id=8242,exports.ids=[8242],exports.modules={43173:(a,b,c)=>{"use strict";c.d(b,{default:()=>n});var d=c(48249),e=c(67484),f=c(49885),g=c.n(f),h=c(50412),i=c(50377);c(99258);let j=["zh-CN","zh-TW"],k=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],l=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],m=[{id:"lite",label:"Lite",desc:"Suggest lazier alternative"},{id:"full",label:"Full",desc:"Enforce the ladder, shortest diff"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, one-liner or bust"}];function n({machineId:a}){let[b,c]=(0,e.useState)([]),[f,g]=(0,e.useState)(!0),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(""),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(!0),[E,F]=(0,e.useState)(!0),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(!0),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)("full"),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)("full"),[S,T]=(0,e.useState)("en"),[U,V]=(0,e.useState)(!0),[W,X]=(0,e.useState)(!1),[Y,Z]=(0,e.useState)(!1),[$,_]=(0,e.useState)(""),[aa,ab]=(0,e.useState)(""),[ac,ad]=(0,e.useState)(!1),[ae,af]=(0,e.useState)(""),[ag,ah]=(0,e.useState)(null),[ai,aj]=(0,e.useState)(!1),[ak,al]=(0,e.useState)(!1),[am,an]=(0,e.useState)(!1),[ao,ap]=(0,e.useState)(!1),[aq,ar]=(0,e.useState)(""),[as,at]=(0,e.useState)(!1),[au,av]=(0,e.useState)(""),[aw,ax]=(0,e.useState)(null),[ay,az]=(0,e.useState)(""),[aA,aB]=(0,e.useState)(""),[aC,aD]=(0,e.useState)(null),[aE,aF]=(0,e.useState)(!1),[aG,aH]=(0,e.useState)([]),[aI,aJ]=(0,e.useState)(""),[aK,aL]=(0,e.useState)(!1),[aM,aN]=(0,e.useState)(!1),[aO,aP]=(0,e.useState)(!1),aQ=(0,e.useRef)(null);(0,e.useRef)(0),(0,e.useRef)(0),(0,e.useRef)(!1),(0,e.useRef)(!1),(0,e.useRef)(!1),(0,e.useRef)(!1);let[aR,aS]=(0,e.useState)(!1),[aT,aU]=(0,e.useState)(!1),[aV,aW]=(0,e.useState)(new Set),[aX,aY]=(0,e.useState)(!1),aZ=j.includes(S)?l:l.filter(a=>!a.wenyan),{copied:a$,copy:a_}=(0,i.C)(),a0=!C||!E,a1=C?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,e.useCallback)((a,b,c,d,e,f)=>{b.current?(c.current=0,d(!0),e.current||(e.current=!0,f(!0))):(c.current+=1,c.current>=5&&d(!1))},[]);let a2=async a=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelDashboardAccess:a})})).ok&&H(a)}catch(a){console.log("Error updating tunnelDashboardAccess:",a)}},a3=async a=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireApiKey:a})})).ok&&B(a)}catch(a){console.log("Error updating requireApiKey:",a)}},a4=async a=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:a})})).ok&&J(a)}catch(a){console.log("Error updating rtkEnabled:",a)}},a5=async a=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}catch(a){console.log("Error updating setting:",a)}},a6=async()=>{try{let a=await fetch("/api/keys"),b=await a.json();a.ok&&c(b.keys||[])}catch(a){console.log("Error fetching data:",a)}finally{g(!1)}},a7=async(...a)=>{ad(!0),af("Waiting for tunnel ready...");let b=a.filter(Boolean).map(a=>`${a}/api/health`),c=Date.now();for(;Date.now()-c<3e5;){if(await new Promise(a=>setTimeout(a,2e3)),await Promise.any(b.map(async a=>{if((await fetch(a,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return X(!0),ad(!1),af(""),!0;if((Date.now()-c)%1e4<2e3)try{let a=await fetch("/api/tunnel/status");if(a.ok){let b=await a.json();if(!b.tunnel?.enabled)return ah({type:"error",message:"Tunnel process stopped unexpectedly."}),ad(!1),af(""),!1}}catch{}}return ah({type:"error",message:"Tunnel created but not reachable. Please try again."}),ad(!1),af(""),!1},a8=async()=>{aj(!1),ad(!0),ah(null),af("Creating tunnel...");let a=!0;(async()=>{for(;a;){try{let b=await fetch("/api/tunnel/status");if(b.ok){let c=await b.json();c.download?.downloading?af(`Downloading cloudflared... ${c.download.progress}%`):a&&af("Creating tunnel...")}}catch{}await new Promise(a=>setTimeout(a,1e3))}})();try{let b=await fetch("/api/tunnel/enable",{method:"POST"});a=!1;let c=await b.json();if(!b.ok)return void ah({type:"error",message:c.error||"Failed to enable tunnel"});let d=c.tunnelUrl;if(!d)return void ah({type:"error",message:"No tunnel URL returned"});_(d),ab(c.publicUrl||""),await a7(c.publicUrl,d)}catch(a){ah({type:"error",message:a.message})}finally{a=!1,ad(!1),af("")}},a9=async()=>{ad(!0),ah(null);try{let a=await fetch("/api/tunnel/disable",{method:"POST"}),b=await a.json();a.ok?(X(!1),_(""),al(!1),ah({type:"success",message:"Tunnel disabled"})):ah({type:"error",message:b.error||"Failed to disable tunnel"})}catch(a){ah({type:"error",message:a.message})}finally{ad(!1)}},ba=async()=>{aD(null);try{let a=await fetch("/api/tunnel/tailscale-check");if(a.ok){let b=await a.json();return aD(b.installed),b}}catch{}return aD(!1),{installed:!1}},bb=async()=>{aF(!0),ax(null),aH([]);try{let a=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:aI})});aJ("");let b=a.body.getReader(),c=new TextDecoder,d="";for(;;){let{done:a,value:e}=await b.read();if(a)break;let f=(d+=c.decode(e,{stream:!0})).split("\n\n");for(let a of(d=f.pop()||"",f)){let b=a.split("\n"),c="progress",d=null;for(let a of b)if(a.startsWith("event: ")&&(c=a.slice(7).trim()),a.startsWith("data: "))try{d=JSON.parse(a.slice(6))}catch{}if(d)if("progress"===c)aH(a=>[...a.slice(-50),d.message]);else if("done"===c){aD(!0),aF(!1),aN(!1),bf();return}else"error"===c&&ax({type:"error",message:d.error||"Install failed"})}}}catch(a){ax({type:"error",message:a.message})}finally{aF(!1)}},bc=async a=>{av("Waiting for Tailscale ready...");let b=`${a}/api/health`,c=Date.now();for(;Date.now()-c<3e5;){await new Promise(a=>setTimeout(a,2e3));try{let a=await fetch(b,{mode:"no-cors",cache:"no-store"});if(a.ok||"opaque"===a.type)return!0}catch{}}return!1},bd=(a,b)=>{az(a),aB(b)},be=()=>{az(""),aB("")},bf=async()=>{aN(!1),aL(!0),at(!0),ax(null),av("Connecting..."),be();try{let a=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),b=await a.json();if(a.ok&&b.success){ar(b.tunnelUrl||"");let a=await bc(b.tunnelUrl);an(!0),ax(a?null:{type:"warning",message:"Connected but not reachable yet."});return}if(b.needsLogin&&b.authUrl){bd(b.authUrl,"Open Login Page"),av('Login required — click "Open Login Page" to continue');for(let a=0;a<40;a++){await new Promise(a=>setTimeout(a,3e3));try{let a=await fetch("/api/tunnel/tailscale-check");if(a.ok&&(await a.json()).loggedIn){be(),av("Starting funnel...");let a=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),b=await a.json();if(a.ok&&b.success){ar(b.tunnelUrl||"");let a=await bc(b.tunnelUrl);an(!0),ax(a?null:{type:"warning",message:"Connected but not reachable yet."})}else b.funnelNotEnabled&&b.enableUrl?await bg(b.enableUrl):ax({type:"error",message:b.error||"Failed to start funnel"});return}}catch{}}be(),ax({type:"error",message:"Login timed out. Please try again."});return}if(b.funnelNotEnabled&&b.enableUrl)return void await bg(b.enableUrl);ax({type:"error",message:b.error||"Failed to connect"})}catch(a){ax({type:"error",message:a.message})}finally{at(!1),aL(!1),av(""),be()}},bg=async a=>{bd(a,"Open Funnel Settings"),av('Click "Open Funnel Settings" to enable Funnel...');for(let a=0;a<40;a++){await new Promise(a=>setTimeout(a,3e3));try{let a=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),b=await a.json();if(a.ok&&b.success){be(),ar(b.tunnelUrl||"");let a=await bc(b.tunnelUrl);an(!0),ax(a?null:{type:"warning",message:"Connected but not reachable yet."});return}if(b.funnelNotEnabled)continue;if(b.error){be(),ax({type:"error",message:b.error});return}}catch{}}be(),ax({type:"error",message:"Timed out waiting for Funnel to be enabled."})},bh=async()=>{at(!0),ax(null);try{let a=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),b=await a.json();a.ok?(an(!1),ar(""),aP(!1),ax({type:"success",message:"Tailscale disabled"})):ax({type:"error",message:b.error||"Failed to disable Tailscale"})}catch(a){ax({type:"error",message:a.message})}finally{at(!1)}},bi=async()=>{ax(null),aH([]);let a=await ba();a?.installed&&a?.hasCachedPassword?bf():aN(!0)},bj=async()=>{if(u.trim())try{let a=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:u})}),b=await a.json();a.ok&&(x(b.key),await a6(),v(""),t(!1))}catch(a){console.log("Error creating key:",a)}},bk=async a=>{z({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{z(null);try{(await fetch(`/api/keys/${a}`,{method:"DELETE"})).ok&&(c(b.filter(b=>b.id!==a)),aW(b=>{let c=new Set(b);return c.delete(a),c}))}catch(a){console.log("Error deleting key:",a)}}})},bl=async(a,b)=>{try{(await fetch(`/api/keys/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&c(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("Error toggling key:",a)}},[bm,bn]=(0,e.useState)("/v1");return f?(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsx)(h.Qv,{}),(0,d.jsx)(h.Qv,{})]}):(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsxs)(h.Zp,{children:[(0,d.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)(o,{label:"Local",url:bm,copyId:"local_url",copied:a$,onCopy:a_}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${W?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tunnel"}),W&&!ac&&Y?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.pd,{value:`${aa||$}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,d.jsx)("button",{onClick:()=>a_(`${aa||$}/v1`,"tunnel_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===a$?"check":"content_copy"})}),(0,d.jsx)("button",{onClick:()=>al(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!W||ac||Y?ac?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),ae||"Creating tunnel..."]}),(0,d.jsx)("button",{onClick:()=>{ad(!1),af("")},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ag?.type==="error"?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ag.message]}),(0,d.jsx)(h.$n,{size:"sm",icon:"cloud_upload",onClick:()=>aj(!0),children:"Enable"})]}):U?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,d.jsx)("button",{onClick:()=>V(!1),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,d.jsx)(h.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{a0?ah({type:"error",message:`Security required: ${a1}`}):A?aj(!0):ah({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),aR?"Tunnel reconnecting...":"Tunnel checking..."]}),(0,d.jsx)("button",{onClick:()=>al(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${am?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tailscale"}),am&&!as&&ao?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.pd,{value:`${aq}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,d.jsx)("button",{onClick:()=>a_(`${aq}/v1`,"ts_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===a$?"check":"content_copy"})}),(0,d.jsx)("button",{onClick:()=>aP(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!am||as||ao?as||aK?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),au||"Connecting..."]}),ay&&(0,d.jsx)(h.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(ay,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:aA||"Open"}),(0,d.jsx)("button",{onClick:()=>{at(!1),aL(!1),av(""),be()},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):aw?.type==="error"?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),aw.message]}),(0,d.jsx)(h.$n,{size:"sm",icon:"vpn_lock",onClick:bi,children:"Enable"})]}):(0,d.jsx)(h.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{a0?ax({type:"error",message:`Security required: ${a1}`}):bi()},className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Enable"}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),aT?"Tailscale reconnecting...":"Tailscale checking..."]}),(0,d.jsx)("button",{onClick:()=>aP(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]})]}),a0&&!W&&!am&&(0,d.jsx)("div",{className:"mt-4",children:(0,d.jsx)(r,{message:a1,action:{label:"Open settings",href:"/dashboard/profile"}})}),(W||am)&&(0,d.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!A&&(0,d.jsx)(r,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!C||!E)&&(0,d.jsx)(r,{message:C?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:C?"Change password":"Enable",href:"/dashboard/profile"}})]}),(W||am)&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[(0,d.jsx)(h.lM,{checked:G,onChange:()=>a2(!G)}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),(0,d.jsx)(q,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),(0,d.jsxs)(h.Zp,{id:"rtk",children:[(0,d.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,d.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,d.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,d.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,d.jsx)(h.lM,{checked:I,onChange:()=>a4(!I)})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,d.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[K&&(0,d.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,d.jsx)("div",{className:"flex items-center gap-1.5",children:aZ.map(a=>(0,d.jsx)("button",{onClick:()=>{var b;N(b=a.id),a5({cavemanLevel:b})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${M===a.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:a.desc,children:a.label},a.id))}),(0,d.jsx)("p",{className:"text-xs text-primary",children:l.find(a=>a.id===M)?.desc})]}),(0,d.jsx)(h.lM,{checked:K,onChange:()=>{var a;L(a=!K),a5({cavemanEnabled:a})}})]})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between pt-4 border-t border-border gap-4 flex-wrap",children:[(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("p",{className:"font-medium",children:["Lazy code style"," ",(0,d.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Ponytail)"})]}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"YAGNI ladder → shortest diff, minimal code"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[O&&(0,d.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,d.jsx)("div",{className:"flex items-center gap-1.5",children:m.map(a=>(0,d.jsx)("button",{onClick:()=>{var b;R(b=a.id),a5({ponytailLevel:b})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${Q===a.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:a.desc,children:a.label},a.id))}),(0,d.jsx)("p",{className:"text-xs text-primary",children:m.find(a=>a.id===Q)?.desc})]}),(0,d.jsx)(h.lM,{checked:O,onChange:()=>{var a;P(a=!O),a5({ponytailEnabled:a})}})]})]})]}),(0,d.jsxs)(h.Zp,{id:"require-api-key",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,d.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,d.jsx)(h.$n,{icon:"add",onClick:()=>t(!0),children:"Create Key"})]}),(0,d.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,d.jsx)(h.lM,{checked:A,onChange:()=>a3(!A)})]}),aX&&!A&&(0,d.jsx)("div",{className:"mb-4 -mt-2",children:(0,d.jsx)(r,{message:"Endpoint is exposed without an API key."})}),0===b.length?(0,d.jsxs)("div",{className:"text-center py-12",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,d.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,d.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,d.jsx)(h.$n,{icon:"add",onClick:()=>t(!0),children:"Create Key"})]}):(0,d.jsx)("div",{className:"flex flex-col",children:b.map(a=>{var b;return(0,d.jsxs)("div",{className:`group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:a.name}),(0,d.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono",children:aV.has(a.id)?a.key:(b=a.key)?b.length>8?b.slice(0,8)+"...":b:""}),(0,d.jsx)("button",{onClick:()=>{var b;return b=a.id,void aW(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:aV.has(a.id)?"Hide key":"Show key",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:aV.has(a.id)?"visibility_off":"visibility"})}),(0,d.jsx)("button",{onClick:()=>a_(a.key,a.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:a$===a.id?"check":"content_copy"})})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(a.createdAt).toLocaleDateString()]}),!1===a.isActive&&(0,d.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(h.lM,{size:"sm",checked:a.isActive??!0,onChange:b=>{a.isActive&&!b?z({title:"Pause API Key",message:`Pause API key "${a.name}"?
2
2
 
3
- This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{y(null),bg(a.id,b)}}):bg(a.id,b)},title:a.isActive?"Pause key":"Resume key"}),(0,d.jsx)("button",{onClick:()=>bf(a.id),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},a.id)})})]}),(0,d.jsx)(h.aF,{isOpen:r,title:"Create API Key",onClose:()=>{s(!1),u("")},children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(h.pd,{label:"Key Name",value:t,onChange:a=>u(a.target.value),placeholder:"Production Key"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:be,fullWidth:!0,disabled:!t.trim(),children:"Create"}),(0,d.jsx)(h.$n,{onClick:()=>{s(!1),u("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,d.jsx)(h.aF,{isOpen:!!v,title:"API Key Created",onClose:()=>w(null),children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,d.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,d.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.pd,{value:v||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,d.jsx)(h.$n,{variant:"secondary",icon:"created_key"===aV?"check":"content_copy",onClick:()=>aW(v,"created_key"),children:"created_key"===aV?"Copied!":"Copy"})]}),(0,d.jsx)(h.$n,{onClick:()=>w(null),fullWidth:!0,children:"Done"})]})}),(0,d.jsx)(h.aF,{isOpen:ad,title:"Enable Tunnel",onClose:()=>ae(!1),children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local ZevaiRouter to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,d.jsx)("div",{className:"grid grid-cols-2 gap-3",children:k.map(a=>(0,d.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:a.icon}),(0,d.jsx)("p",{className:"text-xs font-semibold",children:a.title}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:a.desc})]},a.title))}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:a3,fullWidth:!0,children:"Start Tunnel"}),(0,d.jsx)(h.$n,{onClick:()=>ae(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,d.jsx)(h.aF,{isOpen:af,title:"Disable Tunnel",onClose:()=>!Z&&ag(!1),children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:a4,fullWidth:!0,disabled:Z,variant:"danger",children:Z?"Disabling...":"Disable"}),(0,d.jsx)(h.$n,{onClick:()=>ag(!1),variant:"ghost",fullWidth:!0,disabled:Z,children:"Cancel"})]})]})}),(0,d.jsx)(h.aF,{isOpen:aH,title:"Tailscale Funnel",onClose:()=>{az||(aI(!1),aE(""),as(null))},children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[null===ax&&(0,d.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===ax&&!az&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:a6,fullWidth:!0,children:"Install Tailscale"}),(0,d.jsx)(h.$n,{onClick:()=>aI(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),az&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),aB.length>0&&(0,d.jsx)("div",{ref:aL,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:aB.map((a,b)=>(0,d.jsx)("div",{children:a},b))})]}),!0===ax&&!az&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:()=>ba(),fullWidth:!0,children:"Connect"}),(0,d.jsx)(h.$n,{onClick:()=>aI(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ar&&(0,d.jsx)(o,{status:ar})]})}),(0,d.jsx)(h.aF,{isOpen:aJ,title:"Disable Tailscale",onClose:()=>!an&&aK(!1),children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:bc,fullWidth:!0,disabled:an,variant:"danger",children:an?"Disabling...":"Disable"}),(0,d.jsx)(h.$n,{onClick:()=>aK(!1),variant:"ghost",fullWidth:!0,disabled:an,children:"Cancel"})]})]})}),(0,d.jsx)(h.uo,{isOpen:!!x,onClose:()=>y(null),onConfirm:x?.onConfirm,title:x?.title||"Confirm",message:x?.message,variant:"danger"})]})}function n({label:a,url:b,copyId:c,copied:e,onCopy:f,badge:g,actions:i}){return(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${"CF"===g||"TS"===g?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:a}),(0,d.jsx)(h.pd,{value:b,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,d.jsx)("button",{onClick:()=>f(b,c),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e===c?"check":"content_copy"})}),i]})}function o({status:a,className:b=""}){return(0,d.jsx)("div",{className:`p-2 rounded text-sm ${b} ${"success"===a.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===a.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===a.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:a.message.split(/(https?:\/\/[^\s]+)/g).map((a,b)=>/^https?:\/\//.test(a)?(0,d.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:a},b):a)})}function p({text:a}){return(0,d.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,d.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:a})]})}function q({message:a,action:b}){return(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,d.jsx)("p",{className:"text-xs flex-1",children:a}),b&&(0,d.jsx)("a",{href:b.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:b.href.startsWith("#")?a=>{a.preventDefault(),document.getElementById(b.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:b.label})]})}m.propTypes={machineId:g().string.isRequired}},51747:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/firda/zevairouter/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/firda/zevairouter/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js","default")},54603:(a,b,c)=>{"use strict";c.d(b,{Xj:()=>q});var d=c(19713),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(49120);let l=h().join(k.DATA_DIR,"machine-id"),m=h().join(k.DATA_DIR,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.DATA_DIR,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="9r-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}},71885:(a,b,c)=>{Promise.resolve().then(c.bind(c,51747))},87250:(a,b,c)=>{"use strict";c.d(b,{D:()=>e});var d=c(54603);async function e(){return await (0,d.Xj)()}},95853:(a,b,c)=>{Promise.resolve().then(c.bind(c,43173))}};
3
+ This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{z(null),bl(a.id,b)}}):bl(a.id,b)},title:a.isActive?"Pause key":"Resume key"}),(0,d.jsx)("button",{onClick:()=>bk(a.id),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},a.id)})})]}),(0,d.jsx)(h.aF,{isOpen:s,title:"Create API Key",onClose:()=>{t(!1),v("")},children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(h.pd,{label:"Key Name",value:u,onChange:a=>v(a.target.value),placeholder:"Production Key"}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:bj,fullWidth:!0,disabled:!u.trim(),children:"Create"}),(0,d.jsx)(h.$n,{onClick:()=>{t(!1),v("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,d.jsx)(h.aF,{isOpen:!!w,title:"API Key Created",onClose:()=>x(null),children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,d.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,d.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.pd,{value:w||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,d.jsx)(h.$n,{variant:"secondary",icon:"created_key"===a$?"check":"content_copy",onClick:()=>a_(w,"created_key"),children:"created_key"===a$?"Copied!":"Copy"})]}),(0,d.jsx)(h.$n,{onClick:()=>x(null),fullWidth:!0,children:"Done"})]})}),(0,d.jsx)(h.aF,{isOpen:ai,title:"Enable Tunnel",onClose:()=>aj(!1),children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local ZevaiRouter to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,d.jsx)("div",{className:"grid grid-cols-2 gap-3",children:k.map(a=>(0,d.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:a.icon}),(0,d.jsx)("p",{className:"text-xs font-semibold",children:a.title}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:a.desc})]},a.title))}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:a8,fullWidth:!0,children:"Start Tunnel"}),(0,d.jsx)(h.$n,{onClick:()=>aj(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,d.jsx)(h.aF,{isOpen:ak,title:"Disable Tunnel",onClose:()=>!ac&&al(!1),children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:a9,fullWidth:!0,disabled:ac,variant:"danger",children:ac?"Disabling...":"Disable"}),(0,d.jsx)(h.$n,{onClick:()=>al(!1),variant:"ghost",fullWidth:!0,disabled:ac,children:"Cancel"})]})]})}),(0,d.jsx)(h.aF,{isOpen:aM,title:"Tailscale Funnel",onClose:()=>{aE||(aN(!1),aJ(""),ax(null))},children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[null===aC&&(0,d.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===aC&&!aE&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:bb,fullWidth:!0,children:"Install Tailscale"}),(0,d.jsx)(h.$n,{onClick:()=>aN(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),aE&&(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),aG.length>0&&(0,d.jsx)("div",{ref:aQ,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:aG.map((a,b)=>(0,d.jsx)("div",{children:a},b))})]}),!0===aC&&!aE&&(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:()=>bf(),fullWidth:!0,children:"Connect"}),(0,d.jsx)(h.$n,{onClick:()=>aN(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),aw&&(0,d.jsx)(p,{status:aw})]})}),(0,d.jsx)(h.aF,{isOpen:aO,title:"Disable Tailscale",onClose:()=>!as&&aP(!1),children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(h.$n,{onClick:bh,fullWidth:!0,disabled:as,variant:"danger",children:as?"Disabling...":"Disable"}),(0,d.jsx)(h.$n,{onClick:()=>aP(!1),variant:"ghost",fullWidth:!0,disabled:as,children:"Cancel"})]})]})}),(0,d.jsx)(h.uo,{isOpen:!!y,onClose:()=>z(null),onConfirm:y?.onConfirm,title:y?.title||"Confirm",message:y?.message,variant:"danger"})]})}function o({label:a,url:b,copyId:c,copied:e,onCopy:f,badge:g,actions:i}){return(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${"CF"===g||"TS"===g?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:a}),(0,d.jsx)(h.pd,{value:b,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,d.jsx)("button",{onClick:()=>f(b,c),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e===c?"check":"content_copy"})}),i]})}function p({status:a,className:b=""}){return(0,d.jsx)("div",{className:`p-2 rounded text-sm ${b} ${"success"===a.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===a.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===a.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:a.message.split(/(https?:\/\/[^\s]+)/g).map((a,b)=>/^https?:\/\//.test(a)?(0,d.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:a},b):a)})}function q({text:a}){return(0,d.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,d.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:a})]})}function r({message:a,action:b}){return(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,d.jsx)("p",{className:"text-xs flex-1",children:a}),b&&(0,d.jsx)("a",{href:b.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:b.href.startsWith("#")?a=>{a.preventDefault(),document.getElementById(b.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:b.label})]})}n.propTypes={machineId:g().string.isRequired}},51747:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/firda/zevairouter/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/firda/zevairouter/src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.js","default")},54603:(a,b,c)=>{"use strict";c.d(b,{Xj:()=>q});var d=c(19713),e=c(73024),f=c.n(e),g=c(76760),h=c.n(g),i=c(77598),j=c.n(i),k=c(49120);let l=h().join(k.DATA_DIR,"machine-id"),m=h().join(k.DATA_DIR,"auth"),n=h().join(m,"cli-secret"),o=null,p=null;async function q(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt",c=function(){if(o)return o;try{if(o=f().readFileSync(l,"utf8").trim())return o}catch{}try{o=(0,d.machineIdSync)()}catch{o=j().randomUUID()}try{f().mkdirSync(k.DATA_DIR,{recursive:!0}),f().writeFileSync(l,o,{mode:384})}catch{}return o}(),e="9r-cli-auth"===b?function(){if(p)return p;try{if(p=f().readFileSync(n,"utf8").trim())return p}catch{}p=j().randomBytes(32).toString("hex");try{f().mkdirSync(m,{recursive:!0}),f().writeFileSync(n,p,{mode:384})}catch{}return p}():"";return j().createHash("sha256").update(c+b+e).digest("hex").substring(0,16)}},71885:(a,b,c)=>{Promise.resolve().then(c.bind(c,51747))},87250:(a,b,c)=>{"use strict";c.d(b,{D:()=>e});var d=c(54603);async function e(){return await (0,d.Xj)()}},95853:(a,b,c)=>{Promise.resolve().then(c.bind(c,43173))}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=8371,exports.ids=[8371],exports.modules={3662:(a,b,c)=>{c.d(b,{EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i,wf:()=>g});let d={400:{type:"invalid_request_error",code:"bad_request"},401:{type:"authentication_error",code:"invalid_api_key"},402:{type:"billing_error",code:"payment_required"},403:{type:"permission_error",code:"insufficient_quota"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},429:{type:"rate_limit_error",code:"rate_limit_exceeded"},500:{type:"server_error",code:"internal_server_error"},502:{type:"server_error",code:"bad_gateway"},503:{type:"server_error",code:"service_unavailable"},504:{type:"server_error",code:"gateway_timeout"}},e={400:"Bad request",401:"Invalid API key provided",402:"Payment required",403:"You exceeded your current quota",404:"Model not found",406:"Model not supported",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:3e5,maxLevel:15},g=3e4,h=18e5,i=[{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"improperly formed request",cooldownMs:12e4},{text:"rate limit",backoff:!0},{text:"too many requests",backoff:!0},{text:"quota exceeded",backoff:!0},{text:"capacity",backoff:!0},{text:"overloaded",backoff:!0},{status:401,cooldownMs:12e4},{status:402,cooldownMs:12e4},{status:403,cooldownMs:12e4},{status:404,cooldownMs:12e4},{status:429,backoff:!0}]},39609:(a,b,c)=>{c.d(b,{proxyAwareFetch:()=>r});var d=c(47774),e=c(27910),f=c(41004);let g=globalThis.fetch,h=new Map,i=new Map,j=["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","api2.cursor.sh"],k=["8.8.8.8","8.8.4.4"];function l(a){return null==a?"":String(a).trim()}async function m(a){let b=i.get(a);if(b&&Date.now()<b.expiry)return b.ip;try{let b=await Promise.resolve().then(c.t.bind(c,14985,23)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,23)),e=new b.Resolver;e.setServers(k);let g=d(e.resolve4.bind(e)),h=await g(a);return i.set(a,{ip:h[0],expiry:Date.now()+f.v1.dnsCacheTtlMs}),h[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function n(a,b){let c,d=l(b);if(!d)return!1;try{c=new URL(a).hostname.toLowerCase()}catch{return!1}return d.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.startsWith(".")?c.endsWith(a)||c===a.slice(1):c===a||c.endsWith(`.${a}`)))}function o(a){let b=l(a);if(!b)return null;try{return new URL(b),b}catch{return`http://${b}`}}async function p(a){let b=o(a);if(!b)return null;if(!h.has(b)){h.size>=f.v1.proxyDispatchersMaxSize&&h.delete(h.keys().next().value);let{ProxyAgent:a}=await Promise.resolve().then(c.t.bind(c,47774,19));h.set(b,new a({uri:b}))}return h.get(b)}async function q(a,b,d){let f=await Promise.resolve().then(c.t.bind(c,55591,23)),g=await Promise.resolve().then(c.t.bind(c,91645,23)),h=f.default??f,i=g.default??g;return new Promise((c,f)=>{let g=new i.Socket;g.connect(443,b,()=>{let b={socket:g,servername:a.hostname,path:a.pathname+a.search,method:d.method||"POST",headers:{...d.headers,Host:a.hostname}},i=h.request(b,a=>{let b={ok:a.statusCode>=200&&a.statusCode<300,status:a.statusCode,statusText:a.statusMessage,headers:new Map(Object.entries(a.headers)),body:e.Readable.toWeb(a),text:async()=>{let b=[];for await(let c of a)b.push(c);return Buffer.concat(b).toString()},json:async()=>JSON.parse(await b.text())};c(b)});i.on("error",f),d.body&&i.write("string"==typeof d.body?d.body:JSON.stringify(d.body)),i.end()}),g.on("error",f)})}async function r(a,b={},c=null){let e="string"==typeof a?a:a.toString(),f=l(c?.vercelRelayUrl);if(f){let a=new URL(e),c={...b.headers,"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return g(f,{...b,headers:c})}let h=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0)return null;let c=l(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=l(b?.noProxy??b?.connectionNoProxy);return d&&n(a,d)?null:o(c)}(e,c),i=h?null:o(function(a){let b;if(n(a,process.env.NO_PROXY||process.env.no_proxy))return null;try{b=new URL(a).protocol}catch{return null}return"https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy}(e)),k=h||i;if(function(a){try{let b=new URL(a).hostname;return j.some(a=>b.includes(a))}catch{return!1}}(e)){if(k)try{let c=await p(k);return await (0,d.hd)(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(e),c=await m(a.hostname);if(c)return await q(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}}if(k)try{let c=await p(k);return await (0,d.hd)(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${a.message}`)}return g(a,b)}async function s(a,b={}){return r(a,b,null)}globalThis.fetch!==s&&(globalThis.fetch=s)},41004:(a,b,c)=>{c.d(b,{C8:()=>l,DR:()=>k,Uc:()=>h,cI:()=>j,eo:()=>i,gx:()=>d,pH:()=>g,v1:()=>e,xM:()=>f}),c(3662);let d={BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,NOT_ACCEPTABLE:406,REQUEST_TIMEOUT:408,RATE_LIMITED:429,SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},e={sessionTtlMs:72e5,sessionCleanupIntervalMs:18e5,dnsCacheTtlMs:3e5,proxyDispatchersMaxSize:20},f=6e4,g=6e4,h=64e3,i=32e3,j={429:{attempts:0,delayMs:0},502:{attempts:3,delayMs:3e3},503:{attempts:3,delayMs:2e3},504:{attempts:2,delayMs:3e3}};function k(a){return null==a?{attempts:0,delayMs:2e3}:"number"==typeof a?{attempts:a,delayMs:2e3}:{attempts:a.attempts||0,delayMs:null!=a.delayMs?a.delayMs:2e3}}let l=["Please write a 5-10 word title for the following conversation:"]},48371:(a,b,c)=>{c.d(b,{xM:()=>V,t9:()=>X,TK:()=>W,cO:()=>e.cO,VU:()=>ab});var d=c(55511),e=c(53041),f=c(71998),g=c(89718),h=c(20116),i=c(92990),j=c(39609);let k=globalThis.fetch,l=new Set(["a timeout","is cancelled","is complete","number banned, when number already used"]);class m extends Error{constructor(a,{status:b,body:c}={}){super(a),this.name="FiveSimError",this.status=b,this.body=c}}class n extends m{constructor(a){super(`5sim order ${a} timed out waiting for SMS`),this.name="FiveSimTimeoutError",this.orderId=a}}class o extends m{constructor(a,b){super(`5sim order ${a} cancelled: ${b}`),this.name="FiveSimCancelledError",this.orderId=a}}class p extends m{constructor(a){super(`5sim order ${a} number was already used (banned)`),this.name="FiveSimBannedError",this.orderId=a}}class q{constructor({apiKey:a,proxyOptions:b=null}={}){if(!a||"string"!=typeof a||!a.trim())throw new m("5sim API key is required");this.apiKey=a.trim(),this.proxyOptions=b}_headers(a={}){return{Authorization:`Bearer ${this.apiKey}`,Accept:"application/json",...a}}async _get(a,{headers:b,...c}={}){let d=`https://5sim.net/v1${a}`,e=this.proxyOptions?.enabled?j.proxyAwareFetch:k,f=await e(d,{method:"GET",headers:this._headers(b),...c},this.proxyOptions);if(!f.ok){let b=await f.text().catch(()=>"");throw new m(`5sim request to ${a} failed (HTTP ${f.status}): ${b.slice(0,200)}`,{status:f.status,body:b})}let g=await f.text();try{return JSON.parse(g)}catch{if(g&&!g.startsWith("{"))throw new m(`5sim ${a} returned non-JSON: ${g.slice(0,200)}`,{status:f.status,body:g});return null}}async buyNumber({country:a="hongkong",operator:b="any",product:c="codebuddy",allowProductFallback:d=!1}={}){let e="codebuddy"===c&&d?["codebuddy","other"]:[c],f=null;for(let c of e){let g=`/user/buy/activation/${encodeURIComponent(a)}/${encodeURIComponent(b)}/${encodeURIComponent(c)}`;try{let a=await this._get(g);if(!a||!a.id||!a.phone)throw new m(`5sim buyNumber returned unexpected shape: ${JSON.stringify(a).slice(0,200)}`,{body:a});return a}catch(g){f=g;let a=g?.status,b=String(g?.body||g?.message||"").toLowerCase();if(!(d&&"codebuddy"===c&&e.includes("other")&&(400===a||404===a||b.includes("no free")||b.includes("not enough")||b.includes("no product"))))throw g}}throw f||new m("5sim buyNumber failed for all product candidates")}async checkOrder(a){return this._get(`/user/check/${a}`)}async pollCode(a,{timeoutMs:b=9e5,intervalMs:c=6e3,signal:d}={}){let e=Math.max(5e3,c),f=Date.now()+b,g=0;for(;Date.now()<f;){let b;if(d?.aborted)throw new o(a,"aborted by caller");try{b=await this.checkOrder(a)}catch(a){if(a instanceof m&&a.status>=500){if(++g>5)throw a;await s(e);continue}throw a}if(g=0,Array.isArray(b.sms)&&b.sms.length>0){let a=r(b.sms[b.sms.length-1]);if(a)return a}if(b.status&&l.has(b.status)){if("a timeout"===b.status)throw new n(a);if("number banned, when number already used"===b.status)throw new p(a);if("is cancelled"===b.status)throw new o(a,b.status);if("is complete"===b.status){let c=function(a){if(!Array.isArray(a))return null;for(let b=a.length-1;b>=0;b--){let c=r(a[b]);if(c)return c}return null}(b.sms);if(c)return c;throw new m(`5sim order ${a} completed but no SMS code found`,{body:b})}}await s(e)}throw new n(a)}async finishOrder(a){try{return await this._get(`/user/finish/${a}`),!0}catch(b){return console.warn(`[5sim] finishOrder(${a}) failed (best-effort): ${b.message}`),!1}}async cancelOrder(a){try{return await this._get(`/user/cancel/${a}`),!0}catch(b){return console.warn(`[5sim] cancelOrder(${a}) failed (best-effort): ${b.message}`),!1}}async banOrder(a){try{return await this._get(`/user/ban/${a}`),!0}catch(b){return console.warn(`[5sim] banOrder(${a}) failed (best-effort): ${b.message}`),!1}}async getBalance(){try{let a=await this._get("/user/profile");return{balance:a?.balance??null,rating:a?.rating??null}}catch(a){return console.warn(`[5sim] getBalance failed: ${a.message}`),{balance:null,rating:null}}}}function r(a){return a?a.code&&/\d{4,8}/.test(String(a.code))?String(a.code).match(/\d{4,8}/)[0]:a.text?function(a){if(!a)return null;let b=String(a).match(/\b(\d{4,8})\b/);return b?b[1]:null}(a.text):null:null}function s(a){return new Promise(b=>setTimeout(b,a))}let t=["https://www.codebuddy.cn/login/","https://www.codebuddy.cn/login","https://www.codebuddy.cn/register/","https://copilot.tencent.com/login/"],u=["text=手机号","div:has-text('手机号')","span:has-text('手机号')","[class*='phone']:has-text('手机号')","div.kc-phone-tab:has-text('手机号')"],v=["text=手机号","text=其他登录方式","text=微信","#phone-iframe",".login-phone-box"],w="#phone-iframe",x="#phoneNumber",y=".kc-country-option",z=".kc-country-code-text",A="#code",B=['iframe[src*="captcha"]','iframe[src*="tcaptcha"]',"#tcaptcha","#tcaptcha_transform",".nc_iconfont",".nc_wrapper",'[class*="captcha"]','[id*="captcha"]',"text=滑块","text=拖动"],C=['[class*="avatar"]','[class*="user-info"]','[class*="logout"]',"text=退出登录","text=Logout","text=Sign out"],D=["#input-error",".pf-c-form__helper-text.pf-m-error",".kc-feedback-text"];async function E({page:a,phone:b,resolvePhone:c,pollSmsPromise:d,waitForSms:e,onStep:f,phoneFormatter:g=a=>a,timeouts:h={}}){let i=h.nav??9e4,j=h.action??15e3,k=h.codeWait??9e5,l=h.postSubmit??1e4,m=(a,b)=>f?.(a,b);try{var n;let f,h;m("cn_opening_login_page","Opening CodeBuddy CN login page");try{await a.context().route("**/*",a=>{let b=a.request().url();return/googletagmanager|googleadservices|google-analytics|doubleclick|facebook|hotjar|clarity\.ms|hm\.baidu|google\.com\/rmkt/i.test(b)?a.abort():a.continue()})}catch{}let o=null;for(let b=1;b<=5;b++)try{let c=t[(b-1)%t.length];if(m("cn_nav_attempt",`Navigation attempt ${b}/5 → ${c}`),b>1&&(await a.context().clearCookies().catch(()=>{}),await a.waitForTimeout(1500)),await a.goto(c,{waitUntil:"commit",timeout:6e4}),await a.waitForTimeout(2500),!await I(a,v,6e4)){let b=await a.locator("body").innerText().catch(()=>""),c=await a.evaluate(()=>document.documentElement?.outerHTML?.length||0).catch(()=>0);m("cn_spa_not_ready",`SPA not ready after 60s (url=${a.url()}, body=${String(b).slice(0,80)}, html=${c})`),!b&&c<200&&m("cn_proxy_empty_page","Empty page body — proxy may be blocking codebuddy.cn");continue}m("cn_spa_ready","Login SPA ready"),m("cn_selecting_phone_tab","Selecting phone-number tab");let d=await H(a,u,{timeout:15e3});if(d?(await d.click().catch(()=>{}),m("cn_phone_tab_selected","Phone tab selected"),await a.waitForTimeout(1e3)):m("cn_phone_tab_not_found","Phone tab not found — checking if iframe already present"),m("cn_waiting_for_iframe","Waiting for phone iframe to load"),await a.locator(w).waitFor({state:"attached",timeout:25e3}).catch(()=>{}),o=await F(a)){if(await o.waitForSelector(x,{state:"visible",timeout:2e4}).then(()=>!0).catch(()=>!1)){m("cn_iframe_ready","Phone iframe + #phoneNumber ready");break}m("cn_iframe_empty","Iframe found but #phoneNumber not visible yet"),o=null}else m("cn_iframe_missing",`No #phone-iframe (attempt ${b}/5)`)}catch(a){m("cn_nav_retry",`Navigation attempt ${b}/5 failed: ${String(a.message||a).slice(0,120)}`)}if(!o)return{status:"failed",error:"Could not load CodeBuddy CN phone form after 5 attempts (proxy/SPA)"};await o.waitForSelector("#kc-form-login",{timeout:j}).catch(()=>{}),await o.waitForSelector(x,{state:"visible",timeout:j}).catch(()=>{});let p=b;if("function"==typeof c&&(m("cn_ordering_after_form","Login form ready — ordering 5sim number now (not before nav)"),p=await c()),!p)return{status:"failed",error:"No phone number available (resolvePhone/phone missing)"};let q=g(p),{countryCode:r,localNumber:s}=(n=q,(!(h=String(n).replace(/[\s\-()]/g,"")).startsWith("+")&&/^\d+$/.test(h)&&(h="+"+h),h.startsWith("+852"))?{countryCode:"+852",localNumber:h.slice(4)}:h.startsWith("+86")?{countryCode:"+86",localNumber:h.slice(3)}:h.startsWith("+1")?{countryCode:"+1",localNumber:h.slice(2)}:{countryCode:"",localNumber:h.replace(/^\+/,"")});m("cn_selecting_country",`Selecting country code ${r} for phone ${q}`),await G(o,r,j,m),m("cn_entering_phone",`Entering phone number: ${s}`);let y=o.locator(x).first();try{await y.waitFor({state:"visible",timeout:j})}catch{return{status:"failed",error:"Could not find the phone number input (#phoneNumber) inside the iframe"}}await J(y,s),m("cn_phone_entered",`Phone number entered: ${s}`);try{let b=a.locator(".t-checkbox").last();await b.isVisible({timeout:3e3}).catch(()=>!1)&&(await b.click().catch(()=>{}),m("cn_agreement_checked","Agreement checkbox checked"))}catch{}m("cn_clicking_send_code","Clicking send SMS code button");let z=o.locator("input.btn-lg.code-btn").first(),B=!1;try{await z.waitFor({state:"visible",timeout:5e3}),B=!0}catch{let a=o.locator(".code-btn").first();try{await a.waitFor({state:"visible",timeout:5e3}),B=!0}catch{B=!1}}if(!B)return{status:"failed",error:"Could not find the send-SMS-code button (.code-btn) inside the iframe"};await z.click().catch(()=>{}),m("cn_send_code_clicked","Send code button clicked"),await o.waitForSelector(A,{state:"visible",timeout:5e3}).catch(()=>{});let C=await R(o);if(C)return{status:"failed",error:`Form error after sending code: ${C}`};m("cn_waiting_for_sms","Waiting for SMS verification code from 5sim (timer starts now)");try{let a;if("function"==typeof e)a=Promise.resolve().then(()=>e());else if(d)a=d;else throw Error("No waitForSms/pollSmsPromise provided");let b=new Promise((a,b)=>setTimeout(()=>b(Error("Timed out waiting for SMS code")),k));f=await Promise.race([a,b])}catch(a){if(a&&"FiveSimTimeoutError"===a.name)throw a;return{status:"failed",error:`Failed to receive SMS code: ${a.message}`}}if(!f)return{status:"failed",error:"Received empty SMS code from 5sim"};m("cn_sms_received",`SMS code received: ${f}`),m("cn_entering_code","Entering SMS verification code");let D=o.locator(A).first();try{await D.waitFor({state:"visible",timeout:j})}catch{return{status:"failed",error:"Could not find the verification code input (#code) inside the iframe"}}await J(D,f),m("cn_code_entered","Verification code entered");let E=Math.max(l,2e4),K=!1;for(let b=0;b<3;b++){m("cn_submitting",`Clicking submit button (attempt ${b+1}/3)`);let c=await F(a);if(!c){let b=await M(a,{timeoutMs:5e3,reportStep:m});if(b.ok)return m("cn_session_cookies",`Keycloak session after iframe detach (${b.cookie})`),{status:"success"};return{status:"failed",error:"Lost phone iframe after submit"}}if(await c.locator(x).first().isVisible({timeout:3e3}).catch(()=>!1)&&b>0){m("cn_re_entering_after_refresh",`Re-entering phone + code after refresh (retry ${b})`),await G(c,r,j,m);let d=c.locator(x).first();await J(d,s);try{let b=a.locator(".t-checkbox").first();await b.isVisible({timeout:2e3}).catch(()=>!1)&&await b.click().catch(()=>{})}catch{}let e=c.locator(A).first();await e.isVisible({timeout:3e3}).catch(()=>!1)&&await J(e,f)}if(await N(c,j),m("cn_submitted",`Registration form submitted (attempt ${b+1})`),await a.waitForLoadState("domcontentloaded",{timeout:5e3}).catch(()=>{}),await a.waitForTimeout(1e3),c=await F(a)||c,await Q(c)){m("cn_account_restricted",`Account restricted (attempt ${b+1}) — refreshing page and retrying`),await a.reload({waitUntil:"domcontentloaded",timeout:i}).catch(()=>{}),await I(a,v,2e4);let c=await H(a,u,{timeout:j});c&&(await c.click().catch(()=>{}),await a.locator(w).waitFor({state:"attached",timeout:1e4}).catch(()=>{}));continue}if(m("cn_checking_captcha","Checking for captcha"),await S(a,c,3e3))return m("cn_captcha_detected","Captcha appeared during registration — manual assist needed"),{status:"needs_manual",error:"A captcha appeared during registration. Please complete it manually in the opened browser window.",captcha:!0};let d=await R(c);if(d)return{status:"failed",error:`Form error after submit: ${d}`};m("cn_waiting_session",`Waiting up to ${Math.round(E/1e3)}s for Keycloak session cookies`);let e=await M(a,{timeoutMs:E,reportStep:m,alsoCheckFrame:()=>F(a)});if(e.ok)return m("cn_session_cookies",`Keycloak session cookies present (${e.cookie}) — registration success`),{status:"success"};if(await O(a)&&b<2){m("cn_submit_no_effect","Login form still visible after submit — retrying");continue}m("cn_session_nudge","No session yet — navigating to home to complete OIDC handoff"),await a.goto("https://www.codebuddy.cn/",{waitUntil:"domcontentloaded",timeout:i}).catch(()=>{}),await a.waitForTimeout(2e3);let g=await M(a,{timeoutMs:1e4,reportStep:m});if(g.ok)return m("cn_session_cookies",`Keycloak session after home nudge (${g.cookie})`),{status:"success"};K=!0;break}if(!K)return m("cn_submit_retries_exhausted","Account restricted after 3 retries — needs manual"),{status:"needs_manual",error:"Account restricted after 3 refresh retries. Please try with a different VPN/proxy or complete manually."};m("cn_confirming_success","Confirming registration success");let L=await M(a,{timeoutMs:5e3});if(L.ok)return m("cn_registration_success",`Phone registration completed (Keycloak session: ${L.cookie})`),{status:"success"};if(await T(a,o,1e4))return m("cn_registration_success","Phone registration completed successfully (UI markers)"),{status:"success"};let U=await P(a);return m("cn_success_unconfirmed",`No Keycloak session after submit — ${U.summary}`),{status:"needs_manual",error:`Login submit finished but no Keycloak session yet (${U.summary}). Complete login in the headed browser or retry with a fresh China proxy.`}}catch(a){if(a&&"FiveSimTimeoutError"===a.name)throw a;return m("cn_automation_error",`Phone registration automation error: ${a.message}`),{status:"failed",error:a.message||"Unexpected error during phone registration"}}}async function F(a){try{await a.locator(w).waitFor({state:"attached",timeout:5e3});let b=await a.locator(w).elementHandle({timeout:2e3});if(b){let a=await b.contentFrame();if(a)return a}}catch{}for(let b of a.frames()){let a=b.url();if(a.includes("codebuddy.cn/auth/realms/copilot")||a.includes("protocol/openid-connect"))return b}return null}async function G(a,b,c,d){if(b)try{let e=a.locator(z).first(),f=await e.textContent({timeout:5e3}).catch(()=>""),g=String(f).trim();if(g===b)return void d?.("cn_country_already_selected",`Country code already ${b}`);d?.("cn_opening_country_dropdown",`Opening country dropdown (current: ${g}, target: ${b})`);let h=a.locator(".kc-country-selector").first();await h.waitFor({state:"visible",timeout:c}),await h.click().catch(()=>{}),await a.locator(y).first().waitFor({state:"visible",timeout:5e3}).catch(()=>{});let i=a.locator(y),j=await i.count();for(let c=0;c<j;c++){let e=i.nth(c),f=await e.textContent().catch(()=>"");if(String(f).includes(b)){await e.click().catch(()=>{}),await a.locator(z).filter({hasText:b}).first().waitFor({state:"visible",timeout:3e3}).catch(()=>{}),d?.("cn_country_selected",`Country selected: ${String(f).trim()}`);return}}d?.("cn_country_not_found",`Country code ${b} not found in dropdown; using default`),await a.locator("body").click().catch(()=>{})}catch(a){d?.("cn_country_select_error",`Country selection error: ${a.message}`)}}async function H(a,b,{timeout:c=1e4}={}){for(let d of b)try{let b=a.locator(d).first();return await b.waitFor({state:"visible",timeout:Math.min(c,5e3)}),b}catch{}return null}async function I(a,b,c=15e3){let d=Date.now()+c;for(;Date.now()<d;){for(let c of b)try{let b=a.locator(c).first();if(await b.isVisible().catch(()=>!1))return!0}catch{}await new Promise(a=>setTimeout(a,250))}return!1}async function J(a,b){try{return await a.click(),await a.fill(""),await a.fill(b),!0}catch{try{return await a.click(),await a.press("Control+a"),await a.type(b,{delay:50}),!0}catch{return!1}}}let K=["KEYCLOAK_IDENTITY","KEYCLOAK_SESSION","KEYCLOAK_IDENTITY_LEGACY","KEYCLOAK_SESSION_LEGACY"];function L(a=[]){for(let b of K)if(a.some(a=>a.name===b))return b;let b=a.find(a=>a.name.startsWith("KEYCLOAK_")&&!/locale|theme|restart/i.test(a.name));return b?.name||null}async function M(a,{timeoutMs:b=2e4,reportStep:c,alsoCheckFrame:d}={}){let e=Date.now()+b,f=0;for(;Date.now()<e;){let b=await a.context().cookies().catch(()=>[]),g=L(b);if(g)return{ok:!0,cookie:g,cookies:b};try{let c=a.url();if(c&&!c.includes("/login")&&!c.includes("/auth/realms")){let a=b.find(a=>/^(access_token|cb_token|codebuddy)/i.test(a.name)||"token"===a.name&&a.domain?.includes("codebuddy"));if(a)return{ok:!0,cookie:a.name,cookies:b}}}catch{}if(d){let a=await d().catch(()=>null);if(a){if(await Q(a))return{ok:!1,cookies:b,reason:"restricted"};let c=await R(a);if(c)return{ok:!1,cookies:b,reason:`form_error:${c}`}}}if(c&&Date.now()-f>4e3){f=Date.now();let a=Math.max(0,Math.round((e-Date.now())/1e3));c("cn_waiting_session",`Still waiting for Keycloak session… ${a}s left`)}await a.waitForTimeout(500)}return{ok:!1,cookies:await a.context().cookies().catch(()=>[])}}async function N(a,b=15e3){let c=a.locator("#kc-login").first();try{await c.waitFor({state:"visible",timeout:b}),await c.click({timeout:5e3}).catch(()=>{})}catch{}try{await a.evaluate(()=>{let a=document.querySelector("#kc-form-login")||document.querySelector("form");if(a)if("function"==typeof a.requestSubmit){let b=a.querySelector("#kc-login")||a.querySelector('[type="submit"]');b?a.requestSubmit(b):a.requestSubmit()}else a.submit()})}catch{await a.locator(A).first().press("Enter").catch(()=>{})}}async function O(a){let b=await F(a);return!!b&&b.locator(x).first().isVisible({timeout:1500}).catch(()=>!1)}async function P(a){let b="";try{b=a.url()}catch{b="(unknown)"}let c=(await a.context().cookies().catch(()=>[])).map(a=>a.name).slice(0,20).join(",")||"(none)",d="";try{d=await a.evaluate(()=>(document.body?.innerText||"").replace(/\s+/g," ").trim().slice(0,120))}catch{d=""}let e=await F(a),f="no-iframe";if(e)try{f=(await e.url()).slice(0,80)}catch{f="iframe-detached"}return{summary:`url=${b.slice(0,60)} cookies=[${c}] frame=${f}${d?` text="${d}"`:""}`,url:b,cookieNames:c,bodySnippet:d}}async function Q(a){try{let b=await a.evaluate(()=>document.body?.innerText||"");if(b.includes("账号访问受限")||b.includes("安全策略限制")||b.includes("访问受限"))return!0}catch{}return!1}async function R(a){for(let b of D)try{let c=a.locator(b).first();if(await c.isVisible({timeout:1500}).catch(()=>!1)){let a=await c.textContent().catch(()=>""),b=String(a).trim();if(b&&b.length>1)return b}}catch{}try{let b=await a.evaluate(()=>(document.body?.innerText||"").replace(/\s+/g," ").trim());for(let a of["验证码错误","验证码已过期","验证码无效","请输入正确的验证码","手机号格式","发送过于频繁","Invalid","incorrect"])if(b.includes(a)){let c=b.indexOf(a);return b.slice(Math.max(0,c-10),c+a.length+40).trim()}}catch{}return null}async function S(a,b,c=5e3){for(let b of B)try{let d=a.locator(b).first();if(await d.isVisible({timeout:Math.min(c,2e3)}).catch(()=>!1))return!0}catch{}if(b)for(let a of B)try{let d=b.locator(a).first();if(await d.isVisible({timeout:Math.min(c,2e3)}).catch(()=>!1))return!0}catch{}return!1}async function T(a,b,c=15e3){try{let b=await a.context().cookies().catch(()=>[]);if(L(b))return!0}catch{}for(let b of C)try{let d=a.locator(b).first();if(await d.isVisible({timeout:Math.min(c,2e3)}).catch(()=>!1))return!0}catch{}try{let b=a.url(),c=await a.context().cookies().catch(()=>[]),d=new Set(c.map(a=>a.name));if(b&&!b.includes("/login")&&!b.includes("/auth/realms")&&(d.has("qcloud_uid")||d.has("qcmainCSRFToken"))&&!d.has("login_risk_state")&&!await O(a).catch(()=>!1))return!0}catch{}return!1}var U=c(40891);let V=200,W=new Set(["hongkong","china","any"]),X="hongkong";function Y(a){return String(a||"").trim()}async function Z({apiKey:a,phone:b,region:d,fiveSimOrderId:e,account:f}){let{createProviderConnection:g}=await Promise.resolve().then(c.bind(c,71998)),h={provider:"codebuddy-cn",authType:"apikey",apiKey:a,accessToken:a,name:b||`5sim-${e}`,email:b||`5sim-${e}`,providerSpecificData:{domain:"www.codebuddy.cn",phoneNumber:b,fiveSimOrderId:e,region:d,automation:"5sim-phone-bulk"},testStatus:"active"};return{connection:await g(h)}}class $ extends e.Q6{constructor({browserLauncher:a,requestDeviceCodeFn:b=U.cT,pollToken:d=U.ZV,fetchLoginAccountFn:e=U.w8,saveConnection:f=Z,fiveSimClientFactory:g=_,phoneAutomation:h=E,phoneFormatter:j=Y,pollIntervalMs:k=i.ne.pollInterval,storageName:l="codebuddy-cn-bulk-import"}={}){super({browserLauncher:a||(async a=>{let{launchBulkImportBrowser:b}=await c.e(5949).then(c.bind(c,75949)),d=Array.isArray(a?.proxyUrls)&&a.proxyUrls.length?a.proxyUrls[0]:null;return b({engine:a?.engine||"camoufox",proxyUrl:d,headless:!1,windowSize:{width:900,height:700}})}),storageName:l}),this.requestDeviceCode=b,this.pollToken=d,this.fetchLoginAccount=e,this.saveConnection=f,this.fiveSimClientFactory=g,this.phoneAutomation=h,this.phoneFormatter=j,this.pollIntervalMs=k}async startJob({count:a,concurrency:b,engine:g,proxyPoolMode:i,proxyPoolId:j,region:k}){let l=Number.parseInt(a,10);if(!Number.isFinite(l)||l<1)throw Object.assign(Error("At least one account is required (count >= 1)"),{error:"At least one account is required (count >= 1)"});if(l>V)throw Object.assign(Error(`Count exceeds maximum of ${V}`),{error:`Count exceeds maximum of ${V}`});let m=[...this.jobs.values()].find(a=>a&&("running"===a.status||"queued"===a.status||"needs_manual"===a.status)&&!a.cancelRequested);if(m)throw Object.assign(Error(`Another CodeBuddy CN job is still active (${m.jobId}). Cancel it or wait before starting again.`),{error:`Another CodeBuddy CN job is still active (${m.jobId}). Cancel it or wait before starting again.`});let n=W.has(k)?k:X,o=[];if("all"===i)o=(await (0,f.ui)({isActive:!0})).map(a=>a.proxyUrl).filter(Boolean);else if("single"===i&&j){let a=await (0,f.hr)(j);a?.isActive&&a?.proxyUrl&&(o=[a.proxyUrl])}let p=(0,d.randomUUID)(),q=(0,e.kF)(),{normalizeBulkImportEngine:r}=await c.e(5949).then(c.bind(c,75949)),s=g?r(g):"camoufox",t={jobId:p,status:"running",concurrency:function(a){if((0,h.uT)(a))return Math.min(8,Math.max(1,(0,h.q)()));let b=Number.parseInt(a,10);return Number.isFinite(b)?Math.min(8,Math.max(1,b)):2}(b),engine:s,proxyPoolMode:i||"none",proxyUrls:o,region:n,createdAt:q,startedAt:q,finishedAt:null,error:null,cancelRequested:!1,browser:null,nextIndex:0,manualFollowups:new Set,persistPromise:Promise.resolve(),lastPreview:null,lastPreviewCapturedAt:0,accounts:Array.from({length:l},(a,b)=>({line:b+1,region:n,phone:null,fiveSimOrderId:null,fiveSimActivationId:null,proxyUrl:null,abortController:new AbortController,status:"queued",error:null,connectionId:null,workerId:null,manualSession:null,runtimeSession:null,currentStep:"queued",updatedAt:q,logs:[(0,e.hn)("queued","Queued and waiting for an available worker")]}))};return this.jobs.set(p,t),this.latestJobId=p,await this.persistJobSnapshot(t,{forcePreview:!1}),this.runJob(p),aa(t)}getJob(a){let b=this.jobs.get(a);return b?aa(b):null}async getJobWithPreview(a){let b=this.jobs.get(a);return b?(await this.persistJobSnapshot(b,{forcePreview:!1}),aa(b,{preview:b.lastPreview||null})):null}async processAccount(a,b,c){if(a.cancelRequested||!a.browser)return void this.finalizeAccount(b,"cancelled",{error:"Job cancelled"});let d=null,f=null,h=!1,i=null;try{this.setAccountStep(b,"reading_settings","Reading 5sim API key from settings"),await this.persistJobSnapshot(a,{forcePreview:!0});let c=(await (0,g.mt)()).fiveSimApiKey;if(!c||!c.trim()){this.finalizeAccount(b,"failed",{error:"5sim API key not configured. Set it in the automation modal or dashboard settings.",step:"failed",message:"5sim API key not configured"}),await this.persistJobSnapshot(a,{forcePreview:!0});return}d=this.fiveSimClientFactory({apiKey:c,proxyOptions:null}),this.setAccountStep(b,"creating_browser","Creating browser context (before 5sim order)"),await this.persistJobSnapshot(a,{forcePreview:!0});let j=await (0,e.go)(a.browser,b.proxyUrl);i=j.context;let k=j.page;if(b.runtimeSession={context:i,page:k},a.cancelRequested)throw Error("Job cancelled before ordering phone number");this.setAccountStep(b,"registering","Running phone registration on CodeBuddy CN"),await this.persistJobSnapshot(a,{forcePreview:!0});let l=await this.phoneAutomation({page:k,resolvePhone:async()=>{if(a.cancelRequested)throw Error("Job cancelled before ordering phone number");this.setAccountStep(b,"ordering_number",`Form ready — ordering ${a.region} phone from 5sim (single buy)`),await this.persistJobSnapshot(a,{forcePreview:!0});let c=await d.buyNumber({country:a.region,product:"codebuddy",allowProductFallback:!1});return f=c.id,b.phone=c.phone,b.fiveSimOrderId=c.id,b.fiveSimActivationId=c.id,this.setAccountStep(b,"number_ordered",`Phone number ordered: ${c.phone} (1 buy, no re-order)`),await this.persistJobSnapshot(a,{forcePreview:!0}),c.phone},waitForSms:async()=>{if(!f)throw Error("Cannot poll SMS — no 5sim order id");this.setAccountStep(b,"sms_poll_started","SMS poll started (full 90s window after send-code)"),await this.persistJobSnapshot(a,{forcePreview:!1});let c=await d.pollCode(f,{timeoutMs:9e4,signal:b.abortController?.signal});return h=!0,c},onStep:(c,d)=>{this.setAccountStep(b,c,d),this.persistJobSnapshot(a,{forcePreview:!1})},phoneFormatter:this.phoneFormatter});if("failed"===l.status){let c=l.error||"Phone registration failed before submit";this.finalizeAccount(b,"failed",{error:c,step:"failed",message:c}),d&&f&&(h?await d.finishOrder(f):await d.cancelOrder(f)),b.runtimeSession=null,await i.close().catch(()=>null),await this.persistJobSnapshot(a,{forcePreview:!0});return}await this.captureApiKey(a,b,i,k,d,f);return}catch(g){let c=g instanceof n,e=c?"SMS OTP not received within 90s — number banned":g.message||"Unexpected CodeBuddy CN bulk import failure";this.finalizeAccount(b,"failed",{error:e,step:c?"sms_timeout":"failed",message:e}),d&&f&&(h?await d.finishOrder(f):c?await d.banOrder(f):await d.cancelOrder(f)),b.runtimeSession=null,i&&await i.close().catch(()=>null),await this.persistJobSnapshot(a,{forcePreview:!0})}}async captureApiKey(a,b,c,d,e,f){let g="personal-edition-user-id";try{this.setAccountStep(b,"waiting_session","Establishing CodeBuddy console session (probe APIs, not just cookies)"),await this.persistJobSnapshot(a,{forcePreview:!0});let h=async()=>{let a=await c.cookies().catch(()=>[]);return{cookies:a,names:new Set(a.map(a=>a.name)),list:a.map(a=>a.name)}},i=a=>a.has("KEYCLOAK_IDENTITY")||a.has("KEYCLOAK_SESSION")||a.has("KEYCLOAK_IDENTITY_LEGACY")||a.has("KEYCLOAK_SESSION_LEGACY"),j=a=>a.has("AUTH_SESSION_ID")||a.has("session")||a.has("qcloud_uid")||a.has("qcmainCSRFToken"),k=async()=>d.evaluate(async()=>{try{let a=await fetch("/console/accounts",{credentials:"include",headers:{Accept:"application/json, text/plain, */*","x-requested-with":"XMLHttpRequest","X-Domain":window.location.hostname||"www.codebuddy.cn"}}),b=await a.json().catch(()=>null);return{status:a.status,data:b}}catch(a){return{status:0,error:a?.message||String(a)}}}).catch(()=>null),l=a=>a?.data?.data?.accounts||a?.data?.accounts||[],m=["https://www.codebuddy.cn/","https://www.codebuddy.cn/login/","https://www.codebuddy.cn/console","https://www.codebuddy.cn/profile","https://www.codebuddy.cn/profile/keys"],n=[],o=null,p=!1;for(let c=0;c<18;c+=1){if(a.cancelRequested)throw Error("Job cancelled while establishing session");let e=await h(),f=i(e.names),g=j(e.names),q=m[Math.min(c,m.length-1)];if(0===c||2===c||5===c||8===c||12===c?(this.setAccountStep(b,"waiting_session",`OIDC handoff attempt ${c+1}/18 → ${q} (cookies: ${f?"KEYCLOAK":g?"soft-session":"weak"})`),await this.persistJobSnapshot(a,{forcePreview:!1}),await d.goto(q,{waitUntil:"domcontentloaded",timeout:45e3}).catch(()=>null),await d.waitForTimeout(2500)):await d.waitForTimeout(1500),c>=3&&!String(d.url()||"").includes("/console")&&(await d.goto("https://www.codebuddy.cn/console",{waitUntil:"domcontentloaded",timeout:45e3}).catch(()=>null),await d.waitForTimeout(1500)),o=await k(),n=l(o),o?.status===200&&Array.isArray(n)&&n.length>0){p=!0,this.setAccountStep(b,"session_ready",`Console session accepted (HTTP 200, ${n.length} account(s)${f?", KEYCLOAK ok":", soft session"})`),await this.persistJobSnapshot(a,{forcePreview:!0});break}this.setAccountStep(b,"resolving_enterprise",`Console not ready (HTTP ${o?.status||0}) — retry ${c+1}/18`),await this.persistJobSnapshot(a,{forcePreview:!1})}if(!p||!Array.isArray(n)||0===n.length){let a=await h();throw Error(`Console accounts unavailable after login (HTTP ${o?.status||0}; cookies: ${a.list.slice(0,18).join(",")||"(none)"}) — session not accepted for API key`)}let q=g,r=n.find(a=>a?.lastLogin)||n[0];r?.type&&"personal"!==r.type&&r.enterpriseId&&(q=r.enterpriseId),this.setAccountStep(b,"creating_api_key",`Creating API key (enterprise=${q})`),await this.persistJobSnapshot(a,{forcePreview:!0});let s=async a=>d.evaluate(async({enterpriseId:a})=>{let b=await fetch("/console/api/client/v1/api-keys",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json, text/plain, */*","x-requested-with":"XMLHttpRequest","X-Domain":window.location.hostname||"www.codebuddy.cn","X-Product":"SaaS"},body:JSON.stringify({name:`zevai-router-${Date.now()}`,expire_in_days:365,user_enterprise_id:a})}),c=await b.json().catch(()=>null);return{ok:b.ok,status:b.status,data:c}},{enterpriseId:a}),t=await s(q).catch(()=>null);t&&t.ok||(this.setAccountStep(b,"retrying_api_key","Retrying API key creation from profile/keys"),await this.persistJobSnapshot(a,{forcePreview:!0}),await d.goto("https://www.codebuddy.cn/profile/keys",{waitUntil:"domcontentloaded",timeout:45e3}).catch(()=>null),await d.waitForTimeout(2500),t=await s(q).catch(()=>null)),t&&t.ok||q===g||(t=await s(g).catch(()=>null));let u=t?.status;if(!t?.ok&&(401===u||403===u||0===u||!t)){for(let c of(this.setAccountStep(b,"retrying_api_key","API key 401/403 — re-running OIDC handoff then retry"),await this.persistJobSnapshot(a,{forcePreview:!0}),["https://www.codebuddy.cn/login/","https://www.codebuddy.cn/","https://www.codebuddy.cn/console","https://www.codebuddy.cn/profile/keys"]))await d.goto(c,{waitUntil:"domcontentloaded",timeout:45e3}).catch(()=>null),await d.waitForTimeout(2e3);t=await s(g).catch(()=>null)}let v=t?.data?.code;if(!t||!t.ok||!t.data||0!==v&&200!==v&&void 0!==v)throw Error(`API key creation failed (HTTP ${t?.status??"no-response"}, code=${v??"n/a"}): ${JSON.stringify(t?.data??null).slice(0,200)}`);let w=t.data?.data||t.data,x=w?.apiKey||w?.key||w?.token||w?.secret||w?.api_key||("string"==typeof w?w:null)||t.data.apiKey||t.data.key||t.data.token||t.data.secret;if(!x||"string"!=typeof x)throw Error(`API key response did not contain a key field: ${JSON.stringify(t.data).slice(0,300)}`);this.setAccountStep(b,"api_key_created","API key created successfully"),await this.persistJobSnapshot(a,{forcePreview:!0}),this.setAccountStep(b,"saving_connection","Saving CodeBuddy CN connection"),await this.persistJobSnapshot(a,{forcePreview:!0});let{connection:y}=await this.saveConnection({apiKey:x,phone:b.phone,region:b.region,fiveSimOrderId:f,account:b});await e.finishOrder(f),this.finalizeAccount(b,"success",{connectionId:y.id,step:"connection_saved",message:`CodeBuddy CN connection saved (phone: ${b.phone})`}),b.runtimeSession=null,await c.close().catch(()=>null),await this.persistJobSnapshot(a,{forcePreview:!0})}catch(g){this.finalizeAccount(b,"needs_manual",{error:`Registration succeeded but API key capture failed: ${g.message}`,step:"awaiting_manual",message:`Registration done, API key capture failed: ${g.message}`}),await e.finishOrder(f).catch(()=>null),await this.persistJobSnapshot(a,{forcePreview:!0}),await this.runCnManualFollowup(a,b,b.workerId,c,d,e,f)}}async runCnManualFollowup(a,b,c,d,e,f,g){let h=(async()=>{let c=async()=>{let a=b.manualSession,c=a?.context||d,e=a?.headedBrowser||null;c&&await c.close().catch(()=>null),e&&await e.close().catch(()=>null)};try{this.setAccountStep(b,"manual_waiting","Waiting for operator to complete in headed browser"),await this.persistJobSnapshot(a,{forcePreview:!0});let c=Date.now()+9e5,d=null;for(;Date.now()<c&&!a.cancelRequested;){await new Promise(a=>setTimeout(a,1e4));try{if(!e.url().includes("codebuddy.cn"))continue;let a=await e.evaluate(async()=>{let a=await fetch("/console/api/client/v1/api-keys",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json, text/plain, */*","x-requested-with":"XMLHttpRequest","X-Domain":window.location.hostname||"www.codebuddy.cn","X-Product":"SaaS"},credentials:"include",body:JSON.stringify({name:"zevai-router-manual-"+Date.now(),expire_in_days:365,user_enterprise_id:"personal-edition-user-id"})}),b=await a.json().catch(()=>null);return{ok:a.ok,status:a.status,data:b}});if(a?.ok&&a.data){let b=a.data?.data||a.data;if((d=b?.apiKey||b?.key||b?.token||b?.secret||b?.api_key||("string"==typeof b?b:null))&&"string"==typeof d)break}}catch{}}if(a.cancelRequested){this.finalizeAccount(b,"cancelled",{error:"Job cancelled",step:"cancelled",message:"Job cancelled while waiting for manual completion"}),await this.persistJobSnapshot(a,{forcePreview:!0});return}if(!d)throw Error("Manual assist timed out — could not capture API key");this.setAccountStep(b,"saving_connection","Saving CodeBuddy CN connection (manual)"),await this.persistJobSnapshot(a,{forcePreview:!0});let{connection:f}=await this.saveConnection({apiKey:d,phone:b.phone,region:b.region,fiveSimOrderId:g,account:b});this.finalizeAccount(b,"success",{connectionId:f.id,step:"connection_saved",message:`CodeBuddy CN connection saved via manual assist (phone: ${b.phone||"N/A"})`}),await this.persistJobSnapshot(a,{forcePreview:!0})}catch(c){a.cancelRequested?this.finalizeAccount(b,"cancelled",{error:"Job cancelled",step:"cancelled",message:"Job cancelled while waiting for manual completion"}):this.finalizeAccount(b,"failed",{error:c.message||"Manual assist flow failed",step:"failed",message:c.message||"Manual assist flow failed"}),await this.persistJobSnapshot(a,{forcePreview:!0})}finally{await c(),b.manualSession=null,b.runtimeSession=null,a.manualFollowups.delete(h),await this.persistJobSnapshot(a,{forcePreview:!0})}})();a.manualFollowups.add(h)}cancelJob(a){let b=this.jobs.get(a);if(!b)return null;for(let a of(b.cancelRequested=!0,b.accounts))a.abortController&&!a.abortController.signal.aborted&&a.abortController.abort();return"queued"===b.status&&(b.status="cancelled",b.finishedAt=(0,e.kF)(),b.accounts.forEach(a=>{"queued"===a.status&&(a.status="cancelled")})),b}}function _({apiKey:a,proxyOptions:b}){return new q({apiKey:a,proxyOptions:b})}function aa(a,b={}){return a?{jobId:a.jobId,status:a.status,summary:function(a=[]){let b={total:a.length,queued:0,running:0,completed:0,success:0,failed:0,needs_manual:0,cancelled:0};for(let c of a){let a=c.status||"queued";"success"===a?(b.success+=1,b.completed+=1):"failed"===a||"failed_exchange"===a?(b.failed+=1,b.completed+=1):"needs_manual"===a?b.needs_manual+=1:"cancelled"===a?(b.cancelled+=1,b.completed+=1):"running"===a?b.running+=1:b.queued+=1}return b}(a.accounts),concurrency:a.concurrency,engine:a.engine,proxyPoolMode:a.proxyPoolMode,region:a.region,createdAt:a.createdAt,startedAt:a.startedAt,finishedAt:a.finishedAt,error:a.error,cancelRequested:a.cancelRequested,accounts:(a.accounts||[]).map(a=>({line:a.line,region:a.region,phone:a.phone,fiveSimOrderId:a.fiveSimOrderId,proxyUrl:a.proxyUrl?function(a){if(!a)return null;try{let b=new URL(a);return b.password&&(b.password="***"),b.toString()}catch{return a}}(a.proxyUrl):null,status:a.status,error:a.error,connectionId:a.connectionId,workerId:a.workerId,manualSessionAvailable:!!a.manualSession,currentStep:a.currentStep,updatedAt:a.updatedAt,logs:a.logs||[]})),preview:void 0!==b.preview?b.preview:a.lastPreview||null,...b}:null}function ab(){return(!globalThis.__codeBuddyCnBulkImportSingleton&&(globalThis.__codeBuddyCnBulkImportSingleton={manager:new $}),globalThis.__codeBuddyCnBulkImportSingleton).manager}}};
@@ -1 +1 @@
1
- "use strict";exports.id=8590,exports.ids=[8590],exports.modules={3662:(a,b,c)=>{c.d(b,{EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i,wf:()=>g});let d={400:{type:"invalid_request_error",code:"bad_request"},401:{type:"authentication_error",code:"invalid_api_key"},402:{type:"billing_error",code:"payment_required"},403:{type:"permission_error",code:"insufficient_quota"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},429:{type:"rate_limit_error",code:"rate_limit_exceeded"},500:{type:"server_error",code:"internal_server_error"},502:{type:"server_error",code:"bad_gateway"},503:{type:"server_error",code:"service_unavailable"},504:{type:"server_error",code:"gateway_timeout"}},e={400:"Bad request",401:"Invalid API key provided",402:"Payment required",403:"You exceeded your current quota",404:"Model not found",406:"Model not supported",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:3e5,maxLevel:15},g=3e4,h=18e5,i=[{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"improperly formed request",cooldownMs:12e4},{text:"rate limit",backoff:!0},{text:"too many requests",backoff:!0},{text:"quota exceeded",backoff:!0},{text:"capacity",backoff:!0},{text:"overloaded",backoff:!0},{status:401,cooldownMs:12e4},{status:402,cooldownMs:12e4},{status:403,cooldownMs:12e4},{status:404,cooldownMs:12e4},{status:429,backoff:!0}]},8590:(a,b,c)=>{c.d(b,{$B:()=>x,I9:()=>p,Og:()=>m,Ql:()=>t,Sc:()=>y,jR:()=>w,jT:()=>l,oD:()=>i,pb:()=>A,qZ:()=>B});var d=c(35024),e=c(75924),f=c(39609);let g=null;async function h(a,b){return a?k("xai",a,async()=>{try{g||(g=new(await Promise.all([c.e(3104),c.e(2030)]).then(c.bind(c,82030))).XaiService);let b=await g.refreshAccessToken(a);return{accessToken:b.access_token,refreshToken:b.refresh_token||a,expiresIn:b.expires_in,idToken:b.id_token}}catch(c){b?.warn?.("TOKEN_REFRESH",`xai refresh failed: ${c?.message||c}`);let a=String(c?.message||"");if(a.includes("invalid_grant")||a.includes("invalid_request"))return{error:"invalid_grant"};return null}},b):null}let i=3e5,j=new Map;async function k(a,b,c,d){if(!b)return c();let e=`${a}:${b}`,f=j.get(e);if(f){if(f.promise)return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),f.promise;if(f.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),f.result;j.delete(e)}let g=(async()=>{try{let a=await c();return j.set(e,{result:a,expiresAt:Date.now()+1e4}),a}catch(a){throw j.delete(e),a}})();return j.set(e,{promise:g}),g}function l(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}function m(a){return e.Wu[a]||i}async function n(a,b,c,e){let f=d.xq[a];return f&&f.refreshUrl?b?k(a,b,async()=>{try{let c=await fetch(f.refreshUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:b,client_id:f.clientId,client_secret:f.clientSecret})});if(!c.ok){let b=await c.text();return e?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:c.status,error:b}),null}let d=await c.json();return e?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||b,expiresIn:d.expires_in}}catch(b){return e?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},e):(e?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(e?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function o(a,b){return a?k("claude",a,async()=>{try{let c=await fetch(e.NA.anthropic.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.claude.clientId})});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Claude OAuth token",{status:c.status,error:a}),null}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Claude OAuth token",{hasNewAccessToken:!!f.access_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Claude token: ${a.message}`),null}},b):null}async function p(a,b,c,d){return a?k(`google:${b}`,a,async()=>{try{let f=await fetch(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c})});if(!f.ok){let a=await f.text();return d?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:f.status,error:a}),null}let g=await f.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!g.access_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return d?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},d):null}async function q(a,b){return a?k("qwen",a,async()=>{let c=e.NA.qwen.token;try{let e=await fetch(c,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.qwen.clientId})});if(200===e.status){let c=await e.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qwen token",{hasNewAccessToken:!!c.access_token,hasNewRefreshToken:!!c.refresh_token,expiresIn:c.expires_in}),{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,providerSpecificData:c.resource_url?{resourceUrl:c.resource_url}:void 0}}{let a=await e.text().catch(()=>"");b?.warn?.("TOKEN_REFRESH","Error with Qwen endpoint",{status:e.status,error:a})}}catch(a){b?.warn?.("TOKEN_REFRESH","Network error trying Qwen endpoint",{error:a.message})}return b?.error?.("TOKEN_REFRESH","Failed to refresh Qwen token"),null},b):null}async function r(a,b,c="codebuddy"){return a?k(c,a,async()=>{try{let e=d.xq[c]||d.xq.codebuddy,g=e.refreshUrl,h=e.domain||"www.codebuddy.ai",i=await (0,f.proxyAwareFetch)(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"CLI/2.63.2 CodeBuddy/2.63.2","X-Requested-With":"XMLHttpRequest","X-Domain":h,"X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!i.ok)return b?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${c}`,{status:i.status,error:await i.text().catch(()=>"")}),null;let j=await i.json(),k=j?.data||j,l=k?.accessToken||k?.access_token;if(!l)return null;return{accessToken:l,refreshToken:k?.refreshToken||k?.refresh_token||a,expiresIn:k?.expiresIn||k?.expires_in||86400}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing token for ${c}`,{error:a.message}),null}},b):null}async function s(a,b){return a?k("codex",a,async()=>{try{let c=await fetch(e.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:d.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a})});if(!c.ok){let a=await c.text(),d=function(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error?.code||c?.error||c?.error_code||"",e=c?.error_description||c?.message||a||"",f=`${d} ${e}`.toLowerCase();return{status:b,code:d,description:e,permanent:["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_grant"].some(a=>f.includes(a))}}(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Codex refresh token already used or invalid. Re-auth required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Codex token",{status:c.status,error:a,code:d.code,permanent:d.permanent}),null}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,hasIdToken:!!f.id_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,idToken:f.id_token,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function t(a,b,c,e=null){return a?k("kiro",a,async()=>{let g=b?.authMethod,h=b?.clientId,i=b?.clientSecret,j=b?.region;if(h&&i){let b="idc"===g&&j?`https://oidc.${j}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",d=await (0,f.proxyAwareFetch)(b,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:h,clientSecret:i,refreshToken:a,grantType:"refresh_token"})},e);if(!d.ok){let a=await d.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro AWS token",{status:d.status,error:a}),null}let k=await d.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!k.accessToken,expiresIn:k.expiresIn}),{accessToken:k.accessToken,refreshToken:k.refreshToken||a,expiresIn:k.expiresIn}}let k=await (0,f.proxyAwareFetch)(d.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:a})},e);if(!k.ok){let a=await k.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:k.status,error:a}),null}let l=await k.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!l.accessToken,expiresIn:l.expiresIn}),{accessToken:l.accessToken,refreshToken:l.refreshToken||a,expiresIn:l.expiresIn}},c):null}async function u(a,b){return a?k("iflow",a,async()=>{let c=btoa(`${d.xq.iflow.clientId}:${d.xq.iflow.clientSecret}`),f=await fetch(e.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.iflow.clientId,client_secret:d.xq.iflow.clientSecret})});if(!f.ok){let a=await f.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh iFlow token",{status:f.status,error:a}),null}let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed iFlow token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function v(a,b){return a?k("github",a,async()=>{let c={grant_type:"refresh_token",refresh_token:a,client_id:d.xq.github.clientId};d.xq.github.clientSecret&&(c.client_secret=d.xq.github.clientSecret);let f=await fetch(e.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(c)});if(!f.ok){let a=await f.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh GitHub token",{status:f.status,error:a}),null}let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed GitHub token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function w(a,b){return a?k("copilot",a,async()=>{try{let c=await fetch("https://api.github.com/copilot_internal/v2/token",{headers:{Authorization:`token ${a}`,"User-Agent":e.x0.USER_AGENT,"Editor-Version":`vscode/${e.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${e.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":e.x0.API_VERSION}});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Copilot token",{status:c.status,error:a}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!d.token,expiresAt:d.expires_at}),{token:d.token,expiresAt:d.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function x(a,b,c){if(!b.refreshToken)return null;switch(a){case"gemini-cli":case"antigravity":return p(b.refreshToken,d.xq[a].clientId,d.xq[a].clientSecret,c);case"claude":return o(b.refreshToken,c);case"codex":return s(b.refreshToken,c);case"qwen":return q(b.refreshToken,c);case"codebuddy":return r(b.refreshToken,c,"codebuddy");case"codebuddy-cn":return r(b.refreshToken,c,"codebuddy-cn");case"iflow":return u(b.refreshToken,c);case"github":return v(b.refreshToken,c);case"kiro":return t(b.refreshToken,b.providerSpecificData,c);case"xai":return h(b.refreshToken,c);case"vertex":case"vertex-partner":{let a=y(b.apiKey);if(!a)return null;return A(a,c)}default:return n(a,b.refreshToken,b,c)}}function y(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("service_account"===b.type&&b.client_email&&b.private_key&&b.project_id)return b;return null}catch{return null}}let z=new Map;async function A(a,b){let d=a.client_email,e=z.get(d);if(e&&e.expiresAt-Date.now()>3e5)return{accessToken:e.token,expiresAt:e.expiresAt};try{let{SignJWT:e,importPKCS8:f}=await Promise.all([c.e(6935),c.e(8971)]).then(c.bind(c,8971));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let g=await f(a.private_key.replace(/\\n/g,"\n"),"RS256"),h=Math.floor(Date.now()/1e3),i=await new e({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience("https://oauth2.googleapis.com/token").setIssuedAt(h).setExpirationTime(h+3600).sign(g),j=await fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i})});if(!j.ok){let a=await j.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:k,expires_in:l}=await j.json(),m=Date.now()+(l??3600)*1e3;return z.set(d,{token:k,expiresAt:m}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:k,expiresAt:m}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}async function B(a,b=3,c=null){for(let d=0;d<b;d++){if(d>0){let a=1e3*d;c?.debug?.("TOKEN_REFRESH",`Retry ${d}/${b} after ${a}ms`),await new Promise(b=>setTimeout(b,a))}try{let b=await a();if(b)return b}catch(a){c?.warn?.("TOKEN_REFRESH",`Attempt ${d+1}/${b} failed: ${a.message}`)}}return c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed`),null}},39609:(a,b,c)=>{c.d(b,{proxyAwareFetch:()=>q});var d=c(27910),e=c(41004);let f=globalThis.fetch,g=new Map,h=new Map,i=["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","api2.cursor.sh"],j=["8.8.8.8","8.8.4.4"];function k(a){return null==a?"":String(a).trim()}async function l(a){let b=h.get(a);if(b&&Date.now()<b.expiry)return b.ip;try{let b=await Promise.resolve().then(c.t.bind(c,14985,23)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,23)),f=new b.Resolver;f.setServers(j);let g=d(f.resolve4.bind(f)),i=await g(a);return h.set(a,{ip:i[0],expiry:Date.now()+e.v1.dnsCacheTtlMs}),i[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function m(a,b){let c,d=k(b);if(!d)return!1;try{c=new URL(a).hostname.toLowerCase()}catch{return!1}return d.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.startsWith(".")?c.endsWith(a)||c===a.slice(1):c===a||c.endsWith(`.${a}`)))}function n(a){let b=k(a);if(!b)return null;try{return new URL(b),b}catch{return`http://${b}`}}async function o(a){let b=n(a);if(!b)return null;if(!g.has(b)){g.size>=e.v1.proxyDispatchersMaxSize&&g.delete(g.keys().next().value);let{ProxyAgent:a}=await c.e(7774).then(c.t.bind(c,47774,19));g.set(b,new a({uri:b}))}return g.get(b)}async function p(a,b,e){let f=await Promise.resolve().then(c.t.bind(c,55591,23)),g=await Promise.resolve().then(c.t.bind(c,91645,23)),h=f.default??f,i=g.default??g;return new Promise((c,f)=>{let g=new i.Socket;g.connect(443,b,()=>{let b={socket:g,servername:a.hostname,path:a.pathname+a.search,method:e.method||"POST",headers:{...e.headers,Host:a.hostname}},i=h.request(b,a=>{let b={ok:a.statusCode>=200&&a.statusCode<300,status:a.statusCode,statusText:a.statusMessage,headers:new Map(Object.entries(a.headers)),body:d.Readable.toWeb(a),text:async()=>{let b=[];for await(let c of a)b.push(c);return Buffer.concat(b).toString()},json:async()=>JSON.parse(await b.text())};c(b)});i.on("error",f),e.body&&i.write("string"==typeof e.body?e.body:JSON.stringify(e.body)),i.end()}),g.on("error",f)})}async function q(a,b={},c=null){let d="string"==typeof a?a:a.toString(),e=k(c?.vercelRelayUrl);if(e){let a=new URL(d),c={...b.headers,"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return f(e,{...b,headers:c})}let g=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0)return null;let c=k(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=k(b?.noProxy??b?.connectionNoProxy);return d&&m(a,d)?null:n(c)}(d,c),h=g?null:n(function(a){let b;if(m(a,process.env.NO_PROXY||process.env.no_proxy))return null;try{b=new URL(a).protocol}catch{return null}return"https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy}(d)),j=g||h;if(function(a){try{let b=new URL(a).hostname;return i.some(a=>b.includes(a))}catch{return!1}}(d)){if(j)try{let c=await o(j);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(d),c=await l(a.hostname);if(c)return await p(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}}if(j)try{let c=await o(j);return await f(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${a.message}`)}return f(a,b)}async function r(a,b={}){return q(a,b,null)}globalThis.fetch!==r&&(globalThis.fetch=r)},41004:(a,b,c)=>{c.d(b,{C8:()=>l,DR:()=>k,Uc:()=>h,cI:()=>j,eo:()=>i,gx:()=>d,pH:()=>g,v1:()=>e,xM:()=>f}),c(3662);let d={BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,NOT_ACCEPTABLE:406,REQUEST_TIMEOUT:408,RATE_LIMITED:429,SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},e={sessionTtlMs:72e5,sessionCleanupIntervalMs:18e5,dnsCacheTtlMs:3e5,proxyDispatchersMaxSize:20},f=6e4,g=6e4,h=64e3,i=32e3,j={429:{attempts:0,delayMs:0},502:{attempts:3,delayMs:3e3},503:{attempts:3,delayMs:2e3},504:{attempts:2,delayMs:3e3}};function k(a){return null==a?{attempts:0,delayMs:2e3}:"number"==typeof a?{attempts:a,delayMs:2e3}:{attempts:a.attempts||0,delayMs:null!=a.delayMs?a.delayMs:2e3}}let l=["Please write a 5-10 word title for the following conversation:"]}};
1
+ "use strict";exports.id=8590,exports.ids=[8590],exports.modules={3662:(a,b,c)=>{c.d(b,{EQ:()=>f,LY:()=>d,O:()=>e,fh:()=>h,t2:()=>i,wf:()=>g});let d={400:{type:"invalid_request_error",code:"bad_request"},401:{type:"authentication_error",code:"invalid_api_key"},402:{type:"billing_error",code:"payment_required"},403:{type:"permission_error",code:"insufficient_quota"},404:{type:"invalid_request_error",code:"model_not_found"},406:{type:"invalid_request_error",code:"model_not_supported"},429:{type:"rate_limit_error",code:"rate_limit_exceeded"},500:{type:"server_error",code:"internal_server_error"},502:{type:"server_error",code:"bad_gateway"},503:{type:"server_error",code:"service_unavailable"},504:{type:"server_error",code:"gateway_timeout"}},e={400:"Bad request",401:"Invalid API key provided",402:"Payment required",403:"You exceeded your current quota",404:"Model not found",406:"Model not supported",429:"Rate limit exceeded",500:"Internal server error",502:"Bad gateway - upstream provider error",503:"Service temporarily unavailable",504:"Gateway timeout"},f={base:2e3,max:3e5,maxLevel:15},g=3e4,h=18e5,i=[{text:"no credentials",cooldownMs:12e4},{text:"request not allowed",cooldownMs:5e3},{text:"improperly formed request",cooldownMs:12e4},{text:"rate limit",backoff:!0},{text:"too many requests",backoff:!0},{text:"quota exceeded",backoff:!0},{text:"capacity",backoff:!0},{text:"overloaded",backoff:!0},{status:401,cooldownMs:12e4},{status:402,cooldownMs:12e4},{status:403,cooldownMs:12e4},{status:404,cooldownMs:12e4},{status:429,backoff:!0}]},8590:(a,b,c)=>{c.d(b,{$B:()=>x,I9:()=>p,Og:()=>m,Ql:()=>t,Sc:()=>y,jR:()=>w,jT:()=>l,oD:()=>i,pb:()=>A,qZ:()=>B});var d=c(35024),e=c(75924),f=c(39609);let g=null;async function h(a,b){return a?k("xai",a,async()=>{try{g||(g=new(await Promise.all([c.e(3104),c.e(2030)]).then(c.bind(c,82030))).XaiService);let b=await g.refreshAccessToken(a);return{accessToken:b.access_token,refreshToken:b.refresh_token||a,expiresIn:b.expires_in,idToken:b.id_token}}catch(c){b?.warn?.("TOKEN_REFRESH",`xai refresh failed: ${c?.message||c}`);let a=String(c?.message||"");if(a.includes("invalid_grant")||a.includes("invalid_request"))return{error:"invalid_grant"};return null}},b):null}let i=3e5,j=new Map;async function k(a,b,c,d){if(!b)return c();let e=`${a}:${b}`,f=j.get(e);if(f){if(f.promise)return d?.info?.("TOKEN_REFRESH",`Reusing in-flight refresh for ${a}`),f.promise;if(f.expiresAt>Date.now())return d?.info?.("TOKEN_REFRESH",`Reusing recent refresh result for ${a}`),f.result;j.delete(e)}let g=(async()=>{try{let a=await c();return j.set(e,{result:a,expiresAt:Date.now()+1e4}),a}catch(a){throw j.delete(e),a}})();return j.set(e,{promise:g}),g}function l(a){return a&&"object"==typeof a&&("unrecoverable_refresh_error"===a.error||"refresh_token_reused"===a.error||"invalid_request"===a.error||"invalid_grant"===a.error)}function m(a){return e.Wu[a]||i}async function n(a,b,c,e){let f=d.xq[a];return f&&f.refreshUrl?b?k(a,b,async()=>{try{let c=await fetch(f.refreshUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:b,client_id:f.clientId,client_secret:f.clientSecret})});if(!c.ok){let b=await c.text();return e?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${a}`,{status:c.status,error:b}),null}let d=await c.json();return e?.info?.("TOKEN_REFRESH",`Successfully refreshed token for ${a}`,{hasNewAccessToken:!!d.access_token,hasNewRefreshToken:!!d.refresh_token,expiresIn:d.expires_in}),{accessToken:d.access_token,refreshToken:d.refresh_token||b,expiresIn:d.expires_in}}catch(b){return e?.error?.("TOKEN_REFRESH",`Error refreshing token for ${a}`,{error:b.message}),null}},e):(e?.warn?.("TOKEN_REFRESH",`No refresh token available for provider: ${a}`),null):(e?.warn?.("TOKEN_REFRESH",`No refresh URL configured for provider: ${a}`),null)}async function o(a,b){return a?k("claude",a,async()=>{try{let c=await fetch(e.NA.anthropic.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.claude.clientId})});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Claude OAuth token",{status:c.status,error:a}),null}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Claude OAuth token",{hasNewAccessToken:!!f.access_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Claude token: ${a.message}`),null}},b):null}async function p(a,b,c,d){return a?k(`google:${b}`,a,async()=>{try{let f=await fetch(e.NA.google.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:b,client_secret:c})});if(!f.ok){let a=await f.text();return d?.error?.("TOKEN_REFRESH","Failed to refresh Google token",{status:f.status,error:a}),null}let g=await f.json();return d?.info?.("TOKEN_REFRESH","Successfully refreshed Google token",{hasNewAccessToken:!!g.access_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}}catch(a){return d?.error?.("TOKEN_REFRESH",`Network error refreshing Google token: ${a.message}`),null}},d):null}async function q(a,b){return a?k("qwen",a,async()=>{let c=e.NA.qwen.token;try{let e=await fetch(c,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.qwen.clientId})});if(200===e.status){let c=await e.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Qwen token",{hasNewAccessToken:!!c.access_token,hasNewRefreshToken:!!c.refresh_token,expiresIn:c.expires_in}),{accessToken:c.access_token,refreshToken:c.refresh_token||a,expiresIn:c.expires_in,providerSpecificData:c.resource_url?{resourceUrl:c.resource_url}:void 0}}{let a=await e.text().catch(()=>"");b?.warn?.("TOKEN_REFRESH","Error with Qwen endpoint",{status:e.status,error:a})}}catch(a){b?.warn?.("TOKEN_REFRESH","Network error trying Qwen endpoint",{error:a.message})}return b?.error?.("TOKEN_REFRESH","Failed to refresh Qwen token"),null},b):null}async function r(a,b,c="codebuddy"){return a?k(c,a,async()=>{try{let e=d.xq[c]||d.xq.codebuddy,g=e.refreshUrl,h=e.domain||"www.codebuddy.ai",i=await (0,f.proxyAwareFetch)(g,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"CLI/2.63.2 CodeBuddy/2.63.2","X-Requested-With":"XMLHttpRequest","X-Domain":h,"X-Refresh-Token":a,"X-Auth-Refresh-Source":"plugin","X-Product":"SaaS"},body:"{}"});if(!i.ok)return b?.error?.("TOKEN_REFRESH",`Failed to refresh token for ${c}`,{status:i.status,error:await i.text().catch(()=>"")}),null;let j=await i.json(),k=j?.data||j,l=k?.accessToken||k?.access_token;if(!l)return null;return{accessToken:l,refreshToken:k?.refreshToken||k?.refresh_token||a,expiresIn:k?.expiresIn||k?.expires_in||86400}}catch(a){return b?.error?.("TOKEN_REFRESH",`Error refreshing token for ${c}`,{error:a.message}),null}},b):null}async function s(a,b){return a?k("codex",a,async()=>{try{let c=await fetch(e.NA.openai.token,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({client_id:d.xq.codex.clientId,grant_type:"refresh_token",refresh_token:a})});if(!c.ok){let a=await c.text(),d=function(a="",b=0){let c=null;try{c=a?JSON.parse(a):null}catch{c=null}let d=c?.error?.code||c?.error||c?.error_code||"",e=c?.error_description||c?.message||a||"",f=`${d} ${e}`.toLowerCase();return{status:b,code:d,description:e,permanent:["refresh_token_expired","refresh_token_reused","refresh_token_invalidated","invalid_grant"].some(a=>f.includes(a))}}(a,c.status);if(d.permanent)return b?.error?.("TOKEN_REFRESH","Codex refresh token already used or invalid. Re-auth required.",{status:c.status,code:d.code}),{error:"unrecoverable_refresh_error",code:d.code};return b?.error?.("TOKEN_REFRESH","Failed to refresh Codex token",{status:c.status,error:a,code:d.code,permanent:d.permanent}),null}let f=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Codex token",{hasNewAccessToken:!!f.access_token,hasNewRefreshToken:!!f.refresh_token,hasIdToken:!!f.id_token,expiresIn:f.expires_in}),{accessToken:f.access_token,refreshToken:f.refresh_token||a,idToken:f.id_token,expiresIn:f.expires_in}}catch(a){return b?.error?.("TOKEN_REFRESH",`Network error refreshing Codex token: ${a.message}`),null}},b):null}async function t(a,b,c,e=null){return a?k("kiro",a,async()=>{let g=b?.authMethod,h=b?.clientId,i=b?.clientSecret,j=b?.region;if(h&&i){let b="idc"===g&&j?`https://oidc.${j}.amazonaws.com/token`:"https://oidc.us-east-1.amazonaws.com/token",d=await (0,f.proxyAwareFetch)(b,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({clientId:h,clientSecret:i,refreshToken:a,grantType:"refresh_token"})},e);if(!d.ok){let a=await d.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro AWS token",{status:d.status,error:a}),null}let k=await d.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro AWS token",{hasNewAccessToken:!!k.accessToken,expiresIn:k.expiresIn}),{accessToken:k.accessToken,refreshToken:k.refreshToken||a,expiresIn:k.expiresIn}}let k=await (0,f.proxyAwareFetch)(d.xq.kiro.tokenUrl,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","User-Agent":"kiro-cli/1.0.0"},body:JSON.stringify({refreshToken:a})},e);if(!k.ok){let a=await k.text();return c?.error?.("TOKEN_REFRESH","Failed to refresh Kiro social token",{status:k.status,error:a}),null}let l=await k.json();return c?.info?.("TOKEN_REFRESH","Successfully refreshed Kiro social token",{hasNewAccessToken:!!l.accessToken,expiresIn:l.expiresIn}),{accessToken:l.accessToken,refreshToken:l.refreshToken||a,expiresIn:l.expiresIn}},c):null}async function u(a,b){return a?k("iflow",a,async()=>{let c=btoa(`${d.xq.iflow.clientId}:${d.xq.iflow.clientSecret}`),f=await fetch(e.NA.iflow.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json",Authorization:`Basic ${c}`},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:a,client_id:d.xq.iflow.clientId,client_secret:d.xq.iflow.clientSecret})});if(!f.ok){let a=await f.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh iFlow token",{status:f.status,error:a}),null}let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed iFlow token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function v(a,b){return a?k("github",a,async()=>{let c={grant_type:"refresh_token",refresh_token:a,client_id:d.xq.github.clientId};d.xq.github.clientSecret&&(c.client_secret=d.xq.github.clientSecret);let f=await fetch(e.NA.github.token,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"},body:new URLSearchParams(c)});if(!f.ok){let a=await f.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh GitHub token",{status:f.status,error:a}),null}let g=await f.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed GitHub token",{hasNewAccessToken:!!g.access_token,hasNewRefreshToken:!!g.refresh_token,expiresIn:g.expires_in}),{accessToken:g.access_token,refreshToken:g.refresh_token||a,expiresIn:g.expires_in}},b):null}async function w(a,b){return a?k("copilot",a,async()=>{try{let c=await fetch("https://api.github.com/copilot_internal/v2/token",{headers:{Authorization:`token ${a}`,"User-Agent":e.x0.USER_AGENT,"Editor-Version":`vscode/${e.x0.VSCODE_VERSION}`,"Editor-Plugin-Version":`copilot-chat/${e.x0.COPILOT_CHAT_VERSION}`,Accept:"application/json","x-github-api-version":e.x0.API_VERSION}});if(!c.ok){let a=await c.text();return b?.error?.("TOKEN_REFRESH","Failed to refresh Copilot token",{status:c.status,error:a}),null}let d=await c.json();return b?.info?.("TOKEN_REFRESH","Successfully refreshed Copilot token",{hasToken:!!d.token,expiresAt:d.expires_at}),{token:d.token,expiresAt:d.expires_at}}catch(a){return b?.error?.("TOKEN_REFRESH","Error refreshing Copilot token",{error:a.message}),null}},b):null}async function x(a,b,c){if(!b.refreshToken)return null;switch(a){case"gemini-cli":case"antigravity":return p(b.refreshToken,d.xq[a].clientId,d.xq[a].clientSecret,c);case"claude":return o(b.refreshToken,c);case"codex":return s(b.refreshToken,c);case"qwen":return q(b.refreshToken,c);case"codebuddy":return r(b.refreshToken,c,"codebuddy");case"codebuddy-cn":return r(b.refreshToken,c,"codebuddy-cn");case"iflow":return u(b.refreshToken,c);case"github":return v(b.refreshToken,c);case"kiro":return t(b.refreshToken,b.providerSpecificData,c);case"xai":return h(b.refreshToken,c);case"vertex":case"vertex-partner":{let a=y(b.apiKey);if(!a)return null;return A(a,c)}default:return n(a,b.refreshToken,b,c)}}function y(a){if("string"!=typeof a)return null;try{let b=JSON.parse(a);if("service_account"===b.type&&b.client_email&&b.private_key&&b.project_id)return b;return null}catch{return null}}let z=new Map;async function A(a,b){let d=a.client_email,e=z.get(d);if(e&&e.expiresAt-Date.now()>3e5)return{accessToken:e.token,expiresAt:e.expiresAt};try{let{SignJWT:e,importPKCS8:f}=await Promise.all([c.e(6935),c.e(8971)]).then(c.bind(c,8971));b?.debug?.("TOKEN_REFRESH",`Vertex minting token for ${a.client_email}`);let g=await f(a.private_key.replace(/\\n/g,"\n"),"RS256"),h=Math.floor(Date.now()/1e3),i=await new e({scope:"https://www.googleapis.com/auth/cloud-platform"}).setProtectedHeader({alg:"RS256"}).setIssuer(a.client_email).setAudience("https://oauth2.googleapis.com/token").setIssuedAt(h).setExpirationTime(h+3600).sign(g),j=await fetch("https://oauth2.googleapis.com/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i})});if(!j.ok){let a=await j.text();return b?.error?.("TOKEN_REFRESH",`Vertex token mint failed: ${a}`),null}let{access_token:k,expires_in:l}=await j.json(),m=Date.now()+(l??3600)*1e3;return z.set(d,{token:k,expiresAt:m}),b?.info?.("TOKEN_REFRESH",`Vertex token minted for ${a.client_email}`),{accessToken:k,expiresAt:m}}catch(a){return b?.error?.("TOKEN_REFRESH",`Vertex token error: ${a.message}`),null}}async function B(a,b=3,c=null){for(let d=0;d<b;d++){if(d>0){let a=1e3*d;c?.debug?.("TOKEN_REFRESH",`Retry ${d}/${b} after ${a}ms`),await new Promise(b=>setTimeout(b,a))}try{let b=await a();if(b)return b}catch(a){c?.warn?.("TOKEN_REFRESH",`Attempt ${d+1}/${b} failed: ${a.message}`)}}return c?.error?.("TOKEN_REFRESH",`All ${b} retry attempts failed`),null}},39609:(a,b,c)=>{c.d(b,{proxyAwareFetch:()=>r});var d=c(47774),e=c(27910),f=c(41004);let g=globalThis.fetch,h=new Map,i=new Map,j=["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","api.individual.githubcopilot.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","api2.cursor.sh"],k=["8.8.8.8","8.8.4.4"];function l(a){return null==a?"":String(a).trim()}async function m(a){let b=i.get(a);if(b&&Date.now()<b.expiry)return b.ip;try{let b=await Promise.resolve().then(c.t.bind(c,14985,23)),{promisify:d}=await Promise.resolve().then(c.t.bind(c,28354,23)),e=new b.Resolver;e.setServers(k);let g=d(e.resolve4.bind(e)),h=await g(a);return i.set(a,{ip:h[0],expiry:Date.now()+f.v1.dnsCacheTtlMs}),h[0]}catch(b){return console.warn(`[ProxyFetch] DNS resolve failed for ${a}:`,b.message),null}}function n(a,b){let c,d=l(b);if(!d)return!1;try{c=new URL(a).hostname.toLowerCase()}catch{return!1}return d.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>"*"===a||(a.startsWith(".")?c.endsWith(a)||c===a.slice(1):c===a||c.endsWith(`.${a}`)))}function o(a){let b=l(a);if(!b)return null;try{return new URL(b),b}catch{return`http://${b}`}}async function p(a){let b=o(a);if(!b)return null;if(!h.has(b)){h.size>=f.v1.proxyDispatchersMaxSize&&h.delete(h.keys().next().value);let{ProxyAgent:a}=await Promise.resolve().then(c.t.bind(c,47774,19));h.set(b,new a({uri:b}))}return h.get(b)}async function q(a,b,d){let f=await Promise.resolve().then(c.t.bind(c,55591,23)),g=await Promise.resolve().then(c.t.bind(c,91645,23)),h=f.default??f,i=g.default??g;return new Promise((c,f)=>{let g=new i.Socket;g.connect(443,b,()=>{let b={socket:g,servername:a.hostname,path:a.pathname+a.search,method:d.method||"POST",headers:{...d.headers,Host:a.hostname}},i=h.request(b,a=>{let b={ok:a.statusCode>=200&&a.statusCode<300,status:a.statusCode,statusText:a.statusMessage,headers:new Map(Object.entries(a.headers)),body:e.Readable.toWeb(a),text:async()=>{let b=[];for await(let c of a)b.push(c);return Buffer.concat(b).toString()},json:async()=>JSON.parse(await b.text())};c(b)});i.on("error",f),d.body&&i.write("string"==typeof d.body?d.body:JSON.stringify(d.body)),i.end()}),g.on("error",f)})}async function r(a,b={},c=null){let e="string"==typeof a?a:a.toString(),f=l(c?.vercelRelayUrl);if(f){let a=new URL(e),c={...b.headers,"x-relay-target":`${a.protocol}//${a.host}`,"x-relay-path":`${a.pathname}${a.search}`};return g(f,{...b,headers:c})}let h=function(a,b){if(b?.enabled!==!0&&b?.connectionProxyEnabled!==!0)return null;let c=l(b?.url??b?.connectionProxyUrl);if(!c)return null;let d=l(b?.noProxy??b?.connectionNoProxy);return d&&n(a,d)?null:o(c)}(e,c),i=h?null:o(function(a){let b;if(n(a,process.env.NO_PROXY||process.env.no_proxy))return null;try{b=new URL(a).protocol}catch{return null}return"https:"===b?process.env.HTTPS_PROXY||process.env.https_proxy||process.env.ALL_PROXY||process.env.all_proxy:process.env.HTTP_PROXY||process.env.http_proxy||process.env.ALL_PROXY||process.env.all_proxy}(e)),k=h||i;if(function(a){try{let b=new URL(a).hostname;return j.some(a=>b.includes(a))}catch{return!1}}(e)){if(k)try{let c=await p(k);return await (0,d.hd)(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct bypass: ${a.message}`)}try{let a=new URL(e),c=await m(a.hostname);if(c)return await q(a,c,b)}catch(a){console.warn(`[ProxyFetch] MITM bypass failed: ${a.message}`)}}if(k)try{let c=await p(k);return await (0,d.hd)(a,{...b,dispatcher:c})}catch(a){if(c?.strictProxy===!0)throw Error(`[ProxyFetch] Proxy required but failed (strictProxy=true): ${a.message}`);console.warn(`[ProxyFetch] Proxy failed, falling back to direct: ${a.message}`)}return g(a,b)}async function s(a,b={}){return r(a,b,null)}globalThis.fetch!==s&&(globalThis.fetch=s)},41004:(a,b,c)=>{c.d(b,{C8:()=>l,DR:()=>k,Uc:()=>h,cI:()=>j,eo:()=>i,gx:()=>d,pH:()=>g,v1:()=>e,xM:()=>f}),c(3662);let d={BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,NOT_ACCEPTABLE:406,REQUEST_TIMEOUT:408,RATE_LIMITED:429,SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504},e={sessionTtlMs:72e5,sessionCleanupIntervalMs:18e5,dnsCacheTtlMs:3e5,proxyDispatchersMaxSize:20},f=6e4,g=6e4,h=64e3,i=32e3,j={429:{attempts:0,delayMs:0},502:{attempts:3,delayMs:3e3},503:{attempts:3,delayMs:2e3},504:{attempts:2,delayMs:3e3}};function k(a){return null==a?{attempts:0,delayMs:2e3}:"number"==typeof a?{attempts:a,delayMs:2e3}:{attempts:a.attempts||0,delayMs:null!=a.delayMs?a.delayMs:2e3}}let l=["Please write a 5-10 word title for the following conversation:"]}};
@@ -52,7 +52,13 @@ ${e.length} files in ${g.length} dirs:
52
52
  `,b.slice(0,10)))h+=` ${c}
53
53
  `;b.length>10&&(h+=` +${b.length-10}
54
54
  `),h+="\n"}return g.length>20&&(h+=`+${g.length-20} more dirs
55
- `),h.replace(/\n+$/,"")}r.filterName="search-list";let s=/^Result of search in '[^']*' \(total (\d+) files?\):/,t=/^diff --git /m,u=/^@@ /m,v=/^On branch |^nothing to commit|^Changes (not |to be )|^Untracked files:/m,w=/^[ MADRCU?!][ MADRCU?!] \S/m,x=/^(npm (warn|error|ERR!)|yarn (warn|error)|\s*Compiling\s+\S+|\s*Downloading\s+\S+|added \d+ package|\[ERROR\]|BUILD (SUCCESS|FAILED)|\s*Finished\s+|Successfully (installed|built)|ERROR:)/im,y=/[├└]──|│ /,z=/^[-dlbcps][rwx-]{9}/m,A=/^total \d+$/m;function B(a){let b=a.indexOf(":");if(-1===b)return!1;let c=a.indexOf(":",b+1);if(-1===c)return!1;let d=a.slice(b+1,c);return/^\d+$/.test(d)}function C(a){let b=a.trim();return!(0===b.length||b.includes(":"))&&(b.startsWith(".")||b.startsWith("/")||b.includes("/"))}function D(a,b){if(!b||!a)return null;if(a.conversationState){var c=a;let b={bytesBefore:0,bytesAfter:0,hits:[]};try{let a=c.conversationState,d=[...Array.isArray(a?.history)?a.history:[]];for(let c of(a?.currentMessage&&d.push(a.currentMessage),d)){let a=c?.userInputMessage?.userInputMessageContext?.toolResults;if(Array.isArray(a)){for(let c of a)if("error"!==c.status&&Array.isArray(c.content))for(let a of c.content)a&&"string"==typeof a.text&&(a.text=E(a.text,b,"kiro-tool-result"))}}}catch(a){return console.warn("[RTK] compressKiroFormat error:",a.message),null}return b}let d=Array.isArray(a.messages)?a.messages:Array.isArray(a.input)?a.input:null;if(!d)return null;let e={bytesBefore:0,bytesAfter:0,hits:[]};try{for(let a=0;a<d.length;a++){let b=d[a];if(b){if("function_call_output"===b.type){if("string"==typeof b.output)b.output=E(b.output,e,"openai-responses-string");else if(Array.isArray(b.output))for(let a=0;a<b.output.length;a++){let c=b.output[a];c&&"input_text"===c.type&&"string"==typeof c.text&&(c.text=E(c.text,e,"openai-responses-array"))}continue}if("tool"===b.role&&"string"==typeof b.content){b.content=E(b.content,e,"openai-tool");continue}if(Array.isArray(b.content)){if("tool"===b.role){for(let a=0;a<b.content.length;a++){let c=b.content[a];c&&"text"===c.type&&"string"==typeof c.text&&(c.text=E(c.text,e,"openai-tool-array"))}continue}for(let a=0;a<b.content.length;a++){let c=b.content[a];if(c&&"tool_result"===c.type&&!0!==c.is_error){if("string"==typeof c.content)c.content=E(c.content,e,"claude-string");else if(Array.isArray(c.content))for(let a=0;a<c.content.length;a++){let b=c.content[a];b&&"text"===b.type&&"string"==typeof b.text&&(b.text=E(b.text,e,"claude-array"))}}}}}}}catch(a){return console.warn("[RTK] compressMessages error:",a.message),null}return e}function E(a,b,c){let d=a.length;if(b.bytesBefore+=d,d<500||d>0xa00000)return b.bytesAfter+=d,a;let g=function(a){var b,c;let d,g,l=a.length>1024?a.slice(0,1024):a;if(t.test(l)||u.test(l))return e;if(v.test(l))return f;if(x.test(l))return h;if(!((d=l.split("\n").filter(a=>a.trim())).length<3)&&d.filter(a=>w.test(a)).length/d.length>=.6)return f;let D=l.split("\n"),E=D.filter(a=>a.trim().length>0);return E.slice(0,5).some(B)?i:E.length>=3&&E.every(C)?j:y.test(l)?n:A.test(l)||(b=l,g=new RegExp((c=z).source,c.flags.includes("g")?c.flags:c.flags+"g"),(b.match(g)||[]).length>=3)?m:s.test(l)?r:D.length>=250&&function(a){let b=0,c=0;for(let d of a.slice(0,100))0!==d.length&&(c++,q.test(d)&&b++);return!(c<5)&&b/c>=.7}(D)?p:E.length>=5?k:a.split("\n").length>=250?o:null}(a);if(!g)return b.bytesAfter+=d,a;let l=function(a,b){if("function"!=typeof a)return b;try{let c=a(b);if("string"!=typeof c)return b;return c}catch(d){let c=a.filterName||a.name||"anonymous";return console.warn(`[rtk] warning: filter '${c}' panicked — passing through raw output: ${d?.message||d}`),b}}(g,a);return!l||0===l.length||l.length>=d?(b.bytesAfter+=d,a):(b.bytesAfter+=l.length,b.hits.push({shape:c,filter:g.filterName||g.name,saved:d-l.length}),l)}function F(a){if(!a||!a.hits||0===a.hits.length)return null;let b=a.bytesBefore-a.bytesAfter,c=a.bytesBefore>0?(b/a.bytesBefore*100).toFixed(1):"0",d=Array.from(new Set(a.hits.map(a=>a.filter))).join(",");return`[RTK] saved ${b}B / ${a.bytesBefore}B (${c}%) via [${d}] hits=${a.hits.length}`}},81626:(a,b,c)=>{function d(a,b){let c;if(!a.trim())return;let d=a.match(/^event:\s*(.+)$/m),e=a.match(/^data:\s*(.+)$/m);if(!d||!e)return;let f=d[1].trim(),g=e[1].trim();if("[DONE]"!==g){try{c=JSON.parse(g)}catch{return}"response.created"===f?(b.responseId=c.response?.id||b.responseId,b.created=c.response?.created_at||b.created):"response.output_item.done"===f?b.items.set(c.output_index??0,c.item):"response.completed"===f||"response.done"===f?(b.status="completed",c.response?.usage&&(b.usage.input_tokens=c.response.usage.input_tokens||0,b.usage.output_tokens=c.response.usage.output_tokens||0,b.usage.total_tokens=c.response.usage.total_tokens||0)):"response.failed"===f&&(b.status="failed")}}c.d(b,{I:()=>n,F:()=>m});let e={input_tokens:0,output_tokens:0,total_tokens:0};async function f(a){if(!a||"function"!=typeof a.getReader)return{id:`resp_${Date.now()}`,object:"response",created_at:Math.floor(Date.now()/1e3),status:"failed",output:[],usage:{...e}};let b=a.getReader(),c=new TextDecoder,f="",g={responseId:"",created:Math.floor(Date.now()/1e3),status:"in_progress",usage:{...e},items:new Map};try{for(;;){let{done:a,value:e}=await b.read();if(a)break;let h=(f+=c.decode(e,{stream:!0})).split("\n\n");for(let a of(f=h.pop()||"",h))d(a,g)}f.trim()&&d(f,g)}finally{b.releaseLock()}let h=[],i=g.items.size>0?Math.max(...g.items.keys()):-1;for(let a=0;a<=i;a++)h.push(g.items.get(a)||{type:"message",content:[],role:"assistant"});return{id:g.responseId||`resp_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,object:"response",created_at:g.created,status:g.status||"completed",output:h,usage:g.usage}}var g=c(43659),h=c(41004),i=c(14170),j=c(86171),k=c(47370);function l(a){if(!a?.content||!Array.isArray(a.content))return"";let b=a.content.find(a=>"output_text"===a.type);if("string"==typeof b?.text)return b.text;let c=a.content.find(a=>"string"==typeof a.text);return"string"==typeof c?.text?c.text:""}function m(a,b){let c=[];for(let b of String(a||"").split("\n")){let a=b.trim();if(!a.startsWith("data:"))continue;let d=a.slice(5).trim();if(d&&"[DONE]"!==d)try{c.push(JSON.parse(d))}catch{}}if(0===c.length)return null;let d=c[0],e=[],f=[],g=new Map,h="stop",i=null;for(let a of c){let b=a?.choices?.[0],c=b?.delta||{};if("string"==typeof c.content&&c.content.length>0&&e.push(c.content),"string"==typeof c.reasoning_content&&c.reasoning_content.length>0&&f.push(c.reasoning_content),b?.finish_reason&&(h=b.finish_reason),a?.usage&&"object"==typeof a.usage&&(i=a.usage),Array.isArray(c.tool_calls))for(let a of c.tool_calls){let b=a.index??0;g.has(b)||g.set(b,{id:a.id||"",type:"function",function:{name:"",arguments:""}});let c=g.get(b);a.id&&(c.id=a.id),a.function?.name&&(c.function.name+=a.function.name),a.function?.arguments&&(c.function.arguments+=a.function.arguments)}}let j={role:"assistant",content:e.join("")||(g.size>0?null:"")};f.length>0&&(j.reasoning_content=f.join("")),g.size>0&&(j.tool_calls=[...g.entries()].sort((a,b)=>a[0]-b[0]).map(([,a])=>a));let k={id:d.id||`chatcmpl-${Date.now()}`,object:"chat.completion",created:d.created||Math.floor(Date.now()/1e3),model:d.model||b||"unknown",choices:[{index:0,message:j,finish_reason:h}]};return i&&(k.usage=i),k}async function n({providerResponse:a,sourceFormat:b,provider:c,model:d,body:e,stream:o,translatedBody:p,finalBody:q,requestStartTime:r,connectionId:s,apiKey:t,clientRawRequest:u,onRequestSuccess:v,trackDone:w,appendLog:x}){let y=a.headers.get("content-type")||"";if(!(y.includes("text/event-stream")||""===y&&"codex"===c))return null;w();let z={provider:c,model:d,connectionId:s,request:(0,j.Fo)(e,o),providerRequest:q||p||null};if("codex"===c||b===i.h.OPENAI_RESPONSES)try{let e,g=await f(a.body);v&&await v();let h=g.usage||{};x({tokens:h,status:"200 OK"}),(0,j.qr)({provider:c,model:d,tokens:h,connectionId:s,apiKey:t,endpoint:u?.endpoint});let{msgItem:m,textContent:n}=function(a){if(!Array.isArray(a))return{msgItem:null,textContent:null};let b=a.filter(a=>a?.type==="message");if(0===b.length)return{msgItem:null,textContent:null};for(let a=b.length-1;a>=0;a--){let c=l(b[a]);if(c.length>0)return{msgItem:b[a],textContent:c}}let c=b[b.length-1];return{msgItem:c,textContent:l(c)}}(g.output),o=Date.now()-r;if((0,k.ox)((0,j.$R)({...z,latency:{ttft:o,total:o},tokens:{prompt_tokens:h.input_tokens||0,completion_tokens:h.output_tokens||0},response:{content:n,thinking:null,finish_reason:g.status||"unknown"},status:"success"},{endpoint:u?.endpoint||null})).catch(()=>{}),b===i.h.OPENAI_RESPONSES)return{success:!0,response:new Response(JSON.stringify(g),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})};let p=h.input_tokens||0,q=h.output_tokens||0,w=(g.output||[]).filter(a=>"function_call"===a.type).map((a,b)=>({id:a.call_id||`call_${a.name}_${Date.now()}_${b}`,type:"function",function:{name:a.name,arguments:"string"==typeof a.arguments?a.arguments:JSON.stringify(a.arguments||{})}})),y=w.length>0;if(b===i.h.ANTIGRAVITY||b===i.h.GEMINI||b===i.h.GEMINI_CLI)e={response:{candidates:[{content:{role:"model",parts:[{text:n||""}]},finishReason:"STOP",index:0}],usageMetadata:{promptTokenCount:p,candidatesTokenCount:q,totalTokenCount:p+q},modelVersion:d,responseId:g.id||`resp_${Date.now()}`}};else{let a={role:"assistant",content:n||(y?null:"")};y&&(a.tool_calls=w);let b="completed"===g.status||"done"===g.status,c=y?"tool_calls":b?"stop":g.status||"stop";e={id:g.id||`chatcmpl-${Date.now()}`,object:"chat.completion",created:g.created_at||Math.floor(Date.now()/1e3),model:g.model||d,choices:[{index:0,message:a,finish_reason:c}],usage:{prompt_tokens:p,completion_tokens:q,total_tokens:p+q}}}return{success:!0,response:new Response(JSON.stringify(e),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}catch(a){return console.error("[ChatCore] Responses API SSE→JSON failed:",a),(0,g.A1)(h.gx.BAD_GATEWAY,"Failed to convert streaming response to JSON")}try{let b=await a.text(),e=m(b,d);if(!e)return(0,g.A1)(h.gx.BAD_GATEWAY,"Invalid SSE response for non-streaming request");v&&await v();let f=e.usage||{};x({tokens:f,status:"200 OK"}),(0,j.qr)({provider:c,model:d,tokens:f,connectionId:s,apiKey:t,endpoint:u?.endpoint});let i=Date.now()-r;if((0,k.ox)((0,j.$R)({...z,latency:{ttft:i,total:i},tokens:f,response:{content:e.choices?.[0]?.message?.content||null,thinking:e.choices?.[0]?.message?.reasoning_content||null,finish_reason:e.choices?.[0]?.finish_reason||"unknown"},status:"success"},{endpoint:u?.endpoint||null})).catch(()=>{}),e?.choices)for(let a of e.choices)a?.message?.reasoning_content&&a.message.content&&delete a.message.reasoning_content;return{success:!0,response:new Response(JSON.stringify(e),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}catch(a){return console.error("[ChatCore] Chat Completions SSE→JSON failed:",a),(0,g.A1)(h.gx.BAD_GATEWAY,"Failed to convert streaming response to JSON")}}},86171:(a,b,c)=>{c.d(b,{$R:()=>i,Fo:()=>g,MK:()=>h,qr:()=>j});var d=c(47370),e=c(71857);let f=["temperature","top_p","top_k","max_tokens","max_completion_tokens","thinking","reasoning","enable_thinking","presence_penalty","frequency_penalty","seed","stop","tools","tool_choice","response_format","prediction","store","metadata","n","logprobs","top_logprobs","logit_bias","user","parallel_tool_calls"];function g(a,b){let c={messages:a.messages||[],model:a.model,stream:b};for(let b of f)void 0!==a[b]&&(c[b]=a[b]);return c}function h(a){return a&&"object"==typeof a?a.usage?.input_tokens!==void 0?{prompt_tokens:a.usage.input_tokens||0,completion_tokens:a.usage.output_tokens||0,cache_read_input_tokens:a.usage.cache_read_input_tokens,cache_creation_input_tokens:a.usage.cache_creation_input_tokens}:a.usage?.prompt_tokens!==void 0?{prompt_tokens:a.usage.prompt_tokens||0,completion_tokens:a.usage.completion_tokens||0,cached_tokens:a.usage.prompt_tokens_details?.cached_tokens,reasoning_tokens:a.usage.completion_tokens_details?.reasoning_tokens}:a.usageMetadata?{prompt_tokens:a.usageMetadata.promptTokenCount||0,completion_tokens:a.usageMetadata.candidatesTokenCount||0,reasoning_tokens:a.usageMetadata.thoughtsTokenCount}:null:null}function i(a,b={}){return{provider:a.provider||"unknown",model:a.model||"unknown",connectionId:a.connectionId||void 0,timestamp:new Date().toISOString(),latency:a.latency||{ttft:0,total:0},tokens:a.tokens||{prompt_tokens:0,completion_tokens:0},request:a.request,providerRequest:a.providerRequest||null,providerResponse:a.providerResponse||null,response:a.response||{},status:a.status||"success",...b}}function j({provider:a,model:b,tokens:c,connectionId:f,apiKey:g,endpoint:h,label:i="USAGE"}){if(!c||"object"!=typeof c)return;let k=c.input_tokens??c.prompt_tokens??0,l=c.output_tokens??c.completion_tokens??0;if(0===k&&0===l)return;let m=new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),n=f?` | account=${f.slice(0,8)}...`:"";console.log(`${e.lm.green}[${m}] 📊 [${i}] ${a.toUpperCase()} | in=${k} | out=${l}${n}${e.lm.reset}`);let o={prompt_tokens:c.prompt_tokens??c.input_tokens??0,completion_tokens:c.completion_tokens??c.output_tokens??0};(0,d.sZ)({provider:a||"unknown",model:b||"unknown",tokens:o,timestamp:new Date().toISOString(),connectionId:f||void 0,apiKey:g||void 0,endpoint:h||null}).catch(()=>{})}},92500:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{w:()=>C});var e=c(57647),f=c(33110),g=c(14170),h=c(71857),i=c(59657),j=c(8590),k=c(71336),l=c(44404),m=c(43659),n=c(41004),o=c(27349),p=c(47370),q=c(89718),r=c(55330),s=c(86171),t=c(81626),u=c(5016),v=c(20623),w=c(324),x=c(14724),y=c(60125),z=c(99415),A=c(77256),B=a([r]);async function C({body:a,modelInfo:b,credentials:c,log:d,onCredentialsRefreshed:B,onRequestSuccess:D,onDisconnect:E,clientRawRequest:F,connectionId:G,userAgent:H,apiKey:I,ccFilterNaming:J,rtkEnabled:K,cavemanEnabled:L,cavemanLevel:M,contextInjectionEnabled:N,sourceFormatOverride:O,providerThinking:P}){let Q,R,S,T,U,V,{provider:W,model:X}=b,Y=Date.now(),Z=O||(0,e.Tz)(a),$=(0,o.c)(a,X,H,J);if($)return $;let _=l.Xg[W]||W,aa=(0,l.ux)(_,X)||(0,e.jJ)(W),ab=(0,l.cY)(_,X),ac=(0,l.kt)(_,X);if(P?.mode&&"auto"!==P.mode){let b=P.mode;"on"!==b||a.thinking?"off"===b?(a={...a,thinking:{type:"disabled"}},delete a.reasoning_effort,a.reasoning&&"object"==typeof a.reasoning&&(a.reasoning={...a.reasoning,effort:"none"})):a.reasoning_effort||(a={...a,reasoning_effort:b}):(console.log("Injecting provider-level thinking config override: on"),a={...a,thinking:{type:"enabled",budget_tokens:1e4}})}let ad=!0===a.stream||Z===g.h.ANTIGRAVITY||Z===g.h.GEMINI||Z===g.h.GEMINI_CLI,ae="openai"===W||"codex"===W||"commandcode"===W,af=!!ae||!1!==a.stream,ag=(0,w.J)(F?.headers||{},a);"deepseek-tui"===ag&&!0!==a.stream&&(af=!1);let ah=F?.headers?.accept||"",ai=ah.includes("application/json"),aj=ah.includes("text/event-stream");ai&&!aj&&!0!==a.stream&&(af=!1);let ak=await (0,k.q7)(Z,aa,X);F&&ak.logClientRawRequest(F.endpoint,F.body,F.headers),ak.logRawRequest(a),d?.debug?.("FORMAT",`${Z} → ${aa} | stream=${af}`);let al=(0,w.J)(F?.headers||{},a),am=(0,w.Q)(al,W);if(am)d?.debug?.("PASSTHROUGH",`${al} → ${W} | native lossless`),Q={...a,model:ac};else{if(!(Q=(0,f.GH)(Z,aa,ac,a,af,c,W,ak,ab,G,al)))return(0,p.uw)(X,W,G,!1,!0),(0,m.A1)(n.gx.BAD_REQUEST,`Failed to translate request for ${Z} → ${aa}`);R=Q._toolNameMap,delete Q._toolNameMap,Q.model=ac}if("claude"===al&&Array.isArray(Q.tools)){let{tools:a,stripped:b}=(0,x.F)(Q.tools);b.length>0&&(Q.tools=a,d?.debug?.("TOOLDEDUP",`stripped ${b.length}: ${b.slice(0,3).join(", ")}${b.length>3?"...":""}`))}let an=am?Z:aa;"tts"===(0,l.OA)(_,X)&&Q.messages&&(Q.messages=Q.messages.filter(a=>"tool"!==a.role),delete Q.tools);let ao=(0,A.B)(Q,K),ap=(0,A.f)(ao);if(ap&&console.log(ap),L&&M&&((0,y.p)(Q,an,M),d?.debug?.("CAVEMAN",`${M} | ${an}`)),N)try{let a=await (0,q.qd)();if(a?.length){let b=a.map(a=>a.content).filter(Boolean).join("\n\n");b&&((0,z.e)(Q,an,b),d?.debug?.("CONTEXT",`${a.length} file(s) | ${an}`))}}catch(a){d?.error?.("CONTEXT",`injection failed: ${a.message}`)}let aq=(0,r.SB)(W);(0,p.uw)(X,W,G,!0),(0,p.E5)({model:X,provider:W,connectionId:G,status:"PENDING"}).catch(()=>{});let ar=Q.messages?.length||Q.input?.length||Q.contents?.length||Q.request?.contents?.length||0;d?.debug?.("REQUEST",`${W.toUpperCase()} | ${X} | ${ar} msgs`);let as=(0,i.jd)({onDisconnect:a=>{(0,p.uw)(X,W,G,!1),E&&E(a)},onError:()=>(0,p.uw)(X,W,G,!1),log:d,provider:W,model:X}),at={connectionProxyEnabled:c?.providerSpecificData?.connectionProxyEnabled===!0,connectionProxyUrl:c?.providerSpecificData?.connectionProxyUrl||"",connectionNoProxy:c?.providerSpecificData?.connectionNoProxy||"",vercelRelayUrl:c?.providerSpecificData?.vercelRelayUrl||""};if(at.vercelRelayUrl){let a=c?.connectionName||c?.connectionId||"unknown",b=c?.providerSpecificData?.connectionProxyPoolId||"none";d?.info?.("PROXY",`${W.toUpperCase()} | ${X} | conn=${a} | pool=${b} | vercel-relay=${at.vercelRelayUrl}`)}else if(at.connectionProxyEnabled&&at.connectionProxyUrl){let a=at.connectionProxyUrl;try{let b=new URL(at.connectionProxyUrl),c=b.hostname||"",d=b.port?`:${b.port}`:"",e=b.protocol||"http:";a=`${e}//${c}${d}`}catch{}let b=c?.providerSpecificData?.connectionProxyPoolId||"none",e=c?.connectionName||c?.connectionId||"unknown";d?.info?.("PROXY",`${W.toUpperCase()} | ${X} | conn=${e} | pool=${b} | url=${a}`)}if(at.connectionProxyEnabled&&at.connectionNoProxy){let a=c?.connectionName||c?.connectionId||"unknown";d?.debug?.("PROXY",`${W.toUpperCase()} | ${X} | conn=${a} | no_proxy=${at.connectionNoProxy}`)}try{let a=await aq.execute({model:X,body:Q,stream:af,credentials:c,signal:as.signal,log:d,proxyOptions:at});S=a.response,T=a.url,U=a.headers,V=a.transformedBody,ak.logTargetRequest(T,U,V)}catch(c){if((0,p.uw)(X,W,G,!1,!0),(0,p.E5)({model:X,provider:W,connectionId:G,status:`FAILED ${"AbortError"===c.name?499:n.gx.BAD_GATEWAY}`}).catch(()=>{}),(0,p.ox)((0,s.$R)({provider:W,model:X,connectionId:G,latency:{ttft:0,total:Date.now()-Y},tokens:{prompt_tokens:0,completion_tokens:0},request:(0,s.Fo)(a,af),providerRequest:Q||null,response:{error:c.message||String(c),status:"AbortError"===c.name?499:502,thinking:null},status:"error"})).catch(()=>{}),"AbortError"===c.name)return as.handleError(c),(0,m.A1)(499,"Request aborted");let b=(0,m.lR)(c,W,X,n.gx.BAD_GATEWAY);return console.log(`${h.lm.red}[ERROR] ${b}${h.lm.reset}`),(0,m.A1)(n.gx.BAD_GATEWAY,b)}if(!aq.noAuth&&(S.status===n.gx.UNAUTHORIZED||S.status===n.gx.FORBIDDEN))try{let a=await (0,j.qZ)(()=>aq.refreshCredentials(c,d),3,d);if(a?.accessToken||a?.copilotToken){if(d?.info?.("TOKEN",`${W.toUpperCase()} | refreshed`),Object.assign(c,a),B)try{await B(a)}catch(a){d?.warn?.("TOKEN",`onCredentialsRefreshed failed: ${a.message}`)}try{let a=await aq.execute({model:X,body:Q,stream:af,credentials:c,signal:as.signal,log:d,proxyOptions:at});a.response.ok&&(S=a.response,T=a.url)}catch{d?.warn?.("TOKEN",`${W.toUpperCase()} | retry after refresh failed`)}}else d?.warn?.("TOKEN",`${W.toUpperCase()} | refresh failed`)}catch(a){d?.warn?.("TOKEN",`${W.toUpperCase()} | refresh threw: ${a.message}`)}if(!S.ok){(0,p.uw)(X,W,G,!1,!0);let{statusCode:b,message:c,resetsAtMs:d}=await (0,m.zL)(S,aq);(0,p.E5)({model:X,provider:W,connectionId:G,status:`FAILED ${b}`}).catch(()=>{}),(0,p.ox)((0,s.$R)({provider:W,model:X,connectionId:G,latency:{ttft:0,total:Date.now()-Y},tokens:{prompt_tokens:0,completion_tokens:0},request:(0,s.Fo)(a,af),providerRequest:V||Q||null,response:{error:c,status:b,thinking:null},status:"error"})).catch(()=>{});let e=(0,m.lR)(Error(c),W,X,b);return console.log(`${h.lm.red}[ERROR] ${e}${h.lm.reset}`),ak.logError(Error(c),V||Q),(0,m.A1)(b,e,d)}let au={provider:W,model:X,body:a,stream:af,translatedBody:Q,finalBody:V,requestStartTime:Y,connectionId:G,apiKey:I,clientRawRequest:F,onRequestSuccess:D},av=a=>(0,p.E5)({model:X,provider:W,connectionId:G,...a}).catch(()=>{}),aw=()=>(0,p.uw)(X,W,G,!1);if(!ad&&ae){let a=await (0,t.I)({...au,providerResponse:S,sourceFormat:Z,trackDone:aw,appendLog:av});if(a)return as.handleComplete(),a}if(!af){let a=await (0,u.N)({...au,providerResponse:S,sourceFormat:Z,targetFormat:aa,reqLogger:ak,toolNameMap:R,trackDone:aw,appendLog:av});return as.handleComplete(),a}let{onStreamComplete:ax,streamDetailId:ay}=(0,v.$)({...au});return(0,v.M)({...au,providerResponse:S,sourceFormat:Z,targetFormat:aa,userAgent:H,reqLogger:ak,toolNameMap:R,streamController:as,onStreamComplete:ax,streamDetailId:ay})}r=(B.then?(await B)():B)[0],d()}catch(a){d(a)}})},99415:(a,b,c)=>{c.d(b,{e:()=>e});var d=c(14170);function e(a,b,c){if(a&&c&&"string"==typeof c)switch(b){case d.h.CLAUDE:!function(a,b){if("string"==typeof a.system&&a.system.length>0){a.system=`${b}
55
+ `),h.replace(/\n+$/,"")}r.filterName="search-list";let s=/^Result of search in '[^']*' \(total (\d+) files?\):/,t=/^diff --git /m,u=/^@@ /m,v=/^On branch |^nothing to commit|^Changes (not |to be )|^Untracked files:/m,w=/^[ MADRCU?!][ MADRCU?!] \S/m,x=/^(npm (warn|error|ERR!)|yarn (warn|error)|\s*Compiling\s+\S+|\s*Downloading\s+\S+|added \d+ package|\[ERROR\]|BUILD (SUCCESS|FAILED)|\s*Finished\s+|Successfully (installed|built)|ERROR:)/im,y=/[├└]──|│ /,z=/^[-dlbcps][rwx-]{9}/m,A=/^total \d+$/m;function B(a){let b=a.indexOf(":");if(-1===b)return!1;let c=a.indexOf(":",b+1);if(-1===c)return!1;let d=a.slice(b+1,c);return/^\d+$/.test(d)}function C(a){let b=a.trim();return!(0===b.length||b.includes(":"))&&(b.startsWith(".")||b.startsWith("/")||b.includes("/"))}function D(a,b){if(!b||!a)return null;if(a.conversationState){var c=a;let b={bytesBefore:0,bytesAfter:0,hits:[]};try{let a=c.conversationState,d=[...Array.isArray(a?.history)?a.history:[]];for(let c of(a?.currentMessage&&d.push(a.currentMessage),d)){let a=c?.userInputMessage?.userInputMessageContext?.toolResults;if(Array.isArray(a)){for(let c of a)if("error"!==c.status&&Array.isArray(c.content))for(let a of c.content)a&&"string"==typeof a.text&&(a.text=E(a.text,b,"kiro-tool-result"))}}}catch(a){return console.warn("[RTK] compressKiroFormat error:",a.message),null}return b}let d=Array.isArray(a.messages)?a.messages:Array.isArray(a.input)?a.input:null;if(!d)return null;let e={bytesBefore:0,bytesAfter:0,hits:[]};try{for(let a=0;a<d.length;a++){let b=d[a];if(b){if("function_call_output"===b.type){if("string"==typeof b.output)b.output=E(b.output,e,"openai-responses-string");else if(Array.isArray(b.output))for(let a=0;a<b.output.length;a++){let c=b.output[a];c&&"input_text"===c.type&&"string"==typeof c.text&&(c.text=E(c.text,e,"openai-responses-array"))}continue}if("tool"===b.role&&"string"==typeof b.content){b.content=E(b.content,e,"openai-tool");continue}if(Array.isArray(b.content)){if("tool"===b.role){for(let a=0;a<b.content.length;a++){let c=b.content[a];c&&"text"===c.type&&"string"==typeof c.text&&(c.text=E(c.text,e,"openai-tool-array"))}continue}for(let a=0;a<b.content.length;a++){let c=b.content[a];if(c&&"tool_result"===c.type&&!0!==c.is_error){if("string"==typeof c.content)c.content=E(c.content,e,"claude-string");else if(Array.isArray(c.content))for(let a=0;a<c.content.length;a++){let b=c.content[a];b&&"text"===b.type&&"string"==typeof b.text&&(b.text=E(b.text,e,"claude-array"))}}}}}}}catch(a){return console.warn("[RTK] compressMessages error:",a.message),null}return e}function E(a,b,c){let d=a.length;if(b.bytesBefore+=d,d<500||d>0xa00000)return b.bytesAfter+=d,a;let g=function(a){var b,c;let d,g,l=a.length>1024?a.slice(0,1024):a;if(t.test(l)||u.test(l))return e;if(v.test(l))return f;if(x.test(l))return h;if(!((d=l.split("\n").filter(a=>a.trim())).length<3)&&d.filter(a=>w.test(a)).length/d.length>=.6)return f;let D=l.split("\n"),E=D.filter(a=>a.trim().length>0);return E.slice(0,5).some(B)?i:E.length>=3&&E.every(C)?j:y.test(l)?n:A.test(l)||(b=l,g=new RegExp((c=z).source,c.flags.includes("g")?c.flags:c.flags+"g"),(b.match(g)||[]).length>=3)?m:s.test(l)?r:D.length>=250&&function(a){let b=0,c=0;for(let d of a.slice(0,100))0!==d.length&&(c++,q.test(d)&&b++);return!(c<5)&&b/c>=.7}(D)?p:E.length>=5?k:a.split("\n").length>=250?o:null}(a);if(!g)return b.bytesAfter+=d,a;let l=function(a,b){if("function"!=typeof a)return b;try{let c=a(b);if("string"!=typeof c)return b;return c}catch(d){let c=a.filterName||a.name||"anonymous";return console.warn(`[rtk] warning: filter '${c}' panicked — passing through raw output: ${d?.message||d}`),b}}(g,a);return!l||0===l.length||l.length>=d?(b.bytesAfter+=d,a):(b.bytesAfter+=l.length,b.hits.push({shape:c,filter:g.filterName||g.name,saved:d-l.length}),l)}function F(a){if(!a||!a.hits||0===a.hits.length)return null;let b=a.bytesBefore-a.bytesAfter,c=a.bytesBefore>0?(b/a.bytesBefore*100).toFixed(1):"0",d=Array.from(new Set(a.hits.map(a=>a.filter))).join(",");return`[RTK] saved ${b}B / ${a.bytesBefore}B (${c}%) via [${d}] hits=${a.hits.length}`}},81626:(a,b,c)=>{function d(a,b){let c;if(!a.trim())return;let d=a.match(/^event:\s*(.+)$/m),e=a.match(/^data:\s*(.+)$/m);if(!d||!e)return;let f=d[1].trim(),g=e[1].trim();if("[DONE]"!==g){try{c=JSON.parse(g)}catch{return}"response.created"===f?(b.responseId=c.response?.id||b.responseId,b.created=c.response?.created_at||b.created):"response.output_item.done"===f?b.items.set(c.output_index??0,c.item):"response.completed"===f||"response.done"===f?(b.status="completed",c.response?.usage&&(b.usage.input_tokens=c.response.usage.input_tokens||0,b.usage.output_tokens=c.response.usage.output_tokens||0,b.usage.total_tokens=c.response.usage.total_tokens||0)):"response.failed"===f&&(b.status="failed")}}c.d(b,{I:()=>n,F:()=>m});let e={input_tokens:0,output_tokens:0,total_tokens:0};async function f(a){if(!a||"function"!=typeof a.getReader)return{id:`resp_${Date.now()}`,object:"response",created_at:Math.floor(Date.now()/1e3),status:"failed",output:[],usage:{...e}};let b=a.getReader(),c=new TextDecoder,f="",g={responseId:"",created:Math.floor(Date.now()/1e3),status:"in_progress",usage:{...e},items:new Map};try{for(;;){let{done:a,value:e}=await b.read();if(a)break;let h=(f+=c.decode(e,{stream:!0})).split("\n\n");for(let a of(f=h.pop()||"",h))d(a,g)}f.trim()&&d(f,g)}finally{b.releaseLock()}let h=[],i=g.items.size>0?Math.max(...g.items.keys()):-1;for(let a=0;a<=i;a++)h.push(g.items.get(a)||{type:"message",content:[],role:"assistant"});return{id:g.responseId||`resp_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,object:"response",created_at:g.created,status:g.status||"completed",output:h,usage:g.usage}}var g=c(43659),h=c(41004),i=c(14170),j=c(86171),k=c(47370);function l(a){if(!a?.content||!Array.isArray(a.content))return"";let b=a.content.find(a=>"output_text"===a.type);if("string"==typeof b?.text)return b.text;let c=a.content.find(a=>"string"==typeof a.text);return"string"==typeof c?.text?c.text:""}function m(a,b){let c=[];for(let b of String(a||"").split("\n")){let a=b.trim();if(!a.startsWith("data:"))continue;let d=a.slice(5).trim();if(d&&"[DONE]"!==d)try{c.push(JSON.parse(d))}catch{}}if(0===c.length)return null;let d=c[0],e=[],f=[],g=new Map,h="stop",i=null;for(let a of c){let b=a?.choices?.[0],c=b?.delta||{};if("string"==typeof c.content&&c.content.length>0&&e.push(c.content),"string"==typeof c.reasoning_content&&c.reasoning_content.length>0&&f.push(c.reasoning_content),b?.finish_reason&&(h=b.finish_reason),a?.usage&&"object"==typeof a.usage&&(i=a.usage),Array.isArray(c.tool_calls))for(let a of c.tool_calls){let b=a.index??0;g.has(b)||g.set(b,{id:a.id||"",type:"function",function:{name:"",arguments:""}});let c=g.get(b);a.id&&(c.id=a.id),a.function?.name&&(c.function.name+=a.function.name),a.function?.arguments&&(c.function.arguments+=a.function.arguments)}}let j={role:"assistant",content:e.join("")||(g.size>0?null:"")};f.length>0&&(j.reasoning_content=f.join("")),g.size>0&&(j.tool_calls=[...g.entries()].sort((a,b)=>a[0]-b[0]).map(([,a])=>a));let k={id:d.id||`chatcmpl-${Date.now()}`,object:"chat.completion",created:d.created||Math.floor(Date.now()/1e3),model:d.model||b||"unknown",choices:[{index:0,message:j,finish_reason:h}]};return i&&(k.usage=i),k}async function n({providerResponse:a,sourceFormat:b,provider:c,model:d,body:e,stream:o,translatedBody:p,finalBody:q,requestStartTime:r,connectionId:s,apiKey:t,clientRawRequest:u,onRequestSuccess:v,trackDone:w,appendLog:x}){let y=a.headers.get("content-type")||"";if(!(y.includes("text/event-stream")||""===y&&"codex"===c))return null;w();let z={provider:c,model:d,connectionId:s,request:(0,j.Fo)(e,o),providerRequest:q||p||null};if("codex"===c||b===i.h.OPENAI_RESPONSES)try{let e,g=await f(a.body);v&&await v();let h=g.usage||{};x({tokens:h,status:"200 OK"}),(0,j.qr)({provider:c,model:d,tokens:h,connectionId:s,apiKey:t,endpoint:u?.endpoint});let{msgItem:m,textContent:n}=function(a){if(!Array.isArray(a))return{msgItem:null,textContent:null};let b=a.filter(a=>a?.type==="message");if(0===b.length)return{msgItem:null,textContent:null};for(let a=b.length-1;a>=0;a--){let c=l(b[a]);if(c.length>0)return{msgItem:b[a],textContent:c}}let c=b[b.length-1];return{msgItem:c,textContent:l(c)}}(g.output),o=Date.now()-r;if((0,k.ox)((0,j.$R)({...z,latency:{ttft:o,total:o},tokens:{prompt_tokens:h.input_tokens||0,completion_tokens:h.output_tokens||0},response:{content:n,thinking:null,finish_reason:g.status||"unknown"},status:"success"},{endpoint:u?.endpoint||null})).catch(()=>{}),b===i.h.OPENAI_RESPONSES)return{success:!0,response:new Response(JSON.stringify(g),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})};let p=h.input_tokens||0,q=h.output_tokens||0,w=(g.output||[]).filter(a=>"function_call"===a.type).map((a,b)=>({id:a.call_id||`call_${a.name}_${Date.now()}_${b}`,type:"function",function:{name:a.name,arguments:"string"==typeof a.arguments?a.arguments:JSON.stringify(a.arguments||{})}})),y=w.length>0;if(b===i.h.ANTIGRAVITY||b===i.h.GEMINI||b===i.h.GEMINI_CLI)e={response:{candidates:[{content:{role:"model",parts:[{text:n||""}]},finishReason:"STOP",index:0}],usageMetadata:{promptTokenCount:p,candidatesTokenCount:q,totalTokenCount:p+q},modelVersion:d,responseId:g.id||`resp_${Date.now()}`}};else{let a={role:"assistant",content:n||(y?null:"")};y&&(a.tool_calls=w);let b="completed"===g.status||"done"===g.status,c=y?"tool_calls":b?"stop":g.status||"stop";e={id:g.id||`chatcmpl-${Date.now()}`,object:"chat.completion",created:g.created_at||Math.floor(Date.now()/1e3),model:g.model||d,choices:[{index:0,message:a,finish_reason:c}],usage:{prompt_tokens:p,completion_tokens:q,total_tokens:p+q}}}return{success:!0,response:new Response(JSON.stringify(e),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}catch(a){return console.error("[ChatCore] Responses API SSE→JSON failed:",a),(0,g.A1)(h.gx.BAD_GATEWAY,"Failed to convert streaming response to JSON")}try{let b=await a.text(),e=m(b,d);if(!e)return(0,g.A1)(h.gx.BAD_GATEWAY,"Invalid SSE response for non-streaming request");v&&await v();let f=e.usage||{};x({tokens:f,status:"200 OK"}),(0,j.qr)({provider:c,model:d,tokens:f,connectionId:s,apiKey:t,endpoint:u?.endpoint});let i=Date.now()-r;if((0,k.ox)((0,j.$R)({...z,latency:{ttft:i,total:i},tokens:f,response:{content:e.choices?.[0]?.message?.content||null,thinking:e.choices?.[0]?.message?.reasoning_content||null,finish_reason:e.choices?.[0]?.finish_reason||"unknown"},status:"success"},{endpoint:u?.endpoint||null})).catch(()=>{}),e?.choices)for(let a of e.choices)a?.message?.reasoning_content&&a.message.content&&delete a.message.reasoning_content;return{success:!0,response:new Response(JSON.stringify(e),{headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}})}}catch(a){return console.error("[ChatCore] Chat Completions SSE→JSON failed:",a),(0,g.A1)(h.gx.BAD_GATEWAY,"Failed to convert streaming response to JSON")}}},86171:(a,b,c)=>{c.d(b,{$R:()=>i,Fo:()=>g,MK:()=>h,qr:()=>j});var d=c(47370),e=c(71857);let f=["temperature","top_p","top_k","max_tokens","max_completion_tokens","thinking","reasoning","enable_thinking","presence_penalty","frequency_penalty","seed","stop","tools","tool_choice","response_format","prediction","store","metadata","n","logprobs","top_logprobs","logit_bias","user","parallel_tool_calls"];function g(a,b){let c={messages:a.messages||[],model:a.model,stream:b};for(let b of f)void 0!==a[b]&&(c[b]=a[b]);return c}function h(a){return a&&"object"==typeof a?a.usage?.input_tokens!==void 0?{prompt_tokens:a.usage.input_tokens||0,completion_tokens:a.usage.output_tokens||0,cache_read_input_tokens:a.usage.cache_read_input_tokens,cache_creation_input_tokens:a.usage.cache_creation_input_tokens}:a.usage?.prompt_tokens!==void 0?{prompt_tokens:a.usage.prompt_tokens||0,completion_tokens:a.usage.completion_tokens||0,cached_tokens:a.usage.prompt_tokens_details?.cached_tokens,reasoning_tokens:a.usage.completion_tokens_details?.reasoning_tokens}:a.usageMetadata?{prompt_tokens:a.usageMetadata.promptTokenCount||0,completion_tokens:a.usageMetadata.candidatesTokenCount||0,reasoning_tokens:a.usageMetadata.thoughtsTokenCount}:null:null}function i(a,b={}){return{provider:a.provider||"unknown",model:a.model||"unknown",connectionId:a.connectionId||void 0,timestamp:new Date().toISOString(),latency:a.latency||{ttft:0,total:0},tokens:a.tokens||{prompt_tokens:0,completion_tokens:0},request:a.request,providerRequest:a.providerRequest||null,providerResponse:a.providerResponse||null,response:a.response||{},status:a.status||"success",...b}}function j({provider:a,model:b,tokens:c,connectionId:f,apiKey:g,endpoint:h,label:i="USAGE"}){if(!c||"object"!=typeof c)return;let k=c.input_tokens??c.prompt_tokens??0,l=c.output_tokens??c.completion_tokens??0;if(0===k&&0===l)return;let m=new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),n=f?` | account=${f.slice(0,8)}...`:"";console.log(`${e.lm.green}[${m}] 📊 [${i}] ${a.toUpperCase()} | in=${k} | out=${l}${n}${e.lm.reset}`);let o={prompt_tokens:c.prompt_tokens??c.input_tokens??0,completion_tokens:c.completion_tokens??c.output_tokens??0};(0,d.sZ)({provider:a||"unknown",model:b||"unknown",tokens:o,timestamp:new Date().toISOString(),connectionId:f||void 0,apiKey:g||void 0,endpoint:h||null}).catch(()=>{})}},88299:(a,b,c)=>{c.d(b,{U:()=>j});var d=c(14170);let e='Before writing code, stop at the first rung that holds: 1) Does this need to exist? Skip if speculative (YAGNI). 2) Already in codebase? Reuse it. 3) Stdlib does it? Use stdlib. 4) Native platform feature? Use it (CSS over JS, <input type="date"> over picker lib, DB constraint over app code). 5) Installed dependency? Use it, never add new ones for what a few lines do. 6) One line? Write one line. 7) Only then: minimum code that works.',f="No unrequested abstractions. No boilerplate 'for later'. Deletion over addition. Fewest files. Shortest working diff. Mark simplifications: // ponytail: [reason]. Bug fix = root cause fix, not symptom patch.",g="Never simplify away: input validation at trust boundaries, error handling preventing data loss, security measures, accessibility, anything explicitly requested. User insists on full version → build it.",h="ACTIVE EVERY RESPONSE. No drift back to over-building. Still active if unsure.",i={lite:["You are a lazy senior dev. Build what's asked, but name the lazier alternative in one line. User picks.",e,g,"Output: code first, then one line naming what could be simpler.",h].join(" "),full:["You are a lazy senior dev. The best code is the code never written. Enforce the ladder — stdlib and native first, shortest diff, shortest explanation.",e,f,g,"Output: code first, then at most 3 short lines: what was skipped, when to add it. Pattern: [code] → skipped: [X], add when [Y].",h].join(" "),ultra:["You are a YAGNI extremist. Deletion before addition. Ship the one-liner and challenge the rest of the requirement. The laziest solution that actually works.",e,f,g,"Output: one-liner or minimal code, then challenge: 'Do you actually need [X]?' No essays.",h].join(" ")};function j(a,b,c){let e=i[c];if(a&&e)switch(b){case d.h.CLAUDE:!function(a,b){if("string"==typeof a.system&&a.system.length>0){a.system=`${a.system}
56
+
57
+ ${b}`;return}if(Array.isArray(a.system)){let c={type:"text",text:b},d=-1;for(let b=a.system.length-1;b>=0;b--)if(a.system[b]?.cache_control){d=b;break}d>=0?a.system.splice(d,0,c):a.system.push(c);return}a.system=b}(a,e);return;case d.h.GEMINI:case d.h.GEMINI_CLI:case d.h.VERTEX:case d.h.ANTIGRAVITY:var f,g;let h,j,k;f=a,g=e,h=f.request&&"object"==typeof f.request?f.request:f,j=Object.prototype.hasOwnProperty.call(h,"system_instruction")?"system_instruction":"systemInstruction",(k=h[j])&&Array.isArray(k.parts)?k.parts.push({text:g}):h[j]={parts:[{text:g}]};return;default:!function(a,b){var c,d;if("string"==typeof a.instructions){a.instructions=a.instructions?`${a.instructions}
58
+
59
+ ${b}`:b;return}let e=Array.isArray(a.messages)?a.messages:Array.isArray(a.input)?a.input:null;if(!e)return;let f=e.findIndex(a=>a&&("system"===a.role||"developer"===a.role));f>=0?(c=e[f],d=b,"string"==typeof c.content?c.content=`${c.content}
60
+
61
+ ${d}`:Array.isArray(c.content)?c.content.push({type:"input_text",text:d}):c.content=d):e.unshift({role:"system",content:b})}(a,e)}}},92500:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{w:()=>D});var e=c(57647),f=c(33110),g=c(14170),h=c(71857),i=c(59657),j=c(8590),k=c(71336),l=c(44404),m=c(43659),n=c(41004),o=c(27349),p=c(47370),q=c(89718),r=c(55330),s=c(86171),t=c(81626),u=c(5016),v=c(20623),w=c(324),x=c(14724),y=c(60125),z=c(88299),A=c(99415),B=c(77256),C=a([r]);async function D({body:a,modelInfo:b,credentials:c,log:d,onCredentialsRefreshed:C,onRequestSuccess:E,onDisconnect:F,clientRawRequest:G,connectionId:H,userAgent:I,apiKey:J,ccFilterNaming:K,rtkEnabled:L,cavemanEnabled:M,cavemanLevel:N,contextInjectionEnabled:O,ponytailEnabled:P,ponytailLevel:Q,sourceFormatOverride:R,providerThinking:S}){let T,U,V,W,X,Y,{provider:Z,model:$}=b,_=Date.now(),aa=R||(0,e.Tz)(a),ab=(0,o.c)(a,$,I,K);if(ab)return ab;let ac=l.Xg[Z]||Z,ad=(0,l.ux)(ac,$)||(0,e.jJ)(Z),ae=(0,l.cY)(ac,$),af=(0,l.kt)(ac,$);if(S?.mode&&"auto"!==S.mode){let b=S.mode;"on"!==b||a.thinking?"off"===b?(a={...a,thinking:{type:"disabled"}},delete a.reasoning_effort,a.reasoning&&"object"==typeof a.reasoning&&(a.reasoning={...a.reasoning,effort:"none"})):a.reasoning_effort||(a={...a,reasoning_effort:b}):(console.log("Injecting provider-level thinking config override: on"),a={...a,thinking:{type:"enabled",budget_tokens:1e4}})}let ag=!0===a.stream||aa===g.h.ANTIGRAVITY||aa===g.h.GEMINI||aa===g.h.GEMINI_CLI,ah="openai"===Z||"codex"===Z||"commandcode"===Z,ai=!!ah||!1!==a.stream,aj=(0,w.J)(G?.headers||{},a);"deepseek-tui"===aj&&!0!==a.stream&&(ai=!1);let ak=G?.headers?.accept||"",al=ak.includes("application/json"),am=ak.includes("text/event-stream");al&&!am&&!0!==a.stream&&(ai=!1);let an=await (0,k.q7)(aa,ad,$);G&&an.logClientRawRequest(G.endpoint,G.body,G.headers),an.logRawRequest(a),d?.debug?.("FORMAT",`${aa} → ${ad} | stream=${ai}`);let ao=(0,w.J)(G?.headers||{},a),ap=(0,w.Q)(ao,Z);if(ap)d?.debug?.("PASSTHROUGH",`${ao} → ${Z} | native lossless`),T={...a,model:af};else{if(!(T=(0,f.GH)(aa,ad,af,a,ai,c,Z,an,ae,H,ao)))return(0,p.uw)($,Z,H,!1,!0),(0,m.A1)(n.gx.BAD_REQUEST,`Failed to translate request for ${aa} → ${ad}`);U=T._toolNameMap,delete T._toolNameMap,T.model=af}if("claude"===ao&&Array.isArray(T.tools)){let{tools:a,stripped:b}=(0,x.F)(T.tools);b.length>0&&(T.tools=a,d?.debug?.("TOOLDEDUP",`stripped ${b.length}: ${b.slice(0,3).join(", ")}${b.length>3?"...":""}`))}let aq=ap?aa:ad;"tts"===(0,l.OA)(ac,$)&&T.messages&&(T.messages=T.messages.filter(a=>"tool"!==a.role),delete T.tools);let ar=(0,B.B)(T,L),as=(0,B.f)(ar);if(as&&console.log(as),M&&N&&((0,y.p)(T,aq,N),d?.debug?.("CAVEMAN",`${N} | ${aq}`)),P&&Q&&((0,z.U)(T,aq,Q),d?.debug?.("PONYTAIL",`${Q} | ${aq}`)),O)try{let a=await (0,q.qd)();if(a?.length){let b=a.map(a=>a.content).filter(Boolean).join("\n\n");b&&((0,A.e)(T,aq,b),d?.debug?.("CONTEXT",`${a.length} file(s) | ${aq}`))}}catch(a){d?.error?.("CONTEXT",`injection failed: ${a.message}`)}let at=(0,r.SB)(Z);(0,p.uw)($,Z,H,!0),(0,p.E5)({model:$,provider:Z,connectionId:H,status:"PENDING"}).catch(()=>{});let au=T.messages?.length||T.input?.length||T.contents?.length||T.request?.contents?.length||0;d?.debug?.("REQUEST",`${Z.toUpperCase()} | ${$} | ${au} msgs`);let av=(0,i.jd)({onDisconnect:a=>{(0,p.uw)($,Z,H,!1),F&&F(a)},onError:()=>(0,p.uw)($,Z,H,!1),log:d,provider:Z,model:$}),aw={connectionProxyEnabled:c?.providerSpecificData?.connectionProxyEnabled===!0,connectionProxyUrl:c?.providerSpecificData?.connectionProxyUrl||"",connectionNoProxy:c?.providerSpecificData?.connectionNoProxy||"",vercelRelayUrl:c?.providerSpecificData?.vercelRelayUrl||""};if(aw.vercelRelayUrl){let a=c?.connectionName||c?.connectionId||"unknown",b=c?.providerSpecificData?.connectionProxyPoolId||"none";d?.info?.("PROXY",`${Z.toUpperCase()} | ${$} | conn=${a} | pool=${b} | vercel-relay=${aw.vercelRelayUrl}`)}else if(aw.connectionProxyEnabled&&aw.connectionProxyUrl){let a=aw.connectionProxyUrl;try{let b=new URL(aw.connectionProxyUrl),c=b.hostname||"",d=b.port?`:${b.port}`:"",e=b.protocol||"http:";a=`${e}//${c}${d}`}catch{}let b=c?.providerSpecificData?.connectionProxyPoolId||"none",e=c?.connectionName||c?.connectionId||"unknown";d?.info?.("PROXY",`${Z.toUpperCase()} | ${$} | conn=${e} | pool=${b} | url=${a}`)}if(aw.connectionProxyEnabled&&aw.connectionNoProxy){let a=c?.connectionName||c?.connectionId||"unknown";d?.debug?.("PROXY",`${Z.toUpperCase()} | ${$} | conn=${a} | no_proxy=${aw.connectionNoProxy}`)}try{let a=await at.execute({model:$,body:T,stream:ai,credentials:c,signal:av.signal,log:d,proxyOptions:aw});V=a.response,W=a.url,X=a.headers,Y=a.transformedBody,an.logTargetRequest(W,X,Y)}catch(c){if((0,p.uw)($,Z,H,!1,!0),(0,p.E5)({model:$,provider:Z,connectionId:H,status:`FAILED ${"AbortError"===c.name?499:n.gx.BAD_GATEWAY}`}).catch(()=>{}),(0,p.ox)((0,s.$R)({provider:Z,model:$,connectionId:H,latency:{ttft:0,total:Date.now()-_},tokens:{prompt_tokens:0,completion_tokens:0},request:(0,s.Fo)(a,ai),providerRequest:T||null,response:{error:c.message||String(c),status:"AbortError"===c.name?499:502,thinking:null},status:"error"})).catch(()=>{}),"AbortError"===c.name)return av.handleError(c),(0,m.A1)(499,"Request aborted");let b=(0,m.lR)(c,Z,$,n.gx.BAD_GATEWAY);return console.log(`${h.lm.red}[ERROR] ${b}${h.lm.reset}`),(0,m.A1)(n.gx.BAD_GATEWAY,b)}if(!at.noAuth&&(V.status===n.gx.UNAUTHORIZED||V.status===n.gx.FORBIDDEN))try{let a=await (0,j.qZ)(()=>at.refreshCredentials(c,d),3,d);if(a?.accessToken||a?.copilotToken){if(d?.info?.("TOKEN",`${Z.toUpperCase()} | refreshed`),Object.assign(c,a),C)try{await C(a)}catch(a){d?.warn?.("TOKEN",`onCredentialsRefreshed failed: ${a.message}`)}try{let a=await at.execute({model:$,body:T,stream:ai,credentials:c,signal:av.signal,log:d,proxyOptions:aw});a.response.ok&&(V=a.response,W=a.url)}catch{d?.warn?.("TOKEN",`${Z.toUpperCase()} | retry after refresh failed`)}}else d?.warn?.("TOKEN",`${Z.toUpperCase()} | refresh failed`)}catch(a){d?.warn?.("TOKEN",`${Z.toUpperCase()} | refresh threw: ${a.message}`)}if(!V.ok){(0,p.uw)($,Z,H,!1,!0);let{statusCode:b,message:c,resetsAtMs:d}=await (0,m.zL)(V,at);(0,p.E5)({model:$,provider:Z,connectionId:H,status:`FAILED ${b}`}).catch(()=>{}),(0,p.ox)((0,s.$R)({provider:Z,model:$,connectionId:H,latency:{ttft:0,total:Date.now()-_},tokens:{prompt_tokens:0,completion_tokens:0},request:(0,s.Fo)(a,ai),providerRequest:Y||T||null,response:{error:c,status:b,thinking:null},status:"error"})).catch(()=>{});let e=(0,m.lR)(Error(c),Z,$,b);return console.log(`${h.lm.red}[ERROR] ${e}${h.lm.reset}`),an.logError(Error(c),Y||T),(0,m.A1)(b,e,d)}let ax={provider:Z,model:$,body:a,stream:ai,translatedBody:T,finalBody:Y,requestStartTime:_,connectionId:H,apiKey:J,clientRawRequest:G,onRequestSuccess:E},ay=a=>(0,p.E5)({model:$,provider:Z,connectionId:H,...a}).catch(()=>{}),az=()=>(0,p.uw)($,Z,H,!1);if(!ag&&ah){let a=await (0,t.I)({...ax,providerResponse:V,sourceFormat:aa,trackDone:az,appendLog:ay});if(a)return av.handleComplete(),a}if(!ai){let a=await (0,u.N)({...ax,providerResponse:V,sourceFormat:aa,targetFormat:ad,reqLogger:an,toolNameMap:U,trackDone:az,appendLog:ay});return av.handleComplete(),a}let{onStreamComplete:aA,streamDetailId:aB}=(0,v.$)({...ax});return(0,v.M)({...ax,providerResponse:V,sourceFormat:aa,targetFormat:ad,userAgent:I,reqLogger:an,toolNameMap:U,streamController:av,onStreamComplete:aA,streamDetailId:aB})}r=(C.then?(await C)():C)[0],d()}catch(a){d(a)}})},99415:(a,b,c)=>{c.d(b,{e:()=>e});var d=c(14170);function e(a,b,c){if(a&&c&&"string"==typeof c)switch(b){case d.h.CLAUDE:!function(a,b){if("string"==typeof a.system&&a.system.length>0){a.system=`${b}
56
62
 
57
63
  ${a.system}`;return}Array.isArray(a.system)?a.system.unshift({type:"text",text:b}):a.system=b}(a,c);return;case d.h.GEMINI:case d.h.GEMINI_CLI:case d.h.VERTEX:case d.h.ANTIGRAVITY:var e,f;let g,h,i;e=a,f=c,g=e.request&&"object"==typeof e.request?e.request:e,h=Object.prototype.hasOwnProperty.call(g,"system_instruction")?"system_instruction":"systemInstruction",(i=g[h])&&Array.isArray(i.parts)?i.parts.unshift({text:f}):g[h]={parts:[{text:f}]};return;default:!function(a,b){var c,d;if("string"==typeof a.instructions){a.instructions=a.instructions?`${b}
58
64