@hotmeshio/long-tail 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/api/agent-subscriptions.js +14 -0
- package/build/api/settings.js +4 -0
- package/build/lib/db/index.d.ts +1 -7
- package/build/lib/db/schemas/008_capability_reaction.sql +12 -0
- package/build/lib/db/schemas/009_file_topic_category.sql +10 -0
- package/build/lib/events/index.d.ts +9 -0
- package/build/lib/events/index.js +18 -0
- package/build/lib/events/nats.d.ts +15 -1
- package/build/lib/events/nats.js +46 -2
- package/build/lib/events/publish.d.ts +10 -0
- package/build/lib/events/publish.js +28 -0
- package/build/modules/config.d.ts +1 -7
- package/build/services/agent/index.js +14 -0
- package/build/services/agent/subscription-sql.d.ts +3 -3
- package/build/services/agent/subscription-sql.js +7 -5
- package/build/services/agent/subscriptions.d.ts +3 -1
- package/build/services/agent/subscriptions.js +6 -0
- package/build/services/agent/trigger-registry.d.ts +2 -0
- package/build/services/agent/trigger-registry.js +55 -8
- package/build/services/topics/system-topics.js +29 -0
- package/build/services/yaml-workflow/deployer.d.ts +1 -1
- package/build/services/yaml-workflow/deployer.js +2 -2
- package/build/services/yaml-workflow/invoke.d.ts +2 -0
- package/build/services/yaml-workflow/invoke.js +5 -1
- package/build/start/adapters.js +11 -9
- package/build/start/config.js +4 -0
- package/build/start/workers.js +15 -3
- package/build/system/index.js +16 -0
- package/build/system/mcp-servers/file-storage.js +18 -0
- package/build/system/workflows/capability-invoke/activities.d.ts +12 -0
- package/build/system/workflows/capability-invoke/activities.js +14 -0
- package/build/system/workflows/capability-invoke/index.d.ts +14 -0
- package/build/system/workflows/capability-invoke/index.js +74 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/events.d.ts +13 -1
- package/build/types/startup.d.ts +7 -0
- package/dashboard/dist/assets/AdminDashboard-ntLz5Pro.js +2 -0
- package/dashboard/dist/assets/{AdminDashboard-Dr5wTIZT.js.map → AdminDashboard-ntLz5Pro.js.map} +1 -1
- package/dashboard/dist/assets/AgentConfigPage-D27vWOI6.js +16 -0
- package/dashboard/dist/assets/AgentConfigPage-D27vWOI6.js.map +1 -0
- package/dashboard/dist/assets/AgentDetailPage-Cm2KFR4O.js +4 -0
- package/dashboard/dist/assets/AgentDetailPage-Cm2KFR4O.js.map +1 -0
- package/dashboard/dist/assets/AgentsPage-_ptA-0YO.js +2 -0
- package/dashboard/dist/assets/AgentsPage-_ptA-0YO.js.map +1 -0
- package/dashboard/dist/assets/AvailableEscalationsPage-bdPqEzbx.js +2 -0
- package/dashboard/dist/assets/{AvailableEscalationsPage-UzjXcO3W.js.map → AvailableEscalationsPage-bdPqEzbx.js.map} +1 -1
- package/dashboard/dist/assets/BotPicker-CYfFMpkY.js +2 -0
- package/dashboard/dist/assets/{BotPicker-CM-_u73k.js.map → BotPicker-CYfFMpkY.js.map} +1 -1
- package/dashboard/dist/assets/CapabilitiesPage-M7-ZTFNV.js +2 -0
- package/dashboard/dist/assets/CapabilitiesPage-M7-ZTFNV.js.map +1 -0
- package/dashboard/dist/assets/CollapsibleSection-DU5KAtQ-.js +2 -0
- package/dashboard/dist/assets/{CollapsibleSection-CnPKa7df.js.map → CollapsibleSection-DU5KAtQ-.js.map} +1 -1
- package/dashboard/dist/assets/ConfirmDeleteModal-_hW5Vc05.js +2 -0
- package/dashboard/dist/assets/{ConfirmDeleteModal-dOxidrSR.js.map → ConfirmDeleteModal-_hW5Vc05.js.map} +1 -1
- package/dashboard/dist/assets/CopyableId-DiWqv41D.js +2 -0
- package/dashboard/dist/assets/CopyableId-DiWqv41D.js.map +1 -0
- package/dashboard/dist/assets/CredentialsPage-CmbwypSF.js +2 -0
- package/dashboard/dist/assets/{CredentialsPage-CImIzra4.js.map → CredentialsPage-CmbwypSF.js.map} +1 -1
- package/dashboard/dist/assets/CronLabel-nycfAefc.js +2 -0
- package/dashboard/dist/assets/CronLabel-nycfAefc.js.map +1 -0
- package/dashboard/dist/assets/CustomDurationPicker-gNZRBaHg.js +2 -0
- package/dashboard/dist/assets/{CustomDurationPicker-5JzEgS7I.js.map → CustomDurationPicker-gNZRBaHg.js.map} +1 -1
- package/dashboard/dist/assets/DataTable-DGerT2ZM.js +2 -0
- package/dashboard/dist/assets/{DataTable-D9yuBv0w.js.map → DataTable-DGerT2ZM.js.map} +1 -1
- package/dashboard/dist/assets/DropZone-vNcqMd05.js +2 -0
- package/dashboard/dist/assets/{DropZone-BEW3jBzf.js.map → DropZone-vNcqMd05.js.map} +1 -1
- package/dashboard/dist/assets/ElapsedCell-CdvQbtve.js +2 -0
- package/dashboard/dist/assets/{ElapsedCell-B79BF5Mj.js.map → ElapsedCell-CdvQbtve.js.map} +1 -1
- package/dashboard/dist/assets/EmptyState-DMldv8c5.js +2 -0
- package/dashboard/dist/assets/{EmptyState-BcsfPq9T.js.map → EmptyState-DMldv8c5.js.map} +1 -1
- package/dashboard/dist/assets/EscalationsOverview-BNENCL_2.js +2 -0
- package/dashboard/dist/assets/{EscalationsOverview-QvWvbpx3.js.map → EscalationsOverview-BNENCL_2.js.map} +1 -1
- package/dashboard/dist/assets/EventTable-BqDAyXyc.js +2 -0
- package/dashboard/dist/assets/{EventTable-DAclQwfr.js.map → EventTable-BqDAyXyc.js.map} +1 -1
- package/dashboard/dist/assets/EventTopicPill-CnHFBglc.js +2 -0
- package/dashboard/dist/assets/{EventTopicPill-By-6sXDp.js.map → EventTopicPill-CnHFBglc.js.map} +1 -1
- package/dashboard/dist/assets/FilterBar-TYiTtUgv.js +2 -0
- package/dashboard/dist/assets/{FilterBar-Ck4K4rzu.js.map → FilterBar-TYiTtUgv.js.map} +1 -1
- package/dashboard/dist/assets/HomePage-fterfLKH.js +2 -0
- package/dashboard/dist/assets/{HomePage-DVOi7rR1.js.map → HomePage-fterfLKH.js.map} +1 -1
- package/dashboard/dist/assets/ListToolbar-BO5Igi6v.js +2 -0
- package/dashboard/dist/assets/{ListToolbar-Bntl2hex.js.map → ListToolbar-BO5Igi6v.js.map} +1 -1
- package/dashboard/dist/assets/McpOverview-BQokGg0z.js +2 -0
- package/dashboard/dist/assets/{McpOverview-B-xSYPJj.js.map → McpOverview-BQokGg0z.js.map} +1 -1
- package/dashboard/dist/assets/McpQueryDetailPage-0WOp2n_j.js +5 -0
- package/dashboard/dist/assets/{McpQueryDetailPage-Cq71BzjB.js.map → McpQueryDetailPage-0WOp2n_j.js.map} +1 -1
- package/dashboard/dist/assets/McpQueryPage-DUey_h9J.js +2 -0
- package/dashboard/dist/assets/{McpQueryPage-Dfz87aZF.js.map → McpQueryPage-DUey_h9J.js.map} +1 -1
- package/dashboard/dist/assets/McpRunDetailPage-Cv4qyr91.js +2 -0
- package/dashboard/dist/assets/McpRunDetailPage-Cv4qyr91.js.map +1 -0
- package/dashboard/dist/assets/McpRunsPage-B3R6KZ61.js +2 -0
- package/dashboard/dist/assets/{McpRunsPage-MUYvUYqz.js.map → McpRunsPage-B3R6KZ61.js.map} +1 -1
- package/dashboard/dist/assets/Modal-Qe8lW7gQ.js +2 -0
- package/dashboard/dist/assets/{Modal-DEODGeqx.js.map → Modal-Qe8lW7gQ.js.map} +1 -1
- package/dashboard/dist/assets/OperatorDashboard-dldvzjcg.js +2 -0
- package/dashboard/dist/assets/{OperatorDashboard-Rih1SZrn.js.map → OperatorDashboard-dldvzjcg.js.map} +1 -1
- package/dashboard/dist/assets/PageHeader-DF4BeEm4.js +2 -0
- package/dashboard/dist/assets/{PageHeader-Bo0SpcCK.js.map → PageHeader-DF4BeEm4.js.map} +1 -1
- package/dashboard/dist/assets/PageHeaderWithStats-BQZw6BgA.js +2 -0
- package/dashboard/dist/assets/{PageHeaderWithStats-7K5BdhOj.js.map → PageHeaderWithStats-BQZw6BgA.js.map} +1 -1
- package/dashboard/dist/assets/PriorityBadge-DMyB3WLZ.js +2 -0
- package/dashboard/dist/assets/{PriorityBadge-DfQY9St9.js.map → PriorityBadge-DMyB3WLZ.js.map} +1 -1
- package/dashboard/dist/assets/ProcessDetailPage-Beo-QVL-.js +2 -0
- package/dashboard/dist/assets/{ProcessDetailPage-BMkWCjqD.js.map → ProcessDetailPage-Beo-QVL-.js.map} +1 -1
- package/dashboard/dist/assets/ProcessesListPage-C_ars8gp.js +2 -0
- package/dashboard/dist/assets/{ProcessesListPage-vZjUSc7S.js.map → ProcessesListPage-C_ars8gp.js.map} +1 -1
- package/dashboard/dist/assets/RolePill-DrBZ7JJj.js +2 -0
- package/dashboard/dist/assets/{RolePill-BDzPFQUv.js.map → RolePill-DrBZ7JJj.js.map} +1 -1
- package/dashboard/dist/assets/RolesPage-DgSXFFGL.js +2 -0
- package/dashboard/dist/assets/{RolesPage-kjeAsj3_.js.map → RolesPage-DgSXFFGL.js.map} +1 -1
- package/dashboard/dist/assets/RowActions-QcakGbVA.js +2 -0
- package/dashboard/dist/assets/{RowActions-Dg-Fsm5O.js.map → RowActions-QcakGbVA.js.map} +1 -1
- package/dashboard/dist/assets/RunAsSelector-CYMeZwrM.js +2 -0
- package/dashboard/dist/assets/{RunAsSelector-DC4SLtTq.js.map → RunAsSelector-CYMeZwrM.js.map} +1 -1
- package/dashboard/dist/assets/ServerName-D5NKD06M.js +2 -0
- package/dashboard/dist/assets/{ServerName-CEOFF7UG.js.map → ServerName-D5NKD06M.js.map} +1 -1
- package/dashboard/dist/assets/StatCard-PZQmmCHK.js +2 -0
- package/dashboard/dist/assets/{StatCard-DlgF0CJC.js.map → StatCard-PZQmmCHK.js.map} +1 -1
- package/dashboard/dist/assets/StatusBadge-ME2R6a7K.js +2 -0
- package/dashboard/dist/assets/{StatusBadge-XQlNFwmH.js.map → StatusBadge-ME2R6a7K.js.map} +1 -1
- package/dashboard/dist/assets/StepIndicator-CDDVahOz.js +2 -0
- package/dashboard/dist/assets/{StepIndicator-CuUIGxKk.js.map → StepIndicator-CDDVahOz.js.map} +1 -1
- package/dashboard/dist/assets/StickyPagination-Ddy93Q5I.js +2 -0
- package/dashboard/dist/assets/{StickyPagination-F9FZsRy9.js.map → StickyPagination-Ddy93Q5I.js.map} +1 -1
- package/dashboard/dist/assets/SwimlaneTimeline-CYYA8nd9.js +2 -0
- package/dashboard/dist/assets/SwimlaneTimeline-CYYA8nd9.js.map +1 -0
- package/dashboard/dist/assets/TagInput-B45Dm3IW.js +2 -0
- package/dashboard/dist/assets/{TagInput-VBY0xIwb.js.map → TagInput-B45Dm3IW.js.map} +1 -1
- package/dashboard/dist/assets/TaskDetailPage-CoZFkJ6d.js +2 -0
- package/dashboard/dist/assets/TaskDetailPage-CoZFkJ6d.js.map +1 -0
- package/dashboard/dist/assets/TaskQueuePill-BJRUjVDv.js +2 -0
- package/dashboard/dist/assets/{TaskQueuePill-DZykFijh.js.map → TaskQueuePill-BJRUjVDv.js.map} +1 -1
- package/dashboard/dist/assets/TasksListPage-Czu08px3.js +2 -0
- package/dashboard/dist/assets/{TasksListPage-69ZWCaCP.js.map → TasksListPage-Czu08px3.js.map} +1 -1
- package/dashboard/dist/assets/TimeAgo-CJ56IUy6.js +2 -0
- package/dashboard/dist/assets/{TimeAgo-CttiZG0k.js.map → TimeAgo-CJ56IUy6.js.map} +1 -1
- package/dashboard/dist/assets/TimestampCell-QtcYZ9Jx.js +2 -0
- package/dashboard/dist/assets/{TimestampCell-CYFbEhqc.js.map → TimestampCell-QtcYZ9Jx.js.map} +1 -1
- package/dashboard/dist/assets/ToolPill-DpDv3FwI.js +2 -0
- package/dashboard/dist/assets/{ToolPill-RP2Tvlrx.js.map → ToolPill-DpDv3FwI.js.map} +1 -1
- package/dashboard/dist/assets/ToolTestPanel-BzFOwzd_.js +2 -0
- package/dashboard/dist/assets/ToolTestPanel-BzFOwzd_.js.map +1 -0
- package/dashboard/dist/assets/TopicDetailPage-DwShZbh9.js +9 -0
- package/dashboard/dist/assets/{TopicDetailPage-Aq4-6GLl.js.map → TopicDetailPage-DwShZbh9.js.map} +1 -1
- package/dashboard/dist/assets/TopicsPage-DKXlpZl_.js +2 -0
- package/dashboard/dist/assets/{TopicsPage-BYFKjRY_.js.map → TopicsPage-DKXlpZl_.js.map} +1 -1
- package/dashboard/dist/assets/UserName-zlR1so37.js +2 -0
- package/dashboard/dist/assets/{UserName-C4_T5-rI.js.map → UserName-zlR1so37.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowExecutionPage-BMNIxeJB.js +2 -0
- package/dashboard/dist/assets/WorkflowExecutionPage-BMNIxeJB.js.map +1 -0
- package/dashboard/dist/assets/WorkflowPill-B5B3yGlh.js +2 -0
- package/dashboard/dist/assets/WorkflowPill-B5B3yGlh.js.map +1 -0
- package/dashboard/dist/assets/WorkflowsDashboard-BlAPZbQZ.js +2 -0
- package/dashboard/dist/assets/{WorkflowsDashboard-_LMWc-OC.js.map → WorkflowsDashboard-BlAPZbQZ.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowsOverview-NnPi6rwS.js +2 -0
- package/dashboard/dist/assets/{WorkflowsOverview-DFrfw554.js.map → WorkflowsOverview-NnPi6rwS.js.map} +1 -1
- package/dashboard/dist/assets/YamlWorkflowsPage-C4mZum6x.js +2 -0
- package/dashboard/dist/assets/{YamlWorkflowsPage-CZzGwfol.js.map → YamlWorkflowsPage-C4mZum6x.js.map} +1 -1
- package/dashboard/dist/assets/{agents-CsKILVSU.js → agents-B5wvILeV.js} +2 -2
- package/dashboard/dist/assets/{agents-CsKILVSU.js.map → agents-B5wvILeV.js.map} +1 -1
- package/dashboard/dist/assets/{bots-BzEs6Q9L.js → bots-BPlouRDm.js} +2 -2
- package/dashboard/dist/assets/{bots-BzEs6Q9L.js.map → bots-BPlouRDm.js.map} +1 -1
- package/dashboard/dist/assets/capabilities-DkvRG09b.js +2 -0
- package/dashboard/dist/assets/capabilities-DkvRG09b.js.map +1 -0
- package/dashboard/dist/assets/{controlplane-COYEIIAz.js → controlplane-0m_rA-UW.js} +2 -2
- package/dashboard/dist/assets/{controlplane-COYEIIAz.js.map → controlplane-0m_rA-UW.js.map} +1 -1
- package/dashboard/dist/assets/escalation-CfIAIUg2.js +2 -0
- package/dashboard/dist/assets/{escalation-BZjS2202.js.map → escalation-CfIAIUg2.js.map} +1 -1
- package/dashboard/dist/assets/escalation-columns-CLIdxlbe.js +2 -0
- package/dashboard/dist/assets/{escalation-columns-DtRVmPSB.js.map → escalation-columns-CLIdxlbe.js.map} +1 -1
- package/dashboard/dist/assets/helpers-prGqC38M.js +2 -0
- package/dashboard/dist/assets/{helpers-BngVEys5.js.map → helpers-prGqC38M.js.map} +1 -1
- package/dashboard/dist/assets/index-4T7Z_gQ4.js +281 -0
- package/dashboard/dist/assets/index-4T7Z_gQ4.js.map +1 -0
- package/dashboard/dist/assets/index-BPxglOYm.css +1 -0
- package/dashboard/dist/assets/index-BR3SwTNI.js +2 -0
- package/dashboard/dist/assets/{index-COgyD_H2.js.map → index-BR3SwTNI.js.map} +1 -1
- package/dashboard/dist/assets/index-BWKIigEk.js +2 -0
- package/dashboard/dist/assets/{index-Byp8BDPs.js.map → index-BWKIigEk.js.map} +1 -1
- package/dashboard/dist/assets/index-BgVuyWhi.js +15 -0
- package/dashboard/dist/assets/{index-DykjJxzr.js.map → index-BgVuyWhi.js.map} +1 -1
- package/dashboard/dist/assets/index-C0sDEKdo.js +2 -0
- package/dashboard/dist/assets/{index-DxMNiFPS.js.map → index-C0sDEKdo.js.map} +1 -1
- package/dashboard/dist/assets/index-C2MJzu6J.js +2 -0
- package/dashboard/dist/assets/{index-ByxH4qQ-.js.map → index-C2MJzu6J.js.map} +1 -1
- package/dashboard/dist/assets/index-CFoddJDr.js +6 -0
- package/dashboard/dist/assets/{index-BCsShN2l.js.map → index-CFoddJDr.js.map} +1 -1
- package/dashboard/dist/assets/index-CrMxD5Ib.js +6 -0
- package/dashboard/dist/assets/index-CrMxD5Ib.js.map +1 -0
- package/dashboard/dist/assets/index-CuY5hPYB.js +2 -0
- package/dashboard/dist/assets/{index-Bq5MSkCL.js.map → index-CuY5hPYB.js.map} +1 -1
- package/dashboard/dist/assets/index-CwkJBn87.js +2 -0
- package/dashboard/dist/assets/{index-R61-yG56.js.map → index-CwkJBn87.js.map} +1 -1
- package/dashboard/dist/assets/index-DeL84Cag.js +2 -0
- package/dashboard/dist/assets/{index-xgl431mG.js.map → index-DeL84Cag.js.map} +1 -1
- package/dashboard/dist/assets/index-DqeLbz6j.js +2 -0
- package/dashboard/dist/assets/{index-ABsZZf_U.js.map → index-DqeLbz6j.js.map} +1 -1
- package/dashboard/dist/assets/index-P9huxx3-.js +2 -0
- package/dashboard/dist/assets/{index-BwivT39P.js.map → index-P9huxx3-.js.map} +1 -1
- package/dashboard/dist/assets/{knowledge-DhCbDgy4.js → knowledge-CUZxyRCO.js} +2 -2
- package/dashboard/dist/assets/{knowledge-DhCbDgy4.js.map → knowledge-CUZxyRCO.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-xh7T0I-f.js → mcp-B5VQPoF3.js} +2 -2
- package/dashboard/dist/assets/{mcp-xh7T0I-f.js.map → mcp-B5VQPoF3.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-query-il3CfU3U.js → mcp-query-Ba5Zj3yg.js} +2 -2
- package/dashboard/dist/assets/{mcp-query-il3CfU3U.js.map → mcp-query-Ba5Zj3yg.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-runs-4fyRpegc.js → mcp-runs-CAiEr5Fc.js} +2 -2
- package/dashboard/dist/assets/{mcp-runs-4fyRpegc.js.map → mcp-runs-CAiEr5Fc.js.map} +1 -1
- package/dashboard/dist/assets/namespaces-sVr5scma.js +2 -0
- package/dashboard/dist/assets/{namespaces-BBTvHnRF.js.map → namespaces-sVr5scma.js.map} +1 -1
- package/dashboard/dist/assets/{roles-D7bx5FAM.js → roles-E_bA4e0f.js} +2 -2
- package/dashboard/dist/assets/{roles-D7bx5FAM.js.map → roles-E_bA4e0f.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-BgxRbhVM.js → tasks-CL6Gv8jB.js} +2 -2
- package/dashboard/dist/assets/{tasks-BgxRbhVM.js.map → tasks-CL6Gv8jB.js.map} +1 -1
- package/dashboard/dist/assets/{topics-CTtCboHe.js → topics-DbtPHERP.js} +2 -2
- package/dashboard/dist/assets/{topics-CTtCboHe.js.map → topics-DbtPHERP.js.map} +1 -1
- package/dashboard/dist/assets/{useCollapsedSections-BU5HULGs.js → useCollapsedSections-CGNA5oKV.js} +2 -2
- package/dashboard/dist/assets/{useCollapsedSections-BU5HULGs.js.map → useCollapsedSections-CGNA5oKV.js.map} +1 -1
- package/dashboard/dist/assets/useEventHooks-C6c618cj.js +2 -0
- package/dashboard/dist/assets/useEventHooks-C6c618cj.js.map +1 -0
- package/dashboard/dist/assets/{useExpandedRows-CkcEntB-.js → useExpandedRows-Cg9iq6Vy.js} +2 -2
- package/dashboard/dist/assets/{useExpandedRows-CkcEntB-.js.map → useExpandedRows-Cg9iq6Vy.js.map} +1 -1
- package/dashboard/dist/assets/{useFilterParams-DZCAaBC7.js → useFilterParams-CGRYFw_A.js} +2 -2
- package/dashboard/dist/assets/{useFilterParams-DZCAaBC7.js.map → useFilterParams-CGRYFw_A.js.map} +1 -1
- package/dashboard/dist/assets/{useYamlActivityEvents-CSMX9He5.js → useYamlActivityEvents-eK7kIUdh.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents-CSMX9He5.js.map → useYamlActivityEvents-eK7kIUdh.js.map} +1 -1
- package/dashboard/dist/assets/{users-CyF-5WLI.js → users-CCHSIAxt.js} +2 -2
- package/dashboard/dist/assets/{users-CyF-5WLI.js.map → users-CCHSIAxt.js.map} +1 -1
- package/dashboard/dist/assets/{vendor-icons-BNtvBbnj.js → vendor-icons-D8-ZINAH.js} +3 -3
- package/dashboard/dist/assets/{vendor-icons-BNtvBbnj.js.map → vendor-icons-D8-ZINAH.js.map} +1 -1
- package/dashboard/dist/assets/vendor-query-DLp59M9_.js +35 -0
- package/dashboard/dist/assets/vendor-query-DLp59M9_.js.map +1 -0
- package/dashboard/dist/assets/vendor-react-Co3Y8ikm.js +26 -0
- package/dashboard/dist/assets/vendor-react-Co3Y8ikm.js.map +1 -0
- package/dashboard/dist/assets/{workflows-Bf4_w24H.js → workflows-BNbocg_9.js} +2 -2
- package/dashboard/dist/assets/{workflows-Bf4_w24H.js.map → workflows-BNbocg_9.js.map} +1 -1
- package/dashboard/dist/assets/{yaml-workflows-Cp1N0NMK.js → yaml-workflows-Cu1FUwrc.js} +2 -2
- package/dashboard/dist/assets/{yaml-workflows-Cp1N0NMK.js.map → yaml-workflows-Cu1FUwrc.js.map} +1 -1
- package/dashboard/dist/index.html +5 -5
- package/docs/agents.md +9 -9
- package/docs/api/http/agents.md +12 -10
- package/docs/api/http/settings.md +4 -0
- package/docs/api/sdk/agents.md +4 -2
- package/docs/api/sdk/settings.md +2 -1
- package/docs/dashboard.md +1 -1
- package/package.json +2 -2
- package/dashboard/dist/assets/AdminDashboard-Dr5wTIZT.js +0 -2
- package/dashboard/dist/assets/AgentConfigPage-D52KyJY-.js +0 -13
- package/dashboard/dist/assets/AgentConfigPage-D52KyJY-.js.map +0 -1
- package/dashboard/dist/assets/AgentDetailPage-Cbo_qrYF.js +0 -4
- package/dashboard/dist/assets/AgentDetailPage-Cbo_qrYF.js.map +0 -1
- package/dashboard/dist/assets/AgentsPage-CvuF8--H.js +0 -2
- package/dashboard/dist/assets/AgentsPage-CvuF8--H.js.map +0 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-UzjXcO3W.js +0 -2
- package/dashboard/dist/assets/BotPicker-CM-_u73k.js +0 -2
- package/dashboard/dist/assets/CapabilitiesPage-D1QEHMKw.js +0 -2
- package/dashboard/dist/assets/CapabilitiesPage-D1QEHMKw.js.map +0 -1
- package/dashboard/dist/assets/CollapsibleSection-CnPKa7df.js +0 -2
- package/dashboard/dist/assets/ConfirmDeleteModal-dOxidrSR.js +0 -2
- package/dashboard/dist/assets/CopyableId-DmLF-RqZ.js +0 -2
- package/dashboard/dist/assets/CopyableId-DmLF-RqZ.js.map +0 -1
- package/dashboard/dist/assets/CredentialsPage-CImIzra4.js +0 -2
- package/dashboard/dist/assets/CronLabel-5HPAmciI.js +0 -2
- package/dashboard/dist/assets/CronLabel-5HPAmciI.js.map +0 -1
- package/dashboard/dist/assets/CustomDurationPicker-5JzEgS7I.js +0 -2
- package/dashboard/dist/assets/DataTable-D9yuBv0w.js +0 -2
- package/dashboard/dist/assets/DropZone-BEW3jBzf.js +0 -2
- package/dashboard/dist/assets/ElapsedCell-B79BF5Mj.js +0 -2
- package/dashboard/dist/assets/EmptyState-BcsfPq9T.js +0 -2
- package/dashboard/dist/assets/EscalationsOverview-QvWvbpx3.js +0 -2
- package/dashboard/dist/assets/EventTable-DAclQwfr.js +0 -2
- package/dashboard/dist/assets/EventTopicPill-By-6sXDp.js +0 -2
- package/dashboard/dist/assets/FilterBar-Ck4K4rzu.js +0 -2
- package/dashboard/dist/assets/HomePage-DVOi7rR1.js +0 -2
- package/dashboard/dist/assets/ListToolbar-Bntl2hex.js +0 -2
- package/dashboard/dist/assets/McpOverview-B-xSYPJj.js +0 -2
- package/dashboard/dist/assets/McpQueryDetailPage-Cq71BzjB.js +0 -5
- package/dashboard/dist/assets/McpQueryPage-Dfz87aZF.js +0 -2
- package/dashboard/dist/assets/McpRunDetailPage-CXXRgMmJ.js +0 -2
- package/dashboard/dist/assets/McpRunDetailPage-CXXRgMmJ.js.map +0 -1
- package/dashboard/dist/assets/McpRunsPage-MUYvUYqz.js +0 -2
- package/dashboard/dist/assets/Modal-DEODGeqx.js +0 -2
- package/dashboard/dist/assets/OperatorDashboard-Rih1SZrn.js +0 -2
- package/dashboard/dist/assets/PageHeader-Bo0SpcCK.js +0 -2
- package/dashboard/dist/assets/PageHeaderWithStats-7K5BdhOj.js +0 -2
- package/dashboard/dist/assets/PriorityBadge-DfQY9St9.js +0 -2
- package/dashboard/dist/assets/ProcessDetailPage-BMkWCjqD.js +0 -2
- package/dashboard/dist/assets/ProcessesListPage-vZjUSc7S.js +0 -2
- package/dashboard/dist/assets/RolePill-BDzPFQUv.js +0 -2
- package/dashboard/dist/assets/RolesPage-kjeAsj3_.js +0 -2
- package/dashboard/dist/assets/RowActions-Dg-Fsm5O.js +0 -2
- package/dashboard/dist/assets/RunAsSelector-DC4SLtTq.js +0 -2
- package/dashboard/dist/assets/ServerName-CEOFF7UG.js +0 -2
- package/dashboard/dist/assets/StatCard-DlgF0CJC.js +0 -2
- package/dashboard/dist/assets/StatusBadge-XQlNFwmH.js +0 -2
- package/dashboard/dist/assets/StepIndicator-CuUIGxKk.js +0 -2
- package/dashboard/dist/assets/StickyPagination-F9FZsRy9.js +0 -2
- package/dashboard/dist/assets/SwimlaneTimeline-MUUXgT3o.js +0 -2
- package/dashboard/dist/assets/SwimlaneTimeline-MUUXgT3o.js.map +0 -1
- package/dashboard/dist/assets/TagInput-VBY0xIwb.js +0 -2
- package/dashboard/dist/assets/TaskDetailPage-C0AlG_2t.js +0 -2
- package/dashboard/dist/assets/TaskDetailPage-C0AlG_2t.js.map +0 -1
- package/dashboard/dist/assets/TaskQueuePill-DZykFijh.js +0 -2
- package/dashboard/dist/assets/TasksListPage-69ZWCaCP.js +0 -2
- package/dashboard/dist/assets/TimeAgo-CttiZG0k.js +0 -2
- package/dashboard/dist/assets/TimestampCell-CYFbEhqc.js +0 -2
- package/dashboard/dist/assets/ToolPill-RP2Tvlrx.js +0 -2
- package/dashboard/dist/assets/ToolTestPanel-CY_PLZSe.js +0 -2
- package/dashboard/dist/assets/ToolTestPanel-CY_PLZSe.js.map +0 -1
- package/dashboard/dist/assets/TopicDetailPage-Aq4-6GLl.js +0 -9
- package/dashboard/dist/assets/TopicsPage-BYFKjRY_.js +0 -2
- package/dashboard/dist/assets/UserName-C4_T5-rI.js +0 -2
- package/dashboard/dist/assets/WorkflowExecutionPage-DUSTBasv.js +0 -2
- package/dashboard/dist/assets/WorkflowExecutionPage-DUSTBasv.js.map +0 -1
- package/dashboard/dist/assets/WorkflowPill-pPuGH8v9.js +0 -2
- package/dashboard/dist/assets/WorkflowPill-pPuGH8v9.js.map +0 -1
- package/dashboard/dist/assets/WorkflowsDashboard-_LMWc-OC.js +0 -2
- package/dashboard/dist/assets/WorkflowsOverview-DFrfw554.js +0 -2
- package/dashboard/dist/assets/YamlWorkflowsPage-CZzGwfol.js +0 -2
- package/dashboard/dist/assets/escalation-BZjS2202.js +0 -2
- package/dashboard/dist/assets/escalation-columns-DtRVmPSB.js +0 -2
- package/dashboard/dist/assets/helpers-BngVEys5.js +0 -2
- package/dashboard/dist/assets/index-ABsZZf_U.js +0 -2
- package/dashboard/dist/assets/index-BCsShN2l.js +0 -6
- package/dashboard/dist/assets/index-Bq5MSkCL.js +0 -2
- package/dashboard/dist/assets/index-BwivT39P.js +0 -2
- package/dashboard/dist/assets/index-Byp8BDPs.js +0 -2
- package/dashboard/dist/assets/index-ByxH4qQ-.js +0 -2
- package/dashboard/dist/assets/index-COgyD_H2.js +0 -2
- package/dashboard/dist/assets/index-DXEYynKO.css +0 -1
- package/dashboard/dist/assets/index-DcpCR9c_.js +0 -63
- package/dashboard/dist/assets/index-DcpCR9c_.js.map +0 -1
- package/dashboard/dist/assets/index-DuPY59Yu.js +0 -5
- package/dashboard/dist/assets/index-DuPY59Yu.js.map +0 -1
- package/dashboard/dist/assets/index-DxMNiFPS.js +0 -2
- package/dashboard/dist/assets/index-DykjJxzr.js +0 -15
- package/dashboard/dist/assets/index-R61-yG56.js +0 -2
- package/dashboard/dist/assets/index-xgl431mG.js +0 -2
- package/dashboard/dist/assets/namespaces-BBTvHnRF.js +0 -2
- package/dashboard/dist/assets/settings-nt6qyR1S.js +0 -2
- package/dashboard/dist/assets/settings-nt6qyR1S.js.map +0 -1
- package/dashboard/dist/assets/useEventHooks-CkJOmbF-.js +0 -2
- package/dashboard/dist/assets/useEventHooks-CkJOmbF-.js.map +0 -1
- package/dashboard/dist/assets/vendor-query-B2UbickB.js +0 -18
- package/dashboard/dist/assets/vendor-query-B2UbickB.js.map +0 -1
- package/dashboard/dist/assets/vendor-react-CX88sFS5.js +0 -22
- package/dashboard/dist/assets/vendor-react-CX88sFS5.js.map +0 -1
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProcessesListPage-C_ars8gp.js","assets/tasks-CL6Gv8jB.js","assets/vendor-query-DLp59M9_.js","assets/workflows-BNbocg_9.js","assets/useEventHooks-C6c618cj.js","assets/useFilterParams-CGRYFw_A.js","assets/vendor-react-Co3Y8ikm.js","assets/DataTable-DGerT2ZM.js","assets/EmptyState-DMldv8c5.js","assets/TimestampCell-QtcYZ9Jx.js","assets/StickyPagination-Ddy93Q5I.js","assets/FilterBar-TYiTtUgv.js","assets/PageHeader-DF4BeEm4.js","assets/vendor-icons-D8-ZINAH.js","assets/ListToolbar-BO5Igi6v.js","assets/WorkflowPill-B5B3yGlh.js","assets/ProcessDetailPage-Beo-QVL-.js","assets/PageHeaderWithStats-BQZw6BgA.js","assets/StatusBadge-ME2R6a7K.js","assets/RolePill-DrBZ7JJj.js","assets/UserName-zlR1so37.js","assets/users-CCHSIAxt.js","assets/McpOverview-BQokGg0z.js","assets/mcp-B5VQPoF3.js","assets/mcp-runs-CAiEr5Fc.js","assets/yaml-workflows-Cu1FUwrc.js","assets/namespaces-sVr5scma.js","assets/StatCard-PZQmmCHK.js","assets/McpRunsPage-B3R6KZ61.js","assets/ElapsedCell-CdvQbtve.js","assets/RowActions-QcakGbVA.js","assets/McpRunDetailPage-Cv4qyr91.js","assets/CopyableId-DiWqv41D.js","assets/CollapsibleSection-DU5KAtQ-.js","assets/useCollapsedSections-CGNA5oKV.js","assets/SwimlaneTimeline-CYYA8nd9.js","assets/EventTable-BqDAyXyc.js","assets/McpQueryPage-DUey_h9J.js","assets/mcp-query-Ba5Zj3yg.js","assets/McpQueryDetailPage-0WOp2n_j.js","assets/useYamlActivityEvents-eK7kIUdh.js","assets/TagInput-B45Dm3IW.js","assets/ToolPill-DpDv3FwI.js","assets/RunAsSelector-CYMeZwrM.js","assets/BotPicker-CYfFMpkY.js","assets/bots-BPlouRDm.js","assets/TimeAgo-CJ56IUy6.js","assets/EscalationsOverview-BNENCL_2.js","assets/AvailableEscalationsPage-bdPqEzbx.js","assets/roles-E_bA4e0f.js","assets/constants-BHkpVaqx.js","assets/CustomDurationPicker-gNZRBaHg.js","assets/Modal-Qe8lW7gQ.js","assets/escalation-columns-CLIdxlbe.js","assets/PriorityBadge-DMyB3WLZ.js","assets/escalation-CfIAIUg2.js","assets/OperatorDashboard-dldvzjcg.js","assets/index-CrMxD5Ib.js","assets/WorkflowsOverview-NnPi6rwS.js","assets/index-CFoddJDr.js","assets/helpers-prGqC38M.js","assets/WorkflowsDashboard-BlAPZbQZ.js","assets/YamlWorkflowsPage-C4mZum6x.js","assets/useExpandedRows-Cg9iq6Vy.js","assets/ServerName-D5NKD06M.js","assets/TasksListPage-Czu08px3.js","assets/TaskDetailPage-CoZFkJ6d.js","assets/WorkflowExecutionPage-BMNIxeJB.js","assets/AdminDashboard-ntLz5Pro.js","assets/index-DeL84Cag.js","assets/TaskQueuePill-BJRUjVDv.js","assets/index-BgVuyWhi.js","assets/ConfirmDeleteModal-_hW5Vc05.js","assets/StepIndicator-CDDVahOz.js","assets/index-C2MJzu6J.js","assets/ToolTestPanel-BzFOwzd_.js","assets/index-DqeLbz6j.js","assets/index-P9huxx3-.js","assets/RolesPage-DgSXFFGL.js","assets/index-BWKIigEk.js","assets/index-BR3SwTNI.js","assets/controlplane-0m_rA-UW.js","assets/index-CwkJBn87.js","assets/CredentialsPage-CmbwypSF.js","assets/index-CuY5hPYB.js","assets/DropZone-vNcqMd05.js","assets/index-C0sDEKdo.js","assets/knowledge-CUZxyRCO.js","assets/HomePage-fterfLKH.js","assets/EventTopicPill-CnHFBglc.js","assets/AgentsPage-_ptA-0YO.js","assets/agents-B5wvILeV.js","assets/AgentDetailPage-Cm2KFR4O.js","assets/CronLabel-nycfAefc.js","assets/AgentConfigPage-D27vWOI6.js","assets/capabilities-DkvRG09b.js","assets/topics-DbtPHERP.js","assets/CapabilitiesPage-M7-ZTFNV.js","assets/TopicsPage-DKXlpZl_.js","assets/TopicDetailPage-DwShZbh9.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var zT=Object.defineProperty;var BT=(i,s,a)=>s in i?zT(i,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[s]=a;var w=(i,s,a)=>BT(i,typeof s!="symbol"?s+"":s,a);import{r as ZS,a as z,g as qT,u as wa,b as Vs,c as Sa,Q as LT,d as HT}from"./vendor-query-DLp59M9_.js";import{r as PT,L as cl,u as Zi,N as ah,a as KS,b as ei,O as Zd,c as WS,d as $T,R as IT}from"./vendor-react-Co3Y8ikm.js";import{C as FT,I as YT,R as eE,B as tE,U as GT,A as JT,Z as XT,a as QT,S as s0,P as ZT,L as a0,W as KT,b as nE,c as fu,F as WT,d as eC,e as tC,T as nC,f as sC,N as aC,g as rC,D as iC,M as sE,h as aE,i as oC,j as lC,E as cC,k as uC,l as fC,m as Hw,X as Z0,G as dC,n as hC,o as mC,p as pC,q as bC}from"./vendor-icons-D8-ZINAH.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&o(p)}).observe(document,{childList:!0,subtree:!0});function a(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(u){if(u.ep)return;u.ep=!0;const d=a(u);fetch(u.href,d)}})();var r0={exports:{}},Ld={},Pw;function yC(){if(Pw)return Ld;Pw=1;/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-dev-runtime.development.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/return(function(){function i(G){if(G==null)return null;if(typeof G=="function")return G.$$typeof===le?null:G.displayName||G.name||null;if(typeof G=="string")return G;switch(G){case Q:return"Fragment";case te:return"Profiler";case ee:return"StrictMode";case ne:return"Suspense";case oe:return"SuspenseList";case H:return"Activity"}if(typeof G=="object")switch(typeof G.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),G.$$typeof){case F:return"Portal";case De:return G.displayName||"Context";case Se:return(G._context.displayName||"Context")+".Consumer";case q:var Ne=G.render;return G=G.displayName,G||(G=Ne.displayName||Ne.name||"",G=G!==""?"ForwardRef("+G+")":"ForwardRef"),G;case W:return Ne=G.displayName||null,Ne!==null?Ne:i(G.type)||"Memo";case X:Ne=G._payload,G=G._init;try{return i(G(Ne))}catch{}}return null}function s(G){return""+G}function a(G){try{s(G);var Ne=!1}catch{Ne=!0}if(Ne){Ne=console;var Ze=Ne.error,Pe=typeof Symbol=="function"&&Symbol.toStringTag&&G[Symbol.toStringTag]||G.constructor.name||"Object";return Ze.call(Ne,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Pe),s(G)}}function o(G){if(G===Q)return"<>";if(typeof G=="object"&&G!==null&&G.$$typeof===X)return"<...>";try{var Ne=i(G);return Ne?"<"+Ne+">":"<...>"}catch{return"<...>"}}function u(){var G=ie.A;return G===null?null:G.getOwner()}function d(){return Error("react-stack-top-frame")}function p(G){if(ve.call(G,"key")){var Ne=Object.getOwnPropertyDescriptor(G,"key").get;if(Ne&&Ne.isReactWarning)return!1}return G.key!==void 0}function m(G,Ne){function Ze(){ae||(ae=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",Ne))}Ze.isReactWarning=!0,Object.defineProperty(G,"key",{get:Ze,configurable:!0})}function g(){var G=i(this.type);return pe[G]||(pe[G]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),G=this.props.ref,G!==void 0?G:null}function v(G,Ne,Ze,Pe,Yt,Ea){var et=Ze.ref;return G={$$typeof:j,type:G,key:Ne,props:Ze,_owner:Pe},(et!==void 0?et:null)!==null?Object.defineProperty(G,"ref",{enumerable:!1,get:g}):Object.defineProperty(G,"ref",{enumerable:!1,value:null}),G._store={},Object.defineProperty(G._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(G,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(G,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Yt}),Object.defineProperty(G,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ea}),Object.freeze&&(Object.freeze(G.props),Object.freeze(G)),G}function _(G,Ne,Ze,Pe,Yt,Ea){var et=Ne.children;if(et!==void 0)if(Pe)if(Qe(et)){for(Pe=0;Pe<et.length;Pe++)S(et[Pe]);Object.freeze&&Object.freeze(et)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else S(et);if(ve.call(Ne,"key")){et=i(G);var Rt=Object.keys(Ne).filter(function(un){return un!=="key"});Pe=0<Rt.length?"{key: someKey, "+Rt.join(": ..., ")+": ...}":"{key: someKey}",Ce[et+Pe]||(Rt=0<Rt.length?"{"+Rt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
11
|
+
let props = %s;
|
|
12
|
+
<%s {...props} />
|
|
13
|
+
React keys must be passed directly to JSX without using spread:
|
|
14
|
+
let props = %s;
|
|
15
|
+
<%s key={someKey} {...props} />`,Pe,et,Rt,et),Ce[et+Pe]=!0)}if(et=null,Ze!==void 0&&(a(Ze),et=""+Ze),p(Ne)&&(a(Ne.key),et=""+Ne.key),"key"in Ne){Ze={};for(var ke in Ne)ke!=="key"&&(Ze[ke]=Ne[ke])}else Ze=Ne;return et&&m(Ze,typeof G=="function"?G.displayName||G.name||"Unknown":G),v(G,et,Ze,u(),Yt,Ea)}function S(G){D(G)?G._store&&(G._store.validated=1):typeof G=="object"&&G!==null&&G.$$typeof===X&&(G._payload.status==="fulfilled"?D(G._payload.value)&&G._payload.value._store&&(G._payload.value._store.validated=1):G._store&&(G._store.validated=1))}function D(G){return typeof G=="object"&&G!==null&&G.$$typeof===j}var B=ZS(),j=Symbol.for("react.transitional.element"),F=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),ee=Symbol.for("react.strict_mode"),te=Symbol.for("react.profiler"),Se=Symbol.for("react.consumer"),De=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),le=Symbol.for("react.client.reference"),ie=B.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ve=Object.prototype.hasOwnProperty,Qe=Array.isArray,nt=console.createTask?console.createTask:function(){return null};B={react_stack_bottom_frame:function(G){return G()}};var ae,pe={},xe=B.react_stack_bottom_frame.bind(B,d)(),je=nt(o(d)),Ce={};Ld.Fragment=Q,Ld.jsxDEV=function(G,Ne,Ze,Pe){var Yt=1e4>ie.recentlyCreatedOwnerStacks++;return _(G,Ne,Ze,Pe,Yt?Error("react-stack-top-frame"):xe,Yt?nt(o(G)):je)}})(),Ld}var $w;function gC(){return $w||($w=1,r0.exports=yC()),r0.exports}var b=gC(),i0={exports:{}},nu={},o0={exports:{}},l0={},Iw;function vC(){return Iw||(Iw=1,(function(i){/**
|
|
16
|
+
* @license React
|
|
17
|
+
* scheduler.development.js
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the MIT license found in the
|
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/(function(){function s(){if(q=!1,X){var ae=i.unstable_now();ie=ae;var pe=!0;try{e:{Se=!1,De&&(De=!1,oe(H),H=-1),te=!0;var xe=ee;try{t:{for(p(ae),Q=o(B);Q!==null&&!(Q.expirationTime>ae&&g());){var je=Q.callback;if(typeof je=="function"){Q.callback=null,ee=Q.priorityLevel;var Ce=je(Q.expirationTime<=ae);if(ae=i.unstable_now(),typeof Ce=="function"){Q.callback=Ce,p(ae),pe=!0;break t}Q===o(B)&&u(B),p(ae)}else u(B);Q=o(B)}if(Q!==null)pe=!0;else{var G=o(j);G!==null&&v(m,G.startTime-ae),pe=!1}}break e}finally{Q=null,ee=xe,te=!1}pe=void 0}}finally{pe?ve():X=!1}}}function a(ae,pe){var xe=ae.length;ae.push(pe);e:for(;0<xe;){var je=xe-1>>>1,Ce=ae[je];if(0<d(Ce,pe))ae[je]=pe,ae[xe]=Ce,xe=je;else break e}}function o(ae){return ae.length===0?null:ae[0]}function u(ae){if(ae.length===0)return null;var pe=ae[0],xe=ae.pop();if(xe!==pe){ae[0]=xe;e:for(var je=0,Ce=ae.length,G=Ce>>>1;je<G;){var Ne=2*(je+1)-1,Ze=ae[Ne],Pe=Ne+1,Yt=ae[Pe];if(0>d(Ze,xe))Pe<Ce&&0>d(Yt,Ze)?(ae[je]=Yt,ae[Pe]=xe,je=Pe):(ae[je]=Ze,ae[Ne]=xe,je=Ne);else if(Pe<Ce&&0>d(Yt,xe))ae[je]=Yt,ae[Pe]=xe,je=Pe;else break e}}return pe}function d(ae,pe){var xe=ae.sortIndex-pe.sortIndex;return xe!==0?xe:ae.id-pe.id}function p(ae){for(var pe=o(j);pe!==null;){if(pe.callback===null)u(j);else if(pe.startTime<=ae)u(j),pe.sortIndex=pe.expirationTime,a(B,pe);else break;pe=o(j)}}function m(ae){if(De=!1,p(ae),!Se)if(o(B)!==null)Se=!0,X||(X=!0,ve());else{var pe=o(j);pe!==null&&v(m,pe.startTime-ae)}}function g(){return q?!0:!(i.unstable_now()-ie<le)}function v(ae,pe){H=ne(function(){ae(i.unstable_now())},pe)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var _=performance;i.unstable_now=function(){return _.now()}}else{var S=Date,D=S.now();i.unstable_now=function(){return S.now()-D}}var B=[],j=[],F=1,Q=null,ee=3,te=!1,Se=!1,De=!1,q=!1,ne=typeof setTimeout=="function"?setTimeout:null,oe=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null,X=!1,H=-1,le=5,ie=-1;if(typeof W=="function")var ve=function(){W(s)};else if(typeof MessageChannel<"u"){var Qe=new MessageChannel,nt=Qe.port2;Qe.port1.onmessage=s,ve=function(){nt.postMessage(null)}}else ve=function(){ne(s,0)};i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(ae){ae.callback=null},i.unstable_forceFrameRate=function(ae){0>ae||125<ae?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<ae?Math.floor(1e3/ae):5},i.unstable_getCurrentPriorityLevel=function(){return ee},i.unstable_next=function(ae){switch(ee){case 1:case 2:case 3:var pe=3;break;default:pe=ee}var xe=ee;ee=pe;try{return ae()}finally{ee=xe}},i.unstable_requestPaint=function(){q=!0},i.unstable_runWithPriority=function(ae,pe){switch(ae){case 1:case 2:case 3:case 4:case 5:break;default:ae=3}var xe=ee;ee=ae;try{return pe()}finally{ee=xe}},i.unstable_scheduleCallback=function(ae,pe,xe){var je=i.unstable_now();switch(typeof xe=="object"&&xe!==null?(xe=xe.delay,xe=typeof xe=="number"&&0<xe?je+xe:je):xe=je,ae){case 1:var Ce=-1;break;case 2:Ce=250;break;case 5:Ce=1073741823;break;case 4:Ce=1e4;break;default:Ce=5e3}return Ce=xe+Ce,ae={id:F++,callback:pe,priorityLevel:ae,startTime:xe,expirationTime:Ce,sortIndex:-1},xe>je?(ae.sortIndex=xe,a(j,ae),o(B)===null&&ae===o(j)&&(De?(oe(H),H=-1):De=!0,v(m,xe-je))):(ae.sortIndex=Ce,a(B,ae),Se||te||(Se=!0,X||(X=!0,ve()))),ae},i.unstable_shouldYield=g,i.unstable_wrapCallback=function(ae){var pe=ee;return function(){var xe=ee;ee=pe;try{return ae.apply(this,arguments)}finally{ee=xe}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(l0)),l0}var Fw;function xC(){return Fw||(Fw=1,o0.exports=vC()),o0.exports}var Yw;function NC(){if(Yw)return nu;Yw=1;/**
|
|
24
|
+
* @license React
|
|
25
|
+
* react-dom-client.development.js
|
|
26
|
+
*
|
|
27
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the MIT license found in the
|
|
30
|
+
* LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/return(function(){function i(e,t){for(e=e.memoizedState;e!==null&&0<t;)e=e.next,t--;return e}function s(e,t,n,r){if(n>=t.length)return r;var l=t[n],c=Gt(e)?e.slice():Ie({},e);return c[l]=s(e[l],t,n+1,r),c}function a(e,t,n){if(t.length!==n.length)console.warn("copyWithRename() expects paths of the same length");else{for(var r=0;r<n.length-1;r++)if(t[r]!==n[r]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return o(e,t,n,0)}}function o(e,t,n,r){var l=t[r],c=Gt(e)?e.slice():Ie({},e);return r+1===t.length?(c[n[r]]=c[l],Gt(c)?c.splice(l,1):delete c[l]):c[l]=o(e[l],t,n,r+1),c}function u(e,t,n){var r=t[n],l=Gt(e)?e.slice():Ie({},e);return n+1===t.length?(Gt(l)?l.splice(r,1):delete l[r],l):(l[r]=u(e[r],t,n+1),l)}function d(){return!1}function p(){return null}function m(){console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks")}function g(){console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")}function v(){}function _(){}function S(e){var t=[];return e.forEach(function(n){t.push(n)}),t.sort().join(", ")}function D(e,t,n,r){return new E_(e,t,n,r)}function B(e,t){e.context===Rr&&(wp(e.current,2,t,e,null,null),go())}function j(e,t){if(is!==null){var n=t.staleFamilies;t=t.updatedFamilies,Zl(),Gy(e.current,t,n),go()}}function F(e){is=e}function Q(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ee(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function te(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Se(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function De(e){if(ee(e)!==e)throw Error("Unable to find node on an unmounted component.")}function q(e){var t=e.alternate;if(!t){if(t=ee(e),t===null)throw Error("Unable to find node on an unmounted component.");return t!==e?null:e}for(var n=e,r=t;;){var l=n.return;if(l===null)break;var c=l.alternate;if(c===null){if(r=l.return,r!==null){n=r;continue}break}if(l.child===c.child){for(c=l.child;c;){if(c===n)return De(l),e;if(c===r)return De(l),t;c=c.sibling}throw Error("Unable to find node on an unmounted component.")}if(n.return!==r.return)n=l,r=c;else{for(var f=!1,h=l.child;h;){if(h===n){f=!0,n=l,r=c;break}if(h===r){f=!0,r=l,n=c;break}h=h.sibling}if(!f){for(h=c.child;h;){if(h===n){f=!0,n=c,r=l;break}if(h===r){f=!0,r=c,n=l;break}h=h.sibling}if(!f)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(n.alternate!==r)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(n.tag!==3)throw Error("Unable to find node on an unmounted component.");return n.stateNode.current===n?e:t}function ne(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=ne(e),t!==null)return t;e=e.sibling}return null}function oe(e){return e===null||typeof e!="object"?null:(e=ex&&e[ex]||e["@@iterator"],typeof e=="function"?e:null)}function W(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===YA?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _o:return"Fragment";case Cp:return"Profiler";case kf:return"StrictMode";case Rp:return"Suspense";case jp:return"SuspenseList";case Mp:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case Eo:return"Portal";case la:return e.displayName||"Context";case Op:return(e._context.displayName||"Context")+".Consumer";case oc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Vf:return t=e.displayName||null,t!==null?t:W(e.type)||"Memo";case $n:t=e._payload,e=e._init;try{return W(e(t))}catch{}}return null}function X(e){return typeof e.tag=="number"?H(e):typeof e.name=="string"?e.name:null}function H(e){var t=e.type;switch(e.tag){case 31:return"Activity";case 24:return"Cache";case 9:return(t._context.displayName||"Context")+".Consumer";case 10:return t.displayName||"Context";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 26:case 27:case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return W(t);case 8:return t===kf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;break;case 29:if(t=e._debugInfo,t!=null){for(var n=t.length-1;0<=n;n--)if(typeof t[n].name=="string")return t[n].name}if(e.return!==null)return H(e.return)}return null}function le(e){return{current:e}}function ie(e,t){0>Ba?console.error("Unexpected pop."):(t!==Vp[Ba]&&console.error("Unexpected Fiber popped."),e.current=kp[Ba],kp[Ba]=null,Vp[Ba]=null,Ba--)}function ve(e,t,n){Ba++,kp[Ba]=e.current,Vp[Ba]=n,e.current=t}function Qe(e){return e===null&&console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function nt(e,t){ve(_r,t,e),ve(lc,e,e),ve(Er,null,e);var n=t.nodeType;switch(n){case 9:case 11:n=n===9?"#document":"#fragment",t=(t=t.documentElement)&&(t=t.namespaceURI)?E1(t):Wa;break;default:if(n=t.tagName,t=t.namespaceURI)t=E1(t),t=_1(t,n);else switch(n){case"svg":t=rl;break;case"math":t=Md;break;default:t=Wa}}n=n.toLowerCase(),n=gy(null,n),n={context:t,ancestorInfo:n},ie(Er,e),ve(Er,n,e)}function ae(e){ie(Er,e),ie(lc,e),ie(_r,e)}function pe(){return Qe(Er.current)}function xe(e){e.memoizedState!==null&&ve(Uf,e,e);var t=Qe(Er.current),n=e.type,r=_1(t.context,n);n=gy(t.ancestorInfo,n),r={context:r,ancestorInfo:n},t!==r&&(ve(lc,e,e),ve(Er,r,e))}function je(e){lc.current===e&&(ie(Er,e),ie(lc,e)),Uf.current===e&&(ie(Uf,e),Wc._currentValue=Ji)}function Ce(){}function G(){if(cc===0){tx=console.log,nx=console.info,sx=console.warn,ax=console.error,rx=console.group,ix=console.groupCollapsed,ox=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ce,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}cc++}function Ne(){if(cc--,cc===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ie({},e,{value:tx}),info:Ie({},e,{value:nx}),warn:Ie({},e,{value:sx}),error:Ie({},e,{value:ax}),group:Ie({},e,{value:rx}),groupCollapsed:Ie({},e,{value:ix}),groupEnd:Ie({},e,{value:ox})})}0>cc&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Ze(e){var t=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=t,e.startsWith(`Error: react-stack-top-frame
|
|
32
|
+
`)&&(e=e.slice(29)),t=e.indexOf(`
|
|
33
|
+
`),t!==-1&&(e=e.slice(t+1)),t=e.indexOf("react_stack_bottom_frame"),t!==-1&&(t=e.lastIndexOf(`
|
|
34
|
+
`,t)),t!==-1)e=e.slice(0,t);else return"";return e}function Pe(e){if(Up===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Up=t&&t[1]||"",lx=-1<n.stack.indexOf(`
|
|
35
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
36
|
+
`+Up+e+lx}function Yt(e,t){if(!e||zp)return"";var n=Bp.get(e);if(n!==void 0)return n;zp=!0,n=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var r=null;r=Y.H,Y.H=null,G();try{var l={DetermineComponentFrameRoot:function(){try{if(t){var O=function(){throw Error()};if(Object.defineProperty(O.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(O,[])}catch(ce){var P=ce}Reflect.construct(e,[],O)}else{try{O.call()}catch(ce){P=ce}e.call(O.prototype)}}else{try{throw Error()}catch(ce){P=ce}(O=e())&&typeof O.catch=="function"&&O.catch(function(){})}}catch(ce){if(ce&&P&&typeof ce.stack=="string")return[ce.stack,P.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),h=f[0],y=f[1];if(h&&y){var x=h.split(`
|
|
37
|
+
`),V=y.split(`
|
|
38
|
+
`);for(f=c=0;c<x.length&&!x[c].includes("DetermineComponentFrameRoot");)c++;for(;f<V.length&&!V[f].includes("DetermineComponentFrameRoot");)f++;if(c===x.length||f===V.length)for(c=x.length-1,f=V.length-1;1<=c&&0<=f&&x[c]!==V[f];)f--;for(;1<=c&&0<=f;c--,f--)if(x[c]!==V[f]){if(c!==1||f!==1)do if(c--,f--,0>f||x[c]!==V[f]){var U=`
|
|
39
|
+
`+x[c].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),typeof e=="function"&&Bp.set(e,U),U}while(1<=c&&0<=f);break}}}finally{zp=!1,Y.H=r,Ne(),Error.prepareStackTrace=n}return x=(x=e?e.displayName||e.name:"")?Pe(x):"",typeof e=="function"&&Bp.set(e,x),x}function Ea(e,t){switch(e.tag){case 26:case 27:case 5:return Pe(e.type);case 16:return Pe("Lazy");case 13:return e.child!==t&&t!==null?Pe("Suspense Fallback"):Pe("Suspense");case 19:return Pe("SuspenseList");case 0:case 15:return Yt(e.type,!1);case 11:return Yt(e.type.render,!1);case 1:return Yt(e.type,!0);case 31:return Pe("Activity");default:return""}}function et(e){try{var t="",n=null;do{t+=Ea(e,n);var r=e._debugInfo;if(r)for(var l=r.length-1;0<=l;l--){var c=r[l];if(typeof c.name=="string"){var f=t;e:{var h=c.name,y=c.env,x=c.debugLocation;if(x!=null){var V=Ze(x),U=V.lastIndexOf(`
|
|
40
|
+
`),O=U===-1?V:V.slice(U+1);if(O.indexOf(h)!==-1){var P=`
|
|
41
|
+
`+O;break e}}P=Pe(h+(y?" ["+y+"]":""))}t=f+P}}n=e,e=e.return}while(e);return t}catch(ce){return`
|
|
42
|
+
Error generating stack: `+ce.message+`
|
|
43
|
+
`+ce.stack}}function Rt(e){return(e=e?e.displayName||e.name:"")?Pe(e):""}function ke(){if(In===null)return null;var e=In._debugOwner;return e!=null?X(e):null}function un(){if(In===null)return"";var e=In;try{var t="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:t+=Pe(e.type);break;case 13:t+=Pe("Suspense");break;case 19:t+=Pe("SuspenseList");break;case 31:t+=Pe("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||t!==""||(t+=Rt(e.type));break;case 11:e._debugOwner||t!==""||(t+=Rt(e.type.render))}for(;e;)if(typeof e.tag=="number"){var n=e;e=n._debugOwner;var r=n._debugStack;if(e&&r){var l=Ze(r);l!==""&&(t+=`
|
|
44
|
+
`+l)}}else if(e.debugStack!=null){var c=e.debugStack;(e=e.owner)&&c&&(t+=`
|
|
45
|
+
`+Ze(c))}else break;var f=t}catch(h){f=`
|
|
46
|
+
Error generating stack: `+h.message+`
|
|
47
|
+
`+h.stack}return f}function be(e,t,n,r,l,c,f){var h=In;eo(e);try{return e!==null&&e._debugTask?e._debugTask.run(t.bind(null,n,r,l,c,f)):t(n,r,l,c,f)}finally{eo(h)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function eo(e){Y.getCurrentStack=e===null?null:un,ca=!1,In=e}function _a(e){return typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function Aa(e){try{return ir(e),!1}catch{return!0}}function ir(e){return""+e}function st(e,t){if(Aa(e))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",t,_a(e)),ir(e)}function to(e,t){if(Aa(e))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",t,_a(e)),ir(e)}function Nl(e){if(Aa(e))return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.",_a(e)),ir(e)}function Eh(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"),!0;try{Do=t.inject(e),hn=t}catch(n){console.error("React instrumentation encountered an error: %o.",n)}return!!t.checkDCE}function bt(e){if(typeof WA=="function"&&eD(e),hn&&typeof hn.setStrictMode=="function")try{hn.setStrictMode(Do,e)}catch(t){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",t))}}function oi(e){return e>>>=0,e===0?32:31-(tD(e)/nD|0)|0}function Us(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error("Should have found matching lanes. This is a bug in React."),e}}function Da(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var l=0,c=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var h=r&134217727;return h!==0?(r=h&~c,r!==0?l=Us(r):(f&=h,f!==0?l=Us(f):n||(n=h&~e,n!==0&&(l=Us(n))))):(h=r&~c,h!==0?l=Us(h):f!==0?l=Us(f):n||(n=r&~e,n!==0&&(l=Us(n)))),l===0?0:t!==0&&t!==l&&(t&c)===0&&(c=l&-l,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:l}function fn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function _h(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return console.error("Should have found matching lanes. This is a bug in React."),-1}}function wl(){var e=qf;return qf<<=1,(qf&62914560)===0&&(qf=4194304),e}function Sl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function li(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ah(e,t,n,r,l,c){var f=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var h=e.entanglements,y=e.expirationTimes,x=e.hiddenUpdates;for(n=f&~n;0<n;){var V=31-yn(n),U=1<<V;h[V]=0,y[V]=-1;var O=x[V];if(O!==null)for(x[V]=null,V=0;V<O.length;V++){var P=O[V];P!==null&&(P.lane&=-536870913)}n&=~U}r!==0&&_u(e,r,0),c!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=c&~(f&~t))}function _u(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-yn(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Au(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-yn(n),l=1<<r;l&t|e[r]&t&&(e[r]|=t),n&=~l}}function El(e,t){var n=t&-t;return n=(n&42)!==0?1:_l(n),(n&(e.suspendedLanes|t))!==0?0:n}function _l(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function zs(e,t,n){if(fa)for(e=e.pendingUpdatersLaneMap;0<n;){var r=31-yn(n),l=1<<r;e[r].add(t),n&=~l}}function ci(e,t){if(fa)for(var n=e.pendingUpdatersLaneMap,r=e.memoizedUpdaters;0<t;){var l=31-yn(t);e=1<<l,l=n[l],0<l.size&&(l.forEach(function(c){var f=c.alternate;f!==null&&r.has(f)||r.add(c)}),l.clear()),t&=~e}}function no(e){return e&=-e,ss<e?da<e?(e&134217727)!==0?qa:Lf:da:ss}function so(){var e=rt.p;return e!==0?e:(e=window.event,e===void 0?qa:G1(e.type))}function ao(e,t){var n=rt.p;try{return rt.p=e,t()}finally{rt.p=n}}function or(e){delete e[ln],delete e[gn],delete e[$p],delete e[sD],delete e[aD]}function Bs(e){var t=e[ln];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Dr]||n[ln]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=M1(e);e!==null;){if(n=e[ln])return n;e=M1(e)}return t}e=n,n=e.parentNode}return null}function Un(e){if(e=e[ln]||e[Dr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ta(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function qs(e){var t=e[cx];return t||(t=e[cx]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function jt(e){e[uc]=!0}function Ca(e,t){Ls(e,t),Ls(e+"Capture",t)}function Ls(e,t){_i[e]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),_i[e]=t;var n=e.toLowerCase();for(Ip[n]=e,e==="onDoubleClick"&&(Ip.ondblclick=e),e=0;e<t.length;e++)ux.add(t[e])}function Hs(e,t){rD[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||console.error(e==="select"?"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.":"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),t.onChange||t.readOnly||t.disabled||t.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function lr(e){return Es.call(dx,e)?!0:Es.call(fx,e)?!1:iD.test(e)?dx[e]=!0:(fx[e]=!0,console.error("Invalid attribute name: `%s`",e),!1)}function cr(e,t,n){if(lr(t)){if(!e.hasAttribute(t)){switch(typeof n){case"symbol":case"object":return n;case"function":return n;case"boolean":if(n===!1)return n}return n===void 0?void 0:null}return e=e.getAttribute(t),e===""&&n===!0?!0:(st(n,t),e===""+n?n:e)}}function vs(e,t,n){if(lr(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}st(n,t),e.setAttribute(t,""+n)}}function Ps(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}st(n,t),e.setAttribute(t,""+n)}}function Tn(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}st(r,n),e.setAttributeNS(t,n,""+r)}}function Qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return Nl(e),e;default:return""}}function ur(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Al(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var l=r.get,c=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(f){Nl(f),n=""+f,c.call(this,f)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(f){Nl(f),n=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ro(e){if(!e._valueTracker){var t=ur(e)?"checked":"value";e._valueTracker=Al(e,t,""+e[t])}}function Du(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ur(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function io(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Tt(e){return e.replace(oD,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function $s(e,t){t.checked===void 0||t.defaultChecked===void 0||mx||(console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",ke()||"A component",t.type),mx=!0),t.value===void 0||t.defaultValue===void 0||hx||(console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components",ke()||"A component",t.type),hx=!0)}function Is(e,t,n,r,l,c,f,h){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?(st(f,"type"),e.type=f):e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Qt(t)):e.value!==""+Qt(t)&&(e.value=""+Qt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?ui(e,f,Qt(t)):n!=null?ui(e,f,Qt(n)):r!=null&&e.removeAttribute("value"),l==null&&c!=null&&(e.defaultChecked=!!c),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?(st(h,"name"),e.name=""+Qt(h)):e.removeAttribute("name")}function oo(e,t,n,r,l,c,f,h){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(st(c,"type"),e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){ro(e);return}n=n!=null?""+Qt(n):"",t=t!=null?""+Qt(t):n,h||t===e.value||(e.value=t),e.defaultValue=t}r=r??l,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=h?e.checked:!!r,e.defaultChecked=!!r,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(st(f,"name"),e.name=f),ro(e)}function ui(e,t,n){t==="number"&&io(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Dl(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?Tp.Children.forEach(t.children,function(n){n==null||typeof n=="string"||typeof n=="number"||typeof n=="bigint"||bx||(bx=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):t.dangerouslySetInnerHTML==null||yx||(yx=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),t.selected==null||px||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),px=!0)}function Tu(){var e=ke();return e?`
|
|
48
|
+
|
|
49
|
+
Check the render method of \``+e+"`.":""}function Ut(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Qt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,r&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Tl(e,t){for(e=0;e<vx.length;e++){var n=vx[e];if(t[n]!=null){var r=Gt(t[n]);t.multiple&&!r?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,Tu()):!t.multiple&&r&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,Tu())}}t.value===void 0||t.defaultValue===void 0||gx||(console.error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components"),gx=!0)}function N(e,t){t.value===void 0||t.defaultValue===void 0||xx||(console.error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components",ke()||"A component"),xx=!0),t.children!=null&&t.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function A(e,t,n){if(t!=null&&(t=""+Qt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Qt(n):""}function E(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Gt(r)){if(1<r.length)throw Error("<textarea> can only have at most one child.");r=r[0]}n=r}n==null&&(n=""),t=n}n=Qt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),ro(e)}function T(e,t){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-t?T(e.children[0],t):e}function k(e){return" "+" ".repeat(e)}function L(e){return"+ "+" ".repeat(e)}function Z(e){return"- "+" ".repeat(e)}function se(e){switch(e.tag){case 26:case 27:case 5:return e.type;case 16:return"Lazy";case 31:return"Activity";case 13:return"Suspense";case 19:return"SuspenseList";case 0:case 15:return e=e.type,e.displayName||e.name||null;case 11:return e=e.type.render,e.displayName||e.name||null;case 1:return e=e.type,e.displayName||e.name||null;default:return null}}function $(e,t){return Nx.test(e)?(e=JSON.stringify(e),e.length>t-2?8>t?'{"..."}':"{"+e.slice(0,t-7)+'..."}':"{"+e+"}"):e.length>t?5>t?'{"..."}':e.slice(0,t-3)+"...":e}function K(e,t,n){var r=120-2*n;if(t===null)return L(n)+$(e,r)+`
|
|
50
|
+
`;if(typeof t=="string"){for(var l=0;l<t.length&&l<e.length&&t.charCodeAt(l)===e.charCodeAt(l);l++);return l>r-8&&10<l&&(e="..."+e.slice(l-8),t="..."+t.slice(l-8)),L(n)+$(e,r)+`
|
|
51
|
+
`+Z(n)+$(t,r)+`
|
|
52
|
+
`}return k(n)+$(e,r)+`
|
|
53
|
+
`}function ye(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(t,n){return n})}function qe(e,t){switch(typeof e){case"string":return e=JSON.stringify(e),e.length>t?5>t?'"..."':e.slice(0,t-4)+'..."':e;case"object":if(e===null)return"null";if(Gt(e))return"[...]";if(e.$$typeof===oa)return(t=W(e.type))?"<"+t+">":"<...>";var n=ye(e);if(n==="Object"){n="",t-=2;for(var r in e)if(e.hasOwnProperty(r)){var l=JSON.stringify(r);if(l!=='"'+r+'"'&&(r=l),t-=r.length-2,l=qe(e[r],15>t?t:15),t-=l.length,0>t){n+=n===""?"...":", ...";break}n+=(n===""?"":",")+r+":"+l}return"{"+n+"}"}return n;case"function":return(t=e.displayName||e.name)?"function "+t:"function";default:return String(e)}}function it(e,t){return typeof e!="string"||Nx.test(e)?"{"+qe(e,t-2)+"}":e.length>t-2?5>t?'"..."':'"'+e.slice(0,t-5)+'..."':'"'+e+'"'}function pn(e,t,n){var r=120-n.length-e.length,l=[],c;for(c in t)if(t.hasOwnProperty(c)&&c!=="children"){var f=it(t[c],120-n.length-c.length-1);r-=c.length+f.length+2,l.push(c+"="+f)}return l.length===0?n+"<"+e+`>
|
|
54
|
+
`:0<r?n+"<"+e+" "+l.join(" ")+`>
|
|
55
|
+
`:n+"<"+e+`
|
|
56
|
+
`+n+" "+l.join(`
|
|
57
|
+
`+n+" ")+`
|
|
58
|
+
`+n+`>
|
|
59
|
+
`}function fr(e,t,n){var r="",l=Ie({},t),c;for(c in e)if(e.hasOwnProperty(c)){delete l[c];var f=120-2*n-c.length-2,h=qe(e[c],f);t.hasOwnProperty(c)?(f=qe(t[c],f),r+=L(n)+c+": "+h+`
|
|
60
|
+
`,r+=Z(n)+c+": "+f+`
|
|
61
|
+
`):r+=L(n)+c+": "+h+`
|
|
62
|
+
`}for(var y in l)l.hasOwnProperty(y)&&(e=qe(l[y],120-2*n-y.length-2),r+=Z(n)+y+": "+e+`
|
|
63
|
+
`);return r}function s_(e,t,n,r){var l="",c=new Map;for(x in n)n.hasOwnProperty(x)&&c.set(x.toLowerCase(),x);if(c.size===1&&c.has("children"))l+=pn(e,t,k(r));else{for(var f in t)if(t.hasOwnProperty(f)&&f!=="children"){var h=120-2*(r+1)-f.length-1,y=c.get(f.toLowerCase());if(y!==void 0){c.delete(f.toLowerCase());var x=t[f];y=n[y];var V=it(x,h);h=it(y,h),typeof x=="object"&&x!==null&&typeof y=="object"&&y!==null&&ye(x)==="Object"&&ye(y)==="Object"&&(2<Object.keys(x).length||2<Object.keys(y).length||-1<V.indexOf("...")||-1<h.indexOf("..."))?l+=k(r+1)+f+`={{
|
|
64
|
+
`+fr(x,y,r+2)+k(r+1)+`}}
|
|
65
|
+
`:(l+=L(r+1)+f+"="+V+`
|
|
66
|
+
`,l+=Z(r+1)+f+"="+h+`
|
|
67
|
+
`)}else l+=k(r+1)+f+"="+it(t[f],h)+`
|
|
68
|
+
`}c.forEach(function(U){if(U!=="children"){var O=120-2*(r+1)-U.length-1;l+=Z(r+1)+U+"="+it(n[U],O)+`
|
|
69
|
+
`}}),l=l===""?k(r)+"<"+e+`>
|
|
70
|
+
`:k(r)+"<"+e+`
|
|
71
|
+
`+l+k(r)+`>
|
|
72
|
+
`}return e=n.children,t=t.children,typeof e=="string"||typeof e=="number"||typeof e=="bigint"?(c="",(typeof t=="string"||typeof t=="number"||typeof t=="bigint")&&(c=""+t),l+=K(c,""+e,r+1)):(typeof t=="string"||typeof t=="number"||typeof t=="bigint")&&(l=e==null?l+K(""+t,null,r+1):l+K(""+t,void 0,r+1)),l}function by(e,t){var n=se(e);if(n===null){for(n="",e=e.child;e;)n+=by(e,t),e=e.sibling;return n}return k(t)+"<"+n+`>
|
|
73
|
+
`}function Dh(e,t){var n=T(e,t);if(n!==e&&(e.children.length!==1||e.children[0]!==n))return k(t)+`...
|
|
74
|
+
`+Dh(n,t+1);n="";var r=e.fiber._debugInfo;if(r)for(var l=0;l<r.length;l++){var c=r[l].name;typeof c=="string"&&(n+=k(t)+"<"+c+`>
|
|
75
|
+
`,t++)}if(r="",l=e.fiber.pendingProps,e.fiber.tag===6)r=K(l,e.serverProps,t),t++;else if(c=se(e.fiber),c!==null)if(e.serverProps===void 0){r=t;var f=120-2*r-c.length-2,h="";for(x in l)if(l.hasOwnProperty(x)&&x!=="children"){var y=it(l[x],15);if(f-=x.length+y.length+2,0>f){h+=" ...";break}h+=" "+x+"="+y}r=k(r)+"<"+c+h+`>
|
|
76
|
+
`,t++}else e.serverProps===null?(r=pn(c,l,L(t)),t++):typeof e.serverProps=="string"?console.error("Should not have matched a non HostText fiber to a Text node. This is a bug in React."):(r=s_(c,l,e.serverProps,t),t++);var x="";for(l=e.fiber.child,c=0;l&&c<e.children.length;)f=e.children[c],f.fiber===l?(x+=Dh(f,t),c++):x+=by(l,t),l=l.sibling;for(l&&0<e.children.length&&(x+=k(t)+`...
|
|
77
|
+
`),l=e.serverTail,e.serverProps===null&&t--,e=0;e<l.length;e++)c=l[e],x=typeof c=="string"?x+(Z(t)+$(c,120-2*t)+`
|
|
78
|
+
`):x+pn(c.type,c.props,Z(t));return n+r+x}function Th(e){try{return`
|
|
79
|
+
|
|
80
|
+
`+Dh(e,0)}catch{return""}}function yy(e,t,n){for(var r=t,l=null,c=0;r;)r===e&&(c=0),l={fiber:r,children:l!==null?[l]:[],serverProps:r===t?n:r===e?null:void 0,serverTail:[],distanceFromLeaf:c},c++,r=r.return;return l!==null?Th(l).replaceAll(/^[+-]/gm,">"):""}function gy(e,t){var n=Ie({},e||Sx),r={tag:t};return wx.indexOf(t)!==-1&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),cD.indexOf(t)!==-1&&(n.pTagInButtonScope=null),lD.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(n.listItemTagAutoclosing=null,n.dlItemTagAutoclosing=null),n.current=r,t==="form"&&(n.formTag=r),t==="a"&&(n.aTagInScope=r),t==="button"&&(n.buttonTagInScope=r),t==="nobr"&&(n.nobrTagInScope=r),t==="p"&&(n.pTagInButtonScope=r),t==="li"&&(n.listItemTagAutoclosing=r),(t==="dd"||t==="dt")&&(n.dlItemTagAutoclosing=r),t==="#document"||t==="html"?n.containerTagInScope=null:n.containerTagInScope||(n.containerTagInScope=r),e!==null||t!=="#document"&&t!=="html"&&t!=="body"?n.implicitRootScope===!0&&(n.implicitRootScope=!1):n.implicitRootScope=!0,n}function vy(e,t,n){switch(t){case"select":return e==="hr"||e==="option"||e==="optgroup"||e==="script"||e==="template"||e==="#text";case"optgroup":return e==="option"||e==="#text";case"option":return e==="#text";case"tr":return e==="th"||e==="td"||e==="style"||e==="script"||e==="template";case"tbody":case"thead":case"tfoot":return e==="tr"||e==="style"||e==="script"||e==="template";case"colgroup":return e==="col"||e==="template";case"table":return e==="caption"||e==="colgroup"||e==="tbody"||e==="tfoot"||e==="thead"||e==="style"||e==="script"||e==="template";case"head":return e==="base"||e==="basefont"||e==="bgsound"||e==="link"||e==="meta"||e==="title"||e==="noscript"||e==="noframes"||e==="style"||e==="script"||e==="template";case"html":if(n)break;return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":if(!n)return e==="html"}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6";case"rp":case"rt":return uD.indexOf(t)===-1;case"caption":case"col":case"colgroup":case"frameset":case"frame":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return t==null;case"head":return n||t===null;case"html":return n&&t==="#document"||t===null;case"body":return n&&(t==="#document"||t==="html")||t===null}return!0}function a_(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null}function xy(e,t){for(;e;){switch(e.tag){case 5:case 26:case 27:if(e.type===t)return e}e=e.return}return null}function Ch(e,t){t=t||Sx;var n=t.current;if(t=(n=vy(e,n&&n.tag,t.implicitRootScope)?null:n)?null:a_(e,t),t=n||t,!t)return!0;var r=t.tag;if(t=String(!!n)+"|"+e+"|"+r,Hf[t])return!1;Hf[t]=!0;var l=(t=In)?xy(t.return,r):null,c=t!==null&&l!==null?yy(l,t,null):"",f="<"+e+">";return n?(n="",r==="table"&&e==="tr"&&(n+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser."),console.error(`In HTML, %s cannot be a child of <%s>.%s
|
|
81
|
+
This will cause a hydration error.%s`,f,r,n,c)):console.error(`In HTML, %s cannot be a descendant of <%s>.
|
|
82
|
+
This will cause a hydration error.%s`,f,r,c),t&&(e=t.return,l===null||e===null||l===e&&e._debugOwner===t._debugOwner||be(l,function(){console.error(`<%s> cannot contain a nested %s.
|
|
83
|
+
See this log for the ancestor stack trace.`,r,f)})),!1}function Cu(e,t,n){if(n||vy("#text",t,!1))return!0;if(n="#text|"+t,Hf[n])return!1;Hf[n]=!0;var r=(n=In)?xy(n,t):null;return n=n!==null&&r!==null?yy(r,n,n.tag!==6?{children:null}:null):"",/\S/.test(e)?console.error(`In HTML, text nodes cannot be a child of <%s>.
|
|
84
|
+
This will cause a hydration error.%s`,t,n):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
|
|
85
|
+
This will cause a hydration error.%s`,t,n),!1}function Cl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}function r_(e){return e.replace(hD,function(t,n){return n.toUpperCase()})}function Ny(e,t,n){var r=t.indexOf("--")===0;r||(-1<t.indexOf("-")?To.hasOwnProperty(t)&&To[t]||(To[t]=!0,console.error("Unsupported style property %s. Did you mean %s?",t,r_(t.replace(dD,"ms-")))):fD.test(t)?To.hasOwnProperty(t)&&To[t]||(To[t]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",t,t.charAt(0).toUpperCase()+t.slice(1))):!Ax.test(n)||Yp.hasOwnProperty(n)&&Yp[n]||(Yp[n]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,t,n.replace(Ax,""))),typeof n=="number"&&(isNaN(n)?Dx||(Dx=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",t)):isFinite(n)||Tx||(Tx=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",t)))),n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||Cx.has(t)?t==="float"?e.cssFloat=n:(to(n,t),e[t]=(""+n).trim()):e[t]=n+"px"}function wy(e,t,n){if(t!=null&&typeof t!="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(t&&Object.freeze(t),e=e.style,n!=null){if(t){var r={};if(n){for(var l in n)if(n.hasOwnProperty(l)&&!t.hasOwnProperty(l))for(var c=Fp[l]||[l],f=0;f<c.length;f++)r[c[f]]=l}for(var h in t)if(t.hasOwnProperty(h)&&(!n||n[h]!==t[h]))for(l=Fp[h]||[h],c=0;c<l.length;c++)r[l[c]]=h;h={};for(var y in t)for(l=Fp[y]||[y],c=0;c<l.length;c++)h[l[c]]=y;y={};for(var x in r)if(l=r[x],(c=h[x])&&l!==c&&(f=l+","+c,!y[f])){y[f]=!0,f=console;var V=t[l];f.error.call(f,"%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",V==null||typeof V=="boolean"||V===""?"Removing":"Updating",l,c)}}for(var U in n)!n.hasOwnProperty(U)||t!=null&&t.hasOwnProperty(U)||(U.indexOf("--")===0?e.setProperty(U,""):U==="float"?e.cssFloat="":e[U]="");for(var O in t)x=t[O],t.hasOwnProperty(O)&&n[O]!==x&&Ny(e,O,x)}else for(r in t)t.hasOwnProperty(r)&&Ny(e,r,t[r])}function Ol(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Sy(e){return mD.get(e)||e}function i_(e,t){if(Es.call(Oo,t)&&Oo[t])return!0;if(bD.test(t)){if(e="aria-"+t.slice(4).toLowerCase(),e=Ox.hasOwnProperty(e)?e:null,e==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Oo[t]=!0;if(t!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,e),Oo[t]=!0}if(pD.test(t)){if(e=t.toLowerCase(),e=Ox.hasOwnProperty(e)?e:null,e==null)return Oo[t]=!0,!1;t!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,e),Oo[t]=!0)}return!0}function o_(e,t){var n=[],r;for(r in t)i_(e,r)||n.push(r);t=n.map(function(l){return"`"+l+"`"}).join(", "),n.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",t,e):1<n.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",t,e)}function l_(e,t,n,r){if(Es.call(vn,t)&&vn[t])return!0;var l=t.toLowerCase();if(l==="onfocusin"||l==="onfocusout")return console.error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),vn[t]=!0;if(typeof n=="function"&&(e==="form"&&t==="action"||e==="input"&&t==="formAction"||e==="button"&&t==="formAction"))return!0;if(r!=null){if(e=r.possibleRegistrationNames,r.registrationNameDependencies.hasOwnProperty(t))return!0;if(r=e.hasOwnProperty(l)?e[l]:null,r!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",t,r),vn[t]=!0;if(jx.test(t))return console.error("Unknown event handler property `%s`. It will be ignored.",t),vn[t]=!0}else if(jx.test(t))return yD.test(t)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),vn[t]=!0;if(gD.test(t)||vD.test(t))return!0;if(l==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),vn[t]=!0;if(l==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),vn[t]=!0;if(l==="is"&&n!==null&&n!==void 0&&typeof n!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof n),vn[t]=!0;if(typeof n=="number"&&isNaN(n))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),vn[t]=!0;if($f.hasOwnProperty(l)){if(l=$f[l],l!==t)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",t,l),vn[t]=!0}else if(t!==l)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,l),vn[t]=!0;switch(t){case"dangerouslySetInnerHTML":case"children":case"style":case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":return!0;case"innerText":case"textContent":return!0}switch(typeof n){case"boolean":switch(t){case"autoFocus":case"checked":case"multiple":case"muted":case"selected":case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"capture":case"download":case"inert":return!0;default:return l=t.toLowerCase().slice(0,5),l==="data-"||l==="aria-"?!0:(n?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',n,t,t,n,t):console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',n,t,t,n,t,t,t),vn[t]=!0)}case"function":case"symbol":return vn[t]=!0,!1;case"string":if(n==="false"||n==="true"){switch(t){case"checked":case"selected":case"multiple":case"muted":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":case"inert":break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",n,t,n==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',t,n),vn[t]=!0}}return!0}function c_(e,t,n){var r=[],l;for(l in t)l_(e,l,t[l],n)||r.push(l);t=r.map(function(c){return"`"+c+"`"}).join(", "),r.length===1?console.error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior ",t,e):1<r.length&&console.error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior ",t,e)}function Rl(e){return xD.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Oa(){}function Oh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function Ey(e){var t=Un(e);if(t&&(e=t.stateNode)){var n=e[gn]||null;e:switch(e=t.stateNode,t.type){case"input":if(Is(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(st(t,"name"),n=n.querySelectorAll('input[name="'+Tt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var l=r[gn]||null;if(!l)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Is(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Du(r)}break e;case"textarea":A(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}function _y(e,t,n){if(Gp)return e(t,n);Gp=!0;try{var r=e(t);return r}finally{if(Gp=!1,(Ro!==null||jo!==null)&&(go(),Ro&&(t=Ro,e=jo,jo=Ro=null,Ey(t),e)))for(t=0;t<e.length;t++)Ey(e[t])}}function jl(e,t){var n=e.stateNode;if(n===null)return null;var r=n[gn]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof n+"` type.");return n}function Ay(){if(If)return If;var e,t=Xp,n=t.length,r,l="value"in Tr?Tr.value:Tr.textContent,c=l.length;for(e=0;e<n&&t[e]===l[e];e++);var f=n-e;for(r=1;r<=f&&t[n-r]===l[c-r];r++);return If=l.slice(e,1<r?1-r:void 0)}function Ou(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ru(){return!0}function Dy(){return!1}function Cn(e){function t(n,r,l,c,f){this._reactName=n,this._targetInst=l,this.type=r,this.nativeEvent=c,this.target=f,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(n=e[h],this[h]=n?n(c):c[h]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Ru:Dy,this.isPropagationStopped=Dy,this}return Ie(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ru)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ru)},persist:function(){},isPersistent:Ru}),t}function u_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=MD[e])?!!t[e]:!1}function Rh(){return u_}function Ty(e,t){switch(e){case"keyup":return FD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==Ux;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}function f_(e,t){switch(e){case"compositionend":return Cy(t);case"keypress":return t.which!==Bx?null:(Lx=!0,qx);case"textInput":return e=t.data,e===qx&&Lx?null:e;default:return null}}function d_(e,t){if(Mo)return e==="compositionend"||!Wp&&Ty(e,t)?(e=Ay(),If=Xp=Tr=null,Mo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zx&&t.locale!=="ko"?null:t.data;default:return null}}function Oy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!GD[e.type]:t==="textarea"}function h_(e){if(!ha)return!1;e="on"+e;var t=e in document;return t||(t=document.createElement("div"),t.setAttribute(e,"return;"),t=typeof t[e]=="function"),t}function Ry(e,t,n,r){Ro?jo?jo.push(r):jo=[r]:Ro=r,t=Ef(t,"onChange"),0<t.length&&(n=new Ff("onChange","change",null,n,r),e.push({event:n,listeners:t}))}function m_(e){h1(e,0)}function ju(e){var t=Ta(e);if(Du(t))return e}function jy(e,t){if(e==="change")return t}function My(){bc&&(bc.detachEvent("onpropertychange",ky),yc=bc=null)}function ky(e){if(e.propertyName==="value"&&ju(yc)){var t=[];Ry(t,yc,e,Oh(e)),_y(m_,t)}}function p_(e,t,n){e==="focusin"?(My(),bc=t,yc=n,bc.attachEvent("onpropertychange",ky)):e==="focusout"&&My()}function b_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ju(yc)}function y_(e,t){if(e==="click")return ju(t)}function g_(e,t){if(e==="input"||e==="change")return ju(t)}function v_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}function Ml(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var l=n[r];if(!Es.call(t,l)||!xn(e[l],t[l]))return!1}return!0}function Vy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Uy(e,t){var n=Vy(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Vy(n)}}function zy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function By(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=io(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=io(e.document)}return t}function jh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function qy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tb||ko==null||ko!==io(r)||(r=ko,"selectionStart"in r&&jh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),gc&&Ml(gc,r)||(gc=r,r=Ef(eb,"onSelect"),0<r.length&&(t=new Ff("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ko)))}function fi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}function di(e){if(nb[e])return nb[e];if(!Vo[e])return e;var t=Vo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Px)return nb[e]=t[n];return e}function xs(e,t){Gx.set(e,t),Ca(t,[e])}function x_(e){for(var t=Gf,n=0;n<e.length;n++){var r=e[n];if(typeof r=="object"&&r!==null)if(Gt(r)&&r.length===2&&typeof r[0]=="string"){if(t!==Gf&&t!==ob)return rb;t=ob}else return rb;else{if(typeof r=="function"||typeof r=="string"&&50<r.length||t!==Gf&&t!==ib)return rb;t=ib}}return t}function Mh(e,t,n,r){for(var l in e)Es.call(e,l)&&l[0]!=="_"&&Fs(l,e[l],t,n,r)}function Fs(e,t,n,r,l){switch(typeof t){case"object":if(t===null){t="null";break}else{if(t.$$typeof===oa){var c=W(t.type)||"…",f=t.key;t=t.props;var h=Object.keys(t),y=h.length;if(f==null&&y===0){t="<"+c+" />";break}if(3>r||y===1&&h[0]==="children"&&f==null){t="<"+c+" … />";break}n.push([l+" ".repeat(r)+e,"<"+c]),f!==null&&Fs("key",f,n,r+1,l),e=!1;for(var x in t)x==="children"?t.children!=null&&(!Gt(t.children)||0<t.children.length)&&(e=!0):Es.call(t,x)&&x[0]!=="_"&&Fs(x,t[x],n,r+1,l);n.push(["",e?">…</"+c+">":"/>"]);return}if(c=Object.prototype.toString.call(t),c=c.slice(8,c.length-1),c==="Array"){if(x=x_(t),x===ib||x===Gf){t=JSON.stringify(t);break}else if(x===ob){for(n.push([l+" ".repeat(r)+e,""]),e=0;e<t.length;e++)c=t[e],Fs(c[0],c[1],n,r+1,l);return}}if(c==="Promise"){if(t.status==="fulfilled"){if(c=n.length,Fs(e,t.value,n,r,l),n.length>c){n=n[c],n[1]="Promise<"+(n[1]||"Object")+">";return}}else if(t.status==="rejected"&&(c=n.length,Fs(e,t.reason,n,r,l),n.length>c)){n=n[c],n[1]="Rejected Promise<"+n[1]+">";return}n.push([" ".repeat(r)+e,"Promise"]);return}c==="Object"&&(x=Object.getPrototypeOf(t))&&typeof x.constructor=="function"&&(c=x.constructor.name),n.push([l+" ".repeat(r)+e,c==="Object"?3>r?"":"…":c]),3>r&&Mh(t,n,r+1,l);return}case"function":t=t.name===""?"() => {}":t.name+"() {}";break;case"string":t=t===eT?"…":JSON.stringify(t);break;case"undefined":t="undefined";break;case"boolean":t=t?"true":"false";break;default:t=String(t)}n.push([l+" ".repeat(r)+e,t])}function Ly(e,t,n,r){var l=!0;for(f in e)f in t||(n.push([Jf+" ".repeat(r)+f,"…"]),l=!1);for(var c in t)if(c in e){var f=e[c],h=t[c];if(f!==h){if(r===0&&c==="children")l=" ".repeat(r)+c,n.push([Jf+l,"…"],[Xf+l,"…"]);else{if(!(3<=r)){if(typeof f=="object"&&typeof h=="object"&&f!==null&&h!==null&&f.$$typeof===h.$$typeof)if(h.$$typeof===oa){if(f.type===h.type&&f.key===h.key){f=W(h.type)||"…",l=" ".repeat(r)+c,f="<"+f+" … />",n.push([Jf+l,f],[Xf+l,f]),l=!1;continue}}else{var y=Object.prototype.toString.call(f),x=Object.prototype.toString.call(h);if(y===x&&(x==="[object Object]"||x==="[object Array]")){y=[Qx+" ".repeat(r)+c,x==="[object Array]"?"Array":""],n.push(y),x=n.length,Ly(f,h,n,r+1)?x===n.length&&(y[1]="Referentially unequal but deeply equal objects. Consider memoization."):l=!1;continue}}else if(typeof f=="function"&&typeof h=="function"&&f.name===h.name&&f.length===h.length&&(y=Function.prototype.toString.call(f),x=Function.prototype.toString.call(h),y===x)){f=h.name===""?"() => {}":h.name+"() {}",n.push([Qx+" ".repeat(r)+c,f+" Referentially unequal function closure. Consider memoization."]);continue}}Fs(c,f,n,r,Jf),Fs(c,h,n,r,Xf)}l=!1}}else n.push([Xf+" ".repeat(r)+c,"…"]),l=!1;return l}function Ns(e){Xe=e&63?"Blocking":e&64?"Gesture":e&4194176?"Transition":e&62914560?"Suspense":e&2080374784?"Idle":"Other"}function Ys(e,t,n,r){yt&&(Or.start=t,Or.end=n,La.color="warning",La.tooltipText=r,La.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,r,Or)):performance.measure(r,Or))}function Mu(e,t,n){Ys(e,t,n,"Reconnect")}function ku(e,t,n,r,l){var c=H(e);if(c!==null&&yt){var f=e.alternate,h=e.actualDuration;if(f===null||f.child!==e.child)for(var y=e.child;y!==null;y=y.sibling)h-=y.actualDuration;r=.5>h?r?"tertiary-light":"primary-light":10>h?r?"tertiary":"primary":100>h?r?"tertiary-dark":"primary-dark":"error";var x=e.memoizedProps;h=e._debugTask,x!==null&&f!==null&&f.memoizedProps!==x?(y=[tT],x=Ly(f.memoizedProps,x,y,0),1<y.length&&(x&&!Cr&&(f.lanes&l)===0&&100<e.actualDuration?(Cr=!0,y[0]=nT,La.color="warning",La.tooltipText=Zx):(La.color=r,La.tooltipText=c),La.properties=y,Or.start=t,Or.end=n,h!=null?h.run(performance.measure.bind(performance,""+c,Or)):performance.measure(""+c,Or))):h!=null?h.run(console.timeStamp.bind(console,c,t,n,as,void 0,r)):console.timeStamp(c,t,n,as,void 0,r)}}function kh(e,t,n,r){if(yt){var l=H(e);if(l!==null){for(var c=null,f=[],h=0;h<r.length;h++){var y=r[h];c==null&&y.source!==null&&(c=y.source._debugTask),y=y.value,f.push(["Error",typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y)])}e.key!==null&&Fs("key",e.key,f,0,""),e.memoizedProps!==null&&Mh(e.memoizedProps,f,0,""),c==null&&(c=e._debugTask),e={start:t,end:n,detail:{devtools:{color:"error",track:as,tooltipText:e.tag===13?"Hydration failed":"Error boundary caught an error",properties:f}}},c?c.run(performance.measure.bind(performance,""+l,e)):performance.measure(""+l,e)}}}function Gs(e,t,n,r,l){if(l!==null){if(yt){var c=H(e);if(c!==null){r=[];for(var f=0;f<l.length;f++){var h=l[f].value;r.push(["Error",typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h)])}e.key!==null&&Fs("key",e.key,r,0,""),e.memoizedProps!==null&&Mh(e.memoizedProps,r,0,""),t={start:t,end:n,detail:{devtools:{color:"error",track:as,tooltipText:"A lifecycle or effect errored",properties:r}}},(e=e._debugTask)?e.run(performance.measure.bind(performance,""+c,t)):performance.measure(""+c,t)}}}else c=H(e),c!==null&&yt&&(l=1>r?"secondary-light":100>r?"secondary":500>r?"secondary-dark":"error",(e=e._debugTask)?e.run(console.timeStamp.bind(console,c,t,n,as,void 0,l)):console.timeStamp(c,t,n,as,void 0,l))}function N_(e,t,n,r){if(yt&&!(t<=e)){var l=(n&738197653)===n?"tertiary-dark":"primary-dark";n=(n&536870912)===n?"Prepared":(n&201326741)===n?"Hydrated":"Render",r?r.run(console.timeStamp.bind(console,n,e,t,Xe,Ge,l)):console.timeStamp(n,e,t,Xe,Ge,l)}}function Hy(e,t,n,r){!yt||t<=e||(n=(n&738197653)===n?"tertiary-dark":"primary-dark",r?r.run(console.timeStamp.bind(console,"Prewarm",e,t,Xe,Ge,n)):console.timeStamp("Prewarm",e,t,Xe,Ge,n))}function Py(e,t,n,r){!yt||t<=e||(n=(n&738197653)===n?"tertiary-dark":"primary-dark",r?r.run(console.timeStamp.bind(console,"Suspended",e,t,Xe,Ge,n)):console.timeStamp("Suspended",e,t,Xe,Ge,n))}function w_(e,t,n,r,l,c){if(yt&&!(t<=e)){n=[];for(var f=0;f<r.length;f++){var h=r[f].value;n.push(["Recoverable Error",typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h)])}e={start:e,end:t,detail:{devtools:{color:"primary-dark",track:Xe,trackGroup:Ge,tooltipText:l?"Hydration Failed":"Recovered after Error",properties:n}}},c?c.run(performance.measure.bind(performance,"Recovered",e)):performance.measure("Recovered",e)}}function Vh(e,t,n,r){!yt||t<=e||(r?r.run(console.timeStamp.bind(console,"Errored",e,t,Xe,Ge,"error")):console.timeStamp("Errored",e,t,Xe,Ge,"error"))}function S_(e,t,n,r){!yt||t<=e||(r?r.run(console.timeStamp.bind(console,n,e,t,Xe,Ge,"secondary-light")):console.timeStamp(n,e,t,Xe,Ge,"secondary-light"))}function $y(e,t,n,r,l){if(yt&&!(t<=e)){for(var c=[],f=0;f<n.length;f++){var h=n[f].value;c.push(["Error",typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h)])}e={start:e,end:t,detail:{devtools:{color:"error",track:Xe,trackGroup:Ge,tooltipText:r?"Remaining Effects Errored":"Commit Errored",properties:c}}},l?l.run(performance.measure.bind(performance,"Errored",e)):performance.measure("Errored",e)}}function Uh(e,t,n){!yt||t<=e||console.timeStamp("Animating",e,t,Xe,Ge,"secondary-dark")}function Vu(){for(var e=Uo,t=lb=Uo=0;t<e;){var n=rs[t];rs[t++]=null;var r=rs[t];rs[t++]=null;var l=rs[t];rs[t++]=null;var c=rs[t];if(rs[t++]=null,r!==null&&l!==null){var f=r.pending;f===null?l.next=l:(l.next=f.next,f.next=l),r.pending=l}c!==0&&Iy(n,l,c)}}function Uu(e,t,n,r){rs[Uo++]=e,rs[Uo++]=t,rs[Uo++]=n,rs[Uo++]=r,lb|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function zh(e,t,n,r){return Uu(e,t,n,r),zu(e)}function dn(e,t){return Uu(e,null,null,t),zu(e)}function Iy(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var l=!1,c=e.return;c!==null;)c.childLanes|=n,r=c.alternate,r!==null&&(r.childLanes|=n),c.tag===22&&(e=c.stateNode,e===null||e._visibility&vc||(l=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,l&&t!==null&&(l=31-yn(n),e=c.hiddenUpdates,r=e[l],r===null?e[l]=[t]:r.push(t),t.lane=n|536870912),c):null}function zu(e){if(Yc>gT)throw Pi=Yc=0,Gc=Hb=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");Pi>vT&&(Pi=0,Gc=null,console.error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")),e.alternate===null&&(e.flags&4098)!==0&&i1(e);for(var t=e,n=t.return;n!==null;)t.alternate===null&&(t.flags&4098)!==0&&i1(e),t=n,n=t.return;return t.tag===3?t.stateNode:null}function hi(e){if(is===null)return e;var t=is(e);return t===void 0?e:t.current}function Bh(e){if(is===null)return e;var t=is(e);return t===void 0?e!=null&&typeof e.render=="function"&&(t=hi(e.render),e.render!==t)?(t={$$typeof:oc,render:t},e.displayName!==void 0&&(t.displayName=e.displayName),t):e:t.current}function Fy(e,t){if(is===null)return!1;var n=e.elementType;t=t.type;var r=!1,l=typeof t=="object"&&t!==null?t.$$typeof:null;switch(e.tag){case 1:typeof t=="function"&&(r=!0);break;case 0:(typeof t=="function"||l===$n)&&(r=!0);break;case 11:(l===oc||l===$n)&&(r=!0);break;case 14:case 15:(l===Vf||l===$n)&&(r=!0);break;default:return!1}return!!(r&&(e=is(n),e!==void 0&&e===is(t)))}function Yy(e){is!==null&&typeof WeakSet=="function"&&(zo===null&&(zo=new WeakSet),zo.add(e))}function Gy(e,t,n){do{var r=e,l=r.alternate,c=r.child,f=r.sibling,h=r.tag;r=r.type;var y=null;switch(h){case 0:case 15:case 1:y=r;break;case 11:y=r.render}if(is===null)throw Error("Expected resolveFamily to be set during hot reload.");var x=!1;if(r=!1,y!==null&&(y=is(y),y!==void 0&&(n.has(y)?r=!0:t.has(y)&&(h===1?r=!0:x=!0))),zo!==null&&(zo.has(e)||l!==null&&zo.has(l))&&(r=!0),r&&(e._debugNeedsRemount=!0),(r||x)&&(l=dn(e,2),l!==null&&At(l,e,2)),c===null||r||Gy(c,t,n),f===null)break;e=f}while(!0)}function E_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,Kx||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function qh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ra(e,t){var n=e.alternate;switch(n===null?(n=D(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n._debugOwner=e._debugOwner,n._debugStack=e._debugStack,n._debugTask=e._debugTask,n._debugHookTypes=e._debugHookTypes,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null,n.actualDuration=-0,n.actualStartTime=-1.1),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n.selfBaseDuration=e.selfBaseDuration,n.treeBaseDuration=e.treeBaseDuration,n._debugInfo=e._debugInfo,n._debugNeedsRemount=e._debugNeedsRemount,n.tag){case 0:case 15:n.type=hi(e.type);break;case 1:n.type=hi(e.type);break;case 11:n.type=Bh(e.type)}return n}function Jy(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},e.selfBaseDuration=n.selfBaseDuration,e.treeBaseDuration=n.treeBaseDuration),e}function Lh(e,t,n,r,l,c){var f=0,h=e;if(typeof e=="function")qh(e)&&(f=1),h=hi(h);else if(typeof e=="string")f=pe(),f=MA(e,n,f)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Mp:return t=D(31,n,t,l),t.elementType=Mp,t.lanes=c,t;case _o:return mi(n.children,l,c,t);case kf:f=8,l|=mn,l|=_s;break;case Cp:return e=n,r=l,typeof e.id!="string"&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id),t=D(12,e,t,r|Ue),t.elementType=Cp,t.lanes=c,t.stateNode={effectDuration:0,passiveEffectDuration:0},t;case Rp:return t=D(13,n,t,l),t.elementType=Rp,t.lanes=c,t;case jp:return t=D(19,n,t,l),t.elementType=jp,t.lanes=c,t;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case la:f=10;break e;case Op:f=9;break e;case oc:f=11,h=Bh(h);break e;case Vf:f=14;break e;case $n:f=16,h=null;break e}h="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(h+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?n="null":Gt(e)?n="array":e!==void 0&&e.$$typeof===oa?(n="<"+(W(e.type)||"Unknown")+" />",h=" Did you accidentally export a JSX literal instead of a component?"):n=typeof e,(f=r?X(r):null)&&(h+=`
|
|
86
|
+
|
|
87
|
+
Check the render method of \``+f+"`."),f=29,n=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(n+"."+h)),h=null}return t=D(f,n,t,l),t.elementType=e,t.type=h,t.lanes=c,t._debugOwner=r,t}function Bu(e,t,n){return t=Lh(e.type,e.key,e.props,e._owner,t,n),t._debugOwner=e._owner,t._debugStack=e._debugStack,t._debugTask=e._debugTask,t}function mi(e,t,n,r){return e=D(7,e,r,t),e.lanes=n,e}function Hh(e,t,n){return e=D(6,e,null,t),e.lanes=n,e}function Xy(e){var t=D(18,null,null,Te);return t.stateNode=e,t}function Ph(e,t,n){return t=D(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zn(e,t){if(typeof e=="object"&&e!==null){var n=cb.get(e);return n!==void 0?n:(t={value:e,source:t,stack:et(t)},cb.set(e,t),t)}return{value:e,source:t,stack:et(t)}}function ja(e,t){dr(),Bo[qo++]=xc,Bo[qo++]=Qf,Qf=e,xc=t}function Qy(e,t,n){dr(),os[ls++]=Pa,os[ls++]=$a,os[ls++]=Di,Di=e;var r=Pa;e=$a;var l=32-yn(r)-1;r&=~(1<<l),n+=1;var c=32-yn(t)+l;if(30<c){var f=l-l%5;c=(r&(1<<f)-1).toString(32),r>>=f,l-=f,Pa=1<<32-yn(t)+l|n<<l|r,$a=c+e}else Pa=1<<c|n<<l|r,$a=e}function $h(e){dr(),e.return!==null&&(ja(e,1),Qy(e,1,0))}function Ih(e){for(;e===Qf;)Qf=Bo[--qo],Bo[qo]=null,xc=Bo[--qo],Bo[qo]=null;for(;e===Di;)Di=os[--ls],os[ls]=null,$a=os[--ls],os[ls]=null,Pa=os[--ls],os[ls]=null}function Zy(){return dr(),Di!==null?{id:Pa,overflow:$a}:null}function Ky(e,t){dr(),os[ls++]=Pa,os[ls++]=$a,os[ls++]=Di,Pa=t.id,$a=t.overflow,Di=e}function dr(){Fe||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function pi(e,t){if(e.return===null){if(Fn===null)Fn={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t};else{if(Fn.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");Fn.distanceFromLeaf>t&&(Fn.distanceFromLeaf=t)}return Fn}var n=pi(e.return,t+1).children;return 0<n.length&&n[n.length-1].fiber===e?(n=n[n.length-1],n.distanceFromLeaf>t&&(n.distanceFromLeaf=t),n):(t={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t},n.push(t),t)}function Wy(){Fe&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function qu(e,t){ma||(e=pi(e,0),e.serverProps=null,t!==null&&(t=R1(t),e.serverTail.push(t)))}function hr(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,n="",r=Fn;throw r!==null&&(Fn=null,n=Th(r)),kl(zn(Error("Hydration failed because the server rendered "+(t?"text":"HTML")+` didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
|
|
88
|
+
|
|
89
|
+
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
90
|
+
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
91
|
+
- Date formatting in a user's locale which doesn't match the server.
|
|
92
|
+
- External changing data without sending a snapshot of it along with the HTML.
|
|
93
|
+
- Invalid HTML tag nesting.
|
|
94
|
+
|
|
95
|
+
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
96
|
+
|
|
97
|
+
https://react.dev/link/hydration-mismatch`+n),e)),ub}function eg(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ln]=e,t[gn]=r,up(n,r),n){case"dialog":Ye("cancel",t),Ye("close",t);break;case"iframe":case"object":case"embed":Ye("load",t);break;case"video":case"audio":for(n=0;n<Jc.length;n++)Ye(Jc[n],t);break;case"source":Ye("error",t);break;case"img":case"image":case"link":Ye("error",t),Ye("load",t);break;case"details":Ye("toggle",t);break;case"input":Hs("input",r),Ye("invalid",t),$s(t,r),oo(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"option":Dl(t,r);break;case"select":Hs("select",r),Ye("invalid",t),Tl(t,r);break;case"textarea":Hs("textarea",r),Ye("invalid",t),N(t,r),E(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||y1(t.textContent,n)?(r.popover!=null&&(Ye("beforetoggle",t),Ye("toggle",t)),r.onScroll!=null&&Ye("scroll",t),r.onScrollEnd!=null&&Ye("scrollend",t),r.onClick!=null&&(t.onclick=Oa),t=!0):t=!1,t||hr(e,!0)}function tg(e){for(cn=e.return;cn;)switch(cn.tag){case 5:case 31:case 13:cs=!1;return;case 27:case 3:cs=!0;return;default:cn=cn.return}}function lo(e){if(e!==cn)return!1;if(!Fe)return tg(e),Fe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||pp(e.type,e.memoizedProps)),n=!n),n&>){for(n=gt;n;){var r=pi(e,0),l=R1(n);r.serverTail.push(l),n=l.type==="Suspense"?vp(n):Pn(n.nextSibling)}hr(e)}if(tg(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");gt=vp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");gt=vp(e)}else t===27?(t=gt,Sr(e.type)?(e=Wb,Wb=null,gt=e):gt=t):gt=cn?Pn(e.stateNode.nextSibling):null;return!0}function bi(){gt=cn=null,ma=Fe=!1}function Fh(){var e=jr;return e!==null&&(En===null?En=e:En.push.apply(En,e),jr=null),e}function kl(e){jr===null?jr=[e]:jr.push(e)}function Yh(){var e=Fn;if(e!==null){Fn=null;for(var t=Th(e);0<e.children.length;)e=e.children[0];be(e.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
|
|
98
|
+
|
|
99
|
+
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
100
|
+
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
101
|
+
- Date formatting in a user's locale which doesn't match the server.
|
|
102
|
+
- External changing data without sending a snapshot of it along with the HTML.
|
|
103
|
+
- Invalid HTML tag nesting.
|
|
104
|
+
|
|
105
|
+
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
106
|
+
|
|
107
|
+
%s%s`,"https://react.dev/link/hydration-mismatch",t)})}}function Lu(){Lo=Zf=null,Ho=!1}function mr(e,t,n){ve(fb,t._currentValue,e),t._currentValue=n,ve(db,t._currentRenderer,e),t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==eN&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=eN}function Ma(e,t){e._currentValue=fb.current;var n=db.current;ie(db,t),e._currentRenderer=n,ie(fb,t)}function Gh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}e!==n&&console.error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function Jh(e,t,n,r){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var c=l.dependencies;if(c!==null){var f=l.child;c=c.firstContext;e:for(;c!==null;){var h=c;c=l;for(var y=0;y<t.length;y++)if(h.context===t[y]){c.lanes|=n,h=c.alternate,h!==null&&(h.lanes|=n),Gh(c.return,n,e),r||(f=null);break e}c=h.next}}else if(l.tag===18){if(f=l.return,f===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");f.lanes|=n,c=f.alternate,c!==null&&(c.lanes|=n),Gh(f,n,e),f=null}else f=l.child;if(f!==null)f.return=l;else for(f=l;f!==null;){if(f===e){f=null;break}if(l=f.sibling,l!==null){l.return=f.return,f=l;break}f=f.return}l=f}}function co(e,t,n,r){e=null;for(var l=t,c=!1;l!==null;){if(!c){if((l.flags&524288)!==0)c=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var f=l.alternate;if(f===null)throw Error("Should have a current fiber. This is a bug in React.");if(f=f.memoizedProps,f!==null){var h=l.type;xn(l.pendingProps.value,f.value)||(e!==null?e.push(h):e=[h])}}else if(l===Uf.current){if(f=l.alternate,f===null)throw Error("Should have a current fiber. This is a bug in React.");f.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Wc):e=[Wc])}l=l.return}e!==null&&Jh(t,e,n,r),t.flags|=262144}function Hu(e){for(e=e.firstContext;e!==null;){if(!xn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function yi(e){Zf=e,Lo=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xt(e){return Ho&&console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."),ng(Zf,e)}function Pu(e,t){return Zf===null&&yi(e),ng(e,t)}function ng(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Lo===null){if(e===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");Lo=t,e.dependencies={lanes:0,firstContext:t,_debugThenableState:null},e.flags|=524288}else Lo=Lo.next=t;return n}function Xh(){return{controller:new rT,data:new Map,refCount:0}}function gi(e){e.controller.signal.aborted&&console.warn("A cache instance was retained after it was already freed. This likely indicates a bug in React."),e.refCount++}function Vl(e){e.refCount--,0>e.refCount&&console.warn("A cache instance was released after it was already freed. This likely indicates a bug in React."),e.refCount===0&&iT(oT,function(){e.controller.abort()})}function Js(e,t,n){(e&127)!==0?0>pa&&(pa=qt(),wc=Kf(t),hb=t,n!=null&&(mb=H(n)),(Ke&(Xt|Jn))!==tn&&(Dt=!0,kr=Nc),e=nc(),t=tc(),e!==Po||t!==Sc?Po=-1.1:t!==null&&(kr=Nc),Oi=e,Sc=t):(e&4194048)!==0&&0>us&&(us=qt(),Ec=Kf(t),tN=t,n!=null&&(nN=H(n)),0>Ga)&&(e=nc(),t=tc(),(e!==Ur||t!==Ri)&&(Ur=-1.1),Vr=e,Ri=t)}function __(e){if(0>pa){pa=qt(),wc=e._debugTask!=null?e._debugTask:null,(Ke&(Xt|Jn))!==tn&&(kr=Nc);var t=nc(),n=tc();t!==Po||n!==Sc?Po=-1.1:n!==null&&(kr=Nc),Oi=t,Sc=n}0>us&&(us=qt(),Ec=e._debugTask!=null?e._debugTask:null,0>Ga)&&(e=nc(),t=tc(),(e!==Ur||t!==Ri)&&(Ur=-1.1),Vr=e,Ri=t)}function ka(){var e=Ti;return Ti=0,e}function $u(e){var t=Ti;return Ti=e,t}function Ul(e){var t=Ti;return Ti+=e,t}function Iu(){Ae=_e=-1.1}function Bn(){var e=_e;return _e=-1.1,e}function qn(e){0<=e&&(_e=e)}function Xs(){var e=wt;return wt=-0,e}function Qs(e){0<=e&&(wt=e)}function Zs(){var e=Nt;return Nt=null,e}function Ks(){var e=Dt;return Dt=!1,e}function Qh(e){Nn=qt(),0>e.actualStartTime&&(e.actualStartTime=Nn)}function Zh(e){if(0<=Nn){var t=qt()-Nn;e.actualDuration+=t,e.selfBaseDuration=t,Nn=-1}}function sg(e){if(0<=Nn){var t=qt()-Nn;e.actualDuration+=t,Nn=-1}}function Ws(){if(0<=Nn){var e=qt(),t=e-Nn;Nn=-1,Ti+=t,wt+=t,Ae=e}}function ag(e){Nt===null&&(Nt=[]),Nt.push(e),Fa===null&&(Fa=[]),Fa.push(e)}function ea(){Nn=qt(),0>_e&&(_e=Nn)}function zl(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function A_(e,t){if(Ac===null){var n=Ac=[];bb=0,ji=ip(),$o={status:"pending",value:void 0,then:function(r){n.push(r)}}}return bb++,t.then(rg,rg),t}function rg(){if(--bb===0&&(-1<us||(Ga=-1.1),Ac!==null)){$o!==null&&($o.status="fulfilled");var e=Ac;Ac=null,ji=0,$o=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function D_(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(r.status="rejected",r.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),r}function Kh(){var e=Mi.current;return e!==null?e:dt.pooledCache}function Fu(e,t){t===null?ve(Mi,Mi.current,e):ve(Mi,t.pool,e)}function ig(){var e=Kh();return e===null?null:{parent:Bt._currentValue,pool:e}}function og(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function lg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function cg(e,t,n){Y.actQueue!==null&&(Y.didUsePromise=!0);var r=e.thenables;if(n=r[n],n===void 0?r.push(t):n!==t&&(e.didWarnAboutUncachedPromise||(e.didWarnAboutUncachedPromise=!0,console.error("A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.")),t.then(Oa,Oa),t=n),t._debugInfo===void 0){e=performance.now(),r=t.displayName;var l={name:typeof r=="string"?r:"Promise",start:e,end:e,value:t};t._debugInfo=[{awaited:l}],t.status!=="fulfilled"&&t.status!=="rejected"&&(e=function(){l.end=performance.now()},t.then(e,e))}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fg(e),e;default:if(typeof t.status=="string")t.then(Oa,Oa);else{if(e=dt,e!==null&&100<e.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");e=t,e.status="pending",e.then(function(c){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=c}},function(c){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=c}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,fg(e),e}throw Vi=t,Mc=!0,Io}}function pr(e){try{return dT(e)}catch(t){throw t!==null&&typeof t=="object"&&typeof t.then=="function"?(Vi=t,Mc=!0,Io):t}}function ug(){if(Vi===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=Vi;return Vi=null,Mc=!1,e}function fg(e){if(e===Io||e===id)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function an(e){var t=ze;return e!=null&&(ze=t===null?e:t.concat(e)),t}function Wh(){var e=ze;if(e!=null){for(var t=e.length-1;0<=t;t--)if(e[t].name!=null){var n=e[t].debugTask;if(n!=null)return n}}return null}function Yu(e,t,n){for(var r=Object.keys(e.props),l=0;l<r.length;l++){var c=r[l];if(c!=="children"&&c!=="key"){t===null&&(t=Bu(e,n.mode,0),t._debugInfo=ze,t.return=n),be(t,function(f){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",f)},c);break}}}function Gu(e){var t=kc;return kc+=1,Fo===null&&(Fo=og()),cg(Fo,e,t)}function Bl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function dg(e,t){throw t.$$typeof===IA?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
108
|
+
- Multiple copies of the "react" package is used.
|
|
109
|
+
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
|
|
110
|
+
- A compiler tries to "inline" JSX instead of using the runtime.`):(e=Object.prototype.toString.call(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead."))}function Ju(e,t){var n=Wh();n!==null?n.run(dg.bind(null,e,t)):dg(e,t)}function hg(e,t){var n=H(e)||"Component";wN[n]||(wN[n]=!0,t=t.displayName||t.name||"Component",e.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
111
|
+
root.render(%s)`,t,t,t):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
112
|
+
<%s>{%s}</%s>`,t,t,n,t,n))}function Xu(e,t){var n=Wh();n!==null?n.run(hg.bind(null,e,t)):hg(e,t)}function mg(e,t){var n=H(e)||"Component";SN[n]||(SN[n]=!0,t=String(t),e.tag===3?console.error(`Symbols are not valid as a React child.
|
|
113
|
+
root.render(%s)`,t):console.error(`Symbols are not valid as a React child.
|
|
114
|
+
<%s>%s</%s>`,n,t,n))}function Qu(e,t){var n=Wh();n!==null?n.run(mg.bind(null,e,t)):mg(e,t)}function pg(e){function t(C,R){if(e){var M=C.deletions;M===null?(C.deletions=[R],C.flags|=16):M.push(R)}}function n(C,R){if(!e)return null;for(;R!==null;)t(C,R),R=R.sibling;return null}function r(C){for(var R=new Map;C!==null;)C.key!==null?R.set(C.key,C):R.set(C.index,C),C=C.sibling;return R}function l(C,R){return C=Ra(C,R),C.index=0,C.sibling=null,C}function c(C,R,M){return C.index=M,e?(M=C.alternate,M!==null?(M=M.index,M<R?(C.flags|=67108866,R):M):(C.flags|=67108866,R)):(C.flags|=1048576,R)}function f(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function h(C,R,M,J){return R===null||R.tag!==6?(R=Hh(M,C.mode,J),R.return=C,R._debugOwner=C,R._debugTask=C._debugTask,R._debugInfo=ze,R):(R=l(R,M),R.return=C,R._debugInfo=ze,R)}function y(C,R,M,J){var fe=M.type;return fe===_o?(R=V(C,R,M.props.children,J,M.key),Yu(M,R,C),R):R!==null&&(R.elementType===fe||Fy(R,M)||typeof fe=="object"&&fe!==null&&fe.$$typeof===$n&&pr(fe)===R.type)?(R=l(R,M.props),Bl(R,M),R.return=C,R._debugOwner=M._owner,R._debugInfo=ze,R):(R=Bu(M,C.mode,J),Bl(R,M),R.return=C,R._debugInfo=ze,R)}function x(C,R,M,J){return R===null||R.tag!==4||R.stateNode.containerInfo!==M.containerInfo||R.stateNode.implementation!==M.implementation?(R=Ph(M,C.mode,J),R.return=C,R._debugInfo=ze,R):(R=l(R,M.children||[]),R.return=C,R._debugInfo=ze,R)}function V(C,R,M,J,fe){return R===null||R.tag!==7?(R=mi(M,C.mode,J,fe),R.return=C,R._debugOwner=C,R._debugTask=C._debugTask,R._debugInfo=ze,R):(R=l(R,M),R.return=C,R._debugInfo=ze,R)}function U(C,R,M){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=Hh(""+R,C.mode,M),R.return=C,R._debugOwner=C,R._debugTask=C._debugTask,R._debugInfo=ze,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case oa:return M=Bu(R,C.mode,M),Bl(M,R),M.return=C,C=an(R._debugInfo),M._debugInfo=ze,ze=C,M;case Eo:return R=Ph(R,C.mode,M),R.return=C,R._debugInfo=ze,R;case $n:var J=an(R._debugInfo);return R=pr(R),C=U(C,R,M),ze=J,C}if(Gt(R)||oe(R))return M=mi(R,C.mode,M,null),M.return=C,M._debugOwner=C,M._debugTask=C._debugTask,C=an(R._debugInfo),M._debugInfo=ze,ze=C,M;if(typeof R.then=="function")return J=an(R._debugInfo),C=U(C,Gu(R),M),ze=J,C;if(R.$$typeof===la)return U(C,Pu(C,R),M);Ju(C,R)}return typeof R=="function"&&Xu(C,R),typeof R=="symbol"&&Qu(C,R),null}function O(C,R,M,J){var fe=R!==null?R.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return fe!==null?null:h(C,R,""+M,J);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case oa:return M.key===fe?(fe=an(M._debugInfo),C=y(C,R,M,J),ze=fe,C):null;case Eo:return M.key===fe?x(C,R,M,J):null;case $n:return fe=an(M._debugInfo),M=pr(M),C=O(C,R,M,J),ze=fe,C}if(Gt(M)||oe(M))return fe!==null?null:(fe=an(M._debugInfo),C=V(C,R,M,J,null),ze=fe,C);if(typeof M.then=="function")return fe=an(M._debugInfo),C=O(C,R,Gu(M),J),ze=fe,C;if(M.$$typeof===la)return O(C,R,Pu(C,M),J);Ju(C,M)}return typeof M=="function"&&Xu(C,M),typeof M=="symbol"&&Qu(C,M),null}function P(C,R,M,J,fe){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return C=C.get(M)||null,h(R,C,""+J,fe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case oa:return M=C.get(J.key===null?M:J.key)||null,C=an(J._debugInfo),R=y(R,M,J,fe),ze=C,R;case Eo:return C=C.get(J.key===null?M:J.key)||null,x(R,C,J,fe);case $n:var Re=an(J._debugInfo);return J=pr(J),R=P(C,R,M,J,fe),ze=Re,R}if(Gt(J)||oe(J))return M=C.get(M)||null,C=an(J._debugInfo),R=V(R,M,J,fe,null),ze=C,R;if(typeof J.then=="function")return Re=an(J._debugInfo),R=P(C,R,M,Gu(J),fe),ze=Re,R;if(J.$$typeof===la)return P(C,R,M,Pu(R,J),fe);Ju(R,J)}return typeof J=="function"&&Xu(R,J),typeof J=="symbol"&&Qu(R,J),null}function ce(C,R,M,J){if(typeof M!="object"||M===null)return J;switch(M.$$typeof){case oa:case Eo:_(C,R,M);var fe=M.key;if(typeof fe!="string")break;if(J===null){J=new Set,J.add(fe);break}if(!J.has(fe)){J.add(fe);break}be(R,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",fe)});break;case $n:M=pr(M),ce(C,R,M,J)}return J}function me(C,R,M,J){for(var fe=null,Re=null,Ee=null,we=R,Ve=R=0,vt=null;we!==null&&Ve<M.length;Ve++){we.index>Ve?(vt=we,we=null):vt=we.sibling;var kt=O(C,we,M[Ve],J);if(kt===null){we===null&&(we=vt);break}fe=ce(C,kt,M[Ve],fe),e&&we&&kt.alternate===null&&t(C,we),R=c(kt,R,Ve),Ee===null?Re=kt:Ee.sibling=kt,Ee=kt,we=vt}if(Ve===M.length)return n(C,we),Fe&&ja(C,Ve),Re;if(we===null){for(;Ve<M.length;Ve++)we=U(C,M[Ve],J),we!==null&&(fe=ce(C,we,M[Ve],fe),R=c(we,R,Ve),Ee===null?Re=we:Ee.sibling=we,Ee=we);return Fe&&ja(C,Ve),Re}for(we=r(we);Ve<M.length;Ve++)vt=P(we,C,Ve,M[Ve],J),vt!==null&&(fe=ce(C,vt,M[Ve],fe),e&&vt.alternate!==null&&we.delete(vt.key===null?Ve:vt.key),R=c(vt,R,Ve),Ee===null?Re=vt:Ee.sibling=vt,Ee=vt);return e&&we.forEach(function(tr){return t(C,tr)}),Fe&&ja(C,Ve),Re}function mt(C,R,M,J){if(M==null)throw Error("An iterable object provided no iterator.");for(var fe=null,Re=null,Ee=R,we=R=0,Ve=null,vt=null,kt=M.next();Ee!==null&&!kt.done;we++,kt=M.next()){Ee.index>we?(Ve=Ee,Ee=null):Ve=Ee.sibling;var tr=O(C,Ee,kt.value,J);if(tr===null){Ee===null&&(Ee=Ve);break}vt=ce(C,tr,kt.value,vt),e&&Ee&&tr.alternate===null&&t(C,Ee),R=c(tr,R,we),Re===null?fe=tr:Re.sibling=tr,Re=tr,Ee=Ve}if(kt.done)return n(C,Ee),Fe&&ja(C,we),fe;if(Ee===null){for(;!kt.done;we++,kt=M.next())Ee=U(C,kt.value,J),Ee!==null&&(vt=ce(C,Ee,kt.value,vt),R=c(Ee,R,we),Re===null?fe=Ee:Re.sibling=Ee,Re=Ee);return Fe&&ja(C,we),fe}for(Ee=r(Ee);!kt.done;we++,kt=M.next())Ve=P(Ee,C,we,kt.value,J),Ve!==null&&(vt=ce(C,Ve,kt.value,vt),e&&Ve.alternate!==null&&Ee.delete(Ve.key===null?we:Ve.key),R=c(Ve,R,we),Re===null?fe=Ve:Re.sibling=Ve,Re=Ve);return e&&Ee.forEach(function(UT){return t(C,UT)}),Fe&&ja(C,we),fe}function Je(C,R,M,J){if(typeof M=="object"&&M!==null&&M.type===_o&&M.key===null&&(Yu(M,null,C),M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case oa:var fe=an(M._debugInfo);e:{for(var Re=M.key;R!==null;){if(R.key===Re){if(Re=M.type,Re===_o){if(R.tag===7){n(C,R.sibling),J=l(R,M.props.children),J.return=C,J._debugOwner=M._owner,J._debugInfo=ze,Yu(M,J,C),C=J;break e}}else if(R.elementType===Re||Fy(R,M)||typeof Re=="object"&&Re!==null&&Re.$$typeof===$n&&pr(Re)===R.type){n(C,R.sibling),J=l(R,M.props),Bl(J,M),J.return=C,J._debugOwner=M._owner,J._debugInfo=ze,C=J;break e}n(C,R);break}else t(C,R);R=R.sibling}M.type===_o?(J=mi(M.props.children,C.mode,J,M.key),J.return=C,J._debugOwner=C,J._debugTask=C._debugTask,J._debugInfo=ze,Yu(M,J,C),C=J):(J=Bu(M,C.mode,J),Bl(J,M),J.return=C,J._debugInfo=ze,C=J)}return C=f(C),ze=fe,C;case Eo:e:{for(fe=M,M=fe.key;R!==null;){if(R.key===M)if(R.tag===4&&R.stateNode.containerInfo===fe.containerInfo&&R.stateNode.implementation===fe.implementation){n(C,R.sibling),J=l(R,fe.children||[]),J.return=C,C=J;break e}else{n(C,R);break}else t(C,R);R=R.sibling}J=Ph(fe,C.mode,J),J.return=C,C=J}return f(C);case $n:return fe=an(M._debugInfo),M=pr(M),C=Je(C,R,M,J),ze=fe,C}if(Gt(M))return fe=an(M._debugInfo),C=me(C,R,M,J),ze=fe,C;if(oe(M)){if(fe=an(M._debugInfo),Re=oe(M),typeof Re!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Ee=Re.call(M);return Ee===M?(C.tag!==0||Object.prototype.toString.call(C.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Ee)!=="[object Generator]")&&(xN||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),xN=!0):M.entries!==Re||xb||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),xb=!0),C=mt(C,R,Ee,J),ze=fe,C}if(typeof M.then=="function")return fe=an(M._debugInfo),C=Je(C,R,Gu(M),J),ze=fe,C;if(M.$$typeof===la)return Je(C,R,Pu(C,M),J);Ju(C,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(fe=""+M,R!==null&&R.tag===6?(n(C,R.sibling),J=l(R,fe),J.return=C,C=J):(n(C,R),J=Hh(fe,C.mode,J),J.return=C,J._debugOwner=C,J._debugTask=C._debugTask,J._debugInfo=ze,C=J),f(C)):(typeof M=="function"&&Xu(C,M),typeof M=="symbol"&&Qu(C,M),n(C,R))}return function(C,R,M,J){var fe=ze;ze=null;try{kc=0;var Re=Je(C,R,M,J);return Fo=null,Re}catch(vt){if(vt===Io||vt===id)throw vt;var Ee=D(29,vt,null,C.mode);Ee.lanes=J,Ee.return=C;var we=Ee._debugInfo=ze;if(Ee._debugOwner=C._debugOwner,Ee._debugTask=C._debugTask,we!=null){for(var Ve=we.length-1;0<=Ve;Ve--)if(typeof we[Ve].stack=="string"){Ee._debugOwner=we[Ve],Ee._debugTask=we[Ve].debugTask;break}}return Ee}finally{ze=fe}}}function bg(e,t){var n=Gt(e);return e=!n&&typeof oe(e)=="function",n||e?(n=n?"array":"iterable",console.error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",n,t,n),!1):!0}function em(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function br(e){return{lane:e,tag:_N,payload:null,callback:null,next:null}}function yr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,wb===r&&!TN){var l=H(e);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
|
|
115
|
+
|
|
116
|
+
Please update the following component: %s`,l),TN=!0}return(Ke&Xt)!==tn?(l=r.pending,l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,t=zu(e),Iy(e,null,n),t):(Uu(e,r,t,n),zu(e))}function ql(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Au(e,n)}}function Zu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var f={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?l=c=f:c=c.next=f,n=n.next}while(n!==null);c===null?l=c=t:c=c.next=t}else l=c=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:c,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ll(){if(Sb){var e=$o;if(e!==null)throw e}}function Hl(e,t,n,r){Sb=!1;var l=e.updateQueue;zr=!1,wb=l.shared;var c=l.firstBaseUpdate,f=l.lastBaseUpdate,h=l.shared.pending;if(h!==null){l.shared.pending=null;var y=h,x=y.next;y.next=null,f===null?c=x:f.next=x,f=y;var V=e.alternate;V!==null&&(V=V.updateQueue,h=V.lastBaseUpdate,h!==f&&(h===null?V.firstBaseUpdate=x:h.next=x,V.lastBaseUpdate=y))}if(c!==null){var U=l.baseState;f=0,V=x=y=null,h=c;do{var O=h.lane&-536870913,P=O!==h.lane;if(P?(Be&O)===O:(r&O)===O){O!==0&&O===ji&&(Sb=!0),V!==null&&(V=V.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{O=e;var ce=h,me=t,mt=n;switch(ce.tag){case AN:if(ce=ce.payload,typeof ce=="function"){Ho=!0;var Je=ce.call(mt,U,me);if(O.mode&mn){bt(!0);try{ce.call(mt,U,me)}finally{bt(!1)}}Ho=!1,U=Je;break e}U=ce;break e;case Nb:O.flags=O.flags&-65537|128;case _N:if(Je=ce.payload,typeof Je=="function"){if(Ho=!0,ce=Je.call(mt,U,me),O.mode&mn){bt(!0);try{Je.call(mt,U,me)}finally{bt(!1)}}Ho=!1}else ce=Je;if(ce==null)break e;U=Ie({},U,ce);break e;case DN:zr=!0}}O=h.callback,O!==null&&(e.flags|=64,P&&(e.flags|=8192),P=l.callbacks,P===null?l.callbacks=[O]:P.push(O))}else P={lane:O,tag:h.tag,payload:h.payload,callback:h.callback,next:null},V===null?(x=V=P,y=U):V=V.next=P,f|=O;if(h=h.next,h===null){if(h=l.shared.pending,h===null)break;P=h,h=P.next,P.next=null,l.lastBaseUpdate=P,l.shared.pending=null}}while(!0);V===null&&(y=U),l.baseState=y,l.firstBaseUpdate=x,l.lastBaseUpdate=V,c===null&&(l.shared.lanes=0),Lr|=f,e.lanes=f,e.memoizedState=U}wb=null}function yg(e,t){if(typeof e!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(t)}function T_(e,t){var n=e.shared.hiddenCallbacks;if(n!==null)for(e.shared.hiddenCallbacks=null,e=0;e<n.length;e++)yg(n[e],t)}function gg(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)yg(n[e],t)}function vg(e,t){var n=ya;ve(ld,n,e),ve(Yo,t,e),ya=n|t.baseLanes}function nm(e){ve(ld,ya,e),ve(Yo,Yo.current,e)}function sm(e){ya=ld.current,ie(Yo,e),ie(ld,e)}function gr(e){var t=e.alternate;ve(Mt,Mt.current&Go,e),ve(Yn,e,e),fs===null&&(t===null||Yo.current!==null||t.memoizedState!==null)&&(fs=e)}function am(e){ve(Mt,Mt.current,e),ve(Yn,e,e),fs===null&&(fs=e)}function xg(e){e.tag===22?(ve(Mt,Mt.current,e),ve(Yn,e,e),fs===null&&(fs=e)):vr(e)}function vr(e){ve(Mt,Mt.current,e),ve(Yn,Yn.current,e)}function Ln(e){ie(Yn,e),fs===e&&(fs=null),ie(Mt,e)}function Ku(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||yp(n)||gp(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function $e(){var e=I;hs===null?hs=[e]:hs.push(e)}function re(){var e=I;if(hs!==null&&(Qa++,hs[Qa]!==e)){var t=H(Oe);if(!CN.has(t)&&(CN.add(t),hs!==null)){for(var n="",r=0;r<=Qa;r++){var l=hs[r],c=r===Qa?e:l;for(l=r+1+". "+l;30>l.length;)l+=" ";l+=c+`
|
|
117
|
+
`,n+=l}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
|
|
118
|
+
|
|
119
|
+
Previous render Next render
|
|
120
|
+
------------------------------------------------------
|
|
121
|
+
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
122
|
+
`,t,n)}}}function uo(e){e==null||Gt(e)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",I,typeof e)}function Wu(){var e=H(Oe);RN.has(e)||(RN.add(e),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",e))}function Ct(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
123
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
124
|
+
2. You might be breaking the Rules of Hooks
|
|
125
|
+
3. You might have more than one copy of React in the same app
|
|
126
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function rm(e,t){if(zc)return!1;if(t===null)return console.error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",I),!1;e.length!==t.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
127
|
+
|
|
128
|
+
Previous: %s
|
|
129
|
+
Incoming: %s`,I,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var n=0;n<t.length&&n<e.length;n++)if(!xn(e[n],t[n]))return!1;return!0}function im(e,t,n,r,l,c){Ja=c,Oe=t,hs=e!==null?e._debugHookTypes:null,Qa=-1,zc=e!==null&&e.type!==t.type,(Object.prototype.toString.call(n)==="[object AsyncFunction]"||Object.prototype.toString.call(n)==="[object AsyncGeneratorFunction]")&&(c=H(Oe),Eb.has(c)||(Eb.add(c),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",c===null?"An unknown Component":"<"+c+">"))),t.memoizedState=null,t.updateQueue=null,t.lanes=0,Y.H=e!==null&&e.memoizedState!==null?Ab:hs!==null?jN:_b,zi=c=(t.mode&mn)!==Te;var f=yb(n,r,l);if(zi=!1,Xo&&(f=om(t,n,r,l)),c){bt(!0);try{f=om(t,n,r,l)}finally{bt(!1)}}return Ng(e,t),f}function Ng(e,t){t._debugHookTypes=hs,t.dependencies===null?Xa!==null&&(t.dependencies={lanes:0,firstContext:null,_debugThenableState:Xa}):t.dependencies._debugThenableState=Xa,Y.H=Bc;var n=ft!==null&&ft.next!==null;if(Ja=0,hs=I=Lt=ft=Oe=null,Qa=-1,e!==null&&(e.flags&65011712)!==(t.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),ud=!1,Uc=0,Xa=null,n)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||Ht||(e=e.dependencies,e!==null&&Hu(e)&&(Ht=!0)),Mc?(Mc=!1,e=!0):e=!1,e&&(t=H(t)||"Unknown",ON.has(t)||Eb.has(t)||(ON.add(t),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function om(e,t,n,r){Oe=e;var l=0;do{if(Xo&&(Xa=null),Uc=0,Xo=!1,l>=mT)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(l+=1,zc=!1,Lt=ft=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}Qa=-1,Y.H=MN,c=yb(t,n,r)}while(Xo);return c}function C_(){var e=Y.H,t=e.useState()[0];return t=typeof t.then=="function"?Pl(t):t,e=e.useState()[0],(ft!==null?ft.memoizedState:null)!==e&&(Oe.flags|=1024),t}function lm(){var e=fd!==0;return fd=0,e}function cm(e,t,n){t.updateQueue=e.updateQueue,t.flags=(t.mode&_s)!==Te?t.flags&-402655237:t.flags&-2053,e.lanes&=~n}function um(e){if(ud){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ud=!1}Ja=0,hs=Lt=ft=Oe=null,Qa=-1,I=null,Xo=!1,Uc=fd=0,Xa=null}function bn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?Oe.memoizedState=Lt=e:Lt=Lt.next=e,Lt}function ot(){if(ft===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var t=Lt===null?Oe.memoizedState:Lt.next;if(t!==null)Lt=t,ft=e;else{if(e===null)throw Oe.alternate===null?Error("Update hook called on initial render. This is likely a bug in React. Please file an issue."):Error("Rendered more hooks than during the previous render.");ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},Lt===null?Oe.memoizedState=Lt=e:Lt=Lt.next=e}return Lt}function ef(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pl(e){var t=Uc;return Uc+=1,Xa===null&&(Xa=og()),e=cg(Xa,e,t),t=Oe,(Lt===null?t.memoizedState:Lt.next)===null&&(t=t.alternate,Y.H=t!==null&&t.memoizedState!==null?Ab:_b),e}function xr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Pl(e);if(e.$$typeof===la)return xt(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function vi(e){var t=null,n=Oe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Oe.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=ef(),Oe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0||zc)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=FA;else n.length!==e&&console.error("Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",n.length,e);return t.index++,n}function ws(e,t){return typeof t=="function"?t(e):t}function fm(e,t,n){var r=bn();if(n!==void 0){var l=n(t);if(zi){bt(!0);try{n(t)}finally{bt(!1)}}}else l=t;return r.memoizedState=r.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},r.queue=e,e=e.dispatch=k_.bind(null,Oe,e),[r.memoizedState,e]}function fo(e){var t=ot();return dm(t,ft,e)}function dm(e,t,n){var r=e.queue;if(r===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");r.lastRenderedReducer=n;var l=e.baseQueue,c=r.pending;if(c!==null){if(l!==null){var f=l.next;l.next=c.next,c.next=f}t.baseQueue!==l&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),t.baseQueue=l=c,r.pending=null}if(c=e.baseState,l===null)e.memoizedState=c;else{t=l.next;var h=f=null,y=null,x=t,V=!1;do{var U=x.lane&-536870913;if(U!==x.lane?(Be&U)===U:(Ja&U)===U){var O=x.revertLane;if(O===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null}),U===ji&&(V=!0);else if((Ja&O)===O){x=x.next,O===ji&&(V=!0);continue}else U={lane:0,revertLane:x.revertLane,gesture:null,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null},y===null?(h=y=U,f=c):y=y.next=U,Oe.lanes|=O,Lr|=O;U=x.action,zi&&n(c,U),c=x.hasEagerState?x.eagerState:n(c,U)}else O={lane:U,revertLane:x.revertLane,gesture:x.gesture,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null},y===null?(h=y=O,f=c):y=y.next=O,Oe.lanes|=U,Lr|=U;x=x.next}while(x!==null&&x!==t);if(y===null?f=c:y.next=h,!xn(c,e.memoizedState)&&(Ht=!0,V&&(n=$o,n!==null)))throw n;e.memoizedState=c,e.baseState=f,e.baseQueue=y,r.lastRenderedState=c}return l===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function $l(e){var t=ot(),n=t.queue;if(n===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");n.lastRenderedReducer=e;var r=n.dispatch,l=n.pending,c=t.memoizedState;if(l!==null){n.pending=null;var f=l=l.next;do c=e(c,f.action),f=f.next;while(f!==l);xn(c,t.memoizedState)||(Ht=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,r]}function hm(e,t,n){var r=Oe,l=bn();if(Fe){if(n===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var c=n();Jo||c===n()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),Jo=!0)}else{if(c=t(),Jo||(n=t(),xn(c,n)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Jo=!0)),dt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(Be&127)!==0||wg(r,t,c)}return l.memoizedState=c,n={value:c,getSnapshot:t},l.queue=n,af(Eg.bind(null,r,n,e),[e]),r.flags|=2048,mo(ds|Sn,{destroy:void 0},Sg.bind(null,r,n,c,t),null),c}function tf(e,t,n){var r=Oe,l=ot(),c=Fe;if(c){if(n===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");n=n()}else if(n=t(),!Jo){var f=t();xn(n,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),Jo=!0)}(f=!xn((ft||l).memoizedState,n))&&(l.memoizedState=n,Ht=!0),l=l.queue;var h=Eg.bind(null,r,l,e);if(On(2048,Sn,h,[e]),l.getSnapshot!==t||f||Lt!==null&&Lt.memoizedState.tag&ds){if(r.flags|=2048,mo(ds|Sn,{destroy:void 0},Sg.bind(null,r,l,n,t),null),dt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");c||(Ja&127)!==0||wg(r,t,n)}return n}function wg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Oe.updateQueue,t===null?(t=ef(),Oe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Sg(e,t,n,r){t.value=n,t.getSnapshot=r,_g(t)&&Ag(e)}function Eg(e,t,n){return n(function(){_g(t)&&(Js(2,"updateSyncExternalStore()",e),Ag(e))})}function _g(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xn(e,n)}catch{return!0}}function Ag(e){var t=dn(e,2);t!==null&&At(t,e,2)}function mm(e){var t=bn();if(typeof e=="function"){var n=e;if(e=n(),zi){bt(!0);try{n()}finally{bt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ws,lastRenderedState:e},t}function pm(e){e=mm(e);var t=e.queue,n=Fg.bind(null,Oe,t);return t.dispatch=n,[e.memoizedState,n]}function bm(e){var t=bn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Om.bind(null,Oe,!0,n),n.dispatch=t,[e,t]}function Dg(e,t){var n=ot();return Tg(n,ft,e,t)}function Tg(e,t,n,r){return e.baseState=n,dm(e,ft,typeof r=="function"?r:ws)}function Cg(e,t){var n=ot();return ft!==null?Tg(n,ft,e,t):(n.baseState=e,[e,n.queue.dispatch])}function O_(e,t,n,r,l){if(ff(e))throw Error("Cannot update form state while rendering.");if(e=t.action,e!==null){var c={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){c.listeners.push(f)}};Y.T!==null?n(!0):c.isTransition=!1,r(c),n=t.pending,n===null?(c.next=t.pending=c,Og(t,c)):(c.next=n.next,t.pending=n.next=c)}}function Og(e,t){var n=t.action,r=t.payload,l=e.state;if(t.isTransition){var c=Y.T,f={};f._updatedFibers=new Set,Y.T=f;try{var h=n(l,r),y=Y.S;y!==null&&y(f,h),Rg(e,t,h)}catch(x){ym(e,t,x)}finally{c!==null&&f.types!==null&&(c.types!==null&&c.types!==f.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),c.types=f.types),Y.T=c,c===null&&f._updatedFibers&&(e=f._updatedFibers.size,f._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}else try{f=n(l,r),Rg(e,t,f)}catch(x){ym(e,t,x)}}function Rg(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?(Y.asyncTransitions++,n.then(uf,uf),n.then(function(r){jg(e,t,r)},function(r){return ym(e,t,r)}),t.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):jg(e,t,n)}function jg(e,t,n){t.status="fulfilled",t.value=n,Mg(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Og(e,n)))}function ym(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,Mg(t),t=t.next;while(t!==r)}e.action=null}function Mg(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function kg(e,t){return t}function ho(e,t){if(Fe){var n=dt.formState;if(n!==null){e:{var r=Oe;if(Fe){if(gt){t:{for(var l=gt,c=cs;l.nodeType!==8;){if(!c){l=null;break t}if(l=Pn(l.nextSibling),l===null){l=null;break t}}c=l.data,l=c===Xb||c===gw?l:null}if(l){gt=Pn(l.nextSibling),r=l.data===Xb;break e}}hr(r)}r=!1}r&&(t=n[0])}}return n=bn(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kg,lastRenderedState:t},n.queue=r,n=Fg.bind(null,Oe,r),r.dispatch=n,r=mm(!1),c=Om.bind(null,Oe,!1,r.queue),r=bn(),l={state:t,dispatch:null,action:e,pending:null},r.queue=l,n=O_.bind(null,Oe,l,c,n),l.dispatch=n,r.memoizedState=e,[t,n,!1]}function nf(e){var t=ot();return Vg(t,ft,e)}function Vg(e,t,n){if(t=dm(e,t,kg)[0],e=fo(ws)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Pl(t)}catch(f){throw f===Io?id:f}else r=t;t=ot();var l=t.queue,c=l.dispatch;return n!==t.memoizedState&&(Oe.flags|=2048,mo(ds|Sn,{destroy:void 0},R_.bind(null,l,n),null)),[r,c,e]}function R_(e,t){e.action=t}function sf(e){var t=ot(),n=ft;if(n!==null)return Vg(t,n,e);ot(),t=t.memoizedState,n=ot();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function mo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Oe.updateQueue,t===null&&(t=ef(),Oe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function gm(e){var t=bn();return e={current:e},t.memoizedState=e}function xi(e,t,n,r){var l=bn();Oe.flags|=e,l.memoizedState=mo(ds|t,{destroy:void 0},n,r===void 0?null:r)}function On(e,t,n,r){var l=ot();r=r===void 0?null:r;var c=l.memoizedState.inst;ft!==null&&r!==null&&rm(r,ft.memoizedState.deps)?l.memoizedState=mo(t,c,n,r):(Oe.flags|=e,l.memoizedState=mo(ds|t,c,n,r))}function af(e,t){(Oe.mode&_s)!==Te?xi(276826112,Sn,e,t):xi(8390656,Sn,e,t)}function j_(e){Oe.flags|=4;var t=Oe.updateQueue;if(t===null)t=ef(),Oe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function vm(e){var t=bn(),n={impl:e};return t.memoizedState=n,function(){if((Ke&Xt)!==tn)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return n.impl.apply(void 0,arguments)}}function rf(e){var t=ot().memoizedState;return j_({ref:t,nextImpl:e}),function(){if((Ke&Xt)!==tn)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return t.impl.apply(void 0,arguments)}}function xm(e,t){var n=4194308;return(Oe.mode&_s)!==Te&&(n|=134217728),xi(n,Gn,e,t)}function Ug(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return t.hasOwnProperty("current")||console.error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(t).join(", ")+"}"),e=e(),t.current=e,function(){t.current=null}}function Nm(e,t,n){typeof t!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null"),n=n!=null?n.concat([e]):null;var r=4194308;(Oe.mode&_s)!==Te&&(r|=134217728),xi(r,Gn,Ug.bind(null,t,e),n)}function of(e,t,n){typeof t!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null"),n=n!=null?n.concat([e]):null,On(4,Gn,Ug.bind(null,t,e),n)}function wm(e,t){return bn().memoizedState=[e,t===void 0?null:t],e}function lf(e,t){var n=ot();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&rm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Sm(e,t){var n=bn();t=t===void 0?null:t;var r=e();if(zi){bt(!0);try{e()}finally{bt(!1)}}return n.memoizedState=[r,t],r}function cf(e,t){var n=ot();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&rm(t,r[1]))return r[0];if(r=e(),zi){bt(!0);try{e()}finally{bt(!1)}}return n.memoizedState=[r,t],r}function Em(e,t){var n=bn();return _m(n,e,t)}function zg(e,t){var n=ot();return qg(n,ft.memoizedState,e,t)}function Bg(e,t){var n=ot();return ft===null?_m(n,e,t):qg(n,ft.memoizedState,e,t)}function _m(e,t,n){return n===void 0||(Ja&1073741824)!==0&&(Be&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Lv(),Oe.lanes|=e,Lr|=e,n)}function qg(e,t,n,r){return xn(n,t)?n:Yo.current!==null?(e=_m(e,n,r),xn(e,t)||(Ht=!0),e):(Ja&42)===0||(Ja&1073741824)!==0&&(Be&261930)===0?(Ht=!0,e.memoizedState=n):(e=Lv(),Oe.lanes|=e,Lr|=e,t)}function uf(){Y.asyncTransitions--}function Lg(e,t,n,r,l){var c=rt.p;rt.p=c!==0&&c<da?c:da;var f=Y.T,h={};h._updatedFibers=new Set,Y.T=h,Om(e,!1,t,n);try{var y=l(),x=Y.S;if(x!==null&&x(h,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){Y.asyncTransitions++,y.then(uf,uf);var V=D_(y,r);Il(e,t,V,Hn(e))}else Il(e,t,r,Hn(e))}catch(U){Il(e,t,{then:function(){},status:"rejected",reason:U},Hn(e))}finally{rt.p=c,f!==null&&h.types!==null&&(f.types!==null&&f.types!==h.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),f.types=h.types),Y.T=f,f===null&&h._updatedFibers&&(e=h._updatedFibers.size,h._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."))}}function Am(e,t,n,r){if(e.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var l=Hg(e).queue;__(e),Lg(e,l,t,Ji,n===null?v:function(){return Pg(e),n(r)})}function Hg(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ji,baseState:Ji,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ws,lastRenderedState:Ji},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ws,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Pg(e){Y.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var t=Hg(e);t.next===null&&(t=e.alternate.memoizedState),Il(e,t.next.queue,{},Hn(e))}function Dm(){var e=mm(!1);return e=Lg.bind(null,Oe,e.queue,!0,!1),bn().memoizedState=e,[!1,e]}function $g(){var e=fo(ws)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Pl(e),t]}function Ig(){var e=$l(ws)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Pl(e),t]}function Ni(){return xt(Wc)}function Tm(){var e=bn(),t=dt.identifierPrefix;if(Fe){var n=$a,r=Pa;n=(r&~(1<<32-yn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=fd++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=hT++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t}function Cm(){return bn().memoizedState=M_.bind(null,Oe)}function M_(e,t){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var r=Hn(n),l=br(r),c=yr(n,l,r);c!==null&&(Js(r,"refresh()",e),At(c,n,r),ql(c,n,r)),e=Xh(),t!=null&&c!==null&&console.error("The seed argument is not enabled outside experimental channels."),l.payload={cache:e};return}n=n.return}}function k_(e,t,n){var r=arguments;typeof r[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),r=Hn(e);var l={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};ff(e)?Yg(t,l):(l=zh(e,t,l,r),l!==null&&(Js(r,"dispatch()",e),At(l,e,r),Gg(l,t,r)))}function Fg(e,t,n){var r=arguments;typeof r[3]=="function"&&console.error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect()."),r=Hn(e),Il(e,t,n,r)&&Js(r,"setState()",e)}function Il(e,t,n,r){var l={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ff(e))Yg(t,l);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null)){var f=Y.H;Y.H=Ds;try{var h=t.lastRenderedState,y=c(h,n);if(l.hasEagerState=!0,l.eagerState=y,xn(y,h))return Uu(e,t,l,0),dt===null&&Vu(),!1}catch{}finally{Y.H=f}}if(n=zh(e,t,l,r),n!==null)return At(n,e,r),Gg(n,t,r),!0}return!1}function Om(e,t,n,r){if(Y.T===null&&ji===0&&console.error("An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."),r={lane:2,revertLane:ip(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ff(e)){if(t)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else t=zh(e,n,r,2),t!==null&&(Js(2,"setOptimistic()",e),At(t,e,2))}function ff(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function Yg(e,t){Xo=ud=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Gg(e,t,n){if((n&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Au(e,n)}}function Rm(e){if(e!==null&&typeof e!="function"){var t=String(e);IN.has(t)||(IN.add(t),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function jm(e,t,n,r){var l=e.memoizedState,c=n(r,l);if(e.mode&mn){bt(!0);try{c=n(r,l)}finally{bt(!1)}}c===void 0&&(t=W(t)||"Component",LN.has(t)||(LN.add(t),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",t))),l=c==null?l:Ie({},l,c),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}function Jg(e,t,n,r,l,c,f){var h=e.stateNode;if(typeof h.shouldComponentUpdate=="function"){if(n=h.shouldComponentUpdate(r,c,f),e.mode&mn){bt(!0);try{n=h.shouldComponentUpdate(r,c,f)}finally{bt(!1)}}return n===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",W(t)||"Component"),n}return t.prototype&&t.prototype.isPureReactComponent?!Ml(n,r)||!Ml(l,c):!0}function Xg(e,t,n,r){var l=t.state;typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==l&&(e=H(e)||"Component",VN.has(e)||(VN.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),Db.enqueueReplaceState(t,t.state,null))}function wi(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=Ie({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function Qg(e){ab(e),console.warn(`%s
|
|
130
|
+
|
|
131
|
+
%s
|
|
132
|
+
`,Qo?"An error occurred in the <"+Qo+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
133
|
+
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function Zg(e){var t=Qo?"The above error occurred in the <"+Qo+"> component.":"The above error occurred in one of your React components.",n="React will try to recreate this component tree from scratch using the error boundary you provided, "+((Tb||"Anonymous")+".");if(typeof e=="object"&&e!==null&&typeof e.environmentName=="string"){var r=e.environmentName;e=[`%o
|
|
134
|
+
|
|
135
|
+
%s
|
|
136
|
+
|
|
137
|
+
%s
|
|
138
|
+
`,e,t,n].slice(0),typeof e[0]=="string"?e.splice(0,1,Aw+" "+e[0],Dw,Ud+r+Ud,Tw):e.splice(0,0,Aw,Dw,Ud+r+Ud,Tw),e.unshift(console),r=kT.apply(console.error,e),r()}else console.error(`%o
|
|
139
|
+
|
|
140
|
+
%s
|
|
141
|
+
|
|
142
|
+
%s
|
|
143
|
+
`,e,t,n)}function Kg(e){ab(e)}function df(e,t){try{Qo=t.source?H(t.source):null,Tb=null;var n=t.value;if(Y.actQueue!==null)Y.thrownErrors.push(n);else{var r=e.onUncaughtError;r(n,{componentStack:t.stack})}}catch(l){setTimeout(function(){throw l})}}function Wg(e,t,n){try{Qo=n.source?H(n.source):null,Tb=H(t);var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function Mm(e,t,n){return n=br(n),n.tag=Nb,n.payload={element:null},n.callback=function(){be(t.source,df,e,t)},n}function km(e){return e=br(e),e.tag=Nb,e}function Vm(e,t,n,r){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var c=r.value;e.payload=function(){return l(c)},e.callback=function(){Yy(n),be(r.source,Wg,t,n,r)}}var f=n.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Yy(n),be(r.source,Wg,t,n,r),typeof l!="function"&&(Pr===null?Pr=new Set([this]):Pr.add(this)),cT(this,r),typeof l=="function"||(n.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",H(n)||"Unknown")})}function V_(e,t,n,r,l){if(n.flags|=32768,fa&&Kl(e,l),r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&co(t,n,l,!0),Fe&&(ma=!0),n=Yn.current,n!==null){switch(n.tag){case 31:case 13:return fs===null?Nf():n.alternate===null&&St===Ka&&(St=md),n.flags&=-257,n.flags|=65536,n.lanes=l,r===od?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),np(e,r,l)),!1;case 22:return n.flags|=65536,r===od?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),np(e,r,l)),!1}throw Error("Unexpected Suspense handler tag ("+n.tag+"). This is a bug in React.")}return np(e,r,l),Nf(),!1}if(Fe)return ma=!0,t=Yn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,r!==ub&&kl(zn(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:r}),n))):(r!==ub&&kl(zn(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:r}),n)),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,r=zn(r,n),l=Mm(e.stateNode,r,l),Zu(e,l),St!==Br&&(St=Bi)),!1;var c=zn(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:r}),n);if(Ic===null?Ic=[c]:Ic.push(c),St!==Br&&(St=Bi),t===null)return!0;r=zn(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=Mm(n.stateNode,r,e),Zu(n,e),!1;case 1:if(t=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Pr===null||!Pr.has(c))))return n.flags|=65536,l&=-l,n.lanes|=l,l=km(l),Vm(l,e,n,r),Zu(n,l),!1}n=n.return}while(n!==null);return!1}function rn(e,t,n,r){t.child=e===null?EN(t,null,n,r):Ui(t,e.child,n,r)}function ev(e,t,n,r,l){n=n.render;var c=t.ref;if("ref"in r){var f={};for(var h in r)h!=="ref"&&(f[h]=r[h])}else f=r;return yi(t),r=im(e,t,n,f,c,l),h=lm(),e!==null&&!Ht?(cm(e,t,l),Va(e,t,l)):(Fe&&h&&$h(t),t.flags|=1,rn(e,t,r,l),t.child)}function tv(e,t,n,r,l){if(e===null){var c=n.type;return typeof c=="function"&&!qh(c)&&c.defaultProps===void 0&&n.compare===null?(n=hi(c),t.tag=15,t.type=n,zm(t,c),nv(e,t,n,r,l)):(e=Lh(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!$m(e,l)){var f=c.memoizedProps;if(n=n.compare,n=n!==null?n:Ml,n(f,r)&&e.ref===t.ref)return Va(e,t,l)}return t.flags|=1,e=Ra(c,r),e.ref=t.ref,e.return=t,t.child=e}function nv(e,t,n,r,l){if(e!==null){var c=e.memoizedProps;if(Ml(c,r)&&e.ref===t.ref&&t.type===e.type)if(Ht=!1,t.pendingProps=r=c,$m(e,l))(e.flags&131072)!==0&&(Ht=!0);else return t.lanes=e.lanes,Va(e,t,l)}return Um(e,t,n,r,l)}function sv(e,t,n,r){var l=r.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:vc,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,e!==null){for(r=t.child=e.child,l=0;r!==null;)l=l|r.lanes|r.childLanes,r=r.sibling;r=l&~c}else r=0,t.child=null;return av(e,t,c,n,r)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Fu(t,c!==null?c.cachePool:null),c!==null?vg(t,c):nm(t),xg(t);else return r=t.lanes=536870912,av(e,t,c!==null?c.baseLanes|n:n,n,r)}else c!==null?(Fu(t,c.cachePool),vg(t,c),vr(t),t.memoizedState=null):(e!==null&&Fu(t,null),nm(t),vr(t));return rn(e,t,l,n),t.child}function Fl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:vc,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function av(e,t,n,r,l){var c=Kh();return c=c===null?null:{parent:Bt._currentValue,pool:c},t.memoizedState={baseLanes:n,cachePool:c},e!==null&&Fu(t,null),nm(t),xg(t),e!==null&&co(e,t,r,!0),t.childLanes=l,null}function hf(e,t){var n=t.hidden;return n!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
|
|
144
|
+
- <Activity %s>
|
|
145
|
+
+ <Activity %s>`,n===!0?"hidden":n===!1?"hidden={false}":"hidden={...}",n?'mode="hidden"':'mode="visible"'),t=pf({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function rv(e,t,n){return Ui(t,e.child,null,n),e=hf(t,t.pendingProps),e.flags|=2,Ln(t),t.memoizedState=null,e}function U_(e,t,n){var r=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Fe){if(r.mode==="hidden")return e=hf(t,r),t.lanes=536870912,Fl(null,e);if(am(t),(e=gt)?(n=O1(e,cs),n=n!==null&&n.data===Ii?n:null,n!==null&&(r={dehydrated:n,treeContext:Zy(),retryLane:536870912,hydrationErrors:null},t.memoizedState=r,r=Xy(n),r.return=t,t.child=r,cn=t,gt=null)):n=null,n===null)throw qu(t,e),hr(t);return t.lanes=536870912,null}return hf(t,r)}var c=e.memoizedState;if(c!==null){var f=c.dehydrated;if(am(t),l)if(t.flags&256)t.flags&=-257,t=rv(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error("Client rendering an Activity suspended it again. This is a bug in React.");else if(Wy(),(n&536870912)!==0&&xf(t),Ht||co(e,t,n,!1),l=(n&e.childLanes)!==0,Ht||l){if(r=dt,r!==null&&(f=El(r,n),f!==0&&f!==c.retryLane))throw c.retryLane=f,dn(e,f),At(r,e,f),Cb;Nf(),t=rv(e,t,n)}else e=c.treeContext,gt=Pn(f.nextSibling),cn=t,Fe=!0,jr=null,ma=!1,Fn=null,cs=!1,e!==null&&Ky(t,e),t=hf(t,r),t.flags|=4096;return t}return c=e.child,r={mode:r.mode,children:r.children},(n&536870912)!==0&&(n&e.lanes)!==0&&xf(t),e=Ra(c,r),e.ref=t.ref,t.child=e,e.return=t,e}function mf(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Um(e,t,n,r,l){if(n.prototype&&typeof n.prototype.render=="function"){var c=W(n)||"Unknown";FN[c]||(console.error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",c,c),FN[c]=!0)}return t.mode&mn&&As.recordLegacyContextWarning(t,null),e===null&&(zm(t,t.type),n.contextTypes&&(c=W(n)||"Unknown",GN[c]||(GN[c]=!0,console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)",c)))),yi(t),n=im(e,t,n,r,void 0,l),r=lm(),e!==null&&!Ht?(cm(e,t,l),Va(e,t,l)):(Fe&&r&&$h(t),t.flags|=1,rn(e,t,n,l),t.child)}function iv(e,t,n,r,l,c){return yi(t),Qa=-1,zc=e!==null&&e.type!==t.type,t.updateQueue=null,n=om(t,r,n,l),Ng(e,t),r=lm(),e!==null&&!Ht?(cm(e,t,c),Va(e,t,c)):(Fe&&r&&$h(t),t.flags|=1,rn(e,t,n,c),t.child)}function ov(e,t,n,r,l){switch(p(t)){case!1:var c=t.stateNode,f=new t.type(t.memoizedProps,c.context).state;c.updater.enqueueSetState(c,f,null);break;case!0:t.flags|=128,t.flags|=65536,c=Error("Simulated error coming from DevTools");var h=l&-l;if(t.lanes|=h,f=dt,f===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");h=km(h),Vm(h,f,t,zn(c,t)),Zu(t,h)}if(yi(t),t.stateNode===null){if(f=Rr,c=n.contextType,"contextType"in n&&c!==null&&(c===void 0||c.$$typeof!==la)&&!$N.has(n)&&($N.add(n),h=c===void 0?" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.":typeof c!="object"?" However, it is set to a "+typeof c+".":c.$$typeof===Op?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(c).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",W(n)||"Component",h)),typeof c=="object"&&c!==null&&(f=xt(c)),c=new n(r,f),t.mode&mn){bt(!0);try{c=new n(r,f)}finally{bt(!1)}}if(f=t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Db,t.stateNode=c,c._reactInternals=t,c._reactInternalInstance=kN,typeof n.getDerivedStateFromProps=="function"&&f===null&&(f=W(n)||"Component",UN.has(f)||(UN.add(f),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",f,c.state===null?"null":"undefined",f))),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"){var y=h=f=null;if(typeof c.componentWillMount=="function"&&c.componentWillMount.__suppressDeprecationWarning!==!0?f="componentWillMount":typeof c.UNSAFE_componentWillMount=="function"&&(f="UNSAFE_componentWillMount"),typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps.__suppressDeprecationWarning!==!0?h="componentWillReceiveProps":typeof c.UNSAFE_componentWillReceiveProps=="function"&&(h="UNSAFE_componentWillReceiveProps"),typeof c.componentWillUpdate=="function"&&c.componentWillUpdate.__suppressDeprecationWarning!==!0?y="componentWillUpdate":typeof c.UNSAFE_componentWillUpdate=="function"&&(y="UNSAFE_componentWillUpdate"),f!==null||h!==null||y!==null){c=W(n)||"Component";var x=typeof n.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";BN.has(c)||(BN.add(c),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
146
|
+
|
|
147
|
+
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
148
|
+
|
|
149
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
150
|
+
https://react.dev/link/unsafe-component-lifecycles`,c,x,f!==null?`
|
|
151
|
+
`+f:"",h!==null?`
|
|
152
|
+
`+h:"",y!==null?`
|
|
153
|
+
`+y:""))}}c=t.stateNode,f=W(n)||"Component",c.render||(n.prototype&&typeof n.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",f):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",f)),!c.getInitialState||c.getInitialState.isReactClassApproved||c.state||console.error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",f),c.getDefaultProps&&!c.getDefaultProps.isReactClassApproved&&console.error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",f),c.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",f),n.childContextTypes&&!PN.has(n)&&(PN.add(n),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",f)),n.contextTypes&&!HN.has(n)&&(HN.add(n),console.error("%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)",f)),typeof c.componentShouldUpdate=="function"&&console.error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",f),n.prototype&&n.prototype.isPureReactComponent&&typeof c.shouldComponentUpdate<"u"&&console.error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",W(n)||"A pure component"),typeof c.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",f),typeof c.componentDidReceiveProps=="function"&&console.error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",f),typeof c.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",f),typeof c.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",f),h=c.props!==r,c.props!==void 0&&h&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",f),c.defaultProps&&console.error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",f,f),typeof c.getSnapshotBeforeUpdate!="function"||typeof c.componentDidUpdate=="function"||zN.has(n)||(zN.add(n),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",W(n))),typeof c.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",f),typeof c.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",f),typeof n.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",f),(h=c.state)&&(typeof h!="object"||Gt(h))&&console.error("%s.state: must be set to an object or null",f),typeof c.getChildContext=="function"&&typeof n.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",f),c=t.stateNode,c.props=r,c.state=t.memoizedState,c.refs={},em(t),f=n.contextType,c.context=typeof f=="object"&&f!==null?xt(f):Rr,c.state===r&&(f=W(n)||"Component",qN.has(f)||(qN.add(f),console.error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",f))),t.mode&mn&&As.recordLegacyContextWarning(t,c),As.recordUnsafeLifecycleWarnings(t,c),c.state=t.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(jm(t,n,f,r),c.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(f=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),f!==c.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",H(t)||"Component"),Db.enqueueReplaceState(c,c.state,null)),Hl(t,r,c,l),Ll(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&_s)!==Te&&(t.flags|=134217728),c=!0}else if(e===null){c=t.stateNode;var V=t.memoizedProps;h=wi(n,V),c.props=h;var U=c.context;y=n.contextType,f=Rr,typeof y=="object"&&y!==null&&(f=xt(y)),x=n.getDerivedStateFromProps,y=typeof x=="function"||typeof c.getSnapshotBeforeUpdate=="function",V=t.pendingProps!==V,y||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(V||U!==f)&&Xg(t,c,r,f),zr=!1;var O=t.memoizedState;c.state=O,Hl(t,r,c,l),Ll(),U=t.memoizedState,V||O!==U||zr?(typeof x=="function"&&(jm(t,n,x,r),U=t.memoizedState),(h=zr||Jg(t,n,h,r,O,U,f))?(y||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&_s)!==Te&&(t.flags|=134217728)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&_s)!==Te&&(t.flags|=134217728),t.memoizedProps=r,t.memoizedState=U),c.props=r,c.state=U,c.context=f,c=h):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&_s)!==Te&&(t.flags|=134217728),c=!1)}else{c=t.stateNode,tm(e,t),f=t.memoizedProps,y=wi(n,f),c.props=y,x=t.pendingProps,O=c.context,U=n.contextType,h=Rr,typeof U=="object"&&U!==null&&(h=xt(U)),V=n.getDerivedStateFromProps,(U=typeof V=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(f!==x||O!==h)&&Xg(t,c,r,h),zr=!1,O=t.memoizedState,c.state=O,Hl(t,r,c,l),Ll();var P=t.memoizedState;f!==x||O!==P||zr||e!==null&&e.dependencies!==null&&Hu(e.dependencies)?(typeof V=="function"&&(jm(t,n,V,r),P=t.memoizedState),(y=zr||Jg(t,n,y,r,O,P,h)||e!==null&&e.dependencies!==null&&Hu(e.dependencies))?(U||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(r,P,h),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(r,P,h)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||f===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=P),c.props=r,c.state=P,c.context=h,c=y):(typeof c.componentDidUpdate!="function"||f===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),c=!1)}if(h=c,mf(e,t),f=(t.flags&128)!==0,h||f){if(h=t.stateNode,eo(t),f&&typeof n.getDerivedStateFromError!="function")n=null,Nn=-1;else if(n=uN(h),t.mode&mn){bt(!0);try{uN(h)}finally{bt(!1)}}t.flags|=1,e!==null&&f?(t.child=Ui(t,e.child,null,l),t.child=Ui(t,null,n,l)):rn(e,t,n,l),t.memoizedState=h.state,e=t.child}else e=Va(e,t,l);return l=t.stateNode,c&&l.props!==r&&(Zo||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",H(t)||"a component"),Zo=!0),e}function lv(e,t,n,r){return bi(),t.flags|=256,rn(e,t,n,r),t.child}function zm(e,t){t&&t.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
|
154
|
+
%s.childContextTypes = ...`,t.displayName||t.name||"Component"),typeof t.getDerivedStateFromProps=="function"&&(e=W(t)||"Unknown",JN[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),JN[e]=!0)),typeof t.contextType=="object"&&t.contextType!==null&&(t=W(t)||"Unknown",YN[t]||(console.error("%s: Function components do not support contextType.",t),YN[t]=!0))}function Bm(e){return{baseLanes:e,cachePool:ig()}}function qm(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Vn),e}function cv(e,t,n){var r,l=t.pendingProps;d(t)&&(t.flags|=128);var c=!1,f=(t.flags&128)!==0;if((r=f)||(r=e!==null&&e.memoizedState===null?!1:(Mt.current&Vc)!==0),r&&(c=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(Fe){if(c?gr(t):vr(t),(e=gt)?(n=O1(e,cs),n=n!==null&&n.data!==Ii?n:null,n!==null&&(r={dehydrated:n,treeContext:Zy(),retryLane:536870912,hydrationErrors:null},t.memoizedState=r,r=Xy(n),r.return=t,t.child=r,cn=t,gt=null)):n=null,n===null)throw qu(t,e),hr(t);return gp(n)?t.lanes=32:t.lanes=536870912,null}var h=l.children;if(l=l.fallback,c){vr(t);var y=t.mode;return h=pf({mode:"hidden",children:h},y),l=mi(l,y,n,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=Bm(n),l.childLanes=qm(e,r,n),t.memoizedState=Ob,Fl(null,l)}return gr(t),Lm(t,h)}var x=e.memoizedState;if(x!==null){var V=x.dehydrated;if(V!==null){if(f)t.flags&256?(gr(t),t.flags&=-257,t=Hm(e,t,n)):t.memoizedState!==null?(vr(t),t.child=e.child,t.flags|=128,t=null):(vr(t),h=l.fallback,y=t.mode,l=pf({mode:"visible",children:l.children},y),h=mi(h,y,n,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,Ui(t,e.child,null,n),l=t.child,l.memoizedState=Bm(n),l.childLanes=qm(e,r,n),t.memoizedState=Ob,t=Fl(null,l));else if(gr(t),Wy(),(n&536870912)!==0&&xf(t),gp(V)){if(r=V.nextSibling&&V.nextSibling.dataset,r){h=r.dgst;var U=r.msg;y=r.stck;var O=r.cstck}c=U,r=h,l=y,V=O,h=c,y=V,h=Error(h||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),h.stack=l||"",h.digest=r,r=y===void 0?null:y,l={value:h,source:null,stack:r},typeof r=="string"&&cb.set(h,l),kl(l),t=Hm(e,t,n)}else if(Ht||co(e,t,n,!1),r=(n&e.childLanes)!==0,Ht||r){if(r=dt,r!==null&&(l=El(r,n),l!==0&&l!==x.retryLane))throw x.retryLane=l,dn(e,l),At(r,e,l),Cb;yp(V)||Nf(),t=Hm(e,t,n)}else yp(V)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,gt=Pn(V.nextSibling),cn=t,Fe=!0,jr=null,ma=!1,Fn=null,cs=!1,e!==null&&Ky(t,e),t=Lm(t,l.children),t.flags|=4096);return t}}return c?(vr(t),h=l.fallback,y=t.mode,O=e.child,V=O.sibling,l=Ra(O,{mode:"hidden",children:l.children}),l.subtreeFlags=O.subtreeFlags&65011712,V!==null?h=Ra(V,h):(h=mi(h,y,n,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,Fl(null,l),l=t.child,h=e.child.memoizedState,h===null?h=Bm(n):(y=h.cachePool,y!==null?(O=Bt._currentValue,y=y.parent!==O?{parent:O,pool:O}:y):y=ig(),h={baseLanes:h.baseLanes|n,cachePool:y}),l.memoizedState=h,l.childLanes=qm(e,r,n),t.memoizedState=Ob,Fl(e.child,l)):(x!==null&&(n&62914560)===n&&(n&e.lanes)!==0&&xf(t),gr(t),n=e.child,e=n.sibling,n=Ra(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Lm(e,t){return t=pf({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function pf(e,t){return e=D(22,e,null,t),e.lanes=0,e}function Hm(e,t,n){return Ui(t,e.child,null,n),e=Lm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Gh(e.return,t,n)}function Pm(e,t,n,r,l,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l,treeForkCount:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=r,f.tail=n,f.tailMode=l,f.treeForkCount=c)}function fv(e,t,n){var r=t.pendingProps,l=r.revealOrder,c=r.tail,f=r.children,h=Mt.current;if((r=(h&Vc)!==0)?(h=h&Go|Vc,t.flags|=128):h&=Go,ve(Mt,h,t),h=l??"null",l!=="forwards"&&l!=="unstable_legacy-backwards"&&l!=="together"&&l!=="independent"&&!XN[h])if(XN[h]=!0,l==null)console.error('The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".');else if(l==="backwards")console.error('The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.');else if(typeof l=="string")switch(l.toLowerCase()){case"together":case"forwards":case"backwards":case"independent":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',l,l.toLowerCase());break;case"forward":case"backward":console.error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',l,l.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',l)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',l);h=c??"null",hd[h]||(c==null?(l==="forwards"||l==="backwards"||l==="unstable_legacy-backwards")&&(hd[h]=!0,console.error('The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".')):c!=="visible"&&c!=="collapsed"&&c!=="hidden"?(hd[h]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',c)):l!=="forwards"&&l!=="backwards"&&l!=="unstable_legacy-backwards"&&(hd[h]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',c)));e:if((l==="forwards"||l==="backwards"||l==="unstable_legacy-backwards")&&f!==void 0&&f!==null&&f!==!1)if(Gt(f)){for(h=0;h<f.length;h++)if(!bg(f[h],h))break e}else if(h=oe(f),typeof h=="function"){if(h=h.call(f))for(var y=h.next(),x=0;!y.done;y=h.next()){if(!bg(y.value,x))break e;x++}}else console.error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',l);if(rn(e,t,f,n),Fe?(dr(),f=xc):f=0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uv(e,n,t);else if(e.tag===19)uv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Ku(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Pm(t,!1,l,n,c,f);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Ku(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Pm(t,!0,n,null,c,f);break;case"together":Pm(t,!1,null,null,void 0,f);break;default:t.memoizedState=null}return t.child}function Va(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Nn=-1,Lr|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(co(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error("Resuming work not yet implemented.");if(t.child!==null){for(e=t.child,n=Ra(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ra(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function $m(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Hu(e)))}function z_(e,t,n){switch(t.tag){case 3:nt(t,t.stateNode.containerInfo),mr(t,Bt,e.memoizedState.cache),bi();break;case 27:case 5:xe(t);break;case 4:nt(t,t.stateNode.containerInfo);break;case 10:mr(t,t.type,t.memoizedProps.value);break;case 12:(n&t.childLanes)!==0&&(t.flags|=4),t.flags|=2048;var r=t.stateNode;r.effectDuration=-0,r.passiveEffectDuration=-0;break;case 31:if(t.memoizedState!==null)return t.flags|=128,am(t),null;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(gr(t),t.flags|=128,null):(n&t.child.childLanes)!==0?cv(e,t,n):(gr(t),e=Va(e,t,n),e!==null?e.sibling:null);gr(t);break;case 19:var l=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(co(e,t,n,!1),r=(n&t.childLanes)!==0),l){if(r)return fv(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ve(Mt,Mt.current,t),r)break;return null;case 22:return t.lanes=0,sv(e,t,n,t.pendingProps);case 24:mr(t,Bt,e.memoizedState.cache)}return Va(e,t,n)}function Im(e,t,n){if(t._debugNeedsRemount&&e!==null){n=Lh(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes),n._debugStack=t._debugStack,n._debugTask=t._debugTask;var r=t.return;if(r===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,n.index=t.index,n.sibling=t.sibling,n.return=t.return,n.ref=t.ref,n._debugInfo=t._debugInfo,t===r.child)r.child=n;else{var l=r.child;if(l===null)throw Error("Expected parent to have a child.");for(;l.sibling!==t;)if(l=l.sibling,l===null)throw Error("Expected to find the previous sibling.");l.sibling=n}return t=r.deletions,t===null?(r.deletions=[e],r.flags|=16):t.push(e),n.flags|=2,n}if(e!==null)if(e.memoizedProps!==t.pendingProps||t.type!==e.type)Ht=!0;else{if(!$m(e,n)&&(t.flags&128)===0)return Ht=!1,z_(e,t,n);Ht=(e.flags&131072)!==0}else Ht=!1,(r=Fe)&&(dr(),r=(t.flags&1048576)!==0),r&&(r=t.index,dr(),Qy(t,xc,r));switch(t.lanes=0,t.tag){case 16:e:if(r=t.pendingProps,e=pr(t.elementType),t.type=e,typeof e=="function")qh(e)?(r=wi(e,r),t.tag=1,t.type=e=hi(e),t=ov(null,t,e,r,n)):(t.tag=0,zm(t,e),t.type=e=hi(e),t=Um(null,t,e,r,n));else{if(e!=null){if(l=e.$$typeof,l===oc){t.tag=11,t.type=e=Bh(e),t=ev(null,t,e,r,n);break e}else if(l===Vf){t.tag=14,t=tv(null,t,e,r,n);break e}}throw t="",e!==null&&typeof e=="object"&&e.$$typeof===$n&&(t=" Did you wrap a component in React.lazy() more than once?"),n=W(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+n+". Lazy element type must resolve to a class or function."+t)}return t;case 0:return Um(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,l=wi(r,t.pendingProps),ov(e,t,r,l,n);case 3:e:{if(nt(t,t.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");r=t.pendingProps;var c=t.memoizedState;l=c.element,tm(e,t),Hl(t,r,null,n);var f=t.memoizedState;if(r=f.cache,mr(t,Bt,r),r!==c.cache&&Jh(t,[Bt],n,!0),Ll(),r=f.element,c.isDehydrated)if(c={element:r,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=lv(e,t,r,n);break e}else if(r!==l){l=zn(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t),kl(l),t=lv(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(gt=Pn(e.firstChild),cn=t,Fe=!0,jr=null,ma=!1,Fn=null,cs=!0,n=EN(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(bi(),r===l){t=Va(e,t,n);break e}rn(e,t,r,n)}t=t.child}return t;case 26:return mf(e,t),e===null?(n=U1(t.type,null,t.pendingProps,null))?t.memoizedState=n:Fe||(n=t.type,e=t.pendingProps,r=Qe(_r.current),r=_f(r).createElement(n),r[ln]=t,r[gn]=e,on(r,n,e),jt(r),t.stateNode=r):t.memoizedState=U1(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return xe(t),e===null&&Fe&&(r=Qe(_r.current),l=pe(),r=t.stateNode=k1(t.type,t.pendingProps,r,l,!1),ma||(l=w1(r,t.type,t.pendingProps,l),l!==null&&(pi(t,0).serverProps=l)),cn=t,cs=!0,l=gt,Sr(t.type)?(Wb=l,gt=Pn(r.firstChild)):gt=l),rn(e,t,t.pendingProps.children,n),mf(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Fe&&(c=pe(),r=Ch(t.type,c.ancestorInfo),l=gt,(f=!l)||(f=_A(l,t.type,t.pendingProps,cs),f!==null?(t.stateNode=f,ma||(c=w1(f,t.type,t.pendingProps,c),c!==null&&(pi(t,0).serverProps=c)),cn=t,gt=Pn(f.firstChild),cs=!1,c=!0):c=!1,f=!c),f&&(r&&qu(t,l),hr(t))),xe(t),l=t.type,c=t.pendingProps,f=e!==null?e.memoizedProps:null,r=c.children,pp(l,c)?r=null:f!==null&&pp(l,f)&&(t.flags|=32),t.memoizedState!==null&&(l=im(e,t,C_,null,null,n),Wc._currentValue=l),mf(e,t),rn(e,t,r,n),t.child;case 6:return e===null&&Fe&&(n=t.pendingProps,e=pe(),r=e.ancestorInfo.current,n=r!=null?Cu(n,r.tag,e.ancestorInfo.implicitRootScope):!0,e=gt,(r=!e)||(r=AA(e,t.pendingProps,cs),r!==null?(t.stateNode=r,cn=t,gt=null,r=!0):r=!1,r=!r),r&&(n&&qu(t,e),hr(t))),null;case 13:return cv(e,t,n);case 4:return nt(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ui(t,null,r,n):rn(e,t,r,n),t.child;case 11:return ev(e,t,t.type,t.pendingProps,n);case 7:return rn(e,t,t.pendingProps,n),t.child;case 8:return rn(e,t,t.pendingProps.children,n),t.child;case 12:return t.flags|=4,t.flags|=2048,r=t.stateNode,r.effectDuration=-0,r.passiveEffectDuration=-0,rn(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.type,l=t.pendingProps,c=l.value,"value"in l||QN||(QN=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),mr(t,r,c),rn(e,t,l.children,n),t.child;case 9:return l=t.type._context,r=t.pendingProps.children,typeof r!="function"&&console.error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it."),yi(t),l=xt(l),r=yb(r,l,void 0),t.flags|=1,rn(e,t,r,n),t.child;case 14:return tv(e,t,t.type,t.pendingProps,n);case 15:return nv(e,t,t.type,t.pendingProps,n);case 19:return fv(e,t,n);case 31:return U_(e,t,n);case 22:return sv(e,t,n,t.pendingProps);case 24:return yi(t),r=xt(Bt),e===null?(l=Kh(),l===null&&(l=dt,c=Xh(),l.pooledCache=c,gi(c),c!==null&&(l.pooledCacheLanes|=n),l=c),t.memoizedState={parent:r,cache:l},em(t),mr(t,Bt,l)):((e.lanes&n)!==0&&(tm(e,t),Hl(t,null,null,n),Ll()),l=e.memoizedState,c=t.memoizedState,l.parent!==r?(l={parent:r,cache:r},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),mr(t,Bt,r)):(r=c.cache,mr(t,Bt,r),r!==l.cache&&Jh(t,[Bt],n,!0))),rn(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Ua(e){e.flags|=4}function Fm(e,t,n,r,l){if((t=(e.mode&aT)!==Te)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(Iv())e.flags|=8192;else throw Vi=od,vb}else e.flags&=-16777217}function dv(e,t){if(t.type!=="stylesheet"||(t.state.loading&ms)!==Gi)e.flags&=-16777217;else if(e.flags|=16777216,!H1(t))if(Iv())e.flags|=8192;else throw Vi=od,vb}function bf(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?wl():536870912,e.lanes|=t,Hi|=t)}function Yl(e,t){if(!Fe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)if((e.mode&Ue)!==Te){for(var l=e.selfBaseDuration,c=e.child;c!==null;)n|=c.lanes|c.childLanes,r|=c.subtreeFlags&65011712,r|=c.flags&65011712,l+=c.treeBaseDuration,c=c.sibling;e.treeBaseDuration=l}else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&65011712,r|=l.flags&65011712,l.return=e,l=l.sibling;else if((e.mode&Ue)!==Te){l=e.actualDuration,c=e.selfBaseDuration;for(var f=e.child;f!==null;)n|=f.lanes|f.childLanes,r|=f.subtreeFlags,r|=f.flags,l+=f.actualDuration,c+=f.treeBaseDuration,f=f.sibling;e.actualDuration=l,e.treeBaseDuration=c}else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function B_(e,t,n){var r=t.pendingProps;switch(Ih(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return ht(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ma(Bt,t),ae(t),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(lo(t)?(Yh(),Ua(t)):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Fh())),ht(t),null;case 26:var l=t.type,c=t.memoizedState;return e===null?(Ua(t),c!==null?(ht(t),dv(t,c)):(ht(t),Fm(t,l,null,r,n))):c?c!==e.memoizedState?(Ua(t),ht(t),dv(t,c)):(ht(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Ua(t),ht(t),Fm(t,l,e,r,n)),null;case 27:if(je(t),n=Qe(_r.current),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ua(t);else{if(!r){if(t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ht(t),null}e=pe(),lo(t)?eg(t):(e=k1(l,r,n,e,!0),t.stateNode=e,Ua(t))}return ht(t),null;case 5:if(je(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ua(t);else{if(!r){if(t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return ht(t),null}var f=pe();if(lo(t))eg(t);else{switch(c=Qe(_r.current),Ch(l,f.ancestorInfo),f=f.context,c=_f(c),f){case rl:c=c.createElementNS(Co,l);break;case Md:c=c.createElementNS(Pf,l);break;default:switch(l){case"svg":c=c.createElementNS(Co,l);break;case"math":c=c.createElementNS(Pf,l);break;case"script":c=c.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof r.is=="string"?c.createElement("select",{is:r.is}):c.createElement("select"),r.multiple?c.multiple=!0:r.size&&(c.size=r.size);break;default:c=typeof r.is=="string"?c.createElement(l,{is:r.is}):c.createElement(l),l.indexOf("-")===-1&&(l!==l.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",l),Object.prototype.toString.call(c)!=="[object HTMLUnknownElement]"||Es.call(xw,l)||(xw[l]=!0,console.error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",l)))}}c[ln]=t,c[gn]=r;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)c.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=c;e:switch(on(c,l,r),l){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Ua(t)}}return ht(t),Fm(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ua(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");if(e=Qe(_r.current),n=pe(),lo(t)){if(e=t.stateNode,n=t.memoizedProps,l=!ma,r=null,c=cn,c!==null)switch(c.tag){case 3:l&&(l=j1(e,n,r),l!==null&&(pi(t,0).serverProps=l));break;case 27:case 5:r=c.memoizedProps,l&&(l=j1(e,n,r),l!==null&&(pi(t,0).serverProps=l))}e[ln]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||y1(e.nodeValue,n)),e||hr(t,!0)}else l=n.ancestorInfo.current,l!=null&&Cu(r,l.tag,n.ancestorInfo.implicitRootScope),e=_f(e).createTextNode(r),e[ln]=t,t.stateNode=e}return ht(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=lo(t),n!==null){if(e===null){if(!r)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.");e[ln]=t,ht(t),(t.mode&Ue)!==Te&&n!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration))}else Yh(),bi(),(t.flags&128)===0&&(n=t.memoizedState=null),t.flags|=4,ht(t),(t.mode&Ue)!==Te&&n!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration));e=!1}else n=Fh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ln(t),t):(Ln(t),null);if((t.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return ht(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=r,c=lo(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");c[ln]=t,ht(t),(t.mode&Ue)!==Te&&l!==null&&(l=t.child,l!==null&&(t.treeBaseDuration-=l.treeBaseDuration))}else Yh(),bi(),(t.flags&128)===0&&(l=t.memoizedState=null),t.flags|=4,ht(t),(t.mode&Ue)!==Te&&l!==null&&(l=t.child,l!==null&&(t.treeBaseDuration-=l.treeBaseDuration));l=!1}else l=Fh(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(Ln(t),t):(Ln(t),null)}return Ln(t),(t.flags&128)!==0?(t.lanes=n,(t.mode&Ue)!==Te&&zl(t),t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,l=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(l=r.alternate.memoizedState.cachePool.pool),c=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),c!==l&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),bf(t,t.updateQueue),ht(t),(t.mode&Ue)!==Te&&n&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return ae(t),e===null&&lp(t.stateNode.containerInfo),ht(t),null;case 10:return Ma(t.type,t),ht(t),null;case 19:if(ie(Mt,t),r=t.memoizedState,r===null)return ht(t),null;if(l=(t.flags&128)!==0,c=r.rendering,c===null)if(l)Yl(r,!1);else{if(St!==Ka||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Ku(e),c!==null){for(t.flags|=128,Yl(r,!1),e=c.updateQueue,t.updateQueue=e,bf(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Jy(n,e),n=n.sibling;return ve(Mt,Mt.current&Go|Vc,t),Fe&&ja(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Kt()>xd&&(t.flags|=128,l=!0,Yl(r,!1),t.lanes=4194304)}else{if(!l)if(e=Ku(c),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,bf(t,e),Yl(r,!0),r.tail===null&&r.tailMode==="hidden"&&!c.alternate&&!Fe)return ht(t),null}else 2*Kt()-r.renderingStartTime>xd&&n!==536870912&&(t.flags|=128,l=!0,Yl(r,!1),t.lanes=4194304);r.isBackwards?(c.sibling=t.child,t.child=c):(e=r.last,e!==null?e.sibling=c:t.child=c,r.last=c)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Kt(),e.sibling=null,n=Mt.current,n=l?n&Go|Vc:n&Go,ve(Mt,n,t),Fe&&ja(t,r.treeForkCount),e):(ht(t),null);case 22:case 23:return Ln(t),sm(t),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(n&536870912)!==0&&(t.flags&128)===0&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),n=t.updateQueue,n!==null&&bf(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ie(Mi,t),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ma(Bt,t),ht(t),null;case 25:return null;case 30:return null}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function q_(e,t){switch(Ih(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ue)!==Te&&zl(t),t):null;case 3:return Ma(Bt,t),ae(t),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return je(t),null;case 31:if(t.memoizedState!==null){if(Ln(t),t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ue)!==Te&&zl(t),t):null;case 13:if(Ln(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");bi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ue)!==Te&&zl(t),t):null;case 19:return ie(Mt,t),null;case 4:return ae(t),null;case 10:return Ma(t.type,t),null;case 22:case 23:return Ln(t),sm(t),e!==null&&ie(Mi,t),e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ue)!==Te&&zl(t),t):null;case 24:return Ma(Bt,t),null;case 25:return null;default:return null}}function hv(e,t){switch(Ih(t),t.tag){case 3:Ma(Bt,t),ae(t);break;case 26:case 27:case 5:je(t);break;case 4:ae(t);break;case 31:t.memoizedState!==null&&Ln(t);break;case 13:Ln(t);break;case 19:ie(Mt,t);break;case 10:Ma(t.type,t);break;case 22:case 23:Ln(t),sm(t),e!==null&&ie(Mi,t);break;case 24:Ma(Bt,t)}}function ta(e){return(e.mode&Ue)!==Te}function mv(e,t){ta(e)?(ea(),Gl(t,e),Ws()):Gl(t,e)}function Ym(e,t,n){ta(e)?(ea(),po(n,e,t),Ws()):po(n,e,t)}function Gl(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var l=r.next;n=l;do{if((n.tag&e)===e&&(r=void 0,(e&wn)!==cd&&(nl=!0),r=be(t,uT,n),(e&wn)!==cd&&(nl=!1),r!==void 0&&typeof r!="function")){var c=void 0;c=(n.tag&Gn)!==0?"useLayoutEffect":(n.tag&wn)!==0?"useInsertionEffect":"useEffect";var f=void 0;f=r===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof r.then=="function"?`
|
|
155
|
+
|
|
156
|
+
It looks like you wrote `+c+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
157
|
+
|
|
158
|
+
`+c+`(() => {
|
|
159
|
+
async function fetchData() {
|
|
160
|
+
// You can await here
|
|
161
|
+
const response = await MyAPI.getData(someId);
|
|
162
|
+
// ...
|
|
163
|
+
}
|
|
164
|
+
fetchData();
|
|
165
|
+
}, [someId]); // Or [] if effect doesn't need props or state
|
|
166
|
+
|
|
167
|
+
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+r,be(t,function(h,y){console.error("%s must not return anything besides a function, which is used for clean-up.%s",h,y)},c,f)}n=n.next}while(n!==l)}}catch(h){at(t,t.return,h)}}function po(e,t,n){try{var r=t.updateQueue,l=r!==null?r.lastEffect:null;if(l!==null){var c=l.next;r=c;do{if((r.tag&e)===e){var f=r.inst,h=f.destroy;h!==void 0&&(f.destroy=void 0,(e&wn)!==cd&&(nl=!0),l=t,be(l,fT,l,n,h),(e&wn)!==cd&&(nl=!1))}r=r.next}while(r!==c)}}catch(y){at(t,t.return,y)}}function pv(e,t){ta(e)?(ea(),Gl(t,e),Ws()):Gl(t,e)}function Gm(e,t,n){ta(e)?(ea(),po(n,e,t),Ws()):po(n,e,t)}function bv(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||Zo||(n.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",H(e)||"instance"),n.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",H(e)||"instance"));try{be(e,gg,t,n)}catch(r){at(e,e.return,r)}}}function L_(e,t,n){return e.getSnapshotBeforeUpdate(t,n)}function H_(e,t){var n=t.memoizedProps,r=t.memoizedState;t=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||Zo||(t.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",H(e)||"instance"),t.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",H(e)||"instance"));try{var l=wi(e.type,n),c=be(e,L_,t,l,r);n=ZN,c!==void 0||n.has(e.type)||(n.add(e.type),be(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",H(e))})),t.__reactInternalSnapshotBeforeUpdate=c}catch(f){at(e,e.return,f)}}function yv(e,t,n){n.props=wi(e.type,e.memoizedProps),n.state=e.memoizedState,ta(e)?(ea(),be(e,bN,e,t,n),Ws()):be(e,bN,e,t,n)}function P_(e){var t=e.ref;if(t!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}if(typeof t=="function")if(ta(e))try{ea(),e.refCleanup=t(n)}finally{Ws()}else e.refCleanup=t(n);else typeof t=="string"?console.error("String refs are no longer supported."):t.hasOwnProperty("current")||console.error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",H(e)),t.current=n}}function Jl(e,t){try{be(e,P_,e)}catch(n){at(e,t,n)}}function na(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{if(ta(e))try{ea(),be(e,r)}finally{Ws(e)}else be(e,r)}catch(l){at(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{if(ta(e))try{ea(),be(e,n,null)}finally{Ws(e)}else be(e,n,null)}catch(l){at(e,t,l)}else n.current=null}function gv(e,t,n,r){var l=e.memoizedProps,c=l.id,f=l.onCommit;l=l.onRender,t=t===null?"mount":"update",sd&&(t="nested-update"),typeof l=="function"&&l(c,t,e.actualDuration,e.treeBaseDuration,e.actualStartTime,n),typeof f=="function"&&f(c,t,r,n)}function $_(e,t,n,r){var l=e.memoizedProps;e=l.id,l=l.onPostCommit,t=t===null?"mount":"update",sd&&(t="nested-update"),typeof l=="function"&&l(e,t,r,n)}function vv(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{be(e,hA,r,t,n,e)}catch(l){at(e,e.return,l)}}function Jm(e,t,n){try{be(e,pA,e.stateNode,e.type,n,t,e)}catch(r){at(e,e.return,r)}}function xv(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Sr(e.type)||e.tag===4}function Xm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Sr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(D1(n),(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t)):(D1(n),t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Oa));else if(r!==4&&(r===27&&Sr(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qm(e,t,n),e=e.sibling;e!==null;)Qm(e,t,n),e=e.sibling}function yf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Sr(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(yf(e,t,n),e=e.sibling;e!==null;)yf(e,t,n),e=e.sibling}function I_(e){for(var t,n=e.return;n!==null;){if(xv(n)){t=n;break}n=n.return}if(t==null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");switch(t.tag){case 27:t=t.stateNode,n=Xm(e),yf(e,n,t);break;case 5:n=t.stateNode,t.flags&32&&(A1(n),t.flags&=-33),t=Xm(e),yf(e,t,n);break;case 3:case 4:t=t.stateNode.containerInfo,n=Xm(e),Qm(e,n,t);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function Nv(e){var t=e.stateNode,n=e.memoizedProps;try{be(e,RA,e.type,n,t,e)}catch(r){at(e,e.return,r)}}function wv(e,t){return t.tag===31?(t=t.memoizedState,e.memoizedState!==null&&t===null):t.tag===13?(e=e.memoizedState,t=t.memoizedState,e!==null&&e.dehydrated!==null&&(t===null||t.dehydrated===null)):t.tag===3?e.memoizedState.isDehydrated&&(t.flags&256)===0:!1}function F_(e,t){if(e=e.containerInfo,Qb=zd,e=By(e),jh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,c=r.focusNode;r=r.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var f=0,h=-1,y=-1,x=0,V=0,U=e,O=null;t:for(;;){for(var P;U!==n||l!==0&&U.nodeType!==3||(h=f+l),U!==c||r!==0&&U.nodeType!==3||(y=f+r),U.nodeType===3&&(f+=U.nodeValue.length),(P=U.firstChild)!==null;)O=U,U=P;for(;;){if(U===e)break t;if(O===n&&++x===l&&(h=f),O===c&&++V===r&&(y=f),(P=U.nextSibling)!==null)break;U=O,O=U.parentNode}U=P}n=h===-1||y===-1?null:{start:h,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zb={focusedElem:e,selectionRange:n},zd=!1,en=t;en!==null;)if(t=en,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,en=e;else for(;en!==null;){switch(e=t=en,n=e.alternate,l=e.flags,e.tag){case 0:if((l&4)!==0&&(e=e.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)l=e[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:(l&1024)!==0&&n!==null&&H_(e,n);break;case 3:if((l&1024)!==0){if(e=e.stateNode.containerInfo,n=e.nodeType,n===9)bp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":bp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((l&1024)!==0)throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(e=t.sibling,e!==null){e.return=t.return,en=e;break}en=t.return}}function Sv(e,t,n){var r=Bn(),l=Xs(),c=Zs(),f=Ks(),h=n.flags;switch(n.tag){case 0:case 11:case 15:sa(e,n),h&4&&mv(n,Gn|ds);break;case 1:if(sa(e,n),h&4)if(e=n.stateNode,t===null)n.type.defaultProps||"ref"in n.memoizedProps||Zo||(e.props!==n.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",H(n)||"instance"),e.state!==n.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",H(n)||"instance")),ta(n)?(ea(),be(n,gb,n,e),Ws()):be(n,gb,n,e);else{var y=wi(n.type,t.memoizedProps);t=t.memoizedState,n.type.defaultProps||"ref"in n.memoizedProps||Zo||(e.props!==n.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",H(n)||"instance"),e.state!==n.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",H(n)||"instance")),ta(n)?(ea(),be(n,hN,n,e,y,t,e.__reactInternalSnapshotBeforeUpdate),Ws()):be(n,hN,n,e,y,t,e.__reactInternalSnapshotBeforeUpdate)}h&64&&bv(n),h&512&&Jl(n,n.return);break;case 3:if(t=ka(),sa(e,n),h&64&&(h=n.updateQueue,h!==null)){if(y=null,n.child!==null)switch(n.child.tag){case 27:case 5:y=n.child.stateNode;break;case 1:y=n.child.stateNode}try{be(n,gg,h,y)}catch(V){at(n,n.return,V)}}e.effectDuration+=$u(t);break;case 27:t===null&&h&4&&Nv(n);case 26:case 5:if(sa(e,n),t===null){if(h&4)vv(n);else if(h&64){e=n.type,t=n.memoizedProps,y=n.stateNode;try{be(n,mA,y,e,t,n)}catch(V){at(n,n.return,V)}}}h&512&&Jl(n,n.return);break;case 12:if(h&4){h=ka(),sa(e,n),e=n.stateNode,e.effectDuration+=Ul(h);try{be(n,gv,n,t,Mr,e.effectDuration)}catch(V){at(n,n.return,V)}}else sa(e,n);break;case 31:sa(e,n),h&4&&Av(e,n);break;case 13:sa(e,n),h&4&&Dv(e,n),h&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(h=eA.bind(null,n),DA(e,h))));break;case 22:if(h=n.memoizedState!==null||Za,!h){t=t!==null&&t.memoizedState!==null||Pt,y=Za;var x=Pt;Za=h,(Pt=t)&&!x?(aa(e,n,(n.subtreeFlags&8772)!==0),(n.mode&Ue)!==Te&&0<=_e&&0<=Ae&&.05<Ae-_e&&Mu(n,_e,Ae)):sa(e,n),Za=y,Pt=x}break;case 30:break;default:sa(e,n)}(n.mode&Ue)!==Te&&0<=_e&&0<=Ae&&((Dt||.05<wt)&&Gs(n,_e,Ae,wt,Nt),n.alternate===null&&n.return!==null&&n.return.alternate!==null&&.05<Ae-_e&&(wv(n.return.alternate,n.return)||Ys(n,_e,Ae,"Mount"))),qn(r),Qs(l),Nt=c,Dt=f}function Ev(e){var t=e.alternate;t!==null&&(e.alternate=null,Ev(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&or(t)),e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function za(e,t,n){for(n=n.child;n!==null;)_v(e,t,n),n=n.sibling}function _v(e,t,n){if(hn&&typeof hn.onCommitFiberUnmount=="function")try{hn.onCommitFiberUnmount(Do,n)}catch(x){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",x))}var r=Bn(),l=Xs(),c=Zs(),f=Ks();switch(n.tag){case 26:Pt||na(n,t),za(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(e=n.stateNode,e.parentNode.removeChild(e));break;case 27:Pt||na(n,t);var h=$t,y=Mn;Sr(n.type)&&($t=n.stateNode,Mn=!1),za(e,t,n),be(n,sc,n.stateNode),$t=h,Mn=y;break;case 5:Pt||na(n,t);case 6:if(h=$t,y=Mn,$t=null,za(e,t,n),$t=h,Mn=y,$t!==null)if(Mn)try{be(n,gA,$t,n.stateNode)}catch(x){at(n,t,x)}else try{be(n,yA,$t,n.stateNode)}catch(x){at(n,t,x)}break;case 18:$t!==null&&(Mn?(e=$t,T1(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),So(e)):T1($t,n.stateNode));break;case 4:h=$t,y=Mn,$t=n.stateNode.containerInfo,Mn=!0,za(e,t,n),$t=h,Mn=y;break;case 0:case 11:case 14:case 15:po(wn,n,t),Pt||Ym(n,t,Gn),za(e,t,n);break;case 1:Pt||(na(n,t),h=n.stateNode,typeof h.componentWillUnmount=="function"&&yv(n,t,h)),za(e,t,n);break;case 21:za(e,t,n);break;case 22:Pt=(h=Pt)||n.memoizedState!==null,za(e,t,n),Pt=h;break;default:za(e,t,n)}(n.mode&Ue)!==Te&&0<=_e&&0<=Ae&&(Dt||.05<wt)&&Gs(n,_e,Ae,wt,Nt),qn(r),Qs(l),Nt=c,Dt=f}function Av(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{be(t,CA,e)}catch(n){at(t,t.return,n)}}}function Dv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{be(t,OA,e)}catch(n){at(t,t.return,n)}}function Y_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new KN),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new KN),t;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function gf(e,t){var n=Y_(e);t.forEach(function(r){if(!n.has(r)){if(n.add(r),fa)if(Ko!==null&&Wo!==null)Kl(Wo,Ko);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var l=tA.bind(null,e,r);r.then(l,l)}})}function Rn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var l=e,c=t,f=n[r],h=Bn(),y=c;e:for(;y!==null;){switch(y.tag){case 27:if(Sr(y.type)){$t=y.stateNode,Mn=!1;break e}break;case 5:$t=y.stateNode,Mn=!1;break e;case 3:case 4:$t=y.stateNode.containerInfo,Mn=!0;break e}y=y.return}if($t===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");_v(l,c,f),$t=null,Mn=!1,(f.mode&Ue)!==Te&&0<=_e&&0<=Ae&&.05<Ae-_e&&Ys(f,_e,Ae,"Unmount"),qn(h),l=f,c=l.alternate,c!==null&&(c.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Tv(t,e),t=t.sibling}function Tv(e,t){var n=Bn(),r=Xs(),l=Zs(),c=Ks(),f=e.alternate,h=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Rn(t,e),jn(e),h&4&&(po(wn|ds,e,e.return),Gl(wn|ds,e),Ym(e,e.return,Gn|ds));break;case 1:if(Rn(t,e),jn(e),h&512&&(Pt||f===null||na(f,f.return)),h&64&&Za&&(h=e.updateQueue,h!==null&&(f=h.callbacks,f!==null))){var y=h.shared.hiddenCallbacks;h.shared.hiddenCallbacks=y===null?f:y.concat(f)}break;case 26:if(y=Ts,Rn(t,e),jn(e),h&512&&(Pt||f===null||na(f,f.return)),h&4){var x=f!==null?f.memoizedState:null;if(h=e.memoizedState,f===null)if(h===null)if(e.stateNode===null){e:{h=e.type,f=e.memoizedProps,y=y.ownerDocument||y;t:switch(h){case"title":x=y.getElementsByTagName("title")[0],(!x||x[uc]||x[ln]||x.namespaceURI===Co||x.hasAttribute("itemprop"))&&(x=y.createElement(h),y.head.insertBefore(x,y.querySelector("head > title"))),on(x,h,f),x[ln]=e,jt(x),h=x;break e;case"link":var V=q1("link","href",y).get(h+(f.href||""));if(V){for(var U=0;U<V.length;U++)if(x=V[U],x.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&x.getAttribute("rel")===(f.rel==null?null:f.rel)&&x.getAttribute("title")===(f.title==null?null:f.title)&&x.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){V.splice(U,1);break t}}x=y.createElement(h),on(x,h,f),y.head.appendChild(x);break;case"meta":if(V=q1("meta","content",y).get(h+(f.content||""))){for(U=0;U<V.length;U++)if(x=V[U],st(f.content,"content"),x.getAttribute("content")===(f.content==null?null:""+f.content)&&x.getAttribute("name")===(f.name==null?null:f.name)&&x.getAttribute("property")===(f.property==null?null:f.property)&&x.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&x.getAttribute("charset")===(f.charSet==null?null:f.charSet)){V.splice(U,1);break t}}x=y.createElement(h),on(x,h,f),y.head.appendChild(x);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+h+'". This is a bug in React.')}x[ln]=e,jt(x),h=x}e.stateNode=h}else L1(y,e.type,e.stateNode);else e.stateNode=B1(y,h,e.memoizedProps);else x!==h?(x===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):x.count--,h===null?L1(y,e.type,e.stateNode):B1(y,h,e.memoizedProps)):h===null&&e.stateNode!==null&&Jm(e,e.memoizedProps,f.memoizedProps)}break;case 27:Rn(t,e),jn(e),h&512&&(Pt||f===null||na(f,f.return)),f!==null&&h&4&&Jm(e,e.memoizedProps,f.memoizedProps);break;case 5:if(Rn(t,e),jn(e),h&512&&(Pt||f===null||na(f,f.return)),e.flags&32){y=e.stateNode;try{be(e,A1,y)}catch(me){at(e,e.return,me)}}h&4&&e.stateNode!=null&&(y=e.memoizedProps,Jm(e,y,f!==null?f.memoizedProps:y)),h&1024&&(Rb=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(Rn(t,e),jn(e),h&4){if(e.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");h=e.memoizedProps,f=f!==null?f.memoizedProps:h,y=e.stateNode;try{be(e,bA,y,f,h)}catch(me){at(e,e.return,me)}}break;case 3:if(y=ka(),kd=null,x=Ts,Ts=Af(t.containerInfo),Rn(t,e),Ts=x,jn(e),h&4&&f!==null&&f.memoizedState.isDehydrated)try{be(e,TA,t.containerInfo)}catch(me){at(e,e.return,me)}Rb&&(Rb=!1,Cv(e)),t.effectDuration+=$u(y);break;case 4:h=Ts,Ts=Af(e.stateNode.containerInfo),Rn(t,e),jn(e),Ts=h;break;case 12:h=ka(),Rn(t,e),jn(e),e.stateNode.effectDuration+=Ul(h);break;case 31:Rn(t,e),jn(e),h&4&&(h=e.updateQueue,h!==null&&(e.updateQueue=null,gf(e,h)));break;case 13:Rn(t,e),jn(e),e.child.flags&8192&&e.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(vd=Kt()),h&4&&(h=e.updateQueue,h!==null&&(e.updateQueue=null,gf(e,h)));break;case 22:y=e.memoizedState!==null;var O=f!==null&&f.memoizedState!==null,P=Za,ce=Pt;if(Za=P||y,Pt=ce||O,Rn(t,e),Pt=ce,Za=P,O&&!y&&!P&&!ce&&(e.mode&Ue)!==Te&&0<=_e&&0<=Ae&&.05<Ae-_e&&Mu(e,_e,Ae),jn(e),h&8192)e:for(t=e.stateNode,t._visibility=y?t._visibility&~vc:t._visibility|vc,!y||f===null||O||Za||Pt||(Si(e),(e.mode&Ue)!==Te&&0<=_e&&0<=Ae&&.05<Ae-_e&&Ys(e,_e,Ae,"Disconnect")),f=null,t=e;;){if(t.tag===5||t.tag===26){if(f===null){O=f=t;try{x=O.stateNode,y?be(O,xA,x):be(O,SA,O.stateNode,O.memoizedProps)}catch(me){at(O,O.return,me)}}}else if(t.tag===6){if(f===null){O=t;try{V=O.stateNode,y?be(O,NA,V):be(O,EA,V,O.memoizedProps)}catch(me){at(O,O.return,me)}}}else if(t.tag===18){if(f===null){O=t;try{U=O.stateNode,y?be(O,vA,U):be(O,wA,O.stateNode)}catch(me){at(O,O.return,me)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;f===t&&(f=null),t=t.return}f===t&&(f=null),t.sibling.return=t.return,t=t.sibling}h&4&&(h=e.updateQueue,h!==null&&(f=h.retryQueue,f!==null&&(h.retryQueue=null,gf(e,f))));break;case 19:Rn(t,e),jn(e),h&4&&(h=e.updateQueue,h!==null&&(e.updateQueue=null,gf(e,h)));break;case 30:break;case 21:break;default:Rn(t,e),jn(e)}(e.mode&Ue)!==Te&&0<=_e&&0<=Ae&&((Dt||.05<wt)&&Gs(e,_e,Ae,wt,Nt),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&.05<Ae-_e&&(wv(e.return.alternate,e.return)||Ys(e,_e,Ae,"Mount"))),qn(n),Qs(r),Nt=l,Dt=c}function jn(e){var t=e.flags;if(t&2){try{be(e,I_,e)}catch(n){at(e,e.return,n)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cv(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Cv(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function sa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Sv(e,t.alternate,t),t=t.sibling}function Ov(e){var t=Bn(),n=Xs(),r=Zs(),l=Ks();switch(e.tag){case 0:case 11:case 14:case 15:Ym(e,e.return,Gn),Si(e);break;case 1:na(e,e.return);var c=e.stateNode;typeof c.componentWillUnmount=="function"&&yv(e,e.return,c),Si(e);break;case 27:be(e,sc,e.stateNode);case 26:case 5:na(e,e.return),Si(e);break;case 22:e.memoizedState===null&&Si(e);break;case 30:Si(e);break;default:Si(e)}(e.mode&Ue)!==Te&&0<=_e&&0<=Ae&&(Dt||.05<wt)&&Gs(e,_e,Ae,wt,Nt),qn(t),Qs(n),Nt=r,Dt=l}function Si(e){for(e=e.child;e!==null;)Ov(e),e=e.sibling}function Rv(e,t,n,r){var l=Bn(),c=Xs(),f=Zs(),h=Ks(),y=n.flags;switch(n.tag){case 0:case 11:case 15:aa(e,n,r),mv(n,Gn);break;case 1:if(aa(e,n,r),t=n.stateNode,typeof t.componentDidMount=="function"&&be(n,gb,n,t),t=n.updateQueue,t!==null){e=n.stateNode;try{be(n,T_,t,e)}catch(x){at(n,n.return,x)}}r&&y&64&&bv(n),Jl(n,n.return);break;case 27:Nv(n);case 26:case 5:aa(e,n,r),r&&t===null&&y&4&&vv(n),Jl(n,n.return);break;case 12:if(r&&y&4){y=ka(),aa(e,n,r),r=n.stateNode,r.effectDuration+=Ul(y);try{be(n,gv,n,t,Mr,r.effectDuration)}catch(x){at(n,n.return,x)}}else aa(e,n,r);break;case 31:aa(e,n,r),r&&y&4&&Av(e,n);break;case 13:aa(e,n,r),r&&y&4&&Dv(e,n);break;case 22:n.memoizedState===null&&aa(e,n,r),Jl(n,n.return);break;case 30:break;default:aa(e,n,r)}(n.mode&Ue)!==Te&&0<=_e&&0<=Ae&&(Dt||.05<wt)&&Gs(n,_e,Ae,wt,Nt),qn(l),Qs(c),Nt=f,Dt=h}function aa(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;)Rv(e,t.alternate,t,n),t=t.sibling}function Zm(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&gi(e),n!=null&&Vl(n))}function Km(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(gi(t),e!=null&&Vl(e))}function Ss(e,t,n,r,l){if(t.subtreeFlags&10256||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child))for(t=t.child;t!==null;){var c=t.sibling;jv(e,t,n,r,c!==null?c.actualStartTime:l),t=c}}function jv(e,t,n,r,l){var c=Bn(),f=Xs(),h=Zs(),y=Ks(),x=Cr,V=t.flags;switch(t.tag){case 0:case 11:case 15:(t.mode&Ue)!==Te&&0<t.actualStartTime&&(t.flags&1)!==0&&ku(t,t.actualStartTime,l,Jt,n),Ss(e,t,n,r,l),V&2048&&pv(t,Sn|ds);break;case 1:(t.mode&Ue)!==Te&&0<t.actualStartTime&&((t.flags&128)!==0?kh(t,t.actualStartTime,l,[]):(t.flags&1)!==0&&ku(t,t.actualStartTime,l,Jt,n)),Ss(e,t,n,r,l);break;case 3:var U=ka(),O=Jt;Jt=t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)===0,Ss(e,t,n,r,l),Jt=O,V&2048&&(n=null,t.alternate!==null&&(n=t.alternate.memoizedState.cache),r=t.memoizedState.cache,r!==n&&(gi(r),n!=null&&Vl(n))),e.passiveEffectDuration+=$u(U);break;case 12:if(V&2048){V=ka(),Ss(e,t,n,r,l),e=t.stateNode,e.passiveEffectDuration+=Ul(V);try{be(t,$_,t,t.alternate,Mr,e.passiveEffectDuration)}catch(P){at(t,t.return,P)}}else Ss(e,t,n,r,l);break;case 31:V=Jt,U=t.alternate!==null?t.alternate.memoizedState:null,O=t.memoizedState,U!==null&&O===null?(O=t.deletions,O!==null&&0<O.length&&O[0].tag===18?(Jt=!1,U=U.hydrationErrors,U!==null&&kh(t,t.actualStartTime,l,U)):Jt=!0):Jt=!1,Ss(e,t,n,r,l),Jt=V;break;case 13:V=Jt,U=t.alternate!==null?t.alternate.memoizedState:null,O=t.memoizedState,U===null||U.dehydrated===null||O!==null&&O.dehydrated!==null?Jt=!1:(O=t.deletions,O!==null&&0<O.length&&O[0].tag===18?(Jt=!1,U=U.hydrationErrors,U!==null&&kh(t,t.actualStartTime,l,U)):Jt=!0),Ss(e,t,n,r,l),Jt=V;break;case 23:break;case 22:O=t.stateNode,U=t.alternate,t.memoizedState!==null?O._visibility&Ha?Ss(e,t,n,r,l):Xl(e,t,n,r,l):O._visibility&Ha?Ss(e,t,n,r,l):(O._visibility|=Ha,bo(e,t,n,r,(t.subtreeFlags&10256)!==0||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child),l),(t.mode&Ue)===Te||Jt||(e=t.actualStartTime,0<=e&&.05<l-e&&Mu(t,e,l),0<=_e&&0<=Ae&&.05<Ae-_e&&Mu(t,_e,Ae))),V&2048&&Zm(U,t);break;case 24:Ss(e,t,n,r,l),V&2048&&Km(t.alternate,t);break;default:Ss(e,t,n,r,l)}(t.mode&Ue)!==Te&&((e=!Jt&&t.alternate===null&&t.return!==null&&t.return.alternate!==null)&&(n=t.actualStartTime,0<=n&&.05<l-n&&Ys(t,n,l,"Mount")),0<=_e&&0<=Ae&&((Dt||.05<wt)&&Gs(t,_e,Ae,wt,Nt),e&&.05<Ae-_e&&Ys(t,_e,Ae,"Mount"))),qn(c),Qs(f),Nt=h,Dt=y,Cr=x}function bo(e,t,n,r,l,c){for(l=l&&((t.subtreeFlags&10256)!==0||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child)),t=t.child;t!==null;){var f=t.sibling;Mv(e,t,n,r,l,f!==null?f.actualStartTime:c),t=f}}function Mv(e,t,n,r,l,c){var f=Bn(),h=Xs(),y=Zs(),x=Ks(),V=Cr;l&&(t.mode&Ue)!==Te&&0<t.actualStartTime&&(t.flags&1)!==0&&ku(t,t.actualStartTime,c,Jt,n);var U=t.flags;switch(t.tag){case 0:case 11:case 15:bo(e,t,n,r,l,c),pv(t,Sn);break;case 23:break;case 22:var O=t.stateNode;t.memoizedState!==null?O._visibility&Ha?bo(e,t,n,r,l,c):Xl(e,t,n,r,c):(O._visibility|=Ha,bo(e,t,n,r,l,c)),l&&U&2048&&Zm(t.alternate,t);break;case 24:bo(e,t,n,r,l,c),l&&U&2048&&Km(t.alternate,t);break;default:bo(e,t,n,r,l,c)}(t.mode&Ue)!==Te&&0<=_e&&0<=Ae&&(Dt||.05<wt)&&Gs(t,_e,Ae,wt,Nt),qn(f),Qs(h),Nt=y,Dt=x,Cr=V}function Xl(e,t,n,r,l){if(t.subtreeFlags&10256||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child))for(var c=t.child;c!==null;){t=c.sibling;var f=e,h=n,y=r,x=t!==null?t.actualStartTime:l,V=Cr;(c.mode&Ue)!==Te&&0<c.actualStartTime&&(c.flags&1)!==0&&ku(c,c.actualStartTime,x,Jt,h);var U=c.flags;switch(c.tag){case 22:Xl(f,c,h,y,x),U&2048&&Zm(c.alternate,c);break;case 24:Xl(f,c,h,y,x),U&2048&&Km(c.alternate,c);break;default:Xl(f,c,h,y,x)}Cr=V,c=t}}function yo(e,t,n){if(e.subtreeFlags&qc)for(e=e.child;e!==null;)kv(e,t,n),e=e.sibling}function kv(e,t,n){switch(e.tag){case 26:yo(e,t,n),e.flags&qc&&e.memoizedState!==null&&kA(n,Ts,e.memoizedState,e.memoizedProps);break;case 5:yo(e,t,n);break;case 3:case 4:var r=Ts;Ts=Af(e.stateNode.containerInfo),yo(e,t,n),Ts=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=qc,qc=16777216,yo(e,t,n),qc=r):yo(e,t,n));break;default:yo(e,t,n)}}function Vv(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ql(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n],l=Bn();en=r,Bv(r,e),(r.mode&Ue)!==Te&&0<=_e&&0<=Ae&&.05<Ae-_e&&Ys(r,_e,Ae,"Unmount"),qn(l)}Vv(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Uv(e),e=e.sibling}function Uv(e){var t=Bn(),n=Xs(),r=Zs(),l=Ks();switch(e.tag){case 0:case 11:case 15:Ql(e),e.flags&2048&&Gm(e,e.return,Sn|ds);break;case 3:var c=ka();Ql(e),e.stateNode.passiveEffectDuration+=$u(c);break;case 12:c=ka(),Ql(e),e.stateNode.passiveEffectDuration+=Ul(c);break;case 22:c=e.stateNode,e.memoizedState!==null&&c._visibility&Ha&&(e.return===null||e.return.tag!==13)?(c._visibility&=~Ha,vf(e),(e.mode&Ue)!==Te&&0<=_e&&0<=Ae&&.05<Ae-_e&&Ys(e,_e,Ae,"Disconnect")):Ql(e);break;default:Ql(e)}(e.mode&Ue)!==Te&&0<=_e&&0<=Ae&&(Dt||.05<wt)&&Gs(e,_e,Ae,wt,Nt),qn(t),Qs(n),Dt=l,Nt=r}function vf(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n],l=Bn();en=r,Bv(r,e),(r.mode&Ue)!==Te&&0<=_e&&0<=Ae&&.05<Ae-_e&&Ys(r,_e,Ae,"Unmount"),qn(l)}Vv(e)}for(e=e.child;e!==null;)zv(e),e=e.sibling}function zv(e){var t=Bn(),n=Xs(),r=Zs(),l=Ks();switch(e.tag){case 0:case 11:case 15:Gm(e,e.return,Sn),vf(e);break;case 22:var c=e.stateNode;c._visibility&Ha&&(c._visibility&=~Ha,vf(e));break;default:vf(e)}(e.mode&Ue)!==Te&&0<=_e&&0<=Ae&&(Dt||.05<wt)&&Gs(e,_e,Ae,wt,Nt),qn(t),Qs(n),Dt=l,Nt=r}function Bv(e,t){for(;en!==null;){var n=en,r=n,l=t,c=Bn(),f=Xs(),h=Zs(),y=Ks();switch(r.tag){case 0:case 11:case 15:Gm(r,l,Sn);break;case 23:case 22:r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool,l!=null&&gi(l));break;case 24:Vl(r.memoizedState.cache)}if((r.mode&Ue)!==Te&&0<=_e&&0<=Ae&&(Dt||.05<wt)&&Gs(r,_e,Ae,wt,Nt),qn(c),Qs(f),Dt=y,Nt=h,r=n.child,r!==null)r.return=n,en=r;else e:for(n=e;en!==null;){if(r=en,c=r.sibling,f=r.return,Ev(r),r===n){en=null;break e}if(c!==null){c.return=f,en=c;break e}en=f}}}function G_(){bT.forEach(function(e){return e()})}function qv(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||Y.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function Hn(e){if((Ke&Xt)!==tn&&Be!==0)return Be&-Be;var t=Y.T;return t!==null?(t._updatedFibers||(t._updatedFibers=new Set),t._updatedFibers.add(e),ip()):so()}function Lv(){if(Vn===0)if((Be&536870912)===0||Fe){var e=Bf;Bf<<=1,(Bf&3932160)===0&&(Bf=262144),Vn=e}else Vn=536870912;return e=Yn.current,e!==null&&(e.flags|=32),Vn}function At(e,t,n){if(nl&&console.error("useInsertionEffect must not schedule updates."),Pb&&(Sd=!0),(e===dt&&(lt===qi||lt===Li)||e.cancelPendingCommit!==null)&&(vo(e,0),Nr(e,Be,Vn,!1)),li(e,n),(Ke&Xt)!==tn&&e===dt){if(ca)switch(t.tag){case 0:case 11:case 15:e=Le&&H(Le)||"Unknown",hw.has(e)||(hw.add(e),t=H(t)||"Unknown",console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",t,e,e));break;case 1:dw||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),dw=!0)}}else fa&&zs(e,t,n),sA(t),e===dt&&((Ke&Xt)===tn&&(Hr|=n),St===Br&&Nr(e,Be,Vn,!1)),ra(e)}function Hv(e,t,n){if((Ke&(Xt|Jn))!==tn)throw Error("Should not already be working.");if(Be!==0&&Le!==null){var r=Le,l=Kt();switch(rN){case Pc:case qi:var c=_c;yt&&((r=r._debugTask)?r.run(console.timeStamp.bind(console,"Suspended",c,l,as,void 0,"primary-light")):console.timeStamp("Suspended",c,l,as,void 0,"primary-light"));break;case Li:c=_c,yt&&((r=r._debugTask)?r.run(console.timeStamp.bind(console,"Action",c,l,as,void 0,"primary-light")):console.timeStamp("Action",c,l,as,void 0,"primary-light"));break;default:yt&&(r=l-_c,3>r||console.timeStamp("Blocked",_c,l,as,void 0,5>r?"primary-light":10>r?"primary":100>r?"primary-dark":"error"))}}c=(n=!n&&(t&127)===0&&(t&e.expiredLanes)===0||fn(e,t))?X_(e,t):ep(e,t,!0);var f=n;do{if(c===Ka){el&&!n&&Nr(e,t,0,!1),t=lt,_c=qt(),rN=t;break}else{if(r=Kt(),l=e.current.alternate,f&&!J_(l)){Ns(t),l=Wt,c=r,!yt||c<=l||(Ot?Ot.run(console.timeStamp.bind(console,"Teared Render",l,c,Xe,Ge,"error")):console.timeStamp("Teared Render",l,c,Xe,Ge,"error")),Ei(t,r),c=ep(e,t,!1),f=!1;continue}if(c===Bi){if(f=t,e.errorRecoveryDisabledLanes&f)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){Ns(t),Vh(Wt,r,t,Ot),Ei(t,r),t=h;e:{r=e,c=f,f=Ic;var y=r.current.memoizedState.isDehydrated;if(y&&(vo(r,h).flags|=256),h=ep(r,h,!1),h!==Bi){if(kb&&!y){r.errorRecoveryDisabledLanes|=c,Hr|=c,c=Br;break e}r=En,En=f,r!==null&&(En===null?En=r:En.push.apply(En,r))}c=h}if(f=!1,c!==Bi)continue;r=Kt()}}if(c===Hc){Ns(t),Vh(Wt,r,t,Ot),Ei(t,r),vo(e,0),Nr(e,t,0,!0);break}e:{switch(n=e,c){case Ka:case Hc:throw Error("Root did not complete. This is a bug in React.");case Br:if((t&4194048)!==t)break;case pd:Ns(t),Hy(Wt,r,t,Ot),Ei(t,r),l=t,(l&127)!==0?ed=r:(l&4194048)!==0&&(td=r),Nr(n,t,Vn,!qr);break e;case Bi:En=null;break;case md:case WN:break;default:throw Error("Unknown root exit status.")}if(Y.actQueue!==null)tp(n,l,t,En,Fc,gd,Vn,Hr,Hi,c,null,null,Wt,r);else{if((t&62914560)===t&&(f=vd+nw-Kt(),10<f)){if(Nr(n,t,Vn,!qr),Da(n,0,!0)!==0)break e;Cs=t,n.timeoutHandle=Nw(Pv.bind(null,n,l,En,Fc,gd,t,Vn,Hr,Hi,qr,c,"Throttled",Wt,r),f);break e}Pv(n,l,En,Fc,gd,t,Vn,Hr,Hi,qr,c,null,Wt,r)}}}break}while(!0);ra(e)}function Pv(e,t,n,r,l,c,f,h,y,x,V,U,O,P){e.timeoutHandle=Yi;var ce=t.subtreeFlags,me=null;if((ce&8192||(ce&16785408)===16785408)&&(me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Oa},kv(t,c,me),ce=(c&62914560)===c?vd-Kt():(c&4194048)===c?tw-Kt():0,ce=VA(me,ce),ce!==null)){Cs=c,e.cancelPendingCommit=ce(tp.bind(null,e,t,c,n,r,l,f,h,y,V,me,me.waitingForViewTransition?"Waiting for the previous Animation":0<me.count?0<me.imgCount?"Suspended on CSS and Images":"Suspended on CSS":me.imgCount===1?"Suspended on an Image":0<me.imgCount?"Suspended on Images":null,O,P)),Nr(e,c,f,!x);return}tp(e,t,c,n,r,l,f,h,y,V,me,U,O,P)}function J_(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var l=n[r],c=l.getSnapshot;l=l.value;try{if(!xn(c(),l))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Nr(e,t,n,r){t&=~Vb,t&=~Hr,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var l=t;0<l;){var c=31-yn(l),f=1<<c;r[c]=-1,l&=~f}n!==0&&_u(e,n,t)}function go(){return(Ke&(Xt|Jn))===tn?(Wl(0),!1):!0}function Wm(){if(Le!==null){if(lt===kn)var e=Le.return;else e=Le,Lu(),um(e),Fo=null,kc=0,e=Le;for(;e!==null;)hv(e.alternate,e),e=e.return;Le=null}}function Ei(e,t){(e&127)!==0&&(Ci=t),(e&4194048)!==0&&(Ya=t),(e&62914560)!==0&&(sN=t),(e&2080374784)!==0&&(aN=t)}function vo(e,t){yt&&(console.timeStamp("Blocking Track",.003,.003,"Blocking",Ge,"primary-light"),console.timeStamp("Transition Track",.003,.003,"Transition",Ge,"primary-light"),console.timeStamp("Suspense Track",.003,.003,"Suspense",Ge,"primary-light"),console.timeStamp("Idle Track",.003,.003,"Idle",Ge,"primary-light"));var n=Wt;if(Wt=qt(),Be!==0&&0<n){if(Ns(Be),St===md||St===Br)Hy(n,Wt,t,Ot);else{var r=Wt,l=Ot;if(yt&&!(r<=n)){var c=(t&738197653)===t?"tertiary-dark":"primary-dark",f=(t&536870912)===t?"Prewarm":(t&201326741)===t?"Interrupted Hydration":"Interrupted Render";l?l.run(console.timeStamp.bind(console,f,n,r,Xe,Ge,c)):console.timeStamp(f,n,r,Xe,Ge,c)}}Ei(Be,Wt)}if(n=Ot,Ot=null,(t&127)!==0){Ot=wc,l=0<=pa&&pa<Ci?Ci:pa,r=0<=Oi&&Oi<Ci?Ci:Oi,c=0<=r?r:0<=l?l:Wt,0<=ed?(Ns(2),Py(ed,c,t,n)):nd&127,n=l;var h=r,y=Sc,x=0<Po,V=kr===Nc,U=kr===Wf;if(l=Wt,r=wc,c=hb,f=mb,yt){if(Xe="Blocking",0<n?n>l&&(n=l):n=l,0<h?h>n&&(h=n):h=n,y!==null&&n>h){var O=x?"secondary-light":"warning";r?r.run(console.timeStamp.bind(console,x?"Consecutive":"Event: "+y,h,n,Xe,Ge,O)):console.timeStamp(x?"Consecutive":"Event: "+y,h,n,Xe,Ge,O)}l>n&&(h=V?"error":(t&738197653)===t?"tertiary-light":"primary-light",V=U?"Promise Resolved":V?"Cascading Update":5<l-n?"Update Blocked":"Update",U=[],f!=null&&U.push(["Component name",f]),c!=null&&U.push(["Method name",c]),n={start:n,end:l,detail:{devtools:{properties:U,track:Xe,trackGroup:Ge,color:h}}},r?r.run(performance.measure.bind(performance,V,n)):performance.measure(V,n))}pa=-1.1,kr=0,mb=hb=null,ed=-1.1,Po=Oi,Oi=-1.1,Ci=qt()}if((t&4194048)!==0&&(Ot=Ec,l=0<=Ga&&Ga<Ya?Ya:Ga,n=0<=us&&us<Ya?Ya:us,r=0<=Vr&&Vr<Ya?Ya:Vr,c=0<=r?r:0<=n?n:Wt,0<=td?(Ns(256),Py(td,c,t,Ot)):nd&4194048,U=r,h=Ri,y=0<Ur,x=pb===Wf,c=Wt,r=Ec,f=tN,V=nN,yt&&(Xe="Transition",0<n?n>c&&(n=c):n=c,0<l?l>n&&(l=n):l=n,0<U?U>l&&(U=l):U=l,l>U&&h!==null&&(O=y?"secondary-light":"warning",r?r.run(console.timeStamp.bind(console,y?"Consecutive":"Event: "+h,U,l,Xe,Ge,O)):console.timeStamp(y?"Consecutive":"Event: "+h,U,l,Xe,Ge,O)),n>l&&(r?r.run(console.timeStamp.bind(console,"Action",l,n,Xe,Ge,"primary-dark")):console.timeStamp("Action",l,n,Xe,Ge,"primary-dark")),c>n&&(l=x?"Promise Resolved":5<c-n?"Update Blocked":"Update",U=[],V!=null&&U.push(["Component name",V]),f!=null&&U.push(["Method name",f]),n={start:n,end:c,detail:{devtools:{properties:U,track:Xe,trackGroup:Ge,color:"primary-light"}}},r?r.run(performance.measure.bind(performance,l,n)):performance.measure(l,n))),us=Ga=-1.1,pb=0,td=-1.1,Ur=Vr,Vr=-1.1,Ya=qt()),(t&62914560)!==0&&(nd&62914560)!==0&&(Ns(4194304),Uh(sN,Wt)),(t&2080374784)!==0&&(nd&2080374784)!==0&&(Ns(268435456),Uh(aN,Wt)),n=e.timeoutHandle,n!==Yi&&(e.timeoutHandle=Yi,CT(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Cs=0,Wm(),dt=e,Le=n=Ra(e.current,null),Be=t,lt=kn,Xn=null,qr=!1,el=fn(e,t),kb=!1,St=Ka,Hi=Vn=Vb=Hr=Lr=0,En=Ic=null,gd=!1,(t&8)!==0&&(t|=t&32),r=e.entangledLanes,r!==0)for(e=e.entanglements,r&=t;0<r;)l=31-yn(r),c=1<<l,t|=e[l],r&=~c;return ya=t,Vu(),e=Xx(),1e3<e-Jx&&(Y.recentlyCreatedOwnerStacks=0,Jx=e),As.discardPendingWarnings(),n}function $v(e,t){Oe=null,Y.H=Bc,Y.getCurrentStack=null,ca=!1,In=null,t===Io||t===id?(t=ug(),lt=Pc):t===vb?(t=ug(),lt=ew):lt=t===Cb?Mb:t!==null&&typeof t=="object"&&typeof t.then=="function"?$c:bd,Xn=t;var n=Le;n===null?(St=Hc,df(e,zn(t,e.current))):n.mode&Ue&&Zh(n)}function Iv(){var e=Yn.current;return e===null?!0:(Be&4194048)===Be?fs===null:(Be&62914560)===Be||(Be&536870912)!==0?e===fs:!1}function Fv(){var e=Y.H;return Y.H=Bc,e===null?Bc:e}function Yv(){var e=Y.A;return Y.A=pT,e}function xf(e){Ot===null&&(Ot=e._debugTask==null?null:e._debugTask)}function Nf(){St=Br,qr||(Be&4194048)!==Be&&Yn.current!==null||(el=!0),(Lr&134217727)===0&&(Hr&134217727)===0||dt===null||Nr(dt,Be,Vn,!1)}function ep(e,t,n){var r=Ke;Ke|=Xt;var l=Fv(),c=Yv();if(dt!==e||Be!==t){if(fa){var f=e.memoizedUpdaters;0<f.size&&(Kl(e,Be),f.clear()),ci(e,t)}Fc=null,vo(e,t)}t=!1,f=St;e:do try{if(lt!==kn&&Le!==null){var h=Le,y=Xn;switch(lt){case Mb:Wm(),f=pd;break e;case Pc:case qi:case Li:case $c:Yn.current===null&&(t=!0);var x=lt;if(lt=kn,Xn=null,xo(e,h,y,x),n&&el){f=Ka;break e}break;default:x=lt,lt=kn,Xn=null,xo(e,h,y,x)}}Gv(),f=St;break}catch(V){$v(e,V)}while(!0);return t&&e.shellSuspendCounter++,Lu(),Ke=r,Y.H=l,Y.A=c,Le===null&&(dt=null,Be=0,Vu()),f}function Gv(){for(;Le!==null;)Jv(Le)}function X_(e,t){var n=Ke;Ke|=Xt;var r=Fv(),l=Yv();if(dt!==e||Be!==t){if(fa){var c=e.memoizedUpdaters;0<c.size&&(Kl(e,Be),c.clear()),ci(e,t)}Fc=null,xd=Kt()+sw,vo(e,t)}else el=fn(e,t);e:do try{if(lt!==kn&&Le!==null)t:switch(t=Le,c=Xn,lt){case bd:lt=kn,Xn=null,xo(e,t,c,bd);break;case qi:case Li:if(lg(c)){lt=kn,Xn=null,Xv(t);break}t=function(){lt!==qi&<!==Li||dt!==e||(lt=yd),ra(e)},c.then(t,t);break e;case Pc:lt=yd;break e;case ew:lt=jb;break e;case yd:lg(c)?(lt=kn,Xn=null,Xv(t)):(lt=kn,Xn=null,xo(e,t,c,yd));break;case jb:var f=null;switch(Le.tag){case 26:f=Le.memoizedState;case 5:case 27:var h=Le;if(f?H1(f):h.stateNode.complete){lt=kn,Xn=null;var y=h.sibling;if(y!==null)Le=y;else{var x=h.return;x!==null?(Le=x,wf(x)):Le=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}lt=kn,Xn=null,xo(e,t,c,jb);break;case $c:lt=kn,Xn=null,xo(e,t,c,$c);break;case Mb:Wm(),St=pd;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}Y.actQueue!==null?Gv():Q_();break}catch(V){$v(e,V)}while(!0);return Lu(),Y.H=r,Y.A=l,Ke=n,Le!==null?Ka:(dt=null,Be=0,Vu(),St)}function Q_(){for(;Le!==null&&!XA();)Jv(Le)}function Jv(e){var t=e.alternate;(e.mode&Ue)!==Te?(Qh(e),t=be(e,Im,t,e,ya),Zh(e)):t=be(e,Im,t,e,ya),e.memoizedProps=e.pendingProps,t===null?wf(e):Le=t}function Xv(e){var t=be(e,Z_,e);e.memoizedProps=e.pendingProps,t===null?wf(e):Le=t}function Z_(e){var t=e.alternate,n=(e.mode&Ue)!==Te;switch(n&&Qh(e),e.tag){case 15:case 0:t=iv(t,e,e.pendingProps,e.type,void 0,Be);break;case 11:t=iv(t,e,e.pendingProps,e.type.render,e.ref,Be);break;case 5:um(e);default:hv(t,e),e=Le=Jy(e,ya),t=Im(t,e,ya)}return n&&Zh(e),t}function xo(e,t,n,r){Lu(),um(t),Fo=null,kc=0;var l=t.return;try{if(V_(e,l,t,n,Be)){St=Hc,df(e,zn(n,e.current)),Le=null;return}}catch(c){if(l!==null)throw Le=l,c;St=Hc,df(e,zn(n,e.current)),Le=null;return}t.flags&32768?(Fe||r===bd?e=!0:el||(Be&536870912)!==0?e=!1:(qr=e=!0,(r===qi||r===Li||r===Pc||r===$c)&&(r=Yn.current,r!==null&&r.tag===13&&(r.flags|=16384))),Qv(t,e)):wf(t)}function wf(e){var t=e;do{if((t.flags&32768)!==0){Qv(t,qr);return}var n=t.alternate;if(e=t.return,Qh(t),n=be(t,B_,n,t,ya),(t.mode&Ue)!==Te&&sg(t),n!==null){Le=n;return}if(t=t.sibling,t!==null){Le=t;return}Le=t=e}while(t!==null);St===Ka&&(St=WN)}function Qv(e,t){do{var n=q_(e.alternate,e);if(n!==null){n.flags&=32767,Le=n;return}if((e.mode&Ue)!==Te){sg(e),n=e.actualDuration;for(var r=e.child;r!==null;)n+=r.actualDuration,r=r.sibling;e.actualDuration=n}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Le=e;return}Le=e=n}while(e!==null);St=pd,Le=null}function tp(e,t,n,r,l,c,f,h,y,x,V,U,O,P){e.cancelPendingCommit=null;do Zl();while(It!==$r);if(As.flushLegacyContextWarning(),As.flushPendingUnsafeLifecycleWarnings(),(Ke&(Xt|Jn))!==tn)throw Error("Should not already be working.");if(Ns(n),x===Bi?Vh(O,P,n,Ot):r!==null?w_(O,P,n,r,t!==null&&t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)!==0,Ot):N_(O,P,n,Ot),t!==null){if(n===0&&console.error("finishedLanes should not be empty during a commit. This is a bug in React."),t===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");if(c=t.lanes|t.childLanes,c|=lb,Ah(e,n,c,f,h,y),e===dt&&(Le=dt=null,Be=0),tl=t,Ir=e,Cs=n,Bb=c,Lb=l,cw=r,qb=P,uw=U,Os=Nd,fw=null,t.actualDuration!==0||(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,nA(Ao,function(){return Zc=window.event,Os===Nd&&(Os=zb),t1(),null})):(e.callbackNode=null,e.callbackPriority=0),Fa=null,Mr=qt(),U!==null&&S_(P,Mr,U,Ot),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=Y.T,Y.T=null,l=rt.p,rt.p=ss,f=Ke,Ke|=Jn;try{F_(e,t,n)}finally{Ke=f,rt.p=l,Y.T=r}}It=rw,Zv(),Kv(),Wv()}}function Zv(){if(It===rw){It=$r;var e=Ir,t=tl,n=Cs,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=Y.T,Y.T=null;var l=rt.p;rt.p=ss;var c=Ke;Ke|=Jn;try{Ko=n,Wo=e,Iu(),Tv(t,e),Wo=Ko=null,n=Zb;var f=By(e.containerInfo),h=n.focusedElem,y=n.selectionRange;if(f!==h&&h&&h.ownerDocument&&zy(h.ownerDocument.documentElement,h)){if(y!==null&&jh(h)){var x=y.start,V=y.end;if(V===void 0&&(V=x),"selectionStart"in h)h.selectionStart=x,h.selectionEnd=Math.min(V,h.value.length);else{var U=h.ownerDocument||document,O=U&&U.defaultView||window;if(O.getSelection){var P=O.getSelection(),ce=h.textContent.length,me=Math.min(y.start,ce),mt=y.end===void 0?me:Math.min(y.end,ce);!P.extend&&me>mt&&(f=mt,mt=me,me=f);var Je=Uy(h,me),C=Uy(h,mt);if(Je&&C&&(P.rangeCount!==1||P.anchorNode!==Je.node||P.anchorOffset!==Je.offset||P.focusNode!==C.node||P.focusOffset!==C.offset)){var R=U.createRange();R.setStart(Je.node,Je.offset),P.removeAllRanges(),me>mt?(P.addRange(R),P.extend(C.node,C.offset)):(R.setEnd(C.node,C.offset),P.addRange(R))}}}}for(U=[],P=h;P=P.parentNode;)P.nodeType===1&&U.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<U.length;h++){var M=U[h];M.element.scrollLeft=M.left,M.element.scrollTop=M.top}}zd=!!Qb,Zb=Qb=null}finally{Ke=c,rt.p=l,Y.T=r}}e.current=t,It=iw}}function Kv(){if(It===iw){It=$r;var e=fw;if(e!==null){Mr=qt();var t=Ia,n=Mr;!yt||n<=t||console.timeStamp(e,t,n,Xe,Ge,"secondary-light")}e=Ir,t=tl,n=Cs;var r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=Y.T,Y.T=null;var l=rt.p;rt.p=ss;var c=Ke;Ke|=Jn;try{Ko=n,Wo=e,Iu(),Sv(e,t.alternate,t),Wo=Ko=null}finally{Ke=c,rt.p=l,Y.T=r}}e=qb,t=uw,Ia=qt(),e=t===null?e:Mr,t=Ia,n=Os===Ub,r=Ot,Fa!==null?$y(e,t,Fa,!1,r):!yt||t<=e||(r?r.run(console.timeStamp.bind(console,n?"Commit Interrupted View Transition":"Commit",e,t,Xe,Ge,n?"error":"secondary-dark")):console.timeStamp(n?"Commit Interrupted View Transition":"Commit",e,t,Xe,Ge,n?"error":"secondary-dark")),It=ow}}function Wv(){if(It===lw||It===ow){if(It===lw){var e=Ia;Ia=qt();var t=Ia,n=Os===Ub;!yt||t<=e||console.timeStamp(n?"Interrupted View Transition":"Starting Animation",e,t,Xe,Ge,n?" error":"secondary-light"),Os!==Ub&&(Os=aw)}It=$r,QA(),e=Ir;var r=tl;t=Cs,n=cw;var l=r.actualDuration!==0||(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0;l?It=wd:(It=$r,tl=Ir=null,e1(e,e.pendingLanes),Pi=0,Gc=null);var c=e.pendingLanes;if(c===0&&(Pr=null),l||r1(e),c=no(t),r=r.stateNode,hn&&typeof hn.onCommitFiberRoot=="function")try{var f=(r.current.flags&128)===128;switch(c){case ss:var h=Lp;break;case da:h=Hp;break;case qa:h=Ao;break;case Lf:h=Pp;break;default:h=Ao}hn.onCommitFiberRoot(Do,r,h,f)}catch(U){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",U))}if(fa&&e.memoizedUpdaters.clear(),G_(),n!==null){f=Y.T,h=rt.p,rt.p=ss,Y.T=null;try{var y=e.onRecoverableError;for(r=0;r<n.length;r++){var x=n[r],V=K_(x.stack);be(x.source,y,x.value,V)}}finally{Y.T=f,rt.p=h}}(Cs&3)!==0&&Zl(),ra(e),c=e.pendingLanes,(t&261930)!==0&&(c&42)!==0?(ad=!0,e===Hb?Yc++:(Yc=0,Hb=e)):Yc=0,l||Ei(t,Ia),Wl(0)}}function K_(e){return e={componentStack:e},Object.defineProperty(e,"digest",{get:function(){console.error('You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.')}}),e}function e1(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Vl(t)))}function Zl(){return Zv(),Kv(),Wv(),t1()}function t1(){if(It!==wd)return!1;var e=Ir,t=Bb;Bb=0;var n=no(Cs),r=qa>n?qa:n;n=Y.T;var l=rt.p;try{rt.p=r,Y.T=null;var c=Lb;Lb=null,r=Ir;var f=Cs;if(It=$r,tl=Ir=null,Cs=0,(Ke&(Xt|Jn))!==tn)throw Error("Cannot flush passive effects while already rendering.");Ns(f),Pb=!0,Sd=!1;var h=0;if(Fa=null,h=Kt(),Os===aw)Uh(Ia,h,lT);else{var y=Ia,x=h,V=Os===zb;!yt||x<=y||(Ot?Ot.run(console.timeStamp.bind(console,V?"Waiting for Paint":"Waiting",y,x,Xe,Ge,"secondary-light")):console.timeStamp(V?"Waiting for Paint":"Waiting",y,x,Xe,Ge,"secondary-light"))}y=Ke,Ke|=Jn;var U=r.current;Iu(),Uv(U);var O=r.current;U=qb,Iu(),jv(r,O,f,c,U),r1(r),Ke=y;var P=Kt();if(O=h,U=Ot,Fa!==null?$y(O,P,Fa,!0,U):!yt||P<=O||(U?U.run(console.timeStamp.bind(console,"Remaining Effects",O,P,Xe,Ge,"secondary-dark")):console.timeStamp("Remaining Effects",O,P,Xe,Ge,"secondary-dark")),Ei(f,P),Wl(0,!1),Sd?r===Gc?Pi++:(Pi=0,Gc=r):Pi=0,Sd=Pb=!1,hn&&typeof hn.onPostCommitFiberRoot=="function")try{hn.onPostCommitFiberRoot(Do,r)}catch(me){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",me))}var ce=r.current.stateNode;return ce.effectDuration=0,ce.passiveEffectDuration=0,!0}finally{rt.p=l,Y.T=n,e1(e,t)}}function n1(e,t,n){t=zn(n,t),ag(t),t=Mm(e.stateNode,t,2),e=yr(e,t,2),e!==null&&(li(e,2),ra(e))}function at(e,t,n){if(nl=!1,e.tag===3)n1(e,e,n);else{for(;t!==null;){if(t.tag===3){n1(t,e,n);return}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Pr===null||!Pr.has(r))){e=zn(n,e),ag(e),n=km(2),r=yr(t,n,2),r!==null&&(Vm(n,r,t,e),li(r,2),ra(r));return}}t=t.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
168
|
+
|
|
169
|
+
Error message:
|
|
170
|
+
|
|
171
|
+
%s`,n)}}function np(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new yT;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(kb=!0,l.add(n),r=W_.bind(null,e,t,n),fa&&Kl(e,n),t.then(r,r))}function W_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,(n&127)!==0?0>pa&&(Ci=pa=qt(),wc=Kf("Promise Resolved"),kr=Wf):(n&4194048)!==0&&0>us&&(Ya=us=qt(),Ec=Kf("Promise Resolved"),pb=Wf),qv()&&Y.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
172
|
+
|
|
173
|
+
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
174
|
+
|
|
175
|
+
act(() => {
|
|
176
|
+
/* finish loading suspended data */
|
|
177
|
+
});
|
|
178
|
+
/* assert on the output */
|
|
179
|
+
|
|
180
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),dt===e&&(Be&n)===n&&(St===Br||St===md&&(Be&62914560)===Be&&Kt()-vd<nw?(Ke&Xt)===tn&&vo(e,0):Vb|=n,Hi===Be&&(Hi=0)),ra(e)}function s1(e,t){t===0&&(t=wl()),e=dn(e,t),e!==null&&(li(e,t),ra(e))}function eA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),s1(e,n)}function tA(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}r!==null&&r.delete(t),s1(e,n)}function sp(e,t,n){if((t.subtreeFlags&67117056)!==0)for(t=t.child;t!==null;){var r=e,l=t,c=l.type===kf;c=n||c,l.tag!==22?l.flags&67108864?c&&be(l,a1,r,l):sp(r,l,c):l.memoizedState===null&&(c&&l.flags&8192?be(l,a1,r,l):l.subtreeFlags&67108864&&be(l,sp,r,l,c)),t=t.sibling}}function a1(e,t){bt(!0);try{Ov(t),zv(t),Rv(e,t.alternate,t,!1),Mv(e,t,0,null,!1,0)}finally{bt(!1)}}function r1(e){var t=!0;e.current.mode&(mn|_s)||(t=!1),sp(e,e.current,t)}function i1(e){if((Ke&Xt)===tn){var t=e.tag;if(t===3||t===1||t===0||t===11||t===14||t===15){if(t=H(e)||"ReactComponent",Ed!==null){if(Ed.has(t))return;Ed.add(t)}else Ed=new Set([t]);be(e,function(){console.error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead.")})}}}function Kl(e,t){fa&&e.memoizedUpdaters.forEach(function(n){zs(e,n,t)})}function nA(e,t){var n=Y.actQueue;return n!==null?(n.push(t),xT):qp(e,t)}function sA(e){qv()&&Y.actQueue===null&&be(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
|
|
181
|
+
|
|
182
|
+
When testing, code that causes React state updates should be wrapped into act(...):
|
|
183
|
+
|
|
184
|
+
act(() => {
|
|
185
|
+
/* fire events that update state */
|
|
186
|
+
});
|
|
187
|
+
/* assert on the output */
|
|
188
|
+
|
|
189
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,H(e))})}function ra(e){e!==sl&&e.next===null&&(sl===null?_d=sl=e:sl=sl.next=e),Ad=!0,Y.actQueue!==null?Ib||(Ib=!0,u1()):$b||($b=!0,u1())}function Wl(e,t){if(!Fb&&Ad){Fb=!0;do for(var n=!1,r=_d;r!==null;){if(e!==0){var l=r.pendingLanes;if(l===0)var c=0;else{var f=r.suspendedLanes,h=r.pingedLanes;c=(1<<31-yn(42|e)+1)-1,c&=l&~(f&~h),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,c1(r,c))}else c=Be,c=Da(r,r===dt?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==Yi),(c&3)===0||fn(r,c)||(n=!0,c1(r,c));r=r.next}while(n);Fb=!1}}function aA(){Zc=window.event,ap()}function ap(){Ad=Ib=$b=!1;var e=0;Fr!==0&&fA()&&(e=Fr);for(var t=Kt(),n=null,r=_d;r!==null;){var l=r.next,c=o1(r,t);c===0?(r.next=null,n===null?_d=l:n.next=l,l===null&&(sl=n)):(n=r,(e!==0||(c&3)!==0)&&(Ad=!0)),r=l}It!==$r&&It!==wd||Wl(e),Fr!==0&&(Fr=0)}function o1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var f=31-yn(c),h=1<<f,y=l[f];y===-1?((h&n)===0||(h&r)!==0)&&(l[f]=_h(h,t)):y<=t&&(e.expiredLanes|=h),c&=~h}if(t=dt,n=Be,n=Da(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Yi),r=e.callbackNode,n===0||e===t&&(lt===qi||lt===Li)||e.cancelPendingCommit!==null)return r!==null&&rp(r),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||fn(e,n)){if(t=n&-n,t!==e.callbackPriority||Y.actQueue!==null&&r!==Yb)rp(r);else return t;switch(no(n)){case ss:case da:n=Hp;break;case qa:n=Ao;break;case Lf:n=Pp;break;default:n=Ao}return r=l1.bind(null,e),Y.actQueue!==null?(Y.actQueue.push(r),n=Yb):n=qp(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&rp(r),e.callbackPriority=2,e.callbackNode=null,2}function l1(e,t){if(ad=sd=!1,Zc=window.event,It!==$r&&It!==wd)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Os===Nd&&(Os=zb),Zl()&&e.callbackNode!==n)return null;var r=Be;return r=Da(e,e===dt?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==Yi),r===0?null:(Hv(e,r,t),o1(e,Kt()),e.callbackNode!=null&&e.callbackNode===n?l1.bind(null,e):null)}function c1(e,t){if(Zl())return null;sd=ad,ad=!1,Hv(e,t,!0)}function rp(e){e!==Yb&&e!==null&&JA(e)}function u1(){Y.actQueue!==null&&Y.actQueue.push(function(){return ap(),null}),OT(function(){(Ke&(Xt|Jn))!==tn?qp(Lp,aA):ap()})}function ip(){if(Fr===0){var e=ji;e===0&&(e=zf,zf<<=1,(zf&261888)===0&&(zf=256)),Fr=e}return Fr}function f1(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:(st(e,"action"),Rl(""+e))}function d1(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function rA(e,t,n,r,l){if(t==="submit"&&n&&n.stateNode===l){var c=f1((l[gn]||null).action),f=r.submitter;f&&(t=(t=f[gn]||null)?f1(t.formAction):f.getAttribute("formAction"),t!==null&&(c=t,f=null));var h=new Ff("action","action",null,r,l);e.push({event:h,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Fr!==0){var y=f?d1(l,f):new FormData(l),x={pending:!0,data:y,method:l.method,action:c};Object.freeze(x),Am(n,x,null,y)}}else typeof c=="function"&&(h.preventDefault(),y=f?d1(l,f):new FormData(l),x={pending:!0,data:y,method:l.method,action:c},Object.freeze(x),Am(n,x,c,y))},currentTarget:l}]})}}function Sf(e,t,n){e.currentTarget=n;try{t(e)}catch(r){ab(r)}e.currentTarget=null}function h1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n];e:{var l=void 0,c=r.event;if(r=r.listeners,t)for(var f=r.length-1;0<=f;f--){var h=r[f],y=h.instance,x=h.currentTarget;if(h=h.listener,y!==l&&c.isPropagationStopped())break e;y!==null?be(y,Sf,c,h,x):Sf(c,h,x),l=y}else for(f=0;f<r.length;f++){if(h=r[f],y=h.instance,x=h.currentTarget,h=h.listener,y!==l&&c.isPropagationStopped())break e;y!==null?be(y,Sf,c,h,x):Sf(c,h,x),l=y}}}}function Ye(e,t){Gb.has(e)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var n=t[$p];n===void 0&&(n=t[$p]=new Set);var r=e+"__bubble";n.has(r)||(m1(t,e,2,!1),n.add(r))}function op(e,t,n){Gb.has(e)&&!t&&console.error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',e);var r=0;t&&(r|=4),m1(n,e,r,t)}function lp(e){if(!e[Dd]){e[Dd]=!0,ux.forEach(function(n){n!=="selectionchange"&&(Gb.has(n)||op(n,!1,e),op(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Dd]||(t[Dd]=!0,op("selectionchange",!1,t))}}function m1(e,t,n,r){switch(G1(t)){case ss:var l=qA;break;case da:l=LA;break;default:l=Ep}n=l.bind(null,t,n,e),l=void 0,!Jp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),r?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function cp(e,t,n,r,l){var c=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var f=r.tag;if(f===3||f===4){var h=r.stateNode.containerInfo;if(h===l)break;if(f===4)for(f=r.return;f!==null;){var y=f.tag;if((y===3||y===4)&&f.stateNode.containerInfo===l)return;f=f.return}for(;h!==null;){if(f=Bs(h),f===null)return;if(y=f.tag,y===5||y===6||y===26||y===27){r=c=f;continue e}h=h.parentNode}}r=r.return}_y(function(){var x=c,V=Oh(n),U=[];e:{var O=Gx.get(e);if(O!==void 0){var P=Ff,ce=e;switch(e){case"keypress":if(Ou(n)===0)break e;case"keydown":case"keyup":P=VD;break;case"focusin":ce="focus",P=Kp;break;case"focusout":ce="blur",P=Kp;break;case"beforeblur":case"afterblur":P=Kp;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=Mx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=SD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=BD;break;case $x:case Ix:case Fx:P=AD;break;case Yx:P=LD;break;case"scroll":case"scrollend":P=ND;break;case"wheel":P=PD;break;case"copy":case"cut":case"paste":P=TD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Vx;break;case"toggle":case"beforetoggle":P=ID}var me=(t&4)!==0,mt=!me&&(e==="scroll"||e==="scrollend"),Je=me?O!==null?O+"Capture":null:O;me=[];for(var C=x,R;C!==null;){var M=C;if(R=M.stateNode,M=M.tag,M!==5&&M!==26&&M!==27||R===null||Je===null||(M=jl(C,Je),M!=null&&me.push(ec(C,M,R))),mt)break;C=C.return}0<me.length&&(O=new P(O,ce,null,n,V),U.push({event:O,listeners:me}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",O&&n!==fc&&(ce=n.relatedTarget||n.fromElement)&&(Bs(ce)||ce[Dr]))break e;if((P||O)&&(O=V.window===V?V:(O=V.ownerDocument)?O.defaultView||O.parentWindow:window,P?(ce=n.relatedTarget||n.toElement,P=x,ce=ce?Bs(ce):null,ce!==null&&(mt=ee(ce),me=ce.tag,ce!==mt||me!==5&&me!==27&&me!==6)&&(ce=null)):(P=null,ce=x),P!==ce)){if(me=Mx,M="onMouseLeave",Je="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(me=Vx,M="onPointerLeave",Je="onPointerEnter",C="pointer"),mt=P==null?O:Ta(P),R=ce==null?O:Ta(ce),O=new me(M,C+"leave",P,n,V),O.target=mt,O.relatedTarget=R,M=null,Bs(V)===x&&(me=new me(Je,C+"enter",ce,n,V),me.target=R,me.relatedTarget=mt,M=me),mt=M,P&&ce)t:{for(me=iA,Je=P,C=ce,R=0,M=Je;M;M=me(M))R++;M=0;for(var J=C;J;J=me(J))M++;for(;0<R-M;)Je=me(Je),R--;for(;0<M-R;)C=me(C),M--;for(;R--;){if(Je===C||C!==null&&Je===C.alternate){me=Je;break t}Je=me(Je),C=me(C)}me=null}else me=null;P!==null&&p1(U,O,P,me,!1),ce!==null&&mt!==null&&p1(U,mt,ce,me,!0)}}e:{if(O=x?Ta(x):window,P=O.nodeName&&O.nodeName.toLowerCase(),P==="select"||P==="input"&&O.type==="file")var fe=jy;else if(Oy(O))if(Hx)fe=g_;else{fe=b_;var Re=p_}else P=O.nodeName,!P||P.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?x&&Ol(x.elementType)&&(fe=jy):fe=y_;if(fe&&(fe=fe(e,x))){Ry(U,fe,n,V);break e}Re&&Re(e,O,x),e==="focusout"&&x&&O.type==="number"&&x.memoizedProps.value!=null&&ui(O,"number",O.value)}switch(Re=x?Ta(x):window,e){case"focusin":(Oy(Re)||Re.contentEditable==="true")&&(ko=Re,eb=x,gc=null);break;case"focusout":gc=eb=ko=null;break;case"mousedown":tb=!0;break;case"contextmenu":case"mouseup":case"dragend":tb=!1,qy(U,n,V);break;case"selectionchange":if(JD)break;case"keydown":case"keyup":qy(U,n,V)}var Ee;if(Wp)e:{switch(e){case"compositionstart":var we="onCompositionStart";break e;case"compositionend":we="onCompositionEnd";break e;case"compositionupdate":we="onCompositionUpdate";break e}we=void 0}else Mo?Ty(e,n)&&(we="onCompositionEnd"):e==="keydown"&&n.keyCode===Ux&&(we="onCompositionStart");we&&(zx&&n.locale!=="ko"&&(Mo||we!=="onCompositionStart"?we==="onCompositionEnd"&&Mo&&(Ee=Ay()):(Tr=V,Xp="value"in Tr?Tr.value:Tr.textContent,Mo=!0)),Re=Ef(x,we),0<Re.length&&(we=new kx(we,e,null,n,V),U.push({event:we,listeners:Re}),Ee?we.data=Ee:(Ee=Cy(n),Ee!==null&&(we.data=Ee)))),(Ee=YD?f_(e,n):d_(e,n))&&(we=Ef(x,"onBeforeInput"),0<we.length&&(Re=new OD("onBeforeInput","beforeinput",null,n,V),U.push({event:Re,listeners:we}),Re.data=Ee)),rA(U,e,x,n,V)}h1(U,t)})}function ec(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ef(e,t){for(var n=t+"Capture",r=[];e!==null;){var l=e,c=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||c===null||(l=jl(e,n),l!=null&&r.unshift(ec(e,l,c)),l=jl(e,t),l!=null&&r.push(ec(e,l,c))),e.tag===3)return r;e=e.return}return[]}function iA(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function p1(e,t,n,r,l){for(var c=t._reactName,f=[];n!==null&&n!==r;){var h=n,y=h.alternate,x=h.stateNode;if(h=h.tag,y!==null&&y===r)break;h!==5&&h!==26&&h!==27||x===null||(y=x,l?(x=jl(n,c),x!=null&&f.unshift(ec(n,x,y))):l||(x=jl(n,c),x!=null&&f.push(ec(n,x,y)))),n=n.return}f.length!==0&&e.push({event:t,listeners:f})}function up(e,t){o_(e,t),e!=="input"&&e!=="textarea"&&e!=="select"||t==null||t.value!==null||Rx||(Rx=!0,e==="select"&&t.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e));var n={registrationNameDependencies:_i,possibleRegistrationNames:Ip};Ol(e)||typeof t.is=="string"||c_(e,t,n),t.contentEditable&&!t.suppressContentEditableWarning&&t.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function Zt(e,t,n,r){t!==n&&(n=wr(n),wr(t)!==n&&(r[e]=t))}function oA(e,t,n){t.forEach(function(r){n[g1(r)]=r==="style"?dp(e):e.getAttribute(r)})}function ia(e,t){t===!1?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)}function b1(e,t){return e=e.namespaceURI===Pf||e.namespaceURI===Co?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=t,e.innerHTML}function wr(e){return Aa(e)&&(console.error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",_a(e)),ir(e)),(typeof e=="string"?e:""+e).replace(NT,`
|
|
190
|
+
`).replace(wT,"")}function y1(e,t){return t=wr(t),wr(e)===t}function ut(e,t,n,r,l,c){switch(n){case"children":typeof r=="string"?(Cu(r,t,!1),t==="body"||t==="textarea"&&r===""||Cl(e,r)):(typeof r=="number"||typeof r=="bigint")&&(Cu(""+r,t,!1),t!=="body"&&Cl(e,""+r));break;case"className":Ps(e,"class",r);break;case"tabIndex":Ps(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Ps(e,n,r);break;case"style":wy(e,r,c);break;case"data":if(t!=="object"){Ps(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){console.error(n==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',n,n),e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}st(r,n),r=Rl(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(r!=null&&(t==="form"?n==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof r=="function"&&(l.encType==null&&l.method==null||Od||(Od=!0,console.error("Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.")),l.target==null||Cd||(Cd=!0,console.error("Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."))):t==="input"||t==="button"?n==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):t!=="input"||l.type==="submit"||l.type==="image"||Td?t!=="button"||l.type==null||l.type==="submit"||Td?typeof r=="function"&&(l.name==null||bw||(bw=!0,console.error('Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.')),l.formEncType==null&&l.formMethod==null||Od||(Od=!0,console.error("Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.")),l.formTarget==null||Cd||(Cd=!0,console.error("Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."))):(Td=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(Td=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(n==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(n==="formAction"?(t!=="input"&&ut(e,t,"name",l.name,l,null),ut(e,t,"formEncType",l.formEncType,l,null),ut(e,t,"formMethod",l.formMethod,l,null),ut(e,t,"formTarget",l.formTarget,l,null)):(ut(e,t,"encType",l.encType,l,null),ut(e,t,"method",l.method,l,null),ut(e,t,"target",l.target,l,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}st(r,n),r=Rl(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(typeof r!="function"&&ia(n,r),e.onclick=Oa);break;case"onScroll":r!=null&&(typeof r!="function"&&ia(n,r),Ye("scroll",e));break;case"onScrollEnd":r!=null&&(typeof r!="function"&&ia(n,r),Ye("scrollend",e));break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(n=r.__html,n!=null){if(l.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}st(r,n),n=Rl(""+r),e.setAttributeNS($i,"xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?(st(r,n),e.setAttribute(n,""+r)):e.removeAttribute(n);break;case"inert":r!==""||Rd[n]||(Rd[n]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",n));case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?(st(r,n),e.setAttribute(n,r)):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?(st(r,n),e.setAttribute(n,r)):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):(st(r,n),e.setAttribute(n,r));break;case"popover":Ye("beforetoggle",e),Ye("toggle",e),vs(e,"popover",r);break;case"xlinkActuate":Tn(e,$i,"xlink:actuate",r);break;case"xlinkArcrole":Tn(e,$i,"xlink:arcrole",r);break;case"xlinkRole":Tn(e,$i,"xlink:role",r);break;case"xlinkShow":Tn(e,$i,"xlink:show",r);break;case"xlinkTitle":Tn(e,$i,"xlink:title",r);break;case"xlinkType":Tn(e,$i,"xlink:type",r);break;case"xmlBase":Tn(e,Jb,"xml:base",r);break;case"xmlLang":Tn(e,Jb,"xml:lang",r);break;case"xmlSpace":Tn(e,Jb,"xml:space",r);break;case"is":c!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),vs(e,"is",r);break;case"innerText":case"textContent":break;case"popoverTarget":yw||r==null||typeof r!="object"||(yw=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",r));default:!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N"?(n=Sy(n),vs(e,n,r)):_i.hasOwnProperty(n)&&r!=null&&typeof r!="function"&&ia(n,r)}}function fp(e,t,n,r,l,c){switch(n){case"style":wy(e,r,c);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(n=r.__html,n!=null){if(l.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=n}}break;case"children":typeof r=="string"?Cl(e,r):(typeof r=="number"||typeof r=="bigint")&&Cl(e,""+r);break;case"onScroll":r!=null&&(typeof r!="function"&&ia(n,r),Ye("scroll",e));break;case"onScrollEnd":r!=null&&(typeof r!="function"&&ia(n,r),Ye("scrollend",e));break;case"onClick":r!=null&&(typeof r!="function"&&ia(n,r),e.onclick=Oa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(_i.hasOwnProperty(n))r!=null&&typeof r!="function"&&ia(n,r);else e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),c=e[gn]||null,c=c!=null?c[n]:null,typeof c=="function"&&e.removeEventListener(t,c,l),typeof r=="function")){typeof c!="function"&&c!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,l);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):vs(e,n,r)}}}function on(e,t,n){switch(up(t,n),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ye("error",e),Ye("load",e);var r=!1,l=!1,c;for(c in n)if(n.hasOwnProperty(c)){var f=n[c];if(f!=null)switch(c){case"src":r=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:ut(e,t,c,f,n,null)}}l&&ut(e,t,"srcSet",n.srcSet,n,null),r&&ut(e,t,"src",n.src,n,null);return;case"input":Hs("input",n),Ye("invalid",e);var h=c=f=l=null,y=null,x=null;for(r in n)if(n.hasOwnProperty(r)){var V=n[r];if(V!=null)switch(r){case"name":l=V;break;case"type":f=V;break;case"checked":y=V;break;case"defaultChecked":x=V;break;case"value":c=V;break;case"defaultValue":h=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ut(e,t,r,V,n,null)}}$s(e,n),oo(e,c,h,y,x,f,l,!1);return;case"select":Hs("select",n),Ye("invalid",e),r=f=c=null;for(l in n)if(n.hasOwnProperty(l)&&(h=n[l],h!=null))switch(l){case"value":c=h;break;case"defaultValue":f=h;break;case"multiple":r=h;default:ut(e,t,l,h,n,null)}Tl(e,n),t=c,n=f,e.multiple=!!r,t!=null?Ut(e,!!r,t,!1):n!=null&&Ut(e,!!r,n,!0);return;case"textarea":Hs("textarea",n),Ye("invalid",e),c=l=r=null;for(f in n)if(n.hasOwnProperty(f)&&(h=n[f],h!=null))switch(f){case"value":r=h;break;case"defaultValue":l=h;break;case"children":c=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:ut(e,t,f,h,n,null)}N(e,n),E(e,r,l,c);return;case"option":Dl(e,n);for(y in n)if(n.hasOwnProperty(y)&&(r=n[y],r!=null))switch(y){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:ut(e,t,y,r,n,null)}return;case"dialog":Ye("beforetoggle",e),Ye("toggle",e),Ye("cancel",e),Ye("close",e);break;case"iframe":case"object":Ye("load",e);break;case"video":case"audio":for(r=0;r<Jc.length;r++)Ye(Jc[r],e);break;case"image":Ye("error",e),Ye("load",e);break;case"details":Ye("toggle",e);break;case"embed":case"source":case"link":Ye("error",e),Ye("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(x in n)if(n.hasOwnProperty(x)&&(r=n[x],r!=null))switch(x){case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:ut(e,t,x,r,n,null)}return;default:if(Ol(t)){for(V in n)n.hasOwnProperty(V)&&(r=n[V],r!==void 0&&fp(e,t,V,r,n,void 0));return}}for(h in n)n.hasOwnProperty(h)&&(r=n[h],r!=null&&ut(e,t,h,r,n,null))}function lA(e,t,n,r){switch(up(t,r),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,c=null,f=null,h=null,y=null,x=null,V=null;for(P in n){var U=n[P];if(n.hasOwnProperty(P)&&U!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":y=U;default:r.hasOwnProperty(P)||ut(e,t,P,null,r,U)}}for(var O in r){var P=r[O];if(U=n[O],r.hasOwnProperty(O)&&(P!=null||U!=null))switch(O){case"type":c=P;break;case"name":l=P;break;case"checked":x=P;break;case"defaultChecked":V=P;break;case"value":f=P;break;case"defaultValue":h=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:P!==U&&ut(e,t,O,P,r,U)}}t=n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null,r=r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null,t||!r||pw||(console.error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),pw=!0),!t||r||mw||(console.error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components"),mw=!0),Is(e,f,h,y,x,V,c,l);return;case"select":P=f=h=O=null;for(c in n)if(y=n[c],n.hasOwnProperty(c)&&y!=null)switch(c){case"value":break;case"multiple":P=y;default:r.hasOwnProperty(c)||ut(e,t,c,null,r,y)}for(l in r)if(c=r[l],y=n[l],r.hasOwnProperty(l)&&(c!=null||y!=null))switch(l){case"value":O=c;break;case"defaultValue":h=c;break;case"multiple":f=c;default:c!==y&&ut(e,t,l,c,r,y)}r=h,t=f,n=P,O!=null?Ut(e,!!t,O,!1):!!n!=!!t&&(r!=null?Ut(e,!!t,r,!0):Ut(e,!!t,t?[]:"",!1));return;case"textarea":P=O=null;for(h in n)if(l=n[h],n.hasOwnProperty(h)&&l!=null&&!r.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:ut(e,t,h,null,r,l)}for(f in r)if(l=r[f],c=n[f],r.hasOwnProperty(f)&&(l!=null||c!=null))switch(f){case"value":O=l;break;case"defaultValue":P=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:l!==c&&ut(e,t,f,l,r,c)}A(e,O,P);return;case"option":for(var ce in n)if(O=n[ce],n.hasOwnProperty(ce)&&O!=null&&!r.hasOwnProperty(ce))switch(ce){case"selected":e.selected=!1;break;default:ut(e,t,ce,null,r,O)}for(y in r)if(O=r[y],P=n[y],r.hasOwnProperty(y)&&O!==P&&(O!=null||P!=null))switch(y){case"selected":e.selected=O&&typeof O!="function"&&typeof O!="symbol";break;default:ut(e,t,y,O,r,P)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var me in n)O=n[me],n.hasOwnProperty(me)&&O!=null&&!r.hasOwnProperty(me)&&ut(e,t,me,null,r,O);for(x in r)if(O=r[x],P=n[x],r.hasOwnProperty(x)&&O!==P&&(O!=null||P!=null))switch(x){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:ut(e,t,x,O,r,P)}return;default:if(Ol(t)){for(var mt in n)O=n[mt],n.hasOwnProperty(mt)&&O!==void 0&&!r.hasOwnProperty(mt)&&fp(e,t,mt,void 0,r,O);for(V in r)O=r[V],P=n[V],!r.hasOwnProperty(V)||O===P||O===void 0&&P===void 0||fp(e,t,V,O,r,P);return}}for(var Je in n)O=n[Je],n.hasOwnProperty(Je)&&O!=null&&!r.hasOwnProperty(Je)&&ut(e,t,Je,null,r,O);for(U in r)O=r[U],P=n[U],!r.hasOwnProperty(U)||O===P||O==null&&P==null||ut(e,t,U,O,r,P)}function g1(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function dp(e){var t={};e=e.style;for(var n=0;n<e.length;n++){var r=e[n];t[r]=e.getPropertyValue(r)}return t}function v1(e,t,n){if(t!=null&&typeof t!="object")console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var r,l=r="",c;for(c in t)if(t.hasOwnProperty(c)){var f=t[c];f!=null&&typeof f!="boolean"&&f!==""&&(c.indexOf("--")===0?(to(f,c),r+=l+c+":"+(""+f).trim()):typeof f!="number"||f===0||Cx.has(c)?(to(f,c),r+=l+c.replace(Ex,"-$1").toLowerCase().replace(_x,"-ms-")+":"+(""+f).trim()):r+=l+c.replace(Ex,"-$1").toLowerCase().replace(_x,"-ms-")+":"+f+"px",l=";")}r=r||null,t=e.getAttribute("style"),t!==r&&(r=wr(r),wr(t)!==r&&(n.style=dp(e)))}}function ns(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return}else if(r!=null)switch(typeof r){case"function":case"symbol":case"boolean":break;default:if(st(r,t),e===""+r)return}Zt(t,e,r,c)}function x1(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null){switch(typeof r){case"function":case"symbol":return}if(!r)return}else switch(typeof r){case"function":case"symbol":break;default:if(r)return}Zt(t,e,r,c)}function hp(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case"undefined":case"function":case"symbol":return}else if(r!=null)switch(typeof r){case"function":case"symbol":break;default:if(st(r,n),e===""+r)return}Zt(t,e,r,c)}function N1(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(r))return}else if(r!=null)switch(typeof r){case"function":case"symbol":case"boolean":break;default:if(!isNaN(r)&&(st(r,t),e===""+r))return}Zt(t,e,r,c)}function mp(e,t,n,r,l,c){if(l.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return}else if(r!=null)switch(typeof r){case"function":case"symbol":case"boolean":break;default:if(st(r,t),n=Rl(""+r),e===n)return}Zt(t,e,r,c)}function w1(e,t,n,r){for(var l={},c=new Set,f=e.attributes,h=0;h<f.length;h++)switch(f[h].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:c.add(f[h].name)}if(Ol(t)){for(var y in n)if(n.hasOwnProperty(y)){var x=n[y];if(x!=null){if(_i.hasOwnProperty(y))typeof x!="function"&&ia(y,x);else if(n.suppressHydrationWarning!==!0)switch(y){case"children":typeof x!="string"&&typeof x!="number"||Zt("children",e.textContent,x,l);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":f=e.innerHTML,x=x?x.__html:void 0,x!=null&&(x=b1(e,x),Zt(y,f,x,l));continue;case"style":c.delete(y),v1(e,x,l);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":c.delete(y.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",y);continue;case"className":c.delete("class"),f=cr(e,"class",x),Zt("className",f,x,l);continue;default:r.context===Wa&&t!=="svg"&&t!=="math"?c.delete(y.toLowerCase()):c.delete(y),f=cr(e,y,x),Zt(y,f,x,l)}}}}else for(x in n)if(n.hasOwnProperty(x)&&(y=n[x],y!=null)){if(_i.hasOwnProperty(x))typeof y!="function"&&ia(x,y);else if(n.suppressHydrationWarning!==!0)switch(x){case"children":typeof y!="string"&&typeof y!="number"||Zt("children",e.textContent,y,l);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":f=e.innerHTML,y=y?y.__html:void 0,y!=null&&(y=b1(e,y),f!==y&&(l[x]={__html:f}));continue;case"className":ns(e,x,"class",y,c,l);continue;case"tabIndex":ns(e,x,"tabindex",y,c,l);continue;case"style":c.delete(x),v1(e,y,l);continue;case"multiple":c.delete(x),Zt(x,e.multiple,y,l);continue;case"muted":c.delete(x),Zt(x,e.muted,y,l);continue;case"autoFocus":c.delete("autofocus"),Zt(x,e.autofocus,y,l);continue;case"data":if(t!=="object"){c.delete(x),f=e.getAttribute("data"),Zt(x,f,y,l);continue}case"src":case"href":if(!(y!==""||t==="a"&&x==="href"||t==="object"&&x==="data")){console.error(x==="src"?'An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.':'An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.',x,x);continue}mp(e,x,x,y,c,l);continue;case"action":case"formAction":if(f=e.getAttribute(x),typeof y=="function"){c.delete(x.toLowerCase()),x==="formAction"?(c.delete("name"),c.delete("formenctype"),c.delete("formmethod"),c.delete("formtarget")):(c.delete("enctype"),c.delete("method"),c.delete("target"));continue}else if(f===ST){c.delete(x.toLowerCase()),Zt(x,"function",y,l);continue}mp(e,x,x.toLowerCase(),y,c,l);continue;case"xlinkHref":mp(e,x,"xlink:href",y,c,l);continue;case"contentEditable":hp(e,x,"contenteditable",y,c,l);continue;case"spellCheck":hp(e,x,"spellcheck",y,c,l);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":hp(e,x,x,y,c,l);continue;case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":x1(e,x,x.toLowerCase(),y,c,l);continue;case"capture":case"download":e:{h=e;var V=f=x,U=l;if(c.delete(V),h=h.getAttribute(V),h===null)switch(typeof y){case"undefined":case"function":case"symbol":break e;default:if(y===!1)break e}else if(y!=null)switch(typeof y){case"function":case"symbol":break;case"boolean":if(y===!0&&h==="")break e;break;default:if(st(y,f),h===""+y)break e}Zt(f,h,y,U)}continue;case"cols":case"rows":case"size":case"span":e:{if(h=e,V=f=x,U=l,c.delete(V),h=h.getAttribute(V),h===null)switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(y)||1>y)break e}else if(y!=null)switch(typeof y){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(y)||1>y)&&(st(y,f),h===""+y))break e}Zt(f,h,y,U)}continue;case"rowSpan":N1(e,x,"rowspan",y,c,l);continue;case"start":N1(e,x,x,y,c,l);continue;case"xHeight":ns(e,x,"x-height",y,c,l);continue;case"xlinkActuate":ns(e,x,"xlink:actuate",y,c,l);continue;case"xlinkArcrole":ns(e,x,"xlink:arcrole",y,c,l);continue;case"xlinkRole":ns(e,x,"xlink:role",y,c,l);continue;case"xlinkShow":ns(e,x,"xlink:show",y,c,l);continue;case"xlinkTitle":ns(e,x,"xlink:title",y,c,l);continue;case"xlinkType":ns(e,x,"xlink:type",y,c,l);continue;case"xmlBase":ns(e,x,"xml:base",y,c,l);continue;case"xmlLang":ns(e,x,"xml:lang",y,c,l);continue;case"xmlSpace":ns(e,x,"xml:space",y,c,l);continue;case"inert":y!==""||Rd[x]||(Rd[x]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",x)),x1(e,x,x,y,c,l);continue;default:if(!(2<x.length)||x[0]!=="o"&&x[0]!=="O"||x[1]!=="n"&&x[1]!=="N"){h=Sy(x),f=!1,r.context===Wa&&t!=="svg"&&t!=="math"?c.delete(h.toLowerCase()):(V=x.toLowerCase(),V=$f.hasOwnProperty(V)&&$f[V]||null,V!==null&&V!==x&&(f=!0,c.delete(V)),c.delete(h));e:if(V=e,U=h,h=y,lr(U))if(V.hasAttribute(U))V=V.getAttribute(U),st(h,U),h=V===""+h?h:V;else{switch(typeof h){case"function":case"symbol":break e;case"boolean":if(V=U.toLowerCase().slice(0,5),V!=="data-"&&V!=="aria-")break e}h=h===void 0?void 0:null}else h=void 0;f||Zt(x,h,y,l)}}}return 0<c.size&&n.suppressHydrationWarning!==!0&&oA(e,c,l),Object.keys(l).length===0?null:l}function cA(e,t){switch(e.length){case 0:return"";case 1:return e[0];case 2:return e[0]+" "+t+" "+e[1];default:return e.slice(0,-1).join(", ")+", "+t+" "+e[e.length-1]}}function S1(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function uA(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var l=n[r],c=l.transferSize,f=l.initiatorType,h=l.duration;if(c&&h&&S1(f)){for(f=0,h=l.responseEnd,r+=1;r<n.length;r++){var y=n[r],x=y.startTime;if(x>h)break;var V=y.transferSize,U=y.initiatorType;V&&S1(U)&&(y=y.responseEnd,f+=V*(y<h?1:(h-x)/(y-x)))}if(--r,t+=8*(c+f)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}function _f(e){return e.nodeType===9?e:e.ownerDocument}function E1(e){switch(e){case Co:return rl;case Pf:return Md;default:return Wa}}function _1(e,t){if(e===Wa)switch(t){case"svg":return rl;case"math":return Md;default:return Wa}return e===rl&&t==="foreignObject"?Wa:e}function pp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}function fA(){var e=window.event;return e&&e.type==="popstate"?e===Kb?!1:(Kb=e,!0):(Kb=null,!1)}function tc(){var e=window.event;return e&&e!==Zc?e.type:null}function nc(){var e=window.event;return e&&e!==Zc?e.timeStamp:-1.1}function dA(e){setTimeout(function(){throw e})}function hA(e,t,n){switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&e.focus();break;case"img":n.src?e.src=n.src:n.srcSet&&(e.srcset=n.srcSet)}}function mA(){}function pA(e,t,n,r){lA(e,t,n,r),e[gn]=r}function A1(e){Cl(e,"")}function bA(e,t,n){e.nodeValue=n}function D1(e){if(!e.__reactWarnedAboutChildrenConflict){var t=e[gn]||null;if(t!==null){var n=Un(e);n!==null&&(typeof t.children=="string"||typeof t.children=="number"?(e.__reactWarnedAboutChildrenConflict=!0,be(n,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})):t.dangerouslySetInnerHTML!=null&&(e.__reactWarnedAboutChildrenConflict=!0,be(n,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})))}}}function Sr(e){return e==="head"}function yA(e,t){e.removeChild(t)}function gA(e,t){(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).removeChild(t)}function T1(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n===Qc||n===jd){if(r===0){e.removeChild(l),So(t);return}r--}else if(n===Xc||n===Yr||n===Fi||n===al||n===Ii)r++;else if(n===_T)sc(e.ownerDocument.documentElement);else if(n===DT){n=e.ownerDocument.head,sc(n);for(var c=n.firstChild;c;){var f=c.nextSibling,h=c.nodeName;c[uc]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=f}}else n===AT&&sc(e.ownerDocument.body);n=l}while(n);So(t)}function C1(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n===Qc){if(e===0)break;e--}else n!==Xc&&n!==Yr&&n!==Fi&&n!==al||e++;n=r}while(n)}function vA(e){C1(e,!0)}function xA(e){e=e.style,typeof e.setProperty=="function"?e.setProperty("display","none","important"):e.display="none"}function NA(e){e.nodeValue=""}function wA(e){C1(e,!1)}function SA(e,t){t=t[TT],t=t!=null&&t.hasOwnProperty("display")?t.display:null,e.style.display=t==null||typeof t=="boolean"?"":(""+t).trim()}function EA(e,t){e.nodeValue=t}function bp(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":bp(n),or(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function _A(e,t,n,r){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[uc])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){st(l.name,"name");var c=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Pn(e.nextSibling),e===null)break}return null}function AA(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Pn(e.nextSibling),e===null))return null;return e}function O1(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Pn(e.nextSibling),e===null))return null;return e}function yp(e){return e.data===Yr||e.data===Fi}function gp(e){return e.data===al||e.data===Yr&&e.ownerDocument.readyState!==vw}function DA(e,t){var n=e.ownerDocument;if(e.data===Fi)e._reactRetry=t;else if(e.data!==Yr||n.readyState!==vw)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Pn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===Xc||t===al||t===Yr||t===Fi||t===Ii||t===Xb||t===gw)break;if(t===Qc||t===jd)return null}}return e}function R1(e){if(e.nodeType===1){for(var t=e.nodeName.toLowerCase(),n={},r=e.attributes,l=0;l<r.length;l++){var c=r[l];n[g1(c.name)]=c.name.toLowerCase()==="style"?dp(e):c.value}return{type:t,props:n}}return e.nodeType===8?e.data===Ii?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:e.nodeValue}function j1(e,t,n){return n===null||n[ET]!==!0?(e.nodeValue===t?e=null:(t=wr(t),e=wr(e.nodeValue)===t?null:e.nodeValue),e):null}function vp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===Qc||n===jd){if(t===0)return Pn(e.nextSibling);t--}else n!==Xc&&n!==al&&n!==Yr&&n!==Fi&&n!==Ii||t++}e=e.nextSibling}return null}function M1(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===Xc||n===al||n===Yr||n===Fi||n===Ii){if(t===0)return e;t--}else n!==Qc&&n!==jd||t++}e=e.previousSibling}return null}function TA(e){So(e)}function CA(e){So(e)}function OA(e){So(e)}function k1(e,t,n,r,l){switch(l&&Ch(e,r.ancestorInfo),t=_f(n),e){case"html":if(e=t.documentElement,!e)throw Error("React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"head":if(e=t.head,!e)throw Error("React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.");return e;case"body":if(e=t.body,!e)throw Error("React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.");return e;default:throw Error("resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.")}}function RA(e,t,n,r){if(!n[Dr]&&Un(n)){var l=n.tagName.toLowerCase();console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.",l,l,l)}switch(e){case"html":case"head":case"body":break;default:console.error("acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.")}for(l=n.attributes;l.length;)n.removeAttributeNode(l[0]);on(n,e,t),n[ln]=r,n[gn]=t}function sc(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);or(e)}function Af(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function V1(e,t,n){var r=il;if(r&&typeof t=="string"&&t){var l=Tt(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),_w.has(l)||(_w.add(l),e={rel:e,crossOrigin:n,href:t},r.querySelector(l)===null&&(t=r.createElement("link"),on(t,"link",e),jt(t),r.head.appendChild(t)))}}function U1(e,t,n,r){var l=(l=_r.current)?Af(l):null;if(!l)throw Error('"resourceRoot" was expected to exist. This is a bug in React.');switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=No(n.href),t=qs(l).hoistableStyles,r=t.get(n),r||(r={type:"style",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=No(n.href);var c=qs(l).hoistableStyles,f=c.get(e);if(!f&&(l=l.ownerDocument||l,f={type:"stylesheet",instance:null,count:0,state:{loading:Gi,preload:null}},c.set(e,f),(c=l.querySelector(ac(e)))&&!c._p&&(f.instance=c,f.state.loading=Kc|ms),!ps.has(e))){var h={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy};ps.set(e,h),c||jA(l,e,h,f.state)}if(t&&r===null)throw n=`
|
|
191
|
+
|
|
192
|
+
- `+Df(t)+`
|
|
193
|
+
+ `+Df(n),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+n);return f}if(t&&r!==null)throw n=`
|
|
194
|
+
|
|
195
|
+
- `+Df(t)+`
|
|
196
|
+
+ `+Df(n),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+n);return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=wo(n),t=qs(l).hoistableScripts,r=t.get(n),r||(r={type:"script",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error('getResource encountered a type it did not expect: "'+e+'". this is a bug in React.')}}function Df(e){var t=0,n="<link";return typeof e.rel=="string"?(t++,n+=' rel="'+e.rel+'"'):Es.call(e,"rel")&&(t++,n+=' rel="'+(e.rel===null?"null":"invalid type "+typeof e.rel)+'"'),typeof e.href=="string"?(t++,n+=' href="'+e.href+'"'):Es.call(e,"href")&&(t++,n+=' href="'+(e.href===null?"null":"invalid type "+typeof e.href)+'"'),typeof e.precedence=="string"?(t++,n+=' precedence="'+e.precedence+'"'):Es.call(e,"precedence")&&(t++,n+=" precedence={"+(e.precedence===null?"null":"invalid type "+typeof e.precedence)+"}"),Object.getOwnPropertyNames(e).length>t&&(n+=" ..."),n+" />"}function No(e){return'href="'+Tt(e)+'"'}function ac(e){return'link[rel="stylesheet"]['+e+"]"}function z1(e){return Ie({},e,{"data-precedence":e.precedence,precedence:null})}function jA(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=Kc:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=Kc}),t.addEventListener("error",function(){return r.loading|=Sw}),on(t,"link",n),jt(t),e.head.appendChild(t))}function wo(e){return'[src="'+Tt(e)+'"]'}function rc(e){return"script[async]"+e}function B1(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Tt(n.href)+'"]');if(r)return t.instance=r,jt(r),r;var l=Ie({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),jt(r),on(r,"style",l),Tf(r,n.precedence,e),t.instance=r;case"stylesheet":l=No(n.href);var c=e.querySelector(ac(l));if(c)return t.state.loading|=ms,t.instance=c,jt(c),c;r=z1(n),(l=ps.get(l))&&xp(r,l),c=(e.ownerDocument||e).createElement("link"),jt(c);var f=c;return f._p=new Promise(function(h,y){f.onload=h,f.onerror=y}),on(c,"link",r),t.state.loading|=ms,Tf(c,n.precedence,e),t.instance=c;case"script":return c=wo(n.src),(l=e.querySelector(rc(c)))?(t.instance=l,jt(l),l):(r=n,(l=ps.get(c))&&(r=Ie({},n),Np(r,l)),e=e.ownerDocument||e,l=e.createElement("script"),jt(l),on(l,"link",r),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error('acquireResource encountered a resource type it did not expect: "'+t.type+'". this is a bug in React.')}else t.type==="stylesheet"&&(t.state.loading&ms)===Gi&&(r=t.instance,t.state.loading|=ms,Tf(r,n.precedence,e));return t.instance}function Tf(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=r.length?r[r.length-1]:null,c=l,f=0;f<r.length;f++){var h=r[f];if(h.dataset.precedence===t)c=h;else if(c!==l)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function xp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Np(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}function q1(e,t,n){if(kd===null){var r=new Map,l=kd=new Map;l.set(n,r)}else l=kd,r=l.get(n),r||(r=new Map,l.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var c=n[l];if(!(c[uc]||c[ln]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!==Co){var f=c.getAttribute(t)||"";f=e+f;var h=r.get(f);h?h.push(c):r.set(f,[c])}}return r}function L1(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function MA(e,t,n){var r=!n.ancestorInfo.containerTagInScope;if(n.context===rl||t.itemProp!=null)return!r||t.itemProp==null||e!=="meta"&&e!=="title"&&e!=="style"&&e!=="link"&&e!=="script"||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",e,e),!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href===""){r&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError){if(t.rel==="stylesheet"&&typeof t.precedence=="string"){e=t.href;var l=t.onError,c=t.disabled;n=[],t.onLoad&&n.push("`onLoad`"),l&&n.push("`onError`"),c!=null&&n.push("`disabled`"),l=cA(n,"and"),l+=n.length===1?" prop":" props",c=n.length===1?"an "+l:"the "+l,n.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',e,c,l)}r&&(typeof t.rel!="string"||typeof t.href!="string"||t.href===""?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(t.onError||t.onLoad)&&console.error("Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."));break}switch(t.rel){case"stylesheet":return e=t.precedence,t=t.disabled,typeof e!="string"&&r&&console.error('Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.'),typeof e=="string"&&t==null;default:return!0}case"script":if(e=t.async&&typeof t.async!="function"&&typeof t.async!="symbol",!e||t.onLoad||t.onError||!t.src||typeof t.src!="string"){r&&(e?t.onLoad||t.onError?console.error("Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>."):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error('Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.'));break}return!0;case"noscript":case"template":r&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",e)}return!1}function H1(e){return!(e.type==="stylesheet"&&(e.state.loading&Ew)===Gi)}function kA(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(n.state.loading&ms)===Gi){if(n.instance===null){var l=No(r.href),c=t.querySelector(ac(l));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Cf.bind(e),t.then(e,e)),n.state.loading|=ms,n.instance=c,jt(c);return}c=t.ownerDocument||t,r=z1(r),(l=ps.get(l))&&xp(r,l),c=c.createElement("link"),jt(c);var f=c;f._p=new Promise(function(h,y){f.onload=h,f.onerror=y}),on(c,"link",r),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&Ew)===Gi&&(e.count++,n=Cf.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}function VA(e,t){return e.stylesheets&&e.count===0&&Of(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Of(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},RT+t);0<e.imgBytes&&e0===0&&(e0=125*uA()*MT);var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Of(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>e0?50:jT)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(l)}}:null}function Cf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Of(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function Of(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Vd=new Map,t.forEach(UA,e),Vd=null,Cf.call(e))}function UA(e,t){if(!(t.state.loading&ms)){var n=Vd.get(e);if(n)var r=n.get(t0);else{n=new Map,Vd.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<l.length;c++){var f=l[c];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(n.set(f.dataset.precedence,f),r=f)}r&&n.set(t0,r)}l=t.instance,f=l.getAttribute("data-precedence"),c=n.get(f)||r,c===r&&n.set(t0,l),n.set(f,l),this.count++,r=Cf.bind(this),l.addEventListener("load",r),l.addEventListener("error",r),c?c.parentNode.insertBefore(l,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=ms}}function zA(e,t,n,r,l,c,f,h,y){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Yi,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Sl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sl(0),this.hiddenUpdates=Sl(null),this.identifierPrefix=r,this.onUncaughtError=l,this.onCaughtError=c,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[],t=0;31>t;t++)e.push(new Set);this._debugRootType=n?"hydrateRoot()":"createRoot()"}function P1(e,t,n,r,l,c,f,h,y,x,V,U){return e=new zA(e,t,n,f,y,x,V,U,h),t=sT,c===!0&&(t|=mn|_s),t|=Ue,c=D(3,null,null,t),e.current=c,c.stateNode=e,t=Xh(),gi(t),e.pooledCache=t,gi(t),c.memoizedState={element:r,isDehydrated:n,cache:t},em(c),e}function $1(e){return e?(e=Rr,e):Rr}function wp(e,t,n,r,l,c){if(hn&&typeof hn.onScheduleFiberRoot=="function")try{hn.onScheduleFiberRoot(Do,r,n)}catch(f){ua||(ua=!0,console.error("React instrumentation encountered an error: %o",f))}l=$1(l),r.context===null?r.context=l:r.pendingContext=l,ca&&In!==null&&!Cw&&(Cw=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
|
197
|
+
|
|
198
|
+
Check the render method of %s.`,H(In)||"Unknown")),r=br(t),r.payload={element:n},c=c===void 0?null:c,c!==null&&(typeof c!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",c),r.callback=c),n=yr(e,r,t),n!==null&&(Js(t,"root.render()",null),At(n,e,t),ql(n,e,t))}function I1(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Sp(e,t){I1(e,t),(e=e.alternate)&&I1(e,t)}function F1(e){if(e.tag===13||e.tag===31){var t=dn(e,67108864);t!==null&&At(t,e,67108864),Sp(e,67108864)}}function Y1(e){if(e.tag===13||e.tag===31){var t=Hn(e);t=_l(t);var n=dn(e,t);n!==null&&At(n,e,t),Sp(e,t)}}function BA(){return In}function qA(e,t,n,r){var l=Y.T;Y.T=null;var c=rt.p;try{rt.p=ss,Ep(e,t,n,r)}finally{rt.p=c,Y.T=l}}function LA(e,t,n,r){var l=Y.T;Y.T=null;var c=rt.p;try{rt.p=da,Ep(e,t,n,r)}finally{rt.p=c,Y.T=l}}function Ep(e,t,n,r){if(zd){var l=_p(r);if(l===null)cp(e,t,r,Bd,n),J1(e,r);else if(HA(l,e,t,n,r))r.stopPropagation();else if(J1(e,r),t&4&&-1<VT.indexOf(e)){for(;l!==null;){var c=Un(l);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var f=Us(c.pendingLanes);if(f!==0){var h=c;for(h.pendingLanes|=2,h.entangledLanes|=2;f;){var y=1<<31-yn(f);h.entanglements[1]|=y,f&=~y}ra(c),(Ke&(Xt|Jn))===tn&&(xd=Kt()+sw,Wl(0))}}break;case 31:case 13:h=dn(c,2),h!==null&&At(h,c,2),go(),Sp(c,2)}if(c=_p(r),c===null&&cp(e,t,r,Bd,n),c===l)break;l=c}l!==null&&r.stopPropagation()}else cp(e,t,r,null,n)}}function _p(e){return e=Oh(e),Ap(e)}function Ap(e){if(Bd=null,e=Bs(e),e!==null){var t=ee(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=te(t),e!==null)return e;e=null}else if(n===31){if(e=Se(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Bd=e,null}function G1(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return ss;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return da;case"message":switch(ZA()){case Lp:return ss;case Hp:return da;case Ao:case KA:return qa;case Pp:return Lf;default:return qa}default:return qa}}function J1(e,t){switch(e){case"focusin":case"focusout":Gr=null;break;case"dragenter":case"dragleave":Jr=null;break;case"mouseover":case"mouseout":Xr=null;break;case"pointerover":case"pointerout":eu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":tu.delete(t.pointerId)}}function ic(e,t,n,r,l,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:c,targetContainers:[l]},t!==null&&(t=Un(t),t!==null&&F1(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function HA(e,t,n,r,l){switch(t){case"focusin":return Gr=ic(Gr,e,t,n,r,l),!0;case"dragenter":return Jr=ic(Jr,e,t,n,r,l),!0;case"mouseover":return Xr=ic(Xr,e,t,n,r,l),!0;case"pointerover":var c=l.pointerId;return eu.set(c,ic(eu.get(c)||null,e,t,n,r,l)),!0;case"gotpointercapture":return c=l.pointerId,tu.set(c,ic(tu.get(c)||null,e,t,n,r,l)),!0}return!1}function X1(e){var t=Bs(e.target);if(t!==null){var n=ee(t);if(n!==null){if(t=n.tag,t===13){if(t=te(n),t!==null){e.blockedOn=t,ao(e.priority,function(){Y1(n)});return}}else if(t===31){if(t=Se(n),t!==null){e.blockedOn=t,ao(e.priority,function(){Y1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Rf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=_p(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n),l=r;fc!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),fc=l,n.target.dispatchEvent(r),fc===null&&console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."),fc=null}else return t=Un(n),t!==null&&F1(t),e.blockedOn=n,!1;t.shift()}return!0}function Q1(e,t,n){Rf(e)&&n.delete(t)}function PA(){n0=!1,Gr!==null&&Rf(Gr)&&(Gr=null),Jr!==null&&Rf(Jr)&&(Jr=null),Xr!==null&&Rf(Xr)&&(Xr=null),eu.forEach(Q1),tu.forEach(Q1)}function jf(e,t){e.blockedOn===t&&(e.blockedOn=null,n0||(n0=!0,zt.unstable_scheduleCallback(zt.unstable_NormalPriority,PA)))}function Z1(e){qd!==e&&(qd=e,zt.unstable_scheduleCallback(zt.unstable_NormalPriority,function(){qd===e&&(qd=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],l=e[t+2];if(typeof r!="function"){if(Ap(r||n)===null)continue;break}var c=Un(n);c!==null&&(e.splice(t,3),t-=3,n={pending:!0,data:l,method:n.method,action:r},Object.freeze(n),Am(c,n,r,l))}}))}function So(e){function t(y){return jf(y,e)}Gr!==null&&jf(Gr,e),Jr!==null&&jf(Jr,e),Xr!==null&&jf(Xr,e),eu.forEach(t),tu.forEach(t);for(var n=0;n<Qr.length;n++){var r=Qr[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Qr.length&&(n=Qr[0],n.blockedOn===null);)X1(n),n.blockedOn===null&&Qr.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var l=n[r],c=n[r+1],f=l[gn]||null;if(typeof c=="function")f||Z1(n);else if(f){var h=null;if(c&&c.hasAttribute("formAction")){if(l=c,f=c[gn]||null)h=f.formAction;else if(Ap(l)!==null)continue}else h=f.action;typeof h=="function"?n[r+1]=h:(n.splice(r,3),r-=3),Z1(n)}}}function K1(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(f){return l=f})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function Dp(e){this._internalRoot=e}function Mf(e){this._internalRoot=e}function W1(e){e[Dr]&&(e._reactRootContainer?console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var zt=xC(),Tp=ZS(),$A=PT(),Ie=Object.assign,IA=Symbol.for("react.element"),oa=Symbol.for("react.transitional.element"),Eo=Symbol.for("react.portal"),_o=Symbol.for("react.fragment"),kf=Symbol.for("react.strict_mode"),Cp=Symbol.for("react.profiler"),Op=Symbol.for("react.consumer"),la=Symbol.for("react.context"),oc=Symbol.for("react.forward_ref"),Rp=Symbol.for("react.suspense"),jp=Symbol.for("react.suspense_list"),Vf=Symbol.for("react.memo"),$n=Symbol.for("react.lazy"),Mp=Symbol.for("react.activity"),FA=Symbol.for("react.memo_cache_sentinel"),ex=Symbol.iterator,YA=Symbol.for("react.client.reference"),Gt=Array.isArray,Y=Tp.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,rt=$A.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,GA=Object.freeze({pending:!1,data:null,method:null,action:null}),kp=[],Vp=[],Ba=-1,Er=le(null),lc=le(null),_r=le(null),Uf=le(null),cc=0,tx,nx,sx,ax,rx,ix,ox;Ce.__reactDisabledLog=!0;var Up,lx,zp=!1,Bp=new(typeof WeakMap=="function"?WeakMap:Map),In=null,ca=!1,Es=Object.prototype.hasOwnProperty,qp=zt.unstable_scheduleCallback,JA=zt.unstable_cancelCallback,XA=zt.unstable_shouldYield,QA=zt.unstable_requestPaint,Kt=zt.unstable_now,ZA=zt.unstable_getCurrentPriorityLevel,Lp=zt.unstable_ImmediatePriority,Hp=zt.unstable_UserBlockingPriority,Ao=zt.unstable_NormalPriority,KA=zt.unstable_LowPriority,Pp=zt.unstable_IdlePriority,WA=zt.log,eD=zt.unstable_setDisableYieldValue,Do=null,hn=null,ua=!1,fa=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",yn=Math.clz32?Math.clz32:oi,tD=Math.log,nD=Math.LN2,zf=256,Bf=262144,qf=4194304,ss=2,da=8,qa=32,Lf=268435456,Ar=Math.random().toString(36).slice(2),ln="__reactFiber$"+Ar,gn="__reactProps$"+Ar,Dr="__reactContainer$"+Ar,$p="__reactEvents$"+Ar,sD="__reactListeners$"+Ar,aD="__reactHandles$"+Ar,cx="__reactResources$"+Ar,uc="__reactMarker$"+Ar,ux=new Set,_i={},Ip={},rD={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},iD=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),fx={},dx={},oD=/[\n"\\]/g,hx=!1,mx=!1,px=!1,bx=!1,yx=!1,gx=!1,vx=["value","defaultValue"],xx=!1,Nx=/["'&<>\n\t]|^\s|\s$/,lD="address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp".split(" "),wx="applet caption html table td th marquee object template foreignObject desc title".split(" "),cD=wx.concat(["button"]),uD="dd dt li option optgroup p rp rt".split(" "),Sx={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Hf={},Fp={animation:"animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(" "),background:"backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(" "),backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:"borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(" "),borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:"fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(" "),fontVariant:"fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(" "),gap:["columnGap","rowGap"],grid:"gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(" "),gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:"maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(" "),maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},Ex=/([A-Z])/g,_x=/^ms-/,fD=/^(?:webkit|moz|o)[A-Z]/,dD=/^-ms-/,hD=/-(.)/g,Ax=/;\s*$/,To={},Yp={},Dx=!1,Tx=!1,Cx=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),Pf="http://www.w3.org/1998/Math/MathML",Co="http://www.w3.org/2000/svg",mD=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),$f={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",fetchpriority:"fetchPriority",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",inert:"inert",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",popover:"popover",popovertarget:"popoverTarget",popovertargetaction:"popoverTargetAction",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",transformorigin:"transformOrigin","transform-origin":"transformOrigin",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Ox={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0,"aria-braillelabel":0,"aria-brailleroledescription":0,"aria-colindextext":0,"aria-rowindextext":0},Oo={},pD=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),bD=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Rx=!1,vn={},jx=/^on./,yD=/^on[^A-Z]/,gD=RegExp("^(aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),vD=RegExp("^(aria)[A-Z][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),xD=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,fc=null,Ro=null,jo=null,Gp=!1,ha=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jp=!1;if(ha)try{var dc={};Object.defineProperty(dc,"passive",{get:function(){Jp=!0}}),window.addEventListener("test",dc,dc),window.removeEventListener("test",dc,dc)}catch{Jp=!1}var Tr=null,Xp=null,If=null,Ai={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ff=Cn(Ai),hc=Ie({},Ai,{view:0,detail:0}),ND=Cn(hc),Qp,Zp,mc,Yf=Ie({},hc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==mc&&(mc&&e.type==="mousemove"?(Qp=e.screenX-mc.screenX,Zp=e.screenY-mc.screenY):Zp=Qp=0,mc=e),Qp)},movementY:function(e){return"movementY"in e?e.movementY:Zp}}),Mx=Cn(Yf),wD=Ie({},Yf,{dataTransfer:0}),SD=Cn(wD),ED=Ie({},hc,{relatedTarget:0}),Kp=Cn(ED),_D=Ie({},Ai,{animationName:0,elapsedTime:0,pseudoElement:0}),AD=Cn(_D),DD=Ie({},Ai,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),TD=Cn(DD),CD=Ie({},Ai,{data:0}),kx=Cn(CD),OD=kx,RD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jD={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},MD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},kD=Ie({},hc,{key:function(e){if(e.key){var t=RD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ou(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rh,charCode:function(e){return e.type==="keypress"?Ou(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ou(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),VD=Cn(kD),UD=Ie({},Yf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vx=Cn(UD),zD=Ie({},hc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rh}),BD=Cn(zD),qD=Ie({},Ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),LD=Cn(qD),HD=Ie({},Yf,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),PD=Cn(HD),$D=Ie({},Ai,{newState:0,oldState:0}),ID=Cn($D),FD=[9,13,27,32],Ux=229,Wp=ha&&"CompositionEvent"in window,pc=null;ha&&"documentMode"in document&&(pc=document.documentMode);var YD=ha&&"TextEvent"in window&&!pc,zx=ha&&(!Wp||pc&&8<pc&&11>=pc),Bx=32,qx=String.fromCharCode(Bx),Lx=!1,Mo=!1,GD={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},bc=null,yc=null,Hx=!1;ha&&(Hx=h_("input")&&(!document.documentMode||9<document.documentMode));var xn=typeof Object.is=="function"?Object.is:v_,JD=ha&&"documentMode"in document&&11>=document.documentMode,ko=null,eb=null,gc=null,tb=!1,Vo={animationend:fi("Animation","AnimationEnd"),animationiteration:fi("Animation","AnimationIteration"),animationstart:fi("Animation","AnimationStart"),transitionrun:fi("Transition","TransitionRun"),transitionstart:fi("Transition","TransitionStart"),transitioncancel:fi("Transition","TransitionCancel"),transitionend:fi("Transition","TransitionEnd")},nb={},Px={};ha&&(Px=document.createElement("div").style,"AnimationEvent"in window||(delete Vo.animationend.animation,delete Vo.animationiteration.animation,delete Vo.animationstart.animation),"TransitionEvent"in window||delete Vo.transitionend.transition);var $x=di("animationend"),Ix=di("animationiteration"),Fx=di("animationstart"),XD=di("transitionrun"),QD=di("transitionstart"),ZD=di("transitioncancel"),Yx=di("transitionend"),Gx=new Map,sb="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");sb.push("scrollEnd");var Jx=0;if(typeof performance=="object"&&typeof performance.now=="function")var KD=performance,Xx=function(){return KD.now()};else{var WD=Date;Xx=function(){return WD.now()}}var ab=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},eT="This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.",Gf=0,rb=1,ib=2,ob=3,Jf="– ",Xf="+ ",Qx=" ",yt=typeof console<"u"&&typeof console.timeStamp=="function"&&typeof performance<"u"&&typeof performance.measure=="function",as="Components ⚛",Ge="Scheduler ⚛",Xe="Blocking",Cr=!1,La={color:"primary",properties:null,tooltipText:"",track:as},Or={start:-0,end:-0,detail:{devtools:La}},tT=["Changed Props",""],Zx="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",nT=["Changed Props",Zx],vc=1,Ha=2,rs=[],Uo=0,lb=0,Rr={};Object.freeze(Rr);var is=null,zo=null,Te=0,sT=1,Ue=2,mn=8,_s=16,aT=32,Kx=!1;try{var Wx=Object.preventExtensions({})}catch{Kx=!0}var cb=new WeakMap,Bo=[],qo=0,Qf=null,xc=0,os=[],ls=0,Di=null,Pa=1,$a="",cn=null,gt=null,Fe=!1,ma=!1,Fn=null,jr=null,cs=!1,ub=Error("Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),fb=le(null),db=le(null),eN={},Zf=null,Lo=null,Ho=!1,rT=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},iT=zt.unstable_scheduleCallback,oT=zt.unstable_NormalPriority,Bt={$$typeof:la,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},qt=zt.unstable_now,Kf=console.createTask?console.createTask:function(){return null},Nc=1,Wf=2,Wt=-0,Mr=-0,Ia=-0,Fa=null,Nn=-1.1,Ti=-0,wt=-0,_e=-1.1,Ae=-1.1,Nt=null,Dt=!1,Ci=-0,pa=-1.1,wc=null,kr=0,hb=null,mb=null,Oi=-1.1,Sc=null,Po=-1.1,ed=-1.1,Ya=-0,Ga=-1.1,us=-1.1,pb=0,Ec=null,tN=null,nN=null,Vr=-1.1,Ri=null,Ur=-1.1,td=-1.1,sN=-0,aN=-0,nd=0,lT=null,rN=0,_c=-1.1,sd=!1,ad=!1,Ac=null,bb=0,ji=0,$o=null,iN=Y.S;Y.S=function(e,t){if(tw=Kt(),typeof t=="object"&&t!==null&&typeof t.then=="function"){if(0>Ga&&0>us){Ga=qt();var n=nc(),r=tc();(n!==Ur||r!==Ri)&&(Ur=-1.1),Vr=n,Ri=r}A_(e,t)}iN!==null&&iN(e,t)};var Mi=le(null),As={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},Dc=[],Tc=[],Cc=[],Oc=[],Rc=[],jc=[],ki=new Set;As.recordUnsafeLifecycleWarnings=function(e,t){ki.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&Dc.push(e),e.mode&mn&&typeof t.UNSAFE_componentWillMount=="function"&&Tc.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&Cc.push(e),e.mode&mn&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&Oc.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&Rc.push(e),e.mode&mn&&typeof t.UNSAFE_componentWillUpdate=="function"&&jc.push(e))},As.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<Dc.length&&(Dc.forEach(function(h){e.add(H(h)||"Component"),ki.add(h.type)}),Dc=[]);var t=new Set;0<Tc.length&&(Tc.forEach(function(h){t.add(H(h)||"Component"),ki.add(h.type)}),Tc=[]);var n=new Set;0<Cc.length&&(Cc.forEach(function(h){n.add(H(h)||"Component"),ki.add(h.type)}),Cc=[]);var r=new Set;0<Oc.length&&(Oc.forEach(function(h){r.add(H(h)||"Component"),ki.add(h.type)}),Oc=[]);var l=new Set;0<Rc.length&&(Rc.forEach(function(h){l.add(H(h)||"Component"),ki.add(h.type)}),Rc=[]);var c=new Set;if(0<jc.length&&(jc.forEach(function(h){c.add(H(h)||"Component"),ki.add(h.type)}),jc=[]),0<t.size){var f=S(t);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
199
|
+
|
|
200
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
201
|
+
|
|
202
|
+
Please update the following components: %s`,f)}0<r.size&&(f=S(r),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
203
|
+
|
|
204
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
205
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
206
|
+
|
|
207
|
+
Please update the following components: %s`,f)),0<c.size&&(f=S(c),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
208
|
+
|
|
209
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
210
|
+
|
|
211
|
+
Please update the following components: %s`,f)),0<e.size&&(f=S(e),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
212
|
+
|
|
213
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
214
|
+
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
215
|
+
|
|
216
|
+
Please update the following components: %s`,f)),0<n.size&&(f=S(n),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
217
|
+
|
|
218
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
219
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
220
|
+
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
221
|
+
|
|
222
|
+
Please update the following components: %s`,f)),0<l.size&&(f=S(l),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
223
|
+
|
|
224
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
225
|
+
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
226
|
+
|
|
227
|
+
Please update the following components: %s`,f))};var rd=new Map,oN=new Set;As.recordLegacyContextWarning=function(e,t){for(var n=null,r=e;r!==null;)r.mode&mn&&(n=r),r=r.return;n===null?console.error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue."):!oN.has(e.type)&&(r=rd.get(n),e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(r===void 0&&(r=[],rd.set(n,r)),r.push(e))},As.flushLegacyContextWarning=function(){rd.forEach(function(e){if(e.length!==0){var t=e[0],n=new Set;e.forEach(function(l){n.add(H(l)||"Component"),oN.add(l.type)});var r=S(n);be(t,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
|
|
228
|
+
|
|
229
|
+
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
230
|
+
|
|
231
|
+
Please update the following components: %s
|
|
232
|
+
|
|
233
|
+
Learn more about this warning here: https://react.dev/link/legacy-context`,r)})}})},As.discardPendingWarnings=function(){Dc=[],Tc=[],Cc=[],Oc=[],Rc=[],jc=[],rd=new Map};var lN={react_stack_bottom_frame:function(e,t,n){var r=ca;ca=!0;try{return e(t,n)}finally{ca=r}}},yb=lN.react_stack_bottom_frame.bind(lN),cN={react_stack_bottom_frame:function(e){var t=ca;ca=!0;try{return e.render()}finally{ca=t}}},uN=cN.react_stack_bottom_frame.bind(cN),fN={react_stack_bottom_frame:function(e,t){try{t.componentDidMount()}catch(n){at(e,e.return,n)}}},gb=fN.react_stack_bottom_frame.bind(fN),dN={react_stack_bottom_frame:function(e,t,n,r,l){try{t.componentDidUpdate(n,r,l)}catch(c){at(e,e.return,c)}}},hN=dN.react_stack_bottom_frame.bind(dN),mN={react_stack_bottom_frame:function(e,t){var n=t.stack;e.componentDidCatch(t.value,{componentStack:n!==null?n:""})}},cT=mN.react_stack_bottom_frame.bind(mN),pN={react_stack_bottom_frame:function(e,t,n){try{n.componentWillUnmount()}catch(r){at(e,t,r)}}},bN=pN.react_stack_bottom_frame.bind(pN),yN={react_stack_bottom_frame:function(e){var t=e.create;return e=e.inst,t=t(),e.destroy=t}},uT=yN.react_stack_bottom_frame.bind(yN),gN={react_stack_bottom_frame:function(e,t,n){try{n()}catch(r){at(e,t,r)}}},fT=gN.react_stack_bottom_frame.bind(gN),vN={react_stack_bottom_frame:function(e){var t=e._init;return t(e._payload)}},dT=vN.react_stack_bottom_frame.bind(vN),Io=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),vb=Error("Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React."),id=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),od={then:function(){console.error('Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.')}},Vi=null,Mc=!1,Fo=null,kc=0,ze=null,xb,xN=xb=!1,NN={},wN={},SN={};_=function(e,t,n){if(n!==null&&typeof n=="object"&&n._store&&(!n._store.validated&&n.key==null||n._store.validated===2)){if(typeof n._store!="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");n._store.validated=1;var r=H(e),l=r||"null";if(!NN[l]){NN[l]=!0,n=n._owner,e=e._debugOwner;var c="";e&&typeof e.tag=="number"&&(l=H(e))&&(c=`
|
|
234
|
+
|
|
235
|
+
Check the render method of \``+l+"`."),c||r&&(c=`
|
|
236
|
+
|
|
237
|
+
Check the top-level render call using <`+r+">.");var f="";n!=null&&e!==n&&(r=null,typeof n.tag=="number"?r=H(n):typeof n.name=="string"&&(r=n.name),r&&(f=" It was passed a child from "+r+".")),be(t,function(){console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',c,f)})}}};var Ui=pg(!0),EN=pg(!1),_N=0,AN=1,DN=2,Nb=3,zr=!1,TN=!1,wb=null,Sb=!1,Yo=le(null),ld=le(0),Yn=le(null),fs=null,Go=1,Vc=2,Mt=le(0),cd=0,ds=1,wn=2,Gn=4,Sn=8,Jo,CN=new Set,ON=new Set,Eb=new Set,RN=new Set,Ja=0,Oe=null,ft=null,Lt=null,ud=!1,Xo=!1,zi=!1,fd=0,Uc=0,Xa=null,hT=0,mT=25,I=null,hs=null,Qa=-1,zc=!1,Bc={readContext:xt,use:xr,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useLayoutEffect:Ct,useInsertionEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useSyncExternalStore:Ct,useId:Ct,useHostTransitionStatus:Ct,useFormState:Ct,useActionState:Ct,useOptimistic:Ct,useMemoCache:Ct,useCacheRefresh:Ct};Bc.useEffectEvent=Ct;var _b=null,jN=null,Ab=null,MN=null,ba=null,Ds=null,dd=null;_b={readContext:function(e){return xt(e)},use:xr,useCallback:function(e,t){return I="useCallback",$e(),uo(t),wm(e,t)},useContext:function(e){return I="useContext",$e(),xt(e)},useEffect:function(e,t){return I="useEffect",$e(),uo(t),af(e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",$e(),uo(n),Nm(e,t,n)},useInsertionEffect:function(e,t){I="useInsertionEffect",$e(),uo(t),xi(4,wn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",$e(),uo(t),xm(e,t)},useMemo:function(e,t){I="useMemo",$e(),uo(t);var n=Y.H;Y.H=ba;try{return Sm(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",$e();var r=Y.H;Y.H=ba;try{return fm(e,t,n)}finally{Y.H=r}},useRef:function(e){return I="useRef",$e(),gm(e)},useState:function(e){I="useState",$e();var t=Y.H;Y.H=ba;try{return pm(e)}finally{Y.H=t}},useDebugValue:function(){I="useDebugValue",$e()},useDeferredValue:function(e,t){return I="useDeferredValue",$e(),Em(e,t)},useTransition:function(){return I="useTransition",$e(),Dm()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",$e(),hm(e,t,n)},useId:function(){return I="useId",$e(),Tm()},useFormState:function(e,t){return I="useFormState",$e(),Wu(),ho(e,t)},useActionState:function(e,t){return I="useActionState",$e(),ho(e,t)},useOptimistic:function(e){return I="useOptimistic",$e(),bm(e)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",$e(),Cm()},useEffectEvent:function(e){return I="useEffectEvent",$e(),vm(e)}},jN={readContext:function(e){return xt(e)},use:xr,useCallback:function(e,t){return I="useCallback",re(),wm(e,t)},useContext:function(e){return I="useContext",re(),xt(e)},useEffect:function(e,t){return I="useEffect",re(),af(e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",re(),Nm(e,t,n)},useInsertionEffect:function(e,t){I="useInsertionEffect",re(),xi(4,wn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",re(),xm(e,t)},useMemo:function(e,t){I="useMemo",re();var n=Y.H;Y.H=ba;try{return Sm(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",re();var r=Y.H;Y.H=ba;try{return fm(e,t,n)}finally{Y.H=r}},useRef:function(e){return I="useRef",re(),gm(e)},useState:function(e){I="useState",re();var t=Y.H;Y.H=ba;try{return pm(e)}finally{Y.H=t}},useDebugValue:function(){I="useDebugValue",re()},useDeferredValue:function(e,t){return I="useDeferredValue",re(),Em(e,t)},useTransition:function(){return I="useTransition",re(),Dm()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",re(),hm(e,t,n)},useId:function(){return I="useId",re(),Tm()},useActionState:function(e,t){return I="useActionState",re(),ho(e,t)},useFormState:function(e,t){return I="useFormState",re(),Wu(),ho(e,t)},useOptimistic:function(e){return I="useOptimistic",re(),bm(e)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",re(),Cm()},useEffectEvent:function(e){return I="useEffectEvent",re(),vm(e)}},Ab={readContext:function(e){return xt(e)},use:xr,useCallback:function(e,t){return I="useCallback",re(),lf(e,t)},useContext:function(e){return I="useContext",re(),xt(e)},useEffect:function(e,t){I="useEffect",re(),On(2048,Sn,e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",re(),of(e,t,n)},useInsertionEffect:function(e,t){return I="useInsertionEffect",re(),On(4,wn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",re(),On(4,Gn,e,t)},useMemo:function(e,t){I="useMemo",re();var n=Y.H;Y.H=Ds;try{return cf(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",re();var r=Y.H;Y.H=Ds;try{return fo(e,t,n)}finally{Y.H=r}},useRef:function(){return I="useRef",re(),ot().memoizedState},useState:function(){I="useState",re();var e=Y.H;Y.H=Ds;try{return fo(ws)}finally{Y.H=e}},useDebugValue:function(){I="useDebugValue",re()},useDeferredValue:function(e,t){return I="useDeferredValue",re(),zg(e,t)},useTransition:function(){return I="useTransition",re(),$g()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",re(),tf(e,t,n)},useId:function(){return I="useId",re(),ot().memoizedState},useFormState:function(e){return I="useFormState",re(),Wu(),nf(e)},useActionState:function(e){return I="useActionState",re(),nf(e)},useOptimistic:function(e,t){return I="useOptimistic",re(),Dg(e,t)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",re(),ot().memoizedState},useEffectEvent:function(e){return I="useEffectEvent",re(),rf(e)}},MN={readContext:function(e){return xt(e)},use:xr,useCallback:function(e,t){return I="useCallback",re(),lf(e,t)},useContext:function(e){return I="useContext",re(),xt(e)},useEffect:function(e,t){I="useEffect",re(),On(2048,Sn,e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",re(),of(e,t,n)},useInsertionEffect:function(e,t){return I="useInsertionEffect",re(),On(4,wn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",re(),On(4,Gn,e,t)},useMemo:function(e,t){I="useMemo",re();var n=Y.H;Y.H=dd;try{return cf(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",re();var r=Y.H;Y.H=dd;try{return $l(e,t,n)}finally{Y.H=r}},useRef:function(){return I="useRef",re(),ot().memoizedState},useState:function(){I="useState",re();var e=Y.H;Y.H=dd;try{return $l(ws)}finally{Y.H=e}},useDebugValue:function(){I="useDebugValue",re()},useDeferredValue:function(e,t){return I="useDeferredValue",re(),Bg(e,t)},useTransition:function(){return I="useTransition",re(),Ig()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",re(),tf(e,t,n)},useId:function(){return I="useId",re(),ot().memoizedState},useFormState:function(e){return I="useFormState",re(),Wu(),sf(e)},useActionState:function(e){return I="useActionState",re(),sf(e)},useOptimistic:function(e,t){return I="useOptimistic",re(),Cg(e,t)},useHostTransitionStatus:Ni,useMemoCache:vi,useCacheRefresh:function(){return I="useCacheRefresh",re(),ot().memoizedState},useEffectEvent:function(e){return I="useEffectEvent",re(),rf(e)}},ba={readContext:function(e){return g(),xt(e)},use:function(e){return m(),xr(e)},useCallback:function(e,t){return I="useCallback",m(),$e(),wm(e,t)},useContext:function(e){return I="useContext",m(),$e(),xt(e)},useEffect:function(e,t){return I="useEffect",m(),$e(),af(e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",m(),$e(),Nm(e,t,n)},useInsertionEffect:function(e,t){I="useInsertionEffect",m(),$e(),xi(4,wn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",m(),$e(),xm(e,t)},useMemo:function(e,t){I="useMemo",m(),$e();var n=Y.H;Y.H=ba;try{return Sm(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",m(),$e();var r=Y.H;Y.H=ba;try{return fm(e,t,n)}finally{Y.H=r}},useRef:function(e){return I="useRef",m(),$e(),gm(e)},useState:function(e){I="useState",m(),$e();var t=Y.H;Y.H=ba;try{return pm(e)}finally{Y.H=t}},useDebugValue:function(){I="useDebugValue",m(),$e()},useDeferredValue:function(e,t){return I="useDeferredValue",m(),$e(),Em(e,t)},useTransition:function(){return I="useTransition",m(),$e(),Dm()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",m(),$e(),hm(e,t,n)},useId:function(){return I="useId",m(),$e(),Tm()},useFormState:function(e,t){return I="useFormState",m(),$e(),ho(e,t)},useActionState:function(e,t){return I="useActionState",m(),$e(),ho(e,t)},useOptimistic:function(e){return I="useOptimistic",m(),$e(),bm(e)},useMemoCache:function(e){return m(),vi(e)},useHostTransitionStatus:Ni,useCacheRefresh:function(){return I="useCacheRefresh",$e(),Cm()},useEffectEvent:function(e){return I="useEffectEvent",m(),$e(),vm(e)}},Ds={readContext:function(e){return g(),xt(e)},use:function(e){return m(),xr(e)},useCallback:function(e,t){return I="useCallback",m(),re(),lf(e,t)},useContext:function(e){return I="useContext",m(),re(),xt(e)},useEffect:function(e,t){I="useEffect",m(),re(),On(2048,Sn,e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",m(),re(),of(e,t,n)},useInsertionEffect:function(e,t){return I="useInsertionEffect",m(),re(),On(4,wn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",m(),re(),On(4,Gn,e,t)},useMemo:function(e,t){I="useMemo",m(),re();var n=Y.H;Y.H=Ds;try{return cf(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",m(),re();var r=Y.H;Y.H=Ds;try{return fo(e,t,n)}finally{Y.H=r}},useRef:function(){return I="useRef",m(),re(),ot().memoizedState},useState:function(){I="useState",m(),re();var e=Y.H;Y.H=Ds;try{return fo(ws)}finally{Y.H=e}},useDebugValue:function(){I="useDebugValue",m(),re()},useDeferredValue:function(e,t){return I="useDeferredValue",m(),re(),zg(e,t)},useTransition:function(){return I="useTransition",m(),re(),$g()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",m(),re(),tf(e,t,n)},useId:function(){return I="useId",m(),re(),ot().memoizedState},useFormState:function(e){return I="useFormState",m(),re(),nf(e)},useActionState:function(e){return I="useActionState",m(),re(),nf(e)},useOptimistic:function(e,t){return I="useOptimistic",m(),re(),Dg(e,t)},useMemoCache:function(e){return m(),vi(e)},useHostTransitionStatus:Ni,useCacheRefresh:function(){return I="useCacheRefresh",re(),ot().memoizedState},useEffectEvent:function(e){return I="useEffectEvent",m(),re(),rf(e)}},dd={readContext:function(e){return g(),xt(e)},use:function(e){return m(),xr(e)},useCallback:function(e,t){return I="useCallback",m(),re(),lf(e,t)},useContext:function(e){return I="useContext",m(),re(),xt(e)},useEffect:function(e,t){I="useEffect",m(),re(),On(2048,Sn,e,t)},useImperativeHandle:function(e,t,n){return I="useImperativeHandle",m(),re(),of(e,t,n)},useInsertionEffect:function(e,t){return I="useInsertionEffect",m(),re(),On(4,wn,e,t)},useLayoutEffect:function(e,t){return I="useLayoutEffect",m(),re(),On(4,Gn,e,t)},useMemo:function(e,t){I="useMemo",m(),re();var n=Y.H;Y.H=Ds;try{return cf(e,t)}finally{Y.H=n}},useReducer:function(e,t,n){I="useReducer",m(),re();var r=Y.H;Y.H=Ds;try{return $l(e,t,n)}finally{Y.H=r}},useRef:function(){return I="useRef",m(),re(),ot().memoizedState},useState:function(){I="useState",m(),re();var e=Y.H;Y.H=Ds;try{return $l(ws)}finally{Y.H=e}},useDebugValue:function(){I="useDebugValue",m(),re()},useDeferredValue:function(e,t){return I="useDeferredValue",m(),re(),Bg(e,t)},useTransition:function(){return I="useTransition",m(),re(),Ig()},useSyncExternalStore:function(e,t,n){return I="useSyncExternalStore",m(),re(),tf(e,t,n)},useId:function(){return I="useId",m(),re(),ot().memoizedState},useFormState:function(e){return I="useFormState",m(),re(),sf(e)},useActionState:function(e){return I="useActionState",m(),re(),sf(e)},useOptimistic:function(e,t){return I="useOptimistic",m(),re(),Cg(e,t)},useMemoCache:function(e){return m(),vi(e)},useHostTransitionStatus:Ni,useCacheRefresh:function(){return I="useCacheRefresh",re(),ot().memoizedState},useEffectEvent:function(e){return I="useEffectEvent",m(),re(),rf(e)}};var kN={},VN=new Set,UN=new Set,zN=new Set,BN=new Set,qN=new Set,LN=new Set,HN=new Set,PN=new Set,$N=new Set,IN=new Set;Object.freeze(kN);var Db={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Hn(e),l=br(r);l.payload=t,n!=null&&(Rm(n),l.callback=n),t=yr(e,l,r),t!==null&&(Js(r,"this.setState()",e),At(t,e,r),ql(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Hn(e),l=br(r);l.tag=AN,l.payload=t,n!=null&&(Rm(n),l.callback=n),t=yr(e,l,r),t!==null&&(Js(r,"this.replaceState()",e),At(t,e,r),ql(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Hn(e),r=br(n);r.tag=DN,t!=null&&(Rm(t),r.callback=t),t=yr(e,r,n),t!==null&&(Js(n,"this.forceUpdate()",e),At(t,e,n),ql(t,e,n))}},Qo=null,Tb=null,Cb=Error("This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue."),Ht=!1,FN={},YN={},GN={},JN={},Zo=!1,XN={},hd={},Ob={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},QN=!1,ZN=null;ZN=new Set;var Za=!1,Pt=!1,Rb=!1,KN=typeof WeakSet=="function"?WeakSet:Set,en=null,Ko=null,Wo=null,$t=null,Mn=!1,Ts=null,Jt=!1,qc=8192,pT={getCacheForType:function(e){var t=xt(Bt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return xt(Bt).controller.signal},getOwner:function(){return In}};if(typeof Symbol=="function"&&Symbol.for){var Lc=Symbol.for;Lc("selector.component"),Lc("selector.has_pseudo_class"),Lc("selector.role"),Lc("selector.test_id"),Lc("selector.text")}var bT=[],yT=typeof WeakMap=="function"?WeakMap:Map,tn=0,Xt=2,Jn=4,Ka=0,Hc=1,Bi=2,md=3,Br=4,pd=6,WN=5,Ke=tn,dt=null,Le=null,Be=0,kn=0,bd=1,qi=2,Pc=3,ew=4,jb=5,$c=6,yd=7,Mb=8,Li=9,lt=kn,Xn=null,qr=!1,el=!1,kb=!1,ya=0,St=Ka,Lr=0,Hr=0,Vb=0,Vn=0,Hi=0,Ic=null,En=null,gd=!1,vd=0,tw=0,nw=300,xd=1/0,sw=500,Fc=null,Ot=null,Pr=null,Nd=0,Ub=1,zb=2,aw=3,$r=0,rw=1,iw=2,ow=3,lw=4,wd=5,It=0,Ir=null,tl=null,Cs=0,Bb=0,qb=-0,Lb=null,cw=null,uw=null,Os=Nd,fw=null,gT=50,Yc=0,Hb=null,Pb=!1,Sd=!1,vT=50,Pi=0,Gc=null,nl=!1,Ed=null,dw=!1,hw=new Set,xT={},_d=null,sl=null,$b=!1,Ib=!1,Ad=!1,Fb=!1,Fr=0,Yb={};(function(){for(var e=0;e<sb.length;e++){var t=sb[e],n=t.toLowerCase();t=t[0].toUpperCase()+t.slice(1),xs(n,"on"+t)}xs($x,"onAnimationEnd"),xs(Ix,"onAnimationIteration"),xs(Fx,"onAnimationStart"),xs("dblclick","onDoubleClick"),xs("focusin","onFocus"),xs("focusout","onBlur"),xs(XD,"onTransitionRun"),xs(QD,"onTransitionStart"),xs(ZD,"onTransitionCancel"),xs(Yx,"onTransitionEnd")})(),Ls("onMouseEnter",["mouseout","mouseover"]),Ls("onMouseLeave",["mouseout","mouseover"]),Ls("onPointerEnter",["pointerout","pointerover"]),Ls("onPointerLeave",["pointerout","pointerover"]),Ca("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ca("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ca("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ca("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ca("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ca("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Gb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Jc)),Dd="_reactListening"+Math.random().toString(36).slice(2),mw=!1,pw=!1,Td=!1,bw=!1,Cd=!1,Od=!1,yw=!1,Rd={},NT=/\r\n?/g,wT=/\u0000|\uFFFD/g,$i="http://www.w3.org/1999/xlink",Jb="http://www.w3.org/XML/1998/namespace",ST="javascript:throw new Error('React form unexpectedly submitted.')",ET="suppressHydrationWarning",Ii="&",jd="/&",Xc="$",Qc="/$",Yr="$?",Fi="$~",al="$!",_T="html",AT="body",DT="head",Xb="F!",gw="F",vw="loading",TT="style",Wa=0,rl=1,Md=2,Qb=null,Zb=null,xw={dialog:!0,webview:!0},Kb=null,Zc=void 0,Nw=typeof setTimeout=="function"?setTimeout:void 0,CT=typeof clearTimeout=="function"?clearTimeout:void 0,Yi=-1,ww=typeof Promise=="function"?Promise:void 0,OT=typeof queueMicrotask=="function"?queueMicrotask:typeof ww<"u"?function(e){return ww.resolve(null).then(e).catch(dA)}:Nw,Wb=null,Gi=0,Kc=1,Sw=2,Ew=3,ms=4,ps=new Map,_w=new Set,er=rt.d;rt.d={f:function(){var e=er.f(),t=go();return e||t},r:function(e){var t=Un(e);t!==null&&t.tag===5&&t.type==="form"?Pg(t):er.r(e)},D:function(e){er.D(e),V1("dns-prefetch",e,null)},C:function(e,t){er.C(e,t),V1("preconnect",e,t)},L:function(e,t,n){er.L(e,t,n);var r=il;if(r&&e&&t){var l='link[rel="preload"][as="'+Tt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Tt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Tt(n.imageSizes)+'"]')):l+='[href="'+Tt(e)+'"]';var c=l;switch(t){case"style":c=No(e);break;case"script":c=wo(e)}ps.has(c)||(e=Ie({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),ps.set(c,e),r.querySelector(l)!==null||t==="style"&&r.querySelector(ac(c))||t==="script"&&r.querySelector(rc(c))||(t=r.createElement("link"),on(t,"link",e),jt(t),r.head.appendChild(t)))}},m:function(e,t){er.m(e,t);var n=il;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Tt(r)+'"][href="'+Tt(e)+'"]',c=l;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=wo(e)}if(!ps.has(c)&&(e=Ie({rel:"modulepreload",href:e},t),ps.set(c,e),n.querySelector(l)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(rc(c)))return}r=n.createElement("link"),on(r,"link",e),jt(r),n.head.appendChild(r)}}},X:function(e,t){er.X(e,t);var n=il;if(n&&e){var r=qs(n).hoistableScripts,l=wo(e),c=r.get(l);c||(c=n.querySelector(rc(l)),c||(e=Ie({src:e,async:!0},t),(t=ps.get(l))&&Np(e,t),c=n.createElement("script"),jt(c),on(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},r.set(l,c))}},S:function(e,t,n){er.S(e,t,n);var r=il;if(r&&e){var l=qs(r).hoistableStyles,c=No(e);t=t||"default";var f=l.get(c);if(!f){var h={loading:Gi,preload:null};if(f=r.querySelector(ac(c)))h.loading=Kc|ms;else{e=Ie({rel:"stylesheet",href:e,"data-precedence":t},n),(n=ps.get(c))&&xp(e,n);var y=f=r.createElement("link");jt(y),on(y,"link",e),y._p=new Promise(function(x,V){y.onload=x,y.onerror=V}),y.addEventListener("load",function(){h.loading|=Kc}),y.addEventListener("error",function(){h.loading|=Sw}),h.loading|=ms,Tf(f,t,r)}f={type:"stylesheet",instance:f,count:1,state:h},l.set(c,f)}}},M:function(e,t){er.M(e,t);var n=il;if(n&&e){var r=qs(n).hoistableScripts,l=wo(e),c=r.get(l);c||(c=n.querySelector(rc(l)),c||(e=Ie({src:e,async:!0,type:"module"},t),(t=ps.get(l))&&Np(e,t),c=n.createElement("script"),jt(c),on(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},r.set(l,c))}}};var il=typeof document>"u"?null:document,kd=null,RT=6e4,jT=800,MT=500,e0=0,t0=null,Vd=null,Ji=GA,Wc={$$typeof:la,Provider:null,Consumer:null,_currentValue:Ji,_currentValue2:Ji,_threadCount:0},Aw="%c%s%c",Dw="background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",Tw="",Ud=" ",kT=Function.prototype.bind,Cw=!1,Ow=null,Rw=null,jw=null,Mw=null,kw=null,Vw=null,Uw=null,zw=null,Bw=null,qw=null;Ow=function(e,t,n,r){t=i(e,t),t!==null&&(n=s(t.memoizedState,n,0,r),t.memoizedState=n,t.baseState=n,e.memoizedProps=Ie({},e.memoizedProps),n=dn(e,2),n!==null&&At(n,e,2))},Rw=function(e,t,n){t=i(e,t),t!==null&&(n=u(t.memoizedState,n,0),t.memoizedState=n,t.baseState=n,e.memoizedProps=Ie({},e.memoizedProps),n=dn(e,2),n!==null&&At(n,e,2))},jw=function(e,t,n,r){t=i(e,t),t!==null&&(n=a(t.memoizedState,n,r),t.memoizedState=n,t.baseState=n,e.memoizedProps=Ie({},e.memoizedProps),n=dn(e,2),n!==null&&At(n,e,2))},Mw=function(e,t,n){e.pendingProps=s(e.memoizedProps,t,0,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=dn(e,2),t!==null&&At(t,e,2)},kw=function(e,t){e.pendingProps=u(e.memoizedProps,t,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=dn(e,2),t!==null&&At(t,e,2)},Vw=function(e,t,n){e.pendingProps=a(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=dn(e,2),t!==null&&At(t,e,2)},Uw=function(e){var t=dn(e,2);t!==null&&At(t,e,2)},zw=function(e){var t=wl(),n=dn(e,t);n!==null&&At(n,e,t)},Bw=function(e){p=e},qw=function(e){d=e};var zd=!0,Bd=null,n0=!1,Gr=null,Jr=null,Xr=null,eu=new Map,tu=new Map,Qr=[],VT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" "),qd=null;if(Mf.prototype.render=Dp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error("Cannot update an unmounted root.");var n=arguments;typeof n[1]=="function"?console.error("does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."):Q(n[1])?console.error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root."):typeof n[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),n=e;var r=t.current,l=Hn(r);wp(r,l,n,t,null,null)},Mf.prototype.unmount=Dp.prototype.unmount=function(){var e=arguments;if(typeof e[0]=="function"&&console.error("does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."),e=this._internalRoot,e!==null){this._internalRoot=null;var t=e.containerInfo;(Ke&(Xt|Jn))!==tn&&console.error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition."),wp(e.current,2,null,e,null,null),go(),t[Dr]=null}},Mf.prototype.unstable_scheduleHydration=function(e){if(e){var t=so();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qr.length&&t!==0&&t<Qr[n].priority;n++);Qr.splice(n,0,e),n===0&&X1(e)}},(function(){var e=Tp.version;if(e!=="19.2.4")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
238
|
+
- react: `+(e+`
|
|
239
|
+
- react-dom: 19.2.4
|
|
240
|
+
Learn more: https://react.dev/warnings/version-mismatch`))})(),typeof Map=="function"&&Map.prototype!=null&&typeof Map.prototype.forEach=="function"&&typeof Set=="function"&&Set.prototype!=null&&typeof Set.prototype.clear=="function"&&typeof Set.prototype.forEach=="function"||console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills"),rt.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error("Unable to find node on an unmounted component."):(e=Object.keys(e).join(","),Error("Argument appears to not be a ReactComponent. Keys: "+e));return e=q(t),e=e!==null?ne(e):null,e=e===null?null:e.stateNode,e},!(function(){var e={bundleType:1,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.4"};return e.overrideHookState=Ow,e.overrideHookStateDeletePath=Rw,e.overrideHookStateRenamePath=jw,e.overrideProps=Mw,e.overridePropsDeletePath=kw,e.overridePropsRenamePath=Vw,e.scheduleUpdate=Uw,e.scheduleRetry=zw,e.setErrorHandler=Bw,e.setSuspenseHandler=qw,e.scheduleRefresh=j,e.scheduleRoot=B,e.setRefreshHandler=F,e.getCurrentFiber=BA,Eh(e)})()&&ha&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var Lw=window.location.protocol;/^(https?|file):$/.test(Lw)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(Lw==="file:"?`
|
|
241
|
+
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}nu.createRoot=function(e,t){if(!Q(e))throw Error("Target container is not a DOM element.");W1(e);var n=!1,r="",l=Qg,c=Zg,f=Kg;return t!=null&&(t.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===oa&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
|
242
|
+
|
|
243
|
+
let root = createRoot(domContainer);
|
|
244
|
+
root.render(<App />);`),t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=P1(e,1,!1,null,null,n,r,null,l,c,f,K1),e[Dr]=t.current,lp(e),new Dp(t)},nu.hydrateRoot=function(e,t,n){if(!Q(e))throw Error("Target container is not a DOM element.");W1(e),t===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var r=!1,l="",c=Qg,f=Zg,h=Kg,y=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(h=n.onRecoverableError),n.formState!==void 0&&(y=n.formState)),t=P1(e,1,!0,t,n??null,r,l,y,c,f,h,K1),t.context=$1(null),n=t.current,r=Hn(n),r=_l(r),l=br(r),l.callback=null,yr(n,l,r),Js(r,"hydrateRoot()",null),n=r,t.current.lanes=n,li(t,n),ra(t),e[Dr]=t.current,lp(e),new Mf(t)},nu.version="19.2.4",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),nu}var Gw;function wC(){return Gw||(Gw=1,i0.exports=NC()),i0.exports}var SC=wC();const EC="modulepreload",_C=function(i){return"/"+i},Jw={},He=function(s,a,o){let u=Promise.resolve();if(a&&a.length>0){let p=function(v){return Promise.all(v.map(_=>Promise.resolve(_).then(S=>({status:"fulfilled",value:S}),S=>({status:"rejected",reason:S}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),g=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));u=p(a.map(v=>{if(v=_C(v),v in Jw)return;Jw[v]=!0;const _=v.endsWith(".css"),S=_?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${S}`))return;const D=document.createElement("link");if(D.rel=_?"stylesheet":EC,_||(D.as="script"),D.crossOrigin="",D.href=v,g&&D.setAttribute("nonce",g),document.head.appendChild(D),_)return new Promise((B,j)=>{D.addEventListener("load",B),D.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${v}`)))})}))}function d(p){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=p,window.dispatchEvent(m),!m.defaultPrevented)throw p}return u.then(p=>{for(const m of p||[])m.status==="rejected"&&d(m.reason);return s().catch(d)})};function rE(i){try{const s=i.split(".");if(s.length!==3)return null;const a=atob(s[1].replace(/-/g,"+").replace(/_/g,"/"));return JSON.parse(a)}catch{return null}}function iE(i){const s=rE(i);return!s||typeof s.exp!="number"?null:s.exp}function K0(i,s=0){const a=iE(i);return a===null?!0:Date.now()/1e3>=a-s}const _0="/api";let Wr=null;function Hd(i){Wr=i}function oE(){return Wr}async function Xw(){const i=sessionStorage.getItem("lt_credentials");if(!i)return null;try{const{username:s,password:a}=JSON.parse(i),o=await fetch(`${_0}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:s,password:a})});if(!o.ok)return null;const u=await o.json();return u.token&&u.user&&sessionStorage.setItem("lt_user_info",JSON.stringify({displayName:u.user.display_name,username:u.user.external_id})),u.token??null}catch{return null}}let Zr=null;async function pt(i,s={}){const a={"Content-Type":"application/json",...s.headers};if(Wr){if(K0(Wr)){Zr||(Zr=Xw().finally(()=>{Zr=null}));const u=await Zr;if(u)Wr=u,window.dispatchEvent(new CustomEvent("auth:refreshed",{detail:{token:u}}));else throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new Error("Session expired")}a.Authorization=`Bearer ${Wr}`}let o=await fetch(`${_0}${i}`,{...s,headers:a});if(o.status===401&&Wr){Zr||(Zr=Xw().finally(()=>{Zr=null}));const u=await Zr;if(u&&(Wr=u,window.dispatchEvent(new CustomEvent("auth:refreshed",{detail:{token:u}})),a.Authorization=`Bearer ${u}`,o=await fetch(`${_0}${i}`,{...s,headers:a})),o.status===401)throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new Error("Session expired")}else if(o.status===401)throw window.dispatchEvent(new CustomEvent("auth:unauthorized")),new Error("Session expired");if(!o.ok){const u=await o.json().catch(()=>({error:o.statusText}));throw new Error(u.message||u.error||o.statusText)}return o.json()}const lE=z.createContext(null),AC=300;function c0(i,s){if(K0(i))return null;const a=rE(i);if(!a)return null;const o=s??(()=>{try{const u=sessionStorage.getItem("lt_user_info");return u?JSON.parse(u):null}catch{return null}})();return{userId:a.userId,displayName:(o==null?void 0:o.displayName)??null,username:(o==null?void 0:o.username)??null,roles:a.roles??[]}}function DC({children:i}){const[s,a]=z.useState(()=>{const S=sessionStorage.getItem("lt_token");return S?K0(S)?(sessionStorage.removeItem("lt_token"),null):(Hd(S),c0(S)):null}),o=z.useRef(void 0),u=z.useCallback(S=>{clearTimeout(o.current);const D=iE(S);if(!D)return;const B=(D-AC)*1e3-Date.now();B<=0||(o.current=setTimeout(async()=>{const j=sessionStorage.getItem("lt_credentials");if(j)try{const{username:F,password:Q}=JSON.parse(j),ee=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:F,password:Q})});if(!ee.ok)return;const te=await ee.json();te.token&&window.dispatchEvent(new CustomEvent("auth:refreshed",{detail:{token:te.token}}))}catch{}},B))},[]),d=z.useCallback((S,D,B)=>{const j={displayName:(B==null?void 0:B.displayName)??null,username:(B==null?void 0:B.username)??(D==null?void 0:D.username)??null},F=c0(S,j);F&&(Hd(S),sessionStorage.setItem("lt_token",S),sessionStorage.setItem("lt_user_info",JSON.stringify(j)),D&&sessionStorage.setItem("lt_credentials",JSON.stringify(D)),a(F),u(S))},[u]),p=z.useCallback(()=>{clearTimeout(o.current),Hd(null),sessionStorage.removeItem("lt_token"),sessionStorage.removeItem("lt_credentials"),sessionStorage.removeItem("lt_user_info"),a(null)},[]);z.useEffect(()=>{const S=()=>p(),D=B=>{var Q;const j=(Q=B.detail)==null?void 0:Q.token;if(!j)return;const F=c0(j);F&&(Hd(j),sessionStorage.setItem("lt_token",j),a(F),u(j))};return window.addEventListener("auth:unauthorized",S),window.addEventListener("auth:refreshed",D),()=>{window.removeEventListener("auth:unauthorized",S),window.removeEventListener("auth:refreshed",D)}},[p,u]),z.useEffect(()=>{const S=sessionStorage.getItem("lt_token");return S&&s&&u(S),()=>clearTimeout(o.current)},[]);const m=(s==null?void 0:s.roles.some(S=>S.type==="superadmin"))??!1,g=z.useCallback(S=>(s==null?void 0:s.roles.some(D=>D.role===S))??!1,[s]),v=z.useCallback(S=>(s==null?void 0:s.roles.some(D=>D.type===S))??!1,[s]),_=(s==null?void 0:s.roles.map(S=>S.role))??[];return b.jsxDEV(lE.Provider,{value:{user:s,isAuthenticated:!!s,isSuperAdmin:m,login:d,logout:p,hasRole:g,hasRoleType:v,userRoleNames:_},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useAuth.tsx",lineNumber:178,columnNumber:5},this)}function Ki(){const i=z.useContext(lE);if(!i)throw new Error("useAuth must be used within AuthProvider");return i}const es=new Uint8Array(0),Wi=new TextEncoder,Kn=new TextDecoder;function TC(...i){let s=0;for(let u=0;u<i.length;u++)s+=i[u].length;const a=new Uint8Array(s);let o=0;for(let u=0;u<i.length;u++)a.set(i[u],o),o+=i[u].length;return a}function du(...i){const s=[];for(let a=0;a<i.length;a++)s.push(Wi.encode(i[a]));return s.length===0?es:s.length===1?s[0]:TC(...s)}function Qw(i){return!i||i.length===0?"":Kn.decode(i)}const Zw="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",Kw=36,CC=0xcfd41b9100000,Ww=33,OC=333,eS=22;function RC(i){for(let s=0;s<i.length;s++)i[s]=Math.floor(Math.random()*255)}function jC(i){var s;(s=globalThis==null?void 0:globalThis.crypto)!=null&&s.getRandomValues?globalThis.crypto.getRandomValues(i):RC(i)}class MC{constructor(){w(this,"buf");w(this,"seq");w(this,"inc");w(this,"inited");this.buf=new Uint8Array(eS),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){this.seq=Math.floor(Math.random()*CC),this.inc=Math.floor(Math.random()*(OC-Ww)+Ww)}setPre(){const s=new Uint8Array(12);jC(s);for(let a=0;a<12;a++){const o=s[a]%36;this.buf[a]=Zw.charCodeAt(o)}}fillSeq(){let s=this.seq;for(let a=eS-1;a>=12;a--)this.buf[a]=Zw.charCodeAt(s%Kw),s=Math.floor(s/Kw)}next(){return this.inited||this.init(),this.seq+=this.inc,this.seq>0xcfd41b9100000&&(this.setPre(),this.initSeqAndInc()),this.fillSeq(),String.fromCharCode.apply(String,this.buf)}reset(){this.init()}}const ri=new MC;var nr;(function(i){i.Disconnect="disconnect",i.Reconnect="reconnect",i.Update="update",i.LDM="ldm",i.Error="error"})(nr||(nr={}));var fl;(function(i){i.Reconnecting="reconnecting",i.PingTimer="pingTimer",i.StaleConnection="staleConnection",i.ClientInitiatedReconnect="client initiated reconnect"})(fl||(fl={}));var ue;(function(i){i.ApiError="BAD API",i.BadAuthentication="BAD_AUTHENTICATION",i.BadCreds="BAD_CREDS",i.BadHeader="BAD_HEADER",i.BadJson="BAD_JSON",i.BadPayload="BAD_PAYLOAD",i.BadSubject="BAD_SUBJECT",i.Cancelled="CANCELLED",i.ConnectionClosed="CONNECTION_CLOSED",i.ConnectionDraining="CONNECTION_DRAINING",i.ConnectionRefused="CONNECTION_REFUSED",i.ConnectionTimeout="CONNECTION_TIMEOUT",i.Disconnect="DISCONNECT",i.InvalidOption="INVALID_OPTION",i.InvalidPayload="INVALID_PAYLOAD",i.MaxPayloadExceeded="MAX_PAYLOAD_EXCEEDED",i.NoResponders="503",i.NotFunction="NOT_FUNC",i.RequestError="REQUEST_ERROR",i.ServerOptionNotAvailable="SERVER_OPT_NA",i.SubClosed="SUB_CLOSED",i.SubDraining="SUB_DRAINING",i.Timeout="TIMEOUT",i.Tls="TLS",i.Unknown="UNKNOWN_ERROR",i.WssRequired="WSS_REQUIRED",i.JetStreamInvalidAck="JESTREAM_INVALID_ACK",i.JetStream404NoMessages="404",i.JetStream408RequestTimeout="408",i.JetStream409MaxAckPendingExceeded="409",i.JetStream409="409",i.JetStreamNotEnabled="503",i.JetStreamIdleHeartBeat="IDLE_HEARTBEAT",i.AuthorizationViolation="AUTHORIZATION_VIOLATION",i.AuthenticationExpired="AUTHENTICATION_EXPIRED",i.ProtocolError="NATS_PROTOCOL_ERR",i.PermissionsViolation="PERMISSIONS_VIOLATION",i.AuthenticationTimeout="AUTHENTICATION_TIMEOUT",i.AccountExpired="ACCOUNT_EXPIRED"})(ue||(ue={}));function kC(i){return typeof i.code=="string"}class cE{constructor(){w(this,"messages");this.messages=new Map,this.messages.set(ue.InvalidPayload,"Invalid payload type - payloads can be 'binary', 'string', or 'json'"),this.messages.set(ue.BadJson,"Bad JSON"),this.messages.set(ue.WssRequired,"TLS is required, therefore a secure websocket connection is also required")}static getMessage(s){return VC.getMessage(s)}getMessage(s){return this.messages.get(s)||s}}const VC=new cE;class ge extends Error{constructor(a,o,u){super(a);w(this,"name");w(this,"message");w(this,"code");w(this,"permissionContext");w(this,"chainedError");w(this,"api_error");this.name="NatsError",this.message=a,this.code=o,this.chainedError=u}static errorForCode(a,o){const u=cE.getMessage(a);return new ge(u,a,o)}isAuthError(){return this.code===ue.AuthenticationExpired||this.code===ue.AuthorizationViolation||this.code===ue.AccountExpired}isAuthTimeout(){return this.code===ue.AuthenticationTimeout}isPermissionError(){return this.code===ue.PermissionsViolation}isProtocolError(){return this.code===ue.ProtocolError}isJetStreamError(){return this.api_error!==void 0}jsError(){return this.api_error?this.api_error:null}}var Qn;(function(i){i[i.Exact=0]="Exact",i[i.CanonicalMIME=1]="CanonicalMIME",i[i.IgnoreCase=2]="IgnoreCase"})(Qn||(Qn={}));var Ms;(function(i){i.Timer="timer",i.Count="count",i.JitterTimer="jitterTimer",i.SentinelMsg="sentinelMsg"})(Ms||(Ms={}));var hu;(function(i){i.STATS="io.nats.micro.v1.stats_response",i.INFO="io.nats.micro.v1.info_response",i.PING="io.nats.micro.v1.ping_response"})(hu||(hu={}));const rh="Nats-Service-Error",ih="Nats-Service-Error-Code";class oh extends Error{constructor(a,o){super(o);w(this,"code");this.code=a}static isServiceError(a){return oh.toServiceError(a)!==null}static toServiceError(a){var u,d;const o=((u=a==null?void 0:a.headers)==null?void 0:u.get(ih))||"";if(o!==""){const p=parseInt(o)||400,m=((d=a==null?void 0:a.headers)==null?void 0:d.get(rh))||"";return new oh(p,m.length?m:o)}return null}}function sr(i=""){if(i=i||"_INBOX",typeof i!="string")throw new Error("prefix must be a string");return i.split(".").forEach(s=>{if(s==="*"||s===">")throw new Error(`inbox prefixes cannot have wildcards '${i}'`)}),`${i}.${ri.next()}`}const A0="127.0.0.1";var ti;(function(i){i.PING="PING",i.STATS="STATS",i.INFO="INFO"})(ti||(ti={}));function bh(i,...s){for(let a=0;a<s.length;a++){const o=s[a];Object.keys(o).forEach(function(u){i[u]=o[u]})}return i}function Pd(i){return Kn.decode(i).replace(/\n/g,"␊").replace(/\r/g,"␍")}function bl(i,s=!0){const a=s?ge.errorForCode(ue.Timeout):null;let o,u;const d=new Promise((p,m)=>{o={cancel:()=>{u&&clearTimeout(u)}},u=setTimeout(()=>{m(a===null?ge.errorForCode(ue.Timeout):a)},i)});return Object.assign(d,o)}function vl(i=0){let s;const a=new Promise(o=>{const u=setTimeout(()=>{o()},i);s={cancel:()=>{u&&clearTimeout(u)}}});return Object.assign(a,s)}function _t(){let i={};const s=new Promise((a,o)=>{i={resolve:a,reject:o}});return Object.assign(s,i)}function uE(i){for(let s=i.length-1;s>0;s--){const a=Math.floor(Math.random()*(s+1));[i[s],i[a]]=[i[a],i[s]]}return i}function UC(i){return i===0?0:Math.floor(i/2+Math.random()*i)}function W0(i=[0,250,250,500,500,3e3,5e3]){Array.isArray(i)||(i=[0,250,250,500,500,3e3,5e3]);const s=i.length-1;return{backoff(a){return UC(a>s?i[s]:i[a])}}}function Et(i){return i*1e6}function ey(i){return Math.floor(i/1e6)}function tS(i){let o=!0;const u=new Array(i.length);for(let d=0;d<i.length;d++){let p=i.charCodeAt(d);if(p===58||p<33||p>126)throw new ge(`'${i[d]}' is not a valid character for a header key`,ue.BadHeader);o&&97<=p&&p<=122?p-=32:!o&&65<=p&&p<=90&&(p+=32),u[d]=p,o=p==45}return String.fromCharCode(...u)}function ar(i=0,s=""){if(i===0&&s!==""||i>0&&s==="")throw new Error("setting status requires both code and description");return new ni(i,s)}const u0="NATS/1.0";class ni{constructor(s=0,a=""){w(this,"_code");w(this,"headers");w(this,"_description");this._code=s,this._description=a,this.headers=new Map}[Symbol.iterator](){return this.headers.entries()}size(){return this.headers.size}equals(s){if(s&&this.headers.size===s.headers.size&&this._code===s._code){for(const[a,o]of this.headers){const u=s.values(a);if(o.length!==u.length)return!1;const d=[...o].sort(),p=[...u].sort();for(let m=0;m<d.length;m++)if(d[m]!==p[m])return!1}return!0}return!1}static decode(s){const a=new ni,u=Kn.decode(s).split(`\r
|
|
245
|
+
`),d=u[0];if(d!==u0){let p=d.replace(u0,"").trim();if(p.length>0){a._code=parseInt(p,10),isNaN(a._code)&&(a._code=0);const m=a._code.toString();p=p.replace(m,""),a._description=p.trim()}}return u.length>=1&&u.slice(1).map(p=>{if(p){const m=p.indexOf(":");if(m>-1){const g=p.slice(0,m),v=p.slice(m+1).trim();a.append(g,v)}}}),a}toString(){if(this.headers.size===0&&this._code===0)return"";let s=u0;this._code>0&&this._description!==""&&(s+=` ${this._code} ${this._description}`);for(const[a,o]of this.headers)for(let u=0;u<o.length;u++)s=`${s}\r
|
|
246
|
+
${a}: ${o[u]}`;return`${s}\r
|
|
247
|
+
\r
|
|
248
|
+
`}encode(){return Wi.encode(this.toString())}static validHeaderValue(s){if(/[\r\n]/.test(s))throw new ge("invalid header value - \\r and \\n are not allowed.",ue.BadHeader);return s.trim()}keys(){const s=[];for(const a of this.headers.keys())s.push(a);return s}findKeys(s,a=Qn.Exact){const o=this.keys();switch(a){case Qn.Exact:return o.filter(u=>u===s);case Qn.CanonicalMIME:return s=tS(s),o.filter(u=>u===s);default:{const u=s.toLowerCase();return o.filter(d=>u===d.toLowerCase())}}}get(s,a=Qn.Exact){const o=this.findKeys(s,a);if(o.length){const u=this.headers.get(o[0]);if(u)return Array.isArray(u)?u[0]:u}return""}last(s,a=Qn.Exact){const o=this.findKeys(s,a);if(o.length){const u=this.headers.get(o[0]);if(u)return Array.isArray(u)?u[u.length-1]:u}return""}has(s,a=Qn.Exact){return this.findKeys(s,a).length>0}set(s,a,o=Qn.Exact){this.delete(s,o),this.append(s,a,o)}append(s,a,o=Qn.Exact){const u=tS(s);o===Qn.CanonicalMIME&&(s=u);const d=this.findKeys(s,o);s=d.length>0?d[0]:s;const p=ni.validHeaderValue(a);let m=this.headers.get(s);m||(m=[],this.headers.set(s,m)),m.push(p)}values(s,a=Qn.Exact){const o=[];return this.findKeys(s,a).forEach(d=>{const p=this.headers.get(d);p&&o.push(...p)}),o}delete(s,a=Qn.Exact){this.findKeys(s,a).forEach(u=>{this.headers.delete(u)})}get hasError(){return this._code>=300}get status(){return`${this._code} ${this._description}`.trim()}toRecord(){const s={};return this.keys().forEach(a=>{s[a]=this.values(a)}),s}get code(){return this._code}get description(){return this._description}static fromRecord(s){const a=new ni;for(const o in s)a.headers.set(o,s[o]);return a}}function D0(){return{encode(i){return Wi.encode(i)},decode(i){return Kn.decode(i)}}}function ks(i){return{encode(s){try{return s===void 0&&(s=null),Wi.encode(JSON.stringify(s))}catch(a){throw ge.errorForCode(ue.BadJson,a)}},decode(s){try{return JSON.parse(Kn.decode(s),i)}catch(a){throw ge.errorForCode(ue.BadJson,a)}}}}function fE(i){var s;return i&&i.data.length===0&&((s=i.headers)==null?void 0:s.code)===503?ge.errorForCode(ue.NoResponders):null}class ty{constructor(s,a,o){w(this,"_headers");w(this,"_msg");w(this,"_rdata");w(this,"_reply");w(this,"_subject");w(this,"publisher");this._msg=s,this._rdata=a,this.publisher=o}get subject(){return this._subject?this._subject:(this._subject=Kn.decode(this._msg.subject),this._subject)}get reply(){return this._reply?this._reply:(this._reply=Kn.decode(this._msg.reply),this._reply)}get sid(){return this._msg.sid}get headers(){if(this._msg.hdr>-1&&!this._headers){const s=this._rdata.subarray(0,this._msg.hdr);this._headers=ni.decode(s)}return this._headers}get data(){return this._rdata?this._msg.hdr>-1?this._rdata.subarray(this._msg.hdr):this._rdata:new Uint8Array(0)}respond(s=es,a){return this.reply?(this.publisher.publish(this.reply,s,a),!0):!1}size(){var u;const s=this._msg.subject.length,a=((u=this._msg.reply)==null?void 0:u.length)||0,o=this._msg.size===-1?0:this._msg.size;return s+a+o}json(s){return ks(s).decode(this.data)}string(){return Kn.decode(this.data)}requestInfo(){var a;const s=(a=this.headers)==null?void 0:a.get("Nats-Request-Info");return s?JSON.parse(s,function(o,u){return(o==="start"||o==="stop")&&u!==""?new Date(Date.parse(u)):u}):null}}w(ty,"jc");function dl(i){return yh("durable",i)}function _n(i){return yh("stream",i)}function yh(i,s=""){if(s==="")throw Error(`${i} name required`);return[".","*",">","/","\\"," "," ",`
|
|
249
|
+
`,"\r"].forEach(o=>{if(s.indexOf(o)!==-1){switch(o){case`
|
|
250
|
+
`:o="\\n";break;case"\r":o="\\r";break;case" ":o="\\t";break}throw Error(`invalid ${i} name - ${i} name cannot contain '${o}'`)}}),""}function lu(i,s=""){if(s==="")throw Error(`${i} name required`);const a=zC(s);if(a.length)throw new Error(`invalid ${i} name - ${i} name ${a}`)}function zC(i=""){if(i==="")throw Error("name required");const s=/^[-\w]+$/g;if(i.match(s)===null){for(const o of i.split(""))if(o.match(s)===null)return`cannot contain '${o}'`}return""}function T0(i){if(i.data.length>0)return!1;const s=i.headers;return s?s.code>=100&&s.code<200:!1}function C0(i){var s;return T0(i)&&((s=i.headers)==null?void 0:s.description)==="Idle Heartbeat"}function BC(i,s,a){const o=ar(i,s),u={hdr:1,sid:0,size:0},d=new ty(u,es,{});return d._headers=o,d._subject=a,d}function hl(i){if(i.data.length!==0)return null;const s=i.headers;return s?dE(s.code,s.description):null}var ys;(function(i){i.MaxBatchExceeded="exceeded maxrequestbatch of",i.MaxExpiresExceeded="exceeded maxrequestexpires of",i.MaxBytesExceeded="exceeded maxrequestmaxbytes of",i.MaxMessageSizeExceeded="message size exceeds maxbytes",i.PushConsumer="consumer is push based",i.MaxWaitingExceeded="exceeded maxwaiting",i.IdleHeartbeatMissed="idle heartbeats missed",i.ConsumerDeleted="consumer deleted"})(ys||(ys={}));function qC(i){return i.code!==ue.JetStream409?!1:[ys.MaxBatchExceeded,ys.MaxExpiresExceeded,ys.MaxBytesExceeded,ys.MaxMessageSizeExceeded,ys.PushConsumer,ys.IdleHeartbeatMissed,ys.ConsumerDeleted].find(a=>i.message.indexOf(a)!==-1)!==void 0}function dE(i,s=""){if(i<300)return null;switch(s=s.toLowerCase(),i){case 404:return new ge(s,ue.JetStream404NoMessages);case 408:return new ge(s,ue.JetStream408RequestTimeout);case 409:{const a=s.startsWith(ys.IdleHeartbeatMissed)?ue.JetStreamIdleHeartBeat:ue.JetStream409;return new ge(s,a)}case 503:return ge.errorForCode(ue.JetStreamNotEnabled,new Error(s));default:return s===""&&(s=ue.Unknown),new ge(s,`${i}`)}}class sn{constructor(){w(this,"inflight");w(this,"processed");w(this,"received");w(this,"noIterator");w(this,"iterClosed");w(this,"done");w(this,"signal");w(this,"yields");w(this,"filtered");w(this,"pendingFiltered");w(this,"ingestionFilterFn");w(this,"protocolFilterFn");w(this,"dispatchedFn");w(this,"ctx");w(this,"_data");w(this,"err");w(this,"time");w(this,"yielding");this.inflight=0,this.filtered=0,this.pendingFiltered=0,this.processed=0,this.received=0,this.noIterator=!1,this.done=!1,this.signal=_t(),this.yields=[],this.iterClosed=_t(),this.time=0,this.yielding=!1}[Symbol.asyncIterator](){return this.iterate()}push(s){if(this.done)return;if(typeof s=="function"){this.yields.push(s),this.signal.resolve();return}const{ingest:a,protocol:o}=this.ingestionFilterFn?this.ingestionFilterFn(s,this.ctx||this):{ingest:!0,protocol:!1};a&&(o&&(this.filtered++,this.pendingFiltered++),this.yields.push(s),this.signal.resolve())}async*iterate(){if(this.noIterator)throw new ge("unsupported iterator",ue.ApiError);if(this.yielding)throw new ge("already yielding",ue.ApiError);this.yielding=!0;try{for(;;){if(this.yields.length===0&&await this.signal,this.err)throw this.err;const s=this.yields;this.inflight=s.length,this.yields=[];for(let a=0;a<s.length;a++){if(typeof s[a]=="function"){const u=s[a];try{u()}catch(d){throw d}if(this.err)throw this.err;continue}if(this.protocolFilterFn?this.protocolFilterFn(s[a]):!0){this.processed++;const u=Date.now();yield s[a],this.time=Date.now()-u,this.dispatchedFn&&s[a]&&this.dispatchedFn(s[a])}else this.pendingFiltered--;this.inflight--}if(this.done)break;this.yields.length===0&&(s.length=0,this.yields=s,this.signal=_t())}}finally{this.stop()}}stop(s){this.done||(this.err=s,this.done=!0,this.signal.resolve(),this.iterClosed.resolve(s))}getProcessed(){return this.noIterator?this.received:this.processed}getPending(){return this.yields.length+this.inflight-this.pendingFiltered}getReceived(){return this.received-this.filtered}}class ny{constructor(s,a,o={maxOut:2}){w(this,"interval");w(this,"maxOut");w(this,"cancelAfter");w(this,"timer");w(this,"autoCancelTimer");w(this,"last");w(this,"missed");w(this,"count");w(this,"callback");this.interval=s,this.maxOut=(o==null?void 0:o.maxOut)||2,this.cancelAfter=(o==null?void 0:o.cancelAfter)||0,this.last=Date.now(),this.missed=0,this.count=0,this.callback=a,this._schedule()}cancel(){this.autoCancelTimer&&clearTimeout(this.autoCancelTimer),this.timer&&clearInterval(this.timer),this.timer=0,this.autoCancelTimer=0,this.missed=0}work(){this.last=Date.now(),this.missed=0}_change(s,a=0,o=2){this.interval=s,this.maxOut=o,this.cancelAfter=a,this.restart()}restart(){this.cancel(),this._schedule()}_schedule(){this.cancelAfter>0&&(this.autoCancelTimer=setTimeout(()=>{this.cancel()},this.cancelAfter)),this.timer=setInterval(()=>{if(this.count++,Date.now()-this.last>this.interval&&this.missed++,this.missed>=this.maxOut)try{this.callback(this.missed)===!0&&this.cancel()}catch(s){console.log(s)}},this.interval)}}var O0;(function(i){i.Limits="limits",i.Interest="interest",i.Workqueue="workqueue"})(O0||(O0={}));var yu;(function(i){i.Old="old",i.New="new"})(yu||(yu={}));var R0;(function(i){i.File="file",i.Memory="memory"})(R0||(R0={}));var Vt;(function(i){i.All="all",i.Last="last",i.New="new",i.StartSequence="by_start_sequence",i.StartTime="by_start_time",i.LastPerSubject="last_per_subject"})(Vt||(Vt={}));var nn;(function(i){i.None="none",i.All="all",i.Explicit="explicit",i.NotSet=""})(nn||(nn={}));var yl;(function(i){i.Instant="instant",i.Original="original"})(yl||(yl={}));var ii;(function(i){i.None="none",i.S2="s2"})(ii||(ii={}));var lh;(function(i){i.CreateOrUpdate="",i.Update="update",i.Create="create"})(lh||(lh={}));function LC(i,s={}){return Object.assign({name:i,deliver_policy:Vt.All,ack_policy:nn.Explicit,ack_wait:Et(30*1e3),replay_policy:yl.Instant},s)}var nS;(function(i){i.API="api_audit",i.StreamAction="stream_action",i.ConsumerAction="consumer_action",i.SnapshotCreate="snapshot_create",i.SnapshotComplete="snapshot_complete",i.RestoreCreate="restore_create",i.RestoreComplete="restore_complete",i.MaxDeliver="max_deliver",i.Terminated="terminated",i.Ack="consumer_ack",i.StreamLeaderElected="stream_leader_elected",i.StreamQuorumLost="stream_quorum_lost",i.ConsumerLeaderElected="consumer_leader_elected",i.ConsumerQuorumLost="consumer_quorum_lost"})(nS||(nS={}));var Dn;(function(i){i.StreamSourceHdr="Nats-Stream-Source",i.LastConsumerSeqHdr="Nats-Last-Consumer",i.LastStreamSeqHdr="Nats-Last-Stream",i.ConsumerStalledHdr="Nats-Consumer-Stalled",i.MessageSizeHdr="Nats-Msg-Size",i.RollupHdr="Nats-Rollup",i.RollupValueSubject="sub",i.RollupValueAll="all",i.PendingMessagesHdr="Nats-Pending-Messages",i.PendingBytesHdr="Nats-Pending-Bytes"})(Dn||(Dn={}));var Rs;(function(i){i.LastValue="",i.AllHistory="history",i.UpdatesOnly="updates"})(Rs||(Rs={}));var ul;(function(i){i.Stream="Nats-Stream",i.Sequence="Nats-Sequence",i.TimeStamp="Nats-Time-Stamp",i.Subject="Nats-Subject"})(ul||(ul={}));var sS;(function(i){i.Stream="Nats-Stream",i.Subject="Nats-Subject",i.Sequence="Nats-Sequence",i.LastSequence="Nats-Last-Sequence",i.Size="Nats-Msg-Size"})(sS||(sS={}));const Zn="KV_";class HC{constructor(s){w(this,"config");w(this,"ordered");w(this,"mack");w(this,"stream");w(this,"callbackFn");w(this,"max");w(this,"qname");w(this,"isBind");w(this,"filters");this.stream="",this.mack=!1,this.ordered=!1,this.config=LC("",s||{})}getOpts(){var a;const s={};if(s.config=Object.assign({},this.config),s.config.filter_subject&&(this.filterSubject(s.config.filter_subject),s.config.filter_subject=void 0),s.config.filter_subjects&&((a=s.config.filter_subjects)==null||a.forEach(o=>{this.filterSubject(o)}),s.config.filter_subjects=void 0),s.mack=this.mack,s.stream=this.stream,s.callbackFn=this.callbackFn,s.max=this.max,s.queue=this.qname,s.ordered=this.ordered,s.config.ack_policy=s.ordered?nn.None:s.config.ack_policy,s.isBind=s.isBind||!1,this.filters)switch(this.filters.length){case 0:break;case 1:s.config.filter_subject=this.filters[0];break;default:s.config.filter_subjects=this.filters}return s}description(s){return this.config.description=s,this}deliverTo(s){return this.config.deliver_subject=s,this}durable(s){return dl(s),this.config.durable_name=s,this}startSequence(s){if(s<=0)throw new Error("sequence must be greater than 0");return this.config.deliver_policy=Vt.StartSequence,this.config.opt_start_seq=s,this}startTime(s){return this.config.deliver_policy=Vt.StartTime,this.config.opt_start_time=s.toISOString(),this}deliverAll(){return this.config.deliver_policy=Vt.All,this}deliverLastPerSubject(){return this.config.deliver_policy=Vt.LastPerSubject,this}deliverLast(){return this.config.deliver_policy=Vt.Last,this}deliverNew(){return this.config.deliver_policy=Vt.New,this}startAtTimeDelta(s){return this.startTime(new Date(Date.now()-s)),this}headersOnly(){return this.config.headers_only=!0,this}ackNone(){return this.config.ack_policy=nn.None,this}ackAll(){return this.config.ack_policy=nn.All,this}ackExplicit(){return this.config.ack_policy=nn.Explicit,this}ackWait(s){return this.config.ack_wait=Et(s),this}maxDeliver(s){return this.config.max_deliver=s,this}filterSubject(s){return this.filters=this.filters||[],this.filters.push(s),this}replayInstantly(){return this.config.replay_policy=yl.Instant,this}replayOriginal(){return this.config.replay_policy=yl.Original,this}sample(s){if(s=Math.trunc(s),s<0||s>100)throw new Error("value must be between 0-100");return this.config.sample_freq=`${s}%`,this}limit(s){return this.config.rate_limit_bps=s,this}maxWaiting(s){return this.config.max_waiting=s,this}maxAckPending(s){return this.config.max_ack_pending=s,this}idleHeartbeat(s){return this.config.idle_heartbeat=Et(s),this}flowControl(){return this.config.flow_control=!0,this}deliverGroup(s){return this.queue(s),this}manualAck(){return this.mack=!0,this}maxMessages(s){return this.max=s,this}callback(s){return this.callbackFn=s,this}queue(s){return this.qname=s,this.config.deliver_group=s,this}orderedConsumer(){return this.ordered=!0,this}bind(s,a){return this.stream=s,this.config.durable_name=a,this.isBind=!0,this}bindStream(s){return this.stream=s,this}inactiveEphemeralThreshold(s){return this.config.inactive_threshold=Et(s),this}maxPullBatch(s){return this.config.max_batch=s,this}maxPullRequestExpires(s){return this.config.max_expires=Et(s),this}memory(){return this.config.mem_storage=!0,this}numReplicas(s){return this.config.num_replicas=s,this}consumerName(s){return this.config.name=s,this}}function si(i){return new HC(i)}function aS(i){return typeof i.getOpts=="function"}class PC{static encode(s){if(typeof s=="string")return btoa(s);const a=Array.from(s);return btoa(String.fromCharCode(...a))}static decode(s,a=!1){const o=atob(s);return a?Uint8Array.from(o,u=>u.charCodeAt(0)):o}}class ml{static encode(s){return ml.toB64URLEncoding(PC.encode(s))}static decode(s,a=!1){return ml.decode(ml.fromB64URLEncoding(s),a)}static toB64URLEncoding(s){return s.replace(/\+/g,"-").replace(/\//g,"_")}static fromB64URLEncoding(s){return s.replace(/_/g,"/").replace(/-/g,"+")}}class gl{constructor(){w(this,"buffers");w(this,"byteLength");this.buffers=[],this.byteLength=0}static concat(...s){let a=0;for(let d=0;d<s.length;d++)a+=s[d].length;const o=new Uint8Array(a);let u=0;for(let d=0;d<s.length;d++)o.set(s[d],u),u+=s[d].length;return o}static fromAscii(s){return s||(s=""),Wi.encode(s)}static toAscii(s){return Kn.decode(s)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){const s=new Uint8Array(this.byteLength);let a=0;for(let o=0;o<this.buffers.length;o++)s.set(this.buffers[o],a),a+=this.buffers[o].length;this.buffers.length=0,this.buffers.push(s)}}shift(){if(this.buffers.length){const s=this.buffers.shift();if(s)return this.byteLength-=s.length,s}return new Uint8Array(0)}drain(s){if(this.buffers.length){this.pack();const a=this.buffers.pop();if(a){const o=this.byteLength;(s===void 0||s>o)&&(s=o);const u=a.subarray(0,s);return o>s&&this.buffers.push(a.subarray(s)),this.byteLength=o-s,u}}return new Uint8Array(0)}fill(s,...a){s&&(this.buffers.push(s),this.byteLength+=s.length);for(let o=0;o<a.length;o++)a[o]&&a[o].length&&(this.buffers.push(a[o]),this.byteLength+=a[o].length)}peek(){return this.buffers.length?(this.pack(),this.buffers[0]):new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}function $C(i,s){return s.forEach(function(a){a&&typeof a!="string"&&!Array.isArray(a)&&Object.keys(a).forEach(function(o){if(o!=="default"&&!(o in i)){var u=Object.getOwnPropertyDescriptor(a,o);Object.defineProperty(i,o,u.get?u:{enumerable:!0,get:function(){return a[o]}})}})}),Object.freeze(i)}var IC=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},su=IC.performance||{};su.now||su.mozNow||su.msNow||su.oNow||su.webkitNow;var rS={versions:{}},FC=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function YC(i){if(i.__esModule)return i;var s=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(i).forEach(function(a){var o=Object.getOwnPropertyDescriptor(i,a);Object.defineProperty(s,a,o.get?o:{enumerable:!0,get:function(){return i[a]}})}),s}var f0,gh={exports:{}},iS={},oS=YC($C({__proto__:null,default:iS},[iS]));f0=gh,(function(){var i="input is invalid type",s=typeof window=="object",a=s?window:{};a.JS_SHA256_NO_WINDOW&&(s=!1);var o=!s&&typeof self=="object",u=!a.JS_SHA256_NO_NODE_JS&&rS.versions&&rS.versions.node;u?a=FC:o&&(a=self);var d=!a.JS_SHA256_NO_COMMON_JS&&f0.exports,p=!a.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",m="0123456789abcdef".split(""),g=[-2147483648,8388608,32768,128],v=[24,16,8,0],_=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],S=["hex","array","digest","arrayBuffer"],D=[];!a.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(q){return Object.prototype.toString.call(q)==="[object Array]"}),!p||!a.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(q){return typeof q=="object"&&q.buffer&&q.buffer.constructor===ArrayBuffer});var B=function(q,ne){return function(oe){return new te(ne,!0).update(oe)[q]()}},j=function(q){var ne=B("hex",q);u&&(ne=F(ne,q)),ne.create=function(){return new te(q)},ne.update=function(X){return ne.create().update(X)};for(var oe=0;oe<S.length;++oe){var W=S[oe];ne[W]=B(W,q)}return ne},F=function(q,ne){var oe,W=oS,X=oS.Buffer,H=ne?"sha224":"sha256";return oe=X.from&&!a.JS_SHA256_NO_BUFFER_FROM?X.from:function(le){return new X(le)},function(le){if(typeof le=="string")return W.createHash(H).update(le,"utf8").digest("hex");if(le==null)throw new Error(i);return le.constructor===ArrayBuffer&&(le=new Uint8Array(le)),Array.isArray(le)||ArrayBuffer.isView(le)||le.constructor===X?W.createHash(H).update(oe(le)).digest("hex"):q(le)}},Q=function(q,ne){return function(oe,W){return new Se(oe,ne,!0).update(W)[q]()}},ee=function(q){var ne=Q("hex",q);ne.create=function(X){return new Se(X,q)},ne.update=function(X,H){return ne.create(X).update(H)};for(var oe=0;oe<S.length;++oe){var W=S[oe];ne[W]=Q(W,q)}return ne};function te(q,ne){ne?(D[0]=D[16]=D[1]=D[2]=D[3]=D[4]=D[5]=D[6]=D[7]=D[8]=D[9]=D[10]=D[11]=D[12]=D[13]=D[14]=D[15]=0,this.blocks=D):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],q?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=q}function Se(q,ne,oe){var W,X=typeof q;if(X==="string"){var H,le=[],ie=q.length,ve=0;for(W=0;W<ie;++W)(H=q.charCodeAt(W))<128?le[ve++]=H:H<2048?(le[ve++]=192|H>>>6,le[ve++]=128|63&H):H<55296||H>=57344?(le[ve++]=224|H>>>12,le[ve++]=128|H>>>6&63,le[ve++]=128|63&H):(H=65536+((1023&H)<<10|1023&q.charCodeAt(++W)),le[ve++]=240|H>>>18,le[ve++]=128|H>>>12&63,le[ve++]=128|H>>>6&63,le[ve++]=128|63&H);q=le}else{if(X!=="object")throw new Error(i);if(q===null)throw new Error(i);if(p&&q.constructor===ArrayBuffer)q=new Uint8Array(q);else if(!(Array.isArray(q)||p&&ArrayBuffer.isView(q)))throw new Error(i)}q.length>64&&(q=new te(ne,!0).update(q).array());var Qe=[],nt=[];for(W=0;W<64;++W){var ae=q[W]||0;Qe[W]=92^ae,nt[W]=54^ae}te.call(this,ne,oe),this.update(nt),this.oKeyPad=Qe,this.inner=!0,this.sharedMemory=oe}te.prototype.update=function(q){if(!this.finalized){var ne,oe=typeof q;if(oe!=="string"){if(oe!=="object")throw new Error(i);if(q===null)throw new Error(i);if(p&&q.constructor===ArrayBuffer)q=new Uint8Array(q);else if(!(Array.isArray(q)||p&&ArrayBuffer.isView(q)))throw new Error(i);ne=!0}for(var W,X,H=0,le=q.length,ie=this.blocks;H<le;){if(this.hashed&&(this.hashed=!1,ie[0]=this.block,this.block=ie[16]=ie[1]=ie[2]=ie[3]=ie[4]=ie[5]=ie[6]=ie[7]=ie[8]=ie[9]=ie[10]=ie[11]=ie[12]=ie[13]=ie[14]=ie[15]=0),ne)for(X=this.start;H<le&&X<64;++H)ie[X>>>2]|=q[H]<<v[3&X++];else for(X=this.start;H<le&&X<64;++H)(W=q.charCodeAt(H))<128?ie[X>>>2]|=W<<v[3&X++]:W<2048?(ie[X>>>2]|=(192|W>>>6)<<v[3&X++],ie[X>>>2]|=(128|63&W)<<v[3&X++]):W<55296||W>=57344?(ie[X>>>2]|=(224|W>>>12)<<v[3&X++],ie[X>>>2]|=(128|W>>>6&63)<<v[3&X++],ie[X>>>2]|=(128|63&W)<<v[3&X++]):(W=65536+((1023&W)<<10|1023&q.charCodeAt(++H)),ie[X>>>2]|=(240|W>>>18)<<v[3&X++],ie[X>>>2]|=(128|W>>>12&63)<<v[3&X++],ie[X>>>2]|=(128|W>>>6&63)<<v[3&X++],ie[X>>>2]|=(128|63&W)<<v[3&X++]);this.lastByteIndex=X,this.bytes+=X-this.start,X>=64?(this.block=ie[16],this.start=X-64,this.hash(),this.hashed=!0):this.start=X}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},te.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var q=this.blocks,ne=this.lastByteIndex;q[16]=this.block,q[ne>>>2]|=g[3&ne],this.block=q[16],ne>=56&&(this.hashed||this.hash(),q[0]=this.block,q[16]=q[1]=q[2]=q[3]=q[4]=q[5]=q[6]=q[7]=q[8]=q[9]=q[10]=q[11]=q[12]=q[13]=q[14]=q[15]=0),q[14]=this.hBytes<<3|this.bytes>>>29,q[15]=this.bytes<<3,this.hash()}},te.prototype.hash=function(){var q,ne,oe,W,X,H,le,ie,ve,Qe=this.h0,nt=this.h1,ae=this.h2,pe=this.h3,xe=this.h4,je=this.h5,Ce=this.h6,G=this.h7,Ne=this.blocks;for(q=16;q<64;++q)ne=((X=Ne[q-15])>>>7|X<<25)^(X>>>18|X<<14)^X>>>3,oe=((X=Ne[q-2])>>>17|X<<15)^(X>>>19|X<<13)^X>>>10,Ne[q]=Ne[q-16]+ne+Ne[q-7]+oe|0;for(ve=nt&ae,q=0;q<64;q+=4)this.first?(this.is224?(H=300032,G=(X=Ne[0]-1413257819)-150054599|0,pe=X+24177077|0):(H=704751109,G=(X=Ne[0]-210244248)-1521486534|0,pe=X+143694565|0),this.first=!1):(ne=(Qe>>>2|Qe<<30)^(Qe>>>13|Qe<<19)^(Qe>>>22|Qe<<10),W=(H=Qe&nt)^Qe&ae^ve,G=pe+(X=G+(oe=(xe>>>6|xe<<26)^(xe>>>11|xe<<21)^(xe>>>25|xe<<7))+(xe&je^~xe&Ce)+_[q]+Ne[q])|0,pe=X+(ne+W)|0),ne=(pe>>>2|pe<<30)^(pe>>>13|pe<<19)^(pe>>>22|pe<<10),W=(le=pe&Qe)^pe&nt^H,Ce=ae+(X=Ce+(oe=(G>>>6|G<<26)^(G>>>11|G<<21)^(G>>>25|G<<7))+(G&xe^~G&je)+_[q+1]+Ne[q+1])|0,ne=((ae=X+(ne+W)|0)>>>2|ae<<30)^(ae>>>13|ae<<19)^(ae>>>22|ae<<10),W=(ie=ae&pe)^ae&Qe^le,je=nt+(X=je+(oe=(Ce>>>6|Ce<<26)^(Ce>>>11|Ce<<21)^(Ce>>>25|Ce<<7))+(Ce&G^~Ce&xe)+_[q+2]+Ne[q+2])|0,ne=((nt=X+(ne+W)|0)>>>2|nt<<30)^(nt>>>13|nt<<19)^(nt>>>22|nt<<10),W=(ve=nt&ae)^nt&pe^ie,xe=Qe+(X=xe+(oe=(je>>>6|je<<26)^(je>>>11|je<<21)^(je>>>25|je<<7))+(je&Ce^~je&G)+_[q+3]+Ne[q+3])|0,Qe=X+(ne+W)|0,this.chromeBugWorkAround=!0;this.h0=this.h0+Qe|0,this.h1=this.h1+nt|0,this.h2=this.h2+ae|0,this.h3=this.h3+pe|0,this.h4=this.h4+xe|0,this.h5=this.h5+je|0,this.h6=this.h6+Ce|0,this.h7=this.h7+G|0},te.prototype.hex=function(){this.finalize();var q=this.h0,ne=this.h1,oe=this.h2,W=this.h3,X=this.h4,H=this.h5,le=this.h6,ie=this.h7,ve=m[q>>>28&15]+m[q>>>24&15]+m[q>>>20&15]+m[q>>>16&15]+m[q>>>12&15]+m[q>>>8&15]+m[q>>>4&15]+m[15&q]+m[ne>>>28&15]+m[ne>>>24&15]+m[ne>>>20&15]+m[ne>>>16&15]+m[ne>>>12&15]+m[ne>>>8&15]+m[ne>>>4&15]+m[15&ne]+m[oe>>>28&15]+m[oe>>>24&15]+m[oe>>>20&15]+m[oe>>>16&15]+m[oe>>>12&15]+m[oe>>>8&15]+m[oe>>>4&15]+m[15&oe]+m[W>>>28&15]+m[W>>>24&15]+m[W>>>20&15]+m[W>>>16&15]+m[W>>>12&15]+m[W>>>8&15]+m[W>>>4&15]+m[15&W]+m[X>>>28&15]+m[X>>>24&15]+m[X>>>20&15]+m[X>>>16&15]+m[X>>>12&15]+m[X>>>8&15]+m[X>>>4&15]+m[15&X]+m[H>>>28&15]+m[H>>>24&15]+m[H>>>20&15]+m[H>>>16&15]+m[H>>>12&15]+m[H>>>8&15]+m[H>>>4&15]+m[15&H]+m[le>>>28&15]+m[le>>>24&15]+m[le>>>20&15]+m[le>>>16&15]+m[le>>>12&15]+m[le>>>8&15]+m[le>>>4&15]+m[15&le];return this.is224||(ve+=m[ie>>>28&15]+m[ie>>>24&15]+m[ie>>>20&15]+m[ie>>>16&15]+m[ie>>>12&15]+m[ie>>>8&15]+m[ie>>>4&15]+m[15&ie]),ve},te.prototype.toString=te.prototype.hex,te.prototype.digest=function(){this.finalize();var q=this.h0,ne=this.h1,oe=this.h2,W=this.h3,X=this.h4,H=this.h5,le=this.h6,ie=this.h7,ve=[q>>>24&255,q>>>16&255,q>>>8&255,255&q,ne>>>24&255,ne>>>16&255,ne>>>8&255,255&ne,oe>>>24&255,oe>>>16&255,oe>>>8&255,255&oe,W>>>24&255,W>>>16&255,W>>>8&255,255&W,X>>>24&255,X>>>16&255,X>>>8&255,255&X,H>>>24&255,H>>>16&255,H>>>8&255,255&H,le>>>24&255,le>>>16&255,le>>>8&255,255&le];return this.is224||ve.push(ie>>>24&255,ie>>>16&255,ie>>>8&255,255&ie),ve},te.prototype.array=te.prototype.digest,te.prototype.arrayBuffer=function(){this.finalize();var q=new ArrayBuffer(this.is224?28:32),ne=new DataView(q);return ne.setUint32(0,this.h0),ne.setUint32(4,this.h1),ne.setUint32(8,this.h2),ne.setUint32(12,this.h3),ne.setUint32(16,this.h4),ne.setUint32(20,this.h5),ne.setUint32(24,this.h6),this.is224||ne.setUint32(28,this.h7),q},Se.prototype=new te,Se.prototype.finalize=function(){if(te.prototype.finalize.call(this),this.inner){this.inner=!1;var q=this.array();te.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(q),te.prototype.finalize.call(this)}};var De=j();De.sha256=De,De.sha224=j(!0),De.sha256.hmac=ee(),De.sha224.hmac=ee(!0),d?f0.exports=De:(a.sha256=De.sha256,a.sha224=De.sha224)})();gh.exports;gh.exports.sha224;var lS=gh.exports.sha256;function j0(i){return KC(i)}function GC(i){if(!/^[0-9A-Fa-f]+$/.test(i))return!1;const a=/^[0-9A-F]+$/.test(i),o=/^[0-9a-f]+$/.test(i);return a||o?i.length%2===0:!1}function JC(i){return/^[A-Za-z0-9\-_]*(={0,2})?$/.test(i)||/^[A-Za-z0-9+/]*(={0,2})?$/.test(i)}function XC(i){return GC(i)?"hex":JC(i)?"b64":""}function QC(i){if(i.length%2!==0)throw new Error("hex string must have an even length");const s=new Uint8Array(i.length/2);for(let a=0;a<i.length;a+=2)s[a/2]=parseInt(i.substring(a,a+2),16);return s}function ZC(i){i=i.replace(/-/g,"+"),i=i.replace(/_/g,"/");const s=atob(i);return Uint8Array.from(s,a=>a.charCodeAt(0))}function KC(i){switch(XC(i)){case"hex":return QC(i);case"b64":return ZC(i)}return null}function WC(i,s){const a=typeof i=="string"?j0(i):i,o=typeof s=="string"?j0(s):s;if(a===null||o===null||a.length!==o.length)return!1;for(let u=0;u<a.length;u++)if(a[u]!==o[u])return!1;return!0}class hE{constructor(s,a,o=!0){w(this,"token");w(this,"received");w(this,"ctx");w(this,"requestSubject");w(this,"mux");this.mux=s,this.requestSubject=a,this.received=0,this.token=ri.next(),o&&(this.ctx=new Error)}}class e3 extends hE{constructor(a,o,u={maxWait:1e3}){super(a,o);w(this,"callback");w(this,"done");w(this,"timer");w(this,"max");w(this,"opts");if(this.opts=u,typeof this.opts.callback!="function")throw new Error("callback is required");this.callback=this.opts.callback,this.max=typeof u.maxMessages=="number"&&u.maxMessages>0?u.maxMessages:-1,this.done=_t(),this.done.then(()=>{this.callback(null,null)}),this.timer=setTimeout(()=>{this.cancel()},u.maxWait)}cancel(a){a&&this.callback(a,null),clearTimeout(this.timer),this.mux.cancel(this),this.done.resolve()}resolver(a,o){a?(this.ctx&&(a.stack+=`
|
|
251
|
+
|
|
252
|
+
${this.ctx.stack}`),this.cancel(a)):(this.callback(null,o),this.opts.strategy===Ms.Count&&(this.max--,this.max===0&&this.cancel()),this.opts.strategy===Ms.JitterTimer&&(clearTimeout(this.timer),this.timer=setTimeout(()=>{this.cancel()},this.opts.jitter||300)),this.opts.strategy===Ms.SentinelMsg&&o&&o.data.length===0&&this.cancel())}}class mE extends hE{constructor(a,o,u={timeout:1e3},d=!0){super(a,o,d);w(this,"deferred");w(this,"timer");this.deferred=_t(),this.timer=bl(u.timeout,d)}resolver(a,o){this.timer&&this.timer.cancel(),a?(this.ctx&&(a.stack+=`
|
|
253
|
+
|
|
254
|
+
${this.ctx.stack}`),this.deferred.reject(a)):this.deferred.resolve(o),this.cancel()}cancel(a){this.timer&&this.timer.cancel(),this.mux.cancel(this),this.deferred.reject(a||ge.errorForCode(ue.Cancelled))}}const t3="$JS.API";function n3(i){return i=i||{},i.domain&&(i.apiPrefix=`$JS.${i.domain}.API`,delete i.domain),bh({apiPrefix:t3,timeout:5e3},i)}class wu{constructor(s,a){w(this,"nc");w(this,"opts");w(this,"prefix");w(this,"timeout");w(this,"jc");this.nc=s,this.opts=n3(a),this._parseOpts(),this.prefix=this.opts.apiPrefix,this.timeout=this.opts.timeout,this.jc=ks()}getOptions(){return Object.assign({},this.opts)}_parseOpts(){let s=this.opts.apiPrefix;if(!s||s.length===0)throw new Error("invalid empty prefix");s[s.length-1]==="."&&(s=s.substr(0,s.length-1)),this.opts.apiPrefix=s}async _request(s,a=null,o){o=o||{},o.timeout=this.timeout;let u=es;a&&(u=this.jc.encode(a));let{retries:d}=o;d=d||1,d=d===-1?Number.MAX_SAFE_INTEGER:d;const p=W0();for(let m=0;m<d;m++)try{const g=await this.nc.request(s,u,o);return this.parseJsResponse(g)}catch(g){const v=g;if((v.code==="503"||v.code===ue.Timeout)&&m+1<d)await vl(p.backoff(m));else throw g}}async findStream(s){const a={subject:s},u=await this._request(`${this.prefix}.STREAM.NAMES`,a);if(!u.streams||u.streams.length!==1)throw new Error("no stream matches subject");return u.streams[0]}getConnection(){return this.nc}parseJsResponse(s){const a=this.jc.decode(s.data),o=a;if(o.error){const u=dE(o.error.code,o.error.description);if(u!==null)throw u.api_error=o.error,u}return a}}class cu{constructor(s,a,o,u){w(this,"err");w(this,"offset");w(this,"pageInfo");w(this,"subject");w(this,"jsm");w(this,"filter");w(this,"payload");if(!s)throw new Error("subject is required");this.subject=s,this.jsm=o,this.offset=0,this.pageInfo={},this.filter=a,this.payload=u||{}}async next(){if(this.err)return[];if(this.pageInfo&&this.offset>=this.pageInfo.total)return[];const s={offset:this.offset};this.payload&&Object.assign(s,this.payload);try{const a=await this.jsm._request(this.subject,s,{timeout:this.jsm.timeout});this.pageInfo=a;const o=this.countResponse(a);return o===0?[]:(this.offset+=o,this.filter(a))}catch(a){throw this.err=a,a}}countResponse(s){var a,o,u;switch(s==null?void 0:s.type){case"io.nats.jetstream.api.v1.stream_names_response":case"io.nats.jetstream.api.v1.stream_list_response":return((a=s.streams)==null?void 0:a.length)||0;case"io.nats.jetstream.api.v1.consumer_list_response":return((o=s.consumers)==null?void 0:o.length)||0;default:return console.error(`jslister.ts: unknown API response for paged output: ${s==null?void 0:s.type}`),((u=s.streams)==null?void 0:u.length)||0}return 0}async*[Symbol.asyncIterator](){let s=await this.next();for(;s.length>0;){for(const a of s)yield a;s=await this.next()}}}function Qi(i=""){const s=i.match(/(\d+).(\d+).(\d+)/);if(s)return{major:parseInt(s[1]),minor:parseInt(s[2]),micro:parseInt(s[3])};throw new Error(`'${i}' is not a semver value`)}function M0(i,s){return i.major<s.major?-1:i.major>s.major?1:i.minor<s.minor?-1:i.minor>s.minor?1:i.micro<s.micro?-1:i.micro>s.micro?1:0}var tt;(function(i){i.JS_KV="js_kv",i.JS_OBJECTSTORE="js_objectstore",i.JS_PULL_MAX_BYTES="js_pull_max_bytes",i.JS_NEW_CONSUMER_CREATE_API="js_new_consumer_create",i.JS_ALLOW_DIRECT="js_allow_direct",i.JS_MULTIPLE_CONSUMER_FILTER="js_multiple_consumer_filter",i.JS_SIMPLIFICATION="js_simplification",i.JS_STREAM_CONSUMER_METADATA="js_stream_consumer_metadata",i.JS_CONSUMER_FILTER_SUBJECTS="js_consumer_filter_subjects",i.JS_STREAM_FIRST_SEQ="js_stream_first_seq",i.JS_STREAM_SUBJECT_TRANSFORM="js_stream_subject_transform",i.JS_STREAM_SOURCE_SUBJECT_TRANSFORM="js_stream_source_subject_transform",i.JS_STREAM_COMPRESSION="js_stream_compression",i.JS_DEFAULT_CONSUMER_LIMITS="js_default_consumer_limits",i.JS_BATCH_DIRECT_GET="js_batch_direct_get"})(tt||(tt={}));class s3{constructor(s){w(this,"server");w(this,"features");w(this,"disabled");this.features=new Map,this.disabled=[],this.update(s)}resetDisabled(){this.disabled.length=0,this.update(this.server)}disable(s){this.disabled.push(s),this.update(this.server)}isDisabled(s){return this.disabled.indexOf(s)!==-1}update(s){typeof s=="string"&&(s=Qi(s)),this.server=s,this.set(tt.JS_KV,"2.6.2"),this.set(tt.JS_OBJECTSTORE,"2.6.3"),this.set(tt.JS_PULL_MAX_BYTES,"2.8.3"),this.set(tt.JS_NEW_CONSUMER_CREATE_API,"2.9.0"),this.set(tt.JS_ALLOW_DIRECT,"2.9.0"),this.set(tt.JS_MULTIPLE_CONSUMER_FILTER,"2.10.0"),this.set(tt.JS_SIMPLIFICATION,"2.9.4"),this.set(tt.JS_STREAM_CONSUMER_METADATA,"2.10.0"),this.set(tt.JS_CONSUMER_FILTER_SUBJECTS,"2.10.0"),this.set(tt.JS_STREAM_FIRST_SEQ,"2.10.0"),this.set(tt.JS_STREAM_SUBJECT_TRANSFORM,"2.10.0"),this.set(tt.JS_STREAM_SOURCE_SUBJECT_TRANSFORM,"2.10.0"),this.set(tt.JS_STREAM_COMPRESSION,"2.10.0"),this.set(tt.JS_DEFAULT_CONSUMER_LIMITS,"2.10.0"),this.set(tt.JS_BATCH_DIRECT_GET,"2.11.0"),this.disabled.forEach(a=>{this.features.delete(a)})}set(s,a){this.features.set(s,{min:a,ok:M0(this.server,Qi(a))>=0})}get(s){return this.features.get(s)||{min:"unknown",ok:!1}}supports(s){var a;return((a=this.get(s))==null?void 0:a.ok)||!1}require(s){return typeof s=="string"&&(s=Qi(s)),M0(this.server,s)>=0}}class ch extends wu{constructor(s,a){super(s,a)}async add(s,a,o=lh.Create){if(_n(s),a.deliver_group&&a.flow_control)throw new Error("jetstream flow control is not supported with queue groups");if(a.deliver_group&&a.idle_heartbeat)throw new Error("jetstream idle heartbeat is not supported with queue groups");const u={};u.config=a,u.stream_name=s,u.action=o,u.config.durable_name&&dl(u.config.durable_name);const d=this.nc;let{min:p,ok:m}=d.features.get(tt.JS_NEW_CONSUMER_CREATE_API);const g=a.name===""?void 0:a.name;if(g&&!m)throw new Error(`consumer 'name' requires server ${p}`);if(g)try{yh("name",g)}catch(D){const B=D.message,j=B.indexOf("cannot contain");throw j!==-1?new Error(`consumer 'name' ${B.substring(j)}`):D}let v,_="";if(Array.isArray(a.filter_subjects)){const{min:D,ok:B}=d.features.get(tt.JS_MULTIPLE_CONSUMER_FILTER);if(!B)throw new Error(`consumer 'filter_subjects' requires server ${D}`);m=!1}if(a.metadata){const{min:D,ok:B}=d.features.get(tt.JS_STREAM_CONSUMER_METADATA);if(!B)throw new Error(`consumer 'metadata' requires server ${D}`)}if(m&&(_=a.name??a.durable_name??""),_!==""){let D=a.filter_subject??void 0;D===">"&&(D=void 0),v=D!==void 0?`${this.prefix}.CONSUMER.CREATE.${s}.${_}.${D}`:`${this.prefix}.CONSUMER.CREATE.${s}.${_}`}else v=a.durable_name?`${this.prefix}.CONSUMER.DURABLE.CREATE.${s}.${a.durable_name}`:`${this.prefix}.CONSUMER.CREATE.${s}`;return await this._request(v,u)}async update(s,a,o){const u=await this.info(s,a),d=o;return this.add(s,Object.assign(u.config,d),lh.Update)}async info(s,a){return _n(s),dl(a),await this._request(`${this.prefix}.CONSUMER.INFO.${s}.${a}`)}async delete(s,a){return _n(s),dl(a),(await this._request(`${this.prefix}.CONSUMER.DELETE.${s}.${a}`)).success}list(s){_n(s);const a=u=>u.consumers,o=`${this.prefix}.CONSUMER.LIST.${s}`;return new cu(o,a,this)}pause(s,a,o){const u=`${this.prefix}.CONSUMER.PAUSE.${s}.${a}`,d={pause_until:o.toISOString()};return this._request(u,d)}resume(s,a){return this.pause(s,a,new Date(0))}}function ol(i,s,a=!1){if(a===!0&&!i)throw ge.errorForCode(ue.ApiError,new Error(`${s} is not a function`));if(i&&typeof i!="function")throw ge.errorForCode(ue.ApiError,new Error(`${s} is not a function`))}class a3 extends sn{constructor(a,o,u){super();w(this,"sub");w(this,"adapter");w(this,"subIterDone");ol(u.adapter,"adapter",!0),this.adapter=u.adapter,u.callback&&ol(u.callback,"callback"),this.noIterator=typeof u.callback=="function",u.ingestionFilterFn&&(ol(u.ingestionFilterFn,"ingestionFilterFn"),this.ingestionFilterFn=u.ingestionFilterFn),u.protocolFilterFn&&(ol(u.protocolFilterFn,"protocolFilterFn"),this.protocolFilterFn=u.protocolFilterFn),u.dispatchedFn&&(ol(u.dispatchedFn,"dispatchedFn"),this.dispatchedFn=u.dispatchedFn),u.cleanupFn&&ol(u.cleanupFn,"cleanupFn");let d=(_,S)=>{this.callback(_,S)};if(u.callback){const _=u.callback;d=(S,D)=>{const[B,j]=this.adapter(S,D);if(B){_(B,null);return}const{ingest:F}=this.ingestionFilterFn?this.ingestionFilterFn(j,this):{ingest:!0};F&&(!this.protocolFilterFn||this.protocolFilterFn(j))&&(_(B,j),this.dispatchedFn&&j&&this.dispatchedFn(j))}}const{max:p,queue:m,timeout:g}=u,v={queue:m,timeout:g,callback:d};p&&p>0&&(v.max=p),this.sub=a.subscribe(o,v),u.cleanupFn&&(this.sub.cleanupFn=u.cleanupFn),this.noIterator||this.iterClosed.then(()=>{this.unsubscribe()}),this.subIterDone=_t(),Promise.all([this.sub.closed,this.iterClosed]).then(()=>{this.subIterDone.resolve()}).catch(()=>{this.subIterDone.resolve()}),(async _=>{await _.closed,this.stop()})(this.sub).then().catch()}unsubscribe(a){this.sub.unsubscribe(a)}drain(){return this.sub.drain()}isDraining(){return this.sub.isDraining()}isClosed(){return this.sub.isClosed()}callback(a,o){this.sub.cancelTimeout();const[u,d]=this.adapter(a,o);u&&this.stop(u),d&&this.push(d)}getSubject(){return this.sub.getSubject()}getReceived(){return this.sub.getReceived()}getProcessed(){return this.sub.getProcessed()}getPending(){return this.sub.getPending()}getID(){return this.sub.getID()}getMax(){return this.sub.getMax()}get closed(){return this.sub.closed}}let Wn;function r3(i){Wn=i}function pE(){return Wn!==void 0&&Wn.defaultPort!==void 0?Wn.defaultPort:4222}function d0(){return Wn!==void 0&&Wn.urlParseFn?Wn.urlParseFn:void 0}function i3(){if(!Wn||typeof Wn.factory!="function")throw new Error("transport fn is not set");return Wn.factory()}function k0(){return Wn!==void 0&&Wn.dnsResolveFn?Wn.dnsResolveFn:void 0}const Kd=`\r
|
|
255
|
+
`,uh=gl.fromAscii(Kd),o3=new Uint8Array(uh)[0],l3=new Uint8Array(uh)[1];function c3(i){for(let s=0;s<i.length;s++){const a=s+1;if(i.byteLength>a&&i[s]===o3&&i[a]===l3)return a+1}return 0}function u3(i){const s=c3(i);if(s>0){const o=new Uint8Array(i).slice(0,s);return Kn.decode(o)}return""}const f3=4,bE=48,d3=65,h3=97;function m3(i,s,a,o){const u=new Uint8Array(16);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((p,m)=>{u[m]=p}),u[12]=i,u[13]=s,u[14]=a,u[15]=o,u}function V0(i){return p3(i)!==void 0}function p3(i){for(let s=0;s<i.length;s++)switch(i[s]){case".":return yE(i);case":":return b3(i)}}function yE(i){const s=new Uint8Array(4);for(let a=0;a<4;a++){if(i.length===0)return;if(a>0){if(i[0]!==".")return;i=i.substring(1)}const{n:o,c:u,ok:d}=y3(i);if(!d||o>255)return;i=i.substring(u),s[a]=o}return m3(s[0],s[1],s[2],s[3])}function b3(i){const s=new Uint8Array(16);let a=-1;if(i.length>=2&&i[0]===":"&&i[1]===":"&&(a=0,i=i.substring(2),i.length===0))return s;let o=0;for(;o<16;){const{n:u,c:d,ok:p}=g3(i);if(!p||u>65535)return;if(d<i.length&&i[d]==="."){if(a<0&&o!=12||o+4>16)return;const m=yE(i);if(m===void 0)return;s[o]=m[12],s[o+1]=m[13],s[o+2]=m[14],s[o+3]=m[15],i="",o+=f3;break}if(s[o]=u>>8,s[o+1]=u,o+=2,i=i.substring(d),i.length===0)break;if(i[0]!==":"||i.length==1)return;if(i=i.substring(1),i[0]===":"){if(a>=0)return;if(a=o,i=i.substring(1),i.length===0)break}}if(i.length===0){if(o<16){if(a<0)return;const u=16-o;for(let d=o-1;d>=a;d--)s[d+u]=s[d];for(let d=a+u-1;d>=a;d--)s[d]=0}else if(a>=0)return;return s}}function y3(i){let s=0,a=0;for(s=0;s<i.length&&48<=i.charCodeAt(s)&&i.charCodeAt(s)<=57;s++)if(a=a*10+(i.charCodeAt(s)-bE),a>=16777215)return{n:16777215,c:s,ok:!1};return s===0?{n:0,c:0,ok:!1}:{n:a,c:s,ok:!0}}function g3(i){let s=0,a=0;for(a=0;a<i.length;a++){if(48<=i.charCodeAt(a)&&i.charCodeAt(a)<=57)s*=16,s+=i.charCodeAt(a)-bE;else if(97<=i.charCodeAt(a)&&i.charCodeAt(a)<=102)s*=16,s+=i.charCodeAt(a)-h3+10;else if(65<=i.charCodeAt(a)&&i.charCodeAt(a)<=70)s*=16,s+=i.charCodeAt(a)-d3+10;else break;if(s>=16777215)return{n:0,c:a,ok:!1}}return a===0?{n:0,c:a,ok:!1}:{n:s,c:a,ok:!0}}function v3(i){return i.indexOf("[")!==-1||i.indexOf("::")!==-1?!1:i.indexOf(".")!==-1||i.split(":").length<=2}function U0(i){return!v3(i)}function x3(i){const s="::FFFF:",a=i.toUpperCase().indexOf(s);if(a!==-1&&i.indexOf(".")!==-1){let o=i.substring(a+s.length);return o=o.replace("[",""),o.replace("]","")}return i}function N3(i){i=i.trim(),i.match(/^(.*:\/\/)(.*)/m)&&(i=i.replace(/^(.*:\/\/)(.*)/gm,"$2")),i=x3(i),U0(i)&&i.indexOf("[")===-1&&(i=`[${i}]`);const s=U0(i)?i.match(/(]:)(\d+)/):i.match(/(:)(\d+)/),a=s&&s.length===3&&s[1]&&s[2]?parseInt(s[2]):4222,o=a===80?"https":"http",u=new URL(`${o}://${i}`);u.port=`${a}`;let d=u.hostname;return d.charAt(0)==="["&&(d=d.substring(1,d.length-1)),{listen:u.host,hostname:d,port:a}}class mu{constructor(s,a=!1){w(this,"src");w(this,"listen");w(this,"hostname");w(this,"port");w(this,"didConnect");w(this,"reconnects");w(this,"lastConnect");w(this,"gossiped");w(this,"tlsName");w(this,"resolves");this.src=s,this.tlsName="";const o=N3(s);this.listen=o.listen,this.hostname=o.hostname,this.port=o.port,this.didConnect=!1,this.reconnects=0,this.lastConnect=0,this.gossiped=a}toString(){return this.listen}async resolve(s){if(!s.fn||s.resolve===!1)return[this];const a=[];if(V0(this.hostname))return[this];{const o=await s.fn(this.hostname);s.debug&&console.log(`resolve ${this.hostname} = ${o.join(",")}`);for(const u of o){const d=this.port===80?"https":"http",p=new URL(`${d}://${U0(u)?"["+u+"]":u}`);p.port=`${this.port}`;const m=new mu(p.host,!1);m.tlsName=this.hostname,a.push(m)}}return s.randomize&&uE(a),this.resolves=a,a}}class w3{constructor(s=[],a={}){w(this,"firstSelect");w(this,"servers");w(this,"currentServer");w(this,"tlsName");w(this,"randomize");this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=a.randomize||!1;const o=d0();s&&(s.forEach(u=>{u=o?o(u):u,this.servers.push(new mu(u))}),this.randomize&&(this.servers=uE(this.servers))),this.servers.length===0&&this.addServer(`${A0}:${pE()}`,!1),this.currentServer=this.servers[0]}clear(){this.servers.length=0}updateTLSName(){const s=this.getCurrentServer();V0(s.hostname)||(this.tlsName=s.hostname,this.servers.forEach(a=>{a.gossiped&&(a.tlsName=this.tlsName)}))}getCurrentServer(){return this.currentServer}addServer(s,a=!1){const o=d0();s=o?o(s):s;const u=new mu(s,a);V0(u.hostname)&&(u.tlsName=this.tlsName),this.servers.push(u)}selectServer(){if(this.firstSelect)return this.firstSelect=!1,this.currentServer;const s=this.servers.shift();return s&&(this.servers.push(s),this.currentServer=s),s}removeCurrentServer(){this.removeServer(this.currentServer)}removeServer(s){if(s){const a=this.servers.indexOf(s);this.servers.splice(a,1)}}length(){return this.servers.length}next(){return this.servers.length?this.servers[0]:void 0}getServers(){return this.servers}update(s,a){const o=[];let u=[];const d=d0(),p=new Map;s.connect_urls&&s.connect_urls.length>0&&s.connect_urls.forEach(g=>{g=d?d(g,a):g;const v=new mu(g,!0);p.set(g,v)});const m=[];return this.servers.forEach((g,v)=>{const _=g.listen;g.gossiped&&this.currentServer.listen!==_&&p.get(_)===void 0&&m.push(v),p.delete(_)}),m.reverse(),m.forEach(g=>{const v=this.servers.splice(g,1);u=u.concat(v[0].listen)}),p.forEach((g,v)=>{this.servers.push(g),o.push(v)}),{added:o,deleted:u}}}class S3{constructor(){w(this,"baseInbox");w(this,"reqs");this.reqs=new Map}size(){return this.reqs.size}init(s){return this.baseInbox=`${sr(s)}.`,this.baseInbox}add(s){isNaN(s.received)||(s.received=0),this.reqs.set(s.token,s)}get(s){return this.reqs.get(s)}cancel(s){this.reqs.delete(s.token)}getToken(s){const a=s.subject||"";return a.indexOf(this.baseInbox)===0?a.substring(this.baseInbox.length):null}all(){return Array.from(this.reqs.values())}handleError(s,a){if(a&&a.permissionContext){if(s)return this.all().forEach(u=>{u.resolver(a,{})}),!0;const o=a.permissionContext;if(o.operation==="publish"){const u=this.all().find(d=>d.requestSubject===o.subject);if(u)return u.resolver(a,{}),!0}}return!1}dispatcher(){return(s,a)=>{const o=this.getToken(a);if(o){const u=this.get(o);u&&(s===null&&a.headers&&(s=fE(a)),u.resolver(s,a))}}}close(){const s=ge.errorForCode(ue.Timeout);this.reqs.forEach(a=>{a.resolver(s,{})})}}class E3{constructor(s,a,o){w(this,"ph");w(this,"interval");w(this,"maxOut");w(this,"timer");w(this,"pendings");this.ph=s,this.interval=a,this.maxOut=o,this.pendings=[]}start(){this.cancel(),this._schedule()}cancel(s){this.timer&&(clearTimeout(this.timer),this.timer=void 0),this._reset(),s&&this.ph.disconnect()}_schedule(){this.timer=setTimeout(()=>{if(this.ph.dispatchStatus({type:fl.PingTimer,data:`${this.pendings.length+1}`}),this.pendings.length===this.maxOut){this.cancel(!0);return}const s=_t();this.ph.flush(s).then(()=>{this._reset()}).catch(()=>{this.cancel()}),this.pendings.push(s),this._schedule()},this.interval)}_reset(){this.pendings=this.pendings.filter(s=>(s.resolve(),!1))}}class _3 extends Error{constructor(s){super(s),this.name="AssertionError"}}function A3(i,s="Assertion failed."){if(!i)throw new _3(s)}const cS=32*1024,h0=2**32-2;function $d(i,s,a=0){const o=s.byteLength-a;return i.byteLength>o&&(i=i.subarray(0,o)),s.set(i,a),i.byteLength}class m0{constructor(s){w(this,"_buf");w(this,"_off");if(this._off=0,s==null){this._buf=new Uint8Array(0);return}this._buf=new Uint8Array(s)}bytes(s={copy:!0}){return s.copy===!1?this._buf.subarray(this._off):this._buf.slice(this._off)}empty(){return this._buf.byteLength<=this._off}get length(){return this._buf.byteLength-this._off}get capacity(){return this._buf.buffer.byteLength}truncate(s){if(s===0){this.reset();return}if(s<0||s>this.length)throw Error("bytes.Buffer: truncation out of range");this._reslice(this._off+s)}reset(){this._reslice(0),this._off=0}_tryGrowByReslice(s){const a=this._buf.byteLength;return s<=this.capacity-a?(this._reslice(a+s),a):-1}_reslice(s){A3(s<=this._buf.buffer.byteLength),this._buf=new Uint8Array(this._buf.buffer,0,s)}readByte(){const s=new Uint8Array(1);return this.read(s)?s[0]:null}read(s){if(this.empty())return this.reset(),s.byteLength===0?0:null;const a=$d(this._buf.subarray(this._off),s);return this._off+=a,a}writeByte(s){return this.write(Uint8Array.of(s))}writeString(s){return this.write(Wi.encode(s))}write(s){const a=this._grow(s.byteLength);return $d(s,this._buf,a)}_grow(s){const a=this.length;a===0&&this._off!==0&&this.reset();const o=this._tryGrowByReslice(s);if(o>=0)return o;const u=this.capacity;if(s<=Math.floor(u/2)-a)$d(this._buf.subarray(this._off),this._buf);else{if(u+s>h0)throw new Error("The buffer cannot be grown beyond the maximum size.");{const d=new Uint8Array(Math.min(2*u+s,h0));$d(this._buf.subarray(this._off),d),this._buf=d}}return this._off=0,this._reslice(Math.min(a+s,h0)),a}grow(s){if(s<0)throw Error("Buffer._grow: negative count");const a=this._grow(s);this._reslice(a)}readFrom(s){let a=0;const o=new Uint8Array(cS);for(;;){const u=this.capacity-this.length<cS,d=u?o:new Uint8Array(this._buf.buffer,this.length),p=s.read(d);if(p===null)return a;u?this.write(d.subarray(0,p)):this._reslice(this.length+p),a+=p}}}var An;(function(i){i[i.OK=0]="OK",i[i.ERR=1]="ERR",i[i.MSG=2]="MSG",i[i.INFO=3]="INFO",i[i.PING=4]="PING",i[i.PONG=5]="PONG"})(An||(An={}));function uS(){const i={};return i.sid=-1,i.hdr=-1,i.size=-1,i}const D3=48;class fS{constructor(s){w(this,"dispatcher");w(this,"state");w(this,"as");w(this,"drop");w(this,"hdr");w(this,"ma");w(this,"argBuf");w(this,"msgBuf");this.dispatcher=s,this.state=de.OP_START,this.as=0,this.drop=0,this.hdr=0}parse(s){let a;for(a=0;a<s.length;a++){const o=s[a];switch(this.state){case de.OP_START:switch(o){case he.M:case he.m:this.state=de.OP_M,this.hdr=-1,this.ma=uS();break;case he.H:case he.h:this.state=de.OP_H,this.hdr=0,this.ma=uS();break;case he.P:case he.p:this.state=de.OP_P;break;case he.PLUS:this.state=de.OP_PLUS;break;case he.MINUS:this.state=de.OP_MINUS;break;case he.I:case he.i:this.state=de.OP_I;break;default:throw this.fail(s.subarray(a))}break;case de.OP_H:switch(o){case he.M:case he.m:this.state=de.OP_M;break;default:throw this.fail(s.subarray(a))}break;case de.OP_M:switch(o){case he.S:case he.s:this.state=de.OP_MS;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MS:switch(o){case he.G:case he.g:this.state=de.OP_MSG;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MSG:switch(o){case he.SPACE:case he.TAB:this.state=de.OP_MSG_SPC;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MSG_SPC:switch(o){case he.SPACE:case he.TAB:continue;default:this.state=de.MSG_ARG,this.as=a}break;case de.MSG_ARG:switch(o){case he.CR:this.drop=1;break;case he.NL:{const u=this.argBuf?this.argBuf.bytes():s.subarray(this.as,a-this.drop);this.processMsgArgs(u),this.drop=0,this.as=a+1,this.state=de.MSG_PAYLOAD,a=this.as+this.ma.size-1;break}default:this.argBuf&&this.argBuf.writeByte(o)}break;case de.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){const u=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:An.MSG,msg:this.ma,data:u}),this.argBuf=void 0,this.msgBuf=void 0,this.state=de.MSG_END}else{let u=this.ma.size-this.msgBuf.length;const d=s.length-a;d<u&&(u=d),u>0?(this.msgBuf.write(s.subarray(a,a+u)),a=a+u-1):this.msgBuf.writeByte(o)}else a-this.as>=this.ma.size&&(this.dispatcher.push({kind:An.MSG,msg:this.ma,data:s.subarray(this.as,a)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=de.MSG_END);break;case de.MSG_END:switch(o){case he.NL:this.drop=0,this.as=a+1,this.state=de.OP_START;break;default:continue}break;case de.OP_PLUS:switch(o){case he.O:case he.o:this.state=de.OP_PLUS_O;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PLUS_O:switch(o){case he.K:case he.k:this.state=de.OP_PLUS_OK;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PLUS_OK:switch(o){case he.NL:this.dispatcher.push({kind:An.OK}),this.drop=0,this.state=de.OP_START;break}break;case de.OP_MINUS:switch(o){case he.E:case he.e:this.state=de.OP_MINUS_E;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MINUS_E:switch(o){case he.R:case he.r:this.state=de.OP_MINUS_ER;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MINUS_ER:switch(o){case he.R:case he.r:this.state=de.OP_MINUS_ERR;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MINUS_ERR:switch(o){case he.SPACE:case he.TAB:this.state=de.OP_MINUS_ERR_SPC;break;default:throw this.fail(s.subarray(a))}break;case de.OP_MINUS_ERR_SPC:switch(o){case he.SPACE:case he.TAB:continue;default:this.state=de.MINUS_ERR_ARG,this.as=a}break;case de.MINUS_ERR_ARG:switch(o){case he.CR:this.drop=1;break;case he.NL:{let u;this.argBuf?(u=this.argBuf.bytes(),this.argBuf=void 0):u=s.subarray(this.as,a-this.drop),this.dispatcher.push({kind:An.ERR,data:u}),this.drop=0,this.as=a+1,this.state=de.OP_START;break}default:this.argBuf&&this.argBuf.write(Uint8Array.of(o))}break;case de.OP_P:switch(o){case he.I:case he.i:this.state=de.OP_PI;break;case he.O:case he.o:this.state=de.OP_PO;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PO:switch(o){case he.N:case he.n:this.state=de.OP_PON;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PON:switch(o){case he.G:case he.g:this.state=de.OP_PONG;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PONG:switch(o){case he.NL:this.dispatcher.push({kind:An.PONG}),this.drop=0,this.state=de.OP_START;break}break;case de.OP_PI:switch(o){case he.N:case he.n:this.state=de.OP_PIN;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PIN:switch(o){case he.G:case he.g:this.state=de.OP_PING;break;default:throw this.fail(s.subarray(a))}break;case de.OP_PING:switch(o){case he.NL:this.dispatcher.push({kind:An.PING}),this.drop=0,this.state=de.OP_START;break}break;case de.OP_I:switch(o){case he.N:case he.n:this.state=de.OP_IN;break;default:throw this.fail(s.subarray(a))}break;case de.OP_IN:switch(o){case he.F:case he.f:this.state=de.OP_INF;break;default:throw this.fail(s.subarray(a))}break;case de.OP_INF:switch(o){case he.O:case he.o:this.state=de.OP_INFO;break;default:throw this.fail(s.subarray(a))}break;case de.OP_INFO:switch(o){case he.SPACE:case he.TAB:this.state=de.OP_INFO_SPC;break;default:throw this.fail(s.subarray(a))}break;case de.OP_INFO_SPC:switch(o){case he.SPACE:case he.TAB:continue;default:this.state=de.INFO_ARG,this.as=a}break;case de.INFO_ARG:switch(o){case he.CR:this.drop=1;break;case he.NL:{let u;this.argBuf?(u=this.argBuf.bytes(),this.argBuf=void 0):u=s.subarray(this.as,a-this.drop),this.dispatcher.push({kind:An.INFO,data:u}),this.drop=0,this.as=a+1,this.state=de.OP_START;break}default:this.argBuf&&this.argBuf.writeByte(o)}break;default:throw this.fail(s.subarray(a))}}(this.state===de.MSG_ARG||this.state===de.MINUS_ERR_ARG||this.state===de.INFO_ARG)&&!this.argBuf&&(this.argBuf=new m0(s.subarray(this.as,a-this.drop))),this.state===de.MSG_PAYLOAD&&!this.msgBuf&&(this.argBuf||this.cloneMsgArg(),this.msgBuf=new m0(s.subarray(this.as)))}cloneMsgArg(){const s=this.ma.subject.length,a=this.ma.reply?this.ma.reply.length:0,o=new Uint8Array(s+a);o.set(this.ma.subject),this.ma.reply&&o.set(this.ma.reply,s),this.argBuf=new m0(o),this.ma.subject=o.subarray(0,s),this.ma.reply&&(this.ma.reply=o.subarray(s))}processMsgArgs(s){if(this.hdr>=0)return this.processHeaderMsgArgs(s);const a=[];let o=-1;for(let u=0;u<s.length;u++)switch(s[u]){case he.SPACE:case he.TAB:case he.CR:case he.NL:o>=0&&(a.push(s.subarray(o,u)),o=-1);break;default:o<0&&(o=u)}switch(o>=0&&a.push(s.subarray(o)),a.length){case 3:this.ma.subject=a[0],this.ma.sid=this.protoParseInt(a[1]),this.ma.reply=void 0,this.ma.size=this.protoParseInt(a[2]);break;case 4:this.ma.subject=a[0],this.ma.sid=this.protoParseInt(a[1]),this.ma.reply=a[2],this.ma.size=this.protoParseInt(a[3]);break;default:throw this.fail(s,"processMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail(s,"processMsgArgs Bad or Missing Sid Error");if(this.ma.size<0)throw this.fail(s,"processMsgArgs Bad or Missing Size Error")}fail(s,a=""){return a?a=`${a} [${this.state}]`:a=`parse error [${this.state}]`,new Error(`${a}: ${Kn.decode(s)}`)}processHeaderMsgArgs(s){const a=[];let o=-1;for(let u=0;u<s.length;u++)switch(s[u]){case he.SPACE:case he.TAB:case he.CR:case he.NL:o>=0&&(a.push(s.subarray(o,u)),o=-1);break;default:o<0&&(o=u)}switch(o>=0&&a.push(s.subarray(o)),a.length){case 4:this.ma.subject=a[0],this.ma.sid=this.protoParseInt(a[1]),this.ma.reply=void 0,this.ma.hdr=this.protoParseInt(a[2]),this.ma.size=this.protoParseInt(a[3]);break;case 5:this.ma.subject=a[0],this.ma.sid=this.protoParseInt(a[1]),this.ma.reply=a[2],this.ma.hdr=this.protoParseInt(a[3]),this.ma.size=this.protoParseInt(a[4]);break;default:throw this.fail(s,"processHeaderMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail(s,"processHeaderMsgArgs Bad or Missing Sid Error");if(this.ma.hdr<0||this.ma.hdr>this.ma.size)throw this.fail(s,"processHeaderMsgArgs Bad or Missing Header Size Error");if(this.ma.size<0)throw this.fail(s,"processHeaderMsgArgs Bad or Missing Size Error")}protoParseInt(s){if(s.length===0)return-1;let a=0;for(let o=0;o<s.length;o++){if(s[o]<48||s[o]>57)return-1;a=a*10+(s[o]-D3)}return a}}var de;(function(i){i[i.OP_START=0]="OP_START",i[i.OP_PLUS=1]="OP_PLUS",i[i.OP_PLUS_O=2]="OP_PLUS_O",i[i.OP_PLUS_OK=3]="OP_PLUS_OK",i[i.OP_MINUS=4]="OP_MINUS",i[i.OP_MINUS_E=5]="OP_MINUS_E",i[i.OP_MINUS_ER=6]="OP_MINUS_ER",i[i.OP_MINUS_ERR=7]="OP_MINUS_ERR",i[i.OP_MINUS_ERR_SPC=8]="OP_MINUS_ERR_SPC",i[i.MINUS_ERR_ARG=9]="MINUS_ERR_ARG",i[i.OP_M=10]="OP_M",i[i.OP_MS=11]="OP_MS",i[i.OP_MSG=12]="OP_MSG",i[i.OP_MSG_SPC=13]="OP_MSG_SPC",i[i.MSG_ARG=14]="MSG_ARG",i[i.MSG_PAYLOAD=15]="MSG_PAYLOAD",i[i.MSG_END=16]="MSG_END",i[i.OP_H=17]="OP_H",i[i.OP_P=18]="OP_P",i[i.OP_PI=19]="OP_PI",i[i.OP_PIN=20]="OP_PIN",i[i.OP_PING=21]="OP_PING",i[i.OP_PO=22]="OP_PO",i[i.OP_PON=23]="OP_PON",i[i.OP_PONG=24]="OP_PONG",i[i.OP_I=25]="OP_I",i[i.OP_IN=26]="OP_IN",i[i.OP_INF=27]="OP_INF",i[i.OP_INFO=28]="OP_INFO",i[i.OP_INFO_SPC=29]="OP_INFO_SPC",i[i.INFO_ARG=30]="INFO_ARG"})(de||(de={}));var he;(function(i){i[i.CR=13]="CR",i[i.E=69]="E",i[i.e=101]="e",i[i.F=70]="F",i[i.f=102]="f",i[i.G=71]="G",i[i.g=103]="g",i[i.H=72]="H",i[i.h=104]="h",i[i.I=73]="I",i[i.i=105]="i",i[i.K=75]="K",i[i.k=107]="k",i[i.M=77]="M",i[i.m=109]="m",i[i.MINUS=45]="MINUS",i[i.N=78]="N",i[i.n=110]="n",i[i.NL=10]="NL",i[i.O=79]="O",i[i.o=111]="o",i[i.P=80]="P",i[i.p=112]="p",i[i.PLUS=43]="PLUS",i[i.R=82]="R",i[i.r=114]="r",i[i.S=83]="S",i[i.s=115]="s",i[i.SPACE=32]="SPACE",i[i.TAB=9]="TAB"})(he||(he={}));(function(i){var s=function(N,A){this.hi=N|0,this.lo=A|0},a=function(N){var A,E=new Float64Array(16);if(N)for(A=0;A<N.length;A++)E[A]=N[A];return E},o=function(){throw new Error("no PRNG")},u=new Uint8Array(16),d=new Uint8Array(32);d[0]=9;var p=a(),m=a([1]),g=a([56129,1]),v=a([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),_=a([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),S=a([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),D=a([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),B=a([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function j(N,A){return N<<A|N>>>32-A}function F(N,A){var E=N[A+3]&255;return E=E<<8|N[A+2]&255,E=E<<8|N[A+1]&255,E<<8|N[A+0]&255}function Q(N,A){var E=N[A]<<24|N[A+1]<<16|N[A+2]<<8|N[A+3],T=N[A+4]<<24|N[A+5]<<16|N[A+6]<<8|N[A+7];return new s(E,T)}function ee(N,A,E){var T;for(T=0;T<4;T++)N[A+T]=E&255,E>>>=8}function te(N,A,E){N[A]=E.hi>>24&255,N[A+1]=E.hi>>16&255,N[A+2]=E.hi>>8&255,N[A+3]=E.hi&255,N[A+4]=E.lo>>24&255,N[A+5]=E.lo>>16&255,N[A+6]=E.lo>>8&255,N[A+7]=E.lo&255}function Se(N,A,E,T,k){var L,Z=0;for(L=0;L<k;L++)Z|=N[A+L]^E[T+L];return(1&Z-1>>>8)-1}function De(N,A,E,T){return Se(N,A,E,T,16)}function q(N,A,E,T){return Se(N,A,E,T,32)}function ne(N,A,E,T,k){var L=new Uint32Array(16),Z=new Uint32Array(16),se=new Uint32Array(16),$=new Uint32Array(4),K,ye,qe;for(K=0;K<4;K++)Z[5*K]=F(T,4*K),Z[1+K]=F(E,4*K),Z[6+K]=F(A,4*K),Z[11+K]=F(E,16+4*K);for(K=0;K<16;K++)se[K]=Z[K];for(K=0;K<20;K++){for(ye=0;ye<4;ye++){for(qe=0;qe<4;qe++)$[qe]=Z[(5*ye+4*qe)%16];for($[1]^=j($[0]+$[3]|0,7),$[2]^=j($[1]+$[0]|0,9),$[3]^=j($[2]+$[1]|0,13),$[0]^=j($[3]+$[2]|0,18),qe=0;qe<4;qe++)L[4*ye+(ye+qe)%4]=$[qe]}for(qe=0;qe<16;qe++)Z[qe]=L[qe]}if(k){for(K=0;K<16;K++)Z[K]=Z[K]+se[K]|0;for(K=0;K<4;K++)Z[5*K]=Z[5*K]-F(T,4*K)|0,Z[6+K]=Z[6+K]-F(A,4*K)|0;for(K=0;K<4;K++)ee(N,4*K,Z[5*K]),ee(N,16+4*K,Z[6+K])}else for(K=0;K<16;K++)ee(N,4*K,Z[K]+se[K]|0)}function oe(N,A,E,T){return ne(N,A,E,T,!1),0}function W(N,A,E,T){return ne(N,A,E,T,!0),0}var X=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function H(N,A,E,T,k,L,Z){var se=new Uint8Array(16),$=new Uint8Array(64),K,ye;if(!k)return 0;for(ye=0;ye<16;ye++)se[ye]=0;for(ye=0;ye<8;ye++)se[ye]=L[ye];for(;k>=64;){for(oe($,se,Z,X),ye=0;ye<64;ye++)N[A+ye]=(E?E[T+ye]:0)^$[ye];for(K=1,ye=8;ye<16;ye++)K=K+(se[ye]&255)|0,se[ye]=K&255,K>>>=8;k-=64,A+=64,E&&(T+=64)}if(k>0)for(oe($,se,Z,X),ye=0;ye<k;ye++)N[A+ye]=(E?E[T+ye]:0)^$[ye];return 0}function le(N,A,E,T,k){return H(N,A,null,0,E,T,k)}function ie(N,A,E,T,k){var L=new Uint8Array(32);return W(L,T,k,X),le(N,A,E,T.subarray(16),L)}function ve(N,A,E,T,k,L,Z){var se=new Uint8Array(32);return W(se,L,Z,X),H(N,A,E,T,k,L.subarray(16),se)}function Qe(N,A){var E,T=0;for(E=0;E<17;E++)T=T+(N[E]+A[E]|0)|0,N[E]=T&255,T>>>=8}var nt=new Uint32Array([5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252]);function ae(N,A,E,T,k,L){var Z,se,$,K,ye=new Uint32Array(17),qe=new Uint32Array(17),it=new Uint32Array(17),pn=new Uint32Array(17),fr=new Uint32Array(17);for($=0;$<17;$++)qe[$]=it[$]=0;for($=0;$<16;$++)qe[$]=L[$];for(qe[3]&=15,qe[4]&=252,qe[7]&=15,qe[8]&=252,qe[11]&=15,qe[12]&=252,qe[15]&=15;k>0;){for($=0;$<17;$++)pn[$]=0;for($=0;$<16&&$<k;++$)pn[$]=E[T+$];for(pn[$]=1,T+=$,k-=$,Qe(it,pn),se=0;se<17;se++)for(ye[se]=0,$=0;$<17;$++)ye[se]=ye[se]+it[$]*($<=se?qe[se-$]:320*qe[se+17-$]|0)|0|0;for(se=0;se<17;se++)it[se]=ye[se];for(K=0,$=0;$<16;$++)K=K+it[$]|0,it[$]=K&255,K>>>=8;for(K=K+it[16]|0,it[16]=K&3,K=5*(K>>>2)|0,$=0;$<16;$++)K=K+it[$]|0,it[$]=K&255,K>>>=8;K=K+it[16]|0,it[16]=K}for($=0;$<17;$++)fr[$]=it[$];for(Qe(it,nt),Z=-(it[16]>>>7)|0,$=0;$<17;$++)it[$]^=Z&(fr[$]^it[$]);for($=0;$<16;$++)pn[$]=L[$+16];for(pn[16]=0,Qe(it,pn),$=0;$<16;$++)N[A+$]=it[$];return 0}function pe(N,A,E,T,k,L){var Z=new Uint8Array(16);return ae(Z,0,E,T,k,L),De(N,A,Z,0)}function xe(N,A,E,T,k){var L;if(E<32)return-1;for(ve(N,0,A,0,E,T,k),ae(N,16,N,32,E-32,N),L=0;L<16;L++)N[L]=0;return 0}function je(N,A,E,T,k){var L,Z=new Uint8Array(32);if(E<32||(ie(Z,0,32,T,k),pe(A,16,A,32,E-32,Z)!==0))return-1;for(ve(N,0,A,0,E,T,k),L=0;L<32;L++)N[L]=0;return 0}function Ce(N,A){var E;for(E=0;E<16;E++)N[E]=A[E]|0}function G(N){var A,E;for(E=0;E<16;E++)N[E]+=65536,A=Math.floor(N[E]/65536),N[(E+1)*(E<15?1:0)]+=A-1+37*(A-1)*(E===15?1:0),N[E]-=A*65536}function Ne(N,A,E){for(var T,k=~(E-1),L=0;L<16;L++)T=k&(N[L]^A[L]),N[L]^=T,A[L]^=T}function Ze(N,A){var E,T,k,L=a(),Z=a();for(E=0;E<16;E++)Z[E]=A[E];for(G(Z),G(Z),G(Z),T=0;T<2;T++){for(L[0]=Z[0]-65517,E=1;E<15;E++)L[E]=Z[E]-65535-(L[E-1]>>16&1),L[E-1]&=65535;L[15]=Z[15]-32767-(L[14]>>16&1),k=L[15]>>16&1,L[14]&=65535,Ne(Z,L,1-k)}for(E=0;E<16;E++)N[2*E]=Z[E]&255,N[2*E+1]=Z[E]>>8}function Pe(N,A){var E=new Uint8Array(32),T=new Uint8Array(32);return Ze(E,N),Ze(T,A),q(E,0,T,0)}function Yt(N){var A=new Uint8Array(32);return Ze(A,N),A[0]&1}function Ea(N,A){var E;for(E=0;E<16;E++)N[E]=A[2*E]+(A[2*E+1]<<8);N[15]&=32767}function et(N,A,E){var T;for(T=0;T<16;T++)N[T]=A[T]+E[T]|0}function Rt(N,A,E){var T;for(T=0;T<16;T++)N[T]=A[T]-E[T]|0}function ke(N,A,E){var T,k,L=new Float64Array(31);for(T=0;T<31;T++)L[T]=0;for(T=0;T<16;T++)for(k=0;k<16;k++)L[T+k]+=A[T]*E[k];for(T=0;T<15;T++)L[T]+=38*L[T+16];for(T=0;T<16;T++)N[T]=L[T];G(N),G(N)}function un(N,A){ke(N,A,A)}function be(N,A){var E=a(),T;for(T=0;T<16;T++)E[T]=A[T];for(T=253;T>=0;T--)un(E,E),T!==2&&T!==4&&ke(E,E,A);for(T=0;T<16;T++)N[T]=E[T]}function eo(N,A){var E=a(),T;for(T=0;T<16;T++)E[T]=A[T];for(T=250;T>=0;T--)un(E,E),T!==1&&ke(E,E,A);for(T=0;T<16;T++)N[T]=E[T]}function _a(N,A,E){var T=new Uint8Array(32),k=new Float64Array(80),L,Z,se=a(),$=a(),K=a(),ye=a(),qe=a(),it=a();for(Z=0;Z<31;Z++)T[Z]=A[Z];for(T[31]=A[31]&127|64,T[0]&=248,Ea(k,E),Z=0;Z<16;Z++)$[Z]=k[Z],ye[Z]=se[Z]=K[Z]=0;for(se[0]=ye[0]=1,Z=254;Z>=0;--Z)L=T[Z>>>3]>>>(Z&7)&1,Ne(se,$,L),Ne(K,ye,L),et(qe,se,K),Rt(se,se,K),et(K,$,ye),Rt($,$,ye),un(ye,qe),un(it,se),ke(se,K,se),ke(K,$,qe),et(qe,se,K),Rt(se,se,K),un($,se),Rt(K,ye,it),ke(se,K,g),et(se,se,ye),ke(K,K,se),ke(se,ye,it),ke(ye,$,k),un($,qe),Ne(se,$,L),Ne(K,ye,L);for(Z=0;Z<16;Z++)k[Z+16]=se[Z],k[Z+32]=K[Z],k[Z+48]=$[Z],k[Z+64]=ye[Z];var pn=k.subarray(32),fr=k.subarray(16);return be(pn,pn),ke(fr,fr,pn),Ze(N,fr),0}function Aa(N,A){return _a(N,A,d)}function ir(N,A){return o(A,32),Aa(N,A)}function st(N,A,E){var T=new Uint8Array(32);return _a(T,E,A),W(N,u,T,X)}var to=xe,Nl=je;function Eh(N,A,E,T,k,L){var Z=new Uint8Array(32);return st(Z,k,L),to(N,A,E,T,Z)}function bt(N,A,E,T,k,L){var Z=new Uint8Array(32);return st(Z,k,L),Nl(N,A,E,T,Z)}function oi(){var N=0,A=0,E=0,T=0,k=65535,L,Z,se;for(se=0;se<arguments.length;se++)L=arguments[se].lo,Z=arguments[se].hi,N+=L&k,A+=L>>>16,E+=Z&k,T+=Z>>>16;return A+=N>>>16,E+=A>>>16,T+=E>>>16,new s(E&k|T<<16,N&k|A<<16)}function Us(N,A){return new s(N.hi>>>A,N.lo>>>A|N.hi<<32-A)}function Da(){var N=0,A=0,E;for(E=0;E<arguments.length;E++)N^=arguments[E].lo,A^=arguments[E].hi;return new s(A,N)}function fn(N,A){var E,T,k=32-A;return A<32?(E=N.hi>>>A|N.lo<<k,T=N.lo>>>A|N.hi<<k):A<64&&(E=N.lo>>>A|N.hi<<k,T=N.hi>>>A|N.lo<<k),new s(E,T)}function _h(N,A,E){var T=N.hi&A.hi^~N.hi&E.hi,k=N.lo&A.lo^~N.lo&E.lo;return new s(T,k)}function wl(N,A,E){var T=N.hi&A.hi^N.hi&E.hi^A.hi&E.hi,k=N.lo&A.lo^N.lo&E.lo^A.lo&E.lo;return new s(T,k)}function Sl(N){return Da(fn(N,28),fn(N,34),fn(N,39))}function li(N){return Da(fn(N,14),fn(N,18),fn(N,41))}function Ah(N){return Da(fn(N,1),fn(N,8),Us(N,7))}function _u(N){return Da(fn(N,19),fn(N,61),Us(N,6))}var Au=[new s(1116352408,3609767458),new s(1899447441,602891725),new s(3049323471,3964484399),new s(3921009573,2173295548),new s(961987163,4081628472),new s(1508970993,3053834265),new s(2453635748,2937671579),new s(2870763221,3664609560),new s(3624381080,2734883394),new s(310598401,1164996542),new s(607225278,1323610764),new s(1426881987,3590304994),new s(1925078388,4068182383),new s(2162078206,991336113),new s(2614888103,633803317),new s(3248222580,3479774868),new s(3835390401,2666613458),new s(4022224774,944711139),new s(264347078,2341262773),new s(604807628,2007800933),new s(770255983,1495990901),new s(1249150122,1856431235),new s(1555081692,3175218132),new s(1996064986,2198950837),new s(2554220882,3999719339),new s(2821834349,766784016),new s(2952996808,2566594879),new s(3210313671,3203337956),new s(3336571891,1034457026),new s(3584528711,2466948901),new s(113926993,3758326383),new s(338241895,168717936),new s(666307205,1188179964),new s(773529912,1546045734),new s(1294757372,1522805485),new s(1396182291,2643833823),new s(1695183700,2343527390),new s(1986661051,1014477480),new s(2177026350,1206759142),new s(2456956037,344077627),new s(2730485921,1290863460),new s(2820302411,3158454273),new s(3259730800,3505952657),new s(3345764771,106217008),new s(3516065817,3606008344),new s(3600352804,1432725776),new s(4094571909,1467031594),new s(275423344,851169720),new s(430227734,3100823752),new s(506948616,1363258195),new s(659060556,3750685593),new s(883997877,3785050280),new s(958139571,3318307427),new s(1322822218,3812723403),new s(1537002063,2003034995),new s(1747873779,3602036899),new s(1955562222,1575990012),new s(2024104815,1125592928),new s(2227730452,2716904306),new s(2361852424,442776044),new s(2428436474,593698344),new s(2756734187,3733110249),new s(3204031479,2999351573),new s(3329325298,3815920427),new s(3391569614,3928383900),new s(3515267271,566280711),new s(3940187606,3454069534),new s(4118630271,4000239992),new s(116418474,1914138554),new s(174292421,2731055270),new s(289380356,3203993006),new s(460393269,320620315),new s(685471733,587496836),new s(852142971,1086792851),new s(1017036298,365543100),new s(1126000580,2618297676),new s(1288033470,3409855158),new s(1501505948,4234509866),new s(1607167915,987167468),new s(1816402316,1246189591)];function El(N,A,E){var T=[],k=[],L=[],Z=[],se,$,K;for($=0;$<8;$++)T[$]=L[$]=Q(N,8*$);for(var ye=0;E>=128;){for($=0;$<16;$++)Z[$]=Q(A,8*$+ye);for($=0;$<80;$++){for(K=0;K<8;K++)k[K]=L[K];for(se=oi(L[7],li(L[4]),_h(L[4],L[5],L[6]),Au[$],Z[$%16]),k[7]=oi(se,Sl(L[0]),wl(L[0],L[1],L[2])),k[3]=oi(k[3],se),K=0;K<8;K++)L[(K+1)%8]=k[K];if($%16===15)for(K=0;K<16;K++)Z[K]=oi(Z[K],Z[(K+9)%16],Ah(Z[(K+1)%16]),_u(Z[(K+14)%16]))}for($=0;$<8;$++)L[$]=oi(L[$],T[$]),T[$]=L[$];ye+=128,E-=128}for($=0;$<8;$++)te(N,8*$,T[$]);return E}var _l=new Uint8Array([106,9,230,103,243,188,201,8,187,103,174,133,132,202,167,59,60,110,243,114,254,148,248,43,165,79,245,58,95,29,54,241,81,14,82,127,173,230,130,209,155,5,104,140,43,62,108,31,31,131,217,171,251,65,189,107,91,224,205,25,19,126,33,121]);function zs(N,A,E){var T=new Uint8Array(64),k=new Uint8Array(256),L,Z=E;for(L=0;L<64;L++)T[L]=_l[L];for(El(T,A,E),E%=128,L=0;L<256;L++)k[L]=0;for(L=0;L<E;L++)k[L]=A[Z-E+L];for(k[E]=128,E=256-128*(E<112?1:0),k[E-9]=0,te(k,E-8,new s(Z/536870912|0,Z<<3)),El(T,k,E),L=0;L<64;L++)N[L]=T[L];return 0}function ci(N,A){var E=a(),T=a(),k=a(),L=a(),Z=a(),se=a(),$=a(),K=a(),ye=a();Rt(E,N[1],N[0]),Rt(ye,A[1],A[0]),ke(E,E,ye),et(T,N[0],N[1]),et(ye,A[0],A[1]),ke(T,T,ye),ke(k,N[3],A[3]),ke(k,k,_),ke(L,N[2],A[2]),et(L,L,L),Rt(Z,T,E),Rt(se,L,k),et($,L,k),et(K,T,E),ke(N[0],Z,se),ke(N[1],K,$),ke(N[2],$,se),ke(N[3],Z,K)}function no(N,A,E){var T;for(T=0;T<4;T++)Ne(N[T],A[T],E)}function so(N,A){var E=a(),T=a(),k=a();be(k,A[2]),ke(E,A[0],k),ke(T,A[1],k),Ze(N,T),N[31]^=Yt(E)<<7}function ao(N,A,E){var T,k;for(Ce(N[0],p),Ce(N[1],m),Ce(N[2],m),Ce(N[3],p),k=255;k>=0;--k)T=E[k/8|0]>>(k&7)&1,no(N,A,T),ci(A,N),ci(N,N),no(N,A,T)}function or(N,A){var E=[a(),a(),a(),a()];Ce(E[0],S),Ce(E[1],D),Ce(E[2],m),ke(E[3],S,D),ao(N,E,A)}function Bs(N,A,E){var T=new Uint8Array(64),k=[a(),a(),a(),a()],L;for(E||o(A,32),zs(T,A,32),T[0]&=248,T[31]&=127,T[31]|=64,or(k,T),so(N,k),L=0;L<32;L++)A[L+32]=N[L];return 0}var Un=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Ta(N,A){var E,T,k,L;for(T=63;T>=32;--T){for(E=0,k=T-32,L=T-12;k<L;++k)A[k]+=E-16*A[T]*Un[k-(T-32)],E=Math.floor((A[k]+128)/256),A[k]-=E*256;A[k]+=E,A[T]=0}for(E=0,k=0;k<32;k++)A[k]+=E-(A[31]>>4)*Un[k],E=A[k]>>8,A[k]&=255;for(k=0;k<32;k++)A[k]-=E*Un[k];for(T=0;T<32;T++)A[T+1]+=A[T]>>8,N[T]=A[T]&255}function qs(N){var A=new Float64Array(64),E;for(E=0;E<64;E++)A[E]=N[E];for(E=0;E<64;E++)N[E]=0;Ta(N,A)}function jt(N,A,E,T){var k=new Uint8Array(64),L=new Uint8Array(64),Z=new Uint8Array(64),se,$,K=new Float64Array(64),ye=[a(),a(),a(),a()];zs(k,T,32),k[0]&=248,k[31]&=127,k[31]|=64;var qe=E+64;for(se=0;se<E;se++)N[64+se]=A[se];for(se=0;se<32;se++)N[32+se]=k[32+se];for(zs(Z,N.subarray(32),E+32),qs(Z),or(ye,Z),so(N,ye),se=32;se<64;se++)N[se]=T[se];for(zs(L,N,E+64),qs(L),se=0;se<64;se++)K[se]=0;for(se=0;se<32;se++)K[se]=Z[se];for(se=0;se<32;se++)for($=0;$<32;$++)K[se+$]+=L[se]*k[$];return Ta(N.subarray(32),K),qe}function Ca(N,A){var E=a(),T=a(),k=a(),L=a(),Z=a(),se=a(),$=a();return Ce(N[2],m),Ea(N[1],A),un(k,N[1]),ke(L,k,v),Rt(k,k,N[2]),et(L,N[2],L),un(Z,L),un(se,Z),ke($,se,Z),ke(E,$,k),ke(E,E,L),eo(E,E),ke(E,E,k),ke(E,E,L),ke(E,E,L),ke(N[0],E,L),un(T,N[0]),ke(T,T,L),Pe(T,k)&&ke(N[0],N[0],B),un(T,N[0]),ke(T,T,L),Pe(T,k)?-1:(Yt(N[0])===A[31]>>7&&Rt(N[0],p,N[0]),ke(N[3],N[0],N[1]),0)}function Ls(N,A,E,T){var k,L=new Uint8Array(32),Z=new Uint8Array(64),se=[a(),a(),a(),a()],$=[a(),a(),a(),a()];if(E<64||Ca($,T))return-1;for(k=0;k<E;k++)N[k]=A[k];for(k=0;k<32;k++)N[k+32]=T[k];if(zs(Z,N,E),qs(Z),ao(se,$,Z),or($,A.subarray(32)),ci(se,$),so(L,se),E-=64,q(A,0,L,0)){for(k=0;k<E;k++)N[k]=0;return-1}for(k=0;k<E;k++)N[k]=A[k+64];return E}var Hs=32,lr=24,cr=32,vs=16,Ps=32,Tn=32,Qt=32,ur=32,Al=32,ro=lr,Du=cr,io=vs,Tt=64,$s=32,Is=64,oo=32,ui=64;i.lowlevel={crypto_core_hsalsa20:W,crypto_stream_xor:ve,crypto_stream:ie,crypto_stream_salsa20_xor:H,crypto_stream_salsa20:le,crypto_onetimeauth:ae,crypto_onetimeauth_verify:pe,crypto_verify_16:De,crypto_verify_32:q,crypto_secretbox:xe,crypto_secretbox_open:je,crypto_scalarmult:_a,crypto_scalarmult_base:Aa,crypto_box_beforenm:st,crypto_box_afternm:to,crypto_box:Eh,crypto_box_open:bt,crypto_box_keypair:ir,crypto_hash:zs,crypto_sign:jt,crypto_sign_keypair:Bs,crypto_sign_open:Ls,crypto_secretbox_KEYBYTES:Hs,crypto_secretbox_NONCEBYTES:lr,crypto_secretbox_ZEROBYTES:cr,crypto_secretbox_BOXZEROBYTES:vs,crypto_scalarmult_BYTES:Ps,crypto_scalarmult_SCALARBYTES:Tn,crypto_box_PUBLICKEYBYTES:Qt,crypto_box_SECRETKEYBYTES:ur,crypto_box_BEFORENMBYTES:Al,crypto_box_NONCEBYTES:ro,crypto_box_ZEROBYTES:Du,crypto_box_BOXZEROBYTES:io,crypto_sign_BYTES:Tt,crypto_sign_PUBLICKEYBYTES:$s,crypto_sign_SECRETKEYBYTES:Is,crypto_sign_SEEDBYTES:oo,crypto_hash_BYTES:ui,gf:a,D:v,L:Un,pack25519:Ze,unpack25519:Ea,M:ke,A:et,S:un,Z:Rt,pow2523:eo,add:ci,set25519:Ce,modL:Ta,scalarmult:ao,scalarbase:or};function Dl(N,A){if(N.length!==Hs)throw new Error("bad key size");if(A.length!==lr)throw new Error("bad nonce size")}function Tu(N,A){if(N.length!==Qt)throw new Error("bad public key size");if(A.length!==ur)throw new Error("bad secret key size")}function Ut(){for(var N=0;N<arguments.length;N++)if(!(arguments[N]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function Tl(N){for(var A=0;A<N.length;A++)N[A]=0}i.randomBytes=function(N){var A=new Uint8Array(N);return o(A,N),A},i.secretbox=function(N,A,E){Ut(N,A,E),Dl(E,A);for(var T=new Uint8Array(cr+N.length),k=new Uint8Array(T.length),L=0;L<N.length;L++)T[L+cr]=N[L];return xe(k,T,T.length,A,E),k.subarray(vs)},i.secretbox.open=function(N,A,E){Ut(N,A,E),Dl(E,A);for(var T=new Uint8Array(vs+N.length),k=new Uint8Array(T.length),L=0;L<N.length;L++)T[L+vs]=N[L];return T.length<32||je(k,T,T.length,A,E)!==0?null:k.subarray(cr)},i.secretbox.keyLength=Hs,i.secretbox.nonceLength=lr,i.secretbox.overheadLength=vs,i.scalarMult=function(N,A){if(Ut(N,A),N.length!==Tn)throw new Error("bad n size");if(A.length!==Ps)throw new Error("bad p size");var E=new Uint8Array(Ps);return _a(E,N,A),E},i.scalarMult.base=function(N){if(Ut(N),N.length!==Tn)throw new Error("bad n size");var A=new Uint8Array(Ps);return Aa(A,N),A},i.scalarMult.scalarLength=Tn,i.scalarMult.groupElementLength=Ps,i.box=function(N,A,E,T){var k=i.box.before(E,T);return i.secretbox(N,A,k)},i.box.before=function(N,A){Ut(N,A),Tu(N,A);var E=new Uint8Array(Al);return st(E,N,A),E},i.box.after=i.secretbox,i.box.open=function(N,A,E,T){var k=i.box.before(E,T);return i.secretbox.open(N,A,k)},i.box.open.after=i.secretbox.open,i.box.keyPair=function(){var N=new Uint8Array(Qt),A=new Uint8Array(ur);return ir(N,A),{publicKey:N,secretKey:A}},i.box.keyPair.fromSecretKey=function(N){if(Ut(N),N.length!==ur)throw new Error("bad secret key size");var A=new Uint8Array(Qt);return Aa(A,N),{publicKey:A,secretKey:new Uint8Array(N)}},i.box.publicKeyLength=Qt,i.box.secretKeyLength=ur,i.box.sharedKeyLength=Al,i.box.nonceLength=ro,i.box.overheadLength=i.secretbox.overheadLength,i.sign=function(N,A){if(Ut(N,A),A.length!==Is)throw new Error("bad secret key size");var E=new Uint8Array(Tt+N.length);return jt(E,N,N.length,A),E},i.sign.open=function(N,A){if(Ut(N,A),A.length!==$s)throw new Error("bad public key size");var E=new Uint8Array(N.length),T=Ls(E,N,N.length,A);if(T<0)return null;for(var k=new Uint8Array(T),L=0;L<k.length;L++)k[L]=E[L];return k},i.sign.detached=function(N,A){for(var E=i.sign(N,A),T=new Uint8Array(Tt),k=0;k<T.length;k++)T[k]=E[k];return T},i.sign.detached.verify=function(N,A,E){if(Ut(N,A,E),A.length!==Tt)throw new Error("bad signature size");if(E.length!==$s)throw new Error("bad public key size");var T=new Uint8Array(Tt+N.length),k=new Uint8Array(Tt+N.length),L;for(L=0;L<Tt;L++)T[L]=A[L];for(L=0;L<N.length;L++)T[L+Tt]=N[L];return Ls(k,T,T.length,E)>=0},i.sign.keyPair=function(){var N=new Uint8Array($s),A=new Uint8Array(Is);return Bs(N,A),{publicKey:N,secretKey:A}},i.sign.keyPair.fromSecretKey=function(N){if(Ut(N),N.length!==Is)throw new Error("bad secret key size");for(var A=new Uint8Array($s),E=0;E<A.length;E++)A[E]=N[32+E];return{publicKey:A,secretKey:new Uint8Array(N)}},i.sign.keyPair.fromSeed=function(N){if(Ut(N),N.length!==oo)throw new Error("bad seed size");for(var A=new Uint8Array($s),E=new Uint8Array(Is),T=0;T<32;T++)E[T]=N[T];return Bs(A,E,!0),{publicKey:A,secretKey:E}},i.sign.publicKeyLength=$s,i.sign.secretKeyLength=Is,i.sign.seedLength=oo,i.sign.signatureLength=Tt,i.hash=function(N){Ut(N);var A=new Uint8Array(ui);return zs(A,N,N.length),A},i.hash.hashLength=ui,i.verify=function(N,A){return Ut(N,A),N.length===0||A.length===0||N.length!==A.length?!1:Se(N,0,A,0,N.length)===0},i.setPRNG=function(N){o=N},(function(){var N=typeof globalThis<"u"?globalThis.crypto||globalThis.msCrypto:null;if(N&&N.getRandomValues){var A=65536;i.setPRNG(function(E,T){var k,L=new Uint8Array(T);for(k=0;k<T;k+=A)N.getRandomValues(L.subarray(k,k+Math.min(T-k,A)));for(k=0;k<T;k++)E[k]=L[k];Tl(L)})}else typeof require<"u"&&(N=require("crypto"),N&&N.randomBytes&&i.setPRNG(function(E,T){var k,L=N.randomBytes(T);for(k=0;k<T;k++)E[k]=L[k];Tl(L)}))})()})(typeof module<"u"&&module.exports?module.exports:globalThis.nacl=globalThis.nacl||{});const Id=typeof module<"u"&&module.exports?module.exports:globalThis.nacl;Id.sign.keyPair.fromSeed,Id.sign.detached,Id.sign.detached.verify,Id.randomBytes;var dS;(function(i){i.InvalidPrefixByte="nkeys: invalid prefix byte",i.InvalidKey="nkeys: invalid key",i.InvalidPublicKey="nkeys: invalid public key",i.InvalidSeedLen="nkeys: invalid seed length",i.InvalidSeed="nkeys: invalid seed",i.InvalidEncoding="nkeys: invalid encoded key",i.InvalidSignature="nkeys: signature verification failed",i.CannotSign="nkeys: cannot sign, no private key available",i.PublicKeyOnly="nkeys: no seed or private key available",i.InvalidChecksum="nkeys: invalid checksum",i.SerializationError="nkeys: serialization error",i.ApiError="nkeys: api error",i.ClearedPair="nkeys: pair is cleared"})(dS||(dS={}));var hS;(function(i){i[i.Seed=144]="Seed",i[i.Private=120]="Private",i[i.Operator=112]="Operator",i[i.Server=104]="Server",i[i.Cluster=16]="Cluster",i[i.Account=0]="Account",i[i.User=160]="User"})(hS||(hS={}));function T3(i){return s=>{let a={};return i.forEach(o=>{const u=o(s)||{};a=Object.assign(a,u)}),a}}function C3(){return()=>{}}function O3(i,s){return()=>{const a=typeof i=="function"?i():i,o=typeof s=="function"?s():s;return{user:a,pass:o}}}function R3(i){return()=>({auth_token:typeof i=="function"?i():i})}const gE=120*1e3,j3=2,vE=2*1e3;function M3(){return{maxPingOut:2,maxReconnectAttempts:10,noRandomize:!1,pedantic:!1,pingInterval:gE,reconnect:!0,reconnectJitter:100,reconnectJitterTLS:1e3,reconnectTimeWait:vE,tls:void 0,verbose:!1,waitOnFirstConnect:!1,ignoreAuthErrorAbort:!1}}function k3(i){const s=[];return typeof i.authenticator=="function"&&s.push(i.authenticator),Array.isArray(i.authenticator)&&s.push(...i.authenticator),i.token&&s.push(R3(i.token)),i.user&&s.push(O3(i.user,i.pass)),s.length===0?C3():T3(s)}function V3(i){const s=`${A0}:${pE()}`;if(i=i||{servers:[s]},i.servers=i.servers||[],typeof i.servers=="string"&&(i.servers=[i.servers]),i.servers.length>0&&i.port)throw new ge("port and servers options are mutually exclusive",ue.InvalidOption);i.servers.length===0&&i.port&&(i.servers=[`${A0}:${i.port}`]),i.servers&&i.servers.length===0&&(i.servers=[s]);const a=bh(M3(),i);if(a.authenticator=k3(a),["reconnectDelayHandler","authenticator"].forEach(o=>{if(a[o]&&typeof a[o]!="function")throw new ge(`${o} option should be a function`,ue.NotFunction)}),a.reconnectDelayHandler||(a.reconnectDelayHandler=()=>{let o=a.tls?a.reconnectJitterTLS:a.reconnectJitter;return o&&(o++,o=Math.floor(Math.random()*o)),a.reconnectTimeWait+o}),a.inboxPrefix)try{sr(a.inboxPrefix)}catch(o){throw new ge(o.message,ue.ApiError)}if(a.resolve===void 0&&(a.resolve=typeof k0()=="function"),a.resolve&&typeof k0()!="function")throw new ge("'resolve' is not supported on this client",ue.InvalidOption);return a}function U3(i,s){const{proto:a,tls_required:o,tls_available:u}=i;if((a===void 0||a<1)&&s.noEcho)throw new ge("noEcho",ue.ServerOptionNotAvailable);const d=o||u||!1;if(s.tls&&!d)throw new ge("tls",ue.ServerOptionNotAvailable)}const z3=1024*32,B3=/^INFO\s+([^\r\n]+)\r\n/i,q3=du(`PONG\r
|
|
256
|
+
`),mS=du(`PING\r
|
|
257
|
+
`);class L3{constructor(s,a,o){w(this,"echo");w(this,"no_responders");w(this,"protocol");w(this,"verbose");w(this,"pedantic");w(this,"jwt");w(this,"nkey");w(this,"sig");w(this,"user");w(this,"pass");w(this,"auth_token");w(this,"tls_required");w(this,"name");w(this,"lang");w(this,"version");w(this,"headers");this.protocol=1,this.version=s.version,this.lang=s.lang,this.echo=a.noEcho?!1:void 0,this.verbose=a.verbose,this.pedantic=a.pedantic,this.tls_required=a.tls?!0:void 0,this.name=a.name;const u=(a&&typeof a.authenticator=="function"?a.authenticator(o):{})||{};bh(this,u)}}class xE extends sn{constructor(a,o,u={}){var p;super();w(this,"sid");w(this,"queue");w(this,"draining");w(this,"max");w(this,"subject");w(this,"drained");w(this,"protocol");w(this,"timer");w(this,"info");w(this,"cleanupFn");w(this,"closed");w(this,"requestSubject");bh(this,u),this.protocol=a,this.subject=o,this.draining=!1,this.noIterator=typeof u.callback=="function",this.closed=_t();const d=!((p=a.options)!=null&&p.noAsyncTraces);u.timeout&&(this.timer=bl(u.timeout,d),this.timer.then(()=>{this.timer=void 0}).catch(m=>{this.stop(m),this.noIterator&&this.callback(m,{})})),this.noIterator||this.iterClosed.then(()=>{this.closed.resolve(),this.unsubscribe()})}setPrePostHandlers(a){if(this.noIterator){const o=this.callback,u=a.ingestionFilterFn?a.ingestionFilterFn:()=>({ingest:!0,protocol:!1}),d=a.protocolFilterFn?a.protocolFilterFn:()=>!0,p=a.dispatchedFn?a.dispatchedFn:()=>{};this.callback=(m,g)=>{const{ingest:v}=u(g);v&&d(g)&&(o(m,g),p(g))}}else this.protocolFilterFn=a.protocolFilterFn,this.dispatchedFn=a.dispatchedFn}callback(a,o){this.cancelTimeout(),a?this.stop(a):this.push(o)}close(){if(!this.isClosed()){this.cancelTimeout();const a=()=>{if(this.stop(),this.cleanupFn)try{this.cleanupFn(this,this.info)}catch{}this.closed.resolve()};this.noIterator?a():this.push(a)}}unsubscribe(a){this.protocol.unsubscribe(this,a)}cancelTimeout(){this.timer&&(this.timer.cancel(),this.timer=void 0)}drain(){return this.protocol.isClosed()?Promise.reject(ge.errorForCode(ue.ConnectionClosed)):this.isClosed()?Promise.reject(ge.errorForCode(ue.SubClosed)):(this.drained||(this.draining=!0,this.protocol.unsub(this),this.drained=this.protocol.flush(_t()).then(()=>{this.protocol.subscriptions.cancel(this)}).catch(()=>{this.protocol.subscriptions.cancel(this)})),this.drained)}isDraining(){return this.draining}isClosed(){return this.done}getSubject(){return this.subject}getMax(){return this.max}getID(){return this.sid}}class H3{constructor(){w(this,"mux");w(this,"subs");w(this,"sidCounter");this.sidCounter=0,this.mux=null,this.subs=new Map}size(){return this.subs.size}add(s){return this.sidCounter++,s.sid=this.sidCounter,this.subs.set(s.sid,s),s}setMux(s){return this.mux=s,s}getMux(){return this.mux}get(s){return this.subs.get(s)}resub(s){return this.sidCounter++,this.subs.delete(s.sid),s.sid=this.sidCounter,this.subs.set(s.sid,s),s}all(){return Array.from(this.subs.values())}cancel(s){s&&(s.close(),this.subs.delete(s.sid))}handleError(s){if(s&&s.permissionContext){const a=s.permissionContext,o=this.all();let u;if(a.operation==="subscription"&&(u=o.find(d=>d.subject===a.subject&&d.queue===a.queue)),a.operation==="publish"&&(u=o.find(d=>d.requestSubject===a.subject)),u)return u.callback(s,{}),u.close(),this.subs.delete(u.sid),u!==this.mux}return!1}close(){this.subs.forEach(s=>{s.close()})}}class fh{constructor(s,a){w(this,"connected");w(this,"connectedOnce");w(this,"infoReceived");w(this,"info");w(this,"muxSubscriptions");w(this,"options");w(this,"outbound");w(this,"pongs");w(this,"subscriptions");w(this,"transport");w(this,"noMorePublishing");w(this,"connectError");w(this,"publisher");w(this,"_closed");w(this,"closed");w(this,"listeners");w(this,"heartbeats");w(this,"parser");w(this,"outMsgs");w(this,"inMsgs");w(this,"outBytes");w(this,"inBytes");w(this,"pendingLimit");w(this,"lastError");w(this,"abortReconnect");w(this,"whyClosed");w(this,"servers");w(this,"server");w(this,"features");w(this,"connectPromise");this._closed=!1,this.connected=!1,this.connectedOnce=!1,this.infoReceived=!1,this.noMorePublishing=!1,this.abortReconnect=!1,this.listeners=[],this.pendingLimit=z3,this.outMsgs=0,this.inMsgs=0,this.outBytes=0,this.inBytes=0,this.options=s,this.publisher=a,this.subscriptions=new H3,this.muxSubscriptions=new S3,this.outbound=new gl,this.pongs=[],this.whyClosed="",this.pendingLimit=s.pendingLimit||this.pendingLimit,this.features=new s3({major:0,minor:0,micro:0}),this.connectPromise=null;const o=typeof s.servers=="string"?[s.servers]:s.servers;this.servers=new w3(o,{randomize:!s.noRandomize}),this.closed=_t(),this.parser=new fS(this),this.heartbeats=new E3(this,this.options.pingInterval||gE,this.options.maxPingOut||j3)}resetOutbound(){this.outbound.reset();const s=this.pongs;this.pongs=[];const a=ge.errorForCode(ue.Disconnect);a.stack="",s.forEach(o=>{o.reject(a)}),this.parser=new fS(this),this.infoReceived=!1}dispatchStatus(s){this.listeners.forEach(a=>{a.push(s)})}status(){const s=new sn;return this.listeners.push(s),s}prepare(){this.transport&&this.transport.discard(),this.info=void 0,this.resetOutbound();const s=_t();return s.catch(()=>{}),this.pongs.unshift(s),this.connectError=a=>{s.reject(a)},this.transport=i3(),this.transport.closed().then(async a=>{if(this.connected=!1,!this.isClosed()){await this.disconnected(this.transport.closeError||this.lastError);return}}),s}disconnect(){this.dispatchStatus({type:fl.StaleConnection,data:""}),this.transport.disconnect()}reconnect(){return this.connected&&(this.dispatchStatus({type:fl.ClientInitiatedReconnect,data:""}),this.transport.disconnect()),Promise.resolve()}async disconnected(s){this.dispatchStatus({type:nr.Disconnect,data:this.servers.getCurrentServer().toString()}),this.options.reconnect?await this.dialLoop().then(()=>{var a;this.dispatchStatus({type:nr.Reconnect,data:this.servers.getCurrentServer().toString()}),((a=this.lastError)==null?void 0:a.code)===ue.AuthenticationExpired&&(this.lastError=void 0)}).catch(a=>{this._close(a)}):await this._close(s)}async dial(s){const a=this.prepare();let o;try{o=bl(this.options.timeout||2e4);const u=this.transport.connect(s,this.options);await Promise.race([u,o]),(async()=>{try{for await(const d of this.transport)this.parser.parse(d)}catch(d){console.log("reader closed",d)}})().then()}catch(u){a.reject(u)}try{await Promise.race([o,a]),o&&o.cancel(),this.connected=!0,this.connectError=void 0,this.sendSubscriptions(),this.connectedOnce=!0,this.server.didConnect=!0,this.server.reconnects=0,this.flushPending(),this.heartbeats.start()}catch(u){throw o&&o.cancel(),await this.transport.close(u),u}}async _doDial(s){const{resolve:a}=this.options,o=await s.resolve({fn:k0(),debug:this.options.debug,randomize:!this.options.noRandomize,resolve:a});let u=null;for(const d of o)try{u=null,this.dispatchStatus({type:fl.Reconnecting,data:d.toString()}),await this.dial(d);return}catch(p){u=p}throw u}dialLoop(){return this.connectPromise===null&&(this.connectPromise=this.dodialLoop(),this.connectPromise.then(()=>{}).catch(()=>{}).finally(()=>{this.connectPromise=null})),this.connectPromise}async dodialLoop(){let s;for(;;){this._closed&&this.servers.clear();const a=this.options.reconnectDelayHandler?this.options.reconnectDelayHandler():vE;let o=a;const u=this.selectServer();if(!u||this.abortReconnect)throw s||(this.lastError?this.lastError:ge.errorForCode(ue.ConnectionRefused));const d=Date.now();if(u.lastConnect===0||u.lastConnect+a<=d){u.lastConnect=Date.now();try{await this._doDial(u);break}catch(p){if(s=p,!this.connectedOnce){if(this.options.waitOnFirstConnect)continue;this.servers.removeCurrentServer()}u.reconnects++;const m=this.options.maxReconnectAttempts||0;m!==-1&&u.reconnects>=m&&this.servers.removeCurrentServer()}}else o=Math.min(o,u.lastConnect+a-d),await vl(o)}}static async connect(s,a){const o=new fh(s,a);return await o.dialLoop(),o}static toError(s){const a=s?s.toLowerCase():"";if(a.indexOf("permissions violation")!==-1){const o=new ge(s,ue.PermissionsViolation),u=s.match(/(Publish|Subscription) to "(\S+)"/);if(u){o.permissionContext={operation:u[1].toLowerCase(),subject:u[2],queue:void 0};const d=s.match(/using queue "(\S+)"/);d&&(o.permissionContext.queue=d[1])}return o}else return a.indexOf("authorization violation")!==-1?new ge(s,ue.AuthorizationViolation):a.indexOf("user authentication expired")!==-1?new ge(s,ue.AuthenticationExpired):a.indexOf("account authentication expired")!=-1?new ge(s,ue.AccountExpired):a.indexOf("authentication timeout")!==-1?new ge(s,ue.AuthenticationTimeout):new ge(s,ue.ProtocolError)}processMsg(s,a){if(this.inMsgs++,this.inBytes+=a.length,!this.subscriptions.sidCounter)return;const o=this.subscriptions.get(s.sid);o&&(o.received+=1,o.callback&&o.callback(null,new ty(s,a,this)),o.max!==void 0&&o.received>=o.max&&o.unsubscribe())}processError(s){const a=Qw(s),o=fh.toError(a),u={type:nr.Error,data:o.code};if(o.isPermissionError()){let d=!1;if(o.permissionContext){u.permissionContext=o.permissionContext;const p=this.subscriptions.getMux();d=(p==null?void 0:p.subject)===o.permissionContext.subject}this.subscriptions.handleError(o),this.muxSubscriptions.handleError(d,o),d&&this.subscriptions.setMux(null)}this.dispatchStatus(u),this.handleError(o)}handleError(s){s.isAuthError()?this.handleAuthError(s):s.isProtocolError()?this.lastError=s:s.isAuthTimeout()&&(this.lastError=s),s.isPermissionError()||(this.lastError=s)}handleAuthError(s){this.lastError&&s.code===this.lastError.code&&this.options.ignoreAuthErrorAbort===!1&&(this.abortReconnect=!0),this.connectError?this.connectError(s):this.disconnect()}processPing(){this.transport.send(q3)}processPong(){const s=this.pongs.shift();s&&s.resolve()}processInfo(s){const a=JSON.parse(Qw(s));this.info=a;const o=this.options&&this.options.ignoreClusterUpdates?void 0:this.servers.update(a,this.transport.isEncrypted());if(!this.infoReceived){this.features.update(Qi(a.version)),this.infoReceived=!0,this.transport.isEncrypted()&&this.servers.updateTLSName();const{version:d,lang:p}=this.transport;try{const m=new L3({version:d,lang:p},this.options,a.nonce);a.headers&&(m.headers=!0,m.no_responders=!0);const g=JSON.stringify(m);this.transport.send(du(`CONNECT ${g}${Kd}`)),this.transport.send(mS)}catch(m){this._close(m)}}o&&this.dispatchStatus({type:nr.Update,data:o}),(a.ldm!==void 0?a.ldm:!1)&&this.dispatchStatus({type:nr.LDM,data:this.servers.getCurrentServer().toString()})}push(s){switch(s.kind){case An.MSG:{const{msg:a,data:o}=s;this.processMsg(a,o);break}case An.OK:break;case An.ERR:this.processError(s.data);break;case An.PING:this.processPing();break;case An.PONG:this.processPong();break;case An.INFO:this.processInfo(s.data);break}}sendCommand(s,...a){const o=this.outbound.length();let u;typeof s=="string"?u=du(s):u=s,this.outbound.fill(u,...a),o===0?queueMicrotask(()=>{this.flushPending()}):this.outbound.size()>=this.pendingLimit&&this.flushPending()}publish(s,a=es,o){let u;if(a instanceof Uint8Array)u=a;else if(typeof a=="string")u=Wi.encode(a);else throw ge.errorForCode(ue.BadPayload);let d=u.length;o=o||{},o.reply=o.reply||"";let p=es,m=0;if(o.headers){if(this.info&&!this.info.headers)throw new ge("headers",ue.ServerOptionNotAvailable);p=o.headers.encode(),m=p.length,d=u.length+m}if(this.info&&d>this.info.max_payload)throw ge.errorForCode(ue.MaxPayloadExceeded);this.outBytes+=d,this.outMsgs++;let g;o.headers?(o.reply?g=`HPUB ${s} ${o.reply} ${m} ${d}\r
|
|
258
|
+
`:g=`HPUB ${s} ${m} ${d}\r
|
|
259
|
+
`,this.sendCommand(g,p,u,uh)):(o.reply?g=`PUB ${s} ${o.reply} ${d}\r
|
|
260
|
+
`:g=`PUB ${s} ${d}\r
|
|
261
|
+
`,this.sendCommand(g,u,uh))}request(s){return this.initMux(),this.muxSubscriptions.add(s),s}subscribe(s){return this.subscriptions.add(s),this._subunsub(s),s}_sub(s){s.queue?this.sendCommand(`SUB ${s.subject} ${s.queue} ${s.sid}\r
|
|
262
|
+
`):this.sendCommand(`SUB ${s.subject} ${s.sid}\r
|
|
263
|
+
`)}_subunsub(s){return this._sub(s),s.max&&this.unsubscribe(s,s.max),s}unsubscribe(s,a){this.unsub(s,a),(s.max===void 0||s.received>=s.max)&&this.subscriptions.cancel(s)}unsub(s,a){!s||this.isClosed()||(a?this.sendCommand(`UNSUB ${s.sid} ${a}\r
|
|
264
|
+
`):this.sendCommand(`UNSUB ${s.sid}\r
|
|
265
|
+
`),s.max=a)}resub(s,a){!s||this.isClosed()||(this.unsub(s),s.subject=a,this.subscriptions.resub(s),this._sub(s))}flush(s){return s||(s=_t()),this.pongs.push(s),this.outbound.fill(mS),this.flushPending(),s}sendSubscriptions(){const s=[];this.subscriptions.all().forEach(a=>{const o=a;o.queue?s.push(`SUB ${o.subject} ${o.queue} ${o.sid}${Kd}`):s.push(`SUB ${o.subject} ${o.sid}${Kd}`)}),s.length&&this.transport.send(du(s.join("")))}async _close(s){this._closed||(this.whyClosed=new Error("close trace").stack||"",this.heartbeats.cancel(),this.connectError&&(this.connectError(s),this.connectError=void 0),this.muxSubscriptions.close(),this.subscriptions.close(),this.listeners.forEach(a=>{a.stop()}),this._closed=!0,await this.transport.close(s),await this.closed.resolve(s))}close(){return this._close()}isClosed(){return this._closed}drain(){const s=this.subscriptions.all(),a=[];return s.forEach(o=>{a.push(o.drain())}),Promise.all(a).then(async()=>(this.noMorePublishing=!0,await this.flush(),this.close())).catch(()=>{})}flushPending(){if(!(!this.infoReceived||!this.connected)&&this.outbound.size()){const s=this.outbound.drain();this.transport.send(s)}}initMux(){if(!this.subscriptions.getMux()){const a=this.muxSubscriptions.init(this.options.inboxPrefix),o=new xE(this,`${a}*`);o.callback=this.muxSubscriptions.dispatcher(),this.subscriptions.setMux(o),this.subscribe(o)}}selectServer(){const s=this.servers.selectServer();if(s!==void 0)return this.server=s,this.server}getServer(){return this.server}}const P3="$SRV";class pS{constructor(s){w(this,"msg");this.msg=s}get data(){return this.msg.data}get sid(){return this.msg.sid}get subject(){return this.msg.subject}get reply(){return this.msg.reply||""}get headers(){return this.msg.headers}respond(s,a){return this.msg.respond(s,a)}respondError(s,a,o,u){var d,p;return u=u||{},u.headers=u.headers||ar(),(d=u.headers)==null||d.set(ih,`${s}`),(p=u.headers)==null||p.set(rh,a),this.msg.respond(o,u)}json(s){return this.msg.json(s)}string(){return this.msg.string()}}class gu{constructor(s,a="",o=""){w(this,"subject");w(this,"queue");w(this,"srv");a!==""&&I3("service group",a);let u="";if(s instanceof Su)this.srv=s,u="";else if(s instanceof gu){const d=s;this.srv=d.srv,o===""&&d.queue!==""&&(o=d.queue),u=d.subject}else throw new Error("unknown ServiceGroup type");this.subject=this.calcSubject(u,a),this.queue=o}calcSubject(s,a=""){return a===""?s:s!==""?`${s}.${a}`:a}addEndpoint(s="",a){a=a||{subject:s};const o=typeof a=="function"?{handler:a,subject:s}:a;lu("endpoint",s);let{subject:u,handler:d,metadata:p,queue:m}=o;u=u||s,m=m||this.queue,$3("endpoint subject",u),u=this.calcSubject(this.subject,u);const g={name:s,subject:u,queue:m,handler:d,metadata:p};return this.srv._addEndpoint(g)}addGroup(s="",a=""){return new gu(this,s,a)}}function $3(i,s){if(s==="")throw new Error(`${i} cannot be empty`);if(s.indexOf(" ")!==-1)throw new Error(`${i} cannot contain spaces: '${s}'`);const a=s.split(".");a.forEach((o,u)=>{if(o===">"&&u!==a.length-1)throw new Error(`${i} cannot have internal '>': '${s}'`)})}function I3(i,s){if(s.indexOf(" ")!==-1)throw new Error(`${i} cannot contain spaces: '${s}'`);s.split(".").forEach(o=>{if(o===">")throw new Error(`${i} name cannot contain internal '>': '${s}'`)})}class Su{constructor(s,a={name:"",version:""}){w(this,"nc");w(this,"_id");w(this,"config");w(this,"handlers");w(this,"internal");w(this,"_stopped");w(this,"_done");w(this,"started");this.nc=s,this.config=Object.assign({},a),this.config.queue||(this.config.queue="q"),lu("name",this.config.name),lu("queue",this.config.queue),Qi(this.config.version),this._id=ri.next(),this.internal=[],this._done=_t(),this._stopped=!1,this.handlers=[],this.started=new Date().toISOString(),this.reset(),this.nc.closed().then(()=>{this.close().catch()}).catch(o=>{this.close(o).catch()})}static controlSubject(s,a="",o="",u){const d=u??P3;return a===""&&o===""?`${d}.${s}`:(lu("control subject name",a),o!==""?(lu("control subject id",o),`${d}.${s}.${a}.${o}`):`${d}.${s}.${a}`)}get subjects(){return this.handlers.filter(s=>s.internal===!1).map(s=>s.subject)}get id(){return this._id}get name(){return this.config.name}get description(){return this.config.description??""}get version(){return this.config.version}get metadata(){return this.config.metadata}errorToHeader(s){const a=ar();if(s instanceof oh){const o=s;a.set(rh,o.message),a.set(ih,`${o.code}`)}else a.set(rh,s.message),a.set(ih,"500");return a}setupHandler(s,a=!1){const o=a?"":s.queue?s.queue:this.config.queue,{name:u,subject:d,handler:p}=s,m=s;m.internal=a,a&&this.internal.push(m),m.stats=new F3(u,d,o),m.queue=o;const g=p?(v,_)=>{if(v){this.close(v);return}const S=Date.now();try{p(v,new pS(_))}catch(D){m.stats.countError(D),_==null||_.respond(es,{headers:this.errorToHeader(D)})}finally{m.stats.countLatency(S)}}:void 0;return m.sub=this.nc.subscribe(d,{callback:g,queue:o}),m.sub.closed.then(()=>{this._stopped||this.close(new Error(`required subscription ${s.subject} stopped`)).catch()}).catch(v=>{if(!this._stopped){const _=new Error(`required subscription ${s.subject} errored: ${v.message}`);_.stack=v.stack,this.close(_).catch()}}),m}info(){return{type:hu.INFO,name:this.name,id:this.id,version:this.version,description:this.description,metadata:this.metadata,endpoints:this.endpoints()}}endpoints(){return this.handlers.map(s=>{const{subject:a,metadata:o,name:u,queue:d}=s;return{subject:a,metadata:o,name:u,queue_group:d}})}async stats(){const s=[];for(const a of this.handlers){if(typeof this.config.statsHandler=="function")try{a.stats.data=await this.config.statsHandler(a)}catch(o){a.stats.countError(o)}s.push(a.stats.stats(a.qi))}return{type:hu.STATS,name:this.name,id:this.id,version:this.version,started:this.started,metadata:this.metadata,endpoints:s}}addInternalHandler(s,a){const o=`${s}`.toUpperCase();this._doAddInternalHandler(`${o}-all`,s,a),this._doAddInternalHandler(`${o}-kind`,s,a,this.name),this._doAddInternalHandler(`${o}`,s,a,this.name,this.id)}_doAddInternalHandler(s,a,o,u="",d=""){const p={};p.name=s,p.subject=Su.controlSubject(a,u,d),p.handler=o,this.setupHandler(p,!0)}start(){const s=ks(),a=(p,m)=>p?(this.close(p),Promise.reject(p)):this.stats().then(g=>(m==null||m.respond(s.encode(g)),Promise.resolve())),o=(p,m)=>p?(this.close(p),Promise.reject(p)):(m==null||m.respond(s.encode(this.info())),Promise.resolve()),u=s.encode(this.ping()),d=(p,m)=>p?(this.close(p).then().catch(),Promise.reject(p)):(m.respond(u),Promise.resolve());return this.addInternalHandler(ti.PING,d),this.addInternalHandler(ti.STATS,a),this.addInternalHandler(ti.INFO,o),this.handlers.forEach(p=>{const{subject:m}=p;typeof m=="string"&&p.handler!==null&&this.setupHandler(p)}),Promise.resolve(this)}close(s){if(this._stopped)return this._done;this._stopped=!0;let a=[];return this.nc.isClosed()||(a=this.handlers.concat(this.internal).map(o=>o.sub.drain())),Promise.allSettled(a).then(()=>{this._done.resolve(s||null)}),this._done}get stopped(){return this._done}get isStopped(){return this._stopped}stop(s){return this.close(s)}ping(){return{type:hu.PING,name:this.name,id:this.id,version:this.version,metadata:this.metadata}}reset(){if(this.started=new Date().toISOString(),this.handlers)for(const s of this.handlers)s.stats.reset(s.qi)}addGroup(s,a){return new gu(this,s,a)}addEndpoint(s,a){return new gu(this).addEndpoint(s,a)}_addEndpoint(s){const a=new sn;a.noIterator=typeof s.handler=="function",a.noIterator||(s.handler=(u,d)=>{u?this.stop(u).catch():a.push(new pS(d))},a.iterClosed.then(()=>{this.close().catch()}));const o=this.setupHandler(s,!1);return o.qi=a,this.handlers.push(o),a}}class F3{constructor(s,a,o=""){w(this,"name");w(this,"subject");w(this,"average_processing_time");w(this,"num_requests");w(this,"processing_time");w(this,"num_errors");w(this,"last_error");w(this,"data");w(this,"metadata");w(this,"queue");this.name=s,this.subject=a,this.average_processing_time=0,this.num_errors=0,this.num_requests=0,this.processing_time=0,this.queue=o}reset(s){this.num_requests=0,this.processing_time=0,this.average_processing_time=0,this.num_errors=0,this.last_error=void 0,this.data=void 0;const a=s;a&&(a.time=0,a.processed=0)}countLatency(s){this.num_requests++,this.processing_time+=Et(Date.now()-s),this.average_processing_time=Math.round(this.processing_time/this.num_requests)}countError(s){this.num_errors++,this.last_error=s.message}_stats(){const{name:s,subject:a,average_processing_time:o,num_errors:u,num_requests:d,processing_time:p,last_error:m,data:g,queue:v}=this;return{name:s,subject:a,average_processing_time:o,num_errors:u,num_requests:d,processing_time:p,last_error:m,data:g,queue_group:v}}stats(s){const a=s;return(a==null?void 0:a.noIterator)===!1&&(this.processing_time=Et(a.time),this.num_requests=a.processed,this.average_processing_time=this.processing_time>0&&this.num_requests>0?this.processing_time/this.num_requests:0),this._stats()}}class Y3{constructor(s,a={strategy:Ms.JitterTimer,maxWait:2e3},o){w(this,"nc");w(this,"prefix");w(this,"opts");this.nc=s,this.prefix=o,this.opts=a}ping(s="",a=""){return this.q(ti.PING,s,a)}stats(s="",a=""){return this.q(ti.STATS,s,a)}info(s="",a=""){return this.q(ti.INFO,s,a)}async q(s,a="",o=""){const u=new sn,d=ks(),p=Su.controlSubject(s,a,o,this.prefix),m=await this.nc.requestMany(p,es,this.opts);return(async()=>{for await(const g of m)try{const v=d.decode(g.data);u.push(v)}catch(v){u.push(()=>{u.stop(v)})}u.push(()=>{u.stop()})})().catch(g=>{u.stop(g)}),u}}function NE(){return{key:{encode(i){return i},decode(i){return i}},value:{encode(i){return i},decode(i){return i}}}}function G3(){return{replicas:1,history:1,timeout:2e3,max_bytes:-1,maxValueSize:-1,codec:NE(),storage:R0.File}}const dh="KV-Operation",bS="$KV",J3=/^[-/=.\w]+$/,X3=/^[-/=.>*\w]+$/,Q3=/^[-\w]+$/;function Z3(i){if(i.startsWith(".")||i.endsWith(".")||!J3.test(i))throw new Error(`invalid key: ${i}`)}function K3(i){if(i.startsWith(".")||i.endsWith(".")||!X3.test(i))throw new Error(`invalid key: ${i}`)}function W3(i){if(i.startsWith(".")||i.endsWith("."))throw new Error(`invalid key: ${i}`);const s=i.split(".");let a=!1;for(let o=0;o<s.length;o++)switch(s[o]){case"*":a=!0;break;case">":if(o!==s.length-1)throw new Error(`invalid key: ${i}`);a=!0;break}return a}function Wd(i){if(!Q3.test(i))throw new Error(`invalid bucket name: ${i}`)}var ga;(function(i){i.MsgIdHdr="Nats-Msg-Id",i.ExpectedStreamHdr="Nats-Expected-Stream",i.ExpectedLastSeqHdr="Nats-Expected-Last-Sequence",i.ExpectedLastMsgIdHdr="Nats-Expected-Last-Msg-Id",i.ExpectedLastSubjectSequenceHdr="Nats-Expected-Last-Subject-Sequence"})(ga||(ga={}));class vu{constructor(s,a,o){w(this,"js");w(this,"jsm");w(this,"stream");w(this,"bucket");w(this,"direct");w(this,"codec");w(this,"prefix");w(this,"editPrefix");w(this,"useJsPrefix");w(this,"_prefixLen");w(this,"validateKey",Z3);w(this,"validateSearchKey",K3);w(this,"hasWildcards",W3);Wd(s),this.js=a,this.jsm=o,this.bucket=s,this.prefix=bS,this.editPrefix="",this.useJsPrefix=!1,this._prefixLen=0}static async create(s,a,o={}){Wd(a);const u=await s.jetstreamManager(),d=new vu(a,s,u);return await d.init(o),d}static async bind(s,a,o={}){const u=await s.jetstreamManager(),d={config:{allow_direct:o.allow_direct}};Wd(a);const p=new vu(a,s,u);return d.config.name=o.streamName??p.bucketName(),Object.assign(p,d),p.stream=d.config.name,p.codec=o.codec||NE(),p.direct=d.config.allow_direct??!1,p.initializePrefixes(d),p}async init(s={}){const a=Object.assign(G3(),s);this.codec=a.codec;const o={};this.stream=o.name=s.streamName??this.bucketName(),o.retention=O0.Limits,o.max_msgs_per_subject=a.history,a.maxBucketSize&&(a.max_bytes=a.maxBucketSize),a.max_bytes&&(o.max_bytes=a.max_bytes),o.max_msg_size=a.maxValueSize,o.storage=a.storage;const u=s.placementCluster??"";if(u&&(s.placement={},s.placement.cluster=u,s.placement.tags=[]),s.placement&&(o.placement=s.placement),s.republish&&(o.republish=s.republish),s.description&&(o.description=s.description),s.mirror){const S=Object.assign({},s.mirror);S.name.startsWith(Zn)||(S.name=`${Zn}${S.name}`),o.mirror=S,o.mirror_direct=!0}else if(s.sources){const S=s.sources.map(D=>{const B=Object.assign({},D),j=B.name.startsWith(Zn)?B.name.substring(Zn.length):B.name;return B.name.startsWith(Zn)||(B.name=`${Zn}${B.name}`),!D.external&&j!==this.bucket&&(B.subject_transforms=[{src:`$KV.${j}.>`,dest:`$KV.${this.bucket}.>`}]),B});o.sources=S,o.subjects=[this.subjectForBucket()]}else o.subjects=[this.subjectForBucket()];s.metadata&&(o.metadata=s.metadata),typeof s.compression=="boolean"&&(o.compression=s.compression?ii.S2:ii.None);const d=this.js.nc,p=d.getServerVersion(),m=p?M0(p,Qi("2.7.2"))>=0:!1;o.discard=m?yu.New:yu.Old;const{ok:g,min:v}=d.features.get(tt.JS_ALLOW_DIRECT);if(!g&&s.allow_direct===!0){const S=p?`${p.major}.${p.minor}.${p.micro}`:"unknown";return Promise.reject(new Error(`allow_direct is not available on server version ${S} - requires ${v}`))}s.allow_direct=typeof s.allow_direct=="boolean"?s.allow_direct:g,o.allow_direct=s.allow_direct,this.direct=o.allow_direct,o.num_replicas=a.replicas,a.ttl&&(o.max_age=Et(a.ttl)),o.allow_rollup_hdrs=!0;let _;try{_=await this.jsm.streams.info(o.name),!_.config.allow_direct&&this.direct===!0&&(this.direct=!1)}catch(S){if(S.message==="stream not found")_=await this.jsm.streams.add(o);else throw S}this.initializePrefixes(_)}initializePrefixes(s){this._prefixLen=0,this.prefix=`$KV.${this.bucket}`,this.useJsPrefix=this.js.apiPrefix!=="$JS.API";const{mirror:a}=s.config;if(a){let o=a.name;if(o.startsWith(Zn)&&(o=o.substring(Zn.length)),a.external&&a.external.api!==""){const u=a.name.substring(Zn.length);this.useJsPrefix=!1,this.prefix=`$KV.${u}`,this.editPrefix=`${a.external.api}.$KV.${o}`}else this.editPrefix=this.prefix}}bucketName(){return this.stream??`${Zn}${this.bucket}`}subjectForBucket(){return`${this.prefix}.${this.bucket}.>`}subjectForKey(s,a=!1){const o=[];return a?(this.useJsPrefix&&o.push(this.js.apiPrefix),this.editPrefix!==""?o.push(this.editPrefix):o.push(this.prefix)):this.prefix&&o.push(this.prefix),o.push(s),o.join(".")}fullKeyName(s){return this.prefix!==""?`${this.prefix}.${s}`:`${bS}.${this.bucket}.${s}`}get prefixLen(){return this._prefixLen===0&&(this._prefixLen=this.prefix.length+1),this._prefixLen}encodeKey(s){const a=[];for(const o of s.split("."))switch(o){case">":case"*":a.push(o);break;default:a.push(this.codec.key.encode(o));break}return a.join(".")}decodeKey(s){const a=[];for(const o of s.split("."))switch(o){case">":case"*":a.push(o);break;default:a.push(this.codec.key.decode(o));break}return a.join(".")}close(){return Promise.resolve()}dataLen(s,a){const o=a&&a.get(Dn.MessageSizeHdr)||"";return o!==""?parseInt(o,10):s.length}smToEntry(s){return new mO(this.bucket,this.prefixLen,s)}jmToEntry(s){const a=this.decodeKey(s.subject.substring(this.prefixLen));return new pO(this.bucket,a,s)}async create(s,a){var d;let o;try{const p=await this.put(s,a,{previousSeq:0});return Promise.resolve(p)}catch(p){if(o=p,((d=p==null?void 0:p.api_error)==null?void 0:d.err_code)!==10071)return Promise.reject(p)}let u=0;try{const p=await this.get(s);return(p==null?void 0:p.operation)==="DEL"||(p==null?void 0:p.operation)==="PURGE"?(u=p!==null?p.revision:0,this.update(s,a,u)):Promise.reject(o)}catch(p){return Promise.reject(p)}}update(s,a,o){if(o<=0)throw new Error("version must be greater than 0");return this.put(s,a,{previousSeq:o})}async put(s,a,o={}){var p,m;const u=this.encodeKey(s);this.validateKey(u);const d={};if(o.previousSeq!==void 0){const g=ar();d.headers=g,g.set(ga.ExpectedLastSubjectSequenceHdr,`${o.previousSeq}`)}try{return(await this.js.publish(this.subjectForKey(u,!0),a,d)).seq}catch(g){const v=g;return v.isJetStreamError()?(v.message=(p=v.api_error)==null?void 0:p.description,v.code=`${(m=v.api_error)==null?void 0:m.code}`,Promise.reject(v)):Promise.reject(g)}}async get(s,a){const o=this.encodeKey(s);this.validateKey(o);let u={last_by_subj:this.subjectForKey(o)};a&&a.revision>0&&(u={seq:a.revision});let d;try{this.direct?d=await this.jsm.direct.getMessage(this.bucketName(),u):d=await this.jsm.streams.getMessage(this.bucketName(),u);const p=this.smToEntry(d);return p.key!==o?null:p}catch(p){if(p.code===ue.JetStream404NoMessages)return null;throw p}}purge(s,a){return this._deleteOrPurge(s,"PURGE",a)}delete(s,a){return this._deleteOrPurge(s,"DEL",a)}async purgeDeletes(s=1800*1e3){const a=_t(),o=[],u=await this.watch({key:">",initializedFn:()=>{a.resolve()}});(async()=>{for await(const g of u)(g.operation==="DEL"||g.operation==="PURGE")&&o.push(g)})().then(),await a,u.stop();const d=Date.now()-s,p=o.map(g=>{const v=this.subjectForKey(g.key);return g.created.getTime()>=d?this.jsm.streams.purge(this.stream,{filter:v,keep:1}):this.jsm.streams.purge(this.stream,{filter:v,keep:0})}),m=await Promise.all(p);return m.unshift({success:!0,purged:0}),m.reduce((g,v)=>(g.purged+=v.purged,g))}async _deleteOrPurge(s,a,o){if(!this.hasWildcards(s))return this._doDeleteOrPurge(s,a,o);const u=await this.keys(s),d=[];for await(const p of u)d.push(this._doDeleteOrPurge(p,a)),d.length===100&&(await Promise.all(d),d.length=0);d.length>0&&await Promise.all(d)}async _doDeleteOrPurge(s,a,o){const u=this.encodeKey(s);this.validateKey(u);const d=ar();d.set(dh,a),a==="PURGE"&&d.set(Dn.RollupHdr,Dn.RollupValueSubject),o!=null&&o.previousSeq&&d.set(ga.ExpectedLastSubjectSequenceHdr,`${o.previousSeq}`),await this.js.publish(this.subjectForKey(u,!0),es,{headers:d})}_buildCC(s,a,o={}){let d=(Array.isArray(s)?s:[s]).map(g=>{const v=this.encodeKey(g);return this.validateSearchKey(g),this.fullKeyName(v)}),p=Vt.LastPerSubject;a===Rs.AllHistory&&(p=Vt.All),a===Rs.UpdatesOnly&&(p=Vt.New);let m;return d.length===1&&(m=d[0],d=void 0),Object.assign({deliver_policy:p,ack_policy:nn.None,filter_subjects:d,filter_subject:m,flow_control:!0,idle_heartbeat:Et(5*1e3)},o)}remove(s){return this.purge(s)}async history(s={}){const a=s.key??">",o=new sn,u={};u.headers_only=s.headers_only||!1;let d;d=()=>{o.stop()};let p=0;const m=this._buildCC(a,Rs.AllHistory,u),g=m.filter_subject,v=si(m);v.bindStream(this.stream),v.orderedConsumer(),v.callback((S,D)=>{if(S){o.stop(S);return}if(D){const B=this.jmToEntry(D);o.push(B),o.received++,(d&&p>0&&o.received>=p||D.info.pending===0)&&(o.push(d),d=void 0)}});const _=await this.js.subscribe(g,v);if(d){const{info:{last:S}}=_,D=S.num_pending+S.delivered.consumer_seq;if(D===0||o.received>=D)try{d()}catch(B){o.stop(B)}finally{d=void 0}else p=D}return o._data=_,o.iterClosed.then(()=>{_.unsubscribe()}),_.closed.then(()=>{o.stop()}).catch(S=>{o.stop(S)}),o}canSetWatcherName(){const a=this.js.nc,{ok:o}=a.features.get(tt.JS_NEW_CONSUMER_CREATE_API);return o}async watch(s={}){const a=s.key??">",o=new sn,u={};u.headers_only=s.headers_only||!1;let d=Rs.LastValue;s.include===Rs.AllHistory?d=Rs.AllHistory:s.include===Rs.UpdatesOnly&&(d=Rs.UpdatesOnly);const p=s.ignoreDeletes===!0;let m=s.initializedFn,g=0;const v=this._buildCC(a,d,u),_=v.filter_subject,S=si(v);this.canSetWatcherName()&&S.consumerName(ri.next()),S.bindStream(this.stream),s.resumeFromRevision&&s.resumeFromRevision>0&&S.startSequence(s.resumeFromRevision),S.orderedConsumer(),S.callback((B,j)=>{if(B){o.stop(B);return}if(j){const F=this.jmToEntry(j);if(p&&F.operation==="DEL")return;o.push(F),o.received++,m&&(g>0&&o.received>=g||j.info.pending===0)&&(o.push(m),m=void 0)}});const D=await this.js.subscribe(_,S);if(m){const{info:{last:B}}=D,j=B.num_pending+B.delivered.consumer_seq;if(j===0||o.received>=j)try{m()}catch(F){o.stop(F)}finally{m=void 0}else g=j}return o._data=D,o.iterClosed.then(()=>{D.unsubscribe()}),D.closed.then(()=>{o.stop()}).catch(B=>{o.stop(B)}),o}async keys(s=">"){const a=new sn,o=this._buildCC(s,Rs.LastValue,{headers_only:!0}),u=Array.isArray(s)?">":o.filter_subject,d=si(o);d.bindStream(this.stream),d.orderedConsumer();const p=await this.js.subscribe(u,d);return(async()=>{var g;for await(const v of p){const _=(g=v.headers)==null?void 0:g.get(dh);if(_!=="DEL"&&_!=="PURGE"){const S=this.decodeKey(v.subject.substring(this.prefixLen));a.push(S)}v.info.pending===0&&p.unsubscribe()}})().then(()=>{a.stop()}).catch(g=>{a.stop(g)}),p.info.last.num_pending===0&&p.unsubscribe(),a}purgeBucket(s){return this.jsm.streams.purge(this.bucketName(),s)}destroy(){return this.jsm.streams.delete(this.bucketName())}async status(){var d;const a=((d=this.js.nc.info)==null?void 0:d.cluster)??"",o=this.bucketName(),u=await this.jsm.streams.info(o);return new wE(u,a)}}class wE{constructor(s,a=""){w(this,"si");w(this,"cluster");this.si=s,this.cluster=a}get bucket(){return this.si.config.name.startsWith(Zn)?this.si.config.name.substring(Zn.length):this.si.config.name}get values(){return this.si.state.messages}get history(){return this.si.config.max_msgs_per_subject}get ttl(){return ey(this.si.config.max_age)}get bucket_location(){return this.cluster}get backingStore(){return this.si.config.storage}get storage(){return this.si.config.storage}get replicas(){return this.si.config.num_replicas}get description(){return this.si.config.description??""}get maxBucketSize(){return this.si.config.max_bytes}get maxValueSize(){return this.si.config.max_msg_size}get max_bytes(){return this.si.config.max_bytes}get placement(){return this.si.config.placement||{cluster:"",tags:[]}}get placementCluster(){var s;return((s=this.si.config.placement)==null?void 0:s.cluster)??""}get republish(){return this.si.config.republish??{src:"",dest:""}}get streamInfo(){return this.si}get size(){return this.si.state.bytes}get metadata(){return this.si.config.metadata??{}}get compression(){return this.si.config.compression?this.si.config.compression!==ii.None:!1}}const sy="OBJ_",yS="SHA-256=";function eO(i){return Wd(i),`${sy}${i}`}function tO(i){return i.startsWith(sy)?i.substring(4):i}class z0{constructor(s){w(this,"si");w(this,"backingStore");this.si=s,this.backingStore="JetStream"}get bucket(){return tO(this.si.config.name)}get description(){return this.si.config.description??""}get ttl(){return this.si.config.max_age}get storage(){return this.si.config.storage}get replicas(){return this.si.config.num_replicas}get sealed(){return this.si.config.sealed}get size(){return this.si.state.bytes}get streamInfo(){return this.si}get metadata(){return this.si.config.metadata}get compression(){return this.si.config.compression?this.si.config.compression!==ii.None:!1}}function Fd(i){if(i===void 0)return;const{domain:s}=i;if(s===void 0)return i;const a=Object.assign({},i);if(delete a.domain,s==="")return a;if(a.external)throw new Error("domain and external are both set");return a.external={api:`$JS.${s}.API`},a}var bs;(function(i){i[i.Unset=-1]="Unset",i[i.Consume=0]="Consume",i[i.Fetch=1]="Fetch"})(bs||(bs={}));var va;(function(i){i.HeartbeatsMissed="heartbeats_missed",i.ConsumerNotFound="consumer_not_found",i.StreamNotFound="stream_not_found",i.ConsumerDeleted="consumer_deleted",i.OrderedConsumerRecreated="ordered_consumer_recreated",i.NoResponders="no_responders"})(va||(va={}));var pl;(function(i){i.DebugEvent="debug",i.Discard="discard",i.Reset="reset",i.Next="next"})(pl||(pl={}));const gS=Uint8Array.of(43,65,67,75),nO=Uint8Array.of(45,78,65,75),au=Uint8Array.of(43,87,80,73),sO=Uint8Array.of(43,78,88,84),aO=Uint8Array.of(43,84,69,82,77),rO=Uint8Array.of(32);function xu(i,s=5e3){return new wO(i,s)}class p0 extends sn{constructor(a,o,u=!1){super();w(this,"consumer");w(this,"opts");w(this,"sub");w(this,"monitor");w(this,"pending");w(this,"inbox");w(this,"refilling");w(this,"pong");w(this,"callback");w(this,"timeout");w(this,"cleanupHandler");w(this,"listeners");w(this,"statusIterator");w(this,"forOrderedConsumer");w(this,"resetHandler");w(this,"abortOnMissingResource");w(this,"bind");w(this,"inBackOff");this.consumer=a;const d=o;this.opts=this.parseOptions(o,u),this.callback=d.callback||null,this.noIterator=typeof this.callback=="function",this.monitor=null,this.pong=null,this.pending={msgs:0,bytes:0,requests:0},this.refilling=u,this.timeout=null,this.inbox=sr(a.api.nc.options.inboxPrefix),this.listeners=[],this.forOrderedConsumer=!1,this.abortOnMissingResource=d.abort_on_missing_resource===!0,this.bind=d.bind===!0,this.inBackOff=!1,this.start()}start(){const{max_messages:a,max_bytes:o,idle_heartbeat:u,threshold_bytes:d,threshold_messages:p}=this.opts;this.closed().then(g=>{if(this.cleanupHandler)try{this.cleanupHandler(g)}catch{}});const{sub:m}=this;m&&m.unsubscribe(),this.sub=this.consumer.api.nc.subscribe(this.inbox,{callback:(g,v)=>{var S,D,B,j;if(g){this.stop(g);return}if((S=this.monitor)==null||S.work(),v.subject===this.inbox){if(C0(v))return;const F=(D=v.headers)==null?void 0:D.code,Q=((j=(B=v.headers)==null?void 0:B.description)==null?void 0:j.toLowerCase())||"unknown",{msgsLeft:ee,bytesLeft:te}=this.parseDiscard(v.headers);if(ee>0||te>0)this.pending.msgs-=ee,this.pending.bytes-=te,this.pending.requests--,this.notify(pl.Discard,{msgsLeft:ee,bytesLeft:te});else if(F===400){this.stop(new ge(Q,`${F}`));return}else if(F===409&&Q==="consumer deleted"){if(this.notify(va.ConsumerDeleted,`${F} ${Q}`),!this.refilling||this.abortOnMissingResource){const Se=new ge(Q,`${F}`);this.stop(Se);return}}else if(F===503){if(this.notify(va.NoResponders,`${F} No Responders`),!this.refilling||this.abortOnMissingResource){const Se=new ge("no responders",`${F}`);this.stop(Se);return}}else this.notify(pl.DebugEvent,`${F} ${Q}`)}else this._push(xu(v,this.consumer.api.timeout)),this.received++,this.pending.msgs&&this.pending.msgs--,this.pending.bytes&&(this.pending.bytes-=v.size());if(this.pending.msgs===0&&this.pending.bytes===0&&(this.pending.requests=0),this.refilling){if(a&&this.pending.msgs<=p||o&&this.pending.bytes<=d){const F=this.pullOptions();this.pull(F)}}else this.pending.requests===0&&this._push(()=>{this.stop()})}}),this.sub.closed.then(()=>{this.sub.draining&&this._push(()=>{this.stop()})}),u&&(this.monitor=new ny(u,g=>(this.notify(va.HeartbeatsMissed,g),this.resetPending().then(()=>{}).catch(()=>{}),!1),{maxOut:2})),(async()=>{var v;const g=this.consumer.api.nc.status();this.statusIterator=g;for await(const _ of g)switch(_.type){case nr.Disconnect:(v=this.monitor)==null||v.cancel();break;case nr.Reconnect:this.resetPending().then(S=>{var D;S&&((D=this.monitor)==null||D.restart())}).catch(()=>{});break}})(),this.pull(this.pullOptions())}_push(a){if(!this.callback)super.push(a);else{const o=typeof a=="function"?a:null;try{o?o():this.callback(a)}catch(u){this.stop(u)}}}notify(a,o){this.listeners.length>0&&this.listeners.forEach(u=>{u.done||u.push({type:a,data:o})})}resetPending(){return this.bind?this.resetPendingNoInfo():this.resetPendingWithInfo()}resetPendingNoInfo(){return this.pending.msgs=0,this.pending.bytes=0,this.pending.requests=0,this.pull(this.pullOptions()),Promise.resolve(!0)}async resetPendingWithInfo(){if(this.inBackOff)return!1;let a=0,o=0;const u=W0([this.opts.expires]);let d=0;for(;;){if(this.done)return!1;if(this.consumer.api.nc.isClosed())return console.error("aborting resetPending - connection is closed"),!1;try{return await this.consumer.info(),this.inBackOff=!1,a=0,this.pending.msgs=0,this.pending.bytes=0,this.pending.requests=0,this.pull(this.pullOptions()),!0}catch(p){if(p.message==="stream not found"){if(o++,this.notify(va.StreamNotFound,o),!this.refilling||this.abortOnMissingResource)return this.stop(p),!1}else if(p.message==="consumer not found"){if(a++,this.notify(va.ConsumerNotFound,a),this.resetHandler)try{this.resetHandler()}catch{}if(!this.refilling||this.abortOnMissingResource)return this.stop(p),!1;if(this.forOrderedConsumer)return!1}else a=0,o=0;this.inBackOff=!0;const m=u.backoff(d),g=vl(m);await Promise.race([g,this.consumer.api.nc.closed()]),g.cancel(),d++}}}pull(a){this.pending.bytes+=a.max_bytes??0,this.pending.msgs+=a.batch??0,this.pending.requests++;const o=this.consumer.api.nc;this._push(()=>{o.publish(`${this.consumer.api.prefix}.CONSUMER.MSG.NEXT.${this.consumer.stream}.${this.consumer.name}`,this.consumer.api.jc.encode(a),{reply:this.inbox}),this.notify(pl.Next,a)})}pullOptions(){const a=this.opts.max_messages-this.pending.msgs,o=this.opts.max_bytes-this.pending.bytes,u=Et(this.opts.idle_heartbeat),d=Et(this.opts.expires);return{batch:a,max_bytes:o,idle_heartbeat:u,expires:d}}parseDiscard(a){const o={msgsLeft:0,bytesLeft:0},u=a==null?void 0:a.get(Dn.PendingMessagesHdr);u&&(o.msgsLeft=parseInt(u));const d=a==null?void 0:a.get(Dn.PendingBytesHdr);return d&&(o.bytesLeft=parseInt(d)),o}trackTimeout(a){this.timeout=a}close(){return this.stop(),this.iterClosed}closed(){return this.iterClosed}clearTimers(){var a,o;(a=this.monitor)==null||a.cancel(),this.monitor=null,(o=this.timeout)==null||o.cancel(),this.timeout=null}setCleanupHandler(a){this.cleanupHandler=a}stop(a){var o,u;this.done||((o=this.sub)==null||o.unsubscribe(),this.clearTimers(),(u=this.statusIterator)==null||u.stop(),this._push(()=>{super.stop(a),this.listeners.forEach(d=>{d.stop()})}))}parseOptions(a,o=!1){const u=a||{};if(u.max_messages=u.max_messages||0,u.max_bytes=u.max_bytes||0,u.max_messages!==0&&u.max_bytes!==0)throw new Error("only specify one of max_messages or max_bytes");if(u.max_messages===0&&(u.max_messages=100),u.expires=u.expires||3e4,u.expires<1e3)throw new Error("expires should be at least 1000ms");if(u.idle_heartbeat=u.idle_heartbeat||u.expires/2,u.idle_heartbeat=u.idle_heartbeat>3e4?3e4:u.idle_heartbeat,o){const d=Math.round(u.max_messages*.75)||1;u.threshold_messages=u.threshold_messages||d;const p=Math.round(u.max_bytes*.75)||1;u.threshold_bytes=u.threshold_bytes||p}return u}status(){const a=new sn;return this.listeners.push(a),Promise.resolve(a)}}class iO extends sn{constructor(){super();w(this,"src");w(this,"listeners");this.listeners=[]}setSource(a){this.src&&(this.src.resetHandler=void 0,this.src.setCleanupHandler(),this.src.stop()),this.src=a,this.src.setCleanupHandler(o=>{this.stop(o||void 0)}),(async()=>{const o=await this.src.status();for await(const u of o)this.notify(u.type,u.data)})().catch(()=>{})}notify(a,o){this.listeners.length>0&&this.listeners.forEach(u=>{u.done||u.push({type:a,data:o})})}stop(a){var o;this.done||((o=this.src)==null||o.stop(a),super.stop(a),this.listeners.forEach(u=>{u.stop()}))}close(){return this.stop(),this.iterClosed}closed(){return this.iterClosed}status(){const a=new sn;return this.listeners.push(a),Promise.resolve(a)}}class B0{constructor(s,a){w(this,"api");w(this,"_info");w(this,"stream");w(this,"name");this.api=s,this._info=a,this.stream=a.stream_name,this.name=a.name}consume(s={max_messages:100,expires:3e4}){return Promise.resolve(new p0(this,s,!0))}fetch(s={max_messages:100,expires:3e4}){const a=new p0(this,s,!1),o=Math.round(a.opts.expires*1.05),u=bl(o);return a.closed().catch(()=>{}).finally(()=>{u.cancel()}),u.catch(()=>{a.close().catch()}),a.trackTimeout(u),Promise.resolve(a)}next(s={expires:3e4}){const a=_t(),o=s;o.max_messages=1;const u=new p0(this,o,!1),d=Math.round(u.opts.expires*1.05);d>=6e4&&(async()=>{for await(const m of await u.status())if(m.type===va.HeartbeatsMissed&&m.data>=2){a.reject(new Error("consumer missed heartbeats"));break}})().catch(),(async()=>{for await(const m of u){a.resolve(m);break}})().catch(()=>{});const p=bl(d);return u.closed().then(m=>{m?a.reject(m):a.resolve(null)}).catch(m=>{a.reject(m)}).finally(()=>{p.cancel()}),p.catch(m=>{a.resolve(null),u.close().catch()}),u.trackTimeout(p),a}delete(){const{stream_name:s,name:a}=this._info;return this.api.delete(s,a)}info(s=!1){if(s)return Promise.resolve(this._info);const{stream_name:a,name:o}=this._info;return this.api.info(a,o).then(u=>(this._info=u,this._info))}}class oO{constructor(s,a,o={}){w(this,"api");w(this,"consumerOpts");w(this,"consumer");w(this,"opts");w(this,"cursor");w(this,"stream");w(this,"namePrefix");w(this,"serial");w(this,"currentConsumer");w(this,"userCallback");w(this,"iter");w(this,"type");w(this,"startSeq");w(this,"maxInitialReset");this.api=s,this.stream=a,this.cursor={stream_seq:1,deliver_seq:0},this.namePrefix=ri.next(),typeof o.name_prefix=="string"&&(yh("name_prefix",o.name_prefix),this.namePrefix=o.name_prefix+this.namePrefix),this.serial=0,this.currentConsumer=null,this.userCallback=null,this.iter=null,this.type=bs.Unset,this.consumerOpts=o,this.maxInitialReset=30,this.startSeq=this.consumerOpts.opt_start_seq||0,this.cursor.stream_seq=this.startSeq>0?this.startSeq-1:0}getConsumerOpts(s){this.serial++;const a=`${this.namePrefix}_${this.serial}`;s=s===0?1:s;const o={name:a,deliver_policy:Vt.StartSequence,opt_start_seq:s,ack_policy:nn.None,inactive_threshold:Et(300*1e3),num_replicas:1};return this.consumerOpts.headers_only===!0&&(o.headers_only=!0),Array.isArray(this.consumerOpts.filterSubjects)&&(o.filter_subjects=this.consumerOpts.filterSubjects),typeof this.consumerOpts.filterSubjects=="string"&&(o.filter_subject=this.consumerOpts.filterSubjects),this.consumerOpts.replay_policy&&(o.replay_policy=this.consumerOpts.replay_policy),s===this.startSeq+1&&(o.deliver_policy=this.consumerOpts.deliver_policy||Vt.StartSequence,(this.consumerOpts.deliver_policy===Vt.LastPerSubject||this.consumerOpts.deliver_policy===Vt.New||this.consumerOpts.deliver_policy===Vt.Last)&&(delete o.opt_start_seq,o.deliver_policy=this.consumerOpts.deliver_policy),o.deliver_policy===Vt.LastPerSubject&&typeof o.filter_subjects>"u"&&typeof o.filter_subject>"u"&&(o.filter_subject=">"),this.consumerOpts.opt_start_time&&(delete o.opt_start_seq,o.deliver_policy=Vt.StartTime,o.opt_start_time=this.consumerOpts.opt_start_time),this.consumerOpts.inactive_threshold&&(o.inactive_threshold=Et(this.consumerOpts.inactive_threshold))),o}async resetConsumer(s=0){var p,m,g,v,_;ri.next();const a=this.serial===0;(p=this.consumer)==null||p.delete().catch(()=>{}),s=s===0?1:s,this.cursor.deliver_seq=0;const o=this.getConsumerOpts(s);o.max_deliver=1,o.mem_storage=!0;const u=W0([((m=this.opts)==null?void 0:m.expires)||3e4]);let d;for(let S=0;;S++)try{d=await this.api.add(this.stream,o),(g=this.iter)==null||g.notify(va.OrderedConsumerRecreated,d.name);break}catch(D){if(D.message==="stream not found"&&((v=this.iter)==null||v.notify(va.StreamNotFound,S),this.type===bs.Fetch||this.opts.abort_on_missing_resource===!0))return(_=this.iter)==null||_.stop(D),Promise.reject(D);if(a&&S>=this.maxInitialReset)throw D;await vl(u.backoff(S+1))}return d}internalHandler(s){return a=>{var u;if(this.serial!==s)return;const o=a.info.deliverySequence;if(o!==this.cursor.deliver_seq+1){this.notifyOrderedResetAndReset();return}this.cursor.deliver_seq=o,this.cursor.stream_seq=a.info.streamSequence,this.userCallback?this.userCallback(a):(u=this.iter)==null||u.push(a)}}async reset(s={max_messages:100,expires:3e4},a){var g,v;a=a||{};const o=a.fromFetch||!1,u=a.orderedReset||!1;if(this.type===bs.Fetch&&u){(g=this.iter)==null||g.src.stop(),await((v=this.iter)==null?void 0:v.closed()),this.currentConsumer=null;return}(this.currentConsumer===null||u)&&(this.currentConsumer=await this.resetConsumer(this.cursor.stream_seq+1)),(this.iter===null||o)&&(this.iter=new iO),this.consumer=new B0(this.api,this.currentConsumer);const d=s;d.callback=this.internalHandler(this.serial);let p=null;this.type===bs.Fetch&&o?p=await this.consumer.fetch(s):this.type===bs.Consume&&(p=await this.consumer.consume(s));const m=p;m.forOrderedConsumer=!0,m.resetHandler=()=>{this.notifyOrderedResetAndReset()},this.iter.setSource(m)}notifyOrderedResetAndReset(){var s;(s=this.iter)==null||s.notify(pl.Reset,""),this.reset(this.opts,{orderedReset:!0})}async consume(s={max_messages:100,expires:3e4}){if(s.bind)return Promise.reject(new Error("bind is not supported"));if(this.type===bs.Fetch)return Promise.reject(new Error("ordered consumer initialized as fetch"));if(this.type===bs.Consume)return Promise.reject(new Error("ordered consumer doesn't support concurrent consume"));const{callback:o}=s;return o&&(this.userCallback=o),this.type=bs.Consume,this.opts=s,await this.reset(s),this.iter}async fetch(s={max_messages:100,expires:3e4}){var u;if(s.bind)return Promise.reject(new Error("bind is not supported"));if(this.type===bs.Consume)return Promise.reject(new Error("ordered consumer already initialized as consume"));if(((u=this.iter)==null?void 0:u.done)===!1)return Promise.reject(new Error("ordered consumer doesn't support concurrent fetch"));const{callback:o}=s;return o&&(this.userCallback=o),this.type=bs.Fetch,this.opts=s,await this.reset(s,{fromFetch:!0}),this.iter}async next(s={expires:3e4}){const a=s;if(a.bind)return Promise.reject(new Error("bind is not supported"));a.max_messages=1;const o=_t();return a.callback=d=>{this.userCallback=null,o.resolve(d)},(await this.fetch(a)).iterClosed.then(d=>{d&&o.reject(d),o.resolve(null)}).catch(d=>{o.reject(d)}),o}delete(){return this.currentConsumer?this.api.delete(this.stream,this.currentConsumer.name).then(s=>Promise.resolve(s)).catch(s=>Promise.reject(s)).finally(()=>{this.currentConsumer=null}):Promise.resolve(!1)}async info(s){return this.currentConsumer==null?(this.currentConsumer=await this.resetConsumer(this.startSeq),Promise.resolve(this.currentConsumer)):s&&this.currentConsumer?Promise.resolve(this.currentConsumer):this.api.info(this.stream,this.currentConsumer.name)}}class q0{constructor(s){w(this,"api");w(this,"notified");this.api=s,this.notified=!1}checkVersion(){const s=this.api.nc.features.get(tt.JS_SIMPLIFICATION);return s.ok?Promise.resolve():Promise.reject(new Error(`consumers framework is only supported on servers ${s.min} or better`))}getPullConsumerFor(s){if(s.config.deliver_subject!==void 0)throw new Error("push consumer not supported");return new B0(this.api,s)}async get(s,a={}){return typeof a=="object"?this.ordered(s,a):(await this.checkVersion(),this.api.info(s,a).then(o=>o.config.deliver_subject!==void 0?Promise.reject(new Error("push consumer not supported")):new B0(this.api,o)).catch(o=>Promise.reject(o)))}async ordered(s,a){await this.checkVersion();const o=this.api;return new ay(o.nc,o.opts).info(s).then(d=>Promise.resolve(new oO(this.api,s,a))).catch(d=>Promise.reject(d))}}class vh{constructor(s,a){w(this,"api");w(this,"_info");this.api=s,this._info=a}get name(){return this._info.config.name}alternates(){return this.info().then(s=>s.alternates?s.alternates:[])}async best(){if(await this.info(),this._info.alternates){const s=await this.api.info(this._info.alternates[0].name);return new vh(this.api,s)}else return this}info(s=!1,a){return s?Promise.resolve(this._info):this.api.info(this.name,a).then(o=>(this._info=o,this._info))}getConsumerFromInfo(s){return new q0(new ch(this.api.nc,this.api.opts)).getPullConsumerFor(s)}getConsumer(s){return new q0(new ch(this.api.nc,this.api.opts)).get(this.name,s)}getMessage(s){return this.api.getMessage(this.name,s)}deleteMessage(s,a){return this.api.deleteMessage(this.name,s,a)}}class ay extends wu{constructor(s,a){super(s,a)}checkStreamConfigVersions(s){const a=this.nc;if(s.metadata){const{min:u,ok:d}=a.features.get(tt.JS_STREAM_CONSUMER_METADATA);if(!d)throw new Error(`stream 'metadata' requires server ${u}`)}if(s.first_seq){const{min:u,ok:d}=a.features.get(tt.JS_STREAM_FIRST_SEQ);if(!d)throw new Error(`stream 'first_seq' requires server ${u}`)}if(s.subject_transform){const{min:u,ok:d}=a.features.get(tt.JS_STREAM_SUBJECT_TRANSFORM);if(!d)throw new Error(`stream 'subject_transform' requires server ${u}`)}if(s.compression){const{min:u,ok:d}=a.features.get(tt.JS_STREAM_COMPRESSION);if(!d)throw new Error(`stream 'compression' requires server ${u}`)}if(s.consumer_limits){const{min:u,ok:d}=a.features.get(tt.JS_DEFAULT_CONSUMER_LIMITS);if(!d)throw new Error(`stream 'consumer_limits' requires server ${u}`)}function o(u,d){var m;if((((m=d==null?void 0:d.subject_transforms)==null?void 0:m.length)||0)>0){const{min:g,ok:v}=a.features.get(tt.JS_STREAM_SOURCE_SUBJECT_TRANSFORM);if(!v)throw new Error(`${u} 'subject_transforms' requires server ${g}`)}}s.sources&&s.sources.forEach(u=>{o("stream sources",u)}),s.mirror&&o("stream mirror",s.mirror)}async add(s={}){var u;this.checkStreamConfigVersions(s),_n(s.name),s.mirror=Fd(s.mirror),s.sources=(u=s.sources)==null?void 0:u.map(Fd);const o=await this._request(`${this.prefix}.STREAM.CREATE.${s.name}`,s);return this._fixInfo(o),o}async delete(s){return _n(s),(await this._request(`${this.prefix}.STREAM.DELETE.${s}`)).success}async update(s,a={}){var m;if(typeof s=="object"){const g=s;s=g.name,a=g,console.trace("\x1B[33m >> streams.update(config: StreamConfig) api changed to streams.update(name: string, config: StreamUpdateConfig) - this shim will be removed - update your code. \x1B[0m")}this.checkStreamConfigVersions(a),_n(s);const o=await this.info(s),u=Object.assign(o.config,a);u.mirror=Fd(u.mirror),u.sources=(m=u.sources)==null?void 0:m.map(Fd);const p=await this._request(`${this.prefix}.STREAM.UPDATE.${s}`,u);return this._fixInfo(p),p}async info(s,a){_n(s);const o=`${this.prefix}.STREAM.INFO.${s}`;let d=await this._request(o,a),{total:p,limit:m}=d,g=d.state.subjects?Object.getOwnPropertyNames(d.state.subjects).length:1;if(p&&p>g){const v=[d],_=a||{};let S=0;for(;p>g;){S++,_.offset=m*S;const B=await this._request(o,_);p=B.total,v.push(B);const j=Object.getOwnPropertyNames(B.state.subjects).length;if(g+=j,j<m)break}let D={};for(let B=0;B<v.length;B++)d=v[B],d.state.subjects&&(D=Object.assign(D,d.state.subjects));d.offset=0,d.total=0,d.limit=0,d.state.subjects=D}return this._fixInfo(d),d}list(s=""){const a=s!=null&&s.length?{subject:s}:{},o=d=>{const p=d;return p.streams.forEach(m=>{this._fixInfo(m)}),p.streams},u=`${this.prefix}.STREAM.LIST`;return new cu(u,o,this,a)}_fixInfo(s){s.config.sealed=s.config.sealed||!1,s.config.deny_delete=s.config.deny_delete||!1,s.config.deny_purge=s.config.deny_purge||!1,s.config.allow_rollup_hdrs=s.config.allow_rollup_hdrs||!1}async purge(s,a){if(a){const{keep:u,seq:d}=a;if(typeof u=="number"&&typeof d=="number")throw new Error("can specify one of keep or seq")}return _n(s),await this._request(`${this.prefix}.STREAM.PURGE.${s}`,a)}async deleteMessage(s,a,o=!0){_n(s);const u={seq:a};return o||(u.no_erase=!0),(await this._request(`${this.prefix}.STREAM.MSG.DELETE.${s}`,u)).success}async getMessage(s,a){_n(s);const u=await this._request(`${this.prefix}.STREAM.MSG.GET.${s}`,a);return new SE(u)}find(s){return this.findStream(s)}listKvs(){const s=o=>{var g;const d=o.streams.filter(v=>v.config.name.startsWith(Zn));d.forEach(v=>{this._fixInfo(v)});let p="";return d.length&&(p=((g=this.nc.info)==null?void 0:g.cluster)??""),d.map(v=>new wE(v,p))},a=`${this.prefix}.STREAM.LIST`;return new cu(a,s,this)}listObjectStores(){const s=o=>{const d=o.streams.filter(m=>m.config.name.startsWith(sy));return d.forEach(m=>{this._fixInfo(m)}),d.map(m=>new z0(m))},a=`${this.prefix}.STREAM.LIST`;return new cu(a,s,this)}names(s=""){const a=s!=null&&s.length?{subject:s}:{},o=d=>d.streams,u=`${this.prefix}.STREAM.NAMES`;return new cu(u,o,this,a)}async get(s){const a=await this.info(s);return Promise.resolve(new vh(this,a))}}class lO extends wu{constructor(s,a){super(s,a)}async getMessage(s,a){_n(s);let o=a;const{last_by_subj:u}=o;u&&(o=null);const d=o?this.jc.encode(o):es,p=this.opts.apiPrefix||"$JS.API",m=u?`${p}.DIRECT.GET.${s}.${u}`:`${p}.DIRECT.GET.${s}`,g=await this.nc.request(m,d,{timeout:this.timeout}),v=hl(g);if(v)return Promise.reject(v);const _=new L0(g);return Promise.resolve(_)}async getBatch(s,a){_n(s);const u=`${this.opts.apiPrefix||"$JS.API"}.DIRECT.GET.${s}`;if(!Array.isArray(a.multi_last)||a.multi_last.length===0)return Promise.reject("multi_last is required");const d=JSON.stringify(a,(g,v)=>g==="up_to_time"&&v instanceof Date?v.toISOString():v),p=new sn,m=await this.nc.requestMany(u,d,{strategy:Ms.SentinelMsg});return(async()=>{var S,D,B;let g=!1,v=!1,_;for await(const j of m){if(!g){g=!0;const F=((S=j.headers)==null?void 0:S.code)||0;if(F!==0&&F<200||F>299){_=(D=j.headers)==null?void 0:D.description.toLowerCase();break}if(((B=j.headers)==null?void 0:B.get("Nats-Num-Pending"))===""){v=!0;break}}if(j.data.length===0)break;p.push(new L0(j))}p.push(()=>{if(v)throw new Error("batch direct get not supported by the server");if(_)throw new Error(`bad request: ${_}`);p.stop()})})(),Promise.resolve(p)}}class L0{constructor(s){w(this,"data");w(this,"header");if(!s.headers)throw new Error("headers expected");this.data=s.data,this.header=s.headers}get subject(){return this.header.last(ul.Subject)}get seq(){const s=this.header.last(ul.Sequence);return typeof s=="string"?parseInt(s):0}get time(){return new Date(Date.parse(this.timestamp))}get timestamp(){return this.header.last(ul.TimeStamp)}get stream(){return this.header.last(ul.Stream)}json(s){return ks(s).decode(this.data)}string(){return Kn.decode(this.data)}}w(L0,"jc");class cO extends wu{constructor(a,o){super(a,o);w(this,"streams");w(this,"consumers");w(this,"direct");this.streams=new ay(a,o),this.consumers=new ch(a,o),this.direct=new lO(a,o)}async getAccountInfo(){return await this._request(`${this.prefix}.INFO`)}jetstream(){return this.nc.jetstream(this.getOptions())}advisories(){const a=new sn;return this.nc.subscribe("$JS.EVENT.ADVISORY.>",{callback:(o,u)=>{if(o)throw o;try{const d=this.parseJsResponse(u),p=d.type.split("."),m=p[p.length-1];a.push({kind:m,data:d})}catch(d){a.stop(d)}}}),a}}class SE{constructor(s){w(this,"_header");w(this,"smr");this.smr=s}get subject(){return this.smr.message.subject}get seq(){return this.smr.message.seq}get timestamp(){return this.smr.message.time}get time(){return new Date(Date.parse(this.timestamp))}get data(){return this.smr.message.data?this._parse(this.smr.message.data):es}get header(){if(!this._header)if(this.smr.message.hdrs){const s=this._parse(this.smr.message.hdrs);this._header=ni.decode(s)}else this._header=ar();return this._header}_parse(s){const a=atob(s),o=a.length,u=new Uint8Array(o);for(let d=0;d<o;d++)u[d]=a.charCodeAt(d);return u}json(s){return ks(s).decode(this.data)}string(){return Kn.decode(this.data)}}w(SE,"jc");class uO{constructor(s){w(this,"api");this.api=s}get(s){return this.api.info(s).then(a=>new vh(this.api,a))}}class b0{constructor(s){w(this,"info");w(this,"hdrs");this.info=s}get name(){return this.info.name}get description(){return this.info.description??""}get headers(){return this.hdrs||(this.hdrs=ni.fromRecord(this.info.headers||{})),this.hdrs}get options(){return this.info.options}get bucket(){return this.info.bucket}get chunks(){return this.info.chunks}get deleted(){return this.info.deleted??!1}get digest(){return this.info.digest}get mtime(){return this.info.mtime}get nuid(){return this.info.nuid}get size(){return this.info.size}get revision(){return this.info.revision}get metadata(){return this.info.metadata||{}}isLink(){var s,a;return((s=this.info.options)==null?void 0:s.link)!==void 0&&((a=this.info.options)==null?void 0:a.link)!==null}}function vS(i){const s={name:i.name,description:i.description??"",options:i.options,metadata:i.metadata};if(i.headers){const a=i.headers;s.headers=a.toRecord()}return s}function fO(){return new ReadableStream({pull(i){i.enqueue(new Uint8Array(0)),i.close()}})}class pu{constructor(s,a,o){w(this,"jsm");w(this,"js");w(this,"stream");w(this,"name");this.name=s,this.jsm=a,this.js=o}_checkNotEmpty(s){return!s||s.length===0?{name:s,error:new Error("name cannot be empty")}:{name:s}}async info(s){const a=await this.rawInfo(s);return a?new b0(a):null}async list(){const s=[],a=await this.watch({ignoreDeletes:!0,includeHistory:!0});for await(const o of a){if(o===null)break;s.push(o)}return Promise.resolve(s)}async rawInfo(s){const{name:a,error:o}=this._checkNotEmpty(s);if(o)return Promise.reject(o);const u=this._metaSubject(a);try{const d=await this.jsm.streams.getMessage(this.stream,{last_by_subj:u}),m=ks().decode(d.data);return m.revision=d.seq,m}catch(d){return d.code==="404"?null:Promise.reject(d)}}async _si(s){try{return await this.jsm.streams.info(this.stream,s)}catch(a){return a.code==="404"?null:Promise.reject(a)}}async seal(){let s=await this._si();return s===null?Promise.reject(new Error("object store not found")):(s.config.sealed=!0,s=await this.jsm.streams.update(this.stream,s.config),Promise.resolve(new z0(s)))}async status(s){const a=await this._si(s);return a===null?Promise.reject(new Error("object store not found")):Promise.resolve(new z0(a))}destroy(){return this.jsm.streams.delete(this.stream)}async _put(s,a,o){var De;const u=this.js.getOptions();o=o||{timeout:u.timeout},o.timeout=o.timeout||u.timeout,o.previousRevision=o.previousRevision??void 0;const{timeout:d,previousRevision:p}=o,m=this.js.nc.info,g=(m==null?void 0:m.max_payload)||1024;s=s||{},s.options=s.options||{};let v=((De=s.options)==null?void 0:De.max_chunk_size)||128*1024;v=v>g?g:v,s.options.max_chunk_size=v;const _=await this.info(s.name),{name:S,error:D}=this._checkNotEmpty(s.name);if(D)return Promise.reject(D);const B=ri.next(),j=this._chunkSubject(B),F=this._metaSubject(S),Q=Object.assign({bucket:this.name,nuid:B,size:0,chunks:0},vS(s)),ee=_t(),te=[],Se=new gl;try{const q=a?a.getReader():null,ne=lS.create();for(;;){const{done:oe,value:W}=q?await q.read():{done:!0,value:void 0};if(oe){if(Se.size()>0){const ie=Se.drain();ne.update(ie),Q.chunks++,Q.size+=ie.length,te.push(this.js.publish(j,ie,{timeout:d}))}await Promise.all(te),te.length=0,Q.mtime=new Date().toISOString();const X=ml.encode(ne.digest());Q.digest=`${yS}${X}`,Q.deleted=!1;const H=ar();typeof p=="number"&&H.set(ga.ExpectedLastSubjectSequenceHdr,`${p}`),H.set(Dn.RollupHdr,Dn.RollupValueSubject);const le=await this.js.publish(F,ks().encode(Q),{headers:H,timeout:d});if(Q.revision=le.seq,_)try{await this.jsm.streams.purge(this.stream,{filter:`$O.${this.name}.C.${_.nuid}`})}catch{}ee.resolve(new b0(Q));break}if(W)for(Se.fill(W);Se.size()>v;){Q.chunks++,Q.size+=v;const X=Se.drain(s.options.max_chunk_size);ne.update(X),te.push(this.js.publish(j,X,{timeout:d}))}}}catch(q){await this.jsm.streams.purge(this.stream,{filter:j}),ee.reject(q)}return ee}putBlob(s,a,o){function u(d){return new ReadableStream({pull(p){p.enqueue(d),p.close()}})}return a===null&&(a=new Uint8Array(0)),this.put(s,u(a),o)}put(s,a,o){var u;return(u=s==null?void 0:s.options)!=null&&u.link?Promise.reject(new Error("link cannot be set when putting the object in bucket")):this._put(s,a,o)}async getBlob(s){async function a(d){const p=new gl,m=d.getReader();for(;;){const{done:g,value:v}=await m.read();if(g)return p.drain();v&&v.length&&p.fill(v)}}const o=await this.get(s);if(o===null)return Promise.resolve(null);const u=await Promise.all([o.error,a(o.data)]);return u[0]?Promise.reject(u[0]):Promise.resolve(u[1])}async get(s){const a=await this.rawInfo(s);if(a===null||a.deleted)return Promise.resolve(null);if(a.options&&a.options.link){const S=a.options.link.name||"";if(S==="")throw new Error("link is a bucket");return(a.options.link.bucket!==this.name?await pu.create(this.js,a.options.link.bucket):this).get(S)}if(!a.digest.startsWith(yS))return Promise.reject(new Error(`unknown digest type: ${a.digest}`));const o=j0(a.digest.substring(8));if(o===null)return Promise.reject(new Error(`unable to parse digest: ${a.digest}`));const u=_t(),d={info:new b0(a),error:u};if(a.size===0)return d.data=fO(),u.resolve(null),Promise.resolve(d);let p;const m=si();m.orderedConsumer();const g=lS.create(),v=`$O.${this.name}.C.${a.nuid}`,_=await this.js.subscribe(v,m);return(async()=>{for await(const S of _)S.data.length>0&&(g.update(S.data),p.enqueue(S.data)),S.info.pending===0&&(WC(o,g.digest())?p.close():p.error(new Error(`received a corrupt object, digests do not match received: ${a.digest} calculated ${o}`)),_.unsubscribe())})().then(()=>{u.resolve()}).catch(S=>{p.error(S),u.reject(S)}),d.data=new ReadableStream({start(S){p=S},cancel(){_.unsubscribe()}}),d}linkStore(s,a){if(!(a instanceof pu))return Promise.reject("bucket required");const o=a,{name:u,error:d}=this._checkNotEmpty(s);if(d)return Promise.reject(d);const p={name:u,options:{link:{bucket:o.name}}};return this._put(p,null)}async link(s,a){const{name:o,error:u}=this._checkNotEmpty(s);if(u)return Promise.reject(u);if(a.deleted)return Promise.reject(new Error("src object is deleted"));if(a.isLink())return Promise.reject(new Error("src object is a link"));const d=await this.rawInfo(s);if(d!==null&&!d.deleted)return Promise.reject(new Error("an object already exists with that name"));const p={bucket:a.bucket,name:a.name},m={name:o,bucket:a.bucket,options:{link:p}};await this.js.publish(this._metaSubject(s),JSON.stringify(m));const g=await this.info(s);return Promise.resolve(g)}async delete(s){const a=await this.rawInfo(s);if(a===null)return Promise.resolve({purged:0,success:!1});a.deleted=!0,a.size=0,a.chunks=0,a.digest="";const o=ks(),u=ar();return u.set(Dn.RollupHdr,Dn.RollupValueSubject),await this.js.publish(this._metaSubject(a.name),o.encode(a),{headers:u}),this.jsm.streams.purge(this.stream,{filter:this._chunkSubject(a.nuid)})}async update(s,a={}){const o=await this.rawInfo(s);if(o===null)return Promise.reject(new Error("object not found"));if(o.deleted)return Promise.reject(new Error("cannot update meta for a deleted object"));a.name=a.name??o.name;const{name:u,error:d}=this._checkNotEmpty(a.name);if(d)return Promise.reject(d);if(s!==a.name){const g=await this.info(a.name);if(g&&!g.deleted)return Promise.reject(new Error("an object already exists with that name"))}a.name=u;const p=Object.assign({},o,vS(a)),m=await this.js.publish(this._metaSubject(p.name),JSON.stringify(p));return s!==a.name&&await this.jsm.streams.purge(this.stream,{filter:this._metaSubject(s)}),Promise.resolve(m)}async watch(s={}){s.includeHistory=s.includeHistory??!1,s.ignoreDeletes=s.ignoreDeletes??!1;let a=!1;const o=new sn,u=this._metaSubjectAll();try{await this.jsm.streams.getMessage(this.stream,{last_by_subj:u})}catch(g){g.code==="404"?(o.push(null),a=!0):o.stop(g)}const d=ks(),p=si();p.orderedConsumer(),s.includeHistory?p.deliverLastPerSubject():(a=!0,p.deliverNew()),p.callback((g,v)=>{var _;if(g){o.stop(g);return}if(v!==null){const S=d.decode(v.data);S.deleted&&s.ignoreDeletes===!0||o.push(S),((_=v.info)==null?void 0:_.pending)===0&&!a&&(a=!0,o.push(null))}});const m=await this.js.subscribe(u,p);return o._data=m,o.iterClosed.then(()=>{m.unsubscribe()}),m.closed.then(()=>{o.stop()}).catch(g=>{o.stop(g)}),o}_chunkSubject(s){return`$O.${this.name}.C.${s}`}_metaSubject(s){return`$O.${this.name}.M.${ml.encode(s)}`}_metaSubjectAll(){return`$O.${this.name}.M.>`}async init(s={}){try{this.stream=eO(this.name)}catch(u){return Promise.reject(u)}const a=(s==null?void 0:s.ttl)||0;delete s.ttl;const o=Object.assign({max_age:a},s);o.name=this.stream,o.num_replicas=s.replicas??1,o.allow_direct=!0,o.allow_rollup_hdrs=!0,o.discard=yu.New,o.subjects=[`$O.${this.name}.C.>`,`$O.${this.name}.M.>`],s.placement&&(o.placement=s.placement),s.metadata&&(o.metadata=s.metadata),typeof s.compression=="boolean"&&(o.compression=s.compression?ii.S2:ii.None);try{await this.jsm.streams.info(o.name)}catch(u){u.message==="stream not found"&&await this.jsm.streams.add(o)}}static async create(s,a,o={}){const u=await s.jetstreamManager(),d=new pu(a,u,s);return await d.init(o),Promise.resolve(d)}}class dO{constructor(s){w(this,"js");this.js=s}kv(s,a={}){const o=this.js,{ok:u,min:d}=o.nc.features.get(tt.JS_KV);return u?a.bindOnly?vu.bind(this.js,s,a):vu.create(this.js,s,a):Promise.reject(new Error(`kv is only supported on servers ${d} or better`))}os(s,a={}){var p;if(typeof((p=crypto==null?void 0:crypto.subtle)==null?void 0:p.digest)!="function")return Promise.reject(new Error("objectstore: unable to calculate hashes - crypto.subtle.digest with sha256 support is required"));const o=this.js,{ok:u,min:d}=o.nc.features.get(tt.JS_OBJECTSTORE);return u?pu.create(this.js,s,a):Promise.reject(new Error(`objectstore is only supported on servers ${d} or better`))}}class ry extends wu{constructor(a,o){super(a,o);w(this,"consumers");w(this,"streams");w(this,"consumerAPI");w(this,"streamAPI");this.consumerAPI=new ch(a,o),this.streamAPI=new ay(a,o),this.consumers=new q0(this.consumerAPI),this.streams=new uO(this.streamAPI)}jetstreamManager(a){a===void 0&&(a=this.opts.checkAPI);const o=Object.assign({},this.opts,{checkAPI:a});return this.nc.jetstreamManager(o)}get apiPrefix(){return this.prefix}get views(){return new dO(this)}async publish(a,o=es,u){u=u||{},u.expect=u.expect||{};const d=(u==null?void 0:u.headers)||ar();u&&(u.msgID&&d.set(ga.MsgIdHdr,u.msgID),u.expect.lastMsgID&&d.set(ga.ExpectedLastMsgIdHdr,u.expect.lastMsgID),u.expect.streamName&&d.set(ga.ExpectedStreamHdr,u.expect.streamName),typeof u.expect.lastSequence=="number"&&d.set(ga.ExpectedLastSeqHdr,`${u.expect.lastSequence}`),typeof u.expect.lastSubjectSequence=="number"&&d.set(ga.ExpectedLastSubjectSequenceHdr,`${u.expect.lastSubjectSequence}`));const p=u.timeout||this.timeout,m={};p&&(m.timeout=p),u&&(m.headers=d);let{retries:g,retry_delay:v}=u;g=g||1,v=v||250;let _;for(let D=0;D<g;D++)try{_=await this.nc.request(a,o,m);break}catch(B){if(B.code==="503"&&D+1<g)await vl(v);else throw B}const S=this.parseJsResponse(_);if(S.stream==="")throw ge.errorForCode(ue.JetStreamInvalidAck);return S.duplicate=S.duplicate?S.duplicate:!1,S}async pull(a,o,u=0){_n(a),dl(o);let d=this.timeout;u>d&&(d=u),u=u<0?0:Et(u);const p={batch:1,no_wait:u===0,expires:u},m=await this.nc.request(`${this.prefix}.CONSUMER.MSG.NEXT.${a}.${o}`,this.jc.encode(p),{noMux:!0,timeout:d}),g=hl(m);if(g)throw g;return xu(m,this.timeout)}fetch(a,o,u={}){_n(a),dl(o);let d=null;const p=(u.max_bytes??0)>0;let m=0;const g=p?u.max_bytes:0;let v=null;const _={};if(_.batch=u.batch||1,g){const te=this.nc.features.get(tt.JS_PULL_MAX_BYTES);if(!te.ok)throw new Error(`max_bytes is only supported on servers ${te.min} or better`);_.max_bytes=g}_.no_wait=u.no_wait||!1,_.no_wait&&_.expires&&(_.expires=0);const S=u.expires||0;if(S&&(_.expires=Et(S)),S===0&&_.no_wait===!1)throw new Error("expires or no_wait is required");const D=u.idle_heartbeat||0;D&&(_.idle_heartbeat=Et(D),u.delay_heartbeat===!0&&(_.idle_heartbeat=Et(D*4)));const B=new sn,j=_.batch;let F=0;B.protocolFilterFn=(te,Se=!1)=>C0(te.msg)?(v==null||v.work(),!1):!0,B.dispatchedFn=te=>{if(te){if(p&&(m+=te.data.length),F++,d&&te.info.pending===0)return;(B.getPending()===1&&te.info.pending===0||j===F||g>0&&m>=g)&&B.stop()}};const Q=sr(this.nc.options.inboxPrefix),ee=this.nc.subscribe(Q,{max:u.batch,callback:(te,Se)=>{te===null&&(te=hl(Se)),te!==null?(d&&(d.cancel(),d=null),kC(te)?B.stop(_E(te)===null?void 0:te):B.stop(te)):(v==null||v.work(),B.received++,B.push(xu(Se,this.timeout)))}});return S&&(d=bl(S),d.catch(()=>{ee.isClosed()||(ee.drain().catch(()=>{}),d=null),v&&v.cancel()})),(async()=>{try{D&&(v=new ny(D,te=>(B.push(()=>{B.err=new ge(`${ys.IdleHeartbeatMissed}: ${te}`,ue.JetStreamIdleHeartBeat)}),!0)))}catch{}await ee.closed,d!==null&&(d.cancel(),d=null),v&&v.cancel(),B.stop()})().catch(),this.nc.publish(`${this.prefix}.CONSUMER.MSG.NEXT.${a}.${o}`,this.jc.encode(_),{reply:Q}),B}async pullSubscribe(a,o=si()){const u=await this._processOptions(a,o);if(u.ordered)throw new Error("pull subscribers cannot be be ordered");if(u.config.deliver_subject)throw new Error("consumer info specifies deliver_subject - pull consumers cannot have deliver_subject set");const d=u.config.ack_policy;if(d===nn.None||d===nn.All)throw new Error("ack policy for pull consumers must be explicit");const p=this._buildTypedSubscriptionOpts(u),m=new bO(this,u.deliver,p);m.info=u;try{await this._maybeCreateConsumer(u)}catch(g){throw m.unsubscribe(),g}return m}async subscribe(a,o=si()){const u=await this._processOptions(a,o);if(!u.isBind&&!u.config.deliver_subject)throw new Error("push consumer requires deliver_subject");const d=this._buildTypedSubscriptionOpts(u),p=new EE(this,u.deliver,d);p.info=u;try{await this._maybeCreateConsumer(u)}catch(m){throw p.unsubscribe(),m}return p._maybeSetupHbMonitoring(),p}async _processOptions(a,o=si()){const u=aS(o)?o.getOpts():o;if(u.isBind=aS(o)?o.isBind:!1,u.flow_control={heartbeat_count:0,fc_count:0,consumer_restarts:0},u.ordered){if(u.ordered_consumer_sequence={stream_seq:0,delivery_seq:0},u.config.ack_policy!==nn.NotSet&&u.config.ack_policy!==nn.None)throw new ge("ordered consumer: ack_policy can only be set to 'none'",ue.ApiError);if(u.config.durable_name&&u.config.durable_name.length>0)throw new ge("ordered consumer: durable_name cannot be set",ue.ApiError);if(u.config.deliver_subject&&u.config.deliver_subject.length>0)throw new ge("ordered consumer: deliver_subject cannot be set",ue.ApiError);if(u.config.max_deliver!==void 0&&u.config.max_deliver>1)throw new ge("ordered consumer: max_deliver cannot be set",ue.ApiError);if(u.config.deliver_group&&u.config.deliver_group.length>0)throw new ge("ordered consumer: deliver_group cannot be set",ue.ApiError);u.config.deliver_subject=sr(this.nc.options.inboxPrefix),u.config.ack_policy=nn.None,u.config.max_deliver=1,u.config.flow_control=!0,u.config.idle_heartbeat=u.config.idle_heartbeat||Et(5e3),u.config.ack_wait=Et(1320*60*1e3),u.config.mem_storage=!0,u.config.num_replicas=1}if(u.config.ack_policy===nn.NotSet&&(u.config.ack_policy=nn.All),u.api=this,u.config=u.config||{},u.stream=u.stream?u.stream:await this.findStream(a),u.attached=!1,u.config.durable_name)try{const d=await this.consumerAPI.info(u.stream,u.config.durable_name);if(d){if(d.config.filter_subject&&d.config.filter_subject!==a)throw new Error("subject does not match consumer");const p=u.config.deliver_group??"";if(p===""&&d.push_bound===!0)throw new Error("duplicate subscription");const m=d.config.deliver_group??"";if(p!==m)throw m===""?new Error("durable requires no queue group"):new Error(`durable requires queue group '${m}'`);u.last=d,u.config=d.config,u.attached=!0,u.config.durable_name||(u.name=d.name)}}catch(d){if(d.code!=="404")throw d}return!u.attached&&u.config.filter_subject===void 0&&u.config.filter_subjects===void 0&&(u.config.filter_subject=a),u.deliver=u.config.deliver_subject||sr(this.nc.options.inboxPrefix),u}_buildTypedSubscriptionOpts(a){const o={};return o.adapter=yO(a.callbackFn===void 0,this.timeout),o.ingestionFilterFn=ry.ingestionFn(a.ordered),o.protocolFilterFn=(u,d=!1)=>{const p=u;return T0(p.msg)?(d||p.msg.respond(),!1):!0},!a.mack&&a.config.ack_policy!==nn.None&&(o.dispatchedFn=xO),a.callbackFn&&(o.callback=a.callbackFn),o.max=a.max||0,o.queue=a.queue,o}async _maybeCreateConsumer(a){if(a.attached)return;if(a.isBind)throw new Error(`unable to bind - durable consumer ${a.config.durable_name} doesn't exist in ${a.stream}`);a.config=Object.assign({deliver_policy:Vt.All,ack_policy:nn.Explicit,ack_wait:Et(30*1e3),replay_policy:yl.Instant},a.config);const o=await this.consumerAPI.add(a.stream,a.config);if(Array.isArray(a.config.filter_subjects&&!Array.isArray(o.config.filter_subjects)))throw new Error("jetstream server doesn't support consumers with multiple filter subjects");a.name=o.name,a.config=o.config,a.last=o}static ingestionFn(a){return(o,u)=>{var g;const d=u;if(!o)return{ingest:!1,protocol:!1};const p=o;if(hl(p.msg)||(g=d.monitor)==null||g.work(),C0(p.msg)){const v=a?d._checkHbOrderConsumer(p.msg):!0;return a||d.info.flow_control.heartbeat_count++,{ingest:v,protocol:!0}}else if(T0(p.msg))return d.info.flow_control.fc_count++,{ingest:!0,protocol:!0};return{ingest:a?d._checkOrderedConsumer(o):!0,protocol:!1}}}}class iy{constructor(s){w(this,"options");w(this,"protocol");w(this,"draining");w(this,"listeners");w(this,"_services");this.draining=!1,this.options=V3(s),this.listeners=[]}static connect(s={}){return new Promise((a,o)=>{const u=new iy(s);fh.connect(u.options,u).then(d=>{u.protocol=d,(async function(){for await(const p of d.status())u.listeners.forEach(m=>{m.push(p)})})(),a(u)}).catch(d=>{o(d)})})}closed(){return this.protocol.closed}async close(){await this.protocol.close()}_check(s,a,o){if(this.isClosed())throw ge.errorForCode(ue.ConnectionClosed);if(a&&this.isDraining()||o&&this.protocol.noMorePublishing)throw ge.errorForCode(ue.ConnectionDraining);if(s=s||"",s.length===0)throw ge.errorForCode(ue.BadSubject)}publish(s,a,o){this._check(s,!1,!0),this.protocol.publish(s,a,o)}publishMessage(s){return this.publish(s.subject,s.data,{reply:s.reply,headers:s.headers})}respondMessage(s){return s.reply?(this.publish(s.reply,s.data,{reply:s.reply,headers:s.headers}),!0):!1}subscribe(s,a={}){this._check(s,!0,!1);const o=new xE(this.protocol,s,a);return this.protocol.subscribe(o),o}_resub(s,a,o){this._check(a,!0,!1);const u=s;u.max=o,o&&(u.max=o+u.received),this.protocol.resub(u,a)}requestMany(s,a=es,o={maxWait:1e3,maxMessages:-1}){const u=!this.protocol.options.noAsyncTraces;try{this._check(s,!0,!0)}catch(g){return Promise.reject(g)}if(o.strategy=o.strategy||Ms.Timer,o.maxWait=o.maxWait||1e3,o.maxWait<1)return Promise.reject(new ge("timeout",ue.InvalidOption));const d=new sn;function p(g){d.push(()=>{d.stop(g)})}function m(g,v){g||v===null?p(g===null?void 0:g):d.push(v)}if(o.noMux){const g=u?new Error().stack:null;let v=typeof o.maxMessages=="number"&&o.maxMessages>0?o.maxMessages:-1;const _=this.subscribe(sr(this.options.inboxPrefix),{callback:(j,F)=>{var Q,ee;if(((Q=F==null?void 0:F.data)==null?void 0:Q.length)===0&&((ee=F==null?void 0:F.headers)==null?void 0:ee.status)===ue.NoResponders&&(j=ge.errorForCode(ue.NoResponders)),j){g&&(j.stack+=`
|
|
266
|
+
|
|
267
|
+
${g}`),S(j);return}m(null,F),o.strategy===Ms.Count&&(v--,v===0&&S()),o.strategy===Ms.JitterTimer&&(B(),D=setTimeout(()=>{S()},300)),o.strategy===Ms.SentinelMsg&&F&&F.data.length===0&&S()}});_.requestSubject=s,_.closed.then(()=>{p()}).catch(j=>{d.stop(j)});const S=j=>{j&&d.push(()=>{throw j}),B(),_.drain().then(()=>{p()}).catch(F=>{p()})};d.iterClosed.then(()=>{B(),_==null||_.unsubscribe()}).catch(j=>{B(),_==null||_.unsubscribe()});try{this.publish(s,a,{reply:_.getSubject()})}catch(j){S(j)}let D=setTimeout(()=>{S()},o.maxWait);const B=()=>{D&&clearTimeout(D)}}else{const g=o;g.callback=m,d.iterClosed.then(()=>{v.cancel()}).catch(_=>{v.cancel(_)});const v=new e3(this.protocol.muxSubscriptions,s,g);this.protocol.request(v);try{this.publish(s,a,{reply:`${this.protocol.muxSubscriptions.baseInbox}${v.token}`,headers:o.headers})}catch(_){v.cancel(_)}}return Promise.resolve(d)}request(s,a,o={timeout:1e3,noMux:!1}){try{this._check(s,!0,!0)}catch(d){return Promise.reject(d)}const u=!this.protocol.options.noAsyncTraces;if(o.timeout=o.timeout||1e3,o.timeout<1)return Promise.reject(new ge("timeout",ue.InvalidOption));if(!o.noMux&&o.reply)return Promise.reject(new ge("reply can only be used with noMux",ue.InvalidOption));if(o.noMux){const d=o.reply?o.reply:sr(this.options.inboxPrefix),p=_t(),m=u?new Error:null,g=this.subscribe(d,{max:1,timeout:o.timeout,callback:(v,_)=>{v?(m&&v.code!==ue.Timeout&&(v.stack+=`
|
|
268
|
+
|
|
269
|
+
${m.stack}`),g.unsubscribe(),p.reject(v)):(v=fE(_),v?(m&&(v.stack+=`
|
|
270
|
+
|
|
271
|
+
${m.stack}`),p.reject(v)):p.resolve(_))}});return g.requestSubject=s,this.protocol.publish(s,a,{reply:d,headers:o.headers}),p}else{const d=new mE(this.protocol.muxSubscriptions,s,o,u);this.protocol.request(d);try{this.publish(s,a,{reply:`${this.protocol.muxSubscriptions.baseInbox}${d.token}`,headers:o.headers})}catch(m){d.cancel(m)}const p=Promise.race([d.timer,d.deferred]);return p.catch(()=>{d.cancel()}),p}}flush(){return this.isClosed()?Promise.reject(ge.errorForCode(ue.ConnectionClosed)):this.protocol.flush()}drain(){return this.isClosed()?Promise.reject(ge.errorForCode(ue.ConnectionClosed)):this.isDraining()?Promise.reject(ge.errorForCode(ue.ConnectionDraining)):(this.draining=!0,this.protocol.drain())}isClosed(){return this.protocol.isClosed()}isDraining(){return this.draining}getServer(){const s=this.protocol.getServer();return s?s.listen:""}status(){const s=new sn;return s.iterClosed.then(()=>{const a=this.listeners.indexOf(s);this.listeners.splice(a,1)}),this.listeners.push(s),s}get info(){return this.protocol.isClosed()?void 0:this.protocol.info}async context(){return(await this.request("$SYS.REQ.USER.INFO")).json((a,o)=>a==="time"?new Date(Date.parse(o)):o)}stats(){return{inBytes:this.protocol.inBytes,outBytes:this.protocol.outBytes,inMsgs:this.protocol.inMsgs,outMsgs:this.protocol.outMsgs}}async jetstreamManager(s={}){const a=new cO(this,s);if(s.checkAPI!==!1)try{await a.getAccountInfo()}catch(o){const u=o;throw u.code===ue.NoResponders&&(u.code=ue.JetStreamNotEnabled),u}return a}jetstream(s={}){return new ry(this,s)}getServerVersion(){const s=this.info;return s?Qi(s.version):void 0}async rtt(){if(!this.protocol._closed&&!this.protocol.connected)throw ge.errorForCode(ue.Disconnect);const s=Date.now();return await this.flush(),Date.now()-s}get features(){return this.protocol.features}get services(){return this._services||(this._services=new hO(this)),this._services}reconnect(){return this.isClosed()?Promise.reject(ge.errorForCode(ue.ConnectionClosed)):this.isDraining()?Promise.reject(ge.errorForCode(ue.ConnectionDraining)):this.protocol.reconnect()}}class hO{constructor(s){w(this,"nc");this.nc=s}add(s){try{return new Su(this.nc,s).start()}catch(a){return Promise.reject(a)}}client(s,a){return new Y3(this.nc,s,a)}}class mO{constructor(s,a,o){w(this,"bucket");w(this,"sm");w(this,"prefixLen");this.bucket=s,this.prefixLen=a,this.sm=o}get key(){return this.sm.subject.substring(this.prefixLen)}get value(){return this.sm.data}get delta(){return 0}get created(){return this.sm.time}get revision(){return this.sm.seq}get operation(){return this.sm.header.get(dh)||"PUT"}get length(){const s=this.sm.header.get(Dn.MessageSizeHdr)||"";return s!==""?parseInt(s,10):this.sm.data.length}json(){return this.sm.json()}string(){return this.sm.string()}}class pO{constructor(s,a,o){w(this,"bucket");w(this,"key");w(this,"sm");this.bucket=s,this.key=a,this.sm=o}get value(){return this.sm.data}get created(){return new Date(ey(this.sm.info.timestampNanos))}get revision(){return this.sm.seq}get operation(){var s;return((s=this.sm.headers)==null?void 0:s.get(dh))||"PUT"}get delta(){return this.sm.info.pending}get length(){var a;const s=((a=this.sm.headers)==null?void 0:a.get(Dn.MessageSizeHdr))||"";return s!==""?parseInt(s,10):this.sm.data.length}json(){return this.sm.json()}string(){return this.sm.string()}}class EE extends a3{constructor(a,o,u){super(a.nc,o,u);w(this,"js");w(this,"monitor");this.js=a,this.monitor=null,this.sub.closed.then(()=>{this.monitor&&this.monitor.cancel()})}set info(a){this.sub.info=a}get info(){return this.sub.info}_resetOrderedConsumer(a){if(this.info===null||this.sub.isClosed())return;const o=sr(this.js.nc.options.inboxPrefix);this.js.nc._resub(this.sub,o);const d=this.info;d.config.name=ri.next(),d.ordered_consumer_sequence.delivery_seq=0,d.flow_control.heartbeat_count=0,d.flow_control.fc_count=0,d.flow_control.consumer_restarts++,d.deliver=o,d.config.deliver_subject=o,d.config.deliver_policy=Vt.StartSequence,d.config.opt_start_seq=a;const p={};p.stream_name=this.info.stream,p.config=d.config;const m=`${d.api.prefix}.CONSUMER.CREATE.${d.stream}`;this.js._request(m,p,{retries:-1}).then(g=>{const v=g,_=this.sub.info;_.last=v,this.info.config=v.config,this.info.name=v.name}).catch(g=>{const v=new ge(`unable to recreate ordered consumer ${d.stream} at seq ${a}`,ue.RequestError,g);this.sub.callback(v,{})})}_maybeSetupHbMonitoring(){var o,u;const a=((u=(o=this.info)==null?void 0:o.config)==null?void 0:u.idle_heartbeat)||0;a&&this._setupHbMonitoring(ey(a))}_setupHbMonitoring(a,o=0){const u={cancelAfter:0,maxOut:2};o&&(u.cancelAfter=o);const d=this.sub,p=m=>{var _,S,D,B;const g=BC(409,`${ys.IdleHeartbeatMissed}: ${m}`,this.sub.subject);if(!((_=this.info)==null?void 0:_.ordered))this.sub.callback(null,g);else{if(!this.js.nc.protocol.connected)return!1;const j=((D=(S=this.info)==null?void 0:S.ordered_consumer_sequence)==null?void 0:D.stream_seq)||0;return this._resetOrderedConsumer(j+1),(B=this.monitor)==null||B.restart(),!1}return!d.noIterator};this.monitor=new ny(a,p,u)}_checkHbOrderConsumer(a){const o=a.headers.get(Dn.ConsumerStalledHdr);o!==""&&this.js.nc.publish(o);const u=parseInt(a.headers.get(Dn.LastConsumerSeqHdr),10),d=this.info.ordered_consumer_sequence;return this.info.flow_control.heartbeat_count++,u!==d.delivery_seq&&this._resetOrderedConsumer(d.stream_seq+1),!1}_checkOrderedConsumer(a){const o=this.info.ordered_consumer_sequence,u=a.info.streamSequence,d=a.info.deliverySequence;return d!=o.delivery_seq+1?(this._resetOrderedConsumer(o.stream_seq+1),!1):(o.delivery_seq=d,o.stream_seq=u,!0)}async destroy(){this.isClosed()||await this.drain();const a=this.sub.info,o=a.config.durable_name||a.name,u=`${a.api.prefix}.CONSUMER.DELETE.${a.stream}.${o}`;await a.api._request(u)}async consumerInfo(){const a=this.sub.info,o=a.config.durable_name||a.name,u=`${a.api.prefix}.CONSUMER.INFO.${a.stream}.${o}`,d=await a.api._request(u);return a.last=d,d}}class bO extends EE{constructor(s,a,o){super(s,a,o)}pull(s={batch:1}){const{stream:a,config:o,name:u}=this.sub.info,d=o.durable_name??u,p={};if(p.batch=s.batch||1,p.no_wait=s.no_wait||!1,(s.max_bytes??0)>0){const v=this.js.nc.features.get(tt.JS_PULL_MAX_BYTES);if(!v.ok)throw new Error(`max_bytes is only supported on servers ${v.min} or better`);p.max_bytes=s.max_bytes}let m=0;s.expires&&s.expires>0&&(m=s.expires,p.expires=Et(m));let g=0;if(s.idle_heartbeat&&s.idle_heartbeat>0&&(g=s.idle_heartbeat,p.idle_heartbeat=Et(g)),g&&m===0)throw new Error("idle_heartbeat requires expires");if(g>m)throw new Error("expires must be greater than idle_heartbeat");if(this.info){this.monitor&&this.monitor.cancel(),m&&g&&(this.monitor?this.monitor._change(g,m):this._setupHbMonitoring(g,m));const v=this.info.api,_=`${v.prefix}.CONSUMER.MSG.NEXT.${a}.${d}`,S=this.sub.subject;v.nc.publish(_,v.jc.encode(p),{reply:S})}}}function yO(i,s){return i?vO(s):gO(s)}function gO(i){return(s,a)=>s?[s,null]:(s=hl(a),s?[s,null]:[null,xu(a,i)])}function vO(i){return(s,a)=>{if(s)return[s,null];const o=hl(a);return o!==null?[_E(o),null]:[null,xu(a,i)]}}function _E(i){if(i!==null)switch(i.code){case ue.JetStream404NoMessages:case ue.JetStream408RequestTimeout:return null;case ue.JetStream409:return qC(i)?i:null;default:return i}return null}function xO(i){i&&i.ack()}function NO(i){const s=i.split(".");if(s.length===9&&s.splice(2,0,"_",""),s.length<11||s[0]!=="$JS"||s[1]!=="ACK")throw new Error("not js message");const a={};return a.domain=s[2]==="_"?"":s[2],a.account_hash=s[3],a.stream=s[4],a.consumer=s[5],a.deliveryCount=parseInt(s[6],10),a.redeliveryCount=a.deliveryCount,a.redelivered=a.deliveryCount>1,a.streamSequence=parseInt(s[7],10),a.deliverySequence=parseInt(s[8],10),a.timestampNanos=parseInt(s[9],10),a.pending=parseInt(s[10],10),a}class wO{constructor(s,a){w(this,"msg");w(this,"di");w(this,"didAck");w(this,"timeout");this.msg=s,this.didAck=!1,this.timeout=a}get subject(){return this.msg.subject}get sid(){return this.msg.sid}get data(){return this.msg.data}get headers(){return this.msg.headers}get info(){return this.di||(this.di=NO(this.reply)),this.di}get redelivered(){return this.info.deliveryCount>1}get reply(){return this.msg.reply||""}get seq(){return this.info.streamSequence}doAck(s){this.didAck||(this.didAck=!this.isWIP(s),this.msg.respond(s))}isWIP(s){return s.length===4&&s[0]===au[0]&&s[1]===au[1]&&s[2]===au[2]&&s[3]===au[3]}async ackAck(s){var o;s=s||{},s.timeout=s.timeout||this.timeout;const a=_t();if(this.didAck)a.resolve(!1);else if(this.didAck=!0,this.msg.reply){const d=this.msg.publisher,p=!((o=d.options)!=null&&o.noAsyncTraces),m=new mE(d.muxSubscriptions,this.msg.reply,{timeout:s.timeout},p);d.request(m);try{d.publish(this.msg.reply,gS,{reply:`${d.muxSubscriptions.baseInbox}${m.token}`})}catch(g){m.cancel(g)}try{await Promise.race([m.timer,m.deferred]),a.resolve(!0)}catch(g){m.cancel(g),a.reject(g)}}else a.resolve(!1);return a}ack(){this.doAck(gS)}nak(s){let a=nO;s&&(a=D0().encode(`-NAK ${JSON.stringify({delay:Et(s)})}`)),this.doAck(a)}working(){this.doAck(au)}next(s,a={batch:1}){const o={};o.batch=a.batch||1,o.no_wait=a.no_wait||!1,a.expires&&a.expires>0&&(o.expires=Et(a.expires));const u=ks().encode(o),d=gl.concat(sO,rO,u),p=s?{reply:s}:void 0;this.msg.respond(d,p)}term(s=""){let a=aO;(s==null?void 0:s.length)>0&&(a=D0().encode(`+TERM ${s}`)),this.doAck(a)}json(){return this.msg.json()}string(){return this.msg.string()}}const SO="1.30.3",EO="nats.ws";class _O{constructor(){w(this,"version");w(this,"lang");w(this,"closeError");w(this,"connected");w(this,"done");w(this,"socket");w(this,"options");w(this,"socketClosed");w(this,"encrypted");w(this,"peeked");w(this,"yields");w(this,"signal");w(this,"closedNotification");this.version=SO,this.lang=EO,this.connected=!1,this.done=!1,this.socketClosed=!1,this.encrypted=!1,this.peeked=!1,this.yields=[],this.signal=_t(),this.closedNotification=_t()}async connect(s,a){const o=_t();if(a.tls)return o.reject(new ge("tls",ue.InvalidOption)),o;this.options=a;const u=s.src;if(a.wsFactory){const{socket:d,encrypted:p}=await a.wsFactory(s.src,a);this.socket=d,this.encrypted=p}else this.encrypted=u.indexOf("wss://")===0,this.socket=new WebSocket(u);return this.socket.binaryType="arraybuffer",this.socket.onopen=()=>{this.isDiscarded()},this.socket.onmessage=d=>{if(this.isDiscarded())return;if(this.yields.push(new Uint8Array(d.data)),this.peeked){this.signal.resolve();return}const p=gl.concat(...this.yields),m=u3(p);if(m!==""){const g=B3.exec(m);if(!g){a.debug&&console.error("!!!",Pd(p)),o.reject(new Error("unexpected response from server"));return}try{const v=JSON.parse(g[1]);U3(v,this.options),this.peeked=!0,this.connected=!0,this.signal.resolve(),o.resolve()}catch(v){o.reject(v);return}}},this.socket.onclose=d=>{if(this.isDiscarded())return;this.socketClosed=!0;let p;this.done||(d.wasClean||(p=new Error(d.reason)),this._closed(p))},this.socket.onerror=d=>{if(this.isDiscarded())return;const p=d,m=new ge(p.message,ue.Unknown,new Error(p.error));o.reject(m)},o}disconnect(){this._closed(void 0,!0)}async _closed(s,a=!0){if(!this.isDiscarded()&&this.connected&&!this.done){if(this.closeError=s,!s)for(;!this.socketClosed&&this.socket.bufferedAmount>0;)await vl(100);this.done=!0;try{this.socket.close(s?1002:1e3,s?s.message:void 0)}catch{}a&&this.closedNotification.resolve(s)}}get isClosed(){return this.done}[Symbol.asyncIterator](){return this.iterate()}async*iterate(){for(;;){if(this.isDiscarded())return;this.yields.length===0&&await this.signal;const s=this.yields;this.yields=[];for(let a=0;a<s.length;a++)this.options.debug&&console.info(`> ${Pd(s[a])}`),yield s[a];if(this.done)break;this.yields.length===0&&(s.length=0,this.yields=s,this.signal=_t())}}isEncrypted(){return this.connected&&this.encrypted}send(s){if(!this.isDiscarded())try{this.socket.send(s.buffer),this.options.debug&&console.info(`< ${Pd(s)}`);return}catch(a){this.options.debug&&console.error(`!!! ${Pd(s)}: ${a}`)}}close(s){return this._closed(s,!1)}closed(){return this.closedNotification}isDiscarded(){return this.done?(this.discard(),!0):!1}discard(){var s;this.done=!0;try{(s=this.socket)==null||s.close()}catch{}}}function AO(i,s){/^(.*:\/\/)(.*)/.test(i)||(typeof s=="boolean"?i=`${s===!0?"https":"http"}://${i}`:i=`https://${i}`);let o=new URL(i);const u=o.protocol.toLowerCase();u==="ws:"&&(s=!1),u==="wss:"&&(s=!0),u!=="https:"&&u!=="http"&&(i=i.replace(/^(.*:\/\/)(.*)/gm,"$2"),o=new URL(`http://${i}`));let d,p;const m=o.hostname,g=o.pathname,v=o.search||"";switch(u){case"http:":case"ws:":case"nats:":p=o.port||"80",d="ws:";break;case"https:":case"wss:":case"tls:":p=o.port||"443",d="wss:";break;default:p=o.port||s===!0?"443":"80",d=s===!0?"wss:":"ws:";break}return`${d}//${m}:${p}${g}${v}`}function DO(i={}){return r3({defaultPort:443,urlParseFn:AO,factory:()=>new _O}),iy.connect(i)}const TO="ws://localhost:9222",CO="dev_api_secret",OO="lt.events";function AE(i,s){const a=i.split("."),o=s.split(".");for(let u=0;u<o.length;u++){const d=o[u];if(d===">")return!0;if(u>=a.length||d!=="*"&&d!==a[u])return!1}return a.length===o.length}const xh=z.createContext({connected:!1,subscribe:()=>()=>{}});function RO(){const{connected:i}=z.useContext(xh);return{connected:i}}function DE(i,s){const{subscribe:a}=z.useContext(xh),o=z.useRef(s);o.current=s,z.useEffect(()=>a(i,d=>o.current(d)),[a,i])}const jO=z.createContext({connected:!1,subscribe:()=>()=>{}}),MO=D0();function kO({children:i,url:s,token:a}){const o=z.useRef(null),u=z.useRef(null),[d,p]=z.useState(!1),m=z.useRef(null),g=z.useRef(new Map),v=z.useCallback((D,B)=>{const j=g.current;return j.has(D)||j.set(D,new Set),j.get(D).add(B),()=>{const F=j.get(D);F&&(F.delete(B),F.size===0&&j.delete(D))}},[]),_=z.useCallback((D,B)=>{for(const[j,F]of g.current)if(AE(D,j))for(const Q of F)try{Q(B)}catch{}},[]),S=z.useCallback(async()=>{try{if(o.current)return;const D=await DO({servers:s||TO,token:a||CO,reconnect:!0,maxReconnectAttempts:-1,reconnectTimeWait:2e3});o.current=D,p(!0);const B=D.subscribe("lt.>");u.current=B,(async()=>{for await(const j of B)try{const F=JSON.parse(MO.decode(j.data));_(j.subject,F)}catch{}})(),(async()=>{for await(const j of D.status())j.type==="disconnect"||j.type==="error"?p(!1):j.type==="reconnect"&&p(!0)})()}catch{p(!1),m.current=setTimeout(S,3e3)}},[_]);return z.useEffect(()=>(S(),()=>{m.current&&clearTimeout(m.current),u.current&&u.current.unsubscribe(),o.current&&(o.current.close().catch(()=>{}),o.current=null),p(!1)}),[S]),b.jsxDEV(jO.Provider,{value:{connected:d,subscribe:v},children:b.jsxDEV(xh.Provider,{value:{connected:d,subscribe:v},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useNats.tsx",lineNumber:200,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/hooks/useNats.tsx",lineNumber:199,columnNumber:5},this)}const Na=Object.create(null);Na.open="0";Na.close="1";Na.ping="2";Na.pong="3";Na.message="4";Na.upgrade="5";Na.noop="6";const eh=Object.create(null);Object.keys(Na).forEach(i=>{eh[Na[i]]=i});const H0={type:"error",data:"parser error"},TE=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",CE=typeof ArrayBuffer=="function",OE=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,oy=({type:i,data:s},a,o)=>TE&&s instanceof Blob?a?o(s):xS(s,o):CE&&(s instanceof ArrayBuffer||OE(s))?a?o(s):xS(new Blob([s]),o):o(Na[i]+(s||"")),xS=(i,s)=>{const a=new FileReader;return a.onload=function(){const o=a.result.split(",")[1];s("b"+(o||""))},a.readAsDataURL(i)};function NS(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let y0;function VO(i,s){if(TE&&i.data instanceof Blob)return i.data.arrayBuffer().then(NS).then(s);if(CE&&(i.data instanceof ArrayBuffer||OE(i.data)))return s(NS(i.data));oy(i,!1,a=>{y0||(y0=new TextEncoder),s(y0.encode(a))})}const wS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",uu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<wS.length;i++)uu[wS.charCodeAt(i)]=i;const UO=i=>{let s=i.length*.75,a=i.length,o,u=0,d,p,m,g;i[i.length-1]==="="&&(s--,i[i.length-2]==="="&&s--);const v=new ArrayBuffer(s),_=new Uint8Array(v);for(o=0;o<a;o+=4)d=uu[i.charCodeAt(o)],p=uu[i.charCodeAt(o+1)],m=uu[i.charCodeAt(o+2)],g=uu[i.charCodeAt(o+3)],_[u++]=d<<2|p>>4,_[u++]=(p&15)<<4|m>>2,_[u++]=(m&3)<<6|g&63;return v},zO=typeof ArrayBuffer=="function",ly=(i,s)=>{if(typeof i!="string")return{type:"message",data:RE(i,s)};const a=i.charAt(0);return a==="b"?{type:"message",data:BO(i.substring(1),s)}:eh[a]?i.length>1?{type:eh[a],data:i.substring(1)}:{type:eh[a]}:H0},BO=(i,s)=>{if(zO){const a=UO(i);return RE(a,s)}else return{base64:!0,data:i}},RE=(i,s)=>{switch(s){case"blob":return i instanceof Blob?i:new Blob([i]);case"arraybuffer":default:return i instanceof ArrayBuffer?i:i.buffer}},jE="",qO=(i,s)=>{const a=i.length,o=new Array(a);let u=0;i.forEach((d,p)=>{oy(d,!1,m=>{o[p]=m,++u===a&&s(o.join(jE))})})},LO=(i,s)=>{const a=i.split(jE),o=[];for(let u=0;u<a.length;u++){const d=ly(a[u],s);if(o.push(d),d.type==="error")break}return o};function HO(){return new TransformStream({transform(i,s){VO(i,a=>{const o=a.length;let u;if(o<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,o);else if(o<65536){u=new Uint8Array(3);const d=new DataView(u.buffer);d.setUint8(0,126),d.setUint16(1,o)}else{u=new Uint8Array(9);const d=new DataView(u.buffer);d.setUint8(0,127),d.setBigUint64(1,BigInt(o))}i.data&&typeof i.data!="string"&&(u[0]|=128),s.enqueue(u),s.enqueue(a)})}})}let g0;function Yd(i){return i.reduce((s,a)=>s+a.length,0)}function Gd(i,s){if(i[0].length===s)return i.shift();const a=new Uint8Array(s);let o=0;for(let u=0;u<s;u++)a[u]=i[0][o++],o===i[0].length&&(i.shift(),o=0);return i.length&&o<i[0].length&&(i[0]=i[0].slice(o)),a}function PO(i,s){g0||(g0=new TextDecoder);const a=[];let o=0,u=-1,d=!1;return new TransformStream({transform(p,m){for(a.push(p);;){if(o===0){if(Yd(a)<1)break;const g=Gd(a,1);d=(g[0]&128)===128,u=g[0]&127,u<126?o=3:u===126?o=1:o=2}else if(o===1){if(Yd(a)<2)break;const g=Gd(a,2);u=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),o=3}else if(o===2){if(Yd(a)<8)break;const g=Gd(a,8),v=new DataView(g.buffer,g.byteOffset,g.length),_=v.getUint32(0);if(_>Math.pow(2,21)-1){m.enqueue(H0);break}u=_*Math.pow(2,32)+v.getUint32(4),o=3}else{if(Yd(a)<u)break;const g=Gd(a,u);m.enqueue(ly(d?g:g0.decode(g),s)),o=0}if(u===0||u>i){m.enqueue(H0);break}}}})}const ME=4;function Ft(i){if(i)return $O(i)}function $O(i){for(var s in Ft.prototype)i[s]=Ft.prototype[s];return i}Ft.prototype.on=Ft.prototype.addEventListener=function(i,s){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(s),this};Ft.prototype.once=function(i,s){function a(){this.off(i,a),s.apply(this,arguments)}return a.fn=s,this.on(i,a),this};Ft.prototype.off=Ft.prototype.removeListener=Ft.prototype.removeAllListeners=Ft.prototype.removeEventListener=function(i,s){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+i];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var o,u=0;u<a.length;u++)if(o=a[u],o===s||o.fn===s){a.splice(u,1);break}return a.length===0&&delete this._callbacks["$"+i],this};Ft.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var s=new Array(arguments.length-1),a=this._callbacks["$"+i],o=1;o<arguments.length;o++)s[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,u=a.length;o<u;++o)a[o].apply(this,s)}return this};Ft.prototype.emitReserved=Ft.prototype.emit;Ft.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]};Ft.prototype.hasListeners=function(i){return!!this.listeners(i).length};const Nh=typeof Promise=="function"&&typeof Promise.resolve=="function"?s=>Promise.resolve().then(s):(s,a)=>a(s,0),gs=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),IO="arraybuffer";function kE(i,...s){return s.reduce((a,o)=>(i.hasOwnProperty(o)&&(a[o]=i[o]),a),{})}const FO=gs.setTimeout,YO=gs.clearTimeout;function wh(i,s){s.useNativeTimers?(i.setTimeoutFn=FO.bind(gs),i.clearTimeoutFn=YO.bind(gs)):(i.setTimeoutFn=gs.setTimeout.bind(gs),i.clearTimeoutFn=gs.clearTimeout.bind(gs))}const GO=1.33;function JO(i){return typeof i=="string"?XO(i):Math.ceil((i.byteLength||i.size)*GO)}function XO(i){let s=0,a=0;for(let o=0,u=i.length;o<u;o++)s=i.charCodeAt(o),s<128?a+=1:s<2048?a+=2:s<55296||s>=57344?a+=3:(o++,a+=4);return a}function VE(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function QO(i){let s="";for(let a in i)i.hasOwnProperty(a)&&(s.length&&(s+="&"),s+=encodeURIComponent(a)+"="+encodeURIComponent(i[a]));return s}function ZO(i){let s={},a=i.split("&");for(let o=0,u=a.length;o<u;o++){let d=a[o].split("=");s[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return s}class KO extends Error{constructor(s,a,o){super(s),this.description=a,this.context=o,this.type="TransportError"}}class cy extends Ft{constructor(s){super(),this.writable=!1,wh(this,s),this.opts=s,this.query=s.query,this.socket=s.socket,this.supportsBinary=!s.forceBase64}onError(s,a,o){return super.emitReserved("error",new KO(s,a,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(s){this.readyState==="open"&&this.write(s)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(s){const a=ly(s,this.socket.binaryType);this.onPacket(a)}onPacket(s){super.emitReserved("packet",s)}onClose(s){this.readyState="closed",super.emitReserved("close",s)}pause(s){}createUri(s,a={}){return s+"://"+this._hostname()+this._port()+this.opts.path+this._query(a)}_hostname(){const s=this.opts.hostname;return s.indexOf(":")===-1?s:"["+s+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(s){const a=QO(s);return a.length?"?"+a:""}}class WO extends cy{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(s){this.readyState="pausing";const a=()=>{this.readyState="paused",s()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||a()})),this.writable||(o++,this.once("drain",function(){--o||a()}))}else a()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(s){const a=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};LO(s,this.socket.binaryType).forEach(a),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const s=()=>{this.write([{type:"close"}])};this.readyState==="open"?s():this.once("open",s)}write(s){this.writable=!1,qO(s,a=>{this.doWrite(a,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const s=this.opts.secure?"https":"http",a=this.query||{};return this.opts.timestampRequests!==!1&&(a[this.opts.timestampParam]=VE()),!this.supportsBinary&&!a.sid&&(a.b64=1),this.createUri(s,a)}}let UE=!1;try{UE=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const e5=UE;function t5(){}class n5 extends WO{constructor(s){if(super(s),typeof location<"u"){const a=location.protocol==="https:";let o=location.port;o||(o=a?"443":"80"),this.xd=typeof location<"u"&&s.hostname!==location.hostname||o!==s.port}}doWrite(s,a){const o=this.request({method:"POST",data:s});o.on("success",a),o.on("error",(u,d)=>{this.onError("xhr post error",u,d)})}doPoll(){const s=this.request();s.on("data",this.onData.bind(this)),s.on("error",(a,o)=>{this.onError("xhr poll error",a,o)}),this.pollXhr=s}}class xa extends Ft{constructor(s,a,o){super(),this.createRequest=s,wh(this,o),this._opts=o,this._method=o.method||"GET",this._uri=a,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var s;const a=kE(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");a.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(a);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let u in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(u)&&o.setRequestHeader(u,this._opts.extraHeaders[u])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(s=this._opts.cookieJar)===null||s===void 0||s.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var u;o.readyState===3&&((u=this._opts.cookieJar)===null||u===void 0||u.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(u){this.setTimeoutFn(()=>{this._onError(u)},0);return}typeof document<"u"&&(this._index=xa.requestsCount++,xa.requests[this._index]=this)}_onError(s){this.emitReserved("error",s,this._xhr),this._cleanup(!0)}_cleanup(s){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=t5,s)try{this._xhr.abort()}catch{}typeof document<"u"&&delete xa.requests[this._index],this._xhr=null}}_onLoad(){const s=this._xhr.responseText;s!==null&&(this.emitReserved("data",s),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}xa.requestsCount=0;xa.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",SS);else if(typeof addEventListener=="function"){const i="onpagehide"in gs?"pagehide":"unload";addEventListener(i,SS,!1)}}function SS(){for(let i in xa.requests)xa.requests.hasOwnProperty(i)&&xa.requests[i].abort()}const s5=(function(){const i=zE({xdomain:!1});return i&&i.responseType!==null})();class a5 extends n5{constructor(s){super(s);const a=s&&s.forceBase64;this.supportsBinary=s5&&!a}request(s={}){return Object.assign(s,{xd:this.xd},this.opts),new xa(zE,this.uri(),s)}}function zE(i){const s=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!s||e5))return new XMLHttpRequest}catch{}if(!s)try{return new gs[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const BE=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class r5 extends cy{get name(){return"websocket"}doOpen(){const s=this.uri(),a=this.opts.protocols,o=BE?{}:kE(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(s,a,o)}catch(u){return this.emitReserved("error",u)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=s=>this.onClose({description:"websocket connection closed",context:s}),this.ws.onmessage=s=>this.onData(s.data),this.ws.onerror=s=>this.onError("websocket error",s)}write(s){this.writable=!1;for(let a=0;a<s.length;a++){const o=s[a],u=a===s.length-1;oy(o,this.supportsBinary,d=>{try{this.doWrite(o,d)}catch{}u&&Nh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const s=this.opts.secure?"wss":"ws",a=this.query||{};return this.opts.timestampRequests&&(a[this.opts.timestampParam]=VE()),this.supportsBinary||(a.b64=1),this.createUri(s,a)}}const v0=gs.WebSocket||gs.MozWebSocket;class i5 extends r5{createSocket(s,a,o){return BE?new v0(s,a,o):a?new v0(s,a):new v0(s)}doWrite(s,a){this.ws.send(a)}}class o5 extends cy{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(s){return this.emitReserved("error",s)}this._transport.closed.then(()=>{this.onClose()}).catch(s=>{this.onError("webtransport error",s)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(s=>{const a=PO(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=s.readable.pipeThrough(a).getReader(),u=HO();u.readable.pipeTo(s.writable),this._writer=u.writable.getWriter();const d=()=>{o.read().then(({done:m,value:g})=>{m||(this.onPacket(g),d())}).catch(m=>{})};d();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this._writer.write(p).then(()=>this.onOpen())})})}write(s){this.writable=!1;for(let a=0;a<s.length;a++){const o=s[a],u=a===s.length-1;this._writer.write(o).then(()=>{u&&Nh(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var s;(s=this._transport)===null||s===void 0||s.close()}}const l5={websocket:i5,webtransport:o5,polling:a5},c5=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,u5=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function P0(i){if(i.length>8e3)throw"URI too long";const s=i,a=i.indexOf("["),o=i.indexOf("]");a!=-1&&o!=-1&&(i=i.substring(0,a)+i.substring(a,o).replace(/:/g,";")+i.substring(o,i.length));let u=c5.exec(i||""),d={},p=14;for(;p--;)d[u5[p]]=u[p]||"";return a!=-1&&o!=-1&&(d.source=s,d.host=d.host.substring(1,d.host.length-1).replace(/;/g,":"),d.authority=d.authority.replace("[","").replace("]","").replace(/;/g,":"),d.ipv6uri=!0),d.pathNames=f5(d,d.path),d.queryKey=d5(d,d.query),d}function f5(i,s){const a=/\/{2,9}/g,o=s.replace(a,"/").split("/");return(s.slice(0,1)=="/"||s.length===0)&&o.splice(0,1),s.slice(-1)=="/"&&o.splice(o.length-1,1),o}function d5(i,s){const a={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,u,d){u&&(a[u]=d)}),a}const $0=typeof addEventListener=="function"&&typeof removeEventListener=="function",th=[];$0&&addEventListener("offline",()=>{th.forEach(i=>i())},!1);class ai extends Ft{constructor(s,a){if(super(),this.binaryType=IO,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,s&&typeof s=="object"&&(a=s,s=null),s){const o=P0(s);a.hostname=o.host,a.secure=o.protocol==="https"||o.protocol==="wss",a.port=o.port,o.query&&(a.query=o.query)}else a.host&&(a.hostname=P0(a.host).host);wh(this,a),this.secure=a.secure!=null?a.secure:typeof location<"u"&&location.protocol==="https:",a.hostname&&!a.port&&(a.port=this.secure?"443":"80"),this.hostname=a.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=a.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},a.transports.forEach(o=>{const u=o.prototype.name;this.transports.push(u),this._transportsByName[u]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},a),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=ZO(this.opts.query)),$0&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},th.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(s){const a=Object.assign({},this.opts.query);a.EIO=ME,a.transport=s,this.id&&(a.sid=this.id);const o=Object.assign({},this.opts,{query:a,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[s]);return new this._transportsByName[s](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const s=this.opts.rememberUpgrade&&ai.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const a=this.createTransport(s);a.open(),this.setTransport(a)}setTransport(s){this.transport&&this.transport.removeAllListeners(),this.transport=s,s.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",a=>this._onClose("transport close",a))}onOpen(){this.readyState="open",ai.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",s),this.emitReserved("heartbeat"),s.type){case"open":this.onHandshake(JSON.parse(s.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const a=new Error("server error");a.code=s.data,this._onError(a);break;case"message":this.emitReserved("data",s.data),this.emitReserved("message",s.data);break}}onHandshake(s){this.emitReserved("handshake",s),this.id=s.sid,this.transport.query.sid=s.sid,this._pingInterval=s.pingInterval,this._pingTimeout=s.pingTimeout,this._maxPayload=s.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const s=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+s,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},s),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const s=this._getWritablePackets();this.transport.send(s),this._prevBufferLen=s.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let a=1;for(let o=0;o<this.writeBuffer.length;o++){const u=this.writeBuffer[o].data;if(u&&(a+=JO(u)),o>0&&a>this._maxPayload)return this.writeBuffer.slice(0,o);a+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const s=Date.now()>this._pingTimeoutTime;return s&&(this._pingTimeoutTime=0,Nh(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),s}write(s,a,o){return this._sendPacket("message",s,a,o),this}send(s,a,o){return this._sendPacket("message",s,a,o),this}_sendPacket(s,a,o,u){if(typeof a=="function"&&(u=a,a=void 0),typeof o=="function"&&(u=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const d={type:s,data:a,options:o};this.emitReserved("packetCreate",d),this.writeBuffer.push(d),u&&this.once("flush",u),this.flush()}close(){const s=()=>{this._onClose("forced close"),this.transport.close()},a=()=>{this.off("upgrade",a),this.off("upgradeError",a),s()},o=()=>{this.once("upgrade",a),this.once("upgradeError",a)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():s()}):this.upgrading?o():s()),this}_onError(s){if(ai.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",s),this._onClose("transport error",s)}_onClose(s,a){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),$0&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=th.indexOf(this._offlineEventListener);o!==-1&&th.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",s,a),this.writeBuffer=[],this._prevBufferLen=0}}}ai.protocol=ME;class h5 extends ai{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let s=0;s<this._upgrades.length;s++)this._probe(this._upgrades[s])}_probe(s){let a=this.createTransport(s),o=!1;ai.priorWebsocketSuccess=!1;const u=()=>{o||(a.send([{type:"ping",data:"probe"}]),a.once("packet",S=>{if(!o)if(S.type==="pong"&&S.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",a),!a)return;ai.priorWebsocketSuccess=a.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(_(),this.setTransport(a),a.send([{type:"upgrade"}]),this.emitReserved("upgrade",a),a=null,this.upgrading=!1,this.flush())})}else{const D=new Error("probe error");D.transport=a.name,this.emitReserved("upgradeError",D)}}))};function d(){o||(o=!0,_(),a.close(),a=null)}const p=S=>{const D=new Error("probe error: "+S);D.transport=a.name,d(),this.emitReserved("upgradeError",D)};function m(){p("transport closed")}function g(){p("socket closed")}function v(S){a&&S.name!==a.name&&d()}const _=()=>{a.removeListener("open",u),a.removeListener("error",p),a.removeListener("close",m),this.off("close",g),this.off("upgrading",v)};a.once("open",u),a.once("error",p),a.once("close",m),this.once("close",g),this.once("upgrading",v),this._upgrades.indexOf("webtransport")!==-1&&s!=="webtransport"?this.setTimeoutFn(()=>{o||a.open()},200):a.open()}onHandshake(s){this._upgrades=this._filterUpgrades(s.upgrades),super.onHandshake(s)}_filterUpgrades(s){const a=[];for(let o=0;o<s.length;o++)~this.transports.indexOf(s[o])&&a.push(s[o]);return a}}let m5=class extends h5{constructor(s,a={}){const o=typeof s=="object"?s:a;(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(u=>l5[u]).filter(u=>!!u)),super(s,o)}};function p5(i,s="",a){let o=i;a=a||typeof location<"u"&&location,i==null&&(i=a.protocol+"//"+a.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=a.protocol+i:i=a.host+i),/^(https?|wss?):\/\//.test(i)||(typeof a<"u"?i=a.protocol+"//"+i:i="https://"+i),o=P0(i)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const d=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+d+":"+o.port+s,o.href=o.protocol+"://"+d+(a&&a.port===o.port?"":":"+o.port),o}const b5=typeof ArrayBuffer=="function",y5=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,qE=Object.prototype.toString,g5=typeof Blob=="function"||typeof Blob<"u"&&qE.call(Blob)==="[object BlobConstructor]",v5=typeof File=="function"||typeof File<"u"&&qE.call(File)==="[object FileConstructor]";function uy(i){return b5&&(i instanceof ArrayBuffer||y5(i))||g5&&i instanceof Blob||v5&&i instanceof File}function nh(i,s){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let a=0,o=i.length;a<o;a++)if(nh(i[a]))return!0;return!1}if(uy(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return nh(i.toJSON(),!0);for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&nh(i[a]))return!0;return!1}function x5(i){const s=[],a=i.data,o=i;return o.data=I0(a,s),o.attachments=s.length,{packet:o,buffers:s}}function I0(i,s){if(!i)return i;if(uy(i)){const a={_placeholder:!0,num:s.length};return s.push(i),a}else if(Array.isArray(i)){const a=new Array(i.length);for(let o=0;o<i.length;o++)a[o]=I0(i[o],s);return a}else if(typeof i=="object"&&!(i instanceof Date)){const a={};for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&(a[o]=I0(i[o],s));return a}return i}function N5(i,s){return i.data=F0(i.data,s),delete i.attachments,i}function F0(i,s){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<s.length)return s[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let a=0;a<i.length;a++)i[a]=F0(i[a],s);else if(typeof i=="object")for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&(i[a]=F0(i[a],s));return i}var Jd={exports:{}},x0,ES;function w5(){if(ES)return x0;ES=1;var i=1e3,s=i*60,a=s*60,o=a*24,u=o*7,d=o*365.25;x0=function(_,S){S=S||{};var D=typeof _;if(D==="string"&&_.length>0)return p(_);if(D==="number"&&isFinite(_))return S.long?g(_):m(_);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(_))};function p(_){if(_=String(_),!(_.length>100)){var S=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(_);if(S){var D=parseFloat(S[1]),B=(S[2]||"ms").toLowerCase();switch(B){case"years":case"year":case"yrs":case"yr":case"y":return D*d;case"weeks":case"week":case"w":return D*u;case"days":case"day":case"d":return D*o;case"hours":case"hour":case"hrs":case"hr":case"h":return D*a;case"minutes":case"minute":case"mins":case"min":case"m":return D*s;case"seconds":case"second":case"secs":case"sec":case"s":return D*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return D;default:return}}}}function m(_){var S=Math.abs(_);return S>=o?Math.round(_/o)+"d":S>=a?Math.round(_/a)+"h":S>=s?Math.round(_/s)+"m":S>=i?Math.round(_/i)+"s":_+"ms"}function g(_){var S=Math.abs(_);return S>=o?v(_,S,o,"day"):S>=a?v(_,S,a,"hour"):S>=s?v(_,S,s,"minute"):S>=i?v(_,S,i,"second"):_+" ms"}function v(_,S,D,B){var j=S>=D*1.5;return Math.round(_/D)+" "+B+(j?"s":"")}return x0}var N0,_S;function S5(){if(_S)return N0;_S=1;function i(s){o.debug=o,o.default=o,o.coerce=v,o.disable=m,o.enable=d,o.enabled=g,o.humanize=w5(),o.destroy=_,Object.keys(s).forEach(S=>{o[S]=s[S]}),o.names=[],o.skips=[],o.formatters={};function a(S){let D=0;for(let B=0;B<S.length;B++)D=(D<<5)-D+S.charCodeAt(B),D|=0;return o.colors[Math.abs(D)%o.colors.length]}o.selectColor=a;function o(S){let D,B=null,j,F;function Q(...ee){if(!Q.enabled)return;const te=Q,Se=Number(new Date),De=Se-(D||Se);te.diff=De,te.prev=D,te.curr=Se,D=Se,ee[0]=o.coerce(ee[0]),typeof ee[0]!="string"&&ee.unshift("%O");let q=0;ee[0]=ee[0].replace(/%([a-zA-Z%])/g,(oe,W)=>{if(oe==="%%")return"%";q++;const X=o.formatters[W];if(typeof X=="function"){const H=ee[q];oe=X.call(te,H),ee.splice(q,1),q--}return oe}),o.formatArgs.call(te,ee),(te.log||o.log).apply(te,ee)}return Q.namespace=S,Q.useColors=o.useColors(),Q.color=o.selectColor(S),Q.extend=u,Q.destroy=o.destroy,Object.defineProperty(Q,"enabled",{enumerable:!0,configurable:!1,get:()=>B!==null?B:(j!==o.namespaces&&(j=o.namespaces,F=o.enabled(S)),F),set:ee=>{B=ee}}),typeof o.init=="function"&&o.init(Q),Q}function u(S,D){const B=o(this.namespace+(typeof D>"u"?":":D)+S);return B.log=this.log,B}function d(S){o.save(S),o.namespaces=S,o.names=[],o.skips=[];const D=(typeof S=="string"?S:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const B of D)B[0]==="-"?o.skips.push(B.slice(1)):o.names.push(B)}function p(S,D){let B=0,j=0,F=-1,Q=0;for(;B<S.length;)if(j<D.length&&(D[j]===S[B]||D[j]==="*"))D[j]==="*"?(F=j,Q=B,j++):(B++,j++);else if(F!==-1)j=F+1,Q++,B=Q;else return!1;for(;j<D.length&&D[j]==="*";)j++;return j===D.length}function m(){const S=[...o.names,...o.skips.map(D=>"-"+D)].join(",");return o.enable(""),S}function g(S){for(const D of o.skips)if(p(S,D))return!1;for(const D of o.names)if(p(S,D))return!0;return!1}function v(S){return S instanceof Error?S.stack||S.message:S}function _(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o.enable(o.load()),o}return N0=i,N0}var AS;function E5(){return AS||(AS=1,(function(i,s){var a={};s.formatArgs=u,s.save=d,s.load=p,s.useColors=o,s.storage=m(),s.destroy=(()=>{let v=!1;return()=>{v||(v=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function o(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let v;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(v=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(v[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function u(v){if(v[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+v[0]+(this.useColors?"%c ":" ")+"+"+i.exports.humanize(this.diff),!this.useColors)return;const _="color: "+this.color;v.splice(1,0,_,"color: inherit");let S=0,D=0;v[0].replace(/%[a-zA-Z%]/g,B=>{B!=="%%"&&(S++,B==="%c"&&(D=S))}),v.splice(D,0,_)}s.log=console.debug||console.log||(()=>{});function d(v){try{v?s.storage.setItem("debug",v):s.storage.removeItem("debug")}catch{}}function p(){let v;try{v=s.storage.getItem("debug")||s.storage.getItem("DEBUG")}catch{}return!v&&typeof process<"u"&&"env"in process&&(v=a.DEBUG),v}function m(){try{return localStorage}catch{}}i.exports=S5()(s);const{formatters:g}=i.exports;g.j=function(v){try{return JSON.stringify(v)}catch(_){return"[UnexpectedJSONParseError]: "+_.message}}})(Jd,Jd.exports)),Jd.exports}var _5=E5();const A5=qT(_5),Y0=A5("socket.io-parser"),D5=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var We;(function(i){i[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK"})(We||(We={}));class T5{constructor(s){this.replacer=s}encode(s){return Y0("encoding packet %j",s),(s.type===We.EVENT||s.type===We.ACK)&&nh(s)?this.encodeAsBinary({type:s.type===We.EVENT?We.BINARY_EVENT:We.BINARY_ACK,nsp:s.nsp,data:s.data,id:s.id}):[this.encodeAsString(s)]}encodeAsString(s){let a=""+s.type;return(s.type===We.BINARY_EVENT||s.type===We.BINARY_ACK)&&(a+=s.attachments+"-"),s.nsp&&s.nsp!=="/"&&(a+=s.nsp+","),s.id!=null&&(a+=s.id),s.data!=null&&(a+=JSON.stringify(s.data,this.replacer)),Y0("encoded %j as %s",s,a),a}encodeAsBinary(s){const a=x5(s),o=this.encodeAsString(a.packet),u=a.buffers;return u.unshift(o),u}}class fy extends Ft{constructor(s){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof s=="function"?{reviver:s}:s)}add(s){let a;if(typeof s=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");a=this.decodeString(s);const o=a.type===We.BINARY_EVENT;o||a.type===We.BINARY_ACK?(a.type=o?We.EVENT:We.ACK,this.reconstructor=new C5(a),a.attachments===0&&super.emitReserved("decoded",a)):super.emitReserved("decoded",a)}else if(uy(s)||s.base64)if(this.reconstructor)a=this.reconstructor.takeBinaryData(s),a&&(this.reconstructor=null,super.emitReserved("decoded",a));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+s)}decodeString(s){let a=0;const o={type:Number(s.charAt(0))};if(We[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===We.BINARY_EVENT||o.type===We.BINARY_ACK){const d=a+1;for(;s.charAt(++a)!=="-"&&a!=s.length;);const p=s.substring(d,a);if(p!=Number(p)||s.charAt(a)!=="-")throw new Error("Illegal attachments");const m=Number(p);if(!O5(m)||m<0)throw new Error("Illegal attachments");if(m>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=m}if(s.charAt(a+1)==="/"){const d=a+1;for(;++a&&!(s.charAt(a)===","||a===s.length););o.nsp=s.substring(d,a)}else o.nsp="/";const u=s.charAt(a+1);if(u!==""&&Number(u)==u){const d=a+1;for(;++a;){const p=s.charAt(a);if(p==null||Number(p)!=p){--a;break}if(a===s.length)break}o.id=Number(s.substring(d,a+1))}if(s.charAt(++a)){const d=this.tryParse(s.substr(a));if(fy.isPayloadValid(o.type,d))o.data=d;else throw new Error("invalid payload")}return Y0("decoded %s as %j",s,o),o}tryParse(s){try{return JSON.parse(s,this.opts.reviver)}catch{return!1}}static isPayloadValid(s,a){switch(s){case We.CONNECT:return DS(a);case We.DISCONNECT:return a===void 0;case We.CONNECT_ERROR:return typeof a=="string"||DS(a);case We.EVENT:case We.BINARY_EVENT:return Array.isArray(a)&&(typeof a[0]=="number"||typeof a[0]=="string"&&D5.indexOf(a[0])===-1);case We.ACK:case We.BINARY_ACK:return Array.isArray(a)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class C5{constructor(s){this.packet=s,this.buffers=[],this.reconPack=s}takeBinaryData(s){if(this.buffers.push(s),this.buffers.length===this.reconPack.attachments){const a=N5(this.reconPack,this.buffers);return this.finishedReconstruction(),a}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const O5=Number.isInteger||function(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i};function DS(i){return Object.prototype.toString.call(i)==="[object Object]"}const R5=Object.freeze(Object.defineProperty({__proto__:null,Decoder:fy,Encoder:T5,get PacketType(){return We}},Symbol.toStringTag,{value:"Module"}));function js(i,s,a){return i.on(s,a),function(){i.off(s,a)}}const j5=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class LE extends Ft{constructor(s,a,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=s,this.nsp=a,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const s=this.io;this.subs=[js(s,"open",this.onopen.bind(this)),js(s,"packet",this.onpacket.bind(this)),js(s,"error",this.onerror.bind(this)),js(s,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...s){return s.unshift("message"),this.emit.apply(this,s),this}emit(s,...a){var o,u,d;if(j5.hasOwnProperty(s))throw new Error('"'+s.toString()+'" is a reserved event name');if(a.unshift(s),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(a),this;const p={type:We.EVENT,data:a};if(p.options={},p.options.compress=this.flags.compress!==!1,typeof a[a.length-1]=="function"){const _=this.ids++,S=a.pop();this._registerAckCallback(_,S),p.id=_}const m=(u=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||u===void 0?void 0:u.writable,g=this.connected&&!(!((d=this.io.engine)===null||d===void 0)&&d._hasPingExpired());return this.flags.volatile&&!m||(g?(this.notifyOutgoingListeners(p),this.packet(p)):this.sendBuffer.push(p)),this.flags={},this}_registerAckCallback(s,a){var o;const u=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(u===void 0){this.acks[s]=a;return}const d=this.io.setTimeoutFn(()=>{delete this.acks[s];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===s&&this.sendBuffer.splice(m,1);a.call(this,new Error("operation has timed out"))},u),p=(...m)=>{this.io.clearTimeoutFn(d),a.apply(this,m)};p.withError=!0,this.acks[s]=p}emitWithAck(s,...a){return new Promise((o,u)=>{const d=(p,m)=>p?u(p):o(m);d.withError=!0,a.push(d),this.emit(s,...a)})}_addToQueue(s){let a;typeof s[s.length-1]=="function"&&(a=s.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:s,flags:Object.assign({fromQueue:!0},this.flags)};s.push((u,...d)=>(this._queue[0],u!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),a&&a(u)):(this._queue.shift(),a&&a(null,...d)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(s=!1){if(!this.connected||this._queue.length===0)return;const a=this._queue[0];a.pending&&!s||(a.pending=!0,a.tryCount++,this.flags=a.flags,this.emit.apply(this,a.args))}packet(s){s.nsp=this.nsp,this.io._packet(s)}onopen(){typeof this.auth=="function"?this.auth(s=>{this._sendConnectPacket(s)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(s){this.packet({type:We.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},s):s})}onerror(s){this.connected||this.emitReserved("connect_error",s)}onclose(s,a){this.connected=!1,delete this.id,this.emitReserved("disconnect",s,a),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(s=>{if(!this.sendBuffer.some(o=>String(o.id)===s)){const o=this.acks[s];delete this.acks[s],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(s){if(s.nsp===this.nsp)switch(s.type){case We.CONNECT:s.data&&s.data.sid?this.onconnect(s.data.sid,s.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case We.EVENT:case We.BINARY_EVENT:this.onevent(s);break;case We.ACK:case We.BINARY_ACK:this.onack(s);break;case We.DISCONNECT:this.ondisconnect();break;case We.CONNECT_ERROR:this.destroy();const o=new Error(s.data.message);o.data=s.data.data,this.emitReserved("connect_error",o);break}}onevent(s){const a=s.data||[];s.id!=null&&a.push(this.ack(s.id)),this.connected?this.emitEvent(a):this.receiveBuffer.push(Object.freeze(a))}emitEvent(s){if(this._anyListeners&&this._anyListeners.length){const a=this._anyListeners.slice();for(const o of a)o.apply(this,s)}super.emit.apply(this,s),this._pid&&s.length&&typeof s[s.length-1]=="string"&&(this._lastOffset=s[s.length-1])}ack(s){const a=this;let o=!1;return function(...u){o||(o=!0,a.packet({type:We.ACK,id:s,data:u}))}}onack(s){const a=this.acks[s.id];typeof a=="function"&&(delete this.acks[s.id],a.withError&&s.data.unshift(null),a.apply(this,s.data))}onconnect(s,a){this.id=s,this.recovered=a&&this._pid===a,this._pid=a,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(s=>this.emitEvent(s)),this.receiveBuffer=[],this.sendBuffer.forEach(s=>{this.notifyOutgoingListeners(s),this.packet(s)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(s=>s()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:We.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(s){return this.flags.compress=s,this}get volatile(){return this.flags.volatile=!0,this}timeout(s){return this.flags.timeout=s,this}onAny(s){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(s),this}prependAny(s){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(s),this}offAny(s){if(!this._anyListeners)return this;if(s){const a=this._anyListeners;for(let o=0;o<a.length;o++)if(s===a[o])return a.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(s){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(s),this}prependAnyOutgoing(s){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(s),this}offAnyOutgoing(s){if(!this._anyOutgoingListeners)return this;if(s){const a=this._anyOutgoingListeners;for(let o=0;o<a.length;o++)if(s===a[o])return a.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(s){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const a=this._anyOutgoingListeners.slice();for(const o of a)o.apply(this,s.data)}}}function xl(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}xl.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var s=Math.random(),a=Math.floor(s*this.jitter*i);i=(Math.floor(s*10)&1)==0?i-a:i+a}return Math.min(i,this.max)|0};xl.prototype.reset=function(){this.attempts=0};xl.prototype.setMin=function(i){this.ms=i};xl.prototype.setMax=function(i){this.max=i};xl.prototype.setJitter=function(i){this.jitter=i};class G0 extends Ft{constructor(s,a){var o;super(),this.nsps={},this.subs=[],s&&typeof s=="object"&&(a=s,s=void 0),a=a||{},a.path=a.path||"/socket.io",this.opts=a,wh(this,a),this.reconnection(a.reconnection!==!1),this.reconnectionAttempts(a.reconnectionAttempts||1/0),this.reconnectionDelay(a.reconnectionDelay||1e3),this.reconnectionDelayMax(a.reconnectionDelayMax||5e3),this.randomizationFactor((o=a.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new xl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(a.timeout==null?2e4:a.timeout),this._readyState="closed",this.uri=s;const u=a.parser||R5;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=a.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(s){return arguments.length?(this._reconnection=!!s,s||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(s){return s===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=s,this)}reconnectionDelay(s){var a;return s===void 0?this._reconnectionDelay:(this._reconnectionDelay=s,(a=this.backoff)===null||a===void 0||a.setMin(s),this)}randomizationFactor(s){var a;return s===void 0?this._randomizationFactor:(this._randomizationFactor=s,(a=this.backoff)===null||a===void 0||a.setJitter(s),this)}reconnectionDelayMax(s){var a;return s===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=s,(a=this.backoff)===null||a===void 0||a.setMax(s),this)}timeout(s){return arguments.length?(this._timeout=s,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(s){if(~this._readyState.indexOf("open"))return this;this.engine=new m5(this.uri,this.opts);const a=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const u=js(a,"open",function(){o.onopen(),s&&s()}),d=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),s?s(m):this.maybeReconnectOnOpen()},p=js(a,"error",d);if(this._timeout!==!1){const m=this._timeout,g=this.setTimeoutFn(()=>{u(),d(new Error("timeout")),a.close()},m);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(u),this.subs.push(p),this}connect(s){return this.open(s)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const s=this.engine;this.subs.push(js(s,"ping",this.onping.bind(this)),js(s,"data",this.ondata.bind(this)),js(s,"error",this.onerror.bind(this)),js(s,"close",this.onclose.bind(this)),js(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(s){try{this.decoder.add(s)}catch(a){this.onclose("parse error",a)}}ondecoded(s){Nh(()=>{this.emitReserved("packet",s)},this.setTimeoutFn)}onerror(s){this.emitReserved("error",s)}socket(s,a){let o=this.nsps[s];return o?this._autoConnect&&!o.active&&o.connect():(o=new LE(this,s,a),this.nsps[s]=o),o}_destroy(s){const a=Object.keys(this.nsps);for(const o of a)if(this.nsps[o].active)return;this._close()}_packet(s){const a=this.encoder.encode(s);for(let o=0;o<a.length;o++)this.engine.write(a[o],s.options)}cleanup(){this.subs.forEach(s=>s()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(s,a){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",s,a),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const s=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const a=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{s.skipReconnect||(this.emitReserved("reconnect_attempt",s.backoff.attempts),!s.skipReconnect&&s.open(u=>{u?(s._reconnecting=!1,s.reconnect(),this.emitReserved("reconnect_error",u)):s.onreconnect()}))},a);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const s=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",s)}}const ru={};function sh(i,s){typeof i=="object"&&(s=i,i=void 0),s=s||{};const a=p5(i,s.path||"/socket.io"),o=a.source,u=a.id,d=a.path,p=ru[u]&&d in ru[u].nsps,m=s.forceNew||s["force new connection"]||s.multiplex===!1||p;let g;return m?g=new G0(o,s):(ru[u]||(ru[u]=new G0(o,s)),g=ru[u]),a.query&&!s.query&&(s.query=a.queryKey),g.socket(a.path,s)}Object.assign(sh,{Manager:G0,Socket:LE,io:sh,connect:sh});const M5=z.createContext({connected:!1,subscribe:()=>()=>{}});function k5({children:i}){const s=z.useRef(null),[a,o]=z.useState(!1),u=z.useRef(new Map),d=z.useCallback((m,g)=>{const v=u.current;return v.has(m)||v.set(m,new Set),v.get(m).add(g),()=>{const _=v.get(m);_&&(_.delete(g),_.size===0&&v.delete(m))}},[]),p=z.useCallback((m,g)=>{for(const[v,_]of u.current)if(AE(m,v))for(const S of _)try{S(g)}catch{}},[]);return z.useEffect(()=>{const m=oE(),g=sh({path:"/socket.io",transports:["polling","websocket"],upgrade:!0,reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:2e3,...m?{auth:{token:m}}:{}});return s.current=g,console.log("[lt-socketio] connecting..."),g.on("connect",()=>{console.log("[lt-socketio] connected, id:",g.id),o(!0)}),g.on("disconnect",v=>{console.log("[lt-socketio] disconnected:",v),o(!1)}),g.on("connect_error",v=>{console.warn("[lt-socketio] connect error:",v.message),o(!1)}),g.onAny((v,_)=>{if(v.startsWith("lt."))try{const S=typeof _=="string"?JSON.parse(_):_;p(v,S)}catch{}}),()=>{g.removeAllListeners(),g.disconnect(),s.current=null,o(!1)}},[p]),b.jsxDEV(M5.Provider,{value:{connected:a,subscribe:d},children:b.jsxDEV(xh.Provider,{value:{connected:a,subscribe:d},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useSocketIO.tsx",lineNumber:166,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/hooks/useSocketIO.tsx",lineNumber:165,columnNumber:5},this)}function V5({children:i}){const[s,a]=z.useState(null),[o,u]=z.useState({url:null,token:null});return z.useEffect(()=>{let d=!1;async function p(){var m;try{console.log("[lt-transport] detecting event transport...");const g=await fetch("/api/settings");if(!g.ok){console.warn("[lt-transport] settings fetch failed, falling back to socketio"),d||a("socketio");return}const v=await g.json(),_=(m=v==null?void 0:v.events)==null?void 0:m.transport;if(console.log("[lt-transport] server reports:",_),!d){if(_==="nats"){let S=v.events.natsWsUrl??null,D=null;const B=oE();if(B)try{const j=await fetch("/api/nats-credentials",{headers:{Authorization:`Bearer ${B}`}});if(j.ok){const F=await j.json();S=F.natsWsUrl??S,D=F.natsToken??null}}catch{console.warn("[lt-transport] failed to fetch NATS credentials")}u({url:S,token:D})}a(_==="nats"?"nats":"socketio")}}catch(g){console.warn("[lt-transport] settings fetch error, falling back to socketio",g),d||a("socketio")}}return p(),()=>{d=!0}},[]),s==="nats"?b.jsxDEV(kO,{url:o.url,token:o.token,children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:78,columnNumber:12},this):s==="socketio"?b.jsxDEV(k5,{children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:82,columnNumber:12},this):b.jsxDEV(b.Fragment,{children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useEventTransport.tsx",lineNumber:86,columnNumber:10},this)}const J0="lt_ai_override";function U5(){return pt("/settings")}function X0(){try{if(localStorage.getItem(J0)==="off")return!1}catch{}return null}function z5(){var a;const i=wa({queryKey:["settings"],queryFn:U5,staleTime:1/0}),s=X0();return i.data&&s===!1&&((a=i.data.ai)!=null&&a.enabled)?{...i,data:{...i.data,ai:{enabled:!1}}}:i}function B5(){const[i,s]=z.useState(()=>X0()===!1),a=z.useCallback(()=>{const o=X0()===!1;try{o?localStorage.removeItem(J0):localStorage.setItem(J0,"off")}catch{}s(!o),window.location.reload()},[]);return{aiOverrideActive:i,toggleAIOverride:a}}const HE=z.createContext(null),TS="lt_sidebar_collapsed";function q5({children:i}){const[s,a]=z.useState(()=>{try{return localStorage.getItem(TS)==="true"}catch{return!1}}),o=z.useCallback(()=>{a(u=>{const d=!u;try{localStorage.setItem(TS,String(d))}catch{}return d})},[]);return b.jsxDEV(HE.Provider,{value:{collapsed:s,toggle:o},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useSidebar.tsx",lineNumber:40,columnNumber:5},this)}function PE(){const i=z.useContext(HE);if(!i)throw new Error("useSidebar must be used within SidebarProvider");return i}function Gj(i){const s=i?`?period=${i}`:"";return wa({queryKey:["escalationStats",i],queryFn:()=>pt(`/escalations/stats${s}`)})}function Jj(){return wa({queryKey:["escalationTypes"],queryFn:()=>pt("/escalations/types")})}function L5(i){const{enabled:s=!0,...a}=i,o=new URLSearchParams;return a.status&&o.set("status",a.status),a.role&&o.set("role",a.role),a.type&&o.set("type",a.type),a.subtype&&o.set("subtype",a.subtype),a.assigned_to&&o.set("assigned_to",a.assigned_to),a.priority&&o.set("priority",String(a.priority)),a.limit&&o.set("limit",String(a.limit)),a.offset!==void 0&&o.set("offset",String(a.offset)),a.sort_by&&o.set("sort_by",a.sort_by),a.order&&o.set("order",a.order),wa({queryKey:["escalations",a],queryFn:()=>pt(`/escalations?${o}`),enabled:s})}function H5(i){const{enabled:s=!0,...a}=i,o=new URLSearchParams;return a.role&&o.set("role",a.role),a.type&&o.set("type",a.type),a.subtype&&o.set("subtype",a.subtype),a.priority&&o.set("priority",String(a.priority)),a.limit&&o.set("limit",String(a.limit)),a.offset!==void 0&&o.set("offset",String(a.offset)),a.sort_by&&o.set("sort_by",a.sort_by),a.order&&o.set("order",a.order),wa({queryKey:["escalations","available",a],queryFn:()=>pt(`/escalations/available?${o}`),enabled:s})}function Xj(i){return wa({queryKey:["escalations","by-workflow",i],queryFn:()=>pt(`/escalations/by-workflow/${i}`),enabled:!!i})}function Qj(i){return wa({queryKey:["escalations",i],queryFn:()=>pt(`/escalations/${i}`),enabled:!!i})}function Zj(){const i=Vs();return Sa({mutationFn:({id:s,durationMinutes:a})=>pt(`/escalations/${s}/claim`,{method:"POST",body:JSON.stringify({durationMinutes:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function Kj(){const i=Vs();return Sa({mutationFn:s=>pt(`/escalations/${s}/release`,{method:"POST"}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function Wj(){const i=Vs();return Sa({mutationFn:({id:s,resolverPayload:a})=>pt(`/escalations/${s}/resolve`,{method:"POST",body:JSON.stringify({resolverPayload:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"}),i.invalidateQueries({queryKey:["tasks"],refetchType:"all"}),i.invalidateQueries({queryKey:["jobs"],refetchType:"all"})}})}function e6(){const i=Vs();return Sa({mutationFn:({id:s,targetRole:a})=>pt(`/escalations/${s}/escalate`,{method:"PATCH",body:JSON.stringify({targetRole:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function t6(){const i=Vs();return Sa({mutationFn:({ids:s,priority:a})=>pt("/escalations/priority",{method:"PATCH",body:JSON.stringify({ids:s,priority:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function n6(){const i=Vs();return Sa({mutationFn:({ids:s,durationMinutes:a})=>pt("/escalations/bulk-claim",{method:"POST",body:JSON.stringify({ids:s,durationMinutes:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function s6(){const i=Vs();return Sa({mutationFn:({ids:s,targetUserId:a,durationMinutes:o})=>pt("/escalations/bulk-assign",{method:"POST",body:JSON.stringify({ids:s,targetUserId:a,durationMinutes:o})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function a6(){const i=Vs();return Sa({mutationFn:({ids:s,targetRole:a})=>pt("/escalations/bulk-escalate",{method:"PATCH",body:JSON.stringify({ids:s,targetRole:a})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function r6(){const i=Vs();return Sa({mutationFn:({ids:s,hint:a})=>pt("/escalations/bulk-triage",{method:"POST",body:JSON.stringify({ids:s,...a?{hint:a}:{}})}),onSuccess:()=>{i.invalidateQueries({queryKey:["escalations"],refetchType:"all"}),i.invalidateQueries({queryKey:["escalationStats"],refetchType:"all"})}})}function P5(){const{user:i}=Ki(),s=i==null?void 0:i.userId,a=Vs(),o=z.useRef(null),u=z.useCallback(()=>{o.current||(o.current=setTimeout(()=>{o.current=null,a.invalidateQueries({queryKey:["escalations"]})},15e3))},[a]);DE(`${OO}.escalation.>`,u);const{data:d}=H5({limit:1}),{data:p}=L5({assigned_to:s,status:"pending",limit:200}),m=new Date,g=((p==null?void 0:p.escalations)??[]).filter(v=>v.assigned_until&&new Date(v.assigned_until)>m);return{available:(d==null?void 0:d.total)??0,mine:g.length}}function dy({size:i="sm",hideLabel:s=!1,className:a=""}){const o=i==="lg",u=o?"w-[16rem] h-[16rem] -rotate-[120deg] opacity-40 -ml-10":"w-[12.5rem] h-[12.5rem] -rotate-[120deg] opacity-40 -ml-8",d=o?"text-[44px] font-normal text-text-primary tracking-[0.15em] -ml-[12.5rem]":"text-[36px] font-normal text-text-primary tracking-[0.15em] -ml-[9.75rem]";return b.jsxDEV("div",{className:`flex items-center ${a}`,style:{height:"50px"},children:[b.jsxDEV("img",{src:"/logo512.png",alt:"LongTail",className:`shrink-0 z-0 ${u}`},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/AppLogo.tsx",lineNumber:30,columnNumber:7},this),b.jsxDEV("span",{className:`z-[1] transition-opacity duration-300 ${d} ${s?"opacity-0":""}`,children:"LongTail"},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/AppLogo.tsx",lineNumber:35,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/display/AppLogo.tsx",lineNumber:29,columnNumber:5},this)}function $5({onToggleEventFeed:i,onToggleDocs:s}){const{user:a,logout:o}=Ki(),{available:u,mine:d}=P5(),{connected:p}=RO(),{toggleAIOverride:m}=B5(),[g,v]=z.useState(!1),_=z.useRef(null);return z.useEffect(()=>{if(!g)return;const S=D=>{_.current&&!_.current.contains(D.target)&&v(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[g]),b.jsxDEV("header",{className:"h-14 shrink-0 border-b border-surface-border bg-surface-raised flex items-center justify-between px-5 relative z-30",children:[b.jsxDEV("div",{className:"flex items-center gap-4",children:b.jsxDEV(cl,{to:"/","aria-label":"Home",onClick:S=>{(S.ctrlKey||S.metaKey)&&(S.preventDefault(),m())},children:b.jsxDEV(dy,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:42,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:32,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:31,columnNumber:7},this),b.jsxDEV("div",{className:"flex items-center gap-5",children:[b.jsxDEV(cl,{to:"/escalations/available",className:`flex items-center gap-1.5 text-[11px] transition-colors ${u>0?"text-blue-400 hover:text-blue-300":"text-text-quaternary hover:text-text-secondary"}`,title:"Available escalations",children:[b.jsxDEV(FT,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:55,columnNumber:11},this),"all",u>0&&b.jsxDEV("span",{className:"tabular-nums font-medium",children:u},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:56,columnNumber:32},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:48,columnNumber:9},this),b.jsxDEV(cl,{to:"/escalations/queue",className:`flex items-center gap-1.5 text-[11px] transition-colors ${d>0?"text-status-warning hover:text-amber-300":"text-text-quaternary hover:text-text-secondary"}`,title:"My escalation queue",children:[b.jsxDEV(YT,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:67,columnNumber:11},this),"mine",d>0&&b.jsxDEV("span",{className:"tabular-nums font-medium",children:d},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:68,columnNumber:28},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:60,columnNumber:9},this),b.jsxDEV("div",{className:"w-px h-4 bg-surface-border"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:71,columnNumber:9},this),b.jsxDEV("button",{type:"button",onClick:i,className:`flex items-center gap-1.5 text-[11px] transition-colors ${p?"text-emerald-400 hover:text-emerald-300":"text-text-quaternary hover:text-text-secondary"}`,title:p?"Live events — click to toggle feed":"Events disconnected",children:[b.jsxDEV(eE,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:82,columnNumber:11},this),"events"]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:74,columnNumber:9},this),b.jsxDEV("button",{onClick:s,className:"flex items-center gap-1.5 text-[11px] text-text-quaternary hover:text-text-secondary transition-colors",title:"Documentation",children:[b.jsxDEV(tE,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:92,columnNumber:11},this),"docs"]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:87,columnNumber:9},this),b.jsxDEV("div",{className:"w-px h-4 bg-surface-border"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:96,columnNumber:9},this),a&&b.jsxDEV("div",{className:"relative",ref:_,children:[b.jsxDEV("button",{onClick:()=>v(S=>!S),className:"btn-ghost text-xs flex items-center gap-1",children:[b.jsxDEV(GT,{className:"w-3.5 h-3.5 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:105,columnNumber:15},this),a.displayName||a.username||a.userId,b.jsxDEV("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:108,columnNumber:17},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:107,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:101,columnNumber:13},this),g&&b.jsxDEV("div",{className:"absolute right-0 top-full mt-1 w-48 bg-surface-raised border border-surface-border rounded-md shadow-lg py-1 z-50",children:[b.jsxDEV(cl,{to:"/credentials",onClick:()=>v(!1),className:"block px-3 py-2 text-xs text-text-secondary hover:bg-surface-hover",children:"Credentials"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:113,columnNumber:17},this),b.jsxDEV("button",{onClick:()=>{v(!1),o()},className:"block w-full text-left px-3 py-2 text-xs text-text-secondary hover:bg-surface-hover",children:"Sign Out"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:120,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:112,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:100,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:46,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Header.tsx",lineNumber:30,columnNumber:5},this)}function hy({open:i,children:s}){const[a,o]=z.useState(i);return z.useEffect(()=>{i&&o(!0)},[i]),b.jsxDEV("div",{className:`grid transition-[grid-template-rows] duration-300 ease-out ${i?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,onTransitionEnd:()=>{i||o(!1)},children:b.jsxDEV("div",{className:"overflow-hidden",children:a?s:null},void 0,!1,{fileName:"/app/dashboard/src/components/common/layout/Collapsible.tsx",lineNumber:15,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/layout/Collapsible.tsx",lineNumber:11,columnNumber:5},this)}function Q0(i){return({isActive:s})=>{const a="flex items-center rounded-md transition-colors duration-150",o="bg-surface-hover text-text-primary font-medium",u="text-text-secondary hover:text-text-primary hover:bg-surface-hover";return i?`${a} justify-center w-10 h-10 mx-auto ${s?o:u}`:`${a} gap-3 px-4 py-2 text-sm ${s?o:u}`}}function I5(){return({isActive:i})=>`flex items-center gap-3 pl-11 pr-4 py-1.5 text-xs rounded-md transition-colors duration-150 ${i?"text-text-primary font-medium":"text-text-secondary hover:text-text-primary"}`}function F5({group:i,collapsed:s}){const{pathname:a}=Zi(),o=i.matchPaths.some(m=>a.startsWith(m)),[u,d]=z.useState(o),p=u||o;return s?b.jsxDEV(b.Fragment,{children:i.items.map(m=>b.jsxDEV(ah,{to:m.to,className:Q0(!0),title:m.label,children:m.icon&&b.jsxDEV(m.icon,{className:"w-5 h-5 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:70,columnNumber:26},this)},m.to,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:64,columnNumber:11},this))},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:62,columnNumber:7},this):b.jsxDEV("div",{children:[b.jsxDEV("button",{onClick:()=>d(m=>!m),className:"w-full flex items-center justify-between px-4 py-2 text-sm rounded-md transition-colors duration-150 text-text-secondary hover:text-text-primary hover:bg-surface-hover",children:[b.jsxDEV("span",{className:"flex items-center gap-3",children:[i.icon&&b.jsxDEV(i.icon,{className:"w-5 h-5 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:84,columnNumber:26},this),b.jsxDEV("span",{children:i.label},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:85,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:83,columnNumber:9},this),b.jsxDEV("svg",{className:`w-3.5 h-3.5 text-text-tertiary transition-transform duration-150 ${p?"rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:94,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:87,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:79,columnNumber:7},this),b.jsxDEV(hy,{open:p,children:i.items.map(m=>b.jsxDEV(ah,{to:m.to,end:m.end,className:I5(),children:[m.icon&&b.jsxDEV(m.icon,{className:"w-4 h-4 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:100,columnNumber:26},this),b.jsxDEV("span",{children:m.label},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:101,columnNumber:13},this)]},m.to,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:99,columnNumber:11},this))},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:97,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:78,columnNumber:5},this)}function Y5(i){return i.kind==="group"}function G5({entry:i,collapsed:s}){const{pathname:a,search:o}=Zi();if(i.to.includes("?")){const[d,p]=i.to.split("?"),m=a===d&&o===`?${p}`,g=Q0(s)({isActive:m});return b.jsxDEV(ah,{to:i.to,className:g,title:s?i.label:void 0,children:[i.icon&&b.jsxDEV(i.icon,{className:"w-5 h-5 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:128,columnNumber:24},this),!s&&b.jsxDEV("span",{children:i.label},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:129,columnNumber:24},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:127,columnNumber:7},this)}return b.jsxDEV(ah,{to:i.to,end:i.end,className:Q0(s),title:s?i.label:void 0,children:[i.icon&&b.jsxDEV(i.icon,{className:"w-5 h-5 shrink-0 text-accent/75",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:141,columnNumber:22},this),!s&&b.jsxDEV("span",{children:i.label},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:142,columnNumber:22},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:135,columnNumber:5},this)}function Sh({heading:i,entries:s}){const{collapsed:a}=PE();return b.jsxDEV("div",{className:"space-y-1",children:[a?b.jsxDEV("div",{className:"h-px bg-surface-border mx-3 my-2",title:i},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:153,columnNumber:9},this):b.jsxDEV("p",{className:"px-4 pt-5 pb-2 text-xs font-semibold uppercase tracking-wider text-accent/80",children:i},void 0,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:155,columnNumber:9},this),s.map(o=>Y5(o)?b.jsxDEV(F5,{group:o,collapsed:a},o.label,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:161,columnNumber:11},this):b.jsxDEV(G5,{entry:o,collapsed:a},o.to,!1,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:163,columnNumber:11},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/SidebarNav.tsx",lineNumber:151,columnNumber:5},this)}function J5({aiEnabled:i=!1}){const s=[{to:"/",label:"Recent Activity",icon:JT,end:!0},{to:"/capabilities",label:"Capabilities",icon:XT},{to:"/agents",label:i?"Agents":"Automations",icon:QT},{to:"/topics",label:"Topics",icon:eE}];return b.jsxDEV(Sh,{heading:"Work",entries:s},void 0,!1,{fileName:"/app/dashboard/src/components/layout/WorkSidebar.tsx",lineNumber:12,columnNumber:10},this)}function X5({aiEnabled:i=!1}){const s=[{to:"/workflows/registry",label:"Registry",icon:s0},{to:"/workflows/start",label:"Invoke",icon:ZT}];i&&s.push({to:"/workflows/executions",label:"Executions",icon:a0});const a=[{kind:"group",label:"Workflows",icon:s0,matchPaths:["/workflows"],items:s}];return i?a.push({kind:"group",label:"Pipelines",icon:fu,matchPaths:["/mcp"],items:[{to:"/mcp/queries",label:"Designer",icon:KT},{to:"/mcp/servers",label:"Servers & Tools",icon:nE},{to:"/mcp/workflows",label:"Pipeline Tools",icon:fu},{to:"/mcp/executions",label:"Executions",icon:a0}]}):a.push({kind:"group",label:"Executions",icon:a0,matchPaths:["/mcp","/workflows/executions"],items:[{to:"/workflows/executions",label:"Workflows",icon:s0},{to:"/mcp/executions",label:"Pipelines",icon:fu}]}),b.jsxDEV(Sh,{heading:"Build",entries:a},void 0,!1,{fileName:"/app/dashboard/src/components/layout/BuildSidebar.tsx",lineNumber:52,columnNumber:10},this)}const Q5=[{to:"/files",label:"Files",icon:WT},{to:"/knowledge",label:"Knowledge",icon:eC}];function Z5(){return b.jsxDEV(Sh,{heading:"Storage",entries:Q5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/StorageSidebar.tsx",lineNumber:10,columnNumber:10},this)}const K5=[{kind:"group",label:"Identity & Access",icon:sC,matchPaths:["/admin/users","/admin/roles"],items:[{to:"/admin/users",label:"Accounts",icon:tC},{to:"/admin/roles",label:"Roles & Permissions",icon:nC}]},{kind:"group",label:"Infrastructure",icon:nE,matchPaths:["/admin/controlplane","/admin/streams","/admin/maintenance"],items:[{to:"/admin/controlplane",label:"Routers",icon:aC},{to:"/admin/streams",label:"Messages",icon:rC},{to:"/admin/maintenance",label:"DB Maintenance",icon:iC}]}];function W5(){return b.jsxDEV(Sh,{heading:"Admin",entries:K5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/AdminSidebar.tsx",lineNumber:37,columnNumber:10},this)}function e4({children:i,className:s=""}){return b.jsxDEV("p",{className:`text-[10px] font-semibold uppercase tracking-widest text-text-tertiary ${s}`,children:i},void 0,!1,{fileName:"/app/dashboard/src/components/common/layout/SectionLabel.tsx",lineNumber:10,columnNumber:5},this)}const w0=280,CS="cubic-bezier(0.4, 0, 0.2, 1)",Xd=40;function t4(i){if(!i)return"scale(0.92)";const s=window.innerWidth,a=window.innerHeight,o=s-Xd*2,u=a-Xd*2,d=i.width/o,p=i.height/u,m=i.left+i.width/2-(Xd+o/2),g=i.top+i.height/2-(Xd+u/2);return`translate(${m}px, ${g}px) scale(${d}, ${p})`}function $E({open:i,onClose:s,sourceRef:a,children:o}){const[u,d]=z.useState(null),p=z.useRef(null),m=z.useRef(!1);z.useEffect(()=>{var D,B;i&&!m.current?(p.current=((D=a==null?void 0:a.current)==null?void 0:D.getBoundingClientRect())??null,d("entering")):!i&&m.current&&u==="open"&&(p.current=((B=a==null?void 0:a.current)==null?void 0:B.getBoundingClientRect())??null,d("exiting")),m.current=i},[i,a,u]),z.useEffect(()=>{if(u!=="entering")return;const D=requestAnimationFrame(()=>{requestAnimationFrame(()=>d("open"))});return()=>cancelAnimationFrame(D)},[u]),z.useEffect(()=>{if(u)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[u]),z.useEffect(()=>{if(!u)return;const D=B=>{B.key==="Escape"&&s()};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[u,s]);const g=z.useCallback(D=>{D.propertyName==="transform"&&u==="exiting"&&d(null)},[u]);if(z.useEffect(()=>{if(u!=="exiting")return;const D=setTimeout(()=>d(null),w0+50);return()=>clearTimeout(D)},[u]),!u)return null;const v=u==="entering"||u==="exiting",_=v?t4(p.current):"none",S=v?0:1;return KS.createPortal(b.jsxDEV("div",{className:"fixed inset-0 z-50 overflow-auto p-10",style:{transformOrigin:"center center",transition:`transform ${w0}ms ${CS}, opacity ${w0}ms ${CS}`,transform:_,opacity:S,backgroundColor:"#FFFFFF"},onTransitionEnd:g,children:o},void 0,!1,{fileName:"/app/dashboard/src/components/common/layout/FullscreenOverlay.tsx",lineNumber:93,columnNumber:5},this),document.body)}function n4({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h8M4 18h12"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:4,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:3,columnNumber:5},this)}function s4({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7l-5 5 5 5M16 7l5 5-5 5"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:12,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:11,columnNumber:5},this)}function a4({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:20,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:19,columnNumber:5},this)}function r4({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:28,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:27,columnNumber:5},this)}function i4({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9L3.5 3.5M9 15v4.5M9 15H4.5M9 15l-5.5 5.5M15 9h4.5M15 9V4.5M15 9l5.5-5.5M15 15h4.5M15 15v4.5m0-4.5l5.5 5.5"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:36,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:35,columnNumber:5},this)}function o4({className:i}){return b.jsxDEV("svg",{className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5v-4m0 4h-4m4 0l-5-5"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:44,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewerIcons.tsx",lineNumber:43,columnNumber:5},this)}function l4(i){const s=i.trim().split(`
|
|
272
|
+
`);if(s.length<2)return i;const a=m=>m.split("|").map(g=>g.trim()).filter(Boolean),o=a(s[0]),u=s.slice(2),d=o.map(m=>`<th class="px-3 py-1.5 text-left text-[10px] font-semibold uppercase tracking-wider text-text-tertiary">${m}</th>`).join(""),p=u.map(m=>`<tr class="border-t border-surface-border">${a(m).map(_=>`<td class="px-3 py-1.5 text-xs text-text-secondary">${_}</td>`).join("")}</tr>`).join("");return`<table class="w-full my-3 text-xs"><thead><tr class="border-b border-surface-border">${d}</tr></thead><tbody>${p}</tbody></table>`}function Qd(i){return i.toLowerCase().replace(/<[^>]+>/g,"").replace(/[^\w\s-]/g,"").replace(/\s+/g,"-").trim()}function c4(i){const s=[];let a=i.replace(/```(\w*)\n([\s\S]*?)```/g,(g,v,_)=>{const S=s.length;return s.push(`<pre class="bg-surface-sunken rounded p-3 my-2 overflow-x-auto text-[11px] leading-relaxed"><code>${_}</code></pre>`),`\0CODE${S}\0`});const o=/^(\|.+\|)\n(\|[-| :]+\|)\n((?:\|.+\|\n?)+)/gm;a=a.replace(o,(g,v,_,S)=>l4(`${v}
|
|
273
|
+
${_}
|
|
274
|
+
${S.trimEnd()}`)),a=a.replace(/`([^`]+)`/g,'<code class="bg-surface-sunken px-1 py-0.5 rounded text-[11px]">$1</code>'),a=a.replace(/^#### (.+)$/gm,(g,v)=>`<h4 id="${Qd(v)}" class="text-xs font-semibold text-text-primary mt-4 mb-1">${v}</h4>`).replace(/^### (.+)$/gm,(g,v)=>`<h3 id="${Qd(v)}" class="text-sm font-semibold text-text-primary mt-5 mb-1.5">${v}</h3>`).replace(/^## (.+)$/gm,(g,v)=>`<h2 id="${Qd(v)}" class="text-base font-semibold text-text-primary mt-6 mb-2 pb-1 border-b border-surface-border">${v}</h2>`).replace(/^# (.+)$/gm,(g,v)=>`<h1 id="${Qd(v)}" class="text-lg font-bold text-text-primary mb-3">${v}</h1>`),a=a.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/\[([^\]]+)\]\(#([^)]+)\)/g,'<a data-anchor="$2" class="text-accent hover:underline cursor-pointer">$1</a>').replace(/\[([^\]]+)\]\(([^)]*\.md(?:#[^)]*)?)\)/g,'<a data-doc-link="$2" class="text-accent hover:underline cursor-pointer">$1</a>').replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" class="text-accent hover:underline">$1</a>').replace(/^ - (.+)$/gm,'<li class="ml-8 list-disc text-xs -my-1" style="line-height:1.1">$1</li>').replace(/^ - (.+)$/gm,'<li class="ml-8 list-disc text-xs -my-1" style="line-height:1.1">$1</li>').replace(/^- (.+)$/gm,'<li class="ml-4 list-disc text-xs -my-1" style="line-height:1.1">$1</li>').replace(/^\d+\. (.+)$/gm,'<li class="ml-4 list-decimal text-xs -my-1" style="line-height:1.1">$1</li>').replace(/^---+$/gm,'<hr class="border-surface-border my-4" />').replace(/(?:^> (.+)$\n?)+/gm,g=>{const v=g.replace(/^> /gm,"").trim(),_=/⚠️|warning|caution/i.test(v),S=/note:|ℹ️|info/i.test(v);return`<div class="${_?"bg-status-warning/5":S?"bg-accent/5":"bg-surface-sunken/50"} ${_?"border-status-warning":S?"border-accent":"border-text-tertiary"} border-l-2 rounded-r-md px-3 py-2 my-3 text-xs text-text-secondary leading-relaxed">${v}</div>`}).replace(/\n\n/g,"\0PARA\0").replace(/\n/g,"<br/>");const u=g=>g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),d=g=>new RegExp(`(${u(g)}[\\s\\S]*?<\\/li>(?:<br\\/>)?)+`,"g");a=a.replace(d('<li class="ml-8 list-disc'),g=>`<ul class="mb-3">${g}</ul>`),a=a.replace(d('<li class="ml-4 list-disc'),g=>`<ul class="mb-3">${g}</ul>`),a=a.replace(d('<li class="ml-4 list-decimal'),g=>`<ol class="list-decimal mb-3">${g}</ol>`),a=a.replace(/\x00CODE(\d+)\x00/g,(g,v)=>s[parseInt(v,10)]);const p="text-xs leading-relaxed text-text-secondary mb-2",m=/<\/(h[1-4]|pre|table|ul|ol|hr|div)>/;return a=a.split("\0PARA\0").map(g=>{const v=g.trim();if(!v)return"";const _=[];let S=v,D;for(;(D=m.exec(S))!==null;){const B=D.index+D[0].length;_.push(S.slice(0,B)),S=S.slice(B).replace(/^<br\/>/,"").trim(),m.lastIndex=0}return S&&_.push(S),_.map(B=>{const j=B.trim();return j?/^\s*<(h[1-4]|pre|table|ul|ol|hr|div)/.test(j)?j:`<p class="${p}">${j}</p>`:""}).join("")}).join(""),a}const u4=/(\*\*|^#{1,4}\s|^- |^\d+\.\s|```|^\|.*\|$|\[.+\]\(.+\))/m;function f4(i){return u4.test(i)}function my({content:i,className:s,onClick:a}){const o=z.useMemo(()=>c4(i),[i]);return b.jsxDEV("div",{className:s,onClick:a,dangerouslySetInnerHTML:{__html:o}},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/MarkdownRenderer.tsx",lineNumber:136,columnNumber:10},this)}function hh({data:i,depth:s=0,generation:a}){const u=a!==void 0&&a>0&&a%2===1?!1:s>0,[d,p]=z.useState(u),[m,g]=z.useState(a);if(a!==void 0&&a!==m&&(g(a),p(a%2===0&&s>0)),i==null)return b.jsxDEV("span",{className:"text-text-tertiary italic",children:"null"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:23,columnNumber:12},this);if(typeof i=="string")return b.jsxDEV("span",{className:"text-text-primary",children:['"',i,'"']},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:27,columnNumber:12},this);if(typeof i=="number"||typeof i=="boolean")return b.jsxDEV("span",{className:"text-text-primary font-medium",children:String(i)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:31,columnNumber:12},this);if(Array.isArray(i))return i.length===0?b.jsxDEV("span",{className:"text-text-tertiary",children:"[]"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:35,columnNumber:35},this):d?b.jsxDEV("button",{onClick:()=>p(!1),className:"text-text-secondary hover:text-text-primary",children:["[",i.length," items]"]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:39,columnNumber:9},this):b.jsxDEV("span",{children:[b.jsxDEV("button",{onClick:()=>p(!0),className:"text-text-tertiary hover:text-text-primary",children:"["},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:50,columnNumber:9},this),b.jsxDEV("div",{className:"pl-4 border-l border-surface-border ml-1",children:i.map((v,_)=>b.jsxDEV("div",{children:[b.jsxDEV(hh,{data:v,depth:s+1,generation:a},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:59,columnNumber:15},this),_<i.length-1&&b.jsxDEV("span",{className:"text-text-tertiary",children:","},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:60,columnNumber:39},this)]},_,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:58,columnNumber:13},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:56,columnNumber:9},this),b.jsxDEV("span",{className:"text-text-tertiary",children:"]"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:64,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:49,columnNumber:7},this);if(typeof i=="object"){const v=Object.entries(i);return v.length===0?b.jsxDEV("span",{className:"text-text-tertiary",children:"{}"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:71,columnNumber:38},this):d?b.jsxDEV("button",{onClick:()=>p(!1),className:"text-text-secondary hover:text-text-primary",children:["{","...","}"]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:75,columnNumber:9},this):b.jsxDEV("span",{children:[b.jsxDEV("button",{onClick:()=>p(!0),className:"text-text-tertiary hover:text-text-primary",children:"{"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:86,columnNumber:9},this),b.jsxDEV("div",{className:"pl-4 border-l border-surface-border ml-1",children:v.map(([_,S],D)=>b.jsxDEV("div",{children:[b.jsxDEV("span",{className:"text-text-secondary",children:_},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:95,columnNumber:15},this),b.jsxDEV("span",{className:"text-text-tertiary",children:": "},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:96,columnNumber:15},this),b.jsxDEV(hh,{data:S,depth:s+1,generation:a},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:97,columnNumber:15},this),D<v.length-1&&b.jsxDEV("span",{className:"text-text-tertiary",children:","},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:98,columnNumber:42},this)]},_,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:94,columnNumber:13},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:92,columnNumber:9},this),b.jsxDEV("span",{className:"text-text-tertiary",children:"}"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:102,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:85,columnNumber:7},this)}return b.jsxDEV("span",{children:String(i)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:107,columnNumber:10},this)}function bu({data:i,depth:s=0}){if(i==null)return b.jsxDEV("span",{className:"text-text-tertiary italic",children:"null"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:116,columnNumber:12},this);if(typeof i=="string")return i.length>40&&f4(i)?b.jsxDEV(my,{content:i},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:121,columnNumber:14},this):b.jsxDEV("span",{className:"text-text-primary",children:i},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:123,columnNumber:12},this);if(typeof i=="number"||typeof i=="boolean")return b.jsxDEV("span",{className:"text-text-primary font-medium",children:String(i)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:127,columnNumber:12},this);if(Array.isArray(i))return i.length===0?b.jsxDEV("span",{className:"text-text-tertiary italic",children:"empty list"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:131,columnNumber:35},this):b.jsxDEV("div",{className:"space-y-2",children:i.map((a,o)=>b.jsxDEV("div",{className:"flex items-baseline gap-2",children:[b.jsxDEV("span",{className:"text-text-tertiary text-[10px] shrink-0",children:[o+1,"."]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:136,columnNumber:13},this),b.jsxDEV("div",{className:"flex-1",children:b.jsxDEV(bu,{data:a,depth:s+1},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:138,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:137,columnNumber:13},this)]},o,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:135,columnNumber:11},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:133,columnNumber:7},this);if(typeof i=="object"){const a=Object.entries(i);return a.length===0?b.jsxDEV("span",{className:"text-text-tertiary italic",children:"empty"},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:148,columnNumber:38},this):b.jsxDEV("div",{className:s>0?"pl-4 border-l border-surface-border space-y-3":"space-y-3",children:a.map(([o,u])=>{const d=u===null||typeof u!="object";return b.jsxDEV("div",{children:[b.jsxDEV("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-0.5",children:o.replace(/[_-]/g," ")},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:155,columnNumber:15},this),d?b.jsxDEV("p",{className:"text-sm text-text-primary",children:b.jsxDEV(bu,{data:u,depth:s+1},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:160,columnNumber:19},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:159,columnNumber:17},this):b.jsxDEV(bu,{data:u,depth:s+1},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:163,columnNumber:17},this)]},o,!0,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:154,columnNumber:13},this)})},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:150,columnNumber:7},this)}return b.jsxDEV("span",{children:String(i)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/json-viewer-nodes.tsx",lineNumber:172,columnNumber:10},this)}function OS({mode:i,setMode:s,isCollapsed:a,onToggleCollapse:o,onCopy:u,copied:d,onFullscreen:p,onClose:m,large:g}){const v=g?"w-5 h-5":"w-3.5 h-3.5",_=`${g?"p-2":"p-1.5"} rounded text-text-tertiary hover:text-text-primary hover:bg-surface-raised transition-colors duration-150`;return b.jsxDEV("div",{className:"flex items-center gap-0.5 bg-surface-sunken/80 rounded-md backdrop-blur-sm",children:[i==="json"&&b.jsxDEV("button",{onClick:o,className:_,title:a?"Expand all":"Collapse all",children:a?b.jsxDEV(o4,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:35,columnNumber:26},this):b.jsxDEV(i4,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:35,columnNumber:60},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:34,columnNumber:9},this),b.jsxDEV("button",{onClick:()=>s(i==="json"?"tree":"json"),className:_,title:i==="json"?"Outline view":"JSON view",children:i==="json"?b.jsxDEV(n4,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:39,columnNumber:28},this):b.jsxDEV(s4,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:39,columnNumber:60},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:38,columnNumber:7},this),b.jsxDEV("button",{onClick:u,className:_,title:"Copy to clipboard",children:d?b.jsxDEV(r4,{className:`${v} text-status-success`},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:42,columnNumber:19},this):b.jsxDEV(a4,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:42,columnNumber:77},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:41,columnNumber:7},this),p&&b.jsxDEV("button",{onClick:p,className:_,title:"Fullscreen",children:b.jsxDEV(sE,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:46,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:45,columnNumber:9},this),m&&b.jsxDEV("button",{onClick:m,className:_,title:"Close (Esc)",children:b.jsxDEV(aE,{className:v},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:51,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:50,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:32,columnNumber:5},this)}function d4({data:i,label:s,variant:a,defaultCollapsed:o=!1,defaultMode:u}){const d=z.useRef(null),[p,m]=z.useState(u??"json"),[g,v]=z.useState(!1),[_,S]=z.useState(!1),[D,B]=z.useState(o?0:1),[j,F]=z.useState(1),Q=D%2===0,ee=j%2===0,te=z.useCallback(()=>B(H=>H+1),[]),Se=z.useCallback(()=>F(H=>H+1),[]);let De=i;if(typeof i=="string")try{De=JSON.parse(i)}catch{}const q=async()=>{const H=typeof i=="string"?i:JSON.stringify(De,null,2);await navigator.clipboard.writeText(H),v(!0),setTimeout(()=>v(!1),2e3)},ne=z.useCallback(()=>{F(1),S(!0)},[]),oe=a==="panel",W=oe?"border border-accent-muted/40 rounded-lg p-3 bg-surface-hover/30":"",X=oe?"font-mono text-xs leading-relaxed bg-white rounded-md p-4 overflow-x-auto break-all":"font-mono text-xs leading-relaxed bg-surface-sunken rounded-md p-4 overflow-x-auto break-all";return b.jsxDEV("div",{className:W,children:[s&&b.jsxDEV(e4,{children:s},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:123,columnNumber:17},this),b.jsxDEV("div",{ref:d,className:"relative",children:[b.jsxDEV("div",{className:"absolute top-2 right-2 z-[5]",children:b.jsxDEV(OS,{mode:p,setMode:m,isCollapsed:Q,onToggleCollapse:te,onCopy:q,copied:g,onFullscreen:ne},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:126,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:125,columnNumber:9},this),b.jsxDEV("div",{className:X,children:p==="json"?b.jsxDEV(hh,{data:De,generation:D},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:134,columnNumber:30},this):b.jsxDEV(bu,{data:De},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:134,columnNumber:83},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:133,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:124,columnNumber:7},this),b.jsxDEV($E,{open:_,onClose:()=>S(!1),sourceRef:d,children:[b.jsxDEV("div",{className:"sticky top-0 float-right z-10",children:b.jsxDEV(OS,{mode:p,setMode:m,isCollapsed:ee,onToggleCollapse:Se,onCopy:q,copied:g,onClose:()=>S(!1),large:!0},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:140,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:139,columnNumber:9},this),b.jsxDEV("div",{className:"font-mono text-sm leading-relaxed",children:p==="json"?b.jsxDEV(hh,{data:De,generation:j},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:149,columnNumber:30},this):b.jsxDEV(bu,{data:De},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:149,columnNumber:85},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:148,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:138,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/data/JsonViewer.tsx",lineNumber:122,columnNumber:5},this)}const h4=100,RS=500;let m4=0;const IE={"escalation.created":"text-status-warning","escalation.claimed":"text-blue-400","escalation.released":"text-text-tertiary","escalation.resolved":"text-status-success","task.created":"text-accent","task.completed":"text-status-success","task.failed":"text-status-error","task.escalated":"text-status-warning","workflow.started":"text-accent","workflow.completed":"text-status-success","workflow.failed":"text-status-error","activity.started":"text-blue-400","activity.completed":"text-status-success","activity.failed":"text-status-error","knowledge.stored":"text-violet-400","knowledge.deleted":"text-text-tertiary","agent.started":"text-accent","agent.completed":"text-status-success","agent.failed":"text-status-error","agent.status_changed":"text-blue-400",milestone:"text-violet-400"};function jS({event:i,forceExpanded:s=!1}){var D,B;const[a,o]=z.useState(s),u=IE[i.type]||"text-text-tertiary";z.useEffect(()=>{o(s)},[s]);const d=s,p=d?"text-xs":"text-[9px]",m=d?"text-xs":"text-[9px]",g=d?"text-xs":"text-[9px]",v=d?"w-3.5 h-3.5":"w-2.5 h-2.5",_=d?"py-2 px-4":"py-1 px-3",S=d?"pb-4 px-4":"pb-2 px-3";return b.jsxDEV("div",{className:"border-b border-surface-border/30 last:border-b-0",children:[b.jsxDEV("button",{onClick:()=>o(!a),className:`flex items-center gap-2 ${_} w-full text-left hover:bg-surface-hover/50 transition-colors`,children:[b.jsxDEV("span",{className:`${p} font-mono text-text-tertiary whitespace-nowrap tabular-nums shrink-0`,children:new Date(i.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:64,columnNumber:9},this),b.jsxDEV("span",{className:`${m} font-medium px-1 py-0.5 rounded ${u} bg-surface-sunken whitespace-nowrap shrink-0`,children:i.type},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:67,columnNumber:9},this),b.jsxDEV("span",{className:`${g} text-text-tertiary font-mono flex-1 min-w-0 truncate`,children:[(D=i.data)!=null&&D.workflowId?String(i.data.workflowId):"",(B=i.data)!=null&&B.escalationId?` esc:${String(i.data.escalationId).slice(0,12)}`:""]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:70,columnNumber:9},this),b.jsxDEV("svg",{className:`${v} text-text-tertiary shrink-0 transition-transform duration-150 ${a?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:b.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:78,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:74,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:60,columnNumber:7},this),b.jsxDEV(hy,{open:a,children:b.jsxDEV("div",{className:S,children:b.jsxDEV(d4,{data:i.data},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:83,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:82,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:81,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:59,columnNumber:5},this)}function p4({open:i,onToggle:s}){const[a,o]=z.useState([]),[u,d]=z.useState(!1),p=z.useRef(null),m=z.useRef(new Map);return DE("lt.events.>",z.useCallback(g=>{const v=String(g.type||"unknown");if(v.startsWith("mesh."))return;const _=`${v}:${g.timestamp||""}:${g.escalationId||g.workflowId||g.taskId||""}`,S=Date.now(),D=m.current.get(_);if(!(D&&S-D<RS)){if(m.current.set(_,S),m.current.size>200)for(const[B,j]of m.current)S-j>RS*2&&m.current.delete(B);o(B=>[{id:++m4,type:v,timestamp:g.timestamp||new Date().toISOString(),data:g},...B].slice(0,h4))}},[])),z.useEffect(()=>{i&&p.current&&(p.current.scrollTop=0)},[a.length,i]),b.jsxDEV("div",{className:"fixed bottom-0 left-0 right-0 z-40 border-t border-surface-border bg-surface-raised",children:[b.jsxDEV("button",{onClick:s,className:"flex items-center gap-2 w-full px-4 py-1.5 text-left hover:bg-surface-hover transition-colors",children:[i?b.jsxDEV(oC,{className:"w-3 h-3 text-text-tertiary"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:139,columnNumber:17},this):b.jsxDEV(lC,{className:"w-3 h-3 text-text-tertiary"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:139,columnNumber:74},this),b.jsxDEV("span",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Event Stream"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:140,columnNumber:9},this),a.length>0&&b.jsxDEV("span",{className:"text-[9px] text-text-tertiary",children:[a.length," events"]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:144,columnNumber:11},this),a.length>0&&!i&&b.jsxDEV("span",{className:`text-[9px] font-medium px-1 py-0.5 rounded ${IE[a[0].type]||"text-text-tertiary"} bg-surface-sunken`,children:a[0].type},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:149,columnNumber:11},this),a.length>0&&b.jsxDEV("span",{className:"ml-auto flex items-center gap-1",children:[b.jsxDEV("span",{className:"text-text-tertiary hover:text-text-primary p-0.5 cursor-pointer",title:"Fullscreen",onClick:g=>{g.stopPropagation(),d(!0)},children:b.jsxDEV(sE,{className:"w-3 h-3"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:160,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:155,columnNumber:13},this),b.jsxDEV("span",{className:"text-text-tertiary hover:text-text-primary p-0.5 cursor-pointer",title:"Clear events",onClick:g=>{g.stopPropagation(),o([])},children:b.jsxDEV(cC,{className:"w-3 h-3"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:167,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:162,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:154,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:135,columnNumber:7},this),b.jsxDEV(hy,{open:i,children:b.jsxDEV("div",{ref:p,className:"h-48 overflow-y-auto",children:a.length===0?b.jsxDEV("p",{className:"text-[10px] text-text-tertiary py-4 text-center",children:"Waiting for events..."},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:177,columnNumber:13},this):a.map(g=>b.jsxDEV(jS,{event:g},g.id,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:179,columnNumber:33},this))},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:175,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:174,columnNumber:7},this),b.jsxDEV($E,{open:u,onClose:()=>d(!1),sourceRef:p,children:[b.jsxDEV("div",{className:"sticky top-0 float-right z-10",children:b.jsxDEV("button",{onClick:()=>d(!1),className:"p-2 rounded text-text-tertiary hover:text-text-primary hover:bg-surface-raised transition-colors duration-150 bg-surface-sunken/80 backdrop-blur-sm",title:"Close (Esc)",children:b.jsxDEV(aE,{className:"w-5 h-5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:191,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:186,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:185,columnNumber:9},this),a.length===0?b.jsxDEV("p",{className:"text-sm text-text-tertiary py-8",children:"No events captured"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:195,columnNumber:11},this):a.map(g=>b.jsxDEV(jS,{event:g,forceExpanded:!0},g.id,!1,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:197,columnNumber:31},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:184,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/EventFeed.tsx",lineNumber:133,columnNumber:5},this)}function b4(){return wa({queryKey:["docs"],queryFn:()=>pt("/docs"),staleTime:5*6e4})}function y4(i){return wa({queryKey:["docs",i],queryFn:()=>pt(`/docs/read?path=${encodeURIComponent(i)}`),enabled:!!i,staleTime:5*6e4})}function g4(){const[i,s]=z.useState([]),[a,o]=z.useState([]),[u,d]=z.useState(null),p=z.useRef(u),m=z.useRef(i),g=z.useRef(a);p.current=u,m.current=i,g.current=a;const v=z.useCallback((j,F)=>{var ee;const Q=p.current;if(Q){const te=((ee=F==null?void 0:F.current)==null?void 0:ee.scrollTop)??0;s([...m.current,{...Q,scrollTop:te}])}o([]),d({path:j,scrollTop:0})},[]),_=z.useCallback(j=>{var te;const F=m.current;if(F.length===0)return;const Q=F[F.length-1],ee=p.current;if(ee){const Se=((te=j==null?void 0:j.current)==null?void 0:te.scrollTop)??0;o([...g.current,{...ee,scrollTop:Se}])}s(F.slice(0,-1)),d(Q),requestAnimationFrame(()=>{j!=null&&j.current&&(j.current.scrollTop=Q.scrollTop)})},[]),S=z.useCallback(j=>{var te;const F=g.current;if(F.length===0)return;const Q=F[F.length-1],ee=p.current;if(ee){const Se=((te=j==null?void 0:j.current)==null?void 0:te.scrollTop)??0;s([...m.current,{...ee,scrollTop:Se}])}o(F.slice(0,-1)),d(Q),requestAnimationFrame(()=>{j!=null&&j.current&&(j.current.scrollTop=Q.scrollTop)})},[]),D=z.useCallback(j=>{var ee,te;const F=p.current;if(!F)return;const Q=((ee=j==null?void 0:j.current)==null?void 0:ee.scrollTop)??0;s([...m.current,{...F,scrollTop:Q}]),o([]),d({...F,scrollTop:((te=j==null?void 0:j.current)==null?void 0:te.scrollTop)??0})},[]),B=z.useCallback(()=>{s([]),o([]),d(null)},[]);return{current:u,backStack:i,forwardStack:a,navigate:v,goBack:_,goForward:S,pushScrollPosition:D,reset:B}}function v4(i,s){const[a,o]=i.split("#");let u=a;if(u.startsWith("./")||u.startsWith("../")){const p=((s?s.replace(/[^/]+$/,""):"")+u).split("/"),m=[];for(const g of p)g===".."?m.pop():g&&g!=="."&&m.push(g);u=m.join("/")}return{path:u,anchor:o}}function x4(i){if(!i.startsWith("#docs"))return null;const s=i.slice(1).split(":"),a=s[1]||"README.md",o=s[2]||void 0;return{path:a,anchor:o}}function N4(i){return!i||i==="README.md"?"#docs":`#docs:${i}`}function w4({content:i,currentPath:s,onNavigate:a,onAnchorClick:o}){const u=d=>{var v;const p=d.target,m=p.closest("[data-anchor]");if(m){d.preventDefault(),o();const _=m.dataset.anchor,S=(v=m.closest(".docs-content"))==null?void 0:v.querySelector(`#${CSS.escape(_)}`);S==null||S.scrollIntoView({behavior:"smooth",block:"start"});return}const g=p.closest("[data-doc-link]");if(g){d.preventDefault();const{path:_,anchor:S}=v4(g.dataset.docLink,s);a(_,S);return}};return b.jsxDEV(my,{content:i,className:"docs-content",onClick:u},void 0,!1,{fileName:"/app/dashboard/src/components/layout/docs-drawer-tree.tsx",lineNumber:42,columnNumber:10},this)}function S4(i){const s=[],a=new Map;for(const o of i){const u=o.path.split("/");if(u.length===1){s.push(o);continue}let d=a;for(let p=0;p<u.length-1;p++){const m=u[p];d.has(m)||d.set(m,{label:m,children:[],subdirs:new Map});const g=d.get(m);p===u.length-2?g.children.push(o):d=g.subdirs}}return{topLevel:s,dirs:a}}function E4({docs:i,selected:s,onSelect:a}){const{topLevel:o,dirs:u}=S4(i),d=m=>`block w-full text-left px-3 py-1 text-xs rounded truncate transition-colors ${s===m?"bg-accent/10 text-accent":"text-text-secondary hover:bg-surface-hover"}`;function p(m,g){return b.jsxDEV("details",{open:!0,children:[b.jsxDEV("summary",{className:"flex items-center gap-1.5 px-3 py-1 text-[10px] font-semibold uppercase tracking-widest text-text-tertiary cursor-pointer",children:[b.jsxDEV(uC,{className:"w-3 h-3",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/docs-drawer-tree.tsx",lineNumber:109,columnNumber:11},this),m.label]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/docs-drawer-tree.tsx",lineNumber:108,columnNumber:9},this),b.jsxDEV("div",{className:"pl-2 space-y-0.5",children:[[...m.subdirs.values()].map(v=>p(v)),m.children.map(v=>b.jsxDEV("button",{className:d(v.path),onClick:()=>a(v.path),children:v.title},v.path,!1,{fileName:"/app/dashboard/src/components/layout/docs-drawer-tree.tsx",lineNumber:115,columnNumber:13},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/docs-drawer-tree.tsx",lineNumber:112,columnNumber:9},this)]},m.label,!0,{fileName:"/app/dashboard/src/components/layout/docs-drawer-tree.tsx",lineNumber:107,columnNumber:7},this)}return b.jsxDEV("div",{className:"space-y-0.5",children:[o.map(m=>b.jsxDEV("button",{className:d(m.path),onClick:()=>a(m.path),children:m.title},m.path,!1,{fileName:"/app/dashboard/src/components/layout/docs-drawer-tree.tsx",lineNumber:127,columnNumber:9},this)),[...u.values()].map(m=>p(m))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/docs-drawer-tree.tsx",lineNumber:125,columnNumber:5},this)}function _4({open:i,onClose:s}){var oe,W,X;const[a,o]=z.useState(!1),{data:u}=b4(),d=g4(),{data:p,isLoading:m}=y4(((oe=d.current)==null?void 0:oe.path)??null),g=z.useRef(null),[v,_]=z.useState(null);z.useEffect(()=>{v&&(p!=null&&p.content)&&g.current&&requestAnimationFrame(()=>{var le;const H=(le=g.current)==null?void 0:le.querySelector(`#${CSS.escape(v)}`);H==null||H.scrollIntoView({behavior:"smooth",block:"start"}),_(null)})},[v,p]);const S=z.useCallback(()=>{var ie;const H=x4(window.location.hash),le=(H==null?void 0:H.path)??"README.md";((ie=d.current)==null?void 0:ie.path)!==le&&d.navigate(le,g),H!=null&&H.anchor&&_(H.anchor)},[d]),D=z.useRef(!0);z.useEffect(()=>{if(!i||!d.current)return;if(D.current){D.current=!1;return}const H=N4(d.current.path);window.location.hash!==H&&window.history.replaceState(null,"",window.location.pathname+window.location.search+H)},[i,(W=d.current)==null?void 0:W.path]),z.useEffect(()=>{if(!i)return;const H=()=>{window.location.hash.startsWith("#docs")&&S()};return window.addEventListener("hashchange",H),()=>window.removeEventListener("hashchange",H)},[i,S]);const B=z.useCallback((H,le)=>{le&&_(le),d.navigate(H,g)},[d]),j=z.useCallback(H=>{d.navigate(H,g)},[d]),F=z.useCallback(()=>{d.goBack(g)},[d]),Q=z.useCallback(()=>{d.goForward(g)},[d]),ee=z.useCallback(()=>{d.pushScrollPosition(g)},[d]);if(z.useEffect(()=>{if(i){D.current=!0,S();const H=requestAnimationFrame(()=>o(!0));return()=>cancelAnimationFrame(H)}},[i]),!(i||a))return null;const Se=()=>{o(!1),setTimeout(()=>{s(),d.reset()},200)},De=((X=d.current)==null?void 0:X.path)??null,q=d.backStack.length>0,ne=d.forwardStack.length>0;return b.jsxDEV("div",{className:"fixed inset-y-0 right-0 z-50 flex",children:[b.jsxDEV("div",{className:`fixed inset-0 bg-black/20 transition-opacity duration-200 ${a&&i?"opacity-100":"opacity-0"}`,onClick:Se},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:113,columnNumber:7},this),b.jsxDEV("div",{className:`relative ml-auto w-[40vw] min-w-[800px] max-w-[90vw] h-full bg-surface-raised border-l border-surface-border flex flex-col shadow-xl transition-transform duration-200 ease-out ${a&&i?"translate-x-0":"translate-x-full"}`,children:[b.jsxDEV("div",{className:"flex items-center justify-between px-4 py-3 border-b border-surface-border shrink-0",children:[b.jsxDEV("div",{className:"flex items-center gap-1",children:[b.jsxDEV("button",{onClick:F,disabled:!q,className:`p-0.5 transition-colors ${q?"text-text-tertiary hover:text-text-primary":"text-surface-border cursor-default"}`,title:"Back",children:b.jsxDEV(fC,{className:"w-4 h-4"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:129,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:123,columnNumber:13},this),b.jsxDEV("button",{onClick:Q,disabled:!ne,className:`p-0.5 transition-colors ${ne?"text-text-tertiary hover:text-text-primary":"text-surface-border cursor-default"}`,title:"Forward",children:b.jsxDEV(Hw,{className:"w-4 h-4"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:137,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:131,columnNumber:13},this),b.jsxDEV(tE,{className:"w-4 h-4 text-accent ml-1",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:139,columnNumber:13},this),b.jsxDEV("span",{className:"text-sm font-medium text-text-primary",children:"Documentation"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:140,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:122,columnNumber:11},this),b.jsxDEV("button",{onClick:Se,className:"p-1 text-text-tertiary hover:text-text-primary",children:b.jsxDEV(Z0,{className:"w-4 h-4"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:143,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:142,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:121,columnNumber:9},this),b.jsxDEV("div",{className:"flex flex-1 overflow-hidden",children:[b.jsxDEV("div",{className:"w-48 shrink-0 border-r border-surface-border overflow-y-auto py-2",children:u!=null&&u.docs?b.jsxDEV(E4,{docs:u.docs,selected:De,onSelect:j},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:152,columnNumber:15},this):b.jsxDEV("div",{className:"px-3 py-2 text-xs text-text-tertiary",children:"Loading..."},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:154,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:150,columnNumber:11},this),b.jsxDEV("div",{ref:g,className:"flex-1 overflow-y-auto px-6 py-4",children:De?m?b.jsxDEV("div",{className:"animate-pulse space-y-2",children:[b.jsxDEV("div",{className:"h-6 bg-surface-sunken rounded w-48"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:167,columnNumber:17},this),b.jsxDEV("div",{className:"h-4 bg-surface-sunken rounded w-full"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:168,columnNumber:17},this),b.jsxDEV("div",{className:"h-4 bg-surface-sunken rounded w-3/4"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:169,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:166,columnNumber:15},this):p!=null&&p.content?b.jsxDEV(w4,{content:p.content,currentPath:De,onNavigate:B,onAnchorClick:ee},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:172,columnNumber:15},this):b.jsxDEV("p",{className:"text-xs text-text-tertiary",children:"Document not found."},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:179,columnNumber:15},this):b.jsxDEV("div",{className:"flex flex-col items-center justify-center h-full text-text-tertiary",children:[b.jsxDEV(Hw,{className:"w-5 h-5 mb-2"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:162,columnNumber:17},this),b.jsxDEV("p",{className:"text-xs",children:"Select a document"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:163,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:161,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:159,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:148,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:119,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/DocsDrawer.tsx",lineNumber:111,columnNumber:5},this)}function A4(i){if(i.includes("/escalations"))return["escalation","human-queue"]}const MS=2e3;function D4(i){const a=i.filter(u=>!u.pending).slice(-8);return a.length===0?"":`[Prior conversation]
|
|
275
|
+
${a.map(u=>`${u.role==="user"?"User":"Assistant"}: ${u.content}`).join(`
|
|
276
|
+
`)}
|
|
277
|
+
[End prior conversation]
|
|
278
|
+
|
|
279
|
+
`}function T4(i){const s=i.summary,a=i.title;if(s){const o=s.search(/\n\s*\{[\s\S]*"title"\s*:/);return o>0?s.slice(0,o).trim():s}return a||(typeof i=="string"?i:"Query completed.")}const FE=z.createContext(null);function C4({children:i}){const s=Zi(),[a,o]=z.useState(!1),[u,d]=z.useState([]),[p,m]=z.useState(null),[g,v]=z.useState({}),_=z.useRef(null),S={page:s.pathname.split("/").filter(Boolean).join("-")||"home",route:s.pathname,params:{},...g,suggestedTags:g.suggestedTags??A4(s.pathname)};z.useEffect(()=>()=>{_.current&&clearInterval(_.current)},[]);const D=z.useCallback(()=>o(ee=>!ee),[]),B=z.useCallback(ee=>{v(ee)},[]),j=z.useCallback(()=>{d([]),m(null)},[]),F=z.useCallback(async ee=>{var W;const te=new Date().toISOString(),Se={id:`user-${Date.now()}`,role:"user",content:ee,timestamp:te},De={id:`pending-${Date.now()}`,role:"assistant",content:"",timestamp:te,pending:!0};d(X=>[...X,Se,De]);const q={...S};(W=q.entities)!=null&&W.yamlContent&&q.entities.yamlContent.length>MS&&(q.entities={...q.entities,yamlContent:q.entities.yamlContent.slice(0,MS)+`
|
|
280
|
+
... (truncated)`});const oe=`${D4(u.concat(Se))}${ee}`;try{const H=(await pt("/insight/mcp-query",{method:"POST",body:JSON.stringify({prompt:oe,tags:q.suggestedTags,context:q,wait:!1,direct:!0})})).workflow_id;m(H),d(le=>le.map(ie=>ie.id===De.id?{...ie,workflowId:H}:ie)),_.current&&clearInterval(_.current),_.current=setInterval(async()=>{var le;try{const ie=await pt(`/workflows/${H}/result`),ve=(le=ie==null?void 0:ie.result)==null?void 0:le.data;if(ve){_.current&&clearInterval(_.current),_.current=null,m(null);const Qe=T4(ve);let nt;try{nt=(await pt(`/workflow-states/${H}/execution`)).duration_ms}catch{}d(ae=>ae.map(pe=>pe.id===De.id?{...pe,content:Qe,timestamp:new Date().toISOString(),pending:!1,durationMs:nt}:pe))}}catch{}},3e3)}catch{d(X=>X.map(H=>H.id===De.id?{...H,content:"Failed to submit query. Please try again.",pending:!1}:H))}},[u,S]),Q=z.useCallback(async ee=>{const te=u.find(q=>q.id===ee);if(!(te!=null&&te.workflowId)||te.compilationStatus==="compiling"||te.compilationStatus==="done")return;const Se=u.indexOf(te),De=u.slice(0,Se).reverse().find(q=>q.role==="user");if(De){d(q=>q.map(ne=>ne.id===ee?{...ne,compilationStatus:"compiling"}:ne));try{const q=await pt("/insight/mcp-query/describe",{method:"POST",body:JSON.stringify({prompt:De.content,summary:te.content})}),ne=await pt("/yaml-workflows",{method:"POST",body:JSON.stringify({workflow_id:te.workflowId,task_queue:"long-tail-system",workflow_name:"mcpQuery",name:q.tool_name,description:q.description,tags:q.tags,app_id:"longtail"})});await pt(`/yaml-workflows/${ne.id}/deploy`,{method:"POST"}),d(oe=>oe.map(W=>W.id===ee?{...W,compilationStatus:"done"}:W))}catch(q){const ne=q instanceof Error?q.message:"Compilation failed";d(oe=>oe.map(W=>W.id===ee?{...W,compilationStatus:"error",compilationError:ne}:W))}}},[u]);return b.jsxDEV(FE.Provider,{value:{helpOpen:a,setHelpOpen:o,toggleHelp:D,messages:u,sendMessage:F,pageContext:S,setPageContext:B,activeWorkflowId:p,clearMessages:j,compileMessage:Q},children:i},void 0,!1,{fileName:"/app/dashboard/src/hooks/useHelpAssistant.tsx",lineNumber:232,columnNumber:5},this)}function YE(){const i=z.useContext(FE);if(!i)throw new Error("useHelpAssistant must be used within HelpAssistantProvider");return i}function O4(){const{helpOpen:i,toggleHelp:s}=YE();return b.jsxDEV("button",{onClick:s,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:"calc(var(--feed-height, 32px) + 12px)"},"aria-label":i?"Close help":"Ask for help",children:i?b.jsxDEV(Z0,{className:"w-5 h-5 text-text-tertiary",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpButton.tsx",lineNumber:15,columnNumber:9},this):b.jsxDEV("img",{src:"/logo512.png",alt:"Help",className:"w-8 h-8 -rotate-[120deg]"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpButton.tsx",lineNumber:17,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpButton.tsx",lineNumber:8,columnNumber:5},this)}const GE=6048e5,R4=864e5,kS=6e4,VS=525600,US=43200,zS=1440,BS=Symbol.for("constructDateFrom");function rr(i,s){return typeof i=="function"?i(s):i&&typeof i=="object"&&BS in i?i[BS](s):i instanceof Date?new i.constructor(s):new Date(s)}function ts(i,s){return rr(s||i,i)}let j4={};function Eu(){return j4}function Nu(i,s){var m,g,v,_;const a=Eu(),o=(s==null?void 0:s.weekStartsOn)??((g=(m=s==null?void 0:s.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)??a.weekStartsOn??((_=(v=a.locale)==null?void 0:v.options)==null?void 0:_.weekStartsOn)??0,u=ts(i,s==null?void 0:s.in),d=u.getDay(),p=(d<o?7:0)+d-o;return u.setDate(u.getDate()-p),u.setHours(0,0,0,0),u}function mh(i,s){return Nu(i,{...s,weekStartsOn:1})}function JE(i,s){const a=ts(i,s==null?void 0:s.in),o=a.getFullYear(),u=rr(a,0);u.setFullYear(o+1,0,4),u.setHours(0,0,0,0);const d=mh(u),p=rr(a,0);p.setFullYear(o,0,4),p.setHours(0,0,0,0);const m=mh(p);return a.getTime()>=d.getTime()?o+1:a.getTime()>=m.getTime()?o:o-1}function ph(i){const s=ts(i),a=new Date(Date.UTC(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()));return a.setUTCFullYear(s.getFullYear()),+i-+a}function XE(i,...s){const a=rr.bind(null,i||s.find(o=>typeof o=="object"));return s.map(a)}function qS(i,s){const a=ts(i,s==null?void 0:s.in);return a.setHours(0,0,0,0),a}function M4(i,s,a){const[o,u]=XE(a==null?void 0:a.in,i,s),d=qS(o),p=qS(u),m=+d-ph(d),g=+p-ph(p);return Math.round((m-g)/R4)}function k4(i,s){const a=JE(i,s),o=rr(i,0);return o.setFullYear(a,0,4),o.setHours(0,0,0,0),mh(o)}function V4(i,s){const a=+ts(i)-+ts(s);return a<0?-1:a>0?1:a}function U4(i){return rr(i,Date.now())}function z4(i){return i instanceof Date||typeof i=="object"&&Object.prototype.toString.call(i)==="[object Date]"}function B4(i){return!(!z4(i)&&typeof i!="number"||isNaN(+ts(i)))}function q4(i){return s=>{const o=(i?Math[i]:Math.trunc)(s);return o===0?0:o}}function L4(i,s){const a=ts(i,s==null?void 0:s.in);return a.setFullYear(a.getFullYear(),0,1),a.setHours(0,0,0,0),a}const H4={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"}},P4=(i,s,a)=>{let o;const u=H4[i];return typeof u=="string"?o=u:s===1?o=u.one:o=u.other.replace("{{count}}",s.toString()),a!=null&&a.addSuffix?a.comparison&&a.comparison>0?"in "+o:o+" ago":o};function S0(i){return(s={})=>{const a=s.width?String(s.width):i.defaultWidth;return i.formats[a]||i.formats[i.defaultWidth]}}const $4={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},I4={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},F4={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Y4={date:S0({formats:$4,defaultWidth:"full"}),time:S0({formats:I4,defaultWidth:"full"}),dateTime:S0({formats:F4,defaultWidth:"full"})},G4={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},J4=(i,s,a,o)=>G4[i];function iu(i){return(s,a)=>{const o=a!=null&&a.context?String(a.context):"standalone";let u;if(o==="formatting"&&i.formattingValues){const p=i.defaultFormattingWidth||i.defaultWidth,m=a!=null&&a.width?String(a.width):p;u=i.formattingValues[m]||i.formattingValues[p]}else{const p=i.defaultWidth,m=a!=null&&a.width?String(a.width):i.defaultWidth;u=i.values[m]||i.values[p]}const d=i.argumentCallback?i.argumentCallback(s):s;return u[d]}}const X4={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Q4={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Z4={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"]},K4={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"]},W4={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"}},eR={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"}},tR=(i,s)=>{const a=Number(i),o=a%100;if(o>20||o<10)switch(o%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},nR={ordinalNumber:tR,era:iu({values:X4,defaultWidth:"wide"}),quarter:iu({values:Q4,defaultWidth:"wide",argumentCallback:i=>i-1}),month:iu({values:Z4,defaultWidth:"wide"}),day:iu({values:K4,defaultWidth:"wide"}),dayPeriod:iu({values:W4,defaultWidth:"wide",formattingValues:eR,defaultFormattingWidth:"wide"})};function ou(i){return(s,a={})=>{const o=a.width,u=o&&i.matchPatterns[o]||i.matchPatterns[i.defaultMatchWidth],d=s.match(u);if(!d)return null;const p=d[0],m=o&&i.parsePatterns[o]||i.parsePatterns[i.defaultParseWidth],g=Array.isArray(m)?aR(m,S=>S.test(p)):sR(m,S=>S.test(p));let v;v=i.valueCallback?i.valueCallback(g):g,v=a.valueCallback?a.valueCallback(v):v;const _=s.slice(p.length);return{value:v,rest:_}}}function sR(i,s){for(const a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&s(i[a]))return a}function aR(i,s){for(let a=0;a<i.length;a++)if(s(i[a]))return a}function rR(i){return(s,a={})=>{const o=s.match(i.matchPattern);if(!o)return null;const u=o[0],d=s.match(i.parsePattern);if(!d)return null;let p=i.valueCallback?i.valueCallback(d[0]):d[0];p=a.valueCallback?a.valueCallback(p):p;const m=s.slice(u.length);return{value:p,rest:m}}}const iR=/^(\d+)(th|st|nd|rd)?/i,oR=/\d+/i,lR={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},cR={any:[/^b/i,/^(a|c)/i]},uR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fR={any:[/1/i,/2/i,/3/i,/4/i]},dR={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},hR={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]},mR={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},pR={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]},bR={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},yR={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}},gR={ordinalNumber:rR({matchPattern:iR,parsePattern:oR,valueCallback:i=>parseInt(i,10)}),era:ou({matchPatterns:lR,defaultMatchWidth:"wide",parsePatterns:cR,defaultParseWidth:"any"}),quarter:ou({matchPatterns:uR,defaultMatchWidth:"wide",parsePatterns:fR,defaultParseWidth:"any",valueCallback:i=>i+1}),month:ou({matchPatterns:dR,defaultMatchWidth:"wide",parsePatterns:hR,defaultParseWidth:"any"}),day:ou({matchPatterns:mR,defaultMatchWidth:"wide",parsePatterns:pR,defaultParseWidth:"any"}),dayPeriod:ou({matchPatterns:bR,defaultMatchWidth:"any",parsePatterns:yR,defaultParseWidth:"any"})},QE={code:"en-US",formatDistance:P4,formatLong:Y4,formatRelative:J4,localize:nR,match:gR,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vR(i,s){const a=ts(i,s==null?void 0:s.in);return M4(a,L4(a))+1}function xR(i,s){const a=ts(i,s==null?void 0:s.in),o=+mh(a)-+k4(a);return Math.round(o/GE)+1}function ZE(i,s){var _,S,D,B;const a=ts(i,s==null?void 0:s.in),o=a.getFullYear(),u=Eu(),d=(s==null?void 0:s.firstWeekContainsDate)??((S=(_=s==null?void 0:s.locale)==null?void 0:_.options)==null?void 0:S.firstWeekContainsDate)??u.firstWeekContainsDate??((B=(D=u.locale)==null?void 0:D.options)==null?void 0:B.firstWeekContainsDate)??1,p=rr((s==null?void 0:s.in)||i,0);p.setFullYear(o+1,0,d),p.setHours(0,0,0,0);const m=Nu(p,s),g=rr((s==null?void 0:s.in)||i,0);g.setFullYear(o,0,d),g.setHours(0,0,0,0);const v=Nu(g,s);return+a>=+m?o+1:+a>=+v?o:o-1}function NR(i,s){var m,g,v,_;const a=Eu(),o=(s==null?void 0:s.firstWeekContainsDate)??((g=(m=s==null?void 0:s.locale)==null?void 0:m.options)==null?void 0:g.firstWeekContainsDate)??a.firstWeekContainsDate??((_=(v=a.locale)==null?void 0:v.options)==null?void 0:_.firstWeekContainsDate)??1,u=ZE(i,s),d=rr((s==null?void 0:s.in)||i,0);return d.setFullYear(u,0,o),d.setHours(0,0,0,0),Nu(d,s)}function wR(i,s){const a=ts(i,s==null?void 0:s.in),o=+Nu(a,s)-+NR(a,s);return Math.round(o/GE)+1}function ct(i,s){const a=i<0?"-":"",o=Math.abs(i).toString().padStart(s,"0");return a+o}const Kr={y(i,s){const a=i.getFullYear(),o=a>0?a:1-a;return ct(s==="yy"?o%100:o,s.length)},M(i,s){const a=i.getMonth();return s==="M"?String(a+1):ct(a+1,2)},d(i,s){return ct(i.getDate(),s.length)},a(i,s){const a=i.getHours()/12>=1?"pm":"am";switch(s){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(i,s){return ct(i.getHours()%12||12,s.length)},H(i,s){return ct(i.getHours(),s.length)},m(i,s){return ct(i.getMinutes(),s.length)},s(i,s){return ct(i.getSeconds(),s.length)},S(i,s){const a=s.length,o=i.getMilliseconds(),u=Math.trunc(o*Math.pow(10,a-3));return ct(u,s.length)}},ll={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},LS={G:function(i,s,a){const o=i.getFullYear()>0?1:0;switch(s){case"G":case"GG":case"GGG":return a.era(o,{width:"abbreviated"});case"GGGGG":return a.era(o,{width:"narrow"});case"GGGG":default:return a.era(o,{width:"wide"})}},y:function(i,s,a){if(s==="yo"){const o=i.getFullYear(),u=o>0?o:1-o;return a.ordinalNumber(u,{unit:"year"})}return Kr.y(i,s)},Y:function(i,s,a,o){const u=ZE(i,o),d=u>0?u:1-u;if(s==="YY"){const p=d%100;return ct(p,2)}return s==="Yo"?a.ordinalNumber(d,{unit:"year"}):ct(d,s.length)},R:function(i,s){const a=JE(i);return ct(a,s.length)},u:function(i,s){const a=i.getFullYear();return ct(a,s.length)},Q:function(i,s,a){const o=Math.ceil((i.getMonth()+1)/3);switch(s){case"Q":return String(o);case"QQ":return ct(o,2);case"Qo":return a.ordinalNumber(o,{unit:"quarter"});case"QQQ":return a.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(o,{width:"wide",context:"formatting"})}},q:function(i,s,a){const o=Math.ceil((i.getMonth()+1)/3);switch(s){case"q":return String(o);case"qq":return ct(o,2);case"qo":return a.ordinalNumber(o,{unit:"quarter"});case"qqq":return a.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(o,{width:"wide",context:"standalone"})}},M:function(i,s,a){const o=i.getMonth();switch(s){case"M":case"MM":return Kr.M(i,s);case"Mo":return a.ordinalNumber(o+1,{unit:"month"});case"MMM":return a.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(o,{width:"wide",context:"formatting"})}},L:function(i,s,a){const o=i.getMonth();switch(s){case"L":return String(o+1);case"LL":return ct(o+1,2);case"Lo":return a.ordinalNumber(o+1,{unit:"month"});case"LLL":return a.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(o,{width:"wide",context:"standalone"})}},w:function(i,s,a,o){const u=wR(i,o);return s==="wo"?a.ordinalNumber(u,{unit:"week"}):ct(u,s.length)},I:function(i,s,a){const o=xR(i);return s==="Io"?a.ordinalNumber(o,{unit:"week"}):ct(o,s.length)},d:function(i,s,a){return s==="do"?a.ordinalNumber(i.getDate(),{unit:"date"}):Kr.d(i,s)},D:function(i,s,a){const o=vR(i);return s==="Do"?a.ordinalNumber(o,{unit:"dayOfYear"}):ct(o,s.length)},E:function(i,s,a){const o=i.getDay();switch(s){case"E":case"EE":case"EEE":return a.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(o,{width:"short",context:"formatting"});case"EEEE":default:return a.day(o,{width:"wide",context:"formatting"})}},e:function(i,s,a,o){const u=i.getDay(),d=(u-o.weekStartsOn+8)%7||7;switch(s){case"e":return String(d);case"ee":return ct(d,2);case"eo":return a.ordinalNumber(d,{unit:"day"});case"eee":return a.day(u,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(u,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(u,{width:"short",context:"formatting"});case"eeee":default:return a.day(u,{width:"wide",context:"formatting"})}},c:function(i,s,a,o){const u=i.getDay(),d=(u-o.weekStartsOn+8)%7||7;switch(s){case"c":return String(d);case"cc":return ct(d,s.length);case"co":return a.ordinalNumber(d,{unit:"day"});case"ccc":return a.day(u,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(u,{width:"narrow",context:"standalone"});case"cccccc":return a.day(u,{width:"short",context:"standalone"});case"cccc":default:return a.day(u,{width:"wide",context:"standalone"})}},i:function(i,s,a){const o=i.getDay(),u=o===0?7:o;switch(s){case"i":return String(u);case"ii":return ct(u,s.length);case"io":return a.ordinalNumber(u,{unit:"day"});case"iii":return a.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(o,{width:"short",context:"formatting"});case"iiii":default:return a.day(o,{width:"wide",context:"formatting"})}},a:function(i,s,a){const u=i.getHours()/12>=1?"pm":"am";switch(s){case"a":case"aa":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(u,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(u,{width:"wide",context:"formatting"})}},b:function(i,s,a){const o=i.getHours();let u;switch(o===12?u=ll.noon:o===0?u=ll.midnight:u=o/12>=1?"pm":"am",s){case"b":case"bb":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(u,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(u,{width:"wide",context:"formatting"})}},B:function(i,s,a){const o=i.getHours();let u;switch(o>=17?u=ll.evening:o>=12?u=ll.afternoon:o>=4?u=ll.morning:u=ll.night,s){case"B":case"BB":case"BBB":return a.dayPeriod(u,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(u,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(u,{width:"wide",context:"formatting"})}},h:function(i,s,a){if(s==="ho"){let o=i.getHours()%12;return o===0&&(o=12),a.ordinalNumber(o,{unit:"hour"})}return Kr.h(i,s)},H:function(i,s,a){return s==="Ho"?a.ordinalNumber(i.getHours(),{unit:"hour"}):Kr.H(i,s)},K:function(i,s,a){const o=i.getHours()%12;return s==="Ko"?a.ordinalNumber(o,{unit:"hour"}):ct(o,s.length)},k:function(i,s,a){let o=i.getHours();return o===0&&(o=24),s==="ko"?a.ordinalNumber(o,{unit:"hour"}):ct(o,s.length)},m:function(i,s,a){return s==="mo"?a.ordinalNumber(i.getMinutes(),{unit:"minute"}):Kr.m(i,s)},s:function(i,s,a){return s==="so"?a.ordinalNumber(i.getSeconds(),{unit:"second"}):Kr.s(i,s)},S:function(i,s){return Kr.S(i,s)},X:function(i,s,a){const o=i.getTimezoneOffset();if(o===0)return"Z";switch(s){case"X":return PS(o);case"XXXX":case"XX":return Xi(o);case"XXXXX":case"XXX":default:return Xi(o,":")}},x:function(i,s,a){const o=i.getTimezoneOffset();switch(s){case"x":return PS(o);case"xxxx":case"xx":return Xi(o);case"xxxxx":case"xxx":default:return Xi(o,":")}},O:function(i,s,a){const o=i.getTimezoneOffset();switch(s){case"O":case"OO":case"OOO":return"GMT"+HS(o,":");case"OOOO":default:return"GMT"+Xi(o,":")}},z:function(i,s,a){const o=i.getTimezoneOffset();switch(s){case"z":case"zz":case"zzz":return"GMT"+HS(o,":");case"zzzz":default:return"GMT"+Xi(o,":")}},t:function(i,s,a){const o=Math.trunc(+i/1e3);return ct(o,s.length)},T:function(i,s,a){return ct(+i,s.length)}};function HS(i,s=""){const a=i>0?"-":"+",o=Math.abs(i),u=Math.trunc(o/60),d=o%60;return d===0?a+String(u):a+String(u)+s+ct(d,2)}function PS(i,s){return i%60===0?(i>0?"-":"+")+ct(Math.abs(i)/60,2):Xi(i,s)}function Xi(i,s=""){const a=i>0?"-":"+",o=Math.abs(i),u=ct(Math.trunc(o/60),2),d=ct(o%60,2);return a+u+s+d}const $S=(i,s)=>{switch(i){case"P":return s.date({width:"short"});case"PP":return s.date({width:"medium"});case"PPP":return s.date({width:"long"});case"PPPP":default:return s.date({width:"full"})}},KE=(i,s)=>{switch(i){case"p":return s.time({width:"short"});case"pp":return s.time({width:"medium"});case"ppp":return s.time({width:"long"});case"pppp":default:return s.time({width:"full"})}},SR=(i,s)=>{const a=i.match(/(P+)(p+)?/)||[],o=a[1],u=a[2];if(!u)return $S(i,s);let d;switch(o){case"P":d=s.dateTime({width:"short"});break;case"PP":d=s.dateTime({width:"medium"});break;case"PPP":d=s.dateTime({width:"long"});break;case"PPPP":default:d=s.dateTime({width:"full"});break}return d.replace("{{date}}",$S(o,s)).replace("{{time}}",KE(u,s))},ER={p:KE,P:SR},_R=/^D+$/,AR=/^Y+$/,DR=["D","DD","YY","YYYY"];function TR(i){return _R.test(i)}function CR(i){return AR.test(i)}function OR(i,s,a){const o=RR(i,s,a);if(console.warn(o),DR.includes(i))throw new RangeError(o)}function RR(i,s,a){const o=i[0]==="Y"?"years":"days of the month";return`Use \`${i.toLowerCase()}\` instead of \`${i}\` (in \`${s}\`) for formatting ${o} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const jR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,MR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kR=/^'([^]*?)'?$/,VR=/''/g,UR=/[a-zA-Z]/;function WE(i,s,a){var _,S,D,B;const o=Eu(),u=o.locale??QE,d=o.firstWeekContainsDate??((S=(_=o.locale)==null?void 0:_.options)==null?void 0:S.firstWeekContainsDate)??1,p=o.weekStartsOn??((B=(D=o.locale)==null?void 0:D.options)==null?void 0:B.weekStartsOn)??0,m=ts(i,a==null?void 0:a.in);if(!B4(m))throw new RangeError("Invalid time value");let g=s.match(MR).map(j=>{const F=j[0];if(F==="p"||F==="P"){const Q=ER[F];return Q(j,u.formatLong)}return j}).join("").match(jR).map(j=>{if(j==="''")return{isToken:!1,value:"'"};const F=j[0];if(F==="'")return{isToken:!1,value:zR(j)};if(LS[F])return{isToken:!0,value:j};if(F.match(UR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+F+"`");return{isToken:!1,value:j}});u.localize.preprocessor&&(g=u.localize.preprocessor(m,g));const v={firstWeekContainsDate:d,weekStartsOn:p,locale:u};return g.map(j=>{if(!j.isToken)return j.value;const F=j.value;(CR(F)||TR(F))&&OR(F,s,String(i));const Q=LS[F[0]];return Q(m,F,u.localize,v)}).join("")}function zR(i){const s=i.match(kR);return s?s[1].replace(VR,"'"):i}function BR(i,s,a){const o=Eu(),u=(a==null?void 0:a.locale)??o.locale??QE,d=V4(i,s);if(isNaN(d))throw new RangeError("Invalid time value");const p=Object.assign({},a,{addSuffix:a==null?void 0:a.addSuffix,comparison:d}),[m,g]=XE(a==null?void 0:a.in,...d>0?[s,i]:[i,s]),v=q4((a==null?void 0:a.roundingMethod)??"round"),_=g.getTime()-m.getTime(),S=_/kS,D=ph(g)-ph(m),B=(_-D)/kS,j=a==null?void 0:a.unit;let F;if(j?F=j:S<1?F="second":S<60?F="minute":S<zS?F="hour":B<US?F="day":B<VS?F="month":F="year",F==="second"){const Q=v(_/1e3);return u.formatDistance("xSeconds",Q,p)}else if(F==="minute"){const Q=v(S);return u.formatDistance("xMinutes",Q,p)}else if(F==="hour"){const Q=v(S/60);return u.formatDistance("xHours",Q,p)}else if(F==="day"){const Q=v(B/zS);return u.formatDistance("xDays",Q,p)}else if(F==="month"){const Q=v(B/US);return Q===12&&j!=="month"?u.formatDistance("xYears",1,p):u.formatDistance("xMonths",Q,p)}else{const Q=v(B/VS);return u.formatDistance("xYears",Q,p)}}function qR(i,s){return BR(i,U4(i),s)}function LR(i){const s=new Date(i);return s.getTime()>Date.now()?"just now":qR(s,{addSuffix:!0})}function i6(i){return i<=0?"Expired":py(i)}function HR(i){return i==null?"--":py(i)}function py(i){if(i<1e3)return`${Math.round(i)}ms`;if(i<6e4){const p=i/1e3;return Number.isInteger(p)?`${p}s`:`${p.toFixed(1)}s`}const s=Math.floor(i/1e3),a=Math.floor(s/86400),o=Math.floor(s%86400/3600),u=Math.floor(s%3600/60),d=s%60;return a>0?o>0?`${a}d ${o}h`:`${a}d`:o>0?u>0?`${o}h ${u}m`:`${o}h`:d>0?`${u}m ${d}s`:`${u}m`}function o6(i,s){const a=new Date(i).getTime(),o=s?new Date(s).getTime():Date.now();return py(o-a)}function e_({options:i,children:s,className:a=""}){const[o,u]=z.useState(!1),[d,p]=z.useState(null),[m,g]=z.useState(null),v=z.useRef(null),_=z.useRef(void 0),S=z.useRef(void 0),D=220,B=z.useCallback(()=>{if(!v.current)return;const ee=v.current.getBoundingClientRect(),te=window.innerWidth-D-8,Se=Math.max(8,Math.min(ee.left,te));g({top:ee.bottom+4,left:Se})},[]),j=z.useCallback(async(ee,te)=>{try{await navigator.clipboard.writeText(ee),p(te),clearTimeout(_.current),_.current=setTimeout(()=>p(null),1200)}catch{}},[]),F=z.useCallback(()=>{clearTimeout(S.current),B(),u(!0)},[B]),Q=z.useCallback(()=>{S.current=setTimeout(()=>u(!1),150)},[]);return z.useEffect(()=>()=>{clearTimeout(_.current),clearTimeout(S.current)},[]),b.jsxDEV("span",{ref:v,className:`inline-flex items-center cursor-default ${a}`,onMouseEnter:F,onMouseLeave:Q,children:[s,o&&m&&KS.createPortal(b.jsxDEV("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:F,onMouseLeave:Q,children:i.map(ee=>b.jsxDEV("button",{onClick:te=>{te.stopPropagation(),j(ee.value,ee.label)},className:"flex items-center justify-between w-full px-2.5 py-1 text-left hover:bg-surface-hover transition-colors",children:[b.jsxDEV("span",{className:"text-[9px] font-medium uppercase tracking-wider text-text-tertiary w-10 shrink-0",children:ee.label},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:85,columnNumber:15},this),b.jsxDEV("span",{className:"text-[10px] font-mono text-text-secondary truncate ml-2",children:d===ee.label?"✓":ee.value},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:88,columnNumber:15},this)]},ee.label,!0,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:80,columnNumber:13},this))},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:73,columnNumber:9},this),document.body)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/display/DateTooltip.tsx",lineNumber:65,columnNumber:5},this)}function PR(i,s){const a=new Date(i);switch(s){case"relative":return LR(i);case"datetime":return WE(a,"MMM d, yyyy h:mm a");case"time":return a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}}function $R(i){const s=new Date(i);return[{label:"ms",value:String(s.getTime())},{label:"utc",value:s.toISOString()},{label:"local",value:WE(s,"MMM d, yyyy h:mm:ss a")}]}function IR({date:i,format:s="relative",className:a=""}){const[,o]=z.useState(0);z.useEffect(()=>{if(s!=="relative")return;const d=setInterval(()=>o(p=>p+1),3e4);return()=>clearInterval(d)},[s]);const u=z.useMemo(()=>$R(i),[i]);return b.jsxDEV(e_,{options:u,children:b.jsxDEV("time",{dateTime:i,className:`text-xs text-text-tertiary ${a}`,children:PR(i,s)},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateValue.tsx",lineNumber:56,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DateValue.tsx",lineNumber:55,columnNumber:5},this)}function FR({ms:i,className:s=""}){const a=HR(i),o=z.useMemo(()=>i==null?[]:[{label:"ms",value:String(i)},{label:"sec",value:`${(i/1e3).toFixed(3)}s`},{label:"text",value:a}],[i,a]);return i==null?b.jsxDEV("span",{className:`text-xs text-text-tertiary ${s}`,children:"--"},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DurationValue.tsx",lineNumber:29,columnNumber:12},this):b.jsxDEV(e_,{options:o,children:b.jsxDEV("span",{className:`text-xs text-text-tertiary ${s}`,children:a},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DurationValue.tsx",lineNumber:34,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/display/DurationValue.tsx",lineNumber:33,columnNumber:5},this)}const YR=["sm","md","lg","full"],IS={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"},FS={sm:"Small",md:"Medium",lg:"Large",full:"Fullscreen"};function GR({which:i}){const s="stroke-current";switch(i){case"sm":return b.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsxDEV("rect",{x:"5",y:"5",width:"7",height:"7",rx:"1.5",className:s,strokeWidth:"1.5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:30,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:30,columnNumber:15},this);case"md":return b.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsxDEV("rect",{x:"3",y:"3",width:"9",height:"9",rx:"1.5",className:s,strokeWidth:"1.5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:32,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:32,columnNumber:15},this);case"lg":return b.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsxDEV("rect",{x:"1.5",y:"1.5",width:"11",height:"11",rx:"1.5",className:s,strokeWidth:"1.5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:34,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:34,columnNumber:15},this);case"full":return b.jsxDEV("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:b.jsxDEV("rect",{x:"0.75",y:"0.75",width:"12.5",height:"12.5",rx:"1.5",className:s,strokeWidth:"1.5"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:36,columnNumber:75},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:36,columnNumber:15},this)}}function JR({msg:i}){const[s,a]=z.useState(0);z.useEffect(()=>{const p=new Date(i.timestamp).getTime(),m=()=>a(Math.floor((Date.now()-p)/1e3));m();const g=setInterval(m,1e3);return()=>clearInterval(g)},[i.timestamp]);const o=Math.floor(s/60),u=s%60,d=o>0?`${o}m ${u}s`:`${u}s`;return b.jsxDEV("span",{className:"inline-flex flex-col gap-1.5",children:[b.jsxDEV("span",{className:"inline-flex items-center gap-1",children:[b.jsxDEV("span",{className:"text-text-tertiary",children:"Thinking"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:60,columnNumber:9},this),b.jsxDEV("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:61,columnNumber:9},this),b.jsxDEV("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse [animation-delay:150ms]"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:62,columnNumber:9},this),b.jsxDEV("span",{className:"inline-block w-1 h-1 rounded-full bg-text-tertiary animate-pulse [animation-delay:300ms]"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:63,columnNumber:9},this),b.jsxDEV("span",{className:"text-text-muted ml-1 tabular-nums",children:d},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:64,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:59,columnNumber:7},this),i.workflowId&&b.jsxDEV(cl,{to:`/workflows/executions/${i.workflowId}`,className:"inline-flex items-center gap-1 text-[10px] text-accent/70 hover:text-accent transition-colors",children:[b.jsxDEV(fu,{className:"w-2.5 h-2.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:71,columnNumber:11},this),"watch execution"]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:67,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:58,columnNumber:5},this)}function XR({msg:i,compileMessage:s}){const a=i.role==="assistant";return b.jsxDEV("div",{className:`flex items-center gap-1.5 ${a?"justify-start":"justify-end"}`,children:[b.jsxDEV(IR,{date:i.timestamp,format:"time",className:"!text-[9px] text-text-muted/50"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:85,columnNumber:7},this),i.durationMs!=null&&b.jsxDEV(b.Fragment,{children:[b.jsxDEV("span",{className:"text-text-muted/30 text-[8px]",children:"·"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:88,columnNumber:11},this),b.jsxDEV(FR,{ms:i.durationMs,className:"!text-[9px] text-text-muted/50"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:89,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:87,columnNumber:9},this),i.workflowId&&b.jsxDEV(cl,{to:`/workflows/executions/${i.workflowId}`,className:"text-text-muted/40 hover:text-accent transition-colors",title:"View workflow execution",children:b.jsxDEV(fu,{className:"w-2.5 h-2.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:98,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:93,columnNumber:9},this),a&&i.workflowId&&!i.pending&&b.jsxDEV("button",{onClick:()=>s(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:b.jsxDEV(dC,{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},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:116,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:102,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/help-panel-messages.tsx",lineNumber:84,columnNumber:5},this)}function QR(){const{helpOpen:i,setHelpOpen:s,messages:a,sendMessage:o,pageContext:u,activeWorkflowId:d,clearMessages:p,compileMessage:m}=YE(),[g,v]=z.useState(""),[_,S]=z.useState("md"),[D,B]=z.useState(!0),j=z.useRef(null),F=z.useRef(null);if(z.useEffect(()=>{j.current&&(j.current.scrollTop=j.current.scrollHeight)},[a]),z.useEffect(()=>{i&&F.current&&F.current.focus()},[i]),z.useEffect(()=>{if(!i)return;const q=ne=>{ne.key==="Escape"&&(_==="full"?S("lg"):_==="lg"?S("md"):_==="md"?S("sm"):s(!1))};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[i,_,s]),!i)return null;const Q=()=>{const q=g.trim();!q||d||(o(q),v(""),F.current&&(F.current.style.height="auto"))},ee=q=>{q.key==="Enter"&&!q.shiftKey&&(q.preventDefault(),Q())},te=_==="full",Se=u.page.replace(/-/g," "),De=te?{}:{bottom:"calc(var(--feed-height, 32px) + 76px)"};return b.jsxDEV("div",{className:`fixed z-[45] flex flex-col border border-surface-border rounded-lg overflow-hidden transition-all duration-300 ${te?IS.full:`right-6 ${IS[_]}`} ${D?"bg-surface-raised shadow-xl":"bg-surface-raised/[0.03] shadow-lg shadow-black/5"}`,style:De,onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1),children:[b.jsxDEV("div",{className:`flex items-center justify-between px-4 py-2.5 border-b border-surface-border shrink-0 transition-all duration-300 ${D?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[b.jsxDEV("div",{className:"min-w-0 flex-1",children:[b.jsxDEV("p",{className:"text-xs font-medium text-text-primary truncate",children:"Help Assistant"},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:94,columnNumber:11},this),b.jsxDEV("p",{className:"text-[10px] text-text-tertiary truncate",children:Se},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:95,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:93,columnNumber:9},this),b.jsxDEV("div",{className:"flex items-center gap-1 ml-2",children:[b.jsxDEV("div",{className:"flex items-center gap-0.5 border border-surface-border rounded p-0.5",role:"radiogroup","aria-label":"Panel size",children:YR.map(q=>b.jsxDEV("button",{onClick:()=>S(q),className:`p-1 rounded transition-colors ${q===_?"bg-accent/15 text-accent":"text-text-muted hover:text-text-secondary hover:bg-surface-hover"}`,role:"radio","aria-checked":q===_,"aria-label":FS[q],title:FS[q],children:b.jsxDEV(GR,{which:q},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:113,columnNumber:17},this)},q,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:100,columnNumber:15},this))},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:98,columnNumber:11},this),a.length>0&&b.jsxDEV("button",{onClick:p,className:"p-1 text-text-tertiary hover:text-text-secondary transition-colors","aria-label":"Clear conversation",title:"Clear conversation",children:b.jsxDEV(hC,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:124,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:118,columnNumber:13},this),b.jsxDEV("button",{onClick:()=>s(!1),className:"p-1 text-text-tertiary hover:text-text-primary transition-colors","aria-label":"Close",title:"Close",children:b.jsxDEV(Z0,{className:"w-3.5 h-3.5",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:133,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:127,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:97,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:90,columnNumber:7},this),b.jsxDEV("div",{ref:j,className:`flex-1 overflow-y-auto px-4 py-3 space-y-3 min-h-[120px] transition-all duration-300 ${D?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[a.length===0&&b.jsxDEV("p",{className:"text-xs text-text-tertiary text-center py-6",children:"Ask anything about what you're viewing."},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:143,columnNumber:11},this),a.map(q=>b.jsxDEV("div",{className:`text-xs leading-relaxed ${q.role==="user"?"text-right":"text-left"}`,children:[b.jsxDEV("div",{className:`inline-block max-w-[85%] px-3 py-2 rounded-md whitespace-pre-wrap ${q.role==="user"?"bg-accent/10 text-text-primary":"bg-surface-sunken text-text-secondary"}`,children:q.pending?b.jsxDEV(JR,{msg:q},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:160,columnNumber:17},this):q.role==="assistant"?b.jsxDEV(my,{content:q.content},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:162,columnNumber:17},this):q.content},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:152,columnNumber:13},this),!q.pending&&b.jsxDEV("div",{className:"mt-0.5",children:b.jsxDEV(XR,{msg:q,compileMessage:m},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:169,columnNumber:17},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:168,columnNumber:15},this)]},q.id,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:148,columnNumber:11},this))]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:139,columnNumber:7},this),b.jsxDEV("div",{className:`border-t border-surface-border px-3 py-2.5 flex gap-2 shrink-0 transition-all duration-300 ${D?"opacity-100":"opacity-50 grayscale brightness-150"}`,children:[b.jsxDEV("textarea",{ref:F,value:g,onChange:q=>{v(q.target.value);const ne=q.target;ne.style.height="auto",ne.style.height=`${Math.min(ne.scrollHeight,120)}px`},onKeyDown:ee,placeholder:"Ask a question...",rows:2,className:"flex-1 resize-none bg-surface text-xs text-text-primary placeholder:text-text-tertiary rounded px-2.5 py-1.5 border border-surface-border focus:outline-none focus:border-accent",style:{minHeight:"2.5rem"},disabled:!!d},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:180,columnNumber:9},this),b.jsxDEV("button",{onClick:Q,disabled:!g.trim()||!!d,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:b.jsxDEV(mC,{className:"w-4 h-4",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:202,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:196,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:177,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/HelpPanel.tsx",lineNumber:77,columnNumber:5},this)}function ZR(){var B;const{isSuperAdmin:i,hasRoleType:s,hasRole:a}=Ki(),{data:o}=z5(),u=!!((B=o==null?void 0:o.ai)!=null&&B.enabled),{collapsed:d,toggle:p}=PE(),[m,g]=z.useState(!1),[v,_]=z.useState(()=>window.location.hash.startsWith("#docs")),S=Zi(),D=z.useRef(null);return z.useEffect(()=>{const j=D.current;j&&(j.classList.remove("animate-page-in"),j.offsetWidth,j.classList.add("animate-page-in"))},[S.pathname]),z.useEffect(()=>{const j=()=>{window.location.hash.startsWith("#docs")&&_(!0)};return window.addEventListener("hashchange",j),()=>window.removeEventListener("hashchange",j)},[]),b.jsxDEV("div",{className:"h-screen bg-surface flex flex-col",style:{"--feed-height":m?"224px":"32px"},children:[b.jsxDEV($5,{onToggleEventFeed:()=>g(j=>!j),onToggleDocs:()=>_(j=>!j)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:49,columnNumber:7},this),b.jsxDEV("div",{className:"flex flex-1 overflow-hidden",children:[b.jsxDEV("aside",{className:`${d?"w-16":"w-60"} shrink-0 bg-surface-raised border-r border-surface-border flex flex-col transition-[width] duration-200 ease-out overflow-hidden relative z-20`,children:[b.jsxDEV("nav",{className:"flex-1 px-3 pt-[36px] pb-4 space-y-2 overflow-y-auto overflow-x-hidden",children:[b.jsxDEV(J5,{aiEnabled:u},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:61,columnNumber:13},this),(i||s("admin")||a("engineer"))&&b.jsxDEV(X5,{aiEnabled:u},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:62,columnNumber:79},this),(i||s("admin")||a("engineer"))&&b.jsxDEV(Z5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:63,columnNumber:79},this),(i||s("admin"))&&b.jsxDEV(W5,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:64,columnNumber:56},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:60,columnNumber:11},this),b.jsxDEV("button",{onClick:p,className:`shrink-0 py-3 text-text-tertiary hover:text-text-secondary transition-colors duration-150 ${d?"flex justify-center":"flex items-center px-7"}`,"aria-label":d?"Expand sidebar":"Collapse sidebar",children:d?b.jsxDEV(pC,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:76,columnNumber:15},this):b.jsxDEV(bC,{className:"w-4 h-4 text-accent-muted",strokeWidth:1.5},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:78,columnNumber:15},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:68,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:54,columnNumber:9},this),b.jsxDEV("main",{className:"flex-1 overflow-y-auto",children:b.jsxDEV("div",{ref:D,className:`max-w-dashboard mx-auto px-10 py-10 animate-page-in ${m?"pb-60":"pb-16"}`,children:b.jsxDEV(Zd,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:86,columnNumber:13},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:85,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:84,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:52,columnNumber:7},this),b.jsxDEV(p4,{open:m,onToggle:()=>g(j=>!j)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:92,columnNumber:7},this),b.jsxDEV(_4,{open:v,onClose:()=>{_(!1),history.replaceState(null,"",window.location.pathname+window.location.search)}},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:93,columnNumber:7},this),u&&b.jsxDEV(O4,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:94,columnNumber:21},this),u&&b.jsxDEV(QR,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:95,columnNumber:21},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:47,columnNumber:5},this)}function KR(){const{isAuthenticated:i}=Ki(),s=Zi();return i?b.jsxDEV(q5,{children:b.jsxDEV(C4,{children:b.jsxDEV(ZR,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:111,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:110,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:109,columnNumber:5},this):b.jsxDEV(ei,{to:"/login",state:{from:s.pathname},replace:!0},void 0,!1,{fileName:"/app/dashboard/src/components/layout/Shell.tsx",lineNumber:105,columnNumber:12},this)}function t_({provider:i,className:s="w-5 h-5"}){switch(i){case"google":return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"currentColor",children:[b.jsxDEV("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"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:11,columnNumber:11},this),b.jsxDEV("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"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:12,columnNumber:11},this),b.jsxDEV("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"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:13,columnNumber:11},this),b.jsxDEV("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"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:14,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:10,columnNumber:9},this);case"github":return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"currentColor",children:b.jsxDEV("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"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:20,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:19,columnNumber:9},this);case"microsoft":return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"currentColor",children:[b.jsxDEV("path",{d:"M3 3h8.5v8.5H3z",fill:"#F25022"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:26,columnNumber:11},this),b.jsxDEV("path",{d:"M12.5 3H21v8.5h-8.5z",fill:"#7FBA00"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:27,columnNumber:11},this),b.jsxDEV("path",{d:"M3 12.5h8.5V21H3z",fill:"#00A4EF"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:28,columnNumber:11},this),b.jsxDEV("path",{d:"M12.5 12.5H21V21h-8.5z",fill:"#FFB900"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:29,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:25,columnNumber:9},this);case"anthropic":return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"currentColor",children:b.jsxDEV("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"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:35,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:34,columnNumber:9},this);default:return b.jsxDEV("svg",{className:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[b.jsxDEV("circle",{cx:"12",cy:"12",r:"10"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:41,columnNumber:11},this),b.jsxDEV("path",{d:"M12 8v4l3 3"},void 0,!1,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:42,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/components/common/OAuthIcon.tsx",lineNumber:40,columnNumber:9},this)}}async function WR(){return pt("/auth/oauth/providers")}async function ej(i,s){const a=s?`?label=${encodeURIComponent(s)}`:"";return pt(`/auth/oauth/connections/${i}${a}`,{method:"DELETE"})}function l6(){return wa({queryKey:["oauth-connections"],queryFn:()=>pt("/auth/oauth/connections")})}function c6(){const i=Vs();return Sa({mutationFn:({provider:s,label:a})=>ej(s,a),onSuccess:()=>{i.invalidateQueries({queryKey:["oauth-connections"]})}})}function tj(){var ne;const{login:i,isAuthenticated:s}=Ki(),a=WS(),o=Zi(),u=new URLSearchParams(o.search),d=u.get("token"),p=u.get("error"),m=((ne=o.state)==null?void 0:ne.from)??u.get("returnTo")??"/",g=z.useRef(!1);d&&!g.current&&(g.current=!0,i(d,void 0,{displayName:u.get("displayName"),username:u.get("username")}));const[v,_]=z.useState(""),[S,D]=z.useState(""),[B,j]=z.useState(p||""),[F,Q]=z.useState(!1),[ee,te]=z.useState(!!d),[Se,De]=z.useState([]);if(z.useEffect(()=>{d||WR().then(De).catch(()=>{})},[]),z.useEffect(()=>{if(!ee)return;const oe=setTimeout(()=>a(m,{replace:!0}),1500);return()=>clearTimeout(oe)},[ee]),s&&!ee)return b.jsxDEV(ei,{to:m,replace:!0},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:54,columnNumber:12},this);const q=async oe=>{var W,X;if(oe.preventDefault(),j(""),!v.trim()||!S){j("Username and password are required");return}Q(!0);try{const H=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:v.trim(),password:S})}),le=await H.json();if(!H.ok){j(le.error||"Login failed");return}te(!0),i(le.token,{username:v.trim(),password:S},{displayName:(W=le.user)==null?void 0:W.display_name,username:(X=le.user)==null?void 0:X.external_id})}catch{j("Unable to connect to server")}finally{Q(!1)}};return b.jsxDEV("div",{className:"min-h-screen bg-surface flex items-center justify-center overflow-hidden",children:b.jsxDEV("div",{className:"w-full max-w-md p-10",children:[b.jsxDEV("div",{className:`mb-10 transition-all duration-[1500ms] ease-in ${ee?"translate-x-[120vw] -translate-y-[60vh] scale-[3] opacity-0":""}`,children:b.jsxDEV(dy,{size:"lg",hideLabel:ee},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:101,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:94,columnNumber:9},this),b.jsxDEV("form",{onSubmit:q,className:`space-y-5 transition-opacity duration-300 ${ee?"opacity-0":""}`,children:[b.jsxDEV("div",{children:[b.jsxDEV("label",{htmlFor:"username",className:"block text-sm font-medium text-text-secondary mb-2",children:"Username"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:109,columnNumber:13},this),b.jsxDEV("input",{id:"username",type:"text",value:v,onChange:oe=>_(oe.target.value),className:"input",placeholder:"Enter your username",autoFocus:!ee,autoComplete:"username"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:115,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:108,columnNumber:11},this),b.jsxDEV("div",{children:[b.jsxDEV("label",{htmlFor:"password",className:"block text-sm font-medium text-text-secondary mb-2",children:"Password"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:128,columnNumber:13},this),b.jsxDEV("input",{id:"password",type:"password",value:S,onChange:oe=>D(oe.target.value),className:"input",placeholder:"Enter your password",autoComplete:"current-password"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:134,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:127,columnNumber:11},this),B&&b.jsxDEV("p",{className:"text-sm text-status-error",children:B},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:145,columnNumber:21},this),b.jsxDEV("button",{type:"submit",className:"btn-primary w-full",disabled:F||ee,children:F?"Signing in...":"Sign In"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:147,columnNumber:11},this),Se.length>0&&b.jsxDEV(b.Fragment,{children:[b.jsxDEV("div",{className:"flex items-center gap-3 mt-6",children:[b.jsxDEV("div",{className:"flex-1 h-px bg-border"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:154,columnNumber:17},this),b.jsxDEV("span",{className:"text-xs text-text-tertiary",children:"or continue with"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:155,columnNumber:17},this),b.jsxDEV("div",{className:"flex-1 h-px bg-border"},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:156,columnNumber:17},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:153,columnNumber:15},this),b.jsxDEV("div",{className:"space-y-2",children:Se.filter(oe=>oe.provider!=="anthropic").map(oe=>b.jsxDEV("a",{href:`/api/auth/oauth/${oe.provider}?returnTo=${encodeURIComponent(m)}`,className:"btn-secondary w-full flex items-center justify-center gap-2",children:[b.jsxDEV(t_,{provider:oe.provider},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:165,columnNumber:21},this),"Sign in with ",oe.name]},oe.provider,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:160,columnNumber:19},this))},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:158,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:152,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:104,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:93,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/LoginPage.tsx",lineNumber:92,columnNumber:5},this)}function YS(){const{isAuthenticated:i}=Ki(),s=WS(),a=Zi(),o=new URLSearchParams(a.search),u=o.get("state")||"";z.useEffect(()=>{i||s(`/login?returnTo=${encodeURIComponent(a.pathname+a.search)}`)},[i]);const[d,p]=z.useState(""),[m,g]=z.useState(o.get("label")||"default"),[v,_]=z.useState(""),[S,D]=z.useState(!1),B=d.trim().startsWith("sk-ant-oat"),j=d.trim().startsWith("sk-ant-api"),F=Q=>{Q.preventDefault();const ee=d.trim();if(!ee){_("A token or API key is required");return}if(!ee.startsWith("sk-ant-")){_('Invalid format. Must start with "sk-ant-oat" (OAuth token) or "sk-ant-api" (API key)');return}D(!0),_("");const te=`/api/auth/oauth/anthropic/callback?code=${encodeURIComponent(ee)}&state=${encodeURIComponent(u)}`;window.location.href=te};return b.jsxDEV("div",{className:"min-h-screen bg-surface flex items-center justify-center",children:b.jsxDEV("div",{className:"w-full max-w-md p-10",children:[b.jsxDEV("div",{className:"mb-10",children:b.jsxDEV(dy,{size:"lg"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:67,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:66,columnNumber:9},this),b.jsxDEV("div",{className:"flex items-center gap-2 mb-6",children:[b.jsxDEV(t_,{provider:"anthropic",className:"w-6 h-6"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:71,columnNumber:11},this),b.jsxDEV("h2",{className:"text-lg font-semibold text-text-primary",children:"Connect Anthropic"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:72,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:70,columnNumber:9},this),b.jsxDEV("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."},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:77,columnNumber:9},this),b.jsxDEV("form",{onSubmit:F,className:"space-y-5",children:[b.jsxDEV("div",{children:[b.jsxDEV("label",{htmlFor:"token",className:"block text-sm font-medium text-text-secondary mb-2",children:"OAuth Token or API Key"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:84,columnNumber:13},this),b.jsxDEV("input",{id:"token",type:"password",value:d,onChange:Q=>p(Q.target.value),className:"input",placeholder:"sk-ant-oat01-... or sk-ant-api03-...",autoFocus:!0,autoComplete:"off"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:90,columnNumber:13},this),B&&b.jsxDEV("p",{className:"text-xs text-status-success mt-1",children:"OAuth token detected — uses your Claude subscription (flat rate)"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:101,columnNumber:15},this),j&&b.jsxDEV("p",{className:"text-xs text-status-warning mt-1",children:"API key detected — billed per-token from your Anthropic API account"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:106,columnNumber:15},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:83,columnNumber:11},this),b.jsxDEV("div",{children:[b.jsxDEV("label",{htmlFor:"label",className:"block text-sm font-medium text-text-secondary mb-2",children:"Label"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:113,columnNumber:13},this),b.jsxDEV("input",{id:"label",type:"text",value:m,onChange:Q=>g(Q.target.value.replace(/\s+/g,"-").toLowerCase()),className:"input",placeholder:"default",autoComplete:"off"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:119,columnNumber:13},this),b.jsxDEV("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").'},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:128,columnNumber:13},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:112,columnNumber:11},this),v&&b.jsxDEV("p",{className:"text-sm text-status-error",children:v},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:134,columnNumber:21},this),b.jsxDEV("button",{type:"submit",className:"btn-primary w-full",disabled:S,children:S?"Validating...":"Connect"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:136,columnNumber:11},this),b.jsxDEV("a",{href:"/",className:"block text-center text-sm text-text-tertiary hover:text-text-secondary",children:"Cancel"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:144,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:82,columnNumber:9},this),b.jsxDEV("div",{className:"mt-6 space-y-3 text-xs text-text-tertiary",children:[b.jsxDEV("div",{children:[b.jsxDEV("span",{className:"font-medium text-text-secondary",children:"Recommended:"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:154,columnNumber:13},this)," ","Run"," ",b.jsxDEV("code",{className:"px-1 py-0.5 bg-surface-sunken rounded text-[11px]",children:"claude setup-token"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:156,columnNumber:13},this)," ","in your terminal to generate an OAuth token that uses your subscription."]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:153,columnNumber:11},this),b.jsxDEV("div",{children:[b.jsxDEV("span",{className:"font-medium text-text-secondary",children:"Alternative:"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:160,columnNumber:13},this)," ","Use an API key from"," ",b.jsxDEV("a",{href:"https://console.anthropic.com/settings/keys",target:"_blank",rel:"noopener noreferrer",className:"text-accent-secondary hover:underline",children:"console.anthropic.com"},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:162,columnNumber:13},this)," ","(billed per-token)."]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:159,columnNumber:11},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:152,columnNumber:9},this)]},void 0,!0,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:65,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/pages/ConnectAnthropicPage.tsx",lineNumber:64,columnNumber:5},this)}function E0({roleTypes:i,roleNames:s,redirectTo:a="/"}){const{isSuperAdmin:o,hasRole:u,hasRoleType:d}=Ki();return o?b.jsxDEV(Zd,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/RequireRole.tsx",lineNumber:18,columnNumber:28},this):i&&i.some(p=>d(p))?b.jsxDEV(Zd,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/RequireRole.tsx",lineNumber:21,columnNumber:66},this):s&&s.some(p=>u(p))?b.jsxDEV(Zd,{},void 0,!1,{fileName:"/app/dashboard/src/components/layout/RequireRole.tsx",lineNumber:24,columnNumber:62},this):b.jsxDEV(ei,{to:a,replace:!0},void 0,!1,{fileName:"/app/dashboard/src/components/layout/RequireRole.tsx",lineNumber:26,columnNumber:10},this)}const nj=z.lazy(()=>He(()=>import("./ProcessesListPage-C_ars8gp.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])).then(i=>({default:i.ProcessesListPage}))),sj=z.lazy(()=>He(()=>import("./ProcessDetailPage-Beo-QVL-.js"),__vite__mapDeps([16,2,1,4,17,13,18,15,9,6,19,20,21])).then(i=>({default:i.ProcessDetailPage}))),aj=z.lazy(()=>He(()=>import("./McpOverview-BQokGg0z.js"),__vite__mapDeps([22,2,23,24,25,26,12,13,27,6])).then(i=>({default:i.McpOverview}))),rj=z.lazy(()=>He(()=>import("./McpRunsPage-B3R6KZ61.js"),__vite__mapDeps([28,2,24,25,26,5,6,7,8,15,13,9,29,12,11,10,14,30])).then(i=>({default:i.McpRunsPage}))),ij=z.lazy(()=>He(()=>import("./McpRunDetailPage-Cv4qyr91.js"),__vite__mapDeps([31,2,24,18,12,13,32,6,33,34,14,35,36,11])).then(i=>({default:i.McpRunDetailPage}))),oj=z.lazy(()=>He(()=>import("./McpQueryPage-DUey_h9J.js"),__vite__mapDeps([37,12,13,2,7,8,11,10,14,9,29,15,30,5,6,4,38])).then(i=>({default:i.McpQueryPage}))),lj=z.lazy(()=>He(()=>import("./McpQueryDetailPage-0WOp2n_j.js"),__vite__mapDeps([39,12,13,2,18,38,40,6,25,4,41,33,24,3,1,42,43,44,45,32,46,35])).then(i=>({default:i.McpQueryDetailPage}))),cj=z.lazy(()=>He(()=>import("./EscalationsOverview-BNENCL_2.js"),__vite__mapDeps([47,2,4,12,13,27,6])).then(i=>({default:i.EscalationsOverview}))),uj=z.lazy(()=>He(()=>import("./AvailableEscalationsPage-bdPqEzbx.js"),__vite__mapDeps([48,2,4,49,5,6,7,8,10,12,13,50,51,52,21,53,11,54,19,15,9,55,30,14])).then(i=>({default:i.AvailableEscalationsPage}))),fj=z.lazy(()=>He(()=>import("./OperatorDashboard-dldvzjcg.js"),__vite__mapDeps([56,4,2,49,5,6,7,8,12,13,10,30,53,11,54,19,15,9,55,14])).then(i=>({default:i.OperatorDashboard}))),dj=z.lazy(()=>He(()=>import("./index-CrMxD5Ib.js"),__vite__mapDeps([57,2,34,49,12,13,55,3,4,20,21,51,50,18,19,32,6,33])).then(i=>({default:i.EscalationDetailPage}))),hj=z.lazy(()=>He(()=>import("./WorkflowsOverview-NnPi6rwS.js"),__vite__mapDeps([58,2,3,4,12,13,27,6])).then(i=>({default:i.WorkflowsOverview}))),mj=z.lazy(()=>He(()=>import("./index-CFoddJDr.js"),__vite__mapDeps([59,2,3,12,13,15,44,45,6,7,8,60,46,18])).then(i=>({default:i.StartWorkflowPage}))),pj=z.lazy(()=>He(()=>import("./index-CFoddJDr.js"),__vite__mapDeps([59,2,3,12,13,15,44,45,6,7,8,60,46,18])).then(i=>({default:i.DurableInvokePage}))),bj=z.lazy(()=>He(()=>import("./WorkflowsDashboard-BlAPZbQZ.js"),__vite__mapDeps([61,2,9,29,3,4,5,6,7,8,15,13,12,11,10,14,30])).then(i=>({default:()=>i.WorkflowsDashboard({tier:"durable"})}))),yj=z.lazy(()=>He(()=>import("./WorkflowsDashboard-BlAPZbQZ.js"),__vite__mapDeps([61,2,9,29,3,4,5,6,7,8,15,13,12,11,10,14,30])).then(i=>({default:()=>i.WorkflowsDashboard({tier:"all"})}))),gj=z.lazy(()=>He(()=>import("./YamlWorkflowsPage-C4mZum6x.js"),__vite__mapDeps([62,2,25,40,5,6,63,12,13,11,8,43,44,45,42,60,46,18,64])).then(i=>({default:i.YamlWorkflowsPage}))),vj=z.lazy(()=>He(()=>import("./TasksListPage-Czu08px3.js"),__vite__mapDeps([65,1,2,3,5,6,7,8,18,54,46,10,11,12,13,15])).then(i=>({default:i.TasksListPage}))),xj=z.lazy(()=>He(()=>import("./TaskDetailPage-CoZFkJ6d.js"),__vite__mapDeps([66,1,2,18,54,12,13,6])).then(i=>({default:i.TaskDetailPage}))),GS=z.lazy(()=>He(()=>import("./WorkflowExecutionPage-BMNIxeJB.js"),__vite__mapDeps([67,2,3,4,34,1,12,13,33,14,18,32,6,35,36,11])).then(i=>({default:i.WorkflowExecutionPage}))),Nj=z.lazy(()=>He(()=>import("./AdminDashboard-ntLz5Pro.js"),__vite__mapDeps([68,1,2,4,23,17,13,6])).then(i=>({default:i.AdminDashboard}))),wj=z.lazy(()=>He(()=>import("./index-DeL84Cag.js"),__vite__mapDeps([69,2,3,7,8,11,30,5,6,12,13,70,15])).then(i=>({default:i.WorkersPage}))),Sj=z.lazy(()=>He(()=>import("./index-BgVuyWhi.js"),__vite__mapDeps([71,2,3,7,8,72,52,6,11,30,5,12,13,19,70,15,73,49,44,45])).then(i=>({default:i.WorkflowConfigsPage}))),JS=z.lazy(()=>He(()=>import("./index-BgVuyWhi.js"),__vite__mapDeps([71,2,3,7,8,72,52,6,11,30,5,12,13,19,70,15,73,49,44,45])).then(i=>({default:i.WorkflowConfigDetailPage}))),Ej=z.lazy(()=>He(()=>import("./index-C2MJzu6J.js"),__vite__mapDeps([74,2,23,8,72,52,6,12,13,11,10,5,63,75,43,44,45,42,64,30,18])).then(i=>({default:i.McpServersPage}))),XS=z.lazy(()=>He(()=>import("./index-DqeLbz6j.js"),__vite__mapDeps([76,2,23,73,12,13,41,6])).then(i=>({default:i.McpServerDetailPage}))),_j=z.lazy(()=>He(()=>import("./index-P9huxx3-.js"),__vite__mapDeps([77,2,21,5,6,7,8,10,11,9,72,52,30,12,13,19,45,49,46])).then(i=>({default:i.UsersPage}))),Aj=z.lazy(()=>He(()=>import("./RolesPage-DgSXFFGL.js"),__vite__mapDeps([78,2,49,7,8,72,52,6,12,13,19,30])).then(i=>({default:i.RolesPage}))),Dj=z.lazy(()=>He(()=>import("./index-BWKIigEk.js"),__vite__mapDeps([79,2,12,13,52,6,50])).then(i=>({default:i.MaintenancePage}))),Tj=z.lazy(()=>He(()=>import("./index-BR3SwTNI.js"),__vite__mapDeps([80,2,17,13,11,5,6,81,52,33,70,7,8,30])).then(i=>({default:i.ControlPlanePage}))),Cj=z.lazy(()=>He(()=>import("./index-CwkJBn87.js"),__vite__mapDeps([82,2,6,81,5,7,8,10,11,9,12,13,14])).then(i=>({default:i.StreamMessagesPage}))),Oj=z.lazy(()=>He(()=>import("./CredentialsPage-CmbwypSF.js"),__vite__mapDeps([83,2,12,13,46,72,52,6])).then(i=>({default:i.CredentialsPage}))),Rj=z.lazy(()=>He(()=>import("./index-CuY5hPYB.js"),__vite__mapDeps([84,2,6,12,13,11,14,8,85,46])).then(i=>({default:i.FilesPage}))),jj=z.lazy(()=>He(()=>import("./index-C0sDEKdo.js"),__vite__mapDeps([86,2,12,13,11,14,10,8,85,46,87,41,6])).then(i=>({default:i.KnowledgePage}))),Mj=z.lazy(()=>He(()=>import("./HomePage-fterfLKH.js"),__vite__mapDeps([88,2,3,24,81,1,4,19,13,15,14,89,6])).then(i=>({default:i.HomePage}))),kj=z.lazy(()=>He(()=>import("./AgentsPage-_ptA-0YO.js"),__vite__mapDeps([90,91,2,4,5,6,7,8,10,11,12,13,14])).then(i=>({default:i.AgentsPage}))),Vj=z.lazy(()=>He(()=>import("./AgentDetailPage-Cm2KFR4O.js"),__vite__mapDeps([92,2,91,93,13,4,89,15,6])).then(i=>({default:i.AgentDetailPage}))),QS=z.lazy(()=>He(()=>import("./AgentConfigPage-D27vWOI6.js"),__vite__mapDeps([94,2,91,93,13,12,87,43,44,45,3,25,95,96,89,15,6])).then(i=>({default:i.AgentConfigPage}))),Uj=z.lazy(()=>He(()=>import("./CapabilitiesPage-M7-ZTFNV.js"),__vite__mapDeps([97,2,95,75,23,43,44,45,13,42,64,6,12])).then(i=>({default:i.CapabilitiesPage}))),zj=z.lazy(()=>He(()=>import("./TopicsPage-DKXlpZl_.js"),__vite__mapDeps([98,96,2,5,6,7,8,10,11,12,13,14])).then(i=>({default:i.TopicsPage}))),Bj=z.lazy(()=>He(()=>import("./TopicDetailPage-DwShZbh9.js"),__vite__mapDeps([99,2,96,14,13,6])).then(i=>({default:i.TopicDetailPage})));function qj(){return b.jsxDEV("div",{className:"animate-pulse space-y-4",children:[b.jsxDEV("div",{className:"h-8 bg-surface-sunken rounded w-48"},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:167,columnNumber:7},this),b.jsxDEV("div",{className:"h-40 bg-surface-sunken rounded"},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:168,columnNumber:7},this)]},void 0,!0,{fileName:"/app/dashboard/src/App.tsx",lineNumber:166,columnNumber:5},this)}function Me({children:i}){return b.jsxDEV(z.Suspense,{fallback:b.jsxDEV(qj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:175,columnNumber:25},this),children:b.jsxDEV("div",{className:"animate-page-enter",children:i},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:176,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:175,columnNumber:5},this)}const n_=new LT({defaultOptions:{queries:{staleTime:1e4,retry:(i,s)=>s instanceof Error&&s.message==="Session expired"?!1:i<1}}});window.addEventListener("auth:unauthorized",()=>{n_.clear(),sessionStorage.removeItem("lt_token"),sessionStorage.removeItem("lt_credentials"),sessionStorage.removeItem("lt_user_info"),window.location.pathname!=="/login"&&(window.location.href=`/login?returnTo=${encodeURIComponent(window.location.pathname)}`)});const Lj=$T([{path:"/login",element:b.jsxDEV(tj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:212,columnNumber:30},void 0)},{path:"/connect/anthropic",element:b.jsxDEV(YS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:213,columnNumber:42},void 0)},{path:"/connect/:provider",element:b.jsxDEV(YS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:214,columnNumber:42},void 0)},{path:"/",element:b.jsxDEV(KR,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:217,columnNumber:14},void 0),children:[{index:!0,element:b.jsxDEV(Me,{children:b.jsxDEV(Mj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:220,columnNumber:37},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:220,columnNumber:31},void 0)},{path:"processes/all",element:b.jsxDEV(Me,{children:b.jsxDEV(nj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:223,columnNumber:47},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:223,columnNumber:41},void 0)},{path:"processes/detail/:originId",element:b.jsxDEV(Me,{children:b.jsxDEV(sj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:224,columnNumber:60},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:224,columnNumber:54},void 0)},{path:"credentials",element:b.jsxDEV(Me,{children:b.jsxDEV(Oj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:227,columnNumber:45},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:227,columnNumber:39},void 0)},{path:"connections",element:b.jsxDEV(ei,{to:"/credentials",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:228,columnNumber:39},void 0)},{path:"escalations",element:b.jsxDEV(Me,{children:b.jsxDEV(cj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:231,columnNumber:45},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:231,columnNumber:39},void 0)},{path:"escalations/available",element:b.jsxDEV(Me,{children:b.jsxDEV(uj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:232,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:232,columnNumber:49},void 0)},{path:"escalations/queue",element:b.jsxDEV(Me,{children:b.jsxDEV(fj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:233,columnNumber:51},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:233,columnNumber:45},void 0)},{path:"escalations/detail/:id",element:b.jsxDEV(Me,{children:b.jsxDEV(dj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:234,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:234,columnNumber:50},void 0)},{path:"capabilities",element:b.jsxDEV(Me,{children:b.jsxDEV(Uj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:237,columnNumber:46},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:237,columnNumber:40},void 0)},{path:"agents",element:b.jsxDEV(Me,{children:b.jsxDEV(kj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:240,columnNumber:40},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:240,columnNumber:34},void 0)},{path:"agents/new",element:b.jsxDEV(Me,{children:b.jsxDEV(QS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:241,columnNumber:44},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:241,columnNumber:38},void 0)},{path:"agents/:id",element:b.jsxDEV(Me,{children:b.jsxDEV(Vj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:242,columnNumber:44},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:242,columnNumber:38},void 0)},{path:"agents/:id/edit",element:b.jsxDEV(Me,{children:b.jsxDEV(QS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:243,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:243,columnNumber:43},void 0)},{path:"topics",element:b.jsxDEV(Me,{children:b.jsxDEV(zj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:246,columnNumber:40},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:246,columnNumber:34},void 0)},{path:"topics/:topic",element:b.jsxDEV(Me,{children:b.jsxDEV(Bj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:247,columnNumber:47},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:247,columnNumber:41},void 0)},{element:b.jsxDEV(E0,{roleTypes:["admin","superadmin"],roleNames:["engineer"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:251,columnNumber:18},void 0),children:[{path:"workflows",element:b.jsxDEV(Me,{children:b.jsxDEV(hj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:253,columnNumber:47},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:253,columnNumber:41},void 0)},{path:"workflows/executions",element:b.jsxDEV(Me,{children:b.jsxDEV(yj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:254,columnNumber:58},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:254,columnNumber:52},void 0)},{path:"workflows/durable/executions",element:b.jsxDEV(Me,{children:b.jsxDEV(bj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:255,columnNumber:66},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:255,columnNumber:60},void 0)},{path:"workflows/durable/executions/:workflowId",element:b.jsxDEV(Me,{children:b.jsxDEV(GS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:256,columnNumber:78},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:256,columnNumber:72},void 0)},{path:"workflows/tasks",element:b.jsxDEV(Me,{children:b.jsxDEV(vj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:257,columnNumber:53},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:257,columnNumber:47},void 0)},{path:"workflows/tasks/detail/:id",element:b.jsxDEV(Me,{children:b.jsxDEV(xj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:258,columnNumber:64},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:258,columnNumber:58},void 0)},{path:"workflows/executions/:workflowId",element:b.jsxDEV(Me,{children:b.jsxDEV(GS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:259,columnNumber:70},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:259,columnNumber:64},void 0)},{path:"workflows/start",element:b.jsxDEV(Me,{children:b.jsxDEV(mj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:260,columnNumber:53},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:260,columnNumber:47},void 0)},{path:"workflows/durable/invoke",element:b.jsxDEV(Me,{children:b.jsxDEV(pj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:261,columnNumber:62},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:261,columnNumber:56},void 0)},{path:"workflows/cron",element:b.jsxDEV(ei,{to:"/workflows/start?mode=schedule",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:262,columnNumber:46},void 0)},{path:"workflows/workers",element:b.jsxDEV(Me,{children:b.jsxDEV(wj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:263,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:263,columnNumber:49},void 0)},{path:"workflows/registry",element:b.jsxDEV(Me,{children:b.jsxDEV(Sj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:264,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:264,columnNumber:50},void 0)},{path:"workflows/registry/new",element:b.jsxDEV(Me,{children:b.jsxDEV(JS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:265,columnNumber:60},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:265,columnNumber:54},void 0)},{path:"workflows/registry/:workflowType",element:b.jsxDEV(Me,{children:b.jsxDEV(JS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:266,columnNumber:70},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:266,columnNumber:64},void 0)}]},{element:b.jsxDEV(E0,{roleTypes:["admin","superadmin"],roleNames:["engineer"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:272,columnNumber:18},void 0),children:[{path:"mcp",element:b.jsxDEV(Me,{children:b.jsxDEV(aj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:274,columnNumber:41},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:274,columnNumber:35},void 0)},{path:"mcp/queries",element:b.jsxDEV(Me,{children:b.jsxDEV(oj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:275,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:275,columnNumber:43},void 0)},{path:"mcp/queries/:workflowId",element:b.jsxDEV(Me,{children:b.jsxDEV(lj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:276,columnNumber:61},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:276,columnNumber:55},void 0)},{path:"mcp/tools",element:b.jsxDEV(ei,{to:"/mcp/servers",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:277,columnNumber:41},void 0)},{path:"mcp/servers",element:b.jsxDEV(Me,{children:b.jsxDEV(Ej,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:278,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:278,columnNumber:43},void 0)},{path:"mcp/servers/new",element:b.jsxDEV(Me,{children:b.jsxDEV(XS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:279,columnNumber:53},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:279,columnNumber:47},void 0)},{path:"mcp/servers/:serverId",element:b.jsxDEV(Me,{children:b.jsxDEV(XS,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:280,columnNumber:59},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:280,columnNumber:53},void 0)},{path:"mcp/workflows",element:b.jsxDEV(Me,{children:b.jsxDEV(gj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:281,columnNumber:51},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:281,columnNumber:45},void 0)},{path:"mcp/executions",element:b.jsxDEV(Me,{children:b.jsxDEV(rj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:282,columnNumber:52},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:282,columnNumber:46},void 0)},{path:"mcp/executions/:jobId",element:b.jsxDEV(Me,{children:b.jsxDEV(ij,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:283,columnNumber:59},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:283,columnNumber:53},void 0)},{path:"files",element:b.jsxDEV(Me,{children:b.jsxDEV(Rj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:286,columnNumber:43},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:286,columnNumber:37},void 0)},{path:"knowledge",element:b.jsxDEV(Me,{children:b.jsxDEV(jj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:289,columnNumber:47},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:289,columnNumber:41},void 0)}]},{element:b.jsxDEV(E0,{roleTypes:["admin","superadmin"]},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:295,columnNumber:18},void 0),children:[{path:"admin",element:b.jsxDEV(Me,{children:b.jsxDEV(Nj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:297,columnNumber:43},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:297,columnNumber:37},void 0)},{path:"admin/users",element:b.jsxDEV(Me,{children:b.jsxDEV(_j,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:298,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:298,columnNumber:43},void 0)},{path:"admin/bots",element:b.jsxDEV(ei,{to:"/admin/users?tab=service-accounts",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:299,columnNumber:42},void 0)},{path:"admin/escalation-chains",element:b.jsxDEV(ei,{to:"/admin/roles",replace:!0},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:300,columnNumber:55},void 0)},{path:"admin/roles",element:b.jsxDEV(Me,{children:b.jsxDEV(Aj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:301,columnNumber:49},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:301,columnNumber:43},void 0)},{path:"admin/maintenance",element:b.jsxDEV(Me,{children:b.jsxDEV(Dj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:302,columnNumber:55},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:302,columnNumber:49},void 0)},{path:"admin/controlplane",element:b.jsxDEV(Me,{children:b.jsxDEV(Tj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:303,columnNumber:56},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:303,columnNumber:50},void 0)},{path:"admin/streams",element:b.jsxDEV(Me,{children:b.jsxDEV(Cj,{},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:304,columnNumber:51},void 0)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:304,columnNumber:45},void 0)}]}]}]);function Hj(){return b.jsxDEV(HT,{client:n_,children:b.jsxDEV(DC,{children:b.jsxDEV(V5,{children:b.jsxDEV(IT,{router:Lj},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:316,columnNumber:11},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:315,columnNumber:9},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:314,columnNumber:7},this)},void 0,!1,{fileName:"/app/dashboard/src/App.tsx",lineNumber:313,columnNumber:5},this)}SC.createRoot(document.getElementById("root")).render(b.jsxDEV(z.StrictMode,{children:b.jsxDEV(Hj,{},void 0,!1,{fileName:"/app/dashboard/src/main.tsx",lineNumber:8,columnNumber:5},void 0)},void 0,!1,{fileName:"/app/dashboard/src/main.tsx",lineNumber:7,columnNumber:3},void 0));export{py as A,l6 as B,hy as C,FR as D,c6 as E,$E as F,oE as G,d4 as J,OO as N,t_ as O,e4 as S,o6 as a,pt as b,DE as c,IR as d,Xj as e,HR as f,Zj as g,Wj as h,Gj as i,b as j,Ki as k,t6 as l,n6 as m,s6 as n,a6 as o,r6 as p,Jj as q,H5 as r,L5 as s,Kj as t,z5 as u,Qj as v,e6 as w,WE as x,e_ as y,i6 as z};
|
|
281
|
+
//# sourceMappingURL=index-4T7Z_gQ4.js.map
|