@hotmeshio/long-tail 0.10.6 → 0.10.7
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.
- package/build/api/escalations/bulk.d.ts +16 -4
- package/build/api/escalations/bulk.js +42 -7
- package/build/api/escalations/resolve.js +57 -15
- package/build/routes/escalations/bulk.js +1 -0
- package/build/sdk/index.d.ts +5 -1
- package/build/services/escalation/bulk.d.ts +14 -0
- package/build/services/escalation/bulk.js +17 -0
- package/build/services/escalation/crud.d.ts +13 -2
- package/build/services/escalation/crud.js +9 -4
- package/build/services/orchestrator/condition.d.ts +20 -0
- package/build/services/orchestrator/condition.js +30 -6
- package/build/types/escalation.d.ts +8 -0
- package/dashboard/dist/assets/{AdminDashboard-B5B8cf1A.js → AdminDashboard-CYlm0_J0.js} +2 -2
- package/dashboard/dist/assets/{AdminDashboard-B5B8cf1A.js.map → AdminDashboard-CYlm0_J0.js.map} +1 -1
- package/dashboard/dist/assets/{AgentConfigPage-BxuHbkDF.js → AgentConfigPage-BttOMcj_.js} +2 -2
- package/dashboard/dist/assets/{AgentConfigPage-BxuHbkDF.js.map → AgentConfigPage-BttOMcj_.js.map} +1 -1
- package/dashboard/dist/assets/{AgentDetailPage-Bv89ria_.js → AgentDetailPage-D9JdkWV8.js} +2 -2
- package/dashboard/dist/assets/{AgentDetailPage-Bv89ria_.js.map → AgentDetailPage-D9JdkWV8.js.map} +1 -1
- package/dashboard/dist/assets/{AgentsPage-BPgki44D.js → AgentsPage-AqGtEOL1.js} +2 -2
- package/dashboard/dist/assets/{AgentsPage-BPgki44D.js.map → AgentsPage-AqGtEOL1.js.map} +1 -1
- package/dashboard/dist/assets/{AvailableEscalationsPage-Dq_FyUcB.js → AvailableEscalationsPage-rKbrcY8Y.js} +2 -2
- package/dashboard/dist/assets/{AvailableEscalationsPage-Dq_FyUcB.js.map → AvailableEscalationsPage-rKbrcY8Y.js.map} +1 -1
- package/dashboard/dist/assets/{BotPicker-D-WegFKH.js → BotPicker-Bj4MB_so.js} +2 -2
- package/dashboard/dist/assets/{BotPicker-D-WegFKH.js.map → BotPicker-Bj4MB_so.js.map} +1 -1
- package/dashboard/dist/assets/{CapabilitiesPage-C8Zxzh1x.js → CapabilitiesPage-DzLP5-ad.js} +2 -2
- package/dashboard/dist/assets/{CapabilitiesPage-C8Zxzh1x.js.map → CapabilitiesPage-DzLP5-ad.js.map} +1 -1
- package/dashboard/dist/assets/{CollapsibleSection-Ca2iifr4.js → CollapsibleSection-CReMhtzK.js} +2 -2
- package/dashboard/dist/assets/{CollapsibleSection-Ca2iifr4.js.map → CollapsibleSection-CReMhtzK.js.map} +1 -1
- package/dashboard/dist/assets/{CountdownTimer-CQSukTT4.js → CountdownTimer-Z8N8ccJ1.js} +2 -2
- package/dashboard/dist/assets/{CountdownTimer-CQSukTT4.js.map → CountdownTimer-Z8N8ccJ1.js.map} +1 -1
- package/dashboard/dist/assets/{CredentialsPage-BFf0p9CE.js → CredentialsPage-D_2T6vSb.js} +2 -2
- package/dashboard/dist/assets/{CredentialsPage-BFf0p9CE.js.map → CredentialsPage-D_2T6vSb.js.map} +1 -1
- package/dashboard/dist/assets/{CronLabel-CvjUA6jF.js → CronLabel-DBmKrLvL.js} +2 -2
- package/dashboard/dist/assets/{CronLabel-CvjUA6jF.js.map → CronLabel-DBmKrLvL.js.map} +1 -1
- package/dashboard/dist/assets/{CustomDurationPicker-znQCEiPe.js → CustomDurationPicker-BTmpAQOL.js} +2 -2
- package/dashboard/dist/assets/{CustomDurationPicker-znQCEiPe.js.map → CustomDurationPicker-BTmpAQOL.js.map} +1 -1
- package/dashboard/dist/assets/{ElapsedCell-C0pd3pO8.js → ElapsedCell-C0LbM8o2.js} +2 -2
- package/dashboard/dist/assets/{ElapsedCell-C0pd3pO8.js.map → ElapsedCell-C0LbM8o2.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationListSchemaPage-BRrrftTq.js → EscalationListSchemaPage-CkEJnFKd.js} +2 -2
- package/dashboard/dist/assets/{EscalationListSchemaPage-BRrrftTq.js.map → EscalationListSchemaPage-CkEJnFKd.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationSchemaPage-ChawQh5H.js → EscalationSchemaPage-CnlwGAIE.js} +2 -2
- package/dashboard/dist/assets/{EscalationSchemaPage-ChawQh5H.js.map → EscalationSchemaPage-CnlwGAIE.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationsOverview-D3dFDffZ.js → EscalationsOverview-DFM-f7do.js} +2 -2
- package/dashboard/dist/assets/{EscalationsOverview-D3dFDffZ.js.map → EscalationsOverview-DFM-f7do.js.map} +1 -1
- package/dashboard/dist/assets/{EventTable-C6vkJJcQ.js → EventTable-Q3iICRf_.js} +2 -2
- package/dashboard/dist/assets/{EventTable-C6vkJJcQ.js.map → EventTable-Q3iICRf_.js.map} +1 -1
- package/dashboard/dist/assets/{FilterBar-OqpCEYW2.js → FilterBar-B0taDH7I.js} +2 -2
- package/dashboard/dist/assets/{FilterBar-OqpCEYW2.js.map → FilterBar-B0taDH7I.js.map} +1 -1
- package/dashboard/dist/assets/{GraphInvokePage-CJOyaU4g.js → GraphInvokePage-B_P3pJeA.js} +2 -2
- package/dashboard/dist/assets/{GraphInvokePage-CJOyaU4g.js.map → GraphInvokePage-B_P3pJeA.js.map} +1 -1
- package/dashboard/dist/assets/{HomePage-DxJz7AQ7.js → HomePage-lu88PzQH.js} +2 -2
- package/dashboard/dist/assets/{HomePage-DxJz7AQ7.js.map → HomePage-lu88PzQH.js.map} +1 -1
- package/dashboard/dist/assets/{ListToolbar-B6ZoJ4Rd.js → ListToolbar-ueCQtu5C.js} +2 -2
- package/dashboard/dist/assets/{ListToolbar-B6ZoJ4Rd.js.map → ListToolbar-ueCQtu5C.js.map} +1 -1
- package/dashboard/dist/assets/{McpOverview-YPY-lX3M.js → McpOverview-DMaRUXnA.js} +2 -2
- package/dashboard/dist/assets/{McpOverview-YPY-lX3M.js.map → McpOverview-DMaRUXnA.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryDetailPage-Ct3Mb1R2.js → McpQueryDetailPage-D6YSD94n.js} +2 -2
- package/dashboard/dist/assets/{McpQueryDetailPage-Ct3Mb1R2.js.map → McpQueryDetailPage-D6YSD94n.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryPage-C5-AQvnp.js → McpQueryPage-CNGNB59o.js} +2 -2
- package/dashboard/dist/assets/{McpQueryPage-C5-AQvnp.js.map → McpQueryPage-CNGNB59o.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunDetailPage-Bl12usuN.js → McpRunDetailPage-CJ9hDTNs.js} +2 -2
- package/dashboard/dist/assets/{McpRunDetailPage-Bl12usuN.js.map → McpRunDetailPage-CJ9hDTNs.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunsPage-PRAQPR-H.js → McpRunsPage-_UaoIwzX.js} +2 -2
- package/dashboard/dist/assets/{McpRunsPage-PRAQPR-H.js.map → McpRunsPage-_UaoIwzX.js.map} +1 -1
- package/dashboard/dist/assets/{OperationsPage-DLGNcE-b.js → OperationsPage-CTfwuWXR.js} +2 -2
- package/dashboard/dist/assets/{OperationsPage-DLGNcE-b.js.map → OperationsPage-CTfwuWXR.js.map} +1 -1
- package/dashboard/dist/assets/{OperatorDashboard-353PWYOD.js → OperatorDashboard-DMPJmgP_.js} +2 -2
- package/dashboard/dist/assets/{OperatorDashboard-353PWYOD.js.map → OperatorDashboard-DMPJmgP_.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessDetailPage-DyB979ge.js → ProcessDetailPage-CxJ5BSDk.js} +2 -2
- package/dashboard/dist/assets/{ProcessDetailPage-DyB979ge.js.map → ProcessDetailPage-CxJ5BSDk.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessesListPage-BPi9CNxQ.js → ProcessesListPage-GQMOo5Wo.js} +2 -2
- package/dashboard/dist/assets/{ProcessesListPage-BPi9CNxQ.js.map → ProcessesListPage-GQMOo5Wo.js.map} +1 -1
- package/dashboard/dist/assets/{RoleDetailPage-D6K3tdNO.js → RoleDetailPage-Bh5qdI0w.js} +2 -2
- package/dashboard/dist/assets/{RoleDetailPage-D6K3tdNO.js.map → RoleDetailPage-Bh5qdI0w.js.map} +1 -1
- package/dashboard/dist/assets/{RolesPage-C_i2RLwv.js → RolesPage-BIg3_Em6.js} +2 -2
- package/dashboard/dist/assets/{RolesPage-C_i2RLwv.js.map → RolesPage-BIg3_Em6.js.map} +1 -1
- package/dashboard/dist/assets/{RunAsSelector-CWBQWKM0.js → RunAsSelector-DQp_keSD.js} +2 -2
- package/dashboard/dist/assets/{RunAsSelector-CWBQWKM0.js.map → RunAsSelector-DQp_keSD.js.map} +1 -1
- package/dashboard/dist/assets/{StickyPagination-4cY0OXWj.js → StickyPagination-qLaLa33X.js} +2 -2
- package/dashboard/dist/assets/{StickyPagination-4cY0OXWj.js.map → StickyPagination-qLaLa33X.js.map} +1 -1
- package/dashboard/dist/assets/{StreamMessageDetail-DxA7AzOR.js → StreamMessageDetail-Bi37x95H.js} +2 -2
- package/dashboard/dist/assets/{StreamMessageDetail-DxA7AzOR.js.map → StreamMessageDetail-Bi37x95H.js.map} +1 -1
- package/dashboard/dist/assets/{SwimlaneTimeline-BlinxMjc.js → SwimlaneTimeline-BdNhoiW8.js} +2 -2
- package/dashboard/dist/assets/{SwimlaneTimeline-BlinxMjc.js.map → SwimlaneTimeline-BdNhoiW8.js.map} +1 -1
- package/dashboard/dist/assets/{TaskDetailPage-Cbr6Bzx3.js → TaskDetailPage-ngdXRgQp.js} +2 -2
- package/dashboard/dist/assets/{TaskDetailPage-Cbr6Bzx3.js.map → TaskDetailPage-ngdXRgQp.js.map} +1 -1
- package/dashboard/dist/assets/{TasksListPage-DNjZbo42.js → TasksListPage-BIE7nrdE.js} +2 -2
- package/dashboard/dist/assets/{TasksListPage-DNjZbo42.js.map → TasksListPage-BIE7nrdE.js.map} +1 -1
- package/dashboard/dist/assets/{TimeAgo-BEOuisPG.js → TimeAgo-C6FZSNZp.js} +2 -2
- package/dashboard/dist/assets/{TimeAgo-BEOuisPG.js.map → TimeAgo-C6FZSNZp.js.map} +1 -1
- package/dashboard/dist/assets/{TimestampCell--CLqQOJa.js → TimestampCell-DI5zPUgV.js} +2 -2
- package/dashboard/dist/assets/{TimestampCell--CLqQOJa.js.map → TimestampCell-DI5zPUgV.js.map} +1 -1
- package/dashboard/dist/assets/{ToolTestPanel-x7po38Fn.js → ToolTestPanel-Dli94RPI.js} +2 -2
- package/dashboard/dist/assets/{ToolTestPanel-x7po38Fn.js.map → ToolTestPanel-Dli94RPI.js.map} +1 -1
- package/dashboard/dist/assets/{TopicDetailPage-Bay2lUOW.js → TopicDetailPage-vPtXb7gD.js} +2 -2
- package/dashboard/dist/assets/{TopicDetailPage-Bay2lUOW.js.map → TopicDetailPage-vPtXb7gD.js.map} +1 -1
- package/dashboard/dist/assets/{TopicsPage-Ckh6ln0h.js → TopicsPage-BwiEX0pU.js} +2 -2
- package/dashboard/dist/assets/{TopicsPage-Ckh6ln0h.js.map → TopicsPage-BwiEX0pU.js.map} +1 -1
- package/dashboard/dist/assets/{UserName-Doe8DDXc.js → UserName-YozoXJA1.js} +2 -2
- package/dashboard/dist/assets/{UserName-Doe8DDXc.js.map → UserName-YozoXJA1.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowExecutionPage-DPymyMAM.js → WorkflowExecutionPage-Bce8g08l.js} +2 -2
- package/dashboard/dist/assets/{WorkflowExecutionPage-DPymyMAM.js.map → WorkflowExecutionPage-Bce8g08l.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsDashboard-CrwdULL7.js → WorkflowsDashboard-DpVAH35I.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsDashboard-CrwdULL7.js.map → WorkflowsDashboard-DpVAH35I.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsOverview-YoPFHjOb.js → WorkflowsOverview-Bp2pxXJO.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsOverview-YoPFHjOb.js.map → WorkflowsOverview-Bp2pxXJO.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowDetailPage-B4H8WvSt.js → YamlWorkflowDetailPage-CL_kD0mX.js} +2 -2
- package/dashboard/dist/assets/{YamlWorkflowDetailPage-B4H8WvSt.js.map → YamlWorkflowDetailPage-CL_kD0mX.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowsPage-gburzX11.js → YamlWorkflowsPage-Dtt3x3_T.js} +2 -2
- package/dashboard/dist/assets/{YamlWorkflowsPage-gburzX11.js.map → YamlWorkflowsPage-Dtt3x3_T.js.map} +1 -1
- package/dashboard/dist/assets/{agents-BwrYw_S8.js → agents-xhtLVBwq.js} +2 -2
- package/dashboard/dist/assets/{agents-BwrYw_S8.js.map → agents-xhtLVBwq.js.map} +1 -1
- package/dashboard/dist/assets/{bots-C0vU7IG9.js → bots-DZ1MQUms.js} +2 -2
- package/dashboard/dist/assets/{bots-C0vU7IG9.js.map → bots-DZ1MQUms.js.map} +1 -1
- package/dashboard/dist/assets/{capabilities-DOE8jqWc.js → capabilities-B8j2h7Jn.js} +2 -2
- package/dashboard/dist/assets/{capabilities-DOE8jqWc.js.map → capabilities-B8j2h7Jn.js.map} +1 -1
- package/dashboard/dist/assets/{controlplane-TtPp8V9E.js → controlplane-DKijNA6h.js} +2 -2
- package/dashboard/dist/assets/{controlplane-TtPp8V9E.js.map → controlplane-DKijNA6h.js.map} +1 -1
- package/dashboard/dist/assets/{escalation-columns-Cyp-K89u.js → escalation-columns-DjoZ4dDb.js} +2 -2
- package/dashboard/dist/assets/{escalation-columns-Cyp-K89u.js.map → escalation-columns-DjoZ4dDb.js.map} +1 -1
- package/dashboard/dist/assets/{index-zuK6pSyZ.js → index-0SzWFShg.js} +2 -2
- package/dashboard/dist/assets/{index-zuK6pSyZ.js.map → index-0SzWFShg.js.map} +1 -1
- package/dashboard/dist/assets/{index-j-X71wT4.js → index-B0ktIiOY.js} +2 -2
- package/dashboard/dist/assets/{index-j-X71wT4.js.map → index-B0ktIiOY.js.map} +1 -1
- package/dashboard/dist/assets/{index-CkwNuQzx.js → index-BCIJE--_.js} +2 -2
- package/dashboard/dist/assets/{index-CkwNuQzx.js.map → index-BCIJE--_.js.map} +1 -1
- package/dashboard/dist/assets/{index-DFJm742Y.js → index-BqeQGQ4K.js} +2 -2
- package/dashboard/dist/assets/{index-DFJm742Y.js.map → index-BqeQGQ4K.js.map} +1 -1
- package/dashboard/dist/assets/{index-BmsZnbW1.js → index-C6UuVkz7.js} +3 -3
- package/dashboard/dist/assets/{index-BmsZnbW1.js.map → index-C6UuVkz7.js.map} +1 -1
- package/dashboard/dist/assets/{index-Dh6F3Wbx.js → index-CMv6YMJY.js} +2 -2
- package/dashboard/dist/assets/{index-Dh6F3Wbx.js.map → index-CMv6YMJY.js.map} +1 -1
- package/dashboard/dist/assets/{index-CVZOAQVo.js → index-ChHD9p_I.js} +2 -2
- package/dashboard/dist/assets/{index-CVZOAQVo.js.map → index-ChHD9p_I.js.map} +1 -1
- package/dashboard/dist/assets/{index-CR1_qhQf.js → index-Cp1jJHm1.js} +2 -2
- package/dashboard/dist/assets/{index-CR1_qhQf.js.map → index-Cp1jJHm1.js.map} +1 -1
- package/dashboard/dist/assets/{index-Bl-09ECD.js → index-DWDEa8jS.js} +2 -2
- package/dashboard/dist/assets/{index-Bl-09ECD.js.map → index-DWDEa8jS.js.map} +1 -1
- package/dashboard/dist/assets/{index-stu9QXmW.js → index-DYCCUmSM.js} +2 -2
- package/dashboard/dist/assets/{index-stu9QXmW.js.map → index-DYCCUmSM.js.map} +1 -1
- package/dashboard/dist/assets/{index-b7P6Hjd3.js → index-DcDEJ6b_.js} +2 -2
- package/dashboard/dist/assets/{index-b7P6Hjd3.js.map → index-DcDEJ6b_.js.map} +1 -1
- package/dashboard/dist/assets/index-Dh5Y3hq7.js +5 -0
- package/dashboard/dist/assets/index-Dh5Y3hq7.js.map +1 -0
- package/dashboard/dist/assets/{index-BTsTdaRt.js → index-DrPWIFSv.js} +2 -2
- package/dashboard/dist/assets/{index-BTsTdaRt.js.map → index-DrPWIFSv.js.map} +1 -1
- package/dashboard/dist/assets/index-WSGppNeK.css +1 -0
- package/dashboard/dist/assets/{knowledge-DD9NIG9d.js → knowledge-Dl3cOfFR.js} +2 -2
- package/dashboard/dist/assets/{knowledge-DD9NIG9d.js.map → knowledge-Dl3cOfFR.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-C4upVuuP.js → mcp-BwjeqkHn.js} +2 -2
- package/dashboard/dist/assets/{mcp-C4upVuuP.js.map → mcp-BwjeqkHn.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-query-JEk3cZyH.js → mcp-query-C1Rlt4az.js} +2 -2
- package/dashboard/dist/assets/{mcp-query-JEk3cZyH.js.map → mcp-query-C1Rlt4az.js.map} +1 -1
- package/dashboard/dist/assets/{pipelines-BkBpa2Y7.js → pipelines-BGIUgIH_.js} +2 -2
- package/dashboard/dist/assets/{pipelines-BkBpa2Y7.js.map → pipelines-BGIUgIH_.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-B7QVagGw.js → tasks-CnC1xEaD.js} +2 -2
- package/dashboard/dist/assets/{tasks-B7QVagGw.js.map → tasks-CnC1xEaD.js.map} +1 -1
- package/dashboard/dist/assets/{topics-C55xydgR.js → topics-C6EcHi07.js} +2 -2
- package/dashboard/dist/assets/{topics-C55xydgR.js.map → topics-C6EcHi07.js.map} +1 -1
- package/dashboard/dist/assets/{useEventHooks-CKpFrpjc.js → useEventHooks-Cyq4DiQA.js} +2 -2
- package/dashboard/dist/assets/{useEventHooks-CKpFrpjc.js.map → useEventHooks-Cyq4DiQA.js.map} +1 -1
- package/dashboard/dist/assets/{useNamespace-BJbjZubz.js → useNamespace-Ci_oA5Tq.js} +2 -2
- package/dashboard/dist/assets/{useNamespace-BJbjZubz.js.map → useNamespace-Ci_oA5Tq.js.map} +1 -1
- package/dashboard/dist/assets/{useYamlActivityEvents-C80oooy6.js → useYamlActivityEvents-u8RUiMma.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents-C80oooy6.js.map → useYamlActivityEvents-u8RUiMma.js.map} +1 -1
- package/dashboard/dist/assets/{users-BdvakxB1.js → users-DtiYvg8z.js} +2 -2
- package/dashboard/dist/assets/{users-BdvakxB1.js.map → users-DtiYvg8z.js.map} +1 -1
- package/dashboard/dist/assets/{workflows-DYTqfgom.js → workflows-BysPDsh9.js} +2 -2
- package/dashboard/dist/assets/{workflows-DYTqfgom.js.map → workflows-BysPDsh9.js.map} +1 -1
- package/dashboard/dist/assets/{yaml-workflows-D3o7rHzN.js → yaml-workflows-31qtxg5W.js} +2 -2
- package/dashboard/dist/assets/{yaml-workflows-D3o7rHzN.js.map → yaml-workflows-31qtxg5W.js.map} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/docs/api/http/escalations.md +12 -3
- package/docs/hitl/escalation.md +21 -0
- package/docs/hitl/x-lt-embed.md +60 -0
- package/package.json +2 -2
- package/dashboard/dist/assets/index-Cm42dgjx.css +0 -1
- package/dashboard/dist/assets/index-Wu6GCvUq.js +0 -5
- package/dashboard/dist/assets/index-Wu6GCvUq.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ProcessesListPage-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ProcessesListPage-GQMOo5Wo.js","./vendor-query-B2UbickB.js","./tasks-CnC1xEaD.js","./workflows-BysPDsh9.js","./useEventHooks-Cyq4DiQA.js","./useFilterParams-CvRyYHJN.js","./vendor-react-BpdAFEQc.js","./useDebouncedValue-BA5S7V54.js","./api-path-u2Jf9QXS.js","./DataTable-BTu2AaEl.js","./EmptyState-BcsfPq9T.js","./TimestampCell-DI5zPUgV.js","./StickyPagination-qLaLa33X.js","./FilterBar-B0taDH7I.js","./vendor-icons-BE_WrH2z.js","./PageHeader-DlcE3U5L.js","./ListToolbar-ueCQtu5C.js","./WorkflowPill-DlSVXnnj.js","./ProcessDetailPage-CxJ5BSDk.js","./PageHeaderWithStats-BMhnR3-9.js","./StatusBadge-BbqghFMi.js","./RolePill-dzo14hB_.js","./UserName-YozoXJA1.js","./users-DtiYvg8z.js","./McpOverview-DMaRUXnA.js","./mcp-BwjeqkHn.js","./pipelines-BGIUgIH_.js","./yaml-workflows-31qtxg5W.js","./controlplane-DKijNA6h.js","./StatCard-DBANWIss.js","./McpRunsPage-_UaoIwzX.js","./useNamespace-Ci_oA5Tq.js","./ElapsedCell-C0LbM8o2.js","./RowActions-BA9L9djf.js","./McpRunDetailPage-CJ9hDTNs.js","./CopyableId-BpB-NvDh.js","./CollapsibleSection-CReMhtzK.js","./EventTable-Q3iICRf_.js","./SwimlaneTimeline-BdNhoiW8.js","./StreamMessageDetail-Bi37x95H.js","./McpQueryPage-CNGNB59o.js","./mcp-query-C1Rlt4az.js","./McpQueryDetailPage-D6YSD94n.js","./TagInput-cyhTZTwe.js","./useYamlActivityEvents-u8RUiMma.js","./helpers-DzO-OGPe.js","./RunAsSelector-DQp_keSD.js","./BotPicker-Bj4MB_so.js","./bots-DZ1MQUms.js","./ToolPill-CKHYG6eV.js","./TimeAgo-C6FZSNZp.js","./EscalationsOverview-DFM-f7do.js","./AvailableEscalationsPage-rKbrcY8Y.js","./task-queues-7-sHKPsN.js","./CustomDurationPicker-BTmpAQOL.js","./Modal-CA2Iv02H.js","./CountdownTimer-Z8N8ccJ1.js","./constants-BHkpVaqx.js","./role-display-Dvo2lDpU.js","./escalation-columns-DjoZ4dDb.js","./PriorityBadge-CCERr9vQ.js","./OperatorDashboard-DMPJmgP_.js","./index-Dh5Y3hq7.js","./WorkflowsOverview-Bp2pxXJO.js","./index-DcDEJ6b_.js","./NamespacePill-DQGzN0Ph.js","./WorkflowsDashboard-DpVAH35I.js","./YamlWorkflowsPage-Dtt3x3_T.js","./GraphInvokePage-B_P3pJeA.js","./YamlWorkflowDetailPage-CL_kD0mX.js","./TasksListPage-BIE7nrdE.js","./TaskDetailPage-ngdXRgQp.js","./WorkflowExecutionPage-Bce8g08l.js","./AdminDashboard-CYlm0_J0.js","./index-BCIJE--_.js","./TaskQueuePill-_zIpG4bG.js","./index-DrPWIFSv.js","./ConfirmDeleteModal-DD7SEMeX.js","./index-CMv6YMJY.js","./ToolTestPanel-Dli94RPI.js","./index-BqeQGQ4K.js","./index-B0ktIiOY.js","./RolesPage-BIg3_Em6.js","./RoleDetailPage-Bh5qdI0w.js","./EscalationSchemaPage-CnlwGAIE.js","./EscalationListSchemaPage-CkEJnFKd.js","./index-DYCCUmSM.js","./OperationsPage-CTfwuWXR.js","./index-Cp1jJHm1.js","./index-DWDEa8jS.js","./CredentialsPage-D_2T6vSb.js","./index-0SzWFShg.js","./DropZone-BrnAkQxF.js","./index-ChHD9p_I.js","./knowledge-Dl3cOfFR.js","./HomePage-lu88PzQH.js","./AgentsPage-AqGtEOL1.js","./agents-xhtLVBwq.js","./AgentDetailPage-D9JdkWV8.js","./CronLabel-DBmKrLvL.js","./AgentConfigPage-BttOMcj_.js","./capabilities-B8j2h7Jn.js","./topics-C6EcHi07.js","./CapabilitiesPage-DzLP5-ad.js","./TopicsPage-BwiEX0pU.js","./TopicDetailPage-vPtXb7gD.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var Xx=Object.defineProperty;var Zx=(i,t,s)=>t in i?Xx(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s;var v=(i,t,s)=>Zx(i,typeof t!="symbol"?t+"":t,s);import{r as Wx,a as A,j as h,u as ht,b as bt,c as Et,Q as ev,d as tv}from"./vendor-query-B2UbickB.js";import{r as nv,u as Sn,a as th,L as Ni,N as Tr,b as Eg,c as Ln,O as Sr,d as sv,R as iv}from"./vendor-react-BpdAFEQc.js";import{X as Yn,E as rv,S as av,M as lv,C as jg,a as Nf,I as Tf,R as Ag,B as Og,U as ov,b as cv,L as uv,c as fv,Z as hv,P as d0,d as Ng,e as dv,f as m0,g as p0,h as g0,i as mv,W as nh,j as pv,k as gv,F as yv,l as bv,m as xv,N as vv,n as _v,D as wv,o as Tg,p as kg,q as Sv,r as Ev,s as jv,t as Av,u as Ov,G as Nv,T as Tv,v as kv,w as Cv,x as Mv}from"./vendor-icons-BE_WrH2z.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.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 uf={exports:{}},Ta={},ff={exports:{}},hf={};/**
|
|
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 d2(i){const t=i.summary,s=i.title;if(t){const a=t.search(/\n\s*\{[\s\S]*"title"\s*:/);return a>0?t.slice(0,a).trim():t}return s||(typeof i=="string"?i:"Query completed.")}const My=A.createContext(null);function m2({children:i}){const t=Sn(),[s,a]=A.useState(!1),[o,f]=A.useState([]),[d,m]=A.useState(null),[g,y]=A.useState({}),E=A.useRef(null),_={page:t.pathname.split("/").filter(Boolean).join("-")||"home",route:t.pathname,params:{},...g,suggestedTags:g.suggestedTags??f2(t.pathname)};A.useEffect(()=>()=>{E.current&&clearInterval(E.current)},[]);const O=A.useCallback(()=>a(ie=>!ie),[]),R=A.useCallback(ie=>{y(ie)},[]),M=A.useCallback(()=>{f([]),m(null)},[]),z=A.useCallback(async ie=>{var I;const $=new Date().toISOString(),ce={id:`user-${Date.now()}`,role:"user",content:ie,timestamp:$},ee={id:`pending-${Date.now()}`,role:"assistant",content:"",timestamp:$,pending:!0};f(V=>[...V,ce,ee]);const T={..._};(I=T.entities)!=null&&I.yamlContent&&T.entities.yamlContent.length>ag&&(T.entities={...T.entities,yamlContent:T.entities.yamlContent.slice(0,ag)+`
|
|
62
|
-
... (truncated)`});const le=`${h2(o.concat(ce))}${ie}`;try{const W=(await we("/insight/mcp-query",{method:"POST",body:JSON.stringify({prompt:le,tags:T.suggestedTags,context:T,wait:!1,direct:!0})})).workflow_id;m(W),f(oe=>oe.map(re=>re.id===ee.id?{...re,workflowId:W}:re)),E.current&&clearInterval(E.current),E.current=setInterval(async()=>{var oe;try{const re=await we(`/workflows/${W}/result`),Oe=(oe=re==null?void 0:re.result)==null?void 0:oe.data;if(Oe){E.current&&clearInterval(E.current),E.current=null,m(null);const ke=d2(Oe);let Se;try{Se=(await we(`/workflow-states/${W}/execution`)).duration_ms}catch{}f(q=>q.map(ne=>ne.id===ee.id?{...ne,content:ke,timestamp:new Date().toISOString(),pending:!1,durationMs:Se}:ne))}}catch{}},3e3)}catch{f(V=>V.map(W=>W.id===ee.id?{...W,content:"Failed to submit query. Please try again.",pending:!1}:W))}},[o,_]),F=A.useCallback(async ie=>{const $=o.find(T=>T.id===ie);if(!($!=null&&$.workflowId)||$.compilationStatus==="compiling"||$.compilationStatus==="done")return;const ce=o.indexOf($),ee=o.slice(0,ce).reverse().find(T=>T.role==="user");if(ee){f(T=>T.map(Q=>Q.id===ie?{...Q,compilationStatus:"compiling"}:Q));try{const T=await we("/insight/mcp-query/describe",{method:"POST",body:JSON.stringify({prompt:ee.content,summary:$.content})}),Q=await we("/yaml-workflows",{method:"POST",body:JSON.stringify({workflow_id:$.workflowId,task_queue:"long-tail-system",workflow_name:"mcpQuery",name:T.tool_name,description:T.description,tags:T.tags,app_id:""})});await we(`/yaml-workflows/${Q.id}/deploy`,{method:"POST"}),f(le=>le.map(I=>I.id===ie?{...I,compilationStatus:"done"}:I))}catch(T){const Q=T instanceof Error?T.message:"Compilation failed";f(le=>le.map(I=>I.id===ie?{...I,compilationStatus:"error",compilationError:Q}:I))}}},[o]);return h.jsx(My.Provider,{value:{helpOpen:s,setHelpOpen:a,toggleHelp:O,messages:o,sendMessage:z,pageContext:_,setPageContext:R,activeWorkflowId:d,clearMessages:M,compileMessage:F},children:i})}function Ry(){const i=A.useContext(My);if(!i)throw new Error("useHelpAssistant must be used within HelpAssistantProvider");return i}function p2(){const{helpOpen:i,toggleHelp:t}=Ry();return h.jsx("button",{onClick:t,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(Yn,{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(${Tt}/logo512.png)`}})})}const Dy=6048e5,g2=864e5,lg=6e4,og=525600,cg=43200,ug=1440,fg=Symbol.for("constructDateFrom");function gs(i,t){return typeof i=="function"?i(t):i&&typeof i=="object"&&fg in i?i[fg](t):i instanceof Date?new i.constructor(t):new Date(t)}function ln(i,t){return gs(t||i,i)}let y2={};function Za(){return y2}function Ja(i,t){var m,g,y,E;const s=Za(),a=(t==null?void 0:t.weekStartsOn)??((g=(m=t==null?void 0:t.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,t==null?void 0:t.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 Vo(i,t){return Ja(i,{...t,weekStartsOn:1})}function qy(i,t){const s=ln(i,t==null?void 0:t.in),a=s.getFullYear(),o=gs(s,0);o.setFullYear(a+1,0,4),o.setHours(0,0,0,0);const f=Vo(o),d=gs(s,0);d.setFullYear(a,0,4),d.setHours(0,0,0,0);const m=Vo(d);return s.getTime()>=f.getTime()?a+1:s.getTime()>=m.getTime()?a:a-1}function Io(i){const t=ln(i),s=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return s.setUTCFullYear(t.getFullYear()),+i-+s}function zy(i,...t){const s=gs.bind(null,i||t.find(a=>typeof a=="object"));return t.map(s)}function hg(i,t){const s=ln(i,t==null?void 0:t.in);return s.setHours(0,0,0,0),s}function b2(i,t,s){const[a,o]=zy(s==null?void 0:s.in,i,t),f=hg(a),d=hg(o),m=+f-Io(f),g=+d-Io(d);return Math.round((m-g)/g2)}function x2(i,t){const s=qy(i,t),a=gs(i,0);return a.setFullYear(s,0,4),a.setHours(0,0,0,0),Vo(a)}function v2(i,t){const s=+ln(i)-+ln(t);return s<0?-1:s>0?1:s}function _2(i){return gs(i,Date.now())}function w2(i){return i instanceof Date||typeof i=="object"&&Object.prototype.toString.call(i)==="[object Date]"}function S2(i){return!(!w2(i)&&typeof i!="number"||isNaN(+ln(i)))}function E2(i){return t=>{const a=(i?Math[i]:Math.trunc)(t);return a===0?0:a}}function j2(i,t){const s=ln(i,t==null?void 0:t.in);return s.setFullYear(s.getFullYear(),0,1),s.setHours(0,0,0,0),s}const A2={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"}},O2=(i,t,s)=>{let a;const o=A2[i];return typeof o=="string"?a=o:t===1?a=o.one:a=o.other.replace("{{count}}",t.toString()),s!=null&&s.addSuffix?s.comparison&&s.comparison>0?"in "+a:a+" ago":a};function Of(i){return(t={})=>{const s=t.width?String(t.width):i.defaultWidth;return i.formats[s]||i.formats[i.defaultWidth]}}const N2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},T2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},k2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},C2={date:Of({formats:N2,defaultWidth:"full"}),time:Of({formats:T2,defaultWidth:"full"}),dateTime:Of({formats:k2,defaultWidth:"full"})},M2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},R2=(i,t,s,a)=>M2[i];function Ra(i){return(t,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(t):t;return o[f]}}const D2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},q2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},z2={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"]},U2={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"]},B2={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"}},L2={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"}},P2=(i,t)=>{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"},H2={ordinalNumber:P2,era:Ra({values:D2,defaultWidth:"wide"}),quarter:Ra({values:q2,defaultWidth:"wide",argumentCallback:i=>i-1}),month:Ra({values:z2,defaultWidth:"wide"}),day:Ra({values:U2,defaultWidth:"wide"}),dayPeriod:Ra({values:B2,defaultWidth:"wide",formattingValues:L2,defaultFormattingWidth:"wide"})};function Da(i){return(t,s={})=>{const a=s.width,o=a&&i.matchPatterns[a]||i.matchPatterns[i.defaultMatchWidth],f=t.match(o);if(!f)return null;const d=f[0],m=a&&i.parsePatterns[a]||i.parsePatterns[i.defaultParseWidth],g=Array.isArray(m)?Y2(m,_=>_.test(d)):$2(m,_=>_.test(d));let y;y=i.valueCallback?i.valueCallback(g):g,y=s.valueCallback?s.valueCallback(y):y;const E=t.slice(d.length);return{value:y,rest:E}}}function $2(i,t){for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&t(i[s]))return s}function Y2(i,t){for(let s=0;s<i.length;s++)if(t(i[s]))return s}function G2(i){return(t,s={})=>{const a=t.match(i.matchPattern);if(!a)return null;const o=a[0],f=t.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=t.slice(o.length);return{value:d,rest:m}}}const V2=/^(\d+)(th|st|nd|rd)?/i,I2=/\d+/i,F2={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},J2={any:[/^b/i,/^(a|c)/i]},Q2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},K2={any:[/1/i,/2/i,/3/i,/4/i]},X2={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},Z2={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]},W2={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},eE={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]},tE={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},nE={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}},sE={ordinalNumber:G2({matchPattern:V2,parsePattern:I2,valueCallback:i=>parseInt(i,10)}),era:Da({matchPatterns:F2,defaultMatchWidth:"wide",parsePatterns:J2,defaultParseWidth:"any"}),quarter:Da({matchPatterns:Q2,defaultMatchWidth:"wide",parsePatterns:K2,defaultParseWidth:"any",valueCallback:i=>i+1}),month:Da({matchPatterns:X2,defaultMatchWidth:"wide",parsePatterns:Z2,defaultParseWidth:"any"}),day:Da({matchPatterns:W2,defaultMatchWidth:"wide",parsePatterns:eE,defaultParseWidth:"any"}),dayPeriod:Da({matchPatterns:tE,defaultMatchWidth:"any",parsePatterns:nE,defaultParseWidth:"any"})},Uy={code:"en-US",formatDistance:O2,formatLong:C2,formatRelative:R2,localize:H2,match:sE,options:{weekStartsOn:0,firstWeekContainsDate:1}};function iE(i,t){const s=ln(i,t==null?void 0:t.in);return b2(s,j2(s))+1}function rE(i,t){const s=ln(i,t==null?void 0:t.in),a=+Vo(s)-+x2(s);return Math.round(a/Dy)+1}function By(i,t){var E,_,O,R;const s=ln(i,t==null?void 0:t.in),a=s.getFullYear(),o=Za(),f=(t==null?void 0:t.firstWeekContainsDate)??((_=(E=t==null?void 0:t.locale)==null?void 0:E.options)==null?void 0:_.firstWeekContainsDate)??o.firstWeekContainsDate??((R=(O=o.locale)==null?void 0:O.options)==null?void 0:R.firstWeekContainsDate)??1,d=gs((t==null?void 0:t.in)||i,0);d.setFullYear(a+1,0,f),d.setHours(0,0,0,0);const m=Ja(d,t),g=gs((t==null?void 0:t.in)||i,0);g.setFullYear(a,0,f),g.setHours(0,0,0,0);const y=Ja(g,t);return+s>=+m?a+1:+s>=+y?a:a-1}function aE(i,t){var m,g,y,E;const s=Za(),a=(t==null?void 0:t.firstWeekContainsDate)??((g=(m=t==null?void 0:t.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=By(i,t),f=gs((t==null?void 0:t.in)||i,0);return f.setFullYear(o,0,a),f.setHours(0,0,0,0),Ja(f,t)}function lE(i,t){const s=ln(i,t==null?void 0:t.in),a=+Ja(s,t)-+aE(s,t);return Math.round(a/Dy)+1}function Ve(i,t){const s=i<0?"-":"",a=Math.abs(i).toString().padStart(t,"0");return s+a}const Js={y(i,t){const s=i.getFullYear(),a=s>0?s:1-s;return Ve(t==="yy"?a%100:a,t.length)},M(i,t){const s=i.getMonth();return t==="M"?String(s+1):Ve(s+1,2)},d(i,t){return Ve(i.getDate(),t.length)},a(i,t){const s=i.getHours()/12>=1?"pm":"am";switch(t){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,t){return Ve(i.getHours()%12||12,t.length)},H(i,t){return Ve(i.getHours(),t.length)},m(i,t){return Ve(i.getMinutes(),t.length)},s(i,t){return Ve(i.getSeconds(),t.length)},S(i,t){const s=t.length,a=i.getMilliseconds(),o=Math.trunc(a*Math.pow(10,s-3));return Ve(o,t.length)}},_r={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dg={G:function(i,t,s){const a=i.getFullYear()>0?1:0;switch(t){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,t,s){if(t==="yo"){const a=i.getFullYear(),o=a>0?a:1-a;return s.ordinalNumber(o,{unit:"year"})}return Js.y(i,t)},Y:function(i,t,s,a){const o=By(i,a),f=o>0?o:1-o;if(t==="YY"){const d=f%100;return Ve(d,2)}return t==="Yo"?s.ordinalNumber(f,{unit:"year"}):Ve(f,t.length)},R:function(i,t){const s=qy(i);return Ve(s,t.length)},u:function(i,t){const s=i.getFullYear();return Ve(s,t.length)},Q:function(i,t,s){const a=Math.ceil((i.getMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return Ve(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,t,s){const a=Math.ceil((i.getMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return Ve(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,t,s){const a=i.getMonth();switch(t){case"M":case"MM":return Js.M(i,t);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,t,s){const a=i.getMonth();switch(t){case"L":return String(a+1);case"LL":return Ve(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,t,s,a){const o=lE(i,a);return t==="wo"?s.ordinalNumber(o,{unit:"week"}):Ve(o,t.length)},I:function(i,t,s){const a=rE(i);return t==="Io"?s.ordinalNumber(a,{unit:"week"}):Ve(a,t.length)},d:function(i,t,s){return t==="do"?s.ordinalNumber(i.getDate(),{unit:"date"}):Js.d(i,t)},D:function(i,t,s){const a=iE(i);return t==="Do"?s.ordinalNumber(a,{unit:"dayOfYear"}):Ve(a,t.length)},E:function(i,t,s){const a=i.getDay();switch(t){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,t,s,a){const o=i.getDay(),f=(o-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(f);case"ee":return Ve(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,t,s,a){const o=i.getDay(),f=(o-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(f);case"cc":return Ve(f,t.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,t,s){const a=i.getDay(),o=a===0?7:a;switch(t){case"i":return String(o);case"ii":return Ve(o,t.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,t,s){const o=i.getHours()/12>=1?"pm":"am";switch(t){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,t,s){const a=i.getHours();let o;switch(a===12?o=_r.noon:a===0?o=_r.midnight:o=a/12>=1?"pm":"am",t){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,t,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,t){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,t,s){if(t==="ho"){let a=i.getHours()%12;return a===0&&(a=12),s.ordinalNumber(a,{unit:"hour"})}return Js.h(i,t)},H:function(i,t,s){return t==="Ho"?s.ordinalNumber(i.getHours(),{unit:"hour"}):Js.H(i,t)},K:function(i,t,s){const a=i.getHours()%12;return t==="Ko"?s.ordinalNumber(a,{unit:"hour"}):Ve(a,t.length)},k:function(i,t,s){let a=i.getHours();return a===0&&(a=24),t==="ko"?s.ordinalNumber(a,{unit:"hour"}):Ve(a,t.length)},m:function(i,t,s){return t==="mo"?s.ordinalNumber(i.getMinutes(),{unit:"minute"}):Js.m(i,t)},s:function(i,t,s){return t==="so"?s.ordinalNumber(i.getSeconds(),{unit:"second"}):Js.s(i,t)},S:function(i,t){return Js.S(i,t)},X:function(i,t,s){const a=i.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return pg(a);case"XXXX":case"XX":return Oi(a);case"XXXXX":case"XXX":default:return Oi(a,":")}},x:function(i,t,s){const a=i.getTimezoneOffset();switch(t){case"x":return pg(a);case"xxxx":case"xx":return Oi(a);case"xxxxx":case"xxx":default:return Oi(a,":")}},O:function(i,t,s){const a=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+mg(a,":");case"OOOO":default:return"GMT"+Oi(a,":")}},z:function(i,t,s){const a=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+mg(a,":");case"zzzz":default:return"GMT"+Oi(a,":")}},t:function(i,t,s){const a=Math.trunc(+i/1e3);return Ve(a,t.length)},T:function(i,t,s){return Ve(+i,t.length)}};function mg(i,t=""){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)+t+Ve(f,2)}function pg(i,t){return i%60===0?(i>0?"-":"+")+Ve(Math.abs(i)/60,2):Oi(i,t)}function Oi(i,t=""){const s=i>0?"-":"+",a=Math.abs(i),o=Ve(Math.trunc(a/60),2),f=Ve(a%60,2);return s+o+t+f}const gg=(i,t)=>{switch(i){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ly=(i,t)=>{switch(i){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},oE=(i,t)=>{const s=i.match(/(P+)(p+)?/)||[],a=s[1],o=s[2];if(!o)return gg(i,t);let f;switch(a){case"P":f=t.dateTime({width:"short"});break;case"PP":f=t.dateTime({width:"medium"});break;case"PPP":f=t.dateTime({width:"long"});break;case"PPPP":default:f=t.dateTime({width:"full"});break}return f.replace("{{date}}",gg(a,t)).replace("{{time}}",Ly(o,t))},cE={p:Ly,P:oE},uE=/^D+$/,fE=/^Y+$/,hE=["D","DD","YY","YYYY"];function dE(i){return uE.test(i)}function mE(i){return fE.test(i)}function pE(i,t,s){const a=gE(i,t,s);if(console.warn(a),hE.includes(i))throw new RangeError(a)}function gE(i,t,s){const a=i[0]==="Y"?"years":"days of the month";return`Use \`${i.toLowerCase()}\` instead of \`${i}\` (in \`${t}\`) for formatting ${a} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const yE=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bE=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xE=/^'([^]*?)'?$/,vE=/''/g,_E=/[a-zA-Z]/;function Py(i,t,s){var E,_,O,R;const a=Za(),o=a.locale??Uy,f=a.firstWeekContainsDate??((_=(E=a.locale)==null?void 0:E.options)==null?void 0:_.firstWeekContainsDate)??1,d=a.weekStartsOn??((R=(O=a.locale)==null?void 0:O.options)==null?void 0:R.weekStartsOn)??0,m=ln(i,s==null?void 0:s.in);if(!S2(m))throw new RangeError("Invalid time value");let g=t.match(bE).map(M=>{const z=M[0];if(z==="p"||z==="P"){const F=cE[z];return F(M,o.formatLong)}return M}).join("").match(yE).map(M=>{if(M==="''")return{isToken:!1,value:"'"};const z=M[0];if(z==="'")return{isToken:!1,value:wE(M)};if(dg[z])return{isToken:!0,value:M};if(z.match(_E))throw new RangeError("Format string contains an unescaped latin alphabet character `"+z+"`");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 z=M.value;(mE(z)||dE(z))&&pE(z,t,String(i));const F=dg[z[0]];return F(m,z,o.localize,y)}).join("")}function wE(i){const t=i.match(xE);return t?t[1].replace(vE,"'"):i}function SE(i,t,s){const a=Za(),o=(s==null?void 0:s.locale)??a.locale??Uy,f=v2(i,t);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]=zy(s==null?void 0:s.in,...f>0?[t,i]:[i,t]),y=E2((s==null?void 0:s.roundingMethod)??"round"),E=g.getTime()-m.getTime(),_=E/lg,O=Io(g)-Io(m),R=(E-O)/lg,M=s==null?void 0:s.unit;let z;if(M?z=M:_<1?z="second":_<60?z="minute":_<ug?z="hour":R<cg?z="day":R<og?z="month":z="year",z==="second"){const F=y(E/1e3);return o.formatDistance("xSeconds",F,d)}else if(z==="minute"){const F=y(_);return o.formatDistance("xMinutes",F,d)}else if(z==="hour"){const F=y(_/60);return o.formatDistance("xHours",F,d)}else if(z==="day"){const F=y(R/ug);return o.formatDistance("xDays",F,d)}else if(z==="month"){const F=y(R/cg);return F===12&&M!=="month"?o.formatDistance("xYears",1,d):o.formatDistance("xMonths",F,d)}else{const F=y(R/og);return o.formatDistance("xYears",F,d)}}function EE(i,t){return SE(i,_2(i),t)}function wA(i){return i.toLocaleString()}function SA(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 jE(i){const t=new Date(i);return t.getTime()>Date.now()?"just now":EE(t,{addSuffix:!0})}function EA(i){const t=Date.now()-new Date(i).getTime();if(t<0)return"now";const s=Math.floor(t/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 jA(i){return i<=0?"Expired":Ah(i)}function AE(i){return i==null?"--":Ah(i)}function Ah(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 t=Math.floor(i/1e3),s=Math.floor(t/86400),a=Math.floor(t%86400/3600),o=Math.floor(t%3600/60),f=t%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 AA(i,t){const s=new Date(i).getTime(),a=t?new Date(t).getTime():Date.now();return Ah(a-s)}function Hy({options:i,children:t,className:s=""}){const[a,o]=A.useState(!1),[f,d]=A.useState(null),[m,g]=A.useState(null),y=A.useRef(null),E=A.useRef(void 0),_=A.useRef(void 0),O=220,R=A.useCallback(()=>{if(!y.current)return;const ie=y.current.getBoundingClientRect(),$=window.innerWidth-O-8,ce=Math.max(8,Math.min(ie.left,$));g({top:ie.bottom+4,left:ce})},[]),M=A.useCallback(async(ie,$)=>{try{await navigator.clipboard.writeText(ie),d($),clearTimeout(E.current),E.current=setTimeout(()=>d(null),1200)}catch{}},[]),z=A.useCallback(()=>{clearTimeout(_.current),R(),o(!0)},[R]),F=A.useCallback(()=>{_.current=setTimeout(()=>o(!1),150)},[]);return A.useEffect(()=>()=>{clearTimeout(E.current),clearTimeout(_.current)},[]),h.jsxs("span",{ref:y,className:`inline-flex items-center cursor-default ${s}`,onMouseEnter:z,onMouseLeave:F,children:[t,a&&m&&Eg.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:z,onMouseLeave:F,children:i.map(ie=>h.jsxs("button",{onClick:$=>{$.stopPropagation(),M(ie.value,ie.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-2xs font-medium uppercase tracking-wider text-text-tertiary w-10 shrink-0",children:ie.label}),h.jsx("span",{className:"text-2xs font-mono text-text-secondary truncate ml-2",children:f===ie.label?"✓":ie.value})]},ie.label))}),document.body)]})}function OE(i,t){const s=new Date(i);switch(t){case"relative":return jE(i);case"datetime":return Py(s,"MMM d, yyyy h:mm a");case"time":return s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}}function NE(i){const t=new Date(i);return[{label:"ms",value:String(t.getTime())},{label:"utc",value:t.toISOString()},{label:"local",value:Py(t,"MMM d, yyyy h:mm:ss a")}]}function TE({date:i,format:t="relative",className:s=""}){const[,a]=A.useState(0);A.useEffect(()=>{if(t!=="relative")return;const f=setInterval(()=>a(d=>d+1),3e4);return()=>clearInterval(f)},[t]);const o=A.useMemo(()=>NE(i),[i]);return h.jsx(Hy,{options:o,children:h.jsx("time",{dateTime:i,className:`text-xs text-text-tertiary ${s}`,children:OE(i,t)})})}function kE({ms:i,className:t=""}){const s=AE(i),a=A.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 ${t}`,children:"--"}):h.jsx(Hy,{options:a,children:h.jsx("span",{className:`text-xs text-text-tertiary ${t}`,children:s})})}const CE=["sm","md","lg","full"],yg={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"},bg={sm:"Small",md:"Medium",lg:"Large",full:"Fullscreen"};function ME({which:i}){const t="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:t,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:t,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:t,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:t,strokeWidth:"1.5"})})}}function RE({msg:i}){const[t,s]=A.useState(0);A.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(t/60),o=t%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-2xs text-accent/70 hover:text-accent transition-colors",children:[h.jsx(nh,{className:"w-2.5 h-2.5",strokeWidth:1.5}),"watch execution"]})]})}function DE({msg:i,compileMessage:t}){const s=i.role==="assistant";return h.jsxs("div",{className:`flex items-center gap-1.5 ${s?"justify-start":"justify-end"}`,children:[h.jsx(TE,{date:i.timestamp,format:"time",className:"!text-2xs text-text-muted/50"}),i.durationMs!=null&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-text-muted/30 text-2xs",children:"·"}),h.jsx(kE,{ms:i.durationMs,className:"!text-2xs 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(nh,{className:"w-2.5 h-2.5",strokeWidth:1.5})}),s&&i.workflowId&&!i.pending&&h.jsx("button",{onClick:()=>t(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(Nv,{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 qE(){const{helpOpen:i,setHelpOpen:t,messages:s,sendMessage:a,pageContext:o,activeWorkflowId:f,clearMessages:d,compileMessage:m}=Ry(),[g,y]=A.useState(""),[E,_]=A.useState("md"),[O,R]=A.useState(!0),M=A.useRef(null),z=A.useRef(null);if(A.useEffect(()=>{M.current&&(M.current.scrollTop=M.current.scrollHeight)},[s]),A.useEffect(()=>{i&&z.current&&z.current.focus()},[i]),A.useEffect(()=>{if(!i)return;const T=Q=>{Q.key==="Escape"&&(E==="full"?_("lg"):E==="lg"?_("md"):E==="md"?_("sm"):t(!1))};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[i,E,t]),!i)return null;const F=()=>{const T=g.trim();!T||f||(a(T),y(""),z.current&&(z.current.style.height="auto"))},ie=T=>{T.key==="Enter"&&!T.shiftKey&&(T.preventDefault(),F())},$=E==="full",ce=o.page.replace(/-/g," "),ee=$?{}:{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 ${$?yg.full:`right-6 ${yg[E]}`} ${O?"bg-surface-raised shadow-xl":"bg-surface-raised/[0.03] shadow-lg shadow-black/5"}`,style:ee,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!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 ${O?"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-2xs text-text-tertiary truncate",children:ce})]}),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:CE.map(T=>h.jsx("button",{onClick:()=>_(T),className:`p-1 rounded transition-colors ${T===E?"bg-accent/15 text-accent":"text-text-muted hover:text-text-secondary hover:bg-surface-hover"}`,role:"radio","aria-checked":T===E,"aria-label":bg[T],title:bg[T],children:h.jsx(ME,{which:T})},T))}),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(Tv,{className:"w-3.5 h-3.5",strokeWidth:1.5})}),h.jsx("button",{onClick:()=>t(!1),className:"p-1 text-text-tertiary hover:text-text-primary transition-colors","aria-label":"Close",title:"Close",children:h.jsx(Yn,{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 ${O?"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(T=>h.jsxs("div",{className:`text-xs leading-relaxed ${T.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 ${T.role==="user"?"bg-accent/10 text-text-primary":"bg-surface-sunken text-text-secondary"}`,children:T.pending?h.jsx(RE,{msg:T}):T.role==="assistant"?h.jsx(jh,{content:T.content}):T.content}),!T.pending&&h.jsx("div",{className:"mt-0.5",children:h.jsx(DE,{msg:T,compileMessage:m})})]},T.id))]}),h.jsxs("div",{className:`border-t border-surface-border px-3 py-2.5 flex gap-2 shrink-0 transition-all duration-300 ${O?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[h.jsx("textarea",{ref:z,value:g,onChange:T=>{y(T.target.value);const Q=T.target;Q.style.height="auto",Q.style.height=`${Math.min(Q.scrollHeight,120)}px`},onKeyDown:ie,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:F,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(kv,{className:"w-4 h-4",strokeWidth:1.5})})]})]})}function zE(){var ce;const{isBuilder:i,isOps:t,viewAs:s}=py(),{canSeePaceBoard:a}=gy(),{data:o}=Mi(),f=dy(),d=f!==null?f:!!((ce=o==null?void 0:o.ai)!=null&&ce.enabled),{collapsed:m,toggle:g}=wh(),[y,E]=A.useState(!1),[_,O]=A.useState(!1),[R,M]=A.useState(!1),[z,F]=A.useState(()=>window.location.hash.startsWith("#docs")),ie=Sn(),$=A.useRef(null);return A.useEffect(()=>{const ee=$.current;ee&&(ee.classList.remove("animate-page-in"),ee.offsetWidth,ee.classList.add("animate-page-in"))},[ie.pathname]),A.useEffect(()=>{const ee=()=>{window.location.hash.startsWith("#docs")&&F(!0)};return window.addEventListener("hashchange",ee),()=>window.removeEventListener("hashchange",ee)},[]),h.jsxs("div",{className:"h-screen bg-surface flex flex-col",children:[h.jsx(dS,{onToggleEventFeed:()=>E(ee=>!ee),onToggleDocs:()=>F(ee=>!ee),onToggleNav:()=>O(ee=>!ee)}),h.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[h.jsxs("aside",{className:`${m?"w-16":"w-60"} shrink-0 bg-surface-raised border-r border-surface-border hidden lg:flex flex-col transition-[width] duration-200 ease-out overflow-hidden relative z-20`,children:[h.jsx("nav",{className:"flex-1 px-3 pt-[36px] pb-4 space-y-2 overflow-y-auto overflow-x-hidden",children:h.jsx(Oy,{aiEnabled:d,isBuilder:i,isOps:t,viewAs:s,canSeePaceBoard:a})}),h.jsx("button",{onClick:g,className:`shrink-0 py-3 text-text-tertiary hover:text-text-secondary transition-colors duration-150 ${m?"flex justify-center":"flex items-center px-7"}`,"aria-label":m?"Expand sidebar":"Collapse sidebar",children:m?h.jsx(Cv,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5}):h.jsx(Mv,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5})}),!m&&(o==null?void 0:o.environment)&&h.jsxs("div",{className:"shrink-0 px-5 pb-3 text-2xs leading-tight text-text-tertiary whitespace-nowrap overflow-hidden text-ellipsis",title:`long-tail v${o.environment.longTailVersion} · HotMesh v${o.environment.hotmeshVersion} · Node ${o.environment.nodeVersion} · ${o.environment.nodeEnv}`,children:["long-tail v",o.environment.longTailVersion,h.jsx("span",{className:"mx-1 text-surface-border",children:"·"}),"HotMesh v",o.environment.hotmeshVersion]})]}),h.jsx("main",{className:"flex-1 min-w-0 overflow-y-auto",children:h.jsx("div",{ref:$,className:"w-full px-page-x py-8 pb-16 animate-page-in h-full flex flex-col @container",children:h.jsx(Sr,{})})}),h.jsx(UE,{})]}),h.jsx(qS,{open:_,onClose:()=>O(!1),aiEnabled:d,isBuilder:i,isOps:t,viewAs:s,canSeePaceBoard:a}),h.jsx(e2,{open:y,onToggle:()=>E(ee=>!ee),configOpen:R,onToggleConfig:()=>M(ee=>!ee)}),h.jsx(u2,{open:z,onClose:()=>{F(!1),history.replaceState(null,"",window.location.pathname+window.location.search)}}),d&&h.jsx(p2,{}),d&&h.jsx(qE,{})]})}function UE(){const{node:i,width:t,open:s}=nS();return h.jsx(sS,{open:s,width:t,className:"border-l border-surface-border bg-surface-raised",children:i})}function BE(){const{isAuthenticated:i}=Vn(),t=Sn();return i?h.jsx(Ww,{children:h.jsx(tS,{children:h.jsx(m2,{children:h.jsx(zE,{})})})}):h.jsx(Ln,{to:"/login",state:{from:t.pathname},replace:!0})}function $y({provider:i,className:t="w-5 h-5"}){switch(i){case"google":return h.jsxs("svg",{className:t,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:t,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:t,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:t,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:t,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 LE(){return we("/auth/oauth/providers")}async function PE(i,t){const s=t?`?label=${encodeURIComponent(t)}`:"";return we(`/auth/oauth/connections/${i}${s}`,{method:"DELETE"})}function OA(){return ht({queryKey:["oauth-connections"],queryFn:()=>we("/auth/oauth/connections")})}function NA(){const i=bt();return Et({mutationFn:({provider:t,label:s})=>PE(t,s),onSuccess:()=>{i.invalidateQueries({queryKey:["oauth-connections"]})}})}function HE(){var le;const{login:i,isAuthenticated:t}=Vn(),s=th(),a=Sn(),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=A.useRef(!1);f&&!g.current&&(g.current=!0,i(f,void 0,{displayName:o.get("displayName"),username:o.get("username")}));const[y,E]=A.useState(""),[_,O]=A.useState(""),[R,M]=A.useState(d||""),[z,F]=A.useState(!1),[ie,$]=A.useState(!!f),[ce,ee]=A.useState([]),T=A.useRef(!1);if(A.useEffect(()=>{f||T.current||(T.current=!0,(async()=>{var I,V,W,oe;try{const re=await fetch(`${Tt}/api/settings`);if(!re.ok)return;const Oe=await re.json();if(!((I=Oe.auth)!=null&&I.sso))return;const ke=await fetch(`${Tt}/api/auth/sso`,{method:"POST"});if(!ke.ok){M("Host authentication required — please log in to your organization first");return}const Se=await ke.json();Se.token&&((V=Oe.auth)!=null&&V.ssoLogoutUrl&&sessionStorage.setItem("lt_sso_logout_url",Oe.auth.ssoLogoutUrl),$(!0),i(Se.token,void 0,{displayName:(W=Se.user)==null?void 0:W.display_name,username:(oe=Se.user)==null?void 0:oe.external_id}))}catch{}})())},[]),A.useEffect(()=>{f||LE().then(ee).catch(()=>{})},[]),A.useEffect(()=>{if(!ie)return;const I=setTimeout(()=>s(m,{replace:!0}),1500);return()=>clearTimeout(I)},[ie]),t&&!ie)return h.jsx(Ln,{to:m,replace:!0});const Q=async I=>{var V,W;if(I.preventDefault(),M(""),!y.trim()||!_){M("Username and password are required");return}F(!0);try{const oe=await fetch(`${Tt}/api/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:y.trim(),password:_})}),re=await oe.json();if(!oe.ok){M(re.error||"Login failed");return}$(!0),i(re.token,{username:y.trim(),password:_},{displayName:(V=re.user)==null?void 0:V.display_name,username:(W=re.user)==null?void 0:W.external_id})}catch{M("Unable to connect to server")}finally{F(!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 ${ie?"translate-x-[120vw] -translate-y-[60vh] scale-[3] opacity-0":""}`,children:h.jsx(Yo,{size:"lg",hideLabel:ie})}),h.jsxs("form",{onSubmit:Q,className:`space-y-5 transition-opacity duration-300 ${ie?"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:I=>E(I.target.value),className:"input",placeholder:"Enter your username",autoFocus:!ie,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:_,onChange:I=>O(I.target.value),className:"input",placeholder:"Enter your password",autoComplete:"current-password"})]}),R&&h.jsx("p",{className:"text-sm text-status-error",children:R}),h.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:z||ie,children:z?"Signing in...":"Sign In"}),ce.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:ce.filter(I=>I.provider!=="anthropic").map(I=>h.jsxs("a",{href:`${Tt}/api/auth/oauth/${I.provider}?returnTo=${encodeURIComponent(m)}`,className:"btn-secondary w-full flex items-center justify-center gap-2",children:[h.jsx($y,{provider:I.provider}),"Sign in with ",I.name]},I.provider))})]})]})]})})}function xg(){const{isAuthenticated:i}=Vn(),t=th(),s=Sn(),a=new URLSearchParams(s.search),o=a.get("state")||"";A.useEffect(()=>{i||t(`/login?returnTo=${encodeURIComponent(s.pathname+s.search)}`)},[i]);const[f,d]=A.useState(""),[m,g]=A.useState(a.get("label")||"default"),[y,E]=A.useState(""),[_,O]=A.useState(!1),R=f.trim().startsWith("sk-ant-oat"),M=f.trim().startsWith("sk-ant-api"),z=F=>{F.preventDefault();const ie=f.trim();if(!ie){E("A token or API key is required");return}if(!ie.startsWith("sk-ant-")){E('Invalid format. Must start with "sk-ant-oat" (OAuth token) or "sk-ant-api" (API key)');return}O(!0),E("");const $=`${Tt}/api/auth/oauth/anthropic/callback?code=${encodeURIComponent(ie)}&state=${encodeURIComponent(o)}`;window.location.href=$};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(Yo,{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:"heading-3",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:z,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:F=>d(F.target.value),className:"input",placeholder:"sk-ant-oat01-... or sk-ant-api03-...",autoFocus:!0,autoComplete:"off"}),R&&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:F=>g(F.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:_,children:_?"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-2xs",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 qa({roleTypes:i,roleNames:t,redirectTo:s="/"}){const{isSuperAdmin:a,hasRole:o,hasRoleType:f}=Vn();return a?h.jsx(Sr,{}):i&&i.some(d=>f(d))?h.jsx(Sr,{}):t&&t.some(d=>o(d))?h.jsx(Sr,{}):h.jsx(Ln,{to:s,replace:!0})}function $E({redirectTo:i="/"}){var a;const{data:t,isLoading:s}=Mi();return s||!t?null:(a=t.ai)!=null&&a.enabled?h.jsx(Sr,{}):h.jsx(Ln,{to:i,replace:!0})}function YE({flag:i,redirectTo:t="/"}){var o;const{data:s,isLoading:a}=Mi();return a||!s?null:((o=s.features)==null?void 0:o[i])===!1?h.jsx(Ln,{to:t,replace:!0}):h.jsx(Sr,{})}const GE=A.lazy(()=>_e(()=>import("./ProcessesListPage-BPi9CNxQ.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}))),VE=A.lazy(()=>_e(()=>import("./ProcessDetailPage-DyB979ge.js"),__vite__mapDeps([18,1,2,4,19,14,20,17,11,6,21,22,23]),import.meta.url).then(i=>({default:i.ProcessDetailPage}))),IE=A.lazy(()=>_e(()=>import("./McpOverview-YPY-lX3M.js"),__vite__mapDeps([24,1,25,26,27,28,15,14,29,6]),import.meta.url).then(i=>({default:i.McpOverview}))),FE=A.lazy(()=>_e(()=>import("./McpRunsPage-PRAQPR-H.js"),__vite__mapDeps([30,1,26,27,5,6,31,28,8,9,10,17,14,32,15,13,12,16,33]),import.meta.url).then(i=>({default:i.McpRunsPage}))),JE=A.lazy(()=>_e(()=>import("./McpRunDetailPage-Bl12usuN.js"),__vite__mapDeps([34,1,26,20,15,14,35,6,36,37,13,38,39,16]),import.meta.url).then(i=>({default:i.McpRunDetailPage}))),QE=A.lazy(()=>_e(()=>import("./McpQueryPage-C5-AQvnp.js"),__vite__mapDeps([40,1,15,14,9,10,13,12,16,8,11,32,17,33,5,6,4,41]),import.meta.url).then(i=>({default:i.McpQueryPage}))),KE=A.lazy(()=>_e(()=>import("./McpQueryDetailPage-Ct3Mb1R2.js"),__vite__mapDeps([42,1,15,14,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}))),XE=A.lazy(()=>_e(()=>import("./EscalationsOverview-D3dFDffZ.js"),__vite__mapDeps([51,1,4,15,14,29,6]),import.meta.url).then(i=>({default:i.EscalationsOverview}))),ZE=A.lazy(()=>_e(()=>import("./AvailableEscalationsPage-Dq_FyUcB.js"),__vite__mapDeps([52,1,53,4,14,54,55,6,20,12,56,57,58,5,7,8,9,10,23,59,13,60,21,17,33,16]),import.meta.url).then(i=>({default:i.AvailableEscalationsPage}))),WE=A.lazy(()=>_e(()=>import("./OperatorDashboard-353PWYOD.js"),__vite__mapDeps([61,1,4,5,6,7,8,9,10,15,14,12,33,59,13,60,21,17,56,16]),import.meta.url).then(i=>({default:i.OperatorDashboard}))),ej=A.lazy(()=>_e(()=>import("./index-Wu6GCvUq.js"),__vite__mapDeps([62,1,54,55,6,20,12,56,14,57,15,16,3,4,21,35,22,23]),import.meta.url).then(i=>({default:i.EscalationDetailPage}))),tj=A.lazy(()=>_e(()=>import("./WorkflowsOverview-YoPFHjOb.js"),__vite__mapDeps([63,1,3,4,15,14,29,6]),import.meta.url).then(i=>({default:i.WorkflowsOverview}))),nj=A.lazy(()=>_e(()=>import("./index-b7P6Hjd3.js"),__vite__mapDeps([64,1,3,15,14,13,17,65,47,48,6]),import.meta.url).then(i=>({default:i.StartWorkflowPage}))),sj=A.lazy(()=>_e(()=>import("./index-b7P6Hjd3.js"),__vite__mapDeps([64,1,3,15,14,13,17,65,47,48,6]),import.meta.url).then(i=>({default:i.DurableInvokePage}))),ij=A.lazy(()=>_e(()=>import("./WorkflowsDashboard-CrwdULL7.js"),__vite__mapDeps([66,1,32,3,31,28,6,4,5,8,9,10,17,14,15,13,12,16,33]),import.meta.url).then(i=>({default:()=>i.WorkflowsDashboard({tier:"durable"})}))),rj=A.lazy(()=>_e(()=>import("./WorkflowsDashboard-CrwdULL7.js"),__vite__mapDeps([66,1,32,3,31,28,6,4,5,8,9,10,17,14,15,13,12,16,33]),import.meta.url).then(i=>({default:()=>i.WorkflowsDashboard({tier:"all"})}))),aj=A.lazy(()=>_e(()=>import("./YamlWorkflowsPage-gburzX11.js"),__vite__mapDeps([67,1,27,5,6,15,14,13,10,49,65,20]),import.meta.url).then(i=>({default:i.YamlWorkflowsPage}))),lj=A.lazy(()=>_e(()=>import("./GraphInvokePage-CJOyaU4g.js"),__vite__mapDeps([68,1,27,15,14,44,46,47,48,45,6,49,65]),import.meta.url).then(i=>({default:i.GraphInvokePage}))),oj=A.lazy(()=>_e(()=>import("./YamlWorkflowDetailPage-B4H8WvSt.js"),__vite__mapDeps([69,1,27,20,65,14,6]),import.meta.url).then(i=>({default:i.YamlWorkflowDetailPage}))),cj=A.lazy(()=>_e(()=>import("./TasksListPage-DNjZbo42.js"),__vite__mapDeps([70,1,2,3,5,6,9,10,20,60,50,12,13,14,15,17]),import.meta.url).then(i=>({default:i.TasksListPage}))),uj=A.lazy(()=>_e(()=>import("./TaskDetailPage-Cbr6Bzx3.js"),__vite__mapDeps([71,1,2,20,60,15,14,6]),import.meta.url).then(i=>({default:i.TaskDetailPage}))),vg=A.lazy(()=>_e(()=>import("./WorkflowExecutionPage-DPymyMAM.js"),__vite__mapDeps([72,1,3,4,37,13,14,38,20,6,39,2,15,36,16,35]),import.meta.url).then(i=>({default:i.WorkflowExecutionPage}))),fj=A.lazy(()=>_e(()=>import("./AdminDashboard-B5B8cf1A.js"),__vite__mapDeps([73,1,2,4,25,19,14,6]),import.meta.url).then(i=>({default:i.AdminDashboard}))),hj=A.lazy(()=>_e(()=>import("./index-CkwNuQzx.js"),__vite__mapDeps([74,1,3,9,10,13,14,33,5,6,15,75,17]),import.meta.url).then(i=>({default:i.WorkersPage}))),dj=A.lazy(()=>_e(()=>import("./index-BTsTdaRt.js"),__vite__mapDeps([76,1,3,13,14,77,55,6,21,17,15,47,48,65]),import.meta.url).then(i=>({default:i.WorkflowConfigsPage}))),_g=A.lazy(()=>_e(()=>import("./index-BTsTdaRt.js"),__vite__mapDeps([76,1,3,13,14,77,55,6,21,17,15,47,48,65]),import.meta.url).then(i=>({default:i.WorkflowConfigDetailPage}))),mj=A.lazy(()=>_e(()=>import("./index-Dh6F3Wbx.js"),__vite__mapDeps([78,1,25,10,77,55,6,15,14,13,12,5,79,46,47,48,49,45,33,20]),import.meta.url).then(i=>({default:i.McpServersPage}))),wg=A.lazy(()=>_e(()=>import("./index-DFJm742Y.js"),__vite__mapDeps([80,1,25,15,14,43,6]),import.meta.url).then(i=>({default:i.McpServerDetailPage}))),pj=A.lazy(()=>_e(()=>import("./index-j-X71wT4.js"),__vite__mapDeps([81,1,23,5,6,9,10,12,13,14,77,55,33,15,21,48,50]),import.meta.url).then(i=>({default:i.UsersPage}))),gj=A.lazy(()=>_e(()=>import("./RolesPage-C_i2RLwv.js"),__vite__mapDeps([82,1,15,14,21,58,55,6]),import.meta.url).then(i=>({default:i.RolesPage}))),yj=A.lazy(()=>_e(()=>import("./RoleDetailPage-D6K3tdNO.js"),__vite__mapDeps([83,1,77,55,6,23,14]),import.meta.url).then(i=>({default:i.RoleDetailPage}))),bj=A.lazy(()=>_e(()=>import("./EscalationSchemaPage-ChawQh5H.js"),__vite__mapDeps([84,1,14,6]),import.meta.url).then(i=>({default:i.EscalationSchemaPage}))),xj=A.lazy(()=>_e(()=>import("./EscalationListSchemaPage-BRrrftTq.js"),__vite__mapDeps([85,1,14,6]),import.meta.url).then(i=>({default:i.EscalationListSchemaPage}))),vj=A.lazy(()=>_e(()=>import("./index-stu9QXmW.js"),__vite__mapDeps([86,1,15,14,55,6,57]),import.meta.url).then(i=>({default:i.MaintenancePage}))),_j=A.lazy(()=>_e(()=>import("./OperationsPage-DLGNcE-b.js").then(i=>i.O),__vite__mapDeps([87,1,4,15,14,58,6]),import.meta.url).then(i=>({default:i.OperationsPage}))),wj=A.lazy(()=>_e(()=>import("./index-CR1_qhQf.js"),__vite__mapDeps([88,1,19,14,13,5,6,31,28,55,36,75,9,10,33]),import.meta.url).then(i=>({default:i.ControlPlanePage}))),Sj=A.lazy(()=>_e(()=>import("./index-Bl-09ECD.js"),__vite__mapDeps([89,1,39,14,5,6,31,28,8,9,10,12,13,15,16]),import.meta.url).then(i=>({default:i.StreamMessagesPage}))),Ej=A.lazy(()=>_e(()=>import("./CredentialsPage-BFf0p9CE.js"),__vite__mapDeps([90,1,15,14,50,77,55,6]),import.meta.url).then(i=>({default:i.CredentialsPage}))),jj=A.lazy(()=>_e(()=>import("./index-zuK6pSyZ.js"),__vite__mapDeps([91,1,6,15,14,13,16,8,10,92,50]),import.meta.url).then(i=>({default:i.FilesPage}))),Aj=A.lazy(()=>_e(()=>import("./index-CVZOAQVo.js"),__vite__mapDeps([93,1,15,14,13,16,12,10,92,50,94,43,6]),import.meta.url).then(i=>({default:i.KnowledgePage}))),Oj=A.lazy(()=>_e(()=>import("./HomePage-DxJz7AQ7.js"),__vite__mapDeps([95,1,3,26,28,4,21,14,17,16,87,15,58,6,53]),import.meta.url).then(i=>({default:i.HomePage}))),Nj=A.lazy(()=>_e(()=>import("./AgentsPage-BPgki44D.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}))),Tj=A.lazy(()=>_e(()=>import("./AgentDetailPage-Bv89ria_.js"),__vite__mapDeps([98,1,97,99,14,4,17,6]),import.meta.url).then(i=>({default:i.AgentDetailPage}))),Sg=A.lazy(()=>_e(()=>import("./AgentConfigPage-BxuHbkDF.js"),__vite__mapDeps([100,1,97,99,14,15,94,46,47,48,3,27,101,102,17,6]),import.meta.url).then(i=>({default:i.AgentConfigPage}))),kj=A.lazy(()=>_e(()=>import("./CapabilitiesPage-C8Zxzh1x.js"),__vite__mapDeps([103,1,101,79,25,46,47,48,14,49,6,45,15,13]),import.meta.url).then(i=>({default:i.CapabilitiesPage}))),Cj=A.lazy(()=>_e(()=>import("./TopicsPage-Ckh6ln0h.js"),__vite__mapDeps([104,1,102,15,14,13,6]),import.meta.url).then(i=>({default:i.TopicsPage}))),Mj=A.lazy(()=>_e(()=>import("./TopicDetailPage-Bay2lUOW.js"),__vite__mapDeps([105,1,102,16,14,6]),import.meta.url).then(i=>({default:i.TopicDetailPage})));function Rj(){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 ve({children:i}){return h.jsx(A.Suspense,{fallback:h.jsx(Rj,{}),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,t)=>t instanceof Error&&t.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__||"",t=`${i}/login`;if(window.location.pathname!==t){const s=window.location.pathname+window.location.search,a=i&&s.startsWith(i)?s.slice(i.length)||"/":s;window.location.href=`${t}?returnTo=${encodeURIComponent(a)}`}});const Dj=sv([{path:"/login",element:h.jsx(HE,{})},{path:"/connect/anthropic",element:h.jsx(xg,{})},{path:"/connect/:provider",element:h.jsx(xg,{})},{path:"/",element:h.jsx(BE,{}),children:[{index:!0,element:h.jsx(ve,{children:h.jsx(Oj,{})})},{path:"processes/all",element:h.jsx(ve,{children:h.jsx(GE,{})})},{path:"processes/detail/:originId",element:h.jsx(ve,{children:h.jsx(VE,{})})},{path:"credentials",element:h.jsx(ve,{children:h.jsx(Ej,{})})},{path:"connections",element:h.jsx(Ln,{to:"/credentials",replace:!0})},{path:"escalations",element:h.jsx(ve,{children:h.jsx(XE,{})})},{path:"escalations/available",element:h.jsx(ve,{children:h.jsx(ZE,{})})},{path:"escalations/queue",element:h.jsx(ve,{children:h.jsx(WE,{})})},{path:"escalations/detail/:id",element:h.jsx(ve,{children:h.jsx(ej,{})})},{path:"capabilities",element:h.jsx(ve,{children:h.jsx(kj,{})})},{path:"agents",element:h.jsx(ve,{children:h.jsx(Nj,{})})},{path:"agents/new",element:h.jsx(ve,{children:h.jsx(Sg,{})})},{path:"agents/:id",element:h.jsx(ve,{children:h.jsx(Tj,{})})},{path:"agents/:id/edit",element:h.jsx(ve,{children:h.jsx(Sg,{})})},{path:"topics",element:h.jsx(ve,{children:h.jsx(Cj,{})})},{path:"topics/:topic",element:h.jsx(ve,{children:h.jsx(Mj,{})})},{element:h.jsx(qa,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"workflows",element:h.jsx(ve,{children:h.jsx(tj,{})})},{path:"workflows/executions",element:h.jsx(ve,{children:h.jsx(rj,{})})},{path:"workflows/durable/executions",element:h.jsx(ve,{children:h.jsx(ij,{})})},{path:"workflows/durable/executions/:workflowId",element:h.jsx(ve,{children:h.jsx(vg,{})})},{path:"workflows/tasks",element:h.jsx(ve,{children:h.jsx(cj,{})})},{path:"workflows/tasks/detail/:id",element:h.jsx(ve,{children:h.jsx(uj,{})})},{path:"workflows/executions/:workflowId",element:h.jsx(ve,{children:h.jsx(vg,{})})},{path:"workflows/start",element:h.jsx(ve,{children:h.jsx(nj,{})})},{path:"workflows/durable/invoke",element:h.jsx(ve,{children:h.jsx(sj,{})})},{path:"workflows/cron",element:h.jsx(Ln,{to:"/workflows/start?mode=schedule",replace:!0})},{path:"workflows/workers",element:h.jsx(ve,{children:h.jsx(hj,{})})},{path:"workflows/registry",element:h.jsx(ve,{children:h.jsx(dj,{})})},{path:"workflows/registry/new",element:h.jsx(ve,{children:h.jsx(_g,{})})},{path:"workflows/registry/:workflowType",element:h.jsx(ve,{children:h.jsx(_g,{})})}]},{element:h.jsx(qa,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"mcp/workflows",element:h.jsx(ve,{children:h.jsx(aj,{})})},{path:"mcp/workflows/invoke",element:h.jsx(ve,{children:h.jsx(lj,{})})},{path:"mcp/workflows/:id",element:h.jsx(ve,{children:h.jsx(oj,{})})},{path:"mcp/executions",element:h.jsx(ve,{children:h.jsx(FE,{})})},{path:"mcp/executions/:jobId",element:h.jsx(ve,{children:h.jsx(JE,{})})},{path:"files",element:h.jsx(ve,{children:h.jsx(jj,{})})},{path:"knowledge",element:h.jsx(ve,{children:h.jsx(Aj,{})})},{element:h.jsx($E,{}),children:[{path:"mcp",element:h.jsx(ve,{children:h.jsx(IE,{})})},{path:"mcp/queries",element:h.jsx(ve,{children:h.jsx(QE,{})})},{path:"mcp/queries/:workflowId",element:h.jsx(ve,{children:h.jsx(KE,{})})},{path:"mcp/tools",element:h.jsx(Ln,{to:"/mcp/servers",replace:!0})},{path:"mcp/servers",element:h.jsx(ve,{children:h.jsx(mj,{})})},{path:"mcp/servers/new",element:h.jsx(ve,{children:h.jsx(wg,{})})},{path:"mcp/servers/:serverId",element:h.jsx(ve,{children:h.jsx(wg,{})})}]}]},{element:h.jsx(qa,{roleTypes:["admin","superadmin"],roleNames:["engineer"]}),children:[{path:"operations",element:h.jsx(ve,{children:h.jsx(_j,{})})}]},{element:h.jsx(qa,{roleTypes:["admin","superadmin"],roleNames:["engineer"]}),children:[{path:"admin",element:h.jsx(ve,{children:h.jsx(fj,{})})},{path:"admin/users",element:h.jsx(ve,{children:h.jsx(pj,{})})},{path:"admin/escalation-chains",element:h.jsx(Ln,{to:"/admin/roles",replace:!0})},{path:"admin/roles",element:h.jsx(ve,{children:h.jsx(gj,{})})},{path:"admin/roles/:role",element:h.jsx(ve,{children:h.jsx(yj,{})})},{path:"admin/roles/:role/schema",element:h.jsx(ve,{children:h.jsx(bj,{})})},{path:"admin/roles/:role/list-schema",element:h.jsx(ve,{children:h.jsx(xj,{})})}]},{element:h.jsx(qa,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"admin/bots",element:h.jsx(Ln,{to:"/admin/users?tab=service-accounts",replace:!0})},{element:h.jsx(YE,{flag:"dbMaintenance"}),children:[{path:"admin/maintenance",element:h.jsx(ve,{children:h.jsx(vj,{})})}]},{path:"admin/controlplane",element:h.jsx(ve,{children:h.jsx(wj,{})})},{path:"admin/streams",element:h.jsx(ve,{children:h.jsx(Sj,{})})}]}]}],{basename:window.__LT_BASE__||"/"});function qj(){return h.jsx(tv,{client:Yy,children:h.jsx($v,{children:h.jsx(Gw,{children:h.jsx(iv,{router:Dj})})})})}jy(Ey());const Oh=document.createElement("link");Oh.rel="stylesheet";Oh.href=`${Tt}/api/settings/custom.css`;document.head.appendChild(Oh);Uv.createRoot(document.getElementById("root")).render(h.jsx(A.StrictMode,{children:h.jsx(qj,{})}));export{Hy as $,iA as A,aA as B,Eh as C,kE as D,lA as E,Ty as F,xS as G,Ij as H,vy as I,XS as J,xy as K,mA as L,Ah as M,Xg as N,Xj as O,EA as P,jh as Q,sS as R,LS as S,Yj as T,$j as U,Qj as V,Wj as W,rA as X,cA as Y,Pv as Z,Py as _,AA as a,jA as a0,gA as a1,oA as a2,yA as a3,bA as a4,uA as a5,fA as a6,dA as a7,hA as a8,pA as a9,wA as aa,Hj as ab,Tt as ac,Mg as ad,Gj as ae,OA as af,NA as ag,$y as ah,gy as ai,SA as aj,TE as b,Wg as c,we as d,Jj as e,AE as f,Kj as g,Zj as h,Vj as i,dy as j,Vn as k,Fj as l,vA as m,_A as n,nS as o,wS as p,vS as q,_S as r,jS as s,py as t,Mi as u,eA as v,xA as w,tA as x,nA as y,sA as z};
|
|
63
|
-
//# sourceMappingURL=index-
|
|
62
|
+
... (truncated)`});const le=`${h2(o.concat(ce))}${ie}`;try{const W=(await we("/insight/mcp-query",{method:"POST",body:JSON.stringify({prompt:le,tags:T.suggestedTags,context:T,wait:!1,direct:!0})})).workflow_id;m(W),f(oe=>oe.map(re=>re.id===ee.id?{...re,workflowId:W}:re)),E.current&&clearInterval(E.current),E.current=setInterval(async()=>{var oe;try{const re=await we(`/workflows/${W}/result`),Oe=(oe=re==null?void 0:re.result)==null?void 0:oe.data;if(Oe){E.current&&clearInterval(E.current),E.current=null,m(null);const ke=d2(Oe);let Se;try{Se=(await we(`/workflow-states/${W}/execution`)).duration_ms}catch{}f(q=>q.map(ne=>ne.id===ee.id?{...ne,content:ke,timestamp:new Date().toISOString(),pending:!1,durationMs:Se}:ne))}}catch{}},3e3)}catch{f(V=>V.map(W=>W.id===ee.id?{...W,content:"Failed to submit query. Please try again.",pending:!1}:W))}},[o,_]),F=A.useCallback(async ie=>{const $=o.find(T=>T.id===ie);if(!($!=null&&$.workflowId)||$.compilationStatus==="compiling"||$.compilationStatus==="done")return;const ce=o.indexOf($),ee=o.slice(0,ce).reverse().find(T=>T.role==="user");if(ee){f(T=>T.map(Q=>Q.id===ie?{...Q,compilationStatus:"compiling"}:Q));try{const T=await we("/insight/mcp-query/describe",{method:"POST",body:JSON.stringify({prompt:ee.content,summary:$.content})}),Q=await we("/yaml-workflows",{method:"POST",body:JSON.stringify({workflow_id:$.workflowId,task_queue:"long-tail-system",workflow_name:"mcpQuery",name:T.tool_name,description:T.description,tags:T.tags,app_id:""})});await we(`/yaml-workflows/${Q.id}/deploy`,{method:"POST"}),f(le=>le.map(I=>I.id===ie?{...I,compilationStatus:"done"}:I))}catch(T){const Q=T instanceof Error?T.message:"Compilation failed";f(le=>le.map(I=>I.id===ie?{...I,compilationStatus:"error",compilationError:Q}:I))}}},[o]);return h.jsx(My.Provider,{value:{helpOpen:s,setHelpOpen:a,toggleHelp:O,messages:o,sendMessage:z,pageContext:_,setPageContext:R,activeWorkflowId:d,clearMessages:M,compileMessage:F},children:i})}function Ry(){const i=A.useContext(My);if(!i)throw new Error("useHelpAssistant must be used within HelpAssistantProvider");return i}function p2(){const{helpOpen:i,toggleHelp:t}=Ry();return h.jsx("button",{onClick:t,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(Yn,{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(${Tt}/logo512.png)`}})})}const Dy=6048e5,g2=864e5,lg=6e4,og=525600,cg=43200,ug=1440,fg=Symbol.for("constructDateFrom");function gs(i,t){return typeof i=="function"?i(t):i&&typeof i=="object"&&fg in i?i[fg](t):i instanceof Date?new i.constructor(t):new Date(t)}function ln(i,t){return gs(t||i,i)}let y2={};function Za(){return y2}function Ja(i,t){var m,g,y,E;const s=Za(),a=(t==null?void 0:t.weekStartsOn)??((g=(m=t==null?void 0:t.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,t==null?void 0:t.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 Vo(i,t){return Ja(i,{...t,weekStartsOn:1})}function qy(i,t){const s=ln(i,t==null?void 0:t.in),a=s.getFullYear(),o=gs(s,0);o.setFullYear(a+1,0,4),o.setHours(0,0,0,0);const f=Vo(o),d=gs(s,0);d.setFullYear(a,0,4),d.setHours(0,0,0,0);const m=Vo(d);return s.getTime()>=f.getTime()?a+1:s.getTime()>=m.getTime()?a:a-1}function Io(i){const t=ln(i),s=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return s.setUTCFullYear(t.getFullYear()),+i-+s}function zy(i,...t){const s=gs.bind(null,i||t.find(a=>typeof a=="object"));return t.map(s)}function hg(i,t){const s=ln(i,t==null?void 0:t.in);return s.setHours(0,0,0,0),s}function b2(i,t,s){const[a,o]=zy(s==null?void 0:s.in,i,t),f=hg(a),d=hg(o),m=+f-Io(f),g=+d-Io(d);return Math.round((m-g)/g2)}function x2(i,t){const s=qy(i,t),a=gs(i,0);return a.setFullYear(s,0,4),a.setHours(0,0,0,0),Vo(a)}function v2(i,t){const s=+ln(i)-+ln(t);return s<0?-1:s>0?1:s}function _2(i){return gs(i,Date.now())}function w2(i){return i instanceof Date||typeof i=="object"&&Object.prototype.toString.call(i)==="[object Date]"}function S2(i){return!(!w2(i)&&typeof i!="number"||isNaN(+ln(i)))}function E2(i){return t=>{const a=(i?Math[i]:Math.trunc)(t);return a===0?0:a}}function j2(i,t){const s=ln(i,t==null?void 0:t.in);return s.setFullYear(s.getFullYear(),0,1),s.setHours(0,0,0,0),s}const A2={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"}},O2=(i,t,s)=>{let a;const o=A2[i];return typeof o=="string"?a=o:t===1?a=o.one:a=o.other.replace("{{count}}",t.toString()),s!=null&&s.addSuffix?s.comparison&&s.comparison>0?"in "+a:a+" ago":a};function Of(i){return(t={})=>{const s=t.width?String(t.width):i.defaultWidth;return i.formats[s]||i.formats[i.defaultWidth]}}const N2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},T2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},k2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},C2={date:Of({formats:N2,defaultWidth:"full"}),time:Of({formats:T2,defaultWidth:"full"}),dateTime:Of({formats:k2,defaultWidth:"full"})},M2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},R2=(i,t,s,a)=>M2[i];function Ra(i){return(t,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(t):t;return o[f]}}const D2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},q2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},z2={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"]},U2={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"]},B2={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"}},L2={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"}},P2=(i,t)=>{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"},H2={ordinalNumber:P2,era:Ra({values:D2,defaultWidth:"wide"}),quarter:Ra({values:q2,defaultWidth:"wide",argumentCallback:i=>i-1}),month:Ra({values:z2,defaultWidth:"wide"}),day:Ra({values:U2,defaultWidth:"wide"}),dayPeriod:Ra({values:B2,defaultWidth:"wide",formattingValues:L2,defaultFormattingWidth:"wide"})};function Da(i){return(t,s={})=>{const a=s.width,o=a&&i.matchPatterns[a]||i.matchPatterns[i.defaultMatchWidth],f=t.match(o);if(!f)return null;const d=f[0],m=a&&i.parsePatterns[a]||i.parsePatterns[i.defaultParseWidth],g=Array.isArray(m)?Y2(m,_=>_.test(d)):$2(m,_=>_.test(d));let y;y=i.valueCallback?i.valueCallback(g):g,y=s.valueCallback?s.valueCallback(y):y;const E=t.slice(d.length);return{value:y,rest:E}}}function $2(i,t){for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&t(i[s]))return s}function Y2(i,t){for(let s=0;s<i.length;s++)if(t(i[s]))return s}function G2(i){return(t,s={})=>{const a=t.match(i.matchPattern);if(!a)return null;const o=a[0],f=t.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=t.slice(o.length);return{value:d,rest:m}}}const V2=/^(\d+)(th|st|nd|rd)?/i,I2=/\d+/i,F2={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},J2={any:[/^b/i,/^(a|c)/i]},Q2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},K2={any:[/1/i,/2/i,/3/i,/4/i]},X2={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},Z2={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]},W2={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},eE={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]},tE={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},nE={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}},sE={ordinalNumber:G2({matchPattern:V2,parsePattern:I2,valueCallback:i=>parseInt(i,10)}),era:Da({matchPatterns:F2,defaultMatchWidth:"wide",parsePatterns:J2,defaultParseWidth:"any"}),quarter:Da({matchPatterns:Q2,defaultMatchWidth:"wide",parsePatterns:K2,defaultParseWidth:"any",valueCallback:i=>i+1}),month:Da({matchPatterns:X2,defaultMatchWidth:"wide",parsePatterns:Z2,defaultParseWidth:"any"}),day:Da({matchPatterns:W2,defaultMatchWidth:"wide",parsePatterns:eE,defaultParseWidth:"any"}),dayPeriod:Da({matchPatterns:tE,defaultMatchWidth:"any",parsePatterns:nE,defaultParseWidth:"any"})},Uy={code:"en-US",formatDistance:O2,formatLong:C2,formatRelative:R2,localize:H2,match:sE,options:{weekStartsOn:0,firstWeekContainsDate:1}};function iE(i,t){const s=ln(i,t==null?void 0:t.in);return b2(s,j2(s))+1}function rE(i,t){const s=ln(i,t==null?void 0:t.in),a=+Vo(s)-+x2(s);return Math.round(a/Dy)+1}function By(i,t){var E,_,O,R;const s=ln(i,t==null?void 0:t.in),a=s.getFullYear(),o=Za(),f=(t==null?void 0:t.firstWeekContainsDate)??((_=(E=t==null?void 0:t.locale)==null?void 0:E.options)==null?void 0:_.firstWeekContainsDate)??o.firstWeekContainsDate??((R=(O=o.locale)==null?void 0:O.options)==null?void 0:R.firstWeekContainsDate)??1,d=gs((t==null?void 0:t.in)||i,0);d.setFullYear(a+1,0,f),d.setHours(0,0,0,0);const m=Ja(d,t),g=gs((t==null?void 0:t.in)||i,0);g.setFullYear(a,0,f),g.setHours(0,0,0,0);const y=Ja(g,t);return+s>=+m?a+1:+s>=+y?a:a-1}function aE(i,t){var m,g,y,E;const s=Za(),a=(t==null?void 0:t.firstWeekContainsDate)??((g=(m=t==null?void 0:t.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=By(i,t),f=gs((t==null?void 0:t.in)||i,0);return f.setFullYear(o,0,a),f.setHours(0,0,0,0),Ja(f,t)}function lE(i,t){const s=ln(i,t==null?void 0:t.in),a=+Ja(s,t)-+aE(s,t);return Math.round(a/Dy)+1}function Ve(i,t){const s=i<0?"-":"",a=Math.abs(i).toString().padStart(t,"0");return s+a}const Js={y(i,t){const s=i.getFullYear(),a=s>0?s:1-s;return Ve(t==="yy"?a%100:a,t.length)},M(i,t){const s=i.getMonth();return t==="M"?String(s+1):Ve(s+1,2)},d(i,t){return Ve(i.getDate(),t.length)},a(i,t){const s=i.getHours()/12>=1?"pm":"am";switch(t){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,t){return Ve(i.getHours()%12||12,t.length)},H(i,t){return Ve(i.getHours(),t.length)},m(i,t){return Ve(i.getMinutes(),t.length)},s(i,t){return Ve(i.getSeconds(),t.length)},S(i,t){const s=t.length,a=i.getMilliseconds(),o=Math.trunc(a*Math.pow(10,s-3));return Ve(o,t.length)}},_r={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dg={G:function(i,t,s){const a=i.getFullYear()>0?1:0;switch(t){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,t,s){if(t==="yo"){const a=i.getFullYear(),o=a>0?a:1-a;return s.ordinalNumber(o,{unit:"year"})}return Js.y(i,t)},Y:function(i,t,s,a){const o=By(i,a),f=o>0?o:1-o;if(t==="YY"){const d=f%100;return Ve(d,2)}return t==="Yo"?s.ordinalNumber(f,{unit:"year"}):Ve(f,t.length)},R:function(i,t){const s=qy(i);return Ve(s,t.length)},u:function(i,t){const s=i.getFullYear();return Ve(s,t.length)},Q:function(i,t,s){const a=Math.ceil((i.getMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return Ve(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,t,s){const a=Math.ceil((i.getMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return Ve(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,t,s){const a=i.getMonth();switch(t){case"M":case"MM":return Js.M(i,t);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,t,s){const a=i.getMonth();switch(t){case"L":return String(a+1);case"LL":return Ve(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,t,s,a){const o=lE(i,a);return t==="wo"?s.ordinalNumber(o,{unit:"week"}):Ve(o,t.length)},I:function(i,t,s){const a=rE(i);return t==="Io"?s.ordinalNumber(a,{unit:"week"}):Ve(a,t.length)},d:function(i,t,s){return t==="do"?s.ordinalNumber(i.getDate(),{unit:"date"}):Js.d(i,t)},D:function(i,t,s){const a=iE(i);return t==="Do"?s.ordinalNumber(a,{unit:"dayOfYear"}):Ve(a,t.length)},E:function(i,t,s){const a=i.getDay();switch(t){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,t,s,a){const o=i.getDay(),f=(o-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(f);case"ee":return Ve(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,t,s,a){const o=i.getDay(),f=(o-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(f);case"cc":return Ve(f,t.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,t,s){const a=i.getDay(),o=a===0?7:a;switch(t){case"i":return String(o);case"ii":return Ve(o,t.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,t,s){const o=i.getHours()/12>=1?"pm":"am";switch(t){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,t,s){const a=i.getHours();let o;switch(a===12?o=_r.noon:a===0?o=_r.midnight:o=a/12>=1?"pm":"am",t){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,t,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,t){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,t,s){if(t==="ho"){let a=i.getHours()%12;return a===0&&(a=12),s.ordinalNumber(a,{unit:"hour"})}return Js.h(i,t)},H:function(i,t,s){return t==="Ho"?s.ordinalNumber(i.getHours(),{unit:"hour"}):Js.H(i,t)},K:function(i,t,s){const a=i.getHours()%12;return t==="Ko"?s.ordinalNumber(a,{unit:"hour"}):Ve(a,t.length)},k:function(i,t,s){let a=i.getHours();return a===0&&(a=24),t==="ko"?s.ordinalNumber(a,{unit:"hour"}):Ve(a,t.length)},m:function(i,t,s){return t==="mo"?s.ordinalNumber(i.getMinutes(),{unit:"minute"}):Js.m(i,t)},s:function(i,t,s){return t==="so"?s.ordinalNumber(i.getSeconds(),{unit:"second"}):Js.s(i,t)},S:function(i,t){return Js.S(i,t)},X:function(i,t,s){const a=i.getTimezoneOffset();if(a===0)return"Z";switch(t){case"X":return pg(a);case"XXXX":case"XX":return Oi(a);case"XXXXX":case"XXX":default:return Oi(a,":")}},x:function(i,t,s){const a=i.getTimezoneOffset();switch(t){case"x":return pg(a);case"xxxx":case"xx":return Oi(a);case"xxxxx":case"xxx":default:return Oi(a,":")}},O:function(i,t,s){const a=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+mg(a,":");case"OOOO":default:return"GMT"+Oi(a,":")}},z:function(i,t,s){const a=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+mg(a,":");case"zzzz":default:return"GMT"+Oi(a,":")}},t:function(i,t,s){const a=Math.trunc(+i/1e3);return Ve(a,t.length)},T:function(i,t,s){return Ve(+i,t.length)}};function mg(i,t=""){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)+t+Ve(f,2)}function pg(i,t){return i%60===0?(i>0?"-":"+")+Ve(Math.abs(i)/60,2):Oi(i,t)}function Oi(i,t=""){const s=i>0?"-":"+",a=Math.abs(i),o=Ve(Math.trunc(a/60),2),f=Ve(a%60,2);return s+o+t+f}const gg=(i,t)=>{switch(i){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ly=(i,t)=>{switch(i){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},oE=(i,t)=>{const s=i.match(/(P+)(p+)?/)||[],a=s[1],o=s[2];if(!o)return gg(i,t);let f;switch(a){case"P":f=t.dateTime({width:"short"});break;case"PP":f=t.dateTime({width:"medium"});break;case"PPP":f=t.dateTime({width:"long"});break;case"PPPP":default:f=t.dateTime({width:"full"});break}return f.replace("{{date}}",gg(a,t)).replace("{{time}}",Ly(o,t))},cE={p:Ly,P:oE},uE=/^D+$/,fE=/^Y+$/,hE=["D","DD","YY","YYYY"];function dE(i){return uE.test(i)}function mE(i){return fE.test(i)}function pE(i,t,s){const a=gE(i,t,s);if(console.warn(a),hE.includes(i))throw new RangeError(a)}function gE(i,t,s){const a=i[0]==="Y"?"years":"days of the month";return`Use \`${i.toLowerCase()}\` instead of \`${i}\` (in \`${t}\`) for formatting ${a} to the input \`${s}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const yE=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bE=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xE=/^'([^]*?)'?$/,vE=/''/g,_E=/[a-zA-Z]/;function Py(i,t,s){var E,_,O,R;const a=Za(),o=a.locale??Uy,f=a.firstWeekContainsDate??((_=(E=a.locale)==null?void 0:E.options)==null?void 0:_.firstWeekContainsDate)??1,d=a.weekStartsOn??((R=(O=a.locale)==null?void 0:O.options)==null?void 0:R.weekStartsOn)??0,m=ln(i,s==null?void 0:s.in);if(!S2(m))throw new RangeError("Invalid time value");let g=t.match(bE).map(M=>{const z=M[0];if(z==="p"||z==="P"){const F=cE[z];return F(M,o.formatLong)}return M}).join("").match(yE).map(M=>{if(M==="''")return{isToken:!1,value:"'"};const z=M[0];if(z==="'")return{isToken:!1,value:wE(M)};if(dg[z])return{isToken:!0,value:M};if(z.match(_E))throw new RangeError("Format string contains an unescaped latin alphabet character `"+z+"`");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 z=M.value;(mE(z)||dE(z))&&pE(z,t,String(i));const F=dg[z[0]];return F(m,z,o.localize,y)}).join("")}function wE(i){const t=i.match(xE);return t?t[1].replace(vE,"'"):i}function SE(i,t,s){const a=Za(),o=(s==null?void 0:s.locale)??a.locale??Uy,f=v2(i,t);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]=zy(s==null?void 0:s.in,...f>0?[t,i]:[i,t]),y=E2((s==null?void 0:s.roundingMethod)??"round"),E=g.getTime()-m.getTime(),_=E/lg,O=Io(g)-Io(m),R=(E-O)/lg,M=s==null?void 0:s.unit;let z;if(M?z=M:_<1?z="second":_<60?z="minute":_<ug?z="hour":R<cg?z="day":R<og?z="month":z="year",z==="second"){const F=y(E/1e3);return o.formatDistance("xSeconds",F,d)}else if(z==="minute"){const F=y(_);return o.formatDistance("xMinutes",F,d)}else if(z==="hour"){const F=y(_/60);return o.formatDistance("xHours",F,d)}else if(z==="day"){const F=y(R/ug);return o.formatDistance("xDays",F,d)}else if(z==="month"){const F=y(R/cg);return F===12&&M!=="month"?o.formatDistance("xYears",1,d):o.formatDistance("xMonths",F,d)}else{const F=y(R/og);return o.formatDistance("xYears",F,d)}}function EE(i,t){return SE(i,_2(i),t)}function wA(i){return i.toLocaleString()}function SA(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 jE(i){const t=new Date(i);return t.getTime()>Date.now()?"just now":EE(t,{addSuffix:!0})}function EA(i){const t=Date.now()-new Date(i).getTime();if(t<0)return"now";const s=Math.floor(t/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 jA(i){return i<=0?"Expired":Ah(i)}function AE(i){return i==null?"--":Ah(i)}function Ah(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 t=Math.floor(i/1e3),s=Math.floor(t/86400),a=Math.floor(t%86400/3600),o=Math.floor(t%3600/60),f=t%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 AA(i,t){const s=new Date(i).getTime(),a=t?new Date(t).getTime():Date.now();return Ah(a-s)}function Hy({options:i,children:t,className:s=""}){const[a,o]=A.useState(!1),[f,d]=A.useState(null),[m,g]=A.useState(null),y=A.useRef(null),E=A.useRef(void 0),_=A.useRef(void 0),O=220,R=A.useCallback(()=>{if(!y.current)return;const ie=y.current.getBoundingClientRect(),$=window.innerWidth-O-8,ce=Math.max(8,Math.min(ie.left,$));g({top:ie.bottom+4,left:ce})},[]),M=A.useCallback(async(ie,$)=>{try{await navigator.clipboard.writeText(ie),d($),clearTimeout(E.current),E.current=setTimeout(()=>d(null),1200)}catch{}},[]),z=A.useCallback(()=>{clearTimeout(_.current),R(),o(!0)},[R]),F=A.useCallback(()=>{_.current=setTimeout(()=>o(!1),150)},[]);return A.useEffect(()=>()=>{clearTimeout(E.current),clearTimeout(_.current)},[]),h.jsxs("span",{ref:y,className:`inline-flex items-center cursor-default ${s}`,onMouseEnter:z,onMouseLeave:F,children:[t,a&&m&&Eg.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:z,onMouseLeave:F,children:i.map(ie=>h.jsxs("button",{onClick:$=>{$.stopPropagation(),M(ie.value,ie.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-2xs font-medium uppercase tracking-wider text-text-tertiary w-10 shrink-0",children:ie.label}),h.jsx("span",{className:"text-2xs font-mono text-text-secondary truncate ml-2",children:f===ie.label?"✓":ie.value})]},ie.label))}),document.body)]})}function OE(i,t){const s=new Date(i);switch(t){case"relative":return jE(i);case"datetime":return Py(s,"MMM d, yyyy h:mm a");case"time":return s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}}function NE(i){const t=new Date(i);return[{label:"ms",value:String(t.getTime())},{label:"utc",value:t.toISOString()},{label:"local",value:Py(t,"MMM d, yyyy h:mm:ss a")}]}function TE({date:i,format:t="relative",className:s=""}){const[,a]=A.useState(0);A.useEffect(()=>{if(t!=="relative")return;const f=setInterval(()=>a(d=>d+1),3e4);return()=>clearInterval(f)},[t]);const o=A.useMemo(()=>NE(i),[i]);return h.jsx(Hy,{options:o,children:h.jsx("time",{dateTime:i,className:`text-xs text-text-tertiary ${s}`,children:OE(i,t)})})}function kE({ms:i,className:t=""}){const s=AE(i),a=A.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 ${t}`,children:"--"}):h.jsx(Hy,{options:a,children:h.jsx("span",{className:`text-xs text-text-tertiary ${t}`,children:s})})}const CE=["sm","md","lg","full"],yg={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"},bg={sm:"Small",md:"Medium",lg:"Large",full:"Fullscreen"};function ME({which:i}){const t="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:t,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:t,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:t,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:t,strokeWidth:"1.5"})})}}function RE({msg:i}){const[t,s]=A.useState(0);A.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(t/60),o=t%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-2xs text-accent/70 hover:text-accent transition-colors",children:[h.jsx(nh,{className:"w-2.5 h-2.5",strokeWidth:1.5}),"watch execution"]})]})}function DE({msg:i,compileMessage:t}){const s=i.role==="assistant";return h.jsxs("div",{className:`flex items-center gap-1.5 ${s?"justify-start":"justify-end"}`,children:[h.jsx(TE,{date:i.timestamp,format:"time",className:"!text-2xs text-text-muted/50"}),i.durationMs!=null&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-text-muted/30 text-2xs",children:"·"}),h.jsx(kE,{ms:i.durationMs,className:"!text-2xs 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(nh,{className:"w-2.5 h-2.5",strokeWidth:1.5})}),s&&i.workflowId&&!i.pending&&h.jsx("button",{onClick:()=>t(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(Nv,{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 qE(){const{helpOpen:i,setHelpOpen:t,messages:s,sendMessage:a,pageContext:o,activeWorkflowId:f,clearMessages:d,compileMessage:m}=Ry(),[g,y]=A.useState(""),[E,_]=A.useState("md"),[O,R]=A.useState(!0),M=A.useRef(null),z=A.useRef(null);if(A.useEffect(()=>{M.current&&(M.current.scrollTop=M.current.scrollHeight)},[s]),A.useEffect(()=>{i&&z.current&&z.current.focus()},[i]),A.useEffect(()=>{if(!i)return;const T=Q=>{Q.key==="Escape"&&(E==="full"?_("lg"):E==="lg"?_("md"):E==="md"?_("sm"):t(!1))};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[i,E,t]),!i)return null;const F=()=>{const T=g.trim();!T||f||(a(T),y(""),z.current&&(z.current.style.height="auto"))},ie=T=>{T.key==="Enter"&&!T.shiftKey&&(T.preventDefault(),F())},$=E==="full",ce=o.page.replace(/-/g," "),ee=$?{}:{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 ${$?yg.full:`right-6 ${yg[E]}`} ${O?"bg-surface-raised shadow-xl":"bg-surface-raised/[0.03] shadow-lg shadow-black/5"}`,style:ee,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!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 ${O?"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-2xs text-text-tertiary truncate",children:ce})]}),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:CE.map(T=>h.jsx("button",{onClick:()=>_(T),className:`p-1 rounded transition-colors ${T===E?"bg-accent/15 text-accent":"text-text-muted hover:text-text-secondary hover:bg-surface-hover"}`,role:"radio","aria-checked":T===E,"aria-label":bg[T],title:bg[T],children:h.jsx(ME,{which:T})},T))}),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(Tv,{className:"w-3.5 h-3.5",strokeWidth:1.5})}),h.jsx("button",{onClick:()=>t(!1),className:"p-1 text-text-tertiary hover:text-text-primary transition-colors","aria-label":"Close",title:"Close",children:h.jsx(Yn,{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 ${O?"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(T=>h.jsxs("div",{className:`text-xs leading-relaxed ${T.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 ${T.role==="user"?"bg-accent/10 text-text-primary":"bg-surface-sunken text-text-secondary"}`,children:T.pending?h.jsx(RE,{msg:T}):T.role==="assistant"?h.jsx(jh,{content:T.content}):T.content}),!T.pending&&h.jsx("div",{className:"mt-0.5",children:h.jsx(DE,{msg:T,compileMessage:m})})]},T.id))]}),h.jsxs("div",{className:`border-t border-surface-border px-3 py-2.5 flex gap-2 shrink-0 transition-all duration-300 ${O?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[h.jsx("textarea",{ref:z,value:g,onChange:T=>{y(T.target.value);const Q=T.target;Q.style.height="auto",Q.style.height=`${Math.min(Q.scrollHeight,120)}px`},onKeyDown:ie,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:F,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(kv,{className:"w-4 h-4",strokeWidth:1.5})})]})]})}function zE(){var ce;const{isBuilder:i,isOps:t,viewAs:s}=py(),{canSeePaceBoard:a}=gy(),{data:o}=Mi(),f=dy(),d=f!==null?f:!!((ce=o==null?void 0:o.ai)!=null&&ce.enabled),{collapsed:m,toggle:g}=wh(),[y,E]=A.useState(!1),[_,O]=A.useState(!1),[R,M]=A.useState(!1),[z,F]=A.useState(()=>window.location.hash.startsWith("#docs")),ie=Sn(),$=A.useRef(null);return A.useEffect(()=>{const ee=$.current;ee&&(ee.classList.remove("animate-page-in"),ee.offsetWidth,ee.classList.add("animate-page-in"))},[ie.pathname]),A.useEffect(()=>{const ee=()=>{window.location.hash.startsWith("#docs")&&F(!0)};return window.addEventListener("hashchange",ee),()=>window.removeEventListener("hashchange",ee)},[]),h.jsxs("div",{className:"h-screen bg-surface flex flex-col",children:[h.jsx(dS,{onToggleEventFeed:()=>E(ee=>!ee),onToggleDocs:()=>F(ee=>!ee),onToggleNav:()=>O(ee=>!ee)}),h.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[h.jsxs("aside",{className:`${m?"w-16":"w-60"} shrink-0 bg-surface-raised border-r border-surface-border hidden lg:flex flex-col transition-[width] duration-200 ease-out overflow-hidden relative z-20`,children:[h.jsx("nav",{className:"flex-1 px-3 pt-[36px] pb-4 space-y-2 overflow-y-auto overflow-x-hidden",children:h.jsx(Oy,{aiEnabled:d,isBuilder:i,isOps:t,viewAs:s,canSeePaceBoard:a})}),h.jsx("button",{onClick:g,className:`shrink-0 py-3 text-text-tertiary hover:text-text-secondary transition-colors duration-150 ${m?"flex justify-center":"flex items-center px-7"}`,"aria-label":m?"Expand sidebar":"Collapse sidebar",children:m?h.jsx(Cv,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5}):h.jsx(Mv,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5})}),!m&&(o==null?void 0:o.environment)&&h.jsxs("div",{className:"shrink-0 px-5 pb-3 text-2xs leading-tight text-text-tertiary whitespace-nowrap overflow-hidden text-ellipsis",title:`long-tail v${o.environment.longTailVersion} · HotMesh v${o.environment.hotmeshVersion} · Node ${o.environment.nodeVersion} · ${o.environment.nodeEnv}`,children:["long-tail v",o.environment.longTailVersion,h.jsx("span",{className:"mx-1 text-surface-border",children:"·"}),"HotMesh v",o.environment.hotmeshVersion]})]}),h.jsx("main",{className:"flex-1 min-w-0 overflow-y-auto",children:h.jsx("div",{ref:$,className:"w-full px-page-x py-8 pb-16 animate-page-in h-full flex flex-col @container",children:h.jsx(Sr,{})})}),h.jsx(UE,{})]}),h.jsx(qS,{open:_,onClose:()=>O(!1),aiEnabled:d,isBuilder:i,isOps:t,viewAs:s,canSeePaceBoard:a}),h.jsx(e2,{open:y,onToggle:()=>E(ee=>!ee),configOpen:R,onToggleConfig:()=>M(ee=>!ee)}),h.jsx(u2,{open:z,onClose:()=>{F(!1),history.replaceState(null,"",window.location.pathname+window.location.search)}}),d&&h.jsx(p2,{}),d&&h.jsx(qE,{})]})}function UE(){const{node:i,width:t,open:s}=nS();return h.jsx(sS,{open:s,width:t,className:"border-l border-surface-border bg-surface-raised",children:i})}function BE(){const{isAuthenticated:i}=Vn(),t=Sn();return i?h.jsx(Ww,{children:h.jsx(tS,{children:h.jsx(m2,{children:h.jsx(zE,{})})})}):h.jsx(Ln,{to:"/login",state:{from:t.pathname},replace:!0})}function $y({provider:i,className:t="w-5 h-5"}){switch(i){case"google":return h.jsxs("svg",{className:t,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:t,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:t,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:t,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:t,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 LE(){return we("/auth/oauth/providers")}async function PE(i,t){const s=t?`?label=${encodeURIComponent(t)}`:"";return we(`/auth/oauth/connections/${i}${s}`,{method:"DELETE"})}function OA(){return ht({queryKey:["oauth-connections"],queryFn:()=>we("/auth/oauth/connections")})}function NA(){const i=bt();return Et({mutationFn:({provider:t,label:s})=>PE(t,s),onSuccess:()=>{i.invalidateQueries({queryKey:["oauth-connections"]})}})}function HE(){var le;const{login:i,isAuthenticated:t}=Vn(),s=th(),a=Sn(),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=A.useRef(!1);f&&!g.current&&(g.current=!0,i(f,void 0,{displayName:o.get("displayName"),username:o.get("username")}));const[y,E]=A.useState(""),[_,O]=A.useState(""),[R,M]=A.useState(d||""),[z,F]=A.useState(!1),[ie,$]=A.useState(!!f),[ce,ee]=A.useState([]),T=A.useRef(!1);if(A.useEffect(()=>{f||T.current||(T.current=!0,(async()=>{var I,V,W,oe;try{const re=await fetch(`${Tt}/api/settings`);if(!re.ok)return;const Oe=await re.json();if(!((I=Oe.auth)!=null&&I.sso))return;const ke=await fetch(`${Tt}/api/auth/sso`,{method:"POST"});if(!ke.ok){M("Host authentication required — please log in to your organization first");return}const Se=await ke.json();Se.token&&((V=Oe.auth)!=null&&V.ssoLogoutUrl&&sessionStorage.setItem("lt_sso_logout_url",Oe.auth.ssoLogoutUrl),$(!0),i(Se.token,void 0,{displayName:(W=Se.user)==null?void 0:W.display_name,username:(oe=Se.user)==null?void 0:oe.external_id}))}catch{}})())},[]),A.useEffect(()=>{f||LE().then(ee).catch(()=>{})},[]),A.useEffect(()=>{if(!ie)return;const I=setTimeout(()=>s(m,{replace:!0}),1500);return()=>clearTimeout(I)},[ie]),t&&!ie)return h.jsx(Ln,{to:m,replace:!0});const Q=async I=>{var V,W;if(I.preventDefault(),M(""),!y.trim()||!_){M("Username and password are required");return}F(!0);try{const oe=await fetch(`${Tt}/api/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:y.trim(),password:_})}),re=await oe.json();if(!oe.ok){M(re.error||"Login failed");return}$(!0),i(re.token,{username:y.trim(),password:_},{displayName:(V=re.user)==null?void 0:V.display_name,username:(W=re.user)==null?void 0:W.external_id})}catch{M("Unable to connect to server")}finally{F(!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 ${ie?"translate-x-[120vw] -translate-y-[60vh] scale-[3] opacity-0":""}`,children:h.jsx(Yo,{size:"lg",hideLabel:ie})}),h.jsxs("form",{onSubmit:Q,className:`space-y-5 transition-opacity duration-300 ${ie?"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:I=>E(I.target.value),className:"input",placeholder:"Enter your username",autoFocus:!ie,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:_,onChange:I=>O(I.target.value),className:"input",placeholder:"Enter your password",autoComplete:"current-password"})]}),R&&h.jsx("p",{className:"text-sm text-status-error",children:R}),h.jsx("button",{type:"submit",className:"btn-primary w-full",disabled:z||ie,children:z?"Signing in...":"Sign In"}),ce.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:ce.filter(I=>I.provider!=="anthropic").map(I=>h.jsxs("a",{href:`${Tt}/api/auth/oauth/${I.provider}?returnTo=${encodeURIComponent(m)}`,className:"btn-secondary w-full flex items-center justify-center gap-2",children:[h.jsx($y,{provider:I.provider}),"Sign in with ",I.name]},I.provider))})]})]})]})})}function xg(){const{isAuthenticated:i}=Vn(),t=th(),s=Sn(),a=new URLSearchParams(s.search),o=a.get("state")||"";A.useEffect(()=>{i||t(`/login?returnTo=${encodeURIComponent(s.pathname+s.search)}`)},[i]);const[f,d]=A.useState(""),[m,g]=A.useState(a.get("label")||"default"),[y,E]=A.useState(""),[_,O]=A.useState(!1),R=f.trim().startsWith("sk-ant-oat"),M=f.trim().startsWith("sk-ant-api"),z=F=>{F.preventDefault();const ie=f.trim();if(!ie){E("A token or API key is required");return}if(!ie.startsWith("sk-ant-")){E('Invalid format. Must start with "sk-ant-oat" (OAuth token) or "sk-ant-api" (API key)');return}O(!0),E("");const $=`${Tt}/api/auth/oauth/anthropic/callback?code=${encodeURIComponent(ie)}&state=${encodeURIComponent(o)}`;window.location.href=$};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(Yo,{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:"heading-3",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:z,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:F=>d(F.target.value),className:"input",placeholder:"sk-ant-oat01-... or sk-ant-api03-...",autoFocus:!0,autoComplete:"off"}),R&&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:F=>g(F.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:_,children:_?"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-2xs",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 qa({roleTypes:i,roleNames:t,redirectTo:s="/"}){const{isSuperAdmin:a,hasRole:o,hasRoleType:f}=Vn();return a?h.jsx(Sr,{}):i&&i.some(d=>f(d))?h.jsx(Sr,{}):t&&t.some(d=>o(d))?h.jsx(Sr,{}):h.jsx(Ln,{to:s,replace:!0})}function $E({redirectTo:i="/"}){var a;const{data:t,isLoading:s}=Mi();return s||!t?null:(a=t.ai)!=null&&a.enabled?h.jsx(Sr,{}):h.jsx(Ln,{to:i,replace:!0})}function YE({flag:i,redirectTo:t="/"}){var o;const{data:s,isLoading:a}=Mi();return a||!s?null:((o=s.features)==null?void 0:o[i])===!1?h.jsx(Ln,{to:t,replace:!0}):h.jsx(Sr,{})}const GE=A.lazy(()=>_e(()=>import("./ProcessesListPage-GQMOo5Wo.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}))),VE=A.lazy(()=>_e(()=>import("./ProcessDetailPage-CxJ5BSDk.js"),__vite__mapDeps([18,1,2,4,19,14,20,17,11,6,21,22,23]),import.meta.url).then(i=>({default:i.ProcessDetailPage}))),IE=A.lazy(()=>_e(()=>import("./McpOverview-DMaRUXnA.js"),__vite__mapDeps([24,1,25,26,27,28,15,14,29,6]),import.meta.url).then(i=>({default:i.McpOverview}))),FE=A.lazy(()=>_e(()=>import("./McpRunsPage-_UaoIwzX.js"),__vite__mapDeps([30,1,26,27,5,6,31,28,8,9,10,17,14,32,15,13,12,16,33]),import.meta.url).then(i=>({default:i.McpRunsPage}))),JE=A.lazy(()=>_e(()=>import("./McpRunDetailPage-CJ9hDTNs.js"),__vite__mapDeps([34,1,26,20,15,14,35,6,36,37,13,38,39,16]),import.meta.url).then(i=>({default:i.McpRunDetailPage}))),QE=A.lazy(()=>_e(()=>import("./McpQueryPage-CNGNB59o.js"),__vite__mapDeps([40,1,15,14,9,10,13,12,16,8,11,32,17,33,5,6,4,41]),import.meta.url).then(i=>({default:i.McpQueryPage}))),KE=A.lazy(()=>_e(()=>import("./McpQueryDetailPage-D6YSD94n.js"),__vite__mapDeps([42,1,15,14,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}))),XE=A.lazy(()=>_e(()=>import("./EscalationsOverview-DFM-f7do.js"),__vite__mapDeps([51,1,4,15,14,29,6]),import.meta.url).then(i=>({default:i.EscalationsOverview}))),ZE=A.lazy(()=>_e(()=>import("./AvailableEscalationsPage-rKbrcY8Y.js"),__vite__mapDeps([52,1,53,4,14,54,55,6,20,12,56,57,58,5,7,8,9,10,23,59,13,60,21,17,33,16]),import.meta.url).then(i=>({default:i.AvailableEscalationsPage}))),WE=A.lazy(()=>_e(()=>import("./OperatorDashboard-DMPJmgP_.js"),__vite__mapDeps([61,1,4,5,6,7,8,9,10,15,14,12,33,59,13,60,21,17,56,16]),import.meta.url).then(i=>({default:i.OperatorDashboard}))),ej=A.lazy(()=>_e(()=>import("./index-Dh5Y3hq7.js"),__vite__mapDeps([62,1,54,55,6,20,12,56,14,57,15,16,3,4,21,35,22,23]),import.meta.url).then(i=>({default:i.EscalationDetailPage}))),tj=A.lazy(()=>_e(()=>import("./WorkflowsOverview-Bp2pxXJO.js"),__vite__mapDeps([63,1,3,4,15,14,29,6]),import.meta.url).then(i=>({default:i.WorkflowsOverview}))),nj=A.lazy(()=>_e(()=>import("./index-DcDEJ6b_.js"),__vite__mapDeps([64,1,3,15,14,13,17,65,47,48,6]),import.meta.url).then(i=>({default:i.StartWorkflowPage}))),sj=A.lazy(()=>_e(()=>import("./index-DcDEJ6b_.js"),__vite__mapDeps([64,1,3,15,14,13,17,65,47,48,6]),import.meta.url).then(i=>({default:i.DurableInvokePage}))),ij=A.lazy(()=>_e(()=>import("./WorkflowsDashboard-DpVAH35I.js"),__vite__mapDeps([66,1,32,3,31,28,6,4,5,8,9,10,17,14,15,13,12,16,33]),import.meta.url).then(i=>({default:()=>i.WorkflowsDashboard({tier:"durable"})}))),rj=A.lazy(()=>_e(()=>import("./WorkflowsDashboard-DpVAH35I.js"),__vite__mapDeps([66,1,32,3,31,28,6,4,5,8,9,10,17,14,15,13,12,16,33]),import.meta.url).then(i=>({default:()=>i.WorkflowsDashboard({tier:"all"})}))),aj=A.lazy(()=>_e(()=>import("./YamlWorkflowsPage-Dtt3x3_T.js"),__vite__mapDeps([67,1,27,5,6,15,14,13,10,49,65,20]),import.meta.url).then(i=>({default:i.YamlWorkflowsPage}))),lj=A.lazy(()=>_e(()=>import("./GraphInvokePage-B_P3pJeA.js"),__vite__mapDeps([68,1,27,15,14,44,46,47,48,45,6,49,65]),import.meta.url).then(i=>({default:i.GraphInvokePage}))),oj=A.lazy(()=>_e(()=>import("./YamlWorkflowDetailPage-CL_kD0mX.js"),__vite__mapDeps([69,1,27,20,65,14,6]),import.meta.url).then(i=>({default:i.YamlWorkflowDetailPage}))),cj=A.lazy(()=>_e(()=>import("./TasksListPage-BIE7nrdE.js"),__vite__mapDeps([70,1,2,3,5,6,9,10,20,60,50,12,13,14,15,17]),import.meta.url).then(i=>({default:i.TasksListPage}))),uj=A.lazy(()=>_e(()=>import("./TaskDetailPage-ngdXRgQp.js"),__vite__mapDeps([71,1,2,20,60,15,14,6]),import.meta.url).then(i=>({default:i.TaskDetailPage}))),vg=A.lazy(()=>_e(()=>import("./WorkflowExecutionPage-Bce8g08l.js"),__vite__mapDeps([72,1,3,4,37,13,14,38,20,6,39,2,15,36,16,35]),import.meta.url).then(i=>({default:i.WorkflowExecutionPage}))),fj=A.lazy(()=>_e(()=>import("./AdminDashboard-CYlm0_J0.js"),__vite__mapDeps([73,1,2,4,25,19,14,6]),import.meta.url).then(i=>({default:i.AdminDashboard}))),hj=A.lazy(()=>_e(()=>import("./index-BCIJE--_.js"),__vite__mapDeps([74,1,3,9,10,13,14,33,5,6,15,75,17]),import.meta.url).then(i=>({default:i.WorkersPage}))),dj=A.lazy(()=>_e(()=>import("./index-DrPWIFSv.js"),__vite__mapDeps([76,1,3,13,14,77,55,6,21,17,15,47,48,65]),import.meta.url).then(i=>({default:i.WorkflowConfigsPage}))),_g=A.lazy(()=>_e(()=>import("./index-DrPWIFSv.js"),__vite__mapDeps([76,1,3,13,14,77,55,6,21,17,15,47,48,65]),import.meta.url).then(i=>({default:i.WorkflowConfigDetailPage}))),mj=A.lazy(()=>_e(()=>import("./index-CMv6YMJY.js"),__vite__mapDeps([78,1,25,10,77,55,6,15,14,13,12,5,79,46,47,48,49,45,33,20]),import.meta.url).then(i=>({default:i.McpServersPage}))),wg=A.lazy(()=>_e(()=>import("./index-BqeQGQ4K.js"),__vite__mapDeps([80,1,25,15,14,43,6]),import.meta.url).then(i=>({default:i.McpServerDetailPage}))),pj=A.lazy(()=>_e(()=>import("./index-B0ktIiOY.js"),__vite__mapDeps([81,1,23,5,6,9,10,12,13,14,77,55,33,15,21,48,50]),import.meta.url).then(i=>({default:i.UsersPage}))),gj=A.lazy(()=>_e(()=>import("./RolesPage-BIg3_Em6.js"),__vite__mapDeps([82,1,15,14,21,58,55,6]),import.meta.url).then(i=>({default:i.RolesPage}))),yj=A.lazy(()=>_e(()=>import("./RoleDetailPage-Bh5qdI0w.js"),__vite__mapDeps([83,1,77,55,6,23,14]),import.meta.url).then(i=>({default:i.RoleDetailPage}))),bj=A.lazy(()=>_e(()=>import("./EscalationSchemaPage-CnlwGAIE.js"),__vite__mapDeps([84,1,14,6]),import.meta.url).then(i=>({default:i.EscalationSchemaPage}))),xj=A.lazy(()=>_e(()=>import("./EscalationListSchemaPage-CkEJnFKd.js"),__vite__mapDeps([85,1,14,6]),import.meta.url).then(i=>({default:i.EscalationListSchemaPage}))),vj=A.lazy(()=>_e(()=>import("./index-DYCCUmSM.js"),__vite__mapDeps([86,1,15,14,55,6,57]),import.meta.url).then(i=>({default:i.MaintenancePage}))),_j=A.lazy(()=>_e(()=>import("./OperationsPage-CTfwuWXR.js").then(i=>i.O),__vite__mapDeps([87,1,4,15,14,58,6]),import.meta.url).then(i=>({default:i.OperationsPage}))),wj=A.lazy(()=>_e(()=>import("./index-Cp1jJHm1.js"),__vite__mapDeps([88,1,19,14,13,5,6,31,28,55,36,75,9,10,33]),import.meta.url).then(i=>({default:i.ControlPlanePage}))),Sj=A.lazy(()=>_e(()=>import("./index-DWDEa8jS.js"),__vite__mapDeps([89,1,39,14,5,6,31,28,8,9,10,12,13,15,16]),import.meta.url).then(i=>({default:i.StreamMessagesPage}))),Ej=A.lazy(()=>_e(()=>import("./CredentialsPage-D_2T6vSb.js"),__vite__mapDeps([90,1,15,14,50,77,55,6]),import.meta.url).then(i=>({default:i.CredentialsPage}))),jj=A.lazy(()=>_e(()=>import("./index-0SzWFShg.js"),__vite__mapDeps([91,1,6,15,14,13,16,8,10,92,50]),import.meta.url).then(i=>({default:i.FilesPage}))),Aj=A.lazy(()=>_e(()=>import("./index-ChHD9p_I.js"),__vite__mapDeps([93,1,15,14,13,16,12,10,92,50,94,43,6]),import.meta.url).then(i=>({default:i.KnowledgePage}))),Oj=A.lazy(()=>_e(()=>import("./HomePage-lu88PzQH.js"),__vite__mapDeps([95,1,3,26,28,4,21,14,17,16,87,15,58,6,53]),import.meta.url).then(i=>({default:i.HomePage}))),Nj=A.lazy(()=>_e(()=>import("./AgentsPage-AqGtEOL1.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}))),Tj=A.lazy(()=>_e(()=>import("./AgentDetailPage-D9JdkWV8.js"),__vite__mapDeps([98,1,97,99,14,4,17,6]),import.meta.url).then(i=>({default:i.AgentDetailPage}))),Sg=A.lazy(()=>_e(()=>import("./AgentConfigPage-BttOMcj_.js"),__vite__mapDeps([100,1,97,99,14,15,94,46,47,48,3,27,101,102,17,6]),import.meta.url).then(i=>({default:i.AgentConfigPage}))),kj=A.lazy(()=>_e(()=>import("./CapabilitiesPage-DzLP5-ad.js"),__vite__mapDeps([103,1,101,79,25,46,47,48,14,49,6,45,15,13]),import.meta.url).then(i=>({default:i.CapabilitiesPage}))),Cj=A.lazy(()=>_e(()=>import("./TopicsPage-BwiEX0pU.js"),__vite__mapDeps([104,1,102,15,14,13,6]),import.meta.url).then(i=>({default:i.TopicsPage}))),Mj=A.lazy(()=>_e(()=>import("./TopicDetailPage-vPtXb7gD.js"),__vite__mapDeps([105,1,102,16,14,6]),import.meta.url).then(i=>({default:i.TopicDetailPage})));function Rj(){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 ve({children:i}){return h.jsx(A.Suspense,{fallback:h.jsx(Rj,{}),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,t)=>t instanceof Error&&t.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__||"",t=`${i}/login`;if(window.location.pathname!==t){const s=window.location.pathname+window.location.search,a=i&&s.startsWith(i)?s.slice(i.length)||"/":s;window.location.href=`${t}?returnTo=${encodeURIComponent(a)}`}});const Dj=sv([{path:"/login",element:h.jsx(HE,{})},{path:"/connect/anthropic",element:h.jsx(xg,{})},{path:"/connect/:provider",element:h.jsx(xg,{})},{path:"/",element:h.jsx(BE,{}),children:[{index:!0,element:h.jsx(ve,{children:h.jsx(Oj,{})})},{path:"processes/all",element:h.jsx(ve,{children:h.jsx(GE,{})})},{path:"processes/detail/:originId",element:h.jsx(ve,{children:h.jsx(VE,{})})},{path:"credentials",element:h.jsx(ve,{children:h.jsx(Ej,{})})},{path:"connections",element:h.jsx(Ln,{to:"/credentials",replace:!0})},{path:"escalations",element:h.jsx(ve,{children:h.jsx(XE,{})})},{path:"escalations/available",element:h.jsx(ve,{children:h.jsx(ZE,{})})},{path:"escalations/queue",element:h.jsx(ve,{children:h.jsx(WE,{})})},{path:"escalations/detail/:id",element:h.jsx(ve,{children:h.jsx(ej,{})})},{path:"capabilities",element:h.jsx(ve,{children:h.jsx(kj,{})})},{path:"agents",element:h.jsx(ve,{children:h.jsx(Nj,{})})},{path:"agents/new",element:h.jsx(ve,{children:h.jsx(Sg,{})})},{path:"agents/:id",element:h.jsx(ve,{children:h.jsx(Tj,{})})},{path:"agents/:id/edit",element:h.jsx(ve,{children:h.jsx(Sg,{})})},{path:"topics",element:h.jsx(ve,{children:h.jsx(Cj,{})})},{path:"topics/:topic",element:h.jsx(ve,{children:h.jsx(Mj,{})})},{element:h.jsx(qa,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"workflows",element:h.jsx(ve,{children:h.jsx(tj,{})})},{path:"workflows/executions",element:h.jsx(ve,{children:h.jsx(rj,{})})},{path:"workflows/durable/executions",element:h.jsx(ve,{children:h.jsx(ij,{})})},{path:"workflows/durable/executions/:workflowId",element:h.jsx(ve,{children:h.jsx(vg,{})})},{path:"workflows/tasks",element:h.jsx(ve,{children:h.jsx(cj,{})})},{path:"workflows/tasks/detail/:id",element:h.jsx(ve,{children:h.jsx(uj,{})})},{path:"workflows/executions/:workflowId",element:h.jsx(ve,{children:h.jsx(vg,{})})},{path:"workflows/start",element:h.jsx(ve,{children:h.jsx(nj,{})})},{path:"workflows/durable/invoke",element:h.jsx(ve,{children:h.jsx(sj,{})})},{path:"workflows/cron",element:h.jsx(Ln,{to:"/workflows/start?mode=schedule",replace:!0})},{path:"workflows/workers",element:h.jsx(ve,{children:h.jsx(hj,{})})},{path:"workflows/registry",element:h.jsx(ve,{children:h.jsx(dj,{})})},{path:"workflows/registry/new",element:h.jsx(ve,{children:h.jsx(_g,{})})},{path:"workflows/registry/:workflowType",element:h.jsx(ve,{children:h.jsx(_g,{})})}]},{element:h.jsx(qa,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"mcp/workflows",element:h.jsx(ve,{children:h.jsx(aj,{})})},{path:"mcp/workflows/invoke",element:h.jsx(ve,{children:h.jsx(lj,{})})},{path:"mcp/workflows/:id",element:h.jsx(ve,{children:h.jsx(oj,{})})},{path:"mcp/executions",element:h.jsx(ve,{children:h.jsx(FE,{})})},{path:"mcp/executions/:jobId",element:h.jsx(ve,{children:h.jsx(JE,{})})},{path:"files",element:h.jsx(ve,{children:h.jsx(jj,{})})},{path:"knowledge",element:h.jsx(ve,{children:h.jsx(Aj,{})})},{element:h.jsx($E,{}),children:[{path:"mcp",element:h.jsx(ve,{children:h.jsx(IE,{})})},{path:"mcp/queries",element:h.jsx(ve,{children:h.jsx(QE,{})})},{path:"mcp/queries/:workflowId",element:h.jsx(ve,{children:h.jsx(KE,{})})},{path:"mcp/tools",element:h.jsx(Ln,{to:"/mcp/servers",replace:!0})},{path:"mcp/servers",element:h.jsx(ve,{children:h.jsx(mj,{})})},{path:"mcp/servers/new",element:h.jsx(ve,{children:h.jsx(wg,{})})},{path:"mcp/servers/:serverId",element:h.jsx(ve,{children:h.jsx(wg,{})})}]}]},{element:h.jsx(qa,{roleTypes:["admin","superadmin"],roleNames:["engineer"]}),children:[{path:"operations",element:h.jsx(ve,{children:h.jsx(_j,{})})}]},{element:h.jsx(qa,{roleTypes:["admin","superadmin"],roleNames:["engineer"]}),children:[{path:"admin",element:h.jsx(ve,{children:h.jsx(fj,{})})},{path:"admin/users",element:h.jsx(ve,{children:h.jsx(pj,{})})},{path:"admin/escalation-chains",element:h.jsx(Ln,{to:"/admin/roles",replace:!0})},{path:"admin/roles",element:h.jsx(ve,{children:h.jsx(gj,{})})},{path:"admin/roles/:role",element:h.jsx(ve,{children:h.jsx(yj,{})})},{path:"admin/roles/:role/schema",element:h.jsx(ve,{children:h.jsx(bj,{})})},{path:"admin/roles/:role/list-schema",element:h.jsx(ve,{children:h.jsx(xj,{})})}]},{element:h.jsx(qa,{roleTypes:["superadmin"],roleNames:["engineer"]}),children:[{path:"admin/bots",element:h.jsx(Ln,{to:"/admin/users?tab=service-accounts",replace:!0})},{element:h.jsx(YE,{flag:"dbMaintenance"}),children:[{path:"admin/maintenance",element:h.jsx(ve,{children:h.jsx(vj,{})})}]},{path:"admin/controlplane",element:h.jsx(ve,{children:h.jsx(wj,{})})},{path:"admin/streams",element:h.jsx(ve,{children:h.jsx(Sj,{})})}]}]}],{basename:window.__LT_BASE__||"/"});function qj(){return h.jsx(tv,{client:Yy,children:h.jsx($v,{children:h.jsx(Gw,{children:h.jsx(iv,{router:Dj})})})})}jy(Ey());const Oh=document.createElement("link");Oh.rel="stylesheet";Oh.href=`${Tt}/api/settings/custom.css`;document.head.appendChild(Oh);Uv.createRoot(document.getElementById("root")).render(h.jsx(A.StrictMode,{children:h.jsx(qj,{})}));export{Hy as $,iA as A,aA as B,Eh as C,kE as D,lA as E,Ty as F,xS as G,Ij as H,vy as I,XS as J,xy as K,mA as L,Ah as M,Xg as N,Xj as O,EA as P,jh as Q,sS as R,LS as S,Yj as T,$j as U,Qj as V,Wj as W,rA as X,cA as Y,Pv as Z,Py as _,AA as a,jA as a0,gA as a1,oA as a2,yA as a3,bA as a4,uA as a5,fA as a6,dA as a7,hA as a8,pA as a9,wA as aa,Hj as ab,Tt as ac,Mg as ad,Gj as ae,OA as af,NA as ag,$y as ah,gy as ai,SA as aj,TE as b,Wg as c,we as d,Jj as e,AE as f,Kj as g,Zj as h,Vj as i,dy as j,Vn as k,Fj as l,vA as m,_A as n,nS as o,wS as p,vS as q,_S as r,jS as s,py as t,Mi as u,eA as v,xA as w,tA as x,nA as y,sA as z};
|
|
63
|
+
//# sourceMappingURL=index-C6UuVkz7.js.map
|