@synthever/jrouter 1.0.0 → 1.0.2

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 (378) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +14 -14
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +2 -2
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  39. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  40. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  41. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  42. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  43. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  45. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  46. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  47. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
  48. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  49. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  50. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  51. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  52. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  53. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  54. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  55. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
  56. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
  57. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
  58. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
  59. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  60. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +9 -9
  61. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
  62. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  63. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
  64. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  65. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
  66. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +1 -1
  67. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  68. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  69. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  70. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  71. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
  72. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
  73. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  74. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +1 -1
  75. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +5 -5
  76. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js +2 -2
  77. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  78. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  79. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +3 -3
  80. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
  81. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  82. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  83. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
  84. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  85. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  86. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  87. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  88. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  89. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  90. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  91. package/app/.next-cli-build/server/app/api/keys/[id]/secret/route.js +1 -1
  92. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  93. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  94. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  95. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  96. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  97. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  98. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  99. package/app/.next-cli-build/server/app/api/model-health/check/route.js +1 -1
  100. package/app/.next-cli-build/server/app/api/model-health/check-all/route.js +1 -1
  101. package/app/.next-cli-build/server/app/api/model-health/config/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/model-health/history/route.js +1 -1
  103. package/app/.next-cli-build/server/app/api/model-health/model/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/model-health/models/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/model-health/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/model-health/run-scheduled/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/model-health/summary/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  109. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/models/limits/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/providers/[id]/connections/keys/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  135. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  139. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  141. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  144. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +4 -4
  145. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +1 -1
  150. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  154. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  156. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  158. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  160. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  178. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  179. package/app/.next-cli-build/server/app/callback.html +1 -1
  180. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  181. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  182. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  183. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
  184. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  185. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
  186. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +6 -6
  187. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
  188. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  189. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  190. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  191. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +6 -6
  192. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  193. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  194. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  195. package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
  196. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +6 -6
  197. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  198. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  199. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  200. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  201. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +6 -6
  202. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  203. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  204. package/app/.next-cli-build/server/app/dashboard/health.html +1 -1
  205. package/app/.next-cli-build/server/app/dashboard/health.rsc +6 -6
  206. package/app/.next-cli-build/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk/dashboard/health/__PAGE__.segment.rsc +5 -5
  207. package/app/.next-cli-build/server/app/dashboard/health.segments/_full.segment.rsc +6 -6
  208. package/app/.next-cli-build/server/app/dashboard/health.segments/_tree.segment.rsc +1 -1
  209. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  210. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +7 -7
  211. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +6 -6
  212. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
  213. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  214. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  215. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
  216. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +6 -6
  217. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
  218. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  219. package/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
  220. package/app/.next-cli-build/server/app/dashboard/playground.rsc +7 -7
  221. package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +6 -6
  222. package/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +7 -7
  223. package/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
  224. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  225. package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
  226. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +6 -6
  227. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
  228. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  229. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  230. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
  231. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +6 -6
  232. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
  233. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  234. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  235. package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
  236. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +6 -6
  237. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
  238. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  239. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  240. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
  241. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +6 -6
  242. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
  243. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  244. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  245. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +7 -7
  246. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +6 -6
  247. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
  248. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  249. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  250. package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
  251. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +7 -7
  252. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
  253. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  254. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  255. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  256. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  257. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  258. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  259. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
  260. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  261. package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
  262. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +6 -6
  263. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
  264. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  265. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  266. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
  267. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
  268. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
  269. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  270. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  271. package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
  272. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +6 -6
  273. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  274. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  275. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  276. package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
  277. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +6 -6
  278. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  279. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  280. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  281. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  282. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +5 -5
  283. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  284. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  285. package/app/.next-cli-build/server/app/index.html +1 -1
  286. package/app/.next-cli-build/server/app/index.rsc +5 -5
  287. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  288. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  289. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  290. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  291. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  292. package/app/.next-cli-build/server/app/landing.html +1 -1
  293. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  294. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  295. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  296. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
  297. package/app/.next-cli-build/server/app/login/page.js +1 -1
  298. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  299. package/app/.next-cli-build/server/app/login.html +1 -1
  300. package/app/.next-cli-build/server/app/login.rsc +6 -6
  301. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
  302. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  303. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +5 -5
  304. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +1 -1
  305. package/app/.next-cli-build/server/app/manifest.webmanifest.body +1 -1
  306. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  307. package/app/.next-cli-build/server/app-paths-manifest.json +14 -14
  308. package/app/.next-cli-build/server/chunks/1133.js +1 -1
  309. package/app/.next-cli-build/server/chunks/1757.js +2 -2
  310. package/app/.next-cli-build/server/chunks/2132.js +1 -1
  311. package/app/.next-cli-build/server/chunks/2524.js +1 -1
  312. package/app/.next-cli-build/server/chunks/2732.js +1 -1
  313. package/app/.next-cli-build/server/chunks/2760.js +1 -1
  314. package/app/.next-cli-build/server/chunks/3192.js +1 -1
  315. package/app/.next-cli-build/server/chunks/3360.js +1 -1
  316. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  317. package/app/.next-cli-build/server/chunks/3966.js +6 -6
  318. package/app/.next-cli-build/server/chunks/412.js +1 -1
  319. package/app/.next-cli-build/server/chunks/4123.js +3 -3
  320. package/app/.next-cli-build/server/chunks/4152.js +1 -1
  321. package/app/.next-cli-build/server/chunks/436.js +1 -1
  322. package/app/.next-cli-build/server/chunks/455.js +1 -1
  323. package/app/.next-cli-build/server/chunks/4642.js +1 -1
  324. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  325. package/app/.next-cli-build/server/chunks/4764.js +1 -1
  326. package/app/.next-cli-build/server/chunks/4827.js +1 -1
  327. package/app/.next-cli-build/server/chunks/4864.js +6 -6
  328. package/app/.next-cli-build/server/chunks/5299.js +25 -25
  329. package/app/.next-cli-build/server/chunks/5330.js +1 -1
  330. package/app/.next-cli-build/server/chunks/5615.js +2 -2
  331. package/app/.next-cli-build/server/chunks/6296.js +5 -5
  332. package/app/.next-cli-build/server/chunks/735.js +1 -1
  333. package/app/.next-cli-build/server/chunks/7373.js +1 -1
  334. package/app/.next-cli-build/server/chunks/7716.js +1 -1
  335. package/app/.next-cli-build/server/chunks/8126.js +1 -1
  336. package/app/.next-cli-build/server/chunks/8306.js +1 -1
  337. package/app/.next-cli-build/server/chunks/8432.js +1 -1
  338. package/app/.next-cli-build/server/chunks/8749.js +1 -1
  339. package/app/.next-cli-build/server/chunks/9032.js +1 -1
  340. package/app/.next-cli-build/server/chunks/9046.js +1 -1
  341. package/app/.next-cli-build/server/chunks/9128.js +1 -1
  342. package/app/.next-cli-build/server/chunks/9489.js +1 -1
  343. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  344. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  345. package/app/.next-cli-build/server/middleware.js +2 -2
  346. package/app/.next-cli-build/server/pages/404.html +1 -1
  347. package/app/.next-cli-build/server/pages/500.html +1 -1
  348. package/app/.next-cli-build/static/chunks/{1321-b2785838003873e1.js → 1321-9eb7d54c5b900efb.js} +1 -1
  349. package/app/.next-cli-build/static/chunks/{5497-66e7c2a2b715a638.js → 5497-973a06c94a94aff7.js} +1 -1
  350. package/app/.next-cli-build/static/chunks/761-1bcb7334763d5645.js +132 -0
  351. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-9f4426c30039c7d5.js → page-3960bffd1fddbbad.js} +1 -1
  352. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/{page-0c7b45a45ba51753.js → page-61b17862582ff807.js} +1 -1
  353. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-de6dfc43c2687bd8.js → page-1a560f2b5cdf2e31.js} +1 -1
  354. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-4c6b176d5c59d8a4.js +1 -0
  355. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-e631d28dd402dc1e.js → page-d0031965cf7eff51.js} +1 -1
  356. package/app/.next-cli-build/static/chunks/app/landing/{page-431f7e8093b8ca51.js → page-5bc39b166588b878.js} +1 -1
  357. package/app/.next-cli-build/static/chunks/app/login/{page-80c4e229a5f38a6b.js → page-f2b166590b653d36.js} +1 -1
  358. package/app/custom-server.js +2 -2
  359. package/app/package.json +1 -1
  360. package/app/src/lib/oauth/providers/xiaomi-mimo.js +2 -2
  361. package/app/src/lib/updater/updater.js +3 -3
  362. package/app/src/mitm/server.js +10 -10
  363. package/cli.js +6 -6
  364. package/hooks/postinstall.js +2 -2
  365. package/hooks/sqliteRuntime.js +2 -2
  366. package/hooks/trayRuntime.js +3 -3
  367. package/package.json +7 -3
  368. package/src/cli/api/client.js +3 -3
  369. package/src/cli/commands/connect.js +3 -3
  370. package/src/cli/commands/connectTools.js +12 -12
  371. package/src/cli/commands/xaiVideo.js +1 -1
  372. package/src/cli/menus/cliTools.js +18 -18
  373. package/src/cli/menus/settings.js +1 -1
  374. package/src/cli/tray/autostart.js +1 -1
  375. package/app/.next-cli-build/static/chunks/761-57ed45cdddcf32eb.js +0 -132
  376. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-316b3186a841d862.js +0 -1
  377. /package/app/.next-cli-build/static/{fjLlI_-eBYMOp6J-a-q-6 → MDZXE-9g1sq006f6JNky9}/_buildManifest.js +0 -0
  378. /package/app/.next-cli-build/static/{fjLlI_-eBYMOp6J-a-q-6 → MDZXE-9g1sq006f6JNky9}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (()=>{var a={};a.id=3471,a.ids=[3471],a.modules={643:a=>{"use strict";a.exports=require("node:perf_hooks")},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},5114:(a,b,c)=>{var d=c(12100),e=c(30083),f=c(22004),g=c(23548),h=c(56878);a.exports={page:"profile_page___tjyP "+d.page+" "+e.fields,header:"profile_header__IkyVh "+f.header,description:"profile_description__NXRzM "+f.description,section:"profile_section__UAY_s "+f.section,sectionHeader:"profile_sectionHeader___cLAs "+f.sectionHeader,sectionDescription:"profile_sectionDescription__ZbT8S "+f.sectionDescription,fieldLabel:"profile_fieldLabel__TDwV7 "+f.fieldLabel,inset:"profile_inset__DdQQ3 "+f.inset,dialog:"profile_dialog__vjXNZ "+e.dialog,dangerButton:"profile_dangerButton__gObBc "+g.dangerButton,linkButton:"profile_linkButton__Ohf76 "+h.linkButton,stack:"profile_stack__stIZ4",settingRow:"profile_settingRow__SqVZr "+g.settingsRow,settingTitle:"profile_settingTitle__c_bHF "+d.title,settingDescription:"profile_settingDescription__5HFh3 "+d.metadata,actions:"profile_actions__W0G3b",form:"profile_form__lLMlh",ssoForm:"profile_ssoForm__QKyCp",formGrid:"profile_formGrid__S7IE_",disclosure:"profile_disclosure__OXS9X",choice:"profile_choice__RAEhZ",guide:"profile_guide__Yl3qV",status:"profile_status__dFw2G",notice:"profile_notice__z5zKe",appInfo:"profile_appInfo__zIFC1",languageDialog:"profile_languageDialog__4pCcf "+e.dialog}},5150:(a,b,c)=>{Promise.resolve().then(c.bind(c,50047))},7066:a=>{"use strict";a.exports=require("node:tty")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12100:(a,b,c)=>{var d=c(22004),e=c(30083);a.exports={page:"token-saver_page__79V8u "+d.page+" "+e.formScope,header:"token-saver_header__Qk3iN "+d.header,description:"token-saver_description__WdRoO "+d.description,section:"token-saver_section__UHCch "+d.section,sectionHeader:"token-saver_sectionHeader__s_oJS "+d.sectionHeader,sectionDescription:"token-saver_sectionDescription__JPhfC "+d.sectionDescription,dialog:"token-saver_dialog___IKgp "+e.dialog,inset:"token-saver_inset__biEJH "+d.inset,fieldLabel:"token-saver_fieldLabel__0zEKO "+d.fieldLabel,summary:"token-saver_summary__WL02H",strategy:"token-saver_strategy__SOcTp",strategyHeader:"token-saver_strategyHeader__2JL_c",identity:"token-saver_identity__nhMJs",titleLine:"token-saver_titleLine__rRvzO",title:"token-saver_title__9opCy",docLink:"token-saver_docLink__Kfjx_",metadata:"token-saver_metadata__ktGrx",actions:"token-saver_actions__xqMmb",levels:"token-saver_levels__J1_s1",levelHint:"token-saver_levelHint__GXnJL",extras:"token-saver_extras__eedyn",extrasHeader:"token-saver_extrasHeader__E7uTh",extrasMeta:"token-saver_extrasMeta__VHRl_",chips:"token-saver_chips__tXaAY",chip:"token-saver_chip__n9SqO",chipNote:"token-saver_chipNote__urLM1",uninstall:"token-saver_uninstall__oAeyS",extrasHelp:"token-saver_extrasHelp__uU9VU",installCommand:"token-saver_installCommand__DWC4N",hintCode:"token-saver_hintCode__FXy2E",installLog:"token-saver_installLog__Aug__",notice:"token-saver_notice__YUKZQ",progressNote:"token-saver_progressNote__5mq8C",statusRow:"token-saver_statusRow__sBf3V",linkButton:"token-saver_linkButton__vEGct"}},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},22004:a=>{a.exports={page:"usage_page__TfrVH",header:"usage_header__Pj5rE",sectionHeader:"usage_sectionHeader__ikyc_",description:"usage_description___N7_0",sectionDescription:"usage_sectionDescription__hUHjE",controls:"usage_controls__BDy3z",section:"usage_section__Q1FLM",dimension:"usage_dimension__25vsJ",filterSelect:"usage_filterSelect__amqM_",gridMetrics:"usage_gridMetrics__9oDcY",gridSplit:"usage_gridSplit__wz4rx",gridHalves:"usage_gridHalves__WbK2e",metric:"usage_metric__yHVf7",metricHead:"usage_metricHead__kAXr7",metricValue:"usage_metricValue__sJtV9",metricMeta:"usage_metricMeta__1cxTN",tableWrap:"usage_tableWrap__E0Juz",recentRequests:"usage_recentRequests__X3JVv",recentRequestsScroll:"usage_recentRequestsScroll__7dSK0",recentRequestsTable:"usage_recentRequestsTable__V5LMJ",recentRequestModel:"usage_recentRequestModel__A34Vd",table:"usage_table__nOZE_",sortable:"usage_sortable__vJl89",num:"usage_num__YYpAv",center:"usage_center__cPoHb",muted:"usage_muted__qSgnm",subtle:"usage_subtle__PDxKR",pending:"usage_pending__9txNi",total:"usage_total__bDiWP",empty:"usage_empty__fk44z",inset:"usage_inset__ua4iZ",insetHint:"usage_insetHint__kaPZI",insetCode:"usage_insetCode__s_Qk2",panelRow:"usage_panelRow__1yMBm",chartArea:"usage_chartArea__4tcwm",topology:"usage_topology__szXKT",codeBlock:"usage_codeBlock__4xHCm",collapsible:"usage_collapsible__pvjBb",collapsibleToggle:"usage_collapsibleToggle__4SxaT",collapsibleLabel:"usage_collapsibleLabel__UHyD3",collapsibleChevron:"usage_collapsibleChevron__bo1wQ",collapsibleChevronOpen:"usage_collapsibleChevronOpen__XPBdW",collapsibleBody:"usage_collapsibleBody__6tLPZ",fieldLabel:"usage_fieldLabel__QyUjE",detailGrid:"usage_detailGrid__o6iZ8"}},23548:a=>{a.exports={page:"endpoint_page__vZHIb",panel:"endpoint_panel__fWuDy",header:"endpoint_header__K0LDJ",description:"endpoint_description__a7ZK4",dialog:"endpoint_dialog__nv9TH",row:"endpoint_row__0qJCh",label:"endpoint_label__vtk1u",statusBadge:"endpoint_statusBadge__LECCE",statusWarning:"endpoint_statusWarning__K7IpG",statusError:"endpoint_statusError__CeNBO",field:"endpoint_field__pDkqU",endpointValue:"endpoint_endpointValue__pqS36",iconButton:"endpoint_iconButton__LMI_i",dangerButton:"endpoint_dangerButton__zSy_6",keyRow:"endpoint_keyRow__kiHrX",status:"endpoint_status__hHtLP",alert:"endpoint_alert__cHEww",warning:"endpoint_warning__5f9aV",success:"endpoint_success__9ZYAB",error:"endpoint_error__WyDtQ",info:"endpoint_info__Tw6zj",settingsRow:"endpoint_settingsRow__MBLvY",keyDetails:"endpoint_keyDetails__U2vBF",keyName:"endpoint_keyName__TLg8o",keyCredential:"endpoint_keyCredential__MoMsr",keyValue:"endpoint_keyValue__ZPpnv",keyActions:"endpoint_keyActions__xsIoj",tooltip:"endpoint_tooltip__STh9w",keyMeta:"endpoint_keyMeta__0D6K4"}},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30083:a=>{a.exports={dialog:"DashboardControls_dialog__YyPS4",formScope:"DashboardControls_formScope__ID02o",fields:"DashboardControls_fields__IY485",iconButton:"DashboardControls_iconButton__v_EJw",modelPicker:"DashboardControls_modelPicker__BheYV DashboardControls_dialog__YyPS4"}},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},48161:a=>{"use strict";a.exports=require("node:os")},50047:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/root/workspace/JRouter/src/app/(dashboard)/dashboard/profile/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/root/workspace/JRouter/src/app/(dashboard)/dashboard/profile/page.js","default")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},56878:(a,b,c)=>{var d=c(22004),e=c(30083);a.exports={page:"skills_page__BcOXn "+d.page+" "+e.formScope,header:"skills_header__B0vSK "+d.header,description:"skills_description__cVcfA "+d.description,section:"skills_section__HcGBd "+d.section,sectionHeader:"skills_sectionHeader__Po5WD "+d.sectionHeader,sectionDescription:"skills_sectionDescription__B36_K "+d.sectionDescription,hint:"skills_hint__e9ECF",command:"skills_command__2tMeb",rows:"skills_rows__Zf9N_",row:"skills_row__DbV7C",identity:"skills_identity__XRZ9Z",icon:"skills_icon__d_qRC",titleLine:"skills_titleLine__vDBuc",title:"skills_title__RWwN8",endpoint:"skills_endpoint__GrxIx",metadata:"skills_metadata__NYKys",url:"skills_url__13nhN",urlText:"skills_urlText__HNFGe",actions:"skills_actions__bY309",linkButton:"skills_linkButton__mVXTi"}},57075:a=>{"use strict";a.exports=require("node:stream")},57518:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>s});var d=c(48249),e=c(21707),f=c(67484),g=c(50412),h=c(95145),i=c(267),j=c(42118),k=c(12020),l=c(51126);let m={en:"\uD83C\uDDFA\uD83C\uDDF8",vi:"\uD83C\uDDFB\uD83C\uDDF3","zh-CN":"\uD83C\uDDE8\uD83C\uDDF3","zh-TW":"\uD83C\uDDF9\uD83C\uDDFC",ja:"\uD83C\uDDEF\uD83C\uDDF5","pt-BR":"\uD83C\uDDE7\uD83C\uDDF7","pt-PT":"\uD83C\uDDF5\uD83C\uDDF9",ko:"\uD83C\uDDF0\uD83C\uDDF7",es:"\uD83C\uDDEA\uD83C\uDDF8",de:"\uD83C\uDDE9\uD83C\uDDEA",fr:"\uD83C\uDDEB\uD83C\uDDF7",he:"\uD83C\uDDEE\uD83C\uDDF1",ar:"\uD83C\uDDF8\uD83C\uDDE6",ru:"\uD83C\uDDF7\uD83C\uDDFA",pl:"\uD83C\uDDF5\uD83C\uDDF1",cs:"\uD83C\uDDE8\uD83C\uDDFF",nl:"\uD83C\uDDF3\uD83C\uDDF1",tr:"\uD83C\uDDF9\uD83C\uDDF7",uk:"\uD83C\uDDFA\uD83C\uDDE6",tl:"\uD83C\uDDF5\uD83C\uDDED",id:"\uD83C\uDDEE\uD83C\uDDE9",th:"\uD83C\uDDF9\uD83C\uDDED",km:"\uD83C\uDDF0\uD83C\uDDED",hi:"\uD83C\uDDEE\uD83C\uDDF3",bn:"\uD83C\uDDE7\uD83C\uDDE9",ur:"\uD83C\uDDF5\uD83C\uDDF0",ro:"\uD83C\uDDF7\uD83C\uDDF4",sv:"\uD83C\uDDF8\uD83C\uDDEA",it:"\uD83C\uDDEE\uD83C\uDDF9",el:"\uD83C\uDDEC\uD83C\uDDF7",hu:"\uD83C\uDDED\uD83C\uDDFA",fi:"\uD83C\uDDEB\uD83C\uDDEE",da:"\uD83C\uDDE9\uD83C\uDDF0",no:"\uD83C\uDDF3\uD83C\uDDF4",fa:"\uD83C\uDDEE\uD83C\uDDF7"};var n=c(5114),o=c.n(n);function p({id:a,title:b,icon:c,description:f,children:h}){return(0,d.jsx)("section",{"aria-labelledby":a,children:(0,d.jsxs)(g.Zp,{padding:"none",className:o().section,children:[(0,d.jsx)("div",{className:o().sectionHeader,children:(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("h2",{id:a,className:"ui-eyebrow",children:[(0,d.jsx)(e.default,{className:"text-[16px]","aria-hidden":"true",children:c}),b]}),f&&(0,d.jsx)("p",{className:o().sectionDescription,children:f})]})}),h]})})}function q({status:a}){return a.message?(0,d.jsxs)("p",{className:o().status,"data-status":a.type,role:"error"===a.type?"alert":"status",children:[(0,d.jsx)(e.default,{className:"shrink-0 text-[14px]","aria-hidden":"true",children:"error"===a.type?"error":"check_circle"}),a.message]}):null}function r(){return(0,d.jsx)("header",{className:o().header,children:(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("h1",{className:"ui-eyebrow",children:[(0,d.jsx)(e.default,{className:"text-[16px]","aria-hidden":"true",children:"person"}),"Profile"]}),(0,d.jsx)("p",{className:o().description,children:"Preferences, security, and settings for your JRouter instance."})]})})}function s(){let{theme:a,setTheme:b}=(0,j.D)(),[c,n]=(0,f.useState)(()=>(function(){if("u"<typeof document)return"en";let a=document.cookie.split(";").find(a=>a.trim().startsWith(`${l.CL}=`)),b=a?decodeURIComponent(a.split("=")[1]):"en";return(0,l.QC)(b)})()),[s,t]=(0,f.useState)(!1),[u,v]=(0,f.useState)(!1),[w,x]=(0,f.useState)(!1),[y,z]=(0,f.useState)({fallbackStrategy:"fill-first"}),[A,B]=(0,f.useState)(!0),[C,D]=(0,f.useState)(""),[E,F]=(0,f.useState)({current:"",new:"",confirm:""}),[G,H]=(0,f.useState)({type:"",message:""}),[I,J]=(0,f.useState)(!1),[K,L]=(0,f.useState)(!1),[M,N]=(0,f.useState)({type:"",message:""}),[O,P]=(0,f.useState)({open:!1,mode:"",password:""}),Q=(0,f.useRef)(null),[R,S]=(0,f.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[T,U]=(0,f.useState)(""),[V,W]=(0,f.useState)({type:"",message:""}),[X,Y]=(0,f.useState)(!1),[Z,$]=(0,f.useState)(!1),[_,aa]=(0,f.useState)({type:"",message:""}),[ab,ac]=(0,f.useState)(!1),ad="/api/auth/saml/acs",ae="/api/auth/saml/metadata",[af,ag]=(0,f.useState)("saml"),[ah,ai]=(0,f.useState)({samlEntryPoint:"",samlIssuer:"urn:9router:sp",samlCert:"",samlLoginLabel:"Sign in with SAML SSO",samlAttributeEmail:"email",samlAttributeName:"name"}),[aj,ak]=(0,f.useState)({type:"",message:""}),[al,am]=(0,f.useState)(!1),[an,ao]=(0,f.useState)(!1),[ap,aq]=(0,f.useState)({type:"",message:""}),[ar,as]=(0,f.useState)(!1),at=(0,f.useRef)(null),au=(0,f.useRef)(null),av=(0,f.useRef)(null),[aw,ax]=(0,f.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[ay,az]=(0,f.useState)({type:"",message:""}),[aA,aB]=(0,f.useState)(!1),[aC,aD]=(0,f.useState)(!1),[aE,aF]=(0,f.useState)(!1),aG=(0,f.useCallback)(()=>{fetch("/api/settings").then(a=>{if(!a.ok)throw Error("Failed to load settings");return a.json()}).then(a=>{z(a),S({authMode:a?.authMode||"password",oidcIssuerUrl:a?.oidcIssuerUrl||"",oidcClientId:a?.oidcClientId||"",oidcScopes:a?.oidcScopes||"openid profile email",oidcLoginLabel:a?.oidcLoginLabel||"Sign in with OIDC"}),U(""),ag(a?.ssoType||"saml"),ai({samlEntryPoint:a?.samlEntryPoint||"",samlIssuer:a?.samlIssuer||"urn:9router:sp",samlCert:a?.samlCert||"",samlLoginLabel:a?.samlLoginLabel||"Sign in with SAML SSO",samlAttributeEmail:a?.samlAttributeEmail||"email",samlAttributeName:a?.samlAttributeName||"name"}),(a?.authMode==="sso"||a?.authMode==="saml"||a?.authMode==="oidc"||a?.authMode==="both")&&ac(!0),ax({outboundProxyEnabled:a?.outboundProxyEnabled===!0,outboundProxyUrl:a?.outboundProxyUrl||"",outboundNoProxy:a?.outboundNoProxy||""}),B(!1)}).catch(a=>{console.error("Failed to fetch settings:",a),D("Could not load your instance settings. Try again."),B(!1)})},[]),aH=async a=>{if(a.preventDefault(),!0===y.outboundProxyEnabled){aB(!0),az({type:"",message:""});try{let a=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:aw.outboundProxyUrl,outboundNoProxy:aw.outboundNoProxy})}),b=await a.json();a.ok?(z(a=>({...a,...b})),az({type:"success",message:"Proxy settings applied"})):az({type:"error",message:b.error||"Failed to update proxy settings"})}catch(a){az({type:"error",message:"An error occurred"})}finally{aB(!1)}}},aI=async()=>{if(!0!==y.outboundProxyEnabled)return;let a=(aw.outboundProxyUrl||"").trim();if(!a)return void az({type:"error",message:"Please enter a Proxy URL to test"});aD(!0),az({type:"",message:""});try{let b=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:a})}),c=await b.json();b.ok&&c?.ok?az({type:"success",message:`Proxy test OK (${c.status}) in ${c.elapsedMs}ms`}):az({type:"error",message:c?.error||"Proxy test failed"})}catch(a){az({type:"error",message:"An error occurred"})}finally{aD(!1)}},aJ=async a=>{aB(!0),az({type:"",message:""});try{let b=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:a})}),c=await b.json();b.ok?(z(a=>({...a,...c})),ax(a=>({...a,outboundProxyEnabled:c?.outboundProxyEnabled===!0})),az({type:"success",message:a?"Proxy enabled":"Proxy disabled"})):az({type:"error",message:c.error||"Failed to update proxy settings"})}catch(a){az({type:"error",message:"An error occurred"})}finally{aB(!1)}},aK=async a=>{if(a.preventDefault(),E.new!==E.confirm)return void H({type:"error",message:"Passwords do not match"});J(!0),H({type:"",message:""});try{let a=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:E.current,newPassword:E.new})}),b=await a.json();a.ok?(H({type:"success",message:"Password updated successfully"}),F({current:"",new:"",confirm:""})):H({type:"error",message:b.error||"Failed to update password"})}catch(a){H({type:"error",message:"An error occurred"})}finally{J(!1)}},aL=async a=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:a})})).ok&&z(b=>({...b,fallbackStrategy:a}))}catch(a){console.error("Failed to update settings:",a)}},aM=async a=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:a})})).ok&&z(b=>({...b,comboStrategy:a}))}catch(a){console.error("Failed to update combo strategy:",a)}},aN=async a=>{let b=parseInt(a);if(!isNaN(b)&&!(b<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:b})})).ok&&z(a=>({...a,stickyRoundRobinLimit:b}))}catch(a){console.error("Failed to update sticky limit:",a)}},aO=async a=>{let b=parseInt(a);if(!isNaN(b)&&!(b<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:b})})).ok&&z(a=>({...a,comboStickyRoundRobinLimit:b}))}catch(a){console.error("Failed to update combo sticky limit:",a)}},aP=async a=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:a})})).ok&&z(b=>({...b,requireLogin:a}))}catch(a){console.error("Failed to update require login:",a)}},aQ=(a,b)=>{S(c=>({...c,[a]:b}))},aR=async(a=R.authMode||"password")=>{let b=R.oidcIssuerUrl.trim(),c=R.oidcClientId.trim(),d=R.oidcScopes.trim(),e=R.oidcLoginLabel.trim(),f=T.trim();if("password"!==a&&(!b||!c||!f)&&!y.oidcConfigured)return void W({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});Y(!0),W({type:"",message:""}),aa({type:"",message:""});try{let g={authMode:a,ssoType:"oidc",oidcIssuerUrl:b,oidcClientId:c,oidcScopes:d||"openid profile email",oidcLoginLabel:e||"Sign in with OIDC"};f&&(g.oidcClientSecret=f);let h=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}),i=await h.json();h.ok?(z(a=>({...a,...i})),S({authMode:i?.authMode||a,oidcIssuerUrl:i?.oidcIssuerUrl||b,oidcClientId:i?.oidcClientId||c,oidcScopes:i?.oidcScopes||d||"openid profile email",oidcLoginLabel:i?.oidcLoginLabel||e||"Sign in with OIDC"}),U(""),W({type:"success",message:"oidc"===a?"OIDC login enabled":"both"===a?"Password and OIDC login enabled":"OIDC settings saved"})):W({type:"error",message:i.error||"Failed to save OIDC settings"})}catch(a){W({type:"error",message:"An error occurred"})}finally{Y(!1)}},aS=async()=>{let a=R.oidcIssuerUrl.trim(),b=R.oidcClientId.trim(),c=R.oidcScopes.trim(),d=T.trim();if(!a||!b)return void aa({type:"error",message:"Issuer URL and client ID are required to test the connection."});$(!0),W({type:"",message:""}),aa({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:R.authMode||y.authMode||"password",oidcIssuerUrl:a,oidcClientId:b,oidcScopes:c||"openid profile email",oidcLoginLabel:R.oidcLoginLabel.trim()||"Sign in with OIDC",...d?{oidcClientSecret:d}:{}})}),f=await e.json().catch(()=>({}));if(!e.ok)return void aa({type:"error",message:f.error||"Failed to save OIDC settings before testing"});let g=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:f.oidcIssuerUrl||a,clientId:f.oidcClientId||b,scopes:f.oidcScopes||c||"openid profile email"})}),h=await g.json().catch(()=>({}));if(g.ok&&h?.ok){let a=h.clientSecretTested?!0===h.clientSecretValid?`Connection OK. Discovery loaded from ${h.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${h.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${h.issuerUrl}.`;aa({type:"success",message:a})}else aa({type:"error",message:h.error||"OIDC connection test failed"})}catch(a){aa({type:"error",message:"An error occurred"})}finally{$(!1)}},aT=(a,b)=>{ai(c=>({...c,[a]:b}))},aU=async(a=R.authMode||"password")=>{am(!0),ak({type:"",message:""}),aq({type:"",message:""});try{let b={authMode:a,ssoType:"saml",samlEntryPoint:ah.samlEntryPoint.trim(),samlIssuer:ah.samlIssuer.trim()||"urn:9router:sp",samlCert:ah.samlCert.trim(),samlLoginLabel:ah.samlLoginLabel.trim()||"Sign in with SAML SSO",samlAttributeEmail:ah.samlAttributeEmail.trim()||"email",samlAttributeName:ah.samlAttributeName.trim()||"name"},c=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)}),d=await c.json();c.ok?(z(a=>({...a,...d})),ai({samlEntryPoint:d?.samlEntryPoint||b.samlEntryPoint,samlIssuer:d?.samlIssuer||b.samlIssuer,samlCert:d?.samlCert||b.samlCert,samlLoginLabel:d?.samlLoginLabel||b.samlLoginLabel,samlAttributeEmail:d?.samlAttributeEmail||b.samlAttributeEmail,samlAttributeName:d?.samlAttributeName||b.samlAttributeName}),ak({type:"success",message:"sso"===a||"saml"===a?"SAML SSO login enabled":"both"===a?"Password and SAML SSO login enabled":"SAML 2.0 settings saved"})):ak({type:"error",message:d.error||"Failed to save SAML settings"})}catch{ak({type:"error",message:"An error occurred while saving SAML settings"})}finally{am(!1)}},aV=async()=>{ao(!0),ak({type:"",message:""}),aq({type:"",message:""});try{let a=await fetch("/api/auth/saml/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({samlEntryPoint:ah.samlEntryPoint.trim(),samlIssuer:ah.samlIssuer.trim(),samlCert:ah.samlCert.trim()})}),b=await a.json();a.ok&&b.ok?aq({type:"success",message:b.message||"SAML configuration verified!"}):aq({type:"error",message:b.error||"SAML configuration test failed"})}catch{aq({type:"error",message:"An error occurred while testing SAML configuration"})}finally{ao(!1)}},aW=async a=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:a})})).ok&&z(b=>({...b,enableObservability:a}))}catch(a){console.error("Failed to update enableObservability:",a)}},aX=async()=>{try{let a=await fetch("/api/settings");if(!a.ok)return;let b=await a.json();z(b)}catch(a){console.error("Failed to reload settings:",a)}},aY=async a=>{L(!0),N({type:"",message:""});try{let b=await fetch("/api/settings/database",{headers:{"x-9r-password":a}});if(!b.ok){let a=await b.json().catch(()=>({}));throw Error(a.error||"Failed to export database")}let c=await b.json(),d=JSON.stringify(c,null,2),e=new Blob([d],{type:"application/json"}),f=URL.createObjectURL(e),g=document.createElement("a"),h=new Date().toISOString().replace(/[.:]/g,"-");g.href=f,g.download=`9router-backup-${h}.json`,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(f),N({type:"success",message:"Database backup downloaded"})}catch(a){N({type:"error",message:a.message||"Failed to export database"})}finally{L(!1)}},aZ=async a=>{let b=Q.current;if(b){L(!0);try{let c=await b.text(),d=JSON.parse(c),e=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...d,password:a})}),f=await e.json().catch(()=>({}));if(!e.ok)throw Error(f.error||"Failed to import database");await aX(),N({type:"success",message:"Database imported successfully"})}catch(a){N({type:"error",message:a.message||"Invalid backup file"})}finally{Q.current=null,L(!1)}}},a$=async()=>{let{mode:a,password:b}=O;P({open:!1,mode:"",password:""}),"export"===a?await aY(b):"import"===a&&await aZ(b)},a_=!0===y.enableObservability,a0=async()=>{x(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(a){}x(!1),v(!1)},a1=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(a){console.error("Failed to logout:",a)}};return(0,d.jsxs)("div",{className:`dashboard-surface ${o().page}`,children:[(0,d.jsx)(r,{}),A?(0,d.jsxs)("div",{className:o().stack,"aria-busy":"true","aria-label":"Loading profile settings",children:[["Preferences","Security","Routing and network"].map(a=>(0,d.jsxs)(g.Zp,{padding:"none",className:o().section,children:[(0,d.jsx)(g.EA,{className:"mb-5 h-4 w-32"}),(0,d.jsxs)("div",{className:o().formGrid,children:[(0,d.jsx)(g.EA,{className:"h-10"}),(0,d.jsx)(g.EA,{className:"h-10"})]}),(0,d.jsx)(g.EA,{className:"mt-4 h-4 w-48 max-w-full"})]},a)),(0,d.jsx)("p",{className:o().description,role:"status",children:"Loading profile settings…"})]}):C?(0,d.jsxs)(g.Zp,{padding:"none",className:o().section,children:[(0,d.jsx)(q,{status:{type:"error",message:C}}),(0,d.jsx)(g.$n,{variant:"secondary",onClick:()=>{B(!0),D(""),aG()},className:"mt-3",icon:"refresh",children:"Retry"})]}):(0,d.jsxs)("div",{className:o().stack,children:[(0,d.jsxs)(p,{id:"profile-preferences",title:"Preferences & data",icon:"settings",description:"Display preferences and database backups.",children:[(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:o().settingTitle,children:"Appearance"}),(0,d.jsx)("p",{className:o().settingDescription,children:"Use a light, dark, or system theme."})]}),(0,d.jsx)(g.Iz,{"aria-label":"Appearance",value:a,onChange:b,options:[{value:"light",label:"Light",icon:"light_mode"},{value:"dark",label:"Dark",icon:"dark_mode"},{value:"system",label:"System",icon:"contrast"}]})]}),(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:o().settingTitle,children:"Display language"}),(0,d.jsx)("p",{className:o().settingDescription,children:"Choose the language used in the dashboard."})]}),(0,d.jsxs)(g.$n,{variant:"secondary",onClick:()=>t(!0),"aria-label":"Change display language","data-i18n-skip":"true",children:[(0,d.jsx)("span",{"aria-hidden":"true",children:m[c]||"\uD83C\uDF10"}),(0,d.jsx)("span",{children:c}),(0,d.jsx)(e.default,{className:"text-[14px]","aria-hidden":"true",children:"expand_more"})]})]}),(0,d.jsx)("div",{className:o().settingRow,children:(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:o().settingTitle,children:aE?"Remote Mode":"Local Mode"}),(0,d.jsx)("p",{className:o().settingDescription,children:aE?"Connected to a remote instance.":"Running on your machine."})]})}),(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:o().settingTitle,children:"Database Location"}),(0,d.jsx)("code",{className:o().settingDescription,children:"~/.9router/db/data.sqlite"})]}),(0,d.jsxs)("div",{className:o().actions,children:[(0,d.jsx)(g.$n,{variant:"secondary",icon:"download",onClick:()=>P({open:!0,mode:"export",password:""}),loading:K,className:"w-full sm:w-auto",children:"Download Backup"}),(0,d.jsx)(g.$n,{variant:"secondary",icon:"upload",onClick:()=>av.current?.click(),disabled:K,className:"w-full sm:w-auto",children:"Import Backup"}),(0,d.jsx)("input",{ref:av,type:"file",accept:"application/json,.json",className:"hidden",onChange:a=>{let b=a.target.files?.[0];av.current&&(av.current.value=""),b&&(Q.current=b,N({type:"",message:""}),P({open:!0,mode:"import",password:""}))}})]})]}),(0,d.jsx)(q,{status:M})]}),(0,d.jsx)(p,{id:"profile-security",title:"Security",icon:"shield",description:"Dashboard access and password management.",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,d.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,d.jsx)(g.lM,{"aria-label":"Require login",checked:!0===y.requireLogin,onChange:()=>aP(!y.requireLogin),disabled:A})]}),!0===y.requireLogin&&(0,d.jsxs)("form",{onSubmit:aK,className:o().form,children:[y.hasPassword&&(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Current Password",autoComplete:"current-password",type:"password",placeholder:"Enter current password",value:E.current,onChange:a=>F({...E,current:a.target.value}),required:!0})}),(0,d.jsxs)("div",{className:o().formGrid,children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"New Password",autoComplete:"new-password",type:"password",placeholder:"Enter new password",value:E.new,onChange:a=>F({...E,new:a.target.value}),required:!0})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Confirm New Password",autoComplete:"new-password",type:"password",placeholder:"Confirm new password",value:E.confirm,onChange:a=>F({...E,confirm:a.target.value}),required:!0})})]}),(0,d.jsx)(q,{status:G}),(0,d.jsx)("div",{className:"pt-2",children:(0,d.jsx)(g.$n,{type:"submit",variant:"contrast",loading:I,className:"w-full sm:w-auto",children:y.hasPassword?"Update Password":"Set Password"})})]})]})}),(0,d.jsx)("section",{"aria-labelledby":"profile-sso",children:(0,d.jsxs)(g.Zp,{padding:"none",className:o().section,children:[(0,d.jsxs)("button",{type:"button",onClick:()=>ac(a=>!a),className:o().disclosure,"aria-expanded":ab,"aria-controls":"profile-sso-settings",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsxs)("h2",{id:"profile-sso",className:"ui-eyebrow",children:[(0,d.jsx)(e.default,{className:"text-[16px]","aria-hidden":"true",children:"lock_open"}),"Single Sign-On (SSO)"]}),(0,d.jsx)("p",{className:o().sectionDescription,children:"sso"===y.authMode||"oidc"===y.authMode||"saml"===y.authMode?`${"saml"===y.ssoType?"SAML 2.0":"OIDC"} SSO active`:"both"===y.authMode?`Password + ${"saml"===y.ssoType?"SAML 2.0":"OIDC"} active`:"Optional SSO via Okta, Entra ID, Keycloak, or OIDC"})]}),(0,d.jsx)(e.default,{className:"text-text-muted shrink-0",children:ab?"expand_less":"expand_more"})]}),ab&&(0,d.jsxs)("div",{id:"profile-sso-settings",className:o().ssoForm,children:[(0,d.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Configure enterprise Single Sign-On (SSO) for dashboard access using SAML 2.0 or OIDC."}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("p",{className:o().fieldLabel,children:"SSO Protocol"}),(0,d.jsx)(g.Iz,{"aria-label":"SSO Protocol",value:af,onChange:ag,options:[{value:"saml",label:"SAML 2.0"},{value:"oidc",label:"OIDC"}],className:"self-start"})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("p",{className:o().fieldLabel,children:"Auth Mode"}),(0,d.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep legacy password login."},{value:"sso",title:`${"saml"===af?"SAML":"OIDC"} only`,desc:"Require SSO for dashboard access."},{value:"both",title:"Both",desc:"Allow password or SSO login."}].map(a=>{let b=R.authMode,c="password"===a.value?"password"===b:"sso"===a.value?"sso"===b||"saml"===b||"oidc"===b:"both"===b;return(0,d.jsxs)(g.$n,{type:"button",onClick:()=>aQ("authMode",a.value),variant:"outline",className:o().choice,"aria-pressed":c,disabled:A||X||al,children:[(0,d.jsx)("span",{className:o().settingTitle,children:a.title}),(0,d.jsx)("span",{className:o().settingDescription,children:a.desc})]},a.value)})})]}),"saml"===af?(0,d.jsxs)("div",{className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,d.jsxs)("div",{className:o().inset,children:[(0,d.jsxs)("button",{type:"button",onClick:()=>as(a=>!a),className:o().disclosure,"aria-expanded":ar,"aria-controls":"profile-saml-guide",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(e.default,{className:"text-text-muted text-lg","aria-hidden":"true",children:"menu_book"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-semibold text-xs sm:text-sm text-text-main",children:"IdP Setup Guidelines & Provider Configuration Instructions"}),(0,d.jsx)("p",{className:"text-[11px] text-text-muted",children:"Click to view setup steps for AWS IAM Identity Center, Okta, Entra ID, Keycloak, & Authentik"})]})]}),(0,d.jsx)(e.default,{className:"text-text-muted transition-transform text-lg",style:{transform:ar?"rotate(180deg)":"none"},children:"expand_more"})]}),ar&&(0,d.jsxs)("div",{id:"profile-saml-guide",className:o().guide,children:[(0,d.jsxs)("div",{className:o().inset,children:[(0,d.jsx)("p",{className:"font-semibold mb-1",children:"Required Service Provider (SP) Values for your IdP Setup:"}),(0,d.jsxs)("ul",{className:"list-disc pl-4 space-y-1 font-mono text-[11px]",children:[(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Assertion Consumer Service (ACS) URL:"})," ",(0,d.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded break-all",children:ad})]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"SP Entity ID / Audience URI:"})," ",(0,d.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded break-all",children:ah.samlIssuer||"urn:9router:sp"})]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"NameID Format:"})," ",(0,d.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded",children:"EmailAddress"})," or ",(0,d.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded",children:"Unspecified"})]})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 pt-1",children:[(0,d.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,d.jsx)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:"AWS IAM Identity Center"}),(0,d.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,d.jsxs)("li",{children:["Applications → ",(0,d.jsx)("b",{children:"Add application"})," → Select ",(0,d.jsx)("b",{children:"Add custom SAML 2.0 application"}),"."]}),(0,d.jsxs)("li",{children:["Set ",(0,d.jsx)("b",{children:"Application ACS URL"})," to ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ad}),"."]}),(0,d.jsxs)("li",{children:["Set ",(0,d.jsx)("b",{children:"Application SAML audience"})," to ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ah.samlIssuer||"urn:9router:sp"}),"."]}),(0,d.jsxs)("li",{children:["Under ",(0,d.jsx)("i",{children:"Attribute mappings"}),", map ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:"Subject"})," or ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:"email"})," to ",(0,d.jsxs)("code",{className:"text-text-main font-mono",children:["$","{user:email}"]}),"."]}),(0,d.jsxs)("li",{children:["Download ",(0,d.jsx)("b",{children:"IAM Identity Center SAML metadata XML"})," file and use 1-Click Import below!"]})]})]}),(0,d.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,d.jsx)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:"Microsoft Entra ID (Azure AD)"}),(0,d.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,d.jsxs)("li",{children:["Enterprise Applications → ",(0,d.jsx)("b",{children:"New application"})," → ",(0,d.jsx)("b",{children:"Create your own application"}),"."]}),(0,d.jsxs)("li",{children:["Select ",(0,d.jsx)("b",{children:"Single sign-on"})," → ",(0,d.jsx)("b",{children:"SAML"}),"."]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Identifier (Entity ID):"})," ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ah.samlIssuer||"urn:9router:sp"})]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Reply URL (ACS):"})," ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ad})]}),(0,d.jsxs)("li",{children:["Download ",(0,d.jsx)("b",{children:"Federation Metadata XML"})," and import or copy X.509 Certificate."]})]})]}),(0,d.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,d.jsx)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:"Okta / Auth0"}),(0,d.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,d.jsxs)("li",{children:["Applications → ",(0,d.jsx)("b",{children:"Create App Integration"})," → Select ",(0,d.jsx)("b",{children:"SAML 2.0"}),"."]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Single Sign-On URL:"})," ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ad})]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Audience URI (SP Entity ID):"})," ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ah.samlIssuer||"urn:9router:sp"})]}),(0,d.jsxs)("li",{children:["Name ID format: ",(0,d.jsx)("i",{children:"EmailAddress"}),"."]}),(0,d.jsx)("li",{children:"Download Identity Provider metadata XML or copy the X.509 cert."})]})]}),(0,d.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,d.jsx)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:"Keycloak / Authentik"}),(0,d.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,d.jsxs)("li",{children:["Clients → ",(0,d.jsx)("b",{children:"Create client"})," → Select ",(0,d.jsx)("b",{children:"SAML"}),"."]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Client ID:"})," ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ah.samlIssuer||"urn:9router:sp"})]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Master SAML Processing URL:"})," ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ad})]}),(0,d.jsx)("li",{children:"Export SAML Descriptor XML or copy IDP Certificate PEM."})]})]})]})]})]}),(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium text-sm text-text-main",children:"1-Click IdP Metadata XML Import"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Auto-fill SSO URL, Issuer & Cert from XML metadata"})]}),(0,d.jsx)(g.$n,{type:"button",variant:"outline",size:"sm",icon:"upload_file",onClick:()=>at.current?.click(),children:"Upload Metadata XML"}),(0,d.jsx)("input",{ref:at,type:"file",accept:".xml,application/xml,text/xml",className:"hidden",onChange:a=>{let b=a.target.files?.[0];if(at.current&&(at.current.value=""),!b)return;let c=new FileReader;c.onload=a=>{try{let b=a.target?.result||"",c=new DOMParser().parseFromString(b,"text/xml");if(c.querySelector("parsererror"))return void ak({type:"error",message:"Unable to parse valid SAML IdP metadata from XML file"});let d=c.documentElement.getAttribute("entityID")||"",e=Array.from(c.querySelectorAll("SingleSignOnService, *|SingleSignOnService")),f="";for(let a of e){let b=a.getAttribute("Binding")||"",c=a.getAttribute("Location")||"";if(c&&(f=c,b.includes("HTTP-Redirect")))break}let g=Array.from(c.querySelectorAll("X509Certificate, *|X509Certificate")),h="";g.length>0&&(h=g[0].textContent.trim()),ai(a=>({...a,samlEntryPoint:f||a.samlEntryPoint,samlIssuer:a.samlIssuer||"urn:9router:sp",samlCert:h||a.samlCert})),ak({type:"success",message:`IdP Metadata imported! (SSO URL: ${f?"found":"not found"}, EntityID: ${d?"found":"not found"}, Cert: ${h?"found":"not found"})`})}catch(a){ak({type:"error",message:"Error reading IdP Metadata XML file"})}},c.readAsText(b)}})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Single Sign-On Service URL (samlEntryPoint)",placeholder:"https://idp.example.com/app/saml/sso/...",value:ah.samlEntryPoint,onChange:a=>aT("samlEntryPoint",a.target.value),disabled:A||al})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"SP Entity ID / Audience (samlIssuer)",placeholder:"urn:9router:sp",value:ah.samlIssuer,onChange:a=>aT("samlIssuer",a.target.value),disabled:A||al})}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:o().actions,children:[(0,d.jsx)("label",{htmlFor:"profile-saml-cert",className:o().fieldLabel,children:"IdP X.509 Certificate (samlCert)"}),(0,d.jsx)(g.$n,{type:"button",variant:"outline",size:"sm",icon:"file_upload",onClick:()=>au.current?.click(),children:"Upload Certificate"}),(0,d.jsx)("input",{ref:au,type:"file",accept:".crt,.pem,.cer,text/plain",className:"hidden",onChange:a=>{let b=a.target.files?.[0];if(au.current&&(au.current.value=""),!b)return;let c=new FileReader;c.onload=a=>{let b=a.target?.result||"";ai(a=>({...a,samlCert:b.trim()})),ak({type:"success",message:"Certificate file loaded into configuration."})},c.readAsText(b)}})]}),(0,d.jsx)("textarea",{id:"profile-saml-cert","aria-describedby":"profile-saml-cert-hint",rows:4,placeholder:"-----BEGIN CERTIFICATE-----\nMIIC...\n-----END CERTIFICATE-----",value:ah.samlCert,onChange:a=>aT("samlCert",a.target.value),className:"w-full font-mono resize-y",disabled:A||al}),(0,d.jsx)("p",{id:"profile-saml-cert-hint",className:o().settingDescription,children:"Paste raw Base64 certificate or PEM block."})]}),(0,d.jsxs)("div",{className:o().formGrid,children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Login Button Label",placeholder:"Sign in with SAML SSO",value:ah.samlLoginLabel,onChange:a=>aT("samlLoginLabel",a.target.value),disabled:A||al})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Email Claim Attribute",placeholder:"email",value:ah.samlAttributeEmail,onChange:a=>aT("samlAttributeEmail",a.target.value),disabled:A||al})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Display Name Claim",placeholder:"name",value:ah.samlAttributeName,onChange:a=>aT("samlAttributeName",a.target.value),disabled:A||al})})]})]}),(0,d.jsxs)("div",{className:o().inset,children:[(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-text-main",children:"ACS Callback URL"}),(0,d.jsx)("code",{className:"block break-all font-mono text-xs",children:ad})]}),(0,d.jsx)(g.$n,{type:"button",variant:"outline",size:"sm",icon:"content_copy","aria-label":"Copy ACS Callback URL",onClick:()=>{navigator.clipboard.writeText(ad),ak({type:"success",message:"ACS URL copied to clipboard!"})},children:"Copy"})]}),(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-text-main",children:"SP XML Metadata"}),(0,d.jsx)("code",{className:"block break-all font-mono text-xs",children:ae})]}),(0,d.jsxs)("a",{href:ae,target:"_blank",rel:"noopener noreferrer",download:"9router-sp-metadata.xml",className:o().linkButton,children:[(0,d.jsx)(e.default,{className:"text-[16px]",children:"download"}),"Download XML"]})]})]}),(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,d.jsx)(g.$n,{type:"button",variant:"contrast",loading:al,onClick:()=>aU(R.authMode),className:"w-full sm:w-auto",children:"Save SAML settings"}),(0,d.jsx)(g.$n,{type:"button",variant:"outline",loading:an,onClick:aV,className:"w-full sm:w-auto",children:"Test SAML settings"})]}),(0,d.jsx)(q,{status:ap}),(0,d.jsx)(q,{status:aj})]}):(0,d.jsxs)("div",{className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,d.jsxs)("div",{className:o().formGrid,children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Issuer URL",placeholder:"https://auth.example.com/application/o/9router/",value:R.oidcIssuerUrl,onChange:a=>aQ("oidcIssuerUrl",a.target.value),disabled:A||X})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Client ID",placeholder:"9router-dashboard",value:R.oidcClientId,onChange:a=>aQ("oidcClientId",a.target.value),disabled:A||X})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Client Secret",hint:"This value is write-only after saving.",type:"password",placeholder:"Leave blank to keep existing secret",value:T,onChange:a=>U(a.target.value),disabled:A||X})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Scopes",placeholder:"openid profile email",value:R.oidcScopes,onChange:a=>aQ("oidcScopes",a.target.value),disabled:A||X})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Login Button Label",placeholder:"Sign in with OIDC",value:R.oidcLoginLabel,onChange:a=>aQ("oidcLoginLabel",a.target.value),disabled:A||X})})]}),(0,d.jsxs)("div",{className:o().inset,children:[(0,d.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,d.jsx)("code",{className:"block break-all font-mono",children:"/api/auth/oidc/callback"})]}),(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,d.jsx)(g.$n,{type:"button",variant:"contrast",loading:X,onClick:()=>aR(),className:"w-full sm:w-auto",children:"Save OIDC settings"}),(0,d.jsx)(g.$n,{type:"button",variant:"outline",loading:Z,onClick:aS,className:"w-full sm:w-auto",children:"Test connection"})]}),(0,d.jsx)(q,{status:_}),(0,d.jsx)(q,{status:V})]}),"oidc"===y.authMode||"saml"===y.authMode||"sso"===y.authMode?(0,d.jsxs)("p",{className:o().notice,role:"status",children:["SSO login (","saml"===y.ssoType?"SAML 2.0":"OIDC",") is currently active. Password login is disabled until you switch back."]}):null,"both"===y.authMode&&(0,d.jsxs)("p",{className:o().notice,role:"status",children:["Password and SSO login (","saml"===y.ssoType?"SAML 2.0":"OIDC",") are both active."]})]})]})}),(0,d.jsx)(p,{id:"profile-routing",title:"Routing Strategy",icon:"route",description:"Account and combo rotation preferences.",children:(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,d.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,d.jsx)(g.lM,{"aria-label":"Round Robin",checked:"round-robin"===y.fallbackStrategy,onChange:()=>aL("round-robin"===y.fallbackStrategy?"fill-first":"round-robin"),disabled:A})]}),"round-robin"===y.fallbackStrategy&&(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,d.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,d.jsx)(g.pd,{"aria-label":"Sticky Limit",type:"number",min:"1",max:"10",value:y.stickyRoundRobinLimit||3,onChange:a=>aN(a.target.value),disabled:A,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,d.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,d.jsx)(g.lM,{"aria-label":"Combo Round Robin",checked:"round-robin"===y.comboStrategy,onChange:()=>aM("round-robin"===y.comboStrategy?"fallback":"round-robin"),disabled:A})]}),"round-robin"===y.comboStrategy&&(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,d.jsx)(g.pd,{"aria-label":"Combo Sticky Limit",type:"number",min:"1",max:"100",value:y.comboStickyRoundRobinLimit||1,onChange:a=>aO(a.target.value),disabled:A,className:"w-20 text-center"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===y.fallbackStrategy?`Currently distributing requests across all available accounts with ${y.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===y.comboStrategy?` Combos rotate after ${y.comboStickyRoundRobinLimit||1} call${1===(y.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})}),(0,d.jsx)(p,{id:"profile-network",title:"Network",icon:"wifi",description:"Outbound connections for OAuth and provider requests.",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,d.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,d.jsx)(g.lM,{"aria-label":"Outbound Proxy",checked:!0===y.outboundProxyEnabled,onChange:()=>aJ(!0!==y.outboundProxyEnabled),disabled:A||aA})]}),!0===y.outboundProxyEnabled&&(0,d.jsxs)("form",{onSubmit:aH,className:o().form,children:[(0,d.jsxs)("div",{className:o().formGrid,children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Proxy URL",hint:"Leave empty to inherit existing env proxy (if any).",placeholder:"http://127.0.0.1:7897",value:aw.outboundProxyUrl,onChange:a=>ax(b=>({...b,outboundProxyUrl:a.target.value})),disabled:A||aA})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"No Proxy",hint:"Comma-separated hostnames/domains to bypass the proxy.",placeholder:"localhost,127.0.0.1",value:aw.outboundNoProxy,onChange:a=>ax(b=>({...b,outboundNoProxy:a.target.value})),disabled:A||aA})})]}),(0,d.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,d.jsx)(g.$n,{type:"button",variant:"secondary",loading:aC,disabled:A||aA,onClick:aI,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,d.jsx)(g.$n,{type:"submit",variant:"contrast",loading:aA,className:"w-full sm:w-auto",children:"Apply"})]})]}),(0,d.jsx)(q,{status:ay})]})}),(0,d.jsx)(p,{id:"profile-observability",title:"Observability",icon:"monitoring",children:(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,d.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,d.jsx)(g.lM,{"aria-label":"Enable Observability",checked:a_,onChange:aW,disabled:A})]})}),(0,d.jsxs)(p,{id:"profile-session",title:"Session & server",icon:"logout",children:[(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:o().settingTitle,children:"Dashboard session"}),(0,d.jsx)("p",{className:o().settingDescription,children:"Sign out of the dashboard."})]}),(0,d.jsx)(g.$n,{variant:"secondary",icon:"logout",onClick:a1,children:"Logout"})]}),(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:o().settingTitle,children:"Stop proxy server"}),(0,d.jsx)("p",{className:o().settingDescription,children:"Shut down this JRouter instance."})]}),(0,d.jsx)(g.$n,{variant:"danger",icon:"power_settings_new",onClick:()=>v(!0),className:o().dangerButton,children:"Shutdown"})]})]}),(0,d.jsxs)("div",{className:o().appInfo,children:[(0,d.jsxs)("p",{children:[k.vQ.name," v",k.vQ.version]}),(0,d.jsx)("p",{className:"mt-1",children:aE?"Remote Mode":"Local Mode - All data stored on your machine"})]})]}),(0,d.jsx)(i.default,{dialogClassName:o().languageDialog,hideTrigger:!0,isOpen:s,onClose:a=>{t(!1),n(a)}}),(0,d.jsx)(h.ConfirmModal,{className:o().dialog,isOpen:u,onClose:()=>v(!1),onConfirm:a0,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:w}),(0,d.jsxs)(h.default,{className:o().dialog,isOpen:O.open,onClose:()=>P({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.$n,{variant:"ghost",onClick:()=>P({open:!1,mode:"",password:""}),disabled:K,children:"Cancel"}),(0,d.jsx)(g.$n,{variant:"contrast",onClick:a$,loading:K,disabled:!O.password,children:"Confirm"})]}),children:[(0,d.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===O.mode?"export":"import"," the database."]}),(0,d.jsx)(g.pd,{label:"Current password",autoComplete:"current-password",type:"password",value:O.password,onChange:a=>P(b=>({...b,password:a.target.value})),onKeyDown:a=>{"Enter"===a.key&&O.password&&a$()},placeholder:"Current password",autoFocus:!0})]})]})}},57975:a=>{"use strict";a.exports=require("node:util")},59965:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>w,handler:()=>y,routeModule:()=>x});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,57529))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),u={children:["",{children:["(dashboard)",{children:["dashboard",{children:["profile",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,50047))),"/root/workspace/JRouter/src/app/(dashboard)/dashboard/profile/page.js"]}]},{"global-error":[t,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"/root/workspace/JRouter/src/app/(dashboard)/layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"/root/workspace/JRouter/src/app/layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,v=(0,e.H)({tree:u,page:"/(dashboard)/dashboard/profile/page",pathname:"/dashboard/profile",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),w=v.__next_app__,x=v.routeModule,y=v.handler},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},71622:a=>{"use strict";a.exports=import("open")},72271:a=>{"use strict";a.exports=require("@aws-sdk/credential-providers")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")},96902:(a,b,c)=>{Promise.resolve().then(c.bind(c,57518))}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1260,2430,1273,9415,379,4642,3192,6070,4864,6457,4123,455,6777,412,6698],()=>b(b.s=59965));module.exports=c})();
1
+ (()=>{var a={};a.id=3471,a.ids=[3471],a.modules={643:a=>{"use strict";a.exports=require("node:perf_hooks")},1708:a=>{"use strict";a.exports=require("node:process")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},4573:a=>{"use strict";a.exports=require("node:buffer")},5114:(a,b,c)=>{var d=c(12100),e=c(30083),f=c(22004),g=c(23548),h=c(56878);a.exports={page:"profile_page___tjyP "+d.page+" "+e.fields,header:"profile_header__IkyVh "+f.header,description:"profile_description__NXRzM "+f.description,section:"profile_section__UAY_s "+f.section,sectionHeader:"profile_sectionHeader___cLAs "+f.sectionHeader,sectionDescription:"profile_sectionDescription__ZbT8S "+f.sectionDescription,fieldLabel:"profile_fieldLabel__TDwV7 "+f.fieldLabel,inset:"profile_inset__DdQQ3 "+f.inset,dialog:"profile_dialog__vjXNZ "+e.dialog,dangerButton:"profile_dangerButton__gObBc "+g.dangerButton,linkButton:"profile_linkButton__Ohf76 "+h.linkButton,stack:"profile_stack__stIZ4",settingRow:"profile_settingRow__SqVZr "+g.settingsRow,settingTitle:"profile_settingTitle__c_bHF "+d.title,settingDescription:"profile_settingDescription__5HFh3 "+d.metadata,actions:"profile_actions__W0G3b",form:"profile_form__lLMlh",ssoForm:"profile_ssoForm__QKyCp",formGrid:"profile_formGrid__S7IE_",disclosure:"profile_disclosure__OXS9X",choice:"profile_choice__RAEhZ",guide:"profile_guide__Yl3qV",status:"profile_status__dFw2G",notice:"profile_notice__z5zKe",appInfo:"profile_appInfo__zIFC1",languageDialog:"profile_languageDialog__4pCcf "+e.dialog}},5150:(a,b,c)=>{Promise.resolve().then(c.bind(c,50047))},7066:a=>{"use strict";a.exports=require("node:tty")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12100:(a,b,c)=>{var d=c(22004),e=c(30083);a.exports={page:"token-saver_page__79V8u "+d.page+" "+e.formScope,header:"token-saver_header__Qk3iN "+d.header,description:"token-saver_description__WdRoO "+d.description,section:"token-saver_section__UHCch "+d.section,sectionHeader:"token-saver_sectionHeader__s_oJS "+d.sectionHeader,sectionDescription:"token-saver_sectionDescription__JPhfC "+d.sectionDescription,dialog:"token-saver_dialog___IKgp "+e.dialog,inset:"token-saver_inset__biEJH "+d.inset,fieldLabel:"token-saver_fieldLabel__0zEKO "+d.fieldLabel,summary:"token-saver_summary__WL02H",strategy:"token-saver_strategy__SOcTp",strategyHeader:"token-saver_strategyHeader__2JL_c",identity:"token-saver_identity__nhMJs",titleLine:"token-saver_titleLine__rRvzO",title:"token-saver_title__9opCy",docLink:"token-saver_docLink__Kfjx_",metadata:"token-saver_metadata__ktGrx",actions:"token-saver_actions__xqMmb",levels:"token-saver_levels__J1_s1",levelHint:"token-saver_levelHint__GXnJL",extras:"token-saver_extras__eedyn",extrasHeader:"token-saver_extrasHeader__E7uTh",extrasMeta:"token-saver_extrasMeta__VHRl_",chips:"token-saver_chips__tXaAY",chip:"token-saver_chip__n9SqO",chipNote:"token-saver_chipNote__urLM1",uninstall:"token-saver_uninstall__oAeyS",extrasHelp:"token-saver_extrasHelp__uU9VU",installCommand:"token-saver_installCommand__DWC4N",hintCode:"token-saver_hintCode__FXy2E",installLog:"token-saver_installLog__Aug__",notice:"token-saver_notice__YUKZQ",progressNote:"token-saver_progressNote__5mq8C",statusRow:"token-saver_statusRow__sBf3V",linkButton:"token-saver_linkButton__vEGct"}},14985:a=>{"use strict";a.exports=require("dns")},16698:a=>{"use strict";a.exports=require("node:async_hooks")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},22004:a=>{a.exports={page:"usage_page__TfrVH",header:"usage_header__Pj5rE",sectionHeader:"usage_sectionHeader__ikyc_",description:"usage_description___N7_0",sectionDescription:"usage_sectionDescription__hUHjE",controls:"usage_controls__BDy3z",section:"usage_section__Q1FLM",dimension:"usage_dimension__25vsJ",filterSelect:"usage_filterSelect__amqM_",gridMetrics:"usage_gridMetrics__9oDcY",gridSplit:"usage_gridSplit__wz4rx",gridHalves:"usage_gridHalves__WbK2e",metric:"usage_metric__yHVf7",metricHead:"usage_metricHead__kAXr7",metricValue:"usage_metricValue__sJtV9",metricMeta:"usage_metricMeta__1cxTN",tableWrap:"usage_tableWrap__E0Juz",recentRequests:"usage_recentRequests__X3JVv",recentRequestsScroll:"usage_recentRequestsScroll__7dSK0",recentRequestsTable:"usage_recentRequestsTable__V5LMJ",recentRequestModel:"usage_recentRequestModel__A34Vd",table:"usage_table__nOZE_",sortable:"usage_sortable__vJl89",num:"usage_num__YYpAv",center:"usage_center__cPoHb",muted:"usage_muted__qSgnm",subtle:"usage_subtle__PDxKR",pending:"usage_pending__9txNi",total:"usage_total__bDiWP",empty:"usage_empty__fk44z",inset:"usage_inset__ua4iZ",insetHint:"usage_insetHint__kaPZI",insetCode:"usage_insetCode__s_Qk2",panelRow:"usage_panelRow__1yMBm",chartArea:"usage_chartArea__4tcwm",topology:"usage_topology__szXKT",codeBlock:"usage_codeBlock__4xHCm",collapsible:"usage_collapsible__pvjBb",collapsibleToggle:"usage_collapsibleToggle__4SxaT",collapsibleLabel:"usage_collapsibleLabel__UHyD3",collapsibleChevron:"usage_collapsibleChevron__bo1wQ",collapsibleChevronOpen:"usage_collapsibleChevronOpen__XPBdW",collapsibleBody:"usage_collapsibleBody__6tLPZ",fieldLabel:"usage_fieldLabel__QyUjE",detailGrid:"usage_detailGrid__o6iZ8"}},23548:a=>{a.exports={page:"endpoint_page__vZHIb",panel:"endpoint_panel__fWuDy",header:"endpoint_header__K0LDJ",description:"endpoint_description__a7ZK4",dialog:"endpoint_dialog__nv9TH",row:"endpoint_row__0qJCh",label:"endpoint_label__vtk1u",statusBadge:"endpoint_statusBadge__LECCE",statusWarning:"endpoint_statusWarning__K7IpG",statusError:"endpoint_statusError__CeNBO",field:"endpoint_field__pDkqU",endpointValue:"endpoint_endpointValue__pqS36",iconButton:"endpoint_iconButton__LMI_i",dangerButton:"endpoint_dangerButton__zSy_6",keyRow:"endpoint_keyRow__kiHrX",status:"endpoint_status__hHtLP",alert:"endpoint_alert__cHEww",warning:"endpoint_warning__5f9aV",success:"endpoint_success__9ZYAB",error:"endpoint_error__WyDtQ",info:"endpoint_info__Tw6zj",settingsRow:"endpoint_settingsRow__MBLvY",keyDetails:"endpoint_keyDetails__U2vBF",keyName:"endpoint_keyName__TLg8o",keyCredential:"endpoint_keyCredential__MoMsr",keyValue:"endpoint_keyValue__ZPpnv",keyActions:"endpoint_keyActions__xsIoj",tooltip:"endpoint_tooltip__STh9w",keyMeta:"endpoint_keyMeta__0D6K4"}},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30083:a=>{a.exports={dialog:"DashboardControls_dialog__YyPS4",formScope:"DashboardControls_formScope__ID02o",fields:"DashboardControls_fields__IY485",iconButton:"DashboardControls_iconButton__v_EJw",modelPicker:"DashboardControls_modelPicker__BheYV DashboardControls_dialog__YyPS4"}},31421:a=>{"use strict";a.exports=require("node:child_process")},32467:a=>{"use strict";a.exports=require("node:http2")},33873:a=>{"use strict";a.exports=require("path")},34589:a=>{"use strict";a.exports=require("node:assert")},37067:a=>{"use strict";a.exports=require("node:http")},37540:a=>{"use strict";a.exports=require("node:console")},38522:a=>{"use strict";a.exports=require("node:zlib")},40610:a=>{"use strict";a.exports=require("node:dns")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41692:a=>{"use strict";a.exports=require("node:tls")},41792:a=>{"use strict";a.exports=require("node:querystring")},46060:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external.js")},46293:a=>{"use strict";a.exports=require("sql.js")},48161:a=>{"use strict";a.exports=require("node:os")},50047:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/root/workspace/JRouter/src/app/(dashboard)/dashboard/profile/page.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/root/workspace/JRouter/src/app/(dashboard)/dashboard/profile/page.js","default")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},53053:a=>{"use strict";a.exports=require("node:diagnostics_channel")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},56878:(a,b,c)=>{var d=c(22004),e=c(30083);a.exports={page:"skills_page__BcOXn "+d.page+" "+e.formScope,header:"skills_header__B0vSK "+d.header,description:"skills_description__cVcfA "+d.description,section:"skills_section__HcGBd "+d.section,sectionHeader:"skills_sectionHeader__Po5WD "+d.sectionHeader,sectionDescription:"skills_sectionDescription__B36_K "+d.sectionDescription,hint:"skills_hint__e9ECF",command:"skills_command__2tMeb",rows:"skills_rows__Zf9N_",row:"skills_row__DbV7C",identity:"skills_identity__XRZ9Z",icon:"skills_icon__d_qRC",titleLine:"skills_titleLine__vDBuc",title:"skills_title__RWwN8",endpoint:"skills_endpoint__GrxIx",metadata:"skills_metadata__NYKys",url:"skills_url__13nhN",urlText:"skills_urlText__HNFGe",actions:"skills_actions__bY309",linkButton:"skills_linkButton__mVXTi"}},57075:a=>{"use strict";a.exports=require("node:stream")},57518:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>s});var d=c(48249),e=c(21707),f=c(67484),g=c(50412),h=c(95145),i=c(267),j=c(42118),k=c(12020),l=c(51126);let m={en:"\uD83C\uDDFA\uD83C\uDDF8",vi:"\uD83C\uDDFB\uD83C\uDDF3","zh-CN":"\uD83C\uDDE8\uD83C\uDDF3","zh-TW":"\uD83C\uDDF9\uD83C\uDDFC",ja:"\uD83C\uDDEF\uD83C\uDDF5","pt-BR":"\uD83C\uDDE7\uD83C\uDDF7","pt-PT":"\uD83C\uDDF5\uD83C\uDDF9",ko:"\uD83C\uDDF0\uD83C\uDDF7",es:"\uD83C\uDDEA\uD83C\uDDF8",de:"\uD83C\uDDE9\uD83C\uDDEA",fr:"\uD83C\uDDEB\uD83C\uDDF7",he:"\uD83C\uDDEE\uD83C\uDDF1",ar:"\uD83C\uDDF8\uD83C\uDDE6",ru:"\uD83C\uDDF7\uD83C\uDDFA",pl:"\uD83C\uDDF5\uD83C\uDDF1",cs:"\uD83C\uDDE8\uD83C\uDDFF",nl:"\uD83C\uDDF3\uD83C\uDDF1",tr:"\uD83C\uDDF9\uD83C\uDDF7",uk:"\uD83C\uDDFA\uD83C\uDDE6",tl:"\uD83C\uDDF5\uD83C\uDDED",id:"\uD83C\uDDEE\uD83C\uDDE9",th:"\uD83C\uDDF9\uD83C\uDDED",km:"\uD83C\uDDF0\uD83C\uDDED",hi:"\uD83C\uDDEE\uD83C\uDDF3",bn:"\uD83C\uDDE7\uD83C\uDDE9",ur:"\uD83C\uDDF5\uD83C\uDDF0",ro:"\uD83C\uDDF7\uD83C\uDDF4",sv:"\uD83C\uDDF8\uD83C\uDDEA",it:"\uD83C\uDDEE\uD83C\uDDF9",el:"\uD83C\uDDEC\uD83C\uDDF7",hu:"\uD83C\uDDED\uD83C\uDDFA",fi:"\uD83C\uDDEB\uD83C\uDDEE",da:"\uD83C\uDDE9\uD83C\uDDF0",no:"\uD83C\uDDF3\uD83C\uDDF4",fa:"\uD83C\uDDEE\uD83C\uDDF7"};var n=c(5114),o=c.n(n);function p({id:a,title:b,icon:c,description:f,children:h}){return(0,d.jsx)("section",{"aria-labelledby":a,children:(0,d.jsxs)(g.Zp,{padding:"none",className:o().section,children:[(0,d.jsx)("div",{className:o().sectionHeader,children:(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("h2",{id:a,className:"ui-eyebrow",children:[(0,d.jsx)(e.default,{className:"text-[16px]","aria-hidden":"true",children:c}),b]}),f&&(0,d.jsx)("p",{className:o().sectionDescription,children:f})]})}),h]})})}function q({status:a}){return a.message?(0,d.jsxs)("p",{className:o().status,"data-status":a.type,role:"error"===a.type?"alert":"status",children:[(0,d.jsx)(e.default,{className:"shrink-0 text-[14px]","aria-hidden":"true",children:"error"===a.type?"error":"check_circle"}),a.message]}):null}function r(){return(0,d.jsx)("header",{className:o().header,children:(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("h1",{className:"ui-eyebrow",children:[(0,d.jsx)(e.default,{className:"text-[16px]","aria-hidden":"true",children:"person"}),"Profile"]}),(0,d.jsx)("p",{className:o().description,children:"Preferences, security, and settings for your JRouter instance."})]})})}function s(){let{theme:a,setTheme:b}=(0,j.D)(),[c,n]=(0,f.useState)(()=>(function(){if("u"<typeof document)return"en";let a=document.cookie.split(";").find(a=>a.trim().startsWith(`${l.CL}=`)),b=a?decodeURIComponent(a.split("=")[1]):"en";return(0,l.QC)(b)})()),[s,t]=(0,f.useState)(!1),[u,v]=(0,f.useState)(!1),[w,x]=(0,f.useState)(!1),[y,z]=(0,f.useState)({fallbackStrategy:"fill-first"}),[A,B]=(0,f.useState)(!0),[C,D]=(0,f.useState)(""),[E,F]=(0,f.useState)({current:"",new:"",confirm:""}),[G,H]=(0,f.useState)({type:"",message:""}),[I,J]=(0,f.useState)(!1),[K,L]=(0,f.useState)(!1),[M,N]=(0,f.useState)({type:"",message:""}),[O,P]=(0,f.useState)({open:!1,mode:"",password:""}),Q=(0,f.useRef)(null),[R,S]=(0,f.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[T,U]=(0,f.useState)(""),[V,W]=(0,f.useState)({type:"",message:""}),[X,Y]=(0,f.useState)(!1),[Z,$]=(0,f.useState)(!1),[_,aa]=(0,f.useState)({type:"",message:""}),[ab,ac]=(0,f.useState)(!1),ad="/api/auth/saml/acs",ae="/api/auth/saml/metadata",[af,ag]=(0,f.useState)("saml"),[ah,ai]=(0,f.useState)({samlEntryPoint:"",samlIssuer:"urn:jrouter:sp",samlCert:"",samlLoginLabel:"Sign in with SAML SSO",samlAttributeEmail:"email",samlAttributeName:"name"}),[aj,ak]=(0,f.useState)({type:"",message:""}),[al,am]=(0,f.useState)(!1),[an,ao]=(0,f.useState)(!1),[ap,aq]=(0,f.useState)({type:"",message:""}),[ar,as]=(0,f.useState)(!1),at=(0,f.useRef)(null),au=(0,f.useRef)(null),av=(0,f.useRef)(null),[aw,ax]=(0,f.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[ay,az]=(0,f.useState)({type:"",message:""}),[aA,aB]=(0,f.useState)(!1),[aC,aD]=(0,f.useState)(!1),[aE,aF]=(0,f.useState)(!1),aG=(0,f.useCallback)(()=>{fetch("/api/settings").then(a=>{if(!a.ok)throw Error("Failed to load settings");return a.json()}).then(a=>{z(a),S({authMode:a?.authMode||"password",oidcIssuerUrl:a?.oidcIssuerUrl||"",oidcClientId:a?.oidcClientId||"",oidcScopes:a?.oidcScopes||"openid profile email",oidcLoginLabel:a?.oidcLoginLabel||"Sign in with OIDC"}),U(""),ag(a?.ssoType||"saml"),ai({samlEntryPoint:a?.samlEntryPoint||"",samlIssuer:a?.samlIssuer||"urn:jrouter:sp",samlCert:a?.samlCert||"",samlLoginLabel:a?.samlLoginLabel||"Sign in with SAML SSO",samlAttributeEmail:a?.samlAttributeEmail||"email",samlAttributeName:a?.samlAttributeName||"name"}),(a?.authMode==="sso"||a?.authMode==="saml"||a?.authMode==="oidc"||a?.authMode==="both")&&ac(!0),ax({outboundProxyEnabled:a?.outboundProxyEnabled===!0,outboundProxyUrl:a?.outboundProxyUrl||"",outboundNoProxy:a?.outboundNoProxy||""}),B(!1)}).catch(a=>{console.error("Failed to fetch settings:",a),D("Could not load your instance settings. Try again."),B(!1)})},[]),aH=async a=>{if(a.preventDefault(),!0===y.outboundProxyEnabled){aB(!0),az({type:"",message:""});try{let a=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:aw.outboundProxyUrl,outboundNoProxy:aw.outboundNoProxy})}),b=await a.json();a.ok?(z(a=>({...a,...b})),az({type:"success",message:"Proxy settings applied"})):az({type:"error",message:b.error||"Failed to update proxy settings"})}catch(a){az({type:"error",message:"An error occurred"})}finally{aB(!1)}}},aI=async()=>{if(!0!==y.outboundProxyEnabled)return;let a=(aw.outboundProxyUrl||"").trim();if(!a)return void az({type:"error",message:"Please enter a Proxy URL to test"});aD(!0),az({type:"",message:""});try{let b=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:a})}),c=await b.json();b.ok&&c?.ok?az({type:"success",message:`Proxy test OK (${c.status}) in ${c.elapsedMs}ms`}):az({type:"error",message:c?.error||"Proxy test failed"})}catch(a){az({type:"error",message:"An error occurred"})}finally{aD(!1)}},aJ=async a=>{aB(!0),az({type:"",message:""});try{let b=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:a})}),c=await b.json();b.ok?(z(a=>({...a,...c})),ax(a=>({...a,outboundProxyEnabled:c?.outboundProxyEnabled===!0})),az({type:"success",message:a?"Proxy enabled":"Proxy disabled"})):az({type:"error",message:c.error||"Failed to update proxy settings"})}catch(a){az({type:"error",message:"An error occurred"})}finally{aB(!1)}},aK=async a=>{if(a.preventDefault(),E.new!==E.confirm)return void H({type:"error",message:"Passwords do not match"});J(!0),H({type:"",message:""});try{let a=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:E.current,newPassword:E.new})}),b=await a.json();a.ok?(H({type:"success",message:"Password updated successfully"}),F({current:"",new:"",confirm:""})):H({type:"error",message:b.error||"Failed to update password"})}catch(a){H({type:"error",message:"An error occurred"})}finally{J(!1)}},aL=async a=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:a})})).ok&&z(b=>({...b,fallbackStrategy:a}))}catch(a){console.error("Failed to update settings:",a)}},aM=async a=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:a})})).ok&&z(b=>({...b,comboStrategy:a}))}catch(a){console.error("Failed to update combo strategy:",a)}},aN=async a=>{let b=parseInt(a);if(!isNaN(b)&&!(b<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:b})})).ok&&z(a=>({...a,stickyRoundRobinLimit:b}))}catch(a){console.error("Failed to update sticky limit:",a)}},aO=async a=>{let b=parseInt(a);if(!isNaN(b)&&!(b<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:b})})).ok&&z(a=>({...a,comboStickyRoundRobinLimit:b}))}catch(a){console.error("Failed to update combo sticky limit:",a)}},aP=async a=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:a})})).ok&&z(b=>({...b,requireLogin:a}))}catch(a){console.error("Failed to update require login:",a)}},aQ=(a,b)=>{S(c=>({...c,[a]:b}))},aR=async(a=R.authMode||"password")=>{let b=R.oidcIssuerUrl.trim(),c=R.oidcClientId.trim(),d=R.oidcScopes.trim(),e=R.oidcLoginLabel.trim(),f=T.trim();if("password"!==a&&(!b||!c||!f)&&!y.oidcConfigured)return void W({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});Y(!0),W({type:"",message:""}),aa({type:"",message:""});try{let g={authMode:a,ssoType:"oidc",oidcIssuerUrl:b,oidcClientId:c,oidcScopes:d||"openid profile email",oidcLoginLabel:e||"Sign in with OIDC"};f&&(g.oidcClientSecret=f);let h=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}),i=await h.json();h.ok?(z(a=>({...a,...i})),S({authMode:i?.authMode||a,oidcIssuerUrl:i?.oidcIssuerUrl||b,oidcClientId:i?.oidcClientId||c,oidcScopes:i?.oidcScopes||d||"openid profile email",oidcLoginLabel:i?.oidcLoginLabel||e||"Sign in with OIDC"}),U(""),W({type:"success",message:"oidc"===a?"OIDC login enabled":"both"===a?"Password and OIDC login enabled":"OIDC settings saved"})):W({type:"error",message:i.error||"Failed to save OIDC settings"})}catch(a){W({type:"error",message:"An error occurred"})}finally{Y(!1)}},aS=async()=>{let a=R.oidcIssuerUrl.trim(),b=R.oidcClientId.trim(),c=R.oidcScopes.trim(),d=T.trim();if(!a||!b)return void aa({type:"error",message:"Issuer URL and client ID are required to test the connection."});$(!0),W({type:"",message:""}),aa({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:R.authMode||y.authMode||"password",oidcIssuerUrl:a,oidcClientId:b,oidcScopes:c||"openid profile email",oidcLoginLabel:R.oidcLoginLabel.trim()||"Sign in with OIDC",...d?{oidcClientSecret:d}:{}})}),f=await e.json().catch(()=>({}));if(!e.ok)return void aa({type:"error",message:f.error||"Failed to save OIDC settings before testing"});let g=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:f.oidcIssuerUrl||a,clientId:f.oidcClientId||b,scopes:f.oidcScopes||c||"openid profile email"})}),h=await g.json().catch(()=>({}));if(g.ok&&h?.ok){let a=h.clientSecretTested?!0===h.clientSecretValid?`Connection OK. Discovery loaded from ${h.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${h.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${h.issuerUrl}.`;aa({type:"success",message:a})}else aa({type:"error",message:h.error||"OIDC connection test failed"})}catch(a){aa({type:"error",message:"An error occurred"})}finally{$(!1)}},aT=(a,b)=>{ai(c=>({...c,[a]:b}))},aU=async(a=R.authMode||"password")=>{am(!0),ak({type:"",message:""}),aq({type:"",message:""});try{let b={authMode:a,ssoType:"saml",samlEntryPoint:ah.samlEntryPoint.trim(),samlIssuer:ah.samlIssuer.trim()||"urn:jrouter:sp",samlCert:ah.samlCert.trim(),samlLoginLabel:ah.samlLoginLabel.trim()||"Sign in with SAML SSO",samlAttributeEmail:ah.samlAttributeEmail.trim()||"email",samlAttributeName:ah.samlAttributeName.trim()||"name"},c=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)}),d=await c.json();c.ok?(z(a=>({...a,...d})),ai({samlEntryPoint:d?.samlEntryPoint||b.samlEntryPoint,samlIssuer:d?.samlIssuer||b.samlIssuer,samlCert:d?.samlCert||b.samlCert,samlLoginLabel:d?.samlLoginLabel||b.samlLoginLabel,samlAttributeEmail:d?.samlAttributeEmail||b.samlAttributeEmail,samlAttributeName:d?.samlAttributeName||b.samlAttributeName}),ak({type:"success",message:"sso"===a||"saml"===a?"SAML SSO login enabled":"both"===a?"Password and SAML SSO login enabled":"SAML 2.0 settings saved"})):ak({type:"error",message:d.error||"Failed to save SAML settings"})}catch{ak({type:"error",message:"An error occurred while saving SAML settings"})}finally{am(!1)}},aV=async()=>{ao(!0),ak({type:"",message:""}),aq({type:"",message:""});try{let a=await fetch("/api/auth/saml/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({samlEntryPoint:ah.samlEntryPoint.trim(),samlIssuer:ah.samlIssuer.trim(),samlCert:ah.samlCert.trim()})}),b=await a.json();a.ok&&b.ok?aq({type:"success",message:b.message||"SAML configuration verified!"}):aq({type:"error",message:b.error||"SAML configuration test failed"})}catch{aq({type:"error",message:"An error occurred while testing SAML configuration"})}finally{ao(!1)}},aW=async a=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:a})})).ok&&z(b=>({...b,enableObservability:a}))}catch(a){console.error("Failed to update enableObservability:",a)}},aX=async()=>{try{let a=await fetch("/api/settings");if(!a.ok)return;let b=await a.json();z(b)}catch(a){console.error("Failed to reload settings:",a)}},aY=async a=>{L(!0),N({type:"",message:""});try{let b=await fetch("/api/settings/database",{headers:{"x-9r-password":a}});if(!b.ok){let a=await b.json().catch(()=>({}));throw Error(a.error||"Failed to export database")}let c=await b.json(),d=JSON.stringify(c,null,2),e=new Blob([d],{type:"application/json"}),f=URL.createObjectURL(e),g=document.createElement("a"),h=new Date().toISOString().replace(/[.:]/g,"-");g.href=f,g.download=`jrouter-backup-${h}.json`,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(f),N({type:"success",message:"Database backup downloaded"})}catch(a){N({type:"error",message:a.message||"Failed to export database"})}finally{L(!1)}},aZ=async a=>{let b=Q.current;if(b){L(!0);try{let c=await b.text(),d=JSON.parse(c),e=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...d,password:a})}),f=await e.json().catch(()=>({}));if(!e.ok)throw Error(f.error||"Failed to import database");await aX(),N({type:"success",message:"Database imported successfully"})}catch(a){N({type:"error",message:a.message||"Invalid backup file"})}finally{Q.current=null,L(!1)}}},a$=async()=>{let{mode:a,password:b}=O;P({open:!1,mode:"",password:""}),"export"===a?await aY(b):"import"===a&&await aZ(b)},a_=!0===y.enableObservability,a0=async()=>{x(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(a){}x(!1),v(!1)},a1=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(a){console.error("Failed to logout:",a)}};return(0,d.jsxs)("div",{className:`dashboard-surface ${o().page}`,children:[(0,d.jsx)(r,{}),A?(0,d.jsxs)("div",{className:o().stack,"aria-busy":"true","aria-label":"Loading profile settings",children:[["Preferences","Security","Routing and network"].map(a=>(0,d.jsxs)(g.Zp,{padding:"none",className:o().section,children:[(0,d.jsx)(g.EA,{className:"mb-5 h-4 w-32"}),(0,d.jsxs)("div",{className:o().formGrid,children:[(0,d.jsx)(g.EA,{className:"h-10"}),(0,d.jsx)(g.EA,{className:"h-10"})]}),(0,d.jsx)(g.EA,{className:"mt-4 h-4 w-48 max-w-full"})]},a)),(0,d.jsx)("p",{className:o().description,role:"status",children:"Loading profile settings…"})]}):C?(0,d.jsxs)(g.Zp,{padding:"none",className:o().section,children:[(0,d.jsx)(q,{status:{type:"error",message:C}}),(0,d.jsx)(g.$n,{variant:"secondary",onClick:()=>{B(!0),D(""),aG()},className:"mt-3",icon:"refresh",children:"Retry"})]}):(0,d.jsxs)("div",{className:o().stack,children:[(0,d.jsxs)(p,{id:"profile-preferences",title:"Preferences & data",icon:"settings",description:"Display preferences and database backups.",children:[(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:o().settingTitle,children:"Appearance"}),(0,d.jsx)("p",{className:o().settingDescription,children:"Use a light, dark, or system theme."})]}),(0,d.jsx)(g.Iz,{"aria-label":"Appearance",value:a,onChange:b,options:[{value:"light",label:"Light",icon:"light_mode"},{value:"dark",label:"Dark",icon:"dark_mode"},{value:"system",label:"System",icon:"contrast"}]})]}),(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:o().settingTitle,children:"Display language"}),(0,d.jsx)("p",{className:o().settingDescription,children:"Choose the language used in the dashboard."})]}),(0,d.jsxs)(g.$n,{variant:"secondary",onClick:()=>t(!0),"aria-label":"Change display language","data-i18n-skip":"true",children:[(0,d.jsx)("span",{"aria-hidden":"true",children:m[c]||"\uD83C\uDF10"}),(0,d.jsx)("span",{children:c}),(0,d.jsx)(e.default,{className:"text-[14px]","aria-hidden":"true",children:"expand_more"})]})]}),(0,d.jsx)("div",{className:o().settingRow,children:(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:o().settingTitle,children:aE?"Remote Mode":"Local Mode"}),(0,d.jsx)("p",{className:o().settingDescription,children:aE?"Connected to a remote instance.":"Running on your machine."})]})}),(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:o().settingTitle,children:"Database Location"}),(0,d.jsx)("code",{className:o().settingDescription,children:"~/.jrouter/db/data.sqlite"})]}),(0,d.jsxs)("div",{className:o().actions,children:[(0,d.jsx)(g.$n,{variant:"secondary",icon:"download",onClick:()=>P({open:!0,mode:"export",password:""}),loading:K,className:"w-full sm:w-auto",children:"Download Backup"}),(0,d.jsx)(g.$n,{variant:"secondary",icon:"upload",onClick:()=>av.current?.click(),disabled:K,className:"w-full sm:w-auto",children:"Import Backup"}),(0,d.jsx)("input",{ref:av,type:"file",accept:"application/json,.json",className:"hidden",onChange:a=>{let b=a.target.files?.[0];av.current&&(av.current.value=""),b&&(Q.current=b,N({type:"",message:""}),P({open:!0,mode:"import",password:""}))}})]})]}),(0,d.jsx)(q,{status:M})]}),(0,d.jsx)(p,{id:"profile-security",title:"Security",icon:"shield",description:"Dashboard access and password management.",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,d.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,d.jsx)(g.lM,{"aria-label":"Require login",checked:!0===y.requireLogin,onChange:()=>aP(!y.requireLogin),disabled:A})]}),!0===y.requireLogin&&(0,d.jsxs)("form",{onSubmit:aK,className:o().form,children:[y.hasPassword&&(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Current Password",autoComplete:"current-password",type:"password",placeholder:"Enter current password",value:E.current,onChange:a=>F({...E,current:a.target.value}),required:!0})}),(0,d.jsxs)("div",{className:o().formGrid,children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"New Password",autoComplete:"new-password",type:"password",placeholder:"Enter new password",value:E.new,onChange:a=>F({...E,new:a.target.value}),required:!0})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Confirm New Password",autoComplete:"new-password",type:"password",placeholder:"Confirm new password",value:E.confirm,onChange:a=>F({...E,confirm:a.target.value}),required:!0})})]}),(0,d.jsx)(q,{status:G}),(0,d.jsx)("div",{className:"pt-2",children:(0,d.jsx)(g.$n,{type:"submit",variant:"contrast",loading:I,className:"w-full sm:w-auto",children:y.hasPassword?"Update Password":"Set Password"})})]})]})}),(0,d.jsx)("section",{"aria-labelledby":"profile-sso",children:(0,d.jsxs)(g.Zp,{padding:"none",className:o().section,children:[(0,d.jsxs)("button",{type:"button",onClick:()=>ac(a=>!a),className:o().disclosure,"aria-expanded":ab,"aria-controls":"profile-sso-settings",children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsxs)("h2",{id:"profile-sso",className:"ui-eyebrow",children:[(0,d.jsx)(e.default,{className:"text-[16px]","aria-hidden":"true",children:"lock_open"}),"Single Sign-On (SSO)"]}),(0,d.jsx)("p",{className:o().sectionDescription,children:"sso"===y.authMode||"oidc"===y.authMode||"saml"===y.authMode?`${"saml"===y.ssoType?"SAML 2.0":"OIDC"} SSO active`:"both"===y.authMode?`Password + ${"saml"===y.ssoType?"SAML 2.0":"OIDC"} active`:"Optional SSO via Okta, Entra ID, Keycloak, or OIDC"})]}),(0,d.jsx)(e.default,{className:"text-text-muted shrink-0",children:ab?"expand_less":"expand_more"})]}),ab&&(0,d.jsxs)("div",{id:"profile-sso-settings",className:o().ssoForm,children:[(0,d.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Configure enterprise Single Sign-On (SSO) for dashboard access using SAML 2.0 or OIDC."}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("p",{className:o().fieldLabel,children:"SSO Protocol"}),(0,d.jsx)(g.Iz,{"aria-label":"SSO Protocol",value:af,onChange:ag,options:[{value:"saml",label:"SAML 2.0"},{value:"oidc",label:"OIDC"}],className:"self-start"})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("p",{className:o().fieldLabel,children:"Auth Mode"}),(0,d.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep legacy password login."},{value:"sso",title:`${"saml"===af?"SAML":"OIDC"} only`,desc:"Require SSO for dashboard access."},{value:"both",title:"Both",desc:"Allow password or SSO login."}].map(a=>{let b=R.authMode,c="password"===a.value?"password"===b:"sso"===a.value?"sso"===b||"saml"===b||"oidc"===b:"both"===b;return(0,d.jsxs)(g.$n,{type:"button",onClick:()=>aQ("authMode",a.value),variant:"outline",className:o().choice,"aria-pressed":c,disabled:A||X||al,children:[(0,d.jsx)("span",{className:o().settingTitle,children:a.title}),(0,d.jsx)("span",{className:o().settingDescription,children:a.desc})]},a.value)})})]}),"saml"===af?(0,d.jsxs)("div",{className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,d.jsxs)("div",{className:o().inset,children:[(0,d.jsxs)("button",{type:"button",onClick:()=>as(a=>!a),className:o().disclosure,"aria-expanded":ar,"aria-controls":"profile-saml-guide",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(e.default,{className:"text-text-muted text-lg","aria-hidden":"true",children:"menu_book"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-semibold text-xs sm:text-sm text-text-main",children:"IdP Setup Guidelines & Provider Configuration Instructions"}),(0,d.jsx)("p",{className:"text-[11px] text-text-muted",children:"Click to view setup steps for AWS IAM Identity Center, Okta, Entra ID, Keycloak, & Authentik"})]})]}),(0,d.jsx)(e.default,{className:"text-text-muted transition-transform text-lg",style:{transform:ar?"rotate(180deg)":"none"},children:"expand_more"})]}),ar&&(0,d.jsxs)("div",{id:"profile-saml-guide",className:o().guide,children:[(0,d.jsxs)("div",{className:o().inset,children:[(0,d.jsx)("p",{className:"font-semibold mb-1",children:"Required Service Provider (SP) Values for your IdP Setup:"}),(0,d.jsxs)("ul",{className:"list-disc pl-4 space-y-1 font-mono text-[11px]",children:[(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Assertion Consumer Service (ACS) URL:"})," ",(0,d.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded break-all",children:ad})]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"SP Entity ID / Audience URI:"})," ",(0,d.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded break-all",children:ah.samlIssuer||"urn:jrouter:sp"})]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"NameID Format:"})," ",(0,d.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded",children:"EmailAddress"})," or ",(0,d.jsx)("code",{className:"bg-bg px-1 py-0.5 rounded",children:"Unspecified"})]})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 pt-1",children:[(0,d.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,d.jsx)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:"AWS IAM Identity Center"}),(0,d.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,d.jsxs)("li",{children:["Applications → ",(0,d.jsx)("b",{children:"Add application"})," → Select ",(0,d.jsx)("b",{children:"Add custom SAML 2.0 application"}),"."]}),(0,d.jsxs)("li",{children:["Set ",(0,d.jsx)("b",{children:"Application ACS URL"})," to ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ad}),"."]}),(0,d.jsxs)("li",{children:["Set ",(0,d.jsx)("b",{children:"Application SAML audience"})," to ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ah.samlIssuer||"urn:jrouter:sp"}),"."]}),(0,d.jsxs)("li",{children:["Under ",(0,d.jsx)("i",{children:"Attribute mappings"}),", map ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:"Subject"})," or ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:"email"})," to ",(0,d.jsxs)("code",{className:"text-text-main font-mono",children:["$","{user:email}"]}),"."]}),(0,d.jsxs)("li",{children:["Download ",(0,d.jsx)("b",{children:"IAM Identity Center SAML metadata XML"})," file and use 1-Click Import below!"]})]})]}),(0,d.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,d.jsx)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:"Microsoft Entra ID (Azure AD)"}),(0,d.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,d.jsxs)("li",{children:["Enterprise Applications → ",(0,d.jsx)("b",{children:"New application"})," → ",(0,d.jsx)("b",{children:"Create your own application"}),"."]}),(0,d.jsxs)("li",{children:["Select ",(0,d.jsx)("b",{children:"Single sign-on"})," → ",(0,d.jsx)("b",{children:"SAML"}),"."]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Identifier (Entity ID):"})," ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ah.samlIssuer||"urn:jrouter:sp"})]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Reply URL (ACS):"})," ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ad})]}),(0,d.jsxs)("li",{children:["Download ",(0,d.jsx)("b",{children:"Federation Metadata XML"})," and import or copy X.509 Certificate."]})]})]}),(0,d.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,d.jsx)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:"Okta / Auth0"}),(0,d.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,d.jsxs)("li",{children:["Applications → ",(0,d.jsx)("b",{children:"Create App Integration"})," → Select ",(0,d.jsx)("b",{children:"SAML 2.0"}),"."]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Single Sign-On URL:"})," ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ad})]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Audience URI (SP Entity ID):"})," ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ah.samlIssuer||"urn:jrouter:sp"})]}),(0,d.jsxs)("li",{children:["Name ID format: ",(0,d.jsx)("i",{children:"EmailAddress"}),"."]}),(0,d.jsx)("li",{children:"Download Identity Provider metadata XML or copy the X.509 cert."})]})]}),(0,d.jsxs)("div",{className:"p-3 rounded border border-border bg-bg/50 flex flex-col gap-1.5",children:[(0,d.jsx)("p",{className:"font-semibold text-text-main flex items-center gap-1.5",children:"Keycloak / Authentik"}),(0,d.jsxs)("ol",{className:"list-decimal pl-4 text-text-muted space-y-1",children:[(0,d.jsxs)("li",{children:["Clients → ",(0,d.jsx)("b",{children:"Create client"})," → Select ",(0,d.jsx)("b",{children:"SAML"}),"."]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Client ID:"})," ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ah.samlIssuer||"urn:jrouter:sp"})]}),(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:"Master SAML Processing URL:"})," ",(0,d.jsx)("code",{className:"text-text-main font-mono",children:ad})]}),(0,d.jsx)("li",{children:"Export SAML Descriptor XML or copy IDP Certificate PEM."})]})]})]})]})]}),(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium text-sm text-text-main",children:"1-Click IdP Metadata XML Import"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Auto-fill SSO URL, Issuer & Cert from XML metadata"})]}),(0,d.jsx)(g.$n,{type:"button",variant:"outline",size:"sm",icon:"upload_file",onClick:()=>at.current?.click(),children:"Upload Metadata XML"}),(0,d.jsx)("input",{ref:at,type:"file",accept:".xml,application/xml,text/xml",className:"hidden",onChange:a=>{let b=a.target.files?.[0];if(at.current&&(at.current.value=""),!b)return;let c=new FileReader;c.onload=a=>{try{let b=a.target?.result||"",c=new DOMParser().parseFromString(b,"text/xml");if(c.querySelector("parsererror"))return void ak({type:"error",message:"Unable to parse valid SAML IdP metadata from XML file"});let d=c.documentElement.getAttribute("entityID")||"",e=Array.from(c.querySelectorAll("SingleSignOnService, *|SingleSignOnService")),f="";for(let a of e){let b=a.getAttribute("Binding")||"",c=a.getAttribute("Location")||"";if(c&&(f=c,b.includes("HTTP-Redirect")))break}let g=Array.from(c.querySelectorAll("X509Certificate, *|X509Certificate")),h="";g.length>0&&(h=g[0].textContent.trim()),ai(a=>({...a,samlEntryPoint:f||a.samlEntryPoint,samlIssuer:a.samlIssuer||"urn:jrouter:sp",samlCert:h||a.samlCert})),ak({type:"success",message:`IdP Metadata imported! (SSO URL: ${f?"found":"not found"}, EntityID: ${d?"found":"not found"}, Cert: ${h?"found":"not found"})`})}catch(a){ak({type:"error",message:"Error reading IdP Metadata XML file"})}},c.readAsText(b)}})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Single Sign-On Service URL (samlEntryPoint)",placeholder:"https://idp.example.com/app/saml/sso/...",value:ah.samlEntryPoint,onChange:a=>aT("samlEntryPoint",a.target.value),disabled:A||al})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"SP Entity ID / Audience (samlIssuer)",placeholder:"urn:jrouter:sp",value:ah.samlIssuer,onChange:a=>aT("samlIssuer",a.target.value),disabled:A||al})}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:o().actions,children:[(0,d.jsx)("label",{htmlFor:"profile-saml-cert",className:o().fieldLabel,children:"IdP X.509 Certificate (samlCert)"}),(0,d.jsx)(g.$n,{type:"button",variant:"outline",size:"sm",icon:"file_upload",onClick:()=>au.current?.click(),children:"Upload Certificate"}),(0,d.jsx)("input",{ref:au,type:"file",accept:".crt,.pem,.cer,text/plain",className:"hidden",onChange:a=>{let b=a.target.files?.[0];if(au.current&&(au.current.value=""),!b)return;let c=new FileReader;c.onload=a=>{let b=a.target?.result||"";ai(a=>({...a,samlCert:b.trim()})),ak({type:"success",message:"Certificate file loaded into configuration."})},c.readAsText(b)}})]}),(0,d.jsx)("textarea",{id:"profile-saml-cert","aria-describedby":"profile-saml-cert-hint",rows:4,placeholder:"-----BEGIN CERTIFICATE-----\nMIIC...\n-----END CERTIFICATE-----",value:ah.samlCert,onChange:a=>aT("samlCert",a.target.value),className:"w-full font-mono resize-y",disabled:A||al}),(0,d.jsx)("p",{id:"profile-saml-cert-hint",className:o().settingDescription,children:"Paste raw Base64 certificate or PEM block."})]}),(0,d.jsxs)("div",{className:o().formGrid,children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Login Button Label",placeholder:"Sign in with SAML SSO",value:ah.samlLoginLabel,onChange:a=>aT("samlLoginLabel",a.target.value),disabled:A||al})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Email Claim Attribute",placeholder:"email",value:ah.samlAttributeEmail,onChange:a=>aT("samlAttributeEmail",a.target.value),disabled:A||al})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Display Name Claim",placeholder:"name",value:ah.samlAttributeName,onChange:a=>aT("samlAttributeName",a.target.value),disabled:A||al})})]})]}),(0,d.jsxs)("div",{className:o().inset,children:[(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-text-main",children:"ACS Callback URL"}),(0,d.jsx)("code",{className:"block break-all font-mono text-xs",children:ad})]}),(0,d.jsx)(g.$n,{type:"button",variant:"outline",size:"sm",icon:"content_copy","aria-label":"Copy ACS Callback URL",onClick:()=>{navigator.clipboard.writeText(ad),ak({type:"success",message:"ACS URL copied to clipboard!"})},children:"Copy"})]}),(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-text-main",children:"SP XML Metadata"}),(0,d.jsx)("code",{className:"block break-all font-mono text-xs",children:ae})]}),(0,d.jsxs)("a",{href:ae,target:"_blank",rel:"noopener noreferrer",download:"jrouter-sp-metadata.xml",className:o().linkButton,children:[(0,d.jsx)(e.default,{className:"text-[16px]",children:"download"}),"Download XML"]})]})]}),(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,d.jsx)(g.$n,{type:"button",variant:"contrast",loading:al,onClick:()=>aU(R.authMode),className:"w-full sm:w-auto",children:"Save SAML settings"}),(0,d.jsx)(g.$n,{type:"button",variant:"outline",loading:an,onClick:aV,className:"w-full sm:w-auto",children:"Test SAML settings"})]}),(0,d.jsx)(q,{status:ap}),(0,d.jsx)(q,{status:aj})]}):(0,d.jsxs)("div",{className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,d.jsxs)("div",{className:o().formGrid,children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Issuer URL",placeholder:"https://auth.example.com/application/o/jrouter/",value:R.oidcIssuerUrl,onChange:a=>aQ("oidcIssuerUrl",a.target.value),disabled:A||X})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Client ID",placeholder:"jrouter-dashboard",value:R.oidcClientId,onChange:a=>aQ("oidcClientId",a.target.value),disabled:A||X})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Client Secret",hint:"This value is write-only after saving.",type:"password",placeholder:"Leave blank to keep existing secret",value:T,onChange:a=>U(a.target.value),disabled:A||X})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Scopes",placeholder:"openid profile email",value:R.oidcScopes,onChange:a=>aQ("oidcScopes",a.target.value),disabled:A||X})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Login Button Label",placeholder:"Sign in with OIDC",value:R.oidcLoginLabel,onChange:a=>aQ("oidcLoginLabel",a.target.value),disabled:A||X})})]}),(0,d.jsxs)("div",{className:o().inset,children:[(0,d.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,d.jsx)("code",{className:"block break-all font-mono",children:"/api/auth/oidc/callback"})]}),(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,d.jsx)(g.$n,{type:"button",variant:"contrast",loading:X,onClick:()=>aR(),className:"w-full sm:w-auto",children:"Save OIDC settings"}),(0,d.jsx)(g.$n,{type:"button",variant:"outline",loading:Z,onClick:aS,className:"w-full sm:w-auto",children:"Test connection"})]}),(0,d.jsx)(q,{status:_}),(0,d.jsx)(q,{status:V})]}),"oidc"===y.authMode||"saml"===y.authMode||"sso"===y.authMode?(0,d.jsxs)("p",{className:o().notice,role:"status",children:["SSO login (","saml"===y.ssoType?"SAML 2.0":"OIDC",") is currently active. Password login is disabled until you switch back."]}):null,"both"===y.authMode&&(0,d.jsxs)("p",{className:o().notice,role:"status",children:["Password and SSO login (","saml"===y.ssoType?"SAML 2.0":"OIDC",") are both active."]})]})]})}),(0,d.jsx)(p,{id:"profile-routing",title:"Routing Strategy",icon:"route",description:"Account and combo rotation preferences.",children:(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,d.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,d.jsx)(g.lM,{"aria-label":"Round Robin",checked:"round-robin"===y.fallbackStrategy,onChange:()=>aL("round-robin"===y.fallbackStrategy?"fill-first":"round-robin"),disabled:A})]}),"round-robin"===y.fallbackStrategy&&(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,d.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,d.jsx)(g.pd,{"aria-label":"Sticky Limit",type:"number",min:"1",max:"10",value:y.stickyRoundRobinLimit||3,onChange:a=>aN(a.target.value),disabled:A,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,d.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,d.jsx)(g.lM,{"aria-label":"Combo Round Robin",checked:"round-robin"===y.comboStrategy,onChange:()=>aM("round-robin"===y.comboStrategy?"fallback":"round-robin"),disabled:A})]}),"round-robin"===y.comboStrategy&&(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,d.jsx)(g.pd,{"aria-label":"Combo Sticky Limit",type:"number",min:"1",max:"100",value:y.comboStickyRoundRobinLimit||1,onChange:a=>aO(a.target.value),disabled:A,className:"w-20 text-center"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===y.fallbackStrategy?`Currently distributing requests across all available accounts with ${y.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===y.comboStrategy?` Combos rotate after ${y.comboStickyRoundRobinLimit||1} call${1===(y.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})}),(0,d.jsx)(p,{id:"profile-network",title:"Network",icon:"wifi",description:"Outbound connections for OAuth and provider requests.",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,d.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,d.jsx)(g.lM,{"aria-label":"Outbound Proxy",checked:!0===y.outboundProxyEnabled,onChange:()=>aJ(!0!==y.outboundProxyEnabled),disabled:A||aA})]}),!0===y.outboundProxyEnabled&&(0,d.jsxs)("form",{onSubmit:aH,className:o().form,children:[(0,d.jsxs)("div",{className:o().formGrid,children:[(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"Proxy URL",hint:"Leave empty to inherit existing env proxy (if any).",placeholder:"http://127.0.0.1:7897",value:aw.outboundProxyUrl,onChange:a=>ax(b=>({...b,outboundProxyUrl:a.target.value})),disabled:A||aA})}),(0,d.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.jsx)(g.pd,{label:"No Proxy",hint:"Comma-separated hostnames/domains to bypass the proxy.",placeholder:"localhost,127.0.0.1",value:aw.outboundNoProxy,onChange:a=>ax(b=>({...b,outboundNoProxy:a.target.value})),disabled:A||aA})})]}),(0,d.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,d.jsx)(g.$n,{type:"button",variant:"secondary",loading:aC,disabled:A||aA,onClick:aI,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,d.jsx)(g.$n,{type:"submit",variant:"contrast",loading:aA,className:"w-full sm:w-auto",children:"Apply"})]})]}),(0,d.jsx)(q,{status:ay})]})}),(0,d.jsx)(p,{id:"profile-observability",title:"Observability",icon:"monitoring",children:(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,d.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,d.jsx)(g.lM,{"aria-label":"Enable Observability",checked:a_,onChange:aW,disabled:A})]})}),(0,d.jsxs)(p,{id:"profile-session",title:"Session & server",icon:"logout",children:[(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:o().settingTitle,children:"Dashboard session"}),(0,d.jsx)("p",{className:o().settingDescription,children:"Sign out of the dashboard."})]}),(0,d.jsx)(g.$n,{variant:"secondary",icon:"logout",onClick:a1,children:"Logout"})]}),(0,d.jsxs)("div",{className:o().settingRow,children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:o().settingTitle,children:"Stop proxy server"}),(0,d.jsx)("p",{className:o().settingDescription,children:"Shut down this JRouter instance."})]}),(0,d.jsx)(g.$n,{variant:"danger",icon:"power_settings_new",onClick:()=>v(!0),className:o().dangerButton,children:"Shutdown"})]})]}),(0,d.jsxs)("div",{className:o().appInfo,children:[(0,d.jsxs)("p",{children:[k.vQ.name," v",k.vQ.version]}),(0,d.jsx)("p",{className:"mt-1",children:aE?"Remote Mode":"Local Mode - All data stored on your machine"})]})]}),(0,d.jsx)(i.default,{dialogClassName:o().languageDialog,hideTrigger:!0,isOpen:s,onClose:a=>{t(!1),n(a)}}),(0,d.jsx)(h.ConfirmModal,{className:o().dialog,isOpen:u,onClose:()=>v(!1),onConfirm:a0,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:w}),(0,d.jsxs)(h.default,{className:o().dialog,isOpen:O.open,onClose:()=>P({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g.$n,{variant:"ghost",onClick:()=>P({open:!1,mode:"",password:""}),disabled:K,children:"Cancel"}),(0,d.jsx)(g.$n,{variant:"contrast",onClick:a$,loading:K,disabled:!O.password,children:"Confirm"})]}),children:[(0,d.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===O.mode?"export":"import"," the database."]}),(0,d.jsx)(g.pd,{label:"Current password",autoComplete:"current-password",type:"password",value:O.password,onChange:a=>P(b=>({...b,password:a.target.value})),onKeyDown:a=>{"Enter"===a.key&&O.password&&a$()},placeholder:"Current password",autoFocus:!0})]})]})}},57975:a=>{"use strict";a.exports=require("node:util")},59965:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>w,handler:()=>y,routeModule:()=>x});var d=c(21635),e=c(86315),f=c(1020),g=c(61287),h={};for(let a in g)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(h[a]=()=>g[a]);c.d(b,h);let i=(0,d.p)(()=>Promise.resolve().then(c.bind(c,57529))),j=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),k=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),l=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),m=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),n=(0,d.p)(()=>Promise.resolve().then(c.bind(c,30508))),o=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),p=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,55091,23))),q=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,45270,23))),r=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,28193,23))),s=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),t=(0,d.p)(()=>Promise.resolve().then(c.t.bind(c,95547,23))),u={children:["",{children:["(dashboard)",{children:["dashboard",{children:["profile",{children:["__PAGE__",{},{page:[(0,d.p)(()=>Promise.resolve().then(c.bind(c,50047))),"/root/workspace/JRouter/src/app/(dashboard)/dashboard/profile/page.js"]}]},{"global-error":[t,"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[s,"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[n,"/root/workspace/JRouter/src/app/(dashboard)/layout.js"],"global-error":[o,"next/dist/client/components/builtin/global-error.js"],"not-found":[p,"next/dist/client/components/builtin/not-found.js"],forbidden:[q,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[r,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[i,"/root/workspace/JRouter/src/app/layout.js"],"global-error":[j,"next/dist/client/components/builtin/global-error.js"],"not-found":[k,"next/dist/client/components/builtin/not-found.js"],forbidden:[l,"next/dist/client/components/builtin/forbidden.js"],unauthorized:[m,"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,v=(0,e.H)({tree:u,page:"/(dashboard)/dashboard/profile/page",pathname:"/dashboard/profile",require:c,loadChunk:()=>Promise.resolve(),interopDefault:f.T}),w=v.__next_app__,x=v.routeModule,y=v.handler},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71553:a=>{"use strict";a.exports=require("node:dns/promises")},71622:a=>{"use strict";a.exports=import("open")},72271:a=>{"use strict";a.exports=require("@aws-sdk/credential-providers")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},73429:a=>{"use strict";a.exports=require("node:util/types")},73496:a=>{"use strict";a.exports=require("http2")},74075:a=>{"use strict";a.exports=require("zlib")},75919:a=>{"use strict";a.exports=require("node:worker_threads")},76760:a=>{"use strict";a.exports=require("node:path")},77030:a=>{"use strict";a.exports=require("node:net")},77598:a=>{"use strict";a.exports=require("node:crypto")},78474:a=>{"use strict";a.exports=require("node:events")},79646:a=>{"use strict";a.exports=require("child_process")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81630:a=>{"use strict";a.exports=require("http")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},87997:a=>{"use strict";a.exports=require("node:timers")},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")},96902:(a,b,c)=>{Promise.resolve().then(c.bind(c,57518))}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[2970,1260,2430,1273,9415,379,4642,3192,6070,4864,6457,4123,455,6777,412,6698],()=>b(b.s=59965));module.exports=c})();