@jheavenknows/bluerouter 5.4.49 → 5.4.50

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 (590) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +4 -4
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page.js.nft.json +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page_client-reference-manifest.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/model-profiles/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/model-profiles/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/logs/console/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/logs/console/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/logs/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personal/page.js.nft.json +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personal/page_client-reference-manifest.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js.nft.json +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js.nft.json +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/stt/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/stt/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/tts/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/tts/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  94. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  95. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  96. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  97. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
  98. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/api/audit-proxy/ca/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/audit-proxy/ca/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/audit-proxy/me/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/audit-proxy/me/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/audit-proxy/route.js +2 -2
  104. package/app/.next-cli-build/server/app/api/audit-proxy/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/audit-proxy/users/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/audit-proxy/users/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/login/route.js +4 -4
  111. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/view-mode/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/view-mode/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/branding/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/branding/upload/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-model-profiles/cloud-models/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-model-profiles/cloud-models/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-model-profiles/model-catalog/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-model-profiles/model-catalog/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-model-profiles/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-model-profiles/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cluster/config/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cluster/config/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js.nft.json +1 -1
  161. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/cluster/peers/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/cluster/peers/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cluster/sync/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/cluster/sync/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cluster/test/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/cluster/test/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/codex-catalog/download/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/codex-catalog/download/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/codex-catalog/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/codex-catalog/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/codex-catalog/upload/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/codex-catalog/upload/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +2 -2
  177. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/dashboard/ai-power-index/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/dashboard/ai-power-index/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js +1 -1
  190. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js +2 -2
  195. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/keys/route.js +2 -2
  205. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/oauth/grok-cli/device-code/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/grok-cli/device-code/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/grok-cli/poll/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/grok-cli/poll/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/move/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/move/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/personal-cloud-providers/shares/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/personal-cloud-providers/shares/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/personal-cloud-providers/visibility/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/personal-cloud-providers/visibility/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/pricing/catalog/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/provider-nodes/openai-compatible/manage/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/resource-monitor/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/resource-monitor/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/settings/database/export/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/settings/database/export/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  334. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  342. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  348. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  370. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  371. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/version/restart/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  382. package/app/.next-cli-build/server/app/callback.html +1 -1
  383. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  384. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  385. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  386. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
  387. package/app/.next-cli-build/server/app/dashboard/ai-power-index.html +1 -1
  388. package/app/.next-cli-build/server/app/dashboard/ai-power-index.rsc +6 -6
  389. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/!KGRhc2hib2FyZCk/dashboard/ai-power-index/__PAGE__.segment.rsc +6 -6
  390. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_full.segment.rsc +6 -6
  391. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_tree.segment.rsc +1 -1
  392. package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
  393. package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +9 -9
  394. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +9 -9
  395. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +9 -9
  396. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +1 -1
  397. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  398. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  399. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
  400. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  401. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  402. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.html +1 -1
  403. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.rsc +8 -8
  404. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/model-profiles/__PAGE__.segment.rsc +8 -8
  405. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_full.segment.rsc +8 -8
  406. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_tree.segment.rsc +1 -1
  407. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  409. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +7 -7
  410. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  411. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  412. package/app/.next-cli-build/server/app/dashboard/cluster.html +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/cluster.rsc +6 -6
  414. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster/__PAGE__.segment.rsc +6 -6
  415. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_full.segment.rsc +6 -6
  416. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_tree.segment.rsc +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  419. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
  420. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  421. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  422. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  424. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
  425. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  426. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  427. package/app/.next-cli-build/server/app/dashboard/logs.html +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/logs.rsc +6 -6
  429. package/app/.next-cli-build/server/app/dashboard/logs.segments/!KGRhc2hib2FyZCk/dashboard/logs/__PAGE__.segment.rsc +6 -6
  430. package/app/.next-cli-build/server/app/dashboard/logs.segments/_full.segment.rsc +6 -6
  431. package/app/.next-cli-build/server/app/dashboard/logs.segments/_tree.segment.rsc +1 -1
  432. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  433. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  434. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
  435. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  436. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  437. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  438. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  439. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
  440. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  441. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/personal.html +1 -1
  443. package/app/.next-cli-build/server/app/dashboard/personal.rsc +7 -7
  444. package/app/.next-cli-build/server/app/dashboard/personal.segments/!KGRhc2hib2FyZCk/dashboard/personal/__PAGE__.segment.rsc +7 -7
  445. package/app/.next-cli-build/server/app/dashboard/personal.segments/_full.segment.rsc +7 -7
  446. package/app/.next-cli-build/server/app/dashboard/personal.segments/_tree.segment.rsc +1 -1
  447. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  448. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  449. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
  450. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  451. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  452. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  453. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +6 -6
  454. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +6 -6
  455. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +6 -6
  456. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +1 -1
  457. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  458. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +6 -6
  459. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +6 -6
  460. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +6 -6
  461. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +1 -1
  462. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  463. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  464. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
  465. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  466. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  467. package/app/.next-cli-build/server/app/dashboard/providers/stt.html +1 -1
  468. package/app/.next-cli-build/server/app/dashboard/providers/stt.rsc +7 -7
  469. package/app/.next-cli-build/server/app/dashboard/providers/stt.segments/!KGRhc2hib2FyZCk/dashboard/providers/stt/__PAGE__.segment.rsc +7 -7
  470. package/app/.next-cli-build/server/app/dashboard/providers/stt.segments/_full.segment.rsc +7 -7
  471. package/app/.next-cli-build/server/app/dashboard/providers/stt.segments/_tree.segment.rsc +1 -1
  472. package/app/.next-cli-build/server/app/dashboard/providers/tts.html +1 -1
  473. package/app/.next-cli-build/server/app/dashboard/providers/tts.rsc +7 -7
  474. package/app/.next-cli-build/server/app/dashboard/providers/tts.segments/!KGRhc2hib2FyZCk/dashboard/providers/tts/__PAGE__.segment.rsc +7 -7
  475. package/app/.next-cli-build/server/app/dashboard/providers/tts.segments/_full.segment.rsc +7 -7
  476. package/app/.next-cli-build/server/app/dashboard/providers/tts.segments/_tree.segment.rsc +1 -1
  477. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  478. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  479. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
  480. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  481. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  483. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  484. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
  485. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  486. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  487. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  488. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  489. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
  490. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  491. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/resource-monitor.html +1 -1
  493. package/app/.next-cli-build/server/app/dashboard/resource-monitor.rsc +6 -6
  494. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor/__PAGE__.segment.rsc +6 -6
  495. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_full.segment.rsc +6 -6
  496. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_tree.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  498. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  499. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +6 -6
  500. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  501. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  502. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  504. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
  505. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  506. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  508. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  509. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
  510. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  511. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  512. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  513. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  514. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
  515. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  516. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  519. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
  520. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  521. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  522. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  523. package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
  524. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
  525. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
  526. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  528. package/app/.next-cli-build/server/app/index.html +1 -1
  529. package/app/.next-cli-build/server/app/index.rsc +5 -5
  530. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  531. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  532. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  533. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  534. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  535. package/app/.next-cli-build/server/app/landing.html +1 -1
  536. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  537. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  538. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  539. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
  540. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  541. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  542. package/app/.next-cli-build/server/app/login.html +1 -1
  543. package/app/.next-cli-build/server/app/login.rsc +6 -6
  544. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  545. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  546. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
  547. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  548. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  549. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  550. package/app/.next-cli-build/server/app-paths-manifest.json +4 -4
  551. package/app/.next-cli-build/server/chunks/1893.js +1 -0
  552. package/app/.next-cli-build/server/chunks/2428.js +1 -1
  553. package/app/.next-cli-build/server/chunks/2947.js +2 -0
  554. package/app/.next-cli-build/server/chunks/3104.js +1 -1
  555. package/app/.next-cli-build/server/chunks/3399.js +1 -1
  556. package/app/.next-cli-build/server/chunks/3792.js +2 -0
  557. package/app/.next-cli-build/server/chunks/3958.js +9 -10
  558. package/app/.next-cli-build/server/chunks/427.js +1 -1
  559. package/app/.next-cli-build/server/chunks/4432.js +1 -0
  560. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  561. package/app/.next-cli-build/server/chunks/4778.js +1 -1
  562. package/app/.next-cli-build/server/chunks/5019.js +1 -0
  563. package/app/.next-cli-build/server/chunks/541.js +1 -1
  564. package/app/.next-cli-build/server/chunks/607.js +1 -1
  565. package/app/.next-cli-build/server/chunks/6811.js +1 -1
  566. package/app/.next-cli-build/server/chunks/6992.js +1 -1
  567. package/app/.next-cli-build/server/chunks/7307.js +1 -1
  568. package/app/.next-cli-build/server/chunks/8049.js +1 -1
  569. package/app/.next-cli-build/server/chunks/9083.js +8 -8
  570. package/app/.next-cli-build/server/chunks/9905.js +1 -1
  571. package/app/.next-cli-build/server/instrumentation.js +1 -1
  572. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  573. package/app/.next-cli-build/server/middleware.js +7 -6
  574. package/app/.next-cli-build/server/pages/404.html +1 -1
  575. package/app/.next-cli-build/server/pages/500.html +1 -1
  576. package/app/.next-cli-build/static/chunks/{5263-b519926aaf536479.js → 5263-53a5c688033e07a0.js} +1 -1
  577. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/audit-proxy/page-196a57c390e33e8e.js +8 -0
  578. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
  579. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
  580. package/app/package.json +1 -1
  581. package/package.json +1 -1
  582. package/app/.next-cli-build/server/chunks/1370.js +0 -1
  583. package/app/.next-cli-build/server/chunks/3096.js +0 -2
  584. package/app/.next-cli-build/server/chunks/3503.js +0 -1
  585. package/app/.next-cli-build/server/chunks/7812.js +0 -1
  586. package/app/.next-cli-build/server/chunks/9471.js +0 -1
  587. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/audit-proxy/page-dae70e675a844e74.js +0 -8
  588. /package/app/.next-cli-build/static/{ugqmbHNAbXl3X-KWhDFgO → IGu6MyMQCf_NSW_h6RfYZ}/_buildManifest.js +0 -0
  589. /package/app/.next-cli-build/static/{ugqmbHNAbXl3X-KWhDFgO → IGu6MyMQCf_NSW_h6RfYZ}/_ssgManifest.js +0 -0
  590. /package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.4.41-to-5.4.44-5.4.44-20260915-162643 → upgrade-5.4.47-to-5.4.48-5.4.48-20260915-174715}/data.sqlite +0 -0
