@hotmeshio/long-tail 0.9.4 → 0.9.5

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 (165) hide show
  1. package/dashboard/dist/assets/{AdminDashboard-DmQG0fUK.js → AdminDashboard-PvD1IObg.js} +2 -2
  2. package/dashboard/dist/assets/{AdminDashboard-DmQG0fUK.js.map → AdminDashboard-PvD1IObg.js.map} +1 -1
  3. package/dashboard/dist/assets/{AgentConfigPage-BZ8g7Ml8.js → AgentConfigPage-BB9NCIiK.js} +2 -2
  4. package/dashboard/dist/assets/{AgentConfigPage-BZ8g7Ml8.js.map → AgentConfigPage-BB9NCIiK.js.map} +1 -1
  5. package/dashboard/dist/assets/{AgentDetailPage-Cdinl7bx.js → AgentDetailPage-B570UVLx.js} +2 -2
  6. package/dashboard/dist/assets/{AgentDetailPage-Cdinl7bx.js.map → AgentDetailPage-B570UVLx.js.map} +1 -1
  7. package/dashboard/dist/assets/{AgentsPage-GEYMgmez.js → AgentsPage-CgUucHar.js} +2 -2
  8. package/dashboard/dist/assets/{AgentsPage-GEYMgmez.js.map → AgentsPage-CgUucHar.js.map} +1 -1
  9. package/dashboard/dist/assets/AvailableEscalationsPage-B1cCs4jO.js +2 -0
  10. package/dashboard/dist/assets/AvailableEscalationsPage-B1cCs4jO.js.map +1 -0
  11. package/dashboard/dist/assets/{BotPicker-Bpglj7RE.js → BotPicker-CYw4ZeAh.js} +2 -2
  12. package/dashboard/dist/assets/{BotPicker-Bpglj7RE.js.map → BotPicker-CYw4ZeAh.js.map} +1 -1
  13. package/dashboard/dist/assets/{CapabilitiesPage-ARIQzRiq.js → CapabilitiesPage-C8DL3cDA.js} +2 -2
  14. package/dashboard/dist/assets/{CapabilitiesPage-ARIQzRiq.js.map → CapabilitiesPage-C8DL3cDA.js.map} +1 -1
  15. package/dashboard/dist/assets/{CollapsibleSection-BuZl37uS.js → CollapsibleSection-CDdlmdb6.js} +2 -2
  16. package/dashboard/dist/assets/{CollapsibleSection-BuZl37uS.js.map → CollapsibleSection-CDdlmdb6.js.map} +1 -1
  17. package/dashboard/dist/assets/{CountdownTimer-CRK-E2UF.js → CountdownTimer-BrQl3JWm.js} +2 -2
  18. package/dashboard/dist/assets/{CountdownTimer-CRK-E2UF.js.map → CountdownTimer-BrQl3JWm.js.map} +1 -1
  19. package/dashboard/dist/assets/{CredentialsPage-CjBiPahB.js → CredentialsPage-Bt7tQHlp.js} +2 -2
  20. package/dashboard/dist/assets/{CredentialsPage-CjBiPahB.js.map → CredentialsPage-Bt7tQHlp.js.map} +1 -1
  21. package/dashboard/dist/assets/{CronLabel-DTXl2Rgj.js → CronLabel-DbwuLMO0.js} +2 -2
  22. package/dashboard/dist/assets/{CronLabel-DTXl2Rgj.js.map → CronLabel-DbwuLMO0.js.map} +1 -1
  23. package/dashboard/dist/assets/{CustomDurationPicker-qhb23E3p.js → CustomDurationPicker-CKfgf650.js} +2 -2
  24. package/dashboard/dist/assets/{CustomDurationPicker-qhb23E3p.js.map → CustomDurationPicker-CKfgf650.js.map} +1 -1
  25. package/dashboard/dist/assets/{ElapsedCell-BMhamzj3.js → ElapsedCell-CgpTWk8N.js} +2 -2
  26. package/dashboard/dist/assets/{ElapsedCell-BMhamzj3.js.map → ElapsedCell-CgpTWk8N.js.map} +1 -1
  27. package/dashboard/dist/assets/{EscalationListSchemaPage-BEi89A7y.js → EscalationListSchemaPage-CxFxPz4C.js} +2 -2
  28. package/dashboard/dist/assets/{EscalationListSchemaPage-BEi89A7y.js.map → EscalationListSchemaPage-CxFxPz4C.js.map} +1 -1
  29. package/dashboard/dist/assets/{EscalationSchemaPage-9NY4Q4ku.js → EscalationSchemaPage-CXvjwJ_I.js} +2 -2
  30. package/dashboard/dist/assets/{EscalationSchemaPage-9NY4Q4ku.js.map → EscalationSchemaPage-CXvjwJ_I.js.map} +1 -1
  31. package/dashboard/dist/assets/{EscalationsOverview-2VRjFxPV.js → EscalationsOverview-BY4dLou7.js} +2 -2
  32. package/dashboard/dist/assets/{EscalationsOverview-2VRjFxPV.js.map → EscalationsOverview-BY4dLou7.js.map} +1 -1
  33. package/dashboard/dist/assets/{EventTable-hHPNI3Yq.js → EventTable-MFAHeFTY.js} +2 -2
  34. package/dashboard/dist/assets/{EventTable-hHPNI3Yq.js.map → EventTable-MFAHeFTY.js.map} +1 -1
  35. package/dashboard/dist/assets/{GraphInvokePage-B6qAC8zt.js → GraphInvokePage-7T-6qC2N.js} +2 -2
  36. package/dashboard/dist/assets/{GraphInvokePage-B6qAC8zt.js.map → GraphInvokePage-7T-6qC2N.js.map} +1 -1
  37. package/dashboard/dist/assets/{HomePage-DDyQOu57.js → HomePage-1PI7E3sw.js} +2 -2
  38. package/dashboard/dist/assets/{HomePage-DDyQOu57.js.map → HomePage-1PI7E3sw.js.map} +1 -1
  39. package/dashboard/dist/assets/{ListToolbar-BUgEY8Oc.js → ListToolbar-DmRE3_dX.js} +2 -2
  40. package/dashboard/dist/assets/{ListToolbar-BUgEY8Oc.js.map → ListToolbar-DmRE3_dX.js.map} +1 -1
  41. package/dashboard/dist/assets/{McpOverview-DIenRt0e.js → McpOverview-BukcrbtX.js} +2 -2
  42. package/dashboard/dist/assets/{McpOverview-DIenRt0e.js.map → McpOverview-BukcrbtX.js.map} +1 -1
  43. package/dashboard/dist/assets/{McpQueryDetailPage-CxAR4Bpw.js → McpQueryDetailPage-BVx-cGFZ.js} +2 -2
  44. package/dashboard/dist/assets/{McpQueryDetailPage-CxAR4Bpw.js.map → McpQueryDetailPage-BVx-cGFZ.js.map} +1 -1
  45. package/dashboard/dist/assets/{McpQueryPage-CkT4A2c5.js → McpQueryPage-DPXnA6Wa.js} +2 -2
  46. package/dashboard/dist/assets/{McpQueryPage-CkT4A2c5.js.map → McpQueryPage-DPXnA6Wa.js.map} +1 -1
  47. package/dashboard/dist/assets/{McpRunDetailPage-DDiOtG5r.js → McpRunDetailPage-D3dcICPJ.js} +2 -2
  48. package/dashboard/dist/assets/{McpRunDetailPage-DDiOtG5r.js.map → McpRunDetailPage-D3dcICPJ.js.map} +1 -1
  49. package/dashboard/dist/assets/{McpRunsPage-BWe6WVzw.js → McpRunsPage-CzISyj7e.js} +2 -2
  50. package/dashboard/dist/assets/{McpRunsPage-BWe6WVzw.js.map → McpRunsPage-CzISyj7e.js.map} +1 -1
  51. package/dashboard/dist/assets/{OperationsPage-CzJx-zxj.js → OperationsPage-BYth5Dxg.js} +2 -2
  52. package/dashboard/dist/assets/{OperationsPage-CzJx-zxj.js.map → OperationsPage-BYth5Dxg.js.map} +1 -1
  53. package/dashboard/dist/assets/{OperatorDashboard-CVq7V7hE.js → OperatorDashboard-C_bMBGyy.js} +2 -2
  54. package/dashboard/dist/assets/{OperatorDashboard-CVq7V7hE.js.map → OperatorDashboard-C_bMBGyy.js.map} +1 -1
  55. package/dashboard/dist/assets/{ProcessDetailPage-BWVFB-nL.js → ProcessDetailPage-BVR41sYI.js} +2 -2
  56. package/dashboard/dist/assets/{ProcessDetailPage-BWVFB-nL.js.map → ProcessDetailPage-BVR41sYI.js.map} +1 -1
  57. package/dashboard/dist/assets/{ProcessesListPage-kyRO3E9d.js → ProcessesListPage-DAgFK_ln.js} +2 -2
  58. package/dashboard/dist/assets/{ProcessesListPage-kyRO3E9d.js.map → ProcessesListPage-DAgFK_ln.js.map} +1 -1
  59. package/dashboard/dist/assets/{RoleDetailPage-DrSlAQUQ.js → RoleDetailPage-NxT8GaWV.js} +2 -2
  60. package/dashboard/dist/assets/{RoleDetailPage-DrSlAQUQ.js.map → RoleDetailPage-NxT8GaWV.js.map} +1 -1
  61. package/dashboard/dist/assets/{RolesPage-tT21PIEb.js → RolesPage-dRSC725H.js} +2 -2
  62. package/dashboard/dist/assets/{RolesPage-tT21PIEb.js.map → RolesPage-dRSC725H.js.map} +1 -1
  63. package/dashboard/dist/assets/{RunAsSelector-BqhOzi2p.js → RunAsSelector-C36xqdKj.js} +2 -2
  64. package/dashboard/dist/assets/{RunAsSelector-BqhOzi2p.js.map → RunAsSelector-C36xqdKj.js.map} +1 -1
  65. package/dashboard/dist/assets/{StickyPagination-BTDj99Vb.js → StickyPagination-D_HhyJ5V.js} +2 -2
  66. package/dashboard/dist/assets/{StickyPagination-BTDj99Vb.js.map → StickyPagination-D_HhyJ5V.js.map} +1 -1
  67. package/dashboard/dist/assets/{StreamMessageDetail-DjjnJ31Q.js → StreamMessageDetail-C39lLYKC.js} +2 -2
  68. package/dashboard/dist/assets/{StreamMessageDetail-DjjnJ31Q.js.map → StreamMessageDetail-C39lLYKC.js.map} +1 -1
  69. package/dashboard/dist/assets/{SwimlaneTimeline-Db7ATobq.js → SwimlaneTimeline-dlaJS-DC.js} +2 -2
  70. package/dashboard/dist/assets/{SwimlaneTimeline-Db7ATobq.js.map → SwimlaneTimeline-dlaJS-DC.js.map} +1 -1
  71. package/dashboard/dist/assets/{TaskDetailPage-BVlCa-PR.js → TaskDetailPage-DAnT9c0v.js} +2 -2
  72. package/dashboard/dist/assets/{TaskDetailPage-BVlCa-PR.js.map → TaskDetailPage-DAnT9c0v.js.map} +1 -1
  73. package/dashboard/dist/assets/{TasksListPage-PKscNTJs.js → TasksListPage-CkbK3vdj.js} +2 -2
  74. package/dashboard/dist/assets/{TasksListPage-PKscNTJs.js.map → TasksListPage-CkbK3vdj.js.map} +1 -1
  75. package/dashboard/dist/assets/{TimeAgo-CGx_Ffwq.js → TimeAgo-drImakaN.js} +2 -2
  76. package/dashboard/dist/assets/{TimeAgo-CGx_Ffwq.js.map → TimeAgo-drImakaN.js.map} +1 -1
  77. package/dashboard/dist/assets/{TimestampCell-CdD5hp9o.js → TimestampCell-CpWhUW0W.js} +2 -2
  78. package/dashboard/dist/assets/{TimestampCell-CdD5hp9o.js.map → TimestampCell-CpWhUW0W.js.map} +1 -1
  79. package/dashboard/dist/assets/{ToolTestPanel-DWs0DNGB.js → ToolTestPanel-PvMw4dIw.js} +2 -2
  80. package/dashboard/dist/assets/{ToolTestPanel-DWs0DNGB.js.map → ToolTestPanel-PvMw4dIw.js.map} +1 -1
  81. package/dashboard/dist/assets/{TopicDetailPage-BaL3m3yb.js → TopicDetailPage-DQa0EuM9.js} +2 -2
  82. package/dashboard/dist/assets/{TopicDetailPage-BaL3m3yb.js.map → TopicDetailPage-DQa0EuM9.js.map} +1 -1
  83. package/dashboard/dist/assets/{TopicsPage-bFjJUYmO.js → TopicsPage-OzE8IWZf.js} +2 -2
  84. package/dashboard/dist/assets/{TopicsPage-bFjJUYmO.js.map → TopicsPage-OzE8IWZf.js.map} +1 -1
  85. package/dashboard/dist/assets/{UserName-IdFyeFle.js → UserName-B-5Cnap4.js} +2 -2
  86. package/dashboard/dist/assets/{UserName-IdFyeFle.js.map → UserName-B-5Cnap4.js.map} +1 -1
  87. package/dashboard/dist/assets/{WorkflowExecutionPage-DtC-71vO.js → WorkflowExecutionPage-s4H5TnRv.js} +2 -2
  88. package/dashboard/dist/assets/{WorkflowExecutionPage-DtC-71vO.js.map → WorkflowExecutionPage-s4H5TnRv.js.map} +1 -1
  89. package/dashboard/dist/assets/{WorkflowsDashboard-DGtMG5vL.js → WorkflowsDashboard-BqMJDhpp.js} +2 -2
  90. package/dashboard/dist/assets/{WorkflowsDashboard-DGtMG5vL.js.map → WorkflowsDashboard-BqMJDhpp.js.map} +1 -1
  91. package/dashboard/dist/assets/{WorkflowsOverview-BFs-ZSTn.js → WorkflowsOverview-CVd-TybI.js} +2 -2
  92. package/dashboard/dist/assets/{WorkflowsOverview-BFs-ZSTn.js.map → WorkflowsOverview-CVd-TybI.js.map} +1 -1
  93. package/dashboard/dist/assets/{YamlWorkflowDetailPage-6FTLoVfO.js → YamlWorkflowDetailPage-BshuXnvM.js} +2 -2
  94. package/dashboard/dist/assets/{YamlWorkflowDetailPage-6FTLoVfO.js.map → YamlWorkflowDetailPage-BshuXnvM.js.map} +1 -1
  95. package/dashboard/dist/assets/{YamlWorkflowsPage-0Moxrj_c.js → YamlWorkflowsPage-D2LRoAki.js} +2 -2
  96. package/dashboard/dist/assets/{YamlWorkflowsPage-0Moxrj_c.js.map → YamlWorkflowsPage-D2LRoAki.js.map} +1 -1
  97. package/dashboard/dist/assets/{agents-Dpg829fG.js → agents-CqeRO052.js} +2 -2
  98. package/dashboard/dist/assets/{agents-Dpg829fG.js.map → agents-CqeRO052.js.map} +1 -1
  99. package/dashboard/dist/assets/{bots-BiS_mYcH.js → bots-yo56kQZI.js} +2 -2
  100. package/dashboard/dist/assets/{bots-BiS_mYcH.js.map → bots-yo56kQZI.js.map} +1 -1
  101. package/dashboard/dist/assets/{capabilities-Cpe3amV5.js → capabilities-C-LyQnOQ.js} +2 -2
  102. package/dashboard/dist/assets/{capabilities-Cpe3amV5.js.map → capabilities-C-LyQnOQ.js.map} +1 -1
  103. package/dashboard/dist/assets/{controlplane-CjK2cXaD.js → controlplane-cpRK9tBf.js} +2 -2
  104. package/dashboard/dist/assets/{controlplane-CjK2cXaD.js.map → controlplane-cpRK9tBf.js.map} +1 -1
  105. package/dashboard/dist/assets/{escalation-columns-_KrFogWG.js → escalation-columns-CSG3LG3F.js} +2 -2
  106. package/dashboard/dist/assets/{escalation-columns-_KrFogWG.js.map → escalation-columns-CSG3LG3F.js.map} +1 -1
  107. package/dashboard/dist/assets/{index-BFh7zbQF.js → index-B9YOp7_Z.js} +2 -2
  108. package/dashboard/dist/assets/{index-BFh7zbQF.js.map → index-B9YOp7_Z.js.map} +1 -1
  109. package/dashboard/dist/assets/{index-DYcP4jyl.js → index-BJwHI2aX.js} +3 -3
  110. package/dashboard/dist/assets/{index-DYcP4jyl.js.map → index-BJwHI2aX.js.map} +1 -1
  111. package/dashboard/dist/assets/{index-BYpOpKoM.js → index-C15QKc-V.js} +2 -2
  112. package/dashboard/dist/assets/{index-BYpOpKoM.js.map → index-C15QKc-V.js.map} +1 -1
  113. package/dashboard/dist/assets/{index-IHOuIqlt.js → index-CvyZWk2N.js} +2 -2
  114. package/dashboard/dist/assets/{index-IHOuIqlt.js.map → index-CvyZWk2N.js.map} +1 -1
  115. package/dashboard/dist/assets/{index-CTTxpoEl.js → index-D3_Kc337.js} +2 -2
  116. package/dashboard/dist/assets/{index-CTTxpoEl.js.map → index-D3_Kc337.js.map} +1 -1
  117. package/dashboard/dist/assets/{index-Dq5RU7sm.js → index-D9GgDI2q.js} +2 -2
  118. package/dashboard/dist/assets/{index-Dq5RU7sm.js.map → index-D9GgDI2q.js.map} +1 -1
  119. package/dashboard/dist/assets/index-D9I9XhrD.js +5 -0
  120. package/dashboard/dist/assets/index-D9I9XhrD.js.map +1 -0
  121. package/dashboard/dist/assets/{index-Fc1qNrqI.js → index-DNKzmRA3.js} +2 -2
  122. package/dashboard/dist/assets/{index-Fc1qNrqI.js.map → index-DNKzmRA3.js.map} +1 -1
  123. package/dashboard/dist/assets/{index-C42kzl9D.js → index-DQgRu4cd.js} +2 -2
  124. package/dashboard/dist/assets/{index-C42kzl9D.js.map → index-DQgRu4cd.js.map} +1 -1
  125. package/dashboard/dist/assets/{index-Be9bw5cd.js → index-D_FpjN49.js} +2 -2
  126. package/dashboard/dist/assets/{index-Be9bw5cd.js.map → index-D_FpjN49.js.map} +1 -1
  127. package/dashboard/dist/assets/{index-3ewF-RsR.js → index-DpYsAAsj.js} +2 -2
  128. package/dashboard/dist/assets/{index-3ewF-RsR.js.map → index-DpYsAAsj.js.map} +1 -1
  129. package/dashboard/dist/assets/{index-JQCy1mnu.js → index-JMRKuqah.js} +2 -2
  130. package/dashboard/dist/assets/{index-JQCy1mnu.js.map → index-JMRKuqah.js.map} +1 -1
  131. package/dashboard/dist/assets/{index-p85Oqfqc.js → index-d8dDpRIs.js} +2 -2
  132. package/dashboard/dist/assets/{index-p85Oqfqc.js.map → index-d8dDpRIs.js.map} +1 -1
  133. package/dashboard/dist/assets/{knowledge-Bed_1toa.js → knowledge-DSTPZRsM.js} +2 -2
  134. package/dashboard/dist/assets/{knowledge-Bed_1toa.js.map → knowledge-DSTPZRsM.js.map} +1 -1
  135. package/dashboard/dist/assets/{mcp-LRVvEX8W.js → mcp-DPzcauBf.js} +2 -2
  136. package/dashboard/dist/assets/{mcp-LRVvEX8W.js.map → mcp-DPzcauBf.js.map} +1 -1
  137. package/dashboard/dist/assets/{mcp-query-k2J65UbP.js → mcp-query-CYLlRjwY.js} +2 -2
  138. package/dashboard/dist/assets/{mcp-query-k2J65UbP.js.map → mcp-query-CYLlRjwY.js.map} +1 -1
  139. package/dashboard/dist/assets/{pipelines-C9fpHxJR.js → pipelines-BtfaUf7f.js} +2 -2
  140. package/dashboard/dist/assets/{pipelines-C9fpHxJR.js.map → pipelines-BtfaUf7f.js.map} +1 -1
  141. package/dashboard/dist/assets/{roles-BO-4Ieun.js → roles-CDi58HW9.js} +2 -2
  142. package/dashboard/dist/assets/{roles-BO-4Ieun.js.map → roles-CDi58HW9.js.map} +1 -1
  143. package/dashboard/dist/assets/{tasks-BiyBXdk7.js → tasks-bMka9A7P.js} +2 -2
  144. package/dashboard/dist/assets/{tasks-BiyBXdk7.js.map → tasks-bMka9A7P.js.map} +1 -1
  145. package/dashboard/dist/assets/{topics-m_BXjCFf.js → topics-CFcuDwn2.js} +2 -2
  146. package/dashboard/dist/assets/{topics-m_BXjCFf.js.map → topics-CFcuDwn2.js.map} +1 -1
  147. package/dashboard/dist/assets/{useEventHooks-CtkD_tnd.js → useEventHooks-DrtLEQzK.js} +2 -2
  148. package/dashboard/dist/assets/{useEventHooks-CtkD_tnd.js.map → useEventHooks-DrtLEQzK.js.map} +1 -1
  149. package/dashboard/dist/assets/{useNamespace-Dt2COnsG.js → useNamespace-BUb0LZ9l.js} +2 -2
  150. package/dashboard/dist/assets/{useNamespace-Dt2COnsG.js.map → useNamespace-BUb0LZ9l.js.map} +1 -1
  151. package/dashboard/dist/assets/{useYamlActivityEvents--i7p1Ta9.js → useYamlActivityEvents-6DPlPdg0.js} +2 -2
  152. package/dashboard/dist/assets/{useYamlActivityEvents--i7p1Ta9.js.map → useYamlActivityEvents-6DPlPdg0.js.map} +1 -1
  153. package/dashboard/dist/assets/{users-BsRZkm9v.js → users-FTnxEv_t.js} +2 -2
  154. package/dashboard/dist/assets/{users-BsRZkm9v.js.map → users-FTnxEv_t.js.map} +1 -1
  155. package/dashboard/dist/assets/{workflows-B0djSSvg.js → workflows-DgeQWLWK.js} +2 -2
  156. package/dashboard/dist/assets/{workflows-B0djSSvg.js.map → workflows-DgeQWLWK.js.map} +1 -1
  157. package/dashboard/dist/assets/{yaml-workflows-CupO7vvi.js → yaml-workflows-BjatB1t-.js} +2 -2
  158. package/dashboard/dist/assets/{yaml-workflows-CupO7vvi.js.map → yaml-workflows-BjatB1t-.js.map} +1 -1
  159. package/dashboard/dist/index.html +1 -1
  160. package/docs/hitl-guide.md +49 -2
  161. package/package.json +1 -1
  162. package/dashboard/dist/assets/AvailableEscalationsPage-qRf3tBYi.js +0 -2
  163. package/dashboard/dist/assets/AvailableEscalationsPage-qRf3tBYi.js.map +0 -1
  164. package/dashboard/dist/assets/index-DWXhbO4b.js +0 -5
  165. package/dashboard/dist/assets/index-DWXhbO4b.js.map +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ProcessesListPage-kyRO3E9d.js","./vendor-query-B2UbickB.js","./tasks-BiyBXdk7.js","./workflows-B0djSSvg.js","./useEventHooks-CtkD_tnd.js","./useFilterParams-x-Dg0Vgz.js","./vendor-react-CXumBFUA.js","./useDebouncedValue-BA5S7V54.js","./api-path-u2Jf9QXS.js","./DataTable-Byn3oyT9.js","./EmptyState-BcsfPq9T.js","./TimestampCell-CdD5hp9o.js","./StickyPagination-BTDj99Vb.js","./FilterBar-DDIn8TOs.js","./PageHeader-CiFhzGc0.js","./vendor-icons-DPmIjhZB.js","./ListToolbar-BUgEY8Oc.js","./WorkflowPill-S6VV2Eax.js","./ProcessDetailPage-BWVFB-nL.js","./PageHeaderWithStats-_zOnWAhq.js","./StatusBadge-CEQMRmSQ.js","./RolePill-CUIJSgRq.js","./UserName-IdFyeFle.js","./users-BsRZkm9v.js","./McpOverview-DIenRt0e.js","./mcp-LRVvEX8W.js","./pipelines-C9fpHxJR.js","./yaml-workflows-CupO7vvi.js","./controlplane-CjK2cXaD.js","./StatCard-DrdlUeQz.js","./McpRunsPage-BWe6WVzw.js","./useNamespace-Dt2COnsG.js","./ElapsedCell-BMhamzj3.js","./RowActions-BA9L9djf.js","./McpRunDetailPage-DDiOtG5r.js","./CopyableId-uot2mE_g.js","./CollapsibleSection-BuZl37uS.js","./EventTable-hHPNI3Yq.js","./SwimlaneTimeline-Db7ATobq.js","./StreamMessageDetail-DjjnJ31Q.js","./McpQueryPage-CkT4A2c5.js","./mcp-query-k2J65UbP.js","./McpQueryDetailPage-CxAR4Bpw.js","./TagInput-BaFJCq9A.js","./useYamlActivityEvents--i7p1Ta9.js","./helpers-DzO-OGPe.js","./RunAsSelector-BqhOzi2p.js","./BotPicker-Bpglj7RE.js","./bots-BiS_mYcH.js","./ToolPill-Enc3nyic.js","./TimeAgo-CGx_Ffwq.js","./EscalationsOverview-2VRjFxPV.js","./AvailableEscalationsPage-qRf3tBYi.js","./CustomDurationPicker-qhb23E3p.js","./Modal-CSrxpXeM.js","./constants-BHkpVaqx.js","./roles-BO-4Ieun.js","./CountdownTimer-CRK-E2UF.js","./escalation-columns-_KrFogWG.js","./PriorityBadge-B4ykBH7f.js","./OperatorDashboard-CVq7V7hE.js","./index-DWXhbO4b.js","./SlidePanel-BcWKelpn.js","./WorkflowsOverview-BFs-ZSTn.js","./index-BFh7zbQF.js","./NamespacePill--ikKtMvx.js","./WorkflowsDashboard-DGtMG5vL.js","./YamlWorkflowsPage-0Moxrj_c.js","./GraphInvokePage-B6qAC8zt.js","./YamlWorkflowDetailPage-6FTLoVfO.js","./TasksListPage-PKscNTJs.js","./TaskDetailPage-BVlCa-PR.js","./WorkflowExecutionPage-DtC-71vO.js","./AdminDashboard-DmQG0fUK.js","./index-CTTxpoEl.js","./TaskQueuePill-D9e16qkU.js","./index-3ewF-RsR.js","./ConfirmDeleteModal-D9_1b4MW.js","./index-BYpOpKoM.js","./ToolTestPanel-DWs0DNGB.js","./index-Fc1qNrqI.js","./index-JQCy1mnu.js","./RolesPage-tT21PIEb.js","./RoleDetailPage-DrSlAQUQ.js","./EscalationSchemaPage-9NY4Q4ku.js","./EscalationListSchemaPage-BEi89A7y.js","./index-p85Oqfqc.js","./OperationsPage-CzJx-zxj.js","./index-Dq5RU7sm.js","./index-Be9bw5cd.js","./CredentialsPage-CjBiPahB.js","./index-IHOuIqlt.js","./DropZone-C1TpkVQG.js","./index-C42kzl9D.js","./knowledge-Bed_1toa.js","./HomePage-DDyQOu57.js","./AgentsPage-GEYMgmez.js","./agents-Dpg829fG.js","./AgentDetailPage-Cdinl7bx.js","./CronLabel-DTXl2Rgj.js","./AgentConfigPage-BZ8g7Ml8.js","./capabilities-Cpe3amV5.js","./topics-m_BXjCFf.js","./CapabilitiesPage-ARIQzRiq.js","./TopicsPage-bFjJUYmO.js","./TopicDetailPage-BaL3m3yb.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ProcessesListPage-DAgFK_ln.js","./vendor-query-B2UbickB.js","./tasks-bMka9A7P.js","./workflows-DgeQWLWK.js","./useEventHooks-DrtLEQzK.js","./useFilterParams-x-Dg0Vgz.js","./vendor-react-CXumBFUA.js","./useDebouncedValue-BA5S7V54.js","./api-path-u2Jf9QXS.js","./DataTable-Byn3oyT9.js","./EmptyState-BcsfPq9T.js","./TimestampCell-CpWhUW0W.js","./StickyPagination-D_HhyJ5V.js","./FilterBar-DDIn8TOs.js","./PageHeader-CiFhzGc0.js","./vendor-icons-DPmIjhZB.js","./ListToolbar-DmRE3_dX.js","./WorkflowPill-S6VV2Eax.js","./ProcessDetailPage-BVR41sYI.js","./PageHeaderWithStats-_zOnWAhq.js","./StatusBadge-CEQMRmSQ.js","./RolePill-CUIJSgRq.js","./UserName-B-5Cnap4.js","./users-FTnxEv_t.js","./McpOverview-BukcrbtX.js","./mcp-DPzcauBf.js","./pipelines-BtfaUf7f.js","./yaml-workflows-BjatB1t-.js","./controlplane-cpRK9tBf.js","./StatCard-DrdlUeQz.js","./McpRunsPage-CzISyj7e.js","./useNamespace-BUb0LZ9l.js","./ElapsedCell-CgpTWk8N.js","./RowActions-BA9L9djf.js","./McpRunDetailPage-D3dcICPJ.js","./CopyableId-uot2mE_g.js","./CollapsibleSection-CDdlmdb6.js","./EventTable-MFAHeFTY.js","./SwimlaneTimeline-dlaJS-DC.js","./StreamMessageDetail-C39lLYKC.js","./McpQueryPage-DPXnA6Wa.js","./mcp-query-CYLlRjwY.js","./McpQueryDetailPage-BVx-cGFZ.js","./TagInput-BaFJCq9A.js","./useYamlActivityEvents-6DPlPdg0.js","./helpers-DzO-OGPe.js","./RunAsSelector-C36xqdKj.js","./BotPicker-CYw4ZeAh.js","./bots-yo56kQZI.js","./ToolPill-Enc3nyic.js","./TimeAgo-drImakaN.js","./EscalationsOverview-BY4dLou7.js","./AvailableEscalationsPage-B1cCs4jO.js","./CustomDurationPicker-CKfgf650.js","./Modal-CSrxpXeM.js","./constants-BHkpVaqx.js","./roles-CDi58HW9.js","./CountdownTimer-BrQl3JWm.js","./escalation-columns-CSG3LG3F.js","./PriorityBadge-B4ykBH7f.js","./OperatorDashboard-C_bMBGyy.js","./index-D9I9XhrD.js","./SlidePanel-BcWKelpn.js","./WorkflowsOverview-CVd-TybI.js","./index-B9YOp7_Z.js","./NamespacePill--ikKtMvx.js","./WorkflowsDashboard-BqMJDhpp.js","./YamlWorkflowsPage-D2LRoAki.js","./GraphInvokePage-7T-6qC2N.js","./YamlWorkflowDetailPage-BshuXnvM.js","./TasksListPage-CkbK3vdj.js","./TaskDetailPage-DAnT9c0v.js","./WorkflowExecutionPage-s4H5TnRv.js","./AdminDashboard-PvD1IObg.js","./index-D3_Kc337.js","./TaskQueuePill-D9e16qkU.js","./index-DpYsAAsj.js","./ConfirmDeleteModal-D9_1b4MW.js","./index-C15QKc-V.js","./ToolTestPanel-PvMw4dIw.js","./index-DNKzmRA3.js","./index-JMRKuqah.js","./RolesPage-dRSC725H.js","./RoleDetailPage-NxT8GaWV.js","./EscalationSchemaPage-CXvjwJ_I.js","./EscalationListSchemaPage-CxFxPz4C.js","./index-d8dDpRIs.js","./OperationsPage-BYth5Dxg.js","./index-D9GgDI2q.js","./index-D_FpjN49.js","./CredentialsPage-Bt7tQHlp.js","./index-CvyZWk2N.js","./DropZone-C1TpkVQG.js","./index-DQgRu4cd.js","./knowledge-DSTPZRsM.js","./HomePage-1PI7E3sw.js","./AgentsPage-CgUucHar.js","./agents-CqeRO052.js","./AgentDetailPage-B570UVLx.js","./CronLabel-DbwuLMO0.js","./AgentConfigPage-BB9NCIiK.js","./capabilities-C-LyQnOQ.js","./topics-CFcuDwn2.js","./CapabilitiesPage-C8DL3cDA.js","./TopicsPage-OzE8IWZf.js","./TopicDetailPage-DQa0EuM9.js"])))=>i.map(i=>d[i]);
