@exulu/frontend 1.0.3 → 1.1.0

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 (239) hide show
  1. package/dist/.next/BUILD_ID +1 -1
  2. package/dist/.next/app-build-manifest.json +192 -192
  3. package/dist/.next/app-path-routes-manifest.json +1 -1
  4. package/dist/.next/build-manifest.json +3 -3
  5. package/dist/.next/prerender-manifest.json +1 -1
  6. package/dist/.next/required-server-files.json +1 -1
  7. package/dist/.next/server/app/(application)/agents/edit/[id]/page.js +1 -1
  8. package/dist/.next/server/app/(application)/agents/edit/[id]/page.js.nft.json +1 -1
  9. package/dist/.next/server/app/(application)/agents/edit/[id]/page_client-reference-manifest.js +1 -1
  10. package/dist/.next/server/app/(application)/agents/page.js +2 -2
  11. package/dist/.next/server/app/(application)/agents/page.js.nft.json +1 -1
  12. package/dist/.next/server/app/(application)/agents/page_client-reference-manifest.js +1 -1
  13. package/dist/.next/server/app/(application)/chat/[agent]/[session]/page.js +2 -2
  14. package/dist/.next/server/app/(application)/chat/[agent]/[session]/page.js.nft.json +1 -1
  15. package/dist/.next/server/app/(application)/chat/[agent]/[session]/page_client-reference-manifest.js +1 -1
  16. package/dist/.next/server/app/(application)/chat/[agent]/page.js +1 -1
  17. package/dist/.next/server/app/(application)/chat/[agent]/page.js.nft.json +1 -1
  18. package/dist/.next/server/app/(application)/chat/[agent]/page_client-reference-manifest.js +1 -1
  19. package/dist/.next/server/app/(application)/chat/page.js +1 -1
  20. package/dist/.next/server/app/(application)/chat/page.js.nft.json +1 -1
  21. package/dist/.next/server/app/(application)/chat/page_client-reference-manifest.js +1 -1
  22. package/dist/.next/server/app/(application)/configuration/page.js +1 -1
  23. package/dist/.next/server/app/(application)/configuration/page.js.nft.json +1 -1
  24. package/dist/.next/server/app/(application)/configuration/page_client-reference-manifest.js +1 -1
  25. package/dist/.next/server/app/(application)/dashboard/page.js +2 -2
  26. package/dist/.next/server/app/(application)/dashboard/page.js.nft.json +1 -1
  27. package/dist/.next/server/app/(application)/dashboard/page_client-reference-manifest.js +1 -1
  28. package/dist/.next/server/app/(application)/data/[[...query]]/page.js +2 -2
  29. package/dist/.next/server/app/(application)/data/[[...query]]/page.js.nft.json +1 -1
  30. package/dist/.next/server/app/(application)/data/[[...query]]/page_client-reference-manifest.js +1 -1
  31. package/dist/.next/server/app/(application)/evals/[id]/page.js +1 -1
  32. package/dist/.next/server/app/(application)/evals/[id]/page.js.nft.json +1 -1
  33. package/dist/.next/server/app/(application)/evals/[id]/page_client-reference-manifest.js +1 -1
  34. package/dist/.next/server/app/(application)/evals/[id]/runs/page.js +1 -1
  35. package/dist/.next/server/app/(application)/evals/[id]/runs/page.js.nft.json +1 -1
  36. package/dist/.next/server/app/(application)/evals/[id]/runs/page_client-reference-manifest.js +1 -1
  37. package/dist/.next/server/app/(application)/evals/cases/page.js +1 -1
  38. package/dist/.next/server/app/(application)/evals/cases/page.js.nft.json +1 -1
  39. package/dist/.next/server/app/(application)/evals/cases/page_client-reference-manifest.js +1 -1
  40. package/dist/.next/server/app/(application)/evals/page.js +1 -1
  41. package/dist/.next/server/app/(application)/evals/page.js.nft.json +1 -1
  42. package/dist/.next/server/app/(application)/evals/page_client-reference-manifest.js +1 -1
  43. package/dist/.next/server/app/(application)/explorer/page.js +9 -9
  44. package/dist/.next/server/app/(application)/explorer/page.js.nft.json +1 -1
  45. package/dist/.next/server/app/(application)/explorer/page_client-reference-manifest.js +1 -1
  46. package/dist/.next/server/app/(application)/jobs/page.js +1 -1
  47. package/dist/.next/server/app/(application)/jobs/page.js.nft.json +1 -1
  48. package/dist/.next/server/app/(application)/jobs/page_client-reference-manifest.js +1 -1
  49. package/dist/.next/server/app/(application)/keys/page.js +1 -1
  50. package/dist/.next/server/app/(application)/keys/page.js.nft.json +1 -1
  51. package/dist/.next/server/app/(application)/keys/page_client-reference-manifest.js +1 -1
  52. package/dist/.next/server/app/(application)/page.js +1 -1
  53. package/dist/.next/server/app/(application)/page.js.nft.json +1 -1
  54. package/dist/.next/server/app/(application)/page_client-reference-manifest.js +1 -1
  55. package/dist/.next/server/app/(application)/projects/[project]/page.js +1 -1
  56. package/dist/.next/server/app/(application)/projects/[project]/page.js.nft.json +1 -1
  57. package/dist/.next/server/app/(application)/projects/[project]/page_client-reference-manifest.js +1 -1
  58. package/dist/.next/server/app/(application)/projects/page.js +1 -1
  59. package/dist/.next/server/app/(application)/projects/page.js.nft.json +1 -1
  60. package/dist/.next/server/app/(application)/projects/page_client-reference-manifest.js +1 -1
  61. package/dist/.next/server/app/(application)/roles/page.js +1 -1
  62. package/dist/.next/server/app/(application)/roles/page.js.nft.json +1 -1
  63. package/dist/.next/server/app/(application)/roles/page_client-reference-manifest.js +1 -1
  64. package/dist/.next/server/app/(application)/token/page.js +1 -1
  65. package/dist/.next/server/app/(application)/token/page.js.nft.json +1 -1
  66. package/dist/.next/server/app/(application)/token/page_client-reference-manifest.js +1 -1
  67. package/dist/.next/server/app/(application)/users/page.js +1 -1
  68. package/dist/.next/server/app/(application)/users/page.js.nft.json +1 -1
  69. package/dist/.next/server/app/(application)/users/page_client-reference-manifest.js +1 -1
  70. package/dist/.next/server/app/(application)/variables/create/page.js +1 -1
  71. package/dist/.next/server/app/(application)/variables/create/page.js.nft.json +1 -1
  72. package/dist/.next/server/app/(application)/variables/create/page_client-reference-manifest.js +1 -1
  73. package/dist/.next/server/app/(application)/variables/edit/[variable_id]/page.js +1 -1
  74. package/dist/.next/server/app/(application)/variables/edit/[variable_id]/page.js.nft.json +1 -1
  75. package/dist/.next/server/app/(application)/variables/edit/[variable_id]/page_client-reference-manifest.js +1 -1
  76. package/dist/.next/server/app/(application)/variables/page.js +1 -1
  77. package/dist/.next/server/app/(application)/variables/page.js.nft.json +1 -1
  78. package/dist/.next/server/app/(application)/variables/page_client-reference-manifest.js +1 -1
  79. package/dist/.next/server/app/(application)/variables/usage/[variable_id]/page.js +1 -1
  80. package/dist/.next/server/app/(application)/variables/usage/[variable_id]/page.js.nft.json +1 -1
  81. package/dist/.next/server/app/(application)/variables/usage/[variable_id]/page_client-reference-manifest.js +1 -1
  82. package/dist/.next/server/app/(application)/workflows/page.js +1 -1
  83. package/dist/.next/server/app/(application)/workflows/page.js.nft.json +1 -1
  84. package/dist/.next/server/app/(application)/workflows/page_client-reference-manifest.js +1 -1
  85. package/dist/.next/server/app/(authentication)/login/page.js +3 -3
  86. package/dist/.next/server/app/(authentication)/login/page.js.nft.json +1 -1
  87. package/dist/.next/server/app/(authentication)/login/page_client-reference-manifest.js +1 -1
  88. package/dist/.next/server/app/_not-found/page.js +1 -1
  89. package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  90. package/dist/.next/server/app/_not-found.html +1 -1
  91. package/dist/.next/server/app/_not-found.rsc +1 -1
  92. package/dist/.next/server/app/api/auth/[...nextauth]/route.js +2 -2
  93. package/dist/.next/server/app/api/config/route.js +2 -2
  94. package/dist/.next/server/app-paths-manifest.json +9 -9
  95. package/dist/.next/server/chunks/{2711.js → 3575.js} +1 -1
  96. package/dist/.next/server/chunks/{1558.js → 5192.js} +1 -1
  97. package/dist/.next/server/chunks/{9762.js → 7223.js} +5 -5
  98. package/dist/.next/server/chunks/{4470.js → 7944.js} +2 -2
  99. package/dist/.next/server/chunks/9049.js +2 -2
  100. package/dist/.next/server/middleware-build-manifest.js +1 -1
  101. package/dist/.next/server/middleware-manifest.json +5 -5
  102. package/dist/.next/server/middleware.js +2 -2
  103. package/dist/.next/server/next-font-manifest.js +1 -1
  104. package/dist/.next/server/next-font-manifest.json +1 -1
  105. package/dist/.next/server/pages/404.html +1 -1
  106. package/dist/.next/server/pages/500.html +1 -1
  107. package/dist/.next/server/pages-manifest.json +1 -1
  108. package/dist/.next/server/server-reference-manifest.json +1 -1
  109. package/dist/.next/static/chunks/2117-7e0e97ffa5867cf9.js.map +1 -1
  110. package/dist/.next/static/chunks/6111-5ab0e72a466543ea.js.map +1 -1
  111. package/dist/.next/static/chunks/7648-be88d7a414ab6394.js.map +1 -1
  112. package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/{page-7737da0d7329baf0.js → page-e622860a59223955.js} +2 -2
  113. package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/page-e622860a59223955.js.map +1 -0
  114. package/dist/.next/static/chunks/app/(application)/agents/{page-58d7ecbf04b75ef3.js → page-fe256553444f6e6f.js} +2 -2
  115. package/dist/.next/static/chunks/app/(application)/agents/page-fe256553444f6e6f.js.map +1 -0
  116. package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-beaa99a35c9e9bfc.js +2 -0
  117. package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-beaa99a35c9e9bfc.js.map +1 -0
  118. package/dist/.next/static/chunks/app/(application)/chat/[agent]/{layout-a701083f64a86849.js → layout-1736d0931ae3f866.js} +2 -2
  119. package/dist/.next/static/chunks/app/(application)/chat/[agent]/layout-1736d0931ae3f866.js.map +1 -0
  120. package/dist/.next/static/chunks/app/(application)/chat/[agent]/{page-2f7e3126e0e76d70.js → page-1538a952e1e99f94.js} +2 -2
  121. package/dist/.next/static/chunks/app/(application)/chat/[agent]/page-1538a952e1e99f94.js.map +1 -0
  122. package/dist/.next/static/chunks/app/(application)/chat/{layout-b934ba4c0a125683.js → layout-3fbafd811d12ed10.js} +2 -2
  123. package/dist/.next/static/chunks/app/(application)/chat/layout-3fbafd811d12ed10.js.map +1 -0
  124. package/dist/.next/static/chunks/app/(application)/configuration/{page-3aa96486933ae5dd.js → page-876d1d43a9cc36e4.js} +2 -2
  125. package/dist/.next/static/chunks/app/(application)/configuration/page-876d1d43a9cc36e4.js.map +1 -0
  126. package/dist/.next/static/chunks/app/(application)/dashboard/{page-2436e355871758ba.js → page-ca746e824cb97052.js} +2 -2
  127. package/dist/.next/static/chunks/app/(application)/dashboard/page-ca746e824cb97052.js.map +1 -0
  128. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/{layout-e073c74bd194e8cc.js → layout-47ad558a66e699c7.js} +2 -2
  129. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-47ad558a66e699c7.js.map +1 -0
  130. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/{page-375a978d25ee3a65.js → page-edcdd8944daaaef8.js} +2 -2
  131. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-edcdd8944daaaef8.js.map +1 -0
  132. package/dist/.next/static/chunks/app/(application)/evals/[id]/{page-b668fca1ba6993e2.js → page-5d4b8e351ee3265f.js} +2 -2
  133. package/dist/.next/static/chunks/app/(application)/evals/[id]/page-5d4b8e351ee3265f.js.map +1 -0
  134. package/dist/.next/static/chunks/app/(application)/evals/[id]/runs/{page-07969d6e5fb01d7b.js → page-4f0d1524fc7936d1.js} +2 -2
  135. package/dist/.next/static/chunks/app/(application)/evals/[id]/runs/page-4f0d1524fc7936d1.js.map +1 -0
  136. package/dist/.next/static/chunks/app/(application)/evals/cases/{page-0f25ee5d9498cbc5.js → page-47274d92d3daf16b.js} +2 -2
  137. package/dist/.next/static/chunks/app/(application)/evals/cases/page-47274d92d3daf16b.js.map +1 -0
  138. package/dist/.next/static/chunks/app/(application)/evals/page-e25d76c28076b126.js +2 -0
  139. package/dist/.next/static/chunks/app/(application)/evals/page-e25d76c28076b126.js.map +1 -0
  140. package/dist/.next/static/chunks/app/(application)/explorer/{page-d1580ece2ff5ba64.js → page-9f8ab38b5cd68c45.js} +2 -2
  141. package/dist/.next/static/chunks/app/(application)/explorer/page-9f8ab38b5cd68c45.js.map +1 -0
  142. package/dist/.next/static/chunks/app/(application)/jobs/{page-1f32c5e7202301b2.js → page-2d9a06a9959e7977.js} +2 -2
  143. package/dist/.next/static/chunks/app/(application)/jobs/page-2d9a06a9959e7977.js.map +1 -0
  144. package/dist/.next/static/chunks/app/(application)/keys/page-6ecb8218f18773b9.js +2 -0
  145. package/dist/.next/static/chunks/app/(application)/keys/page-6ecb8218f18773b9.js.map +1 -0
  146. package/dist/.next/static/chunks/app/(application)/layout-73d93420d0c6661c.js +2 -0
  147. package/dist/.next/static/chunks/app/(application)/layout-73d93420d0c6661c.js.map +1 -0
  148. package/dist/.next/static/chunks/app/(application)/{page-661f24beb316dabf.js → page-16a518c5864e6963.js} +2 -2
  149. package/dist/.next/static/chunks/app/(application)/page-16a518c5864e6963.js.map +1 -0
  150. package/dist/.next/static/chunks/app/(application)/projects/[project]/{page-cc6f6786682fd877.js → page-870b48a3e7f64f7d.js} +2 -2
  151. package/dist/.next/static/chunks/app/(application)/projects/[project]/page-870b48a3e7f64f7d.js.map +1 -0
  152. package/dist/.next/static/chunks/app/(application)/projects/{layout-3ef4b8519966eee7.js → layout-aa5baaf5cc644e70.js} +2 -2
  153. package/dist/.next/static/chunks/app/(application)/projects/layout-aa5baaf5cc644e70.js.map +1 -0
  154. package/dist/.next/static/chunks/app/(application)/projects/{page-6a38fd92beb3b45a.js → page-055a048a107095ed.js} +2 -2
  155. package/dist/.next/static/chunks/app/(application)/projects/page-055a048a107095ed.js.map +1 -0
  156. package/dist/.next/static/chunks/app/(application)/roles/page-b30682514e63b3f8.js +2 -0
  157. package/dist/.next/static/chunks/app/(application)/roles/page-b30682514e63b3f8.js.map +1 -0
  158. package/dist/.next/static/chunks/app/(application)/token/{page-19921b235606b9f3.js → page-f86eaf8c51fdbe52.js} +2 -2
  159. package/dist/.next/static/chunks/app/(application)/token/page-f86eaf8c51fdbe52.js.map +1 -0
  160. package/dist/.next/static/chunks/app/(application)/users/page-1a686fd83f765d8e.js +2 -0
  161. package/dist/.next/static/chunks/app/(application)/users/page-1a686fd83f765d8e.js.map +1 -0
  162. package/dist/.next/static/chunks/app/(application)/variables/create/{page-3d0e1788a92cba52.js → page-16582f525a24dd45.js} +2 -2
  163. package/dist/.next/static/chunks/app/(application)/variables/create/page-16582f525a24dd45.js.map +1 -0
  164. package/dist/.next/static/chunks/app/(application)/variables/edit/[variable_id]/{page-ad12a1419856c280.js → page-b37d9320812bb8f6.js} +2 -2
  165. package/dist/.next/static/chunks/app/(application)/variables/edit/[variable_id]/page-b37d9320812bb8f6.js.map +1 -0
  166. package/dist/.next/static/chunks/app/(application)/variables/{page-530fff39006ba055.js → page-9b438ce239c07987.js} +2 -2
  167. package/dist/.next/static/chunks/app/(application)/variables/page-9b438ce239c07987.js.map +1 -0
  168. package/dist/.next/static/chunks/app/(application)/variables/usage/[variable_id]/{page-11fc31486ee7764e.js → page-b1fe1791701d361e.js} +2 -2
  169. package/dist/.next/static/chunks/app/(application)/variables/usage/[variable_id]/page-b1fe1791701d361e.js.map +1 -0
  170. package/dist/.next/static/chunks/app/(application)/workflows/{page-feb479eaa043e041.js → page-93969baedc6f38ff.js} +2 -2
  171. package/dist/.next/static/chunks/app/(application)/workflows/page-93969baedc6f38ff.js.map +1 -0
  172. package/dist/.next/static/chunks/app/(authentication)/{layout-ed3d63f0ade93b47.js → layout-2dfa18ea6e6dc5cd.js} +2 -2
  173. package/dist/.next/static/chunks/app/(authentication)/layout-2dfa18ea6e6dc5cd.js.map +1 -0
  174. package/dist/.next/static/chunks/app/(authentication)/login/{error-65d2315c483bed81.js → error-c5f516f76e374400.js} +2 -2
  175. package/dist/.next/static/chunks/app/(authentication)/login/error-c5f516f76e374400.js.map +1 -0
  176. package/dist/.next/static/chunks/app/(authentication)/login/{page-3233ca86dc3297c3.js → page-4de4d6f64507c919.js} +2 -2
  177. package/dist/.next/static/chunks/app/(authentication)/login/page-4de4d6f64507c919.js.map +1 -0
  178. package/dist/.next/static/chunks/app/_not-found/page-3832d1eb6511168a.js.map +1 -1
  179. package/dist/.next/static/chunks/main-83299e0cc175f2ed.js.map +1 -1
  180. package/dist/.next/static/chunks/{main-app-e4276b9c44f225cb.js → main-app-da1df2757744a2ea.js} +2 -2
  181. package/dist/.next/static/chunks/main-app-da1df2757744a2ea.js.map +1 -0
  182. package/dist/.next/static/css/e3f2a16ab7676b05.css.map +1 -1
  183. package/dist/node_modules/sharp/build/Release/sharp-linux-x64.node +0 -0
  184. package/dist/node_modules/sharp/vendor/8.14.5/{darwin-arm64v8/lib/libvips-cpp.42.dylib → linux-x64/lib/libvips-cpp.so.42} +0 -0
  185. package/dist/node_modules/sharp/vendor/8.14.5/linux-x64/platform.json +1 -0
  186. package/dist/node_modules/sharp/vendor/8.14.5/{darwin-arm64v8 → linux-x64}/versions.json +1 -1
  187. package/dist/package.json +3 -2
  188. package/dist/server.js +1 -1
  189. package/index.js +37 -0
  190. package/package.json +7 -6
  191. package/release.config.cjs +30 -0
  192. package/dist/.env +0 -32
  193. package/dist/.next/static/chunks/app/(application)/agents/edit/[id]/page-7737da0d7329baf0.js.map +0 -1
  194. package/dist/.next/static/chunks/app/(application)/agents/page-58d7ecbf04b75ef3.js.map +0 -1
  195. package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-fb7ea4dc4cdb350b.js +0 -2
  196. package/dist/.next/static/chunks/app/(application)/chat/[agent]/[session]/page-fb7ea4dc4cdb350b.js.map +0 -1
  197. package/dist/.next/static/chunks/app/(application)/chat/[agent]/layout-a701083f64a86849.js.map +0 -1
  198. package/dist/.next/static/chunks/app/(application)/chat/[agent]/page-2f7e3126e0e76d70.js.map +0 -1
  199. package/dist/.next/static/chunks/app/(application)/chat/layout-b934ba4c0a125683.js.map +0 -1
  200. package/dist/.next/static/chunks/app/(application)/configuration/page-3aa96486933ae5dd.js.map +0 -1
  201. package/dist/.next/static/chunks/app/(application)/dashboard/page-2436e355871758ba.js.map +0 -1
  202. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/layout-e073c74bd194e8cc.js.map +0 -1
  203. package/dist/.next/static/chunks/app/(application)/data/[[...query]]/page-375a978d25ee3a65.js.map +0 -1
  204. package/dist/.next/static/chunks/app/(application)/evals/[id]/page-b668fca1ba6993e2.js.map +0 -1
  205. package/dist/.next/static/chunks/app/(application)/evals/[id]/runs/page-07969d6e5fb01d7b.js.map +0 -1
  206. package/dist/.next/static/chunks/app/(application)/evals/cases/page-0f25ee5d9498cbc5.js.map +0 -1
  207. package/dist/.next/static/chunks/app/(application)/evals/page-78bbdcf2c04a4ef9.js +0 -2
  208. package/dist/.next/static/chunks/app/(application)/evals/page-78bbdcf2c04a4ef9.js.map +0 -1
  209. package/dist/.next/static/chunks/app/(application)/explorer/page-d1580ece2ff5ba64.js.map +0 -1
  210. package/dist/.next/static/chunks/app/(application)/jobs/page-1f32c5e7202301b2.js.map +0 -1
  211. package/dist/.next/static/chunks/app/(application)/keys/page-9b13ab99042d606c.js +0 -2
  212. package/dist/.next/static/chunks/app/(application)/keys/page-9b13ab99042d606c.js.map +0 -1
  213. package/dist/.next/static/chunks/app/(application)/layout-cff96ce5805f0772.js +0 -2
  214. package/dist/.next/static/chunks/app/(application)/layout-cff96ce5805f0772.js.map +0 -1
  215. package/dist/.next/static/chunks/app/(application)/page-661f24beb316dabf.js.map +0 -1
  216. package/dist/.next/static/chunks/app/(application)/projects/[project]/page-cc6f6786682fd877.js.map +0 -1
  217. package/dist/.next/static/chunks/app/(application)/projects/layout-3ef4b8519966eee7.js.map +0 -1
  218. package/dist/.next/static/chunks/app/(application)/projects/page-6a38fd92beb3b45a.js.map +0 -1
  219. package/dist/.next/static/chunks/app/(application)/roles/page-d4a925d823a3c66c.js +0 -2
  220. package/dist/.next/static/chunks/app/(application)/roles/page-d4a925d823a3c66c.js.map +0 -1
  221. package/dist/.next/static/chunks/app/(application)/token/page-19921b235606b9f3.js.map +0 -1
  222. package/dist/.next/static/chunks/app/(application)/users/page-7cddc0528218c5c8.js +0 -2
  223. package/dist/.next/static/chunks/app/(application)/users/page-7cddc0528218c5c8.js.map +0 -1
  224. package/dist/.next/static/chunks/app/(application)/variables/create/page-3d0e1788a92cba52.js.map +0 -1
  225. package/dist/.next/static/chunks/app/(application)/variables/edit/[variable_id]/page-ad12a1419856c280.js.map +0 -1
  226. package/dist/.next/static/chunks/app/(application)/variables/page-530fff39006ba055.js.map +0 -1
  227. package/dist/.next/static/chunks/app/(application)/variables/usage/[variable_id]/page-11fc31486ee7764e.js.map +0 -1
  228. package/dist/.next/static/chunks/app/(application)/workflows/page-feb479eaa043e041.js.map +0 -1
  229. package/dist/.next/static/chunks/app/(authentication)/layout-ed3d63f0ade93b47.js.map +0 -1
  230. package/dist/.next/static/chunks/app/(authentication)/login/error-65d2315c483bed81.js.map +0 -1
  231. package/dist/.next/static/chunks/app/(authentication)/login/page-3233ca86dc3297c3.js.map +0 -1
  232. package/dist/.next/static/chunks/main-app-e4276b9c44f225cb.js.map +0 -1
  233. package/dist/node_modules/sharp/build/Release/sharp-darwin-arm64v8.node +0 -0
  234. package/dist/node_modules/sharp/vendor/8.14.5/darwin-arm64v8/include/harfbuzz/hb-cplusplus.hh +0 -223
  235. package/dist/node_modules/sharp/vendor/8.14.5/darwin-arm64v8/include/vips/vips8 +0 -60
  236. package/dist/node_modules/sharp/vendor/8.14.5/darwin-arm64v8/platform.json +0 -1
  237. /package/dist/.next/static/{5Vf-v5wyENpLUvLzma2J6 → Wt4IDtB-Xwfc0Z_CpMmtm}/_buildManifest.js +0 -0
  238. /package/dist/.next/static/{5Vf-v5wyENpLUvLzma2J6 → Wt4IDtB-Xwfc0Z_CpMmtm}/_ssgManifest.js +0 -0
  239. /package/dist/node_modules/sharp/vendor/8.14.5/{darwin-arm64v8 → linux-x64}/THIRD-PARTY-NOTICES.md +0 -0