@@ -0,0 +1,8 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5236],{23371:(e,t,s)=>{Promise.resolve().then(s.bind(s,95705)),Promise.resolve().then(s.bind(s,35696))},35696:(e,t,s)=>{"use strict";s.d(t,{default:()=>o});var r=s(95155),a=s(12115),n=s(83163);function d({ok:e,children:t}){return(0,r.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium ${e?"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400":"border-border bg-surface text-text-muted"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:e?"check_circle":"radio_button_unchecked"}),t]})}function o(){let[e,t]=(0,a.useState)(null),[s,o]=(0,a.useState)(""),i=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/audit-proxy/me",{cache:"no-store"}),s=await e.json().catch(()=>({}));if(!e.ok)throw Error(s.error||"Kh\xf4ng tải được th\xf4ng tin truy cập Audit Proxy của bạn");t(s)}catch(e){o(e.message||"Kh\xf4ng tải được th\xf4ng tin truy cập Audit Proxy của bạn")}},[]);if((0,a.useEffect)(()=>{i();let e=setInterval(i,15e3);return()=>clearInterval(e)},[i]),s&&!e)return(0,r.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-400",children:s});if(!e)return(0,r.jsx)("div",{className:"rounded-xl border border-border bg-surface p-5 text-sm text-text-muted",children:"Đang tải Enterprise AI Audit Proxy…"});let l=e.rootCA||{},c=e.session||null;return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"rounded-2xl border border-primary/20 bg-primary/5 p-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:"policy"}),(0,r.jsx)("h1",{className:"text-lg font-bold text-text-main",children:"Enterprise AI Audit Proxy"}),(0,r.jsx)(d,{ok:!0===e.running,children:e.running?"Đang chạy":"Đ\xe3 dừng"}),(0,r.jsx)(d,{ok:!0===l.validated,children:"Root CA"})]}),(0,r.jsx)("p",{className:"mt-2 max-w-4xl text-sm leading-6 text-text-muted",children:"T\xe0i khoản của bạn được ph\xe9p d\xf9ng audit proxy cho Claude Code v\xe0 Codex. C\xe0i Root CA một lần, sau đ\xf3 khởi động CLI bằng một trong c\xe1c lệnh b\xean dưới. Mọi request đi qua proxy đều được quản trị vi\xean ghi log để phục vụ kiểm to\xe1n."})]}),s?(0,r.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-400",children:s}):null,(0,r.jsxs)("div",{className:"grid gap-4 xl:grid-cols-[0.8fr_1.2fr]",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Quyền truy cập của bạn"}),(0,r.jsx)("p",{className:"mt-1 text-xs leading-5 text-text-muted",children:"Bạn kh\xf4ng cần khai b\xe1o IP. Ngay khi đăng nhập dashboard th\xe0nh c\xf4ng, địa chỉ bạn vừa đăng nhập được tin cậy để d\xf9ng proxy — từ địa chỉ kh\xe1c, kết nối sẽ bị đ\xf3ng. Phi\xean tự gia hạn khi c\xf2n hoạt động; ngừng d\xf9ng một thời gian sẽ hết hạn v\xe0 bạn chỉ cần đăng nhập lại."}),(0,r.jsxs)("div",{className:"mt-3 grid gap-2 text-xs",children:[(0,r.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"T\xe0i khoản"}),(0,r.jsx)("span",{className:"break-all font-mono text-text-main",children:e.grant?.userId||e.userId||"-"})]}),e.grant?.note?(0,r.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Ghi ch\xfa"}),(0,r.jsx)("span",{className:"break-all text-text-main",children:e.grant.note})]}):null]}),(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsx)("div",{className:"text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"Phi\xean hiện tại"}),c?(0,r.jsxs)("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[(0,r.jsx)("span",{className:"rounded-full border border-green-500/30 bg-green-500/5 px-2.5 py-1 font-mono text-[11px] text-green-600 dark:text-green-400",children:c.ip}),(0,r.jsxs)("span",{className:"text-[11px] text-text-muted",children:["c\xf2n hiệu lực tới ",new Date(c.expiresAt).toLocaleString()]})]}):(0,r.jsx)("p",{className:"mt-1.5 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] leading-5 text-amber-700 dark:text-amber-300",children:e.isAdmin?"T\xe0i khoản admin của bạn kh\xf4ng c\xf3 grant ri\xeang — grant chỉ d\xf9ng cho user thường.":`Địa chỉ hiện tại (${e.clientIp||"kh\xf4ng x\xe1c định"}) chưa c\xf3 phi\xean hoạt động. Tải lại trang n\xe0y (hoặc đăng nhập lại dashboard) từ đ\xfang m\xe1y trạm bạn định chạy CLI để k\xedch hoạt.`})]})]}),(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Root CA"}),(0,r.jsx)("p",{className:"mt-1 text-xs leading-5 text-text-muted",children:"Tải certificate v\xe0 lưu v\xe0o đ\xfang đường dẫn ghi trong phần hướng dẫn b\xean cạnh. Đ\xe2y l\xe0 certificate c\xf4ng khai, kh\xf4ng chứa private key."}),(0,r.jsxs)("div",{className:"mt-3 grid gap-2 text-xs",children:[(0,r.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Trạng th\xe1i"}),(0,r.jsx)("span",{className:"font-medium text-text-main",children:l.validated?"Đ\xe3 x\xe1c thực":l.certExists?"Cần kiểm tra lại":"Chưa tạo"})]}),l.subject?(0,r.jsxs)("div",{className:"grid gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Subject"}),(0,r.jsx)("span",{className:"break-all font-mono text-[11px] text-text-main",children:l.subject})]}):null,l.fingerprint?(0,r.jsxs)("div",{className:"grid gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Fingerprint public key"}),(0,r.jsx)("span",{className:"break-all font-mono text-[11px] text-text-main",children:l.fingerprint})]}):null,l.notAfter?(0,r.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Hết hạn"}),(0,r.jsx)("span",{className:"text-text-main",children:new Date(l.notAfter).toLocaleString()})]}):null]}),(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)("a",{href:"/api/audit-proxy/ca?download=cert",className:`inline-flex rounded-lg border border-primary/30 bg-primary/10 px-3 py-2 text-xs font-semibold text-primary ${l.certExists?"":"pointer-events-none opacity-50"}`,children:"Tải Root CA"})})]})]}),(0,r.jsx)(n.Ay,{clientProxyHost:e.endpoint?.clientProxyHost,port:e.endpoint?.port,onError:o})]})]})}},83163:(e,t,s)=>{"use strict";s.d(t,{Ay:()=>l});var r=s(95155),a=s(12115);let n="localhost,127.0.0.1,::1",d="C:\\BlueRouter\\bluerouter-audit-root-ca.crt",o="$HOME/.bluerouter/bluerouter-audit-root-ca.crt";function i({title:e,subtitle:t,command:s,copyKey:a,copied:n,onCopy:d,recommended:o=!1}){return(0,r.jsxs)("div",{className:`rounded-xl border bg-background p-3 ${o?"border-green-500/30":"border-border"}`,children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-text-main",children:e}),o?(0,r.jsx)("span",{className:"rounded-full bg-green-500/10 px-2 py-0.5 text-[10px] font-semibold text-green-600 dark:text-green-400",children:"Khuyến nghị"}):null]}),t?(0,r.jsx)("div",{className:"mt-0.5 text-[10px] leading-4 text-text-muted",children:t}):null]}),(0,r.jsx)("button",{type:"button",onClick:()=>d(a,s),className:"shrink-0 text-xs font-medium text-primary",children:n===a?"Đ\xe3 copy":"Copy"})]}),(0,r.jsx)("pre",{className:"mt-2 overflow-x-auto whitespace-pre-wrap break-all rounded-lg bg-surface px-3 py-2 text-[11px] leading-5 text-text-muted",children:s})]})}function l({clientProxyHost:e,port:t,onError:s}){let[c,x]=(0,a.useState)(""),m=(0,a.useMemo)(()=>{var s,r;let a,i=(s=e,r=t,`http://${(a=String(s||"").trim()||"<bluerouter-host>").includes(":")&&!a.startsWith("[")?`[${a}]`:a}:${r}`),l=`set "HTTP_PROXY=${i}"&&set "HTTPS_PROXY=${i}"&&set "NO_PROXY=${n}"&&set "no_proxy=${n}"`,c=`HTTP_PROXY='${i}' HTTPS_PROXY='${i}' NO_PROXY='${n}' no_proxy='${n}'`;return{proxyUrl:i,claudePowerShell:`cmd.exe /d /c '${l}&&set "NODE_EXTRA_CA_CERTS=${d}"&&claude'`,codexPowerShell:`cmd.exe /d /c '${l}&&set "CODEX_CA_CERTIFICATE=${d}"&&codex'`,claudeBash:`env ${c} NODE_EXTRA_CA_CERTS="${o}" claude`,codexBash:`env ${c} CODEX_CA_CERTIFICATE="${o}" codex`}},[e,t]),p=`model_provider = "chatgpt_https"
2
+
3
+ [model_providers.chatgpt_https]
4
+ name = "OpenAI ChatGPT (HTTPS)"
5
+ base_url = "https://chatgpt.com/backend-api/codex"
6
+ wire_api = "responses"
7
+ requires_openai_auth = true
8
+ `,u=async(e,t)=>{try{await navigator.clipboard.writeText(t),x(e),setTimeout(()=>x(""),1500)}catch{s?.("Kh\xf4ng truy cập được clipboard của tr\xecnh duyệt.")}};return(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Hướng dẫn cấu h\xecnh m\xe1y trạm"}),(0,r.jsx)("p",{className:"mt-1 text-xs leading-5 text-text-muted",children:"C\xe1c lệnh dưới đ\xe2y chỉ đặt biến m\xf4i trường trong tiến tr\xecnh con — kh\xf4ng d\xf9ng setx, kh\xf4ng đổi proxy của Windows/hệ thống. NO_PROXY giữ cho OAuth callback ở localhost v\xe0 MCP chạy nội bộ kh\xf4ng đi qua proxy."}),(0,r.jsxs)("div",{className:"mt-3 rounded-xl border border-primary/20 bg-primary/5 p-3 text-xs leading-5 text-text-muted",children:[(0,r.jsx)("div",{className:"font-semibold text-primary",children:"L\xe0m một lần trước khi d\xf9ng"}),"Lưu file Root CA vừa tải v\xe0o đ\xfang đường dẫn: ",(0,r.jsx)("code",{className:"rounded bg-background px-1 py-0.5",children:d})," tr\xean Windows, hoặc ",(0,r.jsx)("code",{className:"rounded bg-background px-1 py-0.5",children:o})," tr\xean Linux/macOS. Nếu CA đ\xe3 được c\xe0i v\xe0o hệ điều h\xe0nh th\xec biến CA trong lệnh vẫn v\xf4 hại, cứ để nguy\xean."]}),(0,r.jsxs)("div",{className:"mt-3 grid gap-3",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-background p-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-text-main",children:"Địa chỉ proxy"}),(0,r.jsx)("button",{type:"button",onClick:()=>u("url",m.proxyUrl),className:"text-xs text-primary",children:"url"===c?"Đ\xe3 copy":"Copy"})]}),(0,r.jsx)("code",{className:"mt-1 block break-all text-xs text-text-muted",children:m.proxyUrl})]}),(0,r.jsx)(i,{title:"Claude Code \xb7 Windows PowerShell",subtitle:"Biến proxy chỉ tồn tại trong tiến tr\xecnh con, đ\xf3ng cửa sổ l\xe0 hết.",command:m.claudePowerShell,copyKey:"claude-ps",copied:c,onCopy:u,recommended:!0}),(0,r.jsxs)("div",{className:"rounded-xl border border-green-500/30 bg-green-500/5 p-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-text-main",children:"Codex \xb7 Ghim v\xe0o transport HTTPS"}),(0,r.jsx)("span",{className:"rounded-full bg-green-500/10 px-2 py-0.5 text-[10px] font-semibold text-green-600 dark:text-green-400",children:"Cấu h\xecnh ch\xednh"})]}),(0,r.jsx)("p",{className:"mt-2 text-[11px] leading-5 text-text-muted",children:"Codex ưu ti\xean WebSocket khi khởi động. Audit Proxy kh\xf4ng cho WebSocket upgrade, n\xean h\xe3y cấu h\xecnh Codex d\xf9ng HTTPS để tr\xe1nh khoảng 7 gi\xe2y thử kết nối lại."}),(0,r.jsxs)("p",{className:"mt-2 text-[11px] leading-5 text-text-muted",children:["Tạo hoặc mở file ",(0,r.jsx)("code",{className:"rounded bg-background px-1 py-0.5",children:"%USERPROFILE%\\.codex\\config.toml"}),", sau đ\xf3 copy to\xe0n bộ nội dung b\xean dưới v\xe0o file v\xe0 lưu lại."]}),(0,r.jsx)("div",{className:"mt-3",children:(0,r.jsx)(i,{title:"Nội dung file config.toml",subtitle:"Copy to\xe0n bộ nội dung b\xean dưới v\xe0 lưu v\xe0o config.toml.",command:p,copyKey:"codex-https-config",copied:c,onCopy:u,recommended:!0})}),(0,r.jsxs)("p",{className:"mt-2 text-[11px] leading-5 text-amber-600 dark:text-amber-400",children:["Nếu config.toml đ\xe3 c\xf3 nội dung, đặt ",(0,r.jsx)("code",{className:"rounded bg-background px-1 py-0.5",children:'model_provider = "chatgpt_https"'})," ở cấp cao nhất v\xe0 chỉ th\xeam một khối ",(0,r.jsx)("code",{className:"rounded bg-background px-1 py-0.5",children:"[model_providers.chatgpt_https]"}),". Kh\xf4ng tạo hai kho\xe1 ",(0,r.jsx)("code",{className:"rounded bg-background px-1 py-0.5",children:"model_provider"}),"."]}),(0,r.jsxs)("p",{className:"mt-2 text-[11px] leading-5 text-text-muted",children:["File config.toml chỉ chọn transport HTTPS. Proxy vẫn được truyền qua ",(0,r.jsx)("code",{className:"rounded bg-background px-1 py-0.5",children:"HTTP_PROXY"}),"/",(0,r.jsx)("code",{className:"rounded bg-background px-1 py-0.5",children:"HTTPS_PROXY"}),"/",(0,r.jsx)("code",{className:"rounded bg-background px-1 py-0.5",children:"NO_PROXY"}),", n\xean sau khi lưu file h\xe3y chạy Codex bằng lệnh b\xean dưới."]})]}),(0,r.jsx)(i,{title:"Codex \xb7 Windows PowerShell",subtitle:"Kh\xf4ng ghi g\xec v\xe0o biến m\xf4i trường của user hay hệ thống.",command:m.codexPowerShell,copyKey:"codex-ps",copied:c,onCopy:u,recommended:!0}),(0,r.jsxs)("details",{className:"rounded-xl border border-border bg-background p-3",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-xs font-semibold text-text-main",children:"Lệnh cho Linux / macOS"}),(0,r.jsxs)("div",{className:"mt-3 grid gap-3",children:[(0,r.jsx)(i,{title:"Claude Code \xb7 Bash/zsh",command:m.claudeBash,copyKey:"claude-bash",copied:c,onCopy:u}),(0,r.jsx)(i,{title:"Codex \xb7 Bash/zsh",command:m.codexBash,copyKey:"codex-bash",copied:c,onCopy:u})]})]})]})]})}},95705:(e,t,s)=>{"use strict";s.d(t,{default:()=>k});var r=s(95155),a=s(12115),n=s(98500),d=s.n(n);function o(){let[e,t]=(0,a.useState)(!1),[s,n]=(0,a.useState)(!1),[d,o]=(0,a.useState)([]),[i,l]=(0,a.useState)(!1),[c,x]=(0,a.useState)(""),[m,p]=(0,a.useState)(""),u=(e,s)=>{n(e?.proxyAuthEnabled===!0),o((e?.proxyAuthUsers||[]).map(e=>({username:e.username,hasPassword:!0===e.hasPassword,password:""}))),s&&t(!0===s.running)},h=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/audit-proxy?limit=1",{cache:"no-store"}),t=await e.json();if(!e.ok)throw Error(t.error||"Cannot load proxy authentication");u(t.config,t.status)}catch(e){x(e.message||"Cannot load proxy authentication")}},[]);(0,a.useEffect)(()=>{h()},[h]);let b=(e,t)=>{o(s=>s.map((s,r)=>r===e?{...s,...t}:s))},g=async()=>{let e=d.map(e=>({...e,username:e.username.trim()}));if(s&&0===e.length)return void x("Add at least one account before enabling proxy authentication.");let t=e.find(e=>!e.hasPassword&&!e.password);if(t)return void x(`Set a password for ${t.username||"the new account"}.`);l(!0),x(""),p("");try{let t=await fetch("/api/audit-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"save-proxy-auth",enabled:s,users:e.map(e=>e.password?{username:e.username,password:e.password}:{username:e.username})})}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||"Failed to save proxy authentication");p(r.restarted?"Proxy authentication saved and Audit Proxy restarted.":"Proxy authentication saved."),u(r.config,r.status)}catch(e){x(e.message||"Failed to save proxy authentication")}finally{l(!1)}};return(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"max-w-3xl",children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Proxy authentication"}),(0,r.jsx)("p",{className:"mt-1 text-xs leading-5 text-text-muted",children:"Requires a username and password on every CONNECT, and records which account opened each tunnel, so the audit table answers who rather than only which IP. Give each person or CI job its own account: removing one leaves the others working."}),(0,r.jsx)("p",{className:"mt-2 rounded-lg border border-amber-500/30 bg-amber-500/5 p-2 text-[11px] leading-5 text-amber-700 dark:text-amber-300",children:"The proxy listener speaks plain HTTP, so the credential crosses the client-to-proxy hop unencrypted (Basic is base64, not encryption). This keeps out anyone without the password and attributes traffic to a person; it does not hide the password from someone capturing packets on that network. On an untrusted network use it alongside the client IP allowlist, not instead of it. The password also ends up in HTTPS_PROXY, and so in the process list and shell history."})]}),(0,r.jsxs)("label",{className:"flex shrink-0 items-center gap-2 text-sm text-text-main",children:[(0,r.jsx)("input",{type:"checkbox",checked:s,onChange:e=>n(e.target.checked),disabled:i,className:"h-4 w-4 accent-[var(--color-primary)]"}),"Require credentials"]})]}),(0,r.jsxs)("div",{className:"mt-4 grid gap-2",children:[0===d.length?(0,r.jsx)("p",{className:"rounded-xl border border-border bg-background/50 p-3 text-xs text-text-muted",children:"No accounts yet."}):null,d.map((e,t)=>(0,r.jsxs)("div",{className:"grid gap-2 rounded-xl border border-border bg-background/50 p-3 sm:grid-cols-[1fr_1fr_auto]",children:[(0,r.jsx)("input",{type:"text",value:e.username,onChange:e=>b(t,{username:e.target.value}),disabled:i,placeholder:"username",className:"min-w-0 rounded-lg border border-border bg-background px-3 py-2 font-mono text-xs text-text-main outline-none focus:border-primary disabled:opacity-60"}),(0,r.jsx)("input",{type:"password",value:e.password,onChange:e=>b(t,{password:e.target.value}),disabled:i,placeholder:e.hasPassword?"Saved — leave blank to keep":"Set a password",className:"min-w-0 rounded-lg border border-border bg-background px-3 py-2 font-mono text-xs text-text-main outline-none focus:border-primary disabled:opacity-60"}),(0,r.jsx)("button",{type:"button",onClick:()=>{let e;(!(e=d[t]).hasPassword||window.confirm(`Remove ${e.username}? Anything using this account stops working after the restart.`))&&o(e=>e.filter((e,s)=>s!==t))},disabled:i,className:"rounded-lg border border-border px-3 py-2 text-xs text-text-muted transition hover:border-red-500/40 hover:text-red-600 disabled:opacity-50",children:"Remove"})]},t))]}),(0,r.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:()=>o(e=>[...e,{username:"",hasPassword:!1,password:""}]),disabled:i,className:"rounded-lg border border-border px-3 py-1.5 text-xs text-text-muted transition hover:border-primary hover:text-primary disabled:opacity-50",children:"Add account"}),(0,r.jsx)("button",{type:"button",onClick:g,disabled:i,className:"rounded-lg bg-primary px-3 py-1.5 text-xs font-semibold text-white transition hover:opacity-90 disabled:opacity-50",children:i?"Saving…":e?"Save & Restart Proxy":"Save"}),(0,r.jsxs)("span",{className:"text-[11px] text-text-muted",children:["Clients pass credentials in the proxy URL: ",(0,r.jsx)("code",{className:"font-mono",children:"http://USER:PASSWORD@host:port"})," ","— URL-encode ",(0,r.jsx)("code",{className:"font-mono",children:"@ : / #"})," if the password contains them."]})]}),c?(0,r.jsx)("p",{className:"mt-3 rounded-lg border border-red-500/30 bg-red-500/5 p-2 text-xs text-red-600 dark:text-red-400",children:c}):null,m?(0,r.jsx)("p",{className:"mt-3 rounded-lg border border-green-500/30 bg-green-500/5 p-2 text-xs text-green-600 dark:text-green-400",children:m}):null]})}function i(e){let t=Math.round(Number(e||0)/6e4);if(t<60)return`${t} min`;let s=t/60;return Number.isInteger(s)?`${s}h`:`${s.toFixed(1)}h`}let l={granted:"already granted",ldap:"directory","api-key-owner":"API key owner","oauth-grant":"OAuth access",local:"local login"};function c({data:e,onChanged:t}){let[s,n]=(0,a.useState)(null),[d,o]=(0,a.useState)([]),[x,m]=(0,a.useState)(0),[p,u]=(0,a.useState)(!1),[h,b]=(0,a.useState)(!1),[g,y]=(0,a.useState)(""),[j,f]=(0,a.useState)(""),[N,v]=(0,a.useState)([]),[w,k]=(0,a.useState)(!1),[C,S]=(0,a.useState)(!1),[T,A]=(0,a.useState)(""),[P,R]=(0,a.useState)(""),[E,$]=(0,a.useState)(""),[O,_]=(0,a.useState)(""),I=(0,a.useCallback)(e=>{n(Array.isArray(e?.config?.accessGrants)?e.config.accessGrants:[]),o(Array.isArray(e?.status?.activeSessions)?e.status.activeSessions:[]),m(Number(e?.status?.security?.sessionIdleTimeoutMs||0)),u(e?.status?.running===!0),b(e?.status?.standby===!0)},[]);(0,a.useEffect)(()=>{e&&I(e)},[e,I]),(0,a.useEffect)(()=>{if(!w)return;let e=!1,t=setTimeout(async()=>{S(!0);try{let t=await fetch(`/api/audit-proxy/users?q=${encodeURIComponent(g.trim())}`,{cache:"no-store"}),s=await t.json().catch(()=>({}));!e&&t.ok&&v(Array.isArray(s.users)?s.users:[])}catch{e||v([])}finally{e||S(!1)}},250);return()=>{e=!0,clearTimeout(t)}},[g,w]);let H=async(e,s,r)=>{A(e),R(""),$("");try{let a=await fetch("/api/audit-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,...s})}),n=await a.json().catch(()=>({}));if(!a.ok)throw Error(n.error||"Failed to save Audit Proxy access grant");I(n);let d=Number(n.droppedConnections||0);return $(`${r}${d?` ${d} open connection(s) were closed.`:""}`),t?.(),!0}catch(e){return R(e.message||"Failed to save Audit Proxy access grant"),!1}finally{A("")}},L=async()=>{let e=String(g||"").trim().toLowerCase();e?await H("save-access-grant",{userId:e,note:j},`${e} may now use the proxy.`)&&(y(""),f("")):R("Enter the dashboard username or email to grant access to.")},q=async e=>{await H("delete-access-grant",{userId:e},`Access for ${e} revoked.`)&&_("")},U=async e=>{await H("revoke-session",{ip:e},`Session from ${e} ended.`)};return s?(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsx)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:"group"}),(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Access grants — who may use this proxy"}),(0,r.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${d.length>0?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-surface text-text-muted"}`,children:`${d.length} ACTIVE SESSION${1===d.length?"":"S"}`})]}),(0,r.jsxs)("p",{className:"mt-1 max-w-4xl text-xs leading-5 text-text-muted",children:["A grant only decides ",(0,r.jsx)("strong",{children:"who may use the proxy"}),", not from where. A granted user is let through as soon as they log into this dashboard — the address they logged in from is trusted for the traffic they send until ",i(x)," of inactivity, then they simply log in again. No IP is ever typed by hand. Each granted user also gets a read-only ",(0,r.jsx)("span",{className:"font-mono",children:"/dashboard/audit-proxy"})," page with the root CA download and launcher commands — no configuration and no audited traffic."]})]})}),P?(0,r.jsx)("div",{className:"mt-3 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-600 dark:text-red-400",children:P}):null,E?(0,r.jsx)("div",{className:"mt-3 rounded-lg border border-green-500/30 bg-green-500/10 px-3 py-2 text-xs text-green-600 dark:text-green-400",children:E}):null,(0,r.jsxs)("div",{className:"mt-4 grid gap-4 lg:grid-cols-[1fr_320px]",children:[(0,r.jsxs)("div",{className:"grid gap-3",children:[(0,r.jsxs)("div",{className:"grid gap-1.5",children:[(0,r.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Dashboard username / email"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{value:g,onChange:e=>{y(e.target.value),k(!0)},onFocus:()=>k(!0),onBlur:()=>setTimeout(()=>k(!1),150),autoComplete:"off",placeholder:"anh-tct or anh-tct@fujinet.net",className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"}),w&&(C||N.length>0)?(0,r.jsxs)("div",{className:"absolute z-20 mt-1 max-h-64 w-full overflow-y-auto rounded-lg border border-border bg-surface shadow-lg",children:[C&&0===N.length?(0,r.jsx)("div",{className:"px-3 py-2 text-xs text-text-muted",children:"Searching…"}):null,N.map(e=>{let t=s.some(t=>t.userId===e.id);return(0,r.jsxs)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>{y(e.id),k(!1)},className:"flex w-full items-center justify-between gap-2 px-3 py-2 text-left hover:bg-background",children:[(0,r.jsxs)("span",{className:"min-w-0",children:[(0,r.jsx)("span",{className:"block truncate font-mono text-xs text-text-main",children:e.id}),e.displayName||e.email?(0,r.jsx)("span",{className:"block truncate text-[11px] text-text-muted",children:[e.displayName,e.email].filter(Boolean).join(" \xb7 ")}):null]}),(0,r.jsxs)("span",{className:"flex shrink-0 items-center gap-1",children:[t?(0,r.jsx)("span",{className:"rounded-full bg-green-500/10 px-2 py-0.5 text-[10px] font-semibold text-green-600 dark:text-green-400",children:"granted"}):null,(0,r.jsx)("span",{className:"rounded-full border border-border px-2 py-0.5 text-[10px] text-text-muted",children:l[e.source]||e.source})]})]},`${e.source}:${e.id}`)})]}):null]}),(0,r.jsx)("span",{className:"text-[11px] leading-4 text-text-muted",children:"The identity the user logs into this dashboard with (LDAP/OIDC/local). Either the username or the email form is matched. Suggestions come from the directory and from accounts this install already knows; a name that is not listed can still be typed."})]}),(0,r.jsxs)("label",{className:"grid gap-1.5",children:[(0,r.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Note (optional)"}),(0,r.jsx)("input",{value:j,onChange:e=>f(e.target.value),placeholder:"Laptop + VDI",className:"rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"})]})]}),(0,r.jsxs)("div",{className:"grid content-start gap-3",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-primary/20 bg-primary/5 p-3 text-xs leading-5 text-text-muted",children:[(0,r.jsx)("div",{className:"font-semibold text-primary",children:"What a grant changes"}),(0,r.jsx)("div",{className:"mt-1",children:"Granted user logs into this dashboard → their address works with the proxy."}),(0,r.jsxs)("div",{children:["Idle past ",i(x)," → the address is dropped, they log in again."]}),(0,r.jsx)("div",{children:"Revoked grant → any session already running under it ends immediately."}),(0,r.jsx)("div",{className:"mt-1 text-[11px]",children:"Applied without restarting the listener."})]}),(0,r.jsx)("button",{type:"button",onClick:L,disabled:!!T||h,className:"rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:"save-access-grant"===T?"Saving…":"Save grant"})]})]}),(0,r.jsxs)("div",{className:"mt-4 border-t border-border pt-4",children:[(0,r.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Granted users"}),(0,r.jsxs)("span",{className:"text-[11px] text-text-muted",children:[s.length," user",1===s.length?"":"s"]})]}),0===s.length?(0,r.jsx)("div",{className:"rounded-xl border border-dashed border-border p-6 text-center text-xs text-text-muted",children:"No one is granted yet. The proxy denies every connection until someone is."}):(0,r.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border",children:(0,r.jsxs)("table",{className:"min-w-full divide-y divide-border text-xs",children:[(0,r.jsx)("thead",{className:"bg-surface/80 text-left uppercase tracking-wide text-text-muted",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"User"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Note"}),(0,r.jsx)("th",{className:"px-3 py-2 text-right font-medium",children:"Actions"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border bg-background",children:s.map(e=>(0,r.jsxs)("tr",{className:"align-top",children:[(0,r.jsx)("td",{className:"px-3 py-3 font-mono text-text-main",children:e.userId}),(0,r.jsx)("td",{className:"px-3 py-3 text-text-muted",children:e.note||"-"}),(0,r.jsx)("td",{className:"px-3 py-3",children:(0,r.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:()=>{y(e.userId),f(e.note||"")},disabled:h,className:"rounded-lg border border-border px-2.5 py-1 font-semibold text-text-main hover:bg-surface",children:"Edit"}),O===e.userId?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>q(e.userId),disabled:!!T||h,className:"rounded-lg border border-red-500/30 bg-red-500/10 px-2.5 py-1 font-semibold text-red-600 disabled:opacity-50",children:"Confirm revoke"}),(0,r.jsx)("button",{type:"button",onClick:()=>_(""),className:"rounded-lg border border-border px-2.5 py-1 text-text-muted",children:"Cancel"})]}):(0,r.jsx)("button",{type:"button",onClick:()=>_(e.userId),disabled:h,className:"rounded-lg border border-red-500/30 px-2.5 py-1 font-semibold text-red-600 hover:bg-red-500/10",children:"Revoke"})]})})]},e.userId))})]})})]}),(0,r.jsxs)("div",{className:"mt-4 border-t border-border pt-4",children:[(0,r.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Active sessions"}),(0,r.jsxs)("span",{className:"text-[11px] text-text-muted",children:[d.length," address",1===d.length?"":"es"," currently trusted"]})]}),0===d.length?(0,r.jsx)("div",{className:"rounded-xl border border-dashed border-border p-6 text-center text-xs text-text-muted",children:"Nobody is logged in and trusted right now. A granted user opening the dashboard creates one."}):(0,r.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border",children:(0,r.jsxs)("table",{className:"min-w-full divide-y divide-border text-xs",children:[(0,r.jsx)("thead",{className:"bg-surface/80 text-left uppercase tracking-wide text-text-muted",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"User"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Address"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Expires in"}),(0,r.jsx)("th",{className:"px-3 py-2 text-right font-medium",children:"Actions"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border bg-background",children:d.map(e=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"px-3 py-3 font-mono text-text-main",children:e.userId}),(0,r.jsx)("td",{className:"px-3 py-3 font-mono text-text-muted",children:e.ip}),(0,r.jsx)("td",{className:"px-3 py-3 text-text-muted",children:function(e){let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t)||t<=0)return"expiring…";let s=Math.ceil(t/6e4);if(s<60)return`${s}m`;let r=Math.floor(s/60),a=s%60;return a?`${r}h ${a}m`:`${r}h`}(e.expiresAt)}),(0,r.jsx)("td",{className:"px-3 py-3",children:(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)("button",{type:"button",onClick:()=>U(e.ip),disabled:!!T||h,className:"rounded-lg border border-red-500/30 px-2.5 py-1 font-semibold text-red-600 hover:bg-red-500/10 disabled:opacity-50",children:"End session"})})})]},e.ip))})]})})]})]}):null}var x=s(83163);let m=["api.anthropic.com","*.anthropic.com","claude.ai","*.claude.ai"],p=["api.openai.com","*.openai.com","chatgpt.com","*.chatgpt.com"],u=["api.githubcopilot.com","*.githubcopilot.com","api.github.com"],h=["q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","oidc.us-east-1.amazonaws.com","*.auth.desktop.kiro.dev"],b=[{id:"claude-code",label:"Claude Code"},{id:"codex",label:"OpenAI Codex"},{id:"gemini-cli",label:"Gemini CLI"},{id:"cursor",label:"Cursor"},{id:"copilot",label:"GitHub Copilot"},{id:"kiro",label:"Kiro"},{id:"curl",label:"curl / scripts"}];function g({ok:e,children:t}){return(0,r.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium ${e?"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400":"border-border bg-surface text-text-muted"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:e?"check_circle":"radio_button_unchecked"}),t]})}function y(e){let t=Number(e||0);return!Number.isFinite(t)||t<=0?"0":t>=1e6?`${(t/1e6).toFixed(2)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function j(e){let t=Number(e||0);return!Number.isFinite(t)||t<=0?"$0.00":t<.01?`$${t.toFixed(4)}`:`$${t.toFixed(2)}`}function f({label:e,value:t,hint:s}){return(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-background/50 p-3",children:[(0,r.jsx)("div",{className:"text-[11px] font-medium uppercase tracking-wide text-text-muted",children:e}),(0,r.jsx)("div",{className:"mt-1 text-lg font-semibold text-text-main",children:t}),s?(0,r.jsx)("div",{className:"mt-0.5 text-[11px] leading-4 text-text-muted",children:s}):null]})}function N({title:e,rows:t}){return t?.length?(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,r.jsx)("div",{className:"mt-2 overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[420px] text-left text-xs",children:[(0,r.jsx)("thead",{className:"border-b border-border text-text-muted",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-2 py-1.5 font-medium",children:"Name"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-right font-medium",children:"Reqs"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-right font-medium",children:"In"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-right font-medium",children:"Out"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-right font-medium",children:"Cache R/W"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-right font-medium",children:"Cost"})]})}),(0,r.jsx)("tbody",{children:t.map(e=>(0,r.jsxs)("tr",{className:"border-b border-border/60 text-text-main",children:[(0,r.jsx)("td",{className:"max-w-[220px] truncate px-2 py-1.5 font-mono text-[11px]",title:e.label,children:e.label}),(0,r.jsx)("td",{className:"px-2 py-1.5 text-right",children:e.requests}),(0,r.jsx)("td",{className:"px-2 py-1.5 text-right",children:y(e.inputTokens)}),(0,r.jsx)("td",{className:"px-2 py-1.5 text-right",children:y(e.outputTokens)}),(0,r.jsxs)("td",{className:"px-2 py-1.5 text-right text-text-muted",children:[y(e.cacheReadTokens),"/",y(e.cacheCreationTokens)]}),(0,r.jsx)("td",{className:"px-2 py-1.5 text-right",children:j(e.cost)})]},e.label))})]})})]}):null}function v({label:e,hint:t,children:s}){return(0,r.jsxs)("label",{className:"grid gap-1.5",children:[(0,r.jsx)("span",{className:"text-sm font-semibold text-text-main",children:e}),s,t?(0,r.jsx)("span",{className:"text-[11px] leading-4 text-text-muted",children:t}):null]})}function w({label:e,description:t,checked:s,onChange:a,disabled:n=!1}){return(0,r.jsxs)("label",{className:"flex items-start justify-between gap-4 rounded-xl border border-border bg-background/50 p-3",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"block text-sm font-semibold text-text-main",children:e}),(0,r.jsx)("span",{className:"mt-0.5 block text-xs leading-5 text-text-muted",children:t})]}),(0,r.jsx)("input",{type:"checkbox",checked:s,onChange:e=>a(e.target.checked),disabled:n,className:"mt-1 h-4 w-4 accent-[var(--color-primary)]"})]})}function k(){let[e,t]=(0,a.useState)(null),[s,n]=(0,a.useState)(null),[i,l]=(0,a.useState)(""),[k,C]=(0,a.useState)(""),[S,T]=(0,a.useState)(""),[A,P]=(0,a.useState)(null),[R,E]=(0,a.useState)("configuration"),$=(0,a.useCallback)(async(e=!0)=>{try{let s=await fetch("/api/audit-proxy?limit=50",{cache:"no-store"}),r=await s.json();if(!s.ok)throw Error(r.error||"Cannot load Audit Proxy");t(r),e?n(e=>e||r.config):n(r.config)}catch(e){C(e.message||"Cannot load Audit Proxy")}},[]);(0,a.useEffect)(()=>{$(!1);let e=setInterval(()=>$(!0),5e3);return()=>clearInterval(e)},[$]);let O=e?.status||{},_=O.security||{},I=O.rootCA||{},H=!0===O.running,L=!0===O.pendingListenerRestart,q=!0===O.standby,U=(s?.allowedHosts||[]).join("\n"),F=(e,t)=>n(s=>({...s,[e]:t})),B=async(e,t={})=>{l(e),C(""),T("");try{let s=await fetch("/api/audit-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,...t})}),r=await s.json().catch(()=>({}));if(!s.ok)throw Error(r.error||`${e} failed`);return"test"===e?(P(r.test),T(`Simulation passed ${r.test.passed}/${r.test.total} checks.`)):T("clear-logs"===e?"Audit logs cleared.":`Audit Proxy ${e} completed.`),await $("start"!==e&&"restart"!==e),r}catch(t){return C(t.message||`${e} failed`),null}finally{l("")}},D=async()=>{l("save"),C(""),T("");try{let e=await fetch("/api/audit-proxy",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:s})}),t=await e.json();if(!e.ok)throw Error(t.error||"Save failed");n(t.config);let r=Number(t.droppedConnections||0);T(t.rebindRequired?`Configuration saved and applied. The listener address/port change waits for Save & Restart — the proxy is still on ${O.address?.address||s.bindHost}:${O.address?.port||s.port}.`:`Configuration saved and applied to the running proxy${H?" without a restart":""}.${r?` ${r} connection(s) from addresses that lost access were closed.`:""}`),await $(!0)}catch(e){C(e.message||"Save failed")}finally{l("")}},M=async()=>{l("save-client-host"),C(""),T("");try{let e=await fetch("/api/audit-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"save-client-host",clientProxyHost:s?.clientProxyHost||""})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to save Client proxy host");n(e=>({...e,clientProxyHost:t.config?.clientProxyHost||""})),T("Client proxy host saved."),await $(!0)}catch(e){C(e.message||"Failed to save Client proxy host")}finally{l("")}},X=async()=>{l("ca"),C("");try{let e=await fetch("/api/audit-proxy/ca",{method:"POST"}),t=await e.json();if(!e.ok)throw Error(t.error||"CA validation failed");T("Root CA is ready. Existing enterprise CA material was not rotated."),await $(!0)}catch(e){C(e.message||"CA validation failed")}finally{l("")}},K=e=>n(t=>({...t,allowedHosts:[...new Set([...t?.allowedHosts||[],...e])]}));if(!s)return(0,r.jsx)("div",{className:"rounded-xl border border-border bg-surface p-5 text-sm text-text-muted",children:"Loading Enterprise AI Audit Proxy…"});let G=Math.round(Number(s.captureLimitBytes||0)/1024/1024*10)/10,Y=["0.0.0.0","::"].includes(s.bindHost)||!String(s.bindHost).startsWith("127.")&&"localhost"!==s.bindHost&&"::1"!==s.bindHost;return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-2xl border border-primary/20 bg-primary/5 p-4 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:"policy"}),(0,r.jsx)("h1",{className:"text-lg font-bold text-text-main",children:"Enterprise AI Audit Proxy"}),(0,r.jsx)(g,{ok:H,children:H?"Running":"Stopped"}),(0,r.jsx)(g,{ok:!0===I.validated,children:"Root CA"}),(0,r.jsx)(g,{ok:s.verifyUpstreamTls,children:"Verified upstream TLS"}),(0,r.jsx)(g,{ok:!0,children:O.capabilities?.http2===!0?"HTTP/1.1 + HTTP/2":"HTTP/1.1"})]}),(0,r.jsx)("p",{className:"mt-2 max-w-5xl text-sm leading-6 text-text-muted",children:"Explicit HTTPS CONNECT proxy for Claude Code and Codex. Request method, path, query, authentication values and body bytes are forwarded without content rewriting. Standard hop-by-hop headers and BlueRouter internal headers remain intentionally removed."})]}),(0,r.jsxs)(d(),{href:"/dashboard/mitm",className:"inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_back"})," AI Traffic Gateway"]})]}),k?(0,r.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-400",children:k}):null,S?(0,r.jsx)("div",{className:"rounded-xl border border-green-500/30 bg-green-500/10 px-4 py-3 text-sm text-green-600 dark:text-green-400",children:S}):null,(0,r.jsxs)("div",{className:"flex w-fit items-center gap-1 rounded-xl border border-border bg-surface p-1",children:[(0,r.jsx)("button",{type:"button",onClick:()=>E("configuration"),className:`rounded-lg px-3 py-1.5 text-xs font-semibold transition ${"configuration"===R?"bg-primary text-white":"text-text-muted hover:bg-background hover:text-text-main"}`,children:"Configuration"}),(0,r.jsx)("button",{type:"button",onClick:()=>E("audit"),className:`rounded-lg px-3 py-1.5 text-xs font-semibold transition ${"audit"===R?"bg-primary text-white":"text-text-muted hover:bg-background hover:text-text-main"}`,children:"Audit & Usage"})]}),(0,r.jsxs)("div",{className:"configuration"===R?"space-y-4":"hidden",children:[q?(0,r.jsxs)("div",{className:"rounded-xl border border-blue-500/30 bg-blue-500/10 px-4 py-3 text-sm text-blue-700 dark:text-blue-300",children:[(0,r.jsx)("strong",{children:"Node n\xe0y đang l\xe0 Cluster Standby."})," Access grants, TLS allowlist, client tool filter v\xe0 capture được đồng bộ từ Master qua cluster snapshot, n\xean form ở đ\xe2y chỉ đọc. Sửa tr\xean Master rồi để sync \xe1p xuống. Bind address/port, Proxy authentication v\xe0 Root CA vẫn l\xe0 của ri\xeang node n\xe0y."]}):null,L?(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-sm text-amber-700 dark:text-amber-300",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("strong",{children:"Listener address/port change is pending."})," Saved as ",s.bindHost,":",s.port,", still bound to ",O.address?.address,":",O.address?.port,". A bound socket cannot move — restart the listener to apply it. Everything else you saved is already live."]}),(0,r.jsx)("button",{type:"button",onClick:()=>B("restart",{config:s}),disabled:!!i,className:"shrink-0 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-1.5 text-xs font-semibold disabled:opacity-50",children:"restart"===i?"Restarting…":"Restart listener now"})]}):null,Y?(0,r.jsxs)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-sm text-amber-700 dark:text-amber-300",children:[(0,r.jsx)("strong",{children:"LAN listener enabled."})," Keep TCP ",s.port," restricted to the intended LAN/VPN and maintain the Client IP allowlist."]}):null,I.expiringSoon?(0,r.jsx)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-sm text-amber-700 dark:text-amber-300",children:"Root CA expires soon. Audit Proxy will not rotate enterprise CA material automatically; prepare and deploy the replacement CA through Advanced CA management."}):null,(0,r.jsxs)("div",{className:"grid gap-4 xl:grid-cols-[1.25fr_0.75fr]",children:[(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Proxy configuration"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"All server-side setup is managed here. No proxy daemon CLI is required."})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:()=>K(m),className:"rounded-lg border border-border px-3 py-1.5 text-xs text-text-main hover:bg-background disabled:opacity-50",children:"+ Anthropic preset"}),(0,r.jsx)("button",{type:"button",onClick:()=>K(p),className:"rounded-lg border border-border px-3 py-1.5 text-xs text-text-main hover:bg-background disabled:opacity-50",children:"+ OpenAI preset"}),(0,r.jsx)("button",{type:"button",onClick:()=>K(u),className:"rounded-lg border border-border px-3 py-1.5 text-xs text-text-main hover:bg-background disabled:opacity-50",children:"+ GitHub Copilot preset"}),(0,r.jsx)("button",{type:"button",onClick:()=>K(h),className:"rounded-lg border border-border px-3 py-1.5 text-xs text-text-main hover:bg-background disabled:opacity-50",children:"+ Kiro preset"})]})]}),(0,r.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,r.jsx)(v,{label:"Bind address",hint:"127.0.0.1 = local only. Use 0.0.0.0 or a LAN IP for other workstations. The only setting that needs Save & Restart while the proxy runs — a bound socket cannot move.",children:(0,r.jsx)("input",{value:s.bindHost,onChange:e=>F("bindHost",e.target.value),className:`rounded-lg border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary ${L?"border-amber-500/50":"border-border"}`})}),(0,r.jsx)(v,{label:"Proxy port",hint:"Default 3128; Docker deployments must publish this port explicitly. Also needs Save & Restart to take effect.",children:(0,r.jsx)("input",{type:"number",min:"1",max:"65535",value:s.port,onChange:e=>F("port",Number(e.target.value)),className:`rounded-lg border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary ${L?"border-amber-500/50":"border-border"}`})}),(0,r.jsx)(v,{label:"Client proxy host",hint:"Manual persistent hostname/IP used only in deployment commands; it does not change the listener.",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("input",{value:s.clientProxyHost||"",onChange:e=>F("clientProxyHost",e.target.value),placeholder:"172.16.6.8 or proxy.example.local",className:"min-w-0 flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"}),(0,r.jsx)("button",{type:"button",onClick:M,disabled:!!i||q,className:"shrink-0 rounded-lg border border-primary/30 bg-primary/10 px-3 py-2 text-xs font-semibold text-primary disabled:opacity-50",children:"save-client-host"===i?"Saving…":"Save host"})]})}),(0,r.jsx)(v,{label:"Capture limit / request",hint:"Traffic streams immediately; only this bounded prefix is retained for audit.",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"number",min:"0",max:"16",step:"0.5",value:G,onChange:e=>F("captureLimitBytes",Math.round(1024*Number(e.target.value)*1024)),disabled:!s.captureBodies,className:"min-w-0 flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:opacity-60"}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"MB"})]})})]}),(0,r.jsxs)("div",{className:"mt-4 grid gap-3 md:grid-cols-2",children:[(0,r.jsx)(w,{label:"Pass through non-audited hosts",description:"Unknown hosts use a blind TLS tunnel only when they resolve to public addresses on TCP 443. Private/reserved destinations are denied.",checked:s.passthroughUnknown,onChange:e=>F("passthroughUnknown",e)}),(0,r.jsx)(w,{label:"Capture request/response bodies",description:"Credentials are redacted before persistence. Disable to retain metadata and wire hashes only.",checked:s.captureBodies,onChange:e=>F("captureBodies",e)})]}),(0,r.jsxs)("div",{className:"mt-4 grid gap-3",children:[(0,r.jsx)(w,{label:"Restrict which client tools may connect",description:"Refuses a CONNECT whose User-Agent identifies a tool that is not listed. Catches a browser pointed at the proxy, or a script that inherited HTTPS_PROXY. It cannot catch a client that sends no User-Agent — Claude Code sends none at all and Codex only on its first tunnel, so those are always let through, and anyone can do the same by dropping the header. Hygiene, not access control: the client IP allowlist and who holds the root CA are what bound access.",checked:!0===s.clientToolFilterEnabled,onChange:e=>F("clientToolFilterEnabled",e)}),s.clientToolFilterEnabled?(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,r.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Add:"}),b.map(e=>(0,r.jsx)("button",{type:"button",disabled:(s.allowedClientTools||[]).includes(e.id),onClick:()=>F("allowedClientTools",[...new Set([...s.allowedClientTools||[],e.id])]),className:"rounded-lg border border-border px-2 py-1 text-[11px] text-text-muted transition hover:border-primary hover:text-primary disabled:opacity-40",children:e.label},e.id))]}),(0,r.jsx)(v,{label:"Allowed client tools",hint:"One entry per line: a preset id above, or any substring matched against the User-Agent. Only clients that send a User-Agent are checked. Refused connections appear in the audit table with the User-Agent that was rejected, so you can add what you actually use.",children:(0,r.jsx)("textarea",{rows:4,value:(s.allowedClientTools||[]).join("\n"),onChange:e=>F("allowedClientTools",e.target.value.split(/\r?\n/).map(e=>e.trim().toLowerCase()).filter(Boolean)),disabled:H,placeholder:"claude-code\ncodex",className:"rounded-lg border border-border bg-background px-3 py-2 font-mono text-xs text-text-main outline-none focus:border-primary disabled:opacity-60"})})]}):null]}),(0,r.jsxs)("div",{className:"mt-4 grid gap-4 md:grid-cols-[1fr_190px]",children:[(0,r.jsx)(v,{label:"TLS inspection allowlist",hint:"One hostname/wildcard per line. Only these public HTTPS hosts are decrypted and audited.",children:(0,r.jsx)("textarea",{rows:9,value:U,onChange:e=>F("allowedHosts",e.target.value.split(/\r?\n/).map(e=>e.trim()).filter(Boolean)),className:"rounded-lg border border-border bg-background px-3 py-2 font-mono text-xs text-text-main outline-none focus:border-primary disabled:opacity-60"})}),(0,r.jsxs)("div",{className:"grid content-start gap-4",children:[(0,r.jsx)(v,{label:"Retention",hint:"Daily local JSONL segments older than this value are deleted hourly.",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"number",min:"1",max:"365",value:s.retentionDays,onChange:e=>F("retentionDays",Number(e.target.value)),className:"min-w-0 flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:opacity-60"}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"days"})]})}),(0,r.jsxs)("div",{className:"rounded-xl border border-green-500/20 bg-green-500/5 p-3 text-xs leading-5 text-text-muted",children:[(0,r.jsx)("div",{className:"font-semibold text-green-600 dark:text-green-400",children:"Transport controls enforced"}),"TLS verification ON \xb7 HTTP/1.1 \xb7 HTTPS CONNECT only \xb7 public TCP 443 only."]})]})]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:D,disabled:!!i||q,className:"rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:"save"===i?"Saving…":H?"Save & apply":"Save"}),H?(0,r.jsx)("button",{type:"button",onClick:()=>B("stop"),disabled:!!i,className:"rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-2 text-sm font-semibold text-red-500 disabled:opacity-50",children:"stop"===i?"Stopping…":"Stop Proxy"}):(0,r.jsx)("button",{type:"button",onClick:()=>B("start",{config:s}),disabled:!!i,className:"rounded-lg border border-green-500/30 bg-green-500/10 px-4 py-2 text-sm font-semibold text-green-600 disabled:opacity-50",children:"start"===i?"Starting…":"Start Proxy"}),(0,r.jsx)("button",{type:"button",onClick:()=>B("restart",{config:s}),disabled:!!i,className:"rounded-lg border border-border px-4 py-2 text-sm font-semibold text-text-main hover:bg-background disabled:opacity-50",children:"restart"===i?"Restarting…":"Save & Restart"}),(0,r.jsx)("button",{type:"button",onClick:()=>B("test"),disabled:!!i,className:"rounded-lg border border-primary/30 bg-primary/10 px-4 py-2 text-sm font-semibold text-primary disabled:opacity-50",children:"test"===i?"Testing…":"Run Simulated Test"}),(0,r.jsx)("span",{className:"text-[11px] leading-4 text-text-muted",children:"Save applies to the running proxy immediately — open tunnels keep streaming. Restart is only for the bind address and port."})]})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Root CA"}),(0,r.jsx)("p",{className:"mt-1 text-xs leading-5 text-text-muted",children:"The existing Root CA/key pair is validated and reused. Audit Proxy never auto-rotates enterprise CA material."}),(0,r.jsxs)("div",{className:"mt-3 grid gap-2 text-xs",children:[(0,r.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Status"}),(0,r.jsx)("span",{className:"font-medium text-text-main",children:I.validated?"Validated":I.certExists?"Needs attention":"Not generated"})]}),I.subject?(0,r.jsxs)("div",{className:"grid gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Subject"}),(0,r.jsx)("span",{className:"break-all font-mono text-[11px] text-text-main",children:I.subject})]}):null,I.fingerprint?(0,r.jsxs)("div",{className:"grid gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Public key fingerprint"}),(0,r.jsx)("span",{className:"break-all font-mono text-[11px] text-text-main",children:I.fingerprint})]}):null,I.notAfter?(0,r.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Expires"}),(0,r.jsx)("span",{className:"text-text-main",children:new Date(I.notAfter).toLocaleString()})]}):null,I.error?(0,r.jsx)("div",{className:"rounded-lg bg-red-500/10 p-2 text-red-600 dark:text-red-300",children:I.error}):null]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:X,disabled:!!i,className:"rounded-lg border border-border px-3 py-2 text-xs font-semibold text-text-main hover:bg-background disabled:opacity-50",children:I.certExists?"Validate / Reuse CA":"Generate CA"}),(0,r.jsx)("a",{href:"/api/audit-proxy/ca?download=cert",className:`rounded-lg border border-primary/30 bg-primary/10 px-3 py-2 text-xs font-semibold text-primary ${!I.certExists?"pointer-events-none opacity-50":""}`,children:"Download Root CA"}),(0,r.jsx)(d(),{href:"/dashboard/mitm",className:"rounded-lg border border-border px-3 py-2 text-xs font-semibold text-text-main hover:bg-background",children:"Advanced CA management"})]})]}),(0,r.jsx)(x.Ay,{clientProxyHost:s.clientProxyHost,port:s.port,onError:C})]})]}),A?(0,r.jsxs)("section",{className:`rounded-2xl border p-4 ${A.ok?"border-green-500/30 bg-green-500/5":"border-red-500/30 bg-red-500/5"}`,children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Simulated end-to-end test"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Local throwaway TLS endpoints; no cloud credential or external API call is used."})]}),(0,r.jsxs)(g,{ok:A.ok,children:[A.passed,"/",A.total," passed \xb7 ",A.durationMs," ms"]})]}),(0,r.jsx)("div",{className:"mt-3 grid gap-2 md:grid-cols-2 xl:grid-cols-3",children:A.checks?.map(e=>(0,r.jsxs)("div",{className:"flex items-start gap-2 rounded-lg border border-border/70 bg-background/60 px-3 py-2 text-xs",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.ok?"text-green-500":"text-red-500"}`,children:e.ok?"check_circle":"error"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"font-medium text-text-main",children:e.name}),e.detail?(0,r.jsx)("span",{className:"mt-0.5 block text-text-muted",children:e.detail}):null]})]},e.name))})]}):null,(0,r.jsx)(c,{data:e,onChanged:()=>$(!0)}),_.proxyAuthFeatureEnabled?(0,r.jsx)(o,{}):null]}),(0,r.jsxs)("div",{className:"audit"===R?"space-y-4":"hidden",children:[(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Token usage"}),(0,r.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Counts are read out of the audited provider responses themselves — ",(0,r.jsx)("code",{className:"font-mono",children:"message_start"})," carries input and cache tokens, the closing ",(0,r.jsx)("code",{className:"font-mono",children:"message_delta"})," carries output. Scope is the same window as the table below."]})]}),e?.usageSummary?.incompleteUsageCount?(0,r.jsxs)("span",{className:"rounded-lg border border-amber-500/30 bg-amber-500/10 px-2.5 py-1 text-[11px] font-medium text-amber-700 dark:text-amber-300",children:[e.usageSummary.incompleteUsageCount," response(s) truncated before the final usage event — output tokens under-counted"]}):null]}),e?.usageSummary?.totals?.requests?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mt-3 grid gap-2 sm:grid-cols-2 lg:grid-cols-5",children:[(0,r.jsx)(f,{label:"Requests with usage",value:e.usageSummary.totals.requests}),(0,r.jsx)(f,{label:"Input",value:y(e.usageSummary.totals.inputTokens),hint:"new (uncached) input tokens"}),(0,r.jsx)(f,{label:"Output",value:y(e.usageSummary.totals.outputTokens)}),(0,r.jsx)(f,{label:"Cache read / write",value:`${y(e.usageSummary.totals.cacheReadTokens)} / ${y(e.usageSummary.totals.cacheCreationTokens)}`}),(0,r.jsx)(f,{label:"Est. cost",value:j(e.usageSummary.totals.cost),hint:"from the pricing table"})]}),(0,r.jsxs)("div",{className:"mt-4 grid gap-5 lg:grid-cols-2",children:[(0,r.jsx)(N,{title:"By model",rows:e.usageSummary.byModel}),(0,r.jsx)(N,{title:"By client tool",rows:e.usageSummary.bySourceTool})]})]}):(0,r.jsx)("p",{className:"mt-3 rounded-xl border border-border bg-background/50 p-3 text-xs text-text-muted",children:"No token usage recorded yet. Usage appears once an audited request reaches a provider that reports it (Anthropic and OpenAI both do)."})]}),(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Recent audit requests"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Credentials are redacted before persistence. Local writes and MySQL mirroring run through a bounded asynchronous queue."})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 text-xs text-text-muted",children:[(0,r.jsxs)("span",{children:["Queue ",O.auditStore?.queueDepth||0,"/",O.auditStore?.queueLimit||1e3]}),(0,r.jsx)("button",{type:"button",onClick:()=>B("clear-logs"),disabled:!!i||q,className:"rounded-lg border border-border px-3 py-1.5 hover:bg-background disabled:opacity-50",children:"Clear logs"})]})]}),(0,r.jsx)("div",{className:"mt-3 overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[1250px] text-left text-xs",children:[(0,r.jsx)("thead",{className:"border-b border-border text-text-muted",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Time"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Protocol"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Client"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"User"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Provider"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Host"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Model"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Request"}),(0,r.jsx)("th",{className:"px-2 py-2 text-right font-medium",children:"Tokens (in/out)"}),(0,r.jsx)("th",{className:"px-2 py-2 text-right font-medium",children:"Cache (r/w)"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Status"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Latency"})]})}),(0,r.jsxs)("tbody",{children:[(e?.events||[]).map(e=>(0,r.jsxs)("tr",{className:"border-b border-border/60 align-top text-text-main",children:[(0,r.jsx)("td",{className:"whitespace-nowrap px-2 py-2 text-text-muted",children:new Date(e.timestamp).toLocaleTimeString()}),(0,r.jsx)("td",{className:"px-2 py-2",children:e.protocol||"http/1.1"}),(0,r.jsx)("td",{className:"px-2 py-2 font-mono text-[11px]",children:e.client?.ip||"-"}),(0,r.jsx)("td",{className:"px-2 py-2",children:e.client?.proxyUser||"-"}),(0,r.jsx)("td",{className:"px-2 py-2",children:e.provider||"-"}),(0,r.jsx)("td",{className:"px-2 py-2 font-mono text-[11px]",children:e.host||"-"}),(0,r.jsx)("td",{className:"px-2 py-2",children:e.model||"-"}),(0,r.jsx)("td",{className:"max-w-[300px] px-2 py-2",children:(0,r.jsxs)("details",{children:[(0,r.jsxs)("summary",{className:"cursor-pointer truncate",children:[e.method," ",e.path]}),(0,r.jsx)("pre",{className:"mt-2 max-h-72 overflow-auto whitespace-pre-wrap rounded-lg bg-background p-2 text-[10px] leading-4 text-text-muted",children:JSON.stringify({request:e.request,response:e.response,error:e.error},null,2)})]})}),(0,r.jsx)("td",{className:"whitespace-nowrap px-2 py-2 text-right",children:e.usage?(0,r.jsxs)("span",{title:!1===e.usage.complete?"Response was truncated before the final usage event; output is a lower bound":void 0,children:[y(e.usage.inputTokens),"/",y(e.usage.outputTokens),!1===e.usage.complete?(0,r.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"*"}):null]}):(0,r.jsx)("span",{className:"text-text-muted",children:"-"})}),(0,r.jsx)("td",{className:"whitespace-nowrap px-2 py-2 text-right text-text-muted",children:e.usage?`${y(e.usage.cacheReadTokens)}/${y(e.usage.cacheCreationTokens)}`:"-"}),(0,r.jsx)("td",{className:"px-2 py-2",children:e.status||"ERR"}),(0,r.jsxs)("td",{className:"whitespace-nowrap px-2 py-2",children:[e.durationMs??"-"," ms"]})]},e.id)),e?.events?.length?null:(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:"12",className:"px-2 py-8 text-center text-text-muted",children:"No audited requests yet."})})]})]})})]})]})]})}}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=23371)),_N_E=e.O()}]);
package/app/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bluerouter-app",
3
- "version": "5.4.48",
3
+ "version": "5.4.49",
4
4
  "description": "Router web dashboard",