2
2
  var Kx=Object.defineProperty;var Zx=(i,n,s)=>n in i?Kx(i,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[n]=s;var v=(i,n,s)=>Zx(i,typeof n!="symbol"?n+"":n,s);import{r as Wx,a as O,j as h,u as Sn,b as on,c as En,Q as ev,d as tv}from"./vendor-query-B2UbickB.js";import{r as nv,u as xs,L as Ni,N as $o,a as Tg,b as $n,O as jr,c as kg,d as sv,R as iv}from"./vendor-react-CXumBFUA.js";import{X as Mi,I as Df,R as Ng,B as Cg,U as rv,a as av,L as zf,b as m0,c as lv,Z as ov,S as p0,P as g0,C as cv,W as rh,d as uv,e as fv,F as hv,f as dv,g as mv,T as pv,N as gv,h as yv,D as bv,M as Mg,i as Rg,j as xv,k as vv,l as _v,E as wv,m as Sv,n as Ev,o as Av,p as y0,G as jv,q as Ov,r as Tv,s as kv,t as Nv}from"./vendor-icons-DPmIjhZB.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const f of o)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function s(o){const f={};return o.integrity&&(f.integrity=o.integrity),o.referrerPolicy&&(f.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?f.credentials="include":o.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function a(o){if(o.ep)return;o.ep=!0;const f=s(o);fetch(o.href,f)}})();var yf={exports:{}},Ma={},bf={exports:{}},xf={};/**
3
3
  * @license React
4
4
  * scheduler.production.js
@@ -59,5 +59,5 @@ ${s.map(o=>`${o.role==="user"?"User":"Assistant"}: ${o.content}`).join(`
59
59
  [End prior conversation]
60
60
 
61
61
  `}function uS(i){const n=i.summary,s=i.title;if(n){const a=n.search(/\n\s*\{[\s\S]*"title"\s*:/);return a>0?n.slice(0,a).trim():n}return s||(typeof i=="string"?i:"Query completed.")}const Ry=O.createContext(null);function fS({children:i}){const n=xs(),[s,a]=O.useState(!1),[o,f]=O.useState([]),[d,m]=O.useState(null),[g,y]=O.useState({}),E=O.useRef(null),w={page:n.pathname.split("/").filter(Boolean).join("-")||"home",route:n.pathname,params:{},...g,suggestedTags:g.suggestedTags??oS(n.pathname)};O.useEffect(()=>()=>{E.current&&clearInterval(E.current)},[]);const T=O.useCallback(()=>a(ee=>!ee),[]),z=O.useCallback(ee=>{y(ee)},[]),M=O.useCallback(()=>{f([]),m(null)},[]),q=O.useCallback(async ee=>{var P;const ne=new Date().toISOString(),fe={id:`user-${Date.now()}`,role:"user",content:ee,timestamp:ne},ae={id:`pending-${Date.now()}`,role:"assistant",content:"",timestamp:ne,pending:!0};f(V=>[...V,fe,ae]);const k={...w};(P=k.entities)!=null&&P.yamlContent&&k.entities.yamlContent.length>ug&&(k.entities={...k.entities,yamlContent:k.entities.yamlContent.slice(0,ug)+`
62
- ... (truncated)`});const le=`${cS(o.concat(fe))}${ee}`;try{const I=(await Ye("/insight/mcp-query",{method:"POST",body:JSON.stringify({prompt:le,tags:k.suggestedTags,context:k,wait:!1,direct:!0})})).workflow_id;m(I),f(Z=>Z.map(ie=>ie.id===ae.id?{...ie,workflowId:I}:ie)),E.current&&clearInterval(E.current),E.current=setInterval(async()=>{var Z;try{const ie=await Ye(`/workflows/${I}/result`),Ae=(Z=ie==null?void 0:ie.result)==null?void 0:Z.data;if(Ae){E.current&&clearInterval(E.current),E.current=null,m(null);const Re=uS(Ae);let Oe;try{Oe=(await Ye(`/workflow-states/${I}/execution`)).duration_ms}catch{}f($=>$.map(re=>re.id===ae.id?{...re,content:Re,timestamp:new Date().toISOString(),pending:!1,durationMs:Oe}:re))}}catch{}},3e3)}catch{f(V=>V.map(I=>I.id===ae.id?{...I,content:"Failed to submit query. Please try again.",pending:!1}:I))}},[o,w]),Q=O.useCallback(async ee=>{const ne=o.find(k=>k.id===ee);if(!(ne!=null&&ne.workflowId)||ne.compilationStatus==="compiling"||ne.compilationStatus==="done")return;const fe=o.indexOf(ne),ae=o.slice(0,fe).reverse().find(k=>k.role==="user");if(ae){f(k=>k.map(X=>X.id===ee?{...X,compilationStatus:"compiling"}:X));try{const k=await Ye("/insight/mcp-query/describe",{method:"POST",body:JSON.stringify({prompt:ae.content,summary:ne.content})}),X=await Ye("/yaml-workflows",{method:"POST",body:JSON.stringify({workflow_id:ne.workflowId,task_queue:"long-tail-system",workflow_name:"mcpQuery",name:k.tool_name,description:k.description,tags:k.tags,app_id:""})});await Ye(`/yaml-workflows/${X.id}/deploy`,{method:"POST"}),f(le=>le.map(P=>P.id===ee?{...P,compilationStatus:"done"}:P))}catch(k){const X=k instanceof Error?k.message:"Compilation failed";f(le=>le.map(P=>P.id===ee?{...P,compilationStatus:"error",compilationError:X}:P))}}},[o]);return h.jsx(Ry.Provider,{value:{helpOpen:s,setHelpOpen:a,toggleHelp:T,messages:o,sendMessage:q,pageContext:w,setPageContext:z,activeWorkflowId:d,clearMessages:M,compileMessage:Q},children:i})}function Dy(){const i=O.useContext(Ry);if(!i)throw new Error("useHelpAssistant must be used within HelpAssistantProvider");return i}function hS(){const{helpOpen:i,toggleHelp:n}=Dy();return h.jsx("button",{onClick:n,className:"fixed right-3 z-[45] flex items-center justify-center w-10 h-10 rounded-full bg-surface-raised shadow-lg hover:scale-110 transition-transform duration-150 border border-accent/30",style:{bottom:"44px"},"aria-label":i?"Close help":"Ask for help",children:i?h.jsx(Mi,{className:"w-5 h-5 text-text-tertiary",strokeWidth:1.5}):h.jsx("span",{role:"img","aria-label":"Help",className:"logo-mark w-8 h-8 -rotate-[120deg]",style:{"--logo-url":`url(${Vt}/logo512.png)`}})})}const zy=6048e5,dS=864e5,fg=6e4,hg=525600,dg=43200,mg=1440,pg=Symbol.for("constructDateFrom");function bs(i,n){return typeof i=="function"?i(n):i&&typeof i=="object"&&pg in i?i[pg](n):i instanceof Date?new i.constructor(n):new Date(n)}function ln(i,n){return bs(n||i,i)}let mS={};function nl(){return mS}function Za(i,n){var m,g,y,E;const s=nl(),a=(n==null?void 0:n.weekStartsOn)??((g=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??s.weekStartsOn??((E=(y=s.locale)==null?void 0:y.options)==null?void 0:E.weekStartsOn)??0,o=ln(i,n==null?void 0:n.in),f=o.getDay(),d=(f<a?7:0)+f-a;return o.setDate(o.getDate()-d),o.setHours(0,0,0,0),o}function Zo(i,n){return Za(i,{...n,weekStartsOn:1})}function qy(i,n){const s=ln(i,n==null?void 0:n.in),a=s.getFullYear(),o=bs(s,0);o.setFullYear(a+1,0,4),o.setHours(0,0,0,0);const f=Zo(o),d=bs(s,0);d.setFullYear(a,0,4),d.setHours(0,0,0,0);const m=Zo(d);return s.getTime()>=f.getTime()?a+1:s.getTime()>=m.getTime()?a:a-1}function Wo(i){const n=ln(i),s=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return s.setUTCFullYear(n.getFullYear()),+i-+s}function By(i,...n){const s=bs.bind(null,i||n.find(a=>typeof a=="object"));return n.map(s)}function gg(i,n){const s=ln(i,n==null?void 0:n.in);return s.setHours(0,0,0,0),s}function pS(i,n,s){const[a,o]=By(s==null?void 0:s.in,i,n),f=gg(a),d=gg(o),m=+f-Wo(f),g=+d-Wo(d);return Math.round((m-g)/dS)}function gS(i,n){const s=qy(i,n),a=bs(i,0);return a.setFullYear(s,0,4),a.setHours(0,0,0,0),Zo(a)}function yS(i,n){const s=+ln(i)-+ln(n);return s<0?-1:s>0?1:s}function bS(i){return bs(i,Date.now())}function xS(i){return i instanceof Date||typeof i=="object"&&Object.prototype.toString.call(i)==="[object Date]"}function vS(i){return!(!xS(i)&&typeof i!="number"||isNaN(+ln(i)))}function _S(i){return n=>{const a=(i?Math[i]:Math.trunc)(n);return a===0?0:a}}function wS(i,n){const s=ln(i,n==null?void 0:n.in);return s.setFullYear(s.getFullYear(),0,1),s.setHours(0,0,0,0),s}const SS={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ES=(i,n,s)=>{let a;const o=SS[i];return typeof o=="string"?a=o:n===1?a=o.one:a=o.other.replace("{{count}}",n.toString()),s!=null&&s.addSuffix?s.comparison&&s.comparison>0?"in "+a:a+" ago":a};function Rf(i){return(n={})=>{const s=n.width?String(n.width):i.defaultWidth;return i.formats[s]||i.formats[i.defaultWidth]}}const AS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},jS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},OS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},TS={date:Rf({formats:AS,defaultWidth:"full"}),time:Rf({formats:jS,defaultWidth:"full"}),dateTime:Rf({formats:OS,defaultWidth:"full"})},kS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},NS=(i,n,s,a)=>kS[i];function qa(i){return(n,s)=>{const a=s!=null&&s.context?String(s.context):"standalone";let o;if(a==="formatting"&&i.formattingValues){const d=i.defaultFormattingWidth||i.defaultWidth,m=s!=null&&s.width?String(s.width):d;o=i.formattingValues[m]||i.formattingValues[d]}else{const d=i.defaultWidth,m=s!=null&&s.width?String(s.width):i.defaultWidth;o=i.values[m]||i.values[d]}const f=i.argumentCallback?i.argumentCallback(n):n;return o[f]}}const CS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},MS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},RS={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},DS={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},zS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},qS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},BS=(i,n)=>{const s=Number(i),a=s%100;if(a>20||a<10)switch(a%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},US={ordinalNumber:BS,era:qa({values:CS,defaultWidth:"wide"}),quarter:qa({values:MS,defaultWidth:"wide",argumentCallback:i=>i-1}),month:qa({values:RS,defaultWidth:"wide"}),day:qa({values:DS,defaultWidth:"wide"}),dayPeriod:qa({values:zS,defaultWidth:"wide",formattingValues:qS,defaultFormattingWidth:"wide"})};function Ba(i){return(n,s={})=>{const a=s.width,o=a&&i.matchPatterns[a]||i.matchPatterns[i.defaultMatchWidth],f=n.match(o);if(!f)return null;const d=f[0],m=a&&i.parsePatterns[a]||i.parsePatterns[i.defaultParseWidth],g=Array.isArray(m)?HS(m,w=>w.test(d)):LS(m,w=>w.test(d));let y;y=i.valueCallback?i.valueCallback(g):g,y=s.valueCallback?s.valueCallback(y):y;const E=n.slice(d.length);return{value:y,rest:E}}}function LS(i,n){for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&n(i[s]))return s}function HS(i,n){for(let s=0;s<i.length;s++)if(n(i[s]))return s}function PS(i){return(n,s={})=>{const a=n.match(i.matchPattern);if(!a)return null;const o=a[0],f=n.match(i.parsePattern);if(!f)return null;let d=i.valueCallback?i.valueCallback(f[0]):f[0];d=s.valueCallback?s.valueCallback(d):d;const m=n.slice(o.length);return{value:d,rest:m}}}const $S=/^(\d+)(th|st|nd|rd)?/i,YS=/\d+/i,GS={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},VS={any:[/^b/i,/^(a|c)/i]},FS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},IS={any:[/1/i,/2/i,/3/i,/4/i]},JS={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},QS={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},XS={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},KS={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ZS={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},WS={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},eE={ordinalNumber:PS({matchPattern:$S,parsePattern:YS,valueCallback:i=>parseInt(i,10)}),era:Ba({matchPatterns:GS,defaultMatchWidth:"wide",parsePatterns:VS,defaultParseWidth:"any"}),quarter:Ba({matchPatterns:FS,defaultMatchWidth:"wide",parsePatterns:IS,defaultParseWidth:"any",valueCallback:i=>i+1}),month:Ba({matchPatterns:JS,defaultMatchWidth:"wide",parsePatterns:QS,defaultParseWidth:"any"}),day:Ba({matchPatterns:XS,defaultMatchWidth:"wide",parsePatterns:KS,defaultParseWidth:"any"}),dayPeriod:Ba({matchPatterns:ZS,defaultMatchWidth:"any",parsePatterns:WS,defaultParseWidth:"any"})},Uy={code:"en-US",formatDistance:ES,formatLong:TS,formatRelative:NS,localize:US,match:eE,options:{weekStartsOn:0,firstWeekContainsDate:1}};function tE(i,n){const s=ln(i,n==null?void 0:n.in);return pS(s,wS(s))+1}function nE(i,n){const s=ln(i,n==null?void 0:n.in),a=+Zo(s)-+gS(s);return Math.round(a/zy)+1}function Ly(i,n){var E,w,T,z;const s=ln(i,n==null?void 0:n.in),a=s.getFullYear(),o=nl(),f=(n==null?void 0:n.firstWeekContainsDate)??((w=(E=n==null?void 0:n.locale)==null?void 0:E.options)==null?void 0:w.firstWeekContainsDate)??o.firstWeekContainsDate??((z=(T=o.locale)==null?void 0:T.options)==null?void 0:z.firstWeekContainsDate)??1,d=bs((n==null?void 0:n.in)||i,0);d.setFullYear(a+1,0,f),d.setHours(0,0,0,0);const m=Za(d,n),g=bs((n==null?void 0:n.in)||i,0);g.setFullYear(a,0,f),g.setHours(0,0,0,0);const y=Za(g,n);return+s>=+m?a+1:+s>=+y?a:a-1}function sE(i,n){var m,g,y,E;const s=nl(),a=(n==null?void 0:n.firstWeekContainsDate)??((g=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??s.firstWeekContainsDate??((E=(y=s.locale)==null?void 0:y.options)==null?void 0:E.firstWeekContainsDate)??1,o=Ly(i,n),f=bs((n==null?void 0:n.in)||i,0);return f.setFullYear(o,0,a),f.setHours(0,0,0,0),Za(f,n)}function iE(i,n){const s=ln(i,n==null?void 0:n.in),a=+Za(s,n)-+sE(s,n);return Math.round(a/zy)+1}function Fe(i,n){const s=i<0?"-":"",a=Math.abs(i).toString().padStart(n,"0");return s+a}const Ks={y(i,n){const s=i.getFullYear(),a=s>0?s:1-s;return Fe(n==="yy"?a%100:a,n.length)},M(i,n){const s=i.getMonth();return n==="M"?String(s+1):Fe(s+1,2)},d(i,n){return Fe(i.getDate(),n.length)},a(i,n){const s=i.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];case"aaaa":default:return s==="am"?"a.m.":"p.m."}},h(i,n){return Fe(i.getHours()%12||12,n.length)},H(i,n){return Fe(i.getHours(),n.length)},m(i,n){return Fe(i.getMinutes(),n.length)},s(i,n){return Fe(i.getSeconds(),n.length)},S(i,n){const s=n.length,a=i.getMilliseconds(),o=Math.trunc(a*Math.pow(10,s-3));return Fe(o,n.length)}},_r={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},yg={G:function(i,n,s){const a=i.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return s.era(a,{width:"abbreviated"});case"GGGGG":return s.era(a,{width:"narrow"});case"GGGG":default:return s.era(a,{width:"wide"})}},y:function(i,n,s){if(n==="yo"){const a=i.getFullYear(),o=a>0?a:1-a;return s.ordinalNumber(o,{unit:"year"})}return Ks.y(i,n)},Y:function(i,n,s,a){const o=Ly(i,a),f=o>0?o:1-o;if(n==="YY"){const d=f%100;return Fe(d,2)}return n==="Yo"?s.ordinalNumber(f,{unit:"year"}):Fe(f,n.length)},R:function(i,n){const s=qy(i);return Fe(s,n.length)},u:function(i,n){const s=i.getFullYear();return Fe(s,n.length)},Q:function(i,n,s){const a=Math.ceil((i.getMonth()+1)/3);switch(n){case"Q":return String(a);case"QQ":return Fe(a,2);case"Qo":return s.ordinalNumber(a,{unit:"quarter"});case"QQQ":return s.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(a,{width:"wide",context:"formatting"})}},q:function(i,n,s){const a=Math.ceil((i.getMonth()+1)/3);switch(n){case"q":return String(a);case"qq":return Fe(a,2);case"qo":return s.ordinalNumber(a,{unit:"quarter"});case"qqq":return s.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(a,{width:"wide",context:"standalone"})}},M:function(i,n,s){const a=i.getMonth();switch(n){case"M":case"MM":return Ks.M(i,n);case"Mo":return s.ordinalNumber(a+1,{unit:"month"});case"MMM":return s.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(a,{width:"wide",context:"formatting"})}},L:function(i,n,s){const a=i.getMonth();switch(n){case"L":return String(a+1);case"LL":return Fe(a+1,2);case"Lo":return s.ordinalNumber(a+1,{unit:"month"});case"LLL":return s.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(a,{width:"wide",context:"standalone"})}},w:function(i,n,s,a){const o=iE(i,a);return n==="wo"?s.ordinalNumber(o,{unit:"week"}):Fe(o,n.length)},I:function(i,n,s){const a=nE(i);return n==="Io"?s.ordinalNumber(a,{unit:"week"}):Fe(a,n.length)},d:function(i,n,s){return n==="do"?s.ordinalNumber(i.getDate(),{unit:"date"}):Ks.d(i,n)},D:function(i,n,s){const a=tE(i);return n==="Do"?s.ordinalNumber(a,{unit:"dayOfYear"}):Fe(a,n.length)},E:function(i,n,s){const a=i.getDay();switch(n){case"E":case"EE":case"EEE":return s.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(a,{width:"short",context:"formatting"});case"EEEE":default:return s.day(a,{width:"wide",context:"formatting"})}},e:function(i,n,s,a){const o=i.getDay(),f=(o-a.weekStartsOn+8)%7||7;switch(n){case"e":return String(f);case"ee":return Fe(f,2);case"eo":return s.ordinalNumber(f,{unit:"day"});case"eee":return s.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(o,{width:"short",context:"formatting"});case"eeee":default:return s.day(o,{width:"wide",context:"formatting"})}},c:function(i,n,s,a){const o=i.getDay(),f=(o-a.weekStartsOn+8)%7||7;switch(n){case"c":return String(f);case"cc":return Fe(f,n.length);case"co":return s.ordinalNumber(f,{unit:"day"});case"ccc":return s.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(o,{width:"narrow",context:"standalone"});case"cccccc":return s.day(o,{width:"short",context:"standalone"});case"cccc":default:return s.day(o,{width:"wide",context:"standalone"})}},i:function(i,n,s){const a=i.getDay(),o=a===0?7:a;switch(n){case"i":return String(o);case"ii":return Fe(o,n.length);case"io":return s.ordinalNumber(o,{unit:"day"});case"iii":return s.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(a,{width:"short",context:"formatting"});case"iiii":default:return s.day(a,{width:"wide",context:"formatting"})}},a:function(i,n,s){const o=i.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(i,n,s){const a=i.getHours();let o;switch(a===12?o=_r.noon:a===0?o=_r.midnight:o=a/12>=1?"pm":"am",n){case"b":case"bb":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(i,n,s){const a=i.getHours();let o;switch(a>=17?o=_r.evening:a>=12?o=_r.afternoon:a>=4?o=_r.morning:o=_r.night,n){case"B":case"BB":case"BBB":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(i,n,s){if(n==="ho"){let a=i.getHours()%12;return a===0&&(a=12),s.ordinalNumber(a,{unit:"hour"})}return Ks.h(i,n)},H:function(i,n,s){return n==="Ho"?s.ordinalNumber(i.getHours(),{unit:"hour"}):Ks.H(i,n)},K:function(i,n,s){const a=i.getHours()%12;return n==="Ko"?s.ordinalNumber(a,{unit:"hour"}):Fe(a,n.length)},k:function(i,n,s){let a=i.getHours();return a===0&&(a=24),n==="ko"?s.ordinalNumber(a,{unit:"hour"}):Fe(a,n.length)},m:function(i,n,s){return n==="mo"?s.ordinalNumber(i.getMinutes(),{unit:"minute"}):Ks.m(i,n)},s:function(i,n,s){return n==="so"?s.ordinalNumber(i.getSeconds(),{unit:"second"}):Ks.s(i,n)},S:function(i,n){return Ks.S(i,n)},X:function(i,n,s){const a=i.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return xg(a);case"XXXX":case"XX":return ki(a);case"XXXXX":case"XXX":default:return ki(a,":")}},x:function(i,n,s){const a=i.getTimezoneOffset();switch(n){case"x":return xg(a);case"xxxx":case"xx":return ki(a);case"xxxxx":case"xxx":default:return ki(a,":")}},O:function(i,n,s){const a=i.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+bg(a,":");case"OOOO":default:return"GMT"+ki(a,":")}},z:function(i,n,s){const a=i.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+bg(a,":");case"zzzz":default:return"GMT"+ki(a,":")}},t:function(i,n,s){const a=Math.trunc(+i/1e3);return Fe(a,n.length)},T:function(i,n,s){return Fe(+i,n.length)}};function bg(i,n=""){const s=i>0?"-":"+",a=Math.abs(i),o=Math.trunc(a/60),f=a%60;return f===0?s+String(o):s+String(o)+n+Fe(f,2)}function xg(i,n){return i%60===0?(i>0?"-":"+")+Fe(Math.abs(i)/60,2):ki(i,n)}function ki(i,n=""){const s=i>0?"-":"+",a=Math.abs(i),o=Fe(Math.trunc(a/60),2),f=Fe(a%60,2);return s+o+n+f}const vg=(i,n)=>{switch(i){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Hy=(i,n)=>{switch(i){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},rE=(i,n)=>{const s=i.match(/(P+)(p+)?/)||[],a=s[1],o=s[2];if(!o)return vg(i,n);let f;switch(a){case"P":f=n.dateTime({width:"short"});break;case"PP":f=n.dateTime({width:"medium"});break;case"PPP":f=n.dateTime({width:"long"});break;case"PPPP":default:f=n.dateTime({width:"full"});break}return f.replace("{{date}}",vg(a,n)).replace("{{time}}",Hy(o,n))},aE={p:Hy,P:rE},lE=/^D+$/,oE=/^Y+$/,cE=["D","DD","YY","YYYY"];function uE(i){return lE.test(i)}function fE(i){return oE.test(i)}function hE(i,n,s){const a=dE(i,n,s);if(console.warn(a),cE.includes(i))throw new RangeError(a)}function dE(i,n,s){const a=i[0]==="Y"?"years":"days of the month";return`Use \`${i.toLowerCase()}\` instead of \`${i}\` (in \`${n}\`) for formatting ${a} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const mE=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pE=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gE=/^'([^]*?)'?$/,yE=/''/g,bE=/[a-zA-Z]/;function Oh(i,n,s){var E,w,T,z;const a=nl(),o=a.locale??Uy,f=a.firstWeekContainsDate??((w=(E=a.locale)==null?void 0:E.options)==null?void 0:w.firstWeekContainsDate)??1,d=a.weekStartsOn??((z=(T=a.locale)==null?void 0:T.options)==null?void 0:z.weekStartsOn)??0,m=ln(i,s==null?void 0:s.in);if(!vS(m))throw new RangeError("Invalid time value");let g=n.match(pE).map(M=>{const q=M[0];if(q==="p"||q==="P"){const Q=aE[q];return Q(M,o.formatLong)}return M}).join("").match(mE).map(M=>{if(M==="''")return{isToken:!1,value:"'"};const q=M[0];if(q==="'")return{isToken:!1,value:xE(M)};if(yg[q])return{isToken:!0,value:M};if(q.match(bE))throw new RangeError("Format string contains an unescaped latin alphabet character `"+q+"`");return{isToken:!1,value:M}});o.localize.preprocessor&&(g=o.localize.preprocessor(m,g));const y={firstWeekContainsDate:f,weekStartsOn:d,locale:o};return g.map(M=>{if(!M.isToken)return M.value;const q=M.value;(fE(q)||uE(q))&&hE(q,n,String(i));const Q=yg[q[0]];return Q(m,q,o.localize,y)}).join("")}function xE(i){const n=i.match(gE);return n?n[1].replace(yE,"'"):i}function vE(i,n,s){const a=nl(),o=(s==null?void 0:s.locale)??a.locale??Uy,f=yS(i,n);if(isNaN(f))throw new RangeError("Invalid time value");const d=Object.assign({},s,{addSuffix:s==null?void 0:s.addSuffix,comparison:f}),[m,g]=By(s==null?void 0:s.in,...f>0?[n,i]:[i,n]),y=_S((s==null?void 0:s.roundingMethod)??"round"),E=g.getTime()-m.getTime(),w=E/fg,T=Wo(g)-Wo(m),z=(E-T)/fg,M=s==null?void 0:s.unit;let q;if(M?q=M:w<1?q="second":w<60?q="minute":w<mg?q="hour":z<dg?q="day":z<hg?q="month":q="year",q==="second"){const Q=y(E/1e3);return o.formatDistance("xSeconds",Q,d)}else if(q==="minute"){const Q=y(w);return o.formatDistance("xMinutes",Q,d)}else if(q==="hour"){const Q=y(w/60);return o.formatDistance("xHours",Q,d)}else if(q==="day"){const Q=y(z/mg);return o.formatDistance("xDays",Q,d)}else if(q==="month"){const Q=y(z/dg);return Q===12&&M!=="month"?o.formatDistance("xYears",1,d):o.formatDistance("xMonths",Q,d)}else{const Q=y(z/hg);return o.formatDistance("xYears",Q,d)}}function _E(i,n){return vE(i,bS(i),n)}function t3(i){return i.toLocaleString()}function n3(i){return i>=1e9?`${(i/1e9).toFixed(1).replace(/\.0$/,"")}B`:i>=1e6?`${(i/1e6).toFixed(1).replace(/\.0$/,"")}M`:i>=1e4?`${(i/1e3).toFixed(1).replace(/\.0$/,"")}K`:i.toLocaleString()}function wE(i){const n=new Date(i);return n.getTime()>Date.now()?"just now":_E(n,{addSuffix:!0})}function s3(i){const n=Date.now()-new Date(i).getTime();if(n<0)return"now";const s=Math.floor(n/1e3);if(s<60)return`${s}s`;const a=Math.floor(s/60);if(a<60)return`${a}m`;const o=Math.floor(a/60);if(o<24)return`${o}h`;const f=Math.floor(o/24);return f<7?`${f}d`:f<30?`${Math.floor(f/7)}w`:f<365?`${Math.floor(f/30)}mo`:`${Math.floor(f/365)}y`}function i3(i){return i<=0?"Expired":Th(i)}function SE(i){return i==null?"--":Th(i)}function r3(i){return i?Oh(new Date(i),"MMM d, yyyy h:mm a"):"--"}function Th(i){if(i<1e3)return`${Math.round(i)}ms`;if(i<6e4){const d=i/1e3;return Number.isInteger(d)?`${d}s`:`${d.toFixed(1)}s`}const n=Math.floor(i/1e3),s=Math.floor(n/86400),a=Math.floor(n%86400/3600),o=Math.floor(n%3600/60),f=n%60;return s>0?a>0?`${s}d ${a}h`:`${s}d`:a>0?o>0?`${a}h ${o}m`:`${a}h`:f>0?`${o}m ${f}s`:`${o}m`}function a3(i,n){const s=new Date(i).getTime(),a=n?new Date(n).getTime():Date.now();return Th(a-s)}function Py({options:i,children:n,className:s=""}){const[a,o]=O.useState(!1),[f,d]=O.useState(null),[m,g]=O.useState(null),y=O.useRef(null),E=O.useRef(void 0),w=O.useRef(void 0),T=220,z=O.useCallback(()=>{if(!y.current)return;const ee=y.current.getBoundingClientRect(),ne=window.innerWidth-T-8,fe=Math.max(8,Math.min(ee.left,ne));g({top:ee.bottom+4,left:fe})},[]),M=O.useCallback(async(ee,ne)=>{try{await navigator.clipboard.writeText(ee),d(ne),clearTimeout(E.current),E.current=setTimeout(()=>d(null),1200)}catch{}},[]),q=O.useCallback(()=>{clearTimeout(w.current),z(),o(!0)},[z]),Q=O.useCallback(()=>{w.current=setTimeout(()=>o(!1),150)},[]);return O.useEffect(()=>()=>{clearTimeout(E.current),clearTimeout(w.current)},[]),h.jsxs("span",{ref:y,className:`inline-flex items-center cursor-default ${s}`,onMouseEnter:q,onMouseLeave:Q,children:[n,a&&m&&Tg.createPortal(h.jsx("span",{className:"fixed z-[9999] bg-surface-raised border border-surface-border rounded shadow-lg py-1 min-w-[180px]",style:{top:m.top,left:m.left},onMouseEnter:q,onMouseLeave:Q,children:i.map(ee=>h.jsxs("button",{onClick:ne=>{ne.stopPropagation(),M(ee.value,ee.label)},className:"flex items-center justify-between w-full px-2.5 py-1 text-left hover:bg-surface-hover transition-colors",children:[h.jsx("span",{className:"text-[9px] font-medium uppercase tracking-wider text-text-tertiary w-10 shrink-0",children:ee.label}),h.jsx("span",{className:"text-[10px] font-mono text-text-secondary truncate ml-2",children:f===ee.label?"✓":ee.value})]},ee.label))}),document.body)]})}function EE(i,n){const s=new Date(i);switch(n){case"relative":return wE(i);case"datetime":return Oh(s,"MMM d, yyyy h:mm a");case"time":return s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}}function AE(i){const n=new Date(i);return[{label:"ms",value:String(n.getTime())},{label:"utc",value:n.toISOString()},{label:"local",value:Oh(n,"MMM d, yyyy h:mm:ss a")}]}function jE({date:i,format:n="relative",className:s=""}){const[,a]=O.useState(0);O.useEffect(()=>{if(n!=="relative")return;const f=setInterval(()=>a(d=>d+1),3e4);return()=>clearInterval(f)},[n]);const o=O.useMemo(()=>AE(i),[i]);return h.jsx(Py,{options:o,children:h.jsx("time",{dateTime:i,className:`text-xs text-text-tertiary ${s}`,children:EE(i,n)})})}function OE({ms:i,className:n=""}){const s=SE(i),a=O.useMemo(()=>i==null?[]:[{label:"ms",value:String(i)},{label:"sec",value:`${(i/1e3).toFixed(3)}s`},{label:"text",value:s}],[i,s]);return i==null?h.jsx("span",{className:`text-xs text-text-tertiary ${n}`,children:"--"}):h.jsx(Py,{options:a,children:h.jsx("span",{className:`text-xs text-text-tertiary ${n}`,children:s})})}const TE=["sm","md","lg","full"],_g={sm:"w-[28rem] max-h-[40vh]",md:"w-[36rem] max-h-[60vh]",lg:"w-[48rem] max-h-[80vh]",full:"inset-4 w-auto max-h-none"},wg={sm:"Small",md:"Medium",lg:"Large",full:"Fullscreen"};function kE({which:i}){const n="stroke-current";switch(i){case"sm":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"5",y:"5",width:"7",height:"7",rx:"1.5",className:n,strokeWidth:"1.5"})});case"md":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"3",y:"3",width:"9",height:"9",rx:"1.5",className:n,strokeWidth:"1.5"})});case"lg":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"1.5",y:"1.5",width:"11",height:"11",rx:"1.5",className:n,strokeWidth:"1.5"})});case"full":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"0.75",y:"0.75",width:"12.5",height:"12.5",rx:"1.5",className:n,strokeWidth:"1.5"})})}}function NE({msg:i}){const[n,s]=O.useState(0);O.useEffect(()=>{const d=new Date(i.timestamp).getTime(),m=()=>s(Math.floor((Date.now()-d)/1e3));m();const g=setInterval(m,1e3);return()=>clearInterval(g)},[i.timestamp]);const a=Math.floor(n/60),o=n%60,f=a>0?`${a}m ${o}s`:`${o}s`;return h.jsxs("span",{className:"inline-flex flex-col gap-1.5",children:[h.jsxs("span",{className:"inline-flex items-center gap-1",children:[h.jsx("span",{className:"text-text-tertiary",children:"Thinking"}),h.jsx("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse"}),h.jsx("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse [animation-delay:150ms]"}),h.jsx("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse [animation-delay:300ms]"}),h.jsx("span",{className:"text-text-muted ml-1 tabular-nums",children:f})]}),i.workflowId&&h.jsxs(Ni,{to:`/workflows/executions/${i.workflowId}`,className:"inline-flex items-center gap-1 text-[10px] text-accent/70 hover:text-accent transition-colors",children:[h.jsx(rh,{className:"w-2.5 h-2.5",strokeWidth:1.5}),"watch execution"]})]})}function CE({msg:i,compileMessage:n}){const s=i.role==="assistant";return h.jsxs("div",{className:`flex items-center gap-1.5 ${s?"justify-start":"justify-end"}`,children:[h.jsx(jE,{date:i.timestamp,format:"time",className:"!text-[9px] text-text-muted/50"}),i.durationMs!=null&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-text-muted/30 text-[8px]",children:"·"}),h.jsx(OE,{ms:i.durationMs,className:"!text-[9px] text-text-muted/50"})]}),i.workflowId&&h.jsx(Ni,{to:`/workflows/executions/${i.workflowId}`,className:"text-text-muted/40 hover:text-accent transition-colors",title:"View workflow execution",children:h.jsx(rh,{className:"w-2.5 h-2.5",strokeWidth:1.5})}),s&&i.workflowId&&!i.pending&&h.jsx("button",{onClick:()=>n(i.id),disabled:i.compilationStatus==="compiling"||i.compilationStatus==="done",className:"transition-colors",title:i.compilationStatus==="done"?"Compiled — future queries will match this pipeline":i.compilationStatus==="error"?i.compilationError??"Compilation failed":i.compilationStatus==="compiling"?"Compiling...":"Compile to fast pipeline",children:h.jsx(jv,{className:`w-2.5 h-2.5 ${i.compilationStatus==="done"?"text-status-success":i.compilationStatus==="error"?"text-status-error":i.compilationStatus==="compiling"?"text-accent/40 animate-pulse":"text-text-muted/40 hover:text-accent"}`,strokeWidth:1.5})})]})}function ME(){const{helpOpen:i,setHelpOpen:n,messages:s,sendMessage:a,pageContext:o,activeWorkflowId:f,clearMessages:d,compileMessage:m}=Dy(),[g,y]=O.useState(""),[E,w]=O.useState("md"),[T,z]=O.useState(!0),M=O.useRef(null),q=O.useRef(null);if(O.useEffect(()=>{M.current&&(M.current.scrollTop=M.current.scrollHeight)},[s]),O.useEffect(()=>{i&&q.current&&q.current.focus()},[i]),O.useEffect(()=>{if(!i)return;const k=X=>{X.key==="Escape"&&(E==="full"?w("lg"):E==="lg"?w("md"):E==="md"?w("sm"):n(!1))};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[i,E,n]),!i)return null;const Q=()=>{const k=g.trim();!k||f||(a(k),y(""),q.current&&(q.current.style.height="auto"))},ee=k=>{k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),Q())},ne=E==="full",fe=o.page.replace(/-/g," "),ae=ne?{}:{bottom:"108px"};return h.jsxs("div",{className:`fixed z-[45] flex flex-col border border-surface-border rounded-lg overflow-hidden transition-all duration-300 ${ne?_g.full:`right-6 ${_g[E]}`} ${T?"bg-surface-raised shadow-xl":"bg-surface-raised/[0.03] shadow-lg shadow-black/5"}`,style:ae,onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[h.jsxs("div",{className:`flex items-center justify-between px-4 py-2.5 border-b border-surface-border shrink-0 transition-all duration-300 ${T?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"text-xs font-medium text-text-primary truncate",children:"Help Assistant"}),h.jsx("p",{className:"text-[10px] text-text-tertiary truncate",children:fe})]}),h.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[h.jsx("div",{className:"flex items-center gap-0.5 border border-surface-border rounded p-0.5",role:"radiogroup","aria-label":"Panel size",children:TE.map(k=>h.jsx("button",{onClick:()=>w(k),className:`p-1 rounded transition-colors ${k===E?"bg-accent/15 text-accent":"text-text-muted hover:text-text-secondary hover:bg-surface-hover"}`,role:"radio","aria-checked":k===E,"aria-label":wg[k],title:wg[k],children:h.jsx(kE,{which:k})},k))}),s.length>0&&h.jsx("button",{onClick:d,className:"p-1 text-text-tertiary hover:text-text-secondary transition-colors","aria-label":"Clear conversation",title:"Clear conversation",children:h.jsx(Ov,{className:"w-3.5 h-3.5",strokeWidth:1.5})}),h.jsx("button",{onClick:()=>n(!1),className:"p-1 text-text-tertiary hover:text-text-primary transition-colors","aria-label":"Close",title:"Close",children:h.jsx(Mi,{className:"w-3.5 h-3.5",strokeWidth:1.5})})]})]}),h.jsxs("div",{ref:M,className:`flex-1 overflow-y-auto px-4 py-3 space-y-3 min-h-[120px] transition-all duration-300 ${T?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[s.length===0&&h.jsx("p",{className:"text-xs text-text-tertiary text-center py-6",children:"Ask anything about what you're viewing."}),s.map(k=>h.jsxs("div",{className:`text-xs leading-relaxed ${k.role==="user"?"text-right":"text-left"}`,children:[h.jsx("div",{className:`inline-block max-w-[85%] px-3 py-2 rounded-md whitespace-pre-wrap ${k.role==="user"?"bg-accent/10 text-text-primary":"bg-surface-sunken text-text-secondary"}`,children:k.pending?h.jsx(NE,{msg:k}):k.role==="assistant"?h.jsx(jh,{content:k.content}):k.content}),!k.pending&&h.jsx("div",{className:"mt-0.5",children:h.jsx(CE,{msg:k,compileMessage:m})})]},k.id))]}),h.jsxs("div",{className:`border-t border-surface-border px-3 py-2.5 flex gap-2 shrink-0 transition-all duration-300 ${T?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[h.jsx("textarea",{ref:q,value:g,onChange:k=>{y(k.target.value);const X=k.target;X.style.height="auto",X.style.height=`${Math.min(X.scrollHeight,120)}px`},onKeyDown:ee,placeholder:"Ask a question...",rows:2,className:"flex-1 resize-none bg-surface text-xs text-text-primary placeholder:text-text-tertiary rounded px-2.5 py-1.5 border border-surface-border focus:outline-none focus:border-accent",style:{minHeight:"2.5rem"},disabled:!!f}),h.jsx("button",{onClick:Q,disabled:!g.trim()||!!f,className:"px-2.5 py-1.5 text-accent hover:text-accent-hover disabled:text-text-muted transition-colors self-end","aria-label":"Send",children:h.jsx(Tv,{className:"w-4 h-4",strokeWidth:1.5})})]})]})}function RE(){var Q;const{isBuilder:i,isOps:n,viewAs:s}=yy(),{data:a}=Br(),o=my(),f=o!==null?o:!!((Q=a==null?void 0:a.ai)!=null&&Q.enabled),{collapsed:d,toggle:m}=xy(),[g,y]=O.useState(!1),[E,w]=O.useState(!1),[T,z]=O.useState(()=>window.location.hash.startsWith("#docs")),M=xs(),q=O.useRef(null);return O.useEffect(()=>{const ee=q.current;ee&&(ee.classList.remove("animate-page-in"),ee.offsetWidth,ee.classList.add("animate-page-in"))},[M.pathname]),O.useEffect(()=>{const ee=()=>{window.location.hash.startsWith("#docs")&&z(!0)};return window.addEventListener("hashchange",ee),()=>window.removeEventListener("hashchange",ee)},[]),h.jsxs("div",{className:"h-screen bg-surface flex flex-col",children:[h.jsx(v2,{onToggleEventFeed:()=>y(ee=>!ee),onToggleDocs:()=>z(ee=>!ee)}),h.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[h.jsxs("aside",{className:`${d?"w-16":"w-60"} shrink-0 bg-surface-raised border-r border-surface-border flex flex-col transition-[width] duration-200 ease-out overflow-hidden relative z-20`,children:[h.jsxs("nav",{className:"flex-1 px-3 pt-[36px] pb-4 space-y-2 overflow-y-auto overflow-x-hidden",children:[h.jsx(j2,{aiEnabled:f,isBuilder:i,isOps:n,viewAs:s}),i&&h.jsx(O2,{}),i&&f&&h.jsx(k2,{}),i&&h.jsx(C2,{}),(i||n)&&h.jsx(M2,{isBuilder:i,isOps:n})]}),h.jsx("button",{onClick:m,className:`shrink-0 py-3 text-text-tertiary hover:text-text-secondary transition-colors duration-150 ${d?"flex justify-center":"flex items-center px-7"}`,"aria-label":d?"Expand sidebar":"Collapse sidebar",children:d?h.jsx(kv,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5}):h.jsx(Nv,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5})}),!d&&(a==null?void 0:a.environment)&&h.jsxs("div",{className:"shrink-0 px-5 pb-3 text-[10px] leading-tight text-text-tertiary whitespace-nowrap overflow-hidden text-ellipsis",title:`long-tail v${a.environment.longTailVersion} · HotMesh v${a.environment.hotmeshVersion} · Node ${a.environment.nodeVersion} · ${a.environment.nodeEnv}`,children:["long-tail v",a.environment.longTailVersion,h.jsx("span",{className:"mx-1 text-surface-border",children:"·"}),"HotMesh v",a.environment.hotmeshVersion]})]}),h.jsx("main",{className:"flex-1 overflow-y-auto",children:h.jsx("div",{ref:q,className:"w-full px-10 py-10 pb-16 animate-page-in h-full flex flex-col",children:h.jsx(jr,{})})})]}),h.jsx(K2,{open:g,onToggle:()=>y(ee=>!ee),configOpen:E,onToggleConfig:()=>w(ee=>!ee)}),h.jsx(lS,{open:T,onClose:()=>{z(!1),history.replaceState(null,"",window.location.pathname+window.location.search)}}),f&&h.jsx(hS,{}),f&&h.jsx(ME,{})]})}function DE(){const{isAuthenticated:i}=ai(),n=xs();return i?h.jsx(Xw,{children:h.jsx(fS,{children:h.jsx(RE,{})})}):h.jsx($n,{to:"/login",state:{from:n.pathname},replace:!0})}function $y({provider:i,className:n="w-5 h-5"}){switch(i){case"google":return h.jsxs("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:[h.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),h.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),h.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),h.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]});case"github":return h.jsx("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:h.jsx("path",{d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"})});case"microsoft":return h.jsxs("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:[h.jsx("path",{d:"M3 3h8.5v8.5H3z",fill:"#F25022"}),h.jsx("path",{d:"M12.5 3H21v8.5h-8.5z",fill:"#7FBA00"}),h.jsx("path",{d:"M3 12.5h8.5V21H3z",fill:"#00A4EF"}),h.jsx("path",{d:"M12.5 12.5H21V21h-8.5z",fill:"#FFB900"})]});case"anthropic":return h.jsx("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:h.jsx("path",{d:"M13.827 3.52h3.603L24 20.48h-3.603l-6.57-16.96zm-7.258 0h3.767L16.906 20.48h-3.674l-1.343-3.461H6.396l-1.34 3.461H1.5l5.07-16.96zm2.327 5.14l-2.065 5.326h4.108l-2.043-5.326z"})});default:return h.jsxs("svg",{className:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[h.jsx("circle",{cx:"12",cy:"12",r:"10"}),h.jsx("path",{d:"M12 8v4l3 3"})]})}}async function zE(){return Ye("/auth/oauth/providers")}async function qE(i,n){const s=n?`?label=${encodeURIComponent(n)}`:"";return Ye(`/auth/oauth/connections/${i}${s}`,{method:"DELETE"})}function l3(){return Sn({queryKey:["oauth-connections"],queryFn:()=>Ye("/auth/oauth/connections")})}function o3(){const i=on();return En({mutationFn:({provider:n,label:s})=>qE(n,s),onSuccess:()=>{i.invalidateQueries({queryKey:["oauth-connections"]})}})}function BE(){var le;const{login:i,isAuthenticated:n}=ai(),s=kg(),a=xs(),o=new URLSearchParams(a.search),f=o.get("token"),d=o.get("error"),m=((le=a.state)==null?void 0:le.from)??o.get("returnTo")??"/",g=O.useRef(!1);f&&!g.current&&(g.current=!0,i(f,void 0,{displayName:o.get("displayName"),username:o.get("username")}));const[y,E]=O.useState(""),[w,T]=O.useState(""),[z,M]=O.useState(d||""),[q,Q]=O.useState(!1),[ee,ne]=O.useState(!!f),[fe,ae]=O.useState([]),k=O.useRef(!1);if(O.useEffect(()=>{f||k.current||(k.current=!0,(async()=>{var P,V,I,Z;try{const ie=await fetch(`${Vt}/api/settings`);if(!ie.ok)return;const Ae=await ie.json();if(!((P=Ae.auth)!=null&&P.sso))return;const Re=await fetch(`${Vt}/api/auth/sso`,{method:"POST"});if(!Re.ok){M("Host authentication required — please log in to your organization first");return}const Oe=await Re.json();Oe.token&&((V=Ae.auth)!=null&&V.ssoLogoutUrl&&sessionStorage.setItem("lt_sso_logout_url",Ae.auth.ssoLogoutUrl),ne(!0),i(Oe.token,void 0,{displayName:(I=Oe.user)==null?void 0:I.display_name,username:(Z=Oe.user)==null?void 0:Z.external_id}))}catch{}})())},[]),O.useEffect(()=>{f||zE().then(ae).catch(()=>{})},[]),O.useEffect(()=>{if(!ee)return;const P=setTimeout(()=>s(m,{replace:!0}),1500);return()=>clearTimeout(P)},[ee]),n&&!ee)return h.jsx($n,{to:m,replace:!0});const X=async P=>{var V,I;if(P.preventDefault(),M(""),!y.trim()||!w){M("Username and password are required");return}Q(!0);try{const Z=await fetch(`${Vt}/api/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:y.trim(),password:w})}),ie=await Z.json();if(!Z.ok){M(ie.error||"Login failed");return}ne(!0),i(ie.token,{username:y.trim(),password:w},{displayName:(V=ie.user)==null?void 0:V.display_name,username:(I=ie.user)==null?void 0:I.external_id})}catch{M("Unable to connect to server")}finally{Q(!1)}};return h.jsx("div",{className:"min-h-screen bg-surface flex items-center justify-center overflow-hidden",children:h.jsxs("div",{className:"w-full max-w-md p-10",children:[h.jsx("div",{className:`mb-10 transition-all duration-[1500ms] ease-in ${ee?"translate-x-[120vw] -translate-y-[60vh] scale-[3] opacity-0":""}`,children:h.jsx(Sh,{size:"lg",hideLabel:ee})}),h.jsxs("form",{onSubmit:X,className:`space-y-5 transition-opacity duration-300 ${ee?"opacity-0":""}`,children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"username",className:"block text-sm font-medium text-text-secondary mb-2",children:"Username"}),h.jsx("input",{id:"username",type:"text",value:y,onChange:P=>E(P.target.value),className:"input",placeholder:"Enter your username",autoFocus:!ee,autoComplete:"username"})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-text-secondary mb-2",children:"Password"}),h.jsx("input",{id:"password",type:"password",value:w,onChange:P=>T(P.target.value),className:"input",placeholder:"Enter your password",autoComplete:"current-password"})]}),z&&h.jsx("p",{className:"text-sm text-status-error",children:z}),h.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:q||ee,children:q?"Signing in...":"Sign In"}),fe.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center gap-3 mt-6",children:[h.jsx("div",{className:"flex-1 h-px bg-border"}),h.jsx("span",{className:"text-xs text-text-tertiary",children:"or continue with"}),h.jsx("div",{className:"flex-1 h-px bg-border"})]}),h.jsx("div",{className:"space-y-2",children:fe.filter(P=>P.provider!=="anthropic").map(P=>h.jsxs("a",{href:`${Vt}/api/auth/oauth/${P.provider}?returnTo=${encodeURIComponent(m)}`,className:"btn-secondary w-full flex items-center justify-center gap-2",children:[h.jsx($y,{provider:P.provider}),"Sign in with ",P.name]},P.provider))})]})]})]})})}function Sg(){const{isAuthenticated:i}=ai(),n=kg(),s=xs(),a=new URLSearchParams(s.search),o=a.get("state")||"";O.useEffect(()=>{i||n(`/login?returnTo=${encodeURIComponent(s.pathname+s.search)}`)},[i]);const[f,d]=O.useState(""),[m,g]=O.useState(a.get("label")||"default"),[y,E]=O.useState(""),[w,T]=O.useState(!1),z=f.trim().startsWith("sk-ant-oat"),M=f.trim().startsWith("sk-ant-api"),q=Q=>{Q.preventDefault();const ee=f.trim();if(!ee){E("A token or API key is required");return}if(!ee.startsWith("sk-ant-")){E('Invalid format. Must start with "sk-ant-oat" (OAuth token) or "sk-ant-api" (API key)');return}T(!0),E("");const ne=`${Vt}/api/auth/oauth/anthropic/callback?code=${encodeURIComponent(ee)}&state=${encodeURIComponent(o)}`;window.location.href=ne};return h.jsx("div",{className:"min-h-screen bg-surface flex items-center justify-center",children:h.jsxs("div",{className:"w-full max-w-md p-10",children:[h.jsx("div",{className:"mb-10",children:h.jsx(Sh,{size:"lg"})}),h.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[h.jsx($y,{provider:"anthropic",className:"w-6 h-6"}),h.jsx("h2",{className:"text-lg font-semibold text-text-primary",children:"Connect Anthropic"})]}),h.jsx("p",{className:"text-sm text-text-secondary mb-4",children:"Connect your Anthropic account so Claude Code tasks run under your credentials. Your token is encrypted at rest."}),h.jsxs("form",{onSubmit:q,className:"space-y-5",children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"token",className:"block text-sm font-medium text-text-secondary mb-2",children:"OAuth Token or API Key"}),h.jsx("input",{id:"token",type:"password",value:f,onChange:Q=>d(Q.target.value),className:"input",placeholder:"sk-ant-oat01-... or sk-ant-api03-...",autoFocus:!0,autoComplete:"off"}),z&&h.jsx("p",{className:"text-xs text-status-success mt-1",children:"OAuth token detected — uses your Claude subscription (flat rate)"}),M&&h.jsx("p",{className:"text-xs text-status-warning mt-1",children:"API key detected — billed per-token from your Anthropic API account"})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"label",className:"block text-sm font-medium text-text-secondary mb-2",children:"Label"}),h.jsx("input",{id:"label",type:"text",value:m,onChange:Q=>g(Q.target.value.replace(/\s+/g,"-").toLowerCase()),className:"input",placeholder:"default",autoComplete:"off"}),h.jsx("p",{className:"text-xs text-text-tertiary mt-1",children:'A name for this credential. Use different labels to store multiple credentials (e.g., "subscription", "api-batch").'})]}),y&&h.jsx("p",{className:"text-sm text-status-error",children:y}),h.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:w,children:w?"Validating...":"Connect"}),h.jsx("a",{href:"/",className:"block text-center text-sm text-text-tertiary hover:text-text-secondary",children:"Cancel"})]}),h.jsxs("div",{className:"mt-6 space-y-3 text-xs text-text-tertiary",children:[h.jsxs("div",{children:[h.jsx("span",{className:"font-medium text-text-secondary",children:"Recommended:"})," ","Run"," ",h.jsx("code",{className:"px-1 py-0.5 bg-surface-sunken rounded text-[11px]",children:"claude setup-token"})," ","in your terminal to generate an OAuth token that uses your subscription."]}),h.jsxs("div",{children:[h.jsx("span",{className:"font-medium text-text-secondary",children:"Alternative:"})," ","Use an API key from"," ",h.jsx("a",{href:"https://console.anthropic.com/settings/keys",target:"_blank",rel:"noopener noreferrer",className:"text-accent-secondary hover:underline",children:"console.anthropic.com"})," ","(billed per-token)."]})]})]})})}function Ua({roleTypes:i,roleNames:n,redirectTo:s="/"}){const{isSuperAdmin:a,hasRole:o,hasRoleType:f}=ai();return a?h.jsx(jr,{}):i&&i.some(d=>f(d))?h.jsx(jr,{}):n&&n.some(d=>o(d))?h.jsx(jr,{}):h.jsx($n,{to:s,replace:!0})}function UE({redirectTo:i="/"}){var a;const{data:n,isLoading:s}=Br();return s||!n?null:(a=n.ai)!=null&&a.enabled?h.jsx(jr,{}):h.jsx($n,{to:i,replace:!0})}function LE({flag:i,redirectTo:n="/"}){var o;const{data:s,isLoading:a}=Br();return a||!s?null:((o=s.features)==null?void 0:o[i])===!1?h.jsx($n,{to:n,replace:!0}):h.jsx(jr,{})}const HE=O.lazy(()=>Ee(()=>import("./ProcessesListPage-kyRO3E9d.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url).then(i=>({default:i.ProcessesListPage}))),PE=O.lazy(()=>Ee(()=>import("./ProcessDetailPage-BWVFB-nL.js"),__vite__mapDeps([18,1,2,4,19,15,20,17,11,6,21,22,23]),import.meta.url).then(i=>({default:i.ProcessDetailPage}))),$E=O.lazy(()=>Ee(()=>import("./McpOverview-DIenRt0e.js"),__vite__mapDeps([24,1,25,26,27,28,14,15,29,6]),import.meta.url).then(i=>({default:i.McpOverview}))),YE=O.lazy(()=>Ee(()=>import("./McpRunsPage-BWe6WVzw.js"),__vite__mapDeps([30,1,26,27,5,6,31,28,8,9,10,17,15,32,14,13,12,16,33]),import.meta.url).then(i=>({default:i.McpRunsPage}))),GE=O.lazy(()=>Ee(()=>import("./McpRunDetailPage-DDiOtG5r.js"),__vite__mapDeps([34,1,26,20,14,15,35,6,36,37,13,38,39,16]),import.meta.url).then(i=>({default:i.McpRunDetailPage}))),VE=O.lazy(()=>Ee(()=>import("./McpQueryPage-CkT4A2c5.js"),__vite__mapDeps([40,1,14,15,9,10,13,12,16,8,11,32,17,33,5,6,4,41]),import.meta.url).then(i=>({default:i.McpQueryPage}))),FE=O.lazy(()=>Ee(()=>import("./McpQueryDetailPage-CxAR4Bpw.js"),__vite__mapDeps([42,1,14,15,20,41,6,27,4,43,36,26,3,2,44,45,46,47,48,49,35,50,38,39]),import.meta.url).then(i=>({default:i.McpQueryDetailPage}))),IE=O.lazy(()=>Ee(()=>import("./EscalationsOverview-2VRjFxPV.js"),__vite__mapDeps([51,1,4,14,15,29,6]),import.meta.url).then(i=>({default:i.EscalationsOverview}))),JE=O.lazy(()=>Ee(()=>import("./AvailableEscalationsPage-qRf3tBYi.js"),__vite__mapDeps([52,1,6,4,53,54,55,56,20,57,15,5,7,8,9,10,12,14,23,58,13,59,21,17,33,16]),import.meta.url).then(i=>({default:i.AvailableEscalationsPage}))),QE=O.lazy(()=>Ee(()=>import("./OperatorDashboard-CVq7V7hE.js"),__vite__mapDeps([60,1,4,56,5,6,7,8,9,10,14,15,12,33,58,13,59,21,17,57,16]),import.meta.url).then(i=>({default:i.OperatorDashboard}))),XE=O.lazy(()=>Ee(()=>import("./index-DWXhbO4b.js"),__vite__mapDeps([61,1,53,54,6,55,56,14,15,16,57,3,4,62,20,21,35,22,23]),import.meta.url).then(i=>({default:i.EscalationDetailPage}))),KE=O.lazy(()=>Ee(()=>import("./WorkflowsOverview-BFs-ZSTn.js"),__vite__mapDeps([63,1,3,4,14,15,29,6]),import.meta.url).then(i=>({default:i.WorkflowsOverview}))),ZE=O.lazy(()=>Ee(()=>import("./index-BFh7zbQF.js"),__vite__mapDeps([64,1,3,14,15,13,17,65,47,48,6]),import.meta.url).then(i=>({default:i.StartWorkflowPage}))),WE=O.lazy(()=>Ee(()=>import("./index-BFh7zbQF.js"),__vite__mapDeps([64,1,3,14,15,13,17,65,47,48,6]),import.meta.url).then(i=>({default:i.DurableInvokePage}))),eA=O.lazy(()=>Ee(()=>import("./WorkflowsDashboard-DGtMG5vL.js"),__vite__mapDeps([66,1,32,3,31,28,6,4,5,8,9,10,17,15,14,13,12,16,33]),import.meta.url).then(i=>({default:()=>i.WorkflowsDashboard({tier:"durable"})}))),tA=O.lazy(()=>Ee(()=>import("./WorkflowsDashboard-DGtMG5vL.js"),__vite__mapDeps([66,1,32,3,31,28,6,4,5,8,9,10,17,15,14,13,12,16,33]),import.meta.url).then(i=>({default:()=>i.WorkflowsDashboard({tier:"all"})}))),nA=O.lazy(()=>Ee(()=>import("./YamlWorkflowsPage-0Moxrj_c.js"),__vite__mapDeps([67,1,27,5,6,14,15,13,10,49,65,20]),import.meta.url).then(i=>({default:i.YamlWorkflowsPage}))),sA=O.lazy(()=>Ee(()=>import("./GraphInvokePage-B6qAC8zt.js"),__vite__mapDeps([68,1,27,14,15,44,46,47,48,45,6,49,65]),import.meta.url).then(i=>({default:i.GraphInvokePage}))),iA=O.lazy(()=>Ee(()=>import("./YamlWorkflowDetailPage-6FTLoVfO.js"),__vite__mapDeps([69,1,27,20,65,15,6]),import.meta.url).then(i=>({default:i.YamlWorkflowDetailPage}))),rA=O.lazy(()=>Ee(()=>import("./TasksListPage-PKscNTJs.js"),__vite__mapDeps([70,1,2,3,5,6,9,10,20,59,50,12,13,14,15,17]),import.meta.url).then(i=>({default:i.TasksListPage}))),aA=O.lazy(()=>Ee(()=>import("./TaskDetailPage-BVlCa-PR.js"),__vite__mapDeps([71,1,2,20,59,14,15,6]),import.meta.url).then(i=>({default:i.TaskDetailPage}))),Eg=O.lazy(()=>Ee(()=>import("./WorkflowExecutionPage-DtC-71vO.js"),__vite__mapDeps([72,1,3,4,37,13,38,20,6,39,15,2,14,36,16,62,35]),import.meta.url).then(i=>({default:i.WorkflowExecutionPage}))),lA=O.lazy(()=>Ee(()=>import("./AdminDashboard-DmQG0fUK.js"),__vite__mapDeps([73,1,2,4,25,19,15,6]),import.meta.url).then(i=>({default:i.AdminDashboard}))),oA=O.lazy(()=>Ee(()=>import("./index-CTTxpoEl.js"),__vite__mapDeps([74,1,3,9,10,13,33,5,6,14,15,75,17]),import.meta.url).then(i=>({default:i.WorkersPage}))),cA=O.lazy(()=>Ee(()=>import("./index-3ewF-RsR.js"),__vite__mapDeps([76,1,3,13,77,54,6,21,15,17,14,56,47,48,65]),import.meta.url).then(i=>({default:i.WorkflowConfigsPage}))),Ag=O.lazy(()=>Ee(()=>import("./index-3ewF-RsR.js"),__vite__mapDeps([76,1,3,13,77,54,6,21,15,17,14,56,47,48,65]),import.meta.url).then(i=>({default:i.WorkflowConfigDetailPage}))),uA=O.lazy(()=>Ee(()=>import("./index-BYpOpKoM.js"),__vite__mapDeps([78,1,25,10,77,54,6,14,15,13,12,5,79,46,47,48,49,45,33,20]),import.meta.url).then(i=>({default:i.McpServersPage}))),jg=O.lazy(()=>Ee(()=>import("./index-Fc1qNrqI.js"),__vite__mapDeps([80,1,25,14,15,43,6]),import.meta.url).then(i=>({default:i.McpServerDetailPage}))),fA=O.lazy(()=>Ee(()=>import("./index-JQCy1mnu.js"),__vite__mapDeps([81,1,23,5,6,9,10,12,13,77,54,33,14,15,21,48,11,56,50]),import.meta.url).then(i=>({default:i.UsersPage}))),hA=O.lazy(()=>Ee(()=>import("./RolesPage-tT21PIEb.js"),__vite__mapDeps([82,1,56,14,15,54,6]),import.meta.url).then(i=>({default:i.RolesPage}))),dA=O.lazy(()=>Ee(()=>import("./RoleDetailPage-DrSlAQUQ.js"),__vite__mapDeps([83,1,56,77,54,6,23,15]),import.meta.url).then(i=>({default:i.RoleDetailPage}))),mA=O.lazy(()=>Ee(()=>import("./EscalationSchemaPage-9NY4Q4ku.js"),__vite__mapDeps([84,1,56,15,6]),import.meta.url).then(i=>({default:i.EscalationSchemaPage}))),pA=O.lazy(()=>Ee(()=>import("./EscalationListSchemaPage-BEi89A7y.js"),__vite__mapDeps([85,1,56,15,6]),import.meta.url).then(i=>({default:i.EscalationListSchemaPage}))),gA=O.lazy(()=>Ee(()=>import("./index-p85Oqfqc.js"),__vite__mapDeps([86,1,14,15,54,6,55]),import.meta.url).then(i=>({default:i.MaintenancePage}))),yA=O.lazy(()=>Ee(()=>import("./OperationsPage-CzJx-zxj.js").then(i=>i.O),__vite__mapDeps([87,1,56,4,14,15,6]),import.meta.url).then(i=>({default:i.OperationsPage}))),bA=O.lazy(()=>Ee(()=>import("./index-Dq5RU7sm.js"),__vite__mapDeps([88,1,19,15,13,5,6,31,28,54,36,75,9,10,33]),import.meta.url).then(i=>({default:i.ControlPlanePage}))),xA=O.lazy(()=>Ee(()=>import("./index-Be9bw5cd.js"),__vite__mapDeps([89,1,62,15,39,5,6,31,28,8,9,10,12,13,14,16]),import.meta.url).then(i=>({default:i.StreamMessagesPage}))),vA=O.lazy(()=>Ee(()=>import("./CredentialsPage-CjBiPahB.js"),__vite__mapDeps([90,1,14,15,50,77,54,6]),import.meta.url).then(i=>({default:i.CredentialsPage}))),_A=O.lazy(()=>Ee(()=>import("./index-IHOuIqlt.js"),__vite__mapDeps([91,1,6,14,15,13,16,8,10,92,50]),import.meta.url).then(i=>({default:i.FilesPage}))),wA=O.lazy(()=>Ee(()=>import("./index-C42kzl9D.js"),__vite__mapDeps([93,1,14,15,13,16,12,10,92,50,94,43,6]),import.meta.url).then(i=>({default:i.KnowledgePage}))),SA=O.lazy(()=>Ee(()=>import("./HomePage-DDyQOu57.js"),__vite__mapDeps([95,1,56,3,26,28,4,21,15,17,16,87,14,6]),import.meta.url).then(i=>({default:i.HomePage}))),EA=O.lazy(()=>Ee(()=>import("./AgentsPage-GEYMgmez.js"),__vite__mapDeps([96,1,97,4,5,6,8,9,10,12,13,14,15,16]),import.meta.url).then(i=>({default:i.AgentsPage}))),AA=O.lazy(()=>Ee(()=>import("./AgentDetailPage-Cdinl7bx.js"),__vite__mapDeps([98,1,97,99,15,4,17,6]),import.meta.url).then(i=>({default:i.AgentDetailPage}))),Og=O.lazy(()=>Ee(()=>import("./AgentConfigPage-BZ8g7Ml8.js"),__vite__mapDeps([100,1,97,99,15,14,94,46,47,48,3,27,101,102,17,6]),import.meta.url).then(i=>({default:i.AgentConfigPage}))),jA=O.lazy(()=>Ee(()=>import("./CapabilitiesPage-ARIQzRiq.js"),__vite__mapDeps([103,1,101,79,25,46,47,48,15,49,6,45,14,13]),import.meta.url).then(i=>({default:i.CapabilitiesPage}))),OA=O.lazy(()=>Ee(()=>import("./TopicsPage-bFjJUYmO.js"),__vite__mapDeps([104,1,102,14,15,13,6]),import.meta.url).then(i=>({default:i.TopicsPage}))),TA=O.lazy(()=>Ee(()=>import("./TopicDetailPage-BaL3m3yb.js"),__vite__mapDeps([105,1,102,16,15,6]),import.meta.url).then(i=>({default:i.TopicDetailPage})));function kA(){return h.jsxs("div",{className:"animate-pulse space-y-4",children:[h.jsx("div",{className:"h-8 bg-surface-sunken rounded w-48"}),h.jsx("div",{className:"h-40 bg-surface-sunken rounded"})]})}function we({children:i}){return h.jsx(O.Suspense,{fallback:h.jsx(kA,{}),children:h.jsx("div",{className:"animate-page-enter flex flex-col flex-1 min-h-0",children:i})})}const Yy=new ev({defaultOptions:{queries:{staleTime:1e4,retry:(i,n)=>n instanceof Error&&n.message==="Session expired"?!1:i<1}}});window.addEventListener("auth:unauthorized",()=>{Yy.clear(),sessionStorage.removeItem("lt_token"),sessionStorage.removeItem("lt_credentials"),sessionStorage.removeItem("lt_user_info");const i=window.__LT_BASE__||"",n=`${i}/login`;if(window.location.pathname!==n){const s=window.location.pathname+window.location.search,a=i&&s.startsWith(i)?s.slice(i.length)||"/":s;window.location.href=`${n}?returnTo=${encodeURIComponent(a)}`}});const NA=sv([{path:"/login",element:h.jsx(BE,{})},{path:"/connect/anthropic",element:h.jsx(Sg,{})},{path:"/connect/:provider",element:h.jsx(Sg,{})},{path:"/",element:h.jsx(DE,{}),children:[{index:!0,element:h.jsx(we,{children:h.jsx(SA,{})})},{path:"processes/all",element:h.jsx(we,{children:h.jsx(HE,{})})},{path:"processes/detail/:originId",element:h.jsx(we,{children:h.jsx(PE,{})})},{path:"credentials",element:h.jsx(we,{children:h.jsx(vA,{})})},{path:"connections",element:h.jsx($n,{to:"/credentials",replace:!0})},{path:"escalations",element:h.jsx(we,{children:h.jsx(IE,{})})},{path:"escalations/available",element:h.jsx(we,{children:h.jsx(JE,{})})},{path:"escalations/queue",element:h.jsx(we,{children:h.jsx(QE,{})})},{path:"escalations/detail/:id",element:h.jsx(we,{children:h.jsx(XE,{})})},{path:"capabilities",element:h.jsx(we,{children:h.jsx(jA,{})})},{path:"agents",element:h.jsx(we,{children:h.jsx(EA,{})})},{path:"agents/new",element:h.jsx(we,{children:h.jsx(Og,{})})},{path:"agents/:id",element:h.jsx(we,{children:h.jsx(AA,{})})},{path:"agents/:id/edit",element:h.jsx(we,{children:h.jsx(Og,{})})},{path:"topics",element:h.jsx(we,{children:h.jsx(OA,{})})},{path:"topics/:topic",element:h.jsx(we,{children:h.jsx(TA,{})})},{element:h.jsx(Ua,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"workflows",element:h.jsx(we,{children:h.jsx(KE,{})})},{path:"workflows/executions",element:h.jsx(we,{children:h.jsx(tA,{})})},{path:"workflows/durable/executions",element:h.jsx(we,{children:h.jsx(eA,{})})},{path:"workflows/durable/executions/:workflowId",element:h.jsx(we,{children:h.jsx(Eg,{})})},{path:"workflows/tasks",element:h.jsx(we,{children:h.jsx(rA,{})})},{path:"workflows/tasks/detail/:id",element:h.jsx(we,{children:h.jsx(aA,{})})},{path:"workflows/executions/:workflowId",element:h.jsx(we,{children:h.jsx(Eg,{})})},{path:"workflows/start",element:h.jsx(we,{children:h.jsx(ZE,{})})},{path:"workflows/durable/invoke",element:h.jsx(we,{children:h.jsx(WE,{})})},{path:"workflows/cron",element:h.jsx($n,{to:"/workflows/start?mode=schedule",replace:!0})},{path:"workflows/workers",element:h.jsx(we,{children:h.jsx(oA,{})})},{path:"workflows/registry",element:h.jsx(we,{children:h.jsx(cA,{})})},{path:"workflows/registry/new",element:h.jsx(we,{children:h.jsx(Ag,{})})},{path:"workflows/registry/:workflowType",element:h.jsx(we,{children:h.jsx(Ag,{})})}]},{element:h.jsx(Ua,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"mcp/workflows",element:h.jsx(we,{children:h.jsx(nA,{})})},{path:"mcp/workflows/invoke",element:h.jsx(we,{children:h.jsx(sA,{})})},{path:"mcp/workflows/:id",element:h.jsx(we,{children:h.jsx(iA,{})})},{path:"mcp/executions",element:h.jsx(we,{children:h.jsx(YE,{})})},{path:"mcp/executions/:jobId",element:h.jsx(we,{children:h.jsx(GE,{})})},{path:"files",element:h.jsx(we,{children:h.jsx(_A,{})})},{path:"knowledge",element:h.jsx(we,{children:h.jsx(wA,{})})},{element:h.jsx(UE,{}),children:[{path:"mcp",element:h.jsx(we,{children:h.jsx($E,{})})},{path:"mcp/queries",element:h.jsx(we,{children:h.jsx(VE,{})})},{path:"mcp/queries/:workflowId",element:h.jsx(we,{children:h.jsx(FE,{})})},{path:"mcp/tools",element:h.jsx($n,{to:"/mcp/servers",replace:!0})},{path:"mcp/servers",element:h.jsx(we,{children:h.jsx(uA,{})})},{path:"mcp/servers/new",element:h.jsx(we,{children:h.jsx(jg,{})})},{path:"mcp/servers/:serverId",element:h.jsx(we,{children:h.jsx(jg,{})})}]}]},{element:h.jsx(Ua,{roleTypes:["admin","superadmin"],roleNames:["engineer"]}),children:[{path:"operations",element:h.jsx(we,{children:h.jsx(yA,{})})}]},{element:h.jsx(Ua,{roleTypes:["admin","superadmin"],roleNames:["engineer"]}),children:[{path:"admin",element:h.jsx(we,{children:h.jsx(lA,{})})},{path:"admin/users",element:h.jsx(we,{children:h.jsx(fA,{})})},{path:"admin/escalation-chains",element:h.jsx($n,{to:"/admin/roles",replace:!0})},{path:"admin/roles",element:h.jsx(we,{children:h.jsx(hA,{})})},{path:"admin/roles/:role",element:h.jsx(we,{children:h.jsx(dA,{})})},{path:"admin/roles/:role/schema",element:h.jsx(we,{children:h.jsx(mA,{})})},{path:"admin/roles/:role/list-schema",element:h.jsx(we,{children:h.jsx(pA,{})})}]},{element:h.jsx(Ua,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"admin/bots",element:h.jsx($n,{to:"/admin/users?tab=service-accounts",replace:!0})},{element:h.jsx(LE,{flag:"dbMaintenance"}),children:[{path:"admin/maintenance",element:h.jsx(we,{children:h.jsx(gA,{})})}]},{path:"admin/controlplane",element:h.jsx(we,{children:h.jsx(bA,{})})},{path:"admin/streams",element:h.jsx(we,{children:h.jsx(xA,{})})}]}]}],{basename:window.__LT_BASE__||"/"});function CA(){return h.jsx(tv,{client:Yy,children:h.jsx(Lv,{children:h.jsx(Yw,{children:h.jsx(iv,{router:NA})})})})}Ey(Sy());zv.createRoot(document.getElementById("root")).render(h.jsx(O.StrictMode,{children:h.jsx(CA,{})}));export{o3 as $,Th as A,$A as B,Ah as C,OE as D,FA as E,Ny as F,ZA as G,Oh as H,Py as I,J2 as J,i3 as K,t3 as L,jh as M,$_ as N,Vt as O,zg as P,BA as Q,c2 as R,q2 as S,g2 as T,e3 as U,Mo as V,$a as W,wr as X,vr as Y,p2 as Z,l3 as _,a3 as a,$y as a0,n3 as a1,jE as b,G_ as c,Ye as d,PA as e,SE as f,YA as g,VA as h,UA as i,Kw as j,my as k,ai as l,HA as m,yy as n,IA as o,JA as p,QA as q,XA as r,KA as s,WA as t,Br as u,LA as v,Zw as w,GA as x,r3 as y,s3 as z};
63
- //# sourceMappingURL=index-DYcP4jyl.js.map
62
+ ... (truncated)`});const le=`${cS(o.concat(fe))}${ee}`;try{const I=(await Ye("/insight/mcp-query",{method:"POST",body:JSON.stringify({prompt:le,tags:k.suggestedTags,context:k,wait:!1,direct:!0})})).workflow_id;m(I),f(Z=>Z.map(ie=>ie.id===ae.id?{...ie,workflowId:I}:ie)),E.current&&clearInterval(E.current),E.current=setInterval(async()=>{var Z;try{const ie=await Ye(`/workflows/${I}/result`),Ae=(Z=ie==null?void 0:ie.result)==null?void 0:Z.data;if(Ae){E.current&&clearInterval(E.current),E.current=null,m(null);const Re=uS(Ae);let Oe;try{Oe=(await Ye(`/workflow-states/${I}/execution`)).duration_ms}catch{}f($=>$.map(re=>re.id===ae.id?{...re,content:Re,timestamp:new Date().toISOString(),pending:!1,durationMs:Oe}:re))}}catch{}},3e3)}catch{f(V=>V.map(I=>I.id===ae.id?{...I,content:"Failed to submit query. Please try again.",pending:!1}:I))}},[o,w]),Q=O.useCallback(async ee=>{const ne=o.find(k=>k.id===ee);if(!(ne!=null&&ne.workflowId)||ne.compilationStatus==="compiling"||ne.compilationStatus==="done")return;const fe=o.indexOf(ne),ae=o.slice(0,fe).reverse().find(k=>k.role==="user");if(ae){f(k=>k.map(X=>X.id===ee?{...X,compilationStatus:"compiling"}:X));try{const k=await Ye("/insight/mcp-query/describe",{method:"POST",body:JSON.stringify({prompt:ae.content,summary:ne.content})}),X=await Ye("/yaml-workflows",{method:"POST",body:JSON.stringify({workflow_id:ne.workflowId,task_queue:"long-tail-system",workflow_name:"mcpQuery",name:k.tool_name,description:k.description,tags:k.tags,app_id:""})});await Ye(`/yaml-workflows/${X.id}/deploy`,{method:"POST"}),f(le=>le.map(P=>P.id===ee?{...P,compilationStatus:"done"}:P))}catch(k){const X=k instanceof Error?k.message:"Compilation failed";f(le=>le.map(P=>P.id===ee?{...P,compilationStatus:"error",compilationError:X}:P))}}},[o]);return h.jsx(Ry.Provider,{value:{helpOpen:s,setHelpOpen:a,toggleHelp:T,messages:o,sendMessage:q,pageContext:w,setPageContext:z,activeWorkflowId:d,clearMessages:M,compileMessage:Q},children:i})}function Dy(){const i=O.useContext(Ry);if(!i)throw new Error("useHelpAssistant must be used within HelpAssistantProvider");return i}function hS(){const{helpOpen:i,toggleHelp:n}=Dy();return h.jsx("button",{onClick:n,className:"fixed right-3 z-[45] flex items-center justify-center w-10 h-10 rounded-full bg-surface-raised shadow-lg hover:scale-110 transition-transform duration-150 border border-accent/30",style:{bottom:"44px"},"aria-label":i?"Close help":"Ask for help",children:i?h.jsx(Mi,{className:"w-5 h-5 text-text-tertiary",strokeWidth:1.5}):h.jsx("span",{role:"img","aria-label":"Help",className:"logo-mark w-8 h-8 -rotate-[120deg]",style:{"--logo-url":`url(${Vt}/logo512.png)`}})})}const zy=6048e5,dS=864e5,fg=6e4,hg=525600,dg=43200,mg=1440,pg=Symbol.for("constructDateFrom");function bs(i,n){return typeof i=="function"?i(n):i&&typeof i=="object"&&pg in i?i[pg](n):i instanceof Date?new i.constructor(n):new Date(n)}function ln(i,n){return bs(n||i,i)}let mS={};function nl(){return mS}function Za(i,n){var m,g,y,E;const s=nl(),a=(n==null?void 0:n.weekStartsOn)??((g=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??s.weekStartsOn??((E=(y=s.locale)==null?void 0:y.options)==null?void 0:E.weekStartsOn)??0,o=ln(i,n==null?void 0:n.in),f=o.getDay(),d=(f<a?7:0)+f-a;return o.setDate(o.getDate()-d),o.setHours(0,0,0,0),o}function Zo(i,n){return Za(i,{...n,weekStartsOn:1})}function qy(i,n){const s=ln(i,n==null?void 0:n.in),a=s.getFullYear(),o=bs(s,0);o.setFullYear(a+1,0,4),o.setHours(0,0,0,0);const f=Zo(o),d=bs(s,0);d.setFullYear(a,0,4),d.setHours(0,0,0,0);const m=Zo(d);return s.getTime()>=f.getTime()?a+1:s.getTime()>=m.getTime()?a:a-1}function Wo(i){const n=ln(i),s=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return s.setUTCFullYear(n.getFullYear()),+i-+s}function By(i,...n){const s=bs.bind(null,i||n.find(a=>typeof a=="object"));return n.map(s)}function gg(i,n){const s=ln(i,n==null?void 0:n.in);return s.setHours(0,0,0,0),s}function pS(i,n,s){const[a,o]=By(s==null?void 0:s.in,i,n),f=gg(a),d=gg(o),m=+f-Wo(f),g=+d-Wo(d);return Math.round((m-g)/dS)}function gS(i,n){const s=qy(i,n),a=bs(i,0);return a.setFullYear(s,0,4),a.setHours(0,0,0,0),Zo(a)}function yS(i,n){const s=+ln(i)-+ln(n);return s<0?-1:s>0?1:s}function bS(i){return bs(i,Date.now())}function xS(i){return i instanceof Date||typeof i=="object"&&Object.prototype.toString.call(i)==="[object Date]"}function vS(i){return!(!xS(i)&&typeof i!="number"||isNaN(+ln(i)))}function _S(i){return n=>{const a=(i?Math[i]:Math.trunc)(n);return a===0?0:a}}function wS(i,n){const s=ln(i,n==null?void 0:n.in);return s.setFullYear(s.getFullYear(),0,1),s.setHours(0,0,0,0),s}const SS={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ES=(i,n,s)=>{let a;const o=SS[i];return typeof o=="string"?a=o:n===1?a=o.one:a=o.other.replace("{{count}}",n.toString()),s!=null&&s.addSuffix?s.comparison&&s.comparison>0?"in "+a:a+" ago":a};function Rf(i){return(n={})=>{const s=n.width?String(n.width):i.defaultWidth;return i.formats[s]||i.formats[i.defaultWidth]}}const AS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},jS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},OS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},TS={date:Rf({formats:AS,defaultWidth:"full"}),time:Rf({formats:jS,defaultWidth:"full"}),dateTime:Rf({formats:OS,defaultWidth:"full"})},kS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},NS=(i,n,s,a)=>kS[i];function qa(i){return(n,s)=>{const a=s!=null&&s.context?String(s.context):"standalone";let o;if(a==="formatting"&&i.formattingValues){const d=i.defaultFormattingWidth||i.defaultWidth,m=s!=null&&s.width?String(s.width):d;o=i.formattingValues[m]||i.formattingValues[d]}else{const d=i.defaultWidth,m=s!=null&&s.width?String(s.width):i.defaultWidth;o=i.values[m]||i.values[d]}const f=i.argumentCallback?i.argumentCallback(n):n;return o[f]}}const CS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},MS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},RS={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},DS={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},zS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},qS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},BS=(i,n)=>{const s=Number(i),a=s%100;if(a>20||a<10)switch(a%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},US={ordinalNumber:BS,era:qa({values:CS,defaultWidth:"wide"}),quarter:qa({values:MS,defaultWidth:"wide",argumentCallback:i=>i-1}),month:qa({values:RS,defaultWidth:"wide"}),day:qa({values:DS,defaultWidth:"wide"}),dayPeriod:qa({values:zS,defaultWidth:"wide",formattingValues:qS,defaultFormattingWidth:"wide"})};function Ba(i){return(n,s={})=>{const a=s.width,o=a&&i.matchPatterns[a]||i.matchPatterns[i.defaultMatchWidth],f=n.match(o);if(!f)return null;const d=f[0],m=a&&i.parsePatterns[a]||i.parsePatterns[i.defaultParseWidth],g=Array.isArray(m)?HS(m,w=>w.test(d)):LS(m,w=>w.test(d));let y;y=i.valueCallback?i.valueCallback(g):g,y=s.valueCallback?s.valueCallback(y):y;const E=n.slice(d.length);return{value:y,rest:E}}}function LS(i,n){for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&n(i[s]))return s}function HS(i,n){for(let s=0;s<i.length;s++)if(n(i[s]))return s}function PS(i){return(n,s={})=>{const a=n.match(i.matchPattern);if(!a)return null;const o=a[0],f=n.match(i.parsePattern);if(!f)return null;let d=i.valueCallback?i.valueCallback(f[0]):f[0];d=s.valueCallback?s.valueCallback(d):d;const m=n.slice(o.length);return{value:d,rest:m}}}const $S=/^(\d+)(th|st|nd|rd)?/i,YS=/\d+/i,GS={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},VS={any:[/^b/i,/^(a|c)/i]},FS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},IS={any:[/1/i,/2/i,/3/i,/4/i]},JS={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},QS={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},XS={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},KS={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ZS={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},WS={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},eE={ordinalNumber:PS({matchPattern:$S,parsePattern:YS,valueCallback:i=>parseInt(i,10)}),era:Ba({matchPatterns:GS,defaultMatchWidth:"wide",parsePatterns:VS,defaultParseWidth:"any"}),quarter:Ba({matchPatterns:FS,defaultMatchWidth:"wide",parsePatterns:IS,defaultParseWidth:"any",valueCallback:i=>i+1}),month:Ba({matchPatterns:JS,defaultMatchWidth:"wide",parsePatterns:QS,defaultParseWidth:"any"}),day:Ba({matchPatterns:XS,defaultMatchWidth:"wide",parsePatterns:KS,defaultParseWidth:"any"}),dayPeriod:Ba({matchPatterns:ZS,defaultMatchWidth:"any",parsePatterns:WS,defaultParseWidth:"any"})},Uy={code:"en-US",formatDistance:ES,formatLong:TS,formatRelative:NS,localize:US,match:eE,options:{weekStartsOn:0,firstWeekContainsDate:1}};function tE(i,n){const s=ln(i,n==null?void 0:n.in);return pS(s,wS(s))+1}function nE(i,n){const s=ln(i,n==null?void 0:n.in),a=+Zo(s)-+gS(s);return Math.round(a/zy)+1}function Ly(i,n){var E,w,T,z;const s=ln(i,n==null?void 0:n.in),a=s.getFullYear(),o=nl(),f=(n==null?void 0:n.firstWeekContainsDate)??((w=(E=n==null?void 0:n.locale)==null?void 0:E.options)==null?void 0:w.firstWeekContainsDate)??o.firstWeekContainsDate??((z=(T=o.locale)==null?void 0:T.options)==null?void 0:z.firstWeekContainsDate)??1,d=bs((n==null?void 0:n.in)||i,0);d.setFullYear(a+1,0,f),d.setHours(0,0,0,0);const m=Za(d,n),g=bs((n==null?void 0:n.in)||i,0);g.setFullYear(a,0,f),g.setHours(0,0,0,0);const y=Za(g,n);return+s>=+m?a+1:+s>=+y?a:a-1}function sE(i,n){var m,g,y,E;const s=nl(),a=(n==null?void 0:n.firstWeekContainsDate)??((g=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??s.firstWeekContainsDate??((E=(y=s.locale)==null?void 0:y.options)==null?void 0:E.firstWeekContainsDate)??1,o=Ly(i,n),f=bs((n==null?void 0:n.in)||i,0);return f.setFullYear(o,0,a),f.setHours(0,0,0,0),Za(f,n)}function iE(i,n){const s=ln(i,n==null?void 0:n.in),a=+Za(s,n)-+sE(s,n);return Math.round(a/zy)+1}function Fe(i,n){const s=i<0?"-":"",a=Math.abs(i).toString().padStart(n,"0");return s+a}const Ks={y(i,n){const s=i.getFullYear(),a=s>0?s:1-s;return Fe(n==="yy"?a%100:a,n.length)},M(i,n){const s=i.getMonth();return n==="M"?String(s+1):Fe(s+1,2)},d(i,n){return Fe(i.getDate(),n.length)},a(i,n){const s=i.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return s.toUpperCase();case"aaa":return s;case"aaaaa":return s[0];case"aaaa":default:return s==="am"?"a.m.":"p.m."}},h(i,n){return Fe(i.getHours()%12||12,n.length)},H(i,n){return Fe(i.getHours(),n.length)},m(i,n){return Fe(i.getMinutes(),n.length)},s(i,n){return Fe(i.getSeconds(),n.length)},S(i,n){const s=n.length,a=i.getMilliseconds(),o=Math.trunc(a*Math.pow(10,s-3));return Fe(o,n.length)}},_r={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},yg={G:function(i,n,s){const a=i.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return s.era(a,{width:"abbreviated"});case"GGGGG":return s.era(a,{width:"narrow"});case"GGGG":default:return s.era(a,{width:"wide"})}},y:function(i,n,s){if(n==="yo"){const a=i.getFullYear(),o=a>0?a:1-a;return s.ordinalNumber(o,{unit:"year"})}return Ks.y(i,n)},Y:function(i,n,s,a){const o=Ly(i,a),f=o>0?o:1-o;if(n==="YY"){const d=f%100;return Fe(d,2)}return n==="Yo"?s.ordinalNumber(f,{unit:"year"}):Fe(f,n.length)},R:function(i,n){const s=qy(i);return Fe(s,n.length)},u:function(i,n){const s=i.getFullYear();return Fe(s,n.length)},Q:function(i,n,s){const a=Math.ceil((i.getMonth()+1)/3);switch(n){case"Q":return String(a);case"QQ":return Fe(a,2);case"Qo":return s.ordinalNumber(a,{unit:"quarter"});case"QQQ":return s.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return s.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(a,{width:"wide",context:"formatting"})}},q:function(i,n,s){const a=Math.ceil((i.getMonth()+1)/3);switch(n){case"q":return String(a);case"qq":return Fe(a,2);case"qo":return s.ordinalNumber(a,{unit:"quarter"});case"qqq":return s.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return s.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(a,{width:"wide",context:"standalone"})}},M:function(i,n,s){const a=i.getMonth();switch(n){case"M":case"MM":return Ks.M(i,n);case"Mo":return s.ordinalNumber(a+1,{unit:"month"});case"MMM":return s.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return s.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(a,{width:"wide",context:"formatting"})}},L:function(i,n,s){const a=i.getMonth();switch(n){case"L":return String(a+1);case"LL":return Fe(a+1,2);case"Lo":return s.ordinalNumber(a+1,{unit:"month"});case"LLL":return s.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return s.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(a,{width:"wide",context:"standalone"})}},w:function(i,n,s,a){const o=iE(i,a);return n==="wo"?s.ordinalNumber(o,{unit:"week"}):Fe(o,n.length)},I:function(i,n,s){const a=nE(i);return n==="Io"?s.ordinalNumber(a,{unit:"week"}):Fe(a,n.length)},d:function(i,n,s){return n==="do"?s.ordinalNumber(i.getDate(),{unit:"date"}):Ks.d(i,n)},D:function(i,n,s){const a=tE(i);return n==="Do"?s.ordinalNumber(a,{unit:"dayOfYear"}):Fe(a,n.length)},E:function(i,n,s){const a=i.getDay();switch(n){case"E":case"EE":case"EEE":return s.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return s.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(a,{width:"short",context:"formatting"});case"EEEE":default:return s.day(a,{width:"wide",context:"formatting"})}},e:function(i,n,s,a){const o=i.getDay(),f=(o-a.weekStartsOn+8)%7||7;switch(n){case"e":return String(f);case"ee":return Fe(f,2);case"eo":return s.ordinalNumber(f,{unit:"day"});case"eee":return s.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return s.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(o,{width:"short",context:"formatting"});case"eeee":default:return s.day(o,{width:"wide",context:"formatting"})}},c:function(i,n,s,a){const o=i.getDay(),f=(o-a.weekStartsOn+8)%7||7;switch(n){case"c":return String(f);case"cc":return Fe(f,n.length);case"co":return s.ordinalNumber(f,{unit:"day"});case"ccc":return s.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return s.day(o,{width:"narrow",context:"standalone"});case"cccccc":return s.day(o,{width:"short",context:"standalone"});case"cccc":default:return s.day(o,{width:"wide",context:"standalone"})}},i:function(i,n,s){const a=i.getDay(),o=a===0?7:a;switch(n){case"i":return String(o);case"ii":return Fe(o,n.length);case"io":return s.ordinalNumber(o,{unit:"day"});case"iii":return s.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return s.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return s.day(a,{width:"short",context:"formatting"});case"iiii":default:return s.day(a,{width:"wide",context:"formatting"})}},a:function(i,n,s){const o=i.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return s.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(i,n,s){const a=i.getHours();let o;switch(a===12?o=_r.noon:a===0?o=_r.midnight:o=a/12>=1?"pm":"am",n){case"b":case"bb":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return s.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(i,n,s){const a=i.getHours();let o;switch(a>=17?o=_r.evening:a>=12?o=_r.afternoon:a>=4?o=_r.morning:o=_r.night,n){case"B":case"BB":case"BBB":return s.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return s.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(i,n,s){if(n==="ho"){let a=i.getHours()%12;return a===0&&(a=12),s.ordinalNumber(a,{unit:"hour"})}return Ks.h(i,n)},H:function(i,n,s){return n==="Ho"?s.ordinalNumber(i.getHours(),{unit:"hour"}):Ks.H(i,n)},K:function(i,n,s){const a=i.getHours()%12;return n==="Ko"?s.ordinalNumber(a,{unit:"hour"}):Fe(a,n.length)},k:function(i,n,s){let a=i.getHours();return a===0&&(a=24),n==="ko"?s.ordinalNumber(a,{unit:"hour"}):Fe(a,n.length)},m:function(i,n,s){return n==="mo"?s.ordinalNumber(i.getMinutes(),{unit:"minute"}):Ks.m(i,n)},s:function(i,n,s){return n==="so"?s.ordinalNumber(i.getSeconds(),{unit:"second"}):Ks.s(i,n)},S:function(i,n){return Ks.S(i,n)},X:function(i,n,s){const a=i.getTimezoneOffset();if(a===0)return"Z";switch(n){case"X":return xg(a);case"XXXX":case"XX":return ki(a);case"XXXXX":case"XXX":default:return ki(a,":")}},x:function(i,n,s){const a=i.getTimezoneOffset();switch(n){case"x":return xg(a);case"xxxx":case"xx":return ki(a);case"xxxxx":case"xxx":default:return ki(a,":")}},O:function(i,n,s){const a=i.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+bg(a,":");case"OOOO":default:return"GMT"+ki(a,":")}},z:function(i,n,s){const a=i.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+bg(a,":");case"zzzz":default:return"GMT"+ki(a,":")}},t:function(i,n,s){const a=Math.trunc(+i/1e3);return Fe(a,n.length)},T:function(i,n,s){return Fe(+i,n.length)}};function bg(i,n=""){const s=i>0?"-":"+",a=Math.abs(i),o=Math.trunc(a/60),f=a%60;return f===0?s+String(o):s+String(o)+n+Fe(f,2)}function xg(i,n){return i%60===0?(i>0?"-":"+")+Fe(Math.abs(i)/60,2):ki(i,n)}function ki(i,n=""){const s=i>0?"-":"+",a=Math.abs(i),o=Fe(Math.trunc(a/60),2),f=Fe(a%60,2);return s+o+n+f}const vg=(i,n)=>{switch(i){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Hy=(i,n)=>{switch(i){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},rE=(i,n)=>{const s=i.match(/(P+)(p+)?/)||[],a=s[1],o=s[2];if(!o)return vg(i,n);let f;switch(a){case"P":f=n.dateTime({width:"short"});break;case"PP":f=n.dateTime({width:"medium"});break;case"PPP":f=n.dateTime({width:"long"});break;case"PPPP":default:f=n.dateTime({width:"full"});break}return f.replace("{{date}}",vg(a,n)).replace("{{time}}",Hy(o,n))},aE={p:Hy,P:rE},lE=/^D+$/,oE=/^Y+$/,cE=["D","DD","YY","YYYY"];function uE(i){return lE.test(i)}function fE(i){return oE.test(i)}function hE(i,n,s){const a=dE(i,n,s);if(console.warn(a),cE.includes(i))throw new RangeError(a)}function dE(i,n,s){const a=i[0]==="Y"?"years":"days of the month";return`Use \`${i.toLowerCase()}\` instead of \`${i}\` (in \`${n}\`) for formatting ${a} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const mE=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pE=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gE=/^'([^]*?)'?$/,yE=/''/g,bE=/[a-zA-Z]/;function Oh(i,n,s){var E,w,T,z;const a=nl(),o=a.locale??Uy,f=a.firstWeekContainsDate??((w=(E=a.locale)==null?void 0:E.options)==null?void 0:w.firstWeekContainsDate)??1,d=a.weekStartsOn??((z=(T=a.locale)==null?void 0:T.options)==null?void 0:z.weekStartsOn)??0,m=ln(i,s==null?void 0:s.in);if(!vS(m))throw new RangeError("Invalid time value");let g=n.match(pE).map(M=>{const q=M[0];if(q==="p"||q==="P"){const Q=aE[q];return Q(M,o.formatLong)}return M}).join("").match(mE).map(M=>{if(M==="''")return{isToken:!1,value:"'"};const q=M[0];if(q==="'")return{isToken:!1,value:xE(M)};if(yg[q])return{isToken:!0,value:M};if(q.match(bE))throw new RangeError("Format string contains an unescaped latin alphabet character `"+q+"`");return{isToken:!1,value:M}});o.localize.preprocessor&&(g=o.localize.preprocessor(m,g));const y={firstWeekContainsDate:f,weekStartsOn:d,locale:o};return g.map(M=>{if(!M.isToken)return M.value;const q=M.value;(fE(q)||uE(q))&&hE(q,n,String(i));const Q=yg[q[0]];return Q(m,q,o.localize,y)}).join("")}function xE(i){const n=i.match(gE);return n?n[1].replace(yE,"'"):i}function vE(i,n,s){const a=nl(),o=(s==null?void 0:s.locale)??a.locale??Uy,f=yS(i,n);if(isNaN(f))throw new RangeError("Invalid time value");const d=Object.assign({},s,{addSuffix:s==null?void 0:s.addSuffix,comparison:f}),[m,g]=By(s==null?void 0:s.in,...f>0?[n,i]:[i,n]),y=_S((s==null?void 0:s.roundingMethod)??"round"),E=g.getTime()-m.getTime(),w=E/fg,T=Wo(g)-Wo(m),z=(E-T)/fg,M=s==null?void 0:s.unit;let q;if(M?q=M:w<1?q="second":w<60?q="minute":w<mg?q="hour":z<dg?q="day":z<hg?q="month":q="year",q==="second"){const Q=y(E/1e3);return o.formatDistance("xSeconds",Q,d)}else if(q==="minute"){const Q=y(w);return o.formatDistance("xMinutes",Q,d)}else if(q==="hour"){const Q=y(w/60);return o.formatDistance("xHours",Q,d)}else if(q==="day"){const Q=y(z/mg);return o.formatDistance("xDays",Q,d)}else if(q==="month"){const Q=y(z/dg);return Q===12&&M!=="month"?o.formatDistance("xYears",1,d):o.formatDistance("xMonths",Q,d)}else{const Q=y(z/hg);return o.formatDistance("xYears",Q,d)}}function _E(i,n){return vE(i,bS(i),n)}function t3(i){return i.toLocaleString()}function n3(i){return i>=1e9?`${(i/1e9).toFixed(1).replace(/\.0$/,"")}B`:i>=1e6?`${(i/1e6).toFixed(1).replace(/\.0$/,"")}M`:i>=1e4?`${(i/1e3).toFixed(1).replace(/\.0$/,"")}K`:i.toLocaleString()}function wE(i){const n=new Date(i);return n.getTime()>Date.now()?"just now":_E(n,{addSuffix:!0})}function s3(i){const n=Date.now()-new Date(i).getTime();if(n<0)return"now";const s=Math.floor(n/1e3);if(s<60)return`${s}s`;const a=Math.floor(s/60);if(a<60)return`${a}m`;const o=Math.floor(a/60);if(o<24)return`${o}h`;const f=Math.floor(o/24);return f<7?`${f}d`:f<30?`${Math.floor(f/7)}w`:f<365?`${Math.floor(f/30)}mo`:`${Math.floor(f/365)}y`}function i3(i){return i<=0?"Expired":Th(i)}function SE(i){return i==null?"--":Th(i)}function r3(i){return i?Oh(new Date(i),"MMM d, yyyy h:mm a"):"--"}function Th(i){if(i<1e3)return`${Math.round(i)}ms`;if(i<6e4){const d=i/1e3;return Number.isInteger(d)?`${d}s`:`${d.toFixed(1)}s`}const n=Math.floor(i/1e3),s=Math.floor(n/86400),a=Math.floor(n%86400/3600),o=Math.floor(n%3600/60),f=n%60;return s>0?a>0?`${s}d ${a}h`:`${s}d`:a>0?o>0?`${a}h ${o}m`:`${a}h`:f>0?`${o}m ${f}s`:`${o}m`}function a3(i,n){const s=new Date(i).getTime(),a=n?new Date(n).getTime():Date.now();return Th(a-s)}function Py({options:i,children:n,className:s=""}){const[a,o]=O.useState(!1),[f,d]=O.useState(null),[m,g]=O.useState(null),y=O.useRef(null),E=O.useRef(void 0),w=O.useRef(void 0),T=220,z=O.useCallback(()=>{if(!y.current)return;const ee=y.current.getBoundingClientRect(),ne=window.innerWidth-T-8,fe=Math.max(8,Math.min(ee.left,ne));g({top:ee.bottom+4,left:fe})},[]),M=O.useCallback(async(ee,ne)=>{try{await navigator.clipboard.writeText(ee),d(ne),clearTimeout(E.current),E.current=setTimeout(()=>d(null),1200)}catch{}},[]),q=O.useCallback(()=>{clearTimeout(w.current),z(),o(!0)},[z]),Q=O.useCallback(()=>{w.current=setTimeout(()=>o(!1),150)},[]);return O.useEffect(()=>()=>{clearTimeout(E.current),clearTimeout(w.current)},[]),h.jsxs("span",{ref:y,className:`inline-flex items-center cursor-default ${s}`,onMouseEnter:q,onMouseLeave:Q,children:[n,a&&m&&Tg.createPortal(h.jsx("span",{className:"fixed z-[9999] bg-surface-raised border border-surface-border rounded shadow-lg py-1 min-w-[180px]",style:{top:m.top,left:m.left},onMouseEnter:q,onMouseLeave:Q,children:i.map(ee=>h.jsxs("button",{onClick:ne=>{ne.stopPropagation(),M(ee.value,ee.label)},className:"flex items-center justify-between w-full px-2.5 py-1 text-left hover:bg-surface-hover transition-colors",children:[h.jsx("span",{className:"text-[9px] font-medium uppercase tracking-wider text-text-tertiary w-10 shrink-0",children:ee.label}),h.jsx("span",{className:"text-[10px] font-mono text-text-secondary truncate ml-2",children:f===ee.label?"✓":ee.value})]},ee.label))}),document.body)]})}function EE(i,n){const s=new Date(i);switch(n){case"relative":return wE(i);case"datetime":return Oh(s,"MMM d, yyyy h:mm a");case"time":return s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}}function AE(i){const n=new Date(i);return[{label:"ms",value:String(n.getTime())},{label:"utc",value:n.toISOString()},{label:"local",value:Oh(n,"MMM d, yyyy h:mm:ss a")}]}function jE({date:i,format:n="relative",className:s=""}){const[,a]=O.useState(0);O.useEffect(()=>{if(n!=="relative")return;const f=setInterval(()=>a(d=>d+1),3e4);return()=>clearInterval(f)},[n]);const o=O.useMemo(()=>AE(i),[i]);return h.jsx(Py,{options:o,children:h.jsx("time",{dateTime:i,className:`text-xs text-text-tertiary ${s}`,children:EE(i,n)})})}function OE({ms:i,className:n=""}){const s=SE(i),a=O.useMemo(()=>i==null?[]:[{label:"ms",value:String(i)},{label:"sec",value:`${(i/1e3).toFixed(3)}s`},{label:"text",value:s}],[i,s]);return i==null?h.jsx("span",{className:`text-xs text-text-tertiary ${n}`,children:"--"}):h.jsx(Py,{options:a,children:h.jsx("span",{className:`text-xs text-text-tertiary ${n}`,children:s})})}const TE=["sm","md","lg","full"],_g={sm:"w-[28rem] max-h-[40vh]",md:"w-[36rem] max-h-[60vh]",lg:"w-[48rem] max-h-[80vh]",full:"inset-4 w-auto max-h-none"},wg={sm:"Small",md:"Medium",lg:"Large",full:"Fullscreen"};function kE({which:i}){const n="stroke-current";switch(i){case"sm":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"5",y:"5",width:"7",height:"7",rx:"1.5",className:n,strokeWidth:"1.5"})});case"md":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"3",y:"3",width:"9",height:"9",rx:"1.5",className:n,strokeWidth:"1.5"})});case"lg":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"1.5",y:"1.5",width:"11",height:"11",rx:"1.5",className:n,strokeWidth:"1.5"})});case"full":return h.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:h.jsx("rect",{x:"0.75",y:"0.75",width:"12.5",height:"12.5",rx:"1.5",className:n,strokeWidth:"1.5"})})}}function NE({msg:i}){const[n,s]=O.useState(0);O.useEffect(()=>{const d=new Date(i.timestamp).getTime(),m=()=>s(Math.floor((Date.now()-d)/1e3));m();const g=setInterval(m,1e3);return()=>clearInterval(g)},[i.timestamp]);const a=Math.floor(n/60),o=n%60,f=a>0?`${a}m ${o}s`:`${o}s`;return h.jsxs("span",{className:"inline-flex flex-col gap-1.5",children:[h.jsxs("span",{className:"inline-flex items-center gap-1",children:[h.jsx("span",{className:"text-text-tertiary",children:"Thinking"}),h.jsx("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse"}),h.jsx("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse [animation-delay:150ms]"}),h.jsx("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse [animation-delay:300ms]"}),h.jsx("span",{className:"text-text-muted ml-1 tabular-nums",children:f})]}),i.workflowId&&h.jsxs(Ni,{to:`/workflows/executions/${i.workflowId}`,className:"inline-flex items-center gap-1 text-[10px] text-accent/70 hover:text-accent transition-colors",children:[h.jsx(rh,{className:"w-2.5 h-2.5",strokeWidth:1.5}),"watch execution"]})]})}function CE({msg:i,compileMessage:n}){const s=i.role==="assistant";return h.jsxs("div",{className:`flex items-center gap-1.5 ${s?"justify-start":"justify-end"}`,children:[h.jsx(jE,{date:i.timestamp,format:"time",className:"!text-[9px] text-text-muted/50"}),i.durationMs!=null&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-text-muted/30 text-[8px]",children:"·"}),h.jsx(OE,{ms:i.durationMs,className:"!text-[9px] text-text-muted/50"})]}),i.workflowId&&h.jsx(Ni,{to:`/workflows/executions/${i.workflowId}`,className:"text-text-muted/40 hover:text-accent transition-colors",title:"View workflow execution",children:h.jsx(rh,{className:"w-2.5 h-2.5",strokeWidth:1.5})}),s&&i.workflowId&&!i.pending&&h.jsx("button",{onClick:()=>n(i.id),disabled:i.compilationStatus==="compiling"||i.compilationStatus==="done",className:"transition-colors",title:i.compilationStatus==="done"?"Compiled — future queries will match this pipeline":i.compilationStatus==="error"?i.compilationError??"Compilation failed":i.compilationStatus==="compiling"?"Compiling...":"Compile to fast pipeline",children:h.jsx(jv,{className:`w-2.5 h-2.5 ${i.compilationStatus==="done"?"text-status-success":i.compilationStatus==="error"?"text-status-error":i.compilationStatus==="compiling"?"text-accent/40 animate-pulse":"text-text-muted/40 hover:text-accent"}`,strokeWidth:1.5})})]})}function ME(){const{helpOpen:i,setHelpOpen:n,messages:s,sendMessage:a,pageContext:o,activeWorkflowId:f,clearMessages:d,compileMessage:m}=Dy(),[g,y]=O.useState(""),[E,w]=O.useState("md"),[T,z]=O.useState(!0),M=O.useRef(null),q=O.useRef(null);if(O.useEffect(()=>{M.current&&(M.current.scrollTop=M.current.scrollHeight)},[s]),O.useEffect(()=>{i&&q.current&&q.current.focus()},[i]),O.useEffect(()=>{if(!i)return;const k=X=>{X.key==="Escape"&&(E==="full"?w("lg"):E==="lg"?w("md"):E==="md"?w("sm"):n(!1))};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[i,E,n]),!i)return null;const Q=()=>{const k=g.trim();!k||f||(a(k),y(""),q.current&&(q.current.style.height="auto"))},ee=k=>{k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),Q())},ne=E==="full",fe=o.page.replace(/-/g," "),ae=ne?{}:{bottom:"108px"};return h.jsxs("div",{className:`fixed z-[45] flex flex-col border border-surface-border rounded-lg overflow-hidden transition-all duration-300 ${ne?_g.full:`right-6 ${_g[E]}`} ${T?"bg-surface-raised shadow-xl":"bg-surface-raised/[0.03] shadow-lg shadow-black/5"}`,style:ae,onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[h.jsxs("div",{className:`flex items-center justify-between px-4 py-2.5 border-b border-surface-border shrink-0 transition-all duration-300 ${T?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("p",{className:"text-xs font-medium text-text-primary truncate",children:"Help Assistant"}),h.jsx("p",{className:"text-[10px] text-text-tertiary truncate",children:fe})]}),h.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[h.jsx("div",{className:"flex items-center gap-0.5 border border-surface-border rounded p-0.5",role:"radiogroup","aria-label":"Panel size",children:TE.map(k=>h.jsx("button",{onClick:()=>w(k),className:`p-1 rounded transition-colors ${k===E?"bg-accent/15 text-accent":"text-text-muted hover:text-text-secondary hover:bg-surface-hover"}`,role:"radio","aria-checked":k===E,"aria-label":wg[k],title:wg[k],children:h.jsx(kE,{which:k})},k))}),s.length>0&&h.jsx("button",{onClick:d,className:"p-1 text-text-tertiary hover:text-text-secondary transition-colors","aria-label":"Clear conversation",title:"Clear conversation",children:h.jsx(Ov,{className:"w-3.5 h-3.5",strokeWidth:1.5})}),h.jsx("button",{onClick:()=>n(!1),className:"p-1 text-text-tertiary hover:text-text-primary transition-colors","aria-label":"Close",title:"Close",children:h.jsx(Mi,{className:"w-3.5 h-3.5",strokeWidth:1.5})})]})]}),h.jsxs("div",{ref:M,className:`flex-1 overflow-y-auto px-4 py-3 space-y-3 min-h-[120px] transition-all duration-300 ${T?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[s.length===0&&h.jsx("p",{className:"text-xs text-text-tertiary text-center py-6",children:"Ask anything about what you're viewing."}),s.map(k=>h.jsxs("div",{className:`text-xs leading-relaxed ${k.role==="user"?"text-right":"text-left"}`,children:[h.jsx("div",{className:`inline-block max-w-[85%] px-3 py-2 rounded-md whitespace-pre-wrap ${k.role==="user"?"bg-accent/10 text-text-primary":"bg-surface-sunken text-text-secondary"}`,children:k.pending?h.jsx(NE,{msg:k}):k.role==="assistant"?h.jsx(jh,{content:k.content}):k.content}),!k.pending&&h.jsx("div",{className:"mt-0.5",children:h.jsx(CE,{msg:k,compileMessage:m})})]},k.id))]}),h.jsxs("div",{className:`border-t border-surface-border px-3 py-2.5 flex gap-2 shrink-0 transition-all duration-300 ${T?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[h.jsx("textarea",{ref:q,value:g,onChange:k=>{y(k.target.value);const X=k.target;X.style.height="auto",X.style.height=`${Math.min(X.scrollHeight,120)}px`},onKeyDown:ee,placeholder:"Ask a question...",rows:2,className:"flex-1 resize-none bg-surface text-xs text-text-primary placeholder:text-text-tertiary rounded px-2.5 py-1.5 border border-surface-border focus:outline-none focus:border-accent",style:{minHeight:"2.5rem"},disabled:!!f}),h.jsx("button",{onClick:Q,disabled:!g.trim()||!!f,className:"px-2.5 py-1.5 text-accent hover:text-accent-hover disabled:text-text-muted transition-colors self-end","aria-label":"Send",children:h.jsx(Tv,{className:"w-4 h-4",strokeWidth:1.5})})]})]})}function RE(){var Q;const{isBuilder:i,isOps:n,viewAs:s}=yy(),{data:a}=Br(),o=my(),f=o!==null?o:!!((Q=a==null?void 0:a.ai)!=null&&Q.enabled),{collapsed:d,toggle:m}=xy(),[g,y]=O.useState(!1),[E,w]=O.useState(!1),[T,z]=O.useState(()=>window.location.hash.startsWith("#docs")),M=xs(),q=O.useRef(null);return O.useEffect(()=>{const ee=q.current;ee&&(ee.classList.remove("animate-page-in"),ee.offsetWidth,ee.classList.add("animate-page-in"))},[M.pathname]),O.useEffect(()=>{const ee=()=>{window.location.hash.startsWith("#docs")&&z(!0)};return window.addEventListener("hashchange",ee),()=>window.removeEventListener("hashchange",ee)},[]),h.jsxs("div",{className:"h-screen bg-surface flex flex-col",children:[h.jsx(v2,{onToggleEventFeed:()=>y(ee=>!ee),onToggleDocs:()=>z(ee=>!ee)}),h.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[h.jsxs("aside",{className:`${d?"w-16":"w-60"} shrink-0 bg-surface-raised border-r border-surface-border flex flex-col transition-[width] duration-200 ease-out overflow-hidden relative z-20`,children:[h.jsxs("nav",{className:"flex-1 px-3 pt-[36px] pb-4 space-y-2 overflow-y-auto overflow-x-hidden",children:[h.jsx(j2,{aiEnabled:f,isBuilder:i,isOps:n,viewAs:s}),i&&h.jsx(O2,{}),i&&f&&h.jsx(k2,{}),i&&h.jsx(C2,{}),(i||n)&&h.jsx(M2,{isBuilder:i,isOps:n})]}),h.jsx("button",{onClick:m,className:`shrink-0 py-3 text-text-tertiary hover:text-text-secondary transition-colors duration-150 ${d?"flex justify-center":"flex items-center px-7"}`,"aria-label":d?"Expand sidebar":"Collapse sidebar",children:d?h.jsx(kv,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5}):h.jsx(Nv,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5})}),!d&&(a==null?void 0:a.environment)&&h.jsxs("div",{className:"shrink-0 px-5 pb-3 text-[10px] leading-tight text-text-tertiary whitespace-nowrap overflow-hidden text-ellipsis",title:`long-tail v${a.environment.longTailVersion} · HotMesh v${a.environment.hotmeshVersion} · Node ${a.environment.nodeVersion} · ${a.environment.nodeEnv}`,children:["long-tail v",a.environment.longTailVersion,h.jsx("span",{className:"mx-1 text-surface-border",children:"·"}),"HotMesh v",a.environment.hotmeshVersion]})]}),h.jsx("main",{className:"flex-1 overflow-y-auto",children:h.jsx("div",{ref:q,className:"w-full px-10 py-10 pb-16 animate-page-in h-full flex flex-col",children:h.jsx(jr,{})})})]}),h.jsx(K2,{open:g,onToggle:()=>y(ee=>!ee),configOpen:E,onToggleConfig:()=>w(ee=>!ee)}),h.jsx(lS,{open:T,onClose:()=>{z(!1),history.replaceState(null,"",window.location.pathname+window.location.search)}}),f&&h.jsx(hS,{}),f&&h.jsx(ME,{})]})}function DE(){const{isAuthenticated:i}=ai(),n=xs();return i?h.jsx(Xw,{children:h.jsx(fS,{children:h.jsx(RE,{})})}):h.jsx($n,{to:"/login",state:{from:n.pathname},replace:!0})}function $y({provider:i,className:n="w-5 h-5"}){switch(i){case"google":return h.jsxs("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:[h.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),h.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),h.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),h.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]});case"github":return h.jsx("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:h.jsx("path",{d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"})});case"microsoft":return h.jsxs("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:[h.jsx("path",{d:"M3 3h8.5v8.5H3z",fill:"#F25022"}),h.jsx("path",{d:"M12.5 3H21v8.5h-8.5z",fill:"#7FBA00"}),h.jsx("path",{d:"M3 12.5h8.5V21H3z",fill:"#00A4EF"}),h.jsx("path",{d:"M12.5 12.5H21V21h-8.5z",fill:"#FFB900"})]});case"anthropic":return h.jsx("svg",{className:n,viewBox:"0 0 24 24",fill:"currentColor",children:h.jsx("path",{d:"M13.827 3.52h3.603L24 20.48h-3.603l-6.57-16.96zm-7.258 0h3.767L16.906 20.48h-3.674l-1.343-3.461H6.396l-1.34 3.461H1.5l5.07-16.96zm2.327 5.14l-2.065 5.326h4.108l-2.043-5.326z"})});default:return h.jsxs("svg",{className:n,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[h.jsx("circle",{cx:"12",cy:"12",r:"10"}),h.jsx("path",{d:"M12 8v4l3 3"})]})}}async function zE(){return Ye("/auth/oauth/providers")}async function qE(i,n){const s=n?`?label=${encodeURIComponent(n)}`:"";return Ye(`/auth/oauth/connections/${i}${s}`,{method:"DELETE"})}function l3(){return Sn({queryKey:["oauth-connections"],queryFn:()=>Ye("/auth/oauth/connections")})}function o3(){const i=on();return En({mutationFn:({provider:n,label:s})=>qE(n,s),onSuccess:()=>{i.invalidateQueries({queryKey:["oauth-connections"]})}})}function BE(){var le;const{login:i,isAuthenticated:n}=ai(),s=kg(),a=xs(),o=new URLSearchParams(a.search),f=o.get("token"),d=o.get("error"),m=((le=a.state)==null?void 0:le.from)??o.get("returnTo")??"/",g=O.useRef(!1);f&&!g.current&&(g.current=!0,i(f,void 0,{displayName:o.get("displayName"),username:o.get("username")}));const[y,E]=O.useState(""),[w,T]=O.useState(""),[z,M]=O.useState(d||""),[q,Q]=O.useState(!1),[ee,ne]=O.useState(!!f),[fe,ae]=O.useState([]),k=O.useRef(!1);if(O.useEffect(()=>{f||k.current||(k.current=!0,(async()=>{var P,V,I,Z;try{const ie=await fetch(`${Vt}/api/settings`);if(!ie.ok)return;const Ae=await ie.json();if(!((P=Ae.auth)!=null&&P.sso))return;const Re=await fetch(`${Vt}/api/auth/sso`,{method:"POST"});if(!Re.ok){M("Host authentication required — please log in to your organization first");return}const Oe=await Re.json();Oe.token&&((V=Ae.auth)!=null&&V.ssoLogoutUrl&&sessionStorage.setItem("lt_sso_logout_url",Ae.auth.ssoLogoutUrl),ne(!0),i(Oe.token,void 0,{displayName:(I=Oe.user)==null?void 0:I.display_name,username:(Z=Oe.user)==null?void 0:Z.external_id}))}catch{}})())},[]),O.useEffect(()=>{f||zE().then(ae).catch(()=>{})},[]),O.useEffect(()=>{if(!ee)return;const P=setTimeout(()=>s(m,{replace:!0}),1500);return()=>clearTimeout(P)},[ee]),n&&!ee)return h.jsx($n,{to:m,replace:!0});const X=async P=>{var V,I;if(P.preventDefault(),M(""),!y.trim()||!w){M("Username and password are required");return}Q(!0);try{const Z=await fetch(`${Vt}/api/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:y.trim(),password:w})}),ie=await Z.json();if(!Z.ok){M(ie.error||"Login failed");return}ne(!0),i(ie.token,{username:y.trim(),password:w},{displayName:(V=ie.user)==null?void 0:V.display_name,username:(I=ie.user)==null?void 0:I.external_id})}catch{M("Unable to connect to server")}finally{Q(!1)}};return h.jsx("div",{className:"min-h-screen bg-surface flex items-center justify-center overflow-hidden",children:h.jsxs("div",{className:"w-full max-w-md p-10",children:[h.jsx("div",{className:`mb-10 transition-all duration-[1500ms] ease-in ${ee?"translate-x-[120vw] -translate-y-[60vh] scale-[3] opacity-0":""}`,children:h.jsx(Sh,{size:"lg",hideLabel:ee})}),h.jsxs("form",{onSubmit:X,className:`space-y-5 transition-opacity duration-300 ${ee?"opacity-0":""}`,children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"username",className:"block text-sm font-medium text-text-secondary mb-2",children:"Username"}),h.jsx("input",{id:"username",type:"text",value:y,onChange:P=>E(P.target.value),className:"input",placeholder:"Enter your username",autoFocus:!ee,autoComplete:"username"})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-text-secondary mb-2",children:"Password"}),h.jsx("input",{id:"password",type:"password",value:w,onChange:P=>T(P.target.value),className:"input",placeholder:"Enter your password",autoComplete:"current-password"})]}),z&&h.jsx("p",{className:"text-sm text-status-error",children:z}),h.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:q||ee,children:q?"Signing in...":"Sign In"}),fe.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center gap-3 mt-6",children:[h.jsx("div",{className:"flex-1 h-px bg-border"}),h.jsx("span",{className:"text-xs text-text-tertiary",children:"or continue with"}),h.jsx("div",{className:"flex-1 h-px bg-border"})]}),h.jsx("div",{className:"space-y-2",children:fe.filter(P=>P.provider!=="anthropic").map(P=>h.jsxs("a",{href:`${Vt}/api/auth/oauth/${P.provider}?returnTo=${encodeURIComponent(m)}`,className:"btn-secondary w-full flex items-center justify-center gap-2",children:[h.jsx($y,{provider:P.provider}),"Sign in with ",P.name]},P.provider))})]})]})]})})}function Sg(){const{isAuthenticated:i}=ai(),n=kg(),s=xs(),a=new URLSearchParams(s.search),o=a.get("state")||"";O.useEffect(()=>{i||n(`/login?returnTo=${encodeURIComponent(s.pathname+s.search)}`)},[i]);const[f,d]=O.useState(""),[m,g]=O.useState(a.get("label")||"default"),[y,E]=O.useState(""),[w,T]=O.useState(!1),z=f.trim().startsWith("sk-ant-oat"),M=f.trim().startsWith("sk-ant-api"),q=Q=>{Q.preventDefault();const ee=f.trim();if(!ee){E("A token or API key is required");return}if(!ee.startsWith("sk-ant-")){E('Invalid format. Must start with "sk-ant-oat" (OAuth token) or "sk-ant-api" (API key)');return}T(!0),E("");const ne=`${Vt}/api/auth/oauth/anthropic/callback?code=${encodeURIComponent(ee)}&state=${encodeURIComponent(o)}`;window.location.href=ne};return h.jsx("div",{className:"min-h-screen bg-surface flex items-center justify-center",children:h.jsxs("div",{className:"w-full max-w-md p-10",children:[h.jsx("div",{className:"mb-10",children:h.jsx(Sh,{size:"lg"})}),h.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[h.jsx($y,{provider:"anthropic",className:"w-6 h-6"}),h.jsx("h2",{className:"text-lg font-semibold text-text-primary",children:"Connect Anthropic"})]}),h.jsx("p",{className:"text-sm text-text-secondary mb-4",children:"Connect your Anthropic account so Claude Code tasks run under your credentials. Your token is encrypted at rest."}),h.jsxs("form",{onSubmit:q,className:"space-y-5",children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"token",className:"block text-sm font-medium text-text-secondary mb-2",children:"OAuth Token or API Key"}),h.jsx("input",{id:"token",type:"password",value:f,onChange:Q=>d(Q.target.value),className:"input",placeholder:"sk-ant-oat01-... or sk-ant-api03-...",autoFocus:!0,autoComplete:"off"}),z&&h.jsx("p",{className:"text-xs text-status-success mt-1",children:"OAuth token detected — uses your Claude subscription (flat rate)"}),M&&h.jsx("p",{className:"text-xs text-status-warning mt-1",children:"API key detected — billed per-token from your Anthropic API account"})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"label",className:"block text-sm font-medium text-text-secondary mb-2",children:"Label"}),h.jsx("input",{id:"label",type:"text",value:m,onChange:Q=>g(Q.target.value.replace(/\s+/g,"-").toLowerCase()),className:"input",placeholder:"default",autoComplete:"off"}),h.jsx("p",{className:"text-xs text-text-tertiary mt-1",children:'A name for this credential. Use different labels to store multiple credentials (e.g., "subscription", "api-batch").'})]}),y&&h.jsx("p",{className:"text-sm text-status-error",children:y}),h.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:w,children:w?"Validating...":"Connect"}),h.jsx("a",{href:"/",className:"block text-center text-sm text-text-tertiary hover:text-text-secondary",children:"Cancel"})]}),h.jsxs("div",{className:"mt-6 space-y-3 text-xs text-text-tertiary",children:[h.jsxs("div",{children:[h.jsx("span",{className:"font-medium text-text-secondary",children:"Recommended:"})," ","Run"," ",h.jsx("code",{className:"px-1 py-0.5 bg-surface-sunken rounded text-[11px]",children:"claude setup-token"})," ","in your terminal to generate an OAuth token that uses your subscription."]}),h.jsxs("div",{children:[h.jsx("span",{className:"font-medium text-text-secondary",children:"Alternative:"})," ","Use an API key from"," ",h.jsx("a",{href:"https://console.anthropic.com/settings/keys",target:"_blank",rel:"noopener noreferrer",className:"text-accent-secondary hover:underline",children:"console.anthropic.com"})," ","(billed per-token)."]})]})]})})}function Ua({roleTypes:i,roleNames:n,redirectTo:s="/"}){const{isSuperAdmin:a,hasRole:o,hasRoleType:f}=ai();return a?h.jsx(jr,{}):i&&i.some(d=>f(d))?h.jsx(jr,{}):n&&n.some(d=>o(d))?h.jsx(jr,{}):h.jsx($n,{to:s,replace:!0})}function UE({redirectTo:i="/"}){var a;const{data:n,isLoading:s}=Br();return s||!n?null:(a=n.ai)!=null&&a.enabled?h.jsx(jr,{}):h.jsx($n,{to:i,replace:!0})}function LE({flag:i,redirectTo:n="/"}){var o;const{data:s,isLoading:a}=Br();return a||!s?null:((o=s.features)==null?void 0:o[i])===!1?h.jsx($n,{to:n,replace:!0}):h.jsx(jr,{})}const HE=O.lazy(()=>Ee(()=>import("./ProcessesListPage-DAgFK_ln.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]),import.meta.url).then(i=>({default:i.ProcessesListPage}))),PE=O.lazy(()=>Ee(()=>import("./ProcessDetailPage-BVR41sYI.js"),__vite__mapDeps([18,1,2,4,19,15,20,17,11,6,21,22,23]),import.meta.url).then(i=>({default:i.ProcessDetailPage}))),$E=O.lazy(()=>Ee(()=>import("./McpOverview-BukcrbtX.js"),__vite__mapDeps([24,1,25,26,27,28,14,15,29,6]),import.meta.url).then(i=>({default:i.McpOverview}))),YE=O.lazy(()=>Ee(()=>import("./McpRunsPage-CzISyj7e.js"),__vite__mapDeps([30,1,26,27,5,6,31,28,8,9,10,17,15,32,14,13,12,16,33]),import.meta.url).then(i=>({default:i.McpRunsPage}))),GE=O.lazy(()=>Ee(()=>import("./McpRunDetailPage-D3dcICPJ.js"),__vite__mapDeps([34,1,26,20,14,15,35,6,36,37,13,38,39,16]),import.meta.url).then(i=>({default:i.McpRunDetailPage}))),VE=O.lazy(()=>Ee(()=>import("./McpQueryPage-DPXnA6Wa.js"),__vite__mapDeps([40,1,14,15,9,10,13,12,16,8,11,32,17,33,5,6,4,41]),import.meta.url).then(i=>({default:i.McpQueryPage}))),FE=O.lazy(()=>Ee(()=>import("./McpQueryDetailPage-BVx-cGFZ.js"),__vite__mapDeps([42,1,14,15,20,41,6,27,4,43,36,26,3,2,44,45,46,47,48,49,35,50,38,39]),import.meta.url).then(i=>({default:i.McpQueryDetailPage}))),IE=O.lazy(()=>Ee(()=>import("./EscalationsOverview-BY4dLou7.js"),__vite__mapDeps([51,1,4,14,15,29,6]),import.meta.url).then(i=>({default:i.EscalationsOverview}))),JE=O.lazy(()=>Ee(()=>import("./AvailableEscalationsPage-B1cCs4jO.js"),__vite__mapDeps([52,1,6,4,53,54,55,56,20,12,57,15,5,7,8,9,10,14,23,58,13,59,21,17,33,16]),import.meta.url).then(i=>({default:i.AvailableEscalationsPage}))),QE=O.lazy(()=>Ee(()=>import("./OperatorDashboard-C_bMBGyy.js"),__vite__mapDeps([60,1,4,56,5,6,7,8,9,10,14,15,12,33,58,13,59,21,17,57,16]),import.meta.url).then(i=>({default:i.OperatorDashboard}))),XE=O.lazy(()=>Ee(()=>import("./index-D9I9XhrD.js"),__vite__mapDeps([61,1,53,54,6,55,56,14,15,16,57,3,4,62,20,21,35,22,23]),import.meta.url).then(i=>({default:i.EscalationDetailPage}))),KE=O.lazy(()=>Ee(()=>import("./WorkflowsOverview-CVd-TybI.js"),__vite__mapDeps([63,1,3,4,14,15,29,6]),import.meta.url).then(i=>({default:i.WorkflowsOverview}))),ZE=O.lazy(()=>Ee(()=>import("./index-B9YOp7_Z.js"),__vite__mapDeps([64,1,3,14,15,13,17,65,47,48,6]),import.meta.url).then(i=>({default:i.StartWorkflowPage}))),WE=O.lazy(()=>Ee(()=>import("./index-B9YOp7_Z.js"),__vite__mapDeps([64,1,3,14,15,13,17,65,47,48,6]),import.meta.url).then(i=>({default:i.DurableInvokePage}))),eA=O.lazy(()=>Ee(()=>import("./WorkflowsDashboard-BqMJDhpp.js"),__vite__mapDeps([66,1,32,3,31,28,6,4,5,8,9,10,17,15,14,13,12,16,33]),import.meta.url).then(i=>({default:()=>i.WorkflowsDashboard({tier:"durable"})}))),tA=O.lazy(()=>Ee(()=>import("./WorkflowsDashboard-BqMJDhpp.js"),__vite__mapDeps([66,1,32,3,31,28,6,4,5,8,9,10,17,15,14,13,12,16,33]),import.meta.url).then(i=>({default:()=>i.WorkflowsDashboard({tier:"all"})}))),nA=O.lazy(()=>Ee(()=>import("./YamlWorkflowsPage-D2LRoAki.js"),__vite__mapDeps([67,1,27,5,6,14,15,13,10,49,65,20]),import.meta.url).then(i=>({default:i.YamlWorkflowsPage}))),sA=O.lazy(()=>Ee(()=>import("./GraphInvokePage-7T-6qC2N.js"),__vite__mapDeps([68,1,27,14,15,44,46,47,48,45,6,49,65]),import.meta.url).then(i=>({default:i.GraphInvokePage}))),iA=O.lazy(()=>Ee(()=>import("./YamlWorkflowDetailPage-BshuXnvM.js"),__vite__mapDeps([69,1,27,20,65,15,6]),import.meta.url).then(i=>({default:i.YamlWorkflowDetailPage}))),rA=O.lazy(()=>Ee(()=>import("./TasksListPage-CkbK3vdj.js"),__vite__mapDeps([70,1,2,3,5,6,9,10,20,59,50,12,13,14,15,17]),import.meta.url).then(i=>({default:i.TasksListPage}))),aA=O.lazy(()=>Ee(()=>import("./TaskDetailPage-DAnT9c0v.js"),__vite__mapDeps([71,1,2,20,59,14,15,6]),import.meta.url).then(i=>({default:i.TaskDetailPage}))),Eg=O.lazy(()=>Ee(()=>import("./WorkflowExecutionPage-s4H5TnRv.js"),__vite__mapDeps([72,1,3,4,37,13,38,20,6,39,15,2,14,36,16,62,35]),import.meta.url).then(i=>({default:i.WorkflowExecutionPage}))),lA=O.lazy(()=>Ee(()=>import("./AdminDashboard-PvD1IObg.js"),__vite__mapDeps([73,1,2,4,25,19,15,6]),import.meta.url).then(i=>({default:i.AdminDashboard}))),oA=O.lazy(()=>Ee(()=>import("./index-D3_Kc337.js"),__vite__mapDeps([74,1,3,9,10,13,33,5,6,14,15,75,17]),import.meta.url).then(i=>({default:i.WorkersPage}))),cA=O.lazy(()=>Ee(()=>import("./index-DpYsAAsj.js"),__vite__mapDeps([76,1,3,13,77,54,6,21,15,17,14,56,47,48,65]),import.meta.url).then(i=>({default:i.WorkflowConfigsPage}))),Ag=O.lazy(()=>Ee(()=>import("./index-DpYsAAsj.js"),__vite__mapDeps([76,1,3,13,77,54,6,21,15,17,14,56,47,48,65]),import.meta.url).then(i=>({default:i.WorkflowConfigDetailPage}))),uA=O.lazy(()=>Ee(()=>import("./index-C15QKc-V.js"),__vite__mapDeps([78,1,25,10,77,54,6,14,15,13,12,5,79,46,47,48,49,45,33,20]),import.meta.url).then(i=>({default:i.McpServersPage}))),jg=O.lazy(()=>Ee(()=>import("./index-DNKzmRA3.js"),__vite__mapDeps([80,1,25,14,15,43,6]),import.meta.url).then(i=>({default:i.McpServerDetailPage}))),fA=O.lazy(()=>Ee(()=>import("./index-JMRKuqah.js"),__vite__mapDeps([81,1,23,5,6,9,10,12,13,77,54,33,14,15,21,48,11,56,50]),import.meta.url).then(i=>({default:i.UsersPage}))),hA=O.lazy(()=>Ee(()=>import("./RolesPage-dRSC725H.js"),__vite__mapDeps([82,1,56,14,15,54,6]),import.meta.url).then(i=>({default:i.RolesPage}))),dA=O.lazy(()=>Ee(()=>import("./RoleDetailPage-NxT8GaWV.js"),__vite__mapDeps([83,1,56,77,54,6,23,15]),import.meta.url).then(i=>({default:i.RoleDetailPage}))),mA=O.lazy(()=>Ee(()=>import("./EscalationSchemaPage-CXvjwJ_I.js"),__vite__mapDeps([84,1,56,15,6]),import.meta.url).then(i=>({default:i.EscalationSchemaPage}))),pA=O.lazy(()=>Ee(()=>import("./EscalationListSchemaPage-CxFxPz4C.js"),__vite__mapDeps([85,1,56,15,6]),import.meta.url).then(i=>({default:i.EscalationListSchemaPage}))),gA=O.lazy(()=>Ee(()=>import("./index-d8dDpRIs.js"),__vite__mapDeps([86,1,14,15,54,6,55]),import.meta.url).then(i=>({default:i.MaintenancePage}))),yA=O.lazy(()=>Ee(()=>import("./OperationsPage-BYth5Dxg.js").then(i=>i.O),__vite__mapDeps([87,1,56,4,14,15,6]),import.meta.url).then(i=>({default:i.OperationsPage}))),bA=O.lazy(()=>Ee(()=>import("./index-D9GgDI2q.js"),__vite__mapDeps([88,1,19,15,13,5,6,31,28,54,36,75,9,10,33]),import.meta.url).then(i=>({default:i.ControlPlanePage}))),xA=O.lazy(()=>Ee(()=>import("./index-D_FpjN49.js"),__vite__mapDeps([89,1,62,15,39,5,6,31,28,8,9,10,12,13,14,16]),import.meta.url).then(i=>({default:i.StreamMessagesPage}))),vA=O.lazy(()=>Ee(()=>import("./CredentialsPage-Bt7tQHlp.js"),__vite__mapDeps([90,1,14,15,50,77,54,6]),import.meta.url).then(i=>({default:i.CredentialsPage}))),_A=O.lazy(()=>Ee(()=>import("./index-CvyZWk2N.js"),__vite__mapDeps([91,1,6,14,15,13,16,8,10,92,50]),import.meta.url).then(i=>({default:i.FilesPage}))),wA=O.lazy(()=>Ee(()=>import("./index-DQgRu4cd.js"),__vite__mapDeps([93,1,14,15,13,16,12,10,92,50,94,43,6]),import.meta.url).then(i=>({default:i.KnowledgePage}))),SA=O.lazy(()=>Ee(()=>import("./HomePage-1PI7E3sw.js"),__vite__mapDeps([95,1,56,3,26,28,4,21,15,17,16,87,14,6]),import.meta.url).then(i=>({default:i.HomePage}))),EA=O.lazy(()=>Ee(()=>import("./AgentsPage-CgUucHar.js"),__vite__mapDeps([96,1,97,4,5,6,8,9,10,12,13,14,15,16]),import.meta.url).then(i=>({default:i.AgentsPage}))),AA=O.lazy(()=>Ee(()=>import("./AgentDetailPage-B570UVLx.js"),__vite__mapDeps([98,1,97,99,15,4,17,6]),import.meta.url).then(i=>({default:i.AgentDetailPage}))),Og=O.lazy(()=>Ee(()=>import("./AgentConfigPage-BB9NCIiK.js"),__vite__mapDeps([100,1,97,99,15,14,94,46,47,48,3,27,101,102,17,6]),import.meta.url).then(i=>({default:i.AgentConfigPage}))),jA=O.lazy(()=>Ee(()=>import("./CapabilitiesPage-C8DL3cDA.js"),__vite__mapDeps([103,1,101,79,25,46,47,48,15,49,6,45,14,13]),import.meta.url).then(i=>({default:i.CapabilitiesPage}))),OA=O.lazy(()=>Ee(()=>import("./TopicsPage-OzE8IWZf.js"),__vite__mapDeps([104,1,102,14,15,13,6]),import.meta.url).then(i=>({default:i.TopicsPage}))),TA=O.lazy(()=>Ee(()=>import("./TopicDetailPage-DQa0EuM9.js"),__vite__mapDeps([105,1,102,16,15,6]),import.meta.url).then(i=>({default:i.TopicDetailPage})));function kA(){return h.jsxs("div",{className:"animate-pulse space-y-4",children:[h.jsx("div",{className:"h-8 bg-surface-sunken rounded w-48"}),h.jsx("div",{className:"h-40 bg-surface-sunken rounded"})]})}function we({children:i}){return h.jsx(O.Suspense,{fallback:h.jsx(kA,{}),children:h.jsx("div",{className:"animate-page-enter flex flex-col flex-1 min-h-0",children:i})})}const Yy=new ev({defaultOptions:{queries:{staleTime:1e4,retry:(i,n)=>n instanceof Error&&n.message==="Session expired"?!1:i<1}}});window.addEventListener("auth:unauthorized",()=>{Yy.clear(),sessionStorage.removeItem("lt_token"),sessionStorage.removeItem("lt_credentials"),sessionStorage.removeItem("lt_user_info");const i=window.__LT_BASE__||"",n=`${i}/login`;if(window.location.pathname!==n){const s=window.location.pathname+window.location.search,a=i&&s.startsWith(i)?s.slice(i.length)||"/":s;window.location.href=`${n}?returnTo=${encodeURIComponent(a)}`}});const NA=sv([{path:"/login",element:h.jsx(BE,{})},{path:"/connect/anthropic",element:h.jsx(Sg,{})},{path:"/connect/:provider",element:h.jsx(Sg,{})},{path:"/",element:h.jsx(DE,{}),children:[{index:!0,element:h.jsx(we,{children:h.jsx(SA,{})})},{path:"processes/all",element:h.jsx(we,{children:h.jsx(HE,{})})},{path:"processes/detail/:originId",element:h.jsx(we,{children:h.jsx(PE,{})})},{path:"credentials",element:h.jsx(we,{children:h.jsx(vA,{})})},{path:"connections",element:h.jsx($n,{to:"/credentials",replace:!0})},{path:"escalations",element:h.jsx(we,{children:h.jsx(IE,{})})},{path:"escalations/available",element:h.jsx(we,{children:h.jsx(JE,{})})},{path:"escalations/queue",element:h.jsx(we,{children:h.jsx(QE,{})})},{path:"escalations/detail/:id",element:h.jsx(we,{children:h.jsx(XE,{})})},{path:"capabilities",element:h.jsx(we,{children:h.jsx(jA,{})})},{path:"agents",element:h.jsx(we,{children:h.jsx(EA,{})})},{path:"agents/new",element:h.jsx(we,{children:h.jsx(Og,{})})},{path:"agents/:id",element:h.jsx(we,{children:h.jsx(AA,{})})},{path:"agents/:id/edit",element:h.jsx(we,{children:h.jsx(Og,{})})},{path:"topics",element:h.jsx(we,{children:h.jsx(OA,{})})},{path:"topics/:topic",element:h.jsx(we,{children:h.jsx(TA,{})})},{element:h.jsx(Ua,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"workflows",element:h.jsx(we,{children:h.jsx(KE,{})})},{path:"workflows/executions",element:h.jsx(we,{children:h.jsx(tA,{})})},{path:"workflows/durable/executions",element:h.jsx(we,{children:h.jsx(eA,{})})},{path:"workflows/durable/executions/:workflowId",element:h.jsx(we,{children:h.jsx(Eg,{})})},{path:"workflows/tasks",element:h.jsx(we,{children:h.jsx(rA,{})})},{path:"workflows/tasks/detail/:id",element:h.jsx(we,{children:h.jsx(aA,{})})},{path:"workflows/executions/:workflowId",element:h.jsx(we,{children:h.jsx(Eg,{})})},{path:"workflows/start",element:h.jsx(we,{children:h.jsx(ZE,{})})},{path:"workflows/durable/invoke",element:h.jsx(we,{children:h.jsx(WE,{})})},{path:"workflows/cron",element:h.jsx($n,{to:"/workflows/start?mode=schedule",replace:!0})},{path:"workflows/workers",element:h.jsx(we,{children:h.jsx(oA,{})})},{path:"workflows/registry",element:h.jsx(we,{children:h.jsx(cA,{})})},{path:"workflows/registry/new",element:h.jsx(we,{children:h.jsx(Ag,{})})},{path:"workflows/registry/:workflowType",element:h.jsx(we,{children:h.jsx(Ag,{})})}]},{element:h.jsx(Ua,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"mcp/workflows",element:h.jsx(we,{children:h.jsx(nA,{})})},{path:"mcp/workflows/invoke",element:h.jsx(we,{children:h.jsx(sA,{})})},{path:"mcp/workflows/:id",element:h.jsx(we,{children:h.jsx(iA,{})})},{path:"mcp/executions",element:h.jsx(we,{children:h.jsx(YE,{})})},{path:"mcp/executions/:jobId",element:h.jsx(we,{children:h.jsx(GE,{})})},{path:"files",element:h.jsx(we,{children:h.jsx(_A,{})})},{path:"knowledge",element:h.jsx(we,{children:h.jsx(wA,{})})},{element:h.jsx(UE,{}),children:[{path:"mcp",element:h.jsx(we,{children:h.jsx($E,{})})},{path:"mcp/queries",element:h.jsx(we,{children:h.jsx(VE,{})})},{path:"mcp/queries/:workflowId",element:h.jsx(we,{children:h.jsx(FE,{})})},{path:"mcp/tools",element:h.jsx($n,{to:"/mcp/servers",replace:!0})},{path:"mcp/servers",element:h.jsx(we,{children:h.jsx(uA,{})})},{path:"mcp/servers/new",element:h.jsx(we,{children:h.jsx(jg,{})})},{path:"mcp/servers/:serverId",element:h.jsx(we,{children:h.jsx(jg,{})})}]}]},{element:h.jsx(Ua,{roleTypes:["admin","superadmin"],roleNames:["engineer"]}),children:[{path:"operations",element:h.jsx(we,{children:h.jsx(yA,{})})}]},{element:h.jsx(Ua,{roleTypes:["admin","superadmin"],roleNames:["engineer"]}),children:[{path:"admin",element:h.jsx(we,{children:h.jsx(lA,{})})},{path:"admin/users",element:h.jsx(we,{children:h.jsx(fA,{})})},{path:"admin/escalation-chains",element:h.jsx($n,{to:"/admin/roles",replace:!0})},{path:"admin/roles",element:h.jsx(we,{children:h.jsx(hA,{})})},{path:"admin/roles/:role",element:h.jsx(we,{children:h.jsx(dA,{})})},{path:"admin/roles/:role/schema",element:h.jsx(we,{children:h.jsx(mA,{})})},{path:"admin/roles/:role/list-schema",element:h.jsx(we,{children:h.jsx(pA,{})})}]},{element:h.jsx(Ua,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"admin/bots",element:h.jsx($n,{to:"/admin/users?tab=service-accounts",replace:!0})},{element:h.jsx(LE,{flag:"dbMaintenance"}),children:[{path:"admin/maintenance",element:h.jsx(we,{children:h.jsx(gA,{})})}]},{path:"admin/controlplane",element:h.jsx(we,{children:h.jsx(bA,{})})},{path:"admin/streams",element:h.jsx(we,{children:h.jsx(xA,{})})}]}]}],{basename:window.__LT_BASE__||"/"});function CA(){return h.jsx(tv,{client:Yy,children:h.jsx(Lv,{children:h.jsx(Yw,{children:h.jsx(iv,{router:NA})})})})}Ey(Sy());zv.createRoot(document.getElementById("root")).render(h.jsx(O.StrictMode,{children:h.jsx(CA,{})}));export{o3 as $,Th as A,$A as B,Ah as C,OE as D,FA as E,Ny as F,ZA as G,Oh as H,Py as I,J2 as J,i3 as K,t3 as L,jh as M,$_ as N,Vt as O,zg as P,BA as Q,c2 as R,q2 as S,g2 as T,e3 as U,Mo as V,$a as W,wr as X,vr as Y,p2 as Z,l3 as _,a3 as a,$y as a0,n3 as a1,jE as b,G_ as c,Ye as d,PA as e,SE as f,YA as g,VA as h,UA as i,Kw as j,my as k,ai as l,HA as m,yy as n,IA as o,JA as p,QA as q,XA as r,KA as s,WA as t,Br as u,LA as v,Zw as w,GA as x,r3 as y,s3 as z};
63
+ //# sourceMappingURL=index-BJwHI2aX.js.map