thursday-agent 0.1.1 → 0.2.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 (361) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/routes-manifest.json +6 -0
  6. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  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 +13 -13
  17. package/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
  18. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +12 -12
  19. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  20. package/.next/server/app/api/artifact/route.js +1 -1
  21. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/notes/route/app-paths-manifest.json +3 -0
  23. package/.next/server/app/api/bot/notes/route/build-manifest.json +12 -0
  24. package/.next/server/app/api/bot/notes/route/server-reference-manifest.json +4 -0
  25. package/.next/server/app/api/bot/notes/route.js +14 -0
  26. package/.next/server/app/api/bot/notes/route.js.map +5 -0
  27. package/.next/server/app/api/bot/notes/route.js.nft.json +1 -0
  28. package/.next/server/app/api/bot/notes/route_client-reference-manifest.js +3 -0
  29. package/.next/server/app/api/bot/route.js +4 -4
  30. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  31. package/.next/server/app/api/bot/task/[id]/route.js +6 -6
  32. package/.next/server/app/api/bot/task/[id]/route.js.nft.json +1 -1
  33. package/.next/server/app/api/bot/task/route.js +6 -6
  34. package/.next/server/app/api/bot/task/route.js.nft.json +1 -1
  35. package/.next/server/app/api/config/route.js +3 -3
  36. package/.next/server/app/api/config/route.js.nft.json +1 -1
  37. package/.next/server/app/api/events/route.js +1 -1
  38. package/.next/server/app/api/events/route.js.nft.json +1 -1
  39. package/.next/server/app/api/file/[...path]/route.js +1 -1
  40. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  41. package/.next/server/app/api/llm-model/catalog/route.js +6 -6
  42. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
  43. package/.next/server/app/api/llm-model/route.js +3 -3
  44. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  45. package/.next/server/app/api/mcp/[name]/route.js +3 -3
  46. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  47. package/.next/server/app/api/mcp/oauth/callback/route.js +5 -5
  48. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  49. package/.next/server/app/api/mcp/route.js +3 -3
  50. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  51. package/.next/server/app/api/mcp/tools/route.js +3 -3
  52. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  53. package/.next/server/app/api/memory/route.js +7 -7
  54. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  55. package/.next/server/app/api/memory/tidy/route.js +10 -11
  56. package/.next/server/app/api/memory/tidy/route.js.nft.json +1 -1
  57. package/.next/server/app/api/skills/[source]/[name]/route.js +1 -1
  58. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  59. package/.next/server/app/api/skills/route.js +1 -1
  60. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  61. package/.next/server/app/api/thursday/call/route.js +8 -8
  62. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  63. package/.next/server/app/api/thursday/skills/route.js +8 -8
  64. package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
  65. package/.next/server/app/api/thursday/tool-call/route.js +11 -12
  66. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  67. package/.next/server/app/api/workspace/route.js +1 -1
  68. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  69. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  70. package/.next/server/app/artifact/[...path]/page.js +3 -3
  71. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  72. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  74. package/.next/server/app/page/server-reference-manifest.json +63 -41
  75. package/.next/server/app/page.js +7 -7
  76. package/.next/server/app/page.js.nft.json +1 -1
  77. package/.next/server/app/page_client-reference-manifest.js +1 -1
  78. package/.next/server/app-paths-manifest.json +1 -0
  79. package/.next/server/chunks/0d-b_next_dist_server_app-render_after-task-async-storage_external_0-exn7p.js +3 -0
  80. package/.next/server/chunks/{[root-of-the-server]__0t_dqaj._.js → [root-of-the-server]__0-npkh_._.js} +1 -1
  81. package/.next/server/chunks/[root-of-the-server]__005var5._.js +3 -0
  82. package/.next/server/chunks/[root-of-the-server]__019dx9f._.js +2 -2
  83. package/.next/server/chunks/[root-of-the-server]__02va5wz._.js +3 -0
  84. package/.next/server/chunks/{[root-of-the-server]__1mzp_el._.js → [root-of-the-server]__04_8spk._.js} +2 -2
  85. package/.next/server/chunks/[root-of-the-server]__06t77t4._.js +1 -1
  86. package/.next/server/chunks/[root-of-the-server]__0bed6hu._.js +4 -4
  87. package/.next/server/chunks/[root-of-the-server]__0cro2dz._.js +5 -0
  88. package/.next/server/chunks/[root-of-the-server]__0emr6go._.js +3 -0
  89. package/.next/server/chunks/[root-of-the-server]__0le4d-p._.js +1 -1
  90. package/.next/server/chunks/[root-of-the-server]__0m8ywyo._.js +5 -5
  91. package/.next/server/chunks/{[root-of-the-server]__113fqg5._.js → [root-of-the-server]__0p32jfz._.js} +3 -3
  92. package/.next/server/chunks/[root-of-the-server]__0phdgco._.js +4 -4
  93. package/.next/server/chunks/[root-of-the-server]__0wvgrsl._.js +1 -1
  94. package/.next/server/chunks/[root-of-the-server]__11j52t0._.js +5 -0
  95. package/.next/server/chunks/{[root-of-the-server]__0j_n5l3._.js → [root-of-the-server]__1692zrv._.js} +2 -2
  96. package/.next/server/chunks/[root-of-the-server]__16thabu._.js +1 -1
  97. package/.next/server/chunks/[root-of-the-server]__173nhwf._.js +3 -3
  98. package/.next/server/chunks/[root-of-the-server]__1bn73ih._.js +10 -0
  99. package/.next/server/chunks/[root-of-the-server]__1bqhuh9._.js +4 -4
  100. package/.next/server/chunks/[root-of-the-server]__1ccon1w._.js +10 -0
  101. package/.next/server/chunks/[root-of-the-server]__1cqizfq._.js +1 -1
  102. package/.next/server/chunks/{[root-of-the-server]__1u_qvc7._.js → [root-of-the-server]__1fboj2j._.js} +2 -2
  103. package/.next/server/chunks/{[root-of-the-server]__1dow0bz._.js → [root-of-the-server]__1oli73c._.js} +2 -2
  104. package/.next/server/chunks/[root-of-the-server]__1txedx6._.js +4 -4
  105. package/.next/server/chunks/[root-of-the-server]__1untqv8._.js +5 -0
  106. package/.next/server/chunks/_0-73of8._.js +55 -0
  107. package/.next/server/chunks/{_2050gwn._.js → _00_584r._.js} +66 -28
  108. package/.next/server/chunks/{_0y8is-s._.js → _03a0897._.js} +1 -1
  109. package/.next/server/chunks/_05h2cii._.js +1 -1
  110. package/.next/server/chunks/_06mxlgn._.js +1 -1
  111. package/.next/server/chunks/_0a351g7._.js +1 -1
  112. package/.next/server/chunks/{_0hin38_._.js → _0khihjk._.js} +5 -5
  113. package/.next/server/chunks/_0kjjmag._.js +1 -1
  114. package/.next/server/chunks/{_1t8fv7b._.js → _0n74zsf._.js} +5 -5
  115. package/.next/server/chunks/_0nn99o2._.js +3 -0
  116. package/.next/server/chunks/_0pppbb5._.js +10 -6
  117. package/.next/server/chunks/{_1icgbi8._.js → _0rnf-6n._.js} +5 -5
  118. package/.next/server/chunks/_0u10wmw._.js +55 -0
  119. package/.next/server/chunks/{_0kl37zl._.js → _0vnutv9._.js} +1 -1
  120. package/.next/server/chunks/_0wp4le3._.js +1 -1
  121. package/.next/server/chunks/_0y5fg-x._.js +1 -1
  122. package/.next/server/chunks/_106co2o._.js +3 -0
  123. package/.next/server/chunks/_12bbv5i._.js +10 -6
  124. package/.next/server/chunks/_15hq89o._.js +1 -1
  125. package/.next/server/chunks/_15q1pig._.js +1 -1
  126. package/.next/server/chunks/_18-1wcc._.js +55 -0
  127. package/.next/server/chunks/_19wg5yn._.js +138 -0
  128. package/.next/server/chunks/_1_5mnq4._.js +18 -0
  129. package/.next/server/chunks/_1bt95p9._.js +55 -0
  130. package/.next/server/chunks/_1cbk7ms._.js +9 -9
  131. package/.next/server/chunks/_1drgfx4._.js +18 -0
  132. package/.next/server/chunks/_1drv2et._.js +10 -6
  133. package/.next/server/chunks/{_10qam6o._.js → _1e48czp._.js} +5 -5
  134. package/.next/server/chunks/{_1skgy7b._.js → _1kg70wc._.js} +5 -5
  135. package/.next/server/chunks/_1php4eq._.js +1 -1
  136. package/.next/server/chunks/_1rysr-r._.js +10 -0
  137. package/.next/server/chunks/_1u3rwbr._.js +3 -0
  138. package/.next/server/chunks/_1x7p319._.js +1 -1
  139. package/.next/server/chunks/_1yuv4vp._.js +1 -1
  140. package/.next/server/chunks/_next-internal_server_app_api_bot_notes_route_actions_0qcsyu7.js +3 -0
  141. package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
  142. package/.next/server/chunks/features_bot_task_query_ts_11xuzl3._.js +1 -1
  143. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0228f43._.js → node_modules_consola_dist_chunks_prompt_mjs_02s3hjt._.js} +1 -1
  144. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0ir-vo2._.js → node_modules_consola_dist_chunks_prompt_mjs_06067w6._.js} +1 -1
  145. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0otw8ef._.js → node_modules_consola_dist_chunks_prompt_mjs_096ais_._.js} +1 -1
  146. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0tf290y._.js → node_modules_consola_dist_chunks_prompt_mjs_0a1rd09._.js} +1 -1
  147. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0gzvgfv._.js +3 -0
  148. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0j61-ma._.js +3 -0
  149. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0tvkfgh._.js +3 -0
  150. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_11zjo-1._.js +3 -0
  151. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1pycqsq._.js +3 -0
  152. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1tpvamf._.js +3 -0
  153. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1y9-wcr._.js +3 -0
  154. package/.next/server/chunks/ssr/[externals]__0dizgek._.js +3 -0
  155. package/.next/server/chunks/ssr/[root-of-the-server]__0f6s48x._.js +1 -1
  156. package/.next/server/chunks/ssr/[root-of-the-server]__0m1b5ky._.js +3 -0
  157. package/.next/server/chunks/ssr/{[root-of-the-server]__0dfwvr4._.js → [root-of-the-server]__0un-erv._.js} +2 -2
  158. package/.next/server/chunks/ssr/[root-of-the-server]__1-mnhyd._.js +5 -3
  159. package/.next/server/chunks/ssr/[root-of-the-server]__1bww500._.js +3 -0
  160. package/.next/server/chunks/ssr/[root-of-the-server]__1mzi-ju._.js +1 -1
  161. package/.next/server/chunks/ssr/[root-of-the-server]__1qfqvmg._.js +3 -0
  162. package/.next/server/chunks/ssr/[root-of-the-server]__1vcdast._.js +3 -0
  163. package/.next/server/chunks/ssr/[root-of-the-server]__1xwnu-h._.js +3 -0
  164. package/.next/server/chunks/ssr/_03webdr._.js +3 -0
  165. package/.next/server/chunks/ssr/{_0gd4vaa._.js → _040sk32._.js} +71 -29
  166. package/.next/server/chunks/ssr/_077-g6s._.js +1 -1
  167. package/.next/server/chunks/ssr/{_1r2_qk-._.js → _09ja_w1._.js} +2 -2
  168. package/.next/server/chunks/ssr/{_1dnxp2k._.js → _0f_b_9s._.js} +2 -2
  169. package/.next/server/chunks/ssr/_0h7zdni._.js +1 -1
  170. package/.next/server/chunks/ssr/_0lu1n_x._.js +3 -0
  171. package/.next/server/chunks/ssr/_0sf1isi._.js +1 -1
  172. package/.next/server/chunks/ssr/_0su6_08._.js +3 -0
  173. package/.next/server/chunks/ssr/_0w5bgak._.js +3 -0
  174. package/.next/server/chunks/ssr/{_1hkvsg0._.js → _0x_nu5e._.js} +2 -2
  175. package/.next/server/chunks/ssr/_1-teee5._.js +3 -3
  176. package/.next/server/chunks/ssr/_13punpm._.js +1 -1
  177. package/.next/server/chunks/ssr/{_0ay6b01._.js → _1ciyoo3._.js} +2 -2
  178. package/.next/server/chunks/ssr/_1e-dgz0._.js +1 -1
  179. package/.next/server/chunks/ssr/_1fq7zgb._.js +1 -1
  180. package/.next/server/chunks/ssr/{_0cvjbuz._.js → _1g6l4uj._.js} +2 -2
  181. package/.next/server/chunks/ssr/{_1b3yex3._.js → _1lip4th._.js} +2 -2
  182. package/.next/server/chunks/ssr/_1m3bsfr._.js +3 -0
  183. package/.next/server/chunks/ssr/_1mznrxk._.js +1 -1
  184. package/.next/server/chunks/ssr/_1ruzehw._.js +3 -0
  185. package/.next/server/chunks/ssr/_1vyd1ji._.js +3 -0
  186. package/.next/server/chunks/ssr/features_bot_components_bot-setting_tsx_01ajft6._.js +2 -2
  187. package/.next/server/chunks/ssr/features_config_components_14jqgy4._.js +1 -1
  188. package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
  189. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  190. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  191. package/.next/server/chunks/ssr/lib_realtime_12wg_dd._.js +27 -0
  192. package/.next/server/chunks/ssr/lib_realtime_15h_v1v._.js +27 -0
  193. package/.next/server/chunks/ssr/{node_modules_0i37h34._.js → node_modules_004qlr4._.js} +1 -1
  194. package/.next/server/chunks/ssr/{node_modules_0nh2m35._.js → node_modules_01qnv-a._.js} +1 -1
  195. package/.next/server/chunks/ssr/{node_modules_1kj6swe._.js → node_modules_04n7mjs._.js} +1 -1
  196. package/.next/server/chunks/ssr/{node_modules_0eqdzva._.js → node_modules_08d8bke._.js} +1 -1
  197. package/.next/server/chunks/ssr/{node_modules_0nq_p-o._.js → node_modules_09xhur7._.js} +1 -1
  198. package/.next/server/chunks/ssr/{node_modules_1854ebs._.js → node_modules_0_n241r._.js} +1 -1
  199. package/.next/server/chunks/ssr/{node_modules_00riwzq._.js → node_modules_0iz1rzd._.js} +1 -1
  200. package/.next/server/chunks/ssr/{node_modules_1wsx1pg._.js → node_modules_0kl7-tn._.js} +1 -1
  201. package/.next/server/chunks/ssr/{node_modules_17ls31t._.js → node_modules_0kxz4gt._.js} +1 -1
  202. package/.next/server/chunks/ssr/{node_modules_1fsvm8f._.js → node_modules_0lrjk5t._.js} +1 -1
  203. package/.next/server/chunks/ssr/{node_modules_1euv75v._.js → node_modules_0m93zeg._.js} +1 -1
  204. package/.next/server/chunks/ssr/{node_modules_1_w_b81._.js → node_modules_0n1kj4p._.js} +1 -1
  205. package/.next/server/chunks/ssr/{node_modules_1bjm3ch._.js → node_modules_0ndvxub._.js} +1 -1
  206. package/.next/server/chunks/ssr/{node_modules_03f-6up._.js → node_modules_13r44jq._.js} +1 -1
  207. package/.next/server/chunks/ssr/{node_modules_07_oxjr._.js → node_modules_17lrt3y._.js} +1 -1
  208. package/.next/server/chunks/ssr/{node_modules_1yxkq1s._.js → node_modules_18_dk7_._.js} +1 -1
  209. package/.next/server/chunks/ssr/{node_modules_012m-mo._.js → node_modules_19dp7ko._.js} +1 -1
  210. package/.next/server/chunks/ssr/{node_modules_0egn4iq._.js → node_modules_1dwguw_._.js} +1 -1
  211. package/.next/server/chunks/ssr/{node_modules_1y1m-q4._.js → node_modules_1hd-5tv._.js} +1 -1
  212. package/.next/server/chunks/ssr/{node_modules_0xe_k12._.js → node_modules_1hn8z1f._.js} +1 -1
  213. package/.next/server/chunks/ssr/{node_modules_0sbobpz._.js → node_modules_1n5ygqe._.js} +1 -1
  214. package/.next/server/chunks/ssr/{node_modules_14uxpfb._.js → node_modules_1q0p85z._.js} +1 -1
  215. package/.next/server/chunks/ssr/{node_modules_01jj5oy._.js → node_modules_1toafc-._.js} +1 -1
  216. package/.next/server/chunks/ssr/{node_modules_0ewynyi._.js → node_modules_1xyd7ov._.js} +1 -1
  217. package/.next/server/chunks/ssr/{node_modules_17c71fz._.js → node_modules_1zu988w._.js} +1 -1
  218. package/.next/server/chunks/ssr/{node_modules_1mnmhse._.js → node_modules_20yebtj._.js} +1 -1
  219. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1f5re6n._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0m9a4y0._.js} +1 -1
  220. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_216aa7f._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_13w_wy9._.js} +1 -1
  221. package/.next/server/chunks/ssr/node_modules_consola_dist_chunks_prompt_mjs_05cwqv2._.js +47 -0
  222. package/.next/server/middleware-build-manifest.js +3 -3
  223. package/.next/server/pages/404.html +1 -1
  224. package/.next/server/pages/500.html +1 -1
  225. package/.next/server/server-reference-manifest.js +1 -1
  226. package/.next/server/server-reference-manifest.json +64 -42
  227. package/.next/static/chunks/05b6nx_o3_f_n.js +1 -0
  228. package/.next/static/chunks/{1rja48de93vvx.js → 07kl352c-lvcz.js} +1 -1
  229. package/.next/static/chunks/0dmns-gi0raa4.js +1 -0
  230. package/.next/static/chunks/0oc4_xoia77dg.css +1 -0
  231. package/.next/static/chunks/0pheo8m3a-rzi.js +1 -0
  232. package/.next/static/chunks/{3yan6-5cvpk2o.js → 18vhba44l1fc9.js} +1 -1
  233. package/.next/static/chunks/19i8h2t-5evjx.js +1 -0
  234. package/.next/static/chunks/{0h7pjyewk7ky-.js → 1c5fcj473025q.js} +1 -1
  235. package/.next/static/chunks/1pi_hbmjw-f-z.js +1 -0
  236. package/.next/static/chunks/{0tydnn2kybibk.js → 1twt6k09vg4np.js} +1 -1
  237. package/.next/static/chunks/{2kl3n2d-4-7i5.js → 28gotuisldmom.js} +1 -1
  238. package/.next/static/chunks/{34eu8t79ko6lm.js → 2998p0y7k1c8z.js} +1 -1
  239. package/.next/static/chunks/2l233xfycjpd8.js +1 -0
  240. package/.next/static/chunks/2p5n7pa3c40t-.js +2 -0
  241. package/.next/static/chunks/2ru1q132af7h7.js +1 -0
  242. package/.next/static/chunks/{2ka9uwo_evj7a.js → 2t8wqycwg3y04.js} +2 -2
  243. package/.next/static/chunks/32z_ypgtchw48.js +1 -0
  244. package/.next/static/chunks/{261871a8ot1pi.js → 33pyjb3xd1iez.js} +1 -1
  245. package/.next/static/chunks/3786h5vayt80-.js +28 -0
  246. package/.next/static/chunks/3_h9txt3tq8t8.js +28 -0
  247. package/.next/static/chunks/{2qci2z603es_m.js → 3ard_noqapnw1.js} +1 -1
  248. package/.next/static/chunks/{0yn2yol46cj77.js → 3omud5xunrk1f.js} +1 -1
  249. package/.next/static/chunks/42dnrkbph9e-1.js +1 -0
  250. package/README.md +24 -1
  251. package/app/api/events/app-event.client.ts +24 -0
  252. package/app/api/events/app-event.server.ts +45 -0
  253. package/app/api/events/app-event.ts +44 -0
  254. package/app/api/llm-model/catalog/route.ts +12 -0
  255. package/app/api/llm-model/route.ts +21 -0
  256. package/app/api/query-key.ts +144 -0
  257. package/app/api/thursday/tool-call/route.ts +67 -0
  258. package/bin/thursday.mjs +50 -2
  259. package/components/ui/button-group.tsx +45 -0
  260. package/components/ui/custom-icon.tsx +259 -0
  261. package/components/ui/dropdown-menu.tsx +271 -0
  262. package/components/ui/folded-text.tsx +68 -0
  263. package/components/ui/input-group.tsx +157 -0
  264. package/components/ui/json-view.tsx +240 -0
  265. package/components/ui/shiny-text.tsx +141 -0
  266. package/components/ui/text-type.tsx +213 -0
  267. package/components/ui/theme-sync.tsx +9 -0
  268. package/database/migrations/{20260908030742_rainy_marvel_zombies → 20260909060813_optimal_sabretooth}/migration.sql +7 -0
  269. package/database/migrations/{20260908030742_rainy_marvel_zombies → 20260909060813_optimal_sabretooth}/snapshot.json +54 -1
  270. package/database/migrations/20260909063821_bitter_tenebrous/migration.sql +1 -0
  271. package/database/migrations/20260909063821_bitter_tenebrous/snapshot.json +1285 -0
  272. package/docs/how-it-works.md +59 -0
  273. package/docs/images/keeps-going.png +0 -0
  274. package/docs/images/task-thread.png +0 -0
  275. package/docs/images/two-minds.png +0 -0
  276. package/features/ai/load-tools.ts +55 -5
  277. package/features/ai/prompts/bot.prompt.ts +121 -26
  278. package/features/ai/prompts/memory-tidy.prompt.ts +7 -1
  279. package/features/ai/prompts/prompt-helper.ts +31 -5
  280. package/features/ai/prompts/thursday.prompt.ts +2 -0
  281. package/features/ai/tools/bot.tool.ts +37 -18
  282. package/features/ai/tools/mcp.tool.ts +5 -5
  283. package/features/ai/tools/memory.tool.ts +17 -10
  284. package/features/ai/tools/studio.tool.ts +5 -5
  285. package/features/ai/tools/tool-name.ts +2 -0
  286. package/features/ai/tools/workspace.tool.ts +33 -5
  287. package/features/bot/bot.action.ts +31 -4
  288. package/features/bot/bot.notes.ts +120 -0
  289. package/features/bot/bot.query.ts +56 -1
  290. package/features/bot/bot.run.ts +43 -3
  291. package/features/bot/bot.runner.ts +94 -20
  292. package/features/bot/bot.schema.ts +17 -0
  293. package/features/bot/components/bot-room.tsx +405 -306
  294. package/features/bot/components/bot-setting.tsx +123 -20
  295. package/features/bot/task.query.ts +18 -5
  296. package/features/memory/components/memory-setting.tsx +11 -2
  297. package/features/memory/memory.query.ts +9 -2
  298. package/features/memory/memory.schema.ts +30 -0
  299. package/features/skills/components/skills-setting.tsx +9 -1
  300. package/features/workspace/workspace.ts +136 -3
  301. package/hooks/use-draft.ts +37 -0
  302. package/hooks/use-hotkey.ts +105 -0
  303. package/hooks/use-object-state.ts +51 -0
  304. package/hooks/use-on-visible.ts +72 -0
  305. package/hooks/use-theme.ts +106 -0
  306. package/hooks/use-wake-word.ts +262 -0
  307. package/lib/realtime/realtime.driver.ts +34 -1
  308. package/lib/realtime/realtime.protocol.ts +6 -0
  309. package/lib/sandbox.ts +9 -1
  310. package/lib/tokens.ts +19 -0
  311. package/package.json +1 -1
  312. package/.next/server/chunks/[root-of-the-server]__02kt8yn._.js +0 -10
  313. package/.next/server/chunks/[root-of-the-server]__0h59di-._.js +0 -5
  314. package/.next/server/chunks/[root-of-the-server]__0qjqtwo._.js +0 -5
  315. package/.next/server/chunks/[root-of-the-server]__0yk6s3w._.js +0 -5
  316. package/.next/server/chunks/[root-of-the-server]__0z3gelv._.js +0 -3
  317. package/.next/server/chunks/[root-of-the-server]__11w_7_3._.js +0 -3
  318. package/.next/server/chunks/[root-of-the-server]__1_0q_9w._.js +0 -3
  319. package/.next/server/chunks/[root-of-the-server]__1gmn1cs._.js +0 -10
  320. package/.next/server/chunks/_0fzqt2y._.js +0 -100
  321. package/.next/server/chunks/_0jgm3b8._.js +0 -55
  322. package/.next/server/chunks/_0ks6_sg._.js +0 -55
  323. package/.next/server/chunks/_0tzfesa._.js +0 -3
  324. package/.next/server/chunks/_0zmestz._.js +0 -55
  325. package/.next/server/chunks/_12nr4xc._.js +0 -3
  326. package/.next/server/chunks/_1hzrsvg._.js +0 -55
  327. package/.next/server/chunks/_1uj4_io._.js +0 -10
  328. package/.next/server/chunks/_1yldgo4._.js +0 -55
  329. package/.next/server/chunks/features_0scmr4i._.js +0 -3
  330. package/.next/server/chunks/features_bot_bot_query_ts_12mgkl2._.js +0 -3
  331. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0ykklj0._.js +0 -3
  332. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1ryg3wh._.js +0 -3
  333. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1vwbnq_._.js +0 -3
  334. package/.next/server/chunks/ssr/[root-of-the-server]__0b-0i32._.js +0 -3
  335. package/.next/server/chunks/ssr/[root-of-the-server]__1e-f3gy._.js +0 -3
  336. package/.next/server/chunks/ssr/[root-of-the-server]__1minz8_._.js +0 -3
  337. package/.next/server/chunks/ssr/[root-of-the-server]__1ncajna._.js +0 -3
  338. package/.next/server/chunks/ssr/_124q1la._.js +0 -3
  339. package/.next/server/chunks/ssr/_19eoufz._.js +0 -3
  340. package/.next/server/chunks/ssr/_1aca4j8._.js +0 -3
  341. package/.next/server/chunks/ssr/_1cb_5sv._.js +0 -3
  342. package/.next/server/chunks/ssr/_1m5popy._.js +0 -3
  343. package/.next/server/chunks/ssr/lib_realtime_0aetuyp._.js +0 -24
  344. package/.next/server/chunks/ssr/lib_realtime_18k_aj-._.js +0 -24
  345. package/.next/server/chunks/ssr/node_modules_zod_v4_classic_errors_05xv7vp.js +0 -3
  346. package/.next/static/chunks/0_6qjj4f3t3j-.js +0 -1
  347. package/.next/static/chunks/0g2n0xskvyk04.js +0 -2
  348. package/.next/static/chunks/14s7e14xltx47.js +0 -1
  349. package/.next/static/chunks/1lpdcqos7mkek.js +0 -1
  350. package/.next/static/chunks/1u5d-pvhwir9g.js +0 -1
  351. package/.next/static/chunks/2cgzsjzheo2m2.js +0 -1
  352. package/.next/static/chunks/2cwjgkt_hoyhj.js +0 -22
  353. package/.next/static/chunks/2rbf1fpd8n80-.js +0 -22
  354. package/.next/static/chunks/2ukj8k69y89um.js +0 -1
  355. package/.next/static/chunks/2v_vqhmdl8de_.js +0 -1
  356. package/.next/static/chunks/35uo6rtl_otbd.js +0 -1
  357. package/.next/static/chunks/388-t2v72jh39.css +0 -1
  358. package/.next/static/chunks/3w7-y53xzl2ir.js +0 -1
  359. /package/.next/static/{G-9_HnysmzY_Bx9GpDYAO → YR4NWcDDuzwLbTTU7U7Vr}/_buildManifest.js +0 -0
  360. /package/.next/static/{G-9_HnysmzY_Bx9GpDYAO → YR4NWcDDuzwLbTTU7U7Vr}/_clientMiddlewareManifest.js +0 -0
  361. /package/.next/static/{G-9_HnysmzY_Bx9GpDYAO → YR4NWcDDuzwLbTTU7U7Vr}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,161483,e=>{"use strict";var t=e.i(843476),n=e.i(647163);e.s(["Swatch",0,function({color:e,picked:s,onPick:r}){return(0,t.jsx)("button",{type:"button",onClick:r,"aria-label":e??"Follow the theme",style:e?{backgroundColor:e}:void 0,className:(0,n.cn)("size-5 rounded-full outline-none transition-transform hover:scale-110 focus-visible:ring-3 focus-visible:ring-ring/50",!e&&"bg-foreground",s&&"ring-2 ring-foreground/40 ring-offset-2 ring-offset-background")})}])},59158,e=>{"use strict";var t=e.i(843476),n=e.i(689664),s=e.i(466787),r=e.i(271645),l=e.i(798120),a=e.i(167881),i=e.i(736185),o=e.i(23750),c=e.i(917162),u=e.i(421429),d=e.i(161483),h=e.i(184762),m=e.i(968978),x=e.i(265402),p=e.i(864723),g=e.i(692329),f=e.i(895836),v=e.i(867927),b=e.i(456420);let y={name:"phone",size:24,node:[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]};y.node;let j=(0,b.default)(y);var k=e.i(759659),S=e.i(671428),N=e.i(222055),w=e.i(245629),C=e.i(609856),A=e.i(661504),E=e.i(647163),R=e.i(95187);let T=(0,R.createServerReference)("7f308b62dee2fc5694c7bd7d65c7a87fa1f283c807",R.callServer,void 0,R.findSourceMapURL,"deleteCallAction");var _=e.i(671228),K=e.i(561540),M=e.i(635963),O=e.i(762074);function z({size:e=16,className:n}){let s=(0,O.useThursdayFace)();return(0,t.jsx)(M.BotMark,{size:e,seed:"thursday",color:s.color,shape:s.shape,outline:s.outline,notify:!1,className:n})}function I(){return(0,t.jsx)(f.SettingGroup,{label:"Transcripts",children:(0,t.jsx)(f.SettingItems,{children:(0,t.jsxs)("button",{type:"button",onClick:()=>c.notify.component({className:"sm:max-w-3xl",renderer:()=>(0,t.jsx)(f.SettingDialogContent,{title:"Call history",description:"Everything said on the line, oldest at the top. Scroll up for older calls.",children:(0,t.jsx)(L,{})})}),className:"flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,t.jsx)(j,{className:"size-4"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block text-sm font-medium",children:"Call history"}),(0,t.jsx)("span",{className:"block text-xs text-muted-foreground",children:"Every call, word for word — hers and yours"})]}),(0,t.jsx)(v.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground"})]})})})}let P="h-[min(34rem,58vh)] min-h-64 px-1";function L(){let{items:e,isLoading:n,isLoadingMore:s,error:a,hasMore:i,sentinelRef:o,refresh:c}=(0,A.useServerPages)({key:(e,t)=>{if(0===e)return l.queryKey.callHistory(null);let n=t?.at(-1);return n?l.queryKey.callHistory((0,w.toDate)(n.startedAt).toISOString()):null},size:_.CALL_HISTORY_PAGE,swr:{revalidateOnFocus:!1}}),u=(0,r.useMemo)(()=>[...e].reverse(),[e]),d=(0,r.useRef)(null),h=(0,r.useRef)(!1),m=(0,r.useRef)(0);return((0,r.useLayoutEffect)(()=>{let e=d.current;e&&0!==u.length&&(h.current?e.scrollTop=e.scrollHeight-m.current:(h.current=!0,e.scrollTop=e.scrollHeight),m.current=e.scrollHeight-e.scrollTop)},[u]),n)?(0,t.jsx)("div",{className:(0,E.cn)(P,"overflow-hidden"),children:(0,t.jsx)(H,{})}):a?(0,t.jsx)(f.SettingError,{message:a.message}):(0,t.jsx)(t.Fragment,{children:0===u.length?(0,t.jsx)("p",{className:"px-1 text-sm leading-relaxed text-muted-foreground",children:"No calls yet. Everything said on the line is kept here — hers and yours, in the order it was said."}):(0,t.jsxs)("div",{ref:d,onScroll:e=>{let t=e.currentTarget;m.current=t.scrollHeight-t.scrollTop},className:(0,E.cn)(P,"overflow-y-auto overscroll-contain pb-6"),children:[(0,t.jsx)(f.SettingMore,{hasMore:i,loading:s,sentinelRef:o,count:1,ghost:(0,t.jsx)(H,{})}),u.map(e=>(0,t.jsx)(D,{call:e,onDropped:c},e.id))]})})}function H(){return(0,t.jsxs)("div",{className:"space-y-3 pb-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 py-5",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-border/60"}),(0,t.jsx)(S.Skeleton,{className:"h-6 w-36 rounded-full"}),(0,t.jsx)("span",{className:"h-px flex-1 bg-border/60"}),(0,t.jsx)("span",{className:"size-7 shrink-0"})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(S.Skeleton,{className:"h-9 w-3/5 rounded-2xl rounded-br-md"})}),(0,t.jsx)(S.Skeleton,{className:"h-5 w-2/3"})]})}function D({call:e,onDropped:n}){let[s,r]=(0,C.useServerAction)(T,{okMessage:"Call deleted",onOk:n}),l=(0,w.toDate)(e.startedAt),i=e.turns.at(-1),o=e.endedAt&&i?function(e,t){let n=Math.max(0,Math.round((t.getTime()-e.getTime())/1e3));if(n<60)return`${n}s`;let s=Math.floor(n/60);return s<60?`${s}m ${String(n%60).padStart(2,"0")}s`:`${Math.floor(s/60)}h ${String(s%60).padStart(2,"0")}m`}(l,(0,w.toDate)(i.at)):"on the line",u=async()=>{await c.notify.confirm({title:`Delete the call from ${(0,w.whenOf)(l)}?`,description:"Every turn of it goes — and she stops reading it back into the next call.",okText:"Delete",destructive:!0})&&s(e.id)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"group flex items-center gap-3 py-5",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-border/60"}),(0,t.jsxs)("span",{title:`${e.provider} \xb7 ${e.model}`,className:"flex shrink-0 items-center gap-2 rounded-full bg-muted/60 py-1 pr-3 pl-2.5 ring-1 ring-border/50",children:[(0,t.jsx)(j,{className:"size-3 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-mono text-[11px]",children:(0,w.whenOf)(l)}),(0,t.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:o})]}),(0,t.jsx)("span",{className:"h-px flex-1 bg-border/60"}),(0,t.jsx)("span",{className:"flex size-7 shrink-0 items-center justify-center",children:e.endedAt&&(0,t.jsx)(a.Button,{size:"icon-sm",variant:"ghost",loading:r,"aria-label":"Delete this call",onClick:u,className:"text-muted-foreground/60 opacity-0 transition-opacity group-hover:opacity-100 hover:text-destructive focus-visible:opacity-100",children:(0,t.jsx)(k.Trash2,{})})})]}),(function(e){let t=[];for(let n of e){let e=t.at(-1);if(e&&"tool"===n.role&&"tool"===e.turn.role&&e.turn.tool===n.tool&&e.turn.text===n.text){e.repeats+=1;continue}t.push({turn:n,repeats:1})}return t})(e.turns).map(({turn:e,repeats:n},s,r)=>{let l=r[s-1]?.turn,a=r[s+1]?.turn;return(0,t.jsx)(F,{turn:e,repeats:n,opensRun:l?.role!==e.role,closesRun:a?.role!==e.role},e.id)})]})}function F({turn:e,opensRun:n,closesRun:s,repeats:r=1}){if("tool"===e.role)return(0,t.jsx)($,{turn:e,repeats:r});let l="user"===e.role;return(0,t.jsxs)("div",{className:(0,E.cn)("flex items-end gap-2",n?"mt-3":"mt-1",l?"justify-end":"justify-start"),children:[!l&&(0,t.jsx)("span",{className:"mb-0.5 grid size-[18px] shrink-0 place-items-center",children:s&&(0,t.jsx)(z,{size:18})}),(0,t.jsx)("p",{className:(0,E.cn)("max-w-[min(34rem,78%)] px-3.5 py-2 text-[13.5px] leading-relaxed break-keep whitespace-pre-wrap",l?"rounded-2xl bg-muted":"rounded-2xl bg-card ring-1 ring-border/70",s&&(l?"rounded-br-sm":"rounded-bl-sm")),children:e.text})]})}function $({turn:e,repeats:n}){let s=e.tool??"",r=(0,N.toolIcon)(s),l=(0,K.toolLine)(s,e.text);return(0,t.jsx)("div",{className:"mt-3 mb-1 flex justify-center",children:(0,t.jsxs)("span",{className:"flex max-w-full items-center gap-2 rounded-full bg-muted/40 px-2.5 py-1 text-muted-foreground",children:[(0,t.jsx)(r,{className:"size-3 shrink-0"}),l&&(0,t.jsx)("span",{className:"truncate text-[11px] break-keep",children:l}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/60",children:s}),n>1&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:["×",n]})]})})}var G=e.i(333495),B=e.i(933916);let V=(0,R.createServerReference)("7fb50eb7cc92aaa810d21b827d1478b0ecce768c02",R.callServer,void 0,R.findSourceMapURL,"resetHistoryAction"),W=(0,R.createServerReference)("7fde28327961c57985f849d431eee93288e0f49c1d",R.callServer,void 0,R.findSourceMapURL,"setCallSkillsAction");var q=e.i(67045),U=e.i(698570),Y=e.i(319841),X=e.i(981203),Z=e.i(283653);function J(){let{data:e}=(0,Z.useServerRoute)(l.queryKey.callSkills),[n]=(0,C.useServerAction)(W,{onOk:()=>(0,Z.revalidate)(l.queryKey.callSkills)});return(0,t.jsx)(f.SettingGroup,{label:"Skills",children:(0,t.jsx)(f.SettingToggle,{label:"Read a skill herself",description:"A skill is how a thing is done here, written down. On, she opens one mid-call and follows it; off, only bots read them.",checked:e??!1,disabled:void 0===e,onChange:e=>n(e),children:(0,t.jsx)(Q,{})})})}function Q(){let{data:e}=(0,Z.useServerRoute)(l.queryKey.skills);return e?(0,t.jsx)(f.SettingNote,{className:(0,E.cn)(!e.length&&E.WAITING_INK),children:e.length?`The same ${e.length} a bot reads. Each one she opens spends a page of the call on it.`:"Nothing installed yet — there is nothing for her to read."}):null}function ee(){let[e,n]=(0,C.useServerAction)(V,{okMessage:({calls:e,tasks:t,notes:n})=>`Wiped ${e} calls, ${t} jobs, ${n} notes`,onOk:()=>{(0,Z.revalidate)(l.queryKey.memory),(0,Z.revalidate)(l.queryKey.tasks),(0,Z.revalidate)(l.queryKey.callHistory(null))}}),r=async()=>{await c.notify.confirm({title:"Reset history?",description:"Every call, every job and everything she remembers is deleted for good. Keys, bots and connectors stay.",okText:"Reset",destructive:!0})&&e()};return(0,t.jsx)(f.SettingGroup,{label:"Danger zone",note:"Keys, bots and connectors stay.",children:(0,t.jsx)(f.SettingItems,{children:(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,t.jsx)(s.TriangleAlert,{className:"size-4"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block text-sm font-medium",children:"Reset history"}),(0,t.jsx)("span",{className:"block text-xs text-muted-foreground",children:"Every call, every job and everything she remembers"})]}),(0,t.jsx)(a.Button,{variant:"outline",size:"sm",loading:n,onClick:r,className:"shrink-0 text-destructive hover:text-destructive",children:"Reset"})]})})})}function et({value:e,onChange:n}){let s=t=>n({...e,...t});return(0,t.jsx)(f.SettingGroup,{label:"Face",children:(0,t.jsxs)("div",{className:"space-y-5 py-2",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 pt-2",children:[(0,t.jsx)(G.Face,{look:e,size:176,className:"w-44"}),(0,t.jsx)(u.Segmented,{"aria-label":"Face",options:B.FACE_KINDS.map(e=>({value:e,label:G.FACES[e].label})),value:e.kind,onChange:e=>s({kind:e})}),(0,t.jsx)("p",{className:"max-w-sm text-center text-xs text-muted-foreground",children:G.FACES[e.kind].hint})]}),"mark"===e.kind&&(0,t.jsx)("div",{className:"flex justify-center px-2",children:(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(d.Swatch,{color:null,picked:!e.color,onPick:()=>s({color:void 0})}),(0,t.jsx)("span",{className:"w-2"}),p.MARK_PALETTE_ROWS[0].map(n=>(0,t.jsx)(d.Swatch,{color:n,picked:e.color===n,onPick:()=>s({color:n})},n))]}),(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2 pl-9",children:p.MARK_PALETTE_ROWS[1].map(n=>(0,t.jsx)(d.Swatch,{color:n,picked:e.color===n,onPick:()=>s({color:n})},n))})]})}),"mark"===e.kind&&(0,t.jsx)(es,{label:"Shape",children:(0,t.jsx)(u.Segmented,{"aria-label":"Shape",options:p.MARK_SHAPES.map(e=>({value:e,label:(0,t.jsx)("span",{className:"capitalize",children:e})})),value:e.shape??"blob",onChange:e=>s({shape:e})})}),"mark"===e.kind&&(0,t.jsx)(es,{label:"Style",children:(0,t.jsx)(u.Segmented,{"aria-label":"Style",options:[{value:"solid",label:"Solid"},{value:"outline",label:"Outline"}],value:e.outline?"outline":"solid",onChange:e=>s({outline:"outline"===e||void 0})})}),"ascii"===e.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(es,{label:"Glyphs",children:(0,t.jsx)(u.Segmented,{"aria-label":"Glyphs",options:B.ASCII_CHARSETS.map(e=>({value:e,label:en[e]})),value:e.charset,onChange:e=>s({charset:e})})}),(0,t.jsx)(es,{label:"Size",children:(0,t.jsx)(er,{min:4,max:16,step:1,value:e.fontSize,format:e=>`${e}px`,onChange:e=>s({fontSize:e})})}),(0,t.jsx)(es,{label:"Density",children:(0,t.jsx)(er,{min:.6,max:2,step:.1,value:e.density,format:e=>`${e.toFixed(1)}x`,onChange:e=>s({density:e})})})]})]})})}let en={ascii:"Characters",emoji:"Sprinkled",emojiOnly:"All emoji"};function es({label:e,children:n}){return(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("span",{className:"w-16 shrink-0 font-mono text-[11px] text-muted-foreground",children:e}),n]})}function er({value:e,onChange:n,format:s,...r}){return(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-3",children:[(0,t.jsx)("input",{type:"range",...r,value:e,onChange:e=>n(Number(e.target.value)),className:"min-w-0 flex-1 accent-foreground"}),(0,t.jsx)("span",{className:"w-10 shrink-0 text-right font-mono text-[11px] text-muted-foreground tabular-nums",children:s(e)})]})}function el({provider:e,value:r,hasKey:l,onPick:a}){let o=!!r,c=r?.voice??e.defaultVoice,u=r?.model??"";return(0,t.jsxs)("div",{className:(0,E.cn)("p-4",o&&"bg-muted/40"),children:[(0,t.jsxs)("button",{type:"button",disabled:o,onClick:()=>a({voice:null,model:null}),className:"flex w-full items-center gap-3 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default",children:[(0,t.jsx)(m.ProviderIcon,{provider:e.id,className:"size-4 shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.label}),(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:u||e.models[0].id})]}),l?o&&(0,t.jsx)(n.Check,{className:"size-4 shrink-0"}):(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(s.TriangleAlert,{className:"size-3"}),"No key"]})]}),o&&(0,t.jsxs)("div",{className:"space-y-3 pt-3",children:[(0,t.jsx)(i.Combobox,{value:u,onChange:e=>a({voice:r?.voice??null,model:e||null}),options:e.models.map(e=>({value:e.id,label:e.label,hint:e.id})),"aria-label":`${e.label} realtime model`,placeholder:e.models[0].id,empty:"Not on the list — it still runs"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.voices.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>a({voice:e,model:r?.model??null}),className:(0,E.cn)("rounded-full border px-2.5 py-1 font-mono text-[11px] transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/50",e===c?"border-foreground/40 text-foreground":"border-border/60 text-muted-foreground hover:text-foreground"),children:e},e))})]})]})}let ea={center:{label:"Her last line",hint:"One caption under the mark — only what she said."},sides:{label:"Last three turns",hint:"Hers on the left, yours on the right, beside the mark."}};function ei({value:e,onChange:n}){return(0,t.jsx)(f.SettingGroup,{label:"Calls you",note:"off"!==e&&"Needs this tab open. A tab that has been silent since it loaded may not be allowed to make a sound — the desktop notification covers that.",children:(0,t.jsx)(f.SettingChoiceRows,{options:_.CALL_BACK_MODES.map(e=>({value:e,label:_.CALL_BACK_LABEL[e],hint:eo[e]})),value:e,onChange:n})})}let eo={off:"Nothing opens a call but you.",waiting:"A job that stopped to ask gets her to ring you.",any:"Anything a bot finishes, she opens a line to tell you."};function ec({value:e,onChange:n}){return(0,t.jsx)(f.SettingGroup,{label:"Captions",children:(0,t.jsx)(f.SettingChoiceRows,{options:_.CAPTION_VIEWS.map(e=>({value:e,label:ea[e].label,hint:ea[e].hint})),value:e,onChange:n})})}function eu({value:e,onChange:n}){let s=(0,U.useDraft)(e.phrase,t=>n({...e,phrase:t}),{min:_.WAKE_PHRASE.min}),r=s.value.trim().split(/\s+/).length<2;return(0,t.jsx)(f.SettingGroup,{label:"Wake",children:(0,t.jsx)(f.SettingToggle,{label:"Answer to her name",description:"Between calls, the browser listens for the phrase below and picks up when it hears it.",checked:e.enabled,onChange:t=>n({...e,enabled:t}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o.Input,{value:s.value,maxLength:_.WAKE_PHRASE.max,spellCheck:!1,onChange:e=>s.set(e.target.value),onBlur:s.commit,onKeyDown:s.onKeyDown,"aria-label":"Wake phrase",className:"font-mono text-sm"}),(0,t.jsx)(f.SettingNote,{children:r?"One word will wake her by accident — say hello first.":"Heard loosely, in English. Near misses count."})]})})})}function ed({value:e,onChange:n}){let[s,l]=(0,r.useState)(!1),[a,i]=(0,r.useState)(!1),o=(0,Y.useHotkeyLabel)((0,Y.isCombo)(e.combo)?e.combo:null);return(0,t.jsx)(f.SettingGroup,{label:"Shortcut",children:(0,t.jsx)(f.SettingToggle,{label:"Answer to a key",description:"With this tab in front, the key below starts a call — and ends the one that is running.",checked:e.enabled,onChange:t=>n({...e,enabled:t}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("button",{type:"button",...Y.HOTKEY_CAPTURE,onClick:()=>{i(!1),l(!0)},onBlur:()=>l(!1),onKeyDown:s?t=>{if("Tab"===t.key)return;if(t.preventDefault(),t.stopPropagation(),"Escape"===t.key)return l(!1);let s=(0,Y.comboOf)(t.nativeEvent);if(!s)return i(!0);i(!1),l(!1),n({...e,combo:s})}:void 0,className:(0,E.cn)("w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",s?"border-foreground/40 text-muted-foreground":"border-border/60 hover:bg-muted/50"),children:s?"Press the keys…":o??"Set a shortcut"}),(0,t.jsx)(f.SettingNote,{children:a?"Hold Ctrl, Alt or Cmd — a plain key is typing.":s?"Esc to keep the one you have.":"Only while this tab has focus. Not while you are typing."})]})})})}function eh({value:e,onSave:n}){let[s,l]=(0,r.useState)(e);return(0,t.jsx)(f.SettingGroup,{label:"Instructions",right:`${s.length}/${X.COMMON_VALIDATE.prompt.max}`,children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(h.Textarea,{value:s,maxLength:X.COMMON_VALIDATE.prompt.max,onChange:e=>l(e.target.value),placeholder:"Anything else she should know before the first word — how to address you, what to skip.",className:"min-h-28"}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(a.Button,{size:"sm",disabled:s===e,onClick:()=>n(s),children:"Save"})})]})})}e.s(["ThursdaySetting",0,function(){let e=(0,q.useThursdayStore)(),n=(0,q.useThursdayStore)(e=>e.patch),{data:s=[],isLoading:r,error:a}=(0,Z.useServerRoute)(l.queryKey.llmModel),i=(0,O.useThursdayFace)();if(r)return(0,t.jsx)(f.SettingSkeleton,{rows:4});if(a)return(0,t.jsx)(f.SettingError,{message:a.message});let o=e.model?.provider??null;return(0,t.jsxs)(f.SettingScreen,{footer:(0,t.jsx)(f.SettingRailNote,{children:"Her prompt is assembled fresh on every call — memory, the roster and your skills go in."}),children:[(0,t.jsx)(et,{value:i,onChange:O.setThursdayFace}),(0,t.jsx)(I,{}),(0,t.jsx)(f.SettingGroup,{label:"Voice",note:!o&&"Nothing picked — calls run on whichever key is set.",children:(0,t.jsx)(f.SettingItems,{children:x.SPEACH_MODEL_PROVIDER_LIST.map(r=>{let l;return(0,t.jsx)(el,{provider:r,value:o===r.id?e.model:null,hasKey:(l=r.apiKeyName,s.some(e=>e.apiKeyName===l&&e.hasKey)),onPick:e=>n({model:{provider:r.id,...e}})},r.id)})})}),(0,t.jsx)(ec,{value:e.captionView,onChange:e=>n({captionView:e})}),(0,t.jsx)(eu,{value:e.wake,onChange:e=>n({wake:e})}),(0,t.jsx)(ei,{value:e.callBack,onChange:e=>n({callBack:e})}),(0,t.jsx)(ed,{value:e.hotkey,onChange:e=>n({hotkey:e})}),(0,t.jsx)(J,{}),(0,t.jsx)(g.TidySetting,{}),(0,t.jsx)(eh,{value:e.systemPrompt??"",onSave:e=>n({systemPrompt:e})}),(0,t.jsx)(ee,{})]})}],59158)},698570,e=>{"use strict";var t=e.i(271645);e.s(["useDraft",0,function(e,n,{min:s=1}={}){let[r,l]=(0,t.useState)(e),[a,i]=(0,t.useState)(e);return e!==a&&(i(e),l(e)),{value:r,set:l,commit:()=>{let t=r.trim();if(t.length<s)return l(e);l(t),t!==e&&n(t)},onKeyDown:e=>{"Enter"!==e.key||e.nativeEvent.isComposing||e.currentTarget.blur()}}}])},661504,e=>{"use strict";var t=e.i(271645),n=e.i(699018),s=e.i(677309),r=e.i(271235),l=e.i(802239),a=e.i(646192);let i=Promise.resolve(),o=(0,r.withMiddleware)(n.u,e=>(n,r,o)=>{let c,u=(0,t.useRef)(!1),{cache:d,initialSize:h=1,revalidateAll:m=!1,persistSize:x=!1,revalidateFirstPage:p=!0,revalidateOnMount:g=!1,parallel:f=!1}=o,[,,,v]=s.a.get(s.o);try{(c=(0,s.s)(n?n(0,null):null)[0])&&(c=a.INFINITE_PREFIX+c)}catch(e){}let[b,y,j]=(0,s.c)(d,c),k=(0,t.useCallback)(()=>(0,s.i)(b()._l)?h:b()._l,[d,c,h]);(0,l.useSyncExternalStore)((0,t.useCallback)(e=>c?j(c,()=>{e()}):()=>{},[d,c]),k,k);let S=(0,t.useCallback)(()=>{let e=b()._l;return(0,s.i)(e)?h:e},[c,h]),N=(0,t.useRef)(S());(0,s.u)(()=>{if(!u.current){u.current=!0;return}c&&y({_l:x?N.current:S()})},[c,d]);let w=g&&!u.current,C=e(c,async e=>{let t=b()._i,l=b()._r,a=s.a.get(d),i=a[8],c=()=>a[8]!==i;y({_r:s.U});let u=[],h=S(),[x]=(0,s.c)(d,e),g=x().data,j=[],k=null;for(let e=0;e<h;++e){let[a,i]=(0,s.s)(n(e,f?null:k));if(!a)break;let[h,x]=(0,s.c)(d,a),b=h().data,y=m||t||(0,s.i)(b)||p&&!e&&!(0,s.i)(g)||w||g&&!(0,s.i)(g[e])&&!o.compare(g[e],b);if(r&&("function"==typeof l?l(b,i):y)){let t=async()=>{if(a in v){let e=v[a];delete v[a],b=await e}else b=await r(i);c()||x({data:b,_k:i}),u[e]=b};f?j.push(t):await t()}else u[e]=b;f||(k=b)}return f&&await Promise.all(j.map(e=>e())),c()||y({_i:s.U}),u},o),A=(0,t.useCallback)(function(e,t){let n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return c?(r&&((0,s.i)(e)?y({_i:!0,_r:n.revalidate}):y({_i:!1,_r:n.revalidate})),arguments.length?C.mutate(e,{...n,revalidate:r}):C.mutate()):i},[c,d]),E=(0,t.useCallback)(e=>{let t;if(!c)return i;let[,r]=(0,s.c)(d,c);if((0,s.e)(e)?t=e(S()):"number"==typeof e&&(t=e),"number"!=typeof t)return i;r({_l:t}),N.current=t;let l=[],[a]=(0,s.c)(d,c),o=null;for(let e=0;e<t;++e){let[t]=(0,s.s)(n(e,o)),[r]=(0,s.c)(d,t),i=t?r().data:s.U;if((0,s.i)(i))return A(a().data);l.push(i),o=i}return A(l)},[c,d,A,S]);return{size:S(),setSize:E,mutate:A,get data(){return C.data},get error(){return C.error},get isValidating(){return C.isValidating},get isLoading(){return C.isLoading}}});var c=e.i(41533),u=e.i(283653);e.s(["useServerPages",0,function(e){let n=e.size??c.PAGE_SIZE,{key:s}=e,{data:r,error:l,isLoading:a,isValidating:i,setSize:d,mutate:h}=o((e,t)=>(0,u.resolveKey)(s(e,t)),u.fetchRoute,{dedupingInterval:500,revalidateOnMount:!0,revalidateOnFocus:!0,revalidateOnReconnect:!0,focusThrottleInterval:1e3,revalidateFirstPage:!1,...e.swr}),m=r??[],x=m.flat(),p=m.at(-1),g=void 0!==p&&p.length>=n,f=(0,t.useRef)(0),v=i&&m.length>0&&f.current>m.length,b=(0,t.useRef)({isValidating:i,setSize:d,pages:m.length});b.current={isValidating:i,setSize:d,pages:m.length};let y=(0,u.resolveKey)(s(0,null)),j="string"==typeof y?y:y?.url;(0,t.useEffect)(()=>{if(j)return(0,u.registerPagedReader)({url:j,refresh:()=>h()})},[j,h]);let k=function(e,n={}){let{enabled:s=!0,margin:r="600px",revision:l}=n,a=(0,t.useRef)(e);a.current=e;let i=(0,t.useRef)(null),o=(0,t.useRef)(null),c=(0,t.useCallback)(e=>{i.current=e},[]);return(0,t.useEffect)(()=>{o.current?.disconnect();let e=i.current;if(e&&s)return o.current=new IntersectionObserver(([e])=>{e.isIntersecting&&a.current()},{root:function(e){let t=e.parentElement;for(;t;){let{overflowY:e}=getComputedStyle(t);if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}(e),rootMargin:r}),o.current.observe(e),()=>o.current?.disconnect()},[s,r,l]),c}(()=>{let e=b.current;e.isValidating||(f.current=e.pages+1,e.setSize(e.pages+1))},{enabled:g,revision:`${m.length}:${i}`});return{items:x,isLoading:a,isLoadingMore:v,error:l,hasMore:g,sentinelRef:k,refresh:()=>h()}}],661504)},759659,e=>{"use strict";var t=e.i(456420);let n={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};n.node;let s=(0,t.default)(n);e.s(["Trash2",0,s],759659)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,222055,589128,e=>{"use strict";var t=e.i(843476),a=e.i(689664),n=e.i(716327),r=e.i(482022),s=e.i(60744),i=e.i(831458),o=e.i(91511),l=e.i(815170),d=e.i(218964),u=e.i(632781),c=e.i(468590),h=e.i(566595),p=e.i(730274),m=e.i(604139),f=e.i(747925),g=e.i(271645),x=e.i(798120),y=e.i(660302),k=e.i(671428),b=e.i(991322),v=e.i(852116);let M=e.i(328256).BookMarked;e.s(["SkillsMark",0,M],589128);var w=e.i(621285),j=e.i(283653),z=e.i(647163);let S={web_search:function({tool:e,taskId:a,collapsed:n}){let r=A(e.results);return(0,t.jsxs)(O,{tool:e,taskId:a,icon:h.Search,collapsed:n,children:[(0,t.jsxs)("p",{className:"px-3 pt-1 pb-1.5 text-[13px] leading-snug break-keep",children:["“",e.input,"”"]}),r.length>0&&(0,t.jsx)("ol",{className:"space-y-0.5 px-3 pb-2",children:r.map((e,a)=>(0,t.jsxs)("li",{className:"flex gap-2 text-[11.5px] leading-snug text-muted-foreground",children:[(0,t.jsx)("span",{className:"mt-1.25 size-1 shrink-0 rounded-full bg-muted-foreground/50"}),(0,t.jsx)("span",{className:"truncate",children:e})]},`${a}-${e}`))})]})},bash:function({tool:e,taskId:a,collapsed:n}){let r=A(e.results);return(0,t.jsx)(O,{tool:e,taskId:a,icon:m.Terminal,collapsed:n,children:(0,t.jsxs)("pre",{className:"mx-3 overflow-x-auto rounded-lg bg-foreground/5 px-2.5 py-1.5 font-mono text-[11px] leading-relaxed scrollbar-none dark:bg-black/25",children:[(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"$ "}),e.input,r.length>0&&(0,t.jsx)("span",{className:"block text-muted-foreground",children:r.join("\n")})]})})},fetch:e=>(0,t.jsx)(C,{icon:o.Globe,...e}),write_file:e=>(0,t.jsx)(D,{icon:s.FilePen,...e}),generate_image:function({tool:e,taskId:a,collapsed:n}){let[s]=A(e.results);return(0,t.jsxs)(O,{tool:e,taskId:a,icon:l.Image,collapsed:n,children:[(0,t.jsx)("p",{className:"px-3 pt-1 text-[12px] leading-snug break-keep",children:e.input}),s&&(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-1 pb-1.5",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-muted-foreground",children:s}),(0,t.jsxs)(w.FileLink,{path:s,label:`Open ${s}`,className:L,children:[(0,t.jsx)(r.ExternalLink,{className:"size-3"}),"Open"]})]})]})}},N={web_search:h.Search,bash:m.Terminal,fetch:o.Globe,write_file:s.FilePen,generate_image:l.Image,memory_recall:v.MemoryMark,memory_remember:v.MemoryMark,memory_forget:v.MemoryMark,memory_show:v.MemoryMark,load_skill:M,tool_search:b.McpMark,tool_call:b.McpMark,delegate:p.Send,task:d.ListChecks,ask_bot:c.MessageSquare,ask_back:c.MessageSquare,ask_thursday:c.MessageSquare,report:i.Flag},I=e=>N[e]??f.Wrench;function C({icon:e,tool:a,taskId:n,collapsed:r}){return(0,t.jsxs)(O,{tool:a,taskId:n,icon:e,collapsed:r,children:[(0,t.jsx)("p",{className:"truncate px-3 pt-1 pb-1.5 font-mono text-[11px]",children:a.input}),(0,t.jsx)(_,{lines:A(a.results),mono:!0})]})}let L="flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:bg-background hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50";function D({icon:e,tool:a,taskId:n,collapsed:s}){let i=a.path??a.input;return(0,t.jsxs)(O,{tool:a,taskId:n,icon:e,collapsed:s,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-1 pb-1.5",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px]",children:a.input}),(0,t.jsxs)(w.FileLink,{path:i,label:`Open ${i}`,className:L,children:[(0,t.jsx)(r.ExternalLink,{className:"size-3"}),"Open"]})]}),(0,t.jsx)(_,{lines:A(a.results),mono:!0})]})}function E({tool:e,taskId:a,collapsed:n}){return(0,t.jsxs)(O,{tool:e,taskId:a,icon:I(e.name),collapsed:n,children:[(0,t.jsx)("p",{className:"px-3 pt-1 pb-1.5 text-[12px] leading-snug break-keep",children:e.input}),(0,t.jsx)(_,{lines:A(e.results)})]})}function O({tool:e,taskId:r,icon:s,collapsed:i=!1,children:o}){let l=void 0===e.results,[d,c]=(0,g.useState)(!i),h=d||l,p=e.more&&r&&e.callId;return(0,t.jsxs)("div",{className:(0,z.cn)("@container w-full overflow-hidden rounded-xl transition-colors",h?"bg-background/80 dark:bg-white/4":"hover:bg-foreground/4"),children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(e=>!e),"aria-expanded":h,className:"flex w-full items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded-[7px] bg-foreground/8 text-muted-foreground",children:l?(0,t.jsx)(u.Loader2,{className:"size-3 animate-spin"}):(0,t.jsx)(s,{className:"size-3"})}),e.note?(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(y.default,{text:e.note,speed:2.4,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep",children:e.note}),(0,t.jsx)("span",{className:"hidden min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-muted-foreground/85 @lg:block",children:e.input})]}):l?(0,t.jsx)(y.default,{text:e.input,speed:2.4,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-foreground/80",children:e.input}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:e.name}),!l&&(0,t.jsx)(a.Check,{className:"size-3 shrink-0 text-muted-foreground/50"}),(0,t.jsx)(n.ChevronDown,{className:(0,z.cn)("size-3 shrink-0 text-muted-foreground/50 transition-transform",h&&"rotate-180")})]}),h&&(0,t.jsxs)("div",{className:"pb-1.5 pl-[1.625rem]",children:[o,p&&(0,t.jsx)(R,{taskId:r,callId:e.callId})]})]})}function R({taskId:e,callId:a}){let[r,s]=(0,g.useState)(!1),{data:i,isLoading:o}=(0,j.useServerRoute)(r?x.queryKey.toolResult(e,a):null);return(0,t.jsxs)("div",{className:"px-3 pb-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>s(e=>!e),className:"flex items-center gap-1 rounded-md py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(n.ChevronDown,{className:(0,z.cn)("size-3",r&&"rotate-180")}),r?"Less":"Everything"]}),r&&(o||!i?(0,t.jsx)(k.Skeleton,{className:"mt-1.5 h-12 w-full rounded-lg"}):(0,t.jsxs)("div",{className:"mt-1.5 space-y-1.5",children:[q(i).map((e,a)=>(0,t.jsx)(T,{src:e},`${a}-${e.length}`)),A(i).length>0&&(0,t.jsx)("pre",{className:"max-h-72 overflow-auto rounded-lg bg-foreground/5 px-2.5 py-2 font-mono text-[11px] leading-relaxed break-all whitespace-pre-wrap dark:bg-black/25",children:A(i).join("\n")})]}))]})}function T({src:e}){return(0,t.jsx)("img",{src:e,alt:"",className:"block w-full rounded-lg bg-muted object-contain"})}function _({lines:e,mono:a}){return 0===e.length?null:(0,t.jsx)("ul",{className:"px-3 pb-1.5",children:e.map((e,n)=>(0,t.jsx)("li",{className:(0,z.cn)("truncate text-[11px] leading-relaxed text-muted-foreground",a&&"font-mono"),children:e},`${n}-${e}`))})}let A=e=>e?.flatMap(e=>"text"===e.type?[e.text]:[])??[],q=e=>e?.flatMap(e=>"image"===e.type?[e.src]:[])??[];e.s(["BotTool",0,function(e){let a=S[e.tool.name]??E;return(0,t.jsx)(a,{...e})},"toolIcon",0,I],222055)},39152,463625,e=>{"use strict";var t=e.i(95187);let a=(0,t.createServerReference)("7f6c0a389e723d17d2e75bda0ac33eb274cb4e12e8",t.callServer,void 0,t.findSourceMapURL,"createSeedBotsAction");e.s(["createSeedBotsAction",0,a],39152);var n=e.i(41533);e.i(864723);let r=[{name:"Jarvis",description:"Any job — turns it into a plan, hands each part to whoever it belongs to, does the rest, reports one result",icon:{shape:"squircle"},recommended:!0,example:"Set up a Google account just for my bots to use",systemPrompt:"You are Jarvis. A job reaches you as a sentence and leaves as a plan: what it actually needs, in what order, and who does each part. Settle what is still open in one round rather than guessing at it, then send for what the job is made of before you build — a part another bot exists for is theirs, and everything nobody else is for is yours. You hold the whole while they hold pieces: the order the parts run in, the seams where what comes back has to fit together, and the single thing that is handed over at the end. The plan is how the job gets done, not what gets handed back."},{name:"Navigator",description:"The web through a real browser — opens the page itself, signs in, brings back prices, images and links as they stand now",icon:{shape:"poly"},recommended:!0,example:"Find thirty wedding pose photos and put them on one page for me",systemPrompt:`You are Navigator. Every browser job is yours: load the \`${n.BROWSER_SKILL}\` skill first and work through it. A search result says a page exists; you say what is on it right now — so open it, sign in where it asks you to, and keep going past the first screen until you have the thing itself: exact figures, the links that open them, the images off the page. Nothing you did not see goes in what you hand back, and a page that refused you is a fact with a url on it, not a gap to fill in from memory. Whoever asked should never need to open the site after you.`},{name:"Scribe",description:"Writing that gets read — finds out what it is for, researches it, then picks the form: prose, table, or a page",icon:{shape:"blob"},recommended:!0,example:"Write up what we decided today as a one-page brief",systemPrompt:"You are Scribe. Who reads it and what they do next decides everything else, so learn that first, then research before you claim: every number and name you write traces back to something you actually read. Pick the form by the reading — a `.md` for something read once, a `.csv` for what gets sorted, a page (the `interactive-page` skill) for something used or something whose pictures are the point. When the request does not settle which it is — something read once or something used — ask before you write rather than committing a whole draft to a guess. Cut what the reader would skip, and never spend a paragraph where a table or a picture answers in one glance. One page they finish beats five they abandon."}];e.s(["BOT_SEEDS",0,r],463625)},992112,e=>{"use strict";var t=e.i(265402);let a=[...new Set(Object.values(t.SPEACH_MODEL_PROVIDERS).map(e=>e.apiKeyName))],n={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},r={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},s={key:"DEFAULT_MODEL",label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:t.TEXT_MODEL_PROVIDER_LIST.flatMap(e=>e.suggestModels.map(t=>({value:`${e.id}/${t.id}`,label:`${e.label} \xb7 ${t.label}`,needs:e.apiKeyName})))},i=e=>a.includes(e.apiKeyName),o=e=>({key:e.apiKeyName,label:e.label,provider:e.id}),l=[{id:"voice",title:"voice",hint:"calls run on one of these",section:"keys",require:"any",note:"one is required",entries:t.TEXT_MODEL_PROVIDER_LIST.filter(i).map(o)},{id:"text",title:"models",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:t.TEXT_MODEL_PROVIDER_LIST.filter(e=>!i(e)).map(o)},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own",section:"models",require:"none",entries:[s]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(n).map(e=>({key:n[e],...r[e],kind:e,choices:t.MEDIA_MODEL_PROVIDER_LIST.flatMap(t=>t.models[e].map(e=>({value:`${t.id}/${e.id}`,label:`${t.label} \xb7 ${e.label}`,needs:t.apiKeyName})))}))}];Object.fromEntries(l.flatMap(e=>e.entries).map(e=>[e.key,e])),l.flatMap(e=>e.entries.map(e=>e.key)),Object.fromEntries(l.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices])),e.s(["CONFIG_GROUPS",0,l,"groupSatisfied",0,function(e,t){return"none"===e.require||(e.requireKeys??e.entries.map(e=>e.key)).some(t)},"isConfigSet",0,function(e,t){return e?.some(e=>e.key===t&&e.set)??!1}])},852116,e=>{"use strict";var t=e.i(456420);let a={name:"cpu",size:24,node:[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]};a.node;let n=(0,t.default)(a);e.s(["MemoryMark",0,n],852116)},395530,e=>{"use strict";var t=e.i(271645),a=e.i(828918),n=e.i(838452),r=e.i(673553);e.s(["useCompositeItem",0,function(e={}){let{highlightItemOnHover:s,highlightedIndex:i,onHighlightedIndexChange:o}=(0,n.useCompositeRootContext)(),{ref:l,index:d}=(0,r.useCompositeListItem)(e),u=i===d,c=t.useRef(null),h=(0,a.useMergedRefs)(l,c);return{compositeProps:{tabIndex:u?0:-1,onFocus(){o(d)},onMouseMove(){let e=c.current;if(!s||!e)return;let t=e.hasAttribute("disabled")||"true"===e.ariaDisabled;u||t||e.focus()}},compositeRef:h,index:d}}])},53687,e=>{"use strict";var t=e.i(271645),a=e.i(388940),n=e.i(667865),r=e.i(146376),s=e.i(545356),i=e.i(843476);function o(){return new Map}function l(){return new Set}function d(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}e.s(["CompositeList",0,function(e){let{children:u,elementsRef:c,labelsRef:h,onMapChange:p}=e,m=(0,n.useStableCallback)(p),[,f]=t.useState(!1),g=(0,a.useRefWithInit)(l).current,x=(0,a.useRefWithInit)(o).current,y=t.useRef(0),k=t.useRef(!0),b=t.useRef(null),v=t.useRef(null),M=(0,n.useStableCallback)(()=>{k.current||(k.current=!0,f(e=>!e))}),w=(0,n.useStableCallback)((e,t)=>{x.set(e,t),M()}),j=(0,n.useStableCallback)(e=>{x.delete(e),M()}),z=(0,n.useStableCallback)(e=>{let t=new Map;return c.current.length=0,h&&(h.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),c.current[e.index]=e.element,h&&(h.current[e.index]=void 0!==e.registration.label?e.registration.label:e.registration.textRef?.current?.textContent??e.element.textContent)}),y.current=c.current.length,t}),S=(0,n.useStableCallback)(()=>{var e;let t,a,n,r,[s,i]=(e=x,t=new Set,a=[],n=[],e.forEach((e,r)=>{if(!r.isConnected)return;let s=e.index,i={index:s??-1,element:r,registration:e};null===s?n.push(i):s>=0&&(t.add(s),a.push(i))}),r=0,n.sort((e,t)=>d(e.element,t.element)),n.forEach(e=>{for(;t.has(r);)r+=1;e.index=r,a.push(e),r+=1}),t.size>0&&a.sort((e,t)=>e.index-t.index),[a,n.map(e=>e.element)]),o=z(s),l=b.current,u=!l||l.length!==s.length||s.some((e,t)=>{let a=l[t];return e.index!==a.index||e.element!==a.element||e.registration.index!==a.registration.index||e.registration.metadata!==a.registration.metadata});!function(e){if(v.current?.disconnect(),v.current=null,"function"!=typeof MutationObserver||e.length<2)return;let t=new MutationObserver(a=>{if(!function(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}(a))return;let n=null;for(let a of e)if(a.isConnected){if(n&&d(n,a)>0){t.disconnect(),M();return}n=a}});v.current=t;let a=new Set;for(let t=1;t<e.length;t+=1){let n=function(e,t){let a=e.parentElement;for(;a&&!a.contains(t);)a=a.parentElement;return a}(e[t-1],e[t]);n&&a.add(n)}a.forEach(e=>t.observe(e,{childList:!0}))}(i),b.current=s,k.current=!1,u&&(g.forEach(e=>e(o)),m(o))});(0,r.useIsoLayoutEffect)(()=>(!k.current&&b.current&&z(b.current),()=>{c.current=[],h&&(h.current=[])}),[c,h,z]),(0,r.useIsoLayoutEffect)(()=>{k.current&&S()}),(0,r.useIsoLayoutEffect)(()=>()=>{v.current?.disconnect(),k.current=!0},[]);let N=(0,n.useStableCallback)(e=>(g.add(e),()=>{g.delete(e)})),I=t.useMemo(()=>({register:w,unregister:j,subscribeMapChange:N,nextIndexRef:y}),[w,j,N,y]);return(0,i.jsx)(s.CompositeListContext.Provider,{value:I,children:u})}])},545356,e=>{"use strict";e.i(247167);var t=e.i(271645);let a=t.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});e.s(["CompositeListContext",0,a,"useCompositeListContext",0,function(){return t.useContext(a)}])},673553,e=>{"use strict";var t=e.i(271645),a=e.i(146376),n=e.i(545356);e.s(["useCompositeListItem",0,function(e={}){let{guess:r,label:s,metadata:i,textRef:o,index:l}=e,{register:d,unregister:u,subscribeMapChange:c,nextIndexRef:h}=(0,n.useCompositeListContext)(),p=t.useRef(-1),[m,f]=t.useState(null==l&&r?()=>{if(-1===p.current){let e=h.current;h.current+=1,p.current=e}return p.current}:-1),g=l??m,x=t.useRef(null),y=t.useCallback(e=>{let t=x.current;t&&u(t),x.current=e,e&&d(e,{metadata:i??null,index:l??null,label:s,textRef:o})},[l,d,u,i,s,o]);return(0,a.useIsoLayoutEffect)(()=>{if(null==l)return c(e=>{let t=x.current?e.get(x.current)?.index:null;null!=t&&f(t)})},[l,c]),{ref:y,index:g}}])},652225,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(552245);let n=t.forwardRef(function(e,t){let{className:n,render:r,orientation:s="horizontal",style:i,...o}=e;return(0,a.useRenderElement)("div",e,{state:{orientation:s},ref:t,props:[{role:"separator","aria-orientation":s},o]})});e.s(["Separator",0,n])},73364,e=>{"use strict";var t=e.i(343084),a=e.i(229315);e.s(["getCssDimensions",0,function(e){let n=(0,a.getComputedStyle)(e),r=parseFloat(n.width)||0,s=parseFloat(n.height)||0,i=(0,a.isHTMLElement)(e),o=i?e.offsetWidth:r,l=i?e.offsetHeight:s;return((0,t.round)(r)!==o||(0,t.round)(s)!==l)&&(r=o,s=l),{width:r,height:s}}])},493801,751898,536015,e=>{"use strict";var t=e.i(24708),a=e.i(55545),n=e.i(455024),r=e.i(99151),s=e.i(845110),i=e.i(281092),o=e.i(234662);e.s(["formatDistanceToNowStrict",0,function(e,l){return function(e,t,l){var d;let u,c,h=(0,n.getDefaultOptions)(),p=l?.locale??h.locale??a.defaultLocale,m=(c=(0,i.toDate)(e)-(0,i.toDate)(t))<0?-1:c>0?1:c;if(isNaN(m))throw RangeError("Invalid time value");let f=Object.assign({},l,{addSuffix:l?.addSuffix,comparison:m}),[g,x]=(0,s.normalizeDates)(l?.in,...m>0?[t,e]:[e,t]),y=(d=l?.roundingMethod??"round",e=>{let t=(d?Math[d]:Math.trunc)(e);return 0===t?0:t}),k=x.getTime()-g.getTime(),b=k/o.millisecondsInMinute,v=(k-((0,r.getTimezoneOffsetInMilliseconds)(x)-(0,r.getTimezoneOffsetInMilliseconds)(g)))/o.millisecondsInMinute,M=l?.unit;if("second"===(u=M||(b<1?"second":b<60?"minute":b<o.minutesInDay?"hour":v<o.minutesInMonth?"day":v<o.minutesInYear?"month":"year"))){let e=y(k/1e3);return p.formatDistance("xSeconds",e,f)}if("minute"===u){let e=y(b);return p.formatDistance("xMinutes",e,f)}if("hour"===u){let e=y(b/60);return p.formatDistance("xHours",e,f)}if("day"===u){let e=y(v/o.minutesInDay);return p.formatDistance("xDays",e,f)}if("month"===u){let e=y(v/o.minutesInMonth);return 12===e&&"month"!==M?p.formatDistance("xYears",1,f):p.formatDistance("xMonths",e,f)}else{let e=y(v/o.minutesInYear);return p.formatDistance("xYears",e,f)}}(e,(0,t.constructNow)(e),l)}],493801);var l=e.i(456420);let d={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};d.node;let u=(0,l.default)(d);e.s(["Pin",0,u],751898);var c=e.i(681307),h=e.i(245629);let p=c.z.object({id:c.z.number(),text:c.z.string(),alwaysLoad:c.z.boolean(),createdAt:h.DateLikeSchema});c.z.object({id:c.z.number(),path:c.z.string(),description:c.z.string(),aliases:c.z.string().array().nullish(),ownedByUser:c.z.boolean(),hits:c.z.number(),lastReadAt:h.DateLikeSchema.nullable(),createdAt:h.DateLikeSchema,updatedAt:h.DateLikeSchema,factCount:c.z.number(),facts:p.array()});let m=[{path:"profile",of:"The user themselves — who they are, what they do, where, how they live"},{path:"preferences",of:"How they like things done, and said"},{path:"people/",of:"Who someone is to them, and what matters about them"},{path:"projects/",of:"Something they are building or running"},{path:"plans/",of:"A trip, an appointment, a purchase, a deadline"},{path:"topics/",of:"Anything else worth its own note"},{path:"inbox",of:"Nowhere obvious to go"}],f=m.filter(e=>!e.path.endsWith("/")).map(e=>e.path),g=m.filter(e=>e.path.endsWith("/")).map(e=>e.path.slice(0,-1));RegExp(`^(?:${f.join("|")}|(?:${g.join("|")})/.+)$`);let x=["profile","preferences"],y=c.z.object({op:c.z.enum(["add","replace","forget","carry","uncarry"]),path:c.z.string(),text:c.z.string()});c.z.object({id:c.z.string(),status:c.z.enum(["running","done","stopped","failed"]),provider:c.z.string(),model:c.z.string(),callIds:c.z.string().array(),messages:c.z.number(),changes:y.array(),error:c.z.string().nullable(),inputTokens:c.z.number(),outputTokens:c.z.number(),startedAt:h.DateLikeSchema,endedAt:h.DateLikeSchema.nullable()}),e.s(["isFading",0,function(e){let t,a,n;return t=e.path,!x.includes(t)&&.15>(a=(0,h.toDate)(e.lastReadAt??e.createdAt),n=Math.max(0,(Date.now()-a.getTime())/864e5),(e.hits+1)/(1+n))},"noteTitle",0,function(e){let t=e.indexOf("/");return -1===t?e:e.slice(t+1)},"sectionOf",0,function(e){if("profile"===e||"preferences"===e)return"you";let t=e.slice(0,e.indexOf("/"));return g.includes(t)?t:"inbox"},"tidyTally",0,function(e){let t=t=>e.filter(e=>e.op===t).length,a=[[t("add"),"added"],[t("replace"),"revised"],[t("forget"),"dropped"],[t("carry"),"carried"],[t("uncarry"),"uncarried"]].filter(([e])=>e>0).map(([e,t])=>`${e} ${t}`);return a.length?a.join(", "):"nothing to change"}],536015)},328256,e=>{"use strict";var t=e.i(456420);let a={name:"book-marked",size:24,node:[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]};a.node;let n=(0,t.default)(a);e.s(["BookMarked",0,n],328256)},716327,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};a.node;let n=(0,t.default)(a);e.s(["ChevronDown",0,n],716327)},24071,829600,226091,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let n=(0,t.default)(a);e.s(["ChevronLeft",0,n],24071);let r={name:"file",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]};r.node;let s=(0,t.default)(r);e.s(["File",0,s],829600);let i={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};i.node;let o=(0,t.default)(i);e.s(["FileText",0,o],226091)},986253,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let n=(0,t.default)(a);e.s(["default",0,n])},867927,e=>{"use strict";var t=e.i(986253);e.s(["ChevronRight",()=>t.default])},905015,e=>{"use strict";var t=e.i(456420);let a={name:"file-braces",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],aliases:["file-json"]};a.node;let n=(0,t.default)(a);e.s(["FileJson",0,n],905015)},60744,e=>{"use strict";var t=e.i(456420);let a={name:"file-pen",size:24,node:[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],aliases:["file-edit"]};a.node;let n=(0,t.default)(a);e.s(["FilePen",0,n],60744)},831458,e=>{"use strict";var t=e.i(456420);let a={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};a.node;let n=(0,t.default)(a);e.s(["Flag",0,n],831458)},569644,e=>{"use strict";var t=e.i(456420);let a={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};a.node;let n=(0,t.default)(a);e.s(["FolderOpen",0,n],569644)},91511,e=>{"use strict";var t=e.i(456420);let a={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};a.node;let n=(0,t.default)(a);e.s(["Globe",0,n],91511)},815170,e=>{"use strict";var t=e.i(456420);let a={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};a.node;let n=(0,t.default)(a);e.s(["Image",0,n],815170)},218964,468590,730274,604139,991322,e=>{"use strict";var t=e.i(456420);let a={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};a.node;let n=(0,t.default)(a);e.s(["ListChecks",0,n],218964);let r={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};r.node;let s=(0,t.default)(r);e.s(["MessageSquare",0,s],468590);let i={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};i.node;let o=(0,t.default)(i);e.s(["Send",0,o],730274);let l={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};l.node;let d=(0,t.default)(l);e.s(["Terminal",0,d],604139);let u={name:"cable",size:24,node:[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]]};u.node;let c=(0,t.default)(u);e.s(["McpMark",0,c],991322)},632781,e=>{"use strict";var t=e.i(758379);e.s(["Loader2",()=>t.default])},779266,e=>{"use strict";var t=e.i(456420);let a={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"]};a.node;let n=(0,t.default)(a);e.s(["History",0,n],779266)},466787,e=>{"use strict";var t=e.i(755566);e.s(["TriangleAlert",()=>t.default])},263676,e=>{"use strict";var t=e.i(814387);e.s(["X",()=>t.default])}]);
@@ -1,22 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,379072,e=>{"use strict";let t={echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0};async function r(e){let r=await navigator.mediaDevices.getUserMedia({audio:t}),i=new AudioContext({sampleRate:24e3});try{var s,l,c;await i.audioWorklet.addModule(a??=URL.createObjectURL(new Blob([o],{type:"application/javascript"})));let t=i.createMediaStreamSource(r),u=new AudioWorkletNode(i,n);u.port.onmessage=t=>{let r=t.data,n=new Int16Array(r.length);for(let e=0;e<r.length;e++){let t=Math.max(-1,Math.min(1,r[e]));n[e]=t<0?32768*t:32767*t}e(n)},t.connect(u);let d=i.createGain();return d.gain.value=0,u.connect(d).connect(i.destination),await i.resume(),s=r,l=i,c=u,{stream:s,setMuted(e){for(let t of s.getAudioTracks())t.enabled=!e},close(){for(let e of(c.port.onmessage=null,s.getTracks()))e.stop();l.close()}}}catch(e){for(let e of r.getTracks())e.stop();throw i.close(),e}}let n="voice-capture",o=`
2
- class VoiceCapture extends AudioWorkletProcessor {
3
- constructor() {
4
- super();
5
- this.frame = new Float32Array(1024);
6
- this.filled = 0;
7
- }
8
- process(inputs) {
9
- const input = inputs[0] && inputs[0][0];
10
- if (!input) return true;
11
- for (let i = 0; i < input.length; i++) {
12
- this.frame[this.filled++] = input[i];
13
- if (this.filled === this.frame.length) {
14
- this.port.postMessage(this.frame.slice());
15
- this.filled = 0;
16
- }
17
- }
18
- return true;
19
- }
20
- }
21
- registerProcessor("${n}", VoiceCapture);
22
- `,a=null;e.s(["MICROPHONE_CONSTRAINTS",0,t,"PCM_SAMPLE_RATE",0,24e3,"createPcmPlayer",0,function(e,t){let{context:r,analyser:n}=e.speaker(),o=0,a=new Set;return{push(e){if(0===e.length)return;let i=r.createBuffer(1,e.length,24e3),s=i.getChannelData(0);for(let t=0;t<e.length;t++)s[t]=e[t]/32768;let l=r.createBufferSource();l.buffer=i,l.connect(n),l.onended=()=>{a.delete(l),0===a.size&&t()},o=Math.max(o,r.currentTime+.06),l.start(o),o+=i.duration,a.add(l)},stop(){for(let e of a){e.onended=null;try{e.stop()}catch{}}a.clear(),o=0},get speaking(){return a.size>0}}},"decodePcm",0,function(e){let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return new Int16Array(r.buffer,0,r.length>>1)},"encodePcm",0,function(e){let t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r="";for(let e=0;e<t.length;e+=32768)r+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(r)},"openMicrophone",0,r])},460548,e=>{"use strict";var t=e.i(647163);e.s(["realtimeSession",0,function(e){return({credential:r,setup:n,audio:o,on:a})=>{let i=!1,s=null,l=null,c=[],u=new Map,d=new Set,p=(e,t)=>{u.has(e)||(u.set(e,c.length),c.push({id:e,role:t,text:""}))},m=(e,t)=>{let r=c[e];r.text.trim()&&a.turn({...r,seq:e,done:t})},f=(e,t,r,n)=>{p(e,t);let o=u.get(e),a=c[o].text,i="append"===n?a+r:r;i!==a&&(c[o]={...c[o],text:i},d.has(e)||m(o,!1))},h=e=>{let t=u.get(e);void 0===t||d.has(e)||c[t].text.trim()&&(d.add(e),m(t,!0))},g=!1,_=!1,y=!1,b=!1,w=null,v=null,T=new Map,k=0,S=!1,M=[],P=[],A="",C=()=>{w&&clearTimeout(w),w=null},E=()=>{v&&clearTimeout(v),v=null},O=()=>{if(i)return;let e=T.size>0||S||k>0,t={speaking:g,hearing:_,tools:e?M:[]},r=JSON.stringify(t);if(r!==A&&(A=r,a.activity(t)),_||y||w||g||T.size>0)return;let n=k>0;if(n||0!==P.length){for(let e of P.splice(0))x.send({type:"conversation.item.create",item:{type:"message",role:"system",content:[{type:"input_text",text:e}]}});k=0,S=n,y=!0,b=!0,E(),v=setTimeout(()=>{v=null,b&&(b=!1,y=!1,a.warn("The voice API never answered a response we asked for."),O())},5e3),x.send({type:"response.create"})}},x=e.transport({credential:r,setup:n,audio:o,on:{event:e=>{switch(e.type){case"session.updated":s?.resolve();break;case"error":{let t=e.error?.message??"The voice API reported an error";b&&(b=!1,y=!1,E()),s?s.reject(Error(t)):a.warn(t);break}case"input_audio_buffer.speech_started":_=!0,C();break;case"input_audio_buffer.speech_stopped":_=!1,C(),w=setTimeout(()=>{w=null,O()},1500);break;case"input_audio_buffer.committed":p(e.item_id,"user");break;case"conversation.item.added":case"conversation.item.created":"message"===e.item.type&&"system"!==e.item.role&&p(e.item.id,e.item.role);break;case"response.output_item.added":"message"===e.item.type?p(e.item.id,"assistant"):"function_call"===e.item.type&&p(e.item.id,"tool");break;case"conversation.item.input_audio_transcription.delta":f(e.item_id,"user",e.delta??"","append");break;case"conversation.item.input_audio_transcription.updated":f(e.item_id,"user",e.transcript,"replace");break;case"conversation.item.input_audio_transcription.completed":f(e.item_id,"user",e.transcript??"","replace"),h(e.item_id);break;case"response.output_audio_transcript.delta":f(e.item_id,"assistant",e.delta,"append");break;case"response.output_audio_transcript.done":e.transcript&&f(e.item_id,"assistant",e.transcript,"replace"),h(e.item_id);break;case"response.created":y=!0,b=!1,E(),C();break;case"response.done":var r;for(let t of(y=!1,S=!1,"failed"===e.response.status&&a.warn((r=e.response,r.status_details?.error?.message??"The model could not finish answering")),e.response.output??[]))"message"===t.type&&h(t.id);for(let[e,t]of c.entries())"user"!==t.role||d.has(t.id)||m(e,!0);break;case"response.function_call_arguments.done":p(e.item_id,"tool");{let t=u.get(e.item_id);c[t]={...c[t],tool:e.name,text:e.arguments||"{}"}}h(e.item_id),0!==T.size||S||(M=[]),M=[...M,e.name],T.set(e.call_id,e.name),a.runTool({id:e.call_id,name:e.name,arguments:e.arguments}).catch(e=>`Error: ${(0,t.errorToString)(e)}`).then(t=>{i||(x.send({type:"conversation.item.create",item:{type:"function_call_output",call_id:e.call_id,output:t}}),T.delete(e.call_id),k+=1,O())})}O()},playing:e=>{g=e,e&&(S=!1),O()},dropped:e=>{s?s.reject(Error(e)):a.failed(e)}}});return{async connect(){if(await x.connect(),i)throw Error("Hung up before the session opened.");x.send(e.sessionUpdate(n)),await new Promise((e,t)=>{s={resolve:e,reject:t},l=setTimeout(e,5e3)}).finally(()=>{s=null,l&&clearTimeout(l),l=null})},close(){for(let e of c)h(e.id);i=!0,C(),E(),s?.reject(Error("Hung up before the session opened.")),x.close()},mute:e=>x.mute(e),say(e){i||(P.push(e),O())}}}},"toFunctionTools",0,e=>e.map(({name:e,description:t,parameters:r})=>({type:"function",name:e,description:t,parameters:r}))])},70350,e=>{"use strict";var t=e.i(379072);async function r(e,t){let r=await e.text().catch(()=>"");try{let e=JSON.parse(r)?.error?.message;if("string"==typeof e&&e)return e}catch{}return`${t} refused the call (${e.status})`}e.s(["createSocketTransport",0,function({url:e,protocols:r,label:n,audio:o,on:a}){let i=null,s=null,l=null,c=!1,u=!1,d=!1,p=!1,m=null,f=e=>{p!==e&&(p=e,a.playing(e))},h=e=>{i?.readyState===WebSocket.OPEN&&i.send(JSON.stringify(e))};return{async connect(){l=(0,t.createPcmPlayer)(o,()=>{m=null,f(!1)});let p=new Promise((t,o)=>{let s=new WebSocket(e,r);i=s,s.onopen=()=>{d=!0,t(s)};let l=e=>d?void(!c&&!u&&(u=!0,a.dropped(e))):o(Error(e));s.onerror=()=>l(`Could not reach ${n}`),s.onclose=e=>l(e.reason||`The connection to ${n} closed (${e.code})`)}),g=(0,t.openMicrophone)(e=>h({type:"input_audio_buffer.append",audio:(0,t.encodePcm)(e)})).then(e=>{c?e.close():(s=e,o.hear?.(e.stream))},e=>{throw Error(e instanceof Error?`Microphone unavailable — ${e.message}`:"Microphone unavailable")}),[_]=await Promise.all([p,g]);if(c)throw Error("Hung up before the call opened.");_.onmessage=e=>{let r;if("string"==typeof e.data){try{r=JSON.parse(e.data)}catch{return}var n=r;switch(n.type){case"response.output_audio.delta":{if(!l||!n.delta)break;let e=(0,t.decodePcm)(n.delta);m?.itemId!==n.item_id&&(m={itemId:n.item_id,contentIndex:n.content_index??0,startedAt:performance.now(),receivedMs:0}),m.receivedMs+=e.length/t.PCM_SAMPLE_RATE*1e3,l.push(e),f(!0);break}case"input_audio_buffer.speech_started":(()=>{if(!l?.speaking||!m)return;let e=Math.min(m.receivedMs,performance.now()-m.startedAt);h({type:"conversation.item.truncate",item_id:m.itemId,content_index:m.contentIndex,audio_end_ms:Math.max(0,Math.floor(e))}),l.stop(),m=null,f(!1)})()}a.event(n)}}},send:h,close:()=>{c=!0,l?.stop(),l=null,s?.close(),s=null;let e=i;i=null,e?.close()},mute(e){s?.setMuted(e)}}},"createWebRtcTransport",0,function({url:e,secret:n,label:o,audio:a,on:i}){let s=null,l=null,c=null,u=!1,d=!1,p=!1,m=!1,f=e=>{m!==e&&(m=e,i.playing(e))},h=e=>{for(let t of e?.getTracks()??[])t.stop()};return{async connect(){let m=new RTCPeerConnection;s=m;let g=m.createDataChannel("oai-events");l=g;let _=new Promise((e,t)=>{let r=e=>d?void(!u&&!p&&(p=!0,i.dropped(e))):t(Error(e));g.onopen=()=>{d=!0,e()},g.onclose=()=>r(`The connection to ${o} closed`),g.onerror=()=>r(`The connection to ${o} dropped`),m.onconnectionstatechange=()=>{let e=m.connectionState;("failed"===e||"closed"===e)&&r(`Could not reach ${o}`)}});g.onmessage=e=>{let t;if("string"==typeof e.data){try{t=JSON.parse(e.data)}catch{return}switch(t.type){case"output_audio_buffer.started":f(!0);break;case"output_audio_buffer.stopped":case"output_audio_buffer.cleared":f(!1)}i.event(t)}},m.ontrack=e=>{let[t]=e.streams;a.element.srcObject=t,a.listen(t)};let y=await navigator.mediaDevices.getUserMedia({audio:t.MICROPHONE_CONSTRAINTS});if(u)throw h(y),Error("Hung up before the call opened.");c=y,a.hear?.(y),m.addTrack(y.getAudioTracks()[0],y);let b=await m.createOffer();await m.setLocalDescription(b);let w=await fetch(e,{method:"POST",body:b.sdp,headers:{"Content-Type":"application/sdp",Authorization:`Bearer ${n}`}});if(!w.ok)throw Error(await r(w,o));await m.setRemoteDescription({type:"answer",sdp:await w.text()}),await _},send(e){l?.readyState==="open"&&l.send(JSON.stringify(e))},close:()=>{u=!0,h(c),c=null,l?.close(),l=null,s?.close(),s=null,a.element.srcObject=null},mute(e){for(let t of c?.getAudioTracks()??[])t.enabled=!e}}}])},929969,e=>{"use strict";var t=e.i(379072),r=e.i(460548),n=e.i(70350);let o=(0,r.realtimeSession)({transport:({credential:e,setup:t,audio:r,on:o})=>(0,n.createSocketTransport)({url:`wss://api.x.ai/v1/realtime?model=${encodeURIComponent(t.model)}`,protocols:[`xai-client-secret.${e.value}`],label:"Grok",audio:r,on:o}),sessionUpdate:e=>({type:"session.update",session:{model:e.model,instructions:e.instructions,voice:e.voice,turn_detection:{type:"server_vad"},audio:{input:{format:{type:"audio/pcm",rate:t.PCM_SAMPLE_RATE},transcription:{model:"grok-transcribe"}},output:{format:{type:"audio/pcm",rate:t.PCM_SAMPLE_RATE}}},tools:(0,r.toFunctionTools)(e.tools)}})});e.s(["createXaiSession",0,o])}]);
@@ -1,22 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,905755,e=>{"use strict";var t=e.i(460548),r=e.i(70350);let n=(0,t.realtimeSession)({transport:({credential:e,audio:t,on:n})=>(0,r.createWebRtcTransport)({url:"https://api.openai.com/v1/realtime/calls",secret:e.value,label:"OpenAI",audio:t,on:n}),sessionUpdate:e=>({type:"session.update",session:{type:"realtime",model:e.model,instructions:e.instructions,audio:{input:{transcription:{model:"gpt-4o-mini-transcribe"}},output:{voice:e.voice}},tools:(0,t.toFunctionTools)(e.tools)}})});e.s(["createOpenAiSession",0,n])},379072,e=>{"use strict";let t={echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0};async function r(e){let r=await navigator.mediaDevices.getUserMedia({audio:t}),s=new AudioContext({sampleRate:24e3});try{var i,l,c;await s.audioWorklet.addModule(a??=URL.createObjectURL(new Blob([o],{type:"application/javascript"})));let t=s.createMediaStreamSource(r),u=new AudioWorkletNode(s,n);u.port.onmessage=t=>{let r=t.data,n=new Int16Array(r.length);for(let e=0;e<r.length;e++){let t=Math.max(-1,Math.min(1,r[e]));n[e]=t<0?32768*t:32767*t}e(n)},t.connect(u);let d=s.createGain();return d.gain.value=0,u.connect(d).connect(s.destination),await s.resume(),i=r,l=s,c=u,{stream:i,setMuted(e){for(let t of i.getAudioTracks())t.enabled=!e},close(){for(let e of(c.port.onmessage=null,i.getTracks()))e.stop();l.close()}}}catch(e){for(let e of r.getTracks())e.stop();throw s.close(),e}}let n="voice-capture",o=`
2
- class VoiceCapture extends AudioWorkletProcessor {
3
- constructor() {
4
- super();
5
- this.frame = new Float32Array(1024);
6
- this.filled = 0;
7
- }
8
- process(inputs) {
9
- const input = inputs[0] && inputs[0][0];
10
- if (!input) return true;
11
- for (let i = 0; i < input.length; i++) {
12
- this.frame[this.filled++] = input[i];
13
- if (this.filled === this.frame.length) {
14
- this.port.postMessage(this.frame.slice());
15
- this.filled = 0;
16
- }
17
- }
18
- return true;
19
- }
20
- }
21
- registerProcessor("${n}", VoiceCapture);
22
- `,a=null;e.s(["MICROPHONE_CONSTRAINTS",0,t,"PCM_SAMPLE_RATE",0,24e3,"createPcmPlayer",0,function(e,t){let{context:r,analyser:n}=e.speaker(),o=0,a=new Set;return{push(e){if(0===e.length)return;let s=r.createBuffer(1,e.length,24e3),i=s.getChannelData(0);for(let t=0;t<e.length;t++)i[t]=e[t]/32768;let l=r.createBufferSource();l.buffer=s,l.connect(n),l.onended=()=>{a.delete(l),0===a.size&&t()},o=Math.max(o,r.currentTime+.06),l.start(o),o+=s.duration,a.add(l)},stop(){for(let e of a){e.onended=null;try{e.stop()}catch{}}a.clear(),o=0},get speaking(){return a.size>0}}},"decodePcm",0,function(e){let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return new Int16Array(r.buffer,0,r.length>>1)},"encodePcm",0,function(e){let t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r="";for(let e=0;e<t.length;e+=32768)r+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(r)},"openMicrophone",0,r])},460548,e=>{"use strict";var t=e.i(647163);e.s(["realtimeSession",0,function(e){return({credential:r,setup:n,audio:o,on:a})=>{let s=!1,i=null,l=null,c=[],u=new Map,d=new Set,p=(e,t)=>{u.has(e)||(u.set(e,c.length),c.push({id:e,role:t,text:""}))},m=(e,t)=>{let r=c[e];r.text.trim()&&a.turn({...r,seq:e,done:t})},f=(e,t,r,n)=>{p(e,t);let o=u.get(e),a=c[o].text,s="append"===n?a+r:r;s!==a&&(c[o]={...c[o],text:s},d.has(e)||m(o,!1))},h=e=>{let t=u.get(e);void 0===t||d.has(e)||c[t].text.trim()&&(d.add(e),m(t,!0))},g=!1,_=!1,y=!1,b=!1,w=null,v=null,T=new Map,k=0,S=!1,M=[],A=[],P="",C=()=>{w&&clearTimeout(w),w=null},O=()=>{v&&clearTimeout(v),v=null},E=()=>{if(s)return;let e=T.size>0||S||k>0,t={speaking:g,hearing:_,tools:e?M:[]},r=JSON.stringify(t);if(r!==P&&(P=r,a.activity(t)),_||y||w||g||T.size>0)return;let n=k>0;if(n||0!==A.length){for(let e of A.splice(0))x.send({type:"conversation.item.create",item:{type:"message",role:"system",content:[{type:"input_text",text:e}]}});k=0,S=n,y=!0,b=!0,O(),v=setTimeout(()=>{v=null,b&&(b=!1,y=!1,a.warn("The voice API never answered a response we asked for."),E())},5e3),x.send({type:"response.create"})}},x=e.transport({credential:r,setup:n,audio:o,on:{event:e=>{switch(e.type){case"session.updated":i?.resolve();break;case"error":{let t=e.error?.message??"The voice API reported an error";b&&(b=!1,y=!1,O()),i?i.reject(Error(t)):a.warn(t);break}case"input_audio_buffer.speech_started":_=!0,C();break;case"input_audio_buffer.speech_stopped":_=!1,C(),w=setTimeout(()=>{w=null,E()},1500);break;case"input_audio_buffer.committed":p(e.item_id,"user");break;case"conversation.item.added":case"conversation.item.created":"message"===e.item.type&&"system"!==e.item.role&&p(e.item.id,e.item.role);break;case"response.output_item.added":"message"===e.item.type?p(e.item.id,"assistant"):"function_call"===e.item.type&&p(e.item.id,"tool");break;case"conversation.item.input_audio_transcription.delta":f(e.item_id,"user",e.delta??"","append");break;case"conversation.item.input_audio_transcription.updated":f(e.item_id,"user",e.transcript,"replace");break;case"conversation.item.input_audio_transcription.completed":f(e.item_id,"user",e.transcript??"","replace"),h(e.item_id);break;case"response.output_audio_transcript.delta":f(e.item_id,"assistant",e.delta,"append");break;case"response.output_audio_transcript.done":e.transcript&&f(e.item_id,"assistant",e.transcript,"replace"),h(e.item_id);break;case"response.created":y=!0,b=!1,O(),C();break;case"response.done":var r;for(let t of(y=!1,S=!1,"failed"===e.response.status&&a.warn((r=e.response,r.status_details?.error?.message??"The model could not finish answering")),e.response.output??[]))"message"===t.type&&h(t.id);for(let[e,t]of c.entries())"user"!==t.role||d.has(t.id)||m(e,!0);break;case"response.function_call_arguments.done":p(e.item_id,"tool");{let t=u.get(e.item_id);c[t]={...c[t],tool:e.name,text:e.arguments||"{}"}}h(e.item_id),0!==T.size||S||(M=[]),M=[...M,e.name],T.set(e.call_id,e.name),a.runTool({id:e.call_id,name:e.name,arguments:e.arguments}).catch(e=>`Error: ${(0,t.errorToString)(e)}`).then(t=>{s||(x.send({type:"conversation.item.create",item:{type:"function_call_output",call_id:e.call_id,output:t}}),T.delete(e.call_id),k+=1,E())})}E()},playing:e=>{g=e,e&&(S=!1),E()},dropped:e=>{i?i.reject(Error(e)):a.failed(e)}}});return{async connect(){if(await x.connect(),s)throw Error("Hung up before the session opened.");x.send(e.sessionUpdate(n)),await new Promise((e,t)=>{i={resolve:e,reject:t},l=setTimeout(e,5e3)}).finally(()=>{i=null,l&&clearTimeout(l),l=null})},close(){for(let e of c)h(e.id);s=!0,C(),O(),i?.reject(Error("Hung up before the session opened.")),x.close()},mute:e=>x.mute(e),say(e){s||(A.push(e),E())}}}},"toFunctionTools",0,e=>e.map(({name:e,description:t,parameters:r})=>({type:"function",name:e,description:t,parameters:r}))])},70350,e=>{"use strict";var t=e.i(379072);async function r(e,t){let r=await e.text().catch(()=>"");try{let e=JSON.parse(r)?.error?.message;if("string"==typeof e&&e)return e}catch{}return`${t} refused the call (${e.status})`}e.s(["createSocketTransport",0,function({url:e,protocols:r,label:n,audio:o,on:a}){let s=null,i=null,l=null,c=!1,u=!1,d=!1,p=!1,m=null,f=e=>{p!==e&&(p=e,a.playing(e))},h=e=>{s?.readyState===WebSocket.OPEN&&s.send(JSON.stringify(e))};return{async connect(){l=(0,t.createPcmPlayer)(o,()=>{m=null,f(!1)});let p=new Promise((t,o)=>{let i=new WebSocket(e,r);s=i,i.onopen=()=>{d=!0,t(i)};let l=e=>d?void(!c&&!u&&(u=!0,a.dropped(e))):o(Error(e));i.onerror=()=>l(`Could not reach ${n}`),i.onclose=e=>l(e.reason||`The connection to ${n} closed (${e.code})`)}),g=(0,t.openMicrophone)(e=>h({type:"input_audio_buffer.append",audio:(0,t.encodePcm)(e)})).then(e=>{c?e.close():(i=e,o.hear?.(e.stream))},e=>{throw Error(e instanceof Error?`Microphone unavailable — ${e.message}`:"Microphone unavailable")}),[_]=await Promise.all([p,g]);if(c)throw Error("Hung up before the call opened.");_.onmessage=e=>{let r;if("string"==typeof e.data){try{r=JSON.parse(e.data)}catch{return}var n=r;switch(n.type){case"response.output_audio.delta":{if(!l||!n.delta)break;let e=(0,t.decodePcm)(n.delta);m?.itemId!==n.item_id&&(m={itemId:n.item_id,contentIndex:n.content_index??0,startedAt:performance.now(),receivedMs:0}),m.receivedMs+=e.length/t.PCM_SAMPLE_RATE*1e3,l.push(e),f(!0);break}case"input_audio_buffer.speech_started":(()=>{if(!l?.speaking||!m)return;let e=Math.min(m.receivedMs,performance.now()-m.startedAt);h({type:"conversation.item.truncate",item_id:m.itemId,content_index:m.contentIndex,audio_end_ms:Math.max(0,Math.floor(e))}),l.stop(),m=null,f(!1)})()}a.event(n)}}},send:h,close:()=>{c=!0,l?.stop(),l=null,i?.close(),i=null;let e=s;s=null,e?.close()},mute(e){i?.setMuted(e)}}},"createWebRtcTransport",0,function({url:e,secret:n,label:o,audio:a,on:s}){let i=null,l=null,c=null,u=!1,d=!1,p=!1,m=!1,f=e=>{m!==e&&(m=e,s.playing(e))},h=e=>{for(let t of e?.getTracks()??[])t.stop()};return{async connect(){let m=new RTCPeerConnection;i=m;let g=m.createDataChannel("oai-events");l=g;let _=new Promise((e,t)=>{let r=e=>d?void(!u&&!p&&(p=!0,s.dropped(e))):t(Error(e));g.onopen=()=>{d=!0,e()},g.onclose=()=>r(`The connection to ${o} closed`),g.onerror=()=>r(`The connection to ${o} dropped`),m.onconnectionstatechange=()=>{let e=m.connectionState;("failed"===e||"closed"===e)&&r(`Could not reach ${o}`)}});g.onmessage=e=>{let t;if("string"==typeof e.data){try{t=JSON.parse(e.data)}catch{return}switch(t.type){case"output_audio_buffer.started":f(!0);break;case"output_audio_buffer.stopped":case"output_audio_buffer.cleared":f(!1)}s.event(t)}},m.ontrack=e=>{let[t]=e.streams;a.element.srcObject=t,a.listen(t)};let y=await navigator.mediaDevices.getUserMedia({audio:t.MICROPHONE_CONSTRAINTS});if(u)throw h(y),Error("Hung up before the call opened.");c=y,a.hear?.(y),m.addTrack(y.getAudioTracks()[0],y);let b=await m.createOffer();await m.setLocalDescription(b);let w=await fetch(e,{method:"POST",body:b.sdp,headers:{"Content-Type":"application/sdp",Authorization:`Bearer ${n}`}});if(!w.ok)throw Error(await r(w,o));await m.setRemoteDescription({type:"answer",sdp:await w.text()}),await _},send(e){l?.readyState==="open"&&l.send(JSON.stringify(e))},close:()=>{u=!0,h(c),c=null,l?.close(),l=null,i?.close(),i=null,a.element.srcObject=null},mute(e){for(let t of c?.getAudioTracks()??[])t.enabled=!e}}}])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,798120,e=>{"use strict";let t=e=>e.split("/").map(encodeURIComponent).join("/");e.s(["queryKey",0,{memory:"/api/memory",memoryPage:e=>({url:"/api/memory",query:{offset:e||null}}),notePath:e=>({url:"/api/memory",query:{path:e}}),memoryTidy:"/api/memory/tidy",mcp:"/api/mcp",mcpServer:e=>({url:"/api/mcp",pathVariable:[e]}),mcpTools:"/api/mcp/tools",skills:"/api/skills",skillNode:(e,t,n)=>({url:"/api/skills",pathVariable:[e,t],query:{path:n}}),bot:"/api/bot",tasks:"/api/bot/task",taskHistory:e=>({url:"/api/bot/task",query:{history:1,before:e}}),toolResult:(e,t)=>({url:"/api/bot/task",pathVariable:[e],query:{call:t}}),workspace:"/api/workspace",workspaceFolder:(e,t)=>({url:"/api/workspace",query:{path:e||null,rows:t}}),artifacts:"/api/artifact",artifactShelf:e=>({url:"/api/artifact",query:{rows:e}}),artifactSet:(e,t)=>({url:"/api/artifact",query:{set:e,rows:t}}),file:e=>`/api/file/${t(e)}`,fileView:e=>`/artifact/${t(e)}`,events:"/api/events",config:"/api/config",callHistory:e=>({url:"/api/thursday/call",query:{before:e}}),callSkills:"/api/thursday/skills",toolCall:"/api/thursday/tool-call",llmModel:"/api/llm-model",modelCatalog:"/api/llm-model/catalog"}])},167881,e=>{"use strict";var t=e.i(843476),n=e.i(527930),i=e.i(225913),r=e.i(534281),s=e.i(647163);let o=(0,i.cva)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive text-background hover:bg-destructive/85 focus-visible:border-destructive focus-visible:ring-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});e.s(["Button",0,function({className:e,variant:i="default",size:a="default",loading:l=!1,disabled:u,children:c,...d}){return(0,t.jsxs)(n.Button,{"data-slot":"button",className:(0,s.cn)(o({variant:i,size:a,className:e})),disabled:u||l,...d,children:[l&&(0,t.jsx)(r.Loader2Icon,{className:"animate-spin"}),c]})}])},6799,e=>{"use strict";var t=e.i(843476),n=e.i(76572),i=e.i(931250),r=e.i(121309),s=e.i(534281),o=e.i(228146),a=e.i(168754),l=e.i(560964),u=e.i(167881),c=e.i(647163);let d=n.Toast.createToastManager();function f({...e}){return(0,t.jsx)(n.Toast.Provider,{...e})}function p({...e}){return(0,t.jsx)(n.Toast.Portal,{"data-slot":"toast-portal",...e})}function m({className:e,...i}){return(0,t.jsx)(n.Toast.Viewport,{"data-slot":"toast-viewport",className:(0,c.cn)("pointer-events-none fixed inset-x-4 top-4 z-100 mx-auto w-auto max-w-sm outline-none sm:inset-x-0 sm:w-full",e),...i})}function g({className:e,swipeDirection:i=["up","right"],...r}){return(0,t.jsx)(n.Toast.Root,{"data-slot":"toast",swipeDirection:i,className:(0,c.cn)("group/toast pointer-events-auto absolute inset-x-0 top-0 z-[calc(1000-var(--toast-index))] w-full origin-top rounded-2xl border bg-popover text-popover-foreground shadow-lg will-change-transform outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)+calc(var(--toast-index)*var(--gap))+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]","h-(--height) [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)+(var(--toast-index)*var(--peek))))_scale(var(--scale))] [transition:transform_500ms_cubic-bezier(0.22,1,0.36,1),opacity_500ms,height_150ms]","after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']","data-expanded:h-(--toast-height) data-expanded:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]","data-limited:opacity-0 data-starting-style:[transform:translateY(-150%)]","[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(-150%)]","data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]","data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]","data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]","data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]","data-expanded:data-ending-style:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]","data-expanded:data-ending-style:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]","data-expanded:data-ending-style:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]","data-expanded:data-ending-style:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]",e),...r})}function h({className:e,...i}){return(0,t.jsx)(n.Toast.Content,{"data-slot":"toast-content",className:(0,c.cn)("flex h-full items-center gap-3 overflow-hidden p-4 transition-opacity duration-250 ease-[cubic-bezier(0.22,1,0.36,1)] data-behind:opacity-0 data-expanded:opacity-100",e),...i})}function v({className:e,...i}){return(0,t.jsx)(n.Toast.Title,{"data-slot":"toast-title",className:(0,c.cn)("text-sm font-medium",e),...i})}function y({className:e,...i}){return(0,t.jsx)(n.Toast.Description,{"data-slot":"toast-description",className:(0,c.cn)("text-sm text-muted-foreground",e),...i})}function b({className:e,render:i=(0,t.jsx)(u.Button,{variant:"outline",size:"sm"}),...r}){return(0,t.jsx)(n.Toast.Action,{"data-slot":"toast-action",render:i,className:(0,c.cn)("shrink-0",e),...r})}function x({className:e,children:i,render:r=(0,t.jsx)(u.Button,{variant:"ghost",size:"icon-sm"}),...s}){return(0,t.jsx)(n.Toast.Close,{"data-slot":"toast-close","aria-label":"Close toast",render:r,className:(0,c.cn)("relative shrink-0 text-muted-foreground after:absolute after:-inset-2 after:content-[''] hover:text-foreground",e),...s,children:i??(0,t.jsx)(l.XIcon,{"aria-hidden":"true"})})}function w({type:e}){let n=null;return("success"===e&&(n=(0,t.jsx)(i.CircleCheckIcon,{"aria-hidden":"true"})),"info"===e&&(n=(0,t.jsx)(r.InfoIcon,{"aria-hidden":"true"})),"warning"===e&&(n=(0,t.jsx)(a.TriangleAlertIcon,{"aria-hidden":"true"})),"error"===e&&(n=(0,t.jsx)(o.OctagonXIcon,{className:"text-destructive","aria-hidden":"true"})),"loading"===e&&(n=(0,t.jsx)(s.Loader2Icon,{className:"animate-spin","aria-hidden":"true"})),n)?(0,t.jsx)("span",{"data-slot":"toast-icon",className:"shrink-0 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",children:n}):null}function E(){let{toasts:e,close:i}=n.Toast.useToastManager();return e.map(e=>(0,t.jsx)(g,{toast:e,children:(0,t.jsxs)(h,{children:[(0,t.jsx)(w,{type:e.type}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,t.jsx)(v,{}),(0,t.jsx)(y,{})]}),(0,t.jsx)(b,{onClick:()=>i(e.id)}),(0,t.jsx)(x,{})]})},e.id))}let T=n.Toast.createToastManager,S=n.Toast.useToastManager;e.s(["Toast",0,g,"ToastAction",0,b,"ToastClose",0,x,"ToastContent",0,h,"ToastDescription",0,y,"ToastPortal",0,p,"ToastProvider",0,f,"ToastTitle",0,v,"ToastViewport",0,m,"Toaster",0,function({children:e,toastManager:n=d,...i}){return(0,t.jsxs)(f,{toastManager:n,...i,children:[e,(0,t.jsx)(p,{children:(0,t.jsx)(m,{children:(0,t.jsx)(E,{})})})]})},"createToastManager",0,T,"toast",0,d,"useToastManager",0,S])},527930,225913,e=>{"use strict";var t=e.i(271645),n=e.i(540886),i=e.i(552245);let r=t.forwardRef(function(e,t){let{render:r,className:s,disabled:o=!1,focusableWhenDisabled:a=!1,nativeButton:l=!0,style:u,...c}=e,{getButtonProps:d,buttonRef:f}=(0,n.useButton)({disabled:o,focusableWhenDisabled:a,native:l});return(0,i.useRenderElement)("button",e,{state:{disabled:o},ref:[t,f],props:[c,d]})});e.s(["Button",0,r],527930);var s=e.i(207670);let o=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=s.clsx;e.s(["cva",0,(e,t)=>n=>{var i;if((null==t?void 0:t.variants)==null)return a(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:r,defaultVariants:s}=t,l=Object.keys(r).map(e=>{let t=null==n?void 0:n[e],i=null==s?void 0:s[e];if(null===t)return null;let a=o(t)||o(i);return r[e][a]}),u=n&&Object.entries(n).reduce((e,t)=>{let[n,i]=t;return void 0===i||(e[n]=i),e},{});return a(e,l,null==t||null==(i=t.compoundVariants)?void 0:i.reduce((e,t)=>{let{class:n,className:i,...r}=t;return Object.entries(r).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...s,...u}[t]):({...s,...u})[t]===n})?[...e,n,i]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}],225913)},726674,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(174080),i=e.i(229315),r=e.i(574735),s=e.i(365420),o=e.i(883977),a=e.i(146376),l=e.i(667865),u=e.i(956789),c=e.i(152535),d=e.i(383976),f=e.i(675606),p=e.i(56434),m=e.i(451321),g=e.i(552245),h=e.i(638396),v=e.i(843476);let y=t.createContext(null),b=()=>t.useContext(y),x=(0,m.createAttribute)("portal");function w(e={}){let{ref:r,container:s,componentProps:c=u.EMPTY_OBJECT,elementProps:d}=e,f=(0,o.useId)(),p=b(),m=p?.portalNode,[h,v]=t.useState(null),[y,E]=t.useState(null),T=(0,l.useStableCallback)(e=>{null!==e&&E(e)}),S=t.useRef(null);(0,a.useIsoLayoutEffect)(()=>{if(null===s){S.current&&(S.current=null,E(null),v(null));return}let e=(s&&((0,i.isNode)(s)?s:s.current))??m??document.body;if(null==e){S.current&&(S.current=null,E(null),v(null));return}S.current!==e&&(S.current=e,E(null),v(e))},[s,m]);let R=(0,g.useRenderElement)("div",c,{ref:[r,T],props:[{id:f,[x]:""},d]}),C=h&&R?n.createPortal(R,h):null;return{node:y,nodeId:t.isValidElement(R)?R.props.id:void 0,subtree:C}}let E=t.forwardRef(function(e,i){let{render:o,className:l,style:u,children:m,container:g,portalOwnerRole:b,...x}=e,{node:E,nodeId:T,subtree:S}=w({container:g,ref:i,componentProps:e,elementProps:x}),R=t.useRef(null),C=t.useRef(null),A=t.useRef(null),P=t.useRef(null),[O,k]=t.useState(null),I=t.useRef(!1),L=O?.modal,M=O?.open,N=!!O&&!O.modal&&O.open&&!!E;t.useEffect(()=>{if(E&&!L)return(0,s.mergeCleanups)((0,r.addEventListener)(E,"focusin",e,!0),(0,r.addEventListener)(E,"focusout",e,!0));function e(e){E&&e.relatedTarget&&(0,d.isOutsideEvent)(e)&&("focusin"===e.type?I.current&&((0,d.enableFocusInside)(E),I.current=!1):((0,d.disableFocusInside)(E),I.current=!0))}},[E,L]),(0,a.useIsoLayoutEffect)(()=>{E&&!0===M&&I.current&&((0,d.enableFocusInside)(E),I.current=!1)},[M,E]);let D=t.useMemo(()=>({beforeOutsideRef:R,afterOutsideRef:C,beforeInsideRef:A,afterInsideRef:P,portalNode:E,setFocusManagerState:k}),[E]);return(0,v.jsxs)(t.Fragment,{children:[S,(0,v.jsxs)(y.Provider,{value:D,children:[N&&E&&(0,v.jsx)(c.FocusGuard,{"data-type":"outside",ref:R,onFocus:e=>{if((0,d.isOutsideEvent)(e,E))A.current?.focus();else{let e=O?O.domReference:null,t=(0,d.getPreviousTabbable)(e);t?.focus()}}}),N&&E&&(0,v.jsx)("span",{role:b,"aria-owns":T,style:h.ownerVisuallyHidden}),E&&n.createPortal(m,E),N&&E&&(0,v.jsx)(c.FocusGuard,{"data-type":"outside",ref:C,onFocus:e=>{if((0,d.isOutsideEvent)(e,E))P.current?.focus();else{let t=O?O.domReference:null,n=(0,d.getNextTabbable)(t);n?.focus(),O?.closeOnFocusOut&&O?.onOpenChange(!1,(0,f.createChangeEventDetails)(p.REASONS.focusOut,e.nativeEvent))}}})]})]})});e.s(["FloatingPortal",0,E,"useFloatingPortalNode",0,w,"usePortalContext",0,b])},156341,e=>{"use strict";var t=e.i(301252),n=e.i(661286),i=e.i(157940);let r={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class s extends t.ReactStore{constructor(e){const{syncOnly:t,nested:i,onOpenChange:s,triggerElements:o,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:(0,n.createEventEmitter)(),nested:i,triggerElements:o},r),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||null!=t&&(0,i.isClickLikeEvent)(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit("openchange",n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}}e.s(["FloatingRootStore",0,s])},46420,661286,379248,e=>{"use strict";var t=e.i(271645),n=e.i(883977),i=e.i(146376),r=e.i(388940);function s(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}e.s(["createEventEmitter",0,s],661286);class o{nodesRef={current:[]};events=s();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);-1!==t&&this.nodesRef.current.splice(t,1)}}e.s(["FloatingTreeStore",0,o],379248);var a=e.i(843476);let l=t.createContext(null),u=t.createContext(null),c=()=>t.useContext(l)?.id||null,d=e=>{let n=t.useContext(u);return e??n};e.s(["FloatingNode",0,function(e){let{children:n,id:i}=e,r=c();return(0,a.jsx)(l.Provider,{value:t.useMemo(()=>({id:i,parentId:r}),[i,r]),children:n})},"FloatingTree",0,function(e){let{children:t,externalTree:n}=e,i=(0,r.useRefWithInit)(()=>n??new o).current;return(0,a.jsx)(u.Provider,{value:i,children:t})},"useFloatingNodeId",0,function(e){let t=(0,n.useId)(),r=d(e),s=c();return(0,i.useIsoLayoutEffect)(()=>{if(!t)return;let e={id:t,parentId:s};return r?.addNode(e),()=>{r?.removeNode(e)}},[r,t,s]),t},"useFloatingParentNodeId",0,c,"useFloatingTree",0,d],46420)},988643,e=>{"use strict";var t=e.i(271645),n=e.i(146376),i=e.i(258950),r=e.i(229315),s=e.i(46420);e.s(["useBaseUIFloating",0,function(e){return function(e,o){let{nodeId:a,externalTree:l}=e,u=o.useState("referenceElement"),c=o.useState("floatingElement"),d=o.useState("domReferenceElement"),f=o.useState("open"),p=o.useState("floatingId"),[m,g]=t.useState(null),[h,v]=t.useState(void 0),[y,b]=t.useState(void 0),x=t.useRef(null),w=(0,s.useFloatingTree)(l),E=t.useMemo(()=>({reference:u,floating:c,domReference:d}),[u,c,d]),T=(0,i.useFloating)({...e,elements:{...E,...m&&{reference:m}}}),S=(0,r.isElement)(h)?h:null,R=void 0===y?o.state.floatingElement:y;o.useSyncedValue("referenceElement",h??null),o.useSyncedValue("domReferenceElement",void 0===h?d:S),o.useSyncedValue("floatingElement",R);let C=t.useCallback(e=>{let t=(0,r.isElement)(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;g(t),T.refs.setReference(t)},[T.refs]),A=t.useCallback(e=>{((0,r.isElement)(e)||null===e)&&(x.current=e,v(e)),((0,r.isElement)(T.refs.reference.current)||null===T.refs.reference.current||null!==e&&!(0,r.isElement)(e))&&T.refs.setReference(e)},[T.refs,v]),P=t.useCallback(e=>{b(e),T.refs.setFloating(e)},[T.refs]),O=t.useMemo(()=>({...T.refs,setReference:A,setFloating:P,setPositionReference:C,domReference:x}),[T.refs,A,P,C]),k=t.useMemo(()=>({...T.elements,domReference:d}),[T.elements,d]),I=t.useMemo(()=>({...T,dataRef:o.context.dataRef,open:f,onOpenChange:o.setOpen,events:o.context.events,floatingId:p,refs:O,elements:k,nodeId:a,rootStore:o}),[T,O,k,a,o,f,p]);return(0,n.useIsoLayoutEffect)(()=>{d&&(x.current=d)},[d]),(0,n.useIsoLayoutEffect)(()=>{o.context.dataRef.current.floatingContext=I;let e=w?.nodesRef.current.find(e=>e.id===a);e&&(e.context=I)}),t.useMemo(()=>({...T,context:I,refs:O,elements:k,rootStore:o}),[T,O,k,I,o])}(e,e.rootContext)}])},265858,e=>{"use strict";e.i(247167);var t=e.i(229315),n=e.i(883977),i=e.i(146376),r=e.i(388940),s=e.i(990627),o=e.i(46420),a=e.i(156341);e.s(["useFloatingRootContext",0,function(e){let{open:l=!1,onOpenChange:u,elements:c={}}=e,d=(0,n.useId)(),f=null!=(0,o.useFloatingParentNodeId)(),p=(0,r.useRefWithInit)(()=>new a.FloatingRootStore({open:l,transitionStatus:void 0,onOpenChange:u,referenceElement:c.reference??null,floatingElement:c.floating??null,triggerElements:new s.PopupTriggerMap,floatingId:d,syncOnly:!1,nested:f})).current;return(0,i.useIsoLayoutEffect)(()=>{let e={open:l,floatingId:d};void 0!==c.reference&&(e.referenceElement=c.reference,e.domReferenceElement=(0,t.isElement)(c.reference)?c.reference:null),void 0!==c.floating&&(e.floatingElement=c.floating),p.update(e)},[l,d,c.reference,c.floating,p]),p.context.onOpenChange=u,p.context.nested=f,p}])},621082,e=>{"use strict";e.i(247167);var t=e.i(343084),n=e.i(229315),i=e.i(157940),r=e.i(449055);function s(e,t,n){return Math.floor(e/t)!==n}function o(e,t){return t<0||t>=e.length}function a(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:i,amount:r=1}={}){let s=t;do s+=n?-r:r;while(s>=0&&s<=e.length-1&&l(e,s,i))return s}function l(e,t,n){if("function"==typeof n?n(t):n?.includes(t)??!1)return!0;let i=e[t];return!!i&&(!!(!u(i)||i.matches(":disabled"))||!n&&(i.hasAttribute("disabled")||"true"===i.getAttribute("aria-disabled")))}function u(e,t=e?(0,n.getComputedStyle)(e):null){var i;return!!e&&!!e.isConnected&&!!t&&"hidden"!==(i=t).visibility&&"collapse"!==i.visibility&&("function"==typeof e.checkVisibility?e.checkVisibility():"none"!==t.display&&"contents"!==t.display)}e.s(["findNonDisabledListIndex",0,a,"getGridNavigatedIndex",0,function(e,{event:n,orientation:u,loopFocus:c,onLoop:d,rtl:f,cols:p,disabledIndices:m,minIndex:g,maxIndex:h,prevIndex:v,stopEvent:y=!1}){let b,x=v;if(n.key===r.ARROW_UP?b="up":n.key===r.ARROW_DOWN&&(b="down"),b){let r=[],s=[],u=!1,f=0;{let t=null,n=-1;e.forEach((e,i)=>{if(null==e)return;f+=1;let o=e.closest('[role="row"]');o&&(u=!0),(o!==t||-1===n)&&(t=o,r[n+=1]=[]),r[n].push(i),s[i]=n})}let w=!1,E=0;if(u)for(let e of r){let t=e.length;t>E&&(E=t),t!==p&&(w=!0)}let T=w&&f<e.length,S=E||p;y&&(0,i.stopEvent)(n);let R=(t=>{if(!w||-1===v)return;let i=s[v];if(null==i)return;let o=r[i].indexOf(v),a="up"===t?-1:1;for(let t=i+a,u=0;u<r.length;u+=1,t+=a){if(t<0||t>=r.length){if(!c||T)return;if(t=t<0?r.length-1:0,d){let e=Math.min(o,r[t].length-1);t=s[d(n,v,r[t][e]??r[t][0])]??t}}let i=r[t];for(let t=Math.min(o,i.length-1);t>=0;t-=1){let n=i[t];if(!l(e,n,m))return n}}})(b)??(n=>{if(!T||-1===v)return;let i=v%S,r="up"===n?-S:S,s=h-h%S,o=(0,t.floor)(h/S)+1;for(let t=v-i+r,n=0;n<o;n+=1,t+=r){if(t<0||t>h){if(!c)return;t=t<0?s:0}let n=Math.min(t+S-1,h);for(let r=Math.min(t+i,n);r>=t;r-=1)if(!l(e,r,m))return r}})(b);if(void 0!==R)x=R;else if(-1===v)x="up"===b?h:g;else if(x=a(e,{startingIndex:v,amount:S,decrement:"up"===b,disabledIndices:m}),c){if("up"===b&&(v-S<g||x<0)){let e=v%S,t=h%S,i=h-(t-e);x=t===e?h:t>e?i:i-S,d&&(x=d(n,v,x))}"down"===b&&v+S>h&&(x=a(e,{startingIndex:v%S-S,amount:S,disabledIndices:m}),d&&(x=d(n,v,x)))}o(e,x)&&(x=v)}if("both"===u){let l=(0,t.floor)(v/p);n.key===(f?r.ARROW_LEFT:r.ARROW_RIGHT)&&(y&&(0,i.stopEvent)(n),v%p!=p-1?(x=a(e,{startingIndex:v,disabledIndices:m}),c&&s(x,p,l)&&(x=a(e,{startingIndex:v-v%p-1,disabledIndices:m}),d&&(x=d(n,v,x)))):c&&(x=a(e,{startingIndex:v-v%p-1,disabledIndices:m}),d&&(x=d(n,v,x))),s(x,p,l)&&(x=v)),n.key===(f?r.ARROW_RIGHT:r.ARROW_LEFT)&&(y&&(0,i.stopEvent)(n),v%p!=0?(x=a(e,{startingIndex:v,decrement:!0,disabledIndices:m}),c&&s(x,p,l)&&(x=a(e,{startingIndex:v+(p-v%p),decrement:!0,disabledIndices:m}),d&&(x=d(n,v,x)))):c&&(x=a(e,{startingIndex:v+(p-v%p),decrement:!0,disabledIndices:m}),d&&(x=d(n,v,x))),s(x,p,l)&&(x=v));let u=(0,t.floor)(h/p)===l;o(e,x)&&(c&&u?(x=n.key===(f?r.ARROW_RIGHT:r.ARROW_LEFT)?h:a(e,{startingIndex:v-v%p-1,disabledIndices:m}),d&&(x=d(n,v,x))):x=v)}return x},"getMaxListIndex",0,function(e,t){return a(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})},"getMinListIndex",0,function(e,t){return a(e.current,{disabledIndices:t})},"isElementVisible",0,u,"isIndexOutOfListBounds",0,o,"isListIndexDisabled",0,l])},449055,e=>{"use strict";e.s(["ARROW_DOWN",0,"ArrowDown","ARROW_LEFT",0,"ArrowLeft","ARROW_RIGHT",0,"ArrowRight","ARROW_UP",0,"ArrowUp","FOCUSABLE_ATTRIBUTE",0,"data-base-ui-focusable","TYPEABLE_SELECTOR",0,"input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])"])},451321,e=>{"use strict";e.s(["createAttribute",0,function(e){return`data-base-ui-${e}`}])},596296,145147,322846,e=>{"use strict";var t=e.i(229315),n=e.i(328744),i=e.i(584446),r=e.i(449055),s=e.i(415618);e.s(["CommonTriggerDataAttributes",0,s],145147);var s=s;s.popupOpen;let o="data-trigger-disabled";function a(e){return(0,t.isHTMLElement)(e)&&e.matches(r.TYPEABLE_SELECTOR)}e.s(["triggerDisabled",0,o],322846),e.s(["getFloatingFocusElement",0,function(e){return e?e.hasAttribute(r.FOCUSABLE_ATTRIBUTE)?e:e.querySelector(`[${r.FOCUSABLE_ATTRIBUTE}]`)||e:null},"isEventTargetWithin",0,function(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))},"isInteractiveElement",0,function(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${r.TYPEABLE_SELECTOR}`)!=null},"isRootElement",0,function(e){return e.matches("html,body")},"isTargetInsideEnabledTrigger",0,function(e,n){if(!(0,t.isElement)(e))return!1;if(n.hasElement(e))return!e.hasAttribute(o);for(let[,t]of n.entries())if((0,i.contains)(t,e))return!t.hasAttribute(o);return!1},"isTypeableCombobox",0,function(e){return!!e&&"combobox"===e.getAttribute("role")&&a(e)},"isTypeableElement",0,a,"matchesFocusVisible",0,function(e){if(!e||n.platform.env.jsdom)return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}],596296)},157940,e=>{"use strict";var t=e.i(328744);e.s(["isClickLikeEvent",0,function(e){let t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t},"isMouseLikePointerType",0,function(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)},"isReactEvent",0,function(e){return"nativeEvent"in e},"isVirtualClick",0,function(e){return""===e.pointerType&&!!e.isTrusted||(t.platform.os.android&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)},"isVirtualPointerEvent",0,function(e){return!t.platform.env.jsdom&&(!t.platform.os.android&&0===e.width&&0===e.height||t.platform.os.android&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)},"stopEvent",0,function(e){e.preventDefault(),e.stopPropagation()}])},383976,e=>{"use strict";var t=e.i(229315),n=e.i(108868),i=e.i(584446),r=e.i(621082);function s(e){for(let n of Array.from(e.children))if("summary"===(0,t.getNodeName)(n))return n;return null}function o(e){let n=e?(0,t.getNodeName)(e):"";return null!=e&&e.matches('a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]')&&("summary"!==n||null!=e.parentElement&&"details"===(0,t.getNodeName)(e.parentElement)&&s(e.parentElement)===e)&&("details"!==n||null==s(e))&&("input"!==n||"hidden"!==e.type)}function a(e){if(!o(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let n=e;n;n=function(e){let n=e.assignedSlot;if(n)return n;if(e.parentElement)return e.parentElement;let i=e.getRootNode();return(0,t.isShadowRoot)(i)?i.host:null}(n)){let o=n!==e,a="slot"===(0,t.getNodeName)(n);if(n.hasAttribute("inert")||o&&"details"===(0,t.getNodeName)(n)&&!n.open&&!function(e,t){let n=s(t);return!!n&&(e===n||(0,i.contains)(n,e))}(e,n)||n.hasAttribute("hidden")||!a&&!function(e,n){let i=(0,t.getComputedStyle)(e);return n?"none"!==i.display:(0,r.isElementVisible)(e,i)}(n,o))return!1}return!0}function l(e){let n=e.tabIndex;if(n<0){let n=(0,t.getNodeName)(e);if("details"===n||"audio"===n||"video"===n||(0,t.isHTMLElement)(e)&&e.isContentEditable)return 0}return n}function u(e){return"input"!==(0,t.getNodeName)(e)?null:"radio"===e.type&&""!==e.name?e:null}function c(e){if((0,t.isHTMLElement)(e)&&"slot"===(0,t.getNodeName)(e)){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return(0,t.isHTMLElement)(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function d(e){let t=[];return!function e(t,n){c(t).forEach(t=>{o(t)&&n.push(t),e(t,n)})}(e,t),t.filter(a)}function f(e){let t=d(e);return t.filter(e=>l(e)>=0&&function(e,t){let n=u(e);if(!n)return!0;let i=t.find(e=>{let t=u(e);return t?.name===n.name&&t.form===n.form&&t.checked});return i?i===n:t.find(e=>{let t=u(e);return t?.name===n.name&&t.form===n.form})===n}(e,t))}function p(e,t){let r=f(e),s=r.length;if(0===s)return;let o=(0,i.activeElement)((0,n.ownerDocument)(e)),a=r.indexOf(o);return r[-1===a?1===t?0:s-1:a+t]}function m(e,t){if(!e)return null;let i=f((0,n.ownerDocument)(e).body),r=i.length;if(0===r)return null;let s=i.indexOf(e);return -1===s?null:i[(s+t+r)%r]}e.s(["disableFocusInside",0,function(e){f(e).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})},"enableFocusInside",0,function(e){let n=[];!function e(n,i,r){c(n).forEach(n=>{(0,t.isHTMLElement)(n)&&n.matches(i)&&r.push(n),e(n,i,r)})}(e,"[data-tabindex]",n),n.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})},"focusable",0,d,"getNextTabbable",0,function(e){return p((0,n.ownerDocument)(e).body,1)||e},"getPreviousTabbable",0,function(e){return p((0,n.ownerDocument)(e).body,-1)||e},"getTabbableAfterElement",0,function(e){return m(e,1)},"getTabbableBeforeElement",0,function(e){return m(e,-1)},"isOutsideEvent",0,function(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!(0,i.contains)(n,r)},"isTabbable",0,function(e){return a(e)&&l(e)>=0},"tabbable",0,f])},180862,e=>{"use strict";e.s(["endingStyle",0,"data-ending-style","startingStyle",0,"data-starting-style"])},253335,e=>{"use strict";var t=e.i(180862);e.s(["TransitionStatusDataAttributes",0,t])},838452,690325,e=>{"use strict";var t=e.i(733332),n=e.i(271645);let i=n.createContext(void 0);e.s(["CompositeRootContext",0,i,"useCompositeRootContext",0,function(e=!1){let r=n.useContext(i);if(void 0===r&&!e)throw Error((0,t.default)(16));return r}],838452),e.s(["useFocusableWhenDisabled",0,function(e){let{focusableWhenDisabled:t,disabled:i,composite:r=!1,tabIndex:s=0,isNativeButton:o}=e,a=r&&!1!==t,l=r&&!1===t;return{props:n.useMemo(()=>{let e={onKeyDown(e){i&&t&&"Tab"!==e.key&&e.preventDefault()}};return r||(e.tabIndex=s,!o&&i&&(e.tabIndex=t?s:-1)),(o&&(t||a)||!o&&i)&&(e["aria-disabled"]=i),o&&(!t||l)&&(e.disabled=i),e},[r,i,t,a,l,o,s])}}],690325)},638396,e=>{"use strict";e.s(["BASE_UI_SWIPE_IGNORE_SELECTOR",0,"[data-base-ui-swipe-ignore]","CLICK_TRIGGER_IDENTIFIER",0,"data-base-ui-click-trigger","DISABLED_TRANSITIONS_STYLE",0,{style:{transition:"none"}},"DROPDOWN_COLLISION_AVOIDANCE",0,{fallbackAxisSide:"none"},"LEGACY_SWIPE_IGNORE_SELECTOR",0,"[data-swipe-ignore]","PATIENT_CLICK_THRESHOLD",0,500,"POPUP_COLLISION_AVOIDANCE",0,{fallbackAxisSide:"end"},"TYPEAHEAD_RESET_MS",0,500,"ownerVisuallyHidden",0,{clipPath:"inset(50%)",position:"fixed",top:0,left:0}])},675606,e=>{"use strict";var t=e.i(956789);e.s(["createChangeEventDetails",0,function(e,n,i,r){let s=!1,o=!1,a=r??t.EMPTY_OBJECT;return{reason:e,event:n??new Event("base-ui"),cancel(){s=!0},allowPropagation(){o=!0},get isCanceled(){return s},get isPropagationAllowed(){return o},trigger:i,...a}},"createGenericEventDetails",0,function(e,n,i){let r=i??t.EMPTY_OBJECT;return{reason:e,event:n??new Event("base-ui"),...r}}])},872855,e=>{"use strict";e.i(247167);var t=e.i(271645);let n=t.createContext(void 0);e.s(["useDirection",0,function(){let e=t.useContext(n);return e?.direction??"ltr"}])},253984,e=>{"use strict";var t=e.i(956789),n=e.i(638396);e.s(["getDisabledMountTransitionStyles",0,function(e){return"starting"===e?n.DISABLED_TRANSITIONS_STYLE:t.EMPTY_OBJECT}])},416919,809835,377570,e=>{"use strict";e.s(["getStateAttributesProps",0,function(e,t){let n={};for(let i in e){let r=e[i];if(t?.hasOwnProperty(i)){let e=t[i](r);null!=e&&Object.assign(n,e);continue}!0===r?n[`data-${i.toLowerCase()}`]="":r&&(n[`data-${i.toLowerCase()}`]=r.toString())}return n}],416919),e.s(["resolveClassName",0,function(e,t){return"function"==typeof e?e(t):e}],809835),e.s(["resolveStyle",0,function(e,t){return"function"==typeof e?e(t):e}],377570)},56434,e=>{"use strict";e.s(["cancelOpen",0,"cancel-open","chipRemovePress",0,"chip-remove-press","clearPress",0,"clear-press","closePress",0,"close-press","closeWatcher",0,"close-watcher","decrementPress",0,"decrement-press","disabled",0,"disabled","drag",0,"drag","escapeKey",0,"escape-key","focusOut",0,"focus-out","imperativeAction",0,"imperative-action","incrementPress",0,"increment-press","initial",0,"initial","inputBlur",0,"input-blur","inputChange",0,"input-change","inputClear",0,"input-clear","inputPaste",0,"input-paste","inputPress",0,"input-press","itemPress",0,"item-press","keyboard",0,"keyboard","linkPress",0,"link-press","listNavigation",0,"list-navigation","missing",0,"missing","none",0,"none","outsidePress",0,"outside-press","pointer",0,"pointer","scrub",0,"scrub","siblingOpen",0,"sibling-open","swipe",0,"swipe","trackPress",0,"track-press","triggerFocus",0,"trigger-focus","triggerHover",0,"trigger-hover","triggerPress",0,"trigger-press","wheel",0,"wheel","windowResize",0,"window-resize"],216856);var t=e.i(216856);e.s(["REASONS",0,t],56434)},474354,e=>{"use strict";var t=e.i(180862);let n={[t.startingStyle]:""},i={[t.endingStyle]:""};e.s(["transitionStatusMapping",0,{transitionStatus:e=>"starting"===e?n:"ending"===e?i:null}])},540886,64350,e=>{"use strict";var t=e.i(271645),n=e.i(229315),i=e.i(667865),r=e.i(146376),s=e.i(176782),o=e.i(838452),a=e.i(690325),l=e.i(333848);function u(e,t,{detail:n=0}={}){e.dispatchEvent(new((0,l.ownerWindow)(e)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:n,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function c(e){return(0,n.isHTMLElement)(e)&&"BUTTON"===e.tagName}e.s(["dispatchClickWithModifiers",0,u],64350),e.s(["useButton",0,function(e={}){let{disabled:l=!1,focusableWhenDisabled:d,tabIndex:f=0,native:p=!0,composite:m}=e,g=t.useRef(null),h=(0,o.useCompositeRootContext)(!0),v=m??void 0!==h,{props:y}=(0,a.useFocusableWhenDisabled)({focusableWhenDisabled:d,disabled:l,composite:v,tabIndex:f,isNativeButton:p}),b=t.useCallback(()=>{let e=g.current;c(e)&&v&&l&&void 0===y.disabled&&e.disabled&&(e.disabled=!1)},[l,y.disabled,v]);return(0,r.useIsoLayoutEffect)(b,[b]),{getButtonProps:t.useCallback((e={})=>{let{onClick:t,onMouseDown:i,onKeyUp:r,onKeyDown:o,onPointerDown:a,...d}=e;return(0,s.mergeProps)({onClick(e){l?e.preventDefault():t?.(e)},onMouseDown(e){l||i?.(e)},onKeyDown(e){var t;if(l||((0,s.makeEventPreventable)(e),o?.(e),e.baseUIHandlerPrevented))return;let i=e.target===e.currentTarget,r=e.currentTarget,a=c(r),d=!p&&(t=r,(0,n.isHTMLElement)(t)&&"A"===t.tagName&&!!t.href),f=i&&(p?a:!d),m="Enter"===e.key,g=" "===e.key,h=r.getAttribute("role"),y=h?.startsWith("menuitem")||"option"===h||"gridcell"===h;if(i&&v&&g){if(e.defaultPrevented&&y)return;e.preventDefault(),(!p||a)&&(e.preventBaseUIHandler(),u(r,e));return}if(!f||p||!g&&!m){i&&d&&g&&e.preventDefault();return}!e.defaultPrevented&&(e.preventDefault(),m&&(e.preventBaseUIHandler(),u(r,e)))},onKeyUp(e){l||(((0,s.makeEventPreventable)(e),r?.(e),e.target===e.currentTarget&&p&&v&&c(e.currentTarget)&&" "===e.key)?e.preventDefault():!e.baseUIHandlerPrevented&&(e.target!==e.currentTarget||p||v||e.defaultPrevented||" "!==e.key||(e.preventBaseUIHandler(),u(e.currentTarget,e))))},onPointerDown(e){l?e.preventDefault():a?.(e)}},p?{type:"button"}:{role:"button"},y,d)},[l,y,v,p]),buttonRef:(0,i.useStableCallback)(e=>{g.current=e,b()})}}],540886)},923706,909091,667387,e=>{"use strict";var t=e.i(271645),n=e.i(343084),i=e.i(108868),r=e.i(333848),s=e.i(146376),o=e.i(446265),a=e.i(667865),l=e.i(953760),u=e.i(258950),c=e.i(988643),d=e.i(872855);let f={name:"hide",async fn(e){let{width:t,height:n,x:i,y:r}=e.rects.reference,s=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:s.top-n>=0||s.right-t>=0||s.bottom-n>=0||s.left-t>=0||0===t&&0===n&&0===i&&0===r}}}},p={sideX:"left",sideY:"top"};e.s(["DEFAULT_SIDES",0,p],909091);let m="--available-width",g="--available-height",h="--anchor-width",v="--anchor-height",y="--transform-origin";function b(e,t,n){let i="inline-start"===e||"inline-end"===e;return({top:"top",right:i?n?"inline-start":"inline-end":"right",bottom:"bottom",left:i?n?"inline-end":"inline-start":"left"})[t]}function x(e,t,i){let{rects:r,placement:s}=e;return{side:b(t,(0,n.getSide)(s),i),align:(0,n.getAlignment)(s)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function w(e){return null!=e&&"current"in e}e.s(["anchorHeight",0,v,"anchorWidth",0,h,"availableHeight",0,g,"availableWidth",0,m,"positionerHeight",0,"--positioner-height","positionerWidth",0,"--positioner-width","transformOrigin",0,y],667387),e.s(["useAnchorPositioning",0,function(e){return function(e,c){let{anchor:E,positionMethod:T="absolute",side:S="bottom",sideOffset:R=0,align:C="center",alignOffset:A=0,collisionBoundary:P,collisionPadding:O=5,sticky:k=!1,arrowPadding:I=5,disableAnchorTracking:L=!1,inline:M,keepMounted:N=!1,floatingRootContext:D,mounted:F,collisionAvoidance:j,shift:_,nodeId:W,adaptiveOrigin:V,lazyFlip:H=!1,externalTree:z}=e,[B,$]=t.useState(null);F||null===B||$(null);let Y=j.side||"flip",U=j.align||"flip",K=j.fallbackAxisSide||"end",q=_?.crossAxis??!1,G=_?.rootBoundary,X="function"==typeof E?E:void 0,J=(0,a.useStableCallback)(X),Q=X?J:E,Z=(0,o.useValueAsRef)(E),ee=(0,o.useValueAsRef)(F),et="rtl"===(0,d.useDirection)(),en=B||({top:"top",right:"right",bottom:"bottom",left:"left","inline-end":et?"left":"right","inline-start":et?"right":"left"})[S],ei="center"===C?en:`${en}-${C}`,er=O;"number"==typeof er?er={top:er,right:er,bottom:er,left:er}:er&&(er={top:er.top||0,right:er.right||0,bottom:er.bottom||0,left:er.left||0});let es=+("bottom"===S),eo=+("top"===S),ea=+("right"===S),el=+("left"===S),eu={boundary:"clipping-ancestors"===P?"clippingAncestors":P,padding:er},ec=t.useRef(null),ed=(0,o.useValueAsRef)(R),ef=(0,o.useValueAsRef)(A),ep="function"!=typeof R?R:0,em="function"!=typeof A?A:0,eg=[];M&&eg.push(M),eg.push((0,u.offset)(e=>{let t=x(e,S,et),n="function"==typeof ed.current?ed.current(t):ed.current,i="function"==typeof ef.current?ef.current(t):ef.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[ep,em,et,S]));let eh="none"===U&&"shift"!==Y,ev=!eh&&(k||q||"shift"===Y),ey="none"===Y?null:(0,u.flip)({...eu,padding:{top:er.top+1+es,right:er.right+1+el,bottom:er.bottom+1+eo,left:er.left+1+ea},mainAxis:!q&&"flip"===Y,crossAxis:"flip"===U&&"alignment",fallbackAxisSideDirection:K}),eb=eh?null:(0,u.shift)({...eu,rootBoundary:G,mainAxis:"none"!==U,crossAxis:ev,limiter:k||q?void 0:(0,u.limitShift)(e=>{if(!ec.current)return{};let{width:t,height:i}=ec.current.getBoundingClientRect(),r=(0,n.getSideAxis)((0,n.getSide)(e.placement)),s="y"===r?er.left+er.right:er.top+er.bottom;return{offset:("y"===r?t:i)/2+s/2}})},[eu,k,q,G,er,U]);"shift"===Y||"shift"===U||"center"===C?eg.push(eb,ey):eg.push(ey,eb),eg.push((0,u.size)({...eu,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:i}){if(!ee.current)return;let s=e.style;s.setProperty(m,`${t}px`),s.setProperty(g,`${n}px`);let o=(0,r.ownerWindow)(e).devicePixelRatio||1,{x:a,y:l,width:u,height:c}=i.reference,d=(Math.round((a+u)*o)-Math.round(a*o))/o,f=(Math.round((l+c)*o)-Math.round(l*o))/o;s.setProperty(h,`${d}px`),s.setProperty(v,`${f}px`)}}),((e,t)=>{let{name:i,fn:r}={name:"arrow",options:e,async fn(t){let{x:i,y:r,placement:s,rects:o,platform:a,elements:l,middlewareData:u}=t,{element:c,padding:d=0,offsetParent:f="real"}=(0,n.evaluate)(e,t)||{};if(null==c)return{};let p=(0,n.getPaddingObject)(d),m={x:i,y:r},g=(0,n.getAlignmentAxis)(s),h=(0,n.getAxisLength)(g),v=await a.getDimensions(c),y="y"===g,b=y?"clientHeight":"clientWidth",x=o.reference[h]+o.reference[g]-m[g]-o.floating[h],w=m[g]-o.reference[g],E="real"===f?await a.getOffsetParent?.(c):l.floating,T=l.floating[b]||o.floating[h];T&&await a.isElement?.(E)||(T=l.floating[b]||o.floating[h]);let S=T/2-v[h]/2-1,R=Math.min(p[y?"top":"left"],S),C=Math.min(p[y?"bottom":"right"],S),A=T-v[h]-C,P=T/2-v[h]/2+(x/2-w/2),O=(0,n.clamp)(R,P,A),k=!u.arrow&&null!=(0,n.getAlignment)(s)&&P!==O&&o.reference[h]/2-(P<R?R:C)-v[h]/2<0,I=k?P<R?P-R:P-A:0;return{[g]:m[g]+I,data:{[g]:O,centerOffset:P-O-I,...k&&{alignmentOffset:I}},reset:k}}};return{name:i,fn:r,options:[e,t]}})(e=>({element:ec.current||(0,i.ownerDocument)(e.elements.floating).createElement("div"),padding:ec.current?I:0,offsetParent:"floating"}),[I]),{name:"transformOrigin",fn(e){let t,{elements:{floating:i},middlewareData:r,placement:s,platform:o,rects:a,y:l}=e,u=(0,n.getSide)(s),c=(0,n.getAlignment)(s),d="y"===(0,n.getSideAxis)(u),f=ec.current,p="function"==typeof R?R(x(e,S,et)):R;if(!f&&c&&1>=Math.abs(d?r.shift?.x||0:r.shift?.y||0))t="start"===c===(d&&o.isRTL?.(i)===!0)?"100%":"0%";else{let e=d?r.arrow?.x||0:r.arrow?.y||0,n=d?f?.clientWidth||0:f?.clientHeight||0;t=`${e+n/2}px`}let m="top"===u||"left"===u?`calc(100% + ${p}px)`:`${-p}px`;return ev&&d&&Math.abs(r.shift?.y||0)>p&&(m=`${a.reference.y+a.reference.height/2-l}px`),i.style.setProperty(y,d?`${t} ${m}`:`${m} ${t}`),{}}},f,V),(0,s.useIsoLayoutEffect)(()=>{!F&&D&&D.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[F,D]);let ex=t.useMemo(()=>({ancestorScroll:!L,elementResize:!L&&"u">typeof ResizeObserver,layoutShift:!L&&"u">typeof IntersectionObserver}),[L]),{refs:ew,elements:eE,x:eT,y:eS,middlewareData:eR,update:eC,placement:eA,context:eP,isPositioned:eO,floatingStyles:ek}=c({rootContext:D,open:N?F:void 0,placement:ei,middleware:eg,strategy:T,whileElementsMounted:N?void 0:(...e)=>(0,l.autoUpdate)(...e,ex),nodeId:W,externalTree:z}),{sideX:eI,sideY:eL}=eR.adaptiveOrigin||p,eM=eO?T:"fixed",eN=t.useMemo(()=>{let e;return(e=eO?V?{position:eM,[eI]:eT,[eL]:eS}:{...ek,position:eM}:{position:eM,top:0,left:0})[m]="100vw",e[g]="100vh",eO||(e.opacity=0),e},[V,eM,eI,eT,eL,eS,ek,eO]),eD=t.useRef(null);(0,s.useIsoLayoutEffect)(()=>{if(!F)return;let e=Z.current,t="function"==typeof e?e():e,n=(w(t)?t.current:t)||null;n!==eD.current&&(ew.setPositionReference(n),eD.current=n)},[F,ew,Q,Z]),t.useEffect(()=>{if(!F)return;let e=Z.current;"function"!=typeof e&&w(e)&&e.current!==eD.current&&(ew.setPositionReference(e.current),eD.current=e.current)},[F,ew,Q,Z]),t.useEffect(()=>{if(N&&F&&eE.reference&&eE.floating)return(0,l.autoUpdate)(eE.reference,eE.floating,eC,ex)},[N,F,eE,eC,ex]);let eF=(0,n.getSide)(eA),ej=b(S,eF,et),e_=(0,n.getAlignment)(eA)||"center",eW=!!eR.hide?.referenceHidden;(0,s.useIsoLayoutEffect)(()=>{H&&F&&eO&&eF!==en&&$(eF)},[H,F,eO,eF,en]);let eV=t.useMemo(()=>({position:"absolute",top:eR.arrow?.y,left:eR.arrow?.x}),[eR.arrow]),eH=eR.arrow?.centerOffset!==0;return t.useMemo(()=>({positionerStyles:eN,arrowStyles:eV,arrowRef:ec,arrowUncentered:eH,side:ej,align:e_,physicalSide:eF,anchorHidden:eW,refs:ew,context:eP,isPositioned:eO,update:eC}),[eN,eV,ec,eH,ej,e_,eF,eW,ew,eP,eO,eC])}(e,c.useBaseUIFloating)}],923706)},137584,222640,e=>{"use strict";var t=e.i(271645),n=e.i(667865),i=e.i(174080),r=e.i(708445),s=e.i(594603),o=e.i(180862);let a=null;function l(e,t=!1,u=!1){let c=(0,r.useAnimationFrame)();return(0,n.useStableCallback)((n,r=null)=>{c.cancel();let l=(0,s.resolveRef)(e);if(null==l)return;let d=()=>{if(!u)return void i.flushSync(n);if(!a){let e=[];a=e,queueMicrotask(()=>{a=null,i.flushSync(()=>{for(let t of e)t()})})}a.push(()=>{r?.aborted||n()})};if("function"!=typeof l.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)return void n();function f(){Promise.all(l.getAnimations().map(e=>e.finished)).then(()=>{r?.aborted||d()},()=>{r?.aborted||(l.getAnimations().some(e=>e.pending||"finished"!==e.playState)?f():d())})}if(t){let e=o.startingStyle;if(!l.hasAttribute(e))return void c.request(f);let t=new MutationObserver(()=>{l.hasAttribute(e)||(t.disconnect(),f())});return t.observe(l,{attributes:!0,attributeFilter:[e]}),void r?.addEventListener("abort",()=>t.disconnect(),{once:!0})}c.request(f)})}e.s(["useAnimationsFinished",0,l],222640),e.s(["useOpenChangeComplete",0,function(e){let{enabled:i=!0,open:r,ref:s,batch:o=!1,onComplete:a}=e,u=(0,n.useStableCallback)(a),c=l(s,r,o);t.useEffect(()=>{if(!i)return;let e=new AbortController;return c(u,e.signal),()=>{e.abort()}},[i,r,u,c])}],137584)},552245,e=>{"use strict";e.i(247167);var t=e.i(733332),n=e.i(271645),i=e.i(828918),r=e.i(978554),s=e.i(435241);e.i(69415);var o=e.i(956789),a=e.i(416919),l=e.i(809835),u=e.i(377570),c=e.i(176782);let d=Symbol.for("react.lazy");e.s(["useRenderElement",0,function(e,f,p={}){let m=f.render;!1!==p.enabled&&(m=function(e){if(e?.$$typeof!==d)return e;let t=n.Children.toArray(e)[0];return n.isValidElement(t)?t:e}(m));let g=function(e,t,n){var d;let{className:f,style:p}=e,{state:m=o.EMPTY_OBJECT,ref:g,props:h,stateAttributesMapping:v,enabled:y=!0}=t,b=y?(0,l.resolveClassName)(f,m):void 0,x=y?(0,u.resolveStyle)(p,m):void 0,w=y?(0,a.getStateAttributesProps)(m,v):o.EMPTY_OBJECT,E=y&&h?Array.isArray(d=h)?(0,c.mergePropsN)(d):(0,c.mergeProps)(void 0,d):void 0,T=y?(0,s.mergeObjects)(w,E)??{}:o.EMPTY_OBJECT;return("u">typeof document&&(y?Array.isArray(g)?T.ref=(0,i.useMergedRefsN)([T.ref,(0,r.getReactElementRef)(n),...g]):T.ref=(0,i.useMergedRefs)(T.ref,(0,r.getReactElementRef)(n),g):(0,i.useMergedRefs)(null,null)),y)?(void 0!==b&&(T.className=(0,c.mergeClassNames)(T.className,b)),void 0!==x&&(T.style=(0,s.mergeObjects)(T.style,x)),T):o.EMPTY_OBJECT}(f,p,m);return!1===p.enabled?null:function(e,i,r,s){if(i){if("function"==typeof i)return i(r,s);let e=(0,c.mergeProps)(r,i.props);return e.ref=r.ref,n.cloneElement(i,e)}if(e&&"string"==typeof e){var o,a;return o=e,a=r,"button"===o?(0,n.createElement)("button",{type:"button",...a,key:a.key}):"img"===o?(0,n.createElement)("img",{alt:"",...a,key:a.key}):n.createElement(o,a)}throw Error((0,t.default)(8))}(e,m,g,p.state??o.EMPTY_OBJECT)}])},176782,e=>{"use strict";var t=e.i(435241);let n={};function i(e){return o(e)?{...a(e,n)}:function(e){let t={...e};for(let e in t){let n=t[e];s(e,n)&&(t[e]=l(n))}return t}(e)}function r(e,n){return o(n)?a(n,e):function(e,n){if(!n)return e;for(let i in n){let r=n[i];switch(i){case"style":e[i]=(0,t.mergeObjects)(e.style,r);break;case"className":e[i]=c(e.className,r);break;default:s(i,r)?e[i]=function(e,t){return t?e?(...n)=>{let i=n[0];if(d(i)){u(i);let r=t(...n);return i.baseUIHandlerPrevented||e?.(...n),r}let r=t(...n);return e?.(...n),r}:l(t):e}(e[i],r):e[i]=r}}return e}(e,n)}function s(e,t){let n=e.charCodeAt(0),i=e.charCodeAt(1),r=e.charCodeAt(2);return 111===n&&110===i&&r>=65&&r<=90&&("function"==typeof t||void 0===t)}function o(e){return"function"==typeof e}function a(e,t){return o(e)?e(t):e??n}function l(e){return e?(...t)=>{let n=t[0];return d(n)&&u(n),e(...t)}:e}function u(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function c(e,t){return t?e?t+" "+e:t:e}function d(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}e.s(["makeEventPreventable",0,u,"mergeClassNames",0,c,"mergeProps",0,function(e,t,n,s,o){if(!n&&!s&&!o&&!e)return i(t);let a=i(e);return t&&(a=r(a,t)),n&&(a=r(a,n)),s&&(a=r(a,s)),o&&(a=r(a,o)),a},"mergePropsN",0,function(e){if(0===e.length)return n;if(1===e.length)return i(e[0]);let t=i(e[0]);for(let n=1;n<e.length;n+=1)t=r(t,e[n]);return t}])},9957,68875,e=>{"use strict";var t=e.i(271645),n=e.i(847391),i=e.i(182531),r=e.i(540886),s=e.i(552245);let o=t.forwardRef(function(e,o){let{render:a,className:l,style:u,disabled:c,nativeButton:d=!0,...f}=e,p=(0,i.useToastProviderContext)(),{toast:m,expanded:g}=(0,n.useToastRootContext)(),[h,v]=t.useState(!1),{getButtonProps:y,buttonRef:b}=(0,r.useButton)({disabled:c,native:d}),x={type:m.type};return(0,s.useRenderElement)("button",e,{ref:[o,b],state:x,props:[{"aria-hidden":!g&&!h,onClick(){p.closeToast(m.id)},onFocus(){v(!0)},onBlur(){v(!1)}},f,y]})});e.s(["ToastClose",0,o],9957);var a=e.i(54348);let l=t.forwardRef(function(e,t){let{render:i,className:o,style:l,disabled:u,nativeButton:c=!0,...d}=e,{toast:f}=(0,n.useToastRootContext)(),p=f.actionProps?.children??d.children,{getButtonProps:m,buttonRef:g}=(0,r.useButton)({disabled:u,native:c}),h={type:f.type},v=(0,s.useRenderElement)("button",e,{ref:[t,g],state:h,props:[d,f.actionProps,m,{children:p}]});return(0,a.hasRenderableChildren)(v)?v:null});e.s(["ToastAction",0,l],68875)},966669,54348,871707,e=>{"use strict";var t=e.i(271645),n=e.i(552245),i=e.i(883977),r=e.i(146376),s=e.i(847391);function o(e){return t.isValidElement(e)&&function e(t){return null!=t&&"boolean"!=typeof t&&""!==t&&(!Array.isArray(t)||t.some(e))}(e.props.children)}function a(e,t,n){let{toast:r,setTitleId:o,setDescriptionId:a}=(0,s.useToastRootContext)(),l=t??("title"===n?r.title:r.description);return{id:(0,i.useId)(e),children:l,type:r.type,setId:"title"===n?o:a}}function l(e,t,n){let i=o(e);return(0,r.useIsoLayoutEffect)(()=>{if(i)return n(t),()=>{n(e=>e===t?void 0:e)}},[i,t,n]),i?e:null}e.s(["hasRenderableChildren",0,o],54348);let u=t.forwardRef(function(e,t){let{render:i,className:r,style:s,id:o,children:u,...c}=e,{id:d,children:f,type:p,setId:m}=a(o,u,"description");return l((0,n.useRenderElement)("p",e,{ref:t,state:{type:p},props:{...c,id:d,children:f}}),d,m)});e.s(["ToastDescription",0,u],966669);let c=t.forwardRef(function(e,t){let{render:i,className:r,style:s,id:o,children:u,...c}=e,{id:d,children:f,type:p,setId:m}=a(o,u,"title");return l((0,n.useRenderElement)("h2",e,{ref:t,state:{type:p},props:{...c,id:d,children:f}}),d,m)});e.s(["ToastTitle",0,c],871707)},76572,e=>{"use strict";e.i(653226);var t=e.i(493276),n=e.i(660872),i=e.i(29551),r=e.i(128376),s=e.i(966669),o=e.i(871707),a=e.i(9957),l=e.i(68875),u=e.i(571660),c=e.i(271645),d=e.i(229315),f=e.i(956789),p=e.i(923706),m=e.i(638396),g=e.i(605083),h=e.i(265858),v=e.i(182531),y=e.i(789579),b=e.i(665458),x=e.i(843476);let w=c.forwardRef(function(e,t){let{toast:n,...i}=e,r=(0,v.useToastProviderContext)(),s=n.positionerProps??f.EMPTY_OBJECT,{render:o,className:a,anchor:l=s.anchor,positionMethod:u=s.positionMethod??"absolute",side:w=s.side??"top",align:E=s.align??"center",sideOffset:T=s.sideOffset??0,alignOffset:S=s.alignOffset??0,collisionBoundary:R=s.collisionBoundary??"clipping-ancestors",collisionPadding:C=s.collisionPadding??5,arrowPadding:A=s.arrowPadding??5,sticky:P=s.sticky??!1,disableAnchorTracking:O=s.disableAnchorTracking??!1,collisionAvoidance:k=s.collisionAvoidance??m.POPUP_COLLISION_AVOIDANCE,style:I,...L}=i,[M,N]=c.useState(null),D=r.useState("toastIndex",n.id),F=r.useState("toastVisibleIndex",n.id),j=(0,d.isElement)(l)?l:null,_=(0,h.useFloatingRootContext)({open:!0,onOpenChange:f.NOOP,elements:{floating:M,reference:j}}),W=(0,p.useAnchorPositioning)({anchor:j,positionMethod:u,floatingRootContext:_,mounted:!0,side:w,sideOffset:T,align:E,alignOffset:S,collisionBoundary:R,collisionPadding:C,sticky:P,arrowPadding:A,disableAnchorTracking:O,keepMounted:!0,collisionAvoidance:k}),V={side:W.side,align:W.align,anchorHidden:W.anchorHidden},H=(0,y.usePositioner)(e,V,{styles:{...W.positionerStyles,[b.index]:"ending"===n.transitionStatus?D:F},transitionStatus:n.transitionStatus,props:L,refs:[t,N]});return(0,x.jsx)(g.ToastPositionerContext.Provider,{value:W,children:H})});var E=e.i(552245);let T=c.forwardRef(function(e,t){let{className:n,render:i,style:r,...s}=e,{arrowRef:o,side:a,align:l,arrowUncentered:u,arrowStyles:c}=(0,g.useToastPositionerContext)();return(0,E.useRenderElement)("div",e,{state:{side:a,align:l,uncentered:u},ref:[t,o],props:[{style:c,"aria-hidden":!0},s]})});var S=e.i(40222);e.s(["Action",()=>l.ToastAction,"Arrow",0,T,"Close",()=>a.ToastClose,"Content",()=>r.ToastContent,"Description",()=>s.ToastDescription,"Portal",()=>u.ToastPortal,"Positioner",0,w,"Provider",()=>t.ToastProvider,"Root",()=>i.ToastRoot,"Title",()=>o.ToastTitle,"Viewport",()=>n.ToastViewport,"createToastManager",0,function(){let e=new Set;function t(t){e.forEach(e=>e(t))}return{" subscribe":function(t){return e.add(t),()=>{e.delete(t)}},add(e){let n=e.id||(0,S.generateId)("toast");return t({action:"add",options:{...e,id:n,transitionStatus:"starting"}}),n},close(e){t({action:"close",options:{id:e}})},update(e,n){t({action:"update",options:{id:e,updates:n}})},promise(e,n){let i=e;return t({action:"promise",options:{...n,promise:e,setPromise(e){i=e}}}),i}}},"useToastManager",0,function(){let e=(0,v.useToastProviderContext)(),t=e.useState("toasts");return c.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}],402860);var R=e.i(402860);e.s(["Toast",0,R],76572)},653226,e=>{"use strict";e.s([])},571660,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(378680),i=e.i(843476);let r=t.forwardRef(function(e,t){return(0,i.jsx)(n.FloatingPortalLite,{ref:t,...e})});e.s(["ToastPortal",0,r])},605083,e=>{"use strict";e.i(247167);var t=e.i(733332),n=e.i(271645);let i=n.createContext(void 0);e.s(["ToastPositionerContext",0,i,"useToastPositionerContext",0,function(){let e=n.useContext(i);if(void 0===e)throw Error((0,t.default)(84));return e}])},493276,406189,e=>{"use strict";var t=e.i(271645),n=e.i(626300),i=e.i(388940),r=e.i(146376),s=e.i(182531),o=e.i(301252),a=e.i(40222),l=e.i(108868),u=e.i(439957),c=e.i(171009),d=e.i(584446),f=e.i(596296);e.s(["isFocusVisible",()=>f.matchesFocusVisible],406189);var f=f;function p(e){let t=new Map,n=0,i=0;return e.forEach((e,r)=>{let s="ending"===e.transitionStatus;t.set(e.id,{value:e,domIndex:r,visibleIndex:s?-1:n,offsetY:i}),i+=e.height||0,s||(n+=1)}),t}function m(e,t){let n=0;return e.map(e=>{if("ending"===e.transitionStatus)return e;let i=n>=t;return n+=1,e.limited===i?e:{...e,limited:i}})}let g={toasts:e=>e.toasts,isEmpty:e=>0===e.toasts.length,toast:(e,t)=>e.toastMetadata.get(t)?.value,toastIndex:(e,t)=>e.toastMetadata.get(t)?.domIndex??-1,toastOffsetY:(e,t)=>e.toastMetadata.get(t)?.offsetY??0,toastVisibleIndex:(e,t)=>e.toastMetadata.get(t)?.visibleIndex??-1,focused:e=>e.focused,expanded:e=>e.hovering||e.focused,expandedOrOutOfFocus:e=>e.hovering||e.focused||!e.isWindowFocused,prevFocusElement:e=>e.prevFocusElement};class h extends o.ReactStore{timers=new Map;areTimersPaused=!1;constructor(e){super({...e,toastMetadata:p(e.toasts)},{},g)}setViewport=e=>{this.set("viewport",e)};syncProviderProps(e,t){let n=this.state.limit!==t;if(this.state.timeout===e&&!n)return;let i={timeout:e,limit:t};if(n){let e=m(this.state.toasts,t);i.toasts=e,i.toastMetadata=p(e)}this.update(i)}disposeEffect=()=>()=>{this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear()};removeToast(e,t=!1){let n=g.toastIndex(this.state,e);if(-1===n)return;let i=this.state.toasts[n];t||i?.onRemove?.();let r=[...this.state.toasts];r.splice(n,1),this.setToasts(r)}addToast=e=>{let{timeout:t,limit:n}=this.state,i=e.id||(0,a.generateId)("toast");if(e.id){let t=g.toast(this.state,e.id);if(t)if("ending"===t.transitionStatus)this.removeToast(e.id,!0);else{let{id:t,transitionStatus:n,...i}=e;return this.updateToastInternal(e.id,i,!0,!0),e.id}}let r={...e,id:i,updateKey:0,transitionStatus:"starting"},s=[r,...this.state.toasts];this.setToasts(m(s,n));let o=r.timeout??t;return"loading"!==r.type&&o>0&&this.scheduleTimer(i,o,()=>this.closeToast(i)),g.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),i};updateToast=(e,t)=>{let n=g.toast(this.state,e);n&&"ending"!==n.transitionStatus&&this.updateToastInternal(e,"function"==typeof t?t(n):t,!1,!0)};updateToastInternal=(e,t,n=!1,i=!1)=>{let{timeout:r,toasts:s}=this.state,o=g.toast(this.state,e);if(!o||"ending"===o.transitionStatus)return;let a={...o,...t,...i&&{updateKey:o.updateKey+1}};this.setToasts(s.map(t=>t.id===e?a:t));let l=a.timeout??r,u=o.timeout??r,c=Object.hasOwn(t,"timeout"),d="ending"!==a.transitionStatus&&"loading"!==a.type&&l>0,f=this.timers.has(e),p=u!==l,m="loading"===o.type;!d&&f?this.clearTimer(e):d&&(!f||p||c||m||n)&&(this.clearTimer(e),this.scheduleTimer(e,l,()=>this.closeToast(e)),g.expandedOrOutOfFocus(this.state)&&this.pauseTimers())};closeToast=e=>{let t,n=void 0===e,{limit:i,toasts:r}=this.state;if(n)t=r,this.clearTimers();else{let n=g.toast(this.state,e);if(!n)return;t=[n],this.clearTimer(e)}let s=m(r.map(t=>n||t.id===e?{...t,transitionStatus:"ending",height:0}:t),i);this.setToasts(s,!s.some(e=>"ending"!==e.transitionStatus)),t.forEach(e=>{"ending"!==e.transitionStatus&&e.onClose?.()}),this.handleFocusManagement(e)};promiseToast=(e,t)=>{let n=(0,c.resolvePromiseOptions)(t.loading),i=this.addToast({...n,type:"loading"}),r=e.then(e=>{let n=(0,c.resolvePromiseOptions)(t.success,e);return this.updateToast(i,{...n,type:"success",timeout:n.timeout}),e}).catch(e=>{let n=(0,c.resolvePromiseOptions)(t.error,e);return this.updateToast(i,{...n,type:"error",timeout:n.timeout}),Promise.reject(e)});return({}).hasOwnProperty.call(t,"setPromise")&&t.setPromise(r),r};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(e=>{e.timeout&&(e.timeout.clear(),e.remaining=Math.max(e.remaining-(Date.now()-e.start),0))}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((e,t)=>{e.remaining=e.remaining>0?e.remaining:e.delay,e.timeout??=u.Timeout.create(),e.timeout.start(e.remaining,()=>{this.handleTimerFired(t),e.callback()}),e.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=e=>{if("touch"!==e.pointerType)return;let t=(0,d.getTarget)(e);(0,d.contains)(this.state.viewport,t)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(e,t,n){let i=Date.now(),r=g.expandedOrOutOfFocus(this.state)?void 0:u.Timeout.create();r?.start(t,()=>{this.handleTimerFired(e),n()}),this.timers.set(e,{timeout:r,start:i,delay:t,remaining:t,callback:n})}clearTimers(){this.timers.forEach(e=>{e.timeout?.clear()}),this.timers.clear(),this.areTimersPaused=!1}clearTimer(e){let t=this.timers.get(e);t?.timeout?.clear(),this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}handleTimerFired(e){this.timers.delete(e),this.resetPausedStateIfNoTimersRemain()}resetPausedStateIfNoTimersRemain(){0===this.timers.size&&(this.areTimersPaused=!1)}setToasts(e,t=0===e.length){let n={toasts:e,toastMetadata:p(e)};t&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(e){let t=(0,d.activeElement)((0,l.ownerDocument)(this.state.viewport));if(!this.state.viewport||!(0,d.contains)(this.state.viewport,t)||!(0,f.matchesFocusVisible)(t))return;if(void 0===e)return void this.restoreFocusToPrevElement();let n=g.toasts(this.state),i=g.toastIndex(this.state,e),r=(e,t)=>{for(let i=e;i>=0&&i<n.length;i+=t)if("ending"!==n[i].transitionStatus)return n[i];return null},s=r(i+1,1)??r(i-1,-1);s?s.ref?.current?.focus():this.restoreFocusToPrevElement()}}var v=e.i(843476);function y(e){let{store:t,timeout:n,limit:i}=e;return(0,r.useIsoLayoutEffect)(()=>{t.syncProviderProps(n,i)},[t,n,i]),null}e.s(["ToastProvider",0,function(e){let{children:r,timeout:o=5e3,limit:a=3,toastManager:l}=e,u=(0,i.useRefWithInit)(()=>new h({timeout:o,limit:a,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return(0,n.useOnMount)(u.disposeEffect),t.useEffect(function(){if(l)return l[" subscribe"](({action:e,options:t})=>{let n=t.id;"promise"===e&&t.promise?u.promiseToast(t.promise,t):"update"===e&&n?u.updateToast(n,t.updates):"close"===e?u.closeToast(n):u.addToast(t)})},[u,l]),(0,v.jsxs)(s.ToastContext.Provider,{value:u,children:[(0,v.jsx)(y,{store:u,timeout:o,limit:a}),r]})}],493276)},182531,e=>{"use strict";e.i(247167);var t=e.i(733332),n=e.i(271645);let i=n.createContext(void 0);e.s(["ToastContext",0,i,"useToastProviderContext",0,function(){let e=n.useContext(i);if(!e)throw Error((0,t.default)(73));return e}])},29551,128376,e=>{"use strict";var t=e.i(271645),n=e.i(174080),i=e.i(574735),r=e.i(108868),s=e.i(144394),o=e.i(146376),a=e.i(667865),l=e.i(584446),u=e.i(847391),c=e.i(474354),d=e.i(182531),f=e.i(552245),p=e.i(137584),m=e.i(638396),g=e.i(308760),h=e.i(49072),v=e.i(665458),y=e.i(253335);y.TransitionStatusDataAttributes.startingStyle,y.TransitionStatusDataAttributes.endingStyle;var b=e.i(843476);let x={...c.transitionStatusMapping,swipeDirection:e=>e?{"data-swipe-direction":e}:null},w=`${m.BASE_UI_SWIPE_IGNORE_SELECTOR},${m.LEGACY_SWIPE_IGNORE_SELECTOR}`,E=t.forwardRef(function(e,c){let m,y,{toast:E,render:T,className:S,swipeDirection:R=["down","right"],style:C,...A}=e,P=E.positionerProps?.anchor!==void 0,O=[];P||(O=Array.isArray(R)?R:[R]);let k=O.length>0,I=(0,d.useToastProviderContext)(),[L,M]=t.useState(void 0),[N,D]=t.useState(!1),[F,j]=t.useState(!1),[_,W]=t.useState({x:0,y:0}),[V,H]=t.useState({x:0,y:0,scale:1}),[z,B]=t.useState(),[$,Y]=t.useState(),[U,K]=t.useState(null),q=t.useRef(null),G=t.useRef(void 0),X=t.useRef({x:0,y:0}),J=t.useRef({x:0,y:0,scale:1}),Q=t.useRef(void 0),Z=t.useRef(0),ee=t.useRef(!1),et=t.useRef({x:0,y:0}),en=t.useRef(!1),ei=t.useRef({x:0,y:0}),er=t.useRef(null),es=t.useRef(null),eo=I.useState("toastIndex",E.id),ea=I.useState("toastVisibleIndex",E.id),el=I.useState("toastOffsetY",E.id),eu=I.useState("focused"),ec=I.useState("expanded");(0,p.useOpenChangeComplete)({open:"ending"!==E.transitionStatus,ref:q,onComplete(){"ending"===E.transitionStatus&&I.removeToast(E.id)}});let ed=(0,a.useStableCallback)((e=!1)=>{let t=q.current;if(!t)return;let i=t.style.height;t.style.height="auto";let r=t.offsetHeight;function s(){I.updateToastInternal(E.id,{ref:q,height:r,transitionStatus:void 0})}t.style.height=i,e?n.flushSync(s):s()});function ef(e){ei.current=e,W(e)}(0,o.useIsoLayoutEffect)(()=>{let e=G.current;("starting"===E.transitionStatus||e!==E.id)&&(void 0!==e&&(M(void 0),H({x:0,y:0,scale:1}),ef({x:0,y:0})),G.current=E.id,ed())},[ed,E.id,E.transitionStatus]),(0,o.useIsoLayoutEffect)(()=>()=>{es.current?.abort()},[]);let ep=(0,a.useStableCallback)(e=>{let t;if(e.pointerId!==er.current)return;er.current=null,es.current?.abort(),es.current=null,D(!1),j(!1),K(null);let n=J.current;if("pointercancel"===e.type||ee.current){ef({x:n.x,y:n.y}),M(void 0);return}let i=ei.current,r=i.x-n.x,s=i.y-n.y;for(let e of O)if((0,g.getDisplacement)(e,r,s)>40){t=e;break}t?(M(t),I.closeToast(E.id)):(ef({x:n.x,y:n.y}),M(void 0))});t.useEffect(()=>{let e=q.current;if(k&&e)return(0,i.addEventListener)(e,"touchmove",function(t){null!==er.current&&(0,l.contains)(e,(0,l.getTarget)(t))&&t.preventDefault()},{passive:!1})},[k]);let em="high"===E.priority,eg={role:em?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":z,"aria-describedby":$,"aria-hidden":!!em&&!eu||void 0,onPointerDown:k?function(e){if(0!==e.button)return;"touch"===e.pointerType&&I.pauseTimers();let t=(0,l.getTarget)(e.nativeEvent);if(t?.closest(`button,a,input,textarea,[role="button"],${w}`))return;ee.current=!1,Q.current=void 0,Z.current=0,er.current=e.pointerId,X.current={x:e.clientX,y:e.clientY},et.current=X.current;let n=e.currentTarget,i=(0,h.getElementTransform)(n);J.current=i,H(i),ef({x:i.x,y:i.y}),I.set("hovering",!0),D(!0),j(!1),K(null),en.current=!0,es.current?.abort();let s=new AbortController;es.current=s;let o=(0,r.ownerDocument)(n);o.addEventListener("pointerup",ep,{signal:s.signal}),o.addEventListener("pointercancel",ep,{signal:s.signal}),n.setPointerCapture?.(e.pointerId)}:void 0,onPointerMove:k?function(e){let t,n,i,r;if(e.pointerId!==er.current)return;e.preventDefault(),en.current&&(X.current={x:e.clientX,y:e.clientY},en.current=!1);let{clientY:s,clientX:o,movementX:a,movementY:l}=e;(l<0&&s>et.current.y||l>0&&s<et.current.y)&&(et.current={x:et.current.x,y:s}),(a<0&&o>et.current.x||a>0&&o<et.current.x)&&(et.current={x:o,y:et.current.y});let u=o-X.current.x,c=s-X.current.y,d=s-et.current.y,f=o-et.current.x,p=U;if(!F&&Math.sqrt(u*u+c*c)>=1){j(!0);let e=O.includes("left")||O.includes("right"),t=O.includes("up")||O.includes("down");e&&t&&K(p=Math.abs(u)>Math.abs(c)?"horizontal":"vertical")}if(Q.current){let e=Q.current,t=(0,g.getDisplacement)(e,f,d);t>40?(ee.current=!1,M(e)):O.includes("left")&&O.includes("right")||O.includes("up")&&O.includes("down")||!(Z.current-t>=10)||(ee.current=!0)}else"vertical"===p?c>0?t="down":c<0&&(t="up"):"horizontal"===p?u>0?t="right":u<0&&(t="left"):t=Math.abs(u)>=Math.abs(c)?u>0?"right":"left":c>0?"down":"up",t&&O.includes(t)&&(Q.current=t,Z.current=(0,g.getDisplacement)(t,u,c),M(t));let m=(n=e=>e>0?e**.5:-(Math.abs(e)**.5),i=u>0&&!O.includes("right")||u<0&&!O.includes("left"),r=c>0&&!O.includes("down")||c<0&&!O.includes("up"),{x:i?n(u):u,y:r?n(c):c}),h=J.current.x,v=J.current.y,y=O.includes("left")||O.includes("right"),b=O.includes("up")||O.includes("down");"vertical"!==p&&y&&(h+=m.x),"horizontal"!==p&&b&&(v+=m.y),ef({x:h,y:v})}:void 0,onPointerUp:k?ep:void 0,onPointerCancel:k?ep:void 0,onKeyDown:function(e){"Escape"===e.key&&q.current&&(0,l.contains)(q.current,(0,l.activeElement)((0,r.ownerDocument)(q.current)))&&I.closeToast(E.id)},inert:(0,s.inertValue)(E.limited),style:{...(m=_.x-V.x,y=_.y-V.y,{transition:N?"none":void 0,transform:N?`translateX(${_.x}px) translateY(${_.y}px) scale(${V.scale})`:void 0,[v.swipeMovementX]:`${m}px`,[v.swipeMovementY]:`${y}px`}),[v.index]:"ending"===E.transitionStatus?eo:ea,[v.offsetY]:`${el}px`,[v.height]:E.height?`${E.height}px`:void 0}},eh=t.useMemo(()=>({toast:E,setTitleId:B,setDescriptionId:Y,recalculateHeight:ed,visibleIndex:ea,expanded:ec}),[E,B,Y,ed,ea,ec]),ev={transitionStatus:E.transitionStatus,expanded:ec,limited:E.limited||!1,type:E.type,swiping:N,swipeDirection:L},ey=(0,f.useRenderElement)("div",e,{ref:[c,q],state:ev,stateAttributesMapping:x,props:[eg,A]});return(0,b.jsx)(u.ToastRootContext.Provider,{value:eh,children:ey})});e.s(["ToastRoot",0,E],29551);let T=t.forwardRef(function(e,n){let{render:i,className:r,style:s,...a}=e,{visibleIndex:l,expanded:c,recalculateHeight:d}=(0,u.useToastRootContext)(),p=t.useRef(null);return(0,o.useIsoLayoutEffect)(()=>{d();let e=p.current;if(!e||"function"!=typeof ResizeObserver||"function"!=typeof MutationObserver)return;let t=new ResizeObserver(()=>d(!0)),n=new MutationObserver(()=>d(!0));return t.observe(e),n.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{t.disconnect(),n.disconnect()}},[d]),(0,f.useRenderElement)("div",e,{ref:[n,p],state:{expanded:c,behind:l>0},props:a})});e.s(["ToastContent",0,T],128376)},847391,e=>{"use strict";e.i(247167);var t=e.i(733332),n=e.i(271645);let i=n.createContext(void 0);e.s(["ToastRootContext",0,i,"useToastRootContext",0,function(){let e=n.useContext(i);if(!e)throw Error((0,t.default)(66));return e}])},665458,e=>{"use strict";e.s(["height",0,"--toast-height","index",0,"--toast-index","offsetY",0,"--toast-offset-y","swipeMovementX",0,"--toast-swipe-movement-x","swipeMovementY",0,"--toast-swipe-movement-y"])},171009,e=>{"use strict";e.s(["resolvePromiseOptions",0,function(e,t){if("string"==typeof e)return{description:e};if("function"==typeof e){let n=e(t);return"string"==typeof n?{description:n}:n}return e}])},660872,e=>{"use strict";var t=e.i(271645),n=e.i(574735),i=e.i(365420),r=e.i(108868),s=e.i(333848),o=e.i(502077),a=e.i(439957),l=e.i(584446),u=e.i(152535),c=e.i(182531),d=e.i(552245),f=e.i(406189),p=e.i(843476);let m=t.forwardRef(function(e,m){let{render:g,className:h,style:v,children:y,...b}=e,x=(0,c.useToastProviderContext)(),w=(0,a.useTimeout)(),E=t.useRef(!1),T=t.useRef(!1),S=t.useRef(!1),R=x.useState("isEmpty"),C=x.useState("toasts"),A=x.useState("focused"),P=x.useState("expanded"),O=x.useState("prevFocusElement"),k=C[0]?.height,I=C.some(e=>"ending"===e.transitionStatus),L=C.filter(e=>"high"===e.priority);function M(){x.state.toasts.some(e=>"ending"===e.transitionStatus)||S.current||!T.current||(x.state.isWindowFocused&&x.resumeTimers(),x.set("hovering",!1),T.current=!1)}function N(){x.pauseTimers(),x.set("hovering",!0),T.current=!1}function D(e){"touch"===e.pointerType&&(S.current=!1,M())}function F(){if(E.current){E.current=!1;return}!A&&(0,f.isFocusVisible)((0,l.activeElement)((0,r.ownerDocument)(x.state.viewport)))&&(x.set("focused",!0),x.pauseTimers())}t.useEffect(()=>{let e=x.state.viewport;if(!e||R)return;let t=(0,s.ownerWindow)(e),o=(0,r.ownerDocument)(e);return(0,i.mergeCleanups)((0,n.addEventListener)(t,"keydown",function(t){"F6"===t.key&&(0,l.getTarget)(t)!==e&&(t.preventDefault(),x.set("prevFocusElement",(0,l.activeElement)(o)),e?.focus({preventScroll:!0}),x.pauseTimers(),x.set("focused",!0))}),(0,n.addEventListener)(t,"blur",function(e){(0,l.getTarget)(e)===t&&(x.set("isWindowFocused",!1),x.pauseTimers())},!0),(0,n.addEventListener)(t,"focus",function(n){if(n.relatedTarget)return;let i=(0,l.getTarget)(n),s=(0,l.activeElement)((0,r.ownerDocument)(e));i!==t&&(0,l.contains)(e,i)&&(0,f.isFocusVisible)(s)||x.resumeTimers(),w.start(0,()=>x.set("isWindowFocused",!0))},!0),(0,n.addEventListener)(o,"pointerdown",x.handleDocumentPointerDown,!0))},[x,w,R]),t.useEffect(M,[I,x]);let j={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:N,onMouseMove:N,onMouseLeave:function(){T.current=!0,M()},onFocus:F,onBlur:function(e){!(!A||(0,l.contains)(x.state.viewport,e.relatedTarget))&&(x.set("focused",!1),x.state.isWindowFocused&&x.resumeTimers())},onKeyDown:function(e){"Tab"===e.key&&e.shiftKey&&(0,l.getTarget)(e.nativeEvent)===x.state.viewport&&(e.preventDefault(),x.restoreFocusToPrevElement())},onClick:F,onPointerDown:function(e){"touch"===e.pointerType&&(S.current=!0)},onPointerUp:D,onPointerCancel:D,style:{"--toast-frontmost-height":k?`${k}px`:void 0}},_=!R&&O&&(0,p.jsx)(u.FocusGuard,{onFocus:function(e){E.current=!0;let t=e.relatedTarget===x.state.viewport?C.find(e=>"ending"!==e.transitionStatus&&!e.limited):void 0;t?t.ref?.current?.focus():x.restoreFocusToPrevElement()}}),W=(0,d.useRenderElement)("div",e,{ref:[m,x.setViewport],state:{expanded:P},props:[j,b,{children:(0,p.jsxs)(t.Fragment,{children:[_,y,_]})}]});return(0,p.jsxs)(t.Fragment,{children:[_,W,!A&&L.length>0&&(0,p.jsx)("div",{style:o.visuallyHidden,children:L.map(e=>(0,p.jsxs)("div",{role:"alert","aria-atomic":!0,children:[(0,p.jsx)("div",{children:e.title}),(0,p.jsx)("div",{children:e.description})]},e.id))})]})});e.s(["ToastViewport",0,m],660872)},38380,e=>{"use strict";var t=e.i(180862);let n=t.startingStyle,i=t.endingStyle;e.s(["align",0,"data-align","anchorHidden",0,"data-anchor-hidden","closed",0,"data-closed","endingStyle",0,i,"open",0,"data-open","side",0,"data-side","startingStyle",0,n])},415618,e=>{"use strict";e.s(["popupOpen",0,"data-popup-open","pressed",0,"data-pressed"])},378680,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(174080),i=e.i(726674),r=e.i(843476);let s=t.forwardRef(function(e,s){let{children:o,container:a,className:l,render:u,style:c,...d}=e,{node:f,subtree:p}=(0,i.useFloatingPortalNode)({container:a,ref:s,componentProps:e,elementProps:d});return p||f?(0,r.jsxs)(t.Fragment,{children:[p,f&&n.createPortal(o,f)]}):null});e.s(["FloatingPortalLite",0,s])},152535,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(146376),i=e.i(328744),r=e.i(502077),s=e.i(843476);let o=t.forwardRef(function(e,o){let[a,l]=t.useState();return(0,n.useIsoLayoutEffect)(()=>{i.platform.screenReader.voiceOver&&i.platform.engine.webkit&&l("button")},[]),(0,s.jsx)("span",{...e,ref:o,style:r.visuallyHidden,"aria-hidden":!a||void 0,...{tabIndex:0,role:a},"data-base-ui-focus-guard":""})});e.s(["FocusGuard",0,o])},49072,e=>{"use strict";var t=e.i(333848);e.s(["getElementTransform",0,function(e,n){let i=(n??(0,t.ownerWindow)(e).getComputedStyle(e)).transform,r=0,s=0,o=1;if(i&&"none"!==i){let e=i.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(", ").map(parseFloat);6===t.length?(r=t[4],s=t[5],o=Math.sqrt(t[0]*t[0]+t[1]*t[1])):16===t.length&&(r=t[12],s=t[13],o=t[0])}}return{x:r,y:s,scale:o}}])},879938,e=>{"use strict";var t=e.i(474354),n=e.i(38380),i=e.i(415618);let r={[i.popupOpen]:""},s={[i.popupOpen]:"",[i.pressed]:""},o={[n.open]:""},a={[n.closed]:""},l={[n.anchorHidden]:""},u={open:e=>e?o:a,anchorHidden:e=>e?l:null},c={...u,...t.transitionStatusMapping};e.s(["popupStateMapping",0,u,"popupTransitionStateMapping",0,c,"pressableTriggerOpenStateMapping",0,{open:e=>e?s:null},"triggerOpenStateMapping",0,{open:e=>e?r:null}])},990627,e=>{"use strict";e.i(247167),e.s(["PopupTriggerMap",0,class{constructor(){this.idMap=new Map}add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}])},594603,e=>{"use strict";e.s(["resolveRef",0,function(e){return null==e?e:"current"in e?e.current:e}])},789579,e=>{"use strict";var t=e.i(879938),n=e.i(552245),i=e.i(253984);e.s(["usePositioner",0,function(e,r,{styles:s,transitionStatus:o,props:a,refs:l,hidden:u,inert:c=!1}){let d={...s};return c&&(d.pointerEvents="none"),(0,n.useRenderElement)("div",e,{state:r,ref:l,props:[{role:"presentation",hidden:u,style:d},(0,i.getDisabledMountTransitionStyles)(o),a],stateAttributesMapping:t.popupStateMapping})}])},308760,e=>{"use strict";e.i(271645),e.s(["getDisplacement",0,function(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}])},574735,e=>{"use strict";e.s(["addEventListener",0,function(e,t,n,i){return e.addEventListener(t,n,i),()=>{e.removeEventListener(t,n,i)}}])},956789,e=>{"use strict";let t=Object.freeze([]),n=Object.freeze({});e.s(["EMPTY_ARRAY",0,t,"EMPTY_OBJECT",0,n,"NOOP",0,function(){}])},896499,e=>{"use strict";let t;var n=e.i(271645),i=e.i(388940);let r=[];function s(e){let n=(n,s)=>{let a,l=(0,i.useRefWithInit)(o).current;try{for(let e of(t=l,r))e.before(l);for(let t of(a=e(n,s),r))t.after(l);l.didInitialize=!0}finally{t=void 0}return a};return n.displayName=e.displayName||e.name,n}function o(){return{didInitialize:!1}}e.s(["fastComponent",0,s,"fastComponentRef",0,function(e){return n.forwardRef(s(e))},"getInstance",0,function(){return t},"register",0,function(e){r.push(e)}])},733332,e=>{"use strict";let t=function(e,...t){let n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(e=>n.searchParams.append("args[]",e)),`Base UI error #${e}; visit ${n} for the full message.`};e.s(["default",0,t])},40222,e=>{"use strict";let t=0;e.s(["generateId",0,function(e){return t+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${t}`}])},978554,e=>{"use strict";var t=e.i(271645),n=e.i(958321);e.s(["getReactElementRef",0,function(e){if(!t.isValidElement(e))return null;let i=e.props;return((0,n.isReactVersionAtLeast)(19)?i?.ref:e.ref)??null}])},144394,e=>{"use strict";var t=e.i(958321);e.s(["inertValue",0,function(e){return(0,t.isReactVersionAtLeast)(19)?e:e?"true":void 0}])},365420,e=>{"use strict";e.s(["mergeCleanups",0,function(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}])},435241,e=>{"use strict";e.s(["mergeObjects",0,function(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}])},108868,e=>{"use strict";e.s(["ownerDocument",0,function(e){return e?.ownerDocument||document}])},328744,e=>{"use strict";e.s([],564949),e.i(564949);let{userAgent:t,platform:n,maxTouchPoints:i}="u"<typeof navigator?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0},r=t.toLowerCase(),s=n.toLowerCase(),o=/^i(os$|p)/.test(s)||"macintel"===s&&i>1,a="android",l=s===a||r.includes(a),u=!o&&s.startsWith("mac"),c=s.startsWith("win"),d=!l&&/^(linux|chrome os)/.test(s),f=u||o;e.s(["android",0,l,"apple",0,f,"ios",0,o,"linux",0,d,"mac",0,u,"windows",0,c],503720);var p=e.i(503720);let m="u">typeof CSS&&!!CSS.supports?.("-webkit-backdrop-filter:none"),g=!m&&r.includes("firefox"),h=!m&&r.includes("chrom");e.s(["blink",0,h,"gecko",0,g,"webkit",0,m],879850);var v=e.i(879850);e.s(["voiceOver",0,f],999170);var y=e.i(999170);let b=/jsdom|happydom/.test(r);e.s(["jsdom",0,b],736174);var x=e.i(736174);e.s(["iOS",0,"@supports (-webkit-touch-callout: none)"],971351);var w=e.i(971351);e.s(["engine",0,v,"env",0,x,"mediaQuery",0,w,"os",0,p,"screenReader",0,y],179214);var E=e.i(179214);e.s(["platform",0,E],328744)},958321,e=>{"use strict";let t=parseInt(e.i(271645).version,10);e.s(["isReactVersionAtLeast",0,function(e){return t>=e}])},214553,e=>{"use strict";let t={...e.i(271645)};e.s(["SafeReact",0,t])},584446,e=>{"use strict";var t=e.i(229315);e.s(["activeElement",0,function(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t},"contains",0,function(e,n){if(!e||!n)return!1;let i=n.getRootNode?.();if(e.contains(n))return!0;if(i&&(0,t.isShadowRoot)(i)){let t=n;for(;t;){if(e===t)return!0;t=t.parentNode||t.host}}return!1},"getTarget",0,function(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}])},301252,e=>{"use strict";e.i(247167);var t=e.i(271645),n=e.i(714935),i=e.i(334346),r=e.i(667865),s=e.i(146376),o=e.i(956789);class a extends n.Store{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,n){t.useDebugValue(e);let i=this;(0,s.useIsoLayoutEffect)(()=>{i.state[e]!==n&&i.set(e,n)},[i,e,n])}useSyncedValueWithCleanup(e,t){let n=this;(0,s.useIsoLayoutEffect)(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);(0,s.useIsoLayoutEffect)(()=>{t.update(e)},[t,...n])}useControlledProp(e,n){t.useDebugValue(e);let i=this,r=void 0!==n;(0,s.useIsoLayoutEffect)(()=>{r&&!Object.is(i.state[e],n)&&i.setState({...i.state,[e]:n})},[i,e,n,r])}select(e,t,n,i){return(0,this.selectors[e])(this.state,t,n,i)}useState(e,n,r,s){return t.useDebugValue(e),(0,i.useStore)(this,this.selectors[e],n,r,s)}useContextCallback(e,n){t.useDebugValue(e);let i=(0,r.useStableCallback)(n??o.NOOP);this.context[e]=i}useStateSetter(e){let n=t.useRef(void 0);return void 0===n.current&&(n.current=t=>{this.set(e,t)}),n.current}observe(e,t){let n,i=(n="function"==typeof e?e:this.selectors[e])(this.state);return t(i,i,this),this.subscribe(e=>{let r=n(e);if(!Object.is(i,r)){let e=i;i=r,t(r,e,this)}})}}e.s(["ReactStore",0,a])},714935,334346,e=>{"use strict";var t=e.i(271645),n=e.i(802239),i=e.i(430224),r=e.i(958321),s=e.i(896499);let o=(0,r.isReactVersionAtLeast)(19)?function(e,i,r,o,a){let l,u=(0,s.getInstance)();if(!u){let s;return s=t.useCallback(()=>i(e.getSnapshot(),r,o,a),[e,i,r,o,a]),(0,n.useSyncExternalStore)(e.subscribe,s,s)}let c=u.syncIndex;return u.syncIndex+=1,u.didInitialize?(l=u.syncHooks[c]).store===e&&l.selector===i&&Object.is(l.a1,r)&&Object.is(l.a2,o)&&Object.is(l.a3,a)||(l.store!==e&&(u.didChangeStore=!0),l.store=e,l.selector=i,l.a1=r,l.a2=o,l.a3=a,l.value=i(e.getSnapshot(),r,o,a)):(l={store:e,selector:i,a1:r,a2:o,a3:a,value:i(e.getSnapshot(),r,o,a)},u.syncHooks.push(l)),l.value}:function(e,t,n,r,s){return(0,i.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,s))};function a(e,t,n,i,r){return o(e,t,n,i,r)}(0,s.register)({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let i=e.syncHooks[n],r=i.selector(i.store.state,i.a1,i.a2,i.a3);Object.is(i.value,r)||(t=!0,i.value=r)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let i=[];for(let e of n)i.push(e.subscribe(t));return()=>{for(let e of i)e()}}),(0,n.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}}),e.s(["useStore",0,a],334346),e.s(["Store",0,class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t]))return void this.setState({...this.state,...e})}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,i){return a(this,e,t,n,i)}}],714935)},708445,e=>{"use strict";e.i(247167);var t=e.i(388940),n=e.i(626300);let i=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||null!==this.callbacks[t]&&(this.callbacks[t]=null,this.callbacksCount-=1)}};class r{static create(){return new r}static request(e){return i.request(e)}static cancel(e){return i.cancel(e)}currentId=null;request(e){this.cancel(),this.currentId=i.request(()=>{this.currentId=null,e()})}cancel=()=>{null!==this.currentId&&(i.cancel(this.currentId),this.currentId=null)};disposeEffect=()=>this.cancel}e.s(["AnimationFrame",0,r,"useAnimationFrame",0,function(){let e=(0,t.useRefWithInit)(r.create).current;return(0,n.useOnMount)(e.disposeEffect),e}])},883977,e=>{"use strict";var t=e.i(271645),n=e.i(214553);let i=0,r=n.SafeReact.useId;e.s(["useId",0,function(e,n){if(void 0!==r){let t=r();return e??(n?`${n}-${t}`:t)}return function(e,n="mui"){let[r,s]=t.useState(e),o=e||r;return t.useEffect(()=>{null==r&&(i+=1,s(`${n}-${i}`))},[r,n]),o}(e,n)}])},146376,e=>{"use strict";var t=e.i(271645);let n="u">typeof document?t.useLayoutEffect:()=>{};e.s(["useIsoLayoutEffect",0,n])},828918,e=>{"use strict";var t=e.i(388940);function n(){return{callback:null,cleanup:null,refs:[]}}function i(e,t){if(e.refs=t,t.every(e=>null==e)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){let i=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let r=t[e];if(null!=r)switch(typeof r){case"function":{let t=r(n);"function"==typeof t&&(i[e]=t);break}case"object":r.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(null!=n)switch(typeof n){case"function":{let t=i[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}e.s(["useMergedRefs",0,function(e,r,s,o){var a,l,u,c,d;let f=(0,t.useRefWithInit)(n).current;return a=f,l=e,u=r,c=s,d=o,(a.refs[0]!==l||a.refs[1]!==u||a.refs[2]!==c||a.refs[3]!==d)&&i(f,[e,r,s,o]),f.callback},"useMergedRefsN",0,function(e){var r,s;let o=(0,t.useRefWithInit)(n).current;return r=o,s=e,(r.refs.length!==s.length||r.refs.some((e,t)=>e!==s[t]))&&i(o,e),o.callback}])},626300,e=>{"use strict";var t=e.i(271645),n=e.i(956789);e.s(["useOnMount",0,function(e){t.useEffect(e,n.EMPTY_ARRAY)}])},388940,e=>{"use strict";var t=e.i(271645);let n={};e.s(["useRefWithInit",0,function(e,i){let r=t.useRef(n);return r.current===n&&(r.current=e(i)),r}])},667865,e=>{"use strict";e.i(247167);var t=e.i(214553),n=e.i(388940);let i=t.SafeReact.useInsertionEffect,r=i&&i!==t.SafeReact.useLayoutEffect?i:e=>e();function s(){let e={next:void 0,callback:o,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function o(){}e.s(["useStableCallback",0,function(e){let t=(0,n.useRefWithInit)(s).current;return t.next=e,r(t.effect),t.trampoline}])},439957,e=>{"use strict";var t=e.i(388940),n=e.i(626300);class i{static create(){return new i}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}e.s(["Timeout",0,i,"useTimeout",0,function(){let e=(0,t.useRefWithInit)(i.create).current;return(0,n.useOnMount)(e.disposeEffect),e}])},446265,e=>{"use strict";var t=e.i(146376),n=e.i(388940);function i(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}e.s(["useValueAsRef",0,function(e){let r=(0,n.useRefWithInit)(i,e).current;return r.next=e,(0,t.useIsoLayoutEffect)(r.effect),r}])},502077,e=>{"use strict";let t={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},n={...t,position:"fixed",top:0,left:0},i={...t,position:"absolute"};e.s(["visuallyHidden",0,n,"visuallyHiddenInput",0,i])},69415,e=>{"use strict";e.s(["warn",0,function(){}],69415)},953760,258950,e=>{"use strict";var t=e.i(343084);function n(e,n,i){let r,{reference:s,floating:o}=e,a=(0,t.getSideAxis)(n),l=(0,t.getAlignmentAxis)(n),u=(0,t.getAxisLength)(l),c=(0,t.getSide)(n),d=s.x+s.width/2-o.width/2,f=s.y+s.height/2-o.height/2,p=s[u]/2-o[u]/2;switch(c){case"top":r={x:d,y:s.y-o.height};break;case"bottom":r={x:d,y:s.y+s.height};break;case"right":r={x:s.x+s.width,y:f};break;case"left":r={x:s.x-o.width,y:f};break;default:r={x:s.x,y:s.y}}let m=(0,t.getAlignment)(n);return m&&(r[l]+=p*("end"===m?1:-1)*(i&&"y"===a?-1:1)),r}async function i(e,n){var i;void 0===n&&(n={});let{x:r,y:s,platform:o,rects:a,elements:l,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=(0,t.evaluate)(n,e),g=(0,t.getPaddingObject)(m),h=l[p?"floating"===f?"reference":"floating":f],v=(0,t.rectToClientRect)(await o.getClippingRect({element:null==(i=await (null==o.isElement?void 0:o.isElement(h)))||i?h:h.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:u})),y="floating"===f?{x:r,y:s,width:a.floating.width,height:a.floating.height}:a.reference,b=await (null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),x=await (null==o.isElement?void 0:o.isElement(b))&&await (null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},w=(0,t.rectToClientRect)(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:b,strategy:u}):y);return{top:(v.top-w.top+g.top)/x.y,bottom:(w.bottom-v.bottom+g.bottom)/x.y,left:(v.left-w.left+g.left)/x.x,right:(w.right-v.right+g.right)/x.x}}let r=async(e,t,r)=>{let{placement:s="bottom",strategy:o="absolute",middleware:a=[],platform:l}=r,u=l.detectOverflow?l:{...l,detectOverflow:i},c=await (null==l.isRTL?void 0:l.isRTL(t)),d=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=n(d,s,c),m=s,g=0,h={};for(let i=0;i<a.length;i++){let r=a[i];if(!r)continue;let{name:v,fn:y}=r,{x:b,y:x,data:w,reset:E}=await y({x:f,y:p,initialPlacement:s,placement:m,strategy:o,middlewareData:h,rects:d,platform:u,elements:{reference:e,floating:t}});f=null!=b?b:f,p=null!=x?x:p,h[v]={...h[v],...w},E&&g<50&&(g++,"object"==typeof E&&(E.placement&&(m=E.placement),E.rects&&(d=!0===E.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:p}=n(d,m,c)),i=-1)}return{x:f,y:p,placement:m,strategy:o,middlewareData:h}};function s(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function o(e){return t.sides.some(t=>e[t]>=0)}function a(e){let n=(0,t.min)(...e.map(e=>e.left)),i=(0,t.min)(...e.map(e=>e.top));return{x:n,y:i,width:(0,t.max)(...e.map(e=>e.right))-n,height:(0,t.max)(...e.map(e=>e.bottom))-i}}let l=new Set(["left","top"]);async function u(e,n){let{placement:i,platform:r,elements:s}=e,o=await (null==r.isRTL?void 0:r.isRTL(s.floating)),a=(0,t.getSide)(i),u=(0,t.getAlignment)(i),c="y"===(0,t.getSideAxis)(i),d=l.has(a)?-1:1,f=o&&c?-1:1,p=(0,t.evaluate)(n,e),{mainAxis:m,crossAxis:g,alignmentAxis:h}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&"number"==typeof h&&(g="end"===u?-1*h:h),c?{x:g*f,y:m*d}:{x:m*d,y:g*f}}var c=e.i(229315);function d(e){let n=(0,c.getComputedStyle)(e),i=parseFloat(n.width)||0,r=parseFloat(n.height)||0,s=(0,c.isHTMLElement)(e),o=s?e.offsetWidth:i,a=s?e.offsetHeight:r,l=(0,t.round)(i)!==o||(0,t.round)(r)!==a;return l&&(i=o,r=a),{width:i,height:r,$:l}}function f(e){return(0,c.isElement)(e)?e:e.contextElement}function p(e){let n=f(e);if(!(0,c.isHTMLElement)(n))return(0,t.createCoords)(1);let i=n.getBoundingClientRect(),{width:r,height:s,$:o}=d(n),a=(o?(0,t.round)(i.width):i.width)/r,l=(o?(0,t.round)(i.height):i.height)/s;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}let m=(0,t.createCoords)(0);function g(e){let t=(0,c.getWindow)(e);return(0,c.isWebKit)()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:m}function h(e,n,i,r){var s;void 0===n&&(n=!1),void 0===i&&(i=!1);let o=e.getBoundingClientRect(),a=f(e),l=(0,t.createCoords)(1);n&&(r?(0,c.isElement)(r)&&(l=p(r)):l=p(e));let u=(void 0===(s=i)&&(s=!1),r&&s&&r===(0,c.getWindow)(a))?g(a):(0,t.createCoords)(0),d=(o.left+u.x)/l.x,m=(o.top+u.y)/l.y,h=o.width/l.x,v=o.height/l.y;if(a&&r){let e=(0,c.getWindow)(a),t=(0,c.isElement)(r)?(0,c.getWindow)(r):r,n=e,i=(0,c.getFrameElement)(n);for(;i&&t!==n;){let e=p(i),t=i.getBoundingClientRect(),r=(0,c.getComputedStyle)(i),s=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;d*=e.x,m*=e.y,h*=e.x,v*=e.y,d+=s,m+=o,n=(0,c.getWindow)(i),i=(0,c.getFrameElement)(n)}}return(0,t.rectToClientRect)({width:h,height:v,x:d,y:m})}function v(e,t){let n=(0,c.getNodeScroll)(e).scrollLeft;return t?t.left+n:h((0,c.getDocumentElement)(e)).left+n}function y(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-v(e,n),y:n.top+t.scrollTop}}function b(e,n,i){var r;let s;if("viewport"===n||"layoutViewport"===n)s=function(e,t,n){void 0===n&&(n="viewport");let i="layoutViewport"===n,r=(0,c.getWindow)(e),s=(0,c.getDocumentElement)(e),o=r.visualViewport,a=s.clientWidth,l=s.clientHeight,u=0,d=0;if(o){let e=!(0,c.isWebKit)()||"fixed"===t;i?e||(u=-o.offsetLeft,d=-o.offsetTop):(a=o.width,l=o.height,e&&(u=o.offsetLeft,d=o.offsetTop))}if(0>=v(s)){let e=s.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,r=Math.abs(s.clientWidth-t.clientWidth-i),o="stable both-edges"===getComputedStyle(s).scrollbarGutter?r/2:r;o<=25&&(a-=o)}return{width:a,height:l,x:u,y:d}}(e,i,n);else if("document"===n){let n,i,o,a,l,u;r=(0,c.getDocumentElement)(e),n=(0,c.getNodeScroll)(r),i=r.ownerDocument.body,o=(0,t.max)(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),a=(0,t.max)(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight),l=-n.scrollLeft+v(r),u=-n.scrollTop,"rtl"===(0,c.getComputedStyle)(i).direction&&(l+=(0,t.max)(r.clientWidth,i.clientWidth)-o),s={width:o,height:a,x:l,y:u}}else if((0,c.isElement)(n)){let e,t,r,o,a,l;t=(e=h(n,!0,"fixed"===i)).top+n.clientTop,r=e.left+n.clientLeft,o=p(n),a=n.clientWidth*o.x,l=n.clientHeight*o.y,s={width:a,height:l,x:r*o.x,y:t*o.y}}else{let t=g(e);s={x:n.x-t.x,y:n.y-t.y,width:n.width,height:n.height}}return(0,t.rectToClientRect)(s)}function x(e){return"static"===(0,c.getComputedStyle)(e).position}function w(e,t){if(!(0,c.isHTMLElement)(e)||"fixed"===(0,c.getComputedStyle)(e).position)return null;if(t)return t(e);let n=e.offsetParent;return(0,c.getDocumentElement)(e)===n&&(n=n.ownerDocument.body),n}function E(e,t){let n=(0,c.getWindow)(e);if((0,c.isTopLayer)(e))return n;if(!(0,c.isHTMLElement)(e)){let t=(0,c.getParentNode)(e);for(;t&&!(0,c.isLastTraversableNode)(t);){if((0,c.isElement)(t)&&!x(t))return t;t=(0,c.getParentNode)(t)}return n}let i=w(e,t);for(;i&&(0,c.isTableElement)(i)&&x(i);)i=w(i,t);return i&&(0,c.isLastTraversableNode)(i)&&x(i)&&!(0,c.isContainingBlock)(i)?n:i||(0,c.getContainingBlock)(e)||n}let T=async function(e){let n=this.getOffsetParent||E,i=this.getDimensions,r=await i(e.floating);return{reference:function(e,n,i){let r=(0,c.isHTMLElement)(n),s=(0,c.getDocumentElement)(n),o="fixed"===i,a=h(e,!0,o,n),l={scrollLeft:0,scrollTop:0},u=(0,t.createCoords)(0);if((r||!o)&&(("body"!==(0,c.getNodeName)(n)||(0,c.isOverflowElement)(s))&&(l=(0,c.getNodeScroll)(n)),r)){let e=h(n,!0,o,n);u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}!r&&s&&(u.x=v(s));let d=!s||r||o?(0,t.createCoords)(0):y(s,l);return{x:a.left+l.scrollLeft-u.x-d.x,y:a.top+l.scrollTop-u.y-d.y,width:a.width,height:a.height}}(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},S={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:n,rect:i,offsetParent:r,strategy:s}=e,o="fixed"===s,a=(0,c.getDocumentElement)(r),l=!!n&&(0,c.isTopLayer)(n.floating);if(r===a||l&&o)return i;let u={scrollLeft:0,scrollTop:0},d=(0,t.createCoords)(1),f=(0,t.createCoords)(0),m=(0,c.isHTMLElement)(r);if((m||!o)&&(("body"!==(0,c.getNodeName)(r)||(0,c.isOverflowElement)(a))&&(u=(0,c.getNodeScroll)(r)),m)){let e=h(r);d=p(r),f.x=e.x+r.clientLeft,f.y=e.y+r.clientTop}let g=!a||m||o?(0,t.createCoords)(0):y(a,u);return{width:i.width*d.x,height:i.height*d.y,x:i.x*d.x-u.scrollLeft*d.x+f.x+g.x,y:i.y*d.y-u.scrollTop*d.y+f.y+g.y}},getDocumentElement:c.getDocumentElement,getClippingRect:function(e){let{element:n,boundary:i,rootBoundary:r,strategy:s}=e,o=[..."clippingAncestors"===i?(0,c.isTopLayer)(n)?[]:function(e,t){let n=t.get(e);if(n)return n;let i=(0,c.getOverflowAncestors)(e,[],!1).filter(e=>(0,c.isElement)(e)&&"body"!==(0,c.getNodeName)(e)),r=null,s="fixed"===(0,c.getComputedStyle)(e).position,o=s?(0,c.getParentNode)(e):e;for(;(0,c.isElement)(o)&&!(0,c.isLastTraversableNode)(o);){let e=(0,c.getComputedStyle)(o),t=(0,c.isContainingBlock)(o),n=r?r.position:s?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?r=e:i=i.filter(e=>e!==o),o=(0,c.getParentNode)(o)}return t.set(e,i),i}(n,this._c):[].concat(i),r],a=b(n,o[0],s),l=a.top,u=a.right,d=a.bottom,f=a.left;for(let e=1;e<o.length;e++){let i=b(n,o[e],s);l=(0,t.max)(i.top,l),u=(0,t.min)(i.right,u),d=(0,t.min)(i.bottom,d),f=(0,t.max)(i.left,f)}return{width:u-f,height:d-l,x:f,y:l}},getOffsetParent:E,getElementRects:T,getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:n}=d(e);return{width:t,height:n}},getScale:p,isElement:c.isElement,isRTL:function(e){return"rtl"===(0,c.getComputedStyle)(e).direction}};function R(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let C=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,i;let{x:r,y:s,placement:o,middlewareData:a}=t,l=await u(t,e);return o===(null==(n=a.offset)?void 0:n.placement)&&null!=(i=a.arrow)&&i.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:o}}}}},A=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(n){let{x:i,y:r,placement:s,platform:o}=n,{mainAxis:a=!0,crossAxis:l=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=(0,t.evaluate)(e,n),d={x:i,y:r},f=await o.detectOverflow(n,c),p=(0,t.getSideAxis)(s),m=(0,t.getOppositeAxis)(p),g=d[m],h=d[p],v=(e,n)=>(0,t.clamp)(n+f["y"===e?"top":"left"],n,n-f["y"===e?"bottom":"right"]);a&&(g=v(m,g)),l&&(h=v(p,h));let y=u.fn({...n,[m]:g,[p]:h});return{...y,data:{x:y.x-i,y:y.y-r,enabled:{[m]:a,[p]:l}}}}}},P=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(n){var i,r,s,o,a;let{placement:l,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,{mainAxis:m=!0,crossAxis:g=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,...x}=(0,t.evaluate)(e,n);if(null!=(i=u.arrow)&&i.alignmentOffset)return{};let w=(0,t.getSide)(l),E=(0,t.getSideAxis)(d),T=(0,t.getSide)(d)===d,S=await (null==f.isRTL?void 0:f.isRTL(p.floating)),R=h||(T||!b?[(0,t.getOppositePlacement)(d)]:(0,t.getExpandedPlacements)(d)),C="none"!==y;!h&&C&&R.push(...(0,t.getOppositeAxisPlacements)(d,b,y,S));let A=[d,...R],P=await f.detectOverflow(n,x),O=[],k=(null==(r=u.flip)?void 0:r.overflows)||[];if(m&&O.push(P[w]),g){let e=(0,t.getAlignmentSides)(l,c,S);O.push(P[e[0]],P[e[1]])}if(k=[...k,{placement:l,overflows:O}],!O.every(e=>e<=0)){let e=((null==(s=u.flip)?void 0:s.index)||0)+1,n=A[e];if(n&&("alignment"!==g||E===(0,t.getSideAxis)(n)||k.every(e=>(0,t.getSideAxis)(e.placement)!==E||e.overflows[0]>0)))return{data:{index:e,overflows:k},reset:{placement:n}};let i=null==(o=k.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!i)switch(v){case"bestFit":{let e=null==(a=k.filter(e=>{if(C){let n=(0,t.getSideAxis)(e.placement);return n===E||"y"===n}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(i=e);break}case"initialPlacement":i=d}if(l!==i)return{reset:{placement:i}}}return{}}}},O=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(n){let i,r,{placement:s,rects:o,platform:a,elements:l}=n,{apply:u=()=>{},...c}=(0,t.evaluate)(e,n),d=await a.detectOverflow(n,c),f=(0,t.getSide)(s),p=(0,t.getAlignment)(s),m="y"===(0,t.getSideAxis)(s),{width:g,height:h}=o.floating;"top"===f||"bottom"===f?(i=f,r=p===(await (null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(r=f,i="end"===p?"top":"bottom");let v=h-d.top-d.bottom,y=g-d.left-d.right,b=(0,t.min)(h-d[i],v),x=(0,t.min)(g-d[r],y),w=n.middlewareData.shift,E=!w,T=b,S=x;null!=w&&w.enabled.x&&(S=y),null!=w&&w.enabled.y&&(T=v),E&&!p&&(m?S=g-2*(0,t.max)(d.left,d.right):T=h-2*(0,t.max)(d.top,d.bottom)),await u({...n,availableWidth:S,availableHeight:T});let R=await a.getDimensions(l.floating);return g!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}},k=function(e){return void 0===e&&(e={}),{options:e,fn(n){var i,r,s,o;let{x:a,y:u,placement:c,rects:d,middlewareData:f}=n,{offset:p=0,mainAxis:m=!0,crossAxis:g=!0}=(0,t.evaluate)(e,n),h={x:a,y:u},v=(0,t.getSideAxis)(c),y=(0,t.getOppositeAxis)(v),b=h[y],x=h[v],w=(0,t.evaluate)(p,n),E="number"==typeof w?{mainAxis:w,crossAxis:0}:{mainAxis:null!=(i=w.mainAxis)?i:0,crossAxis:null!=(r=w.crossAxis)?r:0};if(m){let e="y"===y?"height":"width",t=d.reference[y]-d.floating[e]+E.mainAxis,n=d.reference[y]+d.reference[e]-E.mainAxis;b<t?b=t:b>n&&(b=n)}if(g){let e="y"===y?"width":"height",n=l.has((0,t.getSide)(c)),i=d.reference[v]-d.floating[e]+(n&&(null==(s=f.offset)?void 0:s[v])||0)+(n?0:E.crossAxis),r=d.reference[v]+d.reference[e]+(n?0:(null==(o=f.offset)?void 0:o[v])||0)-(n?E.crossAxis:0);x<i?x=i:x>r&&(x=r)}return{[y]:b,[v]:x}}}},I=(e,t,n)=>{let i=new Map,s=null!=n?n:{},o={...S,...s.platform,_c:i};return r(e,t,{...s,platform:o})};e.s(["arrow",0,e=>({name:"arrow",options:e,async fn(n){let{x:i,y:r,placement:s,rects:o,platform:a,elements:l,middlewareData:u}=n,{element:c,padding:d=0}=(0,t.evaluate)(e,n)||{};if(null==c)return{};let f=(0,t.getPaddingObject)(d),p={x:i,y:r},m=(0,t.getAlignmentAxis)(s),g=(0,t.getAxisLength)(m),h=await a.getDimensions(c),v="y"===m,y=v?"clientHeight":"clientWidth",b=o.reference[g]+o.reference[m]-p[m]-o.floating[g],x=p[m]-o.reference[m],w=await (null==a.getOffsetParent?void 0:a.getOffsetParent(c)),E=w?w[y]:0;E&&await (null==a.isElement?void 0:a.isElement(w))||(E=l.floating[y]||o.floating[g]);let T=E/2-h[g]/2-1,S=(0,t.min)(f[v?"top":"left"],T),R=(0,t.min)(f[v?"bottom":"right"],T),C=E-h[g]-R,A=E/2-h[g]/2+(b/2-x/2),P=(0,t.clamp)(S,A,C),O=!u.arrow&&null!=(0,t.getAlignment)(s)&&A!==P&&o.reference[g]/2-(A<S?S:R)-h[g]/2<0,k=O?A<S?A-S:A-C:0;return{[m]:p[m]+k,data:{[m]:P,centerOffset:A-P-k,...O&&{alignmentOffset:k}},reset:O}}}),"autoPlacement",0,function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(n){var i,r,s,o;let{rects:a,middlewareData:l,placement:u,platform:c,elements:d}=n,{crossAxis:f=!1,alignment:p,allowedPlacements:m=t.placements,autoAlignment:g=!0,...h}=(0,t.evaluate)(e,n),v=void 0!==p||m===t.placements?((o=p||null)?[...m.filter(e=>(0,t.getAlignment)(e)===o),...m.filter(e=>(0,t.getAlignment)(e)!==o)]:m.filter(e=>(0,t.getSide)(e)===e)).filter(e=>!o||(0,t.getAlignment)(e)===o||!!g&&(0,t.getOppositeAlignmentPlacement)(e)!==e):m,y=(null==(i=l.autoPlacement)?void 0:i.index)||0,b=v[y];if(null==b)return{};if(u!==b)return{reset:{placement:v[0]}};let x=await c.detectOverflow(n,h),w=(0,t.getAlignmentSides)(b,a,await (null==c.isRTL?void 0:c.isRTL(d.floating))),E=[x[(0,t.getSide)(b)],x[w[0]],x[w[1]]],T=[...(null==(r=l.autoPlacement)?void 0:r.overflows)||[],{placement:b,overflows:E}],S=v[y+1];if(S)return{data:{index:y+1,overflows:T},reset:{placement:S}};let R=T.map(e=>{let n=(0,t.getAlignment)(e.placement);return[e.placement,n&&f?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),C=(null==(s=R.filter(e=>e[2].slice(0,(0,t.getAlignment)(e[0])?2:3).every(e=>e<=0))[0])?void 0:s[0])||R[0][0];return C!==u?{data:{index:y+1,overflows:T},reset:{placement:C}}:{}}}},"autoUpdate",0,function(e,n,i,r){let s;void 0===r&&(r={});let{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:d=!1}=r,p=f(e),m=o||a?[...p?(0,c.getOverflowAncestors)(p):[],...n?(0,c.getOverflowAncestors)(n):[]]:[];m.forEach(e=>{o&&e.addEventListener("scroll",i),a&&e.addEventListener("resize",i)});let g=p&&u?function(e,n,i){let r,s=null,o=(0,c.getDocumentElement)(e);function a(){var e;clearTimeout(r),null==(e=s)||e.disconnect(),s=null}function l(i,u){void 0===i&&(i=!1),void 0===u&&(u=1),a();let c=e.getBoundingClientRect(),{left:d,top:f,width:p,height:m}=c;if(i||n(),!p||!m)return;let g={rootMargin:-(0,t.floor)(f)+"px "+-(0,t.floor)(o.clientWidth-(d+p))+"px "+-(0,t.floor)(o.clientHeight-(f+m))+"px "+-(0,t.floor)(d)+"px",threshold:(0,t.max)(0,(0,t.min)(1,u))||1},h=!0;function v(t){let n=t[0].intersectionRatio;if(!R(c,e.getBoundingClientRect()))return l();if(n!==u){if(!h)return l();n?l(!1,n):r=setTimeout(()=>{l(!1,1e-7)},1e3)}h=!1}try{s=new IntersectionObserver(v,{...g,root:o.ownerDocument})}catch(e){s=new IntersectionObserver(v,g)}s.observe(e)}let u=(0,c.getWindow)(e),d=()=>l(i);return u.addEventListener("resize",d),l(!0),()=>{u.removeEventListener("resize",d),a()}}(p,i,a):null,v=-1,y=null;l&&(y=new ResizeObserver(e=>{let[t]=e;t&&t.target===p&&y&&n&&(y.unobserve(n),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(n)})),i()}),p&&!d&&y.observe(p),n&&y.observe(n));let b=d?h(e):null;return d&&function t(){let n=h(e);b&&!R(b,n)&&i(),b=n,s=requestAnimationFrame(t)}(),i(),()=>{var e;m.forEach(e=>{o&&e.removeEventListener("scroll",i),a&&e.removeEventListener("resize",i)}),null==g||g(),null==(e=y)||e.disconnect(),y=null,d&&cancelAnimationFrame(s)}},"computePosition",0,I,"flip",0,P,"hide",0,function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(n){let{rects:i,platform:r}=n,{strategy:a="referenceHidden",...l}=(0,t.evaluate)(e,n);switch(a){case"referenceHidden":{let e=s(await r.detectOverflow(n,{...l,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:o(e)}}}case"escaped":{let e=s(await r.detectOverflow(n,{...l,altBoundary:!0}),i.floating);return{data:{escapedOffsets:e,escaped:o(e)}}}default:return{}}}}},"inline",0,function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(n){let{placement:i,elements:r,rects:s,platform:o,strategy:l}=n,{padding:u=2,x:c,y:d}=(0,t.evaluate)(e,n),f=Array.from(await (null==o.getClientRects?void 0:o.getClientRects(r.reference))||[]);if(!f.length)return{};let p=function(e){let n=e.slice().sort((e,t)=>e.y-t.y),i=[],r=null;for(let e=0;e<n.length;e++){let t=n[e];!r||t.y-r.y>r.height/2?i.push([t]):i[i.length-1].push(t),r=t}return i.map(e=>(0,t.rectToClientRect)(a(e)))}(f),m=(0,t.rectToClientRect)(a(f)),g=(0,t.getPaddingObject)(u),h=await o.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&(p[0].left>p[1].right||p[1].left>p[0].right)&&null!=c&&null!=d)return p.find(e=>c>e.left-g.left&&c<e.right+g.right&&d>e.top-g.top&&d<e.bottom+g.bottom)||m;if(p.length>=2){if("y"===(0,t.getSideAxis)(i)){let e=p[0],n=p[p.length-1],r="top"===(0,t.getSide)(i),s=e.top,o=n.bottom,a=r?e.left:n.left,l=r?e.right:n.right;return(0,t.rectToClientRect)({x:a,y:s,width:l-a,height:o-s})}let e="left"===(0,t.getSide)(i),n=(0,t.max)(...p.map(e=>e.right)),r=(0,t.min)(...p.map(e=>e.left)),s=p.filter(t=>e?t.left===r:t.right===n),o=s[0].top,a=s[s.length-1].bottom;return(0,t.rectToClientRect)({x:r,y:o,width:n-r,height:a-o})}return m}},floating:r.floating,strategy:l});return s.reference.x!==h.reference.x||s.reference.y!==h.reference.y||s.reference.width!==h.reference.width||s.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},"limitShift",0,k,"offset",0,C,"shift",0,A,"size",0,O],953760);var L=e.i(271645),M=e.i(174080),N="u">typeof document?L.useLayoutEffect:function(){};function D(e,t){let n,i,r;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(i=n;0!=i--;)if(!D(e[i],t[i]))return!1;return!0}if((n=(r=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(i=n;0!=i--;)if(!({}).hasOwnProperty.call(t,r[i]))return!1;for(i=n;0!=i--;){let n=r[i];if(("_owner"!==n||!e.$$typeof)&&!D(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function F(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function j(e,t){let n=F(e);return Math.round(t*n)/n}function _(e){let t=L.useRef(e);return N(()=>{t.current=e}),t}e.s(["flip",0,(e,t)=>{let n=P(e);return{name:n.name,fn:n.fn,options:[e,t]}},"limitShift",0,(e,t)=>({fn:k(e).fn,options:[e,t]}),"offset",0,(e,t)=>{let n=C(e);return{name:n.name,fn:n.fn,options:[e,t]}},"shift",0,(e,t)=>{let n=A(e);return{name:n.name,fn:n.fn,options:[e,t]}},"size",0,(e,t)=>{let n=O(e);return{name:n.name,fn:n.fn,options:[e,t]}},"useFloating",0,function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=L.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=L.useState(i);D(f,i)||p(i);let[m,g]=L.useState(null),[h,v]=L.useState(null),y=L.useCallback(e=>{e!==E.current&&(E.current=e,g(e))},[]),b=L.useCallback(e=>{e!==T.current&&(T.current=e,v(e))},[]),x=s||m,w=o||h,E=L.useRef(null),T=L.useRef(null),S=L.useRef(c),R=null!=l,C=_(l),A=_(r),P=_(u),O=L.useCallback(()=>{if(!E.current||!T.current)return;let e={placement:t,strategy:n,middleware:f};A.current&&(e.platform=A.current),I(E.current,T.current,e).then(e=>{let t={...e,isPositioned:!1!==P.current};k.current&&!D(S.current,t)&&(S.current=t,M.flushSync(()=>{d(t)}))})},[f,t,n,A,P]);N(()=>{!1===u&&S.current.isPositioned&&(S.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);let k=L.useRef(!1);N(()=>(k.current=!0,()=>{k.current=!1}),[]),N(()=>{if(x&&(E.current=x),w&&(T.current=w),x&&w){if(C.current)return C.current(x,w,O);O()}},[x,w,O,C,R]);let W=L.useMemo(()=>({reference:E,floating:T,setReference:y,setFloating:b}),[y,b]),V=L.useMemo(()=>({reference:x,floating:w}),[x,w]),H=L.useMemo(()=>{let e={position:n,left:0,top:0};if(!V.floating)return e;let t=j(V.floating,c.x),i=j(V.floating,c.y);return a?{...e,transform:"translate("+t+"px, "+i+"px)",...F(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:i}},[n,a,V.floating,c.x,c.y]);return L.useMemo(()=>({...c,update:O,refs:W,elements:V,floatingStyles:H}),[c,O,W,V,H])}],258950)},229315,e=>{"use strict";let t;function n(){return"u">typeof window}function i(e){return o(e)?(e.nodeName||"").toLowerCase():"#document"}function r(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function s(e){var t;return null==(t=(o(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function o(e){return!!n()&&(e instanceof Node||e instanceof r(e).Node)}function a(e){return!!n()&&(e instanceof Element||e instanceof r(e).Element)}function l(e){return!!n()&&(e instanceof HTMLElement||e instanceof r(e).HTMLElement)}function u(e){return!(!n()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof r(e).ShadowRoot)}function c(e){let{overflow:t,overflowX:n,overflowY:i,display:r}=y(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&"inline"!==r&&"contents"!==r}function d(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let f=/transform|translate|scale|rotate|perspective|filter/,p=/paint|layout|strict|content/,m=e=>!!e&&"none"!==e;function g(e){let t=a(e)?y(e):e;return m(t.transform)||m(t.translate)||m(t.scale)||m(t.rotate)||m(t.perspective)||!h()&&(m(t.backdropFilter)||m(t.filter))||f.test(t.willChange||"")||p.test(t.contain||"")}function h(){return null==t&&(t="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),t}function v(e){return/^(html|body|#document)$/.test(i(e))}function y(e){return r(e).getComputedStyle(e)}function b(e){if("html"===i(e))return e;let t=e.assignedSlot||e.parentNode||u(e)&&e.host||s(e);return u(t)?t.host:t}function x(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}e.s(["getComputedStyle",0,y,"getContainingBlock",0,function(e){let t=b(e);for(;l(t)&&!v(t);){if(g(t))return t;if(d(t))break;t=b(t)}return null},"getDocumentElement",0,s,"getFrameElement",0,x,"getNodeName",0,i,"getNodeScroll",0,function(e){return a(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}},"getOverflowAncestors",0,function e(t,n,i){var s;void 0===n&&(n=[]),void 0===i&&(i=!0);let o=function e(t){let n=b(t);return v(n)?(t.ownerDocument||t).body:l(n)&&c(n)?n:e(n)}(t),a=o===(null==(s=t.ownerDocument)?void 0:s.body),u=r(o);if(!a)return n.concat(o,e(o,[],i));{let t=x(u);return n.concat(u,u.visualViewport||[],c(o)?o:[],t&&i?e(t):[])}},"getParentNode",0,b,"getWindow",0,r,"isContainingBlock",0,g,"isElement",0,a,"isHTMLElement",0,l,"isLastTraversableNode",0,v,"isNode",0,o,"isOverflowElement",0,c,"isShadowRoot",0,u,"isTableElement",0,function(e){return/^(table|td|th)$/.test(i(e))},"isTopLayer",0,d,"isWebKit",0,h])},333848,e=>{"use strict";var t=e.i(229315);e.s(["ownerWindow",()=>t.getWindow])},343084,e=>{"use strict";let t=["top","right","bottom","left"],n=t.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]),i=Math.min,r=Math.max,s=Math.round,o=Math.floor,a={left:"right",right:"left",bottom:"top",top:"bottom"};function l(e){return e.split("-")[0]}function u(e){return e.split("-")[1]}function c(e){return"x"===e?"y":"x"}function d(e){return"y"===e?"height":"width"}function f(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function p(e){return c(f(e))}function m(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let g=["left","right"],h=["right","left"],v=["top","bottom"],y=["bottom","top"];function b(e){let t=l(e);return a[t]+e.slice(t.length)}e.s(["clamp",0,function(e,t,n){return r(e,i(t,n))},"createCoords",0,e=>({x:e,y:e}),"evaluate",0,function(e,t){return"function"==typeof e?e(t):e},"floor",0,o,"getAlignment",0,u,"getAlignmentAxis",0,p,"getAlignmentSides",0,function(e,t,n){void 0===n&&(n=!1);let i=u(e),r=p(e),s=d(r),o="x"===r?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=b(o)),[o,b(o)]},"getAxisLength",0,d,"getExpandedPlacements",0,function(e){let t=b(e);return[m(e),t,m(t)]},"getOppositeAlignmentPlacement",0,m,"getOppositeAxis",0,c,"getOppositeAxisPlacements",0,function(e,t,n,i){let r=u(e),s=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?h:g;return t?g:h;case"left":case"right":return t?v:y;default:return[]}}(l(e),"start"===n,i);return r&&(s=s.map(e=>e+"-"+r),t&&(s=s.concat(s.map(m)))),s},"getOppositePlacement",0,b,"getPaddingObject",0,function(e){var t,n,i,r;return"number"!=typeof e?{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(i=e.bottom)?i:0,left:null!=(r=e.left)?r:0}:{top:e,right:e,bottom:e,left:e}},"getSide",0,l,"getSideAxis",0,f,"max",0,r,"min",0,i,"placements",0,n,"rectToClientRect",0,function(e){let{x:t,y:n,width:i,height:r}=e;return{width:i,height:r,top:n,left:t,right:t+i,bottom:n+r,x:t,y:n}},"round",0,s,"sides",0,t])},456420,e=>{"use strict";var t=e.i(271645);let n=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},r=(0,t.createContext)({}),s=(0,t.forwardRef)(({color:e,size:s,width:o,height:a,strokeWidth:l,absoluteStrokeWidth:u,nonScalingStroke:c,className:d="",children:f,iconNode:p=[],icon:m={node:p,aliases:[],size:24},...g},h)=>{let{size:v=24,strokeWidth:y=2,absoluteStrokeWidth:b=!1,nonScalingStroke:x=!1,color:w="currentColor",className:E=""}=(0,t.useContext)(r)??{},T=!!f||(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(g),[S,R,C=[]]=function(e,t={}){return function(e,t={}){let r=t.attributeNames??{},s=e=>r[e]??e,o=e.size??e.width??i.width,a=e.size??e.height??i.height,l=e.aliases?.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>`lucide-${e}`)??[],u=[...e.name?[`lucide-${e.name}`]:[],...l],c=t.className?.split(" ").filter(Boolean)??[],d=!1===t.includeDefaultClasses?n(...c):n("lucide",...u,...c),f=t.absoluteStrokeWidth?Number(t.strokeWidth??i["stroke-width"])*Number(e.size??e.width??i.width)/Number(t.size??t.width??i.width):t.strokeWidth??i["stroke-width"];return["svg",{...Object.entries(i).reduce((e,[t,n])=>(e[s(t)]=n,e),{}),..."color"in t&&t.color&&{[s("stroke")]:t.color},..."size"in t&&null!=t.size&&{[s("width")]:t.size,[s("height")]:t.size},..."width"in t&&null!=t.width&&{[s("width")]:t.width},..."height"in t&&null!=t.height&&{[s("height")]:t.height},[s("stroke-width")]:f,...d&&{[s("class")]:d},[s("viewBox")]:`0 0 ${o} ${a}`,...!1===t.hasA11yProp?{[s("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(e=>{let[n,i,r]=e,o=t.nonScalingStroke?{[s("vector-effect")]:"non-scaling-stroke",...i}:i;return r?[n,o,r]:[n,o]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(m,{color:e??w,width:o??s??v,height:a??s??v,strokeWidth:l??y,absoluteStrokeWidth:u??b,nonScalingStroke:c??x,className:n(E,d),hasA11yProp:T,attributes:g});return(0,t.createElement)(S,{ref:h,...R},[...C.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(f)?f:[f]])});e.s(["default",0,function(e,n=[],i=[]){let r,o="string"==typeof e?function(e,t,n=[]){if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:t,...n.length>0?{aliases:n}:{}}}(e,n,i):e,a=(0,t.forwardRef)(({className:e,...n},i)=>(0,t.createElement)(s,{ref:i,icon:o,className:e,...n}));return o.name&&(a.displayName=(r=(e=>{let t="",n=!1;for(let i of e){if("-"===i||"_"===i||i<=" "){n=t.length>0;continue}0===t.length?t+=i.toLowerCase():t+=n?i.toUpperCase():i,n=!1}return t})(o.name)).charAt(0).toUpperCase()+r.slice(1)),a}],456420)},931250,121309,e=>{"use strict";var t=e.i(456420);let n={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};n.node;let i=(0,t.default)(n);e.s(["CircleCheckIcon",0,i],931250);let r={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};r.node;let s=(0,t.default)(r);e.s(["InfoIcon",0,s],121309)},758379,e=>{"use strict";var t=e.i(456420);let n={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};n.node;let i=(0,t.default)(n);e.s(["default",0,i])},534281,e=>{"use strict";var t=e.i(758379);e.s(["Loader2Icon",()=>t.default])},228146,e=>{"use strict";var t=e.i(456420);let n={name:"octagon-x",size:24,node:[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-octagon"]};n.node;let i=(0,t.default)(n);e.s(["OctagonXIcon",0,i],228146)},755566,e=>{"use strict";var t=e.i(456420);let n={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};n.node;let i=(0,t.default)(n);e.s(["default",0,i])},168754,e=>{"use strict";var t=e.i(755566);e.s(["TriangleAlertIcon",()=>t.default])},814387,e=>{"use strict";var t=e.i(456420);let n={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};n.node;let i=(0,t.default)(n);e.s(["default",0,i])},560964,e=>{"use strict";var t=e.i(814387);e.s(["XIcon",()=>t.default])},755838,(e,t,n)=>{"use strict";var i=e.r(271645),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useState,o=i.useEffect,a=i.useLayoutEffect,l=i.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),i=s({inst:{value:n,getSnapshot:t}}),r=i[0].inst,c=i[1];return a(function(){r.value=n,r.getSnapshot=t,u(r)&&c({inst:r})},[e,n,t]),o(function(){return u(r)&&c({inst:r}),e(function(){u(r)&&c({inst:r})})},[e]),l(n),n};n.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:c},802239,(e,t,n)=>{"use strict";e.i(247167),t.exports=e.r(755838)},752822,(e,t,n)=>{"use strict";var i=e.r(271645),r=e.r(802239),s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useSyncExternalStore,a=i.useRef,l=i.useEffect,u=i.useMemo,c=i.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,t,n,i,r){var d=a(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;var p=o(e,(d=u(function(){function e(e){if(!l){if(l=!0,o=e,e=i(e),void 0!==r&&f.hasValue){var t=f.value;if(r(t,e))return a=t}return a=e}if(t=a,s(o,e))return t;var n=i(e);return void 0!==r&&r(t,n)?(o=e,t):(o=e,a=n)}var o,a,l=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,n,i,r]))[0],d[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),c(p),p}},430224,(e,t,n)=>{"use strict";e.i(247167),t.exports=e.r(752822)}]);