9router 0.4.3 → 0.4.6

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 (331) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/app-path-routes-manifest.json +6 -6
  3. package/app/.next/build-manifest.json +2 -2
  4. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  5. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  6. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  7. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  8. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  11. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  14. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  16. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  17. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  18. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  19. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +12 -10
  20. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  21. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  22. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  23. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  24. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  25. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  26. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  27. package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  28. package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
  29. package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  30. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  31. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  32. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  33. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  34. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  35. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  36. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  37. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  38. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  39. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  40. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  41. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  42. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  43. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
  44. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  45. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  46. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  47. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  48. package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  49. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  50. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  51. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  52. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  53. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  54. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  55. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  56. package/app/.next/server/app/_global-error.html +1 -1
  57. package/app/.next/server/app/_global-error.rsc +1 -1
  58. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  59. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  60. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  61. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  62. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  63. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  64. package/app/.next/server/app/_not-found/page.js +2 -2
  65. package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
  66. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  67. package/app/.next/server/app/_not-found.html +1 -1
  68. package/app/.next/server/app/_not-found.rsc +3 -3
  69. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  70. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  71. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  72. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  73. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  74. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  75. package/app/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
  76. package/app/.next/server/app/api/combos/[id]/route.js +1 -1
  77. package/app/.next/server/app/api/models/route.js +1 -1
  78. package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
  79. package/app/.next/server/app/api/provider-nodes/route.js +1 -1
  80. package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
  81. package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
  82. package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  83. package/app/.next/server/app/api/providers/route.js +1 -1
  84. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  85. package/app/.next/server/app/api/settings/route.js +1 -1
  86. package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
  87. package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
  88. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  89. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  90. package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  91. package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
  92. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  93. package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  94. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  95. package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  96. package/app/.next/server/app/api/v1/images/generations/route.js +4 -1
  97. package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  98. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  99. package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
  100. package/app/.next/server/app/api/v1/responses/compact/route.js +1 -1
  101. package/app/.next/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  102. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  103. package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
  104. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  105. package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  106. package/app/.next/server/app/api/version/route.js +1 -1
  107. package/app/.next/server/app/api/version/update/route.js +1 -1
  108. package/app/.next/server/app/callback/page.js +2 -2
  109. package/app/.next/server/app/callback/page.js.nft.json +1 -1
  110. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  111. package/app/.next/server/app/callback.html +1 -1
  112. package/app/.next/server/app/callback.rsc +3 -3
  113. package/app/.next/server/app/callback.segments/_full.segment.rsc +3 -3
  114. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  115. package/app/.next/server/app/callback.segments/_index.segment.rsc +3 -3
  116. package/app/.next/server/app/callback.segments/_tree.segment.rsc +1 -1
  117. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  118. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  119. package/app/.next/server/app/dashboard/basic-chat.html +1 -1
  120. package/app/.next/server/app/dashboard/basic-chat.rsc +5 -5
  121. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  122. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  123. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  124. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  125. package/app/.next/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
  126. package/app/.next/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  127. package/app/.next/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
  128. package/app/.next/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  129. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  130. package/app/.next/server/app/dashboard/cli-tools.rsc +5 -5
  131. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  132. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  133. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  134. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  135. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
  136. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  137. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
  138. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  139. package/app/.next/server/app/dashboard/combos.html +1 -1
  140. package/app/.next/server/app/dashboard/combos.rsc +5 -5
  141. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  142. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  143. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  144. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  145. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
  146. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  147. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
  148. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  149. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  150. package/app/.next/server/app/dashboard/endpoint.rsc +5 -5
  151. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  152. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  153. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  154. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  155. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
  156. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  157. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
  158. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  159. package/app/.next/server/app/dashboard/mitm.html +1 -1
  160. package/app/.next/server/app/dashboard/mitm.rsc +5 -5
  161. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  162. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  163. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  164. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  165. package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
  166. package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  167. package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
  168. package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  169. package/app/.next/server/app/dashboard/profile.html +1 -1
  170. package/app/.next/server/app/dashboard/profile.rsc +5 -5
  171. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  172. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  173. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  174. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  175. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
  176. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  177. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
  178. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  179. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  180. package/app/.next/server/app/dashboard/providers/new.rsc +5 -5
  181. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  182. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  183. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  184. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  185. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  186. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
  187. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  188. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
  189. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  190. package/app/.next/server/app/dashboard/providers.html +1 -1
  191. package/app/.next/server/app/dashboard/providers.rsc +5 -5
  192. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  193. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  194. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  195. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  196. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
  197. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  198. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
  199. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  200. package/app/.next/server/app/dashboard/proxy-pools.html +1 -1
  201. package/app/.next/server/app/dashboard/proxy-pools.rsc +5 -5
  202. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  203. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  204. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  205. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  206. package/app/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  207. package/app/.next/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  208. package/app/.next/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
  209. package/app/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  210. package/app/.next/server/app/dashboard/quota.html +2 -2
  211. package/app/.next/server/app/dashboard/quota.rsc +6 -6
  212. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  213. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  214. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  215. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  216. package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
  217. package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  218. package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
  219. package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  220. package/app/.next/server/app/dashboard/settings/pricing/page.js +2 -2
  221. package/app/.next/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  222. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  223. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  224. package/app/.next/server/app/dashboard/settings/pricing.rsc +3 -3
  225. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  226. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  227. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
  228. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  229. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  230. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  231. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  232. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  233. package/app/.next/server/app/dashboard/translator.html +1 -1
  234. package/app/.next/server/app/dashboard/translator.rsc +5 -5
  235. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  236. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  237. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  238. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  239. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
  240. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  241. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
  242. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  243. package/app/.next/server/app/dashboard/usage.html +1 -1
  244. package/app/.next/server/app/dashboard/usage.rsc +5 -5
  245. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  246. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  247. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  248. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  249. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  250. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  251. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
  252. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  253. package/app/.next/server/app/dashboard.html +1 -1
  254. package/app/.next/server/app/dashboard.rsc +5 -5
  255. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  256. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  257. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  258. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +5 -5
  259. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  260. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +3 -3
  261. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  262. package/app/.next/server/app/index.html +1 -1
  263. package/app/.next/server/app/index.rsc +3 -3
  264. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  265. package/app/.next/server/app/index.segments/_full.segment.rsc +3 -3
  266. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  267. package/app/.next/server/app/index.segments/_index.segment.rsc +3 -3
  268. package/app/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  269. package/app/.next/server/app/landing/page.js +2 -2
  270. package/app/.next/server/app/landing/page.js.nft.json +1 -1
  271. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  272. package/app/.next/server/app/landing.html +1 -1
  273. package/app/.next/server/app/landing.rsc +3 -3
  274. package/app/.next/server/app/landing.segments/_full.segment.rsc +3 -3
  275. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  276. package/app/.next/server/app/landing.segments/_index.segment.rsc +3 -3
  277. package/app/.next/server/app/landing.segments/_tree.segment.rsc +1 -1
  278. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  279. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  280. package/app/.next/server/app/login/page.js +2 -2
  281. package/app/.next/server/app/login/page.js.nft.json +1 -1
  282. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  283. package/app/.next/server/app/login.html +1 -1
  284. package/app/.next/server/app/login.rsc +4 -4
  285. package/app/.next/server/app/login.segments/_full.segment.rsc +4 -4
  286. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  287. package/app/.next/server/app/login.segments/_index.segment.rsc +3 -3
  288. package/app/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  289. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  290. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  291. package/app/.next/server/app/page.js +2 -2
  292. package/app/.next/server/app/page.js.nft.json +1 -1
  293. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  294. package/app/.next/server/app-paths-manifest.json +6 -6
  295. package/app/.next/server/chunks/1389.js +1 -1
  296. package/app/.next/server/chunks/2049.js +1 -0
  297. package/app/.next/server/chunks/253.js +1 -1
  298. package/app/.next/server/chunks/2947.js +1 -1
  299. package/app/.next/server/chunks/3159.js +1 -1
  300. package/app/.next/server/chunks/3382.js +1 -0
  301. package/app/.next/server/chunks/450.js +3 -3
  302. package/app/.next/server/chunks/6379.js +1 -1
  303. package/app/.next/server/chunks/6560.js +1 -0
  304. package/app/.next/server/chunks/6762.js +1 -1
  305. package/app/.next/server/chunks/7973.js +1 -1
  306. package/app/.next/server/chunks/8202.js +4 -4
  307. package/app/.next/server/chunks/9737.js +1 -1
  308. package/app/.next/server/middleware-build-manifest.js +1 -1
  309. package/app/.next/server/pages/404.html +1 -1
  310. package/app/.next/server/pages/500.html +1 -1
  311. package/app/.next/static/chunks/4156-545be001c8f8365c.js +7 -0
  312. package/app/.next/static/chunks/{4380-0f3871c8ea3f86ca.js → 4380-f83b90c5cb45f40b.js} +1 -1
  313. package/app/.next/static/chunks/505-40ed9bab7b65728b.js +1 -0
  314. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-5327680604147dba.js +53 -0
  315. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-5bc6cb876a46fc52.js +1 -0
  316. package/app/.next/static/chunks/app/(dashboard)/layout-c2eff3e8b831f92c.js +1 -0
  317. package/app/package.json +1 -1
  318. package/app/public/providers/byteplus.png +0 -0
  319. package/app/src/lib/updater/updater.js +25 -2
  320. package/cli.js +1 -0
  321. package/package.json +1 -1
  322. package/app/.next/server/chunks/3030.js +0 -1
  323. package/app/.next/server/chunks/4627.js +0 -1
  324. package/app/.next/server/chunks/5290.js +0 -1
  325. package/app/.next/static/chunks/4156-ac69d9fed0825642.js +0 -7
  326. package/app/.next/static/chunks/505-3ffce20748d2fc09.js +0 -1
  327. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-446fb4958f931207.js +0 -51
  328. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-7b7477044f123993.js +0 -1
  329. package/app/.next/static/chunks/app/(dashboard)/layout-380c1f4327a2a3bc.js +0 -1
  330. /package/app/.next/static/{Ihds3DOj3yt0tC1dSf2Hc → ez1dtKaOsEwopohY2zKDV}/_buildManifest.js +0 -0
  331. /package/app/.next/static/{Ihds3DOj3yt0tC1dSf2Hc → ez1dtKaOsEwopohY2zKDV}/_ssgManifest.js +0 -0
