@tickernelz/wardmote-ui 2026.1117.2 → 2026.1117.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (827) hide show
  1. package/dist/assets/AccessSelectIdentity-C-iVX_EX.js +1 -0
  2. package/dist/assets/AdapterManager-C59AKY0f.js +1 -0
  3. package/dist/assets/AdvancedToolsRoute-Bg4KowJU.js +39 -0
  4. package/dist/assets/AgentActionButtons-BBhJXLbY.js +1 -0
  5. package/dist/assets/AgentAvatar-BZiiDlCN.js +1 -0
  6. package/dist/assets/AgentBubbleActionRow-Dqrx638X.js +1 -0
  7. package/dist/assets/AgentCharacter-DAAMv7-c.js +2 -0
  8. package/dist/assets/AgentChat--rcr73Ls.js +1 -0
  9. package/dist/assets/AgentChats-56CMlXmb.js +1 -0
  10. package/dist/assets/AgentDefaults-C0WFwQky.js +1 -0
  11. package/dist/assets/AgentDetail-NfA1gamX.js +38 -0
  12. package/dist/assets/AgentIconPicker-BJerBmcL.js +1 -0
  13. package/dist/assets/AgentIdentity-DBHRFgMM.js +1 -0
  14. package/dist/assets/AgentMailCredentialField-DNclWIul.js +1 -0
  15. package/dist/assets/AgentMultiSelect-BlUaNdZZ.js +1 -0
  16. package/dist/assets/AgentRoleEditor-DnibPmmw.js +1 -0
  17. package/dist/assets/AgentSetupPrompt-CaafK5_w.js +30 -0
  18. package/dist/assets/AgentTodoCard-CGUyYht3.js +1 -0
  19. package/dist/assets/Agents-BjPLaL-p.js +3 -0
  20. package/dist/assets/AppDetail-CwyYWsvw.js +8 -0
  21. package/dist/assets/AppLogo-BLq8BpKi.js +1 -0
  22. package/dist/assets/AppNotConnected-DzDZR0-8.js +1 -0
  23. package/dist/assets/ApprovalCard-DyxP9tMM.js +1 -0
  24. package/dist/assets/ApprovalDetail-Cxhx_U0d.js +1 -0
  25. package/dist/assets/ApprovalPayload-C7jnoOLa.js +1 -0
  26. package/dist/assets/Approvals-CF4K0bD1.js +1 -0
  27. package/dist/assets/AppsConnect-D7l2xnv-.js +1 -0
  28. package/dist/assets/AppsReview-Chv6Jms5.js +1 -0
  29. package/dist/assets/ArtifactCard-CAlD_gkp.js +1 -0
  30. package/dist/assets/Artifacts-47GmGXVx.js +1 -0
  31. package/dist/assets/AssistantConnection-BCrEgmJR.js +1 -0
  32. package/dist/assets/AttentionInteractionResolver-DUg8FwhJ.js +1 -0
  33. package/dist/assets/AuditHub-DNmGrEzV.js +1 -0
  34. package/dist/assets/Auth-D0lGuVnd.js +3 -0
  35. package/dist/assets/BoardChat-BenJSqr6.js +18 -0
  36. package/dist/assets/BoardClaim-CbYY66Qd.js +1 -0
  37. package/dist/assets/BootstrapSetupUxLab-DO03bmwI.js +1 -0
  38. package/dist/assets/BreadcrumbContext-DNbB7zWn.js +1 -0
  39. package/dist/assets/Browse-gMVDtSCz.js +1 -0
  40. package/dist/assets/BudgetPolicyCard-CbkwslmQ.js +1 -0
  41. package/dist/assets/CaseDetail-k79_F25A.js +2 -0
  42. package/dist/assets/CaseIdentifierKey-CIGzqAfo.js +1 -0
  43. package/dist/assets/Cases-C5IE_YuB.js +2 -0
  44. package/dist/assets/ChatEndpointDetail-DPiCCvto.js +5 -0
  45. package/dist/assets/ChatEndpointSetup-CTntfzjg.js +1 -0
  46. package/dist/assets/ChatIdentityConfirm-Dc4AnYX8.js +1 -0
  47. package/dist/assets/ChoiceControls-CzMMk2Iy.js +1 -0
  48. package/dist/assets/CliAuth-CatEsBxW.js +1 -0
  49. package/dist/assets/CommentAttributionChip-BdllZVtJ.js +1 -0
  50. package/dist/assets/Companies-Cr0mZy2B.js +1 -0
  51. package/dist/assets/CompanyAccess-BQZD0MZf.js +1 -0
  52. package/dist/assets/CompanyActivity-BhNtXl8c.js +1 -0
  53. package/dist/assets/CompanyConnections-BwCkXXZK.js +1 -0
  54. package/dist/assets/CompanyContext-fQCNWI_f.js +1 -0
  55. package/dist/assets/CompanyEnvironments-CyrghjsN.js +3 -0
  56. package/dist/assets/CompanyExport-BlQuIvDU.js +4 -0
  57. package/dist/assets/CompanyImport-5M7yWHR-.js +1 -0
  58. package/dist/assets/CompanySettings-C6FNik3j.js +1 -0
  59. package/dist/assets/CompanySettingsPluginPage-DPHNF4sp.js +1 -0
  60. package/dist/assets/CompanySkills-DsgjKlp7.js +10 -0
  61. package/dist/assets/ComposerAddMenu-BPPkbm0o.js +3 -0
  62. package/dist/assets/ConfigureBuiltInAgentModal-reyr1Tds.js +1 -0
  63. package/dist/assets/ConnectionSetupFlow-g6asOGFg.js +40 -0
  64. package/dist/assets/CopyText-BbOm2I6t.js +1 -0
  65. package/dist/assets/CopyableGatewayUrl-B4EYBk9t.js +1 -0
  66. package/dist/assets/CrossIssueCollaborationUxLab-D2bB9GTl.js +1 -0
  67. package/dist/assets/Dashboard-B0JjQSAg.js +2 -0
  68. package/dist/assets/DecisionDateChips-BaRZkOU2.js +1 -0
  69. package/dist/assets/DecisionModelSettings-HEZJ0E6n.js +1 -0
  70. package/dist/assets/DecisionQueuePage-DtzH_oQI.js +1 -0
  71. package/dist/assets/DesignGuide-CXHLyL_C.js +23 -0
  72. package/dist/assets/DocumentFrameHeader-B8A6eaJb.js +1 -0
  73. package/dist/assets/EmailConnectionAccess-BcI7_br0.js +1 -0
  74. package/dist/assets/EmailEndpointSetup-hb_Hewoa.js +1 -0
  75. package/dist/assets/EnforcementBanner-qtVCLyJo.js +1 -0
  76. package/dist/assets/EntityRow-B24YmFE7.js +1 -0
  77. package/dist/assets/ExecutionWorkspaceDetail-BxA_kWKs.js +19 -0
  78. package/dist/assets/FilterBar-CIPYvHzR.js +1 -0
  79. package/dist/assets/FoldCurtain-H4DNjYLl.js +1 -0
  80. package/dist/assets/FolderControls-DI7QVvPv.js +1 -0
  81. package/dist/assets/GatewayDetail-CUcpw4Hj.js +2 -0
  82. package/dist/assets/GatewaysList-Ad1dZuwC.js +1 -0
  83. package/dist/assets/GoalDetail-C-uH9eNu.js +1 -0
  84. package/dist/assets/GoalTree-BZUt4xZ3.js +1 -0
  85. package/dist/assets/Goals-UrfBAjOT.js +1 -0
  86. package/dist/assets/Identity-8eG_HXAH.js +1 -0
  87. package/dist/assets/ImageGalleryModal-D3SH_FYj.js +1 -0
  88. package/dist/assets/Inbox-BzkFmAxU.js +2 -0
  89. package/dist/assets/InlineBanner-DYx7A02D.js +1 -0
  90. package/dist/assets/InlineEditor-BJTE1pyF.js +1 -0
  91. package/dist/assets/InlineEntitySelector-BboofK18.js +1 -0
  92. package/dist/assets/InstanceAccess-D4ZbGCeK.js +1 -0
  93. package/dist/assets/InstanceAdvanced-DYZ50o97.js +1 -0
  94. package/dist/assets/InstanceFeatures-C1eqcxDI.js +1 -0
  95. package/dist/assets/InviteLanding-Bqp1ulQV.js +1 -0
  96. package/dist/assets/IssueChatLongThreadPerf-BJ_Hr2PT.js +2 -0
  97. package/dist/assets/IssueChatThread-qDc-9yA9.js +40 -0
  98. package/dist/assets/IssueDetail-C0hCFL-i.js +9 -0
  99. package/dist/assets/IssueDocumentAnnotations-DjcRXcEw.js +2 -0
  100. package/dist/assets/IssueOutputSection-D7QbMiqq.js +1 -0
  101. package/dist/assets/IssueRecoveryActionCard-DeJbfGm1.js +1 -0
  102. package/dist/assets/IssueReferencePill-BTH42QmE.js +1 -0
  103. package/dist/assets/IssueThreadInteractionCard-D9QAYhuJ.js +9 -0
  104. package/dist/assets/IssueWriteDenialNotice-Bf0ZFSBV.js +1 -0
  105. package/dist/assets/Issues-DtYFX9i_.js +5 -0
  106. package/dist/assets/JoinRequestQueue-DyPP4DL2.js +1 -0
  107. package/dist/assets/JsonSchemaForm-Dkh3zdL9.js +1 -0
  108. package/dist/assets/LiveNowTodoLine-IsmhMx5O.js +1 -0
  109. package/dist/assets/ManagedAiConnectionDetails-BrX9Q9t2.js +1 -0
  110. package/dist/assets/MarkdownBody-D7qCQaU_.js +16 -0
  111. package/dist/assets/MarkdownEditor-ubJimjUH.js +85 -0
  112. package/dist/assets/McpConnect-BYYMfbhs.js +1 -0
  113. package/dist/assets/MembershipAction-Esk0pndF.js +1 -0
  114. package/dist/assets/MetricCard-DlcBTKQs.js +1 -0
  115. package/dist/assets/MissingPluginTabPlaceholder-l1R-Q4nh.js +1 -0
  116. package/dist/assets/ModelsAndProviders-C7VZHvPR.js +1 -0
  117. package/dist/assets/MootMark-BZOhYsK8.js +1 -0
  118. package/dist/assets/NewAgent-BzZI-FBE.js +1 -0
  119. package/dist/assets/OmpAllSettings-DTJLATQL.js +1 -0
  120. package/dist/assets/OpenwaGatewayManager-BQpxxJOa.js +2 -0
  121. package/dist/assets/PathInstructionsModal-BJAqF7vQ.js +1 -0
  122. package/dist/assets/PipelineSettings-BgfMR73P.js +2 -0
  123. package/dist/assets/Pipelines-DAuqtVqc.js +1 -0
  124. package/dist/assets/PixelsOffice-CaQYQilp.js +2 -0
  125. package/dist/assets/PluginManager-DkADWuR8.js +1 -0
  126. package/dist/assets/PluginPage-C-W3lTd9.js +1 -0
  127. package/dist/assets/PluginSettings-D365WG22.js +1 -0
  128. package/dist/assets/ProfileDetailRoute-YzeVN0Ko.js +1 -0
  129. package/dist/assets/ProfileSettings-BLh9EdSK.js +1 -0
  130. package/dist/assets/ProfileWizardRoute-DvOWuvrG.js +1 -0
  131. package/dist/assets/ProjectDetail-OirlXEA4.js +1 -0
  132. package/dist/assets/ProjectWorkspaceDetail-C9_liq4q.js +29 -0
  133. package/dist/assets/ProjectWorkspacesContent-DRAIVofy.js +1 -0
  134. package/dist/assets/Projects-B6UgAQ3Z.js +1 -0
  135. package/dist/assets/PublicIssueSharePage-Cg0GqSVM.js +1 -0
  136. package/dist/assets/QuestionForm-DF6R7lYE.js +7 -0
  137. package/dist/assets/QuotaBar-Ch_rM0X1.js +1 -0
  138. package/dist/assets/RepositoryEditor-BuV4JRgV.js +1 -0
  139. package/dist/assets/ResponsibleUserDenialNotice-dXyOLtYP.js +1 -0
  140. package/dist/assets/ResponsibleUserDenialUxLab-DGWo-GoD.js +1 -0
  141. package/dist/assets/ReviewQueueCard-MNEVuxSA.js +1 -0
  142. package/dist/assets/RichWorkProductCard-D4Qq1gRh.js +1 -0
  143. package/dist/assets/RoutineActivityRow-D16b-qFh.js +1 -0
  144. package/dist/assets/RoutineDetail-DPzql29w.js +2 -0
  145. package/dist/assets/RoutineRunVariablesDialog-C8OHcazq.js +1 -0
  146. package/dist/assets/RoutineVariablesEditor-CHogduM9.js +1 -0
  147. package/dist/assets/Routines-pnhQk9RN.js +1 -0
  148. package/dist/assets/ScrollToBottom-C_k4p-hC.js +1 -0
  149. package/dist/assets/Search-DjpKZIsB.js +1 -0
  150. package/dist/assets/SearchableSelect-BbuRtdzg.js +1 -0
  151. package/dist/assets/Secrets-BOZydXaY.js +4 -0
  152. package/dist/assets/SetupWizard-92wVRG6Y.js +1 -0
  153. package/dist/assets/SidebarContext-bEtg0ItG.js +1 -0
  154. package/dist/assets/SidebarNavItem-afEXEFeo.js +1 -0
  155. package/dist/assets/SkillBinaryFile-N7sK2ZTh.js +1 -0
  156. package/dist/assets/SkillCardIcon-Byzb3JuD.js +2 -0
  157. package/dist/assets/SkillSourceTree-Cuv3EWpo.js +2 -0
  158. package/dist/assets/SkillSources-CYYp9Mds.js +2 -0
  159. package/dist/assets/SkillStudio-Dl28fokd.js +9 -0
  160. package/dist/assets/SourceTrustBadge-BYpC1Kw9.js +1 -0
  161. package/dist/assets/StatusCards-Bqkb18QJ.js +1 -0
  162. package/dist/assets/StatusIcon-Bx4H7RuA.js +1 -0
  163. package/dist/assets/SummarySlotCard-DlwG6iRT.js +1 -0
  164. package/dist/assets/TaskChatComposerTakeoverContext-C68QVO36.js +1 -0
  165. package/dist/assets/TaskChatLab-vnFP7gcJ.js +11 -0
  166. package/dist/assets/TaskChatMarker-KUR-n-7D.js +2 -0
  167. package/dist/assets/TaskChatProtocolCard-CuyApwWM.js +1 -0
  168. package/dist/assets/TaskChatThreadView-B2LR9geW.js +4 -0
  169. package/dist/assets/TaskTreeControls-CRzAjVlt.js +3 -0
  170. package/dist/assets/Terminal-YAhWrMv9.js +1 -0
  171. package/dist/assets/TerminalView-7diHxQOx.js +58 -0
  172. package/dist/assets/ThemeContext-Ca30E6O4.js +1 -0
  173. package/dist/assets/ThemeToggle-BzQNYD1J.js +1 -0
  174. package/dist/assets/ToastContext-DyVJ6bCh.js +1 -0
  175. package/dist/assets/ToolsAdminGate-C5dQpL4C.js +1 -0
  176. package/dist/assets/TrustPresetSection-DCiCKRh0.js +1 -0
  177. package/dist/assets/UserProfile-CEpSKMzS.js +1 -0
  178. package/dist/assets/WebhookUrlWarning-CbkWHsPb.js +1 -0
  179. package/dist/assets/WhatNeedsMe-D0yh5L5H.js +1 -0
  180. package/dist/assets/WorkspaceRuntimeControls-Cp5E1FME.js +1 -0
  181. package/dist/assets/Workspaces-uDkUYVN3.js +1 -0
  182. package/dist/assets/access-DhB95qNC.js +1 -0
  183. package/dist/assets/activity-BwGRpduS.js +1 -0
  184. package/dist/assets/activity-CudcEDwO.js +1 -0
  185. package/dist/assets/activity-format-CYYHRbLo.js +1 -0
  186. package/dist/assets/adapter-display-registry-9qBBJi9B.js +1 -0
  187. package/dist/assets/adapters-D3NHXckp.js +1 -0
  188. package/dist/assets/agent-avatar-url-BSxCmIBZ.js +1 -0
  189. package/dist/assets/agent-config-primitives-BJlDiwaH.js +1 -0
  190. package/dist/assets/agentChats-C8o51WiF.js +1 -0
  191. package/dist/assets/agents-B8n-p0aX.js +1 -0
  192. package/dist/assets/alert-dialog-DNbnZgRz.js +1 -0
  193. package/dist/assets/app-connect-policy-DqQf5knn.js +1 -0
  194. package/dist/assets/archive-CvT6i844.js +1 -0
  195. package/dist/assets/archive-restore-tP0pyaei.js +1 -0
  196. package/dist/assets/arrow-down-C_oYEUXL.js +1 -0
  197. package/dist/assets/arrow-down-left-B8lHKNrs.js +1 -0
  198. package/dist/assets/arrow-left-CnGEiANj.js +1 -0
  199. package/dist/assets/arrow-right-W0iJ_-Zs.js +1 -0
  200. package/dist/assets/arrow-up-BMN1ZnS1.js +1 -0
  201. package/dist/assets/arrow-up-down-Ci6AcwB0.js +1 -0
  202. package/dist/assets/arrow-up-right-CFNgVoQj.js +1 -0
  203. package/dist/assets/artifacts-4t_LL-lA.js +1 -0
  204. package/dist/assets/assets-BOhIBphq.js +1 -0
  205. package/dist/assets/attachment-icon-_1iz_saB.js +1 -0
  206. package/dist/assets/avatar-qO_h93F8.js +1 -0
  207. package/dist/assets/badge-check-BNLpGDnd.js +1 -0
  208. package/dist/assets/badge-jeXr866I.js +1 -0
  209. package/dist/assets/book-open-i_DxEUXC.js +1 -0
  210. package/dist/assets/bot-kSfD9MPZ.js +1 -0
  211. package/dist/assets/boxes-DVB7wdRh.js +1 -0
  212. package/dist/assets/braces-CpXTT0w9.js +1 -0
  213. package/dist/assets/browser-use-BwBUHG71.js +1 -0
  214. package/dist/assets/budgets-C2LtVWph.js +1 -0
  215. package/dist/assets/button-DI4w5WP7.js +1 -0
  216. package/dist/assets/calendar-clock-CXtB0BA2.js +1 -0
  217. package/dist/assets/card-BVZvs7aX.js +1 -0
  218. package/dist/assets/cases-lkyebfpY.js +1 -0
  219. package/dist/assets/chatEndpoints-Bj-keCuw.js +1 -0
  220. package/dist/assets/check-Bis3vECb.js +1 -0
  221. package/dist/assets/checkbox-Cf2_HXDG.js +1 -0
  222. package/dist/assets/chevron-down-nRcQ7bok.js +1 -0
  223. package/dist/assets/chevron-left-DnUVccc_.js +1 -0
  224. package/dist/assets/chevron-right-BP8JjEC_.js +1 -0
  225. package/dist/assets/chevron-up-C1TOE3pP.js +1 -0
  226. package/dist/assets/chip-yHjfSD46.js +1 -0
  227. package/dist/assets/circle-DCDVf2v0.js +1 -0
  228. package/dist/assets/circle-alert-C7T1cdKm.js +1 -0
  229. package/dist/assets/circle-dot-EfQ00xK3.js +1 -0
  230. package/dist/assets/circle-question-mark-CasEGiDp.js +1 -0
  231. package/dist/assets/circle-slash-DP3-64k6.js +1 -0
  232. package/dist/assets/circle-x-oLE71NY3.js +1 -0
  233. package/dist/assets/clipboard-paste-B7AvxL_k.js +1 -0
  234. package/dist/assets/clock-D2UFngg7.js +1 -0
  235. package/dist/assets/cloud-DX1fkQ6i.js +1 -0
  236. package/dist/assets/code-xml-CZhhm_-P.js +1 -0
  237. package/dist/assets/coins-DeD2KB8A.js +1 -0
  238. package/dist/assets/collapsible-D_rwONtV.js +1 -0
  239. package/dist/assets/columns-3-CsveFAYd.js +1 -0
  240. package/dist/assets/command-BnJHDVFJ.js +5 -0
  241. package/dist/assets/companies-query-BEdFiAhG.js +1 -0
  242. package/dist/assets/connection-identity-ch7QDvun.js +1 -0
  243. package/dist/assets/connection-owner-rjoh3jce.js +1 -0
  244. package/dist/assets/copy-C1cfcpxY.js +1 -0
  245. package/dist/assets/createLucideIcon-CgrPXnTY.js +94 -0
  246. package/dist/assets/decision-models-DBtkxtYF.js +1 -0
  247. package/dist/assets/dialog-CeH7rDcv.js +1 -0
  248. package/dist/assets/dist--9cFpXne.js +1 -0
  249. package/dist/assets/dist-9zjsMxaY.js +1 -0
  250. package/dist/assets/dist-BJ09fDjD.js +1 -0
  251. package/dist/assets/dist-BdDa0b16.js +1 -0
  252. package/dist/assets/dist-Bn32UOVm.js +1 -0
  253. package/dist/assets/dist-C48HB-LT.js +1 -0
  254. package/dist/assets/dist-CEXsZ2vP.js +1 -0
  255. package/dist/assets/dist-Cfwg8Fpq.js +1 -0
  256. package/dist/assets/dist-DMGv3m4L.js +1 -0
  257. package/dist/assets/dist-DW0z82oc.js +1 -0
  258. package/dist/assets/dist-DYoIyA63.js +1 -0
  259. package/dist/assets/dist-JmBbJxI1.js +1 -0
  260. package/dist/assets/dist-Kk1Xaco5.js +1 -0
  261. package/dist/assets/dropdown-menu-rUbU8QKw.js +1 -0
  262. package/dist/assets/ellipsis-DyXbAp4P.js +1 -0
  263. package/dist/assets/ellipsis-vertical-DzWImTnI.js +1 -0
  264. package/dist/assets/email-hX48MODm.js +1 -0
  265. package/dist/assets/environment-variables-editor-D6Ylcd74.js +1 -0
  266. package/dist/assets/environments-xuhuvnTt.js +1 -0
  267. package/dist/assets/es2015-I559Yimy.js +41 -0
  268. package/dist/assets/external-link-BIcMNNSN.js +1 -0
  269. package/dist/assets/eye-D8HiVtuU.js +1 -0
  270. package/dist/assets/eye-off-DTXvEIMp.js +1 -0
  271. package/dist/assets/fast-responses-B5vx8axv.js +1 -0
  272. package/dist/assets/file-CcVMTQhg.js +1 -0
  273. package/dist/assets/file-code-corner-CwcL9g2p.js +1 -0
  274. package/dist/assets/file-question-mark-BCVjQ2mM.js +1 -0
  275. package/dist/assets/file-search-Ccb88q3t.js +1 -0
  276. package/dist/assets/file-text-CsPKrMTp.js +1 -0
  277. package/dist/assets/flag-i_D610oD.js +1 -0
  278. package/dist/assets/flask-conical-BxspRG7d.js +1 -0
  279. package/dist/assets/folder-git-2-igHQBSOf.js +1 -0
  280. package/dist/assets/folder-open-Dkshp3J4.js +1 -0
  281. package/dist/assets/folder-search-B_Hz17IO.js +1 -0
  282. package/dist/assets/funnel-BoiZeTWw.js +1 -0
  283. package/dist/assets/git-pull-request-DXoACxvx.js +1 -0
  284. package/dist/assets/github-icon-Cf0axVvi.js +1 -0
  285. package/dist/assets/health-Cn-5LIwb.js +1 -0
  286. package/dist/assets/heartbeats-D96c9g2n.js +1 -0
  287. package/dist/assets/inbox-BbL3s2C7.js +1 -0
  288. package/dist/assets/inboxArchiveCache-CxaLM1R8.js +1 -0
  289. package/dist/assets/index-BcwxLap4.js +67 -0
  290. package/dist/assets/index-BrXf-544.css +2 -0
  291. package/dist/assets/info-Clx4FKz9.js +1 -0
  292. package/dist/assets/input-BBNGmECW.js +1 -0
  293. package/dist/assets/instanceSettings-D1nNVWU0.js +1 -0
  294. package/dist/assets/interaction-audience-B74UGNaN.js +1 -0
  295. package/dist/assets/interaction-card-visibility-CUHRz7le.js +1 -0
  296. package/dist/assets/issue-blockers-t3wlvg4M.js +1 -0
  297. package/dist/assets/issue-output-BM-lLts2.js +1 -0
  298. package/dist/assets/issue-properties-D64PIhST.js +4 -0
  299. package/dist/assets/issue-share-W3K_cYZY.js +1 -0
  300. package/dist/assets/issue-workspace-selection-BY0sBaN6.js +1 -0
  301. package/dist/assets/key-round-CGxQxRtN.js +1 -0
  302. package/dist/assets/label-B707hSFt.js +1 -0
  303. package/dist/assets/layout-dashboard-CGcwI_3-.js +1 -0
  304. package/dist/assets/link-0uKX-OmT.js +1 -0
  305. package/dist/assets/link-2-Cn4f4xsG.js +1 -0
  306. package/dist/assets/list-filter-BjVYqW16.js +1 -0
  307. package/dist/assets/list-todo-DfkI9JDS.js +1 -0
  308. package/dist/assets/log-in-C4giPkVk.js +1 -0
  309. package/dist/assets/maximize-2-c8H5WcEB.js +1 -0
  310. package/dist/assets/mention-chips-COg-185l.js +17 -0
  311. package/dist/assets/message-square-plus-BQNp2QTu.js +1 -0
  312. package/dist/assets/minus-BttANimQ.js +1 -0
  313. package/dist/assets/model-fallback-CwykjJWn.js +1 -0
  314. package/dist/assets/model-picker-fields-D_I_l2UI.js +1 -0
  315. package/dist/assets/network-D_6qRf8m.js +1 -0
  316. package/dist/assets/octagon-alert-BGGMATMK.js +1 -0
  317. package/dist/assets/octagon-x-ZKE_ZOe_.js +1 -0
  318. package/dist/assets/omp-settings-model-B06pdqQR.js +1 -0
  319. package/dist/assets/package-G5arH6JJ.js +1 -0
  320. package/dist/assets/pause-B6AkvDer.js +1 -0
  321. package/dist/assets/pen-line-CKsWWDy2.js +1 -0
  322. package/dist/assets/pipeline-stage-presentation-DDdch-G7.js +2 -0
  323. package/dist/assets/pipelines-0Lb8D7gt.js +1 -0
  324. package/dist/assets/play-Czm7OCYh.js +1 -0
  325. package/dist/assets/plug-UFf0xCI3.js +1 -0
  326. package/dist/assets/plugins-C7Akvi81.js +1 -0
  327. package/dist/assets/plus-CwNlqadt.js +1 -0
  328. package/dist/assets/popover-CWlBonqy.js +1 -0
  329. package/dist/assets/power-CJfOYd7k.js +1 -0
  330. package/dist/assets/presentation-mode-ZjtUUsSS.js +1 -0
  331. package/dist/assets/profile-summary-BwdvqPGE.js +1 -0
  332. package/dist/assets/projects-l3kQxnTp.js +1 -0
  333. package/dist/assets/proposal-review-D9ye_2Px.js +1 -0
  334. package/dist/assets/queryClient-CojHFSot.js +1 -0
  335. package/dist/assets/queryKeys-BzT8CD34.js +1 -0
  336. package/dist/assets/radio-BqjASC1E.js +1 -0
  337. package/dist/assets/radio-card-DCobJXTD.js +1 -0
  338. package/dist/assets/recent-agent-chats-BUso0Smv.js +1 -0
  339. package/dist/assets/refresh-cw-CfzWP9se.js +1 -0
  340. package/dist/assets/repeat-DzPORJjX.js +1 -0
  341. package/dist/assets/resizable-panels-DkafPiQi.js +1 -0
  342. package/dist/assets/review-policy-B1PowuVV.js +1 -0
  343. package/dist/assets/rotate-ccw-DpzLJhXT.js +1 -0
  344. package/dist/assets/rotate-cw-D1cKBtZK.js +1 -0
  345. package/dist/assets/router-BKzUF9uf.js +1 -0
  346. package/dist/assets/routines-DteAuK7S.js +1 -0
  347. package/dist/assets/runRetryState-p_i4Mh7u.js +1 -0
  348. package/dist/assets/save-Blub8a14.js +1 -0
  349. package/dist/assets/schema-config-fields-B8ha5h4A.js +1 -0
  350. package/dist/assets/scroll-area-Ci3PubY2.js +1 -0
  351. package/dist/assets/scroll-text-DfBz82Kz.js +1 -0
  352. package/dist/assets/search-CgZSuGC8.js +1 -0
  353. package/dist/assets/secrets-D17QEm13.js +1 -0
  354. package/dist/assets/segmented-tuNVx49H.js +1 -0
  355. package/dist/assets/select-DNiRU1d9.js +1 -0
  356. package/dist/assets/send-DfQbMfo9.js +1 -0
  357. package/dist/assets/separator-6cvFqhvW.js +1 -0
  358. package/dist/assets/server-NjSlblAR.js +1 -0
  359. package/dist/assets/server-cog-cefxr54v.js +1 -0
  360. package/dist/assets/settings-DuRZr7gk.js +1 -0
  361. package/dist/assets/shared-BjSrBoPt.js +1 -0
  362. package/dist/assets/sheet-D5sUsyfT.js +1 -0
  363. package/dist/assets/shield-DC6LuDUy.js +1 -0
  364. package/dist/assets/shield-alert-BAXWoBTh.js +1 -0
  365. package/dist/assets/shield-check-RPyaLAc-.js +1 -0
  366. package/dist/assets/shield-question-mark-Dl8dxzUU.js +1 -0
  367. package/dist/assets/shield-x-DaFG-JUd.js +1 -0
  368. package/dist/assets/sidebarPreferences-CIMvMX-W.js +1 -0
  369. package/dist/assets/skeleton-BAAoD7cz.js +1 -0
  370. package/dist/assets/slots-DZ1hj5sG.js +49 -0
  371. package/dist/assets/smoke-lab-matrix-Cjauo09x.js +1 -0
  372. package/dist/assets/square-CDo6rOf8.js +1 -0
  373. package/dist/assets/star-eem0qj3E.js +15 -0
  374. package/dist/assets/sun-2LJX7Tad.js +1 -0
  375. package/dist/assets/system-notice-comment-DPCHQ4-Y.js +1 -0
  376. package/dist/assets/tabs-CjHzZxtD.js +1 -0
  377. package/dist/assets/task-chat-attachments-DNPQ-jOG.js +10 -0
  378. package/dist/assets/terminal-i6UlT3R6.js +1 -0
  379. package/dist/assets/textarea-CTx68BDs.js +1 -0
  380. package/dist/assets/thumbs-down-BVZskfHA.js +1 -0
  381. package/dist/assets/thumbs-up-Cqj30fzj.js +1 -0
  382. package/dist/assets/toggle-switch-Dj5GORxn.js +1 -0
  383. package/dist/assets/tools-MhVvhrz_.js +1 -0
  384. package/dist/assets/tooltip-CW50mEoC.js +1 -0
  385. package/dist/assets/transcript-adapter-C1RGcJFu.js +5 -0
  386. package/dist/assets/trash-QxFF084e.js +1 -0
  387. package/dist/assets/triangle-alert-CnHMpmva.js +1 -0
  388. package/dist/assets/upload-Dk7oXJof.js +1 -0
  389. package/dist/assets/use-adapter-capabilities-BNfGiTEP.js +1 -0
  390. package/dist/assets/use-copy-action-DFzauB4H.js +1 -0
  391. package/dist/assets/useAgentChatEnabled-DMbd4JDE.js +1 -0
  392. package/dist/assets/useAutosaveIndicator-D3owckCV.js +1 -0
  393. package/dist/assets/useHiddenSettings-D0HL2tkE.js +1 -0
  394. package/dist/assets/useInfiniteQuery-DTEIZ1gz.js +1 -0
  395. package/dist/assets/useInstanceFeatureSettings-1h06E3Mh.js +1 -0
  396. package/dist/assets/useManagedSandboxOnly-KE5BJrr7.js +1 -0
  397. package/dist/assets/useMobileEntityPickerViewportStyle-BG2vZMIz.js +1 -0
  398. package/dist/assets/usePrefersReducedMotion-BLkUT2m6.js +1 -0
  399. package/dist/assets/useProfilesData-Bs6IpD6I.js +1 -0
  400. package/dist/assets/useQueries-K6OPYBvC.js +1 -0
  401. package/dist/assets/useSecondTick-BRYNTPNI.js +1 -0
  402. package/dist/assets/useSharedPolling-CFeiZe2t.js +1 -0
  403. package/dist/assets/useSummaryDraftStream-DOcsGLEm.js +3 -0
  404. package/dist/assets/user-D5V640s5.js +1 -0
  405. package/dist/assets/user-check-DcbSRa0r.js +1 -0
  406. package/dist/assets/user-minus-DSZK8_9n.js +1 -0
  407. package/dist/assets/user-round-B87hENhM.js +1 -0
  408. package/dist/assets/user-x-CZ1ImNac.js +1 -0
  409. package/dist/assets/users-CEZ1U5q9.js +1 -0
  410. package/dist/assets/wand-sparkles-CONrztQy.js +1 -0
  411. package/dist/assets/webhook-nurKUWEn.js +1 -0
  412. package/dist/assets/x-6E1yeU3Q.js +1 -0
  413. package/dist/index.html +193 -193
  414. package/dist/sw.js +1 -1
  415. package/package.json +1 -1
  416. package/dist/assets/AccessSelectIdentity-DT_buzXu.js +0 -1
  417. package/dist/assets/AdapterManager-D60L5cdo.js +0 -1
  418. package/dist/assets/AdvancedToolsRoute-CTTIaGDV.js +0 -39
  419. package/dist/assets/AgentActionButtons-CSDLZSMZ.js +0 -1
  420. package/dist/assets/AgentAvatar-Dui4nRtK.js +0 -1
  421. package/dist/assets/AgentBubbleActionRow-DSmdb3Li.js +0 -1
  422. package/dist/assets/AgentCharacter-D8CErloh.js +0 -2
  423. package/dist/assets/AgentChat-D3dO5D25.js +0 -1
  424. package/dist/assets/AgentChats-BlMX0riv.js +0 -1
  425. package/dist/assets/AgentDefaults-BRMPOQ-f.js +0 -1
  426. package/dist/assets/AgentDetail-CWdw5kRB.js +0 -38
  427. package/dist/assets/AgentIconPicker-Dub7R1_d.js +0 -1
  428. package/dist/assets/AgentIdentity-DoJBo59l.js +0 -1
  429. package/dist/assets/AgentMailCredentialField-qDnOhzgT.js +0 -1
  430. package/dist/assets/AgentMultiSelect-CEZ1NuIU.js +0 -1
  431. package/dist/assets/AgentRoleEditor-yyBT_XYK.js +0 -1
  432. package/dist/assets/AgentSetupPrompt-B44EEYgo.js +0 -30
  433. package/dist/assets/AgentTodoCard-BHWOqSEn.js +0 -1
  434. package/dist/assets/Agents-0yi6xFaj.js +0 -3
  435. package/dist/assets/AppDetail-CqWalFA3.js +0 -8
  436. package/dist/assets/AppLogo-C6tetlB_.js +0 -1
  437. package/dist/assets/AppNotConnected-CzQcETOO.js +0 -1
  438. package/dist/assets/ApprovalCard-BIquGj06.js +0 -1
  439. package/dist/assets/ApprovalDetail-hUlU9KPS.js +0 -1
  440. package/dist/assets/ApprovalPayload-CZTySb8R.js +0 -1
  441. package/dist/assets/Approvals-DSt7iLh6.js +0 -1
  442. package/dist/assets/AppsConnect-C1ilHYgy.js +0 -1
  443. package/dist/assets/AppsReview-CdjVNMBY.js +0 -1
  444. package/dist/assets/ArtifactCard-CheT3r1Y.js +0 -1
  445. package/dist/assets/Artifacts-Cp_CLB8P.js +0 -1
  446. package/dist/assets/AssistantConnection-D7MGE_yN.js +0 -1
  447. package/dist/assets/AttentionInteractionResolver-BUB3AfZH.js +0 -1
  448. package/dist/assets/AuditHub-DiWa6PDF.js +0 -1
  449. package/dist/assets/Auth-7ZwKR47T.js +0 -3
  450. package/dist/assets/BoardChat-BtB-0sW_.js +0 -18
  451. package/dist/assets/BoardClaim-Dj03nG8V.js +0 -1
  452. package/dist/assets/BootstrapSetupUxLab-ARs-PdM-.js +0 -1
  453. package/dist/assets/BreadcrumbContext-B9JUzLr5.js +0 -1
  454. package/dist/assets/Browse-B5mbrNri.js +0 -1
  455. package/dist/assets/BudgetPolicyCard-D31Qlv4T.js +0 -1
  456. package/dist/assets/CaseDetail-kLu_fI6z.js +0 -2
  457. package/dist/assets/CaseIdentifierKey-BFHk8T39.js +0 -1
  458. package/dist/assets/Cases-B-LfED0v.js +0 -2
  459. package/dist/assets/ChatEndpointDetail-DMGq_bkC.js +0 -5
  460. package/dist/assets/ChatEndpointSetup-BIxcZyIt.js +0 -1
  461. package/dist/assets/ChatIdentityConfirm-vsNMn_wj.js +0 -1
  462. package/dist/assets/ChoiceControls-CLtKmk2I.js +0 -1
  463. package/dist/assets/CliAuth-BrGRdrjs.js +0 -1
  464. package/dist/assets/CommentAttributionChip-CnhotPjn.js +0 -1
  465. package/dist/assets/Companies-BMVhOFzV.js +0 -1
  466. package/dist/assets/CompanyAccess-BlUM6hbW.js +0 -1
  467. package/dist/assets/CompanyActivity-5OGh6LZ6.js +0 -1
  468. package/dist/assets/CompanyConnections-Q1zAAePy.js +0 -1
  469. package/dist/assets/CompanyContext-Cx4B566r.js +0 -1
  470. package/dist/assets/CompanyEnvironments-BW9JgMNj.js +0 -3
  471. package/dist/assets/CompanyExport-CDSYD5mi.js +0 -4
  472. package/dist/assets/CompanyImport-B7Y99lni.js +0 -1
  473. package/dist/assets/CompanySettings-EcYnaTrR.js +0 -1
  474. package/dist/assets/CompanySettingsPluginPage-D3Vts52M.js +0 -1
  475. package/dist/assets/CompanySkills-CJp4nZix.js +0 -10
  476. package/dist/assets/ComposerAddMenu-lqbjcizN.js +0 -3
  477. package/dist/assets/ConfigureBuiltInAgentModal-C5RpKaFX.js +0 -1
  478. package/dist/assets/ConnectionSetupFlow-BFexB8UB.js +0 -40
  479. package/dist/assets/CopyText-Z_7ZP24v.js +0 -1
  480. package/dist/assets/CopyableGatewayUrl-BAIPUo7r.js +0 -1
  481. package/dist/assets/CrossIssueCollaborationUxLab-BbToOV2g.js +0 -1
  482. package/dist/assets/Dashboard-B_807CNK.js +0 -2
  483. package/dist/assets/DecisionDateChips-CM9496e0.js +0 -1
  484. package/dist/assets/DecisionModelSettings-DyZC9rU1.js +0 -1
  485. package/dist/assets/DecisionQueuePage-BRbIttBU.js +0 -1
  486. package/dist/assets/DesignGuide-bh4XX4nv.js +0 -23
  487. package/dist/assets/DocumentFrameHeader-lPIe9r6i.js +0 -1
  488. package/dist/assets/EmailConnectionAccess-BfEW3sUV.js +0 -1
  489. package/dist/assets/EmailEndpointSetup-BOhC9uiR.js +0 -1
  490. package/dist/assets/EnforcementBanner-CvthijpR.js +0 -1
  491. package/dist/assets/EntityRow-DbXjGhVW.js +0 -1
  492. package/dist/assets/ExecutionWorkspaceDetail-D4v1WZZf.js +0 -19
  493. package/dist/assets/FilterBar-CDIOkdDy.js +0 -1
  494. package/dist/assets/FoldCurtain-SSKlbSjO.js +0 -1
  495. package/dist/assets/FolderControls-Bhry3Vd2.js +0 -1
  496. package/dist/assets/GatewayDetail-BzSIBC84.js +0 -2
  497. package/dist/assets/GatewaysList-CZP6UIqo.js +0 -1
  498. package/dist/assets/GoalDetail-Ct08uwQw.js +0 -1
  499. package/dist/assets/GoalTree-DxU1Hv7E.js +0 -1
  500. package/dist/assets/Goals-BT9hCHnP.js +0 -1
  501. package/dist/assets/Identity-Jt9hiBbb.js +0 -1
  502. package/dist/assets/ImageGalleryModal-tTRmXGM4.js +0 -1
  503. package/dist/assets/Inbox-6vKVEJVu.js +0 -2
  504. package/dist/assets/InlineBanner-BWitMSzj.js +0 -1
  505. package/dist/assets/InlineEditor-DJB_QvGc.js +0 -1
  506. package/dist/assets/InlineEntitySelector-h-mVM8ny.js +0 -1
  507. package/dist/assets/InstanceAccess-CWtKVMDd.js +0 -1
  508. package/dist/assets/InstanceAdvanced-Bb4mtcMA.js +0 -1
  509. package/dist/assets/InstanceFeatures-CkqItnLP.js +0 -1
  510. package/dist/assets/InviteLanding-BnL6CX0t.js +0 -1
  511. package/dist/assets/IssueChatLongThreadPerf-VX9bG-bM.js +0 -2
  512. package/dist/assets/IssueChatThread-RwT_ZjCz.js +0 -40
  513. package/dist/assets/IssueDetail-DuaqjKFa.js +0 -9
  514. package/dist/assets/IssueDocumentAnnotations-CwAOcRXe.js +0 -2
  515. package/dist/assets/IssueOutputSection-CWIabX5_.js +0 -1
  516. package/dist/assets/IssueRecoveryActionCard-BH_n5kJ0.js +0 -1
  517. package/dist/assets/IssueReferencePill-Bx19xBTT.js +0 -1
  518. package/dist/assets/IssueThreadInteractionCard-CwQx5QmL.js +0 -9
  519. package/dist/assets/IssueWriteDenialNotice-DntH-qXu.js +0 -1
  520. package/dist/assets/Issues-Cn7D_2T3.js +0 -5
  521. package/dist/assets/JoinRequestQueue-DDbAcL7h.js +0 -1
  522. package/dist/assets/JsonSchemaForm-CukFZxO5.js +0 -1
  523. package/dist/assets/LiveNowTodoLine-CeGqy3iK.js +0 -1
  524. package/dist/assets/ManagedAiConnectionDetails-GCRA__HT.js +0 -1
  525. package/dist/assets/MarkdownBody-Dtjq3Ln7.js +0 -16
  526. package/dist/assets/MarkdownEditor-GCKumUHH.js +0 -85
  527. package/dist/assets/McpConnect-Cv3wvage.js +0 -1
  528. package/dist/assets/MembershipAction-B1Rkn6Ya.js +0 -1
  529. package/dist/assets/MetricCard-CWsDw6PQ.js +0 -1
  530. package/dist/assets/MissingPluginTabPlaceholder-BBTNbYkG.js +0 -1
  531. package/dist/assets/ModelsAndProviders-DhjeUdj-.js +0 -1
  532. package/dist/assets/MootMark-Djv4Cqoj.js +0 -1
  533. package/dist/assets/NewAgent-BTrIjdLI.js +0 -1
  534. package/dist/assets/OmpAllSettings-D7HFc1wr.js +0 -1
  535. package/dist/assets/OpenwaGatewayManager-CZ-1AWGM.js +0 -2
  536. package/dist/assets/PathInstructionsModal-Ch_Y_h-W.js +0 -1
  537. package/dist/assets/PipelineSettings-CEOXJLey.js +0 -2
  538. package/dist/assets/Pipelines-Dqr4RIMe.js +0 -1
  539. package/dist/assets/PixelsOffice-Dc-hTwL6.js +0 -2
  540. package/dist/assets/PluginManager-BHDvd2Kk.js +0 -1
  541. package/dist/assets/PluginPage-DGJsTGb4.js +0 -1
  542. package/dist/assets/PluginSettings-DSb7ReBz.js +0 -1
  543. package/dist/assets/ProfileDetailRoute-DWOiwLnB.js +0 -1
  544. package/dist/assets/ProfileSettings-BDPwbFPA.js +0 -1
  545. package/dist/assets/ProfileWizardRoute-CyY9cBXn.js +0 -1
  546. package/dist/assets/ProjectDetail-tbNc2eqO.js +0 -1
  547. package/dist/assets/ProjectWorkspaceDetail-CE3uadEz.js +0 -29
  548. package/dist/assets/ProjectWorkspacesContent-C-UY0h-1.js +0 -1
  549. package/dist/assets/Projects-IJU6fKzh.js +0 -1
  550. package/dist/assets/PublicIssueSharePage-D2-mjx5c.js +0 -1
  551. package/dist/assets/QuestionForm-CNI1aaPv.js +0 -7
  552. package/dist/assets/QuotaBar-BHpsGZ_M.js +0 -1
  553. package/dist/assets/RepositoryEditor-sn0h55E-.js +0 -1
  554. package/dist/assets/ResponsibleUserDenialNotice-O-ehIhIk.js +0 -1
  555. package/dist/assets/ResponsibleUserDenialUxLab-CwOtm-H_.js +0 -1
  556. package/dist/assets/ReviewQueueCard-DK0sDiGs.js +0 -1
  557. package/dist/assets/RichWorkProductCard-ButSFwSp.js +0 -1
  558. package/dist/assets/RoutineActivityRow-C0vIpaP_.js +0 -1
  559. package/dist/assets/RoutineDetail-CWWdWsrO.js +0 -2
  560. package/dist/assets/RoutineRunVariablesDialog-CRGon2Hg.js +0 -1
  561. package/dist/assets/RoutineVariablesEditor-C_rNpv3C.js +0 -1
  562. package/dist/assets/Routines-GiNr76nw.js +0 -1
  563. package/dist/assets/ScrollToBottom-BYgXnYon.js +0 -1
  564. package/dist/assets/Search-SUbPfqq4.js +0 -1
  565. package/dist/assets/SearchableSelect-Dl3Lshyy.js +0 -1
  566. package/dist/assets/Secrets--ch95iPv.js +0 -4
  567. package/dist/assets/SetupWizard-BhEuzmUv.js +0 -1
  568. package/dist/assets/SidebarContext-BHJMHrvt.js +0 -1
  569. package/dist/assets/SidebarNavItem-Dr2h0yiK.js +0 -1
  570. package/dist/assets/SkillBinaryFile-Datjq2Oi.js +0 -1
  571. package/dist/assets/SkillCardIcon-C430BaPr.js +0 -2
  572. package/dist/assets/SkillSourceTree-CR0E52D2.js +0 -2
  573. package/dist/assets/SkillSources-DeBOYCiw.js +0 -2
  574. package/dist/assets/SkillStudio-C3XaNFS3.js +0 -9
  575. package/dist/assets/SourceTrustBadge-D9HGGRtv.js +0 -1
  576. package/dist/assets/StatusCards-D2X-8hFz.js +0 -1
  577. package/dist/assets/StatusIcon-Byea8cPq.js +0 -1
  578. package/dist/assets/SummarySlotCard-CxnwG1r2.js +0 -1
  579. package/dist/assets/TaskChatComposerTakeoverContext-DCrczoPx.js +0 -1
  580. package/dist/assets/TaskChatLab-BvlnYRNe.js +0 -11
  581. package/dist/assets/TaskChatMarker-2V0Oo3xV.js +0 -2
  582. package/dist/assets/TaskChatProtocolCard-CgwNmmaw.js +0 -1
  583. package/dist/assets/TaskChatThreadView-BSU2dzE7.js +0 -4
  584. package/dist/assets/TaskTreeControls-DaAFj1E9.js +0 -3
  585. package/dist/assets/Terminal-Byg7O1p2.js +0 -1
  586. package/dist/assets/TerminalView-CsrRCoNX.js +0 -58
  587. package/dist/assets/ThemeContext-Bj-WoVL8.js +0 -1
  588. package/dist/assets/ThemeToggle-_Eipcr9P.js +0 -1
  589. package/dist/assets/ToastContext-BCfjPRi1.js +0 -1
  590. package/dist/assets/ToolsAdminGate-B6k3SrGU.js +0 -1
  591. package/dist/assets/TrustPresetSection-DSCmQxlJ.js +0 -1
  592. package/dist/assets/UserProfile-BYBUYHyM.js +0 -1
  593. package/dist/assets/WebhookUrlWarning-DeNhQ5SI.js +0 -1
  594. package/dist/assets/WhatNeedsMe-I9wfO12c.js +0 -1
  595. package/dist/assets/WorkspaceRuntimeControls-ByOvZ2To.js +0 -1
  596. package/dist/assets/Workspaces-Db99D3YB.js +0 -1
  597. package/dist/assets/access-BqSI2EWX.js +0 -1
  598. package/dist/assets/activity-CV1ib_N4.js +0 -1
  599. package/dist/assets/activity-DjXPM70-.js +0 -1
  600. package/dist/assets/activity-format-z4x2U1UL.js +0 -1
  601. package/dist/assets/adapter-display-registry-BwL8TUEJ.js +0 -1
  602. package/dist/assets/adapters-BDzUkPiY.js +0 -1
  603. package/dist/assets/agent-avatar-url-D6FtNk3V.js +0 -1
  604. package/dist/assets/agent-config-primitives-BpUNyayv.js +0 -1
  605. package/dist/assets/agentChats-B3DxYJ0s.js +0 -1
  606. package/dist/assets/agents-PFXnjEjH.js +0 -1
  607. package/dist/assets/alert-dialog-Bu032Tf4.js +0 -1
  608. package/dist/assets/app-connect-policy-C0ySFS-g.js +0 -1
  609. package/dist/assets/archive-BHg7Yq0H.js +0 -1
  610. package/dist/assets/archive-restore-BtX-2MA_.js +0 -1
  611. package/dist/assets/arrow-down-CDBD_UhE.js +0 -1
  612. package/dist/assets/arrow-down-left-tUS9EGQ5.js +0 -1
  613. package/dist/assets/arrow-left-CRfeAefI.js +0 -1
  614. package/dist/assets/arrow-right-898_TY3T.js +0 -1
  615. package/dist/assets/arrow-up-down-CIDQ-7ap.js +0 -1
  616. package/dist/assets/arrow-up-lSEksryM.js +0 -1
  617. package/dist/assets/arrow-up-right-CiL52_C-.js +0 -1
  618. package/dist/assets/artifacts-BmsoVCdJ.js +0 -1
  619. package/dist/assets/assets-lhKNSpON.js +0 -1
  620. package/dist/assets/attachment-icon-g4YAkuZ8.js +0 -1
  621. package/dist/assets/avatar-C4Ssxg9Y.js +0 -1
  622. package/dist/assets/badge-Dvh7HNMN.js +0 -1
  623. package/dist/assets/badge-check-B-GkuMC-.js +0 -1
  624. package/dist/assets/book-open-Ccq-Ea-W.js +0 -1
  625. package/dist/assets/bot-CPZa9Nhm.js +0 -1
  626. package/dist/assets/boxes-PkWx_5hs.js +0 -1
  627. package/dist/assets/braces-DovVxLjW.js +0 -1
  628. package/dist/assets/browser-use-DzHGNDA8.js +0 -1
  629. package/dist/assets/budgets-BieJJ3WD.js +0 -1
  630. package/dist/assets/button-CB8r2Tmh.js +0 -1
  631. package/dist/assets/calendar-clock-CeIy5aD9.js +0 -1
  632. package/dist/assets/card-DANCDyBy.js +0 -1
  633. package/dist/assets/cases-DiL3ys5G.js +0 -1
  634. package/dist/assets/chatEndpoints-BR_dsxeU.js +0 -1
  635. package/dist/assets/check-ByoSzjU8.js +0 -1
  636. package/dist/assets/checkbox-D9x1Kpmi.js +0 -1
  637. package/dist/assets/chevron-down-BY8r8lEv.js +0 -1
  638. package/dist/assets/chevron-left-Bh6cfiU3.js +0 -1
  639. package/dist/assets/chevron-right-B9tyGqmZ.js +0 -1
  640. package/dist/assets/chevron-up-Y_THiwqt.js +0 -1
  641. package/dist/assets/chip-CPztosQ8.js +0 -1
  642. package/dist/assets/circle-Dov4MVoe.js +0 -1
  643. package/dist/assets/circle-alert-Dw0yL22E.js +0 -1
  644. package/dist/assets/circle-dot-W_Fv5sI-.js +0 -1
  645. package/dist/assets/circle-question-mark-Bs7m2809.js +0 -1
  646. package/dist/assets/circle-slash-BrrkGL_C.js +0 -1
  647. package/dist/assets/circle-x-haVgjs_m.js +0 -1
  648. package/dist/assets/clipboard-paste-CbrlOJuv.js +0 -1
  649. package/dist/assets/clock-DynbfDi4.js +0 -1
  650. package/dist/assets/cloud-BL3mJ3Zk.js +0 -1
  651. package/dist/assets/code-xml-DnMtzyzg.js +0 -1
  652. package/dist/assets/coins-op-yocyK.js +0 -1
  653. package/dist/assets/collapsible-CK4bkaKD.js +0 -1
  654. package/dist/assets/columns-3-h7a-cGgB.js +0 -1
  655. package/dist/assets/command-DnT_Dqx6.js +0 -5
  656. package/dist/assets/companies-query-CEvXdXle.js +0 -1
  657. package/dist/assets/connection-identity-BFnwnJ1m.js +0 -1
  658. package/dist/assets/connection-owner-a9FWzn0p.js +0 -1
  659. package/dist/assets/copy-BzAUsLd3.js +0 -1
  660. package/dist/assets/createLucideIcon-DpXjCQRS.js +0 -94
  661. package/dist/assets/decision-models-BJo87qdY.js +0 -1
  662. package/dist/assets/dialog-Bj8Y6BBR.js +0 -1
  663. package/dist/assets/dist-3Dez14jq.js +0 -1
  664. package/dist/assets/dist-B0zvydXD.js +0 -1
  665. package/dist/assets/dist-BHjJYMl9.js +0 -1
  666. package/dist/assets/dist-BdR2FnFe.js +0 -1
  667. package/dist/assets/dist-BmMF5JdA.js +0 -1
  668. package/dist/assets/dist-BvZdGtYE.js +0 -1
  669. package/dist/assets/dist-CL5YXBl1.js +0 -1
  670. package/dist/assets/dist-C_1hhiPG.js +0 -1
  671. package/dist/assets/dist-CvnnLM1v.js +0 -1
  672. package/dist/assets/dist-DGPm9z2w.js +0 -1
  673. package/dist/assets/dist-DIKPg1Zq.js +0 -1
  674. package/dist/assets/dist-hTXDV8BS.js +0 -1
  675. package/dist/assets/dist-qP8xhvXd.js +0 -1
  676. package/dist/assets/dropdown-menu-COuwCVD4.js +0 -1
  677. package/dist/assets/ellipsis-ClhaIBYZ.js +0 -1
  678. package/dist/assets/ellipsis-vertical-BLqWWVnI.js +0 -1
  679. package/dist/assets/email-X-ZvOMfe.js +0 -1
  680. package/dist/assets/environment-variables-editor-DuAdYQbc.js +0 -1
  681. package/dist/assets/environments-C7Tx6OHp.js +0 -1
  682. package/dist/assets/es2015-D1VPo3R2.js +0 -41
  683. package/dist/assets/external-link--KkXYRPz.js +0 -1
  684. package/dist/assets/eye-kZn_xPie.js +0 -1
  685. package/dist/assets/eye-off-CIggBtC5.js +0 -1
  686. package/dist/assets/fast-responses-BxWwvpML.js +0 -1
  687. package/dist/assets/file-DpimbHnE.js +0 -1
  688. package/dist/assets/file-code-corner-CTt6xXKc.js +0 -1
  689. package/dist/assets/file-question-mark-BdUx7roP.js +0 -1
  690. package/dist/assets/file-search-DKDwHcZ2.js +0 -1
  691. package/dist/assets/file-text-Dpnp6o-I.js +0 -1
  692. package/dist/assets/flag-DL-0fBPJ.js +0 -1
  693. package/dist/assets/flask-conical-qqfS8te7.js +0 -1
  694. package/dist/assets/folder-git-2-D8yyJVTc.js +0 -1
  695. package/dist/assets/folder-open-fbJID1cC.js +0 -1
  696. package/dist/assets/folder-search-D89U3Z-T.js +0 -1
  697. package/dist/assets/funnel-B2ism2sD.js +0 -1
  698. package/dist/assets/git-pull-request-DQkSlyfL.js +0 -1
  699. package/dist/assets/github-icon-CbU9rpKT.js +0 -1
  700. package/dist/assets/health-CHjyy9Zt.js +0 -1
  701. package/dist/assets/heartbeats-Cy4hqsrt.js +0 -1
  702. package/dist/assets/inbox-WZDW93BL.js +0 -1
  703. package/dist/assets/inboxArchiveCache-CoY_V35O.js +0 -1
  704. package/dist/assets/index-B6ALXjXD.js +0 -67
  705. package/dist/assets/index-gXKvahZk.css +0 -2
  706. package/dist/assets/info-BqXpbzV2.js +0 -1
  707. package/dist/assets/input-tD3qR9Gq.js +0 -1
  708. package/dist/assets/instanceSettings-DIXpSGRh.js +0 -1
  709. package/dist/assets/interaction-audience-CXUDNI1a.js +0 -1
  710. package/dist/assets/interaction-card-visibility-DTtQkm6u.js +0 -1
  711. package/dist/assets/issue-blockers-KTmO2cng.js +0 -1
  712. package/dist/assets/issue-output-BzlPk1Fq.js +0 -1
  713. package/dist/assets/issue-properties-CmEBhjZa.js +0 -4
  714. package/dist/assets/issue-share-0nHxp5nx.js +0 -1
  715. package/dist/assets/issue-workspace-selection-DxIMVIPY.js +0 -1
  716. package/dist/assets/key-round-Bzc86YKh.js +0 -1
  717. package/dist/assets/label-CUFCL9Te.js +0 -1
  718. package/dist/assets/layout-dashboard-CQUo0zqq.js +0 -1
  719. package/dist/assets/link-2-DdeL2ffb.js +0 -1
  720. package/dist/assets/link-BTk9LQnG.js +0 -1
  721. package/dist/assets/list-filter-BIvVZUS2.js +0 -1
  722. package/dist/assets/list-todo-ByybdFTG.js +0 -1
  723. package/dist/assets/log-in-C5qjuUlB.js +0 -1
  724. package/dist/assets/maximize-2-pkU0hBkw.js +0 -1
  725. package/dist/assets/mention-chips-D3m3O_ko.js +0 -17
  726. package/dist/assets/message-square-plus-DaOHWEpG.js +0 -1
  727. package/dist/assets/minus-ymsuVafu.js +0 -1
  728. package/dist/assets/model-fallback-5DsUzAM5.js +0 -1
  729. package/dist/assets/model-picker-fields-jLfT-wsr.js +0 -1
  730. package/dist/assets/network-DtO4s1Xo.js +0 -1
  731. package/dist/assets/octagon-alert-Do2mnwTI.js +0 -1
  732. package/dist/assets/octagon-x-7Om5soqi.js +0 -1
  733. package/dist/assets/omp-settings-model-BVsTwU6j.js +0 -1
  734. package/dist/assets/package-Cvq1waTm.js +0 -1
  735. package/dist/assets/pause-BNtKkOA6.js +0 -1
  736. package/dist/assets/pen-line-DJnffu7P.js +0 -1
  737. package/dist/assets/pipeline-stage-presentation-DvjVVsAD.js +0 -2
  738. package/dist/assets/pipelines-B_5RdgB1.js +0 -1
  739. package/dist/assets/play-BEkcNe5A.js +0 -1
  740. package/dist/assets/plug-vBXQGAOC.js +0 -1
  741. package/dist/assets/plugins-CaoL00gm.js +0 -1
  742. package/dist/assets/plus-Ci4fWNMH.js +0 -1
  743. package/dist/assets/popover-C9GvGhqf.js +0 -1
  744. package/dist/assets/power-czY3YlJl.js +0 -1
  745. package/dist/assets/presentation-mode-3-5_ozCU.js +0 -1
  746. package/dist/assets/profile-summary-Bhu05QwC.js +0 -1
  747. package/dist/assets/projects-C-sNYR8y.js +0 -1
  748. package/dist/assets/proposal-review-Cww0NzU2.js +0 -1
  749. package/dist/assets/queryClient-CLuei5YE.js +0 -1
  750. package/dist/assets/queryKeys-Bwpi9du8.js +0 -1
  751. package/dist/assets/radio-Bbj2qILX.js +0 -1
  752. package/dist/assets/radio-card-CEpISzBw.js +0 -1
  753. package/dist/assets/recent-agent-chats-xm5DHAP2.js +0 -1
  754. package/dist/assets/refresh-cw-BoKHCT9Q.js +0 -1
  755. package/dist/assets/repeat-CxiYIeqH.js +0 -1
  756. package/dist/assets/resizable-panels-CAJWzqPj.js +0 -1
  757. package/dist/assets/review-policy-BroUuOnH.js +0 -1
  758. package/dist/assets/rotate-ccw-DP1fSRXE.js +0 -1
  759. package/dist/assets/rotate-cw-BIJjXmtM.js +0 -1
  760. package/dist/assets/router-DvYg2TPj.js +0 -1
  761. package/dist/assets/routines-DRJ8glz2.js +0 -1
  762. package/dist/assets/runRetryState-BQtnYsCT.js +0 -1
  763. package/dist/assets/save-TS82wH4U.js +0 -1
  764. package/dist/assets/schema-config-fields-CKfJ_1Bc.js +0 -1
  765. package/dist/assets/scroll-area-CSkajMX4.js +0 -1
  766. package/dist/assets/scroll-text-BtyjTPat.js +0 -1
  767. package/dist/assets/search-C7RvqPDh.js +0 -1
  768. package/dist/assets/secrets-Bow-lhgm.js +0 -1
  769. package/dist/assets/segmented-B9WQFRdU.js +0 -1
  770. package/dist/assets/select-BILzRqwR.js +0 -1
  771. package/dist/assets/send-Cq6oLC65.js +0 -1
  772. package/dist/assets/separator-Cc_zxQfG.js +0 -1
  773. package/dist/assets/server-D14pf6xr.js +0 -1
  774. package/dist/assets/server-cog-Dd0WwTxo.js +0 -1
  775. package/dist/assets/settings-_MxMwkB3.js +0 -1
  776. package/dist/assets/shared-C9rdRvrI.js +0 -1
  777. package/dist/assets/sheet-CXi-joPR.js +0 -1
  778. package/dist/assets/shield-B35HbBPD.js +0 -1
  779. package/dist/assets/shield-alert-DoI68Irt.js +0 -1
  780. package/dist/assets/shield-check-BkZhOxSV.js +0 -1
  781. package/dist/assets/shield-question-mark-DJ1-iT-R.js +0 -1
  782. package/dist/assets/shield-x-IA54_BG9.js +0 -1
  783. package/dist/assets/sidebarPreferences-RlJwFW7E.js +0 -1
  784. package/dist/assets/skeleton-D5GfoYPy.js +0 -1
  785. package/dist/assets/slots-B-bF0j6o.js +0 -49
  786. package/dist/assets/smoke-lab-matrix-ChxKoFnA.js +0 -1
  787. package/dist/assets/square-BSbamBKn.js +0 -1
  788. package/dist/assets/star-vweB_JDI.js +0 -15
  789. package/dist/assets/sun-t5pkwxql.js +0 -1
  790. package/dist/assets/system-notice-comment-BzIsx8nv.js +0 -1
  791. package/dist/assets/tabs-BruQLBag.js +0 -1
  792. package/dist/assets/task-chat-attachments-COZdrQRo.js +0 -10
  793. package/dist/assets/terminal-BSPCPTKd.js +0 -1
  794. package/dist/assets/textarea-BQh3frGz.js +0 -1
  795. package/dist/assets/thumbs-down-Db03Y3rC.js +0 -1
  796. package/dist/assets/thumbs-up-hfQ2kjmZ.js +0 -1
  797. package/dist/assets/toggle-switch-CCZLW1ZV.js +0 -1
  798. package/dist/assets/tools-VxBq3Bni.js +0 -1
  799. package/dist/assets/tooltip-DhA8eGCr.js +0 -1
  800. package/dist/assets/transcript-adapter-CEuUrDAp.js +0 -5
  801. package/dist/assets/trash-Blp_H70m.js +0 -1
  802. package/dist/assets/triangle-alert-BbGTCcEH.js +0 -1
  803. package/dist/assets/upload-D1pDAAji.js +0 -1
  804. package/dist/assets/use-adapter-capabilities-DVcxB6B0.js +0 -1
  805. package/dist/assets/use-copy-action-DOl9yp4g.js +0 -1
  806. package/dist/assets/useAgentChatEnabled-BIG72pQN.js +0 -1
  807. package/dist/assets/useAutosaveIndicator-Bb6JV7mP.js +0 -1
  808. package/dist/assets/useHiddenSettings-C5OX_C_M.js +0 -1
  809. package/dist/assets/useInfiniteQuery-aicMPSfT.js +0 -1
  810. package/dist/assets/useInstanceFeatureSettings-1CM1woTZ.js +0 -1
  811. package/dist/assets/useManagedSandboxOnly-DENpzhcY.js +0 -1
  812. package/dist/assets/useMobileEntityPickerViewportStyle-l3SLJAQb.js +0 -1
  813. package/dist/assets/usePrefersReducedMotion-z1zTAoVk.js +0 -1
  814. package/dist/assets/useProfilesData-D_CamlCc.js +0 -1
  815. package/dist/assets/useQueries-DVLf9RKa.js +0 -1
  816. package/dist/assets/useSecondTick-CQantaP_.js +0 -1
  817. package/dist/assets/useSharedPolling-CfP23_kt.js +0 -1
  818. package/dist/assets/useSummaryDraftStream-Cce3cGNj.js +0 -3
  819. package/dist/assets/user-RgiS0rQH.js +0 -1
  820. package/dist/assets/user-check-NQX3Jxil.js +0 -1
  821. package/dist/assets/user-minus-DFmQKqPK.js +0 -1
  822. package/dist/assets/user-round-cSiRkcc8.js +0 -1
  823. package/dist/assets/user-x-BydVKgYM.js +0 -1
  824. package/dist/assets/users-CjaVMVjO.js +0 -1
  825. package/dist/assets/wand-sparkles-wj238ghx.js +0 -1
  826. package/dist/assets/webhook-CrpXuiI8.js +0 -1
  827. package/dist/assets/x-B9UP51U4.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-vnFP7gcJ.js","assets/createLucideIcon-CgrPXnTY.js","assets/check-Bis3vECb.js","assets/circle-DCDVf2v0.js","assets/copy-C1cfcpxY.js","assets/button-DI4w5WP7.js","assets/dist-Cfwg8Fpq.js","assets/dist-BdDa0b16.js","assets/minus-BttANimQ.js","assets/pause-B6AkvDer.js","assets/play-Czm7OCYh.js","assets/plus-CwNlqadt.js","assets/rotate-ccw-DpzLJhXT.js","assets/TaskChatThreadView-B2LR9geW.js","assets/star-eem0qj3E.js","assets/preload-helper-CceJXRIF.js","assets/ArtifactCard-CAlD_gkp.js","assets/router-BKzUF9uf.js","assets/queryKeys-BzT8CD34.js","assets/CompanyContext-fQCNWI_f.js","assets/companies-query-BEdFiAhG.js","assets/popover-CWlBonqy.js","assets/dist-DW0z82oc.js","assets/dist-DYoIyA63.js","assets/dist-C48HB-LT.js","assets/es2015-I559Yimy.js","assets/boxes-DVB7wdRh.js","assets/circle-dot-EfQ00xK3.js","assets/package-G5arH6JJ.js","assets/search-CgZSuGC8.js","assets/shield-DC6LuDUy.js","assets/terminal-i6UlT3R6.js","assets/external-link-BIcMNNSN.js","assets/attachment-icon-_1iz_saB.js","assets/use-copy-action-DFzauB4H.js","assets/ToastContext-DyVJ6bCh.js","assets/clipboard-CTLKYvRL.js","assets/arrow-down-C_oYEUXL.js","assets/chevron-down-nRcQ7bok.js","assets/chevron-right-BP8JjEC_.js","assets/MarkdownBody-D7qCQaU_.js","assets/mention-chips-COg-185l.js","assets/agent-avatar-url-BSxCmIBZ.js","assets/color-contrast-BHHcEMtO.js","assets/archive-CvT6i844.js","assets/circle-question-mark-CasEGiDp.js","assets/circle-x-oLE71NY3.js","assets/clock-D2UFngg7.js","assets/file-code-corner-CwcL9g2p.js","assets/folder-open-Dkshp3J4.js","assets/git-pull-request-DXoACxvx.js","assets/key-round-CGxQxRtN.js","assets/octagon-alert-BGGMATMK.js","assets/agents-B8n-p0aX.js","assets/github-icon-Cf0axVvi.js","assets/usePrefersReducedMotion-BLkUT2m6.js","assets/ThemeContext-Ca30E6O4.js","assets/StatusIcon-Bx4H7RuA.js","assets/task-chat-attachments-DNPQ-jOG.js","assets/file-text-CsPKrMTp.js","assets/file-CcVMTQhg.js","assets/TaskChatMarker-KUR-n-7D.js","assets/book-open-i_DxEUXC.js","assets/bot-kSfD9MPZ.js","assets/flag-i_D610oD.js","assets/info-Clx4FKz9.js","assets/octagon-x-ZKE_ZOe_.js","assets/TaskChatProtocolCard-CuyApwWM.js","assets/RichWorkProductCard-D4Qq1gRh.js","assets/maximize-2-c8H5WcEB.js","assets/server-NjSlblAR.js","assets/ImageGalleryModal-D3SH_FYj.js","assets/dist-CEXsZ2vP.js","assets/chevron-left-DnUVccc_.js","assets/x-6E1yeU3Q.js","assets/issue-output-BM-lLts2.js","assets/QuestionForm-DF6R7lYE.js","assets/MarkdownEditor-ubJimjUH.js","assets/dist-BJ09fDjD.js","assets/dist-Kk1Xaco5.js","assets/dist--9cFpXne.js","assets/dist-9zjsMxaY.js","assets/dist-DMGv3m4L.js","assets/dist-JmBbJxI1.js","assets/calendar-clock-CXtB0BA2.js","assets/user-D5V640s5.js","assets/AgentAvatar-BZiiDlCN.js","assets/Identity-8eG_HXAH.js","assets/avatar-qO_h93F8.js","assets/routines-DteAuK7S.js","assets/activity-CudcEDwO.js","assets/dist-BhxPxuMy.js","assets/message-square-plus-BQNp2QTu.js","assets/input-BBNGmECW.js","assets/TaskChatComposerTakeoverContext-C68QVO36.js","assets/shield-check-RPyaLAc-.js","assets/triangle-alert-CnHMpmva.js","assets/dialog-CeH7rDcv.js","assets/textarea-CTx68BDs.js","assets/square-CDo6rOf8.js","assets/users-CEZ1U5q9.js","assets/presentation-mode-ZjtUUsSS.js","assets/list-todo-DfkI9JDS.js","assets/shield-question-mark-Dl8dxzUU.js","assets/shield-x-DaFG-JUd.js","assets/system-notice-comment-DPCHQ4-Y.js","assets/label-B707hSFt.js","assets/heartbeats-D96c9g2n.js","assets/email-hX48MODm.js","assets/transcript-adapter-C1RGcJFu.js","assets/AgentBubbleActionRow-Dqrx638X.js","assets/dropdown-menu-rUbU8QKw.js","assets/dist-Bn32UOVm.js","assets/ellipsis-DyXbAp4P.js","assets/thumbs-down-BVZskfHA.js","assets/thumbs-up-Cqj30fzj.js","assets/tooltip-CW50mEoC.js","assets/segmented-tuNVx49H.js","assets/Cases-C5IE_YuB.js","assets/checkbox-Cf2_HXDG.js","assets/arrow-up-down-Ci6AcwB0.js","assets/columns-3-CsveFAYd.js","assets/funnel-BoiZeTWw.js","assets/badge-jeXr866I.js","assets/projects-l3kQxnTp.js","assets/BreadcrumbContext-DNbB7zWn.js","assets/cases-lkyebfpY.js","assets/CaseIdentifierKey-CIGzqAfo.js","assets/FilterBar-CIPYvHzR.js","assets/CaseDetail-k79_F25A.js","assets/IssueDocumentAnnotations-DjcRXcEw.js","assets/sheet-D5sUsyfT.js","assets/tabs-CjHzZxtD.js","assets/ellipsis-vertical-DzWImTnI.js","assets/issue-properties-D64PIhST.js","assets/issue-attribution-DfN_3u2W.js","assets/WorkspaceRuntimeControls-Cp5E1FME.js","assets/activity-BwGRpduS.js","assets/useManagedSandboxOnly-KE5BJrr7.js","assets/instanceSettings-D1nNVWU0.js","assets/archive-restore-tP0pyaei.js","assets/arrow-right-W0iJ_-Zs.js","assets/arrow-up-right-CFNgVoQj.js","assets/repeat-DzPORJjX.js","assets/inboxArchiveCache-CxaLM1R8.js","assets/access-DhB95qNC.js","assets/assignees-DkQNbPzi.js","assets/AgentIdentity-DBHRFgMM.js","assets/recent-selections-BnN_nb6Y.js","assets/recent-assignees-DmalYaLf.js","assets/InlineEntitySelector-BboofK18.js","assets/useMobileEntityPickerViewportStyle-BG2vZMIz.js","assets/issue-blockers-t3wlvg4M.js","assets/eye-D8HiVtuU.js","assets/refresh-cw-CfzWP9se.js","assets/IssueReferencePill-BTH42QmE.js","assets/query-placeholder-data-Bg4z2kcq.js","assets/SourceTrustBadge-BYpC1Kw9.js","assets/badge-check-BNLpGDnd.js","assets/circle-alert-C7T1cdKm.js","assets/shield-alert-BAXWoBTh.js","assets/InlineBanner-DYx7A02D.js","assets/runRetryState-p_i4Mh7u.js","assets/review-policy-B1PowuVV.js","assets/user-check-DcbSRa0r.js","assets/user-minus-DSZK8_9n.js","assets/separator-6cvFqhvW.js","assets/issue-workspace-selection-BY0sBaN6.js","assets/list-filter-BjVYqW16.js","assets/trash-QxFF084e.js","assets/select-DNiRU1d9.js","assets/chevron-up-C1TOE3pP.js","assets/chip-yHjfSD46.js","assets/card-BVZvs7aX.js","assets/useAutosaveIndicator-D3owckCV.js","assets/FoldCurtain-H4DNjYLl.js","assets/line-diff-DAcZgvm2.js","assets/DocumentFrameHeader-B8A6eaJb.js","assets/Dashboard-B0JjQSAg.js","assets/flask-conical-BxspRG7d.js","assets/layout-dashboard-CGcwI_3-.js","assets/MootMark-BZOhYsK8.js","assets/useSharedPolling-CFeiZe2t.js","assets/slots-DZ1hj5sG.js","assets/SidebarContext-bEtg0ItG.js","assets/plugins-C7Akvi81.js","assets/instance-settings-QXUWVmQs.js","assets/MetricCard-DlcBTKQs.js","assets/smoke-lab-matrix-Cjauo09x.js","assets/Companies-Cr0mZy2B.js","assets/Agents-BjPLaL-p.js","assets/useQueries-K6OPYBvC.js","assets/network-D_6qRf8m.js","assets/upload-Dk7oXJof.js","assets/useAgentChatEnabled-DMbd4JDE.js","assets/useHiddenSettings-D0HL2tkE.js","assets/health-Cn-5LIwb.js","assets/model-picker-fields-D_I_l2UI.js","assets/arrow-up-BMN1ZnS1.js","assets/adapter-display-registry-9qBBJi9B.js","assets/environments-xuhuvnTt.js","assets/managed-sandbox-environment-B8DewKvK.js","assets/AgentRoleEditor-DnibPmmw.js","assets/alert-dialog-DNbnZgRz.js","assets/EntityRow-B24YmFE7.js","assets/AgentDetail-NfA1gamX.js","assets/useInfiniteQuery-DTEIZ1gz.js","assets/ConnectionSetupFlow-g6asOGFg.js","assets/connection-identity-ch7QDvun.js","assets/queryClient-CojHFSot.js","assets/collapsible-D_rwONtV.js","assets/PathInstructionsModal-BJAqF7vQ.js","assets/arrow-left-CnGEiANj.js","assets/SearchableSelect-BbuRtdzg.js","assets/command-BnJHDVFJ.js","assets/searchable-select-fvMNMcqm.js","assets/environment-variables-editor-D6Ylcd74.js","assets/eye-off-DTXvEIMp.js","assets/save-Blub8a14.js","assets/user-round-B87hENhM.js","assets/model-DidtFy-U.js","assets/proposal-review-D9ye_2Px.js","assets/server-cog-cefxr54v.js","assets/secrets-D17QEm13.js","assets/inbox-BbL3s2C7.js","assets/link-2-Cn4f4xsG.js","assets/SetupWizard-92wVRG6Y.js","assets/skeleton-BAAoD7cz.js","assets/tools-MhVvhrz_.js","assets/AppLogo-BLq8BpKi.js","assets/assets-BOhIBphq.js","assets/toggle-switch-Dj5GORxn.js","assets/AgentMultiSelect-BlUaNdZZ.js","assets/radio-card-DCobJXTD.js","assets/JsonSchemaForm-Dkh3zdL9.js","assets/schema-config-fields-B8ha5h4A.js","assets/agent-config-primitives-BJlDiwaH.js","assets/AgentSetupPrompt-CaafK5_w.js","assets/dynamic-loader-ehitOaJV.js","assets/adapters-D3NHXckp.js","assets/use-adapter-capabilities-BNfGiTEP.js","assets/AgentCharacter-DAAMv7-c.js","assets/app-connect-policy-DqQf5knn.js","assets/responsible-user-denial-Dyl0BwU5.js","assets/ScrollToBottom-C_k4p-hC.js","assets/scroll-area-Ci3PubY2.js","assets/braces-CpXTT0w9.js","assets/chatEndpoints-Bj-keCuw.js","assets/ConfigureBuiltInAgentModal-reyr1Tds.js","assets/run-log-chunks-ZnzOvrXs.js","assets/IssueRecoveryActionCard-DeJbfGm1.js","assets/execution-projection-BGI5f3kX.js","assets/workspace-restore-BIbDC_O8.js","assets/model-fallback-CwykjJWn.js","assets/ResponsibleUserDenialNotice-dXyOLtYP.js","assets/user-x-CZ1ImNac.js","assets/omp-settings-model-B06pdqQR.js","assets/ChoiceControls-CzMMk2Iy.js","assets/SkillCardIcon-Byzb3JuD.js","assets/CopyText-BbOm2I6t.js","assets/MembershipAction-Esk0pndF.js","assets/log-in-C4giPkVk.js","assets/AgentActionButtons-BBhJXLbY.js","assets/TrustPresetSection-DCiCKRh0.js","assets/EnforcementBanner-qtVCLyJo.js","assets/shared-BjSrBoPt.js","assets/OmpAllSettings-DTJLATQL.js","assets/Projects-B6UgAQ3Z.js","assets/ProjectDetail-OirlXEA4.js","assets/link-0uKX-OmT.js","assets/BudgetPolicyCard-CbkwslmQ.js","assets/AccessSelectIdentity-C-iVX_EX.js","assets/InlineEditor-BJTE1pyF.js","assets/SummarySlotCard-DlwG6iRT.js","assets/useSummaryDraftStream-DOcsGLEm.js","assets/budgets-C2LtVWph.js","assets/ProjectWorkspacesContent-DRAIVofy.js","assets/ProjectWorkspaceDetail-C9_liq4q.js","assets/MissingPluginTabPlaceholder-l1R-Q4nh.js","assets/Workspaces-uDkUYVN3.js","assets/Issues-DtYFX9i_.js","assets/Inbox-BzkFmAxU.js","assets/issue-filters-Ce8v1l6U.js","assets/ApprovalPayload-C7jnoOLa.js","assets/scroll-text-DfBz82Kz.js","assets/useSecondTick-BRYNTPNI.js","assets/LiveNowTodoLine-IsmhMx5O.js","assets/AgentTodoCard-CGUyYht3.js","assets/Search-DjpKZIsB.js","assets/file-question-mark-BCVjQ2mM.js","assets/IssueDetail-C0hCFL-i.js","assets/IssueWriteDenialNotice-Bf0ZFSBV.js","assets/TerminalView-7diHxQOx.js","assets/clipboard-paste-B7AvxL_k.js","assets/rotate-cw-D1cKBtZK.js","assets/terminal-font-B-qtwS34.js","assets/cloud-DX1fkQ6i.js","assets/file-search-Ccb88q3t.js","assets/folder-search-B_Hz17IO.js","assets/IssueThreadInteractionCard-D9QAYhuJ.js","assets/plug-UFf0xCI3.js","assets/interaction-card-visibility-CUHRz7le.js","assets/interaction-audience-B74UGNaN.js","assets/AgentMailCredentialField-DNclWIul.js","assets/radio-BqjASC1E.js","assets/settings-DuRZr7gk.js","assets/browser-use-BwBUHG71.js","assets/TaskTreeControls-CRzAjVlt.js","assets/code-xml-CZhhm_-P.js","assets/IssueChatThread-qDc-9yA9.js","assets/ComposerAddMenu-BPPkbm0o.js","assets/CommentAttributionChip-BdllZVtJ.js","assets/issueActiveRun-s6f-GUHq.js","assets/ApprovalCard-DyxP9tMM.js","assets/issue-share-W3K_cYZY.js","assets/artifacts-4t_LL-lA.js","assets/activity-format-CYYHRbLo.js","assets/AgentChats-56CMlXmb.js","assets/recent-agent-chats-BUso0Smv.js","assets/AgentChat--rcr73Ls.js","assets/agentChats-C8o51WiF.js","assets/IssueChatLongThreadPerf-BJ_Hr2PT.js","assets/Routines-pnhQk9RN.js","assets/audit-navigation-IalprBz0.js","assets/FolderControls-DI7QVvPv.js","assets/RoutineRunVariablesDialog-C8OHcazq.js","assets/Pipelines-DAuqtVqc.js","assets/pipeline-stage-presentation-DDdch-G7.js","assets/folder-git-2-igHQBSOf.js","assets/pipelines-0Lb8D7gt.js","assets/PipelineSettings-BgfMR73P.js","assets/RoutineVariablesEditor-CHogduM9.js","assets/StatusCards-Bqkb18QJ.js","assets/wand-sparkles-CONrztQy.js","assets/PixelsOffice-CaQYQilp.js","assets/coins-DeD2KB8A.js","assets/AttentionInteractionResolver-DUg8FwhJ.js","assets/RoutineDetail-DPzql29w.js","assets/pen-line-CKsWWDy2.js","assets/webhook-nurKUWEn.js","assets/WebhookUrlWarning-CbkWHsPb.js","assets/RoutineActivityRow-D16b-qFh.js","assets/UserProfile-CEpSKMzS.js","assets/ExecutionWorkspaceDetail-BxA_kWKs.js","assets/Goals-UrfBAjOT.js","assets/GoalTree-BZUt4xZ3.js","assets/Artifacts-47GmGXVx.js","assets/GoalDetail-C-uH9eNu.js","assets/Approvals-CF4K0bD1.js","assets/ApprovalDetail-Cxhx_U0d.js","assets/CompanyActivity-BhNtXl8c.js","assets/AuditHub-DNmGrEzV.js","assets/arrow-down-left-B8lHKNrs.js","assets/decision-models-DBtkxtYF.js","assets/fast-responses-B5vx8axv.js","assets/QuotaBar-Ch_rM0X1.js","assets/WhatNeedsMe-D0yh5L5H.js","assets/DecisionDateChips-BaRZkOU2.js","assets/sun-2LJX7Tad.js","assets/DecisionQueuePage-DtzH_oQI.js","assets/BoardChat-BenJSqr6.js","assets/circle-slash-DP3-64k6.js","assets/send-DfQbMfo9.js","assets/CompanySettings-C6FNik3j.js","assets/DecisionModelSettings-HEZJ0E6n.js","assets/CompanyConnections-BwCkXXZK.js","assets/CompanyEnvironments-CyrghjsN.js","assets/BootstrapSetupUxLab-DO03bmwI.js","assets/ResponsibleUserDenialUxLab-DGWo-GoD.js","assets/CrossIssueCollaborationUxLab-D2bB9GTl.js","assets/CompanySettingsPluginPage-DPHNF4sp.js","assets/CompanyAccess-BQZD0MZf.js","assets/AdvancedToolsRoute-Bg4KowJU.js","assets/power-CJfOYd7k.js","assets/profile-summary-BwdvqPGE.js","assets/useProfilesData-Bs6IpD6I.js","assets/ProfileWizardRoute-DvOWuvrG.js","assets/ToolsAdminGate-C5dQpL4C.js","assets/ProfileDetailRoute-YzeVN0Ko.js","assets/Browse-gMVDtSCz.js","assets/ManagedAiConnectionDetails-BrX9Q9t2.js","assets/retired-composio-DrxhEOpx.js","assets/connection-owner-rjoh3jce.js","assets/AssistantConnection-BCrEgmJR.js","assets/AppsConnect-D7l2xnv-.js","assets/skill-source-connect-return-C3vV7DQP.js","assets/ChatEndpointSetup-CTntfzjg.js","assets/EmailEndpointSetup-hb_Hewoa.js","assets/OpenwaGatewayManager-BQpxxJOa.js","assets/ChatEndpointDetail-DPiCCvto.js","assets/EmailConnectionAccess-BcI7_br0.js","assets/ChatIdentityConfirm-Dc4AnYX8.js","assets/AppsReview-Chv6Jms5.js","assets/ReviewQueueCard-MNEVuxSA.js","assets/AppDetail-CwyYWsvw.js","assets/AppNotConnected-DzDZR0-8.js","assets/GatewaysList-Ad1dZuwC.js","assets/CopyableGatewayUrl-B4EYBk9t.js","assets/GatewayDetail-CUcpw4Hj.js","assets/CompanySkills-DsgjKlp7.js","assets/SkillBinaryFile-N7sK2ZTh.js","assets/company-skill-routes-D5LJ1l8M.js","assets/SkillSources-CYYp9Mds.js","assets/SkillSourceTree-Cuv3EWpo.js","assets/SkillStudio-Dl28fokd.js","assets/AgentIconPicker-BJerBmcL.js","assets/resizable-panels-DkafPiQi.js","assets/IssueOutputSection-D7QbMiqq.js","assets/Secrets-BOZydXaY.js","assets/CompanyImport-5M7yWHR-.js","assets/agent-order-BE-pAWdx.js","assets/sidebarPreferences-CIMvMX-W.js","assets/portable-files-CloN_vbk.js","assets/DesignGuide-CXHLyL_C.js","assets/RepositoryEditor-BuV4JRgV.js","assets/ThemeToggle-BzQNYD1J.js","assets/InstanceFeatures-C1eqcxDI.js","assets/useInstanceFeatureSettings-1h06E3Mh.js","assets/AgentDefaults-C0WFwQky.js","assets/ModelsAndProviders-C7VZHvPR.js","assets/InstanceAdvanced-DYZ50o97.js","assets/InstanceAccess-D4ZbGCeK.js","assets/ProfileSettings-BLh9EdSK.js","assets/PluginManager-DkADWuR8.js","assets/PluginSettings-D365WG22.js","assets/AdapterManager-C59AKY0f.js","assets/PluginPage-C-W3lTd9.js","assets/NewAgent-BzZI-FBE.js","assets/Auth-D0lGuVnd.js","assets/invite-memory-CHGcQdLs.js","assets/BoardClaim-CbYY66Qd.js","assets/McpConnect-BYYMfbhs.js","assets/CliAuth-CatEsBxW.js","assets/InviteLanding-Bqp1ulQV.js","assets/PublicIssueSharePage-Cg0GqSVM.js","assets/JoinRequestQueue-DyPP4DL2.js","assets/CompanyExport-BlQuIvDU.js","assets/Terminal-YAhWrMv9.js"])))=>i.map(i=>d[i]);
2
+ var pE=Object.defineProperty;var r=(e,t)=>pE(e,"name",{value:t,configurable:!0});import{i as m0,n as mE,t as go}from"./rolldown-runtime-ZpX3ckPj.js";import{Ar as hE,At as gE,Bi as h0,C as Zk,Fr as Zh,Hi as Bc,Ir as xE,Ji as bE,Lt as vE,Ni as yE,Nr as jE,Or as wE,Ot as kE,P as SE,Pi as NE,Pr as Jk,Qt as g0,Yi as zy,_ as CE,_n as AE,ci as e1,i as Dd,kr as _E,kt as t1,l as Y,la as EE,li as Xs,n as n1,r as dr,rr as IE,t as He,ua as x0,ui as a1,vn as TE,w as Py,x as RE,zt as qd}from"./createLucideIcon-CgrPXnTY.js";import{l as s1}from"./dist-DYoIyA63.js";import{t as ke}from"./preload-helper-CceJXRIF.js";import{_ as ME,a as Jh,c as DE,d as xo,f as L,h as hn,n as eg,p as OE,r as _i,s as LE,t as b0,v as zs,y as i1}from"./star-eem0qj3E.js";import{J as v0,X as kn,Y as zE,_ as Bt,c as Pr,d as y0,f as PE,g as r1,h as Kc,n as Ii,r as je,t as P,u as $E,v as me}from"./queryKeys-BzT8CD34.js";import{t as Af}from"./queryClient-CojHFSot.js";import{t as _f}from"./useQueries-K6OPYBvC.js";import{a as UE,c as BE,i as j0,l as KE,o as Zn,u as $y}from"./companies-query-BEdFiAhG.js";import{H as l1,I as Uy,M as qE,g as FE,gt as HE,h as VE,ht as WE,mt as QE,n as GE}from"./ConnectionSetupFlow-g6asOGFg.js";import{t as o1}from"./issue-attribution-DfN_3u2W.js";import{t as YE}from"./execution-projection-BGI5f3kX.js";import{C as c1,D as XE,O as ZE,T as JE,d as u1,f as w0,k as tg,w as d1}from"./connection-identity-ch7QDvun.js";import{n as vt,r as eI,t as tI}from"./CompanyContext-fQCNWI_f.js";import{A as nI,B as Fd,Bt as aI,C as sI,Ct as iI,E as rI,G as Ef,H as lI,J as oI,Jt as ng,L as ld,O as cI,Q as f1,Qt as uI,Rt as dI,Ut as Hd,Yt as k0,Z as By,_t as fI,an as pI,b as mI,dt as p1,f as Vd,i as hI,in as gI,n as m1,nt as Jm,o as ja,on as xI,ot as hc,p as If,q as S0,r as We,t as mn,tt as Tf,u as h1,ut as g1,v as x1,zt as on}from"./router-BKzUF9uf.js";import{t as bI}from"./dist-Cfwg8Fpq.js";import{n as b1,r as vI,t as v1}from"./collapsible-D_rwONtV.js";import{a as y1,c as j1,i as w1,l as yI,n as k1,o as S1,r as N1,s as C1,t as A1}from"./alert-dialog-DNbnZgRz.js";import{a as Wd,n as Qd,t as Gd}from"./avatar-qO_h93F8.js";import{t as Qs}from"./checkbox-Cf2_HXDG.js";import{a as _1,c as Ei,i as Sn,n as Ky,o as jI,p as Jr,r as el,s as wI,t as tl}from"./dropdown-menu-rUbU8QKw.js";import{t as kI}from"./scroll-area-Ci3PubY2.js";import{i as SI,r as NI,t as CI}from"./tabs-CjHzZxtD.js";import{a as AI,o as _I,r as EI,s as II,t as E1}from"./MarkdownEditor-ubJimjUH.js";import{o as vs,r as ys,t as js}from"./popover-CWlBonqy.js";import{t as Rf}from"./activity-BwGRpduS.js";import{n as TI}from"./PathInstructionsModal-BJAqF7vQ.js";import{t as I1}from"./archive-CvT6i844.js";import{t as RI}from"./arrow-down-C_oYEUXL.js";import{t as N0}from"./arrow-left-CnGEiANj.js";import{t as MI}from"./arrow-right-W0iJ_-Zs.js";import{t as DI}from"./arrow-up-down-Ci6AcwB0.js";import{t as OI}from"./arrow-up-right-CFNgVoQj.js";import{t as T1}from"./arrow-up-BMN1ZnS1.js";import{t as R1}from"./book-open-i_DxEUXC.js";import{t as Nc}from"./bot-kSfD9MPZ.js";import{t as M1}from"./boxes-DVB7wdRh.js";import{t as LI}from"./braces-CpXTT0w9.js";import{t as zI}from"./calendar-clock-CXtB0BA2.js";import{t as Rs}from"./check-Bis3vECb.js";import{t as Qr}from"./chevron-down-nRcQ7bok.js";import{t as D1}from"./chevron-left-DnUVccc_.js";import{t as cr}from"./chevron-right-BP8JjEC_.js";import{t as PI}from"./chevron-up-C1TOE3pP.js";import{n as O1,t as $I}from"./SearchableSelect-BbuRtdzg.js";import{t as L1}from"./circle-alert-C7T1cdKm.js";import{t as Yd}from"./circle-dot-EfQ00xK3.js";import{t as ag}from"./circle-question-mark-CasEGiDp.js";import{t as UI}from"./circle-DCDVf2v0.js";import{t as sg}from"./AgentIconPicker-BJerBmcL.js";import{a as BI,c as KI,d as ig,i as eh,l as qI,n as FI,o as z1,r as HI,s as VI,t as WI,u as od}from"./ComposerAddMenu-BPPkbm0o.js";import{t as QI}from"./clipboard-paste-B7AvxL_k.js";import{t as GI}from"./clock-D2UFngg7.js";import{C as YI,D as XI,F as ZI,O as P1,P as qy,k as JI,t as e3,w as t3}from"./MarkdownBody-D7qCQaU_.js";import{t as n3}from"./columns-3-CsveFAYd.js";import{t as a3}from"./copy-C1cfcpxY.js";import{n as s3,t as i3}from"./package-G5arH6JJ.js";import{t as Mf}from"./ellipsis-DyXbAp4P.js";import{t as $1}from"./external-link-BIcMNNSN.js";import{a as r3,d as l3,f as o3,g as c3,h as u3,i as d3,l as f3,m as p3,p as m3,u as h3}from"./task-chat-attachments-DNPQ-jOG.js";import{t as U1}from"./file-code-corner-CwcL9g2p.js";import{t as B1}from"./file-text-CsPKrMTp.js";import{t as C0}from"./flag-i_D610oD.js";import{t as g3}from"./flask-conical-BxspRG7d.js";import{t as K1}from"./folder-open-Dkshp3J4.js";import{t as x3}from"./funnel-BoiZeTWw.js";import{t as b3}from"./git-pull-request-DXoACxvx.js";import{t as A0}from"./inbox-BbL3s2C7.js";import{t as _0}from"./key-round-CGxQxRtN.js";import{t as E0}from"./layout-dashboard-CGcwI_3-.js";import{t as v3}from"./link-2-Cn4f4xsG.js";import{r as Ta,t as oe}from"./button-DI4w5WP7.js";import{t as y3}from"./RepositoryEditor-BuV4JRgV.js";import{t as q1}from"./maximize-2-c8H5WcEB.js";import{t as j3}from"./minus-BttANimQ.js";import{n as Ms,t as w3}from"./ThemeToggle-BzQNYD1J.js";import{t as F1}from"./network-D_6qRf8m.js";import{t as I0}from"./play-Czm7OCYh.js";import{t as ns}from"./plus-CwNlqadt.js";import{t as nl}from"./refresh-cw-CfzWP9se.js";import{t as H1}from"./repeat-DzPORJjX.js";import{t as gc}from"./rotate-ccw-DpzLJhXT.js";import{t as k3}from"./scroll-text-DfBz82Kz.js";import{t as fr}from"./search-CgZSuGC8.js";import{t as S3}from"./send-DfQbMfo9.js";import{t as V1}from"./settings-DuRZr7gk.js";import{t as N3}from"./shield-alert-BAXWoBTh.js";import{t as Cc}from"./shield-check-RPyaLAc-.js";import{t as C3}from"./shield-question-mark-Dl8dxzUU.js";import{t as A3}from"./shield-DC6LuDUy.js";import{t as _3}from"./square-CDo6rOf8.js";import{t as W1}from"./terminal-i6UlT3R6.js";import{t as rg}from"./trash-QxFF084e.js";import{t as ni}from"./triangle-alert-CnHMpmva.js";import{t as E3}from"./upload-Dk7oXJof.js";import{t as I3}from"./user-round-B87hENhM.js";import{t as so}from"./user-D5V640s5.js";import{t as Gr}from"./users-CEZ1U5q9.js";import{t as ia}from"./x-6E1yeU3Q.js";import{a as T3,i as R3,n as M3,r as D3}from"./SetupWizard-92wVRG6Y.js";import{i as O3,n as L3,r as Jn,t as z3}from"./SidebarContext-bEtg0ItG.js";import{t as T0}from"./MootMark-BZOhYsK8.js";import{a as Df,c as P3,i as $3,n as Ye,o as Fy,r as U3,s as B3,t as Q1}from"./SidebarNavItem-afEXEFeo.js";import{n as oo,t as lr}from"./primary-sidebar-styles-BdMiagDc.js";import{i as Es,n as Is,r as K3,t as Ts}from"./tooltip-CW50mEoC.js";import{t as Dn}from"./badge-jeXr866I.js";import{n as q3,t as lg}from"./Identity-8eG_HXAH.js";import{t as pr}from"./AgentAvatar-BZiiDlCN.js";import{a as Ti,n as Of,o as F3,r as H3,t as V3}from"./ToastContext-DyVJ6bCh.js";import{t as Fa}from"./agents-B8n-p0aX.js";import{t as Lf}from"./heartbeats-D96c9g2n.js";import{t as pa}from"./instanceSettings-D1nNVWU0.js";import{a as th,c as W3,i as Q3,l as G3,n as Hy,o as nh,r as Y3,s as og,t as Vy}from"./agent-order-BE-pAWdx.js";import{n as Ac,t as _c}from"./useSharedPolling-CFeiZe2t.js";import{m as X3,s as Z3}from"./inboxArchiveCache-CxaLM1R8.js";import{n as Wy,t as mr}from"./projects-l3kQxnTp.js";import{t as zf}from"./useAgentChatEnabled-DMbd4JDE.js";import{a as bo,i as Pf,n as Ps,o as J3,r as vo,s as Ds,t as ws}from"./dialog-CeH7rDcv.js";import{t as Wn}from"./input-BBNGmECW.js";import{t as ei}from"./access-DhB95qNC.js";import{a as eT,c as cg,d as tT,f as Qy,h as tr,i as nT,l as aT,m as Gy,n as sT,o as iT,p as ah,r as G1,s as ug,t as dg,u as Xd}from"./issue-filters-Ce8v1l6U.js";import{a as io,n as Y1,r as Vr,t as Kr}from"./assignees-DkQNbPzi.js";import{t as R0}from"./plugins-C7Akvi81.js";import{n as rT,r as lT,t as ar}from"./instance-settings-QXUWVmQs.js";import{a as oT,c as M0,d as cT,f as uT,i as Yy,l as dT,m as fT,n as fg,o as qc,p as pT,r as mT,s as hT,t as D0,u as gT}from"./slots-DZ1hj5sG.js";import{t as Fc}from"./health-Cn-5LIwb.js";import{t as hr}from"./useHiddenSettings-D0HL2tkE.js";import{t as Zd}from"./sidebarPreferences-CIMvMX-W.js";import{t as rt}from"./skeleton-BAAoD7cz.js";import{t as X1}from"./chatEndpoints-Bj-keCuw.js";import{t as Yl}from"./tools-MhVvhrz_.js";import{t as xT}from"./AppLogo-BLq8BpKi.js";import{r as bT}from"./audit-navigation-IalprBz0.js";import{t as vT}from"./routines-DteAuK7S.js";import{t as yT}from"./github-icon-Cf0axVvi.js";import{n as Z1,t as jT}from"./BreadcrumbContext-DNbB7zWn.js";import{a as O0,c as sr,i as Ys,l as wT,n as kT,o as wn,r as L0,s as z0,t as J1}from"./command-BnJHDVFJ.js";import{t as co}from"./AgentIdentity-DBHRFgMM.js";import{t as pg}from"./secrets-D17QEm13.js";import{t as eS}from"./textarea-CTx68BDs.js";import{t as tS}from"./assets-BOhIBphq.js";import{n as ST,r as NT}from"./recent-selections-BnN_nb6Y.js";import{a as Jd,i as ef,n as mg,r as nS,t as CT}from"./recent-assignees-DmalYaLf.js";import{t as AT}from"./attachment-icon-_1iz_saB.js";import{t as aS}from"./toggle-switch-Dj5GORxn.js";import{n as _T,t as ET}from"./presentation-mode-ZjtUUsSS.js";import{a as sh,c as Xy,d as $r,g as cd,h as Zy,m as Ci,o as IT,s as Jy,t as TT,v as ej}from"./TaskChatComposerTakeoverContext-C68QVO36.js";import{t as RT}from"./interaction-card-visibility-CUHRz7le.js";import{r as MT}from"./useMobileEntityPickerViewportStyle-BG2vZMIz.js";import{i as tj,n as DT,t as OT}from"./color-contrast-BHHcEMtO.js";import{t as P0}from"./InlineEntitySelector-BboofK18.js";import{r as LT}from"./searchable-select-fvMNMcqm.js";import{t as nj}from"./InlineBanner-DYx7A02D.js";import{t as hg}from"./select-DNiRU1d9.js";import{t as zT}from"./chip-yHjfSD46.js";import{t as PT}from"./environments-xuhuvnTt.js";import{t as $0}from"./clipboard-CTLKYvRL.js";import{n as $T,r as UT,t as BT}from"./AgentSetupPrompt-CaafK5_w.js";import{t as U0}from"./usePrefersReducedMotion-BLkUT2m6.js";import{t as KT}from"./use-copy-action-DFzauB4H.js";import{i as qT}from"./app-connect-policy-DqQf5knn.js";import{n as FT,t as HT}from"./segmented-tuNVx49H.js";import{t as Hc}from"./card-BVZvs7aX.js";import{t as sS}from"./agentChats-C8o51WiF.js";import{t as VT}from"./ThemeContext-Ca30E6O4.js";import{t as Js}from"./StatusIcon-Bx4H7RuA.js";import{a as WT,d as QT,i as GT,l as YT,s as XT,t as ZT}from"./issue-blockers-t3wlvg4M.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 iS(e){return(typeof e=="string"?e:e?.name??"").trim()}r(iS,"rawNameOf");function rS(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(rS,"looksLikeNetworkAddress");function gg(e){return e.split(/[\s._-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}r(gg,"titleCaseIdentifier");function JT(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,""),gg(s)||"Custom app"}r(JT,"pluginPackageLabel");function eR(e,t={}){const s=t.title?.trim();if(s)return s;const l=iS(e);if(!l||rS(l))return"Custom app";const c=JT(l);if(c)return c;if(l.includes(":")&&!l.includes("://")){const u=l.slice(l.lastIndexOf(":")+1).trim();if(u)return gg(u)}return/\s/.test(l)||/[A-Z]/.test(l)?l:/[._-]/.test(l)?gg(l):l}r(eR,"humanizeConnectionDisplayName");function ZQ(e){const t=iS(e);return t&&rS(t)?`hosted at ${t}`:null}r(ZQ,"connectionDisplaySecondaryHint");var tR=864e5;function Xl(e){return e?.phase==="waiting"||e?.phase==="installing"}r(Xl,"isUpdateJobActive");function nR(e){return e+3*tR}r(nR,"updateNoticeHiddenUntil");function aR(e,t){return typeof e=="number"&&Number.isFinite(e)&&t<e}r(aR,"isUpdateNoticeHidden");var lS={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"}]]};lS.node;var sR=He(lS),oS={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"}]]};oS.node;var iR=He(oS),cS={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"}]]};cS.node;var rR=He(cS),uS={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"}]]};uS.node;var lR=He(uS),dS={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"]};dS.node;var aj=He(dS),fS={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"]};fS.node;var B0=He(fS),pS={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"]};pS.node;var mS=He(pS),hS={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"]};hS.node;var oR=He(hS),gS={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};gS.node;var xS=He(gS),bS={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"]};bS.node;var cR=He(bS),vS={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"}]]};vS.node;var yS=He(vS),jS={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"}]]};jS.node;var xg=He(jS),wS={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"}]]};wS.node;var uR=He(wS),kS={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"]};kS.node;var dR=He(kS),SS={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"}]]};SS.node;var fR=He(SS),NS={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"}]]};NS.node;var pR=He(NS),CS={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"}]]};CS.node;var mR=He(CS),AS={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"]};AS.node;var hR=He(AS),_S={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"}]]};_S.node;var gR=He(_S),ES={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"]};ES.node;var xR=He(ES),IS={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"}]]};IS.node;var bR=He(IS),TS={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"}]]};TS.node;var vR=He(TS),RS={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"}]]};RS.node;var bg=He(RS),MS={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"}]]};MS.node;var DS=He(MS),OS={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"}]]};OS.node;var yR=He(OS),LS={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"}]]};LS.node;var zS=He(LS),PS={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"}]]};PS.node;var jR=He(PS),$S={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"}]]};$S.node;var $f=He($S),US={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};US.node;var BS=He(US),KS={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"}]]};KS.node;var vg=He(KS),qS={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"}]]};qS.node;var wR=He(qS),FS={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"}]]};FS.node;var kR=He(FS),HS={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"}]]};HS.node;var VS=He(HS),WS={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"}]]};WS.node;var SR=He(WS),QS={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"}]]};QS.node;var GS=He(QS),YS={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"}]]};YS.node;var XS=He(YS),ZS={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"}]]};ZS.node;var NR=He(ZS),JS={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"}]]};JS.node;var CR=He(JS),eN={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"}]]};eN.node;var K0=He(eN),tN={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"}]]};tN.node;var AR=He(tN),nN={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"]};nN.node;var q0=He(nN),aN={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"}]]};aN.node;var _R=He(aN),sN={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"}]]};sN.node;var ER=He(sN),iN={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"}]]};iN.node;var IR=He(iN),rN={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"}]]};rN.node;var TR=He(rN),lN={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"}]]};lN.node;var oN=He(lN),cN={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"]};cN.node;var RR=He(cN),uN={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"]};uN.node;var F0=He(uN),dN={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"]};dN.node;var MR=He(dN),fN={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"]};fN.node;var DR=He(fN),pN={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"}]]};pN.node;var OR=He(pN),mN={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"}]]};mN.node;var LR=He(mN),hN={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"}]]};hN.node;var gN=He(hN),xN={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"}]]};xN.node;var zR=He(xN),bN={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"}]]};bN.node;var vN=He(bN),yN={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"}]]};yN.node;var PR=He(yN),jN={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"}]]};jN.node;var $R=He(jN),Zl=m0(s1()),x=m0(x0(),1),wN="wardmote.staleChunkReload";function UR(){try{return window.sessionStorage}catch{return null}}r(UR,"sessionStore");function BR(e){try{e?.removeItem(wN)}catch{return}}r(BR,"clearReloadMark");function KR(e,t){if(!e)return!1;try{return e.getItem("wardmote.staleChunkReload")===t?!1:(e.setItem(wN,t),!0)}catch{return!1}}r(KR,"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?UR():t.storage;try{const u=await e();return BR(c),{default:u}}catch(u){if(!KR(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"),ih=r(e=>e==null?"":String(e),"makeString"),qR=r((e,t,s)=>{e.forEach(l=>{t[l]&&(s[l]=t[l])})},"copy"),FR=/###/g,sj=r(e=>e&&e.includes("###")?e.replace(FR,"."):e,"cleanKey"),ij=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(ij(e))return{};const u=sj(l[c]);!e[u]&&s&&(e[u]=new s),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++c}return ij(e)?{}:{obj:e,k:sj(l[c])}},"getLastOfPath"),rj=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"),HR=r((e,t,s,l)=>{const{obj:c,k:u}=xc(e,t,Object);c[u]=c[u]||[],c[u].push(s)},"pushPath"),tf=r((e,t)=>{const{obj:s,k:l}=xc(e,t);if(s&&Object.prototype.hasOwnProperty.call(s,l))return s[l]},"getPath"),VR=r((e,t,s)=>{const l=tf(e,s);return l!==void 0?l:tf(t,s)},"getPathWithDefaults"),kN=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]):kN(e[l],t[l],s):e[l]=t[l]);return e},"deepExtend"),Ai=r(e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),"regexEscape"),WR={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},QR=r(e=>nt(e)?e.replace(/[&<>"'\/]/g,t=>WR[t]):e,"escape"),GR=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}},YR=[" ",",","?","!",";"],XR=new GR(20),ZR=r((e,t,s)=>{t=t||"",s=s||"";const l=YR.filter(p=>!t.includes(p)&&!s.includes(p));if(l.length===0)return!0;const c=XR.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"),yg=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"),JR={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)}},eM=class jg{static{r(this,"Logger")}constructor(t,s={}){this.init(t,s)}init(t,s={}){this.prefix=s.prefix||"i18next:",this.logger=t||JR,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 jg(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new jg(this.logger,t)}},Zs=new eM,Uf=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)})}},lj=class extends Uf{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=tf(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:yg(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),rj(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=tf(this.data,p)||{};u.skipCopy||(s=JSON.parse(JSON.stringify(s))),l?kN(f,s,c):f={...f,...s},rj(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}},SN={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}},NN=Symbol("i18next/PATH_KEY");function tM(){const e=[],t=Object.create(null);let s;return t.get=(l,c)=>(s?.revoke?.(),c===NN?e:(e.push(c),s=Proxy.revocable(l,t),s.proxy)),Proxy.revocable(Object.create(null),t).proxy}r(tM,"createProxy");function ro(e,t){const{[NN]:s}=e(tM()),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 rh=r(e=>!nt(e)&&typeof e!="boolean"&&typeof e!="number","shouldHandleAsObject"),oj=class CN extends Uf{static{r(this,"Translator")}constructor(t,s={}){super(),qR(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Zs.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=rh(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&&!ZR(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=CN.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=rh(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:rh(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=SN.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}},cj=class{static{r(this,"LanguageUtil")}constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zs.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}},uj={zero:0,one:1,two:2,few:3,many:4,other:5},dj={select:r(e=>e===1?"one":"other","select"),resolvedOptions:r(()=>({pluralCategories:["one","other"]}),"resolvedOptions")},nM=class{static{r(this,"PluralResolver")}constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Zs.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!"),dj;if(!e.match(/-|_/))return dj;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)=>uj[l]-uj[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))}},fj=r((e,t,s,l=".",c=!0)=>{let u=VR(e,t,s);return!u&&c&&nt(s)&&(u=yg(e,s,l),u===void 0&&(u=yg(t,s,l))),u},"deepFindWithDefaults"),pj=r(e=>e.replace(/\$/g,"$$$$"),"regexSafe"),mj=class{static{r(this,"Interpolator")}constructor(e={}){this.logger=Zs.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:QR,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=l!==void 0?l:!1,this.prefix=c?Ai(c):u||"{{",this.suffix=p?Ai(p):f||"}}",this.formatSeparator=h||",",this.unescapePrefix=g?"":v?Ai(v):"-",this.unescapeSuffix=this.unescapePrefix?"":g?Ai(g):"",this.nestingPrefix=y?Ai(y):j||Ai("$t("),this.nestingSuffix=k?Ai(k):S||Ai(")"),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=fj(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(fj(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=ih(u));const k=y.safeValue(u);if(e=e.replace(c[0],pj(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(`${Ai(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=ih(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],pj(ih(c))),this.regexp.lastIndex=0}return e}},aM=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"),hj=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"),sM=r(e=>(t,s,l)=>e(Ec(s),l)(t),"createNonCachedFormatter"),iM=class{static{r(this,"Formatter")}constructor(e={}){this.logger=Zs.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const s=t.cacheInBuiltFormats?hj:sM;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()]=hj(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}=aM(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)}},rM=r((e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},"removePending"),lM=class extends Uf{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=Zs.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=>{HR(f.loaded,[c],u),rM(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)}}},lh=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"),gj=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"),oM=r(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]=="function"&&(e[t]=e[t].bind(e))})},"bindMemberFunctions"),cM=class Od extends Uf{static{r(this,"I18n")}constructor(t={},s){if(super(),this.options=gj(t),this.services={},this.logger=Zs,this.modules={external:[]},oM(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=lh();this.options={...l,...this.options,...gj(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?Zs.init(c(this.modules.logger),this.options):Zs.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:f=iM;const h=new cj(this.options);this.store=new lj(this.options.resources,this.options);const g=this.services;g.logger=Zs,g.resourceStore=this.store,g.languageUtils=h,g.pluralResolver=new nM(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 mj(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new lM(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 oj(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"&&SN.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 cj(lh());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 Od(t,s);return l.createInstance=Od.createInstance,l}cloneInstance(t={},s=ud){const l=t.forkResourceStore;l&&delete t.forkResourceStore;const c={...this.options,...t,isClone:!0},u=new Od(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 lj(p,c),u.services.resourceStore=u.store}if(t.interpolation){const p={...lh().interpolation,...this.options.interpolation,...t.interpolation},f={...c,interpolation:p};u.services.interpolator=new mj(f)}return u.translator=new oj(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}}},Ra=cM.createInstance(),JQ=Ra.createInstance,eG=Ra.dir,tG=Ra.init,nG=Ra.loadResources,aG=Ra.reloadResources,sG=Ra.use,iG=Ra.changeLanguage,rG=Ra.getFixedT,lG=Ra.t,oG=Ra.exists,cG=Ra.setDefaultNamespace,uG=Ra.hasLoadedNamespace,dG=Ra.loadNamespaces,fG=Ra.loadLanguages,uM=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"),xj={},Ld=r((e,t,s,l)=>{Yr(s)&&xj[s]||(Yr(s)&&(xj[s]=new Date),uM(e,t,s,l))},"warnOnce"),AN=r((e,t)=>()=>{if(e.isInitialized)t();else{const s=r(()=>{setTimeout(()=>{e.off("initialized",s)},0),t()},"initialized");e.on("initialized",s)}},"loadedClb"),wg=r((e,t,s)=>{e.loadNamespaces(t,AN(e,s))},"loadNamespaces"),bj=r((e,t,s,l)=>{if(Yr(s)&&(s=[s]),e.options.preload&&e.options.preload.indexOf(t)>-1)return wg(e,s,l);s.forEach(c=>{e.options.ns.indexOf(c)<0&&e.options.ns.push(c)}),e.loadLanguages(t,AN(e,l))},"loadLanguages"),dM=r((e,t,s={})=>!t.languages||!t.languages.length?(Ld(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"),fM=r(e=>typeof e=="object"&&e!==null,"isObject"),pM=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,mM={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},hM=r(e=>mM[e],"unescapeHtmlEntity"),gM=r(e=>e.replace(pM,hM),"unescape"),kg={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:gM,transDefaultProps:void 0},xM=r((e={})=>{kg={...kg,...e}},"setDefaults"),bM=r(()=>kg,"getDefaults"),_N,vM=r(e=>{_N=e},"setI18n"),yM=r(()=>_N,"getI18n"),jM={type:"3rdParty",init(e){xM(e.options.react),vM(e)}},wM=(0,x.createContext)(),kM=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)}},SM=go((e=>{var t=x0();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})),NM=go(((e,t)=>{t.exports=SM()})),CM=NM(),AM=r((e,t)=>{if(Yr(t))return t;if(fM(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"),_M={t:AM,ready:!1},EM=r(()=>()=>{},"dummySubscribe"),IM=r((e,t={})=>{const{i18n:s}=t,{i18n:l,defaultNS:c}=(0,x.useContext)(wM)||{},u=s||l||yM();u&&!u.reportNamespaces&&(u.reportNamespaces=new kM),u||Ld(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)(()=>({...bM(),...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 EM;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 _M;const B=!!(u.isInitialized||u.initializedStoreOnce)&&y.every(ce=>dM(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,CM.useSyncExternalStore)(k,N,N);(0,x.useEffect)(()=>{if(u&&!R&&!f){const B=r(()=>C(O=>O+1),"onLoaded");t.lng?bj(u,t.lng,y,B):wg(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)=>(Ld(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&&Ld(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?bj(u,t.lng,y,Q):wg(u,y,Q)})}return E},"useTranslation$1"),TM={noCompanies:{title:"أنشئ شركتك الأولى",description:"ابدأ بإنشاء شركة.",newCompany:"شركة جديدة"}},RM={app:TM},MM={noCompanies:{title:"আপনার প্রথম কোম্পানি তৈরি করুন",description:"একটি কোম্পানি তৈরি করে শুরু করুন।",newCompany:"নতুন কোম্পানি"}},DM={app:MM},OM={noCompanies:{title:"Vytvořte svou první společnost",description:"Začněte vytvořením společnosti.",newCompany:"Nová společnost"}},LM={app:OM},zM={noCompanies:{title:"Opret din første virksomhed",description:"Kom i gang ved at oprette en virksomhed.",newCompany:"Ny virksomhed"}},PM={app:zM},$M={noCompanies:{title:"Erstellen Sie Ihr erstes Unternehmen",description:"Beginnen Sie, indem Sie ein Unternehmen erstellen.",newCompany:"Neues Unternehmen"}},UM={app:$M},BM={noCompanies:{title:"Δημιουργήστε την πρώτη σας εταιρεία",description:"Ξεκινήστε δημιουργώντας μια εταιρεία.",newCompany:"Νέα εταιρεία"}},KM={app:BM},qM={noCompanies:{title:"Create your first organization",description:"Get started by creating an organization.",newCompany:"New Organization"}},H0={app:qM},FM={noCompanies:{title:"Crea tu primera empresa",description:"Comienza creando una empresa.",newCompany:"Nueva empresa"}},HM={app:FM},VM={noCompanies:{title:"اولین شرکت خود را ایجاد کنید",description:"با ایجاد یک شرکت شروع کنید.",newCompany:"شرکت جدید"}},WM={app:VM},QM={noCompanies:{title:"Luo ensimmäinen yrityksesi",description:"Aloita luomalla yritys.",newCompany:"Uusi yritys"}},GM={app:QM},YM={noCompanies:{title:"Gumawa ng iyong unang kumpanya",description:"Magsimula sa paggawa ng kumpanya.",newCompany:"Bagong Kumpanya"}},XM={app:YM},ZM={noCompanies:{title:"Créez votre première entreprise",description:"Commencez par créer une entreprise.",newCompany:"Nouvelle entreprise"}},JM={app:ZM},eD={noCompanies:{title:"צרו את החברה הראשונה שלכם",description:"התחילו ביצירת חברה.",newCompany:"חברה חדשה"}},tD={app:eD},nD={noCompanies:{title:"अपनी पहली कंपनी बनाएं",description:"कंपनी बनाकर शुरुआत करें.",newCompany:"नई कंपनी"}},aD={app:nD},sD={noCompanies:{title:"Hozza létre első vállalatát",description:"Kezdje egy vállalat létrehozásával.",newCompany:"Új vállalat"}},iD={app:sD},rD={noCompanies:{title:"Buat perusahaan pertama Anda",description:"Mulai dengan membuat perusahaan.",newCompany:"Perusahaan Baru"}},lD={app:rD},oD={noCompanies:{title:"Crea la tua prima azienda",description:"Inizia creando un'azienda.",newCompany:"Nuova azienda"}},cD={app:oD},uD={noCompanies:{title:"最初の会社を作成",description:"会社を作成して始めましょう。",newCompany:"新しい会社"}},dD={app:uD},fD={noCompanies:{title:"첫 회사를 만드세요",description:"회사를 만들어 시작하세요.",newCompany:"새 회사"}},pD={app:fD},mD={noCompanies:{title:"तुमची पहिली कंपनी तयार करा",description:"कंपनी तयार करून सुरुवात करा.",newCompany:"नवीन कंपनी"}},hD={app:mD},gD={noCompanies:{title:"Cipta syarikat pertama anda",description:"Mulakan dengan mencipta syarikat.",newCompany:"Syarikat Baharu"}},xD={app:gD},bD={noCompanies:{title:"Opprett ditt første selskap",description:"Kom i gang ved å opprette et selskap.",newCompany:"Nytt selskap"}},vD={app:bD},yD={noCompanies:{title:"Maak uw eerste bedrijf aan",description:"Begin door een bedrijf aan te maken.",newCompany:"Nieuw bedrijf"}},jD={app:yD},wD={noCompanies:{title:"ਆਪਣੀ ਪਹਿਲੀ ਕੰਪਨੀ ਬਣਾਓ",description:"ਕੰਪਨੀ ਬਣਾਕੇ ਸ਼ੁਰੂ ਕਰੋ।",newCompany:"ਨਵੀਂ ਕੰਪਨੀ"}},kD={app:wD},SD={noCompanies:{title:"Utwórz swoją pierwszą firmę",description:"Zacznij od utworzenia firmy.",newCompany:"Nowa firma"}},ND={app:SD},CD={noCompanies:{title:"Crie sua primeira empresa",description:"Comece criando uma empresa.",newCompany:"Nova empresa"}},AD={app:CD},_D={noCompanies:{title:"Crie a sua primeira empresa",description:"Comece por criar uma empresa.",newCompany:"Nova empresa"}},ED={app:_D},ID={noCompanies:{title:"Creați prima companie",description:"Începeți prin crearea unei companii.",newCompany:"Companie nouă"}},TD={app:ID},RD={noCompanies:{title:"Создайте свою первую компанию",description:"Начните с создания компании.",newCompany:"Новая компания"}},MD={app:RD},DD={noCompanies:{title:"Skapa ditt första företag",description:"Kom igång genom att skapa ett företag.",newCompany:"Nytt företag"}},OD={app:DD},LD={noCompanies:{title:"Unda kampuni yako ya kwanza",description:"Anza kwa kuunda kampuni.",newCompany:"Kampuni Mpya"}},zD={app:LD},PD={noCompanies:{title:"உங்கள் முதல் நிறுவனத்தை உருவாக்குங்கள்",description:"ஒரு நிறுவனத்தை உருவாக்கி தொடங்குங்கள்.",newCompany:"புதிய நிறுவனம்"}},$D={app:PD},UD={noCompanies:{title:"మీ మొదటి కంపెనీని సృష్టించండి",description:"కంపెనీని సృష్టించడం ద్వారా ప్రారంభించండి.",newCompany:"కొత్త కంపెనీ"}},BD={app:UD},KD={noCompanies:{title:"สร้างบริษัทแรกของคุณ",description:"เริ่มต้นด้วยการสร้างบริษัท",newCompany:"บริษัทใหม่"}},qD={app:KD},FD={noCompanies:{title:"İlk şirketinizi oluşturun",description:"Bir şirket oluşturarak başlayın.",newCompany:"Yeni Şirket"}},HD={app:FD},VD={noCompanies:{title:"Створіть свою першу компанію",description:"Почніть зі створення компанії.",newCompany:"Нова компанія"}},WD={app:VD},QD={noCompanies:{title:"اپنی پہلی کمپنی بنائیں",description:"کمپنی بنا کر شروع کریں۔",newCompany:"نئی کمپنی"}},GD={app:QD},YD={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"}},XD={app:YD},ZD={noCompanies:{title:"创建您的第一家公司",description:"通过创建公司开始。",newCompany:"新公司"}},JD={app:ZD},e5={noCompanies:{title:"建立您的第一家公司",description:"從建立公司開始。",newCompany:"新公司"}},t5={app:e5},n5=2e3;function vj(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}r(vj,"isPlainObject");function rr(e){return e.length>0?e.join("."):"<root>"}r(rr,"formatPath");function yj(e){return Array.from(e.matchAll(/{{\s*([A-Za-z0-9_.-]+)\s*}}/g),t=>t[1]).sort()}r(yj,"interpolationPlaceholders");function jj(e){return/<\/?[A-Za-z][A-Za-z0-9:-]*(?:\s[^>]*)?>/.test(e)}r(jj,"hasRawHtml");function wj(e){return/\son[A-Za-z]+\s*=/i.test(e)}r(wj,"hasEventHandlerAttribute");function kj(e){return Array.from(e.matchAll(/\bhttps?:\/\/[^\s<>"')]+/gi),t=>t[0]).sort()}r(kj,"urlsIn");function a5(e,t){const s=[[/<script\b/i.test(e),/<script\b/i.test(t),"<script"],[wj(e),wj(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:"],[jj(e),jj(t),"raw HTML tag"]].filter(([c,u])=>c&&!u).map(([,,c])=>c),l=new Set(kj(t));return kj(e).find(c=>!l.has(c))&&s.push("unexpected URL"),s}r(a5,"hasBlockedData");function s5(e,t,s,l){const c=yj(t),u=yj(s);c.join("\0")!==u.join("\0")&&l.push(`${rr(e)} interpolation placeholders must match English exactly: expected ${JSON.stringify(u)}, received ${JSON.stringify(c)}`);for(const h of a5(t,s))l.push(`${rr(e)} contains disallowed ${h}`);const p=Math.max(s.length*4+64,s.length+128),f=Math.min(n5,p);t.length>f&&l.push(`${rr(e)} is too long: ${t.length} characters exceeds ${f}`)}r(s5,"validateString");function EN(e,t,s,l){if(typeof s=="string"){if(typeof t!="string"){l.push(`${rr(e)} must be a string`);return}s5(e,t,s,l);return}if(!vj(s)){l.push(`${rr(e)} has unsupported English reference type`);return}if(!vj(t)){l.push(`${rr(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(`${rr([...e,h])} is missing`);for(const h of f)l.push(`${rr([...e,h])} is not defined in English`);for(const h of c)h in t&&EN([...e,h],t[h],s[h],l)}r(EN,"validateNode");function i5(e,t=H0){const s=[];return EN([],e,t,s),s}r(i5,"validateLocaleMessages");function r5(e,t=H0){const s=i5(e,t);if(s.length>0)throw new Error(`Invalid locale messages:
3
+ ${s.join(`
4
+ `)}`)}r(r5,"assertValidLocaleMessages");var l5=Object.assign({"./locales/ar.json":RM,"./locales/bn.json":DM,"./locales/cs.json":LM,"./locales/da.json":PM,"./locales/de.json":UM,"./locales/el.json":KM,"./locales/en.json":H0,"./locales/es.json":HM,"./locales/fa.json":WM,"./locales/fi.json":GM,"./locales/fil.json":XM,"./locales/fr.json":JM,"./locales/he.json":tD,"./locales/hi.json":aD,"./locales/hu.json":iD,"./locales/id.json":lD,"./locales/it.json":cD,"./locales/ja.json":dD,"./locales/ko.json":pD,"./locales/mr.json":hD,"./locales/ms.json":xD,"./locales/nb.json":vD,"./locales/nl.json":jD,"./locales/pa.json":kD,"./locales/pl.json":ND,"./locales/pt-BR.json":AD,"./locales/pt-PT.json":ED,"./locales/ro.json":TD,"./locales/ru.json":MD,"./locales/sv.json":OD,"./locales/sw.json":zD,"./locales/ta.json":$D,"./locales/te.json":BD,"./locales/th.json":qD,"./locales/tr.json":HD,"./locales/uk.json":WD,"./locales/ur.json":GD,"./locales/vi.json":XD,"./locales/zh-CN.json":JD,"./locales/zh-TW.json":t5}),Bf=Object.fromEntries(Object.entries(l5).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 Bf))throw new Error("Missing default locale messages for en");for(const[e,t]of Object.entries(Bf))try{r5(t)}catch(s){const l=s instanceof Error?s.message:String(s);throw new Error(`Invalid ${e} locale messages: ${l}`)}var o5=Object.keys(Bf),c5=Object.fromEntries(Object.entries(Bf).map(([e,t])=>[e,{translation:t}])),u5={resources:c5,lng:"en",fallbackLng:"en",supportedLngs:o5,defaultNS:"translation",interpolation:{escapeValue:!1},returnObjects:!1,initAsync:!1};Ra.use(jM).init(u5).catch(e=>{});var IN=IM,a=m0(EE(),1);function Sj({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)(Ei,{},`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)(jI,{value:l.radioValue,onValueChange:l.onRadioValueChange,"aria-label":l.radioLabel,children:l.radioChoices.map(N=>(0,a.jsx)(wI,{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)(vI,{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)(cr,{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(Sj,"SidebarSectionHeader");function nf({label:e,children:t,collapsible:s,menu:l,headerAction:c}){const{collapsed:u,peeking:p}=Jn(),f=U3(),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)(v1,{open:s.open,onOpenChange:s.onOpenChange,children:[(0,a.jsx)(Sj,{label:e,collapsible:s,menu:l,headerAction:c}),(0,a.jsx)(b1,{children:g})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)(Sj,{label:e,menu:l,headerAction:c}),g]})}r(nf,"SidebarSection");var TN=(0,x.createContext)(null),d5=TN.Provider;function Kf(e){const t=(0,x.useContext)(TN);return t&&(!e||t.companyId===e)?t:null}r(Kf,"usePrimaryAgentPresentation");function pG({agentId:e,companyId:t}){const s=Kf(t);return!s||s.loading||s.primaryAgentId!==e?null:(0,a.jsxs)(Ts,{children:[(0,a.jsx)(Es,{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)(g1,{"aria-hidden":"true",className:"size-3.5"})})}),(0,a.jsx)(Is,{children:"My primary agent"})]})}r(pG,"PrimaryAgentIndicator");function mG({agent:e}){const t=Kf(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)(Ta,{"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)(A1,{children:[(0,a.jsx)(yI,{asChild:!0,children:f}),(0,a.jsxs)(w1,{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)(pr,{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)(MI,{"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)(pr,{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)(g1,{"aria-hidden":"true",className:"size-3.5"})})]})]})]}),(0,a.jsxs)(C1,{children:[(0,a.jsx)(j1,{children:"Change your primary agent?"}),(0,a.jsxs)(y1,{className:"break-words",children:["This will make ",e.name," your primary agent, do you want to do this?"]})]}),(0,a.jsxs)(S1,{className:"flex-row justify-between sm:justify-between",children:[(0,a.jsx)(N1,{children:"Cancel"}),(0,a.jsx)(k1,{disabled:p,onClick:r(()=>t.onChange(e.id),"onClick"),children:"Set as my primary"})]})]})]},c.id):f}r(mG,"SetPrimaryAgentButton");var RN=(0,x.createContext)(null),MN=(0,x.createContext)(null);function f5({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)(MN.Provider,{value:ue,children:(0,a.jsx)(RN.Provider,{value:V,children:e})})}r(f5,"DialogProvider");function $s(){const e=(0,x.useContext)(MN);if(!e)throw new Error("useDialogActions must be used within DialogProvider");return e}r($s,"useDialogActions");function qf(){const e=(0,x.useContext)(RN);if(!e)throw new Error("useDialogState must be used within DialogProvider");return e}r(qf,"useDialogState");function Vc(){return{...qf(),...$s()}}r(Vc,"useDialog");var p5={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 m5({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(rI.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(m5,"BuiltInLifecycleChip");function oh(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(oh,"areEqual$2");function ch(e,t,s){return og(e,t,s).map(l=>l.id)}r(ch,"buildOrderIds$2");function h5({agents:e,companyId:t,userId:s}){const l=(0,x.useMemo)(()=>({leadershipFirst:!0}),[]),c=(0,x.useMemo)(()=>t?Y3(t,s):null,[t,s]),[u,p]=(0,x.useState)(()=>c?ch(e,th(c),l):e.map(f=>f.id));return(0,x.useEffect)(()=>{const f=c?ch(e,th(c),l):e.map(h=>h.id);p(h=>oh(h,f)?h:f)},[e,c,l]),(0,x.useEffect)(()=>{if(!c)return;const f=r(v=>{const y=ch(e,v,l);p(j=>oh(j,y)?j:y)},"syncFromIds"),h=r(v=>{v.key===c&&f(th(c))},"onStorage"),g=r(v=>{const y=v.detail;!y||y.storageKey!==c||f(y.orderedIds)},"onCustomEvent");return window.addEventListener("storage",h),window.addEventListener(Vy,g),()=>{window.removeEventListener("storage",h),window.removeEventListener(Vy,g)}},[e,c,l]),{orderedAgents:(0,x.useMemo)(()=>og(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 og(e,[],l))g.includes(v.id)||g.push(v.id);p(v=>oh(v,g)?v:g),c&&W3(c,g)},[e,c,l])}}r(h5,"useAgentOrder");var Sg={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 g5(){return{projectMemberships:{},agentMemberships:{},starredProjectIds:[],starredAgentIds:[],starredDocumentIds:[],projectStarredAt:{},agentStarredAt:{},documentStarredAt:{},updatedAt:null}}r(g5,"emptyMemberships");function x5(e){return e==="project"?{ids:"starredProjectIds",at:"projectStarredAt",state:"projectMemberships"}:{ids:"starredAgentIds",at:"agentStarredAt",state:"agentMemberships"}}r(x5,"starKeys");function Nj(e,t,s,l){const c=e??g5(),u=x5(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(Nj,"applyMembershipChange");function DN(e,t,s){return(t==="project"?e?.projectMemberships[s]:e?.agentMemberships[s])==="left"?"left":"joined"}r(DN,"resourceMembershipState");function ON(e,t,s){const l=t==="project"?e?.starredProjectIds:t==="agent"?e?.starredAgentIds:e?.starredDocumentIds;return Array.isArray(l)&&l.includes(s)}r(ON,"isStarred");function LN(e,t){const s=t==="project"?e?.starredProjectIds:t==="agent"?e?.starredAgentIds:e?.starredDocumentIds;return Array.isArray(s)?s:[]}r(LN,"starredResourceIds");function V0(e){return me({queryKey:P.resourceMemberships.mine(e??"__none__"),queryFn:r(()=>Sg.listMine(e),"queryFn"),enabled:!!e})}r(V0,"useResourceMemberships");function zN(e){const t=kn(),{pushToast:s}=Ti(),l=P.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"?Sg.updateProject(e,c.resourceId,u):Sg.updateAgent(e,c.resourceId,u)},"mutationFn"),onMutate:r(async c=>{await t.cancelQueries({queryKey:l});const u=t.getQueryData(l);return t.setQueryData(l,Nj(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=>Nj(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(zN,"useResourceMembershipMutation");var b5={healthy:"bg-emerald-500/90 text-white",warning:"bg-amber-500/95 text-amber-950",critical:"bg-red-500/90 text-white"},v5={healthy:"Budget healthy",warning:"Budget warning",critical:"Paused by budget"};function PN({title:e,level:t="critical"}){const s=e??v5[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) ${b5[t]}`,children:(0,a.jsx)(yS,{className:"h-3 w-3"})})}r(PN,"BudgetSidebarMarker");var y5="opacity-100 sm:opacity-0 sm:transition-opacity sm:group-hover:opacity-100 sm:group-focus-within:opacity-100";function $N({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?Ta:b0;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??y5,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($N,"StarToggle");var j5=3,Cj=12e4,w5=[{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 Aj(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(Aj,"sortAgents");var k5="opacity-0 transition-opacity group-hover/agent:opacity-100 group-focus-within/agent:opacity-100";function S5({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=dr(s),I=t?`${Dd(s)}/${t}`:Dd(s),C=`${Dd(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)(Ye,{to:I,label:s.name,iconNode:(0,a.jsx)(pr,{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)(m5,{status:y,compact:!0}):null,D?(0,a.jsx)(ni,{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)(PN,{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)($N,{size:"row",quiet:!0,starred:!0,pending:S,resourceName:s.name,onToggle:r(()=>k(s,!1),"onToggle"),revealClassName:k5})}):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)(Mf,{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)(Ta,{className:"size-4 motion-safe:animate-spin"}):(0,a.jsx)(b0,{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)(Ei,{})]}):null,(0,a.jsx)(Sn,{asChild:!0,children:(0,a.jsxs)(mn,{to:C,onClick:r(()=>{c&&v(!1)},"onClick"),children:[(0,a.jsx)(K0,{className:"size-4"}),(0,a.jsx)("span",{children:"Edit agent"})]})}),(0,a.jsx)(Ei,{}),(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)(mS,{className:"size-4"}):(0,a.jsx)(B0,{className:"size-4"}),(0,a.jsx)("span",{children:z})]}),(0,a.jsx)(Ei,{}),(0,a.jsxs)(Sn,{onClick:r(()=>{u||p(s)},"onClick"),disabled:u,children:[u?(0,a.jsx)(Ta,{className:"size-4 motion-safe:animate-spin"}):(0,a.jsx)($f,{className:"size-4"}),(0,a.jsx)("span",{children:u?"Leaving...":"Leave agent"})]})]})]})]})}r(S5,"SidebarAgentItem");function N5({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}=vt(),v=Kf(g),{openNewAgent:y}=$s(),{isMobile:j,setSidebarOpen:k,collapsed:S,peeking:N}=Jn(),I=S&&!N,{pushToast:C}=Ti(),M=hn(),{data:R}=me({queryKey:P.agents.list(g),queryFn:r(()=>Fa.list(g),"queryFn"),enabled:!!g}),{data:_}=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),enabled:!!g}),D=_?.enableBuiltInAgents===!0,{data:U}=me({queryKey:P.builtInAgents.list(g),queryFn:r(()=>p5.list(g),"queryFn"),enabled:!!g&&D}),K=(0,x.useMemo)(()=>{const $=new Map;if(!D)return $;for(const qe of U??[])qe.agentId&&$.set(qe.agentId,qe.status);return $},[U,D]),{data:z}=me({queryKey:P.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),E=V0(g),B=zN(g),O=P.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(()=>Lf.liveRunsForCompany(g),"queryFn"),enabled:Q.enabled,refetchInterval:Q.refetchInterval});_c(Q,V,ue);const ce=(0,x.useMemo)(()=>{const $=new Map;for(const qe of V??[])$.set(qe.agentId,($.get(qe.agentId)??0)+1);return $},[V]),X=(0,x.useMemo)(()=>{const $=new Set;for(const[qe,Xe]of ce)Xe>0&&$.add(qe);return $},[ce]),A=(0,x.useMemo)(()=>(R??[]).filter($=>$.status!=="terminated"&&(!E.isSuccess||DN(E.data,"agent",$.id)!=="left")),[R,E.data,E.isSuccess]),ee=z?.user?.id??z?.session?.userId??null,ie=(0,x.useMemo)(()=>g?Q3(g,ee):null,[ee,g]),[le,Ae]=(0,x.useState)(()=>ie?nh(ie):"top"),{orderedAgents:de}=h5({agents:A,companyId:g,userId:ee}),we=(0,x.useMemo)(()=>Aj(de,le),[de,le]),ye=(0,x.useMemo)(()=>new Set(we.map($=>$.id)),[we]);(0,x.useEffect)(()=>{const $=Date.now();for(const qe of X)f.current.set(qe,$);for(const qe of f.current.keys())ye.has(qe)||f.current.delete(qe)},[X,ye]);const Me=(0,x.useMemo)(()=>{const $=Date.now(),qe=f.current;return we.filter(Xe=>{if((ce.get(Xe.id)??0)>0)return!0;const xt=qe.get(Xe.id);return xt!==void 0&&$-xt<=Cj})},[ce,u,we]),he=Me.length>0,ve=e?he?Me:we.slice(0,j5):we,et=e&&we.length>0,Pe=M.pathname.match(/^\/(?:[^/]+\/)?agents\/([^/]+)(?:\/([^/]+))?/),Ee=Pe?.[1]??null,ct=Pe?.[2]??null;(0,x.useEffect)(()=>{if(!ie){Ae("top");return}Ae(nh(ie))},[ie]),(0,x.useEffect)(()=>{if(!ie)return;const $=r(Xe=>{Xe.key===ie&&Ae(nh(ie))},"onStorage"),qe=r(Xe=>{const xt=Xe.detail;!xt||xt.storageKey!==ie||Ae(xt.sortMode)},"onCustomEvent");return window.addEventListener("storage",$),window.addEventListener(Hy,qe),()=>{window.removeEventListener("storage",$),window.removeEventListener(Hy,qe)}},[ie]),(0,x.useEffect)(()=>{if(!e)return;const $=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+Cj;Kt<$||(qe=qe===null?Kt:Math.min(qe,Kt))}if(qe===null)return;const Xe=window.setTimeout(()=>{p(xt=>xt+1)},Math.max(0,qe-$+1));return()=>{window.clearTimeout(Xe)}},[e,we,ce,u]);const Ve=(0,x.useCallback)($=>{const qe=$==="alphabetical"||$==="recent"?$:"top";Ae(qe),ie&&G3(ie,qe)},[ie]),yt=Bt({mutationFn:r(({agent:$,action:qe})=>qe==="pause"?Fa.pause($.id,g??void 0):Fa.resume($.id,g??void 0),"mutationFn"),onMutate:r(({agent:$})=>{c(qe=>{const Xe=new Set(qe);return Xe.add($.id),Xe})},"onMutate"),onSuccess:r(async($,{agent:qe,action:Xe})=>{g&&await Promise.all([h.invalidateQueries({queryKey:P.agents.list(g)}),h.invalidateQueries({queryKey:P.liveRuns(g)}),h.invalidateQueries({queryKey:P.dashboard(g)})]),await Promise.all([h.invalidateQueries({queryKey:P.agents.detail(qe.id)}),h.invalidateQueries({queryKey:P.agents.detail(dr(qe))})]),C({title:Xe==="pause"?"Agent paused":"Agent resumed",body:qe.name,tone:"success"})},"onSuccess"),onError:r(($,{agent:qe,action:Xe})=>{C({title:Xe==="pause"?"Could not pause agent":"Could not resume agent",body:$ instanceof Error?$.message:qe.name,tone:"error"})},"onError"),onSettled:r(($,qe,{agent:Xe})=>{c(xt=>{const at=new Set(xt);return at.delete(Xe.id),at})},"onSettled")}),Zt=(0,x.useCallback)($=>B.mutate({resourceType:"agent",resourceId:$.id,resourceName:$.name,state:"left"}),[B]),ge=(0,x.useCallback)($=>B.isPending&&B.variables?.resourceType==="agent"&&B.variables.resourceId===$.id,[B.isPending,B.variables]),Oe=(0,x.useCallback)(($,qe)=>B.mutate({resourceType:"agent",resourceId:$.id,resourceName:$.name,starred:qe}),[B]),De=(0,x.useCallback)($=>B.isPending&&B.variables?.resourceType==="agent"&&B.variables.resourceId===$.id&&B.variables.starred!==void 0,[B.isPending,B.variables]),ut=(0,x.useMemo)(()=>new Set(LN(E.data,"agent")),[E.data]),Ht=(0,x.useMemo)(()=>Aj(A.filter($=>ut.has($.id)),"alphabetical"),[A,ut]),Vt=(0,x.useMemo)(()=>ve.filter($=>!ut.has($.id)),[ve,ut]),gt=v&&!v.loading?A.find($=>$.id===v.primaryAgentId):void 0,cn=r(($,qe)=>(0,a.jsx)(S5,{activeAgentId:Ee,activeTab:ct,agent:$,disabled:l.has($.id),isMobile:j,leaving:ge($),onLeaveAgent:Zt,onPauseResume:r((Xe,xt)=>yt.mutate({agent:Xe,action:xt}),"onPauseResume"),rail:I,runCount:ce.get($.id)??0,setSidebarOpen:k,builtInStatus:K.get($.id),starred:qe||ON(E.data,"agent",$.id),onToggleStar:Oe,starPending:De($)},$.id),"renderAgentRow");return(0,a.jsxs)(nf,{label:"Agents",collapsible:{open:t,onOpenChange:s},headerAction:{ariaLabel:"New agent",icon:ns,onClick:y},menu:{ariaLabel:"Agents section actions",actions:[{type:"item",label:"Browse agents",icon:Gr,href:"/agents/all"},{type:"separator"}],radioLabel:"Agent sort",radioChoices:w5,radioValue:le,onRadioValueChange:Ve},children:[[...gt?[gt]:[],...Ht.filter($=>$.id!==gt?.id),...Vt.filter($=>$.id!==gt?.id)].map($=>cn($,ut.has($.id))),et&&(()=>{const $=(0,a.jsxs)(mn,{to:"/agents/all",state:Df,"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)(Ts,{children:[(0,a.jsx)(Es,{asChild:!0,children:$}),(0,a.jsx)(Is,{side:"right",children:"See all agents"})]}):$})()]})}r(N5,"SidebarAgents");var C5="opacity-0 transition-opacity group-hover/starred-project:opacity-100 group-focus-within/starred-project:opacity-100";function A5(){const{selectedCompanyId:e}=vt(),{isMobile:t,setSidebarOpen:s,collapsed:l,peeking:c}=Jn(),u=l&&!c,p=hn(),{data:f}=me({queryKey:P.projects.list(e),queryFn:r(()=>mr.list(e),"queryFn"),enabled:!!e}),h=V0(e),g=zN(e),v=p.pathname.match(/^\/(?:[^/]+\/)?projects\/([^/]+)/)?.[1]??null,y=(0,x.useMemo)(()=>{if(!h.isSuccess)return[];const N=new Set(LN(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=Zk(N),C=v===I||v===N.id,M=S(N),R=M&&g.variables?.starred===!1,_=M&&g.variables?.state==="left",D=ON(h.data,"project",N.id),U=(0,a.jsx)(_5,{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)(Ts,{children:[(0,a.jsx)(Es,{asChild:!0,children:(0,a.jsx)("div",{className:"min-w-0 flex-1",children:U})}),(0,a.jsx)(Is,{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)($N,{size:"row",quiet:!0,starred:D,pending:R,resourceName:N.name,onToggle:r(()=>j(N),"onToggle"),revealClassName:C5})}):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)(Mf,{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)(Ta,{className:"size-4 motion-safe:animate-spin"}):(0,a.jsx)(b0,{className:"size-4 fill-amber-500 text-amber-500"}),(0,a.jsx)("span",{children:"Remove from starred"})]}),(0,a.jsx)(Ei,{}),(0,a.jsxs)(Sn,{onClick:r(()=>{M||k(N)},"onClick"),disabled:M,children:[_?(0,a.jsx)(Ta,{className:"size-4 motion-safe:animate-spin"}):(0,a.jsx)($f,{className:"size-4"}),(0,a.jsx)("span",{children:"Leave project"})]})]})]}):null]},N.id)})})}r(A5,"SidebarStarredProjects");function _5({project:e,active:t,rail:s,onNavigate:l}){return(0,a.jsxs)(mn,{to:`/projects/${Zk(e)}/issues`,state:Df,"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)(x1,{color:e.color??null,icon:e.icon??null,size:"xs"}),(0,a.jsx)("span",{className:s?n1:"flex-1 truncate",children:e.name}),!s&&e.visibility==="private"?(0,a.jsx)(eg,{className:"size-3.5 shrink-0 text-ink-3","aria-label":"Private project"}):null,!s&&e.pauseReason==="budget"?(0,a.jsx)(PN,{title:"Project paused by budget"}):null]})}r(_5,"SidebarStarredProjectLink");var Ng="wardmote:recent-tasks-updated",UN="wardmote.recentTasks.v2:",E5="wardmote.recentTasks:";function BN(e,t){return`${UN}${e}:${t??"__local_board__"}`}r(BN,"getRecentTasksStorageKey");function I5(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(I5,"isRecentTaskEntry");function Wr(e,t){if(typeof window>"u")return[];try{const s=e.startsWith(UN)?E5+e.slice(24):e,l=window.localStorage.getItem(e)??window.localStorage.getItem(s),c=JSON.parse(l??"[]");return Array.isArray(c)?KN(c.filter(u=>I5(u,t))):[]}catch{return[]}}r(Wr,"readRecentTasks");function T5(e,t){if(!(typeof window>"u")){try{if(window.localStorage.getItem(e)!==null)return}catch{return}Ff(e,Wr(e,t))}}r(T5,"migrateRecentTasks");function KN(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(KN,"normalizeRecentTasks");function R5(e,t){typeof window>"u"||window.dispatchEvent(new CustomEvent(Ng,{detail:{storageKey:e,entries:t}}))}r(R5,"publishRecentTasks");function Ff(e,t){if(typeof window>"u")return;const s=KN(t);try{const l=JSON.stringify(s);if(window.localStorage.getItem(e)===l)return;window.localStorage.setItem(e,l)}catch{}R5(e,s)}r(Ff,"writeRecentTasks");function W0(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(W0,"mergeRecentTaskSnapshot");function M5(e,t,s=new Date(e.updatedAt).getTime()){if(e.conversationAgentId)return;const l=BN(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?W0(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||Ff(l,u?c.map(v=>v.id===e.id?g:v):[g,...c])}r(M5,"recordRecentTask");function D5(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&&Ff(e,c)}r(D5,"pruneRecentTasks");function qN(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=W0(f,h);return g!==f&&(u=!0),g});u&&Ff(e,p)}r(qN,"updateRecentTaskSnapshots");var O5=1e3;function L5({companyId:e,userId:t}){const s=(0,x.useMemo)(()=>e?BN(e,t):null,[e,t]),[l,c]=(0,x.useState)(()=>s&&e?Wr(s,e):[]);(0,x.useEffect)(()=>{s&&e&&T5(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(Ng,C),()=>{window.removeEventListener("storage",I),window.removeEventListener(Ng,C)}},[e,s]);const u=[...l].sort((N,I)=>N.id.localeCompare(I.id)),p=JSON.stringify(u.map(N=>N.id)),f=_f({queries:u.map(N=>({queryKey:P.issues.detail(N.id),queryFn:r(()=>on.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:W0(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 Ii&&[403,404].includes(C.error.status)&&I.add(R.id))}),qN(s,e,N),D5(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),O5);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(L5,"useRecentTasks");var uh="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",z5=":restart-wake-retry";function P5(e,t){return`wardmote.recentTasks:${e}:${t??"__local_board__"}${z5}`}r(P5,"restartWakeRetryStorageKey");function FN(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(FN,"readRestartWakeRetryIssueIds");function dh(e,t,s){if(!e)return;const l=FN(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(dh,"setRestartWakeRetryPending");function fh(e,t){return e instanceof Error&&e.message.trim()?e.message:t}r(fh,"errorMessage$2");function $5({companyId:e,liveIssueIds:t}){const{collapsed:s,peeking:l}=Jn(),c=s&&!l,{data:u,isPending:p}=me({queryKey:P.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)(U5,{companyId:e,userId:f,liveIssueIds:t,rail:c},`${e}:${f??"__local_board__"}`)}r($5,"SidebarRecentTasks");function U5({companyId:e,userId:t,liveIssueIds:s,rail:l}){const{entries:c,storageKey:u}=L5({companyId:e,userId:t}),p=kn(),f=Of(),[h,g]=(0,x.useState)(null),[v,y]=(0,x.useState)(""),[j,k]=(0,x.useState)(null),S=P5(e,t);if(c.length===0)return null;const N=r(async _=>{await Promise.all([p.invalidateQueries({queryKey:P.issues.detail(_)}),p.invalidateQueries({queryKey:P.issues.list(e)}),p.invalidateQueries({queryKey:P.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 on.update(h.id,{title:D});p.setQueryData(P.issues.detail(h.id),U),u&&qN(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:fh(U,"Unable to rename this task."),tone:"error"})}finally{k(null)}},"submitRename"),M=r(async _=>{k("archive");try{await on.archiveFromInbox(_.id),await N(_.id),await p.invalidateQueries({queryKey:P.sidebarBadges(e)}),f?.pushToast({title:"Task archived from inbox",tone:"success"})}catch(D){f?.pushToast({title:"Task archive failed",body:fh(D,"Unable to archive this task from the inbox."),tone:"error"})}finally{k(null)}},"archiveTask"),R=r(async _=>{k("pause");try{const D=await on.getTreeControlState(_.id);if(D.activePauseHold?.isRoot){const U=await on.get(_.id);if(dh(S,_.id,!0),await on.releaseTreeHold(_.id,D.activePauseHold.holdId,{reason:"Restarted from Recent Tasks."}),U.assigneeAgentId){const K=await Fa.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.")}dh(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(FN(S).has(_.id)){const U=await on.get(_.id);if(U.assigneeAgentId){const K=await Fa.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.")}dh(S,_.id,!1),f?.pushToast({title:"Task restarted",tone:"success"})}else await on.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:fh(D,"Unable to pause or restart this task."),tone:"error"})}finally{k(null)}},"toggleTaskPause");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(nf,{label:"Recent Tasks",children:c.map(_=>(0,a.jsxs)("div",{className:"sidebar-action-row group/recent-task relative",children:[(0,a.jsx)(Ye,{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)(Mf,{"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:uh,onSelect:r(()=>I(_),"onSelect"),children:[(0,a.jsx)(K0,{"aria-hidden":"true"}),"Rename"]}),(0,a.jsxs)(Sn,{className:uh,disabled:j!==null,onSelect:r(()=>{M(_)},"onSelect"),children:[(0,a.jsx)(I1,{"aria-hidden":"true"}),"Archive"]}),(0,a.jsxs)(Sn,{className:uh,disabled:j!==null,onSelect:r(()=>{R(_)},"onSelect"),children:[(0,a.jsx)(nl,{"aria-hidden":"true"}),"Pause/Restart"]})]})]})]},_.id))}),(0,a.jsx)(ws,{open:h!==null,onOpenChange:r(_=>{!_&&j!=="rename"&&g(null)},"onOpenChange"),children:(0,a.jsx)(Ps,{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)(Ds,{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)(Pf,{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(U5,"RecentTasksList");var B5={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")},HN={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")},K5={summary:r(e=>je.get(`/companies/${e}/dashboard`),"summary")},VN={get:r(e=>je.get(`/companies/${e}/sidebar-badges`),"get")};var q5=new Set(["failed","timed_out"]),af=new Set(["pending","revision_requested"]),WN="wardmote:inbox:dismissed",QN="wardmote:inbox:read-items",GN="wardmote:inbox:last-tab",hG="wardmote:inbox:issue-columns",YN="wardmote:inbox:nesting",XN="wardmote:inbox:group-by",gG="wardmote:inbox:filters",F5="wardmote:inbox:collapsed-groups",H5="wardmote:inbox:collapsed-parents",Cg=["status","id","assignee","kickedOffBy","project","workspace","parent","labels","updated"],ZN=["status","id","updated"];function JN(e){return e?`${F5}:${e}`:null}r(JN,"getInboxCollapsedGroupsStorageKey");function eC(e){return e?`${H5}:${e}`:null}r(eC,"getInboxCollapsedParentsStorageKey");function xG(e){const t=JN(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(xG,"loadCollapsedInboxGroupKeys");function bG(e,t){const s=JN(e);if(s)try{localStorage.setItem(s,JSON.stringify([...t]))}catch{}}r(bG,"saveCollapsedInboxGroupKeys");function vG(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(vG,"loadCollapsedInboxParentIds");function yG(e,t){const s=eC(e);if(s)try{localStorage.setItem(s,JSON.stringify([...t]))}catch{}}r(yG,"saveCollapsedInboxParentIds");function _j(){try{const e=localStorage.getItem(WN);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(_j,"loadDismissedInboxAlerts");function V5(e){try{localStorage.setItem(WN,JSON.stringify([...e]))}catch{}}r(V5,"saveDismissedInboxAlerts");function W5(e){return new Map(e.map(t=>[t.itemKey,as(t.dismissedAt)]))}r(W5,"buildInboxDismissedAtByKey");function Ej(e,t,s){const l=e.get(t);return l==null?!1:l>=as(s)}r(Ej,"isInboxEntityDismissed");function Ij(){try{const e=localStorage.getItem(QN);return e?new Set(JSON.parse(e)):new Set}catch{return new Set}}r(Ij,"loadReadInboxItems");function Tj(e){try{localStorage.setItem(QN,JSON.stringify([...e]))}catch{}}r(Tj,"saveReadInboxItems");function tC(e){const t=new Set(e);return Cg.filter(s=>t.has(s))}r(tC,"normalizeInboxIssueColumns");function Q5(e){return e?[...Cg]:Cg.filter(t=>t!=="workspace")}r(Q5,"getAvailableInboxIssueColumns");function jG(){try{const e=localStorage.getItem(XN);return e==="type"||e==="assignee"||e==="project"||e==="workspace"?e:"none"}catch{return"none"}}r(jG,"loadInboxWorkItemGroupBy");function wG(e){try{localStorage.setItem(XN,e)}catch{}}r(wG,"saveInboxWorkItemGroupBy");function kG(e,t,s){return s&&e==="workspace"&&!t}r(kG,"shouldResetInboxWorkspaceGrouping");function G5(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?nC(e,{executionWorkspaceById:l,projectWorkspaceById:c,defaultProjectWorkspaceIdByProjectId:u})?.toLowerCase().includes(p)??!1:!1}r(G5,"matchesInboxIssueSearch");function SG({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=>G5(g,f,{isolatedWorkspacesEnabled:l,executionWorkspaceById:c,projectWorkspaceById:u,defaultProjectWorkspaceIdByProjectId:p})).sort(Ic)}r(SG,"getArchivedInboxSearchIssues");function NG({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 dg(l,c,u,p,f,h).filter(v=>!g.has(v.id))}r(NG,"getInboxSearchSupplementIssues");function Y5(e){const t=e?.trim();return t?`${t} (default)`:"Default workspace"}r(Y5,"formatDefaultWorkspaceGroupLabel");function X5(e,{projectWorkspaceById:t,defaultProjectWorkspaceIdByProjectId:s}){if(!e.projectId)return null;const l=s?.get(e.projectId)??null;return l?{id:l,label:Y5(t?.get(l)?.name)}:null}r(X5,"resolveDefaultProjectWorkspaceInfo");function nC(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(nC,"resolveIssueWorkspaceName");function Z5(e,{executionWorkspaceById:t,projectWorkspaceById:s,defaultProjectWorkspaceIdByProjectId:l}={}){const c=X5(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(Z5,"resolveIssueWorkspaceGroup");function CG(){try{return localStorage.getItem(YN)!=="false"}catch{return!0}}r(CG,"loadInboxNesting");function AG(e){try{localStorage.setItem(YN,String(e))}catch{}}r(AG,"saveInboxNesting");function _G(e,t){return e&&!t}r(_G,"resolveInboxNestingEnabled");function Rj(){try{const e=localStorage.getItem(GN);return e==="all"||e==="unread"||e==="recent"||e==="mine"||e==="blocked"?e:"mine"}catch{return"mine"}}r(Rj,"loadLastInboxTab");function EG(e){try{localStorage.setItem(GN,e)}catch{}}r(EG,"saveLastInboxTab");function IG(e){return e==="mine"}r(IG,"isMineInboxTab");function TG(e){return e==="all"}r(TG,"shouldShowCompanyAlerts");function RG(e,t){return t===0||e<0?-1:Math.min(e,t-1)}r(RG,"resolveInboxSelectionIndex");function J5(e,t,s){return t===0?-1:e<0?0:s==="next"?Math.min(e+1,t-1):Math.max(e-1,0)}r(J5,"getInboxKeyboardSelectionIndex");function MG(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=>q5.has(l.status))}r(MG,"getLatestFailedRunsByAgent");function as(e){if(!e)return 0;const t=new Date(e).getTime();return Number.isFinite(t)?t:0}r(as,"normalizeTimestamp");function sf(e){const t=as(e.lastActivityAt);if(t>0)return t;const s=as(e.lastExternalCommentAt);return s>0?s:as(e.updatedAt)}r(sf,"issueLastActivityTimestamp");function Ic(e,t){const s=sf(t)-sf(e);return s!==0?s:as(t.updatedAt)-as(e.updatedAt)}r(Ic,"sortIssuesByMostRecentActivity");function eO(e){return[...e].sort(Ic).slice(0,100)}r(eO,"getRecentTouchedIssues");function DG(e,t,s,l){const c=[...e].sort((u,p)=>as(p.updatedAt)-as(u.updatedAt));return t==="mine"?c.filter(u=>aC(u,l)):t==="recent"?c:t==="unread"?c.filter(u=>af.has(u.status)):s==="all"?c:c.filter(u=>{const p=af.has(u.status);return s==="actionable"?p:!p})}r(DG,"getApprovalsForTab");function aC(e,t){return af.has(e.status)?!0:t?e.requestedByUserId===t||e.decidedByUserId===t:!1}r(aC,"isApprovalVisibleInMine");function ph(e){const t=as(e.updatedAt);return t>0?t:as(e.createdAt)}r(ph,"approvalActivityTimestamp");function OG({issues:e,approvals:t,failedRuns:s=[],joinRequests:l=[]}){return[...e.map(c=>({kind:"issue",timestamp:sf(c),issue:c})),...t.map(c=>({kind:"approval",timestamp:ph(c),approval:c})),...s.map(c=>({kind:"failed_run",timestamp:as(c.createdAt),run:c})),...l.map(c=>({kind:"join_request",timestamp:as(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"?ph(u.approval)-ph(c.approval):c.kind==="approval"?-1:1})}r(OG,"getInboxWorkItems");var tO=["issue","approval","failed_run","join_request"],sC={issue:"Tasks",approval:"Approvals",failed_run:"Failed runs",join_request:"Join requests"};function nO(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(nO,"resolveIssueAssigneeGroup");function aO(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(aO,"resolveIssueProjectGroup");function mh(e,t){const s=new Map;for(const l of e){const c=l.kind==="issue"?t(l.issue):{key:`kind:${l.kind}`,label:sC[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(mh,"groupInboxWorkItemsByIssueGroup");function sO(e,t,s={}){if(t==="none")return[{key:"__all",label:null,items:e}];if(t==="workspace")return mh(e,u=>Z5(u,s));if(t==="assignee")return mh(e,u=>nO(u,s));if(t==="project")return mh(e,u=>aO(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 tO){const p=l.get(u)??[];p.length!==0&&c.push({key:u,label:sC[u],items:p})}return c}r(sO,"groupInboxWorkItems");function iO(e){return e.replace(/^archived-search:/,"").replace(/^other-search:/,"")}r(iO,"stripInboxSearchGroupPrefix");function rO(e){return e.find(t=>t.kind==="issue")?.issue??null}r(rO,"firstIssueFromInboxWorkItems");function Mj(e,t,s){return e?t.projectWorkspaceById?.get(e)?.projectId??(s?.projectWorkspaceId===e?s.projectId:null):s?.projectId??null}r(Mj,"projectIdForProjectWorkspace");function LG(e,t,s,l={}){const c=rO(s);if(!c)return null;const u=iO(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??Mj(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=Mj(p,l,c);return{...f?{projectId:f}:{},projectWorkspaceId:p}}}return{}}r(LG,"buildInboxIssueGroupCreateDefaults");function lO(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=sf(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(lO,"buildInboxNesting");function zG(e,t,s,l){const c=l?.keyPrefix??"",u=l?.searchSection??"none",p=l?.nestingEnabled??!1;return u!=="none"&&e.length===0?[]:sO(e,t,s).map(f=>{const h=p&&f.items.some(g=>g.kind==="issue")?lO(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(zG,"buildGroupedInboxSections");function oO(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(oO,"getInboxWorkItemKey");function PG(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}:${oO(f)}`,item:f}),f.kind==="issue"&&p(f.issue.id,new Set([f.issue.id]))}return l}r(PG,"buildInboxKeyboardNavEntries");function $G({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($G,"shouldShowInboxSection");function cO({approvals:e,joinRequests:t,dashboard:s,failedRuns:l,mineIssues:c,dismissedAlerts:u,dismissedAtByKey:p,currentUserId:f}){const h=e.filter(C=>aC(C,f)&&af.has(C.status)&&!Ej(p,`approval:${C.id}`,C.updatedAt)).length,g=t.filter(C=>!Ej(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(cO,"computeInboxBadgeData");var uO="backlog,todo,in_progress,in_review,blocked,done",dO=500,fO=3e4;function pO(){const[e,t]=(0,x.useState)(_j);return(0,x.useEffect)(()=>{const l=r(c=>{c.key==="wardmote:inbox:dismissed"&&t(_j())},"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),V5(u),u})},"dismiss")}}r(pO,"useDismissedInboxAlerts");function mO(e){const t=kn(),s=e?P.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:P.sidebarBadges(e)}),t.invalidateQueries({queryKey:P.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)(()=>W5(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(mO,"useInboxDismissals");function UG(){const[e,t]=(0,x.useState)(Ij);return(0,x.useEffect)(()=>{const c=r(u=>{u.key==="wardmote:inbox:read-items"&&t(Ij())},"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),Tj(p),p})},"markRead"),markUnread:r(c=>{t(u=>{const p=new Set(u);return p.delete(c),Tj(p),p})},"markUnread")}}r(UG,"useReadInboxItems");function Q0(e){const t=X3(e),{dismissed:s}=pO(),{dismissedAtByKey:l}=mO(e),{data:c}=me({queryKey:P.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),{data:u=[]}=me({queryKey:P.approvals.list(e),queryFn:r(()=>HN.list(e),"queryFn"),enabled:!!e}),{data:p=[]}=me({queryKey:P.access.joinRequests(e),queryFn:r(async()=>{try{return await ei.listJoinRequests(e,"pending_approval")}catch(R){if(R instanceof Ii&&(R.status===401||R.status===403))return[];throw R}},"queryFn"),enabled:!!e,retry:!1}),f=P.dashboard(e),h=Ac({companyId:e,resourceKey:"dashboard",queryKey:f,enabled:!!e}),{data:g,dataUpdatedAt:v}=me({queryKey:f,queryFn:r(()=>K5.summary(e),"queryFn"),enabled:!!e});_c(h,g,v);const y=P.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(()=>on.listCompact(e,{touchedByUserId:"me",inboxArchivedByUserId:"me",status:uO,limit:dO}).then(R=>R),"queryFn"),enabled:!!e,refetchOnWindowFocus:!1,staleTime:fO});_c(j,k,S);const N=(0,x.useMemo)(()=>eO(Z3(e,k)),[e,t,k]),I=c?.user.id??c?.session.userId??null,{data:C}=me({queryKey:e?P.sidebarBadges(e):["sidebar-badges","__disabled__"],queryFn:r(async()=>{try{return await VN.get(e)}catch(R){if(R instanceof Ii&&(R.status===401||R.status===403))return null;throw R}},"queryFn"),enabled:!!e,retry:!1}),M=C?.failedRuns??0;return(0,x.useMemo)(()=>cO({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(Q0,"useInboxBadge");var hO=new Set(["detailTab","taskDetailView","contextMenuItem","commentAnnotation","commentContextMenuItem","projectSidebarItem","toolbarButton"]),iC=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(","),gO=1e3,xO=new Set(bE),rC=(0,x.createContext)(null);function bO(e){return e instanceof Error&&e.message?e.message:"Unknown error"}r(bO,"getErrorMessage");function vO(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(vO,"buildLauncherHostContext");function yO(e){if(!e)return;const t=e.querySelector(iC);if(t){t.focus();return}e.focus()}r(yO,"focusFirstElement");function Dj(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(Dj,"resolveLauncherNavigationTarget");function jO(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(jO,"launcherRoutePath");function wO(e,t){if(e.placementZone!=="sidebar"||!t)return e.displayName;const s=jO(e);return s?t.slots.find(l=>l.type==="routeSidebar"&&l.routePath?.toLowerCase()===s)?.displayName??e.displayName:e.displayName}r(wO,"launcherDisplayName");function kO(e,t){if(t.key!=="Tab")return;const s=Array.from(e.querySelectorAll(iC)).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(kO,"trapFocus");function SO(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(SO,"launcherTriggerClassName");function lC(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(lC,"launcherShellBoundsStyle");function NO(e){const t=e.sourceRect,s=lC(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(NO,"launcherPopoverStyle");function CO(e){return typeof e=="string"&&xO.has(e)}r(CO,"isPluginLauncherBounds");function oC(e){const t=e.enabled??!0,{data:s,isLoading:l,error:c}=me({queryKey:P.plugins.uiContributions,queryFn:r(()=>R0.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)&&(hO.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?bO(c):null}}r(oC,"usePluginLaunchers");async function AO(e,t){const s=t.action.target,l=Yy(t.pluginKey,s);return l||(await mT(e),Yy(t.pluginKey,s))}r(AO,"resolveLauncherComponent");function _O({pluginId:e,hostContext:t,children:s}){const l=(0,x.useMemo)(()=>({pluginId:e,hostContext:t}),[e,t]);return(0,a.jsx)(hT.Provider,{value:l,children:s})}r(_O,"PluginLauncherBridgeScope");var EO=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 IO({instance:e,renderEnvironment:t}){const s=e.component,{data:l}=me({queryKey:P.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),c=l?.user?.id??l?.session?.userId??null,u=(0,x.useMemo)(()=>vO(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)(EO,{launcher:e.launcher,children:(0,a.jsx)(_O,{pluginId:e.launcher.pluginId,hostContext:u,children:p})})}r(IO,"LauncherRenderContent");function TO({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(()=>{yO(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}kO(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=gO+t*20,g=e.launcher.action.type,v=g==="openPopover"?NO(e):lC(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)(IO,{instance:e,renderEnvironment:f})})]})]})}r(TO,"LauncherModalShell");function RO({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)=>{CO(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(Dj(v.action.target,y));return;case"deepLink":/^https?:\/\//.test(v.action.target)?window.open(v.action.target,"_blank","noopener,noreferrer"):u(Dj(v.action.target,y));return;case"performAction":await R0.bridgePerformAction(v.pluginId,v.action.target,v.action.params,y.companyId??null);return;case"openModal":case"openDrawer":case"openPopover":{const S=await AO(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)(rC.Provider,{value:g,children:[e,t.map((v,y)=>(0,a.jsx)(TO,{instance:v,stackIndex:y,isTopmost:y===t.length-1,requestBounds:f,closeLauncher:p},v.key))]})}r(RO,"PluginLauncherProvider");function MO(){const e=(0,x.useContext)(rC);if(!e)throw new Error("usePluginLauncherRuntime must be used within PluginLauncherProvider");return e}r(MO,"usePluginLauncherRuntime");function DO({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:SO(s),onClick:l,children:e??t.displayName})}r(DO,"DefaultLauncherTrigger");function cC({placementZones:e,context:t,entityType:s,className:l,itemClassName:c,errorClassName:u,errorBehavior:p="inline"}){const{activateLauncher:f}=MO(),{launchers:h,contributionsByPluginId:g,errorMessage:v}=oC({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)(DO,{displayName:wO(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(cC,"PluginLauncherOutlet");function OO(){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(OO,"useCombinedRefs");var Hf=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 G0(e){return"nodeType"in e}r(G0,"isNode");function Ma(e){var t,s;return e?yo(e)?e:G0(e)&&(t=(s=e.ownerDocument)==null?void 0:s.defaultView)!=null?t:window:window}r(Ma,"getWindow");function Y0(e){const{Document:t}=Ma(e);return e instanceof t}r(Y0,"isDocument");function Wc(e){return yo(e)?!1:e instanceof Ma(e).HTMLElement}r(Wc,"isHTMLElement");function uC(e){return e instanceof Ma(e).SVGElement}r(uC,"isSVGElement");function jo(e){return e?yo(e)?e.document:G0(e)?Y0(e)?e:Wc(e)||uC(e)?e.ownerDocument:document:document:document}r(jo,"getOwnerDocument");var Os=Hf?x.useLayoutEffect:x.useEffect;function Vf(e){const t=(0,x.useRef)(e);return Os(()=>{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(Vf,"useEvent");function LO(){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(LO,"useInterval");function Tc(e,t){t===void 0&&(t=[e]);const s=(0,x.useRef)(e);return Os(()=>{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 rf(e){const t=Vf(e),s=(0,x.useRef)(null);return[s,(0,x.useCallback)(l=>{l!==s.current&&t?.(l,s.current),s.current=l},[])]}r(rf,"useNodeRef");function lf(e){const t=(0,x.useRef)();return(0,x.useEffect)(()=>{t.current=e},[e]),t.current}r(lf,"usePrevious");var hh={};function Gc(e,t){return(0,x.useMemo)(()=>{if(t)return t;const s=hh[e]==null?0:hh[e]+1;return hh[e]=s,e+"-"+s},[e,t])}r(Gc,"useUniqueId");function dC(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(dC,"createAdjustmentFn");var lo=dC(1),Rc=dC(-1);function zO(e){return"clientX"in e&&"clientY"in e}r(zO,"hasViewportRelativeCoordinates");function Wf(e){if(!e)return!1;const{KeyboardEvent:t}=Ma(e.target);return t&&e instanceof t}r(Wf,"isKeyboardEvent");function PO(e){if(!e)return!1;const{TouchEvent:t}=Ma(e.target);return t&&e instanceof t}r(PO,"isTouchEvent");function of(e){if(PO(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 zO(e)?{x:e.clientX,y:e.clientY}:null}r(of,"getEventCoordinates");var ti=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[ti.Translate.toString(e),ti.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:s,easing:l}=e;return t+" "+s+"ms "+l}}}),Oj="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function $O(e){return e.matches(Oj)?e:e.querySelector(Oj)}r($O,"findFirstFocusableNode");var UO={display:"none"};function BO(e){let{id:t,value:s}=e;return x.createElement("div",{id:t,style:UO},s)}r(BO,"HiddenText");function KO(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(KO,"LiveRegion");function qO(){const[e,t]=(0,x.useState)("");return{announce:(0,x.useCallback)(s=>{s!=null&&t(s)},[]),announcement:e}}r(qO,"useAnnouncement$1");var fC=(0,x.createContext)(null);function FO(e){const t=(0,x.useContext)(fC);(0,x.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}r(FO,"useDndMonitor");function HO(){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(HO,"useDndMonitorProvider");var VO={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
+ `},WO={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 QO(e){let{announcements:t=WO,container:s,hiddenTextDescribedById:l,screenReaderInstructions:c=VO}=e;const{announce:u,announcement:p}=qO(),f=Gc("DndLiveRegion"),[h,g]=(0,x.useState)(!1);if((0,x.useEffect)(()=>{g(!0)},[]),FO((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(BO,{id:l,value:c.draggable}),x.createElement(KO,{id:f,announcement:p}));return s?(0,Zl.createPortal)(v,s):v}r(QO,"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 cf(){}r(cf,"noop");function Mc(e,t){return(0,x.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}r(Mc,"useSensor");function X0(){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(X0,"useSensors");var Ls=Object.freeze({x:0,y:0});function pC(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}r(pC,"distanceBetween");function GO(e,t){const s=of(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(GO,"getRelativeTransformOrigin");function mC(e,t){let{data:{value:s}}=e,{data:{value:l}}=t;return s-l}r(mC,"sortCollisionsAsc");function YO(e,t){let{data:{value:s}}=e,{data:{value:l}}=t;return l-s}r(YO,"sortCollisionsDesc");function Lj(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(Lj,"cornersOfRectangle");function hC(e,t){if(!e||e.length===0)return null;const[s]=e;return t?s[t]:s}r(hC,"getFirstCollision");function zj(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(zj,"centerOfRectangle");var gC=r(e=>{let{collisionRect:t,droppableRects:s,droppableContainers:l}=e;const c=zj(t,t.left,t.top),u=[];for(const p of l){const{id:f}=p,h=s.get(f);if(h){const g=pC(zj(h),c);u.push({id:f,data:{droppableContainer:p,value:g}})}}return u.sort(mC)},"closestCenter"),XO=r(e=>{let{collisionRect:t,droppableRects:s,droppableContainers:l}=e;const c=Lj(t),u=[];for(const p of l){const{id:f}=p,h=s.get(f);if(h){const g=Lj(h),v=c.reduce((j,k,S)=>j+pC(g[S],k),0),y=Number((v/4).toFixed(4));u.push({id:f,data:{droppableContainer:p,value:y}})}}return u.sort(mC)},"closestCorners");function ZO(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(ZO,"getIntersectionRatio");var JO=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=ZO(f,t);h>0&&c.push({id:p,data:{droppableContainer:u,value:h}})}}return c.sort(YO)},"rectIntersection");function eL(e,t,s){return{...e,scaleX:t&&s?t.width/s.width:1,scaleY:t&&s?t.height/s.height:1}}r(eL,"adjustScale");function xC(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ls}r(xC,"getRectDelta");function tL(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(tL,"createRectAdjustmentFn");var nL=tL(1);function bC(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(bC,"parseTransform");function aL(e,t,s){const l=bC(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(aL,"inverseTransform");var sL={ignoreTransform:!1};function wo(e,t){t===void 0&&(t=sL);let s=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:v}=Ma(e).getComputedStyle(e);g&&(s=aL(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 Pj(e){return wo(e,{ignoreTransform:!0})}r(Pj,"getTransformAgnosticClientRect");function iL(e){const t=e.innerWidth,s=e.innerHeight;return{top:0,left:0,right:t,bottom:s,width:t,height:s}}r(iL,"getWindowClientRect");function rL(e,t){return t===void 0&&(t=Ma(e).getComputedStyle(e)),t.position==="fixed"}r(rL,"isFixed");function lL(e,t){t===void 0&&(t=Ma(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(lL,"isScrollable");function Qf(e,t){const s=[];function l(c){if(t!=null&&s.length>=t||!c)return s;if(Y0(c)&&c.scrollingElement!=null&&!s.includes(c.scrollingElement))return s.push(c.scrollingElement),s;if(!Wc(c)||uC(c)||s.includes(c))return s;const u=Ma(e).getComputedStyle(c);return c!==e&&lL(c,u)&&s.push(c),rL(c,u)?s:l(c.parentNode)}return r(l,"findScrollableAncestors"),e?l(e):s}r(Qf,"getScrollableAncestors");function vC(e){const[t]=Qf(e,1);return t??null}r(vC,"getFirstScrollableAncestor");function gh(e){return!Hf||!e?null:yo(e)?e:G0(e)?Y0(e)||e===jo(e).scrollingElement?window:Wc(e)?e:null:null}r(gh,"getScrollableElement");function yC(e){return yo(e)?e.scrollX:e.scrollLeft}r(yC,"getScrollXCoordinate");function jC(e){return yo(e)?e.scrollY:e.scrollTop}r(jC,"getScrollYCoordinate");function Ag(e){return{x:yC(e),y:jC(e)}}r(Ag,"getScrollCoordinates");var sa;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(sa||(sa={}));function wC(e){return!Hf||!e?!1:e===document.scrollingElement}r(wC,"isDocumentScrollingElement");function kC(e){const t={x:0,y:0},s=wC(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(kC,"getScrollPosition");var oL={x:.2,y:.2};function cL(e,t,s,l,c){let{top:u,left:p,right:f,bottom:h}=s;l===void 0&&(l=10),c===void 0&&(c=oL);const{isTop:g,isBottom:v,isLeft:y,isRight:j}=kC(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(cL,"getScrollDirectionAndSpeed");function uL(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(uL,"getScrollElementRect");function SC(e){return e.reduce((t,s)=>lo(t,Ag(s)),Ls)}r(SC,"getScrollOffsets");function dL(e){return e.reduce((t,s)=>t+yC(s),0)}r(dL,"getScrollXOffset");function fL(e){return e.reduce((t,s)=>t+jC(s),0)}r(fL,"getScrollYOffset");function NC(e,t){if(t===void 0&&(t=wo),!e)return;const{top:s,left:l,bottom:c,right:u}=t(e);vC(e)&&(c<=0||u<=0||s>=window.innerHeight||l>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}r(NC,"scrollIntoViewIfNeeded");var pL=[["x",["left","right"],dL],["y",["top","bottom"],fL]],Z0=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=Qf(t),l=SC(s);this.rect={...e},this.width=e.width,this.height=e.height;for(const[c,u,p]of pL)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 mL(e){const{EventTarget:t}=Ma(e);return e instanceof t?e:jo(e)}r(mL,"getEventListenerTarget");function xh(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(xh,"hasExceededDistance");var bs;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(bs||(bs={}));function $j(e){e.preventDefault()}r($j,"preventDefault");function hL(e){e.stopPropagation()}r(hL,"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 CC={start:[Et.Space,Et.Enter],cancel:[Et.Esc],end:[Et.Space,Et.Enter,Et.Tab]},gL=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"),J0=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(Ma(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(bs.Resize,this.handleCancel),this.windowListeners.add(bs.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(bs.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,s=e.node.current;s&&NC(s),t(Ls)}handleKeyDown(e){if(Wf(e)){const{active:t,context:s,options:l}=this.props,{keyboardCodes:c=CC,coordinateGetter:u=gL,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}:Ls;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}=kC(S),U=uL(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()}};J0.activators=[{eventName:"onKeyDown",handler:r((e,t,s)=>{let{keyboardCodes:l=CC,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 Uj(e){return!!(e&&"distance"in e)}r(Uj,"isDistanceConstraint");function Bj(e){return!!(e&&"delay"in e)}r(Bj,"isDelayConstraint");var ex=class{static{r(this,"AbstractPointerSensor")}constructor(e,t,s){var l;s===void 0&&(s=mL(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(Ma(u)),this.initialCoordinates=(l=of(c))!=null?l:Ls,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(bs.Resize,this.handleCancel),this.windowListeners.add(bs.DragStart,$j),this.windowListeners.add(bs.VisibilityChange,this.handleCancel),this.windowListeners.add(bs.ContextMenu,$j),this.documentListeners.add(bs.Keydown,this.handleKeydown),t){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Bj(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Uj(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(bs.Click,hL,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(bs.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=of(e))!=null?t:Ls,h=Rc(l,f);if(!s&&p){if(Uj(p)){if(p.tolerance!=null&&xh(h,p.tolerance))return this.handleCancel();if(xh(h,p.distance))return this.handleStart()}if(Bj(p)&&xh(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()}},xL={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},Gf=class extends ex{static{r(this,"PointerSensor")}constructor(e){const{event:t}=e,s=jo(t.target);super(e,xL,s)}};Gf.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 bL={move:{name:"mousemove"},end:{name:"mouseup"}},_g;(function(e){e[e.RightClick=2]="RightClick"})(_g||(_g={}));var AC=class extends ex{static{r(this,"MouseSensor")}constructor(e){super(e,bL,jo(e.event.target))}};AC.activators=[{eventName:"onMouseDown",handler:r((e,t)=>{let{nativeEvent:s}=e,{onActivation:l}=t;return s.button===_g.RightClick?!1:(l?.({event:s}),!0)},"handler")}];var bh={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}},_C=class extends ex{static{r(this,"TouchSensor")}constructor(e){super(e,bh)}static setup(){return window.addEventListener(bh.move.name,e,{capture:!1,passive:!1}),r(function(){window.removeEventListener(bh.move.name,e)},"teardown");function e(){}r(e,"noop")}};_C.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 uf;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(uf||(uf={}));function vL(e){let{acceleration:t,activator:s=vc.Pointer,canScroll:l,draggingRect:c,enabled:u,interval:p=5,order:f=uf.TreeOrder,pointerCoordinates:h,scrollableAncestors:g,scrollableAncestorRects:v,delta:y,threshold:j}=e;const k=jL({delta:y,disabled:!u}),[S,N]=LO(),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===uf.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}=cL(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(vL,"useAutoScroller");var yL={x:{[sa.Backward]:!1,[sa.Forward]:!1},y:{[sa.Backward]:!1,[sa.Forward]:!1}};function jL(e){let{delta:t,disabled:s}=e;const l=lf(t);return Qc(c=>{if(s||!l||!c)return yL;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(jL,"useScrollIntent");function wL(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(wL,"useCachedNode");function kL(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(kL,"useCombineActivators");var Dc;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Dc||(Dc={}));var Eg;(function(e){e.Optimized="optimized"})(Eg||(Eg={}));var Kj=new Map;function SL(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 Kj;if(!C||C===Kj||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 Z0(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(SL,"useDroppableMeasuring");function tx(e,t){return Qc(s=>e?s||(typeof t=="function"?t(e):e):null,[t,e])}r(tx,"useInitialValue");function NL(e,t){return tx(e,t)}r(NL,"useInitialRect");function CL(e){let{callback:t,disabled:s}=e;const l=Vf(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(CL,"useMutationObserver");function Yf(e){let{callback:t,disabled:s}=e;const l=Vf(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(Yf,"useResizeObserver");function AL(e){return new Z0(wo(e),e)}r(AL,"defaultMeasure");function qj(e,t,s){t===void 0&&(t=AL);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=CL({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=Yf({callback:u});return Os(()=>{u(),e?(f?.observe(e),p?.observe(document.body,{childList:!0,subtree:!0})):(f?.disconnect(),p?.disconnect())},[e]),l}r(qj,"useRect");function _L(e){return xC(e,tx(e))}r(_L,"useRectDelta");var Fj=[];function EL(e){const t=(0,x.useRef)(e),s=Qc(l=>e?l&&l!==Fj&&e&&t.current&&e.parentNode===t.current.parentNode?l:Qf(e):Fj,[e]);return(0,x.useEffect)(()=>{t.current=e},[e]),s}r(EL,"useScrollableAncestors");function IL(e){const[t,s]=(0,x.useState)(null),l=(0,x.useRef)(e),c=(0,x.useCallback)(u=>{const p=gh(u.target);p&&s(f=>f?(f.set(p,Ag(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=gh(h);return g?(g.addEventListener("scroll",c,{passive:!0}),[g,Ag(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=>{gh(h)?.removeEventListener("scroll",c)})}},[c,e]),(0,x.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((u,p)=>lo(u,p),Ls):SC(e):Ls,[e,t])}r(IL,"useScrollOffsets");function Hj(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!==Ls;l&&!s.current&&(s.current=e),!l&&s.current&&(s.current=null)},[e]),s.current?Rc(e,s.current):Ls}r(Hj,"useScrollOffsetsDelta");function TL(e){(0,x.useEffect)(()=>{if(!Hf)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(TL,"useSensorSetup");function RL(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(RL,"useSyntheticListeners");function EC(e){return(0,x.useMemo)(()=>e?iL(e):null,[e])}r(EC,"useWindowRect");var Vj=[];function ML(e,t){t===void 0&&(t=wo);const[s]=e,l=EC(s?Ma(s):null),[c,u]=(0,x.useState)(Vj);function p(){u(()=>e.length?e.map(h=>wC(h)?l:new Z0(t(h),h)):Vj)}r(p,"measureRects");const f=Yf({callback:p});return Os(()=>{f?.disconnect(),p(),e.forEach(h=>f?.observe(h))},[e]),c}r(ML,"useRects");function IC(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Wc(t)?t:e}r(IC,"getMeasurableNode");function DL(e){let{measure:t}=e;const[s,l]=(0,x.useState)(null),c=Yf({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=IC(h);c?.disconnect(),g&&c?.observe(g),l(g?t(g):null)},[t,c]),[p,f]=rf(u);return(0,x.useMemo)(()=>({nodeRef:p,rect:s,setRef:f}),[s,p,f])}r(DL,"useDragOverlayMeasuring");var OL=[{sensor:Gf,options:{}},{sensor:J0,options:{}}],LL={current:{}},zd={draggable:{measure:Pj},droppable:{measure:Pj,strategy:Dc.WhileDragging,frequency:Eg.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}},zL={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:cf},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:zd,measureDroppableContainers:cf,windowRect:null,measuringScheduled:!1},TC={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:cf,draggableNodes:new Map,over:null,measureDroppableContainers:cf},Yc=(0,x.createContext)(TC),RC=(0,x.createContext)(zL);function PL(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new yc}}}r(PL,"getInitialState");function $L(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($L,"reducer");function UL(e){let{disabled:t}=e;const{active:s,activatorEvent:l,draggableNodes:c}=(0,x.useContext)(Yc),u=lf(l),p=lf(s?.id);return(0,x.useEffect)(()=>{if(!t&&!l&&u&&p!=null){if(!Wf(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=$O(v);if(y){y.focus();break}}})}},[l,t,c,p,u]),null}r(UL,"RestoreFocus");function MC(e,t){let{transform:s,...l}=t;return e!=null&&e.length?e.reduce((c,u)=>u({transform:c,...l}),s):s}r(MC,"applyModifiers");function BL(e){return(0,x.useMemo)(()=>({draggable:{...zd.draggable,...e?.draggable},droppable:{...zd.droppable,...e?.droppable},dragOverlay:{...zd.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}r(BL,"useMeasuringConfiguration");function KL(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;Os(()=>{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=xC(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=vC(h);v&&v.scrollBy({top:g.y,left:g.x})}},[t,p,f,l,s])}r(KL,"useLayoutShiftScrollCompensation");var Xf=(0,x.createContext)({...Ls,scaleX:1,scaleY:1}),ir;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(ir||(ir={}));var nx=(0,x.memo)(r(function(t){var s,l,c,u;let{id:p,accessibility:f,autoScroll:h=!0,children:g,sensors:v=OL,collisionDetection:y=JO,measuring:j,modifiers:k,...S}=t;const[N,I]=(0,x.useReducer)($L,void 0,PL),[C,M]=HO(),[R,_]=(0,x.useState)(ir.Uninitialized),D=R===ir.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:LL,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=BL(j),{droppableRects:de,measureDroppableContainers:we,measuringScheduled:ye}=SL(le,{dragging:D,dependencies:[z.x,z.y],config:Ae.droppable}),Me=wL(K,U),he=(0,x.useMemo)(()=>X?of(X):null,[X]),ve=en(),et=NL(Me,Ae.draggable.measure);KL({activeNode:U!=null?K.get(U):null,config:ve.layoutShiftCompensation,initialRect:et,measure:Ae.draggable.measure});const Pe=qj(Me,Ae.draggable.measure,et),Ee=qj(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}),Ve=E.getNodeFor((s=ct.current.over)==null?void 0:s.id),yt=DL({measure:Ae.dragOverlay.measure}),Zt=(l=yt.nodeRef.current)!=null?l:Me,ge=D?(c=yt.rect)!=null?c:Pe:null,Oe=!!(yt.nodeRef.current&&yt.rect),De=_L(Oe?null:Pe),ut=EC(Zt?Ma(Zt):null),Ht=EL(D?Ve??Me:null),Vt=ML(Ht),gt=MC(k,{transform:{x:z.x-De.x,y:z.y-De.y,scaleX:1,scaleY:1},activatorEvent:X,active:Q,activeNodeRect:Pe,containerNodeRect:Ee,draggingNodeRect:ge,over:ct.current.over,overlayNodeRect:yt.rect,scrollableAncestors:Ht,scrollableAncestorRects:Vt,windowRect:ut}),cn=he?lo(he,z):null,$=IL(Ht),qe=Hj($),Xe=Hj($,[Pe]),xt=lo(gt,qe),at=ge?nL(ge,gt):null,Kt=Q&&at?y({active:Q,collisionRect:at,droppableRects:de,droppableContainers:le,pointerCoordinates:cn}):null,ea=hC(Kt,"id"),[Jt,Mt]=(0,x.useState)(null),Gt=eL(Oe?gt:lo(gt,Xe),(u=Jt?.rect)!=null?u:null,Pe),dt=(0,x.useRef)(null),On=(0,x.useCallback)((qt,Tt)=>{let{sensor:At,options:_e}=Tt;if(V.current==null)return;const Re=K.get(V.current);if(!Re)return;const lt=qt.nativeEvent,Dt=new At({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,tn){if(!K.get(Ot))return;const{onDragPending:Wt}=ee.current,Ln={id:Ot,constraint:Rt,initialCoordinates:Lt,offset:tn};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:tn}=ee.current,Wt={activatorEvent:lt,active:{id:Rt,data:Lt.data,rect:O}};(0,Zl.unstable_batchedUpdates)(()=>{tn?.(Wt),_(ir.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:Le(Xn.DragEnd),onCancel:Le(Xn.DragCancel)});dt.current=Dt;function Le(Ot){return r(async function(){const{active:Lt,collisions:tn,over:Wt,scrollAdjustedTranslate:Ln}=ct.current;let gn=null;if(Lt&&Ln){const{cancelDrop:zn}=ee.current;gn={activatorEvent:lt,active:Lt,collisions:tn,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}),_(ir.Uninitialized),Mt(null),ce(null),A(null),dt.current=null;const zn=Ot===Xn.DragEnd?"onDragEnd":"onDragCancel";if(gn){const ss=ee.current[zn];ss?.(gn),C({type:zn,event:gn})}})},"handler")}r(Le,"createHandler")},[K]),mt=kL(v,(0,x.useCallback)((qt,Tt)=>(At,_e)=>{const Re=At.nativeEvent,lt=K.get(_e);if(V.current!==null||!lt||Re.dndKit||Re.defaultPrevented)return;const Dt={active:lt};qt(At,Tt.options,Dt)===!0&&(Re.dndKit={capturedBy:Tt.sensor},V.current=_e,On(At,Tt))},[K,On]));TL(v),Os(()=>{Pe&&R===ir.Initializing&&_(ir.Initialized)},[Pe,R]),(0,x.useEffect)(()=>{const{onDragMove:qt}=ee.current,{active:Tt,activatorEvent:At,collisions:_e,over:Re}=ct.current;if(!Tt||!At)return;const lt={active:Tt,activatorEvent:At,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:At,droppableContainers:_e,scrollAdjustedTranslate:Re}=ct.current;if(!qt||V.current==null||!Tt||!Re)return;const{onDragOver:lt}=ee.current,Dt=_e.get(ea),Le=Dt&&Dt.rect.current?{id:Dt.id,rect:Dt.rect.current,data:Dt.data,disabled:Dt.disabled}:null,Ot={active:qt,activatorEvent:Tt,collisions:At,delta:{x:Re.x,y:Re.y},over:Le};(0,Zl.unstable_batchedUpdates)(()=>{Mt(Le),lt?.(Ot),C({type:"onDragOver",event:Ot})})},[ea]),Os(()=>{ct.current={activatorEvent:X,active:Q,activeNode:Me,collisionRect:at,collisions:Kt,droppableRects:de,draggableNodes:K,draggingNode:Zt,draggingNodeRect:ge,droppableContainers:E,over:Jt,scrollableAncestors:Ht,scrollAdjustedTranslate:xt},O.current={initial:ge,translated:at}},[Q,Me,Kt,at,K,Zt,ge,de,E,Jt,Ht,xt]),vL({...ve,delta:z,draggingRect:at,pointerCoordinates:cn,scrollableAncestors:Ht,scrollableAncestorRects:Vt});const Nn=(0,x.useMemo)(()=>({active:Q,activeNode:Me,activeNodeRect:Pe,activatorEvent:X,collisions:Kt,containerNodeRect:Ee,dragOverlay:yt,draggableNodes:K,droppableContainers:E,droppableRects:de,over:Jt,measureDroppableContainers:we,scrollableAncestors:Ht,scrollableAncestorRects:Vt,measuringConfiguration:Ae,measuringScheduled:ye,windowRect:ut}),[Q,Me,Pe,X,Kt,Ee,yt,K,E,de,Jt,we,Ht,Vt,Ae,ye,ut]),It=(0,x.useMemo)(()=>({activatorEvent:X,activators:mt,active:Q,activeNodeRect:Pe,ariaDescribedById:{draggable:ie},dispatch:I,draggableNodes:K,over:Jt,measureDroppableContainers:we}),[X,mt,Q,Pe,I,ie,K,Jt,we]);return x.createElement(fC.Provider,{value:M},x.createElement(Yc.Provider,{value:It},x.createElement(RC.Provider,{value:Nn},x.createElement(Xf.Provider,{value:Gt},g)),x.createElement(UL,{disabled:f?.restoreFocus===!1})),x.createElement(QO,{...f,hiddenTextDescribedById:ie}));function en(){const qt=ue?.autoScrollEnabled===!1,Tt=typeof h=="object"?h.enabled===!1:h===!1,At=D&&!qt&&!Tt;return typeof h=="object"?{...h,enabled:At}:{enabled:At}}},"DndContext")),qL=(0,x.createContext)(null),Wj="button",FL="Draggable";function HL(e){let{id:t,data:s,disabled:l=!1,attributes:c}=e;const u=Gc(FL),{activators:p,activatorEvent:f,active:h,activeNodeRect:g,ariaDescribedById:v,draggableNodes:y,over:j}=(0,x.useContext)(Yc),{role:k=Wj,roleDescription:S="draggable",tabIndex:N=0}=c??{},I=h?.id===t,C=(0,x.useContext)(I?Xf:qL),[M,R]=rf(),[_,D]=rf(),U=RL(p,t),K=Tc(s);return Os(()=>(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===Wj?!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(HL,"useDraggable");function DC(){return(0,x.useContext)(RC)}r(DC,"useDndContext");var VL="Droppable",WL={timeout:25};function OC(e){let{data:t,disabled:s=!1,id:l,resizeObserverConfig:c}=e;const u=Gc(VL),{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}={...WL,...c},C=Tc(N??l),M=Yf({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]=rf(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(OC,"useDroppable");function QL(e){let{animation:t,children:s}=e;const[l,c]=(0,x.useState)(null),[u,p]=(0,x.useState)(null),f=lf(s);return!s&&!l&&f&&c(f),Os(()=>{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(QL,"AnimationManager");var GL={x:0,y:0,scaleX:1,scaleY:1};function YL(e){let{children:t}=e;return x.createElement(Yc.Provider,{value:TC},x.createElement(Xf.Provider,{value:GL},t))}r(YL,"NullifiedContextProvider");var XL={position:"fixed",touchAction:"none"},ZL=r(e=>Wf(e)?"transform 250ms ease":void 0,"defaultTransition$1"),JL=(0,x.forwardRef)((e,t)=>{let{as:s,activatorEvent:l,adjustScale:c,children:u,className:p,rect:f,style:h,transform:g,transition:v=ZL}=e;if(!f)return null;const y=c?g:{...g,scaleX:1,scaleY:1},j={...XL,width:f.width,height:f.height,top:f.top,left:f.left,transform:ti.Transform.toString(y),transformOrigin:c&&l?GO(l,f):void 0,transition:typeof v=="function"?v(l):v,...h};return x.createElement(s,{className:p,style:j,ref:t},u)}),e4=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"),t4=r(e=>{let{transform:{initial:t,final:s}}=e;return[{transform:ti.Transform.toString(t)},{transform:ti.Transform.toString(s)}]},"defaultKeyframeResolver"),n4={duration:250,easing:"ease",keyframes:t4,sideEffects:e4({styles:{active:{opacity:"0"}}})};function a4(e){let{config:t,draggableNodes:s,droppableContainers:l,measuringConfiguration:c}=e;return Vf((u,p)=>{if(t===null)return;const f=s.get(u);if(!f)return;const h=f.node.current;if(!h)return;const g=IC(p);if(!g)return;const{transform:v}=Ma(p).getComputedStyle(p),y=bC(v);if(!y)return;const j=typeof t=="function"?t:s4(t);return NC(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(a4,"useDropAnimation");function s4(e){const{duration:t,easing:s,sideEffects:l,keyframes:c}={...n4,...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(s4,"createDefaultDropAnimation");var Qj=0;function i4(e){return(0,x.useMemo)(()=>{if(e!=null)return Qj++,Qj},[e])}r(i4,"useKey");var r4=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}=DC(),U=(0,x.useContext)(Xf),K=i4(y?.id),z=MC(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=tx(j),B=a4({config:l,draggableNodes:S,droppableContainers:N,measuringConfiguration:M}),O=E?I.setRef:void 0;return x.createElement(YL,null,x.createElement(QL,{animation:B},y&&K?x.createElement(JL,{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 ax(e,t,s){const l=e.slice();return l.splice(s<0?l.length+s:s,0,l.splice(t,1)[0]),l}r(ax,"arrayMove");function l4(e,t){return e.reduce((s,l,c)=>{const u=t.get(l);return u&&(s[c]=u),s},Array(e.length))}r(l4,"getSortedRects");function fd(e){return e!==null&&e>=0}r(fd,"isValidIndex");function o4(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(o4,"itemsEqual");function c4(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}r(c4,"normalizeDisabled");var pd={scaleX:1,scaleY:1},u4=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=d4(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 d4(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(d4,"getItemGap");var LC=r(e=>{let{rects:t,activeIndex:s,overIndex:l,index:c}=e;const u=ax(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},zC=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=f4(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 f4(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(f4,"getItemGap$1");var PC="Sortable",$C=x.createContext({activeIndex:-1,containerId:PC,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:LC,disabled:{draggable:!1,droppable:!1}});function sx(e){let{children:t,id:s,items:l,strategy:c=LC,disabled:u=!1}=e;const{active:p,dragOverlay:f,droppableRects:h,over:g,measureDroppableContainers:v}=DC(),y=Gc(PC,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=!o4(k,C.current),R=I!==-1&&N===-1||M,_=c4(u);Os(()=>{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:l4(k,h),strategy:c}),[N,y,_.draggable,_.droppable,R,k,I,h,j,c]);return x.createElement($C.Provider,{value:D},t)}r(sx,"SortableContext");var p4=r(e=>{let{id:t,items:s,activeIndex:l,overIndex:c}=e;return ax(s,l,c).indexOf(t)},"defaultNewIndexGetter"),m4=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"),h4={duration:200,easing:"ease"},UC="transform",g4=ti.Transition.toString({property:UC,duration:0,easing:"linear"}),x4={roleDescription:"sortable"};function b4(e){let{disabled:t,index:s,node:l,rect:c}=e;const[u,p]=(0,x.useState)(null),f=(0,x.useRef)(s);return Os(()=>{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(b4,"useDerivedTransform");function ix(e){let{animateLayoutChanges:t=m4,attributes:s,disabled:l,data:c,getNewIndex:u=p4,id:p,strategy:f,resizeObserverConfig:h,transition:g=h4}=e;const{items:v,containerId:y,activeIndex:j,disabled:k,disableTransforms:S,sortedRects:N,overIndex:I,useDragOverlay:C,strategy:M}=(0,x.useContext)($C),R=v4(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}=OC({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}=HL({id:p,data:D,attributes:{...x4,...s},disabled:R.draggable}),Ae=OO(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,Pe=(0,x.useRef)({activeId:et,items:v,newIndex:ve,containerId:y}),Ee=v!==Pe.current.items,ct=t({active:O,containerId:y,isDragging:A,isSorting:de,id:p,index:_,items:v,newIndex:Pe.current.newIndex,previousItems:Pe.current.items,previousContainerId:Pe.current.containerId,transition:g,wasDragging:Pe.current.activeId!=null}),Ve=b4({disabled:!ct,index:_,node:z,rect:K});return(0,x.useEffect)(()=>{de&&Pe.current.newIndex!==ve&&(Pe.current.newIndex=ve),y!==Pe.current.containerId&&(Pe.current.containerId=y),v!==Pe.current.items&&(Pe.current.items=v)},[de,ve,y,v]),(0,x.useEffect)(()=>{if(et===Pe.current.activeId)return;if(et!=null&&Pe.current.activeId==null){Pe.current.activeId=et;return}const Zt=setTimeout(()=>{Pe.current.activeId=et},50);return()=>clearTimeout(Zt)},[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:Ve??he,transition:yt()};function yt(){if(Ve||Ee&&Pe.current.newIndex===_)return g4;if(!(ye&&!Wf(Q)||!g)&&(de||ct))return ti.Transition.toString({...g,property:UC})}r(yt,"getTransition")}r(ix,"useSortable");function v4(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(v4,"normalizeLocalDisabled");function df(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(df,"hasSortableData");var y4=[Et.Down,Et.Right,Et.Up,Et.Left],j4=r((e,t)=>{let{context:{active:s,collisionRect:l,droppableRects:c,droppableContainers:u,over:p,scrollableAncestors:f}}=t;if(y4.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=XO({active:s,collisionRect:l,droppableRects:c,droppableContainers:h,pointerCoordinates:null});let v=hC(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=Qf(S).some((_,D)=>f[D]!==_),I=BC(y,j),C=w4(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 BC(e,t){return!df(e)||!df(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}r(BC,"isSameContainer");function w4(e,t){return!df(e)||!df(t)||!BC(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}r(w4,"isAfter");function Gj(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(Gj,"areEqual$1");function KC(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(KC,"sortCompaniesByOrder");function Yj(e,t){return KC(e,t).map(s=>s.id)}r(Yj,"buildOrderIds$1");function k4({companies:e,userId:t}){const s=kn(),l=(0,x.useMemo)(()=>P.sidebarPreferences.companyOrder(t??"__anon__"),[t]),{data:c}=me({queryKey:l,queryFn:r(()=>Zd.getCompanyOrder(),"queryFn"),enabled:!!t}),[u,p]=(0,x.useState)(()=>Yj(e,[]));(0,x.useEffect)(()=>{const h=Yj(e,c?.orderedIds??[]);p(g=>Gj(g,h)?g:h)},[e,c?.orderedIds]);const f=Bt({mutationFn:r(h=>Zd.updateCompanyOrder({orderedIds:h}),"mutationFn"),onSuccess:r(h=>{s.setQueryData(l,h)},"onSuccess")});return{orderedCompanies:(0,x.useMemo)(()=>KC(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=>Gj(y,v)?y:v),t&&(s.setQueryData(l,y=>({orderedIds:v,updatedAt:y?.updatedAt??null})),f.mutate(v))},[e,f,s,l,t])}}r(k4,"useCompanyOrder");var S4=[P.health[0]];function N4(e){return!S4.includes(e[0])}r(N4,"isAccountScopedQueryKey");function rx({onSignedOut:e}={}){const t=kn();return Bt({mutationFn:r(async()=>{await BE(),await Zn.signOut()},"mutationFn"),onSuccess:r(async()=>{e?.(),t.resetQueries({predicate:r(s=>N4(s.queryKey),"predicate")}),await t.invalidateQueries({queryKey:P.health})},"onSuccess")})}r(rx,"useSignOut");var C4=[[0,8,2,10],[12,4,14,6],[3,11,1,9],[15,7,13,5]];function A4(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(A4,"hashString");function _4(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(_4,"mulberry32");function Xj(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(Xj,"hslToRgb");function E4(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=_4(A4(e)),p=Math.floor(u()*360),[f,h,g]=Xj(p,54+Math.floor(u()*14),36+Math.floor(u()*12)),[v,y,j]=Xj(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)))<=C4[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(E4,"makeCompanyPatternDataUrl");function qC({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)(()=>E4(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(qC,"CompanyPatternIcon");function I4({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)(O1,{className:"size-3.5 shrink-0 text-ink-3","aria-hidden":"true"})]})]})}r(I4,"OrganizationSwitcherLoading");function T4({children:e,open:t,onOpenChange:s}){const{userId:l,settled:c,failed:u}=j0(),{selectedCompanyId:p}=vt(),f=UE(),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)(R4,{settled:g,loading:v,companyId:p,company:h,open:t,onOpenChange:s,children:e},JSON.stringify([l,p]))}r(T4,"PluginOrganizationSwitcher");function R4({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=rx({onSignedOut:N}),{slots:C,isLoading:M,errorMessage:R}=qc({slotTypes:["organizationSwitcher"],companyId:l,enabled:t});if(s||t&&M&&!R)return(0,a.jsx)(I4,{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)(qC,{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)(D0,{slot:C[0],context:{companyId:l,companyPrefix:c?.issuePrefix??null},componentProps:{..._},fallback:e})}r(R4,"OrganizationSwitcher");var M4="size-5 shrink-0 rounded-md text-(length:--text-micro)",D4="size-(--organization-popover-avatar-size) shrink-0 rounded-lg text-(length:--text-micro)",O4="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",vh="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 FC({company:e,inPopover:t=!1}){return(0,a.jsx)(qC,{companyName:e.name,logoUrl:e.logoUrl,className:t?D4:M4})}r(FC,"WorkspaceIcon");function L4({company:e,isEditing:t,isSelected:s,onSelect:l}){const{attributes:c,listeners:u,setActivatorNodeRef:p,setNodeRef:f,transform:h,transition:g,isDragging:v}=ix({id:e.id,disabled:!t});return(0,a.jsxs)(Sn,{ref:f,style:{transform:ti.Transform.toString(h),transition:g,zIndex:v?10:void 0},onSelect:r(y=>{if(t){y.preventDefault();return}l(e)},"onSelect"),className:Y(O4,t&&"cursor-grab",v&&"opacity-80"),children:[(0,a.jsx)(FC,{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)(gR,{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)(Rs,{className:"size-4 text-ink"}):null})]})}r(L4,"SortableCompanyItem");function z4(e={}){return(0,a.jsx)(T4,{...e,children:(0,a.jsx)(P4,{...e})})}r(z4,"SidebarCompanyMenu");function P4({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}=vt(),{openOnboarding:y}=$s(),{isMobile:j,setSidebarOpen:k,collapsed:S,peeking:N}=Jn(),I=S&&!N,C=hn(),M=ja(),R=e??s,_=t??l,D=X0(Mc(AC,{activationConstraint:{distance:8}}),Mc(_C,{activationConstraint:{delay:180,tolerance:6}})),U=(0,x.useMemo)(()=>p.filter(de=>de.status!=="archived"),[p]),{data:K}=me({queryKey:P.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),z=K?.user?.id??K?.session?.userId??null,{orderedCompanies:E,persistOrder:B}=k4({companies:U,userId:z}),{hidden:O,loaded:Q}=hr(),V=Q&&!qd(O,"company.members")&&!qd(O,"company.invites"),ue="organization",ce=f?.name??null,X=rx({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(ax(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)(FC,{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)(O1,{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)(_1,{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)(nx,{sensors:D,collisionDetection:gC,onDragEnd:Ae,children:(0,a.jsx)(sx,{items:E.map(de=>de.id),strategy:zC,children:E.map(de=>(0,a.jsx)(L4,{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:vh,disabled:c,children:[(0,a.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,a.jsx)(ns,{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:vh,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)(vN,{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:vh,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)($f,{className:"size-4"})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:X.isPending?"Signing out...":"Sign out"})]}):null]})]})]})}r(P4,"BuiltinCompanyMenu");function Zj({children:e}){const{openNewIssue:t}=$s(),{enabled:s}=zf(),[l,c]=(0,x.useState)(!0),[u,p]=(0,x.useState)(!0),{selectedCompanyId:f,selectedCompany:h}=vt(),{collapsed:g,peeking:v}=Jn(),y=g&&!v,j=Q0(f),{data:k,isFetched:S}=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")}),N=P.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(()=>Lf.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:P.attentionCount(f),queryFn:r(()=>B5.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",lr.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)(T0,{className:"size-5 shrink-0 text-ink",title:"Wardmote"}),(0,a.jsx)(z4,{})]}),(0,a.jsxs)("nav",{className:y?lr.railNav:lr.nav,children:[(0,a.jsxs)("div",{className:lr.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)(F0,{className:"h-4 w-4 shrink-0"}),(0,a.jsx)("span",{className:y?n1:"truncate",children:"New Task"})]});return y?(0,a.jsxs)(Ts,{children:[(0,a.jsx)(Es,{asChild:!0,children:A}),(0,a.jsx)(Is,{side:"right",children:"New Task"})]}):A})(),(0,a.jsx)(Ye,{to:"/search",label:"Search",icon:fr}),(0,a.jsx)(Ye,{to:"/dashboard",label:"Dashboard",icon:E0}),U?null:(0,a.jsx)(Ye,{to:"/inbox",label:"Inbox",icon:A0,badge:j.inbox,badgeLabel:"unread",badgeTone:j.failedRuns>0?"danger":"default",alert:j.failedRuns>0}),s&&!D?(0,a.jsx)(Ye,{to:"/chats",label:"Chat",icon:vg}):null,Q?(0,a.jsx)(Ye,{to:"/decisions",label:"Decisions",icon:DS,badge:ue,badgeLabel:"decisions"}):null,E?(0,a.jsx)(Ye,{to:"/status",label:"Status",icon:vR,textBadge:"beta"}):null]}),(0,a.jsxs)(nf,{label:"Work",collapsible:{open:l,onOpenChange:c},children:[D?(0,a.jsx)(Ye,{to:"/chats",label:"Chat",icon:vg}):null,U?(0,a.jsx)(Ye,{to:"/issues",label:"Tasks",icon:Jh,liveCount:R,badge:j.inbox,badgeLabel:"unread",badgeTone:j.failedRuns>0?"danger":"default",alert:j.failedRuns>0}):(0,a.jsx)(Ye,{to:"/issues",label:"Tasks",icon:Jh,liveCount:R}),(0,a.jsx)(Ye,{to:"/projects",label:"Projects",icon:K1}),(0,a.jsx)(A5,{}),(0,a.jsx)(Ye,{to:"/routines",label:"Routines",icon:H1}),(0,a.jsx)(Ye,{to:"/artifacts",label:"Artifacts",icon:i3}),ce?(0,a.jsx)(Ye,{to:"/cases",label:"Cases",icon:Tf,textBadge:"beta"}):null,z?(0,a.jsx)(Ye,{to:"/pipelines",label:"Pipelines",icon:hc}):null,O?(0,a.jsx)(Ye,{to:"/goals",label:"Goals",icon:S0}):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)(Ye,{to:"/workspaces",label:"Workspaces",icon:hc}):null,(0,a.jsx)(Ye,{to:"/terminal",label:"Terminal",icon:DR}),(0,a.jsx)(fg,{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)(cC,{errorBehavior:"hidden",placementZones:["sidebar"],context:X,className:"flex flex-col gap-0.5",itemClassName:"text-(length:--text-compact) font-medium"})]}),(0,a.jsxs)(nf,{label:"Org",collapsible:{open:u,onOpenChange:p},children:[(0,a.jsx)(Ye,{to:"/agents",label:"Agents",icon:Gr}),(0,a.jsx)(Ye,{to:"/skills",label:"Skills",icon:M1}),(0,a.jsx)(Ye,{to:"/apps",label:"Connectors",icon:zR}),(0,a.jsx)(Ye,{to:"/activity",label:"Audit",icon:q0})]}),e??(0,a.jsx)(N5,{streamlined:!0}),(0,a.jsx)($5,{companyId:f,liveIssueIds:_}),(0,a.jsx)(fg,{errorBehavior:"hidden",slotTypes:["sidebarPanel"],context:X,className:"flex flex-col gap-3",itemClassName:"rounded-lg border border-line p-3",missingBehavior:"placeholder"})]})]})}r(Zj,"Sidebar");function HC(){const e=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return{enabled:!e.isError&&e.data?.enableFastResponses===!0,loaded:e.isFetched}}r(HC,"useFastResponsesEnabled");var $4="wardmote.contextualSidebar.origin";function VC(e,t){if(!t)return[];const s=e.split("/").filter(Boolean);return s.length<2?[]:s[0]?.toUpperCase()!==t.toUpperCase()?[]:s.slice(1)}r(VC,"getCompanyPathSegments");function U4(e,t){const s=VC(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(U4,"classifyShellRoute");function WC(e,t){return`${$4}:${t.toUpperCase()}:${e}`}r(WC,"contextualOriginStorageKey");function QC(e,t){return e.split("/").filter(Boolean)[0]?.toUpperCase()===t.toUpperCase()}r(QC,"isCompanyPath");function B4({surface:e,companyPrefix:t,previousPathname:s}){if(!(typeof window>"u"||!QC(s,t)))try{window.sessionStorage.setItem(WC(e,t),s)}catch{}}r(B4,"rememberContextualSidebarOrigin");function K4({surface:e,companyPrefix:t,fallbackTo:s}){if(typeof window>"u"||!t)return s;try{const l=window.sessionStorage.getItem(WC(e,t));return l&&QC(l,t)?l:s}catch{return s}}r(K4,"readContextualSidebarOrigin");function Xc({surface:e,title:t,icon:s,fallbackTo:l="/dashboard",showHeader:c=!0,className:u,children:p}){const f=ja(),{selectedCompany:h}=vt(),{isMobile:g,setSidebarOpen:v}=Jn();function y(){f(K4({surface:e,companyPrefix:h?.issuePrefix,fallbackTo:l})),g&&v(!1)}return r(y,"goBack"),(0,a.jsx)(Q1,{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)(D1,{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 q4(e){const t=e.manifestJson.environmentDrivers??[];return t.length===0?!1:t.every(s=>s.kind==="sandbox_provider")}r(q4,"isSandboxProviderOnly");function F4(){const{selectedCompanyId:e}=vt(),{hidden:t}=hr(),{enabled:s}=HC(),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?P.sidebarBadges(e):["sidebar-badges","__disabled__"],queryFn:r(async()=>{try{return await VN.get(e)}catch(g){if(g instanceof Ii&&(g.status===401||g.status===403))return null;throw g}},"queryFn"),enabled:!!e,retry:!1,refetchInterval:15e3}),{data:f}=me({queryKey:P.plugins.all,queryFn:r(()=>R0.list(),"queryFn"),enabled:c}),h=(f??[]).filter(g=>!q4(g));return(0,a.jsxs)(Xc,{surface:"settings",title:"Settings",showHeader:!1,className:lr.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:`${lr.group} w-full`,children:(0,a.jsx)(Ye,{to:"/dashboard",label:"Back to app",icon:N0})})}),(0,a.jsx)("nav",{"aria-label":"Settings","data-slot":"contextual-sidebar-nav",className:lr.nav,children:(0,a.jsxs)("div",{"data-slot":"contextual-sidebar-group",className:lr.group,children:[(0,a.jsx)(Ye,{to:"/company/settings",label:"General",icon:oN,end:!0}),l("instance.profile")&&(0,a.jsx)(Ye,{to:"/company/settings/instance/profile",label:"Profile",icon:PR,end:!0}),l("company.members")&&(0,a.jsx)(Ye,{to:"/company/settings/members",label:"Members",icon:Gr,badge:p?.joinRequests??0,end:!0}),u.filter(g=>g.routePath).map(g=>(0,a.jsx)(Ye,{to:`/company/settings/${g.routePath}`,label:g.displayName,icon:By,end:!0},`${g.pluginKey}:${g.id}`)),(0,a.jsx)(Ye,{to:"/company/settings/agent-defaults",label:"Agent defaults",icon:Nc}),(0,a.jsx)(Ye,{to:"/company/settings/models",label:"Models and providers",icon:M1,end:!0}),l("company.secrets")&&(0,a.jsx)(Ye,{to:"/company/settings/secrets",label:"Secrets",icon:_0,end:!0}),l("instance.environments")&&(0,a.jsx)(Ye,{to:"/company/settings/instance/environments",label:"Environments",icon:SR,end:!0}),s&&(0,a.jsx)(Ye,{to:"/company/settings/connections",label:"Connections",icon:v3,end:!0}),l("instance.access")&&(0,a.jsx)(Ye,{to:"/company/settings/instance/access",label:"Access",icon:A3,end:!0}),l("company.export")&&(0,a.jsx)(Ye,{to:"/company/export",label:"Export",icon:xg}),l("company.import")&&(0,a.jsx)(Ye,{to:"/company/import",label:"Import",icon:E3,end:!0}),l("instance.experimental")&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ye,{to:"/company/settings/instance/features",label:"Features",icon:gN}),(0,a.jsx)(Ye,{to:"/company/settings/instance/advanced",label:"Advanced",icon:Ef})]}),c&&(0,a.jsx)(Ye,{to:"/company/settings/instance/plugins",label:"Plugins",icon:By}),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)(m1,{to:`${ar}/plugins/${g.id}`,state:Df,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)(Ye,{to:"/company/settings/instance/adapters",label:"Adapters",icon:s3})]})})]})}r(F4,"CompanySettingsSidebar");function H4({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)(NI,{variant:"line",className:l==="start"?"justify-start":void 0,children:e.map(u=>(0,a.jsx)(SI,{value:u.value,children:u.label},u.value))})}r(H4,"PageTabBar");var V4=[{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:`${ar}/profile`},{value:"instance-environments",label:"Environments",href:`${ar}/environments`},{value:"connections",label:"Connections",href:"/company/settings/connections"},{value:"instance-access",label:"Access",href:`${ar}/access`},{value:"instance-features",label:"Features",href:`${ar}/features`},{value:"instance-advanced",label:"Advanced",href:`${ar}/advanced`},{value:"instance-plugins",label:"Plugins",href:`${ar}/plugins`},{value:"instance-adapters",label:"Adapters",href:`${ar}/adapters`}],W4={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 Q4(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(Q4,"getCompanySettingsTab");function G4(){const e=hn(),t=ja(),{hidden:s}=hr(),{enabled:l}=HC(),c=Q4(e.pathname),u=V4.filter(f=>{if(f.value==="connections"&&!l)return!1;const h=W4[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)(CI,{value:c,onValueChange:p,children:(0,a.jsx)(H4,{items:u.map(({value:f,label:h})=>({value:f,label:h})),value:c,onValueChange:p,align:"start"})})}r(G4,"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 GC({endpointId:e,NavItem:t=Ye}){const s=me({queryKey:P.chatEndpoints.detail(e),queryFn:r(()=>X1.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:V1,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:b3}),(0,a.jsx)(t,{to:`/apps/chat/${e}/conversations`,label:"Conversations",icon:f1,end:!0}),(0,a.jsx)(t,{to:`/apps/chat/${e}/activity`,label:"Activity",icon:Rf,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:k3,end:!0})]})})})}r(GC,"ChatDetailSidebar");var aa=r(e=>`/chat-endpoints/${e}/github`,"path$1"),Y4={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 X4({NavItem:e=Ye}){const[t]=i1(),s=t.get("resume"),l=me({queryKey:["github-wizard",s],queryFn:r(()=>Y4.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)(GC,{endpointId:s,NavItem:e}):(0,a.jsx)(D3,{})}r(X4,"ChatSetupSidebar");function BG(e){return(0,a.jsx)(M3,{...e,labels:e.labels??["Choose agent","Connect provider","Try it"],ariaLabel:"Connection setup progress"})}r(BG,"ChatSetupNavigation");var Z4="/apps/advanced";function J4(e){return`${Z4}/${e}`}r(J4,"advancedTabHref");var YC=[{key:"paste-config",label:"Paste a config",icon:QI}],XC=[{key:"gateways",label:"Gateways",icon:F1},{key:"profiles",label:"Profiles",icon:Tf},{key:"smoke-lab",label:"Smoke Lab",icon:g3}],KG=[...YC,...XC];function qG(e){return YC.some(t=>t.key===e)}r(qG,"isAdvancedSetupTab");function ez(e){return e==="smoke-lab"}r(ez,"isExperimentalToolTab");var Jj=null;function tz(){return Jj??=new Af,Jj}r(tz,"getDetachedClient$2");function nz(){const e=(0,x.useContext)(v0),{data:t,isFetched:s}=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),enabled:e!=null},e??tz());return e?{enabled:t?.enableSmokeLab===!0,loaded:s}:{enabled:!1,loaded:!0}}r(nz,"useSmokeLabEnabled");function az(){const{selectedCompanyId:e}=vt();return me({queryKey:P.tools.actionRequests(e??"__none__","pending"),queryFn:r(()=>Yl.listActionRequests(e,"pending"),"queryFn"),enabled:!!e,refetchInterval:2e4}).data?.actionRequests.length??0}r(az,"useReviewCount");function sz(){const{pathname:e}=hn(),t=az(),{enabled:s}=nz(),l=XC.filter(u=>u.key==="gateways"||u.key==="profiles"?!1:!ez(u.key)||s);if(e.endsWith("/apps/chat/connect"))return(0,a.jsx)(X4,{});const c=e.match(/\/apps\/chat\/([^/]+)(?:\/(?:settings|access|conversations|activity|approvals|audit)|\/reviews(?:\/[^/]+)?)?\/?$/);return c?(0,a.jsx)(GC,{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)(Ye,{to:"/apps",label:"Browse",icon:OR,end:!0}),(0,a.jsx)(Ye,{to:"/apps/review",label:"Review",icon:C3,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)(Ye,{to:J4(u.key),label:u.label,icon:u.icon,end:!0},u.key))})]}):null]})})}r(sz,"AppsSidebar");function ew(e){const{selectedCompanyId:t}=vt(),{isMobile:s,setSidebarOpen:l}=Jn(),c=me({queryKey:P.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:P.tools.applications(t??"__none__"),queryFn:r(()=>Yl.listApplications(t),"queryFn"),enabled:!!t}),p=me({queryKey:P.tools.connections(t??"__none__"),queryFn:r(()=>Yl.listConnections(t),"queryFn"),enabled:e.kind==="application"&&!!t}),f=me({queryKey:P.apps.gallery(t??"__none__"),queryFn:r(()=>Yl.listGallery(t),"queryFn"),enabled:!!t}),h=me({queryKey:P.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=lz(e.kind==="application"?(p.data?.connections??[]).filter(R=>R.applicationId===e.applicationId):[]),k=g?eR(g):y?.name??"App",S=rz(f.data?.apps??[],g,y??void 0),N=c1(y)??d1(g)??(S?tg(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)(D1,{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)(xT,{name:k,brandKey:N,logoUrl:XE(S),allowRemoteFallback:!u.isPending,darkLogoUrl:JE(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:QE.map(R=>(0,a.jsx)(Ye,{to:iz(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(ew,"AppDetailSidebar");function iz(e,t){return e.kind==="connection"?HE(e.connectionId,t):WE(e.applicationId,t)}r(iz,"tabHref");function rz(e,t,s){const l=c1(s)??d1(t);if(l){const u=e.find(p=>tg(p)===l);if(u)return u}const c=(t?.name??s?.name)?.toLowerCase();return c?e.find(u=>ZE(u).toLowerCase()===c)??e.find(u=>tg(u)===c)??null:null}r(rz,"galleryEntryFor");function lz(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(lz,"latestArchivedConnection");var oz=[{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 FG(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(FG,"parseAgentDetailView");function cz(e,t="overview"){return`/agents/${e}/${t}`}r(cz,"agentDetailHref");function HG(e){return e==="runs"?"runs":e==="audit"||e==="activity"?"activity":e==="cost"||e==="costs"?"costs":e==="budget"||e==="budgets"?"budgets":null}r(HG,"agentLegacyAuditSection");function uz(e,t){return bT(t,{mode:t==="activity"?"agents":void 0,agentId:e})}r(uz,"agentScopedAuditHref");var dz={overview:oI,setup:oN,instructions:iR,skills:bg,runtime:ER,secrets:Cc,tools:Ef,channels:f1,permissions:Cc,"api-keys":_0,revisions:q0},fz=[{section:"activity",label:"Activity",icon:Rf},{section:"runs",label:"Runs",icon:mS},{section:"costs",label:"Costs",icon:AR},{section:"budgets",label:"Budgets",icon:sR}];function pz({agentRef:e,agentId:t,agentName:s,labels:l={secrets:"Secrets & variables"}}){const{selectedCompanyId:c}=vt(),u=!t||!s,{data:p}=me({queryKey:[...P.agents.detail(e),c??null,"contextual-sidebar"],queryFn:r(()=>Fa.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:[oz.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=cz(e,v.value);return(0,a.jsx)(Ye,{to:y,label:l?.[v.value]??v.label,icon:dz[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?fz.map(g=>(0,a.jsx)(Ye,{to:uz(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(pz,"AgentContextualSidebar");var mz=["overview","triggers","variables","delivery","secrets","history","runs","activity"],hz=[{view:"overview",label:"Overview",icon:E0},{view:"triggers",label:"Triggers",icon:zI},{view:"variables",label:"Variables",icon:LI},{view:"delivery",label:"Delivery",icon:S3},{view:"secrets",label:"Secrets",icon:_0}];function gz(e){return mz.includes(e)}r(gz,"isRoutineDetailView");function jc(e,t="overview"){return`/routines/${e}/${t}`}r(jc,"routineDetailHref");function VG(e){const t=e.legacyTab??e.section;return gz(t)?jc(e.routineId,t):jc(e.routineId,"overview")}r(VG,"resolveRoutineDetailDestination");function xz({routineId:e,title:t}={}){const s=zs(),l=e??s.routineId??"",{data:c}=me({queryKey:P.routines.detail(l),queryFn:r(()=>vT.get(l),"queryFn"),enabled:!!(l&&!t)}),u=t??c?.title??"Routine";return(0,a.jsx)(Xc,{surface:"routine",title:u,icon:H1,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:hz.map(p=>(0,a.jsx)(Ye,{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)(Ye,{to:jc(l,"runs"),label:"Runs",icon:I0}),(0,a.jsx)(Ye,{to:jc(l,"activity"),label:"Activity",icon:Rf})]})]})})}r(xz,"RoutineContextualSidebar");var hd={sources:"/skills/sources",installed:"/skills",discover:"/skills?tab=discover",authored:"/skills/studio"};function bz(e){return["discover","all","catalog","bundled"].includes(e??"")?"discover":"installed"}r(bz,"resolveSkillsDiscoveryView");function WG(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(WG,"withSkillsDiscoveryView");function vz(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":bz(u.get("tab"))}r(vz,"resolveSkillsNavigationView");function yz(){const e=hn(),t=vz(e.pathname,e.search);return(0,a.jsx)(Xc,{surface:"skills",title:"Skills",icon:bg,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)(Ye,{to:hd.installed,label:"Installed",icon:bg,active:t==="installed",end:!0}),(0,a.jsx)(Ye,{to:hd.discover,label:"Discover",icon:p1,active:t==="discover",end:!0}),(0,a.jsx)(Ye,{to:hd.sources,label:"Sources",icon:yT,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)(Ye,{to:hd.authored,label:"My Skills",icon:CR,active:t==="authored"})})]})]})})}r(yz,"SkillsContextualSidebar");var ZC="wardmote:panel-visible",JC=(0,x.createContext)(null);function eA(){return typeof window.matchMedia=="function"&&window.matchMedia("(min-width: 768px) and (max-width: 1023px) and (min-height: 431px)").matches}r(eA,"fullPagePanel");function jz(){if(eA())return!1;try{const e=localStorage.getItem(ZC);return e===null?!0:e==="true"}catch{return!0}}r(jz,"readPreference");function tw(e){if(!eA())try{localStorage.setItem(ZC,String(e))}catch{}}r(tw,"writePreference");function wz({children:e}){const[t,s]=(0,x.useState)(null),[l,c]=(0,x.useState)("padded"),[u,p]=(0,x.useState)(jz),[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),tw(N)},[]),S=(0,x.useCallback)(()=>{p(N=>{const I=!N;return tw(I),I})},[]);return(0,a.jsx)(JC.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(wz,"PanelProvider");function lx(){const e=(0,x.useContext)(JC);if(!e)throw new Error("usePanel must be used within PanelProvider");return e}r(lx,"usePanel");function kz({...e}){return(0,a.jsx)("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}r(kz,"Breadcrumb");function Sz({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(Sz,"BreadcrumbList");function Nz({className:e,...t}){return(0,a.jsx)("li",{"data-slot":"breadcrumb-item",className:Y("inline-flex items-center gap-1.5",e),...t})}r(Nz,"BreadcrumbItem");function Cz({asChild:e,className:t,...s}){const l=e?bI:"a";return(0,a.jsx)(l,{"data-slot":"breadcrumb-link",className:Y("hover:text-ink transition-colors",t),...s})}r(Cz,"BreadcrumbLink");function nw({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(nw,"BreadcrumbPage");function Az({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)(cr,{})})}r(Az,"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 _z({context:e,pageToolbar:t}){const{slots:s}=qc({slotTypes:["globalToolbarButton"],companyId:e.companyId}),{launchers:l}=oC({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)(fg,{slotTypes:["globalToolbarButton"],context:e,className:"flex items-center gap-1"}):null,l.length>0?(0,a.jsx)(cC,{placementZones:["globalToolbarButton"],context:e,className:"flex items-center gap-1"}):null]})}r(_z,"GlobalToolbar");function aw({taskDetailLayout:e=!1}){const{breadcrumbs:t,breadcrumbToolbar:s,breadcrumbPanelControl:l,mobileToolbar:c,setMobileTaskActionsSlot:u}=Z1(),{toggleSidebar:p,isMobile:f}=Jn(),{openNewIssue:h}=$s(),{panelVisible:g,togglePanelVisible:v}=lx(),{selectedCompanyId:y,selectedCompany:j}=vt(),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)(_z,{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)(F0,{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)(BS,{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)(kz,{className:"min-w-0 overflow-hidden",children:(0,a.jsx)(Sz,{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)(Az,{}),(0,a.jsxs)(Nz,{className:U?"min-w-0":"shrink-0",children:[U||!_.href?_.leading||_.identifier?(0,a.jsxs)(nw,{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)(nw,{className:"truncate",children:_.label}):(0,a.jsx)(Cz,{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)(GS,{className:"h-4 w-4"}):(0,a.jsx)(XS,{className:"h-4 w-4"})}):null]})}r(aw,"BreadcrumbBar");var Ez=600;function Iz(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(Iz,"parseCssTimeMs");function Tz(){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=Iz(getComputedStyle(document.documentElement).getPropertyValue("--motion-scrollbar-idle-delay"));e.current=window.setTimeout(()=>{delete c.dataset.scrollActive,e.current=null},u??Ez)},[]);return(0,x.useEffect)(()=>()=>{e.current!==null&&window.clearTimeout(e.current),t.current&&delete t.current.dataset.scrollActive},[]),s}r(Tz,"useScrollbarWhileScrolling");function Rz({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=Tz();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(Rz,"SidePanelFrame");function Mz({open:e,onToggle:t,shortcut:s,className:l}){const c="Toggle side panel";return(0,a.jsxs)(Ts,{children:[(0,a.jsx)(Es,{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)(GS,{"aria-hidden":!0}):(0,a.jsx)(XS,{"aria-hidden":!0})})}),(0,a.jsx)(Is,{side:"bottom",children:s?`${c} (${s})`:c})]})}r(Mz,"SidePanelToggleButton");function Dz({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)(VS,{"aria-hidden":!0}):(0,a.jsx)(q1,{"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)(Mz,{open:!0,onToggle:s})]})}r(Dz,"SidePanelWindowControls");function Oz({sections:e,onSelect:t,placeholder:s,emptyMessage:l,panel:c}){return(0,a.jsxs)(J1,{className:Y(c&&"border border-line shadow-sm"),children:[(0,a.jsx)(O0,{placeholder:s,"aria-label":s}),(0,a.jsxs)(z0,{className:Y(c&&"max-h-none flex-1"),children:[(0,a.jsx)(L0,{children:l}),e.map((u,p)=>(0,a.jsxs)("div",{children:[p>0?(0,a.jsx)(sr,{}):null,(0,a.jsxs)(Ys,{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)(Ta,{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)(L1,{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)(Rs,{className:"size-4 text-ink-3","aria-label":"Already open"}):null,f.shortcut?(0,a.jsx)(wT,{children:f.shortcut}):null]},f.id))]})]},u.id))]})]})}r(Oz,"LauncherContent");function QG({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)(Oz,{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)(js,{open:k,onOpenChange:S,children:[(0,a.jsx)(vs,{asChild:!0,children:l}),(0,a.jsxs)(ys,{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(QG,"SidePanelLauncher");function Lz({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)(Ts,{open:R?void 0:!1,children:[(0,a.jsx)(Es,{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)(Is,{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(Lz,"SidePanelTab");function zz({tab:e,active:t,appearance:s,fillAvailableWidth:l,showLeadingSeparator:c,onSelect:u,onClose:p,onAuxClick:f,onKeyDown:h}){const g=ix({id:e.id,disabled:e.disabled});return(0,a.jsxs)("div",{ref:g.setNodeRef,style:{transform:ti.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)(Lz,{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(zz,"SortableSidePanelTab");function GG({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=X0(Mc(Gf,{activationConstraint:{distance:4}}),Mc(J0,{coordinateGetter:j4})),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)(nx,{sensors:C,collisionDetection:gC,onDragEnd:K,children:(0,a.jsx)(sx,{items:M,strategy:u4,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)(zz,{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)(ns,{"aria-hidden":!0})}):null,(0,a.jsx)("div",{className:"sr-only","aria-live":"polite","aria-atomic":"true",children:v})]})}r(GG,"SidePanelTabs");function YG({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)(js,{open:u,onOpenChange:p,children:[(0,a.jsx)(vs,{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)(ys,{"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)(Rs,{"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(YG,"SidePanelMobileTabs");function tA(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(tA,"normalizeSidePanelTabsState");function Pz(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 tA(t.state)}}r(Pz,"sidePanelTabsReducer");function XG({initialState:e,onStateChange:t}){const[s,l]=(0,x.useReducer)(Pz,e,tA);(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(XG,"useSidePanelTabs");function $z({taskDetailLayout:e=!1}){const{panelContent:t,panelContentMode:s,panelVisible:l,setPanelVisible:c,panelMaximizeRequested:u,clearPanelMaximizeRequest:p}=lx(),f=e;return t?(0,a.jsx)(Zz,{panelContent:t,panelContentMode:s,panelVisible:l,setPanelVisible:c,taskDetailLayout:f,maximizeRequested:u,clearMaximizeRequest:p},f?"task-detail":"default"):null}r($z,"PropertiesPanel");var Uz="properties-pane-header-slot",Bz="properties-pane-footer-slot",Kz="taskChatRedesign.propertiesPaneWidth",qz="taskChatRedesign.taskDetailPropertiesPaneWidth",Fz=320,Hz=434,sw=260,Vz=656,Wz=840,Qz=400;function iw(e){const t=typeof window>"u"?Number.POSITIVE_INFINITY:Math.max(sw,window.innerWidth-Vz);return Math.min(Math.max(Math.round(e),sw),t)}r(iw,"clampPaneWidth");function Gz(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(Gz,"readStoredPaneWidth");function Yz(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,String(t))}catch{}}r(Yz,"persistPaneWidth");function Xz(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}r(Xz,"clearStoredPaneWidth");function rw(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}r(rw,"prefersReducedMotion");function Zz({panelContent:e,panelContentMode:t,panelVisible:s,setPanelVisible:l,taskDetailLayout:c,maximizeRequested:u,clearMaximizeRequest:p}){const f=c?Hz:Fz,h=c?qz:Kz,[g,v]=(0,x.useState)(()=>iw(Gz(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&&Yz(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(iw(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),Xz(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 rw()?{...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),rw()){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,Qz)},[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=O3(L3),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)(Rz,{presentation:"docked",maximized:k,contentMode:"full-bleed",headerSize:c?"task-detail":"default",className:"flex-1 border-l-0",header:(0,a.jsx)("div",{id:Uz,className:"flex min-w-0 flex-1 items-center self-stretch"}),trailingControls:(0,a.jsx)(Dz,{maximized:k,closeControl:c?"close":"toggle",onMaximizedChange:r(le=>{le?ue():ce()},"onMaximizedChange"),onToggle:r(()=>l(!1),"onToggle")}),footer:(0,a.jsx)("div",{id:Bz}),children:t==="full-bleed"?e:(0,a.jsx)(kI,{className:"h-full",children:(0,a.jsx)("div",{className:Y("p-4",k&&"mx-auto w-full px-9"),style:k?{maxWidth:Wz}:void 0,children:e})})})})]})]})}r(Zz,"ResizablePropertiesPanel");function Jz(e){return e?.enableCombinedInboxTasks===!0}r(Jz,"resolveCombinedInboxTasksEnabled");var lw=null;function eP(){return lw??=new Af,lw}r(eP,"getDetachedClient$1");function Zf(){const e=(0,x.useContext)(v0),t=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),enabled:e!=null},e??eP());return e?{enabled:Jz(t.data),loaded:t.isFetched}:{enabled:!1,loaded:!0}}r(Zf,"useCombinedInboxTasksEnabled");var tP=["status","priority","assigneeAgentId","assigneeUserId","projectId","labelId","updatedWithin","updatedAfter"],nP=["backlog","todo","in_progress","in_review","blocked"],aP=["done","cancelled"],ox=["title","id","desc","comment","doc","text"],sP=[{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"}],iP=["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 cx(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(cx,"tokenizeQuery");function yh(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(yh,"currentSearchToken");function rP(e){const t=e.replace(/"/g,"").trim();return/[\s:]/.test(t)?`"${t}"`:t}r(rP,"quoteSearchValue");function Hr(e,t){return`${e}:${rP(t)}`}r(Hr,"formatSearchToken");var nA=["status","priority","assignee","label","project","author","updated","is"];function lP(e,t){const s=/^([a-zA-Z]+):(.+)$/s.exec(e);if(!s)return!1;const l=s[1].toLowerCase();if(!ox.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(lP,"isCompleteScopedToken");function uc(e,t=nA,s=!1){const l=cx(e),c=[],u=[];return l.forEach((p,f)=>{const h=f===l.length-1;!(s&&h)&&lP(p.raw,t)?c.push(p.raw):u.push(p.raw)}),{tokens:c,text:u.join(" ")}}r(uc,"splitSearchInput");function oP(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(oP,"searchTokenPill");function jh(e){return xE(e)??e.trim().toLowerCase()}r(jh,"normalizedLookup");function gd(e,t){const s=jh(t);return e?.find(l=>l.id===t||jh(l.name)===s?!0:l.urlKey?jh(l.urlKey)===s:!1)??null}r(gd,"findByNameOrId");function ow(e,t){return e?.includes(t)?e:[...e??[],t]}r(ow,"addUnique");function Ea(e,t){t.trim().length>0&&e.push(t)}r(Ea,"appendText");function cP(e){return Bc.includes(e)?e:null}r(cP,"parseStatus");function uP(e){return h0.includes(e)?e:null}r(uP,"parsePriority");function dP(e){const t=e.startsWith(">")?e.slice(1):e;return/^[1-9]\d{0,2}(h|d|w|m)$/.test(t)?t:null}r(dP,"parseUpdatedWithin");function fa(e,t){return`${e}:${t}`}r(fa,"operatorLabel");function uo(e,t={}){const s=[],l={},c=[];for(const u of cx(e)){const p=/^([a-zA-Z]+):(.*)$/s.exec(u.value);if(!p){Ea(s,u.raw);continue}const f=p[1].toLowerCase(),h=p[2],g=Oc(h).trim();if(!g){Ea(s,u.raw);continue}if(ox.includes(f)){Ea(s,u.raw),c.push({key:f,value:g,label:fa(f,g)});continue}if(t.operatorKeys&&!t.operatorKeys.includes(f)){Ea(s,u.raw);continue}if(f==="status"){const v=cP(g);if(!v){Ea(s,u.raw);continue}l.status=ow(l.status,v),c.push({key:"status",value:v,label:fa("status",v)});continue}if(f==="priority"){const v=uP(g);if(!v){Ea(s,u.raw);continue}l.priority=ow(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}Ea(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){Ea(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}Ea(s,u.raw);continue}const v=gd(t.agents,g);if(!v){Ea(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){Ea(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(Zh(g)){l.labelId=g,c.push({key:"label",value:g,label:fa("label",g.slice(0,8))});continue}Ea(s,u.raw);continue}if(f==="updated"){const v=dP(g);if(!v){Ea(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=nP,c.push({key:"is",value:"open",label:"is:open"});continue}if(g==="closed"){l.status=aP,c.push({key:"is",value:"closed",label:"is:closed"});continue}Ea(s,u.raw);continue}Ea(s,u.raw)}return{query:s.join(" ").replace(/\s+/g," ").trim(),filters:l,pills:c}}r(uo,"parseSearchQuery");function cw(e,t,s){for(const l of s??[])e.append(t,l)}r(cw,"appendMulti");function fP(e){for(const t of tP)e.delete(t)}r(fP,"clearSearchFilterParams");function pP(e,t){fP(e),cw(e,"status",t.status),cw(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(pP,"applySearchFiltersToParams");function uw(e,t){return e.filter(s=>t.includes(s))}r(uw,"validValues");function ZG(e){const t={},s=uw(e.getAll("status").flatMap(v=>v.split(",")),Bc),l=uw(e.getAll("priority").flatMap(v=>v.split(",")),h0),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&&Zh(p)&&(t.projectId=p),f&&Zh(f)&&(t.labelId=f),h&&(/^[1-9]\d{0,2}(h|d|w|m)$/.test(h)||Jk.includes(h))&&(t.updatedWithin=h),g&&!Number.isNaN(new Date(g).getTime())&&(t.updatedAfter=g),t}r(ZG,"readSearchFiltersFromParams");function aA(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(aA,"hasSearchFilters");var mP={h:1,d:24,w:168,m:720};function sA(e,t=new Date){const s=/^(\d+)(h|d|w|m)$/.exec(e);if(!s)return null;const l=Number.parseInt(s[1],10)*mP[s[2]];return new Date(t.getTime()-l*60*60*1e3).toISOString()}r(sA,"updatedWithinToSince");function iA(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?sA(e.updatedWithin,t):null);return l&&(s.updatedSince=l),s}r(iA,"searchFiltersToIssueListParams");function hP(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(hP,"issueFilterStateToListParams");function Ig(e){const t=[];for(const s of cx(e)){const l=/^([a-zA-Z]+):(.+)$/s.exec(s.value),c=l?.[1]?.toLowerCase();if(l&&c&&ox.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(Ig,"localSearchTerms");function JG(e){return Ig(e).map(t=>t.value).join(" ")}r(JG,"localSearchText");function dw(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(dw,"issueMatchesLocalSearchTerms");function fw(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?sA(t.updatedWithin,s):null);return!(l&&new Date(e.updatedAt).getTime()<new Date(l).getTime())}r(fw,"issueMatchesSearchFilters");function wh(e,t){return e?.find(s=>s.id===t)?.name??t.slice(0,8)}r(wh,"nameForId");function eY(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":wh(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=wh(t.projects,e.projectId);s.push({key:"project",value:l,label:fa("project",l)})}if(e.labelId){const l=wh(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(eY,"searchFilterPills");function gP(e,t={}){const s=uo(e,t),l=new URLSearchParams;s.query.length>0&&l.set("q",s.query),pP(l,s.filters);const c=l.toString();return c?`/search?${c}`:"/search"}r(gP,"buildSearchPathFromQuery");var xP="__wardmote-search-all__";function bP(e,t={}){return gP(e,t)}r(bP,"buildFullSearchPath");var vP=/\/issues\/[^/?#]+(?:$|\?|#|\/)/;function yP(e){return vP.test(e)}r(yP,"isOnIssueDetail");var jP=5,wP=6,kP=10,pw=20,SP=250;function NP(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(NP,"isSubsequence");function CP(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:NP(s,e)?200:null}r(CP,"scoreProjectMatch");function AP(){const[e,t]=(0,x.useState)(!1),[s,l]=(0,x.useState)(""),[c,u]=(0,x.useState)(""),p=ja(),f=hn(),{selectedCompanyId:h}=vt(),{openNewIssue:g,openNewAgent:v}=$s(),{isMobile:y,setSidebarOpen:j}=Jn(),k=s.trim(),S=yP(f.pathname),{enabled:N}=Zf(),{hidden:I}=hr(),C=!I.has("instance.experimental"),{data:M}=me({queryKey:P.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),SP);return()=>window.clearTimeout(he)},[s]);const{data:R=[]}=me({queryKey:P.agents.list(h),queryFn:r(()=>Fa.list(h),"queryFn"),enabled:!!h&&e}),{data:_=[]}=me({queryKey:P.projects.list(h),queryFn:r(()=>mr.list(h),"queryFn"),enabled:!!h&&e}),D=(0,x.useMemo)(()=>_,[_]),{data:U=[]}=me({queryKey:P.issues.labels(h),queryFn:r(()=>on.listLabels(h),"queryFn"),enabled:!!h&&e}),{data:K}=me({queryKey:P.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)(()=>iA(O.filters),[O.filters]),ue=Q.length>0||aA(O.filters),{data:ce=[]}=me({queryKey:[...P.issues.list(h),"command-palette-recent",pw],queryFn:r(()=>on.listCompact(h,{limit:pw,sortField:"updated",sortDir:"desc"}),"queryFn"),enabled:!!h&&e&&k.length===0}),{data:X=[]}=me({queryKey:[...P.issues.search(h,Q,void 0,10),V],queryFn:r(()=>on.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(bP(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:CP(ve.name.toLowerCase(),(ve.description??"").toLowerCase(),he)})).filter(ve=>ve.score!==null).sort((ve,et)=>et.score-ve.score).slice(0,jP).map(ve=>ve.project)},[D,B]),de=k.length>0,we=de&&Ae.length>0,ye=we?wP:kP,Me=de&&le.length===0&&Ae.length===0;return(0,a.jsxs)(kT,{open:e,onOpenChange:r(he=>{t(he),he&&y&&j(!1)},"onOpenChange"),children:[(0,a.jsx)(O0,{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)(z0,{children:[(0,a.jsx)(L0,{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)(Ys,{heading:"Search",children:(0,a.jsxs)(wn,{value:`${xP} ${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)(fr,{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)(sr,{}):null,(0,a.jsx)(Ys,{heading:"Quick filters",children:iP.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)(fr,{className:"mr-2 h-4 w-4"}),(0,a.jsx)("span",{className:"font-mono text-xs",children:he})]},he))}),(0,a.jsx)(sr,{}),we&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ys,{heading:"Projects",children:Ae.map(he=>(0,a.jsxs)(wn,{value:`${k} ${he.name}`,onSelect:r(()=>A(Py(he)),"onSelect"),"data-testid":"command-project-match",children:[(0,a.jsx)(Jm,{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)(sr,{})]}),(0,a.jsxs)(Ys,{heading:"Actions",children:[(0,a.jsxs)(wn,{onSelect:r(()=>{t(!1),g()},"onSelect"),children:[(0,a.jsx)(F0,{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)(U1,{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)(ns,{className:"mr-2 h-4 w-4"}),"Create new agent"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A("/projects"),"onSelect"),children:[(0,a.jsx)(ns,{className:"mr-2 h-4 w-4"}),"Create new project"]})]}),(0,a.jsx)(sr,{}),(0,a.jsxs)(Ys,{heading:"Pages",children:[(0,a.jsxs)(wn,{onSelect:r(()=>A("/dashboard"),"onSelect"),children:[(0,a.jsx)(E0,{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)(A0,{className:"mr-2 h-4 w-4"}),N?"My work":"Inbox"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A("/issues"),"onSelect"),children:[(0,a.jsx)(Yd,{className:"mr-2 h-4 w-4"}),"Tasks"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A("/projects"),"onSelect"),children:[(0,a.jsx)(Jm,{className:"mr-2 h-4 w-4"}),"Projects"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A("/goals"),"onSelect"),children:[(0,a.jsx)(S0,{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)(yS,{className:"mr-2 h-4 w-4"}),"Costs"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A("/activity"),"onSelect"),children:[(0,a.jsx)(q0,{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)(pR,{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)(kR,{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)(gN,{className:"mr-2 h-4 w-4"}),"Features"]}),(0,a.jsxs)(wn,{onSelect:r(()=>A("/company/settings/instance/advanced"),"onSelect"),children:[(0,a.jsx)(Ef,{className:"mr-2 h-4 w-4"}),"Advanced settings"]})]}):null]}),le.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(sr,{}),(0,a.jsx)(Ys,{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)(Yd,{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)(sr,{}),(0,a.jsx)(Ys,{heading:"Agents",children:R.slice(0,10).map(he=>(0,a.jsxs)(wn,{onSelect:r(()=>A(Dd(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)(sr,{}),(0,a.jsx)(Ys,{heading:"Projects",children:D.slice(0,10).map(he=>(0,a.jsxs)(wn,{onSelect:r(()=>A(Py(he)),"onSelect"),children:[(0,a.jsx)(Jm,{className:"mr-2 h-4 w-4"}),he.name]},he.id))})]})]})]})}r(AP,"CommandPalette");function _P(){const{hidden:e,loaded:t}=hr();return{visible:t&&!e.has("workspaces.isolation"),loaded:t}}r(_P,"useWorkspaceIsolationControls");function EP(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(EP,"normalizeWorkspaceOverview");var Jf={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 EP(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}`,Wy(s)),"controlRuntimeServices"),controlRuntimeCommands:r((e,t,s={})=>je.post(`/execution-workspaces/${e}/runtime-commands/${t}`,Wy(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")},IP="text-violet-700 dark:text-violet-300",TP="border-violet-500/30",RP="bg-violet-500/10";function MP({className:e,label:t="User secret"}){return(0,a.jsxs)(Dn,{variant:"outline",className:Y("text-(length:--text-micro)",TP,RP,IP,e),children:[(0,a.jsx)(I3,{className:"h-3 w-3"}),t]})}r(MP,"UserSecretChip");function tY(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(tY,"myValueTone");function nY(e){switch(e){case"set":return"Value set";case"not_set":return"Not set";case"inactive":return"Disabled"}}r(nY,"myValueLabel");function aY(e){if(!e)return"—";const t=e.configuredCount+e.missingCount+e.inactiveCount;return`${e.configuredCount} of ${t} set`}r(aY,"coverageSummaryLabel");function DP({companyId:e,definition:t,existingSecret:s,open:l,onOpenChange:c,onSaved:u}){const p=kn(),{pushToast:f}=Ti(),[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?pg.rotateMyUserSecret(e,s.id,C):pg.createMyUserSecret(e,{definitionId:t.id,definitionKey:t.key,...C})},"mutationFn"),onSuccess:r(C=>{p.invalidateQueries({queryKey:P.secrets.myUserSecrets(e)}),p.invalidateQueries({queryKey:P.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 Ii||C instanceof Error?C.message:"Failed to save value")},"onError")}),I=S?v.trim().length>0:h.trim().length>0;return(0,a.jsx)(ws,{open:l,onOpenChange:c,children:(0,a.jsxs)(Ps,{children:[(0,a.jsxs)(bo,{children:[(0,a.jsxs)(Ds,{className:"flex items-center gap-2",children:[s?"Update your value":"Set your value",(0,a.jsx)(MP,{})]}),(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)(eS,{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)(Pf,{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(DP,"SetMyUserSecretDialog");function OP({companyId:e,definitionKeys:t,title:s="Set your user secrets",secretsPath:l,className:c}){const[u,p]=(0,x.useState)(null),f=me({queryKey:P.secrets.myUserSecrets(e),queryFn:r(()=>pg.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)(ni,{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)(DE,{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)(DP,{companyId:e,definition:u?.definition??null,existingSecret:u?.secret??null,open:u!==null,onOpenChange:r(v=>{v||p(null)},"onOpenChange")})]})}r(OP,"MissingUserSecretsBanner");function LP(e){return e==="local-board"?"Board":e.slice(0,5)}r(LP,"fallbackUserLabel");function fo(e){const t=e.user?.name?.trim();if(t)return t;const s=e.user?.email?.trim();return s||LP(e.principalId)}r(fo,"baseMemberLabel");function rA(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(rA,"activeUniqueMembers");function zP(e){const t=new Map;for(const s of e??[])t.set(s.principalId,fo(s));return t}r(zP,"buildCompanyUserLabelMap");function PP(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(PP,"buildCompanyUserProfileMap");function lA(e,t){const s=new Set([...t?.excludeUserIds??[]].filter(l=>!!l));return rA(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(lA,"buildCompanyUserInlineOptions");function $P(e){return rA(e).map(t=>({id:`user:${t.principalId}`,name:fo(t),kind:"user",userId:t.principalId}))}r($P,"buildCompanyUserMentionOptions");function Tg(e){return e.status!=="terminated"&&e.status!=="pending_approval"&&e.orgChainHealth?.status!=="invalid_org_chain"}r(Tg,"isAgentTaskTarget");function UP(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(UP,"buildIssueMentionOptions");function BP(e){return[...$P(e.members),...[...e.agents??[]].filter(Tg).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})),...UP(e.issues)]}r(BP,"buildMarkdownMentionOptions");function Ur(e){return e?e.executionWorkspacePolicy?.defaultProjectWorkspaceId??e.workspaces?.find(t=>t.isPrimary)?.id??e.workspaces?.[0]?.id??"":""}r(Ur,"defaultProjectWorkspaceIdForProject");function Pd(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(Pd,"defaultExecutionWorkspaceModeForProject");function KP(e){return e==="isolated_workspace"||e==="operator_branch"||e==="shared_workspace"?e:e==="adapter_managed"||e==="cloud_sandbox"?"agent_default":"shared_workspace"}r(KP,"issueExecutionWorkspaceModeForExistingWorkspace");function oA(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(oA,"sortProjectsByStoredOrder");function mw(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(mw,"areEqual");function hw(e,t){return oA(e,t).map(s=>s.id)}r(hw,"buildOrderIds");function cA({projects:e,companyId:t,userId:s}){const l=kn(),c=(0,x.useMemo)(()=>P.sidebarPreferences.projectOrder(t??"__none__",s??"__anon__"),[t,s]),{data:u}=me({queryKey:c,queryFn:r(()=>Zd.getProjectOrder(t),"queryFn"),enabled:!!(t&&s)}),[p,f]=(0,x.useState)(()=>hw(e,[]));(0,x.useEffect)(()=>{const g=hw(e,u?.orderedIds??[]);f(v=>mw(v,g)?v:g)},[u?.orderedIds,e]);const h=Bt({mutationFn:r(g=>Zd.updateProjectOrder(t,{orderedIds:g}),"mutationFn"),onSuccess:r(g=>{l.setQueryData(c,g)},"onSuccess")});return{orderedProjects:(0,x.useMemo)(()=>oA(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=>mw(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(cA,"useProjectOrder");var ff="wardmote:recent-projects";function Rg(){return ST(ff)}r(Rg,"getRecentProjectIds");function qP(e){try{return localStorage.getItem(`${ff}:${e}`)??void 0}catch{return}}r(qP,"getLastProjectId");function pf(e,t){if(NT(ff,e),t)try{localStorage.setItem(`${ff}:${t}`,e)}catch{}}r(pf,"trackRecentProject");function mf(){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(mf,"createUuid");var FP=IE.nullable();function uA(e){return FP.safeParse(e??null)}r(uA,"readExecutionPolicy");function gw(e){return e.type==="agent"?`agent:${e.agentId}`:`user:${e.userId}`}r(gw,"principalKey");function HP(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(HP,"principalFromSelectionValue");function VP(e){return e.type==="agent"?`agent:${e.agentId}`:`user:${e.userId}`}r(VP,"selectionValueFromPrincipal");function sY(e,t){const s=uA(e);return s.success?s.data?.stages.find(l=>l.type===t)?.participants.map(l=>VP(l))??[]:[]}r(sY,"stageParticipantValues");function xw(e,t){const s=new Map((e??[]).map(c=>[gw(c),c])),l=[];for(const c of t){const u=HP(c);if(!u)continue;const p=gw(u),f=s.get(p);l.push({id:f?.id??mf(),type:u.type,agentId:u.type==="agent"?u.agentId??null:null,userId:u.type==="user"?u.userId??null:null})}return l}r(xw,"mergeParticipants");function WP(e){const t=uA(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=xw(p?.participants,e.reviewerValues);f.length>0&&c.push({id:p?.id??mf(),type:"review",approvalsNeeded:1,participants:f});const h=s?.stages.find(v=>v.type==="approval"),g=xw(h?.participants,e.approverValues);return g.length>0&&c.push({id:h?.id??mf(),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(WP,"buildExecutionPolicy");function QP({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(QP,"TaskChatComposerBar");function GP(e){const t=_I(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(GP,"parseRunnerGoalCommand");function YP(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(YP,"identityInitials");function XP({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)(pr,{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)(Gd,{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)(Wd,{src:p.image,alt:""}):null,(0,a.jsx)(Qd,{children:YP(f)})]})}return null}r(XP,"AssigneeIdentityAvatar");function ZP(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(ZP,"modePlaceholder");function JP(e,t){return(e==="done"||e==="cancelled"||e==="blocked")&&t.startsWith("agent:")}r(JP,"shouldImplicitlyReopenComment");function kh(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(kh,"parseAssigneeValue");function bw(e){return e.replace(/[[\]]/g,"\\$&")}r(bw,"escapeMarkdownLabel");function e$({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=y0(),Ae=_T(),de=KI(l,c),[we,ye]=(0,x.useState)(()=>E?Jy(E):""),Me=t?t.value:we,[he,ve]=(0,x.useState)(!1),[et,Pe]=(0,x.useState)(!1),[Ee,ct]=(0,x.useState)(()=>E?$r(E):null),Ve=(0,x.useRef)(E);(0,x.useEffect)(()=>(Ve.current=E,ct(E?$r(E):null),()=>{Ve.current=void 0}),[E]);const[yt,Zt]=(0,x.useState)(null),[ge,Oe]=(0,x.useState)(!1),[De,ut]=(0,x.useState)(null),[Ht,Vt]=(0,x.useState)(!1),[gt,cn]=(0,x.useState)(null),[$,qe]=(0,x.useState)(null),[Xe,xt]=(0,x.useState)(u),at=t?u:Xe,[Kt,ea]=(0,x.useState)(null),[Jt,Mt]=(0,x.useState)(null),Gt=z1(),dt=t?.runSettings??Gt,On=Gt.clear;(0,x.useEffect)(()=>{On()},[On,E,K]);const[mt,Nn]=(0,x.useState)(()=>E?Xy(E).map(se=>({...se,id:`receipt:${se.attachmentId}`,status:"attached"})):[]),It=(0,x.useRef)(mt);function en(se){const Te=typeof se=="function"?se(It.current):se;It.current=Te,Nn(Te);const Je=lt.current;Je&&Je.draftKey===E&&Zy(Je.draftKey,Te.filter(Qe=>Qe.status==="attached"&&Qe.attachmentId).map(Qe=>({...Qe,inline:Qe.inline===!0})),Je.attemptId)}r(en,"setAttachments");const qt=(0,x.useRef)(he);qt.current=he;const Tt=(0,x.useRef)(Kt);Tt.current=Kt;const At=(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),Zt(null);const Te=lt.current;!Te||Te.draftKey!==E||$r(Te.draftKey)?.attemptId!==Te.attemptId||(Ci(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 Le=(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,Je=Te?.commentId??null;if(Te&&se!==Je)Rt.current||(Rt.current={body:Re.current,attachments:It.current,pendingMode:at,pendingAssignee:Tt.current},E&&Ci(E,Re.current)),Le.current&&(clearTimeout(Le.current),Le.current=null),Re.current=Te.body,ye(Te.body),en([]),requestAnimationFrame(()=>_e.current?.focus());else if(!Je&&se){const Qe=Rt.current;Qe&&(Re.current=Qe.body,ye(Qe.body),en(Qe.attachments),xt(Qe.pendingMode),ea(Qe.pendingAssignee),E&&Ci(E,Qe.body)),Rt.current=null,requestAnimationFrame(()=>_e.current?.focus())}Lt.current=Je},[E,at,O]),(0,x.useEffect)(()=>{!E||O||(Re.current=Jy(E),ye(Re.current))},[E,O]),(0,x.useEffect)(()=>{E&&en(Xy(E).map(se=>({...se,id:`receipt:${se.attachmentId}`,status:"attached"})))},[E]),(0,x.useEffect)(()=>{!E||O||he||Ee||mt!==It.current||Zy(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){Le.current&&(clearTimeout(Le.current),Le.current=null);return}Le.current&&clearTimeout(Le.current),Le.current=setTimeout(()=>{Ci(E,Me)},800)},[Me,E,O,he]),(0,x.useEffect)(()=>()=>{Le.current&&clearTimeout(Le.current),E&&!Ot.current&&!qt.current&&Ci(E,Re.current)},[E]),(0,x.useEffect)(()=>{if(!E)return;const se=r(()=>{!Ot.current&&!qt.current&&Ci(E,Re.current)},"flushDraft");return window.addEventListener("beforeunload",se),()=>window.removeEventListener("beforeunload",se)},[E]);const tn=!!ue&&!!S,Wt=!tn&&!O&&!Ee&&!!(t||v||y),Ln=!!(k&&I&&I.length>0),gn=t?_:Kt??_,zn=I?.find(se=>se.id===gn)?.label??"Unassigned",ss=O?"Edit queued message…":g??ZP(at,zn==="Unassigned"?"the agent":zn,z),Da=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:Da&&A!==null,disabledReason:A?.reason??"Session goals are unsupported by this agent."};function ka(se){if(!t&&se&&M){const Te=kh(se);Te?.assigneeAgentId&&ef(Te.assigneeAgentId,M),Te?.assigneeUserId&&Jd(Te.assigneeUserId,M)}ea(se),D?.(se)}r(ka,"updatePendingAssignee");function Qn(se){xt(se),t&&p?.(se)}r(Qn,"changeMode");async function jt(se){const Te=crypto.randomUUID();en(Je=>[...Je,{id:Te,name:se.name,size:se.size,inline:!0,status:"uploading"}]);try{const Je=v?await v(se):void 0,Qe=v?Je?.contentPath:await y?.(se);if(!Qe)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 en(zt=>zt.map(Qt=>Qt.id===Te?{...Qt,attachmentId:Je?.id,contentPath:Qe,status:"attached"}:Qt)),Qe}catch(Je){throw en(Qe=>Qe.map(zt=>zt.id===Te?{...zt,status:"error",error:Je instanceof Error?Je.message:"Upload failed"}:zt)),Je}}r(jt,"uploadInlineImage");async function un(se){const Te=`${se.name}:${se.size}:${se.lastModified}:${Math.random().toString(36).slice(2)}`;en(Je=>[...Je,{id:Te,name:se.name,size:se.size,status:"uploading"}]);try{if(!v){en(zt=>zt.map(Qt=>Qt.id===Te?{...Qt,status:"error",error:"This file type cannot be attached here"}:Qt));return}const Je=await v(se);if(!Je?.contentPath)throw new Error("Upload did not return a file URL");const Qe=Je?.originalFilename??se.name;en(zt=>zt.map(Qt=>Qt.id===Te?{...Qt,name:Qe,attachmentId:Je?.id,status:"attached",contentPath:Je?.contentPath}:Qt))}catch(Je){en(Qe=>Qe.map(zt=>zt.id===Te?{...zt,status:"error",error:Je instanceof Error?Je.message:"Upload failed"}:zt))}}r(un,"attachNonImageFile");async function Oa(se){if(!se.type.startsWith("image/")){await un(se);return}try{const Te=await jt(se);_e.current?.insertMarkdown(`![${bw(se.name)}](${Te})`)}catch{}}r(Oa,"attachPickedFile");function ai(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 Je of Array.from(Te))await Oa(Je)})()}se.target.value=""}r(ai,"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 Us(se){if(tn||!Wt)return;const Te=Array.from(se.clipboardData?.files??[]);if(Te.length===0)return;if(t){if(y){const Qe=Te.filter(zt=>!zt.type.startsWith("image/"));if(Qe.length===0||(t.onSelectFiles(Qe),Qe.length!==Te.length))return}else t.onSelectFiles(Te);se.preventDefault(),se.stopPropagation();return}const Je=Te.filter(Qe=>!Qe.type.startsWith("image/"));Je.length!==0&&(Je.length===Te.length&&(se.preventDefault(),se.stopPropagation()),(async()=>{for(const Qe of Je)await un(Qe)})())}r(Us,"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&&!tn&&!O),[La,xn]=(0,x.useState)(!1),[is,Sa]=(0,x.useState)(null),[In,ga]=(0,x.useState)(null),Bs=MT(z&&Gn),[Ks,rs]=RT("dock",ce?.id??null),Ha=!!(Gn&&ce&&(Ks||z&&In!==ce.id&&is!==ce.id&&(La||Bs))),Na=(0,x.useRef)(Gn);(0,x.useEffect)(()=>{Na.current&&!Gn&&!O&&requestAnimationFrame(()=>_e.current?.focus()),Na.current=Gn},[O,Gn]);const za=S&&!O&&Me.trim()==="/new"&&mt.length===0;async function ht(){if(f||tn&&!za)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(wt){Mt(wt instanceof Error?wt.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,Je=It.current,Qe=Tt.current,zt=Te.trim(),Qt=O?{matched:!1}:GP(Te),Z=O?{matched:!1}:II(Te);if(Z.matched&&"error"in Z){Mt(Z.error);return}const Ne=Z.matched&&"command"in Z?Z.command:null,Be=Ne?.mode,$e=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 wt=kh(gn);if(!wt||!ie){Mt("Select an agent before starting a session goal.");return}await ie(dt.hasValues&&wt.assigneeAgentId?{...wt,modelOverride:dt.values}:wt),dt.clear(),ka(null)}await ee(Qt.command),Mt(null),Re.current="",Le.current&&clearTimeout(Le.current),Le.current=null,E&&sh(E),ye(""),_e.current?.clear()}catch(wt){Mt(wt instanceof Error?wt.message:"The goal action could not be applied.")}return}if(!zt&&Pn.length===0||ha||$n||he||Ee||f)return;const st=Pn.map(wt=>`[${bw(wt.name)}](${wt.contentPath})`).join(`
11
+ `),it=O?Te:[$e.trim(),st].filter(Boolean).join(`
12
+
13
+ `),Pt=Ln&&gn!==_,bn=dt.hasValues?dt.values:void 0,Bn=Pt?kh(gn):void 0,Wa=Bn?.assigneeAgentId&&bn?{...Bn,modelOverride:bn}:Bn,Pa=JP(U,gn)?!0:void 0;Re.current="",Le.current&&(clearTimeout(Le.current),Le.current=null),E&&!O&&(Je.some(wt=>wt.status==="attached"&&wt.attachmentId)?Ci(E,Te):sh(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 wt=E?$r(E):null;if(wt){ct(wt),ye(Te);return}Cn=crypto.randomUUID(),E&&(Ci(E,Te),cd(E,{attemptId:Cn,reviewed:!1}));const la=[...new Set(Je.filter(dn=>dn.status==="attached"&&dn.attachmentId&&(!dn.inline||dn.contentPath&&$e.includes(dn.contentPath))).map(dn=>dn.attachmentId))];E&&(lt.current={draftKey:E,attemptId:Cn,submittedBody:Te,submittedAttachmentIds:la},Dt(Re.current));const nn=await e(it,Pa,Wa,la.length?la:void 0,Cn,Be);if(Wa?.modelOverride&&dt.clear(),E&&ej(E,Cn,Ve.current===E?Re.current:void 0),Ve.current!==E)return;Zt(AI(nn));const ta=new Set(Je.map(dn=>dn.id));en(dn=>dn.filter(qs=>!ta.has(qs.id))),Tt.current===Qe&&ka(null)}catch(wt){if(Wa?.modelOverride&&dt.clear(),Ve.current!==E)return;const la=Re.current;if(Cn&&wt instanceof aI){const ta={attemptId:Cn,reviewed:!1,nextDraftOffset:Te.length+(la?2:0),submittedAttachmentIds:Je.flatMap(dn=>dn.attachmentId?[dn.attachmentId]:[])};ct(ta),E&&$r(E)?.attemptId===Cn&&cd(E,ta)}else E&&Cn&&IT(E,Cn);const nn=la?`${Te}
14
+
15
+ ${la}`:Te;Re.current=nn,Le.current&&(clearTimeout(Le.current),Le.current=null),E&&Ci(E,nn,Cn??void 0),ye(nn)}finally{lt.current?.attemptId===Cn&&(lt.current=null),ve(!1)}}r(ht,"submit"),(0,x.useEffect)(()=>{if(!Ee||!s?.has(Ee.attemptId))return;const se=Ee.nextDraftOffset===void 0?"":Re.current.slice(Ee.nextDraftOffset);E&&ej(E,Ee.attemptId,se),ct(null),Re.current=se,ye(se);const Te=Ee.submittedAttachmentIds;en(Je=>Te?Je.filter(Qe=>!Qe.attachmentId||!Te.includes(Qe.attachmentId)):[])},[s,E,Ee]);async function Un(){if(Ee){Pe(!1);try{if(!B)throw new Error("Review unavailable");if(await B(),Ve.current!==E)return;const se={...Ee,reviewed:!0};ct(se),E&&$r(E)?.attemptId===se.attemptId&&cd(E,se)}catch{Pe(!0)}}}r(Un,"reviewUncertainSubmission");function si(){Ee?.reviewed&&(E&&sh(E,Ee.attemptId),Re.current="",ye(""),en([]),ct(null))}r(si,"discardUncertainDraft");function ii(){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(ii,"skipTakeover");const Va=ce?(0,a.jsxs)(oe,{type:"button",size:"sm",variant:"secondary",disabled:ge,onClick:ii,children:[ge?(0,a.jsx)(Ta,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):null,"Skip"]}):null;return ue&&S&&O?(0,a.jsx)(eh,{...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:[Ha&&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(()=>{rs(!1),ga(ce.id)},"onClick"),"data-testid":"task-chat-composer-takeover-summary",children:[(0,a.jsx)(ag,{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)(PI,{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",Ha&&"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:cn,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),rs(!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)(TT.Provider,{value:{skipButton:ce.inlineSkip&&!ce.hideSkip&&Va?Va:null,dismiss:ce.onDismiss,headerSlot:gt,controlsSlot:$,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:Va}):null]}):null,t?.contextBar?(0,a.jsx)(QP,{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(ig(at)))},"onKeyDownCapture"),onPasteCapture:Us,children:[t?.header,Ee?(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,Ee.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:si,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)(ag,{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)(eh,{...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)(eh,{...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)(E1,{ref:_e,value:Me,onChange:Dt,placeholder:f?h??"Composer disabled":ss,readOnly:f||!!Ee||!!(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)?jt:void 0,onDropFile:Wt&&!t?un: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"})}),Jt?(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:Jt}):null,yt?(0,a.jsx)("p",{className:"px-1 text-xs text-ink-3",role:"status","data-testid":"task-chat-delivery-notice",children:yt}):null,ra.length>0?(0,a.jsx)(p3,{className:"mb-1 px-1","data-testid":"task-chat-composer-attachments",children:ra.map(se=>{const Te=d3(se.name),Je=Te.icon,Qe=r3(se.size);return(0,a.jsxs)(f3,{size:"sm",state:se.status==="uploading"?"uploading":se.status==="error"?"error":"done",children:[(0,a.jsx)(u3,{children:se.status==="uploading"?(0,a.jsx)(Ta,{className:"animate-spin","aria-hidden":!0}):(0,a.jsx)(Je,{"aria-hidden":!0})}),(0,a.jsxs)(o3,{children:[(0,a.jsx)(c3,{className:"max-w-48",children:se.name}),(0,a.jsx)(m3,{className:"max-w-48",children:se.status==="uploading"?"Uploading…":se.status==="error"?se.error??"Upload failed":[Te.label,Qe].filter(Boolean).join(" · ")})]}),(0,a.jsx)(l3,{children:(0,a.jsx)(h3,{"aria-label":`Remove ${se.name}`,disabled:!!Ee,onClick:r(()=>en(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:At,type:"file",className:"hidden",multiple:!!t,onChange:ai}):null,(0,a.jsx)(WI,{privacy:t?.privacy,mode:at,onModeChange:!O&&p?Qn:void 0,onAttachFile:Wt?()=>At.current?.click():void 0,onGoal:!O&&!S&&mt.length===0&&A?.availability==="available"&&ee?pn:void 0,disabled:f||!!Ee,mobile:z,triggerTestId:"task-chat-composer-add",menuTestId:"task-chat-composer-add-menu"}),t?.privacy?.private?(0,a.jsx)(HI,{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)(FI,{mode:at,onRemove:p?()=>Qn("standard"):void 0,disabled:f||!!Ee,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)(BI,{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,Je)=>(0,a.jsx)(XP,{assigneeValue:se,label:Te,agentMap:C,userProfileMap:R,placement:Je}),"renderAssigneeIdentity")}):null,(K||N)&&!Ln&&!O?(0,a.jsx)(VI,{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||tn&&!za||he||!!Ee||ha||$n||!!t?.submitDisabled||Me.trim().length===0&&Pn.length===0&&!t?.canSubmitWithoutBody),title:le?$E: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)(Ta,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):ma?(0,a.jsx)(_3,{className:"h-4 w-4 fill-current","aria-hidden":!0}):(0,a.jsx)(T1,{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(e$,"TaskChatComposer");var t$=3;function Xr(e){const t=new Date(e.lastUsedAt).getTime();return Number.isFinite(t)?t:0}r(Xr,"workspaceLastUsedTime");function ux(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(ux,"compareWorkspaceNames");function n$(e,t){const s=Xr(t)-Xr(e);return s!==0?s:ux(e,t)}r(n$,"compareWorkspaceLastUsedDesc");function a$(e){return e.branchName??e.id.slice(0,8)}r(a$,"workspaceDescription");function s$(e){return[e.name,e.status,e.branchName,e.cwd,e.id].filter(Boolean).join(" ")}r(s$,"workspaceSearchText");function dA(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(dA,"dedupeReusableExecutionWorkspaces");function i$(e){const t=dA(e).sort(ux);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(i$,"orderReusableExecutionWorkspaces");function iY(e,t={}){const s=(t.now?new Date(t.now).getTime():Date.now())-(t.recentCutoffDays??t$)*24*60*60*1e3,l=dA(e),c=r((f,h)=>({key:`${h}:${f.id}`,value:f.id,workspaceId:f.id,groupId:h,label:f.name,description:a$(f),searchText:s$(f),workspace:f}),"toOption"),u=l.filter(f=>Xr(f)>=s).sort(n$).map(f=>c(f,"recent")),p=[...l].sort(ux).map(f=>c(f,"all"));return[...u.length>0?[{id:"recent",label:"Recent",options:u}]:[],{id:"all",label:"All workspaces",options:p}]}r(iY,"buildReusableExecutionWorkspaceOptionGroups");function rY(e,t){return r$(e,t)!==null}r(rY,"reusableWorkspaceOptionMatches");function r$(e,t){return LT([{text:e.label,weight:0},{text:e.description,weight:20},{text:e.searchText,weight:40}],t)}r(r$,"scoreReusableWorkspaceOptionMatch");var vw=[{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 l$({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:[vw[0]]},{id:"reuse",label:"Reuse a worktree",options:i$(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:vw.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)($I,{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"?mR:k.mode==="agent_default"?TI:k.mode==="operator_branch"?hc:_i;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(l$,"ComposerWorktreePicker");var lY={standard:"Standard",low_trust_review:"Low-trust review"},oY={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 o$(e){return e?.trustPreset==="low_trust_review"?Xs:e1}r(o$,"getTrustPreset");function c$(e){return{...e??{},trustPreset:Xs,reviewPreset:{id:Xs,version:1,rawOutputDisposition:a1}}}r(c$,"buildLowTrustReviewPolicy");function fA(e,t){const s=e??{};if(t==="low_trust_review")return{...s,canCreateAgents:!1,trustPreset:Xs,authorizationPolicy:c$(s.authorizationPolicy)};const l={...s.authorizationPolicy??{}};return delete l.trustPreset,delete l.reviewPreset,delete l.trustBoundary,{...s,trustPreset:e1,authorizationPolicy:l}}r(fA,"buildPermissionsForTrustPreset");function cY(e){const t=e?.authorizationPolicy?.trustBoundary;return t?.mode==="low_trust_review"?t:null}r(cY,"getLowTrustBoundary");function Lc(e){return(e?.projectIds?.length??0)+(e?.rootIssueId?1:0)+(e?.issueIds?.length??0)}r(Lc,"countBoundaryTargets");function u$(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(u$,"getSingleLowTrustBoundaryTarget");function uY(e){return Lc(e)<=1}r(uY,"isCeLowTrustBoundaryEditable");function dY(e,t,s){const l=fA(e,Xs),c=l.authorizationPolicy??{},{projectIds:u,rootIssueId:p,issueIds:f,...h}=c.trustBoundary??{mode:"low_trust_review"},g={...h,mode:Xs,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:Xs,reviewPreset:{id:Xs,version:1,rawOutputDisposition:a1},trustBoundary:g}}}r(dY,"setSingleLowTrustBoundaryTarget");function fY(e){const t=fA(e,Xs),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:Xs}}}}r(fY,"clearSingleLowTrustBoundaryTarget");function pY(e){const t=u$(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(pY,"summarizeLowTrustBoundaryTarget");function mY(e){return Lc(e)>0}r(mY,"lowTrustBoundaryHasScope");function hY(e){return!e||e.preset!=="low_trust_review"?null:e.disposition==="promoted"?"Promoted from low-trust":"Low-trust source"}r(hY,"sourceTrustLabel");var dx="wardmote:issue-draft",d$=800;function yw(){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(yw,"readVisualViewportLayout");function f$(e){const[t,s]=(0,x.useState)(()=>e?yw():null);return(0,x.useEffect)(()=>{if(!e){s(null);return}const l=window.visualViewport;if(!l)return;const c=r(()=>{const u=yw();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(f$,"useVisualViewportLayout");function p$(){try{const e=localStorage.getItem(dx);return e?JSON.parse(e):null}catch{return null}}r(p$,"loadDraft");function m$(e){localStorage.setItem(dx,JSON.stringify(e))}r(m$,"saveDraft");function h$(){localStorage.removeItem(dx)}r(h$,"clearDraft");function g$(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(g$,"isTextDocumentFile");function x$(e){return e.replace(/\.[^.]+$/,"")}r(x$,"fileBaseName");function b$(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"document"}r(b$,"slugifyDocumentKey");function v$(e){return e.split(/[-_ ]+/g).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}r(v$,"titleizeFilename");function y$(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(y$,"createUniqueDocumentKey");function jw(e){return e.size<1024?`${e.size} B`:e.size<1048576?`${(e.size/1024).toFixed(1)} KB`:`${(e.size/1048576).toFixed(1)} MB`}r(jw,"formatFileSize");function fx(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}r(fx,"isRecord$1");function j$(e){return fx(e)&&e.type==="user_secret_ref"&&typeof e.key=="string"&&e.key.trim().length>0&&e.required!==!1&&e.allowMissingOverride!==!0}r(j$,"isRequiredUserSecretBinding");function w$(e){return fx(e)?Object.values(e).flatMap(t=>j$(t)?[t.key.trim()]:[]):[]}r(w$,"collectRequiredUserSecretKeysFromEnv");function k$(e){return[...new Set(e.flatMap(w$))]}r(k$,"uniqueRequiredUserSecretKeys");function S$(e,t){return!!t&&(e==="todo"||e==="in_progress")}r(S$,"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:Pd(t)}r(xd,"defaultExecutionWorkspaceModeForIssueDefaults");function N$(e){const t=e.code==="Period"||e.key===".";return(e.metaKey||e.ctrlKey)&&t}r(N$,"isWorkModePeriodShortcut");function C$(e){return e.metaKey&&e.key==="Escape"}r(C$,"isWorkModeEscapeShortcut");function A$(){const{visible:e}=_P(),{newIssueOpen:t,newIssueDefaults:s,closeNewIssue:l}=Vc(),c=f$(t),u=(0,x.useRef)(null),{companies:p,selectedCompanyId:f}=vt(),h=kn(),g=ja(),{pushToast:v}=Ti(),[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=z1(),de=Ae.clear,we=Ae.set,[ye,Me]=(0,x.useState)(!0),[he,ve]=(0,x.useState)("new"),[et,Pe]=(0,x.useState)("shared_workspace"),[Ee,ct]=(0,x.useState)(""),[Ve,yt]=(0,x.useState)("standard"),[Zt,ge]=(0,x.useState)(!1),{isMobile:Oe}=Jn(),[De,ut]=(0,x.useState)([]),[Ht,Vt]=(0,x.useState)(!1),gt=(0,x.useRef)(null),cn=(0,x.useRef)(null),$=(0,x.useRef)(null),qe=(0,x.useRef)(!1),Xe=(0,x.useRef)(!1),xt=(0,x.useRef)(null),at=Kf(f),Kt=!!s.parentId,ea=s.parentIdentifier??(s.parentId?s.parentId.slice(0,8):""),Jt=s.executionWorkspaceId??"",Mt=s.parentExecutionWorkspaceLabel??Jt,{data:Gt}=me({queryKey:P.agents.list(f),queryFn:r(()=>Fa.list(f),"queryFn"),enabled:!!f&&t}),{data:dt}=me({queryKey:P.projects.list(f),queryFn:r(()=>mr.list(f),"queryFn"),enabled:!!f&&t}),{data:On}=me({queryKey:P.issues.mentionPool(f),queryFn:r(()=>on.list(f,{limit:100,sortField:"updated",sortDir:"desc"}),"queryFn"),enabled:!!f&&t,staleTime:6e4}),{data:mt,isFetched:Nn}=me({queryKey:P.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),{data:It,isFetched:en}=me({queryKey:P.access.companyUserDirectory(f),queryFn:r(()=>ei.listUserDirectory(f),"queryFn"),enabled:!!f&&t}),{data:qt}=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),enabled:t,retry:!1}),Tt=mt?.user?.id??mt?.session?.userId??null,At=(0,x.useMemo)(()=>dt??[],[dt]),{orderedProjects:_e}=cA({projects:At,companyId:f,userId:Tt}),Re=_e.find(Z=>Z.id===A),Dt=!!(qt?.enableIsolatedWorkspaces===!0?Re?.executionWorkspacePolicy??null:null)?.enabled,Le=e&&Dt,{data:Ot,isPending:Rt,isError:Lt,refetch:tn}=me({queryKey:P.executionWorkspaces.summaryList(f,{projectId:A,reuseEligible:!0}),queryFn:r(()=>Jf.listSummaries(f,{projectId:A,reuseEligible:!0}),"queryFn"),enabled:!!f&&t&&Le,retry:!1}),{data:Wt,isError:Ln,refetch:gn}=me({queryKey:P.issues.detail(s.parentId??""),queryFn:r(()=>on.get(s.parentId),"queryFn"),enabled:t&&!!s.parentId,retry:!1}),zn=Kt&&!Wt,ss=Wt?.visibility==="private"||Wt?.project?.visibility==="private",Da=(Wt?.project?.visibility==="private"?Wt.project:null)??(!Zt&&Re?.visibility==="private"?Re:null),wa=Wt?.visibility==="private"?`Subtask of private task ${Wt.title||s.parentTitle||ea}`:Da?`In private project ${Da.name}`:void 0,ka=Zt||ss||_e.some(Z=>Z.id===A&&Z.visibility==="private"),Qn=(0,x.useMemo)(()=>io(K),[K]),jt=Qn.assigneeAgentId,un=Qn.assigneeUserId,Oa=(0,x.useMemo)(()=>(Gt??[]).find(Z=>Z.id===jt)??null,[Gt,jt]),ai=(0,x.useMemo)(()=>BP({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,...$e})=>{const st=await on.create(Z,$e),it=[];for(const Pt of Ne)try{if(Pt.kind==="document"){const bn=await Pt.file.text();await on.upsertDocument(st.id,Pt.documentKey??"document",{title:Pt.documentKey==="plan"?null:Pt.title??null,format:"markdown",body:bn,baseRevisionId:null})}else await on.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:$e})=>{pf(Z.projectId??"",Ne),Z.assigneeAgentId&&ef(Z.assigneeAgentId,Ne),Z.assigneeUserId&&Jd(Z.assigneeUserId,Ne),M5(Z,Tt),h.invalidateQueries({queryKey:P.issues.list(Ne)}),h.invalidateQueries({queryKey:P.issues.listMineByMe(Ne)}),h.invalidateQueries({queryKey:P.issues.listTouchedByMe(Ne)}),h.invalidateQueries({queryKey:P.issues.listUnreadTouchedByMe(Ne)}),h.invalidateQueries({queryKey:P.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}),h$(),ha(),l(),$e&&g(Pt?.href??`/issues/${it}`)},"onSuccess")}),Us=(0,x.useCallback)(Z=>{gt.current&&clearTimeout(gt.current),gt.current=setTimeout(()=>{(Z.title.trim()||Z.description.trim())&&m$(Z)},d$)},[]),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;Us({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:Ee,workMode:Ve,isPrivate:Zt,runSettings:Ae.values})},[t,Us,R,D,K,E,O,V,ce,A,ie,et,Ee,Ve,Zt,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,Ee,Ve,t,ra]),(0,x.useEffect)(()=>{if(!t){$.current=null,qe.current=!1,Xe.current=!1;return}const Z=`${f??""}:${JSON.stringify(s)}`;if($.current===Z)return;$.current=Z,cn.current=null;const Ne=p$();if(Xe.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",$e=s.projectId??"",st=_e.find(Bn=>Bn.id===$e),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($e),le(Pt),z(Kr(s)),Pe(bn),yt(Be),ct(s.executionWorkspaceId??""),cn.current=(it||st)&&$e||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 $e=s.projectId??"",st=_e.find(Pt=>Pt.id===$e),it=s.projectWorkspaceId!==void 0;ee($e),le(s.projectWorkspaceId??Ur(st)),z(Kr(s)),B(""),Q(""),ue(""),X(""),Pe(xd(s,st)),yt(Be),ct(s.executionWorkspaceId??""),cn.current=(it||s.executionWorkspaceId||st)&&$e||null}else if(Ne&&(Ne.title.trim()||Ne.description.trim())){qe.current=!1,Xe.current=!1;const Be=od(Ne.workMode)?Ne.workMode:"standard",$e=s.projectId??Ne.projectId,st=_e.find(Bn=>Bn.id===$e),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,Wa]of Object.entries(Ne.runSettings??{}))(Bn==="model"||Bn==="thinking")&&we(Bn,Wa??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($e),le(it?s.projectWorkspaceId??"":Ne.projectWorkspaceId??Ur(st)),Pe(Pt||bn?xd(s,st):Ne.executionWorkspaceMode??(Ne.useIsolatedExecutionWorkspace?"isolated_workspace":Pd(st))),yt(Be),ct(Pt?s.executionWorkspaceId??"":Ne.selectedExecutionWorkspaceId??""),cn.current=(it||Pt||Ne.projectWorkspaceId||st)&&$e||null}else{yt(od(s.workMode)?s.workMode:"standard");const Be=s.projectId??"",$e=_e.find(it=>it.id===Be),st=s.projectWorkspaceId!==void 0;Pn("",""),_(s.status??"todo"),U(s.priority??""),ee(Be),le(s.projectWorkspaceId??Ur($e)),z(Kr(s)),B(""),Q(""),ue(""),X(""),Pe(xd(s,$e)),ct(s.executionWorkspaceId??""),cn.current=(st||s.executionWorkspaceId||$e)&&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"),Pe("shared_workspace"),ct(""),yt("standard"),ge(!1),ut([]),Vt(!1),cn.current=null,$.current=null}r(ha,"reset");async function $n(Z,Ne,Be){const $e=C.current.trim(),st=Z.trim();if(!f||!$e&&!st||pn.isPending||za||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(ri=>ri.id===A),Wa=e&&qt?.enableIsolatedWorkspaces===!0?Bn?.executionWorkspacePolicy??null:null,Pa=Ha.find(ri=>ri.id===Ee),Cn=et==="reuse_existing"?KP(Pa?.mode):et,wt=Wa?.enabled?{mode:Cn}:null,la=Le&&et==="reuse_existing"&&Pa?Pa.projectWorkspaceId:ie,nn=!e&&s.projectId===A?s.executionWorkspaceId:void 0,ta=WP({reviewerValues:E?[E]:[],approverValues:O?[O]:[]}),dn={companyId:f,stagedFiles:De,...$e?{title:$e}:{},description:st||void 0,status:R,priority:D||"medium",workMode:Ne,...ka?{visibility:"private"}:{},...jt?{assigneeAgentId:jt}:{},...un?{assigneeUserId:un}:{},...s.parentId?{parentId:s.parentId}:{},...s.goalId?{goalId:s.goalId}:{},...A?{projectId:A}:{},...la?{projectWorkspaceId:la}:{},...bn?{modelOverride:bn}:{},...Wa?.enabled?{executionWorkspacePreference:et}:{},...Le&&et==="reuse_existing"&&Ee?{executionWorkspaceId:Ee}:{},...wt?{executionWorkspaceSettings:wt}:{},...nn?{executionWorkspaceId:nn,executionWorkspacePreference:"reuse_existing"}:{},...ta?{executionPolicy:ta}:{},...V?{watchdog:{agentId:V,instructions:ce.trim()||null}}:{}},qs=JSON.stringify(dn);xt.current?.fingerprint!==qs&&(xt.current={fingerprint:qs,idempotencyKey:mf()}),await pn.mutateAsync({...dn,allowDuplicate:!0,idempotencyKey:xt.current.idempotencyKey,navigateOnCreate:s.navigateOnCreate===!0})}r($n,"handleSubmit");function Gn(Z){if(N$(Z)){Z.preventDefault(),yt(Ne=>ig(Ne));return}}r(Gn,"handleKeyDown");function La(Z){Z.length===0||pn.isPending||ut(Ne=>{const Be=[...Ne];for(const $e of Z){if(g$($e)){const st=x$($e.name),it=y$(b$(st),Be);Be.push({id:`${$e.name}:${$e.size}:${$e.lastModified}:${it}`,file:$e,kind:"document",documentKey:it,title:v$(st)});continue}Be.push({id:`${$e.name}:${$e.size}:${$e.lastModified}`,file:$e,kind:"attachment"})}return Be})}r(La,"stageFiles");function xn(Z){Z.dataTransfer.types.includes("Files")&&(Z.preventDefault(),Vt(!0))}r(xn,"handleFileDragEnter");function is(Z){Z.dataTransfer.types.includes("Files")&&(Z.preventDefault(),Z.dataTransfer.dropEffect="copy",Vt(!0))}r(is,"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),La(Array.from(Z.dataTransfer.files)))}r(In,"handleFileDrop");function ga(Z){ut(Ne=>Ne.filter(Be=>Be.id!==Z))}r(ga,"removeStagedFile");const Bs=jt?(Gt??[]).find(Z=>Z.id===jt):null,Ks=o$(Bs?.permissions)==="low_trust_review",rs=(0,x.useMemo)(()=>S$(R,jt)?k$([fx(Bs?.adapterConfig)?Bs.adapterConfig.env:null,Re?.env??null]):[],[Bs?.adapterConfig,Re?.env,jt,R]),Ha=Ot??[],Na=Ha.find(Z=>Z.id===Ee),za=Le&&et==="reuse_existing"&&(Rt||Lt||!Na),ht=Kt&&Dt&&!!Jt&&!(Kt&&Jt&&et==="reuse_existing"&&Ee===Jt),Un=(0,x.useMemo)(()=>CT(),[t]),si=(0,x.useMemo)(()=>Rg(),[t]),ii=(0,x.useMemo)(()=>[...Y1(Tt),...lA(It?.users,{excludeUserIds:[Tt]}),...nS((Gt??[]).filter(Tg),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||!en||at?.loading)return;qe.current=!1;const Z=new Set(ii.map(it=>it.id)),Ne=mg(f),Be=(Ne.length?Ne:mg().filter(it=>it.startsWith("agent:"))).find(it=>Z.has(it)),$e=Gt.filter(Tg),st=$e.find(it=>it.id===at?.primaryAgentId)??$e.find(it=>it.role==="ceo")??$e[0];z(Be??(st?Kr({assigneeAgentId:st.id}):""))},[t,f,Gt,ii,Nn,en,at?.loading,at?.primaryAgentId]),(0,x.useEffect)(()=>{if(!t||!f||!Xe.current||!dt)return;Xe.current=!1;const Z=new Set(_e.filter($e=>!$e.archivedAt).map($e=>$e.id)),Ne=qP(f),Be=Ne!==void 0?Z.has(Ne)?Ne:"":Rg().find($e=>Z.has($e))??"";ee(Be)},[t,f,dt,_e]);const Va=(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"),Je=(0,x.useCallback)(Z=>{Xe.current=!1,pf(Z,f??void 0),ee(Z);const Ne=_e.find(Be=>Be.id===Z);cn.current=Z||null,le(Ur(Ne)),Pe(Pd(Ne)),ct("")},[_e,f]);(0,x.useEffect)(()=>{if(!t||!A||Ee||cn.current===A)return;const Z=_e.find(Ne=>Ne.id===A);Z&&(cn.current=A,le(Ur(Z)),Pe(Pd(Z)),ct(""))},[t,_e,A,Ee]);const Qe=(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)(ws,{open:t,onOpenChange:r(Z=>{!Z&&!pn.isPending&&l()},"onOpenChange"),children:(0,a.jsxs)(Ps,{showCloseButton:!1,"aria-describedby":void 0,style:Qe,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||(C$(Z)?(Z.preventDefault(),yt(Ne=>ig(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)(Ds,{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:is,onDragLeave:Sa,onDrop:In,children:(0,a.jsx)(ET,{mode:"streamlined",children:(0,a.jsx)(e$,{workMode:Ve,onWorkModeChange:yt,disabled:pn.isPending||!f,placeholder:"Describe a task…",mobile:Oe,mentions:ai,onImageUpload:r(async Z=>{if(!f)throw new Error("No organization selected");return(await tS.uploadImage(f,Z,"issues/drafts")).contentPath},"onImageUpload"),companyId:f,enableReassign:!0,reassignOptions:ii,agentMap:Qt,currentAssigneeValue:K,onPendingAssigneeChange:r(Z=>{const Ne=Z??"";qe.current=!1;const Be=io(Ne);Be.assigneeAgentId&&ef(Be.assigneeAgentId,f??void 0),Be.assigneeUserId&&Jd(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"&&Je(""),Z&&!A&&Tt){const Ne=_e.find(Be=>Be.personalOwnerUserId===Tt);Ne&&Je(Ne.id)}},"onChange")},submitLabel:Kt?"Create sub-task":"Create task",canSubmitWithoutBody:!!y.trim(),onSelectFiles:La,runSettings:Ae,runSettingsFooter:(0,a.jsx)(qI,{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)(zS,{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,za&&!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)(B1,{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:jw(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)(AT,{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"," • ",jw(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)(C0,{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,Oa?.status==="paused"?(0,a.jsx)("div",{"data-testid":"new-issue-paused-assignee-note",className:"mx-4 mb-2",children:(0,a.jsxs)(nj,{tone:"warning",icon:B0,compact:!0,children:[(0,a.jsx)("span",{className:"font-medium",children:Oa.name})," is paused and will not start work on this task until it is resumed",Oa.pauseReason==="import"?" — it arrived paused from an organization import":"",". You can resume it from the task page after creating the task."]})}):null,Ks?(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)(N3,{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)(nj,{tone:"warning",compact:!0,children:["This sub-task will no longer use the parent task workspace",Mt?` (${Mt})`:"","."]})}):null,f&&rs.length>0?(0,a.jsx)(OP,{companyId:f,definitionKeys:rs}):null]}),submitDisabled:za||zn,contextBar:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(P0,{value:A,options:Va,recentOptionIds:si,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:Je,renderTriggerValue:r(Z=>Z&&Re?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(_i,{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)(eg,{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)(_i,{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)(_i,{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)(_i,{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)(eg,{className:"size-3.5 shrink-0 text-ink-3","aria-label":"Private project"}):null]})},"renderOption")}),Le?(0,a.jsx)(l$,{mode:et,workspaceId:Ee,selectedWorkspaceLabel:Na?.name??(Ee===Jt?s.parentExecutionWorkspaceLabel:void 0),workspaces:Ha,onChange:r((Z,Ne)=>{if(Pe(Z),ct(Ne),Ne){const Be=Ha.find($e=>$e.id===Ne);Be&&le(Be.projectWorkspaceId??"")}else le(Ur(Re))},"onChange"),loading:Rt,error:Lt,onRetry:r(()=>{tn()},"onRetry"),disabled:pn.isPending,mobile:Oe,contentStyle:zt}):null]})}})})})]})})}r(A$,"NewIssueDialog");var pA=r(e=>["project-repositories",e],"repositoryOptionsKey");function _$({companyId:e,selected:t,onChange:s,onConnect:l,disabled:c}){const u=me({queryKey:pA(e),queryFn:r(()=>mr.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)(y3,{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(_$,"ProjectRepositoryInput");function E$(){const{newProjectOpen:e,closeNewProject:t}=Vc(),{selectedCompanyId:s}=vt();return s&&e?(0,a.jsx)(I$,{companyId:s,onClose:t},s):null}r(E$,"NewProjectDialog");function I$({companyId:e,onClose:t}){const s=kn(),[l,c]=(0,x.useState)(""),[u]=(0,x.useState)(()=>zy[Math.floor(Math.random()*zy.length)]),[p,f]=(0,x.useState)([]),[h,g]=(0,x.useState)(!1),v=(0,x.useRef)(null),y=Bt({mutationFn:r(()=>mr.create(e,{name:l.trim(),color:u,status:"planned",repositoryIds:p.map(j=>j.id)}),"mutationFn"),onSuccess:r(j=>{pf(j.id,e),s.invalidateQueries({queryKey:P.projects.all(e)}),t()},"onSuccess")});return(0,a.jsx)(ws,{open:!0,onOpenChange:r(j=>{!j&&!y.isPending&&t()},"onOpenChange"),children:(0,a.jsx)(Ps,{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)(Ds,{className:"sr-only",children:"Connect GitHub"}),(0,a.jsx)(GE,{host:"dialog",serviceSlug:"github",forceNewConnection:!0,onCancel:r(()=>g(!1),"onCancel"),onComplete:r(()=>{s.invalidateQueries({queryKey:pA(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)(Ds,{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)(x1,{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)(_$,{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(I$,"NewProjectForm");var ww={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 mA(e){return{"--sc":`var(${e})`}}r(mA,"scStyle");function T$(e){const t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}r(T$,"sentenceCaseStatus");function R$({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",Fd[e]??"bg-bg-3 text-ink-3"),children:t??e.replace(/[_-]/g," ")})}r(R$,"StatusBadge");function gY({status:e}){const t=sI[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:mA(t),children:s.replace(/_/g," ")})}r(gY,"AgentStatusBadge");function xY({status:e,externalConversationState:t}){const s=e==="in_review"&&t==="waiting"?"idle":e,l=lI[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:mA(l),children:[(0,a.jsx)(mI,{status:s,size:"sm"}),T$(s)]})}r(xY,"IssueStatusBadge");var kw={company:"Organization",team:"Team",agent:"Agent",task:"Task"};function M$(){const{newGoalOpen:e,newGoalDefaults:t,closeNewGoal:s}=Vc(),{selectedCompanyId:l,selectedCompany:c}=vt(),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:P.goals.list(l),queryFn:r(()=>ww.list(l),"queryFn"),enabled:!!l&&e}),O=Bt({mutationFn:r(A=>ww.create(l,A),"mutationFn"),onSuccess:r(()=>{u.invalidateQueries({queryKey:P.goals.list(l)}),V(),s()},"onSuccess")}),Q=Bt({mutationFn:r(async A=>{if(!l)throw new Error("No organization selected");return tS.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)(ws,{open:e,onOpenChange:r(A=>{A||(V(),s())},"onOpenChange"),children:(0,a.jsxs)(Ps,{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)(VS,{className:"h-3.5 w-3.5"}):(0,a.jsx)(q1,{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)(E1,{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)(js,{open:M,onOpenChange:R,children:[(0,a.jsx)(vs,{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)(R$,{status:v})})}),(0,a.jsx)(ys,{className:"w-40 p-1",align:"start",children:NE.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)(js,{open:_,onOpenChange:D,children:[(0,a.jsx)(vs,{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)(Tf,{className:"h-3 w-3 text-ink-3"}),kw[j]??j]})}),(0,a.jsx)(ys,{className:"w-40 p-1",align:"start",children:yE.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:kw[A]??A},A))})]}),(0,a.jsxs)(js,{open:U,onOpenChange:K,children:[(0,a.jsx)(vs,{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)(S0,{className:"h-3 w-3 text-ink-3"}),X?X.title:"Parent goal"]})}),(0,a.jsxs)(ys,{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(M$,"NewGoalDialog");var Sh=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(Sh(e,t),{signal:s}),"connection"),pair:r((e,t,s)=>je.post(Sh(e,t),{replaceBindingId:s}),"pair"),retry:r((e,t,s)=>je.post(Sh(e,t)+"/event-test",{bindingId:s}),"retry")};function D$(e){const t=O$(e),s=L$(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
+ ${SE}
51
+ `}r(D$,"buildAgentOnboardingPrompt");function O$(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(O$,"buildCandidateOnboardingUrls");function L$(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(L$,"buildResolutionTestUrl");function z$({children:e,className:t,...s}){const[l,c]=(0,x.useState)(null),u=(0,x.useRef)(null),p=U0();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=$T("--motion-ease-out-expo");v=f.animate([{height:`${S}px`},{height:`${k}px`}],{duration:UT("--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)(Ps,{...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(z$,"AnimatedDialogContent");var hA=[{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 P$({onSelect:e,dotDisabledReason:t}){return(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:hA.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)(l1,{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(P$,"ExternalAgentPresetPicker");var $$=[{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 U$({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:$$.map((l,c)=>{const u=c<t,p=c===t&&e.problem==="event_timeout",f=c===t&&!e.problem,h=u?Rs:p?L1:f?Ta:UI;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(U$,"DotConnectionChecks");function B$({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=hA.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)(l1,{type:S.adapter,className:"size-10"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(Ds,{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)(U$,{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)(P$,{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)(N0,{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)(Ta,{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)(BT,{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(B$,"ExternalAgentInviteContent");function K$({companyId:e,onClose:t,onBack:s}){const l=kn(),{selectedCompany:c}=vt(),[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:P.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:P.agents.list(e)});return}const le=await ei.createCompanyInvite(e,{allowedJoinTypes:"agent",humanRole:null,agentMessage:null});l.invalidateQueries({queryKey:P.access.invites(e,"all",5)});const Ae=le.onboardingTextUrl??le.onboardingTextPath??`/api/invites/${le.token}/onboarding.txt`,de=await ei.getInviteOnboarding(le.token).catch(()=>null);S(D$({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?qE({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)(ws,{open:!0,onOpenChange:r(ie=>{ie||t()},"onOpenChange"),children:(0,a.jsx)(z$,{className:"sm:max-w-(--sz-560px)",children:(0,a.jsx)(B$,{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(K$,"ExternalAgentInviteDialog");function q$(){const{newAgentOpen:e,closeNewAgent:t}=Vc(),{selectedCompanyId:s}=vt();return e?(0,a.jsx)(F$,{companyId:s,onClose:t},s):null}r(q$,"NewAgentDialog");function F$({companyId:e,onClose:t}){const s=ja(),[l,c]=(0,x.useState)(!1);return l&&e?(0,a.jsx)(K$,{companyId:e,onClose:t,onBack:r(()=>c(!1),"onBack")}):(0,a.jsx)(VE,{open:!0,onClose:t,onInvite:e?()=>c(!0):void 0,onContinue:r(u=>{t(),s(`/agents/new?${FE(u)}`)},"onContinue")})}r(F$,"NewAgentDialogContent");var H$=[{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 Sw({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(Sw,"KeyCap");function V$(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"divide-y divide-line border-t border-line",children:H$.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)(Sw,{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)(Sw,{children:"Esc"})," to close · Shortcuts are disabled in text fields"]})})]})}r(V$,"KeyboardShortcutsCheatsheetContent");function W$({open:e,onOpenChange:t}){return(0,a.jsx)(ws,{open:e,onOpenChange:t,children:(0,a.jsxs)(Ps,{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)(Ds,{className:"text-base",children:"Keyboard shortcuts"})}),(0,a.jsx)(V$,{})]})})}r(W$,"KeyboardShortcutsCheatsheet");var Q$={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"},G$={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 Y$({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",Q$[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)(pr,{agent:{id:e.actor.id,name:e.actor.name,appearance:e.actor.appearance},size:24}):e.actor?.type==="user"?(0,a.jsxs)(Gd,{size:"sm","aria-hidden":"true",children:[e.actor.image&&(0,a.jsx)(Wd,{src:e.actor.image,alt:""}),(0,a.jsx)(Qd,{children:q3(e.actor.name)})]}):(0,a.jsx)("span",{className:Y("mt-1 h-2 w-2 shrink-0 rounded-full",G$[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(Y$,"AnimatedToast");function X$(){const e=F3(),{dismissToast:t}=Ti();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)(Y$,{toast:s,onDismiss:t},s.id))})})}r(X$,"ToastViewport");async function Nw(e,t){const s=await fetch(`/api/announcements/${e}`,{credentials:"same-origin",cache:"no-store",...t});if(!s.ok)throw new Ii("Announcement request failed",s.status,null);return s}r(Nw,"request");var Cw={async current(e){const t=await(await Nw("current",{signal:e})).json();return t===null?null:gE.parse(t)},async dismiss(e,t,s){await Nw(`${encodeURIComponent(e)}/dismiss`,{method:"POST",signal:s,headers:{"Content-Type":"application/json"},body:JSON.stringify({companyId:t})})}},Mg=new Map;function px(e){return`wardmote.announcement-dismissals.v1:${encodeURIComponent(e)}:`}r(px,"announcementStoragePrefix");function vd(e){const t=px(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);t1.safeParse(u).success&&(p==="pending"||p==="synced")&&Mg.set(c,p==="pending")}}catch{}for(const[l,c]of Mg)l.startsWith(t)&&s.set(l.slice(t.length),c);return s}r(vd,"readAnnouncementDismissals");function Nh(e,t,s){const l=`${px(e)}${t}`;Mg.set(l,s);try{return localStorage.setItem(l,s?"pending":"synced"),!0}catch{return!1}}r(Nh,"saveAnnouncementDismissal");var Z$=3e3;function J$(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=px(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 Cw.dismiss(E,l.current.companyId,O.signal),I()&&Nh(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()},Z$),M(),Cw.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=t1.safeParse(E.data);B.success&&(vd(t).has(B.data)||Nh(t,B.data,!0),D())}),p.current=E=>{if(!I())return;const B=Nh(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(J$,"useAnnouncement");function eU(e,t){const s=U0(),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="${kE}">${y}`})}catch{}finally{clearTimeout(g)}})(),()=>{h.abort(),clearTimeout(g)}},[f,c,l]),f&&u?.key===c?u.document:null}r(eU,"useAnnouncementAnimation");function Aw({action:e,primary:t,onClick:s}){const l=(0,a.jsxs)(a.Fragment,{children:[e.label,!t&&e.kind==="external"&&(0,a.jsx)(OI,{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(Aw,"Action");function tU({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=eU(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)(Aw,{action:e.secondaryLink,onClick:t}),(0,a.jsx)("div",{className:"ml-auto min-w-0 max-w-full",children:(0,a.jsx)(Aw,{action:e.primaryAction,primary:!0,onClick:t})})]})]})}r(tU,"AnnouncementCard");var nU='[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"], [aria-modal="true"]:not([data-state="closed"]), dialog[open]';function aU(e){const[t,s]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{if(!e)return;const l=r(()=>s(!!document.querySelector(nU)),"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(aU,"useModalOpen");function sU({health:e}){const{userId:t,settled:s}=j0(),{selectedCompanyId:l,loading:c}=vt(),{onboardingOpen:u}=qf(),p=Of(),f=H3(),h=e?.deploymentMode==="local_trusted"?"local-board":s?t:null,{announcement:g,dismiss:v}=J$({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=aU(!!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)(tU,{announcement:g,onDismiss:r(()=>v(g.id),"onDismiss")},g.id)})}r(sU,"AnnouncementWell");function ep(e){const t=e.split("/").filter(Boolean);return t.length===1?t[0]?.toLowerCase()==="onboarding":t.length===2?t[1]?.toLowerCase()==="onboarding":!1}r(ep,"isOnboardingPath");function iU(e){const t=e.split("/").filter(Boolean);if(t.length===2&&t[1]?.toLowerCase()==="onboarding")return t[0]}r(iU,"companyPrefixFromOnboardingPath");function gA(){return 3}r(gA,"onboardingStepForCompany");function rU(e){const{pathname:t,companyPrefix:s,companies:l}=e;if(!ep(t))return null;if(!s)return{initialStep:1};const c=l.find(u=>u.issuePrefix.toUpperCase()===s.toUpperCase())??null;return c?{initialStep:gA(),companyId:c.id}:{initialStep:1}}r(rU,"resolveRouteOnboardingOptions");function bY(e){return!e.agentsLoaded||e.agentsRefreshing||e.agentCount>0?!1:!ep(e.pathname)}r(bY,"shouldRouteAgentlessCompanyToOnboarding");function mx(e){return!e.hasCompanies&&!ep(e.pathname)}r(mx,"shouldRedirectCompanylessRouteToOnboarding");function lU(e){return e.onboardingOpen||!e.routeDismissed}r(lU,"isOnboardingWizardActive");function oU({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)(D0,{slot:l,context:e,className:"plugin-app-shell-overlay"},`${l.pluginId}:${l.pluginVersion}:${l.id}`))})}r(oU,"AppShellEntries");function cU({localTrusted:e=!1}){const{userId:t,settled:s}=j0(),{selectedCompanyId:l,selectedCompany:c,loading:u}=vt(),{onboardingOpen:p,onboardingRouteDismissed:f}=qf(),{pathname:h}=hn(),g=s?t??(e?"local-board":null):null,v=p||!f&&ep(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)(oU,{context:y},JSON.stringify([g,l]))}r(cU,"PluginAppShellOverlays");var _w="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 uU({visible:e}){const{selectedCompanyId:t}=vt(),{sidebarOpen:s,setSidebarOpen:l}=Jn(),c=Q0(t),{enabled:u}=zf(),{enabled:p}=Zf(),f=(0,x.useMemo)(()=>[{to:"/dashboard",label:"Home",icon:xR},...p?[]:[{to:"/inbox",label:"Inbox",icon:A0,badge:c.inbox}],{to:"/issues",label:"Tasks",icon:Jh,badge:p?c.inbox:void 0},...u?[{to:"/chats",label:"Chat",icon:vg}]:[]],[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)(m1,{to:h.to,state:Df,className:r(({isActive:v})=>Y(_w,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(_w,s?"text-ink":"text-ink-3"),children:[(0,a.jsx)(BS,{className:"h-(--sz-18px) w-(--sz-18px)"}),(0,a.jsx)("span",{className:"truncate",children:"More"})]})]})})}r(uU,"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 Dg(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(Dg,"normalizeHexColor");function dU(e){const t=Dg(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(dU,"hexToRgb");function Ch(e){const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}r(Ch,"relativeLuminanceChannel");function fU(e){const{r:t,g:s,b:l}=dU(e),c=.2126*Ch(t)+.7152*Ch(s)+.0722*Ch(l);return 1.05/(c+.05)>=(c+.05)/.05?DT:OT}r(fU,"pickReadableTextColor");function vY(){return Jl("wardmote-worktree-enabled")==="true"}r(vY,"isWorktreeRuntime");function yY(){return Jl("wardmote-instance-id")}r(yY,"getWorktreeInstanceId");function pU(){if(Jl("wardmote-worktree-enabled")!=="true")return null;const e=Jl("wardmote-worktree-name"),t=Dg(Jl("wardmote-worktree-color"));return!e||!t?null:{enabled:!0,name:e,color:t,textColor:Dg(Jl("wardmote-worktree-text-color"))??fU(t)}}r(pU,"getWorktreeUiBranding");function mU(){const e=pU(),{copied:t,failed:s,copy:l}=KT(),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(mU,"WorktreeBanner");var hU=3e4;function gU(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(gU,"formatRelativeTimestamp");function xU(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(xU,"describeReason");function bU({devServer:e}){const[t,s]=(0,x.useState)(!1);if((0,x.useEffect)(()=>{if(!t)return;const h=window.setTimeout(()=>{s(!1)},hU);return()=>window.clearTimeout(h)},[t]),!e?.enabled||!e.restartRequired)return null;const l=e,c=gU(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)(ni,{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:[xU(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)(LR,{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(bU,"DevRestartBanner");var vU=new Set(["disk_space_low","database_backup_skipped_low_disk"]);function yU({diskSpace:e,warnings:t}){const s=(t??[]).filter(u=>vU.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)(ni,{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(yU,"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 Og(e,t){return`${e} ${t}${e===1?"":"s"}`}r(Og,"plural");function jU(e){return e?new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):""}r(jU,"formatTime$1");function wU({job:e,serverReachable:t}){switch(e.phase){case"waiting":return(0,a.jsxs)("p",{children:["Waiting for ",Og(e.liveRuns,"run")," to finish. New runs wait until the update is done.",e.waitDeadline?` Gives up at ${jU(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(wU,"UpdateJobSummary");function kU({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:[...P.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([...P.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)(ws,{open:e,onOpenChange:t,children:(0,a.jsxs)(Ps,{"data-testid":"update-install-dialog",children:[(0,a.jsxs)(bo,{children:[(0,a.jsxs)(Ds,{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)(wU,{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)(Pf,{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 ",Og(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 ",Og(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(kU,"UpdateInstallDialog");var xA="wardmote.updateNotice.hiddenUntil",Ew="wardmote.updateNotice.seenJob",Iw=36e5,SU=2e3,NU=864e5;function CU(e){return e?.source==="local_implicit"||e?.source==="session"&&e.isInstanceAdmin===!0}r(CU,"canSeeUpdateNotice");function bA(e){try{return window.localStorage.getItem(e)}catch{return null}}r(bA,"readStored$1");function Tw(e,t){try{window.localStorage.setItem(e,t)}catch{}}r(Tw,"writeStored");function Rw(){const e=Number(bA(xA));return Number.isFinite(e)&&e>0?e:null}r(Rw,"readHiddenUntil");var Mw="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 AU({now:e=Date.now}){const t=CU(me({queryKey:P.access.currentBoardAccess,queryFn:r(()=>ei.getCurrentBoardAccess(),"queryFn"),retry:!1,staleTime:3e4}).data),s=me({queryKey:P.instance.updates,queryFn:r(()=>eo.getStatus(),"queryFn"),enabled:t,retry:!1,staleTime:Iw,refetchInterval:Iw}),l=s.data?.install.canInstall===!0,c=me({queryKey:[...P.instance.updates,"install"],queryFn:r(()=>eo.getInstall(),"queryFn"),enabled:t&&l,retry:!1,refetchInterval:r(_=>Xl(_.state.data?.job)||_.state.status==="error"?SU:!1,"refetchInterval")}),u=c.data?.job??null,p=!c.isError,[f,h]=(0,x.useState)(null),[g,v]=(0,x.useState)(Rw),[y,j]=(0,x.useState)(()=>bA(Ew)),k=aR(g,e());(0,x.useEffect)(()=>{if(!k||g===null)return;const _=window.setTimeout(()=>v(Rw()),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)<NU&&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)(kU,{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(()=>{Tw(Ew,u.id),j(u.id)},"dismiss");return(0,a.jsxs)("section",{"aria-label":"Wardmote update","data-testid":"update-notice","data-phase":u.phase,className:Mw,children:[Xl(u)?(0,a.jsx)(Ta,{className:"size-4 shrink-0 animate-spin text-accent","aria-hidden":"true"}):(0,a.jsx)(aj,{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 _=nR(e());Tw(xA,String(_)),v(_)},"hide");return(0,a.jsxs)("section",{"aria-label":"Wardmote update available","data-testid":"update-notice",className:Mw,children:[(0,a.jsx)(aj,{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(AU,"UpdateNotice");var vA=["standalone","fullscreen","window-controls-overlay"];function _U(e){return`(display-mode: ${e})`}r(_U,"displayModeQuery");function EU(){if(!(typeof window>"u"||typeof window.matchMedia!="function"))return window.matchMedia.bind(window)}r(EU,"defaultMatchMedia");function Lg(e=EU(),t=typeof navigator>"u"?void 0:navigator.standalone){return t===!0?!0:e?vA.some(s=>e(_U(s)).matches):!1}r(Lg,"isChromelessDisplayMode");function yd({label:e,children:t,onClick:s}){return(0,a.jsxs)(Ts,{children:[(0,a.jsx)(Es,{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)(Is,{children:e})]})}r(yd,"ControlButton");function IU(e=typeof window>"u"?null:window.history.state){const t=e?.idx;return typeof t=="number"&&t>0}r(IU,"hasInAppHistory");function TU(){const[e,t]=(0,x.useState)(()=>typeof window<"u"?Lg():!1);return(0,x.useEffect)(()=>{if(typeof window>"u")return;const s=r(()=>t(Lg()),"update");if(s(),typeof window.matchMedia!="function")return;const l=vA.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(TU,"useChromeless");function Dw({mobile:e,onNavigateHome:t}){const s=TU(),l=Of(),c=(0,x.useCallback)(()=>{if(IU()){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 $0(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)(N0,{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)(IR,{className:"h-4 w-4"})}),(0,a.jsx)(yd,{label:"Open in Browser",onClick:f,children:(0,a.jsx)($1,{className:"h-4 w-4"})})]}):null}r(Dw,"StandaloneBrowserControls");function RU(e){return e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}r(RU,"formatTime");function MU(){const e=y0(),[t,s]=(0,x.useState)(null);return(0,x.useEffect)(()=>{if(!e){s(null);return}let l=!1;const c=new Date;return KE().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)($R,{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 ${RU(t)}. `:"Showing what was already loaded. ","Approvals and replies wait until you are back."]})]}):null}r(MU,"OfflineBanner");function yA(){return typeof navigator>"u"?null:navigator.windowControlsOverlay??null}r(yA,"overlay");function DU(e){const t=yA();return t?.addEventListener("geometrychange",e),()=>t?.removeEventListener("geometrychange",e)}r(DU,"subscribe$2");function OU(){return(0,x.useSyncExternalStore)(DU,()=>yA()?.visible===!0,()=>!1)}r(OU,"useWindowControlsOverlayVisible");var LU={WebkitAppRegion:"drag",appRegion:"drag"},zU={WebkitAppRegion:"no-drag",appRegion:"no-drag"};function PU(){const{selectedCompanyId:e}=vt(),{inbox:t}=Q0(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:{...LU,marginLeft:"env(titlebar-area-x, 0px)",width:"env(titlebar-area-width, 100%)",height:"env(titlebar-area-height, 33px)"},children:[(0,a.jsx)(T0,{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:zU,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(PU,"TitleBarContent");function $U(){return OU()?(0,a.jsx)(PU,{}):null}r($U,"WindowTitleBar");var UU=16384,BU=40;function KU(e){if(!e)return;const t=[];for(const s of e.slice(0,UU).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===BU)break}return t.length?`
53
+ ${t.join(`
54
+ `)}`:void 0}r(KU,"sanitizeComponentStack");function jA(){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(jA,"readBrowserErrorState");function qU(e){const t=KU(e.componentStack);return{tags:{react_error_boundary:e.boundary},contexts:{react:t?{componentStack:t}:{},browser_state:jA()}}}r(qU,"buildBrowserErrorContext");var Ow=Promise.resolve();function hx(e){const t=Ow.then(e);return Ow=t.catch(()=>{}),t}r(hx,"enqueue");var po=null;function FU(e,t){return hx(async()=>{if(!po)try{const s=await ke(()=>import("./prod-COP_vZWu.js"),__vite__mapDeps([0,1]));s.init(VU(e,t)),po=s}catch{}})}r(FU,"initBrowserErrorMonitoring");function HU(){return hx(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(HU,"teardownBrowserErrorMonitoring");function wA(e,t){let s;try{t&&(s=qU(t))}catch{}hx(async()=>{try{s?po?.captureException(e,s):po?.captureException(e)}catch{}})}r(wA,"captureBrowserException");function VU(e,t){return{dsn:e,environment:t??void 0,release:"df4d06257c976e1d9d07ad949cf70dfac529c490",tracesSampleRate:0,sendDefaultPii:!1,beforeSend:r((s,l)=>{try{if(s.contexts={...s.contexts,browser_state:s.contexts?.browser_state??jA()},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(VU,"buildBrowserSentryInitOptions");var WU=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){wA(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 QU({children:e}){const t=hn(),s=ja(),l=`${t.pathname}${t.search}`;return(0,a.jsx)(WU,{resetKey:l,onReset:r(()=>s(-1),"onReset"),children:e})}r(QU,"RouteErrorBoundary");function GU({open:e,onOpenChange:t,...s}){return(0,a.jsx)(ws,{open:e,onOpenChange:t,children:(0,a.jsxs)(Ps,{"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)(Ds,{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)(YU,{...s,onComplete:r(()=>t(!1),"onComplete")},String(e))]})})}r(GU,"AgentChatPicker");function YU({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)(J1,{children:[(0,a.jsx)(O0,{"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)(z0,{children:[(0,a.jsx)(L0,{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)(Ys,{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)(sg,{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(YU,"AgentChatPickerResults");function XU({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)(ns,{className:"size-4"})})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(fr,{"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:dr(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)(pr,{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)(GU,{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)(pr,{agent:E,size:32}),"renderAgentIcon"),onSelect:r(async(E,B)=>{y?await y(E,B):g?await g(E,B):N(`/chats/${encodeURIComponent(dr(E))}`),B?.aborted||R("")},"onSelect")})]})}r(XU,"AgentConversationSidebar");function ZU(){const{selectedCompanyId:e}=vt(),{enabled:t,loaded:s}=zf(),l=me({queryKey:P.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:P.agents.list(e),queryFn:r(()=>Fa.list(e),"queryFn"),enabled:t&&!!e}),chats:me({queryKey:P.agentChats.list(e,c),queryFn:r(()=>sS.list(e),"queryFn"),enabled:t&&!!e&&l.isSuccess}),session:l}}r(ZU,"useAgentChatNavigation");function JU(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 sS.ensure(e,f.id);s.setQueryData(P.agentChats.detail(e,t,f.id),v),s.setQueryData(P.issues.detail(v.id),v),s.setQueryData(P.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(dr(f))}`),c&&u(!1))},[s,e,t,l,c,u])}r(JU,"useOpenAgentChat");function e8(){const{companyId:e,userId:t,agents:s,chats:l,session:c}=ZU(),u=JU(e,t),p=ja(),f=V0(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=_f({queries:k.map(D=>({queryKey:P.agents.detail(D),queryFn:r(()=>Fa.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(dr(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||DN(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)(XU,{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:dr(D))}`),h&&g(!1)},"onSelect")},`${e}:${t}`)}r(e8,"AgentConversationsSidebar");var jd=232,zg=208,Pg=420,Lw=16;function hf(e){return Math.min(Pg,Math.max(zg,e))}r(hf,"clampSidebarWidth");function zw(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)?hf(s):jd}catch{return jd}}r(zw,"readStoredSidebarWidth");function Pw(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,String(hf(t)))}catch{}}r(Pw,"writeStoredSidebarWidth");function t8({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)(()=>zw(u)),[k,S]=(0,x.useState)(!1),N=(0,x.useRef)(y),I=(0,x.useRef)(null);(0,x.useEffect)(()=>{const V=zw(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=hf(V);N.current=ue,j(ue),Pw(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=hf(I.current.startWidth+V.clientX-I.current.startX);N.current=ue,j(ue)},[]),O=(0,x.useCallback)(()=>{I.current&&(I.current=null,S(!1),Pw(u,N.current))},[u]),Q=(0,x.useCallback)(V=>{D&&(V.key==="ArrowLeft"?(V.preventDefault(),z(y-Lw)):V.key==="ArrowRight"?(V.preventDefault(),z(y+Lw)):V.key==="Home"?(V.preventDefault(),z(zg)):V.key==="End"&&(V.preventDefault(),z(Pg)))},[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":zg,"aria-valuemax":Pg,"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(t8,"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)(Q1,{children:e})})}r(wd,"SecondarySidebar");function n8(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(n8,"canInviteCompanyMembers");function a8(){const e=eI(),t=me({queryKey:P.access.currentBoardAccess,queryFn:r(()=>ei.getCurrentBoardAccess(),"queryFn"),retry:!1,staleTime:3e4});return n8(e?.selectedCompanyId,t.data)}r(a8,"useCanInviteCompanyMembers");function s8(e){return e?.trim().toLowerCase().replace(/['"]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||null}r(s8,"slugifyUserPart");function i8(e){const t=[e?.id,e?.name,e?.email?.split("@")[0],e?.email];for(const s of t){const l=s8(s);if(l)return`/u/${l}`}return"/u/me"}r(i8,"userProfilePath");var zc=null,kA=!1,$g=!1,Ug=new Set;function Pc(){for(const e of Ug)e()}r(Pc,"emit");function r8(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(r8,"isIosSafariLike");function l8(e=window){const t=r(l=>{l.preventDefault(),zc=l,Pc()},"onPrompt"),s=r(()=>{zc=null,kA=!0,Pc()},"onInstalled");return e.addEventListener("beforeinstallprompt",t),e.addEventListener("appinstalled",s),()=>{e.removeEventListener("beforeinstallprompt",t),e.removeEventListener("appinstalled",s)}}r(l8,"captureInstallPrompt");function o8(){return kA||Lg()?"installed":zc?"prompt":r8()?"ios-manual":"unavailable"}r(o8,"installAvailability");async function c8(){const e=zc;if(!e)return"unavailable";zc=null,Pc(),await e.prompt();const{outcome:t}=await e.userChoice;return t}r(c8,"promptInstall");function Bg(e){$g!==e&&($g=e,Pc())}r(Bg,"setIosInstallHelpOpen");function u8(){return $g}r(u8,"iosInstallHelpOpen");function d8(){return(0,x.useSyncExternalStore)(gx,u8,()=>!1)}r(d8,"useIosInstallHelpOpen");function gx(e){return Ug.add(e),()=>{Ug.delete(e)}}r(gx,"subscribe$1");function SA(){return(0,x.useSyncExternalStore)(gx,o8,()=>"unavailable")}r(SA,"useInstallAvailability");function jY(e){const t=SA();return(0,x.useSyncExternalStore)(gx,()=>m8(t,e),()=>!1)}r(jY,"useInstallNudgeVisible");var f8=2592e6,Kg="wardmote.install.visits",$w="wardmote.install.visit-counted",NA="wardmote.install.snoozed-until";function qg(e,t){const s=Number(e.getItem(t));return Number.isFinite(s)?s:0}r(qg,"readNumber");function p8(e=window.localStorage,t=window.sessionStorage){try{if(t.getItem($w))return;t.setItem($w,"1"),e.setItem(Kg,String(qg(e,Kg)+1))}catch{return}}r(p8,"recordAppVisit");function m8(e,t,s=Date.now(),l=window.localStorage){if(e!=="prompt"&&e!=="ios-manual"||/^\/(?:[^/]+\/)?onboarding(?:\/|$)/.test(t))return!1;try{return qg(l,Kg)>=3&&qg(l,NA)<=s}catch{return!1}}r(m8,"installNudgeVisible");function wY(e=Date.now(),t=window.localStorage){try{t.setItem(NA,String(e+f8))}catch{return}finally{Pc()}}r(wY,"snoozeInstallNudge");var Uw="Install app",h8="Add Wardmote to your home screen or dock.";function g8({variant:e,onAfterAction:t}){const s=SA();if(s==="installed"||s==="unavailable")return null;const l=r(()=>{s==="ios-manual"?Bg(!0):c8(),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)(xg,{className:"size-4"})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:Uw})]}):(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)(xg,{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:Uw}),(0,a.jsx)("span",{className:"block text-xs text-ink-3",children:h8})]})]})}r(g8,"InstallAppMenuAction");function x8(){const e=d8();return(0,a.jsx)(ws,{open:e,onOpenChange:Bg,children:(0,a.jsxs)(Ps,{children:[(0,a.jsxs)(bo,{children:[(0,a.jsx)(Ds,{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)(Ah,{index:1,icon:(0,a.jsx)(TR,{className:"size-4"}),children:["Tap ",(0,a.jsx)("strong",{children:"Share"})," in the Safari toolbar."]}),(0,a.jsxs)(Ah,{index:2,icon:(0,a.jsx)(MR,{className:"size-4"}),children:["Choose ",(0,a.jsx)("strong",{children:"Add to Home Screen"}),"."]}),(0,a.jsxs)(Ah,{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)(Pf,{children:(0,a.jsx)(oe,{type:"button",onClick:r(()=>Bg(!1),"onClick"),children:"Done"})})]})})}r(x8,"IosInstallHelpDialog");function Ah({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(Ah,"InstallStep");function b8(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(b8,"formatTimestamp");function v8(e){return!!e&&!Number.isNaN(new Date(e).getTime())}r(v8,"isValidTimestamp");function y8(e){return e?.devServer?.lastRestartAt??e?.serverInfo?.processStartedAt??null}r(y8,"restartTimestamp");function j8(e){const t=e?.serverInfo?.git;return t?.available?`${t.shortSha} · ${t.subject}`:"Commit unavailable"}r(j8,"commitLabel");function w8(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(w8,"localChangesLabel");function _h({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(_h,"ServerInfoRow");function k8(){const e=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")}).data?.enableServerInfoDebugView===!0,t=me({queryKey:P.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=y8(s),p=v8(u),f=c?"Health unavailable":l?"Loading...":b8(u),h=c?"Health unavailable":l?"Loading...":j8(s),g=c?"Health unavailable":l?"Loading...":w8(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)(_h,{icon:xS,label:"Last restarted",value:f,dateTime:!c&&!l&&p?u:null}),(0,a.jsx)(_h,{icon:hR,label:"Running commit",value:h}),(0,a.jsx)(_h,{icon:uR,label:"Checkout state",value:g})]})}r(k8,"SidebarServerInfo");var S8="/company/settings/members?tab=invites",N8="https://github.com/tickernelz/wardmote/tree/main/docs",C8="https://github.com/tickernelz/wardmote/issues";function A8(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(A8,"deriveInitials");function Eh({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(Eh,"MenuAction");function Bw({deploymentMode:e,open:t,onOpenChange:s,forceExpanded:l=!1}){const{hidden:c,loaded:u}=hr(),p=a8()?S8:null,f=u&&p!==null&&!qd(c,"company.members")&&!qd(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:P.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),M=rx({onSignedOut:K}),R=C?.user.name?.trim()||"Board",_=C?.user.email?.trim()||(e==="authenticated"?"Signed in":"Local workspace board"),D=A8(R),U=i8(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)(js,{open:N,onOpenChange:I,children:[(0,a.jsx)(vs,{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)(Gd,{size:"sm",children:[C?.user.image?(0,a.jsx)(Wd,{src:C.user.image,alt:R}):null,(0,a.jsx)(Qd,{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)(ys,{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)(Gd,{className:"pointer-events-none relative size-9",children:[C?.user.image?(0,a.jsx)(Wd,{src:C.user.image,alt:R}):null,(0,a.jsx)(Qd,{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)(Eh,{label:"Settings",icon:V1,href:"/company/settings",onClick:K}),f&&p?(0,a.jsx)(Eh,{label:"Invite",icon:vN,href:p,onClick:K}):null,(0,a.jsx)(Eh,{label:"Documentation",icon:R1,href:N8,external:!0,onClick:r(()=>I(!1),"onClick")}),(0,a.jsx)(w3,{variant:"compact-menu-action",onAfterToggle:r(()=>I(!1),"onAfterToggle")}),(0,a.jsx)(g8,{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)($f,{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)(k8,{})]})]})]}),S?null:(0,a.jsxs)(Ts,{children:[(0,a.jsx)(Es,{asChild:!0,children:(0,a.jsx)("a",{href:C8,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)(C0,{className:"h-4 w-4","aria-hidden":"true"})})}),(0,a.jsx)(Is,{side:"top",children:"Share feedback"})]})]})})}r(Bw,"SidebarAccountMenu");var _8=["input","textarea","select","[contenteditable='true']","[contenteditable='plaintext-only']","[role='textbox']","[role='combobox']"].join(", "),E8="[data-page-search-target='true']",I8=new Set(["Shift","Meta","Control","Alt"]);function ko(e){return e instanceof HTMLElement?e.isContentEditable?!0:!!e.closest(_8):!1}r(ko,"isKeyboardShortcutTextInputTarget");function Fg(e=document){return!!e.querySelector("[role='dialog'][aria-modal='true']")}r(Fg,"hasBlockingShortcutDialog");function T8(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(T8,"isVisibleShortcutTarget");function R8(e=document){return Array.from(e.querySelectorAll(E8)).find(t=>T8(t))??null}r(R8,"findPageSearchShortcutTarget");function M8(e=document){const t=R8(e);return t?(t.focus(),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.select(),!0):!1}r(M8,"focusPageSearchShortcutTarget");function D8({key:e,isComposing:t}){return e==="Enter"&&!t}r(D8,"shouldBlurPageSearchOnEnter");function O8({key:e,isComposing:t,currentValue:s}){return e==="Escape"&&!t&&s.length===0}r(O8,"shouldBlurPageSearchOnEscape");function tp(e){return I8.has(e)}r(tp,"isModifierOnlyKey");function kY({defaultPrevented:e,key:t,metaKey:s,ctrlKey:l,altKey:c,target:u,hasOpenDialog:p,hasSelection:f}){if(e||s||l||c||tp(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(kY,"resolveAttentionQueueKeyAction");function SY({armed:e,defaultPrevented:t,key:s,metaKey:l,ctrlKey:c,altKey:u,target:p,hasOpenDialog:f}){return!e||t||l||c||u||tp(s)||f||ko(p)?"ignore":s.toLowerCase()==="y"?"archive":"ignore"}r(SY,"resolveInboxQuickArchiveKeyAction");function NY({hasUndoableArchive:e,defaultPrevented:t,key:s,metaKey:l,ctrlKey:c,altKey:u,target:p,hasOpenDialog:f}){return!e||t||l||c||u||tp(s)||f||ko(p)?"ignore":s==="u"?"undo_archive":"ignore"}r(NY,"resolveInboxUndoArchiveKeyAction");function L8({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||tp(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(L8,"resolveIssueDetailGoKeyAction");function z8({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=L8({armed:p,defaultPrevented:S.defaultPrevented,key:S.key,metaKey:S.metaKey,ctrlKey:S.ctrlKey,altKey:S.altKey,target:S.target,hasOpenDialog:Fg()});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)&&!Fg()){if(S.key==="/"&&!S.metaKey&&!S.ctrlKey&&!S.altKey){S.preventDefault(),M8()||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(z8,"useKeyboardShortcuts");var P8=new Set(["auth","invite","board-claim","cli-auth","docs","s"]);function CA(e){const t=(e.split("?")[0]??"").split("/").filter(Boolean);if(t.length===0)return!0;const[s]=t;return!P8.has(s)}r(CA,"isRememberableCompanyPath");function $8(e){const t=Vd(e.companyPrefix);return e.companies.find(s=>Vd(s.issuePrefix)===t)??null}r($8,"findCompanyByPrefix");function U8(e){const t=h1(e.pathname);return t?$8({companies:e.companies,companyPrefix:t})?.id??null:e.fallbackCompanyId}r(U8,"getRememberedPathOwnerCompanyId");function B8(e){const t=e.path?If(e.path):"/dashboard";if(!CA(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&&Vd(c[1]??"")!==Vd(e.companyPrefix))return"/dashboard"}return t}r(B8,"sanitizeRememberedPathForCompany");var AA="wardmote.companyPaths";function _A(){try{const e=localStorage.getItem(AA);if(e)return JSON.parse(e)}catch{}return{}}r(_A,"getCompanyPaths");function K8(e,t){const s=_A();s[e]=t,localStorage.setItem(AA,JSON.stringify(s))}r(K8,"saveCompanyPath");function q8(){const{companies:e,selectedCompanyId:t,selectedCompany:s,selectionSource:l}=vt(),c=hn(),u=ja(),p=(0,x.useRef)(t),f=(0,x.useMemo)(()=>U8({companies:e,pathname:c.pathname,fallbackCompanyId:p.current}),[e,c.pathname]),h=c.pathname+c.search;(0,x.useEffect)(()=>{const g=f,v=If(h);g&&CA(v)&&K8(g,v)},[h,f]),(0,x.useEffect)(()=>{if(t){if(p.current!==null&&t!==p.current&&l!=="route_sync"&&s){const g=_A(),v=B8({path:g[t],companyPrefix:s.issuePrefix});u(`/${s.issuePrefix}${v}`,{replace:!0})}p.current=t}},[s,t,l,u])}r(q8,"useCompanyPageMemory");var F8=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 H8(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 F8({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(H8,"useMobileNavVisibility");function V8(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(V8,"resolveArchivedCompanyBounce");function CY(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(CY,"resolveCompanyArchiveDeparture");function W8(e){const{selectionSource:t,selectedCompanyId:s,routeCompanyId:l}=e;return!(s===l||t==="manual"&&s)}r(W8,"shouldSyncCompanySelectionFromRoute");function Q8(e,t){return e instanceof HTMLElement?!(t instanceof HTMLElement)||!document.contains(t)||t===document.body||t===document.documentElement?!0:!e.contains(t):!1}r(Q8,"shouldFocusMainContentAfterNavigation");function G8(e){if(!(e instanceof HTMLElement))return()=>{};const t=window.requestAnimationFrame(()=>{Q8(e,document.activeElement)&&e.focus({preventScroll:!0})});return()=>window.cancelAnimationFrame(t)}r(G8,"scheduleMainContentFocus");function Y8(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(Y8,"pinDocumentScrollToZero");var X8=mE({NotFoundPage:r(()=>ur,"NotFoundPage")});function ur({scope:e="global",requestedPrefix:t}){const s=hn(),{setBreadcrumbs:l}=Z1(),{companies:c,selectedCompany:u}=vt();(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)(ni,{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)(p1,{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(ur,"NotFoundPage$1");function Z8(e,t){return VC(e,t)[0]?.toLowerCase()??null}r(Z8,"getCompanyRouteSegment");var J8=new Set(["browse","connections","assistant-connection","connect","chat","vercel-connect","review","attention","gateways","advanced","app"]);function e6(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(e6,"useMobileTopbarHeightVar");function t6({sidebarSections:e}){const{sidebarOpen:t,setSidebarOpen:s,toggleSidebar:l,collapsed:c,peeking:u,setPeeking:p,isMobile:f,isTablet:h}=Jn(),g=e6(f),{openNewIssue:v,openOnboarding:y}=$s(),{togglePanelVisible:j}=lx(),k=Of()?.pushToast??null,{companies:S,loading:N,selectedCompany:I,selectedCompanyId:C,selectionSource:M,setSelectedCompanyId:R}=vt(),{companyPrefix:_,pluginRoutePath:D,agentId:U,routineId:K}=zs(),z=ja(),E=hn(),B=ME(),O=U4(E.pathname,_),Q=O.builtInContextualSurface==="settings",V=O.companySegments,ue=O.isTaskDetail,{enabled:ce}=zf(),X=ce&&V[0]?.toLowerCase()==="chats",A=ue||X,ee=V[0]?.toLowerCase()==="tools",ie=V[0]?.toLowerCase()==="apps",le=ie&&V[1]&&!J8.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 $3),he=(0,x.useRef)(E.key),ve=H8(f&&!ue,E.pathname),[et,Pe]=(0,x.useState)(!1),Ee=(0,x.useMemo)(()=>{if(!_)return null;const _e=_.toUpperCase();return S.find(Re=>Re.issuePrefix.toUpperCase()===_e)??null},[S,_]),ct=!!_&&!N&&S.length>0&&!Ee,Ve=(0,x.useMemo)(()=>D?.toLowerCase()??Z8(E.pathname,_),[_,E.pathname,D]),yt=Ee?.id??null,Zt=Ee?.issuePrefix??null,{slots:ge}=qc({slotTypes:["page","routeSidebar"],companyId:yt,enabled:!!(yt&&Ve)}),Oe=(0,x.useMemo)(()=>oT(ge,Ve),[Ve,ge]),De=(0,x.useMemo)(()=>({companyId:yt,companyPrefix:Zt}),[yt,Zt]),ut=Q?(0,a.jsx)(F4,{}):le?(0,a.jsx)(ew,{kind:"connection",connectionId:le}):Ae?(0,a.jsx)(ew,{kind:"application",applicationId:Ae}):ie||ee?(0,a.jsx)(sz,{}):Oe?(0,a.jsx)(Xc,{surface:`plugin:${Oe.id}`,title:Oe.displayName,children:(0,a.jsx)(D0,{slot:Oe,context:De,className:"min-h-0 flex-1",missingBehavior:"placeholder"})}):null,Ht=X?(0,a.jsx)(e8,{}):O.builtInContextualSurface==="agent"&&U?(0,a.jsx)(pz,{agentRef:U}):O.builtInContextualSurface==="routine"&&K?(0,a.jsx)(R3,{children:(0,a.jsx)(xz,{routineId:K})}):O.builtInContextualSurface==="skills"?(0,a.jsx)(yz,{}):ut,Vt=Ht!=null,gt=Vt&&(X||O.builtInContextualSurface==="skills"||O.builtInContextualSurface==="agent"||O.builtInContextualSurface==="routine"||ie||ee),cn=Q&&(f||h),$=Vt&&!gt&&!(h&&Q),qe=gt,Xe=Vt?Oe&&!O.builtInContextualSurface?`plugin:${Oe.id}`:O.builtInContextualSurface:null,xt=(0,x.useRef)(null),{data:at}=me({queryKey:P.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;Xe&&_&&_e&&_e.surface!==Xe&&_e.pathname!==E.pathname&&B4({surface:Xe,companyPrefix:_,previousPathname:_e.pathname}),xt.current={pathname:E.pathname,surface:Xe}},[_,Xe,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(!Ee){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(_!==Ee.issuePrefix){const Re=E.pathname.replace(/^\/[^/]+/,"");z(`/${Ee.issuePrefix}${Re}${E.search}`,{replace:!0});return}const _e=V8({matchedCompany:Ee,selectedCompanyId:C,companies:S});if(_e){k?.({title:`${Ee.name} is archived`,body:`Switched to ${_e.name}.`,tone:"info",dedupeKey:`archived-company-bounce:${Ee.id}`}),R(_e.id,{source:"route_sync"}),z(`/${_e.issuePrefix}/dashboard`,{replace:!0});return}W8({selectionSource:M,selectedCompanyId:C,routeCompanyId:Ee.id})&&R(Ee.id,{source:"route_sync"})},[_,S,N,Ee,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}))},[]),Jt=(0,x.useRef)(null),Mt=(0,x.useRef)(!1),Gt=(0,x.useRef)(!1),dt=(0,x.useCallback)(()=>{Jt.current!==null&&(window.clearTimeout(Jt.current),Jt.current=null)},[]),On=(0,x.useCallback)(()=>{dt(),Jt.current=window.setTimeout(()=>p(!0),50)},[dt,p]),mt=(0,x.useCallback)(()=>{dt(),p(!0)},[dt,p]),Nn=(0,x.useCallback)(()=>{dt(),Jt.current=window.setTimeout(()=>p(!1),120)},[dt,p]),It=(0,x.useCallback)(()=>{Mt.current=!0,c&&!Gt.current&&On()},[c,On]),en=(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 At=(0,x.useRef)(c);return(0,x.useEffect)(()=>{c!==At.current&&(c?(dt(),p(!1),Gt.current=Mt.current):Gt.current=!1,At.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]),q8(),z8({onNewIssue:r(()=>v(),"onNewIssue"),onSearch:ea,onToggleSidebar:l,onTogglePanel:Kt,onShowShortcuts:r(()=>Pe(!0),"onShowShortcuts"),onGoToInbox:r(()=>z("/inbox"),"onGoToInbox")}),(0,x.useEffect)(()=>{if(!f)return;const _e=30,Re=50,lt=75;let Dt=0,Le=0;const Ot=r(Lt=>{const tn=Lt.touches[0];Dt=tn.clientX,Le=tn.clientY},"onTouchStart"),Rt=r(Lt=>{const tn=Lt.changedTouches[0],Wt=tn.clientX-Dt;if(!(Math.abs(tn.clientY-Le)>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 Y8()},[f]),(0,x.useEffect)(()=>{if(typeof document>"u")return;const _e=ye.current;return G8(_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=P3({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){Fy(_e,Dt);const Le=requestAnimationFrame(()=>Fy(_e,Dt));return()=>cancelAnimationFrame(Le)}Re&&B3(_e)},[E.key,E.pathname,E.state,B]),(0,a.jsx)(T3,{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)($U,{}),(0,a.jsx)(mU,{}),(0,a.jsx)(bU,{devServer:at?.devServer}),(0,a.jsx)(yU,{diskSpace:at?.diskSpace,warnings:at?.warnings}),(0,a.jsx)(AU,{}),(0,a.jsx)(MU,{}),(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)(Zj,{children:e})})}),(0,a.jsx)(Bw,{deploymentMode:at?.deploymentMode,forceExpanded:$})]}):(0,a.jsxs)(t8,{open:t,collapsed:$?!1:c,peeking:$?!1:u,resizable:!0,onPanelMouseEnter:$?void 0:It,onPanelMouseLeave:$?void 0:en,onPanelFocusCapture:!$&&c?qt:void 0,onPanelBlurCapture:!$&&c?Tt:void 0,children:[(0,a.jsx)("div",{className:"flex flex-1 min-h-0",children:$?(0,a.jsx)(wd,{children:Ht}):(0,a.jsx)(Zj,{children:e})}),(0,a.jsx)(Bw,{deploymentMode:at?.deploymentMode,forceExpanded:$})]}),!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)(Dw,{mobile:f,onNavigateHome:r(()=>z("/dashboard"),"onNavigateHome")}),(0,a.jsx)(aw,{}),cn?(0,a.jsx)("div",{className:"border-b border-line px-4 pb-3",children:(0,a.jsx)(G4,{})}):null]}),(0,a.jsxs)("div",{className:Y(f?"block":"relative flex flex-1 min-h-0",!f&&A&&"streamlined-task-detail-surface"),children:[!f&&gt?(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)(Dw,{mobile:!1,onNavigateHome:r(()=>z("/dashboard"),"onNavigateHome")}),(0,a.jsx)(aw,{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)(ur,{scope:"invalid_company_prefix",requestedPrefix:_??I?.issuePrefix}):(0,a.jsx)(QU,{children:(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ms,{}),children:(0,a.jsx)(xo,{})})})})]}),(0,a.jsx)($z,{taskDetailLayout:!f&&A})]})]})]}),f&&(0,a.jsx)(uU,{visible:ve}),(0,a.jsx)(AP,{}),(0,a.jsx)(A$,{}),(0,a.jsx)(E$,{}),(0,a.jsx)(M$,{}),(0,a.jsx)(q$,{}),(0,a.jsx)(W$,{open:et,onOpenChange:Pe}),(0,a.jsx)(X$,{}),(0,a.jsx)(sU,{health:at}),(0,a.jsx)(cU,{localTrusted:at?.deploymentMode==="local_trusted"})]})})}r(t6,"Layout");var Kw=null;function n6(){return Kw??=new Af,Kw}r(n6,"getDetachedClient");function a6(){const e=(0,x.useContext)(v0),{data:t,isFetched:s}=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),enabled:e!=null},e??n6());return e?{enabled:t?.enableConferenceRoomChat===!0,loaded:s}:{enabled:!1,loaded:!0}}r(a6,"useConferenceRoomChatEnabled");function s6(){const{enabled:e,loaded:t}=a6();return t?e?(0,a.jsx)(xo,{}):(0,a.jsx)(We,{to:"/dashboard",replace:!0}):null}r(s6,"ConferenceRoomChatGate");function nr({children:e}){const{data:t,isFetched:s}=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enablePipelines!==!0?(0,a.jsx)(We,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(nr,"PipelinesExperimentalGate");function qw({children:e}){const{data:t,isFetched:s}=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enableCases!==!0?(0,a.jsx)(We,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(qw,"CasesExperimentalGate");function Fw({children:e}){const{data:t,isFetched:s}=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enableStatusCards!==!0?(0,a.jsx)(We,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(Fw,"StatusCardsExperimentalGate");function i6({children:e}){const{data:t,isFetched:s}=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enablePixelsOffice!==!0?(0,a.jsx)(We,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(i6,"PixelsOfficeExperimentalGate");function _s({pageKey:e}){const{hidden:t,loaded:s}=hr();return s?t.has(e)?(0,a.jsx)(We,{to:"/company/settings",replace:!0}):(0,a.jsx)(xo,{}):null}r(_s,"HiddenSettingsPageGate");function Ih(){const{data:e,isFetched:t}=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return t?e?.enableIsolatedWorkspaces!==!0?(0,a.jsx)(We,{to:"/dashboard",replace:!0}):(0,a.jsx)(xo,{}):null}r(Ih,"IsolatedWorkspacesRouteGate");function Vl(){const e=hn(),{workspaceId:t}=zs(),{companies:s,loading:l}=vt(),c=me({queryKey:P.executionWorkspaces.detail(t??"__missing__"),queryFn:r(()=>Jf.get(t),"queryFn"),enabled:!!t,retry:!1});if(!t)return(0,a.jsx)(ur,{scope:"global"});if(l||c.isPending)return(0,a.jsx)(Ms,{});if(c.isError)return(0,a.jsx)(ur,{scope:"global"});const u=s.find(p=>p.id===c.data.companyId);return u?(0,a.jsx)(We,{to:`/${u.issuePrefix}${e.pathname}${e.search}${e.hash}`,replace:!0}):(0,a.jsx)(ur,{scope:"global"})}r(Vl,"UnprefixedExecutionWorkspaceRedirect");function r6(){const{companyPrefix:e,workspaceId:t}=zs(),{companies:s,loading:l}=vt(),c=me({queryKey:P.executionWorkspaces.detail(t??"__missing__"),queryFn:r(()=>Jf.get(t),"queryFn"),enabled:!!t,retry:!1});if(!t||!e)return(0,a.jsx)(ur,{scope:"global"});if(l||c.isPending)return(0,a.jsx)(Ms,{});if(c.isError)return(0,a.jsx)(ur,{scope:"global"});const u=s.find(p=>p.issuePrefix.toUpperCase()===e.toUpperCase());return!u||u.id!==c.data.companyId?(0,a.jsx)(ur,{scope:"global"}):(0,a.jsx)(xo,{})}r(r6,"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 l6(e){return{heartbeat:{enabled:e?.heartbeatEnabled??Uy.heartbeatEnabled,intervalSec:e?.intervalSec??Uy.intervalSec,wakeOnDemand:!0,skipTimerWhenNoActionableWork:!0,cooldownSec:10,maxConcurrentRuns:20}}}r(l6,"buildNewAgentRuntimeConfig");var o6="input:not([type=hidden]):not(:disabled), select:not(:disabled), textarea:not(:disabled)",c6="Discard your unsaved changes?",u6=2/3;function d6(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(c6),"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(d6,"useInlineRowEditor");function Hw({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(o6)?.focus({preventScroll:!0});const f=p.getBoundingClientRect().top;if(f>=0&&f<=window.innerHeight*u6)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(Hw,"InlineRowEditorPanel");var f6=2e3,Vw=["omp","login-providers"];function Th(e){return e instanceof Error?e.message:"Something went wrong"}r(Th,"errorText");function Ia({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(Ia,"OmpNote");function p6({onSignedIn:e,autoFocus:t=!1}){const s=kn(),l=me({queryKey:Vw,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:f6});(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)(Ia,{tone:"bad",children:[Th(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)(hg,{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(Vw,_))},"onClick"),children:(0,a.jsx)(nl,{"aria-hidden":"true"})})]})]}):null,y.error?(0,a.jsx)(Ia,{tone:"bad",children:Th(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)($1,{"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)(Ia,{tone:"bad",children:p.message}):null,j.error?(0,a.jsx)(Ia,{tone:"bad",children:Th(j.error)}):null,p.state==="succeeded"?(0,a.jsxs)(Ia,{tone:"ok",children:[p.message??"Signed in",". Models from this provider are ready."]}):null,p.state==="failed"?(0,a.jsxs)(Ia,{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(p6,"OmpSignIn");var Rh=500,Mh=10,m6=(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)(Ia,{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,Mh).join(", "),v.length>Mh?`, and ${v.length-Mh} 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,Rh).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>Rh?(0,a.jsxs)("span",{className:"text-xs text-ink-3",children:["Showing ",Rh," 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")),Dh=["omp","custom-providers"],h6={"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"},g6={"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"},$d={id:"",name:"",api:"",contextWindow:"",maxTokens:"",reasoning:!1,images:!1};function x6(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:[{...$d}]}}r(x6,"initialState");function Hg(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(Hg,"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 Vg(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(Vg,"headersInput");function b6(e){return{baseUrl:e.baseUrl.trim(),api:e.api||null,apiKey:Hg(e),authHeader:e.authHeader,disableStrictTools:e.disableStrictTools,headers:Vg(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(b6,"toInput");function wc(e){if(e instanceof Ii){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 Oh({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)(aS,{checked:s,onCheckedChange:l,"aria-label":e})]})}r(Oh,"Toggle");function Ww({provider:e,takenNames:t,onSaved:s,onCancel:l,onDirtyChange:c}){const[u]=(0,x.useState)(()=>x6(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&&!hE.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(),b6(p)),"mutationFn"),onSuccess:s}),R=Bt({mutationFn:r(()=>ya.probeCustomProvider({...I?{name:e.name}:{},baseUrl:p.baseUrl.trim(),apiKey:Hg(p),authHeader:p.authHeader,headers:Vg(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:[{...$d,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:Hg(p),authHeader:p.authHeader,headers:Vg(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=>({...$d,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)(HT,{"aria-label":"Where the key comes from",className:"flex-wrap self-start",children:B.map(({mode:O,label:Q})=>(0,a.jsx)(FT,{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)(hg,{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"}),_E.map(O=>(0,a.jsx)("option",{value:O,children:h6[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)(Ia,{tone:"bad",children:wc(R.error).join(" ")}):null,g?(0,a.jsxs)(Ia,{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)(rg,{"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,{...$d}]}),"onClick"),children:[(0,a.jsx)(ns,{"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)(cR,{"aria-hidden":"true"}),_.isPending?"Fetching...":"Fetch models"]})]}),_.error?(0,a.jsx)(Ia,{tone:"bad",children:wc(_.error).join(" ")}):null,y?.error?(0,a.jsx)(Ia,{tone:"bad",children:y.error}):null,y&&!y.error?(0,a.jsx)(m6,{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)(Oh,{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)(Oh,{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)(hg,{value:p.discovery,onChange:r(O=>k({discovery:O.target.value}),"onChange"),className:"w-full",children:[(0,a.jsx)("option",{value:"",children:"Off"}),wE.map(O=>(0,a.jsx)("option",{value:O,children:g6[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)(Oh,{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)(rg,{"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)(ns,{"aria-hidden":"true"}),"Add header"]})]})]})]}),M.error?(0,a.jsx)(Ia,{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(Ww,"CustomProviderForm");function v6(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(v6,"keySummary");var to=":new";function y6(e){return e===to?to:e.name}r(y6,"providerKey");function j6({onChanged:e}){const t=kn(),s=me({queryKey:Dh,queryFn:r(()=>ya.customProviders(),"queryFn")}),l=d6(y6),c=Bt({mutationFn:r(h=>ya.removeCustomProvider(h),"mutationFn"),onSuccess:r((h,g)=>{t.setQueryData(Dh,h),l.openKey===g&&l.close(!1),e?.()},"onSuccess")}),u=s.data?.providers??[],p=u.map(h=>h.name),f=r(h=>{t.setQueryData(Dh,h),l.close(),e?.()},"onSaved");return(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[s.error?(0,a.jsx)(Ia,{tone:"bad",children:wc(s.error).join(" ")}):null,s.data?.parseError?(0,a.jsxs)(Ia,{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,v6(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)(K0,{"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)(rg,{"aria-hidden":"true"})})]})]}),l.openKey===h.name?(0,a.jsx)(Hw,{id:l.panelId(h.name),onEscape:l.dismiss,className:"px-2 pb-2 sm:px-3 sm:pb-3",children:(0,a.jsx)(Ww,{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)(Ia,{tone:"bad",children:wc(c.error).join(" ")}):null,l.openKey===to?(0,a.jsx)(Hw,{id:l.panelId(to),onEscape:l.dismiss,children:(0,a.jsx)(Ww,{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)(ns,{"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(j6,"CustomProviders");var w6=["Check OMP","Connect a model","First task"],Wg="Atlas",k6="general";var S6="Only an instance admin can set up OMP on this server.";function Lh(e){return e?e.status===403?{message:S6,retry:!1}:{message:e.message||"Could not check OMP on this server.",retry:!0}:null}r(Lh,"statusFailure");var N6={anthropic:"Anthropic",openai:"OpenAI","openai-codex":"OpenAI",openrouter:"OpenRouter",google:"Google",deepseek:"DeepSeek"};function C6(e){return e?N6[e]??e:null}r(C6,"providerLabel");function A6(e){return e.state==="ready"?"ready":e.state==="missing"?e.network==="offline"?"offline":"install":"old"}r(A6,"checkView");function _6(e){return(e?.models.length??0)>0}r(_6,"hasModel");function E6(e){return e.state!=="ready"?null:_6(e)?2:1}r(E6,"nextStepAfterCheck");function I6(e){return!e.connected||e.state!=="ready"?null:e.modelCount>0?2:1}r(I6,"nextStepAfterRemote");function T6(e){return e.copies.slice(1).filter(t=>t.version!==e.version)}r(T6,"olderCopies");function R6(e){const t=e.trim().split(/\r?\n/,1)[0]?.trim()??"";return t.length<=120?t:`${t.slice(0,119).trimEnd()}…`}r(R6,"taskTitle");function Qw(e){const t=e?.replace(/[\\/]+$/,"").split(/[\\/]/).pop()?.trim();return t||"My company"}r(Qw,"companyNameForFolder");function M6(e){return e?.recommendedModel?e.models.find(t=>t.id===e.recommendedModel)?.label??e.recommendedModel:null}r(M6,"recommendedModelLabel");function D6(e){return e?.recommendedModel?C6(e.models.find(t=>t.id===e.recommendedModel)?.provider??e.recommendedModel.split("/",1)[0]):null}r(D6,"signedInProvider");var gf="Wardmote",EA=2e3,kd=["onboarding","omp-status"],O6={ok:(0,a.jsx)(Rs,{className:"size-3.5","aria-hidden":!0}),bad:(0,a.jsx)(ia,{className:"size-3.5","aria-hidden":!0}),warn:(0,a.jsx)(ni,{className:"size-3.5","aria-hidden":!0}),wait:(0,a.jsx)(GI,{className:"size-3.5","aria-hidden":!0}),run:(0,a.jsx)(nl,{className:"size-3.5 motion-safe:animate-spin","aria-hidden":!0})},L6={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",L6[s.state]),children:O6[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 Qg({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(()=>{$0(e).then(()=>s(!0))},"onClick"),children:[t?(0,a.jsx)(Rs,{className:"size-3.5","aria-hidden":!0}):(0,a.jsx)(a3,{className:"size-3.5","aria-hidden":!0}),t?"Copied":"Copy command"]})]})}r(Qg,"CommandBlock");function xf({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)(ni,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":!0}),(0,a.jsx)("span",{children:t})]})}r(xf,"Note");function z6({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:w6.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)(Rs,{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(z6,"Steps");function or({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(or,"Heading");function IA({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(IA,"SideText");var P6=(0,a.jsx)(IA,{title:"Why OMP",paragraphs:[`${gf} runs every agent on OMP. OMP talks to the model and uses the tools; ${gf} 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 Gg(e){if(e instanceof Ii){const t=e.body;if(t&&typeof t.error=="string")return t.error}return e instanceof Error?e.message:String(e)}r(Gg,"errorMessage$1");function $6({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)(ws,{open:e,onOpenChange:t,children:(0,a.jsxs)(Ps,{className:"sm:max-w-lg",children:[(0,a.jsxs)(bo,{children:[(0,a.jsx)(Ds,{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)(_i,{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)(_i,{className:"size-4 text-ink-3","aria-hidden":!0}):(0,a.jsx)(fR,{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:Gg(u.error)}):null]})]})})}r($6,"OmpFilePicker");function U6({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)(or,{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)(xf,{tone:"bad",children:t.message}):null]});const g=A6(e);if(g==="old"){const v=T6(e);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(or,{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. ${gf} needs OMP ${e.minVersion} or newer.`}),(0,a.jsx)(Qg,{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)(xf,{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)(or,{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)(_i,{className:"size-4","aria-hidden":!0})]})]}),(0,a.jsx)($6,{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)(or,{title:"Install OMP",lede:"Run this in a terminal on this computer. This page moves on by itself."}),(0,a.jsx)(Qg,{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(U6,"CheckOmpScreen");function B6({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)(or,{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)(xf,{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(B6,"RemoteScreen");function K6({remote:e,onSignedIn:t}){const[s,l]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{if(!e)return;const c=window.setInterval(t,EA);return()=>window.clearInterval(c)},[e,t]),e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(or,{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)(Qg,{command:`ssh -t ${e.username}@${e.host}${e.port!==22?` -p ${e.port}`:""} omp login`})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(or,{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)(j6,{onChanged:t}):(0,a.jsx)(p6,{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(K6,"ConnectScreen");function q6({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:M6(e);return(0,a.jsxs)("form",{className:"contents",onSubmit:r(g=>{g.preventDefault(),u.trim()&&c(u.trim())},"onSubmit"),children:[(0,a.jsx)(or,{title:"What should your first agent do?",lede:`${Wg} 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)(eS,{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"}),Wg,", 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)(xf,{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)(I0,{className:"size-3.5","aria-hidden":!0}),s?"Starting…":"Start"]})]})]})}r(q6,"TaskScreen");function F6(){const{onboardingOpen:e,onboardingOptions:t,closeOnboarding:s,onboardingRouteDismissed:l,setOnboardingRouteDismissed:c}=Vc(),{companies:u,loading:p}=vt(),f=hn(),h=iU(f.pathname),g=h&&p?null:rU({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)(H6,{companyId:v,onClose:r(()=>{s(),c(!0)},"onClose")})}r(F6,"OnboardingFlow");function H6({companyId:e,onClose:t}){const s=kn(),l=ja(),{setSelectedCompanyId:c}=vt(),[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)=>(Lh(E)?.retry??!0)&&z<2,"retry"),refetchInterval:r(z=>Lh(z.state.error)?.retry===!1||u===2&&z.state.data?!1:EA,"refetchInterval")}),I=N.data,C=Lh(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=E6(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=I6(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 $y.create({name:Qw(f==="remote"?y?.host:E)})).id,await s.invalidateQueries({queryKey:P.companies.all}));let O=null;f==="remote"&&y?.homeFolder&&(O=(await PT.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 Fa.hire(B,{name:Wg,role:k6,appearance:AE(),adapterType:"omp_local",adapterConfig:Q,onboardingFirstAgent:!0,runtimeConfig:l6(),...O?{defaultEnvironmentId:O}:{}});V.approval&&await HN.approve(V.approval.id,"Approved during onboarding first-agent setup.");const ue=await mr.create(B,{name:Qw(E),status:"in_progress",...f==="local"&&E?{workspace:{sourceType:"local_path",cwd:E,isPrimary:!0}}:{}}),ce=await on.create(B,{title:R6(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(Gg(z)),"onError"),onSuccess:r(async({companyId:z,issue:E})=>{await Promise.all([s.invalidateQueries({queryKey:P.companies.all}),s.invalidateQueries({queryKey:P.agents.list(z)}),s.invalidateQueries({queryKey:P.projects.list(z)}),s.invalidateQueries({queryKey:P.issues.list(z)})]);const B=(await $y.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)(IA,{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:`${D6(I)??"Model"} signed in`,value:"imported"},{state:"ok",label:"Project folder",value:I?.projectFolder}]})]}):P6;return(0,a.jsx)(ws,{open:!0,onOpenChange:r(z=>{z||t()},"onOpenChange"),children:(0,a.jsxs)(J3,{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)(T0,{className:"size-6.5 shrink-0 text-ink","aria-hidden":"true"}),(0,a.jsx)("b",{className:"text-base font-semibold",children:gf})]}),(0,a.jsx)(z6,{step:u}),u===0&&f==="local"?(0,a.jsx)(U6,{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)(B6,{remote:y,pending:_.isPending,error:_.isError?Gg(_.error):null,onCheck:r(z=>_.mutate(z),"onCheck"),onLocal:r(()=>{h("local"),j(null)},"onLocal")}):null,u===1?(0,a.jsx)(K6,{remote:f==="remote"?y:null,onSignedIn:D}):null,u===2?(0,a.jsx)(q6,{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(H6,"OnboardingFlowDialog");function V6(){const{openNewIssue:e}=$s();return(0,x.useEffect)(()=>{e()},[e]),(0,a.jsx)(We,{to:"/issues",replace:!0})}r(V6,"NewTaskShortcut");var W6="npx @tickernelz/wardmote auth bootstrap-ceo";function zh({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)(W1,{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:W6})]})}r(zh,"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 Q6(e){return e.user.email||e.user.name||e.user.id}r(Q6,"displayIdentity");function G6(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(G6,"claimErrorCopy");function Y6({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)(zh,{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)(Ta,{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)(zh,{hasActiveInvite:t})]});const p=G6(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)(Ta,{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:Q6(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)(ni,{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)(zh,{hasActiveInvite:t})]})}r(Y6,"BootstrapPendingPage");var Nd=5e3;function X6({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(X6,"CloudAccessError");function Z6(){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(Z6,"NoBoardAccessPage");function Gw({allowMembershipRequest:e=!1}={}){const t=hn(),s=kn(),[l,c]=(0,x.useState)(!1),u=me({queryKey:P.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:P.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:P.access.currentBoardAccess,queryFn:r(()=>ei.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(()=>ei.claimBootstrapAdmin(),"mutationFn"),onSuccess:r(async()=>{await s.invalidateQueries({queryKey:P.auth.session}),await s.invalidateQueries({queryKey:P.health}),await s.invalidateQueries({queryKey:P.companies.all}),await s.invalidateQueries({queryKey:P.companies.stats}),await s.invalidateQueries({queryKey:P.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)(X6,{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)(Ms,{});if(f){const R=u.data;if(!R)return(0,a.jsx)(Ms,{});const _=v.error instanceof Ii?{status:v.error.status,message:v.error.message}:v.error instanceof Error?{message:v.error.message}:null;return(0,a.jsx)(Y6,{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)(We,{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)(Z6,{})}r(Gw,"CloudAccessGate");var TA=["all","active","paused","error","builtin"];function J6({endpointId:e,children:t}){const s=me({queryKey:P.chatEndpoints.detail(e),queryFn:r(()=>X1.get(e),"queryFn")}),{enabled:l,githubEnabled:c}=w0();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?u1(s.data.provider,l,c)?(0,a.jsx)(a.Fragment,{children:t}):(0,a.jsx)(We,{to:"/apps",replace:!0}):null}r(J6,"ProviderEndpointGate");function Cd({children:e}){const{enabled:t,githubEnabled:s,loaded:l}=w0(),[c]=i1(),{endpointId:u}=zs();return!u&&c.get("provider")==="agentmail"?(0,a.jsx)(a.Fragment,{children:e}):l?u?(0,a.jsx)(J6,{endpointId:u,children:e}):u1(c.get("provider"),t,s)?(0,a.jsx)(a.Fragment,{children:e}):(0,a.jsx)(We,{to:"/apps",replace:!0}):null}r(Cd,"ChatConnectorsExperimentalGate");Ce(()=>ke(()=>import("./TaskChatLab-vnFP7gcJ.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 eB=Ce(()=>ke(()=>import("./Cases-C5IE_YuB.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]))),tB=Ce(()=>ke(()=>import("./CaseDetail-k79_F25A.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]))),nB=Ce(()=>ke(()=>import("./Dashboard-B0JjQSAg.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]))),aB=Ce(()=>ke(()=>import("./Companies-Cr0mZy2B.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]))),sB=Ce(()=>ke(()=>import("./Agents-BjPLaL-p.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]))),Ph=Ce(()=>ke(()=>import("./AgentDetail-NfA1gamX.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]))),iB=Ce(()=>ke(()=>import("./Projects-B6UgAQ3Z.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-OirlXEA4.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]))),rB=Ce(()=>ke(()=>import("./ProjectWorkspaceDetail-C9_liq4q.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]))),lB=Ce(()=>ke(()=>import("./Workspaces-uDkUYVN3.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]))),oB=Ce(()=>ke(()=>import("./Issues-DtYFX9i_.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]))),cB=Ce(()=>ke(()=>import("./Search-DjpKZIsB.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]))),uB=Ce(()=>ke(()=>import("./IssueDetail-C0hCFL-i.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]))),dB=Ce(()=>ke(()=>import("./AgentChats-56CMlXmb.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]))),fB=Ce(()=>ke(()=>import("./AgentChat--rcr73Ls.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]))),pB=Ce(()=>ke(()=>import("./IssueChatLongThreadPerf-BJ_Hr2PT.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]))),mB=Ce(()=>ke(()=>import("./Routines-pnhQk9RN.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]))),hB=Ce(()=>ke(()=>import("./Pipelines-DAuqtVqc.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]))),gB=Ce(()=>ke(()=>import("./Pipelines-DAuqtVqc.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]))),xB=Ce(()=>ke(()=>import("./Pipelines-DAuqtVqc.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]))),$h=Ce(()=>ke(()=>import("./Pipelines-DAuqtVqc.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]))),bB=Ce(()=>ke(()=>import("./Pipelines-DAuqtVqc.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]))),vB=Ce(()=>ke(()=>import("./PipelineSettings-BgfMR73P.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]))),Yw=Ce(()=>ke(()=>import("./StatusCards-Bqkb18QJ.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]))),yB=Ce(()=>ke(()=>import("./PixelsOffice-CaQYQilp.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]))),Xw=Ce(()=>ke(()=>import("./RoutineDetail-DPzql29w.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]))),jB=Ce(()=>ke(()=>import("./UserProfile-CEpSKMzS.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-BxA_kWKs.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]))),wB=Ce(()=>ke(()=>import("./Goals-UrfBAjOT.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]))),Zw=Ce(()=>ke(()=>import("./Artifacts-47GmGXVx.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]))),kB=Ce(()=>ke(()=>import("./GoalDetail-C-uH9eNu.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]))),Jw=Ce(()=>ke(()=>import("./Approvals-CF4K0bD1.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]))),SB=Ce(()=>ke(()=>import("./ApprovalDetail-Cxhx_U0d.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]))),NB=Ce(()=>ke(()=>import("./CompanyActivity-BhNtXl8c.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-DNmGrEzV.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]))),CB=Ce(()=>ke(()=>import("./WhatNeedsMe-D0yh5L5H.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]))),AB=Ce(()=>ke(()=>import("./DecisionQueuePage-DtzH_oQI.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]))),_B=Ce(()=>ke(()=>import("./BoardChat-BenJSqr6.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]))),EB=Ce(()=>ke(()=>import("./CompanySettings-C6FNik3j.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]))),IB=Ce(()=>ke(()=>import("./CompanyConnections-BwCkXXZK.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]))),Uh=Ce(()=>ke(()=>import("./CompanyEnvironments-CyrghjsN.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]))),TB=Ce(()=>ke(()=>import("./BootstrapSetupUxLab-DO03bmwI.js").then(e=>e.BootstrapSetupUxLab),__vite__mapDeps([369,1,3,7,8,9,97,33,98,175]))),RB=Ce(()=>ke(()=>import("./ResponsibleUserDenialUxLab-DGWo-GoD.js").then(e=>e.ResponsibleUserDenialUxLab),__vite__mapDeps([370,1,3,175,256,245,106,257]))),MB=Ce(()=>ke(()=>import("./CrossIssueCollaborationUxLab-D2bB9GTl.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]))),DB=Ce(()=>ke(()=>import("./CompanySettingsPluginPage-DPHNF4sp.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]))),OB=Ce(()=>ke(()=>import("./CompanyAccess-BQZD0MZf.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]))),LB=Ce(()=>ke(()=>import("./CompanyAccess-BQZD0MZf.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]))),ek=Ce(()=>ke(()=>import("./AdvancedToolsRoute-Bg4KowJU.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]))),tk=Ce(()=>ke(()=>import("./ProfileWizardRoute-DvOWuvrG.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]))),zB=Ce(()=>ke(()=>import("./ProfileDetailRoute-YzeVN0Ko.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]))),PB=Ce(()=>ke(()=>import("./Browse-gMVDtSCz.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]))),RA=Ce(()=>ke(()=>import("./AppsConnect-D7l2xnv-.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]))),$B=Ce(()=>ke(()=>import("./ChatEndpointSetup-CTntfzjg.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]))),nk=Ce(()=>ke(()=>import("./ChatEndpointDetail-DPiCCvto.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]))),UB=Ce(()=>ke(()=>import("./ChatIdentityConfirm-Dc4AnYX8.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]))),BB=Ce(()=>ke(()=>import("./AppsReview-Chv6Jms5.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]))),KB=Ce(()=>ke(()=>import("./AppDetail-CwyYWsvw.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]))),ak=Ce(()=>ke(()=>import("./AppNotConnected-DzDZR0-8.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]))),sk=Ce(()=>ke(()=>import("./GatewaysList-Ad1dZuwC.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]))),qB=Ce(()=>ke(()=>import("./GatewayDetail-CUcpw4Hj.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]))),FB=Ce(()=>ke(()=>import("./CompanySkills-DsgjKlp7.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]))),ik=Ce(()=>ke(()=>import("./SkillSources-CYYp9Mds.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]))),Bh=Ce(()=>ke(()=>import("./SkillStudio-Dl28fokd.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]))),HB=Ce(()=>ke(()=>import("./Secrets-BOZydXaY.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]))),VB=Ce(()=>ke(()=>import("./CompanyImport-5M7yWHR-.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]))),WB=Ce(()=>ke(()=>import("./DesignGuide-CXHLyL_C.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]))),QB=Ce(()=>ke(()=>import("./InstanceFeatures-C1eqcxDI.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]))),GB=Ce(()=>ke(()=>import("./AgentDefaults-C0WFwQky.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]))),YB=Ce(()=>ke(()=>import("./OmpAllSettings-DTJLATQL.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]))),XB=Ce(()=>ke(()=>import("./ModelsAndProviders-C7VZHvPR.js").then(e=>e.ModelsAndProviders),__vite__mapDeps([421,1,3,20,21,22,7,8,9,13,156,55,127,258]))),ZB=Ce(()=>ke(()=>import("./InstanceAdvanced-DYZ50o97.js").then(e=>e.InstanceAdvanced),__vite__mapDeps([422,1,3,7,8,9,12,14,98,125,127,419,20,141,197,198,233]))),JB=Ce(()=>ke(()=>import("./InstanceAccess-D4ZbGCeK.js").then(e=>e.InstanceAccess),__vite__mapDeps([423,1,3,20,22,121,25,8,4,7,9,97,32,37,147,127,175]))),eK=Ce(()=>ke(()=>import("./ProfileSettings-BLh9EdSK.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]))),tK=Ce(()=>ke(()=>import("./PluginManager-DkADWuR8.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]))),nK=Ce(()=>ke(()=>import("./PluginSettings-D365WG22.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]))),rk=Ce(()=>ke(()=>import("./AdapterManager-C59AKY0f.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]))),lk=Ce(()=>ke(()=>import("./PluginPage-C-W3lTd9.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]))),aK=Ce(()=>ke(()=>import("./NewAgent-BzZI-FBE.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]))),sK=Ce(()=>ke(()=>import("./Auth-D0lGuVnd.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]))),iK=Ce(()=>ke(()=>import("./BoardClaim-CbYY66Qd.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]))),rK=Ce(()=>ke(()=>import("./AssistantConnection-BCrEgmJR.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]))),ok=Ce(()=>ke(()=>import("./McpConnect-BYYMfbhs.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]))),lK=Ce(()=>ke(()=>import("./McpConnect-BYYMfbhs.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]))),oK=Ce(()=>ke(()=>import("./McpConnect-BYYMfbhs.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]))),cK=Ce(()=>ke(()=>import("./CliAuth-CatEsBxW.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]))),uK=Ce(()=>ke(()=>import("./InviteLanding-Bqp1ulQV.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]))),ck=Ce(()=>ke(()=>import("./PublicIssueSharePage-Cg0GqSVM.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]))),dK=Ce(()=>ke(()=>import("./JoinRequestQueue-DyPP4DL2.js").then(e=>e.JoinRequestQueue),__vite__mapDeps([437,1,3,20,21,22,7,8,9,125,37,147,127,175]))),MA=Ce(()=>ke(()=>Promise.resolve().then(()=>X8).then(e=>e.NotFoundPage),void 0)),fc=Ce(()=>ke(()=>import("./Inbox-BzkFmAxU.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]))),fK=Ce(()=>ke(()=>import("./CompanyExport-BlQuIvDU.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]))),pK=Ce(()=>ke(()=>import("./Terminal-YAhWrMv9.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 mK({children:e}){return(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ms,{}),children:e})}r(mK,"ProductionSurface");function hK(e){const t=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{index:!0,element:(0,a.jsx)(We,{to:"dashboard",replace:!0})}),(0,a.jsx)(L,{path:"dashboard",element:(0,a.jsx)(nB,{})}),(0,a.jsx)(L,{path:"dashboard/live",element:(0,a.jsx)(We,{to:pI("all"),replace:!0})}),(0,a.jsx)(L,{path:"timeline",element:(0,a.jsx)(Gs,{to:"/activity/timeline"})}),(0,a.jsx)(L,{path:"onboarding",element:(0,a.jsx)(LA,{})}),(0,a.jsx)(L,{path:"companies",element:(0,a.jsx)(aB,{})}),(0,a.jsx)(L,{path:"company/settings",element:(0,a.jsx)(EB,{})}),(0,a.jsx)(L,{path:"company/settings/connections",element:(0,a.jsx)(IB,{})}),(0,a.jsx)(L,{path:"company/settings/agent-defaults",element:(0,a.jsx)(GB,{})}),(0,a.jsx)(L,{path:"company/settings/agent-defaults/all",element:(0,a.jsx)(YB,{})}),(0,a.jsx)(L,{path:"company/settings/models",element:(0,a.jsx)(XB,{})}),(0,a.jsx)(L,{path:"company/settings/environments",element:(0,a.jsx)(We,{to:"/company/settings/instance/environments",replace:!0})}),(0,a.jsx)(L,{path:"company/settings/cloud-upstream",element:(0,a.jsx)(We,{to:"/company/export",replace:!0})}),(0,a.jsxs)(L,{element:(0,a.jsx)(_s,{pageKey:"company.members"}),children:[(0,a.jsx)(L,{path:"company/settings/members",element:(0,a.jsx)(OB,{})}),(0,a.jsx)(L,{path:"company/settings/access",element:(0,a.jsx)(LB,{})})]}),(0,a.jsx)(L,{element:(0,a.jsx)(_s,{pageKey:"company.invites"}),children:(0,a.jsx)(L,{path:"company/settings/invites",element:(0,a.jsx)(We,{to:"/company/settings/members?tab=invites",replace:!0})})}),(0,a.jsx)(L,{element:(0,a.jsx)(_s,{pageKey:"company.export"}),children:(0,a.jsx)(L,{path:"company/export/*",element:(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ms,{}),children:(0,a.jsx)(fK,{})})})}),(0,a.jsx)(L,{element:(0,a.jsx)(_s,{pageKey:"company.import"}),children:(0,a.jsx)(L,{path:"company/import",element:(0,a.jsx)(VB,{})})}),(0,a.jsx)(L,{element:(0,a.jsx)(_s,{pageKey:"company.secrets"}),children:(0,a.jsx)(L,{path:"company/settings/secrets",element:(0,a.jsx)(HB,{})})}),(0,a.jsx)(L,{path:"company/settings/tools",element:(0,a.jsx)(fk,{})}),(0,a.jsx)(L,{path:"company/settings/tools/:tab",element:(0,a.jsx)(fk,{})}),(0,a.jsx)(L,{path:"tools",element:(0,a.jsx)(pk,{})}),(0,a.jsx)(L,{path:"tools/:tab",element:(0,a.jsx)(pk,{})}),(0,a.jsx)(L,{path:"apps",element:(0,a.jsx)(PB,{})}),(0,a.jsx)(L,{path:"apps/assistant-connection",element:(0,a.jsx)(rK,{})}),(0,a.jsx)(L,{path:"apps/browse",element:(0,a.jsx)(We,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/connections",element:(0,a.jsx)(We,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/byo",element:(0,a.jsx)(RA,{byoOnly:!0})}),(0,a.jsx)(L,{path:"apps/vercel-connect",element:(0,a.jsx)(uk,{credentialSource:"vercel_connect"})}),(0,a.jsx)(L,{path:"apps/connect",element:(0,a.jsx)(uk,{})}),(0,a.jsx)(L,{path:"apps/chat/connect",element:(0,a.jsx)(Cd,{children:(0,a.jsx)($B,{})})}),(0,a.jsx)(L,{path:"apps/chat/:endpointId",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(We,{to:"settings",replace:!0})})}),(0,a.jsx)(L,{path:"apps/chat/:endpointId/reviews/:reviewId",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(nk,{})})}),(0,a.jsx)(L,{path:"apps/chat/:endpointId/:tab",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(nk,{})})}),(0,a.jsx)(L,{path:"apps/connect/:appKey",element:(0,a.jsx)(We,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/connect/:appKey/:stage",element:(0,a.jsx)(We,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/review",element:(0,a.jsx)(BB,{})}),(0,a.jsx)(L,{path:"apps/attention",element:(0,a.jsx)(We,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/gateways",element:(0,a.jsx)(sk,{})}),(0,a.jsx)(L,{path:"apps/gateways/:gatewayId",element:(0,a.jsx)(We,{to:"overview",replace:!0})}),(0,a.jsx)(L,{path:"apps/gateways/:gatewayId/:tab",element:(0,a.jsx)(qB,{})}),(0,a.jsx)(L,{path:"apps/advanced",element:(0,a.jsx)(ek,{})}),(0,a.jsx)(L,{path:"apps/advanced/gateways",element:(0,a.jsx)(sk,{})}),(0,a.jsx)(L,{path:"apps/advanced/profiles/new",element:(0,a.jsx)(tk,{mode:"new"})}),(0,a.jsx)(L,{path:"apps/advanced/profiles/:profileId/edit",element:(0,a.jsx)(tk,{mode:"edit"})}),(0,a.jsx)(L,{path:"apps/advanced/profiles/:profileId",element:(0,a.jsx)(zB,{})}),(0,a.jsx)(L,{path:"apps/advanced/audit",element:(0,a.jsx)(We,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/advanced/run-your-own",element:(0,a.jsx)(We,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/advanced/:tab",element:(0,a.jsx)(ek,{})}),(0,a.jsx)(L,{path:"apps/app/:applicationId",element:(0,a.jsx)(ak,{})}),(0,a.jsx)(L,{path:"apps/app/:applicationId/:tab",element:(0,a.jsx)(ak,{})}),(0,a.jsx)(L,{path:"apps/:connectionId",element:(0,a.jsx)(We,{to:"permissions",replace:!0})}),(0,a.jsx)(L,{path:"apps/:connectionId/:tab",element:(0,a.jsx)(KB,{})}),(0,a.jsx)(L,{path:"company/settings/instance",element:(0,a.jsx)(We,{to:"/company/settings",replace:!0})}),(0,a.jsx)(L,{element:(0,a.jsx)(_s,{pageKey:"instance.profile"}),children:(0,a.jsx)(L,{path:"company/settings/instance/profile",element:(0,a.jsx)(eK,{})})}),(0,a.jsx)(L,{path:"company/settings/instance/general",element:(0,a.jsx)(We,{to:"/company/settings",replace:!0})}),(0,a.jsx)(L,{path:"company/settings/instance/heartbeats",element:(0,a.jsx)(We,{to:"/company/settings",replace:!0})}),(0,a.jsxs)(L,{element:(0,a.jsx)(_s,{pageKey:"instance.environments"}),children:[(0,a.jsx)(L,{path:"company/settings/instance/environments",element:(0,a.jsx)(Uh,{})}),(0,a.jsx)(L,{path:"company/settings/instance/environments/new",element:(0,a.jsx)(Uh,{mode:"create"})}),(0,a.jsx)(L,{path:"company/settings/instance/environments/:environmentId/edit",element:(0,a.jsx)(Uh,{mode:"edit"})})]}),(0,a.jsx)(L,{element:(0,a.jsx)(_s,{pageKey:"instance.access"}),children:(0,a.jsx)(L,{path:"company/settings/instance/access",element:(0,a.jsx)(JB,{})})}),(0,a.jsxs)(L,{element:(0,a.jsx)(_s,{pageKey:"instance.experimental"}),children:[(0,a.jsx)(L,{path:"company/settings/instance/features",element:(0,a.jsx)(QB,{})}),(0,a.jsx)(L,{path:"company/settings/instance/advanced",element:(0,a.jsx)(ZB,{})}),(0,a.jsx)(L,{path:"company/settings/instance/experimental",element:(0,a.jsx)(We,{to:"/company/settings/instance/features",replace:!0})})]}),(0,a.jsxs)(L,{element:(0,a.jsx)(_s,{pageKey:"instance.plugins"}),children:[(0,a.jsx)(L,{path:"company/settings/instance/plugins",element:(0,a.jsx)(tK,{})}),(0,a.jsx)(L,{path:"company/settings/instance/plugins/:pluginId",element:(0,a.jsx)(nK,{})})]}),(0,a.jsx)(L,{element:(0,a.jsx)(_s,{pageKey:"instance.adapters"}),children:(0,a.jsx)(L,{path:"company/settings/instance/adapters",element:(0,a.jsx)(rk,{})})}),(0,a.jsx)(L,{path:"company/settings/:settingsRoutePath/*",element:(0,a.jsx)(DB,{})}),(0,a.jsx)(L,{path:"skills/sources",element:(0,a.jsx)(ik,{})}),(0,a.jsx)(L,{path:"skills/sources/:sourceId",element:(0,a.jsx)(ik,{})}),(0,a.jsx)(L,{path:"skills/studio",element:(0,a.jsx)(Bh,{})}),(0,a.jsx)(L,{path:"skills/studio/new",element:(0,a.jsx)(Bh,{})}),(0,a.jsx)(L,{path:"skills/studio/:skillId",element:(0,a.jsx)(Bh,{})}),(0,a.jsx)(L,{path:"skills/:skillId/studio",element:(0,a.jsx)(DA,{})}),(0,a.jsx)(L,{path:"skills/*",element:(0,a.jsx)(FB,{})}),(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)(lk,{})}),(0,a.jsx)(L,{path:"org",element:(0,a.jsx)(We,{to:"/agents/all",replace:!0})}),(0,a.jsx)(L,{path:"agents",element:(0,a.jsx)(We,{to:"/agents/all",replace:!0})}),TA.map(s=>(0,a.jsx)(L,{path:`agents/${s}`,element:(0,a.jsx)(sB,{})},s)),(0,a.jsx)(L,{path:"agents/new",element:(0,a.jsx)(aK,{})}),(0,a.jsx)(L,{path:"agents/:agentId",element:(0,a.jsx)(Ph,{})}),(0,a.jsx)(L,{path:"agents/:agentId/:tab",element:(0,a.jsx)(Ph,{})}),(0,a.jsx)(L,{path:"agents/:agentId/runs/:runId",element:(0,a.jsx)(Ph,{})}),(0,a.jsx)(L,{path:"projects",element:(0,a.jsx)(iB,{})}),(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)(Ih,{}),children:(0,a.jsx)(L,{path:"projects/:projectId/workspaces/:workspaceId",element:(0,a.jsx)(rB,{})})}),(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)(Ih,{}),children:(0,a.jsx)(L,{path:"workspaces",element:(0,a.jsx)(lB,{})})}),(0,a.jsx)(L,{path:"terminal",element:(0,a.jsx)(mK,{children:(0,a.jsx)(pK,{})})}),(0,a.jsx)(L,{path:"issues",element:(0,a.jsx)(oB,{})}),(0,a.jsx)(L,{path:"tasks",element:(0,a.jsx)(We,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"tasks/new",element:(0,a.jsx)(V6,{})}),(0,a.jsx)(L,{path:"search",element:(0,a.jsx)(cB,{})}),t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"issues/all",element:(0,a.jsx)(xs,{view:"all"})}),(0,a.jsx)(L,{path:"issues/active",element:(0,a.jsx)(xs,{view:"active"})}),(0,a.jsx)(L,{path:"issues/backlog",element:(0,a.jsx)(xs,{view:"backlog"})}),(0,a.jsx)(L,{path:"issues/done",element:(0,a.jsx)(xs,{view:"done"})}),(0,a.jsx)(L,{path:"issues/recent",element:(0,a.jsx)(xs,{view:"recent"})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"issues/all",element:(0,a.jsx)(We,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/active",element:(0,a.jsx)(We,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/backlog",element:(0,a.jsx)(We,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/done",element:(0,a.jsx)(We,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/recent",element:(0,a.jsx)(We,{to:"/issues",replace:!0})})]}),(0,a.jsx)(L,{path:"chats",element:(0,a.jsx)(dB,{})}),(0,a.jsx)(L,{path:"chats/:agentRef",element:(0,a.jsx)(fB,{})}),(0,a.jsx)(L,{path:"issues/:issueId",element:(0,a.jsx)(uB,{})}),null,(0,a.jsx)(L,{path:"routines",element:(0,a.jsx)(mB,{})}),(0,a.jsx)(L,{path:"cases",element:(0,a.jsx)(qw,{children:(0,a.jsx)(eB,{})})}),(0,a.jsx)(L,{path:"cases/:caseIdentifier",element:(0,a.jsx)(qw,{children:(0,a.jsx)(tB,{})})}),(0,a.jsx)(L,{path:"pixels-office",element:(0,a.jsx)(i6,{children:(0,a.jsx)(yB,{})})}),(0,a.jsx)(L,{path:"status",element:(0,a.jsx)(Fw,{children:(0,a.jsx)(Yw,{})})}),(0,a.jsx)(L,{path:"status/:cardId",element:(0,a.jsx)(Fw,{children:(0,a.jsx)(Yw,{})})}),(0,a.jsx)(L,{path:"status-cards",element:(0,a.jsx)(mk,{})}),(0,a.jsx)(L,{path:"status-cards/:cardId",element:(0,a.jsx)(mk,{})}),(0,a.jsx)(L,{path:"review-queue",element:(0,a.jsx)(nr,{children:(0,a.jsx)(bB,{})})}),(0,a.jsx)(L,{path:"learnings",element:(0,a.jsx)(nr,{children:(0,a.jsx)(hB,{})})}),(0,a.jsx)(L,{path:"pipelines",element:(0,a.jsx)(nr,{children:(0,a.jsx)($h,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId",element:(0,a.jsx)(nr,{children:(0,a.jsx)($h,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/add",element:(0,a.jsx)(nr,{children:(0,a.jsx)($h,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/settings",element:(0,a.jsx)(nr,{children:(0,a.jsx)(vB,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/items/:caseId",element:(0,a.jsx)(nr,{children:(0,a.jsx)(gB,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/cases/:caseId",element:(0,a.jsx)(nr,{children:(0,a.jsx)(xB,{})})}),(0,a.jsx)(L,{path:"routines/:routineId",element:(0,a.jsx)(Xw,{})}),(0,a.jsx)(L,{path:"routines/:routineId/:section",element:(0,a.jsx)(Xw,{})}),(0,a.jsx)(L,{element:(0,a.jsx)(Ih,{}),children:(0,a.jsxs)(L,{element:(0,a.jsx)(r6,{}),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)(wB,{})}),(0,a.jsx)(L,{path:"goals/:goalId",element:(0,a.jsx)(kB,{})}),(0,a.jsx)(L,{path:"artifacts",element:(0,a.jsx)(Zw,{})}),(0,a.jsx)(L,{path:"approvals",element:(0,a.jsx)(We,{to:"/approvals/pending",replace:!0})}),(0,a.jsx)(L,{path:"approvals/pending",element:(0,a.jsx)(Jw,{})}),(0,a.jsx)(L,{path:"approvals/all",element:(0,a.jsx)(Jw,{})}),(0,a.jsx)(L,{path:"approvals/:approvalId",element:(0,a.jsx)(SB,{})}),(0,a.jsx)(L,{path:"activity",element:(0,a.jsx)(NB,{})}),(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)(Gs,{to:"/activity",forceAgentMode:!0})}),(0,a.jsx)(L,{path:"audit/activity",element:(0,a.jsx)(Gs,{to:"/activity"})}),(0,a.jsx)(L,{path:"audit/runs",element:(0,a.jsx)(Gs,{to:"/activity/runs"})}),(0,a.jsx)(L,{path:"audit/costs",element:(0,a.jsx)(Gs,{to:"/activity/costs"})}),(0,a.jsx)(L,{path:"audit/budgets",element:(0,a.jsx)(Gs,{to:"/activity/budgets"})}),(0,a.jsx)(L,{path:"audit/timeline",element:(0,a.jsx)(Gs,{to:"/activity/timeline"})}),(0,a.jsx)(L,{path:"runs",element:(0,a.jsx)(Gs,{to:"/activity/runs"})}),(0,a.jsx)(L,{path:"costs",element:(0,a.jsx)(Gs,{to:"/activity/costs"})}),(0,a.jsx)(L,{path:"budgets",element:(0,a.jsx)(Gs,{to:"/activity/budgets"})}),(0,a.jsxs)(L,{element:(0,a.jsx)(s6,{}),children:[(0,a.jsx)(L,{path:"board-chat",element:(0,a.jsx)(_B,{})}),(0,a.jsx)(L,{path:"artifacts",element:(0,a.jsx)(Zw,{})})]}),null,(0,a.jsx)(L,{path:"decisions",element:(0,a.jsx)(CB,{})}),(0,a.jsx)(L,{path:"decisions/queues/:key",element:(0,a.jsx)(AB,{})}),t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"inbox",element:(0,a.jsx)(dk,{})}),(0,a.jsx)(L,{path:"inbox/mine",element:(0,a.jsx)(xs,{view:"mine"})}),(0,a.jsx)(L,{path:"inbox/recent",element:(0,a.jsx)(xs,{view:"recent"})}),(0,a.jsx)(L,{path:"inbox/unread",element:(0,a.jsx)(xs,{view:"unread"})}),(0,a.jsx)(L,{path:"inbox/blocked",element:(0,a.jsx)(xs,{view:"blocked"})}),(0,a.jsx)(L,{path:"inbox/all",element:(0,a.jsx)(xs,{view:"everything"})}),(0,a.jsx)(L,{path:"inbox/new",element:(0,a.jsx)(xs,{view:"mine"})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"inbox",element:(0,a.jsx)(dk,{})}),(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)(We,{to:"/inbox/mine",replace:!0})})]}),(0,a.jsx)(L,{path:"inbox/requests",element:(0,a.jsx)(dK,{})}),(0,a.jsx)(L,{path:"u/:userSlug",element:(0,a.jsx)(jB,{})}),(0,a.jsx)(L,{path:"design-guide",element:(0,a.jsx)(WB,{})}),(0,a.jsx)(L,{path:"instance/settings/adapters",element:(0,a.jsx)(rk,{})}),(0,a.jsx)(L,{path:":pluginRoutePath/*",element:(0,a.jsx)(lk,{})}),(0,a.jsx)(L,{path:"*",element:(0,a.jsx)(MA,{scope:"board"})})]})}r(hK,"boardRoutes");function uk({credentialSource:e="wardmote_vault"}={}){const t=hn(),s=new URLSearchParams(t.search),{enabled:l,githubEnabled:c}=w0();return qT(s,{chatConnectorsEnabled:l,githubReviewBotsEnabled:c})?(0,a.jsx)(RA,{credentialSource:e}):(0,a.jsx)(We,{to:"/apps",replace:!0})}r(uk,"AppsConnectEntryRoute");function dk(){const{enabled:e}=Zf();return e?(0,a.jsx)(xs,{view:gI(Rj())}):(0,a.jsx)(We,{to:`/inbox/${Rj()}`,replace:!0})}r(dk,"InboxRootRedirect");function xs({view:e}){const t=hn(),s=new URLSearchParams(t.search);return s.set(uI,e),(0,a.jsx)(We,{to:`/issues?${s.toString()}${t.hash}`,replace:!0})}r(xs,"TaskViewRedirect");function DA(){const e=hn(),{companies:t,selectedCompany:s,loading:l}=vt(),{companyPrefix:c,skillId:u}=zs();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)(We,{to:"/skills/studio",replace:!0}):(0,a.jsx)(We,{to:`/${p.issuePrefix}/skills/studio/${encodeURIComponent(u)}${e.search}${e.hash}`,replace:!0})}r(DA,"LegacySkillStudioRedirect");function qr(){const e=hn(),{companies:t,selectedCompany:s,loading:l}=vt(),{companyPrefix:c}=zs(),{hidden:u}=hr();if(l)return(0,a.jsx)(Ms,{});const p=(c?t.find(h=>h.issuePrefix.toUpperCase()===c.toUpperCase()):null)??s??t[0]??null;if(!p)return mx({pathname:e.pathname,hasCompanies:!1})?(0,a.jsx)(We,{to:"/onboarding",replace:!0}):(0,a.jsx)(xx,{});const f=rT(lT(`${e.pathname}${e.search}${e.hash}`),u);return(0,a.jsx)(We,{to:`/${p.issuePrefix}${f}`,replace:!0})}r(qr,"LegacySettingsRedirect");function fk(){const{tab:e}=zs();return(0,a.jsx)(We,{to:OA(e),replace:!0})}r(fk,"LegacyToolsSettingsRedirect");function pk(){const{tab:e}=zs();return(0,a.jsx)(We,{to:OA(e),replace:!0})}r(pk,"LegacyToolsRedirect");function OA(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(OA,"legacyToolsRedirectTarget");function LA(){const{companies:e}=vt(),{openOnboarding:t}=$s(),{t:s}=IN(),{onboardingOpen:l,onboardingRouteDismissed:c}=qf(),{companyPrefix:u}=zs(),p=u?e.find(g=>g.issuePrefix.toUpperCase()===u.toUpperCase())??null:null;if(lU({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:gA(),companyId:p.id}):t(),"onClick"),children:p?"Add Agent":"Start Onboarding"})})]})})}r(LA,"OnboardingRoutePage");function gK(){const{companies:e,selectedCompany:t,loading:s}=vt(),l=hn();if(s)return(0,a.jsx)(Ms,{});const c=t??e[0]??null;return c?(0,a.jsx)(We,{to:`/${c.issuePrefix}/dashboard`,replace:!0}):mx({pathname:l.pathname,hasCompanies:!1})?(0,a.jsx)(We,{to:"/onboarding",replace:!0}):(0,a.jsx)(xx,{})}r(gK,"CompanyRootRedirect");function mk(){const{cardId:e}=zs(),t=hI(),s=t?`/${t}`:"";return(0,a.jsx)(We,{to:`${s}/status${e?`/${e}`:""}`,replace:!0})}r(mk,"StatusCardsLegacyRedirect");function Gs({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)(We,{to:`${e}${c?`?${c}`:""}${s.hash}`,replace:!0})}r(Gs,"AuditCompatibilityRedirect");function Ze(){const e=hn(),{companies:t,selectedCompany:s,loading:l}=vt();if(l)return(0,a.jsx)(Ms,{});const c=s??t[0]??null;return c?(0,a.jsx)(We,{to:`/${c.issuePrefix}${e.pathname}${e.search}${e.hash}`,replace:!0}):mx({pathname:e.pathname,hasCompanies:!1})?(0,a.jsx)(We,{to:"/onboarding",replace:!0}):(0,a.jsx)(xx,{})}r(Ze,"UnprefixedBoardRedirect");function xx(){const{openOnboarding:e}=$s(),{t}=IN();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(xx,"NoCompaniesStartPage");function xK(){const{enabled:e}=Zf();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ms,{}),children:(0,a.jsxs)(OE,{children:[(0,a.jsx)(L,{path:"auth",element:(0,a.jsx)(sK,{})}),(0,a.jsx)(L,{path:"board-claim/:token",element:(0,a.jsx)(iK,{})}),(0,a.jsx)(L,{path:"mcp-connect/:id",element:(0,a.jsx)(ok,{})}),(0,a.jsx)(L,{path:"dot-connect/:id",element:(0,a.jsx)(ok,{agentPairingOnly:!0})}),(0,a.jsx)(L,{path:"mcp-device",element:(0,a.jsx)(lK,{})}),(0,a.jsx)(L,{path:"assistant-connections",element:(0,a.jsx)(oK,{})}),(0,a.jsx)(L,{path:"cli-auth/:id",element:(0,a.jsx)(cK,{})}),(0,a.jsx)(L,{path:"invite/:token",element:(0,a.jsx)(uK,{})}),(0,a.jsx)(L,{path:"s/:token",element:(0,a.jsx)(ck,{})}),(0,a.jsx)(L,{path:"s/:token/issues/:issueId",element:(0,a.jsx)(ck,{})}),(0,a.jsx)(L,{element:(0,a.jsx)(Gw,{allowMembershipRequest:!0}),children:(0,a.jsx)(L,{path:"chat-identity/confirm",element:(0,a.jsx)(UB,{})})}),(0,a.jsx)(L,{path:"tests/perf/long-thread",element:(0,a.jsx)(pB,{})}),(0,a.jsx)(L,{path:"ux-lab/bootstrap-setup",element:(0,a.jsx)(TB,{})}),(0,a.jsx)(L,{path:"ux-lab/responsible-user-denial",element:(0,a.jsx)(RB,{})}),(0,a.jsx)(L,{path:"ux-lab/cross-issue-collaboration",element:(0,a.jsx)(MB,{})}),(0,a.jsxs)(L,{element:(0,a.jsx)(Gw,{}),children:[(0,a.jsx)(L,{index:!0,element:(0,a.jsx)(gK,{})}),(0,a.jsx)(L,{path:"onboarding",element:(0,a.jsx)(LA,{})}),(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)(Ze,{})}),(0,a.jsx)(L,{path:"dashboard",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"inbox/*",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"issues",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"tasks",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"tasks/new",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"issues/:issueId",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"routines",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"routines/:routineId",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"review-queue",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"learnings",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"cases",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"cases/:caseIdentifier",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"pixels-office",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"status",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"status/:cardId",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"status-cards",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"status-cards/:cardId",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"pipelines",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/add",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/settings",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/items/:caseId",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/cases/:caseId",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"artifacts",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"audit",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"audit/*",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"activity",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"activity/*",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"runs",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"costs",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"budgets",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"decisions",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"u/:userSlug",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"skills/studio",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"skills/studio/new",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"skills/studio/:skillId",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"skills/:skillId/studio",element:(0,a.jsx)(DA,{})}),(0,a.jsx)(L,{path:"skills/*",element:(0,a.jsx)(Ze,{})}),(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)(Ze,{})}),TA.map(t=>(0,a.jsx)(L,{path:`agents/${t}`,element:(0,a.jsx)(Ze,{})},t)),(0,a.jsx)(L,{path:"agents/new",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"agents/:agentId",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"agents/:agentId/:tab",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"agents/:agentId/runs/:runId",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"projects",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"projects/:projectId",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"projects/:projectId/overview",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"projects/:projectId/issues",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"projects/:projectId/issues/:filter",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"projects/:projectId/workspaces",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"projects/:projectId/workspaces/:workspaceId",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"projects/:projectId/configuration",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"workspaces",element:(0,a.jsx)(Ze,{})}),(0,a.jsx)(L,{path:"terminal",element:(0,a.jsx)(Ze,{})}),(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)(t6,{}),children:hK(e)}),(0,a.jsx)(L,{path:"*",element:(0,a.jsx)(MA,{scope:"global"})})]})]})}),(0,a.jsx)(F6,{}),(0,a.jsx)(x8,{})]})}r(xK,"App");var bK=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){wA(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 vK(){const{data:e}=me({queryKey:P.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),t=e?.sentryDsn,s=e?.sentryEnvironment??void 0;return(0,x.useEffect)(()=>{if(t)return FU(t,s),()=>{HU()}},[t,s]),null}r(vK,"SentryGate");function yK(){let e;return{promise:new Promise(t=>{e=t}),resolve:e}}r(yK,"createDeferred");function jK(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(wK(h),h),c===null&&(c=yK()),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(jK,"createInvalidationBatcher");var hk=0;function wK(e){if(typeof e.predicate=="function")return`__predicate__:${hk+=1}`;try{return JSON.stringify([e.queryKey??null,e.refetchType??null,e.exact??null,e.type??null])}catch{return`__nonserializable__:${hk+=1}`}}r(wK,"serializeFilters");function kK(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(kK,"createCoalescingQueryClient");function SK(e,t){if(!e)return e;const s=e.filter(l=>l.id!==t);return s.length===e.length?e:s}r(SK,"removeRunFromList");function NK(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(NK,"patchRunStatusInList");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,"removeLiveRunById");function AK(e,t){return!e||e.executionRunId!==t?e:{...e,executionRunId:null,executionAgentNameKey:null,executionLockedAt:null}}r(AK,"clearIssueExecutionRun");var _K=3e4,EK=["status","priority","title","assigneeAgentId","assigneeUserId","projectId","parentId"],IK=new Set(["issue.read_marked","issue.read_unmarked","issue.inbox_archived","issue.inbox_unarchived"]);function Yg(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}r(Yg,"isRecord");function bx(e){return Yg(e)&&Array.isArray(e.pages)}r(bx,"isInfiniteIssueData");function TK(e){return Array.isArray(e)?e.length:bx(e)?e.pages.reduce((t,s)=>t+(Array.isArray(s)?s.length:0),0):0}r(TK,"issueListRowCount");function RK(e){const t=e.state.data;return bx(t)||TK(t)>=100}r(RK,"isLargeIssueListQuery");function MK(e,t,s){const l={},c=Yg(t?.changes)?t.changes:null;if(e==="issue.updated"&&c)for(const u of EK){const p=c[u];!Yg(p)||p.updated===!0||!("to"in p)||(l[u]=p.to)}return s&&e&&!IK.has(e)&&!Number.isNaN(Date.parse(s))&&(l.lastActivityAt=s),l}r(MK,"readIssueListPatchFromActivity");function DK(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(DK,"patchIssueRow");function gk(e,t,s){const l=e.findIndex(p=>p?.id===t);if(l<0)return e;const c=DK(e[l],s);if(c===e[l])return e;const u=e.slice();return u[l]=c,u}r(gk,"patchIssueRows");function OK(e,t,s){if(Array.isArray(e))return gk(e,t,s);if(!bx(e))return e;let l=!1;const c=e.pages.map(u=>{if(!Array.isArray(u))return u;const p=gk(u,t,s);return p!==u&&(l=!0),p});return l?{...e,pages:c}:e}r(OK,"patchIssueListData");function LK(e,t,s,l){if(Object.keys(l).length===0)return 0;let c=0;for(const[u,p]of e.getQueriesData({queryKey:P.issues.list(t)})){const f=OK(p,s,l);f!==p&&(e.setQueryData(u,f),c+=1)}return c}r(LK,"patchIssueInListCaches");function zK(e,t){for(const s of e.getQueryCache().findAll({queryKey:P.issues.list(t)}))e.invalidateQueries({queryKey:s.queryKey,exact:!0,...RK(s)?{refetchType:"none"}:{}})}r(zK,"invalidateIssueListsForActivity");function PK(e,t){const s=r(l=>l.state.isInvalidated,"predicate");return Promise.all([e.refetchQueries({queryKey:P.issues.list(t),type:"active",predicate:s}),e.refetchQueries({queryKey:P.heartbeats(t),type:"active",predicate:s})])}r(PK,"refreshInvalidatedLiveLists");function ao(e){return typeof e=="string"&&e.length>0?e:null}r(ao,"readString$1");function $K(e){return e.length===3&&e[0]==="issues"&&e[2]==="agent-todo"}r($K,"isAgentTodoQueryKey");function UK(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=vE(t.payload);return p?{...p,runId:s,agentId:l,issueId:c,seq:u,createdAt:ao(t.lastEventAt)??e.createdAt,runStatus:"running"}:null}r(UK,"readAgentTodoSnapshotFromLiveEvent");function xk(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=>$K(p.queryKey),"predicate")},p=>p&&p.runId===c&&p.runStatus!==u?{...p,runStatus:u}:p);return}const s=UK(t);s&&e.setQueryData(P.issues.agentTodo(s.issueId),l=>l&&l.runId===s.runId&&l.seq>=s.seq?l:s)}r(xk,"applyAgentTodoLiveEvent");function BK(e){const t=e.trim().toLowerCase();return t==="0.0.0.0"||t==="::"||t==="[::]"}r(BK,"isWildcardHost");function KK(e=window.location){return BK(e.hostname)?e.port?`localhost:${e.port}`:"localhost":e.host}r(KK,"browserReachableHost");function qK(e,t=window.location){const s=t.protocol==="https:"?"wss":"ws",l=e.startsWith("/")?e:`/${e}`;return`${s}://${KK(t)}${l}`}r(qK,"buildSameOriginWebSocketUrl");function FK(e){try{return new WebSocket(e)}catch{return null}}r(FK,"tryCreateWebSocket");var HK="/pwa-192x192.png",VK="/pwa-monochrome-512x512.png";function vx(){return typeof window<"u"&&"Notification"in window}r(vx,"notificationsSupported");function yx(){return vx()?Notification.permission:"unsupported"}r(yx,"notificationPermission");async function WK(){return vx()?Notification.permission!=="default"?Notification.permission:Notification.requestPermission():"unsupported"}r(WK,"requestNotificationPermission");function QK(){return typeof navigator<"u"&&"serviceWorker"in navigator&&typeof window<"u"&&"PushManager"in window}r(QK,"pushSupported");function AY(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(AY,"isIosWithoutHomeScreenInstall");async function zA(){if(typeof navigator>"u"||!("serviceWorker"in navigator))return null;try{return await navigator.serviceWorker.getRegistration()??null}catch{return null}}r(zA,"getServiceWorkerRegistration");var PA="wardmote.notifications.seen.v1",GK="wardmote.notifications.claim",YK=6e5,XK=200,ZK=new Map;function JK(){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:ZK}}r(JK,"defaultEnv");function eq(e){const t=e.storage?.getItem(PA);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(eq,"readSeen");function Kh(e,t){const s=t.now(),l=eq(t);for(const[u,p]of l)s-p>YK&&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,XK);t.memory.clear();for(const[u,p]of c)t.memory.set(u,p);return tq(t,c),!0}r(Kh,"claimInsideLock");function tq(e,t){try{e.storage?.setItem(PA,JSON.stringify(Object.fromEntries(t)))}catch{return}}r(tq,"writeSeen");async function nq(e,t=JK()){if(!t.locks)return Kh(e,t);try{return await t.locks.request(GK,()=>Kh(e,t))}catch{return Kh(e,t)}}r(nq,"claimNotificationKey");var aq="wardmote-notifications",bf="custom-sounds";function sq(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(sq,"validateCustomSoundFile");function $A(e){return new Promise((t,s)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>s(e.error)})}r($A,"requestResult");var _d=null;function iq(){if(typeof indexedDB>"u")return Promise.reject(new Error("IndexedDB is unavailable."));if(!_d){const e=indexedDB.open(aq,1);e.onupgradeneeded=()=>{e.result.objectStoreNames.contains(bf)||e.result.createObjectStore(bf,{keyPath:"kind"})},_d=$A(e).catch(t=>{throw _d=null,t})}return _d}r(iq,"openDb");async function jx(e,t){return $A(t((await iq()).transaction(bf,e).objectStore(bf)))}r(jx,"withStore");var Xg=new Set;function rq(e){return Xg.add(e),()=>Xg.delete(e)}r(rq,"subscribeCustomSounds");function UA(){for(const e of Xg)e()}r(UA,"notifyCustomSoundsChanged");async function _Y(e,t){const s=sq(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 jx("readwrite",c=>c.put(l)),UA(),l}r(_Y,"saveCustomSound");async function lq(e){try{return await jx("readonly",t=>t.get(e))??null}catch{return null}}r(lq,"loadCustomSound");async function EY(e){await jx("readwrite",t=>t.delete(e)),UA()}r(EY,"removeCustomSound");var oq=[{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"}],IY="custom",TY="none",Zg={approval:"confirmation",question:"question",comment:"pluck",assignment:"maximize",review:"glass",run_failed:"error",join_request:"bong",disk_space:"drop"},RY={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"},BA=new Set(oq.map(e=>e.id));function cq(e){return typeof e=="string"&&(BA.has(e)||e==="custom"||e==="none")}r(cq,"isKnownSoundId");function uq(e){return BA.has(e)}r(uq,"isLibrarySoundId");function bk(e,t){return`/sounds/${e}.${t}`}r(bk,"librarySoundUrl");var Jg=new Map,vf=new Map,vk=!1,Ed=null;function KA(){return typeof Audio<"u"}r(KA,"audioSupported");function yk(){return Ed||(Ed=new Audio().canPlayType('audio/ogg; codecs="vorbis"')?"ogg":"mp3",Ed)}r(yk,"libraryFormat");function qA(e){let t=Jg.get(e);return t||(t=new Audio,t.preload="auto",t.src=e,Jg.set(e,t)),t}r(qA,"audioFor");function dq(){for(const e of vf.values())e.then(t=>{t&&(Jg.delete(t),URL.revokeObjectURL(t))});vf.clear()}r(dq,"revokeCustomSounds");function fq(e){vk||(vk=!0,rq(dq));let t=vf.get(e);return t||(t=lq(e).then(s=>s?URL.createObjectURL(s.blob):null),vf.set(e,t)),t}r(fq,"customSoundUrl");async function FA(e,t){if(t==="none")return null;if(t==="custom"){const s=await fq(e);return s||bk(Zg[e],yk())}return bk(uq(t)?t:Zg[e],yk())}r(FA,"resolveSoundUrl");async function pq(e,t,s){if(!KA())return!1;const l=await FA(e,t);if(!l)return!1;const c=qA(l);c.volume=Math.min(1,Math.max(0,s)),c.currentTime=0;try{return await c.play(),!0}catch{return!1}}r(pq,"playSound");function mq(e,t){return pq(e,t.kinds[e].soundId,t.volume)}r(mq,"playKindSound");function jk(e){if(!(!KA()||!e.enabled))for(const[t,s]of Object.entries(e.kinds))s.enabled&&FA(t,s.soundId).then(l=>{l&&qA(l)})}r(jk,"preloadNotificationSounds");var e0={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")},HA="wardmote.notifications.v1",hq=.6;function t0(){const e={};for(const t of g0)e[t]={enabled:!0,soundId:Zg[t]};return{enabled:!0,volume:hq,pushEnabled:!0,kinds:e}}r(t0,"defaultNotificationSettings");function qh(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}r(qh,"asRecord");function VA(e){const t=t0(),s=qh(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=qh(s.kinds)??{},u={...t.kinds};for(const p of g0){const f=qh(c[p]);f&&(u[p]={enabled:typeof f.enabled=="boolean"?f.enabled:t.kinds[p].enabled,soundId:cq(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(VA,"normalizeNotificationSettings");function yf(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}r(yf,"storage");function gq(){const e=yf()?.getItem(HA);if(!e)return t0();try{return VA(JSON.parse(e))}catch{return t0()}}r(gq,"readStored");var jf,mc=null,Ud=new Set,Id=!1;function Zr(){const e=yf()?.getItem("wardmote.notifications.v1")??null;return mc&&e===jf||(jf=e,mc=gq()),mc}r(Zr,"getNotificationSettings");function WA(){for(const e of Ud)e()}r(WA,"notify");function QA(e){const t=VA(typeof e=="function"?e(Zr()):e);try{yf()?.setItem(HA,JSON.stringify(t))}catch{jf=void 0}return mc=t,jf=yf()?.getItem("wardmote.notifications.v1")??null,WA(),t}r(QA,"setNotificationSettings");function MY(e,t){return QA(s=>({...s,kinds:{...s.kinds,[e]:{...s.kinds[e],...t}}}))}r(MY,"updateKindSettings");function xq(e){return e.enabled?g0.filter(t=>e.kinds[t].enabled):[]}r(xq,"enabledNotificationKinds");function wk(e){e.key!==null&&e.key!=="wardmote.notifications.v1"||WA()}r(wk,"onStorage");function GA(e){return Ud.add(e),!Id&&typeof window<"u"&&(Id=!0,window.addEventListener("storage",wk)),()=>{Ud.delete(e),Ud.size===0&&Id&&typeof window<"u"&&(Id=!1,window.removeEventListener("storage",wk))}}r(GA,"subscribeNotificationSettings");function DY(){return(0,x.useSyncExternalStore)(GA,Zr,Zr)}r(DY,"useNotificationSettings");var kc={status:"unknown",error:null},n0=new Set,a0=null,kk=Promise.resolve();function Sk(e){if(!(e.status===kc.status&&e.error===kc.error)){kc=e;for(const t of n0)t()}}r(Sk,"setPushState");function Nk(){return kc}r(Nk,"getPushState");function bq(){return kc.status==="active"}r(bq,"hasActivePushSubscription");function vq(e){return n0.add(e),()=>n0.delete(e)}r(vq,"subscribePushState");function OY(){return(0,x.useSyncExternalStore)(vq,Nk,Nk)}r(OY,"usePushState");function YA(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(YA,"urlBase64ToUint8Array");function yq(e,t){const s=e.options?.applicationServerKey;if(!s)return!0;const l=YA(t),c=new Uint8Array(s);return c.length===l.length&&c.every((u,p)=>u===l[p])}r(yq,"sameApplicationServerKey");async function Ck(e){await e0.deleteWebPushSubscription({endpoint:e.endpoint}).catch(()=>{}),await e.unsubscribe().catch(()=>!1),a0=null}r(Ck,"forgetSubscription");async function jq(e,t){if(!QK())return{status:"unsupported",error:null};const s=await zA();if(!s)return{status:"unsupported",error:null};let l=await s.pushManager.getSubscription();if(!(e.enabled&&e.pushEnabled))return l&&await Ck(l),{status:"off",error:null};if(yx()!=="granted")return{status:"permission",error:null};const c=await e0.getWebPushConfig();if(!c.enabled||!c.publicKey)return{status:"server-disabled",error:null};l&&!yq(l,c.publicKey)&&(await Ck(l),l=null),l||(l=await s.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:YA(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=xq(e),g=[t,l.endpoint,...h].join("|");return g!==a0&&(await e0.upsertWebPushSubscription({endpoint:l.endpoint,keys:{p256dh:p,auth:f},kinds:h}),a0=g),{status:"active",error:null}}r(jq,"reconcile");function s0(e,t){const s=kk.then(async()=>{try{const l=await jq(e,t);return Sk(l),l}catch(l){const c={status:"error",error:l instanceof Error?l.message:"Push subscription failed."};return Sk(c),c}});return kk=s.catch(()=>{}),s}r(s0,"syncPushSubscription");function XA(e,t){return t.enabled&&t.kinds[e.kind]?.enabled===!0}r(XA,"kindEnabled");function wq(e){const{payload:t,userId:s,settings:l}=e;return!s||!t.recipientUserIds.includes(s)||!XA(t.notification,l)?"none":e.visible?"sound":e.pushActive?"none":"os"}r(wq,"decideLiveNotification");function kq(e){return!e.visible||!XA(e.notification,e.settings)?"none":"sound"}r(kq,"decideServiceWorkerNotification");async function Sq(e){if(yx()!=="granted")return;const t={body:e.body,tag:e.key,data:{url:e.url},icon:HK,badge:VK},s=await zA();if(s){await s.showNotification(e.title,t);return}new Notification(e.title,t)}r(Sq,"showOsNotification");var ZA={claim:r(e=>nq(e),"claim"),playSound:r((e,t)=>mq(e.kind,t),"playSound"),showOsNotification:Sq};async function JA(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(JA,"perform");function Nq(e,t,s=ZA,l={}){const c=l.settings??Zr();return JA(wq({payload:e,userId:t,settings:c,visible:l.visible??Kc().visible,pushActive:l.pushActive??bq()}),e.notification,c,s)}r(Nq,"deliverLiveNotification");function Cq(e,t=ZA,s={}){const l=s.settings??Zr();return JA(kq({notification:e,settings:l,visible:s.visible??Kc().visible}),e,l,t)}r(Cq,"deliverServiceWorkerNotification");function e2(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(e2,"readNotification");function Aq(e){if(!e||typeof e!="object")return null;const t=e,s=e2(t.notification);return!s||!Array.isArray(t.recipientUserIds)?null:{notification:s,recipientUserIds:t.recipientUserIds.filter(l=>typeof l=="string")}}r(Aq,"readNotificationCreatedPayload");function _q(e){if(!e||typeof e!="object")return null;const t=e;if(t.type==="wardmote.notification"){const s=e2(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(_q,"readServiceWorkerMessage");var Eq=1e4,Iq=3,Tq=2e3,Rq=3e5,Mq=2e3,Dq=15e3,Oq=0,Lq=1,Uc=new Set(["succeeded","interrupted","failed","cancelled","timed_out"]),t2=(0,x.createContext)(null);function zq(e,t,s){if(s.companyId===t)for(const l of Array.from(e))try{l(s)}catch{}}r(zq,"dispatchLiveEventToSubscribers");function LY(e){const t=(0,x.useContext)(t2),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(LY,"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 wf(e){return e.slice(0,8)}r(wf,"shortId");function n2(e,t,s){const l=e.getQueryData(P.agents.list(t))?.find(c=>c.id===s);return l?.name?l.name:e.getQueryData(P.agents.detail(s))?.name??null}r(n2,"resolveAgentName");function Pq(e,t,s){const l=e.getQueryData(P.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(Pq,"resolveUserName");function Fr(e,t){return e.length<=t?e:e.slice(0,t-1)+"…"}r(Fr,"truncate");function $q(e,t,s,l){return s==="agent"&&l?n2(e,t,l)??`Agent ${wf(l)}`:s==="system"?"System":s==="user"&&l?Pq(e,t,l)??(l==="board"||l==="local-board"?"Board":`User ${wf(l)}`):s==="plugin"?"Plugin":"Unknown actor"}r($q,"resolveActorLabel");function wx(e,t,s,l){const c=new Set([s]),u=e.getQueryData(P.issues.detail(s)),p=e.getQueryData(P.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(wx,"resolveIssueQueryRefs");function Uq(e,t,s,l){const c=wx(e,t,s,l),u=c.map(v=>e.getQueryData(P.issues.detail(v))).find(v=>!!v),p=e.getQueryData(P.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 ${wf(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(Uq,"resolveIssueToastContext");function a2(){return!(typeof document>"u"||document.visibilityState!=="visible"||typeof document.hasFocus=="function"&&!document.hasFocus())}r(a2,"isPageForegrounded");function gr(e,t,s){if(!(s?.isForegrounded??a2()))return null;const l=If(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(P.auth.session),k=j?.user?.id??j?.session?.userId??null,S=h1(t),N=e.getQueryData(P.companies.list(k))?.companies.find(M=>M.issuePrefix.toUpperCase()===S?.toUpperCase());if(!N)return null;const I=e.getQueryData(P.agents.list(N.id))?.find(M=>M.id===c||dr(M)===c);if(!I)return null;const C=e.getQueryData(P.agentChats.detail(N.id,k,I.id));if(!C)return null;c=C.id}const u=e.getQueryData(P.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(P.issues.activeRun(j)),N=e.getQueryData(P.issues.liveRuns(j))??[],I=e.getQueryData(P.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(P.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(P.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(gr,"resolveVisibleIssueRouteContext");function np(e,t){const s=new Set([e]),l=be(t?.identifier)??be(t?.issueIdentifier);return l&&s.add(l),s}r(np,"buildIssueRefsForPayload");function ap(e,t){for(const s of e)if(t.has(s))return!0;return!1}r(ap,"overlaps");function Bq(e,t,s,l){const c=be(s.entityType),u=be(s.entityId);if(c!=="issue"||!u)return!1;const p=gr(e,t,l);return p?ap(p.subtreeIssueRefs,np(u,al(s.details))):!1}r(Bq,"shouldSuppressActivityToastForVisibleIssue");function Kq(e,t,s,l){if(!(l?.isForegrounded??a2()))return!1;const c=If(t).match(/^\/agents\/[^/]+\/runs\/([^/]+)/)?.[1];if(c&&decodeURIComponent(c)===be(s.runId))return!0;const u=gr(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(Kq,"shouldSuppressRunStatusToastForVisibleIssue");function Ak(e,t,s,l){const c=gr(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:P.issues.comments(v)}),e.setQueryData(P.issues.liveRuns(v),y=>CK(y,u)),e.setQueryData(P.issues.activeRun(v),y=>y?.id===u?null:y),e.setQueryData(P.issues.detail(v),y=>AK(y,u));const h=!!f&&Uc.has(f),g=!h&&(l?.liveStatusAlreadyPatched??!1);for(const v of c.issueRefs)e.invalidateQueries({queryKey:P.issues.detail(v)}),e.invalidateQueries({queryKey:P.issues.activity(v)}),e.invalidateQueries({queryKey:P.issues.runs(v)}),l?.runLifecycleEvent&&e.invalidateQueries({queryKey:P.issues.queuedComments(v)}),g||(e.invalidateQueries({queryKey:P.issues.liveRuns(v)}),e.invalidateQueries({queryKey:P.issues.activeRun(v)})),h&&(e.invalidateQueries({queryKey:P.issues.comments(v)}),e.invalidateQueries({queryKey:P.issues.attachments(v)}),e.invalidateQueries({queryKey:P.issues.workProducts(v)}),e.invalidateQueries({queryKey:P.issues.workProductPullRequestRefresh(v)}),e.invalidateQueries({queryKey:["issues","tree-control-state",v]}));return!0}r(Ak,"invalidateVisibleIssueRunQueries");function pc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r(pc,"hasPatchKey");function s2(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(s2,"applyRunLiveStatusPatch");function _k(e,t){if(!e)return e;let s=!1;const l=e.map(c=>c.id!==t.runId?c:(s=!0,s2(c,t)));return s?l:e}r(_k,"applyRunLiveStatusPatchToArray");function qq(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(qq,"readRunLiveStatusPatchFromPayload");var Fq=1e3;function Hq(e=Fq){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(Hq,"createRunLogPatchThrottle");function Vq(e,t,s,l,c){let u=!1;e.setQueryData(P.liveRuns(t),h=>{const g=_k(h,l);return g!==h&&(u=!0),g});const p=new Set;if(l.issueId)for(const h of wx(e,t,l.issueId,null))p.add(h);const f=gr(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(P.issues.activeRun(h),g=>!g||g.id!==l.runId?g:(u=!0,s2(g,l))),e.setQueryData(P.issues.liveRuns(h),g=>{const v=_k(g,l);return v!==g&&(u=!0),v});return u}r(Vq,"applyRunLiveStatusPatchToCaches");function Wq(e,t,s,l){const c=gr(e,t,l);if(!c)return!1;const u=be(s.agentId);return!!u&&(u===c.assigneeAgentId||c.subtreeAgentIds.has(u))}r(Wq,"shouldSuppressAgentStatusToastForVisibleIssue");function Qq(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=gr(e,t,l);return g?ap(g.issueRefs,np(u,h)):!1}r(Qq,"shouldDeferIssueRefetchForVisibleAgentActivity");function i2(e){return{isForegrounded:e?.isForegrounded??Kc().visible}}r(i2,"commentRouteOptions");function r2(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=gr(e,t,i2(l));return h?ap(h.issueRefs,np(u,f)):!1}r(r2,"shouldDeferVisibleIssueCommentActivity");async function Gq(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=gr(e,t,i2(l));if(!h)return!1;const g=be(s.entityId);if(!g||!ap(h.issueRefs,np(g,p)))return!1;try{const v=await on.getComment(h.routeIssueRef,f);for(const y of h.issueRefs)e.setQueryData(P.issues.comments(y),j=>j?{...j,pages:dI(j.pages,v)}:{pages:[[v]],pageParams:[null]});return!0}catch{for(const v of h.issueRefs)e.invalidateQueries({queryKey:P.issues.comments(v)});return!1}}r(Gq,"hydrateVisibleIssueComment");var Yq=new Set(["issue.created","issue.updated","issue.comment_added"]),Ek=new Set(["issue.document_created","issue.document_updated","issue.document_restored","issue.document_deleted"]),Xq=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"]),Zq=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"]),Jq=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"]),e7=new Set(["error"]),t7=new Set(["failed","timed_out","cancelled"]);function n7(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(n7,"describeIssueUpdate");function a7(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||!Yq.has(p))return null;const v=Uq(e,t,u,f),y=be(be(s.actorName)?.trim())??$q(e,t,g,h),j=g==="agent"&&h?e.getQueryData(P.agents.list(t))?.find(K=>K.id===h)??e.getQueryData(P.agents.detail(h)):void 0,k=g==="user"&&h?e.getQueryData(P.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"?TE(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=n7(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(a7,"buildActivityToast");function s7(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(s7,"buildJoinRequestToast");function i7(e,t,s,l){const c=be(e.agentId),u=be(e.status);if(!c||!u||!e7.has(u))return null;const p=u==="error"?"error":"info",f=t(c)??`Agent ${wf(c)}`;return{title:u==="running"?`${f} started`:`${f} errored`,body:s.getQueryData(P.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(i7,"buildAgentStatusToast");function r7(e,t){const s=be(e.runId),l=be(e.agentId),c=be(e.status);if(!s||!l||!c||!t7.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(r7,"buildRunStatusToast");function l7(e,t,s){const l=be(s.runId),c=be(s.status);if(!l||!c)return!1;if(e.setQueryData(P.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(P.liveRuns(t),p=>SK(p,l)),e.getQueryData(P.pausedTasks(t))&&e.invalidateQueries({queryKey:P.pausedTasks(t)}),!0;let u=!1;return e.setQueryData(P.liveRuns(t),p=>{const f=NK(p,l,c);return u=f.present,f.next}),u}r(l7,"applyRunLifecycleToCompanyLiveRuns");function o7(e,t,s){const l=be(s.status);l&&Uc.has(l)&&e.invalidateQueries({queryKey:P.heartbeats(t),refetchType:"none"}),e.invalidateQueries({queryKey:P.agents.list(t)}),e.invalidateQueries({queryKey:P.dashboard(t)}),e.invalidateQueries({queryKey:["costs",t]}),e.invalidateQueries({queryKey:P.sidebarBadges(t)});const c=be(s.agentId);c&&(e.invalidateQueries({queryKey:P.agents.detail(c)}),e.invalidateQueries({queryKey:P.heartbeats(t,c)}));const u=be(s.runId);u&&e.invalidateQueries({queryKey:P.runDetail(u)})}r(o7,"invalidateHeartbeatQueries");function c7(e,t,s){const l=be(s.agentId);l&&e.invalidateQueries({queryKey:P.agents.detail(l)})}r(c7,"invalidateHeartbeatProgressQueries");var u7=new Set(["approval","attention_source","budget_incident","decision","decision_queue","issue_recovery_action","join_request"]),d7=["issue.blockers_","issue.dependency_recovery_","issue.disposition_repair_","issue.execution_recovery_","issue.interaction_","issue.recovery_action_","issue.stalled_review_","issue.thread_interaction_"],f7=new Set(["failed","timed_out"]);function p7(e,t,s){return t?.startsWith("inbox.")||e&&u7.has(e)?!0:e!=="issue"||!t?!1:d7.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(p7,"activityChangesAttention");function Ik(e,t,s,l){return e.getQueriesData({queryKey:P.attention(t)}).some(([,c])=>c?"items"in c?Array.isArray(c.items)&&c.items.some(s):"count"in c&&l(c):!1)}r(Ik,"cachedAttentionIncludes");function i0(e,t){e.invalidateQueries({queryKey:P.attention(t)})}r(i0,"invalidateAttentionQueries");function m7(e,t,s,l,c){e.invalidateQueries({queryKey:P.activity(t)}),e.invalidateQueries({queryKey:P.dashboard(t)}),e.invalidateQueries({queryKey:P.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(p7(u,f,v)&&i0(e,t),u==="decision"&&(e.invalidateQueries({queryKey:["decisions",t]}),p&&e.invalidateQueries({queryKey:P.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:P.resourceMemberships.mine(t)})}if(u==="issue"){const j=P.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:P.pausedTasks(t)})),p&&LK(e,t,p,MK(f,v,c?.occurredAt??null)),zK(e,t),ZI(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&&Qq(e,c.pathname,s,{isForegrounded:c.isForegrounded}),N=!!c?.pathname&&r2(e,c.pathname,s,{isForegrounded:c.isForegrounded}),I=wx(e,t,p,v);for(const C of I){const M=k||S||N?{refetchType:"none"}:void 0;if(e.invalidateQueries({queryKey:P.issues.detail(C),...M}),e.invalidateQueries({queryKey:P.issues.activity(C),...M}),(f==="issue.comment_added"||f==="issue.conversation_session_started")&&e.invalidateQueries({queryKey:P.issues.comments(C),...M}),(f==="issue.comment_added"||f?.startsWith("issue.queued_comment"))&&e.invalidateQueries({queryKey:P.issues.queuedComments(C)}),(f?.startsWith("issue.attachment_")||f?.startsWith("issue.work_product_"))&&(e.invalidateQueries({queryKey:P.issues.attachments(C)}),e.invalidateQueries({queryKey:P.issues.workProducts(C)})),f==="issue.conversation_session_started"&&(e.invalidateQueries({queryKey:["issues","tree-control-state",C]}),e.invalidateQueries({queryKey:P.issues.interactions(C)})),f&&Ek.has(f)){const R=be(v?.key);e.invalidateQueries({queryKey:P.issues.documents(C),...M}),R?(e.invalidateQueries({queryKey:P.issues.document(C,R),...M}),e.invalidateQueries({queryKey:P.issues.documentRevisions(C,R),...M})):(e.invalidateQueries({queryKey:["issues","document",C],...M}),e.invalidateQueries({queryKey:["issues","document-revisions",C],...M}))}if(f&&(Ek.has(f)||Xq.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:P.issues.interactions(C)}),e.invalidateQueries({queryKey:P.tools.actionRequests(t,"pending")}),e.invalidateQueries({queryKey:P.apps.attention(t)}),e.invalidateQueries({queryKey:P.tools.trustRules(t)}))}}return}if(u==="agent"){e.invalidateQueries({queryKey:P.agents.list(t)}),e.invalidateQueries({queryKey:P.org(t)}),p&&(e.invalidateQueries({queryKey:P.agents.detail(p)}),e.invalidateQueries({queryKey:P.heartbeats(t,p)}));return}if(u==="project"){const j=be(s.details?.sourceIssueId);j&&e.invalidateQueries({queryKey:P.issues.activity(j)}),e.invalidateQueries({queryKey:P.projects.all(t)}),p&&e.invalidateQueries({queryKey:P.projects.detail(p)});return}if(u==="company_skill"){const j=be(s.details?.sourceIssueId);j&&e.invalidateQueries({queryKey:P.issues.activity(j)}),p&&e.invalidateQueries({queryKey:P.companySkills.detail(t,p)}),e.invalidateQueries({queryKey:P.companySkills.list(t)});return}if(u==="goal"){e.invalidateQueries({queryKey:P.goals.list(t)}),p&&e.invalidateQueries({queryKey:P.goals.detail(p)});return}if(u==="approval"){e.invalidateQueries({queryKey:P.approvals.list(t)});return}if(u==="join_request"){e.invalidateQueries({queryKey:P.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:P.usageWindowSpend(t)});return}if(u==="routine"||u==="routine_trigger"||u==="routine_run"){if(e.invalidateQueries({queryKey:["routines"]}),u==="routine"&&f&&Zq.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:P.cases.list(t)}),p&&(e.invalidateQueries({queryKey:P.cases.detail(p)}),e.invalidateQueries({queryKey:P.cases.events(p)}),f&&Jq.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:P.summarySlots.detail(t,j,k,S)}),e.invalidateQueries({queryKey:P.summarySlots.revisions(t,j,k,S)}));return}u==="company"&&e.invalidateQueries({queryKey:P.companies.all})}r(m7,"invalidateActivityQueries");function h7(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>Mq&&e.observedRunOutcomes.delete(e.observedRunOutcomes.values().next().value);const f=Date.parse(be(s.finishedAt)??""),h=Date.parse(t.createdAt);return p||h-f>Rq}r(h7,"observeRunOutcome");function g7(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<Eq);return e.cooldownHits.set(t,c),c.length>=Iq}r(g7,"shouldSuppressToast");function x7(e,t){const s=Date.now(),l=e.cooldownHits.get(t)??[];l.push(s),e.cooldownHits.set(t,l)}r(x7,"recordToastHit");function Fh(e,t,s,l){g7(e,s)||t(l)!==null&&x7(e,s)}r(Fh,"gatedPushToast");function b7(e,t,s,l,c,u,p,f){if(l.companyId!==t)return;const h=r(k=>n2(e,t,k),"nameOf"),g=l.payload??{},v=l.type==="heartbeat.run.status"&&(h7(u,l)||Kq(e,s,g)),y=qq(g,l.createdAt,l.type);let j=!1;if(y){const k=r(S=>{j=Vq(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=l7(e,t,g);if(o7(e,t,g),xk(e,l),k||e.invalidateQueries({queryKey:P.liveRuns(t)}),Ak(e,s,g,{runLifecycleEvent:!0}),(l.type==="heartbeat.run.status"&&f7.has(be(g.status)??"")||l.type==="heartbeat.run.queued"&&Ik(e,t,S=>S.sourceKind==="failed_run",S=>(S.countsBySourceKind?.failed_run??0)>0))&&i0(e,t),l.type==="heartbeat.run.status"){const S=r7(g,h);S&&!v&&Fh(u,c,"run-status",S)}return}if(l.type==="heartbeat.run.progress"){c7(e,t,g),Ak(e,s,g,{liveStatusAlreadyPatched:j});return}if(l.type==="heartbeat.run.event"){xk(e,l);return}if(l.type==="agent.status"){e.invalidateQueries({queryKey:P.agents.list(t)}),e.invalidateQueries({queryKey:P.dashboard(t)}),e.invalidateQueries({queryKey:P.org(t)});const k=be(g.agentId);k&&e.invalidateQueries({queryKey:P.agents.detail(k)}),(be(g.status)==="error"||k&&Ik(e,t,N=>N.sourceKind==="agent_error_alert"&&N.subject?.id===k,N=>N.errorAgentIds?.includes(k)===!0))&&i0(e,t);const S=i7(g,h,e,t);S&&!Wq(e,s,g)&&Fh(u,c,"agent-status",S);return}if(l.type==="activity.logged"){m7(e,t,g,p,{pathname:s,occurredAt:l.createdAt??null}),r2(e,s,g)&&Gq(e,s,g);const k=be(g.action),S=a7(e,t,g,p)??s7(g);S&&!Bq(e,s,g)&&Fh(u,c,`activity:${k??"unknown"}`,S)}}}r(b7,"handleLiveEvent");function v7(e,t){return e&&e===t?e:null}r(v7,"resolveLiveCompanyId");function Tk(e){e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null}r(Tk,"resetSocketHandlers");function Rk(e,t){if(e){if(e.readyState===Oq){e.onopen=()=>{Tk(e),e.close(1e3,t)},e.onmessage=null,e.onerror=()=>{},e.onclose=null;return}Tk(e),e.readyState===Lq&&e.close(1e3,t)}}r(Rk,"closeSocketQuietly");function y7(e,t,s){return e==="success"&&(t||s==="local_trusted")}r(y7,"canUseLiveSession");function j7({children:e}){const{visible:t}=r1(),s=(0,x.useRef)(!t),{selectedCompanyId:l,selectedCompany:c}=vt(),u=kn(),{pushToast:p}=Ti(),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:P.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),{data:j}=me({queryKey:P.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=v7(l,c?.id??null),I=y7(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)(()=>jK(u),[u]),U=(0,x.useMemo)(()=>kK(u,D),[u,D]),K=(0,x.useMemo)(()=>Hq(),[]);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(()=>{PK(u,N)},_K);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})},Dq))},"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=qK(`/api/companies/${encodeURIComponent(N)}/events/ws`),le=FK(ie);if(!le){ce(),X();return}Q=le,le.onopen=()=>{if(z||Q!==le){Rk(le,"stale_connection");return}ue(),E>0&&(h.current.suppressUntil=Date.now()+Tq),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(b7(U,N,g.current,we,p,h.current,{userId:C.current.userId,agentId:C.current.agentId},K),zq(M.current,N,we),we.type==="notification.created"){const ye=Aq(we.payload);ye&&Nq(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,Rk(ie,"provider_unmount")}},[t,D,K,u,U,N,p,I,S]),(0,a.jsx)(t2.Provider,{value:_,children:e})}r(j7,"LiveUpdatesProvider");function w7(e){let t=Zr();jk(t),s0(t,e.userId);const s=GA(()=>{const u=Zr();u!==t&&(t=u,jk(u),s0(u,e.userId))}),l=typeof navigator<"u"&&"serviceWorker"in navigator?navigator.serviceWorker:null,c=r(u=>{const p=_q(u.data);p&&(p.type==="navigate"?e.navigate(p.url):Cq(p.notification))},"onMessage");return l?.addEventListener("message",c),l?.startMessages(),()=>{s(),l?.removeEventListener("message",c)}}r(w7,"startNotificationRuntime");function k7(){const e=ja(),t=(0,x.useRef)(e),{data:s}=me({queryKey:P.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 w7({userId:l,navigate:r(c=>t.current(c),"navigate")})},[l]),null}r(k7,"NotificationRuntime");var S7=36e5,N7=3e3,C7=2e3,Mk="wardmote.skip-waiting",A7="wardmote.build-id",l2=null,r0=new Set;function _7(e){l2=e;for(const t of r0)t()}r(_7,"publishUpdate");function E7(e){return r0.add(e),()=>{r0.delete(e)}}r(E7,"subscribe");function I7(){return(0,x.useSyncExternalStore)(E7,()=>l2,()=>null)}r(I7,"useServiceWorkerUpdate");function T7(e){return new Promise(t=>{const s=new MessageChannel,l=r(u=>{clearTimeout(c),s.port1.close(),t(u)},"finish"),c=setTimeout(()=>l(null),C7);s.port1.onmessage=u=>{l(typeof u.data?.buildId=="string"?u.data.buildId:null)},e.postMessage({type:A7},[s.port2])})}r(T7,"requestWorkerBuildId");function R7(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??S7,u=e.onUpdateReady??_7;let p=!!t.controller,f=!1,h=!1,g,v=!1;const y=r(async _=>e.pageBuildId?await T7(_)!==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:Mk});return}u(()=>{f=!0,_.postMessage({type:Mk}),g=setTimeout(j,N7)})}},"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(R7,"startServiceWorkerUpdates");var o2="wardmote.notifications.asked-after-decision";function M7(){try{return window.localStorage.getItem(o2)==="1"}catch{return!0}}r(M7,"alreadyAsked");function D7(){try{window.localStorage.setItem(o2,"1")}catch{return}}r(D7,"markAsked");async function O7(e){const t=await WK();if(t!=="granted")return t;const s=QA(l=>({...l,enabled:!0,pushEnabled:!0}));return e&&await s0(s,e),t}r(O7,"enableNotificationsAfterDecision");function L7(){const{pushToast:e}=Ti(),{data:t}=me({queryKey:P.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),s=t?.user?.id??t?.session?.userId??null;(0,x.useEffect)(()=>PE(()=>{M7()||!vx()||yx()!=="default"||(D7(),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(()=>{O7(s)},"onClick")}}))}),[e,s])}r(L7,"useFirstDecisionNotificationPrompt");var z7="wardmote-update-ready";function P7(){const{pushToast:e}=Ti(),t=I7(),s=kn(),l=y0(),c=(0,x.useRef)(l);return(0,x.useEffect)(()=>{t&&e({id:z7,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]),L7(),null}r(P7,"PwaRuntime");var c2={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 $7(e){const t=me({queryKey:P.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),s=t.data?.user?.id??t.data?.session?.userId??"local-board",l=me({queryKey:P.primaryAgent.mine(e??"__none__",s),queryFn:r(()=>c2.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($7,"usePrimaryAgent");function U7({children:e}){const{selectedCompanyId:t}=vt(),s=$7(t),l=kn(),{pushToast:c}=Ti(),u=(0,x.useRef)({companyId:t,userId:s.userId});u.current={companyId:t,userId:s.userId};const p=r(j=>P.primaryAgent.mine(j.companyId,j.userId),"keyFor"),f=r(j=>j.companyId===u.current.companyId&&j.userId===u.current.userId,"isCurrentScope"),h=me({queryKey:P.agents.list(t),queryFn:r(()=>Fa.list(t),"queryFn"),enabled:!!t}),g=Bt({mutationFn:r(j=>c2.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:P.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)(d5,{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(U7,"PrimaryAgentProvider");var Dk="min-h-9",B7={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 zY(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(zY,"buildFileTree");function K7(e){let t=0;for(const s of e)s.kind==="file"?t++:t+=K7(s.children);return t}r(K7,"countFiles");function u2(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 u2(l.children,t))s.add(c)}return s}r(u2,"collectAllPaths");function q7(e){return e.endsWith(".yaml")||e.endsWith(".yml")?U1:B1}r(q7,"fileIcon");function d2(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(...d2(c.children,t,s+1));return l}r(d2,"flattenVisibleNodes");function F7(e,t){if(e.kind==="file")return{allChecked:t.has(e.path),someChecked:!1};const s=[...u2(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(F7,"checkboxState");function PY(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(PY,"parseFrontmatter");var $Y={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 H7({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)(()=>d2(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",Dk),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",Fd.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?F7(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"?q7(A.name):null,Pe=A.kind==="file"&&A.path===t;return(0,a.jsxs)("div",{ref:r(Ee=>{Ee?Q.current.set(A.path,Ee):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"?Pe: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":Dk,C==="explorer"&&"file-tree-row-explorer",Pe&&"text-ink bg-bg-3/20",B7[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(Ee=>X(Ee,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(Ee=>{Ee.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)(cr,{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(Ee=>Ee.stopPropagation(),"onClick"),children:(0,a.jsx)("input",{type:"checkbox","aria-label":y?.(A)??`Select ${A.path}`,disabled:N,checked:we,ref:r(Ee=>{Ee&&(Ee.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)(K1,{className:"h-3.5 w-3.5"}):(0,a.jsx)(_i,{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",Fd[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(Ee=>{Ee.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)(cr,{className:"h-3.5 w-3.5"})})]},A.path)})})}r(H7,"FileTree");function V7(e,t){return e.visible?e.focused?t.visibleMs:t.unfocusedMs??t.visibleMs:t.hiddenMs??!1}r(V7,"resolvePollingInterval");function W7(e,t){if(e<=0)return 0;const s=Math.min(Math.max(t(),0),.999999);return Math.round(s*e)}r(W7,"computeStartupJitterMs");function Q7(e){const t=r1(),s=(0,x.useRef)(null);s.current===null&&(e.jitter===!1?s.current=0:s.current=W7(Math.min(e.jitterMaxMs??1e3,Math.round(e.visibleMs*.2)),Math.random));const l=s.current;return(0,x.useMemo)(()=>{const c=V7(t,e);return c===!1?!1:c+l},[t,e.visibleMs,e.unfocusedMs,e.hiddenMs,l])}r(Q7,"useVisibilityRefetchInterval");var G7=3e4,Y7=[];function X7(e,t=!0){const{data:s}=me({queryKey:P.pausedTasks(e??"none"),queryFn:r(()=>on.listPausedTasks(e),"queryFn"),enabled:!!e&&t,refetchInterval:r(l=>l.state.data?.some(c=>c.state==="pausing")?G7:!1,"refetchInterval")});return s??Y7}r(X7,"usePausedTasks");var f2={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 Z7(e,t){const s={};for(let l=0;l<t.length;l+=500){const c=t.slice(l,l+500),u=await f2.getIssueSummaries(e,c);Object.assign(s,u.summaries)}return{summaries:s}}r(Z7,"fetchIssueExternalObjectSummariesInBatches");function J7(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(J7,"formatMentionSourceLabel");function p2(){const e=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),retry:!1});return{isEnabled:e.data?.enableExternalObjects===!0,isLoaded:e.data!==void 0||e.isError}}r(p2,"useExternalObjectsFeature");function UY(e){const t=p2(),s=t.isEnabled&&!!e,l=me({queryKey:P.externalObjects.byIssue(e??"__none__"),queryFn:r(()=>f2.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(J7)));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=qy(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=qy(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(UY,"useIssueExternalObjects");function e9(e,t){const s=p2(),l=(0,x.useMemo)(()=>[...new Set(t.filter(p=>p.length>0))].sort(),[t]),c=s.isEnabled&&!!e&&l.length>0,u=me({queryKey:P.externalObjects.issueSummaries(e??"__none__",l),queryFn:r(()=>Z7(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(e9,"useIssueExternalObjectSummaries");var BY={relevance:"Relevance",updated:"Recently updated",created:"Newest created",priority:"Priority"},t9={"24h":"Last 24 hours","7d":"Last 7 days","30d":"Last 30 days","90d":"Last 90 days"};function m2(e){return t9[e]??`Updated ≤ ${e}`}r(m2,"updatedWithinLabel");var n9=new Set(jE);function KY(e){const t=e.get("sort");return t&&n9.has(t)?t:"relevance"}r(KY,"parseSearchSort");function qY(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(qY,"countActiveFilters");function FY(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(FY,"assigneeToken");function HY(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(HY,"applyAssigneeToken");function Sc(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}r(Sc,"humanize$1");function a9(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(a9,"assigneeChipLabel");function VY(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: ${a9(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: ${m2(e.updatedWithin)}`,remove:r(l=>{const c={...l};return delete c.updatedWithin,delete c.updatedAfter,c},"remove")}),s}r(VY,"buildFilterChips");function WY(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(WY,"describeLoosenSuggestion");function QY(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(QY,"clearFilterDimension");var s9='Search title, ID, description… (pick a field or type "exact phrase")';function Ok(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}r(Ok,"humanize");function Hh(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(Hh,"composeRaw");function i9(e,t){typeof e=="function"?e(t):e&&(e.current=t)}r(i9,"assignRef");function Lk(e,t,s){const l=!!(t.currentUserId||t.currentAgentId);switch(e){case"status":return[...Bc.map(c=>({id:c,label:Ok(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 h0.map(c=>({id:c,label:Ok(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 Jk.map(c=>({id:c,label:m2(c),token:`updated:>${c}`}));default:return[]}}r(Lk,"pickerOptions");function r9(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(r9,"rankOptions");function l9({value:e,onChange:t,context:s={},operatorKeys:l=nA,debounceMs:c=250,placeholder:u=s9,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)(()=>sP.filter(ge=>ge.kind==="text"||l.includes(ge.key)),[l]),ie=Hh(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 r9(Lk(U.key,s,l),De)}const{token:ge}=yh(_);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,yh(_).start));return}ge.token&&ve(ge.token,Oe)},"selectOption"),Pe=r(ge=>{const Oe=/\s$/.test(ge);if(Oe&&O(!0),U){D(ge);return}const{start:De,token:ut}=yh(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(cn=>[...cn,...gt.tokens]),D(gt.text&&Oe?`${gt.text} `:gt.text);return}D(ge)},"handleDraftChange"),Ee=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=Lk(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"),Ve=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=Hh([...M,ut],null,z)}else if(!U){const ut=uc(_,l);ut.tokens.length>0&&(R([...M,...ut.tokens]),D(ut.text),De=Hh([...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"),yt=M.map(ge=>oP(ge,s)),Zt=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)(fr,{className:"pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-ink-3"}),yt.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(()=>Ee(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,i9(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:Zt,"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=>Pe(ge.target.value),"onChange"),onFocus:r(()=>O(!0),"onFocus"),onBlur:r(()=>O(!1),"onBlur"),onKeyDown:Ve}),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(l9,"ScopedSearchInput");function h2(e){if(e.length<=1)return[...e];const t=r((v,y)=>{const j=zk(v.createdAt),k=zk(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(h2,"workflowSort");function zk(e){if(!e)return 0;const t=e instanceof Date?e.getTime():new Date(e).getTime();return Number.isFinite(t)?t:0}r(zk,"toTimestamp");var o9=2;function c9(e,t){return e===!0&&t>=o9}r(c9,"shouldRenderSubIssueProgressSummary");function u9(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=h2(s),c=l.find(f=>d9(f.status))??null,u=l.filter(f=>!f9(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(u9,"buildSubIssueProgressSummary");function d9(e){return e!=="done"&&e!=="cancelled"&&e!=="blocked"}r(d9,"isActionableStatus");function f9(e){return e==="done"||e==="cancelled"}r(f9,"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 p9(e){return e==="queued"||e==="running"}r(p9,"isLiveRunStatus");var m9=new Set(["done","cancelled"]);function l0(e){return m9.has(e)}r(l0,"isTerminalIssueStatus");function mo(e,t){return p9(e.status)&&!l0(t)}r(mo,"isLiveIssueRun");function h9(e){const t=new Map;for(const s of e??[]){const l={status:s.status,updatedAtMs:g9(s.updatedAt)},c=t.get(s.id);(!c||x9(c,l))&&t.set(s.id,l)}return new Map([...t].map(([s,l])=>[s,l.status]))}r(h9,"collectIssueStatusById");function g9(e){if(e==null)return null;const t=e instanceof Date?e.getTime():new Date(e).getTime();return Number.isFinite(t)?t:null}r(g9,"issueUpdatedAtMs");function x9(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!l0(e.status)&&l0(t.status)}r(x9,"shouldReplaceIssueStatusSnapshot");function b9(e,t){const s=new Set,l=h9(t);for(const c of e??[])c.issueId&&mo(c,l.get(c.issueId))&&s.add(c.issueId);return s}r(b9,"collectLiveIssueIds");function g2(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(g2,"collectSubtreeLiveCounts");function v9(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(v9,"McpIcon");var y9=new Set(["tool","tool call","tool_call","acp_tool"]);function Bd(e){const t=(e??"").trim().toLowerCase().replace(/\s*\((?:pending|in[_ -]?progress|completed|failed|cancelled|canceled)\)$/,"");return!t||y9.has(t)}r(Bd,"isGenericToolName");function x2(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(x2,"mcpToolIdentity");function kx(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(kx,"identifierWords");function b2(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(b2,"sentenceCase");function Pk(e){const t=(e??"").trim();return Bd(t)?"Unnamed tool":b2(kx(x2(t)?.name??t))}r(Pk,"humanizeToolName");var va=r((e,t,s)=>({key:e,singular:t,plural:s}),"group"),j9={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"}},w9={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:[]},k9={read:"read",edit:"update",delete:"delete",move:"move",search:"search",list:"list",execute:"run",think:"think",fetch:"fetch",switch_mode:"switch"};function S9(e){return kx(e).join("_")}r(S9,"normalizedKey");function N9(e){const t=e[0];if(!t)return null;for(const[s,l]of Object.entries(w9))if(l.includes(t))return s;return null}r(N9,"inferredAction");function C9(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(C9,"actionFamily");var A9={terminal:W1,grep:_R,search:fr,read:R1,edit:dR,web:lR,plan:DS,question:ag,agent:F1,safety:Cc,image:bR,wait:xS,mcp:v9,other:Ef};function _9(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(_9,"actionCopy");function E9(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(E9,"defaultSummaryGroup");function I9(e){return e==="read"||e==="list"?va("wardmote_read","Wardmote read","Wardmote reads"):va("task_operation","task operation","task operations")}r(I9,"wardmoteSummaryGroup");function T9(e){const t=(e.name??"").trim(),s=x2(t),l=(e.namespace??s?.namespace??"").trim(),c=(s?"mcp":e.transport??"builtin").toLowerCase(),u=(s?.name??t).trim(),p=kx(u),f=S9(u),h=j9[f],g=k9[(e.operation??"").trim().toLowerCase()],v=N9(p),y=h?.action??g??v??"other",j=h?"exact":g?"kind":v?"inferred":Bd(u)?"unnamed":"fallback",k=Bd(u)?"Unnamed tool":Pk(u),S=/^[A-Za-z][A-Za-z0-9_.:-]*$/.test(u),N=v&&S&&p.length>1?p.slice(1):[],I=N.length?b2(N).replace(/^./,U=>U.toLowerCase()):void 0,C=h?.running&&h.completed?{running:h.running,completed:h.completed}:y==="other"?Bd(u)?{running:"Running an unnamed tool",completed:"Ran an unnamed tool"}:{running:`Running ${k}`,completed:`Ran ${k}`}:_9(y,h?void 0:I),M=h?.family??C9(y),R=c==="mcp"?"mcp":M,_=l?Pk(l):c==="mcp"?"MCP":void 0,D=l.toLowerCase()==="wardmote"?I9(y):h?.group??E9(y);return{icon:A9[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(T9,"toolActivityPresentation");function $k(e){const t=T9({name:e});return{family:t.family,icon:t.icon,verbLabel:t.runningLabel}}r($k,"toolTaxonomy");function R9(e){const t=(e??"").trim().toLowerCase();return t==="thinking"?fI:t==="responding"||t.startsWith("responding (")?wR:null}r(R9,"statusLabelIcon");var o0=6e4,c0=12e4,v2=9e5,kf={paused:-2,pausing:-1,active:0,thinking:1,starting:2,quiet:3,stalled:4,pause_failed:5},GY={starting:"loading",active:"working",thinking:"thinking",quiet:"sleepy",stalled:"confused",pausing:"loading",paused:"sleepy",pause_failed:"confused"},M9={pausing:"Pausing",paused:"Paused",pause_failed:"Pause failed"};function D9(e){return{health:e,label:M9[e],silentMs:null}}r(D9,"pauseSignal");function Sx(e){if(!e)return null;const t=new Date(e).getTime();return Number.isFinite(t)?t:null}r(Sx,"toMs");function y2(e){let t=null;for(const s of[e.lastEventAt,e.currentStatusUpdatedAt,e.outputSilence?.lastOutputAt,e.lastUsefulActionAt]){const l=Sx(s);l!==null&&(t===null||l>t)&&(t=l)}return t}r(y2,"lastLiveActivityMs");function Uk(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(Uk,"formatSilence");function O9(e){return!!e.currentToolName&&!/^finished\b/i.test(e.currentStatusMessage??"")}r(O9,"toolInFlight");function Nx(e,t){const s=Sx(e.startedAt);if(s===null||e.status==="queued"||e.status==="scheduled_retry")return{health:"starting",label:"Queued",silentMs:null};const l=y2(e);if(l===null&&t-s<o0)return{health:"starting",label:"Starting",silentMs:null};const c=Math.max(0,t-(l??s)),u=e.outputSilence?.level,p=e.outputSilence?.criticalThresholdMs||v2;return u==="critical"||u!=="snoozed"&&c>=p?{health:"stalled",label:`Stalled ${Uk(c)}`,silentMs:c}:u==="suspicious"||c>=c0?{health:"quiet",label:`Quiet ${Uk(c)}`,silentMs:c}:O9(e)?{health:"active",label:"Working",silentMs:c}:{health:"thinking",label:"Thinking",silentMs:c}}r(Nx,"classifyLiveNowHealth");function L9(e,t){const s=Sx(e.startedAt);if(s===null||e.status==="queued"||e.status==="scheduled_retry")return null;const l=y2(e);if(l===null&&t-s<o0)return s+o0;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<c0)return c+c0;const f=c+(Math.floor(u/6e4)+1)*6e4,h=c+(e.outputSilence?.criticalThresholdMs||v2);return h>t?Math.min(f,h):f}r(L9,"nextLiveNowHealthChangeMs");function j2(e){return e==="paused"?"paused":e==="stalled"||e==="quiet"||e==="pause_failed"?"attention":"working"}r(j2,"liveNowGroupOf");function w2(e,t){return kf[t]-kf[e]}r(w2,"compareLiveNowSeverity");function k2(e){return e.reduce((t,s)=>kf[s.health]>kf[t.health]?s:t)}r(k2,"mostSevereSignal");function YY(e){const t=e.currentToolName?.trim()||null,s=(e.currentStatusMessage?.trim()||null)??(t?$k(t).verbLabel:null);return s?{icon:t?$k(t).icon:R9(s)??Rf,text:s}:null}r(YY,"describeLiveActivity");var z9=3e4,P9=[];function Vh(e){return e.startedAt??e.createdAt}r(Vh,"runStartAt");function ho(e){const t=new Date(e).getTime();return Number.isFinite(t)?t:0}r(ho,"timestampMs");function S2(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,...N2(u)});return l.sort((c,u)=>ho(u.latestStartAt)-ho(c.latestStartAt))}r(S2,"buildLiveNowEntries");function N2(e){e.sort((s,l)=>ho(Vh(l))-ho(Vh(s)));const t=e.filter(s=>s.startedAt!==null);return{runs:e,latestStartAt:Vh(e[0]),earliestStartedAt:t.length>0?t[t.length-1].startedAt:null}}r(N2,"toRunSet");function $9(e,t){return(e??[]).filter(s=>!s.issueId&&mo(s)).map(s=>{const l=Nx(s,t);return{entry:N2([s]),signal:l,group:j2(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"?w2(s.signal.health,l.signal.health):0)}r($9,"buildLiveNowHeartbeats");function U9(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(U9,"resolveLiveNowParentPath");function B9(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?D9(h.state):k2(u.runs.map(v=>Nx(v,s)));return{order:p,item:{entry:u,issue:f,identifier:f?.identifier??u.issueId.slice(0,8),signal:g,group:j2(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=w2(u.item.signal.health,p.item.signal.health);if(f!==0)return f}return u.order-p.order}),c.map(({item:u})=>u)}r(B9,"buildLiveNowItems");function C2(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=L9(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(C2,"useLiveNowClock");function XY(e,t,s=P9){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||!U9(R,l).complete)&&C.add(M.issueId)}return[...C]},[e,l]),u=_f({queries:c.map(C=>({queryKey:P.issues.detail(C),queryFn:r(()=>on.get(C),"queryFn"),staleTime:z9,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 S2(e,C)},[p,e,l]),g=(0,x.useMemo)(()=>(e??[]).filter(C=>!C.issueId&&mo(C)),[e]),v=C2((0,x.useMemo)(()=>[...h.flatMap(C=>C.runs),...g],[h,g])),y=$9(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=B9(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(XY,"useLiveNowModel");var K9=["assignee","kickedOffBy","project","workspace","parent","labels","updated"],q9={status:"Status",id:"ID",assignee:"Responsible",kickedOffBy:"Kicked off by",project:"Project",workspace:"Workspace",parent:"Parent task",labels:"Tags",updated:"Last updated"},F9={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 H9(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.":F9[e]}r(H9,"issueColumnDescription");function Sf(e){return xI(e.lastActivityAt??e.lastExternalCommentAt??e.updatedAt)}r(Sf,"issueActivityTimestamp");function V9(e){return`Updated ${Sf(e)}`}r(V9,"issueActivityText");function W9(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(W9,"issueTrailingGridTemplate");function Q9({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)(n3,{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)(_1,{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)(Ei,{}),e.map(g=>(0,a.jsx)(Ky,{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:q9[g]}),(0,a.jsx)("span",{className:"text-xs leading-relaxed text-ink-3",children:H9(g,h)})]})},g)),l!==void 0&&c?(0,a.jsx)(Ky,{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)(Ei,{}),(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(Q9,"IssueColumnPicker");function G9(){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(G9,"LiveRunDot");function Y9(){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)(G9,{}),(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(Y9,"LiveRunBadge");function Bk({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)(Js,{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)(Y9,{}),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(Bk,"InboxIssueMetaLeading");function X9({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 _=Sf(e),D=g??Vr(e.assigneeUserId,N)??"User",U=o1(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:W9(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)(lg,{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)(Ts,{children:[(0,a.jsx)(Es,{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)(Is,{side:"top",sideOffset:6,children:B})]},E)}if(U?.kind==="user"){const B=S?`${z} · via ${S}`:z;return(0,a.jsxs)(Ts,{children:[(0,a.jsx)(Es,{asChild:!0,children:(0,a.jsx)("span",{className:"min-w-0 text-xs text-ink",children:(0,a.jsx)(lg,{name:z,avatarUrl:k,size:"sm",className:"min-w-0"})})}),(0,a.jsx)(Is,{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:tj(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:tj(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)(Ts,{children:[(0,a.jsx)(Es,{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)(Is,{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(X9,"InboxIssueTrailingColumns");function Z9({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)(ns,{className:"h-4 w-4 mr-1.5"}),c]})]})}r(Z9,"EmptyState");function J9({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)(cr,{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(J9,"IssueGroupHeader");var Wh={critical:{icon:ni,color:ld.critical??"text-yellow-600 dark:text-yellow-400",label:"Critical"},high:{icon:T1,color:ld.high??"text-yellow-600 dark:text-yellow-400",label:"High"},medium:{icon:j3,color:ld.medium??"text-yellow-600 dark:text-yellow-400",label:"Medium"},low:{icon:RI,color:ld.low??"text-yellow-600 dark:text-yellow-400",label:"Low"}},eF=["critical","high","medium","low"];function ZY({priority:e,onChange:t,className:s,showLabel:l}){const[c,u]=(0,x.useState)(!1),p=Wh[e]??Wh.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)(js,{open:c,onOpenChange:u,children:[(0,a.jsx)(vs,{asChild:!0,children:g}),(0,a.jsx)(ys,{className:"w-36 p-1",align:"start",children:eF.map(v=>{const y=Wh[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(ZY,"PriorityIcon");var tF=[["everything","All categories"],["issues_i_touched","My recent tasks"],["join_requests","Join requests"],["approvals","Approvals"],["failed_runs","Failed runs"],["alerts","Alerts"]],nF=[["all","All approval statuses"],["actionable","Needs action"],["resolved","Resolved"]],Qh=6;function Gh({value:e,onChange:t,label:s}){return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(fr,{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(Gh,"FilterOptionSearch");function aF({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)(()=>ah(l,M,A=>A.name),[l,M]),E=(0,x.useMemo)(()=>ah(c,_,A=>A.name),[c,_]),B=(0,x.useMemo)(()=>ah(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(G1),S?.onClear()},"clearFilters");return(0,a.jsxs)(js,{children:[(0,a.jsx)(vs,{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)(x3,{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)(ys,{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:tF.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)(Rs,{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:nF.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)(Rs,{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:aT.map(A=>{const ee=iT(e.statuses,A.statuses);return(0,a.jsx)(zT,{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:Xd.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)(Qs,{checked:e.statuses.includes(A),onCheckedChange:r(()=>t({statuses:tr(e.statuses,A)}),"onCheckedChange")}),(0,a.jsx)(Js,{status:A}),(0,a.jsx)("span",{className:"text-sm",children:ug(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)>Qh?(0,a.jsx)(Gh,{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)(Qs,{checked:e.assignees.includes("__unassigned"),onCheckedChange:r(()=>t({assignees:tr(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)(Qs,{checked:e.assignees.includes("__me"),onCheckedChange:r(()=>t({assignees:tr(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)(Qs,{checked:e.assignees.includes(A.id),onCheckedChange:r(()=>t({assignees:tr(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)(fr,{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:tr(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>Qh?(0,a.jsx)(Gh,{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)(Qs,{checked:e.projects.includes(A.id),onCheckedChange:r(()=>t({projects:tr(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>Qh?(0,a.jsx)(Gh,{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)(Qs,{checked:e.labels.includes(A.id),onCheckedChange:r(()=>t({labels:tr(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:eT.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=P1(ee),le=(nI[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)(Qs,{checked:e.externalObjectStatuses.includes(A),onCheckedChange:r(()=>t({externalObjectStatuses:tr(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:nT(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)(Qs,{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)(Qs,{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)(Qs,{checked:e.showHiddenTasks,onCheckedChange:r(A=>t({showHiddenTasks:A===!0}),"onCheckedChange")}),(0,a.jsx)("span",{className:"text-sm",children:"Show hidden tasks"})]}):null]})]})]})]})})]})}r(aF,"IssueFiltersPopover");function sF(e){return e.objects.find(t=>t.statusTone===e.highestSeverity)?.statusCategory??"unknown"}r(sF,"dominantCategory");function iF(e){return e.objects.find(t=>t.statusTone===e.highestSeverity)??null}r(iF,"dominantObject");function rF(e){const t=[];for(const[s,l]of Object.entries(e.byStatusCategory))l&&t.push(`${l} ${t3(s).toLowerCase()}`);return e.staleCount>0&&t.push(`${e.staleCount} stale`),t.push(`${e.total} total`),`External objects: ${t.join(", ")}`}r(rF,"buildBreakdownTitle");function Kk({summary:e,compact:t,className:s}){const l=U0(),c=YI(e),u=e?.total??0;if(!e||u===0||!c)return null;const p=iF(e),f=p?.statusCategory??sF(e),h=JI(p?.statusIconKey)??P1(f),g=cI[f]??"bg-bg-3 text-ink-3",v=XI(e),y=rF(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(Kk,"ExternalObjectStatusSummary");function qk({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)(I1,{className:"h-3.5 w-3.5"}),"Archive"]})}r(qk,"InboxArchiveButton");function lF({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=k0(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&&!YE(ye.cause)?oF(ye,s,{scheduledRetry:e.scheduledRetry??null}):null,he=ZT(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)(C0,{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:Hd(X),state:de,disableIssueQuicklook:!0,issuePrefetch:e,"data-inbox-issue-link":!0,id:U,"aria-current":_?"step":void 0,onClickCapture:r(()=>ng(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,Pe)=>{const Ee=ue&&Pe===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:Ee?(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-${Pe}`)}):null,c,u??(0,a.jsx)(Js,{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)(Kk,{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)(qk,{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:Hd(X),state:de,disableIssueQuicklook:!0,issuePrefetch:e,"data-inbox-issue-link":!0,id:U,"aria-current":_?"step":void 0,onClickCapture:r(()=>ng(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)(Js,{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 Pe=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:Pe?(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)(Js,{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)(qk,{onArchive:E,disabled:B}):null,N?(0,a.jsx)(Kk,{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(lF,"IssueRow");function oF(e,t,s){const l=WT(e,s);if(!l)return null;const c=GT[l],u=c.icon,p=QT(e,s),f=XT(l,e.kind,p),h=p?YT(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(oF,"renderRecoveryChip");var cF="Kembali ke model utama.";function uF(e,t){return e instanceof Error&&e.message?e.message:t}r(uF,"errorMessage");function dF({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 Lf.cancel(t.id),on.addComment(e,cF,void 0,void 0,void 0,crypto.randomUUID())},"mutationFn"),onSuccess:r(()=>{s&&u.invalidateQueries({queryKey:P.liveRuns(s)}),e&&(u.invalidateQueries({queryKey:P.issues.liveRuns(e)}),u.invalidateQueries({queryKey:P.issues.activeRun(e)}),u.invalidateQueries({queryKey:P.issues.runs(e)}),u.invalidateQueries({queryKey:P.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:uF(g.error,"Couldn’t restore the primary model.")}):null,(0,a.jsx)(A1,{open:p,onOpenChange:f,children:(0,a.jsxs)(w1,{children:[(0,a.jsxs)(C1,{children:[(0,a.jsxs)(j1,{children:["Back to the primary model",v,"?"]}),(0,a.jsxs)(y1,{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)(S1,{children:[(0,a.jsx)(N1,{children:"Keep running"}),(0,a.jsx)(k1,{onClick:r(()=>{f(!1),g.mutate()},"onClick"),children:"Stop and switch"})]})]})})]})}r(dF,"RestorePrimaryModelControl");function fF({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(fF,"CollectionToolbar");function pF({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(pF,"PageSkeleton");var JY="issue.successful_run_handoff_required",eX="issue.successful_run_handoff_escalated";function A2(e){const t=e.successfulRunHandoff;return t?.required!==!0?!1:t.hasLiveContinuation?e.scheduledRetry?.status==="scheduled_retry":!0}r(A2,"isSuccessfulRunHandoffRequired");function tX(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)||mF(t)}r(tX,"isSuccessfulRunHandoffComment");function mF(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(mF,"isSuccessfulRunHandoffEscalationComment");function nX(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(nX,"successfulRunHandoffActivityTone");var _2=[10,25,50];var hF=["backlog","done","cancelled"],u0=["backlog","todo","in_progress","in_review","blocked","done","cancelled"],gF={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:""},xF={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 bF(e){return xF[e]??gF}r(bF,"getKanbanColumnTone");function Yh(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}r(Yh,"statusLabel");function vF(e,t){return u0.includes(e)?e:t.find(s=>s.id===e)?.status??null}r(vF,"resolveKanbanTargetStatus");function yF({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}=OC({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=bF(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:`${Yh(e)}: ${t.length}`,children:[(0,a.jsx)(Js,{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:Yh(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)(Js,{status:e}),(0,a.jsx)("span",{className:Y("text-xs font-semibold uppercase tracking-wide",C.header),children:Yh(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)(sx,{items:S.map(M=>M.id),strategy:zC,children:S.map(M=>(0,a.jsx)(E2,{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(yF,"KanbanColumn");function E2({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}=ix({id:e.id,data:{issue:e}}),N={transform:ti.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)}),A2(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)(ni,{className:"h-3 w-3"}),"Next step"]}):null,c?(0,a.jsx)(kF,{state:c}):s&&(0,a.jsx)(jF,{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(E2,"KanbanCard");function jF({runs:e}){const t=C2(e??SF),s=e&&e.length>0?k2(e.map(c=>Nx(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(jF,"KanbanLiveMarker");var wF={pausing:"Pausing",paused:"Paused",pause_failed:"Pause failed"};function kF({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)(B0,{"aria-hidden":"true",className:"live-now-health-icon h-3 w-3"}),wF[e]]})}r(kF,"KanbanPausedMarker");var SF=[];function NF({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=X0(Mc(Gf,{activationConstraint:{distance:5}})),M=(0,x.useMemo)(()=>{const z={};for(const E of u0)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)(()=>g2(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=vF(B.id,e);V&&V!==Q.status&&g(O,{status:V})}r(U,"handleDragEnd");function K(z){}return r(K,"handleDragOver"),(0,a.jsxs)(nx,{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:u0.map(z=>(0,a.jsx)(yF,{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)(r4,{children:R?(0,a.jsx)(E2,{issue:R,agents:t,isOverlay:!0,compact:u}):null})]})}r(NF,"KanbanBoard");function Nf(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(Nf,"buildIssueTree");function I2(e,t){return(t.get(e)??[]).reduce((s,l)=>s+1+I2(l.id,t),0)}r(I2,"countDescendants");function aX(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(aX,"filterIssueDescendants");function CF(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(CF,"buildSubIssueDefaultsForViewer");function T2(){return typeof localStorage>"u"?null:localStorage}r(T2,"browserStorage");function Xh(e,t){if(!t)return null;try{const s=e.getItem(t);return s==null?null:JSON.parse(s)}catch{return null}}r(Xh,"parseStoredJson");function R2({companyId:e,collectionKey:t}){return`wardmote:task-collection:v1:${encodeURIComponent(e)}:${encodeURIComponent(t)}`}r(R2,"taskCollectionPreferencesStorageKey");function AF(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(AF,"isCurrentEnvelope");function d0(e,t,s=T2()){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(R2(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(d0,"saveTaskCollectionPreferences");function _F({storage:e=T2(),defaultViewState:t,defaultColumns:s,normalizeViewState:l,normalizeColumns:c,...u}){if(!e)return{viewState:t,columns:s,migrated:!1,source:"default"};const p=Xh(e,R2(u));if(AF(p,u))return{viewState:l(p.viewState),columns:c(p.columns),migrated:!1,source:p.viewStateSource==="default"?"default":"current"};const f=Xh(e,u.legacyViewStorageKey),h=Xh(e,u.legacyColumnsStorageKey),g=f!==null||h!==null,v={viewState:f===null?t:l(f),columns:h===null?s:c(h)};return g&&d0(u,{...v,viewStateSource:f===null?"default":"stored"},e),{...v,migrated:g,source:f!==null?"legacy":"default"}}r(_F,"loadTaskCollectionPreferences");var EF={today:"Today",yesterday:"Yesterday",earlier:"Earlier"};function Fk(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())}r(Fk,"localCalendarOrdinal");function IF(e,t=new Date){const s=e instanceof Date?e:new Date(e);if(Number.isNaN(s.getTime()))return"earlier";const l=Math.round((Fk(t)-Fk(s))/864e5);return l<=0?"today":l===1?"yesterday":"earlier"}r(IF,"taskDateGroup");function TF(e,t){return e===t||e===null&&t==="earlier"?null:EF[t]}r(TF,"taskDateGroupSeparator");var Td=200,Rd=200;function Hk(e){const t=new Date(e.startedAt??e.createdAt).getTime();return Number.isFinite(t)?t:0}r(Hk,"runStartMs");function RF(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||Hk(c)>Hk(u))&&l.set(c.issueId,c)}return l}r(RF,"fallbackRunsByIssueId");function Md(e){return e.type==="group"?`group:${e.key}`:`issue:${e.issue.id}`}r(Md,"issuesListNavEntryKey");function Vk(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/["\\]/g,"\\$&")}r(Vk,"escapeAttrValue");function MF(e){const t=[],s=new Array(e.length);for(let c=0;c<e.length;c+=1){let u=0,p=t.length;for(;u<p;){const f=u+p>>1;e[t[f]]<e[c]?u=f+1:p=f}s[c]=u>0?t[u-1]:-1,t[u]=c}const l=[];for(let c=t.length>0?t[t.length-1]:-1;c>=0;c=s[c])l.push(c);return l.reverse()}r(MF,"longestIncreasingSubsequence");function DF(e,t){const s=new Map;e?.keys.forEach((f,h)=>s.set(f,h));const l=[],c=[];t.forEach((f,h)=>{const g=s.get(f);g!==void 0&&(l.push(g),c.push(h))});const u=new Set(MF(l).map(f=>c[f])),p=new Map;return{keys:t,generations:p,renderKeys:t.map((f,h)=>{const g=e?.generations.get(f)??0,v=s.has(f)&&!u.has(h)?g+1:g;return v===0?f:(p.set(f,v),`${f}~${v}`)})}}r(DF,"insertionStableRowKeys");var M2=100,OF=150,LF=320;function zF(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(zF,"findIssuesScrollContainer");var PF=Bc,$F={backlog:"Backlog",todo:"Todo",in_progress:"In progress",in_review:"In review",done:"Done",blocked:"Blocked",cancelled:"Cancelled"},UF={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"},Kd={...G1,sortField:"updated",sortDir:"desc",groupBy:"none",viewMode:"list",nestingEnabled:!0,showDateGroupSeparators:!0,collapsedGroups:[],collapsedParents:[],boardCardDensity:"auto",boardColdLaneMode:"expanded",boardColumnPageSize:10};function BF(e){return e==="compact"||e==="comfortable"||e==="auto"?e:"auto"}r(BF,"normalizeBoardCardDensity");function KF(e){return e==="collapsed"||e==="expanded"||e==="auto"?e:"auto"}r(KF,"normalizeBoardColdLaneMode");function qF(e){return _2.includes(e)?e:10}r(qF,"normalizeBoardColumnPageSize");function FF(e){const t=e&&typeof e=="object"?e:{};return{...Kd,...t,...tT(t),workspaces:[],sortField:["status","priority","title","created","updated","workflow"].includes(t.sortField??"")?t.sortField:Kd.sortField,sortDir:t.sortDir==="asc"?"asc":"desc",groupBy:["status","priority","assignee","project","workspace","parent","none"].includes(t.groupBy??"")?t.groupBy:Kd.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:BF(t.boardCardDensity),boardColdLaneMode:KF(t.boardColdLaneMode),boardColumnPageSize:qF(t.boardColumnPageSize)}}r(FF,"normalizeIssueViewState");function HF(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(HF,"getInitialViewState");function Wk(e,t,s,l,c){const u=HF(e,t,l),p=s?{...u,workspaces:s,statuses:[]}:u;return c?{...p,statuses:c}:p}r(Wk,"getInitialWorkspaceViewState");function VF(e){return`${e}:issue-columns`}r(VF,"getIssueColumnsStorageKey");function D2(e,t){const s=e?`${t}:${e}`:t;return{companyId:e??"__unscoped__",collectionKey:t,legacyViewStorageKey:s,legacyColumnsStorageKey:VF(s)}}r(D2,"issueCollectionPreferenceLocation");function sX(e,t){return f0(D2(e,t)).viewState.showHiddenTasks}r(sX,"loadStoredShowHiddenTasks");function f0(e){return _F({...e,defaultViewState:Kd,defaultColumns:ZN,normalizeViewState:FF,normalizeColumns:r(t=>tC(Array.isArray(t)?t:[]),"normalizeColumns")})}r(f0,"loadIssueCollectionPreferences");function WF(e,t){if(t.sortField==="workflow"){const c=h2(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*(Xd.indexOf(c.status)-Xd.indexOf(u.status));case"priority":return l*(cg.indexOf(c.priority)-cg.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*GF(c,u);default:return 0}}),s}r(WF,"sortIssues");var Qk=new Map;function QF(e,t,s,l,c){const u=Math.min(s.length,Math.max(M2,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(QF,"nextIssueRowRenderLimit");function p0(e){return e.lastActivityAt??e.updatedAt}r(p0,"issueRecencyDate");function GF(e,t){const s=new Date(p0(e)).getTime()-new Date(p0(t)).getTime();return s!==0?s:new Date(e.updatedAt).getTime()-new Date(t.updatedAt).getTime()}r(GF,"compareIssueRecency");function YF(e){return e.sortDir!=="desc"?null:e.sortField==="created"?t=>t.createdAt:e.sortField==="updated"?p0:null}r(YF,"issueDateSeparatorDate");var O2=864e5,XF=7*O2;function ZF(e,t=Date.now()){const s=t-new Date(e).getTime();return s<O2?0:s<XF?1:2}r(ZF,"issueAgeBucket");function JF(e){return e===1?"Older than a day":"Older than a week"}r(JF,"issueAgeSeparatorLabel");function eH(e,t){const s=[];return e<1&&t>=1&&s.push(1),e<2&&t>=2&&s.push(2),s}r(eH,"issueAgeBucketsCrossed");function Gk({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(Gk,"IssueDateSeparator");function tH(e){return e!=="done"&&e!=="cancelled"&&e!=="blocked"}r(tH,"isActionableWorkflowStatus");function nH(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}=Nf(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(nH,"buildChecklistStepNumberMap");function aH(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}=Nf(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(aH,"buildPreviousSiblingIssueIdMap");function sH(e,t,s){return!!(e.parentId&&s&&(e.blockedBy??[]).length===1&&t.length===1&&t[0]===s)}r(sH,"shouldSuppressSinglePreviousSiblingBlockerChip");function iH({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(iH,"LegacyIssuesToolbar");function rH({value:e,context:t,onDebouncedChange:s}){return(0,a.jsx)(l9,{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(D8({key:l.key,isComposing:l.nativeEvent.isComposing})){l.currentTarget.blur();return}O8({key:l.key,isComposing:l.nativeEvent.isComposing,currentValue:l.currentTarget.value})&&l.currentTarget.blur()},"onKeyDown")})}r(rH,"IssueSearchInput");function lH({summary:e,issueLinkState:t,parentIssueIdForCostSummary:s}){const l=e.target,c=l?.issue??null,u=c?.identifier??c?.id??"",p=c?k0(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=Q7({visibleMs:5e3}),{data:v}=me({queryKey:P.issues.costSummary(s??"pending",{excludeRoot:!0}),queryFn:r(()=>on.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:[RE(y)," tokens"]}),(0,a.jsxs)("span",{className:"text-ink-3 tabular-nums",children:[CE(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",UF[k]),style:{width:`${S/e.totalCount*100}%`},title:`${$F[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:Hd(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(lH,"SubIssueProgressSummaryStrip");var Yk=["","pl-4 sm:pl-0","pl-8 sm:pl-0","pl-12 sm:pl-0","pl-16 sm:pl-0"];function oH(e){return(0,a.jsx)(cH,{...e})}r(oH,"IssuesList");function cH({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}=vt(),{openNewIssue:et}=$s(),{data:Pe}=me({queryKey:P.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),{data:Ee}=me({queryKey:P.access.companyUserDirectory(ve),queryFn:r(()=>ei.listUserDirectory(ve),"queryFn"),enabled:!!ve}),{data:ct}=me({queryKey:P.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),retry:!1}),Ve=Pe?.user?.id??Pe?.session?.userId??null,yt=ct!==void 0,Zt=ct?.enableIsolatedWorkspaces===!0,ge=ct?.enableExternalObjects===!0,Oe=ve?`${h}:${ve}`:h,De=D2(ve,h),ut=v?.join("|")??"",Ht=y?.join("|")??"",Vt=j?`set:${j.join("|")}`:"",gt=(0,x.useRef)(null);gt.current===null&&(gt.current=f0(De));const cn=gt.current,[$,qe]=(0,x.useState)(()=>Wk(cn,v,y,M,j)),[Xe,xt]=(0,x.useState)(null),[at,Kt]=(0,x.useState)(""),[ea,Jt]=(0,x.useState)(k??""),[Mt,Gt]=(0,x.useState)(M2),[dt,On]=(0,x.useState)(cn.columns),mt=(0,x.useRef)(!1),[Nn,It]=(0,x.useState)(!1),en=(0,x.useDeferredValue)(ea).trim().toLowerCase();(0,x.useEffect)(()=>{Jt(k??"")},[k]);const{data:qt}=me({queryKey:P.issues.labels(ve),queryFn:r(()=>on.listLabels(ve),"queryFn"),enabled:!!ve}),Tt=(0,x.useMemo)(()=>({currentUserId:Ve,agents:l,projects:c,labels:qt}),[l,Ve,qt,c]),At=(0,x.useMemo)(()=>uo(en,Tt),[en,Tt]),_e=At.query,Re=_e.length>0||aA(At.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=f0(De);qe(Wk(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 Le=(0,x.useCallback)(F=>{qe(W=>{const J={...W,...F};return d0(De,{viewState:J,columns:dt}),J})},[De.companyId,De.collectionKey,De.legacyColumnsStorageKey,De.legacyViewStorageKey,dt]);(0,x.useEffect)(()=>{!yt||ge||$.externalObjectStatuses.length===0||Le({externalObjectStatuses:[]})},[yt,ge,Le,$.externalObjectStatuses.length]),(0,x.useEffect)(()=>{const F=new Set(e.map(J=>J.parentId).filter(Boolean)),W=$.collapsedParents.filter(J=>F.has(J));W.length!==$.collapsedParents.length&&Le({collapsedParents:W})},[e]);const Ot=U!==void 0,Rt=Ot&&$.showHiddenTasks;(0,x.useEffect)(()=>{U?.(Rt)},[Rt,U]);const Lt=(0,x.useMemo)(()=>{if(!Re)return{};const F={...hP($),...iA(At.filters)};return f&&(F.projectId=f),F},[Re,At.filters,f,$]),{data:tn=[]}=me({queryKey:[...P.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})=>on.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&&lt,placeholderData:r(F=>F,"placeholderData")}),Wt=_f({queries:PF.map(F=>({queryKey:[...P.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([]):on.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&&$.viewMode==="board"&&!N,placeholderData:r(W=>W,"placeholderData")}))}),{data:Ln=[]}=me({queryKey:ve?P.executionWorkspaces.summaryList(ve):["execution-workspaces","__disabled__"],queryFn:r(()=>Jf.listSummaries(ve),"queryFn"),enabled:!!ve&&Zt}),gn=(0,x.useCallback)(F=>!F||!l?null:l.find(W=>W.id===F)?.name??null,[l]),zn=(0,x.useMemo)(()=>zP(Ee?.users),[Ee?.users]),ss=(0,x.useMemo)(()=>PP(Ee?.users),[Ee?.users]),Da=(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]),jt=(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]),un=(0,x.useMemo)(()=>({executionWorkspaceById:jt,defaultProjectWorkspaceIdByProjectId:ka}),[ka,jt]),Oa=(0,x.useMemo)(()=>{const F=new Map;for(const[W,J]of wa)Gy({id:W},Qn)&&F.set(W,J.name);for(const[W,J]of jt)Gy({id:W,mode:J.mode,projectWorkspaceId:J.projectWorkspaceId},Qn)&&F.set(W,J.name);return F},[Qn,jt,wa]),ai=(0,x.useMemo)(()=>{const F=new Map,W=new Set;Ve&&F.set(`user:${Ve}`,{id:`user:${Ve}`,label:Ve==="local-board"?"Board":"Me",kind:"user",searchText:Ve==="local-board"?"board me human local-board":`me board human ${Ve}`});for(const J of e)if(J.createdByUserId){const Ie=`user:${J.createdByUserId}`;F.has(Ie)||F.set(Ie,{id:Ie,label:Vr(J.createdByUserId,Ve)??J.createdByUserId.slice(0,5),kind:"user",searchText:`${J.createdByUserId} board user human`})}for(const J of l??[]){W.add(J.id);const Ie=`agent:${J.id}`;F.has(Ie)||F.set(Ie,{id:Ie,label:J.name,kind:"agent",searchText:`${J.name} ${J.id} agent`})}for(const J of e)if(J.createdByAgentId&&!W.has(J.createdByAgentId)){const Ie=`agent:${J.createdByAgentId}`;F.has(Ie)||F.set(Ie,{id:Ie,label:J.createdByAgentId.slice(0,8),kind:"agent",searchText:`${J.createdByAgentId} agent`})}return[...F.values()].sort((J,Ie)=>J.kind!==Ie.kind?J.kind==="user"?-1:1:J.label.localeCompare(Ie.label))},[l,Ve,e]),pn=(0,x.useMemo)(()=>new Set(dt),[dt]),Us=(0,x.useMemo)(()=>Q5(Zt),[Zt]),Pn=(0,x.useMemo)(()=>new Set(Us),[Us]),ra=(0,x.useMemo)(()=>g2(e,u??new Set),[e,u]),ma=(0,x.useMemo)(()=>RF(p,e),[e,p]),ha=(0,x.useMemo)(()=>K9.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]),La=(0,x.useMemo)(()=>{if($.viewMode!=="board"||N)return null;const F=new Map;let W=!1;for(const J of Wt){W||=J.isPending;for(const Ie of J.data??[])F.set(Ie.id,Ie)}return F.size>0?[...F.values()]:W?e:[]},[Wt,e,N,$.viewMode]),xn=(0,x.useMemo)(()=>$.viewMode==="board"&&!N&&Wt.some(F=>(F.data?.length??0)===Rd),[Wt,N,$.viewMode]),is=(0,x.useMemo)(()=>La??(lt?tn:e),[La,e,lt,tn]),Sa=(0,x.useMemo)(()=>{if(!Re||!N)return is;const F=Ig(_e);return is.filter(W=>dw(W,F)&&fw(W,At.filters))},[Re,_e,At.filters,N,is]),In=lt&&!Nn&&$.viewMode==="list",ga=$.externalObjectStatuses.length>0,Bs=(0,x.useMemo)(()=>$.viewMode==="list"||ga?Sa.map(F=>F.id):[],[ga,Sa,$.viewMode]),{summaries:Ks,isLoading:rs,isReady:Ha}=e9(ve,Bs),Na=(0,x.useMemo)(()=>({...un,externalObjectSummaryByIssueId:Ks,externalObjectSummariesReady:Ha&&!rs}),[rs,Ha,Ks,un]),za=ga&&rs&&!Ha,ht=(0,x.useMemo)(()=>{const F=dg(Sa,$,Ve,D,u,Na);return In?F:WF(F,$)},[In,Sa,$,Ve,D,u,Na]),Un=(0,x.useMemo)(()=>c9(R,e.length)?u9(e):null,[e,R]),si=(0,x.useMemo)(()=>M==="workflow"&&$.groupBy==="none",[M,$.groupBy]),ii=(0,x.useMemo)(()=>{if(!si)return null;const F=new Set(ht.map(Fe=>Fe.id)),W=nH(ht,$.nestingEnabled),J=aH(ht,$.nestingEnabled),Ie=new Map;return ht.forEach(Fe=>{const bt=(Fe.blockedBy??[]).map(pt=>pt.id).filter(pt=>{if(!F.has(pt))return!1;const an=$n.get(pt);return an?an.status!=="done"&&an.status!=="cancelled":!1}),Kn=sH(Fe,bt,J.get(Fe.id));Ie.set(Fe.id,Kn?[]:bt)}),{stepNumberByIssueId:W,unresolvedVisibleBlockersByIssueId:Ie,currentStepIssueId:(ht.find(Fe=>tH(Fe.status))??null??ht.find(Fe=>Fe.status==="blocked")??null)?.id??null}},[si,ht,$n,$.nestingEnabled]),Va=sT($,D,Ot),se=(0,x.useMemo)(()=>{if(Va===0&&!Re)return null;const F=Ig(_e),W=Re?new Set(Sa.map(J=>J.id)):null;return J=>dg([J],$,Ve,D,u,Na).length>0&&(W===null||W.has(J.id)||dw(J,F)&&fw(J,At.filters))},[Va,Ve,D,Na,Re,_e,u,At.filters,Sa,$]),Te=(0,x.useMemo)(()=>{if($.viewMode!=="board")return;const F=new Map(is.map(W=>[W.id,W.status]));return new Map(S2(p,F).map(W=>[W.issueId,W.runs]))},[p,is,$.viewMode]),Je=X7(ve,$.viewMode==="board"),Qe=(0,x.useMemo)(()=>new Map(Je.map(F=>[F.issueId,F.state])),[Je]),zt=$.viewMode==="board"&&ht.length>100,Qt=$.boardCardDensity==="compact"||$.boardCardDensity==="auto"&&zt,Z=(0,x.useMemo)(()=>$.boardColdLaneMode==="collapsed"||$.boardColdLaneMode==="auto"&&zt?[...hF]:[],[zt,$.boardColdLaneMode]),Ne=$.boardCardDensity!=="auto"||$.boardColdLaneMode!=="auto"||$.boardColumnPageSize!==10,Be=(0,x.useMemo)(()=>{if($.groupBy==="none")return[{key:"__all",label:null,items:ht}];if($.groupBy==="status"){const W=Gl(ht,J=>J.status);return Xd.filter(J=>W[J]?.length).map(J=>({key:J,label:ug(J),items:W[J]}))}if($.groupBy==="priority"){const W=Gl(ht,J=>J.priority);return cg.filter(J=>W[J]?.length).map(J=>({key:J,label:ug(J),items:W[J]}))}if($.groupBy==="workspace"){const W=Gl(ht,J=>Qy(J,un)??"__no_workspace");return Object.keys(W).sort((J,Ie)=>J==="__no_workspace"?1:Ie==="__no_workspace"?-1:(W[Ie]?.length??0)-(W[J]?.length??0)).map(J=>({key:J,label:J==="__no_workspace"?"No Workspace":Oa.get(J)??J.slice(0,8),items:W[J]}))}if($.groupBy==="project"){const W=Gl(ht,J=>J.projectId??"__no_project");return Object.keys(W).sort((J,Ie)=>{if(J==="__no_project")return 1;if(Ie==="__no_project")return-1;const Fe=Da.get(J)?.name??J,bt=Da.get(Ie)?.name??Ie;return Fe.localeCompare(bt)}).map(J=>({key:J,label:J==="__no_project"?"No Project":Da.get(J)?.name??J.slice(0,8),items:W[J]}))}if($.groupBy==="parent"){const W=Gl(ht,J=>J.parentId??"__no_parent");return Object.keys(W).sort((J,Ie)=>J==="__no_parent"?1:Ie==="__no_parent"?-1:(W[Ie]?.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),Ve,zn)??"User":gn(W)??W.slice(0,8),items:F[W]}))},[ht,un,$.groupBy,l,gn,Ve,Oa,Gn,zn,Da]),$e=(0,x.useMemo)(()=>JSON.stringify([Oe,en,$.statuses,$.priorities,$.assignees,$.creators,$.labels,$.projects,$.workspaces,$.liveOnly??!1,$.externalObjectStatuses,$.hideRoutineExecutions,Rt,$.sortField,$.sortDir,$.groupBy,$.viewMode,$.nestingEnabled,In]),[Oe,en,$.statuses,$.priorities,$.assignees,$.creators,$.labels,$.projects,$.workspaces,$.liveOnly,$.externalObjectStatuses,$.hideRoutineExecutions,Rt,$.sortField,$.sortDir,$.groupBy,$.viewMode,$.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($.viewMode!=="list")return F;const W=st.current.identity===$e?st.current:null;for(const J of Be){if(!$.nestingEnabled){F.set(J.key,{roots:J.items,childMap:new Map});continue}let Ie;if(W){Ie=new Set(W.keptRootIds);for(const Fe of J.items)Fe.parentId&&!W.knownIds.has(Fe.id)&&W.seenIds.has(Fe.parentId)&&Ie.add(Fe.id)}F.set(J.key,Nf(J.items,Ie))}return F},[Be,$e,$.nestingEnabled,$.viewMode]),Pt=r(F=>it.get(F.key)??($.nestingEnabled?Nf(F.items):{roots:F.items,childMap:new Map}),"issueTreeForGroup"),bn=(0,x.useMemo)(()=>{if($.viewMode!=="list")return[];const F=[];let W=0;for(const J of Be){const Ie=!!J.label&&$.collapsedGroups.includes(J.key);J.label&&F.push({type:"group",key:J.key,collapsed:Ie});const{roots:Fe,childMap:bt}=Pt(J),Kn=r(pt=>{W+=1;const an=bt.get(pt.id)??[],An=!$.collapsedParents.includes(pt.id);if(Ie||F.push({type:"issue",issue:pt,hasChildren:an.length>0,expanded:An,budgetOrdinal:W}),An)for(const Se of an)Kn(Se)},"walk");for(const pt of Fe)Kn(pt)}return F},[Be,$.viewMode,$.collapsedGroups,$.collapsedParents,$.nestingEnabled]),Bn=(0,x.useRef)({flatNavEntries:bn,selectedNavKey:de,viewMode:$.viewMode,issueLinkState:g,collapsedGroups:$.collapsedGroups,collapsedParents:$.collapsedParents,updateView:Le});Bn.current={flatNavEntries:bn,selectedNavKey:de,viewMode:$.viewMode,issueLinkState:g,collapsedGroups:$.collapsedGroups,collapsedParents:$.collapsedParents,updateView:Le};const Wa=(0,x.useCallback)(F=>{if(F.startsWith("group:")){const J=ee.current?.querySelector(`[data-issues-group-key="${Vk(F.slice(6))}"]`);return J instanceof HTMLElement?J:null}const W=ee.current?.querySelector(`[data-issue-row-id="${Vk(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)||Fg(document)||W.metaKey||W.ctrlKey||W.altKey)return;const Ie=Bn.current;if(Ie.viewMode!=="list"||Ie.flatNavEntries.length===0)return;const Fe=r(pt=>pt?Ie.flatNavEntries.findIndex(an=>Md(an)===pt):-1,"indexOfKey"),bt=Fe(Me.current),Kn=ye.current&&bt>=0?bt:Fe(Ie.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",an=J5(Kn,Ie.flatNavEntries.length,pt),An=Ie.flatNavEntries[an];if(!An)break;we(Md(An)),An.type==="issue"&&Gt(Se=>Math.max(Se,An.budgetOrdinal+1));break}case"ArrowLeft":case"ArrowRight":{const pt=Ie.flatNavEntries[Kn];if(!pt)return;const an=W.key==="ArrowLeft";if(pt.type==="group"){W.preventDefault(),ye.current=!1,we(Md(pt)),Ie.updateView({collapsedGroups:an?Ie.collapsedGroups.includes(pt.key)?Ie.collapsedGroups:[...Ie.collapsedGroups,pt.key]:Ie.collapsedGroups.filter(An=>An!==pt.key)});break}if(!pt.hasChildren)return;W.preventDefault(),ye.current=!1,we(Md(pt)),Ie.updateView({collapsedParents:an?Ie.collapsedParents.includes(pt.issue.id)?Ie.collapsedParents:[...Ie.collapsedParents,pt.issue.id]:Ie.collapsedParents.filter(An=>An!==pt.issue.id)});break}case"Enter":{const pt=Ie.flatNavEntries[Kn];if(!pt||pt.type!=="issue")return;W.preventDefault();const an=pt.issue,An=an.identifier??an.id,Se=k0(Ie.issueLinkState,an);ng(An,Se),iI(Ae,An,{issue:an}),ie(Hd(An),{state:Se});break}default:return}},"handleKeyDown");return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[ie,Ae]);const Pa=(0,x.useMemo)(()=>{if($.viewMode!=="list")return[];const F=[];for(const W of Be){const{roots:J,childMap:Ie}=Pt(W),Fe=r(bt=>{if(F.push(bt.id),!$.collapsedParents.includes(bt.id))for(const Kn of Ie.get(bt.id)??[])Fe(Kn)},"walk");for(const bt of J)Fe(bt)}return F},[Be,$.collapsedParents,$.nestingEnabled,$.viewMode]),Cn=(0,x.useRef)(null),[wt]=(0,x.useState)(()=>Qk.get(le)??null),la=wt?.identity===$e?wt.limit:0,nn=(0,x.useMemo)(()=>$.viewMode==="list"?QF(Cn.current,$e,Pa,Mt,la):Mt,[Pa,$e,Mt,la,$.viewMode]);(0,x.useLayoutEffect)(()=>{$.viewMode==="list"&&(Cn.current={identity:$e,ids:Pa,limit:nn},Qk.set(le,{identity:$e,limit:nn}),Mt!==nn&&Gt(nn))},[Pa,le,$e,nn,Mt,$.viewMode]);const ta=(0,x.useRef)(null);(0,x.useEffect)(()=>{if(!de){ta.current=null;return}if(ta.current===de)return;const F=Wa(de);F&&(F.scrollIntoView({block:"nearest"}),ta.current=de)},[Wa,nn,de]),(0,x.useLayoutEffect)(()=>{if(!$.nestingEnabled||$.viewMode!=="list")return;const F=st.current,W=F.identity===$e?F:{identity:$e,keptRootIds:new Set,seenIds:new Set,knownIds:new Set},J=Pa.slice(0,nn);for(const Ie of J)W.seenIds.add(Ie);for(const Ie of Be)for(const Fe of Ie.items)W.knownIds.add(Fe.id);for(const Ie of it.values())for(const Fe of Ie.roots)Fe.parentId&&(W.seenIds.has(Fe.id)||W.knownIds.has(Fe.parentId))&&W.keptRootIds.add(Fe.id);st.current=W},[Pa,Be,it,$e,nn,$.nestingEnabled,$.viewMode]);const dn=(0,x.useRef)(new Map),qs=new Map;(0,x.useLayoutEffect)(()=>{dn.current=qs});const ri=r((F,W)=>{const J=W,Ie=DF(dn.current.get(F),J.map(Fe=>String(Fe.key)));return qs.set(F,Ie),J.map((Fe,bt)=>Fe.key===Ie.renderKeys[bt]?Fe:(0,x.cloneElement)(Fe,{key:Ie.renderKeys[bt]}))},"withInsertionStableKeys"),So=$.viewMode==="list"&&nn>0;(0,x.useLayoutEffect)(()=>{const F=ee.current;if(!F||!So)return;let W=window.requestAnimationFrame(()=>{W=window.requestAnimationFrame(()=>F.setAttribute("data-row-deferral",""))});return()=>{window.cancelAnimationFrame(W),F.removeAttribute("data-row-deferral")}},[So]);const xr=!!X&&!$.liveOnly,Ca=$.viewMode==="list"&&nn<ht.length,sl=Math.max(ht.length-nn,0),Ri=(0,x.useCallback)(()=>{if($.viewMode==="list"){if(Ca){Gt(Math.min(ht.length,nn+OF));return}K&&!z&&O?.()}},[ht.length,K,Ca,z,O,nn,$.viewMode]),ks=$.viewMode==="list"&&!t&&(Ca||K&&!z);(0,x.useEffect)(()=>{if(!ks)return;let F=null;const W=zF(ee.current),J=W??window,Ie=r((Kn="scroll")=>{F===null&&(F=window.requestAnimationFrame(()=>{F=null;const pt=W?.scrollHeight??document.documentElement.scrollHeight;if(pt===0)return;const an=W?.clientHeight??window.innerHeight,An=W?W.scrollTop+W.clientHeight:window.scrollY+window.innerHeight,Se=pt>an+1;if(An>=pt-LF){if(Kn==="initial"&&!Ca&&K&&!Se){if(mt.current)return;mt.current=!0}Ri()}}))},"checkScrollPosition"),Fe=r(()=>Ie("scroll"),"handleScroll"),bt=r(()=>Ie("resize"),"handleResize");return J.addEventListener("scroll",Fe,{passive:!0}),window.addEventListener("resize",bt),Ie("initial"),()=>{J.removeEventListener("scroll",Fe),window.removeEventListener("resize",bt),F!==null&&window.cancelAnimationFrame(F)}},[ks,K,Ca,Ri]);const il=(0,x.useCallback)(F=>{const W=F?.key,J={...I??{}};if(f&&J.projectId===void 0&&(J.projectId=f),W){if($.groupBy==="status")J.status=W;else if($.groupBy==="priority")J.priority=W;else if($.groupBy==="assignee"&&W!=="__unassigned")W.startsWith("__user:")?J.assigneeUserId=W.slice(7):J.assigneeAgentId=W;else if($.groupBy==="project"&&W!=="__no_project")J.projectId=W;else if($.groupBy==="workspace"&&W!=="__no_workspace"){const Ie=F?.items.find(bt=>bt.executionWorkspaceId===W||bt.projectWorkspaceId===W)??null,Fe=jt.get(W);if(Fe){J.executionWorkspaceId=W,J.executionWorkspaceMode="reuse_existing",Fe.projectWorkspaceId&&(J.projectWorkspaceId=Fe.projectWorkspaceId);const bt=Fe.projectId??(Fe.projectWorkspaceId?wa.get(Fe.projectWorkspaceId)?.projectId:null)??(Ie?.executionWorkspaceId===W?Ie.projectId:null);bt&&(J.projectId=bt)}else{const bt=wa.get(W);bt&&(J.projectWorkspaceId=W,J.projectId=bt.projectId)}}else if($.groupBy==="parent"&&W!=="__no_parent"){const Ie=$n.get(W);Ie?Object.assign(J,CF(Ie,Ve)):J.parentId=W}}return J},[I,Ve,jt,$n,f,wa,$.groupBy]),rl=C?`Create ${C}`:"Create Task",br=C?`New ${C}`:"New Task",li=(0,x.useCallback)(F=>{et(il(F))},[il,et]),ll=(0,x.useCallback)(F=>{Le({workspaces:[F]})},[Le]),vr=(0,x.useCallback)(F=>{const W=tC(F);On(W),d0(De,{viewState:$,columns:W})},[De.companyId,De.collectionKey,De.legacyColumnsStorageKey,De.legacyViewStorageKey,$]),xa=(0,x.useCallback)((F,W)=>{if(W){vr([...dt,F]);return}vr(dt.filter(J=>J!==F))},[vr,dt]),Ss=(0,x.useCallback)((F,W,J=null)=>{A(F,{assigneeAgentId:W,assigneeUserId:J}),xt(null),Kt("")},[A]);let Mi=$.viewMode==="list"?nn:Number.POSITIVE_INFINITY;return(0,a.jsxs)("div",{ref:ee,className:"wardmote-issue-list space-y-4",children:[Un?(0,a.jsx)(lH,{summary:Un,issueLinkState:g,parentIssueIdForCostSummary:_}):null,(0,a.jsx)(ce==="collection"?fF:iH,{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(()=>li(),"onClick"),children:[(0,a.jsx)(ns,{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(()=>li(),"onClick"),children:[(0,a.jsx)(ns,{className:"h-4 w-4 sm:mr-1"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:br})]}),search:(0,a.jsx)(rH,{value:ea,context:Tt,onDebouncedChange:r(F=>{Jt(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 ${$.viewMode==="list"?"bg-bg-3 text-ink":"text-ink-3 hover:text-ink"}`,onClick:r(()=>Le({viewMode:"list"}),"onClick"),title:"List view","aria-label":"List view","aria-pressed":$.viewMode==="list",children:(0,a.jsx)(jR,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("button",{className:`flex h-8 w-8 items-center justify-center transition-colors ${$.viewMode==="board"?"bg-bg-3 text-ink":"text-ink-3 hover:text-ink"}`,onClick:r(()=>Le({viewMode:"board"}),"onClick"),title:"Board view","aria-label":"Board view","aria-pressed":$.viewMode==="board",children:(0,a.jsx)(RR,{className:"h-3.5 w-3.5"})})]}),$.viewMode==="list"&&(0,a.jsx)(oe,{active:$.nestingEnabled,type:"button",variant:"secondary",size:"icon",className:Y("hidden h-8 w-8 shrink-0 sm:inline-flex"),onClick:r(()=>Le({nestingEnabled:!$.nestingEnabled}),"onClick"),title:$.nestingEnabled?"Disable parent-child nesting":"Enable parent-child nesting",children:(0,a.jsx)(zS,{className:"h-3.5 w-3.5"})}),$.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(()=>Le({boardCardDensity:Qt?"comfortable":"compact"}),"onClick"),title:Qt?"Use comfortable cards":"Use compact cards",children:(0,a.jsx)(rR,{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(()=>Le({boardColdLaneMode:Z.length>0?"expanded":"collapsed"}),"onClick"),title:Z.length>0?"Expand cold lanes":"Collapse cold lanes",children:(0,a.jsx)(NR,{className:"h-3.5 w-3.5"})}),(0,a.jsxs)(js,{children:[(0,a.jsx)(vs,{asChild:!0,children:(0,a.jsxs)(oe,{active:$.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)(yR,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"min-w-4 text-xs tabular-nums",children:$.boardColumnPageSize})]})}),(0,a.jsx)(ys,{align:"end",className:"w-40 p-0",children:(0,a.jsx)("div",{className:"p-2 space-y-0.5",children:_2.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",$.boardColumnPageSize===F?"bg-bg-3/50 text-ink":"text-ink-3 hover:bg-bg-3/50"),onClick:r(()=>Le({boardColumnPageSize:F}),"onClick"),children:[(0,a.jsxs)("span",{children:[F," per column"]}),$.boardColumnPageSize===F&&(0,a.jsx)(Rs,{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(()=>Le({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)(Q9,{availableColumns:Us,visibleColumnSet:pn,onToggleColumn:xa,showDateGroupSeparators:$.showDateGroupSeparators,onToggleDateGroupSeparators:r(F=>Le({showDateGroupSeparators:F}),"onToggleDateGroupSeparators"),onResetColumns:r(()=>vr(ZN),"onResetColumns"),title:"Choose which task columns stay visible",iconOnly:!0,rowPresentation:V}),(0,a.jsx)(aF,{state:$,onChange:Le,buttonVariant:"secondary",activeFilterCount:Va,agents:l,creators:ai,projects:c?.map(F=>({id:F.id,name:F.name})),labels:qt?.map(F=>({id:F.id,name:F.name,color:F.color})),currentUserId:Ve,enableExternalObjectFilters:ge,enableRoutineVisibilityFilter:D,enableHiddenTasksFilter:Ot,iconOnly:!0,presentation:V==="task"?"streamlined":"legacy"}),$.viewMode==="list"&&(0,a.jsxs)(js,{children:[(0,a.jsx)(vs,{asChild:!0,children:(0,a.jsx)(oe,{variant:"secondary",size:"icon",className:"h-8 w-8 shrink-0",title:"Sort",children:(0,a.jsx)(DI,{className:"h-3.5 w-3.5"})})}),(0,a.jsx)(ys,{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&&$.sortField===F?"bg-bg-3/50 text-ink":"hover:bg-bg-3/50 text-ink-3"}`,onClick:r(()=>{lt&&It(!0),In?Le({sortField:F,sortDir:F==="updated"||F==="created"?"desc":"asc"}):$.sortField===F?Le({sortDir:$.sortDir==="asc"?"desc":"asc"}):Le({sortField:F,sortDir:"asc"})},"onClick"),children:[(0,a.jsx)("span",{children:W}),!In&&$.sortField===F&&(0,a.jsx)("span",{className:"text-xs text-ink-3",children:$.sortDir==="asc"?"↑":"↓"})]},F))]})})]}),$.viewMode==="list"&&(0,a.jsxs)(js,{children:[(0,a.jsx)(vs,{asChild:!0,children:(0,a.jsx)(oe,{variant:"secondary",size:"icon",className:"h-8 w-8 shrink-0",title:"Group",children:(0,a.jsx)(Tf,{className:"h-3.5 w-3.5"})})}),(0,a.jsx)(ys,{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 ${$.groupBy===F?"bg-bg-3/50 text-ink":"hover:bg-bg-3/50 text-ink-3"}`,onClick:r(()=>Le({groupBy:F}),"onClick"),children:[(0,a.jsx)("span",{children:W}),$.groupBy===F&&(0,a.jsx)(Rs,{className:"h-3.5 w-3.5"})]},F))})})]})]})}),xr&&X?X({viewMode:$.viewMode,issueFilter:se}):null,(t||za)&&(0,a.jsx)(pF,{variant:"issues-list"}),s&&(0,a.jsx)("p",{className:"text-sm text-bad",children:s.message}),lt&&tn.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&&!za&&ht.length===0&&$.viewMode==="list"&&(0,a.jsx)(Z9,{icon:Yd,message:"No tasks match the current filters or search.",action:rl,onAction:r(()=>li(),"onAction")}),$.viewMode==="board"?(0,a.jsx)(NF,{issues:ht,agents:l,liveIssueIds:u,liveRunsByIssueId:Te,pauseStateByIssueId:Qe,compactCards:Qt,collapsedStatuses:Z,initialVisibleCount:$.boardColumnPageSize,revealIncrement:$.boardColumnPageSize,onUpdateIssue:A}):(0,a.jsxs)("div",{className:"-mx-2 sm:mx-0",children:[Be.map(F=>Mi<=0?null:(0,a.jsxs)(v1,{open:!$.collapsedGroups.includes(F.key),onOpenChange:r(W=>{Le({collapsedGroups:W?$.collapsedGroups.filter(J=>J!==F.key):[...$.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)(J9,{label:F.label,collapsible:!0,collapsed:$.collapsedGroups.includes(F.key),onToggle:r(()=>{Le({collapsedGroups:$.collapsedGroups.includes(F.key)?$.collapsedGroups.filter(W=>W!==F.key):[...$.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(()=>li(F),"onClick"),children:(0,a.jsx)(ns,{className:"h-3 w-3"})})})}),(0,a.jsx)(b1,{children:(()=>{const{roots:W,childMap:J}=Pt(F),Ie=r((Se,Fs)=>{if(Mi<=0)return null;Mi-=1;const Qa=(J.get(Se.id)??[]).length>0,Ga=Qa?I2(Se.id,J):0,ba=!$.collapsedParents.includes(Se.id),sp=!(Qa&&ba),ol=Se.projectId?Da.get(Se.projectId)??null:null,Zc=Se.parentId?$n.get(Se.parentId)??null:null,cl=B?.get(Se.id),ip=E?.has(Se.id)===!0,No=Se.assigneeUserId?ss.get(Se.assigneeUserId)??null:null,Jc=Vr(Se.assigneeUserId,Ve,zn)??No?.label??null,ul=o1(Se),dl=ul?.kind==="user"?ul.id:null,fl=ul?.kind==="user"?ul.viaAgentId??null:null,oi=r(Ue=>{Ue.preventDefault(),Ue.stopPropagation(),Le({collapsedParents:ba?[...$.collapsedParents,Se.id]:$.collapsedParents.filter(Aa=>Aa!==Se.id)})},"toggleCollapse"),ci=ii,pl=ci?.stepNumberByIssueId.get(Se.id)??null,eu=ci?.unresolvedVisibleBlockersByIssueId.get(Se.id)??[],tu=ci?`issue-workflow-row-${Se.id}`:void 0,nu=ci&&Se.status==="done"?"text-ink-3":void 0,ml=eu.map(Ue=>{const Aa=$n.get(Ue);if(!Aa)return null;const iu=Aa.identifier??Aa.id.slice(0,8),hl=ci?.stepNumberByIssueId.get(Ue);return{blockerId:Ue,chipLabel:`blocked by ${iu}${hl?` · step ${hl}`:""}`}}).filter(Ue=>Ue!==null),ls=ml[0]??null,Co=Math.max(ml.length-1,0),rp=Co>0?` ... and ${Co} more`:"",Ao=ls?`${ls.chipLabel}${rp}`:"",au=ml.slice(1).map(Ue=>Ue.chipLabel).join(", "),_o=Co>0?`${Ao}: ${au}`:Ao,yr=ci&&ls?(0,a.jsx)("button",{type:"button","data-slot":"icon-button",onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation();const Aa=document.getElementById(`issue-workflow-row-${ls.blockerId}`);Aa&&(Aa.scrollIntoView({behavior:"smooth",block:"nearest"}),Aa.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},ls.blockerId):null,Di=ma.get(Se.id)??null,su=Di?(0,a.jsx)(dF,{issueId:Se.id,run:Di,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"&&Fs>0&&Yk[Math.min(Fs,Yk.length-1)],sp&&"wardmote-issue-list-row-deferred")||void 0,children:(0,a.jsx)(lF,{issue:Se,presentation:V,issueLinkState:g,selected:de===`issue:${Se.id}`,onMouseEnter:r(()=>he(`issue:${Se.id}`),"onMouseEnter"),treeGuides:Fs,chevronInGuide:Fs>0&&Qa,checklistStepNumber:pl,checklistCurrentStep:ci?.currentStepIssueId===Se.id,checklistDependencyChips:yr,checklistRowId:tu,titleClassName:nu,externalObjectSummary:Ks.get(Se.id)??null,titleSuffix:(0,a.jsxs)(a.Fragment,{children:[Qa&&!ba?(0,a.jsxs)("span",{className:"ml-1.5 text-xs text-ink-3",children:["(",Ga," sub-task",Ga!==1?"s":"",")"]}):null,cl?cl==="Paused"?(0,a.jsxs)(Dn,{variant:"ghost",className:Y("ml-1.5 px-1.5 text-(length:--text-nano)",Fd.paused),"aria-label":"Paused",title:"Paused",children:[(0,a.jsx)(oR,{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,A2(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)(Yd,{className:"h-3 w-3"}),"Needs next step"]}):null]}),className:Y(ip&&"opacity-70",de===`issue:${Se.id}`&&"bg-bg-3/50 hover:bg-bg-3/50"),leadingControl:V==="task"?Qa?(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:oi,children:(0,a.jsx)(cr,{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)(Js,{status:Se.status,externalConversationState:Se.externalConversationState,size:"md",blockerAttention:Se.blockerAttention,onChange:r(Ue=>A(Se.id,{status:Ue}),"onChange")}),Qa&&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)(Bk,{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:Qa?(0,a.jsx)("button",{type:"button","data-slot":"icon-button",onClick:oi,children:(0,a.jsx)(cr,{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)(Js,{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:[Qa?(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:oi,children:(0,a.jsx)(cr,{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)(Bk,{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)(Js,{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"?Sf(Se):void 0,mobileMeta:V==="legacy"?V9(Se).toLowerCase():su,trailingMeta:V==="task"&&pn.has("updated")&&Pn.has("updated")?Sf(Se):void 0,desktopTrailing:ha.length>0?(0,a.jsx)(X9,{issue:Se,columns:ha,projectName:ol?.name??null,projectColor:ol?.color??null,workspaceId:Qy(Se,un),workspaceName:nC(Se,{executionWorkspaceById:jt,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?ss.get(dl)?.label??null:null,creatorUserAvatarUrl:dl?ss.get(dl)?.image??null:null,viaAgentName:fl?gn(fl):null,currentUserId:Ve,parentIdentifier:Zc?.identifier??null,parentTitle:Zc?.title??null,assigneeContent:(0,a.jsxs)(js,{open:Xe===Se.id,onOpenChange:r(Ue=>{xt(Ue?Se.id:null),Ue||Kt("")},"onOpenChange"),children:[(0,a.jsx)(vs,{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)(lg,{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)(ys,{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(),Ss(Se.id,null,null)},"onClick"),children:"No responsible"}),Ve&&(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===Ve&&"bg-bg-3"),onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation(),Ss(Se.id,null,Ve)},"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(Aa=>{Aa.preventDefault(),Aa.stopPropagation(),Ss(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"),Fe=$.showDateGroupSeparators&&!In?YF($):null,bt=new Date,Kn=[];let pt=null,an=null;const An=r((Se,Fs)=>{const Qa=Ie(Se,Fs);if(Qa!==null){if(Fe&&V==="task"){const Ga=IF(Fe(Se),bt),ba=TF(pt,Ga);ba&&Kn.push((0,a.jsx)(Gk,{label:ba},`date-sep-${Se.id}-${Ga}`)),pt=Ga}else if(Fe){const Ga=ZF(Fe(Se),bt.getTime());for(const ba of an===null?[]:eH(an,Ga))Kn.push((0,a.jsx)(Gk,{label:JF(ba)},`date-sep-${Se.id}-${ba}`));an=Ga}if(Kn.push(Qa),!$.collapsedParents.includes(Se.id))for(const Ga of J.get(Se.id)??[])An(Ga,Fs+1)}},"appendIssueRow");for(const Se of W)An(Se,0);return ri(F.key,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(nn,ht.length)} of ${ht.length} tasks`:"Scroll to load more tasks"})})]})]})}r(cH,"StreamlinedIssuesList");function uH(e){return e?new Date(e).toLocaleString():"Never"}r(uH,"formatLastRunTimestamp");function dH(e){return e?e.replaceAll("_"," "):null}r(dH,"formatRoutineRunStatus");function iX(e,t){return e==="archived"&&t||t?"active":"paused"}r(iX,"nextRoutineStatus");function fH({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)(pr,{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:[uH(e.lastRun?.triggeredAt),e.lastRun?` · ${dH(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)(I0,{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)(aS,{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)(Mf,{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)(Ei,{}),I]}):null,(0,a.jsx)(Ei,{}),(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(fH,"RoutineListRow");function pH(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(pH,"managedRoutineToRow");function mH({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=pH(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)(fH,{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(mH,"ManagedRoutinesList");function Xk(e){return new Set(e??[])}r(Xk,"toPathSet");function hH({expandedPaths:e,checkedPaths:t,selectedFile:s=null,showCheckboxes:l=!1,onToggleDir:c,onSelectFile:u,...p}){return(0,x.createElement)(H7,{...p,selectedFile:s,expandedDirs:Xk(e),checkedFiles:t?Xk(t):void 0,showCheckboxes:l,onToggleDir:c??(()=>{}),onSelectFile:u??(()=>{})})}r(hH,"PluginSdkFileTree");function gH(e){const[t,s]=(0,x.useState)(null);return(0,x.useEffect)(()=>{let l=!1;return ke(()=>import("./MarkdownEditor-ubJimjUH.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(gH,"PluginSdkMarkdownEditor");function xH(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""&&t!==!1))}r(xH,"compactIssueFilters");function bH({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)(()=>xH({...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:P.agents.list(e??"__no-company__"),queryFn:r(()=>Fa.list(e),"queryFn"),enabled:!!e}),{data:k}=me({queryKey:P.projects.list(e??"__no-company__",{includeArchived:!0}),queryFn:r(()=>mr.list(e,{includeArchived:!0}),"queryFn"),enabled:!!e}),S=P.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(()=>Lf.liveRunsForCompany(e),"queryFn"),enabled:N.enabled,refetchInterval:N.refetchInterval});_c(N,I,C);const{data:M,isLoading:R,error:_}=me({queryKey:y,queryFn:r(()=>on.list(e,h),"queryFn"),enabled:!!e}),D=(0,x.useMemo)(()=>b9(I,M),[M,I]),U=Bt({mutationFn:r(({id:K,data:z})=>on.update(K,z),"mutationFn"),onSuccess:r(()=>{e&&(f.invalidateQueries({queryKey:["plugins","sdk-ui","issues-list",e]}),f.invalidateQueries({queryKey:P.issues.list(e)}),v&&(f.invalidateQueries({queryKey:P.issues.listByProject(e,v)}),g&&f.invalidateQueries({queryKey:P.issues.listPluginOperationsByProject(e,v,g)})))},"onSuccess")});return e?(0,x.createElement)(oH,{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(bH,"PluginSdkIssuesList");function vH({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=M0(),j=e??y.companyId??null,{data:k}=me({queryKey:P.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),enabled:f}),S=k?.user?.id??k?.session?.userId??null,{data:N}=me({queryKey:P.agents.list(j??"__no-company__"),queryFn:r(()=>Fa.list(j),"queryFn"),enabled:!!j}),{data:I}=me({queryKey:P.access.companyUserDirectory(j??"__no-company__"),queryFn:r(()=>ei.listUserDirectory(j),"queryFn"),enabled:!!j&&f}),C=(0,x.useMemo)(()=>mg(),[]),M=(0,x.useMemo)(()=>C.map(K=>K.startsWith("agent:")?K.slice(6):null).filter(K=>!!K),[C]),R=(0,x.useMemo)(()=>nS((N??[]).filter(K=>h||K.status!=="terminated"),M),[N,h,M]),_=(0,x.useMemo)(()=>[...f?Y1(S):[],...f?lA(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)(P0,{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&&ef(z.assigneeAgentId),z.assigneeUserId&&Jd(z.assigneeUserId),s(K,z)},"onChange"),renderTriggerValue:r(K=>K?U?(0,x.createElement)(Cf,null,(0,x.createElement)(sg,{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)(Cf,null,E?(0,x.createElement)(sg,{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(vH,"PluginSdkAssigneePicker");function yH({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=M0(),y=e??v.companyId??null,{data:j}=me({queryKey:P.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),k=j?.user?.id??j?.session?.userId??null,{data:S}=me({queryKey:P.projects.list(y??"__no-company__",{includeArchived:f}),queryFn:r(()=>mr.list(y,{includeArchived:f}),"queryFn"),enabled:!!y}),N=(0,x.useMemo)(()=>(S??[]).filter(_=>f||!_.archivedAt),[f,S]),{orderedProjects:I}=cA({projects:N,companyId:y,userId:k}),C=(0,x.useMemo)(()=>Rg(),[]),M=(0,x.useMemo)(()=>I.map(_=>({id:_.id,label:_.name,searchText:_.description??""})),[I]),R=I.find(_=>_.id===t)??null;return(0,x.createElement)(P0,{value:t,options:M,recentOptionIds:C,placeholder:l,noneLabel:c,searchPlaceholder:u,emptyMessage:p,className:h,onConfirm:g,onChange:r(_=>{_&&pf(_),s(_)},"onChange"),renderTriggerValue:r(_=>!_||!R?(0,x.createElement)("span",{className:"text-ink-3"},l):(0,x.createElement)(Cf,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)(Cf,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(yH,"PluginSdkProjectPicker");function Cf({children:e}){return(0,x.createElement)("span",{className:"contents"},e)}r(Cf,"FragmentSafe");function jH({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(jH,"PluginSdkStatusBadge");function wH({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(wH,"PluginSdkDataTable");function kH({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(kH,"PluginSdkKeyValueList");function SH({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(SH,"PluginSdkMetricCard");function NH({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(NH,"PluginSdkJsonTree");function CH({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(CH,"PluginSdkSpinner");var AH=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 _H(e,t){globalThis.__wardmotePluginBridge__={react:e,reactJsxRuntime:a,reactDom:t,sdkUi:{usePluginData:uT,usePluginAction:cT,useHostContext:M0,useHostLocation:dT,useHostNavigation:gT,usePluginStream:pT,usePluginToast:fT,copyTextToClipboard:$0,MarkdownBlock:r(({content:s,className:l,enableWikiLinks:c,wikiLinkRoot:u,resolveWikiLinkHref:p})=>(0,x.createElement)(e3,{className:l,softBreaks:!1,enableWikiLinks:c,wikiLinkRoot:u,resolveWikiLinkHref:p,children:s}),"MarkdownBlock"),MetricCard:SH,StatusBadge:jH,DataTable:wH,KeyValueList:kH,JsonTree:NH,Spinner:CH,ErrorBoundary:AH,MarkdownEditor:gH,FileTree:hH,IssuesList:bH,AssigneePicker:vH,ProjectPicker:yH,ManagedRoutinesList:mH}}}r(_H,"initPluginBridge");var EH=1e4;function IH(e=EH){if(typeof performance>"u"||typeof performance.clearMeasures!="function")return()=>{};const s=setInterval(r(()=>{globalThis.__wardmoteKeepPerfMeasures||performance.clearMeasures()},"reap"),e);return()=>clearInterval(s)}r(IH,"startPerfMeasureReaper");var TH=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}}}})),RH=go(((e,t)=>{t.exports=TH()})),MH=go((e=>{var t=RH(),s=x0(),l=s1();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 Pe(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)?cy(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=cy(i),n=uy(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}we(Me),ye(Me,n)}r(Pe,"pushHostContainer");function Ee(){we(Me),we(he),we(ve)}r(Ee,"popHostContainer");function ct(n){n.memoizedState!==null&&ye(et,n);var i=Me.current,o=uy(i,n.type);i!==o&&(ye(he,n),ye(Me,o))}r(ct,"pushHostContext");function Ve(n){he.current===n&&(we(Me),we(he)),et.current===n&&(we(et),ic._currentValue=ie)}r(Ve,"popHostContext");var yt,Zt;function ge(n){if(yt===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);yt=i&&i[1]||"",Zt=-1<o.stack.indexOf(`
60
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
61
+ `+yt+n+Zt}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,cn=t.unstable_cancelCallback,$=t.unstable_shouldYield,qe=t.unstable_requestPaint,Xe=t.unstable_now,xt=t.unstable_getCurrentPriorityLevel,at=t.unstable_ImmediatePriority,Kt=t.unstable_UserBlockingPriority,ea=t.unstable_NormalPriority,Jt=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,en=Math.log,qt=Math.LN2;function Tt(n){return n>>>=0,n===0?32:31-(en(n)/qt|0)|0}r(Tt,"clz32Fallback");var At=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 Le(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}r(Le,"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 tn(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}r(tn,"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:ss(o),(o&(n.suspendedLanes|i))!==0?0:o}r(zn,"getBumpedLaneForHydration");function ss(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(ss,"getBumpedLaneForHydrationByLane");function Da(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}r(Da,"lanesToEventPriority");function wa(){var n=ee.p;return n!==0?n:(n=window.event,n===void 0?32:Ty(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),jt="__reactFiber$"+Qn,un="__reactProps$"+Qn,Oa="__reactContainer$"+Qn,ai="__reactEvents$"+Qn,pn="__reactListeners$"+Qn,Us="__reactHandles$"+Qn,Pn="__reactResources$"+Qn,ra="__reactMarker$"+Qn;function ma(n){delete n[jt],delete n[un],delete n[ai],delete n[pn],delete n[Us]}r(ma,"detachDeletedInstance");function ha(n){var i=n[jt];if(i)return i;for(var o=n.parentNode;o;){if(i=o[Oa]||o[jt]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(n=xy(n);n!==null;){if(o=n[jt])return o;n=xy(n)}return i}n=o,o=n.parentNode}return null}r(ha,"getClosestInstanceFromNode");function $n(n){if(n=n[jt]||n[Oa]){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 La(n){var i=n[Pn];return i||(i=n[Pn]={hoistableStyles:new Map,hoistableScripts:new Map}),i}r(La,"getResourcesFromRoot");function xn(n){n[ra]=!0}r(xn,"markNodeAsHoistable");var is=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++)is.add(i[n])}r(ga,"registerDirectEvent");var Bs=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]*$"),Ks={},rs={};function Ha(n){return Vt.call(rs,n)?!0:Vt.call(Ks,n)?!1:Bs.test(n)?rs[n]=!0:(Ks[n]=!0,!1)}r(Ha,"isAttributeNameSafe");function Na(n,i,o){if(Ha(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 za(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(za,"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 si(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}r(si,"isCheckable");function ii(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(ii,"trackValueOnNode");function Va(n){if(!n._valueTracker){var i=si(n)?"checked":"value";n._valueTracker=ii(n,i,""+n[i])}}r(Va,"track");function se(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var o=i.getValue(),d="";return n&&(d=si(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 Je=/[\n"\\]/g;function Qe(n){return n.replace(Je,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}r(Qe,"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)){Va(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),Va(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 $e(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),Va(n)}r($e,"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 Wa=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"]]),Pa=/^[\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 Pa.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}r(Cn,"sanitizeURL");function wt(){}r(wt,"noop$1");var la=null;function nn(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}r(nn,"getEventTarget");var ta=null,dn=null;function qs(n){var i=$n(n);if(i&&(n=i.stateNode)){var o=n[un]||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="'+Qe(""+i)+'"][type="radio"]'),i=0;i<o.length;i++){var d=o[i];if(d!==n&&d.form===n.form){var m=d[un]||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(qs,"restoreStateOfTarget");var ri=!1;function So(n,i,o){if(ri)return n(i,o);ri=!0;try{return n(i)}finally{if(ri=!1,(ta!==null||dn!==null)&&(Uu(),ta&&(i=ta,n=dn,dn=ta=null,qs(i),n)))for(i=0;i<n.length;i++)qs(n[i])}}r(So,"batchedUpdates$1");function xr(n,i){var o=n.stateNode;if(o===null)return null;var d=o[un]||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(xr,"getListener");var Ca=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sl=!1;if(Ca)try{var Ri={};Object.defineProperty(Ri,"passive",{get:r(function(){sl=!0},"get")}),window.addEventListener("test",Ri,Ri),window.removeEventListener("test",Ri,Ri)}catch{sl=!1}var ks=null,il=null,rl=null;function br(){if(rl)return rl;var n,i=il,o=i.length,d,m="value"in ks?ks.value:ks.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 li(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(li,"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 Ss={eventPhase:0,bubbles:0,cancelable:0,timeStamp:r(function(n){return n.timeStamp||Date.now()},"timeStamp"),defaultPrevented:0,isTrusted:0},Mi=xa(Ss),F=j({},Ss,{view:0,detail:0}),W=xa(F),J,Ie,Fe,bt=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!==Fe&&(Fe&&n.type==="mousemove"?(J=n.screenX-Fe.screenX,Ie=n.screenY-Fe.screenY):Ie=J=0,Fe=n),J)},"movementX"),movementY:r(function(n){return"movementY"in n?n.movementY:Ie},"movementY")}),Kn=xa(bt),pt=xa(j({},bt,{dataTransfer:0})),an=xa(j({},F,{relatedTarget:0})),An=xa(j({},Ss,{animationName:0,elapsedTime:0,pseudoElement:0})),Se=xa(j({},Ss,{clipboardData:r(function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData},"clipboardData")})),Fs=xa(j({},Ss,{data:0})),Qa={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ga={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 sp(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=ba[n])?!!i[n]:!1}r(sp,"modifierStateGetter");function ol(){return sp}r(ol,"getEventModifierState");var Zc=xa(j({},F,{key:r(function(n){if(n.key){var i=Qa[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=li(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Ga[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"?li(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"?li(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0},"which")})),cl=xa(j({},bt,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ip=xa(j({},F,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ol})),No=xa(j({},Ss,{propertyName:0,elapsedTime:0,pseudoElement:0})),Jc=xa(j({},bt,{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({},Ss,{newState:0,oldState:0})),dl=[9,13,27,32],fl=Ca&&"CompositionEvent"in window,oi=null;Ca&&"documentMode"in document&&(oi=document.documentMode);var ci=Ca&&"TextEvent"in window&&!oi,pl=Ca&&(!fl||oi&&8<oi&&11>=oi),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 ls=!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 rp(n,i){if(ls)return n==="compositionend"||!fl&&nu(n,i)?(n=br(),rl=il=ks=null,ls=!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(rp,"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?dn?dn.push(d):dn=[d]:ta=d,i=Wu(i,"onChange"),0<i.length&&(o=new Mi("onChange","change",null,o,d),n.push({event:o,listeners:i}))}r(_o,"createAndAccumulateChangeEvent");var yr=null,Di=null;function su(n){ny(n,0)}r(su,"runEventInBatch");function Ue(n){if(se(Gn(n)))return n}r(Ue,"getInstIfValueChanged");function Aa(n,i){if(n==="change")return i}r(Aa,"getTargetInstForChangeEvent");var iu=!1;if(Ca){var hl;if(Ca){var lp="oninput"in document;if(!lp){var Cx=document.createElement("div");Cx.setAttribute("oninput","return;"),lp=typeof Cx.oninput=="function"}hl=lp}else hl=!1;iu=hl&&(!document.documentMode||9<document.documentMode)}function Ax(){yr&&(yr.detachEvent("onpropertychange",_x),Di=yr=null)}r(Ax,"stopWatchingForValueChange");function _x(n){if(n.propertyName==="value"&&Ue(Di)){var i=[];_o(i,Di,n,nn(n)),So(su,i)}}r(_x,"handlePropertyChange");function z2(n,i,o){n==="focusin"?(Ax(),yr=i,Di=o,yr.attachEvent("onpropertychange",_x)):n==="focusout"&&Ax()}r(z2,"handleEventsForInputEventPolyfill");function P2(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ue(Di)}r(P2,"getTargetInstForInputEventPolyfill");function $2(n,i){if(n==="click")return Ue(i)}r($2,"getTargetInstForClickEvent");function U2(n,i){if(n==="input"||n==="change")return Ue(i)}r(U2,"getTargetInstForInputOrChangeEvent");function B2(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}r(B2,"is");var Ya=typeof Object.is=="function"?Object.is:B2;function Eo(n,i){if(Ya(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)||!Ya(n[m],i[m]))return!1}return!0}r(Eo,"shallowEqual");function Ex(n){for(;n&&n.firstChild;)n=n.firstChild;return n}r(Ex,"getLeafNode");function Ix(n,i){var o=Ex(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=Ex(o)}}r(Ix,"getNodeForCharacterOffset");function Tx(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?Tx(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}r(Tx,"containsNode");function Rx(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(Rx,"getActiveElementDeep");function op(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(op,"hasSelectionCapabilities");var K2=Ca&&"documentMode"in document&&11>=document.documentMode,gl=null,cp=null,Io=null,up=!1;function Mx(n,i,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;up||gl==null||gl!==Te(d)||(d=gl,"selectionStart"in d&&op(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(cp,"onSelect"),0<d.length&&(i=new Mi("onSelect","select",null,i,o),n.push({event:i,listeners:d}),i.target=gl)))}r(Mx,"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")},dp={},Dx={};Ca&&(Dx=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(dp[n])return dp[n];if(!xl[n])return n;var i=xl[n],o;for(o in i)if(i.hasOwnProperty(o)&&o in Dx)return dp[n]=i[o];return n}r(wr,"getVendorPrefixedEventName");var Ox=wr("animationend"),Lx=wr("animationiteration"),zx=wr("animationstart"),q2=wr("transitionrun"),F2=wr("transitionstart"),H2=wr("transitioncancel"),Px=wr("transitionend"),$x=new Map,fp="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(" ");fp.push("scrollEnd");function Ns(n,i){$x.set(n,i),In(i,[n])}r(Ns,"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}},os=[],bl=0,pp=0;function lu(){for(var n=bl,i=pp=bl=0;i<n;){var o=os[i];os[i++]=null;var d=os[i];os[i++]=null;var m=os[i];os[i++]=null;var b=os[i];if(os[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&&Ux(o,m,b)}}r(lu,"finishQueueingConcurrentUpdates");function ou(n,i,o,d){os[bl++]=n,os[bl++]=i,os[bl++]=o,os[bl++]=d,pp|=d,n.lanes|=d,n=n.alternate,n!==null&&(n.lanes|=d)}r(ou,"enqueueUpdate$1");function mp(n,i,o,d){return ou(n,i,o,d),cu(n)}r(mp,"enqueueConcurrentHookUpdate");function kr(n,i){return ou(n,null,null,i),cu(n)}r(kr,"enqueueConcurrentRenderForLane");function Ux(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(Ux,"markUpdateLaneFromFiberToRoot");function cu(n){if(50<Zo)throw Zo=0,km=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 V2(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(V2,"FiberNode");function Xa(n,i,o,d){return new V2(n,i,o,d)}r(Xa,"createFiberImplClass");function hp(n){return n=n.prototype,!(!n||!n.isReactComponent)}r(hp,"shouldConstruct");function ui(n,i){var o=n.alternate;return o===null?(o=Xa(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(ui,"createWorkInProgress");function Bx(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(Bx,"resetWorkInProgress");function uu(n,i,o,d,m,b){var w=0;if(d=n,typeof n=="function")hp(n)&&(w=1);else if(typeof n=="string")w=Z_(n,o,Me.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case B:return n=Xa(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=Xa(12,o,i,m|2),n.elementType=M,n.lanes=b,n;case U:return n=Xa(13,o,i,m),n.elementType=U,n.lanes=b,n;case K:return n=Xa(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=Xa(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=Xa(7,n,d,i),n.lanes=o,n}r(Sr,"createFiberFromFragment");function gp(n,i,o){return n=Xa(6,n,null,i),n.lanes=o,n}r(gp,"createFiberFromText");function Kx(n){var i=Xa(18,null,null,0);return i.stateNode=n,i}r(Kx,"createFiberFromDehydratedFragment");function xp(n,i,o){return i=Xa(4,n.children!==null?n.children:[],n.key,i),i.lanes=o,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}r(xp,"createFiberFromPortal");var qx=new WeakMap;function cs(n,i){if(typeof n=="object"&&n!==null){var o=qx.get(n);return o!==void 0?o:(i={value:n,source:i,stack:Ht(i)},qx.set(n,i),i)}return{value:n,source:i,stack:Ht(i)}}r(cs,"createCapturedValueAtFiber");var yl=[],jl=0,du=null,To=0,us=[],ds=0,Oi=null,Hs=1,Vs="";function di(n,i){yl[jl++]=To,yl[jl++]=du,du=n,To=i}r(di,"pushTreeFork");function Fx(n,i,o){us[ds++]=Hs,us[ds++]=Vs,us[ds++]=Oi,Oi=n;var d=Hs;n=Vs;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,Hs=1<<32-It(i)+m|o<<m|d,Vs=b+n}else Hs=1<<b|o<<m|d,Vs=n}r(Fx,"pushTreeId");function bp(n){n.return!==null&&(di(n,1),Fx(n,1,0))}r(bp,"pushMaterializedTreeId");function vp(n){for(;n===du;)du=yl[--jl],yl[jl]=null,To=yl[--jl],yl[jl]=null;for(;n===Oi;)Oi=us[--ds],us[ds]=null,Vs=us[--ds],us[ds]=null,Hs=us[--ds],us[ds]=null}r(vp,"popTreeContext");function Hx(n,i){us[ds++]=Hs,us[ds++]=Vs,us[ds++]=Oi,Hs=i.id,Vs=i.overflow,Oi=n}r(Hx,"restoreSuspendedTreeContext");var oa=null,vn=null,_t=!1,Li=null,fs=!1,yp=Error(c(519));function zi(n){throw Ro(cs(Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML","")),n)),yp}r(zi,"throwOnHydrationMismatch");function Vx(n){var i=n.stateNode,o=n.type,d=n.memoizedProps;switch(i[jt]=n,i[un]=d,o){case"dialog":St("cancel",i),St("close",i);break;case"iframe":case"object":case"embed":St("load",i);break;case"video":case"audio":for(o=0;o<ec.length;o++)St(ec[o],i);break;case"source":St("error",i);break;case"img":case"image":case"link":St("error",i),St("load",i);break;case"details":St("toggle",i);break;case"input":St("invalid",i),Qt(i,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":St("invalid",i);break;case"textarea":St("invalid",i),$e(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||ly(i.textContent,o)?(d.popover!=null&&(St("beforetoggle",i),St("toggle",i)),d.onScroll!=null&&St("scroll",i),d.onScrollEnd!=null&&St("scrollend",i),d.onClick!=null&&(i.onclick=wt),i=!0):i=!1,i||zi(n,!0)}r(Vx,"prepareToHydrateHostInstance");function Wx(n){for(oa=n.return;oa;)switch(oa.tag){case 5:case 31:case 13:fs=!1;return;case 27:case 3:fs=!0;return;default:oa=oa.return}}r(Wx,"popToNextHostParent");function wl(n){if(n!==oa)return!1;if(!_t)return Wx(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")||zm(n.type,n.memoizedProps)),o=!o),o&&vn&&zi(n),Wx(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(317));vn=gy(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(317));vn=gy(n)}else i===27?(i=vn,Gi(n.type)?(n=Km,Km=null,vn=n):vn=i):vn=oa?hs(n.stateNode.nextSibling):null;return!0}r(wl,"popHydrationState");function Nr(){vn=oa=null,_t=!1}r(Nr,"resetHydrationState");function jp(){var n=Li;return n!==null&&(Ka===null?Ka=n:Ka.push.apply(Ka,n),Li=null),n}r(jp,"upgradeHydrationErrorsToRecoverable");function Ro(n){Li===null?Li=[n]:Li.push(n)}r(Ro,"queueHydrationError");var wp=de(null),Cr=null,fi=null;function Pi(n,i,o){ye(wp,i._currentValue),i._currentValue=o}r(Pi,"pushProvider");function pi(n){n._currentValue=wp.current,we(wp)}r(pi,"popProvider");function kp(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(kp,"scheduleContextWorkOnParentPath");function Sp(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),kp(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),kp(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(Sp,"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;Ya(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&&Sp(i,n,o,d),i.flags|=262144}r(kl,"propagateParentContextChanges");function fu(n){for(n=n.firstContext;n!==null;){if(!Ya(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}r(fu,"checkIfContextChanged");function Ar(n){Cr=n,fi=null,n=n.dependencies,n!==null&&(n.firstContext=null)}r(Ar,"prepareToReadContext");function ca(n){return Qx(Cr,n)}r(ca,"readContext");function pu(n,i){return Cr===null&&Ar(n),Qx(n,i)}r(pu,"readContextDuringReconciliation");function Qx(n,i){var o=i._currentValue;if(i={context:i,memoizedValue:o,next:null},fi===null){if(n===null)throw Error(c(308));fi=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else fi=fi.next=i;return o}r(Qx,"readContextForConsumer");var W2=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()})}},Q2=t.unstable_scheduleCallback,G2=t.unstable_NormalPriority,qn={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Np(){return{controller:new W2,data:new Map,refCount:0}}r(Np,"createCache");function Mo(n){n.refCount--,n.refCount===0&&Q2(G2,function(){n.controller.abort()})}r(Mo,"releaseCache");var Do=null,Cp=0,Sl=0,Nl=null;function Y2(n,i){if(Do===null){var o=Do=[];Cp=0,Sl=Em(),Nl={status:"pending",value:void 0,then:r(function(d){o.push(d)},"then")}}return Cp++,i.then(Gx,Gx),i}r(Y2,"entangleAsyncAction");function Gx(){if(--Cp===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(Gx,"pingEngtangledActionScope");function X2(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(X2,"chainThenableValue");var Yx=A.S;A.S=function(n,i){Iv=Xe(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Y2(n,i),Yx!==null&&Yx(n,i)};var _r=de(null);function Ap(){var n=_r.current;return n!==null?n:fn.pooledCache}r(Ap,"peekCacheFromPool");function mu(n,i){i===null?ye(_r,_r.current):ye(_r,i.pool)}r(mu,"pushTransition");function Xx(){var n=Ap();return n===null?null:{parent:qn._currentValue,pool:n}}r(Xx,"getSuspendedCache");var Cl=Error(c(460)),_p=Error(c(474)),hu=Error(c(542)),gu={then:r(function(){},"then")};function Zx(n){return n=n.status,n==="fulfilled"||n==="rejected"}r(Zx,"isThenableResolved");function Jx(n,i,o){switch(o=n[o],o===void 0?n.push(i):o!==i&&(i.then(wt,wt),i=o),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,tb(n),n;default:if(typeof i.status=="string")i.then(wt,wt);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,tb(n),n}throw Ir=i,Cl}}r(Jx,"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 eb(){if(Ir===null)throw Error(c(459));var n=Ir;return Ir=null,n}r(eb,"getSuspendedThenable");function tb(n){if(n===Cl||n===hu)throw Error(c(483))}r(tb,"checkIfUseWrappedInAsyncCatch");var Al=null,Oo=0;function xu(n){var i=Oo;return Oo+=1,Al===null&&(Al=[]),Jx(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 nb(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=ui(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=gp(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 Ge=te.type;return Ge===I?fe(G,H,te.props.children,pe,te.key):H!==null&&(H.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===E&&Er(Ge)===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=xp(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,Ge){return H===null||H.tag!==7?(H=Sr(te,G.mode,pe,Ge),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=gp(""+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=xp(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 Ge=H!==null?H.key:null;if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return Ge!==null?null:T(G,H,""+te,pe);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case S:return te.key===Ge?q(G,H,te,pe):null;case N:return te.key===Ge?ne(G,H,te,pe):null;case E:return te=Er(te),ae(G,H,te,pe)}if(X(te)||V(te))return Ge!==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,Ge){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return G=G.get(te)||null,T(H,G,""+pe,Ge);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,Ge);case N:return G=G.get(pe.key===null?te:pe.key)||null,ne(H,G,pe,Ge);case E:return pe=Er(pe),re(G,H,te,pe,Ge)}if(X(pe)||V(pe))return G=G.get(te)||null,fe(H,G,pe,Ge,null);if(typeof pe.then=="function")return re(G,H,te,xu(pe),Ge);if(pe.$$typeof===_)return re(G,H,te,pu(H,pe),Ge);bu(H,pe)}return null}r(re,"updateFromMap");function ze(G,H,te,pe){for(var Ge=null,$t=null,Ke=H,ft=H=0,Ct=null;Ke!==null&&ft<te.length;ft++){Ke.index>ft?(Ct=Ke,Ke=null):Ct=Ke.sibling;var Ut=ae(G,Ke,te[ft],pe);if(Ut===null){Ke===null&&(Ke=Ct);break}n&&Ke&&Ut.alternate===null&&i(G,Ke),H=b(Ut,H,ft),$t===null?Ge=Ut:$t.sibling=Ut,$t=Ut,Ke=Ct}if(ft===te.length)return o(G,Ke),_t&&di(G,ft),Ge;if(Ke===null){for(;ft<te.length;ft++)Ke=xe(G,te[ft],pe),Ke!==null&&(H=b(Ke,H,ft),$t===null?Ge=Ke:$t.sibling=Ke,$t=Ke);return _t&&di(G,ft),Ge}for(Ke=d(Ke);ft<te.length;ft++)Ct=re(Ke,G,ft,te[ft],pe),Ct!==null&&(n&&Ct.alternate!==null&&Ke.delete(Ct.key===null?ft:Ct.key),H=b(Ct,H,ft),$t===null?Ge=Ct:$t.sibling=Ct,$t=Ct);return n&&Ke.forEach(function(er){return i(G,er)}),_t&&di(G,ft),Ge}r(ze,"reconcileChildrenArray");function tt(G,H,te,pe){if(te==null)throw Error(c(151));for(var Ge=null,$t=null,Ke=H,ft=H=0,Ct=null,Ut=te.next();Ke!==null&&!Ut.done;ft++,Ut=te.next()){Ke.index>ft?(Ct=Ke,Ke=null):Ct=Ke.sibling;var er=ae(G,Ke,Ut.value,pe);if(er===null){Ke===null&&(Ke=Ct);break}n&&Ke&&er.alternate===null&&i(G,Ke),H=b(er,H,ft),$t===null?Ge=er:$t.sibling=er,$t=er,Ke=Ct}if(Ut.done)return o(G,Ke),_t&&di(G,ft),Ge;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?Ge=Ut:$t.sibling=Ut,$t=Ut);return _t&&di(G,ft),Ge}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?Ge=Ut:$t.sibling=Ut,$t=Ut);return n&&Ke.forEach(function(fE){return i(G,fE)}),_t&&di(G,ft),Ge}r(tt,"reconcileChildrenIterator");function ln(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 Ge=te.key;H!==null;){if(H.key===Ge){if(Ge=te.type,Ge===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===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===E&&Er(Ge)===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(Ge=te.key;H!==null;){if(H.key===Ge)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=xp(te,G.mode,pe),pe.return=G,G=pe}return w(G);case E:return te=Er(te),ln(G,H,te,pe)}if(X(te))return ze(G,H,te,pe);if(V(te)){if(Ge=V(te),typeof Ge!="function")throw Error(c(150));return te=Ge.call(te),tt(G,H,te,pe)}if(typeof te.then=="function")return ln(G,H,xu(te),pe);if(te.$$typeof===_)return ln(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=gp(te,G.mode,pe),pe.return=G,G=pe),w(G)):o(G,H)}return r(ln,"reconcileChildFibersImpl"),function(G,H,te,pe){try{Oo=0;var Ge=ln(G,H,te,pe);return Al=null,Ge}catch(Ke){if(Ke===Cl||Ke===hu)throw Ke;var $t=Xa(29,Ke,null,G.mode);return $t.lanes=pe,$t.return=G,$t}}}r(nb,"createChildReconciler");var Tr=nb(!0),ab=nb(!1),$i=!1;function Ep(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}r(Ep,"initializeUpdateQueue");function Ip(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(Ip,"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),Ux(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 Tp(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(Tp,"enqueueCapturedUpdate");var Rp=!1;function Po(){if(Rp){var n=Nl;if(n!==null)throw n}}r(Po,"suspendIfUpdateReadFromEntangledAsyncAction");function $o(n,i,o,d){Rp=!1;var m=n.updateQueue;$i=!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?(Nt&ae)===ae:(d&ae)===ae){ae!==0&&ae===Sl&&(Rp=!0),fe!==null&&(fe=fe.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var ze=n,tt=T;ae=i;var ln=o;switch(tt.tag){case 1:if(ze=tt.payload,typeof ze=="function"){xe=ze.call(ln,xe,ae);break e}xe=ze;break e;case 3:ze.flags=ze.flags&-65537|128;case 0:if(ze=tt.payload,ae=typeof ze=="function"?ze.call(ln,xe,ae):ze,ae==null)break e;xe=j({},xe,ae);break e;case 2:$i=!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),Fi|=w,n.lanes=w,n.memoizedState=xe}}r($o,"processUpdateQueue");function sb(n,i){if(typeof n!="function")throw Error(c(191,n));n.call(i)}r(sb,"callCallback");function ib(n,i){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)sb(o[n],i)}r(ib,"commitCallbacks");var _l=de(null),vu=de(0);function rb(n,i){n=wi,ye(vu,n),ye(_l,i),wi=n|i.baseLanes}r(rb,"pushHiddenContext");function Mp(){ye(vu,wi),ye(_l,_l.current)}r(Mp,"reuseHiddenContextOnStack");function Dp(){wi=vu.current,we(_l),we(vu)}r(Dp,"popHiddenContext");var Za=de(null),ps=null;function Ui(n){var i=n.alternate;ye(Tn,Tn.current&1),ye(Za,n),ps===null&&(i===null||_l.current!==null||i.memoizedState!==null)&&(ps=n)}r(Ui,"pushPrimaryTreeSuspenseHandler");function Op(n){ye(Tn,Tn.current),ye(Za,n),ps===null&&(ps=n)}r(Op,"pushDehydratedActivitySuspenseHandler");function lb(n){n.tag===22?(ye(Tn,Tn.current),ye(Za,n),ps===null&&(ps=n)):Bi(n)}r(lb,"pushOffscreenSuspenseHandler");function Bi(){ye(Tn,Tn.current),ye(Za,Za.current)}r(Bi,"reuseSuspenseHandlerOnStack");function Ja(n){we(Za),ps===n&&(ps=null),we(Tn)}r(Ja,"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||Um(o)||Bm(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 mi=0,ot=null,sn=null,Fn=null,ju=!1,El=!1,Dr=!1,wu=0,Uo=0,Il=null,Z2=0;function _n(){throw Error(c(321))}r(_n,"throwInvalidHookError");function Lp(n,i){if(i===null)return!1;for(var o=0;o<i.length&&o<n.length;o++)if(!Ya(n[o],i[o]))return!1;return!0}r(Lp,"areHookInputsEqual");function zp(n,i,o,d,m,b){return mi=b,ot=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,A.H=n===null||n.memoizedState===null?Fb:Zp,Dr=!1,b=o(d,m),Dr=!1,El&&(b=cb(i,o,d,m)),ob(n),b}r(zp,"renderWithHooks");function ob(n){A.H=qo;var i=sn!==null&&sn.next!==null;if(mi=0,Fn=sn=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(ob,"finishRenderingHooks");function cb(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=sn=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=Hb,b=i(o,d)}while(El);return b}r(cb,"renderWithHooksAgain");function J2(){var n=A.H,i=n.useState()[0];return i=typeof i.then=="function"?Bo(i):i,n=n.useState()[0],(sn!==null?sn.memoizedState:null)!==n&&(ot.flags|=1024),i}r(J2,"TransitionAwareHostComponent");function Pp(){var n=wu!==0;return wu=0,n}r(Pp,"checkDidRenderIdHook");function $p(n,i,o){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~o}r($p,"bailoutHooks");function Up(n){if(ju){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}ju=!1}mi=0,Fn=sn=ot=null,El=!1,Uo=wu=0,Il=null}r(Up,"resetHooksOnUnwind");function _a(){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(_a,"mountWorkInProgressHook");function Rn(){if(sn===null){var n=ot.alternate;n=n!==null?n.memoizedState:null}else n=sn.next;var i=Fn===null?ot.memoizedState:Fn.next;if(i!==null)Fn=i,sn=n;else{if(n===null)throw ot.alternate===null?Error(c(467)):Error(c(310));sn=n,n={memoizedState:sn.memoizedState,baseState:sn.baseState,baseQueue:sn.baseQueue,queue:sn.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=Jx(Il,n,i),i=ot,(Fn===null?i.memoizedState:Fn.next)===null&&(i=i.alternate,A.H=i===null||i.memoizedState===null?Fb:Zp),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 Bp(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(Bp,"useMemoCache");function hi(n,i){return typeof i=="function"?i(n):i}r(hi,"basicStateReducer");function Nu(n){return Kp(Rn(),sn,n)}r(Nu,"updateReducer");function Kp(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?(Nt&xe)===xe:(mi&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((mi&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,Fi|=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,Fi|=xe;ne=ne.next}while(ne!==null&&ne!==i);if(q===null?w=b:q.next=T,!Ya(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(Kp,"updateReducerImpl");function qp(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);Ya(b,i.memoizedState)||(Hn=!0),i.memoizedState=b,i.baseQueue===null&&(i.baseState=b),o.lastRenderedState=b}return[b,d]}r(qp,"rerenderReducer");function ub(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=!Ya((sn||m).memoizedState,o);if(w&&(m.memoizedState=o,Hn=!0),m=m.queue,Vp(pb.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},fb.bind(null,d,m,o,i),null),fn===null)throw Error(c(349));b||(mi&127)!==0||db(d,i,o)}return o}r(ub,"updateSyncExternalStore");function db(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(db,"pushStoreConsistencyCheck");function fb(n,i,o,d){i.value=o,i.getSnapshot=d,mb(i)&&hb(n)}r(fb,"updateStoreInstance");function pb(n,i,o){return o(function(){mb(i)&&hb(n)})}r(pb,"subscribeToStore");function mb(n){var i=n.getSnapshot;n=n.value;try{var o=i();return!Ya(n,o)}catch{return!0}}r(mb,"checkIfSnapshotChanged");function hb(n){var i=kr(n,2);i!==null&&qa(i,n,2)}r(hb,"forceStoreRerender");function Fp(n){var i=_a();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:hi,lastRenderedState:n},i}r(Fp,"mountStateImpl");function gb(n,i,o,d){return n.baseState=o,Kp(n,sn,typeof d=="function"?d:hi)}r(gb,"updateOptimisticImpl");function e_(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,xb(i,b)):(b.next=o.next,i.pending=o.next=b)}}r(e_,"dispatchActionState");function xb(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),bb(n,i,T)}catch(ne){Hp(n,i,ne)}finally{b!==null&&w.types!==null&&(b.types=w.types),A.T=b}}else try{b=o(m,d),bb(n,i,b)}catch(ne){Hp(n,i,ne)}}r(xb,"runActionStateAction");function bb(n,i,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(d){vb(n,i,d)},function(d){return Hp(n,i,d)}):vb(n,i,o)}r(bb,"handleActionReturnValue");function vb(n,i,o){i.status="fulfilled",i.value=o,yb(i),n.state=o,i=n.pending,i!==null&&(o=i.next,o===i?n.pending=null:(o=o.next,i.next=o,xb(n,o)))}r(vb,"onActionSuccess");function Hp(n,i,o){var d=n.pending;if(n.pending=null,d!==null){d=d.next;do i.status="rejected",i.reason=o,yb(i),i=i.next;while(i!==d)}n.action=null}r(Hp,"onActionError");function yb(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}r(yb,"notifyActionListeners");function jb(n,i){return i}r(jb,"actionStateReducer");function wb(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=fs;m.nodeType!==8;){if(!b){m=null;break t}if(m=hs(m.nextSibling),m===null){m=null;break t}}b=m.data,m=b==="F!"||b==="F"?m:null}if(m){vn=hs(m.nextSibling),d=m.data==="F!";break e}}zi(d)}d=!1}d&&(i=o[0])}}return o=_a(),o.memoizedState=o.baseState=i,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jb,lastRenderedState:i},o.queue=d,o=Bb.bind(null,ot,d),d.dispatch=o,d=Fp(!1),b=Xp.bind(null,ot,!1,d.queue),d=_a(),m={state:i,dispatch:null,action:n,pending:null},d.queue=m,o=e_.bind(null,ot,m,b,o),m.dispatch=o,d.memoizedState=n,[i,o,!1]}r(wb,"mountActionState");function kb(n){return Sb(Rn(),sn,n)}r(kb,"updateActionState");function Sb(n,i,o){if(i=Kp(n,i,jb)[0],n=Nu(hi)[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},t_.bind(null,m,o),null)),[d,b,n]}r(Sb,"updateActionStateImpl");function t_(n,i){n.action=i}r(t_,"actionStateActionEffect");function Nb(n){var i=Rn(),o=sn;if(o!==null)return Sb(i,o,n);Rn(),i=i.memoizedState,o=Rn();var d=o.queue.dispatch;return o.memoizedState=n,[i,d,!1]}r(Nb,"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 Cb(){return Rn().memoizedState}r(Cb,"updateRef");function Cu(n,i,o,d){var m=_a();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;sn!==null&&d!==null&&Lp(d,sn.memoizedState.deps)?m.memoizedState=Tl(i,b,o,d):(ot.flags|=n,m.memoizedState=Tl(1|i,b,o,d))}r(Au,"updateEffectImpl");function Ab(n,i){Cu(8390656,8,n,i)}r(Ab,"mountEffect");function Vp(n,i){Au(2048,8,n,i)}r(Vp,"updateEffect");function n_(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(n_,"useEffectEventImpl");function _b(n){var i=Rn().memoizedState;return n_({ref:i,nextImpl:n}),function(){if((Ft&2)!==0)throw Error(c(440));return i.impl.apply(void 0,arguments)}}r(_b,"updateEvent");function Eb(n,i){return Au(4,2,n,i)}r(Eb,"updateInsertionEffect");function Ib(n,i){return Au(4,4,n,i)}r(Ib,"updateLayoutEffect");function Tb(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(Tb,"imperativeHandleEffect");function Rb(n,i,o){o=o!=null?o.concat([n]):null,Au(4,4,Tb.bind(null,i,n),o)}r(Rb,"updateImperativeHandle");function Wp(){}r(Wp,"mountDebugValue");function Mb(n,i){var o=Rn();i=i===void 0?null:i;var d=o.memoizedState;return i!==null&&Lp(i,d[1])?d[0]:(o.memoizedState=[n,i],n)}r(Mb,"updateCallback");function Db(n,i){var o=Rn();i=i===void 0?null:i;var d=o.memoizedState;if(i!==null&&Lp(i,d[1]))return d[0];if(d=n(),Dr){Nn(!0);try{n()}finally{Nn(!1)}}return o.memoizedState=[d,i],d}r(Db,"updateMemo");function Qp(n,i,o){return o===void 0||(mi&1073741824)!==0&&(Nt&261930)===0?n.memoizedState=i:(n.memoizedState=o,n=Rv(),ot.lanes|=n,Fi|=n,o)}r(Qp,"mountDeferredValueImpl");function Ob(n,i,o,d){return Ya(o,i)?o:_l.current!==null?(n=Qp(n,o,d),Ya(n,i)||(Hn=!0),n):(mi&42)===0||(mi&1073741824)!==0&&(Nt&261930)===0?(Hn=!0,n.memoizedState=o):(n=Rv(),ot.lanes|=n,Fi|=n,i)}r(Ob,"updateDeferredValueImpl");function Lb(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,Xp(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,X2(q,d),ms(n)):Ko(n,i,d,ms(n))}catch(fe){Ko(n,i,{then:r(function(){},"then"),status:"rejected",reason:fe},ms())}finally{ee.p=b,w!==null&&T.types!==null&&(w.types=T.types),A.T=w}}r(Lb,"startTransition");function a_(){}r(a_,"noop");function Gp(n,i,o,d){if(n.tag!==5)throw Error(c(476));var m=zb(n).queue;Lb(n,m,i,ie,o===null?a_:function(){return Pb(n),o(d)})}r(Gp,"startHostTransition");function zb(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:hi,lastRenderedState:ie},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:hi,lastRenderedState:o},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}r(zb,"ensureFormComponentIsStateful");function Pb(n){var i=zb(n);i.next===null&&(i=n.alternate.memoizedState),Ko(n,i.next.queue,{},ms())}r(Pb,"requestFormReset$1");function Yp(){return ca(ic)}r(Yp,"useHostTransitionStatus");function $b(){return Rn().memoizedState}r($b,"updateId");function Ub(){return Rn().memoizedState}r(Ub,"updateRefresh");function s_(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var o=ms();n=Rr(o);var d=Mr(i,n,o);d!==null&&(qa(d,i,o),zo(d,i,o)),i={cache:Np()},n.payload=i;return}i=i.return}}r(s_,"refreshCache");function i_(n,i,o){var d=ms();o={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},_u(n)?Kb(i,o):(o=mp(n,i,o,d),o!==null&&(qa(o,n,d),qb(o,i,d)))}r(i_,"dispatchReducerAction");function Bb(n,i,o){Ko(n,i,o,ms())}r(Bb,"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))Kb(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,Ya(T,w))return ou(n,i,m,0),fn===null&&lu(),!1}catch{}if(o=mp(n,i,m,d),o!==null)return qa(o,n,d),qb(o,i,d),!0}return!1}r(Ko,"dispatchSetStateInternal");function Xp(n,i,o,d){if(d={lane:2,revertLane:Em(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},_u(n)){if(i)throw Error(c(479))}else i=mp(n,o,d,2),i!==null&&qa(i,n,2)}r(Xp,"dispatchOptimisticSetState");function _u(n){var i=n.alternate;return n===ot||i!==null&&i===ot}r(_u,"isRenderPhaseUpdate");function Kb(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(Kb,"enqueueRenderPhaseUpdate");function qb(n,i,o){if((o&4194048)!==0){var d=i.lanes;d&=n.pendingLanes,o|=d,i.lanes=o,gn(n,o)}}r(qb,"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 Fb={readContext:ca,use:Su,useCallback:r(function(n,i){return _a().memoizedState=[n,i===void 0?null:i],n},"useCallback"),useContext:ca,useEffect:Ab,useImperativeHandle:r(function(n,i,o){o=o!=null?o.concat([n]):null,Cu(4194308,4,Tb.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=_a();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=_a();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=i_.bind(null,ot,n),[d.memoizedState,n]},"useReducer"),useRef:r(function(n){var i=_a();return n={current:n},i.memoizedState=n},"useRef"),useState:r(function(n){n=Fp(n);var i=n.queue,o=Bb.bind(null,ot,i);return i.dispatch=o,[n.memoizedState,o]},"useState"),useDebugValue:Wp,useDeferredValue:r(function(n,i){return Qp(_a(),n,i)},"useDeferredValue"),useTransition:r(function(){var n=Fp(!1);return n=Lb.bind(null,ot,n.queue,!0,!1),_a().memoizedState=n,[!1,n]},"useTransition"),useSyncExternalStore:r(function(n,i,o){var d=ot,m=_a();if(_t){if(o===void 0)throw Error(c(407));o=o()}else{if(o=i(),fn===null)throw Error(c(349));(Nt&127)!==0||db(d,i,o)}m.memoizedState=o;var b={value:o,getSnapshot:i};return m.queue=b,Ab(pb.bind(null,d,b,n),[n]),d.flags|=2048,Tl(9,{destroy:void 0},fb.bind(null,d,b,o,i),null),o},"useSyncExternalStore"),useId:r(function(){var n=_a(),i=fn.identifierPrefix;if(_t){var o=Vs,d=Hs;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=Z2++,i="_"+i+"r_"+o.toString(32)+"_";return n.memoizedState=i},"useId"),useHostTransitionStatus:Yp,useFormState:wb,useActionState:wb,useOptimistic:r(function(n){var i=_a();i.memoizedState=i.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=o,i=Xp.bind(null,ot,!0,o),o.dispatch=i,[n,i]},"useOptimistic"),useMemoCache:Bp,useCacheRefresh:r(function(){return _a().memoizedState=s_.bind(null,ot)},"useCacheRefresh"),useEffectEvent:r(function(n){var i=_a(),o={impl:n};return i.memoizedState=o,function(){if((Ft&2)!==0)throw Error(c(440));return o.impl.apply(void 0,arguments)}},"useEffectEvent")},Zp={readContext:ca,use:Su,useCallback:Mb,useContext:ca,useEffect:Vp,useImperativeHandle:Rb,useInsertionEffect:Eb,useLayoutEffect:Ib,useMemo:Db,useReducer:Nu,useRef:Cb,useState:r(function(){return Nu(hi)},"useState"),useDebugValue:Wp,useDeferredValue:r(function(n,i){return Ob(Rn(),sn.memoizedState,n,i)},"useDeferredValue"),useTransition:r(function(){var n=Nu(hi)[0],i=Rn().memoizedState;return[typeof n=="boolean"?n:Bo(n),i]},"useTransition"),useSyncExternalStore:ub,useId:$b,useHostTransitionStatus:Yp,useFormState:kb,useActionState:kb,useOptimistic:r(function(n,i){return gb(Rn(),sn,n,i)},"useOptimistic"),useMemoCache:Bp,useCacheRefresh:Ub};Zp.useEffectEvent=_b;var Hb={readContext:ca,use:Su,useCallback:Mb,useContext:ca,useEffect:Vp,useImperativeHandle:Rb,useInsertionEffect:Eb,useLayoutEffect:Ib,useMemo:Db,useReducer:qp,useRef:Cb,useState:r(function(){return qp(hi)},"useState"),useDebugValue:Wp,useDeferredValue:r(function(n,i){var o=Rn();return sn===null?Qp(o,n,i):Ob(o,sn.memoizedState,n,i)},"useDeferredValue"),useTransition:r(function(){var n=qp(hi)[0],i=Rn().memoizedState;return[typeof n=="boolean"?n:Bo(n),i]},"useTransition"),useSyncExternalStore:ub,useId:$b,useHostTransitionStatus:Yp,useFormState:Nb,useActionState:Nb,useOptimistic:r(function(n,i){var o=Rn();return sn!==null?gb(o,sn,n,i):(o.baseState=n,[n,o.queue.dispatch])},"useOptimistic"),useMemoCache:Bp,useCacheRefresh:Ub};Hb.useEffectEvent=_b;function Jp(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(Jp,"applyDerivedStateFromProps");var em={enqueueSetState:r(function(n,i,o){n=n._reactInternals;var d=ms(),m=Rr(d);m.payload=i,o!=null&&(m.callback=o),i=Mr(n,m,d),i!==null&&(qa(i,n,d),zo(i,n,d))},"enqueueSetState"),enqueueReplaceState:r(function(n,i,o){n=n._reactInternals;var d=ms(),m=Rr(d);m.tag=1,m.payload=i,o!=null&&(m.callback=o),i=Mr(n,m,d),i!==null&&(qa(i,n,d),zo(i,n,d))},"enqueueReplaceState"),enqueueForceUpdate:r(function(n,i){n=n._reactInternals;var o=ms(),d=Rr(o);d.tag=2,i!=null&&(d.callback=i),i=Mr(n,d,o),i!==null&&(qa(i,n,o),zo(i,n,o))},"enqueueForceUpdate")};function Vb(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(Vb,"checkShouldComponentUpdate");function Wb(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&&em.enqueueReplaceState(i,i.state,null)}r(Wb,"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 r_(n){ru(n)}r(r_,"defaultOnUncaughtError");function l_(n){}r(l_,"defaultOnCaughtError");function o_(n){ru(n)}r(o_,"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 Qb(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(Qb,"logCaughtError");function tm(n,i,o){return o=Rr(o),o.tag=3,o.payload={element:null},o.callback=function(){Eu(n,i)},o}r(tm,"createRootErrorUpdate");function Gb(n){return n=Rr(n),n.tag=3,n}r(Gb,"createClassErrorUpdate");function Yb(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(){Qb(i,o,d)}}var w=o.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(n.callback=function(){Qb(i,o,d),typeof m!="function"&&(Hi===null?Hi=new Set([this]):Hi.add(this));var T=d.stack;this.componentDidCatch(d.value,{componentStack:T!==null?T:""})})}r(Yb,"initializeClassErrorUpdate");function c_(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=Za.current,o!==null){switch(o.tag){case 31:case 13:return ps===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),Cm(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)),Cm(n,d,m)),!1}throw Error(c(435,o.tag))}return Cm(n,d,m),Bu(),!1}if(_t)return i=Za.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,d!==yp&&(n=Error(c(422),{cause:d}),Ro(cs(n,o)))):(d!==yp&&(i=Error(c(423),{cause:d}),Ro(cs(i,o))),n=n.current.alternate,n.flags|=65536,m&=-m,n.lanes|=m,d=cs(d,o),m=tm(n.stateNode,d,m),Tp(n,m),En!==4&&(En=2)),!1;var b=Error(c(520),{cause:d});if(b=cs(b,o),Xo===null?Xo=[b]:Xo.push(b),En!==4&&(En=2),i===null)return!0;d=cs(d,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,n=m&-m,o.lanes|=n,n=tm(o.stateNode,d,n),Tp(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"&&(Hi===null||!Hi.has(b))))return o.flags|=65536,m&=-m,o.lanes|=m,m=Gb(m),Yb(m,n,o,d),Tp(o,m),!1}o=o.return}while(o!==null);return!1}r(c_,"throwException");var nm=Error(c(461)),Hn=!1;function ua(n,i,o,d){i.child=n===null?ab(i,null,o,d):Tr(i,n.child,o,d)}r(ua,"reconcileChildren");function Xb(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=zp(n,i,o,w,b,m),T=Pp(),n!==null&&!Hn?($p(n,i,m),gi(n,i,m)):(_t&&T&&bp(i),i.flags|=1,ua(n,i,d,m),i.child)}r(Xb,"updateForwardRef");function Zb(n,i,o,d,m){if(n===null){var b=o.type;return typeof b=="function"&&!hp(b)&&b.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=b,Jb(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,!um(n,m)){var w=b.memoizedProps;if(o=o.compare,o=o!==null?o:Eo,o(w,d)&&n.ref===i.ref)return gi(n,i,m)}return i.flags|=1,n=ui(b,d),n.ref=i.ref,n.return=i,i.child=n}r(Zb,"updateMemoComponent");function Jb(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,um(n,m))(n.flags&131072)!==0&&(Hn=!0);else return i.lanes=n.lanes,gi(n,i,m)}return am(n,i,o,d,m)}r(Jb,"updateSimpleMemoComponent");function ev(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 tv(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?rb(i,b):Mp(),lb(i);else return d=i.lanes=536870912,tv(n,i,b!==null?b.baseLanes|o:o,o,d)}else b!==null?(mu(i,b.cachePool),rb(i,b),Bi(i),i.memoizedState=null):(n!==null&&mu(i,null),Mp(),Bi(i));return ua(n,i,m,o),i.child}r(ev,"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 tv(n,i,o,d,m){var b=Ap();return b=b===null?null:{parent:qn._currentValue,pool:b},i.memoizedState={baseLanes:o,cachePool:b},n!==null&&mu(i,null),Mp(),lb(i),n!==null&&kl(n,i,d,!0),i.childLanes=m,null}r(tv,"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 nv(n,i,o){return Tr(i,n.child,null,o),n=Iu(i,i.pendingProps),n.flags|=2,Ja(i),i.memoizedState=null,n}r(nv,"retryActivityComponentWithoutHydrating");function u_(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(Op(i),(n=vn)?(n=hy(n,fs),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Oi!==null?{id:Hs,overflow:Vs}:null,retryLane:536870912,hydrationErrors:null},o=Kx(n),o.return=i,i.child=o,oa=i,vn=null)):n=null,n===null)throw zi(i);return i.lanes=536870912,null}return Iu(i,d)}var b=n.memoizedState;if(b!==null){var w=b.dehydrated;if(Op(i),m)if(i.flags&256)i.flags&=-257,i=nv(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),qa(d,n,w),nm;Bu(),i=nv(n,i,o)}else n=b.treeContext,vn=hs(w.nextSibling),oa=i,_t=!0,Li=null,fs=!1,n!==null&&Hx(i,n),i=Iu(i,d),i.flags|=4096;return i}return n=ui(n.child,{mode:d.mode,children:d.children}),n.ref=i.ref,i.child=n,n.return=i,n}r(u_,"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 am(n,i,o,d,m){return Ar(i),o=zp(n,i,o,d,void 0,m),d=Pp(),n!==null&&!Hn?($p(n,i,m),gi(n,i,m)):(_t&&d&&bp(i),i.flags|=1,ua(n,i,o,m),i.child)}r(am,"updateFunctionComponent");function av(n,i,o,d,m,b){return Ar(i),i.updateQueue=null,o=cb(i,d,o,m),ob(n),d=Pp(),n!==null&&!Hn?($p(n,i,b),gi(n,i,b)):(_t&&d&&bp(i),i.flags|=1,ua(n,i,o,b),i.child)}r(av,"replayFunctionComponent");function sv(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=em,i.stateNode=b,b._reactInternals=i,b=i.stateNode,b.props=d,b.state=i.memoizedState,b.refs={},Ep(i),w=o.contextType,b.context=typeof w=="object"&&w!==null?ca(w):vl,b.state=i.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(Jp(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&&em.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)&&Wb(i,b,d,w),$i=!1;var ae=i.memoizedState;b.state=ae,$o(i,d,b,m),Po(),ne=i.memoizedState,T||ae!==ne||$i?(typeof xe=="function"&&(Jp(i,o,xe,d),ne=i.memoizedState),(q=$i||Vb(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,Ip(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)&&Wb(i,b,d,q),$i=!1,ae=i.memoizedState,b.state=ae,$o(i,d,b,m),Po();var re=i.memoizedState;w!==xe||ae!==re||$i||n!==null&&n.dependencies!==null&&fu(n.dependencies)?(typeof T=="function"&&(Jp(i,o,T,d),re=i.memoizedState),(fe=$i||Vb(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=gi(n,i,m),n}r(sv,"updateClassComponent");function iv(n,i,o,d){return Nr(),i.flags|=256,ua(n,i,o,d),i.child}r(iv,"mountHostRootWithoutHydrating");var sm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function im(n){return{baseLanes:n,cachePool:Xx()}}r(im,"mountSuspenseOffscreenState");function rm(n,i,o){return n=n!==null?n.childLanes&~o:0,i&&(n|=ts),n}r(rm,"getRemainingWorkInPrimaryTree");function rv(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?Ui(i):Bi(i),(n=vn)?(n=hy(n,fs),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:Oi!==null?{id:Hs,overflow:Vs}:null,retryLane:536870912,hydrationErrors:null},o=Kx(n),o.return=i,i.child=o,oa=i,vn=null)):n=null,n===null)throw zi(i);return Bm(n)?i.lanes=32:i.lanes=536870912,null}var T=d.children;return d=d.fallback,m?(Bi(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=im(o),d.childLanes=rm(n,w,o),i.memoizedState=sm,Fo(null,d)):(Ui(i),lm(i,T))}var q=n.memoizedState;if(q!==null&&(T=q.dehydrated,T!==null)){if(b)i.flags&256?(Ui(i),i.flags&=-257,i=om(n,i,o)):i.memoizedState!==null?(Bi(i),i.child=n.child,i.flags|=128,i=null):(Bi(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=im(o),d.childLanes=rm(n,w,o),i.memoizedState=sm,i=Fo(null,d));else if(Ui(i),Bm(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=om(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),qa(w,n,d),nm;Um(T)||Bu(),i=om(n,i,o)}else Um(T)?(i.flags|=192,i.child=n.child,i=null):(n=q.treeContext,vn=hs(T.nextSibling),oa=i,_t=!0,Li=null,fs=!1,n!==null&&Hx(i,n),i=lm(i,d.children),i.flags|=4096);return i}return m?(Bi(i),T=d.fallback,m=i.mode,q=n.child,ne=q.sibling,d=ui(q,{mode:"hidden",children:d.children}),d.subtreeFlags=q.subtreeFlags&65011712,ne!==null?T=ui(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=im(o):(m=T.cachePool,m!==null?(q=qn._currentValue,m=m.parent!==q?{parent:q,pool:q}:m):m=Xx(),T={baseLanes:T.baseLanes|o,cachePool:m}),d.memoizedState=T,d.childLanes=rm(n,w,o),i.memoizedState=sm,Fo(n.child,d)):(Ui(i),o=n.child,n=o.sibling,o=ui(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(rv,"updateSuspenseComponent");function lm(n,i){return i=Ru({mode:"visible",children:i},n.mode),i.return=n,n.child=i}r(lm,"mountSuspensePrimaryChildren");function Ru(n,i){return n=Xa(22,n,null,i),n.lanes=0,n}r(Ru,"mountWorkInProgressOffscreenFiber");function om(n,i,o){return Tr(i,n.child,null,o),n=lm(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}r(om,"retrySuspenseComponentWithoutHydrating");function lv(n,i,o){n.lanes|=i;var d=n.alternate;d!==null&&(d.lanes|=i),kp(n.return,i,o)}r(lv,"scheduleSuspenseWorkOnFiber");function cm(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(cm,"initSuspenseListRenderState");function ov(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&&lv(n,o,i);else if(n.tag===19)lv(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),cm(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}cm(i,!0,o,null,b,d);break;case"together":cm(i,!1,null,null,void 0,d);break;default:i.memoizedState=null}return i.child}r(ov,"updateSuspenseListComponent");function gi(n,i,o){if(n!==null&&(i.dependencies=n.dependencies),Fi|=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=ui(n,n.pendingProps),i.child=o,o.return=i;n.sibling!==null;)n=n.sibling,o=o.sibling=ui(n,n.pendingProps),o.return=i;o.sibling=null}return i.child}r(gi,"bailoutOnAlreadyFinishedWork");function um(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&fu(n)))}r(um,"checkScheduledUpdateOrContext");function d_(n,i,o){switch(i.tag){case 3:Pe(i,i.stateNode.containerInfo),Pi(i,qn,n.memoizedState.cache),Nr();break;case 27:case 5:ct(i);break;case 4:Pe(i,i.stateNode.containerInfo);break;case 10:Pi(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Op(i),null;break;case 13:var d=i.memoizedState;if(d!==null)return d.dehydrated!==null?(Ui(i),i.flags|=128,null):(o&i.child.childLanes)!==0?rv(n,i,o):(Ui(i),n=gi(n,i,o),n!==null?n.sibling:null);Ui(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 ov(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,ev(n,i,o,i.pendingProps);case 24:Pi(i,qn,n.memoizedState.cache)}return gi(n,i,o)}r(d_,"attemptEarlyBailoutIfNoScheduledUpdate");function cv(n,i,o){if(n!==null)if(n.memoizedProps!==i.pendingProps)Hn=!0;else{if(!um(n,o)&&(i.flags&128)===0)return Hn=!1,d_(n,i,o);Hn=(n.flags&131072)!==0}else Hn=!1,_t&&(i.flags&1048576)!==0&&Fx(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")hp(n)?(d=Or(n,d),i.tag=1,i=sv(null,i,n,d,o)):(i.tag=0,i=am(null,i,n,d,o));else{if(n!=null){var m=n.$$typeof;if(m===D){i.tag=11,i=Xb(null,i,n,d,o);break e}else if(m===z){i.tag=14,i=Zb(null,i,n,d,o);break e}}throw i=ce(n)||n,Error(c(306,i,""))}}return i;case 0:return am(n,i,i.type,i.pendingProps,o);case 1:return d=i.type,m=Or(d,i.pendingProps),sv(n,i,d,m,o);case 3:e:{if(Pe(i,i.stateNode.containerInfo),n===null)throw Error(c(387));d=i.pendingProps;var b=i.memoizedState;m=b.element,Ip(n,i),$o(i,d,null,o);var w=i.memoizedState;if(d=w.cache,Pi(i,qn,d),d!==b.cache&&Sp(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=iv(n,i,d,o);break e}else if(d!==m){m=cs(Error(c(424)),i),Ro(m),i=iv(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=hs(n.firstChild),oa=i,_t=!0,Li=null,fs=!0,o=ab(i,null,d,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Nr(),d===m){i=gi(n,i,o);break e}ua(n,i,d,o)}i=i.child}return i;case 26:return Tu(n,i),n===null?(o=jy(i.type,null,i.pendingProps,null))?i.memoizedState=o:_t||(o=i.type,n=i.pendingProps,d=Qu(ve.current).createElement(o),d[jt]=i,d[un]=n,da(d,o,n),xn(d),i.stateNode=d):i.memoizedState=jy(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return ct(i),n===null&&_t&&(d=i.stateNode=by(i.type,i.pendingProps,ve.current),oa=i,fs=!0,m=vn,Gi(i.type)?(Km=m,vn=hs(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=$_(d,i.type,i.pendingProps,fs),d!==null?(i.stateNode=d,oa=i,vn=hs(d.firstChild),fs=!1,m=!0):m=!1),m||zi(i)),ct(i),m=i.type,b=i.pendingProps,w=n!==null?n.memoizedProps:null,d=b.children,zm(m,b)?d=null:w!==null&&zm(m,w)&&(i.flags|=32),i.memoizedState!==null&&(m=zp(n,i,J2,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=U_(o,i.pendingProps,fs),o!==null?(i.stateNode=o,oa=i,vn=null,n=!0):n=!1),n||zi(i)),null;case 13:return rv(n,i,o);case 4:return Pe(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 Xb(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,Pi(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 Zb(n,i,i.type,i.pendingProps,o);case 15:return Jb(n,i,i.type,i.pendingProps,o);case 19:return ov(n,i,o);case 31:return u_(n,i,o);case 22:return ev(n,i,o,i.pendingProps);case 24:return Ar(i),d=ca(qn),n===null?(m=Ap(),m===null&&(m=fn,b=Np(),m.pooledCache=b,b.refCount++,b!==null&&(m.pooledCacheLanes|=o),m=b),i.memoizedState={parent:d,cache:m},Ep(i),Pi(i,qn,m)):((n.lanes&o)!==0&&(Ip(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),Pi(i,qn,d)):(d=b.cache,Pi(i,qn,d),d!==m.cache&&Sp(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(cv,"beginWork");function xi(n){n.flags|=4}r(xi,"markUpdate");function dm(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(Lv())n.flags|=8192;else throw Ir=gu,_p}else n.flags&=-16777217}r(dm,"preloadInstanceAndSuspendIfNeeded");function uv(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Cy(i))if(Lv())n.flags|=8192;else throw Ir=gu,_p}r(uv,"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 f_(n,i,o){var d=i.pendingProps;switch(vp(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),pi(qn),Ee(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(wl(i)?xi(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,jp())),yn(i),null;case 26:var m=i.type,b=i.memoizedState;return n===null?(xi(i),b!==null?(yn(i),uv(i,b)):(yn(i),dm(i,m,null,d,o))):b?b!==n.memoizedState?(xi(i),yn(i),uv(i,b)):(yn(i),i.flags&=-16777217):(n=n.memoizedProps,n!==d&&xi(i),yn(i),dm(i,m,n,d,o)),null;case 27:if(Ve(i),o=ve.current,m=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==d&&xi(i);else{if(!d){if(i.stateNode===null)throw Error(c(166));return yn(i),null}n=Me.current,wl(i)?Vx(i,n):(n=by(m,d,o),i.stateNode=n,xi(i))}return yn(i),null;case 5:if(Ve(i),m=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==d&&xi(i);else{if(!d){if(i.stateNode===null)throw Error(c(166));return yn(i),null}if(b=Me.current,wl(i))Vx(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[jt]=i,b[un]=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&&xi(i)}}return yn(i),dm(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,o),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==d&&xi(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[jt]=i,n=!!(n.nodeValue===o||d!==null&&d.suppressHydrationWarning===!0||ly(n.nodeValue,o)),n||zi(i,!0)}else n=Qu(n).createTextNode(d),n[jt]=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[jt]=i}else Nr(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;yn(i),n=!1}else o=jp(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return i.flags&256?(Ja(i),i):(Ja(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[jt]=i}else Nr(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;yn(i),m=!1}else m=jp(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(Ja(i),i):(Ja(i),null)}return Ja(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 Ee(),n===null&&ay(i.stateNode.containerInfo),yn(i),null;case 10:return pi(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;)Bx(o,n),o=o.sibling;return ye(Tn,Tn.current&1|2),_t&&di(i,d.treeForkCount),i.child}n=n.sibling}d.tail!==null&&Xe()>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*Xe()-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=Xe(),n.sibling=null,o=Tn.current,ye(Tn,m?o&1|2:o&1),_t&&di(i,d.treeForkCount),n):(yn(i),null);case 22:case 23:return Ja(i),Dp(),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),pi(qn),yn(i),null;case 25:return null;case 30:return null}throw Error(c(156,i.tag))}r(f_,"completeWork");function p_(n,i){switch(vp(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return pi(qn),Ee(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return Ve(i),null;case 31:if(i.memoizedState!==null){if(Ja(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(Ja(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 Ee(),null;case 10:return pi(i.type),null;case 22:case 23:return Ja(i),Dp(),n!==null&&we(_r),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return pi(qn),null;case 25:return null;default:return null}}r(p_,"unwindWork");function dv(n,i){switch(vp(i),i.tag){case 3:pi(qn),Ee();break;case 26:case 27:case 5:Ve(i);break;case 4:Ee();break;case 31:i.memoizedState!==null&&Ja(i);break;case 13:Ja(i);break;case 19:we(Tn);break;case 10:pi(i.type);break;case 22:case 23:Ja(i),Dp(),n!==null&&we(_r);break;case 24:pi(qn)}}r(dv,"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){Xt(i,i.return,T)}}r(Vo,"commitHookEffectListMount");function Ki(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){Xt(m,q,fe)}}}d=d.next}while(d!==b)}}catch(fe){Xt(i,i.return,fe)}}r(Ki,"commitHookEffectListUnmount");function fv(n){var i=n.updateQueue;if(i!==null){var o=n.stateNode;try{ib(i,o)}catch(d){Xt(n,n.return,d)}}}r(fv,"commitClassCallbacks");function pv(n,i,o){o.props=Or(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(d){Xt(n,i,d)}}r(pv,"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){Xt(n,i,m)}}r(Wo,"safelyAttachRef");function Ws(n,i){var o=n.ref,d=n.refCleanup;if(o!==null)if(typeof d=="function")try{d()}catch(m){Xt(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){Xt(n,i,m)}else o.current=null}r(Ws,"safelyDetachRef");function mv(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){Xt(n,n.return,m)}}r(mv,"commitHostMount");function fm(n,i,o){try{var d=n.stateNode;M_(d,n.type,o,i),d[un]=i}catch(m){Xt(n,n.return,m)}}r(fm,"commitHostUpdate");function hv(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Gi(n.type)||n.tag===4}r(hv,"isHostParent");function pm(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||hv(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&&Gi(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(pm,"getHostSibling");function mm(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=wt));else if(d!==4&&(d===27&&Gi(n.type)&&(o=n.stateNode,i=null),n=n.child,n!==null))for(mm(n,i,o),n=n.sibling;n!==null;)mm(n,i,o),n=n.sibling}r(mm,"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&&Gi(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 gv(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[jt]=n,i[un]=o}catch(b){Xt(n,n.return,b)}}r(gv,"commitHostSingletonAcquisition");var bi=!1,Vn=!1,hm=!1,xv=typeof WeakSet=="function"?WeakSet:Set,na=null;function m_(n,i){if(n=n.containerInfo,Om=td,n=Rx(n),op(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(Lm={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 ze=Or(o.type,m);n=d.getSnapshotBeforeUpdate(ze,b),d.__reactInternalSnapshotBeforeUpdate=n}catch(tt){Xt(o,o.return,tt)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,o=n.nodeType,o===9)$m(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":$m(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(m_,"commitBeforeMutationEffects");function bv(n,i,o){var d=o.flags;switch(o.tag){case 0:case 11:case 15:yi(n,o),d&4&&Vo(5,o);break;case 1:if(yi(n,o),d&4)if(n=o.stateNode,i===null)try{n.componentDidMount()}catch(w){Xt(o,o.return,w)}else{var m=Or(o.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(m,i,n.__reactInternalSnapshotBeforeUpdate)}catch(w){Xt(o,o.return,w)}}d&64&&fv(o),d&512&&Wo(o,o.return);break;case 3:if(yi(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{ib(n,i)}catch(w){Xt(o,o.return,w)}}break;case 27:i===null&&d&4&&gv(o);case 26:case 5:yi(n,o),i===null&&d&4&&mv(o),d&512&&Wo(o,o.return);break;case 12:yi(n,o);break;case 31:yi(n,o),d&4&&jv(n,o);break;case 13:yi(n,o),d&4&&wv(n,o),d&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=k_.bind(null,o),B_(n,o))));break;case 22:if(d=o.memoizedState!==null||bi,!d){i=i!==null&&i.memoizedState!==null||Vn,m=bi;var b=Vn;bi=d,(Vn=i)&&!b?ji(n,o,(o.subtreeFlags&8772)!==0):yi(n,o),bi=m,Vn=b}break;case 30:break;default:yi(n,o)}}r(bv,"commitLayoutEffectOnFiber");function vv(n){var i=n.alternate;i!==null&&(n.alternate=null,vv(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(vv,"detachFiberAfterEffects");var jn=null,$a=!1;function vi(n,i,o){for(o=o.child;o!==null;)yv(n,i,o),o=o.sibling}r(vi,"recursivelyTraverseDeletionEffects");function yv(n,i,o){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(On,o)}catch{}switch(o.tag){case 26:Vn||Ws(o,i),vi(n,i,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Vn||Ws(o,i);var d=jn,m=$a;Gi(o.type)&&(jn=o.stateNode,$a=!1),vi(n,i,o),nc(o.stateNode),jn=d,$a=m;break;case 5:Vn||Ws(o,i);case 6:if(d=jn,m=$a,jn=null,vi(n,i,o),jn=d,$a=m,jn!==null)if($a)try{(jn.nodeType===9?jn.body:jn.nodeName==="HTML"?jn.ownerDocument.body:jn).removeChild(o.stateNode)}catch(b){Xt(o,i,b)}else try{jn.removeChild(o.stateNode)}catch(b){Xt(o,i,b)}break;case 18:jn!==null&&($a?(n=jn,py(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),ql(n)):py(jn,o.stateNode));break;case 4:d=jn,m=$a,jn=o.stateNode.containerInfo,$a=!0,vi(n,i,o),jn=d,$a=m;break;case 0:case 11:case 14:case 15:Ki(2,o,i),Vn||Ki(4,o,i),vi(n,i,o);break;case 1:Vn||(Ws(o,i),d=o.stateNode,typeof d.componentWillUnmount=="function"&&pv(o,i,d)),vi(n,i,o);break;case 21:vi(n,i,o);break;case 22:Vn=(d=Vn)||o.memoizedState!==null,vi(n,i,o),Vn=d;break;default:vi(n,i,o)}}r(yv,"commitDeletionEffectsOnFiber");function jv(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ql(n)}catch(o){Xt(i,i.return,o)}}}r(jv,"commitActivityHydrationCallbacks");function wv(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){Xt(i,i.return,o)}}r(wv,"commitSuspenseHydrationCallbacks");function h_(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new xv),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new xv),i;default:throw Error(c(435,n.tag))}}r(h_,"getRetryCache");function Ou(n,i){var o=h_(n);i.forEach(function(d){if(!o.has(d)){o.add(d);var m=S_.bind(null,n,d);d.then(m,m)}})}r(Ou,"attachSuspenseRetryListeners");function Ua(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(Gi(T.type)){jn=T.stateNode,$a=!1;break e}break;case 5:jn=T.stateNode,$a=!1;break e;case 3:case 4:jn=T.stateNode.containerInfo,$a=!0;break e}T=T.return}if(jn===null)throw Error(c(160));yv(b,w,m),jn=null,$a=!1,b=m.alternate,b!==null&&(b.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)kv(i,n),i=i.sibling}r(Ua,"recursivelyTraverseMutationEffects");var Cs=null;function kv(n,i){var o=n.alternate,d=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Ua(i,n),Ba(n),d&4&&(Ki(3,n,n.return),Vo(3,n),Ki(5,n,n.return));break;case 1:Ua(i,n),Ba(n),d&512&&(Vn||o===null||Ws(o,o.return)),d&64&&bi&&(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=Cs;if(Ua(i,n),Ba(n),d&512&&(Vn||o===null||Ws(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[jt]||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[jt]=n,xn(b),d=b;break e;case"link":var w=Sy("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=Sy("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[jt]=n,xn(b),d=b}n.stateNode=d}else Ny(m,n.type,n.stateNode);else n.stateNode=ky(m,d,n.memoizedProps);else b!==d?(b===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):b.count--,d===null?Ny(m,n.type,n.stateNode):ky(m,d,n.memoizedProps)):d===null&&n.stateNode!==null&&fm(n,n.memoizedProps,o.memoizedProps)}break;case 27:Ua(i,n),Ba(n),d&512&&(Vn||o===null||Ws(o,o.return)),o!==null&&d&4&&fm(n,n.memoizedProps,o.memoizedProps);break;case 5:if(Ua(i,n),Ba(n),d&512&&(Vn||o===null||Ws(o,o.return)),n.flags&32){m=n.stateNode;try{st(m,"")}catch(ze){Xt(n,n.return,ze)}}d&4&&n.stateNode!=null&&(m=n.memoizedProps,fm(n,m,o!==null?o.memoizedProps:m)),d&1024&&(hm=!0);break;case 6:if(Ua(i,n),Ba(n),d&4){if(n.stateNode===null)throw Error(c(162));d=n.memoizedProps,o=n.stateNode;try{o.nodeValue=d}catch(ze){Xt(n,n.return,ze)}}break;case 3:if(Xu=null,m=Cs,Cs=Gu(i.containerInfo),Ua(i,n),Cs=m,Ba(n),d&4&&o!==null&&o.memoizedState.isDehydrated)try{ql(i.containerInfo)}catch(ze){Xt(n,n.return,ze)}hm&&(hm=!1,Sv(n));break;case 4:d=Cs,Cs=Gu(n.stateNode.containerInfo),Ua(i,n),Ba(n),Cs=d;break;case 12:Ua(i,n),Ba(n);break;case 31:Ua(i,n),Ba(n),d&4&&(d=n.updateQueue,d!==null&&(n.updateQueue=null,Ou(n,d)));break;case 13:Ua(i,n),Ba(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(zu=Xe()),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=bi,fe=Vn;if(bi=ne||m,Vn=fe||q,Ua(i,n),Vn=fe,bi=ne,Ba(n),d&8192)e:for(i=n.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(o===null||q||bi||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(ze){Xt(q,q.return,ze)}}}else if(i.tag===6){if(o===null){q=i;try{q.stateNode.nodeValue=m?"":q.memoizedProps}catch(ze){Xt(q,q.return,ze)}}}else if(i.tag===18){if(o===null){q=i;try{var re=q.stateNode;m?my(re,!0):my(q.stateNode,!1)}catch(ze){Xt(q,q.return,ze)}}}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:Ua(i,n),Ba(n),d&4&&(d=n.updateQueue,d!==null&&(n.updateQueue=null,Ou(n,d)));break;case 30:break;case 21:break;default:Ua(i,n),Ba(n)}}r(kv,"commitMutationEffectsOnFiber");function Ba(n){var i=n.flags;if(i&2){try{for(var o,d=n.return;d!==null;){if(hv(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,pm(n),m);break;case 5:var b=o.stateNode;o.flags&32&&(st(b,""),o.flags&=-33),Du(n,pm(n),b);break;case 3:case 4:var w=o.stateNode.containerInfo;mm(n,pm(n),w);break;default:throw Error(c(161))}}catch(T){Xt(n,n.return,T)}n.flags&=-3}i&4096&&(n.flags&=-4097)}r(Ba,"commitReconciliationEffects");function Sv(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;Sv(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}r(Sv,"recursivelyResetForms");function yi(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)bv(n,i.alternate,i),i=i.sibling}r(yi,"recursivelyTraverseLayoutEffects");function Lr(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:Ki(4,i,i.return),Lr(i);break;case 1:Ws(i,i.return);var o=i.stateNode;typeof o.componentWillUnmount=="function"&&pv(i,i.return,o),Lr(i);break;case 27:nc(i.stateNode);case 26:case 5:Ws(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 ji(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:ji(m,b,o),Vo(4,b);break;case 1:if(ji(m,b,o),d=b,m=d.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(ne){Xt(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++)sb(q[m],T)}catch(ne){Xt(d,d.return,ne)}}o&&w&64&&fv(b),Wo(b,b.return);break;case 27:gv(b);case 26:case 5:ji(m,b,o),o&&d===null&&w&4&&mv(b),Wo(b,b.return);break;case 12:ji(m,b,o);break;case 31:ji(m,b,o),o&&w&4&&jv(m,b);break;case 13:ji(m,b,o),o&&w&4&&wv(m,b);break;case 22:b.memoizedState===null&&ji(m,b,o),Wo(b,b.return);break;case 30:break;default:ji(m,b,o)}i=i.sibling}}r(ji,"recursivelyTraverseReappearLayoutEffects");function gm(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(gm,"commitOffscreenPassiveMountEffects");function xm(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(xm,"commitCachePassiveMountEffect");function As(n,i,o,d){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Nv(n,i,o,d),i=i.sibling}r(As,"recursivelyTraversePassiveMountEffects");function Nv(n,i,o,d){var m=i.flags;switch(i.tag){case 0:case 11:case 15:As(n,i,o,d),m&2048&&Vo(9,i);break;case 1:As(n,i,o,d);break;case 3:As(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){As(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){Xt(i,i.return,q)}}else As(n,i,o,d);break;case 31:As(n,i,o,d);break;case 13:As(n,i,o,d);break;case 23:break;case 22:b=i.stateNode,w=i.alternate,i.memoizedState!==null?b._visibility&2?As(n,i,o,d):Qo(n,i):b._visibility&2?As(n,i,o,d):(b._visibility|=2,Rl(n,i,o,d,(i.subtreeFlags&10256)!==0||!1)),m&2048&&gm(w,i);break;case 24:As(n,i,o,d),m&2048&&xm(i.alternate,i);break;default:As(n,i,o,d)}}r(Nv,"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&&gm(w.alternate,w);break;case 24:Rl(b,w,T,q,m),m&&ne&2048&&xm(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&&gm(d.alternate,d);break;case 24:Qo(o,d),m&2048&&xm(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;)Cv(n,i,o),n=n.sibling}r(Ml,"recursivelyAccumulateSuspenseyCommit");function Cv(n,i,o){switch(n.tag){case 26:Ml(n,i,o),n.flags&Go&&n.memoizedState!==null&&J_(o,Cs,n.memoizedState,n.memoizedProps);break;case 5:Ml(n,i,o);break;case 3:case 4:var d=Cs;Cs=Gu(n.stateNode.containerInfo),Ml(n,i,o),Cs=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(Cv,"accumulateSuspenseyCommitOnFiber");function Av(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(Av,"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,Ev(d,n)}Av(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)_v(n),n=n.sibling}r(Yo,"recursivelyTraversePassiveUnmountEffects");function _v(n){switch(n.tag){case 0:case 11:case 15:Yo(n),n.flags&2048&&Ki(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(_v,"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,Ev(d,n)}Av(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:Ki(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 Ev(n,i){for(;na!==null;){var o=na;switch(o.tag){case 0:case 11:case 15:Ki(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(vv(d),d===o){na=null;break e}if(m!==null){m.return=b,na=m;break e}na=b}}}r(Ev,"commitPassiveUnmountEffectsInsideOfDeletedTree_begin");var g_={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")},x_=typeof WeakMap=="function"?WeakMap:Map,Ft=0,fn=null,kt=null,Nt=0,Yt=0,es=null,qi=!1,Dl=!1,bm=!1,wi=0,En=0,Fi=0,zr=0,vm=0,ts=0,Ol=0,Xo=null,Ka=null,ym=!1,zu=0,Iv=0,Pu=1/0,$u=null,Hi=null,Yn=0,Vi=null,Ll=null,ki=0,jm=0,wm=null,Tv=null,Zo=0,km=null;function ms(){return(Ft&2)!==0&&Nt!==0?Nt&-Nt:A.T!==null?Em():wa()}r(ms,"requestUpdateLane");function Rv(){if(ts===0)if((Nt&536870912)===0||_t){var n=_e;_e<<=1,(_e&3932160)===0&&(_e=262144),ts=n}else ts=536870912;return n=Za.current,n!==null&&(n.flags|=32),ts}r(Rv,"requestDeferredLane");function qa(n,i,o){(n===fn&&(Yt===2||Yt===9)||n.cancelPendingCommit!==null)&&(zl(n,0),Wi(n,Nt,ts,!1)),tn(n,o),((Ft&2)===0||n!==fn)&&(n===fn&&((Ft&2)===0&&(zr|=o),En===4&&Wi(n,Nt,ts,!1)),Si(n))}r(qa,"scheduleUpdateOnFiber");function Mv(n,i,o){if((Ft&6)!==0)throw Error(c(327));var d=!o&&(i&127)===0&&(i&n.expiredLanes)===0||Le(n,i),m=d?y_(n,i):Nm(n,i,!0),b=d;do{if(m===0){Dl&&!d&&Wi(n,i,0,!1);break}else{if(o=n.current.alternate,b&&!b_(o)){m=Nm(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=Nm(T,w,!1),w!==2){if(bm&&!q){T.errorRecoveryDisabledLanes|=b,zr|=b,m=4;break e}b=Ka,Ka=m,b!==null&&(Ka===null?Ka=b:Ka.push.apply(Ka,b))}m=w}if(b=!1,m!==2)continue}}if(m===1){zl(n,0),Wi(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:Wi(d,i,ts,!qi);break e;case 2:Ka=null;break;case 3:case 5:break;default:throw Error(c(329))}if((i&62914560)===i&&(m=zu+300-Xe(),10<m)){if(Wi(d,i,ts,!qi),Dt(d,0,!0)!==0)break e;ki=i,d.timeoutHandle=dy(Dv.bind(null,d,o,Ka,$u,ym,i,ts,zr,Ol,qi,b,"Throttled",-0,0),m);break e}Dv(d,o,Ka,$u,ym,i,ts,zr,Ol,qi,b,null,-0,0)}}break}while(!0);Si(n)}r(Mv,"performWorkOnRoot");function Dv(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:wt},Cv(i,b,xe);var ze=(b&62914560)===b?zu-Xe():(b&4194048)===b?Iv-Xe():0;if(ze=eE(xe,ze),ze!==null){ki=b,n.cancelPendingCommit=ze(Kv.bind(null,n,i,b,o,d,m,w,T,q,fe,xe,null,ae,re)),Wi(n,b,w,!ne);return}}Kv(n,i,b,o,d,m,w,T,q)}r(Dv,"commitRootWhenReady");function b_(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(!Ya(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(b_,"isRenderConsistentWithExternalStores");function Wi(n,i,o,d){i&=~vm,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(Wi,"markRootSuspended");function Uu(){return(Ft&6)===0?(Jo(0,!1),!1):!0}r(Uu,"flushSyncWork$1");function Sm(){if(kt!==null){if(Yt===0)var n=kt.return;else n=kt,fi=Cr=null,Up(n),Al=null,Oo=0,n=kt;for(;n!==null;)dv(n.alternate,n),n=n.return;kt=null}}r(Sm,"resetWorkInProgressStack");function zl(n,i){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,L_(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),ki=0,Sm(),fn=n,kt=o=ui(n.current,null),Nt=i,Yt=0,es=null,qi=!1,Dl=Le(n,i),bm=!1,Ol=ts=vm=zr=Fi=En=0,Ka=Xo=null,ym=!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 wi=i,lu(),o}r(zl,"prepareFreshStack");function Ov(n,i){ot=null,A.H=qo,i===Cl||i===hu?(i=eb(),Yt=3):i===_p?(i=eb(),Yt=4):Yt=i===nm?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,es=i,kt===null&&(En=1,Eu(n,cs(i,n.current)))}r(Ov,"handleThrow");function Lv(){var n=Za.current;return n===null?!0:(Nt&4194048)===Nt?ps===null:(Nt&62914560)===Nt||(Nt&536870912)!==0?n===ps:!1}r(Lv,"shouldRemainOnPreviousScreen");function zv(){var n=A.H;return A.H=qo,n===null?qo:n}r(zv,"pushDispatcher");function Pv(){var n=A.A;return A.A=g_,n}r(Pv,"pushAsyncDispatcher");function Bu(){En=4,qi||(Nt&4194048)!==Nt&&Za.current!==null||(Dl=!0),(Fi&134217727)===0&&(zr&134217727)===0||fn===null||Wi(fn,Nt,ts,!1)}r(Bu,"renderDidSuspendDelayIfPossible");function Nm(n,i,o){var d=Ft;Ft|=2;var m=zv(),b=Pv();(fn!==n||Nt!==i)&&($u=null,zl(n,i)),i=!1;var w=En;e:do try{if(Yt!==0&&kt!==null){var T=kt,q=es;switch(Yt){case 8:Sm(),w=6;break e;case 3:case 2:case 9:case 6:Za.current===null&&(i=!0);var ne=Yt;if(Yt=0,es=null,Pl(n,T,q,ne),o&&Dl){w=0;break e}break;default:ne=Yt,Yt=0,es=null,Pl(n,T,q,ne)}}v_(),w=En;break}catch(fe){Ov(n,fe)}while(!0);return i&&n.shellSuspendCounter++,fi=Cr=null,Ft=d,A.H=m,A.A=b,kt===null&&(fn=null,Nt=0,lu()),w}r(Nm,"renderRootSync");function v_(){for(;kt!==null;)$v(kt)}r(v_,"workLoopSync");function y_(n,i){var o=Ft;Ft|=2;var d=zv(),m=Pv();fn!==n||Nt!==i?($u=null,Pu=Xe()+500,zl(n,i)):Dl=Le(n,i);e:do try{if(Yt!==0&&kt!==null){i=kt;var b=es;t:switch(Yt){case 1:Yt=0,es=null,Pl(n,i,b,1);break;case 2:case 9:if(Zx(b)){Yt=0,es=null,Uv(i);break}i=r(function(){Yt!==2&&Yt!==9||fn!==n||(Yt=7),Si(n)},"lanes"),b.then(i,i);break e;case 3:Yt=7;break e;case 4:Yt=5;break e;case 7:Zx(b)?(Yt=0,es=null,Uv(i)):(Yt=0,es=null,Pl(n,i,b,7));break;case 5:var w=null;switch(kt.tag){case 26:w=kt.memoizedState;case 5:case 27:var T=kt;if(w?Cy(w):T.stateNode.complete){Yt=0,es=null;var q=T.sibling;if(q!==null)kt=q;else{var ne=T.return;ne!==null?(kt=ne,Ku(ne)):kt=null}break t}}Yt=0,es=null,Pl(n,i,b,5);break;case 6:Yt=0,es=null,Pl(n,i,b,6);break;case 8:Sm(),En=6;break e;default:throw Error(c(462))}}j_();break}catch(fe){Ov(n,fe)}while(!0);return fi=Cr=null,A.H=d,A.A=m,Ft=o,kt!==null?0:(fn=null,Nt=0,lu(),En)}r(y_,"renderRootConcurrent");function j_(){for(;kt!==null&&!$();)$v(kt)}r(j_,"workLoopConcurrentByScheduler");function $v(n){var i=cv(n.alternate,n,wi);n.memoizedProps=n.pendingProps,i===null?Ku(n):kt=i}r($v,"performUnitOfWork");function Uv(n){var i=n,o=i.alternate;switch(i.tag){case 15:case 0:i=av(o,i,i.pendingProps,i.type,void 0,Nt);break;case 11:i=av(o,i,i.pendingProps,i.type.render,i.ref,Nt);break;case 5:Up(i);default:dv(o,i),i=kt=Bx(i,wi),i=cv(o,i,wi)}n.memoizedProps=n.pendingProps,i===null?Ku(n):kt=i}r(Uv,"replaySuspendedUnitOfWork");function Pl(n,i,o,d){fi=Cr=null,Up(i),Al=null,Oo=0;var m=i.return;try{if(c_(n,m,i,o,Nt)){En=1,Eu(n,cs(o,n.current)),kt=null;return}}catch(b){if(m!==null)throw kt=m,b;En=1,Eu(n,cs(o,n.current)),kt=null;return}i.flags&32768?(_t||d===1?n=!0:Dl||(Nt&536870912)!==0?n=!1:(qi=n=!0,(d===2||d===9||d===3||d===6)&&(d=Za.current,d!==null&&d.tag===13&&(d.flags|=16384))),Bv(i,n)):Ku(i)}r(Pl,"throwAndUnwindWorkLoop");function Ku(n){var i=n;do{if((i.flags&32768)!==0){Bv(i,qi);return}n=i.return;var o=f_(i.alternate,i,wi);if(o!==null){kt=o;return}if(i=i.sibling,i!==null){kt=i;return}kt=i=n}while(i!==null);En===0&&(En=5)}r(Ku,"completeUnitOfWork");function Bv(n,i){do{var o=p_(n.alternate,n);if(o!==null){o.flags&=32767,kt=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!i&&(n=n.sibling,n!==null)){kt=n;return}kt=n=o}while(n!==null);En=6,kt=null}r(Bv,"unwindUnitOfWork");function Kv(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|=pp,Wt(n,o,b,w,T,q),n===fn&&(kt=fn=null,Nt=0),Ll=i,Vi=n,ki=o,jm=b,wm=m,Tv=d,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,N_(ea,function(){return Wv(),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{m_(n,i,o)}finally{Ft=w,ee.p=m,A.T=d}}Yn=1,qv(),Fv(),Hv()}}r(Kv,"commitRoot");function qv(){if(Yn===1){Yn=0;var n=Vi,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{kv(i,n);var b=Lm,w=Rx(n.containerInfo),T=b.focusedElem,q=b.selectionRange;if(w!==T&&T&&T.ownerDocument&&Tx(T.ownerDocument.documentElement,T)){if(q!==null&&op(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(),ze=T.textContent.length,tt=Math.min(q.start,ze),ln=q.end===void 0?tt:Math.min(q.end,ze);!re.extend&&tt>ln&&(w=ln,ln=tt,tt=w);var G=Ix(T,tt),H=Ix(T,ln);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>ln?(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=!!Om,Lm=Om=null}finally{Ft=m,ee.p=d,A.T=o}}n.current=i,Yn=2}}r(qv,"flushMutationEffects");function Fv(){if(Yn===2){Yn=0;var n=Vi,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{bv(n,i.alternate,i)}finally{Ft=m,ee.p=d,A.T=o}}Yn=3}}r(Fv,"flushLayoutEffects");function Hv(){if(Yn===4||Yn===3){Yn=0,qe();var n=Vi,i=Ll,o=ki,d=Tv;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Yn=5:(Yn=0,Ll=Vi=null,Vv(n,n.pendingLanes));var m=n.pendingLanes;if(m===0&&(Hi=null),Da(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}}(ki&3)!==0&&qu(),Si(n),m=n.pendingLanes,(o&261930)!==0&&(m&42)!==0?n===km?Zo++:(Zo=0,km=n):Zo=0,Jo(0,!1)}}r(Hv,"flushSpawnedWork");function Vv(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,Mo(i)))}r(Vv,"releaseRootPooledCache");function qu(){return qv(),Fv(),Hv(),Wv()}r(qu,"flushPendingEffects");function Wv(){if(Yn!==5)return!1;var n=Vi,i=jm;jm=0;var o=Da(ki),d=A.T,m=ee.p;try{ee.p=32>o?32:o,A.T=null,o=wm,wm=null;var b=Vi,w=ki;if(Yn=0,Ll=Vi=null,ki=0,(Ft&6)!==0)throw Error(c(331));var T=Ft;if(Ft|=4,_v(b.current),Nv(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,Vv(n,i)}}r(Wv,"flushPassiveEffects");function Qv(n,i,o){i=cs(o,i),i=tm(n.stateNode,i,2),n=Mr(n,i,2),n!==null&&(tn(n,2),Si(n))}r(Qv,"captureCommitPhaseErrorOnRoot");function Xt(n,i,o){if(n.tag===3)Qv(n,n,o);else for(;i!==null;){if(i.tag===3){Qv(i,n,o);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Hi===null||!Hi.has(d))){n=cs(o,n),o=Gb(2),d=Mr(i,o,2),d!==null&&(Yb(o,d,i,n),tn(d,2),Si(d));break}}i=i.return}}r(Xt,"captureCommitPhaseError");function Cm(n,i,o){var d=n.pingCache;if(d===null){d=n.pingCache=new x_;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)||(bm=!0,m.add(o),n=w_.bind(null,n,i,o),i.then(n,n))}r(Cm,"attachPingListener");function w_(n,i,o){var d=n.pingCache;d!==null&&d.delete(i),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,fn===n&&(Nt&o)===o&&(En===4||En===3&&(Nt&62914560)===Nt&&300>Xe()-zu?(Ft&2)===0&&zl(n,0):vm|=o,Ol===Nt&&(Ol=0)),Si(n)}r(w_,"pingSuspendedRoot");function Gv(n,i){i===0&&(i=Rt()),n=kr(n,i),n!==null&&(tn(n,i),Si(n))}r(Gv,"retryTimedOutBoundary");function k_(n){var i=n.memoizedState,o=0;i!==null&&(o=i.retryLane),Gv(n,o)}r(k_,"retryDehydratedSuspenseBoundary");function S_(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),Gv(n,o)}r(S_,"resolveRetryWakeable");function N_(n,i){return gt(n,i)}r(N_,"scheduleCallback$1");var Fu=null,$l=null,Am=!1,Hu=!1,_m=!1,Qi=0;function Si(n){n!==$l&&n.next===null&&($l===null?Fu=$l=n:$l=$l.next=n),Hu=!0,Am||(Am=!0,A_())}r(Si,"ensureRootIsScheduled");function Jo(n,i){if(!_m&&Hu){_m=!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,Jv(d,b))}else b=Nt,b=Dt(d,d===fn?b:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(b&3)===0||Le(d,b)||(o=!0,Jv(d,b));d=d.next}while(o);_m=!1}}r(Jo,"flushSyncWorkAcrossRoots_impl");function C_(){Yv()}r(C_,"processRootScheduleInImmediateTask");function Yv(){Hu=Am=!1;var n=0;Qi!==0&&O_()&&(n=Qi);for(var i=Xe(),o=null,d=Fu;d!==null;){var m=d.next,b=Xv(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),Qi!==0&&(Qi=0)}r(Yv,"processRootScheduleInMicrotask");function Xv(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=Nt,o=Dt(n,n===i?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),d=n.callbackNode,o===0||n===i&&(Yt===2||Yt===9)||n.cancelPendingCommit!==null)return d!==null&&d!==null&&cn(d),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||Le(n,o)){if(i=o&-o,i===n.callbackPriority)return i;switch(d!==null&&cn(d),Da(o)){case 2:case 8:o=Kt;break;case 32:o=ea;break;case 268435456:o=Mt;break;default:o=ea}return d=Zv.bind(null,n),o=gt(o,d),n.callbackPriority=i,n.callbackNode=o,i}return d!==null&&d!==null&&cn(d),n.callbackPriority=2,n.callbackNode=null,2}r(Xv,"scheduleTaskForRootDuringMicrotask");function Zv(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=Nt;return d=Dt(n,n===fn?d:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),d===0?null:(Mv(n,d,i),Xv(n,Xe()),n.callbackNode!=null&&n.callbackNode===o?Zv.bind(null,n):null)}r(Zv,"performWorkOnRootViaSchedulerTask");function Jv(n,i){if(qu())return null;Mv(n,i,!0)}r(Jv,"performSyncWorkOnRoot");function A_(){z_(function(){(Ft&6)!==0?gt(at,C_):Yv()})}r(A_,"scheduleImmediateRootScheduleTask");function Em(){if(Qi===0){var n=Sl;n===0&&(n=At,At<<=1,(At&261888)===0&&(At=256)),Qi=n}return Qi}r(Em,"requestTransitionLane");function ey(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Cn(""+n)}r(ey,"coerceFormActionProp");function ty(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(ty,"createFormDataWithSubmitter");function __(n,i,o,d,m){if(i==="submit"&&o&&o.stateNode===m){var b=ey((m[un]||null).action),w=d.submitter;w&&(i=(i=w[un]||null)?ey(i.formAction):w.getAttribute("formAction"),i!==null&&(b=i,w=null));var T=new Mi("action","action",null,d,m);n.push({event:T,listeners:[{instance:null,listener:r(function(){if(d.defaultPrevented){if(Qi!==0){var q=w?ty(m,w):new FormData(m);Gp(o,{pending:!0,data:q,method:m.method,action:b},null,q)}}else typeof b=="function"&&(T.preventDefault(),q=w?ty(m,w):new FormData(m),Gp(o,{pending:!0,data:q,method:m.method,action:b},b,q))},"listener"),currentTarget:m}]})}}r(__,"extractEvents$1");for(var Im=0;Im<fp.length;Im++){var Tm=fp[Im];Ns(Tm.toLowerCase(),"on"+(Tm[0].toUpperCase()+Tm.slice(1)))}Ns(Ox,"onAnimationEnd"),Ns(Lx,"onAnimationIteration"),Ns(zx,"onAnimationStart"),Ns("dblclick","onDoubleClick"),Ns("focusin","onFocus"),Ns("focusout","onBlur"),Ns(q2,"onTransitionRun"),Ns(F2,"onTransitionStart"),Ns(H2,"onTransitionCancel"),Ns(Px,"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(" "),E_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ec));function ny(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(ny,"processDispatchQueue");function St(n,i){var o=i[ai];o===void 0&&(o=i[ai]=new Set);var d=n+"__bubble";o.has(d)||(sy(i,n,2,!1),o.add(d))}r(St,"listenToNonDelegatedEvent");function Rm(n,i,o){var d=0;i&&(d|=4),sy(o,n,d,i)}r(Rm,"listenToNativeEvent");var Vu="_reactListening"+Math.random().toString(36).slice(2);function ay(n){if(!n[Vu]){n[Vu]=!0,is.forEach(function(o){o!=="selectionchange"&&(E_.has(o)||Rm(o,!1,n),Rm(o,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[Vu]||(i[Vu]=!0,Rm("selectionchange",!1,i))}}r(ay,"listenToAllSupportedEvents");function sy(n,i,o,d){switch(Ty(i)){case 2:var m=iE;break;case 8:m=rE;break;default:m=Wm}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(sy,"addTrappedEventListener");function Mm(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=nn(o),xe=[];e:{var ae=$x.get(n);if(ae!==void 0){var re=Mi,ze=n;switch(n){case"keypress":if(li(o)===0)break e;case"keydown":case"keyup":re=Zc;break;case"focusin":ze="focus",re=an;break;case"focusout":ze="blur",re=an;break;case"beforeblur":case"afterblur":re=an;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=ip;break;case Ox:case Lx:case zx:re=An;break;case Px: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,ln=!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=xr(H,G),pe!=null&&tt.push(tc(H,pe,te))),ln)break;H=H.return}0<tt.length&&(ae=new re(ae,ze,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&&(ze=o.relatedTarget||o.fromElement)&&(ha(ze)||ze[Oa]))break e;if((re||ae)&&(ae=fe.window===fe?fe:(ae=fe.ownerDocument)?ae.defaultView||ae.parentWindow:window,re?(ze=o.relatedTarget||o.toElement,re=ne,ze=ze?ha(ze):null,ze!==null&&(ln=p(ze),tt=ze.tag,ze!==ln||tt!==5&&tt!==27&&tt!==6)&&(ze=null)):(re=null,ze=ne),re!==ze)){if(tt=Kn,pe="onMouseLeave",G="onMouseEnter",H="mouse",(n==="pointerout"||n==="pointerover")&&(tt=cl,pe="onPointerLeave",G="onPointerEnter",H="pointer"),ln=re==null?ae:Gn(re),te=ze==null?ae:Gn(ze),ae=new tt(pe,H+"leave",re,o,fe),ae.target=ln,ae.relatedTarget=te,pe=null,ha(fe)===ne&&(tt=new tt(G,H+"enter",ze,o,fe),tt.target=te,tt.relatedTarget=ln,pe=tt),ln=pe,re&&ze)t:{for(tt=I_,G=re,H=ze,te=0,pe=G;pe;pe=tt(pe))te++;pe=0;for(var Ge=H;Ge;Ge=tt(Ge))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&&iy(xe,ae,re,tt,!1),ze!==null&&ln!==null&&iy(xe,ln,ze,tt,!0)}}e:{if(ae=ne?Gn(ne):window,re=ae.nodeName&&ae.nodeName.toLowerCase(),re==="select"||re==="input"&&ae.type==="file")var $t=Aa;else if(au(ae))if(iu)$t=U2;else{$t=P2;var Ke=z2}else re=ae.nodeName,!re||re.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?ne&&Bn(ne.elementType)&&($t=Aa):$t=$2;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,cp=ne,Io=null);break;case"focusout":Io=cp=gl=null;break;case"mousedown":up=!0;break;case"contextmenu":case"mouseup":case"dragend":up=!1,Mx(xe,o,fe);break;case"selectionchange":if(K2)break;case"keydown":case"keyup":Mx(xe,o,fe)}var ft;if(fl)e:{switch(n){case"compositionstart":var Ct="onCompositionStart";break e;case"compositionend":Ct="onCompositionEnd";break e;case"compositionupdate":Ct="onCompositionUpdate";break e}Ct=void 0}else ls?nu(n,o)&&(Ct="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(Ct="onCompositionStart");Ct&&(pl&&o.locale!=="ko"&&(ls||Ct!=="onCompositionStart"?Ct==="onCompositionEnd"&&ls&&(ft=br()):(ks=fe,il="value"in ks?ks.value:ks.textContent,ls=!0)),Ke=Wu(ne,Ct),0<Ke.length&&(Ct=new Fs(Ct,n,null,o,fe),xe.push({event:Ct,listeners:Ke}),ft?Ct.data=ft:(ft=ml(o),ft!==null&&(Ct.data=ft)))),(ft=ci?Co(n,o):rp(n,o))&&(Ct=Wu(ne,"onBeforeInput"),0<Ct.length&&(Ke=new Fs("onBeforeInput","beforeinput",null,o,fe),xe.push({event:Ke,listeners:Ct}),Ke.data=ft)),__(xe,n,ne,o,fe)}ny(xe,i)})}r(Mm,"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=xr(n,o),m!=null&&d.unshift(tc(n,m,b)),m=xr(n,i),m!=null&&d.push(tc(n,m,b))),n.tag===3)return d;n=n.return}return[]}r(Wu,"accumulateTwoPhaseListeners");function I_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}r(I_,"getParent");function iy(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=xr(o,b),ne!=null&&w.unshift(tc(o,ne,q))):m||(ne=xr(o,b),ne!=null&&w.push(tc(o,ne,q)))),o=o.return}w.length!==0&&n.push({event:i,listeners:w})}r(iy,"accumulateEnterLeaveListenersForEvent");var T_=/\r\n?/g,R_=/\u0000|\uFFFD/g;function ry(n){return(typeof n=="string"?n:""+n).replace(T_,`
67
+ `).replace(R_,"")}r(ry,"normalizeMarkupForTextOrAttribute");function ly(n,i){return i=ry(i),ry(n)===i}r(ly,"checkForUnmatchedText");function rn(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":za(n,"class",d);break;case"tabIndex":za(n,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":za(n,o,d);break;case"style":bn(n,d,b);break;case"data":if(i!=="object"){za(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"&&rn(n,i,"name",m.name,m,null),rn(n,i,"formEncType",m.formEncType,m,null),rn(n,i,"formMethod",m.formMethod,m,null),rn(n,i,"formTarget",m.formTarget,m,null)):(rn(n,i,"encType",m.encType,m,null),rn(n,i,"method",m.method,m,null),rn(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=wt);break;case"onScroll":d!=null&&St("scroll",n);break;case"onScrollEnd":d!=null&&St("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":St("beforetoggle",n),St("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=Wa.get(o)||o,Na(n,o,d))}}r(rn,"setProp");function Dm(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&&St("scroll",n);break;case"onScrollEnd":d!=null&&St("scrollend",n);break;case"onClick":d!=null&&(n.onclick=wt);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[un]||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(Dm,"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":St("error",n),St("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:rn(n,i,b,w,o,null)}}m&&rn(n,i,"srcSet",o.srcSet,o,null),d&&rn(n,i,"src",o.src,o,null);return;case"input":St("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:rn(n,i,d,fe,o,null)}}Qt(n,b,T,q,ne,w,m,!1);return;case"select":St("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:rn(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":St("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:rn(n,i,w,T,o,null)}$e(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":rn(n,i,q,d,o,null));return;case"dialog":St("beforetoggle",n),St("toggle",n),St("cancel",n),St("close",n);break;case"iframe":case"object":St("load",n);break;case"video":case"audio":for(d=0;d<ec.length;d++)St(ec[d],n);break;case"image":St("error",n),St("load",n);break;case"details":St("toggle",n);break;case"embed":case"source":case"link":St("error",n),St("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:rn(n,i,ne,d,o,null)}return;default:if(Bn(i)){for(fe in o)o.hasOwnProperty(fe)&&(d=o[fe],d!==void 0&&Dm(n,i,fe,d,o,void 0));return}}for(T in o)o.hasOwnProperty(T)&&(d=o[T],d!=null&&rn(n,i,T,d,o,null))}r(da,"setInitialProperties");function M_(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)||rn(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&&rn(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)||rn(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&&rn(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:rn(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&&rn(n,i,w,m,d,b)}Be(n,ae,re);return;case"option":for(var ze in o)ae=o[ze],o.hasOwnProperty(ze)&&ae!=null&&!d.hasOwnProperty(ze)&&(ze==="selected"?n.selected=!1:rn(n,i,ze,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":rn(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)&&rn(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:rn(n,i,ne,ae,d,re)}return;default:if(Bn(i)){for(var ln in o)ae=o[ln],o.hasOwnProperty(ln)&&ae!==void 0&&!d.hasOwnProperty(ln)&&Dm(n,i,ln,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||Dm(n,i,fe,ae,d,re);return}}for(var G in o)ae=o[G],o.hasOwnProperty(G)&&ae!=null&&!d.hasOwnProperty(G)&&rn(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||rn(n,i,xe,ae,d,re)}r(M_,"updateProperties");function oy(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}r(oy,"isLikelyStaticResource");function D_(){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&&oy(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&&oy(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(D_,"estimateBandwidth");var Om=null,Lm=null;function Qu(n){return n.nodeType===9?n:n.ownerDocument}r(Qu,"getOwnerDocumentFromRootContainer");function cy(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(cy,"getOwnHostContext");function uy(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(uy,"getChildHostContextProd");function zm(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(zm,"shouldSetTextContent");var Pm=null;function O_(){var n=window.event;return n&&n.type==="popstate"?n===Pm?!1:(Pm=n,!0):(Pm=null,!1)}r(O_,"shouldAttemptEagerTransition");var dy=typeof setTimeout=="function"?setTimeout:void 0,L_=typeof clearTimeout=="function"?clearTimeout:void 0,fy=typeof Promise=="function"?Promise:void 0,z_=typeof queueMicrotask=="function"?queueMicrotask:typeof fy<"u"?function(n){return fy.resolve(null).then(n).catch(P_)}:dy;function P_(n){setTimeout(function(){throw n})}r(P_,"handleErrorInNextTick");function Gi(n){return n==="head"}r(Gi,"isSingletonScope");function py(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(py,"clearHydrationBoundary");function my(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(my,"hideOrUnhideDehydratedBoundary");function $m(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":$m(o),ma(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}r($m,"clearContainerSparingly");function $_(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=hs(n.nextSibling),n===null)break}return null}r($_,"canHydrateInstance");function U_(n,i,o){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=hs(n.nextSibling),n===null))return null;return n}r(U_,"canHydrateTextInstance");function hy(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=hs(n.nextSibling),n===null))return null;return n}r(hy,"canHydrateHydrationBoundary");function Um(n){return n.data==="$?"||n.data==="$~"}r(Um,"isSuspenseInstancePending");function Bm(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}r(Bm,"isSuspenseInstanceFallback");function B_(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(B_,"registerSuspenseInstanceRetry");function hs(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(hs,"getNextHydratable");var Km=null;function gy(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(i===0)return hs(n.nextSibling);i--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||i++}n=n.nextSibling}return null}r(gy,"getNextHydratableInstanceAfterHydrationBoundary");function xy(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(xy,"getParentHydrationBoundary");function by(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(by,"resolveSingletonInstance");function nc(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);ma(n)}r(nc,"releaseSingletonInstance");var gs=new Map,vy=new Set;function Gu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}r(Gu,"getHoistableRoot");var Ni=ee.d;ee.d={f:K_,r:q_,D:F_,C:H_,L:V_,m:W_,X:G_,S:Q_,M:Y_};function K_(){var n=Ni.f(),i=Uu();return n||i}r(K_,"flushSyncWork");function q_(n){var i=$n(n);i!==null&&i.tag===5&&i.type==="form"?Pb(i):Ni.r(n)}r(q_,"requestFormReset");var Ul=typeof document>"u"?null:document;function yy(n,i,o){var d=Ul;if(d&&typeof i=="string"&&i){var m=Qe(i);m='link[rel="'+n+'"][href="'+m+'"]',typeof o=="string"&&(m+='[crossorigin="'+o+'"]'),vy.has(m)||(vy.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(yy,"preconnectAs");function F_(n){Ni.D(n),yy("dns-prefetch",n,null)}r(F_,"prefetchDNS");function H_(n,i){Ni.C(n,i),yy("preconnect",n,i)}r(H_,"preconnect");function V_(n,i,o){Ni.L(n,i,o);var d=Ul;if(d&&n&&i){var m='link[rel="preload"][as="'+Qe(i)+'"]';i==="image"&&o&&o.imageSrcSet?(m+='[imagesrcset="'+Qe(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(m+='[imagesizes="'+Qe(o.imageSizes)+'"]')):m+='[href="'+Qe(n)+'"]';var b=m;switch(i){case"style":b=Bl(n);break;case"script":b=Kl(n)}gs.has(b)||(n=j({rel:"preload",href:i==="image"&&o&&o.imageSrcSet?void 0:n,as:i},o),gs.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(V_,"preload");function W_(n,i){Ni.m(n,i);var o=Ul;if(o&&n){var d=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+Qe(d)+'"][href="'+Qe(n)+'"]',b=m;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Kl(n)}if(!gs.has(b)&&(n=j({rel:"modulepreload",href:n},i),gs.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(W_,"preloadModule");function Q_(n,i,o){Ni.S(n,i,o);var d=Ul;if(d&&n){var m=La(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=gs.get(b))&&qm(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(Q_,"preinitStyle");function G_(n,i){Ni.X(n,i);var o=Ul;if(o&&n){var d=La(o).hoistableScripts,m=Kl(n),b=d.get(m);b||(b=o.querySelector(sc(m)),b||(n=j({src:n,async:!0},i),(i=gs.get(m))&&Fm(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(G_,"preinitScript");function Y_(n,i){Ni.M(n,i);var o=Ul;if(o&&n){var d=La(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=gs.get(m))&&Fm(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(Y_,"preinitModuleScript");function jy(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=La(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=La(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),gs.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},gs.set(n,o),b||X_(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=La(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(jy,"getResource");function Bl(n){return'href="'+Qe(n)+'"'}r(Bl,"getStyleKey");function ac(n){return'link[rel="stylesheet"]['+n+"]"}r(ac,"getStylesheetSelectorFromKey");function wy(n){return j({},n,{"data-precedence":n.precedence,precedence:null})}r(wy,"stylesheetPropsFromRawProps");function X_(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(X_,"preloadStylesheet");function Kl(n){return'[src="'+Qe(n)+'"]'}r(Kl,"getScriptKey");function sc(n){return"script[async]"+n}r(sc,"getScriptSelectorFromKey");function ky(n,i,o){if(i.count++,i.instance===null)switch(i.type){case"style":var d=n.querySelector('style[data-href~="'+Qe(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=wy(o),(m=gs.get(m))&&qm(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=gs.get(b))&&(d=j({},o),Fm(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(ky,"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 qm(n,i){n.crossOrigin??=i.crossOrigin,n.referrerPolicy??=i.referrerPolicy,n.title??=i.title}r(qm,"adoptPreloadPropsForStylesheet");function Fm(n,i){n.crossOrigin??=i.crossOrigin,n.referrerPolicy??=i.referrerPolicy,n.integrity??=i.integrity}r(Fm,"adoptPreloadPropsForScript");var Xu=null;function Sy(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[jt]||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(Sy,"getHydratableHoistableCache");function Ny(n,i,o){n=n.ownerDocument||n,n.head.insertBefore(o,i==="title"?n.querySelector("head > title"):null)}r(Ny,"mountHoistable");function Z_(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(Z_,"isHostHoistableType");function Cy(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}r(Cy,"preloadResource");function J_(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=wy(d),(m=gs.get(m))&&qm(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(J_,"suspendResource");var Hm=0;function eE(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&&Hm===0&&(Hm=62500*D_());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>Hm?50:800)+i);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(d),clearTimeout(m)}}:null}r(eE,"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(tE,n),Ju=null,Zu.call(n))}r(ed,"insertSuspendedStylesheets");function tE(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(tE,"insertStylesheetIntoRoot");var ic={$$typeof:_,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function nE(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(nE,"FiberRootNode");function aE(n,i,o,d,m,b,w,T,q,ne,fe,xe){return n=new nE(n,i,o,w,q,ne,fe,xe,T),i=1,b===!0&&(i|=24),b=Xa(3,null,null,i),n.current=b,b.stateNode=n,i=Np(),i.refCount++,n.pooledCache=i,i.refCount++,b.memoizedState={element:d,isDehydrated:o,cache:i},Ep(b),n}r(aE,"createFiberRoot");function sE(n){return n?(n=vl,n):vl}r(sE,"getContextForSubtree");function Ay(n,i,o,d,m,b){m=sE(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&&(qa(o,n,i),zo(o,n,i))}r(Ay,"updateContainerImpl");function _y(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<i?o:i}}r(_y,"markRetryLaneImpl");function Vm(n,i){_y(n,i),(n=n.alternate)&&_y(n,i)}r(Vm,"markRetryLaneIfNotHydrated");function Ey(n){if(n.tag===13||n.tag===31){var i=kr(n,67108864);i!==null&&qa(i,n,67108864),Vm(n,67108864)}}r(Ey,"attemptContinuousHydration");function Iy(n){if(n.tag===13||n.tag===31){var i=ms();i=ss(i);var o=kr(n,i);o!==null&&qa(o,n,i),Vm(n,i)}}r(Iy,"attemptHydrationAtCurrentPriority");var td=!0;function iE(n,i,o,d){var m=A.T;A.T=null;var b=ee.p;try{ee.p=2,Wm(n,i,o,d)}finally{ee.p=b,A.T=m}}r(iE,"dispatchDiscreteEvent");function rE(n,i,o,d){var m=A.T;A.T=null;var b=ee.p;try{ee.p=8,Wm(n,i,o,d)}finally{ee.p=b,A.T=m}}r(rE,"dispatchContinuousEvent");function Wm(n,i,o,d){if(td){var m=Qm(d);if(m===null)Mm(n,i,d,nd,o),Ry(n,d);else if(oE(m,n,i,o,d))d.stopPropagation();else if(Ry(n,d),i&4&&-1<lE.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}Si(b),(Ft&6)===0&&(Pu=Xe()+500,Jo(0,!1))}}break;case 31:case 13:T=kr(b,2),T!==null&&qa(T,b,2),Uu(),Vm(b,2)}if(b=Qm(d),b===null&&Mm(n,i,d,nd,o),b===m)break;m=b}m!==null&&d.stopPropagation()}else Mm(n,i,d,null,o)}}r(Wm,"dispatchEvent");function Qm(n){return n=nn(n),Gm(n)}r(Qm,"findInstanceBlockingEvent");var nd=null;function Gm(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(Gm,"findInstanceBlockingTarget");function Ty(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 Jt:return 32;case Mt:return 268435456;default:return 32}default:return 32}}r(Ty,"getEventPriority");var Ym=!1,Yi=null,Xi=null,Zi=null,rc=new Map,lc=new Map,Ji=[],lE="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 Ry(n,i){switch(n){case"focusin":case"focusout":Yi=null;break;case"dragenter":case"dragleave":Xi=null;break;case"mouseover":case"mouseout":Zi=null;break;case"pointerover":case"pointerout":rc.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":lc.delete(i.pointerId)}}r(Ry,"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&&Ey(i)),n):(n.eventSystemFlags|=d,i=n.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),n)}r(oc,"accumulateOrCreateContinuousQueuedReplayableEvent");function oE(n,i,o,d,m){switch(i){case"focusin":return Yi=oc(Yi,n,i,o,d,m),!0;case"dragenter":return Xi=oc(Xi,n,i,o,d,m),!0;case"mouseover":return Zi=oc(Zi,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(oE,"queueIfContinuousEvent");function My(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(){Iy(o)});return}}else if(i===31){if(i=h(o),i!==null){n.blockedOn=i,ka(n.priority,function(){Iy(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(My,"attemptExplicitHydrationTarget");function ad(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var o=Qm(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&&Ey(i),n.blockedOn=o,!1;i.shift()}return!0}r(ad,"attemptReplayContinuousQueuedEvent");function Dy(n,i,o){ad(n)&&o.delete(i)}r(Dy,"attemptReplayContinuousQueuedEventInMap");function cE(){Ym=!1,Yi!==null&&ad(Yi)&&(Yi=null),Xi!==null&&ad(Xi)&&(Xi=null),Zi!==null&&ad(Zi)&&(Zi=null),rc.forEach(Dy),lc.forEach(Dy)}r(cE,"replayUnblockedEvents");function sd(n,i){n.blockedOn===i&&(n.blockedOn=null,Ym||(Ym=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,cE)))}r(sd,"scheduleCallbackIfUnblocked");var id=null;function Oy(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(Gm(d||o)===null)continue;break}var b=$n(o);b!==null&&(n.splice(i,3),i-=3,Gp(b,{pending:!0,data:m,method:o.method,action:d},d,m))}}))}r(Oy,"scheduleReplayQueueIfNeeded");function ql(n){function i(q){return sd(q,n)}r(i,"unblock"),Yi!==null&&sd(Yi,n),Xi!==null&&sd(Xi,n),Zi!==null&&sd(Zi,n),rc.forEach(i),lc.forEach(i);for(var o=0;o<Ji.length;o++){var d=Ji[o];d.blockedOn===n&&(d.blockedOn=null)}for(;0<Ji.length&&(o=Ji[0],o.blockedOn===null);)My(o),o.blockedOn===null&&Ji.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[un]||null;if(typeof b=="function")w||Oy(o);else if(w){var T=null;if(b&&b.hasAttribute("formAction")){if(m=b,w=b[un]||null)T=w.formAction;else if(Gm(m)!==null)continue}else T=w.action;typeof T=="function"?o[d+1]=T:(o.splice(d,3),d-=3),Oy(o)}}}r(ql,"retryIfBlockedOn");function uE(){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(uE,"defaultOnDefaultTransitionIndicator");function Xm(n){this._internalRoot=n}r(Xm,"ReactDOMRoot"),Zm.prototype.render=Xm.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(c(409));var o=i.current;Ay(o,ms(),n,i,null,null)},Zm.prototype.unmount=Xm.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;Ay(n.current,2,null,n,null,null),Uu(),i[Oa]=null}};function Zm(n){this._internalRoot=n}r(Zm,"ReactDOMHydrationRoot"),Zm.prototype.unstable_scheduleHydration=function(n){if(n){var i=wa();n={blockedOn:null,target:n,priority:i};for(var o=0;o<Ji.length&&i!==0&&i<Ji[o].priority;o++);Ji.splice(o,0,n),o===0&&My(n)}};var Ly=s.version;if(Ly!=="19.2.8")throw Error(c(527,Ly,"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 dE={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(dE),mt=rd}catch{}}e.createRoot=function(n,i){if(!u(n))throw Error(c(299));var o=!1,d="",m=r_,b=l_,w=o_;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=aE(n,1,!1,null,null,o,d,null,m,b,w,uE),n[Oa]=i.current,ay(n),new Xm(i)}})),DH=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=MH()})),OH=DH();function LH(e,t,s=OH.createRoot){const l=e;if(l.__wardmoteReactRoot)return l.__wardmoteReactRoot;const c=s(t);return l.__wardmoteReactRoot=c,c}r(LH,"getOrCreateWardmoteReactRoot");function zH(e){return(e.split("/").pop()??"").replace(/\.js$/,"").replace(/[^A-Za-z0-9_-]/g,"-")||"build"}r(zH,"serviceWorkerBuildIdFromFileName");_H(x,Zl);IH();l8();p8();window.addEventListener("load",()=>{R7({pageBuildId:zH(new URL(import.meta.url).pathname)})});var PH=new Af({defaultOptions:{queries:{staleTime:3e4,gcTime:3e5,refetchOnWindowFocus:!0,networkMode:"offlineFirst"},mutations:{networkMode:"always"}}});function $H({children:e}){const{selectedCompany:t}=vt();return(0,a.jsx)(jT,{companyName:t?.name??null,children:e})}r($H,"CompanyAwareBreadcrumbProvider");var L2=document.getElementById("root");if(!L2)throw new Error("Wardmote root element is missing");LH(window,L2).render((0,a.jsx)(x.StrictMode,{children:(0,a.jsx)(bK,{children:(0,a.jsxs)(zE,{client:PH,children:[(0,a.jsx)(vK,{}),(0,a.jsx)(VT,{children:(0,a.jsx)(LE,{children:(0,a.jsx)(tI,{children:(0,a.jsx)(EI,{children:(0,a.jsx)(V3,{children:(0,a.jsx)(U7,{children:(0,a.jsxs)(j7,{children:[(0,a.jsx)(k7,{}),(0,a.jsx)(P7,{}),(0,a.jsx)(K3,{children:(0,a.jsx)($H,{children:(0,a.jsx)(z3,{children:(0,a.jsx)(wz,{children:(0,a.jsx)(RO,{children:(0,a.jsx)(f5,{children:(0,a.jsx)(xK,{})})})})})})})]})})})})})})})]})})}));export{VY as $,mS as $a,bG as $i,Pd as $n,J4 as $r,SY as $t,Sf as A,RR as Aa,zG as Ai,fA as An,QG as Ar,EY as At,x2 as B,jR as Ba,MG as Bi,iY as Bn,bz as Br,TA as Bt,ZY as C,Kf as Ca,Q0 as Ci,xY as Cn,eY as Cr,pq as Ct,X9 as D,zR as Da,ZN as Di,pA as Dn,XG as Dr,oq as Dt,Bk as E,vN as Ea,af as Ei,_$ as En,Uz as Er,RY as Et,YY as F,AR as Fa,Q5 as Fi,uY as Fn,Cz as Fr,yx as Ft,g2 as G,xR as Ga,vG as Gi,e$ as Gn,oz as Gr,Hw as Gt,T9 as H,DS as Ha,Ej as Hi,i$ as Hn,gz as Hr,W6 as Ht,y2 as I,K0 as Ia,J5 as Ii,mY as In,Sz as Ir,QK as It,Gl as J,mR as Ja,G5 as Ji,uA as Jn,uz as Jr,ur as Jt,mo as K,gR as Ka,CG as Ki,QP as Kn,cz as Kr,d6 as Kt,D9 as L,XS as La,NG as Li,dY as Ln,nw as Lr,WK as Lt,U9 as M,IR as Ma,PG as Mi,cY as Mn,Tz as Mr,rq as Mt,XY as N,ER as Na,DG as Ni,u$ as Nn,kz as Nr,sq as Nt,Q9 as O,OR as Oa,gG as Oi,oY as On,YG as Or,TY as Ot,GY as P,q0 as Pa,SG as Pi,o$ as Pn,Nz as Pr,AY as Pt,FY as Q,xS as Qa,nC as Qi,cA as Qn,KG as Qr,kY as Qt,Pk as R,vg as Ra,oO as Ri,hY as Rn,Az as Rr,FK as Rt,aF as S,mG as Sa,pO as Si,gY as Sn,ZG as Sr,e0 as St,Z9 as T,PR as Ta,UG as Ti,ww as Tn,Zf as Tr,Zg as Tt,$k as U,vR as Ua,IG as Ui,rY as Un,VG as Ur,j6 as Ut,R9 as V,zS as Va,eO as Vi,dA as Vn,WG as Vr,X6 as Vt,b9 as W,bR as Wa,xG as Wi,r$ as Wn,jc as Wr,p6 as Wt,BY as X,xg as Xa,_G as Xi,Rg as Xn,nz as Xr,Fg as Xt,l9 as Y,dR as Ya,tC as Yi,sY as Yn,FG as Yr,CY as Yt,HY as Z,yS as Za,RG as Zi,pf as Zn,YC as Zr,ko as Zt,pF as _,m5 as _a,OC as _i,bY as _n,dw as _r,OY as _t,IF as a,TG as aa,qC as ai,Bg as an,BP as ar,e9 as at,qk as b,qf as ba,ti as bi,P$ as bn,JG as br,MY as bt,d0 as c,HN as ca,ax as ci,jY as cn,MP as cr,Q7 as ct,eX as d,$N as da,zC as di,XU as dn,tY as dr,zY as dt,yG as ea,qG as ei,NY as en,B0 as eo,Ur as er,QY as et,JY as f,ON as fa,nx as fi,GU as fn,Jf as fr,u2 as ft,nX as g,h5 as ga,gC as gi,gA as gn,aA as gr,s0 as gt,A2 as h,V0 as ha,Gf as hi,vY as hn,pP as hr,LY as ht,sX as i,kG as ia,HC as ii,c8 as in,eR as io,PP as ir,m2 as it,K9 as j,oN as ja,LG as ji,fY as jn,Mz as jr,_Y as jt,G9 as k,DR as ka,hG as ki,lY as kn,GG as kr,lq as kt,CF as l,B5 as la,j4 as li,ZU as ln,aY as lr,$Y as lt,mF as m,zN as ma,J0 as mi,yY as mn,nA as mr,PY as mt,iX as n,wG as na,Y4 as ni,D8 as nn,iR as no,lA as nr,WY as nt,TF as o,$G as oa,rx as oi,wY as on,Tg as or,UY as ot,tX as p,DN as pa,r4 as pi,wA as pn,_P as pr,K7 as pt,l0 as q,hR as qa,jG as qi,WP as qn,HG as qr,l6 as qt,oH as r,EG as ra,H4 as ri,O8 as rn,ZQ as ro,zP as rr,KY as rt,_F as s,K5 as sa,sx as si,SA as sn,DP as sr,X7 as st,fH as t,AG as ta,BG as ti,L8 as tn,aj as to,KP as tr,qY as tt,aX as u,M5 as ua,ix as ui,JU as un,nY as ur,H7 as ut,fF as v,p5 as va,Mc as vi,tU as vn,fw as vr,Zr as vt,J9 as w,Ce as wa,mO as wi,R$ as wn,iA as wr,IY as wt,lF as x,pG as xa,cC as xi,z$ as xn,uo as xr,DY as xt,dF as y,$s as ya,X0 as yi,U$ as yn,Ig as yr,QA as yt,Bd as z,$f as za,OG as zi,pY as zn,lx as zr,qK as zt};