@@ -1,2 +1,2 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8363],{70249:function(e,t,s){Promise.resolve().then(s.bind(s,20442))},20442:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return ea},dynamic:function(){return es}});var a=s(57437),n=s(2265),r=s(99376),l=s(12199),i=s(7211),d=s(13832),o=s(44045),c=s(64972),u=s(32660),m=s(99397),x=s(63639),h=s(65613),f=s(62869),p=s(66070),v=s(93022),j=s(27689),g=s(15863),b=s(26110),N=s(26815),y=s(95186),w=s(76818),_=s(53647),k=s(19060),C=s(77992),R=s(19378),Z=s(35974),T=s(6512);function S(e){var t,s,r,d,o,c,u,m,x;let{eval_set_id:h,onCreateSuccess:p,existingRun:v=null,open:S,onOpenChange:E}=e,{toast:z}=(0,C.pm)(),A=!!v,[O,M]=(0,n.useState)({id:"",name:"",rights_mode:"private",createdAt:"",updatedAt:"",eval_set_id:h,agent_id:"",eval_functions:[],scoring_method:"average",pass_threshold:70,timeout_in_seconds:300,test_case_ids:[]});(0,n.useEffect)(()=>{v?M(v):M({id:"",name:"",rights_mode:"private",createdAt:"",updatedAt:"",eval_set_id:h,agent_id:"",eval_functions:[],scoring_method:"average",pass_threshold:70,timeout_in_seconds:300,test_case_ids:[]})},[v,h]);let{data:P}=(0,i.aM)(j.ym,{variables:{page:1,limit:100,filters:[]},skip:!h}),{data:D}=(0,i.aM)(j.Ts,{skip:!h}),{data:q}=(0,i.aM)(j.RV,{variables:{page:1,limit:500,filters:[{eval_set_id:{eq:h}}]},skip:!h}),V=(null==q?void 0:null===(t=q.test_casesPagination)||void 0===t?void 0:t.items)||[],[I,{loading:F}]=(0,l.D)(j.oo,{onCompleted:()=>{z({title:"Eval run created",description:"The eval run has been created successfully. You can now run it."}),p&&p(),E(!1)},onError:e=>{z({title:"Failed to create eval run",description:e.message,variant:"destructive"})}}),[L,{loading:$}]=(0,l.D)(j.Nu,{onCompleted:()=>{z({title:"Eval run updated",description:"The eval run has been updated successfully."}),p&&p(),E(!1)},onError:e=>{z({title:"Failed to update eval run",description:e.message,variant:"destructive"})}}),Y=F||$,H=e=>{M(t=>({...t,test_case_ids:t.test_case_ids.includes(e)?t.test_case_ids.filter(t=>t!==e):[...t.test_case_ids,e]}))},J=()=>{M(e=>({...e,test_case_ids:e.test_case_ids.length===V.length?[]:V.map(e=>e.id)}))},B=e=>{M(t=>({...t,eval_functions:t.eval_functions.some(t=>t.id===e.id)?t.eval_functions.filter(t=>t.id!==e.id):[...t.eval_functions,e]}))};return(0,a.jsx)(b.Vq,{open:S,onOpenChange:E,children:(0,a.jsxs)(b.cZ,{className:"max-w-4xl h-[90vh] flex flex-col",children:[(0,a.jsxs)(b.fK,{children:[(0,a.jsx)(b.$N,{children:A?"Edit Eval Run":"Create Eval Run"}),(0,a.jsx)(b.Be,{children:A?"Update the configuration for this eval run.":"Configure a new evaluation run for this eval set."})]}),(0,a.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),console.log("[EXULU] Eval run",O),!O.name){z({title:"Validation error",description:"Please enter a name for this eval run.",variant:"destructive"});return}if(!O.agent_id){z({title:"Validation error",description:"Please select an agent.",variant:"destructive"});return}if(0===O.test_case_ids.length){z({title:"Validation error",description:"Please select at least one test case.",variant:"destructive"});return}if(0===O.eval_functions.length){z({title:"Validation error",description:"Please select at least one eval function.",variant:"destructive"});return}let t={name:O.name,eval_set_id:h,agent_id:O.agent_id,test_case_ids:O.test_case_ids,eval_functions:O.eval_functions,scoring_method:O.scoring_method.toUpperCase(),pass_threshold:O.pass_threshold,timeout_in_seconds:O.timeout_in_seconds,rights_mode:O.rights_mode,RBAC:O.RBAC};A?L({variables:{id:O.id,data:t}}):I({variables:{data:t}})},className:"flex-1 flex flex-col min-h-0",children:[(0,a.jsx)(R.x,{className:"flex-1 -mx-6 px-6",children:(0,a.jsxs)("div",{className:"space-y-6 pb-4",children:[(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:"Name"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Give this eval run a descriptive name"})]})}),(0,a.jsx)(y.I,{type:"text",placeholder:"e.g., GPT-4 baseline evaluation",value:O.name,onChange:e=>M(t=>({...t,name:e.target.value})),className:"h-11"})]}),(0,a.jsx)(T.Z,{}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:"Agent"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Choose which agent to evaluate"})]})}),(0,a.jsxs)(_.Ph,{value:O.agent_id,onValueChange:e=>M(t=>({...t,agent_id:e})),children:[(0,a.jsx)(_.i4,{className:"h-11",children:(0,a.jsx)(_.ki,{placeholder:"Select an agent..."})}),(0,a.jsx)(_.Bw,{children:null==P?void 0:null===(r=P.agentsPagination)||void 0===r?void 0:null===(s=r.items)||void 0===s?void 0:s.map(e=>(0,a.jsx)(_.Ql,{value:e.id,children:e.name},e.id))})]})]}),(0,a.jsx)(T.Z,{}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:"Eval Functions"}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:[O.eval_functions.length," of ",(null==D?void 0:null===(o=D.evals)||void 0===o?void 0:null===(d=o.items)||void 0===d?void 0:d.length)||0," selected"]})]})}),(0,a.jsx)(f.z,{type:"button",variant:"outline",size:"sm",onClick:e=>{var t,s;e.stopPropagation(),O.eval_functions.length===(null==D?void 0:null===(s=D.evals)||void 0===s?void 0:null===(t=s.items)||void 0===t?void 0:t.length)?M(e=>({...e,eval_functions:[]})):M(e=>{var t,s;return{...e,eval_functions:(null==D?void 0:null===(s=D.evals)||void 0===s?void 0:null===(t=s.items)||void 0===t?void 0:t.map(e=>({id:e.id,config:e.config})))||[]}})},children:O.eval_functions.length===(null==D?void 0:null===(u=D.evals)||void 0===u?void 0:null===(c=u.items)||void 0===c?void 0:c.length)?"Deselect All":"Select All"})]}),(0,a.jsx)("div",{className:"border rounded-lg bg-card",children:(0,a.jsx)("div",{className:"p-3 space-y-2",children:null==D?void 0:null===(x=D.evals)||void 0===x?void 0:null===(m=x.items)||void 0===m?void 0:m.map(e=>(0,a.jsxs)("label",{htmlFor:"eval-".concat(e.id),className:"flex items-start gap-3 p-3 rounded-md hover:bg-accent transition-colors cursor-pointer border border-transparent hover:border-border",children:[(0,a.jsx)(k.X,{id:"eval-".concat(e.id),checked:O.eval_functions.some(t=>t.id===e.id),onCheckedChange:()=>B({id:e.id,config:e.config}),className:"mt-0.5"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)("span",{className:"font-medium text-sm",children:e.name})}),e.description&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description}),e.config&&e.config.length>0&&O.eval_functions.some(t=>t.id===e.id)&&(0,a.jsxs)("div",{className:"mt-3 space-y-3 pt-3 border-t",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:"Configuration"}),e.config.map(t=>{var s,n;return(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)(N._,{htmlFor:"".concat(e.id,"-").concat(t.name),className:"text-xs font-medium",children:t.name}),(0,a.jsx)(w.g,{id:"".concat(e.id,"-").concat(t.name),placeholder:t.description,value:(null===(n=O.eval_functions.find(t=>t.id===e.id))||void 0===n?void 0:null===(s=n.config)||void 0===s?void 0:s[t.name])||"",onChange:s=>{s.stopPropagation(),M(a=>({...a,eval_functions:a.eval_functions.map(a=>a.id===e.id?{...a,config:{...a.config,[t.name]:s.target.value}}:a)}))},onClick:e=>e.stopPropagation(),className:"min-h-[80px] text-xs resize-none"}),t.description&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed",children:t.description})]},t.name)})]})]})]},e.id))})})]}),(0,a.jsx)(T.Z,{}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:"Test Cases"}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:[O.test_case_ids.length," of ",V.length," selected"]})]})}),(0,a.jsx)(f.z,{type:"button",variant:"outline",size:"sm",onClick:e=>{e.stopPropagation(),J()},children:O.test_case_ids.length===V.length?"Deselect All":"Select All"})]}),(0,a.jsx)("div",{className:"border rounded-lg bg-card",children:(0,a.jsx)(R.x,{className:"h-[250px]",children:(0,a.jsx)("div",{className:"p-3 space-y-2",children:V.map(e=>{var t;return(0,a.jsxs)("label",{htmlFor:"test-case-".concat(e.id),className:"flex items-start gap-3 p-3 rounded-md hover:bg-accent transition-colors cursor-pointer border border-transparent hover:border-border",children:[(0,a.jsx)(k.X,{id:"test-case-".concat(e.id),checked:O.test_case_ids.includes(e.id),onCheckedChange:()=>H(e.id),className:"mt-0.5"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"font-medium text-sm",children:e.name}),(0,a.jsxs)(Z.C,{variant:"secondary",className:"text-[10px] shrink-0",children:[(null===(t=e.inputs)||void 0===t?void 0:t.length)||0," msgs"]})]}),e.description&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]},e.id)})})})})]}),(0,a.jsx)(T.Z,{}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:"Scoring"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Configure how scores are calculated"})]})}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 p-4 border rounded-lg bg-muted/30",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(N._,{htmlFor:"scoringMethod",className:"text-xs font-semibold",children:"Scoring Method"}),(0,a.jsxs)(_.Ph,{value:O.scoring_method,onValueChange:e=>M(t=>({...t,scoring_method:e})),children:[(0,a.jsx)(_.i4,{id:"scoringMethod",className:"h-10",children:(0,a.jsx)(_.ki,{})}),(0,a.jsxs)(_.Bw,{children:[(0,a.jsx)(_.Ql,{value:"median",children:"Median"}),(0,a.jsx)(_.Ql,{value:"average",children:"Average"}),(0,a.jsx)(_.Ql,{value:"sum",children:"Sum"})]})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"How to combine multiple eval function scores"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(N._,{htmlFor:"passThreshold",className:"text-xs font-semibold",children:"Pass Threshold"}),(0,a.jsx)(y.I,{id:"passThreshold",type:"number",min:"0",max:"100",value:O.pass_threshold,onChange:e=>M(t=>({...t,pass_threshold:Number(e.target.value)})),className:"h-10"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Minimum score (0-100) to pass"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(N._,{htmlFor:"timeoutInSeconds",className:"text-xs font-semibold",children:"Timeout (seconds)"}),(0,a.jsx)(y.I,{id:"timeoutInSeconds",type:"number",min:"1",value:O.timeout_in_seconds,onChange:e=>M(t=>({...t,timeout_in_seconds:Number(e.target.value)})),className:"h-10"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Max time per test case execution"})]})]})]})]})}),(0,a.jsx)(T.Z,{className:"my-4"}),(0,a.jsx)(b.cN,{className:"shrink-0",children:(0,a.jsxs)(f.z,{type:"submit",disabled:Y||!O.name||!O.agent_id||0===O.test_case_ids.length||0===O.eval_functions.length,className:"w-full h-11",children:[Y&&(0,a.jsx)(g.Z,{className:"mr-2 h-4 w-4 animate-spin"}),A?"Update Eval Run":"Create Eval Run"]})})]})]})})}var E=s(69304),z=s(84190),A=s(92451),O=s(17684),M=s(15868),P=s(33276),D=s(39763);let q=(0,D.Z)("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);var V=s(27107),I=s(91723),F=s(45131);let L=(0,D.Z)("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);var $=s(94508);let Y={waiting:(0,a.jsx)(I.Z,{className:"h-3 w-3"}),active:(0,a.jsx)(g.Z,{className:"h-3 w-3 animate-spin"}),completed:null,failed:(0,a.jsx)(F.Z,{className:"h-3 w-3"}),delayed:(0,a.jsx)(I.Z,{className:"h-3 w-3"}),paused:(0,a.jsx)(L,{className:"h-3 w-3"}),stuck:(0,a.jsx)(x.Z,{className:"h-3 w-3"})},H={waiting:"text-yellow-600 bg-yellow-50 border-yellow-200",active:"text-blue-600 bg-blue-50 border-blue-200",completed:"",failed:"text-red-600 bg-red-50 border-red-200",delayed:"text-orange-600 bg-orange-50 border-orange-200",paused:"text-gray-600 bg-gray-50 border-gray-200",stuck:"text-red-600 bg-red-50 border-red-200"};function J(e){var t;let{evalRun:s,testCases:n,onCellClick:r}=e,{data:l,loading:d}=(0,i.aM)(j.JL,{variables:{page:1,limit:500,filters:[{label:{contains:"eval-run-"+s.id}}]},skip:!s.id}),o=(null==l?void 0:null===(t=l.job_resultsPagination)||void 0===t?void 0:t.items)||[],c=e=>o.find(t=>{var a,n;return(null===(a=t.label)||void 0===a?void 0:a.includes(e))&&(null===(n=t.label)||void 0===n?void 0:n.includes(s.id))})||null,u=e=>{if(console.log("[EXULU] result",null==e?void 0:e.result),!e||"completed"!==e.state||void 0===e.result)return"";let t=e.result,a=s.pass_threshold;return t>=a?"text-green-500":t>=a-20?"text-orange-500":"text-red-500"};return(0,a.jsx)("div",{className:"flex-shrink-0 min-w-[100px]",children:n.map(e=>{let t=s.test_case_ids.includes(e.id),n=c(e.id);if(!t)return(0,a.jsx)("div",{className:"p-3 text-center border-r bg-muted/20 min-h-[72px] flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"—"})},e.id);let l=u(n),i=(null==n?void 0:n.state)?H[n.state]:"bg-transparent";return(0,a.jsx)("div",{className:"p-3 text-center border-r min-h-[72px] flex items-center justify-center",children:(0,a.jsx)("div",{onClick:()=>r(n),className:(0,$.cn)("w-full h-full min-h-[48px] rounded transition-colors flex items-center justify-center gap-2",l||i||"border-gray-200 bg-gray-50",(null==n?void 0:n.state)==="completed"&&"cursor-pointer hover:opacity-80",(!n||"completed"!==n.state)&&"cursor-default"),children:d?(0,a.jsx)(g.Z,{className:"h-3 w-3 animate-spin"}):n?(0,a.jsx)(a.Fragment,{children:"completed"===n.state&&void 0!==n.result?(0,a.jsx)("span",{className:"font-semibold text-sm hover:underline",children:n.result.toFixed(1)}):(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[Y[n.state],(0,a.jsx)("span",{className:"text-xs capitalize",children:n.state})]})}):(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[Y.waiting,(0,a.jsx)("span",{className:"text-xs capitalize",children:"Not started"})]})})},e.id)})})}var B=s(37099),Q=s(62910);function U(e){var t,s;let{evalRuns:r,evalSet:d,canWrite:o,onRefetch:c}=e,{toast:u}=(0,C.pm)(),[m,x]=(0,n.useState)(5),[h,p]=(0,n.useState)(null),[b,N]=(0,n.useState)(!1),[y,w]=(0,n.useState)(!1),[_,k]=(0,n.useState)(null),[Z,T]=(0,n.useState)(!1),[D,I]=(0,n.useState)(null);console.log("[EXULU] Eval set",d);let{data:F,loading:L,refetch:$}=(0,i.aM)(j.RV,{variables:{page:1,limit:500,filters:[{eval_set_id:{eq:d.id}}]},skip:!d.id}),Y=(null==F?void 0:null===(t=F.test_casesPagination)||void 0===t?void 0:t.items)||[],[H,{loading:U}]=(0,l.D)(j.B4,{onCompleted:e=>{u({title:"Eval run started",description:"Scheduled ".concat(e.runEval.count," test cases to run.")}),c()},onError:e=>{u({title:"Failed to start eval run",description:e.message,variant:"destructive"})}}),W=[...r].sort((e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime()),X=W.slice(-m),G=W.length>m,K=e=>{e&&"completed"===e.state&&(p(e),N(!0))},ee=e=>{k(e),w(!0)},et=e=>{I(e),T(!0)},es=e=>{console.log("Stop run:",e)};return L?(0,a.jsx)("div",{className:"space-y-2",children:Array.from({length:5}).map((e,t)=>(0,a.jsx)(v.O,{className:"h-12 w-full"},t))}):0===Y.length?(0,a.jsx)("div",{className:"text-center py-8 text-muted-foreground",children:"No test cases in this eval set."}):(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsxs)(R.x,{className:"w-full",children:[(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsxs)("div",{className:"sticky left-0 z-10 bg-background flex-shrink-0 min-w-[200px]",children:[(0,a.jsx)("div",{className:"p-3 border-b border-r text-left font-medium text-sm",children:"Test Case"}),Y.map(e=>(0,a.jsx)("div",{className:"p-3 border-b border-r min-h-[72px] flex items-center",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-medium text-sm",children:e.name}),e.description&&(0,a.jsx)("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-1 truncate max-w-[100px]",children:e.id})]})},e.id))]}),G&&(0,a.jsxs)("div",{className:"flex-shrink-0 min-w-[60px]",children:[(0,a.jsx)("div",{className:"text-center border-b border-r p-2 min-h-[48px] flex items-center justify-center",children:(0,a.jsx)(f.z,{variant:"ghost",size:"sm",onClick:()=>{x(e=>Math.min(e+5,W.length))},className:"h-8 w-8 p-0",children:(0,a.jsx)(A.Z,{className:"h-4 w-4"})})}),Y.map(e=>(0,a.jsx)("div",{className:"p-3 border-b border-r bg-muted/20 min-h-[72px]"},e.id))]}),X.map(e=>(0,a.jsxs)("div",{className:"flex-1 min-w-[100px]",children:[(0,a.jsx)("div",{className:"px-2 py-1.5 text-center font-medium text-sm border-b border-r bg-muted/30 min-h-[48px]",children:(0,a.jsxs)("div",{className:"space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,a.jsx)("div",{className:"flex-1 text-xs font-semibold text-foreground truncate",children:e.name}),(0,a.jsxs)(z.h_,{children:[(0,a.jsx)(z.$F,{asChild:!0,children:(0,a.jsx)(f.z,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0 hover:bg-background/80",children:(0,a.jsx)(O.Z,{className:"h-3 w-3"})})}),(0,a.jsxs)(z.AW,{align:"end",children:[(0,a.jsxs)(z.Xi,{onClick:()=>ee(e),children:[(0,a.jsx)(M.Z,{className:"mr-2 h-4 w-4"}),"Edit"]}),(0,a.jsxs)(z.Xi,{onClick:()=>et(e),children:[(0,a.jsx)(P.Z,{className:"mr-2 h-4 w-4"}),"Start"]}),(0,a.jsxs)(z.Xi,{onClick:()=>es(e),children:[(0,a.jsx)(q,{className:"mr-2 h-4 w-4"}),"Stop"]})]})]})]}),(0,a.jsx)("div",{className:"text-[10px] text-muted-foreground font-normal leading-tight",children:(0,V.WU)(new Date(e.createdAt),"MMM d, yyyy \xb7 HH:mm")}),(0,a.jsx)("div",{className:"text-[10px] text-muted-foreground font-normal leading-tight truncate max-w-[100px] text-center m-auto",children:e.id})]})}),(0,a.jsx)(J,{evalRun:e,testCases:Y,onCellClick:K})]},e.id))]}),(0,a.jsx)(R.B,{orientation:"horizontal"})]}),(0,a.jsx)(E.yo,{open:b,onOpenChange:N,children:(0,a.jsxs)(E.ue,{children:[(0,a.jsx)(E.Tu,{children:(0,a.jsx)(E.bC,{children:"Test Result Details"})}),(0,a.jsx)("div",{className:"mt-4",children:h&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Job ID"}),(0,a.jsx)("div",{className:"text-sm",children:h.job_id})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Score"}),(0,a.jsx)("div",{className:"text-2xl font-bold",children:null===(s=h.result)||void 0===s?void 0:s.toFixed(1)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Status"}),(0,a.jsx)("div",{className:"text-sm capitalize",children:h.state})]}),h.error&&"object"==typeof h.error&&Object.keys(h.error).length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Error"}),(0,a.jsx)("div",{className:"text-sm text-red-600",children:JSON.stringify(h.error)})]}),h.metadata&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Metadata"}),(0,a.jsx)(Q.G,{code:JSON.stringify(h.metadata,null,2)})]})]})})]})}),(0,a.jsx)(S,{eval_set_id:d.id,open:y,onOpenChange:e=>{w(e),e||k(null)},existingRun:_,onCreateSuccess:c}),(0,a.jsx)(B.aR,{open:Z,onOpenChange:T,children:(0,a.jsxs)(B._T,{children:[(0,a.jsxs)(B.fY,{children:[(0,a.jsx)(B.f$,{children:"Start Eval Run?"}),(0,a.jsxs)(B.yT,{children:["This will schedule all ",(null==D?void 0:D.test_case_ids.length)||0,' test cases in "',null==D?void 0:D.name,'" to be run. The eval run will execute each test case against the configured agent and eval functions.']})]}),(0,a.jsxs)(B.xo,{children:[(0,a.jsx)(B.le,{onClick:()=>I(null),children:"Cancel"}),(0,a.jsxs)(B.OL,{onClick:()=>{D&&H({variables:{id:D.id}}),T(!1),I(null)},disabled:U,children:[U&&(0,a.jsx)(g.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Start Run"]})]})]})})]})}var W=s(73578);let X=(0,D.Z)("Droplet",[["path",{d:"M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z",key:"c7niix"}]]);var G=s(18930),K=s(52636),ee=s(68656);function et(e){var t,s,r,d,o;let{queueName:c,nameGenerator:u,retryJob:m}=e,{toast:x}=(0,C.pm)(),[h,v]=(0,n.useState)(!1),[b,N]=(0,n.useState)(!1),[y,w]=(0,n.useState)(!1),[_,k]=(0,n.useState)(null),[R,T]=(0,n.useState)(null),{data:S,loading:E,refetch:z}=(0,i.aM)(j.k9,{variables:{queue:c},pollInterval:5e3}),{data:A,loading:O,refetch:M}=(0,i.aM)(j.Jq,{variables:{queue:c,statusses:null},pollInterval:5e3}),[D,{loading:q}]=(0,l.D)(j.Wr,{onCompleted:()=>{x({title:"Job deleted",description:"The job has been successfully deleted."}),M(),z(),k(null)},onError:e=>{x({title:"Failed to delete job",description:e.message,variant:"destructive"})}}),[I,{loading:F}]=(0,l.D)(j.fc,{onCompleted:()=>{x({title:"Queue paused",description:"The ".concat(c," queue has been paused.")}),z(),v(!1)},onError:e=>{x({title:"Failed to pause queue",description:e.message,variant:"destructive"})}}),[$,{loading:Y}]=(0,l.D)(j.iC,{onCompleted:()=>{x({title:"Queue resumed",description:"The ".concat(c," queue has been resumed.")}),z(),w(!1)},onError:e=>{x({title:"Failed to resume queue",description:e.message,variant:"destructive"})}}),[H,{loading:J}]=(0,l.D)(j.QW,{onCompleted:()=>{x({title:"Queue drained",description:"All waiting and delayed jobs have been removed from the queue."}),z(),M(),N(!1)},onError:e=>{x({title:"Failed to drain queue",description:e.message,variant:"destructive"})}}),Q=e=>{k(e)},U=e=>{T(e)},et=null==S?void 0:S.queue,es=(null==A?void 0:null===(t=A.jobs)||void 0===t?void 0:t.items)||[],ea=e=>(0,a.jsx)(Z.C,{variant:"outline",className:{active:"bg-blue-100 text-blue-800 border-blue-200",waiting:"bg-yellow-100 text-yellow-800 border-yellow-200",completed:"bg-green-100 text-green-800 border-green-200",failed:"bg-red-100 text-red-800 border-red-200",delayed:"bg-orange-100 text-orange-800 border-orange-200",paused:"bg-gray-100 text-gray-800 border-gray-200"}[e]||"bg-gray-100 text-gray-800",children:e});return E&&O?(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsx)(p.Zb,{children:(0,a.jsx)(p.aY,{className:"pt-6",children:(0,a.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,a.jsx)(g.Z,{className:"h-6 w-6 animate-spin"})})})})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(p.Zb,{children:[(0,a.jsx)(p.Ol,{children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(p.ll,{children:["Queue: ",c]}),(0,a.jsxs)(p.SZ,{children:["Manage the ",c," job queue and view all jobs"]})]}),et&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)(f.z,{variant:"outline",size:"sm",onClick:()=>(null==et?void 0:et.isPaused)?w(!0):v(!0),disabled:F||Y,children:[(null==et?void 0:et.isPaused)?(0,a.jsx)(P.Z,{className:"mr-2 h-4 w-4"}):(0,a.jsx)(L,{className:"mr-2 h-4 w-4"}),(null==et?void 0:et.isPaused)?"Resume":"Pause"]}),(0,a.jsxs)(f.z,{variant:"outline",size:"sm",onClick:()=>N(!0),disabled:J,children:[(0,a.jsx)(X,{className:"mr-2 h-4 w-4"}),"Drain"]})]})]})}),(0,a.jsxs)(p.aY,{className:"space-y-6",children:[et&&(0,a.jsxs)("div",{className:"flex items-center gap-8 p-4 bg-muted/50 rounded-lg",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:"Status:"}),(0,a.jsx)("div",{children:et.isPaused?(0,a.jsx)(Z.C,{variant:"outline",className:"bg-gray-100 text-gray-800",children:"Paused"}):et.isMaxed?(0,a.jsx)(Z.C,{variant:"outline",className:"bg-red-100 text-red-800",children:"Maxed"}):(0,a.jsx)(Z.C,{variant:"outline",className:"bg-green-100 text-green-800",children:"Active"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:"Concurrency:"}),(0,a.jsx)("div",{className:"font-semibold",children:et.concurrency})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:"Rate Limit:"}),(0,a.jsx)("div",{className:"font-semibold",children:et.ratelimit||"None"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("div",{className:"text-xs text-muted-foreground",children:"Active:"}),(0,a.jsx)("div",{className:"font-semibold text-blue-600",children:(null===(s=et.jobs)||void 0===s?void 0:s.active)||0})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("div",{className:"text-xs text-muted-foreground",children:"Waiting:"}),(0,a.jsx)("div",{className:"font-semibold text-yellow-600",children:(null===(r=et.jobs)||void 0===r?void 0:r.waiting)||0})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("div",{className:"text-xs text-muted-foreground",children:"Failed:"}),(0,a.jsx)("div",{className:"font-semibold text-red-600",children:(null===(d=et.jobs)||void 0===d?void 0:d.failed)||0})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("div",{className:"text-xs text-muted-foreground",children:"Completed:"}),(0,a.jsx)("div",{className:"font-semibold text-green-600",children:(null===(o=et.jobs)||void 0===o?void 0:o.completed)||0})]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"Queue Jobs"}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["All jobs currently in the ",c," queue"]})]}),(0,a.jsx)("div",{className:"border rounded-lg",children:O?(0,a.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,a.jsx)(g.Z,{className:"h-6 w-6 animate-spin"})}):0===es.length?(0,a.jsx)("div",{className:"text-center py-8 text-muted-foreground",children:"No jobs in queue"}):(0,a.jsxs)(W.iA,{children:[(0,a.jsx)(W.xD,{children:(0,a.jsxs)(W.SC,{children:[(0,a.jsx)(W.ss,{children:"Name"}),(0,a.jsx)(W.ss,{children:"State"}),(0,a.jsx)(W.ss,{children:"Timestamp"}),(0,a.jsx)(W.ss,{children:"Inputs"}),(0,a.jsx)(W.ss,{children:"Outputs"}),(0,a.jsx)(W.ss,{className:"text-right",children:"Actions"})]})}),(0,a.jsx)(W.RM,{children:es.map((e,t)=>(0,a.jsxs)(W.SC,{children:[(0,a.jsx)(W.pj,{className:"font-medium",children:u(e)}),(0,a.jsx)(W.pj,{children:ea(e.state)}),(0,a.jsx)(W.pj,{children:e.timestamp?(0,V.WU)(new Date(e.timestamp),"MMM d, yyyy HH:mm:ss"):"N/A"}),(0,a.jsx)(W.pj,{children:e.data?(0,a.jsx)("div",{className:"text-xs max-w-xs truncate",children:(0,a.jsx)(ee.J,{text:JSON.stringify(e.data)})}):null}),(0,a.jsx)(W.pj,{children:e.failedReason?(0,a.jsx)("div",{className:"text-xs text-red-600 max-w-xs truncate",children:(0,a.jsx)(ee.J,{text:"Error: "+e.failedReason})}):(0,a.jsx)("div",{className:"text-xs text-muted-foreground max-w-xs truncate",children:(0,a.jsx)(ee.J,{text:JSON.stringify(e.returnvalue)})})}),(0,a.jsxs)(W.pj,{className:"text-right",children:["active"!==e.state&&(0,a.jsx)(f.z,{variant:"ghost",size:"sm",onClick:()=>Q(e),disabled:q,children:(0,a.jsx)(G.Z,{className:"h-4 w-4 text-red-600"})}),"failed"===e.state&&(0,a.jsxs)(f.z,{variant:"ghost",size:"sm",onClick:()=>U(e),children:[(0,a.jsx)(K.Z,{className:"h-4 w-4 text-blue-600"}),"Retry"]})]})]},t))})]})})]})]})]}),(0,a.jsx)(B.aR,{open:!!_,onOpenChange:e=>!e&&k(null),children:(0,a.jsxs)(B._T,{children:[(0,a.jsxs)(B.fY,{children:[(0,a.jsx)(B.f$,{children:"Delete Job?"}),(0,a.jsxs)(B.yT,{children:['Are you sure you want to delete the job "',null==_?void 0:_.name,'"? This action cannot be undone.']})]}),(0,a.jsxs)(B.xo,{children:[(0,a.jsx)(B.le,{children:"Cancel"}),(0,a.jsxs)(B.OL,{onClick:()=>{if(!(null==_?void 0:_.id)){x({title:"Failed to delete job",description:"The job has no ID.",variant:"destructive"});return}_&&D({variables:{queue:c,id:_.id}})},disabled:q,children:[q&&(0,a.jsx)(g.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Delete"]})]})]})}),(0,a.jsx)(B.aR,{open:!!R,onOpenChange:e=>!e&&T(null),children:(0,a.jsxs)(B._T,{children:[(0,a.jsxs)(B.fY,{children:[(0,a.jsx)(B.f$,{children:"Retry Job?"}),(0,a.jsxs)(B.yT,{children:['Are you sure you want to retry the job "',null==R?void 0:R.name,'"? This will schedule a new job with the same data.']})]}),(0,a.jsxs)(B.xo,{children:[(0,a.jsx)(B.le,{children:"Cancel"}),(0,a.jsx)(B.OL,{onClick:()=>{R&&m(R)},disabled:q,children:"Retry"})]})]})}),(0,a.jsx)(B.aR,{open:h,onOpenChange:v,children:(0,a.jsxs)(B._T,{children:[(0,a.jsxs)(B.fY,{children:[(0,a.jsx)(B.f$,{children:"Pause Queue?"}),(0,a.jsxs)(B.yT,{children:["Are you sure you want to pause the ",c," queue? No jobs will be processed until the queue is resumed."]})]}),(0,a.jsxs)(B.xo,{children:[(0,a.jsx)(B.le,{children:"Cancel"}),(0,a.jsxs)(B.OL,{onClick:()=>{I({variables:{queue:c}})},disabled:F,children:[F&&(0,a.jsx)(g.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Pause Queue"]})]})]})}),(0,a.jsx)(B.aR,{open:y,onOpenChange:w,children:(0,a.jsxs)(B._T,{children:[(0,a.jsxs)(B.fY,{children:[(0,a.jsx)(B.f$,{children:"Resume Queue?"}),(0,a.jsxs)(B.yT,{children:["Are you sure you want to resume the ",c," queue?."]})]}),(0,a.jsxs)(B.xo,{children:[(0,a.jsx)(B.le,{children:"Cancel"}),(0,a.jsxs)(B.OL,{onClick:()=>{$({variables:{queue:c}})},disabled:Y,children:[Y&&(0,a.jsx)(g.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Resume Queue"]})]})]})}),(0,a.jsx)(B.aR,{open:b,onOpenChange:N,children:(0,a.jsxs)(B._T,{children:[(0,a.jsxs)(B.fY,{children:[(0,a.jsx)(B.f$,{children:"Drain Queue?"}),(0,a.jsxs)(B.yT,{children:["Are you sure you want to drain the ",c," queue? This will remove all jobs that are waiting or delayed, but not active, waiting-children, completed or failed. This action cannot be undone."]})]}),(0,a.jsxs)(B.xo,{children:[(0,a.jsx)(B.le,{children:"Cancel"}),(0,a.jsxs)(B.OL,{onClick:()=>{H({variables:{queue:c}})},disabled:J,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[J&&(0,a.jsx)(g.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Drain Queue"]})]})]})})]})}let es="force-dynamic";function ea(){var e,t,s,g,b,N,y,w,_,k,R,Z;let T=(0,r.useParams)(),E=(0,r.useRouter)(),{user:z}=(0,n.useContext)(d.S),A=(0,n.useContext)(o.E),O=T.id,[M,P]=(0,n.useState)(!1),{toast:D}=(0,C.pm)(),q=z.super_admin||(null===(e=z.role)||void 0===e?void 0:e.evals)==="read"||(null===(t=z.role)||void 0===t?void 0:t.evals)==="write",V=z.super_admin||(null===(s=z.role)||void 0===s?void 0:s.evals)==="write",[I,{loading:F}]=(0,l.D)(j.B4,{onCompleted:e=>{D({title:"Eval run started",description:"Scheduled ".concat(e.runEval.count," test cases to run.")})},onError:e=>{D({title:"Failed to start eval run",description:e.message,variant:"destructive"})}}),{loading:L,data:$}=(0,i.aM)(j.iA,{variables:{id:O},skip:!O}),{loading:Y,data:H,refetch:J}=(0,i.aM)(j.i9,{variables:{page:1,limit:100,filters:[{eval_set_id:{eq:O}}]},skip:!O,pollInterval:1e4});if(!q)return(0,a.jsx)("div",{className:"flex h-full flex-1 flex-col space-y-8 p-8",children:(0,a.jsxs)(h.bZ,{variant:"destructive",children:[(0,a.jsx)(c.Z,{className:"h-4 w-4"}),(0,a.jsx)(h.X,{children:"You don't have permission to access Eval Runs. Contact your administrator to request access."})]})});if(L)return(0,a.jsxs)("div",{className:"flex h-full flex-1 flex-col space-y-8 p-8",children:[(0,a.jsx)(v.O,{className:"h-8 w-64"}),(0,a.jsx)(v.O,{className:"h-64 w-full"})]});let B=null==$?void 0:$.eval_setById,Q=(null==H?void 0:null===(g=H.eval_runsPagination)||void 0===g?void 0:g.items)||[];return(0,a.jsxs)("div",{className:"flex h-full flex-1 flex-col p-6 lg:p-8",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)(f.z,{variant:"ghost",size:"icon",onClick:()=>E.push("/evals/".concat(O)),children:(0,a.jsx)(u.Z,{className:"h-4 w-4"})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-2xl font-bold tracking-tight",children:["Eval Runs for ",null==B?void 0:B.name]}),(0,a.jsxs)("p",{className:"text-muted-foreground text-sm mt-1",children:['View and manage evaluation runs for the eval set "',null==B?void 0:B.name,'".']})]})]}),V&&(null==A?void 0:null===(b=A.workers)||void 0===b?void 0:b.enabled)&&(null==A?void 0:null===(N=A.workers)||void 0===N?void 0:N.redisHost)&&(0,a.jsxs)(f.z,{onClick:()=>P(!0),children:[(0,a.jsx)(m.Z,{className:"mr-2 h-4 w-4"}),"New Eval Run"]})]}),(!(null==A?void 0:null===(y=A.workers)||void 0===y?void 0:y.enabled)||!(null==A?void 0:null===(w=A.workers)||void 0===w?void 0:w.redisHost))&&(0,a.jsxs)(h.bZ,{variant:"destructive",className:"mb-6",children:[(0,a.jsx)(x.Z,{className:"h-4 w-4"}),(0,a.jsx)(h.X,{children:"Workers are not enabled. You can view existing eval runs but cannot create or run new evaluations. Configure Redis to enable running eval runs."})]}),(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)(p.Zb,{children:[(0,a.jsxs)(p.Ol,{className:"pb-4",children:[(0,a.jsx)(p.ll,{children:"Evaluation Run Results"}),(0,a.jsx)(p.SZ,{children:"Matrix view of test case scores across eval runs. Click on a completed cell to view detailed results."})]}),(0,a.jsx)(p.aY,{children:Y?(0,a.jsx)("div",{className:"space-y-2",children:Array.from({length:3}).map((e,t)=>(0,a.jsx)(v.O,{className:"h-16 w-full"},t))}):0===Q.length?(0,a.jsxs)("div",{className:"text-center py-12 text-muted-foreground",children:["No eval runs yet. ",V&&(null==A?void 0:null===(_=A.workers)||void 0===_?void 0:_.enabled)&&(null==A?void 0:null===(k=A.workers)||void 0===k?void 0:k.redisHost)&&"Click 'New Eval Run' to create one."]}):(0,a.jsx)(U,{evalRuns:Q,evalSet:B,canWrite:V,onRefetch:J})})]}),(null==A?void 0:null===(R=A.workers)||void 0===R?void 0:R.enabled)&&(null==A?void 0:null===(Z=A.workers)||void 0===Z?void 0:Z.redisHost)&&Q.length>0&&(0,a.jsx)(et,{queueName:"eval_runs",nameGenerator:e=>{var t,s,a,n;return"Eval Run ".concat((null===(t=e.data)||void 0===t?void 0:t.eval_run_name)||(null===(s=e.data)||void 0===s?void 0:s.eval_run_id)," - Test Case ").concat((null===(a=e.data)||void 0===a?void 0:a.test_case_name)||(null===(n=e.data)||void 0===n?void 0:n.test_case_id))},retryJob:e=>{var t,s,a,n;(null===(t=e.data)||void 0===t?void 0:t.test_case_id)&&(null===(s=e.data)||void 0===s?void 0:s.eval_run_id)&&I({variables:{id:null===(a=e.data)||void 0===a?void 0:a.eval_run_id,test_case_ids:[null===(n=e.data)||void 0===n?void 0:n.test_case_id]}})}})]}),(0,a.jsx)(S,{eval_set_id:O,open:M,onOpenChange:P,onCreateSuccess:()=>{J()}})]})}},53245:function(e,t,s){"use strict";s.d(t,{d:function(){return x},f:function(){return h}});var a=s(57437),n=s(62869),r=s(94508),l=s(30401),i=s(78867),d=s(2265),o=s(34996),c=s(1479),u=s(9880);let m=(0,d.createContext)({code:""}),x=e=>{let{code:t,language:s,showLineNumbers:n=!1,className:l,children:i,...d}=e;return(0,a.jsx)(m.Provider,{value:{code:t},children:(0,a.jsx)("div",{className:(0,r.cn)("relative w-full overflow-hidden rounded-md border bg-background text-foreground",l),...d,children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(o.Z,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:s,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:n,style:c.Z,children:t}),(0,a.jsx)(o.Z,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:s,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:n,style:u.Z,children:t}),i&&(0,a.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:i})]})})})},h=e=>{let{onCopy:t,onError:s,timeout:o=2e3,children:c,className:u,...x}=e,[h,f]=(0,d.useState)(!1),{code:p}=(0,d.useContext)(m),v=async()=>{if(!navigator.clipboard.writeText){null==s||s(Error("Clipboard API not available"));return}try{await navigator.clipboard.writeText(p),f(!0),null==t||t(),setTimeout(()=>f(!1),o)}catch(e){null==s||s(e)}},j=h?l.Z:i.Z;return(0,a.jsx)(n.z,{className:(0,r.cn)("shrink-0",u),onClick:v,size:"icon",variant:"ghost",...x,children:null!=c?c:(0,a.jsx)(j,{size:14})})}},35629:function(e,t,s){"use strict";s.d(t,{H:function(){return x}});var a=s(57437),n=s(94508),r=s(2265),l=s(86816),i=s(67245),d=s(58146),o=s(85020),c=s(53245);s(2446);let u=(0,s(86589).Z)(l.UG),m={ol:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("ol",{className:(0,n.cn)("ml-4 list-outside list-decimal",r),...l,children:s})},li:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("li",{className:(0,n.cn)("py-1",r),...l,children:s})},ul:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("ul",{className:(0,n.cn)("ml-4 list-outside list-disc",r),...l,children:s})},hr:e=>{let{node:t,className:s,...r}=e;return(0,a.jsx)("hr",{className:(0,n.cn)("my-6 border-border",s),...r})},strong:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("span",{className:(0,n.cn)("font-semibold",r),...l,children:s})},a:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("a",{className:(0,n.cn)("font-medium text-primary underline",r),rel:"noreferrer",target:"_blank",...l,children:s})},h1:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("h1",{className:(0,n.cn)("mt-6 mb-2 font-semibold text-3xl",r),...l,children:s})},h2:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("h2",{className:(0,n.cn)("mt-6 mb-2 font-semibold text-2xl",r),...l,children:s})},h3:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("h3",{className:(0,n.cn)("mt-6 mb-2 font-semibold text-xl",r),...l,children:s})},h4:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("h4",{className:(0,n.cn)("mt-6 mb-2 font-semibold text-lg",r),...l,children:s})},h5:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("h5",{className:(0,n.cn)("mt-6 mb-2 font-semibold text-base",r),...l,children:s})},h6:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("h6",{className:(0,n.cn)("mt-6 mb-2 font-semibold text-sm",r),...l,children:s})},table:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("div",{className:"my-4 overflow-x-auto",children:(0,a.jsx)("table",{className:(0,n.cn)("w-full border-collapse border border-border",r),...l,children:s})})},thead:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("thead",{className:(0,n.cn)("bg-muted/50",r),...l,children:s})},tbody:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("tbody",{className:(0,n.cn)("divide-y divide-border",r),...l,children:s})},tr:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("tr",{className:(0,n.cn)("border-border border-b",r),...l,children:s})},th:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("th",{className:(0,n.cn)("px-4 py-2 text-left font-semibold text-sm",r),...l,children:s})},td:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("td",{className:(0,n.cn)("px-4 py-2 text-sm",r),...l,children:s})},blockquote:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("blockquote",{className:(0,n.cn)("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",r),...l,children:s})},code:e=>{var t,s;let{node:r,className:l,...i}=e;return(null==r?void 0:null===(t=r.position)||void 0===t?void 0:t.start.line)!==(null==r?void 0:null===(s=r.position)||void 0===s?void 0:s.end.line)?(0,a.jsx)("code",{className:l,...i}):(0,a.jsx)("code",{className:(0,n.cn)("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",l),...i})},pre:e=>{var t;let{node:s,className:l,children:i}=e,d="javascript";"string"==typeof(null==s?void 0:null===(t=s.properties)||void 0===t?void 0:t.className)&&(d=s.properties.className.replace("language-",""));let o="";return(0,r.isValidElement)(i)&&i.props&&"string"==typeof i.props.children?o=i.props.children:"string"==typeof i&&(o=i),(0,a.jsx)(c.d,{className:(0,n.cn)("my-4 h-auto",l),code:o,language:d,children:(0,a.jsx)(c.f,{onCopy:()=>console.log("Copied code to clipboard"),onError:()=>console.error("Failed to copy code to clipboard")})})}},x=(0,r.memo)(e=>{let{className:t,options:s,children:r,allowedImagePrefixes:l,allowedLinkPrefixes:c,defaultOrigin:x,parseIncompleteMarkdown:h=!0,...f}=e,p="string"==typeof r&&h?function(e){if(!e||"string"!=typeof e)return e;let t=e,s=t.match(/(!?\[)([^\]]*?)$/);if(s){let e=t.lastIndexOf(s[1]);t=t.substring(0,e)}if(t.match(/(\*\*)([^*]*?)$/)&&(t.match(/\*\*/g)||[]).length%2==1&&(t="".concat(t,"**")),t.match(/(__)([^_]*?)$/)&&(t.match(/__/g)||[]).length%2==1&&(t="".concat(t,"__")),t.match(/(\*)([^*]*?)$/)&&t.split("").reduce((e,s,a)=>{if("*"===s){let s=t[a-1],n=t[a+1];if("*"!==s&&"*"!==n)return e+1}return e},0)%2==1&&(t="".concat(t,"*")),t.match(/(_)([^_]*?)$/)&&t.split("").reduce((e,s,a)=>{if("_"===s){let s=t[a-1],n=t[a+1];if("_"!==s&&"_"!==n)return e+1}return e},0)%2==1&&(t="".concat(t,"_")),t.match(/(`)([^`]*?)$/)&&(t.includes("```"),(t.match(/```[\s\S]*?```/g)||[]).length,(t.match(/```/g)||[]).length%2!=1)){let e=0;for(let s=0;s<t.length;s++)if("`"===t[s]){let a="```"===t.substring(s,s+3),n=s>0&&"```"===t.substring(s-1,s+2),r=s>1&&"```"===t.substring(s-2,s+1);!(a||n||r)&&e++}e%2==1&&(t="".concat(t,"`"))}return t.match(/(~~)([^~]*?)$/)&&(t.match(/~~/g)||[]).length%2==1&&(t="".concat(t,"~~")),t}(r):r;return(0,a.jsx)("div",{className:(0,n.cn)("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",t),...f,children:(0,a.jsx)(u,{allowedImagePrefixes:null!=l?l:["*"],allowedLinkPrefixes:null!=c?c:["*"],components:m,defaultOrigin:x,rehypePlugins:[i.Z],remarkPlugins:[d.Z,o.Z],...s,children:p})})},(e,t)=>e.children===t.children);x.displayName="Response"},62910:function(e,t,s){"use strict";s.d(t,{G:function(){return f}});var a=s(57437),n=s(29406),r=s(10842),l=s(38436),i=s(2265),d=s(42571),o=s(71558),c=s(69797),u=s(49712),m=s(26110),x=s(77992),h=s(94508);function f(e){let{className:t=null,code:s,language:o,slice:c=200}=e,{toast:f}=(0,x.pm)(),[p,v]=(0,i.useState)(null),j=async(e,t)=>{v(await l.ZP.format(e,{parser:t,plugins:[n.Z,r.ZP]}))};return(0,i.useEffect)(()=>{"json"===o?j(s,"json"):"javascript"===o||"js"===o?j(s,"babel"):v(s)},[s,o]),(0,a.jsxs)(m.Vq,{children:[(0,a.jsx)(m.hg,{asChild:!0,children:(null==p?void 0:p.length)&&(0,a.jsx)(d.Z,{className:(0,h.cn)("cursor-pointer",t),showLineNumbers:!0,wrapLines:!0,lineProps:{style:{wordBreak:"break-all",whiteSpace:"pre-wrap"}},language:o||"plaintext",style:u.Z,children:"".concat(null==p?void 0:p.slice(0,c||200)," ").concat((null==s?void 0:s.length)>(c||200)?"...":"")})}),(0,a.jsx)(m.cZ,{className:"sm:max-w-[800px] overflow-hidden max-h-[500px] overflow-y-scroll",children:(0,a.jsxs)(m.fK,{children:[(0,a.jsx)(m.$N,{children:"Code"}),(0,a.jsx)("div",{className:"cursor-copy",onClick:async()=>{await navigator.clipboard.writeText(null!=p?p:""),f({title:"Copied to clipboard"})},children:(0,a.jsx)(d.Z,{className:(0,h.cn)(t),showLineNumbers:!0,wrapLines:!0,lineProps:{style:{wordBreak:"break-all",whiteSpace:"pre-wrap"}},language:o||"plaintext",style:u.Z,children:null!=p?p:""})})]})})]})}d.Z.registerLanguage("json",c.Z),d.Z.registerLanguage("javascript",o.Z)},68656:function(e,t,s){"use strict";s.d(t,{J:function(){return p}});var a=s(57437);s(2265);var n=s(26110),r=s(77992),l=s(35629),i=s(62869),d=s(81103),o=s(94508);let c=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,o.cn)("flex flex-col overflow-hidden rounded-lg border bg-background shadow-sm",t),...s})},u=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,o.cn)("flex items-center justify-between border-b bg-muted/50 px-4 py-3",t),...s})},m=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,o.cn)("flex items-center gap-1",t),...s})},x=e=>{let{tooltip:t,label:s,icon:n,children:r,className:l,size:c="sm",variant:u="ghost",...m}=e,x=(0,a.jsxs)(i.z,{className:(0,o.cn)("size-8 p-0 text-muted-foreground hover:text-foreground",l),size:c,type:"button",variant:u,...m,children:[n?(0,a.jsx)(n,{className:"size-4"}):r,(0,a.jsx)("span",{className:"sr-only",children:s||t})]});return t?(0,a.jsx)(d.pn,{children:(0,a.jsxs)(d.u,{children:[(0,a.jsx)(d.aJ,{asChild:!0,children:x}),(0,a.jsx)(d._v,{children:(0,a.jsx)("p",{children:t})})]})}):x},h=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,o.cn)("flex-1 overflow-auto p-4",t),...s})};var f=s(78867);function p(e){let{text:t,sliceLength:s}=e,{toast:i}=(0,r.pm)();return(0,a.jsxs)(n.Vq,{children:[(0,a.jsx)(n.hg,{asChild:!0,children:(0,a.jsxs)("p",{className:"cursor-pointer text-sm text-base",children:[null==t?void 0:t.slice(0,null!=s?s:200),s&&t.length>s?"...":""]})}),(0,a.jsx)(n.cZ,{className:"sm:max-w-[800px] max-h-[500px] overflow-y-scroll",children:(0,a.jsxs)(c,{children:[(0,a.jsx)(u,{children:(0,a.jsx)(m,{children:(0,a.jsx)(x,{icon:f.Z,label:"Copy",tooltip:"Copy to clipboard",onClick:async()=>{await navigator.clipboard.writeText(t),i({title:"Copied to clipboard"})}})})}),(0,a.jsx)(h,{children:(0,a.jsx)(l.H,{children:t})})]})})]})}},37099:function(e,t,s){"use strict";s.d(t,{OL:function(){return p},_T:function(){return u},aR:function(){return d},f$:function(){return h},fY:function(){return m},le:function(){return v},xo:function(){return x},yT:function(){return f}});var a=s(57437),n=s(23619),r=s(2265),l=s(62869),i=s(94508);let d=n.fC;n.xz;let o=n.h_,c=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.aV,{className:(0,i.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...r,ref:t})});c.displayName=n.aV.displayName;let u=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsxs)(o,{children:[(0,a.jsx)(c,{}),(0,a.jsx)(n.VY,{ref:t,className:(0,i.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...r})]})});u.displayName=n.VY.displayName;let m=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...s})};m.displayName="AlertDialogHeader";let x=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};x.displayName="AlertDialogFooter";let h=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.Dx,{ref:t,className:(0,i.cn)("text-lg font-semibold",s),...r})});h.displayName=n.Dx.displayName;let f=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.dk,{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",s),...r})});f.displayName=n.dk.displayName;let p=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.aU,{ref:t,className:(0,i.cn)((0,l.d)(),s),...r})});p.displayName=n.aU.displayName;let v=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.$j,{ref:t,className:(0,i.cn)((0,l.d)({variant:"outline"}),"mt-2 sm:mt-0",s),...r})});v.displayName=n.$j.displayName},65613:function(e,t,s){"use strict";s.d(t,{Cd:function(){return o},X:function(){return c},bZ:function(){return d}});var a=s(57437),n=s(90535),r=s(2265),l=s(94508);let i=(0,n.j)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",info:"border-info/50 text-info dark:border-info [&>svg]:text-info"}},defaultVariants:{variant:"default"}}),d=r.forwardRef((e,t)=>{let{className:s,variant:n,...r}=e;return(0,a.jsx)("div",{ref:t,role:"alert",className:(0,l.cn)(i({variant:n}),s),...r})});d.displayName="Alert";let o=r.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("h5",{ref:t,className:(0,l.cn)("mb-1 font-medium leading-none tracking-tight",s),...n})});o.displayName="AlertTitle";let c=r.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("text-sm [&_p]:leading-relaxed",s),...n})});c.displayName="AlertDescription"},35974:function(e,t,s){"use strict";s.d(t,{C:function(){return i}});var a=s(57437),n=s(90535);s(2265);var r=s(94508);let l=(0,n.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i(e){let{className:t,variant:s,...n}=e;return(0,a.jsx)("div",{className:(0,r.cn)(l({variant:s}),t),...n})}},66070:function(e,t,s){"use strict";s.d(t,{Ol:function(){return i},SZ:function(){return o},Zb:function(){return l},aY:function(){return c},eW:function(){return u},ll:function(){return d}});var a=s(57437),n=s(2265),r=s(94508);let l=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,r.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",s),...n})});l.displayName="Card";let i=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,r.cn)("flex flex-col space-y-1.5 p-6",s),...n})});i.displayName="CardHeader";let d=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("h3",{ref:t,className:(0,r.cn)("text-2xl font-semibold leading-none tracking-tight",s),...n})});d.displayName="CardTitle";let o=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("p",{ref:t,className:(0,r.cn)("text-sm text-muted-foreground",s),...n})});o.displayName="CardDescription";let c=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,r.cn)("p-6 pt-0",s),...n})});c.displayName="CardContent";let u=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,r.cn)("flex items-center p-6 pt-0",s),...n})});u.displayName="CardFooter"},19060:function(e,t,s){"use strict";s.d(t,{X:function(){return d}});var a=s(57437),n=s(9270),r=s(30401),l=s(2265),i=s(94508);let d=l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(n.fC,{ref:t,className:(0,i.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",s),...l,children:(0,a.jsx)(n.z$,{className:(0,i.cn)("flex items-center justify-center text-current"),children:(0,a.jsx)(r.Z,{className:"size-4"})})})});d.displayName=n.fC.displayName},26110:function(e,t,s){"use strict";s.d(t,{$N:function(){return f},Be:function(){return p},Vq:function(){return d},cN:function(){return h},cZ:function(){return m},fK:function(){return x},hg:function(){return o}});var a=s(57437),n=s(34567),r=s(32489),l=s(2265),i=s(94508);let d=n.fC,o=n.xz,c=n.h_;n.x8;let u=l.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.aV,{ref:t,className:(0,i.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...r})});u.displayName=n.aV.displayName;let m=l.forwardRef((e,t)=>{let{className:s,children:l,...d}=e;return(0,a.jsxs)(c,{children:[(0,a.jsx)(u,{}),(0,a.jsxs)(n.VY,{ref:t,className:(0,i.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...d,children:[l,(0,a.jsxs)(n.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,a.jsx)(r.Z,{className:"size-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});m.displayName=n.VY.displayName;let x=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...s})};x.displayName="DialogHeader";let h=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};h.displayName="DialogFooter";let f=l.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.Dx,{ref:t,className:(0,i.cn)("text-lg font-semibold leading-none tracking-tight",s),...r})});f.displayName=n.Dx.displayName;let p=l.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.dk,{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",s),...r})});p.displayName=n.dk.displayName},26815:function(e,t,s){"use strict";s.d(t,{_:function(){return o}});var a=s(57437),n=s(6394),r=s(90535),l=s(2265),i=s(94508);let d=(0,r.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),o=l.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.f,{ref:t,className:(0,i.cn)(d(),s),...r})});o.displayName=n.f.displayName},19378:function(e,t,s){"use strict";s.d(t,{B:function(){return d},x:function(){return i}});var a=s(57437),n=s(14488),r=s(2265),l=s(94508);let i=r.forwardRef((e,t)=>{let{className:s,children:r,...i}=e;return(0,a.jsxs)(n.fC,{ref:t,className:(0,l.cn)("relative overflow-hidden",s),...i,children:[(0,a.jsx)(n.l_,{className:"size-full rounded-[inherit]",children:r}),(0,a.jsx)(d,{}),(0,a.jsx)(n.Ns,{})]})});i.displayName=n.fC.displayName;let d=r.forwardRef((e,t)=>{let{className:s,orientation:r="vertical",...i}=e;return(0,a.jsx)(n.gb,{ref:t,orientation:r,className:(0,l.cn)("flex touch-none select-none transition-colors","vertical"===r&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===r&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",s),...i,children:(0,a.jsx)(n.q4,{className:"relative flex-1 rounded-full bg-border"})})});d.displayName=n.gb.displayName},53647:function(e,t,s){"use strict";s.d(t,{Bw:function(){return f},Ph:function(){return c},Ql:function(){return p},i4:function(){return m},ki:function(){return u}});var a=s(57437),n=s(46943),r=s(40875),l=s(22135),i=s(30401),d=s(2265),o=s(94508);let c=n.fC;n.ZA;let u=n.B4,m=d.forwardRef((e,t)=>{let{className:s,children:l,...i}=e;return(0,a.jsxs)(n.xz,{ref:t,className:(0,o.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...i,children:[l,(0,a.jsx)(n.JO,{asChild:!0,children:(0,a.jsx)(r.Z,{className:"size-4 opacity-50"})})]})});m.displayName=n.xz.displayName;let x=d.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.u_,{ref:t,className:(0,o.cn)("flex cursor-default items-center justify-center py-1",s),...r,children:(0,a.jsx)(l.Z,{className:"size-4"})})});x.displayName=n.u_.displayName;let h=d.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(n.$G,{ref:t,className:(0,o.cn)("flex cursor-default items-center justify-center py-1",s),...l,children:(0,a.jsx)(r.Z,{className:"size-4"})})});h.displayName=n.$G.displayName;let f=d.forwardRef((e,t)=>{let{className:s,children:r,position:l="popper",...i}=e;return(0,a.jsx)(n.h_,{children:(0,a.jsxs)(n.VY,{ref:t,className:(0,o.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:l,...i,children:[(0,a.jsx)(x,{}),(0,a.jsx)(n.l_,{className:(0,o.cn)("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,a.jsx)(h,{})]})})});f.displayName=n.VY.displayName,d.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.__,{ref:t,className:(0,o.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",s),...r})}).displayName=n.__.displayName;let p=d.forwardRef((e,t)=>{let{className:s,children:r,...l}=e;return(0,a.jsxs)(n.ck,{ref:t,className:(0,o.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...l,children:[(0,a.jsx)("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(n.wU,{children:(0,a.jsx)(i.Z,{className:"size-4"})})}),(0,a.jsx)(n.eT,{children:r})]})});p.displayName=n.ck.displayName,d.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.Z0,{ref:t,className:(0,o.cn)("-mx-1 my-1 h-px bg-muted",s),...r})}).displayName=n.Z0.displayName},73578:function(e,t,s){"use strict";s.d(t,{RM:function(){return d},Rn:function(){return m},SC:function(){return o},iA:function(){return l},pj:function(){return u},ss:function(){return c},xD:function(){return i}});var a=s(57437),n=s(2265),r=s(94508);let l=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("div",{className:"relative w-full overflow-auto",children:(0,a.jsx)("table",{ref:t,className:(0,r.cn)("w-full caption-bottom text-sm",s),...n})})});l.displayName="Table";let i=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("thead",{ref:t,className:(0,r.cn)("[&_tr]:border-b",s),...n})});i.displayName="TableHeader";let d=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("tbody",{ref:t,className:(0,r.cn)("[&_tr:last-child]:border-0",s),...n})});d.displayName="TableBody",n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("tfoot",{ref:t,className:(0,r.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...n})}).displayName="TableFooter";let o=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("tr",{ref:t,className:(0,r.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...n})});o.displayName="TableRow";let c=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("th",{ref:t,className:(0,r.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:w-[40px]",s),...n})});c.displayName="TableHead";let u=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("td",{ref:t,className:(0,r.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:w-[40px]",s),...n})});u.displayName="TableCell";let m=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("caption",{ref:t,className:(0,r.cn)("mt-4 text-sm text-muted-foreground",s),...n})});m.displayName="TableCaption"},76818:function(e,t,s){"use strict";s.d(t,{g:function(){return l}});var a=s(57437),n=s(2265),r=s(94508);let l=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("textarea",{className:(0,r.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),ref:t,...n})});l.displayName="Textarea"},77992:function(e,t,s){"use strict";s.d(t,{Am:function(){return u},pm:function(){return m}});var a=s(2265);let n=0,r=new Map,l=e=>{if(r.has(e))return;let t=setTimeout(()=>{r.delete(e),c({type:"REMOVE_TOAST",toastId:e})},1e6);r.set(e,t)},i=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:s}=t;return s?l(s):e.toasts.forEach(e=>{l(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===s||void 0===s?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},d=[],o={toasts:[]};function c(e){o=i(o,e),d.forEach(e=>{e(o)})}function u(e){let{...t}=e,s=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>c({type:"DISMISS_TOAST",toastId:s});return c({type:"ADD_TOAST",toast:{...t,id:s,open:!0,onOpenChange:e=>{e||a()}}}),{id:s,dismiss:a,update:e=>c({type:"UPDATE_TOAST",toast:{...e,id:s}})}}function m(){let[e,t]=a.useState(o);return a.useEffect(()=>(d.push(t),()=>{let e=d.indexOf(t);e>-1&&d.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>c({type:"DISMISS_TOAST",toastId:e})}}},63639:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},92451:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},91723:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},33276:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]])},99397:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},52636:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]])},18930:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},1119:function(e,t,s){"use strict";function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e}).apply(null,arguments)}s.d(t,{Z:function(){return a}})},9270:function(e,t,s){"use strict";s.d(t,{fC:function(){return N},z$:function(){return w}});var a=s(2265),n=s(98575),r=s(73966),l=s(6741),i=s(80886),d=s(6718),o=s(90420),c=s(71599),u=s(66840),m=s(57437),x="Checkbox",[h,f]=(0,r.b)(x),[p,v]=h(x);function j(e){let{__scopeCheckbox:t,checked:s,children:n,defaultChecked:r,disabled:l,form:d,name:o,onCheckedChange:c,required:u,value:h="on",internal_do_not_use_render:f}=e,[v,j]=(0,i.T)({prop:s,defaultProp:null!=r&&r,onChange:c,caller:x}),[g,b]=a.useState(null),[N,y]=a.useState(null),w=a.useRef(!1),_=!g||!!d||!!g.closest("form"),k={checked:v,disabled:l,setChecked:j,control:g,setControl:b,name:o,form:d,value:h,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:!C(r)&&r,isFormControl:_,bubbleInput:N,setBubbleInput:y};return(0,m.jsx)(p,{scope:t,...k,children:"function"==typeof f?f(k):n})}var g="CheckboxTrigger",b=a.forwardRef((e,t)=>{let{__scopeCheckbox:s,onKeyDown:r,onClick:i,...d}=e,{control:o,value:c,disabled:x,checked:h,required:f,setControl:p,setChecked:j,hasConsumerStoppedPropagationRef:b,isFormControl:N,bubbleInput:y}=v(g,s),w=(0,n.e)(t,p),_=a.useRef(h);return a.useEffect(()=>{let e=null==o?void 0:o.form;if(e){let t=()=>j(_.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[o,j]),(0,m.jsx)(u.WV.button,{type:"button",role:"checkbox","aria-checked":C(h)?"mixed":h,"aria-required":f,"data-state":R(h),"data-disabled":x?"":void 0,disabled:x,value:c,...d,ref:w,onKeyDown:(0,l.M)(r,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,l.M)(i,e=>{j(e=>!!C(e)||!e),y&&N&&(b.current=e.isPropagationStopped(),b.current||e.stopPropagation())})})});b.displayName=g;var N=a.forwardRef((e,t)=>{let{__scopeCheckbox:s,name:a,checked:n,defaultChecked:r,required:l,disabled:i,value:d,onCheckedChange:o,form:c,...u}=e;return(0,m.jsx)(j,{__scopeCheckbox:s,checked:n,defaultChecked:r,disabled:i,required:l,onCheckedChange:o,name:a,form:c,value:d,internal_do_not_use_render:e=>{let{isFormControl:a}=e;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(b,{...u,ref:t,__scopeCheckbox:s}),a&&(0,m.jsx)(k,{__scopeCheckbox:s})]})}})});N.displayName=x;var y="CheckboxIndicator",w=a.forwardRef((e,t)=>{let{__scopeCheckbox:s,forceMount:a,...n}=e,r=v(y,s);return(0,m.jsx)(c.z,{present:a||C(r.checked)||!0===r.checked,children:(0,m.jsx)(u.WV.span,{"data-state":R(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});w.displayName=y;var _="CheckboxBubbleInput",k=a.forwardRef((e,t)=>{let{__scopeCheckbox:s,...r}=e,{control:l,hasConsumerStoppedPropagationRef:i,checked:c,defaultChecked:x,required:h,disabled:f,name:p,value:j,form:g,bubbleInput:b,setBubbleInput:N}=v(_,s),y=(0,n.e)(t,N),w=(0,d.D)(c),k=(0,o.t)(l);a.useEffect(()=>{if(!b)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!i.current;if(w!==c&&e){let s=new Event("click",{bubbles:t});b.indeterminate=C(c),e.call(b,!C(c)&&c),b.dispatchEvent(s)}},[b,w,c,i]);let R=a.useRef(!C(c)&&c);return(0,m.jsx)(u.WV.input,{type:"checkbox","aria-hidden":!0,defaultChecked:null!=x?x:R.current,required:h,disabled:f,name:p,value:j,form:g,...r,tabIndex:-1,ref:y,style:{...r.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function C(e){return"indeterminate"===e}function R(e){return C(e)?"indeterminate":e?"checked":"unchecked"}k.displayName=_}},function(e){e.O(0,[329,3954,5874,7690,9851,7629,7093,6148,847,1942,7648,7823,8068,5799,4567,605,85,4957,7398,3825,1785,3397,7107,9141,7564,6373,3832,2971,2117,1744],function(){return e(e.s=70249)}),_N_E=e.O()}]);
2
- //# sourceMappingURL=page-07969d6e5fb01d7b.js.map
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8363],{81027:function(e,t,s){Promise.resolve().then(s.bind(s,20442))},20442:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return ea},dynamic:function(){return es}});var a=s(57437),n=s(2265),r=s(99376),l=s(12199),i=s(7211),d=s(13832),o=s(44045),c=s(64972),u=s(32660),m=s(99397),x=s(63639),h=s(65613),f=s(62869),p=s(66070),v=s(93022),j=s(27689),g=s(15863),b=s(26110),N=s(26815),y=s(95186),w=s(76818),_=s(53647),k=s(19060),C=s(77992),R=s(19378),Z=s(35974),T=s(6512);function S(e){var t,s,r,d,o,c,u,m,x;let{eval_set_id:h,onCreateSuccess:p,existingRun:v=null,open:S,onOpenChange:E}=e,{toast:z}=(0,C.pm)(),A=!!v,[O,M]=(0,n.useState)({id:"",name:"",rights_mode:"private",createdAt:"",updatedAt:"",eval_set_id:h,agent_id:"",eval_functions:[],scoring_method:"average",pass_threshold:70,timeout_in_seconds:300,test_case_ids:[]});(0,n.useEffect)(()=>{v?M(v):M({id:"",name:"",rights_mode:"private",createdAt:"",updatedAt:"",eval_set_id:h,agent_id:"",eval_functions:[],scoring_method:"average",pass_threshold:70,timeout_in_seconds:300,test_case_ids:[]})},[v,h]);let{data:P}=(0,i.aM)(j.ym,{variables:{page:1,limit:100,filters:[]},skip:!h}),{data:D}=(0,i.aM)(j.Ts,{skip:!h}),{data:q}=(0,i.aM)(j.RV,{variables:{page:1,limit:500,filters:[{eval_set_id:{eq:h}}]},skip:!h}),V=(null==q?void 0:null===(t=q.test_casesPagination)||void 0===t?void 0:t.items)||[],[I,{loading:F}]=(0,l.D)(j.oo,{onCompleted:()=>{z({title:"Eval run created",description:"The eval run has been created successfully. You can now run it."}),p&&p(),E(!1)},onError:e=>{z({title:"Failed to create eval run",description:e.message,variant:"destructive"})}}),[L,{loading:$}]=(0,l.D)(j.Nu,{onCompleted:()=>{z({title:"Eval run updated",description:"The eval run has been updated successfully."}),p&&p(),E(!1)},onError:e=>{z({title:"Failed to update eval run",description:e.message,variant:"destructive"})}}),Y=F||$,H=e=>{M(t=>({...t,test_case_ids:t.test_case_ids.includes(e)?t.test_case_ids.filter(t=>t!==e):[...t.test_case_ids,e]}))},J=()=>{M(e=>({...e,test_case_ids:e.test_case_ids.length===V.length?[]:V.map(e=>e.id)}))},B=e=>{M(t=>({...t,eval_functions:t.eval_functions.some(t=>t.id===e.id)?t.eval_functions.filter(t=>t.id!==e.id):[...t.eval_functions,e]}))};return(0,a.jsx)(b.Vq,{open:S,onOpenChange:E,children:(0,a.jsxs)(b.cZ,{className:"max-w-4xl h-[90vh] flex flex-col",children:[(0,a.jsxs)(b.fK,{children:[(0,a.jsx)(b.$N,{children:A?"Edit Eval Run":"Create Eval Run"}),(0,a.jsx)(b.Be,{children:A?"Update the configuration for this eval run.":"Configure a new evaluation run for this eval set."})]}),(0,a.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),console.log("[EXULU] Eval run",O),!O.name){z({title:"Validation error",description:"Please enter a name for this eval run.",variant:"destructive"});return}if(!O.agent_id){z({title:"Validation error",description:"Please select an agent.",variant:"destructive"});return}if(0===O.test_case_ids.length){z({title:"Validation error",description:"Please select at least one test case.",variant:"destructive"});return}if(0===O.eval_functions.length){z({title:"Validation error",description:"Please select at least one eval function.",variant:"destructive"});return}let t={name:O.name,eval_set_id:h,agent_id:O.agent_id,test_case_ids:O.test_case_ids,eval_functions:O.eval_functions,scoring_method:O.scoring_method.toUpperCase(),pass_threshold:O.pass_threshold,timeout_in_seconds:O.timeout_in_seconds,rights_mode:O.rights_mode,RBAC:O.RBAC};A?L({variables:{id:O.id,data:t}}):I({variables:{data:t}})},className:"flex-1 flex flex-col min-h-0",children:[(0,a.jsx)(R.x,{className:"flex-1 -mx-6 px-6",children:(0,a.jsxs)("div",{className:"space-y-6 pb-4",children:[(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:"Name"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Give this eval run a descriptive name"})]})}),(0,a.jsx)(y.I,{type:"text",placeholder:"e.g., GPT-4 baseline evaluation",value:O.name,onChange:e=>M(t=>({...t,name:e.target.value})),className:"h-11"})]}),(0,a.jsx)(T.Z,{}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:"Agent"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Choose which agent to evaluate"})]})}),(0,a.jsxs)(_.Ph,{value:O.agent_id,onValueChange:e=>M(t=>({...t,agent_id:e})),children:[(0,a.jsx)(_.i4,{className:"h-11",children:(0,a.jsx)(_.ki,{placeholder:"Select an agent..."})}),(0,a.jsx)(_.Bw,{children:null==P?void 0:null===(r=P.agentsPagination)||void 0===r?void 0:null===(s=r.items)||void 0===s?void 0:s.map(e=>(0,a.jsx)(_.Ql,{value:e.id,children:e.name},e.id))})]})]}),(0,a.jsx)(T.Z,{}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:"Eval Functions"}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:[O.eval_functions.length," of ",(null==D?void 0:null===(o=D.evals)||void 0===o?void 0:null===(d=o.items)||void 0===d?void 0:d.length)||0," selected"]})]})}),(0,a.jsx)(f.z,{type:"button",variant:"outline",size:"sm",onClick:e=>{var t,s;e.stopPropagation(),O.eval_functions.length===(null==D?void 0:null===(s=D.evals)||void 0===s?void 0:null===(t=s.items)||void 0===t?void 0:t.length)?M(e=>({...e,eval_functions:[]})):M(e=>{var t,s;return{...e,eval_functions:(null==D?void 0:null===(s=D.evals)||void 0===s?void 0:null===(t=s.items)||void 0===t?void 0:t.map(e=>({id:e.id,config:e.config})))||[]}})},children:O.eval_functions.length===(null==D?void 0:null===(u=D.evals)||void 0===u?void 0:null===(c=u.items)||void 0===c?void 0:c.length)?"Deselect All":"Select All"})]}),(0,a.jsx)("div",{className:"border rounded-lg bg-card",children:(0,a.jsx)("div",{className:"p-3 space-y-2",children:null==D?void 0:null===(x=D.evals)||void 0===x?void 0:null===(m=x.items)||void 0===m?void 0:m.map(e=>(0,a.jsxs)("label",{htmlFor:"eval-".concat(e.id),className:"flex items-start gap-3 p-3 rounded-md hover:bg-accent transition-colors cursor-pointer border border-transparent hover:border-border",children:[(0,a.jsx)(k.X,{id:"eval-".concat(e.id),checked:O.eval_functions.some(t=>t.id===e.id),onCheckedChange:()=>B({id:e.id,config:e.config}),className:"mt-0.5"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsx)("span",{className:"font-medium text-sm",children:e.name})}),e.description&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description}),e.config&&e.config.length>0&&O.eval_functions.some(t=>t.id===e.id)&&(0,a.jsxs)("div",{className:"mt-3 space-y-3 pt-3 border-t",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-muted-foreground",children:"Configuration"}),e.config.map(t=>{var s,n;return(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)(N._,{htmlFor:"".concat(e.id,"-").concat(t.name),className:"text-xs font-medium",children:t.name}),(0,a.jsx)(w.g,{id:"".concat(e.id,"-").concat(t.name),placeholder:t.description,value:(null===(n=O.eval_functions.find(t=>t.id===e.id))||void 0===n?void 0:null===(s=n.config)||void 0===s?void 0:s[t.name])||"",onChange:s=>{s.stopPropagation(),M(a=>({...a,eval_functions:a.eval_functions.map(a=>a.id===e.id?{...a,config:{...a.config,[t.name]:s.target.value}}:a)}))},onClick:e=>e.stopPropagation(),className:"min-h-[80px] text-xs resize-none"}),t.description&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed",children:t.description})]},t.name)})]})]})]},e.id))})})]}),(0,a.jsx)(T.Z,{}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:"Test Cases"}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:[O.test_case_ids.length," of ",V.length," selected"]})]})}),(0,a.jsx)(f.z,{type:"button",variant:"outline",size:"sm",onClick:e=>{e.stopPropagation(),J()},children:O.test_case_ids.length===V.length?"Deselect All":"Select All"})]}),(0,a.jsx)("div",{className:"border rounded-lg bg-card",children:(0,a.jsx)(R.x,{className:"h-[250px]",children:(0,a.jsx)("div",{className:"p-3 space-y-2",children:V.map(e=>{var t;return(0,a.jsxs)("label",{htmlFor:"test-case-".concat(e.id),className:"flex items-start gap-3 p-3 rounded-md hover:bg-accent transition-colors cursor-pointer border border-transparent hover:border-border",children:[(0,a.jsx)(k.X,{id:"test-case-".concat(e.id),checked:O.test_case_ids.includes(e.id),onCheckedChange:()=>H(e.id),className:"mt-0.5"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"font-medium text-sm",children:e.name}),(0,a.jsxs)(Z.C,{variant:"secondary",className:"text-[10px] shrink-0",children:[(null===(t=e.inputs)||void 0===t?void 0:t.length)||0," msgs"]})]}),e.description&&(0,a.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]})]},e.id)})})})})]}),(0,a.jsx)(T.Z,{}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:"Scoring"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"Configure how scores are calculated"})]})}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 p-4 border rounded-lg bg-muted/30",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(N._,{htmlFor:"scoringMethod",className:"text-xs font-semibold",children:"Scoring Method"}),(0,a.jsxs)(_.Ph,{value:O.scoring_method,onValueChange:e=>M(t=>({...t,scoring_method:e})),children:[(0,a.jsx)(_.i4,{id:"scoringMethod",className:"h-10",children:(0,a.jsx)(_.ki,{})}),(0,a.jsxs)(_.Bw,{children:[(0,a.jsx)(_.Ql,{value:"median",children:"Median"}),(0,a.jsx)(_.Ql,{value:"average",children:"Average"}),(0,a.jsx)(_.Ql,{value:"sum",children:"Sum"})]})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"How to combine multiple eval function scores"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(N._,{htmlFor:"passThreshold",className:"text-xs font-semibold",children:"Pass Threshold"}),(0,a.jsx)(y.I,{id:"passThreshold",type:"number",min:"0",max:"100",value:O.pass_threshold,onChange:e=>M(t=>({...t,pass_threshold:Number(e.target.value)})),className:"h-10"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Minimum score (0-100) to pass"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(N._,{htmlFor:"timeoutInSeconds",className:"text-xs font-semibold",children:"Timeout (seconds)"}),(0,a.jsx)(y.I,{id:"timeoutInSeconds",type:"number",min:"1",value:O.timeout_in_seconds,onChange:e=>M(t=>({...t,timeout_in_seconds:Number(e.target.value)})),className:"h-10"}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Max time per test case execution"})]})]})]})]})}),(0,a.jsx)(T.Z,{className:"my-4"}),(0,a.jsx)(b.cN,{className:"shrink-0",children:(0,a.jsxs)(f.z,{type:"submit",disabled:Y||!O.name||!O.agent_id||0===O.test_case_ids.length||0===O.eval_functions.length,className:"w-full h-11",children:[Y&&(0,a.jsx)(g.Z,{className:"mr-2 h-4 w-4 animate-spin"}),A?"Update Eval Run":"Create Eval Run"]})})]})]})})}var E=s(69304),z=s(84190),A=s(92451),O=s(17684),M=s(15868),P=s(33276),D=s(39763);let q=(0,D.Z)("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);var V=s(27107),I=s(91723),F=s(45131);let L=(0,D.Z)("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);var $=s(94508);let Y={waiting:(0,a.jsx)(I.Z,{className:"h-3 w-3"}),active:(0,a.jsx)(g.Z,{className:"h-3 w-3 animate-spin"}),completed:null,failed:(0,a.jsx)(F.Z,{className:"h-3 w-3"}),delayed:(0,a.jsx)(I.Z,{className:"h-3 w-3"}),paused:(0,a.jsx)(L,{className:"h-3 w-3"}),stuck:(0,a.jsx)(x.Z,{className:"h-3 w-3"})},H={waiting:"text-yellow-600 bg-yellow-50 border-yellow-200",active:"text-blue-600 bg-blue-50 border-blue-200",completed:"",failed:"text-red-600 bg-red-50 border-red-200",delayed:"text-orange-600 bg-orange-50 border-orange-200",paused:"text-gray-600 bg-gray-50 border-gray-200",stuck:"text-red-600 bg-red-50 border-red-200"};function J(e){var t;let{evalRun:s,testCases:n,onCellClick:r}=e,{data:l,loading:d}=(0,i.aM)(j.JL,{variables:{page:1,limit:500,filters:[{label:{contains:"eval-run-"+s.id}}]},skip:!s.id}),o=(null==l?void 0:null===(t=l.job_resultsPagination)||void 0===t?void 0:t.items)||[],c=e=>o.find(t=>{var a,n;return(null===(a=t.label)||void 0===a?void 0:a.includes(e))&&(null===(n=t.label)||void 0===n?void 0:n.includes(s.id))})||null,u=e=>{if(console.log("[EXULU] result",null==e?void 0:e.result),!e||"completed"!==e.state||void 0===e.result)return"";let t=e.result,a=s.pass_threshold;return t>=a?"text-green-500":t>=a-20?"text-orange-500":"text-red-500"};return(0,a.jsx)("div",{className:"flex-shrink-0 min-w-[100px]",children:n.map(e=>{let t=s.test_case_ids.includes(e.id),n=c(e.id);if(!t)return(0,a.jsx)("div",{className:"p-3 text-center border-r bg-muted/20 min-h-[72px] flex items-center justify-center",children:(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:"—"})},e.id);let l=u(n),i=(null==n?void 0:n.state)?H[n.state]:"bg-transparent";return(0,a.jsx)("div",{className:"p-3 text-center border-r min-h-[72px] flex items-center justify-center",children:(0,a.jsx)("div",{onClick:()=>r(n),className:(0,$.cn)("w-full h-full min-h-[48px] rounded transition-colors flex items-center justify-center gap-2",l||i||"border-gray-200 bg-gray-50",(null==n?void 0:n.state)==="completed"&&"cursor-pointer hover:opacity-80",(!n||"completed"!==n.state)&&"cursor-default"),children:d?(0,a.jsx)(g.Z,{className:"h-3 w-3 animate-spin"}):n?(0,a.jsx)(a.Fragment,{children:"completed"===n.state&&void 0!==n.result?(0,a.jsx)("span",{className:"font-semibold text-sm hover:underline",children:n.result.toFixed(1)}):(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[Y[n.state],(0,a.jsx)("span",{className:"text-xs capitalize",children:n.state})]})}):(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[Y.waiting,(0,a.jsx)("span",{className:"text-xs capitalize",children:"Not started"})]})})},e.id)})})}var B=s(37099),Q=s(62910);function U(e){var t,s;let{evalRuns:r,evalSet:d,canWrite:o,onRefetch:c}=e,{toast:u}=(0,C.pm)(),[m,x]=(0,n.useState)(5),[h,p]=(0,n.useState)(null),[b,N]=(0,n.useState)(!1),[y,w]=(0,n.useState)(!1),[_,k]=(0,n.useState)(null),[Z,T]=(0,n.useState)(!1),[D,I]=(0,n.useState)(null);console.log("[EXULU] Eval set",d);let{data:F,loading:L,refetch:$}=(0,i.aM)(j.RV,{variables:{page:1,limit:500,filters:[{eval_set_id:{eq:d.id}}]},skip:!d.id}),Y=(null==F?void 0:null===(t=F.test_casesPagination)||void 0===t?void 0:t.items)||[],[H,{loading:U}]=(0,l.D)(j.B4,{onCompleted:e=>{u({title:"Eval run started",description:"Scheduled ".concat(e.runEval.count," test cases to run.")}),c()},onError:e=>{u({title:"Failed to start eval run",description:e.message,variant:"destructive"})}}),W=[...r].sort((e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime()),X=W.slice(-m),G=W.length>m,K=e=>{e&&"completed"===e.state&&(p(e),N(!0))},ee=e=>{k(e),w(!0)},et=e=>{I(e),T(!0)},es=e=>{console.log("Stop run:",e)};return L?(0,a.jsx)("div",{className:"space-y-2",children:Array.from({length:5}).map((e,t)=>(0,a.jsx)(v.O,{className:"h-12 w-full"},t))}):0===Y.length?(0,a.jsx)("div",{className:"text-center py-8 text-muted-foreground",children:"No test cases in this eval set."}):(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsxs)(R.x,{className:"w-full",children:[(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsxs)("div",{className:"sticky left-0 z-10 bg-background flex-shrink-0 min-w-[200px]",children:[(0,a.jsx)("div",{className:"p-3 border-b border-r text-left font-medium text-sm",children:"Test Case"}),Y.map(e=>(0,a.jsx)("div",{className:"p-3 border-b border-r min-h-[72px] flex items-center",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"font-medium text-sm",children:e.name}),e.description&&(0,a.jsx)("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-1 truncate max-w-[100px]",children:e.id})]})},e.id))]}),G&&(0,a.jsxs)("div",{className:"flex-shrink-0 min-w-[60px]",children:[(0,a.jsx)("div",{className:"text-center border-b border-r p-2 min-h-[48px] flex items-center justify-center",children:(0,a.jsx)(f.z,{variant:"ghost",size:"sm",onClick:()=>{x(e=>Math.min(e+5,W.length))},className:"h-8 w-8 p-0",children:(0,a.jsx)(A.Z,{className:"h-4 w-4"})})}),Y.map(e=>(0,a.jsx)("div",{className:"p-3 border-b border-r bg-muted/20 min-h-[72px]"},e.id))]}),X.map(e=>(0,a.jsxs)("div",{className:"flex-1 min-w-[100px]",children:[(0,a.jsx)("div",{className:"px-2 py-1.5 text-center font-medium text-sm border-b border-r bg-muted/30 min-h-[48px]",children:(0,a.jsxs)("div",{className:"space-y-0.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,a.jsx)("div",{className:"flex-1 text-xs font-semibold text-foreground truncate",children:e.name}),(0,a.jsxs)(z.h_,{children:[(0,a.jsx)(z.$F,{asChild:!0,children:(0,a.jsx)(f.z,{variant:"ghost",size:"sm",className:"h-5 w-5 p-0 hover:bg-background/80",children:(0,a.jsx)(O.Z,{className:"h-3 w-3"})})}),(0,a.jsxs)(z.AW,{align:"end",children:[(0,a.jsxs)(z.Xi,{onClick:()=>ee(e),children:[(0,a.jsx)(M.Z,{className:"mr-2 h-4 w-4"}),"Edit"]}),(0,a.jsxs)(z.Xi,{onClick:()=>et(e),children:[(0,a.jsx)(P.Z,{className:"mr-2 h-4 w-4"}),"Start"]}),(0,a.jsxs)(z.Xi,{onClick:()=>es(e),children:[(0,a.jsx)(q,{className:"mr-2 h-4 w-4"}),"Stop"]})]})]})]}),(0,a.jsx)("div",{className:"text-[10px] text-muted-foreground font-normal leading-tight",children:(0,V.WU)(new Date(e.createdAt),"MMM d, yyyy \xb7 HH:mm")}),(0,a.jsx)("div",{className:"text-[10px] text-muted-foreground font-normal leading-tight truncate max-w-[100px] text-center m-auto",children:e.id})]})}),(0,a.jsx)(J,{evalRun:e,testCases:Y,onCellClick:K})]},e.id))]}),(0,a.jsx)(R.B,{orientation:"horizontal"})]}),(0,a.jsx)(E.yo,{open:b,onOpenChange:N,children:(0,a.jsxs)(E.ue,{children:[(0,a.jsx)(E.Tu,{children:(0,a.jsx)(E.bC,{children:"Test Result Details"})}),(0,a.jsx)("div",{className:"mt-4",children:h&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Job ID"}),(0,a.jsx)("div",{className:"text-sm",children:h.job_id})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Score"}),(0,a.jsx)("div",{className:"text-2xl font-bold",children:null===(s=h.result)||void 0===s?void 0:s.toFixed(1)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Status"}),(0,a.jsx)("div",{className:"text-sm capitalize",children:h.state})]}),h.error&&"object"==typeof h.error&&Object.keys(h.error).length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Error"}),(0,a.jsx)("div",{className:"text-sm text-red-600",children:JSON.stringify(h.error)})]}),h.metadata&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:"Metadata"}),(0,a.jsx)(Q.G,{code:JSON.stringify(h.metadata,null,2)})]})]})})]})}),(0,a.jsx)(S,{eval_set_id:d.id,open:y,onOpenChange:e=>{w(e),e||k(null)},existingRun:_,onCreateSuccess:c}),(0,a.jsx)(B.aR,{open:Z,onOpenChange:T,children:(0,a.jsxs)(B._T,{children:[(0,a.jsxs)(B.fY,{children:[(0,a.jsx)(B.f$,{children:"Start Eval Run?"}),(0,a.jsxs)(B.yT,{children:["This will schedule all ",(null==D?void 0:D.test_case_ids.length)||0,' test cases in "',null==D?void 0:D.name,'" to be run. The eval run will execute each test case against the configured agent and eval functions.']})]}),(0,a.jsxs)(B.xo,{children:[(0,a.jsx)(B.le,{onClick:()=>I(null),children:"Cancel"}),(0,a.jsxs)(B.OL,{onClick:()=>{D&&H({variables:{id:D.id}}),T(!1),I(null)},disabled:U,children:[U&&(0,a.jsx)(g.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Start Run"]})]})]})})]})}var W=s(73578);let X=(0,D.Z)("Droplet",[["path",{d:"M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z",key:"c7niix"}]]);var G=s(18930),K=s(52636),ee=s(68656);function et(e){var t,s,r,d,o;let{queueName:c,nameGenerator:u,retryJob:m}=e,{toast:x}=(0,C.pm)(),[h,v]=(0,n.useState)(!1),[b,N]=(0,n.useState)(!1),[y,w]=(0,n.useState)(!1),[_,k]=(0,n.useState)(null),[R,T]=(0,n.useState)(null),{data:S,loading:E,refetch:z}=(0,i.aM)(j.k9,{variables:{queue:c},pollInterval:5e3}),{data:A,loading:O,refetch:M}=(0,i.aM)(j.Jq,{variables:{queue:c,statusses:null},pollInterval:5e3}),[D,{loading:q}]=(0,l.D)(j.Wr,{onCompleted:()=>{x({title:"Job deleted",description:"The job has been successfully deleted."}),M(),z(),k(null)},onError:e=>{x({title:"Failed to delete job",description:e.message,variant:"destructive"})}}),[I,{loading:F}]=(0,l.D)(j.fc,{onCompleted:()=>{x({title:"Queue paused",description:"The ".concat(c," queue has been paused.")}),z(),v(!1)},onError:e=>{x({title:"Failed to pause queue",description:e.message,variant:"destructive"})}}),[$,{loading:Y}]=(0,l.D)(j.iC,{onCompleted:()=>{x({title:"Queue resumed",description:"The ".concat(c," queue has been resumed.")}),z(),w(!1)},onError:e=>{x({title:"Failed to resume queue",description:e.message,variant:"destructive"})}}),[H,{loading:J}]=(0,l.D)(j.QW,{onCompleted:()=>{x({title:"Queue drained",description:"All waiting and delayed jobs have been removed from the queue."}),z(),M(),N(!1)},onError:e=>{x({title:"Failed to drain queue",description:e.message,variant:"destructive"})}}),Q=e=>{k(e)},U=e=>{T(e)},et=null==S?void 0:S.queue,es=(null==A?void 0:null===(t=A.jobs)||void 0===t?void 0:t.items)||[],ea=e=>(0,a.jsx)(Z.C,{variant:"outline",className:{active:"bg-blue-100 text-blue-800 border-blue-200",waiting:"bg-yellow-100 text-yellow-800 border-yellow-200",completed:"bg-green-100 text-green-800 border-green-200",failed:"bg-red-100 text-red-800 border-red-200",delayed:"bg-orange-100 text-orange-800 border-orange-200",paused:"bg-gray-100 text-gray-800 border-gray-200"}[e]||"bg-gray-100 text-gray-800",children:e});return E&&O?(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsx)(p.Zb,{children:(0,a.jsx)(p.aY,{className:"pt-6",children:(0,a.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,a.jsx)(g.Z,{className:"h-6 w-6 animate-spin"})})})})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(p.Zb,{children:[(0,a.jsx)(p.Ol,{children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(p.ll,{children:["Queue: ",c]}),(0,a.jsxs)(p.SZ,{children:["Manage the ",c," job queue and view all jobs"]})]}),et&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)(f.z,{variant:"outline",size:"sm",onClick:()=>(null==et?void 0:et.isPaused)?w(!0):v(!0),disabled:F||Y,children:[(null==et?void 0:et.isPaused)?(0,a.jsx)(P.Z,{className:"mr-2 h-4 w-4"}):(0,a.jsx)(L,{className:"mr-2 h-4 w-4"}),(null==et?void 0:et.isPaused)?"Resume":"Pause"]}),(0,a.jsxs)(f.z,{variant:"outline",size:"sm",onClick:()=>N(!0),disabled:J,children:[(0,a.jsx)(X,{className:"mr-2 h-4 w-4"}),"Drain"]})]})]})}),(0,a.jsxs)(p.aY,{className:"space-y-6",children:[et&&(0,a.jsxs)("div",{className:"flex items-center gap-8 p-4 bg-muted/50 rounded-lg",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:"Status:"}),(0,a.jsx)("div",{children:et.isPaused?(0,a.jsx)(Z.C,{variant:"outline",className:"bg-gray-100 text-gray-800",children:"Paused"}):et.isMaxed?(0,a.jsx)(Z.C,{variant:"outline",className:"bg-red-100 text-red-800",children:"Maxed"}):(0,a.jsx)(Z.C,{variant:"outline",className:"bg-green-100 text-green-800",children:"Active"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:"Concurrency:"}),(0,a.jsx)("div",{className:"font-semibold",children:et.concurrency})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:"Rate Limit:"}),(0,a.jsx)("div",{className:"font-semibold",children:et.ratelimit||"None"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("div",{className:"text-xs text-muted-foreground",children:"Active:"}),(0,a.jsx)("div",{className:"font-semibold text-blue-600",children:(null===(s=et.jobs)||void 0===s?void 0:s.active)||0})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("div",{className:"text-xs text-muted-foreground",children:"Waiting:"}),(0,a.jsx)("div",{className:"font-semibold text-yellow-600",children:(null===(r=et.jobs)||void 0===r?void 0:r.waiting)||0})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("div",{className:"text-xs text-muted-foreground",children:"Failed:"}),(0,a.jsx)("div",{className:"font-semibold text-red-600",children:(null===(d=et.jobs)||void 0===d?void 0:d.failed)||0})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("div",{className:"text-xs text-muted-foreground",children:"Completed:"}),(0,a.jsx)("div",{className:"font-semibold text-green-600",children:(null===(o=et.jobs)||void 0===o?void 0:o.completed)||0})]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"Queue Jobs"}),(0,a.jsxs)("p",{className:"text-xs text-muted-foreground",children:["All jobs currently in the ",c," queue"]})]}),(0,a.jsx)("div",{className:"border rounded-lg",children:O?(0,a.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,a.jsx)(g.Z,{className:"h-6 w-6 animate-spin"})}):0===es.length?(0,a.jsx)("div",{className:"text-center py-8 text-muted-foreground",children:"No jobs in queue"}):(0,a.jsxs)(W.iA,{children:[(0,a.jsx)(W.xD,{children:(0,a.jsxs)(W.SC,{children:[(0,a.jsx)(W.ss,{children:"Name"}),(0,a.jsx)(W.ss,{children:"State"}),(0,a.jsx)(W.ss,{children:"Timestamp"}),(0,a.jsx)(W.ss,{children:"Inputs"}),(0,a.jsx)(W.ss,{children:"Outputs"}),(0,a.jsx)(W.ss,{className:"text-right",children:"Actions"})]})}),(0,a.jsx)(W.RM,{children:es.map((e,t)=>(0,a.jsxs)(W.SC,{children:[(0,a.jsx)(W.pj,{className:"font-medium",children:u(e)}),(0,a.jsx)(W.pj,{children:ea(e.state)}),(0,a.jsx)(W.pj,{children:e.timestamp?(0,V.WU)(new Date(e.timestamp),"MMM d, yyyy HH:mm:ss"):"N/A"}),(0,a.jsx)(W.pj,{children:e.data?(0,a.jsx)("div",{className:"text-xs max-w-xs truncate",children:(0,a.jsx)(ee.J,{text:JSON.stringify(e.data)})}):null}),(0,a.jsx)(W.pj,{children:e.failedReason?(0,a.jsx)("div",{className:"text-xs text-red-600 max-w-xs truncate",children:(0,a.jsx)(ee.J,{text:"Error: "+e.failedReason})}):(0,a.jsx)("div",{className:"text-xs text-muted-foreground max-w-xs truncate",children:(0,a.jsx)(ee.J,{text:JSON.stringify(e.returnvalue)})})}),(0,a.jsxs)(W.pj,{className:"text-right",children:["active"!==e.state&&(0,a.jsx)(f.z,{variant:"ghost",size:"sm",onClick:()=>Q(e),disabled:q,children:(0,a.jsx)(G.Z,{className:"h-4 w-4 text-red-600"})}),"failed"===e.state&&(0,a.jsxs)(f.z,{variant:"ghost",size:"sm",onClick:()=>U(e),children:[(0,a.jsx)(K.Z,{className:"h-4 w-4 text-blue-600"}),"Retry"]})]})]},t))})]})})]})]})]}),(0,a.jsx)(B.aR,{open:!!_,onOpenChange:e=>!e&&k(null),children:(0,a.jsxs)(B._T,{children:[(0,a.jsxs)(B.fY,{children:[(0,a.jsx)(B.f$,{children:"Delete Job?"}),(0,a.jsxs)(B.yT,{children:['Are you sure you want to delete the job "',null==_?void 0:_.name,'"? This action cannot be undone.']})]}),(0,a.jsxs)(B.xo,{children:[(0,a.jsx)(B.le,{children:"Cancel"}),(0,a.jsxs)(B.OL,{onClick:()=>{if(!(null==_?void 0:_.id)){x({title:"Failed to delete job",description:"The job has no ID.",variant:"destructive"});return}_&&D({variables:{queue:c,id:_.id}})},disabled:q,children:[q&&(0,a.jsx)(g.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Delete"]})]})]})}),(0,a.jsx)(B.aR,{open:!!R,onOpenChange:e=>!e&&T(null),children:(0,a.jsxs)(B._T,{children:[(0,a.jsxs)(B.fY,{children:[(0,a.jsx)(B.f$,{children:"Retry Job?"}),(0,a.jsxs)(B.yT,{children:['Are you sure you want to retry the job "',null==R?void 0:R.name,'"? This will schedule a new job with the same data.']})]}),(0,a.jsxs)(B.xo,{children:[(0,a.jsx)(B.le,{children:"Cancel"}),(0,a.jsx)(B.OL,{onClick:()=>{R&&m(R)},disabled:q,children:"Retry"})]})]})}),(0,a.jsx)(B.aR,{open:h,onOpenChange:v,children:(0,a.jsxs)(B._T,{children:[(0,a.jsxs)(B.fY,{children:[(0,a.jsx)(B.f$,{children:"Pause Queue?"}),(0,a.jsxs)(B.yT,{children:["Are you sure you want to pause the ",c," queue? No jobs will be processed until the queue is resumed."]})]}),(0,a.jsxs)(B.xo,{children:[(0,a.jsx)(B.le,{children:"Cancel"}),(0,a.jsxs)(B.OL,{onClick:()=>{I({variables:{queue:c}})},disabled:F,children:[F&&(0,a.jsx)(g.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Pause Queue"]})]})]})}),(0,a.jsx)(B.aR,{open:y,onOpenChange:w,children:(0,a.jsxs)(B._T,{children:[(0,a.jsxs)(B.fY,{children:[(0,a.jsx)(B.f$,{children:"Resume Queue?"}),(0,a.jsxs)(B.yT,{children:["Are you sure you want to resume the ",c," queue?."]})]}),(0,a.jsxs)(B.xo,{children:[(0,a.jsx)(B.le,{children:"Cancel"}),(0,a.jsxs)(B.OL,{onClick:()=>{$({variables:{queue:c}})},disabled:Y,children:[Y&&(0,a.jsx)(g.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Resume Queue"]})]})]})}),(0,a.jsx)(B.aR,{open:b,onOpenChange:N,children:(0,a.jsxs)(B._T,{children:[(0,a.jsxs)(B.fY,{children:[(0,a.jsx)(B.f$,{children:"Drain Queue?"}),(0,a.jsxs)(B.yT,{children:["Are you sure you want to drain the ",c," queue? This will remove all jobs that are waiting or delayed, but not active, waiting-children, completed or failed. This action cannot be undone."]})]}),(0,a.jsxs)(B.xo,{children:[(0,a.jsx)(B.le,{children:"Cancel"}),(0,a.jsxs)(B.OL,{onClick:()=>{H({variables:{queue:c}})},disabled:J,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:[J&&(0,a.jsx)(g.Z,{className:"mr-2 h-4 w-4 animate-spin"}),"Drain Queue"]})]})]})})]})}let es="force-dynamic";function ea(){var e,t,s,g,b,N,y,w,_,k,R,Z;let T=(0,r.useParams)(),E=(0,r.useRouter)(),{user:z}=(0,n.useContext)(d.S),A=(0,n.useContext)(o.E),O=T.id,[M,P]=(0,n.useState)(!1),{toast:D}=(0,C.pm)(),q=z.super_admin||(null===(e=z.role)||void 0===e?void 0:e.evals)==="read"||(null===(t=z.role)||void 0===t?void 0:t.evals)==="write",V=z.super_admin||(null===(s=z.role)||void 0===s?void 0:s.evals)==="write",[I,{loading:F}]=(0,l.D)(j.B4,{onCompleted:e=>{D({title:"Eval run started",description:"Scheduled ".concat(e.runEval.count," test cases to run.")})},onError:e=>{D({title:"Failed to start eval run",description:e.message,variant:"destructive"})}}),{loading:L,data:$}=(0,i.aM)(j.iA,{variables:{id:O},skip:!O}),{loading:Y,data:H,refetch:J}=(0,i.aM)(j.i9,{variables:{page:1,limit:100,filters:[{eval_set_id:{eq:O}}]},skip:!O,pollInterval:1e4});if(!q)return(0,a.jsx)("div",{className:"flex h-full flex-1 flex-col space-y-8 p-8",children:(0,a.jsxs)(h.bZ,{variant:"destructive",children:[(0,a.jsx)(c.Z,{className:"h-4 w-4"}),(0,a.jsx)(h.X,{children:"You don't have permission to access Eval Runs. Contact your administrator to request access."})]})});if(L)return(0,a.jsxs)("div",{className:"flex h-full flex-1 flex-col space-y-8 p-8",children:[(0,a.jsx)(v.O,{className:"h-8 w-64"}),(0,a.jsx)(v.O,{className:"h-64 w-full"})]});let B=null==$?void 0:$.eval_setById,Q=(null==H?void 0:null===(g=H.eval_runsPagination)||void 0===g?void 0:g.items)||[];return(0,a.jsxs)("div",{className:"flex h-full flex-1 flex-col p-6 lg:p-8",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)(f.z,{variant:"ghost",size:"icon",onClick:()=>E.push("/evals/".concat(O)),children:(0,a.jsx)(u.Z,{className:"h-4 w-4"})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("h2",{className:"text-2xl font-bold tracking-tight",children:["Eval Runs for ",null==B?void 0:B.name]}),(0,a.jsxs)("p",{className:"text-muted-foreground text-sm mt-1",children:['View and manage evaluation runs for the eval set "',null==B?void 0:B.name,'".']})]})]}),V&&(null==A?void 0:null===(b=A.workers)||void 0===b?void 0:b.enabled)&&(null==A?void 0:null===(N=A.workers)||void 0===N?void 0:N.redisHost)&&(0,a.jsxs)(f.z,{onClick:()=>P(!0),children:[(0,a.jsx)(m.Z,{className:"mr-2 h-4 w-4"}),"New Eval Run"]})]}),(!(null==A?void 0:null===(y=A.workers)||void 0===y?void 0:y.enabled)||!(null==A?void 0:null===(w=A.workers)||void 0===w?void 0:w.redisHost))&&(0,a.jsxs)(h.bZ,{variant:"destructive",className:"mb-6",children:[(0,a.jsx)(x.Z,{className:"h-4 w-4"}),(0,a.jsx)(h.X,{children:"Workers are not enabled. You can view existing eval runs but cannot create or run new evaluations. Configure Redis to enable running eval runs."})]}),(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)(p.Zb,{children:[(0,a.jsxs)(p.Ol,{className:"pb-4",children:[(0,a.jsx)(p.ll,{children:"Evaluation Run Results"}),(0,a.jsx)(p.SZ,{children:"Matrix view of test case scores across eval runs. Click on a completed cell to view detailed results."})]}),(0,a.jsx)(p.aY,{children:Y?(0,a.jsx)("div",{className:"space-y-2",children:Array.from({length:3}).map((e,t)=>(0,a.jsx)(v.O,{className:"h-16 w-full"},t))}):0===Q.length?(0,a.jsxs)("div",{className:"text-center py-12 text-muted-foreground",children:["No eval runs yet. ",V&&(null==A?void 0:null===(_=A.workers)||void 0===_?void 0:_.enabled)&&(null==A?void 0:null===(k=A.workers)||void 0===k?void 0:k.redisHost)&&"Click 'New Eval Run' to create one."]}):(0,a.jsx)(U,{evalRuns:Q,evalSet:B,canWrite:V,onRefetch:J})})]}),(null==A?void 0:null===(R=A.workers)||void 0===R?void 0:R.enabled)&&(null==A?void 0:null===(Z=A.workers)||void 0===Z?void 0:Z.redisHost)&&Q.length>0&&(0,a.jsx)(et,{queueName:"eval_runs",nameGenerator:e=>{var t,s,a,n;return"Eval Run ".concat((null===(t=e.data)||void 0===t?void 0:t.eval_run_name)||(null===(s=e.data)||void 0===s?void 0:s.eval_run_id)," - Test Case ").concat((null===(a=e.data)||void 0===a?void 0:a.test_case_name)||(null===(n=e.data)||void 0===n?void 0:n.test_case_id))},retryJob:e=>{var t,s,a,n;(null===(t=e.data)||void 0===t?void 0:t.test_case_id)&&(null===(s=e.data)||void 0===s?void 0:s.eval_run_id)&&I({variables:{id:null===(a=e.data)||void 0===a?void 0:a.eval_run_id,test_case_ids:[null===(n=e.data)||void 0===n?void 0:n.test_case_id]}})}})]}),(0,a.jsx)(S,{eval_set_id:O,open:M,onOpenChange:P,onCreateSuccess:()=>{J()}})]})}},53245:function(e,t,s){"use strict";s.d(t,{d:function(){return x},f:function(){return h}});var a=s(57437),n=s(62869),r=s(94508),l=s(30401),i=s(78867),d=s(2265),o=s(34996),c=s(1479),u=s(9880);let m=(0,d.createContext)({code:""}),x=e=>{let{code:t,language:s,showLineNumbers:n=!1,className:l,children:i,...d}=e;return(0,a.jsx)(m.Provider,{value:{code:t},children:(0,a.jsx)("div",{className:(0,r.cn)("relative w-full overflow-hidden rounded-md border bg-background text-foreground",l),...d,children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(o.Z,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:s,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:n,style:c.Z,children:t}),(0,a.jsx)(o.Z,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:s,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:n,style:u.Z,children:t}),i&&(0,a.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:i})]})})})},h=e=>{let{onCopy:t,onError:s,timeout:o=2e3,children:c,className:u,...x}=e,[h,f]=(0,d.useState)(!1),{code:p}=(0,d.useContext)(m),v=async()=>{if(!navigator.clipboard.writeText){null==s||s(Error("Clipboard API not available"));return}try{await navigator.clipboard.writeText(p),f(!0),null==t||t(),setTimeout(()=>f(!1),o)}catch(e){null==s||s(e)}},j=h?l.Z:i.Z;return(0,a.jsx)(n.z,{className:(0,r.cn)("shrink-0",u),onClick:v,size:"icon",variant:"ghost",...x,children:null!=c?c:(0,a.jsx)(j,{size:14})})}},35629:function(e,t,s){"use strict";s.d(t,{H:function(){return x}});var a=s(57437),n=s(94508),r=s(2265),l=s(86816),i=s(67245),d=s(58146),o=s(85020),c=s(53245);s(2446);let u=(0,s(86589).Z)(l.UG),m={ol:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("ol",{className:(0,n.cn)("ml-4 list-outside list-decimal",r),...l,children:s})},li:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("li",{className:(0,n.cn)("py-1",r),...l,children:s})},ul:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("ul",{className:(0,n.cn)("ml-4 list-outside list-disc",r),...l,children:s})},hr:e=>{let{node:t,className:s,...r}=e;return(0,a.jsx)("hr",{className:(0,n.cn)("my-6 border-border",s),...r})},strong:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("span",{className:(0,n.cn)("font-semibold",r),...l,children:s})},a:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("a",{className:(0,n.cn)("font-medium text-primary underline",r),rel:"noreferrer",target:"_blank",...l,children:s})},h1:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("h1",{className:(0,n.cn)("mt-6 mb-2 font-semibold text-3xl",r),...l,children:s})},h2:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("h2",{className:(0,n.cn)("mt-6 mb-2 font-semibold text-2xl",r),...l,children:s})},h3:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("h3",{className:(0,n.cn)("mt-6 mb-2 font-semibold text-xl",r),...l,children:s})},h4:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("h4",{className:(0,n.cn)("mt-6 mb-2 font-semibold text-lg",r),...l,children:s})},h5:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("h5",{className:(0,n.cn)("mt-6 mb-2 font-semibold text-base",r),...l,children:s})},h6:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("h6",{className:(0,n.cn)("mt-6 mb-2 font-semibold text-sm",r),...l,children:s})},table:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("div",{className:"my-4 overflow-x-auto",children:(0,a.jsx)("table",{className:(0,n.cn)("w-full border-collapse border border-border",r),...l,children:s})})},thead:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("thead",{className:(0,n.cn)("bg-muted/50",r),...l,children:s})},tbody:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("tbody",{className:(0,n.cn)("divide-y divide-border",r),...l,children:s})},tr:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("tr",{className:(0,n.cn)("border-border border-b",r),...l,children:s})},th:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("th",{className:(0,n.cn)("px-4 py-2 text-left font-semibold text-sm",r),...l,children:s})},td:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("td",{className:(0,n.cn)("px-4 py-2 text-sm",r),...l,children:s})},blockquote:e=>{let{node:t,children:s,className:r,...l}=e;return(0,a.jsx)("blockquote",{className:(0,n.cn)("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",r),...l,children:s})},code:e=>{var t,s;let{node:r,className:l,...i}=e;return(null==r?void 0:null===(t=r.position)||void 0===t?void 0:t.start.line)!==(null==r?void 0:null===(s=r.position)||void 0===s?void 0:s.end.line)?(0,a.jsx)("code",{className:l,...i}):(0,a.jsx)("code",{className:(0,n.cn)("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",l),...i})},pre:e=>{var t;let{node:s,className:l,children:i}=e,d="javascript";"string"==typeof(null==s?void 0:null===(t=s.properties)||void 0===t?void 0:t.className)&&(d=s.properties.className.replace("language-",""));let o="";return(0,r.isValidElement)(i)&&i.props&&"string"==typeof i.props.children?o=i.props.children:"string"==typeof i&&(o=i),(0,a.jsx)(c.d,{className:(0,n.cn)("my-4 h-auto",l),code:o,language:d,children:(0,a.jsx)(c.f,{onCopy:()=>console.log("Copied code to clipboard"),onError:()=>console.error("Failed to copy code to clipboard")})})}},x=(0,r.memo)(e=>{let{className:t,options:s,children:r,allowedImagePrefixes:l,allowedLinkPrefixes:c,defaultOrigin:x,parseIncompleteMarkdown:h=!0,...f}=e,p="string"==typeof r&&h?function(e){if(!e||"string"!=typeof e)return e;let t=e,s=t.match(/(!?\[)([^\]]*?)$/);if(s){let e=t.lastIndexOf(s[1]);t=t.substring(0,e)}if(t.match(/(\*\*)([^*]*?)$/)&&(t.match(/\*\*/g)||[]).length%2==1&&(t="".concat(t,"**")),t.match(/(__)([^_]*?)$/)&&(t.match(/__/g)||[]).length%2==1&&(t="".concat(t,"__")),t.match(/(\*)([^*]*?)$/)&&t.split("").reduce((e,s,a)=>{if("*"===s){let s=t[a-1],n=t[a+1];if("*"!==s&&"*"!==n)return e+1}return e},0)%2==1&&(t="".concat(t,"*")),t.match(/(_)([^_]*?)$/)&&t.split("").reduce((e,s,a)=>{if("_"===s){let s=t[a-1],n=t[a+1];if("_"!==s&&"_"!==n)return e+1}return e},0)%2==1&&(t="".concat(t,"_")),t.match(/(`)([^`]*?)$/)&&(t.includes("```"),(t.match(/```[\s\S]*?```/g)||[]).length,(t.match(/```/g)||[]).length%2!=1)){let e=0;for(let s=0;s<t.length;s++)if("`"===t[s]){let a="```"===t.substring(s,s+3),n=s>0&&"```"===t.substring(s-1,s+2),r=s>1&&"```"===t.substring(s-2,s+1);!(a||n||r)&&e++}e%2==1&&(t="".concat(t,"`"))}return t.match(/(~~)([^~]*?)$/)&&(t.match(/~~/g)||[]).length%2==1&&(t="".concat(t,"~~")),t}(r):r;return(0,a.jsx)("div",{className:(0,n.cn)("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",t),...f,children:(0,a.jsx)(u,{allowedImagePrefixes:null!=l?l:["*"],allowedLinkPrefixes:null!=c?c:["*"],components:m,defaultOrigin:x,rehypePlugins:[i.Z],remarkPlugins:[d.Z,o.Z],...s,children:p})})},(e,t)=>e.children===t.children);x.displayName="Response"},62910:function(e,t,s){"use strict";s.d(t,{G:function(){return f}});var a=s(57437),n=s(29406),r=s(10842),l=s(38436),i=s(2265),d=s(42571),o=s(71558),c=s(69797),u=s(49712),m=s(26110),x=s(77992),h=s(94508);function f(e){let{className:t=null,code:s,language:o,slice:c=200}=e,{toast:f}=(0,x.pm)(),[p,v]=(0,i.useState)(null),j=async(e,t)=>{v(await l.ZP.format(e,{parser:t,plugins:[n.Z,r.ZP]}))};return(0,i.useEffect)(()=>{"json"===o?j(s,"json"):"javascript"===o||"js"===o?j(s,"babel"):v(s)},[s,o]),(0,a.jsxs)(m.Vq,{children:[(0,a.jsx)(m.hg,{asChild:!0,children:(null==p?void 0:p.length)&&(0,a.jsx)(d.Z,{className:(0,h.cn)("cursor-pointer",t),showLineNumbers:!0,wrapLines:!0,lineProps:{style:{wordBreak:"break-all",whiteSpace:"pre-wrap"}},language:o||"plaintext",style:u.Z,children:"".concat(null==p?void 0:p.slice(0,c||200)," ").concat((null==s?void 0:s.length)>(c||200)?"...":"")})}),(0,a.jsx)(m.cZ,{className:"sm:max-w-[800px] overflow-hidden max-h-[500px] overflow-y-scroll",children:(0,a.jsxs)(m.fK,{children:[(0,a.jsx)(m.$N,{children:"Code"}),(0,a.jsx)("div",{className:"cursor-copy",onClick:async()=>{await navigator.clipboard.writeText(null!=p?p:""),f({title:"Copied to clipboard"})},children:(0,a.jsx)(d.Z,{className:(0,h.cn)(t),showLineNumbers:!0,wrapLines:!0,lineProps:{style:{wordBreak:"break-all",whiteSpace:"pre-wrap"}},language:o||"plaintext",style:u.Z,children:null!=p?p:""})})]})})]})}d.Z.registerLanguage("json",c.Z),d.Z.registerLanguage("javascript",o.Z)},68656:function(e,t,s){"use strict";s.d(t,{J:function(){return p}});var a=s(57437);s(2265);var n=s(26110),r=s(77992),l=s(35629),i=s(62869),d=s(81103),o=s(94508);let c=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,o.cn)("flex flex-col overflow-hidden rounded-lg border bg-background shadow-sm",t),...s})},u=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,o.cn)("flex items-center justify-between border-b bg-muted/50 px-4 py-3",t),...s})},m=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,o.cn)("flex items-center gap-1",t),...s})},x=e=>{let{tooltip:t,label:s,icon:n,children:r,className:l,size:c="sm",variant:u="ghost",...m}=e,x=(0,a.jsxs)(i.z,{className:(0,o.cn)("size-8 p-0 text-muted-foreground hover:text-foreground",l),size:c,type:"button",variant:u,...m,children:[n?(0,a.jsx)(n,{className:"size-4"}):r,(0,a.jsx)("span",{className:"sr-only",children:s||t})]});return t?(0,a.jsx)(d.pn,{children:(0,a.jsxs)(d.u,{children:[(0,a.jsx)(d.aJ,{asChild:!0,children:x}),(0,a.jsx)(d._v,{children:(0,a.jsx)("p",{children:t})})]})}):x},h=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,o.cn)("flex-1 overflow-auto p-4",t),...s})};var f=s(78867);function p(e){let{text:t,sliceLength:s}=e,{toast:i}=(0,r.pm)();return(0,a.jsxs)(n.Vq,{children:[(0,a.jsx)(n.hg,{asChild:!0,children:(0,a.jsxs)("p",{className:"cursor-pointer text-sm text-base",children:[null==t?void 0:t.slice(0,null!=s?s:200),s&&t.length>s?"...":""]})}),(0,a.jsx)(n.cZ,{className:"sm:max-w-[800px] max-h-[500px] overflow-y-scroll",children:(0,a.jsxs)(c,{children:[(0,a.jsx)(u,{children:(0,a.jsx)(m,{children:(0,a.jsx)(x,{icon:f.Z,label:"Copy",tooltip:"Copy to clipboard",onClick:async()=>{await navigator.clipboard.writeText(t),i({title:"Copied to clipboard"})}})})}),(0,a.jsx)(h,{children:(0,a.jsx)(l.H,{children:t})})]})})]})}},37099:function(e,t,s){"use strict";s.d(t,{OL:function(){return p},_T:function(){return u},aR:function(){return d},f$:function(){return h},fY:function(){return m},le:function(){return v},xo:function(){return x},yT:function(){return f}});var a=s(57437),n=s(23619),r=s(2265),l=s(62869),i=s(94508);let d=n.fC;n.xz;let o=n.h_,c=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.aV,{className:(0,i.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...r,ref:t})});c.displayName=n.aV.displayName;let u=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsxs)(o,{children:[(0,a.jsx)(c,{}),(0,a.jsx)(n.VY,{ref:t,className:(0,i.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...r})]})});u.displayName=n.VY.displayName;let m=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...s})};m.displayName="AlertDialogHeader";let x=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};x.displayName="AlertDialogFooter";let h=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.Dx,{ref:t,className:(0,i.cn)("text-lg font-semibold",s),...r})});h.displayName=n.Dx.displayName;let f=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.dk,{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",s),...r})});f.displayName=n.dk.displayName;let p=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.aU,{ref:t,className:(0,i.cn)((0,l.d)(),s),...r})});p.displayName=n.aU.displayName;let v=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.$j,{ref:t,className:(0,i.cn)((0,l.d)({variant:"outline"}),"mt-2 sm:mt-0",s),...r})});v.displayName=n.$j.displayName},65613:function(e,t,s){"use strict";s.d(t,{Cd:function(){return o},X:function(){return c},bZ:function(){return d}});var a=s(57437),n=s(90535),r=s(2265),l=s(94508);let i=(0,n.j)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",info:"border-info/50 text-info dark:border-info [&>svg]:text-info"}},defaultVariants:{variant:"default"}}),d=r.forwardRef((e,t)=>{let{className:s,variant:n,...r}=e;return(0,a.jsx)("div",{ref:t,role:"alert",className:(0,l.cn)(i({variant:n}),s),...r})});d.displayName="Alert";let o=r.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("h5",{ref:t,className:(0,l.cn)("mb-1 font-medium leading-none tracking-tight",s),...n})});o.displayName="AlertTitle";let c=r.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("text-sm [&_p]:leading-relaxed",s),...n})});c.displayName="AlertDescription"},35974:function(e,t,s){"use strict";s.d(t,{C:function(){return i}});var a=s(57437),n=s(90535);s(2265);var r=s(94508);let l=(0,n.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i(e){let{className:t,variant:s,...n}=e;return(0,a.jsx)("div",{className:(0,r.cn)(l({variant:s}),t),...n})}},66070:function(e,t,s){"use strict";s.d(t,{Ol:function(){return i},SZ:function(){return o},Zb:function(){return l},aY:function(){return c},eW:function(){return u},ll:function(){return d}});var a=s(57437),n=s(2265),r=s(94508);let l=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,r.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",s),...n})});l.displayName="Card";let i=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,r.cn)("flex flex-col space-y-1.5 p-6",s),...n})});i.displayName="CardHeader";let d=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("h3",{ref:t,className:(0,r.cn)("text-2xl font-semibold leading-none tracking-tight",s),...n})});d.displayName="CardTitle";let o=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("p",{ref:t,className:(0,r.cn)("text-sm text-muted-foreground",s),...n})});o.displayName="CardDescription";let c=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,r.cn)("p-6 pt-0",s),...n})});c.displayName="CardContent";let u=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,r.cn)("flex items-center p-6 pt-0",s),...n})});u.displayName="CardFooter"},19060:function(e,t,s){"use strict";s.d(t,{X:function(){return d}});var a=s(57437),n=s(9270),r=s(30401),l=s(2265),i=s(94508);let d=l.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(n.fC,{ref:t,className:(0,i.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",s),...l,children:(0,a.jsx)(n.z$,{className:(0,i.cn)("flex items-center justify-center text-current"),children:(0,a.jsx)(r.Z,{className:"size-4"})})})});d.displayName=n.fC.displayName},26110:function(e,t,s){"use strict";s.d(t,{$N:function(){return f},Be:function(){return p},Vq:function(){return d},cN:function(){return h},cZ:function(){return m},fK:function(){return x},hg:function(){return o}});var a=s(57437),n=s(34567),r=s(32489),l=s(2265),i=s(94508);let d=n.fC,o=n.xz,c=n.h_;n.x8;let u=l.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.aV,{ref:t,className:(0,i.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...r})});u.displayName=n.aV.displayName;let m=l.forwardRef((e,t)=>{let{className:s,children:l,...d}=e;return(0,a.jsxs)(c,{children:[(0,a.jsx)(u,{}),(0,a.jsxs)(n.VY,{ref:t,className:(0,i.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...d,children:[l,(0,a.jsxs)(n.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,a.jsx)(r.Z,{className:"size-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});m.displayName=n.VY.displayName;let x=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...s})};x.displayName="DialogHeader";let h=e=>{let{className:t,...s}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};h.displayName="DialogFooter";let f=l.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.Dx,{ref:t,className:(0,i.cn)("text-lg font-semibold leading-none tracking-tight",s),...r})});f.displayName=n.Dx.displayName;let p=l.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.dk,{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",s),...r})});p.displayName=n.dk.displayName},26815:function(e,t,s){"use strict";s.d(t,{_:function(){return o}});var a=s(57437),n=s(6394),r=s(90535),l=s(2265),i=s(94508);let d=(0,r.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),o=l.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.f,{ref:t,className:(0,i.cn)(d(),s),...r})});o.displayName=n.f.displayName},19378:function(e,t,s){"use strict";s.d(t,{B:function(){return d},x:function(){return i}});var a=s(57437),n=s(14488),r=s(2265),l=s(94508);let i=r.forwardRef((e,t)=>{let{className:s,children:r,...i}=e;return(0,a.jsxs)(n.fC,{ref:t,className:(0,l.cn)("relative overflow-hidden",s),...i,children:[(0,a.jsx)(n.l_,{className:"size-full rounded-[inherit]",children:r}),(0,a.jsx)(d,{}),(0,a.jsx)(n.Ns,{})]})});i.displayName=n.fC.displayName;let d=r.forwardRef((e,t)=>{let{className:s,orientation:r="vertical",...i}=e;return(0,a.jsx)(n.gb,{ref:t,orientation:r,className:(0,l.cn)("flex touch-none select-none transition-colors","vertical"===r&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===r&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",s),...i,children:(0,a.jsx)(n.q4,{className:"relative flex-1 rounded-full bg-border"})})});d.displayName=n.gb.displayName},53647:function(e,t,s){"use strict";s.d(t,{Bw:function(){return f},Ph:function(){return c},Ql:function(){return p},i4:function(){return m},ki:function(){return u}});var a=s(57437),n=s(46943),r=s(40875),l=s(22135),i=s(30401),d=s(2265),o=s(94508);let c=n.fC;n.ZA;let u=n.B4,m=d.forwardRef((e,t)=>{let{className:s,children:l,...i}=e;return(0,a.jsxs)(n.xz,{ref:t,className:(0,o.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...i,children:[l,(0,a.jsx)(n.JO,{asChild:!0,children:(0,a.jsx)(r.Z,{className:"size-4 opacity-50"})})]})});m.displayName=n.xz.displayName;let x=d.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.u_,{ref:t,className:(0,o.cn)("flex cursor-default items-center justify-center py-1",s),...r,children:(0,a.jsx)(l.Z,{className:"size-4"})})});x.displayName=n.u_.displayName;let h=d.forwardRef((e,t)=>{let{className:s,...l}=e;return(0,a.jsx)(n.$G,{ref:t,className:(0,o.cn)("flex cursor-default items-center justify-center py-1",s),...l,children:(0,a.jsx)(r.Z,{className:"size-4"})})});h.displayName=n.$G.displayName;let f=d.forwardRef((e,t)=>{let{className:s,children:r,position:l="popper",...i}=e;return(0,a.jsx)(n.h_,{children:(0,a.jsxs)(n.VY,{ref:t,className:(0,o.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:l,...i,children:[(0,a.jsx)(x,{}),(0,a.jsx)(n.l_,{className:(0,o.cn)("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,a.jsx)(h,{})]})})});f.displayName=n.VY.displayName,d.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.__,{ref:t,className:(0,o.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",s),...r})}).displayName=n.__.displayName;let p=d.forwardRef((e,t)=>{let{className:s,children:r,...l}=e;return(0,a.jsxs)(n.ck,{ref:t,className:(0,o.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...l,children:[(0,a.jsx)("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:(0,a.jsx)(n.wU,{children:(0,a.jsx)(i.Z,{className:"size-4"})})}),(0,a.jsx)(n.eT,{children:r})]})});p.displayName=n.ck.displayName,d.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(n.Z0,{ref:t,className:(0,o.cn)("-mx-1 my-1 h-px bg-muted",s),...r})}).displayName=n.Z0.displayName},73578:function(e,t,s){"use strict";s.d(t,{RM:function(){return d},Rn:function(){return m},SC:function(){return o},iA:function(){return l},pj:function(){return u},ss:function(){return c},xD:function(){return i}});var a=s(57437),n=s(2265),r=s(94508);let l=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("div",{className:"relative w-full overflow-auto",children:(0,a.jsx)("table",{ref:t,className:(0,r.cn)("w-full caption-bottom text-sm",s),...n})})});l.displayName="Table";let i=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("thead",{ref:t,className:(0,r.cn)("[&_tr]:border-b",s),...n})});i.displayName="TableHeader";let d=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("tbody",{ref:t,className:(0,r.cn)("[&_tr:last-child]:border-0",s),...n})});d.displayName="TableBody",n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("tfoot",{ref:t,className:(0,r.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...n})}).displayName="TableFooter";let o=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("tr",{ref:t,className:(0,r.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...n})});o.displayName="TableRow";let c=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("th",{ref:t,className:(0,r.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:w-[40px]",s),...n})});c.displayName="TableHead";let u=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("td",{ref:t,className:(0,r.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:w-[40px]",s),...n})});u.displayName="TableCell";let m=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("caption",{ref:t,className:(0,r.cn)("mt-4 text-sm text-muted-foreground",s),...n})});m.displayName="TableCaption"},76818:function(e,t,s){"use strict";s.d(t,{g:function(){return l}});var a=s(57437),n=s(2265),r=s(94508);let l=n.forwardRef((e,t)=>{let{className:s,...n}=e;return(0,a.jsx)("textarea",{className:(0,r.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),ref:t,...n})});l.displayName="Textarea"},77992:function(e,t,s){"use strict";s.d(t,{Am:function(){return u},pm:function(){return m}});var a=s(2265);let n=0,r=new Map,l=e=>{if(r.has(e))return;let t=setTimeout(()=>{r.delete(e),c({type:"REMOVE_TOAST",toastId:e})},1e6);r.set(e,t)},i=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:s}=t;return s?l(s):e.toasts.forEach(e=>{l(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===s||void 0===s?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},d=[],o={toasts:[]};function c(e){o=i(o,e),d.forEach(e=>{e(o)})}function u(e){let{...t}=e,s=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>c({type:"DISMISS_TOAST",toastId:s});return c({type:"ADD_TOAST",toast:{...t,id:s,open:!0,onOpenChange:e=>{e||a()}}}),{id:s,dismiss:a,update:e=>c({type:"UPDATE_TOAST",toast:{...e,id:s}})}}function m(){let[e,t]=a.useState(o);return a.useEffect(()=>(d.push(t),()=>{let e=d.indexOf(t);e>-1&&d.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>c({type:"DISMISS_TOAST",toastId:e})}}},63639:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},92451:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},91723:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},33276:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]])},99397:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},52636:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]])},18930:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});let a=(0,s(39763).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},1119:function(e,t,s){"use strict";function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e}).apply(null,arguments)}s.d(t,{Z:function(){return a}})},9270:function(e,t,s){"use strict";s.d(t,{fC:function(){return N},z$:function(){return w}});var a=s(2265),n=s(98575),r=s(73966),l=s(6741),i=s(80886),d=s(6718),o=s(90420),c=s(71599),u=s(66840),m=s(57437),x="Checkbox",[h,f]=(0,r.b)(x),[p,v]=h(x);function j(e){let{__scopeCheckbox:t,checked:s,children:n,defaultChecked:r,disabled:l,form:d,name:o,onCheckedChange:c,required:u,value:h="on",internal_do_not_use_render:f}=e,[v,j]=(0,i.T)({prop:s,defaultProp:null!=r&&r,onChange:c,caller:x}),[g,b]=a.useState(null),[N,y]=a.useState(null),w=a.useRef(!1),_=!g||!!d||!!g.closest("form"),k={checked:v,disabled:l,setChecked:j,control:g,setControl:b,name:o,form:d,value:h,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:!C(r)&&r,isFormControl:_,bubbleInput:N,setBubbleInput:y};return(0,m.jsx)(p,{scope:t,...k,children:"function"==typeof f?f(k):n})}var g="CheckboxTrigger",b=a.forwardRef((e,t)=>{let{__scopeCheckbox:s,onKeyDown:r,onClick:i,...d}=e,{control:o,value:c,disabled:x,checked:h,required:f,setControl:p,setChecked:j,hasConsumerStoppedPropagationRef:b,isFormControl:N,bubbleInput:y}=v(g,s),w=(0,n.e)(t,p),_=a.useRef(h);return a.useEffect(()=>{let e=null==o?void 0:o.form;if(e){let t=()=>j(_.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[o,j]),(0,m.jsx)(u.WV.button,{type:"button",role:"checkbox","aria-checked":C(h)?"mixed":h,"aria-required":f,"data-state":R(h),"data-disabled":x?"":void 0,disabled:x,value:c,...d,ref:w,onKeyDown:(0,l.M)(r,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,l.M)(i,e=>{j(e=>!!C(e)||!e),y&&N&&(b.current=e.isPropagationStopped(),b.current||e.stopPropagation())})})});b.displayName=g;var N=a.forwardRef((e,t)=>{let{__scopeCheckbox:s,name:a,checked:n,defaultChecked:r,required:l,disabled:i,value:d,onCheckedChange:o,form:c,...u}=e;return(0,m.jsx)(j,{__scopeCheckbox:s,checked:n,defaultChecked:r,disabled:i,required:l,onCheckedChange:o,name:a,form:c,value:d,internal_do_not_use_render:e=>{let{isFormControl:a}=e;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(b,{...u,ref:t,__scopeCheckbox:s}),a&&(0,m.jsx)(k,{__scopeCheckbox:s})]})}})});N.displayName=x;var y="CheckboxIndicator",w=a.forwardRef((e,t)=>{let{__scopeCheckbox:s,forceMount:a,...n}=e,r=v(y,s);return(0,m.jsx)(c.z,{present:a||C(r.checked)||!0===r.checked,children:(0,m.jsx)(u.WV.span,{"data-state":R(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});w.displayName=y;var _="CheckboxBubbleInput",k=a.forwardRef((e,t)=>{let{__scopeCheckbox:s,...r}=e,{control:l,hasConsumerStoppedPropagationRef:i,checked:c,defaultChecked:x,required:h,disabled:f,name:p,value:j,form:g,bubbleInput:b,setBubbleInput:N}=v(_,s),y=(0,n.e)(t,N),w=(0,d.D)(c),k=(0,o.t)(l);a.useEffect(()=>{if(!b)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!i.current;if(w!==c&&e){let s=new Event("click",{bubbles:t});b.indeterminate=C(c),e.call(b,!C(c)&&c),b.dispatchEvent(s)}},[b,w,c,i]);let R=a.useRef(!C(c)&&c);return(0,m.jsx)(u.WV.input,{type:"checkbox","aria-hidden":!0,defaultChecked:null!=x?x:R.current,required:h,disabled:f,name:p,value:j,form:g,...r,tabIndex:-1,ref:y,style:{...r.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function C(e){return"indeterminate"===e}function R(e){return C(e)?"indeterminate":e?"checked":"unchecked"}k.displayName=_}},function(e){e.O(0,[329,3954,5874,7690,9851,7629,7093,6148,847,1942,7648,7823,8068,5799,4567,605,85,4957,7398,3825,1785,3397,7107,9141,7564,6373,3832,2971,2117,1744],function(){return e(e.s=81027)}),_N_E=e.O()}]);
2
+ //# sourceMappingURL=page-4f0d1524fc7936d1.js.map