5
5
  "private": false,
6
6
  "engines": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jheavenknows/bluerouter",
3
- "version": "5.4.49",
3
+ "version": "5.4.50",
4
4
  "description": "Bluerouter CLI - Start and manage Bluerouter server",
5
5
  "bin": {
6
6
  "bluerouter": "./cli.js"
@@ -1 +0,0 @@
1
- exports.id=1370,exports.ids=[1370],exports.modules={81370:function(a,b,c){var d,e;"u">typeof globalThis||"u">typeof self&&self,e=function(a,b){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.compare=l,a.compareSync=k,a.decodeBase64=G,a.default=void 0,a.encodeBase64=F,a.genSalt=g,a.genSaltSync=f,a.getRounds=m,a.getSalt=n,a.hash=i,a.hashSync=h,a.setRandomFallback=e,a.truncates=o,b=(c=b)&&c.__esModule?c:{default:c};var c,d=null;function e(a){d=a}function f(a,c){if("number"!=typeof(a=a||w))throw Error("Illegal arguments: "+typeof a+", "+typeof c);a<4?a=4:a>31&&(a=31);var e=[];return e.push("$2b$"),a<10&&e.push("0"),e.push(a.toString()),e.push("$"),e.push(t(function(a){try{return crypto.getRandomValues(new Uint8Array(a))}catch{}try{return b.default.randomBytes(a)}catch{}if(!d)throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");return d(a)}(v),v)),e.join("")}function g(a,b,c){if("function"==typeof b&&(c=b,b=void 0),"function"==typeof a&&(c=a,a=void 0),void 0===a)a=w;else if("number"!=typeof a)throw Error("illegal arguments: "+typeof a);function d(b){p(function(){try{b(null,f(a))}catch(a){b(a)}})}if(!c)return new Promise(function(a,b){d(function(c,d){c?b(c):a(d)})});if("function"!=typeof c)throw Error("Illegal callback: "+typeof c);d(c)}function h(a,b){if(void 0===b&&(b=w),"number"==typeof b&&(b=f(b)),"string"!=typeof a||"string"!=typeof b)throw Error("Illegal arguments: "+typeof a+", "+typeof b);return E(a,b)}function i(a,b,c,d){function e(c){"string"==typeof a&&"number"==typeof b?g(b,function(b,e){E(a,e,c,d)}):"string"==typeof a&&"string"==typeof b?E(a,b,c,d):p(c.bind(this,Error("Illegal arguments: "+typeof a+", "+typeof b)))}if(!c)return new Promise(function(a,b){e(function(c,d){c?b(c):a(d)})});if("function"!=typeof c)throw Error("Illegal callback: "+typeof c);e(c)}function j(a,b){for(var c=a.length^b.length,d=0;d<a.length;++d)c|=a.charCodeAt(d)^b.charCodeAt(d);return 0===c}function k(a,b){if("string"!=typeof a||"string"!=typeof b)throw Error("Illegal arguments: "+typeof a+", "+typeof b);return 60===b.length&&j(h(a,b.substring(0,b.length-31)),b)}function l(a,b,c,d){function e(c){"string"!=typeof a||"string"!=typeof b?p(c.bind(this,Error("Illegal arguments: "+typeof a+", "+typeof b))):60!==b.length?p(c.bind(this,null,!1)):i(a,b.substring(0,29),function(a,d){a?c(a):c(null,j(d,b))},d)}if(!c)return new Promise(function(a,b){e(function(c,d){c?b(c):a(d)})});if("function"!=typeof c)throw Error("Illegal callback: "+typeof c);e(c)}function m(a){if("string"!=typeof a)throw Error("Illegal arguments: "+typeof a);return parseInt(a.split("$")[2],10)}function n(a){if("string"!=typeof a)throw Error("Illegal arguments: "+typeof a);if(60!==a.length)throw Error("Illegal hash length: "+a.length+" != 60");return a.substring(0,29)}function o(a){if("string"!=typeof a)throw Error("Illegal arguments: "+typeof a);return q(a)>72}var p="function"==typeof setImmediate?setImmediate:"object"==typeof scheduler&&"function"==typeof scheduler.postTask?scheduler.postTask.bind(scheduler):setTimeout;function q(a){for(var b=0,c=0,d=0;d<a.length;++d)(c=a.charCodeAt(d))<128?b+=1:c<2048?b+=2:(64512&c)==55296&&(64512&a.charCodeAt(d+1))==56320?(++d,b+=4):b+=3;return b}var r="./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),s=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,54,55,56,57,58,59,60,61,62,63,-1,-1,-1,-1,-1,-1,-1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,-1,-1,-1,-1,-1,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,-1,-1,-1,-1,-1];function t(a,b){var c,d,e=0,f=[];if(b<=0||b>a.length)throw Error("Illegal len: "+b);for(;e<b;){if(c=255&a[e++],f.push(r[c>>2&63]),c=(3&c)<<4,e>=b||(c|=(d=255&a[e++])>>4&15,f.push(r[63&c]),c=(15&d)<<2,e>=b)){f.push(r[63&c]);break}c|=(d=255&a[e++])>>6&3,f.push(r[63&c]),f.push(r[63&d])}return f.join("")}function u(a,b){var c,d,e,f,g,h=0,i=a.length,j=0,k=[];if(b<=0)throw Error("Illegal len: "+b);for(;h<i-1&&j<b&&(c=(g=a.charCodeAt(h++))<s.length?s[g]:-1,d=(g=a.charCodeAt(h++))<s.length?s[g]:-1,-1!=c&&-1!=d)&&(f=c<<2>>>0|(48&d)>>4,k.push(String.fromCharCode(f)),!(++j>=b||h>=i||-1==(e=(g=a.charCodeAt(h++))<s.length?s[g]:-1)||(f=(15&d)<<4>>>0|(60&e)>>2,k.push(String.fromCharCode(f)),++j>=b||h>=i)));){;f=(3&e)<<6>>>0|((g=a.charCodeAt(h++))<s.length?s[g]:-1),k.push(String.fromCharCode(f)),++j}var l=[];for(h=0;h<j;h++)l.push(k[h].charCodeAt(0));return l}var v=16,w=10,x=[0x243f6a88,0x85a308d3,0x13198a2e,0x3707344,0xa4093822,0x299f31d0,0x82efa98,0xec4e6c89,0x452821e6,0x38d01377,0xbe5466cf,0x34e90c6c,0xc0ac29b7,0xc97c50dd,0x3f84d5b5,0xb5470917,0x9216d5d9,0x8979fb1b],y=[0xd1310ba6,0x98dfb5ac,0x2ffd72db,0xd01adfb7,0xb8e1afed,0x6a267e96,0xba7c9045,0xf12c7f99,0x24a19947,0xb3916cf7,0x801f2e2,0x858efc16,0x636920d8,0x71574e69,0xa458fea3,0xf4933d7e,0xd95748f,0x728eb658,0x718bcd58,0x82154aee,0x7b54a41d,0xc25a59b5,0x9c30d539,0x2af26013,0xc5d1b023,0x286085f0,0xca417918,0xb8db38ef,0x8e79dcb0,0x603a180e,0x6c9e0e8b,0xb01e8a3e,0xd71577c1,0xbd314b27,0x78af2fda,0x55605c60,0xe65525f3,0xaa55ab94,0x57489862,0x63e81440,0x55ca396a,0x2aab10b6,0xb4cc5c34,0x1141e8ce,0xa15486af,0x7c72e993,0xb3ee1411,0x636fbc2a,0x2ba9c55d,0x741831f6,0xce5c3e16,0x9b87931e,0xafd6ba33,0x6c24cf5c,0x7a325381,0x28958677,0x3b8f4898,0x6b4bb9af,0xc4bfe81b,0x66282193,0x61d809cc,0xfb21a991,0x487cac60,0x5dec8032,0xef845d5d,0xe98575b1,0xdc262302,0xeb651b88,0x23893e81,0xd396acc5,0xf6d6ff3,0x83f44239,0x2e0b4482,0xa4842004,0x69c8f04a,0x9e1f9b5e,0x21c66842,0xf6e96c9a,0x670c9c61,0xabd388f0,0x6a51a0d2,0xd8542f68,0x960fa728,0xab5133a3,0x6eef0b6c,0x137a3be4,0xba3bf050,0x7efb2a98,0xa1f1651d,0x39af0176,0x66ca593e,0x82430e88,0x8cee8619,0x456f9fb4,0x7d84a5c3,0x3b8b5ebe,0xe06f75d8,0x85c12073,0x401a449f,0x56c16aa6,0x4ed3aa62,0x363f7706,0x1bfedf72,0x429b023d,0x37d0d724,0xd00a1248,0xdb0fead3,0x49f1c09b,0x75372c9,0x80991b7b,0x25d479d8,0xf6e8def7,0xe3fe501a,0xb6794c3b,0x976ce0bd,0x4c006ba,0xc1a94fb6,0x409f60c4,0x5e5c9ec2,0x196a2463,0x68fb6faf,0x3e6c53b5,0x1339b2eb,0x3b52ec6f,0x6dfc511f,0x9b30952c,0xcc814544,0xaf5ebd09,0xbee3d004,0xde334afd,0x660f2807,0x192e4bb3,0xc0cba857,0x45c8740f,0xd20b5f39,0xb9d3fbdb,0x5579c0bd,0x1a60320a,0xd6a100c6,0x402c7279,0x679f25fe,0xfb1fa3cc,0x8ea5e9f8,0xdb3222f8,0x3c7516df,0xfd616b15,0x2f501ec8,0xad0552ab,0x323db5fa,0xfd238760,0x53317b48,0x3e00df82,0x9e5c57bb,0xca6f8ca0,0x1a87562e,0xdf1769db,0xd542a8f6,0x287effc3,0xac6732c6,0x8c4f5573,0x695b27b0,0xbbca58c8,0xe1ffa35d,0xb8f011a0,0x10fa3d98,0xfd2183b8,0x4afcb56c,0x2dd1d35b,0x9a53e479,0xb6f84565,0xd28e49bc,0x4bfb9790,0xe1ddf2da,0xa4cb7e33,0x62fb1341,0xcee4c6e8,0xef20cada,0x36774c01,0xd07e9efe,0x2bf11fb4,0x95dbda4d,0xae909198,0xeaad8e71,0x6b93d5a0,0xd08ed1d0,0xafc725e0,0x8e3c5b2f,0x8e7594b7,0x8ff6e2fb,0xf2122b64,0x8888b812,0x900df01c,0x4fad5ea0,0x688fc31c,0xd1cff191,0xb3a8c1ad,0x2f2f2218,0xbe0e1777,0xea752dfe,0x8b021fa1,0xe5a0cc0f,0xb56f74e8,0x18acf3d6,0xce89e299,0xb4a84fe0,0xfd13e0b7,0x7cc43b81,0xd2ada8d9,0x165fa266,0x80957705,0x93cc7314,0x211a1477,0xe6ad2065,0x77b5fa86,0xc75442f5,0xfb9d35cf,0xebcdaf0c,0x7b3e89a0,0xd6411bd3,0xae1e7e49,2428461,0x2071b35e,0x226800bb,0x57b8e0af,0x2464369b,0xf009b91e,0x5563911d,0x59dfa6aa,0x78c14389,0xd95a537f,0x207d5ba2,0x2e5b9c5,0x83260376,0x6295cfa9,0x11c81968,0x4e734a41,0xb3472dca,0x7b14a94a,0x1b510052,0x9a532915,0xd60f573f,0xbc9bc6e4,0x2b60a476,0x81e67400,0x8ba6fb5,0x571be91f,0xf296ec6b,0x2a0dd915,0xb6636521,0xe7b9f9b6,0xff34052e,0xc5855664,0x53b02d5d,0xa99f8fa1,0x8ba4799,0x6e85076a,0x4b7a70e9,0xb5b32944,0xdb75092e,0xc4192623,290971e4,0x49a7df7d,0x9cee60b8,0x8fedb266,0xecaa8c71,0x699a17ff,0x5664526c,0xc2b19ee1,0x193602a5,0x75094c29,0xa0591340,0xe4183a3e,0x3f54989a,0x5b429d65,0x6b8fe4d6,0x99f73fd6,0xa1d29c07,0xefe830f5,0x4d2d38e6,0xf0255dc1,0x4cdd2086,0x8470eb26,0x6382e9c6,0x21ecc5e,0x9686b3f,0x3ebaefc9,0x3c971814,0x6b6a70a1,0x687f3584,0x52a0e286,0xb79c5305,0xaa500737,0x3e07841c,0x7fdeae5c,0x8e7d44ec,0x5716f2b8,0xb03ada37,0xf0500c0d,0xf01c1f04,0x200b3ff,0xae0cf51a,0x3cb574b2,0x25837a58,0xdc0921bd,0xd19113f9,0x7ca92ff6,0x94324773,0x22f54701,0x3ae5e581,0x37c2dadc,0xc8b57634,0x9af3dda7,0xa9446146,0xfd0030e,0xecc8c73e,0xa4751e41,0xe238cd99,0x3bea0e2f,0x3280bba1,0x183eb331,0x4e548b38,0x4f6db908,0x6f420d03,0xf60a04bf,0x2cb81290,0x24977c79,0x5679b072,0xbcaf89af,0xde9a771f,0xd9930810,0xb38bae12,0xdccf3f2e,0x5512721f,0x2e6b7124,0x501adde6,0x9f84cd87,0x7a584718,0x7408da17,0xbc9f9abc,0xe94b7d8c,0xec7aec3a,0xdb851dfa,0x63094366,0xc464c3d2,0xef1c1847,0x3215d908,0xdd433b37,0x24c2ba16,0x12a14d43,0x2a65c451,0x50940002,0x133ae4dd,0x71dff89e,0x10314e55,0x81ac77d6,0x5f11199b,0x43556f1,0xd7a3c76b,0x3c11183b,0x5924a509,0xf28fe6ed,0x97f1fbfa,0x9ebabf2c,0x1e153c6e,0x86e34570,0xeae96fb1,0x860e5e0a,0x5a3e2ab3,0x771fe71c,0x4e3d06fa,0x2965dcb9,0x99e71d0f,0x803e89d6,0x5266c825,0x2e4cc978,0x9c10b36a,0xc6150eba,0x94e2ea78,0xa5fc3c53,0x1e0a2df4,0xf2f74ea7,0x361d2b3d,0x1939260f,0x19c27960,0x5223a708,0xf71312b6,0xebadfe6e,0xeac31f66,0xe3bc4595,0xa67bc883,0xb17f37d1,0x18cff28,0xc332ddef,0xbe6c5aa5,0x65582185,0x68ab9802,0xeecea50f,0xdb2f953b,0x2aef7dad,0x5b6e2f84,0x1521b628,0x29076170,0xecdd4775,0x619f1510,0x13cca830,0xeb61bd96,0x334fe1e,0xaa0363cf,0xb5735c90,0x4c70a239,0xd59e9e0b,0xcbaade14,0xeecc86bc,0x60622ca7,0x9cab5cab,0xb2f3846e,0x648b1eaf,0x19bdf0ca,0xa02369b9,0x655abb50,0x40685a32,0x3c2ab4b3,0x319ee9d5,0xc021b8f7,0x9b540b19,0x875fa099,0x95f7997e,0x623d7da8,0xf837889a,0x97e32d77,0x11ed935f,0x16681281,0xe358829,0xc7e61fd6,0x96dedfa1,0x7858ba99,0x57f584a5,0x1b227263,0x9b83c3ff,0x1ac24696,0xcdb30aeb,0x532e3054,0x8fd948e4,0x6dbc3128,0x58ebf2ef,0x34c6ffea,0xfe28ed61,0xee7c3c73,0x5d4a14d9,0xe864b7e3,0x42105d14,0x203e13e0,0x45eee2b6,0xa3aaabea,0xdb6c4f15,0xfacb4fd0,0xc742f442,0xef6abbb5,0x654f3b1d,0x41cd2105,0xd81e799e,0x86854dc7,0xe44b476a,0x3d816250,0xcf62a1f2,0x5b8d2646,0xfc8883a0,0xc1c7b6a3,0x7f1524c3,0x69cb7492,0x47848a0b,0x5692b285,0x95bbf00,0xad19489d,0x1462b174,0x23820e00,0x58428d2a,0xc55f5ea,0x1dadf43e,0x233f7061,0x3372f092,0x8d937e41,0xd65fecf1,0x6c223bdb,0x7cde3759,0xcbee7460,0x4085f2a7,0xce77326e,0xa6078084,0x19f8509e,0xe8efd855,0x61d99735,0xa969a7aa,0xc50c06c2,0x5a04abfc,0x800bcadc,0x9e447a2e,0xc3453484,0xfdd56705,0xe1e9ec9,0xdb73dbd3,0x105588cd,0x675fda79,0xe3674340,0xc5c43465,0x713e38d8,0x3d28f89e,0xf16dff20,0x153e21e7,0x8fb03d4a,0xe6e39f2b,0xdb83adf7,0xe93d5a68,0x948140f7,0xf64c261c,0x94692934,0x411520f7,0x7602d4f7,0xbcf46b2e,0xd4a20068,0xd4082471,0x3320f46a,0x43b7d4b7,0x500061af,0x1e39f62e,0x97244546,0x14214f74,0xbf8b8840,0x4d95fc1d,0x96b591af,0x70f4ddd3,0x66a02f45,0xbfbc09ec,0x3bd9785,0x7fac6dd0,0x31cb8504,0x96eb27b3,0x55fd3941,0xda2547e6,0xabca0a9a,0x28507825,0x530429f4,0xa2c86da,0xe9b66dfb,0x68dc1462,0xd7486900,0x680ec0a4,0x27a18dee,0x4f3ffea2,0xe887ad8c,0xb58ce006,0x7af4d6b6,0xaace1e7c,0xd3375fec,0xce78a399,0x406b2a42,0x20fe9e35,0xd9f385b9,0xee39d7ab,0x3b124e8b,0x1dc9faf7,0x4b6d1856,0x26a36631,0xeae397b2,0x3a6efa74,0xdd5b4332,0x6841e7f7,0xca7820fb,0xfb0af54e,0xd8feb397,0x454056ac,0xba489527,0x55533a3a,0x20838d87,0xfe6ba9b7,0xd096954b,0x55a867bc,0xa1159a58,0xcca92963,0x99e1db33,0xa62a4a56,0x3f3125f9,0x5ef47e1c,0x9029317c,0xfdf8e802,0x4272f70,0x80bb155c,0x5282ce3,0x95c11548,0xe4c66d22,0x48c1133f,0xc70f86dc,0x7f9c9ee,0x41041f0f,0x404779a4,0x5d886e17,0x325f51eb,0xd59bc0d1,0xf2bcc18f,0x41113564,0x257b7834,0x602a9c60,0xdff8e8a3,0x1f636c1b,0xe12b4c2,0x2e1329e,0xaf664fd1,0xcad18115,0x6b2395e0,0x333e92e1,0x3b240b62,0xeebeb922,0x85b2a20e,0xe6ba0d99,0xde720c8c,0x2da2f728,0xd0127845,0x95b794fd,0x647d0862,0xe7ccf5f0,0x5449a36f,0x877d48fa,0xc39dfd27,0xf33e8d1e,0xa476341,0x992eff74,0x3a6f6eab,0xf4f8fd37,0xa812dc60,0xa1ebddf8,0x991be14c,0xdb6e6b0d,0xc67b5510,0x6d672c37,0x2765d43b,0xdcd0e804,0xf1290dc7,0xcc00ffa3,0xb5390f92,0x690fed0b,0x667b9ffb,0xcedb7d9c,0xa091cf0b,0xd9155ea3,0xbb132f88,0x515bad24,0x7b9479bf,0x763bd6eb,0x37392eb3,0xcc115979,0x8026e297,0xf42e312d,0x6842ada7,0xc66a2b3b,0x12754ccc,0x782ef11c,0x6a124237,0xb79251e7,0x6a1bbe6,0x4bfb6350,0x1a6b1018,0x11caedfa,0x3d25bdd8,0xe2e1c3c9,0x44421659,0xa121386,0xd90cec6e,0xd5abea2a,0x64af674e,0xda86a85f,0xbebfe988,0x64e4c3fe,0x9dbc8057,0xf0f7c086,0x60787bf8,0x6003604d,0xd1fd8346,0xf6381fb0,0x7745ae04,0xd736fccc,0x83426b33,0xf01eab71,0xb0804187,0x3c005e5f,0x77a057be,0xbde8ae24,0x55464299,0xbf582e61,0x4e58f48f,0xf2ddfda2,0xf474ef38,0x8789bdc2,0x5366f9c3,0xc8b38e74,0xb475f255,0x46fcd9b9,0x7aeb2661,0x8b1ddf84,0x846a0e79,0x915f95e2,0x466e598e,0x20b45770,0x8cd55591,0xc902de4c,0xb90bace1,0xbb8205d0,0x11a86248,0x7574a99e,0xb77f19b6,0xe0a9dc09,0x662d09a1,0xc4324633,0xe85a1f02,0x9f0be8c,0x4a99a025,0x1d6efe10,0x1ab93d1d,0xba5a4df,0xa186f20f,0x2868f169,0xdcb7da83,0x573906fe,0xa1e2ce9b,0x4fcd7f52,0x50115e01,0xa70683fa,0xa002b5c4,0xde6d027,0x9af88c27,0x773f8641,0xc3604c06,0x61a806b5,0xf0177a28,0xc0f586e0,6314154,0x30dc7d62,0x11e69ed7,0x2338ea63,0x53c2dd94,0xc2c21634,0xbbcbee56,0x90bcb6de,0xebfc7da1,0xce591d76,0x6f05e409,0x4b7c0188,0x39720a3d,0x7c927c24,0x86e3725f,0x724d9db9,0x1ac15bb4,0xd39eb8fc,0xed545578,0x8fca5b5,0xd83d7cd3,0x4dad0fc4,0x1e50ef5e,0xb161e6f8,0xa28514d9,0x6c51133c,0x6fd5c7e7,0x56e14ec4,0x362abfce,0xddc6c837,0xd79a3234,0x92638212,0x670efa8e,0x406000e0,0x3a39ce37,0xd3faf5cf,0xabc27737,0x5ac52d1b,0x5cb0679e,0x4fa33742,0xd3822740,0x99bc9bbe,0xd5118e9d,0xbf0f7315,0xd62d1c7e,0xc700c47b,0xb78c1b6b,0x21a19045,0xb26eb1be,0x6a366eb4,0x5748ab2f,0xbc946e79,0xc6a376d2,0x6549c2c8,0x530ff8ee,0x468dde7d,0xd5730a1d,0x4cd04dc6,0x2939bbdb,0xa9ba4650,0xac9526e8,0xbe5ee304,0xa1fad5f0,0x6a2d519a,0x63ef8ce2,0x9a86ee22,0xc089c2b8,0x43242ef6,0xa51e03aa,0x9cf2d0a4,0x83c061ba,0x9be96a4d,0x8fe51550,0xba645bd6,0x2826a2f9,0xa73a3ae1,0x4ba99586,0xef5562e9,0xc72fefd3,0xf752f7da,0x3f046f69,0x77fa0a59,0x80e4a915,0x87b08601,0x9b09e6ad,0x3b3ee593,0xe990fd5a,0x9e34d797,0x2cf0b7d9,0x22b8b51,0x96d5ac3a,0x17da67d,0xd1cf3ed6,0x7c7d2d28,0x1f9f25cf,0xadf2b89b,0x5ad6b472,0x5a88f54c,0xe029ac71,0xe019a5e6,0x47b0acfd,0xed93fa9b,0xe8d3c48d,0x283b57cc,0xf8d56629,0x79132e28,0x785f0191,0xed756055,0xf7960e44,0xe3d35e8c,0x15056dd4,0x88f46dba,0x3a16125,0x564f0bd,0xc3eb9e15,0x3c9057a2,0x97271aec,0xa93a072a,0x1b3f6d9b,0x1e6321f5,0xf59c66fb,0x26dcf319,0x7533d928,0xb155fdf5,0x3563482,0x8aba3cbb,0x28517711,0xc20ad9f8,0xabcc5167,0xccad925f,0x4de81751,0x3830dc8e,0x379d5862,0x9320f991,0xea7a90c2,0xfb3e7bce,0x5121ce64,0x774fbe32,0xa8b6e37e,0xc3293d46,0x48de5369,0x6413e680,0xa2ae0810,0xdd6db224,0x69852dfd,0x9072166,0xb39a460a,0x6445c0dd,0x586cdecf,0x1c20c8ae,0x5bbef7dd,0x1b588d40,0xccd2017f,0x6bb4e3bb,0xdda26a7e,0x3a59ff45,0x3e350a44,0xbcb4cdd5,0x72eacea8,0xfa6484bb,0x8d6612ae,0xbf3c6f47,0xd29be463,0x542f5d9e,0xaec2771b,0xf64e6370,0x740e0d8d,0xe75b1357,0xf8721671,0xaf537d5d,0x4040cb08,0x4eb4e2cc,0x34d2466a,0x115af84,3786409e3,0x95983a1d,0x6b89fb4,0xce6ea048,0x6f3f3b82,0x3520ab82,0x11a1d4b,0x277227f8,0x611560b1,0xe7933fdc,0xbb3a792b,0x344525bd,0xa08839e1,0x51ce794b,0x2f32c9b7,0xa01fbac9,0xe01cc87e,0xbcc7d1f6,0xcf0111c3,0xa1e8aac7,0x1a908749,0xd44fbd9a,0xd0dadecb,0xd50ada38,0x339c32a,0xc6913667,0x8df9317c,0xe0b12b4f,0xf79e59b7,0x43f5bb3a,0xf2d519ff,0x27d9459c,0xbf97222c,0x15e6fc2a,0xf91fc71,0x9b941525,0xfae59361,0xceb69ceb,0xc2a86459,0x12baa8d1,0xb6c1075e,0xe3056a0c,0x10d25065,0xcb03a442,0xe0ec6e0e,0x1698db3b,0x4c98a0be,0x3278e964,0x9f1f9532,0xe0d392df,0xd3a0342b,0x8971f21e,0x1b0a7441,0x4ba3348c,0xc5be7120,0xc37632d8,0xdf359f8d,0x9b992f2e,0xe60b6f47,0xfe3f11d,0xe54cda54,0x1edad891,0xce6279cf,0xcd3e7e6f,0x1618b166,0xfd2c1d05,0x848fd2c5,0xf6fb2299,0xf523f357,0xa6327623,0x93a83531,0x56cccd02,0xacf08162,0x5a75ebb5,0x6e163697,0x88d273cc,0xde966292,0x81b949d0,0x4c50901b,0x71c65614,0xe6c6c7bd,0x327a140a,0x45e1d006,0xc3f27b9a,0xc9aa53fd,0x62a80f00,0xbb25bfe2,0x35bdd2f6,0x71126905,0xb2040222,0xb6cbcf7c,0xcd769c2b,0x53113ec0,0x1640e3d3,0x38abbd60,0x2547adf0,0xba38209c,0xf746ce76,0x77afa1c5,0x20756060,0x85cbfe4e,0x8ae88dd8,0x7aaaf9b0,0x4cf9aa7e,0x1948c25c,0x2fb8a8c,0x1c36ae4,0xd6ebe1f9,0x90d4f869,0xa65cdea0,0x3f09252d,0xc208e69f,0xb74e6132,0xce77e25b,0x578fdfe3,0x3ac372e6],z=[0x4f727068,0x65616e42,0x65686f6c,0x64657253,0x63727944,0x6f756274];function A(a,b,c,d){var e=a[b],f=a[b+1];return e^=c[0],f^=(d[e>>>24]+d[256|e>>16&255]^d[512|e>>8&255])+d[768|255&e]^c[1],e^=(d[f>>>24]+d[256|f>>16&255]^d[512|f>>8&255])+d[768|255&f]^c[2],f^=(d[e>>>24]+d[256|e>>16&255]^d[512|e>>8&255])+d[768|255&e]^c[3],e^=(d[f>>>24]+d[256|f>>16&255]^d[512|f>>8&255])+d[768|255&f]^c[4],f^=(d[e>>>24]+d[256|e>>16&255]^d[512|e>>8&255])+d[768|255&e]^c[5],e^=(d[f>>>24]+d[256|f>>16&255]^d[512|f>>8&255])+d[768|255&f]^c[6],f^=(d[e>>>24]+d[256|e>>16&255]^d[512|e>>8&255])+d[768|255&e]^c[7],e^=(d[f>>>24]+d[256|f>>16&255]^d[512|f>>8&255])+d[768|255&f]^c[8],f^=(d[e>>>24]+d[256|e>>16&255]^d[512|e>>8&255])+d[768|255&e]^c[9],e^=(d[f>>>24]+d[256|f>>16&255]^d[512|f>>8&255])+d[768|255&f]^c[10],f^=(d[e>>>24]+d[256|e>>16&255]^d[512|e>>8&255])+d[768|255&e]^c[11],e^=(d[f>>>24]+d[256|f>>16&255]^d[512|f>>8&255])+d[768|255&f]^c[12],f^=(d[e>>>24]+d[256|e>>16&255]^d[512|e>>8&255])+d[768|255&e]^c[13],e^=(d[f>>>24]+d[256|f>>16&255]^d[512|f>>8&255])+d[768|255&f]^c[14],f^=(d[e>>>24]+d[256|e>>16&255]^d[512|e>>8&255])+d[768|255&e]^c[15],e^=(d[f>>>24]+d[256|f>>16&255]^d[512|f>>8&255])+d[768|255&f]^c[16],a[b]=f^c[17],a[b+1]=e,a}function B(a,b){for(var c=0,d=0;c<4;++c)d=d<<8|255&a[b],b=(b+1)%a.length;return{key:d,offp:b}}function C(a,b,c){for(var d,e=0,f=[0,0],g=b.length,h=c.length,i=0;i<g;i++)e=(d=B(a,e)).offp,b[i]=b[i]^d.key;for(i=0;i<g;i+=2)f=A(f,0,b,c),b[i]=f[0],b[i+1]=f[1];for(i=0;i<h;i+=2)f=A(f,0,b,c),c[i]=f[0],c[i+1]=f[1]}function D(a,b,c,d,e){var f,g,h=z.slice(),i=h.length;if(c<4||c>31){if(g=Error("Illegal number of rounds (4-31): "+c),d)return void p(d.bind(this,g));throw g}if(b.length!==v){if(g=Error("Illegal salt length: "+b.length+" != "+v),d)return void p(d.bind(this,g));throw g}c=1<<c>>>0;var j,k,l,m=0;function n(){if(e&&e(m/c),m<c)for(var f=Date.now();m<c&&(m+=1,C(a,j,k),C(b,j,k),!(Date.now()-f>100)););else{for(m=0;m<64;m++)for(l=0;l<i>>1;l++)A(h,l<<1,j,k);var g=[];for(m=0;m<i;m++)g.push((h[m]>>24&255)>>>0),g.push((h[m]>>16&255)>>>0),g.push((h[m]>>8&255)>>>0),g.push((255&h[m])>>>0);return d?void d(null,g):g}d&&p(n)}if("function"==typeof Int32Array?(j=new Int32Array(x),k=new Int32Array(y)):(j=x.slice(),k=y.slice()),!function(a,b,c,d){for(var e,f=0,g=[0,0],h=c.length,i=d.length,j=0;j<h;j++)f=(e=B(b,f)).offp,c[j]=c[j]^e.key;for(j=0,f=0;j<h;j+=2)f=(e=B(a,f)).offp,g[0]^=e.key,f=(e=B(a,f)).offp,g[1]^=e.key,g=A(g,0,c,d),c[j]=g[0],c[j+1]=g[1];for(j=0;j<i;j+=2)f=(e=B(a,f)).offp,g[0]^=e.key,f=(e=B(a,f)).offp,g[1]^=e.key,g=A(g,0,c,d),d[j]=g[0],d[j+1]=g[1]}(b,a,j,k),void 0!==d)n();else for(;;)if(void 0!==(f=n()))return f||[]}function E(a,b,c,d){if("string"!=typeof a||"string"!=typeof b){if(e=Error("Invalid string / salt: Not a string"),c)return void p(c.bind(this,e));throw e}if("$"!==b.charAt(0)||"2"!==b.charAt(1)){if(e=Error("Invalid salt version: "+b.substring(0,2)),c)return void p(c.bind(this,e));throw e}if("$"===b.charAt(2))f="\0",g=3;else{if("a"!==(f=b.charAt(2))&&"b"!==f&&"y"!==f||"$"!==b.charAt(3)){if(e=Error("Invalid salt revision: "+b.substring(2,4)),c)return void p(c.bind(this,e));throw e}g=4}if(b.charAt(g+2)>"$"){if(e=Error("Missing salt rounds"),c)return void p(c.bind(this,e));throw e}var e,f,g,h=10*parseInt(b.substring(g,g+1),10)+parseInt(b.substring(g+1,g+2),10),i=b.substring(g+3,g+25),j=function(a){for(var b,c,d=0,e=Array(q(a)),f=0,g=a.length;f<g;++f)(b=a.charCodeAt(f))<128?e[d++]=b:(b<2048?e[d++]=b>>6|192:((64512&b)==55296&&(64512&(c=a.charCodeAt(f+1)))==56320?(b=65536+((1023&b)<<10)+(1023&c),++f,e[d++]=b>>18|240,e[d++]=b>>12&63|128):e[d++]=b>>12|224,e[d++]=b>>6&63|128),e[d++]=63&b|128);return e}(a+=f>="a"?"\0":""),k=u(i,v);function l(a){var b=[];return b.push("$2"),f>="a"&&b.push(f),b.push("$"),h<10&&b.push("0"),b.push(h.toString()),b.push("$"),b.push(t(k,k.length)),b.push(t(a,4*z.length-1)),b.join("")}if(void 0===c)return l(D(j,k,h));D(j,k,h,function(a,b){a?c(a,null):c(null,l(b))},d)}function F(a,b){return t(a,b)}function G(a,b){return u(a,b)}a.default={setRandomFallback:e,genSaltSync:f,genSalt:g,hashSync:h,hash:i,compareSync:k,compare:l,getRounds:m,getSalt:n,truncates:o,encodeBase64:F,decodeBase64:G}},void 0===(d=(function(a){var b={};return e(b,a),b.default||b}).apply(b,[c(55511)]))||(a.exports=d)}};
@@ -1,2 +0,0 @@
1
- "use strict";exports.id=3096,exports.ids=[3096],exports.modules={5565:(a,b,c)=>{let d=c(91645);function e(a){let b=String(a||"").trim().toLowerCase();b.startsWith("[")&&b.endsWith("]")&&(b=b.slice(1,-1));let c=b.indexOf("%");return c>=0&&(b=b.slice(0,c)),b.startsWith("::ffff:")&&4===d.isIP(b.slice(7))&&(b=b.slice(7)),b}function f(a){return Buffer.from(a.split(".").map(a=>Number(a)))}function g(a,b){return 4===b?f(a):function(a){let b=e(a),c=b.lastIndexOf(":");if(c>=0){let a=b.slice(c+1);if(4===d.isIP(a)){let d=f(a),e=(d[0]<<8|d[1]).toString(16),g=(d[2]<<8|d[3]).toString(16);b=`${b.slice(0,c)}:${e}:${g}`}}let g=b.split("::");if(g.length>2)throw Error("Invalid IPv6 address");let h=g[0]?g[0].split(":").filter(Boolean):[],i=2===g.length&&g[1]?g[1].split(":").filter(Boolean):[],j=8-h.length-i.length;if(1===g.length&&0!==j||j<0)throw Error("Invalid IPv6 address");let k=2===g.length?[...h,...Array(j).fill("0"),...i]:h;if(8!==k.length)throw Error("Invalid IPv6 address");let l=Buffer.alloc(16);return k.forEach((a,b)=>{let c=Number.parseInt(a||"0",16);if(!Number.isInteger(c)||c<0||c>65535)throw Error("Invalid IPv6 address");l[2*b]=c>>8&255,l[2*b+1]=255&c}),l}(a)}function h(a){let b=String(a||"").trim();if(!b)throw Error("Empty IP rule");let c=b.indexOf("/"),f=e(c>=0?b.slice(0,c):b),g=d.isIP(f);if(!g)throw Error(`Invalid client IP/CIDR: ${b}`);let h=4===g?32:128,i=c>=0?Number(b.slice(c+1)):h;if(!Number.isInteger(i)||i<0||i>h)throw Error(`Invalid CIDR prefix: ${b}`);return{text:c>=0?`${f}/${i}`:f,ip:f,family:g,prefix:i}}a.exports={normalizeIp:e,parseIpRule:h,normalizeAllowedClientIps:function(a){let b=Array.isArray(a)?a:String(a||"").split(/[\r\n,]+/),c=[],d=new Set;for(let a of b){let b=String(a||"").trim();if(!b)continue;let e=h(b);d.has(e.text)||(d.add(e.text),c.push(e.text))}return c},clientIpMatches:function(a,b=[]){let c=e(a),f=d.isIP(c);if(!f)return!1;let i=g(c,f);for(let a of b||[]){let b;try{b=h(a)}catch{continue}if(b.family===f&&function(a,b,c){let d=Math.floor(c/8),e=c%8;for(let c=0;c<d;c+=1)if(a[c]!==b[c])return!1;if(!e)return!0;let f=255<<8-e&255;return(a[d]&f)==(b[d]&f)}(i,g(b.ip,b.family),b.prefix))return!0}return!1}}},7566:(a,b,c)=>{let d=c(55511),e=/^[a-z0-9][a-z0-9._-]{0,63}$/i,f=null;function g(){return f||(f=c(81370)),f}function h(a){return String(a||"").trim()}function i(a){let b=Array.isArray(a)?a:[],c=new Set,d=[];for(let a of b){if(!a||"object"!=typeof a)continue;let b=h(a.username),f=String(a.passwordHash||"");if(!e.test(b)||!f.startsWith("$2"))continue;let g=b.toLowerCase();c.has(g)||(c.add(g),d.push({username:b,passwordHash:f}))}return d}function j(a){if(Array.isArray(a))return null;let b=String(a||"").trim();if(!b||b.length>1024)return null;let c=b.indexOf(" ");if(c<0||"basic"!==b.slice(0,c).toLowerCase())return null;let d=b.slice(c+1).trim();if(!d||!/^[A-Za-z0-9+/]+={0,2}$/.test(d))return null;let e="";try{e=Buffer.from(d,"base64").toString("utf8")}catch{return null}let f=e.indexOf(":");return f<0?null:{username:e.slice(0,f),password:e.slice(f+1)}}a.exports={CACHE_TTL_MS:3e5,PASSWORD_MAX_BYTES:72,PASSWORD_MIN_BYTES:8,createProxyAuthLimiter:function({maxFailures:a=10,windowMs:b=6e4,cooldownMs:c=3e4,maxCooldownMs:d=3e5,maxEntries:e=1024}={}){let f=new Map;return{isLocked(a){let b=f.get(a);return!!b&&b.lockedUntil>Date.now()},recordFailure(g){let h=Date.now();!function(a){if(f.size<e)return;for(let[c,d]of f)if(d.lockedUntil<=a&&a-d.lastFailAt>b&&f.delete(c),f.size<e)return;let c=f.keys().next();c.done||f.delete(c.value)}(h);let i=f.get(g)||{failures:0,lastFailAt:0,lockedUntil:0,cooldownMs:c};h-i.lastFailAt>b&&(i.failures=0),i.failures+=1,i.lastFailAt=h;let j=!1;return i.failures>=a&&(i.lockedUntil=h+i.cooldownMs,i.cooldownMs=Math.min(2*i.cooldownMs,d),i.failures=0,j=!0),f.set(g,i),{lockedNow:j}},recordSuccess(a){f.delete(a)}}},createProxyAuthenticator:function(a){let b=new Map(i(a).map(a=>[a.username.toLowerCase(),a])),c=new Map,e=new Map;return{get accountCount(){return b.size},async authenticate(a){let f,h=j(a);if(!h)return{ok:!1,username:null,reason:a?"Unsupported proxy credentials":"Proxy authentication required"};let{username:i,password:k}=h,l=d.createHash("sha256").update(`${i}\0${k}`).digest("hex"),m=(f=c.get(l))?f.expiresAt<=Date.now()?(c.delete(l),null):f.username:null;if(m)return{ok:!0,username:m,reason:null};let n=b.get(i.trim().toLowerCase()),o=n?n.passwordHash:"$2b$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy",p=e.get(l);p||(p=g().compare(k,o).catch(()=>!1),e.set(l,p),p.finally(()=>e.delete(l)));let q=await p;if(!n||!q)return{ok:!1,username:null,reason:"Invalid proxy credentials"};var r=n.username;if(c.size>=256){let a=c.keys().next();a.done||c.delete(a.value)}return c.set(l,{username:r,expiresAt:Date.now()+3e5}),{ok:!0,username:n.username,reason:null}}}},hashProxyPassword:async function a(a){let b=await g().genSalt(10);return g().hash(String(a),b)},isValidUsername:function(a){return e.test(h(a))},normalizeProxyUsers:i,parseBasicProxyAuthorization:j,redactProxyAuthUsers:function(a){return i(a).map(a=>({username:a.username,hasPassword:!0}))}}},43096:(a,b,c)=>{let d=c(29021),e=c(33873),{DATA_DIR:f}=c(82193),{normalizeAllowedClientIps:g}=c(5565),{normalizeAllowedToolsInput:h}=c(98586),{normalizeProxyUsers:i}=c(7566),{normalizeAccessGrants:j}=c(77407),k=e.join(f,"audit-gateway"),l=e.join(k,"config.json"),m=e.join(k,"audit.jsonl"),n=e.join(k,"logs"),o=Object.freeze({enabled:!1,bindHost:"127.0.0.1",port:3128,clientProxyHost:"",clientToolFilterEnabled:!1,allowedClientTools:[],proxyAuthEnabled:!1,proxyAuthUsers:[],accessGrants:[],allowedHosts:["api.anthropic.com","*.anthropic.com","claude.ai","*.claude.ai","api.openai.com","*.openai.com","chatgpt.com","*.chatgpt.com","api.githubcopilot.com","*.githubcopilot.com","api.github.com","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","oidc.us-east-1.amazonaws.com","*.auth.desktop.kiro.dev"],passthroughUnknown:!0,captureBodies:!0,captureLimitBytes:2097152,retentionDays:7,verifyUpstreamTls:!0,connectTimeoutMs:1e4,tlsHandshakeTimeoutMs:1e4,responseHeaderTimeoutMs:3e4,idleTimeoutMs:9e5,shutdownGraceMs:1500,allowPlainHttp:!1,allowedConnectPorts:[443]});function p(){return{...o,allowedClientTools:[...o.allowedClientTools],proxyAuthUsers:[...o.proxyAuthUsers],accessGrants:[],allowedHosts:[...o.allowedHosts],allowedConnectPorts:[...o.allowedConnectPorts]}}function q(){d.mkdirSync(k,{recursive:!0}),d.mkdirSync(n,{recursive:!0})}function r(a){return[...new Set((Array.isArray(a)?a:String(a||"").split(/[\r\n,]+/)).map(a=>String(a||"").trim().toLowerCase()).filter(Boolean).filter(a=>!a.includes("://")&&/^[*a-z0-9._-]+$/.test(a)))]}function s(a,b,c,d,e){let f=null==a?b:Number(a);if(!Number.isInteger(f)||f<c||f>d)throw Error(`${e} must be between ${c} and ${d}`);return f}function t(a={}){let b={...o,...a},c=s(b.port,o.port,1,65535,"Proxy port"),d=Number(b.captureLimitBytes);if(!Number.isFinite(d)||d<0||d>0x1000000)throw Error("Capture limit must be between 0 and 16 MB");let e=s(b.retentionDays,o.retentionDays,1,365,"Retention days"),f=s(b.connectTimeoutMs,o.connectTimeoutMs,1e3,12e4,"Connect timeout"),g=s(b.tlsHandshakeTimeoutMs,o.tlsHandshakeTimeoutMs,1e3,12e4,"TLS handshake timeout"),k=s(b.responseHeaderTimeoutMs,o.responseHeaderTimeoutMs,1e3,3e5,"Response header timeout"),l=s(b.idleTimeoutMs,o.idleTimeoutMs,3e4,36e5,"Idle timeout"),m=s(b.shutdownGraceMs,o.shutdownGraceMs,0,3e4,"Shutdown grace period"),n=String(b.bindHost||"127.0.0.1").trim();if(!n||/\s/.test(n))throw Error("Invalid bind address");let p=String(b.clientProxyHost||"").trim();if(/\s/.test(p)||p.includes("://"))throw Error("Client proxy host must be a hostname or IP without protocol");let q=i(b.proxyAuthUsers);0;let u=j(b.accessGrants),v=!0===b.clientToolFilterEnabled,w=h(b.allowedClientTools);if(v&&0===w.length)throw Error("Client tool filter requires at least one allowed tool");return{enabled:!0===b.enabled,bindHost:n,port:c,clientProxyHost:p,clientToolFilterEnabled:v,allowedClientTools:w,proxyAuthEnabled:!1,proxyAuthUsers:q,accessGrants:u,allowedHosts:r(b.allowedHosts),passthroughUnknown:!1!==b.passthroughUnknown,captureBodies:!1!==b.captureBodies,captureLimitBytes:Math.round(d),retentionDays:e,verifyUpstreamTls:!0,connectTimeoutMs:f,tlsHandshakeTimeoutMs:g,responseHeaderTimeoutMs:k,idleTimeoutMs:l,shutdownGraceMs:m,allowPlainHttp:!1,allowedConnectPorts:[443]}}a.exports={PROXY_AUTH_FEATURE_ENABLED:!1,AUDIT_DIR:k,CONFIG_PATH:l,AUDIT_LOG_PATH:m,AUDIT_LOG_DIR:n,DEFAULT_CONFIG:o,ensureAuditDir:q,loadConfig:function(){if(q(),!d.existsSync(l))return p();try{return t(JSON.parse(d.readFileSync(l,"utf8")))}catch(a){return console.warn(`[audit-proxy] invalid config ignored: ${a.message||a}`),p()}},saveConfig:function(a){q();let b=t(a),c=`${l}.tmp`;return d.writeFileSync(c,`${JSON.stringify(b,null,2)}
2
- `,{mode:384}),d.renameSync(c,l),b},validateConfig:t,normalizeAllowedHosts:r,normalizeAllowedClientIps:g}},77407:(a,b,c)=>{let{normalizeAllowedClientIps:d,clientIpMatches:e,normalizeIp:f}=c(5565);function g(a){return String(a||"").trim().toLowerCase()}function h(a){let b=Array.isArray(a)?a:a&&"object"==typeof a?Object.entries(a).map(([a,b])=>({userId:a,ips:b})):[],c=new Map;for(let a of b){let b=g(a?.userId??a?.user??a?.id);if(!b)continue;let e=d(a?.ips??a?.allowedClientIps??[]);if(e.length>64)throw Error(`Grant for ${b} exceeds 64 IP entries`);let f=c.get(b);c.set(b,{userId:b,ips:f?d([...f.ips,...e]):e,note:String((a?.note??f?.note)||"").trim().slice(0,200)})}if(c.size>500)throw Error("At most 500 Audit Proxy access grants are supported");return[...c.values()].sort((a,b)=>a.userId.localeCompare(b.userId))}function i(a=[]){return d(a.flatMap(a=>a?.ips||[]))}a.exports={MAX_GRANTS:500,MAX_IPS_PER_GRANT:64,normalizeGrantUserId:g,normalizeAccessGrants:h,grantedIps:i,findAccessGrant:function(a=[],b=""){let c=g(b);return c&&a.find(a=>a.userId===c)||null},effectiveClientIpPolicy:function(a={}){let b=h(a.accessGrants);return{enabled:!0,allowedClientIps:i(b),source:"grants",grants:b}},attachClientIpGate:function(a,b){let c=new Map;return a.prependListener("connection",a=>{let d=f(a?.remoteAddress||""),g=b()||{};if(g.enabled&&!e(d,g.allowedClientIps||[])){console.log(`[audit-proxy] denied client IP ${d||"unknown"} (${g.source||"manual"} allowlist)`);try{a.destroy()}catch{}return}c.set(a,d),a.once("close",()=>c.delete(a))}),{dropRevoked(){let a=b()||{};if(!a.enabled)return 0;let d=0;for(let[b,f]of[...c])if(!e(f,a.allowedClientIps||[])){console.log(`[audit-proxy] closing connection from revoked client IP ${f||"unknown"}`);try{b.destroy()}catch{}c.delete(b),d+=1}return d},connectionCount:()=>c.size}}}},82193:(a,b,c)=>{let d=c(29021),e=c(33873),f=c(21820),g="bluerouter";function h(){return"win32"===process.platform?e.join(process.env.APPDATA||e.join(f.homedir(),"AppData","Roaming"),g):e.join(f.homedir(),`.${g}`)}let i=function(){let a=process.env.DATA_DIR;if(!a)return h();try{return d.mkdirSync(a,{recursive:!0}),a}catch(b){if(b?.code==="EACCES"||b?.code==="EPERM")return console.warn(`[DATA_DIR] '${a}' not writable → fallback ~/.${g}`),h();throw b}}(),j=e.join(i,"mitm");a.exports={DATA_DIR:i,MITM_DIR:j}},98586:a=>{let b=[{id:"claude-code",label:"Claude Code",patterns:["claude-cli","claude-code","anthropic"]},{id:"codex",label:"OpenAI Codex",patterns:["codex_cli","codex-cli","codex"]},{id:"gemini-cli",label:"Gemini CLI",patterns:["gemini-cli","google-genai"]},{id:"cursor",label:"Cursor",patterns:["cursor"]},{id:"copilot",label:"GitHub Copilot",patterns:["copilot","githubcopilot"]},{id:"kiro",label:"Kiro",patterns:["kiro","aws-sdk-js"]},{id:"curl",label:"curl / scripts",patterns:["curl","wget","httpie"]}];function c(a){return String(a||"").trim().toLowerCase()}function d(a,b=[]){let e=c(a);return!!e&&!!b.length&&b.some(a=>a&&e.includes(a))}a.exports={TOOL_PRESETS:b,normalizeAllowedTools:function(a){let d=Array.isArray(a)?a:String(a||"").split(/[\r\n,]+/),e=[];for(let a of d){let d=c(a);if(!d)continue;let f=b.find(a=>a.id===d);f?e.push(...f.patterns):e.push(d)}return[...new Set(e)]},normalizeAllowedToolsInput:function(a){return[...new Set((Array.isArray(a)?a:String(a||"").split(/[\r\n,]+/)).map(c).filter(Boolean))]},clientToolMatches:d,shouldRefuseClientTool:function(a,b=[]){return!!c(a)&&!d(a,b)},describeUserAgent:function(a){let b=String(a||"").trim();return b?b.length>120?`${b.slice(0,119)}…`:b:"no User-Agent"}}}};