@tickernelz/wardmote-ui 2026.1117.1 → 2026.1117.2
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/dist/assets/AccessSelectIdentity-DT_buzXu.js +1 -0
- package/dist/assets/AdapterManager-D60L5cdo.js +1 -0
- package/dist/assets/AdvancedToolsRoute-CTTIaGDV.js +39 -0
- package/dist/assets/AgentActionButtons-CSDLZSMZ.js +1 -0
- package/dist/assets/AgentAvatar-Dui4nRtK.js +1 -0
- package/dist/assets/AgentBubbleActionRow-DSmdb3Li.js +1 -0
- package/dist/assets/AgentCharacter-D8CErloh.js +2 -0
- package/dist/assets/AgentChat-D3dO5D25.js +1 -0
- package/dist/assets/AgentChats-BlMX0riv.js +1 -0
- package/dist/assets/AgentDefaults-BRMPOQ-f.js +1 -0
- package/dist/assets/AgentDetail-CWdw5kRB.js +38 -0
- package/dist/assets/AgentIconPicker-Dub7R1_d.js +1 -0
- package/dist/assets/AgentIdentity-DoJBo59l.js +1 -0
- package/dist/assets/AgentMailCredentialField-qDnOhzgT.js +1 -0
- package/dist/assets/AgentMultiSelect-CEZ1NuIU.js +1 -0
- package/dist/assets/AgentRoleEditor-yyBT_XYK.js +1 -0
- package/dist/assets/AgentSetupPrompt-B44EEYgo.js +30 -0
- package/dist/assets/AgentTodoCard-BHWOqSEn.js +1 -0
- package/dist/assets/Agents-0yi6xFaj.js +3 -0
- package/dist/assets/AppDetail-CqWalFA3.js +8 -0
- package/dist/assets/AppLogo-C6tetlB_.js +1 -0
- package/dist/assets/AppNotConnected-CzQcETOO.js +1 -0
- package/dist/assets/ApprovalCard-BIquGj06.js +1 -0
- package/dist/assets/ApprovalDetail-hUlU9KPS.js +1 -0
- package/dist/assets/ApprovalPayload-CZTySb8R.js +1 -0
- package/dist/assets/Approvals-DSt7iLh6.js +1 -0
- package/dist/assets/AppsConnect-C1ilHYgy.js +1 -0
- package/dist/assets/AppsReview-CdjVNMBY.js +1 -0
- package/dist/assets/ArtifactCard-CheT3r1Y.js +1 -0
- package/dist/assets/Artifacts-Cp_CLB8P.js +1 -0
- package/dist/assets/AssistantConnection-D7MGE_yN.js +1 -0
- package/dist/assets/AttentionInteractionResolver-BUB3AfZH.js +1 -0
- package/dist/assets/AuditHub-DiWa6PDF.js +1 -0
- package/dist/assets/Auth-7ZwKR47T.js +3 -0
- package/dist/assets/BoardChat-BtB-0sW_.js +18 -0
- package/dist/assets/BoardClaim-Dj03nG8V.js +1 -0
- package/dist/assets/BootstrapSetupUxLab-ARs-PdM-.js +1 -0
- package/dist/assets/BreadcrumbContext-B9JUzLr5.js +1 -0
- package/dist/assets/Browse-B5mbrNri.js +1 -0
- package/dist/assets/BudgetPolicyCard-D31Qlv4T.js +1 -0
- package/dist/assets/CaseDetail-kLu_fI6z.js +2 -0
- package/dist/assets/CaseIdentifierKey-BFHk8T39.js +1 -0
- package/dist/assets/Cases-B-LfED0v.js +2 -0
- package/dist/assets/ChatEndpointDetail-DMGq_bkC.js +5 -0
- package/dist/assets/ChatEndpointSetup-BIxcZyIt.js +1 -0
- package/dist/assets/ChatIdentityConfirm-vsNMn_wj.js +1 -0
- package/dist/assets/ChoiceControls-CLtKmk2I.js +1 -0
- package/dist/assets/CliAuth-BrGRdrjs.js +1 -0
- package/dist/assets/CommentAttributionChip-CnhotPjn.js +1 -0
- package/dist/assets/Companies-BMVhOFzV.js +1 -0
- package/dist/assets/CompanyAccess-BlUM6hbW.js +1 -0
- package/dist/assets/CompanyActivity-5OGh6LZ6.js +1 -0
- package/dist/assets/CompanyConnections-Q1zAAePy.js +1 -0
- package/dist/assets/CompanyContext-Cx4B566r.js +1 -0
- package/dist/assets/CompanyEnvironments-BW9JgMNj.js +3 -0
- package/dist/assets/CompanyExport-CDSYD5mi.js +4 -0
- package/dist/assets/CompanyImport-B7Y99lni.js +1 -0
- package/dist/assets/CompanySettings-EcYnaTrR.js +1 -0
- package/dist/assets/CompanySettingsPluginPage-D3Vts52M.js +1 -0
- package/dist/assets/CompanySkills-CJp4nZix.js +10 -0
- package/dist/assets/ComposerAddMenu-lqbjcizN.js +3 -0
- package/dist/assets/ConfigureBuiltInAgentModal-C5RpKaFX.js +1 -0
- package/dist/assets/ConnectionSetupFlow-BFexB8UB.js +40 -0
- package/dist/assets/CopyText-Z_7ZP24v.js +1 -0
- package/dist/assets/CopyableGatewayUrl-BAIPUo7r.js +1 -0
- package/dist/assets/CrossIssueCollaborationUxLab-BbToOV2g.js +1 -0
- package/dist/assets/Dashboard-B_807CNK.js +2 -0
- package/dist/assets/DecisionDateChips-CM9496e0.js +1 -0
- package/dist/assets/DecisionModelSettings-DyZC9rU1.js +1 -0
- package/dist/assets/DecisionQueuePage-BRbIttBU.js +1 -0
- package/dist/assets/DesignGuide-bh4XX4nv.js +23 -0
- package/dist/assets/DocumentFrameHeader-lPIe9r6i.js +1 -0
- package/dist/assets/EmailConnectionAccess-BfEW3sUV.js +1 -0
- package/dist/assets/EmailEndpointSetup-BOhC9uiR.js +1 -0
- package/dist/assets/EnforcementBanner-CvthijpR.js +1 -0
- package/dist/assets/EntityRow-DbXjGhVW.js +1 -0
- package/dist/assets/ExecutionWorkspaceDetail-D4v1WZZf.js +19 -0
- package/dist/assets/FilterBar-CDIOkdDy.js +1 -0
- package/dist/assets/FoldCurtain-SSKlbSjO.js +1 -0
- package/dist/assets/FolderControls-Bhry3Vd2.js +1 -0
- package/dist/assets/GatewayDetail-BzSIBC84.js +2 -0
- package/dist/assets/GatewaysList-CZP6UIqo.js +1 -0
- package/dist/assets/GoalDetail-Ct08uwQw.js +1 -0
- package/dist/assets/GoalTree-DxU1Hv7E.js +1 -0
- package/dist/assets/Goals-BT9hCHnP.js +1 -0
- package/dist/assets/Identity-Jt9hiBbb.js +1 -0
- package/dist/assets/ImageGalleryModal-tTRmXGM4.js +1 -0
- package/dist/assets/Inbox-6vKVEJVu.js +2 -0
- package/dist/assets/InlineBanner-BWitMSzj.js +1 -0
- package/dist/assets/InlineEditor-DJB_QvGc.js +1 -0
- package/dist/assets/InlineEntitySelector-h-mVM8ny.js +1 -0
- package/dist/assets/InstanceAccess-CWtKVMDd.js +1 -0
- package/dist/assets/InstanceAdvanced-Bb4mtcMA.js +1 -0
- package/dist/assets/InstanceFeatures-CkqItnLP.js +1 -0
- package/dist/assets/InviteLanding-BnL6CX0t.js +1 -0
- package/dist/assets/IssueChatLongThreadPerf-VX9bG-bM.js +2 -0
- package/dist/assets/IssueChatThread-RwT_ZjCz.js +40 -0
- package/dist/assets/IssueDetail-DuaqjKFa.js +9 -0
- package/dist/assets/IssueDocumentAnnotations-CwAOcRXe.js +2 -0
- package/dist/assets/IssueOutputSection-CWIabX5_.js +1 -0
- package/dist/assets/IssueRecoveryActionCard-BH_n5kJ0.js +1 -0
- package/dist/assets/IssueReferencePill-Bx19xBTT.js +1 -0
- package/dist/assets/IssueThreadInteractionCard-CwQx5QmL.js +9 -0
- package/dist/assets/IssueWriteDenialNotice-DntH-qXu.js +1 -0
- package/dist/assets/Issues-Cn7D_2T3.js +5 -0
- package/dist/assets/JoinRequestQueue-DDbAcL7h.js +1 -0
- package/dist/assets/JsonSchemaForm-CukFZxO5.js +1 -0
- package/dist/assets/LiveNowTodoLine-CeGqy3iK.js +1 -0
- package/dist/assets/ManagedAiConnectionDetails-GCRA__HT.js +1 -0
- package/dist/assets/MarkdownBody-Dtjq3Ln7.js +16 -0
- package/dist/assets/MarkdownEditor-GCKumUHH.js +85 -0
- package/dist/assets/McpConnect-Cv3wvage.js +1 -0
- package/dist/assets/MembershipAction-B1Rkn6Ya.js +1 -0
- package/dist/assets/MetricCard-CWsDw6PQ.js +1 -0
- package/dist/assets/MissingPluginTabPlaceholder-BBTNbYkG.js +1 -0
- package/dist/assets/ModelsAndProviders-DhjeUdj-.js +1 -0
- package/dist/assets/MootMark-Djv4Cqoj.js +1 -0
- package/dist/assets/NewAgent-BTrIjdLI.js +1 -0
- package/dist/assets/OmpAllSettings-D7HFc1wr.js +1 -0
- package/dist/assets/OpenwaGatewayManager-CZ-1AWGM.js +2 -0
- package/dist/assets/PathInstructionsModal-Ch_Y_h-W.js +1 -0
- package/dist/assets/PipelineSettings-CEOXJLey.js +2 -0
- package/dist/assets/Pipelines-Dqr4RIMe.js +1 -0
- package/dist/assets/PixelsOffice-Dc-hTwL6.js +2 -0
- package/dist/assets/PluginManager-BHDvd2Kk.js +1 -0
- package/dist/assets/PluginPage-DGJsTGb4.js +1 -0
- package/dist/assets/PluginSettings-DSb7ReBz.js +1 -0
- package/dist/assets/ProfileDetailRoute-DWOiwLnB.js +1 -0
- package/dist/assets/ProfileSettings-BDPwbFPA.js +1 -0
- package/dist/assets/ProfileWizardRoute-CyY9cBXn.js +1 -0
- package/dist/assets/ProjectDetail-tbNc2eqO.js +1 -0
- package/dist/assets/ProjectWorkspaceDetail-CE3uadEz.js +29 -0
- package/dist/assets/ProjectWorkspacesContent-C-UY0h-1.js +1 -0
- package/dist/assets/Projects-IJU6fKzh.js +1 -0
- package/dist/assets/PublicIssueSharePage-D2-mjx5c.js +1 -0
- package/dist/assets/QuestionForm-CNI1aaPv.js +7 -0
- package/dist/assets/QuotaBar-BHpsGZ_M.js +1 -0
- package/dist/assets/RepositoryEditor-sn0h55E-.js +1 -0
- package/dist/assets/ResponsibleUserDenialNotice-O-ehIhIk.js +1 -0
- package/dist/assets/ResponsibleUserDenialUxLab-CwOtm-H_.js +1 -0
- package/dist/assets/ReviewQueueCard-DK0sDiGs.js +1 -0
- package/dist/assets/RichWorkProductCard-ButSFwSp.js +1 -0
- package/dist/assets/RoutineActivityRow-C0vIpaP_.js +1 -0
- package/dist/assets/RoutineDetail-CWWdWsrO.js +2 -0
- package/dist/assets/RoutineRunVariablesDialog-CRGon2Hg.js +1 -0
- package/dist/assets/RoutineVariablesEditor-C_rNpv3C.js +1 -0
- package/dist/assets/Routines-GiNr76nw.js +1 -0
- package/dist/assets/ScrollToBottom-BYgXnYon.js +1 -0
- package/dist/assets/Search-SUbPfqq4.js +1 -0
- package/dist/assets/SearchableSelect-Dl3Lshyy.js +1 -0
- package/dist/assets/Secrets--ch95iPv.js +4 -0
- package/dist/assets/SetupWizard-BhEuzmUv.js +1 -0
- package/dist/assets/SidebarContext-BHJMHrvt.js +1 -0
- package/dist/assets/SidebarNavItem-Dr2h0yiK.js +1 -0
- package/dist/assets/SkillBinaryFile-Datjq2Oi.js +1 -0
- package/dist/assets/SkillCardIcon-C430BaPr.js +2 -0
- package/dist/assets/SkillSourceTree-CR0E52D2.js +2 -0
- package/dist/assets/SkillSources-DeBOYCiw.js +2 -0
- package/dist/assets/SkillStudio-C3XaNFS3.js +9 -0
- package/dist/assets/SourceTrustBadge-D9HGGRtv.js +1 -0
- package/dist/assets/StatusCards-D2X-8hFz.js +1 -0
- package/dist/assets/StatusIcon-Byea8cPq.js +1 -0
- package/dist/assets/SummarySlotCard-CxnwG1r2.js +1 -0
- package/dist/assets/TaskChatComposerTakeoverContext-DCrczoPx.js +1 -0
- package/dist/assets/TaskChatLab-BvlnYRNe.js +11 -0
- package/dist/assets/TaskChatMarker-2V0Oo3xV.js +2 -0
- package/dist/assets/TaskChatProtocolCard-CgwNmmaw.js +1 -0
- package/dist/assets/TaskChatThreadView-BSU2dzE7.js +4 -0
- package/dist/assets/TaskTreeControls-DaAFj1E9.js +3 -0
- package/dist/assets/Terminal-Byg7O1p2.js +1 -0
- package/dist/assets/TerminalView-CsrRCoNX.js +58 -0
- package/dist/assets/ThemeContext-Bj-WoVL8.js +1 -0
- package/dist/assets/ThemeToggle-_Eipcr9P.js +1 -0
- package/dist/assets/ToastContext-BCfjPRi1.js +1 -0
- package/dist/assets/ToolsAdminGate-B6k3SrGU.js +1 -0
- package/dist/assets/TrustPresetSection-DSCmQxlJ.js +1 -0
- package/dist/assets/UserProfile-BYBUYHyM.js +1 -0
- package/dist/assets/WebhookUrlWarning-DeNhQ5SI.js +1 -0
- package/dist/assets/WhatNeedsMe-I9wfO12c.js +1 -0
- package/dist/assets/WorkspaceRuntimeControls-ByOvZ2To.js +1 -0
- package/dist/assets/Workspaces-Db99D3YB.js +1 -0
- package/dist/assets/access-BqSI2EWX.js +1 -0
- package/dist/assets/activity-CV1ib_N4.js +1 -0
- package/dist/assets/activity-DjXPM70-.js +1 -0
- package/dist/assets/activity-format-z4x2U1UL.js +1 -0
- package/dist/assets/adapter-display-registry-BwL8TUEJ.js +1 -0
- package/dist/assets/adapters-BDzUkPiY.js +1 -0
- package/dist/assets/agent-avatar-url-D6FtNk3V.js +1 -0
- package/dist/assets/agent-config-primitives-BpUNyayv.js +1 -0
- package/dist/assets/agentChats-B3DxYJ0s.js +1 -0
- package/dist/assets/agents-PFXnjEjH.js +1 -0
- package/dist/assets/alert-dialog-Bu032Tf4.js +1 -0
- package/dist/assets/app-connect-policy-C0ySFS-g.js +1 -0
- package/dist/assets/archive-BHg7Yq0H.js +1 -0
- package/dist/assets/archive-restore-BtX-2MA_.js +1 -0
- package/dist/assets/arrow-down-CDBD_UhE.js +1 -0
- package/dist/assets/arrow-down-left-tUS9EGQ5.js +1 -0
- package/dist/assets/arrow-left-CRfeAefI.js +1 -0
- package/dist/assets/arrow-right-898_TY3T.js +1 -0
- package/dist/assets/arrow-up-down-CIDQ-7ap.js +1 -0
- package/dist/assets/arrow-up-lSEksryM.js +1 -0
- package/dist/assets/arrow-up-right-CiL52_C-.js +1 -0
- package/dist/assets/artifacts-BmsoVCdJ.js +1 -0
- package/dist/assets/assets-lhKNSpON.js +1 -0
- package/dist/assets/attachment-icon-g4YAkuZ8.js +1 -0
- package/dist/assets/avatar-C4Ssxg9Y.js +1 -0
- package/dist/assets/badge-Dvh7HNMN.js +1 -0
- package/dist/assets/badge-check-B-GkuMC-.js +1 -0
- package/dist/assets/book-open-Ccq-Ea-W.js +1 -0
- package/dist/assets/bot-CPZa9Nhm.js +1 -0
- package/dist/assets/boxes-PkWx_5hs.js +1 -0
- package/dist/assets/braces-DovVxLjW.js +1 -0
- package/dist/assets/browser-use-DzHGNDA8.js +1 -0
- package/dist/assets/budgets-BieJJ3WD.js +1 -0
- package/dist/assets/button-CB8r2Tmh.js +1 -0
- package/dist/assets/calendar-clock-CeIy5aD9.js +1 -0
- package/dist/assets/card-DANCDyBy.js +1 -0
- package/dist/assets/cases-DiL3ys5G.js +1 -0
- package/dist/assets/chatEndpoints-BR_dsxeU.js +1 -0
- package/dist/assets/check-ByoSzjU8.js +1 -0
- package/dist/assets/checkbox-D9x1Kpmi.js +1 -0
- package/dist/assets/chevron-down-BY8r8lEv.js +1 -0
- package/dist/assets/chevron-left-Bh6cfiU3.js +1 -0
- package/dist/assets/chevron-right-B9tyGqmZ.js +1 -0
- package/dist/assets/chevron-up-Y_THiwqt.js +1 -0
- package/dist/assets/chip-CPztosQ8.js +1 -0
- package/dist/assets/circle-Dov4MVoe.js +1 -0
- package/dist/assets/circle-alert-Dw0yL22E.js +1 -0
- package/dist/assets/circle-dot-W_Fv5sI-.js +1 -0
- package/dist/assets/circle-question-mark-Bs7m2809.js +1 -0
- package/dist/assets/circle-slash-BrrkGL_C.js +1 -0
- package/dist/assets/circle-x-haVgjs_m.js +1 -0
- package/dist/assets/clipboard-paste-CbrlOJuv.js +1 -0
- package/dist/assets/clock-DynbfDi4.js +1 -0
- package/dist/assets/cloud-BL3mJ3Zk.js +1 -0
- package/dist/assets/code-xml-DnMtzyzg.js +1 -0
- package/dist/assets/coins-op-yocyK.js +1 -0
- package/dist/assets/collapsible-CK4bkaKD.js +1 -0
- package/dist/assets/columns-3-h7a-cGgB.js +1 -0
- package/dist/assets/command-DnT_Dqx6.js +5 -0
- package/dist/assets/companies-query-CEvXdXle.js +1 -0
- package/dist/assets/connection-identity-BFnwnJ1m.js +1 -0
- package/dist/assets/connection-owner-a9FWzn0p.js +1 -0
- package/dist/assets/copy-BzAUsLd3.js +1 -0
- package/dist/assets/createLucideIcon-DpXjCQRS.js +94 -0
- package/dist/assets/decision-models-BJo87qdY.js +1 -0
- package/dist/assets/dialog-Bj8Y6BBR.js +1 -0
- package/dist/assets/dist-3Dez14jq.js +1 -0
- package/dist/assets/dist-B0zvydXD.js +1 -0
- package/dist/assets/dist-BHjJYMl9.js +1 -0
- package/dist/assets/dist-BdR2FnFe.js +1 -0
- package/dist/assets/dist-BmMF5JdA.js +1 -0
- package/dist/assets/dist-BvZdGtYE.js +1 -0
- package/dist/assets/dist-CL5YXBl1.js +1 -0
- package/dist/assets/dist-C_1hhiPG.js +1 -0
- package/dist/assets/dist-CvnnLM1v.js +1 -0
- package/dist/assets/dist-DGPm9z2w.js +1 -0
- package/dist/assets/dist-DIKPg1Zq.js +1 -0
- package/dist/assets/dist-hTXDV8BS.js +1 -0
- package/dist/assets/dist-qP8xhvXd.js +1 -0
- package/dist/assets/dropdown-menu-COuwCVD4.js +1 -0
- package/dist/assets/ellipsis-ClhaIBYZ.js +1 -0
- package/dist/assets/ellipsis-vertical-BLqWWVnI.js +1 -0
- package/dist/assets/email-X-ZvOMfe.js +1 -0
- package/dist/assets/environment-variables-editor-DuAdYQbc.js +1 -0
- package/dist/assets/environments-C7Tx6OHp.js +1 -0
- package/dist/assets/es2015-D1VPo3R2.js +41 -0
- package/dist/assets/external-link--KkXYRPz.js +1 -0
- package/dist/assets/eye-kZn_xPie.js +1 -0
- package/dist/assets/eye-off-CIggBtC5.js +1 -0
- package/dist/assets/fast-responses-BxWwvpML.js +1 -0
- package/dist/assets/file-DpimbHnE.js +1 -0
- package/dist/assets/file-code-corner-CTt6xXKc.js +1 -0
- package/dist/assets/file-question-mark-BdUx7roP.js +1 -0
- package/dist/assets/file-search-DKDwHcZ2.js +1 -0
- package/dist/assets/file-text-Dpnp6o-I.js +1 -0
- package/dist/assets/flag-DL-0fBPJ.js +1 -0
- package/dist/assets/flask-conical-qqfS8te7.js +1 -0
- package/dist/assets/folder-git-2-D8yyJVTc.js +1 -0
- package/dist/assets/folder-open-fbJID1cC.js +1 -0
- package/dist/assets/folder-search-D89U3Z-T.js +1 -0
- package/dist/assets/funnel-B2ism2sD.js +1 -0
- package/dist/assets/git-pull-request-DQkSlyfL.js +1 -0
- package/dist/assets/github-icon-CbU9rpKT.js +1 -0
- package/dist/assets/health-CHjyy9Zt.js +1 -0
- package/dist/assets/heartbeats-Cy4hqsrt.js +1 -0
- package/dist/assets/inbox-WZDW93BL.js +1 -0
- package/dist/assets/inboxArchiveCache-CoY_V35O.js +1 -0
- package/dist/assets/index-B6ALXjXD.js +67 -0
- package/dist/assets/index-gXKvahZk.css +2 -0
- package/dist/assets/info-BqXpbzV2.js +1 -0
- package/dist/assets/input-tD3qR9Gq.js +1 -0
- package/dist/assets/instanceSettings-DIXpSGRh.js +1 -0
- package/dist/assets/interaction-audience-CXUDNI1a.js +1 -0
- package/dist/assets/interaction-card-visibility-DTtQkm6u.js +1 -0
- package/dist/assets/issue-blockers-KTmO2cng.js +1 -0
- package/dist/assets/issue-output-BzlPk1Fq.js +1 -0
- package/dist/assets/issue-properties-CmEBhjZa.js +4 -0
- package/dist/assets/issue-share-0nHxp5nx.js +1 -0
- package/dist/assets/issue-workspace-selection-DxIMVIPY.js +1 -0
- package/dist/assets/key-round-Bzc86YKh.js +1 -0
- package/dist/assets/label-CUFCL9Te.js +1 -0
- package/dist/assets/layout-dashboard-CQUo0zqq.js +1 -0
- package/dist/assets/link-2-DdeL2ffb.js +1 -0
- package/dist/assets/link-BTk9LQnG.js +1 -0
- package/dist/assets/list-filter-BIvVZUS2.js +1 -0
- package/dist/assets/list-todo-ByybdFTG.js +1 -0
- package/dist/assets/log-in-C5qjuUlB.js +1 -0
- package/dist/assets/maximize-2-pkU0hBkw.js +1 -0
- package/dist/assets/mention-chips-D3m3O_ko.js +17 -0
- package/dist/assets/message-square-plus-DaOHWEpG.js +1 -0
- package/dist/assets/minus-ymsuVafu.js +1 -0
- package/dist/assets/model-fallback-5DsUzAM5.js +1 -0
- package/dist/assets/model-picker-fields-jLfT-wsr.js +1 -0
- package/dist/assets/network-DtO4s1Xo.js +1 -0
- package/dist/assets/octagon-alert-Do2mnwTI.js +1 -0
- package/dist/assets/octagon-x-7Om5soqi.js +1 -0
- package/dist/assets/omp-settings-model-BVsTwU6j.js +1 -0
- package/dist/assets/package-Cvq1waTm.js +1 -0
- package/dist/assets/pause-BNtKkOA6.js +1 -0
- package/dist/assets/pen-line-DJnffu7P.js +1 -0
- package/dist/assets/pipeline-stage-presentation-DvjVVsAD.js +2 -0
- package/dist/assets/pipelines-B_5RdgB1.js +1 -0
- package/dist/assets/play-BEkcNe5A.js +1 -0
- package/dist/assets/plug-vBXQGAOC.js +1 -0
- package/dist/assets/plugins-CaoL00gm.js +1 -0
- package/dist/assets/plus-Ci4fWNMH.js +1 -0
- package/dist/assets/popover-C9GvGhqf.js +1 -0
- package/dist/assets/power-czY3YlJl.js +1 -0
- package/dist/assets/presentation-mode-3-5_ozCU.js +1 -0
- package/dist/assets/profile-summary-Bhu05QwC.js +1 -0
- package/dist/assets/projects-C-sNYR8y.js +1 -0
- package/dist/assets/proposal-review-Cww0NzU2.js +1 -0
- package/dist/assets/queryClient-CLuei5YE.js +1 -0
- package/dist/assets/queryKeys-Bwpi9du8.js +1 -0
- package/dist/assets/radio-Bbj2qILX.js +1 -0
- package/dist/assets/radio-card-CEpISzBw.js +1 -0
- package/dist/assets/recent-agent-chats-xm5DHAP2.js +1 -0
- package/dist/assets/refresh-cw-BoKHCT9Q.js +1 -0
- package/dist/assets/repeat-CxiYIeqH.js +1 -0
- package/dist/assets/resizable-panels-CAJWzqPj.js +1 -0
- package/dist/assets/review-policy-BroUuOnH.js +1 -0
- package/dist/assets/rotate-ccw-DP1fSRXE.js +1 -0
- package/dist/assets/rotate-cw-BIJjXmtM.js +1 -0
- package/dist/assets/router-DvYg2TPj.js +1 -0
- package/dist/assets/routines-DRJ8glz2.js +1 -0
- package/dist/assets/runRetryState-BQtnYsCT.js +1 -0
- package/dist/assets/save-TS82wH4U.js +1 -0
- package/dist/assets/schema-config-fields-CKfJ_1Bc.js +1 -0
- package/dist/assets/scroll-area-CSkajMX4.js +1 -0
- package/dist/assets/scroll-text-BtyjTPat.js +1 -0
- package/dist/assets/search-C7RvqPDh.js +1 -0
- package/dist/assets/secrets-Bow-lhgm.js +1 -0
- package/dist/assets/segmented-B9WQFRdU.js +1 -0
- package/dist/assets/select-BILzRqwR.js +1 -0
- package/dist/assets/send-Cq6oLC65.js +1 -0
- package/dist/assets/separator-Cc_zxQfG.js +1 -0
- package/dist/assets/server-D14pf6xr.js +1 -0
- package/dist/assets/server-cog-Dd0WwTxo.js +1 -0
- package/dist/assets/settings-_MxMwkB3.js +1 -0
- package/dist/assets/shared-C9rdRvrI.js +1 -0
- package/dist/assets/sheet-CXi-joPR.js +1 -0
- package/dist/assets/shield-B35HbBPD.js +1 -0
- package/dist/assets/shield-alert-DoI68Irt.js +1 -0
- package/dist/assets/shield-check-BkZhOxSV.js +1 -0
- package/dist/assets/shield-question-mark-DJ1-iT-R.js +1 -0
- package/dist/assets/shield-x-IA54_BG9.js +1 -0
- package/dist/assets/sidebarPreferences-RlJwFW7E.js +1 -0
- package/dist/assets/skeleton-D5GfoYPy.js +1 -0
- package/dist/assets/slots-B-bF0j6o.js +49 -0
- package/dist/assets/smoke-lab-matrix-ChxKoFnA.js +1 -0
- package/dist/assets/square-BSbamBKn.js +1 -0
- package/dist/assets/star-vweB_JDI.js +15 -0
- package/dist/assets/sun-t5pkwxql.js +1 -0
- package/dist/assets/system-notice-comment-BzIsx8nv.js +1 -0
- package/dist/assets/tabs-BruQLBag.js +1 -0
- package/dist/assets/task-chat-attachments-COZdrQRo.js +10 -0
- package/dist/assets/terminal-BSPCPTKd.js +1 -0
- package/dist/assets/textarea-BQh3frGz.js +1 -0
- package/dist/assets/thumbs-down-Db03Y3rC.js +1 -0
- package/dist/assets/thumbs-up-hfQ2kjmZ.js +1 -0
- package/dist/assets/toggle-switch-CCZLW1ZV.js +1 -0
- package/dist/assets/tools-VxBq3Bni.js +1 -0
- package/dist/assets/tooltip-DhA8eGCr.js +1 -0
- package/dist/assets/transcript-adapter-CEuUrDAp.js +5 -0
- package/dist/assets/trash-Blp_H70m.js +1 -0
- package/dist/assets/triangle-alert-BbGTCcEH.js +1 -0
- package/dist/assets/upload-D1pDAAji.js +1 -0
- package/dist/assets/use-adapter-capabilities-DVcxB6B0.js +1 -0
- package/dist/assets/use-copy-action-DOl9yp4g.js +1 -0
- package/dist/assets/useAgentChatEnabled-BIG72pQN.js +1 -0
- package/dist/assets/useAutosaveIndicator-Bb6JV7mP.js +1 -0
- package/dist/assets/useHiddenSettings-C5OX_C_M.js +1 -0
- package/dist/assets/useInfiniteQuery-aicMPSfT.js +1 -0
- package/dist/assets/useInstanceFeatureSettings-1CM1woTZ.js +1 -0
- package/dist/assets/useManagedSandboxOnly-DENpzhcY.js +1 -0
- package/dist/assets/useMobileEntityPickerViewportStyle-l3SLJAQb.js +1 -0
- package/dist/assets/usePrefersReducedMotion-z1zTAoVk.js +1 -0
- package/dist/assets/useProfilesData-D_CamlCc.js +1 -0
- package/dist/assets/useQueries-DVLf9RKa.js +1 -0
- package/dist/assets/useSecondTick-CQantaP_.js +1 -0
- package/dist/assets/useSharedPolling-CfP23_kt.js +1 -0
- package/dist/assets/useSummaryDraftStream-Cce3cGNj.js +3 -0
- package/dist/assets/user-RgiS0rQH.js +1 -0
- package/dist/assets/user-check-NQX3Jxil.js +1 -0
- package/dist/assets/user-minus-DFmQKqPK.js +1 -0
- package/dist/assets/user-round-cSiRkcc8.js +1 -0
- package/dist/assets/user-x-BydVKgYM.js +1 -0
- package/dist/assets/users-CjaVMVjO.js +1 -0
- package/dist/assets/wand-sparkles-wj238ghx.js +1 -0
- package/dist/assets/webhook-CrpXuiI8.js +1 -0
- package/dist/assets/x-B9UP51U4.js +1 -0
- package/dist/index.html +193 -193
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/AccessSelectIdentity-pA4Cj_ja.js +0 -1
- package/dist/assets/AdapterManager-DkqfJlC5.js +0 -1
- package/dist/assets/AdvancedToolsRoute-Ba3xqFI-.js +0 -39
- package/dist/assets/AgentActionButtons-CmCCw0Mq.js +0 -1
- package/dist/assets/AgentAvatar-DwU8u7xH.js +0 -1
- package/dist/assets/AgentBubbleActionRow-8eELLon7.js +0 -1
- package/dist/assets/AgentCharacter-B--KNiJp.js +0 -2
- package/dist/assets/AgentChat-CmqbchyZ.js +0 -1
- package/dist/assets/AgentChats-CSpIuM6v.js +0 -1
- package/dist/assets/AgentDefaults-DHISJ-GY.js +0 -1
- package/dist/assets/AgentDetail-Cy-62Xlp.js +0 -38
- package/dist/assets/AgentIconPicker-DMqOA8IC.js +0 -1
- package/dist/assets/AgentIdentity-C2F47MQW.js +0 -1
- package/dist/assets/AgentMailCredentialField-CDBwHz4G.js +0 -1
- package/dist/assets/AgentMultiSelect-BF2IWDhG.js +0 -1
- package/dist/assets/AgentRoleEditor-S6O6nDlm.js +0 -1
- package/dist/assets/AgentSetupPrompt-D9iMvDq1.js +0 -30
- package/dist/assets/AgentTodoCard-I2w0WIbL.js +0 -1
- package/dist/assets/Agents-DCkPE9fL.js +0 -3
- package/dist/assets/AppDetail-DSgvY5Qu.js +0 -8
- package/dist/assets/AppLogo-CnF7keN4.js +0 -1
- package/dist/assets/AppNotConnected-BiYUil9g.js +0 -1
- package/dist/assets/ApprovalCard-6XXNxpob.js +0 -1
- package/dist/assets/ApprovalDetail-B_jaMVYb.js +0 -1
- package/dist/assets/ApprovalPayload-CMrxRPEq.js +0 -1
- package/dist/assets/Approvals-jNah0AuJ.js +0 -1
- package/dist/assets/AppsConnect-fRddG02Y.js +0 -1
- package/dist/assets/AppsReview-BoKT32k8.js +0 -1
- package/dist/assets/ArtifactCard-YDulr8bs.js +0 -1
- package/dist/assets/Artifacts-7-QzqSbC.js +0 -1
- package/dist/assets/AssistantConnection-DCF9jkLl.js +0 -1
- package/dist/assets/AttentionInteractionResolver-DkLf9zWw.js +0 -1
- package/dist/assets/AuditHub-BFRiTpzP.js +0 -1
- package/dist/assets/Auth-BxWmolmQ.js +0 -3
- package/dist/assets/BoardChat-DkfKXoOJ.js +0 -18
- package/dist/assets/BoardClaim-BrMqFdZ_.js +0 -1
- package/dist/assets/BootstrapSetupUxLab-BHy6zZOr.js +0 -1
- package/dist/assets/BreadcrumbContext-CAV0eH9y.js +0 -1
- package/dist/assets/Browse-DNkwlwu6.js +0 -1
- package/dist/assets/BudgetPolicyCard-BNbNgbXs.js +0 -1
- package/dist/assets/CaseDetail-B7ph-u94.js +0 -2
- package/dist/assets/CaseIdentifierKey-CKbRAHlm.js +0 -1
- package/dist/assets/Cases-DxWEylZV.js +0 -2
- package/dist/assets/ChatEndpointDetail-BxAZOH01.js +0 -5
- package/dist/assets/ChatEndpointSetup-BY9rnqEX.js +0 -1
- package/dist/assets/ChatIdentityConfirm-CduPKo3s.js +0 -1
- package/dist/assets/ChoiceControls-CeaKSkFc.js +0 -1
- package/dist/assets/CliAuth-DTG_LZuy.js +0 -1
- package/dist/assets/CommentAttributionChip-BkkqjN3i.js +0 -1
- package/dist/assets/Companies-Cdkn5WK5.js +0 -1
- package/dist/assets/CompanyAccess-CLmWMpQv.js +0 -1
- package/dist/assets/CompanyActivity-CcZ6TYEJ.js +0 -1
- package/dist/assets/CompanyConnections-GOjO3j0N.js +0 -1
- package/dist/assets/CompanyContext-Bzvl-Bww.js +0 -1
- package/dist/assets/CompanyEnvironments-Bd4PC85l.js +0 -3
- package/dist/assets/CompanyExport-CNbIYpKQ.js +0 -4
- package/dist/assets/CompanyImport-B8eCvqNU.js +0 -1
- package/dist/assets/CompanySettings-a4JHUiSg.js +0 -1
- package/dist/assets/CompanySettingsPluginPage-DDuBTJiY.js +0 -1
- package/dist/assets/CompanySkills-DkQDFBQ_.js +0 -10
- package/dist/assets/ComposerAddMenu-ChyYu08w.js +0 -3
- package/dist/assets/ConfigureBuiltInAgentModal-w5xq0MBv.js +0 -1
- package/dist/assets/ConnectionSetupFlow-B0G9Bjk4.js +0 -40
- package/dist/assets/CopyText-DpTRf2s3.js +0 -1
- package/dist/assets/CopyableGatewayUrl-CH-rAnB9.js +0 -1
- package/dist/assets/CrossIssueCollaborationUxLab-BYmk47Vp.js +0 -1
- package/dist/assets/Dashboard-Dp3RShsW.js +0 -2
- package/dist/assets/DecisionDateChips-BCLwofLY.js +0 -1
- package/dist/assets/DecisionModelSettings-xZSJzoae.js +0 -1
- package/dist/assets/DecisionQueuePage-xz3lj3E7.js +0 -1
- package/dist/assets/DesignGuide-C0Jtwew3.js +0 -23
- package/dist/assets/DocumentFrameHeader-DqxpcA-6.js +0 -1
- package/dist/assets/EmailConnectionAccess-BLgp5G92.js +0 -1
- package/dist/assets/EmailEndpointSetup-4JcR96XC.js +0 -1
- package/dist/assets/EnforcementBanner-BCWo3-qf.js +0 -1
- package/dist/assets/EntityRow-D1sxhd_Q.js +0 -1
- package/dist/assets/ExecutionWorkspaceDetail-Bwe40URu.js +0 -19
- package/dist/assets/FilterBar-CMnV4t4Y.js +0 -1
- package/dist/assets/FoldCurtain-CHBWpZMe.js +0 -1
- package/dist/assets/FolderControls-Bdo-vCa9.js +0 -1
- package/dist/assets/GatewayDetail-Bekz5IqM.js +0 -2
- package/dist/assets/GatewaysList-BcyyRpxv.js +0 -1
- package/dist/assets/GoalDetail-BOA4Qq2y.js +0 -1
- package/dist/assets/GoalTree--IY4dfrS.js +0 -1
- package/dist/assets/Goals-DrdjxgGL.js +0 -1
- package/dist/assets/Identity-BHZKD9ED.js +0 -1
- package/dist/assets/ImageGalleryModal-Dgzkg3Bk.js +0 -1
- package/dist/assets/Inbox-CG9LndMT.js +0 -2
- package/dist/assets/InlineBanner-C_e5d-MN.js +0 -1
- package/dist/assets/InlineEditor-B4g3m_1q.js +0 -1
- package/dist/assets/InlineEntitySelector-De2vDqGh.js +0 -1
- package/dist/assets/InstanceAccess-EWEAtSvu.js +0 -1
- package/dist/assets/InstanceAdvanced-M5_IfPyO.js +0 -1
- package/dist/assets/InstanceFeatures-Bn7VZ5O7.js +0 -1
- package/dist/assets/InviteLanding-xa9QYHew.js +0 -1
- package/dist/assets/IssueChatLongThreadPerf-KcuB3QaF.js +0 -2
- package/dist/assets/IssueChatThread-gdwgi1Ma.js +0 -40
- package/dist/assets/IssueDetail-7uhwA46C.js +0 -9
- package/dist/assets/IssueDocumentAnnotations-D_W7zVbG.js +0 -2
- package/dist/assets/IssueOutputSection-CPs3bxcB.js +0 -1
- package/dist/assets/IssueRecoveryActionCard-BGAPmu6q.js +0 -1
- package/dist/assets/IssueReferencePill-Ch-dEym4.js +0 -1
- package/dist/assets/IssueThreadInteractionCard-CcvxrYLu.js +0 -9
- package/dist/assets/IssueWriteDenialNotice-DaVif9jP.js +0 -1
- package/dist/assets/Issues-QTK6WGiY.js +0 -5
- package/dist/assets/JoinRequestQueue-C7dK1cd5.js +0 -1
- package/dist/assets/JsonSchemaForm-BGOry3gQ.js +0 -1
- package/dist/assets/LiveNowTodoLine-CxFFPwi4.js +0 -1
- package/dist/assets/ManagedAiConnectionDetails-DoLNb_yk.js +0 -1
- package/dist/assets/MarkdownBody-BpOOKcBP.js +0 -16
- package/dist/assets/MarkdownEditor-gGSA52dv.js +0 -85
- package/dist/assets/McpConnect-Cuu_iJQy.js +0 -1
- package/dist/assets/MembershipAction-sB-SytSd.js +0 -1
- package/dist/assets/MetricCard-DmsT4cl0.js +0 -1
- package/dist/assets/MissingPluginTabPlaceholder-CJu3U4Zc.js +0 -1
- package/dist/assets/ModelsAndProviders-WD2sSif0.js +0 -1
- package/dist/assets/MootMark-B42jVw8U.js +0 -1
- package/dist/assets/NewAgent-Bt4dXqDL.js +0 -1
- package/dist/assets/OmpAllSettings-BgXmR3SR.js +0 -1
- package/dist/assets/OpenwaGatewayManager-1ZgYSMbS.js +0 -2
- package/dist/assets/PathInstructionsModal-BekiaFOC.js +0 -1
- package/dist/assets/PipelineSettings-C8yK34ZZ.js +0 -2
- package/dist/assets/Pipelines-CHNtLB88.js +0 -1
- package/dist/assets/PixelsOffice-DRjfHx1K.js +0 -2
- package/dist/assets/PluginManager-DqsPhY2T.js +0 -1
- package/dist/assets/PluginPage-BBzdMzMy.js +0 -1
- package/dist/assets/PluginSettings-ByEbRC6u.js +0 -1
- package/dist/assets/ProfileDetailRoute-CIaa_tT4.js +0 -1
- package/dist/assets/ProfileSettings-DaZmup5B.js +0 -1
- package/dist/assets/ProfileWizardRoute-CSVIneVV.js +0 -1
- package/dist/assets/ProjectDetail-BDFBzclz.js +0 -1
- package/dist/assets/ProjectWorkspaceDetail-D2COxEYQ.js +0 -29
- package/dist/assets/ProjectWorkspacesContent-M-BvkQ1D.js +0 -1
- package/dist/assets/Projects-BYd0NYyf.js +0 -1
- package/dist/assets/PublicIssueSharePage-C1WbNR9P.js +0 -1
- package/dist/assets/QuestionForm-k_njsPKU.js +0 -7
- package/dist/assets/QuotaBar-Cm4ULdG0.js +0 -1
- package/dist/assets/RepositoryEditor-CmJRIqTA.js +0 -1
- package/dist/assets/ResponsibleUserDenialNotice-CBigpgoX.js +0 -1
- package/dist/assets/ResponsibleUserDenialUxLab-DgWjcaaH.js +0 -1
- package/dist/assets/ReviewQueueCard-DVwq754b.js +0 -1
- package/dist/assets/RichWorkProductCard-CU2m_vxQ.js +0 -1
- package/dist/assets/RoutineActivityRow-CRNalsmi.js +0 -1
- package/dist/assets/RoutineDetail-DTwekp7Q.js +0 -2
- package/dist/assets/RoutineRunVariablesDialog-CE5oQXyZ.js +0 -1
- package/dist/assets/RoutineVariablesEditor-B8CYFYII.js +0 -1
- package/dist/assets/Routines-CuYhyKjM.js +0 -1
- package/dist/assets/ScrollToBottom-COpNaCAT.js +0 -1
- package/dist/assets/Search-ONrYCKGW.js +0 -1
- package/dist/assets/SearchableSelect-C6k0j-dI.js +0 -1
- package/dist/assets/Secrets-B6L0lyU0.js +0 -4
- package/dist/assets/SetupWizard-O7AzJERA.js +0 -1
- package/dist/assets/SidebarContext-CeIDQycV.js +0 -1
- package/dist/assets/SidebarNavItem-DJj_lPx6.js +0 -1
- package/dist/assets/SkillBinaryFile-CMyzTVr7.js +0 -1
- package/dist/assets/SkillCardIcon-pCunxjE2.js +0 -2
- package/dist/assets/SkillSourceTree-C0rXp0Km.js +0 -2
- package/dist/assets/SkillSources-DHvL8wAs.js +0 -2
- package/dist/assets/SkillStudio-D63ComEH.js +0 -9
- package/dist/assets/SourceTrustBadge-5z3xNERm.js +0 -1
- package/dist/assets/StatusCards-BNgZPSyX.js +0 -1
- package/dist/assets/StatusIcon-BTWunlN0.js +0 -1
- package/dist/assets/SummarySlotCard-CtDFhztZ.js +0 -1
- package/dist/assets/TaskChatComposerTakeoverContext-C-0LmSJ9.js +0 -1
- package/dist/assets/TaskChatLab-8QN2H6gV.js +0 -11
- package/dist/assets/TaskChatMarker-DcLZ4yW4.js +0 -2
- package/dist/assets/TaskChatProtocolCard-BtjFaGJD.js +0 -1
- package/dist/assets/TaskChatThreadView-c_qufSvh.js +0 -4
- package/dist/assets/TaskTreeControls-Bvo3RJ_0.js +0 -3
- package/dist/assets/Terminal-Ni6i8S39.js +0 -1
- package/dist/assets/TerminalView-YHZzjmSP.js +0 -58
- package/dist/assets/ThemeContext-CNAAaURM.js +0 -1
- package/dist/assets/ThemeToggle-QrMex1ks.js +0 -1
- package/dist/assets/ToastContext-BN6Wz4tS.js +0 -1
- package/dist/assets/ToolsAdminGate-VZG0VNUn.js +0 -1
- package/dist/assets/TrustPresetSection-CuRXYFCz.js +0 -1
- package/dist/assets/UserProfile-CG3zlT9R.js +0 -1
- package/dist/assets/WebhookUrlWarning-Dfv1Hq0p.js +0 -1
- package/dist/assets/WhatNeedsMe-CU2HRzbo.js +0 -1
- package/dist/assets/WorkspaceRuntimeControls-DF8y2YPI.js +0 -1
- package/dist/assets/Workspaces-BVNxacVV.js +0 -1
- package/dist/assets/access-cDl_ff4N.js +0 -1
- package/dist/assets/activity-Bd1rZvUm.js +0 -1
- package/dist/assets/activity-Bk2VbGBf.js +0 -1
- package/dist/assets/activity-format-Csr5zhg5.js +0 -1
- package/dist/assets/adapter-display-registry-CtoFeqfe.js +0 -1
- package/dist/assets/adapters-DiCkJDfc.js +0 -1
- package/dist/assets/agent-avatar-url-zqpa9pVh.js +0 -1
- package/dist/assets/agent-config-primitives-D2d_0l6S.js +0 -1
- package/dist/assets/agentChats-ColA1b9F.js +0 -1
- package/dist/assets/agents-CYk2ac2z.js +0 -1
- package/dist/assets/alert-dialog-CFrPo0ev.js +0 -1
- package/dist/assets/app-connect-policy-Dc29MgO7.js +0 -1
- package/dist/assets/archive-Pfu0vcxR.js +0 -1
- package/dist/assets/archive-restore-DEjUiClU.js +0 -1
- package/dist/assets/arrow-down-DAvtXtFa.js +0 -1
- package/dist/assets/arrow-down-left-Nwrp8fi4.js +0 -1
- package/dist/assets/arrow-left-B28FFCK3.js +0 -1
- package/dist/assets/arrow-right-DNDaQIo7.js +0 -1
- package/dist/assets/arrow-up-9iN2R3MA.js +0 -1
- package/dist/assets/arrow-up-down-CJIK8TCn.js +0 -1
- package/dist/assets/arrow-up-right-DiRgpLCO.js +0 -1
- package/dist/assets/artifacts-CgjfsTtW.js +0 -1
- package/dist/assets/assets-DJJvlGB_.js +0 -1
- package/dist/assets/attachment-icon-CZuN7oYz.js +0 -1
- package/dist/assets/avatar-DqJIGTAc.js +0 -1
- package/dist/assets/badge-BCB2UKC4.js +0 -1
- package/dist/assets/badge-check-D_0FPgTQ.js +0 -1
- package/dist/assets/book-open-C66QigDM.js +0 -1
- package/dist/assets/bot-CGDYqgLL.js +0 -1
- package/dist/assets/boxes-BIaSrhti.js +0 -1
- package/dist/assets/braces-CVpgPQRh.js +0 -1
- package/dist/assets/browser-use-CdOa6liA.js +0 -1
- package/dist/assets/budgets-BxNYfyLC.js +0 -1
- package/dist/assets/button-BmKI4_wM.js +0 -1
- package/dist/assets/calendar-clock-C8P2JpSo.js +0 -1
- package/dist/assets/card-BEqG-UV1.js +0 -1
- package/dist/assets/cases-B9jQzD8A.js +0 -1
- package/dist/assets/chatEndpoints-Vhaw9JsV.js +0 -1
- package/dist/assets/check-Bx4LLq3s.js +0 -1
- package/dist/assets/checkbox-BglSCa_5.js +0 -1
- package/dist/assets/chevron-down-BmaFgyxt.js +0 -1
- package/dist/assets/chevron-left-DEIvRkEo.js +0 -1
- package/dist/assets/chevron-right-DqjcRLYV.js +0 -1
- package/dist/assets/chevron-up-BzfKzj1N.js +0 -1
- package/dist/assets/chip-DbtnZEov.js +0 -1
- package/dist/assets/circle-BVd9sOFX.js +0 -1
- package/dist/assets/circle-alert-CdVweuey.js +0 -1
- package/dist/assets/circle-dot-BLviGHqM.js +0 -1
- package/dist/assets/circle-question-mark-CBGYUohY.js +0 -1
- package/dist/assets/circle-slash-BzDiG-JT.js +0 -1
- package/dist/assets/circle-x-BPPuIHh-.js +0 -1
- package/dist/assets/clipboard-paste-C0QsDqxp.js +0 -1
- package/dist/assets/clock-DEs599IK.js +0 -1
- package/dist/assets/cloud-B1i8mEgD.js +0 -1
- package/dist/assets/code-xml-Db6omkH2.js +0 -1
- package/dist/assets/coins-CRI7Ef10.js +0 -1
- package/dist/assets/collapsible-DmqiXl1f.js +0 -1
- package/dist/assets/columns-3-DubyP8Oy.js +0 -1
- package/dist/assets/command-DJLgjr4P.js +0 -5
- package/dist/assets/companies-query-Dnfv1r6K.js +0 -1
- package/dist/assets/connection-identity-DuHkY5Sz.js +0 -1
- package/dist/assets/connection-owner-vsM_66fd.js +0 -1
- package/dist/assets/copy-BnN1tL4I.js +0 -1
- package/dist/assets/createLucideIcon-CbtN6if8.js +0 -94
- package/dist/assets/decision-models-DJP5kHBC.js +0 -1
- package/dist/assets/dialog-D3cjrQcK.js +0 -1
- package/dist/assets/dist--vQ3S0j1.js +0 -1
- package/dist/assets/dist-C65Jq0rC.js +0 -1
- package/dist/assets/dist-CCo_Rrw3.js +0 -1
- package/dist/assets/dist-CDEyV2bM.js +0 -1
- package/dist/assets/dist-CDWMeFci.js +0 -1
- package/dist/assets/dist-CV_Ts2de.js +0 -1
- package/dist/assets/dist-Cdvy2xrQ.js +0 -1
- package/dist/assets/dist-ClJYdGw9.js +0 -1
- package/dist/assets/dist-DQzK9oAw.js +0 -1
- package/dist/assets/dist-DxfJ4O7v.js +0 -1
- package/dist/assets/dist-P2Ny7SY8.js +0 -1
- package/dist/assets/dist-QF631rHo.js +0 -1
- package/dist/assets/dist-q0JHUaZ6.js +0 -1
- package/dist/assets/dropdown-menu-DvkjEPK6.js +0 -1
- package/dist/assets/ellipsis-ZvkXVQOj.js +0 -1
- package/dist/assets/ellipsis-vertical-CRVjKnef.js +0 -1
- package/dist/assets/email-BSLjCJzJ.js +0 -1
- package/dist/assets/environment-variables-editor-GN0_WupS.js +0 -1
- package/dist/assets/environments-D_pOr9P0.js +0 -1
- package/dist/assets/es2015-D6Xoqure.js +0 -41
- package/dist/assets/external-link-B8M_eN4d.js +0 -1
- package/dist/assets/eye-C7xrCETQ.js +0 -1
- package/dist/assets/eye-off-snICQITf.js +0 -1
- package/dist/assets/fast-responses-CinHCQ_w.js +0 -1
- package/dist/assets/file-bEFtUFOV.js +0 -1
- package/dist/assets/file-code-corner-C6yc7PJT.js +0 -1
- package/dist/assets/file-question-mark-O1llQb4b.js +0 -1
- package/dist/assets/file-search-zMkfIzb6.js +0 -1
- package/dist/assets/file-text-BtlJGe1c.js +0 -1
- package/dist/assets/flag-iWcR5PxW.js +0 -1
- package/dist/assets/flask-conical-DntvM9iD.js +0 -1
- package/dist/assets/folder-git-2-88DHgkYc.js +0 -1
- package/dist/assets/folder-open-CUz_CqhW.js +0 -1
- package/dist/assets/folder-search-B-eL35IN.js +0 -1
- package/dist/assets/funnel-RRPvdvKc.js +0 -1
- package/dist/assets/git-pull-request-Bb9-CCvK.js +0 -1
- package/dist/assets/github-icon-BWeGMw-Y.js +0 -1
- package/dist/assets/health-BguXgmpB.js +0 -1
- package/dist/assets/heartbeats-KqEeQoY9.js +0 -1
- package/dist/assets/inbox-CO76epH4.js +0 -1
- package/dist/assets/inboxArchiveCache-S9lD7h8o.js +0 -1
- package/dist/assets/index-CIZHrzQV.js +0 -67
- package/dist/assets/index-C_v2ixE8.css +0 -2
- package/dist/assets/info-3bAcbVog.js +0 -1
- package/dist/assets/input-DSKDMBTc.js +0 -1
- package/dist/assets/instanceSettings-CMv_C9s9.js +0 -1
- package/dist/assets/interaction-audience-CbTDqV2h.js +0 -1
- package/dist/assets/interaction-card-visibility-PTRkyj6L.js +0 -1
- package/dist/assets/issue-blockers-DJKzuzYx.js +0 -1
- package/dist/assets/issue-output-DYHYt5em.js +0 -1
- package/dist/assets/issue-properties-Ydxp97aa.js +0 -4
- package/dist/assets/issue-share-D-MQRfv0.js +0 -1
- package/dist/assets/issue-workspace-selection-qv20h31D.js +0 -1
- package/dist/assets/key-round-eObpubgV.js +0 -1
- package/dist/assets/label-BZ5Vu6Wx.js +0 -1
- package/dist/assets/layout-dashboard-ClM9D6I9.js +0 -1
- package/dist/assets/link-2-B_mtFw4d.js +0 -1
- package/dist/assets/link-C6VmMg0e.js +0 -1
- package/dist/assets/list-filter-Cced2__m.js +0 -1
- package/dist/assets/list-todo-C68I6Ivp.js +0 -1
- package/dist/assets/log-in-CSVNdwkJ.js +0 -1
- package/dist/assets/maximize-2-CF5Ykmiq.js +0 -1
- package/dist/assets/mention-chips-C5wTbjT0.js +0 -17
- package/dist/assets/message-square-plus-C0Ld_pRY.js +0 -1
- package/dist/assets/minus-BKcGLqB4.js +0 -1
- package/dist/assets/model-fallback-CsbwwzFh.js +0 -1
- package/dist/assets/model-picker-fields-BcM2ztol.js +0 -1
- package/dist/assets/network-CtyWO4fI.js +0 -1
- package/dist/assets/octagon-alert-CV6MuWrq.js +0 -1
- package/dist/assets/octagon-x-BT9UQ3L2.js +0 -1
- package/dist/assets/omp-settings-model-DSugRfNR.js +0 -1
- package/dist/assets/package-Cfwaf0sy.js +0 -1
- package/dist/assets/pause-CQSPytmf.js +0 -1
- package/dist/assets/pen-line-9I_ulUUz.js +0 -1
- package/dist/assets/pipeline-stage-presentation-xQpgs8zD.js +0 -2
- package/dist/assets/pipelines-DS98QjLD.js +0 -1
- package/dist/assets/play-BGpXyOfX.js +0 -1
- package/dist/assets/plug-DLf66LEY.js +0 -1
- package/dist/assets/plugins-_nvSyTi1.js +0 -1
- package/dist/assets/plus-Cwwlygq1.js +0 -1
- package/dist/assets/popover-DNlvlq22.js +0 -1
- package/dist/assets/power-Bj0C9_DV.js +0 -1
- package/dist/assets/presentation-mode-Bc-V-OxV.js +0 -1
- package/dist/assets/profile-summary-Bq7G8kpA.js +0 -1
- package/dist/assets/projects-DnLIPMhA.js +0 -1
- package/dist/assets/proposal-review-v8qimgDy.js +0 -1
- package/dist/assets/queryClient-BxA0lsho.js +0 -1
- package/dist/assets/queryKeys-BtklSlu4.js +0 -1
- package/dist/assets/radio-BDCCYLyl.js +0 -1
- package/dist/assets/radio-card-C1KKcOAn.js +0 -1
- package/dist/assets/recent-agent-chats-BTcSs-hI.js +0 -1
- package/dist/assets/refresh-cw-CB4p7c0I.js +0 -1
- package/dist/assets/repeat-MV5j1A_m.js +0 -1
- package/dist/assets/resizable-panels-HAThm5wg.js +0 -1
- package/dist/assets/review-policy-CBDPck8G.js +0 -1
- package/dist/assets/rotate-ccw-BHPtlxew.js +0 -1
- package/dist/assets/rotate-cw-DjVECMD0.js +0 -1
- package/dist/assets/router-Dz5khnq5.js +0 -1
- package/dist/assets/routines-C9_cUHKp.js +0 -1
- package/dist/assets/runRetryState-B-LROHcx.js +0 -1
- package/dist/assets/save-CJl3U6CT.js +0 -1
- package/dist/assets/schema-config-fields-Trq6yGVC.js +0 -1
- package/dist/assets/scroll-area-CF9B1jUp.js +0 -1
- package/dist/assets/scroll-text-CwHi0z0N.js +0 -1
- package/dist/assets/search-BLUNuOi4.js +0 -1
- package/dist/assets/secrets-DBFIGbk7.js +0 -1
- package/dist/assets/segmented-BXHqXahB.js +0 -1
- package/dist/assets/select-B0NyNiXx.js +0 -1
- package/dist/assets/send-CCRRU9ZJ.js +0 -1
- package/dist/assets/separator-B_au1wZQ.js +0 -1
- package/dist/assets/server-C41b4AH4.js +0 -1
- package/dist/assets/server-cog-Bpz8EeLg.js +0 -1
- package/dist/assets/settings-wkCdKHjA.js +0 -1
- package/dist/assets/shared-DcihZADH.js +0 -1
- package/dist/assets/sheet-pqgTPDsB.js +0 -1
- package/dist/assets/shield-CyRadM-E.js +0 -1
- package/dist/assets/shield-alert--pIypmo1.js +0 -1
- package/dist/assets/shield-check-Cn7fYkRm.js +0 -1
- package/dist/assets/shield-question-mark-D9yh3-W1.js +0 -1
- package/dist/assets/shield-x-BSi9bbxq.js +0 -1
- package/dist/assets/sidebarPreferences-BF5-cbDu.js +0 -1
- package/dist/assets/skeleton-Bp2BYQLp.js +0 -1
- package/dist/assets/slots-BDiOWL-I.js +0 -49
- package/dist/assets/smoke-lab-matrix-CIBBdFKc.js +0 -1
- package/dist/assets/square-R_SIHYAP.js +0 -1
- package/dist/assets/star-D5AZ1BBE.js +0 -15
- package/dist/assets/sun-bVzlgIN0.js +0 -1
- package/dist/assets/system-notice-comment-DVbGnPAH.js +0 -1
- package/dist/assets/tabs-PtHbLNir.js +0 -1
- package/dist/assets/task-chat-attachments-VJI8GpyC.js +0 -10
- package/dist/assets/terminal-DchvdtHu.js +0 -1
- package/dist/assets/textarea-BMM-BPwj.js +0 -1
- package/dist/assets/thumbs-down-wjR8GXg5.js +0 -1
- package/dist/assets/thumbs-up-DuDU_y1o.js +0 -1
- package/dist/assets/toggle-switch-BLqegT6P.js +0 -1
- package/dist/assets/tools-C3RgKPvE.js +0 -1
- package/dist/assets/tooltip-Bv4noeRo.js +0 -1
- package/dist/assets/transcript-adapter-Cr0vPUHv.js +0 -5
- package/dist/assets/trash-x69WfdGx.js +0 -1
- package/dist/assets/triangle-alert-CWf7XWL3.js +0 -1
- package/dist/assets/upload-CUh7kAgP.js +0 -1
- package/dist/assets/use-adapter-capabilities-sF6MvMQt.js +0 -1
- package/dist/assets/use-copy-action-_q_0j1gX.js +0 -1
- package/dist/assets/useAgentChatEnabled-CSJVphBn.js +0 -1
- package/dist/assets/useAutosaveIndicator-BE0IlB2w.js +0 -1
- package/dist/assets/useHiddenSettings-gXml0NVk.js +0 -1
- package/dist/assets/useInfiniteQuery-BiSkXUvS.js +0 -1
- package/dist/assets/useInstanceFeatureSettings-7uRv58JM.js +0 -1
- package/dist/assets/useManagedSandboxOnly-BYV154ez.js +0 -1
- package/dist/assets/useMobileEntityPickerViewportStyle-Dy_IJ81I.js +0 -1
- package/dist/assets/usePrefersReducedMotion-BcsOdg7b.js +0 -1
- package/dist/assets/useProfilesData-C_Hn21at.js +0 -1
- package/dist/assets/useQueries-BPEGjAKq.js +0 -1
- package/dist/assets/useSecondTick-BYFDXEoP.js +0 -1
- package/dist/assets/useSharedPolling-DM4wodTg.js +0 -1
- package/dist/assets/useSummaryDraftStream-CtodhEvP.js +0 -3
- package/dist/assets/user-check-CEWZnYf-.js +0 -1
- package/dist/assets/user-hCZeFikt.js +0 -1
- package/dist/assets/user-minus-Cw7MBQwb.js +0 -1
- package/dist/assets/user-round-D9RUfAcY.js +0 -1
- package/dist/assets/user-x-Cz2VDuUf.js +0 -1
- package/dist/assets/users-kH3Yuhxq.js +0 -1
- package/dist/assets/wand-sparkles-D5XzCZFk.js +0 -1
- package/dist/assets/webhook-C4kpyain.js +0 -1
- package/dist/assets/x-DwAIkaO9.js +0 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/prod-COP_vZWu.js","assets/rolldown-runtime-ZpX3ckPj.js","assets/TaskChatLab-BvlnYRNe.js","assets/createLucideIcon-DpXjCQRS.js","assets/check-ByoSzjU8.js","assets/circle-Dov4MVoe.js","assets/copy-BzAUsLd3.js","assets/button-CB8r2Tmh.js","assets/dist-BmMF5JdA.js","assets/dist-3Dez14jq.js","assets/minus-ymsuVafu.js","assets/pause-BNtKkOA6.js","assets/play-BEkcNe5A.js","assets/plus-Ci4fWNMH.js","assets/rotate-ccw-DP1fSRXE.js","assets/TaskChatThreadView-BSU2dzE7.js","assets/star-vweB_JDI.js","assets/preload-helper-CceJXRIF.js","assets/ArtifactCard-CheT3r1Y.js","assets/router-DvYg2TPj.js","assets/queryKeys-Bwpi9du8.js","assets/CompanyContext-Cx4B566r.js","assets/companies-query-CEvXdXle.js","assets/popover-C9GvGhqf.js","assets/dist-BdR2FnFe.js","assets/dist-hTXDV8BS.js","assets/dist-CL5YXBl1.js","assets/es2015-D1VPo3R2.js","assets/boxes-PkWx_5hs.js","assets/circle-dot-W_Fv5sI-.js","assets/package-Cvq1waTm.js","assets/search-C7RvqPDh.js","assets/shield-B35HbBPD.js","assets/terminal-BSPCPTKd.js","assets/external-link--KkXYRPz.js","assets/attachment-icon-g4YAkuZ8.js","assets/use-copy-action-DOl9yp4g.js","assets/ToastContext-BCfjPRi1.js","assets/clipboard-CTLKYvRL.js","assets/arrow-down-CDBD_UhE.js","assets/chevron-down-BY8r8lEv.js","assets/chevron-right-B9tyGqmZ.js","assets/MarkdownBody-Dtjq3Ln7.js","assets/mention-chips-D3m3O_ko.js","assets/agent-avatar-url-D6FtNk3V.js","assets/color-contrast-BHHcEMtO.js","assets/archive-BHg7Yq0H.js","assets/circle-question-mark-Bs7m2809.js","assets/circle-x-haVgjs_m.js","assets/clock-DynbfDi4.js","assets/file-code-corner-CTt6xXKc.js","assets/folder-open-fbJID1cC.js","assets/git-pull-request-DQkSlyfL.js","assets/key-round-Bzc86YKh.js","assets/octagon-alert-Do2mnwTI.js","assets/agents-PFXnjEjH.js","assets/github-icon-CbU9rpKT.js","assets/usePrefersReducedMotion-z1zTAoVk.js","assets/ThemeContext-Bj-WoVL8.js","assets/StatusIcon-Byea8cPq.js","assets/task-chat-attachments-COZdrQRo.js","assets/file-text-Dpnp6o-I.js","assets/file-DpimbHnE.js","assets/TaskChatMarker-2V0Oo3xV.js","assets/book-open-Ccq-Ea-W.js","assets/bot-CPZa9Nhm.js","assets/flag-DL-0fBPJ.js","assets/info-BqXpbzV2.js","assets/octagon-x-7Om5soqi.js","assets/TaskChatProtocolCard-CgwNmmaw.js","assets/RichWorkProductCard-ButSFwSp.js","assets/maximize-2-pkU0hBkw.js","assets/server-D14pf6xr.js","assets/ImageGalleryModal-tTRmXGM4.js","assets/dist-C_1hhiPG.js","assets/chevron-left-Bh6cfiU3.js","assets/x-B9UP51U4.js","assets/issue-output-BzlPk1Fq.js","assets/QuestionForm-CNI1aaPv.js","assets/MarkdownEditor-GCKumUHH.js","assets/dist-qP8xhvXd.js","assets/dist-CvnnLM1v.js","assets/dist-DGPm9z2w.js","assets/dist-DIKPg1Zq.js","assets/dist-B0zvydXD.js","assets/dist-BHjJYMl9.js","assets/calendar-clock-CeIy5aD9.js","assets/user-RgiS0rQH.js","assets/AgentAvatar-Dui4nRtK.js","assets/Identity-Jt9hiBbb.js","assets/avatar-C4Ssxg9Y.js","assets/routines-DRJ8glz2.js","assets/activity-CV1ib_N4.js","assets/dist-BhxPxuMy.js","assets/message-square-plus-DaOHWEpG.js","assets/input-tD3qR9Gq.js","assets/TaskChatComposerTakeoverContext-DCrczoPx.js","assets/shield-check-BkZhOxSV.js","assets/triangle-alert-BbGTCcEH.js","assets/dialog-Bj8Y6BBR.js","assets/textarea-BQh3frGz.js","assets/square-BSbamBKn.js","assets/users-CjaVMVjO.js","assets/presentation-mode-3-5_ozCU.js","assets/list-todo-ByybdFTG.js","assets/shield-question-mark-DJ1-iT-R.js","assets/shield-x-IA54_BG9.js","assets/system-notice-comment-BzIsx8nv.js","assets/label-CUFCL9Te.js","assets/heartbeats-Cy4hqsrt.js","assets/email-X-ZvOMfe.js","assets/transcript-adapter-CEuUrDAp.js","assets/AgentBubbleActionRow-DSmdb3Li.js","assets/dropdown-menu-COuwCVD4.js","assets/dist-BvZdGtYE.js","assets/ellipsis-ClhaIBYZ.js","assets/thumbs-down-Db03Y3rC.js","assets/thumbs-up-hfQ2kjmZ.js","assets/tooltip-DhA8eGCr.js","assets/segmented-B9WQFRdU.js","assets/Cases-B-LfED0v.js","assets/checkbox-D9x1Kpmi.js","assets/arrow-up-down-CIDQ-7ap.js","assets/columns-3-h7a-cGgB.js","assets/funnel-B2ism2sD.js","assets/badge-Dvh7HNMN.js","assets/projects-C-sNYR8y.js","assets/BreadcrumbContext-B9JUzLr5.js","assets/cases-DiL3ys5G.js","assets/CaseIdentifierKey-BFHk8T39.js","assets/FilterBar-CDIOkdDy.js","assets/CaseDetail-kLu_fI6z.js","assets/IssueDocumentAnnotations-CwAOcRXe.js","assets/sheet-CXi-joPR.js","assets/tabs-BruQLBag.js","assets/ellipsis-vertical-BLqWWVnI.js","assets/issue-properties-CmEBhjZa.js","assets/issue-attribution-DfN_3u2W.js","assets/WorkspaceRuntimeControls-ByOvZ2To.js","assets/activity-DjXPM70-.js","assets/useManagedSandboxOnly-DENpzhcY.js","assets/instanceSettings-DIXpSGRh.js","assets/archive-restore-BtX-2MA_.js","assets/arrow-right-898_TY3T.js","assets/arrow-up-right-CiL52_C-.js","assets/repeat-CxiYIeqH.js","assets/inboxArchiveCache-CoY_V35O.js","assets/access-BqSI2EWX.js","assets/assignees-DkQNbPzi.js","assets/AgentIdentity-DoJBo59l.js","assets/recent-selections-BnN_nb6Y.js","assets/recent-assignees-DmalYaLf.js","assets/InlineEntitySelector-h-mVM8ny.js","assets/useMobileEntityPickerViewportStyle-l3SLJAQb.js","assets/issue-blockers-KTmO2cng.js","assets/eye-kZn_xPie.js","assets/refresh-cw-BoKHCT9Q.js","assets/IssueReferencePill-Bx19xBTT.js","assets/query-placeholder-data-Bg4z2kcq.js","assets/SourceTrustBadge-D9HGGRtv.js","assets/badge-check-B-GkuMC-.js","assets/circle-alert-Dw0yL22E.js","assets/shield-alert-DoI68Irt.js","assets/InlineBanner-BWitMSzj.js","assets/runRetryState-BQtnYsCT.js","assets/review-policy-BroUuOnH.js","assets/user-check-NQX3Jxil.js","assets/user-minus-DFmQKqPK.js","assets/separator-Cc_zxQfG.js","assets/issue-workspace-selection-DxIMVIPY.js","assets/list-filter-BIvVZUS2.js","assets/trash-Blp_H70m.js","assets/select-BILzRqwR.js","assets/chevron-up-Y_THiwqt.js","assets/chip-CPztosQ8.js","assets/card-DANCDyBy.js","assets/useAutosaveIndicator-Bb6JV7mP.js","assets/FoldCurtain-SSKlbSjO.js","assets/line-diff-DAcZgvm2.js","assets/DocumentFrameHeader-lPIe9r6i.js","assets/Dashboard-B_807CNK.js","assets/flask-conical-qqfS8te7.js","assets/layout-dashboard-CQUo0zqq.js","assets/MootMark-Djv4Cqoj.js","assets/useSharedPolling-CfP23_kt.js","assets/slots-B-bF0j6o.js","assets/SidebarContext-BHJMHrvt.js","assets/plugins-CaoL00gm.js","assets/instance-settings-QXUWVmQs.js","assets/MetricCard-CWsDw6PQ.js","assets/smoke-lab-matrix-ChxKoFnA.js","assets/Companies-BMVhOFzV.js","assets/Agents-0yi6xFaj.js","assets/useQueries-DVLf9RKa.js","assets/network-DtO4s1Xo.js","assets/upload-D1pDAAji.js","assets/useAgentChatEnabled-BIG72pQN.js","assets/useHiddenSettings-C5OX_C_M.js","assets/health-CHjyy9Zt.js","assets/model-picker-fields-jLfT-wsr.js","assets/arrow-up-lSEksryM.js","assets/adapter-display-registry-BwL8TUEJ.js","assets/environments-C7Tx6OHp.js","assets/managed-sandbox-environment-B8DewKvK.js","assets/AgentRoleEditor-yyBT_XYK.js","assets/alert-dialog-Bu032Tf4.js","assets/EntityRow-DbXjGhVW.js","assets/AgentDetail-CWdw5kRB.js","assets/useInfiniteQuery-aicMPSfT.js","assets/ConnectionSetupFlow-BFexB8UB.js","assets/connection-identity-BFnwnJ1m.js","assets/queryClient-CLuei5YE.js","assets/collapsible-CK4bkaKD.js","assets/PathInstructionsModal-Ch_Y_h-W.js","assets/arrow-left-CRfeAefI.js","assets/SearchableSelect-Dl3Lshyy.js","assets/command-DnT_Dqx6.js","assets/searchable-select-fvMNMcqm.js","assets/environment-variables-editor-DuAdYQbc.js","assets/eye-off-CIggBtC5.js","assets/save-TS82wH4U.js","assets/user-round-cSiRkcc8.js","assets/model-DidtFy-U.js","assets/proposal-review-Cww0NzU2.js","assets/server-cog-Dd0WwTxo.js","assets/secrets-Bow-lhgm.js","assets/inbox-WZDW93BL.js","assets/link-2-DdeL2ffb.js","assets/SetupWizard-BhEuzmUv.js","assets/skeleton-D5GfoYPy.js","assets/tools-VxBq3Bni.js","assets/AppLogo-C6tetlB_.js","assets/assets-lhKNSpON.js","assets/toggle-switch-CCZLW1ZV.js","assets/AgentMultiSelect-CEZ1NuIU.js","assets/radio-card-CEpISzBw.js","assets/JsonSchemaForm-CukFZxO5.js","assets/schema-config-fields-CKfJ_1Bc.js","assets/agent-config-primitives-BpUNyayv.js","assets/AgentSetupPrompt-B44EEYgo.js","assets/dynamic-loader-ehitOaJV.js","assets/adapters-BDzUkPiY.js","assets/use-adapter-capabilities-DVcxB6B0.js","assets/AgentCharacter-D8CErloh.js","assets/app-connect-policy-C0ySFS-g.js","assets/responsible-user-denial-Dyl0BwU5.js","assets/ScrollToBottom-BYgXnYon.js","assets/scroll-area-CSkajMX4.js","assets/braces-DovVxLjW.js","assets/chatEndpoints-BR_dsxeU.js","assets/ConfigureBuiltInAgentModal-C5RpKaFX.js","assets/run-log-chunks-ZnzOvrXs.js","assets/IssueRecoveryActionCard-BH_n5kJ0.js","assets/execution-projection-BGI5f3kX.js","assets/workspace-restore-BIbDC_O8.js","assets/model-fallback-5DsUzAM5.js","assets/ResponsibleUserDenialNotice-O-ehIhIk.js","assets/user-x-BydVKgYM.js","assets/omp-settings-model-BVsTwU6j.js","assets/ChoiceControls-CLtKmk2I.js","assets/SkillCardIcon-C430BaPr.js","assets/CopyText-Z_7ZP24v.js","assets/MembershipAction-B1Rkn6Ya.js","assets/log-in-C5qjuUlB.js","assets/AgentActionButtons-CSDLZSMZ.js","assets/TrustPresetSection-DSCmQxlJ.js","assets/EnforcementBanner-CvthijpR.js","assets/shared-C9rdRvrI.js","assets/OmpAllSettings-D7HFc1wr.js","assets/Projects-IJU6fKzh.js","assets/ProjectDetail-tbNc2eqO.js","assets/link-BTk9LQnG.js","assets/BudgetPolicyCard-D31Qlv4T.js","assets/AccessSelectIdentity-DT_buzXu.js","assets/InlineEditor-DJB_QvGc.js","assets/SummarySlotCard-CxnwG1r2.js","assets/useSummaryDraftStream-Cce3cGNj.js","assets/budgets-BieJJ3WD.js","assets/ProjectWorkspacesContent-C-UY0h-1.js","assets/ProjectWorkspaceDetail-CE3uadEz.js","assets/MissingPluginTabPlaceholder-BBTNbYkG.js","assets/Workspaces-Db99D3YB.js","assets/Issues-Cn7D_2T3.js","assets/Inbox-6vKVEJVu.js","assets/issue-filters-Ce8v1l6U.js","assets/ApprovalPayload-CZTySb8R.js","assets/scroll-text-BtyjTPat.js","assets/useSecondTick-CQantaP_.js","assets/LiveNowTodoLine-CeGqy3iK.js","assets/AgentTodoCard-BHWOqSEn.js","assets/Search-SUbPfqq4.js","assets/file-question-mark-BdUx7roP.js","assets/IssueDetail-DuaqjKFa.js","assets/IssueWriteDenialNotice-DntH-qXu.js","assets/TerminalView-CsrRCoNX.js","assets/clipboard-paste-CbrlOJuv.js","assets/rotate-cw-BIJjXmtM.js","assets/terminal-font-B-qtwS34.js","assets/cloud-BL3mJ3Zk.js","assets/file-search-DKDwHcZ2.js","assets/folder-search-D89U3Z-T.js","assets/IssueThreadInteractionCard-CwQx5QmL.js","assets/plug-vBXQGAOC.js","assets/interaction-card-visibility-DTtQkm6u.js","assets/interaction-audience-CXUDNI1a.js","assets/AgentMailCredentialField-qDnOhzgT.js","assets/radio-Bbj2qILX.js","assets/settings-_MxMwkB3.js","assets/browser-use-DzHGNDA8.js","assets/TaskTreeControls-DaAFj1E9.js","assets/code-xml-DnMtzyzg.js","assets/IssueChatThread-RwT_ZjCz.js","assets/ComposerAddMenu-lqbjcizN.js","assets/CommentAttributionChip-CnhotPjn.js","assets/issueActiveRun-s6f-GUHq.js","assets/ApprovalCard-BIquGj06.js","assets/issue-share-0nHxp5nx.js","assets/artifacts-BmsoVCdJ.js","assets/activity-format-z4x2U1UL.js","assets/AgentChats-BlMX0riv.js","assets/recent-agent-chats-xm5DHAP2.js","assets/AgentChat-D3dO5D25.js","assets/agentChats-B3DxYJ0s.js","assets/IssueChatLongThreadPerf-VX9bG-bM.js","assets/Routines-GiNr76nw.js","assets/audit-navigation-IalprBz0.js","assets/FolderControls-Bhry3Vd2.js","assets/RoutineRunVariablesDialog-CRGon2Hg.js","assets/Pipelines-Dqr4RIMe.js","assets/pipeline-stage-presentation-DvjVVsAD.js","assets/folder-git-2-D8yyJVTc.js","assets/pipelines-B_5RdgB1.js","assets/PipelineSettings-CEOXJLey.js","assets/RoutineVariablesEditor-C_rNpv3C.js","assets/StatusCards-D2X-8hFz.js","assets/wand-sparkles-wj238ghx.js","assets/PixelsOffice-Dc-hTwL6.js","assets/coins-op-yocyK.js","assets/AttentionInteractionResolver-BUB3AfZH.js","assets/RoutineDetail-CWWdWsrO.js","assets/pen-line-DJnffu7P.js","assets/webhook-CrpXuiI8.js","assets/WebhookUrlWarning-DeNhQ5SI.js","assets/RoutineActivityRow-C0vIpaP_.js","assets/UserProfile-BYBUYHyM.js","assets/ExecutionWorkspaceDetail-D4v1WZZf.js","assets/Goals-BT9hCHnP.js","assets/GoalTree-DxU1Hv7E.js","assets/Artifacts-Cp_CLB8P.js","assets/GoalDetail-Ct08uwQw.js","assets/Approvals-DSt7iLh6.js","assets/ApprovalDetail-hUlU9KPS.js","assets/CompanyActivity-5OGh6LZ6.js","assets/AuditHub-DiWa6PDF.js","assets/arrow-down-left-tUS9EGQ5.js","assets/decision-models-BJo87qdY.js","assets/fast-responses-BxWwvpML.js","assets/QuotaBar-BHpsGZ_M.js","assets/WhatNeedsMe-I9wfO12c.js","assets/DecisionDateChips-CM9496e0.js","assets/sun-t5pkwxql.js","assets/DecisionQueuePage-BRbIttBU.js","assets/BoardChat-BtB-0sW_.js","assets/circle-slash-BrrkGL_C.js","assets/send-Cq6oLC65.js","assets/CompanySettings-EcYnaTrR.js","assets/DecisionModelSettings-DyZC9rU1.js","assets/CompanyConnections-Q1zAAePy.js","assets/CompanyEnvironments-BW9JgMNj.js","assets/BootstrapSetupUxLab-ARs-PdM-.js","assets/ResponsibleUserDenialUxLab-CwOtm-H_.js","assets/CrossIssueCollaborationUxLab-BbToOV2g.js","assets/CompanySettingsPluginPage-D3Vts52M.js","assets/CompanyAccess-BlUM6hbW.js","assets/AdvancedToolsRoute-CTTIaGDV.js","assets/power-czY3YlJl.js","assets/profile-summary-Bhu05QwC.js","assets/useProfilesData-D_CamlCc.js","assets/ProfileWizardRoute-CyY9cBXn.js","assets/ToolsAdminGate-B6k3SrGU.js","assets/ProfileDetailRoute-DWOiwLnB.js","assets/Browse-B5mbrNri.js","assets/ManagedAiConnectionDetails-GCRA__HT.js","assets/retired-composio-DrxhEOpx.js","assets/connection-owner-a9FWzn0p.js","assets/AssistantConnection-D7MGE_yN.js","assets/AppsConnect-C1ilHYgy.js","assets/skill-source-connect-return-C3vV7DQP.js","assets/ChatEndpointSetup-BIxcZyIt.js","assets/EmailEndpointSetup-BOhC9uiR.js","assets/OpenwaGatewayManager-CZ-1AWGM.js","assets/ChatEndpointDetail-DMGq_bkC.js","assets/EmailConnectionAccess-BfEW3sUV.js","assets/ChatIdentityConfirm-vsNMn_wj.js","assets/AppsReview-CdjVNMBY.js","assets/ReviewQueueCard-DK0sDiGs.js","assets/AppDetail-CqWalFA3.js","assets/AppNotConnected-CzQcETOO.js","assets/GatewaysList-CZP6UIqo.js","assets/CopyableGatewayUrl-BAIPUo7r.js","assets/GatewayDetail-BzSIBC84.js","assets/CompanySkills-CJp4nZix.js","assets/SkillBinaryFile-Datjq2Oi.js","assets/company-skill-routes-D5LJ1l8M.js","assets/SkillSources-DeBOYCiw.js","assets/SkillSourceTree-CR0E52D2.js","assets/SkillStudio-C3XaNFS3.js","assets/AgentIconPicker-Dub7R1_d.js","assets/resizable-panels-CAJWzqPj.js","assets/IssueOutputSection-CWIabX5_.js","assets/Secrets--ch95iPv.js","assets/CompanyImport-B7Y99lni.js","assets/agent-order-BE-pAWdx.js","assets/sidebarPreferences-RlJwFW7E.js","assets/portable-files-CloN_vbk.js","assets/DesignGuide-bh4XX4nv.js","assets/RepositoryEditor-sn0h55E-.js","assets/ThemeToggle-_Eipcr9P.js","assets/InstanceFeatures-CkqItnLP.js","assets/useInstanceFeatureSettings-1CM1woTZ.js","assets/AgentDefaults-BRMPOQ-f.js","assets/ModelsAndProviders-DhjeUdj-.js","assets/InstanceAdvanced-Bb4mtcMA.js","assets/InstanceAccess-CWtKVMDd.js","assets/ProfileSettings-BDPwbFPA.js","assets/PluginManager-BHDvd2Kk.js","assets/PluginSettings-DSb7ReBz.js","assets/AdapterManager-D60L5cdo.js","assets/PluginPage-DGJsTGb4.js","assets/NewAgent-BTrIjdLI.js","assets/Auth-7ZwKR47T.js","assets/invite-memory-CHGcQdLs.js","assets/BoardClaim-Dj03nG8V.js","assets/McpConnect-Cv3wvage.js","assets/CliAuth-BrGRdrjs.js","assets/InviteLanding-BnL6CX0t.js","assets/PublicIssueSharePage-D2-mjx5c.js","assets/JoinRequestQueue-DDbAcL7h.js","assets/CompanyExport-CDSYD5mi.js","assets/Terminal-Byg7O1p2.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var hE=Object.defineProperty;var r=(e,t)=>hE(e,"name",{value:t,configurable:!0});import{i as g0,n as gE,t as go}from"./rolldown-runtime-ZpX3ckPj.js";import{Ar as xE,At as bE,Bi as x0,C as Jk,Fr as Jh,Hi as Bc,Ir as vE,Ji as yE,Lt as jE,Ni as wE,Nr as kE,Or as SE,Ot as NE,P as CE,Pi as AE,Pr as eS,Qt as b0,Yi as $y,_ as _E,_n as EE,ci as tS,i as Od,kr as IE,kt as nS,l as Y,la as TE,li as Zs,n as aS,r as fr,rr as RE,t as Fe,ua as v0,ui as sS,vn as ME,w as Uy,x as DE,zt as Fd}from"./createLucideIcon-DpXjCQRS.js";import{l as iS}from"./dist-hTXDV8BS.js";import{t as ke}from"./preload-helper-CceJXRIF.js";import{_ as OE,a as eg,c as LE,d as xo,f as L,h as hn,n as tg,p as zE,r as Ei,s as PE,t as y0,v as Ps,y as rS}from"./star-vweB_JDI.js";import{J as j0,X as kn,Y as $E,_ as Bt,c as Pr,d as w0,f as UE,g as lS,h as Kc,n as Ti,r as je,t as $,u as BE,v as me}from"./queryKeys-Bwpi9du8.js";import{t as _f}from"./queryClient-CLuei5YE.js";import{t as Ef}from"./useQueries-DVLf9RKa.js";import{a as KE,c as qE,i as k0,l as FE,o as Zn,u as By}from"./companies-query-CEvXdXle.js";import{H as oS,I as Ky,M as HE,g as VE,gt as WE,h as QE,ht as GE,mt as YE,n as XE}from"./ConnectionSetupFlow-BFexB8UB.js";import{t as cS}from"./issue-attribution-DfN_3u2W.js";import{t as ZE}from"./execution-projection-BGI5f3kX.js";import{C as uS,D as JE,O as eI,T as tI,d as dS,f as S0,k as ng,w as fS}from"./connection-identity-BFnwnJ1m.js";import{n as bt,r as nI,t as aI}from"./CompanyContext-Cx4B566r.js";import{A as sI,B as Hd,Bt as iI,C as rI,Ct as lI,E as oI,G as If,H as cI,J as uI,Jt as ag,L as ld,O as dI,Q as pS,Qt as fI,Rt as pI,Ut as Vd,Yt as N0,Z as qy,_t as mI,an as hI,b as gI,dt as mS,f as Wd,i as xI,in as bI,n as hS,nt as eh,o as ja,on as vI,ot as hc,p as Tf,q as C0,r as Ve,t as mn,tt as Rf,u as gS,ut as xS,v as bS,zt as cn}from"./router-DvYg2TPj.js";import{t as yI}from"./dist-BmMF5JdA.js";import{n as vS,r as jI,t as yS}from"./collapsible-CK4bkaKD.js";import{a as jS,c as wS,i as kS,l as wI,n as SS,o as NS,r as CS,s as AS,t as _S}from"./alert-dialog-Bu032Tf4.js";import{a as Qd,n as Gd,t as Yd}from"./avatar-C4Ssxg9Y.js";import{t as Gs}from"./checkbox-D9x1Kpmi.js";import{a as ES,c as Ii,i as Sn,n as Fy,o as kI,p as Jr,r as el,s as SI,t as tl}from"./dropdown-menu-COuwCVD4.js";import{t as NI}from"./scroll-area-CSkajMX4.js";import{i as CI,r as AI,t as _I}from"./tabs-BruQLBag.js";import{a as EI,o as II,r as TI,s as RI,t as IS}from"./MarkdownEditor-GCKumUHH.js";import{o as ys,r as js,t as ws}from"./popover-C9GvGhqf.js";import{t as Mf}from"./activity-DjXPM70-.js";import{n as MI}from"./PathInstructionsModal-Ch_Y_h-W.js";import{t as TS}from"./archive-BHg7Yq0H.js";import{t as DI}from"./arrow-down-CDBD_UhE.js";import{t as A0}from"./arrow-left-CRfeAefI.js";import{t as OI}from"./arrow-right-898_TY3T.js";import{t as LI}from"./arrow-up-down-CIDQ-7ap.js";import{t as zI}from"./arrow-up-right-CiL52_C-.js";import{t as RS}from"./arrow-up-lSEksryM.js";import{t as MS}from"./book-open-Ccq-Ea-W.js";import{t as Nc}from"./bot-CPZa9Nhm.js";import{t as DS}from"./boxes-PkWx_5hs.js";import{t as PI}from"./braces-DovVxLjW.js";import{t as $I}from"./calendar-clock-CeIy5aD9.js";import{t as Ms}from"./check-ByoSzjU8.js";import{t as Qr}from"./chevron-down-BY8r8lEv.js";import{t as OS}from"./chevron-left-Bh6cfiU3.js";import{t as ur}from"./chevron-right-B9tyGqmZ.js";import{t as UI}from"./chevron-up-Y_THiwqt.js";import{n as LS,t as BI}from"./SearchableSelect-Dl3Lshyy.js";import{t as zS}from"./circle-alert-Dw0yL22E.js";import{t as Xd}from"./circle-dot-W_Fv5sI-.js";import{t as sg}from"./circle-question-mark-Bs7m2809.js";import{t as KI}from"./circle-Dov4MVoe.js";import{t as ig}from"./AgentIconPicker-Dub7R1_d.js";import{a as qI,c as FI,d as rg,i as th,l as HI,n as VI,o as PS,r as WI,s as QI,t as GI,u as od}from"./ComposerAddMenu-lqbjcizN.js";import{t as YI}from"./clipboard-paste-CbrlOJuv.js";import{t as XI}from"./clock-DynbfDi4.js";import{C as ZI,D as JI,F as e3,O as $S,P as Hy,k as t3,t as n3,w as a3}from"./MarkdownBody-Dtjq3Ln7.js";import{t as s3}from"./columns-3-h7a-cGgB.js";import{t as i3}from"./copy-BzAUsLd3.js";import{n as r3,t as l3}from"./package-Cvq1waTm.js";import{t as Df}from"./ellipsis-ClhaIBYZ.js";import{t as US}from"./external-link--KkXYRPz.js";import{a as o3,d as c3,f as u3,g as d3,h as f3,i as p3,l as m3,m as h3,p as g3,u as x3}from"./task-chat-attachments-COZdrQRo.js";import{t as BS}from"./file-code-corner-CTt6xXKc.js";import{t as KS}from"./file-text-Dpnp6o-I.js";import{t as _0}from"./flag-DL-0fBPJ.js";import{t as b3}from"./flask-conical-qqfS8te7.js";import{t as qS}from"./folder-open-fbJID1cC.js";import{t as v3}from"./funnel-B2ism2sD.js";import{t as y3}from"./git-pull-request-DQkSlyfL.js";import{t as E0}from"./inbox-WZDW93BL.js";import{t as I0}from"./key-round-Bzc86YKh.js";import{t as T0}from"./layout-dashboard-CQUo0zqq.js";import{t as j3}from"./link-2-DdeL2ffb.js";import{r as Ma,t as oe}from"./button-CB8r2Tmh.js";import{t as w3}from"./RepositoryEditor-sn0h55E-.js";import{t as FS}from"./maximize-2-pkU0hBkw.js";import{t as k3}from"./minus-ymsuVafu.js";import{n as Ds,t as S3}from"./ThemeToggle-_Eipcr9P.js";import{t as HS}from"./network-DtO4s1Xo.js";import{t as R0}from"./play-BEkcNe5A.js";import{t as as}from"./plus-Ci4fWNMH.js";import{t as nl}from"./refresh-cw-BoKHCT9Q.js";import{t as VS}from"./repeat-CxiYIeqH.js";import{t as gc}from"./rotate-ccw-DP1fSRXE.js";import{t as N3}from"./scroll-text-BtyjTPat.js";import{t as pr}from"./search-C7RvqPDh.js";import{t as C3}from"./send-Cq6oLC65.js";import{t as WS}from"./settings-_MxMwkB3.js";import{t as A3}from"./shield-alert-DoI68Irt.js";import{t as Cc}from"./shield-check-BkZhOxSV.js";import{t as _3}from"./shield-question-mark-DJ1-iT-R.js";import{t as E3}from"./shield-B35HbBPD.js";import{t as I3}from"./square-BSbamBKn.js";import{t as QS}from"./terminal-BSPCPTKd.js";import{t as lg}from"./trash-Blp_H70m.js";import{t as ai}from"./triangle-alert-BbGTCcEH.js";import{t as T3}from"./upload-D1pDAAji.js";import{t as R3}from"./user-round-cSiRkcc8.js";import{t as so}from"./user-RgiS0rQH.js";import{t as Gr}from"./users-CjaVMVjO.js";import{t as ia}from"./x-B9UP51U4.js";import{a as M3,i as D3,n as O3,r as L3}from"./SetupWizard-BhEuzmUv.js";import{i as z3,n as P3,r as Jn,t as $3}from"./SidebarContext-BHJMHrvt.js";import{t as M0}from"./MootMark-Djv4Cqoj.js";import{a as Of,c as U3,i as B3,n as Ge,o as Vy,r as K3,s as q3,t as GS}from"./SidebarNavItem-Dr2h0yiK.js";import{n as oo,t as or}from"./primary-sidebar-styles-BdMiagDc.js";import{i as Is,n as Ts,r as F3,t as Rs}from"./tooltip-DhA8eGCr.js";import{t as Dn}from"./badge-Dvh7HNMN.js";import{n as H3,t as og}from"./Identity-Jt9hiBbb.js";import{t as mr}from"./AgentAvatar-Dui4nRtK.js";import{a as Ri,n as Lf,o as V3,r as W3,t as Q3}from"./ToastContext-BCfjPRi1.js";import{t as Ha}from"./agents-PFXnjEjH.js";import{t as zf}from"./heartbeats-Cy4hqsrt.js";import{t as pa}from"./instanceSettings-DIXpSGRh.js";import{a as nh,c as G3,i as Y3,l as X3,n as Wy,o as ah,r as Z3,s as cg,t as Qy}from"./agent-order-BE-pAWdx.js";import{n as Ac,t as _c}from"./useSharedPolling-CfP23_kt.js";import{m as J3,s as eT}from"./inboxArchiveCache-CoY_V35O.js";import{n as Gy,t as hr}from"./projects-C-sNYR8y.js";import{t as Pf}from"./useAgentChatEnabled-BIG72pQN.js";import{a as bo,i as $f,n as $s,o as tT,r as vo,s as Os,t as ks}from"./dialog-Bj8Y6BBR.js";import{t as Wn}from"./input-tD3qR9Gq.js";import{t as ti}from"./access-BqSI2EWX.js";import{a as nT,c as ug,d as aT,f as Yy,h as nr,i as sT,l as iT,m as Xy,n as rT,o as lT,p as sh,r as YS,s as dg,t as fg,u as Zd}from"./issue-filters-Ce8v1l6U.js";import{a as io,n as XS,r as Vr,t as Kr}from"./assignees-DkQNbPzi.js";import{t as D0}from"./plugins-CaoL00gm.js";import{n as oT,r as cT,t as sr}from"./instance-settings-QXUWVmQs.js";import{a as uT,c as O0,d as dT,f as fT,i as Zy,l as pT,m as mT,n as pg,o as qc,p as hT,r as gT,s as xT,t as L0,u as bT}from"./slots-B-bF0j6o.js";import{t as Fc}from"./health-CHjyy9Zt.js";import{t as gr}from"./useHiddenSettings-C5OX_C_M.js";import{t as Jd}from"./sidebarPreferences-RlJwFW7E.js";import{t as rt}from"./skeleton-D5GfoYPy.js";import{t as ZS}from"./chatEndpoints-BR_dsxeU.js";import{t as Yl}from"./tools-VxBq3Bni.js";import{t as vT}from"./AppLogo-C6tetlB_.js";import{r as yT}from"./audit-navigation-IalprBz0.js";import{t as jT}from"./routines-DRJ8glz2.js";import{t as wT}from"./github-icon-CbU9rpKT.js";import{n as JS,t as kT}from"./BreadcrumbContext-B9JUzLr5.js";import{a as z0,c as ir,i as Xs,l as ST,n as NT,o as wn,r as P0,s as $0,t as e1}from"./command-DnT_Dqx6.js";import{t as co}from"./AgentIdentity-DoJBo59l.js";import{t as mg}from"./secrets-Bow-lhgm.js";import{t as t1}from"./textarea-BQh3frGz.js";import{t as n1}from"./assets-lhKNSpON.js";import{n as CT,r as AT}from"./recent-selections-BnN_nb6Y.js";import{a as ef,i as tf,n as hg,r as a1,t as _T}from"./recent-assignees-DmalYaLf.js";import{t as ET}from"./attachment-icon-g4YAkuZ8.js";import{t as s1}from"./toggle-switch-CCZLW1ZV.js";import{n as IT,t as TT}from"./presentation-mode-3-5_ozCU.js";import{a as ih,c as Jy,d as $r,g as cd,h as ej,m as Ai,o as RT,s as tj,t as MT,v as nj}from"./TaskChatComposerTakeoverContext-DCrczoPx.js";import{t as DT}from"./interaction-card-visibility-DTtQkm6u.js";import{r as OT}from"./useMobileEntityPickerViewportStyle-l3SLJAQb.js";import{i as aj,n as LT,t as zT}from"./color-contrast-BHHcEMtO.js";import{t as U0}from"./InlineEntitySelector-h-mVM8ny.js";import{r as PT}from"./searchable-select-fvMNMcqm.js";import{t as sj}from"./InlineBanner-BWitMSzj.js";import{t as gg}from"./select-BILzRqwR.js";import{t as $T}from"./chip-CPztosQ8.js";import{t as UT}from"./environments-C7Tx6OHp.js";import{t as B0}from"./clipboard-CTLKYvRL.js";import{n as BT,r as KT,t as qT}from"./AgentSetupPrompt-B44EEYgo.js";import{t as K0}from"./usePrefersReducedMotion-z1zTAoVk.js";import{t as FT}from"./use-copy-action-DOl9yp4g.js";import{i as HT}from"./app-connect-policy-C0ySFS-g.js";import{n as VT,t as WT}from"./segmented-B9WQFRdU.js";import{t as Hc}from"./card-DANCDyBy.js";import{t as i1}from"./agentChats-B3DxYJ0s.js";import{t as QT}from"./ThemeContext-Bj-WoVL8.js";import{t as ei}from"./StatusIcon-Byea8cPq.js";import{a as GT,d as YT,i as XT,l as ZT,s as JT,t as eR}from"./issue-blockers-KTmO2cng.js";r((function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const p of u.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&l(p)}).observe(document,{childList:!0,subtree:!0});function s(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}r(s,"getFetchOpts");function l(c){if(c.ep)return;c.ep=!0;const u=s(c);fetch(c.href,u)}r(l,"processPreload")}),"polyfill")();function r1(e){return(typeof e=="string"?e:e?.name??"").trim()}r(r1,"rawNameOf");function l1(e){const t=e.toLowerCase();return!!(t.includes("://")||t==="localhost"||t.startsWith("localhost:")||/^\d{1,3}(\.\d{1,3}){3}(:\d+)?$/.test(t)||/^[a-z0-9.-]+:\d+$/.test(t))}r(l1,"looksLikeNetworkAddress");function xg(e){return e.split(/[\s._-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}r(xg,"titleCaseIdentifier");function tR(e){const t=/^plugin:\s*(.+)$/i.exec(e);if(!t)return null;let s=t[1].trim();return s=s.slice(s.lastIndexOf(".")+1),s=s.replace(/^plugin[-_]/i,""),xg(s)||"Custom app"}r(tR,"pluginPackageLabel");function nR(e,t={}){const s=t.title?.trim();if(s)return s;const l=r1(e);if(!l||l1(l))return"Custom app";const c=tR(l);if(c)return c;if(l.includes(":")&&!l.includes("://")){const u=l.slice(l.lastIndexOf(":")+1).trim();if(u)return xg(u)}return/\s/.test(l)||/[A-Z]/.test(l)?l:/[._-]/.test(l)?xg(l):l}r(nR,"humanizeConnectionDisplayName");function tG(e){const t=r1(e);return t&&l1(t)?`hosted at ${t}`:null}r(tG,"connectionDisplaySecondaryHint");var aR=864e5;function Xl(e){return e?.phase==="waiting"||e?.phase==="installing"}r(Xl,"isUpdateJobActive");function sR(e){return e+3*aR}r(sR,"updateNoticeHiddenUntil");function iR(e,t){return typeof e=="number"&&Number.isFinite(e)&&t<e}r(iR,"isUpdateNoticeHidden");var o1={name:"badge-dollar-sign",size:24,node:[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]]};o1.node;var rR=Fe(o1),c1={name:"book-open-text",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M16 13h2",key:"weia3s"}],["path",{d:"M16 9h2",key:"1n7gjm"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}],["path",{d:"M6 13h2",key:"1cckiz"}],["path",{d:"M6 9h2",key:"1k7j9f"}]]};c1.node;var lR=Fe(c1),u1={name:"chevrons-down-up",size:24,node:[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]]};u1.node;var oR=Fe(u1),d1={name:"chevrons-left-right-ellipsis",size:24,node:[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"m17 7 5 5-5 5",key:"1xlxn0"}],["path",{d:"m7 7-5 5 5 5",key:"19njba"}],["path",{d:"M8 12h.01",key:"czm47f"}]]};d1.node;var cR=Fe(d1),f1={name:"circle-arrow-up",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],aliases:["arrow-up-circle"]};f1.node;var ij=Fe(f1),p1={name:"circle-pause",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],aliases:["pause-circle"]};p1.node;var q0=Fe(p1),m1={name:"circle-play",size:24,node:[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aliases:["play-circle"]};m1.node;var h1=Fe(m1),g1={name:"circle-slash-2",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}]],aliases:["circle-slashed"]};g1.node;var uR=Fe(g1),x1={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};x1.node;var b1=Fe(x1),v1={name:"cloud-download",size:24,node:[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]],aliases:["download-cloud"]};v1.node;var dR=Fe(v1),y1={name:"dollar-sign",size:24,node:[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]};y1.node;var j1=Fe(y1),w1={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};w1.node;var bg=Fe(w1),k1={name:"file-diff",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]]};k1.node;var fR=Fe(k1),S1={name:"file-pen-line",size:24,node:[["path",{d:"M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z",key:"ukzhwg"}],["path",{d:"M14.487 7.858A1 1 0 0 1 14 7V2",key:"1klhew"}],["path",{d:"M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516",key:"rxaxab"}],["path",{d:"M8 18h1",key:"13wk12"}]],aliases:["file-signature"]};S1.node;var pR=Fe(S1),N1={name:"file-terminal",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m8 16 2-2-2-2",key:"10vzyd"}],["path",{d:"M12 18h4",key:"1wd2n7"}]]};N1.node;var mR=Fe(N1),C1={name:"gamepad-2",size:24,node:[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]]};C1.node;var hR=Fe(C1),A1={name:"git-branch-plus",size:24,node:[["path",{d:"M6 3v12",key:"qpgusn"}],["path",{d:"M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"1d02ji"}],["path",{d:"M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"chk6ph"}],["path",{d:"M15 6a9 9 0 0 0-9 9",key:"or332x"}],["path",{d:"M18 15v6",key:"9wciyi"}],["path",{d:"M21 18h-6",key:"139f0c"}]]};A1.node;var gR=Fe(A1),_1={name:"git-commit-horizontal",size:24,node:[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],aliases:["git-commit"]};_1.node;var xR=Fe(_1),E1={name:"grip-vertical",size:24,node:[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]};E1.node;var bR=Fe(E1),I1={name:"house",size:24,node:[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],aliases:["home"]};I1.node;var vR=Fe(I1),T1={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};T1.node;var yR=Fe(T1),R1={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};R1.node;var jR=Fe(R1),M1={name:"library",size:24,node:[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]};M1.node;var vg=Fe(M1),D1={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};D1.node;var O1=Fe(D1),L1={name:"list-collapse",size:24,node:[["path",{d:"M10 5h11",key:"1hkqpe"}],["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 19h11",key:"14g2nv"}],["path",{d:"m3 10 3-3-3-3",key:"i7pm08"}],["path",{d:"m3 20 3-3-3-3",key:"20gx1n"}]]};L1.node;var wR=Fe(L1),z1={name:"list-tree",size:24,node:[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]};z1.node;var P1=Fe(z1),$1={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};$1.node;var kR=Fe($1),U1={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};U1.node;var Uf=Fe(U1),B1={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};B1.node;var K1=Fe(B1),q1={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};q1.node;var yg=Fe(q1),F1={name:"message-square-reply",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"m10 8-3 3 3 3",key:"fp6dz7"}],["path",{d:"M17 14v-1a2 2 0 0 0-2-2H7",key:"1tkjnz"}]]};F1.node;var SR=Fe(F1),H1={name:"messages-square",size:24,node:[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]};H1.node;var NR=Fe(H1),V1={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};V1.node;var W1=Fe(V1),Q1={name:"monitor-cog",size:24,node:[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m14.305 7.53.923-.382",key:"1mlnsw"}],["path",{d:"m15.228 4.852-.923-.383",key:"82mpwg"}],["path",{d:"m16.852 3.228-.383-.924",key:"ln4sir"}],["path",{d:"m16.852 8.772-.383.923",key:"1dejw0"}],["path",{d:"m19.148 3.228.383-.924",key:"192kgf"}],["path",{d:"m19.53 9.696-.382-.924",key:"fiavlr"}],["path",{d:"m20.772 4.852.924-.383",key:"1j8mgp"}],["path",{d:"m20.772 7.148.924.383",key:"zix9be"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"1tnzv8"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]};Q1.node;var CR=Fe(Q1),G1={name:"panel-right-close",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]]};G1.node;var Y1=Fe(G1),X1={name:"panel-right-open",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]]};X1.node;var Z1=Fe(X1),J1={name:"panel-top-close",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"m9 16 3-3 3 3",key:"1idcnm"}]]};J1.node;var AR=Fe(J1),eN={name:"pencil-ruler",size:24,node:[["path",{d:"M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13",key:"orapub"}],["path",{d:"m8 6 2-2",key:"115y1s"}],["path",{d:"m18 16 2-2",key:"ee94s4"}],["path",{d:"m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17",key:"cfq27r"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};eN.node;var _R=Fe(eN),tN={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};tN.node;var F0=Fe(tN),nN={name:"receipt-text",size:24,node:[["path",{d:"M13 16H8",key:"wsln4y"}],["path",{d:"M14 8H8",key:"1l3xfs"}],["path",{d:"M16 12H8",key:"1fr5h0"}],["path",{d:"M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",key:"ycz6yz"}]]};nN.node;var ER=Fe(nN),aN={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};aN.node;var H0=Fe(aN),sN={name:"search-code",size:24,node:[["path",{d:"m13 13.5 2-2.5-2-2.5",key:"1rvxrh"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}],["path",{d:"M9 8.5 7 11l2 2.5",key:"6ffwbx"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};sN.node;var IR=Fe(sN),iN={name:"settings-2",size:24,node:[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]};iN.node;var TR=Fe(iN),rN={name:"share-2",size:24,node:[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]};rN.node;var RR=Fe(rN),lN={name:"share",size:24,node:[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]]};lN.node;var MR=Fe(lN),oN={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]};oN.node;var cN=Fe(oN),uN={name:"square-kanban",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 7v7",key:"1x2jlm"}],["path",{d:"M12 7v4",key:"xawao1"}],["path",{d:"M16 7v9",key:"1hp2iy"}]],aliases:["kanban-square"]};uN.node;var DR=Fe(uN),dN={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};dN.node;var V0=Fe(dN),fN={name:"square-plus",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],aliases:["plus-square"]};fN.node;var OR=Fe(fN),pN={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};pN.node;var LR=Fe(pN),mN={name:"store",size:24,node:[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]]};mN.node;var zR=Fe(mN),hN={name:"timer-reset",size:24,node:[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]]};hN.node;var PR=Fe(hN),gN={name:"toggle-right",size:24,node:[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]]};gN.node;var xN=Fe(gN),bN={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};bN.node;var $R=Fe(bN),vN={name:"user-plus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};vN.node;var yN=Fe(vN),jN={name:"user-round-pen",size:24,node:[["path",{d:"M2 21a8 8 0 0 1 10.821-7.487",key:"1c8h7z"}],["path",{d:"M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1817ys"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}]]};jN.node;var UR=Fe(jN),wN={name:"wifi-off",size:24,node:[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};wN.node;var BR=Fe(wN),Zl=g0(iS()),x=g0(v0(),1),kN="wardmote.staleChunkReload";function KR(){try{return window.sessionStorage}catch{return null}}r(KR,"sessionStore");function qR(e){try{e?.removeItem(kN)}catch{return}}r(qR,"clearReloadMark");function FR(e,t){if(!e)return!1;try{return e.getItem("wardmote.staleChunkReload")===t?!1:(e.setItem(kN,t),!0)}catch{return!1}}r(FR,"markReloadOnce");function Ce(e,t={}){const s=t.reload??(()=>window.location.reload()),l=t.path??(()=>window.location.pathname);return(0,x.lazy)(async()=>{const c=t.storage===void 0?KR():t.storage;try{const u=await e();return qR(c),{default:u}}catch(u){if(!FR(c,l()))throw u;return s(),new Promise(()=>{})}})}r(Ce,"lazyPage");var nt=r(e=>typeof e=="string","isString$1"),cc=r(()=>{let e,t;const s=new Promise((l,c)=>{e=l,t=c});return s.resolve=e,s.reject=t,s},"defer"),rh=r(e=>e==null?"":String(e),"makeString"),HR=r((e,t,s)=>{e.forEach(l=>{t[l]&&(s[l]=t[l])})},"copy"),VR=/###/g,rj=r(e=>e&&e.includes("###")?e.replace(VR,"."):e,"cleanKey"),lj=r(e=>!e||nt(e),"canNotTraverseDeeper"),xc=r((e,t,s)=>{const l=nt(t)?t.split("."):t;let c=0;for(;c<l.length-1;){if(lj(e))return{};const u=rj(l[c]);!e[u]&&s&&(e[u]=new s),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++c}return lj(e)?{}:{obj:e,k:rj(l[c])}},"getLastOfPath"),oj=r((e,t,s)=>{const{obj:l,k:c}=xc(e,t,Object);if(l!==void 0||t.length===1){l[c]=s;return}let u=t[t.length-1],p=t.slice(0,t.length-1),f=xc(e,p,Object);for(;f.obj===void 0&&p.length;)u=`${p[p.length-1]}.${u}`,p=p.slice(0,p.length-1),f=xc(e,p,Object),f?.obj&&typeof f.obj[`${f.k}.${u}`]<"u"&&(f.obj=void 0);f.obj[`${f.k}.${u}`]=s},"setPath"),WR=r((e,t,s,l)=>{const{obj:c,k:u}=xc(e,t,Object);c[u]=c[u]||[],c[u].push(s)},"pushPath"),nf=r((e,t)=>{const{obj:s,k:l}=xc(e,t);if(s&&Object.prototype.hasOwnProperty.call(s,l))return s[l]},"getPath"),QR=r((e,t,s)=>{const l=nf(e,s);return l!==void 0?l:nf(t,s)},"getPathWithDefaults"),SN=r((e,t,s)=>{for(const l in t)l!=="__proto__"&&l!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,l)?nt(e[l])||e[l]instanceof String||nt(t[l])||t[l]instanceof String?s&&(e[l]=t[l]):SN(e[l],t[l],s):e[l]=t[l]);return e},"deepExtend"),_i=r(e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),"regexEscape"),GR={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},YR=r(e=>nt(e)?e.replace(/[&<>"'\/]/g,t=>GR[t]):e,"escape"),XR=class{static{r(this,"RegExpCache")}constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}},ZR=[" ",",","?","!",";"],JR=new XR(20),eM=r((e,t,s)=>{t=t||"",s=s||"";const l=ZR.filter(p=>!t.includes(p)&&!s.includes(p));if(l.length===0)return!0;const c=JR.getRegExp(`(${l.map(p=>p==="?"?"\\?":p).join("|")})`);let u=!c.test(e);if(!u){const p=e.indexOf(s);p>0&&!c.test(e.substring(0,p))&&(u=!0)}return u},"looksLikeObjectPath"),jg=r((e,t,s=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const l=t.split(s);let c=e;for(let u=0;u<l.length;){if(!c||typeof c!="object")return;let p,f="";for(let h=u;h<l.length;++h)if(h!==u&&(f+=s),f+=l[h],p=c[f],p!==void 0){if(["string","number","boolean"].includes(typeof p)&&h<l.length-1)continue;u+=h-u+1;break}c=p}return c},"deepFind"),Ec=r(e=>e?.replace(/_/g,"-"),"getCleanedCode"),tM={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}},nM=class wg{static{r(this,"Logger")}constructor(t,s={}){this.init(t,s)}init(t,s={}){this.prefix=s.prefix||"i18next:",this.logger=t||tM,this.options=s,this.debug=s.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,s,l,c){return c&&!this.debug?null:(t=t.map(u=>nt(u)?u.replace(/[\r\n\x00-\x1F\x7F]/g," "):u),nt(t[0])&&(t[0]=`${l}${this.prefix} ${t[0]}`),this.logger[s](t))}create(t){return new wg(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new wg(this.logger,t)}},Js=new nM,Bf=class{static{r(this,"EventEmitter")}constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const l=this.observers[s].get(t)||0;this.observers[s].set(t,l+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){const s=r((...l)=>{t(...l),this.off(e,s)},"wrapper");return this.on(e,s),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,l])=>{for(let c=0;c<l;c++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,l])=>{for(let c=0;c<l;c++)s(e,...t)})}},cj=class extends Bf{static{r(this,"ResourceStore")}constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s,l={}){const c=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,u=l.ignoreJSONStructure!==void 0?l.ignoreJSONStructure:this.options.ignoreJSONStructure;let p;e.includes(".")?p=e.split("."):(p=[e,t],s&&(Array.isArray(s)?p.push(...s):nt(s)&&c?p.push(...s.split(c)):p.push(s)));const f=nf(this.data,p);return!f&&!t&&!s&&e.includes(".")&&(e=p[0],t=p[1],s=p.slice(2).join(".")),f||!u||!nt(s)?f:jg(this.data?.[e]?.[t],s,c)}addResource(e,t,s,l,c={silent:!1}){const u=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let p=[e,t];s&&(p=p.concat(u?s.split(u):s)),e.includes(".")&&(p=e.split("."),l=t,t=p[1]),this.addNamespaces(t),oj(this.data,p,l),c.silent||this.emit("added",e,t,s,l)}addResources(e,t,s,l={silent:!1}){for(const c in s)(nt(s[c])||Array.isArray(s[c]))&&this.addResource(e,t,c,s[c],{silent:!0});l.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,l,c,u={silent:!1,skipCopy:!1}){let p=[e,t];e.includes(".")&&(p=e.split("."),l=s,s=t,t=p[1]),this.addNamespaces(t);let f=nf(this.data,p)||{};u.skipCopy||(s=JSON.parse(JSON.stringify(s))),l?SN(f,s,c):f={...f,...s},oj(this.data,p,f),u.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}},NN={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,l,c){return e.forEach(u=>{t=this.processors[u]?.process(t,s,l,c)??t}),t}},CN=Symbol("i18next/PATH_KEY");function aM(){const e=[],t=Object.create(null);let s;return t.get=(l,c)=>(s?.revoke?.(),c===CN?e:(e.push(c),s=Proxy.revocable(l,t),s.proxy)),Proxy.revocable(Object.create(null),t).proxy}r(aM,"createProxy");function ro(e,t){const{[CN]:s}=e(aM()),l=t?.keySeparator??".",c=t?.nsSeparator??":",u=t?.enableSelector==="strict";if(s.length>1&&c){const p=t?.ns,f=u?Array.isArray(p)?p:p?[p]:null:Array.isArray(p)?p:null;if(f&&(u?f:f.length>1?f.slice(1):[]).includes(s[0]))return`${s[0]}${c}${s.slice(1).join(l)}`}return s.join(l)}r(ro,"keysFromSelector");var lh=r(e=>!nt(e)&&typeof e!="boolean"&&typeof e!="number","shouldHandleAsObject"),uj=class AN extends Bf{static{r(this,"Translator")}constructor(t,s={}){super(),HR(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Js.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,s={interpolation:{}}){const l={...s};if(t==null)return!1;const c=this.resolve(t,l);if(c?.res===void 0)return!1;const u=lh(c.res);return!(l.returnObjects===!1&&u)}extractFromKey(t,s){let l=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let u=s.ns||this.options.defaultNS||[];const p=l&&t.includes(l),f=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!eM(t,l,c);if(p&&!f){const h=t.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:t,namespaces:nt(u)?[u]:u};const g=t.split(l);(l!==c||l===c&&this.options.ns.includes(g[0]))&&(u=g.shift()),t=g.join(c)}return{key:t,namespaces:nt(u)?[u]:u}}translate(t,s,l){let c=typeof s=="object"?{...s}:s;if(typeof c!="object"&&this.options.overloadTranslationOptionHandler&&(c=this.options.overloadTranslationOptionHandler(arguments)),typeof c=="object"&&(c={...c}),c||(c={}),t==null)return"";typeof t=="function"&&(t=ro(t,{...this.options,...c})),Array.isArray(t)||(t=[String(t)]),t=t.map(V=>typeof V=="function"?ro(V,{...this.options,...c}):String(V));const u=c.returnDetails!==void 0?c.returnDetails:this.options.returnDetails,p=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,{key:f,namespaces:h}=this.extractFromKey(t[t.length-1],c),g=h[h.length-1];let v=c.nsSeparator!==void 0?c.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const y=c.lng||this.language,j=c.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(y?.toLowerCase()==="cimode")return j?u?{res:`${g}${v}${f}`,usedKey:f,exactUsedKey:f,usedLng:y,usedNS:g,usedParams:this.getUsedParamsDetails(c)}:`${g}${v}${f}`:u?{res:f,usedKey:f,exactUsedKey:f,usedLng:y,usedNS:g,usedParams:this.getUsedParamsDetails(c)}:f;const k=this.resolve(t,c);let S=k?.res;const N=k?.usedKey||f,I=k?.exactUsedKey||f,C=["[object Number]","[object Function]","[object RegExp]"],M=c.joinArrays!==void 0?c.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject,_=c.count!==void 0&&!nt(c.count),D=AN.hasDefaultValue(c),U=_?this.pluralResolver.getSuffix(y,c.count,c):"",K=c.ordinal&&_?this.pluralResolver.getSuffix(y,c.count,{ordinal:!1}):"",z=_&&!c.ordinal&&c.count===0,E=z&&c[`defaultValue${this.options.pluralSeparator}zero`]||c[`defaultValue${U}`]||c[`defaultValue${K}`]||c.defaultValue;let B=S;R&&!S&&D&&(B=E);const O=lh(B),Q=Object.prototype.toString.apply(B);if(R&&B&&O&&!C.includes(Q)&&!(nt(M)&&Array.isArray(B))){if(!c.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const V=this.options.returnedObjectHandler?this.options.returnedObjectHandler(N,B,{...c,ns:h}):`key '${f} (${this.language})' returned an object instead of string.`;return u?(k.res=V,k.usedParams=this.getUsedParamsDetails(c),k):V}if(p){const V=Array.isArray(B),ue=V?[]:{},ce=V?I:N;for(const X in B)if(Object.prototype.hasOwnProperty.call(B,X)){const A=`${ce}${p}${X}`;D&&!S?ue[X]=this.translate(A,{...c,defaultValue:lh(E)?E[X]:void 0,joinArrays:!1,ns:h}):ue[X]=this.translate(A,{...c,joinArrays:!1,ns:h}),ue[X]===A&&(ue[X]=B[X])}S=ue}}else if(R&&nt(M)&&Array.isArray(S))S=S.join(M),S&&(S=this.extendTranslation(S,t,c,l));else{let V=!1,ue=!1;!this.isValidLookup(S)&&D&&(V=!0,S=E),this.isValidLookup(S)||(ue=!0,S=f);const ce=(c.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ue?void 0:S,X=D&&E!==S&&this.options.updateMissing;if(ue||V||X){if(this.logger.log(X?"updateKey":"missingKey",y,g,_&&!X?`${f}${this.pluralResolver.getSuffix(y,c.count,c)}`:f,X?E:S),p){const le=this.resolve(f,{...c,keySeparator:!1});le&&le.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let A=[];const ee=this.languageUtils.getFallbackCodes(this.options.fallbackLng,c.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ee&&ee[0])for(let le=0;le<ee.length;le++)A.push(ee[le]);else this.options.saveMissingTo==="all"?A=this.languageUtils.toResolveHierarchy(c.lng||this.language):A.push(c.lng||this.language);const ie=r((le,Ae,de)=>{const we=D&&de!==S?de:ce;this.options.missingKeyHandler?this.options.missingKeyHandler(le,g,Ae,we,X,c):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(le,g,Ae,we,X,c),this.emit("missingKey",le,g,Ae,S)},"send");this.options.saveMissing&&(this.options.saveMissingPlurals&&_?A.forEach(le=>{const Ae=this.pluralResolver.getSuffixes(le,c);z&&c[`defaultValue${this.options.pluralSeparator}zero`]&&!Ae.includes(`${this.options.pluralSeparator}zero`)&&Ae.push(`${this.options.pluralSeparator}zero`),Ae.forEach(de=>{ie([le],f+de,c[`defaultValue${de}`]||E)})}):ie(A,f,E))}S=this.extendTranslation(S,t,c,k,l),ue&&S===f&&this.options.appendNamespaceToMissingKey&&(S=`${g}${v}${f}`),(ue||V)&&this.options.parseMissingKeyHandler&&(S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${v}${f}`:f,V?S:void 0,c))}return u?(k.res=S,k.usedParams=this.getUsedParamsDetails(c),k):S}extendTranslation(t,s,l,c,u){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...l},l.lng||this.language||c.usedLng,c.usedNS,c.usedKey,{resolved:c});else if(!l.skipInterpolation){l.interpolation&&this.interpolator.init({...l,interpolation:{...this.options.interpolation,...l.interpolation}});const h=nt(t)&&(l?.interpolation?.skipOnVariables!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(h){const y=t.match(this.interpolator.nestingRegexp);g=y&&y.length}let v=l.replace&&!nt(l.replace)?l.replace:l;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),t=this.interpolator.interpolate(t,v,l.lng||this.language||c.usedLng,l),h){const y=t.match(this.interpolator.nestingRegexp),j=y&&y.length;g<j&&(l.nest=!1)}!l.lng&&c&&c.res&&(l.lng=this.language||c.usedLng),l.nest!==!1&&(t=this.interpolator.nest(t,(...y)=>u?.[0]===y[0]&&!l.context?(this.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${s[0]}`),null):this.translate(...y,s),l)),l.interpolation&&this.interpolator.reset()}const p=l.postProcess||this.options.postProcess,f=nt(p)?[p]:p;return t!=null&&f?.length&&l.applyPostProcessor!==!1&&(t=NN.handle(f,t,s,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...c,usedParams:this.getUsedParamsDetails(l)},...l}:l,this)),t}resolve(t,s={}){let l,c,u,p,f;return nt(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(h=>typeof h=="function"?ro(h,{...this.options,...s}):h)),t.forEach(h=>{if(this.isValidLookup(l))return;const g=this.extractFromKey(h,s),v=g.key;c=v;let y=g.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const j=s.count!==void 0&&!nt(s.count),k=j&&!s.ordinal&&s.count===0,S=s.context!==void 0&&(nt(s.context)||typeof s.context=="number")&&s.context!=="",N=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);y.forEach(I=>{this.isValidLookup(l)||(f=I,!this.checkedLoadedFor[`${N[0]}-${I}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(f)&&(this.checkedLoadedFor[`${N[0]}-${I}`]=!0,this.logger.warn(`key "${c}" for languages "${N.join(", ")}" won't get resolved as namespace "${f}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),N.forEach(C=>{if(this.isValidLookup(l))return;p=C;const M=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(M,v,C,I,s);else{let _;j&&(_=this.pluralResolver.getSuffix(C,s.count,s));const D=`${this.options.pluralSeparator}zero`,U=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(j&&(s.ordinal&&_.startsWith(U)&&M.push(v+_.replace(U,this.options.pluralSeparator)),M.push(v+_),k&&M.push(v+D)),S){const K=`${v}${this.options.contextSeparator||"_"}${s.context}`;M.push(K),j&&(s.ordinal&&_.startsWith(U)&&M.push(K+_.replace(U,this.options.pluralSeparator)),M.push(K+_),k&&M.push(K+D))}}let R;for(;R=M.pop();)this.isValidLookup(l)||(u=R,l=this.getResource(C,I,R,s))}))})}),{res:l,usedKey:c,exactUsedKey:u,usedLng:p,usedNS:f}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,s,l,c={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,s,l,c):this.resourceStore.getResource(t,s,l,c)}getUsedParamsDetails(t={}){const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],l=t.replace&&!nt(t.replace);let c=l?t.replace:t;if(l&&typeof t.count<"u"&&(c={...c,count:t.count}),this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),!l){c={...c};for(const u of s)delete c[u]}return c}static hasDefaultValue(t){const s="defaultValue";for(const l in t)if(Object.prototype.hasOwnProperty.call(t,l)&&l.startsWith(s)&&t[l]!==void 0)return!0;return!1}},dj=class{static{r(this,"LanguageUtil")}constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Js.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=Ec(e),!e||!e.includes("-"))return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=Ec(e),!e||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(nt(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(s=>{if(t)return;const l=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(l))&&(t=l)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const l=this.getScriptPartFromCode(s);if(this.isSupportedCode(l))return t=l;const c=this.getLanguagePartFromCode(s);if(this.isSupportedCode(c))return t=c;t=this.options.supportedLngs.find(u=>u===c?!0:!u.includes("-")&&!c.includes("-")?!1:!!(u.includes("-")&&!c.includes("-")&&u.slice(0,u.indexOf("-"))===c||u.startsWith(c)&&c.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),nt(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.options.fallbackLng,l=Array.isArray(s)?s.join("|"):s;l!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=l);const c=t===void 0||t===!1||nt(t),u=t===void 0&&typeof this.options.fallbackLng=="function",p=nt(e)&&c&&!u;let f=null;if(p){let y;t===void 0?y="undefined":t===!1?y="boolean:false":y=`string:${t}`,f=`${e.length}:${e}|${y}`}if(f!==null){const y=this.resolveHierarchyCache[f];if(y!==void 0)return y.slice()}const h=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),g=[],v=r(y=>{y&&(this.isSupportedCode(y)?g.push(y):this.logger.warn(`rejecting language code not found in supportedLngs: ${y}`))},"addCode");return nt(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&v(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&v(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&v(this.getLanguagePartFromCode(e))):nt(e)&&v(this.formatLanguageCode(e)),h.forEach(y=>{g.includes(y)||v(this.formatLanguageCode(y))}),f!==null?(this.resolveHierarchyCache[f]=g,g.slice()):g}},fj={zero:0,one:1,two:2,few:3,many:4,other:5},pj={select:r(e=>e===1?"one":"other","select"),resolvedOptions:r(()=>({pluralCategories:["one","other"]}),"resolvedOptions")},sM=class{static{r(this,"PluralResolver")}constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Js.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const s=Ec(e==="dev"?"en":e),l=t.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:s,type:l});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let u;try{u=new Intl.PluralRules(s,{type:l})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),pj;if(!e.match(/-|_/))return pj;const f=this.languageUtils.getLanguagePartFromCode(e);u=this.getRule(f,t)}return this.pluralRulesCache[c]=u,u}needsPlural(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,s={}){return this.getSuffixes(e,s).map(l=>`${t}${l}`)}getSuffixes(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?s.resolvedOptions().pluralCategories.sort((l,c)=>fj[l]-fj[c]).map(l=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${l}`):[]}getSuffix(e,t,s={}){const l=this.getRule(e,s);return l?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${l.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}},mj=r((e,t,s,l=".",c=!0)=>{let u=QR(e,t,s);return!u&&c&&nt(s)&&(u=jg(e,s,l),u===void 0&&(u=jg(t,s,l))),u},"deepFindWithDefaults"),hj=r(e=>e.replace(/\$/g,"$$$$"),"regexSafe"),gj=class{static{r(this,"Interpolator")}constructor(e={}){this.logger=Js.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(t=>t),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:l,prefix:c,prefixEscaped:u,suffix:p,suffixEscaped:f,formatSeparator:h,unescapeSuffix:g,unescapePrefix:v,nestingPrefix:y,nestingPrefixEscaped:j,nestingSuffix:k,nestingSuffixEscaped:S,nestingOptionsSeparator:N,maxReplaces:I,alwaysFormat:C}=e.interpolation;this.escape=t!==void 0?t:YR,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=l!==void 0?l:!1,this.prefix=c?_i(c):u||"{{",this.suffix=p?_i(p):f||"}}",this.formatSeparator=h||",",this.unescapePrefix=g?"":v?_i(v):"-",this.unescapeSuffix=this.unescapePrefix?"":g?_i(g):"",this.nestingPrefix=y?_i(y):j||_i("$t("),this.nestingSuffix=k?_i(k):S||_i(")"),this.nestingOptionsSeparator=N||",",this.maxReplaces=I||1e3,this.alwaysFormat=C!==void 0?C:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=r((t,s)=>t?.source===s?(t.lastIndex=0,t):new RegExp(s,"g"),"getOrResetRegExp");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,s,l){let c,u,p;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=r(y=>{if(!y.includes(this.formatSeparator)){const N=mj(t,f,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,s,{...l,...t,interpolationkey:y}):N}const j=y.split(this.formatSeparator),k=j.shift().trim(),S=j.join(this.formatSeparator).trim();return this.format(mj(t,f,k,this.options.keySeparator,this.options.ignoreJSONStructure),S,s,{...l,...t,interpolationkey:k})},"handleFormat");this.resetRegExp(),!this.escapeValue&&typeof e=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const g=l?.missingInterpolationHandler||this.options.missingInterpolationHandler,v=l?.interpolation?.skipOnVariables!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:r(y=>y,"safeValue")},{regex:this.regexp,safeValue:r(y=>this.escapeValue?this.escape(y):y,"safeValue")}].forEach(y=>{for(p=0;c=y.regex.exec(e);){const j=c[1].trim();if(u=h(j),u===void 0)if(typeof g=="function"){const S=g(e,c,l);u=nt(S)?S:""}else if(l&&Object.prototype.hasOwnProperty.call(l,j))u="";else if(v){u=c[0];continue}else this.logger.warn(`missed to pass in variable ${j} for interpolating ${e}`),u="";else!nt(u)&&!this.useRawValueToEscape&&(u=rh(u));const k=y.safeValue(u);if(e=e.replace(c[0],hj(k)),v?(y.regex.lastIndex+=k.length,y.regex.lastIndex-=c[0].length):y.regex.lastIndex=0,p++,p>=this.maxReplaces)break}}),e}nest(e,t,s={}){let l,c,u;const p=r((f,h)=>{const g=this.nestingOptionsSeparator;if(!f.includes(g))return f;const v=f.split(new RegExp(`${_i(g)}[ ]*{`));let y=`{${v[1]}`;f=v[0],y=this.interpolate(y,u);const j=y.match(/'/g),k=y.match(/"/g);((j?.length??0)%2===0&&!k||(k?.length??0)%2!==0)&&(y=y.replace(/'/g,'"'));try{u=JSON.parse(y),h&&(u={...h,...u})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,S),`${f}${g}${y}`}return u.defaultValue&&u.defaultValue.includes(this.prefix)&&delete u.defaultValue,f},"handleHasOptions");for(;l=this.nestingRegexp.exec(e);){let f=[];u={...s},u=u.replace&&!nt(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;const h=/{.*}/s.test(l[1])?l[1].lastIndexOf("}")+1:l[1].indexOf(this.formatSeparator);if(h!==-1&&(f=l[1].slice(h).split(this.formatSeparator).map(g=>g.trim()).filter(Boolean),l[1]=l[1].slice(0,h)),c=t(p.call(this,l[1].trim(),u),u),c&&l[0]===e&&!nt(c))return c;nt(c)||(c=rh(c)),c||(this.logger.warn(`missed to resolve ${l[1]} for nesting ${e}`),c=""),f.length&&(c=f.reduce((g,v)=>this.format(g,v,s.lng,{...s,interpolationkey:l[1].trim()}),c.trim())),e=e.replace(l[0],hj(rh(c))),this.regexp.lastIndex=0}return e}},iM=r(e=>{let t=e.toLowerCase().trim();const s={};if(e.includes("(")){const l=e.split("(");t=l[0].toLowerCase().trim();const c=l[1].slice(0,-1);t==="currency"&&!c.includes(":")?s.currency||(s.currency=c.trim()):t==="relativetime"&&!c.includes(":")?s.range||(s.range=c.trim()):c.split(";").forEach(u=>{if(u){const[p,...f]=u.split(":"),h=f.join(":").trim().replace(/^'+|'+$/g,""),g=p.trim();s[g]||(s[g]=h),h==="false"&&(s[g]=!1),h==="true"&&(s[g]=!0),isNaN(h)||(s[g]=parseInt(h,10))}})}return{formatName:t,formatOptions:s}},"parseFormatStr"),xj=r(e=>{const t={};return(s,l,c)=>{let u=c;c&&c.interpolationkey&&c.formatParams&&c.formatParams[c.interpolationkey]&&c[c.interpolationkey]&&(u={...u,[c.interpolationkey]:void 0});const p=l+JSON.stringify(u);let f=t[p];return f||(f=e(Ec(l),c),t[p]=f),f(s)}},"createCachedFormatter"),rM=r(e=>(t,s,l)=>e(Ec(s),l)(t),"createNonCachedFormatter"),lM=class{static{r(this,"Formatter")}constructor(e={}){this.logger=Js.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const s=t.cacheInBuiltFormats?xj:rM;this.formats={number:s((l,c)=>{const u=new Intl.NumberFormat(l,{...c});return p=>u.format(p)}),currency:s((l,c)=>{const u=new Intl.NumberFormat(l,{...c,style:"currency"});return p=>u.format(p)}),datetime:s((l,c)=>{const u=new Intl.DateTimeFormat(l,{...c});return p=>u.format(p)}),relativetime:s((l,c)=>{const u=new Intl.RelativeTimeFormat(l,{...c});return p=>u.format(p,c.range||"day")}),list:s((l,c)=>{const u=new Intl.ListFormat(l,{...c});return p=>u.format(p)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=xj(t)}format(e,t,s,l={}){if(!t||e==null)return e;const c=t.split(this.formatSeparator),u=[];for(let p=0;p<c.length;p++){let f=c[p];for(;f.indexOf("(")>-1&&!f.includes(")")&&p+1<c.length;)f=`${f}${this.formatSeparator}${c[++p]}`;u.push(f)}return u.reduce((p,f)=>{const{formatName:h,formatOptions:g}=iM(f);if(this.formats[h]){let v=p;try{const y=l?.formatParams?.[l.interpolationkey]||{},j=y.locale||y.lng||l.locale||l.lng||s;v=this.formats[h](p,j,{...g,...l,...y})}catch(y){this.logger.warn(y)}return v}else this.logger.warn(`there was no format function for ${h}`);return p},e)}},oM=r((e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},"removePending"),cM=class extends Bf{static{r(this,"Connector")}constructor(e,t,s,l={}){super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=l,this.logger=Js.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=l.maxParallelReads||10,this.readingCalls=0,this.maxRetries=l.maxRetries>=0?l.maxRetries:5,this.retryTimeout=l.retryTimeout>=1?l.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,l.backend,l)}queueLoad(e,t,s,l){const c={},u={},p={},f={};return e.forEach(h=>{let g=!0;t.forEach(v=>{const y=`${h}|${v}`;!s.reload&&this.store.hasResourceBundle(h,v)?this.state[y]=2:this.state[y]<0||(this.state[y]===1?u[y]===void 0&&(u[y]=!0):(this.state[y]=1,g=!1,u[y]===void 0&&(u[y]=!0),c[y]===void 0&&(c[y]=!0),f[v]===void 0&&(f[v]=!0)))}),g||(p[h]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:l}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(f)}}loaded(e,t,s){const l=e.split("|"),c=l[0],u=l[1];t&&this.emit("failedLoading",c,u,t),!t&&s&&this.store.addResourceBundle(c,u,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const p={};this.queue.forEach(f=>{WR(f.loaded,[c],u),oM(f,e),t&&f.errors.push(t),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(h=>{p[h]||(p[h]={});const g=f.loaded[h];g.length&&g.forEach(v=>{p[h][v]===void 0&&(p[h][v]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",p),this.queue=this.queue.filter(f=>!f.done)}read(e,t,s,l=0,c=this.retryTimeout,u){if(!e.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:l,wait:c,callback:u});return}this.readingCalls++;const p=r((h,g)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(h&&g&&l<this.maxRetries){setTimeout(()=>{this.read(e,t,s,l+1,c*2,u)},c);return}u(h,g)},"resolver"),f=this.backend[s].bind(this.backend);if(f.length===2){try{const h=f(e,t);h&&typeof h.then=="function"?h.then(g=>p(null,g)).catch(p):p(null,h)}catch(h){p(h)}return}return f(e,t,p)}prepareLoading(e,t,s={},l){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();nt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),nt(t)&&(t=[t]);const c=this.queueLoad(e,t,s,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(u=>{this.loadOne(u)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){const s=e.split("|"),l=s[0],c=s[1];this.read(l,c,"read",void 0,void 0,(u,p)=>{u&&this.logger.warn(`${t}loading namespace ${c} for language ${l} failed`,u),!u&&p&&this.logger.log(`${t}loaded namespace ${c} for language ${l}`,p),this.loaded(e,u,p)})}saveMissing(e,t,s,l,c,u={},p=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if(this.backend?.create){const f={...u,isUpdate:c},h=this.backend.create.bind(this.backend);if(h.length<6)try{let g;h.length===5?g=h(e,t,s,l,f):g=h(e,t,s,l),g&&typeof g.then=="function"?g.then(v=>p(null,v)).catch(p):p(null,g)}catch(g){p(g)}else h(e,t,s,l,p,f)}!e||!e[0]||this.store.addResource(e[0],t,s,l)}}},oh=r(()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r(e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),nt(e[1])&&(t.defaultValue=e[1]),nt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const s=e[3]||e[2];Object.keys(s).forEach(l=>{t[l]=s[l]})}return t},"overloadTranslationOptionHandler"),interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),"get"),bj=r(e=>(nt(e.ns)&&(e.ns=[e.ns]),nt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),nt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),"transformOptions"),ud=r(()=>{},"noop$1"),uM=r(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]=="function"&&(e[t]=e[t].bind(e))})},"bindMemberFunctions"),dM=class Ld extends Bf{static{r(this,"I18n")}constructor(t={},s){if(super(),this.options=bj(t),this.services={},this.logger=Js,this.modules={external:[]},uM(this),s&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,s),this;setTimeout(()=>{this.init(t,s)},0)}}init(t={},s){this.isInitializing=!0,typeof t=="function"&&(s=t,t={}),t.defaultNS==null&&t.ns&&(nt(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const l=oh();this.options={...l,...this.options,...bj(t)},this.options.interpolation={...l.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=l.overloadTranslationOptionHandler);const c=r(f=>f?typeof f=="function"?new f:f:null,"createClassOnDemand");if(!this.options.isClone){this.modules.logger?Js.init(c(this.modules.logger),this.options):Js.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:f=lM;const h=new dj(this.options);this.store=new cj(this.options.resources,this.options);const g=this.services;g.logger=Js,g.resourceStore=this.store,g.languageUtils=h,g.pluralResolver=new sM(h,{prepend:this.options.pluralSeparator}),f&&(g.formatter=c(f),g.formatter.init&&g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new gj(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new cM(c(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",(v,...y)=>{this.emit(v,...y)}),this.modules.languageDetector&&(g.languageDetector=c(this.modules.languageDetector),g.languageDetector.init&&g.languageDetector.init(g,this.options.detection,this.options)),this.modules.i18nFormat&&(g.i18nFormat=c(this.modules.i18nFormat),g.i18nFormat.init&&g.i18nFormat.init(this)),this.translator=new uj(this.services,this.options),this.translator.on("*",(v,...y)=>{this.emit(v,...y)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,s||(s=ud),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=(...h)=>this.store[f](...h)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=(...h)=>(this.store[f](...h),this)});const u=cc(),p=r(()=>{const f=r((h,g)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(g),s(h,g)},"finish");if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)},"load");return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),u}loadResources(t,s=ud){let l=s;const c=nt(t)?t:this.language;if(typeof t=="function"&&(l=t),!this.options.resources||this.options.partialBundledLanguages){if(c?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return l();const u=[],p=r(f=>{f&&f!=="cimode"&&this.services.languageUtils.toResolveHierarchy(f).forEach(h=>{h!=="cimode"&&(u.includes(h)||u.push(h))})},"append");c?p(c):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>p(f)),this.options.preload?.forEach?.(f=>p(f)),this.services.backendConnector.load(u,this.options.ns,f=>{!f&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),l(f)})}else l(null)}reloadResources(t,s,l){const c=cc();return typeof t=="function"&&(l=t,t=void 0),typeof s=="function"&&(l=s,s=void 0),t||(t=this.languages),s||(s=this.options.ns),l||(l=ud),this.services.backendConnector.reload(t,s,u=>{c.resolve(),l(u)}),c}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&NN.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let s=0;s<this.languages.length;s++){const l=this.languages[s];if(!["cimode","dev"].includes(l)&&this.store.hasLanguageSomeTranslations(l)){this.resolvedLanguage=l;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,s){this.isLanguageChangingTo=t;const l=cc();this.emit("languageChanging",t);const c=r(f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},"setLngProps"),u=r((f,h)=>{h?this.isLanguageChangingTo===t&&(c(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,l.resolve((...g)=>this.t(...g)),s&&s(f,(...g)=>this.t(...g))},"done"),p=r(f=>{!t&&!f&&this.services.languageDetector&&(f=[]);const h=nt(f)?f:f&&f[0],g=this.store.hasLanguageSomeTranslations(h)?h:this.services.languageUtils.getBestMatchFromCodes(nt(f)?[f]:f);g&&(this.language||c(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector?.cacheUserLanguage?.(g)),this.loadResources(g,v=>{u(v,g)})},"setLng");return!t&&this.services.languageDetector&&!this.services.languageDetector.async?p(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(p):this.services.languageDetector.detect(p):p(t),l}getFixedT(t,s,l,c){const u=c?.scopeNs,p=r((f,h,...g)=>{let v;typeof h!="object"?v=this.options.overloadTranslationOptionHandler([f,h].concat(g)):v={...h},v.lng=v.lng||p.lng,v.lngs=v.lngs||p.lngs;const y=v.ns!==void 0&&v.ns!==null;v.ns=v.ns||p.ns,v.keyPrefix!==""&&(v.keyPrefix=v.keyPrefix||l||p.keyPrefix);const j={...this.options,...v};Array.isArray(u)&&!y&&(j.ns=u),typeof v.keyPrefix=="function"&&(v.keyPrefix=ro(v.keyPrefix,j));const k=this.options.keySeparator||".";let S;return v.keyPrefix&&Array.isArray(f)?S=f.map(N=>(typeof N=="function"&&(N=ro(N,j)),`${v.keyPrefix}${k}${N}`)):(typeof f=="function"&&(f=ro(f,j)),S=v.keyPrefix?`${v.keyPrefix}${k}${f}`:f),this.t(S,v)},"fixedT");return nt(t)?p.lng=t:p.lngs=t,p.ns=s,p.keyPrefix=l,p}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,s={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const l=s.lng||this.resolvedLanguage||this.languages[0],c=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(l.toLowerCase()==="cimode")return!0;const p=r((f,h)=>{const g=this.services.backendConnector.state[`${f}|${h}`];return g===-1||g===0||g===2},"loadNotPending");if(s.precheck){const f=s.precheck(this,p);if(f!==void 0)return f}return!!(this.hasResourceBundle(l,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||p(l,t)&&(!c||p(u,t)))}loadNamespaces(t,s){const l=cc();return this.options.ns?(nt(t)&&(t=[t]),t.forEach(c=>{this.options.ns.includes(c)||this.options.ns.push(c)}),this.loadResources(c=>{l.resolve(),s&&s(c)}),l):(s&&s(),Promise.resolve())}loadLanguages(t,s){const l=cc();nt(t)&&(t=[t]);const c=this.options.preload||[],u=t.filter(p=>!c.includes(p)&&this.services.languageUtils.isSupportedCode(p));return u.length?(this.options.preload=c.concat(u),this.loadResources(p=>{l.resolve(),s&&s(p)}),l):(s&&s(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const c=new Intl.Locale(t);if(c&&c.getTextInfo){const u=c.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],l=this.services?.languageUtils||new dj(oh());return t.toLowerCase().indexOf("-latn")>1?"ltr":s.includes(l.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},s){const l=new Ld(t,s);return l.createInstance=Ld.createInstance,l}cloneInstance(t={},s=ud){const l=t.forkResourceStore;l&&delete t.forkResourceStore;const c={...this.options,...t,isClone:!0},u=new Ld(c);if((t.debug!==void 0||t.prefix!==void 0)&&(u.logger=u.logger.clone(t)),["store","services","language"].forEach(p=>{u[p]=this[p]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},l){const p=Object.keys(this.store.data).reduce((f,h)=>(f[h]={...this.store.data[h]},f[h]=Object.keys(f[h]).reduce((g,v)=>(g[v]={...f[h][v]},g),f[h]),f),{});u.store=new cj(p,c),u.services.resourceStore=u.store}if(t.interpolation){const p={...oh().interpolation,...this.options.interpolation,...t.interpolation},f={...c,interpolation:p};u.services.interpolator=new gj(f)}return u.translator=new uj(u.services,c),u.translator.on("*",(p,...f)=>{u.emit(p,...f)}),u.init(c,s),u.translator.options=c,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},Da=dM.createInstance(),nG=Da.createInstance,aG=Da.dir,sG=Da.init,iG=Da.loadResources,rG=Da.reloadResources,lG=Da.use,oG=Da.changeLanguage,cG=Da.getFixedT,uG=Da.t,dG=Da.exists,fG=Da.setDefaultNamespace,pG=Da.hasLoadedNamespace,mG=Da.loadNamespaces,hG=Da.loadLanguages,fM=r((e,t,s,l)=>{const c=[s,{code:t,...l||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(c,"warn","react-i18next::",!0);Yr(c[0])&&(c[0]=`react-i18next:: ${c[0]}`),e?.services?.logger?.warn&&e.services.logger.warn(...c)},"warn"),vj={},zd=r((e,t,s,l)=>{Yr(s)&&vj[s]||(Yr(s)&&(vj[s]=new Date),fM(e,t,s,l))},"warnOnce"),_N=r((e,t)=>()=>{if(e.isInitialized)t();else{const s=r(()=>{setTimeout(()=>{e.off("initialized",s)},0),t()},"initialized");e.on("initialized",s)}},"loadedClb"),kg=r((e,t,s)=>{e.loadNamespaces(t,_N(e,s))},"loadNamespaces"),yj=r((e,t,s,l)=>{if(Yr(s)&&(s=[s]),e.options.preload&&e.options.preload.indexOf(t)>-1)return kg(e,s,l);s.forEach(c=>{e.options.ns.indexOf(c)<0&&e.options.ns.push(c)}),e.loadLanguages(t,_N(e,l))},"loadLanguages"),pM=r((e,t,s={})=>!t.languages||!t.languages.length?(zd(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:s.lng,precheck:r((l,c)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&l.services.backendConnector.backend&&l.isLanguageChangingTo&&!c(l.isLanguageChangingTo,e))return!1},"precheck")}),"hasLoadedNamespace"),Yr=r(e=>typeof e=="string","isString"),mM=r(e=>typeof e=="object"&&e!==null,"isObject"),hM=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,gM={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},xM=r(e=>gM[e],"unescapeHtmlEntity"),bM=r(e=>e.replace(hM,xM),"unescape"),Sg={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:bM,transDefaultProps:void 0},vM=r((e={})=>{Sg={...Sg,...e}},"setDefaults"),yM=r(()=>Sg,"getDefaults"),EN,jM=r(e=>{EN=e},"setI18n"),wM=r(()=>EN,"getI18n"),kM={type:"3rdParty",init(e){vM(e.options.react),jM(e)}},SM=(0,x.createContext)(),NM=class{static{r(this,"ReportNamespaces")}constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},CM=go((e=>{var t=v0();function s(j,k){return j===k&&(j!==0||1/j===1/k)||j!==j&&k!==k}r(s,"is");var l=typeof Object.is=="function"?Object.is:s,c=t.useState,u=t.useEffect,p=t.useLayoutEffect,f=t.useDebugValue;function h(j,k){var S=k(),N=c({inst:{value:S,getSnapshot:k}}),I=N[0].inst,C=N[1];return p(function(){I.value=S,I.getSnapshot=k,g(I)&&C({inst:I})},[j,S,k]),u(function(){return g(I)&&C({inst:I}),j(function(){g(I)&&C({inst:I})})},[j]),f(S),S}r(h,"useSyncExternalStore$2");function g(j){var k=j.getSnapshot;j=j.value;try{var S=k();return!l(j,S)}catch{return!0}}r(g,"checkIfSnapshotChanged");function v(j,k){return k()}r(v,"useSyncExternalStore$1");var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:h;e.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y})),AM=go(((e,t)=>{t.exports=CM()})),_M=AM(),EM=r((e,t)=>{if(Yr(t))return t;if(mM(t)&&Yr(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const s=e[e.length-1];return typeof s=="function"?"":s}return e},"notReadyT"),IM={t:EM,ready:!1},TM=r(()=>()=>{},"dummySubscribe"),RM=r((e,t={})=>{const{i18n:s}=t,{i18n:l,defaultNS:c}=(0,x.useContext)(SM)||{},u=s||l||wM();u&&!u.reportNamespaces&&(u.reportNamespaces=new NM),u||zd(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const p=(0,x.useMemo)(()=>({...yM(),...u?.options?.react,...t}),[u,t]),{useSuspense:f,keyPrefix:h}=p,g=e||c||u?.options?.defaultNS,v=Yr(g)?[g]:g||["translation"],y=(0,x.useMemo)(()=>v,v);u?.reportNamespaces?.addUsedNamespaces?.(y);const j=(0,x.useRef)(0),k=(0,x.useCallback)(B=>{if(!u)return TM;const{bindI18n:O,bindI18nStore:Q}=p,V=r(()=>{j.current+=1,B()},"wrappedCallback");return O&&u.on(O,V),Q&&u.store.on(Q,V),()=>{O&&O.split(" ").forEach(ue=>u.off(ue,V)),Q&&Q.split(" ").forEach(ue=>u.store.off(ue,V))}},[u,p]),S=(0,x.useRef)(),N=(0,x.useCallback)(()=>{if(!u)return IM;const B=!!(u.isInitialized||u.initializedStoreOnce)&&y.every(ce=>pM(ce,u,p)),O=t.lng||u.language,Q=j.current,V=S.current;if(V&&V.ready===B&&V.lng===O&&V.keyPrefix===h&&V.revision===Q)return V;const ue={t:u.getFixedT(O,p.nsMode==="fallback"?y:y[0],h,{scopeNs:y}),ready:B,lng:O,keyPrefix:h,revision:Q};return S.current=ue,ue},[u,y,h,p,t.lng]),[I,C]=(0,x.useState)(0),{t:M,ready:R}=(0,_M.useSyncExternalStore)(k,N,N);(0,x.useEffect)(()=>{if(u&&!R&&!f){const B=r(()=>C(O=>O+1),"onLoaded");t.lng?yj(u,t.lng,y,B):kg(u,y,B)}},[u,t.lng,y,R,f,I]);const _=u||{},D=(0,x.useRef)(null),U=(0,x.useRef)(),K=r(B=>`${B.language}|${B.resolvedLanguage}|${B.languages?.join(",")}`,"languageKey"),z=r(B=>{const O=Object.getOwnPropertyDescriptors(B);O.__original&&delete O.__original;const Q=Object.create(Object.getPrototypeOf(B),O);if(!Object.prototype.hasOwnProperty.call(Q,"__original"))try{Object.defineProperty(Q,"__original",{value:B,writable:!1,enumerable:!1,configurable:!1})}catch{}return Q},"createI18nWrapper"),E=(0,x.useMemo)(()=>{const B=_,O=B&&K(B);let Q=B;B&&(D.current&&D.current.__original===B?U.current!==O?(Q=z(B),D.current=Q,U.current=O):Q=D.current:(Q=z(B),D.current=Q,U.current=O));const V=!R&&!f?(...ce)=>(zd(u,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),M(...ce)):M,ue=[V,Q,R];return ue.t=V,ue.i18n=Q,ue.ready=R,ue},[M,_,R,_.resolvedLanguage,_.language,_.languages]);if(u&&f&&!R){let B=!1;try{B=!1}catch{}throw B&&zd(u,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),new Promise(O=>{const Q=r(()=>O(),"onLoaded");t.lng?yj(u,t.lng,y,Q):kg(u,y,Q)})}return E},"useTranslation$1"),MM={noCompanies:{title:"أنشئ شركتك الأولى",description:"ابدأ بإنشاء شركة.",newCompany:"شركة جديدة"}},DM={app:MM},OM={noCompanies:{title:"আপনার প্রথম কোম্পানি তৈরি করুন",description:"একটি কোম্পানি তৈরি করে শুরু করুন।",newCompany:"নতুন কোম্পানি"}},LM={app:OM},zM={noCompanies:{title:"Vytvořte svou první společnost",description:"Začněte vytvořením společnosti.",newCompany:"Nová společnost"}},PM={app:zM},$M={noCompanies:{title:"Opret din første virksomhed",description:"Kom i gang ved at oprette en virksomhed.",newCompany:"Ny virksomhed"}},UM={app:$M},BM={noCompanies:{title:"Erstellen Sie Ihr erstes Unternehmen",description:"Beginnen Sie, indem Sie ein Unternehmen erstellen.",newCompany:"Neues Unternehmen"}},KM={app:BM},qM={noCompanies:{title:"Δημιουργήστε την πρώτη σας εταιρεία",description:"Ξεκινήστε δημιουργώντας μια εταιρεία.",newCompany:"Νέα εταιρεία"}},FM={app:qM},HM={noCompanies:{title:"Create your first organization",description:"Get started by creating an organization.",newCompany:"New Organization"}},W0={app:HM},VM={noCompanies:{title:"Crea tu primera empresa",description:"Comienza creando una empresa.",newCompany:"Nueva empresa"}},WM={app:VM},QM={noCompanies:{title:"اولین شرکت خود را ایجاد کنید",description:"با ایجاد یک شرکت شروع کنید.",newCompany:"شرکت جدید"}},GM={app:QM},YM={noCompanies:{title:"Luo ensimmäinen yrityksesi",description:"Aloita luomalla yritys.",newCompany:"Uusi yritys"}},XM={app:YM},ZM={noCompanies:{title:"Gumawa ng iyong unang kumpanya",description:"Magsimula sa paggawa ng kumpanya.",newCompany:"Bagong Kumpanya"}},JM={app:ZM},eD={noCompanies:{title:"Créez votre première entreprise",description:"Commencez par créer une entreprise.",newCompany:"Nouvelle entreprise"}},tD={app:eD},nD={noCompanies:{title:"צרו את החברה הראשונה שלכם",description:"התחילו ביצירת חברה.",newCompany:"חברה חדשה"}},aD={app:nD},sD={noCompanies:{title:"अपनी पहली कंपनी बनाएं",description:"कंपनी बनाकर शुरुआत करें.",newCompany:"नई कंपनी"}},iD={app:sD},rD={noCompanies:{title:"Hozza létre első vállalatát",description:"Kezdje egy vállalat létrehozásával.",newCompany:"Új vállalat"}},lD={app:rD},oD={noCompanies:{title:"Buat perusahaan pertama Anda",description:"Mulai dengan membuat perusahaan.",newCompany:"Perusahaan Baru"}},cD={app:oD},uD={noCompanies:{title:"Crea la tua prima azienda",description:"Inizia creando un'azienda.",newCompany:"Nuova azienda"}},dD={app:uD},fD={noCompanies:{title:"最初の会社を作成",description:"会社を作成して始めましょう。",newCompany:"新しい会社"}},pD={app:fD},mD={noCompanies:{title:"첫 회사를 만드세요",description:"회사를 만들어 시작하세요.",newCompany:"새 회사"}},hD={app:mD},gD={noCompanies:{title:"तुमची पहिली कंपनी तयार करा",description:"कंपनी तयार करून सुरुवात करा.",newCompany:"नवीन कंपनी"}},xD={app:gD},bD={noCompanies:{title:"Cipta syarikat pertama anda",description:"Mulakan dengan mencipta syarikat.",newCompany:"Syarikat Baharu"}},vD={app:bD},yD={noCompanies:{title:"Opprett ditt første selskap",description:"Kom i gang ved å opprette et selskap.",newCompany:"Nytt selskap"}},jD={app:yD},wD={noCompanies:{title:"Maak uw eerste bedrijf aan",description:"Begin door een bedrijf aan te maken.",newCompany:"Nieuw bedrijf"}},kD={app:wD},SD={noCompanies:{title:"ਆਪਣੀ ਪਹਿਲੀ ਕੰਪਨੀ ਬਣਾਓ",description:"ਕੰਪਨੀ ਬਣਾਕੇ ਸ਼ੁਰੂ ਕਰੋ।",newCompany:"ਨਵੀਂ ਕੰਪਨੀ"}},ND={app:SD},CD={noCompanies:{title:"Utwórz swoją pierwszą firmę",description:"Zacznij od utworzenia firmy.",newCompany:"Nowa firma"}},AD={app:CD},_D={noCompanies:{title:"Crie sua primeira empresa",description:"Comece criando uma empresa.",newCompany:"Nova empresa"}},ED={app:_D},ID={noCompanies:{title:"Crie a sua primeira empresa",description:"Comece por criar uma empresa.",newCompany:"Nova empresa"}},TD={app:ID},RD={noCompanies:{title:"Creați prima companie",description:"Începeți prin crearea unei companii.",newCompany:"Companie nouă"}},MD={app:RD},DD={noCompanies:{title:"Создайте свою первую компанию",description:"Начните с создания компании.",newCompany:"Новая компания"}},OD={app:DD},LD={noCompanies:{title:"Skapa ditt första företag",description:"Kom igång genom att skapa ett företag.",newCompany:"Nytt företag"}},zD={app:LD},PD={noCompanies:{title:"Unda kampuni yako ya kwanza",description:"Anza kwa kuunda kampuni.",newCompany:"Kampuni Mpya"}},$D={app:PD},UD={noCompanies:{title:"உங்கள் முதல் நிறுவனத்தை உருவாக்குங்கள்",description:"ஒரு நிறுவனத்தை உருவாக்கி தொடங்குங்கள்.",newCompany:"புதிய நிறுவனம்"}},BD={app:UD},KD={noCompanies:{title:"మీ మొదటి కంపెనీని సృష్టించండి",description:"కంపెనీని సృష్టించడం ద్వారా ప్రారంభించండి.",newCompany:"కొత్త కంపెనీ"}},qD={app:KD},FD={noCompanies:{title:"สร้างบริษัทแรกของคุณ",description:"เริ่มต้นด้วยการสร้างบริษัท",newCompany:"บริษัทใหม่"}},HD={app:FD},VD={noCompanies:{title:"İlk şirketinizi oluşturun",description:"Bir şirket oluşturarak başlayın.",newCompany:"Yeni Şirket"}},WD={app:VD},QD={noCompanies:{title:"Створіть свою першу компанію",description:"Почніть зі створення компанії.",newCompany:"Нова компанія"}},GD={app:QD},YD={noCompanies:{title:"اپنی پہلی کمپنی بنائیں",description:"کمپنی بنا کر شروع کریں۔",newCompany:"نئی کمپنی"}},XD={app:YD},ZD={noCompanies:{title:"Tạo công ty đầu tiên của bạn",description:"Bắt đầu bằng cách tạo một công ty.",newCompany:"Công ty mới"}},JD={app:ZD},e5={noCompanies:{title:"创建您的第一家公司",description:"通过创建公司开始。",newCompany:"新公司"}},t5={app:e5},n5={noCompanies:{title:"建立您的第一家公司",description:"從建立公司開始。",newCompany:"新公司"}},a5={app:n5},s5=2e3;function jj(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}r(jj,"isPlainObject");function lr(e){return e.length>0?e.join("."):"<root>"}r(lr,"formatPath");function wj(e){return Array.from(e.matchAll(/{{\s*([A-Za-z0-9_.-]+)\s*}}/g),t=>t[1]).sort()}r(wj,"interpolationPlaceholders");function kj(e){return/<\/?[A-Za-z][A-Za-z0-9:-]*(?:\s[^>]*)?>/.test(e)}r(kj,"hasRawHtml");function Sj(e){return/\son[A-Za-z]+\s*=/i.test(e)}r(Sj,"hasEventHandlerAttribute");function Nj(e){return Array.from(e.matchAll(/\bhttps?:\/\/[^\s<>"')]+/gi),t=>t[0]).sort()}r(Nj,"urlsIn");function i5(e,t){const s=[[/<script\b/i.test(e),/<script\b/i.test(t),"<script"],[Sj(e),Sj(t),"event-handler attribute"],[/\bjavascript\s*:/i.test(e),/\bjavascript\s*:/i.test(t),"javascript:"],[/\bdata\s*:/i.test(e),/\bdata\s*:/i.test(t),"data:"],[kj(e),kj(t),"raw HTML tag"]].filter(([c,u])=>c&&!u).map(([,,c])=>c),l=new Set(Nj(t));return Nj(e).find(c=>!l.has(c))&&s.push("unexpected URL"),s}r(i5,"hasBlockedData");function r5(e,t,s,l){const c=wj(t),u=wj(s);c.join("\0")!==u.join("\0")&&l.push(`${lr(e)} interpolation placeholders must match English exactly: expected ${JSON.stringify(u)}, received ${JSON.stringify(c)}`);for(const h of i5(t,s))l.push(`${lr(e)} contains disallowed ${h}`);const p=Math.max(s.length*4+64,s.length+128),f=Math.min(s5,p);t.length>f&&l.push(`${lr(e)} is too long: ${t.length} characters exceeds ${f}`)}r(r5,"validateString");function IN(e,t,s,l){if(typeof s=="string"){if(typeof t!="string"){l.push(`${lr(e)} must be a string`);return}r5(e,t,s,l);return}if(!jj(s)){l.push(`${lr(e)} has unsupported English reference type`);return}if(!jj(t)){l.push(`${lr(e)} must be an object`);return}const c=Object.keys(s).sort(),u=Object.keys(t).sort(),p=c.filter(h=>!u.includes(h)),f=u.filter(h=>!c.includes(h));for(const h of p)l.push(`${lr([...e,h])} is missing`);for(const h of f)l.push(`${lr([...e,h])} is not defined in English`);for(const h of c)h in t&&IN([...e,h],t[h],s[h],l)}r(IN,"validateNode");function l5(e,t=W0){const s=[];return IN([],e,t,s),s}r(l5,"validateLocaleMessages");function o5(e,t=W0){const s=l5(e,t);if(s.length>0)throw new Error(`Invalid locale messages:
|
|
3
|
+
${s.join(`
|
|
4
|
+
`)}`)}r(o5,"assertValidLocaleMessages");var c5=Object.assign({"./locales/ar.json":DM,"./locales/bn.json":LM,"./locales/cs.json":PM,"./locales/da.json":UM,"./locales/de.json":KM,"./locales/el.json":FM,"./locales/en.json":W0,"./locales/es.json":WM,"./locales/fa.json":GM,"./locales/fi.json":XM,"./locales/fil.json":JM,"./locales/fr.json":tD,"./locales/he.json":aD,"./locales/hi.json":iD,"./locales/hu.json":lD,"./locales/id.json":cD,"./locales/it.json":dD,"./locales/ja.json":pD,"./locales/ko.json":hD,"./locales/mr.json":xD,"./locales/ms.json":vD,"./locales/nb.json":jD,"./locales/nl.json":kD,"./locales/pa.json":ND,"./locales/pl.json":AD,"./locales/pt-BR.json":ED,"./locales/pt-PT.json":TD,"./locales/ro.json":MD,"./locales/ru.json":OD,"./locales/sv.json":zD,"./locales/sw.json":$D,"./locales/ta.json":BD,"./locales/te.json":qD,"./locales/th.json":HD,"./locales/tr.json":WD,"./locales/uk.json":GD,"./locales/ur.json":XD,"./locales/vi.json":JD,"./locales/zh-CN.json":t5,"./locales/zh-TW.json":a5}),Kf=Object.fromEntries(Object.entries(c5).map(([e,t])=>{const s=e.match(/\/([A-Za-z0-9_-]+)\.json$/)?.[1];if(!s)throw new Error(`Invalid locale file path: ${e}`);return[s,t]}));if(!("en"in Kf))throw new Error("Missing default locale messages for en");for(const[e,t]of Object.entries(Kf))try{o5(t)}catch(s){const l=s instanceof Error?s.message:String(s);throw new Error(`Invalid ${e} locale messages: ${l}`)}var u5=Object.keys(Kf),d5=Object.fromEntries(Object.entries(Kf).map(([e,t])=>[e,{translation:t}])),f5={resources:d5,lng:"en",fallbackLng:"en",supportedLngs:u5,defaultNS:"translation",interpolation:{escapeValue:!1},returnObjects:!1,initAsync:!1};Da.use(kM).init(f5).catch(e=>{});var TN=RM,a=g0(TE(),1);function Cj({collapsible:e,headerAction:t,label:s,menu:l}){const{isMobile:c}=Jn(),[u,p]=(0,x.useState)(!1),f=!!(l&&((l.actions?.length??0)>0||(l.radioChoices?.length??0)>0)),h="text-(length:--text-nano) font-medium uppercase tracking-widest font-mono text-ink-3/60",g=c?"opacity-100":"opacity-0 group-hover/sidebar-section:opacity-100 group-focus-within/sidebar-section:opacity-100",v=Y("h-3 w-3 shrink-0 text-ink-3/60 transition-all",g,e?.open&&"rotate-90",u&&"opacity-100"),y=Y("h-5 w-5 shrink-0 text-ink-3/60 transition-opacity hover:text-ink data-[state=open]:opacity-100",g),j=(0,a.jsx)("span",{className:h,children:s}),k=t?.icon,S=f?(0,a.jsxs)(tl,{open:u,onOpenChange:p,children:[(0,a.jsx)(Jr,{asChild:!0,children:(0,a.jsx)("button",{type:"button","data-slot":"icon-button",className:Y("inline-flex min-w-0 max-w-full items-center rounded-md px-1 py-0.5 text-left outline-none transition-colors","hover:bg-bg-3/50 focus-visible:bg-bg-3/50 focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1",u&&"bg-bg-3/50"),"aria-label":l?.ariaLabel??`${s} actions`,children:j})}),(0,a.jsxs)(el,{align:"start",className:"w-48",children:[l?.actions?.map((N,I)=>{if(N.type==="separator")return(0,a.jsx)(Ii,{},`separator-${I}`);const C=N.icon,M=(0,a.jsxs)(a.Fragment,{children:[C?(0,a.jsx)(C,{className:"size-4"}):null,(0,a.jsx)("span",{children:N.label})]});return N.href?(0,a.jsx)(Sn,{asChild:!0,children:(0,a.jsx)(mn,{to:N.href,children:M})},`${N.label}-${I}`):(0,a.jsx)(Sn,{onSelect:N.onSelect,children:M},`${N.label}-${I}`)}),l?.radioChoices&&l.radioChoices.length>0?(0,a.jsx)(kI,{value:l.radioValue,onValueChange:l.onRadioValueChange,"aria-label":l.radioLabel,children:l.radioChoices.map(N=>(0,a.jsx)(SI,{value:N.value,children:N.label},N.value))}):null]})]}):(0,a.jsx)("div",{className:"inline-flex min-w-0 max-w-full items-center px-1 py-0.5",children:j});return(0,a.jsx)("div",{className:"group/sidebar-section px-3 py-1.5 pointer-coarse:py-1",children:(0,a.jsxs)("div",{className:"relative flex min-h-6 min-w-0 items-center gap-1",children:[e?(0,a.jsx)(jI,{asChild:!0,children:(0,a.jsx)("button",{type:"button","data-slot":"icon-button",className:"absolute -left-4 flex h-5 w-5 items-center justify-center rounded-sm outline-none transition-colors hover:bg-bg-3 focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1","aria-label":e.open?`Collapse ${s}`:`Expand ${s}`,children:(0,a.jsx)(ur,{className:v,"aria-hidden":"true"})})}):null,S,t&&k?(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs",className:y,"aria-label":t.ariaLabel,onClick:t.onClick,children:(0,a.jsx)(k,{className:"h-3.5 w-3.5"})}):null]})})}r(Cj,"SidebarSectionHeader");function af({label:e,children:t,collapsible:s,menu:l,headerAction:c}){const{collapsed:u,peeking:p}=Jn(),f=K3(),h=u&&!p&&!f,g=(0,a.jsx)("div",{className:"flex flex-col gap-0.5 mt-0.5",children:t});return h?(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"px-3 py-1.5 pointer-coarse:py-1",children:(0,a.jsxs)("div",{className:"flex min-h-6 items-center",children:[(0,a.jsx)("span",{className:"sr-only",children:e}),(0,a.jsx)("div",{className:"h-px w-full bg-line/60","aria-hidden":"true"})]})}),g]}):s?(0,a.jsxs)(yS,{open:s.open,onOpenChange:s.onOpenChange,children:[(0,a.jsx)(Cj,{label:e,collapsible:s,menu:l,headerAction:c}),(0,a.jsx)(vS,{children:g})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)(Cj,{label:e,menu:l,headerAction:c}),g]})}r(af,"SidebarSection");var RN=(0,x.createContext)(null),p5=RN.Provider;function qf(e){const t=(0,x.useContext)(RN);return t&&(!e||t.companyId===e)?t:null}r(qf,"usePrimaryAgentPresentation");function gG({agentId:e,companyId:t}){const s=qf(t);return!s||s.loading||s.primaryAgentId!==e?null:(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)("span",{role:"img","aria-label":"My primary agent",className:"inline-flex shrink-0 text-accent",children:(0,a.jsx)(xS,{"aria-hidden":"true",className:"size-3.5"})})}),(0,a.jsx)(Ts,{children:"My primary agent"})]})}r(gG,"PrimaryAgentIndicator");function xG({agent:e}){const t=qf(e.companyId);if(!t||e.status==="terminated"||e.status==="pending_approval")return null;if(t.error)return(0,a.jsx)(oe,{type:"button",variant:"danger",size:"sm",onClick:t.onRetry,className:"h-auto justify-start p-0 text-xs",children:"Retry loading primary agent"});const s=t.primaryAgentId===e.id,l=t.pendingAgentId===e.id;if(s&&!l&&!t.loading)return null;const c=t.primaryAgent?.id===t.primaryAgentId?t.primaryAgent:null,u=t.loading||!!(t.primaryAgentId&&!c),p=u||!!t.pendingAgentId,f=(0,a.jsxs)(oe,{type:"button",variant:"link",size:"sm",disabled:p,onClick:t.primaryAgentId?void 0:()=>t.onChange(e.id),className:"h-auto justify-start p-0 text-xs",children:[l||u?(0,a.jsx)(Ma,{"aria-hidden":"true",className:"size-3 motion-safe:animate-spin"}):null,u?"Loading primary…":l?"Setting primary…":"Set as my primary"]});return c?(0,a.jsxs)(_S,{children:[(0,a.jsx)(wI,{asChild:!0,children:f}),(0,a.jsxs)(kS,{children:[(0,a.jsxs)("div",{className:"flex items-start justify-center gap-5 pt-2",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col items-center gap-2 text-center",children:[(0,a.jsx)(mr,{agent:c,size:64,label:`${c.name} avatar`}),(0,a.jsx)("span",{className:"max-w-full break-words text-sm font-medium",children:c.name})]}),(0,a.jsx)(OI,{"aria-hidden":"true",className:"mt-5 size-6 shrink-0 text-ink-3"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col items-center gap-2 text-center",children:[(0,a.jsx)(mr,{agent:e,size:64,label:`${e.name} avatar`,className:"rounded-xl ring-1 ring-accent ring-offset-2 ring-offset-bg"}),(0,a.jsxs)("span",{className:"flex max-w-full items-center justify-center gap-1.5 text-sm font-medium",children:[(0,a.jsx)("span",{className:"min-w-0 break-words",children:e.name}),(0,a.jsx)("span",{role:"img","aria-label":"New primary agent",className:"inline-flex shrink-0 text-accent",children:(0,a.jsx)(xS,{"aria-hidden":"true",className:"size-3.5"})})]})]})]}),(0,a.jsxs)(AS,{children:[(0,a.jsx)(wS,{children:"Change your primary agent?"}),(0,a.jsxs)(jS,{className:"break-words",children:["This will make ",e.name," your primary agent, do you want to do this?"]})]}),(0,a.jsxs)(NS,{className:"flex-row justify-between sm:justify-between",children:[(0,a.jsx)(CS,{children:"Cancel"}),(0,a.jsx)(SS,{disabled:p,onClick:r(()=>t.onChange(e.id),"onClick"),children:"Set as my primary"})]})]})]},c.id):f}r(xG,"SetPrimaryAgentButton");var MN=(0,x.createContext)(null),DN=(0,x.createContext)(null);function m5({children:e}){const[t,s]=(0,x.useState)(!1),[l,c]=(0,x.useState)({}),[u,p]=(0,x.useState)(!1),[f,h]=(0,x.useState)(!1),[g,v]=(0,x.useState)({}),[y,j]=(0,x.useState)(!1),[k,S]=(0,x.useState)(!1),[N,I]=(0,x.useState)({}),[C,M]=(0,x.useState)(!1),R=(0,x.useCallback)((ce={})=>{c(ce),s(!0)},[]),_=(0,x.useCallback)(()=>{s(!1),c({})},[]),D=(0,x.useCallback)(()=>{p(!0)},[]),U=(0,x.useCallback)(()=>{p(!1)},[]),K=(0,x.useCallback)((ce={})=>{v(ce),h(!0)},[]),z=(0,x.useCallback)(()=>{h(!1),v({})},[]),E=(0,x.useCallback)(()=>{j(!0)},[]),B=(0,x.useCallback)(()=>{j(!1)},[]),O=(0,x.useCallback)((ce={})=>{I(ce),S(!0)},[]),Q=(0,x.useCallback)(()=>{S(!1),I({})},[]),V=(0,x.useMemo)(()=>({newIssueOpen:t,newIssueDefaults:l,newProjectOpen:u,newGoalOpen:f,newGoalDefaults:g,newAgentOpen:y,onboardingOpen:k,onboardingOptions:N,onboardingRouteDismissed:C}),[t,l,u,f,g,y,k,N,C]),ue=(0,x.useMemo)(()=>({openNewIssue:R,closeNewIssue:_,openNewProject:D,closeNewProject:U,openNewGoal:K,closeNewGoal:z,openNewAgent:E,closeNewAgent:B,openOnboarding:O,closeOnboarding:Q,setOnboardingRouteDismissed:M}),[R,_,D,U,K,z,E,B,O,Q,M]);return(0,a.jsx)(DN.Provider,{value:ue,children:(0,a.jsx)(MN.Provider,{value:V,children:e})})}r(m5,"DialogProvider");function Us(){const e=(0,x.useContext)(DN);if(!e)throw new Error("useDialogActions must be used within DialogProvider");return e}r(Us,"useDialogActions");function Ff(){const e=(0,x.useContext)(MN);if(!e)throw new Error("useDialogState must be used within DialogProvider");return e}r(Ff,"useDialogState");function Vc(){return{...Ff(),...Us()}}r(Vc,"useDialog");var h5={list:r(e=>je.get(`/companies/${e}/built-in-agents`),"list"),provision:r((e,t,s={})=>je.post(`/companies/${e}/built-in-agents/${t}/provision`,s),"provision"),reset:r((e,t,s)=>je.post(`/companies/${e}/built-in-agents/${t}/reset`,s?{resources:s}:{}),"reset"),reconcile:r((e,t)=>je.post(`/companies/${e}/built-in-agents/${t}/reconcile`,{}),"reconcile"),runRoutine:r((e,t,s)=>je.post(`/companies/${e}/built-in-agents/${t}/routines/${s}/run`,{}),"runRoutine"),enableRoutineSchedule:r((e,t,s)=>je.post(`/companies/${e}/built-in-agents/${t}/routines/${s}/enable`,{}),"enableRoutineSchedule"),disableRoutineSchedule:r((e,t,s)=>je.post(`/companies/${e}/built-in-agents/${t}/routines/${s}/disable`,{}),"disableRoutineSchedule")};function g5({status:e,compact:t=!1,className:s}){if(e!=="needs_setup"&&e!=="pending_approval")return null;const l=e==="pending_approval";return(0,a.jsx)(Dn,{variant:"outline",className:Y(oI.amber,t&&"px-1.5 py-0 text-(length:--text-nano)",s),title:l?"Waiting on board hire approval before the feature can run":"Needs adapter/model setup before the feature can run",children:l?t?"Approval":"Pending approval":t?"Setup":"Needs setup"})}r(g5,"BuiltInLifecycleChip");function ch(e,t){if(e.length!==t.length)return!1;for(let s=0;s<e.length;s+=1)if(e[s]!==t[s])return!1;return!0}r(ch,"areEqual$2");function uh(e,t,s){return cg(e,t,s).map(l=>l.id)}r(uh,"buildOrderIds$2");function x5({agents:e,companyId:t,userId:s}){const l=(0,x.useMemo)(()=>({leadershipFirst:!0}),[]),c=(0,x.useMemo)(()=>t?Z3(t,s):null,[t,s]),[u,p]=(0,x.useState)(()=>c?uh(e,nh(c),l):e.map(f=>f.id));return(0,x.useEffect)(()=>{const f=c?uh(e,nh(c),l):e.map(h=>h.id);p(h=>ch(h,f)?h:f)},[e,c,l]),(0,x.useEffect)(()=>{if(!c)return;const f=r(v=>{const y=uh(e,v,l);p(j=>ch(j,y)?j:y)},"syncFromIds"),h=r(v=>{v.key===c&&f(nh(c))},"onStorage"),g=r(v=>{const y=v.detail;!y||y.storageKey!==c||f(y.orderedIds)},"onCustomEvent");return window.addEventListener("storage",h),window.addEventListener(Qy,g),()=>{window.removeEventListener("storage",h),window.removeEventListener(Qy,g)}},[e,c,l]),{orderedAgents:(0,x.useMemo)(()=>cg(e,u,l),[e,u,l]),orderedIds:u,persistOrder:(0,x.useCallback)(f=>{const h=new Set(e.map(v=>v.id)),g=f.filter(v=>h.has(v));for(const v of cg(e,[],l))g.includes(v.id)||g.push(v.id);p(v=>ch(v,g)?v:g),c&&G3(c,g)},[e,c,l])}}r(x5,"useAgentOrder");var Ng={listMine:r(e=>je.get(`/companies/${e}/resource-memberships/me`),"listMine"),updateProject:r((e,t,s)=>je.put(`/companies/${e}/resource-memberships/me/projects/${t}`,s),"updateProject"),updateAgent:r((e,t,s)=>je.put(`/companies/${e}/resource-memberships/me/agents/${t}`,s),"updateAgent")};function b5(){return{projectMemberships:{},agentMemberships:{},starredProjectIds:[],starredAgentIds:[],starredDocumentIds:[],projectStarredAt:{},agentStarredAt:{},documentStarredAt:{},updatedAt:null}}r(b5,"emptyMemberships");function v5(e){return e==="project"?{ids:"starredProjectIds",at:"projectStarredAt",state:"projectMemberships"}:{ids:"starredAgentIds",at:"agentStarredAt",state:"agentMemberships"}}r(v5,"starKeys");function Aj(e,t,s,l){const c=e??b5(),u=v5(t),p=c[u.state]??{},f=p[s]==="left"?"left":"joined",h=l.starred===!0?"joined":l.state??f,g=c[u.ids]??[],v={...c[u.at]??{}},y=g.includes(s),j=h==="left"?!1:l.starred===!0?!0:l.starred===!1?!1:y;let k=g;return j&&!y?(k=[s,...g],v[s]=new Date):!j&&y&&(k=g.filter(S=>S!==s),delete v[s]),{...c,[u.state]:{...p,[s]:h},[u.ids]:k,[u.at]:v,updatedAt:new Date}}r(Aj,"applyMembershipChange");function ON(e,t,s){return(t==="project"?e?.projectMemberships[s]:e?.agentMemberships[s])==="left"?"left":"joined"}r(ON,"resourceMembershipState");function LN(e,t,s){const l=t==="project"?e?.starredProjectIds:t==="agent"?e?.starredAgentIds:e?.starredDocumentIds;return Array.isArray(l)&&l.includes(s)}r(LN,"isStarred");function zN(e,t){const s=t==="project"?e?.starredProjectIds:t==="agent"?e?.starredAgentIds:e?.starredDocumentIds;return Array.isArray(s)?s:[]}r(zN,"starredResourceIds");function Q0(e){return me({queryKey:$.resourceMemberships.mine(e??"__none__"),queryFn:r(()=>Ng.listMine(e),"queryFn"),enabled:!!e})}r(Q0,"useResourceMemberships");function PN(e){const t=kn(),{pushToast:s}=Ri(),l=$.resourceMemberships.mine(e??"__none__");return Bt({mutationFn:r(c=>{if(!e)throw new Error("Select an organization first.");const u={state:c.state,starred:c.starred};return c.resourceType==="project"?Ng.updateProject(e,c.resourceId,u):Ng.updateAgent(e,c.resourceId,u)},"mutationFn"),onMutate:r(async c=>{await t.cancelQueries({queryKey:l});const u=t.getQueryData(l);return t.setQueryData(l,Aj(u,c.resourceType,c.resourceId,{state:c.state,starred:c.starred})),{previous:u}},"onMutate"),onError:r((c,u,p)=>{p?.previous&&t.setQueryData(l,p.previous);const f=u.starred!==void 0?u.starred?"star":"unstar":u.state==="left"?"leave":"join";s({title:`Couldn't ${f} ${u.resourceName}.`,body:c instanceof Error?c.message:"Try again.",tone:"error"})},"onError"),onSuccess:r((c,u)=>{t.setQueryData(l,p=>Aj(p,u.resourceType,c.resourceId,{state:c.state,starred:c.starredAt!=null}))},"onSuccess"),onSettled:r(()=>{t.invalidateQueries({queryKey:["primary-agent",e]}),t.invalidateQueries({queryKey:l})},"onSettled")})}r(PN,"useResourceMembershipMutation");var y5={healthy:"bg-emerald-500/90 text-white",warning:"bg-amber-500/95 text-amber-950",critical:"bg-red-500/90 text-white"},j5={healthy:"Budget healthy",warning:"Budget warning",critical:"Paused by budget"};function $N({title:e,level:t="critical"}){const s=e??j5[t];return(0,a.jsx)("span",{title:s,"aria-label":s,className:`ml-auto inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full shadow-(--shadow-extract-3) ${y5[t]}`,children:(0,a.jsx)(j1,{className:"h-3 w-3"})})}r($N,"BudgetSidebarMarker");var w5="opacity-100 sm:opacity-0 sm:transition-opacity sm:group-hover:opacity-100 sm:group-focus-within:opacity-100";function UN({starred:e,resourceName:t,pending:s=!1,error:l=!1,size:c="row",onToggle:u,quiet:p=!1,className:f,revealClassName:h}){const g=e?`Unstar ${t}`:`Star ${t}`,v=s?Ma:y0;function y(j){j.preventDefault(),j.stopPropagation(),!s&&u(!e)}return r(y,"handleClick"),c==="button"?(0,a.jsx)(oe,{type:"button",size:"icon-sm",variant:"ghost","aria-label":g,"aria-pressed":e,"aria-busy":s?"true":void 0,disabled:s,onClick:y,title:l?"Couldn't save — retry":void 0,className:f,children:(0,a.jsx)(v,{className:Y("h-4 w-4",s&&"motion-safe:animate-spin",!s&&l&&"text-bad",!s&&e&&!l&&"fill-amber-500 text-amber-500",!s&&l&&"text-red-500")})}):(0,a.jsx)(oe,{type:"button",size:"icon-xs",variant:"ghost","aria-label":g,"aria-pressed":e,"aria-busy":s?"true":void 0,disabled:s,onClick:y,title:l?"Couldn't save — retry":void 0,className:Y("h-6 w-6 shrink-0",l||s||e&&!p?"opacity-100":h??w5,f),children:(0,a.jsx)(v,{className:Y("h-3.5 w-3.5",s&&"motion-safe:animate-spin",!s&&l&&"text-red-500",!s&&!l&&e&&"fill-amber-500 text-amber-500",!s&&!l&&!e&&"text-ink-3")})})}r(UN,"StarToggle");var k5=3,_j=12e4,S5=[{value:"top",label:"Top"},{value:"alphabetical",label:"Alphabetical"},{value:"recent",label:"Recent"}];function Fl(e,t){const s=e[t];if(!s)return 0;const l=new Date(s).getTime();return Number.isFinite(l)?l:0}r(Fl,"agentTimestamp");function Ej(e,t){if(t==="top")return e;const s=[...e];return t==="alphabetical"?(s.sort((l,c)=>l.name.localeCompare(c.name,void 0,{sensitivity:"base"})),s):(s.sort((l,c)=>{const u=Fl(c,"lastHeartbeatAt")-Fl(l,"lastHeartbeatAt");if(u!==0)return u;const p=Fl(c,"updatedAt")-Fl(l,"updatedAt");if(p!==0)return p;const f=Fl(c,"createdAt")-Fl(l,"createdAt");return f!==0?f:l.name.localeCompare(c.name,void 0,{sensitivity:"base"})}),s)}r(Ej,"sortAgents");var N5="opacity-0 transition-opacity group-hover/agent:opacity-100 group-focus-within/agent:opacity-100";function C5({activeAgentId:e,activeTab:t,agent:s,disabled:l,isMobile:c,leaving:u,onLeaveAgent:p,onPauseResume:f,rail:h,runCount:g,setSidebarOpen:v,builtInStatus:y,starred:j=!1,onToggleStar:k,starPending:S=!1}){const N=fr(s),I=t?`${Od(s)}/${t}`:Od(s),C=`${Od(s)}/configuration`,M=e===N,R=s.status==="paused",_=R&&s.pauseReason==="budget",D=s.orgChainHealth?.status==="invalid_org_chain",U=R?"Resume agent":"Pause agent",K=l||s.status==="pending_approval"||_||R&&D,z=l?"Updating...":_?"Budget paused":R&&D?"Invalid org chain":U,E=y==="needs_setup"||y==="pending_approval",B=[E?`Built-in agent ${y.replace(/_/g," ")}`:null,D?"Invalid reporting chain":null].filter(Boolean).join(", ")||void 0,O=(0,a.jsx)(Ge,{to:I,label:s.name,iconNode:(0,a.jsx)(mr,{agent:s,size:16,className:"shrink-0 h-4 w-4"}),active:M,liveCount:g,labelClassName:E?"min-w-(--sz-4_5rem) flex-initial":void 0,className:Y("min-w-0 flex-1",j&&!c?"pr-14":"pr-8"),trailing:E||D?(0,a.jsxs)("span",{className:"ml-1 flex shrink-0 items-center gap-1",children:[E?(0,a.jsx)(g5,{status:y,compact:!0}):null,D?(0,a.jsx)(ai,{className:"h-3.5 w-3.5 shrink-0 text-amber-500","aria-label":"Invalid reporting chain"}):null]}):void 0,trailingLabel:B,liveAccessory:s.pauseReason==="budget"?(0,a.jsx)($N,{title:"Agent paused by budget"}):void 0});return h?O:(0,a.jsxs)("div",{className:"group/agent relative flex items-center",children:[O,j&&!c&&k?(0,a.jsx)("span",{className:"absolute right-10 top-1/2 -translate-y-1/2",children:(0,a.jsx)(UN,{size:"row",quiet:!0,starred:!0,pending:S,resourceName:s.name,onToggle:r(()=>k(s,!1),"onToggle"),revealClassName:N5})}):null,(0,a.jsxs)(tl,{children:[(0,a.jsx)(Jr,{asChild:!0,children:(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs",className:Y("absolute right-3 top-1/2 h-6 w-6 -translate-y-1/2 transition-opacity data-[state=open]:pointer-events-auto data-[state=open]:opacity-100",c?"opacity-100":"pointer-events-none opacity-0 group-hover/agent:pointer-events-auto group-hover/agent:opacity-100 group-focus-within/agent:pointer-events-auto group-focus-within/agent:opacity-100"),"aria-label":`Open actions for ${s.name}`,children:(0,a.jsx)(Df,{className:"h-3.5 w-3.5"})})}),(0,a.jsxs)(el,{align:"end",className:"w-48",children:[k?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Sn,{onClick:r(()=>{S||k(s,!j)},"onClick"),disabled:S,children:[S?(0,a.jsx)(Ma,{className:"size-4 motion-safe:animate-spin"}):(0,a.jsx)(y0,{className:Y("size-4",j&&"fill-amber-500 text-amber-500")}),(0,a.jsx)("span",{children:j?"Remove from starred":"Star agent"})]}),(0,a.jsx)(Ii,{})]}):null,(0,a.jsx)(Sn,{asChild:!0,children:(0,a.jsxs)(mn,{to:C,onClick:r(()=>{c&&v(!1)},"onClick"),children:[(0,a.jsx)(F0,{className:"size-4"}),(0,a.jsx)("span",{children:"Edit agent"})]})}),(0,a.jsx)(Ii,{}),(0,a.jsxs)(Sn,{onClick:r(()=>{K||f(s,R?"resume":"pause")},"onClick"),disabled:K,title:_?"Agent was paused by budget limits":void 0,children:[R?(0,a.jsx)(h1,{className:"size-4"}):(0,a.jsx)(q0,{className:"size-4"}),(0,a.jsx)("span",{children:z})]}),(0,a.jsx)(Ii,{}),(0,a.jsxs)(Sn,{onClick:r(()=>{u||p(s)},"onClick"),disabled:u,children:[u?(0,a.jsx)(Ma,{className:"size-4 motion-safe:animate-spin"}):(0,a.jsx)(Uf,{className:"size-4"}),(0,a.jsx)("span",{children:u?"Leaving...":"Leave agent"})]})]})]})]})}r(C5,"SidebarAgentItem");function A5({streamlined:e=!1}={}){const[t,s]=(0,x.useState)(!0),[l,c]=(0,x.useState)(()=>new Set),[u,p]=(0,x.useState)(0),f=(0,x.useRef)(new Map),h=kn(),{selectedCompanyId:g}=bt(),v=qf(g),{openNewAgent:y}=Us(),{isMobile:j,setSidebarOpen:k,collapsed:S,peeking:N}=Jn(),I=S&&!N,{pushToast:C}=Ri(),M=hn(),{data:R}=me({queryKey:$.agents.list(g),queryFn:r(()=>Ha.list(g),"queryFn"),enabled:!!g}),{data:_}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),enabled:!!g}),D=_?.enableBuiltInAgents===!0,{data:U}=me({queryKey:$.builtInAgents.list(g),queryFn:r(()=>h5.list(g),"queryFn"),enabled:!!g&&D}),K=(0,x.useMemo)(()=>{const P=new Map;if(!D)return P;for(const qe of U??[])qe.agentId&&P.set(qe.agentId,qe.status);return P},[U,D]),{data:z}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),E=Q0(g),B=PN(g),O=$.liveRuns(g),Q=Ac({companyId:g,resourceKey:"live-runs",queryKey:O,enabled:!!g,refetchInterval:!1,leaderOnly:!0}),{data:V,dataUpdatedAt:ue}=me({queryKey:O,queryFn:r(()=>zf.liveRunsForCompany(g),"queryFn"),enabled:Q.enabled,refetchInterval:Q.refetchInterval});_c(Q,V,ue);const ce=(0,x.useMemo)(()=>{const P=new Map;for(const qe of V??[])P.set(qe.agentId,(P.get(qe.agentId)??0)+1);return P},[V]),X=(0,x.useMemo)(()=>{const P=new Set;for(const[qe,Ye]of ce)Ye>0&&P.add(qe);return P},[ce]),A=(0,x.useMemo)(()=>(R??[]).filter(P=>P.status!=="terminated"&&(!E.isSuccess||ON(E.data,"agent",P.id)!=="left")),[R,E.data,E.isSuccess]),ee=z?.user?.id??z?.session?.userId??null,ie=(0,x.useMemo)(()=>g?Y3(g,ee):null,[ee,g]),[le,Ae]=(0,x.useState)(()=>ie?ah(ie):"top"),{orderedAgents:de}=x5({agents:A,companyId:g,userId:ee}),we=(0,x.useMemo)(()=>Ej(de,le),[de,le]),ye=(0,x.useMemo)(()=>new Set(we.map(P=>P.id)),[we]);(0,x.useEffect)(()=>{const P=Date.now();for(const qe of X)f.current.set(qe,P);for(const qe of f.current.keys())ye.has(qe)||f.current.delete(qe)},[X,ye]);const Me=(0,x.useMemo)(()=>{const P=Date.now(),qe=f.current;return we.filter(Ye=>{if((ce.get(Ye.id)??0)>0)return!0;const xt=qe.get(Ye.id);return xt!==void 0&&P-xt<=_j})},[ce,u,we]),he=Me.length>0,ve=e?he?Me:we.slice(0,k5):we,et=e&&we.length>0,$e=M.pathname.match(/^\/(?:[^/]+\/)?agents\/([^/]+)(?:\/([^/]+))?/),Ie=$e?.[1]??null,ct=$e?.[2]??null;(0,x.useEffect)(()=>{if(!ie){Ae("top");return}Ae(ah(ie))},[ie]),(0,x.useEffect)(()=>{if(!ie)return;const P=r(Ye=>{Ye.key===ie&&Ae(ah(ie))},"onStorage"),qe=r(Ye=>{const xt=Ye.detail;!xt||xt.storageKey!==ie||Ae(xt.sortMode)},"onCustomEvent");return window.addEventListener("storage",P),window.addEventListener(Wy,qe),()=>{window.removeEventListener("storage",P),window.removeEventListener(Wy,qe)}},[ie]),(0,x.useEffect)(()=>{if(!e)return;const P=Date.now();let qe=null;for(const xt of we){if((ce.get(xt.id)??0)>0)continue;const at=f.current.get(xt.id);if(at===void 0)continue;const Kt=at+_j;Kt<P||(qe=qe===null?Kt:Math.min(qe,Kt))}if(qe===null)return;const Ye=window.setTimeout(()=>{p(xt=>xt+1)},Math.max(0,qe-P+1));return()=>{window.clearTimeout(Ye)}},[e,we,ce,u]);const He=(0,x.useCallback)(P=>{const qe=P==="alphabetical"||P==="recent"?P:"top";Ae(qe),ie&&X3(ie,qe)},[ie]),vt=Bt({mutationFn:r(({agent:P,action:qe})=>qe==="pause"?Ha.pause(P.id,g??void 0):Ha.resume(P.id,g??void 0),"mutationFn"),onMutate:r(({agent:P})=>{c(qe=>{const Ye=new Set(qe);return Ye.add(P.id),Ye})},"onMutate"),onSuccess:r(async(P,{agent:qe,action:Ye})=>{g&&await Promise.all([h.invalidateQueries({queryKey:$.agents.list(g)}),h.invalidateQueries({queryKey:$.liveRuns(g)}),h.invalidateQueries({queryKey:$.dashboard(g)})]),await Promise.all([h.invalidateQueries({queryKey:$.agents.detail(qe.id)}),h.invalidateQueries({queryKey:$.agents.detail(fr(qe))})]),C({title:Ye==="pause"?"Agent paused":"Agent resumed",body:qe.name,tone:"success"})},"onSuccess"),onError:r((P,{agent:qe,action:Ye})=>{C({title:Ye==="pause"?"Could not pause agent":"Could not resume agent",body:P instanceof Error?P.message:qe.name,tone:"error"})},"onError"),onSettled:r((P,qe,{agent:Ye})=>{c(xt=>{const at=new Set(xt);return at.delete(Ye.id),at})},"onSettled")}),Jt=(0,x.useCallback)(P=>B.mutate({resourceType:"agent",resourceId:P.id,resourceName:P.name,state:"left"}),[B]),ge=(0,x.useCallback)(P=>B.isPending&&B.variables?.resourceType==="agent"&&B.variables.resourceId===P.id,[B.isPending,B.variables]),Oe=(0,x.useCallback)((P,qe)=>B.mutate({resourceType:"agent",resourceId:P.id,resourceName:P.name,starred:qe}),[B]),De=(0,x.useCallback)(P=>B.isPending&&B.variables?.resourceType==="agent"&&B.variables.resourceId===P.id&&B.variables.starred!==void 0,[B.isPending,B.variables]),ut=(0,x.useMemo)(()=>new Set(zN(E.data,"agent")),[E.data]),Ht=(0,x.useMemo)(()=>Ej(A.filter(P=>ut.has(P.id)),"alphabetical"),[A,ut]),Vt=(0,x.useMemo)(()=>ve.filter(P=>!ut.has(P.id)),[ve,ut]),gt=v&&!v.loading?A.find(P=>P.id===v.primaryAgentId):void 0,un=r((P,qe)=>(0,a.jsx)(C5,{activeAgentId:Ie,activeTab:ct,agent:P,disabled:l.has(P.id),isMobile:j,leaving:ge(P),onLeaveAgent:Jt,onPauseResume:r((Ye,xt)=>vt.mutate({agent:Ye,action:xt}),"onPauseResume"),rail:I,runCount:ce.get(P.id)??0,setSidebarOpen:k,builtInStatus:K.get(P.id),starred:qe||LN(E.data,"agent",P.id),onToggleStar:Oe,starPending:De(P)},P.id),"renderAgentRow");return(0,a.jsxs)(af,{label:"Agents",collapsible:{open:t,onOpenChange:s},headerAction:{ariaLabel:"New agent",icon:as,onClick:y},menu:{ariaLabel:"Agents section actions",actions:[{type:"item",label:"Browse agents",icon:Gr,href:"/agents/all"},{type:"separator"}],radioLabel:"Agent sort",radioChoices:S5,radioValue:le,onRadioValueChange:He},children:[[...gt?[gt]:[],...Ht.filter(P=>P.id!==gt?.id),...Vt.filter(P=>P.id!==gt?.id)].map(P=>un(P,ut.has(P.id))),et&&(()=>{const P=(0,a.jsxs)(mn,{to:"/agents/all",state:Of,"aria-label":I?"See all agents":void 0,onClick:r(()=>{j&&k(!1)},"onClick"),className:"flex items-center gap-2.5 mx-2 rounded-lg px-2 py-1.5 pointer-coarse:py-1 text-(length:--text-compact) font-medium text-ink-3 transition-colors hover:bg-bg-3 hover:text-ink",children:[(0,a.jsx)(Gr,{className:"shrink-0 h-4 w-4"}),(0,a.jsx)("span",{className:I?"block w-0 min-w-0 -ms-2.5 overflow-hidden whitespace-nowrap text-transparent select-none":void 0,children:"See all agents"})]});return I?(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:P}),(0,a.jsx)(Ts,{side:"right",children:"See all agents"})]}):P})()]})}r(A5,"SidebarAgents");var _5="opacity-0 transition-opacity group-hover/starred-project:opacity-100 group-focus-within/starred-project:opacity-100";function E5(){const{selectedCompanyId:e}=bt(),{isMobile:t,setSidebarOpen:s,collapsed:l,peeking:c}=Jn(),u=l&&!c,p=hn(),{data:f}=me({queryKey:$.projects.list(e),queryFn:r(()=>hr.list(e),"queryFn"),enabled:!!e}),h=Q0(e),g=PN(e),v=p.pathname.match(/^\/(?:[^/]+\/)?projects\/([^/]+)/)?.[1]??null,y=(0,x.useMemo)(()=>{if(!h.isSuccess)return[];const N=new Set(zN(h.data,"project"));if(N.size===0)return[];const I=new Map((f??[]).map(C=>[C.id,C]));return Array.from(N).map(C=>I.get(C)).filter(C=>!!C).sort((C,M)=>C.name.localeCompare(M.name,void 0,{sensitivity:"base"}))},[h.data,h.isSuccess,f]),j=(0,x.useCallback)(N=>g.mutate({resourceType:"project",resourceId:N.id,resourceName:N.name,starred:!1}),[g]),k=(0,x.useCallback)(N=>g.mutate({resourceType:"project",resourceId:N.id,resourceName:N.name,state:"left"}),[g]),S=(0,x.useCallback)(N=>g.isPending&&g.variables?.resourceType==="project"&&g.variables.resourceId===N.id,[g.isPending,g.variables]);return!h.isSuccess||y.length===0?null:(0,a.jsx)("div",{className:"flex flex-col gap-0.5","aria-label":"Starred projects",children:y.map(N=>{const I=Jk(N),C=v===I||v===N.id,M=S(N),R=M&&g.variables?.starred===!1,_=M&&g.variables?.state==="left",D=LN(h.data,"project",N.id),U=(0,a.jsx)(I5,{project:N,active:C,rail:u,onNavigate:r(()=>{t&&s(!1)},"onNavigate")});return(0,a.jsxs)("div",{className:"group/starred-project relative flex items-center",children:[u?(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)("div",{className:"min-w-0 flex-1",children:U})}),(0,a.jsx)(Ts,{side:"right",children:N.name})]}):U,!u&&!t?(0,a.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:(0,a.jsx)(UN,{size:"row",quiet:!0,starred:D,pending:R,resourceName:N.name,onToggle:r(()=>j(N),"onToggle"),revealClassName:_5})}):null,!u&&t?(0,a.jsxs)(tl,{children:[(0,a.jsx)(Jr,{asChild:!0,children:(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs",className:"absolute right-3 top-1/2 h-6 w-6 -translate-y-1/2 opacity-100","aria-label":`Open actions for ${N.name}`,children:(0,a.jsx)(Df,{className:"h-3.5 w-3.5"})})}),(0,a.jsxs)(el,{align:"end",className:"w-48",children:[(0,a.jsxs)(Sn,{onClick:r(()=>{M||j(N)},"onClick"),disabled:M,children:[R?(0,a.jsx)(Ma,{className:"size-4 motion-safe:animate-spin"}):(0,a.jsx)(y0,{className:"size-4 fill-amber-500 text-amber-500"}),(0,a.jsx)("span",{children:"Remove from starred"})]}),(0,a.jsx)(Ii,{}),(0,a.jsxs)(Sn,{onClick:r(()=>{M||k(N)},"onClick"),disabled:M,children:[_?(0,a.jsx)(Ma,{className:"size-4 motion-safe:animate-spin"}):(0,a.jsx)(Uf,{className:"size-4"}),(0,a.jsx)("span",{children:"Leave project"})]})]})]}):null]},N.id)})})}r(E5,"SidebarStarredProjects");function I5({project:e,active:t,rail:s,onNavigate:l}){return(0,a.jsxs)(mn,{to:`/projects/${Jk(e)}/issues`,state:Of,"aria-current":t?"page":void 0,onClick:l,className:Y("flex min-w-0 flex-1 items-center gap-2.5 mx-2 rounded-lg px-2 py-1.5 pointer-coarse:py-1 text-(length:--text-compact) font-medium transition-colors",!s&&"pl-6 pr-8",t?oo.active:Y(oo.rest,"text-ink/80")),children:[(0,a.jsx)(bS,{color:e.color??null,icon:e.icon??null,size:"xs"}),(0,a.jsx)("span",{className:s?aS:"flex-1 truncate",children:e.name}),!s&&e.visibility==="private"?(0,a.jsx)(tg,{className:"size-3.5 shrink-0 text-ink-3","aria-label":"Private project"}):null,!s&&e.pauseReason==="budget"?(0,a.jsx)($N,{title:"Project paused by budget"}):null]})}r(I5,"SidebarStarredProjectLink");var Cg="wardmote:recent-tasks-updated",BN="wardmote.recentTasks.v2:",T5="wardmote.recentTasks:";function KN(e,t){return`${BN}${e}:${t??"__local_board__"}`}r(KN,"getRecentTasksStorageKey");function R5(e,t){if(!e||typeof e!="object")return!1;const s=e;return s.companyId===t&&typeof s.id=="string"&&s.id.length>0&&typeof s.title=="string"&&(s.identifier===null||typeof s.identifier=="string")&&typeof s.status=="string"&&typeof s.recordedAt=="number"&&Number.isFinite(s.recordedAt)&&(s.snapshotUpdatedAt===void 0||typeof s.snapshotUpdatedAt=="number"&&Number.isFinite(s.snapshotUpdatedAt))}r(R5,"isRecentTaskEntry");function Wr(e,t){if(typeof window>"u")return[];try{const s=e.startsWith(BN)?T5+e.slice(24):e,l=window.localStorage.getItem(e)??window.localStorage.getItem(s),c=JSON.parse(l??"[]");return Array.isArray(c)?qN(c.filter(u=>R5(u,t))):[]}catch{return[]}}r(Wr,"readRecentTasks");function M5(e,t){if(!(typeof window>"u")){try{if(window.localStorage.getItem(e)!==null)return}catch{return}Hf(e,Wr(e,t))}}r(M5,"migrateRecentTasks");function qN(e){const t=new Set;return[...e].sort((s,l)=>l.recordedAt-s.recordedAt).filter(s=>t.has(s.id)?!1:(t.add(s.id),!0)).slice(0,5)}r(qN,"normalizeRecentTasks");function D5(e,t){typeof window>"u"||window.dispatchEvent(new CustomEvent(Cg,{detail:{storageKey:e,entries:t}}))}r(D5,"publishRecentTasks");function Hf(e,t){if(typeof window>"u")return;const s=qN(t);try{const l=JSON.stringify(s);if(window.localStorage.getItem(e)===l)return;window.localStorage.setItem(e,l)}catch{}D5(e,s)}r(Hf,"writeRecentTasks");function G0(e,t){if(e.id!==t.id||e.companyId!==t.companyId)return e;const s=new Date(t.updatedAt).getTime();return!Number.isFinite(s)||e.snapshotUpdatedAt!==void 0&&s<e.snapshotUpdatedAt?e:s===e.snapshotUpdatedAt?t.externalConversationState!==void 0&&t.externalConversationState!==e.externalConversationState?{...e,status:t.status,externalConversationState:t.externalConversationState}:e:{...e,title:t.title,identifier:t.identifier,status:t.status,externalConversationState:t.externalConversationState,snapshotUpdatedAt:s,recordedAt:Math.max(e.recordedAt,s)}}r(G0,"mergeRecentTaskSnapshot");function O5(e,t,s=new Date(e.updatedAt).getTime()){if(e.conversationAgentId)return;const l=KN(e.companyId,t),c=Wr(l,e.companyId),u=c.find(v=>v.id===e.id),p=Number.isFinite(s)?s:u?.recordedAt??Date.now(),f=new Date(e.updatedAt).getTime(),h=u?G0(u,e):{id:e.id,companyId:e.companyId,title:e.title,identifier:e.identifier,status:e.status,externalConversationState:e.externalConversationState,recordedAt:p,...Number.isFinite(f)?{snapshotUpdatedAt:f}:{}},g={...h,recordedAt:Math.max(p,h.recordedAt)};u&&u.title===g.title&&u.identifier===g.identifier&&u.status===g.status&&u.externalConversationState===g.externalConversationState&&u.recordedAt===g.recordedAt&&u.snapshotUpdatedAt===g.snapshotUpdatedAt||Hf(l,u?c.map(v=>v.id===e.id?g:v):[g,...c])}r(O5,"recordRecentTask");function L5(e,t,s){if(s.size===0)return;const l=Wr(e,t),c=l.filter(u=>!s.has(u.id));c.length!==l.length&&Hf(e,c)}r(L5,"pruneRecentTasks");function FN(e,t,s){const l=new Map(s.map(f=>[f.id,f])),c=Wr(e,t);let u=!1;const p=c.map(f=>{const h=l.get(f.id);if(!h||h.companyId!==t)return f;const g=G0(f,h);return g!==f&&(u=!0),g});u&&Hf(e,p)}r(FN,"updateRecentTaskSnapshots");var z5=1e3;function P5({companyId:e,userId:t}){const s=(0,x.useMemo)(()=>e?KN(e,t):null,[e,t]),[l,c]=(0,x.useState)(()=>s&&e?Wr(s,e):[]);(0,x.useEffect)(()=>{s&&e&&M5(s,e),c(s&&e?Wr(s,e):[])},[e,s]),(0,x.useEffect)(()=>{if(!s||!e)return;const N=r(()=>c(Wr(s,e)),"sync"),I=r(M=>{M.key===s&&N()},"onStorage"),C=r(M=>{const R=M.detail;R?.storageKey===s&&c(R.entries)},"onRecentTasksUpdated");return window.addEventListener("storage",I),window.addEventListener(Cg,C),()=>{window.removeEventListener("storage",I),window.removeEventListener(Cg,C)}},[e,s]);const u=[...l].sort((N,I)=>N.id.localeCompare(I.id)),p=JSON.stringify(u.map(N=>N.id)),f=Ef({queries:u.map(N=>({queryKey:$.issues.detail(N.id),queryFn:r(()=>cn.get(N.id),"queryFn"),retry:!1,staleTime:3e4}))}),h=new Map(f.flatMap(N=>N.data?[[N.data.id,N.data]]:[])),g=l.map(N=>{const I=h.get(N.id);return!I||I.companyId!==e||I.hiddenAt?N:G0(N,I)}),v=f.map(N=>`${N.dataUpdatedAt}:${N.errorUpdatedAt}:${N.status}`).join("|");(0,x.useEffect)(()=>{if(!s||!e||f.length===0)return;const N=[],I=new Set;f.forEach((C,M)=>{const R=u[M];R&&(C.data?C.data.companyId!==e||C.data.hiddenAt?I.add(R.id):N.push(C.data):C.error instanceof Ti&&[403,404].includes(C.error.status)&&I.add(R.id))}),FN(s,e,N),L5(s,e,I)},[e,p,v,s]);const[y,j]=(0,x.useState)(()=>l.map(N=>N.id)),k=JSON.stringify(l.map(N=>[N.id,N.recordedAt]));(0,x.useEffect)(()=>{const N=JSON.parse(k).map(([C])=>C);if(JSON.stringify([...y].sort((C,M)=>C.localeCompare(M)))!==p){j(N);return}if(N.every((C,M)=>C===y[M]))return;const I=window.setTimeout(()=>j(N),z5);return()=>window.clearTimeout(I)},[k,p,y,s]);const S=new Map(g.map(N=>[N.id,N]));return{entries:y.length===l.length&&y.every(N=>S.has(N))?y.map(N=>S.get(N)):g,storageKey:s}}r(P5,"useRecentTasks");var dh="h-(--profile-popover-row-height) gap-(--profile-popover-row-gap) rounded-lg px-2.5 py-0 text-(length:--text-compact) font-medium leading-(--profile-popover-label-line-height) focus:bg-bg-3/50 focus:text-ink",$5=":restart-wake-retry";function U5(e,t){return`wardmote.recentTasks:${e}:${t??"__local_board__"}${$5}`}r(U5,"restartWakeRetryStorageKey");function HN(e){if(!e)return new Set;try{const t=JSON.parse(window.localStorage.getItem(e)??"[]");return new Set(Array.isArray(t)?t.filter(s=>typeof s=="string"):[])}catch{return new Set}}r(HN,"readRestartWakeRetryIssueIds");function fh(e,t,s){if(!e)return;const l=HN(e);s?l.add(t):l.delete(t);try{l.size>0?window.localStorage.setItem(e,JSON.stringify([...l])):window.localStorage.removeItem(e)}catch{}}r(fh,"setRestartWakeRetryPending");function ph(e,t){return e instanceof Error&&e.message.trim()?e.message:t}r(ph,"errorMessage$2");function B5({companyId:e,liveIssueIds:t}){const{collapsed:s,peeking:l}=Jn(),c=s&&!l,{data:u,isPending:p}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1});if(!e||p)return null;const f=u?.user?.id??u?.session?.userId??null;return(0,a.jsx)(K5,{companyId:e,userId:f,liveIssueIds:t,rail:c},`${e}:${f??"__local_board__"}`)}r(B5,"SidebarRecentTasks");function K5({companyId:e,userId:t,liveIssueIds:s,rail:l}){const{entries:c,storageKey:u}=P5({companyId:e,userId:t}),p=kn(),f=Lf(),[h,g]=(0,x.useState)(null),[v,y]=(0,x.useState)(""),[j,k]=(0,x.useState)(null),S=U5(e,t);if(c.length===0)return null;const N=r(async _=>{await Promise.all([p.invalidateQueries({queryKey:$.issues.detail(_)}),p.invalidateQueries({queryKey:$.issues.list(e)}),p.invalidateQueries({queryKey:$.issues.activity(_)})])},"refreshIssueQueries"),I=r(_=>{g(_),y(_.title)},"beginRename"),C=r(async _=>{_.preventDefault();const D=v.trim();if(!h||!D||D===h.title){g(null);return}k("rename");try{const U=await cn.update(h.id,{title:D});p.setQueryData($.issues.detail(h.id),U),u&&FN(u,e,[U]),await N(h.id),g(null),f?.pushToast({title:"Task renamed",tone:"success"})}catch(U){f?.pushToast({title:"Task rename failed",body:ph(U,"Unable to rename this task."),tone:"error"})}finally{k(null)}},"submitRename"),M=r(async _=>{k("archive");try{await cn.archiveFromInbox(_.id),await N(_.id),await p.invalidateQueries({queryKey:$.sidebarBadges(e)}),f?.pushToast({title:"Task archived from inbox",tone:"success"})}catch(D){f?.pushToast({title:"Task archive failed",body:ph(D,"Unable to archive this task from the inbox."),tone:"error"})}finally{k(null)}},"archiveTask"),R=r(async _=>{k("pause");try{const D=await cn.getTreeControlState(_.id);if(D.activePauseHold?.isRoot){const U=await cn.get(_.id);if(fh(S,_.id,!0),await cn.releaseTreeHold(_.id,D.activePauseHold.holdId,{reason:"Restarted from Recent Tasks."}),U.assigneeAgentId){const K=await Ha.wakeup(U.assigneeAgentId,{source:"assignment",triggerDetail:"manual",reason:"recent_task_restart",payload:{issueId:U.id}},U.companyId);if(!("id"in K))throw new Error(K.message??"The assignee wake was skipped.")}fh(S,_.id,!1),f?.pushToast({title:"Task restarted",tone:"success"})}else{if(D.activePauseHold)throw new Error("This task is paused by a parent task. Restart it from the pause root.");if(HN(S).has(_.id)){const U=await cn.get(_.id);if(U.assigneeAgentId){const K=await Ha.wakeup(U.assigneeAgentId,{source:"assignment",triggerDetail:"manual",reason:"recent_task_restart_retry",payload:{issueId:U.id}},U.companyId);if(!("id"in K))throw new Error(K.message??"The assignee wake was skipped.")}fh(S,_.id,!1),f?.pushToast({title:"Task restarted",tone:"success"})}else await cn.createTreeHold(_.id,{mode:"pause",reason:"Paused from Recent Tasks.",releasePolicy:{strategy:"manual"}}),f?.pushToast({title:"Task paused",tone:"success"})}await p.invalidateQueries({queryKey:["issues","tree-control-state",_.id]})}catch(D){f?.pushToast({title:"Task pause update failed",body:ph(D,"Unable to pause or restart this task."),tone:"error"})}finally{k(null)}},"toggleTaskPause");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(af,{label:"Recent Tasks",children:c.map(_=>(0,a.jsxs)("div",{className:"sidebar-action-row group/recent-task relative",children:[(0,a.jsx)(Ge,{to:`/issues/${_.id}`,label:_.title,trailing:_.status==="in_review"&&_.externalConversationState==="waiting"?(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Idle"}):void 0,trailingLabel:_.status==="in_review"&&_.externalConversationState==="waiting"?"Idle":void 0,className:l?void 0:"sidebar-action-link pointer-coarse:pr-8 [.sidebar-action-row:is(:hover,:focus-within)_&]:text-ink [.sidebar-action-row:has(.sidebar-action-menu[data-state=open])_&]:text-ink",liveCount:s.has(_.id)?1:void 0}),l?null:(0,a.jsxs)(tl,{children:[(0,a.jsx)(Jr,{asChild:!0,children:(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-xs","aria-label":`More actions for ${_.title}`,className:"sidebar-action-menu absolute right-2 top-(--pct-50) z-10 -translate-y-(--pct-50) pointer-events-none opacity-0 transition-opacity focus-visible:pointer-events-auto focus-visible:opacity-100 pointer-coarse:pointer-events-auto pointer-coarse:opacity-100 pointer-coarse:before:hidden group-hover/recent-task:pointer-events-auto group-hover/recent-task:opacity-100 group-focus-within/recent-task:pointer-events-auto group-focus-within/recent-task:opacity-100 data-[state=open]:pointer-events-auto data-[state=open]:opacity-100",children:(0,a.jsx)(Df,{"aria-hidden":"true"})})}),(0,a.jsxs)(el,{side:"right",align:"start",className:"w-(--profile-popover-width) rounded-xl p-1.5 shadow-(--shadow-profile-popover)",children:[(0,a.jsxs)(Sn,{className:dh,onSelect:r(()=>I(_),"onSelect"),children:[(0,a.jsx)(F0,{"aria-hidden":"true"}),"Rename"]}),(0,a.jsxs)(Sn,{className:dh,disabled:j!==null,onSelect:r(()=>{M(_)},"onSelect"),children:[(0,a.jsx)(TS,{"aria-hidden":"true"}),"Archive"]}),(0,a.jsxs)(Sn,{className:dh,disabled:j!==null,onSelect:r(()=>{R(_)},"onSelect"),children:[(0,a.jsx)(nl,{"aria-hidden":"true"}),"Pause/Restart"]})]})]})]},_.id))}),(0,a.jsx)(ks,{open:h!==null,onOpenChange:r(_=>{!_&&j!=="rename"&&g(null)},"onOpenChange"),children:(0,a.jsx)($s,{className:"sm:max-w-md",children:(0,a.jsxs)("form",{className:"grid gap-4",onSubmit:r(_=>{C(_)},"onSubmit"),children:[(0,a.jsxs)(bo,{children:[(0,a.jsx)(Os,{children:"Rename task"}),(0,a.jsx)(vo,{children:"Choose a short, clear name for this task."})]}),(0,a.jsx)(Wn,{autoFocus:!0,"aria-label":"Task name",value:v,disabled:j==="rename",onChange:r(_=>y(_.target.value),"onChange")}),(0,a.jsxs)($f,{children:[(0,a.jsx)(oe,{type:"button",variant:"secondary",disabled:j==="rename",onClick:r(()=>g(null),"onClick"),children:"Cancel"}),(0,a.jsx)(oe,{type:"submit",disabled:j==="rename"||!v.trim(),children:j==="rename"?"Saving...":"Save"})]})]})})})]})}r(K5,"RecentTasksList");var q5={list:r((e,t={})=>{const s=new URLSearchParams;t.includeDismissed&&s.set("includeDismissed","true"),t.archived&&s.set("archived","true"),t.all&&s.set("all","true"),t.activitySince&&s.set("activitySince",t.activitySince),t.activityUntil&&s.set("activityUntil",t.activityUntil),t.queue&&s.set("queue",t.queue),t.sort&&s.set("sort",t.sort),t.cursor&&s.set("cursor",t.cursor),t.limit!==void 0&&s.set("limit",String(t.limit));const l=s.toString();return je.get(`/companies/${e}/attention${l?`?${l}`:""}`)},"list"),count:r(e=>je.get(`/companies/${e}/attention/count`),"count")},dd={list:r(e=>je.get(`/companies/${e}/inbox-dismissals`),"list"),dismiss:r((e,t)=>je.post(`/companies/${e}/inbox-dismissals`,{itemKey:t}),"dismiss"),snooze:r((e,t,s)=>je.post(`/companies/${e}/inbox-dismissals`,{itemKey:t,kind:"snooze",snoozedUntil:s}),"snooze"),restore:r((e,t)=>je.delete(`/companies/${e}/inbox-dismissals/${encodeURIComponent(t)}`),"restore")},VN={list:r((e,t)=>je.get(`/companies/${e}/approvals${t?`?status=${encodeURIComponent(t)}`:""}`),"list"),create:r((e,t)=>je.post(`/companies/${e}/approvals`,t),"create"),get:r(e=>je.get(`/approvals/${e}`),"get"),approve:r((e,t)=>je.post(`/approvals/${e}/approve`,{decisionNote:t}),"approve"),reject:r((e,t)=>je.post(`/approvals/${e}/reject`,{decisionNote:t}),"reject"),requestRevision:r((e,t)=>je.post(`/approvals/${e}/request-revision`,{decisionNote:t}),"requestRevision"),resubmit:r((e,t)=>je.post(`/approvals/${e}/resubmit`,{payload:t}),"resubmit"),listComments:r(e=>je.get(`/approvals/${e}/comments`),"listComments"),addComment:r((e,t)=>je.post(`/approvals/${e}/comments`,{body:t}),"addComment"),listIssues:r(e=>je.get(`/approvals/${e}/issues`),"listIssues")},F5={summary:r(e=>je.get(`/companies/${e}/dashboard`),"summary")},WN={get:r(e=>je.get(`/companies/${e}/sidebar-badges`),"get")};var H5=new Set(["failed","timed_out"]),sf=new Set(["pending","revision_requested"]),QN="wardmote:inbox:dismissed",GN="wardmote:inbox:read-items",YN="wardmote:inbox:last-tab",bG="wardmote:inbox:issue-columns",XN="wardmote:inbox:nesting",ZN="wardmote:inbox:group-by",vG="wardmote:inbox:filters",V5="wardmote:inbox:collapsed-groups",W5="wardmote:inbox:collapsed-parents",Ag=["status","id","assignee","kickedOffBy","project","workspace","parent","labels","updated"],JN=["status","id","updated"];function eC(e){return e?`${V5}:${e}`:null}r(eC,"getInboxCollapsedGroupsStorageKey");function tC(e){return e?`${W5}:${e}`:null}r(tC,"getInboxCollapsedParentsStorageKey");function yG(e){const t=eC(e);if(!t)return new Set;try{const s=localStorage.getItem(t);if(!s)return new Set;const l=JSON.parse(s);return new Set(Array.isArray(l)?l.filter(c=>typeof c=="string"):[])}catch{return new Set}}r(yG,"loadCollapsedInboxGroupKeys");function jG(e,t){const s=eC(e);if(s)try{localStorage.setItem(s,JSON.stringify([...t]))}catch{}}r(jG,"saveCollapsedInboxGroupKeys");function wG(e){const t=tC(e);if(!t)return new Set;try{const s=localStorage.getItem(t);if(!s)return new Set;const l=JSON.parse(s);return new Set(Array.isArray(l)?l.filter(c=>typeof c=="string"):[])}catch{return new Set}}r(wG,"loadCollapsedInboxParentIds");function kG(e,t){const s=tC(e);if(s)try{localStorage.setItem(s,JSON.stringify([...t]))}catch{}}r(kG,"saveCollapsedInboxParentIds");function Ij(){try{const e=localStorage.getItem(QN);if(!e)return new Set;const t=JSON.parse(e);return Array.isArray(t)?new Set(t.filter(s=>typeof s=="string"&&s.startsWith("alert:"))):new Set}catch{return new Set}}r(Ij,"loadDismissedInboxAlerts");function Q5(e){try{localStorage.setItem(QN,JSON.stringify([...e]))}catch{}}r(Q5,"saveDismissedInboxAlerts");function G5(e){return new Map(e.map(t=>[t.itemKey,ss(t.dismissedAt)]))}r(G5,"buildInboxDismissedAtByKey");function Tj(e,t,s){const l=e.get(t);return l==null?!1:l>=ss(s)}r(Tj,"isInboxEntityDismissed");function Rj(){try{const e=localStorage.getItem(GN);return e?new Set(JSON.parse(e)):new Set}catch{return new Set}}r(Rj,"loadReadInboxItems");function Mj(e){try{localStorage.setItem(GN,JSON.stringify([...e]))}catch{}}r(Mj,"saveReadInboxItems");function nC(e){const t=new Set(e);return Ag.filter(s=>t.has(s))}r(nC,"normalizeInboxIssueColumns");function Y5(e){return e?[...Ag]:Ag.filter(t=>t!=="workspace")}r(Y5,"getAvailableInboxIssueColumns");function SG(){try{const e=localStorage.getItem(ZN);return e==="type"||e==="assignee"||e==="project"||e==="workspace"?e:"none"}catch{return"none"}}r(SG,"loadInboxWorkItemGroupBy");function NG(e){try{localStorage.setItem(ZN,e)}catch{}}r(NG,"saveInboxWorkItemGroupBy");function CG(e,t,s){return s&&e==="workspace"&&!t}r(CG,"shouldResetInboxWorkspaceGrouping");function X5(e,t,{isolatedWorkspacesEnabled:s=!1,executionWorkspaceById:l,projectWorkspaceById:c,defaultProjectWorkspaceIdByProjectId:u}={}){const p=t.trim().toLowerCase();return!p||e.title.toLowerCase().includes(p)||e.identifier?.toLowerCase().includes(p)||e.description?.toLowerCase().includes(p)?!0:s?aC(e,{executionWorkspaceById:l,projectWorkspaceById:c,defaultProjectWorkspaceIdByProjectId:u})?.toLowerCase().includes(p)??!1:!1}r(X5,"matchesInboxIssueSearch");function AG({visibleIssues:e,searchableIssues:t,query:s,isolatedWorkspacesEnabled:l=!1,executionWorkspaceById:c,projectWorkspaceById:u,defaultProjectWorkspaceIdByProjectId:p}){const f=s.trim();if(!f)return[];const h=new Set(e.map(g=>g.id));return t.filter(g=>!h.has(g.id)).filter(g=>X5(g,f,{isolatedWorkspacesEnabled:l,executionWorkspaceById:c,projectWorkspaceById:u,defaultProjectWorkspaceIdByProjectId:p})).sort(Ic)}r(AG,"getArchivedInboxSearchIssues");function _G({query:e,filteredWorkItems:t,archivedSearchIssues:s,remoteIssues:l,issueFilters:c,currentUserId:u,enableRoutineVisibilityFilter:p=!1,liveIssueIds:f,issueFilterContext:h={}}){if(!e.trim())return[];const g=new Set([...t.filter(v=>v.kind==="issue").map(v=>v.issue.id),...s.map(v=>v.id)]);return fg(l,c,u,p,f,h).filter(v=>!g.has(v.id))}r(_G,"getInboxSearchSupplementIssues");function Z5(e){const t=e?.trim();return t?`${t} (default)`:"Default workspace"}r(Z5,"formatDefaultWorkspaceGroupLabel");function J5(e,{projectWorkspaceById:t,defaultProjectWorkspaceIdByProjectId:s}){if(!e.projectId)return null;const l=s?.get(e.projectId)??null;return l?{id:l,label:Z5(t?.get(l)?.name)}:null}r(J5,"resolveDefaultProjectWorkspaceInfo");function aC(e,{executionWorkspaceById:t,projectWorkspaceById:s,defaultProjectWorkspaceIdByProjectId:l}){const c=e.projectId?l?.get(e.projectId)??null:null;if(e.executionWorkspaceId){const u=t?.get(e.executionWorkspaceId)??null,p=u?.projectWorkspaceId??e.projectWorkspaceId??null;if(u?.mode==="shared_workspace"&&p===c)return null;const f=u?.name;if(f)return f}if(e.projectWorkspaceId){if(e.projectWorkspaceId===c)return null;const u=s?.get(e.projectWorkspaceId)?.name;if(u)return u}return null}r(aC,"resolveIssueWorkspaceName");function eO(e,{executionWorkspaceById:t,projectWorkspaceById:s,defaultProjectWorkspaceIdByProjectId:l}={}){const c=J5(e,{projectWorkspaceById:s,defaultProjectWorkspaceIdByProjectId:l});if(e.executionWorkspaceId){const u=t?.get(e.executionWorkspaceId)??null,p=u?.projectWorkspaceId??e.projectWorkspaceId??null;if(u?.mode==="shared_workspace"&&p!=null&&p===c?.id&&c)return{key:`workspace:project:${c.id}`,label:c.label};const f=u?.name?.trim();if(f)return{key:`workspace:execution:${e.executionWorkspaceId}`,label:f}}if(e.projectWorkspaceId){if(e.projectWorkspaceId===c?.id)return{key:`workspace:project:${c.id}`,label:c.label};const u=s?.get(e.projectWorkspaceId)?.name?.trim();if(u)return{key:`workspace:project:${e.projectWorkspaceId}`,label:u}}return c?{key:`workspace:project:${c.id}`,label:c.label}:{key:"workspace:none",label:"No workspace"}}r(eO,"resolveIssueWorkspaceGroup");function EG(){try{return localStorage.getItem(XN)!=="false"}catch{return!0}}r(EG,"loadInboxNesting");function IG(e){try{localStorage.setItem(XN,String(e))}catch{}}r(IG,"saveInboxNesting");function TG(e,t){return e&&!t}r(TG,"resolveInboxNestingEnabled");function Dj(){try{const e=localStorage.getItem(YN);return e==="all"||e==="unread"||e==="recent"||e==="mine"||e==="blocked"?e:"mine"}catch{return"mine"}}r(Dj,"loadLastInboxTab");function RG(e){try{localStorage.setItem(YN,e)}catch{}}r(RG,"saveLastInboxTab");function MG(e){return e==="mine"}r(MG,"isMineInboxTab");function DG(e){return e==="all"}r(DG,"shouldShowCompanyAlerts");function OG(e,t){return t===0||e<0?-1:Math.min(e,t-1)}r(OG,"resolveInboxSelectionIndex");function tO(e,t,s){return t===0?-1:e<0?0:s==="next"?Math.min(e+1,t-1):Math.max(e-1,0)}r(tO,"getInboxKeyboardSelectionIndex");function LG(e){const t=[...e].sort((l,c)=>new Date(c.createdAt).getTime()-new Date(l.createdAt).getTime()),s=new Map;for(const l of t)s.has(l.agentId)||s.set(l.agentId,l);return Array.from(s.values()).filter(l=>H5.has(l.status))}r(LG,"getLatestFailedRunsByAgent");function ss(e){if(!e)return 0;const t=new Date(e).getTime();return Number.isFinite(t)?t:0}r(ss,"normalizeTimestamp");function rf(e){const t=ss(e.lastActivityAt);if(t>0)return t;const s=ss(e.lastExternalCommentAt);return s>0?s:ss(e.updatedAt)}r(rf,"issueLastActivityTimestamp");function Ic(e,t){const s=rf(t)-rf(e);return s!==0?s:ss(t.updatedAt)-ss(e.updatedAt)}r(Ic,"sortIssuesByMostRecentActivity");function nO(e){return[...e].sort(Ic).slice(0,100)}r(nO,"getRecentTouchedIssues");function zG(e,t,s,l){const c=[...e].sort((u,p)=>ss(p.updatedAt)-ss(u.updatedAt));return t==="mine"?c.filter(u=>sC(u,l)):t==="recent"?c:t==="unread"?c.filter(u=>sf.has(u.status)):s==="all"?c:c.filter(u=>{const p=sf.has(u.status);return s==="actionable"?p:!p})}r(zG,"getApprovalsForTab");function sC(e,t){return sf.has(e.status)?!0:t?e.requestedByUserId===t||e.decidedByUserId===t:!1}r(sC,"isApprovalVisibleInMine");function mh(e){const t=ss(e.updatedAt);return t>0?t:ss(e.createdAt)}r(mh,"approvalActivityTimestamp");function PG({issues:e,approvals:t,failedRuns:s=[],joinRequests:l=[]}){return[...e.map(c=>({kind:"issue",timestamp:rf(c),issue:c})),...t.map(c=>({kind:"approval",timestamp:mh(c),approval:c})),...s.map(c=>({kind:"failed_run",timestamp:ss(c.createdAt),run:c})),...l.map(c=>({kind:"join_request",timestamp:ss(c.createdAt),joinRequest:c}))].sort((c,u)=>{const p=u.timestamp-c.timestamp;return p!==0?p:c.kind==="issue"&&u.kind==="issue"?Ic(c.issue,u.issue):c.kind==="approval"&&u.kind==="approval"?mh(u.approval)-mh(c.approval):c.kind==="approval"?-1:1})}r(PG,"getInboxWorkItems");var aO=["issue","approval","failed_run","join_request"],iC={issue:"Tasks",approval:"Approvals",failed_run:"Failed runs",join_request:"Join requests"};function sO(e,{agentById:t,currentUserId:s,userLabelById:l}){if(e.assigneeAgentId){const c=t?.get(e.assigneeAgentId)?.trim();return{key:`assignee:agent:${e.assigneeAgentId}`,label:c||e.assigneeAgentId.slice(0,8)}}return e.assigneeUserId?{key:`assignee:user:${e.assigneeUserId}`,label:Vr(e.assigneeUserId,s,l)??"User"}:{key:"assignee:none",label:"Unassigned"}}r(sO,"resolveIssueAssigneeGroup");function iO(e,{projectById:t}){if(!e.projectId)return{key:"project:none",label:"No project"};const s=t?.get(e.projectId)?.name?.trim();return{key:`project:${e.projectId}`,label:s||e.projectId.slice(0,8)}}r(iO,"resolveIssueProjectGroup");function hh(e,t){const s=new Map;for(const l of e){const c=l.kind==="issue"?t(l.issue):{key:`kind:${l.kind}`,label:iC[l.kind]},u=s.get(c.key);u?(u.items.push(l),u.latestTimestamp=Math.max(u.latestTimestamp,l.timestamp)):s.set(c.key,{label:c.label,items:[l],latestTimestamp:l.timestamp})}return[...s.entries()].map(([l,c])=>({key:l,label:c.label,items:c.items,latestTimestamp:c.latestTimestamp})).sort((l,c)=>{const u=c.latestTimestamp-l.latestTimestamp;return u!==0?u:l.label.localeCompare(c.label)}).map(({key:l,label:c,items:u})=>({key:l,label:c,items:u}))}r(hh,"groupInboxWorkItemsByIssueGroup");function rO(e,t,s={}){if(t==="none")return[{key:"__all",label:null,items:e}];if(t==="workspace")return hh(e,u=>eO(u,s));if(t==="assignee")return hh(e,u=>sO(u,s));if(t==="project")return hh(e,u=>iO(u,s));const l=new Map;for(const u of e){const p=l.get(u.kind)??[];p.push(u),l.set(u.kind,p)}const c=[];for(const u of aO){const p=l.get(u)??[];p.length!==0&&c.push({key:u,label:iC[u],items:p})}return c}r(rO,"groupInboxWorkItems");function lO(e){return e.replace(/^archived-search:/,"").replace(/^other-search:/,"")}r(lO,"stripInboxSearchGroupPrefix");function oO(e){return e.find(t=>t.kind==="issue")?.issue??null}r(oO,"firstIssueFromInboxWorkItems");function Oj(e,t,s){return e?t.projectWorkspaceById?.get(e)?.projectId??(s?.projectWorkspaceId===e?s.projectId:null):s?.projectId??null}r(Oj,"projectIdForProjectWorkspace");function $G(e,t,s,l={}){const c=oO(s);if(!c)return null;const u=lO(e);if(t==="project"){if(!u.startsWith("project:"))return{};const p=u.slice(8);return p&&p!=="none"?{projectId:p}:{}}if(t==="assignee"){if(u.startsWith("assignee:agent:")){const p=u.slice(15);return p?{assigneeAgentId:p}:{}}if(u.startsWith("assignee:user:")){const p=u.slice(14);return p?{assigneeUserId:p}:{}}return{}}if(t==="workspace"){if(u.startsWith("workspace:execution:")){const p=u.slice(20);if(!p)return{};const f=l.executionWorkspaceById?.get(p)??null,h=f?.projectWorkspaceId??(c.executionWorkspaceId===p?c.projectWorkspaceId:null),g=f?.projectId??Oj(h,l,c);return{executionWorkspaceId:p,executionWorkspaceMode:"reuse_existing",...g?{projectId:g}:{},...h?{projectWorkspaceId:h}:{}}}if(u.startsWith("workspace:project:")){const p=u.slice(18);if(!p)return{};const f=Oj(p,l,c);return{...f?{projectId:f}:{},projectWorkspaceId:p}}}return{}}r($G,"buildInboxIssueGroupCreateDefaults");function cO(e){const t=[],s=[];for(const f of e)f.kind==="issue"?t.push(f):s.push(f);const l=new Set(t.map(f=>f.issue.id)),c=new Map,u=new Set;for(const f of t){const{issue:h}=f;if(h.parentId&&l.has(h.parentId)){u.add(h.id);const g=c.get(h.parentId)??[];g.push(h),c.set(h.parentId,g)}}const p=r((f,h=new Set)=>{const g=rf(f);if(h.has(f.id))return g;const v=new Set(h);v.add(f.id);const y=c.get(f.id)??[];return y.length===0?g:Math.max(g,...y.map(j=>p(j,v)))},"subtreeActivityTimestamp");for(const f of c.values())f.sort((h,g)=>{const v=p(g)-p(h);return v!==0?v:Ic(h,g)});return{displayItems:[...t.filter(f=>!u.has(f.issue.id)).map(f=>{const h=c.get(f.issue.id);if(!h?.length)return f;const g=Math.max(...h.map(v=>p(v)));return{...f,timestamp:Math.max(f.timestamp,g)}}),...s].sort((f,h)=>{const g=h.timestamp-f.timestamp;return g!==0?g:f.kind==="issue"&&h.kind==="issue"?Ic(f.issue,h.issue):0}),childrenByIssueId:c}}r(cO,"buildInboxNesting");function UG(e,t,s,l){const c=l?.keyPrefix??"",u=l?.searchSection??"none",p=l?.nestingEnabled??!1;return u!=="none"&&e.length===0?[]:rO(e,t,s).map(f=>{const h=p&&f.items.some(g=>g.kind==="issue")?cO(f.items):{displayItems:f.items,childrenByIssueId:new Map};return{key:`${c}${f.key}`,label:f.label,displayItems:h.displayItems,childrenByIssueId:h.childrenByIssueId,searchSection:u}})}r(UG,"buildGroupedInboxSections");function uO(e){return e.kind==="issue"?`issue:${e.issue.id}`:e.kind==="approval"?`approval:${e.approval.id}`:e.kind==="failed_run"?`run:${e.run.id}`:`join:${e.joinRequest.id}`}r(uO,"getInboxWorkItemKey");function BG(e,t,s){const l=[];for(const c of e){const u=t.has(c.key);if(c.label&&l.push({type:"group",groupKey:c.key,label:c.label,collapsed:u}),u)continue;const p=r((f,h)=>{const g=c.childrenByIssueId.get(f);if(!(!g?.length||s.has(f)))for(const v of g){if(h.has(v.id))continue;const y=new Set(h);y.add(v.id),l.push({type:"child",issueId:v.id,issue:v}),p(v.id,y)}},"addIssueChildren");for(const f of c.displayItems)l.push({type:"top",itemKey:`${c.key}:${uO(f)}`,item:f}),f.kind==="issue"&&p(f.issue.id,new Set([f.issue.id]))}return l}r(BG,"buildInboxKeyboardNavEntries");function KG({tab:e,hasItems:t,showOnMine:s,showOnRecent:l,showOnUnread:c,showOnAll:u}){return t?e==="mine"?s:e==="recent"?l:e==="unread"?c:u:!1}r(KG,"shouldShowInboxSection");function dO({approvals:e,joinRequests:t,dashboard:s,failedRuns:l,mineIssues:c,dismissedAlerts:u,dismissedAtByKey:p,currentUserId:f}){const h=e.filter(C=>sC(C,f)&&sf.has(C.status)&&!Tj(p,`approval:${C.id}`,C.updatedAt)).length,g=t.filter(C=>!Tj(p,`join:${C.id}`,C.updatedAt??C.createdAt)).length,v=c.filter(C=>C.isUnreadForMe).length,y=s?.agents.error??0,j=s?.costs.monthBudgetCents??0,k=s?.costs.monthUtilizationPercent??0,S=y>0&&l===0&&!u.has("alert:agent-errors"),N=j>0&&k>=80&&!u.has("alert:budget"),I=Number(S)+Number(N);return{inbox:h+g+l+v,approvals:h,failedRuns:l,joinRequests:g,mineIssues:v,alerts:I}}r(dO,"computeInboxBadgeData");var fO="backlog,todo,in_progress,in_review,blocked,done",pO=500,mO=3e4;function hO(){const[e,t]=(0,x.useState)(Ij);return(0,x.useEffect)(()=>{const l=r(c=>{c.key==="wardmote:inbox:dismissed"&&t(Ij())},"handleStorage");return window.addEventListener("storage",l),()=>window.removeEventListener("storage",l)},[]),{dismissed:e,dismiss:r(l=>{t(c=>{const u=new Set(c);return u.add(l),Q5(u),u})},"dismiss")}}r(hO,"useDismissedInboxAlerts");function gO(e){const t=kn(),s=e?$.inboxDismissals(e):["inbox-dismissals","__disabled__"],{data:l=[]}=me({queryKey:s,queryFn:r(()=>dd.list(e),"queryFn"),enabled:!!e}),c=Bt({mutationFn:r(({itemKey:j})=>dd.dismiss(e,j),"mutationFn"),onMutate:r(async({itemKey:j})=>{if(!e)return{previous:[]};await t.cancelQueries({queryKey:s});const k=t.getQueryData(s)??[],S=new Date;return t.setQueryData(s,[{id:`optimistic:${j}`,companyId:e,userId:"me",itemKey:j,dismissedAt:S,createdAt:S,updatedAt:S},...k.filter(N=>N.itemKey!==j)]),{previous:k}},"onMutate"),onError:r((j,k,S)=>{S&&t.setQueryData(s,S.previous)},"onError"),onSettled:r(()=>{e&&u()},"onSettled")});function u(){e&&(t.invalidateQueries({queryKey:s}),t.invalidateQueries({queryKey:$.sidebarBadges(e)}),t.invalidateQueries({queryKey:$.attention(e)}))}r(u,"invalidateDismissalConsumers");const p=Bt({mutationFn:r(({itemKey:j,snoozedUntil:k})=>dd.snooze(e,j,k),"mutationFn"),onSettled:u}),f=Bt({mutationFn:r(({itemKey:j})=>dd.restore(e,j),"mutationFn"),onSettled:u}),h=(0,x.useMemo)(()=>G5(l),[l]),g=c.mutate,v=p.mutate,y=f.mutate;return{dismissals:l,dismissedAtByKey:h,dismiss:(0,x.useCallback)(j=>g({itemKey:j}),[g]),snooze:(0,x.useCallback)((j,k)=>v({itemKey:j,snoozedUntil:k}),[v]),restore:(0,x.useCallback)(j=>y({itemKey:j}),[y]),isPending:c.isPending||p.isPending||f.isPending}}r(gO,"useInboxDismissals");function qG(){const[e,t]=(0,x.useState)(Rj);return(0,x.useEffect)(()=>{const c=r(u=>{u.key==="wardmote:inbox:read-items"&&t(Rj())},"handleStorage");return window.addEventListener("storage",c),()=>window.removeEventListener("storage",c)},[]),{readItems:e,markRead:r(c=>{t(u=>{const p=new Set(u);return p.add(c),Mj(p),p})},"markRead"),markUnread:r(c=>{t(u=>{const p=new Set(u);return p.delete(c),Mj(p),p})},"markUnread")}}r(qG,"useReadInboxItems");function Y0(e){const t=J3(e),{dismissed:s}=hO(),{dismissedAtByKey:l}=gO(e),{data:c}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),{data:u=[]}=me({queryKey:$.approvals.list(e),queryFn:r(()=>VN.list(e),"queryFn"),enabled:!!e}),{data:p=[]}=me({queryKey:$.access.joinRequests(e),queryFn:r(async()=>{try{return await ti.listJoinRequests(e,"pending_approval")}catch(R){if(R instanceof Ti&&(R.status===401||R.status===403))return[];throw R}},"queryFn"),enabled:!!e,retry:!1}),f=$.dashboard(e),h=Ac({companyId:e,resourceKey:"dashboard",queryKey:f,enabled:!!e}),{data:g,dataUpdatedAt:v}=me({queryKey:f,queryFn:r(()=>F5.summary(e),"queryFn"),enabled:!!e});_c(h,g,v);const y=$.issues.listMineByMe(e),j=Ac({companyId:e,resourceKey:"inbox-badge:mine-issues",queryKey:y,enabled:!!e}),{data:k=[],dataUpdatedAt:S}=me({queryKey:y,queryFn:r(()=>cn.listCompact(e,{touchedByUserId:"me",inboxArchivedByUserId:"me",status:fO,limit:pO}).then(R=>R),"queryFn"),enabled:!!e,refetchOnWindowFocus:!1,staleTime:mO});_c(j,k,S);const N=(0,x.useMemo)(()=>nO(eT(e,k)),[e,t,k]),I=c?.user.id??c?.session.userId??null,{data:C}=me({queryKey:e?$.sidebarBadges(e):["sidebar-badges","__disabled__"],queryFn:r(async()=>{try{return await WN.get(e)}catch(R){if(R instanceof Ti&&(R.status===401||R.status===403))return null;throw R}},"queryFn"),enabled:!!e,retry:!1}),M=C?.failedRuns??0;return(0,x.useMemo)(()=>dO({approvals:u,joinRequests:p,dashboard:g,failedRuns:M,mineIssues:N,dismissedAlerts:s,dismissedAtByKey:l,currentUserId:I}),[u,p,g,M,N,s,l,I])}r(Y0,"useInboxBadge");var xO=new Set(["detailTab","taskDetailView","contextMenuItem","commentAnnotation","commentContextMenuItem","projectSidebarItem","toolbarButton"]),rC=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(","),bO=1e3,vO=new Set(yE),lC=(0,x.createContext)(null);function yO(e){return e instanceof Error&&e.message?e.message:"Unknown error"}r(yO,"getErrorMessage");function jO(e,t,s){return{companyId:e.companyId??null,companyPrefix:e.companyPrefix??null,projectId:e.projectId??(e.entityType==="project"?e.entityId??null:null),entityId:e.entityId??null,entityType:e.entityType??null,userId:s,renderEnvironment:t}}r(jO,"buildLauncherHostContext");function wO(e){if(!e)return;const t=e.querySelector(rC);if(t){t.focus();return}e.focus()}r(wO,"focusFirstElement");function Lj(e,t){if(/^https?:\/\//.test(e)||e.startsWith("/")||e.startsWith("#")||e.startsWith(".")||e.startsWith("?"))return e;const s=t.companyPrefix?.trim();return s?`/${s}/${e}`:e}r(Lj,"resolveLauncherNavigationTarget");function kO(e){if(e.action.type!=="navigate"&&e.action.type!=="deepLink"||/^https?:\/\//.test(e.action.target))return null;const[t]=e.action.target.split(/[?#]/,1),s=t?.split("/").filter(Boolean).at(-1);return s?s.toLowerCase():null}r(kO,"launcherRoutePath");function SO(e,t){if(e.placementZone!=="sidebar"||!t)return e.displayName;const s=kO(e);return s?t.slots.find(l=>l.type==="routeSidebar"&&l.routePath?.toLowerCase()===s)?.displayName??e.displayName:e.displayName}r(SO,"launcherDisplayName");function NO(e,t){if(t.key!=="Tab")return;const s=Array.from(e.querySelectorAll(rC)).filter(p=>!p.hasAttribute("disabled")&&p.tabIndex!==-1);if(s.length===0){t.preventDefault(),e.focus();return}const l=s[0],c=s[s.length-1],u=document.activeElement;if(t.shiftKey&&u===l){t.preventDefault(),c.focus();return}!t.shiftKey&&u===c&&(t.preventDefault(),l.focus())}r(NO,"trapFocus");function CO(e){switch(e){case"projectSidebarItem":return"justify-start h-auto px-3 py-1 text-[12px] font-normal text-ink-3 hover:text-ink";case"contextMenuItem":case"commentContextMenuItem":return"justify-start h-7 w-full px-2 text-xs font-normal";case"sidebar":case"sidebarPanel":return"justify-start h-8 w-full";case"toolbarButton":case"globalToolbarButton":return"h-8";default:return"h-8"}}r(CO,"launcherTriggerClassName");function oC(e){switch(e){case"compact":return{width:"min(28rem, calc(100vw - 2rem))"};case"wide":return{width:"min(64rem, calc(100vw - 2rem))"};case"full":return{width:"calc(100vw - 2rem)",height:"calc(100vh - 2rem)"};case"inline":return{width:"min(24rem, calc(100vw - 2rem))"};default:return{width:"min(40rem, calc(100vw - 2rem))"}}}r(oC,"launcherShellBoundsStyle");function AO(e){const t=e.sourceRect,s=oC(e.bounds).width??"min(24rem, calc(100vw - 2rem))";return t?{width:s,maxHeight:"min(70vh, 36rem)",top:Math.min(t.bottom+8,window.innerHeight-32),left:Math.min(Math.max(t.left,16),Math.max(16,window.innerWidth-360))}:{width:s,maxHeight:"min(70vh, 36rem)",top:"4rem",left:"50%",transform:"translateX(-50%)"}}r(AO,"launcherPopoverStyle");function _O(e){return typeof e=="string"&&vO.has(e)}r(_O,"isPluginLauncherBounds");function cC(e){const t=e.enabled??!0,{data:s,isLoading:l,error:c}=me({queryKey:$.plugins.uiContributions,queryFn:r(()=>D0.listUiContributions(),"queryFn"),enabled:t}),u=(0,x.useMemo)(()=>[...e.placementZones].sort().join("|"),[e.placementZones]),p=(0,x.useMemo)(()=>{const f=new Map;for(const h of s??[])f.set(h.pluginId,h);return f},[s]);return{launchers:(0,x.useMemo)(()=>{const f=new Set(u.split("|").filter(Boolean)),h=[];for(const g of s??[])for(const v of g.launchers)f.has(v.placementZone)&&(xO.has(v.placementZone)&&(!e.entityType||!v.entityTypes?.includes(e.entityType))||h.push({...v,pluginId:g.pluginId,pluginKey:g.pluginKey,pluginDisplayName:g.displayName,pluginVersion:g.version,uiEntryFile:g.uiEntryFile}));return h.sort((g,v)=>{const y=g.order??Number.MAX_SAFE_INTEGER,j=v.order??Number.MAX_SAFE_INTEGER;if(y!==j)return y-j;const k=g.pluginDisplayName.localeCompare(v.pluginDisplayName);return k!==0?k:g.displayName.localeCompare(v.displayName)}),h},[s,e.entityType,u]),contributionsByPluginId:p,isLoading:t&&l,errorMessage:c?yO(c):null}}r(cC,"usePluginLaunchers");async function EO(e,t){const s=t.action.target,l=Zy(t.pluginKey,s);return l||(await gT(e),Zy(t.pluginKey,s))}r(EO,"resolveLauncherComponent");function IO({pluginId:e,hostContext:t,children:s}){const l=(0,x.useMemo)(()=>({pluginId:e,hostContext:t}),[e,t]);return(0,a.jsx)(xT.Provider,{value:l,children:s})}r(IO,"PluginLauncherBridgeScope");var TO=class extends x.Component{static{r(this,"LauncherErrorBoundary")}state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){}render(){return this.state.hasError?(0,a.jsxs)("div",{className:"rounded-md border border-bad/30 bg-bad/5 p-3 text-sm text-bad",children:[this.props.launcher.pluginDisplayName,": failed to render"]}):this.props.children}};function RO({instance:e,renderEnvironment:t}){const s=e.component,{data:l}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),c=l?.user?.id??l?.session?.userId??null,u=(0,x.useMemo)(()=>jO(e.hostContext,t,c),[e.hostContext,t,c]);if(!s)return t.environment==="iframe"?(0,a.jsx)("iframe",{src:`/_plugins/${encodeURIComponent(e.launcher.pluginId)}/ui/${e.launcher.action.target}`,title:`${e.launcher.pluginDisplayName} ${e.launcher.displayName}`,className:"h-full min-h-[24rem] w-full rounded-md border border-line bg-bg"}):(0,a.jsxs)("div",{className:"rounded-md border border-bad/30 bg-bad/5 p-3 text-sm text-bad",children:[e.launcher.pluginDisplayName,': could not resolve launcher target "',e.launcher.action.target,'".']});if(s.kind==="web-component")return(0,x.createElement)(s.tagName,{className:"block w-full",pluginLauncher:e.launcher,pluginContext:u});const p=(0,x.createElement)(s.component,{launcher:e.launcher,context:u});return(0,a.jsx)(TO,{launcher:e.launcher,children:(0,a.jsx)(IO,{pluginId:e.launcher.pluginId,hostContext:u,children:p})})}r(RO,"LauncherRenderContent");function MO({instance:e,stackIndex:t,isTopmost:s,requestBounds:l,closeLauncher:c}){const u=(0,x.useRef)(null),p=(0,x.useId)();(0,x.useEffect)(()=>{if(!s)return;const y=requestAnimationFrame(()=>{wO(u.current)});return()=>cancelAnimationFrame(y)},[s]),(0,x.useEffect)(()=>{if(!s)return;const y=r(j=>{if(u.current){if(j.key==="Escape"){j.preventDefault(),c(e.key,{reason:"escapeKey",nativeEvent:j});return}NO(u.current,j)}},"handleKeyDown");return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[c,e.key,s]);const f=(0,x.useMemo)(()=>({environment:e.launcher.render?.environment??"hostOverlay",launcherId:e.launcher.id,bounds:e.bounds,requestModalBounds:r(y=>l(e.key,y),"requestModalBounds"),closeLifecycle:{onBeforeClose:r(y=>(e.beforeCloseHandlers.add(y),()=>e.beforeCloseHandlers.delete(y)),"onBeforeClose"),onClose:r(y=>(e.closeHandlers.add(y),()=>e.closeHandlers.delete(y)),"onClose")}}),[e,l]),h=bO+t*20,g=e.launcher.action.type,v=g==="openPopover"?AO(e):oC(e.bounds);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-black/45",style:{zIndex:h},"aria-hidden":"true",onMouseDown:r(y=>{s&&y.target===y.currentTarget&&c(e.key,{reason:"backdrop",nativeEvent:y})},"onMouseDown")}),(0,a.jsxs)("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":p,tabIndex:-1,className:g==="openDrawer"?"fixed right-0 top-0 h-full max-w-[min(44rem,100vw)] overflow-hidden border-l border-line bg-bg shadow-2xl":g==="openPopover"?"fixed overflow-hidden rounded-xl border border-line bg-bg shadow-2xl":"fixed left-1/2 top-1/2 max-h-[calc(100vh-2rem)] -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-2xl border border-line bg-bg shadow-2xl",style:{zIndex:h+1,...g==="openDrawer"?{width:v.width??"min(44rem, 100vw)"}:v},onMouseDown:r(y=>y.stopPropagation(),"onMouseDown"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 border-b border-line px-4 py-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{id:p,className:"truncate text-sm font-semibold",children:e.launcher.displayName}),(0,a.jsx)("p",{className:"truncate text-xs text-ink-3",children:e.launcher.pluginDisplayName})]}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"sm",className:"ml-auto",onClick:r(()=>{c(e.key,{reason:"programmatic"})},"onClick"),children:"Close"})]}),(0,a.jsx)("div",{className:Y("overflow-auto p-4",g==="openDrawer"?"h-[calc(100%-3.5rem)]":"max-h-[calc(100vh-7rem)]"),children:(0,a.jsx)(RO,{instance:e,renderEnvironment:f})})]})]})}r(MO,"LauncherModalShell");function DO({children:e}){const[t,s]=(0,x.useState)([]),l=(0,x.useRef)(t);l.current=t;const c=hn(),u=ja(),p=(0,x.useCallback)(async(v,y)=>{const j=l.current.find(k=>k.key===v);if(j){for(const k of[...j.beforeCloseHandlers])await k(y);s(k=>k.filter(S=>S.key!==v)),queueMicrotask(()=>{for(const k of[...j.closeHandlers])k(y);j.sourceElement&&document.contains(j.sourceElement)&&j.sourceElement.focus()})}},[]);(0,x.useEffect)(()=>{t.length!==0&&Promise.all(t.map(v=>p(v.key,{reason:"hostNavigation"})))},[c.key]);const f=(0,x.useCallback)(async(v,y)=>{_O(y.bounds)&&s(j=>j.map(k=>k.key===v?{...k,bounds:y.bounds}:k))},[]),h=(0,x.useCallback)(async(v,y,j,k)=>{switch(v.action.type){case"navigate":u(Lj(v.action.target,y));return;case"deepLink":/^https?:\/\//.test(v.action.target)?window.open(v.action.target,"_blank","noopener,noreferrer"):u(Lj(v.action.target,y));return;case"performAction":await D0.bridgePerformAction(v.pluginId,v.action.target,v.action.params,y.companyId??null);return;case"openModal":case"openDrawer":case"openPopover":{const S=await EO(j,v),N=k?.getBoundingClientRect()??null,I={key:`${v.pluginId}:${v.id}:${Date.now()}:${Math.random().toString(36).slice(2,8)}`,launcher:v,hostContext:y,contribution:j,component:S,sourceElement:k??null,sourceRect:N,bounds:v.render?.bounds??"default",beforeCloseHandlers:new Set,closeHandlers:new Set};s(C=>[...C,I]);return}}},[u]),g=(0,x.useMemo)(()=>({activateLauncher:h}),[h]);return(0,a.jsxs)(lC.Provider,{value:g,children:[e,t.map((v,y)=>(0,a.jsx)(MO,{instance:v,stackIndex:y,isTopmost:y===t.length-1,requestBounds:f,closeLauncher:p},v.key))]})}r(DO,"PluginLauncherProvider");function OO(){const e=(0,x.useContext)(lC);if(!e)throw new Error("usePluginLauncherRuntime must be used within PluginLauncherProvider");return e}r(OO,"usePluginLauncherRuntime");function LO({displayName:e,launcher:t,placementZone:s,onClick:l}){return(0,a.jsx)(oe,{type:"button",variant:s==="toolbarButton"||s==="globalToolbarButton"?"secondary":"ghost",size:"sm",className:CO(s),onClick:l,children:e??t.displayName})}r(LO,"DefaultLauncherTrigger");function uC({placementZones:e,context:t,entityType:s,className:l,itemClassName:c,errorClassName:u,errorBehavior:p="inline"}){const{activateLauncher:f}=OO(),{launchers:h,contributionsByPluginId:g,errorMessage:v}=cC({placementZones:e,entityType:s,companyId:t.companyId,enabled:!!t.companyId});return v&&p==="inline"?(0,a.jsxs)("div",{className:Y("rounded-md border border-bad/30 bg-bad/5 px-2 py-1 text-xs text-bad",u),children:["Plugin launchers unavailable: ",v]}):h.length===0?null:(0,a.jsx)("div",{className:l,children:h.map(y=>(0,a.jsx)("div",{className:c,children:(0,a.jsx)(LO,{displayName:SO(y,g.get(y.pluginId)),launcher:y,placementZone:y.placementZone,onClick:r(j=>{const k=g.get(y.pluginId);k&&f(y,t,k,j.currentTarget)},"onClick")})},`${y.pluginKey}:${y.id}`))})}r(uC,"PluginLauncherOutlet");function zO(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,x.useMemo)(()=>l=>{t.forEach(c=>c(l))},t)}r(zO,"useCombinedRefs");var Vf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function yo(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}r(yo,"isWindow");function X0(e){return"nodeType"in e}r(X0,"isNode");function Oa(e){var t,s;return e?yo(e)?e:X0(e)&&(t=(s=e.ownerDocument)==null?void 0:s.defaultView)!=null?t:window:window}r(Oa,"getWindow");function Z0(e){const{Document:t}=Oa(e);return e instanceof t}r(Z0,"isDocument");function Wc(e){return yo(e)?!1:e instanceof Oa(e).HTMLElement}r(Wc,"isHTMLElement");function dC(e){return e instanceof Oa(e).SVGElement}r(dC,"isSVGElement");function jo(e){return e?yo(e)?e.document:X0(e)?Z0(e)?e:Wc(e)||dC(e)?e.ownerDocument:document:document:document}r(jo,"getOwnerDocument");var Ls=Vf?x.useLayoutEffect:x.useEffect;function Wf(e){const t=(0,x.useRef)(e);return Ls(()=>{t.current=e}),(0,x.useCallback)(function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return t.current==null?void 0:t.current(...l)},[])}r(Wf,"useEvent");function PO(){const e=(0,x.useRef)(null);return[(0,x.useCallback)((t,s)=>{e.current=setInterval(t,s)},[]),(0,x.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}r(PO,"useInterval");function Tc(e,t){t===void 0&&(t=[e]);const s=(0,x.useRef)(e);return Ls(()=>{s.current!==e&&(s.current=e)},t),s}r(Tc,"useLatestValue");function Qc(e,t){const s=(0,x.useRef)();return(0,x.useMemo)(()=>{const l=e(s.current);return s.current=l,l},[...t])}r(Qc,"useLazyMemo");function lf(e){const t=Wf(e),s=(0,x.useRef)(null);return[s,(0,x.useCallback)(l=>{l!==s.current&&t?.(l,s.current),s.current=l},[])]}r(lf,"useNodeRef");function of(e){const t=(0,x.useRef)();return(0,x.useEffect)(()=>{t.current=e},[e]),t.current}r(of,"usePrevious");var gh={};function Gc(e,t){return(0,x.useMemo)(()=>{if(t)return t;const s=gh[e]==null?0:gh[e]+1;return gh[e]=s,e+"-"+s},[e,t])}r(Gc,"useUniqueId");function fC(e){return function(t){for(var s=arguments.length,l=new Array(s>1?s-1:0),c=1;c<s;c++)l[c-1]=arguments[c];return l.reduce((u,p)=>{const f=Object.entries(p);for(const[h,g]of f){const v=u[h];v!=null&&(u[h]=v+e*g)}return u},{...t})}}r(fC,"createAdjustmentFn");var lo=fC(1),Rc=fC(-1);function $O(e){return"clientX"in e&&"clientY"in e}r($O,"hasViewportRelativeCoordinates");function Qf(e){if(!e)return!1;const{KeyboardEvent:t}=Oa(e.target);return t&&e instanceof t}r(Qf,"isKeyboardEvent");function UO(e){if(!e)return!1;const{TouchEvent:t}=Oa(e.target);return t&&e instanceof t}r(UO,"isTouchEvent");function cf(e){if(UO(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:s}=e.touches[0];return{x:t,y:s}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:s}=e.changedTouches[0];return{x:t,y:s}}}return $O(e)?{x:e.clientX,y:e.clientY}:null}r(cf,"getEventCoordinates");var ni=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:s}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(s?Math.round(s):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:s}=e;return"scaleX("+t+") scaleY("+s+")"}},Transform:{toString(e){if(e)return[ni.Translate.toString(e),ni.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:s,easing:l}=e;return t+" "+s+"ms "+l}}}),zj="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function BO(e){return e.matches(zj)?e:e.querySelector(zj)}r(BO,"findFirstFocusableNode");var KO={display:"none"};function qO(e){let{id:t,value:s}=e;return x.createElement("div",{id:t,style:KO},s)}r(qO,"HiddenText");function FO(e){let{id:t,announcement:s,ariaLiveType:l="assertive"}=e;return x.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":l,"aria-atomic":!0},s)}r(FO,"LiveRegion");function HO(){const[e,t]=(0,x.useState)("");return{announce:(0,x.useCallback)(s=>{s!=null&&t(s)},[]),announcement:e}}r(HO,"useAnnouncement$1");var pC=(0,x.createContext)(null);function VO(e){const t=(0,x.useContext)(pC);(0,x.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}r(VO,"useDndMonitor");function WO(){const[e]=(0,x.useState)(()=>new Set),t=(0,x.useCallback)(s=>(e.add(s),()=>e.delete(s)),[e]);return[(0,x.useCallback)(s=>{let{type:l,event:c}=s;e.forEach(u=>{var p;return(p=u[l])==null?void 0:p.call(u,c)})},[e]),t]}r(WO,"useDndMonitorProvider");var QO={draggable:`
|
|
5
|
+
To pick up a draggable item, press the space bar.
|
|
6
|
+
While dragging, use the arrow keys to move the item.
|
|
7
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
8
|
+
`},GO={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:s}=e;return s?"Draggable item "+t.id+" was moved over droppable area "+s.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:s}=e;return s?"Draggable item "+t.id+" was dropped over droppable area "+s.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function YO(e){let{announcements:t=GO,container:s,hiddenTextDescribedById:l,screenReaderInstructions:c=QO}=e;const{announce:u,announcement:p}=HO(),f=Gc("DndLiveRegion"),[h,g]=(0,x.useState)(!1);if((0,x.useEffect)(()=>{g(!0)},[]),VO((0,x.useMemo)(()=>({onDragStart(y){let{active:j}=y;u(t.onDragStart({active:j}))},onDragMove(y){let{active:j,over:k}=y;t.onDragMove&&u(t.onDragMove({active:j,over:k}))},onDragOver(y){let{active:j,over:k}=y;u(t.onDragOver({active:j,over:k}))},onDragEnd(y){let{active:j,over:k}=y;u(t.onDragEnd({active:j,over:k}))},onDragCancel(y){let{active:j,over:k}=y;u(t.onDragCancel({active:j,over:k}))}}),[u,t])),!h)return null;const v=x.createElement(x.Fragment,null,x.createElement(qO,{id:l,value:c.draggable}),x.createElement(FO,{id:f,announcement:p}));return s?(0,Zl.createPortal)(v,s):v}r(YO,"Accessibility");var Xn;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Xn||(Xn={}));function uf(){}r(uf,"noop");function Mc(e,t){return(0,x.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}r(Mc,"useSensor");function J0(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,x.useMemo)(()=>[...t].filter(l=>l!=null),[...t])}r(J0,"useSensors");var zs=Object.freeze({x:0,y:0});function mC(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}r(mC,"distanceBetween");function XO(e,t){const s=cf(e);if(!s)return"0 0";const l={x:(s.x-t.left)/t.width*100,y:(s.y-t.top)/t.height*100};return l.x+"% "+l.y+"%"}r(XO,"getRelativeTransformOrigin");function hC(e,t){let{data:{value:s}}=e,{data:{value:l}}=t;return s-l}r(hC,"sortCollisionsAsc");function ZO(e,t){let{data:{value:s}}=e,{data:{value:l}}=t;return l-s}r(ZO,"sortCollisionsDesc");function Pj(e){let{left:t,top:s,height:l,width:c}=e;return[{x:t,y:s},{x:t+c,y:s},{x:t,y:s+l},{x:t+c,y:s+l}]}r(Pj,"cornersOfRectangle");function gC(e,t){if(!e||e.length===0)return null;const[s]=e;return t?s[t]:s}r(gC,"getFirstCollision");function $j(e,t,s){return t===void 0&&(t=e.left),s===void 0&&(s=e.top),{x:t+e.width*.5,y:s+e.height*.5}}r($j,"centerOfRectangle");var xC=r(e=>{let{collisionRect:t,droppableRects:s,droppableContainers:l}=e;const c=$j(t,t.left,t.top),u=[];for(const p of l){const{id:f}=p,h=s.get(f);if(h){const g=mC($j(h),c);u.push({id:f,data:{droppableContainer:p,value:g}})}}return u.sort(hC)},"closestCenter"),JO=r(e=>{let{collisionRect:t,droppableRects:s,droppableContainers:l}=e;const c=Pj(t),u=[];for(const p of l){const{id:f}=p,h=s.get(f);if(h){const g=Pj(h),v=c.reduce((j,k,S)=>j+mC(g[S],k),0),y=Number((v/4).toFixed(4));u.push({id:f,data:{droppableContainer:p,value:y}})}}return u.sort(hC)},"closestCorners");function eL(e,t){const s=Math.max(t.top,e.top),l=Math.max(t.left,e.left),c=Math.min(t.left+t.width,e.left+e.width),u=Math.min(t.top+t.height,e.top+e.height),p=c-l,f=u-s;if(l<c&&s<u){const h=t.width*t.height,g=e.width*e.height,v=p*f,y=v/(h+g-v);return Number(y.toFixed(4))}return 0}r(eL,"getIntersectionRatio");var tL=r(e=>{let{collisionRect:t,droppableRects:s,droppableContainers:l}=e;const c=[];for(const u of l){const{id:p}=u,f=s.get(p);if(f){const h=eL(f,t);h>0&&c.push({id:p,data:{droppableContainer:u,value:h}})}}return c.sort(ZO)},"rectIntersection");function nL(e,t,s){return{...e,scaleX:t&&s?t.width/s.width:1,scaleY:t&&s?t.height/s.height:1}}r(nL,"adjustScale");function bC(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:zs}r(bC,"getRectDelta");function aL(e){return r(function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];return c.reduce((p,f)=>({...p,top:p.top+e*f.y,bottom:p.bottom+e*f.y,left:p.left+e*f.x,right:p.right+e*f.x}),{...s})},"adjustClientRect")}r(aL,"createRectAdjustmentFn");var sL=aL(1);function vC(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}r(vC,"parseTransform");function iL(e,t,s){const l=vC(t);if(!l)return e;const{scaleX:c,scaleY:u,x:p,y:f}=l,h=e.left-p-(1-c)*parseFloat(s),g=e.top-f-(1-u)*parseFloat(s.slice(s.indexOf(" ")+1)),v=c?e.width/c:e.width,y=u?e.height/u:e.height;return{width:v,height:y,top:g,right:h+v,bottom:g+y,left:h}}r(iL,"inverseTransform");var rL={ignoreTransform:!1};function wo(e,t){t===void 0&&(t=rL);let s=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:v}=Oa(e).getComputedStyle(e);g&&(s=iL(s,g,v))}const{top:l,left:c,width:u,height:p,bottom:f,right:h}=s;return{top:l,left:c,width:u,height:p,bottom:f,right:h}}r(wo,"getClientRect");function Uj(e){return wo(e,{ignoreTransform:!0})}r(Uj,"getTransformAgnosticClientRect");function lL(e){const t=e.innerWidth,s=e.innerHeight;return{top:0,left:0,right:t,bottom:s,width:t,height:s}}r(lL,"getWindowClientRect");function oL(e,t){return t===void 0&&(t=Oa(e).getComputedStyle(e)),t.position==="fixed"}r(oL,"isFixed");function cL(e,t){t===void 0&&(t=Oa(e).getComputedStyle(e));const s=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(l=>{const c=t[l];return typeof c=="string"?s.test(c):!1})}r(cL,"isScrollable");function Gf(e,t){const s=[];function l(c){if(t!=null&&s.length>=t||!c)return s;if(Z0(c)&&c.scrollingElement!=null&&!s.includes(c.scrollingElement))return s.push(c.scrollingElement),s;if(!Wc(c)||dC(c)||s.includes(c))return s;const u=Oa(e).getComputedStyle(c);return c!==e&&cL(c,u)&&s.push(c),oL(c,u)?s:l(c.parentNode)}return r(l,"findScrollableAncestors"),e?l(e):s}r(Gf,"getScrollableAncestors");function yC(e){const[t]=Gf(e,1);return t??null}r(yC,"getFirstScrollableAncestor");function xh(e){return!Vf||!e?null:yo(e)?e:X0(e)?Z0(e)||e===jo(e).scrollingElement?window:Wc(e)?e:null:null}r(xh,"getScrollableElement");function jC(e){return yo(e)?e.scrollX:e.scrollLeft}r(jC,"getScrollXCoordinate");function wC(e){return yo(e)?e.scrollY:e.scrollTop}r(wC,"getScrollYCoordinate");function _g(e){return{x:jC(e),y:wC(e)}}r(_g,"getScrollCoordinates");var sa;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(sa||(sa={}));function kC(e){return!Vf||!e?!1:e===document.scrollingElement}r(kC,"isDocumentScrollingElement");function SC(e){const t={x:0,y:0},s=kC(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},l={x:e.scrollWidth-s.width,y:e.scrollHeight-s.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=l.y,isRight:e.scrollLeft>=l.x,maxScroll:l,minScroll:t}}r(SC,"getScrollPosition");var uL={x:.2,y:.2};function dL(e,t,s,l,c){let{top:u,left:p,right:f,bottom:h}=s;l===void 0&&(l=10),c===void 0&&(c=uL);const{isTop:g,isBottom:v,isLeft:y,isRight:j}=SC(e),k={x:0,y:0},S={x:0,y:0},N={height:t.height*c.y,width:t.width*c.x};return!g&&u<=t.top+N.height?(k.y=sa.Backward,S.y=l*Math.abs((t.top+N.height-u)/N.height)):!v&&h>=t.bottom-N.height&&(k.y=sa.Forward,S.y=l*Math.abs((t.bottom-N.height-h)/N.height)),!j&&f>=t.right-N.width?(k.x=sa.Forward,S.x=l*Math.abs((t.right-N.width-f)/N.width)):!y&&p<=t.left+N.width&&(k.x=sa.Backward,S.x=l*Math.abs((t.left+N.width-p)/N.width)),{direction:k,speed:S}}r(dL,"getScrollDirectionAndSpeed");function fL(e){if(e===document.scrollingElement){const{innerWidth:u,innerHeight:p}=window;return{top:0,left:0,right:u,bottom:p,width:u,height:p}}const{top:t,left:s,right:l,bottom:c}=e.getBoundingClientRect();return{top:t,left:s,right:l,bottom:c,width:e.clientWidth,height:e.clientHeight}}r(fL,"getScrollElementRect");function NC(e){return e.reduce((t,s)=>lo(t,_g(s)),zs)}r(NC,"getScrollOffsets");function pL(e){return e.reduce((t,s)=>t+jC(s),0)}r(pL,"getScrollXOffset");function mL(e){return e.reduce((t,s)=>t+wC(s),0)}r(mL,"getScrollYOffset");function CC(e,t){if(t===void 0&&(t=wo),!e)return;const{top:s,left:l,bottom:c,right:u}=t(e);yC(e)&&(c<=0||u<=0||s>=window.innerHeight||l>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}r(CC,"scrollIntoViewIfNeeded");var hL=[["x",["left","right"],pL],["y",["top","bottom"],mL]],ex=class{static{r(this,"Rect")}constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const s=Gf(t),l=NC(s);this.rect={...e},this.width=e.width,this.height=e.height;for(const[c,u,p]of hL)for(const f of u)Object.defineProperty(this,f,{get:r(()=>{const h=p(s),g=l[c]-h;return this.rect[f]+g},"get"),enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},bc=class{static{r(this,"Listeners")}constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var s;return(s=this.target)==null?void 0:s.removeEventListener(...t)})},this.target=e}add(e,t,s){var l;(l=this.target)==null||l.addEventListener(e,t,s),this.listeners.push([e,t,s])}};function gL(e){const{EventTarget:t}=Oa(e);return e instanceof t?e:jo(e)}r(gL,"getEventListenerTarget");function bh(e,t){const s=Math.abs(e.x),l=Math.abs(e.y);return typeof t=="number"?Math.sqrt(s**2+l**2)>t:"x"in t&&"y"in t?s>t.x&&l>t.y:"x"in t?s>t.x:"y"in t?l>t.y:!1}r(bh,"hasExceededDistance");var vs;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(vs||(vs={}));function Bj(e){e.preventDefault()}r(Bj,"preventDefault");function xL(e){e.stopPropagation()}r(xL,"stopPropagation");var Et;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Et||(Et={}));var AC={start:[Et.Space,Et.Enter],cancel:[Et.Esc],end:[Et.Space,Et.Enter,Et.Tab]},bL=r((e,t)=>{let{currentCoordinates:s}=t;switch(e.code){case Et.Right:return{...s,x:s.x+25};case Et.Left:return{...s,x:s.x-25};case Et.Down:return{...s,y:s.y+25};case Et.Up:return{...s,y:s.y-25}}},"defaultKeyboardCoordinateGetter"),tx=class{static{r(this,"KeyboardSensor")}constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new bc(jo(t)),this.windowListeners=new bc(Oa(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(vs.Resize,this.handleCancel),this.windowListeners.add(vs.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(vs.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,s=e.node.current;s&&CC(s),t(zs)}handleKeyDown(e){if(Qf(e)){const{active:t,context:s,options:l}=this.props,{keyboardCodes:c=AC,coordinateGetter:u=bL,scrollBehavior:p="smooth"}=l,{code:f}=e;if(c.end.includes(f)){this.handleEnd(e);return}if(c.cancel.includes(f)){this.handleCancel(e);return}const{collisionRect:h}=s.current,g=h?{x:h.left,y:h.top}:zs;this.referenceCoordinates||(this.referenceCoordinates=g);const v=u(e,{active:t,context:s.current,currentCoordinates:g});if(v){const y=Rc(v,g),j={x:0,y:0},{scrollableAncestors:k}=s.current;for(const S of k){const N=e.code,{isTop:I,isRight:C,isLeft:M,isBottom:R,maxScroll:_,minScroll:D}=SC(S),U=fL(S),K={x:Math.min(N===Et.Right?U.right-U.width/2:U.right,Math.max(N===Et.Right?U.left:U.left+U.width/2,v.x)),y:Math.min(N===Et.Down?U.bottom-U.height/2:U.bottom,Math.max(N===Et.Down?U.top:U.top+U.height/2,v.y))},z=N===Et.Right&&!C||N===Et.Left&&!M,E=N===Et.Down&&!R||N===Et.Up&&!I;if(z&&K.x!==v.x){const B=S.scrollLeft+y.x,O=N===Et.Right&&B<=_.x||N===Et.Left&&B>=D.x;if(O&&!y.y){S.scrollTo({left:B,behavior:p});return}O?j.x=S.scrollLeft-B:j.x=N===Et.Right?S.scrollLeft-_.x:S.scrollLeft-D.x,j.x&&S.scrollBy({left:-j.x,behavior:p});break}else if(E&&K.y!==v.y){const B=S.scrollTop+y.y,O=N===Et.Down&&B<=_.y||N===Et.Up&&B>=D.y;if(O&&!y.x){S.scrollTo({top:B,behavior:p});return}O?j.y=S.scrollTop-B:j.y=N===Et.Down?S.scrollTop-_.y:S.scrollTop-D.y,j.y&&S.scrollBy({top:-j.y,behavior:p});break}}this.handleMove(e,lo(Rc(v,this.referenceCoordinates),j))}}}handleMove(e,t){const{onMove:s}=this.props;e.preventDefault(),s(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};tx.activators=[{eventName:"onKeyDown",handler:r((e,t,s)=>{let{keyboardCodes:l=AC,onActivation:c}=t,{active:u}=s;const{code:p}=e.nativeEvent;if(l.start.includes(p)){const f=u.activatorNode.current;return f&&e.target!==f?!1:(e.preventDefault(),c?.({event:e.nativeEvent}),!0)}return!1},"handler")}];function Kj(e){return!!(e&&"distance"in e)}r(Kj,"isDistanceConstraint");function qj(e){return!!(e&&"delay"in e)}r(qj,"isDelayConstraint");var nx=class{static{r(this,"AbstractPointerSensor")}constructor(e,t,s){var l;s===void 0&&(s=gL(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:c}=e,{target:u}=c;this.props=e,this.events=t,this.document=jo(u),this.documentListeners=new bc(this.document),this.listeners=new bc(s),this.windowListeners=new bc(Oa(u)),this.initialCoordinates=(l=cf(c))!=null?l:zs,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:s}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(vs.Resize,this.handleCancel),this.windowListeners.add(vs.DragStart,Bj),this.windowListeners.add(vs.VisibilityChange,this.handleCancel),this.windowListeners.add(vs.ContextMenu,Bj),this.documentListeners.add(vs.Keydown,this.handleKeydown),t){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(qj(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Kj(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:s,onPending:l}=this.props;l(s,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(vs.Click,xL,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(vs.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:s,initialCoordinates:l,props:c}=this,{onMove:u,options:{activationConstraint:p}}=c;if(!l)return;const f=(t=cf(e))!=null?t:zs,h=Rc(l,f);if(!s&&p){if(Kj(p)){if(p.tolerance!=null&&bh(h,p.tolerance))return this.handleCancel();if(bh(h,p.distance))return this.handleStart()}if(qj(p)&&bh(h,p.tolerance))return this.handleCancel();this.handlePending(p,h);return}e.cancelable&&e.preventDefault(),u(f)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===Et.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},vL={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},Yf=class extends nx{static{r(this,"PointerSensor")}constructor(e){const{event:t}=e,s=jo(t.target);super(e,vL,s)}};Yf.activators=[{eventName:"onPointerDown",handler:r((e,t)=>{let{nativeEvent:s}=e,{onActivation:l}=t;return!s.isPrimary||s.button!==0?!1:(l?.({event:s}),!0)},"handler")}];var yL={move:{name:"mousemove"},end:{name:"mouseup"}},Eg;(function(e){e[e.RightClick=2]="RightClick"})(Eg||(Eg={}));var _C=class extends nx{static{r(this,"MouseSensor")}constructor(e){super(e,yL,jo(e.event.target))}};_C.activators=[{eventName:"onMouseDown",handler:r((e,t)=>{let{nativeEvent:s}=e,{onActivation:l}=t;return s.button===Eg.RightClick?!1:(l?.({event:s}),!0)},"handler")}];var vh={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}},EC=class extends nx{static{r(this,"TouchSensor")}constructor(e){super(e,vh)}static setup(){return window.addEventListener(vh.move.name,e,{capture:!1,passive:!1}),r(function(){window.removeEventListener(vh.move.name,e)},"teardown");function e(){}r(e,"noop")}};EC.activators=[{eventName:"onTouchStart",handler:r((e,t)=>{let{nativeEvent:s}=e,{onActivation:l}=t;const{touches:c}=s;return c.length>1?!1:(l?.({event:s}),!0)},"handler")}];var vc;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(vc||(vc={}));var df;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(df||(df={}));function jL(e){let{acceleration:t,activator:s=vc.Pointer,canScroll:l,draggingRect:c,enabled:u,interval:p=5,order:f=df.TreeOrder,pointerCoordinates:h,scrollableAncestors:g,scrollableAncestorRects:v,delta:y,threshold:j}=e;const k=kL({delta:y,disabled:!u}),[S,N]=PO(),I=(0,x.useRef)({x:0,y:0}),C=(0,x.useRef)({x:0,y:0}),M=(0,x.useMemo)(()=>{switch(s){case vc.Pointer:return h?{top:h.y,bottom:h.y,left:h.x,right:h.x}:null;case vc.DraggableRect:return c}},[s,c,h]),R=(0,x.useRef)(null),_=(0,x.useCallback)(()=>{const U=R.current;if(!U)return;const K=I.current.x*C.current.x,z=I.current.y*C.current.y;U.scrollBy(K,z)},[]),D=(0,x.useMemo)(()=>f===df.TreeOrder?[...g].reverse():g,[f,g]);(0,x.useEffect)(()=>{if(!u||!g.length||!M){N();return}for(const U of D){if(l?.(U)===!1)continue;const K=g.indexOf(U),z=v[K];if(!z)continue;const{direction:E,speed:B}=dL(U,z,M,t,j);for(const O of["x","y"])k[O][E[O]]||(B[O]=0,E[O]=0);if(B.x>0||B.y>0){N(),R.current=U,S(_,p),I.current=B,C.current=E;return}}I.current={x:0,y:0},C.current={x:0,y:0},N()},[t,_,l,N,u,p,JSON.stringify(M),JSON.stringify(k),S,g,D,v,JSON.stringify(j)])}r(jL,"useAutoScroller");var wL={x:{[sa.Backward]:!1,[sa.Forward]:!1},y:{[sa.Backward]:!1,[sa.Forward]:!1}};function kL(e){let{delta:t,disabled:s}=e;const l=of(t);return Qc(c=>{if(s||!l||!c)return wL;const u={x:Math.sign(t.x-l.x),y:Math.sign(t.y-l.y)};return{x:{[sa.Backward]:c.x[sa.Backward]||u.x===-1,[sa.Forward]:c.x[sa.Forward]||u.x===1},y:{[sa.Backward]:c.y[sa.Backward]||u.y===-1,[sa.Forward]:c.y[sa.Forward]||u.y===1}}},[s,t,l])}r(kL,"useScrollIntent");function SL(e,t){const s=t!=null?e.get(t):void 0,l=s?s.node.current:null;return Qc(c=>{var u;return t==null?null:(u=l??c)!=null?u:null},[l,t])}r(SL,"useCachedNode");function NL(e,t){return(0,x.useMemo)(()=>e.reduce((s,l)=>{const{sensor:c}=l,u=c.activators.map(p=>({eventName:p.eventName,handler:t(p.handler,l)}));return[...s,...u]},[]),[e,t])}r(NL,"useCombineActivators");var Dc;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Dc||(Dc={}));var Ig;(function(e){e.Optimized="optimized"})(Ig||(Ig={}));var Fj=new Map;function CL(e,t){let{dragging:s,dependencies:l,config:c}=t;const[u,p]=(0,x.useState)(null),{frequency:f,measure:h,strategy:g}=c,v=(0,x.useRef)(e),y=I(),j=Tc(y),k=(0,x.useCallback)(function(C){C===void 0&&(C=[]),!j.current&&p(M=>M===null?C:M.concat(C.filter(R=>!M.includes(R))))},[j]),S=(0,x.useRef)(null),N=Qc(C=>{if(y&&!s)return Fj;if(!C||C===Fj||v.current!==e||u!=null){const M=new Map;for(let R of e){if(!R)continue;if(u&&u.length>0&&!u.includes(R.id)&&R.rect.current){M.set(R.id,R.rect.current);continue}const _=R.node.current,D=_?new ex(h(_),_):null;R.rect.current=D,D&&M.set(R.id,D)}return M}return C},[e,u,s,y,h]);return(0,x.useEffect)(()=>{v.current=e},[e]),(0,x.useEffect)(()=>{y||k()},[s,y]),(0,x.useEffect)(()=>{u&&u.length>0&&p(null)},[JSON.stringify(u)]),(0,x.useEffect)(()=>{y||typeof f!="number"||S.current!==null||(S.current=setTimeout(()=>{k(),S.current=null},f))},[f,y,k,...l]),{droppableRects:N,measureDroppableContainers:k,measuringScheduled:u!=null};function I(){switch(g){case Dc.Always:return!1;case Dc.BeforeDragging:return s;default:return!s}}r(I,"isDisabled")}r(CL,"useDroppableMeasuring");function ax(e,t){return Qc(s=>e?s||(typeof t=="function"?t(e):e):null,[t,e])}r(ax,"useInitialValue");function AL(e,t){return ax(e,t)}r(AL,"useInitialRect");function _L(e){let{callback:t,disabled:s}=e;const l=Wf(t),c=(0,x.useMemo)(()=>{if(s||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:u}=window;return new u(l)},[l,s]);return(0,x.useEffect)(()=>()=>c?.disconnect(),[c]),c}r(_L,"useMutationObserver");function Xf(e){let{callback:t,disabled:s}=e;const l=Wf(t),c=(0,x.useMemo)(()=>{if(s||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:u}=window;return new u(l)},[s]);return(0,x.useEffect)(()=>()=>c?.disconnect(),[c]),c}r(Xf,"useResizeObserver");function EL(e){return new ex(wo(e),e)}r(EL,"defaultMeasure");function Hj(e,t,s){t===void 0&&(t=EL);const[l,c]=(0,x.useState)(null);function u(){c(h=>{if(!e)return null;if(e.isConnected===!1){var g;return(g=h??s)!=null?g:null}const v=t(e);return JSON.stringify(h)===JSON.stringify(v)?h:v})}r(u,"measureRect");const p=_L({callback(h){if(e)for(const g of h){const{type:v,target:y}=g;if(v==="childList"&&y instanceof HTMLElement&&y.contains(e)){u();break}}}}),f=Xf({callback:u});return Ls(()=>{u(),e?(f?.observe(e),p?.observe(document.body,{childList:!0,subtree:!0})):(f?.disconnect(),p?.disconnect())},[e]),l}r(Hj,"useRect");function IL(e){return bC(e,ax(e))}r(IL,"useRectDelta");var Vj=[];function TL(e){const t=(0,x.useRef)(e),s=Qc(l=>e?l&&l!==Vj&&e&&t.current&&e.parentNode===t.current.parentNode?l:Gf(e):Vj,[e]);return(0,x.useEffect)(()=>{t.current=e},[e]),s}r(TL,"useScrollableAncestors");function RL(e){const[t,s]=(0,x.useState)(null),l=(0,x.useRef)(e),c=(0,x.useCallback)(u=>{const p=xh(u.target);p&&s(f=>f?(f.set(p,_g(p)),new Map(f)):null)},[]);return(0,x.useEffect)(()=>{const u=l.current;if(e!==u){p(u);const f=e.map(h=>{const g=xh(h);return g?(g.addEventListener("scroll",c,{passive:!0}),[g,_g(g)]):null}).filter(h=>h!=null);s(f.length?new Map(f):null),l.current=e}return()=>{p(e),p(u)};function p(f){f.forEach(h=>{xh(h)?.removeEventListener("scroll",c)})}},[c,e]),(0,x.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((u,p)=>lo(u,p),zs):NC(e):zs,[e,t])}r(RL,"useScrollOffsets");function Wj(e,t){t===void 0&&(t=[]);const s=(0,x.useRef)(null);return(0,x.useEffect)(()=>{s.current=null},t),(0,x.useEffect)(()=>{const l=e!==zs;l&&!s.current&&(s.current=e),!l&&s.current&&(s.current=null)},[e]),s.current?Rc(e,s.current):zs}r(Wj,"useScrollOffsetsDelta");function ML(e){(0,x.useEffect)(()=>{if(!Vf)return;const t=e.map(s=>{let{sensor:l}=s;return l.setup==null?void 0:l.setup()});return()=>{for(const s of t)s?.()}},e.map(t=>{let{sensor:s}=t;return s}))}r(ML,"useSensorSetup");function DL(e,t){return(0,x.useMemo)(()=>e.reduce((s,l)=>{let{eventName:c,handler:u}=l;return s[c]=p=>{u(p,t)},s},{}),[e,t])}r(DL,"useSyntheticListeners");function IC(e){return(0,x.useMemo)(()=>e?lL(e):null,[e])}r(IC,"useWindowRect");var Qj=[];function OL(e,t){t===void 0&&(t=wo);const[s]=e,l=IC(s?Oa(s):null),[c,u]=(0,x.useState)(Qj);function p(){u(()=>e.length?e.map(h=>kC(h)?l:new ex(t(h),h)):Qj)}r(p,"measureRects");const f=Xf({callback:p});return Ls(()=>{f?.disconnect(),p(),e.forEach(h=>f?.observe(h))},[e]),c}r(OL,"useRects");function TC(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Wc(t)?t:e}r(TC,"getMeasurableNode");function LL(e){let{measure:t}=e;const[s,l]=(0,x.useState)(null),c=Xf({callback:(0,x.useCallback)(h=>{for(const{target:g}of h)if(Wc(g)){l(v=>{const y=t(g);return v?{...v,width:y.width,height:y.height}:y});break}},[t])}),u=(0,x.useCallback)(h=>{const g=TC(h);c?.disconnect(),g&&c?.observe(g),l(g?t(g):null)},[t,c]),[p,f]=lf(u);return(0,x.useMemo)(()=>({nodeRef:p,rect:s,setRef:f}),[s,p,f])}r(LL,"useDragOverlayMeasuring");var zL=[{sensor:Yf,options:{}},{sensor:tx,options:{}}],PL={current:{}},Pd={draggable:{measure:Uj},droppable:{measure:Uj,strategy:Dc.WhileDragging,frequency:Ig.Optimized},dragOverlay:{measure:wo}},yc=class extends Map{static{r(this,"DroppableContainersMap")}get(e){var t;return e!=null&&(t=super.get(e))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,s;return(t=(s=this.get(e))==null?void 0:s.node.current)!=null?t:void 0}},$L={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new yc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:uf},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Pd,measureDroppableContainers:uf,windowRect:null,measuringScheduled:!1},RC={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:uf,draggableNodes:new Map,over:null,measureDroppableContainers:uf},Yc=(0,x.createContext)(RC),MC=(0,x.createContext)($L);function UL(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new yc}}}r(UL,"getInitialState");function BL(e,t){switch(t.type){case Xn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Xn.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Xn.DragEnd:case Xn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Xn.RegisterDroppable:{const{element:s}=t,{id:l}=s,c=new yc(e.droppable.containers);return c.set(l,s),{...e,droppable:{...e.droppable,containers:c}}}case Xn.SetDroppableDisabled:{const{id:s,key:l,disabled:c}=t,u=e.droppable.containers.get(s);if(!u||l!==u.key)return e;const p=new yc(e.droppable.containers);return p.set(s,{...u,disabled:c}),{...e,droppable:{...e.droppable,containers:p}}}case Xn.UnregisterDroppable:{const{id:s,key:l}=t,c=e.droppable.containers.get(s);if(!c||l!==c.key)return e;const u=new yc(e.droppable.containers);return u.delete(s),{...e,droppable:{...e.droppable,containers:u}}}default:return e}}r(BL,"reducer");function KL(e){let{disabled:t}=e;const{active:s,activatorEvent:l,draggableNodes:c}=(0,x.useContext)(Yc),u=of(l),p=of(s?.id);return(0,x.useEffect)(()=>{if(!t&&!l&&u&&p!=null){if(!Qf(u)||document.activeElement===u.target)return;const f=c.get(p);if(!f)return;const{activatorNode:h,node:g}=f;if(!h.current&&!g.current)return;requestAnimationFrame(()=>{for(const v of[h.current,g.current]){if(!v)continue;const y=BO(v);if(y){y.focus();break}}})}},[l,t,c,p,u]),null}r(KL,"RestoreFocus");function DC(e,t){let{transform:s,...l}=t;return e!=null&&e.length?e.reduce((c,u)=>u({transform:c,...l}),s):s}r(DC,"applyModifiers");function qL(e){return(0,x.useMemo)(()=>({draggable:{...Pd.draggable,...e?.draggable},droppable:{...Pd.droppable,...e?.droppable},dragOverlay:{...Pd.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}r(qL,"useMeasuringConfiguration");function FL(e){let{activeNode:t,measure:s,initialRect:l,config:c=!0}=e;const u=(0,x.useRef)(!1),{x:p,y:f}=typeof c=="boolean"?{x:c,y:c}:c;Ls(()=>{if(!p&&!f||!t){u.current=!1;return}if(u.current||!l)return;const h=t?.node.current;if(!h||h.isConnected===!1)return;const g=bC(s(h),l);if(p||(g.x=0),f||(g.y=0),u.current=!0,Math.abs(g.x)>0||Math.abs(g.y)>0){const v=yC(h);v&&v.scrollBy({top:g.y,left:g.x})}},[t,p,f,l,s])}r(FL,"useLayoutShiftScrollCompensation");var Zf=(0,x.createContext)({...zs,scaleX:1,scaleY:1}),rr;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(rr||(rr={}));var sx=(0,x.memo)(r(function(t){var s,l,c,u;let{id:p,accessibility:f,autoScroll:h=!0,children:g,sensors:v=zL,collisionDetection:y=tL,measuring:j,modifiers:k,...S}=t;const[N,I]=(0,x.useReducer)(BL,void 0,UL),[C,M]=WO(),[R,_]=(0,x.useState)(rr.Uninitialized),D=R===rr.Initialized,{draggable:{active:U,nodes:K,translate:z},droppable:{containers:E}}=N,B=U!=null?K.get(U):null,O=(0,x.useRef)({initial:null,translated:null}),Q=(0,x.useMemo)(()=>{var qt;return U!=null?{id:U,data:(qt=B?.data)!=null?qt:PL,rect:O}:null},[U,B]),V=(0,x.useRef)(null),[ue,ce]=(0,x.useState)(null),[X,A]=(0,x.useState)(null),ee=Tc(S,Object.values(S)),ie=Gc("DndDescribedBy",p),le=(0,x.useMemo)(()=>E.getEnabled(),[E]),Ae=qL(j),{droppableRects:de,measureDroppableContainers:we,measuringScheduled:ye}=CL(le,{dragging:D,dependencies:[z.x,z.y],config:Ae.droppable}),Me=SL(K,U),he=(0,x.useMemo)(()=>X?cf(X):null,[X]),ve=tn(),et=AL(Me,Ae.draggable.measure);FL({activeNode:U!=null?K.get(U):null,config:ve.layoutShiftCompensation,initialRect:et,measure:Ae.draggable.measure});const $e=Hj(Me,Ae.draggable.measure,et),Ie=Hj(Me?Me.parentElement:null),ct=(0,x.useRef)({activatorEvent:null,active:null,activeNode:Me,collisionRect:null,collisions:null,droppableRects:de,draggableNodes:K,draggingNode:null,draggingNodeRect:null,droppableContainers:E,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),He=E.getNodeFor((s=ct.current.over)==null?void 0:s.id),vt=LL({measure:Ae.dragOverlay.measure}),Jt=(l=vt.nodeRef.current)!=null?l:Me,ge=D?(c=vt.rect)!=null?c:$e:null,Oe=!!(vt.nodeRef.current&&vt.rect),De=IL(Oe?null:$e),ut=IC(Jt?Oa(Jt):null),Ht=TL(D?He??Me:null),Vt=OL(Ht),gt=DC(k,{transform:{x:z.x-De.x,y:z.y-De.y,scaleX:1,scaleY:1},activatorEvent:X,active:Q,activeNodeRect:$e,containerNodeRect:Ie,draggingNodeRect:ge,over:ct.current.over,overlayNodeRect:vt.rect,scrollableAncestors:Ht,scrollableAncestorRects:Vt,windowRect:ut}),un=he?lo(he,z):null,P=RL(Ht),qe=Wj(P),Ye=Wj(P,[$e]),xt=lo(gt,qe),at=ge?sL(ge,gt):null,Kt=Q&&at?y({active:Q,collisionRect:at,droppableRects:de,droppableContainers:le,pointerCoordinates:un}):null,ea=gC(Kt,"id"),[en,Mt]=(0,x.useState)(null),Gt=nL(Oe?gt:lo(gt,Ye),(u=en?.rect)!=null?u:null,$e),dt=(0,x.useRef)(null),On=(0,x.useCallback)((qt,Tt)=>{let{sensor:Ct,options:_e}=Tt;if(V.current==null)return;const Re=K.get(V.current);if(!Re)return;const lt=qt.nativeEvent,Dt=new Ct({active:V.current,activeNode:Re,event:lt,options:_e,context:ct,onAbort(Ot){if(!K.get(Ot))return;const{onDragAbort:Rt}=ee.current,Lt={id:Ot};Rt?.(Lt),C({type:"onDragAbort",event:Lt})},onPending(Ot,Rt,Lt,nn){if(!K.get(Ot))return;const{onDragPending:Wt}=ee.current,Ln={id:Ot,constraint:Rt,initialCoordinates:Lt,offset:nn};Wt?.(Ln),C({type:"onDragPending",event:Ln})},onStart(Ot){const Rt=V.current;if(Rt==null)return;const Lt=K.get(Rt);if(!Lt)return;const{onDragStart:nn}=ee.current,Wt={activatorEvent:lt,active:{id:Rt,data:Lt.data,rect:O}};(0,Zl.unstable_batchedUpdates)(()=>{nn?.(Wt),_(rr.Initializing),I({type:Xn.DragStart,initialCoordinates:Ot,active:Rt}),C({type:"onDragStart",event:Wt}),ce(dt.current),A(lt)})},onMove(Ot){I({type:Xn.DragMove,coordinates:Ot})},onEnd:ze(Xn.DragEnd),onCancel:ze(Xn.DragCancel)});dt.current=Dt;function ze(Ot){return r(async function(){const{active:Lt,collisions:nn,over:Wt,scrollAdjustedTranslate:Ln}=ct.current;let gn=null;if(Lt&&Ln){const{cancelDrop:zn}=ee.current;gn={activatorEvent:lt,active:Lt,collisions:nn,delta:Ln,over:Wt},Ot===Xn.DragEnd&&typeof zn=="function"&&await Promise.resolve(zn(gn))&&(Ot=Xn.DragCancel)}V.current=null,(0,Zl.unstable_batchedUpdates)(()=>{I({type:Ot}),_(rr.Uninitialized),Mt(null),ce(null),A(null),dt.current=null;const zn=Ot===Xn.DragEnd?"onDragEnd":"onDragCancel";if(gn){const is=ee.current[zn];is?.(gn),C({type:zn,event:gn})}})},"handler")}r(ze,"createHandler")},[K]),mt=NL(v,(0,x.useCallback)((qt,Tt)=>(Ct,_e)=>{const Re=Ct.nativeEvent,lt=K.get(_e);if(V.current!==null||!lt||Re.dndKit||Re.defaultPrevented)return;const Dt={active:lt};qt(Ct,Tt.options,Dt)===!0&&(Re.dndKit={capturedBy:Tt.sensor},V.current=_e,On(Ct,Tt))},[K,On]));ML(v),Ls(()=>{$e&&R===rr.Initializing&&_(rr.Initialized)},[$e,R]),(0,x.useEffect)(()=>{const{onDragMove:qt}=ee.current,{active:Tt,activatorEvent:Ct,collisions:_e,over:Re}=ct.current;if(!Tt||!Ct)return;const lt={active:Tt,activatorEvent:Ct,collisions:_e,delta:{x:xt.x,y:xt.y},over:Re};(0,Zl.unstable_batchedUpdates)(()=>{qt?.(lt),C({type:"onDragMove",event:lt})})},[xt.x,xt.y]),(0,x.useEffect)(()=>{const{active:qt,activatorEvent:Tt,collisions:Ct,droppableContainers:_e,scrollAdjustedTranslate:Re}=ct.current;if(!qt||V.current==null||!Tt||!Re)return;const{onDragOver:lt}=ee.current,Dt=_e.get(ea),ze=Dt&&Dt.rect.current?{id:Dt.id,rect:Dt.rect.current,data:Dt.data,disabled:Dt.disabled}:null,Ot={active:qt,activatorEvent:Tt,collisions:Ct,delta:{x:Re.x,y:Re.y},over:ze};(0,Zl.unstable_batchedUpdates)(()=>{Mt(ze),lt?.(Ot),C({type:"onDragOver",event:Ot})})},[ea]),Ls(()=>{ct.current={activatorEvent:X,active:Q,activeNode:Me,collisionRect:at,collisions:Kt,droppableRects:de,draggableNodes:K,draggingNode:Jt,draggingNodeRect:ge,droppableContainers:E,over:en,scrollableAncestors:Ht,scrollAdjustedTranslate:xt},O.current={initial:ge,translated:at}},[Q,Me,Kt,at,K,Jt,ge,de,E,en,Ht,xt]),jL({...ve,delta:z,draggingRect:at,pointerCoordinates:un,scrollableAncestors:Ht,scrollableAncestorRects:Vt});const Nn=(0,x.useMemo)(()=>({active:Q,activeNode:Me,activeNodeRect:$e,activatorEvent:X,collisions:Kt,containerNodeRect:Ie,dragOverlay:vt,draggableNodes:K,droppableContainers:E,droppableRects:de,over:en,measureDroppableContainers:we,scrollableAncestors:Ht,scrollableAncestorRects:Vt,measuringConfiguration:Ae,measuringScheduled:ye,windowRect:ut}),[Q,Me,$e,X,Kt,Ie,vt,K,E,de,en,we,Ht,Vt,Ae,ye,ut]),It=(0,x.useMemo)(()=>({activatorEvent:X,activators:mt,active:Q,activeNodeRect:$e,ariaDescribedById:{draggable:ie},dispatch:I,draggableNodes:K,over:en,measureDroppableContainers:we}),[X,mt,Q,$e,I,ie,K,en,we]);return x.createElement(pC.Provider,{value:M},x.createElement(Yc.Provider,{value:It},x.createElement(MC.Provider,{value:Nn},x.createElement(Zf.Provider,{value:Gt},g)),x.createElement(KL,{disabled:f?.restoreFocus===!1})),x.createElement(YO,{...f,hiddenTextDescribedById:ie}));function tn(){const qt=ue?.autoScrollEnabled===!1,Tt=typeof h=="object"?h.enabled===!1:h===!1,Ct=D&&!qt&&!Tt;return typeof h=="object"?{...h,enabled:Ct}:{enabled:Ct}}},"DndContext")),HL=(0,x.createContext)(null),Gj="button",VL="Draggable";function WL(e){let{id:t,data:s,disabled:l=!1,attributes:c}=e;const u=Gc(VL),{activators:p,activatorEvent:f,active:h,activeNodeRect:g,ariaDescribedById:v,draggableNodes:y,over:j}=(0,x.useContext)(Yc),{role:k=Gj,roleDescription:S="draggable",tabIndex:N=0}=c??{},I=h?.id===t,C=(0,x.useContext)(I?Zf:HL),[M,R]=lf(),[_,D]=lf(),U=DL(p,t),K=Tc(s);return Ls(()=>(y.set(t,{id:t,key:u,node:M,activatorNode:_,data:K}),()=>{const z=y.get(t);z&&z.key===u&&y.delete(t)}),[y,t]),{active:h,activatorEvent:f,activeNodeRect:g,attributes:(0,x.useMemo)(()=>({role:k,tabIndex:N,"aria-disabled":l,"aria-pressed":I&&k===Gj?!0:void 0,"aria-roledescription":S,"aria-describedby":v.draggable}),[l,k,N,I,S,v.draggable]),isDragging:I,listeners:l?void 0:U,node:M,over:j,setNodeRef:R,setActivatorNodeRef:D,transform:C}}r(WL,"useDraggable");function OC(){return(0,x.useContext)(MC)}r(OC,"useDndContext");var QL="Droppable",GL={timeout:25};function LC(e){let{data:t,disabled:s=!1,id:l,resizeObserverConfig:c}=e;const u=Gc(QL),{active:p,dispatch:f,over:h,measureDroppableContainers:g}=(0,x.useContext)(Yc),v=(0,x.useRef)({disabled:s}),y=(0,x.useRef)(!1),j=(0,x.useRef)(null),k=(0,x.useRef)(null),{disabled:S,updateMeasurementsFor:N,timeout:I}={...GL,...c},C=Tc(N??l),M=Xf({callback:(0,x.useCallback)(()=>{if(!y.current){y.current=!0;return}k.current!=null&&clearTimeout(k.current),k.current=setTimeout(()=>{g(Array.isArray(C.current)?C.current:[C.current]),k.current=null},I)},[I]),disabled:S||!p}),R=(0,x.useCallback)((K,z)=>{M&&(z&&(M.unobserve(z),y.current=!1),K&&M.observe(K))},[M]),[_,D]=lf(R),U=Tc(t);return(0,x.useEffect)(()=>{!M||!_.current||(M.disconnect(),y.current=!1,M.observe(_.current))},[_,M]),(0,x.useEffect)(()=>(f({type:Xn.RegisterDroppable,element:{id:l,key:u,disabled:s,node:_,rect:j,data:U}}),()=>f({type:Xn.UnregisterDroppable,key:u,id:l})),[l]),(0,x.useEffect)(()=>{s!==v.current.disabled&&(f({type:Xn.SetDroppableDisabled,id:l,key:u,disabled:s}),v.current.disabled=s)},[l,u,s,f]),{active:p,rect:j,isOver:h?.id===l,node:_,over:h,setNodeRef:D}}r(LC,"useDroppable");function YL(e){let{animation:t,children:s}=e;const[l,c]=(0,x.useState)(null),[u,p]=(0,x.useState)(null),f=of(s);return!s&&!l&&f&&c(f),Ls(()=>{if(!u)return;const h=l?.key,g=l?.props.id;if(h==null||g==null){c(null);return}Promise.resolve(t(g,u)).then(()=>{c(null)})},[t,l,u]),x.createElement(x.Fragment,null,s,l?(0,x.cloneElement)(l,{ref:p}):null)}r(YL,"AnimationManager");var XL={x:0,y:0,scaleX:1,scaleY:1};function ZL(e){let{children:t}=e;return x.createElement(Yc.Provider,{value:RC},x.createElement(Zf.Provider,{value:XL},t))}r(ZL,"NullifiedContextProvider");var JL={position:"fixed",touchAction:"none"},e4=r(e=>Qf(e)?"transform 250ms ease":void 0,"defaultTransition$1"),t4=(0,x.forwardRef)((e,t)=>{let{as:s,activatorEvent:l,adjustScale:c,children:u,className:p,rect:f,style:h,transform:g,transition:v=e4}=e;if(!f)return null;const y=c?g:{...g,scaleX:1,scaleY:1},j={...JL,width:f.width,height:f.height,top:f.top,left:f.left,transform:ni.Transform.toString(y),transformOrigin:c&&l?XO(l,f):void 0,transition:typeof v=="function"?v(l):v,...h};return x.createElement(s,{className:p,style:j,ref:t},u)}),n4=r(e=>t=>{let{active:s,dragOverlay:l}=t;const c={},{styles:u,className:p}=e;if(u!=null&&u.active)for(const[f,h]of Object.entries(u.active))h!==void 0&&(c[f]=s.node.style.getPropertyValue(f),s.node.style.setProperty(f,h));if(u!=null&&u.dragOverlay)for(const[f,h]of Object.entries(u.dragOverlay))h!==void 0&&l.node.style.setProperty(f,h);return p!=null&&p.active&&s.node.classList.add(p.active),p!=null&&p.dragOverlay&&l.node.classList.add(p.dragOverlay),r(function(){for(const[h,g]of Object.entries(c))s.node.style.setProperty(h,g);p!=null&&p.active&&s.node.classList.remove(p.active)},"cleanup")},"defaultDropAnimationSideEffects"),a4=r(e=>{let{transform:{initial:t,final:s}}=e;return[{transform:ni.Transform.toString(t)},{transform:ni.Transform.toString(s)}]},"defaultKeyframeResolver"),s4={duration:250,easing:"ease",keyframes:a4,sideEffects:n4({styles:{active:{opacity:"0"}}})};function i4(e){let{config:t,draggableNodes:s,droppableContainers:l,measuringConfiguration:c}=e;return Wf((u,p)=>{if(t===null)return;const f=s.get(u);if(!f)return;const h=f.node.current;if(!h)return;const g=TC(p);if(!g)return;const{transform:v}=Oa(p).getComputedStyle(p),y=vC(v);if(!y)return;const j=typeof t=="function"?t:r4(t);return CC(h,c.draggable.measure),j({active:{id:u,data:f.data,node:h,rect:c.draggable.measure(h)},draggableNodes:s,dragOverlay:{node:p,rect:c.dragOverlay.measure(g)},droppableContainers:l,measuringConfiguration:c,transform:y})})}r(i4,"useDropAnimation");function r4(e){const{duration:t,easing:s,sideEffects:l,keyframes:c}={...s4,...e};return u=>{let{active:p,dragOverlay:f,transform:h,...g}=u;if(!t)return;const v={x:f.rect.left-p.rect.left,y:f.rect.top-p.rect.top},y={scaleX:h.scaleX!==1?p.rect.width*h.scaleX/f.rect.width:1,scaleY:h.scaleY!==1?p.rect.height*h.scaleY/f.rect.height:1},j={x:h.x-v.x,y:h.y-v.y,...y},k=c({...g,active:p,dragOverlay:f,transform:{initial:h,final:j}}),[S]=k,N=k[k.length-1];if(JSON.stringify(S)===JSON.stringify(N))return;const I=l?.({active:p,dragOverlay:f,...g}),C=f.node.animate(k,{duration:t,easing:s,fill:"forwards"});return new Promise(M=>{C.onfinish=()=>{I?.(),M()}})}}r(r4,"createDefaultDropAnimation");var Yj=0;function l4(e){return(0,x.useMemo)(()=>{if(e!=null)return Yj++,Yj},[e])}r(l4,"useKey");var o4=x.memo(e=>{let{adjustScale:t=!1,children:s,dropAnimation:l,style:c,transition:u,modifiers:p,wrapperElement:f="div",className:h,zIndex:g=999}=e;const{activatorEvent:v,active:y,activeNodeRect:j,containerNodeRect:k,draggableNodes:S,droppableContainers:N,dragOverlay:I,over:C,measuringConfiguration:M,scrollableAncestors:R,scrollableAncestorRects:_,windowRect:D}=OC(),U=(0,x.useContext)(Zf),K=l4(y?.id),z=DC(p,{activatorEvent:v,active:y,activeNodeRect:j,containerNodeRect:k,draggingNodeRect:I.rect,over:C,overlayNodeRect:I.rect,scrollableAncestors:R,scrollableAncestorRects:_,transform:U,windowRect:D}),E=ax(j),B=i4({config:l,draggableNodes:S,droppableContainers:N,measuringConfiguration:M}),O=E?I.setRef:void 0;return x.createElement(ZL,null,x.createElement(YL,{animation:B},y&&K?x.createElement(t4,{key:K,id:y.id,ref:O,as:f,activatorEvent:v,adjustScale:t,className:h,transition:u,rect:E,style:{zIndex:g,...c},transform:z},s):null))});function ix(e,t,s){const l=e.slice();return l.splice(s<0?l.length+s:s,0,l.splice(t,1)[0]),l}r(ix,"arrayMove");function c4(e,t){return e.reduce((s,l,c)=>{const u=t.get(l);return u&&(s[c]=u),s},Array(e.length))}r(c4,"getSortedRects");function fd(e){return e!==null&&e>=0}r(fd,"isValidIndex");function u4(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}r(u4,"itemsEqual");function d4(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}r(d4,"normalizeDisabled");var pd={scaleX:1,scaleY:1},f4=r(e=>{var t;let{rects:s,activeNodeRect:l,activeIndex:c,overIndex:u,index:p}=e;const f=(t=s[c])!=null?t:l;if(!f)return null;const h=p4(s,p,c);if(p===c){const g=s[u];return g?{x:c<u?g.left+g.width-(f.left+f.width):g.left-f.left,y:0,...pd}:null}return p>c&&p<=u?{x:-f.width-h,y:0,...pd}:p<c&&p>=u?{x:f.width+h,y:0,...pd}:{x:0,y:0,...pd}},"horizontalListSortingStrategy");function p4(e,t,s){const l=e[t],c=e[t-1],u=e[t+1];return!l||!c&&!u?0:s<t?c?l.left-(c.left+c.width):u.left-(l.left+l.width):u?u.left-(l.left+l.width):l.left-(c.left+c.width)}r(p4,"getItemGap");var zC=r(e=>{let{rects:t,activeIndex:s,overIndex:l,index:c}=e;const u=ix(t,l,s),p=t[c],f=u[c];return!f||!p?null:{x:f.left-p.left,y:f.top-p.top,scaleX:f.width/p.width,scaleY:f.height/p.height}},"rectSortingStrategy"),md={scaleX:1,scaleY:1},PC=r(e=>{var t;let{activeIndex:s,activeNodeRect:l,index:c,rects:u,overIndex:p}=e;const f=(t=u[s])!=null?t:l;if(!f)return null;if(c===s){const g=u[p];return g?{x:0,y:s<p?g.top+g.height-(f.top+f.height):g.top-f.top,...md}:null}const h=m4(u,c,s);return c>s&&c<=p?{x:0,y:-f.height-h,...md}:c<s&&c>=p?{x:0,y:f.height+h,...md}:{x:0,y:0,...md}},"verticalListSortingStrategy");function m4(e,t,s){const l=e[t],c=e[t-1],u=e[t+1];return l?s<t?c?l.top-(c.top+c.height):u?u.top-(l.top+l.height):0:u?u.top-(l.top+l.height):c?l.top-(c.top+c.height):0:0}r(m4,"getItemGap$1");var $C="Sortable",UC=x.createContext({activeIndex:-1,containerId:$C,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:zC,disabled:{draggable:!1,droppable:!1}});function rx(e){let{children:t,id:s,items:l,strategy:c=zC,disabled:u=!1}=e;const{active:p,dragOverlay:f,droppableRects:h,over:g,measureDroppableContainers:v}=OC(),y=Gc($C,s),j=f.rect!==null,k=(0,x.useMemo)(()=>l.map(U=>typeof U=="object"&&"id"in U?U.id:U),[l]),S=p!=null,N=p?k.indexOf(p.id):-1,I=g?k.indexOf(g.id):-1,C=(0,x.useRef)(k),M=!u4(k,C.current),R=I!==-1&&N===-1||M,_=d4(u);Ls(()=>{M&&S&&v(k)},[M,k,S,v]),(0,x.useEffect)(()=>{C.current=k},[k]);const D=(0,x.useMemo)(()=>({activeIndex:N,containerId:y,disabled:_,disableTransforms:R,items:k,overIndex:I,useDragOverlay:j,sortedRects:c4(k,h),strategy:c}),[N,y,_.draggable,_.droppable,R,k,I,h,j,c]);return x.createElement(UC.Provider,{value:D},t)}r(rx,"SortableContext");var h4=r(e=>{let{id:t,items:s,activeIndex:l,overIndex:c}=e;return ix(s,l,c).indexOf(t)},"defaultNewIndexGetter"),g4=r(e=>{let{containerId:t,isSorting:s,wasDragging:l,index:c,items:u,newIndex:p,previousItems:f,previousContainerId:h,transition:g}=e;return!g||!l||f!==u&&c===p?!1:s?!0:p!==c&&t===h},"defaultAnimateLayoutChanges"),x4={duration:200,easing:"ease"},BC="transform",b4=ni.Transition.toString({property:BC,duration:0,easing:"linear"}),v4={roleDescription:"sortable"};function y4(e){let{disabled:t,index:s,node:l,rect:c}=e;const[u,p]=(0,x.useState)(null),f=(0,x.useRef)(s);return Ls(()=>{if(!t&&s!==f.current&&l.current){const h=c.current;if(h){const g=wo(l.current,{ignoreTransform:!0}),v={x:h.left-g.left,y:h.top-g.top,scaleX:h.width/g.width,scaleY:h.height/g.height};(v.x||v.y)&&p(v)}}s!==f.current&&(f.current=s)},[t,s,l,c]),(0,x.useEffect)(()=>{u&&p(null)},[u]),u}r(y4,"useDerivedTransform");function lx(e){let{animateLayoutChanges:t=g4,attributes:s,disabled:l,data:c,getNewIndex:u=h4,id:p,strategy:f,resizeObserverConfig:h,transition:g=x4}=e;const{items:v,containerId:y,activeIndex:j,disabled:k,disableTransforms:S,sortedRects:N,overIndex:I,useDragOverlay:C,strategy:M}=(0,x.useContext)(UC),R=j4(l,k),_=v.indexOf(p),D=(0,x.useMemo)(()=>({sortable:{containerId:y,index:_,items:v},...c}),[y,c,_,v]),U=(0,x.useMemo)(()=>v.slice(v.indexOf(p)),[v,p]),{rect:K,node:z,isOver:E,setNodeRef:B}=LC({id:p,data:D,disabled:R.droppable,resizeObserverConfig:{updateMeasurementsFor:U,...h}}),{active:O,activatorEvent:Q,activeNodeRect:V,attributes:ue,setNodeRef:ce,listeners:X,isDragging:A,over:ee,setActivatorNodeRef:ie,transform:le}=WL({id:p,data:D,attributes:{...v4,...s},disabled:R.draggable}),Ae=zO(B,ce),de=!!O,we=de&&!S&&fd(j)&&fd(I),ye=!C&&A,Me=ye&&we?le:null,he=we?Me??(f??M)({rects:N,activeNodeRect:V,activeIndex:j,overIndex:I,index:_}):null,ve=fd(j)&&fd(I)?u({id:p,items:v,activeIndex:j,overIndex:I}):_,et=O?.id,$e=(0,x.useRef)({activeId:et,items:v,newIndex:ve,containerId:y}),Ie=v!==$e.current.items,ct=t({active:O,containerId:y,isDragging:A,isSorting:de,id:p,index:_,items:v,newIndex:$e.current.newIndex,previousItems:$e.current.items,previousContainerId:$e.current.containerId,transition:g,wasDragging:$e.current.activeId!=null}),He=y4({disabled:!ct,index:_,node:z,rect:K});return(0,x.useEffect)(()=>{de&&$e.current.newIndex!==ve&&($e.current.newIndex=ve),y!==$e.current.containerId&&($e.current.containerId=y),v!==$e.current.items&&($e.current.items=v)},[de,ve,y,v]),(0,x.useEffect)(()=>{if(et===$e.current.activeId)return;if(et!=null&&$e.current.activeId==null){$e.current.activeId=et;return}const Jt=setTimeout(()=>{$e.current.activeId=et},50);return()=>clearTimeout(Jt)},[et]),{active:O,activeIndex:j,attributes:ue,data:D,rect:K,index:_,newIndex:ve,items:v,isOver:E,isSorting:de,isDragging:A,listeners:X,node:z,overIndex:I,over:ee,setNodeRef:Ae,setActivatorNodeRef:ie,setDroppableNodeRef:B,setDraggableNodeRef:ce,transform:He??he,transition:vt()};function vt(){if(He||Ie&&$e.current.newIndex===_)return b4;if(!(ye&&!Qf(Q)||!g)&&(de||ct))return ni.Transition.toString({...g,property:BC})}r(vt,"getTransition")}r(lx,"useSortable");function j4(e,t){var s,l;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(s=e?.draggable)!=null?s:t.draggable,droppable:(l=e?.droppable)!=null?l:t.droppable}}r(j4,"normalizeLocalDisabled");function ff(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}r(ff,"hasSortableData");var w4=[Et.Down,Et.Right,Et.Up,Et.Left],k4=r((e,t)=>{let{context:{active:s,collisionRect:l,droppableRects:c,droppableContainers:u,over:p,scrollableAncestors:f}}=t;if(w4.includes(e.code)){if(e.preventDefault(),!s||!l)return;const h=[];u.getEnabled().forEach(y=>{if(!y||y!=null&&y.disabled)return;const j=c.get(y.id);if(j)switch(e.code){case Et.Down:l.top<j.top&&h.push(y);break;case Et.Up:l.top>j.top&&h.push(y);break;case Et.Left:l.left>j.left&&h.push(y);break;case Et.Right:l.left<j.left&&h.push(y)}});const g=JO({active:s,collisionRect:l,droppableRects:c,droppableContainers:h,pointerCoordinates:null});let v=gC(g,"id");if(v===p?.id&&g.length>1&&(v=g[1].id),v!=null){const y=u.get(s.id),j=u.get(v),k=j?c.get(j.id):null,S=j?.node.current;if(S&&k&&y&&j){const N=Gf(S).some((_,D)=>f[D]!==_),I=KC(y,j),C=S4(y,j),M=N||!I?{x:0,y:0}:{x:C?l.width-k.width:0,y:C?l.height-k.height:0},R={x:k.left,y:k.top};return M.x&&M.y?R:Rc(R,M)}}}},"sortableKeyboardCoordinates");function KC(e,t){return!ff(e)||!ff(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}r(KC,"isSameContainer");function S4(e,t){return!ff(e)||!ff(t)||!KC(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}r(S4,"isAfter");function Xj(e,t){if(e.length!==t.length)return!1;for(let s=0;s<e.length;s+=1)if(e[s]!==t[s])return!1;return!0}r(Xj,"areEqual$1");function qC(e,t){if(e.length===0)return[];if(t.length===0)return e;const s=new Map(e.map(c=>[c.id,c])),l=[];for(const c of t){const u=s.get(c);u&&(l.push(u),s.delete(c))}for(const c of s.values())l.push(c);return l}r(qC,"sortCompaniesByOrder");function Zj(e,t){return qC(e,t).map(s=>s.id)}r(Zj,"buildOrderIds$1");function N4({companies:e,userId:t}){const s=kn(),l=(0,x.useMemo)(()=>$.sidebarPreferences.companyOrder(t??"__anon__"),[t]),{data:c}=me({queryKey:l,queryFn:r(()=>Jd.getCompanyOrder(),"queryFn"),enabled:!!t}),[u,p]=(0,x.useState)(()=>Zj(e,[]));(0,x.useEffect)(()=>{const h=Zj(e,c?.orderedIds??[]);p(g=>Xj(g,h)?g:h)},[e,c?.orderedIds]);const f=Bt({mutationFn:r(h=>Jd.updateCompanyOrder({orderedIds:h}),"mutationFn"),onSuccess:r(h=>{s.setQueryData(l,h)},"onSuccess")});return{orderedCompanies:(0,x.useMemo)(()=>qC(e,u),[e,u]),orderedIds:u,persistOrder:(0,x.useCallback)(h=>{const g=new Set(e.map(y=>y.id)),v=h.filter(y=>g.has(y));for(const y of e)v.includes(y.id)||v.push(y.id);p(y=>Xj(y,v)?y:v),t&&(s.setQueryData(l,y=>({orderedIds:v,updatedAt:y?.updatedAt??null})),f.mutate(v))},[e,f,s,l,t])}}r(N4,"useCompanyOrder");var C4=[$.health[0]];function A4(e){return!C4.includes(e[0])}r(A4,"isAccountScopedQueryKey");function ox({onSignedOut:e}={}){const t=kn();return Bt({mutationFn:r(async()=>{await qE(),await Zn.signOut()},"mutationFn"),onSuccess:r(async()=>{e?.(),t.resetQueries({predicate:r(s=>A4(s.queryKey),"predicate")}),await t.invalidateQueries({queryKey:$.health})},"onSuccess")})}r(ox,"useSignOut");var _4=[[0,8,2,10],[12,4,14,6],[3,11,1,9],[15,7,13,5]];function E4(e){let t=2166136261;for(let s=0;s<e.length;s++)t^=e.charCodeAt(s),t=Math.imul(t,16777619);return t>>>0}r(E4,"hashString");function I4(e){let t=e>>>0;return()=>{t=t+1831565813>>>0;let s=Math.imul(t^t>>>15,1|t);return s^=s+Math.imul(s^s>>>7,61|s),((s^s>>>14)>>>0)/4294967296}}r(I4,"mulberry32");function Jj(e,t,s){const l=(e%360+360)%360,c=Math.max(0,Math.min(100,t))/100,u=Math.max(0,Math.min(100,s))/100,p=(1-Math.abs(2*u-1))*c,f=p*(1-Math.abs(l/60%2-1)),h=u-p/2;let g=0,v=0,y=0;return l<60?(g=p,v=f):l<120?(g=f,v=p):l<180?(v=p,y=f):l<240?(v=f,y=p):l<300?(g=f,y=p):(g=p,y=f),[Math.round((g+h)*255),Math.round((v+h)*255),Math.round((y+h)*255)]}r(Jj,"hslToRgb");function T4(e,t=22,s=2){if(typeof document>"u")return"";const l=document.createElement("canvas");l.width=t*s,l.height=t*s;const c=l.getContext("2d");if(!c)return"";const u=I4(E4(e)),p=Math.floor(u()*360),[f,h,g]=Jj(p,54+Math.floor(u()*14),36+Math.floor(u()*12)),[v,y,j]=Jj(p+(u()>.5?10:-10),86+Math.floor(u()*10),82+Math.floor(u()*10)),k=(t-1)/2,S=Math.max(k,1),N=u()*Math.PI*2,I=Math.cos(N),C=Math.sin(N),M=Math.abs(I*S)+Math.abs(C*S),R=.34+u()*.12,_=.33+u()*.12,D=u()*Math.PI*2,U=u()*Math.PI*2;c.fillStyle=`rgb(${f} ${h} ${g})`,c.fillRect(0,0,l.width,l.height),c.fillStyle=`rgb(${v} ${y} ${j})`;const K=s*.46;for(let z=0;z<t;z++){const E=z-k;for(let B=0;B<t;B++){const O=B-k,Q=((O*I+E*C)/M+1)*.5,V=Math.sin((O+E)*R+D)*.5+.5,ue=Math.sin((O-E)*_+U)*.5+.5,ce=V*.5+ue*.5,X=Math.max(0,Math.min(1,Q+(ce-.5)*.22));if(Math.max(0,Math.min(15,Math.floor(X*16)))<=_4[z&3][B&3])continue;const A=B*s+s/2,ee=z*s+s/2;c.beginPath(),c.arc(A,ee,K,0,Math.PI*2),c.fill()}}return l.toDataURL("image/png")}r(T4,"makeCompanyPatternDataUrl");function FC({companyName:e,logoUrl:t,className:s,logoFit:l="cover"}){const c=e.trim().charAt(0).toUpperCase()||"?",[u,p]=(0,x.useState)(!1),f=!u&&typeof t=="string"&&t.trim().length>0?t:null;(0,x.useEffect)(()=>{p(!1)},[t]);const h=(0,x.useMemo)(()=>T4(e.trim().toLowerCase()),[e]);return(0,a.jsxs)("div",{className:Y("relative flex items-center justify-center w-11 h-11 text-base font-semibold text-white overflow-hidden",s),children:[f?(0,a.jsx)("img",{src:f,alt:`${e} logo`,onError:r(()=>p(!0),"onError"),className:Y("absolute inset-0 h-full w-full",l==="contain"?"object-contain":"object-cover")}):h?(0,a.jsx)("img",{src:h,alt:"","aria-hidden":"true",className:"absolute inset-0 h-full w-full",style:{imageRendering:"pixelated"}}):(0,a.jsx)("div",{className:"absolute inset-0 bg-bg-3"}),!f&&(0,a.jsx)("span",{className:"relative z-10 drop-shadow-(--drop-shadow-extract-1)",children:c})]})}r(FC,"CompanyPatternIcon");function R4({collapsed:e}){return(0,a.jsxs)("div",{role:"status","aria-label":"Loading organization","aria-busy":"true",className:"flex h-9 min-w-0 flex-1 items-center gap-2 px-4",children:[(0,a.jsx)(rt,{className:"size-5 shrink-0"}),!e&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"min-w-0 flex-1",children:(0,a.jsx)(rt,{className:"h-4 w-20 max-w-full"})}),(0,a.jsx)(LS,{className:"size-3.5 shrink-0 text-ink-3","aria-hidden":"true"})]})]})}r(R4,"OrganizationSwitcherLoading");function M4({children:e,open:t,onOpenChange:s}){const{userId:l,settled:c,failed:u}=k0(),{selectedCompanyId:p}=bt(),f=KE(),h=f.data?.companies.find(y=>y.id===p)??null,g=c&&f.isSuccess&&!f.data?.unauthorized&&(p===null||h!==null),v=!g&&!u&&!f.isError&&!f.data?.unauthorized;return(0,a.jsx)(D4,{settled:g,loading:v,companyId:p,company:h,open:t,onOpenChange:s,children:e},JSON.stringify([l,p]))}r(M4,"PluginOrganizationSwitcher");function D4({children:e,settled:t,loading:s,companyId:l,company:c,open:u,onOpenChange:p}){const[f,h]=(0,x.useState)(!1),{isMobile:g,setSidebarOpen:v,collapsed:y,peeking:j}=Jn(),k=u??f,S=p??h;function N(){S(!1),g&&v(!1)}r(N,"closeNavigation");const I=ox({onSignedOut:N}),{slots:C,isLoading:M,errorMessage:R}=qc({slotTypes:["organizationSwitcher"],companyId:l,enabled:t});if(s||t&&M&&!R)return(0,a.jsx)(R4,{collapsed:y&&!j});if(!t||R||C.length!==1)return e;const _={organizationSwitcher:{currentCompany:c?{name:c.name,logoUrl:c.logoUrl??null}:null,collapsed:y&&!j,open:k,onOpenChange:S,onNavigate:N,onSignOut:r(()=>I.mutate(),"onSignOut"),signingOut:I.isPending,renderIcon:r((D,U,K)=>(0,a.jsx)(FC,{companyName:D,logoUrl:U,className:K?"size-(--organization-popover-avatar-size) shrink-0 rounded-lg text-(length:--text-micro)":"size-5 shrink-0 rounded-md text-(length:--text-micro)"}),"renderIcon")}};return(0,a.jsx)(L0,{slot:C[0],context:{companyId:l,companyPrefix:c?.issuePrefix??null},componentProps:{..._},fallback:e})}r(D4,"OrganizationSwitcher");var O4="size-5 shrink-0 rounded-md text-(length:--text-micro)",L4="size-(--organization-popover-avatar-size) shrink-0 rounded-lg text-(length:--text-micro)",z4="h-(--organization-popover-company-row-height) min-w-0 gap-(--organization-popover-row-gap) rounded-lg px-2.5 py-0 text-(length:--text-compact) focus:bg-bg-3/50 focus:text-ink",yh="h-(--organization-popover-action-row-height) gap-(--organization-popover-row-gap) rounded-lg px-2.5 py-0 text-(length:--text-compact) font-medium leading-(--organization-popover-action-line-height) text-ink focus:bg-bg-3/50 focus:text-ink";function HC({company:e,inPopover:t=!1}){return(0,a.jsx)(FC,{companyName:e.name,logoUrl:e.logoUrl,className:t?L4:O4})}r(HC,"WorkspaceIcon");function P4({company:e,isEditing:t,isSelected:s,onSelect:l}){const{attributes:c,listeners:u,setActivatorNodeRef:p,setNodeRef:f,transform:h,transition:g,isDragging:v}=lx({id:e.id,disabled:!t});return(0,a.jsxs)(Sn,{ref:f,style:{transform:ni.Transform.toString(h),transition:g,zIndex:v?10:void 0},onSelect:r(y=>{if(t){y.preventDefault();return}l(e)},"onSelect"),className:Y(z4,t&&"cursor-grab",v&&"opacity-80"),children:[(0,a.jsx)(HC,{company:e,inPopover:!0}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block truncate font-medium leading-(--organization-popover-name-line-height)",children:e.name}),t?null:(0,a.jsx)("span",{className:"block truncate text-(length:--text-nano) leading-(--organization-popover-prefix-line-height) text-ink-3",children:e.issuePrefix})]}),t?(0,a.jsx)("button",{type:"button",ref:p,"aria-label":`Reorder ${e.name}`,className:"inline-flex size-8 shrink-0 items-center justify-center rounded text-ink-3 hover:bg-bg-3 hover:text-ink focus-visible:outline-none focus-visible:ring-(length:--rad-2) focus-visible:ring-focus",onClick:r(y=>{y.preventDefault(),y.stopPropagation()},"onClick"),...c,...u,children:(0,a.jsx)(bR,{className:"size-4","aria-hidden":"true"})}):(0,a.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s?(0,a.jsx)(Ms,{className:"size-4 text-ink"}):null})]})}r(P4,"SortableCompanyItem");function $4(e={}){return(0,a.jsx)(M4,{...e,children:(0,a.jsx)(U4,{...e})})}r($4,"SidebarCompanyMenu");function U4({open:e,onOpenChange:t}){const[s,l]=(0,x.useState)(!1),[c,u]=(0,x.useState)(!1),{companies:p,selectedCompany:f,setSelectedCompanyId:h,companyListUnavailable:g,retryCompanies:v}=bt(),{openOnboarding:y}=Us(),{isMobile:j,setSidebarOpen:k,collapsed:S,peeking:N}=Jn(),I=S&&!N,C=hn(),M=ja(),R=e??s,_=t??l,D=J0(Mc(_C,{activationConstraint:{distance:8}}),Mc(EC,{activationConstraint:{delay:180,tolerance:6}})),U=(0,x.useMemo)(()=>p.filter(de=>de.status!=="archived"),[p]),{data:K}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),z=K?.user?.id??K?.session?.userId??null,{orderedCompanies:E,persistOrder:B}=N4({companies:U,userId:z}),{hidden:O,loaded:Q}=gr(),V=Q&&!Fd(O,"company.members")&&!Fd(O,"company.invites"),ue="organization",ce=f?.name??null,X=ox({onSignedOut:ee});function A(de){de||u(!1),_(de)}r(A,"handleOpenChange");function ee(){_(!1),u(!1),j&&k(!1)}r(ee,"closeNavigationChrome");function ie(de){const we=C.pathname.split("/")[1]?.toUpperCase(),ye=U.some(he=>he.issuePrefix.toUpperCase()===we),Me=de.id!==f?.id&&(C.pathname.startsWith("/instance/")||ye);h(de.id),_(!1),j&&k(!1),Me&&M(`/${de.issuePrefix}/dashboard`)}r(ie,"selectCompany");function le(){_(!1),j&&k(!1),y({initialStep:1})}r(le,"addCompany");const Ae=(0,x.useCallback)(de=>{const{active:we,over:ye}=de;if(!ye||we.id===ye.id)return;const Me=E.map(et=>et.id),he=Me.indexOf(we.id),ve=Me.indexOf(ye.id);he===-1||ve===-1||B(ix(Me,he,ve))},[E,B]);return(0,a.jsxs)(tl,{open:R,onOpenChange:A,children:[(0,a.jsx)(Jr,{asChild:!0,children:(0,a.jsxs)(oe,{variant:"ghost",className:"h-9 min-w-0 flex-1 justify-start gap-2 px-4 text-left has-[>svg]:px-4","aria-label":ce?`Open ${ce} ${ue} switcher`:`Open ${ue} switcher`,children:[(0,a.jsxs)("span",{className:Y("flex min-w-0 flex-1 items-center",I?"gap-2.5":"gap-2"),children:[f?(0,a.jsx)(HC,{company:f}):null,(0,a.jsx)("span",{className:Y("min-w-0 truncate text-sm font-bold text-ink",I&&"block w-0 min-w-0 -ms-2.5 overflow-hidden whitespace-nowrap text-transparent select-none"),title:ce??void 0,children:ce??`Select ${ue}`})]}),!I&&(0,a.jsx)(LS,{className:"size-3.5 shrink-0 text-ink-3"})]})}),(0,a.jsxs)(el,{align:"start",sideOffset:8,className:"ml-2 w-(--organization-popover-width) max-w-(--sz-calc-24) overflow-hidden rounded-xl border-line bg-bg-2 p-0 shadow-(--shadow-profile-popover)",children:[(0,a.jsxs)("div",{className:"flex h-(--organization-popover-header-height) items-center justify-between gap-2 px-3.5",children:[(0,a.jsx)(ES,{className:"p-0 text-(length:--text-compact) font-semibold text-ink",children:"Organizations"}),(0,a.jsx)("button",{type:"button",onClick:r(de=>{de.preventDefault(),de.stopPropagation(),u(we=>!we)},"onClick"),className:"rounded px-1.5 py-0.5 text-xs font-medium text-ink-3 transition-colors hover:bg-bg-3 hover:text-ink",children:c?"Done":"Edit"})]}),(0,a.jsxs)("div",{className:"flex max-h-96 flex-col gap-0.5 overflow-y-auto px-2.5 pb-2 pt-1",children:[(0,a.jsx)(sx,{sensors:D,collisionDetection:xC,onDragEnd:Ae,children:(0,a.jsx)(rx,{items:E.map(de=>de.id),strategy:PC,children:E.map(de=>(0,a.jsx)(P4,{company:de,isEditing:c,isSelected:de.id===f?.id,onSelect:ie},de.id))})}),E.length===0?g?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Sn,{disabled:!0,children:"Couldn't load organizations"}),(0,a.jsxs)(Sn,{onSelect:r(de=>{de.preventDefault(),v()},"onSelect"),children:[(0,a.jsx)(nl,{className:"h-4 w-4 mr-2"}),"Try again"]})]}):(0,a.jsx)(Sn,{disabled:!0,children:"No organizations"}):null]}),(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 border-t border-line px-2.5 pb-2.5 pt-2",children:[(0,a.jsxs)(Sn,{onClick:le,className:yh,disabled:c,children:[(0,a.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,a.jsx)(as,{className:"size-4"})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:"Create organization"})]}),V?(0,a.jsx)(Sn,{asChild:!0,disabled:c,className:yh,children:(0,a.jsxs)(mn,{to:"/company/settings/members?tab=invites",onClick:r(de=>{if(c){de.preventDefault();return}ee()},"onClick"),children:[(0,a.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,a.jsx)(yN,{className:"size-4"})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:ce?`Invite people to ${ce}`:"Invite people"})]})}):null,K?.session?(0,a.jsxs)(Sn,{className:yh,onClick:r(()=>X.mutate(),"onClick"),disabled:c||X.isPending,children:[(0,a.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,a.jsx)(Uf,{className:"size-4"})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:X.isPending?"Signing out...":"Sign out"})]}):null]})]})]})}r(U4,"BuiltinCompanyMenu");function ew({children:e}){const{openNewIssue:t}=Us(),{enabled:s}=Pf(),[l,c]=(0,x.useState)(!0),[u,p]=(0,x.useState)(!0),{selectedCompanyId:f,selectedCompany:h}=bt(),{collapsed:g,peeking:v}=Jn(),y=g&&!v,j=Y0(f),{data:k,isFetched:S}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")}),N=$.liveRuns(f),I=Ac({companyId:f,resourceKey:"live-runs",queryKey:N,enabled:!!f,refetchInterval:!1,leaderOnly:!0}),{data:C,dataUpdatedAt:M}=me({queryKey:N,queryFn:r(()=>zf.liveRunsForCompany(f),"queryFn"),enabled:I.enabled,refetchInterval:I.refetchInterval});_c(I,C,M);const R=C?.length??0,_=new Set((C??[]).flatMap(A=>A.issueId?[A.issueId]:[])),D=s,U=k?.enableCombinedInboxTasks===!0,K=!D&&k?.enableIsolatedWorkspaces===!0,z=k?.enablePipelines===!0,E=k?.enableStatusCards===!0,B=!S,O=k?.enableGoalsSidebarLink===!0,Q=k?.enableDecisions===!0,{data:V}=me({queryKey:$.attentionCount(f),queryFn:r(()=>q5.count(f),"queryFn"),enabled:!!f&&Q,refetchInterval:6e4}),ue=V?.count??0,ce=k?.enableCases===!0,X={companyId:f,companyPrefix:h?.issuePrefix??null};return(0,a.jsxs)("aside",{className:Y("w-full h-full min-h-0 flex flex-col",or.surface),children:[(0,a.jsxs)("div",{className:"flex h-(--sz-60px) shrink-0 items-center gap-2 px-3",children:[y?null:(0,a.jsx)(M0,{className:"size-5 shrink-0 text-ink",title:"Wardmote"}),(0,a.jsx)($4,{})]}),(0,a.jsxs)("nav",{className:y?or.railNav:or.nav,children:[(0,a.jsxs)("div",{className:or.group,children:[(()=>{const A=(0,a.jsxs)("button",{onClick:r(()=>t(),"onClick"),"data-slot":"icon-button","aria-label":y?"New Task":void 0,className:Y("flex items-center gap-2.5 mx-2 rounded-lg px-2 py-1.5 pointer-coarse:py-1 text-(length:--text-compact) font-medium text-ink/80 transition-colors hover:bg-bg-3 hover:text-ink"),children:[(0,a.jsx)(V0,{className:"h-4 w-4 shrink-0"}),(0,a.jsx)("span",{className:y?aS:"truncate",children:"New Task"})]});return y?(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:A}),(0,a.jsx)(Ts,{side:"right",children:"New Task"})]}):A})(),(0,a.jsx)(Ge,{to:"/search",label:"Search",icon:pr}),(0,a.jsx)(Ge,{to:"/dashboard",label:"Dashboard",icon:T0}),U?null:(0,a.jsx)(Ge,{to:"/inbox",label:"Inbox",icon:E0,badge:j.inbox,badgeLabel:"unread",badgeTone:j.failedRuns>0?"danger":"default",alert:j.failedRuns>0}),s&&!D?(0,a.jsx)(Ge,{to:"/chats",label:"Chat",icon:yg}):null,Q?(0,a.jsx)(Ge,{to:"/decisions",label:"Decisions",icon:O1,badge:ue,badgeLabel:"decisions"}):null,E?(0,a.jsx)(Ge,{to:"/status",label:"Status",icon:jR,textBadge:"beta"}):null]}),(0,a.jsxs)(af,{label:"Work",collapsible:{open:l,onOpenChange:c},children:[D?(0,a.jsx)(Ge,{to:"/chats",label:"Chat",icon:yg}):null,U?(0,a.jsx)(Ge,{to:"/issues",label:"Tasks",icon:eg,liveCount:R,badge:j.inbox,badgeLabel:"unread",badgeTone:j.failedRuns>0?"danger":"default",alert:j.failedRuns>0}):(0,a.jsx)(Ge,{to:"/issues",label:"Tasks",icon:eg,liveCount:R}),(0,a.jsx)(Ge,{to:"/projects",label:"Projects",icon:qS}),(0,a.jsx)(E5,{}),(0,a.jsx)(Ge,{to:"/routines",label:"Routines",icon:VS}),(0,a.jsx)(Ge,{to:"/artifacts",label:"Artifacts",icon:l3}),ce?(0,a.jsx)(Ge,{to:"/cases",label:"Cases",icon:Rf,textBadge:"beta"}):null,z?(0,a.jsx)(Ge,{to:"/pipelines",label:"Pipelines",icon:hc}):null,O?(0,a.jsx)(Ge,{to:"/goals",label:"Goals",icon:C0}):B?(0,a.jsx)("div",{"data-testid":"sidebar-goals-placeholder",className:"h-8 pointer-coarse:h-7","aria-hidden":"true"}):null,K?(0,a.jsx)(Ge,{to:"/workspaces",label:"Workspaces",icon:hc}):null,(0,a.jsx)(Ge,{to:"/terminal",label:"Terminal",icon:LR}),(0,a.jsx)(pg,{errorBehavior:"hidden",slotTypes:["sidebar"],context:X,className:"flex flex-col gap-0.5",itemClassName:"text-(length:--text-compact) font-medium",missingBehavior:"placeholder"}),(0,a.jsx)(uC,{errorBehavior:"hidden",placementZones:["sidebar"],context:X,className:"flex flex-col gap-0.5",itemClassName:"text-(length:--text-compact) font-medium"})]}),(0,a.jsxs)(af,{label:"Org",collapsible:{open:u,onOpenChange:p},children:[(0,a.jsx)(Ge,{to:"/agents",label:"Agents",icon:Gr}),(0,a.jsx)(Ge,{to:"/skills",label:"Skills",icon:DS}),(0,a.jsx)(Ge,{to:"/apps",label:"Connectors",icon:$R}),(0,a.jsx)(Ge,{to:"/activity",label:"Audit",icon:H0})]}),e??(0,a.jsx)(A5,{streamlined:!0}),(0,a.jsx)(B5,{companyId:f,liveIssueIds:_}),(0,a.jsx)(pg,{errorBehavior:"hidden",slotTypes:["sidebarPanel"],context:X,className:"flex flex-col gap-3",itemClassName:"rounded-lg border border-line p-3",missingBehavior:"placeholder"})]})]})}r(ew,"Sidebar");function VC(){const e=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return{enabled:!e.isError&&e.data?.enableFastResponses===!0,loaded:e.isFetched}}r(VC,"useFastResponsesEnabled");var B4="wardmote.contextualSidebar.origin";function WC(e,t){if(!t)return[];const s=e.split("/").filter(Boolean);return s.length<2?[]:s[0]?.toUpperCase()!==t.toUpperCase()?[]:s.slice(1)}r(WC,"getCompanyPathSegments");function K4(e,t){const s=WC(e,t),l=s[0]?.toLowerCase(),c=l==="company"&&["settings","export","import"].includes(s[1]?.toLowerCase()??""),u=s[1]?.toLowerCase(),p=l==="agents"&&!!u&&u!=="new"&&!["all","active","paused","error","builtin"].includes(u??""),f=l==="routines"&&s.length>=2,h=l==="skills";return{companySegments:s,isTaskDetail:(l==="issues"||l==="chats")&&s.length>=2,builtInContextualSurface:c?"settings":l==="apps"||l==="tools"?"apps":p?"agent":f?"routine":h?"skills":null}}r(K4,"classifyShellRoute");function QC(e,t){return`${B4}:${t.toUpperCase()}:${e}`}r(QC,"contextualOriginStorageKey");function GC(e,t){return e.split("/").filter(Boolean)[0]?.toUpperCase()===t.toUpperCase()}r(GC,"isCompanyPath");function q4({surface:e,companyPrefix:t,previousPathname:s}){if(!(typeof window>"u"||!GC(s,t)))try{window.sessionStorage.setItem(QC(e,t),s)}catch{}}r(q4,"rememberContextualSidebarOrigin");function F4({surface:e,companyPrefix:t,fallbackTo:s}){if(typeof window>"u"||!t)return s;try{const l=window.sessionStorage.getItem(QC(e,t));return l&&GC(l,t)?l:s}catch{return s}}r(F4,"readContextualSidebarOrigin");function Xc({surface:e,title:t,icon:s,fallbackTo:l="/dashboard",showHeader:c=!0,className:u,children:p}){const f=ja(),{selectedCompany:h}=bt(),{isMobile:g,setSidebarOpen:v}=Jn();function y(){f(F4({surface:e,companyPrefix:h?.issuePrefix,fallbackTo:l})),g&&v(!1)}return r(y,"goBack"),(0,a.jsx)(GS,{children:(0,a.jsxs)("aside",{"data-contextual-sidebar":e,className:Y("flex h-full min-h-0 w-full flex-col bg-bg-3",u),children:[c?(0,a.jsxs)("div",{className:"flex shrink-0 flex-col gap-1 px-3 py-3",children:[(0,a.jsxs)("button",{type:"button",onClick:y,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-left text-xs text-ink-3 transition-colors hover:bg-bg hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus","aria-label":`Back from ${t}`,children:[(0,a.jsx)(OS,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),(0,a.jsx)("span",{className:"truncate",children:h?.name??"Organization"})]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2 px-2 py-1",children:[s?(0,a.jsx)(s,{className:"h-4 w-4 shrink-0 text-ink-3","aria-hidden":"true"}):null,(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-bold text-ink",children:t})]})]}):null,p]})})}r(Xc,"ContextualSidebarFrame");function H4(e){const t=e.manifestJson.environmentDrivers??[];return t.length===0?!1:t.every(s=>s.kind==="sandbox_provider")}r(H4,"isSandboxProviderOnly");function V4(){const{selectedCompanyId:e}=bt(),{hidden:t}=gr(),{enabled:s}=VC(),l=r(g=>!t.has(g),"showPage"),c=l("instance.plugins"),{slots:u}=qc({slotTypes:["companySettingsPage"],companyId:e,enabled:!!e}),{data:p}=me({queryKey:e?$.sidebarBadges(e):["sidebar-badges","__disabled__"],queryFn:r(async()=>{try{return await WN.get(e)}catch(g){if(g instanceof Ti&&(g.status===401||g.status===403))return null;throw g}},"queryFn"),enabled:!!e,retry:!1,refetchInterval:15e3}),{data:f}=me({queryKey:$.plugins.all,queryFn:r(()=>D0.list(),"queryFn"),enabled:c}),h=(f??[]).filter(g=>!H4(g));return(0,a.jsxs)(Xc,{surface:"settings",title:"Settings",showHeader:!1,className:or.surface,children:[(0,a.jsx)("div",{"data-slot":"settings-sidebar-header",className:"flex h-(--sz-60px) shrink-0 items-center px-3",children:(0,a.jsx)("div",{"data-slot":"settings-back-group",className:`${or.group} w-full`,children:(0,a.jsx)(Ge,{to:"/dashboard",label:"Back to app",icon:A0})})}),(0,a.jsx)("nav",{"aria-label":"Settings","data-slot":"contextual-sidebar-nav",className:or.nav,children:(0,a.jsxs)("div",{"data-slot":"contextual-sidebar-group",className:or.group,children:[(0,a.jsx)(Ge,{to:"/company/settings",label:"General",icon:cN,end:!0}),l("instance.profile")&&(0,a.jsx)(Ge,{to:"/company/settings/instance/profile",label:"Profile",icon:UR,end:!0}),l("company.members")&&(0,a.jsx)(Ge,{to:"/company/settings/members",label:"Members",icon:Gr,badge:p?.joinRequests??0,end:!0}),u.filter(g=>g.routePath).map(g=>(0,a.jsx)(Ge,{to:`/company/settings/${g.routePath}`,label:g.displayName,icon:qy,end:!0},`${g.pluginKey}:${g.id}`)),(0,a.jsx)(Ge,{to:"/company/settings/agent-defaults",label:"Agent defaults",icon:Nc}),(0,a.jsx)(Ge,{to:"/company/settings/models",label:"Models and providers",icon:DS,end:!0}),l("company.secrets")&&(0,a.jsx)(Ge,{to:"/company/settings/secrets",label:"Secrets",icon:I0,end:!0}),l("instance.environments")&&(0,a.jsx)(Ge,{to:"/company/settings/instance/environments",label:"Environments",icon:CR,end:!0}),s&&(0,a.jsx)(Ge,{to:"/company/settings/connections",label:"Connections",icon:j3,end:!0}),l("instance.access")&&(0,a.jsx)(Ge,{to:"/company/settings/instance/access",label:"Access",icon:E3,end:!0}),l("company.export")&&(0,a.jsx)(Ge,{to:"/company/export",label:"Export",icon:bg}),l("company.import")&&(0,a.jsx)(Ge,{to:"/company/import",label:"Import",icon:T3,end:!0}),l("instance.experimental")&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ge,{to:"/company/settings/instance/features",label:"Features",icon:xN}),(0,a.jsx)(Ge,{to:"/company/settings/instance/advanced",label:"Advanced",icon:If})]}),c&&(0,a.jsx)(Ge,{to:"/company/settings/instance/plugins",label:"Plugins",icon:qy}),c&&h.length>0?(0,a.jsx)("div",{className:"ml-4 mt-1 flex flex-col gap-0.5 border-l border-line/70 pl-3",children:h.map(g=>(0,a.jsx)(hS,{to:`${sr}/plugins/${g.id}`,state:Of,className:r(({isActive:v})=>Y("rounded-md px-2 py-1.5 text-xs transition-colors",v?oo.active:Y(oo.rest,"text-ink-3")),"className"),children:g.manifestJson.displayName??g.packageName},g.id))}):null,l("instance.adapters")&&(0,a.jsx)(Ge,{to:"/company/settings/instance/adapters",label:"Adapters",icon:r3})]})})]})}r(V4,"CompanySettingsSidebar");function W4({items:e,value:t,onValueChange:s,align:l="center"}){const{isMobile:c}=Jn();return c&&t!==void 0&&s?(0,a.jsxs)("div",{className:"relative inline-flex",children:[(0,a.jsx)("select",{value:t,onChange:r(u=>s(u.target.value),"onChange"),className:"h-9 appearance-none rounded-md border border-line bg-bg pl-3 pr-9 py-1 text-base focus:outline-none focus:ring-1 focus:ring-focus","aria-label":"Page section",children:e.map(u=>(0,a.jsx)("option",{value:u.value,children:typeof u.label=="string"?u.label:u.value},u.value))}),(0,a.jsx)(Qr,{"aria-hidden":"true",className:"pointer-events-none absolute right-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-ink-3"})]}):(0,a.jsx)(AI,{variant:"line",className:l==="start"?"justify-start":void 0,children:e.map(u=>(0,a.jsx)(CI,{value:u.value,children:u.label},u.value))})}r(W4,"PageTabBar");var Q4=[{value:"general",label:"General",href:"/company/settings"},{value:"export",label:"Export",href:"/company/export"},{value:"import",label:"Import",href:"/company/import"},{value:"members",label:"Members",href:"/company/settings/members"},{value:"secrets",label:"Secrets",href:"/company/settings/secrets"},{value:"instance-profile",label:"Profile",href:`${sr}/profile`},{value:"instance-environments",label:"Environments",href:`${sr}/environments`},{value:"connections",label:"Connections",href:"/company/settings/connections"},{value:"instance-access",label:"Access",href:`${sr}/access`},{value:"instance-features",label:"Features",href:`${sr}/features`},{value:"instance-advanced",label:"Advanced",href:`${sr}/advanced`},{value:"instance-plugins",label:"Plugins",href:`${sr}/plugins`},{value:"instance-adapters",label:"Adapters",href:`${sr}/adapters`}],G4={export:"company.export",import:"company.import",members:"company.members",secrets:"company.secrets","instance-profile":"instance.profile","instance-environments":"instance.environments","instance-access":"instance.access","instance-features":"instance.experimental","instance-advanced":"instance.experimental","instance-plugins":"instance.plugins","instance-adapters":"instance.adapters"};function Y4(e){return e.includes("/company/settings/connections")?"connections":e.includes("/company/settings/instance/profile")?"instance-profile":e.includes("/company/settings/instance/environments")?"instance-environments":e.includes("/company/settings/instance/access")?"instance-access":e.includes("/company/settings/instance/features")?"instance-features":e.includes("/company/settings/instance/advanced")?"instance-advanced":e.includes("/company/settings/instance/plugins")?"instance-plugins":e.includes("/company/settings/instance/adapters")?"instance-adapters":e.includes("/company/settings/instance/general")?"general":e.includes("/company/settings/environments")?"instance-environments":e.includes("/company/export")?"export":e.includes("/company/import")?"import":e.includes("/company/settings/members")||e.includes("/company/settings/access")||e.includes("/company/settings/invites")?"members":e.includes("/company/settings/secrets")?"secrets":"general"}r(Y4,"getCompanySettingsTab");function X4(){const e=hn(),t=ja(),{hidden:s}=gr(),{enabled:l}=VC(),c=Y4(e.pathname),u=Q4.filter(f=>{if(f.value==="connections"&&!l)return!1;const h=G4[f.value];return!h||!s.has(h)});function p(f){const h=u.find(g=>g.value===f);!h||h.value===c||t(h.href)}return r(p,"handleTabChange"),(0,a.jsx)(_I,{value:c,onValueChange:p,children:(0,a.jsx)(W4,{items:u.map(({value:f,label:h})=>({value:f,label:h})),value:c,onValueChange:p,align:"start"})})}r(X4,"CompanySettingsNav");var Mn={nav:"flex min-h-0 flex-1 flex-col overflow-y-auto scrollbar-auto-hide px-3 py-2",group:"flex flex-col gap-0.5",section:"mt-4 border-t border-line pt-3",sectionLabel:"px-2 pb-1 text-(length:--text-micro) font-semibold uppercase tracking-wide text-ink-3",sectionDescription:"px-4 pb-1.5 text-(length:--text-micro) leading-snug text-ink-3/70"};function YC({endpointId:e,NavItem:t=Ge}){const s=me({queryKey:$.chatEndpoints.detail(e),queryFn:r(()=>ZS.get(e),"queryFn"),enabled:!!e});return(0,a.jsx)("aside",{className:"flex h-full min-h-0 w-full flex-col border-r border-line bg-bg",children:(0,a.jsx)("nav",{"aria-label":"Chat connection","data-slot":"contextual-sidebar-nav",className:Mn.nav,children:(0,a.jsxs)("div",{"data-slot":"contextual-sidebar-group",className:Mn.group,children:[(0,a.jsx)(t,{to:`/apps/chat/${e}/settings`,label:"Settings",icon:WS,end:!0}),(0,a.jsx)(t,{to:`/apps/chat/${e}/access`,label:"Access",icon:Gr,end:!0}),s.data?.provider==="github"&&(0,a.jsx)(t,{to:`/apps/chat/${e}/reviews`,label:"Reviews",icon:y3}),(0,a.jsx)(t,{to:`/apps/chat/${e}/conversations`,label:"Conversations",icon:pS,end:!0}),(0,a.jsx)(t,{to:`/apps/chat/${e}/activity`,label:"Activity",icon:Mf,end:!0}),s.data?.provider==="openwa"&&(0,a.jsx)(t,{to:`/apps/chat/${e}/approvals`,label:"Approvals",icon:Cc,end:!0}),s.data?.provider==="openwa"&&(0,a.jsx)(t,{to:`/apps/chat/${e}/audit`,label:"Audit",icon:N3,end:!0})]})})})}r(YC,"ChatDetailSidebar");var aa=r(e=>`/chat-endpoints/${e}/github`,"path$1"),Z4={repositories:r((e,t={})=>{const s=new URLSearchParams({limit:String(t.limit??20),offset:String(t.offset??0),search:t.search??""});return je.get(`${aa(e)}/repositories?${s}`)},"repositories"),toggleAllRepositories:r((e,t)=>je.put(`${aa(e)}/repositories/access`,{enabled:t}),"toggleAllRepositories"),configuration:r(e=>je.get(`${aa(e)}/configuration`),"configuration"),save:r((e,t,s)=>je.put(`${aa(e)}/configuration`,{expectedRevision:t,configuration:s}),"save"),registration:r((e,t)=>je.post(`${aa(e)}/registration`,t),"registration"),saveDraft:r((e,t)=>je.put(`${aa(e)}/draft`,t),"saveDraft"),advance:r(e=>je.post(`${aa(e)}/setup`,{}),"advance"),startIdentity:r(e=>je.post(`${aa(e)}/identity/start`,{}),"startIdentity"),confirmIdentity:r((e,t)=>je.post(`${aa(e)}/identity/confirm`,{githubUserId:t}),"confirmIdentity"),connectApp:r((e,t)=>je.post(`${aa(e)}/app`,t),"connectApp"),refreshRepositories:r(e=>je.post(`${aa(e)}/repositories/refresh`,{}),"refreshRepositories"),verify:r(e=>je.post(`${aa(e)}/verify`,{}),"verify"),progress:r((e,t)=>je.put(`${aa(e)}/progress`,{stage:t}),"progress"),personalConnections:r(e=>je.get(`${aa(e)}/personal-connections`),"personalConnections"),identity:r((e,t,s)=>je.post(`${aa(e)}/identity`,{connectionId:t,confirmedGithubUserId:s}),"identity"),lookup:r((e,t)=>je.post(`${aa(e)}/people/lookup`,{login:t}),"lookup"),review:r((e,t)=>je.get(`${aa(e)}/reviews/${t}`),"review"),reviews:r(e=>je.get(`${aa(e)}/reviews`),"reviews")};function J4({NavItem:e=Ge}){const[t]=rS(),s=t.get("resume"),l=me({queryKey:["github-wizard",s],queryFn:r(()=>Z4.advance(s),"queryFn"),enabled:!1});return t.get("provider")==="github"&&s&&t.get("stage")!=="identity"&&t.get("reconnect")!=="1"&&l.data?.state==="connected"?(0,a.jsx)(YC,{endpointId:s,NavItem:e}):(0,a.jsx)(L3,{})}r(J4,"ChatSetupSidebar");function FG(e){return(0,a.jsx)(O3,{...e,labels:e.labels??["Choose agent","Connect provider","Try it"],ariaLabel:"Connection setup progress"})}r(FG,"ChatSetupNavigation");var ez="/apps/advanced";function tz(e){return`${ez}/${e}`}r(tz,"advancedTabHref");var XC=[{key:"paste-config",label:"Paste a config",icon:YI}],ZC=[{key:"gateways",label:"Gateways",icon:HS},{key:"profiles",label:"Profiles",icon:Rf},{key:"smoke-lab",label:"Smoke Lab",icon:b3}],HG=[...XC,...ZC];function VG(e){return XC.some(t=>t.key===e)}r(VG,"isAdvancedSetupTab");function nz(e){return e==="smoke-lab"}r(nz,"isExperimentalToolTab");var tw=null;function az(){return tw??=new _f,tw}r(az,"getDetachedClient$2");function sz(){const e=(0,x.useContext)(j0),{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),enabled:e!=null},e??az());return e?{enabled:t?.enableSmokeLab===!0,loaded:s}:{enabled:!1,loaded:!0}}r(sz,"useSmokeLabEnabled");function iz(){const{selectedCompanyId:e}=bt();return me({queryKey:$.tools.actionRequests(e??"__none__","pending"),queryFn:r(()=>Yl.listActionRequests(e,"pending"),"queryFn"),enabled:!!e,refetchInterval:2e4}).data?.actionRequests.length??0}r(iz,"useReviewCount");function rz(){const{pathname:e}=hn(),t=iz(),{enabled:s}=sz(),l=ZC.filter(u=>u.key==="gateways"||u.key==="profiles"?!1:!nz(u.key)||s);if(e.endsWith("/apps/chat/connect"))return(0,a.jsx)(J4,{});const c=e.match(/\/apps\/chat\/([^/]+)(?:\/(?:settings|access|conversations|activity|approvals|audit)|\/reviews(?:\/[^/]+)?)?\/?$/);return c?(0,a.jsx)(YC,{endpointId:c[1]}):(0,a.jsx)("aside",{className:"w-full h-full min-h-0 border-r border-line bg-bg flex flex-col",children:(0,a.jsxs)("nav",{"aria-label":"Connectors","data-slot":"contextual-sidebar-nav",className:Mn.nav,children:[(0,a.jsxs)("div",{"data-slot":"contextual-sidebar-group",className:Mn.group,children:[(0,a.jsx)(Ge,{to:"/apps",label:"Browse",icon:zR,end:!0}),(0,a.jsx)(Ge,{to:"/apps/review",label:"Review",icon:_3,badge:t>0?t:void 0,badgeTone:"warning",badgeLabel:"waiting for your OK"})]}),l.length>0?(0,a.jsxs)("div",{"data-slot":"contextual-sidebar-section",className:Mn.section,children:[(0,a.jsx)("div",{"data-slot":"contextual-sidebar-section-label",className:Mn.sectionLabel,children:"Developer"}),(0,a.jsx)("p",{"data-slot":"contextual-sidebar-section-description",className:Mn.sectionDescription,children:"Advanced setup for developers."}),(0,a.jsx)("div",{"data-slot":"contextual-sidebar-group",className:Mn.group,children:l.map(u=>(0,a.jsx)(Ge,{to:tz(u.key),label:u.label,icon:u.icon,end:!0},u.key))})]}):null]})})}r(rz,"AppsSidebar");function nw(e){const{selectedCompanyId:t}=bt(),{isMobile:s,setSidebarOpen:l}=Jn(),c=me({queryKey:$.tools.connection(e.kind==="connection"?e.connectionId:"__none__"),queryFn:r(()=>Yl.getConnection(e.kind==="connection"?e.connectionId:""),"queryFn"),enabled:e.kind==="connection"&&!!e.connectionId}),u=me({queryKey:$.tools.applications(t??"__none__"),queryFn:r(()=>Yl.listApplications(t),"queryFn"),enabled:!!t}),p=me({queryKey:$.tools.connections(t??"__none__"),queryFn:r(()=>Yl.listConnections(t),"queryFn"),enabled:e.kind==="application"&&!!t}),f=me({queryKey:$.apps.gallery(t??"__none__"),queryFn:r(()=>Yl.listGallery(t),"queryFn"),enabled:!!t}),h=me({queryKey:$.apps.attention(t??"__none__"),queryFn:r(()=>Yl.listAppsAttention(t),"queryFn"),enabled:!!t,refetchInterval:3e4}),g=c.data,v=e.kind==="application"?e.applicationId:g?.applicationId,y=(u.data?.applications??[]).find(R=>R.id===v)??null,j=cz(e.kind==="application"?(p.data?.connections??[]).filter(R=>R.applicationId===e.applicationId):[]),k=g?nR(g):y?.name??"App",S=oz(f.data?.apps??[],g,y??void 0),N=uS(y)??fS(g)??(S?ng(S):null),I=g?.id??j?.id??null,C=I?h.data?.apps.find(R=>R.connection.id===I):null,M=(C?.pendingActionRequestCount??0)+((C?.quarantinedCatalogEntryCount??0)>0?1:0);return(0,a.jsxs)("aside",{className:"flex h-full min-h-0 w-full flex-col border-r border-line bg-bg",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col gap-3 px-3 py-3",children:[(0,a.jsxs)(mn,{to:"/apps",onClick:r(()=>{s&&l(!1)},"onClick"),className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-ink-3 transition-colors hover:bg-bg-3/50 hover:text-ink",children:[(0,a.jsx)(OS,{className:"h-3.5 w-3.5 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:"All connectors"})]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2 px-2 py-1",children:[(0,a.jsx)(vT,{name:k,brandKey:N,logoUrl:JE(S),allowRemoteFallback:!u.isPending,darkLogoUrl:tI(S),size:28}),(0,a.jsx)("span",{className:"flex-1 truncate text-sm font-bold text-ink",children:k})]})]}),(0,a.jsx)("nav",{className:"scrollbar-auto-hide min-h-0 flex-1 overflow-y-auto px-3 py-2",children:(0,a.jsx)("div",{className:"flex flex-col gap-0.5",children:YE.map(R=>(0,a.jsx)(Ge,{to:lz(e,R.key),label:R.label,icon:R.icon,end:!0,badge:R.key==="review"&&M>0?M:void 0,badgeTone:"danger",badgeLabel:"needing review"},R.key))})})]})}r(nw,"AppDetailSidebar");function lz(e,t){return e.kind==="connection"?WE(e.connectionId,t):GE(e.applicationId,t)}r(lz,"tabHref");function oz(e,t,s){const l=uS(s)??fS(t);if(l){const u=e.find(p=>ng(p)===l);if(u)return u}const c=(t?.name??s?.name)?.toLowerCase();return c?e.find(u=>eI(u).toLowerCase()===c)??e.find(u=>ng(u)===c)??null:null}r(oz,"galleryEntryFor");function cz(e){const t=e.filter(s=>s.status==="archived");return t.length===0?null:t.reduce((s,l)=>{const c=new Date(s.updatedAt??s.createdAt??0).getTime();return new Date(l.updatedAt??l.createdAt??0).getTime()>c?l:s})}r(cz,"latestArchivedConnection");var uz=[{label:"Agent",items:[{value:"overview",label:"Overview"},{value:"setup",label:"Setup"},{value:"instructions",label:"Instructions"},{value:"skills",label:"Skills"}]},{label:"Runtime",items:[{value:"runtime",label:"Harness / Runtime"},{value:"secrets",label:"Secrets"},{value:"tools",label:"Tools"},{value:"channels",label:"Channels"}]},{label:"Governance",items:[{value:"permissions",label:"Permissions / Trust"},{value:"api-keys",label:"API Keys"},{value:"revisions",label:"Revisions"}]}];function WG(e){return e==="setup"?"setup":e==="instructions"||e==="prompts"?"instructions":e==="skills"?"skills":e==="runtime"||e==="configure"||e==="configuration"?"runtime":e==="secrets"?"secrets":e==="tools"?"tools":e==="channels"?"channels":e==="permissions"||e==="trust"?"permissions":e==="api-keys"||e==="keys"?"api-keys":e==="revisions"||e==="history"?"revisions":"overview"}r(WG,"parseAgentDetailView");function dz(e,t="overview"){return`/agents/${e}/${t}`}r(dz,"agentDetailHref");function QG(e){return e==="runs"?"runs":e==="audit"||e==="activity"?"activity":e==="cost"||e==="costs"?"costs":e==="budget"||e==="budgets"?"budgets":null}r(QG,"agentLegacyAuditSection");function fz(e,t){return yT(t,{mode:t==="activity"?"agents":void 0,agentId:e})}r(fz,"agentScopedAuditHref");var pz={overview:uI,setup:cN,instructions:lR,skills:vg,runtime:TR,secrets:Cc,tools:If,channels:pS,permissions:Cc,"api-keys":I0,revisions:H0},mz=[{section:"activity",label:"Activity",icon:Mf},{section:"runs",label:"Runs",icon:h1},{section:"costs",label:"Costs",icon:ER},{section:"budgets",label:"Budgets",icon:rR}];function hz({agentRef:e,agentId:t,agentName:s,labels:l={secrets:"Secrets & variables"}}){const{selectedCompanyId:c}=bt(),u=!t||!s,{data:p}=me({queryKey:[...$.agents.detail(e),c??null,"contextual-sidebar"],queryFn:r(()=>Ha.get(e,c??void 0),"queryFn"),enabled:u&&!!(e&&c)}),f=t??p?.id,h=s??p?.name??"Agent";return(0,a.jsx)(Xc,{surface:"agent",title:h,fallbackTo:"/agents/all",showHeader:!1,className:"border-r border-line bg-bg",children:(0,a.jsxs)("nav",{"aria-label":`${h} navigation`,"data-slot":"contextual-sidebar-nav",className:Mn.nav,children:[uz.map(g=>(0,a.jsxs)("div",{"data-slot":"contextual-sidebar-section",className:Mn.section,children:[(0,a.jsx)("p",{"data-slot":"contextual-sidebar-section-label",className:Mn.sectionLabel,children:g.label}),(0,a.jsx)("div",{"data-slot":"contextual-sidebar-group",className:Mn.group,children:g.items.map(v=>{const y=dz(e,v.value);return(0,a.jsx)(Ge,{to:y,label:l?.[v.value]??v.label,icon:pz[v.value]},v.value)})})]},g.label)),(0,a.jsxs)("div",{"data-slot":"contextual-sidebar-section",className:Mn.section,children:[(0,a.jsx)("p",{"data-slot":"contextual-sidebar-section-label",className:Mn.sectionLabel,children:"Audit"}),(0,a.jsx)("div",{"data-slot":"contextual-sidebar-group",className:Mn.group,children:f?mz.map(g=>(0,a.jsx)(Ge,{to:fz(f,g.section),label:g.label,icon:g.icon},g.section)):(0,a.jsx)("p",{className:"px-2 py-1.5 text-xs text-ink-3",children:"Loading audit links…"})})]})]})})}r(hz,"AgentContextualSidebar");var gz=["overview","triggers","variables","delivery","secrets","history","runs","activity"],xz=[{view:"overview",label:"Overview",icon:T0},{view:"triggers",label:"Triggers",icon:$I},{view:"variables",label:"Variables",icon:PI},{view:"delivery",label:"Delivery",icon:C3},{view:"secrets",label:"Secrets",icon:I0}];function bz(e){return gz.includes(e)}r(bz,"isRoutineDetailView");function jc(e,t="overview"){return`/routines/${e}/${t}`}r(jc,"routineDetailHref");function GG(e){const t=e.legacyTab??e.section;return bz(t)?jc(e.routineId,t):jc(e.routineId,"overview")}r(GG,"resolveRoutineDetailDestination");function vz({routineId:e,title:t}={}){const s=Ps(),l=e??s.routineId??"",{data:c}=me({queryKey:$.routines.detail(l),queryFn:r(()=>jT.get(l),"queryFn"),enabled:!!(l&&!t)}),u=t??c?.title??"Routine";return(0,a.jsx)(Xc,{surface:"routine",title:u,icon:VS,fallbackTo:"/routines",showHeader:!1,className:"border-r border-line bg-bg",children:(0,a.jsxs)("nav",{className:"min-h-0 flex-1 overflow-y-auto px-3 py-2","aria-label":"Routine navigation",children:[(0,a.jsx)("div",{className:"flex flex-col gap-0.5",children:xz.map(p=>(0,a.jsx)(Ge,{to:jc(l,p.view),label:p.label,icon:p.icon,end:!0},p.view))}),(0,a.jsx)("p",{className:"px-4 pb-1 pt-5 text-(length:--text-nano) font-mono font-medium uppercase tracking-widest text-ink-3/60",children:"Operate"}),(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)(Ge,{to:jc(l,"runs"),label:"Runs",icon:R0}),(0,a.jsx)(Ge,{to:jc(l,"activity"),label:"Activity",icon:Mf})]})]})})}r(vz,"RoutineContextualSidebar");var hd={sources:"/skills/sources",installed:"/skills",discover:"/skills?tab=discover",authored:"/skills/studio"};function yz(e){return["discover","all","catalog","bundled"].includes(e??"")?"discover":"installed"}r(yz,"resolveSkillsDiscoveryView");function YG(e,t){const s=new URLSearchParams(e);return t==="installed"?s.delete("tab"):s.set("tab","discover"),s.delete("view"),s.delete("category"),t!=="installed"&&s.delete("folder"),s}r(YG,"withSkillsDiscoveryView");function jz(e,t=""){const s=e.split("/").filter(Boolean),l=s.findIndex(p=>p.toLowerCase()==="skills"),c=l>=0?s.slice(l+1):[];if(c[0]?.toLowerCase()==="sources")return"sources";if(c[0]?.toLowerCase()==="studio")return"authored";const u=typeof t=="string"?new URLSearchParams(t):t;return u.has("catalog")||u.get("view")==="catalog"?"discover":yz(u.get("tab"))}r(jz,"resolveSkillsNavigationView");function wz(){const e=hn(),t=jz(e.pathname,e.search);return(0,a.jsx)(Xc,{surface:"skills",title:"Skills",icon:vg,fallbackTo:"/dashboard",showHeader:!1,className:"border-r border-line bg-bg",children:(0,a.jsxs)("nav",{"aria-label":"Skills","data-slot":"contextual-sidebar-nav",className:Mn.nav,children:[(0,a.jsxs)("div",{"data-slot":"contextual-sidebar-group",className:Mn.group,children:[(0,a.jsx)(Ge,{to:hd.installed,label:"Installed",icon:vg,active:t==="installed",end:!0}),(0,a.jsx)(Ge,{to:hd.discover,label:"Discover",icon:mS,active:t==="discover",end:!0}),(0,a.jsx)(Ge,{to:hd.sources,label:"Sources",icon:wT,active:t==="sources"})]}),(0,a.jsxs)("div",{"data-slot":"contextual-sidebar-section",className:Mn.section,children:[(0,a.jsx)("div",{"data-slot":"contextual-sidebar-section-label",className:Mn.sectionLabel,children:"Author"}),(0,a.jsx)("p",{"data-slot":"contextual-sidebar-section-description",className:Mn.sectionDescription,children:"Skills you create, edit, and test."}),(0,a.jsx)("div",{"data-slot":"contextual-sidebar-group",className:Mn.group,children:(0,a.jsx)(Ge,{to:hd.authored,label:"My Skills",icon:_R,active:t==="authored"})})]})]})})}r(wz,"SkillsContextualSidebar");var JC="wardmote:panel-visible",eA=(0,x.createContext)(null);function tA(){return typeof window.matchMedia=="function"&&window.matchMedia("(min-width: 768px) and (max-width: 1023px) and (min-height: 431px)").matches}r(tA,"fullPagePanel");function kz(){if(tA())return!1;try{const e=localStorage.getItem(JC);return e===null?!0:e==="true"}catch{return!0}}r(kz,"readPreference");function aw(e){if(!tA())try{localStorage.setItem(JC,String(e))}catch{}}r(aw,"writePreference");function Sz({children:e}){const[t,s]=(0,x.useState)(null),[l,c]=(0,x.useState)("padded"),[u,p]=(0,x.useState)(kz),[f,h]=(0,x.useState)(!1),g=(0,x.useCallback)(()=>{h(!0)},[]),v=(0,x.useCallback)(()=>{h(!1)},[]),y=(0,x.useCallback)((N,I)=>{s(N),c(I?.contentMode??"padded")},[]),j=(0,x.useCallback)(()=>{s(null),c("padded")},[]),k=(0,x.useCallback)(N=>{p(N),aw(N)},[]),S=(0,x.useCallback)(()=>{p(N=>{const I=!N;return aw(I),I})},[]);return(0,a.jsx)(eA.Provider,{value:{panelContent:t,panelContentMode:l,panelVisible:u,openPanel:y,closePanel:j,setPanelVisible:k,togglePanelVisible:S,panelMaximizeRequested:f,requestPanelMaximize:g,clearPanelMaximizeRequest:v},children:e})}r(Sz,"PanelProvider");function cx(){const e=(0,x.useContext)(eA);if(!e)throw new Error("usePanel must be used within PanelProvider");return e}r(cx,"usePanel");function Nz({...e}){return(0,a.jsx)("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}r(Nz,"Breadcrumb");function Cz({className:e,...t}){return(0,a.jsx)("ol",{"data-slot":"breadcrumb-list",className:Y("text-ink-3 flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...t})}r(Cz,"BreadcrumbList");function Az({className:e,...t}){return(0,a.jsx)("li",{"data-slot":"breadcrumb-item",className:Y("inline-flex items-center gap-1.5",e),...t})}r(Az,"BreadcrumbItem");function _z({asChild:e,className:t,...s}){const l=e?yI:"a";return(0,a.jsx)(l,{"data-slot":"breadcrumb-link",className:Y("hover:text-ink transition-colors",t),...s})}r(_z,"BreadcrumbLink");function sw({className:e,...t}){return(0,a.jsx)("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Y("text-ink font-normal",e),...t})}r(sw,"BreadcrumbPage");function Ez({children:e,className:t,...s}){return(0,a.jsx)("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Y("[&>svg]:size-3.5",t),...s,children:e??(0,a.jsx)(ur,{})})}r(Ez,"BreadcrumbSeparator");function Hl({identifier:e}){return e?(0,a.jsx)("span",{"data-slot":"task-title-identifier",className:"min-w-0 max-w-1/2 shrink truncate font-mono text-(length:--text-micro) text-ink-3",children:e}):null}r(Hl,"CrumbIdentifier");function Iz({context:e,pageToolbar:t}){const{slots:s}=qc({slotTypes:["globalToolbarButton"],companyId:e.companyId}),{launchers:l}=cC({placementZones:["globalToolbarButton"],companyId:e.companyId,enabled:!!e.companyId});return(0,a.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-1 pl-2 empty:hidden",children:[t,s.length>0?(0,a.jsx)(pg,{slotTypes:["globalToolbarButton"],context:e,className:"flex items-center gap-1"}):null,l.length>0?(0,a.jsx)(uC,{placementZones:["globalToolbarButton"],context:e,className:"flex items-center gap-1"}):null]})}r(Iz,"GlobalToolbar");function iw({taskDetailLayout:e=!1}){const{breadcrumbs:t,breadcrumbToolbar:s,breadcrumbPanelControl:l,mobileToolbar:c,setMobileTaskActionsSlot:u}=JS(),{toggleSidebar:p,isMobile:f}=Jn(),{openNewIssue:h}=Us(),{panelVisible:g,togglePanelVisible:v}=cx(),{selectedCompanyId:y,selectedCompany:j}=bt(),k=l?.open??g,S=l?.onToggle??v,N=(0,x.useMemo)(()=>({companyId:y??null,companyPrefix:j?.issuePrefix??null}),[y,j?.issuePrefix]),I=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Iz,{context:N,pageToolbar:f?null:s}),f?(0,a.jsx)(oe,{variant:"ghost",size:"icon-sm",className:"ms-1 shrink-0",onClick:r(()=>h(),"onClick"),"aria-label":"New Task",children:(0,a.jsx)(V0,{className:"h-5 w-5"})}):null]});if(f&&c)return(0,a.jsx)("div",{className:"h-(--sz-60px) shrink-0 flex items-center border-b border-line px-2",children:c});if(t.length===0)return(0,a.jsx)("div",{className:"h-(--sz-60px) shrink-0 flex items-center justify-end border-b border-line px-4 md:px-6",children:I});const C=f&&(0,a.jsx)(oe,{variant:"ghost",size:"icon-sm",className:"mr-2 shrink-0",onClick:p,"aria-label":"Open sidebar",children:(0,a.jsx)(K1,{className:"h-5 w-5"})}),M=t[t.length-1];if(f&&t[0]?.label==="Tasks"&&M.identifier)return(0,a.jsxs)("div",{className:"h-(--sz-60px) shrink-0 flex items-center border-b border-line px-4",children:[C,(0,a.jsxs)("h1",{className:"flex min-w-0 flex-1 items-baseline gap-1.5 text-sm",children:[M.leading?(0,a.jsx)("span",{className:"flex shrink-0 items-center self-center",children:M.leading}):null,(0,a.jsx)("span",{className:"min-w-0 truncate",title:M.label,children:M.label}),(0,a.jsx)(Hl,{identifier:M.identifier})]}),(0,a.jsx)("div",{ref:u,"data-slot":"mobile-task-actions",className:"ms-1 flex shrink-0 items-center empty:hidden"}),I]});const R=(0,a.jsx)("div",{className:"min-w-0 overflow-hidden flex-1",children:(0,a.jsx)(Nz,{className:"min-w-0 overflow-hidden",children:(0,a.jsx)(Cz,{className:"flex-nowrap",children:t.map((_,D)=>{const U=D===t.length-1;return(0,a.jsxs)(x.Fragment,{children:[D>0&&(0,a.jsx)(Ez,{}),(0,a.jsxs)(Az,{className:U?"min-w-0":"shrink-0",children:[U||!_.href?_.leading||_.identifier?(0,a.jsxs)(sw,{className:Y("flex min-w-0 gap-1.5",_.trailing?"items-center":"items-baseline"),children:[_.leading&&(0,a.jsx)("span",{className:"flex shrink-0 items-center self-center",children:_.leading}),e?null:(0,a.jsx)(Hl,{identifier:_.identifier}),(0,a.jsx)("span",{className:"min-w-0 truncate",children:_.label}),e&&U?(0,a.jsx)(Hl,{identifier:_.identifier}):null]}):(0,a.jsx)(sw,{className:"truncate",children:_.label}):(0,a.jsx)(_z,{asChild:!0,children:_.leading||_.identifier?(0,a.jsxs)(mn,{to:_.href,onClick:_.onClick,className:Y("flex min-w-0 items-baseline gap-1.5",D===0&&"font-semibold uppercase tracking-wider text-ink-3 hover:text-ink"),children:[_.leading&&(0,a.jsx)("span",{className:"flex shrink-0 items-center self-center",children:_.leading}),e?null:(0,a.jsx)(Hl,{identifier:_.identifier}),(0,a.jsx)("span",{className:"min-w-0 truncate",children:_.label}),e&&U?(0,a.jsx)(Hl,{identifier:_.identifier}):null]}):(0,a.jsx)(mn,{to:_.href,onClick:_.onClick,className:Y("min-w-0 truncate",D===0&&"font-semibold uppercase tracking-wider text-ink-3 hover:text-ink"),children:_.label})}),_.trailing&&(0,a.jsx)("span",{className:"flex shrink-0 items-center",children:_.trailing})]})]},D)})})})});return t.length===1&&!e?(0,a.jsxs)("div",{className:"h-(--sz-60px) shrink-0 flex items-center border-b border-line px-4 md:px-6",children:[C,(0,a.jsx)("div",{className:"min-w-0 overflow-hidden flex-1",children:t[0].leading||t[0].identifier?(0,a.jsxs)("h1",{className:"flex items-baseline gap-1.5 text-sm font-semibold uppercase tracking-wider",children:[t[0].leading&&(0,a.jsx)("span",{className:"flex shrink-0 items-center self-center",children:t[0].leading}),(0,a.jsx)(Hl,{identifier:t[0].identifier}),(0,a.jsx)("span",{className:"truncate",children:t[0].label})]}):(0,a.jsx)("h1",{className:"text-sm font-semibold uppercase tracking-wider truncate",children:t[0].label})}),I]}):(0,a.jsxs)("div",{className:Y("relative h-(--sz-60px) shrink-0 flex items-center border-b border-line","px-4 md:px-6"),children:[C,R,I,e?(0,a.jsx)(oe,{variant:"ghost",size:"icon-sm",className:"ml-5 size-9 shrink-0",onClick:S,"aria-label":k?"Hide properties":"Show properties",title:k?"Hide properties":"Show properties",children:k?(0,a.jsx)(Y1,{className:"h-4 w-4"}):(0,a.jsx)(Z1,{className:"h-4 w-4"})}):null]})}r(iw,"BreadcrumbBar");var Tz=600;function Rz(e){const t=e.trim();if(!t)return null;const s=Number.parseFloat(t);return Number.isFinite(s)?t.endsWith("s")&&!t.endsWith("ms")?s*1e3:s:null}r(Rz,"parseCssTimeMs");function Mz(){const e=(0,x.useRef)(null),t=(0,x.useRef)(null),s=(0,x.useCallback)(l=>{const c=l.currentTarget;t.current=c,c.dataset.scrollActive="true",e.current!==null&&window.clearTimeout(e.current);const u=Rz(getComputedStyle(document.documentElement).getPropertyValue("--motion-scrollbar-idle-delay"));e.current=window.setTimeout(()=>{delete c.dataset.scrollActive,e.current=null},u??Tz)},[]);return(0,x.useEffect)(()=>()=>{e.current!==null&&window.clearTimeout(e.current),t.current&&delete t.current.dataset.scrollActive},[]),s}r(Mz,"useScrollbarWhileScrolling");function Dz({children:e,header:t,footer:s,trailingControls:l,presentation:c="docked",contentMode:u="padded",open:p=!0,maximized:f=!1,resizing:h=!1,label:g="Side panel",headerSize:v="default",className:y,bodyClassName:j,style:k}){const S=Mz();return(0,a.jsxs)("section",{"aria-label":g,"aria-hidden":!p,"data-presentation":c,"data-open":p?"true":"false","data-maximized":f?"true":"false","data-resizing":h?"true":"false",className:Y("flex min-h-0 min-w-0 flex-col overflow-hidden bg-(--side-panel-bg) text-(--side-panel-fg)",c==="docked"&&"h-full border-l border-line",c==="sheet"&&"h-full w-full",c==="embedded"&&"h-full rounded-xl border border-line",!p&&"pointer-events-none opacity-0",y),style:k,children:[t||l?(0,a.jsxs)("header",{className:Y("flex h-(--side-panel-header-height) min-w-0 shrink-0 items-center gap-1 px-2"),children:[(0,a.jsx)("div",{className:"flex min-w-0 flex-1 self-stretch",children:t}),l?(0,a.jsx)("div",{className:"flex shrink-0 items-center gap-1",children:l}):null]}):null,(0,a.jsx)("div",{"data-side-panel-content-viewport":"true",onScroll:S,className:Y("min-h-0 flex-1",u==="full-bleed"?"overflow-hidden":"overflow-auto",u!=="full-bleed"&&"scrollbar-while-scrolling",u==="padded"&&"p-4",j),children:u==="prose"?(0,a.jsx)("div",{"data-side-panel-prose-content":"true",className:"mx-auto w-full max-w-4xl px-6 py-4",children:e}):e}),s?(0,a.jsx)("footer",{className:Y("shrink-0",v!=="task-detail"&&"border-t border-line"),children:s}):null]})}r(Dz,"SidePanelFrame");function Oz({open:e,onToggle:t,shortcut:s,className:l}){const c="Toggle side panel";return(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)(oe,{active:e,type:"button",variant:"ghost",size:"icon-sm","aria-label":c,"aria-pressed":e,onClick:t,className:Y("h-(--side-panel-tab-height) w-(--side-panel-tab-height)",l),children:e?(0,a.jsx)(Y1,{"aria-hidden":!0}):(0,a.jsx)(Z1,{"aria-hidden":!0})})}),(0,a.jsx)(Ts,{side:"bottom",children:s?`${c} (${s})`:c})]})}r(Oz,"SidePanelToggleButton");function Lz({maximized:e,onMaximizedChange:t,onToggle:s,closeControl:l="toggle"}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm",className:"h-(--side-panel-tab-height) w-(--side-panel-tab-height)",onClick:r(()=>t(!e),"onClick"),"aria-label":e?"Restore side panel":"Maximize side panel",title:e?"Restore side panel":"Maximize side panel",children:e?(0,a.jsx)(W1,{"aria-hidden":!0}):(0,a.jsx)(FS,{"aria-hidden":!0})}),l==="close"?(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm",className:"h-(--side-panel-tab-height) w-(--side-panel-tab-height)",onClick:s,"aria-label":"Close side panel",title:"Close side panel",children:(0,a.jsx)(ia,{"aria-hidden":!0})}):(0,a.jsx)(Oz,{open:!0,onToggle:s})]})}r(Lz,"SidePanelWindowControls");function zz({sections:e,onSelect:t,placeholder:s,emptyMessage:l,panel:c}){return(0,a.jsxs)(e1,{className:Y(c&&"border border-line shadow-sm"),children:[(0,a.jsx)(z0,{placeholder:s,"aria-label":s}),(0,a.jsxs)($0,{className:Y(c&&"max-h-none flex-1"),children:[(0,a.jsx)(P0,{children:l}),e.map((u,p)=>(0,a.jsxs)("div",{children:[p>0?(0,a.jsx)(ir,{}):null,(0,a.jsxs)(Xs,{heading:u.label,children:[u.loading?(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-3 text-sm text-ink-3",role:"status",children:[(0,a.jsx)(Ma,{className:"size-4 animate-spin","aria-hidden":!0}),"Loading…"]}):null,u.error?(0,a.jsxs)("div",{className:"flex items-start gap-2 px-2 py-3 text-sm text-ink-3",role:"status",children:[(0,a.jsx)(zS,{className:"mt-0.5 size-4 shrink-0","aria-hidden":!0}),(0,a.jsx)("span",{children:u.error})]}):null,u.items.map(f=>(0,a.jsxs)(wn,{value:`${f.label} ${f.description??""} ${f.searchText??""}`,disabled:f.disabled,title:f.disabledReason,onSelect:r(()=>t(f),"onSelect"),className:"min-h-10",children:[f.icon?(0,a.jsx)("span",{className:"flex size-4 shrink-0 items-center justify-center",children:f.icon}):null,(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block truncate",children:f.label}),f.description||f.disabledReason?(0,a.jsx)("span",{className:"block truncate text-xs text-ink-3",children:f.disabledReason??f.description}):null]}),f.alreadyOpen?(0,a.jsx)(Ms,{className:"size-4 text-ink-3","aria-label":"Already open"}):null,f.shortcut?(0,a.jsx)(ST,{children:f.shortcut}):null]},f.id))]})]},u.id))]})]})}r(zz,"LauncherContent");function XG({sections:e,onSelect:t,presentation:s="panel",trigger:l,open:c,onOpenChange:u,title:p="Open a side panel tab",description:f="Choose a view or resource to open.",placeholder:h="Search tabs and resources…",emptyMessage:g="No matching tabs or resources.",className:v}){const[y,j]=(0,x.useState)(!1),k=c??y,S=u??j,N=(0,a.jsx)(zz,{sections:e,onSelect:r(I=>{t(I),s==="popover"&&S(!1)},"onSelect"),placeholder:h,emptyMessage:g,panel:s==="panel"});return s==="popover"?l?(0,a.jsxs)(ws,{open:k,onOpenChange:S,children:[(0,a.jsx)(ys,{asChild:!0,children:l}),(0,a.jsxs)(js,{align:"start",className:Y("w-(--side-panel-launcher-width) overflow-hidden p-0",v),children:[(0,a.jsxs)("div",{className:"sr-only",children:[(0,a.jsx)("h2",{children:p}),(0,a.jsx)("p",{children:f})]}),N]})]}):null:(0,a.jsxs)("div",{className:Y("mx-auto flex h-full w-full max-w-xl flex-col justify-center gap-4 p-4",v),children:[(0,a.jsxs)("div",{className:"space-y-1 text-center",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold",children:p}),(0,a.jsx)("p",{className:"text-sm text-ink-3",children:f})]}),N]})}r(XG,"SidePanelLauncher");function Pz({id:e,label:t,ariaLabel:s,icon:l,status:c,active:u,closable:p=!0,disabled:f=!1,tabRef:h,dragHandleProps:g,onSelect:v,onClose:y,onAuxClick:j,onKeyDown:k,appearance:S="default",className:N}){const I=`Close ${t}`,C=(0,x.useRef)(null),M=(0,x.useRef)(null),[R,_]=(0,x.useState)(!1),D=`${S}:${t}:${l?"icon":"no-icon"}:${c?"status":"no-status"}:${p?"closable":"fixed"}`,[U,K]=(0,x.useState)(null),z=U?.key===D;return(0,x.useLayoutEffect)(()=>{if(S==="streamlined-task"||z)return;const E=C.current?.getBoundingClientRect().width??0;E<=0||K({key:D,width:Math.ceil(E)})},[z,D]),(0,x.useEffect)(()=>{const E=M.current;if(!E)return;const B=r(()=>{_(E.scrollWidth>E.clientWidth)},"updateTruncation");if(B(),typeof ResizeObserver>"u")return;const O=new ResizeObserver(B);return O.observe(E),()=>O.disconnect()},[t]),(0,a.jsxs)("div",{ref:C,"data-side-panel-tab-wrapper":e,"data-active":u?"true":"false","data-appearance":S,style:S==="default"&&z?{width:U.width}:void 0,className:Y(S==="streamlined-task"?"group/side-panel-tab relative mx-1.5 flex h-7 min-w-0 flex-1 basis-0 items-center rounded-md border border-transparent":"group/side-panel-tab relative flex h-(--side-panel-tab-height) min-w-0 shrink-0 items-center rounded-(--side-panel-tab-radius) border border-transparent","side-panel-tab-motion",u?S==="streamlined-task"?"text-ink hover:bg-bg-3/50":"bg-(--side-panel-tab-active-bg) text-ink":S==="streamlined-task"?"text-ink-3 hover:bg-bg-3/50 hover:text-ink":"text-ink-3 hover:bg-(--side-panel-tab-hover-bg) hover:text-ink",f&&"opacity-50",N),children:[(0,a.jsxs)(Rs,{open:R?void 0:!1,children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsxs)("button",{...g,ref:h,type:"button",role:"tab","data-side-panel-tab-target":e,"data-side-panel-tab-tooltip":R?"enabled":"disabled",id:`side-panel-tab-${e}`,"aria-controls":`side-panel-content-${e}`,"aria-selected":u,"aria-label":s??t,tabIndex:u?0:-1,disabled:f,onClick:v,onAuxClick:j,onKeyDown:k,className:Y(S==="streamlined-task"?"flex h-full w-full min-w-0 items-center justify-start rounded-md px-3 text-sm font-medium outline-none":"flex h-full w-full min-w-0 items-center gap-1.5 rounded-(--side-panel-tab-radius) py-1.5 pl-2 text-xs font-medium outline-none",S==="default"&&(p&&(!z||u)?"pr-7":"pr-2.5"),"focus-visible:ring-2 focus-visible:ring-focus/60",g?.className),children:[l&&S==="default"?(0,a.jsx)("span",{className:"flex size-3.5 shrink-0 items-center justify-center [&_svg]:size-3.5",children:l}):null,(0,a.jsx)("span",{ref:M,"data-truncated":R?"true":void 0,className:Y(S==="streamlined-task"?"side-panel-tab-label-close-fade task-detail-pane-tab-label min-w-0 flex-1 overflow-hidden whitespace-nowrap text-center":"overflow-hidden whitespace-nowrap",S==="default"&&(p&&z&&!u?"max-w-(--side-panel-tab-label-expanded-max-width)":"max-w-(--side-panel-tab-label-max-width)"),S==="default"&&R&&"side-panel-tab-label-fade"),children:t}),c?(0,a.jsx)("span",{className:Y("flex shrink-0 items-center",S==="streamlined-task"&&"transition-opacity group-hover/side-panel-tab:opacity-0 group-focus-within/side-panel-tab:opacity-0"),children:c}):null]})}),R?(0,a.jsx)(Ts,{side:"bottom",children:t}):null]}),p&&y&&(S==="streamlined-task"||u)?(0,a.jsx)("button",{type:"button","aria-label":I,title:I,onPointerDown:r(E=>{S==="streamlined-task"&&(E.preventDefault(),E.stopPropagation())},"onPointerDown"),onClick:r(E=>{E.stopPropagation(),y()},"onClick"),className:Y("side-panel-tab-close-motion absolute flex items-center justify-center text-ink-3 outline-none hover:text-ink",S==="streamlined-task"?"right-0 top-1/2 z-20 size-5 pointer-coarse:size-6 -translate-y-1/2 rounded-sm opacity-0 hover:bg-bg-3 focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-focus/60 group-hover/side-panel-tab:opacity-100":"right-1 size-6 rounded-lg hover:bg-bg/70 focus-visible:ring-2 focus-visible:ring-focus/60"),children:(0,a.jsx)(ia,{className:S==="streamlined-task"?"size-3.5":"size-3","aria-hidden":!0})}):null]})}r(Pz,"SidePanelTab");function $z({tab:e,active:t,appearance:s,fillAvailableWidth:l,showLeadingSeparator:c,onSelect:u,onClose:p,onAuxClick:f,onKeyDown:h}){const g=lx({id:e.id,disabled:e.disabled});return(0,a.jsxs)("div",{ref:g.setNodeRef,style:{transform:ni.Transform.toString(g.transform),transition:g.transition},className:Y(s==="streamlined-task"?Y("relative flex flex-1 items-center",l?"min-w-0 max-w-none basis-auto":"min-w-(--side-panel-streamlined-tab-min-width) max-w-(--side-panel-streamlined-tab-max-width) basis-0"):"relative",g.isDragging&&"z-20 opacity-80"),children:[c?(0,a.jsx)("span",{"aria-hidden":!0,"data-side-panel-tab-separator":"true",className:Y("pointer-events-none absolute w-px bg-line",s==="streamlined-task"?"left-0 top-1/2 h-4 -translate-y-1/2":"inset-y-2 -left-0.5 bg-line/60")}):null,(0,a.jsx)(Pz,{id:e.id,label:e.label,ariaLabel:e.ariaLabel,icon:e.icon,status:e.status,active:t,appearance:s,closable:e.closable,disabled:e.disabled,tabRef:g.setActivatorNodeRef,dragHandleProps:{...g.attributes,...g.listeners},onSelect:u,onClose:p,onAuxClick:f,onKeyDown:h})]})}r($z,"SortableSidePanelTab");function ZG({tabs:e,activeTabId:t,onActiveTabChange:s,onCloseTab:l,onReorderTabs:c,onAddTab:u,addControl:p,addLabel:f="Open a new tab",appearance:h="default",className:g}){const[v,y]=(0,x.useState)(""),[j,k]=(0,x.useState)(!1),S=(0,x.useRef)(null),N=(0,x.useRef)(null),I=(0,x.useRef)(null),C=J0(Mc(Yf,{activationConstraint:{distance:4}}),Mc(tx,{coordinateGetter:k4})),M=(0,x.useMemo)(()=>e.map(z=>z.id),[e]);function R(z,E){const B=E==="wrapper"?"data-side-panel-tab-wrapper":"data-side-panel-tab-target";return Array.from(S.current?.querySelectorAll(`[${B}]`)??[]).find(O=>O.getAttribute(B)===z)??null}r(R,"findTabElement"),(0,x.useEffect)(()=>{if(!t)return;const z=R(t,"wrapper"),E=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;z?.scrollIntoView({behavior:E?"auto":"smooth",block:"nearest",inline:"nearest"})},[t]),(0,x.useEffect)(()=>{const z=S.current;if(!z||h!=="streamlined-task"){k(!1);return}const E=r(()=>{const O=z.scrollWidth-z.clientWidth-z.scrollLeft;k(O>1)},"updateEndFade");E(),z.addEventListener("scroll",E,{passive:!0});const B=typeof ResizeObserver>"u"?null:new ResizeObserver(E);return B?.observe(z),z.firstElementChild&&B?.observe(z.firstElementChild),()=>{z.removeEventListener("scroll",E),B?.disconnect()}},[h,M]);function _(z){window.requestAnimationFrame(()=>{if(!z){N.current?.focus(),I.current?.querySelector("button, [href], input, [tabindex]:not([tabindex='-1'])")?.focus();return}R(z,"target")?.focus()})}r(_,"focusTab");function D(z){const E=M.indexOf(z),B=M[E+1]??M[E-1]??null;l(z),y(B?"Tab closed.":"Last tab closed. Choose something to open."),_(B)}r(D,"closeTab");function U(z,E){const B=M.indexOf(E);if(B<0)return;if(z.altKey&&z.shiftKey&&(z.key==="ArrowLeft"||z.key==="ArrowRight")){if(!c)return;z.preventDefault();const V=z.key==="ArrowLeft"?B-1:B+1;if(V<0||V>=M.length)return;const ue=[...M],[ce]=ue.splice(B,1);ue.splice(V,0,ce),c(ue),y(`Moved ${e[B]?.label??"tab"} to position ${V+1} of ${e.length}.`),_(E);return}const O=z.key==="ArrowLeft"?Math.max(0,B-1):z.key==="ArrowRight"?Math.min(M.length-1,B+1):z.key==="Home"?0:z.key==="End"?M.length-1:-1;if(O<0||O===B)return;z.preventDefault();const Q=M[O];s(Q),_(Q)}r(U,"handleKeyDown");function K(z){if(!c||!z.over||z.active.id===z.over.id)return;const E=M.indexOf(String(z.active.id)),B=M.indexOf(String(z.over.id));if(E<0||B<0)return;const O=[...M],[Q]=O.splice(E,1);O.splice(B,0,Q),c(O),y(`Moved ${e[E]?.label??"tab"} to position ${B+1} of ${e.length}.`)}return r(K,"handleDragEnd"),(0,a.jsxs)("div",{className:Y("flex min-w-0 flex-1 items-center",h==="streamlined-task"?"gap-0":"gap-1",g),children:[(0,a.jsx)("div",{ref:S,role:"tablist","aria-orientation":"horizontal","data-scroll-end-fade":h==="streamlined-task"&&j?"true":void 0,className:Y("side-panel-tabs-scroll min-w-0 flex-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",h==="streamlined-task"?"overflow-x-auto overscroll-x-contain":"overflow-x-auto"),children:(0,a.jsx)(sx,{sensors:C,collisionDetection:xC,onDragEnd:K,children:(0,a.jsx)(rx,{items:M,strategy:f4,children:(0,a.jsx)("div",{className:Y("flex items-center",h==="streamlined-task"?e.length===1?"w-full gap-0":"w-max min-w-full gap-0":"min-w-max gap-1 py-1"),children:e.map((z,E)=>(0,a.jsx)($z,{tab:z,active:z.id===t,appearance:h,fillAvailableWidth:h==="streamlined-task"&&e.length===1,showLeadingSeparator:h==="streamlined-task"?E>0:E>0&&z.id!==t&&e[E-1]?.id!==t,onSelect:r(()=>s(z.id),"onSelect"),onClose:r(()=>D(z.id),"onClose"),onAuxClick:r(B=>{B.button!==1||z.closable===!1||(B.preventDefault(),D(z.id))},"onAuxClick"),onKeyDown:r(B=>U(B,z.id),"onKeyDown")},z.id))})})})}),p?(0,a.jsx)("div",{ref:I,className:"shrink-0",children:p}):u?(0,a.jsx)(oe,{ref:N,type:"button",variant:"ghost",size:"icon-sm",onClick:u,"aria-label":f,title:f,className:Y("shrink-0",h==="streamlined-task"?"h-(--side-panel-tab-height) w-(--side-panel-tab-height) rounded-md":"h-(--side-panel-tab-height) w-(--side-panel-tab-height) rounded-(--side-panel-control-radius)"),children:(0,a.jsx)(as,{"aria-hidden":!0})}):null,(0,a.jsx)("div",{className:"sr-only","aria-live":"polite","aria-atomic":"true",children:v})]})}r(ZG,"SidePanelTabs");function JG({tabs:e,activeTabId:t,onActiveTabChange:s,onCloseTab:l,addControl:c}){const[u,p]=(0,x.useState)(!1),f=(0,x.useRef)(null),h=(0,x.useRef)(null),g=e.find(y=>y.id===t);function v(y,j){const k=e.filter(I=>!I.disabled),S=k.findIndex(I=>I.id===j);let N;switch(y.key){case"ArrowDown":N=(S+1)%k.length;break;case"ArrowUp":N=(S-1+k.length)%k.length;break;case"Home":N=0;break;case"End":N=k.length-1;break;default:return}y.preventDefault(),f.current?.querySelectorAll("[data-mobile-tab-select]:not(:disabled)")[N]?.focus()}return r(v,"moveFocus"),(0,a.jsxs)("div",{ref:h,className:"flex min-w-0 flex-1 items-center gap-1",children:[(0,a.jsxs)(ws,{open:u,onOpenChange:p,children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsxs)(oe,{variant:"ghost",className:"h-(--sz-44px) min-w-0 flex-1 justify-start gap-2 px-2","aria-label":`Switch tabs, ${e.length} open`,disabled:e.length===0,children:[(0,a.jsx)("span",{id:g?`side-panel-tab-${g.id}`:void 0,className:"min-w-0 flex-1 truncate text-left",children:g?.label??"Choose a tab"}),(0,a.jsx)("span",{className:"shrink-0 rounded-md bg-bg-3 px-1.5 py-0.5 text-xs text-ink-3",children:e.length}),(0,a.jsx)(Qr,{"aria-hidden":!0,className:"shrink-0"})]})}),(0,a.jsxs)(js,{"aria-label":"Open tabs",align:"start",className:"w-(--side-panel-mobile-tabs-width) max-w-(--radix-popover-content-available-width) p-2",onOpenAutoFocus:r(y=>{y.preventDefault();const j=f.current?.querySelectorAll("[data-mobile-tab-select]:not(:disabled)");(Array.from(j??[]).find(k=>k.dataset.mobileTabSelect===t)??j?.[0])?.focus()},"onOpenAutoFocus"),onCloseAutoFocus:r(y=>{if(e.length!==0)return;const j=h.current?.querySelector('[aria-label="Open a new tab"]');j&&(y.preventDefault(),j.focus())},"onCloseAutoFocus"),children:[(0,a.jsx)("p",{className:"px-2 py-2 text-xs font-medium text-ink-3",children:"Open tabs"}),(0,a.jsx)("ul",{ref:f,"aria-label":"Open tabs",className:"max-h-(--side-panel-mobile-tabs-max-height) overflow-y-auto overscroll-contain",children:e.map(y=>(0,a.jsxs)("li",{className:Y("flex items-center rounded-md",y.id===t&&"bg-bg-3"),children:[(0,a.jsxs)("button",{type:"button","data-mobile-tab-select":y.id,disabled:y.disabled,"aria-current":y.id===t?"true":void 0,"aria-label":y.ariaLabel??y.label,onKeyDown:r(j=>v(j,y.id),"onKeyDown"),onClick:r(()=>{s(y.id),p(!1)},"onClick"),className:"flex min-h-(--sz-44px) min-w-0 flex-1 items-center gap-3 rounded-md px-2 py-3 text-left text-sm hover:bg-bg-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus disabled:opacity-50",children:[(0,a.jsx)("span",{"aria-hidden":!0,className:"shrink-0 text-ink-3 [&_svg]:size-4",children:y.icon}),(0,a.jsx)("span",{className:"min-w-0 flex-1 break-words",children:y.label}),y.id===t?(0,a.jsx)(Ms,{"aria-hidden":!0,className:"size-4 shrink-0"}):null]}),y.closable!==!1?(0,a.jsx)(oe,{variant:"ghost",size:"icon",className:"size-(--sz-44px) shrink-0","aria-label":`Close ${y.label}`,disabled:y.disabled,onClick:r(()=>{const j=Array.from(f.current?.querySelectorAll("[data-mobile-tab-select]:not(:disabled)")??[]),k=j.findIndex(S=>S.dataset.mobileTabSelect===y.id);(j[k+1]??j[k-1])?.focus(),l(y.id),e.length===1&&p(!1)},"onClick"),children:(0,a.jsx)(ia,{"aria-hidden":!0})}):null]},y.id))})]})]}),c]})}r(JG,"SidePanelMobileTabs");function nA(e){const t=new Set,s=e.tabs.filter(l=>!l.id||!l.type||t.has(l.id)?!1:(t.add(l.id),!0));return{tabs:s,activeTabId:e.activeTabId&&t.has(e.activeTabId)?e.activeTabId:s[0]?.id??null}}r(nA,"normalizeSidePanelTabsState");function Uz(e,t){switch(t.type){case"open":{const s=e.tabs.find(l=>l.id===t.tab.id);return s?t.activate===!1||e.activeTabId===s.id?e:{...e,activeTabId:s.id}:{tabs:[...e.tabs,t.tab],activeTabId:t.activate===!1?e.activeTabId:t.tab.id}}case"select":return e.activeTabId===t.tabId?e:e.tabs.some(s=>s.id===t.tabId)?{...e,activeTabId:t.tabId}:e;case"close":{const s=e.tabs.findIndex(c=>c.id===t.tabId);if(s<0)return e;const l=e.tabs.filter(c=>c.id!==t.tabId);return e.activeTabId!==t.tabId?{...e,tabs:l}:{tabs:l,activeTabId:l[s]?.id??l[s-1]?.id??null}}case"close-others":{const s=e.tabs.find(l=>l.id===t.tabId);return s?{tabs:[s],activeTabId:s.id}:e}case"reorder":{if(t.orderedTabIds.length!==e.tabs.length)return e;const s=new Map(e.tabs.map(c=>[c.id,c])),l=t.orderedTabIds.map(c=>s.get(c));return l.some(c=>!c)||new Set(t.orderedTabIds).size!==e.tabs.length?e:{...e,tabs:l}}case"update":{let s=!1;const l=e.tabs.map(c=>c.id!==t.tabId?c:(s=!0,{...c,...t.patch,id:c.id}));return s?{...e,tabs:l}:e}case"reset":return nA(t.state)}}r(Uz,"sidePanelTabsReducer");function eY({initialState:e,onStateChange:t}){const[s,l]=(0,x.useReducer)(Uz,e,nA);(0,x.useEffect)(()=>{t?.(s)},[t,s]);const c=(0,x.useCallback)((y,j=!0)=>{l({type:"open",tab:y,activate:j})},[]),u=(0,x.useCallback)(y=>l({type:"select",tabId:y}),[]),p=(0,x.useCallback)(y=>l({type:"close",tabId:y}),[]),f=(0,x.useCallback)(y=>l({type:"close-others",tabId:y}),[]),h=(0,x.useCallback)(y=>l({type:"reorder",orderedTabIds:y}),[]),g=(0,x.useCallback)((y,j)=>l({type:"update",tabId:y,patch:j}),[]),v=(0,x.useCallback)(y=>l({type:"reset",state:y}),[]);return{...s,openTab:c,selectTab:u,closeTab:p,closeOtherTabs:f,reorderTabs:h,updateTab:g,resetTabs:v}}r(eY,"useSidePanelTabs");function Bz({taskDetailLayout:e=!1}){const{panelContent:t,panelContentMode:s,panelVisible:l,setPanelVisible:c,panelMaximizeRequested:u,clearPanelMaximizeRequest:p}=cx(),f=e;return t?(0,a.jsx)(eP,{panelContent:t,panelContentMode:s,panelVisible:l,setPanelVisible:c,taskDetailLayout:f,maximizeRequested:u,clearMaximizeRequest:p},f?"task-detail":"default"):null}r(Bz,"PropertiesPanel");var Kz="properties-pane-header-slot",qz="properties-pane-footer-slot",Fz="taskChatRedesign.propertiesPaneWidth",Hz="taskChatRedesign.taskDetailPropertiesPaneWidth",Vz=320,Wz=434,rw=260,Qz=656,Gz=840,Yz=400;function lw(e){const t=typeof window>"u"?Number.POSITIVE_INFINITY:Math.max(rw,window.innerWidth-Qz);return Math.min(Math.max(Math.round(e),rw),t)}r(lw,"clampPaneWidth");function Xz(e,t){if(typeof window>"u")return t;try{const s=window.localStorage.getItem(e),l=s===null?NaN:Number(s);return Number.isFinite(l)?l:t}catch{return t}}r(Xz,"readStoredPaneWidth");function Zz(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,String(t))}catch{}}r(Zz,"persistPaneWidth");function Jz(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}r(Jz,"clearStoredPaneWidth");function ow(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}r(ow,"prefersReducedMotion");function eP({panelContent:e,panelContentMode:t,panelVisible:s,setPanelVisible:l,taskDetailLayout:c,maximizeRequested:u,clearMaximizeRequest:p}){const f=c?Wz:Vz,h=c?Hz:Fz,[g,v]=(0,x.useState)(()=>lw(Xz(h,f))),[y,j]=(0,x.useState)(!1),[k,S]=(0,x.useState)(!1),[N,I]=(0,x.useState)(null),C=(0,x.useRef)(null),M=(0,x.useRef)(g);M.current=g;const R=(0,x.useRef)(null),_=(0,x.useRef)(""),D=(0,x.useRef)(null),U=(0,x.useCallback)(()=>{D.current!==null&&(window.clearTimeout(D.current),D.current=null)},[]),K=(0,x.useCallback)(()=>{U(),I(null)},[U]);(0,x.useEffect)(()=>{s||(S(!1),K())},[s,K]),(0,x.useEffect)(()=>()=>{D.current!==null&&window.clearTimeout(D.current),R.current!==null&&(document.body.style.userSelect=_.current)},[]);const z=(0,x.useCallback)(le=>{R.current!==null&&(R.current=null,j(!1),document.body.style.userSelect=_.current,le&&Zz(h,M.current))},[h]),E=(0,x.useCallback)(le=>{le.pointerType==="mouse"&&le.button!==0||(le.preventDefault(),le.currentTarget.setPointerCapture(le.pointerId),R.current={pointerId:le.pointerId,startX:le.clientX,startWidth:M.current},_.current=document.body.style.userSelect,document.body.style.userSelect="none",j(!0))},[]),B=(0,x.useCallback)(le=>{const Ae=R.current;Ae===null||Ae.pointerId!==le.pointerId||v(lw(Ae.startWidth+(Ae.startX-le.clientX)))},[]),O=(0,x.useCallback)(le=>{const Ae=R.current;Ae===null||Ae.pointerId!==le.pointerId||z(!0)},[z]),Q=(0,x.useCallback)(()=>{z(!0)},[z]),V=(0,x.useCallback)(()=>{v(f),Jz(h)},[f,h]),ue=(0,x.useCallback)(()=>{const le=C.current,Ae=le?.parentElement;if(!le||!Ae)return;U(),S(!0);const de=Ae.getBoundingClientRect();I(we=>{if(we)return{...we,left:we.parentLeft};const ye=le.getBoundingClientRect(),Me={top:ye.top,left:ye.left,rightInset:Math.max(0,window.innerWidth-ye.right),parentLeft:de.left};return ow()?{...Me,left:Me.parentLeft}:(window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{I(he=>he&&{...he,left:he.parentLeft})})}),Me)})},[U]),ce=(0,x.useCallback)(()=>{const le=C.current?.parentElement;if(S(!1),ow()){K();return}I(Ae=>{if(!Ae)return Ae;const de=le?le.getBoundingClientRect().right:window.innerWidth-Ae.rightInset;return{...Ae,left:de-M.current}}),U(),D.current=window.setTimeout(K,Yz)},[U,K]);(0,x.useEffect)(()=>{!u||!s||(p(),k||ue())},[u,s,k,ue,p]);const X=(0,x.useCallback)(le=>{le.target!==C.current||le.propertyName!=="left"||k||K()},[k,K]),A=N!==null,ee=z3(P3),ie=ee?"100%":g;return(0,a.jsxs)(a.Fragment,{children:[A?(0,a.jsx)("div",{"aria-hidden":!0,className:"hidden md:block shrink-0",style:{width:s?g:0}}):null,(0,a.jsxs)("aside",{ref:C,className:Y("hidden md:flex bg-bg-2 flex-col",!k&&"border-l border-line",A?"tc-pane-glide fixed z-40 overflow-hidden":Y(ee?"absolute inset-0 z-30 h-full":"relative h-full shrink-0",s?"overflow-visible":"overflow-hidden",!y&&"transition-(--tp-width-opacity) duration-200 ease-in-out")),style:A?{top:N.top,bottom:0,left:N.left,right:N.rightInset}:{width:s?ie:0,opacity:s?1:0},onTransitionEnd:X,children:[!A&&!ee&&s?(0,a.jsx)("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize panel","data-dragging":y?"":void 0,className:"group absolute inset-y-0 z-10 cursor-col-resize touch-none",style:{left:-4,width:8},onPointerDown:E,onPointerMove:B,onPointerUp:O,onPointerCancel:O,onLostPointerCapture:Q,onDoubleClick:V,children:(0,a.jsx)("div",{className:Y("mx-auto h-full w-0.5 transition-colors",y?"bg-focus":"bg-transparent group-hover:bg-focus")})}):null,(0,a.jsx)("div",{className:Y("flex-1 flex flex-col min-h-0",A&&"w-full"),style:A?void 0:{width:ie,minWidth:ie},children:(0,a.jsx)(Dz,{presentation:"docked",maximized:k,contentMode:"full-bleed",headerSize:c?"task-detail":"default",className:"flex-1 border-l-0",header:(0,a.jsx)("div",{id:Kz,className:"flex min-w-0 flex-1 items-center self-stretch"}),trailingControls:(0,a.jsx)(Lz,{maximized:k,closeControl:c?"close":"toggle",onMaximizedChange:r(le=>{le?ue():ce()},"onMaximizedChange"),onToggle:r(()=>l(!1),"onToggle")}),footer:(0,a.jsx)("div",{id:qz}),children:t==="full-bleed"?e:(0,a.jsx)(NI,{className:"h-full",children:(0,a.jsx)("div",{className:Y("p-4",k&&"mx-auto w-full px-9"),style:k?{maxWidth:Gz}:void 0,children:e})})})})]})]})}r(eP,"ResizablePropertiesPanel");function tP(e){return e?.enableCombinedInboxTasks===!0}r(tP,"resolveCombinedInboxTasksEnabled");var cw=null;function nP(){return cw??=new _f,cw}r(nP,"getDetachedClient$1");function Jf(){const e=(0,x.useContext)(j0),t=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),enabled:e!=null},e??nP());return e?{enabled:tP(t.data),loaded:t.isFetched}:{enabled:!1,loaded:!0}}r(Jf,"useCombinedInboxTasksEnabled");var aP=["status","priority","assigneeAgentId","assigneeUserId","projectId","labelId","updatedWithin","updatedAfter"],sP=["backlog","todo","in_progress","in_review","blocked"],iP=["done","cancelled"],ux=["title","id","desc","comment","doc","text"],rP=[{key:"title",label:"Title",description:"Match the task title",kind:"text"},{key:"id",label:"ID",description:"Exact task identifier",kind:"text"},{key:"desc",label:"Description",description:"Match the task description",kind:"text"},{key:"comment",label:"Comments",description:"Match task comments",kind:"text"},{key:"doc",label:"Documents",description:"Match task documents",kind:"text"},{key:"text",label:"All text",description:"Title, ID, description, comments and documents",kind:"text"},{key:"status",label:"Status",description:"Filter by status, open or closed",kind:"picker"},{key:"priority",label:"Priority",description:"Filter by priority",kind:"picker"},{key:"assignee",label:"Assignee",description:"Filter by assignee",kind:"picker"},{key:"label",label:"Label",description:"Filter by label",kind:"picker"},{key:"project",label:"Project",description:"Filter by project",kind:"picker"},{key:"author",label:"Author",description:"Filter by who created the task",kind:"picker"},{key:"updated",label:"Updated",description:"Filter by last update",kind:"picker"}],lP=["assignee:me","is:open","updated:>7d"];function Oc(e){return e.length>=2&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}r(Oc,"stripValueQuotes");function dx(e){const t=[];let s=0;for(;s<e.length;){for(;/\s/.test(e[s]??"");)s+=1;if(s>=e.length)break;const l=s;if(e[s]==='"'){for(s+=1;s<e.length&&e[s]!=='"';)s+=1;e[s]==='"'&&(s+=1);const u=e.slice(l,s);t.push({raw:u,value:u});continue}for(;s<e.length&&!/\s/.test(e[s]??"");){if(e[s]===":"&&e[s+1]==='"'){for(s+=2;s<e.length&&e[s]!=='"';)s+=1;e[s]==='"'&&(s+=1);break}s+=1}const c=e.slice(l,s);t.push({raw:c,value:c})}return t}r(dx,"tokenizeQuery");function jh(e){let t=0,s=!1;for(let l=0;l<e.length;l+=1){const c=e[l];c==='"'?s=!s:!s&&/\s/.test(c)&&(t=l+1)}return{start:t,token:e.slice(t)}}r(jh,"currentSearchToken");function oP(e){const t=e.replace(/"/g,"").trim();return/[\s:]/.test(t)?`"${t}"`:t}r(oP,"quoteSearchValue");function Hr(e,t){return`${e}:${oP(t)}`}r(Hr,"formatSearchToken");var aA=["status","priority","assignee","label","project","author","updated","is"];function cP(e,t){const s=/^([a-zA-Z]+):(.+)$/s.exec(e);if(!s)return!1;const l=s[1].toLowerCase();if(!ux.includes(l)&&!t.includes(l))return!1;const c=s[2];return c.startsWith('"')&&(c.length<2||!c.endsWith('"'))?!1:Oc(c).trim().length>0}r(cP,"isCompleteScopedToken");function uc(e,t=aA,s=!1){const l=dx(e),c=[],u=[];return l.forEach((p,f)=>{const h=f===l.length-1;!(s&&h)&&cP(p.raw,t)?c.push(p.raw):u.push(p.raw)}),{tokens:c,text:u.join(" ")}}r(uc,"splitSearchInput");function uP(e,t={}){const s=uo(e,t).pills[0];if(s)return s;const l=/^([a-zA-Z]+):(.*)$/s.exec(e);return{key:l?.[1]?.toLowerCase()??"text",value:Oc(l?.[2]??e),label:e}}r(uP,"searchTokenPill");function wh(e){return vE(e)??e.trim().toLowerCase()}r(wh,"normalizedLookup");function gd(e,t){const s=wh(t);return e?.find(l=>l.id===t||wh(l.name)===s?!0:l.urlKey?wh(l.urlKey)===s:!1)??null}r(gd,"findByNameOrId");function uw(e,t){return e?.includes(t)?e:[...e??[],t]}r(uw,"addUnique");function Ta(e,t){t.trim().length>0&&e.push(t)}r(Ta,"appendText");function dP(e){return Bc.includes(e)?e:null}r(dP,"parseStatus");function fP(e){return x0.includes(e)?e:null}r(fP,"parsePriority");function pP(e){const t=e.startsWith(">")?e.slice(1):e;return/^[1-9]\d{0,2}(h|d|w|m)$/.test(t)?t:null}r(pP,"parseUpdatedWithin");function fa(e,t){return`${e}:${t}`}r(fa,"operatorLabel");function uo(e,t={}){const s=[],l={},c=[];for(const u of dx(e)){const p=/^([a-zA-Z]+):(.*)$/s.exec(u.value);if(!p){Ta(s,u.raw);continue}const f=p[1].toLowerCase(),h=p[2],g=Oc(h).trim();if(!g){Ta(s,u.raw);continue}if(ux.includes(f)){Ta(s,u.raw),c.push({key:f,value:g,label:fa(f,g)});continue}if(t.operatorKeys&&!t.operatorKeys.includes(f)){Ta(s,u.raw);continue}if(f==="status"){const v=dP(g);if(!v){Ta(s,u.raw);continue}l.status=uw(l.status,v),c.push({key:"status",value:v,label:fa("status",v)});continue}if(f==="priority"){const v=fP(g);if(!v){Ta(s,u.raw);continue}l.priority=uw(l.priority,v),c.push({key:"priority",value:v,label:fa("priority",v)});continue}if(f==="assignee"){if(g.toLowerCase()==="me"){if(t.currentAgentId){l.assigneeAgentId=t.currentAgentId,c.push({key:"assignee",value:"me",label:"assignee:me"});continue}if(t.currentUserId){l.assigneeUserId=t.currentUserId,c.push({key:"assignee",value:"me",label:"assignee:me"});continue}Ta(s,u.raw);continue}if(g.toLowerCase()==="none"){l.assigneeAgentId=null,c.push({key:"assignee",value:"none",label:"assignee:none"});continue}const v=gd(t.agents,g);if(!v){Ta(s,u.raw);continue}l.assigneeAgentId=v.id,c.push({key:"assignee",value:v.name,label:fa("assignee",v.name)});continue}if(f==="author"){if(g.toLowerCase()==="me"){if(t.currentAgentId){l.createdByAgentId=t.currentAgentId,c.push({key:"author",value:"me",label:"author:me"});continue}if(t.currentUserId){l.createdByUserId=t.currentUserId,c.push({key:"author",value:"me",label:"author:me"});continue}Ta(s,u.raw);continue}const v=gd(t.agents,g);if(!v){Ta(s,u.raw);continue}l.createdByAgentId=v.id,c.push({key:"author",value:v.name,label:fa("author",v.name)});continue}if(f==="project"){const v=gd(t.projects,g);if(!v){Ta(s,u.raw);continue}l.projectId=v.id,c.push({key:"project",value:v.name,label:fa("project",v.name)});continue}if(f==="label"){const v=gd(t.labels,g);if(v){l.labelId=v.id,c.push({key:"label",value:v.name,label:fa("label",v.name)});continue}if(Jh(g)){l.labelId=g,c.push({key:"label",value:g,label:fa("label",g.slice(0,8))});continue}Ta(s,u.raw);continue}if(f==="updated"){const v=pP(g);if(!v){Ta(s,u.raw);continue}l.updatedWithin=v,c.push({key:"updated",value:`>${v}`,label:fa("updated",`>${v}`)});continue}if(f==="is"){if(g==="open"){l.status=sP,c.push({key:"is",value:"open",label:"is:open"});continue}if(g==="closed"){l.status=iP,c.push({key:"is",value:"closed",label:"is:closed"});continue}Ta(s,u.raw);continue}Ta(s,u.raw)}return{query:s.join(" ").replace(/\s+/g," ").trim(),filters:l,pills:c}}r(uo,"parseSearchQuery");function dw(e,t,s){for(const l of s??[])e.append(t,l)}r(dw,"appendMulti");function mP(e){for(const t of aP)e.delete(t)}r(mP,"clearSearchFilterParams");function hP(e,t){mP(e),dw(e,"status",t.status),dw(e,"priority",t.priority),t.assigneeAgentId!==void 0&&e.set("assigneeAgentId",t.assigneeAgentId??"null"),t.assigneeUserId!==void 0&&e.set("assigneeUserId",t.assigneeUserId),t.projectId!==void 0&&e.set("projectId",t.projectId),t.labelId!==void 0&&e.set("labelId",t.labelId),t.updatedWithin!==void 0&&e.set("updatedWithin",t.updatedWithin),t.updatedAfter!==void 0&&e.set("updatedAfter",t.updatedAfter)}r(hP,"applySearchFiltersToParams");function fw(e,t){return e.filter(s=>t.includes(s))}r(fw,"validValues");function tY(e){const t={},s=fw(e.getAll("status").flatMap(v=>v.split(",")),Bc),l=fw(e.getAll("priority").flatMap(v=>v.split(",")),x0),c=e.get("assigneeAgentId"),u=e.get("assigneeUserId"),p=e.get("projectId"),f=e.get("labelId"),h=e.get("updatedWithin"),g=e.get("updatedAfter");return s.length>0&&(t.status=s),l.length>0&&(t.priority=l),c!==null&&(t.assigneeAgentId=c==="null"?null:c),u&&(t.assigneeUserId=u),p&&Jh(p)&&(t.projectId=p),f&&Jh(f)&&(t.labelId=f),h&&(/^[1-9]\d{0,2}(h|d|w|m)$/.test(h)||eS.includes(h))&&(t.updatedWithin=h),g&&!Number.isNaN(new Date(g).getTime())&&(t.updatedAfter=g),t}r(tY,"readSearchFiltersFromParams");function sA(e){return!!(e.status?.length||e.priority?.length||e.assigneeAgentId!==void 0||e.assigneeUserId||e.projectId||e.labelId||e.updatedWithin||e.updatedAfter||e.createdByAgentId||e.createdByUserId)}r(sA,"hasSearchFilters");var gP={h:1,d:24,w:168,m:720};function iA(e,t=new Date){const s=/^(\d+)(h|d|w|m)$/.exec(e);if(!s)return null;const l=Number.parseInt(s[1],10)*gP[s[2]];return new Date(t.getTime()-l*60*60*1e3).toISOString()}r(iA,"updatedWithinToSince");function rA(e,t=new Date){const s={};e.status?.length&&(s.status=e.status.join(",")),e.priority?.length&&(s.priority=e.priority.join(",")),e.assigneeAgentId!==void 0&&(s.assigneeAgentId=e.assigneeAgentId??"null"),e.assigneeUserId&&(s.assigneeUserId=e.assigneeUserId),e.projectId&&(s.projectId=e.projectId),e.labelId&&(s.labelId=e.labelId),e.createdByAgentId&&(s.createdByAgentId=e.createdByAgentId),e.createdByUserId&&(s.createdByUserId=e.createdByUserId);const l=e.updatedAfter??(e.updatedWithin?iA(e.updatedWithin,t):null);return l&&(s.updatedSince=l),s}r(rA,"searchFiltersToIssueListParams");function xP(e){const t={};if(e.statuses.length>0&&(t.status=e.statuses.join(",")),e.priorities.length>0&&(t.priority=e.priorities.join(",")),e.labels.length>0&&(t.labelId=e.labels.join(",")),e.projects.length===1&&(t.projectId=e.projects[0]),e.assignees.length===1){const s=e.assignees[0];s==="__me"?t.assigneeUserId="me":s!=="__unassigned"&&(t.assigneeAgentId=s)}if(e.creators.length===1){const s=e.creators[0];s.startsWith("agent:")&&(t.createdByAgentId=s.slice(6)),s.startsWith("user:")&&(t.createdByUserId=s.slice(5))}return t}r(xP,"issueFilterStateToListParams");function Tg(e){const t=[];for(const s of dx(e)){const l=/^([a-zA-Z]+):(.+)$/s.exec(s.value),c=l?.[1]?.toLowerCase();if(l&&c&&ux.includes(c)){const p=Oc(l[2]).trim().toLowerCase();p&&t.push({field:c,value:p});continue}const u=Oc(s.value).trim().toLowerCase();u&&t.push({field:null,value:u})}return t}r(Tg,"localSearchTerms");function nY(e){return Tg(e).map(t=>t.value).join(" ")}r(nY,"localSearchText");function pw(e,t){const s=e.title.toLowerCase(),l=(e.identifier??"").toLowerCase(),c=(e.description??"").toLowerCase();return t.every(u=>u.field==="title"?s.includes(u.value):u.field==="id"?l===u.value:u.field==="desc"?c.includes(u.value):s.includes(u.value)||l.includes(u.value)||c.includes(u.value))}r(pw,"issueMatchesLocalSearchTerms");function mw(e,t,s=new Date){if(t.status?.length&&!t.status.includes(e.status)||t.priority?.length&&!t.priority.includes(e.priority)||t.assigneeAgentId!==void 0&&(e.assigneeAgentId??null)!==t.assigneeAgentId||t.assigneeUserId&&e.assigneeUserId!==t.assigneeUserId||t.projectId&&e.projectId!==t.projectId||t.labelId&&!(e.labelIds??[]).includes(t.labelId)||t.createdByAgentId&&e.createdByAgentId!==t.createdByAgentId||t.createdByUserId&&e.createdByUserId!==t.createdByUserId)return!1;const l=t.updatedAfter??(t.updatedWithin?iA(t.updatedWithin,s):null);return!(l&&new Date(e.updatedAt).getTime()<new Date(l).getTime())}r(mw,"issueMatchesSearchFilters");function kh(e,t){return e?.find(s=>s.id===t)?.name??t.slice(0,8)}r(kh,"nameForId");function aY(e,t={}){const s=[];for(const l of e.status??[])s.push({key:"status",value:l,label:fa("status",l)});for(const l of e.priority??[])s.push({key:"priority",value:l,label:fa("priority",l)});if(e.assigneeAgentId!==void 0){const l=e.assigneeAgentId===null?"unassigned":kh(t.agents,e.assigneeAgentId);s.push({key:"assignee",value:l,label:fa("assignee",l)})}if(e.assigneeUserId){const l=e.assigneeUserId===t.currentUserId?"me":e.assigneeUserId.slice(0,8);s.push({key:"assignee",value:l,label:fa("assignee",l)})}if(e.projectId){const l=kh(t.projects,e.projectId);s.push({key:"project",value:l,label:fa("project",l)})}if(e.labelId){const l=kh(t.labels,e.labelId);s.push({key:"label",value:l,label:fa("label",l)})}return e.updatedWithin&&s.push({key:"updated",value:`>${e.updatedWithin}`,label:fa("updated",`>${e.updatedWithin}`)}),e.updatedAfter&&s.push({key:"updated",value:e.updatedAfter,label:fa("updated",e.updatedAfter)}),s}r(aY,"searchFilterPills");function bP(e,t={}){const s=uo(e,t),l=new URLSearchParams;s.query.length>0&&l.set("q",s.query),hP(l,s.filters);const c=l.toString();return c?`/search?${c}`:"/search"}r(bP,"buildSearchPathFromQuery");var vP="__wardmote-search-all__";function yP(e,t={}){return bP(e,t)}r(yP,"buildFullSearchPath");var jP=/\/issues\/[^/?#]+(?:$|\?|#|\/)/;function wP(e){return jP.test(e)}r(wP,"isOnIssueDetail");var kP=5,SP=6,NP=10,hw=20,CP=250;function AP(e,t){let s=0;for(let l=0;l<t.length&&s<e.length;l+=1)t[l]===e[s]&&(s+=1);return s===e.length}r(AP,"isSubsequence");function _P(e,t,s){if(e===s)return 1e3;if(e.startsWith(s))return Math.max(700,900-e.length);const l=e.indexOf(s);return l>=0?700-l:t.includes(s)?400:AP(s,e)?200:null}r(_P,"scoreProjectMatch");function EP(){const[e,t]=(0,x.useState)(!1),[s,l]=(0,x.useState)(""),[c,u]=(0,x.useState)(""),p=ja(),f=hn(),{selectedCompanyId:h}=bt(),{openNewIssue:g,openNewAgent:v}=Us(),{isMobile:y,setSidebarOpen:j}=Jn(),k=s.trim(),S=wP(f.pathname),{enabled:N}=Jf(),{hidden:I}=gr(),C=!I.has("instance.experimental"),{data:M}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),enabled:e});(0,x.useEffect)(()=>{function he(ve){ve.key==="k"&&(ve.metaKey||ve.ctrlKey)&&(ve.preventDefault(),t(!0),y&&j(!1))}return r(he,"handleKeyDown"),document.addEventListener("keydown",he),()=>document.removeEventListener("keydown",he)},[y,j]),(0,x.useEffect)(()=>{e||l("")},[e]),(0,x.useEffect)(()=>{if(s.trim().length===0){u("");return}const he=window.setTimeout(()=>u(s),CP);return()=>window.clearTimeout(he)},[s]);const{data:R=[]}=me({queryKey:$.agents.list(h),queryFn:r(()=>Ha.list(h),"queryFn"),enabled:!!h&&e}),{data:_=[]}=me({queryKey:$.projects.list(h),queryFn:r(()=>hr.list(h),"queryFn"),enabled:!!h&&e}),D=(0,x.useMemo)(()=>_,[_]),{data:U=[]}=me({queryKey:$.issues.labels(h),queryFn:r(()=>cn.listLabels(h),"queryFn"),enabled:!!h&&e}),{data:K}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),enabled:e}),z=K?.user?.id??K?.session?.userId??null,E=(0,x.useMemo)(()=>({currentUserId:z,agents:R,projects:D,labels:U}),[R,z,U,D]),B=(0,x.useMemo)(()=>uo(s,E),[E,s]).query.trim(),O=(0,x.useMemo)(()=>uo(c,E),[c,E]),Q=O.query.trim(),V=(0,x.useMemo)(()=>rA(O.filters),[O.filters]),ue=Q.length>0||sA(O.filters),{data:ce=[]}=me({queryKey:[...$.issues.list(h),"command-palette-recent",hw],queryFn:r(()=>cn.listCompact(h,{limit:hw,sortField:"updated",sortDir:"desc"}),"queryFn"),enabled:!!h&&e&&k.length===0}),{data:X=[]}=me({queryKey:[...$.issues.search(h,Q,void 0,10),V],queryFn:r(()=>cn.listCompact(h,{...V,...Q.length>0?{q:Q}:{},limit:10,includeRoutineExecutions:!0}),"queryFn"),enabled:!!h&&e&&ue,placeholderData:r(he=>he,"placeholderData")});function A(he){t(!1),p(he)}r(A,"go");function ee(){A(yP(k,E))}r(ee,"goFullSearch");const ie=r(he=>he?R.find(ve=>ve.id===he)?.name??null:null,"agentName"),le=(0,x.useMemo)(()=>k.length===0?ce:ue?X:[],[ce,ue,X,k]),Ae=(0,x.useMemo)(()=>{if(B.length===0)return[];const he=B.toLowerCase();return D.map(ve=>({project:ve,score:_P(ve.name.toLowerCase(),(ve.description??"").toLowerCase(),he)})).filter(ve=>ve.score!==null).sort((ve,et)=>et.score-ve.score).slice(0,kP).map(ve=>ve.project)},[D,B]),de=k.length>0,we=de&&Ae.length>0,ye=we?SP:NP,Me=de&&le.length===0&&Ae.length===0;return(0,a.jsxs)(NT,{open:e,onOpenChange:r(he=>{t(he),he&&y&&j(!1)},"onOpenChange"),children:[(0,a.jsx)(z0,{placeholder:"Search tasks, agents, projects...",value:s,onValueChange:l,onKeyDown:r(he=>{if(he.key==="Enter"&&(he.metaKey||he.ctrlKey)){he.preventDefault(),ee();return}he.key==="Enter"&&Me&&(he.preventDefault(),ee())},"onKeyDown")}),(0,a.jsxs)($0,{children:[(0,a.jsx)(P0,{children:de?(0,a.jsxs)("span",{children:["No quick task matches. Press"," ",(0,a.jsx)("kbd",{className:"rounded border border-line bg-bg-3 px-1 py-0.5 text-(length:--text-nano)",children:"↵"})," ","to ",(0,a.jsx)("span",{className:"font-medium",children:"search all"})," or keep typing to refine."]}):"No results found."}),de?(0,a.jsx)(Xs,{heading:"Search",children:(0,a.jsxs)(wn,{value:`${vP} ${k}`,onSelect:ee,className:"bg-bg-3/40 border border-bg-3 data-[selected=true]:bg-bg-3/60","data-testid":"command-search-all",children:[(0,a.jsx)(pr,{className:"mr-2 h-4 w-4"}),(0,a.jsxs)("span",{className:"flex-1 truncate",children:["Search all for ",(0,a.jsxs)("span",{className:"font-semibold",children:["“",k,"”"]})]}),(0,a.jsxs)("span",{className:"ml-auto inline-flex items-center gap-1 text-xs text-ink-3",children:[(0,a.jsx)("span",{children:"open full search"}),(0,a.jsx)("kbd",{className:"rounded border border-line bg-bg px-1 py-0.5 text-(length:--text-nano)",children:"↵"})]})]})}):null,de?(0,a.jsx)(ir,{}):null,(0,a.jsx)(Xs,{heading:"Quick filters",children:lP.map(he=>(0,a.jsxs)(wn,{value:`quick-filter ${he}`,onSelect:r(()=>l(ve=>ve.trim()?`${ve.trim()} ${he}`:he),"onSelect"),"data-testid":"command-filter-chip",children:[(0,a.jsx)(pr,{className:"mr-2 h-4 w-4"}),(0,a.jsx)("span",{className:"font-mono text-xs",children:he})]},he))}),(0,a.jsx)(ir,{}),we&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Xs,{heading:"Projects",children:Ae.map(he=>(0,a.jsxs)(wn,{value:`${k} ${he.name}`,onSelect:r(()=>A(Uy(he)),"onSelect"),"data-testid":"command-project-match",children:[(0,a.jsx)(eh,{className:"mr-2 h-4 w-4 shrink-0"}),(0,a.jsx)("span",{className:"min-w-0 truncate",children:he.name}),he.description?(0,a.jsx)("span",{className:"ml-2 hidden min-w-0 flex-1 truncate text-xs text-ink-3 sm:inline",children:he.description}):null]},he.id))}),(0,a.jsx)(ir,{})]}),(0,a.jsxs)(Xs,{heading:"Actions",children:[(0,a.jsxs)(wn,{onSelect:r(()=>{t(!1),g()},"onSelect"),children:[(0,a.jsx)(V0,{className:"mr-2 h-4 w-4"}),"Create new task",(0,a.jsx)("span",{className:"ml-auto text-xs text-ink-3",children:"C"})]}),S&&(0,a.jsxs)(wn,{onSelect:r(()=>{t(!1),window.dispatchEvent(new CustomEvent("wardmote:open-file-viewer"))},"onSelect"),children:[(0,a.jsx)(BS,{className:"mr-2 h-4 w-4"}),"Open file in this issue...",(0,a.jsx)("span",{className:"ml-auto text-xs text-ink-3",children:"g f"})]}),(0,a.jsxs)(wn,{onSelect:r(()=>{t(!1),v()},"onSelect"),children:[(0,a.jsx)(as,{className:"mr-2 h-4 w-4"}),"Create new agent"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A("/projects"),"onSelect"),children:[(0,a.jsx)(as,{className:"mr-2 h-4 w-4"}),"Create new project"]})]}),(0,a.jsx)(ir,{}),(0,a.jsxs)(Xs,{heading:"Pages",children:[(0,a.jsxs)(wn,{onSelect:r(()=>A("/dashboard"),"onSelect"),children:[(0,a.jsx)(T0,{className:"mr-2 h-4 w-4"}),"Dashboard"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A(N?"/issues?view=mine":"/inbox"),"onSelect"),children:[(0,a.jsx)(E0,{className:"mr-2 h-4 w-4"}),N?"My work":"Inbox"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A("/issues"),"onSelect"),children:[(0,a.jsx)(Xd,{className:"mr-2 h-4 w-4"}),"Tasks"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A("/projects"),"onSelect"),children:[(0,a.jsx)(eh,{className:"mr-2 h-4 w-4"}),"Projects"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A("/goals"),"onSelect"),children:[(0,a.jsx)(C0,{className:"mr-2 h-4 w-4"}),"Goals"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A("/agents"),"onSelect"),children:[(0,a.jsx)(Nc,{className:"mr-2 h-4 w-4"}),"Agents"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A("/costs"),"onSelect"),children:[(0,a.jsx)(j1,{className:"mr-2 h-4 w-4"}),"Costs"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A("/activity"),"onSelect"),children:[(0,a.jsx)(H0,{className:"mr-2 h-4 w-4"}),"Activity"]}),M?.enablePixelsOffice===!0?(0,a.jsxs)(wn,{onSelect:r(()=>A("/pixels-office"),"onSelect"),children:[(0,a.jsx)(hR,{className:"mr-2 h-4 w-4"}),"Pixels Office"]}):null,M?.enableConferenceRoomChat===!0?(0,a.jsxs)(wn,{onSelect:r(()=>A("/board-chat"),"onSelect"),children:[(0,a.jsx)(NR,{className:"mr-2 h-4 w-4"}),"Conference Room"]}):null,C?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(wn,{onSelect:r(()=>A("/company/settings/instance/features"),"onSelect"),children:[(0,a.jsx)(xN,{className:"mr-2 h-4 w-4"}),"Features"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A("/company/settings/instance/advanced"),"onSelect"),children:[(0,a.jsx)(If,{className:"mr-2 h-4 w-4"}),"Advanced settings"]})]}):null]}),le.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ir,{}),(0,a.jsx)(Xs,{heading:"Tasks",children:le.slice(0,ye).map(he=>(0,a.jsxs)(wn,{value:k.length>0?`${k} ${he.identifier??""} ${he.title}`:void 0,onSelect:r(()=>A(`/issues/${he.identifier??he.id}`),"onSelect"),children:[(0,a.jsx)(Xd,{className:"mr-2 h-4 w-4"}),(0,a.jsx)("span",{className:"text-ink-3 mr-2 font-mono text-xs",children:he.identifier??he.id.slice(0,8)}),(0,a.jsx)("span",{className:"flex-1 truncate",children:he.title}),he.assigneeAgentId&&(()=>{const ve=ie(he.assigneeAgentId);return ve?(0,a.jsx)(co,{agent:R?.find(et=>et.id===he.assigneeAgentId)??{id:he.assigneeAgentId,name:ve},size:"sm",className:"ml-2 hidden sm:inline-flex"}):null})()]},he.id))})]}),R.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ir,{}),(0,a.jsx)(Xs,{heading:"Agents",children:R.slice(0,10).map(he=>(0,a.jsxs)(wn,{onSelect:r(()=>A(Od(he)),"onSelect"),children:[(0,a.jsx)(Nc,{className:"mr-2 h-4 w-4"}),he.name,(0,a.jsx)("span",{className:"text-xs text-ink-3 ml-2",children:he.role})]},he.id))})]}),D.length>0&&!de&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ir,{}),(0,a.jsx)(Xs,{heading:"Projects",children:D.slice(0,10).map(he=>(0,a.jsxs)(wn,{onSelect:r(()=>A(Uy(he)),"onSelect"),children:[(0,a.jsx)(eh,{className:"mr-2 h-4 w-4"}),he.name]},he.id))})]})]})]})}r(EP,"CommandPalette");function IP(){const{hidden:e,loaded:t}=gr();return{visible:t&&!e.has("workspaces.isolation"),loaded:t}}r(IP,"useWorkspaceIsolationControls");function TP(e){return{...e,items:e.items.map(t=>({...t,lastUpdatedAt:new Date(t.lastUpdatedAt),primaryService:t.primaryService?{...t.primaryService,updatedAt:new Date(t.primaryService.updatedAt)}:null,linkedIssues:t.linkedIssues.map(s=>({...s,updatedAt:new Date(s.updatedAt)}))}))}}r(TP,"normalizeWorkspaceOverview");var ep={listOverview:r(async(e,t)=>{const s=new URLSearchParams;t?.projectId&&s.set("projectId",t.projectId),t?.status?.length&&s.set("status",t.status.join(",")),t?.limit!==void 0&&s.set("limit",String(t.limit)),t?.offset!==void 0&&s.set("offset",String(t.offset));const l=s.toString();return TP(await je.get(`/companies/${e}/workspace-overview${l?`?${l}`:""}`))},"listOverview"),listSummaries:r((e,t)=>{const s=new URLSearchParams;t?.projectId&&s.set("projectId",t.projectId),t?.projectWorkspaceId&&s.set("projectWorkspaceId",t.projectWorkspaceId),t?.issueId&&s.set("issueId",t.issueId),t?.status&&s.set("status",t.status),t?.reuseEligible&&s.set("reuseEligible","true"),s.set("summary","true");const l=s.toString();return je.get(`/companies/${e}/execution-workspaces${l?`?${l}`:""}`)},"listSummaries"),list:r((e,t)=>{const s=new URLSearchParams;t?.projectId&&s.set("projectId",t.projectId),t?.projectWorkspaceId&&s.set("projectWorkspaceId",t.projectWorkspaceId),t?.issueId&&s.set("issueId",t.issueId),t?.status&&s.set("status",t.status),t?.reuseEligible&&s.set("reuseEligible","true");const l=s.toString();return je.get(`/companies/${e}/execution-workspaces${l?`?${l}`:""}`)},"list"),get:r(e=>je.get(`/execution-workspaces/${e}`),"get"),getCloseReadiness:r(e=>je.get(`/execution-workspaces/${e}/close-readiness`),"getCloseReadiness"),listWorkspaceOperations:r(e=>je.get(`/execution-workspaces/${e}/workspace-operations`),"listWorkspaceOperations"),controlRuntimeServices:r((e,t,s={})=>je.post(`/execution-workspaces/${e}/runtime-services/${t}`,Gy(s)),"controlRuntimeServices"),controlRuntimeCommands:r((e,t,s={})=>je.post(`/execution-workspaces/${e}/runtime-commands/${t}`,Gy(s)),"controlRuntimeCommands"),repair:r(e=>je.post(`/execution-workspaces/${e}/runtime-commands/repair`,{}),"repair"),requestLoginHandoff:r((e,t)=>je.post(`/execution-workspaces/${e}/login-handoff`,t?{next:t}:{}),"requestLoginHandoff"),update:r((e,t)=>je.patch(`/execution-workspaces/${e}`,t),"update"),reconcile:r((e,t)=>je.post(`/execution-workspaces/${e}/reconcile-branch`,t),"reconcile")},RP="text-violet-700 dark:text-violet-300",MP="border-violet-500/30",DP="bg-violet-500/10";function OP({className:e,label:t="User secret"}){return(0,a.jsxs)(Dn,{variant:"outline",className:Y("text-(length:--text-micro)",MP,DP,RP,e),children:[(0,a.jsx)(R3,{className:"h-3 w-3"}),t]})}r(OP,"UserSecretChip");function sY(e){switch(e){case"set":return"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300";case"not_set":return"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300";case"inactive":return"border-bg-3 bg-bg-3 text-ink-3"}}r(sY,"myValueTone");function iY(e){switch(e){case"set":return"Value set";case"not_set":return"Not set";case"inactive":return"Disabled"}}r(iY,"myValueLabel");function rY(e){if(!e)return"—";const t=e.configuredCount+e.missingCount+e.inactiveCount;return`${e.configuredCount} of ${t} set`}r(rY,"coverageSummaryLabel");function LP({companyId:e,definition:t,existingSecret:s,open:l,onOpenChange:c,onSaved:u}){const p=kn(),{pushToast:f}=Ri(),[h,g]=(0,x.useState)(""),[v,y]=(0,x.useState)(""),[j,k]=(0,x.useState)(null),S=t?.managedMode==="external_reference";(0,x.useEffect)(()=>{l&&(g(""),y(""),k(null))},[l,t?.id]);const N=Bt({mutationFn:r(async()=>{if(!t)throw new Error("No definition selected");const C=S?{externalRef:v.trim()}:{value:h.trim()};return s?mg.rotateMyUserSecret(e,s.id,C):mg.createMyUserSecret(e,{definitionId:t.id,definitionKey:t.key,...C})},"mutationFn"),onSuccess:r(C=>{p.invalidateQueries({queryKey:$.secrets.myUserSecrets(e)}),p.invalidateQueries({queryKey:$.secrets.userDefinitions(e)}),f({title:s?"Value updated":"Value saved",body:t?.name,tone:"success"}),u?.(C),c(!1)},"onSuccess"),onError:r(C=>{k(C instanceof Ti||C instanceof Error?C.message:"Failed to save value")},"onError")}),I=S?v.trim().length>0:h.trim().length>0;return(0,a.jsx)(ks,{open:l,onOpenChange:c,children:(0,a.jsxs)($s,{children:[(0,a.jsxs)(bo,{children:[(0,a.jsxs)(Os,{className:"flex items-center gap-2",children:[s?"Update your value":"Set your value",(0,a.jsx)(OP,{})]}),(0,a.jsx)(vo,{children:t?(0,a.jsxs)(a.Fragment,{children:["This value is yours only. It is used when you are the user responsible for a run that needs ",(0,a.jsx)("span",{className:"font-mono",children:t.key}),"."]}):null})]}),t?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"rounded-md border border-line bg-bg-3/20 p-3 text-xs",children:[(0,a.jsx)("div",{className:"font-medium text-ink",children:t.name}),t.description?(0,a.jsx)("p",{className:"mt-1 text-ink-3",children:t.description}):null,t.usageGuidance?(0,a.jsx)("p",{className:"mt-1 text-ink-3",children:t.usageGuidance}):null]}),S?(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-ink",children:"External reference"}),(0,a.jsx)(Wn,{value:v,onChange:r(C=>y(C.target.value),"onChange"),placeholder:"provider reference or ARN",className:"font-mono text-sm",autoFocus:!0}),(0,a.jsx)("p",{className:"text-(length:--text-micro) text-ink-3",children:"Points at your own credential in the configured provider. Wardmote stores the reference, not the value."})]}):(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-ink",children:"Your value"}),(0,a.jsx)(t1,{value:h,onChange:r(C=>g(C.target.value),"onChange"),placeholder:"Paste your token or credential",className:"font-mono text-sm min-h-(--sz-80px)",autoFocus:!0}),(0,a.jsx)("p",{className:"text-(length:--text-micro) text-ink-3",children:"Stored encrypted. Never shown back to anyone, including admins."})]}),j?(0,a.jsx)("p",{className:"text-xs text-bad",children:j}):null]}):null,(0,a.jsxs)($f,{children:[(0,a.jsx)(oe,{variant:"ghost",onClick:r(()=>c(!1),"onClick"),disabled:N.isPending,children:"Cancel"}),(0,a.jsx)(oe,{onClick:r(()=>N.mutate(),"onClick"),disabled:!I||N.isPending,children:N.isPending?"Saving…":s?"Update value":"Save value"})]})]})})}r(LP,"SetMyUserSecretDialog");function zP({companyId:e,definitionKeys:t,title:s="Set your user secrets",secretsPath:l,className:c}){const[u,p]=(0,x.useState)(null),f=me({queryKey:$.secrets.myUserSecrets(e),queryFn:r(()=>mg.listMyUserSecrets(e),"queryFn"),retry:!1}),h=t?new Set(t):null,g=(f.data??[]).filter(v=>v.definition.status==="active"&&!v.secret&&(!h||h.has(v.definition.key)));return g.length===0?null:(0,a.jsxs)("div",{className:"rounded-md border border-amber-500/40 bg-amber-500/5 p-3 text-xs text-amber-800 dark:text-amber-200"+(c?` ${c}`:""),children:[(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsx)(ai,{className:"mt-0.5 h-4 w-4 shrink-0"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"font-medium",children:s}),(0,a.jsxs)("p",{className:"mt-0.5 text-amber-700/90 dark:text-amber-300/90",children:[g.length," user secret",g.length===1?"":"s"," you are responsible for",g.length===1?" has":" have"," no value yet. Runs that require",g.length===1?" it":" them"," will fail until you set your value."]}),(0,a.jsx)("ul",{className:"mt-2 space-y-1.5",children:g.map(v=>(0,a.jsxs)("li",{className:"flex items-center justify-between gap-2 rounded border border-amber-500/30 bg-bg/40 px-2 py-1",children:[(0,a.jsxs)("span",{className:"min-w-0 truncate",children:[(0,a.jsx)("span",{className:"font-medium text-ink",children:v.definition.name})," ",(0,a.jsx)("code",{className:"text-(length:--text-micro) text-ink-3",children:v.definition.key})]}),(0,a.jsx)(oe,{size:"sm",onClick:r(()=>p(v),"onClick"),children:"Set value"})]},v.definition.id))}),l?(0,a.jsx)(LE,{to:l,className:"mt-2 inline-block text-(length:--text-micro) font-medium underline underline-offset-2",children:"Manage all my secrets"}):null]})]}),(0,a.jsx)(LP,{companyId:e,definition:u?.definition??null,existingSecret:u?.secret??null,open:u!==null,onOpenChange:r(v=>{v||p(null)},"onOpenChange")})]})}r(zP,"MissingUserSecretsBanner");function PP(e){return e==="local-board"?"Board":e.slice(0,5)}r(PP,"fallbackUserLabel");function fo(e){const t=e.user?.name?.trim();if(t)return t;const s=e.user?.email?.trim();return s||PP(e.principalId)}r(fo,"baseMemberLabel");function lA(e){const t=new Map;for(const s of e??[])s.status==="active"&&(t.has(s.principalId)||t.set(s.principalId,s));return[...t.values()].sort((s,l)=>fo(s).localeCompare(fo(l)))}r(lA,"activeUniqueMembers");function $P(e){const t=new Map;for(const s of e??[])t.set(s.principalId,fo(s));return t}r($P,"buildCompanyUserLabelMap");function UP(e){const t=new Map;for(const s of e??[])t.set(s.principalId,{label:fo(s),image:s.user?.image??null});return t}r(UP,"buildCompanyUserProfileMap");function oA(e,t){const s=new Set([...t?.excludeUserIds??[]].filter(l=>!!l));return lA(e).filter(l=>!s.has(l.principalId)).map(l=>({id:`user:${l.principalId}`,label:fo(l),searchText:[l.user?.name,l.user?.email,l.principalId].filter(Boolean).join(" ")}))}r(oA,"buildCompanyUserInlineOptions");function BP(e){return lA(e).map(t=>({id:`user:${t.principalId}`,name:fo(t),kind:"user",userId:t.principalId}))}r(BP,"buildCompanyUserMentionOptions");function Rg(e){return e.status!=="terminated"&&e.status!=="pending_approval"&&e.orgChainHealth?.status!=="invalid_org_chain"}r(Rg,"isAgentTaskTarget");function KP(e){const t=[];for(const s of e??[]){const l=s.identifier?.trim();if(!l)continue;const c=s.title?.trim()??"";t.push({id:`issue:${s.id}`,name:c?`${l} ${c}`:l,kind:"issue",issueId:s.id,issueIdentifier:l})}return t}r(KP,"buildIssueMentionOptions");function qP(e){return[...BP(e.members),...[...e.agents??[]].filter(Rg).sort((t,s)=>t.name.localeCompare(s.name)).map(t=>({id:`agent:${t.id}`,name:t.name,kind:"agent",agentId:t.id,agentIcon:t.icon,agentAppearance:t.appearance})),...[...e.projects??[]].sort((t,s)=>t.name.localeCompare(s.name)).map(t=>({id:`project:${t.id}`,name:t.name,kind:"project",projectId:t.id,projectColor:t.color})),...KP(e.issues)]}r(qP,"buildMarkdownMentionOptions");function Ur(e){return e?e.executionWorkspacePolicy?.defaultProjectWorkspaceId??e.workspaces?.find(t=>t.isPrimary)?.id??e.workspaces?.[0]?.id??"":""}r(Ur,"defaultProjectWorkspaceIdForProject");function $d(e){const t=e?.executionWorkspacePolicy?.enabled?e.executionWorkspacePolicy.defaultMode:null;return t==="isolated_workspace"||t==="operator_branch"||t==="adapter_default"?t==="adapter_default"?"agent_default":t:"shared_workspace"}r($d,"defaultExecutionWorkspaceModeForProject");function FP(e){return e==="isolated_workspace"||e==="operator_branch"||e==="shared_workspace"?e:e==="adapter_managed"||e==="cloud_sandbox"?"agent_default":"shared_workspace"}r(FP,"issueExecutionWorkspaceModeForExistingWorkspace");function cA(e,t){if(e.length===0)return[];if(t.length===0)return e;const s=new Map(e.map(c=>[c.id,c])),l=[];for(const c of t){const u=s.get(c);u&&(l.push(u),s.delete(c))}for(const c of s.values())l.push(c);return l}r(cA,"sortProjectsByStoredOrder");function gw(e,t){if(e.length!==t.length)return!1;for(let s=0;s<e.length;s+=1)if(e[s]!==t[s])return!1;return!0}r(gw,"areEqual");function xw(e,t){return cA(e,t).map(s=>s.id)}r(xw,"buildOrderIds");function uA({projects:e,companyId:t,userId:s}){const l=kn(),c=(0,x.useMemo)(()=>$.sidebarPreferences.projectOrder(t??"__none__",s??"__anon__"),[t,s]),{data:u}=me({queryKey:c,queryFn:r(()=>Jd.getProjectOrder(t),"queryFn"),enabled:!!(t&&s)}),[p,f]=(0,x.useState)(()=>xw(e,[]));(0,x.useEffect)(()=>{const g=xw(e,u?.orderedIds??[]);f(v=>gw(v,g)?v:g)},[u?.orderedIds,e]);const h=Bt({mutationFn:r(g=>Jd.updateProjectOrder(t,{orderedIds:g}),"mutationFn"),onSuccess:r(g=>{l.setQueryData(c,g)},"onSuccess")});return{orderedProjects:(0,x.useMemo)(()=>cA(e,p),[e,p]),orderedIds:p,persistOrder:(0,x.useCallback)(g=>{const v=new Set(e.map(j=>j.id)),y=g.filter(j=>v.has(j));for(const j of e)y.includes(j.id)||y.push(j.id);f(j=>gw(j,y)?j:y),!(!t||!s)&&(l.setQueryData(c,j=>({orderedIds:y,updatedAt:j?.updatedAt??null})),h.mutate(y))},[t,h,e,l,c,s])}}r(uA,"useProjectOrder");var pf="wardmote:recent-projects";function Mg(){return CT(pf)}r(Mg,"getRecentProjectIds");function HP(e){try{return localStorage.getItem(`${pf}:${e}`)??void 0}catch{return}}r(HP,"getLastProjectId");function mf(e,t){if(AT(pf,e),t)try{localStorage.setItem(`${pf}:${t}`,e)}catch{}}r(mf,"trackRecentProject");function hf(){const e=globalThis.crypto;if(typeof e?.randomUUID=="function")return e.randomUUID();const t=new Uint8Array(16);if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let l=0;l<t.length;l++)t[l]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;const s=Array.from(t,l=>l.toString(16).padStart(2,"0"));return[s.slice(0,4).join(""),s.slice(4,6).join(""),s.slice(6,8).join(""),s.slice(8,10).join(""),s.slice(10).join("")].join("-")}r(hf,"createUuid");var VP=RE.nullable();function dA(e){return VP.safeParse(e??null)}r(dA,"readExecutionPolicy");function bw(e){return e.type==="agent"?`agent:${e.agentId}`:`user:${e.userId}`}r(bw,"principalKey");function WP(e){const t=io(e);return t.assigneeAgentId?{type:"agent",agentId:t.assigneeAgentId,userId:null}:t.assigneeUserId?{type:"user",userId:t.assigneeUserId,agentId:null}:null}r(WP,"principalFromSelectionValue");function QP(e){return e.type==="agent"?`agent:${e.agentId}`:`user:${e.userId}`}r(QP,"selectionValueFromPrincipal");function lY(e,t){const s=dA(e);return s.success?s.data?.stages.find(l=>l.type===t)?.participants.map(l=>QP(l))??[]:[]}r(lY,"stageParticipantValues");function vw(e,t){const s=new Map((e??[]).map(c=>[bw(c),c])),l=[];for(const c of t){const u=WP(c);if(!u)continue;const p=bw(u),f=s.get(p);l.push({id:f?.id??hf(),type:u.type,agentId:u.type==="agent"?u.agentId??null:null,userId:u.type==="user"?u.userId??null:null})}return l}r(vw,"mergeParticipants");function GP(e){const t=dA(e.existingPolicy);if(!t.success)throw new Error("Execution policy is unavailable");const s=t.data,l=s?.mode??"normal",c=[],u=e.existingPolicy?.monitor??null,p=s?.stages.find(v=>v.type==="review"),f=vw(p?.participants,e.reviewerValues);f.length>0&&c.push({id:p?.id??hf(),type:"review",approvalsNeeded:1,participants:f});const h=s?.stages.find(v=>v.type==="approval"),g=vw(h?.participants,e.approverValues);return g.length>0&&c.push({id:h?.id??hf(),type:"approval",approvalsNeeded:1,participants:g}),c.length===0&&!u&&!s?.authorizationPolicy&&!s?.reviewPreset&&s?.maxReviewRounds==null?null:{...e.existingPolicy,mode:l,commentRequired:!0,stages:c,...u?{monitor:u}:{}}}r(GP,"buildExecutionPolicy");function YP({className:e,...t}){return(0,a.jsx)("div",{className:Y("relative z-0 mx-3 -mb-px overflow-hidden rounded-t-xl rounded-b-none border border-b-0 border-line/75 bg-bg-2 shadow-sm",e),...t})}r(YP,"TaskChatComposerBar");function XP(e){const t=II(e);if(!t)return{matched:!1};const s=t.search(/\s/);if((s===-1?t:t.slice(0,s))!=="/goal")return{matched:!1};const l=s===-1?"":t.slice(s).trim();if(!l)return{matched:!0,command:{action:"focus"}};const[c,...u]=l.split(/\s+/);return["edit","pause","resume","clear"].includes(c)?u.length>0?{matched:!0,error:`/goal ${c} does not accept extra arguments.`}:{matched:!0,command:{action:c}}:{matched:!0,command:{action:"create",objective:l}}}r(XP,"parseRunnerGoalCommand");function ZP(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,2).toUpperCase():`${t[0][0]}${t[t.length-1][0]}`.toUpperCase()}r(ZP,"identityInitials");function JP({assigneeValue:e,label:t,agentMap:s,userProfileMap:l,placement:c}){if(e.startsWith("agent:")){const u=e.slice(6),p=s?.get(u)?.icon??"bot";return(0,a.jsx)("span",{className:"shrink-0","data-assignee-identity":e,"data-assignee-trigger-icon":c==="trigger"?p:void 0,"data-assignee-option-icon":c==="option"?e:void 0,children:(0,a.jsx)(mr,{agent:s?.get(u)??{id:u},size:16})})}if(e.startsWith("user:")){const u=e.slice(5),p=l?.get(u),f=p?.label??t;return(0,a.jsxs)(Yd,{size:"xs",className:"shrink-0","data-assignee-identity":e,"data-assignee-trigger-avatar":c==="trigger"?u:void 0,"data-assignee-option-avatar":c==="option"?e:void 0,children:[p?.image?(0,a.jsx)(Qd,{src:p.image,alt:""}):null,(0,a.jsx)(Gd,{children:ZP(f)})]})}return null}r(JP,"AssigneeIdentityAvatar");function e$(e,t,s){if(s)return e==="planning"?`Plan with ${t}…`:e==="ask"?`Ask ${t}…`:`Message ${t}…`;switch(e){case"planning":return`Plan with ${t} — shapes the plan doc, no code changes…`;case"ask":return`Ask ${t} a question — read-only, nothing runs…`;default:return`Message ${t} — describe what you want done…`}}r(e$,"modePlaceholder");function t$(e,t){return(e==="done"||e==="cancelled"||e==="blocked")&&t.startsWith("agent:")}r(t$,"shouldImplicitlyReopenComment");function Sh(e){if(e.startsWith("agent:")){const t=e.slice(6);return t?{assigneeAgentId:t,assigneeUserId:null}:void 0}if(e.startsWith("user:")){const t=e.slice(5);return t?{assigneeAgentId:null,assigneeUserId:t}:void 0}}r(Sh,"parseAssigneeValue");function yw(e){return e.replace(/[[\]]/g,"\\$&")}r(yw,"escapeMarkdownLabel");function n$({onAdd:e,creation:t,confirmedSubmissionIds:s,onStop:l,stopPending:c=!1,workMode:u,onWorkModeChange:p,disabled:f=!1,disabledReason:h,placeholder:g,onAttachImage:v,onImageUpload:y,mentions:j,enableReassign:k=!1,conversationMode:S=!1,pendingIssue:N,reassignOptions:I,agentMap:C,companyId:M,userProfileMap:R,currentAssigneeValue:_="",onPendingAssigneeChange:D,issueStatus:U,issueId:K=null,mobile:z=!1,draftKey:E,onReviewConversation:B,queuedEdit:O=null,onSaveQueuedEdit:Q,onCancelQueuedEdit:V,pause:ue=null,takeover:ce=null,pendingTakeover:X=null,runnerGoalCapability:A=null,onRunnerGoalCommand:ee,onRunnerGoalReassign:ie}){const le=w0(),Ae=IT(),de=FI(l,c),[we,ye]=(0,x.useState)(()=>E?tj(E):""),Me=t?t.value:we,[he,ve]=(0,x.useState)(!1),[et,$e]=(0,x.useState)(!1),[Ie,ct]=(0,x.useState)(()=>E?$r(E):null),He=(0,x.useRef)(E);(0,x.useEffect)(()=>(He.current=E,ct(E?$r(E):null),()=>{He.current=void 0}),[E]);const[vt,Jt]=(0,x.useState)(null),[ge,Oe]=(0,x.useState)(!1),[De,ut]=(0,x.useState)(null),[Ht,Vt]=(0,x.useState)(!1),[gt,un]=(0,x.useState)(null),[P,qe]=(0,x.useState)(null),[Ye,xt]=(0,x.useState)(u),at=t?u:Ye,[Kt,ea]=(0,x.useState)(null),[en,Mt]=(0,x.useState)(null),Gt=PS(),dt=t?.runSettings??Gt,On=Gt.clear;(0,x.useEffect)(()=>{On()},[On,E,K]);const[mt,Nn]=(0,x.useState)(()=>E?Jy(E).map(se=>({...se,id:`receipt:${se.attachmentId}`,status:"attached"})):[]),It=(0,x.useRef)(mt);function tn(se){const Te=typeof se=="function"?se(It.current):se;It.current=Te,Nn(Te);const Ze=lt.current;Ze&&Ze.draftKey===E&&ej(Ze.draftKey,Te.filter(We=>We.status==="attached"&&We.attachmentId).map(We=>({...We,inline:We.inline===!0})),Ze.attemptId)}r(tn,"setAttachments");const qt=(0,x.useRef)(he);qt.current=he;const Tt=(0,x.useRef)(Kt);Tt.current=Kt;const Ct=(0,x.useRef)(null),_e=(0,x.useRef)(null),Re=(0,x.useRef)(Me);Re.current=Me;const lt=(0,x.useRef)(null);function Dt(se){if(Re.current=se,t){t.onChange(se);return}ye(se),Jt(null);const Te=lt.current;!Te||Te.draftKey!==E||$r(Te.draftKey)?.attemptId!==Te.attemptId||(Ai(Te.draftKey,se?`${Te.submittedBody}
|
|
9
|
+
|
|
10
|
+
${se}`:Te.submittedBody,Te.attemptId),cd(Te.draftKey,{attemptId:Te.attemptId,reviewed:!1,nextDraftOffset:Te.submittedBody.length+(se?2:0),submittedAttachmentIds:Te.submittedAttachmentIds}))}r(Dt,"changeBody");const ze=(0,x.useRef)(null),Ot=(0,x.useRef)(O);Ot.current=O;const Rt=(0,x.useRef)(null),Lt=(0,x.useRef)(null);(0,x.useEffect)(()=>{Oe(!1),ut(null)},[ce?.id]),(0,x.useEffect)(()=>{const se=Lt.current,Te=O,Ze=Te?.commentId??null;if(Te&&se!==Ze)Rt.current||(Rt.current={body:Re.current,attachments:It.current,pendingMode:at,pendingAssignee:Tt.current},E&&Ai(E,Re.current)),ze.current&&(clearTimeout(ze.current),ze.current=null),Re.current=Te.body,ye(Te.body),tn([]),requestAnimationFrame(()=>_e.current?.focus());else if(!Ze&&se){const We=Rt.current;We&&(Re.current=We.body,ye(We.body),tn(We.attachments),xt(We.pendingMode),ea(We.pendingAssignee),E&&Ai(E,We.body)),Rt.current=null,requestAnimationFrame(()=>_e.current?.focus())}Lt.current=Ze},[E,at,O]),(0,x.useEffect)(()=>{!E||O||(Re.current=tj(E),ye(Re.current))},[E,O]),(0,x.useEffect)(()=>{E&&tn(Jy(E).map(se=>({...se,id:`receipt:${se.attachmentId}`,status:"attached"})))},[E]),(0,x.useEffect)(()=>{!E||O||he||Ie||mt!==It.current||ej(E,mt.filter(se=>se.status==="attached"&&se.attachmentId).map(se=>({attachmentId:se.attachmentId,name:se.name,size:se.size,inline:se.inline===!0,contentPath:se.contentPath})))},[mt,E,O,he]),(0,x.useEffect)(()=>{if(!E||O||he){ze.current&&(clearTimeout(ze.current),ze.current=null);return}ze.current&&clearTimeout(ze.current),ze.current=setTimeout(()=>{Ai(E,Me)},800)},[Me,E,O,he]),(0,x.useEffect)(()=>()=>{ze.current&&clearTimeout(ze.current),E&&!Ot.current&&!qt.current&&Ai(E,Re.current)},[E]),(0,x.useEffect)(()=>{if(!E)return;const se=r(()=>{!Ot.current&&!qt.current&&Ai(E,Re.current)},"flushDraft");return window.addEventListener("beforeunload",se),()=>window.removeEventListener("beforeunload",se)},[E]);const nn=!!ue&&!!S,Wt=!nn&&!O&&!Ie&&!!(t||v||y),Ln=!!(k&&I&&I.length>0),gn=t?_:Kt??_,zn=I?.find(se=>se.id===gn)?.label??"Unassigned",is=O?"Edit queued message…":g??e$(at,zn==="Unassigned"?"the agent":zn,z),La=A?.availability!=="available",wa={id:"action:goal",kind:"action",command:"goal",name:"Goal",description:!A||A.verified===!1?"Support will be verified when the session starts.":"Pursue work across turns.",aliases:["goal","pursue","continue"],disabled:La&&A!==null,disabledReason:A?.reason??"Session goals are unsupported by this agent."};function ka(se){if(!t&&se&&M){const Te=Sh(se);Te?.assigneeAgentId&&tf(Te.assigneeAgentId,M),Te?.assigneeUserId&&ef(Te.assigneeUserId,M)}ea(se),D?.(se)}r(ka,"updatePendingAssignee");function Qn(se){xt(se),t&&p?.(se)}r(Qn,"changeMode");async function yt(se){const Te=crypto.randomUUID();tn(Ze=>[...Ze,{id:Te,name:se.name,size:se.size,inline:!0,status:"uploading"}]);try{const Ze=v?await v(se):void 0,We=v?Ze?.contentPath:await y?.(se);if(!We)throw new Error("Upload did not return a file URL");if(!It.current.some(zt=>zt.id===Te))throw new Error("Attachment was removed");return tn(zt=>zt.map(Qt=>Qt.id===Te?{...Qt,attachmentId:Ze?.id,contentPath:We,status:"attached"}:Qt)),We}catch(Ze){throw tn(We=>We.map(zt=>zt.id===Te?{...zt,status:"error",error:Ze instanceof Error?Ze.message:"Upload failed"}:zt)),Ze}}r(yt,"uploadInlineImage");async function dn(se){const Te=`${se.name}:${se.size}:${se.lastModified}:${Math.random().toString(36).slice(2)}`;tn(Ze=>[...Ze,{id:Te,name:se.name,size:se.size,status:"uploading"}]);try{if(!v){tn(zt=>zt.map(Qt=>Qt.id===Te?{...Qt,status:"error",error:"This file type cannot be attached here"}:Qt));return}const Ze=await v(se);if(!Ze?.contentPath)throw new Error("Upload did not return a file URL");const We=Ze?.originalFilename??se.name;tn(zt=>zt.map(Qt=>Qt.id===Te?{...Qt,name:We,attachmentId:Ze?.id,status:"attached",contentPath:Ze?.contentPath}:Qt))}catch(Ze){tn(We=>We.map(zt=>zt.id===Te?{...zt,status:"error",error:Ze instanceof Error?Ze.message:"Upload failed"}:zt))}}r(dn,"attachNonImageFile");async function za(se){if(!se.type.startsWith("image/")){await dn(se);return}try{const Te=await yt(se);_e.current?.insertMarkdown(``)}catch{}}r(za,"attachPickedFile");function si(se){const Te=se.target.files;if(Te&&Te.length>0){if(t){t.onSelectFiles(Array.from(Te)),se.target.value="";return}(async()=>{for(const Ze of Array.from(Te))await za(Ze)})()}se.target.value=""}r(si,"handleFileInputChange");function pn(){const se=Re.current.trim();Dt(/^\/goal(?:\s|$)/.test(se)?se:`/goal ${se}`),Mt(null),requestAnimationFrame(()=>_e.current?.focus())}r(pn,"prepareGoal");function Bs(se){if(nn||!Wt)return;const Te=Array.from(se.clipboardData?.files??[]);if(Te.length===0)return;if(t){if(y){const We=Te.filter(zt=>!zt.type.startsWith("image/"));if(We.length===0||(t.onSelectFiles(We),We.length!==Te.length))return}else t.onSelectFiles(Te);se.preventDefault(),se.stopPropagation();return}const Ze=Te.filter(We=>!We.type.startsWith("image/"));Ze.length!==0&&(Ze.length===Te.length&&(se.preventDefault(),se.stopPropagation()),(async()=>{for(const We of Ze)await dn(We)})())}r(Bs,"handlePasteCapture");const Pn=mt.filter(se=>se.status==="attached"&&se.contentPath&&!se.inline),ra=mt.filter(se=>!se.inline||se.status!=="attached"),ma=!O&&!he&&Me.trim().length===0&&mt.length===0&&!!(l||de.stopping),ha=mt.some(se=>se.status==="uploading"),$n=mt.some(se=>se.status==="error"),Gn=!!(ce&&!nn&&!O),[Pa,xn]=(0,x.useState)(!1),[rs,Sa]=(0,x.useState)(null),[In,ga]=(0,x.useState)(null),Ks=OT(z&&Gn),[qs,ls]=DT("dock",ce?.id??null),Va=!!(Gn&&ce&&(qs||z&&In!==ce.id&&rs!==ce.id&&(Pa||Ks))),Na=(0,x.useRef)(Gn);(0,x.useEffect)(()=>{Na.current&&!Gn&&!O&&requestAnimationFrame(()=>_e.current?.focus()),Na.current=Gn},[O,Gn]);const $a=S&&!O&&Me.trim()==="/new"&&mt.length===0;async function ht(){if(f||nn&&!$a)return;if(t){if(qt.current||ha||$n||t.submitDisabled||!Re.current.trim()&&!t.canSubmitWithoutBody)return;qt.current=!0,ve(!0),Mt(null);try{await t.onSubmit(Re.current,at,dt.values)}catch(jt){Mt(jt instanceof Error?jt.message:"Failed to create task. Try again.")}finally{qt.current=!1,ve(!1)}return}if(!e)return;const se=E&&!O?$r(E):null;if(se&&!he){ct(se);return}const Te=Re.current,Ze=It.current,We=Tt.current,zt=Te.trim(),Qt=O?{matched:!1}:XP(Te),Z=O?{matched:!1}:RI(Te);if(Z.matched&&"error"in Z){Mt(Z.error);return}const Ne=Z.matched&&"command"in Z?Z.command:null,Be=Ne?.mode,Le=Ne?Ne.prompt:Te;if(Qt.matched&&S){Mt("Create a separate task for work that needs an ongoing execution goal.");return}if(Qt.matched){if("error"in Qt){Mt(Qt.error);return}if(It.current.length>0){Mt("Remove attachments before using /goal.");return}if(!ee){Mt(A?.reason??"Session goals are unsupported by this agent.");return}if(A&&A.availability!=="available"){Mt(A.reason??"Session goals are unsupported by this agent.");return}try{if(Ln&&gn!==_&&Qt.command.action!=="focus"){const jt=Sh(gn);if(!jt||!ie){Mt("Select an agent before starting a session goal.");return}await ie(dt.hasValues&&jt.assigneeAgentId?{...jt,modelOverride:dt.values}:jt),dt.clear(),ka(null)}await ee(Qt.command),Mt(null),Re.current="",ze.current&&clearTimeout(ze.current),ze.current=null,E&&ih(E),ye(""),_e.current?.clear()}catch(jt){Mt(jt instanceof Error?jt.message:"The goal action could not be applied.")}return}if(!zt&&Pn.length===0||ha||$n||he||Ie||f)return;const st=Pn.map(jt=>`[${yw(jt.name)}](${jt.contentPath})`).join(`
|
|
11
|
+
`),it=O?Te:[Le.trim(),st].filter(Boolean).join(`
|
|
12
|
+
|
|
13
|
+
`),Pt=Ln&&gn!==_,bn=dt.hasValues?dt.values:void 0,Bn=Pt?Sh(gn):void 0,Qa=Bn?.assigneeAgentId&&bn?{...Bn,modelOverride:bn}:Bn,Ca=t$(U,gn)?!0:void 0;Re.current="",ze.current&&(clearTimeout(ze.current),ze.current=null),E&&!O&&(Ze.some(jt=>jt.status==="attached"&&jt.attachmentId)?Ai(E,Te):ih(E)),ye(""),ve(!0);let Cn=null;try{if(O){if(!Q)return;await Q(O.commentId,it),V?.();return}at!==u&&p&&await p(at);const jt=E?$r(E):null;if(jt){ct(jt),ye(Te);return}Cn=crypto.randomUUID(),E&&(Ai(E,Te),cd(E,{attemptId:Cn,reviewed:!1}));const la=[...new Set(Ze.filter(an=>an.status==="attached"&&an.attachmentId&&(!an.inline||an.contentPath&&Le.includes(an.contentPath))).map(an=>an.attachmentId))];E&&(lt.current={draftKey:E,attemptId:Cn,submittedBody:Te,submittedAttachmentIds:la},Dt(Re.current));const Yt=await e(it,Ca,Qa,la.length?la:void 0,Cn,Be);if(Qa?.modelOverride&&dt.clear(),E&&nj(E,Cn,He.current===E?Re.current:void 0),He.current!==E)return;Jt(EI(Yt));const ta=new Set(Ze.map(an=>an.id));tn(an=>an.filter(Aa=>!ta.has(Aa.id))),Tt.current===We&&ka(null)}catch(jt){if(Qa?.modelOverride&&dt.clear(),He.current!==E)return;const la=Re.current;if(Cn&&jt instanceof iI){const ta={attemptId:Cn,reviewed:!1,nextDraftOffset:Te.length+(la?2:0),submittedAttachmentIds:Ze.flatMap(an=>an.attachmentId?[an.attachmentId]:[])};ct(ta),E&&$r(E)?.attemptId===Cn&&cd(E,ta)}else E&&Cn&&RT(E,Cn);const Yt=la?`${Te}
|
|
14
|
+
|
|
15
|
+
${la}`:Te;Re.current=Yt,ze.current&&(clearTimeout(ze.current),ze.current=null),E&&Ai(E,Yt,Cn??void 0),ye(Yt)}finally{lt.current?.attemptId===Cn&&(lt.current=null),ve(!1)}}r(ht,"submit"),(0,x.useEffect)(()=>{if(!Ie||!s?.has(Ie.attemptId))return;const se=Ie.nextDraftOffset===void 0?"":Re.current.slice(Ie.nextDraftOffset);E&&nj(E,Ie.attemptId,se),ct(null),Re.current=se,ye(se);const Te=Ie.submittedAttachmentIds;tn(Ze=>Te?Ze.filter(We=>!We.attachmentId||!Te.includes(We.attachmentId)):[])},[s,E,Ie]);async function Un(){if(Ie){$e(!1);try{if(!B)throw new Error("Review unavailable");if(await B(),He.current!==E)return;const se={...Ie,reviewed:!0};ct(se),E&&$r(E)?.attemptId===se.attemptId&&cd(E,se)}catch{$e(!0)}}}r(Un,"reviewUncertainSubmission");function ii(){Ie?.reviewed&&(E&&ih(E,Ie.attemptId),Re.current="",ye(""),tn([]),ct(null))}r(ii,"discardUncertainDraft");function ri(){ce&&(Oe(!0),ut(null),Promise.resolve(ce.onSkip()).catch(se=>{Oe(!1),ut(se instanceof Error?se.message:"This request could not be skipped.")}))}r(ri,"skipTakeover");const Wa=ce?(0,a.jsxs)(oe,{type:"button",size:"sm",variant:"secondary",disabled:ge,onClick:ri,children:[ge?(0,a.jsx)(Ma,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):null,"Skip"]}):null;return ue&&S&&O?(0,a.jsx)(th,{...ue,hasDraft:!!(Me.trim()||mt.length)}):(0,a.jsxs)("div",{className:Y("flex min-w-0 flex-col",t?.contextBar?"gap-0":"gap-2"),children:[Va&&ce?(0,a.jsxs)("button",{type:"button",className:"flex min-h-11 w-full min-w-0 items-center gap-2 rounded-xl border border-line bg-bg-2 px-3 text-left text-(length:--text-compact) shadow-sm dark:border-0 dark:bg-bg-3 dark:shadow-none","aria-expanded":!1,"aria-label":`Show ${ce.label}`,onMouseDown:r(se=>se.preventDefault(),"onMouseDown"),onClick:r(()=>{ls(!1),ga(ce.id)},"onClick"),"data-testid":"task-chat-composer-takeover-summary",children:[(0,a.jsx)(sg,{className:"h-4 w-4 shrink-0 text-ink-3","aria-hidden":!0}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium text-ink",children:ce.label}),ce.pendingCount>1?(0,a.jsxs)("span",{className:"shrink-0 text-xs text-ink-3",children:[ce.pendingCount," pending"]}):null,(0,a.jsx)(UI,{className:"h-4 w-4 shrink-0 text-ink-3","aria-hidden":!0})]}):null,Gn&&ce?(0,a.jsxs)("section",{className:Y("relative rounded-xl border border-line bg-bg-2 p-(--sz-18px) shadow-sm dark:border-0 dark:bg-bg-3 dark:shadow-none",z?"flex max-h-(--tc-interaction-card-max-h-mobile) flex-col overflow-hidden p-(--tc-mobile-card-padding)":"max-h-(--tc-interaction-card-max-h) overflow-y-auto scrollbar-auto-hide",Va&&"hidden"),"aria-label":ce.label,"data-testid":"task-chat-composer-takeover",onFocus:r(()=>Sa(ce.id),"onFocus"),onBlur:r(se=>{se.currentTarget.contains(se.relatedTarget)||Sa(null)},"onBlur"),children:[(0,a.jsxs)("div",{className:Y("flex min-w-0 shrink-0 items-center gap-2",ce.hideLabel&&ce.pendingCount===1?"absolute right-0 top-0 z-10":"mb-3"),"data-testid":"task-chat-composer-takeover-header",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[!Ht&&!ce.hideLabel?(0,a.jsx)("strong",{className:"block truncate text-sm font-medium text-ink",children:ce.label}):null,(0,a.jsx)("div",{ref:un,className:"flex min-w-0 items-center","data-testid":"task-chat-composer-takeover-title-slot"})]}),(0,a.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[ce.pendingCount>1?(0,a.jsxs)(oe,{type:"button",size:"sm",variant:"ghost",className:"h-7 px-2",onClick:ce.onShowNext,children:[ce.pendingCount," pending"]}):null,(0,a.jsx)("div",{ref:qe,className:"flex shrink-0 items-center","data-testid":"task-chat-composer-takeover-controls-slot"}),(0,a.jsx)(oe,{type:"button",size:"icon-xs",variant:"ghost","aria-label":"Hide","aria-expanded":!0,"data-testid":"task-chat-composer-takeover-hide",onClick:r(()=>{Sa(null),ls(!0)},"onClick"),children:(0,a.jsx)(Qr,{"aria-hidden":!0})}),(0,a.jsx)(oe,{type:"button",size:"icon-xs",variant:"ghost","aria-label":`Dismiss ${ce.label}`,disabled:ge,onClick:ce.onDismiss,children:(0,a.jsx)(ia,{"aria-hidden":!0})})]})]}),(0,a.jsx)("div",{className:Y(ce.hideLabel&&ce.pendingCount===1?"pr-14":"pr-1",z&&"min-h-0 flex-1 overflow-y-auto overscroll-contain scrollbar-auto-hide"),"data-testid":"task-chat-composer-takeover-body","data-mobile":z||void 0,children:(0,a.jsx)(MT.Provider,{value:{skipButton:ce.inlineSkip&&!ce.hideSkip&&Wa?Wa:null,dismiss:ce.onDismiss,headerSlot:gt,controlsSlot:P,setHeaderClaimed:Vt},children:ce.content})}),De?(0,a.jsx)("p",{className:"mt-2 shrink-0 text-sm text-bad",role:"alert",children:De}):null,!ce.inlineSkip&&!ce.hideSkip?(0,a.jsx)("div",{className:"mt-3 flex shrink-0 items-center justify-end gap-2","data-slot":"task-chat-takeover-actions",children:Wa}):null]}):null,t?.contextBar?(0,a.jsx)(YP,{className:"flex h-11 min-w-0 items-center gap-2 px-2.5","data-testid":"task-chat-composer-context",role:"group","aria-label":"Task project and worktrees",children:t.contextBar}):null,(0,a.jsxs)("div",{className:Y(Ae?"wardmote-task-chat-composer rounded-(--radius-task-composer) border border-line bg-bg-2 p-(--sz-18px) shadow-(--shadow-task-composer) dark:border-0 dark:bg-bg-3 dark:shadow-none":"wardmote-task-chat-composer rounded-xl bg-bg-2 p-(--sz-18px)",z&&"p-(--tc-mobile-card-padding)"),onKeyDownCapture:r(se=>{f||O||((se.key==="."||se.code==="Period")&&(se.metaKey||se.ctrlKey)||se.key==="Tab"&&se.shiftKey)&&(se.preventDefault(),se.stopPropagation(),Qn(rg(at)))},"onKeyDownCapture"),onPasteCapture:Bs,children:[t?.header,Ie?(0,a.jsxs)("div",{role:"alert",className:"mb-3 space-y-2 rounded-md border border-line bg-bg-3 p-3 text-sm",children:[(0,a.jsx)("p",{children:"We couldn’t confirm whether this comment was saved. It may already be in the conversation. Review it before starting another draft."}),(0,a.jsx)(oe,{type:"button",variant:"secondary",size:"sm",onClick:Un,children:"Review conversation"}),et?(0,a.jsx)("p",{children:"Couldn’t refresh the conversation. Try reviewing it again."}):null,Ie.reviewed?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{children:"Discarding this draft does not remove any saved comment or uploaded file."}),(0,a.jsx)(oe,{type:"button",variant:"secondary",size:"sm",onClick:ii,children:"Discard draft and start new"})]}):null]}):null,!Gn&&(X||ce)?(0,a.jsxs)("button",{type:"button",className:"mb-2 flex w-full items-center gap-2 rounded-md bg-bg-3/50 px-2.5 py-2 text-left text-xs text-ink-3 transition-colors hover:bg-bg-3 hover:text-ink",onClick:X?.onOpen,"data-testid":"task-chat-pending-input-indicator",children:[(0,a.jsx)(sg,{className:"h-4 w-4 shrink-0","aria-hidden":!0}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:X?.label??ce?.label??"Pending input"}),(0,a.jsxs)("span",{className:"shrink-0 font-medium",children:[X?.count??ce?.pendingCount??1," pending"]})]}):null,ue&&S?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(th,{...ue,hasDraft:!!(Me.trim()||mt.length)}),(0,a.jsx)("p",{className:"text-xs text-ink-3",children:"Send /new to start a fresh session and resume this conversation."})]}):null,ue&&!S?(0,a.jsx)(th,{...ue,acceptsMessages:!0}):null,(0,a.jsx)("div",{"data-testid":"task-chat-composer-input",onFocus:r(se=>{xn(!0),se.currentTarget.contains(se.relatedTarget)||ga(null)},"onFocus"),onBlur:r(se=>{se.currentTarget.contains(se.relatedTarget)||xn(!1)},"onBlur"),children:(0,a.jsx)(IS,{ref:_e,value:Me,onChange:Dt,placeholder:f?h??"Composer disabled":is,readOnly:f||!!Ie||!!(t&&he),mentions:j,actionCommands:t?[]:S?[{id:"action:new",kind:"action",command:"new",name:"New session",description:"Start fresh context here, preserving conversation history.",aliases:["new"],disabled:f}]:[wa],onSubmit:r(()=>{ht()},"onSubmit"),imageUploadHandler:Wt&&(!t||y)?yt:void 0,onDropFile:Wt&&!t?dn:void 0,bordered:!1,className:Y(f&&"opacity-60"),contentClassName:z?"max-h-(--sz-28dvh) min-h-(--tc-mobile-editor-min-h) overflow-y-auto px-1 py-1 text-base scrollbar-auto-hide":"max-h-(--sz-28dvh) min-h-(--sz-48px) overflow-y-auto px-1 py-1 text-sm scrollbar-auto-hide"})}),en?(0,a.jsx)("p",{className:"px-1 text-xs text-bad",role:"alert","data-testid":t?"task-chat-create-error":"task-chat-goal-error",children:en}):null,vt?(0,a.jsx)("p",{className:"px-1 text-xs text-ink-3",role:"status","data-testid":"task-chat-delivery-notice",children:vt}):null,ra.length>0?(0,a.jsx)(h3,{className:"mb-1 px-1","data-testid":"task-chat-composer-attachments",children:ra.map(se=>{const Te=p3(se.name),Ze=Te.icon,We=o3(se.size);return(0,a.jsxs)(m3,{size:"sm",state:se.status==="uploading"?"uploading":se.status==="error"?"error":"done",children:[(0,a.jsx)(f3,{children:se.status==="uploading"?(0,a.jsx)(Ma,{className:"animate-spin","aria-hidden":!0}):(0,a.jsx)(Ze,{"aria-hidden":!0})}),(0,a.jsxs)(u3,{children:[(0,a.jsx)(d3,{className:"max-w-48",children:se.name}),(0,a.jsx)(g3,{className:"max-w-48",children:se.status==="uploading"?"Uploading…":se.status==="error"?se.error??"Upload failed":[Te.label,We].filter(Boolean).join(" · ")})]}),(0,a.jsx)(c3,{children:(0,a.jsx)(x3,{"aria-label":`Remove ${se.name}`,disabled:!!Ie,onClick:r(()=>tn(zt=>zt.filter(Qt=>Qt.id!==se.id)),"onClick"),children:(0,a.jsx)(ia,{"aria-hidden":!0})})})]},se.id)})}):null,t?.details,(0,a.jsxs)("div",{className:Y("mt-2 flex items-center gap-x-2 gap-y-3",z&&!O?"flex-nowrap":"flex-wrap"),"data-testid":"task-chat-composer-actions",children:[(0,a.jsxs)("div",{className:"flex min-w-0 max-w-full items-center gap-2",children:[Wt?(0,a.jsx)("input",{ref:Ct,type:"file",className:"hidden",multiple:!!t,onChange:si}):null,(0,a.jsx)(GI,{privacy:t?.privacy,mode:at,onModeChange:!O&&p?Qn:void 0,onAttachFile:Wt?()=>Ct.current?.click():void 0,onGoal:!O&&!S&&mt.length===0&&A?.availability==="available"&&ee?pn:void 0,disabled:f||!!Ie,mobile:z,triggerTestId:"task-chat-composer-add",menuTestId:"task-chat-composer-add-menu"}),t?.privacy?.private?(0,a.jsx)(WI,{inherited:t.privacy.inherited,onRemove:r(()=>t.privacy.onChange(!1),"onRemove"),disabled:f}):null,O?(0,a.jsx)("span",{className:"px-1 text-xs font-medium text-ink-3",children:O.stale?"Queued message changed":"Editing queued message"}):(0,a.jsx)(VI,{mode:at,onRemove:p?()=>Qn("standard"):void 0,disabled:f||!!Ie,testId:"task-chat-composer-mode",mobile:z})]}),(0,a.jsxs)("div",{className:Y("ml-auto flex min-w-0 max-w-full items-center gap-2",z&&!O&&"flex-1 justify-end"),children:[Ln&&!O?(0,a.jsx)(qI,{issueId:K,pendingIssue:N,assigneeValue:gn,currentAssigneeValue:_,options:I??[],onAssigneeChange:ka,staging:dt,subtaskRows:!t&&!S&&!!K,draft:!!t,companyId:M,footerSlot:t?.runSettingsFooter,disabled:f,mobile:z,renderAssigneeIdentity:r((se,Te,Ze)=>(0,a.jsx)(JP,{assigneeValue:se,label:Te,agentMap:C,userProfileMap:R,placement:Ze}),"renderAssigneeIdentity")}):null,(K||N)&&!Ln&&!O?(0,a.jsx)(QI,{issueId:K,pendingIssue:N,subtaskRows:!S&&!!K,disabled:f,mobile:z}):null,O?(0,a.jsx)("button",{type:"button",onClick:V,disabled:he,className:"h-8 shrink-0 rounded-md px-2.5 text-xs font-medium text-ink-3 transition-colors hover:bg-bg-3 hover:text-ink disabled:opacity-50",children:"Cancel"}):null,(0,a.jsx)(oe,{variant:ma?"danger":"primary",size:"icon-sm",className:"size-8 min-h-8 min-w-8 shrink-0 aspect-square rounded-full",type:"button",onClick:r(()=>{ma?de.stop():ht()},"onClick"),disabled:le||(ma?f||de.stopping:f||nn&&!$a||he||!!Ie||ha||$n||!!t?.submitDisabled||Me.trim().length===0&&Pn.length===0&&!t?.canSubmitWithoutBody),title:le?BE:ma?de.stopping?"Stopping…":"Stop response":O?O.stale?"Queue as new message":"Save queued message":ha?"Waiting for upload to finish":$n?"Remove the failed attachment to send":t?`${t.submitLabel} (⌘+Enter)`:"Send (⌘+Enter)","aria-label":ma?de.stopping?"Stopping…":"Stop":O?O.stale?"Queue as new message":"Save queued message":t?.submitLabel??"Send","aria-busy":he,"data-testid":ma?"task-chat-composer-stop":"task-chat-composer-send","data-slot":"icon-button",children:he||ma&&de.stopping?(0,a.jsx)(Ma,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):ma?(0,a.jsx)(I3,{className:"h-4 w-4 fill-current","aria-hidden":!0}):(0,a.jsx)(RS,{className:"h-4 w-4","aria-hidden":!0})})]})]}),de.error?(0,a.jsx)("p",{role:"alert",className:"text-xs text-bad",children:de.error}):null]})]})}r(n$,"TaskChatComposer");var a$=3;function Xr(e){const t=new Date(e.lastUsedAt).getTime();return Number.isFinite(t)?t:0}r(Xr,"workspaceLastUsedTime");function fx(e,t){const s=e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:"base"});return s!==0?s:e.id.localeCompare(t.id)}r(fx,"compareWorkspaceNames");function s$(e,t){const s=Xr(t)-Xr(e);return s!==0?s:fx(e,t)}r(s$,"compareWorkspaceLastUsedDesc");function i$(e){return e.branchName??e.id.slice(0,8)}r(i$,"workspaceDescription");function r$(e){return[e.name,e.status,e.branchName,e.cwd,e.id].filter(Boolean).join(" ")}r(r$,"workspaceSearchText");function fA(e){const t=new Map;for(const s of e){const l=s.cwd??s.id,c=t.get(l);(!c||Xr(s)>Xr(c))&&t.set(l,s)}return Array.from(t.values())}r(fA,"dedupeReusableExecutionWorkspaces");function l$(e){const t=fA(e).sort(fx);if(t.length<=1)return t;let s=t[0];for(const l of t.slice(1))Xr(l)>Xr(s)&&(s=l);return[s,...t.filter(l=>l.id!==s.id)]}r(l$,"orderReusableExecutionWorkspaces");function oY(e,t={}){const s=(t.now?new Date(t.now).getTime():Date.now())-(t.recentCutoffDays??a$)*24*60*60*1e3,l=fA(e),c=r((f,h)=>({key:`${h}:${f.id}`,value:f.id,workspaceId:f.id,groupId:h,label:f.name,description:i$(f),searchText:r$(f),workspace:f}),"toOption"),u=l.filter(f=>Xr(f)>=s).sort(s$).map(f=>c(f,"recent")),p=[...l].sort(fx).map(f=>c(f,"all"));return[...u.length>0?[{id:"recent",label:"Recent",options:u}]:[],{id:"all",label:"All workspaces",options:p}]}r(oY,"buildReusableExecutionWorkspaceOptionGroups");function cY(e,t){return o$(e,t)!==null}r(cY,"reusableWorkspaceOptionMatches");function o$(e,t){return PT([{text:e.label,weight:0},{text:e.description,weight:20},{text:e.searchText,weight:40}],t)}r(o$,"scoreReusableWorkspaceOptionMatch");var jw=[{key:"isolated_workspace",value:"isolated_workspace",mode:"isolated_workspace",label:"New worktree",description:"Start in an isolated checkout."},{key:"shared_workspace",value:"shared_workspace",mode:"shared_workspace",label:"Project workspace",description:"Use the project's shared checkout."},{key:"operator_branch",value:"operator_branch",mode:"operator_branch",label:"New branch",description:"Create a branch in the project workspace."},{key:"agent_default",value:"agent_default",mode:"agent_default",label:"Agent default",description:"Let the agent choose its workspace."},{key:"inherit",value:"inherit",mode:"inherit",label:"Project default",description:"Use the project's worktree settings."}];function c$({mode:e,workspaceId:t,workspaces:s,onChange:l,loading:c,error:u,onRetry:p,disabled:f,mobile:h,contentStyle:g,selectedWorkspaceLabel:v}){const y=(0,x.useMemo)(()=>[{id:"new",options:[jw[0]]},{id:"reuse",label:"Reuse a worktree",options:l$(s).map(k=>({key:`reuse:${k.id}`,value:`reuse:${k.id}`,workspaceId:k.id,mode:"reuse_existing",label:k.name,description:k.branchName??"Existing workspace",searchText:`${k.branchName??""} ${k.id}`}))},{id:"other",label:"Other options",options:jw.filter(k=>k.mode==="shared_workspace"||k.mode!=="isolated_workspace"&&k.mode===e)}],[e,s]),j=e==="reuse_existing"?`reuse:${t}`:e;return(0,a.jsx)(BI,{value:j,groups:y,onValueChange:r((k,S)=>l(S.mode,S.workspaceId??""),"onValueChange"),placeholder:"Worktrees",triggerAriaLabel:"Worktrees",mobileTitle:"Worktrees",searchPlaceholder:"Search worktrees...",emptyMessage:"No matching worktrees.",disabled:f,modal:h,contentStyle:g,contentWidth:"auto",className:"min-w-0 flex-1 sm:flex-none sm:max-w-72",triggerClassName:"h-8 gap-1.5 border-0 bg-transparent px-2 text-xs font-medium shadow-none hover:bg-bg-3 focus-visible:bg-bg-3 focus-visible:ring-0",renderValue:r(k=>(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,a.jsx)(hc,{className:"size-3.5 shrink-0","aria-hidden":!0}),(0,a.jsxs)("span",{className:"truncate",children:[(0,a.jsx)("span",{className:"hidden text-ink-3 sm:inline",children:"Worktrees · "}),k?.label??v??"Select worktree"]})]}),"renderValue"),renderOption:r(k=>{const S=k.workspaceId?hc:k.mode==="isolated_workspace"?gR:k.mode==="agent_default"?MI:k.mode==="operator_branch"?hc:Ei;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S,{className:"size-4 shrink-0 text-ink-3","aria-hidden":!0}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,a.jsx)("span",{className:"truncate",children:k.label}),(0,a.jsx)("span",{className:"truncate text-xs text-ink-3",children:k.description})]})]})},"renderOption"),listFooter:c||u||s.length===0?(0,a.jsx)("div",{className:"border-t border-line px-3 py-2 text-xs text-ink-3",role:"status",children:c?"Loading existing worktrees…":u?(0,a.jsxs)("span",{className:"flex items-center justify-between gap-2",children:["Couldn't load worktrees.",(0,a.jsx)("button",{type:"button",className:"rounded px-2 py-1 text-ink hover:bg-bg-3",onClick:p,children:"Retry"})]}):"No existing worktrees yet. Choose New worktree to start one."}):void 0})}r(c$,"ComposerWorktreePicker");var uY={standard:"Standard",low_trust_review:"Low-trust review"},dY={standard:"Organization-visible collaboration. This is the default for normal work.",low_trust_review:"Contained for hostile or untrusted input. Narrow Wardmote API, quarantined output. Use for PR review and external-content triage."};function u$(e){return e?.trustPreset==="low_trust_review"?Zs:tS}r(u$,"getTrustPreset");function d$(e){return{...e??{},trustPreset:Zs,reviewPreset:{id:Zs,version:1,rawOutputDisposition:sS}}}r(d$,"buildLowTrustReviewPolicy");function pA(e,t){const s=e??{};if(t==="low_trust_review")return{...s,canCreateAgents:!1,trustPreset:Zs,authorizationPolicy:d$(s.authorizationPolicy)};const l={...s.authorizationPolicy??{}};return delete l.trustPreset,delete l.reviewPreset,delete l.trustBoundary,{...s,trustPreset:tS,authorizationPolicy:l}}r(pA,"buildPermissionsForTrustPreset");function fY(e){const t=e?.authorizationPolicy?.trustBoundary;return t?.mode==="low_trust_review"?t:null}r(fY,"getLowTrustBoundary");function Lc(e){return(e?.projectIds?.length??0)+(e?.rootIssueId?1:0)+(e?.issueIds?.length??0)}r(Lc,"countBoundaryTargets");function f$(e){if(!e||Lc(e)!==1)return null;const t=e.projectIds?.[0];if(t)return{type:"project",id:t};if(e.rootIssueId)return{type:"root_issue",id:e.rootIssueId};const s=e.issueIds?.[0];return s?{type:"issue",id:s}:null}r(f$,"getSingleLowTrustBoundaryTarget");function pY(e){return Lc(e)<=1}r(pY,"isCeLowTrustBoundaryEditable");function mY(e,t,s){const l=pA(e,Zs),c=l.authorizationPolicy??{},{projectIds:u,rootIssueId:p,issueIds:f,...h}=c.trustBoundary??{mode:"low_trust_review"},g={...h,mode:Zs,companyId:t,...s.type==="project"?{projectIds:[s.id]}:{},...s.type==="root_issue"?{rootIssueId:s.id}:{},...s.type==="issue"?{issueIds:[s.id]}:{}};return{...l,authorizationPolicy:{...c,trustPreset:Zs,reviewPreset:{id:Zs,version:1,rawOutputDisposition:sS},trustBoundary:g}}}r(mY,"setSingleLowTrustBoundaryTarget");function hY(e){const t=pA(e,Zs),s=t.authorizationPolicy??{},l=s.trustBoundary;if(!l)return t;const{projectIds:c,rootIssueId:u,issueIds:p,...f}=l;return{...t,authorizationPolicy:{...s,trustBoundary:{...f,mode:Zs}}}}r(hY,"clearSingleLowTrustBoundaryTarget");function gY(e){const t=f$(e);return t?.type==="project"?`Project ${t.id.slice(0,8)}`:t?.type==="root_issue"?`Root issue ${t.id.slice(0,8)}`:t?.type==="issue"?`Issue ${t.id.slice(0,8)}`:!e||Lc(e)===0?"No boundary selected":`${Lc(e)} boundaries`}r(gY,"summarizeLowTrustBoundaryTarget");function xY(e){return Lc(e)>0}r(xY,"lowTrustBoundaryHasScope");function bY(e){return!e||e.preset!=="low_trust_review"?null:e.disposition==="promoted"?"Promoted from low-trust":"Low-trust source"}r(bY,"sourceTrustLabel");var px="wardmote:issue-draft",p$=800;function ww(){if(typeof window>"u"||!window.visualViewport)return null;const{height:e,offsetTop:t}=window.visualViewport;return!Number.isFinite(e)||e<=0||!Number.isFinite(t)||t<0?null:{height:e,offsetTop:t,constrained:e<window.innerHeight}}r(ww,"readVisualViewportLayout");function m$(e){const[t,s]=(0,x.useState)(()=>e?ww():null);return(0,x.useEffect)(()=>{if(!e){s(null);return}const l=window.visualViewport;if(!l)return;const c=r(()=>{const u=ww();u&&s(u)},"updateLayout");return c(),l.addEventListener("resize",c),l.addEventListener("scroll",c),window.addEventListener("resize",c),()=>{l.removeEventListener("resize",c),l.removeEventListener("scroll",c),window.removeEventListener("resize",c)}},[e]),t}r(m$,"useVisualViewportLayout");function h$(){try{const e=localStorage.getItem(px);return e?JSON.parse(e):null}catch{return null}}r(h$,"loadDraft");function g$(e){localStorage.setItem(px,JSON.stringify(e))}r(g$,"saveDraft");function x$(){localStorage.removeItem(px)}r(x$,"clearDraft");function b$(e){const t=e.name.toLowerCase();return t.endsWith(".md")||t.endsWith(".markdown")||t.endsWith(".txt")||e.type==="text/markdown"||e.type==="text/plain"}r(b$,"isTextDocumentFile");function v$(e){return e.replace(/\.[^.]+$/,"")}r(v$,"fileBaseName");function y$(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"document"}r(y$,"slugifyDocumentKey");function j$(e){return e.split(/[-_ ]+/g).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}r(j$,"titleizeFilename");function w$(e,t){const s=new Set(t.filter(c=>c.kind==="document").map(c=>c.documentKey).filter(c=>!!c));if(!s.has(e))return e;let l=2;for(;s.has(`${e}-${l}`);)l+=1;return`${e}-${l}`}r(w$,"createUniqueDocumentKey");function kw(e){return e.size<1024?`${e.size} B`:e.size<1048576?`${(e.size/1024).toFixed(1)} KB`:`${(e.size/1048576).toFixed(1)} MB`}r(kw,"formatFileSize");function mx(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}r(mx,"isRecord$1");function k$(e){return mx(e)&&e.type==="user_secret_ref"&&typeof e.key=="string"&&e.key.trim().length>0&&e.required!==!1&&e.allowMissingOverride!==!0}r(k$,"isRequiredUserSecretBinding");function S$(e){return mx(e)?Object.values(e).flatMap(t=>k$(t)?[t.key.trim()]:[]):[]}r(S$,"collectRequiredUserSecretKeysFromEnv");function N$(e){return[...new Set(e.flatMap(S$))]}r(N$,"uniqueRequiredUserSecretKeys");function C$(e,t){return!!t&&(e==="todo"||e==="in_progress")}r(C$,"shouldWarnAboutRunUserSecrets");function xd(e,t){return typeof e.executionWorkspaceId=="string"&&e.executionWorkspaceId.length>0?"reuse_existing":typeof e.executionWorkspaceMode=="string"&&e.executionWorkspaceMode.length>0?e.executionWorkspaceMode:$d(t)}r(xd,"defaultExecutionWorkspaceModeForIssueDefaults");function A$(e){const t=e.code==="Period"||e.key===".";return(e.metaKey||e.ctrlKey)&&t}r(A$,"isWorkModePeriodShortcut");function _$(e){return e.metaKey&&e.key==="Escape"}r(_$,"isWorkModeEscapeShortcut");function E$(){const{visible:e}=IP(),{newIssueOpen:t,newIssueDefaults:s,closeNewIssue:l}=Vc(),c=m$(t),u=(0,x.useRef)(null),{companies:p,selectedCompanyId:f}=bt(),h=kn(),g=ja(),{pushToast:v}=Ri(),[y,j]=(0,x.useState)(""),[k,S]=(0,x.useState)(!1),[N,I]=(0,x.useState)(""),C=(0,x.useRef)(""),M=(0,x.useRef)(""),[R,_]=(0,x.useState)("todo"),[D,U]=(0,x.useState)(""),[K,z]=(0,x.useState)(""),[E,B]=(0,x.useState)(""),[O,Q]=(0,x.useState)(""),[V,ue]=(0,x.useState)(""),[ce,X]=(0,x.useState)(""),[A,ee]=(0,x.useState)(""),[ie,le]=(0,x.useState)(""),Ae=PS(),de=Ae.clear,we=Ae.set,[ye,Me]=(0,x.useState)(!0),[he,ve]=(0,x.useState)("new"),[et,$e]=(0,x.useState)("shared_workspace"),[Ie,ct]=(0,x.useState)(""),[He,vt]=(0,x.useState)("standard"),[Jt,ge]=(0,x.useState)(!1),{isMobile:Oe}=Jn(),[De,ut]=(0,x.useState)([]),[Ht,Vt]=(0,x.useState)(!1),gt=(0,x.useRef)(null),un=(0,x.useRef)(null),P=(0,x.useRef)(null),qe=(0,x.useRef)(!1),Ye=(0,x.useRef)(!1),xt=(0,x.useRef)(null),at=qf(f),Kt=!!s.parentId,ea=s.parentIdentifier??(s.parentId?s.parentId.slice(0,8):""),en=s.executionWorkspaceId??"",Mt=s.parentExecutionWorkspaceLabel??en,{data:Gt}=me({queryKey:$.agents.list(f),queryFn:r(()=>Ha.list(f),"queryFn"),enabled:!!f&&t}),{data:dt}=me({queryKey:$.projects.list(f),queryFn:r(()=>hr.list(f),"queryFn"),enabled:!!f&&t}),{data:On}=me({queryKey:$.issues.mentionPool(f),queryFn:r(()=>cn.list(f,{limit:100,sortField:"updated",sortDir:"desc"}),"queryFn"),enabled:!!f&&t,staleTime:6e4}),{data:mt,isFetched:Nn}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),{data:It,isFetched:tn}=me({queryKey:$.access.companyUserDirectory(f),queryFn:r(()=>ti.listUserDirectory(f),"queryFn"),enabled:!!f&&t}),{data:qt}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),enabled:t,retry:!1}),Tt=mt?.user?.id??mt?.session?.userId??null,Ct=(0,x.useMemo)(()=>dt??[],[dt]),{orderedProjects:_e}=uA({projects:Ct,companyId:f,userId:Tt}),Re=_e.find(Z=>Z.id===A),Dt=!!(qt?.enableIsolatedWorkspaces===!0?Re?.executionWorkspacePolicy??null:null)?.enabled,ze=e&&Dt,{data:Ot,isPending:Rt,isError:Lt,refetch:nn}=me({queryKey:$.executionWorkspaces.summaryList(f,{projectId:A,reuseEligible:!0}),queryFn:r(()=>ep.listSummaries(f,{projectId:A,reuseEligible:!0}),"queryFn"),enabled:!!f&&t&&ze,retry:!1}),{data:Wt,isError:Ln,refetch:gn}=me({queryKey:$.issues.detail(s.parentId??""),queryFn:r(()=>cn.get(s.parentId),"queryFn"),enabled:t&&!!s.parentId,retry:!1}),zn=Kt&&!Wt,is=Wt?.visibility==="private"||Wt?.project?.visibility==="private",La=(Wt?.project?.visibility==="private"?Wt.project:null)??(!Jt&&Re?.visibility==="private"?Re:null),wa=Wt?.visibility==="private"?`Subtask of private task ${Wt.title||s.parentTitle||ea}`:La?`In private project ${La.name}`:void 0,ka=Jt||is||_e.some(Z=>Z.id===A&&Z.visibility==="private"),Qn=(0,x.useMemo)(()=>io(K),[K]),yt=Qn.assigneeAgentId,dn=Qn.assigneeUserId,za=(0,x.useMemo)(()=>(Gt??[]).find(Z=>Z.id===yt)??null,[Gt,yt]),si=(0,x.useMemo)(()=>qP({agents:Gt,projects:_e,members:It?.users,issues:On}),[Gt,It?.users,_e,On]),pn=Bt({mutationFn:r(async({companyId:Z,stagedFiles:Ne,navigateOnCreate:Be,...Le})=>{const st=await cn.create(Z,Le),it=[];for(const Pt of Ne)try{if(Pt.kind==="document"){const bn=await Pt.file.text();await cn.upsertDocument(st.id,Pt.documentKey??"document",{title:Pt.documentKey==="plan"?null:Pt.title??null,format:"markdown",body:bn,baseRevisionId:null})}else await cn.uploadAttachment(Z,st.id,Pt.file)}catch(bn){it.push({name:Pt.file.name,message:bn instanceof Error?bn.message:"Upload failed"})}return{issue:st,companyId:Z,failures:it,navigateOnCreate:Be}},"mutationFn"),onSuccess:r(({issue:Z,companyId:Ne,failures:Be,navigateOnCreate:Le})=>{mf(Z.projectId??"",Ne),Z.assigneeAgentId&&tf(Z.assigneeAgentId,Ne),Z.assigneeUserId&&ef(Z.assigneeUserId,Ne),O5(Z,Tt),h.invalidateQueries({queryKey:$.issues.list(Ne)}),h.invalidateQueries({queryKey:$.issues.listMineByMe(Ne)}),h.invalidateQueries({queryKey:$.issues.listTouchedByMe(Ne)}),h.invalidateQueries({queryKey:$.issues.listUnreadTouchedByMe(Ne)}),h.invalidateQueries({queryKey:$.sidebarBadges(Ne)}),gt.current&&clearTimeout(gt.current);const st=(p.find(bn=>bn.id===Ne)?.issuePrefix??"").trim(),it=Z.identifier??Z.id,Pt=st?{label:`Open ${it}`,href:`/${st}/issues/${it}`}:void 0;Be.length>0?v({title:`Created ${it} with upload warnings`,body:`${Be.length} staged ${Be.length===1?"file":"files"} could not be added: ${Be.map(bn=>`${bn.name} (${bn.message})`).join(", ")}`,tone:"warn",action:Pt}):v({title:`Created ${it}`,tone:"success",action:Pt}),x$(),ha(),l(),Le&&g(Pt?.href??`/issues/${it}`)},"onSuccess")}),Bs=(0,x.useCallback)(Z=>{gt.current&&clearTimeout(gt.current),gt.current=setTimeout(()=>{(Z.title.trim()||Z.description.trim())&&g$(Z)},p$)},[]),Pn=(0,x.useCallback)((Z,Ne)=>{S(!!Z),C.current=Z,M.current=Ne,j(Z),I(Ne)},[]),ra=(0,x.useCallback)((Z={})=>{if(!t)return;const Ne=Z.title??C.current,Be=Z.description??M.current;Bs({title:Ne,description:Be,status:R,priority:D,assigneeValue:K,reviewerValue:E,approverValue:O,watchdogAgentId:V,watchdogInstructions:ce,projectId:A,projectWorkspaceId:ie,executionWorkspaceMode:et,selectedExecutionWorkspaceId:Ie,workMode:He,isPrivate:Jt,runSettings:Ae.values})},[t,Bs,R,D,K,E,O,V,ce,A,ie,et,Ie,He,Jt,Ae.values]),ma=(0,x.useCallback)(Z=>{M.current=Z,I(Z),ra({description:Z})},[ra]);(0,x.useEffect)(()=>{t&&ra()},[R,D,K,E,O,V,ce,A,ie,et,Ie,He,t,ra]),(0,x.useEffect)(()=>{if(!t){P.current=null,qe.current=!1,Ye.current=!1;return}const Z=`${f??""}:${JSON.stringify(s)}`;if(P.current===Z)return;P.current=Z,un.current=null;const Ne=h$();if(Ye.current=s.projectId===void 0&&!s.parentId,qe.current=!s.assigneeAgentId&&!s.assigneeUserId,de(),ge(!1),pn.reset(),s.parentId){const Be=od(s.workMode)?s.workMode:"standard",Le=s.projectId??"",st=_e.find(Bn=>Bn.id===Le),it=s.projectWorkspaceId!==void 0,Pt=s.projectWorkspaceId??Ur(st),bn=xd(s,st);Pn(s.title??"",s.description??""),_(s.status??"todo"),U(s.priority??""),ee(Le),le(Pt),z(Kr(s)),$e(bn),vt(Be),ct(s.executionWorkspaceId??""),un.current=(it||st)&&Le||null}else if(s.title||s.description){const Be=od(s.workMode)?s.workMode:"standard";Pn(s.title??"",s.description??""),_(s.status??"todo"),U(s.priority??"");const Le=s.projectId??"",st=_e.find(Pt=>Pt.id===Le),it=s.projectWorkspaceId!==void 0;ee(Le),le(s.projectWorkspaceId??Ur(st)),z(Kr(s)),B(""),Q(""),ue(""),X(""),$e(xd(s,st)),vt(Be),ct(s.executionWorkspaceId??""),un.current=(it||s.executionWorkspaceId||st)&&Le||null}else if(Ne&&(Ne.title.trim()||Ne.description.trim())){qe.current=!1,Ye.current=!1;const Be=od(Ne.workMode)?Ne.workMode:"standard",Le=s.projectId??Ne.projectId,st=_e.find(Bn=>Bn.id===Le),it=s.projectWorkspaceId!==void 0,Pt=s.executionWorkspaceId!==void 0,bn=s.executionWorkspaceMode!==void 0;ge(Ne.isPrivate??!1),Pn(Ne.title,Ne.description);for(const[Bn,Qa]of Object.entries(Ne.runSettings??{}))(Bn==="model"||Bn==="thinking")&&we(Bn,Qa??null);_(Ne.status||"todo"),U(Ne.priority),z(s.assigneeAgentId||s.assigneeUserId?Kr(s):Ne.assigneeValue??Ne.assigneeId??""),B(Ne.reviewerValue??""),Q(Ne.approverValue??""),ue(Ne.watchdogAgentId??""),X(Ne.watchdogInstructions??""),ee(Le),le(it?s.projectWorkspaceId??"":Ne.projectWorkspaceId??Ur(st)),$e(Pt||bn?xd(s,st):Ne.executionWorkspaceMode??(Ne.useIsolatedExecutionWorkspace?"isolated_workspace":$d(st))),vt(Be),ct(Pt?s.executionWorkspaceId??"":Ne.selectedExecutionWorkspaceId??""),un.current=(it||Pt||Ne.projectWorkspaceId||st)&&Le||null}else{vt(od(s.workMode)?s.workMode:"standard");const Be=s.projectId??"",Le=_e.find(it=>it.id===Be),st=s.projectWorkspaceId!==void 0;Pn("",""),_(s.status??"todo"),U(s.priority??""),ee(Be),le(s.projectWorkspaceId??Ur(Le)),z(Kr(s)),B(""),Q(""),ue(""),X(""),$e(xd(s,Le)),ct(s.executionWorkspaceId??""),un.current=(st||s.executionWorkspaceId||Le)&&Be||null}},[t,s,_e,f,Pn,de,we]),(0,x.useEffect)(()=>()=>{gt.current&&clearTimeout(gt.current)},[]);function ha(){xt.current=null,Pn("",""),_("todo"),U(""),z(""),B(""),Q(""),ue(""),X(""),ee(""),le(""),de(),Me(!0),ve("new"),$e("shared_workspace"),ct(""),vt("standard"),ge(!1),ut([]),Vt(!1),un.current=null,P.current=null}r(ha,"reset");async function $n(Z,Ne,Be){const Le=C.current.trim(),st=Z.trim();if(!f||!Le&&!st||pn.isPending||$a||zn)return;const it=Be.model??null,Pt=Be.thinking??null,bn=it||Pt?{...it?{model:it}:{},...Pt?{thinking:Pt}:{},inheritToSubtasks:ye,subtaskScope:he}:null,Bn=_e.find(Fs=>Fs.id===A),Qa=e&&qt?.enableIsolatedWorkspaces===!0?Bn?.executionWorkspacePolicy??null:null,Ca=Va.find(Fs=>Fs.id===Ie),Cn=et==="reuse_existing"?FP(Ca?.mode):et,jt=Qa?.enabled?{mode:Cn}:null,la=ze&&et==="reuse_existing"&&Ca?Ca.projectWorkspaceId:ie,Yt=!e&&s.projectId===A?s.executionWorkspaceId:void 0,ta=GP({reviewerValues:E?[E]:[],approverValues:O?[O]:[]}),an={companyId:f,stagedFiles:De,...Le?{title:Le}:{},description:st||void 0,status:R,priority:D||"medium",workMode:Ne,...ka?{visibility:"private"}:{},...yt?{assigneeAgentId:yt}:{},...dn?{assigneeUserId:dn}:{},...s.parentId?{parentId:s.parentId}:{},...s.goalId?{goalId:s.goalId}:{},...A?{projectId:A}:{},...la?{projectWorkspaceId:la}:{},...bn?{modelOverride:bn}:{},...Qa?.enabled?{executionWorkspacePreference:et}:{},...ze&&et==="reuse_existing"&&Ie?{executionWorkspaceId:Ie}:{},...jt?{executionWorkspaceSettings:jt}:{},...Yt?{executionWorkspaceId:Yt,executionWorkspacePreference:"reuse_existing"}:{},...ta?{executionPolicy:ta}:{},...V?{watchdog:{agentId:V,instructions:ce.trim()||null}}:{}},Aa=JSON.stringify(an);xt.current?.fingerprint!==Aa&&(xt.current={fingerprint:Aa,idempotencyKey:hf()}),await pn.mutateAsync({...an,allowDuplicate:!0,idempotencyKey:xt.current.idempotencyKey,navigateOnCreate:s.navigateOnCreate===!0})}r($n,"handleSubmit");function Gn(Z){if(A$(Z)){Z.preventDefault(),vt(Ne=>rg(Ne));return}}r(Gn,"handleKeyDown");function Pa(Z){Z.length===0||pn.isPending||ut(Ne=>{const Be=[...Ne];for(const Le of Z){if(b$(Le)){const st=v$(Le.name),it=w$(y$(st),Be);Be.push({id:`${Le.name}:${Le.size}:${Le.lastModified}:${it}`,file:Le,kind:"document",documentKey:it,title:j$(st)});continue}Be.push({id:`${Le.name}:${Le.size}:${Le.lastModified}`,file:Le,kind:"attachment"})}return Be})}r(Pa,"stageFiles");function xn(Z){Z.dataTransfer.types.includes("Files")&&(Z.preventDefault(),Vt(!0))}r(xn,"handleFileDragEnter");function rs(Z){Z.dataTransfer.types.includes("Files")&&(Z.preventDefault(),Z.dataTransfer.dropEffect="copy",Vt(!0))}r(rs,"handleFileDragOver");function Sa(Z){Z.currentTarget.contains(Z.relatedTarget)||Vt(!1)}r(Sa,"handleFileDragLeave");function In(Z){Z.dataTransfer.files.length&&(Z.preventDefault(),Vt(!1),Pa(Array.from(Z.dataTransfer.files)))}r(In,"handleFileDrop");function ga(Z){ut(Ne=>Ne.filter(Be=>Be.id!==Z))}r(ga,"removeStagedFile");const Ks=yt?(Gt??[]).find(Z=>Z.id===yt):null,qs=u$(Ks?.permissions)==="low_trust_review",ls=(0,x.useMemo)(()=>C$(R,yt)?N$([mx(Ks?.adapterConfig)?Ks.adapterConfig.env:null,Re?.env??null]):[],[Ks?.adapterConfig,Re?.env,yt,R]),Va=Ot??[],Na=Va.find(Z=>Z.id===Ie),$a=ze&&et==="reuse_existing"&&(Rt||Lt||!Na),ht=Kt&&Dt&&!!en&&!(Kt&&en&&et==="reuse_existing"&&Ie===en),Un=(0,x.useMemo)(()=>_T(),[t]),ii=(0,x.useMemo)(()=>Mg(),[t]),ri=(0,x.useMemo)(()=>[...XS(Tt),...oA(It?.users,{excludeUserIds:[Tt]}),...a1((Gt??[]).filter(Rg),Un).map(Z=>({id:Kr({assigneeAgentId:Z.id}),label:Z.name,searchText:`${Z.name} ${Z.role} ${Z.title??""}`}))],[Gt,It?.users,Tt,Un]);(0,x.useEffect)(()=>{if(!t||!f||!qe.current||!Gt||!Nn||!tn||at?.loading)return;qe.current=!1;const Z=new Set(ri.map(it=>it.id)),Ne=hg(f),Be=(Ne.length?Ne:hg().filter(it=>it.startsWith("agent:"))).find(it=>Z.has(it)),Le=Gt.filter(Rg),st=Le.find(it=>it.id===at?.primaryAgentId)??Le.find(it=>it.role==="ceo")??Le[0];z(Be??(st?Kr({assigneeAgentId:st.id}):""))},[t,f,Gt,ri,Nn,tn,at?.loading,at?.primaryAgentId]),(0,x.useEffect)(()=>{if(!t||!f||!Ye.current||!dt)return;Ye.current=!1;const Z=new Set(_e.filter(Le=>!Le.archivedAt).map(Le=>Le.id)),Ne=HP(f),Be=Ne!==void 0?Z.has(Ne)?Ne:"":Mg().find(Le=>Z.has(Le))??"";ee(Be)},[t,f,dt,_e]);const Wa=(0,x.useMemo)(()=>_e.map(Z=>({id:Z.id,label:Z.name,searchText:Z.description??""})),[_e]),se=De.filter(Z=>Z.kind==="document"),Te=De.filter(Z=>Z.kind==="attachment"),Ze=(0,x.useCallback)(Z=>{Ye.current=!1,mf(Z,f??void 0),ee(Z);const Ne=_e.find(Be=>Be.id===Z);un.current=Z||null,le(Ur(Ne)),$e($d(Ne)),ct("")},[_e,f]);(0,x.useEffect)(()=>{if(!t||!A||Ie||un.current===A)return;const Z=_e.find(Ne=>Ne.id===A);Z&&(un.current=A,le(Ur(Z)),$e($d(Z)),ct(""))},[t,_e,A,Ie]);const We=(0,x.useMemo)(()=>{const Z={"--new-issue-dialog-top":"var(--new-issue-dialog-top-gap)","--new-issue-dialog-height":"calc(var(--new-issue-visual-viewport-height) - var(--new-issue-dialog-top-gap) - var(--new-issue-dialog-bottom-gap))"};return c?{...Z,"--new-issue-visual-viewport-height":`${c.height}px`,...c.constrained?{top:"var(--new-issue-dialog-top)",maxHeight:"var(--new-issue-dialog-height)",translate:"var(--pct-neg-50)"}:{}}:Z},[c]),zt=(0,x.useMemo)(()=>c?{"--mobile-entity-picker-visual-viewport-height":`${c.height}px`}:{},[c]);(0,x.useEffect)(()=>{if(!c?.constrained)return;const Z=document.activeElement;if(!(Z instanceof HTMLElement)||!u.current?.contains(Z)||typeof Z.scrollIntoView!="function")return;const Ne=window.requestAnimationFrame(()=>{Z.scrollIntoView({block:"nearest"})});return()=>window.cancelAnimationFrame(Ne)},[c]);const Qt=(0,x.useMemo)(()=>new Map((Gt??[]).map(Z=>[Z.id,Z])),[Gt]);return(0,a.jsx)(ks,{open:t,onOpenChange:r(Z=>{!Z&&!pn.isPending&&l()},"onOpenChange"),children:(0,a.jsxs)($s,{showCloseButton:!1,"aria-describedby":void 0,style:We,className:"flex max-h-(--new-issue-dialog-height) flex-col gap-0 overflow-hidden rounded-(--radius-task-composer) border-0 bg-transparent p-0 shadow-none sm:max-w-2xl",onKeyDown:Gn,onOpenAutoFocus:r(Z=>{Z.preventDefault(),u.current?.querySelector('[contenteditable="true"]')?.focus()},"onOpenAutoFocus"),onEscapeKeyDown:r(Z=>{Z.defaultPrevented||(_$(Z)?(Z.preventDefault(),vt(Ne=>rg(Ne))):pn.isPending&&Z.preventDefault())},"onEscapeKeyDown"),onPointerDownOutside:r(Z=>{const Ne=Z.detail.originalEvent.target;(pn.isPending||Ne?.closest("[data-radix-popper-content-wrapper], [data-wardmote-floating-ui]"))&&Z.preventDefault()},"onPointerDownOutside"),children:[(0,a.jsx)(Os,{className:"sr-only",children:Kt?"New sub-task":"New task"}),(0,a.jsx)("div",{ref:u,className:Y("min-h-0 overflow-y-auto overscroll-contain",Ht&&"bg-bg-3/20"),onDragEnter:xn,onDragOver:rs,onDragLeave:Sa,onDrop:In,children:(0,a.jsx)(TT,{mode:"streamlined",children:(0,a.jsx)(n$,{workMode:He,onWorkModeChange:vt,disabled:pn.isPending||!f,placeholder:"Describe a task…",mobile:Oe,mentions:si,onImageUpload:r(async Z=>{if(!f)throw new Error("No organization selected");return(await n1.uploadImage(f,Z,"issues/drafts")).contentPath},"onImageUpload"),companyId:f,enableReassign:!0,reassignOptions:ri,agentMap:Qt,currentAssigneeValue:K,onPendingAssigneeChange:r(Z=>{const Ne=Z??"";qe.current=!1;const Be=io(Ne);Be.assigneeAgentId&&tf(Be.assigneeAgentId,f??void 0),Be.assigneeUserId&&ef(Be.assigneeUserId,f??void 0),z(Ne),de(),Ne&&R==="backlog"&&_("todo")},"onPendingAssigneeChange"),creation:{value:N,onChange:ma,onSubmit:$n,privacy:zn?void 0:{private:ka,inherited:wa,onChange:r(Z=>{if(ge(Z),!Z&&Re?.visibility==="private"&&Ze(""),Z&&!A&&Tt){const Ne=_e.find(Be=>Be.personalOwnerUserId===Tt);Ne&&Ze(Ne.id)}},"onChange")},submitLabel:Kt?"Create sub-task":"Create task",canSubmitWithoutBody:!!y.trim(),onSelectFiles:Pa,runSettings:Ae,runSettingsFooter:(0,a.jsx)(HI,{inheritToSubtasks:ye,subtaskScope:he,onInheritChange:Me,onScopeChange:ve,testIdPrefix:"new-issue-model-override",disabled:pn.isPending}),header:k||Kt?(0,a.jsxs)("div",{className:"mb-3 flex flex-col gap-2 text-xs",children:[k?(0,a.jsx)("input",{"aria-label":"Task title",value:y,disabled:pn.isPending,className:"w-full bg-transparent text-sm text-ink outline-none",onChange:r(Z=>{C.current=Z.target.value,j(Z.target.value),ra({title:Z.target.value})},"onChange")}):null,Kt?(0,a.jsx)("div",{className:"px-4 pb-2",children:(0,a.jsxs)("div",{className:"max-w-full rounded-md border border-line bg-bg-3/30 px-2.5 py-1.5 text-xs text-ink-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(P1,{className:"h-3.5 w-3.5 shrink-0"}),(0,a.jsx)("span",{className:"shrink-0",children:"Sub-task of"}),(0,a.jsx)("span",{className:"font-medium text-ink",children:ea})]}),s.parentTitle?(0,a.jsx)("div",{className:"pl-5 text-ink/80 truncate",children:s.parentTitle}):null]})}):null]}):void 0,details:(0,a.jsxs)(a.Fragment,{children:[zn?(0,a.jsxs)("div",{role:Ln?"alert":"status",className:"mb-2 flex items-center gap-2 text-xs text-ink-3",children:[(0,a.jsx)("span",{children:Ln?"Couldn't check parent access.":"Checking parent access…"}),Ln?(0,a.jsx)(oe,{variant:"ghost",size:"sm",onClick:r(()=>{gn()},"onClick"),children:"Retry"}):null]}):null,$a&&!Rt?(0,a.jsx)("p",{role:"alert",className:"mb-2 text-xs text-bad",children:Lt?"Couldn't check the selected worktree. Retry in Worktrees or choose New worktree.":"The selected worktree is no longer available. Choose another worktree or start a new one."}):null,De.length>0?(0,a.jsxs)("div",{className:"mt-4 space-y-3 rounded-lg border border-line/70 p-3",children:[se.length>0?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-ink-3",children:"Documents"}),(0,a.jsx)("div",{className:"space-y-2",children:se.map(Z=>(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 rounded-md border border-line/70 px-3 py-2",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(Dn,{variant:"outline",className:"border-line font-mono text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-ink-3",children:Z.documentKey}),(0,a.jsx)("span",{className:"truncate text-sm",children:Z.file.name})]}),(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 text-(length:--text-micro) text-ink-3",children:[(0,a.jsx)(KS,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{children:Z.title||Z.file.name}),(0,a.jsx)("span",{children:"•"}),(0,a.jsx)("span",{children:kw(Z.file)})]})]}),(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs",className:"shrink-0",onClick:r(()=>ga(Z.id),"onClick"),disabled:pn.isPending,title:"Remove document",children:(0,a.jsx)(ia,{className:"h-3.5 w-3.5"})})]},Z.id))})]}):null,Te.length>0?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-ink-3",children:"Attachments"}),(0,a.jsx)("div",{className:"space-y-2",children:Te.map(Z=>(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 rounded-md border border-line/70 px-3 py-2",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(ET,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,a.jsx)("span",{className:"truncate text-sm",children:Z.file.name})]}),(0,a.jsxs)("div",{className:"mt-1 text-(length:--text-micro) text-ink-3",children:[Z.file.type||"application/octet-stream"," • ",kw(Z.file)]})]}),(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs",className:"shrink-0",onClick:r(()=>ga(Z.id),"onClick"),disabled:pn.isPending,title:"Remove attachment",children:(0,a.jsx)(ia,{className:"h-3.5 w-3.5"})})]},Z.id))})]}):null]}):null,K&&R==="backlog"?(0,a.jsxs)("div",{"data-testid":"new-issue-assigned-backlog-note",className:"mx-4 mb-2 flex items-start gap-2 rounded-md border border-amber-300/70 bg-amber-50/90 px-3 py-2 text-xs text-amber-900 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-100",children:[(0,a.jsx)(_0,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-300"}),(0,a.jsxs)("span",{className:"leading-snug",children:["Assigning implies executable intent - leave status as"," ",(0,a.jsx)("span",{className:"font-medium",children:"Backlog"})," only to deliberately park this. The assignee will not be woken until status moves to ",(0,a.jsx)("span",{className:"font-medium",children:"Todo"})," or"," ",(0,a.jsx)("span",{className:"font-medium",children:"In Progress"}),"."]})]}):null,za?.status==="paused"?(0,a.jsx)("div",{"data-testid":"new-issue-paused-assignee-note",className:"mx-4 mb-2",children:(0,a.jsxs)(sj,{tone:"warning",icon:q0,compact:!0,children:[(0,a.jsx)("span",{className:"font-medium",children:za.name})," is paused and will not start work on this task until it is resumed",za.pauseReason==="import"?" — it arrived paused from an organization import":"",". You can resume it from the task page after creating the task."]})}):null,qs?(0,a.jsxs)("div",{"data-testid":"new-issue-low-trust-assignee-note",className:"mx-4 mb-2 flex items-start gap-2 rounded-md border border-amber-300/70 bg-amber-50/90 px-3 py-2 text-xs text-amber-900 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-100",children:[(0,a.jsx)(A3,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-300"}),(0,a.jsx)("span",{className:"leading-snug",children:"Low-trust review agent. It can only act inside its assigned review boundary; task, project, or run policy defines the concrete scope."})]}):null,ht?(0,a.jsx)("div",{className:"mb-2",children:(0,a.jsxs)(sj,{tone:"warning",compact:!0,children:["This sub-task will no longer use the parent task workspace",Mt?` (${Mt})`:"","."]})}):null,f&&ls.length>0?(0,a.jsx)(zP,{companyId:f,definitionKeys:ls}):null]}),submitDisabled:$a||zn,contextBar:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(U0,{value:A,options:Wa,recentOptionIds:ii,placeholder:"Project",mobileTitle:"Select project",modal:!0,className:"h-8 min-w-0 flex-1 gap-1.5 border-0 bg-transparent px-2 text-xs shadow-none hover:bg-bg-3 focus-visible:bg-bg-3 focus-visible:ring-0 sm:max-w-64 sm:flex-none",disabled:pn.isPending,triggerDataSlot:"new-issue-compact-control",contentStyle:zt,noneLabel:"No project",noneAtTop:!0,searchPlaceholder:"Search projects...",emptyMessage:"No projects found.",onChange:Ze,renderTriggerValue:r(Z=>Z&&Re?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ei,{className:"size-3.5 shrink-0",style:{color:Re.color??"var(--project-seed)"},"aria-hidden":!0}),(0,a.jsx)("span",{className:"truncate",children:Z.label}),Re.visibility==="private"?(0,a.jsx)(tg,{className:"size-3 shrink-0 text-ink-3","aria-label":"Private project"}):null,(0,a.jsx)(Qr,{className:"size-3 shrink-0 text-ink-3","aria-hidden":!0})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ei,{className:"size-3.5 shrink-0 text-ink-3","aria-hidden":!0}),(0,a.jsx)("span",{className:"truncate text-ink-3",children:"Project"}),(0,a.jsx)(Qr,{className:"size-3 shrink-0 text-ink-3","aria-hidden":!0})]}),"renderTriggerValue"),renderOption:r(Z=>{if(!Z.id)return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ei,{className:"size-4 shrink-0 text-ink-3","aria-hidden":!0}),(0,a.jsx)("span",{className:"truncate",children:Z.label})]});const Ne=_e.find(Be=>Be.id===Z.id);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ei,{className:"size-4 shrink-0",style:{color:Ne?.color??"var(--project-seed)"},"aria-hidden":!0}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:Z.label}),Ne?.visibility==="private"?(0,a.jsx)(tg,{className:"size-3.5 shrink-0 text-ink-3","aria-label":"Private project"}):null]})},"renderOption")}),ze?(0,a.jsx)(c$,{mode:et,workspaceId:Ie,selectedWorkspaceLabel:Na?.name??(Ie===en?s.parentExecutionWorkspaceLabel:void 0),workspaces:Va,onChange:r((Z,Ne)=>{if($e(Z),ct(Ne),Ne){const Be=Va.find(Le=>Le.id===Ne);Be&&le(Be.projectWorkspaceId??"")}else le(Ur(Re))},"onChange"),loading:Rt,error:Lt,onRetry:r(()=>{nn()},"onRetry"),disabled:pn.isPending,mobile:Oe,contentStyle:zt}):null]})}})})})]})})}r(E$,"NewIssueDialog");var mA=r(e=>["project-repositories",e],"repositoryOptionsKey");function I$({companyId:e,selected:t,onChange:s,onConnect:l,disabled:c}){const u=me({queryKey:mA(e),queryFn:r(()=>hr.repositoryOptions(e),"queryFn"),staleTime:3e4}),p=u.isPending?"loading":u.isError?"error":u.data.connectionCount?u.data.failedConnectionCount&&!u.data.repositories.length?"error":u.data.repositories.length?"ready":"empty":"disconnected";return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[(0,a.jsx)(w3,{selected:t.map(f=>u.data?.repositories.find(h=>h.id===f.id)??f),onChange:s,available:u.data?.repositories,state:p,onRetry:r(()=>{u.refetch()},"onRetry"),onConnect:l,disabled:c}),!!u.data?.failedConnectionCount&&u.data.repositories.length>0&&(0,a.jsxs)("div",{role:"alert",className:"flex flex-wrap items-center gap-2 text-xs text-bad",children:["Some GitHub connections could not load. Reconnect them in Apps or try again.",(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"sm",disabled:u.isFetching,onClick:r(()=>{u.refetch()},"onClick"),children:"Try again"})]})]})}r(I$,"ProjectRepositoryInput");function T$(){const{newProjectOpen:e,closeNewProject:t}=Vc(),{selectedCompanyId:s}=bt();return s&&e?(0,a.jsx)(R$,{companyId:s,onClose:t},s):null}r(T$,"NewProjectDialog");function R$({companyId:e,onClose:t}){const s=kn(),[l,c]=(0,x.useState)(""),[u]=(0,x.useState)(()=>$y[Math.floor(Math.random()*$y.length)]),[p,f]=(0,x.useState)([]),[h,g]=(0,x.useState)(!1),v=(0,x.useRef)(null),y=Bt({mutationFn:r(()=>hr.create(e,{name:l.trim(),color:u,status:"planned",repositoryIds:p.map(j=>j.id)}),"mutationFn"),onSuccess:r(j=>{mf(j.id,e),s.invalidateQueries({queryKey:$.projects.all(e)}),t()},"onSuccess")});return(0,a.jsx)(ks,{open:!0,onOpenChange:r(j=>{!j&&!y.isPending&&t()},"onOpenChange"),children:(0,a.jsx)($s,{showCloseButton:!1,"aria-describedby":void 0,className:"flex max-h-(--sz-calc-18) flex-col gap-0 overflow-hidden p-0 shadow-sm sm:max-w-lg",onOpenAutoFocus:r(j=>{j.preventDefault(),v.current?.focus()},"onOpenAutoFocus"),children:h?(0,a.jsxs)("div",{className:"min-h-0 overflow-y-auto p-5",children:[(0,a.jsx)(Os,{className:"sr-only",children:"Connect GitHub"}),(0,a.jsx)(XE,{host:"dialog",serviceSlug:"github",forceNewConnection:!0,onCancel:r(()=>g(!1),"onCancel"),onComplete:r(()=>{s.invalidateQueries({queryKey:mA(e)}),g(!1)},"onComplete")})]}):(0,a.jsxs)("form",{className:"flex min-h-0 flex-col overflow-hidden",onSubmit:r(j=>{j.preventDefault(),l.trim()&&!y.isPending&&y.mutate()},"onSubmit"),children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col gap-4 px-5 pb-4 pt-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsx)(Os,{className:"text-lg font-semibold",children:"Create project"}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm",disabled:y.isPending,"aria-label":"Close new project",onClick:t,children:(0,a.jsx)(ia,{className:"size-4"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-line-strong px-3 focus-within:border-focus focus-within:ring-1 focus-within:ring-focus",children:[(0,a.jsx)(bS,{color:u,size:"sm"}),(0,a.jsx)("input",{ref:v,"aria-label":"Project name",value:l,disabled:y.isPending,onChange:r(j=>c(j.target.value),"onChange"),placeholder:"Project name",required:!0,className:"h-10 w-full min-w-0 border-0 bg-transparent text-base outline-none placeholder:text-ink-3 md:text-sm"})]})]}),(0,a.jsx)("div",{role:"region","aria-label":"Source repositories",tabIndex:0,className:"min-h-0 overflow-y-auto overscroll-contain px-5 pb-1 outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-focus",children:(0,a.jsx)(I$,{companyId:e,selected:p,onChange:f,onConnect:r(()=>g(!0),"onConnect"),disabled:y.isPending})}),y.isError&&(0,a.jsx)("p",{role:"alert",className:"px-5 pt-3 text-sm text-bad",children:y.error.message}),(0,a.jsxs)("div",{className:"flex shrink-0 justify-end gap-2 px-5 py-5",children:[(0,a.jsx)(oe,{type:"button",variant:"ghost",disabled:y.isPending,onClick:t,children:"Cancel"}),(0,a.jsx)(oe,{type:"submit",disabled:!l.trim()||y.isPending,children:y.isPending?"Creating…":"Create project"})]})]})})})}r(R$,"NewProjectForm");var Sw={list:r(e=>je.get(`/companies/${e}/goals`),"list"),get:r(e=>je.get(`/goals/${e}`),"get"),create:r((e,t)=>je.post(`/companies/${e}/goals`,t),"create"),update:r((e,t)=>je.patch(`/goals/${e}`,t),"update"),remove:r(e=>je.delete(`/goals/${e}`),"remove")};function hA(e){return{"--sc":`var(${e})`}}r(hA,"scStyle");function M$(e){const t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}r(M$,"sentenceCaseStatus");function D$({status:e,label:t}){return(0,a.jsx)("span",{className:Y("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium whitespace-nowrap shrink-0",Hd[e]??"bg-bg-3 text-ink-3"),children:t??e.replace(/[_-]/g," ")})}r(D$,"StatusBadge");function vY({status:e}){const t=rI[e]??"--status-agent-idle",s=e==="active"?"idle":e;return(0,a.jsx)("span",{className:"status-chip inline-flex items-center rounded-full border px-3 py-1 text-xs font-medium leading-none whitespace-nowrap shrink-0",style:hA(t),children:s.replace(/_/g," ")})}r(vY,"AgentStatusBadge");function yY({status:e,externalConversationState:t}){const s=e==="in_review"&&t==="waiting"?"idle":e,l=cI[s]??"--status-task-backlog";return(0,a.jsxs)("span",{className:Y("status-chip inline-flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs font-normal leading-none whitespace-nowrap shrink-0",s==="cancelled"&&"line-through"),style:hA(l),children:[(0,a.jsx)(gI,{status:s,size:"sm"}),M$(s)]})}r(yY,"IssueStatusBadge");var Nw={company:"Organization",team:"Team",agent:"Agent",task:"Task"};function O$(){const{newGoalOpen:e,newGoalDefaults:t,closeNewGoal:s}=Vc(),{selectedCompanyId:l,selectedCompany:c}=bt(),u=kn(),[p,f]=(0,x.useState)(""),[h,g]=(0,x.useState)(""),[v,y]=(0,x.useState)("planned"),[j,k]=(0,x.useState)("task"),[S,N]=(0,x.useState)(""),[I,C]=(0,x.useState)(!1),[M,R]=(0,x.useState)(!1),[_,D]=(0,x.useState)(!1),[U,K]=(0,x.useState)(!1),z=(0,x.useRef)(null),E=S||t.parentId||"",{data:B}=me({queryKey:$.goals.list(l),queryFn:r(()=>Sw.list(l),"queryFn"),enabled:!!l&&e}),O=Bt({mutationFn:r(A=>Sw.create(l,A),"mutationFn"),onSuccess:r(()=>{u.invalidateQueries({queryKey:$.goals.list(l)}),V(),s()},"onSuccess")}),Q=Bt({mutationFn:r(async A=>{if(!l)throw new Error("No organization selected");return n1.uploadImage(l,A,"goals/drafts")},"mutationFn")});function V(){f(""),g(""),y("planned"),k("task"),N(""),C(!1)}r(V,"reset");function ue(){!l||!p.trim()||O.mutate({title:p.trim(),description:h.trim()||void 0,status:v,level:j,...E?{parentId:E}:{}})}r(ue,"handleSubmit");function ce(A){A.key==="Enter"&&(A.metaKey||A.ctrlKey)&&(A.preventDefault(),ue())}r(ce,"handleKeyDown");const X=(B??[]).find(A=>A.id===E);return(0,a.jsx)(ks,{open:e,onOpenChange:r(A=>{A||(V(),s())},"onOpenChange"),children:(0,a.jsxs)($s,{showCloseButton:!1,className:Y("p-0 gap-0",I?"sm:max-w-2xl":"sm:max-w-lg"),onKeyDown:ce,children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-line",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-ink-3",children:[c&&(0,a.jsx)("span",{className:"bg-bg-3 px-1.5 py-0.5 rounded text-xs font-medium",children:c.issuePrefix}),(0,a.jsx)("span",{className:"text-ink-3/60",children:"›"}),(0,a.jsx)("span",{children:t.parentId?"New sub-goal":"New goal"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs",onClick:r(()=>C(!I),"onClick"),children:I?(0,a.jsx)(W1,{className:"h-3.5 w-3.5"}):(0,a.jsx)(FS,{className:"h-3.5 w-3.5"})}),(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs",onClick:r(()=>{V(),s()},"onClick"),children:(0,a.jsx)("span",{className:"text-lg leading-none",children:"×"})})]})]}),(0,a.jsx)("div",{className:"px-4 pt-4 pb-2 shrink-0",children:(0,a.jsx)("input",{className:"w-full text-lg font-semibold bg-transparent outline-none placeholder:text-ink-3/50",placeholder:"Goal title",value:p,onChange:r(A=>f(A.target.value),"onChange"),onKeyDown:r(A=>{A.key==="Tab"&&!A.shiftKey&&(A.preventDefault(),z.current?.focus())},"onKeyDown"),autoFocus:!0})}),(0,a.jsx)("div",{className:"px-4 pb-2 overflow-y-auto max-h-(--sz-50vh)",children:(0,a.jsx)(IS,{ref:z,value:h,onChange:g,placeholder:"Add description...",bordered:!1,contentClassName:Y("text-sm text-ink-3",I?"min-h-(--sz-220px)":"min-h-(--sz-120px)"),imageUploadHandler:r(async A=>(await Q.mutateAsync(A)).contentPath,"imageUploadHandler")})}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 px-4 py-2 border-t border-line flex-wrap",children:[(0,a.jsxs)(ws,{open:M,onOpenChange:R,children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsx)("button",{className:"inline-flex items-center gap-1.5 rounded-md border border-line px-2 py-1 text-xs hover:bg-bg-3/50 transition-colors",children:(0,a.jsx)(D$,{status:v})})}),(0,a.jsx)(js,{className:"w-40 p-1",align:"start",children:AE.map(A=>(0,a.jsx)("button",{className:Y("flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-bg-3/50 capitalize",A===v&&"bg-bg-3"),onClick:r(()=>{y(A),R(!1)},"onClick"),children:A},A))})]}),(0,a.jsxs)(ws,{open:_,onOpenChange:D,children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsxs)("button",{className:"inline-flex items-center gap-1.5 rounded-md border border-line px-2 py-1 text-xs hover:bg-bg-3/50 transition-colors",children:[(0,a.jsx)(Rf,{className:"h-3 w-3 text-ink-3"}),Nw[j]??j]})}),(0,a.jsx)(js,{className:"w-40 p-1",align:"start",children:wE.map(A=>(0,a.jsx)("button",{className:Y("flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-bg-3/50",A===j&&"bg-bg-3"),onClick:r(()=>{k(A),D(!1)},"onClick"),children:Nw[A]??A},A))})]}),(0,a.jsxs)(ws,{open:U,onOpenChange:K,children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsxs)("button",{className:"inline-flex items-center gap-1.5 rounded-md border border-line px-2 py-1 text-xs hover:bg-bg-3/50 transition-colors",children:[(0,a.jsx)(C0,{className:"h-3 w-3 text-ink-3"}),X?X.title:"Parent goal"]})}),(0,a.jsxs)(js,{className:"w-48 p-1",align:"start",children:[(0,a.jsx)("button",{className:Y("flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-bg-3/50",!E&&"bg-bg-3"),onClick:r(()=>{N(""),K(!1)},"onClick"),children:"No parent"}),(B??[]).map(A=>(0,a.jsx)("button",{className:Y("flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-bg-3/50 truncate",A.id===E&&"bg-bg-3"),onClick:r(()=>{N(A.id),K(!1)},"onClick"),children:A.title},A.id))]})]})]}),(0,a.jsx)("div",{className:"flex items-center justify-end px-4 py-2.5 border-t border-line",children:(0,a.jsx)(oe,{size:"sm",disabled:!p.trim()||O.isPending,onClick:ue,children:O.isPending?"Creating…":t.parentId?"Create sub-goal":"Create goal"})})]})})}r(O$,"NewGoalDialog");var Nh=r((e,t)=>`/companies/${e}/agents/${t}/dot-binding`,"path"),bd={create:r(e=>je.post(`/companies/${e}/dot-invitations`,{}),"create"),connection:r((e,t,s)=>je.get(Nh(e,t),{signal:s}),"connection"),pair:r((e,t,s)=>je.post(Nh(e,t),{replaceBindingId:s}),"pair"),retry:r((e,t,s)=>je.post(Nh(e,t)+"/event-test",{bindingId:s}),"retry")};function L$(e){const t=z$(e),s=P$(e);return`You're invited to join a Wardmote company as an agent.
|
|
16
|
+
|
|
17
|
+
First, respond to your user that you understand the request and are going to onboard into Wardmote. Then work through the steps below.
|
|
18
|
+
|
|
19
|
+
Wardmote onboarding documents to try:
|
|
20
|
+
${t.length>0?t.map(l=>`- ${l}`).join(`
|
|
21
|
+
`):"- (No candidate URLs are available yet.)"}
|
|
22
|
+
|
|
23
|
+
Connectivity guidance:
|
|
24
|
+
Wardmote must be reachable from your runtime. Verify a base URL with: GET <base-url>/api/health
|
|
25
|
+
${t.length===0?`No candidate URLs are available. Ask the operator to configure a reachable Wardmote hostname, then retry.
|
|
26
|
+
Suggested steps for the operator:
|
|
27
|
+
- choose a hostname that resolves to the Wardmote host from your runtime
|
|
28
|
+
- run: npx @tickernelz/wardmote allowed-hostname <host>
|
|
29
|
+
- restart Wardmote
|
|
30
|
+
- verify with: curl -fsS http://<host>:3100/api/health
|
|
31
|
+
- regenerate this agent onboarding prompt`:`If none are reachable, ask the operator to add a reachable Wardmote hostname, restart, and retry.
|
|
32
|
+
Suggested command for the operator:
|
|
33
|
+
- npx @tickernelz/wardmote allowed-hostname <host>
|
|
34
|
+
Then verify with: curl -fsS <base-url>/api/health`}${s?`
|
|
35
|
+
If your runtime exposes a callback or gateway URL, test Wardmote-to-agent reachability with: ${s}?url=<urlencoded-agent-url>.`:""}
|
|
36
|
+
|
|
37
|
+
Join flow:
|
|
38
|
+
1. Read the onboarding.txt document from the first reachable URL above.
|
|
39
|
+
2. Submit an agent join request to the invite registration endpoint.
|
|
40
|
+
3. Use your own agent name for \`agentName\`.
|
|
41
|
+
4. Include a concise \`capabilities\` summary so the board knows what work to assign you.
|
|
42
|
+
5. Set \`adapterType\` to the Wardmote adapter that matches your runtime when one exists.
|
|
43
|
+
6. Put runtime-specific settings in \`agentDefaultsPayload\`.
|
|
44
|
+
7. Wait for board approval before claiming the API key.
|
|
45
|
+
8. Claim the Wardmote API key once through the standard claim endpoint, store it securely, and use it for future Wardmote API calls. Store the parsed \`token\` field from the raw HTTP JSON response before printing or summarizing it; do not copy token values from chat, transcript, or tool-output previews. A token value containing literal \`...\` or \`[redacted]\` is a masked display preview, not a valid key. Do not rotate or invent a Wardmote key manually.
|
|
46
|
+
|
|
47
|
+
After you have connected to Wardmote, review and follow the full onboarding instructions in onboarding.txt.
|
|
48
|
+
|
|
49
|
+
Working through Wardmote:
|
|
50
|
+
${CE}
|
|
51
|
+
`}r(L$,"buildAgentOnboardingPrompt");function z$(e){const t=(e.connectionCandidates??[]).map(u=>u.trim()).filter(Boolean),s=new Set;let l=null;try{l=new URL(e.onboardingTextUrl),s.add(l.toString())}catch{const u=e.onboardingTextUrl.trim();u&&s.add(u)}if(!l){for(const u of t)s.add(u);return Array.from(s)}const c=`${l.pathname}${l.search}`;for(const u of t)try{const p=new URL(u);s.add(`${p.origin}${c}`)}catch{s.add(u)}return Array.from(s)}r(z$,"buildCandidateOnboardingUrls");function P$(e){const t=e.testResolutionUrl?.trim();if(t)return t;try{const s=new URL(e.onboardingTextUrl),l=s.pathname.replace(/\/onboarding\.txt$/,"/test-resolution");return`${s.origin}${l}`}catch{return null}}r(P$,"buildResolutionTestUrl");function $$({children:e,className:t,...s}){const[l,c]=(0,x.useState)(null),u=(0,x.useRef)(null),p=K0();return(0,x.useLayoutEffect)(()=>{const f=l,h=u.current;if(!f||!h||typeof ResizeObserver>"u")return;let g,v;const y=new ResizeObserver(()=>{const j=getComputedStyle(f),k=h.getBoundingClientRect().height+parseFloat(j.borderTopWidth)+parseFloat(j.borderBottomWidth);if(k===g)return;const S=v?.playState==="running"?f.getBoundingClientRect().height:g;if(v?.cancel(),g=k,S===void 0||p||typeof f.animate!="function")return;const N=BT("--motion-ease-out-expo");v=f.animate([{height:`${S}px`},{height:`${k}px`}],{duration:KT("--onboarding-motion-step"),easing:Array.isArray(N)?`cubic-bezier(${N.join(",")})`:N})});return y.observe(h),()=>{y.disconnect(),v?.cancel()}},[l,p]),(0,a.jsx)($s,{...s,ref:c,className:Y("overflow-hidden p-0",t),children:(0,a.jsx)("div",{ref:u,className:"flex max-h-(--sz-calc-18) shrink-0 flex-col",children:e})})}r($$,"AnimatedDialogContent");var gA=[{id:"dot",name:"Dot",adapter:"openai_dot",description:"Your Dot in ChatGPT"},{id:"other",name:"Other",adapter:"http",description:"Any agent that can connect to Wardmote"}];function U$({onSelect:e,dotDisabledReason:t}){return(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:gA.map(s=>(0,a.jsxs)("button",{type:"button",onClick:r(()=>e(s.id),"onClick"),disabled:s.id==="dot"&&!!t,title:s.id==="dot"?t:void 0,className:"flex aspect-square flex-col items-center justify-center gap-3 rounded-lg border border-line bg-bg-2 px-3 py-4 text-center transition-colors disabled:opacity-50 hover:bg-bg-3/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",children:[(0,a.jsx)(oS,{type:s.adapter,className:"size-8"}),(0,a.jsx)("span",{className:"text-sm font-medium",children:s.name}),(0,a.jsx)("span",{className:"sr-only",children:s.description})]},s.id))})}r(U$,"ExternalAgentPresetPicker");var B$=[{title:"Connected to Wardmote",description:"Your Dot has connected to this agent."},{title:"Task updates enabled",description:"Your Dot is subscribed to new assignments and messages."},{title:"Test event confirmed",description:"Your Dot received our test and replied to Wardmote."}];function K$({state:e}){const t={waiting:0,connected:1,subscribed:2,testing:2,finishing:3,ready:3}[e.phase],s=e.problem==="agent_unavailable"?"Connection checks passed, but this agent cannot receive tasks. Resolve the agent’s setup blocker in Wardmote.":e.problem==="offline"?"Connection updates paused. Reconnect to check the latest status.":e.problem==="prompt_unavailable"?"This setup prompt was replaced in another window. Create a fresh prompt to continue.":e.problem==="event_timeout"?"Your Dot connected, but hasn’t confirmed the test event. Ask it to check Wardmote, then retry.":e.phase==="finishing"?"Your Dot confirmed the test event. Wardmote is finishing agent setup.":e.phase==="ready"?"Your Dot is ready for tasks. Messages can travel both ways.":e.phase==="waiting"?"Watching for your Dot. Updates will appear here automatically.":e.phase==="connected"?"Your Dot connected. Waiting for it to enable task updates.":"Waiting for your Dot to confirm a test event. No task will be created.";return(0,a.jsxs)("section",{"aria-label":"Dot connection checks",className:"space-y-4",children:[(0,a.jsx)("ol",{className:"space-y-4",children:B$.map((l,c)=>{const u=c<t,p=c===t&&e.problem==="event_timeout",f=c===t&&!e.problem,h=u?Ms:p?zS:f?Ma:KI;return(0,a.jsxs)("li",{className:"flex items-start gap-3","aria-current":f?"step":void 0,children:[(0,a.jsx)("span",{className:Y("flex size-6 shrink-0 items-center justify-center rounded-full",u?"bg-bg-3 text-ink":p?"text-bad":"text-ink-3"),children:(0,a.jsx)(h,{className:Y("size-4",f&&"animate-spin motion-reduce:animate-none")})}),(0,a.jsxs)("div",{className:"min-w-0 pt-0.5",children:[(0,a.jsxs)("p",{className:Y("text-sm",u||f||p?"font-medium":"text-ink-3"),children:[l.title,(0,a.jsx)("span",{className:"sr-only",children:u?": complete":p?": needs attention":f?": in progress":": waiting"})]}),u&&(0,a.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-ink-3",children:l.description})]})]},l.title)})}),(0,a.jsx)("p",{role:e.problem&&e.problem!=="prompt_unavailable"?"alert":"status","aria-live":"polite",className:Y("text-sm leading-relaxed",e.problem&&e.problem!=="prompt_unavailable"?"text-bad":"text-ink-3"),children:s})]})}r(K$,"DotConnectionChecks");function q$({preset:e,prompt:t,companyName:s,connection:l,onSelect:c,onBack:u,onClose:p,onCopied:f,onRetry:h,onNewPrompt:g,dotDisabledReason:v,busy:y=!1,error:j,approvalHref:k}){const S=gA.find(R=>R.id===e),N=e==="dot",I=N&&l.phase==="ready"&&!l.problem,C=N&&l.phase!=="waiting",M=l.problem==="agent_unavailable"?"Agent unavailable":l.problem==="offline"?"Updates paused":l.problem==="event_timeout"?"Needs attention":l.phase==="finishing"?"Finishing setup…":l.phase==="connected"?"Connecting…":"Confirming connection…";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"min-h-0 space-y-6 overflow-y-auto px-6 pb-6 pt-8 sm:px-8",children:[(0,a.jsxs)("div",{className:"space-y-3 pr-5",children:[S&&(0,a.jsx)(oS,{type:S.adapter,className:"size-10"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(Os,{className:"text-xl font-semibold tracking-tight",children:S?N?I?"Your Dot is connected":"Connect your Dot":"Invite your agent":"Invite an external agent"}),(0,a.jsx)(vo,{className:"text-sm leading-relaxed",children:S?I?`Your Dot can now receive assignments and work with ${s}.`:l.problem==="agent_unavailable"?"Your Dot is connected. This agent must be available in Wardmote before it can receive assignments.":l.phase==="finishing"?"Your Dot has connected and confirmed task updates. Wardmote is preparing it for assignments.":C?"Your Dot has connected. We’re checking that task updates can travel both ways.":N?"Copy the setup prompt and send it to your Dot in ChatGPT. Your Dot will connect itself; we’ll watch for it here.":"Copy the invitation prompt and send it to your agent. Approve its join request in Wardmote when it’s ready.":`Bring an agent you already use into ${s}.`})]})]}),j&&(0,a.jsxs)("div",{role:"alert",className:"space-y-3 text-sm text-bad",children:[(0,a.jsx)("p",{children:j}),(0,a.jsx)(oe,{variant:"secondary",disabled:y,onClick:h,children:"Try again"})]}),S?k?(0,a.jsx)("p",{className:"text-sm text-ink-3",children:"An organization admin needs to approve this agent before Dot can connect. This page will update after approval."}):y&&!t&&l.phase==="waiting"?(0,a.jsx)("p",{role:"status",className:"text-sm text-ink-3",children:"Preparing your invitation…"}):N?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"border-t pt-6",children:[(0,a.jsx)(K$,{state:l}),l.phase==="waiting"&&(0,a.jsx)("p",{className:"mt-4 text-xs text-ink-3",children:"Dot uses your OpenAI account. Provider usage and cost aren’t reported to Wardmote."})]}),l.problem==="event_timeout"&&(0,a.jsx)(oe,{variant:"secondary",disabled:y,onClick:h,children:"Retry test event"}),l.problem==="offline"&&(0,a.jsx)(oe,{variant:"secondary",disabled:y,onClick:h,children:"Reconnect updates"})]}):(0,a.jsxs)("p",{className:"text-sm leading-relaxed text-ink-3",children:["The invitation includes everything your agent needs to join ",s,". You can review its request before granting access."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(U$,{onSelect:c,dotDisabledReason:v}),v&&(0,a.jsx)("p",{className:"text-sm text-ink-3",children:v})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-t px-6 py-4 sm:px-8",children:[(0,a.jsxs)(oe,{variant:"ghost",onClick:S?u:p,children:[S&&(0,a.jsx)(A0,{className:"size-4"}),S?"Back":"Cancel"]}),S&&(k?(0,a.jsx)(oe,{asChild:!0,children:(0,a.jsx)(mn,{to:k,onClick:p,children:"Review approval"})}):I?(0,a.jsx)(oe,{onClick:p,children:"Done"}):C?(0,a.jsxs)(oe,{disabled:!0,"aria-live":"polite",children:[!l.problem&&(0,a.jsx)(Ma,{className:"size-4 animate-spin motion-reduce:animate-none","aria-hidden":"true"}),M]}):N&&l.problem==="prompt_unavailable"?(0,a.jsx)(oe,{disabled:y,onClick:g,children:"Create a new prompt"}):!t||y?(0,a.jsx)(oe,{disabled:!0,children:y?"Preparing…":"Waiting for Dot…"}):(0,a.jsx)(qT,{prompt:t,label:N?"Copy setup prompt":"Copy invitation prompt",title:N?"Connect your Dot":"Invite your agent",description:N?"Send this whole prompt to your Dot in ChatGPT.":"Send this whole prompt to your agent.",agent:N?{name:"Dot",src:"/brands/adapters/openai-dot.svg"}:void 0,align:"end",className:"min-w-0 shrink",onCopied:f},e))]})]})}r(q$,"ExternalAgentInviteContent");function F$({companyId:e,onClose:t,onBack:s}){const l=kn(),{selectedCompany:c}=bt(),[u,p]=(0,x.useState)(null),[f,h]=(0,x.useState)(null),[g,v]=(0,x.useState)(null),[y,j]=(0,x.useState)(null),[k,S]=(0,x.useState)(""),N=(0,x.useRef)(!1),I=me({queryKey:$.instance.experimentalSettings,queryFn:pa.getExperimental}),C=I.isPending?"Loading available agents…":I.error?"Unable to load feature settings. Try again after refreshing.":!I.data?.enableOpenAiDot||!I.data.enablePublicMcp?"Turn on OpenAI Dot and Assistant connections in Settings > Features.":void 0,M=["dot-binding",e,f?.agent.id],R=me({queryKey:M,queryFn:r(({signal:ie})=>bd.connection(e,f.agent.id,ie),"queryFn"),enabled:u==="dot"&&!!f,retry:!1,staleTime:0,refetchInterval:r(ie=>ie.state.error||ie.state.data?.agentLifecycleState==="ready"&&ie.state.data.canConfigureConnection&&ie.state.data.binding?.status==="ready"&&ie.state.data.binding.subscriptionVerified?!1:2500,"refetchInterval")}),_=Bt({mutationFn:r(async ie=>{if(ie==="dot"){const we=await bd.create(e);h(we),await l.invalidateQueries({queryKey:$.agents.list(e)});return}const le=await ti.createCompanyInvite(e,{allowedJoinTypes:"agent",humanRole:null,agentMessage:null});l.invalidateQueries({queryKey:$.access.invites(e,"all",5)});const Ae=le.onboardingTextUrl??le.onboardingTextPath??`/api/invites/${le.token}/onboarding.txt`,de=await ti.getInviteOnboarding(le.token).catch(()=>null);S(L$({onboardingTextUrl:new URL(Ae,window.location.origin).href,connectionCandidates:de?.onboarding.connectivity?.connectionCandidates??null,testResolutionUrl:de?.onboarding.connectivity?.testResolutionEndpoint?.url??null}))},"mutationFn"),gcTime:0}),D=Bt({mutationFn:r(async ie=>{const le=await bd.pair(e,f.agent.id,ie);v(le),j(null)},"mutationFn"),onSuccess:r(()=>{l.invalidateQueries({queryKey:M})},"onSuccess"),onError:r(()=>{R.refetch()},"onError"),gcTime:0}),U=Bt({mutationFn:r(()=>bd.retry(e,f.agent.id,R.data.binding.id),"mutationFn"),onSuccess:r(()=>{l.invalidateQueries({queryKey:M})},"onSuccess")}),K=R.data?.binding,z=u==="dot"&&R.data?.enabled&&!!R.data.resourceUrl&&R.data.canConfigureConnection&&(!K||K.status==="pairing")&&!g&&!R.error&&!D.isError&&!N.current&&(!y||K?.id===y);(0,x.useEffect)(()=>{z&&R.isFetchedAfterMount&&!R.isFetching&&!D.isPending&&(N.current=!0,D.mutate(K?.id))},[z,R.isFetchedAfterMount,R.isFetching,D.isPending,D.mutate,K?.id]),(0,x.useEffect)(()=>{if(!g)return;const ie=window.setTimeout(()=>{N.current=!1,j(g.bindingId),v(null)},Math.max(0,Date.parse(g.expiresAt)-Date.now()));return()=>window.clearTimeout(ie)},[g]);const E=K?.status==="ready"&&K.subscriptionVerified,B=R.data?.agentLifecycleState==="ready"&&R.data.canConfigureConnection,O=["preparing","verifying"].includes(R.data?.agentLifecycleState??"")&&R.data?.canConfigureConnection,Q={phase:E?B?"ready":O?"finishing":"ready":K?.hasPendingChallenge?"testing":K?.subscriptionVerified?"subscribed":K?.connected?"connected":"waiting",problem:R.error?"offline":E&&!B&&!O?"agent_unavailable":K?.status==="pairing"&&!z&&!D.isPending&&!R.isFetching&&!D.isError&&g?.bindingId!==K.id?"prompt_unavailable":K?.challengeExpiresAt&&!K.hasPendingChallenge&&K.status!=="ready"?"event_timeout":void 0},V=(R.data?.agentStatus??f?.agent.status)==="pending_approval",ue=R.data&&!R.data.canConfigureConnection&&!V,ce=u==="dot"?g&&g.bindingId===K?.id&&R.data?.resourceUrl&&f?HE({companyId:e,agentId:f.agent.id,resourceUrl:R.data.resourceUrl,...g}):"":k,X=(_.variables===u?_.error:null)??(u==="dot"?(K?.connected?null:D.error)??U.error:null),A=_.isPending||D.isPending||U.isPending||z||u==="dot"&&!!f&&(R.isPending||!ce&&R.isFetching),ee=r(()=>{if(ue){R.refetch();return}if(R.error){R.refetch();return}if(_.error||!f){u&&_.mutate(u);return}if(D.error&&!K?.connected){D.mutate(K?.status==="pairing"?K.id:void 0);return}U.mutate()},"retry");return(0,a.jsx)(ks,{open:!0,onOpenChange:r(ie=>{ie||t()},"onOpenChange"),children:(0,a.jsx)($$,{className:"sm:max-w-(--sz-560px)",children:(0,a.jsx)(q$,{preset:u,prompt:ce,companyName:c?.name??"your organization",connection:Q,dotDisabledReason:C,busy:A,error:X?.message??(ue?R.data?.agentLifecycleState==="terminated"?"This agent was terminated. Invite another agent to connect Dot.":"Resume this agent before connecting Dot.":void 0),approvalHref:V&&f?.approvalId?`/approvals/${f.approvalId}`:void 0,onSelect:r(ie=>{p(ie),(ie==="dot"?!f:!k)&&_.mutate(ie)},"onSelect"),onBack:r(()=>p(null),"onBack"),onClose:u?t:s,onCopied:r(()=>{u==="dot"&&R.refetch()},"onCopied"),onRetry:ee,onNewPrompt:r(()=>D.mutate(K?.id),"onNewPrompt")})})})}r(F$,"ExternalAgentInviteDialog");function H$(){const{newAgentOpen:e,closeNewAgent:t}=Vc(),{selectedCompanyId:s}=bt();return e?(0,a.jsx)(V$,{companyId:s,onClose:t},s):null}r(H$,"NewAgentDialog");function V$({companyId:e,onClose:t}){const s=ja(),[l,c]=(0,x.useState)(!1);return l&&e?(0,a.jsx)(F$,{companyId:e,onClose:t,onBack:r(()=>c(!1),"onBack")}):(0,a.jsx)(QE,{open:!0,onClose:t,onInvite:e?()=>c(!0):void 0,onContinue:r(u=>{t(),s(`/agents/new?${VE(u)}`)},"onContinue")})}r(V$,"NewAgentDialogContent");var W$=[{title:"Inbox",shortcuts:[{keys:["j"],label:"Move down"},{keys:["↓"],label:"Move down"},{keys:["k"],label:"Move up"},{keys:["↑"],label:"Move up"},{keys:["←"],label:"Collapse selected group"},{keys:["→"],label:"Expand selected group"},{keys:["Enter"],label:"Open selected item"},{keys:["a"],label:"Archive item"},{keys:["y"],label:"Archive item"},{keys:["r"],label:"Mark as read"},{keys:["U"],label:"Mark as unread"}]},{title:"Task detail",shortcuts:[{keys:["y"],label:"Quick-archive back to inbox"},{keys:["g","i"],label:"Go to inbox"},{keys:["g","c"],label:"Focus comment composer"}]},{title:"Decisions",shortcuts:[{keys:["j"],label:"Move down"},{keys:["↓"],label:"Move down"},{keys:["k"],label:"Move up"},{keys:["↑"],label:"Move up"},{keys:["Enter"],label:"Open or close selected decision"},{keys:["x"],label:"Dismiss selected decision"}]},{title:"Global",shortcuts:[{keys:["/"],label:"Search current page or quick search"},{keys:["c"],label:"New task"},{keys:["["],label:"Toggle sidebar"},{keys:["]"],label:"Toggle panel"},{keys:["?"],label:"Show keyboard shortcuts"}]}];function Cw({children:e}){return(0,a.jsx)("kbd",{className:"inline-flex h-6 min-w-6 items-center justify-center rounded border border-line bg-bg-3 px-1.5 font-mono text-xs font-medium text-ink shadow-(--shadow-extract-10)",children:e})}r(Cw,"KeyCap");function Q$(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"divide-y divide-line border-t border-line",children:W$.map(e=>(0,a.jsxs)("div",{className:"px-5 py-3",children:[(0,a.jsx)("h3",{className:"mb-2 text-(length:--text-micro) font-semibold uppercase tracking-wider text-ink-3",children:e.title}),(0,a.jsx)("div",{className:"space-y-1.5",children:e.shortcuts.map(t=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,a.jsx)("span",{className:"text-sm text-ink/90",children:t.label}),(0,a.jsx)("div",{className:"flex items-center gap-1",children:t.keys.map((s,l)=>(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[l>0&&(0,a.jsx)("span",{className:"text-xs text-ink-3",children:t.combo?"+":"then"}),(0,a.jsx)(Cw,{children:s})]},s))})]},t.label+t.keys.join()))})]},e.title))}),(0,a.jsx)("div",{className:"border-t border-line px-5 py-3",children:(0,a.jsxs)("p",{className:"text-xs text-ink-3",children:["Press ",(0,a.jsx)(Cw,{children:"Esc"})," to close · Shortcuts are disabled in text fields"]})})]})}r(Q$,"KeyboardShortcutsCheatsheetContent");function G$({open:e,onOpenChange:t}){return(0,a.jsx)(ks,{open:e,onOpenChange:t,children:(0,a.jsxs)($s,{className:"sm:max-w-md gap-0 p-0 overflow-hidden",showCloseButton:!1,children:[(0,a.jsx)(bo,{className:"px-5 pt-5 pb-3",children:(0,a.jsx)(Os,{className:"text-base",children:"Keyboard shortcuts"})}),(0,a.jsx)(Q$,{})]})})}r(G$,"KeyboardShortcutsCheatsheet");var Y$={info:"border-sky-300 bg-sky-50 text-sky-900 dark:border-sky-500/25 dark:bg-sky-950/60 dark:text-sky-100",success:"border-emerald-300 bg-emerald-50 text-emerald-900 dark:border-emerald-500/25 dark:bg-emerald-950/60 dark:text-emerald-100",warn:"border-amber-300 bg-amber-50 text-amber-900 dark:border-amber-500/25 dark:bg-amber-950/60 dark:text-amber-100",error:"border-red-300 bg-red-50 text-red-900 dark:border-red-500/30 dark:bg-red-950/60 dark:text-red-100"},X$={info:"bg-sky-500 dark:bg-sky-400",success:"bg-emerald-500 dark:bg-emerald-400",warn:"bg-amber-500 dark:bg-amber-400",error:"bg-red-500 dark:bg-red-400"};function Z$({toast:e,onDismiss:t}){const[s,l]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{const c=requestAnimationFrame(()=>l(!0));return()=>cancelAnimationFrame(c)},[]),(0,a.jsx)("li",{className:Y("pointer-events-auto rounded-sm border shadow-lg backdrop-blur-xl transition-(--tp-transform-opacity) duration-200 ease-out",s?"translate-y-0 opacity-100":"translate-y-3 opacity-0",Y$[e.tone]),children:(0,a.jsxs)("div",{className:"flex items-start gap-3 px-3 py-2.5",children:[e.actor?.type==="agent"?(0,a.jsx)(mr,{agent:{id:e.actor.id,name:e.actor.name,appearance:e.actor.appearance},size:24}):e.actor?.type==="user"?(0,a.jsxs)(Yd,{size:"sm","aria-hidden":"true",children:[e.actor.image&&(0,a.jsx)(Qd,{src:e.actor.image,alt:""}),(0,a.jsx)(Gd,{children:H3(e.actor.name)})]}):(0,a.jsx)("span",{className:Y("mt-1 h-2 w-2 shrink-0 rounded-full",X$[e.tone])}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-semibold leading-5",children:e.title}),e.body&&(0,a.jsx)("p",{className:"mt-1 text-xs leading-4 opacity-70",children:e.body}),e.action&&(e.action.onClick?(0,a.jsx)("button",{type:"button",onClick:r(()=>{e.action?.onClick?.(),t(e.id)},"onClick"),className:"mt-2 inline-flex text-xs font-medium underline underline-offset-4 hover:opacity-90",children:e.action.label}):e.action.href?(0,a.jsx)(mn,{to:e.action.href,onClick:r(()=>t(e.id),"onClick"),className:"mt-2 inline-flex text-xs font-medium underline underline-offset-4 hover:opacity-90",children:e.action.label}):null)]}),(0,a.jsx)("button",{type:"button","aria-label":"Dismiss notification",onClick:r(()=>t(e.id),"onClick"),className:"mt-0.5 shrink-0 rounded p-1 opacity-50 hover:bg-black/10 hover:opacity-100 dark:hover:bg-white/10",children:(0,a.jsx)(ia,{className:"h-3.5 w-3.5"})})]})})}r(Z$,"AnimatedToast");function J$(){const e=V3(),{dismissToast:t}=Ri();return e.length===0?null:(0,a.jsx)("aside",{"aria-live":"polite","aria-atomic":"false",className:"pointer-events-none fixed bottom-3 left-3 z-(--z-120) w-full max-w-sm px-1",children:(0,a.jsx)("ol",{className:"flex w-full flex-col-reverse gap-2",children:e.map(s=>(0,a.jsx)(Z$,{toast:s,onDismiss:t},s.id))})})}r(J$,"ToastViewport");async function Aw(e,t){const s=await fetch(`/api/announcements/${e}`,{credentials:"same-origin",cache:"no-store",...t});if(!s.ok)throw new Ti("Announcement request failed",s.status,null);return s}r(Aw,"request");var _w={async current(e){const t=await(await Aw("current",{signal:e})).json();return t===null?null:bE.parse(t)},async dismiss(e,t,s){await Aw(`${encodeURIComponent(e)}/dismiss`,{method:"POST",signal:s,headers:{"Content-Type":"application/json"},body:JSON.stringify({companyId:t})})}},Dg=new Map;function hx(e){return`wardmote.announcement-dismissals.v1:${encodeURIComponent(e)}:`}r(hx,"announcementStoragePrefix");function vd(e){const t=hx(e),s=new Map;try{for(let l=0;l<localStorage.length;l++){const c=localStorage.key(l);if(!c?.startsWith(t))continue;const u=c.slice(t.length),p=localStorage.getItem(c);nS.safeParse(u).success&&(p==="pending"||p==="synced")&&Dg.set(c,p==="pending")}}catch{}for(const[l,c]of Dg)l.startsWith(t)&&s.set(l.slice(t.length),c);return s}r(vd,"readAnnouncementDismissals");function Ch(e,t,s){const l=`${hx(e)}${t}`;Dg.set(l,s);try{return localStorage.setItem(l,s?"pending":"synced"),!0}catch{return!1}}r(Ch,"saveAnnouncementDismissal");var eU=3e3;function tU(e){const{userId:t,enabled:s}=e,l=(0,x.useRef)(e);l.current=e;const[c,u]=(0,x.useState)(null),p=(0,x.useRef)(()=>{});(0,x.useEffect)(()=>{if(u(null),!t||!s)return;let h=!1,g=0,v=null,y;const j=new Map,k=new Set,S=hx(t);let N=null;try{N=new BroadcastChannel(S)}catch{}const I=r(()=>!h&&l.current.userId===t&&l.current.enabled,"active");async function C(E,B=!0){if(!I()||j.has(E)||!l.current.companyId)return;const O=new AbortController;j.set(E,O);const Q=setTimeout(()=>O.abort(),1e4);try{await _w.dismiss(E,l.current.companyId,O.signal),I()&&Ch(t,E,!1)}catch{I()&&!k.has(E)&&(k.add(E),l.current.onSaveFailure(B))}finally{clearTimeout(Q),j.delete(E)}}r(C,"sync");async function M(){for(const[E,B]of vd(t)){if(!I())return;B&&await C(E)}}r(M,"flush");function R(){g++,clearTimeout(y),v?.abort(),v=null,u(null)}r(R,"suspend");function _(){if(!I()||document.visibilityState==="hidden")return;R();const E=g,B=new AbortController;v=B;const O=r(()=>I()&&g===E&&!B.signal.aborted,"stillCurrent");let Q=!1,V=!1,ue=null;const ce=r(()=>{!O()||!Q||!V||ue&&!vd(t).has(ue.id)&&(!ue.expiresAt||Date.parse(ue.expiresAt)>Date.now())&&u({userId:t,announcement:ue})},"show");y=setTimeout(()=>{Q=!0,ce()},eU),M(),_w.current(B.signal).then(X=>{ue=X,V=!0,ce()}).catch(()=>{})}r(_,"resume");function D(){const E=vd(t);u(B=>B?.userId===t&&E.has(B.announcement.id)?null:B)}r(D,"receive");function U(E){E.key?.startsWith(S)&&D()}r(U,"onStorage");function K(){document.visibilityState==="hidden"?R():_()}r(K,"onVisibility");function z(){M()}return r(z,"onOnline"),N&&(N.onmessage=E=>{const B=nS.safeParse(E.data);B.success&&(vd(t).has(B.data)||Ch(t,B.data,!0),D())}),p.current=E=>{if(!I())return;const B=Ch(t,E,!0);u(null),g++,v?.abort();try{N?.postMessage(E)}catch{}C(E,B)},document.addEventListener("visibilitychange",K),window.addEventListener("online",z),window.addEventListener("storage",U),_(),()=>{h=!0,g++,clearTimeout(y),v?.abort();for(const E of j.values())E.abort();N?.close(),document.removeEventListener("visibilitychange",K),window.removeEventListener("online",z),window.removeEventListener("storage",U),p.current=()=>{}}},[t,s]);const f=s&&c?.userId===t?c.announcement:null;return(0,x.useEffect)(()=>{if(!f?.expiresAt)return;let h;const g=r(()=>{const v=Date.parse(f.expiresAt)-Date.now();v<=0?u(null):h=setTimeout(g,Math.min(v,2147483647))},"check");return g(),()=>clearTimeout(h)},[f]),{announcement:f,dismiss:(0,x.useCallback)(h=>p.current(h),[])}}r(tU,"useAnnouncement");function nU(e,t){const s=K0(),l=t??`/api/announcements/${encodeURIComponent(e.id)}/animation`,c=`${l}:${e.animation?.path??""}`,[u,p]=(0,x.useState)(null),f=!!e.animation&&!s;return(0,x.useEffect)(()=>{if(!f)return;const h=new AbortController,g=setTimeout(()=>h.abort(),5e3);return(async()=>{try{const v=await fetch(l,{credentials:"same-origin",cache:"no-store",redirect:"error",referrerPolicy:"no-referrer",signal:h.signal});if(!v.ok||v.headers.get("content-type")?.split(";")[0]!=="text/html")return;const y=await v.text();h.signal.aborted||p({key:c,document:`<meta http-equiv="Content-Security-Policy" content="${NE}">${y}`})}catch{}finally{clearTimeout(g)}})(),()=>{h.abort(),clearTimeout(g)}},[f,c,l]),f&&u?.key===c?u.document:null}r(nU,"useAnnouncementAnimation");function Ew({action:e,primary:t,onClick:s}){const l=(0,a.jsxs)(a.Fragment,{children:[e.label,!t&&e.kind==="external"&&(0,a.jsx)(zI,{className:"size-3.5 shrink-0","aria-hidden":"true"})]}),c=r(u=>{u.button===1&&s()},"onAuxClick");return(0,a.jsx)(oe,{asChild:!0,variant:t?"primary":"ghost",size:"sm",className:"h-auto min-h-9 min-w-0 whitespace-normal py-2 text-left",children:e.kind==="external"?(0,a.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",onClick:s,onAuxClick:c,children:l}):(0,a.jsx)(mn,{to:e.path,onClick:s,onAuxClick:c,children:l})})}r(Ew,"Action");function aU({announcement:e,onDismiss:t,imageSrc:s,animationSrc:l,className:c}){const u=(0,x.useId)(),[p,f]=(0,x.useState)(null),h=s??`/api/announcements/${encodeURIComponent(e.id)}/image`,g=!!(e.image&&p!==h),v=nU(e,l),y=!!v;return(0,a.jsxs)(Hc,{role:"region","aria-labelledby":u,className:Y("relative w-full max-w-(--announcement-width) gap-0 overflow-hidden rounded-xl p-0 shadow-sm",c),onKeyDown:r(j=>{j.key==="Escape"&&(j.preventDefault(),j.stopPropagation(),t())},"onKeyDown"),children:[(g||v)&&(0,a.jsxs)("div",{className:"relative h-(--announcement-image-mobile-height) w-full shrink-0 overflow-hidden bg-bg-3 md:h-(--announcement-image-height)",children:[g&&(0,a.jsx)("img",{src:h,alt:y?"":e.image.alt,referrerPolicy:"no-referrer",onError:r(()=>f(h),"onError"),className:"h-full w-full object-cover"}),y&&(0,a.jsx)("div",{role:"img","aria-label":e.animation.alt,className:"pointer-events-none absolute inset-0",children:(0,a.jsx)("iframe",{title:e.animation.alt,"aria-hidden":"true",tabIndex:-1,sandbox:"",referrerPolicy:"no-referrer",srcDoc:v,className:"h-full w-full border-0"})})]}),(0,a.jsx)(oe,{variant:"secondary",size:"icon","aria-label":"Dismiss announcement",onClick:t,className:"absolute right-2 top-2 z-10 size-8 rounded-full shadow-sm",children:(0,a.jsx)(ia,{className:"size-4","aria-hidden":"true"})}),(0,a.jsxs)("div",{className:Y("flex flex-col gap-1 px-4 py-4",!g&&!v&&"pr-12"),children:[(0,a.jsx)("p",{className:"text-xs text-ink-3",children:e.eyebrow}),(0,a.jsx)("h2",{id:u,className:"break-words text-base font-semibold leading-snug",children:e.title}),(0,a.jsx)("p",{className:"break-words text-sm leading-snug text-ink-3",children:e.description})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t px-3 py-2",children:[e.secondaryLink&&(0,a.jsx)(Ew,{action:e.secondaryLink,onClick:t}),(0,a.jsx)("div",{className:"ml-auto min-w-0 max-w-full",children:(0,a.jsx)(Ew,{action:e.primaryAction,primary:!0,onClick:t})})]})]})}r(aU,"AnnouncementCard");var sU='[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"], [aria-modal="true"]:not([data-state="closed"]), dialog[open]';function iU(e){const[t,s]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{if(!e)return;const l=r(()=>s(!!document.querySelector(sU)),"scan");l();const c=new MutationObserver(l);return c.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-state","aria-modal","open"]}),()=>c.disconnect()},[e]),t}r(iU,"useModalOpen");function rU({health:e}){const{userId:t,settled:s}=k0(),{selectedCompanyId:l,loading:c}=bt(),{onboardingOpen:u}=Ff(),p=Lf(),f=W3(),h=e?.deploymentMode==="local_trusted"?"local-board":s?t:null,{announcement:g,dismiss:v}=tU({userId:h,companyId:l,enabled:!!(h&&!c&&l&&!u),onSaveFailure:r(j=>p?.pushToast({title:j?"Dismissed in this browser":"Dismissed for this visit",body:"Couldn’t save across devices. We’ll retry when you reconnect or return.",tone:"info",dedupeKey:"announcement-dismissal-sync"}),"onSaveFailure")}),y=iU(!!g);return!g||y||(f?.length??0)>0?null:(0,a.jsx)("aside",{"aria-label":"Wardmote announcements",className:"announcement-well fixed left-3 bottom-(--announcement-mobile-bottom) z-40 w-(--announcement-available-width) max-w-(--announcement-width) max-h-(--announcement-mobile-max-height) overflow-y-auto md:bottom-3 md:max-h-(--announcement-max-height)",children:(0,a.jsx)(aU,{announcement:g,onDismiss:r(()=>v(g.id),"onDismiss")},g.id)})}r(rU,"AnnouncementWell");function tp(e){const t=e.split("/").filter(Boolean);return t.length===1?t[0]?.toLowerCase()==="onboarding":t.length===2?t[1]?.toLowerCase()==="onboarding":!1}r(tp,"isOnboardingPath");function lU(e){const t=e.split("/").filter(Boolean);if(t.length===2&&t[1]?.toLowerCase()==="onboarding")return t[0]}r(lU,"companyPrefixFromOnboardingPath");function xA(){return 3}r(xA,"onboardingStepForCompany");function oU(e){const{pathname:t,companyPrefix:s,companies:l}=e;if(!tp(t))return null;if(!s)return{initialStep:1};const c=l.find(u=>u.issuePrefix.toUpperCase()===s.toUpperCase())??null;return c?{initialStep:xA(),companyId:c.id}:{initialStep:1}}r(oU,"resolveRouteOnboardingOptions");function jY(e){return!e.agentsLoaded||e.agentsRefreshing||e.agentCount>0?!1:!tp(e.pathname)}r(jY,"shouldRouteAgentlessCompanyToOnboarding");function gx(e){return!e.hasCompanies&&!tp(e.pathname)}r(gx,"shouldRedirectCompanylessRouteToOnboarding");function cU(e){return e.onboardingOpen||!e.routeDismissed}r(cU,"isOnboardingWizardActive");function uU({context:e}){const{slots:t,errorMessage:s}=qc({slotTypes:["appShellOverlay"],companyId:e.companyId});return s||t.length===0?null:(0,a.jsx)("aside",{className:"plugin-app-shell-overlays","aria-label":"Application extensions",children:t.map(l=>(0,a.jsx)(L0,{slot:l,context:e,className:"plugin-app-shell-overlay"},`${l.pluginId}:${l.pluginVersion}:${l.id}`))})}r(uU,"AppShellEntries");function dU({localTrusted:e=!1}){const{userId:t,settled:s}=k0(),{selectedCompanyId:l,selectedCompany:c,loading:u}=bt(),{onboardingOpen:p,onboardingRouteDismissed:f}=Ff(),{pathname:h}=hn(),g=s?t??(e?"local-board":null):null,v=p||!f&&tp(h);if(!g||u||v)return null;const y={companyId:l,companyPrefix:c?.issuePrefix??null,projectId:null,entityId:null,entityType:null,parentEntityId:null,userId:t};return(0,a.jsx)(uU,{context:y},JSON.stringify([g,l]))}r(dU,"PluginAppShellOverlays");var Iw="relative flex min-h-(--sz-calc-11) min-w-0 flex-col items-center justify-center gap-1 rounded-md text-(length:--text-nano) font-medium transition-colors";function fU({visible:e}){const{selectedCompanyId:t}=bt(),{sidebarOpen:s,setSidebarOpen:l}=Jn(),c=Y0(t),{enabled:u}=Pf(),{enabled:p}=Jf(),f=(0,x.useMemo)(()=>[{to:"/dashboard",label:"Home",icon:vR},...p?[]:[{to:"/inbox",label:"Inbox",icon:E0,badge:c.inbox}],{to:"/issues",label:"Tasks",icon:eg,badge:p?c.inbox:void 0},...u?[{to:"/chats",label:"Chat",icon:yg}]:[]],[c.inbox,u,p]);return(0,a.jsx)("nav",{className:"mobile-bottom-nav fixed inset-x-0 bottom-0 z-30 bg-bg-3 pb-(--sz-safe-bottom)","data-visible":e,inert:!e,"aria-label":"Mobile navigation",children:(0,a.jsxs)("div",{className:"grid h-16 px-1",style:{gridTemplateColumns:`repeat(${f.length+1}, minmax(0, 1fr))`},children:[f.map(h=>{const g=h.icon;return(0,a.jsx)(hS,{to:h.to,state:Of,className:r(({isActive:v})=>Y(Iw,v?"text-ink":"text-ink-3"),"className"),children:r(({isActive:v})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"relative",children:[(0,a.jsx)(g,{className:Y("h-(--sz-18px) w-(--sz-18px)",v&&"stroke-(length:--sw-2_3)")}),h.badge!=null&&h.badge>0&&(0,a.jsx)(Dn,{variant:"ghost",className:"absolute -end-2 -top-2 bg-accent px-1.5 text-(length:--text-nano) leading-none text-accent-ink",children:h.badge>99?"99+":h.badge})]}),(0,a.jsx)("span",{className:"truncate",children:h.label})]}),"children")},h.label)}),(0,a.jsxs)("button",{type:"button","aria-expanded":s,onClick:r(()=>l(!0),"onClick"),className:Y(Iw,s?"text-ink":"text-ink-3"),children:[(0,a.jsx)(K1,{className:"h-(--sz-18px) w-(--sz-18px)"}),(0,a.jsx)("span",{className:"truncate",children:"More"})]})]})})}r(fU,"MobileBottomNav");function Jl(e){if(typeof document>"u")return null;const t=document.querySelector(`meta[name="${e}"]`)?.getAttribute("content")?.trim();return t||null}r(Jl,"readMetaContent");function Og(e){if(!e)return null;const t=e.startsWith("#")?e.slice(1):e;return/^[0-9a-fA-F]{3}$/.test(t)?`#${t.split("").map(s=>`${s}${s}`).join("").toLowerCase()}`:/^[0-9a-fA-F]{6}$/.test(t)?`#${t.toLowerCase()}`:null}r(Og,"normalizeHexColor");function pU(e){const t=Og(e)??"#000000";return{r:Number.parseInt(t.slice(1,3),16),g:Number.parseInt(t.slice(3,5),16),b:Number.parseInt(t.slice(5,7),16)}}r(pU,"hexToRgb");function Ah(e){const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}r(Ah,"relativeLuminanceChannel");function mU(e){const{r:t,g:s,b:l}=pU(e),c=.2126*Ah(t)+.7152*Ah(s)+.0722*Ah(l);return 1.05/(c+.05)>=(c+.05)/.05?LT:zT}r(mU,"pickReadableTextColor");function wY(){return Jl("wardmote-worktree-enabled")==="true"}r(wY,"isWorktreeRuntime");function kY(){return Jl("wardmote-instance-id")}r(kY,"getWorktreeInstanceId");function hU(){if(Jl("wardmote-worktree-enabled")!=="true")return null;const e=Jl("wardmote-worktree-name"),t=Og(Jl("wardmote-worktree-color"));return!e||!t?null:{enabled:!0,name:e,color:t,textColor:Og(Jl("wardmote-worktree-text-color"))??mU(t)}}r(hU,"getWorktreeUiBranding");function gU(){const e=hU(),{copied:t,failed:s,copy:l}=FT(),c=(0,x.useCallback)(()=>{e&&l(e.name)},[e,l]);return e?(0,a.jsx)("div",{className:"relative overflow-hidden border-b px-3 py-1.5 text-(length:--text-micro) font-medium tracking-(--tracking-caps) uppercase",style:{backgroundColor:e.color,color:e.textColor,borderColor:`${e.textColor}22`,boxShadow:`inset 0 -1px 0 ${e.textColor}18`,backgroundImage:`linear-gradient(90deg, ${e.textColor}14, transparent 28%, transparent 72%, ${e.textColor}12), repeating-linear-gradient(135deg, transparent 0 10px, ${e.textColor}08 10px 20px)`},children:(0,a.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden whitespace-nowrap",children:[(0,a.jsx)("span",{className:"shrink-0 opacity-70",children:"Worktree"}),(0,a.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-70","aria-hidden":"true"}),(0,a.jsx)("button",{type:"button",onClick:c,title:"Click to copy worktree name",className:"truncate font-semibold tracking-(--tracking-eyebrow) cursor-pointer hover:opacity-80 transition-opacity bg-transparent border-none p-0 text-current uppercase text-(length:--text-micro)",children:t?"Copied!":s?"Copy failed":e.name})]})}):null}r(gU,"WorktreeBanner");var xU=3e4;function bU(e){if(!e)return null;const t=new Date(e).getTime();if(Number.isNaN(t))return null;const s=Date.now()-t;if(s<6e4)return"just now";const l=Math.round(s/6e4);if(l<60)return`${l}m ago`;const c=Math.round(l/60);return c<24?`${c}h ago`:`${Math.round(c/24)}d ago`}r(bU,"formatRelativeTimestamp");function vU(e){return e.reason==="backend_changes_and_pending_migrations"?"backend files changed and migrations are pending":e.reason==="pending_migrations"?"pending migrations need a fresh boot":"backend files changed since this server booted"}r(vU,"describeReason");function yU({devServer:e}){const[t,s]=(0,x.useState)(!1);if((0,x.useEffect)(()=>{if(!t)return;const h=window.setTimeout(()=>{s(!1)},xU);return()=>window.clearTimeout(h)},[t]),!e?.enabled||!e.restartRequired)return null;const l=e,c=bU(e.lastChangedAt),u=e.changedPathsSample.slice(0,3),p=`${e.activeRunCount} live run${e.activeRunCount===1?"":"s"}`;async function f(){const h=l.activeRunCount>0?`Restart Wardmote now? This may interrupt ${p}.`:"Restart Wardmote now?";if(window.confirm(h)){s(!0);try{await Fc.requestDevServerRestart()}catch(g){s(!1),window.alert(g instanceof Error?g.message:"Failed to request restart")}}}return r(f,"requestRestartNow"),(0,a.jsx)("div",{className:"border-b border-amber-300/60 bg-amber-50 text-amber-950 dark:border-amber-500/25 dark:bg-amber-500/10 dark:text-amber-100",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 px-3 py-2.5 md:flex-row md:items-center md:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-(--tracking-caps)",children:[(0,a.jsx)(ai,{className:"h-3.5 w-3.5 shrink-0"}),(0,a.jsx)("span",{children:"Restart Required"}),e.autoRestartEnabled?(0,a.jsx)(Dn,{variant:"ghost",className:"bg-amber-900/10 text-(length:--text-nano) tracking-(--tracking-eyebrow) dark:bg-amber-100/10",children:"Auto-Restart On"}):null]}),(0,a.jsxs)("p",{className:"mt-1 text-sm",children:[vU(e),c?` · updated ${c}`:""]}),(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-amber-900/80 dark:text-amber-100/75",children:[u.length>0?(0,a.jsxs)("span",{children:["Changed: ",u.join(", "),e.changedPathCount>u.length?` +${e.changedPathCount-u.length} more`:""]}):null,e.pendingMigrations.length>0?(0,a.jsxs)("span",{children:["Pending migrations: ",e.pendingMigrations.slice(0,2).join(", "),e.pendingMigrations.length>2?` +${e.pendingMigrations.length-2} more`:""]}):null]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs font-medium md:justify-end",children:[e.waitingForIdle?(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full bg-amber-900/10 px-3 py-1.5 dark:bg-amber-100/10",children:[(0,a.jsx)(PR,{className:"h-3.5 w-3.5"}),(0,a.jsxs)("span",{children:["Waiting for ",p," to finish"]})]}):e.autoRestartEnabled?(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full bg-amber-900/10 px-3 py-1.5 dark:bg-amber-100/10",children:[(0,a.jsx)(gc,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{children:"Auto-restart will trigger when the instance is idle"})]}):(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full bg-amber-900/10 px-3 py-1.5 dark:bg-amber-100/10",children:[(0,a.jsx)(gc,{className:"h-3.5 w-3.5"}),(0,a.jsxs)("span",{children:["Restart ",(0,a.jsx)("code",{children:"pnpm dev:once"})," after the active work is safe to interrupt"]})]}),(0,a.jsxs)(oe,{variant:"primary",size:"sm",type:"button",onClick:r(()=>{f()},"onClick"),disabled:t,children:[(0,a.jsx)(gc,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{children:t?"Restart requested":"Restart now"})]})]})]})})}r(yU,"DevRestartBanner");var jU=new Set(["disk_space_low","database_backup_skipped_low_disk"]);function wU({diskSpace:e,warnings:t}){const s=(t??[]).filter(u=>jU.has(u.code)),l=e?.level==="emergency",c=l?"Disk space critical":"Disk space low";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"sr-only","aria-live":l?"assertive":"polite","aria-atomic":"true",children:s.length>0?`${c}. ${s.map(u=>u.message).join(" ")}`:""}),s.length>0&&(0,a.jsx)("section",{"aria-label":c,className:l?"border-b border-red-300/60 bg-red-50 text-red-950 dark:border-red-500/25 dark:bg-red-500/10 dark:text-red-100":"border-b border-amber-300/60 bg-amber-50 text-amber-950 dark:border-amber-500/25 dark:bg-amber-500/10 dark:text-amber-100",children:(0,a.jsxs)("div",{className:"px-3 py-2.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-(--tracking-caps)",children:[(0,a.jsx)(ai,{className:"h-3.5 w-3.5 shrink-0"}),(0,a.jsx)("span",{children:c})]}),s.map(u=>(0,a.jsx)("p",{className:"mt-1 text-sm",children:u.message},u.code))]})})]})}r(wU,"DiskSpaceBanner");var eo={getStatus:r(()=>je.get("/instance/updates"),"getStatus"),getInstall:r(()=>je.get("/instance/updates/install",{cache:"no-store"}),"getInstall"),liveRuns:r(()=>je.get("/instance/live-runs",{cache:"no-store"}),"liveRuns"),startInstall:r((e,t)=>je.post("/instance/updates/install",{version:e,mode:t}),"startInstall"),forceInstall:r(()=>je.post("/instance/updates/install/force",{}),"forceInstall"),cancelInstall:r(()=>je.delete("/instance/updates/install"),"cancelInstall")};function Lg(e,t){return`${e} ${t}${e===1?"":"s"}`}r(Lg,"plural");function kU(e){return e?new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):""}r(kU,"formatTime$1");function SU({job:e,serverReachable:t}){switch(e.phase){case"waiting":return(0,a.jsxs)("p",{children:["Waiting for ",Lg(e.liveRuns,"run")," to finish. New runs wait until the update is done.",e.waitDeadline?` Gives up at ${kU(e.waitDeadline)} without changing anything.`:""]});case"installing":return(0,a.jsx)("p",{children:t?`Installing Wardmote ${e.toVersion}: database backup, install, then a restart. Database migrations can take a few minutes.`:"The server is restarting. This page reconnects by itself."});case"succeeded":return(0,a.jsxs)("p",{children:["Wardmote ",e.installedVersion??e.toVersion," is installed and running."]});case"cancelled":return(0,a.jsx)("p",{children:e.error??"The update was cancelled. Nothing was installed."});case"failed":return(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("p",{children:e.rolledBackTo?`Updating to ${e.toVersion} failed and Wardmote was rolled back to ${e.rolledBackTo}.`:`Updating to ${e.toVersion} failed.`}),e.error?(0,a.jsx)("p",{className:"text-ink-3",children:e.error}):null,e.logHint?(0,a.jsxs)("p",{className:"text-ink-3",children:["Log: ",(0,a.jsx)("code",{className:"rounded bg-bg-3 px-1 py-0.5 text-xs",children:e.logHint})]}):null]})}}r(SU,"UpdateJobSummary");function NU({open:e,onOpenChange:t,status:s,job:l,serverReachable:c,showResult:u=!1}){const p=kn(),[f,h]=(0,x.useState)(null),[g,v]=(0,x.useState)(null);(0,x.useEffect)(()=>{Xl(l)&&v(l.id)},[l]);const y=l!==null&&(Xl(l)||u||l.id===g),j=me({queryKey:[...$.instance.updates,"live-runs"],queryFn:r(()=>eo.liveRuns(),"queryFn"),enabled:e&&!y,staleTime:0,refetchInterval:e&&!y?3e3:!1}),k=r(({job:_})=>{h(null),v(_.id),p.setQueryData([...$.instance.updates,"install"],{job:_})},"onJob"),S=r(_=>h(_ instanceof Error?_.message:String(_)),"onError"),N=Bt({mutationFn:r(_=>eo.startInstall(s.latestVersion,_),"mutationFn"),onSuccess:k,onError:S}),I=Bt({mutationFn:r(()=>eo.forceInstall(),"mutationFn"),onSuccess:k,onError:S}),C=Bt({mutationFn:r(()=>eo.cancelInstall(),"mutationFn"),onSuccess:k,onError:S}),M=N.isPending||I.isPending||C.isPending,R=j.data?j.data.count+j.data.pendingWakes:null;return(0,a.jsx)(ks,{open:e,onOpenChange:t,children:(0,a.jsxs)($s,{"data-testid":"update-install-dialog",children:[(0,a.jsxs)(bo,{children:[(0,a.jsxs)(Os,{children:["Update Wardmote to ",l&&y?l.toVersion:s.latestVersion]}),(0,a.jsxs)(vo,{children:["Installed ",s.currentVersion,". The update backs up the database, installs the new version and restarts the server. If the new version fails its health check, Wardmote rolls back automatically."]})]}),(0,a.jsxs)("div",{className:"text-sm text-ink","aria-live":"polite",children:[y&&l?(0,a.jsx)(SU,{job:l,serverReachable:c}):R===null?(0,a.jsx)("p",{children:j.isError?"Could not count the active runs.":"Counting active runs..."}):R>0?(0,a.jsx)("p",{children:R===1?"1 run is active now. Stopping it restarts it from its last checkpoint after the update; waiting lets it finish first.":`${R} runs are active now. Stopping them restarts each from its last checkpoint after the update; waiting lets them finish first.`}):(0,a.jsx)("p",{children:"No runs are active. The server restarts briefly."}),f?(0,a.jsx)("p",{role:"alert",className:"mt-2 text-bad",children:f}):null]}),(0,a.jsx)($f,{children:y&&l?l.phase==="waiting"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(oe,{type:"button",variant:"secondary",disabled:M,onClick:r(()=>C.mutate(),"onClick"),children:"Cancel update"}),(0,a.jsxs)(oe,{type:"button",variant:"danger",disabled:M,onClick:r(()=>I.mutate(),"onClick"),children:["Stop ",Lg(l.liveRuns,"run")," and update now"]})]}):l.phase==="succeeded"?(0,a.jsx)(oe,{type:"button",onClick:r(()=>window.location.reload(),"onClick"),children:"Reload"}):(0,a.jsx)(oe,{type:"button",variant:"secondary",onClick:r(()=>t(!1),"onClick"),children:"Close"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(oe,{type:"button",variant:"secondary",disabled:M,onClick:r(()=>t(!1),"onClick"),children:"Cancel"}),R!==null&&R>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(oe,{type:"button",variant:"secondary",disabled:M,onClick:r(()=>N.mutate("wait"),"onClick"),children:"Wait for runs to finish"}),(0,a.jsxs)(oe,{type:"button",variant:"primary",autoFocus:!0,disabled:M,onClick:r(()=>N.mutate("force"),"onClick"),children:["Update and stop ",Lg(R,"run")]})]}):(0,a.jsx)(oe,{type:"button",variant:"primary",autoFocus:!0,disabled:M||R===null,onClick:r(()=>N.mutate("wait"),"onClick"),children:"Update now"})]})})]})})}r(NU,"UpdateInstallDialog");var bA="wardmote.updateNotice.hiddenUntil",Tw="wardmote.updateNotice.seenJob",Rw=36e5,CU=2e3,AU=864e5;function _U(e){return e?.source==="local_implicit"||e?.source==="session"&&e.isInstanceAdmin===!0}r(_U,"canSeeUpdateNotice");function vA(e){try{return window.localStorage.getItem(e)}catch{return null}}r(vA,"readStored$1");function Mw(e,t){try{window.localStorage.setItem(e,t)}catch{}}r(Mw,"writeStored");function Dw(){const e=Number(vA(bA));return Number.isFinite(e)&&e>0?e:null}r(Dw,"readHiddenUntil");var Ow="flex min-w-0 items-center gap-2 border-b border-line bg-accent-soft px-3 py-1.5 text-sm text-ink";function EU({now:e=Date.now}){const t=_U(me({queryKey:$.access.currentBoardAccess,queryFn:r(()=>ti.getCurrentBoardAccess(),"queryFn"),retry:!1,staleTime:3e4}).data),s=me({queryKey:$.instance.updates,queryFn:r(()=>eo.getStatus(),"queryFn"),enabled:t,retry:!1,staleTime:Rw,refetchInterval:Rw}),l=s.data?.install.canInstall===!0,c=me({queryKey:[...$.instance.updates,"install"],queryFn:r(()=>eo.getInstall(),"queryFn"),enabled:t&&l,retry:!1,refetchInterval:r(_=>Xl(_.state.data?.job)||_.state.status==="error"?CU:!1,"refetchInterval")}),u=c.data?.job??null,p=!c.isError,[f,h]=(0,x.useState)(null),[g,v]=(0,x.useState)(Dw),[y,j]=(0,x.useState)(()=>vA(Tw)),k=iR(g,e());(0,x.useEffect)(()=>{if(!k||g===null)return;const _=window.setTimeout(()=>v(Dw()),Math.max(0,g-e())+1e3);return()=>window.clearTimeout(_)},[k,g,e]);const S=s.data;if(!t||!S)return null;const N=u?.finishedAt?e()-Date.parse(u.finishedAt)<AU&&y!==u.id:!1,I=u?.phase==="succeeded"?!S.updateAvailable:u?.phase==="failed"&&S.latestVersion===u.toVersion,C=u!==null&&(Xl(u)||N&&I),M=l?(0,a.jsx)(NU,{open:f!==null,onOpenChange:r(_=>h(_?f??"start":null),"onOpenChange"),status:S,job:u,serverReachable:p,showResult:f==="result"}):null;if(C&&u){const _=u.trigger==="auto"?"Automatic update":"Update",D=u.phase==="waiting"?`${_} to ${u.toVersion} is waiting for ${u.liveRuns} run${u.liveRuns===1?"":"s"} to finish`:u.phase==="installing"?p?`Installing Wardmote ${u.toVersion}...`:"Wardmote is restarting...":u.phase==="succeeded"?`Wardmote ${u.installedVersion??u.toVersion} is installed`:u.rolledBackTo?`${_} to ${u.toVersion} failed and was rolled back to ${u.rolledBackTo}`:`${_} to ${u.toVersion} failed`,U=r(()=>{Mw(Tw,u.id),j(u.id)},"dismiss");return(0,a.jsxs)("section",{"aria-label":"Wardmote update","data-testid":"update-notice","data-phase":u.phase,className:Ow,children:[Xl(u)?(0,a.jsx)(Ma,{className:"size-4 shrink-0 animate-spin text-accent","aria-hidden":"true"}):(0,a.jsx)(ij,{className:`size-4 shrink-0 ${u.phase==="failed"?"text-bad":"text-accent"}`,"aria-hidden":"true"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 truncate font-semibold",role:"status",children:D}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"xs",onClick:r(()=>h("result"),"onClick"),children:"Details"}),Xl(u)?null:(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"xs",onClick:U,children:"Dismiss"}),M]})}if(!S.updateAvailable||!S.latestVersion||k)return null;const R=r(()=>{const _=sR(e());Mw(bA,String(_)),v(_)},"hide");return(0,a.jsxs)("section",{"aria-label":"Wardmote update available","data-testid":"update-notice",className:Ow,children:[(0,a.jsx)(ij,{className:"size-4 shrink-0 text-accent","aria-hidden":"true"}),(0,a.jsxs)("p",{className:"min-w-0 flex-1 truncate",title:`Installed ${S.currentVersion}. ${S.install.command}`,children:[(0,a.jsxs)("b",{className:"font-semibold",children:["Wardmote ",S.latestVersion,(0,a.jsx)("span",{className:"hidden sm:inline",children:" is available"})]}),(0,a.jsxs)("span",{className:"hidden sm:inline",children:[" · installed ",S.currentVersion]}),l?null:(0,a.jsxs)("span",{className:"hidden lg:inline",children:[" · ",(0,a.jsx)("code",{className:"rounded bg-bg px-1 py-0.5 text-xs",children:S.install.command})]})]}),S.releaseNotesUrl?(0,a.jsxs)("a",{href:S.releaseNotesUrl,target:"_blank",rel:"noreferrer",className:"shrink-0 text-sm font-medium text-accent underline-offset-2 hover:underline",children:[(0,a.jsx)("span",{className:"sm:hidden",children:"Notes"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Release notes"})]}):null,l?(0,a.jsx)(oe,{type:"button",variant:"primary",size:"xs",onClick:r(()=>h("start"),"onClick"),children:"Update now"}):null,(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"xs",onClick:R,title:"Hide for 3 days","aria-label":"Hide the update notice for 3 days",children:"Hide"}),M]})}r(EU,"UpdateNotice");var yA=["standalone","fullscreen","window-controls-overlay"];function IU(e){return`(display-mode: ${e})`}r(IU,"displayModeQuery");function TU(){if(!(typeof window>"u"||typeof window.matchMedia!="function"))return window.matchMedia.bind(window)}r(TU,"defaultMatchMedia");function zg(e=TU(),t=typeof navigator>"u"?void 0:navigator.standalone){return t===!0?!0:e?yA.some(s=>e(IU(s)).matches):!1}r(zg,"isChromelessDisplayMode");function yd({label:e,children:t,onClick:s}){return(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm",className:"size-8","aria-label":e,onClick:r(()=>{s()},"onClick"),children:t})}),(0,a.jsx)(Ts,{children:e})]})}r(yd,"ControlButton");function RU(e=typeof window>"u"?null:window.history.state){const t=e?.idx;return typeof t=="number"&&t>0}r(RU,"hasInAppHistory");function MU(){const[e,t]=(0,x.useState)(()=>typeof window<"u"?zg():!1);return(0,x.useEffect)(()=>{if(typeof window>"u")return;const s=r(()=>t(zg()),"update");if(s(),typeof window.matchMedia!="function")return;const l=yA.map(c=>window.matchMedia(`(display-mode: ${c})`));return l.every(c=>typeof c.addEventListener=="function")?(l.forEach(c=>c.addEventListener("change",s)),()=>l.forEach(c=>c.removeEventListener("change",s))):(l.forEach(c=>c.addListener(s)),()=>l.forEach(c=>c.removeListener(s)))},[]),e}r(MU,"useChromeless");function Lw({mobile:e,onNavigateHome:t}){const s=MU(),l=Lf(),c=(0,x.useCallback)(()=>{if(RU()){window.history.back();return}t?t():window.location.assign("/dashboard")},[t]),u=(0,x.useCallback)(()=>{window.location.reload()},[]),p=(0,x.useCallback)(async()=>{const h=window.location.href;try{if(navigator.share){await navigator.share({title:document.title||"Wardmote",url:h});return}await B0(h),l?.pushToast({title:"Link copied",tone:"success"})}catch(g){if(g instanceof DOMException&&g.name==="AbortError")return;l?.pushToast({title:"Share failed",body:"Try opening the page in your browser.",tone:"error"})}},[l]),f=(0,x.useCallback)(()=>{window.open(window.location.href,"_blank","noopener,noreferrer")},[]);return s?(0,a.jsxs)("div",{className:Y("flex items-center gap-1",e?"h-10 border-b border-line bg-bg/95 px-3 backdrop-blur supports-[backdrop-filter]:bg-bg/85":"h-9 border-b border-line px-2"),children:[(0,a.jsx)(yd,{label:"Back",onClick:c,children:(0,a.jsx)(A0,{className:"h-4 w-4"})}),(0,a.jsx)("div",{className:"flex-1"}),(0,a.jsx)(yd,{label:"Refresh",onClick:u,children:(0,a.jsx)(nl,{className:"h-4 w-4"})}),(0,a.jsx)(yd,{label:"Share",onClick:p,children:(0,a.jsx)(RR,{className:"h-4 w-4"})}),(0,a.jsx)(yd,{label:"Open in Browser",onClick:f,children:(0,a.jsx)(US,{className:"h-4 w-4"})})]}):null}r(Lw,"StandaloneBrowserControls");function DU(e){return e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}r(DU,"formatTime");function OU(){const e=w0(),[t,s]=(0,x.useState)(null);return(0,x.useEffect)(()=>{if(!e){s(null);return}let l=!1;const c=new Date;return FE().then(u=>{l||s(u&&u<c?u:c)}),()=>{l=!0}},[e]),e?(0,a.jsxs)("div",{role:"status",className:"flex items-start gap-2 border-b border-line bg-warn-soft px-4 py-2 text-sm text-ink",children:[(0,a.jsx)(BR,{className:"mt-0.5 size-4 shrink-0 text-warn","aria-hidden":"true"}),(0,a.jsxs)("span",{children:[(0,a.jsx)("b",{className:"font-semibold",children:"You are offline."})," ",t?`Showing what was loaded at ${DU(t)}. `:"Showing what was already loaded. ","Approvals and replies wait until you are back."]})]}):null}r(OU,"OfflineBanner");function jA(){return typeof navigator>"u"?null:navigator.windowControlsOverlay??null}r(jA,"overlay");function LU(e){const t=jA();return t?.addEventListener("geometrychange",e),()=>t?.removeEventListener("geometrychange",e)}r(LU,"subscribe$2");function zU(){return(0,x.useSyncExternalStore)(LU,()=>jA()?.visible===!0,()=>!1)}r(zU,"useWindowControlsOverlayVisible");var PU={WebkitAppRegion:"drag",appRegion:"drag"},$U={WebkitAppRegion:"no-drag",appRegion:"no-drag"};function UU(){const{selectedCompanyId:e}=bt(),{inbox:t}=Y0(e);return(0,a.jsxs)("div",{"data-slot":"window-titlebar",className:"flex shrink-0 items-center gap-2 border-b border-line bg-bg px-3 text-xs text-ink-2",style:{...PU,marginLeft:"env(titlebar-area-x, 0px)",width:"env(titlebar-area-width, 100%)",height:"env(titlebar-area-height, 33px)"},children:[(0,a.jsx)(M0,{className:"size-4 shrink-0 text-ink","aria-hidden":"true"}),(0,a.jsx)("span",{className:"font-semibold text-ink",children:"Wardmote"}),(0,a.jsxs)(mn,{to:"/inbox",style:$U,className:"ml-1 inline-flex items-center gap-1 rounded-(--r-sm) px-1.5 py-0.5 hover:bg-bg-3 hover:text-ink","aria-label":t>0?`Inbox, ${t} waiting`:"Inbox",children:["Inbox",t>0?(0,a.jsx)("span",{className:"rounded-(--r-pill) bg-accent px-1.5 text-(length:--text-micro) font-semibold text-accent-ink tabular-nums",children:t}):null]})]})}r(UU,"TitleBarContent");function BU(){return zU()?(0,a.jsx)(UU,{}):null}r(BU,"WindowTitleBar");var KU=16384,qU=40;function FU(e){if(!e)return;const t=[];for(const s of e.slice(0,KU).split(`
|
|
52
|
+
`).slice(0,41)){const l=/^\s*(?:at|in) ([A-Za-z_$][\w$.-]{0,99})(?:\s|$)/.exec(s)?.[1]??/^([A-Za-z_$][\w$.-]{0,99})@/.exec(s)?.[1];if(l&&t.push(` at ${l}`),t.length===qU)break}return t.length?`
|
|
53
|
+
${t.join(`
|
|
54
|
+
`)}`:void 0}r(FU,"sanitizeComponentStack");function wA(){const e={};if(typeof document<"u"){try{const t=document.readyState;(t==="loading"||t==="interactive"||t==="complete")&&(e.ready_state=t)}catch{}try{const t=document.visibilityState;(t==="visible"||t==="hidden")&&(e.visibility_state=t)}catch{}try{const t=document.documentElement.classList;e.translation_marker=t.contains("translated-ltr")||t.contains("translated-rtl")}catch{}}return e}r(wA,"readBrowserErrorState");function HU(e){const t=FU(e.componentStack);return{tags:{react_error_boundary:e.boundary},contexts:{react:t?{componentStack:t}:{},browser_state:wA()}}}r(HU,"buildBrowserErrorContext");var zw=Promise.resolve();function xx(e){const t=zw.then(e);return zw=t.catch(()=>{}),t}r(xx,"enqueue");var po=null;function VU(e,t){return xx(async()=>{if(!po)try{const s=await ke(()=>import("./prod-COP_vZWu.js"),__vite__mapDeps([0,1]));s.init(QU(e,t)),po=s}catch{}})}r(VU,"initBrowserErrorMonitoring");function WU(){return xx(async()=>{const e=po;if(po=null,!e)return;const t=e.getClient();try{e.getCurrentScope().setClient(void 0)}catch{}try{await t?.close(2e3)}catch{}})}r(WU,"teardownBrowserErrorMonitoring");function kA(e,t){let s;try{t&&(s=HU(t))}catch{}xx(async()=>{try{s?po?.captureException(e,s):po?.captureException(e)}catch{}})}r(kA,"captureBrowserException");function QU(e,t){return{dsn:e,environment:t??void 0,release:"59ce2d2bcee63d3b4bf01ebbe1cc9b20a8059efb",tracesSampleRate:0,sendDefaultPii:!1,beforeSend:r((s,l)=>{try{if(s.contexts={...s.contexts,browser_state:s.contexts?.browser_state??wA()},s.tags={...s.tags,browser_build_mode:"production"},s.exception?.values?.some(c=>c.mechanism?.type==="onunhandledrejection"||c.mechanism?.type==="auto.browser.global_handlers.onunhandledrejection")){const c=l.originalException;s.tags.browser_rejection_kind=c===null?"null":typeof c}}catch{}return s},"beforeSend"),integrations:r(s=>s.filter(l=>l.name!=="HttpContext"&&l.name!=="Breadcrumbs"),"integrations")}}r(QU,"buildBrowserSentryInitOptions");var GU=class extends x.Component{static{r(this,"RouteErrorBoundaryInner")}state={error:null};static getDerivedStateFromError(e){return{error:e instanceof Error?e:new Error(String(e))}}componentDidCatch(e,t){kA(e,{boundary:"route",componentStack:t.componentStack})}componentDidUpdate(e){this.state.error&&e.resetKey!==this.props.resetKey&&this.setState({error:null})}render(){const{error:e}=this.state;return e?(0,a.jsxs)("div",{className:"mx-auto max-w-2xl space-y-4 px-4 py-10",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-lg font-semibold",children:"This page hit an error"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"Something went wrong while rendering this page. You can go back and try again, or reload."})]}),(0,a.jsx)("pre",{className:"overflow-auto rounded-md border border-bad/30 bg-bad/10 px-3 py-2 text-xs text-bad whitespace-pre-wrap",children:e.message}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:this.props.onReset,children:"Go back"}),(0,a.jsx)(oe,{size:"sm",onClick:r(()=>window.location.reload(),"onClick"),children:"Reload page"})]})]}):this.props.children}};function YU({children:e}){const t=hn(),s=ja(),l=`${t.pathname}${t.search}`;return(0,a.jsx)(GU,{resetKey:l,onReset:r(()=>s(-1),"onReset"),children:e})}r(YU,"RouteErrorBoundary");function XU({open:e,onOpenChange:t,...s}){return(0,a.jsx)(ks,{open:e,onOpenChange:t,children:(0,a.jsxs)($s,{"aria-describedby":void 0,className:"gap-0 overflow-hidden p-0 sm:max-w-md",children:[(0,a.jsxs)("div",{className:"px-4 pt-4 pb-3",children:[(0,a.jsx)(Os,{children:"Chat with an agent"}),s.existingChatAgentIds&&(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"One conversation per agent. Pick up where you left off."})]}),(0,a.jsx)(ZU,{...s,onComplete:r(()=>t(!1),"onComplete")},String(e))]})})}r(XU,"AgentChatPicker");function ZU({agents:e,onSelect:t,onComplete:s,loading:l,error:c,onRetry:u,existingChatAgentIds:p,renderAgentIcon:f}){const h=(0,x.useRef)(!1),g=(0,x.useRef)(null);(0,x.useEffect)(()=>(h.current=!0,()=>{h.current=!1,g.current?.abort()}),[]);const[v,y]=(0,x.useState)(""),[j,k]=(0,x.useState)(null),[S,N]=(0,x.useState)(null);async function I(C){if(j)return;k(C.id),N(null);const M=new AbortController;g.current=M;try{await t(C,M.signal),h.current&&s()}catch(R){N(R instanceof Error?R.message:"Couldn’t open chat. Try again.")}finally{k(null)}}return r(I,"selectAgent"),(0,a.jsxs)(e1,{children:[(0,a.jsx)(z0,{"aria-label":"Search agents by name or role",placeholder:"Search by name or role…",value:v,onValueChange:y}),S&&(0,a.jsx)("p",{role:"alert",className:"px-4 py-3 text-sm text-bad",children:S}),j&&(0,a.jsx)("p",{role:"status",className:"sr-only",children:"Opening conversation…"}),c?(0,a.jsxs)("div",{role:"alert",className:"flex flex-col items-start gap-2 p-4 text-sm",children:[(0,a.jsx)("p",{children:"Couldn’t load agents. Try again."}),u&&(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:u,children:"Retry"})]}):l?(0,a.jsx)("p",{role:"status",className:"p-4 text-sm text-ink-3",children:"Loading agents…"}):(0,a.jsxs)($0,{children:[(0,a.jsx)(P0,{children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 px-4",children:[(0,a.jsx)("span",{children:e.length?`No agents match “${v}”`:"No agents yet."}),e.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Try another name or role."}),(0,a.jsx)(oe,{variant:"ghost",size:"sm",onClick:r(()=>y(""),"onClick"),children:"Clear search"})]}):(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Create an agent from the Agents page to start chatting."})]})}),(0,a.jsx)(Xs,{children:e.map(C=>(0,a.jsxs)(wn,{value:C.id,keywords:[C.name,C.title??"",C.role],onSelect:r(()=>{I(C)},"onSelect"),disabled:j!==null,className:"gap-3 px-3 py-3",children:[f?f(C):(0,a.jsx)(ig,{icon:C.icon,className:"size-4 shrink-0"}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"truncate font-medium",children:C.name}),(0,a.jsx)("span",{className:"truncate text-xs text-ink-3",children:C.title??C.role})]}),p&&(0,a.jsx)("span",{className:"shrink-0 text-xs text-ink-3",children:p.includes(C.id)?"Open chat":"New chat"}),C.status==="paused"&&(0,a.jsx)("span",{className:"text-xs text-(--status-agent-paused)",children:"Paused"}),C.status==="terminated"&&(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Terminated"}),C.status==="pending_approval"&&(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Awaiting approval"})]},C.id))})]})]})}r(ZU,"AgentChatPickerResults");function JU({agents:e,existingChatAgentIds:t,availableAgents:s=e,activeId:l,previews:c={},loading:u=!1,error:p,onRetry:f,initialSearch:h="",onSelect:g,onBrowse:v,onAddChat:y,historyLoading:j,historyError:k,onRetryHistory:S}){const N=ja(),[I,C]=(0,x.useState)(!1),[M,R]=(0,x.useState)(h),_=(0,x.useRef)(null),D=(0,x.useId)(),U=M.trim().toLocaleLowerCase(),K=e.filter(E=>`${E.name} ${E.title??""} ${E.role}`.toLocaleLowerCase().includes(U));function z(){R(""),_.current?.focus()}return r(z,"focusSearch"),(0,a.jsxs)("aside",{"aria-labelledby":D,className:"flex h-full min-h-0 flex-col border-r border-line bg-bg",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col gap-4 px-3 pb-4 pt-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("h2",{id:D,className:"text-sm font-semibold",children:"Chat"}),(0,a.jsx)(oe,{variant:"secondary",size:"icon-sm","aria-label":"Add chat",title:"Add chat",onClick:r(()=>C(!0),"onClick"),children:(0,a.jsx)(as,{className:"size-4"})})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(pr,{"aria-hidden":"true",className:"pointer-events-none absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-ink-3"}),(0,a.jsx)(Wn,{ref:_,"aria-label":"Search agents",placeholder:"Find an agent",value:M,onChange:r(E=>R(E.target.value),"onChange"),onKeyDown:r(E=>{E.key==="Escape"&&(E.stopPropagation(),R(""))},"onKeyDown"),className:"h-8 pl-8 pr-8 text-xs md:text-xs"}),M&&(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs","aria-label":"Clear search",className:"absolute right-1 top-1/2 -translate-y-1/2",onClick:z,children:(0,a.jsx)(ia,{className:"size-3"})})]})]}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-3 pb-3 scrollbar-auto-hide",children:[(0,a.jsx)("p",{className:"px-2 text-(length:--text-micro) font-medium uppercase tracking-widest text-ink-3",children:U?"Search results":"Teammates"}),(0,a.jsx)("span",{role:"status",className:"sr-only",children:u?"Loading agents":`${K.length} ${K.length===1?"agent":"agents"}`}),j&&(0,a.jsx)("p",{role:"status",className:"px-2 text-xs text-ink-3",children:"Loading chat history…"}),k&&(0,a.jsxs)("div",{role:"alert",className:"flex flex-col items-start gap-2 px-2 py-3",children:[(0,a.jsx)("p",{className:"text-xs text-ink-3",children:"Some chat history couldn’t load."}),(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:S,children:"Retry chat history"})]}),p?(0,a.jsxs)("div",{role:"alert",className:"flex flex-col items-start gap-2 px-2 py-6",children:[(0,a.jsx)("p",{className:"text-sm",children:"Couldn’t load your chats."}),(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:f,children:"Try again"})]}):u?(0,a.jsx)("div",{"aria-hidden":"true",className:"flex flex-col gap-1",children:[0,1,2,3].map(E=>(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-md px-2 py-3 motion-safe:animate-pulse",children:[(0,a.jsx)("div",{className:"size-8 shrink-0 rounded-lg bg-bg-3"}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-2",children:[(0,a.jsx)("div",{className:"h-3 w-2/3 rounded-sm bg-bg-3"}),(0,a.jsx)("div",{className:"h-2 w-full rounded-sm bg-bg-3"})]})]},E))}):K.length?(0,a.jsx)("nav",{"aria-label":"Agent conversations",className:"flex flex-col gap-1",children:K.map(E=>(0,a.jsxs)(mn,{to:`/chats/${encodeURIComponent(E.status==="terminated"?E.id:fr(E))}`,"aria-current":l===E.id?"page":void 0,title:`${E.name}${E.title?` · ${E.title}`:""}`,onClick:r(B=>{g&&(B.preventDefault(),g(E))},"onClick"),className:Y("flex min-w-0 items-center gap-3 rounded-md px-2 py-3 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus",l===E.id?oo.active:oo.rest),children:[(0,a.jsx)(mr,{agent:E,size:32}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"truncate text-sm font-medium",children:E.name}),(0,a.jsx)("span",{className:"truncate text-xs text-ink-3",children:E.status==="terminated"?"Terminated":E.status==="paused"?"Paused":c[E.id]??E.title??"Start a conversation"})]})]},E.id))}):!e.length&&(j||k)?null:(0,a.jsxs)("div",{className:"flex flex-col items-start gap-2 px-2 py-6",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.length?"No agents found":"No chats yet"}),(0,a.jsx)("p",{className:"text-xs leading-relaxed text-ink-3",children:e.length?"Try another name or role.":"Choose an agent to start a conversation."}),!e.length&&(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:r(()=>C(!0),"onClick"),children:"Choose an agent"}),e.length>0&&(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:z,children:"Clear search"})]})]}),(0,a.jsx)("div",{className:"shrink-0 px-3 py-4",children:(0,a.jsx)(oe,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2 px-2",asChild:!v,onClick:v,children:v?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Gr,{className:"size-4"}),"Browse all agents"]}):(0,a.jsxs)(mn,{to:"/agents/all",children:[(0,a.jsx)(Gr,{className:"size-4"}),"Browse all agents"]})})}),(0,a.jsx)(XU,{agents:s,open:I,onOpenChange:C,existingChatAgentIds:t??e.map(E=>E.id),loading:u,error:p,onRetry:f,renderAgentIcon:r(E=>(0,a.jsx)(mr,{agent:E,size:32}),"renderAgentIcon"),onSelect:r(async(E,B)=>{y?await y(E,B):g?await g(E,B):N(`/chats/${encodeURIComponent(fr(E))}`),B?.aborted||R("")},"onSelect")})]})}r(JU,"AgentConversationSidebar");function e8(){const{selectedCompanyId:e}=bt(),{enabled:t,loaded:s}=Pf(),l=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),c=l.data?.user?.id??l.data?.session?.userId??null;return{companyId:e,userId:c,enabled:t,loaded:s,agents:me({queryKey:$.agents.list(e),queryFn:r(()=>Ha.list(e),"queryFn"),enabled:t&&!!e}),chats:me({queryKey:$.agentChats.list(e,c),queryFn:r(()=>i1.list(e),"queryFn"),enabled:t&&!!e&&l.isSuccess}),session:l}}r(e8,"useAgentChatNavigation");function t8(e,t){const s=kn(),l=ja(),{isMobile:c,setSidebarOpen:u}=Jn(),p=(0,x.useRef)({companyId:e,userId:t,mounted:!0});return(0,x.useEffect)(()=>{const f={companyId:e,userId:t,mounted:!0};return p.current=f,()=>{f.mounted=!1}},[e,t]),(0,x.useCallback)(async(f,h)=>{if(!e||f.companyId!==e)throw new Error("Choose an agent from this company.");const g=p.current,v=await i1.ensure(e,f.id);s.setQueryData($.agentChats.detail(e,t,f.id),v),s.setQueryData($.issues.detail(v.id),v),s.setQueryData($.agentChats.list(e,t),y=>[v,...(y??[]).filter(j=>j.id!==v.id)].sort((j,k)=>new Date(k.updatedAt).getTime()-new Date(j.updatedAt).getTime()||k.id.localeCompare(j.id))),!(!g.mounted||p.current!==g||h?.aborted)&&(l(`/chats/${encodeURIComponent(fr(f))}`),c&&u(!1))},[s,e,t,l,c,u])}r(t8,"useOpenAgentChat");function n8(){const{companyId:e,userId:t,agents:s,chats:l,session:c}=e8(),u=t8(e,t),p=ja(),f=Q0(e),{isMobile:h,setSidebarOpen:g}=Jn(),{pathname:v}=hn(),y=v.split("/chats/")[1]?.split("/")[0],j=s.data??[],k=s.isSuccess?[...new Set((l.data??[]).flatMap(D=>D.conversationAgentId&&!j.some(U=>U.id===D.conversationAgentId)?[D.conversationAgentId]:[]))]:[],S=Ef({queries:k.map(D=>({queryKey:$.agents.detail(D),queryFn:r(()=>Ha.get(D,e),"queryFn")}))}),N=new Map(j.map(D=>[D.id,D]));for(const D of S)D.data&&N.set(D.data.id,D.data);const I=[...N.values()].find(D=>D.id===y||D.status!=="terminated"&&encodeURIComponent(fr(D))===y),C=(l.data??[]).flatMap(D=>{const U=D.conversationAgentId?N.get(D.conversationAgentId):void 0;return U?[U]:[]});I&&!C.some(D=>D.id===I.id)&&C.unshift(I);const M=new Set(C.map(D=>D.id)),R=j.filter(D=>!M.has(D.id)&&D.status!=="terminated"&&(!f.isSuccess||ON(f.data,"agent",D.id)!=="left")).sort((D,U)=>D.name.localeCompare(U.name,void 0,{sensitivity:"base"})),_=Object.fromEntries((l.data??[]).filter(D=>D.conversationState==="active").map(D=>[D.conversationAgentId,"Working…"]));return(0,a.jsx)(JU,{agents:[...C,...R],availableAgents:j,existingChatAgentIds:C.map(D=>D.id),activeId:I?.id,previews:_,loading:s.isPending||l.isPending||c.isPending,error:s.error??l.error??c.error,onRetry:r(()=>{s.refetch(),l.refetch(),c.refetch()},"onRetry"),historyLoading:S.some(D=>D.isPending),historyError:S.find(D=>D.error)?.error,onRetryHistory:r(()=>{S.filter(D=>D.isError).forEach(D=>{D.refetch()})},"onRetryHistory"),onAddChat:u,onSelect:r(D=>{p(`/chats/${encodeURIComponent(D.status==="terminated"?D.id:fr(D))}`),h&&g(!1)},"onSelect")},`${e}:${t}`)}r(n8,"AgentConversationsSidebar");var jd=232,Pg=208,$g=420,Pw=16;function gf(e){return Math.min($g,Math.max(Pg,e))}r(gf,"clampSidebarWidth");function $w(e){if(typeof window>"u")return jd;try{const t=window.localStorage.getItem(e);if(!t)return jd;const s=Number.parseInt(t,10);return Number.isFinite(s)?gf(s):jd}catch{return jd}}r($w,"readStoredSidebarWidth");function Uw(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,String(gf(t)))}catch{}}r(Uw,"writeStoredSidebarWidth");function a8({children:e,open:t,collapsed:s=!1,peeking:l=!1,resizable:c=!1,storageKey:u="wardmote.sidebar.width",className:p,onPanelMouseEnter:f,onPanelMouseLeave:h,onPanelFocusCapture:g,onPanelBlurCapture:v}){const[y,j]=(0,x.useState)(()=>$w(u)),[k,S]=(0,x.useState)(!1),N=(0,x.useRef)(y),I=(0,x.useRef)(null);(0,x.useEffect)(()=>{const V=$w(u);N.current=V,j(V)},[u]);const C=t?y:0,M=t?s?72:C:0,R=t?s&&!l?72:C:0,_=R>M,D=c&&t&&!s,U=(0,x.useMemo)(()=>({width:`${M}px`}),[M]),K=(0,x.useMemo)(()=>({width:`${R}px`}),[R]),z=(0,x.useCallback)(V=>{const ue=gf(V);N.current=ue,j(ue),Uw(u,ue)},[u]),E=(0,x.useCallback)(V=>{D&&(V.preventDefault(),V.currentTarget.setPointerCapture(V.pointerId),I.current={startX:V.clientX,startWidth:N.current},S(!0))},[D]),B=(0,x.useCallback)(V=>{if(!I.current)return;const ue=gf(I.current.startWidth+V.clientX-I.current.startX);N.current=ue,j(ue)},[]),O=(0,x.useCallback)(()=>{I.current&&(I.current=null,S(!1),Uw(u,N.current))},[u]),Q=(0,x.useCallback)(V=>{D&&(V.key==="ArrowLeft"?(V.preventDefault(),z(y-Pw)):V.key==="ArrowRight"?(V.preventDefault(),z(y+Pw)):V.key==="Home"?(V.preventDefault(),z(Pg)):V.key==="End"&&(V.preventDefault(),z($g)))},[D,z,y]);return(0,a.jsxs)("div",{className:Y("relative h-full shrink-0",p),style:U,children:[(0,a.jsx)("div",{className:Y("absolute inset-y-0 left-0 flex flex-col overflow-hidden",_?"z-30 border-r border-line bg-bg shadow-lg":"z-0"),style:K,"data-sidebar-overlay":_?"":void 0,onMouseEnter:f,onMouseLeave:h,onFocusCapture:g,onBlurCapture:v,children:e}),D?(0,a.jsx)("div",{role:"separator","aria-label":"Resize sidebar","aria-orientation":"vertical","aria-valuemin":Pg,"aria-valuemax":$g,"aria-valuenow":y,tabIndex:0,"data-dragging":k?"":void 0,className:"group absolute inset-y-0 z-20 cursor-col-resize touch-none outline-none",style:{right:-4,width:8},onPointerDown:E,onPointerMove:B,onPointerUp:O,onPointerCancel:O,onLostPointerCapture:O,onKeyDown:Q,children:(0,a.jsx)("div",{className:Y("mx-auto h-full w-0.5 transition-colors",k?"bg-focus":"bg-transparent group-hover:bg-focus group-focus-visible:bg-focus")})}):null]})}r(a8,"SidebarShell");function wd({children:e,className:t}){return(0,a.jsx)("div",{"data-secondary-sidebar":"",className:Y("h-full w-full min-w-0 overflow-hidden",t),children:(0,a.jsx)(GS,{children:e})})}r(wd,"SecondarySidebar");function s8(e,t){if(!t)return!1;if(t.source==="local_implicit"||t.isInstanceAdmin)return!0;if(!e)return!1;const s=t.memberships?.find(l=>l.companyId===e&&l.status==="active");return s?.membershipRole==="owner"||s?.membershipRole==="admin"||s?.membershipRole==="operator"||s?.membershipRole==="member"}r(s8,"canInviteCompanyMembers");function i8(){const e=nI(),t=me({queryKey:$.access.currentBoardAccess,queryFn:r(()=>ti.getCurrentBoardAccess(),"queryFn"),retry:!1,staleTime:3e4});return s8(e?.selectedCompanyId,t.data)}r(i8,"useCanInviteCompanyMembers");function r8(e){return e?.trim().toLowerCase().replace(/['"]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||null}r(r8,"slugifyUserPart");function l8(e){const t=[e?.id,e?.name,e?.email?.split("@")[0],e?.email];for(const s of t){const l=r8(s);if(l)return`/u/${l}`}return"/u/me"}r(l8,"userProfilePath");var zc=null,SA=!1,Ug=!1,Bg=new Set;function Pc(){for(const e of Bg)e()}r(Pc,"emit");function o8(e=typeof navigator>"u"?"":navigator.userAgent,t=typeof navigator>"u"?0:navigator.maxTouchPoints){return/iPhone|iPad|iPod/i.test(e)?!0:/Macintosh/i.test(e)&&t>1}r(o8,"isIosSafariLike");function c8(e=window){const t=r(l=>{l.preventDefault(),zc=l,Pc()},"onPrompt"),s=r(()=>{zc=null,SA=!0,Pc()},"onInstalled");return e.addEventListener("beforeinstallprompt",t),e.addEventListener("appinstalled",s),()=>{e.removeEventListener("beforeinstallprompt",t),e.removeEventListener("appinstalled",s)}}r(c8,"captureInstallPrompt");function u8(){return SA||zg()?"installed":zc?"prompt":o8()?"ios-manual":"unavailable"}r(u8,"installAvailability");async function d8(){const e=zc;if(!e)return"unavailable";zc=null,Pc(),await e.prompt();const{outcome:t}=await e.userChoice;return t}r(d8,"promptInstall");function Kg(e){Ug!==e&&(Ug=e,Pc())}r(Kg,"setIosInstallHelpOpen");function f8(){return Ug}r(f8,"iosInstallHelpOpen");function p8(){return(0,x.useSyncExternalStore)(bx,f8,()=>!1)}r(p8,"useIosInstallHelpOpen");function bx(e){return Bg.add(e),()=>{Bg.delete(e)}}r(bx,"subscribe$1");function NA(){return(0,x.useSyncExternalStore)(bx,u8,()=>"unavailable")}r(NA,"useInstallAvailability");function SY(e){const t=NA();return(0,x.useSyncExternalStore)(bx,()=>g8(t,e),()=>!1)}r(SY,"useInstallNudgeVisible");var m8=2592e6,qg="wardmote.install.visits",Bw="wardmote.install.visit-counted",CA="wardmote.install.snoozed-until";function Fg(e,t){const s=Number(e.getItem(t));return Number.isFinite(s)?s:0}r(Fg,"readNumber");function h8(e=window.localStorage,t=window.sessionStorage){try{if(t.getItem(Bw))return;t.setItem(Bw,"1"),e.setItem(qg,String(Fg(e,qg)+1))}catch{return}}r(h8,"recordAppVisit");function g8(e,t,s=Date.now(),l=window.localStorage){if(e!=="prompt"&&e!=="ios-manual"||/^\/(?:[^/]+\/)?onboarding(?:\/|$)/.test(t))return!1;try{return Fg(l,qg)>=3&&Fg(l,CA)<=s}catch{return!1}}r(g8,"installNudgeVisible");function NY(e=Date.now(),t=window.localStorage){try{t.setItem(CA,String(e+m8))}catch{return}finally{Pc()}}r(NY,"snoozeInstallNudge");var Kw="Install app",x8="Add Wardmote to your home screen or dock.";function b8({variant:e,onAfterAction:t}){const s=NA();if(s==="installed"||s==="unavailable")return null;const l=r(()=>{s==="ios-manual"?Kg(!0):d8(),t?.()},"handleClick");return e==="compact-menu-action"?(0,a.jsxs)("button",{type:"button",className:"flex h-(--profile-popover-row-height) w-full items-center gap-(--profile-popover-row-gap) rounded-lg px-2.5 text-left text-(length:--text-compact) font-medium leading-(--profile-popover-label-line-height) text-ink transition-colors hover:bg-bg-3",onClick:l,children:[(0,a.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,a.jsx)(bg,{className:"size-4"})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:Kw})]}):(0,a.jsxs)("button",{type:"button",className:"flex w-full items-start gap-3 rounded-xl px-3 py-3 text-left transition-colors hover:bg-bg-3/60",onClick:l,children:[(0,a.jsx)("span",{className:"mt-0.5 rounded-lg border border-line bg-bg/70 p-2 text-ink-3",children:(0,a.jsx)(bg,{className:"size-4"})}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block text-sm font-medium text-ink",children:Kw}),(0,a.jsx)("span",{className:"block text-xs text-ink-3",children:x8})]})]})}r(b8,"InstallAppMenuAction");function v8(){const e=p8();return(0,a.jsx)(ks,{open:e,onOpenChange:Kg,children:(0,a.jsxs)($s,{children:[(0,a.jsxs)(bo,{children:[(0,a.jsx)(Os,{children:"Install Wardmote"}),(0,a.jsx)(vo,{children:"Add Wardmote to your Home Screen from Safari."})]}),(0,a.jsxs)("ol",{className:"space-y-3 text-sm text-ink",children:[(0,a.jsxs)(_h,{index:1,icon:(0,a.jsx)(MR,{className:"size-4"}),children:["Tap ",(0,a.jsx)("strong",{children:"Share"})," in the Safari toolbar."]}),(0,a.jsxs)(_h,{index:2,icon:(0,a.jsx)(OR,{className:"size-4"}),children:["Choose ",(0,a.jsx)("strong",{children:"Add to Home Screen"}),"."]}),(0,a.jsxs)(_h,{index:3,children:["Keep ",(0,a.jsx)("strong",{children:"Open as Web App"})," on, then tap ",(0,a.jsx)("strong",{children:"Add"}),"."]})]}),(0,a.jsx)($f,{children:(0,a.jsx)(oe,{type:"button",onClick:r(()=>Kg(!1),"onClick"),children:"Done"})})]})})}r(v8,"IosInstallHelpDialog");function _h({index:e,icon:t,children:s}){return(0,a.jsxs)("li",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-full border border-line text-xs font-semibold text-ink-3",children:e}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t?(0,a.jsx)("span",{className:"text-ink-3",children:t}):null,(0,a.jsx)("span",{children:s})]})]})}r(_h,"InstallStep");function y8(e){if(!e)return"Unavailable";const t=new Date(e);return Number.isNaN(t.getTime())?"Unavailable":new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(t)}r(y8,"formatTimestamp");function j8(e){return!!e&&!Number.isNaN(new Date(e).getTime())}r(j8,"isValidTimestamp");function w8(e){return e?.devServer?.lastRestartAt??e?.serverInfo?.processStartedAt??null}r(w8,"restartTimestamp");function k8(e){const t=e?.serverInfo?.git;return t?.available?`${t.shortSha} · ${t.subject}`:"Commit unavailable"}r(k8,"commitLabel");function S8(e){const t=e?.serverInfo?.git;if(!t?.available)return"Unavailable";const s=t.localChanges;if(!s||!s.available)return"Change status unavailable";if(!s.hasLocalChanges)return"Clean checkout";const l=[[s.stagedFileCount,"staged"],[s.unstagedFileCount,"unstaged"],[s.untrackedFileCount,"untracked"]].filter(([c])=>Number(c)>0).map(([c,u])=>`${c} ${u}`);return l.length>0?`Local changes present (${l.join(", ")})`:"Local changes present"}r(S8,"localChangesLabel");function Eh({icon:e,label:t,value:s,dateTime:l}){return(0,a.jsxs)("div",{className:"flex w-full items-start gap-3 rounded-xl px-3 py-3 text-left",children:[(0,a.jsx)("span",{className:"mt-0.5 rounded-lg border border-line bg-bg/70 p-2 text-ink-3",children:(0,a.jsx)(e,{className:"size-4"})}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block text-sm font-medium text-ink",children:t}),l?(0,a.jsx)("time",{dateTime:l,className:"block break-words text-xs text-ink-3",children:s}):(0,a.jsx)("span",{className:"block break-words text-xs text-ink-3",children:s})]})]})}r(Eh,"ServerInfoRow");function N8(){const e=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")}).data?.enableServerInfoDebugView===!0,t=me({queryKey:$.health,queryFn:r(()=>Fc.get(),"queryFn"),enabled:e,refetchOnMount:"always",refetchInterval:r(v=>v.state.data?.devServer?.enabled?2e3:!1,"refetchInterval")});if(!e)return null;const s=t.data,l=t.isLoading&&!s,c=t.isError,u=w8(s),p=j8(u),f=c?"Health unavailable":l?"Loading...":y8(u),h=c?"Health unavailable":l?"Loading...":k8(s),g=c?"Health unavailable":l?"Loading...":S8(s);return(0,a.jsxs)("div",{className:"mt-2 border-t border-line pt-2",children:[(0,a.jsx)("p",{className:"px-3 pb-1 pt-1 text-(length:--text-micro) font-medium uppercase tracking-wide text-ink-3",children:"Server"}),(0,a.jsx)(Eh,{icon:b1,label:"Last restarted",value:f,dateTime:!c&&!l&&p?u:null}),(0,a.jsx)(Eh,{icon:xR,label:"Running commit",value:h}),(0,a.jsx)(Eh,{icon:fR,label:"Checkout state",value:g})]})}r(N8,"SidebarServerInfo");var C8="/company/settings/members?tab=invites",A8="https://github.com/tickernelz/wardmote/tree/main/docs",_8="https://github.com/tickernelz/wardmote/issues";function E8(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length>=2?`${t[0]?.[0]??""}${t[t.length-1]?.[0]??""}`.toUpperCase():e.slice(0,2).toUpperCase()}r(E8,"deriveInitials");function Ih({label:e,icon:t,onClick:s,href:l,external:c=!1}){const u="flex h-(--profile-popover-row-height) w-full items-center gap-(--profile-popover-row-gap) rounded-lg px-2.5 text-left text-(length:--text-compact) font-medium leading-(--profile-popover-label-line-height) text-ink transition-colors hover:bg-bg-3",p=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,a.jsx)(t,{className:"size-4"})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e})]});return l?c?(0,a.jsx)("a",{href:l,target:"_blank",rel:"noreferrer",className:u,onClick:s,children:p}):(0,a.jsx)(mn,{to:l,className:u,onClick:s,children:p}):(0,a.jsx)("button",{type:"button",className:u,onClick:s,children:p})}r(Ih,"MenuAction");function qw({deploymentMode:e,open:t,onOpenChange:s,forceExpanded:l=!1}){const{hidden:c,loaded:u}=gr(),p=i8()?C8:null,f=u&&p!==null&&!Fd(c,"company.members")&&!Fd(c,"company.invites"),[h,g]=(0,x.useState)(!1),{isMobile:v,setSidebarOpen:y,collapsed:j,peeking:k}=Jn(),S=j&&!k&&!l,N=t??h,I=s??g,{data:C}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),M=ox({onSignedOut:K}),R=C?.user.name?.trim()||"Board",_=C?.user.email?.trim()||(e==="authenticated"?"Signed in":"Local workspace board"),D=E8(R),U=l8(C?.user);function K(){I(!1),v&&y(!1)}r(K,"closeNavigationChrome");function z(){M.mutate()}return r(z,"handleSignOut"),(0,a.jsx)("div",{className:"bg-line/50 px-3 py-2 dark:bg-bg-3",children:(0,a.jsxs)("div",{className:Y("flex items-center gap-0.5",!S&&"px-2"),children:[(0,a.jsxs)(ws,{open:N,onOpenChange:I,children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",className:Y("flex min-w-0 items-center gap-2.5 rounded-lg text-left text-(length:--text-compact) font-medium text-ink/80 transition-colors hover:bg-bg-3 hover:text-ink",S?"w-full px-3 py-2":"flex-1 px-2 py-1.5"),"aria-label":"Open account menu",children:[(0,a.jsxs)(Yd,{size:"sm",children:[C?.user.image?(0,a.jsx)(Qd,{src:C.user.image,alt:R}):null,(0,a.jsx)(Gd,{children:D})]}),(0,a.jsx)("span",{className:Y("min-w-0 flex-1 truncate",S&&"block w-0 min-w-0 -ms-2.5 overflow-hidden whitespace-nowrap text-transparent select-none"),children:R})]})}),(0,a.jsxs)(js,{side:"top",align:"start",sideOffset:10,className:"min-h-(--profile-popover-min-height) w-(--profile-popover-width) max-w-(--sz-calc-24) overflow-hidden rounded-xl border-line bg-bg-2 p-0 shadow-(--shadow-profile-popover)",children:[(0,a.jsxs)("div",{className:"relative flex h-(--profile-popover-header-height) shrink-0 items-center gap-2.5 px-3.5",children:[(0,a.jsx)(mn,{to:U,"aria-label":"View profile",onClick:K,className:"absolute inset-0 transition-colors hover:bg-bg-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus"}),(0,a.jsxs)(Yd,{className:"pointer-events-none relative size-9",children:[C?.user.image?(0,a.jsx)(Qd,{src:C.user.image,alt:R}):null,(0,a.jsx)(Gd,{className:"text-xs text-ink",children:D})]}),(0,a.jsxs)("div",{className:"pointer-events-none relative min-w-0 flex-1",children:[(0,a.jsx)("h2",{className:"truncate text-sm font-semibold leading-(--profile-popover-label-line-height) text-ink",children:R}),(0,a.jsx)("p",{className:"truncate text-(length:--text-micro) leading-(--profile-popover-meta-line-height) text-ink-3",children:_})]})]}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-0.5 border-t border-line px-2.5 pb-2.5 pt-2",children:[(0,a.jsx)(Ih,{label:"Settings",icon:WS,href:"/company/settings",onClick:K}),f&&p?(0,a.jsx)(Ih,{label:"Invite",icon:yN,href:p,onClick:K}):null,(0,a.jsx)(Ih,{label:"Documentation",icon:MS,href:A8,external:!0,onClick:r(()=>I(!1),"onClick")}),(0,a.jsx)(S3,{variant:"compact-menu-action",onAfterToggle:r(()=>I(!1),"onAfterToggle")}),(0,a.jsx)(b8,{variant:"compact-menu-action",onAfterAction:r(()=>I(!1),"onAfterAction")}),e==="authenticated"?(0,a.jsxs)("button",{type:"button",className:Y("flex h-(--profile-popover-row-height) w-full items-center gap-(--profile-popover-row-gap) rounded-lg px-2.5 text-left text-(length:--text-compact) font-medium leading-(--profile-popover-label-line-height) text-ink transition-colors hover:bg-bad/10",M.isPending&&"cursor-not-allowed opacity-60"),onClick:z,disabled:M.isPending,children:[(0,a.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,a.jsx)(Uf,{className:"size-4"})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:M.isPending?"Signing out...":"Sign out"})]}):null,(0,a.jsx)(N8,{})]})]})]}),S?null:(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)("a",{href:_8,target:"_blank",rel:"noreferrer","aria-label":"Share feedback",className:"flex size-8 shrink-0 items-center justify-center rounded-lg text-ink-3/50 transition-colors hover:bg-bg-3 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",children:(0,a.jsx)(_0,{className:"h-4 w-4","aria-hidden":"true"})})}),(0,a.jsx)(Ts,{side:"top",children:"Share feedback"})]})]})})}r(qw,"SidebarAccountMenu");var I8=["input","textarea","select","[contenteditable='true']","[contenteditable='plaintext-only']","[role='textbox']","[role='combobox']"].join(", "),T8="[data-page-search-target='true']",R8=new Set(["Shift","Meta","Control","Alt"]);function ko(e){return e instanceof HTMLElement?e.isContentEditable?!0:!!e.closest(I8):!1}r(ko,"isKeyboardShortcutTextInputTarget");function Hg(e=document){return!!e.querySelector("[role='dialog'][aria-modal='true']")}r(Hg,"hasBlockingShortcutDialog");function M8(e){if(!e.isConnected||"disabled"in e&&typeof e.disabled=="boolean"&&e.disabled||e.closest("[hidden], [aria-hidden='true'], [inert]")||e.closest("[role='dialog'][aria-modal='true']"))return!1;const t=window.getComputedStyle(e);return t.display==="none"||t.visibility==="hidden"?!1:e.getClientRects().length>0||e===document.activeElement}r(M8,"isVisibleShortcutTarget");function D8(e=document){return Array.from(e.querySelectorAll(T8)).find(t=>M8(t))??null}r(D8,"findPageSearchShortcutTarget");function O8(e=document){const t=D8(e);return t?(t.focus(),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.select(),!0):!1}r(O8,"focusPageSearchShortcutTarget");function L8({key:e,isComposing:t}){return e==="Enter"&&!t}r(L8,"shouldBlurPageSearchOnEnter");function z8({key:e,isComposing:t,currentValue:s}){return e==="Escape"&&!t&&s.length===0}r(z8,"shouldBlurPageSearchOnEscape");function np(e){return R8.has(e)}r(np,"isModifierOnlyKey");function CY({defaultPrevented:e,key:t,metaKey:s,ctrlKey:l,altKey:c,target:u,hasOpenDialog:p,hasSelection:f}){if(e||s||l||c||np(t)||p||ko(u))return"ignore";switch(t){case"j":case"ArrowDown":return"next";case"k":case"ArrowUp":return"previous";case"Enter":return f?"toggle":"ignore";case"x":return f?"dismiss":"ignore";default:return"ignore"}}r(CY,"resolveAttentionQueueKeyAction");function AY({armed:e,defaultPrevented:t,key:s,metaKey:l,ctrlKey:c,altKey:u,target:p,hasOpenDialog:f}){return!e||t||l||c||u||np(s)||f||ko(p)?"ignore":s.toLowerCase()==="y"?"archive":"ignore"}r(AY,"resolveInboxQuickArchiveKeyAction");function _Y({hasUndoableArchive:e,defaultPrevented:t,key:s,metaKey:l,ctrlKey:c,altKey:u,target:p,hasOpenDialog:f}){return!e||t||l||c||u||np(s)||f||ko(p)?"ignore":s==="u"?"undo_archive":"ignore"}r(_Y,"resolveInboxUndoArchiveKeyAction");function P8({armed:e,defaultPrevented:t,key:s,metaKey:l,ctrlKey:c,altKey:u,target:p,hasOpenDialog:f}){if(t)return e?"disarm":"ignore";if(l||c||u||np(s))return"ignore";if(f||ko(p))return e?"disarm":"ignore";const h=s.toLowerCase();return e?h==="i"?"navigate_inbox":h==="c"?"focus_comment":h==="f"?"open_file_viewer":h==="g"?"arm":"disarm":h==="g"?"arm":"ignore"}r(P8,"resolveIssueDetailGoKeyAction");function $8({onNewIssue:e,onSearch:t,onToggleSidebar:s,onTogglePanel:l,onShowShortcuts:c,onGoToInbox:u}){(0,x.useEffect)(()=>{let p=!1,f=null;const h=r(()=>{f!==null&&(window.clearTimeout(f),f=null)},"clearGoChordTimeout"),g=r(()=>{p=!1,h()},"disarmGoChord"),v=r(()=>{p=!0,h(),f=window.setTimeout(()=>{p=!1,f=null},1200)},"armGoChord");function y(S){if(S.defaultPrevented){g();return}if(u){const N=P8({armed:p,defaultPrevented:S.defaultPrevented,key:S.key,metaKey:S.metaKey,ctrlKey:S.ctrlKey,altKey:S.altKey,target:S.target,hasOpenDialog:Hg()});if(N==="arm"){v();return}if(N==="navigate_inbox"){g(),S.preventDefault(),u();return}if(N==="focus_comment"||N==="open_file_viewer"){g(),S.preventDefault();return}N==="disarm"&&g()}if(!ko(S.target)&&!Hg()){if(S.key==="/"&&!S.metaKey&&!S.ctrlKey&&!S.altKey){S.preventDefault(),O8()||t?.();return}if(S.key==="?"&&!S.metaKey&&!S.ctrlKey&&!S.altKey){S.preventDefault(),c?.();return}S.key==="c"&&!S.metaKey&&!S.ctrlKey&&!S.altKey&&(S.preventDefault(),e?.()),S.key==="["&&!S.metaKey&&!S.ctrlKey&&(S.preventDefault(),s?.()),S.key==="]"&&!S.metaKey&&!S.ctrlKey&&(S.preventDefault(),l?.())}}r(y,"handleKeyDown");const j=r(()=>g(),"handlePointerDown"),k=r(S=>{S.target instanceof HTMLElement&&S.target!==document.body&&g()},"handleFocusIn");return document.addEventListener("pointerdown",j,!0),document.addEventListener("focusin",k,!0),document.addEventListener("keydown",y),()=>{g(),document.removeEventListener("pointerdown",j,!0),document.removeEventListener("focusin",k,!0),document.removeEventListener("keydown",y)}},[e,t,s,l,c,u])}r($8,"useKeyboardShortcuts");var U8=new Set(["auth","invite","board-claim","cli-auth","docs","s"]);function AA(e){const t=(e.split("?")[0]??"").split("/").filter(Boolean);if(t.length===0)return!0;const[s]=t;return!U8.has(s)}r(AA,"isRememberableCompanyPath");function B8(e){const t=Wd(e.companyPrefix);return e.companies.find(s=>Wd(s.issuePrefix)===t)??null}r(B8,"findCompanyByPrefix");function K8(e){const t=gS(e.pathname);return t?B8({companies:e.companies,companyPrefix:t})?.id??null:e.fallbackCompanyId}r(K8,"getRememberedPathOwnerCompanyId");function q8(e){const t=e.path?Tf(e.path):"/dashboard";if(!AA(t))return"/dashboard";const[s,l]=(t.split("?")[0]??"").split("/").filter(Boolean);if(s==="issues"&&l){const c=/^([A-Za-z]+)-\d+$/.exec(l);if(c&&Wd(c[1]??"")!==Wd(e.companyPrefix))return"/dashboard"}return t}r(q8,"sanitizeRememberedPathForCompany");var _A="wardmote.companyPaths";function EA(){try{const e=localStorage.getItem(_A);if(e)return JSON.parse(e)}catch{}return{}}r(EA,"getCompanyPaths");function F8(e,t){const s=EA();s[e]=t,localStorage.setItem(_A,JSON.stringify(s))}r(F8,"saveCompanyPath");function H8(){const{companies:e,selectedCompanyId:t,selectedCompany:s,selectionSource:l}=bt(),c=hn(),u=ja(),p=(0,x.useRef)(t),f=(0,x.useMemo)(()=>K8({companies:e,pathname:c.pathname,fallbackCompanyId:p.current}),[e,c.pathname]),h=c.pathname+c.search;(0,x.useEffect)(()=>{const g=f,v=Tf(h);g&&AA(v)&&F8(g,v)},[h,f]),(0,x.useEffect)(()=>{if(t){if(p.current!==null&&t!==p.current&&l!=="route_sync"&&s){const g=EA(),v=q8({path:g[t],companyPrefix:s.issuePrefix});u(`/${s.issuePrefix}${v}`,{replace:!0})}p.current=t}},[s,t,l,u])}r(H8,"useCompanyPageMemory");var V8=class{static{r(this,"MobileNavScrollTracker")}options;lastTop;lastMaxTop;visible=!0;direction=0;distance=0;constructor(e,t,s){this.options=e,this.lastTop=t,this.lastMaxTop=s}update(e,t){const s=Math.max(0,Math.min(e,t)),l=s-Math.max(this.lastTop,this.options.topZone),c=t!==this.lastMaxTop;if(this.lastTop=s,this.lastMaxTop=t,s<=this.options.topZone)this.visible=!0,this.direction=0,this.distance=0;else if(c)this.direction=0,this.distance=0;else if(l!==0){const u=Math.sign(l);u!==this.direction&&(this.distance=0),this.direction=u,this.distance+=Math.abs(l);const p=u>0?this.options.hideDistance:this.options.showDistance;this.distance>=p&&(this.visible=u<0,this.distance=0)}return this.visible}};function W8(e,t){const[s,l]=(0,x.useState)(!0);return(0,x.useEffect)(()=>{if(l(!0),!e)return;const c=getComputedStyle(document.documentElement),u=r(y=>Number.parseFloat(c.getPropertyValue(y))||0,"distance"),p=r(()=>{const y=document.scrollingElement??document.documentElement;return{top:window.scrollY||y.scrollTop||0,max:Math.max(0,y.scrollHeight-y.clientHeight)}},"scrollBounds"),f=p(),h=new V8({topZone:u("--mobile-nav-scroll-top-zone"),hideDistance:u("--mobile-nav-scroll-hide-distance"),showDistance:u("--mobile-nav-scroll-show-distance")},f.top,f.max);let g=null;const v=r(()=>{g===null&&(g=requestAnimationFrame(()=>{g=null;const{top:y,max:j}=p(),k=h.visible,S=h.update(y,j);S!==k&&l(S)}))},"onScroll");return window.addEventListener("scroll",v,{passive:!0}),()=>{window.removeEventListener("scroll",v),g!==null&&cancelAnimationFrame(g)}},[e,t]),s}r(W8,"useMobileNavVisibility");function Q8(e){const{matchedCompany:t,selectedCompanyId:s,companies:l}=e;return!t||t.status!=="archived"||s===t.id?null:l.find(c=>c.id===s&&c.status!=="archived")??l.find(c=>c.status!=="archived")??null}r(Q8,"resolveArchivedCompanyBounce");function EY(e){const{archivedCompanyId:t,companies:s}=e,l=s.find(c=>c.id!==t&&c.status!=="archived");return l?{kind:"company",company:l}:{kind:"companies_list"}}r(EY,"resolveCompanyArchiveDeparture");function G8(e){const{selectionSource:t,selectedCompanyId:s,routeCompanyId:l}=e;return!(s===l||t==="manual"&&s)}r(G8,"shouldSyncCompanySelectionFromRoute");function Y8(e,t){return e instanceof HTMLElement?!(t instanceof HTMLElement)||!document.contains(t)||t===document.body||t===document.documentElement?!0:!e.contains(t):!1}r(Y8,"shouldFocusMainContentAfterNavigation");function X8(e){if(!(e instanceof HTMLElement))return()=>{};const t=window.requestAnimationFrame(()=>{Y8(e,document.activeElement)&&e.focus({preventScroll:!0})});return()=>window.cancelAnimationFrame(t)}r(X8,"scheduleMainContentFocus");function Z8(e=document,t=window){const s=r(()=>{e.documentElement.scrollTop!==0&&(e.documentElement.scrollTop=0),e.body.scrollTop!==0&&(e.body.scrollTop=0)},"onScroll");return t.addEventListener("scroll",s,{capture:!0}),()=>t.removeEventListener("scroll",s,{capture:!0})}r(Z8,"pinDocumentScrollToZero");var J8=gE({NotFoundPage:r(()=>dr,"NotFoundPage")});function dr({scope:e="global",requestedPrefix:t}){const s=hn(),{setBreadcrumbs:l}=JS(),{companies:c,selectedCompany:u}=bt();(0,x.useEffect)(()=>{l([{label:"Not Found"}])},[l]);const p=u??c[0]??null,f=p?`/${p.issuePrefix}/dashboard`:"/",h=`${s.pathname}${s.search}${s.hash}`,g=t?.toUpperCase(),v=e==="invalid_company_prefix"?"Organization not found":"Page not found",y=e==="invalid_company_prefix"?`No organization matches prefix "${g??"unknown"}".`:"This route does not exist.";return(0,a.jsx)("div",{className:"mx-auto max-w-2xl py-10",children:(0,a.jsxs)(Hc,{className:"block p-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"rounded-md border border-bad/20 bg-bad/10 p-2",children:(0,a.jsx)(ai,{className:"h-5 w-5 text-bad"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:v}),(0,a.jsx)("p",{className:"text-sm text-ink-3",children:y})]})]}),(0,a.jsxs)("div",{className:"mt-4 rounded-md border border-line bg-bg-3/20 px-3 py-2 text-xs text-ink-3",children:["Requested path: ",(0,a.jsx)("code",{className:"font-mono",children:h})]}),(0,a.jsxs)("div",{className:"mt-5 flex flex-wrap gap-2",children:[(0,a.jsx)(oe,{asChild:!0,children:(0,a.jsxs)(mn,{to:f,children:[(0,a.jsx)(mS,{className:"mr-1.5 h-4 w-4"}),"Open dashboard"]})}),(0,a.jsx)(oe,{variant:"secondary",asChild:!0,children:(0,a.jsx)(mn,{to:"/",children:"Go home"})})]})]})})}r(dr,"NotFoundPage$1");function e6(e,t){return WC(e,t)[0]?.toLowerCase()??null}r(e6,"getCompanyRouteSegment");var t6=new Set(["browse","connections","assistant-connection","connect","chat","vercel-connect","review","attention","gateways","advanced","app"]);function n6(e){const t=(0,x.useRef)(null);return(0,x.useLayoutEffect)(()=>{const s=t.current,l=s?.parentElement;if(!e||!s||!l)return;const c=r(()=>l.style.setProperty("--mobile-topbar-h",`${s.offsetHeight}px`),"apply");if(c(),typeof ResizeObserver>"u")return()=>l.style.removeProperty("--mobile-topbar-h");const u=new ResizeObserver(c);return u.observe(s),()=>{u.disconnect(),l.style.removeProperty("--mobile-topbar-h")}},[e]),t}r(n6,"useMobileTopbarHeightVar");function a6({sidebarSections:e}){const{sidebarOpen:t,setSidebarOpen:s,toggleSidebar:l,collapsed:c,peeking:u,setPeeking:p,isMobile:f,isTablet:h}=Jn(),g=n6(f),{openNewIssue:v,openOnboarding:y}=Us(),{togglePanelVisible:j}=cx(),k=Lf()?.pushToast??null,{companies:S,loading:N,selectedCompany:I,selectedCompanyId:C,selectionSource:M,setSelectedCompanyId:R}=bt(),{companyPrefix:_,pluginRoutePath:D,agentId:U,routineId:K}=Ps(),z=ja(),E=hn(),B=OE(),O=K4(E.pathname,_),Q=O.builtInContextualSurface==="settings",V=O.companySegments,ue=O.isTaskDetail,{enabled:ce}=Pf(),X=ce&&V[0]?.toLowerCase()==="chats",A=ue||X,ee=V[0]?.toLowerCase()==="tools",ie=V[0]?.toLowerCase()==="apps",le=ie&&V[1]&&!t6.has(V[1].toLowerCase())?V[1]:null,Ae=ie&&V[1]?.toLowerCase()==="app"&&V[2]?V[2]:null,de=(0,x.useRef)(!1),we=(0,x.useRef)(null),ye=(0,x.useRef)(null),Me=(0,x.useRef)(new B3),he=(0,x.useRef)(E.key),ve=W8(f&&!ue,E.pathname),[et,$e]=(0,x.useState)(!1),Ie=(0,x.useMemo)(()=>{if(!_)return null;const _e=_.toUpperCase();return S.find(Re=>Re.issuePrefix.toUpperCase()===_e)??null},[S,_]),ct=!!_&&!N&&S.length>0&&!Ie,He=(0,x.useMemo)(()=>D?.toLowerCase()??e6(E.pathname,_),[_,E.pathname,D]),vt=Ie?.id??null,Jt=Ie?.issuePrefix??null,{slots:ge}=qc({slotTypes:["page","routeSidebar"],companyId:vt,enabled:!!(vt&&He)}),Oe=(0,x.useMemo)(()=>uT(ge,He),[He,ge]),De=(0,x.useMemo)(()=>({companyId:vt,companyPrefix:Jt}),[vt,Jt]),ut=Q?(0,a.jsx)(V4,{}):le?(0,a.jsx)(nw,{kind:"connection",connectionId:le}):Ae?(0,a.jsx)(nw,{kind:"application",applicationId:Ae}):ie||ee?(0,a.jsx)(rz,{}):Oe?(0,a.jsx)(Xc,{surface:`plugin:${Oe.id}`,title:Oe.displayName,children:(0,a.jsx)(L0,{slot:Oe,context:De,className:"min-h-0 flex-1",missingBehavior:"placeholder"})}):null,Ht=X?(0,a.jsx)(n8,{}):O.builtInContextualSurface==="agent"&&U?(0,a.jsx)(hz,{agentRef:U}):O.builtInContextualSurface==="routine"&&K?(0,a.jsx)(D3,{children:(0,a.jsx)(vz,{routineId:K})}):O.builtInContextualSurface==="skills"?(0,a.jsx)(wz,{}):ut,Vt=Ht!=null,gt=Vt&&(X||O.builtInContextualSurface==="skills"||O.builtInContextualSurface==="agent"||O.builtInContextualSurface==="routine"||ie||ee),un=Q&&(f||h),P=Vt&&!gt&&!(h&&Q),qe=gt,Ye=Vt?Oe&&!O.builtInContextualSurface?`plugin:${Oe.id}`:O.builtInContextualSurface:null,xt=(0,x.useRef)(null),{data:at}=me({queryKey:$.health,queryFn:r(()=>Fc.get(),"queryFn"),retry:!1,refetchInterval:r(_e=>_e.state.data?.devServer?.enabled?2e3:!1,"refetchInterval"),refetchIntervalInBackground:!1});(0,x.useEffect)(()=>{const _e=xt.current;Ye&&_&&_e&&_e.surface!==Ye&&_e.pathname!==E.pathname&&q4({surface:Ye,companyPrefix:_,previousPathname:_e.pathname}),xt.current={pathname:E.pathname,surface:Ye}},[_,Ye,E.pathname]),(0,x.useEffect)(()=>{N||de.current||at?.deploymentMode!=="authenticated"&&S.length===0&&(de.current=!0,y())},[S,N,y,at?.deploymentMode]),(0,x.useEffect)(()=>{if(!_||N||S.length===0)return;if(!Ie){const Re=(C?S.find(lt=>lt.id===C):null)??S[0]??null;Re&&C!==Re.id&&R(Re.id,{source:"route_sync"});return}if(_!==Ie.issuePrefix){const Re=E.pathname.replace(/^\/[^/]+/,"");z(`/${Ie.issuePrefix}${Re}${E.search}`,{replace:!0});return}const _e=Q8({matchedCompany:Ie,selectedCompanyId:C,companies:S});if(_e){k?.({title:`${Ie.name} is archived`,body:`Switched to ${_e.name}.`,tone:"info",dedupeKey:`archived-company-bounce:${Ie.id}`}),R(_e.id,{source:"route_sync"}),z(`/${_e.issuePrefix}/dashboard`,{replace:!0});return}G8({selectionSource:M,selectedCompanyId:C,routeCompanyId:Ie.id})&&R(Ie.id,{source:"route_sync"})},[_,S,N,Ie,E.pathname,E.search,z,k,M,C,R]);const Kt=j,ea=(0,x.useCallback)(()=>{document.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0,bubbles:!0,cancelable:!0}))},[]),en=(0,x.useRef)(null),Mt=(0,x.useRef)(!1),Gt=(0,x.useRef)(!1),dt=(0,x.useCallback)(()=>{en.current!==null&&(window.clearTimeout(en.current),en.current=null)},[]),On=(0,x.useCallback)(()=>{dt(),en.current=window.setTimeout(()=>p(!0),50)},[dt,p]),mt=(0,x.useCallback)(()=>{dt(),p(!0)},[dt,p]),Nn=(0,x.useCallback)(()=>{dt(),en.current=window.setTimeout(()=>p(!1),120)},[dt,p]),It=(0,x.useCallback)(()=>{Mt.current=!0,c&&!Gt.current&&On()},[c,On]),tn=(0,x.useCallback)(()=>{Mt.current=!1,Gt.current=!1,Nn()},[Nn]),qt=(0,x.useCallback)(()=>{Gt.current||mt()},[mt]),Tt=(0,x.useCallback)(()=>{Mt.current||Nn()},[Nn]);(0,x.useEffect)(()=>dt,[dt]);const Ct=(0,x.useRef)(c);return(0,x.useEffect)(()=>{c!==Ct.current&&(c?(dt(),p(!1),Gt.current=Mt.current):Gt.current=!1,Ct.current=c)},[c,dt,p]),(0,x.useEffect)(()=>{if(!u)return;const _e=r(Re=>{Re.key==="Escape"&&(dt(),p(!1))},"onKeyDown");return window.addEventListener("keydown",_e),()=>window.removeEventListener("keydown",_e)},[u,dt,p]),H8(),$8({onNewIssue:r(()=>v(),"onNewIssue"),onSearch:ea,onToggleSidebar:l,onTogglePanel:Kt,onShowShortcuts:r(()=>$e(!0),"onShowShortcuts"),onGoToInbox:r(()=>z("/inbox"),"onGoToInbox")}),(0,x.useEffect)(()=>{if(!f)return;const _e=30,Re=50,lt=75;let Dt=0,ze=0;const Ot=r(Lt=>{const nn=Lt.touches[0];Dt=nn.clientX,ze=nn.clientY},"onTouchStart"),Rt=r(Lt=>{const nn=Lt.changedTouches[0],Wt=nn.clientX-Dt;if(!(Math.abs(nn.clientY-ze)>lt)){if(!t&&Dt<_e&&Wt>Re){s(!0);return}t&&Wt<-50&&s(!1)}},"onTouchEnd");return document.addEventListener("touchstart",Ot,{passive:!0}),document.addEventListener("touchend",Rt,{passive:!0}),()=>{document.removeEventListener("touchstart",Ot),document.removeEventListener("touchend",Rt)}},[f,t,s]),(0,x.useEffect)(()=>{const _e=document.body.style.overflow;return document.body.style.overflow=f?"visible":"clip",()=>{document.body.style.overflow=_e}},[f]),(0,x.useEffect)(()=>{if(!f)return Z8()},[f]),(0,x.useEffect)(()=>{if(typeof document>"u")return;const _e=ye.current;return X8(_e)},[E.pathname]),(0,x.useEffect)(()=>{const _e=ye.current;if(!_e)return;const Re=r(()=>{Me.current.remember(he.current,_e.scrollTop)},"recordScroll");return _e.addEventListener("scroll",Re,{passive:!0}),()=>_e.removeEventListener("scroll",Re)},[]),(0,x.useLayoutEffect)(()=>{const _e=ye.current,Re=U3({previousPathname:we.current,pathname:E.pathname,navigationType:B,state:E.state});we.current=E.pathname;const lt=B==="POP",Dt=lt?Me.current.recall(E.key):0;if(he.current=E.key,lt){Vy(_e,Dt);const ze=requestAnimationFrame(()=>Vy(_e,Dt));return()=>cancelAnimationFrame(ze)}Re&&q3(_e)},[E.key,E.pathname,E.state,B]),(0,a.jsx)(M3,{children:(0,a.jsxs)("div",{"data-app-shell":"",className:Y("bg-bg text-ink pt-(--sz-safe-top)",f?"min-h-dvh overflow-x-clip":"flex h-dvh flex-col overflow-clip"),children:[(0,a.jsx)("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:left-3 focus:top-3 focus:z-(--z-200) focus:rounded-md focus:bg-bg focus:px-3 focus:py-2 focus:text-sm focus:font-medium focus:shadow-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-focus",children:"Skip to Main Content"}),(0,a.jsx)(BU,{}),(0,a.jsx)(gU,{}),(0,a.jsx)(yU,{devServer:at?.devServer}),(0,a.jsx)(wU,{diskSpace:at?.diskSpace,warnings:at?.warnings}),(0,a.jsx)(EU,{}),(0,a.jsx)(OU,{}),(0,a.jsxs)("div",{className:Y("min-h-0 flex-1",f?"w-full":"flex overflow-clip"),children:[f&&t&&(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-40 bg-black/50",onClick:r(()=>s(!1),"onClick"),"aria-label":"Close sidebar"}),f?(0,a.jsxs)("div",{className:Y("fixed inset-y-0 left-0 z-50 flex flex-col overflow-hidden pt-(--sz-safe-top) transition-transform duration-100 ease-out",t?"translate-x-0":"-translate-x-full"),children:[(0,a.jsx)("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:(0,a.jsx)("div",{className:"w-60 shrink-0 overflow-hidden",children:Vt?(0,a.jsx)(wd,{children:Ht}):(0,a.jsx)(ew,{children:e})})}),(0,a.jsx)(qw,{deploymentMode:at?.deploymentMode,forceExpanded:P})]}):(0,a.jsxs)(a8,{open:t,collapsed:P?!1:c,peeking:P?!1:u,resizable:!0,onPanelMouseEnter:P?void 0:It,onPanelMouseLeave:P?void 0:tn,onPanelFocusCapture:!P&&c?qt:void 0,onPanelBlurCapture:!P&&c?Tt:void 0,children:[(0,a.jsx)("div",{className:"flex flex-1 min-h-0",children:P?(0,a.jsx)(wd,{children:Ht}):(0,a.jsx)(ew,{children:e})}),(0,a.jsx)(qw,{deploymentMode:at?.deploymentMode,forceExpanded:P})]}),!f&&qe&&!gt?(0,a.jsx)(wd,{className:"w-60 shrink-0",children:Ht}):null,(0,a.jsxs)("div",{className:Y("flex min-w-0 flex-col",f?"w-full":"h-full flex-1"),children:[(0,a.jsxs)("div",{ref:g,"data-slot":f?"mobile-topbar":void 0,className:Y(!f&&A&&"hidden",f&&"sticky top-0 z-20 bg-bg/95 backdrop-blur supports-[backdrop-filter]:bg-bg/85"),children:[(0,a.jsx)(Lw,{mobile:f,onNavigateHome:r(()=>z("/dashboard"),"onNavigateHome")}),(0,a.jsx)(iw,{}),un?(0,a.jsx)("div",{className:"border-b border-line px-4 pb-3",children:(0,a.jsx)(X4,{})}):null]}),(0,a.jsxs)("div",{className:Y(f?"block":"relative flex flex-1 min-h-0",!f&&A&&"streamlined-task-detail-surface"),children:[!f&>?(0,a.jsx)(wd,{className:"w-60 shrink-0 bg-bg",children:Ht}):null,(0,a.jsxs)("div",{className:Y(!f&&A?"flex min-w-0 flex-1 flex-col":"contents"),children:[!f&&A?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Lw,{mobile:!1,onNavigateHome:r(()=>z("/dashboard"),"onNavigateHome")}),(0,a.jsx)(iw,{taskDetailLayout:!0})]}):null,(0,a.jsx)("main",{id:"main-content",ref:ye,tabIndex:-1,style:f?{"--tc-composer-bottom":"var(--sz-calc-14)"}:void 0,className:Y("flex-1 p-4 outline-none md:p-6",!f&&A&&"pt-0 md:pt-0",f?"overflow-visible pb-(--sz-calc-14)":"overflow-auto [scrollbar-gutter:stable]"),children:ct?(0,a.jsx)(dr,{scope:"invalid_company_prefix",requestedPrefix:_??I?.issuePrefix}):(0,a.jsx)(YU,{children:(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ds,{}),children:(0,a.jsx)(xo,{})})})})]}),(0,a.jsx)(Bz,{taskDetailLayout:!f&&A})]})]})]}),f&&(0,a.jsx)(fU,{visible:ve}),(0,a.jsx)(EP,{}),(0,a.jsx)(E$,{}),(0,a.jsx)(T$,{}),(0,a.jsx)(O$,{}),(0,a.jsx)(H$,{}),(0,a.jsx)(G$,{open:et,onOpenChange:$e}),(0,a.jsx)(J$,{}),(0,a.jsx)(rU,{health:at}),(0,a.jsx)(dU,{localTrusted:at?.deploymentMode==="local_trusted"})]})})}r(a6,"Layout");var Fw=null;function s6(){return Fw??=new _f,Fw}r(s6,"getDetachedClient");function i6(){const e=(0,x.useContext)(j0),{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),enabled:e!=null},e??s6());return e?{enabled:t?.enableConferenceRoomChat===!0,loaded:s}:{enabled:!1,loaded:!0}}r(i6,"useConferenceRoomChatEnabled");function r6(){const{enabled:e,loaded:t}=i6();return t?e?(0,a.jsx)(xo,{}):(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):null}r(r6,"ConferenceRoomChatGate");function ar({children:e}){const{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enablePipelines!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(ar,"PipelinesExperimentalGate");function Hw({children:e}){const{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enableCases!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(Hw,"CasesExperimentalGate");function Vw({children:e}){const{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enableStatusCards!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(Vw,"StatusCardsExperimentalGate");function l6({children:e}){const{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enablePixelsOffice!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(l6,"PixelsOfficeExperimentalGate");function Es({pageKey:e}){const{hidden:t,loaded:s}=gr();return s?t.has(e)?(0,a.jsx)(Ve,{to:"/company/settings",replace:!0}):(0,a.jsx)(xo,{}):null}r(Es,"HiddenSettingsPageGate");function Th(){const{data:e,isFetched:t}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return t?e?.enableIsolatedWorkspaces!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(xo,{}):null}r(Th,"IsolatedWorkspacesRouteGate");function Vl(){const e=hn(),{workspaceId:t}=Ps(),{companies:s,loading:l}=bt(),c=me({queryKey:$.executionWorkspaces.detail(t??"__missing__"),queryFn:r(()=>ep.get(t),"queryFn"),enabled:!!t,retry:!1});if(!t)return(0,a.jsx)(dr,{scope:"global"});if(l||c.isPending)return(0,a.jsx)(Ds,{});if(c.isError)return(0,a.jsx)(dr,{scope:"global"});const u=s.find(p=>p.id===c.data.companyId);return u?(0,a.jsx)(Ve,{to:`/${u.issuePrefix}${e.pathname}${e.search}${e.hash}`,replace:!0}):(0,a.jsx)(dr,{scope:"global"})}r(Vl,"UnprefixedExecutionWorkspaceRedirect");function o6(){const{companyPrefix:e,workspaceId:t}=Ps(),{companies:s,loading:l}=bt(),c=me({queryKey:$.executionWorkspaces.detail(t??"__missing__"),queryFn:r(()=>ep.get(t),"queryFn"),enabled:!!t,retry:!1});if(!t||!e)return(0,a.jsx)(dr,{scope:"global"});if(l||c.isPending)return(0,a.jsx)(Ds,{});if(c.isError)return(0,a.jsx)(dr,{scope:"global"});const u=s.find(p=>p.issuePrefix.toUpperCase()===e.toUpperCase());return!u||u.id!==c.data.companyId?(0,a.jsx)(dr,{scope:"global"}):(0,a.jsx)(xo,{})}r(o6,"ExecutionWorkspaceCompanyGate");var ya={status:r((e={})=>{const t=new URLSearchParams;e.command&&t.set("command",e.command),e.network&&t.set("network","1");const s=t.toString();return je.get(`/onboarding/omp${s?`?${s}`:""}`)},"status"),browse:r(e=>je.get(`/onboarding/omp/browse${e?`?path=${encodeURIComponent(e)}`:""}`),"browse"),loginProviders:r((e=!1)=>je.get(`/onboarding/omp/login/providers${e?"?refresh=1":""}`),"loginProviders"),startLogin:r(e=>je.post("/onboarding/omp/login",{provider:e}),"startLogin"),login:r(e=>je.get(`/onboarding/omp/login/${encodeURIComponent(e)}`),"login"),answerLogin:r((e,t)=>je.post(`/onboarding/omp/login/${encodeURIComponent(e)}/input`,{value:t}),"answerLogin"),cancelLogin:r(e=>je.delete(`/onboarding/omp/login/${encodeURIComponent(e)}`),"cancelLogin"),customProviders:r(()=>je.get("/onboarding/omp/custom-providers"),"customProviders"),saveCustomProvider:r((e,t)=>je.put(`/onboarding/omp/custom-providers/${encodeURIComponent(e)}`,t),"saveCustomProvider"),removeCustomProvider:r(e=>je.delete(`/onboarding/omp/custom-providers/${encodeURIComponent(e)}`),"removeCustomProvider"),fetchCustomProviderModels:r(e=>je.post("/onboarding/omp/custom-providers/models",e),"fetchCustomProviderModels"),probeCustomProvider:r(e=>je.post("/onboarding/omp/custom-providers/probe",e),"probeCustomProvider"),remote:r(e=>je.post("/onboarding/omp/remote",{address:e}),"remote")};function c6(e){return{heartbeat:{enabled:e?.heartbeatEnabled??Ky.heartbeatEnabled,intervalSec:e?.intervalSec??Ky.intervalSec,wakeOnDemand:!0,skipTimerWhenNoActionableWork:!0,cooldownSec:10,maxConcurrentRuns:20}}}r(c6,"buildNewAgentRuntimeConfig");var u6="input:not([type=hidden]):not(:disabled), select:not(:disabled), textarea:not(:disabled)",d6="Discard your unsaved changes?",f6=2/3;function p6(e,t){const[s,l]=(0,x.useState)(null),c=(0,x.useRef)(!1),u=(0,x.useRef)(new Map),p=(0,x.useRef)(e);p.current=e;const f=(0,x.useRef)(s);f.current=s;const h=(0,x.useId)(),g=s===null?null:e(s),v=(0,x.useCallback)(M=>`${h}-row-editor-${M.replace(/\s+/g,"_")}`,[h]),y=r(()=>!c.current||window.confirm(d6),"mayDiscard"),j=(0,x.useCallback)((M=!0)=>{const R=f.current;if(c.current=!1,l(null),R===null||!M)return;const _=p.current(R);requestAnimationFrame(()=>{const D=u.current.get(_);(D?.isConnected?D:t?.current)?.focus()})},[t]),k=r(M=>g===e(M)?!0:g!==null&&!y()?!1:(c.current=!1,l(M),!0),"request"),S=r(M=>{if(g!==e(M)){k(M);return}y()&&j()},"toggle"),N=r(()=>{y()&&j()},"dismiss"),I=(0,x.useCallback)(M=>{c.current=M},[]);return{open:s,openKey:g,request:k,toggle:S,close:j,dismiss:N,setDirty:I,triggerProps:r(M=>({ref:r(R=>{R?u.current.set(M,R):u.current.delete(M)},"ref"),"aria-expanded":g===M,"aria-controls":g===M?v(M):void 0}),"triggerProps"),panelId:v}}r(p6,"useInlineRowEditor");function Ww({id:e,onEscape:t,className:s,children:l}){const c=(0,x.useRef)(null);(0,x.useEffect)(()=>{const p=c.current;if(!p)return;p.querySelector(u6)?.focus({preventScroll:!0});const f=p.getBoundingClientRect().top;if(f>=0&&f<=window.innerHeight*f6)return;const h=p.parentElement?.tagName==="LI"?p.previousElementSibling:null;h?h.scrollIntoView?.({block:"center"}):p.scrollIntoView?.({block:"start"})},[]);const u=r(p=>{p.key!=="Escape"||p.defaultPrevented||(p.preventDefault(),p.stopPropagation(),t())},"onKeyDown");return(0,a.jsx)("div",{ref:c,id:e,className:Y("scroll-mt-16",s),onKeyDown:u,children:l})}r(Ww,"InlineRowEditorPanel");var m6=2e3,Qw=["omp","login-providers"];function Rh(e){return e instanceof Error?e.message:"Something went wrong"}r(Rh,"errorText");function Ra({tone:e,children:t}){return(0,a.jsx)("div",{role:e==="bad"?"alert":"status",className:Y("rounded-md border px-3 py-2 text-sm",e==="bad"?"border-bad text-ink":e==="ok"?"border-ok text-ink":"border-line text-ink-2"),children:t})}r(Ra,"OmpNote");function h6({onSignedIn:e,autoFocus:t=!1}){const s=kn(),l=me({queryKey:Qw,queryFn:r(()=>ya.loginProviders(),"queryFn"),staleTime:6e5}),[c,u]=(0,x.useState)(""),[p,f]=(0,x.useState)(null),[h,g]=(0,x.useState)(""),v=c||l.data?.providers[0]||"",y=Bt({mutationFn:r(_=>ya.startLogin(_.name),"mutationFn"),onSuccess:r((_,{popup:D})=>{g(""),f(_),D&&_.url&&_.state==="waiting"?D.location.href=_.url:D?.close()},"onSuccess"),onError:r((_,{popup:D})=>D?.close(),"onError")}),j=Bt({mutationFn:r(_=>ya.answerLogin(p.id,_),"mutationFn"),onSuccess:r(_=>{g(""),f(_)},"onSuccess")}),k=Bt({mutationFn:r(_=>ya.cancelLogin(_),"mutationFn"),onSettled:r(()=>f(null),"onSettled")}),S=p?.state==="waiting",N=me({queryKey:["omp","login",p?.id??""],queryFn:r(()=>ya.login(p.id),"queryFn"),enabled:S,refetchInterval:m6});(0,x.useEffect)(()=>{N.data&&N.data.id===p?.id&&f(N.data)},[N.data,p?.id]);const I=(0,x.useRef)(null),C=(0,x.useRef)(e);C.current=e;const M=p?.state==="succeeded"?p.id:null;(0,x.useEffect)(()=>{!M||I.current===M||(I.current=M,s.invalidateQueries({queryKey:["agents"]}),C.current?.())},[M,s]);function R(_){_.preventDefault(),h.trim()&&j.mutate(h.trim())}return r(R,"submitAnswer"),l.isLoading?(0,a.jsx)("p",{className:"text-sm text-ink-3",children:"Asking OMP which providers it can sign in to..."}):l.error?(0,a.jsxs)(Ra,{tone:"bad",children:[Rh(l.error)," ",(0,a.jsx)(oe,{type:"button",variant:"link",size:"xs",onClick:r(()=>{l.refetch()},"onClick"),children:"Try again"})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[!p||!S?(0,a.jsxs)("form",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",onSubmit:r(_=>{_.preventDefault(),v&&y.mutate({name:v,popup:window.open("about:blank","_blank")})},"onSubmit"),children:[(0,a.jsxs)("label",{className:"flex min-w-0 flex-1 flex-col gap-1.5 text-sm font-medium",children:["Provider",(0,a.jsx)(gg,{value:v,onChange:r(_=>u(_.target.value),"onChange"),autoFocus:t,className:"w-full",children:l.data?.providers.map(_=>(0,a.jsx)("option",{value:_,children:_},_))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(oe,{type:"submit",disabled:!v||y.isPending,className:"flex-1 sm:flex-none",children:y.isPending?"Starting...":"Sign in"}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon","aria-label":"Reload provider list",title:"Reload provider list",onClick:r(()=>{ya.loginProviders(!0).then(_=>s.setQueryData(Qw,_))},"onClick"),children:(0,a.jsx)(nl,{"aria-hidden":"true"})})]})]}):null,y.error?(0,a.jsx)(Ra,{tone:"bad",children:Rh(y.error)}):null,p?(0,a.jsxs)("section",{"aria-label":`Sign-in to ${p.provider}`,className:"flex flex-col gap-3 rounded-lg border border-line bg-bg-2 px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("b",{className:"text-sm font-semibold",children:p.provider}),S?(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"xs",disabled:k.isPending,onClick:r(()=>k.mutate(p.id),"onClick"),children:"Cancel"}):null]}),S&&p.url?(0,a.jsxs)("ol",{className:"flex list-decimal flex-col gap-1.5 ps-5 text-sm text-ink-2",children:[(0,a.jsxs)("li",{children:[(0,a.jsxs)("a",{href:p.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 font-medium text-accent underline underline-offset-4",children:["Open the sign-in page ",(0,a.jsx)(US,{"aria-hidden":"true",className:"size-3.5"})]})," ","(already opened in a new tab unless the browser blocked it) and approve access."]}),p.prompt&&!p.prompt.secret?(0,a.jsx)("li",{children:"If the page ends on an address that does not load (it starts with http://localhost), copy that whole address from the browser bar and paste it below. On the machine that runs Wardmote this step finishes by itself."}):(0,a.jsx)("li",{children:"Enter the code OMP shows below if the page asks for one. This panel moves on by itself once you approve."})]}):null,S&&p.prompt?(0,a.jsxs)("form",{onSubmit:R,className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,a.jsxs)("label",{className:"flex min-w-0 flex-1 flex-col gap-1.5 text-sm font-medium",children:[p.prompt.label.replace(/:$/,""),(0,a.jsx)(Wn,{value:h,onChange:r(_=>g(_.target.value),"onChange"),type:p.prompt.secret?"password":"text",autoComplete:"off",spellCheck:!1,autoFocus:!p.url})]}),(0,a.jsx)(oe,{type:"submit",disabled:!h.trim()||j.isPending,children:j.isPending?"Sending...":"Send"})]}):null,S&&!p.prompt&&!p.url?(0,a.jsx)("p",{className:"text-sm text-ink-3",children:"Waiting for OMP..."}):null,S&&p.message?(0,a.jsx)(Ra,{tone:"bad",children:p.message}):null,j.error?(0,a.jsx)(Ra,{tone:"bad",children:Rh(j.error)}):null,p.state==="succeeded"?(0,a.jsxs)(Ra,{tone:"ok",children:[p.message??"Signed in",". Models from this provider are ready."]}):null,p.state==="failed"?(0,a.jsxs)(Ra,{tone:"bad",children:[p.message??"Sign-in failed",". Check the account on the provider's page, then press Sign in again."]}):null,S&&!p.prompt&&p.lines.length?(0,a.jsx)("pre",{"aria-label":"OMP output",className:"max-h-48 overflow-auto whitespace-pre-wrap break-all rounded-md bg-bg-3 px-3 py-2 font-mono text-xs text-ink-2",children:p.lines.join(`
|
|
55
|
+
`)}):null,(!S||p.prompt)&&p.lines.length?(0,a.jsxs)("details",{className:"text-xs text-ink-3",children:[(0,a.jsx)("summary",{className:"cursor-pointer select-none",children:"What OMP printed"}),(0,a.jsx)("pre",{className:"mt-2 max-h-48 overflow-auto whitespace-pre-wrap break-all rounded-md bg-bg-3 px-3 py-2 font-mono",children:p.lines.join(`
|
|
56
|
+
`)})]}):null]}):null]})}r(h6,"OmpSignIn");var Mh=500,Dh=10,g6=(0,x.memo)(r(function({result:t,savedIds:s,room:l,onAdd:c}){const[u,p]=(0,x.useState)(""),[f,h]=(0,x.useState)(()=>new Set),g=(0,x.useMemo)(()=>t.models.filter(I=>!s.has(I.id)),[t.models,s]),v=(0,x.useMemo)(()=>{if(t.truncated)return[];const I=new Set(t.models.map(C=>C.id));return[...s].filter(C=>!I.has(C))},[t.models,t.truncated,s]),y=(0,x.useMemo)(()=>{const I=u.trim().toLowerCase();return I?t.models.filter(C=>C.id.toLowerCase().includes(I)||C.name?.toLowerCase().includes(I)):t.models},[u,t.models]),j=g.filter(I=>f.has(I.id));function k(I,C){h(M=>{const R=new Set(M);return C?R.add(I):R.delete(I),R})}r(k,"toggle");function S(I){c(I),h(new Set)}r(S,"add");const N=r(I=>I>l,"overLimit");return(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-md border border-line-soft p-3","aria-label":"Upstream models",children:[(0,a.jsxs)("p",{className:"text-sm",children:[t.url," lists ",t.models.length," ",t.models.length===1?"model":"models",t.truncated?" (more exist; only these were read)":"",": ",g.length," new, ",t.models.length-g.length," already added."]}),v.length?(0,a.jsxs)(Ra,{tone:"info",children:[v.length," saved ",v.length===1?"model is":"models are"," not listed upstream and ",v.length===1?"stays":"stay"," until you remove ",v.length===1?"it":"them",": ",v.slice(0,Dh).join(", "),v.length>Dh?`, and ${v.length-Dh} more`:"","."]}):null,(0,a.jsx)(Wn,{value:u,onChange:r(I=>p(I.target.value),"onChange"),placeholder:"Search upstream models","aria-label":"Search upstream models",autoComplete:"off"}),(0,a.jsxs)("ul",{className:"flex max-h-72 flex-col overflow-y-auto rounded-md border border-line-soft",children:[y.slice(0,Mh).map(I=>{const C=s.has(I.id);return(0,a.jsx)("li",{className:"border-b border-line-soft last:border-b-0",children:(0,a.jsxs)("label",{className:"flex items-center gap-2 px-2 py-1.5 text-sm",children:[(0,a.jsx)("input",{type:"checkbox",checked:C||f.has(I.id),disabled:C,onChange:r(M=>k(I.id,M.target.checked),"onChange"),"aria-label":I.id}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:I.id}),I.name?(0,a.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:I.name}):null,C?(0,a.jsx)("span",{className:"shrink-0 text-xs text-ink-3",children:"Added"}):null]})},I.id)}),y.length===0?(0,a.jsx)("li",{className:"px-2 py-1.5 text-sm text-ink-3",children:"No upstream model matches."}):null]}),y.length>Mh?(0,a.jsxs)("span",{className:"text-xs text-ink-3",children:["Showing ",Mh," of ",y.length,"; search to narrow the list."]}):null,(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)(oe,{type:"button",size:"sm",disabled:j.length===0||N(j.length),onClick:r(()=>S(j),"onClick"),children:["Add selected",j.length?` (${j.length})`:""]}),(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",disabled:g.length===0||N(g.length),onClick:r(()=>S(g),"onClick"),children:["Add all",g.length?` (${g.length})`:""]}),N(Math.max(j.length,g.length))?(0,a.jsxs)("span",{className:"text-xs text-ink-3",children:["Only ",l," more ",l===1?"model fits":"models fit","; a provider holds at most ",500,"."]}):null]})]})},"UpstreamModelPicker")),Oh=["omp","custom-providers"],x6={"openai-responses":"OpenAI Responses (/responses): most OpenAI-compatible gateways","openai-completions":"OpenAI Chat Completions (/chat/completions): vLLM, LiteLLM, Ollama, llama.cpp","anthropic-messages":"Anthropic Messages (/messages)","openai-codex-responses":"ChatGPT Codex backend: only with a ChatGPT sign-in token","google-generative-ai":"Google Gemini API","google-vertex":"Google Vertex AI","google-gemini-cli":"Gemini CLI backend","azure-openai-responses":"Azure OpenAI Responses","bedrock-converse-stream":"AWS Bedrock Converse"},b6={"openai-models-list":"OpenAI /models list",proxy:"Proxy (models from the gateway)",litellm:"LiteLLM",ollama:"Ollama","llama.cpp":"llama.cpp","lm-studio":"LM Studio","apple-foundation-models":"Apple Foundation Models"},Ud={id:"",name:"",api:"",contextWindow:"",maxTokens:"",reasoning:!1,images:!1};function v6(e){return e?{name:e.name,baseUrl:e.baseUrl??"",api:e.api??"",keyMode:e.apiKey.kind==="none"?"none":e.apiKey.kind==="missing"?"literal":"keep",keyValue:"",authHeader:e.authHeader,disableStrictTools:e.disableStrictTools,discovery:e.discovery?.type??"",discoveryTimeout:e.discovery?.timeoutMs?String(e.discovery.timeoutMs):"",injectV1:e.discovery?.injectV1??!1,headers:e.headers.map(t=>({name:t.name,value:"",saved:!0})),models:e.models.map(t=>({id:t.id,name:t.name??"",api:t.api??"",contextWindow:t.contextWindow?String(t.contextWindow):"",maxTokens:t.maxTokens?String(t.maxTokens):"",reasoning:t.reasoning??!1,images:t.images??!1}))}:{name:"",baseUrl:"",api:"openai-responses",keyMode:"literal",keyValue:"",authHeader:!1,disableStrictTools:!1,discovery:"",discoveryTimeout:"",injectV1:!1,headers:[],models:[{...Ud}]}}r(v6,"initialState");function Vg(e){switch(e.keyMode){case"keep":return{kind:"keep"};case"none":return{kind:"none"};case"env":return{kind:"env",name:e.keyValue.trim()};case"command":return{kind:"command",command:e.keyValue.trim()};default:return{kind:"literal",value:e.keyValue.trim()}}}r(Vg,"keyInput");function Wl(e){const t=Number(e.replace(/[_,\s]/g,""));return e.trim()&&Number.isInteger(t)&&t>0?t:void 0}r(Wl,"positive");function Wg(e){return e.headers.filter(t=>t.name.trim()).map(t=>t.saved&&!t.value?{name:t.name.trim()}:{name:t.name.trim(),value:t.value})}r(Wg,"headersInput");function y6(e){return{baseUrl:e.baseUrl.trim(),api:e.api||null,apiKey:Vg(e),authHeader:e.authHeader,disableStrictTools:e.disableStrictTools,headers:Wg(e),discovery:e.discovery?{type:e.discovery,...Wl(e.discoveryTimeout)?{timeoutMs:Wl(e.discoveryTimeout)}:{},...e.discovery==="openai-models-list"&&e.injectV1?{injectV1:!0}:{}}:null,models:e.models.filter(t=>t.id.trim()).map(t=>({id:t.id.trim(),...t.name.trim()?{name:t.name.trim()}:{},...t.api?{api:t.api}:{},...Wl(t.contextWindow)?{contextWindow:Wl(t.contextWindow)}:{},...Wl(t.maxTokens)?{maxTokens:Wl(t.maxTokens)}:{},...t.reasoning?{reasoning:!0}:{},...t.images?{images:!0}:{}}))}}r(y6,"toInput");function wc(e){if(e instanceof Ti){const t=e.body?.details;if(Array.isArray(t)){const s=t.map(l=>typeof l?.message=="string"?`${Array.isArray(l.path)?`${l.path.join(".")}: `:""}${l.message}`:null).filter(l=>!!l);if(s.length)return s}return[e.message]}return[e instanceof Error?e.message:"Something went wrong"]}r(wc,"problemsOf");function dc({label:e,hint:t,children:s}){return(0,a.jsxs)("label",{className:"flex min-w-0 flex-col gap-1.5 text-sm font-medium",children:[e,s,t?(0,a.jsx)("span",{className:"text-xs font-normal text-ink-3",children:t}):null]})}r(dc,"Field");function Lh({label:e,hint:t,checked:s,onChange:l}){return(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("span",{className:"flex flex-col gap-0.5 text-sm",children:[(0,a.jsx)("span",{className:"font-medium",children:e}),(0,a.jsx)("span",{className:"text-xs text-ink-3",children:t})]}),(0,a.jsx)(s1,{checked:s,onCheckedChange:l,"aria-label":e})]})}r(Lh,"Toggle");function Gw({provider:e,takenNames:t,onSaved:s,onCancel:l,onDirtyChange:c}){const[u]=(0,x.useState)(()=>v6(e)),[p,f]=(0,x.useState)(u),h=JSON.stringify(p)!==JSON.stringify(u);(0,x.useEffect)(()=>c?.(h),[h,c]);const[g,v]=(0,x.useState)(null),[y,j]=(0,x.useState)(null),k=r(O=>f(Q=>({...Q,...O})),"set"),S=r((O,Q)=>f(V=>({...V,models:V.models.map((ue,ce)=>ce===O?{...ue,...Q}:ue)})),"setModel"),N=r((O,Q)=>f(V=>({...V,headers:V.headers.map((ue,ce)=>ce===O?{...ue,...Q}:ue)})),"setHeader"),I=e!==null,C=!I&&p.name&&!xE.test(p.name)?"Use letters, digits, dot, dash or underscore":!I&&t.includes(p.name)?"A provider with this name already exists; edit it instead":null,M=Bt({mutationFn:r(()=>ya.saveCustomProvider(p.name.trim(),y6(p)),"mutationFn"),onSuccess:s}),R=Bt({mutationFn:r(()=>ya.probeCustomProvider({...I?{name:e.name}:{},baseUrl:p.baseUrl.trim(),apiKey:Vg(p),authHeader:p.authHeader,headers:Wg(p),...p.models[0]?.id.trim()?{modelId:p.models[0].id.trim()}:{}}),"mutationFn"),onSuccess:r(O=>{v(O),f(Q=>({...Q,api:O.suggestedApi??Q.api,models:Q.models.some(V=>V.id.trim())||!O.usedModel?Q.models:[{...Ud,id:O.usedModel}]}))},"onSuccess"),onError:r(()=>v(null),"onError")}),_=Bt({mutationFn:r(()=>ya.fetchCustomProviderModels({...I?{name:e.name}:{},baseUrl:p.baseUrl.trim(),api:p.api||null,apiKey:Vg(p),authHeader:p.authHeader,headers:Wg(p)}),"mutationFn"),onSuccess:j,onError:r(()=>j(null),"onError")}),D=p.models.map(O=>O.id.trim()).filter(Boolean).join(`
|
|
57
|
+
`),U=(0,x.useMemo)(()=>new Set(D?D.split(`
|
|
58
|
+
`):[]),[D]),K=(0,x.useMemo)(()=>y&&!y.error&&!y.truncated?new Set(y.models.map(O=>O.id)):null,[y]),z=(0,x.useCallback)(O=>{f(Q=>{const V=Q.models.filter(X=>X.id.trim()),ue=new Set(V.map(X=>X.id.trim())),ce=O.filter(X=>!ue.has(X.id)).map(X=>({...Ud,id:X.id,name:X.name??""}));return{...Q,models:[...V,...ce]}})},[]);function E(O){O.preventDefault(),C||M.mutate()}r(E,"submit");const B=[...I&&e.apiKey.kind!=="none"&&e.apiKey.kind!=="missing"?[{mode:"keep",label:"Keep saved"}]:[],{mode:"literal",label:"Key"},{mode:"env",label:"Env variable"},{mode:"command",label:"Command"},{mode:"none",label:"No key"}];return(0,a.jsxs)("form",{onSubmit:E,"aria-label":I?`Edit ${e.name}`:"Add a custom provider",className:"flex flex-col gap-4 rounded-lg border border-line bg-bg-2 px-4 py-4 sm:px-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:I?`Edit ${e.name}`:"Add a custom provider"}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Close",onClick:l,children:(0,a.jsx)(ia,{"aria-hidden":"true"})})]}),I&&e.otherKeys.length?(0,a.jsxs)("p",{className:"text-xs text-ink-3",children:["Also kept as written in models.yml: ",e.otherKeys.join(", "),"."]}):null,(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,a.jsx)(dc,{label:"Name",hint:C??"Used in model ids, e.g. my-gateway/model",children:(0,a.jsx)(Wn,{value:p.name,onChange:r(O=>k({name:O.target.value}),"onChange"),disabled:I,required:!0,"aria-invalid":!!C,placeholder:"my-gateway",autoComplete:"off"})}),(0,a.jsx)(dc,{label:"Base URL",hint:"Usually ends in /v1",children:(0,a.jsx)(Wn,{value:p.baseUrl,onChange:r(O=>k({baseUrl:O.target.value}),"onChange"),required:!0,type:"url",placeholder:"http://localhost:8000/v1",autoComplete:"off"})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"API key"}),(0,a.jsx)(WT,{"aria-label":"Where the key comes from",className:"flex-wrap self-start",children:B.map(({mode:O,label:Q})=>(0,a.jsx)(VT,{selected:p.keyMode===O,onClick:r(()=>k({keyMode:O,keyValue:""}),"onClick"),children:Q},O))}),p.keyMode==="literal"?(0,a.jsx)(Wn,{value:p.keyValue,onChange:r(O=>k({keyValue:O.target.value}),"onChange"),type:"password",autoComplete:"off",required:!0,"aria-label":"API key",placeholder:"sk-..."}):p.keyMode==="env"?(0,a.jsx)(Wn,{value:p.keyValue,onChange:r(O=>k({keyValue:O.target.value.toUpperCase()}),"onChange"),required:!0,"aria-label":"Environment variable name",placeholder:"MY_GATEWAY_KEY",autoComplete:"off"}):p.keyMode==="command"?(0,a.jsx)(Wn,{value:p.keyValue,onChange:r(O=>k({keyValue:O.target.value}),"onChange"),required:!0,"aria-label":"Command that prints the key",placeholder:"op read op://vault/gateway/key",autoComplete:"off",className:"font-mono"}):null,(0,a.jsx)("span",{className:"text-xs text-ink-3",children:p.keyMode==="keep"?`The saved ${e?.apiKey.kind==="env"?`variable ${e.apiKey.name}`:e?.apiKey.kind==="command"?"command":"key"} stays as it is.`:p.keyMode==="env"?"OMP reads the key from this variable on the machine that runs agents.":p.keyMode==="command"?"OMP runs this command and uses what it prints.":p.keyMode==="none"?"For local servers that need no key.":"Saved in OMP's models.yml. Wardmote never shows it again."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(dc,{label:"Wire format (api)",hint:"Picking the wrong one is the most common mistake. Test connection suggests the right one.",children:(0,a.jsxs)(gg,{value:p.api,onChange:r(O=>k({api:O.target.value}),"onChange"),className:"w-full",children:[(0,a.jsx)("option",{value:"",children:"Set per model"}),IE.map(O=>(0,a.jsx)("option",{value:O,children:x6[O]??O},O))]})}),(0,a.jsx)(oe,{type:"button",variant:"secondary",size:"sm",className:"self-start",disabled:!p.baseUrl.trim()||R.isPending,onClick:r(()=>R.mutate(),"onClick"),children:R.isPending?"Testing...":"Test connection"}),R.error?(0,a.jsx)(Ra,{tone:"bad",children:wc(R.error).join(" ")}):null,g?(0,a.jsxs)(Ra,{tone:g.suggestedApi?"ok":"bad",children:[g.suggestedApi?`${g.suggestedApi} answered${g.usedModel?` for ${g.usedModel}`:""}, so the wire format is set to it.`:g.usedModel?`No wire format answered for ${g.usedModel}. Check the base URL, key and model id.`:"The server listed no models. Add a model id below, then test again.",(0,a.jsx)("ul",{className:"mt-1 flex flex-col gap-0.5 text-xs text-ink-3",children:g.attempts.map(O=>(0,a.jsxs)("li",{className:"break-all",children:[O.api,": ",O.status??"no answer",O.detail&&!O.ok?` (${O.detail})`:""]},O.api))})]}):null]}),(0,a.jsxs)("fieldset",{className:"flex flex-col gap-2",children:[(0,a.jsx)("legend",{className:"mb-1.5 text-sm font-medium",children:"Models"}),p.models.map((O,Q)=>(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 rounded-md border border-line-soft p-2 sm:grid-cols-[2fr_2fr_1fr_1fr_auto]",children:[K&&O.id.trim()&&!K.has(O.id.trim())?(0,a.jsx)("span",{className:"col-span-2 text-xs text-ink-3 sm:col-span-5",children:"Not listed upstream any more; kept until you remove it."}):null,(0,a.jsx)(Wn,{"aria-label":`Model ${Q+1} id`,value:O.id,onChange:r(V=>S(Q,{id:V.target.value}),"onChange"),placeholder:"model id",className:"col-span-2 sm:col-span-1",autoComplete:"off"}),(0,a.jsx)(Wn,{"aria-label":`Model ${Q+1} name`,value:O.name,onChange:r(V=>S(Q,{name:V.target.value}),"onChange"),placeholder:"Display name",className:"col-span-2 sm:col-span-1"}),(0,a.jsx)(Wn,{"aria-label":`Model ${Q+1} context window`,value:O.contextWindow,onChange:r(V=>S(Q,{contextWindow:V.target.value}),"onChange"),placeholder:"Context",inputMode:"numeric"}),(0,a.jsx)(Wn,{"aria-label":`Model ${Q+1} max output tokens`,value:O.maxTokens,onChange:r(V=>S(Q,{maxTokens:V.target.value}),"onChange"),placeholder:"Max output",inputMode:"numeric"}),(0,a.jsxs)("div",{className:"col-span-2 flex items-center justify-between gap-3 text-xs sm:col-span-1",children:[(0,a.jsxs)("label",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)("input",{type:"checkbox",checked:O.reasoning,onChange:r(V=>S(Q,{reasoning:V.target.checked}),"onChange")}),"Thinks"]}),(0,a.jsxs)("label",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)("input",{type:"checkbox",checked:O.images,onChange:r(V=>S(Q,{images:V.target.checked}),"onChange")}),"Images"]}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-xs","aria-label":`Remove model ${Q+1}`,onClick:r(()=>k({models:p.models.filter((V,ue)=>ue!==Q)}),"onClick"),children:(0,a.jsx)(lg,{"aria-hidden":"true"})})]})]},Q)),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",onClick:r(()=>k({models:[...p.models,{...Ud}]}),"onClick"),children:[(0,a.jsx)(as,{"aria-hidden":"true"}),"Add model"]}),(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",disabled:!p.baseUrl.trim()||_.isPending,onClick:r(()=>_.mutate(),"onClick"),children:[(0,a.jsx)(dR,{"aria-hidden":"true"}),_.isPending?"Fetching...":"Fetch models"]})]}),_.error?(0,a.jsx)(Ra,{tone:"bad",children:wc(_.error).join(" ")}):null,y?.error?(0,a.jsx)(Ra,{tone:"bad",children:y.error}):null,y&&!y.error?(0,a.jsx)(g6,{result:y,savedIds:U,room:500-U.size,onAdd:z}):null,(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Leave context and max output empty when unsure; OMP fills known models in."})]}),(0,a.jsxs)("details",{className:"flex flex-col gap-3",children:[(0,a.jsx)("summary",{className:"cursor-pointer select-none text-sm font-medium",children:"Advanced"}),(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[(0,a.jsx)(Lh,{label:"Send the key as an Authorization header",hint:"OpenAI wire formats already do. Turn on for discovery or proxies that need it.",checked:p.authHeader,onChange:r(O=>k({authHeader:O}),"onChange")}),(0,a.jsx)(Lh,{label:"Disable strict tools",hint:"For Anthropic-style proxies that reject strict tool schemas.",checked:p.disableStrictTools,onChange:r(O=>k({disableStrictTools:O}),"onChange")}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,a.jsx)(dc,{label:"Model discovery",hint:"Ask the server for its models instead of listing them",children:(0,a.jsxs)(gg,{value:p.discovery,onChange:r(O=>k({discovery:O.target.value}),"onChange"),className:"w-full",children:[(0,a.jsx)("option",{value:"",children:"Off"}),SE.map(O=>(0,a.jsx)("option",{value:O,children:b6[O]??O},O))]})}),p.discovery?(0,a.jsx)(dc,{label:"Discovery timeout (ms)",children:(0,a.jsx)(Wn,{value:p.discoveryTimeout,onChange:r(O=>k({discoveryTimeout:O.target.value}),"onChange"),inputMode:"numeric",placeholder:"OMP default"})}):null]}),p.discovery==="openai-models-list"?(0,a.jsx)(Lh,{label:"Add /v1 to the discovery URL",hint:"Turn on when the base URL has no /v1 but the model list lives under it.",checked:p.injectV1,onChange:r(O=>k({injectV1:O}),"onChange")}):null,(0,a.jsxs)("fieldset",{className:"flex flex-col gap-2",children:[(0,a.jsx)("legend",{className:"mb-1.5 text-sm font-medium",children:"Extra headers"}),p.headers.map((O,Q)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_1fr_auto] gap-2",children:[(0,a.jsx)(Wn,{"aria-label":`Header ${Q+1} name`,value:O.name,onChange:r(V=>N(Q,{name:V.target.value}),"onChange"),placeholder:"X-Header",disabled:O.saved}),(0,a.jsx)(Wn,{"aria-label":`Header ${Q+1} value`,value:O.value,onChange:r(V=>N(Q,{value:V.target.value}),"onChange"),placeholder:O.saved?"Saved; type to replace":"value",type:"password",autoComplete:"off"}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":`Remove header ${Q+1}`,onClick:r(()=>k({headers:p.headers.filter((V,ue)=>ue!==Q)}),"onClick"),children:(0,a.jsx)(lg,{"aria-hidden":"true"})})]},Q)),(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",className:"self-start",onClick:r(()=>k({headers:[...p.headers,{name:"",value:"",saved:!1}]}),"onClick"),children:[(0,a.jsx)(as,{"aria-hidden":"true"}),"Add header"]})]})]})]}),M.error?(0,a.jsx)(Ra,{tone:"bad",children:(0,a.jsx)("ul",{className:"flex flex-col gap-0.5",children:wc(M.error).map(O=>(0,a.jsx)("li",{children:O},O))})}):null,(0,a.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,a.jsx)(oe,{type:"button",variant:"ghost",onClick:l,children:"Cancel"}),(0,a.jsx)(oe,{type:"submit",disabled:M.isPending||!!C,children:M.isPending?"Checking with OMP...":"Save provider"})]})]})}r(Gw,"CustomProviderForm");function j6(e){switch(e.apiKey.kind){case"env":return e.apiKey.present?`key from ${e.apiKey.name}`:`${e.apiKey.name} is not set on the server`;case"literal":return"key saved";case"command":return"key from a command";case"none":return"no key";case"oauth":return"OMP sign-in";default:return"no key set"}}r(j6,"keySummary");var to=":new";function w6(e){return e===to?to:e.name}r(w6,"providerKey");function k6({onChanged:e}){const t=kn(),s=me({queryKey:Oh,queryFn:r(()=>ya.customProviders(),"queryFn")}),l=p6(w6),c=Bt({mutationFn:r(h=>ya.removeCustomProvider(h),"mutationFn"),onSuccess:r((h,g)=>{t.setQueryData(Oh,h),l.openKey===g&&l.close(!1),e?.()},"onSuccess")}),u=s.data?.providers??[],p=u.map(h=>h.name),f=r(h=>{t.setQueryData(Oh,h),l.close(),e?.()},"onSaved");return(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[s.error?(0,a.jsx)(Ra,{tone:"bad",children:wc(s.error).join(" ")}):null,s.data?.parseError?(0,a.jsxs)(Ra,{tone:"bad",children:[s.data.parseError,". Fix ",s.data.modelsPath," by hand; Wardmote will not overwrite it."]}):null,u.length?(0,a.jsx)("ul",{"aria-label":"Custom providers",className:"flex flex-col divide-y divide-line rounded-lg border border-line",children:u.map(h=>(0,a.jsxs)("li",{children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-sm",children:[(0,a.jsx)("b",{className:"font-medium",children:h.name}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs text-ink-3",children:[h.baseUrl,h.api,j6(h),h.discovery?`discovery: ${h.discovery.type}`:`${h.models.length} ${h.models.length===1?"model":"models"}`].filter(Boolean).join(" · ")}),(0,a.jsxs)("span",{className:"flex gap-1",children:[(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":`Edit ${h.name}`,...l.triggerProps(h.name),onClick:r(()=>l.toggle(h),"onClick"),children:(0,a.jsx)(F0,{"aria-hidden":"true"})}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":`Remove ${h.name}`,disabled:c.isPending,onClick:r(()=>{window.confirm(`Remove ${h.name} from OMP's models.yml? A backup stays in models.yml.bak.`)&&c.mutate(h.name)},"onClick"),children:(0,a.jsx)(lg,{"aria-hidden":"true"})})]})]}),l.openKey===h.name?(0,a.jsx)(Ww,{id:l.panelId(h.name),onEscape:l.dismiss,className:"px-2 pb-2 sm:px-3 sm:pb-3",children:(0,a.jsx)(Gw,{provider:h,takenNames:p,onCancel:r(()=>l.close(),"onCancel"),onSaved:f,onDirtyChange:l.setDirty})}):null]},h.name))}):s.isLoading?(0,a.jsx)("p",{className:"text-sm text-ink-3",children:"Reading models.yml..."}):null,c.error?(0,a.jsx)(Ra,{tone:"bad",children:wc(c.error).join(" ")}):null,l.openKey===to?(0,a.jsx)(Ww,{id:l.panelId(to),onEscape:l.dismiss,children:(0,a.jsx)(Gw,{provider:null,takenNames:p,onCancel:r(()=>l.close(),"onCancel"),onSaved:f,onDirtyChange:l.setDirty})}):(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",className:"self-start",disabled:!!s.data?.parseError,...l.triggerProps(to),onClick:r(()=>l.request(to),"onClick"),children:[(0,a.jsx)(as,{"aria-hidden":"true"}),"Add custom provider"]}),s.data?(0,a.jsxs)("p",{className:"text-xs text-ink-3",children:["Saved to ",s.data.modelsPath,", with the previous copy in models.yml.bak."]}):null]})}r(k6,"CustomProviders");var S6=["Check OMP","Connect a model","First task"],Qg="Atlas",N6="general";var C6="Only an instance admin can set up OMP on this server.";function zh(e){return e?e.status===403?{message:C6,retry:!1}:{message:e.message||"Could not check OMP on this server.",retry:!0}:null}r(zh,"statusFailure");var A6={anthropic:"Anthropic",openai:"OpenAI","openai-codex":"OpenAI",openrouter:"OpenRouter",google:"Google",deepseek:"DeepSeek"};function _6(e){return e?A6[e]??e:null}r(_6,"providerLabel");function E6(e){return e.state==="ready"?"ready":e.state==="missing"?e.network==="offline"?"offline":"install":"old"}r(E6,"checkView");function I6(e){return(e?.models.length??0)>0}r(I6,"hasModel");function T6(e){return e.state!=="ready"?null:I6(e)?2:1}r(T6,"nextStepAfterCheck");function R6(e){return!e.connected||e.state!=="ready"?null:e.modelCount>0?2:1}r(R6,"nextStepAfterRemote");function M6(e){return e.copies.slice(1).filter(t=>t.version!==e.version)}r(M6,"olderCopies");function D6(e){const t=e.trim().split(/\r?\n/,1)[0]?.trim()??"";return t.length<=120?t:`${t.slice(0,119).trimEnd()}…`}r(D6,"taskTitle");function Yw(e){const t=e?.replace(/[\\/]+$/,"").split(/[\\/]/).pop()?.trim();return t||"My company"}r(Yw,"companyNameForFolder");function O6(e){return e?.recommendedModel?e.models.find(t=>t.id===e.recommendedModel)?.label??e.recommendedModel:null}r(O6,"recommendedModelLabel");function L6(e){return e?.recommendedModel?_6(e.models.find(t=>t.id===e.recommendedModel)?.provider??e.recommendedModel.split("/",1)[0]):null}r(L6,"signedInProvider");var xf="Wardmote",IA=2e3,kd=["onboarding","omp-status"],z6={ok:(0,a.jsx)(Ms,{className:"size-3.5","aria-hidden":!0}),bad:(0,a.jsx)(ia,{className:"size-3.5","aria-hidden":!0}),warn:(0,a.jsx)(ai,{className:"size-3.5","aria-hidden":!0}),wait:(0,a.jsx)(XI,{className:"size-3.5","aria-hidden":!0}),run:(0,a.jsx)(nl,{className:"size-3.5 motion-safe:animate-spin","aria-hidden":!0})},P6={ok:"bg-ok-soft text-ok",bad:"bg-bad-soft text-bad",warn:"bg-warn-soft text-warn",wait:"bg-bg-3 text-ink-3",run:"bg-run-soft text-run"};function no({rows:e,label:t}){return(0,a.jsx)("section",{"aria-label":t,className:"rounded-lg border border-line-soft bg-bg-2 px-4 py-1",children:(0,a.jsx)("ul",{children:e.map(s=>(0,a.jsxs)("li",{"data-check":s.state,className:"flex items-center gap-2.5 border-b border-line-soft py-2 text-(length:--t-13) last:border-b-0",children:[(0,a.jsx)("span",{className:Y("grid size-5.5 shrink-0 place-items-center rounded-full",P6[s.state]),children:z6[s.state]}),(0,a.jsx)("span",{className:"min-w-0",children:s.label}),s.value?(0,a.jsx)("span",{className:"ms-auto min-w-0 truncate font-mono text-xs text-ink-3",children:s.value}):null]},s.label))})})}r(no,"Checks");function Gg({command:e}){const[t,s]=(0,x.useState)(!1);return(0,a.jsxs)("div",{className:"flex flex-col items-start gap-2",children:[(0,a.jsx)("code",{className:"block w-full whitespace-pre-wrap break-all rounded-md border border-line-soft bg-bg-3 px-3 py-2.5 font-mono text-(length:--t-13)",children:e}),(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",onClick:r(()=>{B0(e).then(()=>s(!0))},"onClick"),children:[t?(0,a.jsx)(Ms,{className:"size-3.5","aria-hidden":!0}):(0,a.jsx)(i3,{className:"size-3.5","aria-hidden":!0}),t?"Copied":"Copy command"]})]})}r(Gg,"CommandBlock");function bf({tone:e,children:t}){return(0,a.jsxs)("div",{role:e==="bad"?"alert":"note",className:Y("flex gap-2.5 rounded-md px-3 py-2.5 text-(length:--t-13)",{warn:"bg-warn-soft",info:"bg-run-soft",bad:"bg-bad-soft"}[e]),children:[(0,a.jsx)(ai,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":!0}),(0,a.jsx)("span",{children:t})]})}r(bf,"Note");function $6({step:e}){return(0,a.jsx)("ol",{"aria-label":"Setup steps",className:"flex flex-wrap items-center gap-1.5 text-xs text-ink-2",children:S6.map((t,s)=>(0,a.jsxs)("li",{className:"flex items-center gap-1.5","aria-current":s===e?"step":void 0,children:[s>0?(0,a.jsx)("span",{"aria-hidden":!0,className:"h-px w-5.5 bg-line"}):null,(0,a.jsx)("span",{className:Y("grid size-5 place-items-center rounded-full border border-line-strong text-(length:--text-micro) font-semibold",s<e&&"border-ok bg-ok text-bg",s===e&&"border-accent text-accent"),children:s<e?(0,a.jsx)(Ms,{className:"size-3","aria-hidden":!0}):s+1}),(0,a.jsx)("span",{className:Y(s===e?"font-semibold text-ink":"max-sm:sr-only"),children:t})]},t))})}r($6,"Steps");function cr({title:e,lede:t}){return(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("h1",{id:"onboarding-title",className:"text-(length:--t-24) font-semibold tracking-tight sm:text-(length:--t-32) sm:leading-tight",children:e}),(0,a.jsx)("p",{className:"max-w-130 text-base text-ink-2",children:t})]})}r(cr,"Heading");function TA({title:e,paragraphs:t}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:e}),t.map(s=>(0,a.jsx)("p",{className:"text-sm text-ink-2",children:s},s))]})}r(TA,"SideText");var U6=(0,a.jsx)(TA,{title:"Why OMP",paragraphs:[`${xf} runs every agent on OMP. OMP talks to the model and uses the tools; ${xf} assigns work, keeps the record and holds the settings.`,"You will not need to open OMP's own settings: models, thinking and tools are set here."]});function $c({children:e}){return(0,a.jsx)("div",{className:"mt-auto flex flex-wrap items-center gap-2 pt-2",children:e})}r($c,"Actions");function Yg(e){if(e instanceof Ti){const t=e.body;if(t&&typeof t.error=="string")return t.error}return e instanceof Error?e.message:String(e)}r(Yg,"errorMessage$1");function B6({open:e,onOpenChange:t,onPick:s}){const[l,c]=(0,x.useState)(null),u=me({queryKey:["onboarding","omp-browse",l],queryFn:r(()=>ya.browse(l),"queryFn"),enabled:e});return(0,a.jsx)(ks,{open:e,onOpenChange:t,children:(0,a.jsxs)($s,{className:"sm:max-w-lg",children:[(0,a.jsxs)(bo,{children:[(0,a.jsx)(Os,{children:"Choose omp"}),(0,a.jsx)(vo,{className:"truncate font-mono text-xs",children:u.data?.path??"…"})]}),(0,a.jsxs)("ul",{className:"-mx-2 max-h-80 overflow-y-auto",children:[u.data?.parent?(0,a.jsx)("li",{children:(0,a.jsxs)("button",{type:"button",className:"flex min-h-10 w-full items-center gap-2 rounded-md px-2 text-start text-sm hover:bg-bg-3",onClick:r(()=>c(u.data?.parent??null),"onClick"),children:[(0,a.jsx)(Ei,{className:"size-4 text-ink-3","aria-hidden":!0}),".."]})}):null,u.data?.entries.map(p=>(0,a.jsx)("li",{children:(0,a.jsxs)("button",{type:"button",className:"flex min-h-10 w-full items-center gap-2 rounded-md px-2 text-start text-sm hover:bg-bg-3",onClick:r(()=>{p.kind==="directory"?c(p.path):(s(p.path),t(!1))},"onClick"),children:[p.kind==="directory"?(0,a.jsx)(Ei,{className:"size-4 text-ink-3","aria-hidden":!0}):(0,a.jsx)(mR,{className:"size-4 text-accent","aria-hidden":!0}),(0,a.jsx)("span",{className:"truncate",children:p.name})]})},p.path)),u.isError?(0,a.jsx)("li",{className:"px-2 py-2 text-sm text-bad",children:Yg(u.error)}):null]})]})})}r(B6,"OmpFilePicker");function K6({status:e,failure:t,command:s,onChooseCommand:l,onRemote:c,onRetry:u}){const[p,f]=(0,x.useState)(!1),h=r(v=>v.state==="ready"?{state:"ok",label:`Version ${v.version}`,value:`needs ${v.minVersion} or newer`}:{state:"bad",label:v.version?`Version ${v.version}`:"Version unknown",value:`needs ${v.minVersion}`},"versionRow");if(!e)return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Install OMP",lede:"Looking for OMP on this computer."}),(0,a.jsx)(no,{label:"OMP checks",rows:[t&&!t.retry?{state:"bad",label:"Looking for omp",value:"stopped"}:{state:"run",label:"Looking for omp",value:"every 2 s"}]}),t?(0,a.jsx)(bf,{tone:"bad",children:t.message}):null]});const g=E6(e);if(g==="old"){const v=M6(e);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Update OMP",lede:e.version?`OMP ${e.version} is older than ${e.minVersion}, so some settings set here would be ignored.`:`The version of OMP could not be read. ${xf} needs OMP ${e.minVersion} or newer.`}),(0,a.jsx)(Gg,{command:e.updateCommand}),(0,a.jsx)(no,{label:"OMP checks",rows:[{state:"ok",label:"omp found",value:e.path},h(e)]}),v.length>0?(0,a.jsxs)(bf,{tone:"warn",children:["Two copies of omp are installed. The older one in ",e.path," runs first. Remove it, or update it with the command above."]}):null]})}return g==="offline"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"You are offline",lede:"Installing needs the internet once. Connect, or point to an omp you already copied here."}),(0,a.jsx)(no,{label:"OMP checks",rows:[{state:"bad",label:"omp.sh not reachable",value:"3 tries"},s?h(e):{state:"wait",label:"Version check"}]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("span",{id:"omp-path-label",className:"text-sm font-medium",children:"Path to omp"}),(0,a.jsxs)(oe,{type:"button",variant:"secondary","aria-labelledby":"omp-path-label",className:"justify-between font-normal",onClick:r(()=>f(!0),"onClick"),children:[(0,a.jsx)("span",{className:Y("truncate",s?"font-mono text-xs":"text-ink-3"),children:s??"Choose file"}),(0,a.jsx)(Ei,{className:"size-4","aria-hidden":!0})]})]}),(0,a.jsx)(B6,{open:p,onOpenChange:f,onPick:l}),(0,a.jsx)($c,{children:(0,a.jsxs)(oe,{type:"button",variant:"secondary",onClick:u,children:[(0,a.jsx)(nl,{className:"size-3.5","aria-hidden":!0}),"Try again"]})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Install OMP",lede:"Run this in a terminal on this computer. This page moves on by itself."}),(0,a.jsx)(Gg,{command:e.installCommand}),(0,a.jsxs)("p",{className:"text-sm text-ink-2",children:[e.os.label," detected ·"," ",(0,a.jsx)("a",{className:"inline-flex min-h-6 items-center text-accent underline-offset-2 hover:underline",href:"https://omp.sh",target:"_blank",rel:"noreferrer",children:"Other ways"})]}),(0,a.jsx)(no,{label:"OMP checks",rows:[e.state==="ready"?{state:"ok",label:"omp found",value:e.path}:{state:"run",label:"Looking for omp",value:"every 2 s"},e.state==="ready"?h(e):{state:"wait",label:`Version ${e.minVersion} or newer`},e.models.length>0?{state:"ok",label:`${e.models.length} models`}:{state:"wait",label:"At least one model"}]}),e.runtime==="local"?(0,a.jsx)($c,{children:(0,a.jsx)(oe,{type:"button",variant:"ghost",onClick:c,children:"Run agents on another machine"})}):null]})}r(K6,"CheckOmpScreen");function q6({remote:e,pending:t,error:s,onCheck:l,onLocal:c}){const[u,p]=(0,x.useState)(e?.address??""),f=e?[e.connected?{state:"ok",label:"Connected",value:e.latencyMs!==null?`${e.latencyMs} ms`:null}:{state:"bad",label:"Not connected",value:e.error},...e.connected?[e.state==="missing"?{state:"bad",label:"omp not found there"}:e.state==="ready"?{state:"ok",label:`omp ${e.version} found`}:{state:"bad",label:`omp ${e.version??""} is too old`.replace(" "," "),value:"needs 18.1.16"},e.modelCount>0?{state:"ok",label:`${e.modelCount} models signed in there`}:{state:"bad",label:"No model signed in there",value:"next step"}]:[]]:[];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Run agents on another machine",lede:"OMP must be installed where agents run. We check it over SSH."}),(0,a.jsxs)("form",{className:"flex flex-col gap-1.5",onSubmit:r(h=>{h.preventDefault(),l(u.trim())},"onSubmit"),id:"onboarding-remote-form",children:[(0,a.jsx)("label",{htmlFor:"onboarding-ssh-address",className:"text-sm font-medium",children:"SSH address"}),(0,a.jsx)(Wn,{id:"onboarding-ssh-address",value:u,onChange:r(h=>p(h.target.value),"onChange"),placeholder:"user@host",autoComplete:"off",spellCheck:!1,"aria-describedby":"onboarding-ssh-help"}),(0,a.jsx)("span",{id:"onboarding-ssh-help",className:"text-xs text-ink-3",children:"Uses your SSH keys. The working folder is your home folder unless you change it later."})]}),f.length>0?(0,a.jsx)(no,{label:"Remote checks",rows:f}):null,s?(0,a.jsx)(bf,{tone:"bad",children:s}):null,(0,a.jsxs)($c,{children:[(0,a.jsx)(oe,{type:"button",variant:"ghost",onClick:c,children:"Use this computer"}),(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsx)(oe,{type:"submit",form:"onboarding-remote-form",disabled:t||u.trim().length===0,children:t?"Checking…":"Continue"})]})]})}r(q6,"RemoteScreen");function F6({remote:e,onSignedIn:t}){const[s,l]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{if(!e)return;const c=window.setInterval(t,IA);return()=>window.clearInterval(c)},[e,t]),e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Connect a model",lede:`OMP on ${e.host} has no model signed in yet.`}),(0,a.jsxs)("p",{className:"text-sm text-ink-2",children:["Sign in on ",e.host,". This page moves on by itself."]}),(0,a.jsx)(Gg,{command:`ssh -t ${e.username}@${e.host}${e.port!==22?` -p ${e.port}`:""} omp login`})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Connect a model",lede:s?"Add your own gateway or local server to OMP.":"OMP has no model signed in yet. Sign in to a provider; OMP keeps the sign-in."}),s?(0,a.jsx)(k6,{onChanged:t}):(0,a.jsx)(h6,{autoFocus:!0,onSignedIn:t}),(0,a.jsxs)($c,{children:[(0,a.jsx)(oe,{type:"button",variant:"link",size:"sm",onClick:r(()=>l(c=>!c),"onClick"),children:s?"Sign in to a provider instead":"Use my own server instead"}),(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Moves on by itself once OMP has a model."})]})]})}r(F6,"ConnectScreen");function H6({status:e,remote:t,pending:s,error:l,onStart:c}){const[u,p]=(0,x.useState)(""),f=t?t.homeFolder:e?.projectFolder,h=t?null:O6(e);return(0,a.jsxs)("form",{className:"contents",onSubmit:r(g=>{g.preventDefault(),u.trim()&&c(u.trim())},"onSubmit"),children:[(0,a.jsx)(cr,{title:"What should your first agent do?",lede:`${Qg} starts as soon as you press Start. You can rename it and change its setup later.`}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("label",{htmlFor:"onboarding-first-task",className:"text-sm font-medium",children:"First task"}),(0,a.jsx)(t1,{id:"onboarding-first-task",value:u,onChange:r(g=>p(g.target.value),"onChange"),rows:4,placeholder:f?`Read the README in ${f} and list the three riskiest modules.`:void 0,autoFocus:!0})]}),(0,a.jsxs)("section",{"aria-label":"First agent",className:"flex flex-col gap-1.5 rounded-lg border border-line-soft bg-bg-2 px-4 py-3 text-sm",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"w-21 shrink-0 text-ink-3",children:"Agent"}),Qg,", general assistant"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"w-21 shrink-0 text-ink-3",children:"Model"}),h?`${h} (recommended)`:"OMP default"]}),(0,a.jsxs)("div",{className:"flex min-w-0 gap-2",children:[(0,a.jsx)("span",{className:"w-21 shrink-0 text-ink-3",children:"Folder"}),(0,a.jsx)("span",{className:"min-w-0 truncate font-mono text-xs leading-5",children:f??"~"})]})]}),l?(0,a.jsx)(bf,{tone:"bad",children:l}):null,(0,a.jsxs)($c,{children:[(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsxs)(oe,{type:"submit",disabled:s||u.trim().length===0,children:[(0,a.jsx)(R0,{className:"size-3.5","aria-hidden":!0}),s?"Starting…":"Start"]})]})]})}r(H6,"TaskScreen");function V6(){const{onboardingOpen:e,onboardingOptions:t,closeOnboarding:s,onboardingRouteDismissed:l,setOnboardingRouteDismissed:c}=Vc(),{companies:u,loading:p}=bt(),f=hn(),h=lU(f.pathname),g=h&&p?null:oU({pathname:f.pathname,companyPrefix:h,companies:u});if(!(e||g!==null&&!l))return null;const v=(e?t.companyId:g?.companyId)??null;return(0,a.jsx)(W6,{companyId:v,onClose:r(()=>{s(),c(!0)},"onClose")})}r(V6,"OnboardingFlow");function W6({companyId:e,onClose:t}){const s=kn(),l=ja(),{setSelectedCompanyId:c}=bt(),[u,p]=(0,x.useState)(0),[f,h]=(0,x.useState)("local"),[g,v]=(0,x.useState)(null),[y,j]=(0,x.useState)(null),[k,S]=(0,x.useState)(null),N=me({queryKey:[...kd,g],queryFn:r(()=>ya.status({command:g}),"queryFn"),retry:r((z,E)=>(zh(E)?.retry??!0)&&z<2,"retry"),refetchInterval:r(z=>zh(z.state.error)?.retry===!1||u===2&&z.state.data?!1:IA,"refetchInterval")}),I=N.data,C=zh(N.error),M=me({queryKey:[...kd,"network",g],queryFn:r(()=>ya.status({command:g,network:!0}),"queryFn"),enabled:I?.state==="missing"&&f==="local",refetchInterval:3e4}),R=(0,x.useMemo)(()=>{if(I)return I.state!=="missing"?I:{...I,network:M.data?.network??null}},[I,M.data]);(0,x.useEffect)(()=>{if(f!=="local"||!I||u===2)return;const z=T6(I);z!==null&&z>u&&p(z)},[f,I,u]);const _=Bt({mutationFn:r(z=>ya.remote(z),"mutationFn"),onSuccess:r(z=>{j(z);const E=R6(z);E!==null&&p(E)},"onSuccess")}),D=(0,x.useCallback)(()=>{if(!y){s.invalidateQueries({queryKey:kd});return}ya.remote(y.address).then(z=>{j(z),z.modelCount>0&&p(2)}).catch(()=>{})},[y,s]),U=Bt({mutationFn:r(async z=>{const E=f==="remote"?y?.homeFolder??null:I?.projectFolder??null;let B=e;B||(B=(await By.create({name:Yw(f==="remote"?y?.host:E)})).id,await s.invalidateQueries({queryKey:$.companies.all}));let O=null;f==="remote"&&y?.homeFolder&&(O=(await UT.create(B,{name:y.host,driver:"ssh",config:{host:y.host,port:y.port,username:y.username,remoteWorkspacePath:y.homeFolder}})).id);const Q={};f==="local"&&I?.recommendedModel&&(Q.model=I.recommendedModel),E&&(Q.cwd=E),g&&(Q.command=g);const V=await Ha.hire(B,{name:Qg,role:N6,appearance:EE(),adapterType:"omp_local",adapterConfig:Q,onboardingFirstAgent:!0,runtimeConfig:c6(),...O?{defaultEnvironmentId:O}:{}});V.approval&&await VN.approve(V.approval.id,"Approved during onboarding first-agent setup.");const ue=await hr.create(B,{name:Yw(E),status:"in_progress",...f==="local"&&E?{workspace:{sourceType:"local_path",cwd:E,isPrimary:!0}}:{}}),ce=await cn.create(B,{title:D6(z),description:z,status:"todo",assigneeAgentId:V.agent.id,projectId:ue.id});return{companyId:B,issue:ce}},"mutationFn"),onMutate:r(()=>S(null),"onMutate"),onError:r(z=>S(Yg(z)),"onError"),onSuccess:r(async({companyId:z,issue:E})=>{await Promise.all([s.invalidateQueries({queryKey:$.companies.all}),s.invalidateQueries({queryKey:$.agents.list(z)}),s.invalidateQueries({queryKey:$.projects.list(z)}),s.invalidateQueries({queryKey:$.issues.list(z)})]);const B=(await By.list()).find(Q=>Q.id===z)?.issuePrefix??null;c(z,{source:"route_sync"}),t();const O=E.identifier??E.id;l(B?`/${B}/issues/${O}`:`/issues/${O}`)},"onSuccess")}),K=u===1?(0,a.jsx)(TA,{title:"Skipped when OMP is ready",paragraphs:["If OMP already has a signed-in model on this machine, this step is skipped and the best model is picked for you."]}):u===2?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:f==="remote"?`Found on ${y?.host??"that machine"}`:"Found on this computer"}),(0,a.jsx)(no,{label:"Found",rows:f==="remote"?[{state:"ok",label:`OMP ${y?.version??""}`.trim()},{state:"ok",label:`${y?.modelCount??0} models signed in`},{state:"ok",label:"Working folder",value:y?.homeFolder}]:[{state:"ok",label:`OMP ${I?.version??""}`.trim()},{state:"ok",label:`${L6(I)??"Model"} signed in`,value:"imported"},{state:"ok",label:"Project folder",value:I?.projectFolder}]})]}):U6;return(0,a.jsx)(ks,{open:!0,onOpenChange:r(z=>{z||t()},"onOpenChange"),children:(0,a.jsxs)(tT,{children:[(0,a.jsx)("div",{className:"fixed inset-0 z-50 bg-bg"}),(0,a.jsxs)("div",{"data-testid":"onboarding-flow","data-step":u,role:"dialog","aria-modal":"true","aria-labelledby":"onboarding-title",className:"fixed inset-0 z-50 grid overflow-y-auto lg:grid-cols-2",onKeyDown:r(z=>{z.key==="Escape"&&t()},"onKeyDown"),children:[(0,a.jsxs)("main",{className:"flex min-h-dvh min-w-0 flex-col gap-4.5 px-4 py-5 sm:px-8 sm:py-8 lg:px-14 lg:py-10",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(M0,{className:"size-6.5 shrink-0 text-ink","aria-hidden":"true"}),(0,a.jsx)("b",{className:"text-base font-semibold",children:xf})]}),(0,a.jsx)($6,{step:u}),u===0&&f==="local"?(0,a.jsx)(K6,{status:R,failure:C,command:g,onChooseCommand:v,onRemote:r(()=>h("remote"),"onRemote"),onRetry:r(()=>{s.invalidateQueries({queryKey:kd})},"onRetry")}):null,u===0&&f==="remote"?(0,a.jsx)(q6,{remote:y,pending:_.isPending,error:_.isError?Yg(_.error):null,onCheck:r(z=>_.mutate(z),"onCheck"),onLocal:r(()=>{h("local"),j(null)},"onLocal")}):null,u===1?(0,a.jsx)(F6,{remote:f==="remote"?y:null,onSignedIn:D}):null,u===2?(0,a.jsx)(H6,{status:I,remote:f==="remote"?y:null,pending:U.isPending,error:k,onStart:r(z=>U.mutate(z),"onStart")}):null]}),(0,a.jsx)("aside",{className:"hidden min-w-0 flex-col gap-4 border-s border-line-soft bg-bg-3 px-12 py-10 lg:flex",children:K})]})]})})}r(W6,"OnboardingFlowDialog");function Q6(){const{openNewIssue:e}=Us();return(0,x.useEffect)(()=>{e()},[e]),(0,a.jsx)(Ve,{to:"/issues",replace:!0})}r(Q6,"NewTaskShortcut");var G6="npx @tickernelz/wardmote auth bootstrap-ceo";function Ph({hasActiveInvite:e=!1}){return(0,a.jsxs)("div",{className:"mt-6 border-t border-line pt-5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,a.jsx)(QS,{className:"size-4 text-ink-3","aria-hidden":!0}),(0,a.jsx)("span",{children:"Prefer to finish setup from the host?"})]}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:e?"A bootstrap invite is already active. Check your Wardmote startup logs for the first-admin URL, or run this command on the host to rotate it:":"Run this command on the host that runs Wardmote to print a one-time first-admin invite URL:"}),(0,a.jsx)("pre",{className:"mt-3 overflow-x-auto rounded-md border border-line bg-bg-3/30 p-3 font-mono text-xs",children:G6})]})}r(Ph,"CliFallback");function Sd({children:e}){return(0,a.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,a.jsx)(Hc,{className:"block p-6",children:e})})}r(Sd,"StateChrome");function Y6(e){return e.user.email||e.user.name||e.user.id}r(Y6,"displayIdentity");function X6(e){return e?.status===409?{title:"Someone else has already claimed this instance.",body:"Refresh to sign in, or ask the existing admin to invite you from Settings -> Access."}:e?.status===401?{title:"Your session expired. Sign in again to claim this instance.",body:""}:{title:"We couldn't reach the server. Try again in a moment.",body:""}}r(X6,"claimErrorCopy");function Z6({claimAvailable:e,hasActiveInvite:t=!1,session:s,claimState:l,claimError:c,onClaim:u}){if(!e)return(0,a.jsxs)(Sd,{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"This Wardmote is waiting on its first admin"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"This instance runs in invite-only mode. The operator must generate a one-time first-admin invite URL from the host. Once you have the link, open it from this browser to finish setup."}),(0,a.jsx)(Ph,{hasActiveInvite:t}),(0,a.jsx)("p",{className:"mt-4 text-xs text-ink-3",children:"Browser-based claim is intentionally disabled in public mode so anyone on the network can't promote themselves."})]});if(l==="success")return(0,a.jsxs)(Sd,{children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"mt-0.5 flex size-9 flex-shrink-0 items-center justify-center rounded-full bg-emerald-500/15 text-emerald-600 dark:text-emerald-400",children:(0,a.jsx)(Cc,{className:"size-5","aria-hidden":!0})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"You're the instance admin"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"Setup is complete. Taking you to onboarding to create your first organization..."})]})]}),(0,a.jsxs)("div",{className:"mt-5 flex items-center gap-3",children:[(0,a.jsx)(Ma,{className:"size-4 animate-spin text-ink-3","aria-hidden":!0}),(0,a.jsx)("span",{className:"text-sm text-ink-3",children:"Redirecting..."})]}),(0,a.jsx)("div",{className:"mt-5",children:(0,a.jsx)(oe,{asChild:!0,variant:"secondary",children:(0,a.jsx)("a",{href:"/",children:"Continue to dashboard"})})})]});if(!s)return(0,a.jsxs)(Sd,{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"No admin has claimed this instance yet. Sign in or create your Wardmote account to become the first admin from this browser."}),(0,a.jsx)("div",{className:"mt-5",children:(0,a.jsx)(oe,{asChild:!0,children:(0,a.jsx)(mn,{to:"/auth?next=/",children:"Sign in / Create account"})})}),(0,a.jsx)(Ph,{hasActiveInvite:t})]});const p=X6(c),f=l==="claiming";return(0,a.jsxs)(Sd,{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"No admin has claimed this instance yet. Claim it now to become the first admin and start onboarding."}),(0,a.jsxs)("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:[(0,a.jsxs)(oe,{onClick:u,disabled:f,children:[f&&(0,a.jsx)(Ma,{className:"mr-2 size-4 animate-spin","aria-hidden":!0}),f?"Claiming...":"Claim this instance"]}),(0,a.jsxs)("span",{className:"text-sm text-ink-3",children:["Signed in as ",(0,a.jsx)("span",{className:"font-medium text-ink",children:Y6(s)})]})]}),(0,a.jsxs)("p",{className:"mt-3 text-xs text-ink-3",children:["Wrong account?"," ",(0,a.jsx)(mn,{to:"/auth?next=/",className:"underline underline-offset-2",children:"Switch account"}),"."]}),c&&(0,a.jsxs)("div",{role:"alert",className:"mt-4 flex items-start gap-2 rounded-md border border-bad/40 bg-bad/10 p-3 text-sm text-bad",children:[(0,a.jsx)(ai,{className:"mt-0.5 size-4 flex-shrink-0","aria-hidden":!0}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:p.title}),p.body&&(0,a.jsx)("p",{className:"mt-1 text-bad/90",children:p.body})]})]}),(0,a.jsx)(Ph,{hasActiveInvite:t})]})}r(Z6,"BootstrapPendingPage");var Nd=5e3;function J6({temporary:e,retrying:t,onRetry:s}){return(0,a.jsxs)("div",{className:"mx-auto flex max-w-xl flex-col gap-4 px-4 py-16",children:[(0,a.jsx)(nl,{className:"size-6 text-ink-3","aria-hidden":"true"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",role:"status",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:e?"Reconnecting to Wardmote":"Unable to load Wardmote"}),(0,a.jsx)("p",{className:"text-sm text-ink-3",children:e?"The server may be restarting or your connection was interrupted. We’ll try again every few seconds and reconnect automatically.":"We couldn’t check your access to this instance. Try again, or contact your instance administrator if this continues."})]}),(0,a.jsx)("div",{children:(0,a.jsx)(oe,{variant:"secondary",onClick:s,disabled:t,children:t?"Connecting…":"Try again"})})]})}r(J6,"CloudAccessError");function eB(){return(0,a.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,a.jsxs)(Hc,{className:"block p-6",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"No organization access"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"This account is signed in, but it does not have an active organization membership or instance-admin access on this Wardmote instance."}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"Use an organization invite or sign in with an account that already belongs to this org."})]})})}r(eB,"NoBoardAccessPage");function Xw({allowMembershipRequest:e=!1}={}){const t=hn(),s=kn(),[l,c]=(0,x.useState)(!1),u=me({queryKey:$.health,queryFn:r(()=>Fc.get(),"queryFn"),retry:!1,refetchInterval:r(R=>{if(R.state.error)return Pr(R.state.error)?Nd:!1;const _=R.state.data;return _?.status==="starting"?Nd:_?.deploymentMode==="authenticated"&&_.bootstrapStatus==="bootstrap_pending"?2e3:!1},"refetchInterval"),refetchIntervalInBackground:!0}),p=u.data?.deploymentMode==="authenticated",f=p&&u.data?.bootstrapStatus==="bootstrap_pending",h=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),enabled:p,retry:!1,refetchInterval:r(R=>Pr(R.state.error)?Nd:!1,"refetchInterval"),refetchIntervalInBackground:!0}),g=me({queryKey:$.access.currentBoardAccess,queryFn:r(()=>ti.getCurrentBoardAccess(),"queryFn"),enabled:p&&!f&&!!h.data,retry:!1,refetchInterval:r(R=>Pr(R.state.error)?Nd:!1,"refetchInterval"),refetchIntervalInBackground:!0}),v=Bt({mutationFn:r(()=>ti.claimBootstrapAdmin(),"mutationFn"),onSuccess:r(async()=>{await s.invalidateQueries({queryKey:$.auth.session}),await s.invalidateQueries({queryKey:$.health}),await s.invalidateQueries({queryKey:$.companies.all}),await s.invalidateQueries({queryKey:$.companies.stats}),await s.invalidateQueries({queryKey:$.access.currentBoardAccess})},"onSuccess")}),y=[u,...p?[h]:[],...p&&!f&&h.data?[g]:[]],j=u.data?.status==="starting",k=j||y.some(R=>Pr(R.error)),S=y.find(R=>R.error&&!(R.data!==void 0&&Pr(R.error)))?.error,N=u.isLoading||p&&h.isLoading||p&&!f&&!!h.data&&g.isLoading,I=e||!p||!!g.data?.isInstanceAdmin||(g.data?.companyIds.length??0)>0,C=!N&&!S&&!f&&(!p||!!h.data)&&I;(0,x.useEffect)(()=>{C?u.data?.status==="ok"&&c(!0):c(!1)},[C,u.data?.status]);const M=(0,x.useRef)(!1);if((0,x.useEffect)(()=>{k?M.current=!0:M.current&&!N&&!S&&(M.current=!1,s.invalidateQueries({predicate:r(R=>Pr(R.state.error),"predicate")}))},[k,N,S,s]),S||j&&!l)return(0,a.jsx)(J6,{temporary:S?Pr(S):!0,retrying:y.some(R=>R.isFetching),onRetry:r(()=>{for(const R of y)(R.error||R===u&&j)&&R.refetch({cancelRefetch:!1})},"onRetry")});if(N)return(0,a.jsx)(Ds,{});if(f){const R=u.data;if(!R)return(0,a.jsx)(Ds,{});const _=v.error instanceof Ti?{status:v.error.status,message:v.error.message}:v.error instanceof Error?{message:v.error.message}:null;return(0,a.jsx)(Z6,{claimAvailable:R.deploymentExposure==="private",hasActiveInvite:R.bootstrapInviteActive,session:h.data,claimState:v.isSuccess?"success":v.isPending?"claiming":"idle",claimError:_,onClaim:r(()=>v.mutate(),"onClaim")})}if(p&&!h.data){const R=encodeURIComponent(`${t.pathname}${t.search}`);return(0,a.jsx)(Ve,{to:`/auth?next=${R}`,replace:!0})}return I?(0,a.jsxs)(a.Fragment,{children:[k&&(0,a.jsx)("div",{role:"status",className:"bg-bg-3 px-4 py-2 text-center text-sm text-ink-3",children:"Connection interrupted. Reconnecting automatically…"}),(0,a.jsx)(xo,{})]}):(0,a.jsx)(eB,{})}r(Xw,"CloudAccessGate");var RA=["all","active","paused","error","builtin"];function tB({endpointId:e,children:t}){const s=me({queryKey:$.chatEndpoints.detail(e),queryFn:r(()=>ZS.get(e),"queryFn")}),{enabled:l,githubEnabled:c}=S0();return s.isError?(0,a.jsxs)("div",{className:"space-y-3 p-6",children:[(0,a.jsx)("p",{role:"alert",className:"text-sm text-bad",children:s.error.message}),(0,a.jsx)(oe,{variant:"secondary",onClick:r(()=>{s.refetch()},"onClick"),children:"Retry"})]}):s.data?dS(s.data.provider,l,c)?(0,a.jsx)(a.Fragment,{children:t}):(0,a.jsx)(Ve,{to:"/apps",replace:!0}):null}r(tB,"ProviderEndpointGate");function Cd({children:e}){const{enabled:t,githubEnabled:s,loaded:l}=S0(),[c]=rS(),{endpointId:u}=Ps();return!u&&c.get("provider")==="agentmail"?(0,a.jsx)(a.Fragment,{children:e}):l?u?(0,a.jsx)(tB,{endpointId:u,children:e}):dS(c.get("provider"),t,s)?(0,a.jsx)(a.Fragment,{children:e}):(0,a.jsx)(Ve,{to:"/apps",replace:!0}):null}r(Cd,"ChatConnectorsExperimentalGate");Ce(()=>ke(()=>import("./TaskChatLab-BvlnYRNe.js").then(e=>e.TaskChatLab),__vite__mapDeps([2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119])));var nB=Ce(()=>ke(()=>import("./Cases-B-LfED0v.js").then(e=>e.Cases),__vite__mapDeps([120,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,121,4,122,40,123,124,7,9,125,126,95,127,128,129,38,130,76]))),aB=Ce(()=>ke(()=>import("./CaseDetail-kLu_fI6z.js").then(e=>e.CaseDetail),__vite__mapDeps([131,1,3,16,17,20,132,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,90,113,114,80,81,4,41,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,115,94,14,98,76,89,88,100,36,37,133,74,134,79,82,83,84,85,86,66,87,91,92,93,65,40,135,61,136,137,138,139,12,101,125,140,141,142,143,144,75,62,70,18,35,71,72,73,77,13,145,118,146,126,99,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,67,162,163,164,165,166,167,168,169,128,170,116,117,171,95,127,172,173,174,175,176,177,129,178,179]))),sB=Ce(()=>ke(()=>import("./Dashboard-B_807CNK.js").then(e=>e.Dashboard),__vite__mapDeps([180,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,139,65,41,181,182,7,9,97,183,55,184,146,185,186,37,187,188,127,163,161,67,98,175,189,190]))),iB=Ce(()=>ke(()=>import("./Companies-BMVhOFzV.js").then(e=>e.Companies),__vite__mapDeps([191,1,3,20,22,21,113,25,8,26,114,80,27,81,4,41,5,142,29,115,7,9,13,171,102,76,125,95,127,175]))),rB=Ce(()=>ke(()=>import("./Agents-0yi6xFaj.js").then(e=>e.Agents),__vite__mapDeps([192,1,3,17,16,20,193,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,121,4,134,80,81,9,65,7,71,10,194,13,98,195,88,44,89,90,37,55,109,141,184,146,196,99,74,76,197,198,127,199,39,200,40,174,163,161,67,172,82,83,173,201,202,203,175,204,205,206]))),$h=Ce(()=>ke(()=>import("./AgentDetail-CWdw5kRB.js").then(e=>e.AgentDetail),__vite__mapDeps([207,1,3,16,17,20,208,193,209,22,210,211,141,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,205,74,7,9,121,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,213,99,214,143,144,65,40,41,215,216,153,217,161,47,49,6,218,113,114,115,219,155,53,13,14,220,162,221,118,125,37,174,222,34,223,224,95,225,100,38,181,51,226,227,194,12,156,97,105,171,98,195,228,186,55,229,230,231,127,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,57,203,240,241,242,243,36,244,119,245,246,247,248,69,42,46,48,50,52,54,56,58,59,61,70,18,35,62,71,72,73,75,77,78,94,96,109,147,111,133,183,126,249,250,251,164,252,253,254,154,255,256,106,257,258,259,260,204,261,262,263,264,11,265,266,267,175,268]))),lB=Ce(()=>ke(()=>import("./Projects-IJU6fKzh.js").then(e=>e.Projects),__vite__mapDeps([269,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,122,4,7,9,13,126,127,175,262,263,206]))),Br=Ce(()=>ke(()=>import("./ProjectDetail-tbNc2eqO.js").then(e=>e.ProjectDetail),__vite__mapDeps([270,1,3,16,17,20,22,209,210,211,141,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,205,74,7,9,121,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,213,99,214,143,144,65,40,41,215,216,153,217,161,47,49,6,218,113,114,115,219,155,53,13,14,220,162,221,118,125,37,174,222,34,223,224,95,225,100,38,181,51,226,227,194,12,156,97,105,171,98,195,228,186,55,229,230,231,127,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,57,203,240,241,242,243,36,244,119,134,142,46,271,272,175,109,184,146,126,147,185,187,188,273,274,42,48,50,52,54,56,58,59,176,177,168,262,263,275,250,276,251,277,278,101,140,261]))),oB=Ce(()=>ke(()=>import("./ProjectWorkspaceDetail-CE3uadEz.js").then(e=>e.ProjectWorkspaceDetail),__vite__mapDeps([279,1,3,16,17,20,138,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,139,34,7,9,12,14,101,125,140,141,134,80,81,213,99,74,76,214,4,126,185,186,37,187,188,127,175,168,84,280]))),cB=Ce(()=>ke(()=>import("./Workspaces-Db99D3YB.js").then(e=>e.Workspaces),__vite__mapDeps([281,1,3,20,208,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,141,127,275,65,42,43,44,45,46,4,47,48,49,6,34,50,51,52,53,54,55,56,38,57,58,59,156,125,37,99,74,76,163,161,67,98,172,82,83,80,40,173,250,209,210,211,212,205,121,108,79,81,84,85,86,66,87,88,89,90,91,92,93,213,214,143,144,41,215,216,153,217,218,113,114,115,219,155,13,14,220,162,221,118,174,222,223,224,95,225,100,181,226,227,194,12,97,105,171,195,228,186,229,230,231,232,233,199,39,200,234,235,236,237,238,201,202,239,203,240,241,242,243,36,244,119,276,109,251,278,101,126,140,261]))),uB=Ce(()=>ke(()=>import("./Issues-Cn7D_2T3.js").then(e=>e.Issues),__vite__mapDeps([282,1,3,16,17,20,208,283,22,137,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,134,80,81,9,46,122,4,41,48,49,226,7,11,13,14,98,87,76,186,89,90,37,55,109,141,184,146,126,99,74,147,284,148,127,149,88,44,175,59,285,42,43,45,47,6,34,50,51,52,53,54,56,38,57,58,162,97,168,84,205,113,114,79,82,83,85,86,66,91,92,93,144,40,115,12,286,101,125,100,199,39,200,174,237,238,118,233,201,65,119,287,255,288,104,289,69,61,70,18,35,36,62,71,72,73,75,77,78,94,95,96]))),dB=Ce(()=>ke(()=>import("./Search-SUbPfqq4.js").then(e=>e.Search),__vite__mapDeps([290,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,121,4,113,114,80,81,41,134,9,122,40,291,61,7,13,14,98,257,87,76,186,125,88,44,89,90,55,126,95,229,127,149,35,174,59,133,74]))),fB=Ce(()=>ke(()=>import("./IssueDetail-DuaqjKFa.js").then(e=>e.t).then(e=>e.IssueDetail),__vite__mapDeps([292,1,3,25,8,16,17,20,208,193,22,209,210,211,141,21,19,23,24,26,27,28,29,5,30,31,32,33,212,205,74,7,9,121,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,213,99,214,143,144,65,40,41,215,216,153,217,161,47,49,6,218,113,114,115,219,155,53,13,14,220,162,221,118,125,37,174,222,34,223,224,95,225,100,38,181,51,226,227,194,12,156,97,105,171,98,195,228,186,55,229,230,231,127,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,57,203,240,241,242,243,36,244,119,18,35,137,245,293,106,165,166,167,132,42,46,48,50,52,54,56,58,59,94,133,253,254,294,295,296,297,134,122,75,246,247,248,69,61,70,62,71,72,73,77,78,96,109,147,111,298,135,63,64,68,101,102,103,291,299,300,136,138,139,140,142,145,146,126,148,149,150,151,152,154,157,158,159,160,164,168,169,128,104,301,302,117,303,110,304,305,10,11,306,15,60,107,112,116,307,184,196,284,185,187,188,249,273,289,308,309,310,311,312,175,251,287,252,313,314,315,285,177,274,176,255,316,317,256,257,318]))),pB=Ce(()=>ke(()=>import("./AgentChats-BlMX0riv.js").then(e=>e.AgentChats),__vite__mapDeps([319,1,3,19,16,17,20,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,88,44,89,90,127,320]))),mB=Ce(()=>ke(()=>import("./AgentChat-D3dO5D25.js").then(e=>e.AgentChat),__vite__mapDeps([321,1,3,16,17,20,22,292,25,8,208,193,209,210,211,141,21,19,23,24,26,27,28,29,5,30,31,32,33,212,205,74,7,9,121,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,213,99,214,143,144,65,40,41,215,216,153,217,161,47,49,6,218,113,114,115,219,155,53,13,14,220,162,221,118,125,37,174,222,34,223,224,95,225,100,38,181,51,226,227,194,12,156,97,105,171,98,195,228,186,55,229,230,231,127,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,57,203,240,241,242,243,36,244,119,18,35,137,245,293,106,165,166,167,132,42,46,48,50,52,54,56,58,59,94,133,253,254,294,295,296,297,134,122,75,246,247,248,69,61,70,62,71,72,73,77,78,96,109,147,111,298,135,63,64,68,101,102,103,291,299,300,136,138,139,140,142,145,146,126,148,149,150,151,152,154,157,158,159,160,164,168,169,128,104,301,302,117,303,110,304,305,10,11,306,15,60,107,112,116,307,184,196,284,185,187,188,249,273,289,308,309,310,311,312,175,251,287,252,313,314,315,285,177,274,176,255,316,317,256,257,318,322,320]))),hB=Ce(()=>ke(()=>import("./IssueChatLongThreadPerf-VX9bG-bM.js").then(e=>e.IssueChatLongThreadPerf),__vite__mapDeps([323,1,3,125,8,9,175,311,16,17,20,209,22,210,211,141,21,19,23,24,25,26,27,28,29,5,30,31,32,33,212,205,74,7,121,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,213,99,214,143,144,65,40,41,215,216,153,217,161,47,49,6,218,113,114,115,219,155,53,13,14,220,162,221,118,37,174,222,34,223,224,95,225,100,38,181,51,226,227,194,12,156,97,105,171,98,195,228,186,55,229,230,231,127,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,57,203,240,241,242,243,36,244,119,245,312,11,35,152,150,42,46,48,50,52,54,56,58,59,301,61,78,75,94,96,302,117,102,148,303,110,304,305,101,116,109,154,107,251,287,159,160,164,252,253,254,313,166]))),gB=Ce(()=>ke(()=>import("./Routines-GiNr76nw.js").then(e=>e.Routines),__vite__mapDeps([324,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,79,43,44,45,80,74,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,122,4,40,41,7,9,13,145,37,55,109,184,146,126,99,147,325,127,151,150,152,153,172,173,175,326,205,113,114,115,171,95,133,327,108,215,216,217,6,299,51,300,125,141,100,202,38,169]))),xB=Ce(()=>ke(()=>import("./Pipelines-Dqr4RIMe.js").then(e=>e.Learnings),__vite__mapDeps([328,1,3,16,17,20,22,329,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,126,147,148,132,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,133,74,121,79,82,83,84,85,86,66,87,91,92,93,122,144,40,173,61,330,67,301,209,210,211,141,212,205,108,213,99,214,143,65,215,216,153,217,161,218,219,155,13,220,162,221,118,125,174,222,223,224,95,225,181,226,227,194,12,156,97,105,171,195,228,186,229,230,231,127,232,233,199,39,200,163,234,235,172,236,237,238,201,202,239,203,240,241,242,243,244,119,78,75,35,96,302,117,102,303,110,304,305,307,109,175,311,245,312,11,152,150,101,116,154,107,251,287,159,160,164,252,253,254,313,166,158,314,177,77,179,331]))),bB=Ce(()=>ke(()=>import("./Pipelines-Dqr4RIMe.js").then(e=>e.PipelineItemDetail),__vite__mapDeps([328,1,3,16,17,20,22,329,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,126,147,148,132,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,133,74,121,79,82,83,84,85,86,66,87,91,92,93,122,144,40,173,61,330,67,301,209,210,211,141,212,205,108,213,99,214,143,65,215,216,153,217,161,218,219,155,13,220,162,221,118,125,174,222,223,224,95,225,181,226,227,194,12,156,97,105,171,195,228,186,229,230,231,127,232,233,199,39,200,163,234,235,172,236,237,238,201,202,239,203,240,241,242,243,244,119,78,75,35,96,302,117,102,303,110,304,305,307,109,175,311,245,312,11,152,150,101,116,154,107,251,287,159,160,164,252,253,254,313,166,158,314,177,77,179,331]))),vB=Ce(()=>ke(()=>import("./Pipelines-Dqr4RIMe.js").then(e=>e.PipelineItemLegacyRedirect),__vite__mapDeps([328,1,3,16,17,20,22,329,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,126,147,148,132,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,133,74,121,79,82,83,84,85,86,66,87,91,92,93,122,144,40,173,61,330,67,301,209,210,211,141,212,205,108,213,99,214,143,65,215,216,153,217,161,218,219,155,13,220,162,221,118,125,174,222,223,224,95,225,181,226,227,194,12,156,97,105,171,195,228,186,229,230,231,127,232,233,199,39,200,163,234,235,172,236,237,238,201,202,239,203,240,241,242,243,244,119,78,75,35,96,302,117,102,303,110,304,305,307,109,175,311,245,312,11,152,150,101,116,154,107,251,287,159,160,164,252,253,254,313,166,158,314,177,77,179,331]))),Uh=Ce(()=>ke(()=>import("./Pipelines-Dqr4RIMe.js").then(e=>e.Pipelines),__vite__mapDeps([328,1,3,16,17,20,22,329,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,126,147,148,132,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,133,74,121,79,82,83,84,85,86,66,87,91,92,93,122,144,40,173,61,330,67,301,209,210,211,141,212,205,108,213,99,214,143,65,215,216,153,217,161,218,219,155,13,220,162,221,118,125,174,222,223,224,95,225,181,226,227,194,12,156,97,105,171,195,228,186,229,230,231,127,232,233,199,39,200,163,234,235,172,236,237,238,201,202,239,203,240,241,242,243,244,119,78,75,35,96,302,117,102,303,110,304,305,307,109,175,311,245,312,11,152,150,101,116,154,107,251,287,159,160,164,252,253,254,313,166,158,314,177,77,179,331]))),yB=Ce(()=>ke(()=>import("./Pipelines-Dqr4RIMe.js").then(e=>e.ReviewQueue),__vite__mapDeps([328,1,3,16,17,20,22,329,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,126,147,148,132,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,133,74,121,79,82,83,84,85,86,66,87,91,92,93,122,144,40,173,61,330,67,301,209,210,211,141,212,205,108,213,99,214,143,65,215,216,153,217,161,218,219,155,13,220,162,221,118,125,174,222,223,224,95,225,181,226,227,194,12,156,97,105,171,195,228,186,229,230,231,127,232,233,199,39,200,163,234,235,172,236,237,238,201,202,239,203,240,241,242,243,244,119,78,75,35,96,302,117,102,303,110,304,305,307,109,175,311,245,312,11,152,150,101,116,154,107,251,287,159,160,164,252,253,254,313,166,158,314,177,77,179,331]))),jB=Ce(()=>ke(()=>import("./PipelineSettings-CEOXJLey.js").then(e=>e.PipelineSettings),__vite__mapDeps([332,1,3,16,17,20,22,329,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,126,147,148,212,113,114,80,81,4,79,43,44,45,74,82,83,84,85,86,66,87,76,88,89,90,91,92,93,139,46,144,160,40,218,215,7,9,216,99,153,217,161,115,219,155,53,13,14,220,162,221,118,125,37,174,222,11,12,171,141,95,127,225,100,151,150,233,152,331,333,108,47,172,173]))),Zw=Ce(()=>ke(()=>import("./StatusCards-D2X-8hFz.js").then(e=>e.StatusCards),__vite__mapDeps([334,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,121,4,113,114,80,81,41,134,9,40,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,54,55,56,38,57,58,59,115,181,13,156,98,335,118,85,83,125,88,89,90,99,74,76,95,127,100,152,150,153,163,161,67,172,82,173,133,276,109,251]))),wB=Ce(()=>ke(()=>import("./PixelsOffice-Dc-hTwL6.js").then(e=>e.PixelsOffice),__vite__mapDeps([336,1,3,20,43,44,45,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,247,80,82,83,337,34,226,7,9,11,12,306,76,186,125,37,55,109,147,91,92,127,175,133,74,338,301,209,210,211,141,212,205,121,4,108,79,81,84,85,86,66,87,88,89,90,93,213,99,214,143,144,65,40,41,215,216,153,217,161,47,49,6,218,113,114,115,219,155,53,13,14,220,162,221,118,174,222,223,224,95,225,100,38,181,51,227,194,156,97,105,171,98,195,228,229,230,231,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,57,203,240,241,242,243,36,244,119,48,42,46,50,52,54,56,58,59,61,78,75,94,35,96,302,117,102,148,303,110,304,305,331,277]))),Jw=Ce(()=>ke(()=>import("./RoutineDetail-CWWdWsrO.js").then(e=>e.RoutineDetail),__vite__mapDeps([339,1,3,16,17,20,132,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,90,113,114,80,81,4,41,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,115,94,14,98,76,89,88,100,36,37,133,74,108,79,82,83,84,85,86,66,87,91,92,93,139,143,248,161,218,40,215,216,99,153,217,219,155,13,220,162,221,118,125,174,222,340,12,306,145,171,341,228,186,109,126,95,147,229,127,225,151,150,233,152,235,172,173,239,175,261,264,205,11,178,342,163,67,327,299,300,141,202,169,333,212,343]))),kB=Ce(()=>ke(()=>import("./UserProfile-BYBUYHyM.js").then(e=>e.UserProfile),__vite__mapDeps([344,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,90,161,7,9,221,197,198,127]))),Ql=Ce(()=>ke(()=>import("./ExecutionWorkspaceDetail-D4v1WZZf.js").then(e=>e.ExecutionWorkspaceDetail),__vite__mapDeps([345,1,3,16,17,20,138,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,139,34,7,9,12,14,101,125,140,141,134,80,81,4,40,6,145,98,37,55,109,184,146,126,95,185,186,187,188,91,92,127,100,38,175,168,84,261,275,65,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,58,59,156,99,74,76,163,161,67,172,82,83,173,250,209,210,211,212,205,121,108,79,85,86,66,87,88,89,90,93,213,214,143,144,41,215,216,153,217,218,113,114,115,219,155,13,220,162,221,118,174,222,223,224,225,181,226,227,194,97,105,171,195,228,229,230,231,232,233,199,39,200,234,235,236,237,238,201,202,239,203,240,241,242,243,36,244,119,276,251,280,327,299,300,151,150,152,169]))),SB=Ce(()=>ke(()=>import("./Goals-BT9hCHnP.js").then(e=>e.Goals),__vite__mapDeps([346,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,13,127,347,41]))),ek=Ce(()=>ke(()=>import("./Artifacts-Cp_CLB8P.js").then(e=>e.Artifacts),__vite__mapDeps([348,1,3,16,17,20,208,18,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,4,6,34,12,35,36,37,38,113,114,80,81,41,214,7,9,76,125,95,127,317]))),NB=Ce(()=>ke(()=>import("./GoalDetail-Ct08uwQw.js").then(e=>e.GoalDetail),__vite__mapDeps([349,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,134,80,81,9,7,13,55,126,127,232,274,79,43,44,45,74,82,83,84,85,86,66,87,76,88,89,90,91,92,93,42,46,4,47,48,49,6,34,50,51,52,53,54,56,38,57,58,59,176,177,40,173,168,206,347,41]))),tk=Ce(()=>ke(()=>import("./Approvals-DSt7iLh6.js").then(e=>e.Approvals),__vite__mapDeps([350,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,134,80,81,9,97,125,55,127,315,48,49,7,149,88,44,89,90,175,285,42,43,45,46,4,47,6,34,50,51,52,53,54,56,38,57,58,59,162]))),CB=Ce(()=>ke(()=>import("./ApprovalDetail-hUlU9KPS.js").then(e=>e.ApprovalDetail),__vite__mapDeps([351,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,42,43,44,45,46,4,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,89,90,127,149,88,100,285,162,97]))),AB=Ce(()=>ke(()=>import("./CompanyActivity-5OGh6LZ6.js").then(e=>e.CompanyActivity),__vite__mapDeps([352,1,3,353,16,17,20,208,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,108,134,80,81,9,139,354,144,65,40,41,337,7,10,54,13,14,286,162,272,98,95,175,186,125,44,89,90,88,37,55,109,99,74,76,147,229,325,91,92,127,149,172,82,83,4,173,119,318,165,166,167,355,356,277,343,357]))),Ad=Ce(()=>ke(()=>import("./AuditHub-DiWa6PDF.js").then(e=>e.AuditHub),__vite__mapDeps([353,1,3,16,17,20,208,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,108,134,80,81,9,139,354,144,65,40,41,337,7,10,54,13,14,286,162,272,98,95,175,186,125,44,89,90,88,37,55,109,99,74,76,147,229,325,91,92,127,149,172,82,83,4,173,119,318,165,166,167,355,356,277,343,357]))),_B=Ce(()=>ke(()=>import("./WhatNeedsMe-I9wfO12c.js").then(e=>e.WhatNeedsMe),__vite__mapDeps([358,1,3,16,17,20,22,359,208,193,43,44,45,253,254,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,121,4,113,114,80,81,41,143,122,86,40,173,48,49,42,46,47,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,115,170,301,209,210,211,141,205,74,108,79,82,83,84,85,66,87,76,88,89,90,91,92,93,213,99,214,144,65,215,216,153,217,161,218,219,155,13,14,220,162,221,118,125,37,174,222,223,224,95,225,100,181,226,227,194,12,156,97,105,171,98,195,228,186,229,230,231,127,232,233,199,39,200,163,67,234,235,172,236,237,238,201,202,239,203,240,241,242,243,36,244,119,61,78,75,94,35,96,302,117,102,148,303,110,304,305,296,360,147,165,166,167,338,109,184,146]))),EB=Ce(()=>ke(()=>import("./DecisionQueuePage-BRbIttBU.js").then(e=>e.DecisionQueuePage),__vite__mapDeps([361,1,3,16,17,20,22,359,208,193,43,44,45,253,254,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,121,4,113,114,80,81,41,143,122,86,40,173,48,49,42,46,47,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,115,170,301,209,210,211,141,205,74,108,79,82,83,84,85,66,87,76,88,89,90,91,92,93,213,99,214,144,65,215,216,153,217,161,218,219,155,13,14,220,162,221,118,125,37,174,222,223,224,95,225,100,181,226,227,194,12,156,97,105,171,98,195,228,186,229,230,231,127,232,233,199,39,200,163,67,234,235,172,236,237,238,201,202,239,203,240,241,242,243,36,244,119,61,78,75,94,35,96,302,117,102,148,303,110,304,305,296,360,147,165,166,167,338]))),IB=Ce(()=>ke(()=>import("./BoardChat-BtB-0sW_.js").then(e=>e.BoardChat),__vite__mapDeps([362,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,113,114,80,81,4,41,139,39,40,161,363,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,61,170,263,94,364,307,98,87,183,118,85,83,88,89,90,184,146,92,127,35,175,112,115,116,117,76,99,74,100,36,37,133]))),TB=Ce(()=>ke(()=>import("./CompanySettings-EcYnaTrR.js").then(e=>e.CompanySettings),__vite__mapDeps([365,1,3,16,17,20,22,21,212,25,8,26,205,74,27,7,9,40,215,23,24,4,76,216,31,99,153,217,10,13,125,37,141,95,198,127,232,233,172,82,83,80,173,238,41,47,118,85,201,65,30,304,366,209,210,211,19,28,29,5,32,33,121,108,79,43,44,45,81,84,86,66,87,88,89,90,91,92,93,213,214,143,144,161,49,6,218,113,114,115,219,155,53,14,220,162,221,174,222,34,223,224,225,100,38,181,51,226,227,194,12,156,97,105,171,98,195,228,186,55,229,230,231,199,39,200,163,67,234,235,236,237,202,239,57,203,240,241,242,243,36,244,119,355]))),RB=Ce(()=>ke(()=>import("./CompanyConnections-Q1zAAePy.js").then(e=>e.CompanyConnections),__vite__mapDeps([367,1,3,20,209,16,17,22,210,211,141,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,205,74,7,9,121,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,213,99,214,143,144,65,40,41,215,216,153,217,161,47,49,6,218,113,114,115,219,155,53,13,14,220,162,221,118,125,37,174,222,34,223,224,95,225,100,38,181,51,226,227,194,12,156,97,105,171,98,195,228,186,55,229,230,231,127,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,57,203,240,241,242,243,36,244,119,366,355,356]))),Bh=Ce(()=>ke(()=>import("./CompanyEnvironments-BW9JgMNj.js").then(e=>e.CompanyEnvironments),__vite__mapDeps([368,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,205,74,7,9,214,4,218,113,114,80,81,41,40,215,76,216,99,153,217,161,115,219,155,53,13,14,220,162,221,118,85,83,125,37,174,222,227,12,156,171,55,141,127,225,236,121,108,95,100,172,82,173,238,47,233,201,65,202,203,297]))),MB=Ce(()=>ke(()=>import("./BootstrapSetupUxLab-ARs-PdM-.js").then(e=>e.BootstrapSetupUxLab),__vite__mapDeps([369,1,3,7,8,9,97,33,98,175]))),DB=Ce(()=>ke(()=>import("./ResponsibleUserDenialUxLab-CwOtm-H_.js").then(e=>e.ResponsibleUserDenialUxLab),__vite__mapDeps([370,1,3,175,256,245,106,257]))),OB=Ce(()=>ke(()=>import("./CrossIssueCollaborationUxLab-BbToOV2g.js").then(e=>e.CrossIssueCollaborationUxLab),__vite__mapDeps([371,1,3,293,245,143,49,219,97,106,165,166,167,90,25,8,26,89,175,313,118,85,83,125,9]))),LB=Ce(()=>ke(()=>import("./CompanySettingsPluginPage-D3Vts52M.js").then(e=>e.CompanySettingsPluginPage),__vite__mapDeps([372,1,3,16,17,21,20,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,185,186,37,187,188,127]))),zB=Ce(()=>ke(()=>import("./CompanyAccess-BlUM6hbW.js").then(e=>e.CompanyAccess),__vite__mapDeps([373,1,3,16,17,20,208,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,90,134,80,81,9,4,6,7,97,171,125,37,55,99,74,76,147,185,186,187,188,197,198,127,38]))),PB=Ce(()=>ke(()=>import("./CompanyAccess-BlUM6hbW.js").then(e=>e.CompanyAccessLegacyRoute),__vite__mapDeps([373,1,3,16,17,20,208,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,90,134,80,81,9,4,6,7,97,171,125,37,55,99,74,76,147,185,186,187,188,197,198,127,38]))),nk=Ce(()=>ke(()=>import("./AdvancedToolsRoute-CTTIaGDV.js").then(e=>e.AdvancedToolsRoute),__vite__mapDeps([374,1,3,16,17,20,209,22,210,211,141,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,205,74,7,9,121,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,213,99,214,143,144,65,40,41,215,216,153,217,161,47,49,6,218,113,114,115,219,155,53,13,14,220,162,221,118,125,37,174,222,34,223,224,95,225,100,38,181,51,226,227,194,12,156,97,105,171,98,195,228,186,55,229,230,231,127,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,57,203,240,241,242,243,36,244,119,142,64,363,271,10,375,102,126,147,175,133,267,190,376,377,193]))),ak=Ce(()=>ke(()=>import("./ProfileWizardRoute-CyY9cBXn.js").then(e=>e.ProfileWizardRoute),__vite__mapDeps([378,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,121,4,108,40,41,7,9,302,13,76,125,37,95,230,127,100,234,88,44,89,90,229,172,82,83,80,173,174,267,98,175,377,193,55,126,91,92,379,162,147]))),$B=Ce(()=>ke(()=>import("./ProfileDetailRoute-DWOiwLnB.js").then(e=>e.ProfileDetailRoute),__vite__mapDeps([380,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,108,142,6,7,9,97,171,167,125,37,99,74,76,95,230,127,100,267,98,175,376,377,193,55,126,91,92,379,162,147]))),UB=Ce(()=>ke(()=>import("./Browse-B5mbrNri.js").then(e=>e.Browse),__vite__mapDeps([381,1,3,20,193,22,382,16,17,210,211,141,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,205,74,7,9,121,4,41,156,98,221,89,90,109,99,76,95,229,230,56,163,161,67,235,357,383,113,114,80,81,108,295,115,34,227,224,171,118,85,83,88,44,37,55,147,249,231,127,244,110,384,385,134,6,302,183,38,239,100,57]))),MA=Ce(()=>ke(()=>import("./AppsConnect-C1ilHYgy.js").then(e=>e.AppsConnect),__vite__mapDeps([386,1,3,16,17,20,209,22,210,211,141,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,205,74,7,9,121,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,213,99,214,143,144,65,40,41,215,216,153,217,161,47,49,6,218,113,114,115,219,155,53,13,14,220,162,221,118,125,37,174,222,34,223,224,95,225,100,38,181,51,226,227,194,12,156,97,105,171,98,195,228,186,55,229,230,231,127,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,57,203,240,241,242,243,36,244,119,383,387]))),BB=Ce(()=>ke(()=>import("./ChatEndpointSetup-BIxcZyIt.js").then(e=>e.ChatEndpointSetup),__vite__mapDeps([388,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,121,4,108,47,6,34,219,155,7,9,98,228,186,118,85,83,88,44,89,90,37,55,141,126,99,74,76,95,198,249,127,100,234,41,229,38,243,36,389,214,143,230,175,110,305,261,265,162,238,40,233,201,65,390]))),sk=Ce(()=>ke(()=>import("./ChatEndpointDetail-DMGq_bkC.js").then(e=>e.ChatEndpointDetail),__vite__mapDeps([391,1,3,16,17,20,208,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,205,74,7,9,121,4,113,114,80,81,41,108,79,43,44,45,82,83,84,85,86,66,87,76,88,89,90,91,92,93,139,354,144,40,47,42,46,48,49,6,34,50,51,52,53,54,55,56,38,57,58,59,115,11,12,13,156,171,98,118,125,37,99,95,147,249,230,231,127,100,233,242,241,110,261,392,234,229,235,389,214,143,126,175,305,265,162,238,201,65,390]))),KB=Ce(()=>ke(()=>import("./ChatIdentityConfirm-vsNMn_wj.js").then(e=>e.ChatIdentityConfirm),__vite__mapDeps([393,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,198,249]))),qB=Ce(()=>ke(()=>import("./AppsReview-CdjVNMBY.js").then(e=>e.AppsReview),__vite__mapDeps([394,1,3,21,20,22,127,395,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,301,209,210,211,141,212,205,74,121,108,79,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,213,99,214,143,144,65,40,41,215,216,153,217,161,218,113,114,115,219,155,13,14,220,162,221,118,125,37,174,222,223,224,95,225,100,181,226,227,194,12,156,97,105,171,98,195,228,186,229,230,231,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,203,240,241,242,243,36,244,119,61,78,75,94,35,96,302,117,102,148,303,110,304,305]))),FB=Ce(()=>ke(()=>import("./AppDetail-CqWalFA3.js").then(e=>e.AppDetail),__vite__mapDeps([396,1,3,16,17,20,22,209,210,211,141,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,205,74,7,9,121,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,213,99,214,143,144,65,40,41,215,216,153,217,161,47,49,6,218,113,114,115,219,155,53,13,14,220,162,221,118,125,37,174,222,34,223,224,95,225,100,38,181,51,226,227,194,12,156,97,105,171,98,195,228,186,55,229,230,231,127,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,57,203,240,241,242,243,36,244,119,382,109,56,357,383,147,308,384,387,392,389,126,175,110,305,261,265,395,42,46,48,50,52,54,58,59,301,61,78,75,94,35,96,302,117,102,148,303,304]))),ik=Ce(()=>ke(()=>import("./AppNotConnected-CzQcETOO.js").then(e=>e.AppNotConnected),__vite__mapDeps([397,1,3,16,17,20,209,22,210,211,141,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,205,74,7,9,121,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,213,99,214,143,144,65,40,41,215,216,153,217,161,47,49,6,218,113,114,115,219,155,53,13,14,220,162,221,118,125,37,174,222,34,223,224,95,225,100,38,181,51,226,227,194,12,156,97,105,171,98,195,228,186,55,229,230,231,127,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,57,203,240,241,242,243,36,244,119,396,382,109,56,357,383,147,308,384,387,392,389,126,175,110,305,261,265,395,42,46,48,50,52,54,58,59,301,61,78,75,94,35,96,302,117,102,148,303,304]))),rk=Ce(()=>ke(()=>import("./GatewaysList-CZP6UIqo.js").then(e=>e.GatewaysList),__vite__mapDeps([398,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,13,37,55,126,95,229,230,127,233,267,98,125,175,399,139,6,53,99,74,76,38]))),HB=Ce(()=>ke(()=>import("./GatewayDetail-BzSIBC84.js").then(e=>e.GatewayDetail),__vite__mapDeps([400,1,3,16,17,20,208,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,65,248,4,40,75,41,173,215,7,9,76,216,74,99,153,217,47,310,6,53,271,13,364,118,85,83,37,55,126,95,229,230,127,233,38,267,98,125,175,399,139]))),VB=Ce(()=>ke(()=>import("./CompanySkills-CJp4nZix.js").then(e=>e.CompanySkills),__vite__mapDeps([401,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,121,4,113,114,80,81,41,134,9,79,43,44,45,74,82,83,84,85,86,66,87,76,88,89,90,91,92,93,214,40,75,161,47,42,46,48,49,6,34,50,51,52,53,7,54,55,56,38,57,58,59,310,115,155,61,181,300,227,68,11,13,156,220,307,162,97,171,98,102,183,118,125,37,126,99,95,127,149,100,163,67,234,229,242,241,36,260,261,178,402,326,205,133,403]))),lk=Ce(()=>ke(()=>import("./SkillSources-DeBOYCiw.js").then(e=>e.SkillSources),__vite__mapDeps([404,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,113,114,80,81,4,41,161,135,34,61,7,9,13,156,98,99,74,76,95,56,127,216,244,77,403,405,67,125,387]))),Kh=Ce(()=>ke(()=>import("./SkillStudio-C3XaNFS3.js").then(e=>e.SkillStudio),__vite__mapDeps([406,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,90,113,114,80,81,4,41,108,134,9,79,43,44,45,74,82,83,84,85,86,66,87,76,88,89,91,92,93,214,40,215,7,216,99,153,217,407,65,155,223,121,6,53,224,162,118,125,37,95,225,100,38,335,49,42,46,47,48,34,50,51,52,54,55,56,57,58,59,115,61,181,330,67,71,301,209,210,211,141,205,213,143,144,161,218,219,13,14,220,221,174,222,226,227,194,12,156,97,105,171,98,195,228,186,229,230,231,127,232,233,199,39,200,163,234,235,172,173,236,237,238,201,202,239,203,240,241,242,243,36,244,119,78,75,94,35,96,302,117,102,148,303,110,304,305,149,150,175,73,77,177,133,260,206,178,130,402,403,401,310,300,68,11,307,183,126,261,326,408,409]))),WB=Ce(()=>ke(()=>import("./Secrets--ch95iPv.js").then(e=>e.Secrets),__vite__mapDeps([410,1,3,16,17,20,21,22,121,25,8,4,113,26,114,80,27,81,41,5,134,9,23,24,142,46,143,75,161,48,298,6,115,34,223,108,53,7,224,162,118,85,83,125,88,44,89,90,37,99,74,76,95,225,100,38,51,124,226,67,227,340,13,156,31,97,171,98,221,102,55,147,197,198,229,127,234,172,82,40,173,222,36,133]))),QB=Ce(()=>ke(()=>import("./CompanyImport-B7Y99lni.js").then(e=>e.CompanyImport),__vite__mapDeps([411,1,3,20,22,209,16,17,210,211,141,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,205,74,7,9,121,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,213,99,214,143,144,65,40,41,215,216,153,217,161,47,49,6,218,113,114,115,219,155,53,13,14,220,162,221,118,125,37,174,222,34,223,224,95,225,100,38,181,51,226,227,194,12,156,97,105,171,98,195,228,186,55,229,230,231,127,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,57,203,240,241,242,243,36,244,119,42,46,48,50,52,54,56,58,59,412,413,414]))),GB=Ce(()=>ke(()=>import("./DesignGuide-bh4XX4nv.js").then(e=>e.DesignGuide),__vite__mapDeps([415,1,3,16,17,20,209,22,210,211,141,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,205,74,7,9,121,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,213,99,214,143,144,65,40,41,215,216,153,217,161,47,49,6,218,113,114,115,219,155,53,13,14,220,162,221,118,125,37,174,222,34,223,224,95,225,100,38,181,51,226,227,194,12,156,97,105,171,98,195,228,186,55,229,230,231,127,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,57,203,240,241,242,243,36,244,119,247,134,64,312,11,35,152,150,42,46,48,50,52,54,56,58,59,63,61,68,69,70,18,62,71,72,73,75,77,78,94,96,101,102,103,182,104,416,301,302,117,148,303,110,304,305,417,360,183,307,149,175,107,109,157,309,310,145,284,311,245,116,154,251,287,159,160,164,252,253,254,313,166,274,176,177,168,133,262,263,266,267,206,130,402,189,405,342,408,288,289,409]))),YB=Ce(()=>ke(()=>import("./InstanceFeatures-CkqItnLP.js").then(e=>e.InstanceFeatures),__vite__mapDeps([418,1,3,19,16,17,20,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,121,4,125,9,95,188,127,419,141,197,198,233]))),XB=Ce(()=>ke(()=>import("./AgentDefaults-BRMPOQ-f.js").then(e=>e.AgentDefaults),__vite__mapDeps([420,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,143,55,127,258,259,7,9,14,76,125,172,82,83,80,4,40,173,119]))),ZB=Ce(()=>ke(()=>import("./OmpAllSettings-D7HFc1wr.js").then(e=>e.n).then(e=>e.OmpAllSettingsPage),__vite__mapDeps([268,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,214,7,9,14,125,55,95,127,100,233,172,82,83,80,4,40,173,174,258,259,76,119]))),JB=Ce(()=>ke(()=>import("./ModelsAndProviders-DhjeUdj-.js").then(e=>e.ModelsAndProviders),__vite__mapDeps([421,1,3,20,21,22,7,8,9,13,156,55,127,258]))),eK=Ce(()=>ke(()=>import("./InstanceAdvanced-Bb4mtcMA.js").then(e=>e.InstanceAdvanced),__vite__mapDeps([422,1,3,7,8,9,12,14,98,125,127,419,20,141,197,198,233]))),tK=Ce(()=>ke(()=>import("./InstanceAccess-CWtKVMDd.js").then(e=>e.InstanceAccess),__vite__mapDeps([423,1,3,20,22,121,25,8,4,7,9,97,32,37,147,127,175]))),nK=Ce(()=>ke(()=>import("./ProfileSettings-BDPwbFPA.js").then(e=>e.ProfileSettings),__vite__mapDeps([424,1,3,20,22,21,90,25,8,26,108,226,7,9,12,220,364,171,195,55,95,127,232,233,234,121,4,23,24,27,41,88,44,89,229,235,172,82,83,80,40,173,175]))),aK=Ce(()=>ke(()=>import("./PluginManager-BHDvd2Kk.js").then(e=>e.PluginManager),__vite__mapDeps([425,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,108,181,7,9,13,375,307,171,98,125,37,99,74,76,95,187,127,175]))),sK=Ce(()=>ke(()=>import("./PluginSettings-DSb7ReBz.js").then(e=>e.PluginSettings),__vite__mapDeps([426,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,134,80,81,9,213,99,74,7,76,214,86,48,49,51,220,162,98,341,125,187,185,186,37,188,127,236,121,4,108,40,41,161,219,155,53,13,171,95,225,100,172,82,83,173,175,168,84,140,141]))),ok=Ce(()=>ke(()=>import("./AdapterManager-D60L5cdo.js").then(e=>e.AdapterManager),__vite__mapDeps([427,1,3,20,21,22,108,25,8,213,33,99,74,26,27,7,9,76,30,51,13,375,156,171,98,125,37,95,127,237,23,24,40,199,39,200,4,31,174,238,41,47,118,85,83,233,201,65,240,241,175]))),ck=Ce(()=>ke(()=>import("./PluginPage-DGJsTGb4.js").then(e=>e.PluginPage),__vite__mapDeps([428,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,214,7,9,187,185,186,37,188,127]))),iK=Ce(()=>ke(()=>import("./NewAgent-BTrIjdLI.js").then(e=>e.NewAgent),__vite__mapDeps([429,1,3,16,17,20,209,22,210,211,141,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,205,74,7,9,121,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,213,99,214,143,144,65,40,41,215,216,153,217,161,47,49,6,218,113,114,115,219,155,53,13,14,220,162,221,118,125,37,174,222,34,223,224,95,225,100,38,181,51,226,227,194,12,156,97,105,171,98,195,228,186,55,229,230,231,127,232,233,199,39,200,163,67,234,235,172,173,236,237,238,201,202,239,57,203,240,241,242,243,36,244,119]))),rK=Ce(()=>ke(()=>import("./Auth-7ZwKR47T.js").then(e=>e.AuthPage),__vite__mapDeps([430,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,417,360,183,58,198,431]))),lK=Ce(()=>ke(()=>import("./BoardClaim-Dj03nG8V.js").then(e=>e.BoardClaimPage),__vite__mapDeps([432,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,147,175]))),oK=Ce(()=>ke(()=>import("./AssistantConnection-D7MGE_yN.js").then(e=>e.AssistantConnection),__vite__mapDeps([385,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,134,80,81,9,4,6,34,7,302,183,89,90,127,38,239,76,100,57,384]))),uk=Ce(()=>ke(()=>import("./McpConnect-Cv3wvage.js").then(e=>e.McpConnectPage),__vite__mapDeps([433,1,3,16,17,20,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,121,4,7,9,183,89,90,95,175,384]))),cK=Ce(()=>ke(()=>import("./McpConnect-Cv3wvage.js").then(e=>e.McpDevicePage),__vite__mapDeps([433,1,3,16,17,20,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,121,4,7,9,183,89,90,95,175,384]))),uK=Ce(()=>ke(()=>import("./McpConnect-Cv3wvage.js").then(e=>e.AssistantConnectionsPage),__vite__mapDeps([433,1,3,16,17,20,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,121,4,7,9,183,89,90,95,175,384]))),dK=Ce(()=>ke(()=>import("./CliAuth-BrGRdrjs.js").then(e=>e.CliAuthPage),__vite__mapDeps([434,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,147,175]))),fK=Ce(()=>ke(()=>import("./InviteLanding-BnL6CX0t.js").then(e=>e.InviteLandingPage),__vite__mapDeps([435,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,147,198,201,65,431]))),dk=Ce(()=>ke(()=>import("./PublicIssueSharePage-D2-mjx5c.js").then(e=>e.PublicIssueSharePage),__vite__mapDeps([436,1,3,16,17,20,214,42,43,44,45,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,46,4,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,60,61,62,89,90,229,316]))),pK=Ce(()=>ke(()=>import("./JoinRequestQueue-DDbAcL7h.js").then(e=>e.JoinRequestQueue),__vite__mapDeps([437,1,3,20,21,22,7,8,9,125,37,147,127,175]))),DA=Ce(()=>ke(()=>Promise.resolve().then(()=>J8).then(e=>e.NotFoundPage),void 0)),fc=Ce(()=>ke(()=>import("./Inbox-6vKVEJVu.js").then(e=>e.n).then(e=>e.Inbox),__vite__mapDeps([283,1,3,16,17,20,22,137,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,134,80,81,9,46,122,4,41,48,49,226,7,11,13,14,98,87,76,186,89,90,37,55,109,141,184,146,126,99,74,147,284,148,127,149,88,44,175,59,285,42,43,45,47,6,34,50,51,52,53,54,56,38,57,58,162,97,168,84]))),mK=Ce(()=>ke(()=>import("./CompanyExport-CDSYD5mi.js").then(e=>e.CompanyExport),__vite__mapDeps([438,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,42,43,44,45,46,4,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,14,76,37,126,127,77,414]))),hK=Ce(()=>ke(()=>import("./Terminal-Byg7O1p2.js").then(e=>e.Terminal),__vite__mapDeps([439,1,3,16,17,20,294,25,8,114,80,26,27,81,39,200,295,6,7,9,296,31,195,76,95,38,36,37,297,21,22,19,23,24,28,29,5,30,32,33,212,108,4,40,48,298,53,13,72,105,98,99,74,147,127,216,100,172,82,83,173,202,119,408])));function gK({children:e}){return(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ds,{}),children:e})}r(gK,"ProductionSurface");function xK(e){const t=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{index:!0,element:(0,a.jsx)(Ve,{to:"dashboard",replace:!0})}),(0,a.jsx)(L,{path:"dashboard",element:(0,a.jsx)(sB,{})}),(0,a.jsx)(L,{path:"dashboard/live",element:(0,a.jsx)(Ve,{to:hI("all"),replace:!0})}),(0,a.jsx)(L,{path:"timeline",element:(0,a.jsx)(Ys,{to:"/activity/timeline"})}),(0,a.jsx)(L,{path:"onboarding",element:(0,a.jsx)(zA,{})}),(0,a.jsx)(L,{path:"companies",element:(0,a.jsx)(iB,{})}),(0,a.jsx)(L,{path:"company/settings",element:(0,a.jsx)(TB,{})}),(0,a.jsx)(L,{path:"company/settings/connections",element:(0,a.jsx)(RB,{})}),(0,a.jsx)(L,{path:"company/settings/agent-defaults",element:(0,a.jsx)(XB,{})}),(0,a.jsx)(L,{path:"company/settings/agent-defaults/all",element:(0,a.jsx)(ZB,{})}),(0,a.jsx)(L,{path:"company/settings/models",element:(0,a.jsx)(JB,{})}),(0,a.jsx)(L,{path:"company/settings/environments",element:(0,a.jsx)(Ve,{to:"/company/settings/instance/environments",replace:!0})}),(0,a.jsx)(L,{path:"company/settings/cloud-upstream",element:(0,a.jsx)(Ve,{to:"/company/export",replace:!0})}),(0,a.jsxs)(L,{element:(0,a.jsx)(Es,{pageKey:"company.members"}),children:[(0,a.jsx)(L,{path:"company/settings/members",element:(0,a.jsx)(zB,{})}),(0,a.jsx)(L,{path:"company/settings/access",element:(0,a.jsx)(PB,{})})]}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"company.invites"}),children:(0,a.jsx)(L,{path:"company/settings/invites",element:(0,a.jsx)(Ve,{to:"/company/settings/members?tab=invites",replace:!0})})}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"company.export"}),children:(0,a.jsx)(L,{path:"company/export/*",element:(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ds,{}),children:(0,a.jsx)(mK,{})})})}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"company.import"}),children:(0,a.jsx)(L,{path:"company/import",element:(0,a.jsx)(QB,{})})}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"company.secrets"}),children:(0,a.jsx)(L,{path:"company/settings/secrets",element:(0,a.jsx)(WB,{})})}),(0,a.jsx)(L,{path:"company/settings/tools",element:(0,a.jsx)(mk,{})}),(0,a.jsx)(L,{path:"company/settings/tools/:tab",element:(0,a.jsx)(mk,{})}),(0,a.jsx)(L,{path:"tools",element:(0,a.jsx)(hk,{})}),(0,a.jsx)(L,{path:"tools/:tab",element:(0,a.jsx)(hk,{})}),(0,a.jsx)(L,{path:"apps",element:(0,a.jsx)(UB,{})}),(0,a.jsx)(L,{path:"apps/assistant-connection",element:(0,a.jsx)(oK,{})}),(0,a.jsx)(L,{path:"apps/browse",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/connections",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/byo",element:(0,a.jsx)(MA,{byoOnly:!0})}),(0,a.jsx)(L,{path:"apps/vercel-connect",element:(0,a.jsx)(fk,{credentialSource:"vercel_connect"})}),(0,a.jsx)(L,{path:"apps/connect",element:(0,a.jsx)(fk,{})}),(0,a.jsx)(L,{path:"apps/chat/connect",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(BB,{})})}),(0,a.jsx)(L,{path:"apps/chat/:endpointId",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(Ve,{to:"settings",replace:!0})})}),(0,a.jsx)(L,{path:"apps/chat/:endpointId/reviews/:reviewId",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(sk,{})})}),(0,a.jsx)(L,{path:"apps/chat/:endpointId/:tab",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(sk,{})})}),(0,a.jsx)(L,{path:"apps/connect/:appKey",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/connect/:appKey/:stage",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/review",element:(0,a.jsx)(qB,{})}),(0,a.jsx)(L,{path:"apps/attention",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/gateways",element:(0,a.jsx)(rk,{})}),(0,a.jsx)(L,{path:"apps/gateways/:gatewayId",element:(0,a.jsx)(Ve,{to:"overview",replace:!0})}),(0,a.jsx)(L,{path:"apps/gateways/:gatewayId/:tab",element:(0,a.jsx)(HB,{})}),(0,a.jsx)(L,{path:"apps/advanced",element:(0,a.jsx)(nk,{})}),(0,a.jsx)(L,{path:"apps/advanced/gateways",element:(0,a.jsx)(rk,{})}),(0,a.jsx)(L,{path:"apps/advanced/profiles/new",element:(0,a.jsx)(ak,{mode:"new"})}),(0,a.jsx)(L,{path:"apps/advanced/profiles/:profileId/edit",element:(0,a.jsx)(ak,{mode:"edit"})}),(0,a.jsx)(L,{path:"apps/advanced/profiles/:profileId",element:(0,a.jsx)($B,{})}),(0,a.jsx)(L,{path:"apps/advanced/audit",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/advanced/run-your-own",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/advanced/:tab",element:(0,a.jsx)(nk,{})}),(0,a.jsx)(L,{path:"apps/app/:applicationId",element:(0,a.jsx)(ik,{})}),(0,a.jsx)(L,{path:"apps/app/:applicationId/:tab",element:(0,a.jsx)(ik,{})}),(0,a.jsx)(L,{path:"apps/:connectionId",element:(0,a.jsx)(Ve,{to:"permissions",replace:!0})}),(0,a.jsx)(L,{path:"apps/:connectionId/:tab",element:(0,a.jsx)(FB,{})}),(0,a.jsx)(L,{path:"company/settings/instance",element:(0,a.jsx)(Ve,{to:"/company/settings",replace:!0})}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.profile"}),children:(0,a.jsx)(L,{path:"company/settings/instance/profile",element:(0,a.jsx)(nK,{})})}),(0,a.jsx)(L,{path:"company/settings/instance/general",element:(0,a.jsx)(Ve,{to:"/company/settings",replace:!0})}),(0,a.jsx)(L,{path:"company/settings/instance/heartbeats",element:(0,a.jsx)(Ve,{to:"/company/settings",replace:!0})}),(0,a.jsxs)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.environments"}),children:[(0,a.jsx)(L,{path:"company/settings/instance/environments",element:(0,a.jsx)(Bh,{})}),(0,a.jsx)(L,{path:"company/settings/instance/environments/new",element:(0,a.jsx)(Bh,{mode:"create"})}),(0,a.jsx)(L,{path:"company/settings/instance/environments/:environmentId/edit",element:(0,a.jsx)(Bh,{mode:"edit"})})]}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.access"}),children:(0,a.jsx)(L,{path:"company/settings/instance/access",element:(0,a.jsx)(tK,{})})}),(0,a.jsxs)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.experimental"}),children:[(0,a.jsx)(L,{path:"company/settings/instance/features",element:(0,a.jsx)(YB,{})}),(0,a.jsx)(L,{path:"company/settings/instance/advanced",element:(0,a.jsx)(eK,{})}),(0,a.jsx)(L,{path:"company/settings/instance/experimental",element:(0,a.jsx)(Ve,{to:"/company/settings/instance/features",replace:!0})})]}),(0,a.jsxs)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.plugins"}),children:[(0,a.jsx)(L,{path:"company/settings/instance/plugins",element:(0,a.jsx)(aK,{})}),(0,a.jsx)(L,{path:"company/settings/instance/plugins/:pluginId",element:(0,a.jsx)(sK,{})})]}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.adapters"}),children:(0,a.jsx)(L,{path:"company/settings/instance/adapters",element:(0,a.jsx)(ok,{})})}),(0,a.jsx)(L,{path:"company/settings/:settingsRoutePath/*",element:(0,a.jsx)(LB,{})}),(0,a.jsx)(L,{path:"skills/sources",element:(0,a.jsx)(lk,{})}),(0,a.jsx)(L,{path:"skills/sources/:sourceId",element:(0,a.jsx)(lk,{})}),(0,a.jsx)(L,{path:"skills/studio",element:(0,a.jsx)(Kh,{})}),(0,a.jsx)(L,{path:"skills/studio/new",element:(0,a.jsx)(Kh,{})}),(0,a.jsx)(L,{path:"skills/studio/:skillId",element:(0,a.jsx)(Kh,{})}),(0,a.jsx)(L,{path:"skills/:skillId/studio",element:(0,a.jsx)(OA,{})}),(0,a.jsx)(L,{path:"skills/*",element:(0,a.jsx)(VB,{})}),(0,a.jsx)(L,{path:"settings",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"settings/*",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"plugins/:pluginId",element:(0,a.jsx)(ck,{})}),(0,a.jsx)(L,{path:"org",element:(0,a.jsx)(Ve,{to:"/agents/all",replace:!0})}),(0,a.jsx)(L,{path:"agents",element:(0,a.jsx)(Ve,{to:"/agents/all",replace:!0})}),RA.map(s=>(0,a.jsx)(L,{path:`agents/${s}`,element:(0,a.jsx)(rB,{})},s)),(0,a.jsx)(L,{path:"agents/new",element:(0,a.jsx)(iK,{})}),(0,a.jsx)(L,{path:"agents/:agentId",element:(0,a.jsx)($h,{})}),(0,a.jsx)(L,{path:"agents/:agentId/:tab",element:(0,a.jsx)($h,{})}),(0,a.jsx)(L,{path:"agents/:agentId/runs/:runId",element:(0,a.jsx)($h,{})}),(0,a.jsx)(L,{path:"projects",element:(0,a.jsx)(lB,{})}),(0,a.jsx)(L,{path:"projects/:projectId",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/overview",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/issues",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/issues/:filter",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{element:(0,a.jsx)(Th,{}),children:(0,a.jsx)(L,{path:"projects/:projectId/workspaces/:workspaceId",element:(0,a.jsx)(oB,{})})}),(0,a.jsx)(L,{path:"projects/:projectId/workspaces",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/configuration",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/budget",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{element:(0,a.jsx)(Th,{}),children:(0,a.jsx)(L,{path:"workspaces",element:(0,a.jsx)(cB,{})})}),(0,a.jsx)(L,{path:"terminal",element:(0,a.jsx)(gK,{children:(0,a.jsx)(hK,{})})}),(0,a.jsx)(L,{path:"issues",element:(0,a.jsx)(uB,{})}),(0,a.jsx)(L,{path:"tasks",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"tasks/new",element:(0,a.jsx)(Q6,{})}),(0,a.jsx)(L,{path:"search",element:(0,a.jsx)(dB,{})}),t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"issues/all",element:(0,a.jsx)(bs,{view:"all"})}),(0,a.jsx)(L,{path:"issues/active",element:(0,a.jsx)(bs,{view:"active"})}),(0,a.jsx)(L,{path:"issues/backlog",element:(0,a.jsx)(bs,{view:"backlog"})}),(0,a.jsx)(L,{path:"issues/done",element:(0,a.jsx)(bs,{view:"done"})}),(0,a.jsx)(L,{path:"issues/recent",element:(0,a.jsx)(bs,{view:"recent"})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"issues/all",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/active",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/backlog",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/done",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/recent",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})})]}),(0,a.jsx)(L,{path:"chats",element:(0,a.jsx)(pB,{})}),(0,a.jsx)(L,{path:"chats/:agentRef",element:(0,a.jsx)(mB,{})}),(0,a.jsx)(L,{path:"issues/:issueId",element:(0,a.jsx)(fB,{})}),null,(0,a.jsx)(L,{path:"routines",element:(0,a.jsx)(gB,{})}),(0,a.jsx)(L,{path:"cases",element:(0,a.jsx)(Hw,{children:(0,a.jsx)(nB,{})})}),(0,a.jsx)(L,{path:"cases/:caseIdentifier",element:(0,a.jsx)(Hw,{children:(0,a.jsx)(aB,{})})}),(0,a.jsx)(L,{path:"pixels-office",element:(0,a.jsx)(l6,{children:(0,a.jsx)(wB,{})})}),(0,a.jsx)(L,{path:"status",element:(0,a.jsx)(Vw,{children:(0,a.jsx)(Zw,{})})}),(0,a.jsx)(L,{path:"status/:cardId",element:(0,a.jsx)(Vw,{children:(0,a.jsx)(Zw,{})})}),(0,a.jsx)(L,{path:"status-cards",element:(0,a.jsx)(gk,{})}),(0,a.jsx)(L,{path:"status-cards/:cardId",element:(0,a.jsx)(gk,{})}),(0,a.jsx)(L,{path:"review-queue",element:(0,a.jsx)(ar,{children:(0,a.jsx)(yB,{})})}),(0,a.jsx)(L,{path:"learnings",element:(0,a.jsx)(ar,{children:(0,a.jsx)(xB,{})})}),(0,a.jsx)(L,{path:"pipelines",element:(0,a.jsx)(ar,{children:(0,a.jsx)(Uh,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId",element:(0,a.jsx)(ar,{children:(0,a.jsx)(Uh,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/add",element:(0,a.jsx)(ar,{children:(0,a.jsx)(Uh,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/settings",element:(0,a.jsx)(ar,{children:(0,a.jsx)(jB,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/items/:caseId",element:(0,a.jsx)(ar,{children:(0,a.jsx)(bB,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/cases/:caseId",element:(0,a.jsx)(ar,{children:(0,a.jsx)(vB,{})})}),(0,a.jsx)(L,{path:"routines/:routineId",element:(0,a.jsx)(Jw,{})}),(0,a.jsx)(L,{path:"routines/:routineId/:section",element:(0,a.jsx)(Jw,{})}),(0,a.jsx)(L,{element:(0,a.jsx)(Th,{}),children:(0,a.jsxs)(L,{element:(0,a.jsx)(o6,{}),children:[(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/services",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/configuration",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/runtime-logs",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/issues",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/routines",element:(0,a.jsx)(Ql,{})})]})}),(0,a.jsx)(L,{path:"goals",element:(0,a.jsx)(SB,{})}),(0,a.jsx)(L,{path:"goals/:goalId",element:(0,a.jsx)(NB,{})}),(0,a.jsx)(L,{path:"artifacts",element:(0,a.jsx)(ek,{})}),(0,a.jsx)(L,{path:"approvals",element:(0,a.jsx)(Ve,{to:"/approvals/pending",replace:!0})}),(0,a.jsx)(L,{path:"approvals/pending",element:(0,a.jsx)(tk,{})}),(0,a.jsx)(L,{path:"approvals/all",element:(0,a.jsx)(tk,{})}),(0,a.jsx)(L,{path:"approvals/:approvalId",element:(0,a.jsx)(CB,{})}),(0,a.jsx)(L,{path:"activity",element:(0,a.jsx)(AB,{})}),(0,a.jsx)(L,{path:"activity/runs",element:(0,a.jsx)(Ad,{section:"runs"})}),(0,a.jsx)(L,{path:"activity/costs",element:(0,a.jsx)(Ad,{section:"costs"})}),(0,a.jsx)(L,{path:"activity/budgets",element:(0,a.jsx)(Ad,{section:"budgets"})}),(0,a.jsx)(L,{path:"activity/timeline",element:(0,a.jsx)(Ad,{section:"timeline"})}),(0,a.jsx)(L,{path:"audit",element:(0,a.jsx)(Ys,{to:"/activity",forceAgentMode:!0})}),(0,a.jsx)(L,{path:"audit/activity",element:(0,a.jsx)(Ys,{to:"/activity"})}),(0,a.jsx)(L,{path:"audit/runs",element:(0,a.jsx)(Ys,{to:"/activity/runs"})}),(0,a.jsx)(L,{path:"audit/costs",element:(0,a.jsx)(Ys,{to:"/activity/costs"})}),(0,a.jsx)(L,{path:"audit/budgets",element:(0,a.jsx)(Ys,{to:"/activity/budgets"})}),(0,a.jsx)(L,{path:"audit/timeline",element:(0,a.jsx)(Ys,{to:"/activity/timeline"})}),(0,a.jsx)(L,{path:"runs",element:(0,a.jsx)(Ys,{to:"/activity/runs"})}),(0,a.jsx)(L,{path:"costs",element:(0,a.jsx)(Ys,{to:"/activity/costs"})}),(0,a.jsx)(L,{path:"budgets",element:(0,a.jsx)(Ys,{to:"/activity/budgets"})}),(0,a.jsxs)(L,{element:(0,a.jsx)(r6,{}),children:[(0,a.jsx)(L,{path:"board-chat",element:(0,a.jsx)(IB,{})}),(0,a.jsx)(L,{path:"artifacts",element:(0,a.jsx)(ek,{})})]}),null,(0,a.jsx)(L,{path:"decisions",element:(0,a.jsx)(_B,{})}),(0,a.jsx)(L,{path:"decisions/queues/:key",element:(0,a.jsx)(EB,{})}),t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"inbox",element:(0,a.jsx)(pk,{})}),(0,a.jsx)(L,{path:"inbox/mine",element:(0,a.jsx)(bs,{view:"mine"})}),(0,a.jsx)(L,{path:"inbox/recent",element:(0,a.jsx)(bs,{view:"recent"})}),(0,a.jsx)(L,{path:"inbox/unread",element:(0,a.jsx)(bs,{view:"unread"})}),(0,a.jsx)(L,{path:"inbox/blocked",element:(0,a.jsx)(bs,{view:"blocked"})}),(0,a.jsx)(L,{path:"inbox/all",element:(0,a.jsx)(bs,{view:"everything"})}),(0,a.jsx)(L,{path:"inbox/new",element:(0,a.jsx)(bs,{view:"mine"})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"inbox",element:(0,a.jsx)(pk,{})}),(0,a.jsx)(L,{path:"inbox/mine",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/recent",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/unread",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/blocked",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/all",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/new",element:(0,a.jsx)(Ve,{to:"/inbox/mine",replace:!0})})]}),(0,a.jsx)(L,{path:"inbox/requests",element:(0,a.jsx)(pK,{})}),(0,a.jsx)(L,{path:"u/:userSlug",element:(0,a.jsx)(kB,{})}),(0,a.jsx)(L,{path:"design-guide",element:(0,a.jsx)(GB,{})}),(0,a.jsx)(L,{path:"instance/settings/adapters",element:(0,a.jsx)(ok,{})}),(0,a.jsx)(L,{path:":pluginRoutePath/*",element:(0,a.jsx)(ck,{})}),(0,a.jsx)(L,{path:"*",element:(0,a.jsx)(DA,{scope:"board"})})]})}r(xK,"boardRoutes");function fk({credentialSource:e="wardmote_vault"}={}){const t=hn(),s=new URLSearchParams(t.search),{enabled:l,githubEnabled:c}=S0();return HT(s,{chatConnectorsEnabled:l,githubReviewBotsEnabled:c})?(0,a.jsx)(MA,{credentialSource:e}):(0,a.jsx)(Ve,{to:"/apps",replace:!0})}r(fk,"AppsConnectEntryRoute");function pk(){const{enabled:e}=Jf();return e?(0,a.jsx)(bs,{view:bI(Dj())}):(0,a.jsx)(Ve,{to:`/inbox/${Dj()}`,replace:!0})}r(pk,"InboxRootRedirect");function bs({view:e}){const t=hn(),s=new URLSearchParams(t.search);return s.set(fI,e),(0,a.jsx)(Ve,{to:`/issues?${s.toString()}${t.hash}`,replace:!0})}r(bs,"TaskViewRedirect");function OA(){const e=hn(),{companies:t,selectedCompany:s,loading:l}=bt(),{companyPrefix:c,skillId:u}=Ps();if(l)return null;const p=(c?t.find(f=>f.issuePrefix.toUpperCase()===c.toUpperCase()):null)??s??t[0]??null;return!p||!u?(0,a.jsx)(Ve,{to:"/skills/studio",replace:!0}):(0,a.jsx)(Ve,{to:`/${p.issuePrefix}/skills/studio/${encodeURIComponent(u)}${e.search}${e.hash}`,replace:!0})}r(OA,"LegacySkillStudioRedirect");function qr(){const e=hn(),{companies:t,selectedCompany:s,loading:l}=bt(),{companyPrefix:c}=Ps(),{hidden:u}=gr();if(l)return(0,a.jsx)(Ds,{});const p=(c?t.find(h=>h.issuePrefix.toUpperCase()===c.toUpperCase()):null)??s??t[0]??null;if(!p)return gx({pathname:e.pathname,hasCompanies:!1})?(0,a.jsx)(Ve,{to:"/onboarding",replace:!0}):(0,a.jsx)(vx,{});const f=oT(cT(`${e.pathname}${e.search}${e.hash}`),u);return(0,a.jsx)(Ve,{to:`/${p.issuePrefix}${f}`,replace:!0})}r(qr,"LegacySettingsRedirect");function mk(){const{tab:e}=Ps();return(0,a.jsx)(Ve,{to:LA(e),replace:!0})}r(mk,"LegacyToolsSettingsRedirect");function hk(){const{tab:e}=Ps();return(0,a.jsx)(Ve,{to:LA(e),replace:!0})}r(hk,"LegacyToolsRedirect");function LA(e){return e?e==="applications"||e==="connections"||e==="overview"||e==="examples"||e==="runtime"||e==="audit"?"/apps":e==="policies"?"/apps/advanced/profiles":`/apps/advanced/${e}`:"/apps/advanced/profiles"}r(LA,"legacyToolsRedirectTarget");function zA(){const{companies:e}=bt(),{openOnboarding:t}=Us(),{t:s}=TN(),{onboardingOpen:l,onboardingRouteDismissed:c}=Ff(),{companyPrefix:u}=Ps(),p=u?e.find(g=>g.issuePrefix.toUpperCase()===u.toUpperCase())??null:null;if(cU({onboardingOpen:l,routeDismissed:c}))return null;const f=p?`Add another agent to ${p.name}`:e.length>0?"Create another organization":"Create your first organization",h=p?"Run onboarding again to add an agent and a starter task for this organization.":e.length>0?"Run onboarding again to create another organization and seed its first agent.":"Get started by creating an organization and your first agent.";return(0,a.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,a.jsxs)("div",{className:"rounded-lg border border-line bg-bg-2 p-6",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:f}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:h}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(oe,{onClick:r(()=>p?t({initialStep:xA(),companyId:p.id}):t(),"onClick"),children:p?"Add Agent":"Start Onboarding"})})]})})}r(zA,"OnboardingRoutePage");function bK(){const{companies:e,selectedCompany:t,loading:s}=bt(),l=hn();if(s)return(0,a.jsx)(Ds,{});const c=t??e[0]??null;return c?(0,a.jsx)(Ve,{to:`/${c.issuePrefix}/dashboard`,replace:!0}):gx({pathname:l.pathname,hasCompanies:!1})?(0,a.jsx)(Ve,{to:"/onboarding",replace:!0}):(0,a.jsx)(vx,{})}r(bK,"CompanyRootRedirect");function gk(){const{cardId:e}=Ps(),t=xI(),s=t?`/${t}`:"";return(0,a.jsx)(Ve,{to:`${s}/status${e?`/${e}`:""}`,replace:!0})}r(gk,"StatusCardsLegacyRedirect");function Ys({to:e,forceAgentMode:t=!1}){const s=hn(),l=new URLSearchParams(s.search);t&&l.set("mode","agents");const c=l.toString();return(0,a.jsx)(Ve,{to:`${e}${c?`?${c}`:""}${s.hash}`,replace:!0})}r(Ys,"AuditCompatibilityRedirect");function Xe(){const e=hn(),{companies:t,selectedCompany:s,loading:l}=bt();if(l)return(0,a.jsx)(Ds,{});const c=s??t[0]??null;return c?(0,a.jsx)(Ve,{to:`/${c.issuePrefix}${e.pathname}${e.search}${e.hash}`,replace:!0}):gx({pathname:e.pathname,hasCompanies:!1})?(0,a.jsx)(Ve,{to:"/onboarding",replace:!0}):(0,a.jsx)(vx,{})}r(Xe,"UnprefixedBoardRedirect");function vx(){const{openOnboarding:e}=Us(),{t}=TN();return(0,a.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,a.jsxs)("div",{className:"rounded-lg border border-line bg-bg-2 p-6",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:t("app.noCompanies.title",{defaultValue:"Create your first organization"})}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:t("app.noCompanies.description",{defaultValue:"Get started by creating an organization."})}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(oe,{onClick:r(()=>e(),"onClick"),children:t("app.noCompanies.newCompany",{defaultValue:"New Organization"})})})]})})}r(vx,"NoCompaniesStartPage");function vK(){const{enabled:e}=Jf();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ds,{}),children:(0,a.jsxs)(zE,{children:[(0,a.jsx)(L,{path:"auth",element:(0,a.jsx)(rK,{})}),(0,a.jsx)(L,{path:"board-claim/:token",element:(0,a.jsx)(lK,{})}),(0,a.jsx)(L,{path:"mcp-connect/:id",element:(0,a.jsx)(uk,{})}),(0,a.jsx)(L,{path:"dot-connect/:id",element:(0,a.jsx)(uk,{agentPairingOnly:!0})}),(0,a.jsx)(L,{path:"mcp-device",element:(0,a.jsx)(cK,{})}),(0,a.jsx)(L,{path:"assistant-connections",element:(0,a.jsx)(uK,{})}),(0,a.jsx)(L,{path:"cli-auth/:id",element:(0,a.jsx)(dK,{})}),(0,a.jsx)(L,{path:"invite/:token",element:(0,a.jsx)(fK,{})}),(0,a.jsx)(L,{path:"s/:token",element:(0,a.jsx)(dk,{})}),(0,a.jsx)(L,{path:"s/:token/issues/:issueId",element:(0,a.jsx)(dk,{})}),(0,a.jsx)(L,{element:(0,a.jsx)(Xw,{allowMembershipRequest:!0}),children:(0,a.jsx)(L,{path:"chat-identity/confirm",element:(0,a.jsx)(KB,{})})}),(0,a.jsx)(L,{path:"tests/perf/long-thread",element:(0,a.jsx)(hB,{})}),(0,a.jsx)(L,{path:"ux-lab/bootstrap-setup",element:(0,a.jsx)(MB,{})}),(0,a.jsx)(L,{path:"ux-lab/responsible-user-denial",element:(0,a.jsx)(DB,{})}),(0,a.jsx)(L,{path:"ux-lab/cross-issue-collaboration",element:(0,a.jsx)(OB,{})}),(0,a.jsxs)(L,{element:(0,a.jsx)(Xw,{}),children:[(0,a.jsx)(L,{index:!0,element:(0,a.jsx)(bK,{})}),(0,a.jsx)(L,{path:"onboarding",element:(0,a.jsx)(zA,{})}),(0,a.jsx)(L,{path:"instance",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"instance/settings",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"instance/settings/*",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"companies",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"dashboard",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"inbox/*",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"issues",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"tasks",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"tasks/new",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"issues/:issueId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"routines",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"routines/:routineId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"review-queue",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"learnings",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"cases",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"cases/:caseIdentifier",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pixels-office",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"status",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"status/:cardId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"status-cards",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"status-cards/:cardId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/add",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/settings",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/items/:caseId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/cases/:caseId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"artifacts",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"audit",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"audit/*",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"activity",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"activity/*",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"runs",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"costs",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"budgets",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"decisions",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"u/:userSlug",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"skills/studio",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"skills/studio/new",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"skills/studio/:skillId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"skills/:skillId/studio",element:(0,a.jsx)(OA,{})}),(0,a.jsx)(L,{path:"skills/*",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"settings",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"settings/*",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"agents",element:(0,a.jsx)(Xe,{})}),RA.map(t=>(0,a.jsx)(L,{path:`agents/${t}`,element:(0,a.jsx)(Xe,{})},t)),(0,a.jsx)(L,{path:"agents/new",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"agents/:agentId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"agents/:agentId/:tab",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"agents/:agentId/runs/:runId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/overview",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/issues",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/issues/:filter",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/workspaces",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/workspaces/:workspaceId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/configuration",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"workspaces",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"terminal",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/services",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/configuration",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/runtime-logs",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/issues",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/routines",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:":companyPrefix",element:(0,a.jsx)(a6,{}),children:xK(e)}),(0,a.jsx)(L,{path:"*",element:(0,a.jsx)(DA,{scope:"global"})})]})]})}),(0,a.jsx)(V6,{}),(0,a.jsx)(v8,{})]})}r(vK,"App");var yK=class extends x.Component{static{r(this,"AppErrorBoundary")}state={error:null};static getDerivedStateFromError(e){return{error:e instanceof Error?e:new Error(String(e))}}componentDidCatch(e,t){kA(e,{boundary:"app",componentStack:t.componentStack})}render(){const{error:e}=this.state;return e?(0,a.jsxs)("div",{className:"mx-auto flex min-h-screen max-w-2xl flex-col justify-center space-y-4 px-4 py-10",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-lg font-semibold",children:"Wardmote hit an error"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"Something went wrong while running the app. Reloading usually fixes this."})]}),(0,a.jsx)("pre",{className:"overflow-auto rounded-md border border-bad/30 bg-bad/10 px-3 py-2 text-xs text-bad whitespace-pre-wrap",children:e.message}),(0,a.jsx)("div",{children:(0,a.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md border border-line-strong bg-bg px-3 py-1.5 text-sm font-medium shadow-sm hover:bg-bg-3 hover:text-ink",onClick:r(()=>window.location.reload(),"onClick"),children:"Reload page"})})]}):this.props.children}};function jK(){const{data:e}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),t=e?.sentryDsn,s=e?.sentryEnvironment??void 0;return(0,x.useEffect)(()=>{if(t)return VU(t,s),()=>{WU()}},[t,s]),null}r(jK,"SentryGate");function wK(){let e;return{promise:new Promise(t=>{e=t}),resolve:e}}r(wK,"createDeferred");function kK(e,t=300){const s=new Map;let l=null,c=null;const u=r(async()=>{l!==null&&(clearTimeout(l),l=null);const h=c;if(c=null,s.size===0){h?.resolve();return}const g=[...s.values()];s.clear();try{await Promise.all(g.map(v=>e.invalidateQueries(Kc().visible?v:{...v,refetchType:"none"})))}finally{h?.resolve()}},"flush");return{schedule:r(h=>(s.set(SK(h),h),c===null&&(c=wK()),l===null&&(l=setTimeout(()=>{u()},t)),c.promise),"schedule"),flush:u,dispose:r(()=>{l!==null&&(clearTimeout(l),l=null),s.clear(),c?.resolve(),c=null},"dispose")}}r(kK,"createInvalidationBatcher");var xk=0;function SK(e){if(typeof e.predicate=="function")return`__predicate__:${xk+=1}`;try{return JSON.stringify([e.queryKey??null,e.refetchType??null,e.exact??null,e.type??null])}catch{return`__nonserializable__:${xk+=1}`}}r(SK,"serializeFilters");function NK(e,t){return new Proxy(e,{get(s,l){if(l==="invalidateQueries")return u=>t.schedule(u??{});const c=Reflect.get(s,l,s);return typeof c=="function"?c.bind(s):c}})}r(NK,"createCoalescingQueryClient");function CK(e,t){if(!e)return e;const s=e.filter(l=>l.id!==t);return s.length===e.length?e:s}r(CK,"removeRunFromList");function AK(e,t,s){if(!e)return{next:e,present:!1};let l=!1,c=!1;const u=e.map(p=>p.id!==t||(l=!0,p.status===s)?p:(c=!0,{...p,status:s}));return{next:c?u:e,present:l}}r(AK,"patchRunStatusInList");function _K(e,t){if(!e)return e;const s=e.filter(l=>l.id!==t);return s.length===e.length?e:s}r(_K,"removeLiveRunById");function EK(e,t){return!e||e.executionRunId!==t?e:{...e,executionRunId:null,executionAgentNameKey:null,executionLockedAt:null}}r(EK,"clearIssueExecutionRun");var IK=3e4,TK=["status","priority","title","assigneeAgentId","assigneeUserId","projectId","parentId"],RK=new Set(["issue.read_marked","issue.read_unmarked","issue.inbox_archived","issue.inbox_unarchived"]);function Xg(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}r(Xg,"isRecord");function yx(e){return Xg(e)&&Array.isArray(e.pages)}r(yx,"isInfiniteIssueData");function MK(e){return Array.isArray(e)?e.length:yx(e)?e.pages.reduce((t,s)=>t+(Array.isArray(s)?s.length:0),0):0}r(MK,"issueListRowCount");function DK(e){const t=e.state.data;return yx(t)||MK(t)>=100}r(DK,"isLargeIssueListQuery");function OK(e,t,s){const l={},c=Xg(t?.changes)?t.changes:null;if(e==="issue.updated"&&c)for(const u of TK){const p=c[u];!Xg(p)||p.updated===!0||!("to"in p)||(l[u]=p.to)}return s&&e&&!RK.has(e)&&!Number.isNaN(Date.parse(s))&&(l.lastActivityAt=s),l}r(OK,"readIssueListPatchFromActivity");function LK(e,t){let s=null;for(const[l,c]of Object.entries(t)){if(l==="lastActivityAt"){const u=e.lastActivityAt?new Date(e.lastActivityAt).getTime():0;if(new Date(c).getTime()<=u)continue}else if(!(l in e)||e[l]===c)continue;s??={...e},s[l]=c}return s??e}r(LK,"patchIssueRow");function bk(e,t,s){const l=e.findIndex(p=>p?.id===t);if(l<0)return e;const c=LK(e[l],s);if(c===e[l])return e;const u=e.slice();return u[l]=c,u}r(bk,"patchIssueRows");function zK(e,t,s){if(Array.isArray(e))return bk(e,t,s);if(!yx(e))return e;let l=!1;const c=e.pages.map(u=>{if(!Array.isArray(u))return u;const p=bk(u,t,s);return p!==u&&(l=!0),p});return l?{...e,pages:c}:e}r(zK,"patchIssueListData");function PK(e,t,s,l){if(Object.keys(l).length===0)return 0;let c=0;for(const[u,p]of e.getQueriesData({queryKey:$.issues.list(t)})){const f=zK(p,s,l);f!==p&&(e.setQueryData(u,f),c+=1)}return c}r(PK,"patchIssueInListCaches");function $K(e,t){for(const s of e.getQueryCache().findAll({queryKey:$.issues.list(t)}))e.invalidateQueries({queryKey:s.queryKey,exact:!0,...DK(s)?{refetchType:"none"}:{}})}r($K,"invalidateIssueListsForActivity");function UK(e,t){const s=r(l=>l.state.isInvalidated,"predicate");return Promise.all([e.refetchQueries({queryKey:$.issues.list(t),type:"active",predicate:s}),e.refetchQueries({queryKey:$.heartbeats(t),type:"active",predicate:s})])}r(UK,"refreshInvalidatedLiveLists");function ao(e){return typeof e=="string"&&e.length>0?e:null}r(ao,"readString$1");function BK(e){return e.length===3&&e[0]==="issues"&&e[2]==="agent-todo"}r(BK,"isAgentTodoQueryKey");function KK(e){if(e.type!=="heartbeat.run.event")return null;const t=e.payload??{};if(t.eventType!=="agent.todo")return null;const s=ao(t.runId),l=ao(t.agentId),c=ao(t.issueId),u=t.seq;if(!s||!l||!c||typeof u!="number"||!Number.isInteger(u))return null;const p=jE(t.payload);return p?{...p,runId:s,agentId:l,issueId:c,seq:u,createdAt:ao(t.lastEventAt)??e.createdAt,runStatus:"running"}:null}r(KK,"readAgentTodoSnapshotFromLiveEvent");function vk(e,t){if(t.type==="heartbeat.run.status"){const l=t.payload??{},c=ao(l.runId),u=ao(l.status);if(!c||!u)return;e.setQueriesData({predicate:r(p=>BK(p.queryKey),"predicate")},p=>p&&p.runId===c&&p.runStatus!==u?{...p,runStatus:u}:p);return}const s=KK(t);s&&e.setQueryData($.issues.agentTodo(s.issueId),l=>l&&l.runId===s.runId&&l.seq>=s.seq?l:s)}r(vk,"applyAgentTodoLiveEvent");function qK(e){const t=e.trim().toLowerCase();return t==="0.0.0.0"||t==="::"||t==="[::]"}r(qK,"isWildcardHost");function FK(e=window.location){return qK(e.hostname)?e.port?`localhost:${e.port}`:"localhost":e.host}r(FK,"browserReachableHost");function HK(e,t=window.location){const s=t.protocol==="https:"?"wss":"ws",l=e.startsWith("/")?e:`/${e}`;return`${s}://${FK(t)}${l}`}r(HK,"buildSameOriginWebSocketUrl");function VK(e){try{return new WebSocket(e)}catch{return null}}r(VK,"tryCreateWebSocket");var WK="/pwa-192x192.png",QK="/pwa-monochrome-512x512.png";function jx(){return typeof window<"u"&&"Notification"in window}r(jx,"notificationsSupported");function wx(){return jx()?Notification.permission:"unsupported"}r(wx,"notificationPermission");async function GK(){return jx()?Notification.permission!=="default"?Notification.permission:Notification.requestPermission():"unsupported"}r(GK,"requestNotificationPermission");function YK(){return typeof navigator<"u"&&"serviceWorker"in navigator&&typeof window<"u"&&"PushManager"in window}r(YK,"pushSupported");function IY(e=typeof navigator>"u"?void 0:navigator){return e?(/iPad|iPhone|iPod/.test(e.userAgent)||e.platform==="MacIntel"&&(e.maxTouchPoints??0)>1)&&e.standalone!==!0:!1}r(IY,"isIosWithoutHomeScreenInstall");async function PA(){if(typeof navigator>"u"||!("serviceWorker"in navigator))return null;try{return await navigator.serviceWorker.getRegistration()??null}catch{return null}}r(PA,"getServiceWorkerRegistration");var $A="wardmote.notifications.seen.v1",XK="wardmote.notifications.claim",ZK=6e5,JK=200,eq=new Map;function tq(){let e=null;try{e=typeof localStorage>"u"?null:localStorage}catch{e=null}const t=typeof navigator<"u"&&navigator.locks?{request:r((s,l)=>navigator.locks.request(s,l),"request")}:null;return{storage:e,locks:t,now:r(()=>Date.now(),"now"),memory:eq}}r(tq,"defaultEnv");function nq(e){const t=e.storage?.getItem($A);if(!t)return new Map(e.memory);try{const s=JSON.parse(t),l=new Map(e.memory);for(const[c,u]of Object.entries(s))typeof u=="number"&&l.set(c,u);return l}catch{return new Map(e.memory)}}r(nq,"readSeen");function qh(e,t){const s=t.now(),l=nq(t);for(const[u,p]of l)s-p>ZK&&l.delete(u);if(l.has(e))return!1;l.set(e,s);const c=[...l.entries()].sort((u,p)=>p[1]-u[1]).slice(0,JK);t.memory.clear();for(const[u,p]of c)t.memory.set(u,p);return aq(t,c),!0}r(qh,"claimInsideLock");function aq(e,t){try{e.storage?.setItem($A,JSON.stringify(Object.fromEntries(t)))}catch{return}}r(aq,"writeSeen");async function sq(e,t=tq()){if(!t.locks)return qh(e,t);try{return await t.locks.request(XK,()=>qh(e,t))}catch{return qh(e,t)}}r(sq,"claimNotificationKey");var iq="wardmote-notifications",vf="custom-sounds";function rq(e){return e.type.startsWith("audio/")?e.size<=0?{ok:!1,error:"The audio file is empty."}:e.size>524288?{ok:!1,error:"Custom sounds must be 512 KB or smaller."}:{ok:!0}:{ok:!1,error:"Choose an audio file."}}r(rq,"validateCustomSoundFile");function UA(e){return new Promise((t,s)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>s(e.error)})}r(UA,"requestResult");var _d=null;function lq(){if(typeof indexedDB>"u")return Promise.reject(new Error("IndexedDB is unavailable."));if(!_d){const e=indexedDB.open(iq,1);e.onupgradeneeded=()=>{e.result.objectStoreNames.contains(vf)||e.result.createObjectStore(vf,{keyPath:"kind"})},_d=UA(e).catch(t=>{throw _d=null,t})}return _d}r(lq,"openDb");async function kx(e,t){return UA(t((await lq()).transaction(vf,e).objectStore(vf)))}r(kx,"withStore");var Zg=new Set;function oq(e){return Zg.add(e),()=>Zg.delete(e)}r(oq,"subscribeCustomSounds");function BA(){for(const e of Zg)e()}r(BA,"notifyCustomSoundsChanged");async function TY(e,t){const s=rq(t);if(!s.ok)throw new Error(s.error);const l={kind:e,name:t.name,type:t.type,size:t.size,blob:t,updatedAt:new Date().toISOString()};return await kx("readwrite",c=>c.put(l)),BA(),l}r(TY,"saveCustomSound");async function cq(e){try{return await kx("readonly",t=>t.get(e))??null}catch{return null}}r(cq,"loadCustomSound");async function RY(e){await kx("readwrite",t=>t.delete(e)),BA()}r(RY,"removeCustomSound");var uq=[{id:"confirmation",label:"Confirmation"},{id:"question",label:"Question"},{id:"glass",label:"Glass"},{id:"bong",label:"Bong"},{id:"maximize",label:"Rise"},{id:"pluck",label:"Pluck"},{id:"error",label:"Alert"},{id:"drop",label:"Drop"},{id:"select",label:"Select"},{id:"open",label:"Open"}],MY="custom",DY="none",Jg={approval:"confirmation",question:"question",comment:"pluck",assignment:"maximize",review:"glass",run_failed:"error",join_request:"bong",disk_space:"drop"},OY={approval:"Approvals",question:"Agent questions",comment:"Comments",assignment:"Assignments",review:"Ready for review",run_failed:"Failed runs",join_request:"Join requests",disk_space:"Low disk space"},KA=new Set(uq.map(e=>e.id));function dq(e){return typeof e=="string"&&(KA.has(e)||e==="custom"||e==="none")}r(dq,"isKnownSoundId");function fq(e){return KA.has(e)}r(fq,"isLibrarySoundId");function yk(e,t){return`/sounds/${e}.${t}`}r(yk,"librarySoundUrl");var e0=new Map,yf=new Map,jk=!1,Ed=null;function qA(){return typeof Audio<"u"}r(qA,"audioSupported");function wk(){return Ed||(Ed=new Audio().canPlayType('audio/ogg; codecs="vorbis"')?"ogg":"mp3",Ed)}r(wk,"libraryFormat");function FA(e){let t=e0.get(e);return t||(t=new Audio,t.preload="auto",t.src=e,e0.set(e,t)),t}r(FA,"audioFor");function pq(){for(const e of yf.values())e.then(t=>{t&&(e0.delete(t),URL.revokeObjectURL(t))});yf.clear()}r(pq,"revokeCustomSounds");function mq(e){jk||(jk=!0,oq(pq));let t=yf.get(e);return t||(t=cq(e).then(s=>s?URL.createObjectURL(s.blob):null),yf.set(e,t)),t}r(mq,"customSoundUrl");async function HA(e,t){if(t==="none")return null;if(t==="custom"){const s=await mq(e);return s||yk(Jg[e],wk())}return yk(fq(t)?t:Jg[e],wk())}r(HA,"resolveSoundUrl");async function hq(e,t,s){if(!qA())return!1;const l=await HA(e,t);if(!l)return!1;const c=FA(l);c.volume=Math.min(1,Math.max(0,s)),c.currentTime=0;try{return await c.play(),!0}catch{return!1}}r(hq,"playSound");function gq(e,t){return hq(e,t.kinds[e].soundId,t.volume)}r(gq,"playKindSound");function kk(e){if(!(!qA()||!e.enabled))for(const[t,s]of Object.entries(e.kinds))s.enabled&&HA(t,s.soundId).then(l=>{l&&FA(l)})}r(kk,"preloadNotificationSounds");var t0={getWebPushConfig:r(()=>je.get("/notifications/web-push/config"),"getWebPushConfig"),upsertWebPushSubscription:r(e=>je.put("/notifications/web-push/subscription",e),"upsertWebPushSubscription"),deleteWebPushSubscription:r(e=>je.deleteWithBody("/notifications/web-push/subscription",e),"deleteWebPushSubscription"),sendWebPushTest:r(()=>je.post("/notifications/web-push/test",{}),"sendWebPushTest")},VA="wardmote.notifications.v1",xq=.6;function n0(){const e={};for(const t of b0)e[t]={enabled:!0,soundId:Jg[t]};return{enabled:!0,volume:xq,pushEnabled:!0,kinds:e}}r(n0,"defaultNotificationSettings");function Fh(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}r(Fh,"asRecord");function WA(e){const t=n0(),s=Fh(e);if(!s)return t;const l=typeof s.volume=="number"&&Number.isFinite(s.volume)?Math.min(1,Math.max(0,s.volume)):t.volume,c=Fh(s.kinds)??{},u={...t.kinds};for(const p of b0){const f=Fh(c[p]);f&&(u[p]={enabled:typeof f.enabled=="boolean"?f.enabled:t.kinds[p].enabled,soundId:dq(f.soundId)?f.soundId:t.kinds[p].soundId})}return{enabled:typeof s.enabled=="boolean"?s.enabled:t.enabled,volume:l,pushEnabled:typeof s.pushEnabled=="boolean"?s.pushEnabled:t.pushEnabled,kinds:u}}r(WA,"normalizeNotificationSettings");function jf(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}r(jf,"storage");function bq(){const e=jf()?.getItem(VA);if(!e)return n0();try{return WA(JSON.parse(e))}catch{return n0()}}r(bq,"readStored");var wf,mc=null,Bd=new Set,Id=!1;function Zr(){const e=jf()?.getItem("wardmote.notifications.v1")??null;return mc&&e===wf||(wf=e,mc=bq()),mc}r(Zr,"getNotificationSettings");function QA(){for(const e of Bd)e()}r(QA,"notify");function GA(e){const t=WA(typeof e=="function"?e(Zr()):e);try{jf()?.setItem(VA,JSON.stringify(t))}catch{wf=void 0}return mc=t,wf=jf()?.getItem("wardmote.notifications.v1")??null,QA(),t}r(GA,"setNotificationSettings");function LY(e,t){return GA(s=>({...s,kinds:{...s.kinds,[e]:{...s.kinds[e],...t}}}))}r(LY,"updateKindSettings");function vq(e){return e.enabled?b0.filter(t=>e.kinds[t].enabled):[]}r(vq,"enabledNotificationKinds");function Sk(e){e.key!==null&&e.key!=="wardmote.notifications.v1"||QA()}r(Sk,"onStorage");function YA(e){return Bd.add(e),!Id&&typeof window<"u"&&(Id=!0,window.addEventListener("storage",Sk)),()=>{Bd.delete(e),Bd.size===0&&Id&&typeof window<"u"&&(Id=!1,window.removeEventListener("storage",Sk))}}r(YA,"subscribeNotificationSettings");function zY(){return(0,x.useSyncExternalStore)(YA,Zr,Zr)}r(zY,"useNotificationSettings");var kc={status:"unknown",error:null},a0=new Set,s0=null,Nk=Promise.resolve();function Ck(e){if(!(e.status===kc.status&&e.error===kc.error)){kc=e;for(const t of a0)t()}}r(Ck,"setPushState");function Ak(){return kc}r(Ak,"getPushState");function yq(){return kc.status==="active"}r(yq,"hasActivePushSubscription");function jq(e){return a0.add(e),()=>a0.delete(e)}r(jq,"subscribePushState");function PY(){return(0,x.useSyncExternalStore)(jq,Ak,Ak)}r(PY,"usePushState");function XA(e){const t=e.padEnd(e.length+(4-e.length%4)%4,"=").replace(/-/g,"+").replace(/_/g,"/"),s=atob(t),l=new Uint8Array(new ArrayBuffer(s.length));for(let c=0;c<s.length;c+=1)l[c]=s.charCodeAt(c);return l}r(XA,"urlBase64ToUint8Array");function wq(e,t){const s=e.options?.applicationServerKey;if(!s)return!0;const l=XA(t),c=new Uint8Array(s);return c.length===l.length&&c.every((u,p)=>u===l[p])}r(wq,"sameApplicationServerKey");async function _k(e){await t0.deleteWebPushSubscription({endpoint:e.endpoint}).catch(()=>{}),await e.unsubscribe().catch(()=>!1),s0=null}r(_k,"forgetSubscription");async function kq(e,t){if(!YK())return{status:"unsupported",error:null};const s=await PA();if(!s)return{status:"unsupported",error:null};let l=await s.pushManager.getSubscription();if(!(e.enabled&&e.pushEnabled))return l&&await _k(l),{status:"off",error:null};if(wx()!=="granted")return{status:"permission",error:null};const c=await t0.getWebPushConfig();if(!c.enabled||!c.publicKey)return{status:"server-disabled",error:null};l&&!wq(l,c.publicKey)&&(await _k(l),l=null),l||(l=await s.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:XA(c.publicKey)}));const u=l.toJSON(),p=u.keys?.p256dh,f=u.keys?.auth;if(!p||!f)return{status:"error",error:"The browser returned an incomplete push subscription."};const h=vq(e),g=[t,l.endpoint,...h].join("|");return g!==s0&&(await t0.upsertWebPushSubscription({endpoint:l.endpoint,keys:{p256dh:p,auth:f},kinds:h}),s0=g),{status:"active",error:null}}r(kq,"reconcile");function i0(e,t){const s=Nk.then(async()=>{try{const l=await kq(e,t);return Ck(l),l}catch(l){const c={status:"error",error:l instanceof Error?l.message:"Push subscription failed."};return Ck(c),c}});return Nk=s.catch(()=>{}),s}r(i0,"syncPushSubscription");function ZA(e,t){return t.enabled&&t.kinds[e.kind]?.enabled===!0}r(ZA,"kindEnabled");function Sq(e){const{payload:t,userId:s,settings:l}=e;return!s||!t.recipientUserIds.includes(s)||!ZA(t.notification,l)?"none":e.visible?"sound":e.pushActive?"none":"os"}r(Sq,"decideLiveNotification");function Nq(e){return!e.visible||!ZA(e.notification,e.settings)?"none":"sound"}r(Nq,"decideServiceWorkerNotification");async function Cq(e){if(wx()!=="granted")return;const t={body:e.body,tag:e.key,data:{url:e.url},icon:WK,badge:QK},s=await PA();if(s){await s.showNotification(e.title,t);return}new Notification(e.title,t)}r(Cq,"showOsNotification");var JA={claim:r(e=>sq(e),"claim"),playSound:r((e,t)=>gq(e.kind,t),"playSound"),showOsNotification:Cq};async function e2(e,t,s,l){return e==="none"?e:await l.claim(t.key)?(e==="sound"?await l.playSound(t,s):await l.showOsNotification(t),e):"none"}r(e2,"perform");function Aq(e,t,s=JA,l={}){const c=l.settings??Zr();return e2(Sq({payload:e,userId:t,settings:c,visible:l.visible??Kc().visible,pushActive:l.pushActive??yq()}),e.notification,c,s)}r(Aq,"deliverLiveNotification");function _q(e,t=JA,s={}){const l=s.settings??Zr();return e2(Nq({notification:e,settings:l,visible:s.visible??Kc().visible}),e,l,t)}r(_q,"deliverServiceWorkerNotification");function t2(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.key=="string"&&typeof t.kind=="string"&&typeof t.title=="string"?t:null}r(t2,"readNotification");function Eq(e){if(!e||typeof e!="object")return null;const t=e,s=t2(t.notification);return!s||!Array.isArray(t.recipientUserIds)?null:{notification:s,recipientUserIds:t.recipientUserIds.filter(l=>typeof l=="string")}}r(Eq,"readNotificationCreatedPayload");function Iq(e){if(!e||typeof e!="object")return null;const t=e;if(t.type==="wardmote.notification"){const s=t2(t.notification);return s?{type:"notification",notification:s}:null}return t.type==="wardmote.navigate"&&typeof t.url=="string"&&t.url.startsWith("/")?{type:"navigate",url:t.url}:null}r(Iq,"readServiceWorkerMessage");var Tq=1e4,Rq=3,Mq=2e3,Dq=3e5,Oq=2e3,Lq=15e3,zq=0,Pq=1,Uc=new Set(["succeeded","interrupted","failed","cancelled","timed_out"]),n2=(0,x.createContext)(null);function $q(e,t,s){if(s.companyId===t)for(const l of Array.from(e))try{l(s)}catch{}}r($q,"dispatchLiveEventToSubscribers");function $Y(e){const t=(0,x.useContext)(n2),s=(0,x.useRef)(e);(0,x.useEffect)(()=>{s.current=e}),(0,x.useEffect)(()=>{if(t)return t.subscribe(l=>{s.current(l)})},[t])}r($Y,"useCompanyLiveEvent");function be(e){return typeof e=="string"&&e.length>0?e:null}r(be,"readString");function al(e){return typeof e!="object"||e===null||Array.isArray(e)?null:e}r(al,"readRecord");function kf(e){return e.slice(0,8)}r(kf,"shortId");function a2(e,t,s){const l=e.getQueryData($.agents.list(t))?.find(c=>c.id===s);return l?.name?l.name:e.getQueryData($.agents.detail(s))?.name??null}r(a2,"resolveAgentName");function Uq(e,t,s){const l=e.getQueryData($.access.companyUserDirectory(t));if(!l)return null;const c=l.users.find(u=>u.principalId===s);return c?.user?.name?.trim()||c?.user?.email?.trim()||null}r(Uq,"resolveUserName");function Fr(e,t){return e.length<=t?e:e.slice(0,t-1)+"…"}r(Fr,"truncate");function Bq(e,t,s,l){return s==="agent"&&l?a2(e,t,l)??`Agent ${kf(l)}`:s==="system"?"System":s==="user"&&l?Uq(e,t,l)??(l==="board"||l==="local-board"?"Board":`User ${kf(l)}`):s==="plugin"?"Plugin":"Unknown actor"}r(Bq,"resolveActorLabel");function Sx(e,t,s,l){const c=new Set([s]),u=e.getQueryData($.issues.detail(s)),p=e.getQueryData($.issues.list(t)),f=be(l?.identifier)??be(l?.issueIdentifier);f&&c.add(f),u?.id&&c.add(u.id),u?.identifier&&c.add(u.identifier);const h=p?.find(g=>!!(g.id===s||g.identifier&&g.identifier===s||f&&g.identifier===f));return h?.id&&c.add(h.id),h?.identifier&&c.add(h.identifier),Array.from(c)}r(Sx,"resolveIssueQueryRefs");function Kq(e,t,s,l){const c=Sx(e,t,s,l),u=c.map(v=>e.getQueryData($.issues.detail(v))).find(v=>!!v),p=e.getQueryData($.issues.list(t))?.find(v=>c.some(y=>v.id===y||v.identifier===y)),f=u??p??null,h=be(l?.identifier)??be(l?.issueIdentifier)??f?.identifier??`Task ${kf(s)}`,g=be(l?.title)??be(l?.issueTitle)??f?.title??null;return{ref:h,title:g,label:g?`${h} - ${Fr(g,72)}`:h,href:`/issues/${f?.identifier??s}`}}r(Kq,"resolveIssueToastContext");function s2(){return!(typeof document>"u"||document.visibilityState!=="visible"||typeof document.hasFocus=="function"&&!document.hasFocus())}r(s2,"isPageForegrounded");function xr(e,t,s){if(!(s?.isForegrounded??s2()))return null;const l=Tf(t).split("/").filter(Boolean);if(!["issues","chats"].includes(l[0])||!l[1])return null;let c=decodeURIComponent(l[1]);if(l[0]==="chats"){const j=e.getQueryData($.auth.session),k=j?.user?.id??j?.session?.userId??null,S=gS(t),N=e.getQueryData($.companies.list(k))?.companies.find(M=>M.issuePrefix.toUpperCase()===S?.toUpperCase());if(!N)return null;const I=e.getQueryData($.agents.list(N.id))?.find(M=>M.id===c||fr(M)===c);if(!I)return null;const C=e.getQueryData($.agentChats.detail(N.id,k,I.id));if(!C)return null;c=C.id}const u=e.getQueryData($.issues.detail(c))??null,p=new Set([c]);u?.id&&p.add(u.id),u?.identifier&&p.add(u.identifier);function f(j,k){const S=e.getQueryData($.issues.activeRun(j)),N=e.getQueryData($.issues.liveRuns(j))??[],I=e.getQueryData($.issues.runs(j))??[];S?.id&&k.add(S.id);for(const C of N)C.id&&k.add(C.id);for(const C of I)C.runId&&k.add(C.runId)}r(f,"collectCachedIssueRunIds");const h=new Set;for(const j of p)f(j,h);const g=new Set(p),v=new Set,y=new Set(h);if(u?.companyId&&u.id){const j=e.getQueryData($.issues.listByDescendantRoot(u.companyId,u.id))??[];for(const k of j)g.add(k.id),k.identifier&&g.add(k.identifier),k.assigneeAgentId&&v.add(k.assigneeAgentId),k.executionRunId&&y.add(k.executionRunId),f(k.id,y),k.identifier&&f(k.identifier,y)}if(u?.companyId){const j=e.getQueryData($.liveRuns(u.companyId))??[];for(const k of j)k.issueId&&g.has(k.issueId)&&y.add(k.id)}return{routeIssueRef:c,issueRefs:p,assigneeAgentId:u?.assigneeAgentId??null,runIds:h,subtreeIssueRefs:g,subtreeAgentIds:v,subtreeRunIds:y}}r(xr,"resolveVisibleIssueRouteContext");function ap(e,t){const s=new Set([e]),l=be(t?.identifier)??be(t?.issueIdentifier);return l&&s.add(l),s}r(ap,"buildIssueRefsForPayload");function sp(e,t){for(const s of e)if(t.has(s))return!0;return!1}r(sp,"overlaps");function qq(e,t,s,l){const c=be(s.entityType),u=be(s.entityId);if(c!=="issue"||!u)return!1;const p=xr(e,t,l);return p?sp(p.subtreeIssueRefs,ap(u,al(s.details))):!1}r(qq,"shouldSuppressActivityToastForVisibleIssue");function Fq(e,t,s,l){if(!(l?.isForegrounded??s2()))return!1;const c=Tf(t).match(/^\/agents\/[^/]+\/runs\/([^/]+)/)?.[1];if(c&&decodeURIComponent(c)===be(s.runId))return!0;const u=xr(e,t,l);if(!u)return!1;const p=be(s.issueId);if(p)return u.subtreeIssueRefs.has(p);const f=be(s.runId);if(f)return u.subtreeRunIds.has(f);const h=be(s.agentId);return!!h&&(h===u.assigneeAgentId||u.subtreeAgentIds.has(h))}r(Fq,"shouldSuppressRunStatusToastForVisibleIssue");function Ek(e,t,s,l){const c=xr(e,t,l);if(!c)return!1;const u=be(s.runId),p=be(s.agentId);if(!(u!==null&&c.runIds.has(u)||p&&c.assigneeAgentId&&p===c.assigneeAgentId))return!1;const f=be(s.status);if(u&&f&&Uc.has(f))for(const v of c.issueRefs)e.invalidateQueries({queryKey:$.issues.comments(v)}),e.setQueryData($.issues.liveRuns(v),y=>_K(y,u)),e.setQueryData($.issues.activeRun(v),y=>y?.id===u?null:y),e.setQueryData($.issues.detail(v),y=>EK(y,u));const h=!!f&&Uc.has(f),g=!h&&(l?.liveStatusAlreadyPatched??!1);for(const v of c.issueRefs)e.invalidateQueries({queryKey:$.issues.detail(v)}),e.invalidateQueries({queryKey:$.issues.activity(v)}),e.invalidateQueries({queryKey:$.issues.runs(v)}),l?.runLifecycleEvent&&e.invalidateQueries({queryKey:$.issues.queuedComments(v)}),g||(e.invalidateQueries({queryKey:$.issues.liveRuns(v)}),e.invalidateQueries({queryKey:$.issues.activeRun(v)})),h&&(e.invalidateQueries({queryKey:$.issues.comments(v)}),e.invalidateQueries({queryKey:$.issues.attachments(v)}),e.invalidateQueries({queryKey:$.issues.workProducts(v)}),e.invalidateQueries({queryKey:$.issues.workProductPullRequestRefresh(v)}),e.invalidateQueries({queryKey:["issues","tree-control-state",v]}));return!0}r(Ek,"invalidateVisibleIssueRunQueries");function pc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r(pc,"hasPatchKey");function i2(e,t){return e.id!==t.runId?e:{...e,...pc(t,"message")?{currentStatusMessage:t.message}:{},...pc(t,"updatedAt")?{currentStatusUpdatedAt:t.updatedAt}:{},...pc(t,"currentToolName")?{currentToolName:t.currentToolName}:{},...pc(t,"lastAssistantSnippet")?{lastAssistantSnippet:t.lastAssistantSnippet}:{},...pc(t,"lastEventAt")?{lastEventAt:t.lastEventAt}:{}}}r(i2,"applyRunLiveStatusPatch");function Ik(e,t){if(!e)return e;let s=!1;const l=e.map(c=>c.id!==t.runId?c:(s=!0,i2(c,t)));return s?l:e}r(Ik,"applyRunLiveStatusPatchToArray");function Hq(e,t,s){const l=be(e.runId);if(!l)return null;const c={runId:l,agentId:be(e.agentId),issueId:be(e.issueId)};if(s==="heartbeat.run.progress")return c.message=be(e.message),c.updatedAt=be(e.updatedAt)??t,c.currentToolName=be(e.currentToolName),c.lastAssistantSnippet=be(e.lastAssistantSnippet),c.lastEventAt=be(e.lastEventAt)??c.updatedAt,c;if(s==="heartbeat.run.log")return c.lastEventAt=be(e.ts)??t,c;if(s==="heartbeat.run.event"){const u=be(e.message);u&&(c.message=u),c.updatedAt=be(e.updatedAt)??t;const p=be(e.currentToolName);p&&(c.currentToolName=p);const f=be(e.lastAssistantSnippet);return f&&(c.lastAssistantSnippet=f),c.lastEventAt=be(e.lastEventAt)??t,c}return null}r(Hq,"readRunLiveStatusPatchFromPayload");var Vq=1e3;function Wq(e=Vq){const t=new Map,s=new Map,l=r(c=>{const u=t.get(c);if(!u){s.delete(c);return}t.delete(c),s.set(c,setTimeout(()=>l(c),e)),u.apply(u.patch)},"release");return{submit:r((c,u)=>{if(s.has(c.runId)){t.set(c.runId,{patch:c,apply:u});return}s.set(c.runId,setTimeout(()=>l(c.runId),e)),u(c)},"submit"),dispose:r(()=>{for(const c of s.values())clearTimeout(c);s.clear(),t.clear()},"dispose")}}r(Wq,"createRunLogPatchThrottle");function Qq(e,t,s,l,c){let u=!1;e.setQueryData($.liveRuns(t),h=>{const g=Ik(h,l);return g!==h&&(u=!0),g});const p=new Set;if(l.issueId)for(const h of Sx(e,t,l.issueId,null))p.add(h);const f=xr(e,s,c);if(f&&(f.runIds.has(l.runId)||l.issueId&&f.issueRefs.has(l.issueId)||l.agentId&&f.assigneeAgentId&&l.agentId===f.assigneeAgentId))for(const h of f.issueRefs)p.add(h);for(const h of p)e.setQueryData($.issues.activeRun(h),g=>!g||g.id!==l.runId?g:(u=!0,i2(g,l))),e.setQueryData($.issues.liveRuns(h),g=>{const v=Ik(g,l);return v!==g&&(u=!0),v});return u}r(Qq,"applyRunLiveStatusPatchToCaches");function Gq(e,t,s,l){const c=xr(e,t,l);if(!c)return!1;const u=be(s.agentId);return!!u&&(u===c.assigneeAgentId||c.subtreeAgentIds.has(u))}r(Gq,"shouldSuppressAgentStatusToastForVisibleIssue");function Yq(e,t,s,l){const c=be(s.entityType),u=be(s.entityId),p=be(s.actorType),f=be(s.action),h=al(s.details);if(c!=="issue"||!u||p!=="agent"&&p!=="system"||f!=="issue.updated"||be(h?.source)==="comment")return!1;const g=xr(e,t,l);return g?sp(g.issueRefs,ap(u,h)):!1}r(Yq,"shouldDeferIssueRefetchForVisibleAgentActivity");function r2(e){return{isForegrounded:e?.isForegrounded??Kc().visible}}r(r2,"commentRouteOptions");function l2(e,t,s,l){const c=be(s.entityType),u=be(s.entityId),p=be(s.action),f=al(s.details);if(c!=="issue"||!u||p!=="issue.comment_added"||!be(f?.commentId))return!1;const h=xr(e,t,r2(l));return h?sp(h.issueRefs,ap(u,f)):!1}r(l2,"shouldDeferVisibleIssueCommentActivity");async function Xq(e,t,s,l){const c=be(s.entityType),u=be(s.action),p=al(s.details),f=be(p?.commentId);if(c!=="issue"||u!=="issue.comment_added"||!f)return!1;const h=xr(e,t,r2(l));if(!h)return!1;const g=be(s.entityId);if(!g||!sp(h.issueRefs,ap(g,p)))return!1;try{const v=await cn.getComment(h.routeIssueRef,f);for(const y of h.issueRefs)e.setQueryData($.issues.comments(y),j=>j?{...j,pages:pI(j.pages,v)}:{pages:[[v]],pageParams:[null]});return!0}catch{for(const v of h.issueRefs)e.invalidateQueries({queryKey:$.issues.comments(v)});return!1}}r(Xq,"hydrateVisibleIssueComment");var Zq=new Set(["issue.created","issue.updated","issue.comment_added"]),Tk=new Set(["issue.document_created","issue.document_updated","issue.document_restored","issue.document_deleted"]),Jq=new Set(["issue.document_annotation_thread_created","issue.document_annotation_comment_added","issue.document_annotation_thread_resolved","issue.document_annotation_thread_reopened","issue.document_annotation_remapped"]),e7=new Set(["routine.document_annotation_thread_created","routine.document_annotation_comment_added","routine.document_annotation_thread_resolved","routine.document_annotation_thread_reopened","routine.document_annotation_remapped"]),t7=new Set(["case.document_annotation_thread_created","case.document_annotation_comment_added","case.document_annotation_thread_resolved","case.document_annotation_thread_reopened","case.document_annotation_remapped"]),n7=new Set(["error"]),a7=new Set(["failed","timed_out","cancelled"]);function s7(e){if(!e)return null;const t=[];if(typeof e.status=="string"&&t.push(`status -> ${e.status.replace(/_/g," ")}`),typeof e.priority=="string"&&t.push(`priority -> ${e.priority}`),typeof e.assigneeAgentId=="string"||typeof e.assigneeUserId=="string"?t.push("reassigned"):(e.assigneeAgentId===null||e.assigneeUserId===null)&&t.push("unassigned"),e.reopened===!0){const s=be(e.reopenedFrom);t.push(s?`reopened from ${s.replace(/_/g," ")}`:"reopened")}return typeof e.title=="string"&&t.push("title changed"),typeof e.description=="string"&&t.push("description changed"),t.length>0?t.join(", "):null}r(s7,"describeIssueUpdate");function i7(e,t,s,l){const c=be(s.entityType),u=be(s.entityId),p=be(s.action),f=al(s.details),h=be(s.actorId),g=be(s.actorType);if(c!=="issue"||!u||!p||!Zq.has(p))return null;const v=Kq(e,t,u,f),y=be(be(s.actorName)?.trim())??Bq(e,t,g,h),j=g==="agent"&&h?e.getQueryData($.agents.list(t))?.find(K=>K.id===h)??e.getQueryData($.agents.detail(h)):void 0,k=g==="user"&&h?e.getQueryData($.access.companyUserDirectory(t))?.users.find(K=>K.principalId===h)?.user:void 0,S=h&&(g==="user"||g==="agent")?{type:g,id:h,name:y,image:s.actorImage!==void 0?be(s.actorImage):k?.image,appearance:g==="agent"?ME(s.actorAppearance!==void 0?s.actorAppearance:j?.appearance,h):void 0}:void 0;if(g==="user"&&l.userId&&h===l.userId||g==="agent"&&l.agentId&&h===l.agentId||p==="issue.comment_added"&&be(f?.source)?.startsWith("chat:"))return null;if(p==="issue.created")return{actor:S,title:`${y} created ${v.ref}`,body:v.title?Fr(v.title,96):void 0,tone:"success",action:{label:`View ${v.ref}`,href:v.href},dedupeKey:`activity:${p}:${u}`};if(p==="issue.updated"){if(be(f?.source)==="comment")return null;const K=s7(f),z=K?v.title?`${Fr(v.title,64)} - ${K}`:K:v.title?Fr(v.title,96):v.label;return{actor:S,title:`${y} updated ${v.ref}`,body:Fr(z,100),tone:"info",action:{label:`View ${v.ref}`,href:v.href},dedupeKey:`activity:${p}:${u}`}}const N=be(f?.commentId),I=be(f?.bodySnippet),C=f?.reopened===!0,M=f?.updated===!0,R=be(f?.reopenedFrom),_=C?R?`reopened from ${R.replace(/_/g," ")}`:"reopened":null,D=C?`${y} reopened and commented on ${v.ref}`:M?`${y} commented and updated ${v.ref}`:`${y} commented on ${v.ref}`,U=I?_?`${_} - ${I.replace(/^#+\s*/m,"").replace(/\n/g," ")}`:I.replace(/^#+\s*/m,"").replace(/\n/g," "):_?v.title?`${_} - ${v.title}`:_:v.title??void 0;return{actor:S,title:D,body:U?Fr(U,96):void 0,tone:"info",action:{label:`View ${v.ref}`,href:v.href},dedupeKey:`activity:${p}:${u}:${N??"na"}`}}r(i7,"buildActivityToast");function r7(e){const t=be(e.entityType),s=be(e.action),l=be(e.entityId),c=al(e.details);return t!=="join_request"||!s||!l||s!=="join.requested"&&s!=="join.request_replayed"?null:{title:`${be(c?.requestType)==="agent"?"Agent":"Someone"} wants to join`,body:"A new join request is waiting for approval.",tone:"info",action:{label:"View inbox",href:"/inbox/mine"},dedupeKey:`join-request:${l}`}}r(r7,"buildJoinRequestToast");function l7(e,t,s,l){const c=be(e.agentId),u=be(e.status);if(!c||!u||!n7.has(u))return null;const p=u==="error"?"error":"info",f=t(c)??`Agent ${kf(c)}`;return{title:u==="running"?`${f} started`:`${f} errored`,body:s.getQueryData($.agents.list(l))?.find(h=>h.id===c)?.title??void 0,tone:p,action:{label:"View agent",href:`/agents/${c}`},dedupeKey:`agent-status:${c}:${u}`}}r(l7,"buildAgentStatusToast");function o7(e,t){const s=be(e.runId),l=be(e.agentId),c=be(e.status);if(!s||!l||!c||!a7.has(c))return null;const u=be(e.error),p=be(e.errorCode);if(p==="operator_interrupted"||p==="workspace_busy")return null;const f=be(e.contextSource),h=be(e.triggerDetail),g=t(l)??"Agent";if(c==="failed"&&p==="low_trust_isolation_unavailable"&&f?.startsWith("chat:"))return{title:`${g} couldn't start this chat`,body:"This external chat identity isn't linked, and isolated guest workspaces are disabled. Link the identity in Connectors or enable isolated workspaces, then start a new task.",tone:"warn",ttlMs:1e4,action:{label:"Open chat connections",href:"/apps"},dedupeKey:`run-status:${s}:${c}`};const v=c==="succeeded"?"success":c==="cancelled"?"info":"error",y=`${g} run ${c==="succeeded"?"succeeded":c==="failed"?"failed":c==="timed_out"?"timed out":"cancelled"}`;let j;return u?j=Fr(u,100):h&&(j=`Trigger: ${h}`),{title:y,body:j,tone:v,ttlMs:c==="succeeded"?5e3:7e3,action:{label:"View run",href:`/agents/${l}/runs/${s}`},dedupeKey:`run-status:${s}:${c}`}}r(o7,"buildRunStatusToast");function c7(e,t,s){const l=be(s.runId),c=be(s.status);if(!l||!c)return!1;if(e.setQueryData($.runDetail(l),p=>{if(!p)return p;const f=r(h=>Object.prototype.hasOwnProperty.call(s,h),"has");return{...p,status:c,...f("invocationSource")?{invocationSource:be(s.invocationSource)??p.invocationSource}:{},...f("triggerDetail")?{triggerDetail:be(s.triggerDetail)}:{},...f("error")?{error:be(s.error)}:{},...f("errorCode")?{errorCode:be(s.errorCode)}:{},...f("startedAt")?{startedAt:be(s.startedAt)}:{},...f("finishedAt")?{finishedAt:be(s.finishedAt)}:{}}}),Uc.has(c))return e.setQueryData($.liveRuns(t),p=>CK(p,l)),e.getQueryData($.pausedTasks(t))&&e.invalidateQueries({queryKey:$.pausedTasks(t)}),!0;let u=!1;return e.setQueryData($.liveRuns(t),p=>{const f=AK(p,l,c);return u=f.present,f.next}),u}r(c7,"applyRunLifecycleToCompanyLiveRuns");function u7(e,t,s){const l=be(s.status);l&&Uc.has(l)&&e.invalidateQueries({queryKey:$.heartbeats(t),refetchType:"none"}),e.invalidateQueries({queryKey:$.agents.list(t)}),e.invalidateQueries({queryKey:$.dashboard(t)}),e.invalidateQueries({queryKey:["costs",t]}),e.invalidateQueries({queryKey:$.sidebarBadges(t)});const c=be(s.agentId);c&&(e.invalidateQueries({queryKey:$.agents.detail(c)}),e.invalidateQueries({queryKey:$.heartbeats(t,c)}));const u=be(s.runId);u&&e.invalidateQueries({queryKey:$.runDetail(u)})}r(u7,"invalidateHeartbeatQueries");function d7(e,t,s){const l=be(s.agentId);l&&e.invalidateQueries({queryKey:$.agents.detail(l)})}r(d7,"invalidateHeartbeatProgressQueries");var f7=new Set(["approval","attention_source","budget_incident","decision","decision_queue","issue_recovery_action","join_request"]),p7=["issue.blockers_","issue.dependency_recovery_","issue.disposition_repair_","issue.execution_recovery_","issue.interaction_","issue.recovery_action_","issue.stalled_review_","issue.thread_interaction_"],m7=new Set(["failed","timed_out"]);function h7(e,t,s){return t?.startsWith("inbox.")||e&&f7.has(e)?!0:e!=="issue"||!t?!1:p7.some(l=>t.startsWith(l))||t==="issue.reviewers_updated"||t==="issue.status_decision_recorded"?!0:(t==="issue.created"||t==="issue.updated")&&(s?.status!==void 0||s?.blockedByIssueIds!==void 0)}r(h7,"activityChangesAttention");function Rk(e,t,s,l){return e.getQueriesData({queryKey:$.attention(t)}).some(([,c])=>c?"items"in c?Array.isArray(c.items)&&c.items.some(s):"count"in c&&l(c):!1)}r(Rk,"cachedAttentionIncludes");function r0(e,t){e.invalidateQueries({queryKey:$.attention(t)})}r(r0,"invalidateAttentionQueries");function g7(e,t,s,l,c){e.invalidateQueries({queryKey:$.activity(t)}),e.invalidateQueries({queryKey:$.dashboard(t)}),e.invalidateQueries({queryKey:$.sidebarBadges(t)});const u=be(s.entityType),p=be(s.entityId),f=be(s.action),h=be(s.actorType),g=be(s.actorId),v=al(s.details),y=h==="user"&&!!l.userId&&g===l.userId||h==="agent"&&!!l.agentId&&g===l.agentId;if(h7(u,f,v)&&r0(e,t),u==="decision"&&(e.invalidateQueries({queryKey:["decisions",t]}),p&&e.invalidateQueries({queryKey:$.decisions.detail(p)})),(f?.startsWith("ai_connection.")||f?.startsWith("connection_grant."))&&e.invalidateQueries({queryKey:["ai-connections",t]}),(f?.startsWith("primary_agent.")||f?.startsWith("agent.")||f?.startsWith("resource_membership."))&&e.invalidateQueries({queryKey:["primary-agent",t]}),f?.startsWith("resource_membership.")||f?.startsWith("primary_agent.")){const j=be(v?.userId);(!j||j===l.userId)&&e.invalidateQueries({queryKey:$.resourceMemberships.mine(t)})}if(u==="issue"){const j=$.agentChats.list(t,l.userId);if((p&&e.getQueryData(j)?.some(k=>k.id===p)||f==="issue.conversation_opened"&&y)&&e.invalidateQueries({queryKey:j}),(f==="issue.tree_hold_created"||f==="issue.tree_hold_released"||f==="issue.updated")&&(e.invalidateQueries({queryKey:["issues","tree-control-state"]}),f!=="issue.updated"&&e.invalidateQueries({queryKey:$.pausedTasks(t)})),p&&PK(e,t,p,OK(f,v,c?.occurredAt??null)),$K(e,t),e3(e,t,s),p){const k=(f==="issue.comment_added"||f==="issue.updated"&&be(v?.source)==="comment")&&(h==="user"&&!!l.userId&&g===l.userId||h==="agent"&&!!l.agentId&&g===l.agentId),S=!!c?.pathname&&Yq(e,c.pathname,s,{isForegrounded:c.isForegrounded}),N=!!c?.pathname&&l2(e,c.pathname,s,{isForegrounded:c.isForegrounded}),I=Sx(e,t,p,v);for(const C of I){const M=k||S||N?{refetchType:"none"}:void 0;if(e.invalidateQueries({queryKey:$.issues.detail(C),...M}),e.invalidateQueries({queryKey:$.issues.activity(C),...M}),(f==="issue.comment_added"||f==="issue.conversation_session_started")&&e.invalidateQueries({queryKey:$.issues.comments(C),...M}),(f==="issue.comment_added"||f?.startsWith("issue.queued_comment"))&&e.invalidateQueries({queryKey:$.issues.queuedComments(C)}),(f?.startsWith("issue.attachment_")||f?.startsWith("issue.work_product_"))&&(e.invalidateQueries({queryKey:$.issues.attachments(C)}),e.invalidateQueries({queryKey:$.issues.workProducts(C)})),f==="issue.conversation_session_started"&&(e.invalidateQueries({queryKey:["issues","tree-control-state",C]}),e.invalidateQueries({queryKey:$.issues.interactions(C)})),f&&Tk.has(f)){const R=be(v?.key);e.invalidateQueries({queryKey:$.issues.documents(C),...M}),R?(e.invalidateQueries({queryKey:$.issues.document(C,R),...M}),e.invalidateQueries({queryKey:$.issues.documentRevisions(C,R),...M})):(e.invalidateQueries({queryKey:["issues","document",C],...M}),e.invalidateQueries({queryKey:["issues","document-revisions",C],...M}))}if(f&&(Tk.has(f)||Jq.has(f))){const R=be(v?.key)??be(v?.documentKey);e.invalidateQueries({queryKey:R?["issues","document-annotations",C,R]:["issues","document-annotations",C],...M})}(f?.startsWith("issue.thread_interaction_")||(f==="issue.updated"||f==="issue.status_decision_recorded")&&be(v?.source)==="native_status_decision")&&(e.invalidateQueries({queryKey:$.issues.interactions(C)}),e.invalidateQueries({queryKey:$.tools.actionRequests(t,"pending")}),e.invalidateQueries({queryKey:$.apps.attention(t)}),e.invalidateQueries({queryKey:$.tools.trustRules(t)}))}}return}if(u==="agent"){e.invalidateQueries({queryKey:$.agents.list(t)}),e.invalidateQueries({queryKey:$.org(t)}),p&&(e.invalidateQueries({queryKey:$.agents.detail(p)}),e.invalidateQueries({queryKey:$.heartbeats(t,p)}));return}if(u==="project"){const j=be(s.details?.sourceIssueId);j&&e.invalidateQueries({queryKey:$.issues.activity(j)}),e.invalidateQueries({queryKey:$.projects.all(t)}),p&&e.invalidateQueries({queryKey:$.projects.detail(p)});return}if(u==="company_skill"){const j=be(s.details?.sourceIssueId);j&&e.invalidateQueries({queryKey:$.issues.activity(j)}),p&&e.invalidateQueries({queryKey:$.companySkills.detail(t,p)}),e.invalidateQueries({queryKey:$.companySkills.list(t)});return}if(u==="goal"){e.invalidateQueries({queryKey:$.goals.list(t)}),p&&e.invalidateQueries({queryKey:$.goals.detail(p)});return}if(u==="approval"){e.invalidateQueries({queryKey:$.approvals.list(t)});return}if(u==="join_request"){e.invalidateQueries({queryKey:$.access.joinRequests(t)});return}if(u==="cost_event"){e.invalidateQueries({queryKey:["costs",t]}),e.invalidateQueries({queryKey:["usage-by-provider",t]}),e.invalidateQueries({queryKey:["usage-by-biller",t]}),e.invalidateQueries({queryKey:$.usageWindowSpend(t)});return}if(u==="routine"||u==="routine_trigger"||u==="routine_run"){if(e.invalidateQueries({queryKey:["routines"]}),u==="routine"&&f&&e7.has(f)&&p){const j=be(v?.key)??be(v?.documentKey)??"description",k=y?{refetchType:"inactive"}:void 0;e.invalidateQueries({queryKey:["routines","document-annotations",p,j],...k})}return}if(u==="case"){if(e.invalidateQueries({queryKey:$.cases.list(t)}),p&&(e.invalidateQueries({queryKey:$.cases.detail(p)}),e.invalidateQueries({queryKey:$.cases.events(p)}),f&&t7.has(f))){const j=be(v?.key)??be(v?.documentKey),k=y?{refetchType:"inactive"}:void 0;e.invalidateQueries({queryKey:j?["cases","document-annotations",p,j]:["cases","document-annotations",p],...k})}return}if(u==="summary_slot"){const j=be(v?.scopeKind),k=be(v?.slotKey),S=be(v?.scopeId);j&&k&&(e.invalidateQueries({queryKey:$.summarySlots.detail(t,j,k,S)}),e.invalidateQueries({queryKey:$.summarySlots.revisions(t,j,k,S)}));return}u==="company"&&e.invalidateQueries({queryKey:$.companies.all})}r(g7,"invalidateActivityQueries");function x7(e,t){const s=t.payload??{},l=be(s.runId),c=be(s.status);if(!l||!c||!Uc.has(c))return!1;const u=`${t.companyId}:${l}:${c}`,p=e.observedRunOutcomes.has(u);e.observedRunOutcomes.delete(u),e.observedRunOutcomes.add(u),e.observedRunOutcomes.size>Oq&&e.observedRunOutcomes.delete(e.observedRunOutcomes.values().next().value);const f=Date.parse(be(s.finishedAt)??""),h=Date.parse(t.createdAt);return p||h-f>Dq}r(x7,"observeRunOutcome");function b7(e,t){const s=Date.now();if(s<e.suppressUntil)return!0;const l=e.cooldownHits.get(t);if(!l)return!1;const c=l.filter(u=>s-u<Tq);return e.cooldownHits.set(t,c),c.length>=Rq}r(b7,"shouldSuppressToast");function v7(e,t){const s=Date.now(),l=e.cooldownHits.get(t)??[];l.push(s),e.cooldownHits.set(t,l)}r(v7,"recordToastHit");function Hh(e,t,s,l){b7(e,s)||t(l)!==null&&v7(e,s)}r(Hh,"gatedPushToast");function y7(e,t,s,l,c,u,p,f){if(l.companyId!==t)return;const h=r(k=>a2(e,t,k),"nameOf"),g=l.payload??{},v=l.type==="heartbeat.run.status"&&(x7(u,l)||Fq(e,s,g)),y=Hq(g,l.createdAt,l.type);let j=!1;if(y){const k=r(S=>{j=Qq(e,t,s,S)},"applyPatch");l.type==="heartbeat.run.log"&&f?f.submit(y,k):k(y)}if(l.type!=="heartbeat.run.log"){if(l.type==="heartbeat.run.queued"||l.type==="heartbeat.run.status"){const k=c7(e,t,g);if(u7(e,t,g),vk(e,l),k||e.invalidateQueries({queryKey:$.liveRuns(t)}),Ek(e,s,g,{runLifecycleEvent:!0}),(l.type==="heartbeat.run.status"&&m7.has(be(g.status)??"")||l.type==="heartbeat.run.queued"&&Rk(e,t,S=>S.sourceKind==="failed_run",S=>(S.countsBySourceKind?.failed_run??0)>0))&&r0(e,t),l.type==="heartbeat.run.status"){const S=o7(g,h);S&&!v&&Hh(u,c,"run-status",S)}return}if(l.type==="heartbeat.run.progress"){d7(e,t,g),Ek(e,s,g,{liveStatusAlreadyPatched:j});return}if(l.type==="heartbeat.run.event"){vk(e,l);return}if(l.type==="agent.status"){e.invalidateQueries({queryKey:$.agents.list(t)}),e.invalidateQueries({queryKey:$.dashboard(t)}),e.invalidateQueries({queryKey:$.org(t)});const k=be(g.agentId);k&&e.invalidateQueries({queryKey:$.agents.detail(k)}),(be(g.status)==="error"||k&&Rk(e,t,N=>N.sourceKind==="agent_error_alert"&&N.subject?.id===k,N=>N.errorAgentIds?.includes(k)===!0))&&r0(e,t);const S=l7(g,h,e,t);S&&!Gq(e,s,g)&&Hh(u,c,"agent-status",S);return}if(l.type==="activity.logged"){g7(e,t,g,p,{pathname:s,occurredAt:l.createdAt??null}),l2(e,s,g)&&Xq(e,s,g);const k=be(g.action),S=i7(e,t,g,p)??r7(g);S&&!qq(e,s,g)&&Hh(u,c,`activity:${k??"unknown"}`,S)}}}r(y7,"handleLiveEvent");function j7(e,t){return e&&e===t?e:null}r(j7,"resolveLiveCompanyId");function Mk(e){e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null}r(Mk,"resetSocketHandlers");function Dk(e,t){if(e){if(e.readyState===zq){e.onopen=()=>{Mk(e),e.close(1e3,t)},e.onmessage=null,e.onerror=()=>{},e.onclose=null;return}Mk(e),e.readyState===Pq&&e.close(1e3,t)}}r(Dk,"closeSocketQuietly");function w7(e,t,s){return e==="success"&&(t||s==="local_trusted")}r(w7,"canUseLiveSession");function k7({children:e}){const{visible:t}=lS(),s=(0,x.useRef)(!t),{selectedCompanyId:l,selectedCompany:c}=bt(),u=kn(),{pushToast:p}=Ri(),f=hn(),h=(0,x.useRef)({cooldownHits:new Map,suppressUntil:0,observedRunOutcomes:new Set}),g=(0,x.useRef)(f.pathname),{data:v,status:y}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),{data:j}=me({queryKey:$.health,queryFn:Fc.get}),k=v?.user?.id??v?.session?.userId??(j?.deploymentMode==="local_trusted"?"local-board":null),S=v?.session?.id??k??"signed_out",N=j7(l,c?.id??null),I=w7(y,v!=null,j?.deploymentMode)&&N!==null,C=(0,x.useRef)({userId:k,agentId:null}),M=(0,x.useRef)(new Set),R=(0,x.useCallback)(z=>(M.current.add(z),()=>{M.current.delete(z)}),[]),_=(0,x.useMemo)(()=>({subscribe:R}),[R]),D=(0,x.useMemo)(()=>kK(u),[u]),U=(0,x.useMemo)(()=>NK(u,D),[u,D]),K=(0,x.useMemo)(()=>Wq(),[]);return(0,x.useEffect)(()=>()=>{D.dispose(),K.dispose()},[D,K]),(0,x.useEffect)(()=>{g.current=f.pathname},[f.pathname]),(0,x.useEffect)(()=>{C.current={userId:k,agentId:null}},[k]),(0,x.useEffect)(()=>{if(!t||!I||!N)return;const z=window.setInterval(()=>{UK(u,N)},IK);return()=>window.clearInterval(z)},[I,N,u,t]),(0,x.useEffect)(()=>{if(!t){s.current=!0,D.dispose(),K.dispose();return}if(!I||!N)return;s.current&&(s.current=!1,u.invalidateQueries({type:"active"},{cancelRefetch:!1}));let z=!1,E=0,B=null,O=null,Q=null;const V=r(()=>{B!==null&&(window.clearTimeout(B),B=null)},"clearReconnect"),ue=r(()=>{O!==null&&(window.clearInterval(O),O=null)},"stopPolling"),ce=r(()=>{z||O!==null||(O=window.setInterval(()=>{u.invalidateQueries({type:"active"},{cancelRefetch:!1})},Lq))},"startPolling"),X=r(()=>{if(z||B!==null)return;E+=1;const ie=Math.min(15e3,1e3*2**Math.min(E-1,4));B=window.setTimeout(()=>{B=null,A()},ie)},"scheduleReconnect"),A=r(()=>{if(z)return;const ie=HK(`/api/companies/${encodeURIComponent(N)}/events/ws`),le=VK(ie);if(!le){ce(),X();return}Q=le,le.onopen=()=>{if(z||Q!==le){Dk(le,"stale_connection");return}ue(),E>0&&(h.current.suppressUntil=Date.now()+Mq),u.invalidateQueries({type:"active"},{cancelRefetch:!1}),E=0},le.onmessage=Ae=>{if(!Kc().visible)return;const de=typeof Ae.data=="string"?Ae.data:"";if(de)try{const we=JSON.parse(de);if(y7(U,N,g.current,we,p,h.current,{userId:C.current.userId,agentId:C.current.agentId},K),$q(M.current,N,we),we.type==="notification.created"){const ye=Eq(we.payload);ye&&Aq(ye,C.current.userId)}}catch{}},le.onerror=()=>{},le.onclose=()=>{Q===le&&(Q=null,!z&&(ce(),X()))}},"connect"),ee=window.setTimeout(A,0);return()=>{z=!0,window.clearTimeout(ee),V(),ue();const ie=Q;Q=null,Dk(ie,"provider_unmount")}},[t,D,K,u,U,N,p,I,S]),(0,a.jsx)(n2.Provider,{value:_,children:e})}r(k7,"LiveUpdatesProvider");function S7(e){let t=Zr();kk(t),i0(t,e.userId);const s=YA(()=>{const u=Zr();u!==t&&(t=u,kk(u),i0(u,e.userId))}),l=typeof navigator<"u"&&"serviceWorker"in navigator?navigator.serviceWorker:null,c=r(u=>{const p=Iq(u.data);p&&(p.type==="navigate"?e.navigate(p.url):_q(p.notification))},"onMessage");return l?.addEventListener("message",c),l?.startMessages(),()=>{s(),l?.removeEventListener("message",c)}}r(S7,"startNotificationRuntime");function N7(){const e=ja(),t=(0,x.useRef)(e),{data:s}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),l=s?.user?.id??s?.session?.userId??null;return(0,x.useEffect)(()=>{t.current=e},[e]),(0,x.useEffect)(()=>{if(l)return S7({userId:l,navigate:r(c=>t.current(c),"navigate")})},[l]),null}r(N7,"NotificationRuntime");var C7=36e5,A7=3e3,_7=2e3,Ok="wardmote.skip-waiting",E7="wardmote.build-id",o2=null,l0=new Set;function I7(e){o2=e;for(const t of l0)t()}r(I7,"publishUpdate");function T7(e){return l0.add(e),()=>{l0.delete(e)}}r(T7,"subscribe");function R7(){return(0,x.useSyncExternalStore)(T7,()=>o2,()=>null)}r(R7,"useServiceWorkerUpdate");function M7(e){return new Promise(t=>{const s=new MessageChannel,l=r(u=>{clearTimeout(c),s.port1.close(),t(u)},"finish"),c=setTimeout(()=>l(null),_7);s.port1.onmessage=u=>{l(typeof u.data?.buildId=="string"?u.data.buildId:null)},e.postMessage({type:E7},[s.port2])})}r(M7,"requestWorkerBuildId");function D7(e={}){const t=e.container??(typeof navigator<"u"&&"serviceWorker"in navigator?navigator.serviceWorker:void 0);if(!t)return()=>{};const s=e.documentRef??document,l=e.reload??(()=>window.location.reload()),c=e.updateIntervalMs??C7,u=e.onUpdateReady??I7;let p=!!t.controller,f=!1,h=!1,g,v=!1;const y=r(async _=>e.pageBuildId?await M7(_)!==e.pageBuildId:!0,"servesNewerBuild"),j=r(()=>{h||(h=!0,g!==void 0&&clearTimeout(g),l())},"reloadOnce"),k=r(async _=>{const D=await y(_);if(!v){if(!D){_.postMessage({type:Ok});return}u(()=>{f=!0,_.postMessage({type:Ok}),g=setTimeout(j,A7)})}},"offerWaiting"),S=r(()=>{if(!p){p=!0;return}if(f){j();return}const _=t.controller;_&&y(_).then(D=>{D&&!v&&!f&&u(j)})},"onControllerChange");t.addEventListener("controllerchange",S);let N;const I=r(()=>{const _=N?.installing;_&&_.addEventListener("statechange",()=>{_.state==="installed"&&t.controller&&k(_)})},"watchInstalling"),C=r(()=>{N?.update().catch(()=>{})},"checkForUpdates"),M=r(()=>{s.visibilityState==="visible"&&C()},"onVisibilityChange");s.addEventListener("visibilitychange",M);const R=setInterval(C,c);return t.register("/sw.js").then(_=>{N=_,_.waiting&&t.controller&&k(_.waiting),_.addEventListener("updatefound",I)}).catch(()=>{}),()=>{v=!0,t.removeEventListener("controllerchange",S),s.removeEventListener("visibilitychange",M),N?.removeEventListener("updatefound",I),clearInterval(R),g!==void 0&&clearTimeout(g)}}r(D7,"startServiceWorkerUpdates");var c2="wardmote.notifications.asked-after-decision";function O7(){try{return window.localStorage.getItem(c2)==="1"}catch{return!0}}r(O7,"alreadyAsked");function L7(){try{window.localStorage.setItem(c2,"1")}catch{return}}r(L7,"markAsked");async function z7(e){const t=await GK();if(t!=="granted")return t;const s=GA(l=>({...l,enabled:!0,pushEnabled:!0}));return e&&await i0(s,e),t}r(z7,"enableNotificationsAfterDecision");function P7(){const{pushToast:e}=Ri(),{data:t}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),s=t?.user?.id??t?.session?.userId??null;(0,x.useEffect)(()=>UE(()=>{O7()||!jx()||wx()!=="default"||(L7(),e({id:"wardmote-notify-after-decision",title:"Get notified when an agent needs a decision",body:"Turn on notifications for this device. You can change it later in Settings.",tone:"info",persistent:!0,action:{label:"Turn on",onClick:r(()=>{z7(s)},"onClick")}}))}),[e,s])}r(P7,"useFirstDecisionNotificationPrompt");var $7="wardmote-update-ready";function U7(){const{pushToast:e}=Ri(),t=R7(),s=kn(),l=w0(),c=(0,x.useRef)(l);return(0,x.useEffect)(()=>{t&&e({id:$7,title:"A new version is ready.",tone:"info",persistent:!0,action:{label:"Reload",onClick:t}})},[t,e]),(0,x.useEffect)(()=>{if(l){c.current=!0;return}c.current&&(c.current=!1,s.invalidateQueries())},[l,s]),P7(),null}r(U7,"PwaRuntime");var u2={get:r(e=>je.get(`/companies/${e}/primary-agent/me`),"get"),set:r((e,t)=>je.put(`/companies/${e}/primary-agent/me`,t),"set")};function B7(e){const t=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),s=t.data?.user?.id??t.data?.session?.userId??"local-board",l=me({queryKey:$.primaryAgent.mine(e??"__none__",s),queryFn:r(()=>u2.get(e),"queryFn"),enabled:!!e&&t.isSuccess});return{...l,userId:s,loading:!!e&&(t.isPending||l.isPending&&!t.error),error:t.error??l.error,retry:r(()=>t.isError?t.refetch():l.refetch(),"retry")}}r(B7,"usePrimaryAgent");function K7({children:e}){const{selectedCompanyId:t}=bt(),s=B7(t),l=kn(),{pushToast:c}=Ri(),u=(0,x.useRef)({companyId:t,userId:s.userId});u.current={companyId:t,userId:s.userId};const p=r(j=>$.primaryAgent.mine(j.companyId,j.userId),"keyFor"),f=r(j=>j.companyId===u.current.companyId&&j.userId===u.current.userId,"isCurrentScope"),h=me({queryKey:$.agents.list(t),queryFn:r(()=>Ha.list(t),"queryFn"),enabled:!!t}),g=Bt({mutationFn:r(j=>u2.set(j.companyId,{primaryAgentId:j.agentId}),"mutationFn"),onMutate:r(async j=>{const k=p(j);await l.cancelQueries({queryKey:k});const S=l.getQueryData(k);return l.setQueryData(k,{companyId:j.companyId,userId:j.userId,primaryAgentId:j.agentId,initialized:!0}),{previous:S}},"onMutate"),onError:r((j,k,S)=>{l.setQueryData(p(k),S?.previous),f(k)&&c({title:"Couldn't change your primary agent.",body:j.message,tone:"error",action:{label:"Retry",onClick:r(()=>{f(k)&&g.mutate(k)},"onClick")}})},"onError"),onSuccess:r((j,k)=>l.setQueryData(p(k),j),"onSuccess"),onSettled:r((j,k,S)=>{l.invalidateQueries({queryKey:p(S)}),l.invalidateQueries({queryKey:$.resourceMemberships.mine(S.companyId)})},"onSettled")}),v=h.data?.find(j=>j.id===s.data?.primaryAgentId&&j.status!=="terminated")??null,y=s.error??h.error;return(0,a.jsx)(p5,{value:t?{companyId:t,primaryAgentId:v?.id??null,primaryAgent:v,loading:s.loading||h.isPending,error:y?.message,onRetry:r(()=>{s.retry(),h.refetch()},"onRetry"),pendingAgentId:g.isPending&&f(g.variables)?g.variables.agentId:null,onChange:r(j=>g.mutate({companyId:t,userId:s.userId,agentId:j}),"onChange")}:null,children:e})}r(K7,"PrimaryAgentProvider");var Lk="min-h-9",q7={default:void 0,warning:"bg-amber-500/5 text-amber-700 dark:text-amber-300",error:"bg-bad/5 text-bad",muted:"opacity-50"};function UY(e,t){const s={name:"",path:"",kind:"dir",children:[]};for(const c of Object.keys(e)){const u=c.split("/").filter(Boolean);let p=s,f="";for(let h=0;h<u.length;h++){const g=u[h];f=f?`${f}/${g}`:g;const v=h===u.length-1;let y=p.children.find(j=>j.name===g);y||(y={name:g,path:f,kind:v?"file":"dir",children:[],action:v?t?.get(c)??null:null},p.children.push(y)),p=y}}function l(c){c.children.sort((u,p)=>u.kind!==p.kind?u.kind==="file"?-1:1:u.name.localeCompare(p.name)),c.children.forEach(l)}return r(l,"sortNode"),l(s),s.children}r(UY,"buildFileTree");function F7(e){let t=0;for(const s of e)s.kind==="file"?t++:t+=F7(s.children);return t}r(F7,"countFiles");function d2(e,t="all"){const s=new Set;for(const l of e){(t==="all"||l.kind===t)&&s.add(l.path);for(const c of d2(l.children,t))s.add(c)}return s}r(d2,"collectAllPaths");function H7(e){return e.endsWith(".yaml")||e.endsWith(".yml")?BS:KS}r(H7,"fileIcon");function f2(e,t,s=0){const l=[];for(const c of e)l.push({node:c,depth:s}),c.kind==="dir"&&t.has(c.path)&&l.push(...f2(c.children,t,s+1));return l}r(f2,"flattenVisibleNodes");function V7(e,t){if(e.kind==="file")return{allChecked:t.has(e.path),someChecked:!1};const s=[...d2(e.children,"file")],l=s.length>0&&s.every(c=>t.has(c));return{allChecked:l,someChecked:s.some(c=>t.has(c))&&!l}}r(V7,"checkboxState");function BY(e){const t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);if(!t)return null;const s={},l=t[1],c=t[2];let u=null,p=null;for(const f of l.split(`
|
|
59
|
+
`)){const h=f.trim();if(!h||h.startsWith("#"))continue;if(h.startsWith("- ")&&u){p||(p=[]),p.push(h.slice(2).trim().replace(/^["']|["']$/g,""));continue}u&&p&&(s[u]=p,p=null,u=null);const g=h.match(/^([a-zA-Z_][\w-]*)\s*:\s*(.*)$/);if(g){const v=g[1],y=g[2].trim().replace(/^["']|["']$/g,"");if(y==="null"){u=null;continue}y?(s[v]=y,u=null):u=v}}return u&&p&&(s[u]=p),Object.keys(s).length>0?{data:s,body:c}:null}r(BY,"parseFrontmatter");var KY={name:"Name",title:"Title",kind:"Kind",reportsTo:"Reports to",skills:"Skills",status:"Status",description:"Description",priority:"Priority",assignee:"Responsible",project:"Project",recurring:"Recurring",targetDate:"Target date"};function W7({nodes:e,selectedFile:t,expandedDirs:s,checkedFiles:l,onToggleDir:c,onSelectFile:u,onToggleCheck:p,fileBadges:f,fileTones:h,renderFileExtra:g,renderLabel:v,checkboxLabel:y,getCheckboxState:j,renderNodeExtra:k,visiblePaths:S,disabled:N=!1,fileRowClassName:I,layout:C="default",showCheckboxes:M=!0,wrapLabels:R=!0,loading:_=!1,error:D,empty:U,ariaLabel:K="Files"}){const z=l??new Set,E=(0,x.useMemo)(()=>f2(e,s).filter(({node:A})=>!S||S.has(A.path)),[s,e,S]),[B,O]=(0,x.useState)(null),Q=(0,x.useRef)(new Map),V=E.some(({node:A})=>A.path===B)?B:E[0]?.node.path;function ue(A){O(A),window.requestAnimationFrame(()=>{Q.current.get(A)?.focus()})}r(ue,"focusPath");function ce(A){N||(A.kind==="dir"?c(A.path):u(A.path))}r(ce,"toggleNode");function X(A,ee,ie){if(!N)switch(A.key){case"ArrowDown":{A.preventDefault();const le=E[Math.min(ee+1,E.length-1)];le&&ue(le.node.path);break}case"ArrowUp":{A.preventDefault();const le=E[Math.max(ee-1,0)];le&&ue(le.node.path);break}case"ArrowRight":ie.kind==="dir"&&!s.has(ie.path)&&(A.preventDefault(),c(ie.path));break;case"ArrowLeft":ie.kind==="dir"&&s.has(ie.path)&&(A.preventDefault(),c(ie.path));break;case"Enter":A.preventDefault(),ce(ie);break;case" ":M&&p&&j?.(ie)!==null&&(A.preventDefault(),p(ie.path,ie.kind))}}return r(X,"handleRowKeyDown"),_?(0,a.jsx)("div",{"aria-busy":"true","aria-label":K,role:"tree",className:"py-1",children:[0,1,2,3].map(A=>(0,a.jsxs)("div",{className:Y("flex items-center gap-2 px-4",Lk),children:[(0,a.jsx)(rt,{className:"h-4 w-4 shrink-0 rounded-sm"}),(0,a.jsx)(rt,{className:Y("h-3.5",A===1?"w-3/5":"w-4/5")})]},A))}):D?(0,a.jsx)("div",{"aria-label":K,role:"tree",className:"p-3",children:(0,a.jsxs)("div",{role:"treeitem","aria-level":1,className:"flex min-h-9 items-center justify-between gap-3 rounded-md border border-bad/30 bg-bad/5 px-3 py-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)(Dn,{variant:"ghost",className:Y("px-2.5",Hd.error??"bg-bg-3 text-ink-3"),children:"error"}),(0,a.jsx)("span",{className:"min-w-0 text-bad",children:D.message})]}),D.retry&&(0,a.jsx)(oe,{type:"button",size:"xs",variant:"secondary",onClick:D.retry,children:"Retry"})]})}):E.length===0?(0,a.jsx)("div",{"aria-label":K,role:"tree",className:"p-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-dashed border-line px-4 py-8 text-center",children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:U?.title??"No files"}),(0,a.jsx)("div",{className:"mt-1 text-xs text-ink-3",children:U?.description??"Files will appear here when they are available."})]})}):(0,a.jsx)("div",{"aria-label":K,role:"tree",children:E.map(({node:A,depth:ee},ie)=>{const le=A.kind==="dir"&&s.has(A.path),Ae=j?.(A),de=M&&Ae!==null,{allChecked:we,someChecked:ye}=Ae==null?V7(A,z):{allChecked:Ae==="checked",someChecked:Ae==="mixed"},Me=f?.[A.path],he=h?.[A.path]??"default",ve=A.kind==="file"?I?.(A,we):void 0,et=A.kind==="file"?H7(A.name):null,$e=A.kind==="file"&&A.path===t;return(0,a.jsxs)("div",{ref:r(Ie=>{Ie?Q.current.set(A.path,Ie):Q.current.delete(A.path)},"ref"),role:"treeitem","aria-level":ee+1,"aria-expanded":A.kind==="dir"?le:void 0,"aria-selected":A.kind==="file"?$e:void 0,"aria-checked":de?ye?"mixed":we:void 0,"aria-disabled":N||void 0,tabIndex:V===A.path?0:-1,className:Y(C==="explorer"?"group flex w-full items-center gap-2 pr-3 text-left text-sm text-ink-3 hover:bg-bg-3/30 cursor-pointer":A.kind==="dir"?M?"group grid w-full grid-cols-(--gtc-2) items-center gap-x-1 pr-3 text-left text-sm text-ink-3 hover:bg-bg-3/30 hover:text-ink":"group grid w-full grid-cols-(--gtc-3) items-center gap-x-1 pr-3 text-left text-sm text-ink-3 hover:bg-bg-3/30 hover:text-ink max-[480px]:grid-cols-(--gtc-4)":"group flex w-full items-center gap-1 pr-3 text-left text-sm text-ink-3 hover:bg-bg-3/30 hover:text-ink cursor-pointer",C==="explorer"?"h-8":Lk,C==="explorer"&&"file-tree-row-explorer",$e&&"text-ink bg-bg-3/20",q7[he],ve,N&&"opacity-50","file-tree-row","outline-none focus-visible:ring-2 focus-visible:ring-focus/50 focus-visible:ring-inset"),style:{"--file-tree-depth":ee},onFocus:r(()=>O(A.path),"onFocus"),onClick:r(()=>ce(A),"onClick"),onKeyDown:r(Ie=>X(Ie,ie,A),"onKeyDown"),"data-file-tree-path":A.path,children:[C==="explorer"&&(A.kind==="dir"?(0,a.jsx)("button",{type:"button",disabled:N,className:"flex size-4 shrink-0 items-center justify-center rounded-sm hover:text-ink focus-visible:ring-2 focus-visible:ring-focus/50",onClick:r(Ie=>{Ie.stopPropagation(),c(A.path)},"onClick"),"aria-label":le?`Collapse ${A.name}`:`Expand ${A.name}`,children:le?(0,a.jsx)(Qr,{className:"size-3.5"}):(0,a.jsx)(ur,{className:"size-3.5"})}):(0,a.jsx)("span",{className:"size-4 shrink-0","aria-hidden":"true"})),de?(0,a.jsx)("label",{className:Y("flex items-center",C==="explorer"?"size-4 shrink-0 justify-center":"pl-2"),onClick:r(Ie=>Ie.stopPropagation(),"onClick"),children:(0,a.jsx)("input",{type:"checkbox","aria-label":y?.(A)??`Select ${A.path}`,disabled:N,checked:we,ref:r(Ie=>{Ie&&(Ie.indeterminate=ye)},"ref"),onChange:r(()=>p?.(A.path,A.kind),"onChange"),className:C==="explorer"?"size-3.5 shrink-0 accent-ink":"mr-2 accent-ink"})}):M&&C==="explorer"?(0,a.jsx)("span",{className:"size-4 shrink-0","aria-hidden":"true"}):null,(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2 py-1 text-left",children:[(0,a.jsx)("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center",children:A.kind==="dir"?le?(0,a.jsx)(qS,{className:"h-3.5 w-3.5"}):(0,a.jsx)(Ei,{className:"h-3.5 w-3.5"}):et?(0,a.jsx)(et,{className:"h-3.5 w-3.5"}):null}),(0,a.jsx)("span",{className:Y("min-w-0",C==="explorer"&&"flex-1",R?"break-all leading-4":"truncate"),children:v?v(A):A.name})]}),Me&&(0,a.jsx)(Dn,{variant:"ghost",className:Y("ml-3 text-(length:--text-nano) uppercase tracking-wide",Hd[Me.status]??"bg-bg-3 text-ink-3"),title:Me.tooltip,children:Me.label}),k?.(A),A.kind==="file"&&g?.(A,we),A.kind==="dir"&&C==="default"&&(0,a.jsx)("button",{type:"button",disabled:N,className:"flex h-9 w-9 items-center justify-center self-center rounded-sm text-ink-3 opacity-70 transition-(--tp-background-color-color-opacity) hover:bg-bg-3 hover:text-ink group-hover:opacity-100 focus-visible:ring-2 focus-visible:ring-focus/50 max-[480px]:hidden",onClick:r(Ie=>{Ie.stopPropagation(),c(A.path)},"onClick"),"aria-label":le?`Collapse ${A.name}`:`Expand ${A.name}`,children:le?(0,a.jsx)(Qr,{className:"h-3.5 w-3.5"}):(0,a.jsx)(ur,{className:"h-3.5 w-3.5"})})]},A.path)})})}r(W7,"FileTree");function Q7(e,t){return e.visible?e.focused?t.visibleMs:t.unfocusedMs??t.visibleMs:t.hiddenMs??!1}r(Q7,"resolvePollingInterval");function G7(e,t){if(e<=0)return 0;const s=Math.min(Math.max(t(),0),.999999);return Math.round(s*e)}r(G7,"computeStartupJitterMs");function Y7(e){const t=lS(),s=(0,x.useRef)(null);s.current===null&&(e.jitter===!1?s.current=0:s.current=G7(Math.min(e.jitterMaxMs??1e3,Math.round(e.visibleMs*.2)),Math.random));const l=s.current;return(0,x.useMemo)(()=>{const c=Q7(t,e);return c===!1?!1:c+l},[t,e.visibleMs,e.unfocusedMs,e.hiddenMs,l])}r(Y7,"useVisibilityRefetchInterval");var X7=3e4,Z7=[];function J7(e,t=!0){const{data:s}=me({queryKey:$.pausedTasks(e??"none"),queryFn:r(()=>cn.listPausedTasks(e),"queryFn"),enabled:!!e&&t,refetchInterval:r(l=>l.state.data?.some(c=>c.state==="pausing")?X7:!1,"refetchInterval")});return s??Z7}r(J7,"usePausedTasks");var p2={listForIssue:r(e=>je.get(`/issues/${e}/external-objects`),"listForIssue"),getIssueSummary:r(e=>je.get(`/issues/${e}/external-object-summary`),"getIssueSummary"),getIssueSummaries:r((e,t)=>je.post(`/companies/${e}/issues/external-object-summaries`,{issueIds:t}),"getIssueSummaries"),refreshIssueObjects:r((e,t)=>je.post(`/issues/${e}/external-objects/refresh`,t??{}),"refreshIssueObjects"),getProjectSummary:r(e=>je.get(`/projects/${e}/external-object-summary`),"getProjectSummary")};async function e9(e,t){const s={};for(let l=0;l<t.length;l+=500){const c=t.slice(l,l+500),u=await p2.getIssueSummaries(e,c);Object.assign(s,u.summaries)}return{summaries:s}}r(e9,"fetchIssueExternalObjectSummariesInBatches");function t9(e){switch(e.sourceKind){case"title":return"Title";case"description":return"Description";case"comment":return"Comment";case"document":return e.documentKey?`Document: ${e.documentKey}`:"Document";case"property":return e.propertyKey?`Property: ${e.propertyKey}`:"Property";case"plugin":return"Plugin";default:return"Source"}}r(t9,"formatMentionSourceLabel");function m2(){const e=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),retry:!1});return{isEnabled:e.data?.enableExternalObjects===!0,isLoaded:e.data!==void 0||e.isError}}r(m2,"useExternalObjectsFeature");function qY(e){const t=m2(),s=t.isEnabled&&!!e,l=me({queryKey:$.externalObjects.byIssue(e??"__none__"),queryFn:r(()=>p2.listForIssue(e),"queryFn"),enabled:s,staleTime:6e4}),c=(0,x.useMemo)(()=>(l.data??[]).filter(f=>!!f.object).map(f=>{const h=f.object,g=f.sourceLabels&&f.sourceLabels.length>0?f.sourceLabels:Array.from(new Set(f.mentions.map(t9)));return{group:f,mentionCount:f.mentionCount??f.mentions.length,sourceLabels:g,pill:{providerKey:h.providerKey,objectType:h.objectType,displayKey:h.displayKey,iconKey:h.iconKey,statusCategory:h.statusCategory,liveness:h.liveness,displayTitle:h.displayTitle,statusLabel:h.statusLabel,statusIconKey:h.statusIconKey,url:h.sanitizedCanonicalUrl}}}),[l.data]),u=(0,x.useMemo)(()=>{const f={};for(const{group:h}of c){const g=h.object;if(!g)continue;const v=Hy(g.sanitizedCanonicalUrl??null);v&&(f[v]={providerKey:g.providerKey,objectType:g.objectType,displayKey:g.displayKey,iconKey:g.iconKey,statusCategory:g.statusCategory,liveness:g.liveness,statusLabel:g.statusLabel,statusIconKey:g.statusIconKey,displayTitle:g.displayTitle});for(const y of h.mentions){const j=Hy(y.sanitizedDisplayUrl??null);j&&!f[j]&&(f[j]={providerKey:g.providerKey,objectType:g.objectType,displayKey:g.displayKey,iconKey:g.iconKey,statusCategory:g.statusCategory,liveness:g.liveness,statusLabel:g.statusLabel,statusIconKey:g.statusIconKey,displayTitle:g.displayTitle})}}return f},[c]),p=(0,x.useCallback)(()=>{l.refetch()},[l.refetch]);return{isEnabled:t.isEnabled,groups:c,markdownReferences:u,isLoading:s&&l.isLoading,isError:l.isError,refetch:p}}r(qY,"useIssueExternalObjects");function n9(e,t){const s=m2(),l=(0,x.useMemo)(()=>[...new Set(t.filter(p=>p.length>0))].sort(),[t]),c=s.isEnabled&&!!e&&l.length>0,u=me({queryKey:$.externalObjects.issueSummaries(e??"__none__",l),queryFn:r(()=>e9(e,l),"queryFn"),enabled:c,staleTime:6e4});return{summaries:(0,x.useMemo)(()=>new Map(Object.entries(u.data?.summaries??{})),[u.data?.summaries]),isLoading:c&&u.isLoading,isReady:s.isLoaded&&(!c||u.isSuccess)}}r(n9,"useIssueExternalObjectSummaries");var FY={relevance:"Relevance",updated:"Recently updated",created:"Newest created",priority:"Priority"},a9={"24h":"Last 24 hours","7d":"Last 7 days","30d":"Last 30 days","90d":"Last 90 days"};function h2(e){return a9[e]??`Updated ≤ ${e}`}r(h2,"updatedWithinLabel");var s9=new Set(kE);function HY(e){const t=e.get("sort");return t&&s9.has(t)?t:"relevance"}r(HY,"parseSearchSort");function VY(e){let t=0;return e.status?.length&&(t+=1),e.priority?.length&&(t+=1),(e.assigneeAgentId!==void 0||e.assigneeUserId)&&(t+=1),e.projectId&&(t+=1),e.labelId&&(t+=1),(e.updatedWithin||e.updatedAfter)&&(t+=1),t}r(VY,"countActiveFilters");function WY(e,t){if(e.assigneeAgentId===null)return"none";if(typeof e.assigneeAgentId=="string")return`agent:${e.assigneeAgentId}`;if(e.assigneeUserId)return e.assigneeUserId===t?"me":`user:${e.assigneeUserId}`}r(WY,"assigneeToken");function QY(e,t,s){const l={...e};return delete l.assigneeAgentId,delete l.assigneeUserId,t&&(t==="none"?l.assigneeAgentId=null:t==="me"?s&&(l.assigneeUserId=s):t.startsWith("agent:")?l.assigneeAgentId=t.slice(6):t.startsWith("user:")&&(l.assigneeUserId=t.slice(5))),l}r(QY,"applyAssigneeToken");function Sc(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}r(Sc,"humanize$1");function i9(e,t){return e.assigneeAgentId===null?"Unassigned":typeof e.assigneeAgentId=="string"?t.agentName(e.assigneeAgentId)??"Agent":e.assigneeUserId?e.assigneeUserId===t.currentUserId?"Me":t.userName(e.assigneeUserId)??"User":"Assignee"}r(i9,"assigneeChipLabel");function GY(e,t){const s=[];for(const l of e.status??[])s.push({id:`status:${l}`,label:`Status: ${Sc(l)}`,remove:r(c=>{const u={...c},p=(c.status??[]).filter(f=>f!==l);return p.length>0?u.status=p:delete u.status,u},"remove")});for(const l of e.priority??[])s.push({id:`priority:${l}`,label:`Priority: ${Sc(l)}`,remove:r(c=>{const u={...c},p=(c.priority??[]).filter(f=>f!==l);return p.length>0?u.priority=p:delete u.priority,u},"remove")});return(e.assigneeAgentId!==void 0||e.assigneeUserId)&&s.push({id:"assignee",label:`Assignee: ${i9(e,t)}`,remove:r(l=>{const c={...l};return delete c.assigneeAgentId,delete c.assigneeUserId,c},"remove")}),e.projectId&&s.push({id:"project",label:`Project: ${t.projectName(e.projectId)??"Project"}`,remove:r(l=>{const c={...l};return delete c.projectId,c},"remove")}),e.labelId&&s.push({id:"label",label:`Label: ${t.labelName(e.labelId)??"Label"}`,remove:r(l=>{const c={...l};return delete c.labelId,c},"remove")}),e.updatedWithin&&s.push({id:"updated",label:`Updated: ${h2(e.updatedWithin)}`,remove:r(l=>{const c={...l};return delete c.updatedWithin,delete c.updatedAfter,c},"remove")}),s}r(GY,"buildFilterChips");function YY(e,t,s){switch(e){case"status":return`Status: ${t.map(Sc).join(", ")}`;case"priority":return`Priority: ${t.map(Sc).join(", ")}`;case"assigneeAgentId":return`Assignee: ${t.map(l=>s.agentName(l)??"Agent").join(", ")}`;case"assigneeUserId":return`Assignee: ${t.map(l=>l===s.currentUserId?"Me":s.userName(l)??"User").join(", ")}`;case"projectId":return`Project: ${t.map(l=>s.projectName(l)??"Project").join(", ")}`;case"labelId":return`Label: ${t.map(l=>s.labelName(l)??"Label").join(", ")}`;case"updatedWithin":case"updatedAfter":return"Updated window";default:return Sc(e)}}r(YY,"describeLoosenSuggestion");function XY(e,t){const s={...e};switch(t){case"status":delete s.status;break;case"priority":delete s.priority;break;case"assigneeAgentId":case"assigneeUserId":delete s.assigneeAgentId,delete s.assigneeUserId;break;case"projectId":delete s.projectId;break;case"labelId":delete s.labelId;break;case"updatedWithin":case"updatedAfter":delete s.updatedWithin,delete s.updatedAfter}return s}r(XY,"clearFilterDimension");var r9='Search title, ID, description… (pick a field or type "exact phrase")';function zk(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}r(zk,"humanize");function Vh(e,t,s,l=""){const c=t?t.kind==="text"&&s.trim()?Hr(t.key,s):"":s;return[...e,l,c].filter(u=>u.trim().length>0).join(" ")}r(Vh,"composeRaw");function l9(e,t){typeof e=="function"?e(t):e&&(e.current=t)}r(l9,"assignRef");function Pk(e,t,s){const l=!!(t.currentUserId||t.currentAgentId);switch(e){case"status":return[...Bc.map(c=>({id:c,label:zk(c),token:`status:${c}`})),...s.includes("is")?[{id:"is:open",label:"Open",description:"Any open status",token:"is:open"},{id:"is:closed",label:"Closed",description:"Done or cancelled",token:"is:closed"}]:[]];case"priority":return x0.map(c=>({id:c,label:zk(c),token:`priority:${c}`}));case"assignee":return[...l?[{id:"me",label:"Me",token:"assignee:me"}]:[],{id:"none",label:"Unassigned",token:"assignee:none"},...(t.agents??[]).map(c=>({id:c.id,label:c.name,token:Hr("assignee",c.name)}))];case"author":return[...l?[{id:"me",label:"Me",token:"author:me"}]:[],...(t.agents??[]).map(c=>({id:c.id,label:c.name,token:Hr("author",c.name)}))];case"label":return(t.labels??[]).map(c=>({id:c.id,label:c.name,token:Hr("label",c.name)}));case"project":return(t.projects??[]).map(c=>({id:c.id,label:c.name,token:Hr("project",c.name)}));case"updated":return eS.map(c=>({id:c,label:h2(c),token:`updated:>${c}`}));default:return[]}}r(Pk,"pickerOptions");function o9(e,t){if(!t)return e;const s=[],l=[];for(const c of e){const u=c.label.toLowerCase();u.startsWith(t)||c.id.toLowerCase().startsWith(t)?s.push(c):u.includes(t)&&l.push(c)}return[...s,...l]}r(o9,"rankOptions");function c9({value:e,onChange:t,context:s={},operatorKeys:l=aA,debounceMs:c=250,placeholder:u=r9,ariaLabel:p="Search",className:f,fieldClassName:h,inputClassName:g,clearOnEscape:v=!1,inputRef:y,autoFocus:j,pageSearchTarget:k,trailing:S,onKeyDown:N}){const I=(0,x.useId)(),C=(0,x.useRef)(null),[M,R]=(0,x.useState)(()=>uc(e,l).tokens),[_,D]=(0,x.useState)(()=>uc(e,l).text),[U,K]=(0,x.useState)(null),[z,E]=(0,x.useState)(""),[B,O]=(0,x.useState)(!1),[Q,V]=(0,x.useState)(-1),ue=(0,x.useRef)(e),ce=(0,x.useRef)(s);ce.current=s;const X=(0,x.useRef)(t);X.current=t;const A=(0,x.useRef)(l);A.current=l;const ee=(0,x.useMemo)(()=>rP.filter(ge=>ge.kind==="text"||l.includes(ge.key)),[l]),ie=Vh(M,U,_,U?z:"");(0,x.useEffect)(()=>{if(e===ue.current)return;ue.current=e;const ge=uc(e,A.current);R(ge.tokens),D(ge.text),K(null),E("")},[e]);const le=(0,x.useCallback)(ge=>{ue.current=ge;const Oe=uo(ge,{...ce.current,operatorKeys:A.current}),De={raw:ge,q:Oe.query,filters:Oe.filters};c<=0?X.current(De):(0,x.startTransition)(()=>X.current(De))},[c]);(0,x.useEffect)(()=>{if(ie===ue.current)return;if(c<=0){le(ie);return}const ge=window.setTimeout(()=>{ie!==ue.current&&le(ie)},c);return()=>window.clearTimeout(ge)},[c,le,ie]);const Ae=(0,x.useCallback)(ge=>ee.find(Oe=>Oe.key===ge.toLowerCase())??null,[ee]),de=(0,x.useMemo)(()=>{if(U){if(U.kind==="text")return[];const De=_.trim().replace(/"/g,"").toLowerCase();return o9(Pk(U.key,s,l),De)}const{token:ge}=jh(_);if(ge.includes(":")||ge.startsWith('"'))return[];const Oe=ge.toLowerCase();return ee.filter(De=>!Oe||De.key.startsWith(Oe)||De.label.toLowerCase().startsWith(Oe)).map(De=>({id:De.key,label:De.label,description:De.description,field:De}))},[s,_,ee,l,U]),we=B&&de.length>0;(0,x.useEffect)(()=>{V(U&&U.kind==="picker"?0:-1)},[U,_]);const ye=r(()=>C.current?.focus(),"focusInput"),Me=r((ge,Oe)=>{E(Oe.trim()),K(ge),D(""),O(!0),ye()},"startField"),he=r(()=>{K(null),D(z?`${z} `:""),E("")},"releaseHeldText"),ve=r((ge,Oe=!0)=>{R(De=>[...De,ge]),he(),O(Oe),ye()},"commitToken"),et=r((ge,Oe=!0)=>{if(ge.field){Me(ge.field,_.slice(0,jh(_).start));return}ge.token&&ve(ge.token,Oe)},"selectOption"),$e=r(ge=>{const Oe=/\s$/.test(ge);if(Oe&&O(!0),U){D(ge);return}const{start:De,token:ut}=jh(ge),Ht=/^([a-zA-Z]+):$/.exec(ut),Vt=Ht?Ae(Ht[1]):null;if(Vt){Me(Vt,ge.slice(0,De));return}const gt=uc(ge,l,!Oe);if(gt.tokens.length>0){R(un=>[...un,...gt.tokens]),D(gt.text&&Oe?`${gt.text} `:gt.text);return}D(ge)},"handleDraftChange"),Ie=r(ge=>{R(Oe=>Oe.filter((De,ut)=>ut!==ge)),ye()},"removeToken"),ct=r(()=>{if(!U)return!1;const ge=_.trim();if(!ge)return!1;if(U.kind==="text")return ve(Hr(U.key,ge)),!0;const Oe=ge.toLowerCase(),De=Pk(U.key,s,l).find(ut=>ut.label.toLowerCase()===Oe||ut.id.toLowerCase()===Oe)??(we&&Q>=0?de[Q]:void 0)??(de.length===1?de[0]:void 0);return De?.token?(ve(De.token),!0):!1},"commitPendingDraft"),He=r(ge=>{const Oe=ge.nativeEvent.isComposing;if(!Oe&&ge.key==="Tab"&&!ge.shiftKey&&(U||we)){if(ge.preventDefault(),ct())return;if(!U&&we&&Q>=0&&de[Q]){et(de[Q]);return}U||O(!1);return}if(!Oe&&ge.key==="ArrowDown"){if(ge.preventDefault(),!B){O(!0);return}de.length>0&&V(De=>(De+1)%de.length);return}if(!Oe&&ge.key==="ArrowUp"&&we){ge.preventDefault(),V(De=>De<=0?de.length-1:De-1);return}if(!Oe&&ge.key==="Enter"){if(we&&Q>=0&&de[Q]){ge.preventDefault(),et(de[Q],!1);return}let De=ie;if(U?.kind==="text"&&_.trim()){const ut=Hr(U.key,_.trim());ve(ut,!1),De=Vh([...M,ut],null,z)}else if(!U){const ut=uc(_,l);ut.tokens.length>0&&(R([...M,...ut.tokens]),D(ut.text),De=Vh([...M,...ut.tokens],null,ut.text))}De!==ue.current&&le(De),O(!1)}if(!Oe&&ge.key==="Escape"&&we&&(O(!1),_.length>0||U)){ge.preventDefault();return}if(!Oe&&ge.key==="Escape"&&v&&ie.length>0){ge.preventDefault(),R([]),K(null),E(""),D(""),ue.current="",X.current({raw:"",q:"",filters:{}});return}if(!Oe&&ge.key==="Backspace"&&ge.currentTarget.selectionStart===0&&ge.currentTarget.selectionEnd===0){if(U){ge.preventDefault(),he();return}if(M.length>0){ge.preventDefault(),R(De=>De.slice(0,-1));return}}N?.(ge)},"handleKeyDown"),vt=M.map(ge=>uP(ge,s)),Jt=U?U.kind==="text"?`${U.label}: type text, Tab or Enter to add`:`Pick ${U.label.toLowerCase()}…`:M.length>0?"":u;return(0,a.jsxs)("div",{className:Y("relative",f),"data-testid":"scoped-search",children:[(0,a.jsxs)("div",{className:Y("flex h-8 w-full min-w-0 items-center gap-1 overflow-x-auto rounded-md border border-line-strong bg-transparent pl-7 pr-1 shadow-xs focus-within:border-focus focus-within:ring-(length:--rad-3) focus-within:ring-focus/50 dark:bg-line-strong/30",h),onMouseDown:r(ge=>{ge.target===ge.currentTarget&&(ge.preventDefault(),ye())},"onMouseDown"),children:[(0,a.jsx)(pr,{className:"pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-ink-3"}),vt.map((ge,Oe)=>(0,a.jsxs)(Dn,{variant:"secondary",className:"max-w-56 gap-1 pr-0.5 font-normal","data-testid":"scoped-search-pill",children:[(0,a.jsx)("span",{className:"truncate",children:ge.label}),(0,a.jsx)("button",{type:"button",className:"rounded-full p-0.5 hover:bg-bg/60","aria-label":`Remove ${ge.label}`,onMouseDown:r(De=>De.preventDefault(),"onMouseDown"),onClick:r(()=>Ie(Oe),"onClick"),children:(0,a.jsx)(ia,{className:"h-3 w-3"})})]},`${M[Oe]}:${Oe}`)),U?(0,a.jsxs)(Dn,{variant:"outline",className:"gap-1 pr-0.5 font-normal","data-testid":"scoped-search-pending-field",children:[(0,a.jsxs)("span",{children:[U.key,":"]}),(0,a.jsx)("button",{type:"button",className:"rounded-full p-0.5 hover:bg-bg-3","aria-label":`Remove ${U.label} field`,onMouseDown:r(ge=>ge.preventDefault(),"onMouseDown"),onClick:r(()=>{he(),ye()},"onClick"),children:(0,a.jsx)(ia,{className:"h-3 w-3"})})]}):null,(0,a.jsx)("input",{ref:r(ge=>{C.current=ge,l9(y,ge)},"ref"),role:"combobox","aria-label":p,"aria-expanded":we,"aria-controls":I,"aria-autocomplete":"list","aria-activedescendant":we&&Q>=0?`${I}-${Q}`:void 0,autoFocus:j,value:_,placeholder:Jt,"data-page-search-target":k?"true":void 0,className:Y("h-full min-w-24 flex-1 bg-transparent text-base outline-none placeholder:text-ink-3 md:text-sm",g),onChange:r(ge=>$e(ge.target.value),"onChange"),onFocus:r(()=>O(!0),"onFocus"),onBlur:r(()=>O(!1),"onBlur"),onKeyDown:He}),S]}),we?(0,a.jsx)("div",{id:I,role:"listbox","aria-label":U?`${U.label} values`:"Search fields",className:"absolute left-0 top-full z-50 mt-1 max-h-64 w-full min-w-56 overflow-y-auto rounded-md border border-line bg-bg-2 p-1 text-ink shadow-md","data-testid":"scoped-search-options",children:de.map((ge,Oe)=>(0,a.jsxs)("div",{id:`${I}-${Oe}`,role:"option","aria-selected":Oe===Q,className:Y("flex cursor-pointer items-center justify-between gap-3 rounded-sm px-2 py-1.5 text-sm",Oe===Q?"bg-bg-3 text-ink":"hover:bg-bg-3/50"),onMouseDown:r(De=>De.preventDefault(),"onMouseDown"),onMouseEnter:r(()=>V(Oe),"onMouseEnter"),onClick:r(()=>et(ge),"onClick"),children:[(0,a.jsx)("span",{className:"truncate",children:ge.label}),ge.description?(0,a.jsx)("span",{className:"hidden truncate text-xs text-ink-3 sm:inline",children:ge.description}):null]},ge.id))}):null]})}r(c9,"ScopedSearchInput");function g2(e){if(e.length<=1)return[...e];const t=r((v,y)=>{const j=$k(v.createdAt),k=$k(y.createdAt);return j!==k?j-k:v.id<y.id?-1:v.id>y.id?1:0},"tieBreakAsc"),s=new Map;for(const v of e)s.set(v.id,v);const l=new Map,c=new Map;for(const v of e)l.set(v.id,[]),c.set(v.id,0);for(const v of e){const y=new Set;for(const j of v.blockedBy??[])!j||!s.has(j.id)||j.id!==v.id&&(y.has(j.id)||(y.add(j.id),l.get(j.id).push(v.id),c.set(v.id,(c.get(v.id)??0)+1)))}for(const v of l.values())v.sort((y,j)=>t(s.get(y),s.get(j)));const u=[];for(const v of e)c.get(v.id)===0&&u.push(v);u.sort(t);const p=new Set,f=[],h=r(v=>{let y=0,j=u.length;for(;y<j;){const k=y+j>>>1;t(u[k],v)<=0?y=k+1:j=k}u.splice(y,0,v)},"insertReady"),g=r(v=>{for(const y of l.get(v)??[]){if(p.has(y))continue;const j=(c.get(y)??0)-1;if(c.set(y,j),j===0){const k=s.get(y);k&&h(k)}}},"releaseSuccessors");for(;u.length>0;){let v=u.shift();for(;v&&!p.has(v.id);){f.push(v),p.add(v.id),g(v.id);const y=l.get(v.id)??[];if(y.length!==1)break;const j=y[0];if(p.has(j)||(c.get(j)??0)!==0)break;const k=u.findIndex(S=>S.id===j);if(k<0)break;[v]=u.splice(k,1)}}return p.size<e.length?[...e].sort(t):f}r(g2,"workflowSort");function $k(e){if(!e)return 0;const t=e instanceof Date?e.getTime():new Date(e).getTime();return Number.isFinite(t)?t:0}r($k,"toTimestamp");var u9=2;function d9(e,t){return e===!0&&t>=u9}r(d9,"shouldRenderSubIssueProgressSummary");function f9(e){const t={},s=e.filter(f=>f.status!=="cancelled");for(const f of s)t[f.status]=(t[f.status]??0)+1;const l=g2(s),c=l.find(f=>p9(f.status))??null,u=l.filter(f=>!m9(f.status)),p=c===null&&u.length>0&&u.every(f=>f.status==="blocked")?u[0]:null;return{totalCount:s.length,doneCount:t.done??0,inProgressCount:t.in_progress??0,blockedCount:t.blocked??0,countsByStatus:t,target:c?{issue:c,kind:"next"}:p?{issue:p,kind:"blocked"}:null}}r(f9,"buildSubIssueProgressSummary");function p9(e){return e!=="done"&&e!=="cancelled"&&e!=="blocked"}r(p9,"isActionableStatus");function m9(e){return e==="done"||e==="cancelled"}r(m9,"isTerminalStatus");function Gl(e,t){const s={};for(const l of e){const c=t(l);s[c]||(s[c]=[]),s[c].push(l)}return s}r(Gl,"groupBy");function h9(e){return e==="queued"||e==="running"}r(h9,"isLiveRunStatus");var g9=new Set(["done","cancelled"]);function o0(e){return g9.has(e)}r(o0,"isTerminalIssueStatus");function mo(e,t){return h9(e.status)&&!o0(t)}r(mo,"isLiveIssueRun");function x9(e){const t=new Map;for(const s of e??[]){const l={status:s.status,updatedAtMs:b9(s.updatedAt)},c=t.get(s.id);(!c||v9(c,l))&&t.set(s.id,l)}return new Map([...t].map(([s,l])=>[s,l.status]))}r(x9,"collectIssueStatusById");function b9(e){if(e==null)return null;const t=e instanceof Date?e.getTime():new Date(e).getTime();return Number.isFinite(t)?t:null}r(b9,"issueUpdatedAtMs");function v9(e,t){if(t.updatedAtMs!==null&&e.updatedAtMs!==null){if(t.updatedAtMs!==e.updatedAtMs)return t.updatedAtMs>e.updatedAtMs}else{if(t.updatedAtMs!==null)return!0;if(e.updatedAtMs!==null)return!1}return!o0(e.status)&&o0(t.status)}r(v9,"shouldReplaceIssueStatusSnapshot");function y9(e,t){const s=new Set,l=x9(t);for(const c of e??[])c.issueId&&mo(c,l.get(c.issueId))&&s.add(c.issueId);return s}r(y9,"collectLiveIssueIds");function x2(e,t){const s=new Map;if(!e||e.length===0||t.size===0)return s;const l=new Map;for(const c of e)l.set(c.id,c.parentId);for(const c of t){if(!l.has(c))continue;const u=new Set([c]);let p=l.get(c)??null;for(;p&&!u.has(p);)u.add(p),s.set(p,(s.get(p)??0)+1),p=l.get(p)??null}return s}r(x2,"collectSubtreeLiveCounts");function j9(e){return(0,a.jsxs)("svg",{viewBox:"0 0 180 180",fill:"none",stroke:"currentColor",strokeWidth:14,strokeLinecap:"round",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,a.jsx)("path",{d:"M18 84.8528L85.8822 16.9706C95.2548 7.59798 110.451 7.59798 119.823 16.9706C129.196 26.3431 129.196 41.5391 119.823 50.9117L68.5581 102.177"}),(0,a.jsx)("path",{d:"M69.2652 101.47L119.823 50.9117C129.196 41.5391 144.392 41.5391 153.765 50.9117L154.118 51.2652C163.491 60.6378 163.491 75.8338 154.118 85.2063L92.7248 146.6C89.6006 149.724 89.6006 154.789 92.7248 157.913L105.331 170.52"}),(0,a.jsx)("path",{d:"M102.853 33.9411L52.6482 84.1457C43.2756 93.5183 43.2756 108.714 52.6482 118.087C62.0208 127.459 77.2167 127.459 86.5893 118.087L136.794 67.8822"})]})}r(j9,"McpIcon");var w9=new Set(["tool","tool call","tool_call","acp_tool"]);function Kd(e){const t=(e??"").trim().toLowerCase().replace(/\s*\((?:pending|in[_ -]?progress|completed|failed|cancelled|canceled)\)$/,"");return!t||w9.has(t)}r(Kd,"isGenericToolName");function b2(e){const t=e.match(/^mcp__(.+?)__(.+)$/i);if(t)return{namespace:t[1],name:t[2]};const s=e.match(/^mcp\.([^.]+)\.(.+)$/i);return s?{namespace:s[1],name:s[2]}:null}r(b2,"mcpToolIdentity");function Nx(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/[^A-Za-z0-9]+/g," ").trim().toLowerCase().split(/\s+/).filter(Boolean)}r(Nx,"identifierWords");function v2(e){if(e.length===0)return"";const t=e.map(s=>["api","id","lsp","mcp","pr","url"].includes(s)?s.toUpperCase():s).join(" ");return t.charAt(0).toUpperCase()+t.slice(1)}r(v2,"sentenceCase");function Uk(e){const t=(e??"").trim();return Kd(t)?"Unnamed tool":v2(Nx(b2(t)?.name??t))}r(Uk,"humanizeToolName");var va=r((e,t,s)=>({key:e,singular:t,plural:s}),"group"),k9={bash:{action:"run"},terminal:{action:"run"},shell:{action:"run"},command:{action:"run"},run:{action:"run"},execute:{action:"run"},exec_command:{action:"run"},apply_patch:{action:"update",running:"Applying a patch",completed:"Applied a patch"},read:{action:"read",running:"Reading a file",completed:"Read a file"},write:{action:"update",running:"Writing a file",completed:"Wrote a file"},edit:{action:"update",running:"Editing a file",completed:"Edited a file"},notebook_read:{action:"read",running:"Reading a notebook",completed:"Read a notebook"},notebook_edit:{action:"update",running:"Editing a notebook",completed:"Edited a notebook"},glob:{action:"search",running:"Searching files",completed:"Searched files"},grep:{action:"search",running:"Searching file contents",completed:"Searched file contents",family:"grep"},tool_search:{action:"search",running:"Searching available tools",completed:"Searched available tools",group:va("tool_search","tool search","tool searches")},web_search:{action:"search",running:"Searching the web",completed:"Searched the web",family:"web"},web_fetch:{action:"fetch",running:"Fetching a web page",completed:"Fetched a web page",family:"web"},todo_write:{action:"update",running:"Updating the task list",completed:"Updated the task list",family:"plan",group:va("task_operation","task operation","task operations")},task_create:{action:"create",running:"Creating a task",completed:"Created a task",family:"plan",group:va("task_operation","task operation","task operations")},task_update:{action:"update",running:"Updating a task",completed:"Updated a task",family:"plan",group:va("task_operation","task operation","task operations")},task_list:{action:"list",running:"Listing tasks",completed:"Listed tasks",family:"plan",group:va("task_operation","task operation","task operations")},task_get:{action:"read",running:"Reading a task",completed:"Read a task",family:"plan",group:va("task_operation","task operation","task operations")},enter_plan_mode:{action:"switch",running:"Entering plan mode",completed:"Entered plan mode",family:"plan"},exit_plan_mode:{action:"switch",running:"Leaving plan mode",completed:"Left plan mode",family:"plan"},skill:{action:"read",running:"Loading a skill",completed:"Loaded a skill"},ask_user_question:{action:"request",running:"Requesting input",completed:"Requested input",family:"question"},request_human_input:{action:"request",running:"Requesting input",completed:"Requested input",family:"question",group:va("task_operation","task operation","task operations")},agent:{action:"start",running:"Starting a subagent",completed:"Started a subagent",family:"agent"},task:{action:"start",running:"Starting a subagent",completed:"Started a subagent",family:"agent"},task_output:{action:"read",running:"Checking subagent progress",completed:"Checked subagent progress",family:"agent"},task_stop:{action:"stop",running:"Stopping a subagent",completed:"Stopped a subagent",family:"agent"},send_message:{action:"post",running:"Messaging a subagent",completed:"Messaged a subagent",family:"agent"},spawn_agent:{action:"start",running:"Starting a subagent",completed:"Started a subagent",family:"agent"},wait_agent:{action:"wait",running:"Checking subagent progress",completed:"Checked subagent progress",family:"agent"},wait_threads:{action:"wait",running:"Checking task progress",completed:"Checked task progress",family:"agent"},interrupt_agent:{action:"stop",running:"Interrupting a subagent",completed:"Interrupted a subagent",family:"agent"},report_findings:{action:"post",running:"Reporting findings",completed:"Reported findings",family:"safety"},guardian_review:{action:"think",running:"Reviewing safety",completed:"Reviewed safety",family:"safety"},lsp:{action:"read",running:"Inspecting code intelligence",completed:"Inspected code intelligence"},compact_conversation:{action:"think",running:"Compacting context",completed:"Compacted context"},image_generation:{action:"create",running:"Generating an image",completed:"Generated an image",family:"image"},view_image:{action:"read",running:"Viewing an image",completed:"Viewed an image",family:"image"},multi_tool_use_parallel:{action:"run",running:"Running tools in parallel",completed:"Ran tools in parallel"},get_task_context:{action:"read",running:"Reading task context",completed:"Read task context"},get_task_history:{action:"read",running:"Reading task history",completed:"Read task history"},list_documents:{action:"list",running:"Listing documents",completed:"Listed documents"},read_document:{action:"read",running:"Reading a document",completed:"Read a document"},list_document_revisions:{action:"list",running:"Listing document revisions",completed:"Listed document revisions"},report_progress:{action:"post",running:"Reporting progress",completed:"Reported progress"},answer_status_question:{action:"post",running:"Answering a status question",completed:"Answered a status question"},write_document:{action:"update",running:"Writing a document",completed:"Wrote a document"},register_deliverable:{action:"create",running:"Registering a deliverable",completed:"Registered a deliverable"},finish_task:{action:"finish",running:"Reporting completion",completed:"Reported completion"},wardmote_finish:{action:"finish",running:"Reporting completion",completed:"Reported completion"},block_task:{action:"block",running:"Reporting a blocker",completed:"Reported a blocker"},wardmote_block:{action:"block",running:"Reporting a blocker",completed:"Reported a blocker"},request_review:{action:"request",running:"Requesting review",completed:"Requested review"},list_agents:{action:"list",running:"Listing agents",completed:"Listed agents"},get_agent:{action:"read",running:"Reading agent details",completed:"Read agent details"},search_tasks:{action:"search",running:"Searching tasks",completed:"Searched tasks"},list_approvals:{action:"list",running:"Listing approvals",completed:"Listed approvals"},get_approval:{action:"read",running:"Reading an approval",completed:"Read an approval"},get_approval_context:{action:"read",running:"Reading approval context",completed:"Read approval context"},get_workspace_runtime:{action:"read",running:"Reading workspace status",completed:"Read workspace status"},control_workspace_service:{action:"run",running:"Controlling a workspace service",completed:"Controlled a workspace service"},set_dependencies:{action:"update",running:"Updating task dependencies",completed:"Updated task dependencies"},set_task_title:{action:"update",running:"Naming the task",completed:"Named the task"},create_task:{action:"create",running:"Creating a task",completed:"Created a task"},request_approval:{action:"request",running:"Requesting approval",completed:"Requested approval"},decide_approval:{action:"update",running:"Deciding an approval",completed:"Decided an approval"},comment_on_approval:{action:"post",running:"Commenting on an approval",completed:"Commented on an approval"},schedule_wake:{action:"create",running:"Scheduling a wake-up",completed:"Scheduled a wake-up",family:"wait"},generic_api_request:{action:"request",running:"Calling the Wardmote API",completed:"Called the Wardmote API"}},S9={read:["get","read","inspect","view"],list:["list","glob"],search:["find","search","grep","query","lookup"],fetch:["fetch","browse"],open:["open"],update:["write","edit","update","set","patch","upsert","sync"],create:["create","add","register","upload"],delete:["delete","remove"],move:["move","rename"],run:["run","execute","bash","shell","command"],request:["request","ask","prompt"],post:["send","message","comment","report","answer"],start:["start","spawn","delegate"],stop:["stop","cancel","interrupt"],wait:["wait","sleep","poll"],finish:["finish","complete"],block:["block"],think:["think","reason","compact","review"],switch:["switch","enter","exit"],other:[]},N9={read:"read",edit:"update",delete:"delete",move:"move",search:"search",list:"list",execute:"run",think:"think",fetch:"fetch",switch_mode:"switch"};function C9(e){return Nx(e).join("_")}r(C9,"normalizedKey");function A9(e){const t=e[0];if(!t)return null;for(const[s,l]of Object.entries(S9))if(l.includes(t))return s;return null}r(A9,"inferredAction");function _9(e){return e==="run"?"terminal":e==="read"||e==="list"?"read":e==="search"?"search":e==="fetch"||e==="open"?"web":["update","create","delete","move"].includes(e)?"edit":e==="request"?"question":e==="start"||e==="stop"?"agent":e==="wait"?"wait":"other"}r(_9,"actionFamily");var E9={terminal:QS,grep:IR,search:pr,read:MS,edit:pR,web:cR,plan:O1,question:sg,agent:HS,safety:Cc,image:yR,wait:b1,mcp:j9,other:If};function I9(e,t){const s=t?` ${t}`:"";switch(e){case"read":return{running:`Reading${s||" data"}`,completed:`Read${s||" data"}`};case"list":return{running:`Listing${s||" items"}`,completed:`Listed${s||" items"}`};case"search":return{running:`Searching${s||""}`,completed:`Searched${s||""}`};case"fetch":return{running:`Fetching${s||" data"}`,completed:`Fetched${s||" data"}`};case"open":return{running:`Opening${s||" an item"}`,completed:`Opened${s||" an item"}`};case"update":return{running:`Updating${s||" data"}`,completed:`Updated${s||" data"}`};case"create":return{running:`Creating${s||" an item"}`,completed:`Created${s||" an item"}`};case"delete":return{running:`Deleting${s||" an item"}`,completed:`Deleted${s||" an item"}`};case"move":return{running:`Moving${s||" an item"}`,completed:`Moved${s||" an item"}`};case"run":return{running:"Running a command",completed:"Ran a command"};case"request":return{running:`Requesting${s||" input"}`,completed:`Requested${s||" input"}`};case"post":return{running:`Posting${s||" an update"}`,completed:`Posted${s||" an update"}`};case"start":return{running:`Starting${s||" an operation"}`,completed:`Started${s||" an operation"}`};case"stop":return{running:`Stopping${s||" an operation"}`,completed:`Stopped${s||" an operation"}`};case"wait":return{running:"Waiting",completed:"Finished waiting"};case"finish":return{running:"Reporting completion",completed:"Reported completion"};case"block":return{running:"Reporting a blocker",completed:"Reported a blocker"};case"think":return{running:"Thinking",completed:"Finished thinking"};case"switch":return{running:`Switching${s||" mode"}`,completed:`Switched${s||" mode"}`};case"other":return{running:"Running",completed:"Ran"}}}r(I9,"actionCopy");function T9(e){switch(e){case"run":return va("command","command","commands");case"read":case"list":return va("read","read","reads");case"search":return va("search","search","searches");case"update":case"create":case"delete":case"move":return va("file_change","file change","file changes");case"start":case"stop":return va("delegation","delegation","delegations");case"wait":return va("wait","wait","waits");default:return va("tool_action","tool action","tool actions")}}r(T9,"defaultSummaryGroup");function R9(e){return e==="read"||e==="list"?va("wardmote_read","Wardmote read","Wardmote reads"):va("task_operation","task operation","task operations")}r(R9,"wardmoteSummaryGroup");function M9(e){const t=(e.name??"").trim(),s=b2(t),l=(e.namespace??s?.namespace??"").trim(),c=(s?"mcp":e.transport??"builtin").toLowerCase(),u=(s?.name??t).trim(),p=Nx(u),f=C9(u),h=k9[f],g=N9[(e.operation??"").trim().toLowerCase()],v=A9(p),y=h?.action??g??v??"other",j=h?"exact":g?"kind":v?"inferred":Kd(u)?"unnamed":"fallback",k=Kd(u)?"Unnamed tool":Uk(u),S=/^[A-Za-z][A-Za-z0-9_.:-]*$/.test(u),N=v&&S&&p.length>1?p.slice(1):[],I=N.length?v2(N).replace(/^./,U=>U.toLowerCase()):void 0,C=h?.running&&h.completed?{running:h.running,completed:h.completed}:y==="other"?Kd(u)?{running:"Running an unnamed tool",completed:"Ran an unnamed tool"}:{running:`Running ${k}`,completed:`Ran ${k}`}:I9(y,h?void 0:I),M=h?.family??_9(y),R=c==="mcp"?"mcp":M,_=l?Uk(l):c==="mcp"?"MCP":void 0,D=l.toLowerCase()==="wardmote"?R9(y):h?.group??T9(y);return{icon:E9[R],family:R,runningLabel:C.running,completedLabel:C.completed,failedLabel:`${C.completed} · failed`,interruptedLabel:`${C.running} · stopped`,displayName:k,sourceLabel:_,technicalName:t||void 0,confidence:j,summaryGroup:D}}r(M9,"toolActivityPresentation");function Bk(e){const t=M9({name:e});return{family:t.family,icon:t.icon,verbLabel:t.runningLabel}}r(Bk,"toolTaxonomy");function D9(e){const t=(e??"").trim().toLowerCase();return t==="thinking"?mI:t==="responding"||t.startsWith("responding (")?SR:null}r(D9,"statusLabelIcon");var c0=6e4,u0=12e4,y2=9e5,Sf={paused:-2,pausing:-1,active:0,thinking:1,starting:2,quiet:3,stalled:4,pause_failed:5},ZY={starting:"loading",active:"working",thinking:"thinking",quiet:"sleepy",stalled:"confused",pausing:"loading",paused:"sleepy",pause_failed:"confused"},O9={pausing:"Pausing",paused:"Paused",pause_failed:"Pause failed"};function L9(e){return{health:e,label:O9[e],silentMs:null}}r(L9,"pauseSignal");function Cx(e){if(!e)return null;const t=new Date(e).getTime();return Number.isFinite(t)?t:null}r(Cx,"toMs");function j2(e){let t=null;for(const s of[e.lastEventAt,e.currentStatusUpdatedAt,e.outputSilence?.lastOutputAt,e.lastUsefulActionAt]){const l=Cx(s);l!==null&&(t===null||l>t)&&(t=l)}return t}r(j2,"lastLiveActivityMs");function Kk(e){const t=Math.floor(e/6e4);if(t<1)return`${Math.max(0,Math.floor(e/1e3))}s`;if(t<60)return`${t}m`;const s=Math.floor(t/60),l=t%60;return l>0?`${s}h ${l}m`:`${s}h`}r(Kk,"formatSilence");function z9(e){return!!e.currentToolName&&!/^finished\b/i.test(e.currentStatusMessage??"")}r(z9,"toolInFlight");function Ax(e,t){const s=Cx(e.startedAt);if(s===null||e.status==="queued"||e.status==="scheduled_retry")return{health:"starting",label:"Queued",silentMs:null};const l=j2(e);if(l===null&&t-s<c0)return{health:"starting",label:"Starting",silentMs:null};const c=Math.max(0,t-(l??s)),u=e.outputSilence?.level,p=e.outputSilence?.criticalThresholdMs||y2;return u==="critical"||u!=="snoozed"&&c>=p?{health:"stalled",label:`Stalled ${Kk(c)}`,silentMs:c}:u==="suspicious"||c>=u0?{health:"quiet",label:`Quiet ${Kk(c)}`,silentMs:c}:z9(e)?{health:"active",label:"Working",silentMs:c}:{health:"thinking",label:"Thinking",silentMs:c}}r(Ax,"classifyLiveNowHealth");function P9(e,t){const s=Cx(e.startedAt);if(s===null||e.status==="queued"||e.status==="scheduled_retry")return null;const l=j2(e);if(l===null&&t-s<c0)return s+c0;const c=l??s,u=Math.max(0,t-c),p=e.outputSilence?.level;if(u<6e4&&(p==="suspicious"||p==="critical"))return c+(Math.floor(u/1e3)+1)*1e3;if(u<u0)return c+u0;const f=c+(Math.floor(u/6e4)+1)*6e4,h=c+(e.outputSilence?.criticalThresholdMs||y2);return h>t?Math.min(f,h):f}r(P9,"nextLiveNowHealthChangeMs");function w2(e){return e==="paused"?"paused":e==="stalled"||e==="quiet"||e==="pause_failed"?"attention":"working"}r(w2,"liveNowGroupOf");function k2(e,t){return Sf[t]-Sf[e]}r(k2,"compareLiveNowSeverity");function S2(e){return e.reduce((t,s)=>Sf[s.health]>Sf[t.health]?s:t)}r(S2,"mostSevereSignal");function JY(e){const t=e.currentToolName?.trim()||null,s=(e.currentStatusMessage?.trim()||null)??(t?Bk(t).verbLabel:null);return s?{icon:t?Bk(t).icon:D9(s)??Mf,text:s}:null}r(JY,"describeLiveActivity");var $9=3e4,U9=[];function Wh(e){return e.startedAt??e.createdAt}r(Wh,"runStartAt");function ho(e){const t=new Date(e).getTime();return Number.isFinite(t)?t:0}r(ho,"timestampMs");function N2(e,t){const s=new Map;for(const c of e??[]){if(!c.issueId||!mo(c,t.get(c.issueId)))continue;const u=s.get(c.issueId);u?u.push(c):s.set(c.issueId,[c])}const l=[];for(const[c,u]of s)l.push({issueId:c,...C2(u)});return l.sort((c,u)=>ho(u.latestStartAt)-ho(c.latestStartAt))}r(N2,"buildLiveNowEntries");function C2(e){e.sort((s,l)=>ho(Wh(l))-ho(Wh(s)));const t=e.filter(s=>s.startedAt!==null);return{runs:e,latestStartAt:Wh(e[0]),earliestStartedAt:t.length>0?t[t.length-1].startedAt:null}}r(C2,"toRunSet");function B9(e,t){return(e??[]).filter(s=>!s.issueId&&mo(s)).map(s=>{const l=Ax(s,t);return{entry:C2([s]),signal:l,group:w2(l.health)}}).sort((s,l)=>ho(l.entry.latestStartAt)-ho(s.entry.latestStartAt)).sort((s,l)=>s.group!==l.group?s.group==="attention"?-1:1:s.group==="attention"?k2(s.signal.health,l.signal.health):0)}r(B9,"buildLiveNowHeartbeats");function K9(e,t,s){const l=[],c=new Set;let u=e?.parentId??null,p=!1;for(;u&&!c.has(u);){c.add(u);const f=t.get(u);if(!f){p=!0;break}l.push({id:f.id,identifier:f.identifier??null,title:f.title}),u=f.parentId??null}return p?s?{ancestors:[...s].reverse().map(({id:f,identifier:h,title:g})=>({id:f,identifier:h,title:g})),complete:!0}:{ancestors:l.reverse(),complete:!1}:{ancestors:l.reverse(),complete:!0}}r(K9,"resolveLiveNowParentPath");function q9(e,t,s,l=new Map){const c=e.map((u,p)=>{const f=t(u.issueId),h=l.get(u.issueId)??null,g=h?L9(h.state):S2(u.runs.map(v=>Ax(v,s)));return{order:p,item:{entry:u,issue:f,identifier:f?.identifier??u.issueId.slice(0,8),signal:g,group:w2(g.health),pause:h}}});return c.sort((u,p)=>{if(u.item.group!==p.item.group)return u.item.group==="attention"?-1:1;if(u.item.group==="attention"){const f=k2(u.item.signal.health,p.item.signal.health);if(f!==0)return f}return u.order-p.order}),c.map(({item:u})=>u)}r(q9,"buildLiveNowItems");function A2(e){const[t,s]=(0,x.useState)(0);return(0,x.useEffect)(()=>{const l=Date.now();let c=null;for(const p of e){const f=P9(p,l);f!==null&&(c===null||f<c)&&(c=f)}if(c===null)return;const u=window.setTimeout(()=>s(p=>p+1),Math.max(0,c-l)+50);return()=>window.clearTimeout(u)},[e,t]),Date.now()}r(A2,"useLiveNowClock");function eX(e,t,s=U9){const l=(0,x.useMemo)(()=>new Map(t.map(C=>[C.id,C])),[t]),c=(0,x.useMemo)(()=>{const C=new Set;for(const M of e??[]){if(!M.issueId||C.has(M.issueId)||!mo(M))continue;const R=l.get(M.issueId);(!R||!K9(R,l).complete)&&C.add(M.issueId)}return[...C]},[e,l]),u=Ef({queries:c.map(C=>({queryKey:$.issues.detail(C),queryFn:r(()=>cn.get(C),"queryFn"),staleTime:$9,retry:!1}))}),{detailById:p,failedIds:f}=(0,x.useMemo)(()=>{const C=new Map,M=new Set;return u.forEach((R,_)=>{const D=c[_];R.data?C.set(D,R.data):R.isError&&M.add(D)}),{detailById:C,failedIds:M}},[c,u]),h=(0,x.useMemo)(()=>{const C=new Map;for(const M of e??[]){if(!M.issueId)continue;const R=l.get(M.issueId)?.status??p.get(M.issueId)?.status;R&&C.set(M.issueId,R)}return N2(e,C)},[p,e,l]),g=(0,x.useMemo)(()=>(e??[]).filter(C=>!C.issueId&&mo(C)),[e]),v=A2((0,x.useMemo)(()=>[...h.flatMap(C=>C.runs),...g],[h,g])),y=B9(g,v),j=(0,x.useMemo)(()=>new Map(s.map(C=>[C.issueId,C])),[s]),k=r(C=>l.get(C)??p.get(C)??null,"issueById"),S=h.filter(C=>j.get(C.issueId)?.state!=="paused"),N=q9(S,k,v,j),I=new Set(S.map(C=>C.issueId));return{items:N,heartbeats:y,pausedItems:s.filter(C=>!I.has(C.issueId)).map(C=>({pause:C,issue:k(C.issueId),identifier:C.identifier??C.issueId.slice(0,8)})),loadedById:l,detailById:p,failedIds:f,now:v}}r(eX,"useLiveNowModel");var F9=["assignee","kickedOffBy","project","workspace","parent","labels","updated"],H9={status:"Status",id:"ID",assignee:"Responsible",kickedOffBy:"Kicked off by",project:"Project",workspace:"Workspace",parent:"Parent task",labels:"Tags",updated:"Last updated"},V9={status:"Task state chip on the left edge.",id:"Ticket identifier like PAP-1009.",assignee:"Responsible agent or board user.",kickedOffBy:"Board user or agent who created the task.",project:"Linked project pill with its color.",workspace:"Execution or project workspace used for the task.",parent:"Parent task identifier and title.",labels:"Task labels and tags.",updated:"Latest visible activity time."};function W9(e,t="legacy"){return e==="id"&&t==="task"?"Task identifier like PAP-1009 on the trailing edge.":e==="status"&&t==="task"?"Task state icon on the leading edge.":V9[e]}r(W9,"issueColumnDescription");function Nf(e){return vI(e.lastActivityAt??e.lastExternalCommentAt??e.updatedAt)}r(Nf,"issueActivityTimestamp");function Q9(e){return`Updated ${Nf(e)}`}r(Q9,"issueActivityText");function G9(e){return e.map(t=>t==="assignee"||t==="kickedOffBy"?"minmax(6rem, 8rem)":t==="project"?"minmax(4.5rem, 7rem)":t==="workspace"?"minmax(6rem, 9rem)":t==="parent"?"minmax(3.5rem, 5.5rem)":t==="labels"?"minmax(3rem, 6rem)":"minmax(3.5rem, 4.5rem)").join(" ")}r(G9,"issueTrailingGridTemplate");function Y9({availableColumns:e,visibleColumnSet:t,onToggleColumn:s,showDateGroupSeparators:l,onToggleDateGroupSeparators:c,onResetColumns:u,title:p,iconOnly:f=!1,rowPresentation:h="legacy"}){return(0,a.jsxs)(tl,{children:[(0,a.jsx)(Jr,{asChild:!0,children:(0,a.jsxs)(oe,{type:"button",variant:f?"secondary":"ghost",size:f?"icon":"sm",className:f?"h-8 w-8 shrink-0":"hidden h-8 shrink-0 px-2 text-xs sm:inline-flex",title:"Columns",children:[(0,a.jsx)(s3,{className:f?"h-3.5 w-3.5":"mr-1 h-3.5 w-3.5"}),!f&&"Columns"]})}),(0,a.jsxs)(el,{align:"end",className:"w-(--sz-300px) rounded-xl border-line/70 p-1.5 shadow-xl shadow-black/10",children:[(0,a.jsx)(ES,{className:"px-2 pb-1 pt-1.5",children:(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("div",{className:"text-(length:--text-nano) font-semibold uppercase tracking-(--tracking-caps) text-ink-3",children:"Desktop task rows"}),(0,a.jsx)("div",{className:"text-sm font-medium text-ink",children:p})]})}),(0,a.jsx)(Ii,{}),e.map(g=>(0,a.jsx)(Fy,{checked:t.has(g),onSelect:r(v=>v.preventDefault(),"onSelect"),onCheckedChange:r(v=>s(g,v===!0),"onCheckedChange"),className:"items-start rounded-lg px-3 py-2.5 pl-8",children:(0,a.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-ink",children:H9[g]}),(0,a.jsx)("span",{className:"text-xs leading-relaxed text-ink-3",children:W9(g,h)})]})},g)),l!==void 0&&c?(0,a.jsx)(Fy,{checked:l,onSelect:r(g=>g.preventDefault(),"onSelect"),onCheckedChange:r(g=>c(g===!0),"onCheckedChange"),className:"items-start rounded-lg px-3 py-2.5 pl-8",children:(0,a.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-ink",children:"Date group separators"}),(0,a.jsx)("span",{className:"text-xs leading-relaxed text-ink-3",children:"Show Today, Yesterday, and Earlier rules on newest-first task lists."})]})}):null,(0,a.jsx)(Ii,{}),(0,a.jsxs)(Sn,{onSelect:u,className:"rounded-lg px-3 py-2 text-sm",children:["Reset defaults",(0,a.jsx)("span",{className:"ml-auto text-xs text-ink-3",children:"status, id, updated"})]})]})]})}r(Y9,"IssueColumnPicker");function X9(){return(0,a.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,a.jsx)("span",{className:"absolute inline-flex h-full w-full animate-pulse rounded-full bg-blue-400 opacity-75"}),(0,a.jsx)("span",{className:Y("relative inline-flex h-2 w-2 rounded-full","bg-blue-500")})]})}r(X9,"LiveRunDot");function Z9(){return(0,a.jsxs)(Dn,{variant:"ghost",className:Y("px-1.5 sm:gap-1.5 sm:px-2","bg-blue-500/10"),children:[(0,a.jsx)(X9,{}),(0,a.jsx)("span",{className:Y("hidden text-(length:--text-micro) font-medium sm:inline","text-blue-600 dark:text-blue-400"),children:"Live"})]})}r(Z9,"LiveRunBadge");function qk({issue:e,isLive:t,subtreeLiveCount:s=0,showSubtreeLiveChip:l=!0,showStatus:c=!0,showIdentifier:u=!0,statusSlot:p,checklistStepNumber:f=null}){return(0,a.jsxs)(a.Fragment,{children:[c?(0,a.jsx)("span",{className:"hidden shrink-0 items-center sm:inline-flex",children:p??(0,a.jsx)(ei,{status:e.status,externalConversationState:e.externalConversationState,blockerAttention:e.blockerAttention})}):null,f!==null?(0,a.jsxs)("span",{className:"shrink-0 font-mono text-xs text-ink-3","aria-hidden":"true",children:[f,"."]}):null,u?(0,a.jsx)("span",{className:"shrink-0 font-mono text-xs text-ink-3",children:e.identifier??e.id.slice(0,8)}):null,t&&(0,a.jsx)(Z9,{}),l&&!t&&s>0&&(0,a.jsxs)(Dn,{variant:"outline",className:Y("px-1.5 sm:gap-1.5 sm:px-2","border-line bg-transparent"),title:`${s} sub-task${s===1?"":"s"} running below`,children:[(0,a.jsx)("span",{className:Y("h-2 w-2 shrink-0 rounded-full border","border-ink-3/60 bg-transparent"),"aria-hidden":"true"}),(0,a.jsxs)("span",{className:"hidden text-(length:--text-micro) font-medium text-ink-3 sm:inline",children:[s," live below"]})]})]})}r(qk,"InboxIssueMetaLeading");function J9({issue:e,columns:t,projectName:s,projectColor:l,workspaceId:c,workspaceName:u,assigneeName:p,assigneeAgent:f,creatorAgent:h,assigneeUserName:g,assigneeUserAvatarUrl:v,creatorAgentName:y,creatorUserName:j,creatorUserAvatarUrl:k,viaAgentName:S,currentUserId:N,parentIdentifier:I,parentTitle:C,assigneeContent:M,onFilterWorkspace:R}){const _=Nf(e),D=g??Vr(e.assigneeUserId,N)??"User",U=cS(e),K=U?.kind==="user"?U.id:null,z=j??Vr(K,N)??"User";return(0,a.jsx)("span",{className:"grid items-center gap-2",style:{gridTemplateColumns:G9(t)},children:t.map(E=>{if(E==="assignee")return M?(0,a.jsx)("span",{className:"min-w-0",children:M},E):e.assigneeAgentId?(0,a.jsx)("span",{className:"min-w-0 text-xs text-ink",children:(0,a.jsx)(co,{agent:f??{id:e.assigneeAgentId,name:p??e.assigneeAgentId.slice(0,8)},size:"sm",className:"min-w-0"})},E):e.assigneeUserId?(0,a.jsx)("span",{className:"min-w-0 text-xs text-ink",children:(0,a.jsx)(og,{name:D,avatarUrl:v,size:"sm",className:"min-w-0"})},E):(0,a.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:"Unassigned"},E);if(E==="kickedOffBy"){if(U?.kind==="agent"){const B=y??U.id.slice(0,8);return(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)("span",{className:"min-w-0 text-xs text-ink",children:(0,a.jsx)(co,{agent:h??{id:U.id,name:B},size:"sm",className:"min-w-0"})})}),(0,a.jsx)(Ts,{side:"top",sideOffset:6,children:B})]},E)}if(U?.kind==="user"){const B=S?`${z} · via ${S}`:z;return(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)("span",{className:"min-w-0 text-xs text-ink",children:(0,a.jsx)(og,{name:z,avatarUrl:k,size:"sm",className:"min-w-0"})})}),(0,a.jsx)(Ts,{side:"top",sideOffset:6,children:B})]},E)}return(0,a.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:"Unknown"},E)}if(E==="project"){if(s){const B=l??"#64748b";return(0,a.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-2 text-xs font-medium",style:{color:aj(B,.12)},children:[(0,a.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full",style:{backgroundColor:B}}),(0,a.jsx)("span",{className:"truncate",children:s})]},E)}return(0,a.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:"No project"},E)}return E==="labels"?(e.labels??[]).length>0?(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[(e.labels??[]).slice(0,2).map(B=>(0,a.jsx)(Dn,{variant:"outline",className:"min-w-0 max-w-full px-1.5 py-0 text-(length:--text-nano)",style:{borderColor:B.color,color:aj(B.color,.12),backgroundColor:`${B.color}1f`},children:(0,a.jsx)("span",{className:"truncate",children:B.name})},B.id)),(e.labels??[]).length>2?(0,a.jsxs)("span",{className:"shrink-0 text-(length:--text-nano) font-medium text-ink-3",children:["+",(e.labels??[]).length-2]}):null]},E):(0,a.jsx)("span",{className:"min-w-0","aria-hidden":"true"},E):E==="workspace"?u?(0,a.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:c&&R?(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)("button",{type:"button",className:"truncate rounded-sm text-left text-xs text-ink-3 transition-colors hover:text-ink hover:underline",onClick:r(B=>{B.preventDefault(),B.stopPropagation(),R(c)},"onClick"),children:u})}),(0,a.jsx)(Ts,{side:"top",sideOffset:6,children:"Filter by workspace"})]}):u},E):(0,a.jsx)("span",{className:"min-w-0","aria-hidden":"true"},E):E==="parent"?e.parentId?(0,a.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",title:C??void 0,children:I?(0,a.jsx)("span",{className:"font-mono",children:I}):(0,a.jsx)("span",{className:"italic",children:"Sub-task"})},E):(0,a.jsx)("span",{className:"min-w-0","aria-hidden":"true"},E):E==="updated"?(0,a.jsx)("span",{className:"min-w-0 truncate text-right text-(length:--text-micro) font-medium text-ink-3",children:_},E):null})})}r(J9,"InboxIssueTrailingColumns");function eF({icon:e,title:t,message:s,description:l,action:c,onAction:u,hideActionIcon:p=!1}){return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[(0,a.jsx)("div",{className:"bg-bg-3/50 p-4 mb-4",children:(0,a.jsx)(e,{className:"h-10 w-10 text-ink-3/50"})}),t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-base font-semibold text-ink mb-1.5",children:t}),(0,a.jsx)("p",{className:"text-sm text-ink-3 mb-4 max-w-md",children:s})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-ink mb-1",children:s}),l&&(0,a.jsx)("p",{className:"max-w-md text-sm text-ink-3 mb-4",children:l})]}),c&&u&&(0,a.jsxs)(oe,{onClick:u,children:[!p&&(0,a.jsx)(as,{className:"h-4 w-4 mr-1.5"}),c]})]})}r(eF,"EmptyState");function tF({label:e,collapsible:t=!1,collapsed:s=!1,onToggle:l,trailing:c,className:u}){return(0,a.jsxs)("div",{className:Y("flex items-center py-1.5 pl-1 pr-3",u),children:[t?(0,a.jsxs)("button",{type:"button",className:"flex min-w-0 items-center gap-2 text-left","aria-expanded":!s,onClick:l,children:[(0,a.jsx)("span",{className:"inline-flex w-4 shrink-0 items-center justify-center",children:(0,a.jsx)(ur,{className:Y("h-3.5 w-3.5 shrink-0 text-ink-3 transition-transform",!s&&"rotate-90")})}),(0,a.jsx)("span",{className:"truncate text-sm font-semibold uppercase tracking-wide",children:e})]}):(0,a.jsx)("div",{className:"flex min-w-0 items-center gap-1.5",children:(0,a.jsx)("span",{className:"truncate text-sm font-semibold uppercase tracking-wide",children:e})}),c?(0,a.jsx)("div",{className:"ml-auto",children:c}):null]})}r(tF,"IssueGroupHeader");var Qh={critical:{icon:ai,color:ld.critical??"text-yellow-600 dark:text-yellow-400",label:"Critical"},high:{icon:RS,color:ld.high??"text-yellow-600 dark:text-yellow-400",label:"High"},medium:{icon:k3,color:ld.medium??"text-yellow-600 dark:text-yellow-400",label:"Medium"},low:{icon:DI,color:ld.low??"text-yellow-600 dark:text-yellow-400",label:"Low"}},nF=["critical","high","medium","low"];function tX({priority:e,onChange:t,className:s,showLabel:l}){const[c,u]=(0,x.useState)(!1),p=Qh[e]??Qh.medium,f=p.icon,h=(0,a.jsx)("span",{className:Y("inline-flex items-center justify-center shrink-0",p.color,t&&!l&&"cursor-pointer",s),children:(0,a.jsx)(f,{className:"h-3.5 w-3.5"})});if(!t)return l?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[h,(0,a.jsx)("span",{className:"text-sm",children:p.label})]}):h;const g=l?(0,a.jsxs)("button",{type:"button","aria-label":`Change priority (current: ${p.label})`,className:"inline-flex min-h-5 items-center gap-1.5 cursor-pointer hover:bg-bg-3/50 rounded px-1 -mx-1 py-0.5 transition-colors",children:[h,(0,a.jsx)("span",{className:"text-sm",children:p.label})]}):(0,a.jsx)("button",{type:"button","data-slot":"icon-button","aria-label":`Change priority (current: ${p.label})`,className:"inline-flex cursor-pointer items-center justify-center rounded-sm focus-visible:outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-focus",children:h});return(0,a.jsxs)(ws,{open:c,onOpenChange:u,children:[(0,a.jsx)(ys,{asChild:!0,children:g}),(0,a.jsx)(js,{className:"w-36 p-1",align:"start",children:nF.map(v=>{const y=Qh[v],j=y.icon;return(0,a.jsxs)(oe,{active:v===e,variant:"ghost",size:"sm",className:Y("w-full justify-start gap-2 text-xs"),onClick:r(()=>{t(v),u(!1)},"onClick"),children:[(0,a.jsx)(j,{className:Y("h-3.5 w-3.5",y.color)}),y.label]},v)})})]})}r(tX,"PriorityIcon");var aF=[["everything","All categories"],["issues_i_touched","My recent tasks"],["join_requests","Join requests"],["approvals","Approvals"],["failed_runs","Failed runs"],["alerts","Alerts"]],sF=[["all","All approval statuses"],["actionable","Needs action"],["resolved","Resolved"]],Gh=6;function Yh({value:e,onChange:t,label:s}){return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(pr,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-ink-3"}),(0,a.jsx)(Wn,{value:e,onChange:r(l=>t(l.target.value),"onChange"),placeholder:`Search ${s.toLowerCase()}...`,"aria-label":`Search ${s.toLowerCase()}`,className:"h-8 pl-7 text-xs"})]})}r(Yh,"FilterOptionSearch");function iF({state:e,onChange:t,activeFilterCount:s,agents:l,projects:c,labels:u,currentUserId:p,enableExternalObjectFilters:f=!0,enableRoutineVisibilityFilter:h=!1,enableHiddenTasksFilter:g=!1,buttonVariant:v="ghost",iconOnly:y=!1,creators:j,presentation:k="legacy",inboxScopeFilters:S}){const N=k==="streamlined",[I,C]=(0,x.useState)(""),[M,R]=(0,x.useState)(""),[_,D]=(0,x.useState)(""),[U,K]=(0,x.useState)(""),z=(0,x.useMemo)(()=>sh(l,M,A=>A.name),[l,M]),E=(0,x.useMemo)(()=>sh(c,_,A=>A.name),[c,_]),B=(0,x.useMemo)(()=>sh(u,U,A=>A.name),[u,U]),O=j??[],Q=(0,x.useMemo)(()=>new Map(O.map(A=>[A.id,A])),[O]),V=I.trim().toLowerCase(),ue=(0,x.useMemo)(()=>V?O.filter(A=>`${A.label} ${A.searchText??""}`.toLowerCase().includes(V)):O,[O,V]),ce=(0,x.useMemo)(()=>e.creators.map(A=>{const ee=Q.get(A);if(ee)return ee;if(A.startsWith("agent:"))return{id:A,label:A.slice(6).slice(0,8),kind:"agent"};const ie=A.startsWith("user:")?A.slice(5):A;return{id:A,label:Vr(ie,p)??ie.slice(0,5),kind:"user"}}),[Q,p,e.creators]),X=r(()=>{t(YS),S?.onClear()},"clearFilters");return(0,a.jsxs)(ws,{children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsxs)(oe,{variant:v,size:y?"icon":"sm",className:`text-xs ${y?"relative h-8 w-8 shrink-0":""}`,title:y?s>0?`Filters: ${s}`:"Filter":void 0,children:[(0,a.jsx)(v3,{className:y?"h-3.5 w-3.5":"h-3.5 w-3.5 sm:h-3 sm:w-3 sm:mr-1"}),!y&&(0,a.jsx)("span",{className:"hidden sm:inline",children:s>0?`Filters: ${s}`:"Filter"}),!y&&s>0?(0,a.jsx)("span",{className:"ml-0.5 text-(length:--text-nano) font-medium sm:hidden",children:s}):null,y&&s>0?(0,a.jsx)("span",{className:"absolute -right-1 -top-1 flex h-3.5 w-3.5 items-center justify-center rounded-full bg-blue-600 text-(length:--text-nano) font-bold text-white",children:s}):null,!y&&s>0?(0,a.jsx)(ia,{className:"ml-1 hidden h-3 w-3 sm:block",onClick:r(A=>{A.stopPropagation(),X()},"onClick")}):null]})}),(0,a.jsx)(js,{align:"end",className:N?"w-(--sz-calc-10) max-h-(--sz-calc-9) overflow-y-auto overscroll-contain p-0":"w-(--sz-calc-10) p-0",children:(0,a.jsxs)("div",{className:"space-y-3 p-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"Filters"}),s>0?(0,a.jsx)("button",{type:"button",className:"text-xs text-ink-3 hover:text-ink",onClick:X,children:"Clear"}):null]}),S?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,a.jsxs)("div",{className:"space-y-1","data-filter-options":"inbox-category",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Category"}),(0,a.jsx)("div",{className:"space-y-0.5",children:aF.map(([A,ee])=>{const ie=S.category===A;return(0,a.jsxs)("button",{type:"button","aria-pressed":ie,className:Y("flex w-full items-center justify-between rounded-sm px-2 py-1 text-left text-sm",ie?"bg-bg-3/50 text-ink":"text-ink-3 hover:bg-bg-3/50 hover:text-ink"),onClick:r(()=>S.onCategoryChange(A),"onClick"),children:[(0,a.jsx)("span",{children:ee}),ie?(0,a.jsx)(Ms,{className:"h-3.5 w-3.5"}):null]},A)})})]}),S.showApprovalStatus?(0,a.jsxs)("div",{className:"space-y-1","data-filter-options":"inbox-approval-status",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Approval status"}),(0,a.jsx)("div",{className:"space-y-0.5",children:sF.map(([A,ee])=>{const ie=S.approvalStatus===A;return(0,a.jsxs)("button",{type:"button","aria-pressed":ie,className:Y("flex w-full items-center justify-between rounded-sm px-2 py-1 text-left text-sm",ie?"bg-bg-3/50 text-ink":"text-ink-3 hover:bg-bg-3/50 hover:text-ink"),onClick:r(()=>S.onApprovalStatusChange(A),"onClick"),children:[(0,a.jsx)("span",{children:ee}),ie?(0,a.jsx)(Ms,{className:"h-3.5 w-3.5"}):null]},A)})})]}):null]}),(0,a.jsx)("div",{className:"border-t border-line"})]}):null,(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Quick filters"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:iT.map(A=>{const ee=lT(e.statuses,A.statuses);return(0,a.jsx)($T,{selected:ee,onClick:r(()=>t({statuses:ee?[]:[...A.statuses]}),"onClick"),children:A.label},A.label)})})]}),(0,a.jsx)("div",{className:"border-t border-line"}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[(0,a.jsxs)("div",{className:"min-w-0 space-y-3",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Status"}),(0,a.jsx)("div",{className:"space-y-0.5",children:Zd.map(A=>(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.statuses.includes(A),onCheckedChange:r(()=>t({statuses:nr(e.statuses,A)}),"onCheckedChange")}),(0,a.jsx)(ei,{status:A}),(0,a.jsx)("span",{className:"text-sm",children:dg(A)})]},A))})]}),!1]}),(0,a.jsxs)("div",{className:"min-w-0 space-y-3",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Responsible"}),N&&(l?.length??0)+(p?2:1)>Gh?(0,a.jsx)(Yh,{value:M,onChange:R,label:"Responsible"}):null,(0,a.jsxs)("div",{"data-filter-options":"responsible",className:N?"space-y-0.5":"max-h-32 space-y-0.5 overflow-y-auto",children:[(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.assignees.includes("__unassigned"),onCheckedChange:r(()=>t({assignees:nr(e.assignees,"__unassigned")}),"onCheckedChange")}),(0,a.jsx)("span",{className:"text-sm",children:"No responsible"})]}),p?(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.assignees.includes("__me"),onCheckedChange:r(()=>t({assignees:nr(e.assignees,"__me")}),"onCheckedChange")}),(0,a.jsx)(so,{className:"h-3.5 w-3.5 text-ink-3"}),(0,a.jsx)("span",{className:"text-sm",children:"Me"})]}):null,(N?z:l??[]).map(A=>(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.assignees.includes(A.id),onCheckedChange:r(()=>t({assignees:nr(e.assignees,A.id)}),"onCheckedChange")}),(0,a.jsx)("span",{className:"text-sm",children:A.name})]},A.id))]})]}),O.length>0?(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Creator"}),ce.length>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:ce.map(A=>(0,a.jsxs)(Dn,{variant:"secondary",className:"gap-1 pr-1",children:[A.kind==="agent"?(0,a.jsx)(Nc,{className:"h-3 w-3"}):(0,a.jsx)(so,{className:"h-3 w-3"}),(0,a.jsx)("span",{children:A.label}),(0,a.jsx)("button",{type:"button",className:"rounded-full p-0.5 hover:bg-bg-3",onClick:r(()=>t({creators:e.creators.filter(ee=>ee!==A.id)}),"onClick"),"aria-label":`Remove creator ${A.label}`,children:(0,a.jsx)(ia,{className:"h-3 w-3"})})]},A.id))}):null,(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(pr,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-ink-3"}),(0,a.jsx)(Wn,{value:I,onChange:r(A=>C(A.target.value),"onChange"),placeholder:"Search creators...",className:"h-8 pl-7 text-xs"})]}),(0,a.jsx)("div",{"data-filter-options":"creators",className:N?"space-y-0.5":"max-h-32 space-y-0.5 overflow-y-auto",children:ue.length>0?ue.map(A=>{const ee=e.creators.includes(A.id);return(0,a.jsxs)("button",{type:"button",className:`flex w-full items-center gap-2 rounded-sm px-2 py-1 text-left text-sm ${ee?"bg-bg-3 text-ink":"text-ink-3 hover:bg-bg-3/50 hover:text-ink"}`,onClick:r(()=>t({creators:nr(e.creators,A.id)}),"onClick"),children:[A.kind==="agent"?(0,a.jsx)(Nc,{className:"h-3.5 w-3.5"}):(0,a.jsx)(so,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:A.label}),ee?(0,a.jsx)(ia,{className:"h-3 w-3"}):null]},A.id)}):(0,a.jsx)("div",{className:"px-2 py-1 text-xs text-ink-3",children:"No creators match."})})]}):null,c&&c.length>0?(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Project"}),N&&c.length>Gh?(0,a.jsx)(Yh,{value:_,onChange:D,label:"Projects"}):null,(0,a.jsx)("div",{"data-filter-options":"projects",className:N?"space-y-0.5":"max-h-32 space-y-0.5 overflow-y-auto",children:(N?E:c).map(A=>(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.projects.includes(A.id),onCheckedChange:r(()=>t({projects:nr(e.projects,A.id)}),"onCheckedChange")}),(0,a.jsx)("span",{className:"text-sm",children:A.name})]},A.id))})]}):null]}),(0,a.jsxs)("div",{className:"min-w-0 space-y-3",children:[u&&u.length>0?(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Labels"}),N&&u.length>Gh?(0,a.jsx)(Yh,{value:U,onChange:K,label:"Labels"}):null,(0,a.jsx)("div",{"data-filter-options":"labels",className:N?"space-y-0.5":"max-h-32 space-y-0.5 overflow-y-auto",children:(N?B:u).map(A=>(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.labels.includes(A.id),onCheckedChange:r(()=>t({labels:nr(e.labels,A.id)}),"onCheckedChange")}),(0,a.jsx)("span",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:A.color}}),(0,a.jsx)("span",{className:"text-sm",children:A.name})]},A.id))})]}):null,f?(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"External object status"}),(0,a.jsx)("div",{className:"space-y-0.5",children:nT.map(A=>{const ee=A==="failed"?"failed":A==="waiting"?"waiting":A==="running"?"running":A==="auth_required"?"auth_required":A==="unreachable"?"unreachable":A==="stale"?"unknown":"closed",ie=$S(ee),le=(sI[ee]??"").split(" ").filter(Ae=>Ae.startsWith("text-")).join(" ");return(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.externalObjectStatuses.includes(A),onCheckedChange:r(()=>t({externalObjectStatuses:nr(e.externalObjectStatuses,A)}),"onCheckedChange")}),(0,a.jsx)(ie,{className:`h-3.5 w-3.5 shrink-0 ${le}`,"aria-hidden":"true"}),(0,a.jsx)("span",{className:"text-sm",children:sT(A)})]},A)})})]}):null,(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Visibility"}),(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.liveOnly,onCheckedChange:r(A=>t({liveOnly:A===!0}),"onCheckedChange")}),(0,a.jsx)("span",{className:"text-sm",children:"Live runs only"})]}),h?(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.hideRoutineExecutions,onCheckedChange:r(A=>t({hideRoutineExecutions:A===!0}),"onCheckedChange")}),(0,a.jsx)("span",{className:"text-sm",children:"Hide routine runs"})]}):null,g?(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.showHiddenTasks,onCheckedChange:r(A=>t({showHiddenTasks:A===!0}),"onCheckedChange")}),(0,a.jsx)("span",{className:"text-sm",children:"Show hidden tasks"})]}):null]})]})]})]})})]})}r(iF,"IssueFiltersPopover");function rF(e){return e.objects.find(t=>t.statusTone===e.highestSeverity)?.statusCategory??"unknown"}r(rF,"dominantCategory");function lF(e){return e.objects.find(t=>t.statusTone===e.highestSeverity)??null}r(lF,"dominantObject");function oF(e){const t=[];for(const[s,l]of Object.entries(e.byStatusCategory))l&&t.push(`${l} ${a3(s).toLowerCase()}`);return e.staleCount>0&&t.push(`${e.staleCount} stale`),t.push(`${e.total} total`),`External objects: ${t.join(", ")}`}r(oF,"buildBreakdownTitle");function Fk({summary:e,compact:t,className:s}){const l=K0(),c=ZI(e),u=e?.total??0;if(!e||u===0||!c)return null;const p=lF(e),f=p?.statusCategory??rF(e),h=t3(p?.statusIconKey)??$S(f),g=dI[f]??"bg-bg-3 text-ink-3",v=JI(e),y=oF(e),j=f==="running"&&!l?"animate-spin":"";return(0,a.jsxs)("span",{role:"img","aria-label":y,title:y,className:Y("inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-(length:--text-nano) font-medium tabular-nums leading-none",g,t&&"px-1 py-0.5",s),"data-external-status":f,"data-external-tone":c,children:[(0,a.jsx)(h,{"aria-hidden":"true",className:Y("h-3 w-3 shrink-0",j)}),(0,a.jsx)("span",{children:v>0?v:u})]})}r(Fk,"ExternalObjectStatusSummary");function Hk({onArchive:e,disabled:t,compact:s=!1}){return(0,a.jsxs)("button",{type:"button","data-slot":"icon-button",onClick:r(l=>{l.preventDefault(),l.stopPropagation(),e()},"onClick"),onKeyDown:r(l=>{l.key!=="Enter"&&l.key!==" "||(l.preventDefault(),l.stopPropagation(),e())},"onKeyDown"),disabled:t,className:Y("inline-flex shrink-0 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-ink-3 opacity-0 transition-opacity hover:bg-bg-3 hover:text-ink group-hover:opacity-100 focus-visible:opacity-100 disabled:pointer-events-none disabled:opacity-30",s?"h-5 py-0":"py-1"),"aria-label":"Archive",children:[(0,a.jsx)(TS,{className:"h-3.5 w-3.5"}),"Archive"]})}r(Hk,"InboxArchiveButton");function cF({issue:e,issueLinkState:t,selected:s=!1,presentation:l="legacy",leadingControl:c,statusSlot:u,metadata:p,actions:f,showIdentifier:h=!0,mobileLeading:g,desktopMetaLeading:v,desktopLeadingSpacer:y=!1,mobileMeta:j,mobileTitleMeta:k,desktopTrailing:S,externalObjectSummary:N,trailingMeta:I,titleSuffix:C,titleClassName:M,checklistStepNumber:R=null,checklistCurrentStep:_=!1,checklistDependencyChips:D,checklistRowId:U,unreadState:K=null,onMarkRead:z,onArchive:E,archiveDisabled:B,className:O,onMouseEnter:Q,treeGuides:V=0,chevronInGuide:ue=!1,showDivider:ce=!1}){const X=e.identifier??e.id,A=e.identifier??e.id.slice(0,8),ee=K!=null,ie=K==="visible"||K==="fading",le=(0,a.jsx)("button",{type:"button","data-slot":"icon-button",onClick:r(ve=>{ve.preventDefault(),ve.stopPropagation(),z?.()},"onClick"),onKeyDown:r(ve=>{(ve.key==="Enter"||ve.key===" ")&&(ve.preventDefault(),ve.stopPropagation(),z?.())},"onKeyDown"),className:Y("inline-flex h-4 w-4 items-center justify-center rounded-full transition-colors",s?"hover:bg-bg-3/80":"hover:bg-blue-500/20"),"aria-label":"Mark as read",children:(0,a.jsx)("span",{className:Y("block h-2 w-2 rounded-full transition-opacity duration-300",s?"bg-ink-3/70":"bg-blue-600 dark:bg-blue-400",K==="fading"?"opacity-0":"opacity-100")})}),Ae=s?"!text-ink-3 !border-ink-3":void 0,de=N0(t,e),we=R!==null?(0,a.jsxs)("span",{className:"shrink-0 font-mono text-xs text-ink-3","aria-hidden":"true",children:[R,"."]}):null,ye=e.activeRecoveryAction??null,Me=ye&&!ZE(ye.cause)?uF(ye,s,{scheduledRetry:e.scheduledRetry??null}):null,he=eR(e.blockedBy)?(0,a.jsxs)(Dn,{variant:"outline","data-testid":"issue-row-parked-blocker",className:"[&>svg]:size-2.5 ml-1.5 gap-0.5 border-amber-500/60 bg-amber-500/15 text-(length:--text-nano) text-amber-700 dark:text-amber-300",title:"Blocked by parked work — at least one assigned blocker is in backlog and will not wake its assignee.",children:[(0,a.jsx)(_0,{className:"h-2.5 w-2.5","aria-hidden":!0}),"Blocked by parked work"]}):null;if(l==="task"){const ve=K==="visible"||K==="fading";return(0,a.jsxs)("div",{onMouseEnter:Q,"data-slot":"task-row","data-unread":ve?"true":void 0,className:Y("group relative flex min-w-0 items-start gap-2 rounded-lg py-2.5 pr-2 text-sm no-underline text-inherit sm:items-center sm:py-2",ee?"pl-4":"pl-2 sm:pl-4","[&_button]:relative [&_button]:z-10",s?"bg-bg-3/50 hover:bg-bg-3/50":"hover:bg-bg-3/50",_&&"bg-accent/5",O),children:[(0,a.jsx)(mn,{to:Vd(X),state:de,disableIssueQuicklook:!0,issuePrefetch:e,"data-inbox-issue-link":!0,id:U,"aria-current":_?"step":void 0,onClickCapture:r(()=>ag(X,de),"onClickCapture"),className:"absolute inset-0 rounded-lg no-underline text-inherit focus-visible:z-10 focus-visible:outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-focus",children:(0,a.jsxs)("span",{className:"sr-only",children:["Open ",A,": ",e.title]})}),ee?(0,a.jsx)("span",{"data-testid":"issue-row-unread-slot",className:"absolute left-0 top-3 inline-flex h-4 w-4 items-center justify-center sm:top-1/2 sm:-translate-y-1/2",children:ie?le:null}):null,(0,a.jsxs)("span",{"data-slot":"task-row-leading",className:"flex shrink-0 items-start self-stretch gap-1 pt-px sm:items-center sm:pt-0",children:[V>0?Array.from({length:V},(et,$e)=>{const Ie=ue&&$e===V-1;return(0,a.jsx)("span",{"data-slot":"task-row-tree-guide","aria-hidden":"true",className:"relative block w-4 shrink-0 self-stretch",children:(0,a.jsx)("span",{"data-slot":"task-row-tree-connector",className:"absolute -inset-y-3 left-7 w-px bg-bg",children:Ie?(0,a.jsxs)("span",{className:"absolute inset-0 flex flex-col",children:[(0,a.jsx)("span",{className:"flex-1 bg-line"}),(0,a.jsx)("span",{className:"h-3.5 shrink-0"}),(0,a.jsx)("span",{className:"flex-1 bg-line"})]}):(0,a.jsx)("span",{className:"absolute inset-0 bg-line"})})},`task-guide-${$e}`)}):null,c,u??(0,a.jsx)(ei,{status:e.status,externalConversationState:e.externalConversationState,blockerAttention:e.blockerAttention,size:"md",className:Ae}),he]}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-1 sm:flex-row sm:items-center sm:gap-2",children:[(0,a.jsxs)("span",{"data-slot":"task-row-title-cluster",className:"flex min-w-0 flex-1 items-baseline gap-1.5 sm:items-center",children:[(0,a.jsxs)("span",{"data-slot":"task-row-title",className:Y("min-w-0 line-clamp-2 text-sm sm:truncate sm:line-clamp-none",ve&&"font-semibold",M),children:[e.title,C]}),Me,k?(0,a.jsx)("span",{className:"ml-auto shrink-0 whitespace-nowrap text-right text-xs text-ink-3 sm:hidden",children:k}):null]}),D?(0,a.jsx)("span",{className:"flex flex-wrap gap-1",children:D}):null,j?(0,a.jsx)("span",{className:"text-xs text-ink-3 sm:hidden",children:j}):null]}),(0,a.jsxs)("span",{"data-slot":"task-row-trailing",className:"ml-auto hidden min-w-0 shrink-0 items-center gap-2 sm:flex",children:[N?(0,a.jsx)(Fk,{summary:N,compact:!0}):null,p?(0,a.jsx)("span",{"data-slot":"task-row-metadata",className:"min-w-0",children:p}):null,S,f?(0,a.jsx)("span",{"data-slot":"task-row-actions",className:"flex shrink-0 items-center gap-1",children:f}):null,E?(0,a.jsx)(Hk,{onArchive:E,disabled:B,compact:!0}):null,h?(0,a.jsx)("span",{"data-slot":"task-row-identifier",className:"w-20 shrink-0 text-right font-mono text-xs text-ink-3",children:A}):null,I?(0,a.jsx)("span",{"data-slot":"task-row-timestamp",className:"w-24 shrink-0 truncate text-right text-xs text-ink-3",children:I}):null]})]})}return(0,a.jsxs)("div",{onMouseEnter:Q,className:Y("group relative flex items-start gap-2 rounded-lg py-2.5 pr-3 text-sm no-underline text-inherit sm:items-center sm:py-2 sm:pl-1",ee?"pl-4":"pl-2","[&_button]:relative [&_button]:z-10",ce&&"border-b border-line last:border-b-0",s?"hover:bg-transparent":"hover:bg-bg-3/50",_?"bg-accent/5":null,O),children:[(0,a.jsx)(mn,{to:Vd(X),state:de,disableIssueQuicklook:!0,issuePrefetch:e,"data-inbox-issue-link":!0,id:U,"aria-current":_?"step":void 0,onClickCapture:r(()=>ag(X,de),"onClickCapture"),className:Y("absolute inset-0 rounded-lg no-underline text-inherit focus-visible:z-10 focus-visible:outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-focus"),children:(0,a.jsxs)("span",{className:"sr-only",children:["Open ",A,": ",e.title]})}),(0,a.jsxs)("span",{className:"flex shrink-0 items-center gap-1 pt-px sm:hidden",children:[g??(0,a.jsx)(ei,{status:e.status,externalConversationState:e.externalConversationState,blockerAttention:e.blockerAttention,size:"md",className:Ae}),he]}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-1 sm:contents",children:[(0,a.jsxs)("span",{"data-slot":"task-row-title-cluster",className:"flex min-w-0 items-start gap-1.5 sm:order-2 sm:flex-1 sm:items-center",children:[(0,a.jsxs)("span",{"data-slot":"task-row-title",className:Y("min-w-0 line-clamp-2 text-sm sm:truncate sm:line-clamp-none",M),children:[e.title,C]}),Me]}),D?(0,a.jsx)("span",{className:"flex flex-wrap gap-1 sm:order-3 sm:ml-(--sz-calc-13)",children:D}):null,(0,a.jsxs)("span",{className:"flex items-center gap-2 self-stretch sm:order-1 sm:shrink-0",children:[ee?(0,a.jsx)("span",{"data-testid":"issue-row-unread-slot",className:"hidden h-4 w-4 shrink-0 items-center justify-center self-center sm:inline-flex",children:ie?le:null}):null,V>0?Array.from({length:V},(ve,et)=>{const $e=ue&&et===V-1;return(0,a.jsx)("span",{"aria-hidden":"true",className:"relative hidden w-4 shrink-0 self-stretch sm:block",children:(0,a.jsx)("span",{className:"absolute -inset-y-3 left-8 w-px bg-bg",children:$e?(0,a.jsxs)("span",{className:"absolute inset-0 flex flex-col",children:[(0,a.jsx)("span",{className:"flex-1 bg-line"}),(0,a.jsx)("span",{className:"h-3.5 shrink-0"}),(0,a.jsx)("span",{className:"flex-1 bg-line"})]}):(0,a.jsx)("span",{className:"absolute inset-0 bg-line"})})},`guide-${et}`)}):null,y?(0,a.jsx)("span",{className:"hidden w-3.5 shrink-0 sm:block"}):null,v??(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"hidden shrink-0 items-center gap-1 sm:inline-flex",children:(0,a.jsx)(ei,{status:e.status,externalConversationState:e.externalConversationState,blockerAttention:e.blockerAttention,size:"md",className:Ae})}),we,(0,a.jsx)("span",{className:"shrink-0 font-mono text-xs text-ink-3",children:A}),he]}),j?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-xs text-ink-3 sm:hidden","aria-hidden":"true",children:"·"}),(0,a.jsx)("span",{className:"text-xs text-ink-3 sm:hidden",children:j})]}):null]})]}),E||S||I||N?(0,a.jsxs)("span",{className:"ml-auto hidden shrink-0 items-center gap-2 sm:order-3 sm:flex sm:gap-3",children:[E?(0,a.jsx)(Hk,{onArchive:E,disabled:B}):null,N?(0,a.jsx)(Fk,{summary:N,compact:!0}):null,S,I?(0,a.jsx)("span",{className:"text-xs text-ink-3",children:I}):null]}):null,ie?(0,a.jsx)("span",{className:"absolute left-0 top-1/2 inline-flex h-4 w-4 -translate-y-1/2 items-center justify-center sm:hidden",children:le}):null]})}r(cF,"IssueRow");function uF(e,t,s){const l=GT(e,s);if(!l)return null;const c=XT[l],u=c.icon,p=YT(e,s),f=JT(l,e.kind,p),h=p?ZT(p):null;return(0,a.jsxs)(Dn,{variant:"outline","data-testid":"issue-row-recovery-indicator","data-recovery-state":l,"data-recovery-kind":e.kind,"data-recovery-lane":p?.lane,role:"status","aria-label":h?`${f} — ${h}`:f,className:Y("shrink-0 gap-0.5 text-(length:--text-nano)",c.className,t?"!border-ink-3 !text-ink-3":null),title:h?`${f} — ${h}. Open the source task to act.`:`${f} — open the source task to act.`,children:[(0,a.jsx)(u,{className:"h-2.5 w-2.5","aria-hidden":!0}),f]})}r(uF,"renderRecoveryChip");var dF="Kembali ke model utama.";function fF(e,t){return e instanceof Error&&e.message?e.message:t}r(fF,"errorMessage");function pF({issueId:e,run:t,companyId:s,taskLabel:l,className:c}){const u=kn(),[p,f]=(0,x.useState)(!1),h=t?.modelFallback??null,g=Bt({mutationFn:r(async()=>{if(!e||!t)throw new Error("This task has no run on a fallback model.");return await zf.cancel(t.id),cn.addComment(e,dF,void 0,void 0,void 0,crypto.randomUUID())},"mutationFn"),onSuccess:r(()=>{s&&u.invalidateQueries({queryKey:$.liveRuns(s)}),e&&(u.invalidateQueries({queryKey:$.issues.liveRuns(e)}),u.invalidateQueries({queryKey:$.issues.activeRun(e)}),u.invalidateQueries({queryKey:$.issues.runs(e)}),u.invalidateQueries({queryKey:$.issues.comments(e)}))},"onSuccess")});if(!e||!t||!h)return null;const v=l?` on ${l}`:"";return(0,a.jsxs)("span",{"data-slot":"restore-primary-model",className:Y("inline-flex min-w-0 items-center gap-1.5",c),children:[(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"xs",disabled:g.isPending,"aria-label":`Back to the primary model${v}`,title:`Back to the primary model — stops this fallback run and wakes the assignee on ${h.primaryModel}`,onClick:r(y=>{y.preventDefault(),y.stopPropagation(),f(!0)},"onClick"),children:[(0,a.jsx)(gc,{"aria-hidden":"true"}),g.isPending?"Restoring…":"Back to primary model"]}),g.error?(0,a.jsx)("span",{role:"alert",className:"text-xs text-bad",children:fF(g.error,"Couldn’t restore the primary model.")}):null,(0,a.jsx)(_S,{open:p,onOpenChange:f,children:(0,a.jsxs)(kS,{children:[(0,a.jsxs)(AS,{children:[(0,a.jsxs)(wS,{children:["Back to the primary model",v,"?"]}),(0,a.jsxs)(jS,{children:["This stops the run on ",h.activeModel," now, so any unsaved work in that turn is lost, and wakes the assignee again on ",h.primaryModel,"."]})]}),(0,a.jsxs)(NS,{children:[(0,a.jsx)(CS,{children:"Keep running"}),(0,a.jsx)(SS,{onClick:r(()=>{f(!1),g.mutate()},"onClick"),children:"Stop and switch"})]})]})})]})}r(pF,"RestorePrimaryModelControl");function mF({context:e,search:t,controls:s,actions:l,feedback:c,className:u,ariaLabel:p="Collection controls"}){return(0,a.jsxs)("div",{"data-slot":"collection-toolbar",className:Y("flex flex-col gap-2",u),role:"toolbar","aria-label":p,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 sm:flex-row sm:items-center",children:[e?(0,a.jsx)("div",{"data-slot":"collection-toolbar-context",className:"min-w-0 shrink-0",children:e}):null,t?(0,a.jsx)("div",{"data-slot":"collection-toolbar-search",className:"min-w-0 flex-1",children:t}):null,s||l?(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1 sm:ml-auto sm:flex-nowrap",children:[s?(0,a.jsx)("div",{"data-slot":"collection-toolbar-controls",className:"flex min-w-0 flex-wrap items-center gap-1",children:s}):null,l?(0,a.jsx)("div",{"data-slot":"collection-toolbar-actions",className:"flex shrink-0 items-center gap-1",children:l}):null]}):null]}),c?(0,a.jsx)("div",{"data-slot":"collection-toolbar-feedback",className:"min-w-0",children:c}):null]})}r(mF,"CollectionToolbar");function hF({variant:e="list"}){return e==="dashboard"?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(rt,{className:"h-32 w-full border border-line"}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2 xl:grid-cols-4",children:Array.from({length:4}).map((t,s)=>(0,a.jsx)(rt,{className:"h-24 w-full"},s))}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-4",children:Array.from({length:4}).map((t,s)=>(0,a.jsx)(rt,{className:"h-44 w-full"},s))}),(0,a.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,a.jsx)(rt,{className:"h-72 w-full"}),(0,a.jsx)(rt,{className:"h-72 w-full"})]})]}):e==="approvals"?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("div",{className:"flex items-center justify-between",children:(0,a.jsx)(rt,{className:"h-9 w-44"})}),(0,a.jsx)("div",{className:"grid gap-3",children:Array.from({length:3}).map((t,s)=>(0,a.jsx)(rt,{className:"h-36 w-full"},s))})]}):e==="costs"?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:Array.from({length:6}).map((t,s)=>(0,a.jsx)(rt,{className:"h-9 w-28"},s))}),(0,a.jsx)(rt,{className:"h-40 w-full"}),(0,a.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,a.jsx)(rt,{className:"h-72 w-full"}),(0,a.jsx)(rt,{className:"h-72 w-full"})]})]}):e==="inbox"?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(rt,{className:"h-9 w-56"}),(0,a.jsx)(rt,{className:"h-8 w-40"})]}),(0,a.jsx)("div",{className:"space-y-5",children:Array.from({length:3}).map((t,s)=>(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(rt,{className:"h-4 w-40"}),(0,a.jsx)("div",{className:"space-y-1 border border-line",children:Array.from({length:3}).map((l,c)=>(0,a.jsx)(rt,{className:"h-14 w-full rounded-none"},c))})]},s))})]}):e==="org-chart"?(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsx)(rt,{className:"h-(--sz-calc-17) w-full rounded-lg border border-line"})}):e==="detail"?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)(rt,{className:"h-3 w-64"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(rt,{className:"h-6 w-6"}),(0,a.jsx)(rt,{className:"h-6 w-6"}),(0,a.jsx)(rt,{className:"h-7 w-48"})]}),(0,a.jsx)(rt,{className:"h-4 w-40"})]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)(rt,{className:"h-10 w-full"}),(0,a.jsx)(rt,{className:"h-32 w-full"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(rt,{className:"h-8 w-24"}),(0,a.jsx)(rt,{className:"h-8 w-24"}),(0,a.jsx)(rt,{className:"h-8 w-24"})]}),(0,a.jsx)(rt,{className:"h-24 w-full"}),(0,a.jsx)(rt,{className:"h-24 w-full"})]})]}):e==="issues-list"?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)(rt,{className:"h-9 w-64"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(rt,{className:"h-8 w-16"}),(0,a.jsx)(rt,{className:"h-8 w-16"}),(0,a.jsx)(rt,{className:"h-8 w-16"}),(0,a.jsx)(rt,{className:"h-8 w-24"})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(rt,{className:"h-4 w-40"}),(0,a.jsx)("div",{className:"space-y-1",children:Array.from({length:8}).map((t,s)=>(0,a.jsx)(rt,{className:"h-11 w-full rounded-none"},s))})]})]}):(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)(rt,{className:"h-9 w-44"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(rt,{className:"h-8 w-20"}),(0,a.jsx)(rt,{className:"h-8 w-24"})]})]}),(0,a.jsx)("div",{className:"space-y-1",children:Array.from({length:7}).map((t,s)=>(0,a.jsx)(rt,{className:"h-11 w-full rounded-none"},s))})]})}r(hF,"PageSkeleton");var nX="issue.successful_run_handoff_required",aX="issue.successful_run_handoff_escalated";function _2(e){const t=e.successfulRunHandoff;return t?.required!==!0?!1:t.hasLiveContinuation?e.scheduledRetry?.status==="scheduled_retry":!0}r(_2,"isSuccessfulRunHandoffRequired");function sX(e){const t=e.trim();return t==="Wardmote needs a disposition before this issue can continue."||/^##\s+(This issue still needs a next step|Run finished without a next step|Successful run missing issue disposition)/i.test(t)||gF(t)}r(sX,"isSuccessfulRunHandoffComment");function gF(e){const t=e.trim();return t==="Wardmote could not resolve this issue's missing disposition automatically. The source assignment is unchanged and a board decision is required."||/^Wardmote exhausted the bounded successful-run handoff correction\b/i.test(t)}r(gF,"isSuccessfulRunHandoffEscalationComment");function iX(e){return e==="issue.successful_run_handoff_escalated"?{className:"border-red-500/35 bg-red-500/10 text-red-950 dark:text-red-100",iconClassName:"text-red-600 dark:text-red-300"}:e==="issue.successful_run_handoff_required"?{className:"border-amber-300/70 bg-amber-50/90 text-amber-950 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-100",iconClassName:"text-amber-600 dark:text-amber-300"}:{className:"border-line/60 text-ink-3",iconClassName:"text-ink-3"}}r(iX,"successfulRunHandoffActivityTone");var E2=[10,25,50];var xF=["backlog","done","cancelled"],d0=["backlog","todo","in_progress","in_review","blocked","done","cancelled"],bF={rail:"border-line bg-bg-3/20",railOver:"bg-bg-3/50 ring-1 ring-accent/20",header:"text-ink-3",count:"text-ink-3/60",body:"bg-bg-3/20",bodyOver:"bg-bg-3/40",card:""},vF={backlog:{rail:"border-line bg-bg-3/30",railOver:"bg-bg-3/50 ring-1 ring-neutral-400/25",header:"text-ink-3",count:"text-ink-3/60",body:"bg-bg-3/30 ring-1 ring-inset ring-line/50",bodyOver:"bg-bg-3/50 ring-1 ring-inset ring-neutral-400/25",card:""},todo:{rail:"border-amber-500/25 bg-amber-50/60 dark:bg-amber-950/20",railOver:"bg-amber-100/70 ring-1 ring-amber-500/25 dark:bg-amber-950/35",header:"text-amber-700 dark:text-amber-300",count:"text-amber-700/65 dark:text-amber-300/65",body:"bg-amber-50/45 ring-1 ring-inset ring-amber-500/15 dark:bg-amber-950/15",bodyOver:"bg-amber-100/70 ring-1 ring-inset ring-amber-500/25 dark:bg-amber-950/30",card:""},in_progress:{rail:"border-blue-500/25 bg-blue-50/60 dark:bg-blue-950/20",railOver:"bg-blue-100/70 ring-1 ring-blue-500/25 dark:bg-blue-950/35",header:"text-blue-700 dark:text-blue-300",count:"text-blue-700/65 dark:text-blue-300/65",body:"bg-blue-50/45 ring-1 ring-inset ring-blue-500/15 dark:bg-blue-950/15",bodyOver:"bg-blue-100/70 ring-1 ring-inset ring-blue-500/25 dark:bg-blue-950/30",card:""},blocked:{rail:"border-red-500/25 bg-red-50/60 dark:bg-red-950/20",railOver:"bg-red-100/70 ring-1 ring-red-500/25 dark:bg-red-950/35",header:"text-red-700 dark:text-red-300",count:"text-red-700/65 dark:text-red-300/65",body:"bg-red-50/45 ring-1 ring-inset ring-red-500/15 dark:bg-red-950/15",bodyOver:"bg-red-100/70 ring-1 ring-inset ring-red-500/25 dark:bg-red-950/30",card:""},in_review:{rail:"border-violet-500/25 bg-violet-50/60 dark:bg-violet-950/20",railOver:"bg-violet-100/70 ring-1 ring-violet-500/25 dark:bg-violet-950/35",header:"text-violet-700 dark:text-violet-300",count:"text-violet-700/65 dark:text-violet-300/65",body:"bg-violet-50/45 ring-1 ring-inset ring-violet-500/15 dark:bg-violet-950/15",bodyOver:"bg-violet-100/70 ring-1 ring-inset ring-violet-500/25 dark:bg-violet-950/30",card:""},done:{rail:"border-green-500/25 bg-green-50/60 dark:bg-green-950/20",railOver:"bg-green-100/70 ring-1 ring-green-500/25 dark:bg-green-950/35",header:"text-green-700 dark:text-green-300",count:"text-green-700/65 dark:text-green-300/65",body:"bg-green-50/45 ring-1 ring-inset ring-green-500/15 dark:bg-green-950/15",bodyOver:"bg-green-100/70 ring-1 ring-inset ring-green-500/25 dark:bg-green-950/30",card:""},cancelled:{rail:"border-neutral-300/70 bg-bg-3/25 opacity-80 dark:border-neutral-700/70 dark:bg-neutral-900/20",railOver:"bg-bg-3/45 opacity-90 ring-1 ring-neutral-400/25 dark:bg-neutral-900/35",header:"text-ink-3/80",count:"text-ink-3/50",body:"bg-bg-3/25 ring-1 ring-inset ring-line/50",bodyOver:"bg-bg-3/45 ring-1 ring-inset ring-neutral-400/25",card:"bg-bg-3/35 text-ink-3 opacity-80 hover:shadow-none"}};function yF(e){return vF[e]??bF}r(yF,"getKanbanColumnTone");function Xh(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}r(Xh,"statusLabel");function jF(e,t){return d0.includes(e)?e:t.find(s=>s.id===e)?.status??null}r(jF,"resolveKanbanTargetStatus");function wF({status:e,issues:t,agents:s,liveIssueIds:l,liveRunsByIssueId:c,pauseStateByIssueId:u,subtreeLiveCounts:p,compactCards:f=!1,collapsed:h=!1,visibleCount:g,revealIncrement:v,onShowMore:y}){const{setNodeRef:j,isOver:k}=LC({id:e});t.length;const S=h?[]:t.slice(0,g),N=Math.max(t.length-S.length,0),I=Math.min(v,N),C=yF(e);return h?(0,a.jsxs)("div",{ref:j,className:Y("flex min-h-(--sz-220px) w-(--sz-52px) shrink-0 flex-col items-center rounded-md border px-1.5 py-2 transition-colors",C.rail,k&&C.railOver),title:`${Xh(e)}: ${t.length}`,children:[(0,a.jsx)(ei,{status:e}),(0,a.jsx)("span",{className:Y("mt-2 [writing-mode:vertical-rl] rotate-180 text-(length:--text-nano) font-semibold uppercase tracking-wide",C.header),children:Xh(e)}),(0,a.jsx)(Dn,{variant:"ghost",className:Y("mt-auto bg-bg px-1.5 text-(length:--text-nano) tabular-nums",C.header),children:t.length})]}):(0,a.jsxs)("div",{className:"flex flex-col shrink-0 min-w-(--sz-260px) w-(--sz-260px)",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 mb-1",children:[(0,a.jsx)(ei,{status:e}),(0,a.jsx)("span",{className:Y("text-xs font-semibold uppercase tracking-wide",C.header),children:Xh(e)}),(0,a.jsx)("span",{className:Y("ml-auto text-xs tabular-nums",C.count),children:t.length})]}),(0,a.jsxs)("div",{ref:j,className:Y("flex-1 min-h-(--sz-120px) rounded-md p-2 space-y-1 transition-colors",k?C.bodyOver:C.body),children:[(0,a.jsx)(rx,{items:S.map(M=>M.id),strategy:PC,children:S.map(M=>(0,a.jsx)(I2,{issue:M,agents:s,isLive:l?.has(M.id),liveRuns:c?.get(M.id),pauseState:u?.get(M.id),subtreeLiveCount:p?.get(M.id)??0,compact:f,className:C.card},M.id))}),N>0?(0,a.jsxs)("button",{type:"button",className:"mt-1 flex w-full items-center justify-center rounded-md border border-dashed border-line bg-bg/70 px-2 py-2 text-xs font-medium text-ink-3 transition-colors hover:border-ink/30 hover:text-ink",onClick:y,children:["Show ",I," more"]}):null,t.length>0&&(N>0||t.length>=g)?(0,a.jsxs)("p",{className:"px-1 pt-1 text-(length:--text-micro) text-ink-3",children:["Showing ",S.length," of ",t.length]}):null]})]})}r(wF,"KanbanColumn");function I2({issue:e,agents:t,isLive:s,liveRuns:l,pauseState:c,subtreeLiveCount:u=0,isOverlay:p,compact:f=!1,className:h}){const{attributes:g,listeners:v,setNodeRef:y,transform:j,transition:k,isDragging:S}=lx({id:e.id,data:{issue:e}}),N={transform:ni.Transform.toString(j),transition:k},I=r(C=>!C||!t?null:t.find(M=>M.id===C)?.name??null,"agentName");return(0,a.jsx)(Hc,{ref:y,style:N,...g,...v,className:Y("block cursor-grab active:cursor-grabbing transition-shadow",S&&!p?"opacity-30":"",p?"shadow-lg ring-1 ring-accent/20":"hover:shadow-sm",f?"p-2":"p-2.5",h),children:(0,a.jsxs)(mn,{to:`/issues/${e.identifier??e.id}`,disableIssueQuicklook:!0,className:"block no-underline text-inherit",onClick:r(C=>{S&&C.preventDefault()},"onClick"),children:[(0,a.jsxs)("div",{className:`flex items-start gap-1.5 ${f?"mb-1":"mb-1.5"}`,children:[(0,a.jsx)("span",{className:"text-xs text-ink-3 font-mono shrink-0",children:e.identifier??e.id.slice(0,8)}),_2(e)?(0,a.jsxs)(Dn,{variant:"outline",className:"border-amber-400/45 bg-amber-50/60 px-1.5 text-(length:--text-nano) text-amber-700 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300",title:"This task needs a next step","aria-label":"Needs next step",children:[(0,a.jsx)(ai,{className:"h-3 w-3"}),"Next step"]}):null,c?(0,a.jsx)(NF,{state:c}):s&&(0,a.jsx)(kF,{runs:l}),!s&&u>0&&(0,a.jsxs)(Dn,{variant:"outline",className:"border-line px-1.5 text-(length:--text-nano) text-ink-3",title:`${u} sub-task${u===1?"":"s"} running below`,children:[(0,a.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full border border-ink-3/60","aria-hidden":"true"}),u," live below"]})]}),(0,a.jsx)("p",{className:`${f?"mb-1.5 text-xs":"mb-2 text-sm"} leading-snug line-clamp-2`,children:e.title}),(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[!1,e.assigneeAgentId&&(()=>{const C=I(e.assigneeAgentId);return C?(0,a.jsx)(co,{agent:t?.find(M=>M.id===e.assigneeAgentId)??{id:e.assigneeAgentId,name:C},size:"xs"}):(0,a.jsx)("span",{className:"text-xs text-ink-3 font-mono",children:e.assigneeAgentId.slice(0,8)})})()]})]})})}r(I2,"KanbanCard");function kF({runs:e}){const t=A2(e??CF),s=e&&e.length>0?S2(e.map(c=>Ax(c,t))).health:"active",l=s==="stalled"?"Stalled":s==="quiet"?"Quiet":"Live";return(0,a.jsxs)("span",{"data-live-marker":l.toLowerCase(),"data-live-health":s,className:Y("inline-flex shrink-0 items-center gap-1 text-(length:--text-nano) font-medium",l==="Live"?"text-blue-600 dark:text-blue-400":"text-ink-2"),children:[l==="Live"?(0,a.jsxs)("span",{"aria-hidden":"true",className:"relative flex h-2 w-2",children:[(0,a.jsx)("span",{className:"animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75 motion-reduce:animate-none"}),(0,a.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"})]}):(0,a.jsx)("span",{"aria-hidden":"true",className:"live-now-health-dot h-2 w-2 rounded-full"}),l]})}r(kF,"KanbanLiveMarker");var SF={pausing:"Pausing",paused:"Paused",pause_failed:"Pause failed"};function NF({state:e}){return(0,a.jsxs)("span",{"data-live-marker":e,"data-live-health":e,className:"inline-flex shrink-0 items-center gap-1 text-(length:--text-nano) font-medium text-ink-2",children:[(0,a.jsx)(q0,{"aria-hidden":"true",className:"live-now-health-icon h-3 w-3"}),SF[e]]})}r(NF,"KanbanPausedMarker");var CF=[];function AF({issues:e,agents:t,liveIssueIds:s,liveRunsByIssueId:l,pauseStateByIssueId:c,compactCards:u=!1,collapsedStatuses:p=[],initialVisibleCount:f=10,revealIncrement:h=10,onUpdateIssue:g}){const[v,y]=(0,x.useState)(null),j=`${f}:${h}`,[k,S]=(0,x.useState)({paginationKey:j,counts:{}}),N=k.paginationKey===j?k.counts:{},I=(0,x.useMemo)(()=>new Set(p),[p]),C=J0(Mc(Yf,{activationConstraint:{distance:5}})),M=(0,x.useMemo)(()=>{const z={};for(const E of d0)z[E]=[];for(const E of e)z[E.status]&&z[E.status].push(E);return z},[e]),R=(0,x.useMemo)(()=>v?e.find(z=>z.id===v):null,[v,e]),_=(0,x.useMemo)(()=>x2(e,s??new Set),[e,s]);function D(z){y(z.active.id)}r(D,"handleDragStart");function U(z){y(null);const{active:E,over:B}=z;if(!B)return;const O=E.id,Q=e.find(ue=>ue.id===O);if(!Q)return;const V=jF(B.id,e);V&&V!==Q.status&&g(O,{status:V})}r(U,"handleDragEnd");function K(z){}return r(K,"handleDragOver"),(0,a.jsxs)(sx,{sensors:C,onDragStart:D,onDragOver:K,onDragEnd:U,children:[(0,a.jsx)("div",{className:"flex gap-3 overflow-x-auto pb-4 -mx-2 px-2",children:d0.map(z=>(0,a.jsx)(wF,{status:z,issues:M[z]??[],agents:t,liveIssueIds:s,liveRunsByIssueId:l,pauseStateByIssueId:c,subtreeLiveCounts:_,compactCards:u,collapsed:I.has(z)||I.size>0&&M[z].length===0,visibleCount:N[z]??f,revealIncrement:h,onShowMore:r(()=>{S(E=>{const B=E.paginationKey===j?E.counts:{};return{paginationKey:j,counts:{...B,[z]:(B[z]??f)+h}}})},"onShowMore")},z))}),(0,a.jsx)(o4,{children:R?(0,a.jsx)(I2,{issue:R,agents:t,isOverlay:!0,compact:u}):null})]})}r(AF,"KanbanBoard");function Cf(e,t){const s=new Set(e.map(p=>p.id)),l=r(p=>!p.parentId||!s.has(p.parentId)||t?.has(p.id)===!0,"isRoot"),c=e.filter(l),u=new Map;for(const p of e)if(p.parentId&&!l(p)){const f=u.get(p.parentId)??[];f.push(p),u.set(p.parentId,f)}return{roots:c,childMap:u}}r(Cf,"buildIssueTree");function T2(e,t){return(t.get(e)??[]).reduce((s,l)=>s+1+T2(l.id,t),0)}r(T2,"countDescendants");function rX(e,t){const s=new Map;for(const p of t){if(!p.parentId)continue;const f=s.get(p.parentId)??[];f.push(p),s.set(p.parentId,f)}const l=[],c=new Set([e]);let u=[e];for(;u.length>0;){const p=[];for(const f of u)for(const h of s.get(f)??[])c.has(h.id)||(c.add(h.id),l.push(h),p.push(h.id));u=p}return l}r(rX,"filterIssueDescendants");function _F(e,t){const s=e.currentExecutionWorkspace?.name??e.currentExecutionWorkspace?.branchName??e.currentExecutionWorkspace?.cwd??e.executionWorkspaceId??null,l=e.assigneeUserId&&e.assigneeUserId!==t?e.assigneeUserId??void 0:void 0;return{parentId:e.id,parentIdentifier:e.identifier??void 0,parentTitle:e.title,...e.projectId?{projectId:e.projectId}:{},...e.projectWorkspaceId?{projectWorkspaceId:e.projectWorkspaceId}:{},...e.goalId?{goalId:e.goalId}:{},...e.executionWorkspaceId?{executionWorkspaceId:e.executionWorkspaceId}:{},...e.executionWorkspaceId?{executionWorkspaceMode:"reuse_existing"}:e.executionWorkspacePreference?{executionWorkspaceMode:e.executionWorkspacePreference}:{},...s?{parentExecutionWorkspaceLabel:s}:{},...e.assigneeAgentId?{assigneeAgentId:e.assigneeAgentId}:{},...l?{assigneeUserId:l}:{}}}r(_F,"buildSubIssueDefaultsForViewer");function R2(){return typeof localStorage>"u"?null:localStorage}r(R2,"browserStorage");function Zh(e,t){if(!t)return null;try{const s=e.getItem(t);return s==null?null:JSON.parse(s)}catch{return null}}r(Zh,"parseStoredJson");function M2({companyId:e,collectionKey:t}){return`wardmote:task-collection:v1:${encodeURIComponent(e)}:${encodeURIComponent(t)}`}r(M2,"taskCollectionPreferencesStorageKey");function EF(e,t){if(!e||typeof e!="object")return!1;const s=e;return s.version===1&&s.companyId===t.companyId&&s.collectionKey===t.collectionKey&&"viewState"in s&&Array.isArray(s.columns)}r(EF,"isCurrentEnvelope");function f0(e,t,s=R2()){if(!s)return;const l={version:1,companyId:e.companyId,collectionKey:e.collectionKey,viewState:t.viewState,viewStateSource:t.viewStateSource??"stored",columns:t.columns};try{s.setItem(M2(e),JSON.stringify(l)),e.legacyViewStorageKey&&s.setItem(e.legacyViewStorageKey,JSON.stringify(t.viewState)),e.legacyColumnsStorageKey&&s.setItem(e.legacyColumnsStorageKey,JSON.stringify(t.columns))}catch{}}r(f0,"saveTaskCollectionPreferences");function IF({storage:e=R2(),defaultViewState:t,defaultColumns:s,normalizeViewState:l,normalizeColumns:c,...u}){if(!e)return{viewState:t,columns:s,migrated:!1,source:"default"};const p=Zh(e,M2(u));if(EF(p,u))return{viewState:l(p.viewState),columns:c(p.columns),migrated:!1,source:p.viewStateSource==="default"?"default":"current"};const f=Zh(e,u.legacyViewStorageKey),h=Zh(e,u.legacyColumnsStorageKey),g=f!==null||h!==null,v={viewState:f===null?t:l(f),columns:h===null?s:c(h)};return g&&f0(u,{...v,viewStateSource:f===null?"default":"stored"},e),{...v,migrated:g,source:f!==null?"legacy":"default"}}r(IF,"loadTaskCollectionPreferences");var TF={today:"Today",yesterday:"Yesterday",earlier:"Earlier"};function Vk(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())}r(Vk,"localCalendarOrdinal");function RF(e,t=new Date){const s=e instanceof Date?e:new Date(e);if(Number.isNaN(s.getTime()))return"earlier";const l=Math.round((Vk(t)-Vk(s))/864e5);return l<=0?"today":l===1?"yesterday":"earlier"}r(RF,"taskDateGroup");function MF(e,t){return e===t||e===null&&t==="earlier"?null:TF[t]}r(MF,"taskDateGroupSeparator");var Td=200,Rd=200;function Wk(e){const t=new Date(e.startedAt??e.createdAt).getTime();return Number.isFinite(t)?t:0}r(Wk,"runStartMs");function DF(e,t){const s=new Map(t.map(c=>[c.id,c.status])),l=new Map;for(const c of e??[]){if(!c.issueId||!c.modelFallback||!mo(c,s.get(c.issueId)))continue;const u=l.get(c.issueId);(!u||Wk(c)>Wk(u))&&l.set(c.issueId,c)}return l}r(DF,"fallbackRunsByIssueId");function Md(e){return e.type==="group"?`group:${e.key}`:`issue:${e.issue.id}`}r(Md,"issuesListNavEntryKey");function p0(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/["\\]/g,"\\$&")}r(p0,"escapeAttrValue");var D2=100,OF=150,LF=320;function Dd(e){if(!e||typeof window>"u")return null;let t=e.parentElement;for(;t&&t!==document.body&&t!==document.documentElement;){const s=window.getComputedStyle(t).overflowY;if(s==="auto"||s==="scroll"||s==="overlay")return t;t=t.parentElement}return null}r(Dd,"findIssuesScrollContainer");var zF=12,PF=24;function O2(e){if(!e)return{top:0,bottom:window.innerHeight};const t=e.getBoundingClientRect();return{top:t.top,bottom:t.top+e.clientHeight}}r(O2,"issuesViewportBounds");function $F(e,t,s){const l=e.querySelectorAll("[data-issue-row-id]"),c=O2(t);let u=0,p=l.length;for(;u<p;){const h=u+p>>1;l[h].getBoundingClientRect().bottom<=c.top?u=h+1:p=h}const f=[];for(let h=u;h<l.length&&f.length<zF;h+=1){const g=l[h].getBoundingClientRect();if(g.top>=c.bottom)break;f.push({id:l[h].dataset.issueRowId,top:g.top-c.top})}return{identity:s,rows:f}}r($F,"captureIssueRowScrollAnchor");function UF(e,t,s){const l=O2(t),c=[];if(s.rows.forEach(({id:f,top:h},g)=>{const v=e.querySelector(`[data-issue-row-id="${p0(f)}"]`);v&&c.push({shift:Math.round(v.getBoundingClientRect().top-l.top-h),index:g})}),c.length===0)return null;c.sort((f,h)=>f.shift-h.shift);let u=null,p=0;for(let f=1;f<=c.length;f+=1){if(f<c.length&&c[f].shift-c[f-1].shift<=PF)continue;const h=c.slice(p,f),g=h.reduce((v,y)=>y.index<v.index?y:v);(!u||h.length>u.count||h.length===u.count&&g.index<u.first.index)&&(u={count:h.length,first:g}),p=f}return u.first.shift}r(UF,"issueRowAnchorShift");var BF=Bc,KF={backlog:"Backlog",todo:"Todo",in_progress:"In progress",in_review:"In review",done:"Done",blocked:"Blocked",cancelled:"Cancelled"},qF={backlog:"bg-ink-3/40",todo:"bg-blue-500",in_progress:"bg-yellow-500",in_review:"bg-violet-500",done:"bg-green-500",blocked:"bg-red-500",cancelled:"bg-neutral-400"},qd={...YS,sortField:"updated",sortDir:"desc",groupBy:"none",viewMode:"list",nestingEnabled:!0,showDateGroupSeparators:!0,collapsedGroups:[],collapsedParents:[],boardCardDensity:"auto",boardColdLaneMode:"expanded",boardColumnPageSize:10};function FF(e){return e==="compact"||e==="comfortable"||e==="auto"?e:"auto"}r(FF,"normalizeBoardCardDensity");function HF(e){return e==="collapsed"||e==="expanded"||e==="auto"?e:"auto"}r(HF,"normalizeBoardColdLaneMode");function VF(e){return E2.includes(e)?e:10}r(VF,"normalizeBoardColumnPageSize");function WF(e){const t=e&&typeof e=="object"?e:{};return{...qd,...t,...aT(t),workspaces:[],sortField:["status","priority","title","created","updated","workflow"].includes(t.sortField??"")?t.sortField:qd.sortField,sortDir:t.sortDir==="asc"?"asc":"desc",groupBy:["status","priority","assignee","project","workspace","parent","none"].includes(t.groupBy??"")?t.groupBy:qd.groupBy,viewMode:t.viewMode==="board"?"board":"list",nestingEnabled:t.nestingEnabled!==!1,showDateGroupSeparators:t.showDateGroupSeparators!==!1,collapsedGroups:Array.isArray(t.collapsedGroups)?t.collapsedGroups.filter(s=>typeof s=="string"):[],collapsedParents:Array.isArray(t.collapsedParents)?t.collapsedParents.filter(s=>typeof s=="string"):[],boardCardDensity:FF(t.boardCardDensity),boardColdLaneMode:HF(t.boardColdLaneMode),boardColumnPageSize:VF(t.boardColumnPageSize)}}r(WF,"normalizeIssueViewState");function QF(e,t,s){const l=e.source==="default"&&s?{...e.viewState,sortField:s,sortDir:"asc"}:e.viewState;return t?{...l,assignees:t,statuses:[]}:l}r(QF,"getInitialViewState");function Qk(e,t,s,l,c){const u=QF(e,t,l),p=s?{...u,workspaces:s,statuses:[]}:u;return c?{...p,statuses:c}:p}r(Qk,"getInitialWorkspaceViewState");function GF(e){return`${e}:issue-columns`}r(GF,"getIssueColumnsStorageKey");function L2(e,t){const s=e?`${t}:${e}`:t;return{companyId:e??"__unscoped__",collectionKey:t,legacyViewStorageKey:s,legacyColumnsStorageKey:GF(s)}}r(L2,"issueCollectionPreferenceLocation");function lX(e,t){return m0(L2(e,t)).viewState.showHiddenTasks}r(lX,"loadStoredShowHiddenTasks");function m0(e){return IF({...e,defaultViewState:qd,defaultColumns:JN,normalizeViewState:WF,normalizeColumns:r(t=>nC(Array.isArray(t)?t:[]),"normalizeColumns")})}r(m0,"loadIssueCollectionPreferences");function YF(e,t){if(t.sortField==="workflow"){const c=g2(e);return t.sortDir==="desc"?[...c].reverse():c}const s=[...e],l=t.sortDir==="asc"?1:-1;return s.sort((c,u)=>{switch(t.sortField){case"status":return l*(Zd.indexOf(c.status)-Zd.indexOf(u.status));case"priority":return l*(ug.indexOf(c.priority)-ug.indexOf(u.priority));case"title":return l*c.title.localeCompare(u.title);case"created":return l*(new Date(c.createdAt).getTime()-new Date(u.createdAt).getTime());case"updated":return l*ZF(c,u);default:return 0}}),s}r(YF,"sortIssues");var Gk=new Map;function XF(e,t,s,l,c){const u=Math.min(s.length,Math.max(D2,c));if(!e||e.identity!==t)return u;if(e.ids===s)return Math.min(s.length,Math.max(e.limit,l,u));const p=new Map;s.forEach((g,v)=>p.set(g,v));const f=Math.min(e.limit,e.ids.length);let h=-1;for(let g=0;g<f;g+=1){const v=p.get(e.ids[g]);v!==void 0&&v>h&&(h=v)}return Math.min(s.length,Math.max(h+1,l,u))}r(XF,"nextIssueRowRenderLimit");function h0(e){return e.lastActivityAt??e.updatedAt}r(h0,"issueRecencyDate");function ZF(e,t){const s=new Date(h0(e)).getTime()-new Date(h0(t)).getTime();return s!==0?s:new Date(e.updatedAt).getTime()-new Date(t.updatedAt).getTime()}r(ZF,"compareIssueRecency");function JF(e){return e.sortDir!=="desc"?null:e.sortField==="created"?t=>t.createdAt:e.sortField==="updated"?h0:null}r(JF,"issueDateSeparatorDate");var z2=864e5,eH=7*z2;function tH(e,t=Date.now()){const s=t-new Date(e).getTime();return s<z2?0:s<eH?1:2}r(tH,"issueAgeBucket");function nH(e){return e===1?"Older than a day":"Older than a week"}r(nH,"issueAgeSeparatorLabel");function aH(e,t){const s=[];return e<1&&t>=1&&s.push(1),e<2&&t>=2&&s.push(2),s}r(aH,"issueAgeBucketsCrossed");function Yk({label:e}){return(0,a.jsxs)("div",{className:"flex items-center gap-3 px-3 py-1.5 sm:pl-0 sm:pr-4",role:"separator","aria-label":e,"data-issues-date-separator":"",children:[(0,a.jsx)("span",{className:"h-px min-w-0 flex-1 bg-line/80","aria-hidden":"true","data-date-group-rule":""}),(0,a.jsx)("span",{className:"shrink-0 text-(length:--text-nano) font-medium uppercase tracking-wider text-ink-3/70","data-date-group-label":"",children:e}),(0,a.jsx)("span",{className:"h-px min-w-0 flex-1 bg-line/80","aria-hidden":"true","data-date-group-rule":""})]})}r(Yk,"IssueDateSeparator");function sH(e){return e!=="done"&&e!=="cancelled"&&e!=="blocked"}r(sH,"isActionableWorkflowStatus");function iH(e,t){const s=new Map;if(!t)return e.forEach((p,f)=>{s.set(p.id,String(f+1))}),s;const{roots:l,childMap:c}=Cf(e),u=r((p,f)=>{p.forEach((h,g)=>{const v=f?`${f}.${g+1}`:String(g+1);s.set(h.id,v),u(c.get(h.id)??[],v)})},"visit");return u(l,null),e.forEach((p,f)=>{s.has(p.id)||s.set(p.id,String(f+1))}),s}r(iH,"buildChecklistStepNumberMap");function rH(e,t){const s=new Map;if(!t){const p=new Map;for(const f of e){if(!f.parentId)continue;const h=p.get(f.parentId);h&&s.set(f.id,h.id),p.set(f.parentId,f)}return s}const{roots:l,childMap:c}=Cf(e),u=r(p=>{p.forEach((f,h)=>{const g=h>0?p[h-1]:null;f.parentId&&g?.parentId===f.parentId&&s.set(f.id,g.id),u(c.get(f.id)??[])})},"visit");return u(l),s}r(rH,"buildPreviousSiblingIssueIdMap");function lH(e,t,s){return!!(e.parentId&&s&&(e.blockedBy??[]).length===1&&t.length===1&&t[0]===s)}r(lH,"shouldSuppressSinglePreviousSiblingBlockerChip");function oH({context:e,search:t,controls:s}){return(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2 sm:gap-3",children:[e,t]}),(0,a.jsx)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-1",children:s})]})}r(oH,"LegacyIssuesToolbar");function cH({value:e,context:t,onDebouncedChange:s}){return(0,a.jsx)(c9,{value:e,context:t,onChange:r(({raw:l})=>s(l),"onChange"),ariaLabel:"Search tasks",className:"w-full sm:w-64 md:w-80",inputClassName:"text-xs sm:text-sm",pageSearchTarget:!0,onKeyDown:r(l=>{if(L8({key:l.key,isComposing:l.nativeEvent.isComposing})){l.currentTarget.blur();return}z8({key:l.key,isComposing:l.nativeEvent.isComposing,currentValue:l.currentTarget.value})&&l.currentTarget.blur()},"onKeyDown")})}r(cH,"IssueSearchInput");function uH({summary:e,issueLinkState:t,parentIssueIdForCostSummary:s}){const l=e.target,c=l?.issue??null,u=c?.identifier??c?.id??"",p=c?N0(t,c):void 0,f=Bc.map(k=>({status:k,count:e.countsByStatus[k]??0})).filter(k=>k.count>0),h=e.inProgressCount>0,g=Y7({visibleMs:5e3}),{data:v}=me({queryKey:$.issues.costSummary(s??"pending",{excludeRoot:!0}),queryFn:r(()=>cn.getCostSummary(s,{excludeRoot:!0}),"queryFn"),enabled:!!s,refetchInterval:h?g:!1}),y=v?v.inputTokens+v.cachedInputTokens+v.outputTokens:0,j=!!v&&(v.runCount>0||y>0);return(0,a.jsx)("div",{className:"border border-line bg-bg p-3",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-sm",children:[(0,a.jsxs)("span",{className:"font-medium text-ink",children:[e.doneCount,"/",e.totalCount," done"]}),(0,a.jsxs)("span",{className:"text-ink-3",children:[e.inProgressCount," in progress"]}),(0,a.jsxs)("span",{className:"text-ink-3",children:[e.blockedCount," blocked"]}),j&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"text-ink-3 tabular-nums",title:`${v.runCount.toLocaleString()} run${v.runCount===1?"":"s"} across ${v.issueCount} sub-task${v.issueCount===1?"":"s"}`,children:[DE(y)," tokens"]}),(0,a.jsxs)("span",{className:"text-ink-3 tabular-nums",children:[_E(v.runtimeMs)," runtime"]})]})]}),(0,a.jsx)("div",{role:"progressbar","aria-label":"Sub-tasks completion progress","aria-valuemin":0,"aria-valuenow":e.doneCount,"aria-valuemax":e.totalCount,className:"flex h-2 w-full overflow-hidden rounded-full bg-bg-3",children:f.map(({status:k,count:S})=>(0,a.jsx)("span",{className:Y("h-full",qF[k]),style:{width:`${S/e.totalCount*100}%`},title:`${KF[k]}: ${S}`,"aria-hidden":"true"},k))})]}),(0,a.jsx)("div",{className:"min-w-0 border border-line bg-bg px-3 py-2 text-sm lg:w-72",children:l&&c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"text-xs font-medium text-ink-3",children:l.kind==="next"?"Next up":"Waiting on blockers"}),(0,a.jsxs)(mn,{to:Vd(u),state:p,issuePrefetch:c,className:"mt-1 block min-w-0 text-ink underline-offset-2 hover:underline",children:[(0,a.jsx)("span",{className:"font-mono text-xs text-ink-3",children:c.identifier??c.id.slice(0,8)})," ",(0,a.jsx)("span",{children:c.title})]})]}):e.totalCount===0?(0,a.jsx)("div",{className:"text-sm font-medium text-ink",children:"No active sub-tasks"}):e.doneCount===e.totalCount?(0,a.jsx)("div",{className:"text-sm font-medium text-ink",children:"All sub-tasks done"}):(0,a.jsx)("div",{className:"text-sm font-medium text-ink",children:"No actionable sub-tasks"})})]})})}r(uH,"SubIssueProgressSummaryStrip");var Xk=["","pl-4 sm:pl-0","pl-8 sm:pl-0","pl-12 sm:pl-0","pl-16 sm:pl-0"];function dH(e){return(0,a.jsx)(fH,{...e})}r(dH,"IssuesList");function fH({issues:e,isLoading:t,error:s,agents:l,projects:c,liveIssueIds:u,liveRuns:p,projectId:f,viewStateKey:h,issueLinkState:g,initialAssignees:v,initialWorkspaces:y,initialStatuses:j,initialSearch:k,searchFilters:S,searchWithinLoadedIssues:N=!1,baseCreateIssueDefaults:I,createIssueLabel:C,defaultSortField:M,showProgressSummary:R=!1,parentIssueIdForCostSummary:_,enableRoutineVisibilityFilter:D=!1,onShowHiddenTasksChange:U,hasMoreIssues:K=!1,isLoadingMoreIssues:z=!1,mutedIssueIds:E,issueBadgeById:B,onLoadMoreIssues:O,onSearchChange:Q,rowPresentation:V="legacy",toolbarContext:ue,toolbarPresentation:ce="legacy",listHeader:X,onUpdateIssue:A}){const ee=(0,x.useRef)(null),ie=ja(),le=hn().key,Ae=kn(),[de,we]=(0,x.useState)(null),ye=(0,x.useRef)(!0);(0,x.useEffect)(()=>{const F=r(()=>{ye.current=!0},"handlePointerMove");return window.addEventListener("mousemove",F,{passive:!0}),()=>window.removeEventListener("mousemove",F)},[]);const Me=(0,x.useRef)(null),he=(0,x.useCallback)(F=>{ye.current&&(Me.current=F,we(W=>W===null?W:null))},[]),{selectedCompanyId:ve}=bt(),{openNewIssue:et}=Us(),{data:$e}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),{data:Ie}=me({queryKey:$.access.companyUserDirectory(ve),queryFn:r(()=>ti.listUserDirectory(ve),"queryFn"),enabled:!!ve}),{data:ct}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),retry:!1}),He=$e?.user?.id??$e?.session?.userId??null,vt=ct!==void 0,Jt=ct?.enableIsolatedWorkspaces===!0,ge=ct?.enableExternalObjects===!0,Oe=ve?`${h}:${ve}`:h,De=L2(ve,h),ut=v?.join("|")??"",Ht=y?.join("|")??"",Vt=j?`set:${j.join("|")}`:"",gt=(0,x.useRef)(null);gt.current===null&&(gt.current=m0(De));const un=gt.current,[P,qe]=(0,x.useState)(()=>Qk(un,v,y,M,j)),[Ye,xt]=(0,x.useState)(null),[at,Kt]=(0,x.useState)(""),[ea,en]=(0,x.useState)(k??""),[Mt,Gt]=(0,x.useState)(D2),[dt,On]=(0,x.useState)(un.columns),mt=(0,x.useRef)(!1),[Nn,It]=(0,x.useState)(!1),tn=(0,x.useDeferredValue)(ea).trim().toLowerCase();(0,x.useEffect)(()=>{en(k??"")},[k]);const{data:qt}=me({queryKey:$.issues.labels(ve),queryFn:r(()=>cn.listLabels(ve),"queryFn"),enabled:!!ve}),Tt=(0,x.useMemo)(()=>({currentUserId:He,agents:l,projects:c,labels:qt}),[l,He,qt,c]),Ct=(0,x.useMemo)(()=>uo(tn,Tt),[tn,Tt]),_e=Ct.query,Re=_e.length>0||sA(Ct.filters),lt=Re&&!N;(0,x.useEffect)(()=>{Re||It(!1)},[Re]);const Dt=(0,x.useRef)(`${Oe}::${ut}::${Ht}::${Vt}`);(0,x.useEffect)(()=>{const F=`${Oe}::${ut}::${Ht}::${Vt}`;if(Dt.current!==F){Dt.current=F;const W=m0(De);qe(Qk(W,v,y,M,j)),On(W.columns)}},[Oe,v,ut,y,Ht,j,Vt,M,De.companyId,De.collectionKey,De.legacyViewStorageKey,De.legacyColumnsStorageKey]);const ze=(0,x.useCallback)(F=>{qe(W=>{const J={...W,...F};return f0(De,{viewState:J,columns:dt}),J})},[De.companyId,De.collectionKey,De.legacyColumnsStorageKey,De.legacyViewStorageKey,dt]);(0,x.useEffect)(()=>{!vt||ge||P.externalObjectStatuses.length===0||ze({externalObjectStatuses:[]})},[vt,ge,ze,P.externalObjectStatuses.length]),(0,x.useEffect)(()=>{const F=new Set(e.map(J=>J.parentId).filter(Boolean)),W=P.collapsedParents.filter(J=>F.has(J));W.length!==P.collapsedParents.length&&ze({collapsedParents:W})},[e]);const Ot=U!==void 0,Rt=Ot&&P.showHiddenTasks;(0,x.useEffect)(()=>{U?.(Rt)},[Rt,U]);const Lt=(0,x.useMemo)(()=>{if(!Re)return{};const F={...xP(P),...rA(Ct.filters)};return f&&(F.projectId=f),F},[Re,Ct.filters,f,P]),{data:nn=[]}=me({queryKey:[...$.issues.search(ve,_e,f),S??{},Lt,"compact",Td,D?"with-routine-executions":"without-routine-executions",Rt?"with-hidden":"without-hidden"],queryFn:r(({signal:F})=>cn.listCompact(ve,{...Lt,..._e.length>0?{q:_e}:{},projectId:f,limit:Td,...S,...D?{includeRoutineExecutions:!0}:{},...Rt?{includeHidden:!0}:{}},{signal:F}).then(W=>W),"queryFn"),enabled:!!ve&<,placeholderData:r(F=>F,"placeholderData")}),Wt=Ef({queries:BF.map(F=>({queryKey:[...$.issues.list(ve??"__no-company__"),"board-column",F,_e,Lt,f??"__all-projects__",S??{},"compact",Rd,D?"with-routine-executions":"without-routine-executions",Rt?"with-hidden":"without-hidden"],queryFn:r(({signal:W})=>Lt.status&&!Lt.status.split(",").includes(F)?Promise.resolve([]):cn.listCompact(ve,{...Lt,...S,..._e.length>0?{q:_e}:{},projectId:f,status:F,limit:Rd,...D?{includeRoutineExecutions:!0}:{},...Rt?{includeHidden:!0}:{}},{signal:W}).then(J=>J),"queryFn"),enabled:!!ve&&P.viewMode==="board"&&!N,placeholderData:r(W=>W,"placeholderData")}))}),{data:Ln=[]}=me({queryKey:ve?$.executionWorkspaces.summaryList(ve):["execution-workspaces","__disabled__"],queryFn:r(()=>ep.listSummaries(ve),"queryFn"),enabled:!!ve&&Jt}),gn=(0,x.useCallback)(F=>!F||!l?null:l.find(W=>W.id===F)?.name??null,[l]),zn=(0,x.useMemo)(()=>$P(Ie?.users),[Ie?.users]),is=(0,x.useMemo)(()=>UP(Ie?.users),[Ie?.users]),La=(0,x.useMemo)(()=>{const F=new Map;for(const W of c??[])F.set(W.id,{name:W.name,color:W.color??null});return F},[c]),wa=(0,x.useMemo)(()=>{const F=new Map;for(const W of c??[])for(const J of W.workspaces??[])F.set(J.id,{name:J.name||W.name,projectId:W.id});return F},[c]),ka=(0,x.useMemo)(()=>{const F=new Map;for(const W of c??[]){const J=W.executionWorkspacePolicy?.defaultProjectWorkspaceId??W.primaryWorkspace?.id??null;J&&F.set(W.id,J)}return F},[c]),Qn=(0,x.useMemo)(()=>new Set(ka.values()),[ka]),yt=(0,x.useMemo)(()=>{const F=new Map;for(const W of Ln){const J=W.projectWorkspaceId?wa.get(W.projectWorkspaceId)??null:null;F.set(W.id,{name:W.name,mode:W.mode,projectWorkspaceId:W.projectWorkspaceId??null,projectId:J?.projectId??null})}return F},[Ln,wa]),dn=(0,x.useMemo)(()=>({executionWorkspaceById:yt,defaultProjectWorkspaceIdByProjectId:ka}),[ka,yt]),za=(0,x.useMemo)(()=>{const F=new Map;for(const[W,J]of wa)Xy({id:W},Qn)&&F.set(W,J.name);for(const[W,J]of yt)Xy({id:W,mode:J.mode,projectWorkspaceId:J.projectWorkspaceId},Qn)&&F.set(W,J.name);return F},[Qn,yt,wa]),si=(0,x.useMemo)(()=>{const F=new Map,W=new Set;He&&F.set(`user:${He}`,{id:`user:${He}`,label:He==="local-board"?"Board":"Me",kind:"user",searchText:He==="local-board"?"board me human local-board":`me board human ${He}`});for(const J of e)if(J.createdByUserId){const Ee=`user:${J.createdByUserId}`;F.has(Ee)||F.set(Ee,{id:Ee,label:Vr(J.createdByUserId,He)??J.createdByUserId.slice(0,5),kind:"user",searchText:`${J.createdByUserId} board user human`})}for(const J of l??[]){W.add(J.id);const Ee=`agent:${J.id}`;F.has(Ee)||F.set(Ee,{id:Ee,label:J.name,kind:"agent",searchText:`${J.name} ${J.id} agent`})}for(const J of e)if(J.createdByAgentId&&!W.has(J.createdByAgentId)){const Ee=`agent:${J.createdByAgentId}`;F.has(Ee)||F.set(Ee,{id:Ee,label:J.createdByAgentId.slice(0,8),kind:"agent",searchText:`${J.createdByAgentId} agent`})}return[...F.values()].sort((J,Ee)=>J.kind!==Ee.kind?J.kind==="user"?-1:1:J.label.localeCompare(Ee.label))},[l,He,e]),pn=(0,x.useMemo)(()=>new Set(dt),[dt]),Bs=(0,x.useMemo)(()=>Y5(Jt),[Jt]),Pn=(0,x.useMemo)(()=>new Set(Bs),[Bs]),ra=(0,x.useMemo)(()=>x2(e,u??new Set),[e,u]),ma=(0,x.useMemo)(()=>DF(p,e),[e,p]),ha=(0,x.useMemo)(()=>F9.filter(F=>pn.has(F)&&Pn.has(F)&&(V==="legacy"||F!=="updated")),[Pn,V,pn]),$n=(0,x.useMemo)(()=>{const F=new Map;for(const W of e)F.set(W.id,W);return F},[e]),Gn=(0,x.useMemo)(()=>{const F=new Map;for(const W of e)F.set(W.id,W.identifier?`${W.identifier}: ${W.title}`:W.title);return F},[e]),Pa=(0,x.useMemo)(()=>{if(P.viewMode!=="board"||N)return null;const F=new Map;let W=!1;for(const J of Wt){W||=J.isPending;for(const Ee of J.data??[])F.set(Ee.id,Ee)}return F.size>0?[...F.values()]:W?e:[]},[Wt,e,N,P.viewMode]),xn=(0,x.useMemo)(()=>P.viewMode==="board"&&!N&&Wt.some(F=>(F.data?.length??0)===Rd),[Wt,N,P.viewMode]),rs=(0,x.useMemo)(()=>Pa??(lt?nn:e),[Pa,e,lt,nn]),Sa=(0,x.useMemo)(()=>{if(!Re||!N)return rs;const F=Tg(_e);return rs.filter(W=>pw(W,F)&&mw(W,Ct.filters))},[Re,_e,Ct.filters,N,rs]),In=lt&&!Nn&&P.viewMode==="list",ga=P.externalObjectStatuses.length>0,Ks=(0,x.useMemo)(()=>P.viewMode==="list"||ga?Sa.map(F=>F.id):[],[ga,Sa,P.viewMode]),{summaries:qs,isLoading:ls,isReady:Va}=n9(ve,Ks),Na=(0,x.useMemo)(()=>({...dn,externalObjectSummaryByIssueId:qs,externalObjectSummariesReady:Va&&!ls}),[ls,Va,qs,dn]),$a=ga&&ls&&!Va,ht=(0,x.useMemo)(()=>{const F=fg(Sa,P,He,D,u,Na);return In?F:YF(F,P)},[In,Sa,P,He,D,u,Na]),Un=(0,x.useMemo)(()=>d9(R,e.length)?f9(e):null,[e,R]),ii=(0,x.useMemo)(()=>M==="workflow"&&P.groupBy==="none",[M,P.groupBy]),ri=(0,x.useMemo)(()=>{if(!ii)return null;const F=new Set(ht.map(Je=>Je.id)),W=iH(ht,P.nestingEnabled),J=rH(ht,P.nestingEnabled),Ee=new Map;return ht.forEach(Je=>{const At=(Je.blockedBy??[]).map(pt=>pt.id).filter(pt=>{if(!F.has(pt))return!1;const sn=$n.get(pt);return sn?sn.status!=="done"&&sn.status!=="cancelled":!1}),Kn=lH(Je,At,J.get(Je.id));Ee.set(Je.id,Kn?[]:At)}),{stepNumberByIssueId:W,unresolvedVisibleBlockersByIssueId:Ee,currentStepIssueId:(ht.find(Je=>sH(Je.status))??null??ht.find(Je=>Je.status==="blocked")??null)?.id??null}},[ii,ht,$n,P.nestingEnabled]),Wa=rT(P,D,Ot),se=(0,x.useMemo)(()=>{if(Wa===0&&!Re)return null;const F=Tg(_e),W=Re?new Set(Sa.map(J=>J.id)):null;return J=>fg([J],P,He,D,u,Na).length>0&&(W===null||W.has(J.id)||pw(J,F)&&mw(J,Ct.filters))},[Wa,He,D,Na,Re,_e,u,Ct.filters,Sa,P]),Te=(0,x.useMemo)(()=>{if(P.viewMode!=="board")return;const F=new Map(rs.map(W=>[W.id,W.status]));return new Map(N2(p,F).map(W=>[W.issueId,W.runs]))},[p,rs,P.viewMode]),Ze=J7(ve,P.viewMode==="board"),We=(0,x.useMemo)(()=>new Map(Ze.map(F=>[F.issueId,F.state])),[Ze]),zt=P.viewMode==="board"&&ht.length>100,Qt=P.boardCardDensity==="compact"||P.boardCardDensity==="auto"&&zt,Z=(0,x.useMemo)(()=>P.boardColdLaneMode==="collapsed"||P.boardColdLaneMode==="auto"&&zt?[...xF]:[],[zt,P.boardColdLaneMode]),Ne=P.boardCardDensity!=="auto"||P.boardColdLaneMode!=="auto"||P.boardColumnPageSize!==10,Be=(0,x.useMemo)(()=>{if(P.groupBy==="none")return[{key:"__all",label:null,items:ht}];if(P.groupBy==="status"){const W=Gl(ht,J=>J.status);return Zd.filter(J=>W[J]?.length).map(J=>({key:J,label:dg(J),items:W[J]}))}if(P.groupBy==="priority"){const W=Gl(ht,J=>J.priority);return ug.filter(J=>W[J]?.length).map(J=>({key:J,label:dg(J),items:W[J]}))}if(P.groupBy==="workspace"){const W=Gl(ht,J=>Yy(J,dn)??"__no_workspace");return Object.keys(W).sort((J,Ee)=>J==="__no_workspace"?1:Ee==="__no_workspace"?-1:(W[Ee]?.length??0)-(W[J]?.length??0)).map(J=>({key:J,label:J==="__no_workspace"?"No Workspace":za.get(J)??J.slice(0,8),items:W[J]}))}if(P.groupBy==="project"){const W=Gl(ht,J=>J.projectId??"__no_project");return Object.keys(W).sort((J,Ee)=>{if(J==="__no_project")return 1;if(Ee==="__no_project")return-1;const Je=La.get(J)?.name??J,At=La.get(Ee)?.name??Ee;return Je.localeCompare(At)}).map(J=>({key:J,label:J==="__no_project"?"No Project":La.get(J)?.name??J.slice(0,8),items:W[J]}))}if(P.groupBy==="parent"){const W=Gl(ht,J=>J.parentId??"__no_parent");return Object.keys(W).sort((J,Ee)=>J==="__no_parent"?1:Ee==="__no_parent"?-1:(W[Ee]?.length??0)-(W[J]?.length??0)).map(J=>({key:J,label:J==="__no_parent"?"No Parent":Gn.get(J)??J.slice(0,8),items:W[J]}))}const F=Gl(ht,W=>W.assigneeAgentId??(W.assigneeUserId?`__user:${W.assigneeUserId}`:"__unassigned"));return Object.keys(F).map(W=>({key:W,label:W==="__unassigned"?"Unassigned":W.startsWith("__user:")?Vr(W.slice(7),He,zn)??"User":gn(W)??W.slice(0,8),items:F[W]}))},[ht,dn,P.groupBy,l,gn,He,za,Gn,zn,La]),Le=(0,x.useMemo)(()=>JSON.stringify([Oe,tn,P.statuses,P.priorities,P.assignees,P.creators,P.labels,P.projects,P.workspaces,P.liveOnly??!1,P.externalObjectStatuses,P.hideRoutineExecutions,Rt,P.sortField,P.sortDir,P.groupBy,P.viewMode,P.nestingEnabled,In]),[Oe,tn,P.statuses,P.priorities,P.assignees,P.creators,P.labels,P.projects,P.workspaces,P.liveOnly,P.externalObjectStatuses,P.hideRoutineExecutions,Rt,P.sortField,P.sortDir,P.groupBy,P.viewMode,P.nestingEnabled,In]),st=(0,x.useRef)({identity:"",keptRootIds:new Set,seenIds:new Set,knownIds:new Set}),it=(0,x.useMemo)(()=>{const F=new Map;if(P.viewMode!=="list")return F;const W=st.current.identity===Le?st.current:null;for(const J of Be){if(!P.nestingEnabled){F.set(J.key,{roots:J.items,childMap:new Map});continue}let Ee;if(W){Ee=new Set(W.keptRootIds);for(const Je of J.items)Je.parentId&&!W.knownIds.has(Je.id)&&W.seenIds.has(Je.parentId)&&Ee.add(Je.id)}F.set(J.key,Cf(J.items,Ee))}return F},[Be,Le,P.nestingEnabled,P.viewMode]),Pt=r(F=>it.get(F.key)??(P.nestingEnabled?Cf(F.items):{roots:F.items,childMap:new Map}),"issueTreeForGroup"),bn=(0,x.useMemo)(()=>{if(P.viewMode!=="list")return[];const F=[];let W=0;for(const J of Be){const Ee=!!J.label&&P.collapsedGroups.includes(J.key);J.label&&F.push({type:"group",key:J.key,collapsed:Ee});const{roots:Je,childMap:At}=Pt(J),Kn=r(pt=>{W+=1;const sn=At.get(pt.id)??[],An=!P.collapsedParents.includes(pt.id);if(Ee||F.push({type:"issue",issue:pt,hasChildren:sn.length>0,expanded:An,budgetOrdinal:W}),An)for(const Se of sn)Kn(Se)},"walk");for(const pt of Je)Kn(pt)}return F},[Be,P.viewMode,P.collapsedGroups,P.collapsedParents,P.nestingEnabled]),Bn=(0,x.useRef)({flatNavEntries:bn,selectedNavKey:de,viewMode:P.viewMode,issueLinkState:g,collapsedGroups:P.collapsedGroups,collapsedParents:P.collapsedParents,updateView:ze});Bn.current={flatNavEntries:bn,selectedNavKey:de,viewMode:P.viewMode,issueLinkState:g,collapsedGroups:P.collapsedGroups,collapsedParents:P.collapsedParents,updateView:ze};const Qa=(0,x.useCallback)(F=>{if(F.startsWith("group:")){const J=ee.current?.querySelector(`[data-issues-group-key="${p0(F.slice(6))}"]`);return J instanceof HTMLElement?J:null}const W=ee.current?.querySelector(`[data-issue-row-id="${p0(F.slice(6))}"]`)?.querySelector("[data-inbox-issue-link]");return W instanceof HTMLElement?W:null},[]);(0,x.useEffect)(()=>{const F=r(W=>{if(W.defaultPrevented)return;const J=W.target;if(!(J instanceof HTMLElement)||ko(J)||Hg(document)||W.metaKey||W.ctrlKey||W.altKey)return;const Ee=Bn.current;if(Ee.viewMode!=="list"||Ee.flatNavEntries.length===0)return;const Je=r(pt=>pt?Ee.flatNavEntries.findIndex(sn=>Md(sn)===pt):-1,"indexOfKey"),At=Je(Me.current),Kn=ye.current&&At>=0?At:Je(Ee.selectedNavKey);switch(W.key){case"j":case"ArrowDown":case"k":case"ArrowUp":{W.preventDefault(),ye.current=!1;const pt=W.key==="j"||W.key==="ArrowDown"?"next":"previous",sn=tO(Kn,Ee.flatNavEntries.length,pt),An=Ee.flatNavEntries[sn];if(!An)break;we(Md(An)),An.type==="issue"&&Gt(Se=>Math.max(Se,An.budgetOrdinal+1));break}case"ArrowLeft":case"ArrowRight":{const pt=Ee.flatNavEntries[Kn];if(!pt)return;const sn=W.key==="ArrowLeft";if(pt.type==="group"){W.preventDefault(),ye.current=!1,we(Md(pt)),Ee.updateView({collapsedGroups:sn?Ee.collapsedGroups.includes(pt.key)?Ee.collapsedGroups:[...Ee.collapsedGroups,pt.key]:Ee.collapsedGroups.filter(An=>An!==pt.key)});break}if(!pt.hasChildren)return;W.preventDefault(),ye.current=!1,we(Md(pt)),Ee.updateView({collapsedParents:sn?Ee.collapsedParents.includes(pt.issue.id)?Ee.collapsedParents:[...Ee.collapsedParents,pt.issue.id]:Ee.collapsedParents.filter(An=>An!==pt.issue.id)});break}case"Enter":{const pt=Ee.flatNavEntries[Kn];if(!pt||pt.type!=="issue")return;W.preventDefault();const sn=pt.issue,An=sn.identifier??sn.id,Se=N0(Ee.issueLinkState,sn);ag(An,Se),lI(Ae,An,{issue:sn}),ie(Vd(An),{state:Se});break}default:return}},"handleKeyDown");return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[ie,Ae]);const Ca=(0,x.useMemo)(()=>{if(P.viewMode!=="list")return[];const F=[];for(const W of Be){const{roots:J,childMap:Ee}=Pt(W),Je=r(At=>{if(F.push(At.id),!P.collapsedParents.includes(At.id))for(const Kn of Ee.get(At.id)??[])Je(Kn)},"walk");for(const At of J)Je(At)}return F},[Be,P.collapsedParents,P.nestingEnabled,P.viewMode]),Cn=(0,x.useRef)(null),[jt]=(0,x.useState)(()=>Gk.get(le)??null),la=jt?.identity===Le?jt.limit:0,Yt=(0,x.useMemo)(()=>P.viewMode==="list"?XF(Cn.current,Le,Ca,Mt,la):Mt,[Ca,Le,Mt,la,P.viewMode]);(0,x.useLayoutEffect)(()=>{P.viewMode==="list"&&(Cn.current={identity:Le,ids:Ca,limit:Yt},Gk.set(le,{identity:Le,limit:Yt}),Mt!==Yt&&Gt(Yt))},[Ca,le,Le,Yt,Mt,P.viewMode]);const ta=(0,x.useRef)(null);(0,x.useEffect)(()=>{if(!de){ta.current=null;return}if(ta.current===de)return;const F=Qa(de);F&&(F.scrollIntoView({block:"nearest"}),ta.current=de)},[Qa,Yt,de]),(0,x.useLayoutEffect)(()=>{if(!P.nestingEnabled||P.viewMode!=="list")return;const F=st.current,W=F.identity===Le?F:{identity:Le,keptRootIds:new Set,seenIds:new Set,knownIds:new Set},J=Ca.slice(0,Yt);for(const Ee of J)W.seenIds.add(Ee);for(const Ee of Be)for(const Je of Ee.items)W.knownIds.add(Je.id);for(const Ee of it.values())for(const Je of Ee.roots)Je.parentId&&(W.seenIds.has(Je.id)||W.knownIds.has(Je.parentId))&&W.keptRootIds.add(Je.id);st.current=W},[Ca,Be,it,Le,Yt,P.nestingEnabled,P.viewMode]);const an=(0,x.useRef)(null),Aa=(0,x.useCallback)(()=>{const F=ee.current;if(!F||P.viewMode!=="list"){an.current=null;return}an.current=$F(F,Dd(F),Le)},[Le,P.viewMode]);(0,x.useEffect)(()=>{if(P.viewMode!=="list")return;const F=Dd(ee.current)??window;return F.addEventListener("scroll",Aa,{passive:!0}),()=>F.removeEventListener("scroll",Aa)},[Aa,P.viewMode]),(0,x.useLayoutEffect)(()=>{const F=ee.current,W=an.current;if(F&&W&&W.identity===Le&&P.viewMode==="list"){const J=Dd(F),Ee=UF(F,J,W);if(Ee===null)return;Ee!==0&&(J?J.scrollTop+=Ee:window.scrollBy(0,Ee))}Aa()},[Ca,Aa,Le,Yt,P.viewMode]);const Fs=P.viewMode==="list"&&Yt>0;(0,x.useLayoutEffect)(()=>{const F=ee.current;if(!F||!Fs)return;let W=window.requestAnimationFrame(()=>{W=window.requestAnimationFrame(()=>F.setAttribute("data-row-deferral",""))});return()=>{window.cancelAnimationFrame(W),F.removeAttribute("data-row-deferral")}},[Fs]);const So=(0,x.useRef)(null),li=!!X&&!P.liveOnly;(0,x.useLayoutEffect)(()=>{const F=So.current;if(!li||!F||typeof ResizeObserver>"u")return;const W=new ResizeObserver(()=>Aa());return W.observe(F),()=>W.disconnect()},[Aa,li]);const _a=P.viewMode==="list"&&Yt<ht.length,sl=Math.max(ht.length-Yt,0),Mi=(0,x.useCallback)(()=>{if(P.viewMode==="list"){if(_a){Gt(Math.min(ht.length,Yt+OF));return}K&&!z&&O?.()}},[ht.length,K,_a,z,O,Yt,P.viewMode]),Ss=P.viewMode==="list"&&!t&&(_a||K&&!z);(0,x.useEffect)(()=>{if(!Ss)return;let F=null;const W=Dd(ee.current),J=W??window,Ee=r((Kn="scroll")=>{F===null&&(F=window.requestAnimationFrame(()=>{F=null;const pt=W?.scrollHeight??document.documentElement.scrollHeight;if(pt===0)return;const sn=W?.clientHeight??window.innerHeight,An=W?W.scrollTop+W.clientHeight:window.scrollY+window.innerHeight,Se=pt>sn+1;if(An>=pt-LF){if(Kn==="initial"&&!_a&&K&&!Se){if(mt.current)return;mt.current=!0}Mi()}}))},"checkScrollPosition"),Je=r(()=>Ee("scroll"),"handleScroll"),At=r(()=>Ee("resize"),"handleResize");return J.addEventListener("scroll",Je,{passive:!0}),window.addEventListener("resize",At),Ee("initial"),()=>{J.removeEventListener("scroll",Je),window.removeEventListener("resize",At),F!==null&&window.cancelAnimationFrame(F)}},[Ss,K,_a,Mi]);const il=(0,x.useCallback)(F=>{const W=F?.key,J={...I??{}};if(f&&J.projectId===void 0&&(J.projectId=f),W){if(P.groupBy==="status")J.status=W;else if(P.groupBy==="priority")J.priority=W;else if(P.groupBy==="assignee"&&W!=="__unassigned")W.startsWith("__user:")?J.assigneeUserId=W.slice(7):J.assigneeAgentId=W;else if(P.groupBy==="project"&&W!=="__no_project")J.projectId=W;else if(P.groupBy==="workspace"&&W!=="__no_workspace"){const Ee=F?.items.find(At=>At.executionWorkspaceId===W||At.projectWorkspaceId===W)??null,Je=yt.get(W);if(Je){J.executionWorkspaceId=W,J.executionWorkspaceMode="reuse_existing",Je.projectWorkspaceId&&(J.projectWorkspaceId=Je.projectWorkspaceId);const At=Je.projectId??(Je.projectWorkspaceId?wa.get(Je.projectWorkspaceId)?.projectId:null)??(Ee?.executionWorkspaceId===W?Ee.projectId:null);At&&(J.projectId=At)}else{const At=wa.get(W);At&&(J.projectWorkspaceId=W,J.projectId=At.projectId)}}else if(P.groupBy==="parent"&&W!=="__no_parent"){const Ee=$n.get(W);Ee?Object.assign(J,_F(Ee,He)):J.parentId=W}}return J},[I,He,yt,$n,f,wa,P.groupBy]),rl=C?`Create ${C}`:"Create Task",br=C?`New ${C}`:"New Task",oi=(0,x.useCallback)(F=>{et(il(F))},[il,et]),ll=(0,x.useCallback)(F=>{ze({workspaces:[F]})},[ze]),vr=(0,x.useCallback)(F=>{const W=nC(F);On(W),f0(De,{viewState:P,columns:W})},[De.companyId,De.collectionKey,De.legacyColumnsStorageKey,De.legacyViewStorageKey,P]),xa=(0,x.useCallback)((F,W)=>{if(W){vr([...dt,F]);return}vr(dt.filter(J=>J!==F))},[vr,dt]),Ns=(0,x.useCallback)((F,W,J=null)=>{A(F,{assigneeAgentId:W,assigneeUserId:J}),xt(null),Kt("")},[A]);let Di=P.viewMode==="list"?Yt:Number.POSITIVE_INFINITY;return(0,a.jsxs)("div",{ref:ee,className:"wardmote-issue-list space-y-4",children:[Un?(0,a.jsx)(uH,{summary:Un,issueLinkState:g,parentIssueIdForCostSummary:_}):null,(0,a.jsx)(ce==="collection"?mF:oH,{className:"wardmote-task-list-toolbar",ariaLabel:ce==="collection"?"Task controls":void 0,context:ue?(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[ue,(0,a.jsxs)(oe,{size:"sm",variant:"secondary","aria-label":br,onClick:r(()=>oi(),"onClick"),children:[(0,a.jsx)(as,{className:"h-4 w-4 sm:mr-1"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:br})]})]}):(0,a.jsxs)(oe,{size:"sm",variant:"secondary","aria-label":br,onClick:r(()=>oi(),"onClick"),children:[(0,a.jsx)(as,{className:"h-4 w-4 sm:mr-1"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:br})]}),search:(0,a.jsx)(cH,{value:ea,context:Tt,onDebouncedChange:r(F=>{en(F),Q?.(F)},"onDebouncedChange")}),controls:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center border border-line rounded-md overflow-hidden mr-1",role:"group","aria-label":"View mode",children:[(0,a.jsx)("button",{className:`flex h-8 w-8 items-center justify-center transition-colors ${P.viewMode==="list"?"bg-bg-3 text-ink":"text-ink-3 hover:text-ink"}`,onClick:r(()=>ze({viewMode:"list"}),"onClick"),title:"List view","aria-label":"List view","aria-pressed":P.viewMode==="list",children:(0,a.jsx)(kR,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("button",{className:`flex h-8 w-8 items-center justify-center transition-colors ${P.viewMode==="board"?"bg-bg-3 text-ink":"text-ink-3 hover:text-ink"}`,onClick:r(()=>ze({viewMode:"board"}),"onClick"),title:"Board view","aria-label":"Board view","aria-pressed":P.viewMode==="board",children:(0,a.jsx)(DR,{className:"h-3.5 w-3.5"})})]}),P.viewMode==="list"&&(0,a.jsx)(oe,{active:P.nestingEnabled,type:"button",variant:"secondary",size:"icon",className:Y("hidden h-8 w-8 shrink-0 sm:inline-flex"),onClick:r(()=>ze({nestingEnabled:!P.nestingEnabled}),"onClick"),title:P.nestingEnabled?"Disable parent-child nesting":"Enable parent-child nesting",children:(0,a.jsx)(P1,{className:"h-3.5 w-3.5"})}),P.viewMode==="board"&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(oe,{active:Qt,type:"button",variant:"secondary",size:"icon",className:Y("h-8 w-8 shrink-0"),onClick:r(()=>ze({boardCardDensity:Qt?"comfortable":"compact"}),"onClick"),title:Qt?"Use comfortable cards":"Use compact cards",children:(0,a.jsx)(oR,{className:"h-3.5 w-3.5"})}),(0,a.jsx)(oe,{active:Z.length>0,type:"button",variant:"secondary",size:"icon",className:Y("h-8 w-8 shrink-0"),onClick:r(()=>ze({boardColdLaneMode:Z.length>0?"expanded":"collapsed"}),"onClick"),title:Z.length>0?"Expand cold lanes":"Collapse cold lanes",children:(0,a.jsx)(AR,{className:"h-3.5 w-3.5"})}),(0,a.jsxs)(ws,{children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsxs)(oe,{active:P.boardColumnPageSize!==10,type:"button",variant:"secondary",size:"sm",className:Y("h-8 shrink-0 gap-1.5 px-2"),title:"Cards per column",children:[(0,a.jsx)(wR,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"min-w-4 text-xs tabular-nums",children:P.boardColumnPageSize})]})}),(0,a.jsx)(js,{align:"end",className:"w-40 p-0",children:(0,a.jsx)("div",{className:"p-2 space-y-0.5",children:E2.map(F=>(0,a.jsxs)("button",{type:"button",className:Y("flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm",P.boardColumnPageSize===F?"bg-bg-3/50 text-ink":"text-ink-3 hover:bg-bg-3/50"),onClick:r(()=>ze({boardColumnPageSize:F}),"onClick"),children:[(0,a.jsxs)("span",{children:[F," per column"]}),P.boardColumnPageSize===F&&(0,a.jsx)(Ms,{className:"h-3.5 w-3.5"})]},F))})})]}),(0,a.jsx)(oe,{type:"button",variant:"secondary",size:"icon",className:"h-8 w-8 shrink-0",onClick:r(()=>ze({boardCardDensity:"auto",boardColdLaneMode:"expanded",boardColumnPageSize:10}),"onClick"),disabled:!Ne,title:"Reset board density",children:(0,a.jsx)(gc,{className:"h-3.5 w-3.5"})})]}),(0,a.jsx)(Y9,{availableColumns:Bs,visibleColumnSet:pn,onToggleColumn:xa,showDateGroupSeparators:P.showDateGroupSeparators,onToggleDateGroupSeparators:r(F=>ze({showDateGroupSeparators:F}),"onToggleDateGroupSeparators"),onResetColumns:r(()=>vr(JN),"onResetColumns"),title:"Choose which task columns stay visible",iconOnly:!0,rowPresentation:V}),(0,a.jsx)(iF,{state:P,onChange:ze,buttonVariant:"secondary",activeFilterCount:Wa,agents:l,creators:si,projects:c?.map(F=>({id:F.id,name:F.name})),labels:qt?.map(F=>({id:F.id,name:F.name,color:F.color})),currentUserId:He,enableExternalObjectFilters:ge,enableRoutineVisibilityFilter:D,enableHiddenTasksFilter:Ot,iconOnly:!0,presentation:V==="task"?"streamlined":"legacy"}),P.viewMode==="list"&&(0,a.jsxs)(ws,{children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsx)(oe,{variant:"secondary",size:"icon",className:"h-8 w-8 shrink-0",title:"Sort",children:(0,a.jsx)(LI,{className:"h-3.5 w-3.5"})})}),(0,a.jsx)(js,{align:"end",className:"w-48 p-0",children:(0,a.jsxs)("div",{className:"p-2 space-y-0.5",children:[lt&&(0,a.jsx)("button",{className:`flex items-center justify-between w-full px-2 py-1.5 text-sm rounded-sm ${In?"bg-bg-3/50 text-ink":"hover:bg-bg-3/50 text-ink-3"}`,onClick:r(()=>It(!1),"onClick"),children:(0,a.jsx)("span",{children:"Relevance"})}),[["workflow","Workflow"],["status","Status"],["priority","Priority"],["title","Title"],["created","Created"],["updated","Updated"]].filter(([F])=>F!=="priority").map(([F,W])=>(0,a.jsxs)("button",{className:`flex items-center justify-between w-full px-2 py-1.5 text-sm rounded-sm ${!In&&P.sortField===F?"bg-bg-3/50 text-ink":"hover:bg-bg-3/50 text-ink-3"}`,onClick:r(()=>{lt&&It(!0),In?ze({sortField:F,sortDir:F==="updated"||F==="created"?"desc":"asc"}):P.sortField===F?ze({sortDir:P.sortDir==="asc"?"desc":"asc"}):ze({sortField:F,sortDir:"asc"})},"onClick"),children:[(0,a.jsx)("span",{children:W}),!In&&P.sortField===F&&(0,a.jsx)("span",{className:"text-xs text-ink-3",children:P.sortDir==="asc"?"↑":"↓"})]},F))]})})]}),P.viewMode==="list"&&(0,a.jsxs)(ws,{children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsx)(oe,{variant:"secondary",size:"icon",className:"h-8 w-8 shrink-0",title:"Group",children:(0,a.jsx)(Rf,{className:"h-3.5 w-3.5"})})}),(0,a.jsx)(js,{align:"end",className:"w-44 p-0",children:(0,a.jsx)("div",{className:"p-2 space-y-0.5",children:[["status","Status"],["priority","Priority"],["assignee","Responsible"],["project","Project"],["workspace","Workspace"],["parent","Parent Task"],["none","None"]].filter(([F])=>F!=="priority").map(([F,W])=>(0,a.jsxs)("button",{className:`flex items-center justify-between w-full px-2 py-1.5 text-sm rounded-sm ${P.groupBy===F?"bg-bg-3/50 text-ink":"hover:bg-bg-3/50 text-ink-3"}`,onClick:r(()=>ze({groupBy:F}),"onClick"),children:[(0,a.jsx)("span",{children:W}),P.groupBy===F&&(0,a.jsx)(Ms,{className:"h-3.5 w-3.5"})]},F))})})]})]})}),li&&X?(0,a.jsx)("div",{ref:So,children:X({viewMode:P.viewMode,issueFilter:se})}):null,(t||$a)&&(0,a.jsx)(hF,{variant:"issues-list"}),s&&(0,a.jsx)("p",{className:"text-sm text-bad",children:s.message}),lt&&nn.length===Td&&(0,a.jsxs)("p",{className:"text-xs text-ink-3",children:["Showing up to ",Td," matches. Refine the search to narrow further."]}),xn&&(0,a.jsxs)("p",{className:"text-xs text-ink-3",children:["Some board columns are showing up to ",Rd," tasks. Refine filters or search to reveal the rest."]}),!t&&!$a&&ht.length===0&&P.viewMode==="list"&&(0,a.jsx)(eF,{icon:Xd,message:"No tasks match the current filters or search.",action:rl,onAction:r(()=>oi(),"onAction")}),P.viewMode==="board"?(0,a.jsx)(AF,{issues:ht,agents:l,liveIssueIds:u,liveRunsByIssueId:Te,pauseStateByIssueId:We,compactCards:Qt,collapsedStatuses:Z,initialVisibleCount:P.boardColumnPageSize,revealIncrement:P.boardColumnPageSize,onUpdateIssue:A}):(0,a.jsxs)("div",{className:"-mx-2 sm:mx-0",children:[Be.map(F=>Di<=0?null:(0,a.jsxs)(yS,{open:!P.collapsedGroups.includes(F.key),onOpenChange:r(W=>{ze({collapsedGroups:W?P.collapsedGroups.filter(J=>J!==F.key):[...P.collapsedGroups,F.key]})},"onOpenChange"),children:[F.label&&(0,a.jsx)("div",{"data-issues-group-key":F.key,className:Y("rounded-lg px-3 sm:pl-0 sm:pr-4",de===`group:${F.key}`?"bg-bg-3/50":"hover:bg-bg-3/50"),onClick:r(()=>we(`group:${F.key}`),"onClick"),onMouseEnter:r(()=>he(`group:${F.key}`),"onMouseEnter"),children:(0,a.jsx)(tF,{label:F.label,collapsible:!0,collapsed:P.collapsedGroups.includes(F.key),onToggle:r(()=>{ze({collapsedGroups:P.collapsedGroups.includes(F.key)?P.collapsedGroups.filter(W=>W!==F.key):[...P.collapsedGroups,F.key]})},"onToggle"),trailing:(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs",className:"-mr-2",title:`New task in ${F.label}`,"aria-label":`New task in ${F.label}`,onClick:r(()=>oi(F),"onClick"),children:(0,a.jsx)(as,{className:"h-3 w-3"})})})}),(0,a.jsx)(vS,{children:(()=>{const{roots:W,childMap:J}=Pt(F),Ee=r((Se,Hs)=>{if(Di<=0)return null;Di-=1;const Ga=(J.get(Se.id)??[]).length>0,Ya=Ga?T2(Se.id,J):0,ba=!P.collapsedParents.includes(Se.id),ip=!(Ga&&ba),ol=Se.projectId?La.get(Se.projectId)??null:null,Zc=Se.parentId?$n.get(Se.parentId)??null:null,cl=B?.get(Se.id),rp=E?.has(Se.id)===!0,No=Se.assigneeUserId?is.get(Se.assigneeUserId)??null:null,Jc=Vr(Se.assigneeUserId,He,zn)??No?.label??null,ul=cS(Se),dl=ul?.kind==="user"?ul.id:null,fl=ul?.kind==="user"?ul.viaAgentId??null:null,ci=r(Ue=>{Ue.preventDefault(),Ue.stopPropagation(),ze({collapsedParents:ba?[...P.collapsedParents,Se.id]:P.collapsedParents.filter(Ea=>Ea!==Se.id)})},"toggleCollapse"),ui=ri,pl=ui?.stepNumberByIssueId.get(Se.id)??null,eu=ui?.unresolvedVisibleBlockersByIssueId.get(Se.id)??[],tu=ui?`issue-workflow-row-${Se.id}`:void 0,nu=ui&&Se.status==="done"?"text-ink-3":void 0,ml=eu.map(Ue=>{const Ea=$n.get(Ue);if(!Ea)return null;const iu=Ea.identifier??Ea.id.slice(0,8),hl=ui?.stepNumberByIssueId.get(Ue);return{blockerId:Ue,chipLabel:`blocked by ${iu}${hl?` · step ${hl}`:""}`}}).filter(Ue=>Ue!==null),os=ml[0]??null,Co=Math.max(ml.length-1,0),lp=Co>0?` ... and ${Co} more`:"",Ao=os?`${os.chipLabel}${lp}`:"",au=ml.slice(1).map(Ue=>Ue.chipLabel).join(", "),_o=Co>0?`${Ao}: ${au}`:Ao,yr=ui&&os?(0,a.jsx)("button",{type:"button","data-slot":"icon-button",onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation();const Ea=document.getElementById(`issue-workflow-row-${os.blockerId}`);Ea&&(Ea.scrollIntoView({behavior:"smooth",block:"nearest"}),Ea.focus?.())},"onClick"),className:"inline-flex items-center rounded-full border border-amber-400/45 bg-amber-50/60 px-1.5 py-0.5 text-(length:--text-nano) font-medium text-amber-700 hover:bg-amber-100/80 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300",title:_o,"aria-label":_o,children:Ao},os.blockerId):null,Oi=ma.get(Se.id)??null,su=Oi?(0,a.jsx)(pF,{issueId:Se.id,run:Oi,companyId:ve,taskLabel:Se.identifier??Se.id.slice(0,8)}):void 0;return(0,a.jsx)("div",{"data-issue-row-id":Se.id,className:Y(V==="legacy"&&Hs>0&&Xk[Math.min(Hs,Xk.length-1)],ip&&"wardmote-issue-list-row-deferred")||void 0,children:(0,a.jsx)(cF,{issue:Se,presentation:V,issueLinkState:g,selected:de===`issue:${Se.id}`,onMouseEnter:r(()=>he(`issue:${Se.id}`),"onMouseEnter"),treeGuides:Hs,chevronInGuide:Hs>0&&Ga,checklistStepNumber:pl,checklistCurrentStep:ui?.currentStepIssueId===Se.id,checklistDependencyChips:yr,checklistRowId:tu,titleClassName:nu,externalObjectSummary:qs.get(Se.id)??null,titleSuffix:(0,a.jsxs)(a.Fragment,{children:[Ga&&!ba?(0,a.jsxs)("span",{className:"ml-1.5 text-xs text-ink-3",children:["(",Ya," sub-task",Ya!==1?"s":"",")"]}):null,cl?cl==="Paused"?(0,a.jsxs)(Dn,{variant:"ghost",className:Y("ml-1.5 px-1.5 text-(length:--text-nano)",Hd.paused),"aria-label":"Paused",title:"Paused",children:[(0,a.jsx)(uR,{className:"h-3 w-3"}),"Paused"]}):(0,a.jsx)(Dn,{variant:"outline",className:"ml-1.5 border-amber-500/40 bg-amber-500/10 px-1.5 text-(length:--text-nano) text-amber-700 dark:text-amber-300",children:cl}):null,_2(Se)?(0,a.jsxs)(Dn,{variant:"outline",className:"ml-1.5 border-amber-400/45 bg-amber-50/60 px-1.5 text-(length:--text-nano) text-amber-700 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300","aria-label":"Needs next step",title:"This task needs a next step",children:[(0,a.jsx)(Xd,{className:"h-3 w-3"}),"Needs next step"]}):null]}),className:Y(rp&&"opacity-70",de===`issue:${Se.id}`&&"bg-bg-3/50 hover:bg-bg-3/50"),leadingControl:V==="task"?Ga?(0,a.jsx)("button",{type:"button","data-slot":"icon-button",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center","aria-label":ba?"Collapse sub-tasks":"Expand sub-tasks",onClick:ci,children:(0,a.jsx)(ur,{className:Y("h-3.5 w-3.5 transition-transform",ba&&"rotate-90")})}):(0,a.jsx)("span",{"data-slot":"task-row-disclosure-spacer",className:"h-4 w-4 shrink-0","aria-hidden":"true"}):void 0,statusSlot:V==="task"?(0,a.jsxs)("span",{className:"relative inline-flex items-start self-stretch sm:items-center",onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation()},"onClick"),children:[(0,a.jsx)(ei,{status:Se.status,externalConversationState:Se.externalConversationState,size:"md",blockerAttention:Se.blockerAttention,onChange:r(Ue=>A(Se.id,{status:Ue}),"onChange")}),Ga&&ba?(0,a.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-5 -bottom-2.5 left-1/2 w-px bg-line sm:hidden"}):null]}):void 0,metadata:V==="task"?(0,a.jsx)(qk,{issue:Se,isLive:u?.has(Se.id)===!0,subtreeLiveCount:ra.get(Se.id)??0,showStatus:!1,showIdentifier:!1,checklistStepNumber:pl}):void 0,actions:su,showIdentifier:pn.has("id")&&Pn.has("id"),mobileLeading:Ga?(0,a.jsx)("button",{type:"button","data-slot":"icon-button",onClick:ci,children:(0,a.jsx)(ur,{className:Y("h-3.5 w-3.5 transition-transform",ba&&"rotate-90")})}):(0,a.jsx)("span",{className:"inline-flex items-center",onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation()},"onClick"),children:(0,a.jsx)(ei,{status:Se.status,externalConversationState:Se.externalConversationState,size:"md",blockerAttention:Se.blockerAttention,onChange:r(Ue=>A(Se.id,{status:Ue}),"onChange")})}),desktopMetaLeading:V==="legacy"?(0,a.jsxs)(a.Fragment,{children:[Ga?(0,a.jsx)("button",{type:"button","data-slot":"icon-button",className:"relative z-10 hidden w-4 shrink-0 items-center justify-center sm:inline-flex",onClick:ci,children:(0,a.jsx)(ur,{className:Y("h-3.5 w-3.5 transition-transform",ba&&"rotate-90")})}):(0,a.jsx)("span",{className:"hidden w-4 shrink-0 sm:block"}),(0,a.jsx)(qk,{issue:Se,isLive:u?.has(Se.id)===!0,subtreeLiveCount:ra.get(Se.id)??0,showStatus:pn.has("status")&&Pn.has("status"),showIdentifier:pn.has("id")&&Pn.has("id"),checklistStepNumber:pl,statusSlot:(0,a.jsx)("span",{className:"inline-flex items-center",onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation()},"onClick"),children:(0,a.jsx)(ei,{status:Se.status,externalConversationState:Se.externalConversationState,size:"md",blockerAttention:Se.blockerAttention,onChange:r(Ue=>A(Se.id,{status:Ue}),"onChange")})})})]}):void 0,mobileTitleMeta:V==="task"?Nf(Se):void 0,mobileMeta:V==="legacy"?Q9(Se).toLowerCase():su,trailingMeta:V==="task"&&pn.has("updated")&&Pn.has("updated")?Nf(Se):void 0,desktopTrailing:ha.length>0?(0,a.jsx)(J9,{issue:Se,columns:ha,projectName:ol?.name??null,projectColor:ol?.color??null,workspaceId:Yy(Se,dn),workspaceName:aC(Se,{executionWorkspaceById:yt,projectWorkspaceById:wa,defaultProjectWorkspaceIdByProjectId:ka}),onFilterWorkspace:ll,assigneeName:gn(Se.assigneeAgentId),assigneeAgent:l?.find(Ue=>Ue.id===Se.assigneeAgentId),creatorAgent:l?.find(Ue=>Ue.id===Se.createdByAgentId),assigneeUserName:Jc,assigneeUserAvatarUrl:No?.image??null,creatorAgentName:gn(Se.createdByAgentId),creatorUserName:dl?is.get(dl)?.label??null:null,creatorUserAvatarUrl:dl?is.get(dl)?.image??null:null,viaAgentName:fl?gn(fl):null,currentUserId:He,parentIdentifier:Zc?.identifier??null,parentTitle:Zc?.title??null,assigneeContent:(0,a.jsxs)(ws,{open:Ye===Se.id,onOpenChange:r(Ue=>{xt(Ue?Se.id:null),Ue||Kt("")},"onOpenChange"),children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsx)("button",{className:"flex w-full shrink-0 items-center overflow-hidden rounded-md px-2 py-1 transition-colors hover:bg-bg-3/50",onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation()},"onClick"),children:Se.assigneeAgentId&&gn(Se.assigneeAgentId)?(0,a.jsx)(co,{agent:l.find(Ue=>Ue.id===Se.assigneeAgentId),size:"sm",className:"min-w-0"}):Se.assigneeUserId?(0,a.jsx)(og,{name:Jc??"User",avatarUrl:No?.image??null,size:"sm",className:"min-w-0"}):(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-ink-3",children:[(0,a.jsx)("span",{className:"inline-flex h-6 w-6 items-center justify-center rounded-full border border-dashed border-ink-3/35 bg-bg-3/30",children:(0,a.jsx)(so,{className:"h-3.5 w-3.5"})}),"Assignee"]})})}),(0,a.jsxs)(js,{className:"w-56 p-1",align:"end",onClick:r(Ue=>Ue.stopPropagation(),"onClick"),onPointerDownOutside:r(()=>Kt(""),"onPointerDownOutside"),children:[(0,a.jsx)("input",{className:"mb-1 w-full border-b border-line bg-transparent px-2 py-1.5 text-xs outline-none placeholder:text-ink-3/50",placeholder:"Search responsible...",value:at,onChange:r(Ue=>Kt(Ue.target.value),"onChange"),autoFocus:!0}),(0,a.jsxs)("div",{className:"max-h-48 overflow-y-auto overscroll-contain",children:[(0,a.jsx)("button",{className:Y("flex w-full items-center gap-2 rounded px-2 py-1.5 text-xs hover:bg-bg-3/50",!Se.assigneeAgentId&&!Se.assigneeUserId&&"bg-bg-3"),onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation(),Ns(Se.id,null,null)},"onClick"),children:"No responsible"}),He&&(0,a.jsxs)("button",{className:Y("flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs hover:bg-bg-3/50",Se.assigneeUserId===He&&"bg-bg-3"),onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation(),Ns(Se.id,null,He)},"onClick"),children:[(0,a.jsx)(so,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,a.jsx)("span",{children:"Me"})]}),(l??[]).filter(Ue=>at.trim()?Ue.name.toLowerCase().includes(at.toLowerCase()):!0).map(Ue=>(0,a.jsx)("button",{className:Y("flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs hover:bg-bg-3/50",Se.assigneeAgentId===Ue.id&&"bg-bg-3"),onClick:r(Ea=>{Ea.preventDefault(),Ea.stopPropagation(),Ns(Se.id,Ue.id,null)},"onClick"),children:(0,a.jsx)(co,{agent:Ue,size:"sm",className:"min-w-0"})},Ue.id))]})]})]})}):void 0})},Se.id)},"renderIssueRow"),Je=P.showDateGroupSeparators&&!In?JF(P):null,At=new Date,Kn=[];let pt=null,sn=null;const An=r((Se,Hs)=>{const Ga=Ee(Se,Hs);if(Ga!==null){if(Je&&V==="task"){const Ya=RF(Je(Se),At),ba=MF(pt,Ya);ba&&Kn.push((0,a.jsx)(Yk,{label:ba},`date-sep-${Se.id}-${Ya}`)),pt=Ya}else if(Je){const Ya=tH(Je(Se),At.getTime());for(const ba of sn===null?[]:aH(sn,Ya))Kn.push((0,a.jsx)(Yk,{label:nH(ba)},`date-sep-${Se.id}-${ba}`));sn=Ya}if(Kn.push(Ga),!P.collapsedParents.includes(Se.id))for(const Ya of J.get(Se.id)??[])An(Ya,Hs+1)}},"appendIssueRow");for(const Se of W)An(Se,0);return Kn})()})]},F.key)),(sl>0||K||z)&&(0,a.jsx)("div",{className:"py-2","data-testid":"issues-load-more-sentinel",children:(0,a.jsx)("p",{className:"text-xs text-ink-3",children:z?"Loading more tasks...":sl>0?`Rendering ${Math.min(Yt,ht.length)} of ${ht.length} tasks`:"Scroll to load more tasks"})})]})]})}r(fH,"StreamlinedIssuesList");function pH(e){return e?new Date(e).toLocaleString():"Never"}r(pH,"formatLastRunTimestamp");function mH(e){return e?e.replaceAll("_"," "):null}r(mH,"formatRoutineRunStatus");function oX(e,t){return e==="archived"&&t||t?"active":"paused"}r(oX,"nextRoutineStatus");function hH({routine:e,projectById:t,agentById:s,runningRoutineId:l,statusMutationRoutineId:c,href:u,configureLabel:p="Edit",managedByLabel:f,secondaryDetails:h,runNowButton:g=!1,disableRunNow:v=!1,disableToggle:y=!1,hideArchiveAction:j=!1,divider:k=!0,selected:S=!1,selectMode:N=!1,extraMenuItems:I,onSelectChange:C,onRunNow:M,onToggleEnabled:R,onToggleArchived:_}){const D=e.status==="active",U=e.status==="archived",K=c===e.id,z=e.projectId?t.get(e.projectId)??null:null,E=e.assigneeAgentId?s.get(e.assigneeAgentId)??null:null,B=!U&&!e.assigneeAgentId,O=l===e.id||U||v;return(0,a.jsxs)(mn,{to:u,className:`group flex flex-col gap-3 px-3 py-3 transition-colors hover:bg-bg-3/50 sm:flex-row sm:items-center no-underline text-inherit${k?" border-b border-line last:border-b-0":""}`,children:[N?(0,a.jsx)("div",{className:"flex items-start pt-0.5 sm:pt-1",onClick:r(Q=>{Q.preventDefault(),Q.stopPropagation()},"onClick"),children:(0,a.jsx)("input",{type:"checkbox",className:"h-4 w-4 rounded border-line",checked:S,"aria-label":`Select ${e.title}`,onChange:r(Q=>C?.(e,Q.target.checked),"onChange")})}):null,(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"truncate text-sm font-medium",children:e.title}),U||e.status==="paused"||B?(0,a.jsx)("span",{className:"text-xs text-ink-3",children:U?"archived":B?"draft":"paused"}):null,f?(0,a.jsx)("span",{className:"text-xs text-ink-3",children:f}):null]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-ink-3",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:z?.color??"var(--project-none)"}}),(0,a.jsx)("span",{children:e.projectId?z?.name??"Unknown project":"No project"})]}),(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[e.assigneeAgentId?(0,a.jsx)(mr,{agent:{...E,id:e.assigneeAgentId},size:16,className:"h-3.5 w-3.5 shrink-0"}):null,(0,a.jsx)("span",{children:e.assigneeAgentId?E?.name??"Unknown agent":"No default agent"})]}),(0,a.jsxs)("span",{children:[pH(e.lastRun?.triggeredAt),e.lastRun?` · ${mH(e.lastRun.status)}`:""]})]}),h?(0,a.jsx)("div",{className:"text-xs text-ink-3",children:h}):null]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",onClick:r(Q=>{Q.preventDefault(),Q.stopPropagation()},"onClick"),children:[g?(0,a.jsxs)(oe,{variant:"secondary",size:"sm",disabled:O,onClick:r(()=>M(e),"onClick"),children:[(0,a.jsx)(R0,{className:"h-3.5 w-3.5"}),l===e.id?"Running...":"Run now"]}):null,(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(s1,{size:"lg",checked:D,onCheckedChange:r(()=>R(e,D),"onCheckedChange"),disabled:K||U||y,"aria-label":D?`Disable ${e.title}`:`Enable ${e.title}`}),(0,a.jsx)("span",{className:"w-12 text-xs text-ink-3",children:U?"Archived":B?"Draft":D?"On":"Off"})]}),(0,a.jsxs)(tl,{children:[(0,a.jsx)(Jr,{asChild:!0,children:(0,a.jsx)(oe,{variant:"ghost",size:"icon-sm","aria-label":`More actions for ${e.title}`,children:(0,a.jsx)(Df,{className:"h-4 w-4"})})}),(0,a.jsxs)(el,{align:"end",children:[(0,a.jsx)(Sn,{asChild:!0,children:(0,a.jsx)(mn,{to:u,children:p})}),(0,a.jsx)(Sn,{disabled:O,onClick:r(()=>M(e),"onClick"),children:l===e.id?"Running...":"Run now"}),I?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ii,{}),I]}):null,(0,a.jsx)(Ii,{}),(0,a.jsx)(Sn,{onClick:r(()=>R(e,D),"onClick"),disabled:K||U||y,children:D?"Pause":"Enable"}),!j&&_?(0,a.jsx)(Sn,{onClick:r(()=>_(e),"onClick"),disabled:K,children:e.status==="archived"?"Restore":"Archive"}):null]})]})]})]})}r(hH,"RoutineListRow");function gH(e){return{id:e.key,title:e.title,status:e.status,projectId:e.projectId??null,assigneeAgentId:e.assigneeAgentId??null,lastRun:e.lastRunAt||e.lastRunStatus?{triggeredAt:e.lastRunAt??null,status:e.lastRunStatus??null}:null}}r(gH,"managedRoutineToRow");function xH({routines:e,agents:t=[],projects:s=[],pluginDisplayName:l=null,emptyMessage:c="No managed routines.",runningRoutineKey:u=null,statusMutationRoutineKey:p=null,reconcilingRoutineKey:f=null,resettingRoutineKey:h=null,onRunNow:g,onToggleEnabled:v,onReconcile:y,onReset:j}){const k=new Map(t.map(N=>[N.id,N])),S=new Map(s.map(N=>[N.id,{name:N.name,color:N.color}]));return e.length===0?(0,a.jsx)("div",{className:"rounded-lg border border-line px-3 py-8 text-center text-sm text-ink-3",children:c}):(0,a.jsx)("div",{className:"rounded-lg border border-line",children:e.map(N=>{const I=gH(N),C=N.href??(N.routineId?`/routines/${N.routineId}`:"/routines"),M=N.missingRefs??[],R=!!(N.routineId&&N.resourceKey&&M.length===0),_=N.managedByPluginDisplayName??l,D=!!(y||j);return(0,a.jsxs)("div",{className:"last:[&_a]:border-b-0",children:[(0,a.jsx)(hH,{routine:I,projectById:S,agentById:k,runningRoutineId:u,statusMutationRoutineId:p,href:C,configureLabel:"Configure",managedByLabel:_?`Managed by ${_}`:null,runNowButton:!0,hideArchiveAction:!0,disableRunNow:!R,disableToggle:!R,secondaryDetails:(0,a.jsxs)("span",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[N.resourceKey?(0,a.jsx)("span",{children:N.resourceKey}):null,N.cronExpression?(0,a.jsxs)("span",{children:["Schedule ",N.cronExpression]}):null]}),onRunNow:r(()=>g?.(N),"onRunNow"),onToggleEnabled:r(()=>v?.(N,I.status==="active"),"onToggleEnabled")}),D?(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-line px-3 pb-3 text-xs text-ink-3 last:border-b-0",onClick:r(U=>{U.preventDefault(),U.stopPropagation()},"onClick"),children:[(0,a.jsx)("span",{children:M.length?`Missing ${M.map(U=>`${U.resourceKind}:${U.resourceKey}`).join(", ")}`:"Routine defaults can be repaired."}),(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[y?(0,a.jsx)(oe,{size:"sm",variant:"ghost",disabled:f===N.key,onClick:r(()=>y(N),"onClick"),children:f===N.key?"Reconciling...":"Reconcile"}):null,j?(0,a.jsx)(oe,{size:"sm",variant:"ghost",disabled:h===N.key,onClick:r(()=>j(N),"onClick"),children:h===N.key?"Resetting...":"Reset"}):null]})]}):null]},N.key)})})}r(xH,"ManagedRoutinesList");function Zk(e){return new Set(e??[])}r(Zk,"toPathSet");function bH({expandedPaths:e,checkedPaths:t,selectedFile:s=null,showCheckboxes:l=!1,onToggleDir:c,onSelectFile:u,...p}){return(0,x.createElement)(W7,{...p,selectedFile:s,expandedDirs:Zk(e),checkedFiles:t?Zk(t):void 0,showCheckboxes:l,onToggleDir:c??(()=>{}),onSelectFile:u??(()=>{})})}r(bH,"PluginSdkFileTree");function vH(e){const[t,s]=(0,x.useState)(null);return(0,x.useEffect)(()=>{let l=!1;return ke(()=>import("./MarkdownEditor-GCKumUHH.js").then(c=>c.n).then(c=>{l||s(()=>c.MarkdownEditor)}),__vite__mapDeps([79,1,3,25,8,17,20,43,44,45,21,22,80,27,26,74,81,82,83,24,84,85,28,86,66,87,76,88,89,90,91,92,93])),()=>{l=!0}},[]),t?(0,x.createElement)(t,e):(0,x.createElement)("textarea",{className:e.className,value:e.value,placeholder:e.placeholder,readOnly:e.readOnly,onBlur:e.onBlur,onChange:r(l=>e.onChange(l.currentTarget.value),"onChange")})}r(vH,"PluginSdkMarkdownEditor");function yH(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""&&t!==!1))}r(yH,"compactIssueFilters");function jH({companyId:e,projectId:t=null,filters:s,viewStateKey:l="wardmote:plugin-issues-view",initialSearch:c,createIssueLabel:u,searchWithinLoadedIssues:p=!0}){const f=kn(),h=(0,x.useMemo)(()=>yH({...s??{},projectId:s?.projectId??t??void 0}),[s,t]),g=h.originKindPrefix??null,v=h.projectId??t??null,y=(0,x.useMemo)(()=>["plugins","sdk-ui","issues-list",e??"__no-company__",h],[e,h]),{data:j}=me({queryKey:$.agents.list(e??"__no-company__"),queryFn:r(()=>Ha.list(e),"queryFn"),enabled:!!e}),{data:k}=me({queryKey:$.projects.list(e??"__no-company__",{includeArchived:!0}),queryFn:r(()=>hr.list(e,{includeArchived:!0}),"queryFn"),enabled:!!e}),S=$.liveRuns(e??"__no-company__"),N=Ac({companyId:e,resourceKey:"live-runs",queryKey:S,enabled:!!e,refetchInterval:!1,leaderOnly:!0}),{data:I,dataUpdatedAt:C}=me({queryKey:S,queryFn:r(()=>zf.liveRunsForCompany(e),"queryFn"),enabled:N.enabled,refetchInterval:N.refetchInterval});_c(N,I,C);const{data:M,isLoading:R,error:_}=me({queryKey:y,queryFn:r(()=>cn.list(e,h),"queryFn"),enabled:!!e}),D=(0,x.useMemo)(()=>y9(I,M),[M,I]),U=Bt({mutationFn:r(({id:K,data:z})=>cn.update(K,z),"mutationFn"),onSuccess:r(()=>{e&&(f.invalidateQueries({queryKey:["plugins","sdk-ui","issues-list",e]}),f.invalidateQueries({queryKey:$.issues.list(e)}),v&&(f.invalidateQueries({queryKey:$.issues.listByProject(e,v)}),g&&f.invalidateQueries({queryKey:$.issues.listPluginOperationsByProject(e,v,g)})))},"onSuccess")});return e?(0,x.createElement)(dH,{issues:M??[],isLoading:R,error:_,agents:j,projects:k,liveIssueIds:D,projectId:v??void 0,viewStateKey:l,initialSearch:c,createIssueLabel:u,searchWithinLoadedIssues:p,onUpdateIssue:r((K,z)=>U.mutate({id:K,data:z}),"onUpdateIssue")}):(0,x.createElement)("div",{className:"text-sm text-ink-3"},"Select an organization to view tasks.")}r(jH,"PluginSdkIssuesList");function wH({companyId:e,value:t,onChange:s,placeholder:l="Responsible",noneLabel:c="No responsible",searchPlaceholder:u="Search responsible...",emptyMessage:p="No responsible found.",includeUsers:f=!0,includeTerminatedAgents:h=!1,className:g,onConfirm:v}){const y=O0(),j=e??y.companyId??null,{data:k}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),enabled:f}),S=k?.user?.id??k?.session?.userId??null,{data:N}=me({queryKey:$.agents.list(j??"__no-company__"),queryFn:r(()=>Ha.list(j),"queryFn"),enabled:!!j}),{data:I}=me({queryKey:$.access.companyUserDirectory(j??"__no-company__"),queryFn:r(()=>ti.listUserDirectory(j),"queryFn"),enabled:!!j&&f}),C=(0,x.useMemo)(()=>hg(),[]),M=(0,x.useMemo)(()=>C.map(K=>K.startsWith("agent:")?K.slice(6):null).filter(K=>!!K),[C]),R=(0,x.useMemo)(()=>a1((N??[]).filter(K=>h||K.status!=="terminated"),M),[N,h,M]),_=(0,x.useMemo)(()=>[...f?XS(S):[],...f?oA(I?.users,{excludeUserIds:[S]}):[],...R.map(K=>({id:Kr({assigneeAgentId:K.id}),label:K.name,searchText:`${K.name} ${K.role} ${K.title??""}`}))],[I?.users,S,f,R]),D=io(t),U=D.assigneeAgentId?R.find(K=>K.id===D.assigneeAgentId):null;return(0,x.createElement)(U0,{value:t,options:_,recentOptionIds:C,placeholder:l,noneLabel:c,searchPlaceholder:u,emptyMessage:p,className:g,onConfirm:v,onChange:r(K=>{const z=io(K);z.assigneeAgentId&&tf(z.assigneeAgentId),z.assigneeUserId&&ef(z.assigneeUserId),s(K,z)},"onChange"),renderTriggerValue:r(K=>K?U?(0,x.createElement)(Af,null,(0,x.createElement)(ig,{icon:U.icon,className:"h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,x.createElement)("span",{className:"truncate"},K.label)):(0,x.createElement)("span",{className:"truncate"},K.label):(0,x.createElement)("span",{className:"text-ink-3"},l),"renderTriggerValue"),renderOption:r(K=>{if(!K.id)return(0,x.createElement)("span",{className:"truncate"},K.label);const z=io(K.id),E=z.assigneeAgentId?R.find(B=>B.id===z.assigneeAgentId):null;return(0,x.createElement)(Af,null,E?(0,x.createElement)(ig,{icon:E.icon,className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):(0,x.createElement)(so,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,x.createElement)("span",{className:"truncate"},K.label))},"renderOption")})}r(wH,"PluginSdkAssigneePicker");function kH({companyId:e,value:t,onChange:s,placeholder:l="Project",noneLabel:c="No project",searchPlaceholder:u="Search projects...",emptyMessage:p="No projects found.",includeArchived:f=!1,className:h,onConfirm:g}){const v=O0(),y=e??v.companyId??null,{data:j}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),k=j?.user?.id??j?.session?.userId??null,{data:S}=me({queryKey:$.projects.list(y??"__no-company__",{includeArchived:f}),queryFn:r(()=>hr.list(y,{includeArchived:f}),"queryFn"),enabled:!!y}),N=(0,x.useMemo)(()=>(S??[]).filter(_=>f||!_.archivedAt),[f,S]),{orderedProjects:I}=uA({projects:N,companyId:y,userId:k}),C=(0,x.useMemo)(()=>Mg(),[]),M=(0,x.useMemo)(()=>I.map(_=>({id:_.id,label:_.name,searchText:_.description??""})),[I]),R=I.find(_=>_.id===t)??null;return(0,x.createElement)(U0,{value:t,options:M,recentOptionIds:C,placeholder:l,noneLabel:c,searchPlaceholder:u,emptyMessage:p,className:h,onConfirm:g,onChange:r(_=>{_&&mf(_),s(_)},"onChange"),renderTriggerValue:r(_=>!_||!R?(0,x.createElement)("span",{className:"text-ink-3"},l):(0,x.createElement)(Af,null,(0,x.createElement)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-sm",style:{backgroundColor:R.color??"#6366f1"}}),(0,x.createElement)("span",{className:"truncate"},_.label)),"renderTriggerValue"),renderOption:r(_=>{if(!_.id)return(0,x.createElement)("span",{className:"truncate"},_.label);const D=I.find(U=>U.id===_.id);return(0,x.createElement)(Af,null,(0,x.createElement)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-sm",style:{backgroundColor:D?.color??"#6366f1"}}),(0,x.createElement)("span",{className:"truncate"},_.label))},"renderOption")})}r(kH,"PluginSdkProjectPicker");function Af({children:e}){return(0,x.createElement)("span",{className:"contents"},e)}r(Af,"FragmentSafe");function SH({label:e,status:t}){const s={ok:"border-emerald-300 bg-emerald-50 text-emerald-700",warning:"border-amber-300 bg-amber-50 text-amber-800",error:"border-red-300 bg-red-50 text-red-700",info:"border-slate-300 bg-slate-50 text-slate-700",pending:"border-slate-300 bg-slate-50 text-slate-600"}[t];return(0,x.createElement)("span",{className:`inline-flex w-fit items-center rounded-full border px-2 py-0.5 text-xs font-medium ${s}`},e)}r(SH,"PluginSdkStatusBadge");function NH({columns:e,rows:t,loading:s,emptyMessage:l="No rows."}){if(s)return(0,x.createElement)("div",{className:"text-sm text-ink-3"},"Loading...");if(!t.length)return(0,x.createElement)("div",{className:"text-sm text-ink-3"},l);const c=e.map(u=>u.width??"minmax(0, 1fr)").join(" ");return(0,x.createElement)("div",{className:"overflow-hidden rounded-md border"},(0,x.createElement)("div",{className:"hidden border-b bg-bg-3/35 px-3 py-2 text-xs font-medium uppercase tracking-wide text-ink-3 md:grid md:[grid-template-columns:var(--plugin-grid-cols)]",style:{"--plugin-grid-cols":c}},e.map(u=>(0,x.createElement)("div",{key:u.key},u.header))),(0,x.createElement)("div",{className:"divide-y"},t.map((u,p)=>(0,x.createElement)("div",{key:String(u.id??p),className:"grid gap-2 px-3 py-3 md:items-center md:[grid-template-columns:var(--plugin-grid-cols)]",style:{"--plugin-grid-cols":c}},e.map(f=>(0,x.createElement)("div",{key:f.key,className:"min-w-0 text-sm"},(0,x.createElement)("div",{className:"mb-1 text-[11px] font-medium uppercase tracking-wide text-ink-3 md:hidden"},f.header),f.render?f.render(u[f.key],u):String(u[f.key]??"")))))))}r(NH,"PluginSdkDataTable");function CH({pairs:e}){return(0,x.createElement)("dl",{className:"grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[max-content_minmax(0,1fr)]"},e.flatMap(t=>[(0,x.createElement)("dt",{key:`${t.label}:label`,className:"text-ink-3"},t.label),(0,x.createElement)("dd",{key:`${t.label}:value`,className:"min-w-0"},t.value)]))}r(CH,"PluginSdkKeyValueList");function AH({label:e,value:t,unit:s}){return(0,x.createElement)("div",{className:"rounded-md border bg-bg-2 p-3"},(0,x.createElement)("div",{className:"text-xs font-medium uppercase tracking-wide text-ink-3"},e),(0,x.createElement)("div",{className:"mt-1 text-lg font-semibold"},`${t}${s??""}`))}r(AH,"PluginSdkMetricCard");function _H({data:e}){return(0,x.createElement)("pre",{className:"max-h-80 overflow-auto rounded-md border bg-bg-3/30 p-2 text-xs"},JSON.stringify(e,null,2))}r(_H,"PluginSdkJsonTree");function EH({label:e="Loading"}){return(0,x.createElement)("span",{className:"inline-block h-3.5 w-3.5 animate-spin rounded-full border-2 border-ink-3/30 border-t-ink align-middle",role:"status","aria-label":e})}r(EH,"PluginSdkSpinner");var IH=class extends x.Component{static{r(this,"PluginSdkErrorBoundary")}state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback??(0,x.createElement)("div",{className:"rounded-md border border-bad/30 p-3 text-sm text-bad"},"Plugin UI failed to render."):this.props.children}};function TH(e,t){globalThis.__wardmotePluginBridge__={react:e,reactJsxRuntime:a,reactDom:t,sdkUi:{usePluginData:fT,usePluginAction:dT,useHostContext:O0,useHostLocation:pT,useHostNavigation:bT,usePluginStream:hT,usePluginToast:mT,copyTextToClipboard:B0,MarkdownBlock:r(({content:s,className:l,enableWikiLinks:c,wikiLinkRoot:u,resolveWikiLinkHref:p})=>(0,x.createElement)(n3,{className:l,softBreaks:!1,enableWikiLinks:c,wikiLinkRoot:u,resolveWikiLinkHref:p,children:s}),"MarkdownBlock"),MetricCard:AH,StatusBadge:SH,DataTable:NH,KeyValueList:CH,JsonTree:_H,Spinner:EH,ErrorBoundary:IH,MarkdownEditor:vH,FileTree:bH,IssuesList:jH,AssigneePicker:wH,ProjectPicker:kH,ManagedRoutinesList:xH}}}r(TH,"initPluginBridge");var RH=1e4;function MH(e=RH){if(typeof performance>"u"||typeof performance.clearMeasures!="function")return()=>{};const s=setInterval(r(()=>{globalThis.__wardmoteKeepPerfMeasures||performance.clearMeasures()},"reap"),e);return()=>clearInterval(s)}r(MH,"startPerfMeasureReaper");var DH=go((e=>{function t(X,A){var ee=X.length;X.push(A);e:for(;0<ee;){var ie=ee-1>>>1,le=X[ie];if(0<c(le,A))X[ie]=A,X[ee]=le,ee=ie;else break e}}r(t,"push");function s(X){return X.length===0?null:X[0]}r(s,"peek");function l(X){if(X.length===0)return null;var A=X[0],ee=X.pop();if(ee!==A){X[0]=ee;e:for(var ie=0,le=X.length,Ae=le>>>1;ie<Ae;){var de=2*(ie+1)-1,we=X[de],ye=de+1,Me=X[ye];if(0>c(we,ee))ye<le&&0>c(Me,we)?(X[ie]=Me,X[ye]=ee,ie=ye):(X[ie]=we,X[de]=ee,ie=de);else if(ye<le&&0>c(Me,ee))X[ie]=Me,X[ye]=ee,ie=ye;else break e}}return A}r(l,"pop");function c(X,A){var ee=X.sortIndex-A.sortIndex;return ee!==0?ee:X.id-A.id}if(r(c,"compare"),e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var p=Date,f=p.now();e.unstable_now=function(){return p.now()-f}}var h=[],g=[],v=1,y=null,j=3,k=!1,S=!1,N=!1,I=!1,C=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function _(X){for(var A=s(g);A!==null;){if(A.callback===null)l(g);else if(A.startTime<=X)l(g),A.sortIndex=A.expirationTime,t(h,A);else break;A=s(g)}}r(_,"advanceTimers");function D(X){if(N=!1,_(X),!S)if(s(h)!==null)S=!0,U||(U=!0,Q());else{var A=s(g);A!==null&&ce(D,A.startTime-X)}}r(D,"handleTimeout");var U=!1,K=-1,z=5,E=-1;function B(){return I?!0:!(e.unstable_now()-E<z)}r(B,"shouldYieldToHost");function O(){if(I=!1,U){var X=e.unstable_now();E=X;var A=!0;try{e:{S=!1,N&&(N=!1,M(K),K=-1),k=!0;var ee=j;try{t:{for(_(X),y=s(h);y!==null&&!(y.expirationTime>X&&B());){var ie=y.callback;if(typeof ie=="function"){y.callback=null,j=y.priorityLevel;var le=ie(y.expirationTime<=X);if(X=e.unstable_now(),typeof le=="function"){y.callback=le,_(X),A=!0;break t}y===s(h)&&l(h),_(X)}else l(h);y=s(h)}if(y!==null)A=!0;else{var Ae=s(g);Ae!==null&&ce(D,Ae.startTime-X),A=!1}}break e}finally{y=null,j=ee,k=!1}A=void 0}}finally{A?Q():U=!1}}}r(O,"performWorkUntilDeadline");var Q;if(typeof R=="function")Q=r(function(){R(O)},"schedulePerformWorkUntilDeadline");else if(typeof MessageChannel<"u"){var V=new MessageChannel,ue=V.port2;V.port1.onmessage=O,Q=r(function(){ue.postMessage(null)},"schedulePerformWorkUntilDeadline")}else Q=r(function(){C(O,0)},"schedulePerformWorkUntilDeadline");function ce(X,A){K=C(function(){X(e.unstable_now())},A)}r(ce,"requestHostTimeout"),e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(X){X.callback=null},e.unstable_forceFrameRate=function(X){0>X||125<X||(z=0<X?Math.floor(1e3/X):5)},e.unstable_getCurrentPriorityLevel=function(){return j},e.unstable_next=function(X){switch(j){case 1:case 2:case 3:var A=3;break;default:A=j}var ee=j;j=A;try{return X()}finally{j=ee}},e.unstable_requestPaint=function(){I=!0},e.unstable_runWithPriority=function(X,A){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var ee=j;j=X;try{return A()}finally{j=ee}},e.unstable_scheduleCallback=function(X,A,ee){var ie=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ie+ee:ie):ee=ie,X){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=ee+le,X={id:v++,callback:A,priorityLevel:X,startTime:ee,expirationTime:le,sortIndex:-1},ee>ie?(X.sortIndex=ee,t(g,X),s(h)===null&&X===s(g)&&(N?(M(K),K=-1):N=!0,ce(D,ee-ie))):(X.sortIndex=le,t(h,X),S||k||(S=!0,U||(U=!0,Q()))),X},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(X){var A=j;return function(){var ee=j;j=A;try{return X.apply(this,arguments)}finally{j=ee}}}})),OH=go(((e,t)=>{t.exports=DH()})),LH=go((e=>{var t=OH(),s=v0(),l=iS();function c(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)i+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}r(c,"formatProdErrorMessage");function u(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}r(u,"isValidContainer");function p(n){var i=n,o=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(o=i.return),n=i.return;while(n)}return i.tag===3?o:null}r(p,"getNearestMountedFiber");function f(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}r(f,"getSuspenseInstanceFromFiber");function h(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}r(h,"getActivityInstanceFromFiber");function g(n){if(p(n)!==n)throw Error(c(188))}r(g,"assertIsMounted");function v(n){var i=n.alternate;if(!i){if(i=p(n),i===null)throw Error(c(188));return i!==n?null:n}for(var o=n,d=i;;){var m=o.return;if(m===null)break;var b=m.alternate;if(b===null){if(d=m.return,d!==null){o=d;continue}break}if(m.child===b.child){for(b=m.child;b;){if(b===o)return g(m),n;if(b===d)return g(m),i;b=b.sibling}throw Error(c(188))}if(o.return!==d.return)o=m,d=b;else{for(var w=!1,T=m.child;T;){if(T===o){w=!0,o=m,d=b;break}if(T===d){w=!0,d=m,o=b;break}T=T.sibling}if(!w){for(T=b.child;T;){if(T===o){w=!0,o=b,d=m;break}if(T===d){w=!0,d=b,o=m;break}T=T.sibling}if(!w)throw Error(c(189))}}if(o.alternate!==d)throw Error(c(190))}if(o.tag!==3)throw Error(c(188));return o.stateNode.current===o?n:i}r(v,"findCurrentFiberUsingSlowPath");function y(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=y(n),i!==null)return i;n=n.sibling}return null}r(y,"findCurrentHostFiberImpl");var j=Object.assign,k=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),_=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function V(n){return n===null||typeof n!="object"?null:(n=Q&&n[Q]||n["@@iterator"],typeof n=="function"?n:null)}r(V,"getIteratorFn");var ue=Symbol.for("react.client.reference");function ce(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ue?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case I:return"Fragment";case M:return"Profiler";case C:return"StrictMode";case U:return"Suspense";case K:return"SuspenseList";case B:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case N:return"Portal";case _:return n.displayName||"Context";case R:return(n._context.displayName||"Context")+".Consumer";case D:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case z:return i=n.displayName||null,i!==null?i:ce(n.type)||"Memo";case E:i=n._payload,n=n._init;try{return ce(n(i))}catch{}}return null}r(ce,"getComponentNameFromType");var X=Array.isArray,A=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},le=[],Ae=-1;function de(n){return{current:n}}r(de,"createCursor");function we(n){0>Ae||(n.current=le[Ae],le[Ae]=null,Ae--)}r(we,"pop");function ye(n,i){Ae++,le[Ae]=n.current,n.current=i}r(ye,"push");var Me=de(null),he=de(null),ve=de(null),et=de(null);function $e(n,i){switch(ye(ve,i),ye(he,n),ye(Me,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?dy(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=dy(i),n=fy(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}we(Me),ye(Me,n)}r($e,"pushHostContainer");function Ie(){we(Me),we(he),we(ve)}r(Ie,"popHostContainer");function ct(n){n.memoizedState!==null&&ye(et,n);var i=Me.current,o=fy(i,n.type);i!==o&&(ye(he,n),ye(Me,o))}r(ct,"pushHostContext");function He(n){he.current===n&&(we(Me),we(he)),et.current===n&&(we(et),ic._currentValue=ie)}r(He,"popHostContext");var vt,Jt;function ge(n){if(vt===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);vt=i&&i[1]||"",Jt=-1<o.stack.indexOf(`
|
|
60
|
+
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
61
|
+
`+vt+n+Jt}r(ge,"describeBuiltInComponentFrame");var Oe=!1;function De(n,i){if(!n||Oe)return"";Oe=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:r(function(){try{if(i){var xe=r(function(){throw Error()},"Fake");if(Object.defineProperty(xe.prototype,"props",{set:r(function(){throw Error()},"set")}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(re){var ae=re}Reflect.construct(n,[],xe)}else{try{xe.call()}catch(re){ae=re}n.call(xe.prototype)}}else{try{throw Error()}catch(re){ae=re}(xe=n())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(re){if(re&&ae&&typeof re.stack=="string")return[re.stack,ae.stack]}return[null,null]},"DetermineComponentFrameRoot")};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=d.DetermineComponentFrameRoot(),w=b[0],T=b[1];if(w&&T){var q=w.split(`
|
|
62
|
+
`),ne=T.split(`
|
|
63
|
+
`);for(m=d=0;d<q.length&&!q[d].includes("DetermineComponentFrameRoot");)d++;for(;m<ne.length&&!ne[m].includes("DetermineComponentFrameRoot");)m++;if(d===q.length||m===ne.length)for(d=q.length-1,m=ne.length-1;1<=d&&0<=m&&q[d]!==ne[m];)m--;for(;1<=d&&0<=m;d--,m--)if(q[d]!==ne[m]){if(d!==1||m!==1)do if(d--,m--,0>m||q[d]!==ne[m]){var fe=`
|
|
64
|
+
`+q[d].replace(" at new "," at ");return n.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",n.displayName)),fe}while(1<=d&&0<=m);break}}}finally{Oe=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?ge(o):""}r(De,"describeNativeComponentFrame");function ut(n,i){switch(n.tag){case 26:case 27:case 5:return ge(n.type);case 16:return ge("Lazy");case 13:return n.child!==i&&i!==null?ge("Suspense Fallback"):ge("Suspense");case 19:return ge("SuspenseList");case 0:case 15:return De(n.type,!1);case 11:return De(n.type.render,!1);case 1:return De(n.type,!0);case 31:return ge("Activity");default:return""}}r(ut,"describeFiber");function Ht(n){try{var i="",o=null;do i+=ut(n,o),o=n,n=n.return;while(n);return i}catch(d){return`
|
|
65
|
+
Error generating stack: `+d.message+`
|
|
66
|
+
`+d.stack}}r(Ht,"getStackByFiberInDevAndProd");var Vt=Object.prototype.hasOwnProperty,gt=t.unstable_scheduleCallback,un=t.unstable_cancelCallback,P=t.unstable_shouldYield,qe=t.unstable_requestPaint,Ye=t.unstable_now,xt=t.unstable_getCurrentPriorityLevel,at=t.unstable_ImmediatePriority,Kt=t.unstable_UserBlockingPriority,ea=t.unstable_NormalPriority,en=t.unstable_LowPriority,Mt=t.unstable_IdlePriority,Gt=t.log,dt=t.unstable_setDisableYieldValue,On=null,mt=null;function Nn(n){if(typeof Gt=="function"&&dt(n),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(On,n)}catch{}}r(Nn,"setIsStrictModeForDevtools");var It=Math.clz32?Math.clz32:Tt,tn=Math.log,qt=Math.LN2;function Tt(n){return n>>>=0,n===0?32:31-(tn(n)/qt|0)|0}r(Tt,"clz32Fallback");var Ct=256,_e=262144,Re=4194304;function lt(n){var i=n&42;if(i!==0)return i;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}r(lt,"getHighestPriorityLanes");function Dt(n,i,o){var d=n.pendingLanes;if(d===0)return 0;var m=0,b=n.suspendedLanes,w=n.pingedLanes;n=n.warmLanes;var T=d&134217727;return T!==0?(d=T&~b,d!==0?m=lt(d):(w&=T,w!==0?m=lt(w):o||(o=T&~n,o!==0&&(m=lt(o))))):(T=d&~b,T!==0?m=lt(T):w!==0?m=lt(w):o||(o=d&~n,o!==0&&(m=lt(o)))),m===0?0:i!==0&&i!==m&&(i&b)===0&&(b=m&-m,o=i&-i,b>=o||b===32&&(o&4194048)!==0)?i:m}r(Dt,"getNextLanes");function ze(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}r(ze,"checkIfRootIsPrerendering");function Ot(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+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 i+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-1}}r(Ot,"computeExpirationTime");function Rt(){var n=Re;return Re<<=1,(Re&62914560)===0&&(Re=4194304),n}r(Rt,"claimNextRetryLane");function Lt(n){for(var i=[],o=0;31>o;o++)i.push(n);return i}r(Lt,"createLaneMap");function nn(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}r(nn,"markRootUpdated$1");function Wt(n,i,o,d,m,b){var w=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var T=n.entanglements,q=n.expirationTimes,ne=n.hiddenUpdates;for(o=w&~o;0<o;){var fe=31-It(o),xe=1<<fe;T[fe]=0,q[fe]=-1;var ae=ne[fe];if(ae!==null)for(ne[fe]=null,fe=0;fe<ae.length;fe++){var re=ae[fe];re!==null&&(re.lane&=-536870913)}o&=~xe}d!==0&&Ln(n,d,0),b!==0&&m===0&&n.tag!==0&&(n.suspendedLanes|=b&~(w&~i))}r(Wt,"markRootFinished");function Ln(n,i,o){n.pendingLanes|=i,n.suspendedLanes&=~i;var d=31-It(i);n.entangledLanes|=i,n.entanglements[d]=n.entanglements[d]|1073741824|o&261930}r(Ln,"markSpawnedDeferredLane");function gn(n,i){var o=n.entangledLanes|=i;for(n=n.entanglements;o;){var d=31-It(o),m=1<<d;m&i|n[d]&i&&(n[d]|=i),o&=~m}}r(gn,"markRootEntangled");function zn(n,i){var o=i&-i;return o=(o&42)!==0?1:is(o),(o&(n.suspendedLanes|i))!==0?0:o}r(zn,"getBumpedLaneForHydration");function is(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}r(is,"getBumpedLaneForHydrationByLane");function La(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}r(La,"lanesToEventPriority");function wa(){var n=ee.p;return n!==0?n:(n=window.event,n===void 0?32:My(n.type))}r(wa,"resolveUpdatePriority");function ka(n,i){var o=ee.p;try{return ee.p=n,i()}finally{ee.p=o}}r(ka,"runWithPriority");var Qn=Math.random().toString(36).slice(2),yt="__reactFiber$"+Qn,dn="__reactProps$"+Qn,za="__reactContainer$"+Qn,si="__reactEvents$"+Qn,pn="__reactListeners$"+Qn,Bs="__reactHandles$"+Qn,Pn="__reactResources$"+Qn,ra="__reactMarker$"+Qn;function ma(n){delete n[yt],delete n[dn],delete n[si],delete n[pn],delete n[Bs]}r(ma,"detachDeletedInstance");function ha(n){var i=n[yt];if(i)return i;for(var o=n.parentNode;o;){if(i=o[za]||o[yt]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(n=vy(n);n!==null;){if(o=n[yt])return o;n=vy(n)}return i}n=o,o=n.parentNode}return null}r(ha,"getClosestInstanceFromNode");function $n(n){if(n=n[yt]||n[za]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}r($n,"getInstanceFromNode");function Gn(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(c(33))}r(Gn,"getNodeFromInstance");function Pa(n){var i=n[Pn];return i||(i=n[Pn]={hoistableStyles:new Map,hoistableScripts:new Map}),i}r(Pa,"getResourcesFromRoot");function xn(n){n[ra]=!0}r(xn,"markNodeAsHoistable");var rs=new Set,Sa={};function In(n,i){ga(n,i),ga(n+"Capture",i)}r(In,"registerTwoPhaseEvent");function ga(n,i){for(Sa[n]=i,n=0;n<i.length;n++)rs.add(i[n])}r(ga,"registerDirectEvent");var Ks=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]*$"),qs={},ls={};function Va(n){return Vt.call(ls,n)?!0:Vt.call(qs,n)?!1:Ks.test(n)?ls[n]=!0:(qs[n]=!0,!1)}r(Va,"isAttributeNameSafe");function Na(n,i,o){if(Va(i))if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var d=i.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+o)}}r(Na,"setValueForAttribute");function $a(n,i,o){if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+o)}}r($a,"setValueForKnownAttribute");function ht(n,i,o,d){if(d===null)n.removeAttribute(o);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(i,o,""+d)}}r(ht,"setValueForNamespacedAttribute");function Un(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}r(Un,"getToStringValue");function ii(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}r(ii,"isCheckable");function ri(n,i,o){var d=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var m=d.get,b=d.set;return Object.defineProperty(n,i,{configurable:!0,get:r(function(){return m.call(this)},"get"),set:r(function(w){o=""+w,b.call(this,w)},"set")}),Object.defineProperty(n,i,{enumerable:d.enumerable}),{getValue:r(function(){return o},"getValue"),setValue:r(function(w){o=""+w},"setValue"),stopTracking:r(function(){n._valueTracker=null,delete n[i]},"stopTracking")}}}r(ri,"trackValueOnNode");function Wa(n){if(!n._valueTracker){var i=ii(n)?"checked":"value";n._valueTracker=ri(n,i,""+n[i])}}r(Wa,"track");function se(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var o=i.getValue(),d="";return n&&(d=ii(n)?n.checked?"true":"false":n.value),n=d,n!==o?(i.setValue(n),!0):!1}r(se,"updateValueIfChanged");function Te(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}r(Te,"getActiveElement");var Ze=/[\n"\\]/g;function We(n){return n.replace(Ze,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}r(We,"escapeSelectorAttributeValueInsideDoubleQuotes");function zt(n,i,o,d,m,b,w,T){n.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?n.type=w:n.removeAttribute("type"),i!=null?w==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+Un(i)):n.value!==""+Un(i)&&(n.value=""+Un(i)):w!=="submit"&&w!=="reset"||n.removeAttribute("value"),i!=null?Z(n,w,Un(i)):o!=null?Z(n,w,Un(o)):d!=null&&n.removeAttribute("value"),m==null&&b!=null&&(n.defaultChecked=!!b),m!=null&&(n.checked=m&&typeof m!="function"&&typeof m!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?n.name=""+Un(T):n.removeAttribute("name")}r(zt,"updateInput");function Qt(n,i,o,d,m,b,w,T){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(n.type=b),i!=null||o!=null){if(!(b!=="submit"&&b!=="reset"||i!=null)){Wa(n);return}o=o!=null?""+Un(o):"",i=i!=null?""+Un(i):o,T||i===n.value||(n.value=i),n.defaultValue=i}d=d??m,d=typeof d!="function"&&typeof d!="symbol"&&!!d,n.checked=T?n.checked:!!d,n.defaultChecked=!!d,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(n.name=w),Wa(n)}r(Qt,"initInput");function Z(n,i,o){i==="number"&&Te(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}r(Z,"setDefaultValue");function Ne(n,i,o,d){if(n=n.options,i){i={};for(var m=0;m<o.length;m++)i["$"+o[m]]=!0;for(o=0;o<n.length;o++)m=i.hasOwnProperty("$"+n[o].value),n[o].selected!==m&&(n[o].selected=m),m&&d&&(n[o].defaultSelected=!0)}else{for(o=""+Un(o),i=null,m=0;m<n.length;m++){if(n[m].value===o){n[m].selected=!0,d&&(n[m].defaultSelected=!0);return}i!==null||n[m].disabled||(i=n[m])}i!==null&&(i.selected=!0)}}r(Ne,"updateOptions");function Be(n,i,o){if(i!=null&&(i=""+Un(i),i!==n.value&&(n.value=i),o==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=o!=null?""+Un(o):""}r(Be,"updateTextarea");function Le(n,i,o,d){if(i==null){if(d!=null){if(o!=null)throw Error(c(92));if(X(d)){if(1<d.length)throw Error(c(93));d=d[0]}o=d}o??="",i=o}o=Un(i),n.defaultValue=o,d=n.textContent,d===o&&d!==""&&d!==null&&(n.value=d),Wa(n)}r(Le,"initTextarea");function st(n,i){if(i){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=i;return}}n.textContent=i}r(st,"setTextContent");var it=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(" "));function Pt(n,i,o){var d=i.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?d?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":d?n.setProperty(i,o):typeof o!="number"||o===0||it.has(i)?i==="float"?n.cssFloat=o:n[i]=(""+o).trim():n[i]=o+"px"}r(Pt,"setValueForStyle");function bn(n,i,o){if(i!=null&&typeof i!="object")throw Error(c(62));if(n=n.style,o!=null){for(var d in o)!o.hasOwnProperty(d)||i!=null&&i.hasOwnProperty(d)||(d.indexOf("--")===0?n.setProperty(d,""):d==="float"?n.cssFloat="":n[d]="");for(var m in i)d=i[m],i.hasOwnProperty(m)&&o[m]!==d&&Pt(n,m,d)}else for(var b in i)i.hasOwnProperty(b)&&Pt(n,b,i[b])}r(bn,"setValueForStyles");function Bn(n){if(n.indexOf("-")===-1)return!1;switch(n){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}}r(Bn,"isCustomElement");var Qa=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"]]),Ca=/^[\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;function Cn(n){return Ca.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}r(Cn,"sanitizeURL");function jt(){}r(jt,"noop$1");var la=null;function Yt(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}r(Yt,"getEventTarget");var ta=null,an=null;function Aa(n){var i=$n(n);if(i&&(n=i.stateNode)){var o=n[dn]||null;e:switch(n=i.stateNode,i.type){case"input":if(zt(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),i=o.name,o.type==="radio"&&i!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+We(""+i)+'"][type="radio"]'),i=0;i<o.length;i++){var d=o[i];if(d!==n&&d.form===n.form){var m=d[dn]||null;if(!m)throw Error(c(90));zt(d,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<o.length;i++)d=o[i],d.form===n.form&&se(d)}break e;case"textarea":Be(n,o.value,o.defaultValue);break e;case"select":i=o.value,i!=null&&Ne(n,!!o.multiple,i,!1)}}}r(Aa,"restoreStateOfTarget");var Fs=!1;function So(n,i,o){if(Fs)return n(i,o);Fs=!0;try{return n(i)}finally{if(Fs=!1,(ta!==null||an!==null)&&(Uu(),ta&&(i=ta,n=an,an=ta=null,Aa(i),n)))for(i=0;i<n.length;i++)Aa(n[i])}}r(So,"batchedUpdates$1");function li(n,i){var o=n.stateNode;if(o===null)return null;var d=o[dn]||null;if(d===null)return null;o=d[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(n=n.type,d=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!d;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(c(231,i,typeof o));return o}r(li,"getListener");var _a=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sl=!1;if(_a)try{var Mi={};Object.defineProperty(Mi,"passive",{get:r(function(){sl=!0},"get")}),window.addEventListener("test",Mi,Mi),window.removeEventListener("test",Mi,Mi)}catch{sl=!1}var Ss=null,il=null,rl=null;function br(){if(rl)return rl;var n,i=il,o=i.length,d,m="value"in Ss?Ss.value:Ss.textContent,b=m.length;for(n=0;n<o&&i[n]===m[n];n++);var w=o-n;for(d=1;d<=w&&i[o-d]===m[b-d];d++);return rl=m.slice(n,1<d?1-d:void 0)}r(br,"getData");function oi(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}r(oi,"getEventCharCode");function ll(){return!0}r(ll,"functionThatReturnsTrue");function vr(){return!1}r(vr,"functionThatReturnsFalse");function xa(n){function i(o,d,m,b,w){this._reactName=o,this._targetInst=m,this.type=d,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var T in n)n.hasOwnProperty(T)&&(o=n[T],this[T]=o?o(b):b[T]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?ll:vr,this.isPropagationStopped=vr,this}return r(i,"SyntheticBaseEvent"),j(i.prototype,{preventDefault:r(function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=ll)},"preventDefault"),stopPropagation:r(function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=ll)},"stopPropagation"),persist:r(function(){},"persist"),isPersistent:ll}),i}r(xa,"createSyntheticEvent");var Ns={eventPhase:0,bubbles:0,cancelable:0,timeStamp:r(function(n){return n.timeStamp||Date.now()},"timeStamp"),defaultPrevented:0,isTrusted:0},Di=xa(Ns),F=j({},Ns,{view:0,detail:0}),W=xa(F),J,Ee,Je,At=j({},F,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ol,button:0,buttons:0,relatedTarget:r(function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},"relatedTarget"),movementX:r(function(n){return"movementX"in n?n.movementX:(n!==Je&&(Je&&n.type==="mousemove"?(J=n.screenX-Je.screenX,Ee=n.screenY-Je.screenY):Ee=J=0,Je=n),J)},"movementX"),movementY:r(function(n){return"movementY"in n?n.movementY:Ee},"movementY")}),Kn=xa(At),pt=xa(j({},At,{dataTransfer:0})),sn=xa(j({},F,{relatedTarget:0})),An=xa(j({},Ns,{animationName:0,elapsedTime:0,pseudoElement:0})),Se=xa(j({},Ns,{clipboardData:r(function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData},"clipboardData")})),Hs=xa(j({},Ns,{data:0})),Ga={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ya={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"},ba={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ip(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=ba[n])?!!i[n]:!1}r(ip,"modifierStateGetter");function ol(){return ip}r(ol,"getEventModifierState");var Zc=xa(j({},F,{key:r(function(n){if(n.key){var i=Ga[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=oi(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Ya[n.keyCode]||"Unidentified":""},"key"),code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ol,charCode:r(function(n){return n.type==="keypress"?oi(n):0},"charCode"),keyCode:r(function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},"keyCode"),which:r(function(n){return n.type==="keypress"?oi(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0},"which")})),cl=xa(j({},At,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),rp=xa(j({},F,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ol})),No=xa(j({},Ns,{propertyName:0,elapsedTime:0,pseudoElement:0})),Jc=xa(j({},At,{deltaX:r(function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},"deltaX"),deltaY:r(function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},"deltaY"),deltaZ:0,deltaMode:0})),ul=xa(j({},Ns,{newState:0,oldState:0})),dl=[9,13,27,32],fl=_a&&"CompositionEvent"in window,ci=null;_a&&"documentMode"in document&&(ci=document.documentMode);var ui=_a&&"TextEvent"in window&&!ci,pl=_a&&(!fl||ci&&8<ci&&11>=ci),eu=" ",tu=!1;function nu(n,i){switch(n){case"keyup":return dl.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}r(nu,"isFallbackCompositionEnd");function ml(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}r(ml,"getDataFromCustomEvent");var os=!1;function Co(n,i){switch(n){case"compositionend":return ml(i);case"keypress":return i.which!==32?null:(tu=!0,eu);case"textInput":return n=i.data,n===eu&&tu?null:n;default:return null}}r(Co,"getNativeBeforeInputChars");function lp(n,i){if(os)return n==="compositionend"||!fl&&nu(n,i)?(n=br(),rl=il=Ss=null,os=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return pl&&i.locale!=="ko"?null:i.data;default:return null}}r(lp,"getFallbackBeforeInputChars");var Ao={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};function au(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!Ao[n.type]:i==="textarea"}r(au,"isTextInputElement");function _o(n,i,o,d){ta?an?an.push(d):an=[d]:ta=d,i=Wu(i,"onChange"),0<i.length&&(o=new Di("onChange","change",null,o,d),n.push({event:o,listeners:i}))}r(_o,"createAndAccumulateChangeEvent");var yr=null,Oi=null;function su(n){sy(n,0)}r(su,"runEventInBatch");function Ue(n){if(se(Gn(n)))return n}r(Ue,"getInstIfValueChanged");function Ea(n,i){if(n==="change")return i}r(Ea,"getTargetInstForChangeEvent");var iu=!1;if(_a){var hl;if(_a){var op="oninput"in document;if(!op){var _x=document.createElement("div");_x.setAttribute("oninput","return;"),op=typeof _x.oninput=="function"}hl=op}else hl=!1;iu=hl&&(!document.documentMode||9<document.documentMode)}function Ex(){yr&&(yr.detachEvent("onpropertychange",Ix),Oi=yr=null)}r(Ex,"stopWatchingForValueChange");function Ix(n){if(n.propertyName==="value"&&Ue(Oi)){var i=[];_o(i,Oi,n,Yt(n)),So(su,i)}}r(Ix,"handlePropertyChange");function $2(n,i,o){n==="focusin"?(Ex(),yr=i,Oi=o,yr.attachEvent("onpropertychange",Ix)):n==="focusout"&&Ex()}r($2,"handleEventsForInputEventPolyfill");function U2(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ue(Oi)}r(U2,"getTargetInstForInputEventPolyfill");function B2(n,i){if(n==="click")return Ue(i)}r(B2,"getTargetInstForClickEvent");function K2(n,i){if(n==="input"||n==="change")return Ue(i)}r(K2,"getTargetInstForInputOrChangeEvent");function q2(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}r(q2,"is");var Xa=typeof Object.is=="function"?Object.is:q2;function Eo(n,i){if(Xa(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var o=Object.keys(n),d=Object.keys(i);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var m=o[d];if(!Vt.call(i,m)||!Xa(n[m],i[m]))return!1}return!0}r(Eo,"shallowEqual");function Tx(n){for(;n&&n.firstChild;)n=n.firstChild;return n}r(Tx,"getLeafNode");function Rx(n,i){var o=Tx(n);n=0;for(var d;o;){if(o.nodeType===3){if(d=n+o.textContent.length,n<=i&&d>=i)return{node:o,offset:i-n};n=d}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Tx(o)}}r(Rx,"getNodeForCharacterOffset");function Mx(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?Mx(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}r(Mx,"containsNode");function Dx(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=Te(n.document);i instanceof n.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)n=i.contentWindow;else break;i=Te(n.document)}return i}r(Dx,"getActiveElementDeep");function cp(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}r(cp,"hasSelectionCapabilities");var F2=_a&&"documentMode"in document&&11>=document.documentMode,gl=null,up=null,Io=null,dp=!1;function Ox(n,i,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;dp||gl==null||gl!==Te(d)||(d=gl,"selectionStart"in d&&cp(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Io&&Eo(Io,d)||(Io=d,d=Wu(up,"onSelect"),0<d.length&&(i=new Di("onSelect","select",null,i,o),n.push({event:i,listeners:d}),i.target=gl)))}r(Ox,"constructSelectEvent");function jr(n,i){var o={};return o[n.toLowerCase()]=i.toLowerCase(),o["Webkit"+n]="webkit"+i,o["Moz"+n]="moz"+i,o}r(jr,"makePrefixMap");var xl={animationend:jr("Animation","AnimationEnd"),animationiteration:jr("Animation","AnimationIteration"),animationstart:jr("Animation","AnimationStart"),transitionrun:jr("Transition","TransitionRun"),transitionstart:jr("Transition","TransitionStart"),transitioncancel:jr("Transition","TransitionCancel"),transitionend:jr("Transition","TransitionEnd")},fp={},Lx={};_a&&(Lx=document.createElement("div").style,"AnimationEvent"in window||(delete xl.animationend.animation,delete xl.animationiteration.animation,delete xl.animationstart.animation),"TransitionEvent"in window||delete xl.transitionend.transition);function wr(n){if(fp[n])return fp[n];if(!xl[n])return n;var i=xl[n],o;for(o in i)if(i.hasOwnProperty(o)&&o in Lx)return fp[n]=i[o];return n}r(wr,"getVendorPrefixedEventName");var zx=wr("animationend"),Px=wr("animationiteration"),$x=wr("animationstart"),H2=wr("transitionrun"),V2=wr("transitionstart"),W2=wr("transitioncancel"),Ux=wr("transitionend"),Bx=new Map,pp="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(" ");pp.push("scrollEnd");function Cs(n,i){Bx.set(n,i),In(i,[n])}r(Cs,"registerSimpleEvent");var ru=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}},cs=[],bl=0,mp=0;function lu(){for(var n=bl,i=mp=bl=0;i<n;){var o=cs[i];cs[i++]=null;var d=cs[i];cs[i++]=null;var m=cs[i];cs[i++]=null;var b=cs[i];if(cs[i++]=null,d!==null&&m!==null){var w=d.pending;w===null?m.next=m:(m.next=w.next,w.next=m),d.pending=m}b!==0&&Kx(o,m,b)}}r(lu,"finishQueueingConcurrentUpdates");function ou(n,i,o,d){cs[bl++]=n,cs[bl++]=i,cs[bl++]=o,cs[bl++]=d,mp|=d,n.lanes|=d,n=n.alternate,n!==null&&(n.lanes|=d)}r(ou,"enqueueUpdate$1");function hp(n,i,o,d){return ou(n,i,o,d),cu(n)}r(hp,"enqueueConcurrentHookUpdate");function kr(n,i){return ou(n,null,null,i),cu(n)}r(kr,"enqueueConcurrentRenderForLane");function Kx(n,i,o){n.lanes|=o;var d=n.alternate;d!==null&&(d.lanes|=o);for(var m=!1,b=n.return;b!==null;)b.childLanes|=o,d=b.alternate,d!==null&&(d.childLanes|=o),b.tag===22&&(n=b.stateNode,n===null||n._visibility&1||(m=!0)),n=b,b=b.return;return n.tag===3?(b=n.stateNode,m&&i!==null&&(m=31-It(o),n=b.hiddenUpdates,d=n[m],d===null?n[m]=[i]:d.push(i),i.lane=o|536870912),b):null}r(Kx,"markUpdateLaneFromFiberToRoot");function cu(n){if(50<Zo)throw Zo=0,Sm=null,Error(c(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}r(cu,"getRootForUpdatedFiber");var vl={};function Q2(n,i,o,d){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}r(Q2,"FiberNode");function Za(n,i,o,d){return new Q2(n,i,o,d)}r(Za,"createFiberImplClass");function gp(n){return n=n.prototype,!(!n||!n.isReactComponent)}r(gp,"shouldConstruct");function di(n,i){var o=n.alternate;return o===null?(o=Za(n.tag,i,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=i,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&65011712,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,i=n.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.refCleanup=n.refCleanup,o}r(di,"createWorkInProgress");function qx(n,i){n.flags&=65011714;var o=n.alternate;return o===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,i=o.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}r(qx,"resetWorkInProgress");function uu(n,i,o,d,m,b){var w=0;if(d=n,typeof n=="function")gp(n)&&(w=1);else if(typeof n=="string")w=eE(n,o,Me.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case B:return n=Za(31,o,i,m),n.elementType=B,n.lanes=b,n;case I:return Sr(o.children,m,b,i);case C:w=8,m|=24;break;case M:return n=Za(12,o,i,m|2),n.elementType=M,n.lanes=b,n;case U:return n=Za(13,o,i,m),n.elementType=U,n.lanes=b,n;case K:return n=Za(19,o,i,m),n.elementType=K,n.lanes=b,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case _:w=10;break e;case R:w=9;break e;case D:w=11;break e;case z:w=14;break e;case E:w=16,d=null;break e}w=29,o=Error(c(130,n===null?"null":typeof n,"")),d=null}return i=Za(w,o,i,m),i.elementType=n,i.type=d,i.lanes=b,i}r(uu,"createFiberFromTypeAndProps");function Sr(n,i,o,d){return n=Za(7,n,d,i),n.lanes=o,n}r(Sr,"createFiberFromFragment");function xp(n,i,o){return n=Za(6,n,null,i),n.lanes=o,n}r(xp,"createFiberFromText");function Fx(n){var i=Za(18,null,null,0);return i.stateNode=n,i}r(Fx,"createFiberFromDehydratedFragment");function bp(n,i,o){return i=Za(4,n.children!==null?n.children:[],n.key,i),i.lanes=o,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}r(bp,"createFiberFromPortal");var Hx=new WeakMap;function us(n,i){if(typeof n=="object"&&n!==null){var o=Hx.get(n);return o!==void 0?o:(i={value:n,source:i,stack:Ht(i)},Hx.set(n,i),i)}return{value:n,source:i,stack:Ht(i)}}r(us,"createCapturedValueAtFiber");var yl=[],jl=0,du=null,To=0,ds=[],fs=0,Li=null,Vs=1,Ws="";function fi(n,i){yl[jl++]=To,yl[jl++]=du,du=n,To=i}r(fi,"pushTreeFork");function Vx(n,i,o){ds[fs++]=Vs,ds[fs++]=Ws,ds[fs++]=Li,Li=n;var d=Vs;n=Ws;var m=32-It(d)-1;d&=~(1<<m),o+=1;var b=32-It(i)+m;if(30<b){var w=m-m%5;b=(d&(1<<w)-1).toString(32),d>>=w,m-=w,Vs=1<<32-It(i)+m|o<<m|d,Ws=b+n}else Vs=1<<b|o<<m|d,Ws=n}r(Vx,"pushTreeId");function vp(n){n.return!==null&&(fi(n,1),Vx(n,1,0))}r(vp,"pushMaterializedTreeId");function yp(n){for(;n===du;)du=yl[--jl],yl[jl]=null,To=yl[--jl],yl[jl]=null;for(;n===Li;)Li=ds[--fs],ds[fs]=null,Ws=ds[--fs],ds[fs]=null,Vs=ds[--fs],ds[fs]=null}r(yp,"popTreeContext");function Wx(n,i){ds[fs++]=Vs,ds[fs++]=Ws,ds[fs++]=Li,Vs=i.id,Ws=i.overflow,Li=n}r(Wx,"restoreSuspendedTreeContext");var oa=null,vn=null,_t=!1,zi=null,ps=!1,jp=Error(c(519));function Pi(n){throw Ro(us(Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML","")),n)),jp}r(Pi,"throwOnHydrationMismatch");function Qx(n){var i=n.stateNode,o=n.type,d=n.memoizedProps;switch(i[yt]=n,i[dn]=d,o){case"dialog":kt("cancel",i),kt("close",i);break;case"iframe":case"object":case"embed":kt("load",i);break;case"video":case"audio":for(o=0;o<ec.length;o++)kt(ec[o],i);break;case"source":kt("error",i);break;case"img":case"image":case"link":kt("error",i),kt("load",i);break;case"details":kt("toggle",i);break;case"input":kt("invalid",i),Qt(i,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":kt("invalid",i);break;case"textarea":kt("invalid",i),Le(i,d.value,d.defaultValue,d.children)}o=d.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||i.textContent===""+o||d.suppressHydrationWarning===!0||cy(i.textContent,o)?(d.popover!=null&&(kt("beforetoggle",i),kt("toggle",i)),d.onScroll!=null&&kt("scroll",i),d.onScrollEnd!=null&&kt("scrollend",i),d.onClick!=null&&(i.onclick=jt),i=!0):i=!1,i||Pi(n,!0)}r(Qx,"prepareToHydrateHostInstance");function Gx(n){for(oa=n.return;oa;)switch(oa.tag){case 5:case 31:case 13:ps=!1;return;case 27:case 3:ps=!0;return;default:oa=oa.return}}r(Gx,"popToNextHostParent");function wl(n){if(n!==oa)return!1;if(!_t)return Gx(n),_t=!0,!1;var i=n.tag,o;if((o=i!==3&&i!==27)&&((o=i===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||Pm(n.type,n.memoizedProps)),o=!o),o&&vn&&Pi(n),Gx(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(317));vn=by(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(317));vn=by(n)}else i===27?(i=vn,Yi(n.type)?(n=qm,qm=null,vn=n):vn=i):vn=oa?gs(n.stateNode.nextSibling):null;return!0}r(wl,"popHydrationState");function Nr(){vn=oa=null,_t=!1}r(Nr,"resetHydrationState");function wp(){var n=zi;return n!==null&&(qa===null?qa=n:qa.push.apply(qa,n),zi=null),n}r(wp,"upgradeHydrationErrorsToRecoverable");function Ro(n){zi===null?zi=[n]:zi.push(n)}r(Ro,"queueHydrationError");var kp=de(null),Cr=null,pi=null;function $i(n,i,o){ye(kp,i._currentValue),i._currentValue=o}r($i,"pushProvider");function mi(n){n._currentValue=kp.current,we(kp)}r(mi,"popProvider");function Sp(n,i,o){for(;n!==null;){var d=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,d!==null&&(d.childLanes|=i)):d!==null&&(d.childLanes&i)!==i&&(d.childLanes|=i),n===o)break;n=n.return}}r(Sp,"scheduleContextWorkOnParentPath");function Np(n,i,o,d){var m=n.child;for(m!==null&&(m.return=n);m!==null;){var b=m.dependencies;if(b!==null){var w=m.child;b=b.firstContext;e:for(;b!==null;){var T=b;b=m;for(var q=0;q<i.length;q++)if(T.context===i[q]){b.lanes|=o,T=b.alternate,T!==null&&(T.lanes|=o),Sp(b.return,o,n),d||(w=null);break e}b=T.next}}else if(m.tag===18){if(w=m.return,w===null)throw Error(c(341));w.lanes|=o,b=w.alternate,b!==null&&(b.lanes|=o),Sp(w,o,n),w=null}else w=m.child;if(w!==null)w.return=m;else for(w=m;w!==null;){if(w===n){w=null;break}if(m=w.sibling,m!==null){m.return=w.return,w=m;break}w=w.return}m=w}}r(Np,"propagateContextChanges");function kl(n,i,o,d){n=null;for(var m=i,b=!1;m!==null;){if(!b){if((m.flags&524288)!==0)b=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var w=m.alternate;if(w===null)throw Error(c(387));if(w=w.memoizedProps,w!==null){var T=m.type;Xa(m.pendingProps.value,w.value)||(n!==null?n.push(T):n=[T])}}else if(m===et.current){if(w=m.alternate,w===null)throw Error(c(387));w.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(n!==null?n.push(ic):n=[ic])}m=m.return}n!==null&&Np(i,n,o,d),i.flags|=262144}r(kl,"propagateParentContextChanges");function fu(n){for(n=n.firstContext;n!==null;){if(!Xa(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}r(fu,"checkIfContextChanged");function Ar(n){Cr=n,pi=null,n=n.dependencies,n!==null&&(n.firstContext=null)}r(Ar,"prepareToReadContext");function ca(n){return Yx(Cr,n)}r(ca,"readContext");function pu(n,i){return Cr===null&&Ar(n),Yx(n,i)}r(pu,"readContextDuringReconciliation");function Yx(n,i){var o=i._currentValue;if(i={context:i,memoizedValue:o,next:null},pi===null){if(n===null)throw Error(c(308));pi=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else pi=pi.next=i;return o}r(Yx,"readContextForConsumer");var G2=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:r(function(o,d){n.push(d)},"addEventListener")};this.abort=function(){i.aborted=!0,n.forEach(function(o){return o()})}},Y2=t.unstable_scheduleCallback,X2=t.unstable_NormalPriority,qn={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cp(){return{controller:new G2,data:new Map,refCount:0}}r(Cp,"createCache");function Mo(n){n.refCount--,n.refCount===0&&Y2(X2,function(){n.controller.abort()})}r(Mo,"releaseCache");var Do=null,Ap=0,Sl=0,Nl=null;function Z2(n,i){if(Do===null){var o=Do=[];Ap=0,Sl=Im(),Nl={status:"pending",value:void 0,then:r(function(d){o.push(d)},"then")}}return Ap++,i.then(Xx,Xx),i}r(Z2,"entangleAsyncAction");function Xx(){if(--Ap===0&&Do!==null){Nl!==null&&(Nl.status="fulfilled");var n=Do;Do=null,Sl=0,Nl=null;for(var i=0;i<n.length;i++)(0,n[i])()}}r(Xx,"pingEngtangledActionScope");function J2(n,i){var o=[],d={status:"pending",value:null,reason:null,then:r(function(m){o.push(m)},"then")};return n.then(function(){d.status="fulfilled",d.value=i;for(var m=0;m<o.length;m++)(0,o[m])(i)},function(m){for(d.status="rejected",d.reason=m,m=0;m<o.length;m++)(0,o[m])(void 0)}),d}r(J2,"chainThenableValue");var Zx=A.S;A.S=function(n,i){Rv=Ye(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Z2(n,i),Zx!==null&&Zx(n,i)};var _r=de(null);function _p(){var n=_r.current;return n!==null?n:fn.pooledCache}r(_p,"peekCacheFromPool");function mu(n,i){i===null?ye(_r,_r.current):ye(_r,i.pool)}r(mu,"pushTransition");function Jx(){var n=_p();return n===null?null:{parent:qn._currentValue,pool:n}}r(Jx,"getSuspendedCache");var Cl=Error(c(460)),Ep=Error(c(474)),hu=Error(c(542)),gu={then:r(function(){},"then")};function eb(n){return n=n.status,n==="fulfilled"||n==="rejected"}r(eb,"isThenableResolved");function tb(n,i,o){switch(o=n[o],o===void 0?n.push(i):o!==i&&(i.then(jt,jt),i=o),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,ab(n),n;default:if(typeof i.status=="string")i.then(jt,jt);else{if(n=fn,n!==null&&100<n.shellSuspendCounter)throw Error(c(482));n=i,n.status="pending",n.then(function(d){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=d}},function(d){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=d}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,ab(n),n}throw Ir=i,Cl}}r(tb,"trackUsedThenable");function Er(n){try{var i=n._init;return i(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Ir=o,Cl):o}}r(Er,"resolveLazy");var Ir=null;function nb(){if(Ir===null)throw Error(c(459));var n=Ir;return Ir=null,n}r(nb,"getSuspendedThenable");function ab(n){if(n===Cl||n===hu)throw Error(c(483))}r(ab,"checkIfUseWrappedInAsyncCatch");var Al=null,Oo=0;function xu(n){var i=Oo;return Oo+=1,Al===null&&(Al=[]),tb(Al,n,i)}r(xu,"unwrapThenable");function Lo(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}r(Lo,"coerceRef");function bu(n,i){throw i.$$typeof===k?Error(c(525)):(n=Object.prototype.toString.call(i),Error(c(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}r(bu,"throwOnInvalidObjectTypeImpl");function sb(n){function i(G,H){if(n){var te=G.deletions;te===null?(G.deletions=[H],G.flags|=16):te.push(H)}}r(i,"deleteChild");function o(G,H){if(!n)return null;for(;H!==null;)i(G,H),H=H.sibling;return null}r(o,"deleteRemainingChildren");function d(G){for(var H=new Map;G!==null;)G.key!==null?H.set(G.key,G):H.set(G.index,G),G=G.sibling;return H}r(d,"mapRemainingChildren");function m(G,H){return G=di(G,H),G.index=0,G.sibling=null,G}r(m,"useFiber");function b(G,H,te){return G.index=te,n?(te=G.alternate,te!==null?(te=te.index,te<H?(G.flags|=67108866,H):te):(G.flags|=67108866,H)):(G.flags|=1048576,H)}r(b,"placeChild");function w(G){return n&&G.alternate===null&&(G.flags|=67108866),G}r(w,"placeSingleChild");function T(G,H,te,pe){return H===null||H.tag!==6?(H=xp(te,G.mode,pe),H.return=G,H):(H=m(H,te),H.return=G,H)}r(T,"updateTextNode");function q(G,H,te,pe){var Qe=te.type;return Qe===I?fe(G,H,te.props.children,pe,te.key):H!==null&&(H.elementType===Qe||typeof Qe=="object"&&Qe!==null&&Qe.$$typeof===E&&Er(Qe)===H.type)?(H=m(H,te.props),Lo(H,te),H.return=G,H):(H=uu(te.type,te.key,te.props,null,G.mode,pe),Lo(H,te),H.return=G,H)}r(q,"updateElement");function ne(G,H,te,pe){return H===null||H.tag!==4||H.stateNode.containerInfo!==te.containerInfo||H.stateNode.implementation!==te.implementation?(H=bp(te,G.mode,pe),H.return=G,H):(H=m(H,te.children||[]),H.return=G,H)}r(ne,"updatePortal");function fe(G,H,te,pe,Qe){return H===null||H.tag!==7?(H=Sr(te,G.mode,pe,Qe),H.return=G,H):(H=m(H,te),H.return=G,H)}r(fe,"updateFragment");function xe(G,H,te){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=xp(""+H,G.mode,te),H.return=G,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case S:return te=uu(H.type,H.key,H.props,null,G.mode,te),Lo(te,H),te.return=G,te;case N:return H=bp(H,G.mode,te),H.return=G,H;case E:return H=Er(H),xe(G,H,te)}if(X(H)||V(H))return H=Sr(H,G.mode,te,null),H.return=G,H;if(typeof H.then=="function")return xe(G,xu(H),te);if(H.$$typeof===_)return xe(G,pu(G,H),te);bu(G,H)}return null}r(xe,"createChild");function ae(G,H,te,pe){var Qe=H!==null?H.key:null;if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return Qe!==null?null:T(G,H,""+te,pe);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case S:return te.key===Qe?q(G,H,te,pe):null;case N:return te.key===Qe?ne(G,H,te,pe):null;case E:return te=Er(te),ae(G,H,te,pe)}if(X(te)||V(te))return Qe!==null?null:fe(G,H,te,pe,null);if(typeof te.then=="function")return ae(G,H,xu(te),pe);if(te.$$typeof===_)return ae(G,H,pu(G,te),pe);bu(G,te)}return null}r(ae,"updateSlot");function re(G,H,te,pe,Qe){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return G=G.get(te)||null,T(H,G,""+pe,Qe);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case S:return G=G.get(pe.key===null?te:pe.key)||null,q(H,G,pe,Qe);case N:return G=G.get(pe.key===null?te:pe.key)||null,ne(H,G,pe,Qe);case E:return pe=Er(pe),re(G,H,te,pe,Qe)}if(X(pe)||V(pe))return G=G.get(te)||null,fe(H,G,pe,Qe,null);if(typeof pe.then=="function")return re(G,H,te,xu(pe),Qe);if(pe.$$typeof===_)return re(G,H,te,pu(H,pe),Qe);bu(H,pe)}return null}r(re,"updateFromMap");function Pe(G,H,te,pe){for(var Qe=null,$t=null,Ke=H,ft=H=0,Nt=null;Ke!==null&&ft<te.length;ft++){Ke.index>ft?(Nt=Ke,Ke=null):Nt=Ke.sibling;var Ut=ae(G,Ke,te[ft],pe);if(Ut===null){Ke===null&&(Ke=Nt);break}n&&Ke&&Ut.alternate===null&&i(G,Ke),H=b(Ut,H,ft),$t===null?Qe=Ut:$t.sibling=Ut,$t=Ut,Ke=Nt}if(ft===te.length)return o(G,Ke),_t&&fi(G,ft),Qe;if(Ke===null){for(;ft<te.length;ft++)Ke=xe(G,te[ft],pe),Ke!==null&&(H=b(Ke,H,ft),$t===null?Qe=Ke:$t.sibling=Ke,$t=Ke);return _t&&fi(G,ft),Qe}for(Ke=d(Ke);ft<te.length;ft++)Nt=re(Ke,G,ft,te[ft],pe),Nt!==null&&(n&&Nt.alternate!==null&&Ke.delete(Nt.key===null?ft:Nt.key),H=b(Nt,H,ft),$t===null?Qe=Nt:$t.sibling=Nt,$t=Nt);return n&&Ke.forEach(function(tr){return i(G,tr)}),_t&&fi(G,ft),Qe}r(Pe,"reconcileChildrenArray");function tt(G,H,te,pe){if(te==null)throw Error(c(151));for(var Qe=null,$t=null,Ke=H,ft=H=0,Nt=null,Ut=te.next();Ke!==null&&!Ut.done;ft++,Ut=te.next()){Ke.index>ft?(Nt=Ke,Ke=null):Nt=Ke.sibling;var tr=ae(G,Ke,Ut.value,pe);if(tr===null){Ke===null&&(Ke=Nt);break}n&&Ke&&tr.alternate===null&&i(G,Ke),H=b(tr,H,ft),$t===null?Qe=tr:$t.sibling=tr,$t=tr,Ke=Nt}if(Ut.done)return o(G,Ke),_t&&fi(G,ft),Qe;if(Ke===null){for(;!Ut.done;ft++,Ut=te.next())Ut=xe(G,Ut.value,pe),Ut!==null&&(H=b(Ut,H,ft),$t===null?Qe=Ut:$t.sibling=Ut,$t=Ut);return _t&&fi(G,ft),Qe}for(Ke=d(Ke);!Ut.done;ft++,Ut=te.next())Ut=re(Ke,G,ft,Ut.value,pe),Ut!==null&&(n&&Ut.alternate!==null&&Ke.delete(Ut.key===null?ft:Ut.key),H=b(Ut,H,ft),$t===null?Qe=Ut:$t.sibling=Ut,$t=Ut);return n&&Ke.forEach(function(mE){return i(G,mE)}),_t&&fi(G,ft),Qe}r(tt,"reconcileChildrenIterator");function on(G,H,te,pe){if(typeof te=="object"&&te!==null&&te.type===I&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case S:e:{for(var Qe=te.key;H!==null;){if(H.key===Qe){if(Qe=te.type,Qe===I){if(H.tag===7){o(G,H.sibling),pe=m(H,te.props.children),pe.return=G,G=pe;break e}}else if(H.elementType===Qe||typeof Qe=="object"&&Qe!==null&&Qe.$$typeof===E&&Er(Qe)===H.type){o(G,H.sibling),pe=m(H,te.props),Lo(pe,te),pe.return=G,G=pe;break e}o(G,H);break}else i(G,H);H=H.sibling}te.type===I?(pe=Sr(te.props.children,G.mode,pe,te.key),pe.return=G,G=pe):(pe=uu(te.type,te.key,te.props,null,G.mode,pe),Lo(pe,te),pe.return=G,G=pe)}return w(G);case N:e:{for(Qe=te.key;H!==null;){if(H.key===Qe)if(H.tag===4&&H.stateNode.containerInfo===te.containerInfo&&H.stateNode.implementation===te.implementation){o(G,H.sibling),pe=m(H,te.children||[]),pe.return=G,G=pe;break e}else{o(G,H);break}else i(G,H);H=H.sibling}pe=bp(te,G.mode,pe),pe.return=G,G=pe}return w(G);case E:return te=Er(te),on(G,H,te,pe)}if(X(te))return Pe(G,H,te,pe);if(V(te)){if(Qe=V(te),typeof Qe!="function")throw Error(c(150));return te=Qe.call(te),tt(G,H,te,pe)}if(typeof te.then=="function")return on(G,H,xu(te),pe);if(te.$$typeof===_)return on(G,H,pu(G,te),pe);bu(G,te)}return typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint"?(te=""+te,H!==null&&H.tag===6?(o(G,H.sibling),pe=m(H,te),pe.return=G,G=pe):(o(G,H),pe=xp(te,G.mode,pe),pe.return=G,G=pe),w(G)):o(G,H)}return r(on,"reconcileChildFibersImpl"),function(G,H,te,pe){try{Oo=0;var Qe=on(G,H,te,pe);return Al=null,Qe}catch(Ke){if(Ke===Cl||Ke===hu)throw Ke;var $t=Za(29,Ke,null,G.mode);return $t.lanes=pe,$t.return=G,$t}}}r(sb,"createChildReconciler");var Tr=sb(!0),ib=sb(!1),Ui=!1;function Ip(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}r(Ip,"initializeUpdateQueue");function Tp(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}r(Tp,"cloneUpdateQueue");function Rr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}r(Rr,"createUpdate");function Mr(n,i,o){var d=n.updateQueue;if(d===null)return null;if(d=d.shared,(Ft&2)!==0){var m=d.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),d.pending=i,i=cu(n),Kx(n,null,o),i}return ou(n,d,i,o),cu(n)}r(Mr,"enqueueUpdate");function zo(n,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194048)!==0)){var d=i.lanes;d&=n.pendingLanes,o|=d,i.lanes=o,gn(n,o)}}r(zo,"entangleTransitions");function Rp(n,i){var o=n.updateQueue,d=n.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var m=null,b=null;if(o=o.firstBaseUpdate,o!==null){do{var w={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};b===null?m=b=w:b=b.next=w,o=o.next}while(o!==null);b===null?m=b=i:b=b.next=i}else m=b=i;o={baseState:d.baseState,firstBaseUpdate:m,lastBaseUpdate:b,shared:d.shared,callbacks:d.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=i:n.next=i,o.lastBaseUpdate=i}r(Rp,"enqueueCapturedUpdate");var Mp=!1;function Po(){if(Mp){var n=Nl;if(n!==null)throw n}}r(Po,"suspendIfUpdateReadFromEntangledAsyncAction");function $o(n,i,o,d){Mp=!1;var m=n.updateQueue;Ui=!1;var b=m.firstBaseUpdate,w=m.lastBaseUpdate,T=m.shared.pending;if(T!==null){m.shared.pending=null;var q=T,ne=q.next;q.next=null,w===null?b=ne:w.next=ne,w=q;var fe=n.alternate;fe!==null&&(fe=fe.updateQueue,T=fe.lastBaseUpdate,T!==w&&(T===null?fe.firstBaseUpdate=ne:T.next=ne,fe.lastBaseUpdate=q))}if(b!==null){var xe=m.baseState;w=0,fe=ne=q=null,T=b;do{var ae=T.lane&-536870913,re=ae!==T.lane;if(re?(St&ae)===ae:(d&ae)===ae){ae!==0&&ae===Sl&&(Mp=!0),fe!==null&&(fe=fe.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var Pe=n,tt=T;ae=i;var on=o;switch(tt.tag){case 1:if(Pe=tt.payload,typeof Pe=="function"){xe=Pe.call(on,xe,ae);break e}xe=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=tt.payload,ae=typeof Pe=="function"?Pe.call(on,xe,ae):Pe,ae==null)break e;xe=j({},xe,ae);break e;case 2:Ui=!0}}ae=T.callback,ae!==null&&(n.flags|=64,re&&(n.flags|=8192),re=m.callbacks,re===null?m.callbacks=[ae]:re.push(ae))}else re={lane:ae,tag:T.tag,payload:T.payload,callback:T.callback,next:null},fe===null?(ne=fe=re,q=xe):fe=fe.next=re,w|=ae;if(T=T.next,T===null){if(T=m.shared.pending,T===null)break;re=T,T=re.next,re.next=null,m.lastBaseUpdate=re,m.shared.pending=null}}while(!0);fe===null&&(q=xe),m.baseState=q,m.firstBaseUpdate=ne,m.lastBaseUpdate=fe,b===null&&(m.shared.lanes=0),Hi|=w,n.lanes=w,n.memoizedState=xe}}r($o,"processUpdateQueue");function rb(n,i){if(typeof n!="function")throw Error(c(191,n));n.call(i)}r(rb,"callCallback");function lb(n,i){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)rb(o[n],i)}r(lb,"commitCallbacks");var _l=de(null),vu=de(0);function ob(n,i){n=ki,ye(vu,n),ye(_l,i),ki=n|i.baseLanes}r(ob,"pushHiddenContext");function Dp(){ye(vu,ki),ye(_l,_l.current)}r(Dp,"reuseHiddenContextOnStack");function Op(){ki=vu.current,we(_l),we(vu)}r(Op,"popHiddenContext");var Ja=de(null),ms=null;function Bi(n){var i=n.alternate;ye(Tn,Tn.current&1),ye(Ja,n),ms===null&&(i===null||_l.current!==null||i.memoizedState!==null)&&(ms=n)}r(Bi,"pushPrimaryTreeSuspenseHandler");function Lp(n){ye(Tn,Tn.current),ye(Ja,n),ms===null&&(ms=n)}r(Lp,"pushDehydratedActivitySuspenseHandler");function cb(n){n.tag===22?(ye(Tn,Tn.current),ye(Ja,n),ms===null&&(ms=n)):Ki(n)}r(cb,"pushOffscreenSuspenseHandler");function Ki(){ye(Tn,Tn.current),ye(Ja,Ja.current)}r(Ki,"reuseSuspenseHandlerOnStack");function es(n){we(Ja),ms===n&&(ms=null),we(Tn)}r(es,"popSuspenseHandler");var Tn=de(0);function yu(n){for(var i=n;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Bm(o)||Km(o)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}r(yu,"findFirstSuspended");var hi=0,ot=null,rn=null,Fn=null,ju=!1,El=!1,Dr=!1,wu=0,Uo=0,Il=null,e_=0;function _n(){throw Error(c(321))}r(_n,"throwInvalidHookError");function zp(n,i){if(i===null)return!1;for(var o=0;o<i.length&&o<n.length;o++)if(!Xa(n[o],i[o]))return!1;return!0}r(zp,"areHookInputsEqual");function Pp(n,i,o,d,m,b){return hi=b,ot=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,A.H=n===null||n.memoizedState===null?Vb:Jp,Dr=!1,b=o(d,m),Dr=!1,El&&(b=db(i,o,d,m)),ub(n),b}r(Pp,"renderWithHooks");function ub(n){A.H=qo;var i=rn!==null&&rn.next!==null;if(hi=0,Fn=rn=ot=null,ju=!1,Uo=0,Il=null,i)throw Error(c(300));n===null||Hn||(n=n.dependencies,n!==null&&fu(n)&&(Hn=!0))}r(ub,"finishRenderingHooks");function db(n,i,o,d){ot=n;var m=0;do{if(El&&(Il=null),Uo=0,El=!1,25<=m)throw Error(c(301));if(m+=1,Fn=rn=null,n.updateQueue!=null){var b=n.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}A.H=Wb,b=i(o,d)}while(El);return b}r(db,"renderWithHooksAgain");function t_(){var n=A.H,i=n.useState()[0];return i=typeof i.then=="function"?Bo(i):i,n=n.useState()[0],(rn!==null?rn.memoizedState:null)!==n&&(ot.flags|=1024),i}r(t_,"TransitionAwareHostComponent");function $p(){var n=wu!==0;return wu=0,n}r($p,"checkDidRenderIdHook");function Up(n,i,o){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~o}r(Up,"bailoutHooks");function Bp(n){if(ju){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}ju=!1}hi=0,Fn=rn=ot=null,El=!1,Uo=wu=0,Il=null}r(Bp,"resetHooksOnUnwind");function Ia(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fn===null?ot.memoizedState=Fn=n:Fn=Fn.next=n,Fn}r(Ia,"mountWorkInProgressHook");function Rn(){if(rn===null){var n=ot.alternate;n=n!==null?n.memoizedState:null}else n=rn.next;var i=Fn===null?ot.memoizedState:Fn.next;if(i!==null)Fn=i,rn=n;else{if(n===null)throw ot.alternate===null?Error(c(467)):Error(c(310));rn=n,n={memoizedState:rn.memoizedState,baseState:rn.baseState,baseQueue:rn.baseQueue,queue:rn.queue,next:null},Fn===null?ot.memoizedState=Fn=n:Fn=Fn.next=n}return Fn}r(Rn,"updateWorkInProgressHook");function ku(){return{lastEffect:null,events:null,stores:null,memoCache:null}}r(ku,"createFunctionComponentUpdateQueue");function Bo(n){var i=Uo;return Uo+=1,Il===null&&(Il=[]),n=tb(Il,n,i),i=ot,(Fn===null?i.memoizedState:Fn.next)===null&&(i=i.alternate,A.H=i===null||i.memoizedState===null?Vb:Jp),n}r(Bo,"useThenable");function Su(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Bo(n);if(n.$$typeof===_)return ca(n)}throw Error(c(438,String(n)))}r(Su,"use");function Kp(n){var i=null,o=ot.updateQueue;if(o!==null&&(i=o.memoCache),i==null){var d=ot.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(i={data:d.data.map(function(m){return m.slice()}),index:0})))}if(i??={data:[],index:0},o===null&&(o=ku(),ot.updateQueue=o),o.memoCache=i,o=i.data[i.index],o===void 0)for(o=i.data[i.index]=Array(n),d=0;d<n;d++)o[d]=O;return i.index++,o}r(Kp,"useMemoCache");function gi(n,i){return typeof i=="function"?i(n):i}r(gi,"basicStateReducer");function Nu(n){return qp(Rn(),rn,n)}r(Nu,"updateReducer");function qp(n,i,o){var d=n.queue;if(d===null)throw Error(c(311));d.lastRenderedReducer=o;var m=n.baseQueue,b=d.pending;if(b!==null){if(m!==null){var w=m.next;m.next=b.next,b.next=w}i.baseQueue=m=b,d.pending=null}if(b=n.baseState,m===null)n.memoizedState=b;else{i=m.next;var T=w=null,q=null,ne=i,fe=!1;do{var xe=ne.lane&-536870913;if(xe!==ne.lane?(St&xe)===xe:(hi&xe)===xe){var ae=ne.revertLane;if(ae===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),xe===Sl&&(fe=!0);else if((hi&ae)===ae){ne=ne.next,ae===Sl&&(fe=!0);continue}else xe={lane:0,revertLane:ne.revertLane,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},q===null?(T=q=xe,w=b):q=q.next=xe,ot.lanes|=ae,Hi|=ae;xe=ne.action,Dr&&o(b,xe),b=ne.hasEagerState?ne.eagerState:o(b,xe)}else ae={lane:xe,revertLane:ne.revertLane,gesture:ne.gesture,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},q===null?(T=q=ae,w=b):q=q.next=ae,ot.lanes|=xe,Hi|=xe;ne=ne.next}while(ne!==null&&ne!==i);if(q===null?w=b:q.next=T,!Xa(b,n.memoizedState)&&(Hn=!0,fe&&(o=Nl,o!==null)))throw o;n.memoizedState=b,n.baseState=w,n.baseQueue=q,d.lastRenderedState=b}return m===null&&(d.lanes=0),[n.memoizedState,d.dispatch]}r(qp,"updateReducerImpl");function Fp(n){var i=Rn(),o=i.queue;if(o===null)throw Error(c(311));o.lastRenderedReducer=n;var d=o.dispatch,m=o.pending,b=i.memoizedState;if(m!==null){o.pending=null;var w=m=m.next;do b=n(b,w.action),w=w.next;while(w!==m);Xa(b,i.memoizedState)||(Hn=!0),i.memoizedState=b,i.baseQueue===null&&(i.baseState=b),o.lastRenderedState=b}return[b,d]}r(Fp,"rerenderReducer");function fb(n,i,o){var d=ot,m=Rn(),b=_t;if(b){if(o===void 0)throw Error(c(407));o=o()}else o=i();var w=!Xa((rn||m).memoizedState,o);if(w&&(m.memoizedState=o,Hn=!0),m=m.queue,Wp(hb.bind(null,d,m,n),[n]),m.getSnapshot!==i||w||Fn!==null&&Fn.memoizedState.tag&1){if(d.flags|=2048,Tl(9,{destroy:void 0},mb.bind(null,d,m,o,i),null),fn===null)throw Error(c(349));b||(hi&127)!==0||pb(d,i,o)}return o}r(fb,"updateSyncExternalStore");function pb(n,i,o){n.flags|=16384,n={getSnapshot:i,value:o},i=ot.updateQueue,i===null?(i=ku(),ot.updateQueue=i,i.stores=[n]):(o=i.stores,o===null?i.stores=[n]:o.push(n))}r(pb,"pushStoreConsistencyCheck");function mb(n,i,o,d){i.value=o,i.getSnapshot=d,gb(i)&&xb(n)}r(mb,"updateStoreInstance");function hb(n,i,o){return o(function(){gb(i)&&xb(n)})}r(hb,"subscribeToStore");function gb(n){var i=n.getSnapshot;n=n.value;try{var o=i();return!Xa(n,o)}catch{return!0}}r(gb,"checkIfSnapshotChanged");function xb(n){var i=kr(n,2);i!==null&&Fa(i,n,2)}r(xb,"forceStoreRerender");function Hp(n){var i=Ia();if(typeof n=="function"){var o=n;if(n=o(),Dr){Nn(!0);try{o()}finally{Nn(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:n},i}r(Hp,"mountStateImpl");function bb(n,i,o,d){return n.baseState=o,qp(n,rn,typeof d=="function"?d:gi)}r(bb,"updateOptimisticImpl");function n_(n,i,o,d,m){if(_u(n))throw Error(c(485));if(n=i.action,n!==null){var b={payload:m,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:r(function(w){b.listeners.push(w)},"then")};A.T!==null?o(!0):b.isTransition=!1,d(b),o=i.pending,o===null?(b.next=i.pending=b,vb(i,b)):(b.next=o.next,i.pending=o.next=b)}}r(n_,"dispatchActionState");function vb(n,i){var o=i.action,d=i.payload,m=n.state;if(i.isTransition){var b=A.T,w={};A.T=w;try{var T=o(m,d),q=A.S;q!==null&&q(w,T),yb(n,i,T)}catch(ne){Vp(n,i,ne)}finally{b!==null&&w.types!==null&&(b.types=w.types),A.T=b}}else try{b=o(m,d),yb(n,i,b)}catch(ne){Vp(n,i,ne)}}r(vb,"runActionStateAction");function yb(n,i,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(d){jb(n,i,d)},function(d){return Vp(n,i,d)}):jb(n,i,o)}r(yb,"handleActionReturnValue");function jb(n,i,o){i.status="fulfilled",i.value=o,wb(i),n.state=o,i=n.pending,i!==null&&(o=i.next,o===i?n.pending=null:(o=o.next,i.next=o,vb(n,o)))}r(jb,"onActionSuccess");function Vp(n,i,o){var d=n.pending;if(n.pending=null,d!==null){d=d.next;do i.status="rejected",i.reason=o,wb(i),i=i.next;while(i!==d)}n.action=null}r(Vp,"onActionError");function wb(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}r(wb,"notifyActionListeners");function kb(n,i){return i}r(kb,"actionStateReducer");function Sb(n,i){if(_t){var o=fn.formState;if(o!==null){e:{var d=ot;if(_t){if(vn){t:{for(var m=vn,b=ps;m.nodeType!==8;){if(!b){m=null;break t}if(m=gs(m.nextSibling),m===null){m=null;break t}}b=m.data,m=b==="F!"||b==="F"?m:null}if(m){vn=gs(m.nextSibling),d=m.data==="F!";break e}}Pi(d)}d=!1}d&&(i=o[0])}}return o=Ia(),o.memoizedState=o.baseState=i,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:kb,lastRenderedState:i},o.queue=d,o=qb.bind(null,ot,d),d.dispatch=o,d=Hp(!1),b=Zp.bind(null,ot,!1,d.queue),d=Ia(),m={state:i,dispatch:null,action:n,pending:null},d.queue=m,o=n_.bind(null,ot,m,b,o),m.dispatch=o,d.memoizedState=n,[i,o,!1]}r(Sb,"mountActionState");function Nb(n){return Cb(Rn(),rn,n)}r(Nb,"updateActionState");function Cb(n,i,o){if(i=qp(n,i,kb)[0],n=Nu(gi)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var d=Bo(i)}catch(w){throw w===Cl?hu:w}else d=i;i=Rn();var m=i.queue,b=m.dispatch;return o!==i.memoizedState&&(ot.flags|=2048,Tl(9,{destroy:void 0},a_.bind(null,m,o),null)),[d,b,n]}r(Cb,"updateActionStateImpl");function a_(n,i){n.action=i}r(a_,"actionStateActionEffect");function Ab(n){var i=Rn(),o=rn;if(o!==null)return Cb(i,o,n);Rn(),i=i.memoizedState,o=Rn();var d=o.queue.dispatch;return o.memoizedState=n,[i,d,!1]}r(Ab,"rerenderActionState");function Tl(n,i,o,d){return n={tag:n,create:o,deps:d,inst:i,next:null},i=ot.updateQueue,i===null&&(i=ku(),ot.updateQueue=i),o=i.lastEffect,o===null?i.lastEffect=n.next=n:(d=o.next,o.next=n,n.next=d,i.lastEffect=n),n}r(Tl,"pushSimpleEffect");function _b(){return Rn().memoizedState}r(_b,"updateRef");function Cu(n,i,o,d){var m=Ia();ot.flags|=n,m.memoizedState=Tl(1|i,{destroy:void 0},o,d===void 0?null:d)}r(Cu,"mountEffectImpl");function Au(n,i,o,d){var m=Rn();d=d===void 0?null:d;var b=m.memoizedState.inst;rn!==null&&d!==null&&zp(d,rn.memoizedState.deps)?m.memoizedState=Tl(i,b,o,d):(ot.flags|=n,m.memoizedState=Tl(1|i,b,o,d))}r(Au,"updateEffectImpl");function Eb(n,i){Cu(8390656,8,n,i)}r(Eb,"mountEffect");function Wp(n,i){Au(2048,8,n,i)}r(Wp,"updateEffect");function s_(n){ot.flags|=4;var i=ot.updateQueue;if(i===null)i=ku(),ot.updateQueue=i,i.events=[n];else{var o=i.events;o===null?i.events=[n]:o.push(n)}}r(s_,"useEffectEventImpl");function Ib(n){var i=Rn().memoizedState;return s_({ref:i,nextImpl:n}),function(){if((Ft&2)!==0)throw Error(c(440));return i.impl.apply(void 0,arguments)}}r(Ib,"updateEvent");function Tb(n,i){return Au(4,2,n,i)}r(Tb,"updateInsertionEffect");function Rb(n,i){return Au(4,4,n,i)}r(Rb,"updateLayoutEffect");function Mb(n,i){if(typeof i=="function"){n=n();var o=i(n);return function(){typeof o=="function"?o():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}r(Mb,"imperativeHandleEffect");function Db(n,i,o){o=o!=null?o.concat([n]):null,Au(4,4,Mb.bind(null,i,n),o)}r(Db,"updateImperativeHandle");function Qp(){}r(Qp,"mountDebugValue");function Ob(n,i){var o=Rn();i=i===void 0?null:i;var d=o.memoizedState;return i!==null&&zp(i,d[1])?d[0]:(o.memoizedState=[n,i],n)}r(Ob,"updateCallback");function Lb(n,i){var o=Rn();i=i===void 0?null:i;var d=o.memoizedState;if(i!==null&&zp(i,d[1]))return d[0];if(d=n(),Dr){Nn(!0);try{n()}finally{Nn(!1)}}return o.memoizedState=[d,i],d}r(Lb,"updateMemo");function Gp(n,i,o){return o===void 0||(hi&1073741824)!==0&&(St&261930)===0?n.memoizedState=i:(n.memoizedState=o,n=Dv(),ot.lanes|=n,Hi|=n,o)}r(Gp,"mountDeferredValueImpl");function zb(n,i,o,d){return Xa(o,i)?o:_l.current!==null?(n=Gp(n,o,d),Xa(n,i)||(Hn=!0),n):(hi&42)===0||(hi&1073741824)!==0&&(St&261930)===0?(Hn=!0,n.memoizedState=o):(n=Dv(),ot.lanes|=n,Hi|=n,i)}r(zb,"updateDeferredValueImpl");function Pb(n,i,o,d,m){var b=ee.p;ee.p=b!==0&&8>b?b:8;var w=A.T,T={};A.T=T,Zp(n,!1,i,o);try{var q=m(),ne=A.S;ne!==null&&ne(T,q),q!==null&&typeof q=="object"&&typeof q.then=="function"?Ko(n,i,J2(q,d),hs(n)):Ko(n,i,d,hs(n))}catch(fe){Ko(n,i,{then:r(function(){},"then"),status:"rejected",reason:fe},hs())}finally{ee.p=b,w!==null&&T.types!==null&&(w.types=T.types),A.T=w}}r(Pb,"startTransition");function i_(){}r(i_,"noop");function Yp(n,i,o,d){if(n.tag!==5)throw Error(c(476));var m=$b(n).queue;Pb(n,m,i,ie,o===null?i_:function(){return Ub(n),o(d)})}r(Yp,"startHostTransition");function $b(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:ie},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:o},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}r($b,"ensureFormComponentIsStateful");function Ub(n){var i=$b(n);i.next===null&&(i=n.alternate.memoizedState),Ko(n,i.next.queue,{},hs())}r(Ub,"requestFormReset$1");function Xp(){return ca(ic)}r(Xp,"useHostTransitionStatus");function Bb(){return Rn().memoizedState}r(Bb,"updateId");function Kb(){return Rn().memoizedState}r(Kb,"updateRefresh");function r_(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var o=hs();n=Rr(o);var d=Mr(i,n,o);d!==null&&(Fa(d,i,o),zo(d,i,o)),i={cache:Cp()},n.payload=i;return}i=i.return}}r(r_,"refreshCache");function l_(n,i,o){var d=hs();o={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},_u(n)?Fb(i,o):(o=hp(n,i,o,d),o!==null&&(Fa(o,n,d),Hb(o,i,d)))}r(l_,"dispatchReducerAction");function qb(n,i,o){Ko(n,i,o,hs())}r(qb,"dispatchSetState");function Ko(n,i,o,d){var m={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(_u(n))Fb(i,m);else{var b=n.alternate;if(n.lanes===0&&(b===null||b.lanes===0)&&(b=i.lastRenderedReducer,b!==null))try{var w=i.lastRenderedState,T=b(w,o);if(m.hasEagerState=!0,m.eagerState=T,Xa(T,w))return ou(n,i,m,0),fn===null&&lu(),!1}catch{}if(o=hp(n,i,m,d),o!==null)return Fa(o,n,d),Hb(o,i,d),!0}return!1}r(Ko,"dispatchSetStateInternal");function Zp(n,i,o,d){if(d={lane:2,revertLane:Im(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},_u(n)){if(i)throw Error(c(479))}else i=hp(n,o,d,2),i!==null&&Fa(i,n,2)}r(Zp,"dispatchOptimisticSetState");function _u(n){var i=n.alternate;return n===ot||i!==null&&i===ot}r(_u,"isRenderPhaseUpdate");function Fb(n,i){El=ju=!0;var o=n.pending;o===null?i.next=i:(i.next=o.next,o.next=i),n.pending=i}r(Fb,"enqueueRenderPhaseUpdate");function Hb(n,i,o){if((o&4194048)!==0){var d=i.lanes;d&=n.pendingLanes,o|=d,i.lanes=o,gn(n,o)}}r(Hb,"entangleTransitionUpdate");var qo={readContext:ca,use:Su,useCallback:_n,useContext:_n,useEffect:_n,useImperativeHandle:_n,useLayoutEffect:_n,useInsertionEffect:_n,useMemo:_n,useReducer:_n,useRef:_n,useState:_n,useDebugValue:_n,useDeferredValue:_n,useTransition:_n,useSyncExternalStore:_n,useId:_n,useHostTransitionStatus:_n,useFormState:_n,useActionState:_n,useOptimistic:_n,useMemoCache:_n,useCacheRefresh:_n};qo.useEffectEvent=_n;var Vb={readContext:ca,use:Su,useCallback:r(function(n,i){return Ia().memoizedState=[n,i===void 0?null:i],n},"useCallback"),useContext:ca,useEffect:Eb,useImperativeHandle:r(function(n,i,o){o=o!=null?o.concat([n]):null,Cu(4194308,4,Mb.bind(null,i,n),o)},"useImperativeHandle"),useLayoutEffect:r(function(n,i){return Cu(4194308,4,n,i)},"useLayoutEffect"),useInsertionEffect:r(function(n,i){Cu(4,2,n,i)},"useInsertionEffect"),useMemo:r(function(n,i){var o=Ia();i=i===void 0?null:i;var d=n();if(Dr){Nn(!0);try{n()}finally{Nn(!1)}}return o.memoizedState=[d,i],d},"useMemo"),useReducer:r(function(n,i,o){var d=Ia();if(o!==void 0){var m=o(i);if(Dr){Nn(!0);try{o(i)}finally{Nn(!1)}}}else m=i;return d.memoizedState=d.baseState=m,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:m},d.queue=n,n=n.dispatch=l_.bind(null,ot,n),[d.memoizedState,n]},"useReducer"),useRef:r(function(n){var i=Ia();return n={current:n},i.memoizedState=n},"useRef"),useState:r(function(n){n=Hp(n);var i=n.queue,o=qb.bind(null,ot,i);return i.dispatch=o,[n.memoizedState,o]},"useState"),useDebugValue:Qp,useDeferredValue:r(function(n,i){return Gp(Ia(),n,i)},"useDeferredValue"),useTransition:r(function(){var n=Hp(!1);return n=Pb.bind(null,ot,n.queue,!0,!1),Ia().memoizedState=n,[!1,n]},"useTransition"),useSyncExternalStore:r(function(n,i,o){var d=ot,m=Ia();if(_t){if(o===void 0)throw Error(c(407));o=o()}else{if(o=i(),fn===null)throw Error(c(349));(St&127)!==0||pb(d,i,o)}m.memoizedState=o;var b={value:o,getSnapshot:i};return m.queue=b,Eb(hb.bind(null,d,b,n),[n]),d.flags|=2048,Tl(9,{destroy:void 0},mb.bind(null,d,b,o,i),null),o},"useSyncExternalStore"),useId:r(function(){var n=Ia(),i=fn.identifierPrefix;if(_t){var o=Ws,d=Vs;o=(d&~(1<<32-It(d)-1)).toString(32)+o,i="_"+i+"R_"+o,o=wu++,0<o&&(i+="H"+o.toString(32)),i+="_"}else o=e_++,i="_"+i+"r_"+o.toString(32)+"_";return n.memoizedState=i},"useId"),useHostTransitionStatus:Xp,useFormState:Sb,useActionState:Sb,useOptimistic:r(function(n){var i=Ia();i.memoizedState=i.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=o,i=Zp.bind(null,ot,!0,o),o.dispatch=i,[n,i]},"useOptimistic"),useMemoCache:Kp,useCacheRefresh:r(function(){return Ia().memoizedState=r_.bind(null,ot)},"useCacheRefresh"),useEffectEvent:r(function(n){var i=Ia(),o={impl:n};return i.memoizedState=o,function(){if((Ft&2)!==0)throw Error(c(440));return o.impl.apply(void 0,arguments)}},"useEffectEvent")},Jp={readContext:ca,use:Su,useCallback:Ob,useContext:ca,useEffect:Wp,useImperativeHandle:Db,useInsertionEffect:Tb,useLayoutEffect:Rb,useMemo:Lb,useReducer:Nu,useRef:_b,useState:r(function(){return Nu(gi)},"useState"),useDebugValue:Qp,useDeferredValue:r(function(n,i){return zb(Rn(),rn.memoizedState,n,i)},"useDeferredValue"),useTransition:r(function(){var n=Nu(gi)[0],i=Rn().memoizedState;return[typeof n=="boolean"?n:Bo(n),i]},"useTransition"),useSyncExternalStore:fb,useId:Bb,useHostTransitionStatus:Xp,useFormState:Nb,useActionState:Nb,useOptimistic:r(function(n,i){return bb(Rn(),rn,n,i)},"useOptimistic"),useMemoCache:Kp,useCacheRefresh:Kb};Jp.useEffectEvent=Ib;var Wb={readContext:ca,use:Su,useCallback:Ob,useContext:ca,useEffect:Wp,useImperativeHandle:Db,useInsertionEffect:Tb,useLayoutEffect:Rb,useMemo:Lb,useReducer:Fp,useRef:_b,useState:r(function(){return Fp(gi)},"useState"),useDebugValue:Qp,useDeferredValue:r(function(n,i){var o=Rn();return rn===null?Gp(o,n,i):zb(o,rn.memoizedState,n,i)},"useDeferredValue"),useTransition:r(function(){var n=Fp(gi)[0],i=Rn().memoizedState;return[typeof n=="boolean"?n:Bo(n),i]},"useTransition"),useSyncExternalStore:fb,useId:Bb,useHostTransitionStatus:Xp,useFormState:Ab,useActionState:Ab,useOptimistic:r(function(n,i){var o=Rn();return rn!==null?bb(o,rn,n,i):(o.baseState=n,[n,o.queue.dispatch])},"useOptimistic"),useMemoCache:Kp,useCacheRefresh:Kb};Wb.useEffectEvent=Ib;function em(n,i,o,d){i=n.memoizedState,o=o(d,i),o=o==null?i:j({},i,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}r(em,"applyDerivedStateFromProps");var tm={enqueueSetState:r(function(n,i,o){n=n._reactInternals;var d=hs(),m=Rr(d);m.payload=i,o!=null&&(m.callback=o),i=Mr(n,m,d),i!==null&&(Fa(i,n,d),zo(i,n,d))},"enqueueSetState"),enqueueReplaceState:r(function(n,i,o){n=n._reactInternals;var d=hs(),m=Rr(d);m.tag=1,m.payload=i,o!=null&&(m.callback=o),i=Mr(n,m,d),i!==null&&(Fa(i,n,d),zo(i,n,d))},"enqueueReplaceState"),enqueueForceUpdate:r(function(n,i){n=n._reactInternals;var o=hs(),d=Rr(o);d.tag=2,i!=null&&(d.callback=i),i=Mr(n,d,o),i!==null&&(Fa(i,n,o),zo(i,n,o))},"enqueueForceUpdate")};function Qb(n,i,o,d,m,b,w){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(d,b,w):i.prototype&&i.prototype.isPureReactComponent?!Eo(o,d)||!Eo(m,b):!0}r(Qb,"checkShouldComponentUpdate");function Gb(n,i,o,d){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,d),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,d),i.state!==n&&tm.enqueueReplaceState(i,i.state,null)}r(Gb,"callComponentWillReceiveProps");function Or(n,i){var o=i;if("ref"in i){o={};for(var d in i)d!=="ref"&&(o[d]=i[d])}if(n=n.defaultProps){o===i&&(o=j({},o));for(var m in n)o[m]===void 0&&(o[m]=n[m])}return o}r(Or,"resolveClassComponentProps");function o_(n){ru(n)}r(o_,"defaultOnUncaughtError");function c_(n){}r(c_,"defaultOnCaughtError");function u_(n){ru(n)}r(u_,"defaultOnRecoverableError");function Eu(n,i){try{var o=n.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(d){setTimeout(function(){throw d})}}r(Eu,"logUncaughtError");function Yb(n,i,o){try{var d=n.onCaughtError;d(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}r(Yb,"logCaughtError");function nm(n,i,o){return o=Rr(o),o.tag=3,o.payload={element:null},o.callback=function(){Eu(n,i)},o}r(nm,"createRootErrorUpdate");function Xb(n){return n=Rr(n),n.tag=3,n}r(Xb,"createClassErrorUpdate");function Zb(n,i,o,d){var m=o.type.getDerivedStateFromError;if(typeof m=="function"){var b=d.value;n.payload=function(){return m(b)},n.callback=function(){Yb(i,o,d)}}var w=o.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(n.callback=function(){Yb(i,o,d),typeof m!="function"&&(Vi===null?Vi=new Set([this]):Vi.add(this));var T=d.stack;this.componentDidCatch(d.value,{componentStack:T!==null?T:""})})}r(Zb,"initializeClassErrorUpdate");function d_(n,i,o,d,m){if(o.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(i=o.alternate,i!==null&&kl(i,o,m,!0),o=Ja.current,o!==null){switch(o.tag){case 31:case 13:return ms===null?Bu():o.alternate===null&&En===0&&(En=3),o.flags&=-257,o.flags|=65536,o.lanes=m,d===gu?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([d]):i.add(d),Am(n,d,m)),!1;case 22:return o.flags|=65536,d===gu?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([d])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([d]):o.add(d)),Am(n,d,m)),!1}throw Error(c(435,o.tag))}return Am(n,d,m),Bu(),!1}if(_t)return i=Ja.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,d!==jp&&(n=Error(c(422),{cause:d}),Ro(us(n,o)))):(d!==jp&&(i=Error(c(423),{cause:d}),Ro(us(i,o))),n=n.current.alternate,n.flags|=65536,m&=-m,n.lanes|=m,d=us(d,o),m=nm(n.stateNode,d,m),Rp(n,m),En!==4&&(En=2)),!1;var b=Error(c(520),{cause:d});if(b=us(b,o),Xo===null?Xo=[b]:Xo.push(b),En!==4&&(En=2),i===null)return!0;d=us(d,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,n=m&-m,o.lanes|=n,n=nm(o.stateNode,d,n),Rp(o,n),!1;case 1:if(i=o.type,b=o.stateNode,(o.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Vi===null||!Vi.has(b))))return o.flags|=65536,m&=-m,o.lanes|=m,m=Xb(m),Zb(m,n,o,d),Rp(o,m),!1}o=o.return}while(o!==null);return!1}r(d_,"throwException");var am=Error(c(461)),Hn=!1;function ua(n,i,o,d){i.child=n===null?ib(i,null,o,d):Tr(i,n.child,o,d)}r(ua,"reconcileChildren");function Jb(n,i,o,d,m){o=o.render;var b=i.ref;if("ref"in d){var w={};for(var T in d)T!=="ref"&&(w[T]=d[T])}else w=d;return Ar(i),d=Pp(n,i,o,w,b,m),T=$p(),n!==null&&!Hn?(Up(n,i,m),xi(n,i,m)):(_t&&T&&vp(i),i.flags|=1,ua(n,i,d,m),i.child)}r(Jb,"updateForwardRef");function ev(n,i,o,d,m){if(n===null){var b=o.type;return typeof b=="function"&&!gp(b)&&b.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=b,tv(n,i,b,d,m)):(n=uu(o.type,null,d,i,i.mode,m),n.ref=i.ref,n.return=i,i.child=n)}if(b=n.child,!dm(n,m)){var w=b.memoizedProps;if(o=o.compare,o=o!==null?o:Eo,o(w,d)&&n.ref===i.ref)return xi(n,i,m)}return i.flags|=1,n=di(b,d),n.ref=i.ref,n.return=i,i.child=n}r(ev,"updateMemoComponent");function tv(n,i,o,d,m){if(n!==null){var b=n.memoizedProps;if(Eo(b,d)&&n.ref===i.ref)if(Hn=!1,i.pendingProps=d=b,dm(n,m))(n.flags&131072)!==0&&(Hn=!0);else return i.lanes=n.lanes,xi(n,i,m)}return sm(n,i,o,d,m)}r(tv,"updateSimpleMemoComponent");function nv(n,i,o,d){var m=d.children,b=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((i.flags&128)!==0){if(b=b!==null?b.baseLanes|o:o,n!==null){for(d=i.child=n.child,m=0;d!==null;)m=m|d.lanes|d.childLanes,d=d.sibling;d=m&~b}else d=0,i.child=null;return av(n,i,b,o,d)}if((o&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&mu(i,b!==null?b.cachePool:null),b!==null?ob(i,b):Dp(),cb(i);else return d=i.lanes=536870912,av(n,i,b!==null?b.baseLanes|o:o,o,d)}else b!==null?(mu(i,b.cachePool),ob(i,b),Ki(i),i.memoizedState=null):(n!==null&&mu(i,null),Dp(),Ki(i));return ua(n,i,m,o),i.child}r(nv,"updateOffscreenComponent");function Fo(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}r(Fo,"bailoutOffscreenComponent");function av(n,i,o,d,m){var b=_p();return b=b===null?null:{parent:qn._currentValue,pool:b},i.memoizedState={baseLanes:o,cachePool:b},n!==null&&mu(i,null),Dp(),cb(i),n!==null&&kl(n,i,d,!0),i.childLanes=m,null}r(av,"deferHiddenOffscreenComponent");function Iu(n,i){return i=Ru({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}r(Iu,"mountActivityChildren");function sv(n,i,o){return Tr(i,n.child,null,o),n=Iu(i,i.pendingProps),n.flags|=2,es(i),i.memoizedState=null,n}r(sv,"retryActivityComponentWithoutHydrating");function f_(n,i,o){var d=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(_t){if(d.mode==="hidden")return n=Iu(i,d),i.lanes=536870912,Fo(null,n);if(Lp(i),(n=vn)?(n=xy(n,ps),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Li!==null?{id:Vs,overflow:Ws}:null,retryLane:536870912,hydrationErrors:null},o=Fx(n),o.return=i,i.child=o,oa=i,vn=null)):n=null,n===null)throw Pi(i);return i.lanes=536870912,null}return Iu(i,d)}var b=n.memoizedState;if(b!==null){var w=b.dehydrated;if(Lp(i),m)if(i.flags&256)i.flags&=-257,i=sv(n,i,o);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(c(558));else if(Hn||kl(n,i,o,!1),m=(o&n.childLanes)!==0,Hn||m){if(d=fn,d!==null&&(w=zn(d,o),w!==0&&w!==b.retryLane))throw b.retryLane=w,kr(n,w),Fa(d,n,w),am;Bu(),i=sv(n,i,o)}else n=b.treeContext,vn=gs(w.nextSibling),oa=i,_t=!0,zi=null,ps=!1,n!==null&&Wx(i,n),i=Iu(i,d),i.flags|=4096;return i}return n=di(n.child,{mode:d.mode,children:d.children}),n.ref=i.ref,i.child=n,n.return=i,n}r(f_,"updateActivityComponent");function Tu(n,i){var o=i.ref;if(o===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(c(284));(n===null||n.ref!==o)&&(i.flags|=4194816)}}r(Tu,"markRef");function sm(n,i,o,d,m){return Ar(i),o=Pp(n,i,o,d,void 0,m),d=$p(),n!==null&&!Hn?(Up(n,i,m),xi(n,i,m)):(_t&&d&&vp(i),i.flags|=1,ua(n,i,o,m),i.child)}r(sm,"updateFunctionComponent");function iv(n,i,o,d,m,b){return Ar(i),i.updateQueue=null,o=db(i,d,o,m),ub(n),d=$p(),n!==null&&!Hn?(Up(n,i,b),xi(n,i,b)):(_t&&d&&vp(i),i.flags|=1,ua(n,i,o,b),i.child)}r(iv,"replayFunctionComponent");function rv(n,i,o,d,m){if(Ar(i),i.stateNode===null){var b=vl,w=o.contextType;typeof w=="object"&&w!==null&&(b=ca(w)),b=new o(d,b),i.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=tm,i.stateNode=b,b._reactInternals=i,b=i.stateNode,b.props=d,b.state=i.memoizedState,b.refs={},Ip(i),w=o.contextType,b.context=typeof w=="object"&&w!==null?ca(w):vl,b.state=i.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(em(i,o,w,d),b.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(w=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),w!==b.state&&tm.enqueueReplaceState(b,b.state,null),$o(i,d,b,m),Po(),b.state=i.memoizedState),typeof b.componentDidMount=="function"&&(i.flags|=4194308),d=!0}else if(n===null){b=i.stateNode;var T=i.memoizedProps,q=Or(o,T);b.props=q;var ne=b.context,fe=o.contextType;w=vl,typeof fe=="object"&&fe!==null&&(w=ca(fe));var xe=o.getDerivedStateFromProps;fe=typeof xe=="function"||typeof b.getSnapshotBeforeUpdate=="function",T=i.pendingProps!==T,fe||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(T||ne!==w)&&Gb(i,b,d,w),Ui=!1;var ae=i.memoizedState;b.state=ae,$o(i,d,b,m),Po(),ne=i.memoizedState,T||ae!==ne||Ui?(typeof xe=="function"&&(em(i,o,xe,d),ne=i.memoizedState),(q=Ui||Qb(i,o,q,d,ae,ne,w))?(fe||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(i.flags|=4194308)):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=ne),b.props=d,b.state=ne,b.context=w,d=q):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),d=!1)}else{b=i.stateNode,Tp(n,i),w=i.memoizedProps,fe=Or(o,w),b.props=fe,xe=i.pendingProps,ae=b.context,ne=o.contextType,q=vl,typeof ne=="object"&&ne!==null&&(q=ca(ne)),T=o.getDerivedStateFromProps,(ne=typeof T=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(w!==xe||ae!==q)&&Gb(i,b,d,q),Ui=!1,ae=i.memoizedState,b.state=ae,$o(i,d,b,m),Po();var re=i.memoizedState;w!==xe||ae!==re||Ui||n!==null&&n.dependencies!==null&&fu(n.dependencies)?(typeof T=="function"&&(em(i,o,T,d),re=i.memoizedState),(fe=Ui||Qb(i,o,fe,d,ae,re,q)||n!==null&&n.dependencies!==null&&fu(n.dependencies))?(ne||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(d,re,q),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(d,re,q)),typeof b.componentDidUpdate=="function"&&(i.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof b.componentDidUpdate!="function"||w===n.memoizedProps&&ae===n.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&ae===n.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=re),b.props=d,b.state=re,b.context=q,d=fe):(typeof b.componentDidUpdate!="function"||w===n.memoizedProps&&ae===n.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&ae===n.memoizedState||(i.flags|=1024),d=!1)}return b=d,Tu(n,i),d=(i.flags&128)!==0,b||d?(b=i.stateNode,o=d&&typeof o.getDerivedStateFromError!="function"?null:b.render(),i.flags|=1,n!==null&&d?(i.child=Tr(i,n.child,null,m),i.child=Tr(i,null,o,m)):ua(n,i,o,m),i.memoizedState=b.state,n=i.child):n=xi(n,i,m),n}r(rv,"updateClassComponent");function lv(n,i,o,d){return Nr(),i.flags|=256,ua(n,i,o,d),i.child}r(lv,"mountHostRootWithoutHydrating");var im={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rm(n){return{baseLanes:n,cachePool:Jx()}}r(rm,"mountSuspenseOffscreenState");function lm(n,i,o){return n=n!==null?n.childLanes&~o:0,i&&(n|=ns),n}r(lm,"getRemainingWorkInPrimaryTree");function ov(n,i,o){var d=i.pendingProps,m=!1,b=(i.flags&128)!==0,w;if((w=b)||(w=n!==null&&n.memoizedState===null?!1:(Tn.current&2)!==0),w&&(m=!0,i.flags&=-129),w=(i.flags&32)!==0,i.flags&=-33,n===null){if(_t){if(m?Bi(i):Ki(i),(n=vn)?(n=xy(n,ps),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Li!==null?{id:Vs,overflow:Ws}:null,retryLane:536870912,hydrationErrors:null},o=Fx(n),o.return=i,i.child=o,oa=i,vn=null)):n=null,n===null)throw Pi(i);return Km(n)?i.lanes=32:i.lanes=536870912,null}var T=d.children;return d=d.fallback,m?(Ki(i),m=i.mode,T=Ru({mode:"hidden",children:T},m),d=Sr(d,m,o,null),T.return=i,d.return=i,T.sibling=d,i.child=T,d=i.child,d.memoizedState=rm(o),d.childLanes=lm(n,w,o),i.memoizedState=im,Fo(null,d)):(Bi(i),om(i,T))}var q=n.memoizedState;if(q!==null&&(T=q.dehydrated,T!==null)){if(b)i.flags&256?(Bi(i),i.flags&=-257,i=cm(n,i,o)):i.memoizedState!==null?(Ki(i),i.child=n.child,i.flags|=128,i=null):(Ki(i),T=d.fallback,m=i.mode,d=Ru({mode:"visible",children:d.children},m),T=Sr(T,m,o,null),T.flags|=2,d.return=i,T.return=i,d.sibling=T,i.child=d,Tr(i,n.child,null,o),d=i.child,d.memoizedState=rm(o),d.childLanes=lm(n,w,o),i.memoizedState=im,i=Fo(null,d));else if(Bi(i),Km(T)){if(w=T.nextSibling&&T.nextSibling.dataset,w)var ne=w.dgst;w=ne,d=Error(c(419)),d.stack="",d.digest=w,Ro({value:d,source:null,stack:null}),i=cm(n,i,o)}else if(Hn||kl(n,i,o,!1),w=(o&n.childLanes)!==0,Hn||w){if(w=fn,w!==null&&(d=zn(w,o),d!==0&&d!==q.retryLane))throw q.retryLane=d,kr(n,d),Fa(w,n,d),am;Bm(T)||Bu(),i=cm(n,i,o)}else Bm(T)?(i.flags|=192,i.child=n.child,i=null):(n=q.treeContext,vn=gs(T.nextSibling),oa=i,_t=!0,zi=null,ps=!1,n!==null&&Wx(i,n),i=om(i,d.children),i.flags|=4096);return i}return m?(Ki(i),T=d.fallback,m=i.mode,q=n.child,ne=q.sibling,d=di(q,{mode:"hidden",children:d.children}),d.subtreeFlags=q.subtreeFlags&65011712,ne!==null?T=di(ne,T):(T=Sr(T,m,o,null),T.flags|=2),T.return=i,d.return=i,d.sibling=T,i.child=d,Fo(null,d),d=i.child,T=n.child.memoizedState,T===null?T=rm(o):(m=T.cachePool,m!==null?(q=qn._currentValue,m=m.parent!==q?{parent:q,pool:q}:m):m=Jx(),T={baseLanes:T.baseLanes|o,cachePool:m}),d.memoizedState=T,d.childLanes=lm(n,w,o),i.memoizedState=im,Fo(n.child,d)):(Bi(i),o=n.child,n=o.sibling,o=di(o,{mode:"visible",children:d.children}),o.return=i,o.sibling=null,n!==null&&(w=i.deletions,w===null?(i.deletions=[n],i.flags|=16):w.push(n)),i.child=o,i.memoizedState=null,o)}r(ov,"updateSuspenseComponent");function om(n,i){return i=Ru({mode:"visible",children:i},n.mode),i.return=n,n.child=i}r(om,"mountSuspensePrimaryChildren");function Ru(n,i){return n=Za(22,n,null,i),n.lanes=0,n}r(Ru,"mountWorkInProgressOffscreenFiber");function cm(n,i,o){return Tr(i,n.child,null,o),n=om(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}r(cm,"retrySuspenseComponentWithoutHydrating");function cv(n,i,o){n.lanes|=i;var d=n.alternate;d!==null&&(d.lanes|=i),Sp(n.return,i,o)}r(cv,"scheduleSuspenseWorkOnFiber");function um(n,i,o,d,m,b){var w=n.memoizedState;w===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:m,treeForkCount:b}:(w.isBackwards=i,w.rendering=null,w.renderingStartTime=0,w.last=d,w.tail=o,w.tailMode=m,w.treeForkCount=b)}r(um,"initSuspenseListRenderState");function uv(n,i,o){var d=i.pendingProps,m=d.revealOrder,b=d.tail;d=d.children;var w=Tn.current,T=(w&2)!==0;if(T?(w=w&1|2,i.flags|=128):w&=1,ye(Tn,w),ua(n,i,d,o),d=_t?To:0,!T&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&cv(n,o,i);else if(n.tag===19)cv(n,o,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(m){case"forwards":for(o=i.child,m=null;o!==null;)n=o.alternate,n!==null&&yu(n)===null&&(m=o),o=o.sibling;o=m,o===null?(m=i.child,i.child=null):(m=o.sibling,o.sibling=null),um(i,!1,m,o,b,d);break;case"backwards":case"unstable_legacy-backwards":for(o=null,m=i.child,i.child=null;m!==null;){if(n=m.alternate,n!==null&&yu(n)===null){i.child=m;break}n=m.sibling,m.sibling=o,o=m,m=n}um(i,!0,o,null,b,d);break;case"together":um(i,!1,null,null,void 0,d);break;default:i.memoizedState=null}return i.child}r(uv,"updateSuspenseListComponent");function xi(n,i,o){if(n!==null&&(i.dependencies=n.dependencies),Hi|=i.lanes,(o&i.childLanes)===0)if(n!==null){if(kl(n,i,o,!1),(o&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(c(153));if(i.child!==null){for(n=i.child,o=di(n,n.pendingProps),i.child=o,o.return=i;n.sibling!==null;)n=n.sibling,o=o.sibling=di(n,n.pendingProps),o.return=i;o.sibling=null}return i.child}r(xi,"bailoutOnAlreadyFinishedWork");function dm(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&fu(n)))}r(dm,"checkScheduledUpdateOrContext");function p_(n,i,o){switch(i.tag){case 3:$e(i,i.stateNode.containerInfo),$i(i,qn,n.memoizedState.cache),Nr();break;case 27:case 5:ct(i);break;case 4:$e(i,i.stateNode.containerInfo);break;case 10:$i(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Lp(i),null;break;case 13:var d=i.memoizedState;if(d!==null)return d.dehydrated!==null?(Bi(i),i.flags|=128,null):(o&i.child.childLanes)!==0?ov(n,i,o):(Bi(i),n=xi(n,i,o),n!==null?n.sibling:null);Bi(i);break;case 19:var m=(n.flags&128)!==0;if(d=(o&i.childLanes)!==0,d||(kl(n,i,o,!1),d=(o&i.childLanes)!==0),m){if(d)return uv(n,i,o);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),ye(Tn,Tn.current),d)break;return null;case 22:return i.lanes=0,nv(n,i,o,i.pendingProps);case 24:$i(i,qn,n.memoizedState.cache)}return xi(n,i,o)}r(p_,"attemptEarlyBailoutIfNoScheduledUpdate");function dv(n,i,o){if(n!==null)if(n.memoizedProps!==i.pendingProps)Hn=!0;else{if(!dm(n,o)&&(i.flags&128)===0)return Hn=!1,p_(n,i,o);Hn=(n.flags&131072)!==0}else Hn=!1,_t&&(i.flags&1048576)!==0&&Vx(i,To,i.index);switch(i.lanes=0,i.tag){case 16:e:{var d=i.pendingProps;if(n=Er(i.elementType),i.type=n,typeof n=="function")gp(n)?(d=Or(n,d),i.tag=1,i=rv(null,i,n,d,o)):(i.tag=0,i=sm(null,i,n,d,o));else{if(n!=null){var m=n.$$typeof;if(m===D){i.tag=11,i=Jb(null,i,n,d,o);break e}else if(m===z){i.tag=14,i=ev(null,i,n,d,o);break e}}throw i=ce(n)||n,Error(c(306,i,""))}}return i;case 0:return sm(n,i,i.type,i.pendingProps,o);case 1:return d=i.type,m=Or(d,i.pendingProps),rv(n,i,d,m,o);case 3:e:{if($e(i,i.stateNode.containerInfo),n===null)throw Error(c(387));d=i.pendingProps;var b=i.memoizedState;m=b.element,Tp(n,i),$o(i,d,null,o);var w=i.memoizedState;if(d=w.cache,$i(i,qn,d),d!==b.cache&&Np(i,[qn],o,!0),Po(),d=w.element,b.isDehydrated)if(b={element:d,isDehydrated:!1,cache:w.cache},i.updateQueue.baseState=b,i.memoizedState=b,i.flags&256){i=lv(n,i,d,o);break e}else if(d!==m){m=us(Error(c(424)),i),Ro(m),i=lv(n,i,d,o);break e}else for(n=i.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,vn=gs(n.firstChild),oa=i,_t=!0,zi=null,ps=!0,o=ib(i,null,d,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Nr(),d===m){i=xi(n,i,o);break e}ua(n,i,d,o)}i=i.child}return i;case 26:return Tu(n,i),n===null?(o=ky(i.type,null,i.pendingProps,null))?i.memoizedState=o:_t||(o=i.type,n=i.pendingProps,d=Qu(ve.current).createElement(o),d[yt]=i,d[dn]=n,da(d,o,n),xn(d),i.stateNode=d):i.memoizedState=ky(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return ct(i),n===null&&_t&&(d=i.stateNode=yy(i.type,i.pendingProps,ve.current),oa=i,ps=!0,m=vn,Yi(i.type)?(qm=m,vn=gs(d.firstChild)):vn=m),ua(n,i,i.pendingProps.children,o),Tu(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&_t&&((m=d=vn)&&(d=B_(d,i.type,i.pendingProps,ps),d!==null?(i.stateNode=d,oa=i,vn=gs(d.firstChild),ps=!1,m=!0):m=!1),m||Pi(i)),ct(i),m=i.type,b=i.pendingProps,w=n!==null?n.memoizedProps:null,d=b.children,Pm(m,b)?d=null:w!==null&&Pm(m,w)&&(i.flags|=32),i.memoizedState!==null&&(m=Pp(n,i,t_,null,null,o),ic._currentValue=m),Tu(n,i),ua(n,i,d,o),i.child;case 6:return n===null&&_t&&((n=o=vn)&&(o=K_(o,i.pendingProps,ps),o!==null?(i.stateNode=o,oa=i,vn=null,n=!0):n=!1),n||Pi(i)),null;case 13:return ov(n,i,o);case 4:return $e(i,i.stateNode.containerInfo),d=i.pendingProps,n===null?i.child=Tr(i,null,d,o):ua(n,i,d,o),i.child;case 11:return Jb(n,i,i.type,i.pendingProps,o);case 7:return ua(n,i,i.pendingProps,o),i.child;case 8:return ua(n,i,i.pendingProps.children,o),i.child;case 12:return ua(n,i,i.pendingProps.children,o),i.child;case 10:return d=i.pendingProps,$i(i,i.type,d.value),ua(n,i,d.children,o),i.child;case 9:return m=i.type._context,d=i.pendingProps.children,Ar(i),m=ca(m),d=d(m),i.flags|=1,ua(n,i,d,o),i.child;case 14:return ev(n,i,i.type,i.pendingProps,o);case 15:return tv(n,i,i.type,i.pendingProps,o);case 19:return uv(n,i,o);case 31:return f_(n,i,o);case 22:return nv(n,i,o,i.pendingProps);case 24:return Ar(i),d=ca(qn),n===null?(m=_p(),m===null&&(m=fn,b=Cp(),m.pooledCache=b,b.refCount++,b!==null&&(m.pooledCacheLanes|=o),m=b),i.memoizedState={parent:d,cache:m},Ip(i),$i(i,qn,m)):((n.lanes&o)!==0&&(Tp(n,i),$o(i,null,null,o),Po()),m=n.memoizedState,b=i.memoizedState,m.parent!==d?(m={parent:d,cache:d},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),$i(i,qn,d)):(d=b.cache,$i(i,qn,d),d!==m.cache&&Np(i,[qn],o,!0))),ua(n,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(c(156,i.tag))}r(dv,"beginWork");function bi(n){n.flags|=4}r(bi,"markUpdate");function fm(n,i,o,d,m){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(m&335544128)===m)if(n.stateNode.complete)n.flags|=8192;else if(Pv())n.flags|=8192;else throw Ir=gu,Ep}else n.flags&=-16777217}r(fm,"preloadInstanceAndSuspendIfNeeded");function fv(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!_y(i))if(Pv())n.flags|=8192;else throw Ir=gu,Ep}r(fv,"preloadResourceAndSuspendIfNeeded");function Mu(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?Rt():536870912,n.lanes|=i,Ol|=i)}r(Mu,"scheduleRetryEffect");function Ho(n,i){if(!_t)switch(n.tailMode){case"hidden":i=n.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:d.sibling=null}}r(Ho,"cutOffTailIfNeeded");function yn(n){var i=n.alternate!==null&&n.alternate.child===n.child,o=0,d=0;if(i)for(var m=n.child;m!==null;)o|=m.lanes|m.childLanes,d|=m.subtreeFlags&65011712,d|=m.flags&65011712,m.return=n,m=m.sibling;else for(m=n.child;m!==null;)o|=m.lanes|m.childLanes,d|=m.subtreeFlags,d|=m.flags,m.return=n,m=m.sibling;return n.subtreeFlags|=d,n.childLanes=o,i}r(yn,"bubbleProperties");function m_(n,i,o){var d=i.pendingProps;switch(yp(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yn(i),null;case 1:return yn(i),null;case 3:return o=i.stateNode,d=null,n!==null&&(d=n.memoizedState.cache),i.memoizedState.cache!==d&&(i.flags|=2048),mi(qn),Ie(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(wl(i)?bi(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,wp())),yn(i),null;case 26:var m=i.type,b=i.memoizedState;return n===null?(bi(i),b!==null?(yn(i),fv(i,b)):(yn(i),fm(i,m,null,d,o))):b?b!==n.memoizedState?(bi(i),yn(i),fv(i,b)):(yn(i),i.flags&=-16777217):(n=n.memoizedProps,n!==d&&bi(i),yn(i),fm(i,m,n,d,o)),null;case 27:if(He(i),o=ve.current,m=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==d&&bi(i);else{if(!d){if(i.stateNode===null)throw Error(c(166));return yn(i),null}n=Me.current,wl(i)?Qx(i,n):(n=yy(m,d,o),i.stateNode=n,bi(i))}return yn(i),null;case 5:if(He(i),m=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==d&&bi(i);else{if(!d){if(i.stateNode===null)throw Error(c(166));return yn(i),null}if(b=Me.current,wl(i))Qx(i,b);else{var w=Qu(ve.current);switch(b){case 1:b=w.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:b=w.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":b=w.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":b=w.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":b=w.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof d.is=="string"?w.createElement("select",{is:d.is}):w.createElement("select"),d.multiple?b.multiple=!0:d.size&&(b.size=d.size);break;default:b=typeof d.is=="string"?w.createElement(m,{is:d.is}):w.createElement(m)}}b[yt]=i,b[dn]=d;e:for(w=i.child;w!==null;){if(w.tag===5||w.tag===6)b.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===i)break e;for(;w.sibling===null;){if(w.return===null||w.return===i)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}i.stateNode=b;e:switch(da(b,m,d),m){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&bi(i)}}return yn(i),fm(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,o),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==d&&bi(i);else{if(typeof d!="string"&&i.stateNode===null)throw Error(c(166));if(n=ve.current,wl(i)){if(n=i.stateNode,o=i.memoizedProps,d=null,m=oa,m!==null)switch(m.tag){case 27:case 5:d=m.memoizedProps}n[yt]=i,n=!!(n.nodeValue===o||d!==null&&d.suppressHydrationWarning===!0||cy(n.nodeValue,o)),n||Pi(i,!0)}else n=Qu(n).createTextNode(d),n[yt]=i,i.stateNode=n}return yn(i),null;case 31:if(o=i.memoizedState,n===null||n.memoizedState!==null){if(d=wl(i),o!==null){if(n===null){if(!d)throw Error(c(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(557));n[yt]=i}else Nr(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;yn(i),n=!1}else o=wp(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return i.flags&256?(es(i),i):(es(i),null);if((i.flags&128)!==0)throw Error(c(558))}return yn(i),null;case 13:if(d=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(m=wl(i),d!==null&&d.dehydrated!==null){if(n===null){if(!m)throw Error(c(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(c(317));m[yt]=i}else Nr(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;yn(i),m=!1}else m=wp(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(es(i),i):(es(i),null)}return es(i),(i.flags&128)!==0?(i.lanes=o,i):(o=d!==null,n=n!==null&&n.memoizedState!==null,o&&(d=i.child,m=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(m=d.alternate.memoizedState.cachePool.pool),b=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),b!==m&&(d.flags|=2048)),o!==n&&o&&(i.child.flags|=8192),Mu(i,i.updateQueue),yn(i),null);case 4:return Ie(),n===null&&iy(i.stateNode.containerInfo),yn(i),null;case 10:return mi(i.type),yn(i),null;case 19:if(we(Tn),d=i.memoizedState,d===null)return yn(i),null;if(m=(i.flags&128)!==0,b=d.rendering,b===null)if(m)Ho(d,!1);else{if(En!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(b=yu(n),b!==null){for(i.flags|=128,Ho(d,!1),n=b.updateQueue,i.updateQueue=n,Mu(i,n),i.subtreeFlags=0,n=o,o=i.child;o!==null;)qx(o,n),o=o.sibling;return ye(Tn,Tn.current&1|2),_t&&fi(i,d.treeForkCount),i.child}n=n.sibling}d.tail!==null&&Ye()>Pu&&(i.flags|=128,m=!0,Ho(d,!1),i.lanes=4194304)}else{if(!m)if(n=yu(b),n!==null){if(i.flags|=128,m=!0,n=n.updateQueue,i.updateQueue=n,Mu(i,n),Ho(d,!0),d.tail===null&&d.tailMode==="hidden"&&!b.alternate&&!_t)return yn(i),null}else 2*Ye()-d.renderingStartTime>Pu&&o!==536870912&&(i.flags|=128,m=!0,Ho(d,!1),i.lanes=4194304);d.isBackwards?(b.sibling=i.child,i.child=b):(n=d.last,n!==null?n.sibling=b:i.child=b,d.last=b)}return d.tail!==null?(n=d.tail,d.rendering=n,d.tail=n.sibling,d.renderingStartTime=Ye(),n.sibling=null,o=Tn.current,ye(Tn,m?o&1|2:o&1),_t&&fi(i,d.treeForkCount),n):(yn(i),null);case 22:case 23:return es(i),Op(),d=i.memoizedState!==null,n!==null?n.memoizedState!==null!==d&&(i.flags|=8192):d&&(i.flags|=8192),d?(o&536870912)!==0&&(i.flags&128)===0&&(yn(i),i.subtreeFlags&6&&(i.flags|=8192)):yn(i),o=i.updateQueue,o!==null&&Mu(i,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==o&&(i.flags|=2048),n!==null&&we(_r),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),mi(qn),yn(i),null;case 25:return null;case 30:return null}throw Error(c(156,i.tag))}r(m_,"completeWork");function h_(n,i){switch(yp(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return mi(qn),Ie(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return He(i),null;case 31:if(i.memoizedState!==null){if(es(i),i.alternate===null)throw Error(c(340));Nr()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(es(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(c(340));Nr()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return we(Tn),null;case 4:return Ie(),null;case 10:return mi(i.type),null;case 22:case 23:return es(i),Op(),n!==null&&we(_r),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return mi(qn),null;case 25:return null;default:return null}}r(h_,"unwindWork");function pv(n,i){switch(yp(i),i.tag){case 3:mi(qn),Ie();break;case 26:case 27:case 5:He(i);break;case 4:Ie();break;case 31:i.memoizedState!==null&&es(i);break;case 13:es(i);break;case 19:we(Tn);break;case 10:mi(i.type);break;case 22:case 23:es(i),Op(),n!==null&&we(_r);break;case 24:mi(qn)}}r(pv,"unwindInterruptedWork");function Vo(n,i){try{var o=i.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var m=d.next;o=m;do{if((o.tag&n)===n){d=void 0;var b=o.create,w=o.inst;d=b(),w.destroy=d}o=o.next}while(o!==m)}}catch(T){Zt(i,i.return,T)}}r(Vo,"commitHookEffectListMount");function qi(n,i,o){try{var d=i.updateQueue,m=d!==null?d.lastEffect:null;if(m!==null){var b=m.next;d=b;do{if((d.tag&n)===n){var w=d.inst,T=w.destroy;if(T!==void 0){w.destroy=void 0,m=i;var q=o,ne=T;try{ne()}catch(fe){Zt(m,q,fe)}}}d=d.next}while(d!==b)}}catch(fe){Zt(i,i.return,fe)}}r(qi,"commitHookEffectListUnmount");function mv(n){var i=n.updateQueue;if(i!==null){var o=n.stateNode;try{lb(i,o)}catch(d){Zt(n,n.return,d)}}}r(mv,"commitClassCallbacks");function hv(n,i,o){o.props=Or(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(d){Zt(n,i,d)}}r(hv,"safelyCallComponentWillUnmount");function Wo(n,i){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var d=n.stateNode;break;case 30:d=n.stateNode;break;default:d=n.stateNode}typeof o=="function"?n.refCleanup=o(d):o.current=d}}catch(m){Zt(n,i,m)}}r(Wo,"safelyAttachRef");function Qs(n,i){var o=n.ref,d=n.refCleanup;if(o!==null)if(typeof d=="function")try{d()}catch(m){Zt(n,i,m)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(m){Zt(n,i,m)}else o.current=null}r(Qs,"safelyDetachRef");function gv(n){var i=n.type,o=n.memoizedProps,d=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":o.autoFocus&&d.focus();break e;case"img":o.src?d.src=o.src:o.srcSet&&(d.srcset=o.srcSet)}}catch(m){Zt(n,n.return,m)}}r(gv,"commitHostMount");function pm(n,i,o){try{var d=n.stateNode;O_(d,n.type,o,i),d[dn]=i}catch(m){Zt(n,n.return,m)}}r(pm,"commitHostUpdate");function xv(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Yi(n.type)||n.tag===4}r(xv,"isHostParent");function mm(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||xv(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Yi(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}r(mm,"getHostSibling");function hm(n,i,o){var d=n.tag;if(d===5||d===6)n=n.stateNode,i?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(n,i):(i=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,i.appendChild(n),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=jt));else if(d!==4&&(d===27&&Yi(n.type)&&(o=n.stateNode,i=null),n=n.child,n!==null))for(hm(n,i,o),n=n.sibling;n!==null;)hm(n,i,o),n=n.sibling}r(hm,"insertOrAppendPlacementNodeIntoContainer");function Du(n,i,o){var d=n.tag;if(d===5||d===6)n=n.stateNode,i?o.insertBefore(n,i):o.appendChild(n);else if(d!==4&&(d===27&&Yi(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(Du(n,i,o),n=n.sibling;n!==null;)Du(n,i,o),n=n.sibling}r(Du,"insertOrAppendPlacementNode");function bv(n){var i=n.stateNode,o=n.memoizedProps;try{for(var d=n.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);da(i,d,o),i[yt]=n,i[dn]=o}catch(b){Zt(n,n.return,b)}}r(bv,"commitHostSingletonAcquisition");var vi=!1,Vn=!1,gm=!1,vv=typeof WeakSet=="function"?WeakSet:Set,na=null;function g_(n,i){if(n=n.containerInfo,Lm=td,n=Dx(n),cp(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var d=o.getSelection&&o.getSelection();if(d&&d.rangeCount!==0){o=d.anchorNode;var m=d.anchorOffset,b=d.focusNode;d=d.focusOffset;try{o.nodeType,b.nodeType}catch{o=null;break e}var w=0,T=-1,q=-1,ne=0,fe=0,xe=n,ae=null;t:for(;;){for(var re;xe!==o||m!==0&&xe.nodeType!==3||(T=w+m),xe!==b||d!==0&&xe.nodeType!==3||(q=w+d),xe.nodeType===3&&(w+=xe.nodeValue.length),(re=xe.firstChild)!==null;)ae=xe,xe=re;for(;;){if(xe===n)break t;if(ae===o&&++ne===m&&(T=w),ae===b&&++fe===d&&(q=w),(re=xe.nextSibling)!==null)break;xe=ae,ae=xe.parentNode}xe=re}o=T===-1||q===-1?null:{start:T,end:q}}else o=null}o=o||{start:0,end:0}}else o=null;for(zm={focusedElem:n,selectionRange:o},td=!1,na=i;na!==null;)if(i=na,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,na=n;else for(;na!==null;){switch(i=na,b=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(o=0;o<n.length;o++)m=n[o],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&b!==null){n=void 0,o=i,m=b.memoizedProps,b=b.memoizedState,d=o.stateNode;try{var Pe=Or(o.type,m);n=d.getSnapshotBeforeUpdate(Pe,b),d.__reactInternalSnapshotBeforeUpdate=n}catch(tt){Zt(o,o.return,tt)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,o=n.nodeType,o===9)Um(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Um(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(c(163))}if(n=i.sibling,n!==null){n.return=i.return,na=n;break}na=i.return}}r(g_,"commitBeforeMutationEffects");function yv(n,i,o){var d=o.flags;switch(o.tag){case 0:case 11:case 15:ji(n,o),d&4&&Vo(5,o);break;case 1:if(ji(n,o),d&4)if(n=o.stateNode,i===null)try{n.componentDidMount()}catch(w){Zt(o,o.return,w)}else{var m=Or(o.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(m,i,n.__reactInternalSnapshotBeforeUpdate)}catch(w){Zt(o,o.return,w)}}d&64&&mv(o),d&512&&Wo(o,o.return);break;case 3:if(ji(n,o),d&64&&(n=o.updateQueue,n!==null)){if(i=null,o.child!==null)switch(o.child.tag){case 27:case 5:i=o.child.stateNode;break;case 1:i=o.child.stateNode}try{lb(n,i)}catch(w){Zt(o,o.return,w)}}break;case 27:i===null&&d&4&&bv(o);case 26:case 5:ji(n,o),i===null&&d&4&&gv(o),d&512&&Wo(o,o.return);break;case 12:ji(n,o);break;case 31:ji(n,o),d&4&&kv(n,o);break;case 13:ji(n,o),d&4&&Sv(n,o),d&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=N_.bind(null,o),q_(n,o))));break;case 22:if(d=o.memoizedState!==null||vi,!d){i=i!==null&&i.memoizedState!==null||Vn,m=vi;var b=Vn;vi=d,(Vn=i)&&!b?wi(n,o,(o.subtreeFlags&8772)!==0):ji(n,o),vi=m,Vn=b}break;case 30:break;default:ji(n,o)}}r(yv,"commitLayoutEffectOnFiber");function jv(n){var i=n.alternate;i!==null&&(n.alternate=null,jv(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&ma(i)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}r(jv,"detachFiberAfterEffects");var jn=null,Ua=!1;function yi(n,i,o){for(o=o.child;o!==null;)wv(n,i,o),o=o.sibling}r(yi,"recursivelyTraverseDeletionEffects");function wv(n,i,o){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(On,o)}catch{}switch(o.tag){case 26:Vn||Qs(o,i),yi(n,i,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Vn||Qs(o,i);var d=jn,m=Ua;Yi(o.type)&&(jn=o.stateNode,Ua=!1),yi(n,i,o),nc(o.stateNode),jn=d,Ua=m;break;case 5:Vn||Qs(o,i);case 6:if(d=jn,m=Ua,jn=null,yi(n,i,o),jn=d,Ua=m,jn!==null)if(Ua)try{(jn.nodeType===9?jn.body:jn.nodeName==="HTML"?jn.ownerDocument.body:jn).removeChild(o.stateNode)}catch(b){Zt(o,i,b)}else try{jn.removeChild(o.stateNode)}catch(b){Zt(o,i,b)}break;case 18:jn!==null&&(Ua?(n=jn,hy(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),ql(n)):hy(jn,o.stateNode));break;case 4:d=jn,m=Ua,jn=o.stateNode.containerInfo,Ua=!0,yi(n,i,o),jn=d,Ua=m;break;case 0:case 11:case 14:case 15:qi(2,o,i),Vn||qi(4,o,i),yi(n,i,o);break;case 1:Vn||(Qs(o,i),d=o.stateNode,typeof d.componentWillUnmount=="function"&&hv(o,i,d)),yi(n,i,o);break;case 21:yi(n,i,o);break;case 22:Vn=(d=Vn)||o.memoizedState!==null,yi(n,i,o),Vn=d;break;default:yi(n,i,o)}}r(wv,"commitDeletionEffectsOnFiber");function kv(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ql(n)}catch(o){Zt(i,i.return,o)}}}r(kv,"commitActivityHydrationCallbacks");function Sv(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ql(n)}catch(o){Zt(i,i.return,o)}}r(Sv,"commitSuspenseHydrationCallbacks");function x_(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new vv),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new vv),i;default:throw Error(c(435,n.tag))}}r(x_,"getRetryCache");function Ou(n,i){var o=x_(n);i.forEach(function(d){if(!o.has(d)){o.add(d);var m=C_.bind(null,n,d);d.then(m,m)}})}r(Ou,"attachSuspenseRetryListeners");function Ba(n,i){var o=i.deletions;if(o!==null)for(var d=0;d<o.length;d++){var m=o[d],b=n,w=i,T=w;e:for(;T!==null;){switch(T.tag){case 27:if(Yi(T.type)){jn=T.stateNode,Ua=!1;break e}break;case 5:jn=T.stateNode,Ua=!1;break e;case 3:case 4:jn=T.stateNode.containerInfo,Ua=!0;break e}T=T.return}if(jn===null)throw Error(c(160));wv(b,w,m),jn=null,Ua=!1,b=m.alternate,b!==null&&(b.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Nv(i,n),i=i.sibling}r(Ba,"recursivelyTraverseMutationEffects");var As=null;function Nv(n,i){var o=n.alternate,d=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Ba(i,n),Ka(n),d&4&&(qi(3,n,n.return),Vo(3,n),qi(5,n,n.return));break;case 1:Ba(i,n),Ka(n),d&512&&(Vn||o===null||Qs(o,o.return)),d&64&&vi&&(n=n.updateQueue,n!==null&&(d=n.callbacks,d!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?d:o.concat(d))));break;case 26:var m=As;if(Ba(i,n),Ka(n),d&512&&(Vn||o===null||Qs(o,o.return)),d&4){var b=o!==null?o.memoizedState:null;if(d=n.memoizedState,o===null)if(d===null)if(n.stateNode===null){e:{d=n.type,o=n.memoizedProps,m=m.ownerDocument||m;t:switch(d){case"title":b=m.getElementsByTagName("title")[0],(!b||b[ra]||b[yt]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=m.createElement(d),m.head.insertBefore(b,m.querySelector("head > title"))),da(b,d,o),b[yt]=n,xn(b),d=b;break e;case"link":var w=Cy("link","href",m).get(d+(o.href||""));if(w){for(var T=0;T<w.length;T++)if(b=w[T],b.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&b.getAttribute("rel")===(o.rel==null?null:o.rel)&&b.getAttribute("title")===(o.title==null?null:o.title)&&b.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){w.splice(T,1);break t}}b=m.createElement(d),da(b,d,o),m.head.appendChild(b);break;case"meta":if(w=Cy("meta","content",m).get(d+(o.content||""))){for(T=0;T<w.length;T++)if(b=w[T],b.getAttribute("content")===(o.content==null?null:""+o.content)&&b.getAttribute("name")===(o.name==null?null:o.name)&&b.getAttribute("property")===(o.property==null?null:o.property)&&b.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&b.getAttribute("charset")===(o.charSet==null?null:o.charSet)){w.splice(T,1);break t}}b=m.createElement(d),da(b,d,o),m.head.appendChild(b);break;default:throw Error(c(468,d))}b[yt]=n,xn(b),d=b}n.stateNode=d}else Ay(m,n.type,n.stateNode);else n.stateNode=Ny(m,d,n.memoizedProps);else b!==d?(b===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):b.count--,d===null?Ay(m,n.type,n.stateNode):Ny(m,d,n.memoizedProps)):d===null&&n.stateNode!==null&&pm(n,n.memoizedProps,o.memoizedProps)}break;case 27:Ba(i,n),Ka(n),d&512&&(Vn||o===null||Qs(o,o.return)),o!==null&&d&4&&pm(n,n.memoizedProps,o.memoizedProps);break;case 5:if(Ba(i,n),Ka(n),d&512&&(Vn||o===null||Qs(o,o.return)),n.flags&32){m=n.stateNode;try{st(m,"")}catch(Pe){Zt(n,n.return,Pe)}}d&4&&n.stateNode!=null&&(m=n.memoizedProps,pm(n,m,o!==null?o.memoizedProps:m)),d&1024&&(gm=!0);break;case 6:if(Ba(i,n),Ka(n),d&4){if(n.stateNode===null)throw Error(c(162));d=n.memoizedProps,o=n.stateNode;try{o.nodeValue=d}catch(Pe){Zt(n,n.return,Pe)}}break;case 3:if(Xu=null,m=As,As=Gu(i.containerInfo),Ba(i,n),As=m,Ka(n),d&4&&o!==null&&o.memoizedState.isDehydrated)try{ql(i.containerInfo)}catch(Pe){Zt(n,n.return,Pe)}gm&&(gm=!1,Cv(n));break;case 4:d=As,As=Gu(n.stateNode.containerInfo),Ba(i,n),Ka(n),As=d;break;case 12:Ba(i,n),Ka(n);break;case 31:Ba(i,n),Ka(n),d&4&&(d=n.updateQueue,d!==null&&(n.updateQueue=null,Ou(n,d)));break;case 13:Ba(i,n),Ka(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(zu=Ye()),d&4&&(d=n.updateQueue,d!==null&&(n.updateQueue=null,Ou(n,d)));break;case 22:m=n.memoizedState!==null;var q=o!==null&&o.memoizedState!==null,ne=vi,fe=Vn;if(vi=ne||m,Vn=fe||q,Ba(i,n),Vn=fe,vi=ne,Ka(n),d&8192)e:for(i=n.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(o===null||q||vi||Vn||Lr(n)),o=null,i=n;;){if(i.tag===5||i.tag===26){if(o===null){q=o=i;try{if(b=q.stateNode,m)w=b.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{T=q.stateNode;var xe=q.memoizedProps.style,ae=xe!=null&&xe.hasOwnProperty("display")?xe.display:null;T.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(Pe){Zt(q,q.return,Pe)}}}else if(i.tag===6){if(o===null){q=i;try{q.stateNode.nodeValue=m?"":q.memoizedProps}catch(Pe){Zt(q,q.return,Pe)}}}else if(i.tag===18){if(o===null){q=i;try{var re=q.stateNode;m?gy(re,!0):gy(q.stateNode,!1)}catch(Pe){Zt(q,q.return,Pe)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;o===i&&(o=null),i=i.return}o===i&&(o=null),i.sibling.return=i.return,i=i.sibling}d&4&&(d=n.updateQueue,d!==null&&(o=d.retryQueue,o!==null&&(d.retryQueue=null,Ou(n,o))));break;case 19:Ba(i,n),Ka(n),d&4&&(d=n.updateQueue,d!==null&&(n.updateQueue=null,Ou(n,d)));break;case 30:break;case 21:break;default:Ba(i,n),Ka(n)}}r(Nv,"commitMutationEffectsOnFiber");function Ka(n){var i=n.flags;if(i&2){try{for(var o,d=n.return;d!==null;){if(xv(d)){o=d;break}d=d.return}if(o==null)throw Error(c(160));switch(o.tag){case 27:var m=o.stateNode;Du(n,mm(n),m);break;case 5:var b=o.stateNode;o.flags&32&&(st(b,""),o.flags&=-33),Du(n,mm(n),b);break;case 3:case 4:var w=o.stateNode.containerInfo;hm(n,mm(n),w);break;default:throw Error(c(161))}}catch(T){Zt(n,n.return,T)}n.flags&=-3}i&4096&&(n.flags&=-4097)}r(Ka,"commitReconciliationEffects");function Cv(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;Cv(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}r(Cv,"recursivelyResetForms");function ji(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)yv(n,i.alternate,i),i=i.sibling}r(ji,"recursivelyTraverseLayoutEffects");function Lr(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:qi(4,i,i.return),Lr(i);break;case 1:Qs(i,i.return);var o=i.stateNode;typeof o.componentWillUnmount=="function"&&hv(i,i.return,o),Lr(i);break;case 27:nc(i.stateNode);case 26:case 5:Qs(i,i.return),Lr(i);break;case 22:i.memoizedState===null&&Lr(i);break;case 30:Lr(i);break;default:Lr(i)}n=n.sibling}}r(Lr,"recursivelyTraverseDisappearLayoutEffects");function wi(n,i,o){for(o=o&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var d=i.alternate,m=n,b=i,w=b.flags;switch(b.tag){case 0:case 11:case 15:wi(m,b,o),Vo(4,b);break;case 1:if(wi(m,b,o),d=b,m=d.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(ne){Zt(d,d.return,ne)}if(d=b,m=d.updateQueue,m!==null){var T=d.stateNode;try{var q=m.shared.hiddenCallbacks;if(q!==null)for(m.shared.hiddenCallbacks=null,m=0;m<q.length;m++)rb(q[m],T)}catch(ne){Zt(d,d.return,ne)}}o&&w&64&&mv(b),Wo(b,b.return);break;case 27:bv(b);case 26:case 5:wi(m,b,o),o&&d===null&&w&4&&gv(b),Wo(b,b.return);break;case 12:wi(m,b,o);break;case 31:wi(m,b,o),o&&w&4&&kv(m,b);break;case 13:wi(m,b,o),o&&w&4&&Sv(m,b);break;case 22:b.memoizedState===null&&wi(m,b,o),Wo(b,b.return);break;case 30:break;default:wi(m,b,o)}i=i.sibling}}r(wi,"recursivelyTraverseReappearLayoutEffects");function xm(n,i){var o=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==o&&(n!=null&&n.refCount++,o!=null&&Mo(o))}r(xm,"commitOffscreenPassiveMountEffects");function bm(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&Mo(n))}r(bm,"commitCachePassiveMountEffect");function _s(n,i,o,d){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Av(n,i,o,d),i=i.sibling}r(_s,"recursivelyTraversePassiveMountEffects");function Av(n,i,o,d){var m=i.flags;switch(i.tag){case 0:case 11:case 15:_s(n,i,o,d),m&2048&&Vo(9,i);break;case 1:_s(n,i,o,d);break;case 3:_s(n,i,o,d),m&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&Mo(n)));break;case 12:if(m&2048){_s(n,i,o,d),n=i.stateNode;try{var b=i.memoizedProps,w=b.id,T=b.onPostCommit;typeof T=="function"&&T(w,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(q){Zt(i,i.return,q)}}else _s(n,i,o,d);break;case 31:_s(n,i,o,d);break;case 13:_s(n,i,o,d);break;case 23:break;case 22:b=i.stateNode,w=i.alternate,i.memoizedState!==null?b._visibility&2?_s(n,i,o,d):Qo(n,i):b._visibility&2?_s(n,i,o,d):(b._visibility|=2,Rl(n,i,o,d,(i.subtreeFlags&10256)!==0||!1)),m&2048&&xm(w,i);break;case 24:_s(n,i,o,d),m&2048&&bm(i.alternate,i);break;default:_s(n,i,o,d)}}r(Av,"commitPassiveMountOnFiber");function Rl(n,i,o,d,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var b=n,w=i,T=o,q=d,ne=w.flags;switch(w.tag){case 0:case 11:case 15:Rl(b,w,T,q,m),Vo(8,w);break;case 23:break;case 22:var fe=w.stateNode;w.memoizedState!==null?fe._visibility&2?Rl(b,w,T,q,m):Qo(b,w):(fe._visibility|=2,Rl(b,w,T,q,m)),m&&ne&2048&&xm(w.alternate,w);break;case 24:Rl(b,w,T,q,m),m&&ne&2048&&bm(w.alternate,w);break;default:Rl(b,w,T,q,m)}i=i.sibling}}r(Rl,"recursivelyTraverseReconnectPassiveEffects");function Qo(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var o=n,d=i,m=d.flags;switch(d.tag){case 22:Qo(o,d),m&2048&&xm(d.alternate,d);break;case 24:Qo(o,d),m&2048&&bm(d.alternate,d);break;default:Qo(o,d)}i=i.sibling}}r(Qo,"recursivelyTraverseAtomicPassiveEffects");var Go=8192;function Ml(n,i,o){if(n.subtreeFlags&Go)for(n=n.child;n!==null;)_v(n,i,o),n=n.sibling}r(Ml,"recursivelyAccumulateSuspenseyCommit");function _v(n,i,o){switch(n.tag){case 26:Ml(n,i,o),n.flags&Go&&n.memoizedState!==null&&tE(o,As,n.memoizedState,n.memoizedProps);break;case 5:Ml(n,i,o);break;case 3:case 4:var d=As;As=Gu(n.stateNode.containerInfo),Ml(n,i,o),As=d;break;case 22:n.memoizedState===null&&(d=n.alternate,d!==null&&d.memoizedState!==null?(d=Go,Go=16777216,Ml(n,i,o),Go=d):Ml(n,i,o));break;default:Ml(n,i,o)}}r(_v,"accumulateSuspenseyCommitOnFiber");function Ev(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}r(Ev,"detachAlternateSiblings");function Yo(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var d=i[o];na=d,Tv(d,n)}Ev(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Iv(n),n=n.sibling}r(Yo,"recursivelyTraversePassiveUnmountEffects");function Iv(n){switch(n.tag){case 0:case 11:case 15:Yo(n),n.flags&2048&&qi(9,n,n.return);break;case 3:Yo(n);break;case 12:Yo(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,Lu(n)):Yo(n);break;default:Yo(n)}}r(Iv,"commitPassiveUnmountOnFiber");function Lu(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var d=i[o];na=d,Tv(d,n)}Ev(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:qi(8,i,i.return),Lu(i);break;case 22:o=i.stateNode,o._visibility&2&&(o._visibility&=-3,Lu(i));break;default:Lu(i)}n=n.sibling}}r(Lu,"recursivelyTraverseDisconnectPassiveEffects");function Tv(n,i){for(;na!==null;){var o=na;switch(o.tag){case 0:case 11:case 15:qi(8,o,i);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var d=o.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Mo(o.memoizedState.cache)}if(d=o.child,d!==null)d.return=o,na=d;else e:for(o=n;na!==null;){d=na;var m=d.sibling,b=d.return;if(jv(d),d===o){na=null;break e}if(m!==null){m.return=b,na=m;break e}na=b}}}r(Tv,"commitPassiveUnmountEffectsInsideOfDeletedTree_begin");var b_={getCacheForType:r(function(n){var i=ca(qn),o=i.data.get(n);return o===void 0&&(o=n(),i.data.set(n,o)),o},"getCacheForType"),cacheSignal:r(function(){return ca(qn).controller.signal},"cacheSignal")},v_=typeof WeakMap=="function"?WeakMap:Map,Ft=0,fn=null,wt=null,St=0,Xt=0,ts=null,Fi=!1,Dl=!1,vm=!1,ki=0,En=0,Hi=0,zr=0,ym=0,ns=0,Ol=0,Xo=null,qa=null,jm=!1,zu=0,Rv=0,Pu=1/0,$u=null,Vi=null,Yn=0,Wi=null,Ll=null,Si=0,wm=0,km=null,Mv=null,Zo=0,Sm=null;function hs(){return(Ft&2)!==0&&St!==0?St&-St:A.T!==null?Im():wa()}r(hs,"requestUpdateLane");function Dv(){if(ns===0)if((St&536870912)===0||_t){var n=_e;_e<<=1,(_e&3932160)===0&&(_e=262144),ns=n}else ns=536870912;return n=Ja.current,n!==null&&(n.flags|=32),ns}r(Dv,"requestDeferredLane");function Fa(n,i,o){(n===fn&&(Xt===2||Xt===9)||n.cancelPendingCommit!==null)&&(zl(n,0),Qi(n,St,ns,!1)),nn(n,o),((Ft&2)===0||n!==fn)&&(n===fn&&((Ft&2)===0&&(zr|=o),En===4&&Qi(n,St,ns,!1)),Ni(n))}r(Fa,"scheduleUpdateOnFiber");function Ov(n,i,o){if((Ft&6)!==0)throw Error(c(327));var d=!o&&(i&127)===0&&(i&n.expiredLanes)===0||ze(n,i),m=d?w_(n,i):Cm(n,i,!0),b=d;do{if(m===0){Dl&&!d&&Qi(n,i,0,!1);break}else{if(o=n.current.alternate,b&&!y_(o)){m=Cm(n,i,!1),b=!1;continue}if(m===2){if(b=i,n.errorRecoveryDisabledLanes&b)var w=0;else w=n.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){i=w;e:{var T=n;m=Xo;var q=T.current.memoizedState.isDehydrated;if(q&&(zl(T,w).flags|=256),w=Cm(T,w,!1),w!==2){if(vm&&!q){T.errorRecoveryDisabledLanes|=b,zr|=b,m=4;break e}b=qa,qa=m,b!==null&&(qa===null?qa=b:qa.push.apply(qa,b))}m=w}if(b=!1,m!==2)continue}}if(m===1){zl(n,0),Qi(n,i,0,!0);break}e:{switch(d=n,b=m,b){case 0:case 1:throw Error(c(345));case 4:if((i&4194048)!==i)break;case 6:Qi(d,i,ns,!Fi);break e;case 2:qa=null;break;case 3:case 5:break;default:throw Error(c(329))}if((i&62914560)===i&&(m=zu+300-Ye(),10<m)){if(Qi(d,i,ns,!Fi),Dt(d,0,!0)!==0)break e;Si=i,d.timeoutHandle=py(Lv.bind(null,d,o,qa,$u,jm,i,ns,zr,Ol,Fi,b,"Throttled",-0,0),m);break e}Lv(d,o,qa,$u,jm,i,ns,zr,Ol,Fi,b,null,-0,0)}}break}while(!0);Ni(n)}r(Ov,"performWorkOnRoot");function Lv(n,i,o,d,m,b,w,T,q,ne,fe,xe,ae,re){if(n.timeoutHandle=-1,xe=i.subtreeFlags,xe&8192||(xe&16785408)===16785408){xe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:jt},_v(i,b,xe);var Pe=(b&62914560)===b?zu-Ye():(b&4194048)===b?Rv-Ye():0;if(Pe=nE(xe,Pe),Pe!==null){Si=b,n.cancelPendingCommit=Pe(Fv.bind(null,n,i,b,o,d,m,w,T,q,fe,xe,null,ae,re)),Qi(n,b,w,!ne);return}}Fv(n,i,b,o,d,m,w,T,q)}r(Lv,"commitRootWhenReady");function y_(n){for(var i=n;;){var o=i.tag;if((o===0||o===11||o===15)&&i.flags&16384&&(o=i.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var d=0;d<o.length;d++){var m=o[d],b=m.getSnapshot;m=m.value;try{if(!Xa(b(),m))return!1}catch{return!1}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}r(y_,"isRenderConsistentWithExternalStores");function Qi(n,i,o,d){i&=~ym,i&=~zr,n.suspendedLanes|=i,n.pingedLanes&=~i,d&&(n.warmLanes|=i),d=n.expirationTimes;for(var m=i;0<m;){var b=31-It(m),w=1<<b;d[b]=-1,m&=~w}o!==0&&Ln(n,o,i)}r(Qi,"markRootSuspended");function Uu(){return(Ft&6)===0?(Jo(0,!1),!1):!0}r(Uu,"flushSyncWork$1");function Nm(){if(wt!==null){if(Xt===0)var n=wt.return;else n=wt,pi=Cr=null,Bp(n),Al=null,Oo=0,n=wt;for(;n!==null;)pv(n.alternate,n),n=n.return;wt=null}}r(Nm,"resetWorkInProgressStack");function zl(n,i){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,P_(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),Si=0,Nm(),fn=n,wt=o=di(n.current,null),St=i,Xt=0,ts=null,Fi=!1,Dl=ze(n,i),vm=!1,Ol=ns=ym=zr=Hi=En=0,qa=Xo=null,jm=!1,(i&8)!==0&&(i|=i&32);var d=n.entangledLanes;if(d!==0)for(n=n.entanglements,d&=i;0<d;){var m=31-It(d),b=1<<m;i|=n[m],d&=~b}return ki=i,lu(),o}r(zl,"prepareFreshStack");function zv(n,i){ot=null,A.H=qo,i===Cl||i===hu?(i=nb(),Xt=3):i===Ep?(i=nb(),Xt=4):Xt=i===am?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,ts=i,wt===null&&(En=1,Eu(n,us(i,n.current)))}r(zv,"handleThrow");function Pv(){var n=Ja.current;return n===null?!0:(St&4194048)===St?ms===null:(St&62914560)===St||(St&536870912)!==0?n===ms:!1}r(Pv,"shouldRemainOnPreviousScreen");function $v(){var n=A.H;return A.H=qo,n===null?qo:n}r($v,"pushDispatcher");function Uv(){var n=A.A;return A.A=b_,n}r(Uv,"pushAsyncDispatcher");function Bu(){En=4,Fi||(St&4194048)!==St&&Ja.current!==null||(Dl=!0),(Hi&134217727)===0&&(zr&134217727)===0||fn===null||Qi(fn,St,ns,!1)}r(Bu,"renderDidSuspendDelayIfPossible");function Cm(n,i,o){var d=Ft;Ft|=2;var m=$v(),b=Uv();(fn!==n||St!==i)&&($u=null,zl(n,i)),i=!1;var w=En;e:do try{if(Xt!==0&&wt!==null){var T=wt,q=ts;switch(Xt){case 8:Nm(),w=6;break e;case 3:case 2:case 9:case 6:Ja.current===null&&(i=!0);var ne=Xt;if(Xt=0,ts=null,Pl(n,T,q,ne),o&&Dl){w=0;break e}break;default:ne=Xt,Xt=0,ts=null,Pl(n,T,q,ne)}}j_(),w=En;break}catch(fe){zv(n,fe)}while(!0);return i&&n.shellSuspendCounter++,pi=Cr=null,Ft=d,A.H=m,A.A=b,wt===null&&(fn=null,St=0,lu()),w}r(Cm,"renderRootSync");function j_(){for(;wt!==null;)Bv(wt)}r(j_,"workLoopSync");function w_(n,i){var o=Ft;Ft|=2;var d=$v(),m=Uv();fn!==n||St!==i?($u=null,Pu=Ye()+500,zl(n,i)):Dl=ze(n,i);e:do try{if(Xt!==0&&wt!==null){i=wt;var b=ts;t:switch(Xt){case 1:Xt=0,ts=null,Pl(n,i,b,1);break;case 2:case 9:if(eb(b)){Xt=0,ts=null,Kv(i);break}i=r(function(){Xt!==2&&Xt!==9||fn!==n||(Xt=7),Ni(n)},"lanes"),b.then(i,i);break e;case 3:Xt=7;break e;case 4:Xt=5;break e;case 7:eb(b)?(Xt=0,ts=null,Kv(i)):(Xt=0,ts=null,Pl(n,i,b,7));break;case 5:var w=null;switch(wt.tag){case 26:w=wt.memoizedState;case 5:case 27:var T=wt;if(w?_y(w):T.stateNode.complete){Xt=0,ts=null;var q=T.sibling;if(q!==null)wt=q;else{var ne=T.return;ne!==null?(wt=ne,Ku(ne)):wt=null}break t}}Xt=0,ts=null,Pl(n,i,b,5);break;case 6:Xt=0,ts=null,Pl(n,i,b,6);break;case 8:Nm(),En=6;break e;default:throw Error(c(462))}}k_();break}catch(fe){zv(n,fe)}while(!0);return pi=Cr=null,A.H=d,A.A=m,Ft=o,wt!==null?0:(fn=null,St=0,lu(),En)}r(w_,"renderRootConcurrent");function k_(){for(;wt!==null&&!P();)Bv(wt)}r(k_,"workLoopConcurrentByScheduler");function Bv(n){var i=dv(n.alternate,n,ki);n.memoizedProps=n.pendingProps,i===null?Ku(n):wt=i}r(Bv,"performUnitOfWork");function Kv(n){var i=n,o=i.alternate;switch(i.tag){case 15:case 0:i=iv(o,i,i.pendingProps,i.type,void 0,St);break;case 11:i=iv(o,i,i.pendingProps,i.type.render,i.ref,St);break;case 5:Bp(i);default:pv(o,i),i=wt=qx(i,ki),i=dv(o,i,ki)}n.memoizedProps=n.pendingProps,i===null?Ku(n):wt=i}r(Kv,"replaySuspendedUnitOfWork");function Pl(n,i,o,d){pi=Cr=null,Bp(i),Al=null,Oo=0;var m=i.return;try{if(d_(n,m,i,o,St)){En=1,Eu(n,us(o,n.current)),wt=null;return}}catch(b){if(m!==null)throw wt=m,b;En=1,Eu(n,us(o,n.current)),wt=null;return}i.flags&32768?(_t||d===1?n=!0:Dl||(St&536870912)!==0?n=!1:(Fi=n=!0,(d===2||d===9||d===3||d===6)&&(d=Ja.current,d!==null&&d.tag===13&&(d.flags|=16384))),qv(i,n)):Ku(i)}r(Pl,"throwAndUnwindWorkLoop");function Ku(n){var i=n;do{if((i.flags&32768)!==0){qv(i,Fi);return}n=i.return;var o=m_(i.alternate,i,ki);if(o!==null){wt=o;return}if(i=i.sibling,i!==null){wt=i;return}wt=i=n}while(i!==null);En===0&&(En=5)}r(Ku,"completeUnitOfWork");function qv(n,i){do{var o=h_(n.alternate,n);if(o!==null){o.flags&=32767,wt=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!i&&(n=n.sibling,n!==null)){wt=n;return}wt=n=o}while(n!==null);En=6,wt=null}r(qv,"unwindUnitOfWork");function Fv(n,i,o,d,m,b,w,T,q){n.cancelPendingCommit=null;do qu();while(Yn!==0);if((Ft&6)!==0)throw Error(c(327));if(i!==null){if(i===n.current)throw Error(c(177));if(b=i.lanes|i.childLanes,b|=mp,Wt(n,o,b,w,T,q),n===fn&&(wt=fn=null,St=0),Ll=i,Wi=n,Si=o,wm=b,km=m,Mv=d,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,A_(ea,function(){return Gv(),null})):(n.callbackNode=null,n.callbackPriority=0),d=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||d){d=A.T,A.T=null,m=ee.p,ee.p=2,w=Ft,Ft|=4;try{g_(n,i,o)}finally{Ft=w,ee.p=m,A.T=d}}Yn=1,Hv(),Vv(),Wv()}}r(Fv,"commitRoot");function Hv(){if(Yn===1){Yn=0;var n=Wi,i=Ll,o=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||o){o=A.T,A.T=null;var d=ee.p;ee.p=2;var m=Ft;Ft|=4;try{Nv(i,n);var b=zm,w=Dx(n.containerInfo),T=b.focusedElem,q=b.selectionRange;if(w!==T&&T&&T.ownerDocument&&Mx(T.ownerDocument.documentElement,T)){if(q!==null&&cp(T)){var ne=q.start,fe=q.end;if(fe===void 0&&(fe=ne),"selectionStart"in T)T.selectionStart=ne,T.selectionEnd=Math.min(fe,T.value.length);else{var xe=T.ownerDocument||document,ae=xe&&xe.defaultView||window;if(ae.getSelection){var re=ae.getSelection(),Pe=T.textContent.length,tt=Math.min(q.start,Pe),on=q.end===void 0?tt:Math.min(q.end,Pe);!re.extend&&tt>on&&(w=on,on=tt,tt=w);var G=Rx(T,tt),H=Rx(T,on);if(G&&H&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==H.node||re.focusOffset!==H.offset)){var te=xe.createRange();te.setStart(G.node,G.offset),re.removeAllRanges(),tt>on?(re.addRange(te),re.extend(H.node,H.offset)):(te.setEnd(H.node,H.offset),re.addRange(te))}}}}for(xe=[],re=T;re=re.parentNode;)re.nodeType===1&&xe.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<xe.length;T++){var pe=xe[T];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}td=!!Lm,zm=Lm=null}finally{Ft=m,ee.p=d,A.T=o}}n.current=i,Yn=2}}r(Hv,"flushMutationEffects");function Vv(){if(Yn===2){Yn=0;var n=Wi,i=Ll,o=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||o){o=A.T,A.T=null;var d=ee.p;ee.p=2;var m=Ft;Ft|=4;try{yv(n,i.alternate,i)}finally{Ft=m,ee.p=d,A.T=o}}Yn=3}}r(Vv,"flushLayoutEffects");function Wv(){if(Yn===4||Yn===3){Yn=0,qe();var n=Wi,i=Ll,o=Si,d=Mv;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Yn=5:(Yn=0,Ll=Wi=null,Qv(n,n.pendingLanes));var m=n.pendingLanes;if(m===0&&(Vi=null),La(o),i=i.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(On,i,void 0,(i.current.flags&128)===128)}catch{}if(d!==null){i=A.T,m=ee.p,ee.p=2,A.T=null;try{for(var b=n.onRecoverableError,w=0;w<d.length;w++){var T=d[w];b(T.value,{componentStack:T.stack})}}finally{A.T=i,ee.p=m}}(Si&3)!==0&&qu(),Ni(n),m=n.pendingLanes,(o&261930)!==0&&(m&42)!==0?n===Sm?Zo++:(Zo=0,Sm=n):Zo=0,Jo(0,!1)}}r(Wv,"flushSpawnedWork");function Qv(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,Mo(i)))}r(Qv,"releaseRootPooledCache");function qu(){return Hv(),Vv(),Wv(),Gv()}r(qu,"flushPendingEffects");function Gv(){if(Yn!==5)return!1;var n=Wi,i=wm;wm=0;var o=La(Si),d=A.T,m=ee.p;try{ee.p=32>o?32:o,A.T=null,o=km,km=null;var b=Wi,w=Si;if(Yn=0,Ll=Wi=null,Si=0,(Ft&6)!==0)throw Error(c(331));var T=Ft;if(Ft|=4,Iv(b.current),Av(b,b.current,w,o),Ft=T,Jo(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(On,b)}catch{}return!0}finally{ee.p=m,A.T=d,Qv(n,i)}}r(Gv,"flushPassiveEffects");function Yv(n,i,o){i=us(o,i),i=nm(n.stateNode,i,2),n=Mr(n,i,2),n!==null&&(nn(n,2),Ni(n))}r(Yv,"captureCommitPhaseErrorOnRoot");function Zt(n,i,o){if(n.tag===3)Yv(n,n,o);else for(;i!==null;){if(i.tag===3){Yv(i,n,o);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Vi===null||!Vi.has(d))){n=us(o,n),o=Xb(2),d=Mr(i,o,2),d!==null&&(Zb(o,d,i,n),nn(d,2),Ni(d));break}}i=i.return}}r(Zt,"captureCommitPhaseError");function Am(n,i,o){var d=n.pingCache;if(d===null){d=n.pingCache=new v_;var m=new Set;d.set(i,m)}else m=d.get(i),m===void 0&&(m=new Set,d.set(i,m));m.has(o)||(vm=!0,m.add(o),n=S_.bind(null,n,i,o),i.then(n,n))}r(Am,"attachPingListener");function S_(n,i,o){var d=n.pingCache;d!==null&&d.delete(i),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,fn===n&&(St&o)===o&&(En===4||En===3&&(St&62914560)===St&&300>Ye()-zu?(Ft&2)===0&&zl(n,0):ym|=o,Ol===St&&(Ol=0)),Ni(n)}r(S_,"pingSuspendedRoot");function Xv(n,i){i===0&&(i=Rt()),n=kr(n,i),n!==null&&(nn(n,i),Ni(n))}r(Xv,"retryTimedOutBoundary");function N_(n){var i=n.memoizedState,o=0;i!==null&&(o=i.retryLane),Xv(n,o)}r(N_,"retryDehydratedSuspenseBoundary");function C_(n,i){var o=0;switch(n.tag){case 31:case 13:var d=n.stateNode,m=n.memoizedState;m!==null&&(o=m.retryLane);break;case 19:d=n.stateNode;break;case 22:d=n.stateNode._retryCache;break;default:throw Error(c(314))}d!==null&&d.delete(i),Xv(n,o)}r(C_,"resolveRetryWakeable");function A_(n,i){return gt(n,i)}r(A_,"scheduleCallback$1");var Fu=null,$l=null,_m=!1,Hu=!1,Em=!1,Gi=0;function Ni(n){n!==$l&&n.next===null&&($l===null?Fu=$l=n:$l=$l.next=n),Hu=!0,_m||(_m=!0,E_())}r(Ni,"ensureRootIsScheduled");function Jo(n,i){if(!Em&&Hu){Em=!0;do for(var o=!1,d=Fu;d!==null;){if(!i)if(n!==0){var m=d.pendingLanes;if(m===0)var b=0;else{var w=d.suspendedLanes,T=d.pingedLanes;b=(1<<31-It(42|n)+1)-1,b&=m&~(w&~T),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(o=!0,ty(d,b))}else b=St,b=Dt(d,d===fn?b:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(b&3)===0||ze(d,b)||(o=!0,ty(d,b));d=d.next}while(o);Em=!1}}r(Jo,"flushSyncWorkAcrossRoots_impl");function __(){Zv()}r(__,"processRootScheduleInImmediateTask");function Zv(){Hu=_m=!1;var n=0;Gi!==0&&z_()&&(n=Gi);for(var i=Ye(),o=null,d=Fu;d!==null;){var m=d.next,b=Jv(d,i);b===0?(d.next=null,o===null?Fu=m:o.next=m,m===null&&($l=o)):(o=d,(n!==0||(b&3)!==0)&&(Hu=!0)),d=m}Yn!==0&&Yn!==5||Jo(n,!1),Gi!==0&&(Gi=0)}r(Zv,"processRootScheduleInMicrotask");function Jv(n,i){for(var o=n.suspendedLanes,d=n.pingedLanes,m=n.expirationTimes,b=n.pendingLanes&-62914561;0<b;){var w=31-It(b),T=1<<w,q=m[w];q===-1?((T&o)===0||(T&d)!==0)&&(m[w]=Ot(T,i)):q<=i&&(n.expiredLanes|=T),b&=~T}if(i=fn,o=St,o=Dt(n,n===i?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),d=n.callbackNode,o===0||n===i&&(Xt===2||Xt===9)||n.cancelPendingCommit!==null)return d!==null&&d!==null&&un(d),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||ze(n,o)){if(i=o&-o,i===n.callbackPriority)return i;switch(d!==null&&un(d),La(o)){case 2:case 8:o=Kt;break;case 32:o=ea;break;case 268435456:o=Mt;break;default:o=ea}return d=ey.bind(null,n),o=gt(o,d),n.callbackPriority=i,n.callbackNode=o,i}return d!==null&&d!==null&&un(d),n.callbackPriority=2,n.callbackNode=null,2}r(Jv,"scheduleTaskForRootDuringMicrotask");function ey(n,i){if(Yn!==0&&Yn!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(qu()&&n.callbackNode!==o)return null;var d=St;return d=Dt(n,n===fn?d:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),d===0?null:(Ov(n,d,i),Jv(n,Ye()),n.callbackNode!=null&&n.callbackNode===o?ey.bind(null,n):null)}r(ey,"performWorkOnRootViaSchedulerTask");function ty(n,i){if(qu())return null;Ov(n,i,!0)}r(ty,"performSyncWorkOnRoot");function E_(){$_(function(){(Ft&6)!==0?gt(at,__):Zv()})}r(E_,"scheduleImmediateRootScheduleTask");function Im(){if(Gi===0){var n=Sl;n===0&&(n=Ct,Ct<<=1,(Ct&261888)===0&&(Ct=256)),Gi=n}return Gi}r(Im,"requestTransitionLane");function ny(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Cn(""+n)}r(ny,"coerceFormActionProp");function ay(n,i){var o=i.ownerDocument.createElement("input");return o.name=i.name,o.value=i.value,n.id&&o.setAttribute("form",n.id),i.parentNode.insertBefore(o,i),n=new FormData(n),o.parentNode.removeChild(o),n}r(ay,"createFormDataWithSubmitter");function I_(n,i,o,d,m){if(i==="submit"&&o&&o.stateNode===m){var b=ny((m[dn]||null).action),w=d.submitter;w&&(i=(i=w[dn]||null)?ny(i.formAction):w.getAttribute("formAction"),i!==null&&(b=i,w=null));var T=new Di("action","action",null,d,m);n.push({event:T,listeners:[{instance:null,listener:r(function(){if(d.defaultPrevented){if(Gi!==0){var q=w?ay(m,w):new FormData(m);Yp(o,{pending:!0,data:q,method:m.method,action:b},null,q)}}else typeof b=="function"&&(T.preventDefault(),q=w?ay(m,w):new FormData(m),Yp(o,{pending:!0,data:q,method:m.method,action:b},b,q))},"listener"),currentTarget:m}]})}}r(I_,"extractEvents$1");for(var Tm=0;Tm<pp.length;Tm++){var Rm=pp[Tm];Cs(Rm.toLowerCase(),"on"+(Rm[0].toUpperCase()+Rm.slice(1)))}Cs(zx,"onAnimationEnd"),Cs(Px,"onAnimationIteration"),Cs($x,"onAnimationStart"),Cs("dblclick","onDoubleClick"),Cs("focusin","onFocus"),Cs("focusout","onBlur"),Cs(H2,"onTransitionRun"),Cs(V2,"onTransitionStart"),Cs(W2,"onTransitionCancel"),Cs(Ux,"onTransitionEnd"),ga("onMouseEnter",["mouseout","mouseover"]),ga("onMouseLeave",["mouseout","mouseover"]),ga("onPointerEnter",["pointerout","pointerover"]),ga("onPointerLeave",["pointerout","pointerover"]),In("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),In("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),In("onBeforeInput",["compositionend","keypress","textInput","paste"]),In("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),In("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),In("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ec="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(" "),T_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ec));function sy(n,i){i=(i&4)!==0;for(var o=0;o<n.length;o++){var d=n[o],m=d.event;d=d.listeners;e:{var b=void 0;if(i)for(var w=d.length-1;0<=w;w--){var T=d[w],q=T.instance,ne=T.currentTarget;if(T=T.listener,q!==b&&m.isPropagationStopped())break e;b=T,m.currentTarget=ne;try{b(m)}catch(fe){ru(fe)}m.currentTarget=null,b=q}else for(w=0;w<d.length;w++){if(T=d[w],q=T.instance,ne=T.currentTarget,T=T.listener,q!==b&&m.isPropagationStopped())break e;b=T,m.currentTarget=ne;try{b(m)}catch(fe){ru(fe)}m.currentTarget=null,b=q}}}}r(sy,"processDispatchQueue");function kt(n,i){var o=i[si];o===void 0&&(o=i[si]=new Set);var d=n+"__bubble";o.has(d)||(ry(i,n,2,!1),o.add(d))}r(kt,"listenToNonDelegatedEvent");function Mm(n,i,o){var d=0;i&&(d|=4),ry(o,n,d,i)}r(Mm,"listenToNativeEvent");var Vu="_reactListening"+Math.random().toString(36).slice(2);function iy(n){if(!n[Vu]){n[Vu]=!0,rs.forEach(function(o){o!=="selectionchange"&&(T_.has(o)||Mm(o,!1,n),Mm(o,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[Vu]||(i[Vu]=!0,Mm("selectionchange",!1,i))}}r(iy,"listenToAllSupportedEvents");function ry(n,i,o,d){switch(My(i)){case 2:var m=lE;break;case 8:m=oE;break;default:m=Qm}o=m.bind(null,i,o,n),m=void 0,!sl||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),d?m!==void 0?n.addEventListener(i,o,{capture:!0,passive:m}):n.addEventListener(i,o,!0):m!==void 0?n.addEventListener(i,o,{passive:m}):n.addEventListener(i,o,!1)}r(ry,"addTrappedEventListener");function Dm(n,i,o,d,m){var b=d;if((i&1)===0&&(i&2)===0&&d!==null)e:for(;;){if(d===null)return;var w=d.tag;if(w===3||w===4){var T=d.stateNode.containerInfo;if(T===m)break;if(w===4)for(w=d.return;w!==null;){var q=w.tag;if((q===3||q===4)&&w.stateNode.containerInfo===m)return;w=w.return}for(;T!==null;){if(w=ha(T),w===null)return;if(q=w.tag,q===5||q===6||q===26||q===27){d=b=w;continue e}T=T.parentNode}}d=d.return}So(function(){var ne=b,fe=Yt(o),xe=[];e:{var ae=Bx.get(n);if(ae!==void 0){var re=Di,Pe=n;switch(n){case"keypress":if(oi(o)===0)break e;case"keydown":case"keyup":re=Zc;break;case"focusin":Pe="focus",re=sn;break;case"focusout":Pe="blur",re=sn;break;case"beforeblur":case"afterblur":re=sn;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=Kn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=pt;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=rp;break;case zx:case Px:case $x:re=An;break;case Ux:re=No;break;case"scroll":case"scrollend":re=W;break;case"wheel":re=Jc;break;case"copy":case"cut":case"paste":re=Se;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=cl;break;case"toggle":case"beforetoggle":re=ul}var tt=(i&4)!==0,on=!tt&&(n==="scroll"||n==="scrollend"),G=tt?ae!==null?ae+"Capture":null:ae;tt=[];for(var H=ne,te;H!==null;){var pe=H;if(te=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||te===null||G===null||(pe=li(H,G),pe!=null&&tt.push(tc(H,pe,te))),on)break;H=H.return}0<tt.length&&(ae=new re(ae,Pe,null,o,fe),xe.push({event:ae,listeners:tt}))}}if((i&7)===0){e:{if(ae=n==="mouseover"||n==="pointerover",re=n==="mouseout"||n==="pointerout",ae&&o!==la&&(Pe=o.relatedTarget||o.fromElement)&&(ha(Pe)||Pe[za]))break e;if((re||ae)&&(ae=fe.window===fe?fe:(ae=fe.ownerDocument)?ae.defaultView||ae.parentWindow:window,re?(Pe=o.relatedTarget||o.toElement,re=ne,Pe=Pe?ha(Pe):null,Pe!==null&&(on=p(Pe),tt=Pe.tag,Pe!==on||tt!==5&&tt!==27&&tt!==6)&&(Pe=null)):(re=null,Pe=ne),re!==Pe)){if(tt=Kn,pe="onMouseLeave",G="onMouseEnter",H="mouse",(n==="pointerout"||n==="pointerover")&&(tt=cl,pe="onPointerLeave",G="onPointerEnter",H="pointer"),on=re==null?ae:Gn(re),te=Pe==null?ae:Gn(Pe),ae=new tt(pe,H+"leave",re,o,fe),ae.target=on,ae.relatedTarget=te,pe=null,ha(fe)===ne&&(tt=new tt(G,H+"enter",Pe,o,fe),tt.target=te,tt.relatedTarget=on,pe=tt),on=pe,re&&Pe)t:{for(tt=R_,G=re,H=Pe,te=0,pe=G;pe;pe=tt(pe))te++;pe=0;for(var Qe=H;Qe;Qe=tt(Qe))pe++;for(;0<te-pe;)G=tt(G),te--;for(;0<pe-te;)H=tt(H),pe--;for(;te--;){if(G===H||H!==null&&G===H.alternate){tt=G;break t}G=tt(G),H=tt(H)}tt=null}else tt=null;re!==null&&ly(xe,ae,re,tt,!1),Pe!==null&&on!==null&&ly(xe,on,Pe,tt,!0)}}e:{if(ae=ne?Gn(ne):window,re=ae.nodeName&&ae.nodeName.toLowerCase(),re==="select"||re==="input"&&ae.type==="file")var $t=Ea;else if(au(ae))if(iu)$t=K2;else{$t=U2;var Ke=$2}else re=ae.nodeName,!re||re.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?ne&&Bn(ne.elementType)&&($t=Ea):$t=B2;if($t&&($t=$t(n,ne))){_o(xe,$t,o,fe);break e}Ke&&Ke(n,ae,ne),n==="focusout"&&ne&&ae.type==="number"&&ne.memoizedProps.value!=null&&Z(ae,"number",ae.value)}switch(Ke=ne?Gn(ne):window,n){case"focusin":(au(Ke)||Ke.contentEditable==="true")&&(gl=Ke,up=ne,Io=null);break;case"focusout":Io=up=gl=null;break;case"mousedown":dp=!0;break;case"contextmenu":case"mouseup":case"dragend":dp=!1,Ox(xe,o,fe);break;case"selectionchange":if(F2)break;case"keydown":case"keyup":Ox(xe,o,fe)}var ft;if(fl)e:{switch(n){case"compositionstart":var Nt="onCompositionStart";break e;case"compositionend":Nt="onCompositionEnd";break e;case"compositionupdate":Nt="onCompositionUpdate";break e}Nt=void 0}else os?nu(n,o)&&(Nt="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(Nt="onCompositionStart");Nt&&(pl&&o.locale!=="ko"&&(os||Nt!=="onCompositionStart"?Nt==="onCompositionEnd"&&os&&(ft=br()):(Ss=fe,il="value"in Ss?Ss.value:Ss.textContent,os=!0)),Ke=Wu(ne,Nt),0<Ke.length&&(Nt=new Hs(Nt,n,null,o,fe),xe.push({event:Nt,listeners:Ke}),ft?Nt.data=ft:(ft=ml(o),ft!==null&&(Nt.data=ft)))),(ft=ui?Co(n,o):lp(n,o))&&(Nt=Wu(ne,"onBeforeInput"),0<Nt.length&&(Ke=new Hs("onBeforeInput","beforeinput",null,o,fe),xe.push({event:Ke,listeners:Nt}),Ke.data=ft)),I_(xe,n,ne,o,fe)}sy(xe,i)})}r(Dm,"dispatchEventForPluginEventSystem");function tc(n,i,o){return{instance:n,listener:i,currentTarget:o}}r(tc,"createDispatchListener");function Wu(n,i){for(var o=i+"Capture",d=[];n!==null;){var m=n,b=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||b===null||(m=li(n,o),m!=null&&d.unshift(tc(n,m,b)),m=li(n,i),m!=null&&d.push(tc(n,m,b))),n.tag===3)return d;n=n.return}return[]}r(Wu,"accumulateTwoPhaseListeners");function R_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}r(R_,"getParent");function ly(n,i,o,d,m){for(var b=i._reactName,w=[];o!==null&&o!==d;){var T=o,q=T.alternate,ne=T.stateNode;if(T=T.tag,q!==null&&q===d)break;T!==5&&T!==26&&T!==27||ne===null||(q=ne,m?(ne=li(o,b),ne!=null&&w.unshift(tc(o,ne,q))):m||(ne=li(o,b),ne!=null&&w.push(tc(o,ne,q)))),o=o.return}w.length!==0&&n.push({event:i,listeners:w})}r(ly,"accumulateEnterLeaveListenersForEvent");var M_=/\r\n?/g,D_=/\u0000|\uFFFD/g;function oy(n){return(typeof n=="string"?n:""+n).replace(M_,`
|
|
67
|
+
`).replace(D_,"")}r(oy,"normalizeMarkupForTextOrAttribute");function cy(n,i){return i=oy(i),oy(n)===i}r(cy,"checkForUnmatchedText");function ln(n,i,o,d,m,b){switch(o){case"children":typeof d=="string"?i==="body"||i==="textarea"&&d===""||st(n,d):(typeof d=="number"||typeof d=="bigint")&&i!=="body"&&st(n,""+d);break;case"className":$a(n,"class",d);break;case"tabIndex":$a(n,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":$a(n,o,d);break;case"style":bn(n,d,b);break;case"data":if(i!=="object"){$a(n,"data",d);break}case"src":case"href":if(d===""&&(i!=="a"||o!=="href")){n.removeAttribute(o);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){n.removeAttribute(o);break}d=Cn(""+d),n.setAttribute(o,d);break;case"action":case"formAction":if(typeof d=="function"){n.setAttribute(o,"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 b=="function"&&(o==="formAction"?(i!=="input"&&ln(n,i,"name",m.name,m,null),ln(n,i,"formEncType",m.formEncType,m,null),ln(n,i,"formMethod",m.formMethod,m,null),ln(n,i,"formTarget",m.formTarget,m,null)):(ln(n,i,"encType",m.encType,m,null),ln(n,i,"method",m.method,m,null),ln(n,i,"target",m.target,m,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){n.removeAttribute(o);break}d=Cn(""+d),n.setAttribute(o,d);break;case"onClick":d!=null&&(n.onclick=jt);break;case"onScroll":d!=null&&kt("scroll",n);break;case"onScrollEnd":d!=null&&kt("scrollend",n);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(c(61));if(o=d.__html,o!=null){if(m.children!=null)throw Error(c(60));n.innerHTML=o}}break;case"multiple":n.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":n.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){n.removeAttribute("xlink:href");break}o=Cn(""+d),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?n.setAttribute(o,""+d):n.removeAttribute(o);break;case"inert":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":d&&typeof d!="function"&&typeof d!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":d===!0?n.setAttribute(o,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?n.setAttribute(o,d):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?n.setAttribute(o,d):n.removeAttribute(o);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?n.removeAttribute(o):n.setAttribute(o,d);break;case"popover":kt("beforetoggle",n),kt("toggle",n),Na(n,"popover",d);break;case"xlinkActuate":ht(n,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":ht(n,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":ht(n,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":ht(n,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":ht(n,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":ht(n,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":ht(n,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":ht(n,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":ht(n,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Na(n,"is",d);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=Qa.get(o)||o,Na(n,o,d))}}r(ln,"setProp");function Om(n,i,o,d,m,b){switch(o){case"style":bn(n,d,b);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(c(61));if(o=d.__html,o!=null){if(m.children!=null)throw Error(c(60));n.innerHTML=o}}break;case"children":typeof d=="string"?st(n,d):(typeof d=="number"||typeof d=="bigint")&&st(n,""+d);break;case"onScroll":d!=null&&kt("scroll",n);break;case"onScrollEnd":d!=null&&kt("scrollend",n);break;case"onClick":d!=null&&(n.onclick=jt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Sa.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(m=o.endsWith("Capture"),i=o.slice(2,m?o.length-7:void 0),b=n[dn]||null,b=b!=null?b[o]:null,typeof b=="function"&&n.removeEventListener(i,b,m),typeof d=="function")){typeof b!="function"&&b!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(i,d,m);break e}o in n?n[o]=d:d===!0?n.setAttribute(o,""):Na(n,o,d)}}}r(Om,"setPropOnCustomElement");function da(n,i,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":kt("error",n),kt("load",n);var d=!1,m=!1,b;for(b in o)if(o.hasOwnProperty(b)){var w=o[b];if(w!=null)switch(b){case"src":d=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,i));default:ln(n,i,b,w,o,null)}}m&&ln(n,i,"srcSet",o.srcSet,o,null),d&&ln(n,i,"src",o.src,o,null);return;case"input":kt("invalid",n);var T=b=w=m=null,q=null,ne=null;for(d in o)if(o.hasOwnProperty(d)){var fe=o[d];if(fe!=null)switch(d){case"name":m=fe;break;case"type":w=fe;break;case"checked":q=fe;break;case"defaultChecked":ne=fe;break;case"value":b=fe;break;case"defaultValue":T=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(c(137,i));break;default:ln(n,i,d,fe,o,null)}}Qt(n,b,T,q,ne,w,m,!1);return;case"select":kt("invalid",n),d=w=b=null;for(m in o)if(o.hasOwnProperty(m)&&(T=o[m],T!=null))switch(m){case"value":b=T;break;case"defaultValue":w=T;break;case"multiple":d=T;default:ln(n,i,m,T,o,null)}i=b,o=w,n.multiple=!!d,i!=null?Ne(n,!!d,i,!1):o!=null&&Ne(n,!!d,o,!0);return;case"textarea":kt("invalid",n),b=m=d=null;for(w in o)if(o.hasOwnProperty(w)&&(T=o[w],T!=null))switch(w){case"value":d=T;break;case"defaultValue":m=T;break;case"children":b=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(c(91));break;default:ln(n,i,w,T,o,null)}Le(n,d,m,b);return;case"option":for(q in o)o.hasOwnProperty(q)&&(d=o[q],d!=null)&&(q==="selected"?n.selected=d&&typeof d!="function"&&typeof d!="symbol":ln(n,i,q,d,o,null));return;case"dialog":kt("beforetoggle",n),kt("toggle",n),kt("cancel",n),kt("close",n);break;case"iframe":case"object":kt("load",n);break;case"video":case"audio":for(d=0;d<ec.length;d++)kt(ec[d],n);break;case"image":kt("error",n),kt("load",n);break;case"details":kt("toggle",n);break;case"embed":case"source":case"link":kt("error",n),kt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ne in o)if(o.hasOwnProperty(ne)&&(d=o[ne],d!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,i));default:ln(n,i,ne,d,o,null)}return;default:if(Bn(i)){for(fe in o)o.hasOwnProperty(fe)&&(d=o[fe],d!==void 0&&Om(n,i,fe,d,o,void 0));return}}for(T in o)o.hasOwnProperty(T)&&(d=o[T],d!=null&&ln(n,i,T,d,o,null))}r(da,"setInitialProperties");function O_(n,i,o,d){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,b=null,w=null,T=null,q=null,ne=null,fe=null;for(re in o){var xe=o[re];if(o.hasOwnProperty(re)&&xe!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":q=xe;default:d.hasOwnProperty(re)||ln(n,i,re,null,d,xe)}}for(var ae in d){var re=d[ae];if(xe=o[ae],d.hasOwnProperty(ae)&&(re!=null||xe!=null))switch(ae){case"type":b=re;break;case"name":m=re;break;case"checked":ne=re;break;case"defaultChecked":fe=re;break;case"value":w=re;break;case"defaultValue":T=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(c(137,i));break;default:re!==xe&&ln(n,i,ae,re,d,xe)}}zt(n,w,T,q,ne,fe,b,m);return;case"select":re=w=T=ae=null;for(b in o)if(q=o[b],o.hasOwnProperty(b)&&q!=null)switch(b){case"value":break;case"multiple":re=q;default:d.hasOwnProperty(b)||ln(n,i,b,null,d,q)}for(m in d)if(b=d[m],q=o[m],d.hasOwnProperty(m)&&(b!=null||q!=null))switch(m){case"value":ae=b;break;case"defaultValue":T=b;break;case"multiple":w=b;default:b!==q&&ln(n,i,m,b,d,q)}i=T,o=w,d=re,ae!=null?Ne(n,!!o,ae,!1):!!d!=!!o&&(i!=null?Ne(n,!!o,i,!0):Ne(n,!!o,o?[]:"",!1));return;case"textarea":re=ae=null;for(T in o)if(m=o[T],o.hasOwnProperty(T)&&m!=null&&!d.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:ln(n,i,T,null,d,m)}for(w in d)if(m=d[w],b=o[w],d.hasOwnProperty(w)&&(m!=null||b!=null))switch(w){case"value":ae=m;break;case"defaultValue":re=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(c(91));break;default:m!==b&&ln(n,i,w,m,d,b)}Be(n,ae,re);return;case"option":for(var Pe in o)ae=o[Pe],o.hasOwnProperty(Pe)&&ae!=null&&!d.hasOwnProperty(Pe)&&(Pe==="selected"?n.selected=!1:ln(n,i,Pe,null,d,ae));for(q in d)ae=d[q],re=o[q],d.hasOwnProperty(q)&&ae!==re&&(ae!=null||re!=null)&&(q==="selected"?n.selected=ae&&typeof ae!="function"&&typeof ae!="symbol":ln(n,i,q,ae,d,re));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 tt in o)ae=o[tt],o.hasOwnProperty(tt)&&ae!=null&&!d.hasOwnProperty(tt)&&ln(n,i,tt,null,d,ae);for(ne in d)if(ae=d[ne],re=o[ne],d.hasOwnProperty(ne)&&ae!==re&&(ae!=null||re!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(c(137,i));break;default:ln(n,i,ne,ae,d,re)}return;default:if(Bn(i)){for(var on in o)ae=o[on],o.hasOwnProperty(on)&&ae!==void 0&&!d.hasOwnProperty(on)&&Om(n,i,on,void 0,d,ae);for(fe in d)ae=d[fe],re=o[fe],!d.hasOwnProperty(fe)||ae===re||ae===void 0&&re===void 0||Om(n,i,fe,ae,d,re);return}}for(var G in o)ae=o[G],o.hasOwnProperty(G)&&ae!=null&&!d.hasOwnProperty(G)&&ln(n,i,G,null,d,ae);for(xe in d)ae=d[xe],re=o[xe],!d.hasOwnProperty(xe)||ae===re||ae==null&&re==null||ln(n,i,xe,ae,d,re)}r(O_,"updateProperties");function uy(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}r(uy,"isLikelyStaticResource");function L_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,o=performance.getEntriesByType("resource"),d=0;d<o.length;d++){var m=o[d],b=m.transferSize,w=m.initiatorType,T=m.duration;if(b&&T&&uy(w)){for(w=0,T=m.responseEnd,d+=1;d<o.length;d++){var q=o[d],ne=q.startTime;if(ne>T)break;var fe=q.transferSize,xe=q.initiatorType;fe&&uy(xe)&&(q=q.responseEnd,w+=fe*(q<T?1:(T-ne)/(q-ne)))}if(--d,i+=8*(b+w)/(m.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}r(L_,"estimateBandwidth");var Lm=null,zm=null;function Qu(n){return n.nodeType===9?n:n.ownerDocument}r(Qu,"getOwnerDocumentFromRootContainer");function dy(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}r(dy,"getOwnHostContext");function fy(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}r(fy,"getChildHostContextProd");function Pm(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}r(Pm,"shouldSetTextContent");var $m=null;function z_(){var n=window.event;return n&&n.type==="popstate"?n===$m?!1:($m=n,!0):($m=null,!1)}r(z_,"shouldAttemptEagerTransition");var py=typeof setTimeout=="function"?setTimeout:void 0,P_=typeof clearTimeout=="function"?clearTimeout:void 0,my=typeof Promise=="function"?Promise:void 0,$_=typeof queueMicrotask=="function"?queueMicrotask:typeof my<"u"?function(n){return my.resolve(null).then(n).catch(U_)}:py;function U_(n){setTimeout(function(){throw n})}r(U_,"handleErrorInNextTick");function Yi(n){return n==="head"}r(Yi,"isSingletonScope");function hy(n,i){var o=i,d=0;do{var m=o.nextSibling;if(n.removeChild(o),m&&m.nodeType===8)if(o=m.data,o==="/$"||o==="/&"){if(d===0){n.removeChild(m),ql(i);return}d--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")d++;else if(o==="html")nc(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,nc(o);for(var b=o.firstChild;b;){var w=b.nextSibling,T=b.nodeName;b[ra]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&b.rel.toLowerCase()==="stylesheet"||o.removeChild(b),b=w}}else o==="body"&&nc(n.ownerDocument.body);o=m}while(o);ql(i)}r(hy,"clearHydrationBoundary");function gy(n,i){var o=n;n=0;do{var d=o.nextSibling;if(o.nodeType===1?i?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(i?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),d&&d.nodeType===8)if(o=d.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=d}while(o)}r(gy,"hideOrUnhideDehydratedBoundary");function Um(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var o=i;switch(i=i.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Um(o),ma(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}r(Um,"clearContainerSparingly");function B_(n,i,o,d){for(;n.nodeType===1;){var m=o;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!d&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(d){if(!n[ra])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(b=n.getAttribute("rel"),b==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(b!==m.rel||n.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||n.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||n.getAttribute("title")!==(m.title==null?null:m.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(b=n.getAttribute("src"),(b!==(m.src==null?null:m.src)||n.getAttribute("type")!==(m.type==null?null:m.type)||n.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&b&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var b=m.name==null?null:""+m.name;if(m.type==="hidden"&&n.getAttribute("name")===b)return n}else return n;if(n=gs(n.nextSibling),n===null)break}return null}r(B_,"canHydrateInstance");function K_(n,i,o){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=gs(n.nextSibling),n===null))return null;return n}r(K_,"canHydrateTextInstance");function xy(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=gs(n.nextSibling),n===null))return null;return n}r(xy,"canHydrateHydrationBoundary");function Bm(n){return n.data==="$?"||n.data==="$~"}r(Bm,"isSuspenseInstancePending");function Km(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}r(Km,"isSuspenseInstanceFallback");function q_(n,i){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||o.readyState!=="loading")i();else{var d=r(function(){i(),o.removeEventListener("DOMContentLoaded",d)},"listener");o.addEventListener("DOMContentLoaded",d),n._reactRetry=d}}r(q_,"registerSuspenseInstanceRetry");function gs(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return n}r(gs,"getNextHydratable");var qm=null;function by(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(i===0)return gs(n.nextSibling);i--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||i++}n=n.nextSibling}return null}r(by,"getNextHydratableInstanceAfterHydrationBoundary");function vy(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(i===0)return n;i--}else o!=="/$"&&o!=="/&"||i++}n=n.previousSibling}return null}r(vy,"getParentHydrationBoundary");function yy(n,i,o){switch(i=Qu(o),n){case"html":if(n=i.documentElement,!n)throw Error(c(452));return n;case"head":if(n=i.head,!n)throw Error(c(453));return n;case"body":if(n=i.body,!n)throw Error(c(454));return n;default:throw Error(c(451))}}r(yy,"resolveSingletonInstance");function nc(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);ma(n)}r(nc,"releaseSingletonInstance");var xs=new Map,jy=new Set;function Gu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}r(Gu,"getHoistableRoot");var Ci=ee.d;ee.d={f:F_,r:H_,D:V_,C:W_,L:Q_,m:G_,X:X_,S:Y_,M:Z_};function F_(){var n=Ci.f(),i=Uu();return n||i}r(F_,"flushSyncWork");function H_(n){var i=$n(n);i!==null&&i.tag===5&&i.type==="form"?Ub(i):Ci.r(n)}r(H_,"requestFormReset");var Ul=typeof document>"u"?null:document;function wy(n,i,o){var d=Ul;if(d&&typeof i=="string"&&i){var m=We(i);m='link[rel="'+n+'"][href="'+m+'"]',typeof o=="string"&&(m+='[crossorigin="'+o+'"]'),jy.has(m)||(jy.add(m),n={rel:n,crossOrigin:o,href:i},d.querySelector(m)===null&&(i=d.createElement("link"),da(i,"link",n),xn(i),d.head.appendChild(i)))}}r(wy,"preconnectAs");function V_(n){Ci.D(n),wy("dns-prefetch",n,null)}r(V_,"prefetchDNS");function W_(n,i){Ci.C(n,i),wy("preconnect",n,i)}r(W_,"preconnect");function Q_(n,i,o){Ci.L(n,i,o);var d=Ul;if(d&&n&&i){var m='link[rel="preload"][as="'+We(i)+'"]';i==="image"&&o&&o.imageSrcSet?(m+='[imagesrcset="'+We(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(m+='[imagesizes="'+We(o.imageSizes)+'"]')):m+='[href="'+We(n)+'"]';var b=m;switch(i){case"style":b=Bl(n);break;case"script":b=Kl(n)}xs.has(b)||(n=j({rel:"preload",href:i==="image"&&o&&o.imageSrcSet?void 0:n,as:i},o),xs.set(b,n),d.querySelector(m)!==null||i==="style"&&d.querySelector(ac(b))||i==="script"&&d.querySelector(sc(b))||(i=d.createElement("link"),da(i,"link",n),xn(i),d.head.appendChild(i)))}}r(Q_,"preload");function G_(n,i){Ci.m(n,i);var o=Ul;if(o&&n){var d=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+We(d)+'"][href="'+We(n)+'"]',b=m;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Kl(n)}if(!xs.has(b)&&(n=j({rel:"modulepreload",href:n},i),xs.set(b,n),o.querySelector(m)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(sc(b)))return}d=o.createElement("link"),da(d,"link",n),xn(d),o.head.appendChild(d)}}}r(G_,"preloadModule");function Y_(n,i,o){Ci.S(n,i,o);var d=Ul;if(d&&n){var m=Pa(d).hoistableStyles,b=Bl(n);i=i||"default";var w=m.get(b);if(!w){var T={loading:0,preload:null};if(w=d.querySelector(ac(b)))T.loading=5;else{n=j({rel:"stylesheet",href:n,"data-precedence":i},o),(o=xs.get(b))&&Fm(n,o);var q=w=d.createElement("link");xn(q),da(q,"link",n),q._p=new Promise(function(ne,fe){q.onload=ne,q.onerror=fe}),q.addEventListener("load",function(){T.loading|=1}),q.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Yu(w,i,d)}w={type:"stylesheet",instance:w,count:1,state:T},m.set(b,w)}}}r(Y_,"preinitStyle");function X_(n,i){Ci.X(n,i);var o=Ul;if(o&&n){var d=Pa(o).hoistableScripts,m=Kl(n),b=d.get(m);b||(b=o.querySelector(sc(m)),b||(n=j({src:n,async:!0},i),(i=xs.get(m))&&Hm(n,i),b=o.createElement("script"),xn(b),da(b,"link",n),o.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(m,b))}}r(X_,"preinitScript");function Z_(n,i){Ci.M(n,i);var o=Ul;if(o&&n){var d=Pa(o).hoistableScripts,m=Kl(n),b=d.get(m);b||(b=o.querySelector(sc(m)),b||(n=j({src:n,async:!0,type:"module"},i),(i=xs.get(m))&&Hm(n,i),b=o.createElement("script"),xn(b),da(b,"link",n),o.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(m,b))}}r(Z_,"preinitModuleScript");function ky(n,i,o,d){var m=(m=ve.current)?Gu(m):null;if(!m)throw Error(c(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(i=Bl(o.href),o=Pa(m).hoistableStyles,d=o.get(i),d||(d={type:"style",instance:null,count:0,state:null},o.set(i,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=Bl(o.href);var b=Pa(m).hoistableStyles,w=b.get(n);if(w||(m=m.ownerDocument||m,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(n,w),(b=m.querySelector(ac(n)))&&!b._p&&(w.instance=b,w.state.loading=5),xs.has(n)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},xs.set(n,o),b||J_(m,n,o,w.state))),i&&d===null)throw Error(c(528,""));return w}if(i&&d!==null)throw Error(c(529,""));return null;case"script":return i=o.async,o=o.src,typeof o=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Kl(o),o=Pa(m).hoistableScripts,d=o.get(i),d||(d={type:"script",instance:null,count:0,state:null},o.set(i,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,n))}}r(ky,"getResource");function Bl(n){return'href="'+We(n)+'"'}r(Bl,"getStyleKey");function ac(n){return'link[rel="stylesheet"]['+n+"]"}r(ac,"getStylesheetSelectorFromKey");function Sy(n){return j({},n,{"data-precedence":n.precedence,precedence:null})}r(Sy,"stylesheetPropsFromRawProps");function J_(n,i,o,d){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?d.loading=1:(i=n.createElement("link"),d.preload=i,i.addEventListener("load",function(){return d.loading|=1}),i.addEventListener("error",function(){return d.loading|=2}),da(i,"link",o),xn(i),n.head.appendChild(i))}r(J_,"preloadStylesheet");function Kl(n){return'[src="'+We(n)+'"]'}r(Kl,"getScriptKey");function sc(n){return"script[async]"+n}r(sc,"getScriptSelectorFromKey");function Ny(n,i,o){if(i.count++,i.instance===null)switch(i.type){case"style":var d=n.querySelector('style[data-href~="'+We(o.href)+'"]');if(d)return i.instance=d,xn(d),d;var m=j({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return d=(n.ownerDocument||n).createElement("style"),xn(d),da(d,"style",m),Yu(d,o.precedence,n),i.instance=d;case"stylesheet":m=Bl(o.href);var b=n.querySelector(ac(m));if(b)return i.state.loading|=4,i.instance=b,xn(b),b;d=Sy(o),(m=xs.get(m))&&Fm(d,m),b=(n.ownerDocument||n).createElement("link"),xn(b);var w=b;return w._p=new Promise(function(T,q){w.onload=T,w.onerror=q}),da(b,"link",d),i.state.loading|=4,Yu(b,o.precedence,n),i.instance=b;case"script":return b=Kl(o.src),(m=n.querySelector(sc(b)))?(i.instance=m,xn(m),m):(d=o,(m=xs.get(b))&&(d=j({},o),Hm(d,m)),n=n.ownerDocument||n,m=n.createElement("script"),xn(m),da(m,"link",d),n.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(c(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(d=i.instance,i.state.loading|=4,Yu(d,o.precedence,n));return i.instance}r(Ny,"acquireResource");function Yu(n,i,o){for(var d=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=d.length?d[d.length-1]:null,b=m,w=0;w<d.length;w++){var T=d[w];if(T.dataset.precedence===i)b=T;else if(b!==m)break}b?b.parentNode.insertBefore(n,b.nextSibling):(i=o.nodeType===9?o.head:o,i.insertBefore(n,i.firstChild))}r(Yu,"insertStylesheet");function Fm(n,i){n.crossOrigin??=i.crossOrigin,n.referrerPolicy??=i.referrerPolicy,n.title??=i.title}r(Fm,"adoptPreloadPropsForStylesheet");function Hm(n,i){n.crossOrigin??=i.crossOrigin,n.referrerPolicy??=i.referrerPolicy,n.integrity??=i.integrity}r(Hm,"adoptPreloadPropsForScript");var Xu=null;function Cy(n,i,o){if(Xu===null){var d=new Map,m=Xu=new Map;m.set(o,d)}else m=Xu,d=m.get(o),d||(d=new Map,m.set(o,d));if(d.has(n))return d;for(d.set(n,null),o=o.getElementsByTagName(n),m=0;m<o.length;m++){var b=o[m];if(!(b[ra]||b[yt]||n==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var w=b.getAttribute(i)||"";w=n+w;var T=d.get(w);T?T.push(b):d.set(w,[b])}}return d}r(Cy,"getHydratableHoistableCache");function Ay(n,i,o){n=n.ownerDocument||n,n.head.insertBefore(o,i==="title"?n.querySelector("head > title"):null)}r(Ay,"mountHoistable");function eE(n,i,o){if(o===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(n=i.disabled,typeof i.precedence=="string"&&n==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}r(eE,"isHostHoistableType");function _y(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}r(_y,"preloadResource");function tE(n,i,o,d){if(o.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var m=Bl(d.href),b=i.querySelector(ac(m));if(b){i=b._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=Zu.bind(n),i.then(n,n)),o.state.loading|=4,o.instance=b,xn(b);return}b=i.ownerDocument||i,d=Sy(d),(m=xs.get(m))&&Fm(d,m),b=b.createElement("link"),xn(b);var w=b;w._p=new Promise(function(T,q){w.onload=T,w.onerror=q}),da(b,"link",d),o.instance=b}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(o,i),(i=o.state.preload)&&(o.state.loading&3)===0&&(n.count++,o=Zu.bind(n),i.addEventListener("load",o),i.addEventListener("error",o))}}r(tE,"suspendResource");var Vm=0;function nE(n,i){return n.stylesheets&&n.count===0&&ed(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var d=setTimeout(function(){if(n.stylesheets&&ed(n,n.stylesheets),n.unsuspend){var b=n.unsuspend;n.unsuspend=null,b()}},6e4+i);0<n.imgBytes&&Vm===0&&(Vm=62500*L_());var m=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&ed(n,n.stylesheets),n.unsuspend)){var b=n.unsuspend;n.unsuspend=null,b()}},(n.imgBytes>Vm?50:800)+i);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(d),clearTimeout(m)}}:null}r(nE,"waitForCommitToBeReady");function Zu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ed(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}r(Zu,"onUnsuspend");var Ju=null;function ed(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Ju=new Map,i.forEach(aE,n),Ju=null,Zu.call(n))}r(ed,"insertSuspendedStylesheets");function aE(n,i){if(!(i.state.loading&4)){var o=Ju.get(n);if(o)var d=o.get(null);else{o=new Map,Ju.set(n,o);for(var m=n.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<m.length;b++){var w=m[b];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(o.set(w.dataset.precedence,w),d=w)}d&&o.set(null,d)}m=i.instance,w=m.getAttribute("data-precedence"),b=o.get(w)||d,b===d&&o.set(null,m),o.set(w,m),this.count++,d=Zu.bind(this),m.addEventListener("load",d),m.addEventListener("error",d),b?b.parentNode.insertBefore(m,b.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(m,n.firstChild)),i.state.loading|=4}}r(aE,"insertStylesheetIntoRoot");var ic={$$typeof:_,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function sE(n,i,o,d,m,b,w,T,q){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lt(0),this.hiddenUpdates=Lt(null),this.identifierPrefix=d,this.onUncaughtError=m,this.onCaughtError=b,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}r(sE,"FiberRootNode");function iE(n,i,o,d,m,b,w,T,q,ne,fe,xe){return n=new sE(n,i,o,w,q,ne,fe,xe,T),i=1,b===!0&&(i|=24),b=Za(3,null,null,i),n.current=b,b.stateNode=n,i=Cp(),i.refCount++,n.pooledCache=i,i.refCount++,b.memoizedState={element:d,isDehydrated:o,cache:i},Ip(b),n}r(iE,"createFiberRoot");function rE(n){return n?(n=vl,n):vl}r(rE,"getContextForSubtree");function Ey(n,i,o,d,m,b){m=rE(m),d.context===null?d.context=m:d.pendingContext=m,d=Rr(i),d.payload={element:o},b=b===void 0?null:b,b!==null&&(d.callback=b),o=Mr(n,d,i),o!==null&&(Fa(o,n,i),zo(o,n,i))}r(Ey,"updateContainerImpl");function Iy(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<i?o:i}}r(Iy,"markRetryLaneImpl");function Wm(n,i){Iy(n,i),(n=n.alternate)&&Iy(n,i)}r(Wm,"markRetryLaneIfNotHydrated");function Ty(n){if(n.tag===13||n.tag===31){var i=kr(n,67108864);i!==null&&Fa(i,n,67108864),Wm(n,67108864)}}r(Ty,"attemptContinuousHydration");function Ry(n){if(n.tag===13||n.tag===31){var i=hs();i=is(i);var o=kr(n,i);o!==null&&Fa(o,n,i),Wm(n,i)}}r(Ry,"attemptHydrationAtCurrentPriority");var td=!0;function lE(n,i,o,d){var m=A.T;A.T=null;var b=ee.p;try{ee.p=2,Qm(n,i,o,d)}finally{ee.p=b,A.T=m}}r(lE,"dispatchDiscreteEvent");function oE(n,i,o,d){var m=A.T;A.T=null;var b=ee.p;try{ee.p=8,Qm(n,i,o,d)}finally{ee.p=b,A.T=m}}r(oE,"dispatchContinuousEvent");function Qm(n,i,o,d){if(td){var m=Gm(d);if(m===null)Dm(n,i,d,nd,o),Dy(n,d);else if(uE(m,n,i,o,d))d.stopPropagation();else if(Dy(n,d),i&4&&-1<cE.indexOf(n)){for(;m!==null;){var b=$n(m);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var w=lt(b.pendingLanes);if(w!==0){var T=b;for(T.pendingLanes|=2,T.entangledLanes|=2;w;){var q=1<<31-It(w);T.entanglements[1]|=q,w&=~q}Ni(b),(Ft&6)===0&&(Pu=Ye()+500,Jo(0,!1))}}break;case 31:case 13:T=kr(b,2),T!==null&&Fa(T,b,2),Uu(),Wm(b,2)}if(b=Gm(d),b===null&&Dm(n,i,d,nd,o),b===m)break;m=b}m!==null&&d.stopPropagation()}else Dm(n,i,d,null,o)}}r(Qm,"dispatchEvent");function Gm(n){return n=Yt(n),Ym(n)}r(Gm,"findInstanceBlockingEvent");var nd=null;function Ym(n){if(nd=null,n=ha(n),n!==null){var i=p(n);if(i===null)n=null;else{var o=i.tag;if(o===13){if(n=f(i),n!==null)return n;n=null}else if(o===31){if(n=h(i),n!==null)return n;n=null}else if(o===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return nd=n,null}r(Ym,"findInstanceBlockingTarget");function My(n){switch(n){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 2;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 8;case"message":switch(xt()){case at:return 2;case Kt:return 8;case ea:case en:return 32;case Mt:return 268435456;default:return 32}default:return 32}}r(My,"getEventPriority");var Xm=!1,Xi=null,Zi=null,Ji=null,rc=new Map,lc=new Map,er=[],cE="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(" ");function Dy(n,i){switch(n){case"focusin":case"focusout":Xi=null;break;case"dragenter":case"dragleave":Zi=null;break;case"mouseover":case"mouseout":Ji=null;break;case"pointerover":case"pointerout":rc.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":lc.delete(i.pointerId)}}r(Dy,"clearIfContinuousEvent");function oc(n,i,o,d,m,b){return n===null||n.nativeEvent!==b?(n={blockedOn:i,domEventName:o,eventSystemFlags:d,nativeEvent:b,targetContainers:[m]},i!==null&&(i=$n(i),i!==null&&Ty(i)),n):(n.eventSystemFlags|=d,i=n.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),n)}r(oc,"accumulateOrCreateContinuousQueuedReplayableEvent");function uE(n,i,o,d,m){switch(i){case"focusin":return Xi=oc(Xi,n,i,o,d,m),!0;case"dragenter":return Zi=oc(Zi,n,i,o,d,m),!0;case"mouseover":return Ji=oc(Ji,n,i,o,d,m),!0;case"pointerover":var b=m.pointerId;return rc.set(b,oc(rc.get(b)||null,n,i,o,d,m)),!0;case"gotpointercapture":return b=m.pointerId,lc.set(b,oc(lc.get(b)||null,n,i,o,d,m)),!0}return!1}r(uE,"queueIfContinuousEvent");function Oy(n){var i=ha(n.target);if(i!==null){var o=p(i);if(o!==null){if(i=o.tag,i===13){if(i=f(o),i!==null){n.blockedOn=i,ka(n.priority,function(){Ry(o)});return}}else if(i===31){if(i=h(o),i!==null){n.blockedOn=i,ka(n.priority,function(){Ry(o)});return}}else if(i===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}r(Oy,"attemptExplicitHydrationTarget");function ad(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var o=Gm(n.nativeEvent);if(o===null){o=n.nativeEvent;var d=new o.constructor(o.type,o);la=d,o.target.dispatchEvent(d),la=null}else return i=$n(o),i!==null&&Ty(i),n.blockedOn=o,!1;i.shift()}return!0}r(ad,"attemptReplayContinuousQueuedEvent");function Ly(n,i,o){ad(n)&&o.delete(i)}r(Ly,"attemptReplayContinuousQueuedEventInMap");function dE(){Xm=!1,Xi!==null&&ad(Xi)&&(Xi=null),Zi!==null&&ad(Zi)&&(Zi=null),Ji!==null&&ad(Ji)&&(Ji=null),rc.forEach(Ly),lc.forEach(Ly)}r(dE,"replayUnblockedEvents");function sd(n,i){n.blockedOn===i&&(n.blockedOn=null,Xm||(Xm=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,dE)))}r(sd,"scheduleCallbackIfUnblocked");var id=null;function zy(n){id!==n&&(id=n,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){id===n&&(id=null);for(var i=0;i<n.length;i+=3){var o=n[i],d=n[i+1],m=n[i+2];if(typeof d!="function"){if(Ym(d||o)===null)continue;break}var b=$n(o);b!==null&&(n.splice(i,3),i-=3,Yp(b,{pending:!0,data:m,method:o.method,action:d},d,m))}}))}r(zy,"scheduleReplayQueueIfNeeded");function ql(n){function i(q){return sd(q,n)}r(i,"unblock"),Xi!==null&&sd(Xi,n),Zi!==null&&sd(Zi,n),Ji!==null&&sd(Ji,n),rc.forEach(i),lc.forEach(i);for(var o=0;o<er.length;o++){var d=er[o];d.blockedOn===n&&(d.blockedOn=null)}for(;0<er.length&&(o=er[0],o.blockedOn===null);)Oy(o),o.blockedOn===null&&er.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(d=0;d<o.length;d+=3){var m=o[d],b=o[d+1],w=m[dn]||null;if(typeof b=="function")w||zy(o);else if(w){var T=null;if(b&&b.hasAttribute("formAction")){if(m=b,w=b[dn]||null)T=w.formAction;else if(Ym(m)!==null)continue}else T=w.action;typeof T=="function"?o[d+1]=T:(o.splice(d,3),d-=3),zy(o)}}}r(ql,"retryIfBlockedOn");function fE(){function n(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:r(function(){return new Promise(function(w){return m=w})},"handler"),focusReset:"manual",scroll:"manual"})}r(n,"handleNavigate");function i(){m!==null&&(m(),m=null),d||setTimeout(o,20)}r(i,"handleNavigateComplete");function o(){if(!d&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(r(o,"startFakeNavigation"),typeof navigation=="object"){var d=!1,m=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(o,100),function(){d=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}r(fE,"defaultOnDefaultTransitionIndicator");function Zm(n){this._internalRoot=n}r(Zm,"ReactDOMRoot"),Jm.prototype.render=Zm.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(c(409));var o=i.current;Ey(o,hs(),n,i,null,null)},Jm.prototype.unmount=Zm.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;Ey(n.current,2,null,n,null,null),Uu(),i[za]=null}};function Jm(n){this._internalRoot=n}r(Jm,"ReactDOMHydrationRoot"),Jm.prototype.unstable_scheduleHydration=function(n){if(n){var i=wa();n={blockedOn:null,target:n,priority:i};for(var o=0;o<er.length&&i!==0&&i<er[o].priority;o++);er.splice(o,0,n),o===0&&Oy(n)}};var Py=s.version;if(Py!=="19.2.8")throw Error(c(527,Py,"19.2.8"));ee.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(c(188)):(n=Object.keys(n).join(","),Error(c(268,n)));return n=v(i),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var pE={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rd.isDisabled&&rd.supportsFiber)try{On=rd.inject(pE),mt=rd}catch{}}e.createRoot=function(n,i){if(!u(n))throw Error(c(299));var o=!1,d="",m=o_,b=c_,w=u_;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(b=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError)),i=iE(n,1,!1,null,null,o,d,null,m,b,w,fE),n[za]=i.current,iy(n),new Zm(i)}})),zH=go(((e,t)=>{function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch{}}r(s,"checkDCE"),s(),t.exports=LH()})),PH=zH();function $H(e,t,s=PH.createRoot){const l=e;if(l.__wardmoteReactRoot)return l.__wardmoteReactRoot;const c=s(t);return l.__wardmoteReactRoot=c,c}r($H,"getOrCreateWardmoteReactRoot");function UH(e){return(e.split("/").pop()??"").replace(/\.js$/,"").replace(/[^A-Za-z0-9_-]/g,"-")||"build"}r(UH,"serviceWorkerBuildIdFromFileName");TH(x,Zl);MH();c8();h8();window.addEventListener("load",()=>{D7({pageBuildId:UH(new URL(import.meta.url).pathname)})});var BH=new _f({defaultOptions:{queries:{staleTime:3e4,gcTime:3e5,refetchOnWindowFocus:!0,networkMode:"offlineFirst"},mutations:{networkMode:"always"}}});function KH({children:e}){const{selectedCompany:t}=bt();return(0,a.jsx)(kT,{companyName:t?.name??null,children:e})}r(KH,"CompanyAwareBreadcrumbProvider");var P2=document.getElementById("root");if(!P2)throw new Error("Wardmote root element is missing");$H(window,P2).render((0,a.jsx)(x.StrictMode,{children:(0,a.jsx)(yK,{children:(0,a.jsxs)($E,{client:BH,children:[(0,a.jsx)(jK,{}),(0,a.jsx)(QT,{children:(0,a.jsx)(PE,{children:(0,a.jsx)(aI,{children:(0,a.jsx)(TI,{children:(0,a.jsx)(Q3,{children:(0,a.jsx)(K7,{children:(0,a.jsxs)(k7,{children:[(0,a.jsx)(N7,{}),(0,a.jsx)(U7,{}),(0,a.jsx)(F3,{children:(0,a.jsx)(KH,{children:(0,a.jsx)($3,{children:(0,a.jsx)(Sz,{children:(0,a.jsx)(DO,{children:(0,a.jsx)(m5,{children:(0,a.jsx)(vK,{})})})})})})})]})})})})})})})]})})}));export{WY as $,b1 as $a,aC as $i,uA as $n,HG as $r,CY as $t,X9 as A,LR as Aa,bG as Ai,uY as An,ZG as Ar,cq as At,Kd as B,Uf as Ba,PG as Bi,gY as Bn,cx as Br,HK as Bt,iF as C,xG as Ca,hO as Ci,vY as Cn,tY as Cr,t0 as Ct,qk as D,yN as Da,sf as Di,I$ as Dn,Kz as Dr,OY as Dt,eF as E,UR as Ea,qG as Ei,Sw as En,Jf as Er,Jg as Et,ZY as F,H0 as Fa,AG as Fi,u$ as Fn,Az as Fr,IY as Ft,y9 as G,yR as Ga,yG as Gi,o$ as Gn,jc as Gr,h6 as Gt,D9 as H,P1 as Ha,nO as Hi,fA as Hn,YG as Hr,J6 as Ht,JY as I,ER as Ia,Y5 as Ii,pY as In,_z as Ir,wx as It,o0 as J,xR as Ja,SG as Ji,GP as Jn,QG as Jr,c6 as Jt,x2 as K,vR as Ka,wG as Ki,n$ as Kn,uz as Kr,Ww as Kt,j2 as L,F0 as La,tO as Li,xY as Ln,Cz as Lr,YK as Lt,F9 as M,cN as Ma,$G as Mi,hY as Mn,Oz as Mr,TY as Mt,K9 as N,RR as Na,BG as Ni,fY as Nn,Mz as Nr,oq as Nt,J9 as O,$R as Oa,JN as Oi,mA as On,eY as Or,uq as Ot,eX as P,TR as Pa,zG as Pi,f$ as Pn,Nz as Pr,rq as Pt,QY as Q,j1 as Qa,OG as Qi,mf as Qn,XC as Qr,ko as Qt,L9 as R,Z1 as Ra,_G as Ri,mY as Rn,sw as Rr,GK as Rt,cF as S,gG as Sa,uC as Si,$$ as Sn,uo as Sr,zY as St,tF as T,Ce as Ta,gO as Ti,D$ as Tn,rA as Tr,MY as Tt,M9 as U,O1 as Ua,Tj as Ui,l$ as Un,bz as Ur,G6 as Ut,b2 as V,kR as Va,LG as Vi,oY as Vn,yz as Vr,RA as Vt,Bk as W,jR as Wa,MG as Wi,cY as Wn,GG as Wr,k6 as Wt,c9 as X,pR as Xa,nC as Xi,lY as Xn,WG as Xr,EY as Xt,Gl as Y,gR as Ya,X5 as Yi,dA as Yn,fz as Yr,dr as Yt,FY as Z,bg as Za,TG as Zi,Mg as Zn,sz as Zr,Hg as Zt,iX as _,x5 as _a,xC as _i,xA as _n,sA as _r,i0 as _t,lX as a,CG as aa,VC as ai,d8 as an,nR as ao,UP as ar,h2 as at,pF as b,Us as ba,J0 as bi,K$ as bn,Tg as br,GA as bt,IF as c,F5 as ca,rx as ci,NA as cn,LP as cr,J7 as ct,rX as d,O5 as da,lx as di,t8 as dn,iY as dr,W7 as dt,jG as ea,tz as ei,AY as en,h1 as eo,$d as er,GY as et,aX as f,UN as fa,PC as fi,JU as fn,sY as fr,UY as ft,_2 as g,Q0 as ga,Yf as gi,wY as gn,hP as gr,$Y as gt,gF as h,PN as ha,tx as hi,kY as hn,aA as hr,BY as ht,Dd as i,RG as ia,W4 as ii,z8 as in,tG as io,$P as ir,HY as it,Nf as j,DR as ja,UG as ji,pA as jn,XG as jr,RY as jt,Y9 as k,zR as ka,vG as ki,dY as kn,JG as kr,DY as kt,f0 as l,VN as la,ix as li,SY as ln,OP as lr,Y7 as lt,sX as m,ON as ma,o4 as mi,kA as mn,IP as mr,F7 as mt,oX as n,IG as na,FG as ni,P8 as nn,ij as no,FP as nr,VY as nt,RF as o,DG as oa,FC as oi,Kg as on,qP as or,n9 as ot,nX as p,LN as pa,sx as pi,XU as pn,ep as pr,d2 as pt,mo as q,bR as qa,EG as qi,YP as qn,dz as qr,p6 as qt,dH as r,NG as ra,Z4 as ri,L8 as rn,lR as ro,oA as rr,YY as rt,MF as s,KG as sa,ox as si,NY as sn,Rg as sr,qY as st,hH as t,kG as ta,VG as ti,_Y as tn,q0 as to,Ur as tr,XY as tt,_F as u,q5 as ua,k4 as ui,e8 as un,rY as ur,KY as ut,hF as v,g5 as va,LC as vi,jY as vn,pw as vr,PY as vt,tX as w,qf as wa,Y0 as wi,yY as wn,aY as wr,hq as wt,Hk as x,Ff as xa,ni as xi,U$ as xn,nY as xr,LY as xt,mF as y,h5 as ya,Mc as yi,aU as yn,mw as yr,Zr as yt,Uk as z,yg as za,uO as zi,bY as zn,Ez as zr,VK as zt};
|