thursday-agent 0.26.0 → 0.27.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 (391) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +5 -5
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/required-server-files.json +5 -5
  5. package/.next/server/app/_global-error/page/build-manifest.json +2 -2
  6. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/server/app/_global-error.html +1 -1
  8. package/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/.next/server/app/_not-found/page/build-manifest.json +2 -2
  13. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  14. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/server/app/_not-found.html +1 -1
  16. package/.next/server/app/_not-found.rsc +2 -2
  17. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  18. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  19. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  20. package/.next/server/app/api/artifact/route.js +10 -10
  21. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/memory/files/route.js +1 -1
  23. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  24. package/.next/server/app/api/bot/memory/route.js +8 -8
  25. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  26. package/.next/server/app/api/bot/route.js +8 -8
  27. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  28. package/.next/server/app/api/bot/thread/file/route.js +15 -15
  29. package/.next/server/app/api/bot/thread/file/route.js.nft.json +1 -1
  30. package/.next/server/app/api/bot/thread/route.js +5 -5
  31. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  32. package/.next/server/app/api/bot/tool-result/[id]/route.js +6 -6
  33. package/.next/server/app/api/bot/tool-result/[id]/route.js.nft.json +1 -1
  34. package/.next/server/app/api/config/route.js +3 -3
  35. package/.next/server/app/api/config/route.js.nft.json +1 -1
  36. package/.next/server/app/api/events/route.js +1 -1
  37. package/.next/server/app/api/events/route.js.nft.json +1 -1
  38. package/.next/server/app/api/favicon/[host]/route.js +4 -4
  39. package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
  40. package/.next/server/app/api/file/[...path]/route.js +4 -4
  41. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  42. package/.next/server/app/api/llm-model/automatic/route.js +5 -5
  43. package/.next/server/app/api/llm-model/automatic/route.js.nft.json +1 -1
  44. package/.next/server/app/api/llm-model/catalog/[provider]/route.js +5 -5
  45. package/.next/server/app/api/llm-model/catalog/[provider]/route.js.nft.json +1 -1
  46. package/.next/server/app/api/llm-model/credits/[provider]/route.js +5 -5
  47. package/.next/server/app/api/llm-model/credits/[provider]/route.js.nft.json +1 -1
  48. package/.next/server/app/api/llm-model/route.js +6 -6
  49. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  50. package/.next/server/app/api/llm-model/subscription/route.js +6 -6
  51. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
  52. package/.next/server/app/api/mcp/[name]/route.js +5 -5
  53. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  54. package/.next/server/app/api/mcp/oauth/callback/route.js +6 -6
  55. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  56. package/.next/server/app/api/mcp/route.js +5 -5
  57. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  58. package/.next/server/app/api/mcp/tools/route.js +5 -5
  59. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  60. package/.next/server/app/api/memory/edit/route.js +15 -15
  61. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  62. package/.next/server/app/api/memory/route.js +4 -4
  63. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  64. package/.next/server/app/api/reach/route.js +18 -18
  65. package/.next/server/app/api/reach/route.js.nft.json +1 -1
  66. package/.next/server/app/api/routine/route.js +8 -8
  67. package/.next/server/app/api/routine/route.js.nft.json +1 -1
  68. package/.next/server/app/api/running/route.js +2 -2
  69. package/.next/server/app/api/running/route.js.nft.json +1 -1
  70. package/.next/server/app/api/signins/route.js +3 -3
  71. package/.next/server/app/api/signins/route.js.nft.json +1 -1
  72. package/.next/server/app/api/skills/[source]/[name]/route.js +6 -6
  73. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  74. package/.next/server/app/api/skills/route.js +6 -6
  75. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  76. package/.next/server/app/api/thursday/call/end/route.js +5 -5
  77. package/.next/server/app/api/thursday/call/end/route.js.nft.json +1 -1
  78. package/.next/server/app/api/thursday/call/plan/route.js +14 -14
  79. package/.next/server/app/api/thursday/call/plan/route.js.nft.json +1 -1
  80. package/.next/server/app/api/thursday/call/route.js +6 -6
  81. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  82. package/.next/server/app/api/thursday/settings/route.js +5 -5
  83. package/.next/server/app/api/thursday/settings/route.js.nft.json +1 -1
  84. package/.next/server/app/api/thursday/text/route.js +14 -14
  85. package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
  86. package/.next/server/app/api/thursday/tool-call/route.js +15 -15
  87. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  88. package/.next/server/app/api/update/route.js +7 -7
  89. package/.next/server/app/api/update/route.js.nft.json +1 -1
  90. package/.next/server/app/api/workspace/files/route.js +6 -6
  91. package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
  92. package/.next/server/app/api/workspace/route.js +6 -6
  93. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  94. package/.next/server/app/artifact/[...path]/page/build-manifest.json +2 -2
  95. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +11 -11
  96. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  97. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  98. package/.next/server/app/favicon.ico/route.js +2 -2
  99. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  100. package/.next/server/app/manifest.webmanifest/route.js +2 -2
  101. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  102. package/.next/server/app/page/build-manifest.json +2 -2
  103. package/.next/server/app/page/react-loadable-manifest.json +1 -1
  104. package/.next/server/app/page/server-reference-manifest.json +184 -184
  105. package/.next/server/app/page.js +10 -10
  106. package/.next/server/app/page.js.nft.json +1 -1
  107. package/.next/server/app/page_client-reference-manifest.js +1 -1
  108. package/.next/server/chunks/[root-of-the-server]__01jpmcj._.js +2 -2
  109. package/.next/server/chunks/[root-of-the-server]__03bjojd._.js +3 -3
  110. package/.next/server/chunks/{[root-of-the-server]__0wosonh._.js → [root-of-the-server]__05u-9a3._.js} +1 -1
  111. package/.next/server/chunks/{[root-of-the-server]__1dyse-1._.js → [root-of-the-server]__0_qe8iq._.js} +1 -1
  112. package/.next/server/chunks/[root-of-the-server]__0d-dfqm._.js +1 -1
  113. package/.next/server/chunks/[root-of-the-server]__0jqidnu._.js +1 -1
  114. package/.next/server/chunks/[root-of-the-server]__0mmynvy._.js +2 -2
  115. package/.next/server/chunks/[root-of-the-server]__0ncs9uu._.js +1 -1
  116. package/.next/server/chunks/[root-of-the-server]__0qhf60h._.js +3 -0
  117. package/.next/server/chunks/[root-of-the-server]__0sea36s._.js +4 -4
  118. package/.next/server/chunks/[root-of-the-server]__0zezbds._.js +2 -2
  119. package/.next/server/chunks/[root-of-the-server]__12hkdpz._.js +1 -1
  120. package/.next/server/chunks/[root-of-the-server]__13hng6h._.js +1 -1
  121. package/.next/server/chunks/[root-of-the-server]__14inehv._.js +3 -0
  122. package/.next/server/chunks/[root-of-the-server]__17kdjf6._.js +1 -1
  123. package/.next/server/chunks/[root-of-the-server]__17yv6lg._.js +2 -2
  124. package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +2 -2
  125. package/.next/server/chunks/{[root-of-the-server]__0b3_rzi._.js → [root-of-the-server]__1hjb8wf._.js} +1 -1
  126. package/.next/server/chunks/[root-of-the-server]__1jcu_e9._.js +2 -2
  127. package/.next/server/chunks/[root-of-the-server]__1jmr2ed._.js +3 -3
  128. package/.next/server/chunks/[root-of-the-server]__1ndi14y._.js +1 -1
  129. package/.next/server/chunks/[root-of-the-server]__1o7z93z._.js +2 -2
  130. package/.next/server/chunks/[root-of-the-server]__1onvx8x._.js +2 -2
  131. package/.next/server/chunks/_0-mqt2w._.js +1 -1
  132. package/.next/server/chunks/_04s1gb9._.js +30 -27
  133. package/.next/server/chunks/_06u9yo-._.js +1 -1
  134. package/.next/server/chunks/_08354bn._.js +33 -30
  135. package/.next/server/chunks/_083t_nr._.js +1 -1
  136. package/.next/server/chunks/_0c-s0ei._.js +1 -1
  137. package/.next/server/chunks/_0gifi_2._.js +2 -2
  138. package/.next/server/chunks/_0m3sdq8._.js +1 -1
  139. package/.next/server/chunks/_0pljp-1._.js +1 -1
  140. package/.next/server/chunks/_0wjia9n._.js +1 -1
  141. package/.next/server/chunks/_0wyh244._.js +33 -30
  142. package/.next/server/chunks/_0x2mdif._.js +1 -1
  143. package/.next/server/chunks/_1-sk_q4._.js +1 -1
  144. package/.next/server/chunks/_12a_gfz._.js +1 -1
  145. package/.next/server/chunks/_14-kmob._.js +1 -1
  146. package/.next/server/chunks/_16zct7w._.js +30 -27
  147. package/.next/server/chunks/_1823_7a._.js +4 -4
  148. package/.next/server/chunks/_1f_x75d._.js +1 -1
  149. package/.next/server/chunks/_1o2r4ja._.js +1 -1
  150. package/.next/server/chunks/_1q42187._.js +3 -3
  151. package/.next/server/chunks/_1ufbxe1._.js +1 -1
  152. package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
  153. package/.next/server/chunks/features_14kex_m._.js +11 -11
  154. package/.next/server/chunks/features_bot_08z387_._.js +4 -4
  155. package/.next/server/chunks/features_memory_0__61kl._.js +1 -1
  156. package/.next/server/chunks/features_memory_1uqvksn._.js +1 -1
  157. package/.next/server/chunks/features_workspace_workspace_ts_13h82gv._.js +1 -1
  158. package/.next/server/chunks/features_workspace_workspace_ts_1iyjroj._.js +3 -3
  159. package/.next/server/chunks/ssr/{[root-of-the-server]__0x297x3._.js → [root-of-the-server]__03_9u5q._.js} +2 -2
  160. package/.next/server/chunks/ssr/{[root-of-the-server]__0653diy._.js → [root-of-the-server]__04ky8w1._.js} +2 -2
  161. package/.next/server/chunks/ssr/{[root-of-the-server]__1zlzs9j._.js → [root-of-the-server]__0crm8gr._.js} +2 -2
  162. package/.next/server/chunks/ssr/{[root-of-the-server]__02936mh._.js → [root-of-the-server]__0d3n8i_._.js} +2 -2
  163. package/.next/server/chunks/ssr/{[root-of-the-server]__0s8q44q._.js → [root-of-the-server]__0d4o9hs._.js} +2 -2
  164. package/.next/server/chunks/ssr/[root-of-the-server]__0id2dqb._.js +1 -1
  165. package/.next/server/chunks/ssr/{[root-of-the-server]__1s0etwd._.js → [root-of-the-server]__0q2c15o._.js} +2 -2
  166. package/.next/server/chunks/ssr/[root-of-the-server]__0t_oz3-._.js +6 -0
  167. package/.next/server/chunks/ssr/{[root-of-the-server]__16x99f1._.js → [root-of-the-server]__12r70jm._.js} +1 -1
  168. package/.next/server/chunks/ssr/[root-of-the-server]__1867koj._.js +1 -1
  169. package/.next/server/chunks/ssr/{[root-of-the-server]__0glkz9k._.js → [root-of-the-server]__1fvh0zn._.js} +2 -2
  170. package/.next/server/chunks/ssr/[root-of-the-server]__1t38-p_._.js +1 -1
  171. package/.next/server/chunks/ssr/{[root-of-the-server]__1c1xyyb._.js → [root-of-the-server]__1uy0zqr._.js} +2 -2
  172. package/.next/server/chunks/ssr/_02uubus._.js +3 -0
  173. package/.next/server/chunks/ssr/_0692i-a._.js +3 -0
  174. package/.next/server/chunks/ssr/_079xt7h._.js +32 -29
  175. package/.next/server/chunks/ssr/_07g7ojr._.js +3 -0
  176. package/.next/server/chunks/ssr/_0ewhz_x._.js +3 -0
  177. package/.next/server/chunks/ssr/_0f3t9pm._.js +2 -2
  178. package/.next/server/chunks/ssr/_0gx6qzr._.js +57 -0
  179. package/.next/server/chunks/ssr/_0pjwmak._.js +6 -0
  180. package/.next/server/chunks/ssr/_0pnzfq1._.js +1 -1
  181. package/.next/server/chunks/ssr/_0px9eat._.js +3 -0
  182. package/.next/server/chunks/ssr/_0r2_l__._.js +3 -0
  183. package/.next/server/chunks/ssr/{_20_wc-g._.js → _0rcuovx._.js} +2 -2
  184. package/.next/server/chunks/ssr/_0uwhhcs._.js +3 -0
  185. package/.next/server/chunks/ssr/{_1wct0tm._.js → _128r03g._.js} +1 -1
  186. package/.next/server/chunks/ssr/_12c2n7f._.js +3 -0
  187. package/.next/server/chunks/ssr/{_12_ail7._.js → _14f64h2._.js} +1 -1
  188. package/.next/server/chunks/ssr/_17fa2ns._.js +162 -0
  189. package/.next/server/chunks/ssr/_1_px1o-._.js +3 -0
  190. package/.next/server/chunks/ssr/_1a_w_du._.js +1 -1
  191. package/.next/server/chunks/ssr/_1e_9qjr._.js +1 -1
  192. package/.next/server/chunks/ssr/_1f59vze._.js +57 -0
  193. package/.next/server/chunks/ssr/_1j5ohq5._.js +3 -0
  194. package/.next/server/chunks/ssr/{_0ingto_._.js → _1kj3d2q._.js} +2 -2
  195. package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
  196. package/.next/server/chunks/ssr/_1ocl7u0._.js +3 -0
  197. package/.next/server/chunks/ssr/_1q9r6u6._.js +3 -0
  198. package/.next/server/chunks/ssr/{_0fvctar._.js → _1qqusa-._.js} +2 -2
  199. package/.next/server/chunks/ssr/_1soynbw._.js +2 -2
  200. package/.next/server/chunks/ssr/_1uok0wt._.js +3 -0
  201. package/.next/server/chunks/ssr/_1v1pcoh._.js +1 -1
  202. package/.next/server/chunks/ssr/_1xw9imq._.js +3 -0
  203. package/.next/server/chunks/ssr/{components_ui_markdown-body_tsx_0h7bkrz._.js → components_ui_markdown-body_tsx_08i96c6._.js} +2 -2
  204. package/.next/server/chunks/ssr/features_0rrgq_t._.js +1 -1
  205. package/.next/server/chunks/ssr/features_ai_components_model-picker_tsx_0ucb1y9._.js +1 -1
  206. package/.next/server/chunks/ssr/features_bot_0tb4ui-._.js +2 -2
  207. package/.next/server/chunks/ssr/features_bot_components_01ye2wp._.js +1 -1
  208. package/.next/server/chunks/ssr/features_bot_components_bot-setting_tsx_01ajft6._.js +2 -2
  209. package/.next/server/chunks/ssr/features_bot_components_thread-setting_tsx_0yae7zy._.js +1 -1
  210. package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +2 -2
  211. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  212. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +2 -2
  213. package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
  214. package/.next/server/chunks/ssr/features_skills_components_skills-setting_tsx_1wtuuip._.js +1 -1
  215. package/.next/server/chunks/ssr/features_thursday_components_thursday-setting_tsx_1_6ydrc._.js +1 -1
  216. package/.next/server/chunks/ssr/{node_modules_193w7l8._.js → node_modules_02djdfa._.js} +2 -2
  217. package/.next/server/chunks/ssr/{node_modules_1bwlhwa._.js → node_modules_03ybg-h._.js} +1 -1
  218. package/.next/server/chunks/ssr/{node_modules_01xoz64._.js → node_modules_066eqdg._.js} +1 -1
  219. package/.next/server/chunks/ssr/{node_modules_20ifwl6._.js → node_modules_09605b3._.js} +1 -1
  220. package/.next/server/chunks/ssr/{node_modules_1yilsx4._.js → node_modules_0_c17cv._.js} +1 -1
  221. package/.next/server/chunks/ssr/{node_modules_080f5gu._.js → node_modules_0a1-9-h._.js} +1 -1
  222. package/.next/server/chunks/ssr/{node_modules_17c047f._.js → node_modules_0bfpl_c._.js} +1 -1
  223. package/.next/server/chunks/ssr/{node_modules_1pav8g4._.js → node_modules_0brchjo._.js} +1 -1
  224. package/.next/server/chunks/ssr/{node_modules_0gwiuga._.js → node_modules_0c0pgdi._.js} +1 -1
  225. package/.next/server/chunks/ssr/{node_modules_02-zrtu._.js → node_modules_0ep265x._.js} +1 -1
  226. package/.next/server/chunks/ssr/{node_modules_0kqej10._.js → node_modules_0gzvt6a._.js} +2 -2
  227. package/.next/server/chunks/ssr/{node_modules_0i18max._.js → node_modules_0h4gjw5._.js} +1 -1
  228. package/.next/server/chunks/ssr/{node_modules_1m2_gxv._.js → node_modules_0iso-he._.js} +1 -1
  229. package/.next/server/chunks/ssr/{node_modules_0cda8i6._.js → node_modules_0jvqmb4._.js} +1 -1
  230. package/.next/server/chunks/ssr/node_modules_0kzgugm._.js +3 -0
  231. package/.next/server/chunks/ssr/{node_modules_0uvoegq._.js → node_modules_0l8gpkg._.js} +1 -1
  232. package/.next/server/chunks/ssr/{node_modules_12ajdg8._.js → node_modules_0mlrvds._.js} +2 -2
  233. package/.next/server/chunks/ssr/node_modules_0nvqvnw._.js +7 -7
  234. package/.next/server/chunks/ssr/{node_modules_1s3j8gb._.js → node_modules_0ogtyfm._.js} +2 -2
  235. package/.next/server/chunks/ssr/{node_modules_1_xiwxs._.js → node_modules_0os_-0h._.js} +1 -1
  236. package/.next/server/chunks/ssr/{node_modules_1abjhxx._.js → node_modules_0p05zru._.js} +1 -1
  237. package/.next/server/chunks/ssr/{node_modules_1o-m6_3._.js → node_modules_0pf8124._.js} +2 -2
  238. package/.next/server/chunks/ssr/{node_modules_0eqvt2l._.js → node_modules_0pp3v4f._.js} +2 -2
  239. package/.next/server/chunks/ssr/{node_modules_0rzz90e._.js → node_modules_0r1vv13._.js} +1 -1
  240. package/.next/server/chunks/ssr/{node_modules_1kum1yu._.js → node_modules_0r9yw6x._.js} +1 -1
  241. package/.next/server/chunks/ssr/{node_modules_1yw5fq4._.js → node_modules_0rk1a3e._.js} +1 -1
  242. package/.next/server/chunks/ssr/{node_modules_1es3wjv._.js → node_modules_0sq1pa3._.js} +2 -2
  243. package/.next/server/chunks/ssr/{node_modules_1-cv1_p._.js → node_modules_0w-pjyz._.js} +2 -2
  244. package/.next/server/chunks/ssr/{node_modules_0g_yuwn._.js → node_modules_0yoh66_._.js} +1 -1
  245. package/.next/server/chunks/ssr/{node_modules_1s9agqr._.js → node_modules_10kn3ni._.js} +2 -2
  246. package/.next/server/chunks/ssr/{node_modules_1yajzrd._.js → node_modules_124ipg-._.js} +1 -1
  247. package/.next/server/chunks/ssr/{node_modules_0svoyrb._.js → node_modules_12_p7d0._.js} +1 -1
  248. package/.next/server/chunks/ssr/{node_modules_203yqqb._.js → node_modules_12w12wr._.js} +1 -1
  249. package/.next/server/chunks/ssr/{node_modules_17ks351._.js → node_modules_16kmp_v._.js} +2 -2
  250. package/.next/server/chunks/ssr/{node_modules_05qs8r_._.js → node_modules_16m_yhd._.js} +1 -1
  251. package/.next/server/chunks/ssr/{node_modules_07dc1cr._.js → node_modules_171uvar._.js} +1 -1
  252. package/.next/server/chunks/ssr/{node_modules_0qsi9t2._.js → node_modules_19pn2ti._.js} +1 -1
  253. package/.next/server/chunks/ssr/{node_modules_0k9_jdk._.js → node_modules_1_ly5yy._.js} +1 -1
  254. package/.next/server/chunks/ssr/{node_modules_0o_gq58._.js → node_modules_1_wsn9q._.js} +1 -1
  255. package/.next/server/chunks/ssr/{node_modules_1u7wlaq._.js → node_modules_1djak6n._.js} +2 -2
  256. package/.next/server/chunks/ssr/{node_modules_08cq8i-._.js → node_modules_1e-oxmh._.js} +1 -1
  257. package/.next/server/chunks/ssr/{node_modules_15x7int._.js → node_modules_1ed4zep._.js} +2 -2
  258. package/.next/server/chunks/ssr/{node_modules_1pkpq6d._.js → node_modules_1f2qlxm._.js} +2 -2
  259. package/.next/server/chunks/ssr/{node_modules_1aw7c9f._.js → node_modules_1fn72fs._.js} +2 -2
  260. package/.next/server/chunks/ssr/node_modules_1h9p77x._.js +7 -7
  261. package/.next/server/chunks/ssr/{node_modules_1ucf2fi._.js → node_modules_1hj0rvo._.js} +1 -1
  262. package/.next/server/chunks/ssr/{node_modules_12pvysk._.js → node_modules_1jvkoqj._.js} +1 -1
  263. package/.next/server/chunks/ssr/{node_modules_0tq4-57._.js → node_modules_1jzofr8._.js} +1 -1
  264. package/.next/server/chunks/ssr/{node_modules_08hfp3a._.js → node_modules_1maqy-g._.js} +1 -1
  265. package/.next/server/chunks/ssr/{node_modules_071fb26._.js → node_modules_1oox5h1._.js} +1 -1
  266. package/.next/server/chunks/ssr/{node_modules_0_jxnnn._.js → node_modules_1p56fwh._.js} +1 -1
  267. package/.next/server/chunks/ssr/{node_modules_01yukzc._.js → node_modules_1prbr1-._.js} +1 -1
  268. package/.next/server/chunks/ssr/{node_modules_1hrbceb._.js → node_modules_1qfou69._.js} +1 -1
  269. package/.next/server/chunks/ssr/{node_modules_11f1w-3._.js → node_modules_1qnosqe._.js} +2 -2
  270. package/.next/server/chunks/ssr/{node_modules_1kd_hpx._.js → node_modules_1rdpn6v._.js} +1 -1
  271. package/.next/server/chunks/ssr/{node_modules_079iwnx._.js → node_modules_1v6m9sp._.js} +1 -1
  272. package/.next/server/chunks/ssr/{node_modules_1iapzqf._.js → node_modules_1z8ywx9._.js} +1 -1
  273. package/.next/server/chunks/ssr/{node_modules_1dim95c._.js → node_modules_1zzudo-._.js} +1 -1
  274. package/.next/server/chunks/ssr/{node_modules_1_71wv3._.js → node_modules_2157u1j._.js} +2 -2
  275. package/.next/server/chunks/ssr/{node_modules_katex_dist_katex_mjs_1c5gb92._.js → node_modules_katex_dist_katex_mjs_12lynt6._.js} +1 -1
  276. package/.next/server/chunks/ssr/{node_modules_katex_dist_katex_mjs_1ocxq2z._.js → node_modules_katex_dist_katex_mjs_1vjoadq._.js} +1 -1
  277. package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_1v93o68._.js +1 -1
  278. package/.next/server/middleware-build-manifest.js +5 -5
  279. package/.next/server/pages/404.html +1 -1
  280. package/.next/server/pages/500.html +1 -1
  281. package/.next/server/server-reference-manifest.js +1 -1
  282. package/.next/server/server-reference-manifest.json +185 -185
  283. package/.next/static/chunks/051z85h3ofmif.js +1 -0
  284. package/.next/static/chunks/05722zc-sohb_.js +4 -0
  285. package/.next/static/chunks/07jo959manleh.js +1 -0
  286. package/.next/static/chunks/0_5a18_y41-_4.js +1 -0
  287. package/.next/static/chunks/0be7dgti95u_2.js +1 -0
  288. package/.next/static/chunks/0c28x0q2aqsbj.js +1 -0
  289. package/.next/static/chunks/0o_rabv5are-o.js +2 -0
  290. package/.next/static/chunks/{0776-hu4_eek7.js → 0wwq57j09skhy.js} +2 -2
  291. package/.next/static/chunks/0zm3urd75-zw5.js +1 -0
  292. package/.next/static/chunks/16hfi69t-6a4t.js +2 -0
  293. package/.next/static/chunks/1g58g8-daiwu5.js +3 -0
  294. package/.next/static/chunks/1i1u85j-_yb1n.js +15 -0
  295. package/.next/static/chunks/1kd2sxkkrae8e.js +1 -0
  296. package/.next/static/chunks/{3xloayc4c096r.js → 1n3a07w81jbc-.js} +1 -1
  297. package/.next/static/chunks/1nncyxatu7une.js +1 -0
  298. package/.next/static/chunks/1s5t41jiomssd.css +1 -0
  299. package/.next/static/chunks/1yl4mlpsw8e7h.js +1 -0
  300. package/.next/static/chunks/{33qtnlc00c9gq.js → 2gl-fo_rmmmq0.js} +1 -1
  301. package/.next/static/chunks/2h_sak2oi70qs.js +1 -0
  302. package/.next/static/chunks/2isg5redeg2bc.js +1 -0
  303. package/.next/static/chunks/{2fxn-xltgy2un.js → 2of2-kggzp-fk.js} +1 -1
  304. package/.next/static/chunks/2vmran3sacktz.js +1 -0
  305. package/.next/static/chunks/2w02v9g8o9-rz.js +1 -0
  306. package/.next/static/chunks/2wi2pcbjrqm86.js +1 -0
  307. package/.next/static/chunks/2xk8otp3gnzml.js +1 -0
  308. package/.next/static/chunks/2ym1hrikoit8p.js +1 -0
  309. package/.next/static/chunks/34d1f980dv5c6.js +18 -0
  310. package/.next/static/chunks/34zhr71217o1-.js +2 -0
  311. package/.next/static/chunks/{0o1r15rfncytn.js → 37r4l2878vybp.js} +1 -1
  312. package/.next/static/chunks/{2cz5734j90h5b.js → 3a-2z23puvz2z.js} +1 -1
  313. package/.next/static/chunks/3d55-y263hup9.js +1 -0
  314. package/.next/static/chunks/3dzrveotr82eu.js +39 -0
  315. package/.next/static/chunks/3fensfht8pxhl.js +55 -0
  316. package/.next/static/chunks/3k7fum0yljmyr.js +1 -0
  317. package/.next/static/chunks/3sawwm4vucnzn.js +1 -0
  318. package/.next/static/chunks/{0z0-g4k1hnpw2.js → 3u208m--8u1iq.js} +1 -1
  319. package/.next/static/chunks/{turbopack-1kym6rf88i5i0.js → turbopack-0ekrsq98buh0j.js} +1 -1
  320. package/README.md +18 -18
  321. package/bin/background.mjs +60 -32
  322. package/bin/print.mjs +82 -0
  323. package/bin/thursday.mjs +44 -13
  324. package/guide/bots.md +19 -3
  325. package/guide/calls.md +5 -2
  326. package/guide/memory.md +2 -1
  327. package/guide/setup.md +8 -6
  328. package/guide/trouble.md +4 -0
  329. package/package.json +11 -5
  330. package/public/voices/intro/awake-f4e02fad.ogg +0 -0
  331. package/seed-skills/concierge/travel/scripts/itinerary.mjs +2 -1
  332. package/server.js +1 -1
  333. package/skills/artifact/references/document.md +5 -2
  334. package/skills/artifact/runtime/document/markdown.mjs +14 -1
  335. package/skills/artifact/runtime/shell/head.html +1 -1
  336. package/skills/artifact/scripts/document.mjs +9 -3
  337. package/skills/browser/SKILL.md +17 -13
  338. package/.next/server/chunks/[root-of-the-server]__0ald4vb._.js +0 -3
  339. package/.next/server/chunks/[root-of-the-server]__0srfj96._.js +0 -3
  340. package/.next/server/chunks/ssr/[root-of-the-server]__1kos36s._.js +0 -6
  341. package/.next/server/chunks/ssr/_024j8bs._.js +0 -3
  342. package/.next/server/chunks/ssr/_04jb10a._.js +0 -3
  343. package/.next/server/chunks/ssr/_059oyhd._.js +0 -3
  344. package/.next/server/chunks/ssr/_0d0uyl3._.js +0 -3
  345. package/.next/server/chunks/ssr/_0fk7dbp._.js +0 -88
  346. package/.next/server/chunks/ssr/_0gfa_rb._.js +0 -3
  347. package/.next/server/chunks/ssr/_0i7zd74._.js +0 -3
  348. package/.next/server/chunks/ssr/_0sp2z94._.js +0 -3
  349. package/.next/server/chunks/ssr/_1avnw03._.js +0 -57
  350. package/.next/server/chunks/ssr/_1bfrntd._.js +0 -6
  351. package/.next/server/chunks/ssr/_1cpvfkg._.js +0 -3
  352. package/.next/server/chunks/ssr/_1cqjpyq._.js +0 -3
  353. package/.next/server/chunks/ssr/_1khngyc._.js +0 -72
  354. package/.next/server/chunks/ssr/_1kyjimg._.js +0 -162
  355. package/.next/server/chunks/ssr/_1sw4r4m._.js +0 -6
  356. package/.next/server/chunks/ssr/_20004tu._.js +0 -57
  357. package/.next/server/chunks/ssr/node_modules_01alue6._.js +0 -3
  358. package/.next/server/chunks/ssr/node_modules_02n9-pb._.js +0 -3
  359. package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0zxr5sz._.js +0 -3
  360. package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_trash_mjs_0px2gzr._.js +0 -3
  361. package/.next/static/chunks/02d9vhnz5mwvu.js +0 -1
  362. package/.next/static/chunks/06ff4fq0z4das.js +0 -1
  363. package/.next/static/chunks/09q9n7jrkm4c9.js +0 -39
  364. package/.next/static/chunks/0b3wt5kqs-mk2.js +0 -2
  365. package/.next/static/chunks/0blrj_tg1yur0.js +0 -1
  366. package/.next/static/chunks/0dn1ptom1ahgg.js +0 -18
  367. package/.next/static/chunks/0dq7uppta9s--.js +0 -1
  368. package/.next/static/chunks/0hoz2b--nhn4y.js +0 -1
  369. package/.next/static/chunks/0kfjtkez2xze2.js +0 -1
  370. package/.next/static/chunks/0mv2zywfzt83k.js +0 -4
  371. package/.next/static/chunks/0txtrhykehsd_.js +0 -55
  372. package/.next/static/chunks/17vs1vz7_4l4p.css +0 -1
  373. package/.next/static/chunks/1dnvf_117h4k3.js +0 -2
  374. package/.next/static/chunks/1irynso77np9t.js +0 -1
  375. package/.next/static/chunks/1sh_-w_keseat.js +0 -1
  376. package/.next/static/chunks/1z2_9pl3nezly.js +0 -3
  377. package/.next/static/chunks/23ty4edkuxirx.js +0 -1
  378. package/.next/static/chunks/2f1cnfz4h1e2x.js +0 -1
  379. package/.next/static/chunks/2jepcbdewlwlg.js +0 -1
  380. package/.next/static/chunks/2r_zq_knm0hph.js +0 -15
  381. package/.next/static/chunks/2yfmmo4qr_f-m.js +0 -1
  382. package/.next/static/chunks/3-xnkknav7azp.js +0 -1
  383. package/.next/static/chunks/38q31td1ecuay.js +0 -1
  384. package/.next/static/chunks/3n75-7grldc6f.js +0 -1
  385. package/.next/static/chunks/3ofr4htw4wpj3.js +0 -1
  386. package/.next/static/chunks/40bkw3zfenss4.js +0 -2
  387. package/public/voices/intro/awake-17dbafbf.ogg +0 -0
  388. package/public/voices/intro/models-d09ddc74.ogg +0 -0
  389. /package/.next/static/{YIQV0_9FZPTFUe9TCiVSF → 3_9hbwcAuWTSWCJSufp3d}/_buildManifest.js +0 -0
  390. /package/.next/static/{YIQV0_9FZPTFUe9TCiVSF → 3_9hbwcAuWTSWCJSufp3d}/_clientMiddlewareManifest.js +0 -0
  391. /package/.next/static/{YIQV0_9FZPTFUe9TCiVSF → 3_9hbwcAuWTSWCJSufp3d}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[42380,a=>{"use strict";var b=a.i(187924),c=a.i(913834);a.s(["BotRoster",0,function({bots:a}){return a.length<2?null:(0,b.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5",title:a.map(a=>a.name).join(", "),children:[(0,b.jsx)("span",{className:"flex items-center gap-0.5",children:a.slice(0,3).map(a=>(0,b.jsx)(c.BotMark,{size:18,seed:a.name,color:a.icon?.color,shape:a.icon?.shape,outline:a.icon?.outline,paint:a.icon?.paint,notify:!1,className:"shrink-0"},a.name))}),(0,b.jsxs)("span",{className:"font-mono text-[10px] text-muted-foreground",children:[a.length," bots"]})]})}])},181809,802550,748819,a=>{"use strict";var b=a.i(187924),c=a.i(256711),d=a.i(752562),e=a.i(589027),f=a.i(707963),g=a.i(164831);let h={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};h.node;let i=(0,g.default)(h);a.s(["CircleQuestionMark",0,i],802550);var j=a.i(585650),k=a.i(851528),l=a.i(875160);let m={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};m.node;let n=(0,g.default)(m);a.s(["RotateCw",0,n],748819);var o=a.i(474215),p=a.i(572131),q=a.i(676459),r=a.i(926184),s=a.i(400187),t=a.i(497895);let u=(0,s.cva)("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",{variants:{variant:{default:"*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",secondary:"*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",muted:"*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",tinted:"*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",outline:"*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",ghost:"border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",destructive:"*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"}},defaultVariants:{variant:"default"}});function v({variant:a="default",align:c="start",className:d,...e}){return(0,b.jsx)("div",{"data-slot":"bubble","data-variant":a,"data-align":c,className:(0,t.cn)(u({variant:a}),d),...e})}function w({className:a,render:b,...c}){var d;return d={defaultTagName:"div",props:(0,q.mergeProps)({className:(0,t.cn)("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",a)},c),render:b,state:{slot:"bubble-content"}},(0,r.useRenderElement)(d.defaultTagName??"div",d,d)}(0,s.cva)("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0",{variants:{side:{top:"top-0 -translate-y-3/4",bottom:"bottom-0 translate-y-3/4"},align:{start:"left-3",end:"right-3"}},defaultVariants:{side:"bottom",align:"end"}});var x=a.i(613350),y=a.i(846991),z=a.i(545097),A=a.i(621958),B=a.i(864037),C=a.i(405050);let D=(0,C.createServerReference)("7fe8e372b43142ad52dbeb3c16c431664c588a67a0",C.callServer,void 0,C.findSourceMapURL,"compactThreadAction");var E=a.i(321799),F=a.i(913834),G=a.i(346075),H=a.i(369768),I=a.i(199169),J=a.i(313237),K=a.i(983874),L=a.i(135432),M=a.i(8468);function N({onClick:a}){return(0,b.jsx)("button",{type:"button",onClick:a,"aria-label":"Fold the room away",className:"grid size-7 shrink-0 place-items-center rounded-full bg-muted text-foreground outline-none transition-colors hover:bg-muted-foreground/20 focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,b.jsx)(o.X,{className:"size-3.5"})})}function O({thread:a}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(P,{thread:a}),(0,b.jsx)(Q,{thread:a}),(0,b.jsx)(T,{thread:a})]})}function P({thread:a}){let{contextTokens:c,tokens:d}=a;return c?(0,b.jsx)("span",{title:`Last step ${(0,t.formatCount)(c)} tokens \xb7 in total in ${(0,t.formatCount)(d.input)} \xb7 out ${(0,t.formatCount)(d.output)}`,className:"shrink-0 font-mono text-[10px] text-muted-foreground/70 tabular-nums",children:(0,t.formatCount)(c)}):null}function Q({thread:a}){let{contextTokens:c,contextBudget:d}=a,[e,f]=(0,p.useState)(!1),[g,h]=(0,J.useServerAction)(D,{onOk:()=>f(!0)}),[i,j]=(0,p.useState)(c);if(i!==c&&(j(c),f(!1)),!c||!d)return null;let k=Math.min(1,c/d);return(0,b.jsx)("button",{type:"button",disabled:h||e,onClick:()=>void g(a.id,a.bot.name),title:e?"It summarizes itself at its next step":`Context ${(0,t.formatCount)(c)} of ${(0,t.formatCount)(d)} — it summarizes itself at the end of the bar. Press to have it do so at its next step`,"aria-label":"Summarize this thread's context at its next step",className:"-my-2 flex h-6 shrink-0 items-center rounded-sm outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default",children:(0,b.jsx)("span",{className:"block h-[3px] w-9 overflow-hidden rounded-full bg-muted",children:(0,b.jsx)("span",{className:(0,t.cn)("block h-full rounded-full",e?"animate-pulse bg-muted-foreground/40":k>.9?"bg-amber-500/80":"bg-muted-foreground/70"),style:{width:`${Math.max(4,Math.round(100*k))}%`}})})})}let R={working:"text-muted-foreground",waiting:t.WAITING_INK,done:"text-foreground",cancelled:"text-muted-foreground"},S={working:"working",waiting:"waiting",done:"done",cancelled:"stopped"};function T({thread:a}){let c="done"===a.status&&a.seen?"text-muted-foreground":R[a.status];return"working"===a.status?(0,b.jsx)(z.ShinyText,{text:S.working,speed:2.2,className:"shrink-0 font-mono text-[10px]"}):(0,b.jsx)("span",{className:(0,t.cn)("flex shrink-0 items-center gap-1.5 font-mono text-[10px]",c),children:S[a.status]})}function U({thread:a,roster:c,side:d,onPick:e,className:f}){let g=(0,L.useOfficePointed)();return(0,p.useEffect)(()=>()=>L.officePointed.set(null),[]),(0,b.jsx)(A.Tabs,{value:d??a.bot.name,onValueChange:b=>e(b===a.bot.name?null:String(b)),className:(0,t.cn)("shrink-0 gap-0 px-3 pt-1 pb-0.5",f),children:(0,b.jsx)(A.TabsList,{className:"relative w-full justify-start gap-1 overflow-x-auto rounded-none bg-transparent p-0 scrollbar-none group-data-horizontal/tabs:h-auto",children:c.map(c=>{let d=X(a,c.name);return(0,b.jsxs)(A.TabsTrigger,{value:c.name,onPointerEnter:()=>L.officePointed.set(c.name),onPointerLeave:()=>L.officePointed.set(null),className:(0,t.cn)(V,"pl-1.5",g===c.name&&"bg-muted/60 text-foreground"),children:[(0,b.jsx)(F.BotMark,{size:16,seed:c.name,color:c.icon?.color,shape:c.icon?.shape,outline:c.icon?.outline,paint:c.icon?.paint,notify:"asking"===d,crossed:W(a,c.name),className:"shrink-0"}),(0,b.jsx)("span",{className:"max-w-28 truncate",children:c.name}),"running"===d&&(0,b.jsx)(l.Loader2,{className:"size-3 animate-spin text-muted-foreground/70"})]},c.name)})})})}let V="h-7 flex-none rounded-full px-3 py-0 text-[12px] text-muted-foreground hover:bg-muted/60 data-active:bg-muted data-active:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-none dark:data-active:border-transparent dark:data-active:bg-muted",W=(a,b)=>a.room.participants.some(a=>a.bot===b&&("cancelled"===a.state||"paused"===a.state));function X(a,b){let{room:c}=a;return c.questions.some(a=>a.bot===b)?"asking":"working"===a.status&&c.participants.some(a=>a.bot===b&&"running"===a.state)?"running":null}function Y({turn:a,thread:c,self:d}){let e=a.speaker.name===d,f=e?"none":ag(a.speaker)?"dark":"secondary",g=null;return(0,b.jsx)("div",{className:"animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,b.jsx)(am,{side:e?"start":"end",name:ah(a.speaker),mark:(0,b.jsx)(ak,{bot:a.speaker}),children:a.entries.map(h=>{if("work"===h.kind)return e?(0,b.jsx)($,{lines:h.lines,trailing:h.open,bot:a.speaker,thread:c},h.key):(0,b.jsx)(Z,{lines:h.lines,trailing:h.open,bot:a.speaker,thread:c},h.key);let i=(0,L.heardBy)(h.line),j=i&&i.name!==a.speaker.name&&i.name!==d&&!ag(i)&&i.name!==g?i:null;return i&&(g=i.name),(0,b.jsx)(an,{line:h.line,surface:f,mention:j,threadId:c.id},h.key)})})})}function Z({lines:a,trailing:c,bot:d,thread:e}){var f;let[g,h]=(0,p.useState)(!1),[i,j]=(0,p.useState)(null),k=c?X(e,d.name):null,m=(f=a,[["tool","step"],["say","note"],["stop","stop"],["note","compaction"]].map(([a,b])=>[f.filter(b=>b.kind===a).length,b]).filter(([a])=>a>0).map(([a,b])=>`${a} ${b}${1===a?"":"s"}`).join(" · ")),n=a.filter(a=>a.tool?.results!==void 0);if(!k&&!m)return null;let o=a.findLast(a=>"tool"===a.kind||"say"===a.kind),q=g&&a.length>0;return(0,b.jsxs)("div",{className:(0,t.cn)("flex min-w-0 flex-col rounded-2xl bg-muted/40 p-1",q?"w-full":"w-fit max-w-full"),children:[(0,b.jsxs)("button",{type:"button",disabled:!a.length,"aria-expanded":q,onClick:()=>{h(a=>!a),j(null)},className:"flex min-w-0 items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none transition-colors enabled:hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-ring/50",children:["running"===k&&(0,b.jsx)(l.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground/60"}),k?(0,b.jsx)(z.ShinyText,{text:"asking"===k?"waiting on you":o?ac(o):"working",tone:"asking"===k?"waiting":"muted",speed:2.4,className:(0,t.cn)("min-w-0 truncate text-[12px] leading-4",q&&"flex-1")}):(0,b.jsx)(aa,{words:o?ac(o):"",facts:[m,function(a){let b=a.flatMap(a=>a.at?[(0,I.toDate)(a.at).getTime()]:[]);if(b.length<2)return"";let c=Math.round((Math.max(...b)-Math.min(...b))/1e3);if(c<1)return"";if(c<60)return`${c}s`;let d=Math.round(c/60);return d<60?`${d} min`:`${Math.floor(d/60)}h ${d%60}m`}(a)].filter(Boolean).join(" · "),grow:q}),a.length>0&&(0,b.jsx)(ab,{open:q})]}),!q&&n.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap items-center gap-1 px-2 pt-0.5 pb-1.5",children:n.map(a=>a.tool&&(0,b.jsx)(M.StepTile,{tool:a.tool,onOpen:()=>{j(a.id),h(!0)}},a.id))}),q&&(0,b.jsx)("div",{className:"flex min-w-0 flex-col gap-0.5 pt-0.5",children:aw(a).map(a=>"tools"===a.kind?a.lines.map(a=>a.tool&&(0,b.jsx)(M.BotTool,{tool:a.tool,threadId:e.id,collapsed:a.id!==i},a.id)):"stops"===a.kind?(0,b.jsx)("div",{className:"px-1.5 py-1",children:(0,b.jsx)(au,{lines:a.lines})},a.key):a.lines.map(a=>(0,b.jsx)(as,{line:a,inset:!0},a.id)))})]})}function $({lines:a,trailing:c,bot:d,thread:e}){let f=c?X(e,d.name):null,g=a.some(a=>a.tool&&void 0===a.tool.results);return(0,b.jsxs)(b.Fragment,{children:[aw(a).map(a=>"tools"===a.kind?(0,b.jsx)(_,{lines:a.lines,threadId:e.id},a.key):"stops"===a.kind?(0,b.jsx)(au,{lines:a.lines},a.key):a.lines.map(a=>(0,b.jsx)(as,{line:a},a.id))),f&&(0,b.jsx)(z.ShinyText,{text:"asking"===f?"waiting on you":"on the next step…",tone:"asking"===f?"waiting":"muted",speed:2.2,className:(0,t.cn)("block px-1 font-mono text-[10px]",g&&"invisible")})]})}function _({lines:a,threadId:c}){return(0,b.jsx)("div",{className:"flex w-full flex-col gap-0.5 rounded-2xl bg-muted/40 p-1",children:a.map(a=>a.tool&&(0,b.jsx)(M.BotTool,{tool:a.tool,threadId:c,collapsed:!0},a.id))})}function aa({words:a,facts:c,grow:d=!1}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:(0,t.cn)("min-w-0 truncate text-[12.5px] leading-5 text-foreground/80",d&&"flex-1"),children:a}),(0,b.jsx)("span",{className:"shrink-0 font-mono text-[10.5px] leading-4 text-muted-foreground",children:c})]})}function ab({open:a}){return(0,b.jsx)("span",{className:"grid size-5.5 shrink-0 place-items-center rounded-md bg-background text-muted-foreground ring-1 ring-border/60",children:(0,b.jsx)(e.ChevronDown,{className:(0,t.cn)("size-3.5 transition-transform",a&&"rotate-180")})})}function ac(a){return"tool"===a.kind&&a.tool?a.tool.note??`${a.tool.name} \xb7 ${a.tool.input}`:(0,t.plainText)(a.text).replace(/\s+/g," ").trim()}function ad({thread:a}){let c="user"===a.startedBy?af:ae;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ai,{from:c,to:a.bot}),(0,b.jsx)(am,{side:"end",name:ah(c),mark:(0,b.jsx)(ak,{bot:c}),children:(0,b.jsx)(al,{dark:!0,className:"py-2 pr-2 pl-3.5",children:(0,b.jsx)(x.FoldedText,{text:a.request,subject:"request",className:"wrap-anywhere"})})})]})}let ae={name:K.ROOM_THURSDAY},af={name:K.ROOM_USER},ag=a=>a.name===ae.name||a.name===af.name,ah=a=>a.name===af.name?"You":a.name;function ai({from:a,to:c}){return(0,b.jsx)("div",{className:"flex animate-in justify-center fade-in duration-300",children:(0,b.jsxs)("span",{className:"flex max-w-full items-center gap-1.5 rounded-full bg-muted px-2.5 py-1 font-mono text-[10px] text-muted-foreground",children:[(0,b.jsx)(aj,{bot:a}),(0,b.jsx)("span",{className:"shrink-0 text-muted-foreground/70",children:a.name===af.name?"asked":"invited"}),(0,b.jsx)(aj,{bot:c})]})})}function aj({bot:a}){return a.name===af.name?(0,b.jsx)("span",{className:"shrink-0",children:"You"}):(0,b.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[a.name===ae.name?(0,b.jsx)(G.ThursdayMark,{size:15,className:"shrink-0"}):(0,b.jsx)(F.BotMark,{size:15,seed:a.name,color:a.icon?.color,shape:a.icon?.shape,outline:a.icon?.outline,paint:a.icon?.paint,notify:!1,className:"shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:a.name})]})}function ak({bot:a}){return a.name===af.name?null:a.name===ae.name?(0,b.jsx)(G.ThursdayMark,{size:26,className:"mt-1 shrink-0"}):(0,b.jsx)(F.BotMark,{size:26,seed:a.name,color:a.icon?.color,shape:a.icon?.shape,outline:a.icon?.outline,paint:a.icon?.paint,notify:!1,className:"mt-1 shrink-0"})}function al({dark:a=!1,children:c,className:d}){return(0,b.jsx)(v,{align:"end",variant:a?"default":"secondary",className:"max-w-full",children:(0,b.jsx)(w,{className:(0,t.cn)("rounded-tr-md px-3.5",d),children:(0,b.jsx)("div",{className:(0,t.cn)("min-w-0",a&&"inverse"),children:c})})})}function am({side:a,mark:c,name:d,children:e}){return(0,b.jsxs)("div",{className:(0,t.cn)("flex gap-2.5","end"===a&&"flex-row-reverse"),children:[c,(0,b.jsxs)("div",{className:(0,t.cn)("flex min-w-0 flex-1 flex-col gap-1.5 [&>*+*]:max-w-[80%]","end"===a&&"items-end"),children:[(0,b.jsx)("p",{className:"max-w-[80%] truncate px-1 font-mono text-[10px] text-muted-foreground",children:d}),e]})]})}function an({line:a,surface:c,mention:d,threadId:e=null}){let f=!!a.question,g="result"===a.kind,h="none"!==c,i=(0,E.shortenPaths)(a.text),j=(0,b.jsxs)(b.Fragment,{children:[f&&(0,b.jsx)(ar,{}),d?(0,b.jsx)(aq,{bot:d,bubble:h,children:i}):(0,b.jsx)(ao,{bubble:h,className:(0,t.cn)(!g&&"leading-snug"),children:i}),(0,b.jsx)(E.Attachments,{text:a.text,from:e,onBubble:h,className:"mt-2"})]});return(0,b.jsxs)(b.Fragment,{children:[h?(0,b.jsx)(al,{dark:"dark"===c,children:j}):(0,b.jsx)("div",{className:"min-w-0 max-w-full px-1",children:j}),a.steppedIn&&(0,b.jsxs)("p",{className:"flex items-center gap-1 px-1 font-mono text-[10px] text-muted-foreground",children:[(0,b.jsx)(k.CornerDownLeft,{className:"size-2.5"}),"stepped in"]}),g&&(0,b.jsx)("div",{className:"flex px-1",children:(0,b.jsx)(at,{text:a.text})})]})}function ao({children:a,bubble:c=!1,className:d}){return(0,b.jsx)(y.Markdown,{className:(0,t.cn)("min-w-0 max-w-full text-[13px] leading-relaxed wrap-anywhere break-keep [&_h1]:text-[15px] [&_h2]:text-[14px] [&_h3]:text-[13px] [&_h3]:font-semibold [&_li]:my-0.5 [&_table]:text-[12px] [&_table]:wrap-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",c&&"[&_[data-streamdown=inline-code]]:text-[12px] [&_[data-streamdown=code-block]]:my-2 [&_[data-streamdown=code-block]]:gap-0 [&_[data-streamdown=code-block]]:rounded-[10px] [&_[data-streamdown=code-block]]:border-0 [&_[data-streamdown=code-block]]:bg-background [&_[data-streamdown=code-block]]:p-0 [&_[data-streamdown=code-block-header]]:h-7 [&_[data-streamdown=code-block-header]]:px-2.5 [&_[data-streamdown=code-block-header]]:text-[11px] [&_[data-streamdown=code-block-body]]:border-0 [&_[data-streamdown=code-block-body]]:bg-transparent! [&_[data-streamdown=code-block-body]]:px-2.5 [&_[data-streamdown=code-block-body]]:pt-0 [&_[data-streamdown=code-block-body]]:pb-2.5 [&_[data-streamdown=code-block-body]]:text-[12.5px] [&_[data-streamdown=code-block]_div:has(>[data-streamdown=code-block-actions])]:-mt-7 [&_[data-streamdown=code-block-actions]]:mr-1 [&_[data-streamdown=code-block-actions]]:border-0 [&_[data-streamdown=code-block-actions]]:bg-transparent!",d),children:a})}function ap({bot:a,bubble:c}){return(0,b.jsxs)("span",{className:(0,t.cn)("mr-1.5 inline-flex h-5 max-w-full items-center gap-1 rounded-full pr-2 pl-[3px] align-[-4px] text-[12px] leading-none font-medium whitespace-nowrap text-foreground",c?"bg-background":"bg-muted"),children:[(0,b.jsx)(F.BotMark,{size:14,seed:a.name,color:a.icon?.color,shape:a.icon?.shape,outline:a.icon?.outline,paint:a.icon?.paint,notify:!1,className:"shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:a.name})]})}function aq({bot:a,bubble:c,children:d}){return(0,b.jsxs)("div",{className:"min-w-0 max-w-full text-[13px] leading-snug",children:[(0,b.jsx)(ap,{bot:a,bubble:c}),(0,b.jsx)(ao,{bubble:c,className:"contents leading-snug [&>p:first-child]:inline",children:d})]})}function ar(){return(0,b.jsxs)("p",{className:"mb-1 flex items-center gap-1.5 text-[12px] leading-4 font-medium text-muted-foreground",children:[(0,b.jsx)(i,{className:"size-3.5 shrink-0"}),"Question"]})}function as({line:a,inset:c=!1}){return"note"===a.kind?(0,b.jsxs)("details",{className:"w-full px-2 py-1 text-muted-foreground",children:[(0,b.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-2.5 outline-none [&::-webkit-details-marker]:hidden",children:[(0,b.jsx)("span",{className:"h-px flex-1 bg-border"}),(0,b.jsx)("span",{className:"min-w-0 text-center font-mono text-[10px]",children:"Compacted — it goes on from its summary"}),(0,b.jsx)("span",{className:"h-px flex-1 bg-border"})]}),(0,b.jsx)(ao,{className:"mt-2 rounded-xl bg-muted/40 px-3 py-2 text-[11px]",children:a.text})]}):(0,b.jsx)(ao,{className:(0,t.cn)("text-[12.5px] text-muted-foreground",c?"px-2.5 py-1":"px-1"),children:a.text})}function at({text:a}){let[c,e]=(0,p.useState)(!1),f=(0,p.useRef)(null);return(0,p.useEffect)(()=>()=>{f.current&&clearTimeout(f.current)},[]),(0,b.jsx)("button",{type:"button","aria-label":"Copy the answer",onClick:async()=>{try{await navigator.clipboard.writeText(a),e(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>e(!1),1400)}catch(a){B.toast.add({type:"error",title:"Could not copy the answer",description:(0,t.errorToString)(a)})}},className:"grid size-5 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:c?(0,b.jsx)(d.Check,{className:"size-3"}):(0,b.jsx)(j.Copy,{className:"size-3"})})}function au({lines:a}){return(0,b.jsxs)("details",{className:"group min-w-0 px-1 text-muted-foreground",children:[(0,b.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-[12.5px] leading-relaxed outline-none [&::-webkit-details-marker]:hidden",children:[(0,b.jsx)(n,{className:"size-3 shrink-0"}),(0,b.jsx)("span",{className:"min-w-0 truncate",children:av(a[0].text)}),a.length>1&&(0,b.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:["×",a.length]}),(0,b.jsx)(e.ChevronDown,{className:"size-2.5 shrink-0 text-muted-foreground/70 transition-transform group-open:rotate-180"})]}),(0,b.jsx)("div",{className:"mt-1 space-y-1 pl-4.5 text-[11px] leading-relaxed",children:a.map(a=>(0,b.jsxs)("p",{className:"flex gap-2 break-keep wrap-anywhere",children:[a.at&&(0,b.jsx)("span",{className:"shrink-0 font-mono text-muted-foreground/70 tabular-nums",children:(0,c.format)((0,I.toDate)(a.at),"HH:mm:ss")}),(0,b.jsx)("span",{className:"min-w-0",children:a.text})]},a.id))})]})}let av=a=>a.split(" (")[0].replace(/\.$/,"");function aw(a){let b=[];for(let c of a){let a="tool"===c.kind&&c.tool?"tools":"stop"===c.kind?"stops":"said",d=b.at(-1),e=d?.kind===a&&("stops"!==a||av(d.lines[0].text)===av(c.text));d&&e?d.lines.push(c):b.push({kind:a,key:c.id,lines:[c]})}return b}a.s(["Conversation",0,function({thread:a,tab:c=null,onTab:d,className:e,tabsClassName:f}){let g,h=(0,p.useRef)(null),i=(0,p.useRef)(!0),j=a.roster,k=d&&c!==a.bot.name&&j.some(a=>a.name===c)?c:null,l=k??a.bot.name,m=j.filter(b=>(!k||b.name===k)&&X(a,b.name)),n=(0,L.threadItems)((g=new Set(a.room.questions.map(a=>a.id))).size?{...a,lines:a.lines.filter(a=>!("ask"===a.kind&&void 0!==a.questionId&&g.has(a.questionId)))}:a,l,m);return(0,p.useEffect)(()=>{i.current=!0},[a.id,k]),(0,p.useEffect)(()=>{let a=h.current;a&&i.current&&(a.scrollTop=a.scrollHeight)},[a.lines,a.status,k]),(0,p.useEffect)(()=>{let a=h.current;if(!a)return;let b=new ResizeObserver(()=>{i.current&&(a.scrollTop=a.scrollHeight)});for(let c of(b.observe(a),Array.from(a.children)))b.observe(c);return()=>b.disconnect()},[n.length,a.lines,k]),(0,b.jsxs)(H.FileViewer,{children:[d&&(0,b.jsx)(U,{thread:a,roster:j,side:k,onPick:d,className:f}),(0,b.jsxs)("div",{ref:h,onScroll:a=>{let b=a.currentTarget;i.current=b.scrollHeight-b.scrollTop-b.clientHeight<24},className:(0,t.cn)("min-w-0 max-h-[64vh] space-y-3 overflow-y-auto px-4 pt-6 pb-4 mask-[linear-gradient(to_bottom,transparent,black_2rem)] scrollbar-none",e),children:[!k&&(0,b.jsx)(ad,{thread:a}),n.map(c=>"invite"===c.kind?(0,b.jsx)(ai,{from:c.from,to:c.to},c.key):(0,b.jsx)(Y,{turn:c,thread:a,self:l},c.key))]})]})},"FoldButton",0,N,"TAB",0,V,"THURSDAY",0,ae,"ThreadFacts",0,O,"ThreadHeader",0,function({thread:a,onBack:c,onClose:d,titled:e=!0,children:g}){return e?(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-3 pb-1",children:[(0,b.jsx)("button",{type:"button",onClick:c,"aria-label":"Back to the list",className:"shrink-0 rounded-md p-1 text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,b.jsx)(f.ChevronLeft,{className:"size-4"})}),(0,b.jsx)(F.BotMark,{size:22,seed:a.bot.name,color:a.bot.icon?.color,shape:a.bot.icon?.shape,outline:a.bot.icon?.outline,paint:a.bot.icon?.paint,notify:!1,crossed:"cancelled"===a.status||W(a,a.bot.name)}),(0,b.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] font-medium",children:a.label}),(0,b.jsx)(O,{thread:a}),g,(0,b.jsx)(N,{onClick:d})]}):(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-3 pb-1",children:[(0,b.jsxs)("button",{type:"button",onClick:c,"aria-label":"Back to the list",className:"flex shrink-0 items-center gap-1 rounded-md p-1 pr-2 text-[12.5px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,b.jsx)(f.ChevronLeft,{className:"size-4"}),"Threads"]}),(0,b.jsx)("span",{className:"flex-1"}),(0,b.jsx)(O,{thread:a}),g,(0,b.jsx)(N,{onClick:d})]})},"YOU",0,af,"leadOf",0,av,"stepOf",0,ac],181809)}];
1
+ module.exports=[42380,a=>{"use strict";var b=a.i(187924),c=a.i(913834);a.s(["BotRoster",0,function({bots:a}){return a.length<2?null:(0,b.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5",title:a.map(a=>a.name).join(", "),children:[(0,b.jsx)("span",{className:"flex items-center gap-0.5",children:a.slice(0,3).map(a=>(0,b.jsx)(c.BotMark,{size:18,seed:a.name,color:a.icon?.color,shape:a.icon?.shape,outline:a.icon?.outline,paint:a.icon?.paint,notify:!1,className:"shrink-0"},a.name))}),(0,b.jsxs)("span",{className:"font-mono text-[10px] text-muted-foreground",children:[a.length," bots"]})]})}])},181809,802550,748819,a=>{"use strict";var b=a.i(187924),c=a.i(256711),d=a.i(752562),e=a.i(589027),f=a.i(707963),g=a.i(164831);let h={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};h.node;let i=(0,g.default)(h);a.s(["CircleQuestionMark",0,i],802550);var j=a.i(585650),k=a.i(851528),l=a.i(875160);let m={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};m.node;let n=(0,g.default)(m);a.s(["RotateCw",0,n],748819);var o=a.i(474215),p=a.i(572131),q=a.i(676459),r=a.i(926184),s=a.i(400187),t=a.i(497895);let u=(0,s.cva)("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",{variants:{variant:{default:"*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",secondary:"*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",muted:"*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",tinted:"*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",outline:"*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",ghost:"border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",destructive:"*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"}},defaultVariants:{variant:"default"}});function v({variant:a="default",align:c="start",className:d,...e}){return(0,b.jsx)("div",{"data-slot":"bubble","data-variant":a,"data-align":c,className:(0,t.cn)(u({variant:a}),d),...e})}function w({className:a,render:b,...c}){var d;return d={defaultTagName:"div",props:(0,q.mergeProps)({className:(0,t.cn)("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",a)},c),render:b,state:{slot:"bubble-content"}},(0,r.useRenderElement)(d.defaultTagName??"div",d,d)}(0,s.cva)("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0",{variants:{side:{top:"top-0 -translate-y-3/4",bottom:"bottom-0 translate-y-3/4"},align:{start:"left-3",end:"right-3"}},defaultVariants:{side:"bottom",align:"end"}});var x=a.i(613350),y=a.i(846991),z=a.i(545097),A=a.i(621958),B=a.i(864037),C=a.i(405050);let D=(0,C.createServerReference)("7f2449080088ac4f4d622f64793fffaf9a8d398ae8",C.callServer,void 0,C.findSourceMapURL,"compactThreadAction");var E=a.i(321799),F=a.i(913834),G=a.i(346075),H=a.i(369768),I=a.i(199169),J=a.i(313237),K=a.i(983874),L=a.i(135432),M=a.i(8468);function N({onClick:a}){return(0,b.jsx)("button",{type:"button",onClick:a,"aria-label":"Fold the room away",className:"grid size-7 shrink-0 place-items-center rounded-full bg-muted text-foreground outline-none transition-colors hover:bg-muted-foreground/20 focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,b.jsx)(o.X,{className:"size-3.5"})})}function O({thread:a}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(P,{thread:a}),(0,b.jsx)(Q,{thread:a}),(0,b.jsx)(T,{thread:a})]})}function P({thread:a}){let{contextTokens:c,tokens:d}=a;return c?(0,b.jsx)("span",{title:`Last step ${(0,t.formatCount)(c)} tokens \xb7 in total in ${(0,t.formatCount)(d.input)} \xb7 out ${(0,t.formatCount)(d.output)}`,className:"shrink-0 font-mono text-[10px] text-muted-foreground tabular-nums",children:(0,t.formatCount)(c)}):null}function Q({thread:a}){let{contextTokens:c,contextBudget:d}=a,[e,f]=(0,p.useState)(!1),[g,h]=(0,J.useServerAction)(D,{onOk:()=>f(!0)}),[i,j]=(0,p.useState)(c);if(i!==c&&(j(c),f(!1)),!c||!d)return null;let k=Math.min(1,c/d);return(0,b.jsx)("button",{type:"button",disabled:h||e,onClick:()=>void g(a.id,a.bot.name),title:e?"It summarizes itself at its next step":`Context ${(0,t.formatCount)(c)} of ${(0,t.formatCount)(d)} — it summarizes itself at the end of the bar. Press to have it do so at its next step`,"aria-label":"Summarize this thread's context at its next step",className:"-my-2 flex h-6 shrink-0 items-center rounded-sm outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default",children:(0,b.jsx)("span",{className:"block h-[3px] w-9 overflow-hidden rounded-full bg-muted",children:(0,b.jsx)("span",{className:(0,t.cn)("block h-full rounded-full",e?"animate-pulse bg-muted-foreground/40":k>.9?"bg-amber-500/80":"bg-muted-foreground/70"),style:{width:`${Math.max(4,Math.round(100*k))}%`}})})})}let R={working:"text-muted-foreground",waiting:t.WAITING_INK,done:"text-foreground",cancelled:"text-muted-foreground"},S={working:"working",waiting:"waiting",done:"done",cancelled:"stopped"};function T({thread:a}){let c="done"===a.status&&a.seen?"text-muted-foreground":R[a.status];return"working"===a.status?(0,b.jsx)(z.ShinyText,{text:S.working,speed:2.2,className:"shrink-0 font-mono text-[10px]"}):(0,b.jsx)("span",{className:(0,t.cn)("flex shrink-0 items-center gap-1.5 font-mono text-[10px]",c),children:S[a.status]})}function U({thread:a,roster:c,side:d,onPick:e,className:f}){let g=(0,L.useOfficePointed)();return(0,p.useEffect)(()=>()=>L.officePointed.set(null),[]),(0,b.jsx)(A.Tabs,{value:d??a.bot.name,onValueChange:b=>e(b===a.bot.name?null:String(b)),className:(0,t.cn)("shrink-0 gap-0 px-3 pt-1 pb-0.5",f),children:(0,b.jsx)(A.TabsList,{className:"relative w-full justify-start gap-1 overflow-x-auto rounded-none bg-transparent p-0 scrollbar-none group-data-horizontal/tabs:h-auto",children:c.map(c=>{let d=X(a,c.name);return(0,b.jsxs)(A.TabsTrigger,{value:c.name,onPointerEnter:()=>L.officePointed.set(c.name),onPointerLeave:()=>L.officePointed.set(null),className:(0,t.cn)(V,"pl-1.5",g===c.name&&"bg-muted/60 text-foreground"),children:[(0,b.jsx)(F.BotMark,{size:16,seed:c.name,color:c.icon?.color,shape:c.icon?.shape,outline:c.icon?.outline,paint:c.icon?.paint,notify:"asking"===d,crossed:W(a,c.name),className:"shrink-0"}),(0,b.jsx)("span",{className:"max-w-28 truncate",children:c.name}),"running"===d&&(0,b.jsx)(l.Loader2,{className:"size-3 animate-spin text-muted-foreground/70"})]},c.name)})})})}let V="h-7 flex-none rounded-full px-3 py-0 text-[12px] text-muted-foreground hover:bg-muted/60 data-active:bg-muted data-active:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-none dark:data-active:border-transparent dark:data-active:bg-muted",W=(a,b)=>a.room.participants.some(a=>a.bot===b&&("cancelled"===a.state||"paused"===a.state));function X(a,b){let{room:c}=a;return c.questions.some(a=>a.bot===b)?"asking":"working"===a.status&&c.participants.some(a=>a.bot===b&&"running"===a.state)?"running":null}function Y({turn:a,thread:c,self:d}){let e=a.speaker.name===d,f=e?"none":ag(a.speaker)?"dark":"secondary",g=null;return(0,b.jsx)("div",{className:"animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,b.jsx)(am,{side:e?"start":"end",name:ah(a.speaker),mark:(0,b.jsx)(ak,{bot:a.speaker}),children:a.entries.map(h=>{if("work"===h.kind)return e?(0,b.jsx)($,{lines:h.lines,trailing:h.open,bot:a.speaker,thread:c},h.key):(0,b.jsx)(Z,{lines:h.lines,trailing:h.open,bot:a.speaker,thread:c},h.key);let i=(0,L.heardBy)(h.line),j=i&&i.name!==a.speaker.name&&i.name!==d&&!ag(i)&&i.name!==g?i:null;return i&&(g=i.name),(0,b.jsx)(an,{line:h.line,surface:f,mention:j,threadId:c.id},h.key)})})})}function Z({lines:a,trailing:c,bot:d,thread:e}){var f;let[g,h]=(0,p.useState)(!1),[i,j]=(0,p.useState)(null),k=c?X(e,d.name):null,m=(f=a,[["tool","step"],["say","note"],["stop","stop"],["note","compaction"]].map(([a,b])=>[f.filter(b=>b.kind===a).length,b]).filter(([a])=>a>0).map(([a,b])=>`${a} ${b}${1===a?"":"s"}`).join(" · ")),n=a.filter(a=>a.tool?.results!==void 0);if(!k&&!m)return null;let o=a.findLast(a=>"tool"===a.kind||"say"===a.kind),q=g&&a.length>0;return(0,b.jsxs)("div",{className:(0,t.cn)("flex min-w-0 flex-col rounded-2xl bg-muted/40 p-1",q?"w-full":"w-fit max-w-full"),children:[(0,b.jsxs)("button",{type:"button",disabled:!a.length,"aria-expanded":q,onClick:()=>{h(a=>!a),j(null)},className:"flex min-w-0 items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none transition-colors enabled:hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-ring/50",children:["running"===k&&(0,b.jsx)(l.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground/60"}),k?(0,b.jsx)(z.ShinyText,{text:"asking"===k?"waiting on you":o?ac(o):"working",tone:"asking"===k?"waiting":"muted",speed:2.4,className:(0,t.cn)("min-w-0 truncate text-[12px] leading-4",q&&"flex-1")}):(0,b.jsx)(aa,{words:o?ac(o):"",facts:[m,function(a){let b=a.flatMap(a=>a.at?[(0,I.toDate)(a.at).getTime()]:[]);if(b.length<2)return"";let c=Math.round((Math.max(...b)-Math.min(...b))/1e3);if(c<1)return"";if(c<60)return`${c}s`;let d=Math.round(c/60);return d<60?`${d} min`:`${Math.floor(d/60)}h ${d%60}m`}(a)].filter(Boolean).join(" · "),grow:q}),a.length>0&&(0,b.jsx)(ab,{open:q})]}),!q&&n.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap items-center gap-1 px-2 pt-0.5 pb-1.5",children:n.map(a=>a.tool&&(0,b.jsx)(M.StepTile,{tool:a.tool,onOpen:()=>{j(a.id),h(!0)}},a.id))}),q&&(0,b.jsx)("div",{className:"flex min-w-0 flex-col gap-0.5 pt-0.5",children:aw(a).map(a=>"tools"===a.kind?a.lines.map(a=>a.tool&&(0,b.jsx)(M.BotTool,{tool:a.tool,threadId:e.id,collapsed:a.id!==i},a.id)):"stops"===a.kind?(0,b.jsx)("div",{className:"px-1.5 py-1",children:(0,b.jsx)(au,{lines:a.lines})},a.key):a.lines.map(a=>(0,b.jsx)(as,{line:a,inset:!0},a.id)))})]})}function $({lines:a,trailing:c,bot:d,thread:e}){let f=c?X(e,d.name):null,g=a.some(a=>a.tool&&void 0===a.tool.results);return(0,b.jsxs)(b.Fragment,{children:[aw(a).map(a=>"tools"===a.kind?(0,b.jsx)(_,{lines:a.lines,threadId:e.id},a.key):"stops"===a.kind?(0,b.jsx)(au,{lines:a.lines},a.key):a.lines.map(a=>(0,b.jsx)(as,{line:a},a.id))),f&&(0,b.jsx)(z.ShinyText,{text:"asking"===f?"waiting on you":"on the next step…",tone:"asking"===f?"waiting":"muted",speed:2.2,className:(0,t.cn)("block px-1 font-mono text-[10px]",g&&"invisible")})]})}function _({lines:a,threadId:c}){return(0,b.jsx)("div",{className:"flex w-full flex-col gap-0.5 rounded-2xl bg-muted/40 p-1",children:a.map(a=>a.tool&&(0,b.jsx)(M.BotTool,{tool:a.tool,threadId:c,collapsed:!0},a.id))})}function aa({words:a,facts:c,grow:d=!1}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:(0,t.cn)("min-w-0 truncate text-[12.5px] leading-5 text-foreground/80",d&&"flex-1"),children:a}),(0,b.jsx)("span",{className:"shrink-0 font-mono text-[10.5px] leading-4 text-muted-foreground",children:c})]})}function ab({open:a}){return(0,b.jsx)("span",{className:"grid size-5.5 shrink-0 place-items-center rounded-md bg-background text-muted-foreground ring-1 ring-border/60",children:(0,b.jsx)(e.ChevronDown,{className:(0,t.cn)("size-3.5 transition-transform",a&&"rotate-180")})})}function ac(a){return"tool"===a.kind&&a.tool?a.tool.note??`${a.tool.name} \xb7 ${a.tool.input}`:(0,t.plainText)(a.text).replace(/\s+/g," ").trim()}function ad({thread:a}){let c="user"===a.startedBy?af:ae;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(ai,{from:c,to:a.bot}),(0,b.jsx)(am,{side:"end",name:ah(c),mark:(0,b.jsx)(ak,{bot:c}),children:(0,b.jsx)(al,{dark:!0,className:"py-2 pr-2 pl-3.5",children:(0,b.jsx)(x.FoldedText,{text:a.request,subject:"request",className:"wrap-anywhere"})})})]})}let ae={name:K.ROOM_THURSDAY},af={name:K.ROOM_USER},ag=a=>a.name===ae.name||a.name===af.name,ah=a=>a.name===af.name?"You":a.name;function ai({from:a,to:c}){return(0,b.jsx)("div",{className:"flex animate-in justify-center fade-in duration-300",children:(0,b.jsxs)("span",{className:"flex max-w-full items-center gap-1.5 rounded-full bg-muted px-2.5 py-1 font-mono text-[10px] text-muted-foreground",children:[(0,b.jsx)(aj,{bot:a}),(0,b.jsx)("span",{className:"shrink-0 text-muted-foreground",children:a.name===af.name?"asked":"invited"}),(0,b.jsx)(aj,{bot:c})]})})}function aj({bot:a}){return a.name===af.name?(0,b.jsx)("span",{className:"shrink-0",children:"You"}):(0,b.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[a.name===ae.name?(0,b.jsx)(G.ThursdayMark,{size:15,className:"shrink-0"}):(0,b.jsx)(F.BotMark,{size:15,seed:a.name,color:a.icon?.color,shape:a.icon?.shape,outline:a.icon?.outline,paint:a.icon?.paint,notify:!1,className:"shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:a.name})]})}function ak({bot:a}){return a.name===af.name?null:a.name===ae.name?(0,b.jsx)(G.ThursdayMark,{size:26,className:"mt-1 shrink-0"}):(0,b.jsx)(F.BotMark,{size:26,seed:a.name,color:a.icon?.color,shape:a.icon?.shape,outline:a.icon?.outline,paint:a.icon?.paint,notify:!1,className:"mt-1 shrink-0"})}function al({dark:a=!1,children:c,className:d}){return(0,b.jsx)(v,{align:"end",variant:a?"default":"secondary",className:"max-w-full",children:(0,b.jsx)(w,{className:(0,t.cn)("rounded-tr-md px-3.5",d),children:(0,b.jsx)("div",{className:(0,t.cn)("min-w-0",a&&"inverse"),children:c})})})}function am({side:a,mark:c,name:d,children:e}){return(0,b.jsxs)("div",{className:(0,t.cn)("flex gap-2.5","end"===a&&"flex-row-reverse"),children:[c,(0,b.jsxs)("div",{className:(0,t.cn)("flex min-w-0 flex-1 flex-col gap-1.5 [&>*+*]:max-w-[80%]","end"===a&&"items-end"),children:[(0,b.jsx)("p",{className:"max-w-[80%] truncate px-1 font-mono text-[10px] text-muted-foreground",children:d}),e]})]})}function an({line:a,surface:c,mention:d,threadId:e=null}){let f=!!a.question,g="result"===a.kind,h="none"!==c,i=(0,E.shortenPaths)(a.text),j=(0,b.jsxs)(b.Fragment,{children:[f&&(0,b.jsx)(ar,{}),d?(0,b.jsx)(aq,{bot:d,bubble:h,children:i}):(0,b.jsx)(ao,{bubble:h,className:(0,t.cn)(!g&&"leading-snug"),children:i}),(0,b.jsx)(E.Attachments,{text:a.text,from:e,onBubble:h,className:"mt-2"})]});return(0,b.jsxs)(b.Fragment,{children:[h?(0,b.jsx)(al,{dark:"dark"===c,children:j}):(0,b.jsx)("div",{className:"min-w-0 max-w-full px-1",children:j}),a.steppedIn&&(0,b.jsxs)("p",{className:"flex items-center gap-1 px-1 font-mono text-[10px] text-muted-foreground",children:[(0,b.jsx)(k.CornerDownLeft,{className:"size-2.5"}),"stepped in"]}),g&&(0,b.jsx)("div",{className:"flex px-1",children:(0,b.jsx)(at,{text:a.text})})]})}function ao({children:a,bubble:c=!1,className:d}){return(0,b.jsx)(y.Markdown,{className:(0,t.cn)("min-w-0 max-w-full text-[13px] leading-relaxed wrap-anywhere break-keep [&_h1]:text-[15px] [&_h2]:text-[14px] [&_h3]:text-[13px] [&_h3]:font-semibold [&_li]:my-0.5 [&_table]:text-[12px] [&_table]:wrap-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",c&&"[&_[data-streamdown=inline-code]]:text-[12px] [&_[data-streamdown=code-block]]:my-2 [&_[data-streamdown=code-block]]:gap-0 [&_[data-streamdown=code-block]]:rounded-[10px] [&_[data-streamdown=code-block]]:border-0 [&_[data-streamdown=code-block]]:bg-background [&_[data-streamdown=code-block]]:p-0 [&_[data-streamdown=code-block-header]]:h-7 [&_[data-streamdown=code-block-header]]:px-2.5 [&_[data-streamdown=code-block-header]]:text-[11px] [&_[data-streamdown=code-block-body]]:border-0 [&_[data-streamdown=code-block-body]]:bg-transparent! [&_[data-streamdown=code-block-body]]:px-2.5 [&_[data-streamdown=code-block-body]]:pt-0 [&_[data-streamdown=code-block-body]]:pb-2.5 [&_[data-streamdown=code-block-body]]:text-[12.5px] [&_[data-streamdown=code-block]_div:has(>[data-streamdown=code-block-actions])]:-mt-7 [&_[data-streamdown=code-block-actions]]:mr-1 [&_[data-streamdown=code-block-actions]]:border-0 [&_[data-streamdown=code-block-actions]]:bg-transparent!",d),children:a})}function ap({bot:a,bubble:c}){return(0,b.jsxs)("span",{className:(0,t.cn)("mr-1.5 inline-flex h-5 max-w-full items-center gap-1 rounded-full pr-2 pl-[3px] align-[-4px] text-[12px] leading-none font-medium whitespace-nowrap text-foreground",c?"bg-background":"bg-muted"),children:[(0,b.jsx)(F.BotMark,{size:14,seed:a.name,color:a.icon?.color,shape:a.icon?.shape,outline:a.icon?.outline,paint:a.icon?.paint,notify:!1,className:"shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:a.name})]})}function aq({bot:a,bubble:c,children:d}){return(0,b.jsxs)("div",{className:"min-w-0 max-w-full text-[13px] leading-snug",children:[(0,b.jsx)(ap,{bot:a,bubble:c}),(0,b.jsx)(ao,{bubble:c,className:"contents leading-snug [&>p:first-child]:inline",children:d})]})}function ar(){return(0,b.jsxs)("p",{className:"mb-1 flex items-center gap-1.5 text-[12px] leading-4 font-medium text-muted-foreground",children:[(0,b.jsx)(i,{className:"size-3.5 shrink-0"}),"Question"]})}function as({line:a,inset:c=!1}){return"note"===a.kind?(0,b.jsxs)("details",{className:"w-full px-2 py-1 text-muted-foreground",children:[(0,b.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-2.5 outline-none [&::-webkit-details-marker]:hidden",children:[(0,b.jsx)("span",{className:"h-px flex-1 bg-border"}),(0,b.jsx)("span",{className:"min-w-0 text-center font-mono text-[10px]",children:"Compacted — it goes on from its summary"}),(0,b.jsx)("span",{className:"h-px flex-1 bg-border"})]}),(0,b.jsx)(ao,{className:"mt-2 rounded-xl bg-muted/40 px-3 py-2 text-[11px]",children:a.text})]}):(0,b.jsx)(ao,{className:(0,t.cn)("text-[12.5px] text-muted-foreground",c?"px-2.5 py-1":"px-1"),children:a.text})}function at({text:a}){let[c,e]=(0,p.useState)(!1),f=(0,p.useRef)(null);return(0,p.useEffect)(()=>()=>{f.current&&clearTimeout(f.current)},[]),(0,b.jsx)("button",{type:"button","aria-label":"Copy the answer",onClick:async()=>{try{await navigator.clipboard.writeText(a),e(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>e(!1),1400)}catch(a){B.toast.add({type:"error",title:"Could not copy the answer",description:(0,t.errorToString)(a)})}},className:"grid size-5 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:c?(0,b.jsx)(d.Check,{className:"size-3"}):(0,b.jsx)(j.Copy,{className:"size-3"})})}function au({lines:a}){return(0,b.jsxs)("details",{className:"group min-w-0 px-1 text-muted-foreground",children:[(0,b.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-[12.5px] leading-relaxed outline-none [&::-webkit-details-marker]:hidden",children:[(0,b.jsx)(n,{className:"size-3 shrink-0"}),(0,b.jsx)("span",{className:"min-w-0 truncate",children:av(a[0].text)}),a.length>1&&(0,b.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground",children:["×",a.length]}),(0,b.jsx)(e.ChevronDown,{className:"size-2.5 shrink-0 text-muted-foreground/70 transition-transform group-open:rotate-180"})]}),(0,b.jsx)("div",{className:"mt-1 space-y-1 pl-4.5 text-[11px] leading-relaxed",children:a.map(a=>(0,b.jsxs)("p",{className:"flex gap-2 break-keep wrap-anywhere",children:[a.at&&(0,b.jsx)("span",{className:"shrink-0 font-mono text-muted-foreground tabular-nums",children:(0,c.format)((0,I.toDate)(a.at),"HH:mm:ss")}),(0,b.jsx)("span",{className:"min-w-0",children:a.text})]},a.id))})]})}let av=a=>a.split(" (")[0].replace(/\.$/,"");function aw(a){let b=[];for(let c of a){let a="tool"===c.kind&&c.tool?"tools":"stop"===c.kind?"stops":"said",d=b.at(-1),e=d?.kind===a&&("stops"!==a||av(d.lines[0].text)===av(c.text));d&&e?d.lines.push(c):b.push({kind:a,key:c.id,lines:[c]})}return b}a.s(["Conversation",0,function({thread:a,tab:c=null,onTab:d,className:e,tabsClassName:f}){let g,h=(0,p.useRef)(null),i=(0,p.useRef)(!0),j=a.roster,k=d&&c!==a.bot.name&&j.some(a=>a.name===c)?c:null,l=k??a.bot.name,m=j.filter(b=>(!k||b.name===k)&&X(a,b.name)),n=(0,L.threadItems)((g=new Set(a.room.questions.map(a=>a.id))).size?{...a,lines:a.lines.filter(a=>!("ask"===a.kind&&void 0!==a.questionId&&g.has(a.questionId)))}:a,l,m);return(0,p.useEffect)(()=>{i.current=!0},[a.id,k]),(0,p.useEffect)(()=>{let a=h.current;a&&i.current&&(a.scrollTop=a.scrollHeight)},[a.lines,a.status,k]),(0,p.useEffect)(()=>{let a=h.current;if(!a)return;let b=new ResizeObserver(()=>{i.current&&(a.scrollTop=a.scrollHeight)});for(let c of(b.observe(a),Array.from(a.children)))b.observe(c);return()=>b.disconnect()},[n.length,a.lines,k]),(0,b.jsxs)(H.FileViewer,{children:[d&&(0,b.jsx)(U,{thread:a,roster:j,side:k,onPick:d,className:f}),(0,b.jsxs)("div",{ref:h,onScroll:a=>{let b=a.currentTarget;i.current=b.scrollHeight-b.scrollTop-b.clientHeight<24},className:(0,t.cn)("min-w-0 max-h-[64vh] space-y-3 overflow-y-auto px-4 pt-6 pb-4 mask-[linear-gradient(to_bottom,transparent,black_2rem)] scrollbar-none",e),children:[!k&&(0,b.jsx)(ad,{thread:a}),n.map(c=>"invite"===c.kind?(0,b.jsx)(ai,{from:c.from,to:c.to},c.key):(0,b.jsx)(Y,{turn:c,thread:a,self:l},c.key))]})]})},"FoldButton",0,N,"TAB",0,V,"THURSDAY",0,ae,"ThreadFacts",0,O,"ThreadHeader",0,function({thread:a,onBack:c,onClose:d,titled:e=!0,children:g}){return e?(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-3 pb-1",children:[(0,b.jsx)("button",{type:"button",onClick:c,"aria-label":"Back to the list",className:"shrink-0 rounded-md p-1 text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,b.jsx)(f.ChevronLeft,{className:"size-4"})}),(0,b.jsx)(F.BotMark,{size:22,seed:a.bot.name,color:a.bot.icon?.color,shape:a.bot.icon?.shape,outline:a.bot.icon?.outline,paint:a.bot.icon?.paint,notify:!1,crossed:"cancelled"===a.status||W(a,a.bot.name)}),(0,b.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] font-medium",children:a.label}),(0,b.jsx)(O,{thread:a}),g,(0,b.jsx)(N,{onClick:d})]}):(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-3 pb-1",children:[(0,b.jsxs)("button",{type:"button",onClick:c,"aria-label":"Back to the list",className:"flex shrink-0 items-center gap-1 rounded-md p-1 pr-2 text-[12.5px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,b.jsx)(f.ChevronLeft,{className:"size-4"}),"Threads"]}),(0,b.jsx)("span",{className:"flex-1"}),(0,b.jsx)(O,{thread:a}),g,(0,b.jsx)(N,{onClick:d})]})},"YOU",0,af,"leadOf",0,av,"stepOf",0,ac],181809)}];
2
2
 