@@ -1,5 +1,5 @@
1
- (()=>{var a={};a.id=182,a.ids=[182],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},7450:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>M,handler:()=>O,routeModule:()=>N});var d=c(31975),e=c(30600),f=c(66116),g=c(27321),h=c(42431),i=c(34935),j=c(57326),k=c(63459),l=c(8555),m=c(67401),n=c(75869),o=c(42417),p=c(44612),q=c(261),r=c(14220),s=c(37353),t=c(26713),u=c(99509),v=c(31310),w=c(85426),x=c(80463),y=c(83665),z=c(9071),A=c(62091),B=c(86439),C=c(77068),D=c(44303),E=c(18045),F=c(71860),G=c(70722),H=c(19995),I=c(43954),J=c(17891),K={};for(let a in E)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(K[a]=()=>E[a]);c.d(b,K);let L={children:["",{children:["(dashboard)",{children:["dashboard",{children:["media-providers",{children:["[kind]",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,23476)),"/Users/Working/router4/app/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,75765,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,75765,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,75765,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,75765,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,97934)),"/Users/Working/router4/app/src/app/(dashboard)/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,75765,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,13729,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,53532,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,4175,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,94638))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,14407)),"/Users/Working/router4/app/src/app/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,75765,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,13729,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,53532,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,4175,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,94638))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,M={require:c,loadChunk:()=>Promise.resolve()},N=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/media-providers/[kind]/[id]/page",pathname:"/dashboard/media-providers/[kind]/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:L},distDir:".next",relativeProjectDir:""});async function O(a,b,d){var K,P,Q,R,S;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),N.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let T=!!(0,h.getRequestMeta)(a,"minimalMode"),U="/(dashboard)/dashboard/media-providers/[kind]/[id]/page";"/index"===U&&(U="/");let V=await N.prepare(a,b,{srcPage:U,multiZoneDraftMode:!1});if(!V)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:W,query:X,params:Y,pageIsDynamic:Z,buildManifest:$,nextFontManifest:_,reactLoadableManifest:aa,serverActionsManifest:ab,clientReferenceManifest:ac,subresourceIntegrityManifest:ad,prerenderManifest:ae,isDraftMode:af,resolvedPathname:ag,revalidateOnlyGenerated:ah,routerServerContext:ai,nextConfig:aj,parsedUrl:ak,interceptionRoutePatterns:al,deploymentId:am,clientAssetToken:an}=V,ao=(0,q.normalizeAppPath)(U),{isOnDemandRevalidate:ap}=V,aq=aj.experimental.ppr&&!aj.cacheComponents&&(0,I.isInterceptionRouteAppPath)(ag)?null:N.match(ag,ae),ar=(null==aq?void 0:aq.route)??null,as=!!ae.routes[ag],at=a.headers["user-agent"]||"",au=(0,t.getBotType)(at),av=(0,p.isHtmlBotRequest)(a),aw=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[s.NEXT_ROUTER_PREFETCH_HEADER],ax=(0,h.getRequestMeta)(a,"isRSCRequest")??!!a.headers[s.RSC_HEADER],ay=(0,r.getIsPossibleServerAction)(a),az=(0,m.checkIsAppPPREnabled)(aj.experimental.ppr),aA=a.headers[x.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&T&&az&&ay&&aA&&"string"==typeof aA){let e=parseInt(aA,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,D.getMaxPostponedStateSize)(aj.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,D.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(S=aj.experimental.serverActions)?void 0:S.bodySizeLimit)??i,k=e+(j!==i?c(66716).parse(j):1048576),l=await (0,D.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&az&&"1"===a.headers[x.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,D.getMaxPostponedStateSize)(aj.experimental.maxPostponedStateSize),f=await (0,D.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,D.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aB=!0===N.isDev||!0===aj.experimental.exposeTestingApiInProductionBuild,aC=aB&&("1"===a.headers[s.NEXT_INSTANT_PREFETCH_HEADER]||void 0===a.headers[s.RSC_HEADER]&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(s.NEXT_INSTANT_TEST_COOKIE+"=")),aD=(az||aC)&&((null==(K=ae.routes[ao]??ae.dynamicRoutes[ao])?void 0:K.renderingMode)==="PARTIALLY_STATIC"||aC&&(aB||(null==ai?void 0:ai.experimentalTestProxy)===!0)),aE=aC&&aD,aF=aE&&!0===N.isDev,aG=!1,aH=aD?(0,h.getRequestMeta)(a,"postponed"):void 0,aI=null==(P=ae.routes[ag])?void 0:P.prefetchDataRoute,aJ=aD&&ax&&!aw&&!aI;T&&(aJ=aJ&&!!aH);let aK=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aL=(!au||!aD)&&(!at||(0,p.shouldServeStreamingMetadata)(at,aj.htmlLimitedBots)),aM=!!((ar||as||ae.routes[ao])&&!(au&&aD)),aN=aD&&!0===aj.cacheComponents,aO=!0===N.isDev||!aM||"string"==typeof aH||(aN&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aJ&&!T:aJ),aP=!!au&&aD,aQ=(null==ar?void 0:ar.remainingPrerenderableParams)??[],aR=(null==ar?void 0:ar.fallback)===null&&((null==(Q=ar.fallbackRootParams)?void 0:Q.length)??0)>0,aS=null;if(!af&&aM&&!aO&&!ay&&!aH&&!aJ){let a=aq?"string"==typeof(null==ar?void 0:ar.fallback)?ar.fallback:aq.source:null;if(!0===aj.experimental.partialFallbacks&&a&&(null==ar?void 0:ar.fallbackRouteParams)&&!aR){if(aQ.length>0){let b,c=(b=new Map(aQ.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,J.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==Y?void 0:Y[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace(function(a){let{repeat:b,optional:c}=(0,J.getParamProperties)(a.paramType);return c?`[[...${a.paramName}]]`:b?`[...${a.paramName}]`:`[${a.paramName}]`}(d),f)}).join("/")||"/");aS=c!==a?c:null}}else aS=ag}let aT=aS;!aT&&(N.isDev||aM&&Z&&(null==ar?void 0:ar.fallbackRouteParams)&&!ay)&&(aT=ag),N.isDev||af||!aM||!ax||aJ||(0,k.d)(a.headers);let aU={...E,tree:L,handler:O,routeModule:N,__next_app__:M};ab&&ac&&(0,o.setManifestsSingleton)({page:U,clientReferenceManifest:ac,serverActionsManifest:ab});let aV=a.method||"GET",aW=(0,g.getTracer)(),aX=aW.getActiveScopeSpan(),aY=!!(null==ai?void 0:ai.isWrappedByNextServer),aZ=!0===aj.experimental.partialFallbacks&&aQ.length>0?(null==ar||null==(R=ar.fallbackRouteParams)?void 0:R.filter(a=>!aQ.some(b=>b.paramName===a.paramName)))??[]:[],a$=async()=>((null==ai?void 0:ai.render404)?await ai.render404(a,b,ak,!1):b.end("This page could not be found"),null);try{let f,k=N.getVaryHeader(ag,al);b.setHeader("Vary",k);let m=async(c,d)=>{let e=new l.NodeNextRequest(a),g=new l.NodeNextResponse(b);return N.render(e,g,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aW.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aV} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),f&&f!==c&&(f.setAttribute("http.route",d),f.updateName(a))}else c.updateName(`${aV} ${U}`)})},o=(0,h.getRequestMeta)(a,"incrementalCache")||await N.getIncrementalCache(a,aj,ae,T);null==o||o.resetRequestCache(),globalThis.__incrementalCache=o;let p=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:X,params:Y,page:ao,sharedContext:{buildId:W,deploymentId:am,clientAssetToken:an},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aU,Component:(0,j.T)(aU),params:Y,routeModule:N,page:U,postponed:f,shouldWaitOnAllReady:aP,serveStreamingMetadata:aL,supportsDynamicResponse:"string"==typeof f||aO,buildManifest:$,nextFontManifest:_,reactLoadableManifest:aa,subresourceIntegrityManifest:ad,setCacheStatus:null==ai?void 0:ai.setCacheStatus,setIsrStatus:null==ai?void 0:ai.setIsrStatus,setReactDebugChannel:null==ai?void 0:ai.setReactDebugChannel,sendErrorsToBrowser:null==ai?void 0:ai.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),N.relativeProjectDir),isDraftMode:af,botType:au,isOnDemandRevalidate:ap,isPossibleServerAction:ay,assetPrefix:aj.assetPrefix,nextConfigOutput:aj.output,crossOrigin:aj.crossOrigin,trailingSlash:aj.trailingSlash,images:aj.images,previewProps:ae.preview,enableTainting:aj.experimental.taint,htmlLimitedBots:aj.htmlLimitedBots,reactMaxHeadersLength:aj.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:o,cacheLifeProfiles:aj.cacheLife,basePath:aj.basePath,serverActions:aj.experimental.serverActions,logServerFunctions:"object"==typeof aj.logging&&!!aj.logging.serverFunctions,...aE||aF||aG?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aF}:{},cacheComponents:!!aj.cacheComponents,experimental:{isRoutePPREnabled:aD,expireTime:aj.expireTime,staleTimes:aj.experimental.staleTimes,dynamicOnHover:!!aj.experimental.dynamicOnHover,optimisticRouting:!!aj.experimental.optimisticRouting,inlineCss:!!aj.experimental.inlineCss,prefetchInlining:aj.experimental.prefetchInlining??!1,authInterrupts:!!aj.experimental.authInterrupts,cachedNavigations:!!aj.experimental.cachedNavigations,clientTraceMetadata:aj.experimental.clientTraceMetadata||[],clientParamParsingOrigins:aj.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,C.parseMaxPostponedStateSize)(aj.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>N.onRequestError(a,b,d,e,ai),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await m(e,k),{metadata:n}=l,{cacheControl:p,headers:q={},fetchTags:r,fetchMetrics:s}=n;if(r&&(q[x.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aM&&(null==p?void 0:p.revalidate)===0&&!N.isDev&&!aD){let a=n.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ag}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
2
- see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:u.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:n.flightData,postponed:n.postponed,status:n.statusCode,segmentData:n.segmentData},cacheControl:p}},q=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i,forceStaticRender:j=!1})=>{let k,l=!1===N.isDev,m=c||b.writableEnded;if(ap&&ah&&!f&&!T)return(null==ai?void 0:ai.render404)?await ai.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(ar&&(k=(0,v.parseFallbackField)(ar.fallback)),!0===aj.experimental.partialFallbacks&&(null==ar?void 0:ar.fallback)===null&&!aR&&aQ.length>0&&(k=v.FallbackMode.PRERENDER),k===v.FallbackMode.PRERENDER&&(0,t.isBot)(at)&&(!aD||av)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ap=!0),ap&&(k!==v.FallbackMode.NOT_FOUND||f)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),!T&&k!==v.FallbackMode.BLOCKING_STATIC_RENDER&&aT&&!m&&!af&&Z&&(l||!as)){if((l||ar)&&k===v.FallbackMode.NOT_FOUND){if(aj.adapterPath)return await a$();throw new B.NoFallbackError}if(aD&&(aj.cacheComponents?!aJ:!ax)){let b=l&&"string"==typeof(null==ar?void 0:ar.fallback)?ar.fallback:ao,f=(l||aE)&&(null==ar?void 0:ar.fallbackRouteParams)?(0,n.createOpaqueFallbackRouteParams)(ar.fallbackRouteParams):aG?(0,n.getFallbackRouteParams)(ao,N):null;aE&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await N.handleResponse({cacheKey:b,req:a,nextConfig:aj,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ae,isRoutePPREnabled:aD,responseGenerator:async()=>p({span:i,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:T});if(null===g)return null;if(g)return T||!aD||!(aQ.length>0)||!0!==aj.experimental.partialFallbacks||!aS||!o||ap||aG||aB||aC||aw||(0,H.scheduleOnNextTick)(async()=>{let b=N.getResponseCache(a);try{await b.revalidate(aS,o,aD,!1,a=>p({span:a.span,postponed:void 0,fallbackRouteParams:aZ.length>0?(0,n.createOpaqueFallbackRouteParams)(aZ):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let r=ap||g||!aH?void 0:aH;if(aN&&!T&&o&&(aJ||ay)&&!j){let b=await o.get(ag,{kind:u.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===u.CachedRouteKind.APP_PAGE&&(r=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,H.scheduleOnNextTick)(async()=>{let b=N.getResponseCache(a);try{await b.revalidate(ag,o,aD,!1,a=>q({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aE||aF)&&void 0!==r)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:u.CachedRouteKind.PAGES,html:w.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let s=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||aE&&!as)&&(null==ar?void 0:ar.fallbackRouteParams)?(0,n.createOpaqueFallbackRouteParams)(ar.fallbackRouteParams):aG?(0,n.getFallbackRouteParams)(ao,N):null;if((l||aE)&&aj.cacheComponents&&!as&&(null==ar?void 0:ar.fallbackRouteParams)){let b=(0,n.createOpaqueFallbackRouteParams)(ar.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return p({span:i,postponed:r,fallbackRouteParams:s,forceStaticRender:j})},r=async c=>{var f,g,i,j,k;let l,m=await N.handleResponse({cacheKey:aS,responseGenerator:a=>q({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ap,isRoutePPREnabled:aD,req:a,nextConfig:aj,prerenderManifest:ae,waitUntil:d.waitUntil,isMinimalMode:T});if(af&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),N.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!m){if(aS)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=m.value)?void 0:f.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=m.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let n="string"==typeof m.value.postponed;ax&&!ay&&am&&b.setHeader(x.NEXT_NAV_DEPLOYMENT_ID_HEADER,am),aM&&!aJ&&(!n||aw)&&(T||b.setHeader("x-nextjs-cache",ap?"REVALIDATED":m.isMiss?"MISS":m.isStale?"STALE":"HIT"),b.setHeader(s.NEXT_IS_PRERENDER_HEADER,"1"));let{value:o}=m;if(aH)l={revalidate:0,expire:void 0};else if(aJ)l={revalidate:0,expire:void 0};else if(!N.isDev)if(af)l={revalidate:0,expire:void 0};else if(aM){if(m.cacheControl)if("number"==typeof m.cacheControl.revalidate){if(m.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${m.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:m.cacheControl.revalidate,expire:(null==(j=m.cacheControl)?void 0:j.expire)??aj.expireTime}}else l={revalidate:x.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(m.cacheControl=l,"string"==typeof aK&&(null==o?void 0:o.kind)===u.CachedRouteKind.APP_PAGE&&o.segmentData){b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=o.headers)?void 0:k[x.NEXT_CACHE_TAGS_HEADER];T&&aM&&c&&"string"==typeof c&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,c);let d=o.segmentData.get(aK);return void 0!==d?(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:w.default.fromStatic(d,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl}):(b.statusCode=204,(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl}))}let r=aN?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r(m,{url:(0,h.getRequestMeta)(a,"initURL")??a.url}))return null;if(o.headers){let a={...o.headers};for(let[c,d]of(T&&aM||delete a[x.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let t=null==(g=o.headers)?void 0:g[x.NEXT_CACHE_TAGS_HEADER];if(T&&aM&&t&&"string"==typeof t&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,t),!o.status||ax&&aD||(b.statusCode=o.status),!T&&o.status&&F.RedirectStatusCode[o.status]&&ax&&(b.statusCode=200),n&&!aJ&&b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"1"),ax&&!af){if(void 0===o.rscData){if(o.html.contentType!==s.RSC_CONTENT_TYPE_HEADER)if(aj.cacheComponents)return b.statusCode=404,(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl});else throw Object.defineProperty(new G.InvariantError(`Expected RSC response, got ${o.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:o.html,cacheControl:m.cacheControl})}return(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:w.default.fromStatic(o.rscData,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl})}let v=o.html;if(aC&&aE){let c=!0===N.isDev?crypto.randomUUID():null;return v.pipeThrough((0,z.createInstantTestScriptInsertionTransformStream)(c)),(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}})}if(!n||T||ax)return(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:v,cacheControl:m.cacheControl});if(aE||aF)return v.push(new ReadableStream({start(a){a.enqueue(y.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}});let B=new TransformStream;return v.push(B.readable),p({span:c,postponed:o.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(B.writable)}).catch(a=>{B.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}})};if(!aY||!aX)return f=aW.getActiveScopeSpan(),await aW.withPropagatedContext(a.headers,()=>aW.trace(i.BaseServerSpan.handleRequest,{spanName:`${aV} ${U}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aV,"http.target":a.url}},r),void 0,!aY);await r(aX)}catch(b){throw b instanceof B.NoFallbackError||await N.onRequestError(a,b,{routerKind:"App Router",routePath:U,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aM,isOnDemandRevalidate:ap})},!1,ai),b}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{"use strict";a.exports=require("assert")},14638:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>E});var d=c(26835),e=c(28217),f=c(30978),g=c.n(f),h=c(53830),i=c(50450),j=c(66298),k=c(30207),l=c(65839),m=c(93617),n=c(41183),o=c.n(n);function p({until:a}){let[b,c]=(0,h.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function q({connection:a,proxyPools:b,isOAuth:c,isFirst:e,isLast:f,onMoveUp:g,onMoveDown:j,onToggleActive:k,onUpdateProxy:l,onEdit:m,onDelete:n}){let[o,r]=(0,h.useState)(!1),[s,t]=(0,h.useState)(!1),[u,v]=(0,h.useState)(!1),w=(0,h.useRef)(null),x=new Map((b||[]).map(a=>[a.id,a])),y=a.providerSpecificData?.proxyPoolId||null,z=y?x.get(y):null,A=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,B=!!y||A,C=z?`Pool: ${z.name}`:y?`Pool: ${y} (inactive/missing)`:A?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",D="",E=z?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;if(E)try{let a=new URL(E);D=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{D=E}let F=z?.noProxy||a.providerSpecificData?.connectionNoProxy||"",G=z?.isActive===!0?"success":y||A?"error":"default",H=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(Boolean).sort()[0]||null,I="unavailable"!==a.testStatus||u?a.testStatus:"active",J=c?a.name||a.email||a.displayName||"OAuth Account":a.name,K=async a=>{t(!0);try{await l("__none__"===a?null:a)}finally{t(!1),r(!1)}};return(0,d.jsxs)("div",{className:`group flex items-center justify-between p2 rounded-lg hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("button",{onClick:g,disabled:e,className:`p-0.5 rounded ${e?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:j,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:c?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:J}),(0,d.jsxs)("div",{className:"flex items-center gap-2 mt-1 flex-wrap",children:[(0,d.jsx)(i.Ex,{variant:!1===a.isActive?"default":"active"===I||"success"===I?"success":"error"===I||"expired"===I||"unavailable"===I?"error":"default",size:"sm",dot:!0,children:!1===a.isActive?"disabled":I||"Unknown"}),B&&(0,d.jsx)(i.Ex,{variant:G,size:"sm",children:"Proxy"}),u&&!1!==a.isActive&&(0,d.jsx)(p,{until:H}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]})]}),B&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:C,children:C}),D&&(0,d.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:D}),F&&(0,d.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:F,children:["no_proxy: ",F]})]})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("div",{className:"flex gap-1",children:[(b||[]).length>0&&(0,d.jsxs)("div",{className:"relative",ref:w,children:[(0,d.jsxs)("button",{onClick:()=>r(a=>!a),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${B?"text-primary":"text-text-muted hover:text-primary"}`,disabled:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),o&&(0,d.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,d.jsx)("button",{onClick:()=>K("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!y?"text-primary font-medium":"text-text-main"}`,children:"None"}),(b||[]).map(a=>(0,d.jsx)("button",{onClick:()=>K(a.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${y===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]})]}),(0,d.jsxs)("button",{onClick:m,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:n,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(i.lM,{size:"sm",checked:a.isActive??!0,onChange:k,title:a.isActive??!0?"Disable":"Enable"})]})]})}function r({isOpen:a,provider:b,providerName:c,proxyPools:e,onSave:f,onClose:g}){let j="__none__",[k,l]=(0,h.useState)({name:"",apiKey:"",priority:1,proxyPoolId:j}),[m,n]=(0,h.useState)(!1),[o,p]=(0,h.useState)(null),[q,s]=(0,h.useState)(!1),t=async()=>{n(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:k.apiKey})}),c=await a.json();p(c.valid?"success":"failed")}catch{p("failed")}finally{n(!1)}},u=async()=>{if(b&&k.apiKey){s(!0);try{let a=!1;try{n(!0),p(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:k.apiKey})});a=!!(await c.json()).valid,p(a?"success":"failed")}catch{p("failed")}finally{n(!1)}await f({name:k.name,apiKey:k.apiKey,priority:k.priority,proxyPoolId:k.proxyPoolId===j?null:k.proxyPoolId,testStatus:a?"active":"unknown"})}finally{s(!1)}}};return b?(0,d.jsx)(i.aF,{isOpen:a,title:`Add ${c||b} API Key`,onClose:g,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Name"}),(0,d.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:k.name,onChange:a=>l({...k,name:a.target.value}),placeholder:"Production Key"})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Key"}),(0,d.jsx)("input",{type:"password",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:k.apiKey,onChange:a=>l({...k,apiKey:a.target.value})})]}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(i.$n,{onClick:t,disabled:!k.apiKey||m||q,variant:"secondary",children:m?"Checking...":"Check"})})]}),o&&(0,d.jsx)(i.Ex,{variant:"success"===o?"success":"error",children:"success"===o?"Valid":"Invalid"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,d.jsx)("input",{type:"number",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:k.priority,onChange:a=>l({...k,priority:Number.parseInt(a.target.value)||1})})]}),(0,d.jsx)(i.l6,{label:"Proxy Pool",value:k.proxyPoolId,onChange:a=>l({...k,proxyPoolId:a.target.value}),options:[{value:j,label:"None"},...(e||[]).map(a=>({value:a.id,label:a.name}))]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(i.$n,{onClick:u,fullWidth:!0,disabled:!k.name||!k.apiKey||q,children:q?"Saving...":"Save"}),(0,d.jsx)(i.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function s({providerId:a,isOAuth:b}){let[c,e]=(0,h.useState)([]),[f,g]=(0,h.useState)([]),[j,k]=(0,h.useState)(!0),[l,m]=(0,h.useState)(!1),[n,o]=(0,h.useState)(!1),[p,t]=(0,h.useState)(null),[u,v]=(0,h.useState)(null),[w,x]=(0,h.useState)("1"),y=(0,h.useCallback)(async()=>{try{let[b,c,d]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),f=await b.json(),h=await c.json(),i=d.ok?await d.json():{};b.ok&&e((f.connections||[]).filter(b=>b.provider===a)),c.ok&&g(h.proxyPools||[]);let j=(i.providerStrategies||{})[a]||{};v(j.fallbackStrategy||null),x(null!=j.stickyRoundRobinLimit?String(j.stickyRoundRobinLimit):"1")}catch(a){console.log("ConnectionsCard fetch error:",a)}finally{k(!1)}},[a]),z=async(b,c)=>{try{let d=await fetch("/api/settings",{cache:"no-store"}),e=(d.ok?await d.json():{}).providerStrategies||{},f={};b&&(f.fallbackStrategy=b),"round-robin"===b&&""!==c&&(f.stickyRoundRobinLimit=Number(c)||3);let g={...e};0===Object.keys(f).length?delete g[a]:g[a]=f,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:g})})}catch(a){console.log("saveStrategy error:",a)}},A=async(a,b)=>{let d=[...c];[d[a],d[b]]=[d[b],d[a]],e(d);try{await Promise.all([fetch(`/api/providers/${d[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${d[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch{await y()}},B=async a=>{if(confirm("Delete this connection?"))try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&e(b=>b.filter(b=>b.id!==a))}catch(a){console.log("delete error:",a)}},C=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&e(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("toggle error:",a)}},D=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:b||null})})).ok&&e(c=>c.map(c=>c.id===a?{...c,providerSpecificData:{...c.providerSpecificData,proxyPoolId:b||null}}:c))}catch(a){console.log("proxy error:",a)}},E=async b=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:a,...b})})).ok&&(await y(),m(!1))}catch(a){console.log("save apikey error:",a)}},F=async a=>{try{(await fetch(`/api/providers/${p.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await y(),o(!1))}catch(a){console.log("update connection error:",a)}};return j?(0,d.jsx)(i.Zp,{children:(0,d.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.Zp,{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,d.jsx)(i.lM,{checked:"round-robin"===u,onChange:a=>{let b=a?"round-robin":null;v(b),a&&!w&&x("1"),z(b,a?w||"1":w)}}),"round-robin"===u&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,d.jsx)("input",{type:"number",min:1,value:w,onChange:a=>{x(a.target.value),z("round-robin",a.target.value)},className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),0===c.length?(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,d.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>m(!0),children:"Add Connection"})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:c.map((a,e)=>(0,d.jsx)(q,{connection:a,proxyPools:f,isOAuth:b,isFirst:0===e,isLast:e===c.length-1,onMoveUp:()=>A(e,e-1),onMoveDown:()=>A(e,e+1),onToggleActive:b=>C(a.id,b),onUpdateProxy:b=>D(a.id,b),onEdit:()=>{t(a),o(!0)},onDelete:()=>B(a.id)},a.id))}),(0,d.jsx)("div",{className:"mt-4",children:(0,d.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>m(!0),children:"Add"})})]})]}),(0,d.jsx)(r,{isOpen:l,provider:a,proxyPools:f,onSave:E,onClose:()=>m(!1)}),(0,d.jsx)(i.wI,{isOpen:n,connection:p,proxyPools:f,onSave:F,onClose:()=>o(!1)})]})}function t({model:a,fullModel:b,copied:c,onCopy:e,testStatus:f,isCustom:g,isFree:h,onDeleteAlias:i,onTest:j,isTesting:k}){let l="ok"===f?"#22c55e":"error"===f?"#ef4444":void 0;return(0,d.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===f?"border-green-500/40":"error"===f?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",style:l?{color:l}:void 0,children:"ok"===f?"check_circle":"error"===f?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),a.name&&(0,d.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:a.name})]}),j&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:j,disabled:k,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${k?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:k?{animation:"spin 1s linear infinite"}:void 0,children:k?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:k?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>e(b,`model-${a.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a.id}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c===`model-${a.id}`?"Copied!":"Copy"})]}),h&&(0,d.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),g&&(0,d.jsx)("button",{onClick:i,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function u({isOpen:a,onSave:b,onClose:c}){let[e,f]=(0,h.useState)(""),g=()=>{e.trim()&&(b(e.trim()),f(""))};return(0,d.jsx)(i.aF,{isOpen:a,title:"Add Custom Model",onClose:c,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:e,onChange:a=>f(a.target.value),onKeyDown:a=>"Enter"===a.key&&g(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(i.$n,{onClick:g,fullWidth:!0,disabled:!e.trim(),children:"Add"}),(0,d.jsx)(i.$n,{onClick:c,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function v({providerId:a,kindFilter:b}){let{copied:c,copy:e}=(0,m.C)(),[f,g]=(0,h.useState)({}),[j,n]=(0,h.useState)([]),[o,p]=(0,h.useState)({}),[q,r]=(0,h.useState)(null),[s,w]=(0,h.useState)(""),[x,y]=(0,h.useState)(!1),[z,A]=(0,h.useState)([]),B=(0,k.wG)(a),C=b||"llm",D=(0,h.useCallback)(async()=>{try{let[b,c,d]=await Promise.all([fetch("/api/models/alias"),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/custom",{cache:"no-store"})]),e=await b.json(),f=await c.json(),h=await d.json();b.ok&&g(e.aliases||{}),c.ok&&A((f.connections||[]).filter(b=>b.provider===a)),d.ok&&n(h.models||[])}catch(a){console.log("ModelsCard fetch error:",a)}},[a]),E=async(a,b)=>{let c=`${B}/${a}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:c,alias:b})})).ok&&await D()}catch(a){console.log("set alias error:",a)}},F=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await D()}catch(a){console.log("delete alias error:",a)}},G=async a=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:B,id:a,type:C})})).ok&&await D()}catch(a){console.log("add custom model error:",a)}},H=async a=>{try{let b=new URLSearchParams({providerAlias:B,id:a,type:C});(await fetch(`/api/models/custom?${b}`,{method:"DELETE"})).ok&&await D()}catch(a){console.log("delete custom model error:",a)}},I=async a=>{if(!q){r(a);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${B}/${a}`,kind:b})}),d=await c.json();p(b=>({...b,[a]:d.ok?"ok":"error"})),w(d.ok?"":d.error||"Model not reachable")}catch{p(b=>({...b,[a]:"error"})),w("Network error")}finally{r(null)}}},J=(0,l.KC)(a),K=b?J.filter(a=>a.kinds?a.kinds.includes(b):(a.type||"llm")===b):J,L=j.filter(a=>a.providerAlias===B&&(a.type||"llm")===C&&!K.some(b=>b.id===a.id));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.Zp,{children:[(0,d.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,d.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",b?` — ${b.toUpperCase()}`:""]})}),s&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:s}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[K.map(a=>{let b=`${B}/${a.id}`,g=Object.entries(f).find(([,a])=>a===b)?.[0];return(0,d.jsx)(t,{model:a,fullModel:`${B}/${a.id}`,alias:g,copied:c,onCopy:e,onSetAlias:b=>E(a.id,b),onDeleteAlias:()=>F(g),testStatus:o[a.id],onTest:z.length>0?()=>I(a.id):void 0,isTesting:q===a.id,isFree:a.isFree},a.id)}),L.map(a=>(0,d.jsx)(t,{model:{id:a.id,name:a.name},fullModel:`${B}/${a.id}`,copied:c,onCopy:e,onSetAlias:()=>{},onDeleteAlias:()=>H(a.id),testStatus:o[a.id],onTest:z.length>0?()=>I(a.id):void 0,isTesting:q===a.id,isCustom:!0},`${a.id}-${a.type}`)),(0,d.jsxs)("button",{onClick:()=>y(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,d.jsx)(u,{isOpen:x,onSave:async a=>{await G(a),y(!1)},onClose:()=>y(!1)})]})}p.propTypes={until:o().string.isRequired},q.propTypes={connection:o().shape({id:o().string,name:o().string,email:o().string,displayName:o().string,testStatus:o().string,isActive:o().bool,lastError:o().string,priority:o().number}).isRequired,proxyPools:o().array,isOAuth:o().bool.isRequired,isFirst:o().bool.isRequired,isLast:o().bool.isRequired,onMoveUp:o().func.isRequired,onMoveDown:o().func.isRequired,onToggleActive:o().func.isRequired,onUpdateProxy:o().func,onEdit:o().func.isRequired,onDelete:o().func.isRequired},r.propTypes={isOpen:o().bool.isRequired,provider:o().string,providerName:o().string,proxyPools:o().array,onSave:o().func.isRequired,onClose:o().func.isRequired},s.propTypes={providerId:o().string.isRequired,isOAuth:o().bool},t.propTypes={model:o().shape({id:o().string.isRequired}).isRequired,fullModel:o().string.isRequired,copied:o().string,onCopy:o().func.isRequired,testStatus:o().oneOf(["ok","error"]),isCustom:o().bool,isFree:o().bool,onDeleteAlias:o().func,onTest:o().func,isTesting:o().bool},u.propTypes={isOpen:o().bool.isRequired,onSave:o().func.isRequired,onClose:o().func.isRequired},v.propTypes={providerId:o().string.isRequired,kindFilter:o().string};let w={"google-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"hardcoded"},openai:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openai-tts-models",voiceKey:"openai-tts-voices",voicesPerModel:!0},openrouter:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openrouter-tts-models",voiceKey:"openrouter-tts-voices",voicesPerModel:!0},elevenlabs:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"elevenlabs-tts-models",apiEndpoint:"/api/media-providers/tts/elevenlabs/voices"},"edge-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},"local-device":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"}};function x({label:a,children:b}){return(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted w-20 shrink-0",children:a}),(0,d.jsx)("div",{className:"flex-1",children:b})]})}c(52900);let y=`// Audio will appear here after running.
1
+ (()=>{var a={};a.id=182,a.ids=[182],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},7450:(a,b,c)=>{"use strict";c.r(b),c.d(b,{__next_app__:()=>M,handler:()=>O,routeModule:()=>N});var d=c(31975),e=c(30600),f=c(66116),g=c(27321),h=c(42431),i=c(34935),j=c(57326),k=c(63459),l=c(8555),m=c(67401),n=c(75869),o=c(42417),p=c(44612),q=c(261),r=c(14220),s=c(37353),t=c(26713),u=c(99509),v=c(31310),w=c(85426),x=c(80463),y=c(83665),z=c(9071),A=c(62091),B=c(86439),C=c(77068),D=c(44303),E=c(18045),F=c(71860),G=c(70722),H=c(19995),I=c(43954),J=c(17891),K={};for(let a in E)0>["default","__next_app__","routeModule","handler"].indexOf(a)&&(K[a]=()=>E[a]);c.d(b,K);let L={children:["",{children:["(dashboard)",{children:["dashboard",{children:["media-providers",{children:["[kind]",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,23476)),"/Users/Working/router4/app/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js"]}]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,75765,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,75765,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,75765,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{"global-error":[()=>Promise.resolve().then(c.t.bind(c,75765,23)),"next/dist/client/components/builtin/global-error.js"]},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,97934)),"/Users/Working/router4/app/src/app/(dashboard)/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,75765,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,13729,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,53532,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,4175,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,94638))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]},{layout:[()=>Promise.resolve().then(c.bind(c,6112)),"/Users/Working/router4/app/src/app/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,75765,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,13729,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,53532,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,4175,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,94638))).default(a)],apple:[],openGraph:[],twitter:[],manifest:"/manifest.webmanifest"}},[]]}.children,M={require:c,loadChunk:()=>Promise.resolve()},N=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/media-providers/[kind]/[id]/page",pathname:"/dashboard/media-providers/[kind]/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:L},distDir:".next",relativeProjectDir:""});async function O(a,b,d){var K,P,Q,R,S;d.requestMeta&&(0,h.setRequestMeta)(a,d.requestMeta),N.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let T=!!(0,h.getRequestMeta)(a,"minimalMode"),U="/(dashboard)/dashboard/media-providers/[kind]/[id]/page";"/index"===U&&(U="/");let V=await N.prepare(a,b,{srcPage:U,multiZoneDraftMode:!1});if(!V)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:W,query:X,params:Y,pageIsDynamic:Z,buildManifest:$,nextFontManifest:_,reactLoadableManifest:aa,serverActionsManifest:ab,clientReferenceManifest:ac,subresourceIntegrityManifest:ad,prerenderManifest:ae,isDraftMode:af,resolvedPathname:ag,revalidateOnlyGenerated:ah,routerServerContext:ai,nextConfig:aj,parsedUrl:ak,interceptionRoutePatterns:al,deploymentId:am,clientAssetToken:an}=V,ao=(0,q.normalizeAppPath)(U),{isOnDemandRevalidate:ap}=V,aq=aj.experimental.ppr&&!aj.cacheComponents&&(0,I.isInterceptionRouteAppPath)(ag)?null:N.match(ag,ae),ar=(null==aq?void 0:aq.route)??null,as=!!ae.routes[ag],at=a.headers["user-agent"]||"",au=(0,t.getBotType)(at),av=(0,p.isHtmlBotRequest)(a),aw=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[s.NEXT_ROUTER_PREFETCH_HEADER],ax=(0,h.getRequestMeta)(a,"isRSCRequest")??!!a.headers[s.RSC_HEADER],ay=(0,r.getIsPossibleServerAction)(a),az=(0,m.checkIsAppPPREnabled)(aj.experimental.ppr),aA=a.headers[x.NEXT_RESUME_STATE_LENGTH_HEADER];if(!(0,h.getRequestMeta)(a,"postponed")&&T&&az&&ay&&aA&&"string"==typeof aA){let e=parseInt(aA,10),{maxPostponedStateSize:f,maxPostponedStateSizeBytes:g}=(0,D.getMaxPostponedStateSize)(aj.experimental.maxPostponedStateSize);if(!isNaN(e)&&e>0){if(e>g)return b.statusCode=413,b.end((0,D.getPostponedStateExceededErrorMessage)(f)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let i="1 MB",j=(null==(S=aj.experimental.serverActions)?void 0:S.bodySizeLimit)??i,k=e+(j!==i?c(66716).parse(j):1048576),l=await (0,D.readBodyWithSizeLimit)(a,k);if(null===l)return b.statusCode=413,b.end("Request body exceeded limit. To configure the body size limit for Server Actions, see: https://nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;if(l.length>=e){let b=l.subarray(0,e).toString("utf8");(0,h.addRequestMeta)(a,"postponed",b);let c=l.subarray(e);(0,h.addRequestMeta)(a,"actionBody",c)}else throw Object.defineProperty(Error(`invariant: expected ${e} bytes of postponed state but only received ${l.length} bytes`),"__NEXT_ERROR_CODE",{value:"E979",enumerable:!1,configurable:!0})}}if(!(0,h.getRequestMeta)(a,"postponed")&&az&&"1"===a.headers[x.NEXT_RESUME_HEADER]&&"POST"===a.method){let{maxPostponedStateSize:c,maxPostponedStateSizeBytes:e}=(0,D.getMaxPostponedStateSize)(aj.experimental.maxPostponedStateSize),f=await (0,D.readBodyWithSizeLimit)(a,e);if(null===f)return b.statusCode=413,b.end((0,D.getPostponedStateExceededErrorMessage)(c)),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let g=f.toString("utf8");(0,h.addRequestMeta)(a,"postponed",g)}let aB=!0===N.isDev||!0===aj.experimental.exposeTestingApiInProductionBuild,aC=aB&&("1"===a.headers[s.NEXT_INSTANT_PREFETCH_HEADER]||void 0===a.headers[s.RSC_HEADER]&&"string"==typeof a.headers.cookie&&a.headers.cookie.includes(s.NEXT_INSTANT_TEST_COOKIE+"=")),aD=(az||aC)&&((null==(K=ae.routes[ao]??ae.dynamicRoutes[ao])?void 0:K.renderingMode)==="PARTIALLY_STATIC"||aC&&(aB||(null==ai?void 0:ai.experimentalTestProxy)===!0)),aE=aC&&aD,aF=aE&&!0===N.isDev,aG=!1,aH=aD?(0,h.getRequestMeta)(a,"postponed"):void 0,aI=null==(P=ae.routes[ag])?void 0:P.prefetchDataRoute,aJ=aD&&ax&&!aw&&!aI;T&&(aJ=aJ&&!!aH);let aK=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),aL=(!au||!aD)&&(!at||(0,p.shouldServeStreamingMetadata)(at,aj.htmlLimitedBots)),aM=!!((ar||as||ae.routes[ao])&&!(au&&aD)),aN=aD&&!0===aj.cacheComponents,aO=!0===N.isDev||!aM||"string"==typeof aH||(aN&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aJ&&!T:aJ),aP=!!au&&aD,aQ=(null==ar?void 0:ar.remainingPrerenderableParams)??[],aR=(null==ar?void 0:ar.fallback)===null&&((null==(Q=ar.fallbackRootParams)?void 0:Q.length)??0)>0,aS=null;if(!af&&aM&&!aO&&!ay&&!aH&&!aJ){let a=aq?"string"==typeof(null==ar?void 0:ar.fallback)?ar.fallback:aq.source:null;if(!0===aj.experimental.partialFallbacks&&a&&(null==ar?void 0:ar.fallbackRouteParams)&&!aR){if(aQ.length>0){let b,c=(b=new Map(aQ.map(a=>[a.paramName,a])),a.split("/").map(a=>{let c=(0,J.getSegmentParam)(a);if(!c)return a;let d=b.get(c.paramName);if(!d)return a;let e=null==Y?void 0:Y[d.paramName];if(!e)return a;let f=Array.isArray(e)?e.map(a=>encodeURIComponent(a)).join("/"):encodeURIComponent(e);return a.replace(function(a){let{repeat:b,optional:c}=(0,J.getParamProperties)(a.paramType);return c?`[[...${a.paramName}]]`:b?`[...${a.paramName}]`:`[${a.paramName}]`}(d),f)}).join("/")||"/");aS=c!==a?c:null}}else aS=ag}let aT=aS;!aT&&(N.isDev||aM&&Z&&(null==ar?void 0:ar.fallbackRouteParams)&&!ay)&&(aT=ag),N.isDev||af||!aM||!ax||aJ||(0,k.d)(a.headers);let aU={...E,tree:L,handler:O,routeModule:N,__next_app__:M};ab&&ac&&(0,o.setManifestsSingleton)({page:U,clientReferenceManifest:ac,serverActionsManifest:ab});let aV=a.method||"GET",aW=(0,g.getTracer)(),aX=aW.getActiveScopeSpan(),aY=!!(null==ai?void 0:ai.isWrappedByNextServer),aZ=!0===aj.experimental.partialFallbacks&&aQ.length>0?(null==ar||null==(R=ar.fallbackRouteParams)?void 0:R.filter(a=>!aQ.some(b=>b.paramName===a.paramName)))??[]:[],a$=async()=>((null==ai?void 0:ai.render404)?await ai.render404(a,b,ak,!1):b.end("This page could not be found"),null);try{let f,k=N.getVaryHeader(ag,al);b.setHeader("Vary",k);let m=async(c,d)=>{let e=new l.NodeNextRequest(a),g=new l.NodeNextResponse(b);return N.render(e,g,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aW.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aV} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a),f&&f!==c&&(f.setAttribute("http.route",d),f.updateName(a))}else c.updateName(`${aV} ${U}`)})},o=(0,h.getRequestMeta)(a,"incrementalCache")||await N.getIncrementalCache(a,aj,ae,T);null==o||o.resetRequestCache(),globalThis.__incrementalCache=o;let p=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let k={query:X,params:Y,page:ao,sharedContext:{buildId:W,deploymentId:am,clientAssetToken:an},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aU,Component:(0,j.T)(aU),params:Y,routeModule:N,page:U,postponed:f,shouldWaitOnAllReady:aP,serveStreamingMetadata:aL,supportsDynamicResponse:"string"==typeof f||aO,buildManifest:$,nextFontManifest:_,reactLoadableManifest:aa,subresourceIntegrityManifest:ad,setCacheStatus:null==ai?void 0:ai.setCacheStatus,setIsrStatus:null==ai?void 0:ai.setIsrStatus,setReactDebugChannel:null==ai?void 0:ai.setReactDebugChannel,sendErrorsToBrowser:null==ai?void 0:ai.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),N.relativeProjectDir),isDraftMode:af,botType:au,isOnDemandRevalidate:ap,isPossibleServerAction:ay,assetPrefix:aj.assetPrefix,nextConfigOutput:aj.output,crossOrigin:aj.crossOrigin,trailingSlash:aj.trailingSlash,images:aj.images,previewProps:ae.preview,enableTainting:aj.experimental.taint,htmlLimitedBots:aj.htmlLimitedBots,reactMaxHeadersLength:aj.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:o,cacheLifeProfiles:aj.cacheLife,basePath:aj.basePath,serverActions:aj.experimental.serverActions,logServerFunctions:"object"==typeof aj.logging&&!!aj.logging.serverFunctions,...aE||aF||aG?{isBuildTimePrerendering:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:aF}:{},cacheComponents:!!aj.cacheComponents,experimental:{isRoutePPREnabled:aD,expireTime:aj.expireTime,staleTimes:aj.experimental.staleTimes,dynamicOnHover:!!aj.experimental.dynamicOnHover,optimisticRouting:!!aj.experimental.optimisticRouting,inlineCss:!!aj.experimental.inlineCss,prefetchInlining:aj.experimental.prefetchInlining??!1,authInterrupts:!!aj.experimental.authInterrupts,cachedNavigations:!!aj.experimental.cachedNavigations,clientTraceMetadata:aj.experimental.clientTraceMetadata||[],clientParamParsingOrigins:aj.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,C.parseMaxPostponedStateSize)(aj.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>N.onRequestError(a,b,d,e,ai),err:(0,h.getRequestMeta)(a,"invokeError")}};i&&(k.renderOpts.supportsDynamicResponse=!1);let l=await m(e,k),{metadata:n}=l,{cacheControl:p,headers:q={},fetchTags:r,fetchMetrics:s}=n;if(r&&(q[x.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,aM&&(null==p?void 0:p.revalidate)===0&&!N.isDev&&!aD){let a=n.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ag}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
2
+ see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:u.CachedRouteKind.APP_PAGE,html:l,headers:q,rscData:n.flightData,postponed:n.postponed,status:n.statusCode,segmentData:n.segmentData},cacheControl:p}},q=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i,forceStaticRender:j=!1})=>{let k,l=!1===N.isDev,m=c||b.writableEnded;if(ap&&ah&&!f&&!T)return(null==ai?void 0:ai.render404)?await ai.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(ar&&(k=(0,v.parseFallbackField)(ar.fallback)),!0===aj.experimental.partialFallbacks&&(null==ar?void 0:ar.fallback)===null&&!aR&&aQ.length>0&&(k=v.FallbackMode.PRERENDER),k===v.FallbackMode.PRERENDER&&(0,t.isBot)(at)&&(!aD||av)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ap=!0),ap&&(k!==v.FallbackMode.NOT_FOUND||f)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),!T&&k!==v.FallbackMode.BLOCKING_STATIC_RENDER&&aT&&!m&&!af&&Z&&(l||!as)){if((l||ar)&&k===v.FallbackMode.NOT_FOUND){if(aj.adapterPath)return await a$();throw new B.NoFallbackError}if(aD&&(aj.cacheComponents?!aJ:!ax)){let b=l&&"string"==typeof(null==ar?void 0:ar.fallback)?ar.fallback:ao,f=(l||aE)&&(null==ar?void 0:ar.fallbackRouteParams)?(0,n.createOpaqueFallbackRouteParams)(ar.fallbackRouteParams):aG?(0,n.getFallbackRouteParams)(ao,N):null;aE&&f&&(0,h.addRequestMeta)(a,"fallbackParams",f);let g=await N.handleResponse({cacheKey:b,req:a,nextConfig:aj,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:ae,isRoutePPREnabled:aD,responseGenerator:async()=>p({span:i,postponed:void 0,fallbackRouteParams:f,forceStaticRender:!0}),waitUntil:d.waitUntil,isMinimalMode:T});if(null===g)return null;if(g)return T||!aD||!(aQ.length>0)||!0!==aj.experimental.partialFallbacks||!aS||!o||ap||aG||aB||aC||aw||(0,H.scheduleOnNextTick)(async()=>{let b=N.getResponseCache(a);try{await b.revalidate(aS,o,aD,!1,a=>p({span:a.span,postponed:void 0,fallbackRouteParams:aZ.length>0?(0,n.createOpaqueFallbackRouteParams)(aZ):null,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}),delete g.cacheControl,g}}let r=ap||g||!aH?void 0:aH;if(aN&&!T&&o&&(aJ||ay)&&!j){let b=await o.get(ag,{kind:u.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===u.CachedRouteKind.APP_PAGE&&(r=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,H.scheduleOnNextTick)(async()=>{let b=N.getResponseCache(a);try{await b.revalidate(ag,o,aD,!1,a=>q({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if((aE||aF)&&void 0!==r)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:u.CachedRouteKind.PAGES,html:w.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let s=(l&&(0,h.getRequestMeta)(a,"renderFallbackShell")||aE&&!as)&&(null==ar?void 0:ar.fallbackRouteParams)?(0,n.createOpaqueFallbackRouteParams)(ar.fallbackRouteParams):aG?(0,n.getFallbackRouteParams)(ao,N):null;if((l||aE)&&aj.cacheComponents&&!as&&(null==ar?void 0:ar.fallbackRouteParams)){let b=(0,n.createOpaqueFallbackRouteParams)(ar.fallbackRouteParams);b&&(0,h.addRequestMeta)(a,"fallbackParams",b)}return p({span:i,postponed:r,fallbackRouteParams:s,forceStaticRender:j})},r=async c=>{var f,g,i,j,k;let l,m=await N.handleResponse({cacheKey:aS,responseGenerator:a=>q({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ap,isRoutePPREnabled:aD,req:a,nextConfig:aj,prerenderManifest:ae,waitUntil:d.waitUntil,isMinimalMode:T});if(af&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),N.isDev&&b.setHeader("Cache-Control","no-cache, must-revalidate"),!m){if(aS)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=m.value)?void 0:f.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=m.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let n="string"==typeof m.value.postponed;ax&&!ay&&am&&b.setHeader(x.NEXT_NAV_DEPLOYMENT_ID_HEADER,am),aM&&!aJ&&(!n||aw)&&(T||b.setHeader("x-nextjs-cache",ap?"REVALIDATED":m.isMiss?"MISS":m.isStale?"STALE":"HIT"),b.setHeader(s.NEXT_IS_PRERENDER_HEADER,"1"));let{value:o}=m;if(aH)l={revalidate:0,expire:void 0};else if(aJ)l={revalidate:0,expire:void 0};else if(!N.isDev)if(af)l={revalidate:0,expire:void 0};else if(aM){if(m.cacheControl)if("number"==typeof m.cacheControl.revalidate){if(m.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${m.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:m.cacheControl.revalidate,expire:(null==(j=m.cacheControl)?void 0:j.expire)??aj.expireTime}}else l={revalidate:x.CACHE_ONE_YEAR_SECONDS,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(m.cacheControl=l,"string"==typeof aK&&(null==o?void 0:o.kind)===u.CachedRouteKind.APP_PAGE&&o.segmentData){b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=o.headers)?void 0:k[x.NEXT_CACHE_TAGS_HEADER];T&&aM&&c&&"string"==typeof c&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,c);let d=o.segmentData.get(aK);return void 0!==d?(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:w.default.fromStatic(d,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl}):(b.statusCode=204,(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl}))}let r=aN?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r(m,{url:(0,h.getRequestMeta)(a,"initURL")??a.url}))return null;if(o.headers){let a={...o.headers};for(let[c,d]of(T&&aM||delete a[x.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let t=null==(g=o.headers)?void 0:g[x.NEXT_CACHE_TAGS_HEADER];if(T&&aM&&t&&"string"==typeof t&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,t),!o.status||ax&&aD||(b.statusCode=o.status),!T&&o.status&&F.RedirectStatusCode[o.status]&&ax&&(b.statusCode=200),n&&!aJ&&b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"1"),ax&&!af){if(void 0===o.rscData){if(o.html.contentType!==s.RSC_CONTENT_TYPE_HEADER)if(aj.cacheComponents)return b.statusCode=404,(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl});else throw Object.defineProperty(new G.InvariantError(`Expected RSC response, got ${o.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:o.html,cacheControl:m.cacheControl})}return(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:w.default.fromStatic(o.rscData,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl})}let v=o.html;if(aC&&aE){let c=!0===N.isDev?crypto.randomUUID():null;return v.pipeThrough((0,z.createInstantTestScriptInsertionTransformStream)(c)),(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}})}if(!n||T||ax)return(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:v,cacheControl:m.cacheControl});if(aE||aF)return v.push(new ReadableStream({start(a){a.enqueue(y.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}});let B=new TransformStream;return v.push(B.readable),p({span:c,postponed:o.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(B.writable)}).catch(a=>{B.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,A.sendRenderResult)({req:a,res:b,generateEtags:aj.generateEtags,poweredByHeader:aj.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}})};if(!aY||!aX)return f=aW.getActiveScopeSpan(),await aW.withPropagatedContext(a.headers,()=>aW.trace(i.BaseServerSpan.handleRequest,{spanName:`${aV} ${U}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aV,"http.target":a.url}},r),void 0,!aY);await r(aX)}catch(b){throw b instanceof B.NoFallbackError||await N.onRequestError(a,b,{routerKind:"App Router",routePath:U,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:aM,isOnDemandRevalidate:ap})},!1,ai),b}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{"use strict";a.exports=require("assert")},14638:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>E});var d=c(26835),e=c(28217),f=c(30978),g=c.n(f),h=c(53830),i=c(50450),j=c(66298),k=c(30207),l=c(65839),m=c(93617),n=c(41183),o=c.n(n);function p({until:a}){let[b,c]=(0,h.useState)("");return b?(0,d.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",b]}):null}function q({connection:a,proxyPools:b,isOAuth:c,isFirst:e,isLast:f,onMoveUp:g,onMoveDown:j,onToggleActive:k,onUpdateProxy:l,onEdit:m,onDelete:n}){let[o,r]=(0,h.useState)(!1),[s,t]=(0,h.useState)(!1),[u,v]=(0,h.useState)(!1),w=(0,h.useRef)(null),x=new Map((b||[]).map(a=>[a.id,a])),y=a.providerSpecificData?.proxyPoolId||null,z=y?x.get(y):null,A=a.providerSpecificData?.connectionProxyEnabled===!0&&!!a.providerSpecificData?.connectionProxyUrl,B=!!y||A,C=z?`Pool: ${z.name}`:y?`Pool: ${y} (inactive/missing)`:A?`Legacy: ${a.providerSpecificData?.connectionProxyUrl}`:"",D="",E=z?.proxyUrl||a.providerSpecificData?.connectionProxyUrl;if(E)try{let a=new URL(E);D=`${a.protocol}//${a.hostname}${a.port?`:${a.port}`:""}`}catch{D=E}let F=z?.noProxy||a.providerSpecificData?.connectionNoProxy||"",G=z?.isActive===!0?"success":y||A?"error":"default",H=Object.entries(a).filter(([a])=>a.startsWith("modelLock_")).map(([,a])=>a).filter(Boolean).sort()[0]||null,I="unavailable"!==a.testStatus||u?a.testStatus:"active",J=c?a.name||a.email||a.displayName||"OAuth Account":a.name,K=async a=>{t(!0);try{await l("__none__"===a?null:a)}finally{t(!1),r(!1)}};return(0,d.jsxs)("div",{className:`group flex items-center justify-between p2 rounded-lg hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===a.isActive?"opacity-60":""}`,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("button",{onClick:g,disabled:e,className:`p-0.5 rounded ${e?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,d.jsx)("button",{onClick:j,disabled:f,className:`p-0.5 rounded ${f?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,d.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:c?"lock":"key"}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"text-sm font-medium truncate",children:J}),(0,d.jsxs)("div",{className:"flex items-center gap-2 mt-1 flex-wrap",children:[(0,d.jsx)(i.Ex,{variant:!1===a.isActive?"default":"active"===I||"success"===I?"success":"error"===I||"expired"===I||"unavailable"===I?"error":"default",size:"sm",dot:!0,children:!1===a.isActive?"disabled":I||"Unknown"}),B&&(0,d.jsx)(i.Ex,{variant:G,size:"sm",children:"Proxy"}),u&&!1!==a.isActive&&(0,d.jsx)(p,{until:H}),a.lastError&&!1!==a.isActive&&(0,d.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:a.lastError,children:a.lastError}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:["#",a.priority]})]}),B&&(0,d.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,d.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:C,children:C}),D&&(0,d.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:D}),F&&(0,d.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:F,children:["no_proxy: ",F]})]})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("div",{className:"flex gap-1",children:[(b||[]).length>0&&(0,d.jsxs)("div",{className:"relative",ref:w,children:[(0,d.jsxs)("button",{onClick:()=>r(a=>!a),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${B?"text-primary":"text-text-muted hover:text-primary"}`,disabled:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s?"progress_activity":"lan"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),o&&(0,d.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,d.jsx)("button",{onClick:()=>K("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!y?"text-primary font-medium":"text-text-main"}`,children:"None"}),(b||[]).map(a=>(0,d.jsx)("button",{onClick:()=>K(a.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${y===a.id?"text-primary font-medium":"text-text-main"}`,children:a.name},a.id))]})]}),(0,d.jsxs)("button",{onClick:m,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,d.jsxs)("button",{onClick:n,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,d.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,d.jsx)(i.lM,{size:"sm",checked:a.isActive??!0,onChange:k,title:a.isActive??!0?"Disable":"Enable"})]})]})}function r({isOpen:a,provider:b,providerName:c,proxyPools:e,onSave:f,onClose:g}){let j="__none__",[k,l]=(0,h.useState)({name:"",apiKey:"",priority:1,proxyPoolId:j}),[m,n]=(0,h.useState)(!1),[o,p]=(0,h.useState)(null),[q,s]=(0,h.useState)(!1),t=async()=>{n(!0);try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:k.apiKey})}),c=await a.json();p(c.valid?"success":"failed")}catch{p("failed")}finally{n(!1)}},u=async()=>{if(b&&k.apiKey){s(!0);try{let a=!1;try{n(!0),p(null);let c=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:b,apiKey:k.apiKey})});a=!!(await c.json()).valid,p(a?"success":"failed")}catch{p("failed")}finally{n(!1)}await f({name:k.name,apiKey:k.apiKey,priority:k.priority,proxyPoolId:k.proxyPoolId===j?null:k.proxyPoolId,testStatus:a?"active":"unknown"})}finally{s(!1)}}};return b?(0,d.jsx)(i.aF,{isOpen:a,title:`Add ${c||b} API Key`,onClose:g,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Name"}),(0,d.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:k.name,onChange:a=>l({...k,name:a.target.value}),placeholder:"Production Key"})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Key"}),(0,d.jsx)("input",{type:"password",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:k.apiKey,onChange:a=>l({...k,apiKey:a.target.value})})]}),(0,d.jsx)("div",{className:"pt-6",children:(0,d.jsx)(i.$n,{onClick:t,disabled:!k.apiKey||m||q,variant:"secondary",children:m?"Checking...":"Check"})})]}),o&&(0,d.jsx)(i.Ex,{variant:"success"===o?"success":"error",children:"success"===o?"Valid":"Invalid"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,d.jsx)("input",{type:"number",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:k.priority,onChange:a=>l({...k,priority:Number.parseInt(a.target.value)||1})})]}),(0,d.jsx)(i.l6,{label:"Proxy Pool",value:k.proxyPoolId,onChange:a=>l({...k,proxyPoolId:a.target.value}),options:[{value:j,label:"None"},...(e||[]).map(a=>({value:a.id,label:a.name}))]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(i.$n,{onClick:u,fullWidth:!0,disabled:!k.name||!k.apiKey||q,children:q?"Saving...":"Save"}),(0,d.jsx)(i.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function s({providerId:a,isOAuth:b}){let[c,e]=(0,h.useState)([]),[f,g]=(0,h.useState)([]),[j,k]=(0,h.useState)(!0),[l,m]=(0,h.useState)(!1),[n,o]=(0,h.useState)(!1),[p,t]=(0,h.useState)(null),[u,v]=(0,h.useState)(null),[w,x]=(0,h.useState)("1"),y=(0,h.useCallback)(async()=>{try{let[b,c,d]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),f=await b.json(),h=await c.json(),i=d.ok?await d.json():{};b.ok&&e((f.connections||[]).filter(b=>b.provider===a)),c.ok&&g(h.proxyPools||[]);let j=(i.providerStrategies||{})[a]||{};v(j.fallbackStrategy||null),x(null!=j.stickyRoundRobinLimit?String(j.stickyRoundRobinLimit):"1")}catch(a){console.log("ConnectionsCard fetch error:",a)}finally{k(!1)}},[a]),z=async(b,c)=>{try{let d=await fetch("/api/settings",{cache:"no-store"}),e=(d.ok?await d.json():{}).providerStrategies||{},f={};b&&(f.fallbackStrategy=b),"round-robin"===b&&""!==c&&(f.stickyRoundRobinLimit=Number(c)||3);let g={...e};0===Object.keys(f).length?delete g[a]:g[a]=f,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:g})})}catch(a){console.log("saveStrategy error:",a)}},A=async(a,b)=>{let d=[...c];[d[a],d[b]]=[d[b],d[a]],e(d);try{await Promise.all([fetch(`/api/providers/${d[a].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:a})}),fetch(`/api/providers/${d[b].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:b})})])}catch{await y()}},B=async a=>{if(confirm("Delete this connection?"))try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok&&e(b=>b.filter(b=>b.id!==a))}catch(a){console.log("delete error:",a)}},C=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:b})})).ok&&e(c=>c.map(c=>c.id===a?{...c,isActive:b}:c))}catch(a){console.log("toggle error:",a)}},D=async(a,b)=>{try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:b||null})})).ok&&e(c=>c.map(c=>c.id===a?{...c,providerSpecificData:{...c.providerSpecificData,proxyPoolId:b||null}}:c))}catch(a){console.log("proxy error:",a)}},E=async b=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:a,...b})})).ok&&(await y(),m(!1))}catch(a){console.log("save apikey error:",a)}},F=async a=>{try{(await fetch(`/api/providers/${p.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(await y(),o(!1))}catch(a){console.log("update connection error:",a)}};return j?(0,d.jsx)(i.Zp,{children:(0,d.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.Zp,{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,d.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,d.jsx)(i.lM,{checked:"round-robin"===u,onChange:a=>{let b=a?"round-robin":null;v(b),a&&!w&&x("1"),z(b,a?w||"1":w)}}),"round-robin"===u&&(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,d.jsx)("input",{type:"number",min:1,value:w,onChange:a=>{x(a.target.value),z("round-robin",a.target.value)},className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),0===c.length?(0,d.jsxs)("div",{className:"flex items-center justify-between",children:[(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,d.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>m(!0),children:"Add Connection"})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:c.map((a,e)=>(0,d.jsx)(q,{connection:a,proxyPools:f,isOAuth:b,isFirst:0===e,isLast:e===c.length-1,onMoveUp:()=>A(e,e-1),onMoveDown:()=>A(e,e+1),onToggleActive:b=>C(a.id,b),onUpdateProxy:b=>D(a.id,b),onEdit:()=>{t(a),o(!0)},onDelete:()=>B(a.id)},a.id))}),(0,d.jsx)("div",{className:"mt-4",children:(0,d.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>m(!0),children:"Add"})})]})]}),(0,d.jsx)(r,{isOpen:l,provider:a,proxyPools:f,onSave:E,onClose:()=>m(!1)}),(0,d.jsx)(i.wI,{isOpen:n,connection:p,proxyPools:f,onSave:F,onClose:()=>o(!1)})]})}function t({model:a,fullModel:b,copied:c,onCopy:e,testStatus:f,isCustom:g,isFree:h,onDeleteAlias:i,onTest:j,isTesting:k}){let l="ok"===f?"#22c55e":"error"===f?"#ef4444":void 0;return(0,d.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===f?"border-green-500/40":"error"===f?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base",style:l?{color:l}:void 0,children:"ok"===f?"check_circle":"error"===f?"cancel":"smart_toy"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:b}),a.name&&(0,d.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:a.name})]}),j&&(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:j,disabled:k,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${k?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",style:k?{animation:"spin 1s linear infinite"}:void 0,children:k?"progress_activity":"science"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:k?"Testing...":"Test"})]}),(0,d.jsxs)("div",{className:"relative group/btn",children:[(0,d.jsx)("button",{onClick:()=>e(b,`model-${a.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:c===`model-${a.id}`?"check":"content_copy"})}),(0,d.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c===`model-${a.id}`?"Copied!":"Copy"})]}),h&&(0,d.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),g&&(0,d.jsx)("button",{onClick:i,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function u({isOpen:a,onSave:b,onClose:c}){let[e,f]=(0,h.useState)(""),g=()=>{e.trim()&&(b(e.trim()),f(""))};return(0,d.jsx)(i.aF,{isOpen:a,title:"Add Custom Model",onClose:c,children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,d.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:e,onChange:a=>f(a.target.value),onKeyDown:a=>"Enter"===a.key&&g(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)(i.$n,{onClick:g,fullWidth:!0,disabled:!e.trim(),children:"Add"}),(0,d.jsx)(i.$n,{onClick:c,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function v({providerId:a,kindFilter:b,providerAliasOverride:c}){let{copied:e,copy:f}=(0,m.C)(),[g,j]=(0,h.useState)({}),[n,o]=(0,h.useState)([]),[p,q]=(0,h.useState)({}),[r,s]=(0,h.useState)(null),[w,x]=(0,h.useState)(""),[y,z]=(0,h.useState)(!1),[A,B]=(0,h.useState)([]),C=c||(0,k.wG)(a),D=b||"llm",E=(0,h.useCallback)(async()=>{try{let[b,c,d]=await Promise.all([fetch("/api/models/alias"),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/custom",{cache:"no-store"})]),e=await b.json(),f=await c.json(),g=await d.json();b.ok&&j(e.aliases||{}),c.ok&&B((f.connections||[]).filter(b=>b.provider===a)),d.ok&&o(g.models||[])}catch(a){console.log("ModelsCard fetch error:",a)}},[a]),F=async(a,b)=>{let c=`${C}/${a}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:c,alias:b})})).ok&&await E()}catch(a){console.log("set alias error:",a)}},G=async a=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&await E()}catch(a){console.log("delete alias error:",a)}},H=async a=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:C,id:a,type:D})})).ok&&await E()}catch(a){console.log("add custom model error:",a)}},I=async a=>{try{let b=new URLSearchParams({providerAlias:C,id:a,type:D});(await fetch(`/api/models/custom?${b}`,{method:"DELETE"})).ok&&await E()}catch(a){console.log("delete custom model error:",a)}},J=async a=>{if(!r){s(a);try{let c=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${C}/${a}`,kind:b})}),d=await c.json();q(b=>({...b,[a]:d.ok?"ok":"error"})),x(d.ok?"":d.error||"Model not reachable")}catch{q(b=>({...b,[a]:"error"})),x("Network error")}finally{s(null)}}},K=(0,l.KC)(a),L=b?K.filter(a=>a.kinds?a.kinds.includes(b):(a.type||"llm")===b):K,M=n.filter(a=>a.providerAlias===C&&(a.type||"llm")===D&&!L.some(b=>b.id===a.id));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.Zp,{children:[(0,d.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,d.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",b?` — ${b.toUpperCase()}`:""]})}),w&&(0,d.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:w}),(0,d.jsxs)("div",{className:"flex flex-wrap gap-3",children:[L.map(a=>{let b=`${C}/${a.id}`,c=Object.entries(g).find(([,a])=>a===b)?.[0];return(0,d.jsx)(t,{model:a,fullModel:`${C}/${a.id}`,alias:c,copied:e,onCopy:f,onSetAlias:b=>F(a.id,b),onDeleteAlias:()=>G(c),testStatus:p[a.id],onTest:A.length>0?()=>J(a.id):void 0,isTesting:r===a.id,isFree:a.isFree},a.id)}),M.map(a=>(0,d.jsx)(t,{model:{id:a.id,name:a.name},fullModel:`${C}/${a.id}`,copied:e,onCopy:f,onSetAlias:()=>{},onDeleteAlias:()=>I(a.id),testStatus:p[a.id],onTest:A.length>0?()=>J(a.id):void 0,isTesting:r===a.id,isCustom:!0},`${a.id}-${a.type}`)),(0,d.jsxs)("button",{onClick:()=>z(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,d.jsx)(u,{isOpen:y,onSave:async a=>{await H(a),z(!1)},onClose:()=>z(!1)})]})}p.propTypes={until:o().string.isRequired},q.propTypes={connection:o().shape({id:o().string,name:o().string,email:o().string,displayName:o().string,testStatus:o().string,isActive:o().bool,lastError:o().string,priority:o().number}).isRequired,proxyPools:o().array,isOAuth:o().bool.isRequired,isFirst:o().bool.isRequired,isLast:o().bool.isRequired,onMoveUp:o().func.isRequired,onMoveDown:o().func.isRequired,onToggleActive:o().func.isRequired,onUpdateProxy:o().func,onEdit:o().func.isRequired,onDelete:o().func.isRequired},r.propTypes={isOpen:o().bool.isRequired,provider:o().string,providerName:o().string,proxyPools:o().array,onSave:o().func.isRequired,onClose:o().func.isRequired},s.propTypes={providerId:o().string.isRequired,isOAuth:o().bool},t.propTypes={model:o().shape({id:o().string.isRequired}).isRequired,fullModel:o().string.isRequired,copied:o().string,onCopy:o().func.isRequired,testStatus:o().oneOf(["ok","error"]),isCustom:o().bool,isFree:o().bool,onDeleteAlias:o().func,onTest:o().func,isTesting:o().bool},u.propTypes={isOpen:o().bool.isRequired,onSave:o().func.isRequired,onClose:o().func.isRequired},v.propTypes={providerId:o().string.isRequired,kindFilter:o().string,providerAliasOverride:o().string};let w={"google-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"hardcoded"},openai:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openai-tts-models",voiceKey:"openai-tts-voices",voicesPerModel:!0},openrouter:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openrouter-tts-models",voiceKey:"openrouter-tts-voices",voicesPerModel:!0},elevenlabs:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"elevenlabs-tts-models",apiEndpoint:"/api/media-providers/tts/elevenlabs/voices"},"edge-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},"local-device":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"}};function x({label:a,children:b}){return(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted w-20 shrink-0",children:a}),(0,d.jsx)("div",{className:"flex-1",children:b})]})}c(52900);let y=`// Audio will appear here after running.
3
3
  // Example JSON response (response_format=json):
4
4
  {
5
5
  "format": "mp3",
@@ -25,7 +25,7 @@ see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__
25
25
  "data": [
26
26
  { "url": "...", "b64_json": "..." }
27
27
  ]
28
- }`},imageToText:{inputLabel:"Image URL",inputPlaceholder:"https://example.com/image.png",defaultInput:"https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg",bodyKey:"url",extraBody:{prompt:"Describe this image in detail"},defaultResponse:`{
28
+ }`,extraFields:[{key:"n",label:"n",type:"number",default:1,min:1,max:4},{key:"size",label:"Size",type:"select",default:"auto",options:["auto","1024x1024","1024x1536","1536x1024","1024x1792","1792x1024"]},{key:"quality",label:"Quality",type:"select",default:"auto",options:["auto","low","medium","high","standard","hd"]},{key:"background",label:"Background",type:"select",default:"auto",options:["auto","transparent","opaque"]},{key:"style",label:"Style",type:"select",default:"",options:["","vivid","natural"]},{key:"response_format",label:"Format",type:"select",default:"",options:["","url","b64_json"]},{key:"image_detail",label:"Image Detail",type:"select",default:"high",options:["auto","low","high","original"]},{key:"output_format",label:"Codec",type:"select",default:"png",options:["png","jpeg","webp"]}]},imageToText:{inputLabel:"Image URL",inputPlaceholder:"https://example.com/image.png",defaultInput:"https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg",bodyKey:"url",extraBody:{prompt:"Describe this image in detail"},defaultResponse:`{
29
29
  "text": "A cat sitting on a windowsill...",
30
30
  "model": "..."
31
31
  }`},stt:{inputLabel:"Audio URL",inputPlaceholder:"https://example.com/audio.mp3",defaultInput:"",bodyKey:"url",defaultResponse:`{
@@ -39,14 +39,16 @@ see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__
39
39
  "data": [
40
40
  { "url": "...", "format": "mp3" }
41
41
  ]
42
- }`}};function B({providerId:a}){let b=(0,k.wG)(a),c=(0,l.KC)(a).filter(a=>"embedding"===a.type),[e,f]=(0,h.useState)(c[0]?.id??""),[g,j]=(0,h.useState)("The quick brown fox jumps over the lazy dog"),[n,o]=(0,h.useState)(""),[p,q]=(0,h.useState)(!1),[r,s]=(0,h.useState)(""),[t,u]=(0,h.useState)(""),[v,w]=(0,h.useState)(null),[y,A]=(0,h.useState)(!1),[C,D]=(0,h.useState)(""),{copied:E,copy:F}=(0,m.C)(),{copied:G,copy:H}=(0,m.C)(),I=p?t:r,J=e?`${b}/${e}`:"",K=`curl -X POST ${I}/v1/embeddings \\
42
+ }`}};function B({providerId:a,customAlias:b}){let c=(0,k.gC)(a),e=c?b||a:(0,k.wG)(a),f=c?[]:(0,l.KC)(a).filter(a=>"embedding"===a.type),[g,j]=(0,h.useState)(f[0]?.id??""),[n,o]=(0,h.useState)("The quick brown fox jumps over the lazy dog"),[p,q]=(0,h.useState)(""),[r,s]=(0,h.useState)(""),[t,u]=(0,h.useState)(!1),[v,w]=(0,h.useState)(""),[y,A]=(0,h.useState)(""),[C,D]=(0,h.useState)(null),[E,F]=(0,h.useState)(!1),[G,H]=(0,h.useState)(""),{copied:I,copy:J}=(0,m.C)(),{copied:K,copy:L}=(0,m.C)(),M=t?y:v,N=g?`${e}/${g}`:"",O=()=>{let a={model:N,input:n.trim()},b=Number(p);return p&&Number.isFinite(b)&&b>0&&(a.dimensions=b),a},P=`curl -X POST ${M}/v1/embeddings \\
43
43
  -H "Content-Type: application/json" \\
44
- -H "Authorization: Bearer ${n||"YOUR_KEY"}" \\
45
- -d '{"model": "${J}", "input": "${g}"}'`,L=async()=>{if(!g.trim()||!J)return;A(!0),D(""),w(null);let a=Date.now();try{let b={"Content-Type":"application/json"};n&&(b.Authorization=`Bearer ${n}`);let c=await fetch("/api/v1/embeddings",{method:"POST",headers:b,body:JSON.stringify({model:J,input:g.trim()})}),d=Date.now()-a,e=await c.json();if(!c.ok)return void D(e?.error?.message||e?.error||`HTTP ${c.status}`);w({data:e,latencyMs:d})}catch(a){D(a.message||"Network error")}finally{A(!1)}},M=v?JSON.stringify(v.data,null,2):"";return(0,d.jsxs)(i.Zp,{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,d.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,d.jsx)(x,{label:"Model",children:(0,d.jsx)("select",{value:e,onChange:a=>f(a.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:c.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name||a.id},a.id))})}),(0,d.jsx)(x,{label:"Endpoint",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{value:I,onChange:a=>p?u(a.target.value):s(a.target.value),className:"flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",placeholder:"http://localhost:3000"}),t&&(0,d.jsxs)("button",{onClick:()=>q(a=>!a),title:p?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${p?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,d.jsx)(x,{label:"API Key",children:(0,d.jsx)("input",{type:"password",value:n,onChange:a=>o(a.target.value),placeholder:"sk-...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,d.jsx)(x,{label:"Input",children:(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{value:g,onChange:a=>j(a.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),g&&(0,d.jsx)("button",{type:"button",onClick:()=>j(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,d.jsxs)("div",{className:"mt-1",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("button",{onClick:()=>F(K),className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:E?"check":"content_copy"}),E?"Copied":"Copy"]}),(0,d.jsxs)("button",{onClick:L,disabled:y||!g.trim()||!J,className:"flex items-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:y?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),y?"Running...":"Run"]})]})]}),(0,d.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre",children:K})]}),C&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:C}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,d.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",v&&(0,d.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",v.latencyMs,"ms"]})]}),v&&(0,d.jsxs)("button",{onClick:()=>H(M),className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:G?"check":"content_copy"}),G?"Copied":"Copy"]})]}),(0,d.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre opacity-70",children:(a=>{if(!a)return z;let b=JSON.parse(JSON.stringify(a));return(b.data||[]).forEach(a=>{Array.isArray(a.embedding)&&a.embedding.length>4&&(a.embedding=[...a.embedding.slice(0,4).map(a=>parseFloat(a.toFixed(6))),`... (${a.embedding.length} dims)`])}),JSON.stringify(b,null,2)})(v?.data)})]})]})]})}function C({providerId:a}){let b=(0,k.wG)(a),c=w[a]||w["edge-tts"],[e,f]=(0,h.useState)(""),[g,j]=(0,h.useState)(""),[n,o]=(0,h.useState)(""),[p,q]=(0,h.useState)([]),[r,s]=(0,h.useState)(""),[t,u]=(0,h.useState)(()=>{if(c.hasModelSelector&&c.modelKey){let a=(0,l.KC)(c.modelKey);return a?.[0]?.id||""}return""}),[v,z]=(0,h.useState)("Hello, this is a text to speech test."),[A,B]=(0,h.useState)(""),[D,E]=(0,h.useState)(!1),[F,G]=(0,h.useState)(""),[H,I]=(0,h.useState)(""),[J,K]=(0,h.useState)("mp3"),[L,M]=(0,h.useState)(""),[N,O]=(0,h.useState)(null),[P,Q]=(0,h.useState)(!1),[R,S]=(0,h.useState)(""),[T,U]=(0,h.useState)(null),{copied:V,copy:W}=(0,m.C)(),[X,Y]=(0,h.useState)(!1),[Z,$]=(0,h.useState)([]),[_,aa]=(0,h.useState)(!1),[ab,ac]=(0,h.useState)(""),[ad,ae]=(0,h.useState)(""),[af,ag]=(0,h.useState)({}),ah=async()=>{if(Y(!0),ac(""),ae(""),!Z.length){aa(!0);try{if("hardcoded"===c.voiceSource){let b=c.voiceKey||a,d=(0,l.KC)(b).filter(a=>"tts"===a.type),e={};for(let a of d)e[a.id]||(e[a.id]={code:a.id,name:a.name,voices:[{id:a.id,name:a.name}]});ag(e),$(Object.values(e).sort((a,b)=>a.name.localeCompare(b.name)))}else{let b=c.apiEndpoint?c.apiEndpoint:`/api/media-providers/tts/voices?provider=${"local-device"===a?"local-device":"edge-tts"}`,d=await fetch(b),e=await d.json();if(e.error)return void ae(e.error);$(e.languages||[]),ag(e.byLang||{})}}catch(a){ae(a.message)}finally{aa(!1)}}},ai=ab?Z.filter(a=>a.name.toLowerCase().includes(ab.toLowerCase())||a.code.toLowerCase().includes(ab.toLowerCase())):Z,aj=D?H:F,ak=c.hasVoiceIdInput?n:e,al=c.hasModelSelector&&ak&&t?`${b}/${t}/${ak}`:ak?`${b}/${ak}`:"",am=`curl -X POST ${aj}/v1/audio/speech${"json"===J?"?response_format=json":""} \\
44
+ -H "Authorization: Bearer ${r||"YOUR_KEY"}" \\
45
+ -d '${JSON.stringify(O())}'`,Q=async()=>{if(!n.trim()||!N)return;F(!0),H(""),D(null);let a=Date.now();try{let b={"Content-Type":"application/json"};r&&(b.Authorization=`Bearer ${r}`);let c=await fetch("/api/v1/embeddings",{method:"POST",headers:b,body:JSON.stringify(O())}),d=Date.now()-a,e=await c.json();if(!c.ok)return void H(e?.error?.message||e?.error||`HTTP ${c.status}`);D({data:e,latencyMs:d})}catch(a){H(a.message||"Network error")}finally{F(!1)}},R=C?JSON.stringify(C.data,null,2):"";return(0,d.jsxs)(i.Zp,{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,d.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,d.jsx)(x,{label:"Model",children:c?(0,d.jsx)("input",{value:g,onChange:a=>j(a.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}):(0,d.jsx)("select",{value:g,onChange:a=>j(a.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:f.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name||a.id},a.id))})}),(0,d.jsx)(x,{label:"Endpoint",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{value:M,onChange:a=>t?A(a.target.value):w(a.target.value),className:"flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",placeholder:"http://localhost:3000"}),y&&(0,d.jsxs)("button",{onClick:()=>u(a=>!a),title:t?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${t?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,d.jsx)(x,{label:"API Key",children:(0,d.jsx)("input",{type:"password",value:r,onChange:a=>s(a.target.value),placeholder:"sk-...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,d.jsx)(x,{label:"Input",children:(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{value:n,onChange:a=>o(a.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),n&&(0,d.jsx)("button",{type:"button",onClick:()=>o(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,d.jsx)(x,{label:"Dimensions",children:(0,d.jsx)("input",{type:"number",min:"1",value:p,onChange:a=>q(a.target.value),placeholder:"optional, e.g. 512, 1024 (leave empty for default)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,d.jsxs)("div",{className:"mt-1",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("button",{onClick:()=>J(P),className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:I?"check":"content_copy"}),I?"Copied":"Copy"]}),(0,d.jsxs)("button",{onClick:Q,disabled:E||!n.trim()||!N,className:"flex items-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:E?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),E?"Running...":"Run"]})]})]}),(0,d.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre",children:P})]}),G&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:G}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,d.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",C&&(0,d.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",C.latencyMs,"ms"]})]}),C&&(0,d.jsxs)("button",{onClick:()=>L(R),className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:K?"check":"content_copy"}),K?"Copied":"Copy"]})]}),(0,d.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre opacity-70",children:(a=>{if(!a)return z;let b=JSON.parse(JSON.stringify(a));return(b.data||[]).forEach(a=>{Array.isArray(a.embedding)&&a.embedding.length>4&&(a.embedding=[...a.embedding.slice(0,4).map(a=>parseFloat(a.toFixed(6))),`... (${a.embedding.length} dims)`])}),JSON.stringify(b,null,2)})(C?.data)})]})]})]})}function C({providerId:a}){let b=(0,k.wG)(a),c=w[a]||w["edge-tts"],[e,f]=(0,h.useState)(""),[g,j]=(0,h.useState)(""),[n,o]=(0,h.useState)(""),[p,q]=(0,h.useState)([]),[r,s]=(0,h.useState)(""),[t,u]=(0,h.useState)(()=>{if(c.hasModelSelector&&c.modelKey){let a=(0,l.KC)(c.modelKey);return a?.[0]?.id||""}return""}),[v,z]=(0,h.useState)("Hello, this is a text to speech test."),[A,B]=(0,h.useState)(""),[D,E]=(0,h.useState)(!1),[F,G]=(0,h.useState)(""),[H,I]=(0,h.useState)(""),[J,K]=(0,h.useState)("mp3"),[L,M]=(0,h.useState)(""),[N,O]=(0,h.useState)(null),[P,Q]=(0,h.useState)(!1),[R,S]=(0,h.useState)(""),[T,U]=(0,h.useState)(null),{copied:V,copy:W}=(0,m.C)(),[X,Y]=(0,h.useState)(!1),[Z,$]=(0,h.useState)([]),[_,aa]=(0,h.useState)(!1),[ab,ac]=(0,h.useState)(""),[ad,ae]=(0,h.useState)(""),[af,ag]=(0,h.useState)({}),ah=async()=>{if(Y(!0),ac(""),ae(""),!Z.length){aa(!0);try{if("hardcoded"===c.voiceSource){let b=c.voiceKey||a,d=(0,l.KC)(b).filter(a=>"tts"===a.type),e={};for(let a of d)e[a.id]||(e[a.id]={code:a.id,name:a.name,voices:[{id:a.id,name:a.name}]});ag(e),$(Object.values(e).sort((a,b)=>a.name.localeCompare(b.name)))}else{let b=c.apiEndpoint?c.apiEndpoint:`/api/media-providers/tts/voices?provider=${"local-device"===a?"local-device":"edge-tts"}`,d=await fetch(b),e=await d.json();if(e.error)return void ae(e.error);$(e.languages||[]),ag(e.byLang||{})}}catch(a){ae(a.message)}finally{aa(!1)}}},ai=ab?Z.filter(a=>a.name.toLowerCase().includes(ab.toLowerCase())||a.code.toLowerCase().includes(ab.toLowerCase())):Z,aj=D?H:F,ak=c.hasVoiceIdInput?n:e,al=c.hasModelSelector&&ak&&t?`${b}/${t}/${ak}`:ak?`${b}/${ak}`:"",am=`curl -X POST ${aj}/v1/audio/speech${"json"===J?"?response_format=json":""} \\
46
46
  -H "Content-Type: application/json" \\
47
47
  -H "Authorization: Bearer ${A||"YOUR_KEY"}" \\
48
48
  -d '{"model": "${al}", "input": "${v}"}' \\
49
- ${"json"===J?"":"--output speech.mp3"}`,an=async()=>{if(!v.trim()||!al)return;Q(!0),S(""),M(""),O(null);let a=Date.now();try{let b={"Content-Type":"application/json"};A&&(b.Authorization=`Bearer ${A}`);let c=`/api/v1/audio/speech${"json"===J?"?response_format=json":""}`,d=await fetch(c,{method:"POST",headers:b,body:JSON.stringify({model:al,input:v.trim()})});if(U(Date.now()-a),!d.ok){let a=await d.json().catch(()=>({}));S(a?.error?.message||a?.error||`HTTP ${d.status}`);return}if("json"===J){let a=await d.json();O(a);let b=await fetch(`data:audio/mp3;base64,${a.audio}`).then(a=>a.blob());M(URL.createObjectURL(b))}else{let a=await d.blob();M(URL.createObjectURL(a))}}catch(a){S(a.message||"Network error")}finally{Q(!1)}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.Zp,{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,d.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,d.jsx)(x,{label:"Endpoint",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("span",{className:"flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[aj,"/v1/audio/speech"]}),H&&(0,d.jsxs)("button",{onClick:()=>E(a=>!a),title:D?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${D?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,d.jsx)(x,{label:"API Key",children:(0,d.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:A?`${A.slice(0,8)}${"•".repeat(Math.min(20,A.length-8))}`:(0,d.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),c.hasModelSelector&&c.modelKey&&(0,d.jsx)(x,{label:"Model",children:(0,d.jsx)("select",{value:t,onChange:a=>u(a.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:((0,l.KC)(c.modelKey)||[]).map(a=>(0,d.jsx)("option",{value:a.id,children:a.name||a.id},a.id))})}),c.hasBrowseButton&&(0,d.jsx)(x,{label:"Language",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("button",{onClick:ah,className:"flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background font-mono truncate text-left hover:border-primary/40 transition-colors",children:r?(0,d.jsx)("span",{className:"text-text-main",children:Z.find(a=>a.code===r)?.name||r}):(0,d.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,d.jsxs)("button",{onClick:ah,className:"flex items-center gap-1 text-xs px-2.5 py-1.5 rounded-lg border border-border text-text-muted hover:text-primary hover:border-primary/40 transition-colors shrink-0",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"language"}),"Select language"]})]})}),p.length>0&&(0,d.jsx)(x,{label:"Voice",children:(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5",children:p.map(a=>(0,d.jsxs)("button",{onClick:()=>{f(a.id),j(a.name),c.hasVoiceIdInput&&o(a.id)},className:`px-2.5 py-1 rounded-full text-xs border transition-colors ${e===a.id?"bg-primary/15 border-primary/40 text-primary font-medium":"border-border text-text-muted hover:text-primary hover:border-primary/40"}`,children:[a.name,a.gender?` \xb7 ${a.gender[0].toUpperCase()}`:"",!0===a.free_users_allowed&&(0,d.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-green-500/15 text-green-600 border border-green-500/20",children:"Free"}),!1===a.free_users_allowed&&(0,d.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-amber-500/15 text-amber-600 border border-amber-500/20",children:"Paid"})]},a.id))})}),c.hasVoiceIdInput&&(0,d.jsx)(x,{label:"Voice ID",children:(0,d.jsx)("div",{className:"flex flex-col gap-1",children:(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{value:n,onChange:a=>{o(a.target.value),f(a.target.value)},placeholder:"e.g. CwhRBWXzGAHq8TQ4Fs17",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}),n&&(0,d.jsx)("button",{type:"button",onClick:()=>{o(""),f("")},className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})})}),c.hasLanguageDropdown&&(0,d.jsx)(x,{label:"Language",children:(0,d.jsx)("select",{value:e,onChange:b=>{let c=(0,l.KC)(a).filter(a=>"tts"===a.type).find(a=>a.id===b.target.value);f(b.target.value),j(c?.name||b.target.value)},className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(0,l.KC)(a).filter(a=>"tts"===a.type).map(a=>(0,d.jsx)("option",{value:a.id,children:a.name||a.id},a.id))})}),(0,d.jsx)(x,{label:"Input",children:(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{value:v,onChange:a=>z(a.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),v&&(0,d.jsx)("button",{type:"button",onClick:()=>z(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,d.jsx)(x,{label:"Output Format",children:(0,d.jsxs)("select",{value:J,onChange:a=>K(a.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,d.jsx)("option",{value:"mp3",children:"MP3 (Binary)"}),(0,d.jsx)("option",{value:"json",children:"JSON (Base64)"})]})}),(0,d.jsxs)("div",{className:"mt-1",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("button",{onClick:()=>W(am),className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:V?"check":"content_copy"}),V?"Copied":"Copy"]}),(0,d.jsxs)("button",{onClick:an,disabled:P||!v.trim()||!al,className:"flex items-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:P?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),P?"Generating...":"Run"]})]})]}),(0,d.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre",children:am})]}),R&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:R}),L?(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,d.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",T&&(0,d.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",T,"ms"]})]}),(0,d.jsxs)("a",{href:L,download:"speech.mp3",className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})]}),(0,d.jsx)("audio",{controls:!0,src:L,className:"w-full"}),N&&(0,d.jsxs)("div",{className:"mt-3",children:[(0,d.jsx)("div",{className:"flex items-center justify-between mb-1.5",children:(0,d.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"JSON Response"})}),(0,d.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:JSON.stringify({format:N.format,audio:N.audio?`${N.audio.substring(0,100)}...`:""},null,2)})]})]}):(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Response"}),(0,d.jsx)("pre",{className:"mt-1.5 bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre opacity-50",children:y})]})]})]}),X&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(2px)"},onClick:()=>Y(!1),children:(0,d.jsxs)("div",{className:"border border-border rounded-xl shadow-2xl w-full max-w-md mx-4 flex flex-col max-h-[80vh]",style:{backgroundColor:"var(--color-bg)",isolation:"isolate"},onClick:a=>a.stopPropagation(),children:[(0,d.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0 rounded-t-xl",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold",children:"Select Language"}),(0,d.jsx)("button",{onClick:()=>Y(!1),className:"text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,d.jsx)("div",{className:"px-4 py-2.5 border-b border-border shrink-0",children:(0,d.jsx)("input",{autoFocus:!0,value:ab,onChange:a=>ac(a.target.value),placeholder:"Search language...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,d.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[ad&&(0,d.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:ad}),_?(0,d.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"Loading..."}):(0,d.jsxs)("div",{className:"flex flex-col gap-0.5",children:[ai.map(a=>(0,d.jsxs)("button",{onClick:()=>{let b;return Y(!1),s(a.code),void(q(b=af[a.code]?.voices||[]),b.length&&(f(b[0].id),j(b[0].name),c.hasVoiceIdInput&&o(b[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${r===a.code?"bg-primary/10 text-primary":""}`,children:[(0,d.jsx)("span",{className:"text-sm",children:a.name}),(0,d.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:[a.voices.length," voices"]}),r===a.code&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},a.code)),0===ai.length&&(0,d.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}function D({providerId:a,kind:b}){let c=(0,k.wG)(a),e=k.rj.find(a=>a.id===b),f=A[b];if(!e||!f)return null;let g=(0,l.KC)(a).filter(a=>a.type===b),[j,n]=(0,h.useState)(g[0]?.id??""),[o,p]=(0,h.useState)(f.defaultInput),[q,r]=(0,h.useState)(""),[s,t]=(0,h.useState)(!1),[u,v]=(0,h.useState)(""),[w,y]=(0,h.useState)(""),[z,B]=(0,h.useState)(null),[C,E]=(0,h.useState)(!1),[F,G]=(0,h.useState)(""),{copied:H,copy:I}=(0,m.C)(),{copied:J,copy:K}=(0,m.C)(),L=s?w:u,M=e.endpoint.path,N=j?`${c}/${j}`:"",O={model:N,[f.bodyKey]:o,...f.extraBody},P=`curl -X ${e.endpoint.method} ${L}${M} \\
50
- -H "Content-Type: application/json" \\
51
- -H "Authorization: Bearer ${q||"YOUR_KEY"}" \\
52
- -d '${JSON.stringify(O)}'`,Q=async()=>{if(!o.trim()||!N)return;E(!0),G(""),B(null);let a=Date.now();try{let b={"Content-Type":"application/json"};q&&(b.Authorization=`Bearer ${q}`);let c={...O,model:N},d=await fetch(`/api${M}`,{method:e.endpoint.method,headers:b,body:JSON.stringify(c)}),f=Date.now()-a,g=await d.json();if(!d.ok)return void G(g?.error?.message||g?.error||`HTTP ${d.status}`);B({data:g,latencyMs:f})}catch(a){G(a.message||"Network error")}finally{E(!1)}},R=z?JSON.stringify(z.data,null,2):"";return(0,d.jsxs)(i.Zp,{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,d.jsxs)("div",{className:"flex flex-col gap-2.5",children:[g.length>0&&(0,d.jsx)(x,{label:"Model",children:(0,d.jsx)("select",{value:j,onChange:a=>n(a.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:g.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name||a.id},a.id))})}),(0,d.jsx)(x,{label:"Endpoint",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("span",{className:"flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[L,M]}),w&&(0,d.jsxs)("button",{onClick:()=>t(a=>!a),title:s?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${s?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,d.jsx)(x,{label:"API Key",children:(0,d.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:q?`${q.slice(0,8)}${"•".repeat(Math.min(20,q.length-8))}`:(0,d.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,d.jsx)(x,{label:f.inputLabel,children:(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{value:o,onChange:a=>p(a.target.value),placeholder:f.inputPlaceholder,className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),o&&(0,d.jsx)("button",{type:"button",onClick:()=>p(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,d.jsxs)("div",{className:"mt-1",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("button",{onClick:()=>I(P),className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:H?"check":"content_copy"}),H?"Copied":"Copy"]}),(0,d.jsxs)("button",{onClick:Q,disabled:C||!o.trim()||!N,className:"flex items-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:C?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),C?"Running...":"Run"]})]})]}),(0,d.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre",children:P})]}),F&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,d.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",z&&(0,d.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",z.latencyMs,"ms"]})]}),z&&(0,d.jsxs)("button",{onClick:()=>K(R),className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:J?"check":"content_copy"}),J?"Copied":"Copy"]})]}),(0,d.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre opacity-70",children:z?R:f.defaultResponse}),"image"===b&&z?.data?.data?.[0]&&(0,d.jsx)("img",{src:z.data.data[0].b64_json?`data:image/png;base64,${z.data.data[0].b64_json}`:z.data.data[0].url,alt:"Generated",className:"max-w-full rounded-lg border border-border mt-2"})]})]})]})}function E(){let{kind:a,id:b}=(0,e.useParams)(),c=k.rj.find(b=>b.id===a);if(!c)return(0,e.notFound)();let f=k.Q2[b];if(!f)return(0,e.notFound)();let h=f.serviceKinds??["llm"];return h.includes(a)?(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)(g(),{href:`/dashboard/media-providers/${a}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),c.label]}),(0,d.jsxs)("div",{className:"flex items-center gap-4",children:[(0,d.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${f.color}15`},children:(0,d.jsx)(j.A,{src:`/providers/${f.id}.png`,alt:f.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:f.textIcon||f.id.slice(0,2).toUpperCase(),fallbackColor:f.color})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:f.name}),(0,d.jsx)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:h.map(b=>(0,d.jsx)(i.Ex,{variant:b===a?"primary":"default",size:"sm",children:b.toUpperCase()},b))})]})]})]}),f.noAuth?(0,d.jsx)(i.Zp,{children:(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-10 h-10 rounded-full bg-green-500/10 text-green-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:"No authentication required"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"This provider is ready to use."})]})]})}):(0,d.jsx)(s,{providerId:b,isOAuth:!1}),"tts"!==a&&(0,d.jsx)(v,{providerId:b,kindFilter:a}),"embedding"===a&&(0,d.jsx)(B,{providerId:b}),"tts"===a&&(0,d.jsx)(C,{providerId:b}),A[a]&&(0,d.jsx)(D,{providerId:b,kind:a})]}):(0,e.notFound)()}},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},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")},23476:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/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.")},"/Users/Working/router4/app/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js","default")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},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")},33099:(a,b,c)=>{Promise.resolve().then(c.bind(c,14638))},33873:a=>{"use strict";a.exports=require("path")},38675:(a,b,c)=>{Promise.resolve().then(c.bind(c,23476))},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},76760:a=>{"use strict";a.exports=require("node:path")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},79551:a=>{"use strict";a.exports=require("url")},79646:a=>{"use strict";a.exports=require("child_process")},81115:a=>{"use strict";a.exports=require("constants")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[7773,3656,2566,5978,375,2371,5053,7770,1389,9737,8513,3774,8035,5290,450,3030],()=>b(b.s=7450));module.exports=c})();
49
+ ${"json"===J?"":"--output speech.mp3"}`,an=async()=>{if(!v.trim()||!al)return;Q(!0),S(""),M(""),O(null);let a=Date.now();try{let b={"Content-Type":"application/json"};A&&(b.Authorization=`Bearer ${A}`);let c=`/api/v1/audio/speech${"json"===J?"?response_format=json":""}`,d=await fetch(c,{method:"POST",headers:b,body:JSON.stringify({model:al,input:v.trim()})});if(U(Date.now()-a),!d.ok){let a=await d.json().catch(()=>({}));S(a?.error?.message||a?.error||`HTTP ${d.status}`);return}if("json"===J){let a=await d.json();O(a);let b=await fetch(`data:audio/mp3;base64,${a.audio}`).then(a=>a.blob());M(URL.createObjectURL(b))}else{let a=await d.blob();M(URL.createObjectURL(a))}}catch(a){S(a.message||"Network error")}finally{Q(!1)}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(i.Zp,{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,d.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,d.jsx)(x,{label:"Endpoint",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("span",{className:"flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[aj,"/v1/audio/speech"]}),H&&(0,d.jsxs)("button",{onClick:()=>E(a=>!a),title:D?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${D?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,d.jsx)(x,{label:"API Key",children:(0,d.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:A?`${A.slice(0,8)}${"•".repeat(Math.min(20,A.length-8))}`:(0,d.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),c.hasModelSelector&&c.modelKey&&(0,d.jsx)(x,{label:"Model",children:(0,d.jsx)("select",{value:t,onChange:a=>u(a.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:((0,l.KC)(c.modelKey)||[]).map(a=>(0,d.jsx)("option",{value:a.id,children:a.name||a.id},a.id))})}),c.hasBrowseButton&&(0,d.jsx)(x,{label:"Language",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("button",{onClick:ah,className:"flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background font-mono truncate text-left hover:border-primary/40 transition-colors",children:r?(0,d.jsx)("span",{className:"text-text-main",children:Z.find(a=>a.code===r)?.name||r}):(0,d.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,d.jsxs)("button",{onClick:ah,className:"flex items-center gap-1 text-xs px-2.5 py-1.5 rounded-lg border border-border text-text-muted hover:text-primary hover:border-primary/40 transition-colors shrink-0",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"language"}),"Select language"]})]})}),p.length>0&&(0,d.jsx)(x,{label:"Voice",children:(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5",children:p.map(a=>(0,d.jsxs)("button",{onClick:()=>{f(a.id),j(a.name),c.hasVoiceIdInput&&o(a.id)},className:`px-2.5 py-1 rounded-full text-xs border transition-colors ${e===a.id?"bg-primary/15 border-primary/40 text-primary font-medium":"border-border text-text-muted hover:text-primary hover:border-primary/40"}`,children:[a.name,a.gender?` \xb7 ${a.gender[0].toUpperCase()}`:"",!0===a.free_users_allowed&&(0,d.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-green-500/15 text-green-600 border border-green-500/20",children:"Free"}),!1===a.free_users_allowed&&(0,d.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-amber-500/15 text-amber-600 border border-amber-500/20",children:"Paid"})]},a.id))})}),c.hasVoiceIdInput&&(0,d.jsx)(x,{label:"Voice ID",children:(0,d.jsx)("div",{className:"flex flex-col gap-1",children:(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{value:n,onChange:a=>{o(a.target.value),f(a.target.value)},placeholder:"e.g. CwhRBWXzGAHq8TQ4Fs17",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}),n&&(0,d.jsx)("button",{type:"button",onClick:()=>{o(""),f("")},className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})})}),c.hasLanguageDropdown&&(0,d.jsx)(x,{label:"Language",children:(0,d.jsx)("select",{value:e,onChange:b=>{let c=(0,l.KC)(a).filter(a=>"tts"===a.type).find(a=>a.id===b.target.value);f(b.target.value),j(c?.name||b.target.value)},className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(0,l.KC)(a).filter(a=>"tts"===a.type).map(a=>(0,d.jsx)("option",{value:a.id,children:a.name||a.id},a.id))})}),(0,d.jsx)(x,{label:"Input",children:(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{value:v,onChange:a=>z(a.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),v&&(0,d.jsx)("button",{type:"button",onClick:()=>z(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,d.jsx)(x,{label:"Output Format",children:(0,d.jsxs)("select",{value:J,onChange:a=>K(a.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,d.jsx)("option",{value:"mp3",children:"MP3 (Binary)"}),(0,d.jsx)("option",{value:"json",children:"JSON (Base64)"})]})}),(0,d.jsxs)("div",{className:"mt-1",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("button",{onClick:()=>W(am),className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:V?"check":"content_copy"}),V?"Copied":"Copy"]}),(0,d.jsxs)("button",{onClick:an,disabled:P||!v.trim()||!al,className:"flex items-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:P?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),P?"Generating...":"Run"]})]})]}),(0,d.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre",children:am})]}),R&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:R}),L?(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,d.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",T&&(0,d.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",T,"ms"]})]}),(0,d.jsxs)("a",{href:L,download:"speech.mp3",className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})]}),(0,d.jsx)("audio",{controls:!0,src:L,className:"w-full"}),N&&(0,d.jsxs)("div",{className:"mt-3",children:[(0,d.jsx)("div",{className:"flex items-center justify-between mb-1.5",children:(0,d.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"JSON Response"})}),(0,d.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:JSON.stringify({format:N.format,audio:N.audio?`${N.audio.substring(0,100)}...`:""},null,2)})]})]}):(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Response"}),(0,d.jsx)("pre",{className:"mt-1.5 bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre opacity-50",children:y})]})]})]}),X&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(2px)"},onClick:()=>Y(!1),children:(0,d.jsxs)("div",{className:"border border-border rounded-xl shadow-2xl w-full max-w-md mx-4 flex flex-col max-h-[80vh]",style:{backgroundColor:"var(--color-bg)",isolation:"isolate"},onClick:a=>a.stopPropagation(),children:[(0,d.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0 rounded-t-xl",children:[(0,d.jsx)("h3",{className:"text-sm font-semibold",children:"Select Language"}),(0,d.jsx)("button",{onClick:()=>Y(!1),className:"text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,d.jsx)("div",{className:"px-4 py-2.5 border-b border-border shrink-0",children:(0,d.jsx)("input",{autoFocus:!0,value:ab,onChange:a=>ac(a.target.value),placeholder:"Search language...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,d.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[ad&&(0,d.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:ad}),_?(0,d.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"Loading..."}):(0,d.jsxs)("div",{className:"flex flex-col gap-0.5",children:[ai.map(a=>(0,d.jsxs)("button",{onClick:()=>{let b;return Y(!1),s(a.code),void(q(b=af[a.code]?.voices||[]),b.length&&(f(b[0].id),j(b[0].name),c.hasVoiceIdInput&&o(b[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${r===a.code?"bg-primary/10 text-primary":""}`,children:[(0,d.jsx)("span",{className:"text-sm",children:a.name}),(0,d.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:[a.voices.length," voices"]}),r===a.code&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},a.code)),0===ai.length&&(0,d.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}function D({providerId:a,kind:b}){let c=(0,k.wG)(a),e=k.rj.find(a=>a.id===b),f=A[b],g=f||{},j=(0,l.KC)(a).filter(a=>a.type===b),[n,o]=(0,h.useState)(j[0]?.id??""),p=j.find(a=>a.id===n),q=!!p?.capabilities?.includes("edit"),[r,s]=(0,h.useState)(g.defaultInput||""),[t,u]=(0,h.useState)(""),[v,w]=(0,h.useState)(()=>(g.extraFields||[]).reduce((a,b)=>(a[b.key]=b.default??"",a),{})),[y,z]=(0,h.useState)(""),[B,C]=(0,h.useState)(!1),[E,F]=(0,h.useState)(""),[G,H]=(0,h.useState)(""),[I,J]=(0,h.useState)(null),[K,L]=(0,h.useState)(null),[M,N]=(0,h.useState)(null),[O,P]=(0,h.useState)("json"),[Q,R]=(0,h.useState)(""),[S,T]=(0,h.useState)(!1),[U,V]=(0,h.useState)(""),[W,X]=(0,h.useState)([]),[Y,Z]=(0,h.useState)(""),{copied:$,copy:_}=(0,m.C)(),{copied:aa,copy:ab}=(0,m.C)();if(!e||!f)return null;let ac=B?G:E,ad=e.endpoint.path,ae=n?`${c}/${n}`:"",af=Object.entries(v).reduce((a,[b,c])=>(""===c||null==c||"number"==typeof c&&Number.isNaN(c)||(a[b]=c),a),{}),ag={model:ae,[f.bodyKey]:r,...f.extraBody,...af,...q&&t.trim()?{image:t.trim()}:{}},ah="image"===b&&"binary"===O,ai="image"===b&&"codex"===a&&!ah,aj=`${ad}${ah?"?response_format=binary":""}`,ak=`-H "Content-Type: application/json" \\
50
+ -H "Authorization: Bearer ${y||"YOUR_KEY"}"${Y?` \\
51
+ -H "x-connection-id: ${Y}"`:""}${ai?` \\
52
+ -H "Accept: text/event-stream"`:""}`,al=`curl -X ${e.endpoint.method} ${ac}${aj} \\
53
+ ${ak.replace(/\\\n /g,"\\\n ")} \\
54
+ -d '${JSON.stringify(ag)}'${ah?" \\\n --output image.png":""}`,am=async()=>{if(!r.trim()||!ae)return;if(T(!0),V(""),J(null),L(null),N(null),Q){try{URL.revokeObjectURL(Q)}catch{}R("")}let a=Date.now();try{let b={"Content-Type":"application/json"};y&&(b.Authorization=`Bearer ${y}`),Y&&(b["x-connection-id"]=Y),ai&&(b.Accept="text/event-stream");let c={...ag,model:ae},d=await fetch(`/api${aj}`,{method:e.endpoint.method,headers:b,body:JSON.stringify(c)});if(!d.ok){let a=await d.json().catch(()=>({}));V(a?.error?.message||a?.error||`HTTP ${d.status}`);return}let f=d.headers.get("content-type")||"";if(f.startsWith("image/")){let b=await d.blob(),c=URL.createObjectURL(b);R(c),J({data:{binary:!0,mime:f,size:b.size},latencyMs:Date.now()-a});return}if(f.includes("text/event-stream")&&d.body){let b=d.body.getReader(),c=new TextDecoder,e="",f=null,g=null;for(;;){let a,{done:d,value:h}=await b.read();if(d)break;for(e+=c.decode(h,{stream:!0});-1!==(a=e.indexOf("\n\n"));){let b=e.slice(0,a);e=e.slice(a+2);let c=null,d="";for(let a of b.split("\n"))a.startsWith("event:")?c=a.slice(6).trim():a.startsWith("data:")&&(d+=a.slice(5).trim());if(c)try{let a=d?JSON.parse(d):{};"progress"===c?L(a):"partial_image"===c?N(a):"done"===c?f=a:"error"===c&&(g=a?.message||"Stream error")}catch{}}}let h=Date.now()-a;if(g)return void V(g);f&&J({data:f,latencyMs:h})}else{let b=await d.json(),c=Date.now()-a;J({data:b,latencyMs:c})}}catch(a){V(a.message||"Network error")}finally{T(!1)}},an=a=>{if(!a||"object"!=typeof a)return a;if(Array.isArray(a))return a.map(an);let b={};for(let[c,d]of Object.entries(a))b[c]="b64_json"===c&&"string"==typeof d&&d.length>100?`<${d.length} chars base64>`:an(d);return b},ao=I?JSON.stringify(an(I.data),null,2):"";return(0,d.jsxs)(i.Zp,{children:[(0,d.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,d.jsxs)("div",{className:"flex flex-col gap-2.5",children:[j.length>0&&(0,d.jsx)(x,{label:"Model",children:(0,d.jsx)("select",{value:n,onChange:a=>o(a.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:j.map(a=>(0,d.jsx)("option",{value:a.id,children:a.name||a.id},a.id))})}),(0,d.jsx)(x,{label:"Endpoint",children:(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("span",{className:"flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ac,ad]}),G&&(0,d.jsxs)("button",{onClick:()=>C(a=>!a),title:B?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${B?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,d.jsx)(x,{label:"API Key",children:(0,d.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:y?`${y.slice(0,8)}${"•".repeat(Math.min(20,y.length-8))}`:(0,d.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),W.length>0&&(0,d.jsx)(x,{label:"Connection",children:(0,d.jsxs)("select",{value:Y,onChange:a=>Z(a.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,d.jsx)("option",{value:"",children:"Auto (by priority)"}),W.map(a=>{let b=a.providerSpecificData?.chatgptPlanType,c=a.email||a.name||a.id.slice(0,8);return(0,d.jsxs)("option",{value:a.id,children:[c,b?` [${b}]`:""]},a.id)})]})}),(0,d.jsx)(x,{label:f.inputLabel,children:(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{value:r,onChange:a=>s(a.target.value),placeholder:f.inputPlaceholder,className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),r&&(0,d.jsx)("button",{type:"button",onClick:()=>s(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),q&&(0,d.jsx)(x,{label:"Ref Image (URL)",children:(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"relative",children:[(0,d.jsx)("input",{value:t,onChange:a=>u(a.target.value),placeholder:"https://example.com/source.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),t&&(0,d.jsx)("button",{type:"button",onClick:()=>u(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),t.trim()&&(0,d.jsx)("img",{src:t.trim(),alt:"Reference",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:a=>{a.currentTarget.style.display="none"},onLoad:a=>{a.currentTarget.style.display="block"}})]})}),(f.extraFields||[]).filter(a=>Array.isArray(p?.params)&&p.params.includes(a.key)).map(a=>(0,d.jsx)(x,{label:a.label,children:"select"===a.type?(0,d.jsx)("select",{value:v[a.key]??"",onChange:b=>w(c=>({...c,[a.key]:b.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(a.options||[]).map(a=>(0,d.jsx)("option",{value:a,children:""===a?"(default)":a},a))}):(0,d.jsx)("input",{type:"number",value:v[a.key]??"",min:a.min,max:a.max,onChange:b=>w(c=>({...c,[a.key]:""===b.target.value?"":Number(b.target.value)})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})},a.key)),"image"===b&&(0,d.jsx)(x,{label:"Output Format",children:(0,d.jsxs)("select",{value:O,onChange:a=>P(a.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,d.jsx)("option",{value:"json",children:"JSON (Base64)"}),(0,d.jsx)("option",{value:"binary",children:"Binary File"})]})}),(0,d.jsxs)("div",{className:"mt-1",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("button",{onClick:()=>_(al),className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:$?"check":"content_copy"}),$?"Copied":"Copy"]}),(0,d.jsxs)("button",{onClick:am,disabled:S||!r.trim()||!ae,className:"flex items-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:S?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),S?"Running...":"Run"]})]})]}),(0,d.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre",children:al})]}),(S||K)&&ai&&(0,d.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2 rounded-lg bg-sidebar border border-border",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",style:S?{animation:"spin 1s linear infinite"}:void 0,children:S?"progress_activity":"check_circle"}),(0,d.jsxs)("span",{className:"text-xs text-text-muted",children:[K?.stage||"starting",!S&&K?.bytesReceived?` \xb7 ${(K.bytesReceived/1024).toFixed(1)} KB`:""]})]}),M?.b64_json&&!I&&(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Partial preview"}),(0,d.jsx)("img",{src:`data:image/png;base64,${M.b64_json}`,alt:"Partial",className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80"})]}),U&&(0,d.jsx)("p",{className:"text-xs text-red-500 break-words",children:U}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,d.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",I&&(0,d.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",I.latencyMs,"ms"]})]}),I&&(0,d.jsxs)("button",{onClick:()=>ab(ao),className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:aa?"check":"content_copy"}),aa?"Copied":"Copy"]})]}),(0,d.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre opacity-70",children:I?ao:f.defaultResponse}),"image"===b&&(Q||I?.data?.data?.[0])&&(0,d.jsxs)("div",{className:"mt-2",children:[(0,d.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,d.jsxs)("a",{href:Q||(I?.data?.data?.[0]?.b64_json?`data:image/png;base64,${I.data.data[0].b64_json}`:I?.data?.data?.[0]?.url||""),download:"image.png",className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,d.jsx)("img",{src:Q||(I?.data?.data?.[0]?.b64_json?`data:image/png;base64,${I.data.data[0].b64_json}`:I?.data?.data?.[0]?.url),alt:"Generated",className:"max-w-full rounded-lg border border-border"})]})]})]})]})}function E(){let{kind:a,id:b}=(0,e.useParams)(),c=(0,e.useRouter)(),f=k.rj.find(b=>b.id===a),l=(0,k.gC)(b)&&"embedding"===a,m=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${b}`,{method:"DELETE"})).ok&&c.push(`/dashboard/media-providers/${a}`)}catch(a){console.log("Error deleting custom embedding node:",a)}},[n,o]=(0,h.useState)(null),[p,q]=(0,h.useState)(l),[r,t]=(0,h.useState)(!1);if(!f)return(0,e.notFound)();let u=k.Q2[b],w=l?n?{id:b,name:n.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:u;if(!l&&!u||l&&!p&&!n)return(0,e.notFound)();if(l&&p)return(0,d.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let x=l?["embedding"]:w.serviceKinds??["llm"];return l||x.includes(a)?(0,d.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)(g(),{href:`/dashboard/media-providers/${a}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),f.label]}),(0,d.jsxs)("div",{className:"flex items-center gap-4",children:[(0,d.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${w.color}15`},children:(0,d.jsx)(j.A,{src:`/providers/${w.id}.png`,alt:w.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:w.textIcon||w.id.slice(0,2).toUpperCase(),fallbackColor:w.color})}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:w.name}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[l&&(0,d.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",n?.prefix]}),x.map(b=>(0,d.jsx)(i.Ex,{variant:b===a?"primary":"default",size:"sm",children:b.toUpperCase()},b))]})]}),l&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>t(!0),children:"Edit"}),(0,d.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:m,children:"Delete"})]})]})]}),!l&&w.kindNotice?.[a]&&(0,d.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,d.jsx)("p",{className:"text-sm",children:w.kindNotice[a]})]}),!l&&w.noAuth?(0,d.jsx)(i.Zp,{children:(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"inline-flex items-center justify-center w-10 h-10 rounded-full bg-green-500/10 text-green-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:"No authentication required"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"This provider is ready to use."})]})]})}):(0,d.jsx)(s,{providerId:b,isOAuth:!1}),"tts"!==a&&(0,d.jsx)(v,{providerId:b,kindFilter:a,providerAliasOverride:l?n?.prefix:void 0}),"embedding"===a&&(0,d.jsx)(B,{providerId:b,customAlias:n?.prefix}),"tts"===a&&(0,d.jsx)(C,{providerId:b}),!l&&A[a]&&(0,d.jsx)(D,{providerId:b,kind:a}),l&&(0,d.jsx)(i.x0,{isOpen:r,node:n,onClose:()=>t(!1),onSaved:a=>{o(a),t(!1)}})]}):(0,e.notFound)()}},17891:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/get-segment-param")},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")},23476:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/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.")},"/Users/Working/router4/app/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js","default")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},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")},33099:(a,b,c)=>{Promise.resolve().then(c.bind(c,14638))},33873:a=>{"use strict";a.exports=require("path")},38675:(a,b,c)=>{Promise.resolve().then(c.bind(c,23476))},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},76760:a=>{"use strict";a.exports=require("node:path")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},79551:a=>{"use strict";a.exports=require("url")},79646:a=>{"use strict";a.exports=require("child_process")},81115:a=>{"use strict";a.exports=require("constants")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[7773,3656,2566,5978,375,2371,5053,7770,1389,9737,8513,3774,8035,2049,450,3382],()=>b(b.s=7450));module.exports=c})();
@@ -1 +1 @@
1
- {"version":1,"files":["../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../../node_modules/next/dist/build/adapter/setup-node-env.external.js","../../../../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../../../../node_modules/next/dist/client/components/hooks-server-context.js","../../../../../../../../../node_modules/next/dist/client/components/static-generation-bailout.js","../../../../../../../../../node_modules/next/dist/client/lib/console.js","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../../../../../../node_modules/next/dist/compiled/source-map/source-map.js","../../../../../../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../../../../../../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../../../../../../../../../node_modules/next/dist/compiled/ws/index.js","../../../../../../../../../node_modules/next/dist/compiled/ws/package.json","../../../../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../../../../node_modules/next/dist/lib/framework/boundary-constants.js","../../../../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../../../../node_modules/next/dist/lib/picocolors.js","../../../../../../../../../node_modules/next/dist/lib/scheduler.js","../../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../../../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../../../../node_modules/next/dist/server/app-render/dynamic-rendering.js","../../../../../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js","../../../../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../../../../node_modules/next/dist/server/app-render/staged-rendering.js","../../../../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../../../../node_modules/next/dist/server/dev/browser-logs/file-logger.js","../../../../../../../../../node_modules/next/dist/server/dynamic-rendering-utils.js","../../../../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../../../../node_modules/next/dist/server/lib/parse-stack.js","../../../../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../../../../node_modules/next/dist/server/lib/source-maps.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../../../../node_modules/next/dist/server/node-environment-baseline.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-dim.external.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-exit.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-file.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/date.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/io-utils.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/random.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../../../../../../../../../node_modules/next/dist/server/node-environment.js","../../../../../../../../../node_modules/next/dist/server/node-polyfill-crypto.js","../../../../../../../../../node_modules/next/dist/server/patch-error-inspect.js","../../../../../../../../../node_modules/next/dist/server/require-hook.js","../../../../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../../../../../node_modules/next/dist/shared/lib/promise-with-resolvers.js","../../../../../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../../../../../node_modules/next/dist/shared/lib/router/utils/get-segment-param.js","../../../../../../../../../node_modules/next/dist/shared/lib/router/utils/html-bots.js","../../../../../../../../../node_modules/next/dist/shared/lib/router/utils/interception-routes.js","../../../../../../../../../node_modules/next/dist/shared/lib/router/utils/is-bot.js","../../../../../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../../../../node_modules/next/dist/shared/lib/size-limit.js","../../../../../../../../../node_modules/next/package.json","../../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../../node_modules/react/cjs/react.production.js","../../../../../../../../../node_modules/react/index.js","../../../../../../../../../node_modules/react/package.json","../../../../../../../../package.json","../../../../../../../package.json","../../../../../../chunks/1249.js","../../../../../../chunks/1389.js","../../../../../../chunks/2371.js","../../../../../../chunks/2566.js","../../../../../../chunks/3030.js","../../../../../../chunks/3656.js","../../../../../../chunks/375.js","../../../../../../chunks/3774.js","../../../../../../chunks/450.js","../../../../../../chunks/5053.js","../../../../../../chunks/5290.js","../../../../../../chunks/5978.js","../../../../../../chunks/64.js","../../../../../../chunks/7770.js","../../../../../../chunks/7773.js","../../../../../../chunks/8035.js","../../../../../../chunks/8513.js","../../../../../../chunks/9737.js","../../../../../../webpack-runtime.js","page_client-reference-manifest.js"]}
1
+ {"version":1,"files":["../../../../../../../../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../../../../../../../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../../../../../../../../node_modules/@swc/helpers/package.json","../../../../../../../../../node_modules/next/dist/build/adapter/setup-node-env.external.js","../../../../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../../../../node_modules/next/dist/client/components/hooks-server-context.js","../../../../../../../../../node_modules/next/dist/client/components/static-generation-bailout.js","../../../../../../../../../node_modules/next/dist/client/lib/console.js","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../../../../node_modules/next/dist/compiled/bytes/index.js","../../../../../../../../../node_modules/next/dist/compiled/bytes/package.json","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../../../../node_modules/next/dist/compiled/source-map/package.json","../../../../../../../../../node_modules/next/dist/compiled/source-map/source-map.js","../../../../../../../../../node_modules/next/dist/compiled/stacktrace-parser/package.json","../../../../../../../../../node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js","../../../../../../../../../node_modules/next/dist/compiled/ws/index.js","../../../../../../../../../node_modules/next/dist/compiled/ws/package.json","../../../../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../../../../node_modules/next/dist/lib/framework/boundary-constants.js","../../../../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../../../../node_modules/next/dist/lib/picocolors.js","../../../../../../../../../node_modules/next/dist/lib/scheduler.js","../../../../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../../../../node_modules/next/dist/server/app-render/console-async-storage-instance.js","../../../../../../../../../node_modules/next/dist/server/app-render/console-async-storage.external.js","../../../../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../../../../node_modules/next/dist/server/app-render/dynamic-rendering.js","../../../../../../../../../node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js","../../../../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../../../../node_modules/next/dist/server/app-render/staged-rendering.js","../../../../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../../../../node_modules/next/dist/server/dev/browser-logs/file-logger.js","../../../../../../../../../node_modules/next/dist/server/dynamic-rendering-utils.js","../../../../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../../../../node_modules/next/dist/server/lib/parse-stack.js","../../../../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../../../../node_modules/next/dist/server/lib/source-maps.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../../../../node_modules/next/dist/server/node-environment-baseline.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-dim.external.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-exit.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/console-file.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/date.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/error-inspect.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/io-utils.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/node-crypto.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/random.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js","../../../../../../../../../node_modules/next/dist/server/node-environment-extensions/web-crypto.js","../../../../../../../../../node_modules/next/dist/server/node-environment.js","../../../../../../../../../node_modules/next/dist/server/node-polyfill-crypto.js","../../../../../../../../../node_modules/next/dist/server/patch-error-inspect.js","../../../../../../../../../node_modules/next/dist/server/require-hook.js","../../../../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../../../../node_modules/next/dist/server/runtime-reacts.external.js","../../../../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../../../../node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js","../../../../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../../../../../node_modules/next/dist/shared/lib/promise-with-resolvers.js","../../../../../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../../../../../node_modules/next/dist/shared/lib/router/utils/get-segment-param.js","../../../../../../../../../node_modules/next/dist/shared/lib/router/utils/html-bots.js","../../../../../../../../../node_modules/next/dist/shared/lib/router/utils/interception-routes.js","../../../../../../../../../node_modules/next/dist/shared/lib/router/utils/is-bot.js","../../../../../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../../../../node_modules/next/dist/shared/lib/size-limit.js","../../../../../../../../../node_modules/next/package.json","../../../../../../../../../node_modules/react/cjs/react.development.js","../../../../../../../../../node_modules/react/cjs/react.production.js","../../../../../../../../../node_modules/react/index.js","../../../../../../../../../node_modules/react/package.json","../../../../../../../../package.json","../../../../../../../package.json","../../../../../../chunks/1249.js","../../../../../../chunks/1389.js","../../../../../../chunks/2049.js","../../../../../../chunks/2371.js","../../../../../../chunks/2566.js","../../../../../../chunks/3382.js","../../../../../../chunks/3656.js","../../../../../../chunks/375.js","../../../../../../chunks/3774.js","../../../../../../chunks/450.js","../../../../../../chunks/5053.js","../../../../../../chunks/5978.js","../../../../../../chunks/64.js","../../../../../../chunks/7770.js","../../../../../../chunks/7773.js","../../../../../../chunks/8035.js","../../../../../../chunks/8513.js","../../../../../../chunks/9737.js","../../../../../../webpack-runtime.js","page_client-reference-manifest.js"]}