3
3
  //# sourceMappingURL=features_bot_components_01ye2wp._.js.map
@@ -1,4 +1,4 @@
1
- module.exports=[581662,a=>{"use strict";var b,c,d,e,f,g,h,i,j=a.i(187924),k=a.i(752562),l=a.i(141146),m=a.i(164831);let n={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};n.node;let o=(0,m.default)(n);var p=a.i(844561);let q={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};q.node;let r=(0,m.default)(q);var s=a.i(403512),t=a.i(951675),u=a.i(924613),v=a.i(474215),w=a.i(572131),x=a.i(986368),y=a.i(767561),z=a.i(340695),A=/[\\\/_+.#"@\[\(\{&]/,B=/[\\\/_+.#"@\[\(\{&]/g,C=/[\s-]/,D=/[\s-]/g;function E(a){return a.toLowerCase().replace(D," ")}var F=Object.defineProperty,G=(a,b)=>F(a,"name",{value:b,configurable:!0});function H(a,b,{checkForDefaultPrevented:c=!0}={}){return G(function(d){if(a?.(d),!1===c||!d||!d.defaultPrevented)return b?.(d)},"handleEvent")}function I(a){throw Error("Cannot access document outside of the DOM")}function J(a){return"IFRAME"===a.tagName}G(H,"composeEventHandlers"),G(function(a){throw Error("Cannot access window outside of the DOM")},"getOwnerWindow"),G(I,"getOwnerDocument"),G(function a(b,c=!1){let{activeElement:d}=I(b);if(!d?.nodeName)return null;if(J(d)&&d.contentDocument)return a(d.contentDocument.body,c);if(c){let a=d.getAttribute("aria-activedescendant");if(a){let b=I(d).getElementById(a);if(b)return b}}return d},"getActiveElement"),G(J,"isFrame");var K=Object.defineProperty,L=(a,b)=>K(a,"name",{value:b,configurable:!0});function M(a,b){if("function"==typeof a)return a(b);null!=a&&(a.current=b)}function N(...a){return b=>{let c=!1,d=a.map(a=>{let d=M(a,b);return c||"function"!=typeof d||(c=!0),d});if(c)return()=>{for(let b=0;b<d.length;b++){let c=d[b];"function"==typeof c?c():M(a[b],null)}}}}function O(...a){return w.useCallback(N(...a),a)}L(M,"setRef"),L(N,"composeRefs"),L(O,"useComposedRefs");var P=Object.defineProperty,Q=(a,b)=>P(a,"name",{value:b,configurable:!0});function R(a,b=[]){let c=[];function d(b,d){let e=w.createContext(d);e.displayName=b+"Context";let f=c.length;c=[...c,d];let g=Q(b=>{let{scope:c,children:d,...g}=b,h=c?.[a]?.[f]||e,i=w.useMemo(()=>g,Object.values(g));return(0,j.jsx)(h.Provider,{value:i,children:d})},"Provider");function h(c,g,i={}){let{optional:j=!1}=i,k=g?.[a]?.[f]||e,l=w.useContext(k);if(l)return l;if(void 0!==d)return d;if(!j)throw Error(`\`${c}\` must be used within \`${b}\``)}return g.displayName=b+"Provider",Q(h,"useContext"),[g,h]}Q(d,"createContext");let e=Q(()=>{let b=c.map(a=>w.createContext(a));return Q(function(c){let d=c?.[a]||b;return w.useMemo(()=>({[`__scope${a}`]:{...c,[a]:d}}),[c,d])},"useScope")},"createScope");return e.scopeName=a,[d,S(e,...b)]}function S(...a){let b=a[0];if(1===a.length)return b;let c=Q(()=>{let c=a.map(a=>({useScope:a(),scopeName:a.scopeName}));return Q(function(a){let d=c.reduce((b,{useScope:c,scopeName:d})=>{let e=c(a)[`__scope${d}`];return{...b,...e}},{});return w.useMemo(()=>({[`__scope${b.scopeName}`]:d}),[d])},"useComposedScopes")},"createScope");return c.scopeName=b.scopeName,c}Q(function(a,b){let c=w.createContext(b);c.displayName=a+"Context";let d=Q(a=>{let{children:b,...d}=a,e=w.useMemo(()=>d,Object.values(d));return(0,j.jsx)(c.Provider,{value:e,children:b})},"Provider");function e(d,f={}){let{optional:g=!1}=f,h=w.useContext(c);if(h)return h;if(void 0!==b)return b;if(!g)throw Error(`\`${d}\` must be used within \`${a}\``)}return d.displayName=a+"Provider",Q(e,"useContext"),[d,e]},"createContext"),Q(R,"createContextScope"),Q(S,"composeContextScopes");var T=globalThis?.document?w.useLayoutEffect:()=>{},U=Object.defineProperty,V=w[" useId ".trim().toString()]||(()=>void 0),W=0;function X(a){let[b,c]=w.useState(V());return T(()=>{a||c(a=>a??String(W++))},[a]),a||(b?`radix-${b}`:"")}U(X,"name",{value:"useId",configurable:!0});var Y=Object.defineProperty,Z=w[" useEffectEvent ".trim().toString()],$=w[" useInsertionEffect ".trim().toString()];function _(a){if("function"==typeof Z)return Z(a);let b=w.useRef(()=>{throw Error("Cannot call an event handler while rendering.")});return"function"==typeof $?$(()=>{b.current=a}):T(()=>{b.current=a}),w.useMemo(()=>(...a)=>b.current?.(...a),[])}Y(_,"name",{value:"useEffectEvent",configurable:!0});var aa=Object.defineProperty,ab=(a,b)=>aa(a,"name",{value:b,configurable:!0}),ac=w[" useInsertionEffect ".trim().toString()]||T;function ad({prop:a,defaultProp:b,onChange:c=ab(()=>{},"onChange"),caller:d}){let[e,f,g]=ae({defaultProp:b,onChange:c}),h=void 0!==a,i=h?a:e;return[i,w.useCallback(b=>{if(h){let c=af(b)?b(a):b;c!==a&&g.current?.(c)}else f(b)},[h,a,f,g])]}function ae({defaultProp:a,onChange:b}){let[c,d]=w.useState(a),e=w.useRef(c),f=w.useRef(b);return ac(()=>{f.current=b},[b]),w.useEffect(()=>{e.current!==c&&(f.current?.(c),e.current=c)},[c,e]),[c,d,f]}function af(a){return"function"==typeof a}ab(ad,"useControllableState"),ab(ae,"useUncontrolledState"),ab(af,"isFunction");var ag=Symbol("RADIX:SYNC_STATE");ab(function(a,b,c,d){let{prop:e,defaultProp:f,onChange:g,caller:h}=b,i=void 0!==e,j=_(g),k=[{...c,state:f}];d&&k.push(d);let[l,m]=w.useReducer((b,c)=>{if(c.type===ag)return{...b,state:c.state};let d=a(b,c);return i&&!Object.is(d.state,b.state)&&j(d.state),d},...k),n=l.state,o=w.useRef(n);w.useEffect(()=>{o.current!==n&&(o.current=n,i||j(n))},[n,o,i]);let p=w.useMemo(()=>void 0!==e?{...l,state:e}:l,[l,e]);return w.useEffect(()=>{i&&!Object.is(e,l.state)&&m({type:ag,state:e})},[e,l.state,i]),[p,m]},"useControllableStateReducer");var ah=a.i(935112),ai=Object.defineProperty,aj=(a,b)=>ai(a,"name",{value:b,configurable:!0});function ak(a){let b=w.forwardRef((b,c)=>{let{children:d,...e}=b,f=null,g=!1,h=[];ar(d)&&"function"==typeof av&&(d=av(d._payload)),w.Children.forEach(d,a=>{if(ap(a)){g=!0;let b="child"in a.props?a.props.child:a.props.children;ar(b)&&"function"==typeof av&&(b=av(b._payload)),f=am(a,b),h.push(f?.props?.children)}else h.push(a)}),f?f=w.cloneElement(f,void 0,h):!g&&1===w.Children.count(d)&&w.isValidElement(d)&&(f=d);let i=f?ao(f):void 0,j=O(c,i);if(!f){if(d||0===d)throw Error(g?au(a):at(a));return d}let k=an(e,f.props??{});return f.type!==w.Fragment&&(k.ref=c?j:i),w.cloneElement(f,k)});return b.displayName=`${a}.Slot`,b}aj(ak,"createSlot");var al=Symbol.for("radix.slottable");aj(function(a){let b=aj(a=>"child"in a?a.children(a.child):a.children,"Slottable");return b.displayName=`${a}.Slottable`,b.__radixId=al,b},"createSlottable");var am=aj((a,b)=>{if("child"in a.props){let b=a.props.child;return w.isValidElement(b)?w.cloneElement(b,void 0,a.props.children(b.props.children)):null}return w.isValidElement(b)?b:null},"getSlottableElementFromSlottable");function an(a,b){let c={...b};for(let d in b){let e=a[d],f=b[d];/^on[A-Z]/.test(d)?e&&f?c[d]=(...a)=>{let b=f(...a);return e(...a),b}:e&&(c[d]=e):"style"===d?c[d]={...e,...f}:"className"===d&&(c[d]=[e,f].filter(Boolean).join(" "))}return{...a,...c}}function ao(a){let b=Object.getOwnPropertyDescriptor(a.props,"ref")?.get,c=b&&"isReactWarning"in b&&b.isReactWarning;return c?a.ref:(c=(b=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in b&&b.isReactWarning)?a.props.ref:a.props.ref||a.ref}function ap(a){return w.isValidElement(a)&&"function"==typeof a.type&&"__radixId"in a.type&&a.type.__radixId===al}aj(an,"mergeProps"),aj(ao,"getElementRef"),aj(ap,"isSlottable");var aq=Symbol.for("react.lazy");function ar(a){return null!=a&&"object"==typeof a&&"$$typeof"in a&&a.$$typeof===aq&&"_payload"in a&&as(a._payload)}function as(a){return"object"==typeof a&&null!==a&&"then"in a}aj(ar,"isLazyComponent"),aj(as,"isPromiseLike");var at=aj(a=>`${a} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),au=aj(a=>`${a} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),av=w[" use ".trim().toString()],aw=Object.defineProperty,ax=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((a,b)=>{let c=ak(`Primitive.${b}`),d=w.forwardRef((a,d)=>{let{asChild:e,...f}=a;return(0,j.jsx)(e?c:b,{...f,ref:d})});return d.displayName=`Primitive.${b}`,{...a,[b]:d}},{});function ay(a,b){a&&ah.flushSync(()=>a.dispatchEvent(b))}function az(a){let b=w.useRef(a);return w.useEffect(()=>{b.current=a}),w.useMemo(()=>(...a)=>b.current?.(...a),[])}aw(ay,"name",{value:"dispatchDiscreteCustomEvent",configurable:!0}),(0,Object.defineProperty)(az,"name",{value:"useCallbackRef",configurable:!0});var aA=Object.defineProperty,aB=(a,b)=>aA(a,"name",{value:b,configurable:!0}),aC="dismissableLayer.update",aD=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),aE=w.forwardRef(aB(function(a,b){let{disableOutsidePointerEvents:c=!1,deferPointerDownOutside:d=!1,onEscapeKeyDown:e,onPointerDownOutside:f,onFocusOutside:g,onInteractOutside:i,onDismiss:k,...l}=a,m=w.useContext(aD),[n,o]=w.useState(null),p=n?.ownerDocument??globalThis?.document,[,q]=w.useState({}),r=O(b,o),s=Array.from(m.layers),[t]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),u=t?s.indexOf(t):-1,v=n?s.indexOf(n):-1,x=m.layersWithOutsidePointerEventsDisabled.size>0,y=v>=u,z=w.useRef(!1),A=aH(a=>{f?.(a),i?.(a),a.defaultPrevented||k?.()},{ownerDocument:p,deferPointerDownOutside:d,isDeferredPointerDownOutsideRef:z,dismissableSurfaces:m.dismissableSurfaces,shouldHandlePointerDownOutside:w.useCallback(a=>{if(!(a instanceof Node))return!1;let b=[...m.branches].some(b=>b.contains(a));return y&&!b},[m.branches,y])}),B=aI(a=>{if(d&&z.current)return;let b=a.target;![...m.branches].some(a=>a.contains(b))&&(g?.(a),i?.(a),a.defaultPrevented||k?.())},p),C=!!n&&v===s.length-1,D=az(a=>{"Escape"===a.key&&(e?.(a),!a.defaultPrevented&&k&&(a.preventDefault(),k()))});return w.useEffect(()=>{if(C)return p.addEventListener("keydown",D,{capture:!0}),()=>p.removeEventListener("keydown",D,{capture:!0})},[p,C,D]),w.useEffect(()=>{if(n)return c&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(h=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(n)),m.layers.add(n),aJ(),()=>{c&&(m.layersWithOutsidePointerEventsDisabled.delete(n),0===m.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=h))}},[n,p,c,m]),w.useEffect(()=>()=>{n&&(m.layers.delete(n),m.layersWithOutsidePointerEventsDisabled.delete(n),aJ())},[n,m]),w.useEffect(()=>{let a=aB(()=>q({}),"handleUpdate");return document.addEventListener(aC,a),()=>document.removeEventListener(aC,a)},[]),(0,j.jsx)(ax.div,{...l,ref:r,style:{pointerEvents:x?y?"auto":"none":void 0,...a.style},onFocusCapture:H(a.onFocusCapture,B.onFocusCapture),onBlurCapture:H(a.onBlurCapture,B.onBlurCapture),onPointerDownCapture:H(a.onPointerDownCapture,A.onPointerDownCapture)})},"DismissableLayer"));function aF(){let a=w.useContext(aD),[b,c]=w.useState(null);return w.useEffect(()=>{if(b)return a.dismissableSurfaces.add(b),()=>{a.dismissableSurfaces.delete(b)}},[b,a.dismissableSurfaces]),c}aB(aF,"useDismissableLayerSurface");var aG=aB(()=>!0,"IS_TRUE");function aH(a,b){let{ownerDocument:c=globalThis?.document,deferPointerDownOutside:d=!1,isDeferredPointerDownOutsideRef:e,dismissableSurfaces:f,shouldHandlePointerDownOutside:g=aG}=b,h=az(a),i=w.useRef(!1),j=w.useRef(!1),k=w.useRef(new Map),l=w.useRef(()=>{});return w.useEffect(()=>{function a(){j.current=!1,e.current=!1,k.current.clear()}function b(){return Array.from(k.current.values()).some(Boolean)}function m(a){if(!j.current)return;let b=a.target;b instanceof Node&&[...f].some(a=>a.contains(b))||k.current.set(a.type,!0),"click"===a.type&&window.setTimeout(()=>{j.current&&l.current()},0)}function n(a){j.current&&k.current.set(a.type,!1)}aB(a,"resetOutsideInteraction"),aB(b,"isOutsideInteractionIntercepted"),aB(m,"handleInteractionCapture"),aB(n,"handleInteractionBubble");let o=aB(f=>{if(f.target&&!i.current){let m=function(){c.removeEventListener("click",l.current);let d=b();a(),d||aK("dismissableLayer.pointerDownOutside",h,n,{discrete:!0})};if(aB(m,"handleAndDispatchPointerDownOutsideEvent"),!g(f.target)){c.removeEventListener("click",l.current),a(),i.current=!1;return}let n={originalEvent:f};j.current=!0,e.current=d&&0===f.button,k.current.clear(),d&&0===f.button?(c.removeEventListener("click",l.current),l.current=m,c.addEventListener("click",l.current,{once:!0})):m()}else c.removeEventListener("click",l.current),a();i.current=!1},"handlePointerDown"),p=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let a of p)c.addEventListener(a,m,!0),c.addEventListener(a,n);let q=window.setTimeout(()=>{c.addEventListener("pointerdown",o)},0);return()=>{for(let a of(window.clearTimeout(q),c.removeEventListener("pointerdown",o),c.removeEventListener("click",l.current),p))c.removeEventListener(a,m,!0),c.removeEventListener(a,n)}},[c,h,d,e,f,g]),{onPointerDownCapture:aB(()=>i.current=!0,"onPointerDownCapture")}}function aI(a,b=globalThis?.document){let c=az(a),d=w.useRef(!1);return w.useEffect(()=>{let a=aB(a=>{a.target&&!d.current&&aK("dismissableLayer.focusOutside",c,{originalEvent:a},{discrete:!1})},"handleFocus");return b.addEventListener("focusin",a),()=>b.removeEventListener("focusin",a)},[b,c]),{onFocusCapture:aB(()=>d.current=!0,"onFocusCapture"),onBlurCapture:aB(()=>d.current=!1,"onBlurCapture")}}function aJ(){let a=new CustomEvent(aC);document.dispatchEvent(a)}function aK(a,b,c,{discrete:d}){let e=c.originalEvent.target,f=new CustomEvent(a,{bubbles:!1,cancelable:!0,detail:c});b&&e.addEventListener(a,b,{once:!0}),d?ay(e,f):e.dispatchEvent(f)}aB(aH,"usePointerDownOutside"),aB(aI,"useFocusOutside"),aB(aJ,"dispatchUpdate"),aB(aK,"handleAndDispatchCustomEvent");var aL=Object.defineProperty,aM=(a,b)=>aL(a,"name",{value:b,configurable:!0}),aN="focusScope.autoFocusOnMount",aO="focusScope.autoFocusOnUnmount",aP={bubbles:!1,cancelable:!0},aQ=w.forwardRef(aM(function(a,b){let{loop:c=!1,trapped:d=!1,onMountAutoFocus:e,onUnmountAutoFocus:f,...g}=a,[h,i]=w.useState(null),k=az(e),l=az(f),m=w.useRef(null),n=O(b,i),o=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(d){let a=function(a){if(o.paused||!h)return;let b=a.target;h.contains(b)?m.current=b:aX(m.current,{select:!0})},b=function(a){if(o.paused||!h)return;let b=a.relatedTarget;null!==b&&(h.contains(b)||aX(m.current,{select:!0}))},c=function(a){if(document.activeElement===document.body)for(let b of a)b.removedNodes.length>0&&aX(h)};aM(a,"handleFocusIn"),aM(b,"handleFocusOut"),aM(c,"handleMutations"),document.addEventListener("focusin",a),document.addEventListener("focusout",b);let d=new MutationObserver(c);return h&&d.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",a),document.removeEventListener("focusout",b),d.disconnect()}}},[d,h,o.paused]),w.useEffect(()=>{if(h){aY.add(o);let a=document.activeElement;if(!h.contains(a)){let b=new CustomEvent(aN,aP);h.addEventListener(aN,k),h.dispatchEvent(b),b.defaultPrevented||(aR(a_(aT(h)),{select:!0}),document.activeElement===a&&aX(h))}return()=>{h.removeEventListener(aN,k),setTimeout(()=>{let b=new CustomEvent(aO,aP);h.addEventListener(aO,l),h.dispatchEvent(b),b.defaultPrevented||aX(a??document.body,{select:!0}),h.removeEventListener(aO,l),aY.remove(o)},0)}}},[h,k,l,o]);let p=w.useCallback(a=>{if(!c&&!d||o.paused)return;let b="Tab"===a.key&&!a.altKey&&!a.ctrlKey&&!a.metaKey,e=document.activeElement;if(b&&e){let b=a.currentTarget,[d,f]=aS(b);d&&f?a.shiftKey||e!==f?a.shiftKey&&e===d&&(a.preventDefault(),c&&aX(f,{select:!0})):(a.preventDefault(),c&&aX(d,{select:!0})):e===b&&a.preventDefault()}},[c,d,o.paused]);return(0,j.jsx)(ax.div,{tabIndex:-1,...g,ref:n,onKeyDown:p})},"FocusScope"));function aR(a,{select:b=!1}={}){let c=document.activeElement;for(let d of a)if(aX(d,{select:b}),document.activeElement!==c)return}function aS(a){let b=aT(a);return[aU(b,a),aU(b.reverse(),a)]}function aT(a){let b=[],c=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:aM(a=>{let b="INPUT"===a.tagName&&"hidden"===a.type;return a.disabled||a.hidden||b?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;c.nextNode();)b.push(c.currentNode);return b}function aU(a,b){let c="function"==typeof b.checkVisibility&&b.checkVisibility({checkVisibilityCSS:!0});for(let d of a)if(!(c?!d.checkVisibility({checkVisibilityCSS:!0}):aV(d,{upTo:b})))return d}function aV(a,{upTo:b}){if("hidden"===getComputedStyle(a).visibility)return!0;for(;a&&(void 0===b||a!==b);){if("none"===getComputedStyle(a).display)return!0;a=a.parentElement}return!1}function aW(a){return a instanceof HTMLInputElement&&"select"in a}function aX(a,{select:b=!1}={}){if(a&&a.focus){let c=document.activeElement;a.focus({preventScroll:!0}),a!==c&&aW(a)&&b&&a.select()}}aM(aR,"focusFirst"),aM(aS,"getTabbableEdges"),aM(aT,"getTabbableCandidates"),aM(aU,"findVisible"),aM(aV,"isHidden"),aM(aW,"isSelectableInput"),aM(aX,"focus");var aY=aZ();function aZ(){let a=[];return{add(b){let c=a[0];b!==c&&c?.pause(),(a=a$(a,b)).unshift(b)},remove(b){a=a$(a,b),a[0]?.resume()}}}function a$(a,b){let c=[...a],d=c.indexOf(b);return -1!==d&&c.splice(d,1),c}function a_(a){return a.filter(a=>"A"!==a.tagName)}aM(aZ,"createFocusScopesStack"),aM(a$,"arrayRemove"),aM(a_,"removeLinks");var a0=Object.defineProperty,a1=w.forwardRef(a0(function(a,b){let{container:c,...d}=a,[e,f]=w.useState(!1);T(()=>f(!0),[]);let g=c||e&&globalThis?.document?.body;return g?ah.createPortal((0,j.jsx)(ax.div,{...d,ref:b}),g):null},"name",{value:"Portal",configurable:!0})),a2=Object.defineProperty,a3=(a,b)=>a2(a,"name",{value:b,configurable:!0});function a4(a,b){return w.useReducer((a,c)=>b[a][c]??a,a)}a3(a4,"useStateMachine");var a5=a3(a=>{let{present:b,children:c}=a,d=a6(b),e="function"==typeof c?c({present:d.isPresent}):w.Children.only(c),f=a8(d.ref,ba(e));return"function"==typeof c||d.isPresent?w.cloneElement(e,{ref:f}):null},"Presence");function a6(a){let[b,c]=w.useState(),d=w.useRef(null),e=w.useRef(a),f=w.useRef("none"),g=w.useRef(void 0),[h,i]=a4(a?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{"mounted"===h?(f.current=g.current??a9(d.current),g.current=void 0):f.current="none"},[h]),T(()=>{let b=d.current,c=e.current;if(c!==a){let d=f.current,h=a9(b);a?(g.current=h,i("MOUNT")):"none"===h||b?.display==="none"?i("UNMOUNT"):c&&d!==h?i("ANIMATION_OUT"):i("UNMOUNT"),e.current=a}},[a,i]),T(()=>{if(b){let a,c=b.ownerDocument.defaultView??window,g=a3(f=>{let g=a9(d.current).includes(CSS.escape(f.animationName));if(f.target===b&&g&&(i("ANIMATION_END"),!e.current)){let d=b.style.animationFillMode;b.style.animationFillMode="forwards",a=c.setTimeout(()=>{"forwards"===b.style.animationFillMode&&(b.style.animationFillMode=d)})}},"handleAnimationEnd"),h=a3(a=>{a.target===b&&(f.current=a9(d.current))},"handleAnimationStart");return b.addEventListener("animationstart",h),b.addEventListener("animationcancel",g),b.addEventListener("animationend",g),()=>{c.clearTimeout(a),b.removeEventListener("animationstart",h),b.removeEventListener("animationcancel",g),b.removeEventListener("animationend",g)}}i("ANIMATION_END")},[b,i]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:w.useCallback(a=>{if(a){let b=getComputedStyle(a);d.current=b,g.current=a9(b)}else d.current=null;c(a)},[])}}function a7(a,b){if("function"==typeof a)return a(b);null!=a&&(a.current=b)}function a8(...a){let b=w.useRef(a);return b.current=a,w.useCallback(a=>{let c=b.current,d=!1,e=c.map(b=>{let c=a7(b,a);return d||"function"!=typeof c||(d=!0),c});if(d)return()=>{for(let a=0;a<e.length;a++){let b=e[a];"function"==typeof b?b():a7(c[a],null)}}},[])}function a9(a){return a?.animationName||"none"}function ba(a){let b=Object.getOwnPropertyDescriptor(a.props,"ref")?.get,c=b&&"isReactWarning"in b&&b.isReactWarning;return c?a.ref:(c=(b=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in b&&b.isReactWarning)?a.props.ref:a.props.ref||a.ref}a3(a6,"usePresence"),a3(a7,"setRef"),a3(a8,"useStableComposedRefs"),a3(a9,"getAnimationName"),a3(ba,"getElementRef");var bb=Object.defineProperty,bc=(a,b)=>bb(a,"name",{value:b,configurable:!0}),bd=0,be=null;function bf(){w.useEffect(()=>{be||(be={start:bg(),end:bg()});let{start:a,end:b}=be;return document.body.firstElementChild!==a&&document.body.insertAdjacentElement("afterbegin",a),document.body.lastElementChild!==b&&document.body.insertAdjacentElement("beforeend",b),bd++,()=>{1===bd&&(be?.start.remove(),be?.end.remove(),be=null),bd=Math.max(0,bd-1)}},[])}function bg(){let a=document.createElement("span");return a.setAttribute("data-radix-focus-guard",""),a.tabIndex=0,a.style.outline="none",a.style.opacity="0",a.style.position="fixed",a.style.pointerEvents="none",a}bc(function(a){return bf(),a.children},"FocusGuards"),bc(bf,"useFocusGuards"),bc(bg,"createFocusGuard");var bh=function(){return(bh=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++)for(var e in b=arguments[c])Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e]);return a}).apply(this,arguments)};function bi(a,b){var c={};for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&0>b.indexOf(d)&&(c[d]=a[d]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols)for(var e=0,d=Object.getOwnPropertySymbols(a);e<d.length;e++)0>b.indexOf(d[e])&&Object.prototype.propertyIsEnumerable.call(a,d[e])&&(c[d[e]]=a[d[e]]);return c}var bj=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),bk="width-before-scroll-bar";function bl(a,b){return"function"==typeof a?a(b):a&&(a.current=b),a}var bm=w.useEffect,bn=new WeakMap,bo=(void 0===b&&(b={}),(void 0===c&&(c=function(a){return a}),d=[],e=!1,f={read:function(){if(e)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return d.length?d[d.length-1]:null},useMedium:function(a){var b=c(a,e);return d.push(b),function(){d=d.filter(function(a){return a!==b})}},assignSyncMedium:function(a){for(e=!0;d.length;){var b=d;d=[],b.forEach(a)}d={push:function(b){return a(b)},filter:function(){return d}}},assignMedium:function(a){e=!0;var b=[];if(d.length){var c=d;d=[],c.forEach(a),b=d}var f=function(){var c=b;b=[],c.forEach(a)},g=function(){return Promise.resolve().then(f)};g(),d={push:function(a){b.push(a),g()},filter:function(a){return b=b.filter(a),d}}}}).options=bh({async:!0,ssr:!1},b),f),bp=function(){},bq=w.forwardRef(function(a,b){var c,d,e,f,g=w.useRef(null),h=w.useState({onScrollCapture:bp,onWheelCapture:bp,onTouchMoveCapture:bp}),i=h[0],j=h[1],k=a.forwardProps,l=a.children,m=a.className,n=a.removeScrollBar,o=a.enabled,p=a.shards,q=a.sideCar,r=a.noRelative,s=a.noIsolation,t=a.inert,u=a.allowPinchZoom,v=a.as,x=a.gapMode,y=bi(a,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),z=(c=[g,b],d=function(a){return c.forEach(function(b){return bl(b,a)})},(e=(0,w.useState)(function(){return{value:null,callback:d,facade:{get current(){return e.value},set current(value){var a=e.value;a!==value&&(e.value=value,e.callback(value,a))}}}})[0]).callback=d,f=e.facade,bm(function(){var a=bn.get(f);if(a){var b=new Set(a),d=new Set(c),e=f.current;b.forEach(function(a){d.has(a)||bl(a,null)}),d.forEach(function(a){b.has(a)||bl(a,e)})}bn.set(f,c)},[c]),f),A=bh(bh({},y),i);return w.createElement(w.Fragment,null,o&&w.createElement(q,{sideCar:bo,removeScrollBar:n,shards:p,noRelative:r,noIsolation:s,inert:t,setCallbacks:j,allowPinchZoom:!!u,lockRef:g,gapMode:x}),k?w.cloneElement(w.Children.only(l),bh(bh({},A),{ref:z})):w.createElement(void 0===v?"div":v,bh({},A,{className:m,ref:z}),l))});bq.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},bq.classNames={fullWidth:bk,zeroRight:bj};var br=function(a){var b=a.sideCar,c=bi(a,["sideCar"]);if(!b)throw Error("Sidecar: please provide `sideCar` property to import the right car");var d=b.read();if(!d)throw Error("Sidecar medium not found");return w.createElement(d,bh({},c))};br.isSideCarExport=!0;var bs=function(){var a=0,b=null;return{add:function(c){if(0==a&&(b=function(){if(!document)return null;var a=document.createElement("style");a.type="text/css";var b=i||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return b&&a.setAttribute("nonce",b),a}())){var d,e;(d=b).styleSheet?d.styleSheet.cssText=c:d.appendChild(document.createTextNode(c)),e=b,(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}a++},remove:function(){--a||!b||(b.parentNode&&b.parentNode.removeChild(b),b=null)}}},bt=function(){var a=bs();return function(b,c){w.useEffect(function(){return a.add(b),function(){a.remove()}},[b&&c])}},bu=function(){var a=bt();return function(b){return a(b.styles,b.dynamic),null}},bv={left:0,top:0,right:0,gap:0},bw=bu(),bx="data-scroll-locked",by=function(a,b,c,d){var e=a.left,f=a.top,g=a.right,h=a.gap;return void 0===c&&(c="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(d,";\n padding-right: ").concat(h,"px ").concat(d,";\n }\n body[").concat(bx,"] {\n overflow: hidden ").concat(d,";\n overscroll-behavior: contain;\n ").concat([b&&"position: relative ".concat(d,";"),"margin"===c&&"\n padding-left: ".concat(e,"px;\n padding-top: ").concat(f,"px;\n padding-right: ").concat(g,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(h,"px ").concat(d,";\n "),"padding"===c&&"padding-right: ".concat(h,"px ").concat(d,";")].filter(Boolean).join(""),"\n }\n \n .").concat(bj," {\n right: ").concat(h,"px ").concat(d,";\n }\n \n .").concat(bk," {\n margin-right: ").concat(h,"px ").concat(d,";\n }\n \n .").concat(bj," .").concat(bj," {\n right: 0 ").concat(d,";\n }\n \n .").concat(bk," .").concat(bk," {\n margin-right: 0 ").concat(d,";\n }\n \n body[").concat(bx,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(h,"px;\n }\n")},bz=function(){var a=parseInt(document.body.getAttribute(bx)||"0",10);return isFinite(a)?a:0},bA=function(){w.useEffect(function(){return document.body.setAttribute(bx,(bz()+1).toString()),function(){var a=bz()-1;a<=0?document.body.removeAttribute(bx):document.body.setAttribute(bx,a.toString())}},[])},bB=function(a){var b=a.noRelative,c=a.noImportant,d=a.gapMode,e=void 0===d?"margin":d;bA();var f=w.useMemo(function(){return void 0===e,bv},[e]);return w.createElement(bw,{styles:by(f,!b,e,c?"":"!important")})},bC=function(a,b){if(!(a instanceof Element))return!1;var c=window.getComputedStyle(a);return"hidden"!==c[b]&&(c.overflowY!==c.overflowX||"TEXTAREA"===a.tagName||"visible"!==c[b])},bD=function(a,b){var c=b.ownerDocument,d=b;do{if("u">typeof ShadowRoot&&d instanceof ShadowRoot&&(d=d.host),bE(a,d)){var e=bF(a,d);if(e[1]>e[2])return!0}d=d.parentNode}while(d&&d!==c.body)return!1},bE=function(a,b){return"v"===a?bC(b,"overflowY"):bC(b,"overflowX")},bF=function(a,b){return"v"===a?[b.scrollTop,b.scrollHeight,b.clientHeight]:[b.scrollLeft,b.scrollWidth,b.clientWidth]},bG=function(a,b,c,d,e){var f,g=(f=window.getComputedStyle(b).direction,"h"===a&&"rtl"===f?-1:1),h=g*d,i=c.target,j=b.contains(i),k=!1,l=h>0,m=0,n=0;do{if(!i)break;var o=bF(a,i),p=o[0],q=o[1]-o[2]-g*p;(p||q)&&bE(a,i)&&(m+=q,n+=p);var r=i.parentNode;i=r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r.host:r}while(!j&&i!==document.body||j&&(b.contains(i)||b===i))return l&&(e&&1>Math.abs(m)||!e&&h>m)?k=!0:!l&&(e&&1>Math.abs(n)||!e&&-h>n)&&(k=!0),k},bH=function(a){return"changedTouches"in a?[a.changedTouches[0].clientX,a.changedTouches[0].clientY]:[0,0]},bI=function(a){return[a.deltaX,a.deltaY]},bJ=function(a){return a&&"current"in a?a.current:a},bK=0,bL=[];let bM=(g=function(a){var b=w.useRef([]),c=w.useRef([0,0]),d=w.useRef(),e=w.useState(bK++)[0],f=w.useState(bu)[0],g=w.useRef(a);w.useEffect(function(){g.current=a},[a]),w.useEffect(function(){if(a.inert){document.body.classList.add("block-interactivity-".concat(e));var b=(function(a,b,c){if(c||2==arguments.length)for(var d,e=0,f=b.length;e<f;e++)!d&&e in b||(d||(d=Array.prototype.slice.call(b,0,e)),d[e]=b[e]);return a.concat(d||Array.prototype.slice.call(b))})([a.lockRef.current],(a.shards||[]).map(bJ),!0).filter(Boolean);return b.forEach(function(a){return a.classList.add("allow-interactivity-".concat(e))}),function(){document.body.classList.remove("block-interactivity-".concat(e)),b.forEach(function(a){return a.classList.remove("allow-interactivity-".concat(e))})}}},[a.inert,a.lockRef.current,a.shards]);var h=w.useCallback(function(a,b){if("touches"in a&&2===a.touches.length||"wheel"===a.type&&a.ctrlKey)return!g.current.allowPinchZoom;var e,f=bH(a),h=c.current,i="deltaX"in a?a.deltaX:h[0]-f[0],j="deltaY"in a?a.deltaY:h[1]-f[1],k=a.target,l=Math.abs(i)>Math.abs(j)?"h":"v";if("touches"in a&&"h"===l&&"range"===k.type)return!1;var m=window.getSelection(),n=m&&m.anchorNode;if(n&&(n===k||n.contains(k)))return!1;var o=bD(l,k);if(!o)return!0;if(o?e=l:(e="v"===l?"h":"v",o=bD(l,k)),!o)return!1;if(!d.current&&"changedTouches"in a&&(i||j)&&(d.current=e),!e)return!0;var p=d.current||e;return bG(p,b,a,"h"===p?i:j,!0)},[]),i=w.useCallback(function(a){if(bL.length&&bL[bL.length-1]===f){var c="deltaY"in a?bI(a):bH(a),d=b.current.filter(function(b){var d;return b.name===a.type&&(b.target===a.target||a.target===b.shadowParent)&&(d=b.delta,d[0]===c[0]&&d[1]===c[1])})[0];if(d&&d.should){a.cancelable&&a.preventDefault();return}if(!d){var e=(g.current.shards||[]).map(bJ).filter(Boolean).filter(function(b){return b.contains(a.target)});(e.length>0?h(a,e[0]):!g.current.noIsolation)&&a.cancelable&&a.preventDefault()}}},[]),j=w.useCallback(function(a,c,d,e){var f={name:a,delta:c,target:d,should:e,shadowParent:function(a){for(var b=null;null!==a;)a instanceof ShadowRoot&&(b=a.host,a=a.host),a=a.parentNode;return b}(d)};b.current.push(f),setTimeout(function(){b.current=b.current.filter(function(a){return a!==f})},1)},[]),k=w.useCallback(function(a){c.current=bH(a),d.current=void 0},[]),l=w.useCallback(function(b){j(b.type,bI(b),b.target,h(b,a.lockRef.current))},[]),m=w.useCallback(function(b){j(b.type,bH(b),b.target,h(b,a.lockRef.current))},[]);w.useEffect(function(){return bL.push(f),a.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:m}),document.addEventListener("wheel",i,!1),document.addEventListener("touchmove",i,!1),document.addEventListener("touchstart",k,!1),function(){bL=bL.filter(function(a){return a!==f}),document.removeEventListener("wheel",i,!1),document.removeEventListener("touchmove",i,!1),document.removeEventListener("touchstart",k,!1)}},[]);var n=a.removeScrollBar,o=a.inert;return w.createElement(w.Fragment,null,o?w.createElement(f,{styles:"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")}):null,n?w.createElement(bB,{noRelative:a.noRelative,gapMode:a.gapMode}):null)},bo.useMedium(g),br);var bN=w.forwardRef(function(a,b){return w.createElement(bq,bh({},a,{ref:b,sideCar:bM}))});bN.classNames=bq.classNames;var bO=new WeakMap,bP=new WeakMap,bQ={},bR=0,bS=function(a){return a&&(a.host||bS(a.parentNode))},bT=function(a,b,c,d){var e=(Array.isArray(a)?a:[a]).map(function(a){if(b.contains(a))return a;var c=bS(a);return c&&b.contains(c)?c:(console.error("aria-hidden",a,"in not contained inside",b,". Doing nothing"),null)}).filter(function(a){return!!a});bQ[c]||(bQ[c]=new WeakMap);var f=bQ[c],g=[],h=new Set,i=new Set(e),j=function(a){!a||h.has(a)||(h.add(a),j(a.parentNode))};e.forEach(j);var k=function(a){!a||i.has(a)||Array.prototype.forEach.call(a.children,function(a){if(h.has(a))k(a);else try{var b=a.getAttribute(d),e=null!==b&&"false"!==b,i=(bO.get(a)||0)+1,j=(f.get(a)||0)+1;bO.set(a,i),f.set(a,j),g.push(a),1===i&&e&&bP.set(a,!0),1===j&&a.setAttribute(c,"true"),e||a.setAttribute(d,"true")}catch(b){console.error("aria-hidden: cannot operate on ",a,b)}})};return k(b),h.clear(),bR++,function(){g.forEach(function(a){var b=bO.get(a)-1,e=f.get(a)-1;bO.set(a,b),f.set(a,e),b||(bP.has(a)||a.removeAttribute(d),bP.delete(a)),e||a.removeAttribute(c)}),--bR||(bO=new WeakMap,bO=new WeakMap,bP=new WeakMap,bQ={})}},bU=function(a,b,c){void 0===c&&(c="data-aria-hidden");var d=Array.from(Array.isArray(a)?a:[a]),e=b||("u"<typeof document?null:(Array.isArray(a)?a[0]:a).ownerDocument.body);return e?(d.push.apply(d,Array.from(e.querySelectorAll("[aria-live], script"))),bT(d,e,c,"aria-hidden")):function(){return null}},bV=Object.defineProperty,bW=(a,b)=>bV(a,"name",{value:b,configurable:!0}),bX="Dialog",[bY,bZ]=R(bX),[b$,b_]=bY(bX),b0=bW(a=>{let{__scopeDialog:b,children:c,open:d,defaultOpen:e,onOpenChange:f,modal:g=!0}=a,h=w.useRef(null),i=w.useRef(null),[k,l]=ad({prop:d,defaultProp:e??!1,onChange:f,caller:bX}),[m,n]=w.useState(0),[o,p]=w.useState(0);return(0,j.jsx)(b$,{scope:b,triggerRef:h,contentRef:i,contentId:X(),titleId:X(),descriptionId:X(),titlePresent:m>0,descriptionPresent:o>0,setTitleCount:n,setDescriptionCount:p,open:k,onOpenChange:l,onOpenToggle:w.useCallback(()=>l(a=>!a),[l]),modal:g,children:c})},"Dialog"),b1="DialogPortal",[b2,b3]=bY(b1,{forceMount:void 0}),b4=bW(a=>{let{__scopeDialog:b,forceMount:c,children:d,container:e}=a,f=b_(b1,b);return(0,j.jsx)(b2,{scope:b,forceMount:c,children:w.Children.map(d,a=>(0,j.jsx)(a5,{present:c||f.open,children:(0,j.jsx)(a1,{asChild:!0,container:e,children:a})}))})},"DialogPortal"),b5="DialogOverlay",b6=w.forwardRef(bW(function(a,b){let c=b3(b5,a.__scopeDialog),{forceMount:d=c.forceMount,...e}=a,f=b_(b5,a.__scopeDialog);return f.modal?(0,j.jsx)(a5,{present:d||f.open,children:(0,j.jsx)(b8,{...e,ref:b})}):null},"DialogOverlay")),b7=ak("DialogOverlay.RemoveScroll"),b8=w.forwardRef(bW(function(a,b){let{__scopeDialog:c,...d}=a,e=b_(b5,c),f=O(b,aF());return(0,j.jsx)(bN,{as:b7,allowPinchZoom:!0,shards:[e.contentRef],children:(0,j.jsx)(ax.div,{"data-state":ce(e.open),...d,ref:f,style:{pointerEvents:"auto",...d.style}})})},"DialogOverlayImpl")),b9="DialogContent",ca=w.forwardRef(bW(function(a,b){let c=b3(b9,a.__scopeDialog),{forceMount:d=c.forceMount,...e}=a,f=b_(b9,a.__scopeDialog);return(0,j.jsx)(a5,{present:d||f.open,children:f.modal?(0,j.jsx)(cb,{...e,ref:b}):(0,j.jsx)(cc,{...e,ref:b})})},"DialogContent")),cb=w.forwardRef(bW(function(a,b){let c=b_(b9,a.__scopeDialog),d=w.useRef(null),e=O(b,c.contentRef,d);return w.useEffect(()=>{let a=d.current;if(a)return bU(a)},[]),(0,j.jsx)(cd,{...a,ref:e,trapFocus:c.open,disableOutsidePointerEvents:c.open,onCloseAutoFocus:H(a.onCloseAutoFocus,a=>{a.preventDefault(),c.triggerRef.current?.focus()}),onPointerDownOutside:H(a.onPointerDownOutside,a=>{let b=a.detail.originalEvent,c=0===b.button&&!0===b.ctrlKey;(2===b.button||c)&&a.preventDefault()}),onFocusOutside:H(a.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),cc=w.forwardRef(bW(function(a,b){let c=b_(b9,a.__scopeDialog),d=w.useRef(!1),e=w.useRef(!1);return(0,j.jsx)(cd,{...a,ref:b,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:b=>{a.onCloseAutoFocus?.(b),b.defaultPrevented||(d.current||c.triggerRef.current?.focus(),b.preventDefault()),d.current=!1,e.current=!1},onInteractOutside:b=>{a.onInteractOutside?.(b),b.defaultPrevented||(d.current=!0,"pointerdown"===b.detail.originalEvent.type&&(e.current=!0));let f=b.target;c.triggerRef.current?.contains(f)&&b.preventDefault(),"focusin"===b.detail.originalEvent.type&&e.current&&b.preventDefault()}})},"DialogContentNonModal")),cd=w.forwardRef(bW(function(a,b){let{__scopeDialog:c,trapFocus:d,onOpenAutoFocus:e,onCloseAutoFocus:f,...g}=a,h=b_(b9,c);return bf(),(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(aQ,{asChild:!0,loop:!0,trapped:d,onMountAutoFocus:e,onUnmountAutoFocus:f,children:(0,j.jsx)(aE,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionPresent?h.descriptionId:void 0,"aria-labelledby":h.titlePresent?h.titleId:void 0,"data-state":ce(h.open),...g,ref:b,deferPointerDownOutside:!0,onDismiss:()=>h.onOpenChange(!1)})})})},"DialogContentImpl"));function ce(a){return a?"open":"closed"}bW(ce,"getState");var cf='[cmdk-group=""]',cg='[cmdk-group-items=""]',ch='[cmdk-item=""]',ci=`${ch}:not([aria-disabled="true"])`,cj="cmdk-item-select",ck="data-value",cl=(a,b,c)=>{var d;return d=a,function a(b,c,d,e,f,g,h){if(g===c.length)return f===b.length?1:.99;var i=`${f},${g}`;if(void 0!==h[i])return h[i];for(var j,k,l,m,n=e.charAt(g),o=d.indexOf(n,f),p=0;o>=0;)(j=a(b,c,d,e,o+1,g+1,h))>p&&(o===f?j*=1:A.test(b.charAt(o-1))?(j*=.8,(l=b.slice(f,o-1).match(B))&&f>0&&(j*=Math.pow(.999,l.length))):C.test(b.charAt(o-1))?(j*=.9,(m=b.slice(f,o-1).match(D))&&f>0&&(j*=Math.pow(.999,m.length))):(j*=.17,f>0&&(j*=Math.pow(.999,o-f))),b.charAt(o)!==c.charAt(g)&&(j*=.9999)),(j<.1&&d.charAt(o-1)===e.charAt(g+1)||e.charAt(g+1)===e.charAt(g)&&d.charAt(o-1)!==e.charAt(g))&&.1*(k=a(b,c,d,e,o+1,g+2,h))>j&&(j=.1*k),j>p&&(p=j),o=d.indexOf(n,o+1);return h[i]=p,p}(d=c&&c.length>0?`${d+" "+c.join(" ")}`:d,b,E(d),E(b),0,0,{})},cm=w.createContext(void 0),cn=w.createContext(void 0),co=w.createContext(void 0),cp=w.forwardRef((a,b)=>{let c=cz(()=>{var b,c;return{search:"",value:null!=(c=null!=(b=a.value)?b:a.defaultValue)?c:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),d=cz(()=>new Set),e=cz(()=>new Map),f=cz(()=>new Map),g=cz(()=>new Set),h=cx(a),{label:i,children:j,value:k,onValueChange:l,filter:m,shouldFilter:n,loop:o,disablePointerSelection:p=!1,vimBindings:q=!0,...r}=a,s=X(),t=X(),u=X(),v=w.useRef(null),x=cC();cy(()=>{if(void 0!==k){let a=k.trim();c.current.value=a,y.emit()}},[k]),cy(()=>{x(6,E)},[]);let y=w.useMemo(()=>({subscribe:a=>(g.current.add(a),()=>g.current.delete(a)),snapshot:()=>c.current,setState:(a,b,d)=>{var e,f,g,i;if(!Object.is(c.current[a],b)){if(c.current[a]=b,"search"===a)D(),B(),x(1,C);else if("value"===a){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let a=document.getElementById(u);a?a.focus():null==(e=document.getElementById(s))||e.focus()}if(x(7,()=>{var a;c.current.selectedItemId=null==(a=F())?void 0:a.id,y.emit()}),d||x(5,E),(null==(f=h.current)?void 0:f.value)!==void 0){null==(i=(g=h.current).onValueChange)||i.call(g,null!=b?b:"");return}}y.emit()}},emit:()=>{g.current.forEach(a=>a())}}),[]),z=w.useMemo(()=>({value:(a,b,d)=>{var e;b!==(null==(e=f.current.get(a))?void 0:e.value)&&(f.current.set(a,{value:b,keywords:d}),c.current.filtered.items.set(a,A(b,d)),x(2,()=>{B(),y.emit()}))},item:(a,b)=>(d.current.add(a),b&&(e.current.has(b)?e.current.get(b).add(a):e.current.set(b,new Set([a]))),x(3,()=>{D(),B(),c.current.value||C(),y.emit()}),()=>{f.current.delete(a),d.current.delete(a),c.current.filtered.items.delete(a);let b=F();x(4,()=>{D(),(null==b?void 0:b.getAttribute("id"))===a&&C(),y.emit()})}),group:a=>(e.current.has(a)||e.current.set(a,new Set),()=>{f.current.delete(a),e.current.delete(a)}),filter:()=>h.current.shouldFilter,label:i||a["aria-label"],getDisablePointerSelection:()=>h.current.disablePointerSelection,listId:s,inputId:u,labelId:t,listInnerRef:v}),[]);function A(a,b){var d,e;let f=null!=(e=null==(d=h.current)?void 0:d.filter)?e:cl;return a?f(a,c.current.search,b):0}function B(){if(!c.current.search||!1===h.current.shouldFilter)return;let a=c.current.filtered.items,b=[];c.current.filtered.groups.forEach(c=>{let d=e.current.get(c),f=0;d.forEach(b=>{f=Math.max(a.get(b),f)}),b.push([c,f])});let d=v.current;G().sort((b,c)=>{var d,e;let f=b.getAttribute("id"),g=c.getAttribute("id");return(null!=(d=a.get(g))?d:0)-(null!=(e=a.get(f))?e:0)}).forEach(a=>{let b=a.closest(cg);b?b.appendChild(a.parentElement===b?a:a.closest(`${cg} > *`)):d.appendChild(a.parentElement===d?a:a.closest(`${cg} > *`))}),b.sort((a,b)=>b[1]-a[1]).forEach(a=>{var b;let c=null==(b=v.current)?void 0:b.querySelector(`${cf}[${ck}="${encodeURIComponent(a[0])}"]`);null==c||c.parentElement.appendChild(c)})}function C(){let a=G().find(a=>"true"!==a.getAttribute("aria-disabled")),b=null==a?void 0:a.getAttribute(ck);y.setState("value",b||void 0)}function D(){var a,b,g,i;if(!c.current.search||!1===h.current.shouldFilter){c.current.filtered.count=d.current.size;return}c.current.filtered.groups=new Set;let j=0;for(let e of d.current){let d=A(null!=(b=null==(a=f.current.get(e))?void 0:a.value)?b:"",null!=(i=null==(g=f.current.get(e))?void 0:g.keywords)?i:[]);c.current.filtered.items.set(e,d),d>0&&j++}for(let[a,b]of e.current)for(let d of b)if(c.current.filtered.items.get(d)>0){c.current.filtered.groups.add(a);break}c.current.filtered.count=j}function E(){var a,b,c;let d=F();d&&((null==(a=d.parentElement)?void 0:a.firstChild)===d&&(null==(c=null==(b=d.closest(cf))?void 0:b.querySelector('[cmdk-group-heading=""]'))||c.scrollIntoView({block:"nearest"})),d.scrollIntoView({block:"nearest"}))}function F(){var a;return null==(a=v.current)?void 0:a.querySelector(`${ch}[aria-selected="true"]`)}function G(){var a;return Array.from((null==(a=v.current)?void 0:a.querySelectorAll(ci))||[])}function H(a){let b=G()[a];b&&y.setState("value",b.getAttribute(ck))}function I(a){var b;let c=F(),d=G(),e=d.findIndex(a=>a===c),f=d[e+a];null!=(b=h.current)&&b.loop&&(f=e+a<0?d[d.length-1]:e+a===d.length?d[0]:d[e+a]),f&&y.setState("value",f.getAttribute(ck))}function J(a){let b=F(),c=null==b?void 0:b.closest(cf),d;for(;c&&!d;)d=null==(c=a>0?function(a,b){let c=a.nextElementSibling;for(;c;){if(c.matches(b))return c;c=c.nextElementSibling}}(c,cf):function(a,b){let c=a.previousElementSibling;for(;c;){if(c.matches(b))return c;c=c.previousElementSibling}}(c,cf))?void 0:c.querySelector(ci);d?y.setState("value",d.getAttribute(ck)):I(a)}let K=()=>H(G().length-1),L=a=>{a.preventDefault(),a.metaKey?K():a.altKey?J(1):I(1)},M=a=>{a.preventDefault(),a.metaKey?H(0):a.altKey?J(-1):I(-1)};return w.createElement(ax.div,{ref:b,tabIndex:-1,...r,"cmdk-root":"",onKeyDown:a=>{var b;null==(b=r.onKeyDown)||b.call(r,a);let c=a.nativeEvent.isComposing||229===a.keyCode;if(!(a.defaultPrevented||c))switch(a.key){case"n":case"j":q&&a.ctrlKey&&L(a);break;case"ArrowDown":L(a);break;case"p":case"k":q&&a.ctrlKey&&M(a);break;case"ArrowUp":M(a);break;case"Home":a.preventDefault(),H(0);break;case"End":a.preventDefault(),K();break;case"Enter":{a.preventDefault();let b=F();if(b){let a=new Event(cj);b.dispatchEvent(a)}}}}},w.createElement("label",{"cmdk-label":"",htmlFor:z.inputId,id:z.labelId,style:cE},i),cD(a,a=>w.createElement(cn.Provider,{value:y},w.createElement(cm.Provider,{value:z},a))))}),cq=w.forwardRef((a,b)=>{var c,d;let e=X(),f=w.useRef(null),g=w.useContext(co),h=w.useContext(cm),i=cx(a),j=null!=(d=null==(c=i.current)?void 0:c.forceMount)?d:null==g?void 0:g.forceMount;cy(()=>{if(!j)return h.item(e,null==g?void 0:g.id)},[j]);let k=cB(e,f,[a.value,a.children,f],a.keywords),l=w.useContext(cn),m=cA(a=>a.value&&a.value===k.current),n=cA(a=>!!j||!1===h.filter()||!a.search||a.filtered.items.get(e)>0);function o(){var a,b;p(),null==(b=(a=i.current).onSelect)||b.call(a,k.current)}function p(){l.setState("value",k.current,!0)}if(w.useEffect(()=>{let b=f.current;if(!(!b||a.disabled))return b.addEventListener(cj,o),()=>b.removeEventListener(cj,o)},[n,a.onSelect,a.disabled]),!n)return null;let{disabled:q,value:r,onSelect:s,forceMount:t,keywords:u,...v}=a;return w.createElement(ax.div,{ref:N(f,b),...v,id:e,"cmdk-item":"",role:"option","aria-disabled":!!q,"aria-selected":!!m,"data-disabled":!!q,"data-selected":!!m,onPointerMove:q||h.getDisablePointerSelection()?void 0:p,onClick:q?void 0:o},a.children)}),cr=w.forwardRef((a,b)=>{let{heading:c,children:d,forceMount:e,...f}=a,g=X(),h=w.useRef(null),i=w.useRef(null),j=X(),k=w.useContext(cm),l=cA(a=>!!e||!1===k.filter()||!a.search||a.filtered.groups.has(g));cy(()=>k.group(g),[]),cB(g,h,[a.value,a.heading,i]);let m=w.useMemo(()=>({id:g,forceMount:e}),[e]);return w.createElement(ax.div,{ref:N(h,b),...f,"cmdk-group":"",role:"presentation",hidden:!l||void 0},c&&w.createElement("div",{ref:i,"cmdk-group-heading":"","aria-hidden":!0,id:j},c),cD(a,a=>w.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":c?j:void 0},w.createElement(co.Provider,{value:m},a))))}),cs=w.forwardRef((a,b)=>{let{alwaysRender:c,...d}=a,e=w.useRef(null),f=cA(a=>!a.search);return c||f?w.createElement(ax.div,{ref:N(e,b),...d,"cmdk-separator":"",role:"separator"}):null}),ct=w.forwardRef((a,b)=>{let{onValueChange:c,...d}=a,e=null!=a.value,f=w.useContext(cn),g=cA(a=>a.search),h=cA(a=>a.selectedItemId),i=w.useContext(cm);return w.useEffect(()=>{null!=a.value&&f.setState("search",a.value)},[a.value]),w.createElement(ax.input,{ref:b,...d,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":i.listId,"aria-labelledby":i.labelId,"aria-activedescendant":h,id:i.inputId,type:"text",value:e?a.value:g,onChange:a=>{e||f.setState("search",a.target.value),null==c||c(a.target.value)}})}),cu=w.forwardRef((a,b)=>{let{children:c,label:d="Suggestions",...e}=a,f=w.useRef(null),g=w.useRef(null),h=cA(a=>a.selectedItemId),i=w.useContext(cm);return w.useEffect(()=>{if(g.current&&f.current){let a=g.current,b=f.current,c,d=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let c=a.offsetHeight;b.style.setProperty("--cmdk-list-height",c.toFixed(1)+"px")})});return d.observe(a),()=>{cancelAnimationFrame(c),d.unobserve(a)}}},[]),w.createElement(ax.div,{ref:N(f,b),...e,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":h,"aria-label":d,id:i.listId},cD(a,a=>w.createElement("div",{ref:N(g,i.listInnerRef),"cmdk-list-sizer":""},a)))}),cv=w.forwardRef((a,b)=>{let{open:c,onOpenChange:d,overlayClassName:e,contentClassName:f,container:g,...h}=a;return w.createElement(b0,{open:c,onOpenChange:d},w.createElement(b4,{container:g},w.createElement(b6,{"cmdk-overlay":"",className:e}),w.createElement(ca,{"aria-label":a.label,"cmdk-dialog":"",className:f},w.createElement(cp,{ref:b,...h}))))}),cw=Object.assign(cp,{List:cu,Item:cq,Input:ct,Group:cr,Separator:cs,Dialog:cv,Empty:w.forwardRef((a,b)=>cA(a=>0===a.filtered.count)?w.createElement(ax.div,{ref:b,...a,"cmdk-empty":"",role:"presentation"}):null),Loading:w.forwardRef((a,b)=>{let{progress:c,children:d,label:e="Loading...",...f}=a;return w.createElement(ax.div,{ref:b,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":100,"aria-label":e},cD(a,a=>w.createElement("div",{"aria-hidden":!0},a)))})});function cx(a){let b=w.useRef(a);return cy(()=>{b.current=a}),b}var cy=w.useEffect;function cz(a){let b=w.useRef();return void 0===b.current&&(b.current=a()),b}function cA(a){let b=w.useContext(cn),c=()=>a(b.snapshot());return w.useSyncExternalStore(b.subscribe,c,c)}function cB(a,b,c,d=[]){let e=w.useRef(),f=w.useContext(cm);return cy(()=>{var g;let h=(()=>{var a;for(let b of c){if("string"==typeof b)return b.trim();if("object"==typeof b&&"current"in b)return b.current?null==(a=b.current.textContent)?void 0:a.trim():e.current}})(),i=d.map(a=>a.trim());f.value(a,h,i),null==(g=b.current)||g.setAttribute(ck,h),e.current=h}),e}var cC=()=>{let[a,b]=w.useState(),c=cz(()=>new Map);return cy(()=>{c.current.forEach(a=>a()),c.current=new Map},[a]),(a,d)=>{c.current.set(a,d),b({})}};function cD({asChild:a,children:b},c){let d;return a&&w.isValidElement(b)?w.cloneElement("function"==typeof(d=b.type)?d(b.props):"render"in d?d.render(b.props):b,{ref:b.ref},c(b.props.children)):c(b)}var cE={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},cF=a.i(763802),cG=a.i(645766),cG=cG;a.i(965733);var cH=a.i(400187),cI=a.i(205522),cJ=a.i(546893),cK=a.i(497895);function cL({className:a,...b}){return(0,j.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,cK.cn)("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",a),...b})}let cM=(0,cH.cva)("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function cN({className:a,align:b="inline-start",...c}){return(0,j.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":b,className:(0,cK.cn)(cM({align:b}),a),onClick:a=>{a.target.closest("button")||a.currentTarget.parentElement?.querySelector("input")?.focus()},...c})}function cO({className:a,...b}){return(0,j.jsx)("span",{className:(0,cK.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",a),...b})}function cP({className:a,...b}){return(0,j.jsx)(cI.Input,{"data-slot":"input-group-control",className:(0,cK.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",a),...b})}function cQ({className:a,...b}){return(0,j.jsx)(cw,{"data-slot":"command",className:(0,cK.cn)("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",a),...b})}function cR({className:a,...b}){return(0,j.jsx)("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:(0,j.jsxs)(cL,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[(0,j.jsx)(cw.Input,{"data-slot":"command-input",className:(0,cK.cn)("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",a),...b}),(0,j.jsx)(cN,{children:(0,j.jsx)(cG.default,{className:"size-4 shrink-0 opacity-50"})})]})})}function cS({className:a,...b}){return(0,j.jsx)(cw.List,{"data-slot":"command-list",className:(0,cK.cn)("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",a),...b})}function cT({className:a,...b}){return(0,j.jsx)(cw.Empty,{"data-slot":"command-empty",className:(0,cK.cn)("py-6 text-center text-sm",a),...b})}function cU({className:a,...b}){return(0,j.jsx)(cw.Group,{"data-slot":"command-group",className:(0,cK.cn)("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",a),...b})}function cV({className:a,children:b,...c}){return(0,j.jsxs)(cw.Item,{"data-slot":"command-item",className:(0,cK.cn)("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",a),...c,children:[b,(0,j.jsx)(cF.CheckIcon,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}(0,cH.cva)("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});var cW=a.i(446181),cX=a.i(545097),cY=a.i(950463),cZ=a.i(280281),c$=a.i(654816),c_=a.i(287702),c0=a.i(908531),c1=a.i(608902),c2=a.i(61876),c3=a.i(405050);let c4=(0,c3.createServerReference)("7f00d0f742ce9e1cee6e5038c5f7d01566705ac97d",c3.callServer,void 0,c3.findSourceMapURL,"clearOwnLineAction"),c5=(0,c3.createServerReference)("7fdc40a784fce610e85b46d31f939106467056a2c7",c3.callServer,void 0,c3.findSourceMapURL,"createBotAction");var c6=a.i(714077);let c7=(0,c3.createServerReference)("7f947d1079225bacf815aa8b51841ac5e4aa38bff2",c3.callServer,void 0,c3.findSourceMapURL,"deleteBotAction"),c8=(0,c3.createServerReference)("7f07a4a93b86de3f132488a7dd12a9d3bbdcbd368b",c3.callServer,void 0,c3.findSourceMapURL,"setBotMemoryOnAction"),c9=(0,c3.createServerReference)("7f328fc40d9e1103d5fd5e05630f650df80d74c740",c3.callServer,void 0,c3.findSourceMapURL,"updateBotAction");var da=a.i(411509),db=a.i(398026),dc=a.i(913834),dd=a.i(704974),de=a.i(324835);function df({color:a,themePicked:b,onTheme:c,onPick:d,paint:e,onPaint:f}){return(0,j.jsxs)("div",{className:"flex w-full items-center justify-center gap-1.5 px-2",children:[(0,j.jsx)(dd.Swatch,{color:null,picked:b,onPick:c}),de.MARK_PALETTE.map(b=>(0,j.jsx)(dd.Swatch,{color:b,picked:a===b,onPick:()=>d(b)},b)),f&&de.MARK_PAINT_IDS.map(a=>(0,j.jsx)(dd.Swatch,{color:null,background:(0,de.paintSwatch)(a),label:de.MARK_PAINTS[a].label,picked:e===a,onPick:()=>f(a)},a))]})}var dg=a.i(478978),dh=a.i(619477),di=a.i(28996),dj=a.i(369768),dk=a.i(559553),dl=a.i(229395),dm=a.i(391749),dn=a.i(30681),dp=a.i(199169),dq=a.i(313237),dr=a.i(759497);let ds=" new";function dt({bot:a,job:b,active:c,onPick:d}){var e,f,g;let h=(e=b,f=a.lastJobAt,g=a.disabled,e?.status==="waiting"?{text:"waiting on you",shine:!0,amber:!0}:e?.status==="running"?{text:`working \xb7 ${e.label}`,shine:!0}:g?{text:"off"}:e?{text:`idle \xb7 last job ${du(e.updatedAt)}`}:f?{text:`idle \xb7 last job ${du(f)}`}:{text:"idle · no jobs yet"});return(0,j.jsxs)("button",{type:"button",onClick:d,className:(0,cK.cn)("mx-2 flex items-center gap-2.5 rounded-md px-2 py-2 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",c?dh.PICKED_ROW:"hover:bg-muted/60"),children:[(0,j.jsx)(dc.BotMark,{size:32,...dB(a.name,a.icon),state:b?.status==="running"?"thinking":"idle",notify:b?.status==="waiting",crossed:b?.status==="cancelled",className:(0,cK.cn)("shrink-0",a.disabled&&"opacity-45")}),(0,j.jsxs)("span",{className:(0,cK.cn)("min-w-0 flex-1 space-y-0.5",a.disabled&&"opacity-45"),children:[(0,j.jsx)("span",{className:(0,cK.cn)("block truncate text-[13px]",c?"font-medium":"text-foreground/90"),children:a.name}),h.shine?(0,j.jsx)(cX.ShinyText,{text:h.text,tone:h.amber?"waiting":"muted",className:"block truncate font-mono text-[11px] leading-4"}):(0,j.jsx)("span",{className:"block truncate font-mono text-[11px] leading-4 text-muted-foreground",children:h.text})]})]})}function du(a){let b=(0,dp.shortAgo)(a);return"now"===b?"just now":`${b} ago`}function dv(a,b){let c=Math.max(0,c_.BOT_ROSTER.max-a.size),[d,e]=(0,w.useState)(()=>new Set(db.BOT_SEEDS.filter(b=>!a.has(b.name)).slice(c).map(a=>a.name))),[f,g]=(0,dq.useServerAction)(c6.createSeedBotsAction,{onOk:a=>{(0,dr.revalidate)(y.queryKey.bot),b(a.created[0]??null)}}),{data:h}=(0,dr.useServerRoute)(y.queryKey.config),{data:i}=(0,dr.useServerRoute)(y.queryKey.llmModel),j=i?.find(a=>a.signIn),k=j?.hasKey?{plan:j.plan??null}:null,l=db.BOT_SEEDS.filter(b=>!a.has(b.name)),m=l.filter(a=>!d.has(a.name)),n=c<l.length,o=m.length>=c,p=`${c} more ${1===c?"fits":"fit"}`;return{isSet:a=>(0,dg.isConfigSet)(h,a),signIn:k,adding:g,addable:l,wanted:m,limited:n,note:n?o?`${p} \xb7 untick one to pick another`:`${m.length} ticked \xb7 ${p}`:0===m.length?"nothing ticked":`${m.length} of ${l.length} ticked`,ticked:b=>a.has(b.name)||!d.has(b.name),blocked:b=>!a.has(b.name)&&d.has(b.name)&&o,toggle:a=>e(b=>{let c=new Set(b);return c.has(a)?o||c.delete(a):c.add(a),c}),submit:()=>f(m.map(a=>({name:a.name})))}}function dw({have:a,picks:b}){return(0,j.jsx)("div",{className:"flex flex-col gap-2",children:db.BOT_SEEDS.map(c=>{var d,e;let f,g=a.has(c.name),h=b.ticked(c),i=b.blocked(c),l=(d=b.isSet,e=b.signIn,(f=(c.requires??[]).filter(a=>!d(dg.MEDIA_MODEL_KEYS[a])&&!(0,c2.planMediaOf)(a,e))).length?`needs ${f.map(dg.mediaModelWords).join(" and ")}`:null);return(0,j.jsx)("div",{className:(0,cK.cn)("rounded-xl ring-1 transition-colors",g||i?"opacity-45 ring-border/60":h?(0,cK.cn)(dh.PICKED_ROW,"ring-brand"):"ring-border/60"),children:(0,j.jsxs)("button",{type:"button",disabled:g||i||b.adding,"aria-pressed":h,onClick:()=>b.toggle(c.name),className:"flex w-full items-center gap-3 rounded-xl px-3.5 py-2.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default",children:[(0,j.jsx)(dc.BotMark,{size:28,...dB(c.name,c.icon),className:(0,cK.cn)("shrink-0 transition-opacity",!h&&"opacity-35")}),(0,j.jsxs)("span",{className:"min-w-0 flex-1 space-y-px",children:[(0,j.jsx)("span",{className:"block text-[14px] leading-[18px] font-medium",children:c.name}),(0,j.jsx)("span",{className:"block truncate text-[12px] leading-[17px] text-muted-foreground",children:c.hint})]}),g?(0,j.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:"already added"}):l?(0,j.jsxs)("span",{className:(0,cK.cn)("flex shrink-0 items-center gap-1.5 font-mono text-[11px]",cK.WAITING_INK),children:[(0,j.jsx)(o,{className:"size-3"}),l]}):null,(0,j.jsx)("span",{className:(0,cK.cn)("grid size-5 shrink-0 place-items-center rounded-full transition-colors",h?"bg-brand text-brand-foreground":"ring-1 ring-border/60 ring-inset"),children:h&&(0,j.jsx)(k.Check,{className:"size-3"})})]})},c.name)})})}function dx({picks:a,onCancel:b}){return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(z.Button,{variant:"ghost",onClick:b,children:"Cancel"}),(0,j.jsxs)(z.Button,{loading:a.adding,disabled:0===a.wanted.length,onClick:a.submit,children:[(0,j.jsx)(s.Plus,{}),1===a.wanted.length?`Add ${a.wanted[0].name}`:`Add ${a.wanted.length} bots`]})]})}function dy({have:a,onDone:b}){let c=dv(a,b);return(0,j.jsxs)("div",{className:"flex min-h-full flex-col",children:[(0,j.jsx)("div",{className:"flex h-11 shrink-0 items-center border-b border-border/60 px-4 font-mono text-[11px] text-muted-foreground",children:"Ready-made"}),(0,j.jsxs)("div",{className:"px-8 pt-7 pb-1",children:[(0,j.jsx)("h3",{className:"text-[17px] font-medium tracking-tight",children:"Bots you can add"}),(0,j.jsx)("p",{className:"mt-1.5 max-w-lg text-[13px] leading-relaxed text-muted-foreground break-keep wrap-anywhere",children:"Each one is a starting point — re-prompt it, give it a model of its own. What a bot needs before it can work stands on its row; until then it runs on the app default model."})]}),(0,j.jsx)("div",{className:"px-8 pt-4 pb-8",children:(0,j.jsx)(dw,{have:a,picks:c})}),(0,j.jsxs)("div",{className:"mt-auto flex items-center gap-3 border-t border-border/60 px-8 py-4",children:[(0,j.jsx)("span",{className:"flex-1 font-mono text-[11px] text-muted-foreground",children:c.note}),(0,j.jsx)(dx,{picks:c,onCancel:()=>b(null)})]})]})}function dz({have:a,onDone:b}){let c=dv(a,b);return(0,j.jsx)(dh.SettingDialogContent,{title:"Bots you can add",description:"Each one is a starting point — re-prompt it, give it a model of its own. What a bot needs before it can work stands on its row.",footer:(0,j.jsxs)(j.Fragment,{children:[c.limited&&(0,j.jsx)("span",{className:"flex-1 self-center font-mono text-[11px] text-muted-foreground",children:c.note}),(0,j.jsx)(dx,{picks:c,onCancel:()=>b(null)})]}),children:(0,j.jsx)(dw,{have:a,picks:c})})}function dA({missing:a,have:b,onDone:c}){let d=a.slice(0,3),e=a.length-d.length;return(0,j.jsxs)("button",{type:"button",title:"Ready-made bots","aria-label":`Ready-made bots, ${a.length} on offer`,onClick:()=>cW.notify.component({className:"sm:max-w-xl",renderer:({close:a})=>(0,j.jsx)(dz,{have:b,onDone:b=>{a(),c(b)}})}),className:"flex shrink-0 items-center gap-1 rounded-md px-1.5 py-1 text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,j.jsx)(s.Plus,{className:"size-3 shrink-0"}),d.map((a,b)=>(0,j.jsx)("span",{className:(0,cK.cn)("block",b>0&&"-ml-1.5"),style:{zIndex:d.length-b},children:(0,j.jsx)(dc.BotMark,{size:20,...dB(a.name,a.icon),notify:!1})},a.name)),e>0&&(0,j.jsxs)("span",{className:"ml-0.5 shrink-0 font-mono text-[11px] tabular-nums",children:["+",e]})]})}function dB(a,b){return{seed:a||"bot",...(0,dc.iconProps)(b)}}function dC({bot:a,jobs:b,onDone:c,onDraft:d}){let[e,f]=(0,dn.useObjectState)(()=>({name:a?.name??"",description:a?.description??"",systemPrompt:a?.systemPrompt??"",icon:a?.icon??(0,da.randomBotIcon)(),provider:a?.provider??null,model:a?.model??"",compactAt:a?.compactAt?String(a.compactAt/1e3):"",effort:a?.effort??null,toolIds:a?.tools.map(a=>a.id)??[]})),{name:g,description:h,systemPrompt:i,icon:k,provider:l,model:m,compactAt:n,effort:o,toolIds:p}=e,q=(0,w.useId)(),[r,s]=(0,w.useState)(!!a?.compactAt),u=(0,dr.useServerRoute)((0,c2.isCatalogProvider)(l)?y.queryKey.modelCatalog(l):null),x=(a,b)=>a&&b.trim()?(0,c2.contextWindowOf)(a,b.trim(),u.data):null,A=x(l,m),B=l&&m.trim()?dI(A)/1e3:null,C=r?n:null===B?"":String(B),[D]=(0,dq.useServerAction)(c9,{onOk:()=>(0,dr.revalidate)(y.queryKey.bot)}),E=b=>{a&&D(a.name,b)},[F,G,,H]=(0,dq.useServerAction)(c5,{errorMessage:!1,okMessage:"Bot created",onOk:a=>{(0,dr.revalidate)(y.queryKey.bot),c(a.name)}}),[I,J]=(0,dq.useServerAction)(c7,{okMessage:"Bot deleted",onOk:()=>{(0,dr.revalidate)(y.queryKey.bot),c(null)}}),[K,L]=(0,dq.useServerAction)(c4,{onOk:()=>(0,dr.revalidate)(y.queryKey.bot)}),M=!!(l&&m.trim()),N=g.trim()&&h.trim()&&!G,O=[!g.trim()&&"a name",!h.trim()&&"a description"].filter(a=>!!a),P=()=>{N&&F({name:g.trim(),description:h.trim(),systemPrompt:i.trim()||void 0,icon:k,provider:M?l:null,model:M?m.trim():null,compactAt:r?dH(n):M?dI(A):null,effort:o,toolIds:p})},Q=(0,w.useRef)(P);Q.current=P;let R=O.join(",");(0,w.useEffect)(()=>{d?.({missing:R?R.split(","):[],creating:G,submit:()=>Q.current()})},[d,R,G]),(0,w.useEffect)(()=>()=>d?.(null),[d]);let S=async()=>{!a||await cW.notify.confirm({title:`Delete ${a.name}?`,description:"Thursday can no longer hand work to it, and what it kept for itself goes with it: its memory and the skills it installed. What it finished stays in Settings › Files, under its name.",okText:"Delete",destructive:!0})&&I(a.name)},T=async()=>{!a||await cW.notify.confirm({title:`Clear ${a.name}'s line?`,description:`${c_.APP_NAME} and the other bots read your description alone again.`,okText:"Clear",destructive:!0})&&K(a.name)};return(0,j.jsxs)("div",{className:"flex min-h-full flex-col",children:[(0,j.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border/60 px-4",children:[(0,j.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-muted-foreground",children:a?a.name:"New bot"}),a&&(0,j.jsxs)(j.Fragment,{children:[a.disabled&&(0,j.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:"off"}),(0,j.jsxs)(c$.Tooltip,{children:[(0,j.jsx)(c$.TooltipTrigger,{render:(0,j.jsx)("span",{className:"mr-1 flex shrink-0"}),children:(0,j.jsx)(cZ.Switch,{checked:!a.disabled,onCheckedChange:a=>E({disabled:!a}),"aria-label":`${a.name} on or off`})}),(0,j.jsx)(c$.TooltipContent,{side:"bottom",children:"Thursday can hand it work"})]}),(0,j.jsx)(z.Button,{size:"icon-sm",variant:"ghost",loading:J,"aria-label":"Delete this bot",onClick:S,className:"text-muted-foreground hover:text-destructive",children:(0,j.jsx)(t.Trash2,{})})]})]}),(0,j.jsxs)("div",{className:"flex-1 space-y-5 p-6",children:[(0,j.jsx)(dL,{name:g,icon:k,onChange:a=>{f({icon:a}),E({icon:a})}}),(0,j.jsxs)(dJ,{label:"Name",htmlFor:a?void 0:`${q}-name`,children:[a?(0,j.jsx)("p",{className:"truncate text-sm leading-8 font-medium",children:a.name}):(0,j.jsx)(cI.Input,{id:`${q}-name`,value:g,onChange:a=>f({name:a.target.value}),placeholder:"e.g. researcher",spellCheck:!1,maxLength:c_.COMMON_VALIDATE.name.max,autoFocus:!0}),(0,j.jsx)("p",{className:"text-xs text-muted-foreground",children:a?`What ${c_.APP_NAME} calls it when she hands it work. Fixed once the bot is made.`:`What ${c_.APP_NAME} calls it when she hands it work. Up to ${c_.COMMON_VALIDATE.name.max} characters, and it can’t be renamed later.`})]}),(0,j.jsxs)(dJ,{label:"Description",htmlFor:`${q}-description`,children:[(0,j.jsx)(cI.Input,{id:`${q}-description`,value:h,onChange:a=>f({description:a.target.value}),onBlur:()=>{let b=h.trim();a&&b&&b!==a.description&&E({description:b})},placeholder:"e.g. Searches the web and answers",maxLength:c_.COMMON_VALIDATE.description.max}),(0,j.jsxs)("p",{className:"text-xs text-muted-foreground",children:["The one line ",c_.APP_NAME," and the other bots read when they decide who gets a job."]}),a?.ownLine&&(0,j.jsxs)("div",{className:"mt-1 flex items-start gap-2 rounded-lg bg-muted/50 py-2 pr-1.5 pl-2.5",children:[(0,j.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,j.jsx)("p",{className:"text-[13px] leading-[18px]",children:a.ownLine.line}),(0,j.jsxs)("p",{className:"font-mono text-[11px] leading-4 text-muted-foreground",children:["added by ",a.name," · ",(0,dp.whenOf)(new Date(a.ownLine.at))," ·"," ",a.ownLine.reason]})]}),(0,j.jsx)(z.Button,{size:"icon-xs",variant:"ghost",loading:L,"aria-label":"Clear its line",onClick:T,className:"shrink-0 text-muted-foreground",children:(0,j.jsx)(v.X,{})})]}),a&&(0,j.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,j.jsx)(cZ.Switch,{checked:!a.descriptionLocked,onCheckedChange:a=>E({descriptionLocked:!a}),"aria-label":`${a.name} may add its own line`}),"It may add its own line when its work changes for good"]})]}),(0,j.jsxs)(dJ,{label:"Runs on",children:[(0,j.jsx)("div",{className:"flex items-center gap-3",children:(0,j.jsx)("div",{className:"min-w-0 flex-1",children:(0,j.jsx)(c1.ModelPicker,{provider:l,model:m,onChange:a=>{f({provider:a.provider,model:a.model}),s(!1),a.model&&E({...a,compactAt:dI(x(a.provider,a.model))})},onUnset:()=>{f({provider:null,model:"",effort:null}),s(!1),E({provider:null,model:null,compactAt:null,effort:null})}})})}),(0,j.jsx)("p",{className:"text-xs text-muted-foreground",children:m.trim()?"What this bot thinks with. App default puts it back on the one in Settings › Models.":"App default model, and its effort with it."})]}),(0,j.jsxs)(dJ,{label:"Effort",children:[(0,j.jsx)(c0.EffortSwitch,{provider:l,model:m.trim(),value:o,onChange:a=>{f({effort:a}),E({effort:a})}}),(0,j.jsx)("p",{className:"text-xs text-muted-foreground",children:"How hard it thinks, on the steps this model takes. Auto leaves the step to the model."})]}),(0,j.jsxs)(dJ,{label:"Compacts at",htmlFor:`${q}-compact`,children:[(0,j.jsxs)(cL,{children:[(0,j.jsx)(cP,{id:`${q}-compact`,inputMode:"decimal",value:C,placeholder:m.trim()?"":"From the app default model",onChange:a=>{s(!0),f({compactAt:a.target.value})},onBlur:()=>{if(!r)return;let a=dH(n);null===a?s(!1):f({compactAt:String(a/1e3)}),E({compactAt:a??(m.trim()?dI(A):null)})}}),(0,j.jsx)(cN,{align:"inline-end",children:(0,j.jsx)(cO,{children:"k tokens"})})]}),(0,j.jsx)("p",{className:"text-xs text-muted-foreground",children:function(a){let b="A job summarizes itself here and carries on.";if(!a.model)return null===a.shown?`Worked out from the app default model's context window at each run. ${b}`:`Set by hand. Emptied, it is worked out from the app default model again. ${b}`;let c=dI(a.window);return null!==a.shown&&a.shown!==c?`Set by hand. Picking a model fills in its own again. ${b}`:a.window?`${Math.round(100*c_.BOT_RUN.compactHeadroom)}% of this model's ${(a.window/1e3).toLocaleString()}k context window. ${b}`:`This model's context window is unknown, so the default is filled in. ${b}`}({model:m.trim(),window:A,shown:dH(C)})})]}),(0,j.jsx)(dJ,{label:"Tools",children:(0,j.jsx)(dM,{selected:p,onChange:a=>{f({toolIds:a}),E({toolIds:a})}})}),(0,j.jsxs)(dJ,{label:"Prompt",htmlFor:`${q}-prompt`,children:[(0,j.jsx)(cJ.Textarea,{id:`${q}-prompt`,value:i,onChange:a=>f({systemPrompt:a.target.value}),onBlur:()=>{let b=i.trim();a&&b!==(a.systemPrompt??"")&&E({systemPrompt:b})},placeholder:`How it should work (optional). e.g.
2
- Search the web, answer with a short summary and links.`,maxLength:c_.COMMON_VALIDATE.prompt.max,className:"max-h-48 min-h-24 resize-none overflow-y-auto text-sm"}),i.length>0&&(0,j.jsxs)("p",{className:"text-right font-mono text-[10px] text-muted-foreground",children:[i.length,"/",c_.COMMON_VALIDATE.prompt.max]})]}),a&&(0,j.jsx)(dD,{bot:a.name}),a&&(0,j.jsx)(dK,{jobs:b}),H&&(0,j.jsx)("p",{className:"font-mono text-xs text-destructive",children:H})]})]})}function dD({bot:a}){let b=y.queryKey.botMemoryFiles(a),{data:c,isLoading:d}=(0,dr.useServerRoute)(b),[e,f]=(0,w.useState)(null),[g]=(0,dq.useServerAction)(dm.revealFileAction),[h,i]=(0,dq.useServerAction)(dl.deleteWorkspaceFileAction,{okMessage:"File deleted",onOk:()=>{f(null),(0,dr.revalidate)(b),(0,dr.revalidate)(y.queryKey.workspace)}}),k=async b=>{await cW.notify.confirm({title:`Delete ${b.file}?`,description:`It is deleted from disk for good, and ${a}'s next job starts without it.`,okText:"Delete",destructive:!0})&&h(b.path)};return(0,j.jsxs)("div",{className:"pt-1",children:[(0,j.jsxs)("div",{className:"flex h-6 items-center",children:[(0,j.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:"Memory"}),(0,j.jsx)("span",{className:"flex-1"}),c&&c.total>0&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("span",{className:"pr-1 font-mono text-[11px] text-muted-foreground tabular-nums",children:1===c.total?"1 file":`${c.total} files`}),(0,j.jsxs)("button",{type:"button",title:"Show in the file manager",onClick:()=>g(c.folder),className:"flex items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,j.jsx)(p.FolderOpen,{className:"size-3"}),"Folder"]})]})]}),d?(0,j.jsx)("div",{className:"flex h-9 items-center border-t border-border/60",children:(0,j.jsx)(cY.Skeleton,{className:"h-3 w-56"})}):c?.entries.length?c.entries.map(a=>{let b=e===a.path;return(0,j.jsxs)("div",{className:"border-t border-border/60",children:[(0,j.jsxs)("button",{type:"button","aria-expanded":b,onClick:()=>f(b?null:a.path),className:"flex h-9 w-full items-center gap-3 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,j.jsx)("span",{className:(0,cK.cn)("min-w-0 flex-1 truncate",b&&"font-medium"),children:a.line||a.file}),(0,j.jsx)("span",{className:"w-36 shrink-0 truncate font-mono text-[11px] text-muted-foreground",children:a.file}),(0,j.jsx)("span",{className:"w-28 shrink-0 text-right font-mono text-[11px] text-muted-foreground tabular-nums",children:(0,dp.whenOf)(a.at)}),(0,j.jsx)(l.ChevronRight,{className:(0,cK.cn)("size-3 shrink-0 text-muted-foreground transition-transform",b&&"rotate-90")})]}),b&&(0,j.jsxs)("div",{className:"flex items-start gap-3",children:[(0,j.jsx)("div",{className:"max-h-96 min-w-0 flex-1 overflow-y-auto",children:(0,j.jsx)(dE,{path:a.path})}),(0,j.jsx)(z.Button,{size:"icon-sm",variant:"ghost","aria-label":`Delete ${a.file}`,loading:i,onClick:()=>k(a),className:"text-muted-foreground hover:text-destructive",children:(0,j.jsx)(t.Trash2,{})})]})]},a.path)}):(0,j.jsx)("p",{className:"py-2 text-[13px] text-muted-foreground",children:"Nothing kept yet."})]})}function dE({path:a}){let{content:b,failure:c,truncated:d}=(0,dj.useFileText)(a);if(c)return(0,j.jsx)("p",{className:"pb-3 font-mono text-xs text-destructive",children:c});if(null===b)return(0,j.jsxs)("div",{className:"space-y-2 pb-3",children:[(0,j.jsx)(cY.Skeleton,{className:"h-4 w-5/6"}),(0,j.jsx)(cY.Skeleton,{className:"h-4 w-2/3"})]});let e=(0,dk.viewKindOf)(a);return(0,j.jsx)(dj.FileBody,{kind:e,content:"markdown"===e?dF(b):b,truncated:d,where:"inline"})}let dF=a=>a.replace(/^---\n[\s\S]*?\n---\n/,"").replace(/^\s*#[^\n]*\n?/,"");function dG({bot:a,draft:b=null}){let{data:c,mutate:d}=(0,dr.useServerRoute)(y.queryKey.botMemory),[e]=(0,dq.useServerAction)(c8,{onOk:()=>(0,dr.revalidate)(y.queryKey.botMemory),onError:()=>(0,dr.revalidate)(y.queryKey.botMemory)}),f=a?a.tokens.input+a.tokens.output:0;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(dh.SettingRailNote,{children:a?(0,j.jsxs)("span",{className:"font-mono text-[11px]",children:[a.name,a.disabled&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("span",{className:"px-1.5 opacity-50",children:"·"}),"off"]}),(0,j.jsx)("span",{className:"px-1.5 opacity-50",children:"·"}),(0,j.jsx)("span",{title:`in ${(0,cK.formatCount)(a.tokens.input)} \xb7 out ${(0,cK.formatCount)(a.tokens.output)}`,children:f>0?`${(0,cK.formatCount)(f)} tokens`:"no tokens yet"}),(0,j.jsx)("span",{className:"px-1.5 opacity-50",children:"·"}),"since ",(0,dp.whenOf)(a.createdAt)]}):b?.missing.length?`Needs ${b.missing.length>1?`${b.missing.slice(0,-1).join(", ")} and ${b.missing.at(-1)}`:b.missing[0]}`:null}),(0,j.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:"Bots keep their own memory"}),(0,j.jsx)(cZ.Switch,{checked:c??!0,disabled:void 0===c,onCheckedChange:a=>{d(a,!1),e(a)},"aria-label":"Bots keep their own memory"}),b&&(0,j.jsx)(z.Button,{size:"sm",loading:b.creating,disabled:b.missing.length>0,onClick:b.submit,children:"Create bot"})]})}function dH(a){let b=Number(a.replace(/[^0-9.]/g,""));return Number.isFinite(b)&&b>0?Math.round(1e3*b):null}let dI=a=>1e3*Math.round((0,c2.compactAtFor)(a)/1e3);function dJ({label:a,htmlFor:b,children:c}){return(0,j.jsxs)("div",{className:"flex gap-3",children:[(0,j.jsx)("label",{htmlFor:b,className:"w-20 shrink-0 pt-2 font-mono text-xs text-muted-foreground",children:a}),(0,j.jsx)("div",{className:"min-w-0 flex-1 space-y-1.5",children:c})]})}function dK({jobs:a}){return(0,j.jsxs)("div",{className:"pt-1",children:[(0,j.jsxs)("div",{className:"flex h-6 items-center",children:[(0,j.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:"Recent"}),(0,j.jsx)("span",{className:"flex-1"}),(0,j.jsxs)("button",{type:"button",onClick:()=>(0,di.openSettings)("threads"),className:"flex items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,j.jsx)(r,{className:"size-3"}),"History"]})]}),0===a.length?(0,j.jsx)("p",{className:"py-2 text-[13px] text-muted-foreground",children:"Nothing handed over yet."}):a.map(a=>{let b=function(a){switch(a.status){case"waiting":return{text:"waiting on you",tone:cK.WAITING_INK};case"running":return{text:"working",tone:"text-muted-foreground"};case"cancelled":return{text:"stopped",tone:"text-muted-foreground"};default:return{text:"done",tone:"text-muted-foreground"}}}(a);return(0,j.jsxs)("div",{className:"flex h-9 items-center gap-3 border-t border-border/60 text-[13px]",children:[(0,j.jsx)("span",{className:"min-w-0 flex-1 truncate",children:a.label}),"running"===a.status?(0,j.jsx)(cX.ShinyText,{text:b.text,className:"shrink-0 font-mono text-[11px]"}):(0,j.jsx)("span",{className:(0,cK.cn)("shrink-0 font-mono text-[11px]",b.tone),children:b.text}),(0,j.jsx)("span",{className:"w-28 shrink-0 text-right font-mono text-[11px] text-muted-foreground tabular-nums",children:(0,dp.whenOf)(a.updatedAt)})]},a.id)})]})}function dL({name:a,icon:b,onChange:c}){return(0,j.jsxs)("div",{className:"flex flex-col items-center gap-4 pt-3 pb-2",children:[(0,j.jsx)(dc.BotMark,{size:112,...dB(a,b),className:"shrink-0"}),(0,j.jsx)(df,{color:b.paint?void 0:b.color,themePicked:!b.paint&&b.color===de.MARK_SYSTEM,onTheme:()=>c({...b,paint:void 0,color:de.MARK_SYSTEM}),onPick:a=>c({...b,paint:void 0,color:b.paint||b.color!==a?a:void 0}),paint:b.paint,onPaint:a=>c({...b,paint:b.paint===a?void 0:a})}),(0,j.jsxs)("div",{className:"flex gap-1",children:[de.MARK_SHAPES.map(a=>(0,j.jsx)("button",{type:"button",onClick:()=>c({...b,shape:b.shape===a?void 0:a}),className:(0,cK.cn)("rounded-md px-2 py-1 font-mono text-[11px] capitalize transition-colors",b.shape===a?"bg-brand text-brand-foreground":"bg-muted text-muted-foreground hover:text-foreground"),children:a},a)),(0,j.jsx)("span",{className:"mx-1 w-px self-stretch bg-border/60"}),(0,j.jsx)("button",{type:"button",onClick:()=>c({...b,outline:!b.outline||void 0}),className:(0,cK.cn)("rounded-md px-2 py-1 font-mono text-[11px] transition-colors",b.outline?"bg-brand text-brand-foreground":"bg-muted text-muted-foreground hover:text-foreground"),children:"outline"})]})]})}function dM({selected:a,onChange:b}){let{data:c}=(0,dr.useServerRoute)(y.queryKey.mcpTools),d=c??[],[e,f]=(0,w.useState)(!1),g=a.length>=c_.MAX_PINNED_TOOLS,h=[...new Set(d.map(a=>a.serverName))],i=a.map(a=>d.find(b=>b.id===a)).filter(a=>!!a),l=e?i:i.slice(0,4),m=i.length-l.length,n=c=>b(a.includes(c)?a.filter(a=>a!==c):[...a,c]);return c?0===d.length?(0,j.jsx)("p",{className:"pt-1.5 text-xs text-muted-foreground",children:"Nothing to pin — connect an MCP server first (Settings › Connectors)."}):(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,j.jsx)(z.Button,{size:"icon-sm",variant:e?"secondary":"outline",onClick:()=>f(!e),"aria-label":"Pick tools",className:"border-dashed",children:(0,j.jsx)(u.Wrench,{})}),l.map(a=>(0,j.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-muted py-1 pr-1.5 pl-2.5 font-mono text-[11px]",children:[a.name,(0,j.jsx)("button",{type:"button","aria-label":`Unpin ${a.name}`,onClick:()=>n(a.id),className:"rounded-full p-0.5 text-muted-foreground transition-colors hover:bg-foreground/10 hover:text-foreground",children:(0,j.jsx)(v.X,{className:"size-3"})})]},a.id)),m>0&&(0,j.jsxs)("button",{type:"button",onClick:()=>f(!0),className:"rounded-full bg-muted px-2.5 py-1 font-mono text-[11px] text-muted-foreground transition-colors hover:text-foreground",children:["+",m]}),0===i.length&&(0,j.jsx)("span",{className:"text-xs text-muted-foreground",children:"Loaded from the start — everything else stays searchable"}),(0,j.jsx)("span",{className:"flex-1"}),(0,j.jsxs)("span",{className:(0,cK.cn)("font-mono text-[11px] text-muted-foreground",g&&"text-foreground"),children:[a.length,"/",c_.MAX_PINNED_TOOLS]})]}),e&&(0,j.jsxs)(cQ,{className:"rounded-lg border border-input",children:[(0,j.jsx)(cR,{placeholder:"Search tools"}),(0,j.jsxs)(cS,{className:"max-h-44",children:[(0,j.jsx)(cT,{children:"Nothing matches"}),h.map(b=>(0,j.jsx)(cU,{heading:b,children:d.filter(a=>a.serverName===b).map(b=>{let c=a.includes(b.id);return(0,j.jsxs)(cV,{value:`${b.serverName}/${b.name}`,disabled:!c&&g,onSelect:()=>n(b.id),children:[(0,j.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:b.name}),c&&(0,j.jsx)(k.Check,{className:"size-3.5 shrink-0"})]},b.id)})},b))]})]})]}):null}a.s(["BotSetting",0,function(){let{data:a,isLoading:b,error:c}=(0,dr.useServerRoute)(y.queryKey.bot),d=a??[];(0,x.useAppEvent)({bots:()=>void(0,dr.revalidate)(y.queryKey.bot)});let{data:e}=(0,dr.useServerRoute)(y.queryKey.threadHistory(null)),f=e??[],[g,h]=(0,w.useState)(null),[i,k]=(0,w.useState)(null);if(b)return(0,j.jsx)(dh.SettingPanesSkeleton,{});if(c)return(0,j.jsx)(dh.SettingError,{message:c.message});let l=g===ds,m=d.filter(a=>!a.disabled).length,n=new Set(d.map(a=>a.name)),o=db.BOT_SEEDS.filter(a=>!n.has(a.name)),p=l?null:d.find(a=>a.name===g)??d[0]??null;return(0,j.jsx)(dh.SettingPanes,{footer:0!==d.length||l?(0,j.jsx)(dG,{bot:p,draft:l?i:null}):null,left:(0,j.jsxs)("div",{className:"flex flex-col py-2",children:[d.length>=c_.BOT_ROSTER.max?(0,j.jsxs)("p",{className:"mx-2 mb-1 px-2 py-1.5 font-mono text-[11px] leading-5 text-muted-foreground",children:[d.length," bots · ",c_.BOT_ROSTER.max," is the most"]}):(0,j.jsxs)("div",{className:"mx-2 mb-1 flex items-center gap-1",children:[(0,j.jsxs)("button",{type:"button",onClick:()=>h(ds),className:(0,cK.cn)("flex flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",l?dh.PICKED_ROW:"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[(0,j.jsx)(s.Plus,{className:"size-3.5 shrink-0"}),"New bot"]}),d.length>0&&o.length>0&&(0,j.jsx)(dA,{missing:o,have:n,onDone:a=>h(a)})]}),d.map(a=>(0,j.jsx)(dt,{bot:a,job:f.find(b=>b.bot===a.name)??null,active:!l&&a.name===p?.name,onPick:()=>h(a.name)},a.name)),m>c_.PROMPT_CROWDED.bots&&(0,j.jsxs)(dh.SettingNote,{className:"mx-3 mt-2 leading-relaxed",children:[m," bots are on. Each is a line in every prompt, and one more for Thursday to choose between."]})]}),right:l?(0,j.jsx)(dC,{jobs:[],onDone:a=>h(a),onDraft:k},"new"):p?(0,j.jsx)(dC,{bot:p,jobs:f.filter(a=>a.bot===p.name).slice(0,3),onDone:()=>h(null)},p.name):o.length>0?(0,j.jsx)(dy,{have:n,onDone:a=>h(a)}):(0,j.jsxs)("div",{className:"space-y-4 p-8",children:[(0,j.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:"Thursday talks; bots do the rest — search the web, draft a reply, check a schedule. Give one a job and a model, and work gets handed over mid-call while the conversation keeps going."}),(0,j.jsxs)(z.Button,{variant:"outline",onClick:()=>h(ds),children:[(0,j.jsx)(s.Plus,{}),"New bot"]})]})})}],581662)}];
1
+ module.exports=[581662,a=>{"use strict";var b,c,d,e,f,g,h,i,j=a.i(187924),k=a.i(823319),l=a.i(752562),m=a.i(141146),n=a.i(164831);let o={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};o.node;let p=(0,n.default)(o);var q=a.i(844561);let r={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};r.node;let s=(0,n.default)(r);var t=a.i(403512),u=a.i(951675),v=a.i(924613),w=a.i(474215),x=a.i(819721),y=a.i(572131),z=a.i(986368),A=a.i(767561),B=a.i(340695),C=/[\\\/_+.#"@\[\(\{&]/,D=/[\\\/_+.#"@\[\(\{&]/g,E=/[\s-]/,F=/[\s-]/g;function G(a){return a.toLowerCase().replace(F," ")}var H=Object.defineProperty,I=(a,b)=>H(a,"name",{value:b,configurable:!0});function J(a,b,{checkForDefaultPrevented:c=!0}={}){return I(function(d){if(a?.(d),!1===c||!d||!d.defaultPrevented)return b?.(d)},"handleEvent")}function K(a){throw Error("Cannot access document outside of the DOM")}function L(a){return"IFRAME"===a.tagName}I(J,"composeEventHandlers"),I(function(a){throw Error("Cannot access window outside of the DOM")},"getOwnerWindow"),I(K,"getOwnerDocument"),I(function a(b,c=!1){let{activeElement:d}=K(b);if(!d?.nodeName)return null;if(L(d)&&d.contentDocument)return a(d.contentDocument.body,c);if(c){let a=d.getAttribute("aria-activedescendant");if(a){let b=K(d).getElementById(a);if(b)return b}}return d},"getActiveElement"),I(L,"isFrame");var M=Object.defineProperty,N=(a,b)=>M(a,"name",{value:b,configurable:!0});function O(a,b){if("function"==typeof a)return a(b);null!=a&&(a.current=b)}function P(...a){return b=>{let c=!1,d=a.map(a=>{let d=O(a,b);return c||"function"!=typeof d||(c=!0),d});if(c)return()=>{for(let b=0;b<d.length;b++){let c=d[b];"function"==typeof c?c():O(a[b],null)}}}}function Q(...a){return y.useCallback(P(...a),a)}N(O,"setRef"),N(P,"composeRefs"),N(Q,"useComposedRefs");var R=Object.defineProperty,S=(a,b)=>R(a,"name",{value:b,configurable:!0});function T(a,b=[]){let c=[];function d(b,d){let e=y.createContext(d);e.displayName=b+"Context";let f=c.length;c=[...c,d];let g=S(b=>{let{scope:c,children:d,...g}=b,h=c?.[a]?.[f]||e,i=y.useMemo(()=>g,Object.values(g));return(0,j.jsx)(h.Provider,{value:i,children:d})},"Provider");function h(c,g,i={}){let{optional:j=!1}=i,k=g?.[a]?.[f]||e,l=y.useContext(k);if(l)return l;if(void 0!==d)return d;if(!j)throw Error(`\`${c}\` must be used within \`${b}\``)}return g.displayName=b+"Provider",S(h,"useContext"),[g,h]}S(d,"createContext");let e=S(()=>{let b=c.map(a=>y.createContext(a));return S(function(c){let d=c?.[a]||b;return y.useMemo(()=>({[`__scope${a}`]:{...c,[a]:d}}),[c,d])},"useScope")},"createScope");return e.scopeName=a,[d,U(e,...b)]}function U(...a){let b=a[0];if(1===a.length)return b;let c=S(()=>{let c=a.map(a=>({useScope:a(),scopeName:a.scopeName}));return S(function(a){let d=c.reduce((b,{useScope:c,scopeName:d})=>{let e=c(a)[`__scope${d}`];return{...b,...e}},{});return y.useMemo(()=>({[`__scope${b.scopeName}`]:d}),[d])},"useComposedScopes")},"createScope");return c.scopeName=b.scopeName,c}S(function(a,b){let c=y.createContext(b);c.displayName=a+"Context";let d=S(a=>{let{children:b,...d}=a,e=y.useMemo(()=>d,Object.values(d));return(0,j.jsx)(c.Provider,{value:e,children:b})},"Provider");function e(d,f={}){let{optional:g=!1}=f,h=y.useContext(c);if(h)return h;if(void 0!==b)return b;if(!g)throw Error(`\`${d}\` must be used within \`${a}\``)}return d.displayName=a+"Provider",S(e,"useContext"),[d,e]},"createContext"),S(T,"createContextScope"),S(U,"composeContextScopes");var V=globalThis?.document?y.useLayoutEffect:()=>{},W=Object.defineProperty,X=y[" useId ".trim().toString()]||(()=>void 0),Y=0;function Z(a){let[b,c]=y.useState(X());return V(()=>{a||c(a=>a??String(Y++))},[a]),a||(b?`radix-${b}`:"")}W(Z,"name",{value:"useId",configurable:!0});var $=Object.defineProperty,_=y[" useEffectEvent ".trim().toString()],aa=y[" useInsertionEffect ".trim().toString()];function ab(a){if("function"==typeof _)return _(a);let b=y.useRef(()=>{throw Error("Cannot call an event handler while rendering.")});return"function"==typeof aa?aa(()=>{b.current=a}):V(()=>{b.current=a}),y.useMemo(()=>(...a)=>b.current?.(...a),[])}$(ab,"name",{value:"useEffectEvent",configurable:!0});var ac=Object.defineProperty,ad=(a,b)=>ac(a,"name",{value:b,configurable:!0}),ae=y[" useInsertionEffect ".trim().toString()]||V;function af({prop:a,defaultProp:b,onChange:c=ad(()=>{},"onChange"),caller:d}){let[e,f,g]=ag({defaultProp:b,onChange:c}),h=void 0!==a,i=h?a:e;return[i,y.useCallback(b=>{if(h){let c=ah(b)?b(a):b;c!==a&&g.current?.(c)}else f(b)},[h,a,f,g])]}function ag({defaultProp:a,onChange:b}){let[c,d]=y.useState(a),e=y.useRef(c),f=y.useRef(b);return ae(()=>{f.current=b},[b]),y.useEffect(()=>{e.current!==c&&(f.current?.(c),e.current=c)},[c,e]),[c,d,f]}function ah(a){return"function"==typeof a}ad(af,"useControllableState"),ad(ag,"useUncontrolledState"),ad(ah,"isFunction");var ai=Symbol("RADIX:SYNC_STATE");ad(function(a,b,c,d){let{prop:e,defaultProp:f,onChange:g,caller:h}=b,i=void 0!==e,j=ab(g),k=[{...c,state:f}];d&&k.push(d);let[l,m]=y.useReducer((b,c)=>{if(c.type===ai)return{...b,state:c.state};let d=a(b,c);return i&&!Object.is(d.state,b.state)&&j(d.state),d},...k),n=l.state,o=y.useRef(n);y.useEffect(()=>{o.current!==n&&(o.current=n,i||j(n))},[n,o,i]);let p=y.useMemo(()=>void 0!==e?{...l,state:e}:l,[l,e]);return y.useEffect(()=>{i&&!Object.is(e,l.state)&&m({type:ai,state:e})},[e,l.state,i]),[p,m]},"useControllableStateReducer");var aj=a.i(935112),ak=Object.defineProperty,al=(a,b)=>ak(a,"name",{value:b,configurable:!0});function am(a){let b=y.forwardRef((b,c)=>{let{children:d,...e}=b,f=null,g=!1,h=[];at(d)&&"function"==typeof ax&&(d=ax(d._payload)),y.Children.forEach(d,a=>{if(ar(a)){g=!0;let b="child"in a.props?a.props.child:a.props.children;at(b)&&"function"==typeof ax&&(b=ax(b._payload)),f=ao(a,b),h.push(f?.props?.children)}else h.push(a)}),f?f=y.cloneElement(f,void 0,h):!g&&1===y.Children.count(d)&&y.isValidElement(d)&&(f=d);let i=f?aq(f):void 0,j=Q(c,i);if(!f){if(d||0===d)throw Error(g?aw(a):av(a));return d}let k=ap(e,f.props??{});return f.type!==y.Fragment&&(k.ref=c?j:i),y.cloneElement(f,k)});return b.displayName=`${a}.Slot`,b}al(am,"createSlot");var an=Symbol.for("radix.slottable");al(function(a){let b=al(a=>"child"in a?a.children(a.child):a.children,"Slottable");return b.displayName=`${a}.Slottable`,b.__radixId=an,b},"createSlottable");var ao=al((a,b)=>{if("child"in a.props){let b=a.props.child;return y.isValidElement(b)?y.cloneElement(b,void 0,a.props.children(b.props.children)):null}return y.isValidElement(b)?b:null},"getSlottableElementFromSlottable");function ap(a,b){let c={...b};for(let d in b){let e=a[d],f=b[d];/^on[A-Z]/.test(d)?e&&f?c[d]=(...a)=>{let b=f(...a);return e(...a),b}:e&&(c[d]=e):"style"===d?c[d]={...e,...f}:"className"===d&&(c[d]=[e,f].filter(Boolean).join(" "))}return{...a,...c}}function aq(a){let b=Object.getOwnPropertyDescriptor(a.props,"ref")?.get,c=b&&"isReactWarning"in b&&b.isReactWarning;return c?a.ref:(c=(b=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in b&&b.isReactWarning)?a.props.ref:a.props.ref||a.ref}function ar(a){return y.isValidElement(a)&&"function"==typeof a.type&&"__radixId"in a.type&&a.type.__radixId===an}al(ap,"mergeProps"),al(aq,"getElementRef"),al(ar,"isSlottable");var as=Symbol.for("react.lazy");function at(a){return null!=a&&"object"==typeof a&&"$$typeof"in a&&a.$$typeof===as&&"_payload"in a&&au(a._payload)}function au(a){return"object"==typeof a&&null!==a&&"then"in a}al(at,"isLazyComponent"),al(au,"isPromiseLike");var av=al(a=>`${a} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),aw=al(a=>`${a} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),ax=y[" use ".trim().toString()],ay=Object.defineProperty,az=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((a,b)=>{let c=am(`Primitive.${b}`),d=y.forwardRef((a,d)=>{let{asChild:e,...f}=a;return(0,j.jsx)(e?c:b,{...f,ref:d})});return d.displayName=`Primitive.${b}`,{...a,[b]:d}},{});function aA(a,b){a&&aj.flushSync(()=>a.dispatchEvent(b))}function aB(a){let b=y.useRef(a);return y.useEffect(()=>{b.current=a}),y.useMemo(()=>(...a)=>b.current?.(...a),[])}ay(aA,"name",{value:"dispatchDiscreteCustomEvent",configurable:!0}),(0,Object.defineProperty)(aB,"name",{value:"useCallbackRef",configurable:!0});var aC=Object.defineProperty,aD=(a,b)=>aC(a,"name",{value:b,configurable:!0}),aE="dismissableLayer.update",aF=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),aG=y.forwardRef(aD(function(a,b){let{disableOutsidePointerEvents:c=!1,deferPointerDownOutside:d=!1,onEscapeKeyDown:e,onPointerDownOutside:f,onFocusOutside:g,onInteractOutside:i,onDismiss:k,...l}=a,m=y.useContext(aF),[n,o]=y.useState(null),p=n?.ownerDocument??globalThis?.document,[,q]=y.useState({}),r=Q(b,o),s=Array.from(m.layers),[t]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),u=t?s.indexOf(t):-1,v=n?s.indexOf(n):-1,w=m.layersWithOutsidePointerEventsDisabled.size>0,x=v>=u,z=y.useRef(!1),A=aJ(a=>{f?.(a),i?.(a),a.defaultPrevented||k?.()},{ownerDocument:p,deferPointerDownOutside:d,isDeferredPointerDownOutsideRef:z,dismissableSurfaces:m.dismissableSurfaces,shouldHandlePointerDownOutside:y.useCallback(a=>{if(!(a instanceof Node))return!1;let b=[...m.branches].some(b=>b.contains(a));return x&&!b},[m.branches,x])}),B=aK(a=>{if(d&&z.current)return;let b=a.target;![...m.branches].some(a=>a.contains(b))&&(g?.(a),i?.(a),a.defaultPrevented||k?.())},p),C=!!n&&v===s.length-1,D=aB(a=>{"Escape"===a.key&&(e?.(a),!a.defaultPrevented&&k&&(a.preventDefault(),k()))});return y.useEffect(()=>{if(C)return p.addEventListener("keydown",D,{capture:!0}),()=>p.removeEventListener("keydown",D,{capture:!0})},[p,C,D]),y.useEffect(()=>{if(n)return c&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(h=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(n)),m.layers.add(n),aL(),()=>{c&&(m.layersWithOutsidePointerEventsDisabled.delete(n),0===m.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=h))}},[n,p,c,m]),y.useEffect(()=>()=>{n&&(m.layers.delete(n),m.layersWithOutsidePointerEventsDisabled.delete(n),aL())},[n,m]),y.useEffect(()=>{let a=aD(()=>q({}),"handleUpdate");return document.addEventListener(aE,a),()=>document.removeEventListener(aE,a)},[]),(0,j.jsx)(az.div,{...l,ref:r,style:{pointerEvents:w?x?"auto":"none":void 0,...a.style},onFocusCapture:J(a.onFocusCapture,B.onFocusCapture),onBlurCapture:J(a.onBlurCapture,B.onBlurCapture),onPointerDownCapture:J(a.onPointerDownCapture,A.onPointerDownCapture)})},"DismissableLayer"));function aH(){let a=y.useContext(aF),[b,c]=y.useState(null);return y.useEffect(()=>{if(b)return a.dismissableSurfaces.add(b),()=>{a.dismissableSurfaces.delete(b)}},[b,a.dismissableSurfaces]),c}aD(aH,"useDismissableLayerSurface");var aI=aD(()=>!0,"IS_TRUE");function aJ(a,b){let{ownerDocument:c=globalThis?.document,deferPointerDownOutside:d=!1,isDeferredPointerDownOutsideRef:e,dismissableSurfaces:f,shouldHandlePointerDownOutside:g=aI}=b,h=aB(a),i=y.useRef(!1),j=y.useRef(!1),k=y.useRef(new Map),l=y.useRef(()=>{});return y.useEffect(()=>{function a(){j.current=!1,e.current=!1,k.current.clear()}function b(){return Array.from(k.current.values()).some(Boolean)}function m(a){if(!j.current)return;let b=a.target;b instanceof Node&&[...f].some(a=>a.contains(b))||k.current.set(a.type,!0),"click"===a.type&&window.setTimeout(()=>{j.current&&l.current()},0)}function n(a){j.current&&k.current.set(a.type,!1)}aD(a,"resetOutsideInteraction"),aD(b,"isOutsideInteractionIntercepted"),aD(m,"handleInteractionCapture"),aD(n,"handleInteractionBubble");let o=aD(f=>{if(f.target&&!i.current){let m=function(){c.removeEventListener("click",l.current);let d=b();a(),d||aM("dismissableLayer.pointerDownOutside",h,n,{discrete:!0})};if(aD(m,"handleAndDispatchPointerDownOutsideEvent"),!g(f.target)){c.removeEventListener("click",l.current),a(),i.current=!1;return}let n={originalEvent:f};j.current=!0,e.current=d&&0===f.button,k.current.clear(),d&&0===f.button?(c.removeEventListener("click",l.current),l.current=m,c.addEventListener("click",l.current,{once:!0})):m()}else c.removeEventListener("click",l.current),a();i.current=!1},"handlePointerDown"),p=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let a of p)c.addEventListener(a,m,!0),c.addEventListener(a,n);let q=window.setTimeout(()=>{c.addEventListener("pointerdown",o)},0);return()=>{for(let a of(window.clearTimeout(q),c.removeEventListener("pointerdown",o),c.removeEventListener("click",l.current),p))c.removeEventListener(a,m,!0),c.removeEventListener(a,n)}},[c,h,d,e,f,g]),{onPointerDownCapture:aD(()=>i.current=!0,"onPointerDownCapture")}}function aK(a,b=globalThis?.document){let c=aB(a),d=y.useRef(!1);return y.useEffect(()=>{let a=aD(a=>{a.target&&!d.current&&aM("dismissableLayer.focusOutside",c,{originalEvent:a},{discrete:!1})},"handleFocus");return b.addEventListener("focusin",a),()=>b.removeEventListener("focusin",a)},[b,c]),{onFocusCapture:aD(()=>d.current=!0,"onFocusCapture"),onBlurCapture:aD(()=>d.current=!1,"onBlurCapture")}}function aL(){let a=new CustomEvent(aE);document.dispatchEvent(a)}function aM(a,b,c,{discrete:d}){let e=c.originalEvent.target,f=new CustomEvent(a,{bubbles:!1,cancelable:!0,detail:c});b&&e.addEventListener(a,b,{once:!0}),d?aA(e,f):e.dispatchEvent(f)}aD(aJ,"usePointerDownOutside"),aD(aK,"useFocusOutside"),aD(aL,"dispatchUpdate"),aD(aM,"handleAndDispatchCustomEvent");var aN=Object.defineProperty,aO=(a,b)=>aN(a,"name",{value:b,configurable:!0}),aP="focusScope.autoFocusOnMount",aQ="focusScope.autoFocusOnUnmount",aR={bubbles:!1,cancelable:!0},aS=y.forwardRef(aO(function(a,b){let{loop:c=!1,trapped:d=!1,onMountAutoFocus:e,onUnmountAutoFocus:f,...g}=a,[h,i]=y.useState(null),k=aB(e),l=aB(f),m=y.useRef(null),n=Q(b,i),o=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(d){let a=function(a){if(o.paused||!h)return;let b=a.target;h.contains(b)?m.current=b:aZ(m.current,{select:!0})},b=function(a){if(o.paused||!h)return;let b=a.relatedTarget;null!==b&&(h.contains(b)||aZ(m.current,{select:!0}))},c=function(a){if(document.activeElement===document.body)for(let b of a)b.removedNodes.length>0&&aZ(h)};aO(a,"handleFocusIn"),aO(b,"handleFocusOut"),aO(c,"handleMutations"),document.addEventListener("focusin",a),document.addEventListener("focusout",b);let d=new MutationObserver(c);return h&&d.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",a),document.removeEventListener("focusout",b),d.disconnect()}}},[d,h,o.paused]),y.useEffect(()=>{if(h){a$.add(o);let a=document.activeElement;if(!h.contains(a)){let b=new CustomEvent(aP,aR);h.addEventListener(aP,k),h.dispatchEvent(b),b.defaultPrevented||(aT(a1(aV(h)),{select:!0}),document.activeElement===a&&aZ(h))}return()=>{h.removeEventListener(aP,k),setTimeout(()=>{let b=new CustomEvent(aQ,aR);h.addEventListener(aQ,l),h.dispatchEvent(b),b.defaultPrevented||aZ(a??document.body,{select:!0}),h.removeEventListener(aQ,l),a$.remove(o)},0)}}},[h,k,l,o]);let p=y.useCallback(a=>{if(!c&&!d||o.paused)return;let b="Tab"===a.key&&!a.altKey&&!a.ctrlKey&&!a.metaKey,e=document.activeElement;if(b&&e){let b=a.currentTarget,[d,f]=aU(b);d&&f?a.shiftKey||e!==f?a.shiftKey&&e===d&&(a.preventDefault(),c&&aZ(f,{select:!0})):(a.preventDefault(),c&&aZ(d,{select:!0})):e===b&&a.preventDefault()}},[c,d,o.paused]);return(0,j.jsx)(az.div,{tabIndex:-1,...g,ref:n,onKeyDown:p})},"FocusScope"));function aT(a,{select:b=!1}={}){let c=document.activeElement;for(let d of a)if(aZ(d,{select:b}),document.activeElement!==c)return}function aU(a){let b=aV(a);return[aW(b,a),aW(b.reverse(),a)]}function aV(a){let b=[],c=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,{acceptNode:aO(a=>{let b="INPUT"===a.tagName&&"hidden"===a.type;return a.disabled||a.hidden||b?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;c.nextNode();)b.push(c.currentNode);return b}function aW(a,b){let c="function"==typeof b.checkVisibility&&b.checkVisibility({checkVisibilityCSS:!0});for(let d of a)if(!(c?!d.checkVisibility({checkVisibilityCSS:!0}):aX(d,{upTo:b})))return d}function aX(a,{upTo:b}){if("hidden"===getComputedStyle(a).visibility)return!0;for(;a&&(void 0===b||a!==b);){if("none"===getComputedStyle(a).display)return!0;a=a.parentElement}return!1}function aY(a){return a instanceof HTMLInputElement&&"select"in a}function aZ(a,{select:b=!1}={}){if(a&&a.focus){let c=document.activeElement;a.focus({preventScroll:!0}),a!==c&&aY(a)&&b&&a.select()}}aO(aT,"focusFirst"),aO(aU,"getTabbableEdges"),aO(aV,"getTabbableCandidates"),aO(aW,"findVisible"),aO(aX,"isHidden"),aO(aY,"isSelectableInput"),aO(aZ,"focus");var a$=a_();function a_(){let a=[];return{add(b){let c=a[0];b!==c&&c?.pause(),(a=a0(a,b)).unshift(b)},remove(b){a=a0(a,b),a[0]?.resume()}}}function a0(a,b){let c=[...a],d=c.indexOf(b);return -1!==d&&c.splice(d,1),c}function a1(a){return a.filter(a=>"A"!==a.tagName)}aO(a_,"createFocusScopesStack"),aO(a0,"arrayRemove"),aO(a1,"removeLinks");var a2=Object.defineProperty,a3=y.forwardRef(a2(function(a,b){let{container:c,...d}=a,[e,f]=y.useState(!1);V(()=>f(!0),[]);let g=c||e&&globalThis?.document?.body;return g?aj.createPortal((0,j.jsx)(az.div,{...d,ref:b}),g):null},"name",{value:"Portal",configurable:!0})),a4=Object.defineProperty,a5=(a,b)=>a4(a,"name",{value:b,configurable:!0});function a6(a,b){return y.useReducer((a,c)=>b[a][c]??a,a)}a5(a6,"useStateMachine");var a7=a5(a=>{let{present:b,children:c}=a,d=a8(b),e="function"==typeof c?c({present:d.isPresent}):y.Children.only(c),f=ba(d.ref,bc(e));return"function"==typeof c||d.isPresent?y.cloneElement(e,{ref:f}):null},"Presence");function a8(a){let[b,c]=y.useState(),d=y.useRef(null),e=y.useRef(a),f=y.useRef("none"),g=y.useRef(void 0),[h,i]=a6(a?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{"mounted"===h?(f.current=g.current??bb(d.current),g.current=void 0):f.current="none"},[h]),V(()=>{let b=d.current,c=e.current;if(c!==a){let d=f.current,h=bb(b);a?(g.current=h,i("MOUNT")):"none"===h||b?.display==="none"?i("UNMOUNT"):c&&d!==h?i("ANIMATION_OUT"):i("UNMOUNT"),e.current=a}},[a,i]),V(()=>{if(b){let a,c=b.ownerDocument.defaultView??window,g=a5(f=>{let g=bb(d.current).includes(CSS.escape(f.animationName));if(f.target===b&&g&&(i("ANIMATION_END"),!e.current)){let d=b.style.animationFillMode;b.style.animationFillMode="forwards",a=c.setTimeout(()=>{"forwards"===b.style.animationFillMode&&(b.style.animationFillMode=d)})}},"handleAnimationEnd"),h=a5(a=>{a.target===b&&(f.current=bb(d.current))},"handleAnimationStart");return b.addEventListener("animationstart",h),b.addEventListener("animationcancel",g),b.addEventListener("animationend",g),()=>{c.clearTimeout(a),b.removeEventListener("animationstart",h),b.removeEventListener("animationcancel",g),b.removeEventListener("animationend",g)}}i("ANIMATION_END")},[b,i]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:y.useCallback(a=>{if(a){let b=getComputedStyle(a);d.current=b,g.current=bb(b)}else d.current=null;c(a)},[])}}function a9(a,b){if("function"==typeof a)return a(b);null!=a&&(a.current=b)}function ba(...a){let b=y.useRef(a);return b.current=a,y.useCallback(a=>{let c=b.current,d=!1,e=c.map(b=>{let c=a9(b,a);return d||"function"!=typeof c||(d=!0),c});if(d)return()=>{for(let a=0;a<e.length;a++){let b=e[a];"function"==typeof b?b():a9(c[a],null)}}},[])}function bb(a){return a?.animationName||"none"}function bc(a){let b=Object.getOwnPropertyDescriptor(a.props,"ref")?.get,c=b&&"isReactWarning"in b&&b.isReactWarning;return c?a.ref:(c=(b=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in b&&b.isReactWarning)?a.props.ref:a.props.ref||a.ref}a5(a8,"usePresence"),a5(a9,"setRef"),a5(ba,"useStableComposedRefs"),a5(bb,"getAnimationName"),a5(bc,"getElementRef");var bd=Object.defineProperty,be=(a,b)=>bd(a,"name",{value:b,configurable:!0}),bf=0,bg=null;function bh(){y.useEffect(()=>{bg||(bg={start:bi(),end:bi()});let{start:a,end:b}=bg;return document.body.firstElementChild!==a&&document.body.insertAdjacentElement("afterbegin",a),document.body.lastElementChild!==b&&document.body.insertAdjacentElement("beforeend",b),bf++,()=>{1===bf&&(bg?.start.remove(),bg?.end.remove(),bg=null),bf=Math.max(0,bf-1)}},[])}function bi(){let a=document.createElement("span");return a.setAttribute("data-radix-focus-guard",""),a.tabIndex=0,a.style.outline="none",a.style.opacity="0",a.style.position="fixed",a.style.pointerEvents="none",a}be(function(a){return bh(),a.children},"FocusGuards"),be(bh,"useFocusGuards"),be(bi,"createFocusGuard");var bj=function(){return(bj=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++)for(var e in b=arguments[c])Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e]);return a}).apply(this,arguments)};function bk(a,b){var c={};for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&0>b.indexOf(d)&&(c[d]=a[d]);if(null!=a&&"function"==typeof Object.getOwnPropertySymbols)for(var e=0,d=Object.getOwnPropertySymbols(a);e<d.length;e++)0>b.indexOf(d[e])&&Object.prototype.propertyIsEnumerable.call(a,d[e])&&(c[d[e]]=a[d[e]]);return c}var bl=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),bm="width-before-scroll-bar";function bn(a,b){return"function"==typeof a?a(b):a&&(a.current=b),a}var bo=y.useEffect,bp=new WeakMap,bq=(void 0===b&&(b={}),(void 0===c&&(c=function(a){return a}),d=[],e=!1,f={read:function(){if(e)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return d.length?d[d.length-1]:null},useMedium:function(a){var b=c(a,e);return d.push(b),function(){d=d.filter(function(a){return a!==b})}},assignSyncMedium:function(a){for(e=!0;d.length;){var b=d;d=[],b.forEach(a)}d={push:function(b){return a(b)},filter:function(){return d}}},assignMedium:function(a){e=!0;var b=[];if(d.length){var c=d;d=[],c.forEach(a),b=d}var f=function(){var c=b;b=[],c.forEach(a)},g=function(){return Promise.resolve().then(f)};g(),d={push:function(a){b.push(a),g()},filter:function(a){return b=b.filter(a),d}}}}).options=bj({async:!0,ssr:!1},b),f),br=function(){},bs=y.forwardRef(function(a,b){var c,d,e,f,g=y.useRef(null),h=y.useState({onScrollCapture:br,onWheelCapture:br,onTouchMoveCapture:br}),i=h[0],j=h[1],k=a.forwardProps,l=a.children,m=a.className,n=a.removeScrollBar,o=a.enabled,p=a.shards,q=a.sideCar,r=a.noRelative,s=a.noIsolation,t=a.inert,u=a.allowPinchZoom,v=a.as,w=a.gapMode,x=bk(a,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),z=(c=[g,b],d=function(a){return c.forEach(function(b){return bn(b,a)})},(e=(0,y.useState)(function(){return{value:null,callback:d,facade:{get current(){return e.value},set current(value){var a=e.value;a!==value&&(e.value=value,e.callback(value,a))}}}})[0]).callback=d,f=e.facade,bo(function(){var a=bp.get(f);if(a){var b=new Set(a),d=new Set(c),e=f.current;b.forEach(function(a){d.has(a)||bn(a,null)}),d.forEach(function(a){b.has(a)||bn(a,e)})}bp.set(f,c)},[c]),f),A=bj(bj({},x),i);return y.createElement(y.Fragment,null,o&&y.createElement(q,{sideCar:bq,removeScrollBar:n,shards:p,noRelative:r,noIsolation:s,inert:t,setCallbacks:j,allowPinchZoom:!!u,lockRef:g,gapMode:w}),k?y.cloneElement(y.Children.only(l),bj(bj({},A),{ref:z})):y.createElement(void 0===v?"div":v,bj({},A,{className:m,ref:z}),l))});bs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},bs.classNames={fullWidth:bm,zeroRight:bl};var bt=function(a){var b=a.sideCar,c=bk(a,["sideCar"]);if(!b)throw Error("Sidecar: please provide `sideCar` property to import the right car");var d=b.read();if(!d)throw Error("Sidecar medium not found");return y.createElement(d,bj({},c))};bt.isSideCarExport=!0;var bu=function(){var a=0,b=null;return{add:function(c){if(0==a&&(b=function(){if(!document)return null;var a=document.createElement("style");a.type="text/css";var b=i||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return b&&a.setAttribute("nonce",b),a}())){var d,e;(d=b).styleSheet?d.styleSheet.cssText=c:d.appendChild(document.createTextNode(c)),e=b,(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}a++},remove:function(){--a||!b||(b.parentNode&&b.parentNode.removeChild(b),b=null)}}},bv=function(){var a=bu();return function(b,c){y.useEffect(function(){return a.add(b),function(){a.remove()}},[b&&c])}},bw=function(){var a=bv();return function(b){return a(b.styles,b.dynamic),null}},bx={left:0,top:0,right:0,gap:0},by=bw(),bz="data-scroll-locked",bA=function(a,b,c,d){var e=a.left,f=a.top,g=a.right,h=a.gap;return void 0===c&&(c="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(d,";\n padding-right: ").concat(h,"px ").concat(d,";\n }\n body[").concat(bz,"] {\n overflow: hidden ").concat(d,";\n overscroll-behavior: contain;\n ").concat([b&&"position: relative ".concat(d,";"),"margin"===c&&"\n padding-left: ".concat(e,"px;\n padding-top: ").concat(f,"px;\n padding-right: ").concat(g,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(h,"px ").concat(d,";\n "),"padding"===c&&"padding-right: ".concat(h,"px ").concat(d,";")].filter(Boolean).join(""),"\n }\n \n .").concat(bl," {\n right: ").concat(h,"px ").concat(d,";\n }\n \n .").concat(bm," {\n margin-right: ").concat(h,"px ").concat(d,";\n }\n \n .").concat(bl," .").concat(bl," {\n right: 0 ").concat(d,";\n }\n \n .").concat(bm," .").concat(bm," {\n margin-right: 0 ").concat(d,";\n }\n \n body[").concat(bz,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(h,"px;\n }\n")},bB=function(){var a=parseInt(document.body.getAttribute(bz)||"0",10);return isFinite(a)?a:0},bC=function(){y.useEffect(function(){return document.body.setAttribute(bz,(bB()+1).toString()),function(){var a=bB()-1;a<=0?document.body.removeAttribute(bz):document.body.setAttribute(bz,a.toString())}},[])},bD=function(a){var b=a.noRelative,c=a.noImportant,d=a.gapMode,e=void 0===d?"margin":d;bC();var f=y.useMemo(function(){return void 0===e,bx},[e]);return y.createElement(by,{styles:bA(f,!b,e,c?"":"!important")})},bE=function(a,b){if(!(a instanceof Element))return!1;var c=window.getComputedStyle(a);return"hidden"!==c[b]&&(c.overflowY!==c.overflowX||"TEXTAREA"===a.tagName||"visible"!==c[b])},bF=function(a,b){var c=b.ownerDocument,d=b;do{if("u">typeof ShadowRoot&&d instanceof ShadowRoot&&(d=d.host),bG(a,d)){var e=bH(a,d);if(e[1]>e[2])return!0}d=d.parentNode}while(d&&d!==c.body)return!1},bG=function(a,b){return"v"===a?bE(b,"overflowY"):bE(b,"overflowX")},bH=function(a,b){return"v"===a?[b.scrollTop,b.scrollHeight,b.clientHeight]:[b.scrollLeft,b.scrollWidth,b.clientWidth]},bI=function(a,b,c,d,e){var f,g=(f=window.getComputedStyle(b).direction,"h"===a&&"rtl"===f?-1:1),h=g*d,i=c.target,j=b.contains(i),k=!1,l=h>0,m=0,n=0;do{if(!i)break;var o=bH(a,i),p=o[0],q=o[1]-o[2]-g*p;(p||q)&&bG(a,i)&&(m+=q,n+=p);var r=i.parentNode;i=r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r.host:r}while(!j&&i!==document.body||j&&(b.contains(i)||b===i))return l&&(e&&1>Math.abs(m)||!e&&h>m)?k=!0:!l&&(e&&1>Math.abs(n)||!e&&-h>n)&&(k=!0),k},bJ=function(a){return"changedTouches"in a?[a.changedTouches[0].clientX,a.changedTouches[0].clientY]:[0,0]},bK=function(a){return[a.deltaX,a.deltaY]},bL=function(a){return a&&"current"in a?a.current:a},bM=0,bN=[];let bO=(g=function(a){var b=y.useRef([]),c=y.useRef([0,0]),d=y.useRef(),e=y.useState(bM++)[0],f=y.useState(bw)[0],g=y.useRef(a);y.useEffect(function(){g.current=a},[a]),y.useEffect(function(){if(a.inert){document.body.classList.add("block-interactivity-".concat(e));var b=(function(a,b,c){if(c||2==arguments.length)for(var d,e=0,f=b.length;e<f;e++)!d&&e in b||(d||(d=Array.prototype.slice.call(b,0,e)),d[e]=b[e]);return a.concat(d||Array.prototype.slice.call(b))})([a.lockRef.current],(a.shards||[]).map(bL),!0).filter(Boolean);return b.forEach(function(a){return a.classList.add("allow-interactivity-".concat(e))}),function(){document.body.classList.remove("block-interactivity-".concat(e)),b.forEach(function(a){return a.classList.remove("allow-interactivity-".concat(e))})}}},[a.inert,a.lockRef.current,a.shards]);var h=y.useCallback(function(a,b){if("touches"in a&&2===a.touches.length||"wheel"===a.type&&a.ctrlKey)return!g.current.allowPinchZoom;var e,f=bJ(a),h=c.current,i="deltaX"in a?a.deltaX:h[0]-f[0],j="deltaY"in a?a.deltaY:h[1]-f[1],k=a.target,l=Math.abs(i)>Math.abs(j)?"h":"v";if("touches"in a&&"h"===l&&"range"===k.type)return!1;var m=window.getSelection(),n=m&&m.anchorNode;if(n&&(n===k||n.contains(k)))return!1;var o=bF(l,k);if(!o)return!0;if(o?e=l:(e="v"===l?"h":"v",o=bF(l,k)),!o)return!1;if(!d.current&&"changedTouches"in a&&(i||j)&&(d.current=e),!e)return!0;var p=d.current||e;return bI(p,b,a,"h"===p?i:j,!0)},[]),i=y.useCallback(function(a){if(bN.length&&bN[bN.length-1]===f){var c="deltaY"in a?bK(a):bJ(a),d=b.current.filter(function(b){var d;return b.name===a.type&&(b.target===a.target||a.target===b.shadowParent)&&(d=b.delta,d[0]===c[0]&&d[1]===c[1])})[0];if(d&&d.should){a.cancelable&&a.preventDefault();return}if(!d){var e=(g.current.shards||[]).map(bL).filter(Boolean).filter(function(b){return b.contains(a.target)});(e.length>0?h(a,e[0]):!g.current.noIsolation)&&a.cancelable&&a.preventDefault()}}},[]),j=y.useCallback(function(a,c,d,e){var f={name:a,delta:c,target:d,should:e,shadowParent:function(a){for(var b=null;null!==a;)a instanceof ShadowRoot&&(b=a.host,a=a.host),a=a.parentNode;return b}(d)};b.current.push(f),setTimeout(function(){b.current=b.current.filter(function(a){return a!==f})},1)},[]),k=y.useCallback(function(a){c.current=bJ(a),d.current=void 0},[]),l=y.useCallback(function(b){j(b.type,bK(b),b.target,h(b,a.lockRef.current))},[]),m=y.useCallback(function(b){j(b.type,bJ(b),b.target,h(b,a.lockRef.current))},[]);y.useEffect(function(){return bN.push(f),a.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:m}),document.addEventListener("wheel",i,!1),document.addEventListener("touchmove",i,!1),document.addEventListener("touchstart",k,!1),function(){bN=bN.filter(function(a){return a!==f}),document.removeEventListener("wheel",i,!1),document.removeEventListener("touchmove",i,!1),document.removeEventListener("touchstart",k,!1)}},[]);var n=a.removeScrollBar,o=a.inert;return y.createElement(y.Fragment,null,o?y.createElement(f,{styles:"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")}):null,n?y.createElement(bD,{noRelative:a.noRelative,gapMode:a.gapMode}):null)},bq.useMedium(g),bt);var bP=y.forwardRef(function(a,b){return y.createElement(bs,bj({},a,{ref:b,sideCar:bO}))});bP.classNames=bs.classNames;var bQ=new WeakMap,bR=new WeakMap,bS={},bT=0,bU=function(a){return a&&(a.host||bU(a.parentNode))},bV=function(a,b,c,d){var e=(Array.isArray(a)?a:[a]).map(function(a){if(b.contains(a))return a;var c=bU(a);return c&&b.contains(c)?c:(console.error("aria-hidden",a,"in not contained inside",b,". Doing nothing"),null)}).filter(function(a){return!!a});bS[c]||(bS[c]=new WeakMap);var f=bS[c],g=[],h=new Set,i=new Set(e),j=function(a){!a||h.has(a)||(h.add(a),j(a.parentNode))};e.forEach(j);var k=function(a){!a||i.has(a)||Array.prototype.forEach.call(a.children,function(a){if(h.has(a))k(a);else try{var b=a.getAttribute(d),e=null!==b&&"false"!==b,i=(bQ.get(a)||0)+1,j=(f.get(a)||0)+1;bQ.set(a,i),f.set(a,j),g.push(a),1===i&&e&&bR.set(a,!0),1===j&&a.setAttribute(c,"true"),e||a.setAttribute(d,"true")}catch(b){console.error("aria-hidden: cannot operate on ",a,b)}})};return k(b),h.clear(),bT++,function(){g.forEach(function(a){var b=bQ.get(a)-1,e=f.get(a)-1;bQ.set(a,b),f.set(a,e),b||(bR.has(a)||a.removeAttribute(d),bR.delete(a)),e||a.removeAttribute(c)}),--bT||(bQ=new WeakMap,bQ=new WeakMap,bR=new WeakMap,bS={})}},bW=function(a,b,c){void 0===c&&(c="data-aria-hidden");var d=Array.from(Array.isArray(a)?a:[a]),e=b||("u"<typeof document?null:(Array.isArray(a)?a[0]:a).ownerDocument.body);return e?(d.push.apply(d,Array.from(e.querySelectorAll("[aria-live], script"))),bV(d,e,c,"aria-hidden")):function(){return null}},bX=Object.defineProperty,bY=(a,b)=>bX(a,"name",{value:b,configurable:!0}),bZ="Dialog",[b$,b_]=T(bZ),[b0,b1]=b$(bZ),b2=bY(a=>{let{__scopeDialog:b,children:c,open:d,defaultOpen:e,onOpenChange:f,modal:g=!0}=a,h=y.useRef(null),i=y.useRef(null),[k,l]=af({prop:d,defaultProp:e??!1,onChange:f,caller:bZ}),[m,n]=y.useState(0),[o,p]=y.useState(0);return(0,j.jsx)(b0,{scope:b,triggerRef:h,contentRef:i,contentId:Z(),titleId:Z(),descriptionId:Z(),titlePresent:m>0,descriptionPresent:o>0,setTitleCount:n,setDescriptionCount:p,open:k,onOpenChange:l,onOpenToggle:y.useCallback(()=>l(a=>!a),[l]),modal:g,children:c})},"Dialog"),b3="DialogPortal",[b4,b5]=b$(b3,{forceMount:void 0}),b6=bY(a=>{let{__scopeDialog:b,forceMount:c,children:d,container:e}=a,f=b1(b3,b);return(0,j.jsx)(b4,{scope:b,forceMount:c,children:y.Children.map(d,a=>(0,j.jsx)(a7,{present:c||f.open,children:(0,j.jsx)(a3,{asChild:!0,container:e,children:a})}))})},"DialogPortal"),b7="DialogOverlay",b8=y.forwardRef(bY(function(a,b){let c=b5(b7,a.__scopeDialog),{forceMount:d=c.forceMount,...e}=a,f=b1(b7,a.__scopeDialog);return f.modal?(0,j.jsx)(a7,{present:d||f.open,children:(0,j.jsx)(ca,{...e,ref:b})}):null},"DialogOverlay")),b9=am("DialogOverlay.RemoveScroll"),ca=y.forwardRef(bY(function(a,b){let{__scopeDialog:c,...d}=a,e=b1(b7,c),f=Q(b,aH());return(0,j.jsx)(bP,{as:b9,allowPinchZoom:!0,shards:[e.contentRef],children:(0,j.jsx)(az.div,{"data-state":cg(e.open),...d,ref:f,style:{pointerEvents:"auto",...d.style}})})},"DialogOverlayImpl")),cb="DialogContent",cc=y.forwardRef(bY(function(a,b){let c=b5(cb,a.__scopeDialog),{forceMount:d=c.forceMount,...e}=a,f=b1(cb,a.__scopeDialog);return(0,j.jsx)(a7,{present:d||f.open,children:f.modal?(0,j.jsx)(cd,{...e,ref:b}):(0,j.jsx)(ce,{...e,ref:b})})},"DialogContent")),cd=y.forwardRef(bY(function(a,b){let c=b1(cb,a.__scopeDialog),d=y.useRef(null),e=Q(b,c.contentRef,d);return y.useEffect(()=>{let a=d.current;if(a)return bW(a)},[]),(0,j.jsx)(cf,{...a,ref:e,trapFocus:c.open,disableOutsidePointerEvents:c.open,onCloseAutoFocus:J(a.onCloseAutoFocus,a=>{a.preventDefault(),c.triggerRef.current?.focus()}),onPointerDownOutside:J(a.onPointerDownOutside,a=>{let b=a.detail.originalEvent,c=0===b.button&&!0===b.ctrlKey;(2===b.button||c)&&a.preventDefault()}),onFocusOutside:J(a.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),ce=y.forwardRef(bY(function(a,b){let c=b1(cb,a.__scopeDialog),d=y.useRef(!1),e=y.useRef(!1);return(0,j.jsx)(cf,{...a,ref:b,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:b=>{a.onCloseAutoFocus?.(b),b.defaultPrevented||(d.current||c.triggerRef.current?.focus(),b.preventDefault()),d.current=!1,e.current=!1},onInteractOutside:b=>{a.onInteractOutside?.(b),b.defaultPrevented||(d.current=!0,"pointerdown"===b.detail.originalEvent.type&&(e.current=!0));let f=b.target;c.triggerRef.current?.contains(f)&&b.preventDefault(),"focusin"===b.detail.originalEvent.type&&e.current&&b.preventDefault()}})},"DialogContentNonModal")),cf=y.forwardRef(bY(function(a,b){let{__scopeDialog:c,trapFocus:d,onOpenAutoFocus:e,onCloseAutoFocus:f,...g}=a,h=b1(cb,c);return bh(),(0,j.jsx)(j.Fragment,{children:(0,j.jsx)(aS,{asChild:!0,loop:!0,trapped:d,onMountAutoFocus:e,onUnmountAutoFocus:f,children:(0,j.jsx)(aG,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionPresent?h.descriptionId:void 0,"aria-labelledby":h.titlePresent?h.titleId:void 0,"data-state":cg(h.open),...g,ref:b,deferPointerDownOutside:!0,onDismiss:()=>h.onOpenChange(!1)})})})},"DialogContentImpl"));function cg(a){return a?"open":"closed"}bY(cg,"getState");var ch='[cmdk-group=""]',ci='[cmdk-group-items=""]',cj='[cmdk-item=""]',ck=`${cj}:not([aria-disabled="true"])`,cl="cmdk-item-select",cm="data-value",cn=(a,b,c)=>{var d;return d=a,function a(b,c,d,e,f,g,h){if(g===c.length)return f===b.length?1:.99;var i=`${f},${g}`;if(void 0!==h[i])return h[i];for(var j,k,l,m,n=e.charAt(g),o=d.indexOf(n,f),p=0;o>=0;)(j=a(b,c,d,e,o+1,g+1,h))>p&&(o===f?j*=1:C.test(b.charAt(o-1))?(j*=.8,(l=b.slice(f,o-1).match(D))&&f>0&&(j*=Math.pow(.999,l.length))):E.test(b.charAt(o-1))?(j*=.9,(m=b.slice(f,o-1).match(F))&&f>0&&(j*=Math.pow(.999,m.length))):(j*=.17,f>0&&(j*=Math.pow(.999,o-f))),b.charAt(o)!==c.charAt(g)&&(j*=.9999)),(j<.1&&d.charAt(o-1)===e.charAt(g+1)||e.charAt(g+1)===e.charAt(g)&&d.charAt(o-1)!==e.charAt(g))&&.1*(k=a(b,c,d,e,o+1,g+2,h))>j&&(j=.1*k),j>p&&(p=j),o=d.indexOf(n,o+1);return h[i]=p,p}(d=c&&c.length>0?`${d+" "+c.join(" ")}`:d,b,G(d),G(b),0,0,{})},co=y.createContext(void 0),cp=y.createContext(void 0),cq=y.createContext(void 0),cr=y.forwardRef((a,b)=>{let c=cB(()=>{var b,c;return{search:"",value:null!=(c=null!=(b=a.value)?b:a.defaultValue)?c:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),d=cB(()=>new Set),e=cB(()=>new Map),f=cB(()=>new Map),g=cB(()=>new Set),h=cz(a),{label:i,children:j,value:k,onValueChange:l,filter:m,shouldFilter:n,loop:o,disablePointerSelection:p=!1,vimBindings:q=!0,...r}=a,s=Z(),t=Z(),u=Z(),v=y.useRef(null),w=cE();cA(()=>{if(void 0!==k){let a=k.trim();c.current.value=a,x.emit()}},[k]),cA(()=>{w(6,E)},[]);let x=y.useMemo(()=>({subscribe:a=>(g.current.add(a),()=>g.current.delete(a)),snapshot:()=>c.current,setState:(a,b,d)=>{var e,f,g,i;if(!Object.is(c.current[a],b)){if(c.current[a]=b,"search"===a)D(),B(),w(1,C);else if("value"===a){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let a=document.getElementById(u);a?a.focus():null==(e=document.getElementById(s))||e.focus()}if(w(7,()=>{var a;c.current.selectedItemId=null==(a=F())?void 0:a.id,x.emit()}),d||w(5,E),(null==(f=h.current)?void 0:f.value)!==void 0){null==(i=(g=h.current).onValueChange)||i.call(g,null!=b?b:"");return}}x.emit()}},emit:()=>{g.current.forEach(a=>a())}}),[]),z=y.useMemo(()=>({value:(a,b,d)=>{var e;b!==(null==(e=f.current.get(a))?void 0:e.value)&&(f.current.set(a,{value:b,keywords:d}),c.current.filtered.items.set(a,A(b,d)),w(2,()=>{B(),x.emit()}))},item:(a,b)=>(d.current.add(a),b&&(e.current.has(b)?e.current.get(b).add(a):e.current.set(b,new Set([a]))),w(3,()=>{D(),B(),c.current.value||C(),x.emit()}),()=>{f.current.delete(a),d.current.delete(a),c.current.filtered.items.delete(a);let b=F();w(4,()=>{D(),(null==b?void 0:b.getAttribute("id"))===a&&C(),x.emit()})}),group:a=>(e.current.has(a)||e.current.set(a,new Set),()=>{f.current.delete(a),e.current.delete(a)}),filter:()=>h.current.shouldFilter,label:i||a["aria-label"],getDisablePointerSelection:()=>h.current.disablePointerSelection,listId:s,inputId:u,labelId:t,listInnerRef:v}),[]);function A(a,b){var d,e;let f=null!=(e=null==(d=h.current)?void 0:d.filter)?e:cn;return a?f(a,c.current.search,b):0}function B(){if(!c.current.search||!1===h.current.shouldFilter)return;let a=c.current.filtered.items,b=[];c.current.filtered.groups.forEach(c=>{let d=e.current.get(c),f=0;d.forEach(b=>{f=Math.max(a.get(b),f)}),b.push([c,f])});let d=v.current;G().sort((b,c)=>{var d,e;let f=b.getAttribute("id"),g=c.getAttribute("id");return(null!=(d=a.get(g))?d:0)-(null!=(e=a.get(f))?e:0)}).forEach(a=>{let b=a.closest(ci);b?b.appendChild(a.parentElement===b?a:a.closest(`${ci} > *`)):d.appendChild(a.parentElement===d?a:a.closest(`${ci} > *`))}),b.sort((a,b)=>b[1]-a[1]).forEach(a=>{var b;let c=null==(b=v.current)?void 0:b.querySelector(`${ch}[${cm}="${encodeURIComponent(a[0])}"]`);null==c||c.parentElement.appendChild(c)})}function C(){let a=G().find(a=>"true"!==a.getAttribute("aria-disabled")),b=null==a?void 0:a.getAttribute(cm);x.setState("value",b||void 0)}function D(){var a,b,g,i;if(!c.current.search||!1===h.current.shouldFilter){c.current.filtered.count=d.current.size;return}c.current.filtered.groups=new Set;let j=0;for(let e of d.current){let d=A(null!=(b=null==(a=f.current.get(e))?void 0:a.value)?b:"",null!=(i=null==(g=f.current.get(e))?void 0:g.keywords)?i:[]);c.current.filtered.items.set(e,d),d>0&&j++}for(let[a,b]of e.current)for(let d of b)if(c.current.filtered.items.get(d)>0){c.current.filtered.groups.add(a);break}c.current.filtered.count=j}function E(){var a,b,c;let d=F();d&&((null==(a=d.parentElement)?void 0:a.firstChild)===d&&(null==(c=null==(b=d.closest(ch))?void 0:b.querySelector('[cmdk-group-heading=""]'))||c.scrollIntoView({block:"nearest"})),d.scrollIntoView({block:"nearest"}))}function F(){var a;return null==(a=v.current)?void 0:a.querySelector(`${cj}[aria-selected="true"]`)}function G(){var a;return Array.from((null==(a=v.current)?void 0:a.querySelectorAll(ck))||[])}function H(a){let b=G()[a];b&&x.setState("value",b.getAttribute(cm))}function I(a){var b;let c=F(),d=G(),e=d.findIndex(a=>a===c),f=d[e+a];null!=(b=h.current)&&b.loop&&(f=e+a<0?d[d.length-1]:e+a===d.length?d[0]:d[e+a]),f&&x.setState("value",f.getAttribute(cm))}function J(a){let b=F(),c=null==b?void 0:b.closest(ch),d;for(;c&&!d;)d=null==(c=a>0?function(a,b){let c=a.nextElementSibling;for(;c;){if(c.matches(b))return c;c=c.nextElementSibling}}(c,ch):function(a,b){let c=a.previousElementSibling;for(;c;){if(c.matches(b))return c;c=c.previousElementSibling}}(c,ch))?void 0:c.querySelector(ck);d?x.setState("value",d.getAttribute(cm)):I(a)}let K=()=>H(G().length-1),L=a=>{a.preventDefault(),a.metaKey?K():a.altKey?J(1):I(1)},M=a=>{a.preventDefault(),a.metaKey?H(0):a.altKey?J(-1):I(-1)};return y.createElement(az.div,{ref:b,tabIndex:-1,...r,"cmdk-root":"",onKeyDown:a=>{var b;null==(b=r.onKeyDown)||b.call(r,a);let c=a.nativeEvent.isComposing||229===a.keyCode;if(!(a.defaultPrevented||c))switch(a.key){case"n":case"j":q&&a.ctrlKey&&L(a);break;case"ArrowDown":L(a);break;case"p":case"k":q&&a.ctrlKey&&M(a);break;case"ArrowUp":M(a);break;case"Home":a.preventDefault(),H(0);break;case"End":a.preventDefault(),K();break;case"Enter":{a.preventDefault();let b=F();if(b){let a=new Event(cl);b.dispatchEvent(a)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:z.inputId,id:z.labelId,style:cG},i),cF(a,a=>y.createElement(cp.Provider,{value:x},y.createElement(co.Provider,{value:z},a))))}),cs=y.forwardRef((a,b)=>{var c,d;let e=Z(),f=y.useRef(null),g=y.useContext(cq),h=y.useContext(co),i=cz(a),j=null!=(d=null==(c=i.current)?void 0:c.forceMount)?d:null==g?void 0:g.forceMount;cA(()=>{if(!j)return h.item(e,null==g?void 0:g.id)},[j]);let k=cD(e,f,[a.value,a.children,f],a.keywords),l=y.useContext(cp),m=cC(a=>a.value&&a.value===k.current),n=cC(a=>!!j||!1===h.filter()||!a.search||a.filtered.items.get(e)>0);function o(){var a,b;p(),null==(b=(a=i.current).onSelect)||b.call(a,k.current)}function p(){l.setState("value",k.current,!0)}if(y.useEffect(()=>{let b=f.current;if(!(!b||a.disabled))return b.addEventListener(cl,o),()=>b.removeEventListener(cl,o)},[n,a.onSelect,a.disabled]),!n)return null;let{disabled:q,value:r,onSelect:s,forceMount:t,keywords:u,...v}=a;return y.createElement(az.div,{ref:P(f,b),...v,id:e,"cmdk-item":"",role:"option","aria-disabled":!!q,"aria-selected":!!m,"data-disabled":!!q,"data-selected":!!m,onPointerMove:q||h.getDisablePointerSelection()?void 0:p,onClick:q?void 0:o},a.children)}),ct=y.forwardRef((a,b)=>{let{heading:c,children:d,forceMount:e,...f}=a,g=Z(),h=y.useRef(null),i=y.useRef(null),j=Z(),k=y.useContext(co),l=cC(a=>!!e||!1===k.filter()||!a.search||a.filtered.groups.has(g));cA(()=>k.group(g),[]),cD(g,h,[a.value,a.heading,i]);let m=y.useMemo(()=>({id:g,forceMount:e}),[e]);return y.createElement(az.div,{ref:P(h,b),...f,"cmdk-group":"",role:"presentation",hidden:!l||void 0},c&&y.createElement("div",{ref:i,"cmdk-group-heading":"","aria-hidden":!0,id:j},c),cF(a,a=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":c?j:void 0},y.createElement(cq.Provider,{value:m},a))))}),cu=y.forwardRef((a,b)=>{let{alwaysRender:c,...d}=a,e=y.useRef(null),f=cC(a=>!a.search);return c||f?y.createElement(az.div,{ref:P(e,b),...d,"cmdk-separator":"",role:"separator"}):null}),cv=y.forwardRef((a,b)=>{let{onValueChange:c,...d}=a,e=null!=a.value,f=y.useContext(cp),g=cC(a=>a.search),h=cC(a=>a.selectedItemId),i=y.useContext(co);return y.useEffect(()=>{null!=a.value&&f.setState("search",a.value)},[a.value]),y.createElement(az.input,{ref:b,...d,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":i.listId,"aria-labelledby":i.labelId,"aria-activedescendant":h,id:i.inputId,type:"text",value:e?a.value:g,onChange:a=>{e||f.setState("search",a.target.value),null==c||c(a.target.value)}})}),cw=y.forwardRef((a,b)=>{let{children:c,label:d="Suggestions",...e}=a,f=y.useRef(null),g=y.useRef(null),h=cC(a=>a.selectedItemId),i=y.useContext(co);return y.useEffect(()=>{if(g.current&&f.current){let a=g.current,b=f.current,c,d=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let c=a.offsetHeight;b.style.setProperty("--cmdk-list-height",c.toFixed(1)+"px")})});return d.observe(a),()=>{cancelAnimationFrame(c),d.unobserve(a)}}},[]),y.createElement(az.div,{ref:P(f,b),...e,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":h,"aria-label":d,id:i.listId},cF(a,a=>y.createElement("div",{ref:P(g,i.listInnerRef),"cmdk-list-sizer":""},a)))}),cx=y.forwardRef((a,b)=>{let{open:c,onOpenChange:d,overlayClassName:e,contentClassName:f,container:g,...h}=a;return y.createElement(b2,{open:c,onOpenChange:d},y.createElement(b6,{container:g},y.createElement(b8,{"cmdk-overlay":"",className:e}),y.createElement(cc,{"aria-label":a.label,"cmdk-dialog":"",className:f},y.createElement(cr,{ref:b,...h}))))}),cy=Object.assign(cr,{List:cw,Item:cs,Input:cv,Group:ct,Separator:cu,Dialog:cx,Empty:y.forwardRef((a,b)=>cC(a=>0===a.filtered.count)?y.createElement(az.div,{ref:b,...a,"cmdk-empty":"",role:"presentation"}):null),Loading:y.forwardRef((a,b)=>{let{progress:c,children:d,label:e="Loading...",...f}=a;return y.createElement(az.div,{ref:b,...f,"cmdk-loading":"",role:"progressbar","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":100,"aria-label":e},cF(a,a=>y.createElement("div",{"aria-hidden":!0},a)))})});function cz(a){let b=y.useRef(a);return cA(()=>{b.current=a}),b}var cA=y.useEffect;function cB(a){let b=y.useRef();return void 0===b.current&&(b.current=a()),b}function cC(a){let b=y.useContext(cp),c=()=>a(b.snapshot());return y.useSyncExternalStore(b.subscribe,c,c)}function cD(a,b,c,d=[]){let e=y.useRef(),f=y.useContext(co);return cA(()=>{var g;let h=(()=>{var a;for(let b of c){if("string"==typeof b)return b.trim();if("object"==typeof b&&"current"in b)return b.current?null==(a=b.current.textContent)?void 0:a.trim():e.current}})(),i=d.map(a=>a.trim());f.value(a,h,i),null==(g=b.current)||g.setAttribute(cm,h),e.current=h}),e}var cE=()=>{let[a,b]=y.useState(),c=cB(()=>new Map);return cA(()=>{c.current.forEach(a=>a()),c.current=new Map},[a]),(a,d)=>{c.current.set(a,d),b({})}};function cF({asChild:a,children:b},c){let d;return a&&y.isValidElement(b)?y.cloneElement("function"==typeof(d=b.type)?d(b.props):"render"in d?d.render(b.props):b,{ref:b.ref},c(b.props.children)):c(b)}var cG={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},cH=a.i(763802),cI=a.i(645766),cI=cI;a.i(965733);var cJ=a.i(400187),cK=a.i(205522),cL=a.i(546893),cM=a.i(497895);function cN({className:a,...b}){return(0,j.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,cM.cn)("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",a),...b})}let cO=(0,cJ.cva)("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function cP({className:a,align:b="inline-start",...c}){return(0,j.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":b,className:(0,cM.cn)(cO({align:b}),a),onClick:a=>{a.target.closest("button")||a.currentTarget.parentElement?.querySelector("input")?.focus()},...c})}function cQ({className:a,...b}){return(0,j.jsx)("span",{className:(0,cM.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",a),...b})}function cR({className:a,...b}){return(0,j.jsx)(cK.Input,{"data-slot":"input-group-control",className:(0,cM.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",a),...b})}function cS({className:a,...b}){return(0,j.jsx)(cy,{"data-slot":"command",className:(0,cM.cn)("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",a),...b})}function cT({className:a,...b}){return(0,j.jsx)("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:(0,j.jsxs)(cN,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[(0,j.jsx)(cy.Input,{"data-slot":"command-input",className:(0,cM.cn)("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",a),...b}),(0,j.jsx)(cP,{children:(0,j.jsx)(cI.default,{className:"size-4 shrink-0 opacity-50"})})]})})}function cU({className:a,...b}){return(0,j.jsx)(cy.List,{"data-slot":"command-list",className:(0,cM.cn)("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",a),...b})}function cV({className:a,...b}){return(0,j.jsx)(cy.Empty,{"data-slot":"command-empty",className:(0,cM.cn)("py-6 text-center text-sm",a),...b})}function cW({className:a,...b}){return(0,j.jsx)(cy.Group,{"data-slot":"command-group",className:(0,cM.cn)("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",a),...b})}function cX({className:a,children:b,...c}){return(0,j.jsxs)(cy.Item,{"data-slot":"command-item",className:(0,cM.cn)("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",a),...c,children:[b,(0,j.jsx)(cH.CheckIcon,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}(0,cJ.cva)("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});var cY=a.i(446181),cZ=a.i(545097),c$=a.i(950463),c_=a.i(280281),c0=a.i(654816),c1=a.i(287702),c2=a.i(908531),c3=a.i(608902),c4=a.i(61876),c5=a.i(405050);let c6=(0,c5.createServerReference)("7f1b428bbf9d3ad8a17159b23f48e6fb481a9ec411",c5.callServer,void 0,c5.findSourceMapURL,"clearOwnLineAction"),c7=(0,c5.createServerReference)("7f2f5739dddd856b1315cd5f9858095f9c9e33b1be",c5.callServer,void 0,c5.findSourceMapURL,"createBotAction");var c8=a.i(133036);let c9=(0,c5.createServerReference)("7fbd40eb4c3e7b8e0daecaf70efd5b7f179cb7a4fa",c5.callServer,void 0,c5.findSourceMapURL,"deleteBotAction"),da=(0,c5.createServerReference)("7fbce9b6a5edb4b9f8d0380c0d5a9702e8467935dc",c5.callServer,void 0,c5.findSourceMapURL,"setBotMemoryOnAction"),db=(0,c5.createServerReference)("7f08863e32b677acd9a0a3a760d7331e8a9f79de5b",c5.callServer,void 0,c5.findSourceMapURL,"updateBotAction");var dc=a.i(411509),dd=a.i(398026),de=a.i(913834),df=a.i(704974),dg=a.i(324835);function dh({color:a,themePicked:b,onTheme:c,onPick:d,paint:e,onPaint:f}){return(0,j.jsxs)("div",{className:"flex w-full items-center justify-center gap-1.5 px-2",children:[(0,j.jsx)(df.Swatch,{color:null,picked:b,onPick:c}),dg.MARK_PALETTE.map(b=>(0,j.jsx)(df.Swatch,{color:b,picked:a===b,onPick:()=>d(b)},b)),f&&dg.MARK_PAINT_IDS.map(a=>(0,j.jsx)(df.Swatch,{color:null,background:(0,dg.paintSwatch)(a),label:dg.MARK_PAINTS[a].label,picked:e===a,onPick:()=>f(a)},a))]})}var di=a.i(135432),dj=a.i(478978),dk=a.i(619477),dl=a.i(28996),dm=a.i(369768),dn=a.i(559553),dp=a.i(530365),dq=a.i(613842),dr=a.i(30681),ds=a.i(199169),dt=a.i(313237),du=a.i(759497);let dv=" new",dw=(0,x.default)(async()=>{},{loadableGenerated:{modules:[590714]},ssr:!1});function dx({bot:a,job:b,active:c,onPick:d}){var e,f,g;let h=(e=b,f=a.lastJobAt,g=a.disabled,e?.status==="waiting"?{text:"waiting on you",shine:!0,amber:!0}:e?.status==="running"?{text:`working \xb7 ${e.label}`,shine:!0}:g?{text:"off"}:e?{text:`idle \xb7 last job ${dy(e.updatedAt)}`}:f?{text:`idle \xb7 last job ${dy(f)}`}:{text:"idle · no jobs yet"});return(0,j.jsxs)("button",{type:"button",onClick:d,className:(0,cM.cn)("mx-2 flex items-center gap-2.5 rounded-md px-2 py-2 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",c?dk.PICKED_ROW:"hover:bg-muted/60"),children:[(0,j.jsx)(de.BotMark,{size:32,...dF(a.name,a.icon),state:b?.status==="running"?"thinking":"idle",notify:b?.status==="waiting",crossed:b?.status==="cancelled",className:(0,cM.cn)("shrink-0",a.disabled&&"opacity-45")}),(0,j.jsxs)("span",{className:(0,cM.cn)("min-w-0 flex-1 space-y-0.5",a.disabled&&"opacity-45"),children:[(0,j.jsx)("span",{className:(0,cM.cn)("block truncate text-[13px]",c?"font-medium":"text-foreground/90"),children:a.name}),h.shine?(0,j.jsx)(cZ.ShinyText,{text:h.text,tone:h.amber?"waiting":"muted",className:"block truncate font-mono text-[11px] leading-4"}):(0,j.jsx)("span",{className:"block truncate font-mono text-[11px] leading-4 text-muted-foreground",children:h.text})]})]})}function dy(a){let b=(0,ds.shortAgo)(a);return"now"===b?"just now":`${b} ago`}function dz(a,b){let c=Math.max(0,c1.BOT_ROSTER.max-a.size),[d,e]=(0,y.useState)(()=>new Set(dd.BOT_SEEDS.filter(b=>!a.has(b.name)).slice(c).map(a=>a.name))),[f,g]=(0,dt.useServerAction)(c8.createSeedBotsAction,{onOk:a=>{(0,du.revalidate)(A.queryKey.bot),b(a.created[0]??null)}}),{data:h}=(0,du.useServerRoute)(A.queryKey.config),{data:i}=(0,du.useServerRoute)(A.queryKey.llmModel),j=i?.find(a=>a.signIn),k=j?.hasKey?{plan:j.plan??null}:null,l=dd.BOT_SEEDS.filter(b=>!a.has(b.name)),m=l.filter(a=>!d.has(a.name)),n=c<l.length,o=m.length>=c,p=`${c} more ${1===c?"fits":"fit"}`;return{isSet:a=>(0,dj.isConfigSet)(h,a),signIn:k,adding:g,addable:l,wanted:m,limited:n,note:n?o?`${p} \xb7 untick one to pick another`:`${m.length} ticked \xb7 ${p}`:0===m.length?"nothing ticked":`${m.length} of ${l.length} ticked`,ticked:b=>a.has(b.name)||!d.has(b.name),blocked:b=>!a.has(b.name)&&d.has(b.name)&&o,toggle:a=>e(b=>{let c=new Set(b);return c.has(a)?o||c.delete(a):c.add(a),c}),submit:()=>f(m.map(a=>({name:a.name})))}}function dA({have:a,picks:b}){return(0,j.jsx)("div",{className:"flex flex-col gap-2",children:dd.BOT_SEEDS.map(c=>{var d,e;let f,g=a.has(c.name),h=b.ticked(c),i=b.blocked(c),k=(d=b.isSet,e=b.signIn,(f=(c.requires??[]).filter(a=>!d(dj.MEDIA_MODEL_KEYS[a])&&!(0,c4.planMediaOf)(a,e))).length?`needs ${f.map(dj.mediaModelWords).join(" and ")}`:null);return(0,j.jsx)("div",{className:(0,cM.cn)("rounded-xl ring-1 transition-colors",g||i?"opacity-45 ring-border/60":h?(0,cM.cn)(dk.PICKED_ROW,"ring-brand"):"ring-border/60"),children:(0,j.jsxs)("button",{type:"button",disabled:g||i||b.adding,"aria-pressed":h,onClick:()=>b.toggle(c.name),className:"flex w-full items-center gap-3 rounded-xl px-3.5 py-2.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default",children:[(0,j.jsx)(de.BotMark,{size:28,...dF(c.name,c.icon),className:(0,cM.cn)("shrink-0 transition-opacity",!h&&"opacity-35")}),(0,j.jsxs)("span",{className:"min-w-0 flex-1 space-y-px",children:[(0,j.jsx)("span",{className:"block text-[14px] leading-[18px] font-medium",children:c.name}),(0,j.jsx)("span",{className:"block truncate text-[12px] leading-[17px] text-muted-foreground",children:c.hint})]}),g?(0,j.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:"already added"}):k?(0,j.jsxs)("span",{className:(0,cM.cn)("flex shrink-0 items-center gap-1.5 font-mono text-[11px]",cM.WAITING_INK),children:[(0,j.jsx)(p,{className:"size-3"}),k]}):null,(0,j.jsx)("span",{className:(0,cM.cn)("grid size-5 shrink-0 place-items-center rounded-full transition-colors",h?"bg-brand text-brand-foreground":"ring-1 ring-border/60 ring-inset"),children:h&&(0,j.jsx)(l.Check,{className:"size-3"})})]})},c.name)})})}function dB({picks:a,onCancel:b}){return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(B.Button,{variant:"ghost",onClick:b,children:"Cancel"}),(0,j.jsxs)(B.Button,{loading:a.adding,disabled:0===a.wanted.length,onClick:a.submit,children:[(0,j.jsx)(t.Plus,{}),1===a.wanted.length?`Add ${a.wanted[0].name}`:`Add ${a.wanted.length} bots`]})]})}function dC({have:a,onDone:b}){let c=dz(a,b);return(0,j.jsxs)("div",{className:"flex min-h-full flex-col",children:[(0,j.jsx)("div",{className:"flex h-11 shrink-0 items-center border-b border-border/60 px-4 font-mono text-[11px] text-muted-foreground",children:"Ready-made"}),(0,j.jsxs)("div",{className:"px-8 pt-7 pb-1",children:[(0,j.jsx)("h3",{className:"text-[17px] font-medium tracking-tight",children:"Bots you can add"}),(0,j.jsx)("p",{className:"mt-1.5 max-w-lg text-[13px] leading-relaxed text-muted-foreground break-keep wrap-anywhere",children:"Each one is a starting point — re-prompt it, give it a model of its own. What a bot needs before it can work stands on its row; until then it runs on the app default model."})]}),(0,j.jsx)("div",{className:"px-8 pt-4 pb-8",children:(0,j.jsx)(dA,{have:a,picks:c})}),(0,j.jsxs)("div",{className:"mt-auto flex items-center gap-3 border-t border-border/60 px-8 py-4",children:[(0,j.jsx)("span",{className:"flex-1 font-mono text-[11px] text-muted-foreground",children:c.note}),(0,j.jsx)(dB,{picks:c,onCancel:()=>b(null)})]})]})}function dD({have:a,onDone:b}){let c=dz(a,b);return(0,j.jsx)(dk.SettingDialogContent,{title:"Bots you can add",description:"Each one is a starting point — re-prompt it, give it a model of its own. What a bot needs before it can work stands on its row.",footer:(0,j.jsxs)(j.Fragment,{children:[c.limited&&(0,j.jsx)("span",{className:"flex-1 self-center font-mono text-[11px] text-muted-foreground",children:c.note}),(0,j.jsx)(dB,{picks:c,onCancel:()=>b(null)})]}),children:(0,j.jsx)(dA,{have:a,picks:c})})}function dE({missing:a,have:b,onDone:c}){let d=a.slice(0,3),e=a.length-d.length;return(0,j.jsxs)("button",{type:"button",title:"Ready-made bots","aria-label":`Ready-made bots, ${a.length} on offer`,onClick:()=>cY.notify.component({className:"sm:max-w-xl",renderer:({close:a})=>(0,j.jsx)(dD,{have:b,onDone:b=>{a(),c(b)}})}),className:"flex shrink-0 items-center gap-1 rounded-md px-1.5 py-1 text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,j.jsx)(t.Plus,{className:"size-3 shrink-0"}),d.map((a,b)=>(0,j.jsx)("span",{className:(0,cM.cn)("block",b>0&&"-ml-1.5"),style:{zIndex:d.length-b},children:(0,j.jsx)(de.BotMark,{size:20,...dF(a.name,a.icon),notify:!1})},a.name)),e>0&&(0,j.jsxs)("span",{className:"ml-0.5 shrink-0 font-mono text-[11px] tabular-nums",children:["+",e]})]})}function dF(a,b){return{seed:a||"bot",...(0,de.iconProps)(b)}}function dG({bot:a,jobs:b,desk:c,onDone:d,onDraft:e}){let[f,g]=(0,dr.useObjectState)(()=>({name:a?.name??"",description:a?.description??"",systemPrompt:a?.systemPrompt??"",icon:a?.icon??(0,dc.randomBotIcon)(),provider:a?.provider??null,model:a?.model??"",compactAt:a?.compactAt?String(a.compactAt/1e3):"",effort:a?.effort??null,toolIds:a?.tools.map(a=>a.id)??[]})),{name:h,description:i,systemPrompt:k,icon:l,provider:m,model:n,compactAt:o,effort:p,toolIds:q}=f,r=(0,y.useId)(),[s,t]=(0,y.useState)(!!a?.compactAt),v=(0,du.useServerRoute)((0,c4.isCatalogProvider)(m)?A.queryKey.modelCatalog(m):null),x=(a,b)=>a&&b.trim()?(0,c4.contextWindowOf)(a,b.trim(),v.data):null,z=x(m,n),C=m&&n.trim()?dM(z)/1e3:null,D=s?o:null===C?"":String(C),[E]=(0,dt.useServerAction)(db,{onOk:()=>(0,du.revalidate)(A.queryKey.bot)}),F=b=>{a&&E(a.name,b)},[G,H,,I]=(0,dt.useServerAction)(c7,{errorMessage:!1,okMessage:"Bot created",onOk:a=>{(0,du.revalidate)(A.queryKey.bot),d(a.name)}}),[J,K]=(0,dt.useServerAction)(c9,{okMessage:"Bot deleted",onOk:()=>{(0,du.revalidate)(A.queryKey.bot),d(null)}}),[L,M]=(0,dt.useServerAction)(c6,{onOk:()=>(0,du.revalidate)(A.queryKey.bot)}),N=!!(m&&n.trim()),O=h.trim()&&i.trim()&&!H,P=[!h.trim()&&"a name",!i.trim()&&"a description"].filter(a=>!!a),Q=()=>{O&&G({name:h.trim(),description:i.trim(),systemPrompt:k.trim()||void 0,icon:l,provider:N?m:null,model:N?n.trim():null,compactAt:s?dL(o):N?dM(z):null,effort:p,toolIds:q})},R=(0,y.useRef)(Q);R.current=Q;let S=P.join(",");(0,y.useEffect)(()=>{e?.({missing:S?S.split(","):[],creating:H,submit:()=>R.current()})},[e,S,H]),(0,y.useEffect)(()=>()=>e?.(null),[e]);let T=async()=>{!a||await cY.notify.confirm({title:`Delete ${a.name}?`,description:"Thursday can no longer hand work to it, and what it kept for itself goes with it: its memory and the skills it installed. What it finished stays in Settings › Files, under its name.",okText:"Delete",destructive:!0})&&J(a.name)},U=async()=>{!a||await cY.notify.confirm({title:`Clear ${a.name}'s line?`,description:`${c1.APP_NAME} and the other bots read your description alone again.`,okText:"Clear",destructive:!0})&&L(a.name)};return(0,j.jsxs)("div",{className:"flex min-h-full flex-col",children:[(0,j.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border/60 px-4",children:[(0,j.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-muted-foreground",children:a?a.name:"New bot"}),a&&(0,j.jsxs)(j.Fragment,{children:[a.disabled&&(0,j.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:"off"}),(0,j.jsxs)(c0.Tooltip,{children:[(0,j.jsx)(c0.TooltipTrigger,{render:(0,j.jsx)("span",{className:"mr-1 flex shrink-0"}),children:(0,j.jsx)(c_.Switch,{checked:!a.disabled,onCheckedChange:a=>F({disabled:!a}),"aria-label":`${a.name} on or off`})}),(0,j.jsx)(c0.TooltipContent,{side:"bottom",children:"Thursday can hand it work"})]}),(0,j.jsx)(B.Button,{size:"icon-sm",variant:"ghost",loading:K,"aria-label":"Delete this bot",onClick:T,className:"text-muted-foreground hover:text-destructive",children:(0,j.jsx)(u.Trash2,{})})]})]}),(0,j.jsxs)("div",{className:"flex-1 space-y-5 p-6",children:[a&&c&&(0,j.jsx)(dO,{bot:{name:a.name,icon:l},desk:c}),(0,j.jsx)(dQ,{name:h,icon:l,shown:!(a&&c),onChange:a=>{g({icon:a}),F({icon:a})}}),(0,j.jsxs)(dN,{label:"Name",htmlFor:a?void 0:`${r}-name`,children:[a?(0,j.jsx)("p",{className:"truncate text-sm leading-8 font-medium",children:a.name}):(0,j.jsx)(cK.Input,{id:`${r}-name`,value:h,onChange:a=>g({name:a.target.value}),placeholder:"e.g. researcher",spellCheck:!1,maxLength:c1.COMMON_VALIDATE.name.max,autoFocus:!0}),(0,j.jsx)("p",{className:"text-xs text-muted-foreground",children:a?`What ${c1.APP_NAME} calls it when she hands it work. Fixed once the bot is made.`:`What ${c1.APP_NAME} calls it when she hands it work. Up to ${c1.COMMON_VALIDATE.name.max} characters, and it can’t be renamed later.`})]}),(0,j.jsxs)(dN,{label:"Description",htmlFor:`${r}-description`,children:[(0,j.jsx)(cK.Input,{id:`${r}-description`,value:i,onChange:a=>g({description:a.target.value}),onBlur:()=>{let b=i.trim();a&&b&&b!==a.description&&F({description:b})},placeholder:"e.g. Searches the web and answers",maxLength:c1.COMMON_VALIDATE.description.max}),(0,j.jsxs)("p",{className:"text-xs text-muted-foreground",children:["The one line ",c1.APP_NAME," and the other bots read when they decide who gets a job."]}),a?.ownLine&&(0,j.jsxs)("div",{className:"mt-1 flex items-start gap-2 rounded-lg bg-muted/50 py-2 pr-1.5 pl-2.5",children:[(0,j.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,j.jsx)("p",{className:"text-[13px] leading-[18px]",children:a.ownLine.line}),(0,j.jsxs)("p",{className:"font-mono text-[11px] leading-4 text-muted-foreground",children:["added by ",a.name," · ",(0,ds.whenOf)(new Date(a.ownLine.at))," ·"," ",a.ownLine.reason]})]}),(0,j.jsx)(B.Button,{size:"icon-xs",variant:"ghost",loading:M,"aria-label":"Clear its line",onClick:U,className:"shrink-0 text-muted-foreground",children:(0,j.jsx)(w.X,{})})]}),a&&(0,j.jsxs)("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,j.jsx)(c_.Switch,{checked:!a.descriptionLocked,onCheckedChange:a=>F({descriptionLocked:!a}),"aria-label":`${a.name} may add its own line`}),"It may add its own line when its work changes for good"]})]}),(0,j.jsxs)(dN,{label:"Runs on",children:[(0,j.jsx)("div",{className:"flex items-center gap-3",children:(0,j.jsx)("div",{className:"min-w-0 flex-1",children:(0,j.jsx)(c3.ModelPicker,{provider:m,model:n,onChange:a=>{g({provider:a.provider,model:a.model}),t(!1),a.model&&F({...a,compactAt:dM(x(a.provider,a.model))})},onUnset:()=>{g({provider:null,model:"",effort:null}),t(!1),F({provider:null,model:null,compactAt:null,effort:null})}})})}),(0,j.jsx)("p",{className:"text-xs text-muted-foreground",children:n.trim()?"What this bot thinks with. App default puts it back on the one in Settings › Models.":"App default model, and its effort with it."})]}),(0,j.jsxs)(dN,{label:"Effort",children:[(0,j.jsx)(c2.EffortSwitch,{provider:m,model:n.trim(),value:p,onChange:a=>{g({effort:a}),F({effort:a})}}),(0,j.jsx)("p",{className:"text-xs text-muted-foreground",children:"How hard it thinks, on the steps this model takes. Auto leaves the step to the model."})]}),(0,j.jsxs)(dN,{label:"Compacts at",htmlFor:`${r}-compact`,children:[(0,j.jsxs)(cN,{children:[(0,j.jsx)(cR,{id:`${r}-compact`,inputMode:"decimal",value:D,placeholder:n.trim()?"":"From the app default model",onChange:a=>{t(!0),g({compactAt:a.target.value})},onBlur:()=>{if(!s)return;let a=dL(o);null===a?t(!1):g({compactAt:String(a/1e3)}),F({compactAt:a??(n.trim()?dM(z):null)})}}),(0,j.jsx)(cP,{align:"inline-end",children:(0,j.jsx)(cQ,{children:"k tokens"})})]}),(0,j.jsx)("p",{className:"text-xs text-muted-foreground",children:function(a){let b="A job summarizes itself here and carries on.";if(!a.model)return null===a.shown?`Worked out from the app default model's context window at each run. ${b}`:`Set by hand. Emptied, it is worked out from the app default model again. ${b}`;let c=dM(a.window);return null!==a.shown&&a.shown!==c?`Set by hand. Picking a model fills in its own again. ${b}`:a.window?`${Math.round(100*c1.BOT_RUN.compactHeadroom)}% of this model's ${(a.window/1e3).toLocaleString()}k context window. ${b}`:`This model's context window is unknown, so the default is filled in. ${b}`}({model:n.trim(),window:z,shown:dL(D)})})]}),(0,j.jsx)(dN,{label:"Tools",children:(0,j.jsx)(dR,{selected:q,onChange:a=>{g({toolIds:a}),F({toolIds:a})}})}),(0,j.jsxs)(dN,{label:"Prompt",htmlFor:`${r}-prompt`,children:[(0,j.jsx)(cL.Textarea,{id:`${r}-prompt`,value:k,onChange:a=>g({systemPrompt:a.target.value}),onBlur:()=>{let b=k.trim();a&&b!==(a.systemPrompt??"")&&F({systemPrompt:b})},placeholder:`How it should work (optional). e.g.
2
+ Search the web, answer with a short summary and links.`,maxLength:c1.COMMON_VALIDATE.prompt.max,className:"max-h-48 min-h-24 resize-none overflow-y-auto text-sm"}),k.length>0&&(0,j.jsxs)("p",{className:"text-right font-mono text-[10px] text-muted-foreground",children:[k.length,"/",c1.COMMON_VALIDATE.prompt.max]})]}),a&&(0,j.jsx)(dH,{bot:a.name}),a&&(0,j.jsx)(dP,{jobs:b}),I&&(0,j.jsx)("p",{className:"font-mono text-xs text-destructive",children:I})]})]})}function dH({bot:a}){let b=A.queryKey.botMemoryFiles(a),{data:c,isLoading:d}=(0,du.useServerRoute)(b),[e,f]=(0,y.useState)(null),[g]=(0,dt.useServerAction)(dq.revealFileAction),[h,i]=(0,dt.useServerAction)(dp.deleteWorkspaceFileAction,{okMessage:"File deleted",onOk:()=>{f(null),(0,du.revalidate)(b),(0,du.revalidate)(A.queryKey.workspace)}}),k=async b=>{await cY.notify.confirm({title:`Delete ${b.file}?`,description:`It is deleted from disk for good, and ${a}'s next job starts without it.`,okText:"Delete",destructive:!0})&&h(b.path)};return(0,j.jsxs)("div",{className:"pt-1",children:[(0,j.jsxs)("div",{className:"flex h-6 items-center",children:[(0,j.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:"Memory"}),(0,j.jsx)("span",{className:"flex-1"}),c&&c.total>0&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("span",{className:"pr-1 font-mono text-[11px] text-muted-foreground tabular-nums",children:1===c.total?"1 file":`${c.total} files`}),(0,j.jsxs)("button",{type:"button",title:"Show in the file manager",onClick:()=>g(c.folder),className:"flex items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,j.jsx)(q.FolderOpen,{className:"size-3"}),"Folder"]})]})]}),d?(0,j.jsx)("div",{className:"flex h-9 items-center border-t border-border/60",children:(0,j.jsx)(c$.Skeleton,{className:"h-3 w-56"})}):c?.entries.length?c.entries.map(a=>{let b=e===a.path;return(0,j.jsxs)("div",{className:"border-t border-border/60",children:[(0,j.jsxs)("button",{type:"button","aria-expanded":b,onClick:()=>f(b?null:a.path),className:"flex h-9 w-full items-center gap-3 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,j.jsx)("span",{className:(0,cM.cn)("min-w-0 flex-1 truncate",b&&"font-medium"),children:a.line||a.file}),(0,j.jsx)("span",{className:"w-36 shrink-0 truncate font-mono text-[11px] text-muted-foreground",children:a.file}),(0,j.jsx)("span",{className:"w-28 shrink-0 text-right font-mono text-[11px] text-muted-foreground tabular-nums",children:(0,ds.whenOf)(a.at)}),(0,j.jsx)(m.ChevronRight,{className:(0,cM.cn)("size-3 shrink-0 text-muted-foreground transition-transform",b&&"rotate-90")})]}),b&&(0,j.jsxs)("div",{className:"flex items-start gap-3",children:[(0,j.jsx)("div",{className:"max-h-96 min-w-0 flex-1 overflow-y-auto",children:(0,j.jsx)(dI,{path:a.path})}),(0,j.jsx)(B.Button,{size:"icon-sm",variant:"ghost","aria-label":`Delete ${a.file}`,loading:i,onClick:()=>k(a),className:"text-muted-foreground hover:text-destructive",children:(0,j.jsx)(u.Trash2,{})})]})]},a.path)}):(0,j.jsx)("p",{className:"py-2 text-[13px] text-muted-foreground",children:"Nothing kept yet."})]})}function dI({path:a}){let{content:b,failure:c,truncated:d}=(0,dm.useFileText)(a);if(c)return(0,j.jsx)("p",{className:"pb-3 font-mono text-xs text-destructive",children:c});if(null===b)return(0,j.jsxs)("div",{className:"space-y-2 pb-3",children:[(0,j.jsx)(c$.Skeleton,{className:"h-4 w-5/6"}),(0,j.jsx)(c$.Skeleton,{className:"h-4 w-2/3"})]});let e=(0,dn.viewKindOf)(a);return(0,j.jsx)(dm.FileBody,{kind:e,content:"markdown"===e?dJ(b):b,truncated:d,where:"inline"})}let dJ=a=>a.replace(/^---\n[\s\S]*?\n---\n/,"").replace(/^\s*#[^\n]*\n?/,"");function dK({bot:a,draft:b=null}){let{data:c,mutate:d}=(0,du.useServerRoute)(A.queryKey.botMemory),[e]=(0,dt.useServerAction)(da,{onOk:()=>(0,du.revalidate)(A.queryKey.botMemory),onError:()=>(0,du.revalidate)(A.queryKey.botMemory)}),f=a?a.tokens.input+a.tokens.output:0;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(dk.SettingRailNote,{children:a?(0,j.jsxs)("span",{className:"font-mono text-[11px]",children:[a.name,a.disabled&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("span",{className:"px-1.5 opacity-50",children:"·"}),"off"]}),(0,j.jsx)("span",{className:"px-1.5 opacity-50",children:"·"}),(0,j.jsx)("span",{title:`in ${(0,cM.formatCount)(a.tokens.input)} \xb7 out ${(0,cM.formatCount)(a.tokens.output)}`,children:f>0?`${(0,cM.formatCount)(f)} tokens`:"no tokens yet"}),(0,j.jsx)("span",{className:"px-1.5 opacity-50",children:"·"}),"since ",(0,ds.whenOf)(a.createdAt)]}):b?.missing.length?`Needs ${b.missing.length>1?`${b.missing.slice(0,-1).join(", ")} and ${b.missing.at(-1)}`:b.missing[0]}`:null}),(0,j.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",children:"Bots keep their own memory"}),(0,j.jsx)(c_.Switch,{checked:c??!0,disabled:void 0===c,onCheckedChange:a=>{d(a,!1),e(a)},"aria-label":"Bots keep their own memory"}),b&&(0,j.jsx)(B.Button,{size:"sm",loading:b.creating,disabled:b.missing.length>0,onClick:b.submit,children:"Create bot"})]})}function dL(a){let b=Number(a.replace(/[^0-9.]/g,""));return Number.isFinite(b)&&b>0?Math.round(1e3*b):null}let dM=a=>1e3*Math.round((0,c4.compactAtFor)(a)/1e3);function dN({label:a,htmlFor:b,children:c}){return(0,j.jsxs)("div",{className:"flex gap-3",children:[(0,j.jsx)("label",{htmlFor:b,className:"w-20 shrink-0 pt-2 font-mono text-xs text-muted-foreground",children:a}),(0,j.jsx)("div",{className:"min-w-0 flex-1 space-y-1.5",children:c})]})}function dO({bot:a,desk:b}){let c=b.last;return(0,j.jsxs)("div",{className:"-mx-6 -mt-6",children:[(0,j.jsx)(dw,{bot:a,thread:b.now,className:"h-72"}),(0,j.jsxs)("div",{className:"flex h-9 items-center gap-3 px-6 text-[13px]",children:[(0,j.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:b.now?"Now":c?"Last":"Free"}),(0,j.jsx)("span",{className:"min-w-0 flex-1 truncate",children:c?c.label:(0,j.jsx)("span",{className:"text-muted-foreground",children:"No job yet"})}),c&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:(0,ds.whenOf)(c.updatedAt)}),(0,j.jsxs)("button",{type:"button",onClick:()=>{var a;return a=c.id,void(dl.useSettingsStore.getState().hide(),di.roomOpens.open(a))},className:"flex shrink-0 items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:["Open",(0,j.jsx)(k.ArrowUpRight,{className:"size-3"})]})]})]})]})}function dP({jobs:a}){return(0,j.jsxs)("div",{className:"pt-1",children:[(0,j.jsxs)("div",{className:"flex h-6 items-center",children:[(0,j.jsx)("span",{className:"font-mono text-xs text-muted-foreground",children:"Recent"}),(0,j.jsx)("span",{className:"flex-1"}),(0,j.jsxs)("button",{type:"button",onClick:()=>(0,dl.openSettings)("threads"),className:"flex items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,j.jsx)(s,{className:"size-3"}),"History"]})]}),0===a.length?(0,j.jsx)("p",{className:"py-2 text-[13px] text-muted-foreground",children:"Nothing handed over yet."}):a.map(a=>{let b=function(a){switch(a.status){case"waiting":return{text:"waiting on you",tone:cM.WAITING_INK};case"running":return{text:"working",tone:"text-muted-foreground"};case"cancelled":return{text:"stopped",tone:"text-muted-foreground"};default:return{text:"done",tone:"text-muted-foreground"}}}(a);return(0,j.jsxs)("div",{className:"flex h-9 items-center gap-3 border-t border-border/60 text-[13px]",children:[(0,j.jsx)("span",{className:"min-w-0 flex-1 truncate",children:a.label}),"running"===a.status?(0,j.jsx)(cZ.ShinyText,{text:b.text,className:"shrink-0 font-mono text-[11px]"}):(0,j.jsx)("span",{className:(0,cM.cn)("shrink-0 font-mono text-[11px]",b.tone),children:b.text}),(0,j.jsx)("span",{className:"w-28 shrink-0 text-right font-mono text-[11px] text-muted-foreground tabular-nums",children:(0,ds.whenOf)(a.updatedAt)})]},a.id)})]})}function dQ({name:a,icon:b,onChange:c,shown:d=!0}){return(0,j.jsxs)("div",{className:"flex flex-col items-center gap-4 pt-3 pb-2",children:[d&&(0,j.jsx)(de.BotMark,{size:112,...dF(a,b),className:"shrink-0"}),(0,j.jsx)(dh,{color:b.paint?void 0:b.color,themePicked:!b.paint&&b.color===dg.MARK_SYSTEM,onTheme:()=>c({...b,paint:void 0,color:dg.MARK_SYSTEM}),onPick:a=>c({...b,paint:void 0,color:b.paint||b.color!==a?a:void 0}),paint:b.paint,onPaint:a=>c({...b,paint:b.paint===a?void 0:a})}),(0,j.jsxs)("div",{className:"flex gap-1",children:[dg.MARK_SHAPES.map(a=>(0,j.jsx)("button",{type:"button",onClick:()=>c({...b,shape:b.shape===a?void 0:a}),className:(0,cM.cn)("rounded-md px-2 py-1 font-mono text-[11px] capitalize transition-colors",b.shape===a?"bg-brand text-brand-foreground":"bg-muted text-muted-foreground hover:text-foreground"),children:a},a)),(0,j.jsx)("span",{className:"mx-1 w-px self-stretch bg-border/60"}),(0,j.jsx)("button",{type:"button",onClick:()=>c({...b,outline:!b.outline||void 0}),className:(0,cM.cn)("rounded-md px-2 py-1 font-mono text-[11px] transition-colors",b.outline?"bg-brand text-brand-foreground":"bg-muted text-muted-foreground hover:text-foreground"),children:"outline"})]})]})}function dR({selected:a,onChange:b}){let{data:c}=(0,du.useServerRoute)(A.queryKey.mcpTools),d=c??[],[e,f]=(0,y.useState)(!1),g=a.length>=c1.MAX_PINNED_TOOLS,h=[...new Set(d.map(a=>a.serverName))],i=a.map(a=>d.find(b=>b.id===a)).filter(a=>!!a),k=e?i:i.slice(0,4),m=i.length-k.length,n=c=>b(a.includes(c)?a.filter(a=>a!==c):[...a,c]);return c?0===d.length?(0,j.jsx)("p",{className:"pt-1.5 text-xs text-muted-foreground",children:"Nothing to pin — connect an MCP server first (Settings › Connectors)."}):(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,j.jsx)(B.Button,{size:"icon-sm",variant:e?"secondary":"outline",onClick:()=>f(!e),"aria-label":"Pick tools",className:"border-dashed",children:(0,j.jsx)(v.Wrench,{})}),k.map(a=>(0,j.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-muted py-1 pr-1.5 pl-2.5 font-mono text-[11px]",children:[a.name,(0,j.jsx)("button",{type:"button","aria-label":`Unpin ${a.name}`,onClick:()=>n(a.id),className:"rounded-full p-0.5 text-muted-foreground transition-colors hover:bg-foreground/10 hover:text-foreground",children:(0,j.jsx)(w.X,{className:"size-3"})})]},a.id)),m>0&&(0,j.jsxs)("button",{type:"button",onClick:()=>f(!0),className:"rounded-full bg-muted px-2.5 py-1 font-mono text-[11px] text-muted-foreground transition-colors hover:text-foreground",children:["+",m]}),0===i.length&&(0,j.jsx)("span",{className:"text-xs text-muted-foreground",children:"Loaded from the start — everything else stays searchable"}),(0,j.jsx)("span",{className:"flex-1"}),(0,j.jsxs)("span",{className:(0,cM.cn)("font-mono text-[11px] text-muted-foreground",g&&"text-foreground"),children:[a.length,"/",c1.MAX_PINNED_TOOLS]})]}),e&&(0,j.jsxs)(cS,{className:"rounded-lg border border-input",children:[(0,j.jsx)(cT,{placeholder:"Search tools"}),(0,j.jsxs)(cU,{className:"max-h-44",children:[(0,j.jsx)(cV,{children:"Nothing matches"}),h.map(b=>(0,j.jsx)(cW,{heading:b,children:d.filter(a=>a.serverName===b).map(b=>{let c=a.includes(b.id);return(0,j.jsxs)(cX,{value:`${b.serverName}/${b.name}`,disabled:!c&&g,onSelect:()=>n(b.id),children:[(0,j.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:b.name}),c&&(0,j.jsx)(l.Check,{className:"size-3.5 shrink-0"})]},b.id)})},b))]})]})]}):null}a.s(["BotSetting",0,function(){var a,b;let c,d,{data:e,isLoading:f,error:g}=(0,du.useServerRoute)(A.queryKey.bot),h=e??[];(0,z.useAppEvent)({bots:()=>void(0,du.revalidate)(A.queryKey.bot)});let{data:i}=(0,du.useServerRoute)(A.queryKey.threadHistory(null)),k=i??[],l=(0,y.useMemo)(()=>(i??[]).map(a=>(0,di.threadFromRow)(a,e)),[i,e]),[m,n]=(0,y.useState)(null),[o,p]=(0,y.useState)(null);if(f)return(0,j.jsx)(dk.SettingPanesSkeleton,{});if(g)return(0,j.jsx)(dk.SettingError,{message:g.message});let q=m===dv,r=h.filter(a=>!a.disabled).length,s=new Set(h.map(a=>a.name)),u=dd.BOT_SEEDS.filter(a=>!s.has(a.name)),v=q?null:h.find(a=>a.name===m)??h[0]??null;return(0,j.jsx)(dk.SettingPanes,{footer:0!==h.length||q?(0,j.jsx)(dK,{bot:v,draft:q?o:null}):null,left:(0,j.jsxs)("div",{className:"flex flex-col py-2",children:[h.length>=c1.BOT_ROSTER.max?(0,j.jsxs)("p",{className:"mx-2 mb-1 px-2 py-1.5 font-mono text-[11px] leading-5 text-muted-foreground",children:[h.length," bots · ",c1.BOT_ROSTER.max," is the most"]}):(0,j.jsxs)("div",{className:"mx-2 mb-1 flex items-center gap-1",children:[(0,j.jsxs)("button",{type:"button",onClick:()=>n(dv),className:(0,cM.cn)("flex flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",q?dk.PICKED_ROW:"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[(0,j.jsx)(t.Plus,{className:"size-3.5 shrink-0"}),"New bot"]}),h.length>0&&u.length>0&&(0,j.jsx)(dE,{missing:u,have:s,onDone:a=>n(a)})]}),h.map(a=>(0,j.jsx)(dx,{bot:a,job:k.find(b=>b.bot===a.name)??null,active:!q&&a.name===v?.name,onPick:()=>n(a.name)},a.name)),r>c1.PROMPT_CROWDED.bots&&(0,j.jsxs)(dk.SettingNote,{className:"mx-3 mt-2 leading-relaxed",children:[r," bots are on. Each is a line in every prompt, and one more for Thursday to choose between."]})]}),right:q?(0,j.jsx)(dG,{jobs:[],onDone:a=>n(a),onDraft:p},"new"):v?(0,j.jsx)(dG,{bot:v,jobs:k.filter(a=>a.bot===v.name).slice(0,3),desk:(a=l,b=v.name,{now:d=(c=a.filter(a=>a.roster.some(a=>a.name===b))).find(a=>"working"===a.status||"waiting"===a.status)??null,last:d??c[0]??null}),onDone:()=>n(null)},v.name):u.length>0?(0,j.jsx)(dC,{have:s,onDone:a=>n(a)}):(0,j.jsxs)("div",{className:"space-y-4 p-8",children:[(0,j.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:"Thursday talks; bots do the rest — search the web, draft a reply, check a schedule. Give one a job and a model, and work gets handed over mid-call while the conversation keeps going."}),(0,j.jsxs)(B.Button,{variant:"outline",onClick:()=>n(dv),children:[(0,j.jsx)(t.Plus,{}),"New bot"]})]})})}],581662)}];
3
3
 
4
4
  //# sourceMappingURL=features_bot_components_bot-setting_tsx_01ajft6._.js.map