decocms 4.321.3 → 4.321.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/dist/client/assets/{AlertCircle-DlZdUT4y.js → AlertCircle-CjhgF3vK.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CDaTYOly.js → AreaChart-B4JKGcdS.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-B_C58IhS.js → ArrowLeft-DjieScGW.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-0zKbGhZX.js → ArrowUp-DOewE1qv.js} +1 -1
  5. package/dist/client/assets/{Check-Bu3XsPtR.js → Check-D5XzCZva.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-DKTcHnyM.js → CheckCircle-iUtdabgI.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-DuX1hKVe.js → ChevronRight-BkCMOd4C.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-CUY38lF0.js → ChevronSelectorVertical-C7ueTKUo.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DDdMqJL1.js → ChevronUp-rYvSsRjP.js} +1 -1
  10. package/dist/client/assets/{Copy01-BbXi4FYi.js → Copy01-D5UYujbX.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-gu6q0yZd.js → CreditCard01-3vvlQGFk.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-PUVVFLTP.js → DotsVertical-D1_N6gFC.js} +1 -1
  13. package/dist/client/assets/{Download01-AtmH14NN.js → Download01-hGLAd0mm.js} +1 -1
  14. package/dist/client/assets/{ErrorBarContext-qLO8ohog.js → ErrorBarContext-o-Fkq2Ln.js} +1 -1
  15. package/dist/client/assets/{Eye-Z_2DhwO_.js → Eye-msF77noH.js} +1 -1
  16. package/dist/client/assets/{GitBranch01-BritbDKe.js → GitBranch01-CfKitZQX.js} +1 -1
  17. package/dist/client/assets/{Globe01-DIQAtDkP.js → Globe01-Cmz_gJoO.js} +1 -1
  18. package/dist/client/assets/{HardDrive-DjrfIOu4.js → HardDrive-CdioWthT.js} +1 -1
  19. package/dist/client/assets/{Image01-CGO7yG2R.js → Image01-Db6iL1L-.js} +1 -1
  20. package/dist/client/assets/{Key01-m5a-9O7E.js → Key01-D2vuY6hS.js} +1 -1
  21. package/dist/client/assets/{Link01-_3xhMoAr.js → Link01-BkSSEygv.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-DFZf17HG.js → LinkExternal01-C9li9a1P.js} +1 -1
  23. package/dist/client/assets/{Monitor01-Cym0a0IH.js → Monitor01-BxqJ2lfk.js} +1 -1
  24. package/dist/client/assets/{Package-BA5DvHbm.js → Package-sAm7St0O.js} +1 -1
  25. package/dist/client/assets/{Palette-DVp1cbTL.js → Palette-D3vbkhAB.js} +1 -1
  26. package/dist/client/assets/{Play-CC767BNc.js → Play-4YhTSJF0.js} +1 -1
  27. package/dist/client/assets/{Plus-BsdY3vta.js → Plus-BKIxzM6s.js} +1 -1
  28. package/dist/client/assets/{SearchMd-CQywkGC8.js → SearchMd-DjN-DKoK.js} +1 -1
  29. package/dist/client/assets/{Sector-6c8v6F9Y.js → Sector-BLtiNIir.js} +1 -1
  30. package/dist/client/assets/{Settings02-B3BHuFlc.js → Settings02-CniOGh2R.js} +1 -1
  31. package/dist/client/assets/{Share07-DQRfeucj.js → Share07-BJIuab_2.js} +1 -1
  32. package/dist/client/assets/{Shield01-CfLUCs7T.js → Shield01-Bi6Wt_Bu.js} +1 -1
  33. package/dist/client/assets/{Stars01-D7oX_8Wb.js → Stars01-DF4f96O4.js} +1 -1
  34. package/dist/client/assets/{Sun-DwFd1air.js → Sun-Ccd3Vvd3.js} +1 -1
  35. package/dist/client/assets/{Tool01-Dh-2dHg7.js → Tool01-BuNvOC1h.js} +1 -1
  36. package/dist/client/assets/{Tool02-C5-ESFs5.js → Tool02-DpNDBEil.js} +1 -1
  37. package/dist/client/assets/{Trash01-DgYh1NxX.js → Trash01-DXHCqEe6.js} +1 -1
  38. package/dist/client/assets/{TrendUp01-0nrjwpEZ.js → TrendUp01-DaIUMzmz.js} +1 -1
  39. package/dist/client/assets/{Upload01-jkHCXrUI.js → Upload01-CPO6AwG4.js} +1 -1
  40. package/dist/client/assets/{User01-yXo0r48U.js → User01-mzLrMAfi.js} +1 -1
  41. package/dist/client/assets/{UserSquare-B19aw2mP.js → UserSquare-vGUnOUu5.js} +1 -1
  42. package/dist/client/assets/{Users01-BiFVZazG.js → Users01-Dtk1qxXT.js} +1 -1
  43. package/dist/client/assets/{Users03-C9WBhoi4.js → Users03-B7DS8i2Z.js} +1 -1
  44. package/dist/client/assets/{XCircle-DRYTYfoJ.js → XCircle-D0IscWfB.js} +1 -1
  45. package/dist/client/assets/{XClose-D_sSgqWY.js → XClose-Bw26wZe2.js} +1 -1
  46. package/dist/client/assets/{Zap-BwqaqJR6.js → Zap-BxV_wNn9.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-DL9fn9Rn.js → ZoomOut-CXTlcyBa.js} +1 -1
  48. package/dist/client/assets/{access-gate-Cr4kGdoG.js → access-gate-VXc3n5Tl.js} +1 -1
  49. package/dist/client/assets/{agent-icon-RpsSZWOm.js → agent-icon-BQA3BxVU.js} +1 -1
  50. package/dist/client/assets/agents-list-DAAaYRTV.js +1 -0
  51. package/dist/client/assets/{ai-providers-dfmBmLi1.js → ai-providers-BK3I1K8S.js} +1 -1
  52. package/dist/client/assets/{alert-DDOSdHF1.js → alert-COnOFEuN.js} +1 -1
  53. package/dist/client/assets/{alert-dialog-BwkydmfJ.js → alert-dialog-C2u5xYM5.js} +1 -1
  54. package/dist/client/assets/{analytics-tab-CfuMS2EL.js → analytics-tab-BF3qnd05.js} +1 -1
  55. package/dist/client/assets/api-keys-BSfQHEUl.js +1 -0
  56. package/dist/client/assets/{api-keys-DMRP4EpN.js → api-keys-k31q4uJT.js} +1 -1
  57. package/dist/client/assets/{app-editor-DqP-YnLu.js → app-editor-CBQYggH6.js} +1 -1
  58. package/dist/client/assets/{auth-catchall-DjUs0QfG.js → auth-catchall-CXsAwLpp.js} +1 -1
  59. package/dist/client/assets/{auth-1n-nSaCp.js → auth-cfubGdj3.js} +1 -1
  60. package/dist/client/assets/{auth-entry-l2FufJt_.js → auth-entry-Cp-9Vl-Z.js} +1 -1
  61. package/dist/client/assets/{auth-split-layout-BFjeh5RK.js → auth-split-layout-CVD6XG6e.js} +1 -1
  62. package/dist/client/assets/{authenticate-and-persist-oauth-CczjH39y.js → authenticate-and-persist-oauth-BwmApcxP.js} +1 -1
  63. package/dist/client/assets/{automation-list-row-DJmiHAcQ.js → automation-list-row-tSPFX-ed.js} +1 -1
  64. package/dist/client/assets/{automation-runs-CPO7lLwq.js → automation-runs-DQXBuaQh.js} +1 -1
  65. package/dist/client/assets/{automations-nuUr74Pw.js → automations-DZtzLDko.js} +1 -1
  66. package/dist/client/assets/{avatar-D7BI9kIY.js → avatar-65M-tykE.js} +1 -1
  67. package/dist/client/assets/{badge-C7G_dwIu.js → badge-BlkJw9ZT.js} +1 -1
  68. package/dist/client/assets/{block-document-DoNf7H3D.js → block-document-D7S4AfrT.js} +1 -1
  69. package/dist/client/assets/{breadcrumb-BAjbmNYL.js → breadcrumb-1tRgR6ke.js} +1 -1
  70. package/dist/client/assets/{buckets-BzOMvHnI.js → buckets-DQgYHPnt.js} +1 -1
  71. package/dist/client/assets/{bulk-category-panel-CDcCaEVa.js → bulk-category-panel-BAYz2_C9.js} +1 -1
  72. package/dist/client/assets/{capability-load-error-DdUEYVnx.js → capability-load-error-DiWeeuLw.js} +1 -1
  73. package/dist/client/assets/{cards-evwCQ3BJ.js → cards-BQ5m1ZaL.js} +1 -1
  74. package/dist/client/assets/{category-editor-BUgoXsGS.js → category-editor-Dp4gJGUo.js} +1 -1
  75. package/dist/client/assets/{cdn-tab-C7HzaQJs.js → cdn-tab-DSB7ZS0h.js} +1 -1
  76. package/dist/client/assets/{chart-BbiPqYsI.js → chart-BSRtxUXr.js} +1 -1
  77. package/dist/client/assets/{chat-context-5h3SEksi.js → chat-context-DKWUJJQk.js} +1 -1
  78. package/dist/client/assets/{checkbox-DrLBm6Hu.js → checkbox-C6unHBB5.js} +1 -1
  79. package/dist/client/assets/{choose-editor-C_UqQB0X.js → choose-editor-MOqcOH7b.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-mbtPKAeO.js → cli-auth-success-CqFfKIh9.js} +1 -1
  81. package/dist/client/assets/{client-icons-Dx7ZT4qY.js → client-icons-DzX9Vbzz.js} +1 -1
  82. package/dist/client/assets/{collection-detail-3F2jLAIe.js → collection-detail-C31CzNrH.js} +1 -1
  83. package/dist/client/assets/{collection-display-button-BuGIMFHI.js → collection-display-button-4eZzlNhD.js} +1 -1
  84. package/dist/client/assets/{collection-search-Byf9covb.js → collection-search-7lVLJWOB.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-C9hfGOql.js → collection-table-wrapper-BrisTU0i.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-4YD6nwky.js → collection-tabs-D9skai09.js} +1 -1
  87. package/dist/client/assets/{command-Bz-l73oK.js → command-CiqpOqS9.js} +1 -1
  88. package/dist/client/assets/{commerce-onboarding-Dt2M_QAS.js → commerce-onboarding-DMDBByMY.js} +1 -1
  89. package/dist/client/assets/{connect-DaJLytlD.js → connect-BzlWBjZm.js} +1 -1
  90. package/dist/client/assets/{connect-layout-D7bRiFvQ.js → connect-layout-BjHZtb1k.js} +1 -1
  91. package/dist/client/assets/connection-LSXDLhvc.js +1 -0
  92. package/dist/client/assets/{connection-card-kBzgkq3q.js → connection-card-CExTxSsL.js} +1 -1
  93. package/dist/client/assets/connection-detail-DatPU092.js +1 -0
  94. package/dist/client/assets/{connection-form-helpers-CkY6wGpq.js → connection-form-helpers-CuPBBiAF.js} +1 -1
  95. package/dist/client/assets/{connections-NFtaWcpm.js → connections-Bg6qG3Ax.js} +1 -1
  96. package/dist/client/assets/{create-organization-dialog-CZnpESma.js → create-organization-dialog-Bn2HCOk4.js} +1 -1
  97. package/dist/client/assets/{decopilot-sse-pool-Ccw1vgMp.js → decopilot-sse-pool-CZGi6xG2.js} +1 -1
  98. package/dist/client/assets/{dialog-lVg2I_FW.js → dialog-B49rrPcE.js} +1 -1
  99. package/dist/client/assets/{domain-settings-2IuIzWRo.js → domain-settings-CVN9LhLH.js} +1 -1
  100. package/dist/client/assets/{drawer-F0hkjkWK.js → drawer-CXWN5aFX.js} +1 -1
  101. package/dist/client/assets/{dropdown-menu-QVhpTnbw.js → dropdown-menu-DIF5PQaU.js} +1 -1
  102. package/dist/client/assets/{e2e-tab-CIhvZ7jB.js → e2e-tab-ChQwMMQw.js} +1 -1
  103. package/dist/client/assets/{editor-DHSROqSc.js → editor-BCbV0AET.js} +1 -1
  104. package/dist/client/assets/{empty-state-BoTu9lkL.js → empty-state-BJDGKBD3.js} +1 -1
  105. package/dist/client/assets/{empty-state-B6_Ul4U9.js → empty-state-BW8HBeBv.js} +1 -1
  106. package/dist/client/assets/extract-connection-data-CkOzL4EZ.js +1 -0
  107. package/dist/client/assets/{file-explorer-FGaad9SC.js → file-explorer-DrjG_dkv.js} +1 -1
  108. package/dist/client/assets/{file-type-icon-iSdqxvCJ.js → file-type-icon-DOGxWp7T.js} +1 -1
  109. package/dist/client/assets/{folder-icon-DoL1wgM6.js → folder-icon-CrwX1TKL.js} +1 -1
  110. package/dist/client/assets/{form-BzptyBk4.js → form-DW1iRzK_.js} +1 -1
  111. package/dist/client/assets/{general-D6b_Y3aW.js → general-DO74QmpP.js} +1 -1
  112. package/dist/client/assets/{github-repo-picker-B1n6OBj4.js → github-repo-picker-DBMeVgPY.js} +1 -1
  113. package/dist/client/assets/{hooks-bhKP99Ax.js → hooks-BduZvxu6.js} +1 -1
  114. package/dist/client/assets/{hosting-tab-s8sW7wxN.js → hosting-tab-BwMW6-cj.js} +1 -1
  115. package/dist/client/assets/{index-CGetbWoq.js → index-BOvZXmG5.js} +1 -1
  116. package/dist/client/assets/{index-D7xeSGeI.js → index-BSFs19PU.js} +1 -1
  117. package/dist/client/assets/{index-nFRHQC-L.js → index-BWAN2gi-.js} +1 -1
  118. package/dist/client/assets/{index-BNJPAEna.js → index-CZ1vtr8q.js} +1 -1
  119. package/dist/client/assets/{index-DWxzACaY.js → index-CeMxrEOa.js} +7 -7
  120. package/dist/client/assets/{index-ruQQqW4p.js → index-CplzrnNp.js} +1 -1
  121. package/dist/client/assets/{index-Bw600I7i.js → index-Czq-ZgYT.js} +1 -1
  122. package/dist/client/assets/{index-MnhhExK7.js → index-Dq833TiR.js} +1 -1
  123. package/dist/client/assets/{index-CW6L2S49.js → index-Ds9_YQQm.js} +3 -3
  124. package/dist/client/assets/{index-fXvyzo6h.js → index-fhNPvwoK.js} +1 -1
  125. package/dist/client/assets/{index-redirect-CGJzac9E.js → index-redirect-CPrLxGcH.js} +1 -1
  126. package/dist/client/assets/{infra-billing-DzmhWVEh.js → infra-billing-kpC_vP6b.js} +1 -1
  127. package/dist/client/assets/{input-DPKIPveM.js → input-CBtN_PPx.js} +1 -1
  128. package/dist/client/assets/{integration-icon-D9FdHsn5.js → integration-icon-Dxw_FbSX.js} +1 -1
  129. package/dist/client/assets/{invite-member-dialog-CyxMgQZJ.js → invite-member-dialog-Cu3x-0JT.js} +1 -1
  130. package/dist/client/assets/{label-CqIRBXyv.js → label-B8I1KhDR.js} +1 -1
  131. package/dist/client/assets/{layout-C4M3_yhL.js → layout-BhRI7lH-.js} +1 -1
  132. package/dist/client/assets/{login-qzbpt226.js → login-CwG5hnUr.js} +1 -1
  133. package/dist/client/assets/{markdown-BiJIqYGv.js → markdown-Bj8bPaFr.js} +1 -1
  134. package/dist/client/assets/mcp-oauth-CL6Q-kht.js +1 -0
  135. package/dist/client/assets/{members-D2It71TM.js → members-CERkIR2N.js} +1 -1
  136. package/dist/client/assets/{monaco-editor-DkHBERIE.js → monaco-editor-B806dXX7.js} +1 -1
  137. package/dist/client/assets/{monitoring-stats-row-B68839YD.js → monitoring-stats-row-C2A8X1H1.js} +1 -1
  138. package/dist/client/assets/{multi-select-jl7Hbzaz.js → multi-select-BP8V6T_m.js} +1 -1
  139. package/dist/client/assets/{oauth-callback--dbFGP9K.js → oauth-callback-B3e62S4Z.js} +1 -1
  140. package/dist/client/assets/{oauth-callback-ai-provider-BRBN5fiB.js → oauth-callback-ai-provider-BeU5aWSG.js} +1 -1
  141. package/dist/client/assets/{onboarding-HFAUcTGc.js → onboarding-Ct4A_Jz9.js} +1 -1
  142. package/dist/client/assets/org-layout-DKVs--x0.js +1 -0
  143. package/dist/client/assets/{organization-choice-G8mAnjMS.js → organization-choice-CLLN-ACi.js} +1 -1
  144. package/dist/client/assets/{orgs-CgeiXFFD.js → orgs-CQQFJ08X.js} +1 -1
  145. package/dist/client/assets/{page-seo-form-DTFWlSs6.js → page-seo-form-71yQnW9g.js} +1 -1
  146. package/dist/client/assets/{popover-Cfo1Nvgv.js → popover-BKkJ1_Xg.js} +1 -1
  147. package/dist/client/assets/{post-calendar-D0PKhtb8.js → post-calendar-ClavelB2.js} +1 -1
  148. package/dist/client/assets/{post-editor-BsMV7w5K.js → post-editor-Ds6d5h9N.js} +1 -1
  149. package/dist/client/assets/{primitives-Dshx-6vZ.js → primitives-CtpDwLvA.js} +1 -1
  150. package/dist/client/assets/{profile-6Ncb3Njd.js → profile-DO4qkKsK.js} +1 -1
  151. package/dist/client/assets/{project-app-view-DJ4h95de.js → project-app-view-Cpin65jK.js} +1 -1
  152. package/dist/client/assets/{prompts-6dW4jofl.js → prompts-nePHaw8G.js} +1 -1
  153. package/dist/client/assets/record-editor-B8zpMto0.js +1 -0
  154. package/dist/client/assets/redirect-editor-Q_hMRPu2.js +1 -0
  155. package/dist/client/assets/registry-Bid5M6jp.js +2 -0
  156. package/dist/client/assets/{registry-layout-CEF3gBC_.js → registry-layout-lsA6ndEN.js} +1 -1
  157. package/dist/client/assets/{reports-hh8ZI3ZJ.js → reports-z8c0XEWP.js} +1 -1
  158. package/dist/client/assets/{require-capability-B7CJKsKK.js → require-capability-CXqHSbCc.js} +1 -1
  159. package/dist/client/assets/{required-auth-layout-BASPIPDt.js → required-auth-layout-BIgCtLKM.js} +1 -1
  160. package/dist/client/assets/{reset-password-B5OEAnS-.js → reset-password-DpPr5niQ.js} +1 -1
  161. package/dist/client/assets/{review-settings-DJxQp0XZ.js → review-settings-Cp01VqYx.js} +1 -1
  162. package/dist/client/assets/{roles-Bx1AV-1M.js → roles-BApIuR8C.js} +1 -1
  163. package/dist/client/assets/{schema-CmTu1Qcv.js → schema-CSzKWh-e.js} +1 -1
  164. package/dist/client/assets/{scroll-area-gq3Q2AeD.js → scroll-area-BSFqWPow.js} +1 -1
  165. package/dist/client/assets/{search-input-B-_TRDC7.js → search-input-CfcUKbcR.js} +1 -1
  166. package/dist/client/assets/{secrets-C8NxHpd-.js → secrets-BtAWzVgG.js} +1 -1
  167. package/dist/client/assets/{sections-editor-Bh7OpK8E.js → sections-editor-CkyqVakM.js} +1 -1
  168. package/dist/client/assets/{select-DamLPfhf.js → select-YGToc2er.js} +1 -1
  169. package/dist/client/assets/{select-model-QU5hzlSe.js → select-model-Gm2aIKeG.js} +1 -1
  170. package/dist/client/assets/{self-tool-result-Lz_-Z0nG.js → self-tool-result-D1fWp3qG.js} +1 -1
  171. package/dist/client/assets/{seo-editor-DwIreVEK.js → seo-editor-BbrItmvh.js} +1 -1
  172. package/dist/client/assets/settings-layout-C1fOKdd9.js +1 -0
  173. package/dist/client/assets/{settings-sidebar-BfPvugP6.js → settings-sidebar-CEa69wW9.js} +1 -1
  174. package/dist/client/assets/{shell-controls-CeHXl7mZ.js → shell-controls-Cpk05Xlw.js} +1 -1
  175. package/dist/client/assets/{shell-layout-CBZfZSo4.js → shell-layout-BStzIFKM.js} +1 -1
  176. package/dist/client/assets/{skill-preview-Cq3_PFMf.js → skill-preview-BgXO28GZ.js} +1 -1
  177. package/dist/client/assets/{skills-BHXTZ7NQ.js → skills-Bnft56YJ.js} +1 -1
  178. package/dist/client/assets/{sso-DU8cw1b0.js → sso-Cfv5bRYB.js} +1 -1
  179. package/dist/client/assets/{store-BVdwdwPL.js → store-6e8Le4X5.js} +1 -1
  180. package/dist/client/assets/store-registry-T8JvcFLm.js +2 -0
  181. package/dist/client/assets/{switch-Mdu4u0WR.js → switch-DXic8Uh_.js} +1 -1
  182. package/dist/client/assets/{synced-repos-DaH0mQuQ.js → synced-repos-BX3OCOkU.js} +1 -1
  183. package/dist/client/assets/{table-D3m7ArKR.js → table-BCojuEdb.js} +1 -1
  184. package/dist/client/assets/{tabs-C6SXoslH.js → tabs-CgB53moJ.js} +1 -1
  185. package/dist/client/assets/{task-board-BR_hukMd.js → task-board-BILXt1or.js} +1 -1
  186. package/dist/client/assets/task-route-DDbV2QN2.js +1 -0
  187. package/dist/client/assets/{tasks-BRPJVj0A.js → tasks-CsYew1RZ.js} +1 -1
  188. package/dist/client/assets/{textarea-DoEBjnc4.js → textarea-BZQ-H9le.js} +1 -1
  189. package/dist/client/assets/{thread-intent-1OmKxTfG.js → thread-intent-VOG1y4W9.js} +1 -1
  190. package/dist/client/assets/{thread-route-xvjmSQIh.js → thread-route-CYj4FJe7.js} +1 -1
  191. package/dist/client/assets/{toggle-group-CNANG2fZ.js → toggle-group-B4zTvBSA.js} +1 -1
  192. package/dist/client/assets/{toolbar-B341Epq4.js → toolbar-CG1eQp71.js} +1 -1
  193. package/dist/client/assets/{toolbar-icon-button-BO82E-n0.js → toolbar-icon-button-BI33A1DT.js} +1 -1
  194. package/dist/client/assets/{track-Bj2VKdRl.js → track-B9IGnryN.js} +1 -1
  195. package/dist/client/assets/{types-DLFi4V7L.js → types-D8EuE9Mj.js} +1 -1
  196. package/dist/client/assets/{use-ai-providers-tSdCWAm9.js → use-ai-providers-BtViIKA8.js} +1 -1
  197. package/dist/client/assets/{use-automations-DjM5YwJ5.js → use-automations-Dd66jMcH.js} +1 -1
  198. package/dist/client/assets/{use-autosave-DdDTzW-p.js → use-autosave-BnjvVAx3.js} +1 -1
  199. package/dist/client/assets/{use-connection--sEuYWk0.js → use-connection-D-P-oJeL.js} +1 -1
  200. package/dist/client/assets/{use-copy-IMBiDrGI.js → use-copy-D7YVH85a.js} +1 -1
  201. package/dist/client/assets/{use-create-virtual-mcp-DsfSBfvB.js → use-create-virtual-mcp-BqJwGUXr.js} +1 -1
  202. package/dist/client/assets/{use-debounced-autosave-DyX30vD8.js → use-debounced-autosave-dNIsOT-E.js} +1 -1
  203. package/dist/client/assets/{use-debounced-value-DS9pfZWp.js → use-debounced-value-CQvHGF7W.js} +1 -1
  204. package/dist/client/assets/{use-decopilot-events-DNS0SnLr.js → use-decopilot-events-DDJx3VDP.js} +1 -1
  205. package/dist/client/assets/{use-delete-connection-DIc-Qfav.js → use-delete-connection-DyDPErD6.js} +1 -1
  206. package/dist/client/assets/{use-deployment-admin-CH4neEKc.js → use-deployment-admin-DTead3D9.js} +1 -1
  207. package/dist/client/assets/{use-destination-route-7JP5O6OJ.js → use-destination-route-DzHgzZDH.js} +1 -1
  208. package/dist/client/assets/{use-file-configs-CUpgfUZo.js → use-file-configs-Etx2upQ_.js} +1 -1
  209. package/dist/client/assets/{use-infinite-scroll-BYZDUtLT.js → use-infinite-scroll-CpGR8CTM.js} +1 -1
  210. package/dist/client/assets/{use-join-requests-DLCB2F3F.js → use-join-requests-B74l_G0c.js} +1 -1
  211. package/dist/client/assets/{use-mcp-auth-status-DS3icTNp.js → use-mcp-auth-status-B1LLuxQZ.js} +1 -1
  212. package/dist/client/assets/{use-mcp-client-BkpxeCP2.js → use-mcp-client-BzmGxRuq.js} +1 -1
  213. package/dist/client/assets/{use-mcp-prompts-DCcZ3Vir.js → use-mcp-prompts-B9ZjCxIV.js} +1 -1
  214. package/dist/client/assets/{use-mcp-tools-zprouZ07.js → use-mcp-tools-BElJHPUX.js} +1 -1
  215. package/dist/client/assets/{use-members-CI2nYVE7.js → use-members-DZQLsJGr.js} +1 -1
  216. package/dist/client/assets/use-navigate-to-agent-LzLdBs0e.js +1 -0
  217. package/dist/client/assets/{use-org-auth-client-S97f03iK.js → use-org-auth-client-Cp3G9WC1.js} +1 -1
  218. package/dist/client/assets/{use-org-sso-BjH4Z9oA.js → use-org-sso-CWXniPVe.js} +1 -1
  219. package/dist/client/assets/{use-organization-roles-CPwpLNzf.js → use-organization-roles-D-A39N_h.js} +1 -1
  220. package/dist/client/assets/{use-organization-settings-BPN8rXNO.js → use-organization-settings-CpiPY2sA.js} +1 -1
  221. package/dist/client/assets/{use-panel-navigate-fLU7dGE0.js → use-panel-navigate-Dev670TY.js} +1 -1
  222. package/dist/client/assets/{use-project-scope-BgyywlH_.js → use-project-scope-BAnUVA3r.js} +1 -1
  223. package/dist/client/assets/{use-registry-connections-Dzb0fhHm.js → use-registry-connections-RuRoPZjO.js} +1 -1
  224. package/dist/client/assets/{use-secrets-Dts0cF77.js → use-secrets-BZQygYLJ.js} +1 -1
  225. package/dist/client/assets/{use-section-preview-base-D94KMpp4.js → use-section-preview-base-Dbp7FR8A.js} +1 -1
  226. package/dist/client/assets/{use-status-sounds-DHbTO7IH.js → use-status-sounds-a-r3lT4g.js} +1 -1
  227. package/dist/client/assets/{use-tags-C7VYYpbH.js → use-tags-CziB3qDr.js} +1 -1
  228. package/dist/client/assets/{use-view-mode-DsDWXQJ2.js → use-view-mode-B2sjpoVQ.js} +1 -1
  229. package/dist/client/assets/{use-virtual-mcp-BhEuXWFl.js → use-virtual-mcp-C2SUHuV8.js} +1 -1
  230. package/dist/client/assets/useInfiniteQuery-n7OKFVHh.js +1 -0
  231. package/dist/client/assets/useSuspenseInfiniteQuery-BpKA0laV.js +1 -0
  232. package/dist/client/assets/{users-CuirzC-v.js → users-BtGMynxT.js} +1 -1
  233. package/dist/client/assets/{variant-calendar-Bhuv7S39.js → variant-calendar-B5DPyQ2J.js} +1 -1
  234. package/dist/client/assets/{view-mode-toggle-CvuuImgL.js → view-mode-toggle-D5oruA9V.js} +1 -1
  235. package/dist/client/index.html +1 -1
  236. package/dist/server/cli.js +509 -509
  237. package/dist/server/server.js +355 -355
  238. package/package.json +1 -1
  239. package/dist/client/assets/agents-list-D2gG4rxl.js +0 -1
  240. package/dist/client/assets/api-keys-aPYST39a.js +0 -1
  241. package/dist/client/assets/connection-Corqb4nW.js +0 -1
  242. package/dist/client/assets/connection-detail-BixLRE2Y.js +0 -1
  243. package/dist/client/assets/extract-connection-data-DcfPnaRL.js +0 -1
  244. package/dist/client/assets/mcp-oauth-HjvSjKSb.js +0 -1
  245. package/dist/client/assets/org-layout-H_iF2Jpr.js +0 -1
  246. package/dist/client/assets/record-editor-C1_htYBv.js +0 -1
  247. package/dist/client/assets/redirect-editor-Cj58js0D.js +0 -1
  248. package/dist/client/assets/registry-Blrslzvj.js +0 -2
  249. package/dist/client/assets/settings-layout-C-8zm3_h.js +0 -1
  250. package/dist/client/assets/store-registry-DUIUtqr7.js +0 -2
  251. package/dist/client/assets/task-route-Dm9sxint.js +0 -1
  252. package/dist/client/assets/use-navigate-to-agent-ChEjWy4D.js +0 -1
  253. package/dist/client/assets/useInfiniteQuery-BNd4lP3z.js +0 -1
  254. package/dist/client/assets/useSuspenseInfiniteQuery-DOhopmGX.js +0 -1
@@ -1 +0,0 @@
1
- import{bW as Ds,c as R,l as X,j as s,h as He,r as G,I as Gt,G as ws,o as Z,b as Q,b6 as As,W as ge,d as qt,a6 as Qt,_ as Wt,L as Is,a1 as $e,a2 as Oe,a4 as Re,a as Ct,F as Ts,ar as Bs,as as Fs,B as be,t as oe,H as Ps,J as Es,K as ye,n as vt,a7 as kt,m as Yt,e as Le,bm as Ms,ap as Ls}from"./index-CW6L2S49.js";import{c as Xt,u as $s,d as Jt}from"./thread-route-xvjmSQIh.js";import{t as Ve}from"./ChevronUp-DDdMqJL1.js";import{A as Zt,N as Os,s as dt,aL as Rs,aM as Ks,aN as Ft,aO as zs,t as Vs,aP as Us,a6 as Hs,aQ as Gs,o as qs,aR as Qs,a4 as ut,a3 as Ws,aa as Ys}from"./agent-icon-RpsSZWOm.js";import{a as es,i as Xs,e as Js,S as Zs,f as en}from"./constants-DNuUCxmW.js";import{b as Nt,u as tn}from"./use-virtual-mcp-BhEuXWFl.js";import{g as sn}from"./github-repo-BpKUwJal.js";import{T as ts}from"./toolbar-icon-button-BO82E-n0.js";import{P as nt,a as ze,b as ot}from"./popover-Cfo1Nvgv.js";import{D as _t,a as St,b as Dt,c as nn,e as on,f as ss,g as ns,d as an}from"./drawer-F0hkjkWK.js";import{i as ln}from"./SearchMd-CQywkGC8.js";import{i as Ge}from"./Check-Bu3XsPtR.js";import{s as Qe}from"./Plus-BsdY3vta.js";import{G as ht,a as rn}from"./github-repo-picker-B1n6OBj4.js";import{g as cn,u as dn,b as os}from"./hooks-bhKP99Ax.js";import{g as un,b as as}from"./use-project-scope-BgyywlH_.js";import{b as fn,c as mn,a as gn}from"./use-navigate-to-agent-ChEjWy4D.js";import{u as ls}from"./shell-layout-CBZfZSo4.js";import{d as pn}from"./thread-intent-1OmKxTfG.js";import{C as hn}from"./collection-search-Byf9covb.js";import{g as xn,b as jn,a as bn,e as yn}from"./extract-connection-data-DcfPnaRL.js";import{u as is,a as rs,g as Cn,C as ft}from"./connection-card-kBzgkq3q.js";import{D as cs,b as ds,c as us,d as fs,h as vn,e as kn}from"./dialog-lVg2I_FW.js";import{d as ce,a as de,e as ue,b as fe,c as me,F as Pt}from"./form-BzptyBk4.js";import{I as _e}from"./input-DPKIPveM.js";import{S as Nn,a as _n,b as Sn,c as Dn,d as Ue}from"./select-DamLPfhf.js";import{T as wn}from"./textarea-DoEBjnc4.js";import{b as ms}from"./use-connection--sEuYWk0.js";import{n as et,a as mt,i as gs}from"./Tool02-C5-ESFs5.js";import{b as An,d as In}from"./UserSquare-B19aw2mP.js";import{s as Tn}from"./XClose-D_sSgqWY.js";import{c as Bn,i as Xe,a as Et,E as Fn,p as Pn,b as En,d as Mn}from"./connection-form-helpers-CkY6wGpq.js";import{a as gt}from"./authenticate-and-persist-oauth-CczjH39y.js";import{g as Ln}from"./connection-slug-CITJ0kGN.js";import{C as $n}from"./collection-tabs-4YD6nwky.js";import{u as Mt}from"./use-infinite-scroll-BYZDUtLT.js";import{B as Je}from"./badge-C7G_dwIu.js";import{u as On}from"./useSuspenseInfiniteQuery-DOhopmGX.js";import{u as Rn}from"./use-mcp-client-BkpxeCP2.js";import{g as tt}from"./metadata-dUsYcpuu.js";import{u as Kn}from"./use-ai-providers-tSdCWAm9.js";import{T as zn,C as wt,c as Vn,d as Un,S as xt}from"./task-board-BR_hukMd.js";import{t as Hn}from"./decopilot-sse-pool-Ccw1vgMp.js";import{u as Gn}from"./use-decopilot-events-DNS0SnLr.js";import{A as Lt}from"./avatar-D7BI9kIY.js";import{h as st,D as ps,b as hs,g as xs,c as js}from"./dropdown-menu-QVhpTnbw.js";import{a as At,c as It,d as ve,e as qe,b as Tt,C as Bt}from"./command-Bz-l73oK.js";import{s as qn}from"./TrendUp01-0nrjwpEZ.js";import{a as Qn}from"./Settings02-B3BHuFlc.js";import{s as $t}from"./User01-yXo0r48U.js";import{g as Ot}from"./get-initials-D-f_fDFw.js";import{i as Wn}from"./AlertCircle-DlZdUT4y.js";import{i as Yn}from"./CheckCircle-DKTcHnyM.js";import{a as bs}from"./DotsVertical-PUVVFLTP.js";import{s as Xn}from"./Eye-Z_2DhwO_.js";import{i as Jn}from"./Shield01-CfLUCs7T.js";const Zn=Ds("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);function eo(t){const e=R.c(21),{value:n,onChange:a,placeholder:i,onKeyDown:l,className:o,isSearching:d,disabled:c}=t,u=i===void 0?"Search...":i;let f;e[0]!==o?(f=X("shrink-0 w-full border-b border-border h-12",o),e[0]=o,e[1]=f):f=e[1];const p=c?"cursor-not-allowed opacity-50":"cursor-text";let r;e[2]!==p?(r=X("flex items-center gap-2.5 h-12 px-4",p),e[2]=p,e[3]=r):r=e[3];let m;e[4]!==d?(m=d?s.jsx(He,{className:"size-4 text-muted-foreground shrink-0"}):s.jsx(ln,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=d,e[5]=m):m=e[5];let g;e[6]!==a?(g=_=>a(_.target.value),e[6]=a,e[7]=g):g=e[7];let h;e[8]!==c||e[9]!==l||e[10]!==u||e[11]!==g||e[12]!==n?(h=s.jsx("input",{type:"text",value:n,onChange:g,onKeyDown:l,placeholder:u,disabled:c,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=c,e[9]=l,e[10]=u,e[11]=g,e[12]=n,e[13]=h):h=e[13];let x;e[14]!==r||e[15]!==m||e[16]!==h?(x=s.jsxs("label",{className:r,children:[m,h]}),e[14]=r,e[15]=m,e[16]=h,e[17]=x):x=e[17];let b;return e[18]!==f||e[19]!==x?(b=s.jsx("div",{className:f,children:x}),e[18]=f,e[19]=x,e[20]=b):b=e[20],b}function to(t,e,n){if(!n)return null;const a=cn(t,e);return a?a.threads.get().find(l=>l.id===n)?.branch??null:null}function so(t){const e=R.c(6),{value:n,onChange:a}=t,i=Q();let l;e[0]!==i?(l=i("sidebar.agentsSection.searchAgents"),e[0]=i,e[1]=l):l=e[1];let o;return e[2]!==a||e[3]!==l||e[4]!==n?(o=s.jsx(eo,{value:n,onChange:a,placeholder:l}),e[2]=a,e[3]=l,e[4]=n,e[5]=o):o=e[5],o}function no(){const t=R.c(4),e=Q();let n;t[0]!==e?(n=e("sidebar.agentsSection.noAgentsFound"),t[0]=e,t[1]=n):n=t[1];let a;return t[2]!==n?(a=s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:n}),t[2]=n,t[3]=a):a=t[3],a}function oo(t){const e=R.c(10),{org:n,onClose:a}=t,i=Q();let l;e[0]!==n.slug?(l={org:n.slug},e[0]=n.slug,e[1]=l):l=e[1];let o;e[2]!==a?(o=()=>a(),e[2]=a,e[3]=o):o=e[3];let d;e[4]!==i?(d=i("sidebar.agentsSection.seeAllAgents"),e[4]=i,e[5]=d):d=e[5];let c;return e[6]!==l||e[7]!==o||e[8]!==d?(c=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Is,{to:"/$org/settings/agents",params:l,onClick:o,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:d})}),e[6]=l,e[7]=o,e[8]=d,e[9]=c):c=e[9],c}function ao(){const t=R.c(4),e=Q();let n;t[0]!==e?(n=e("sidebar.agentsSection.agents"),t[0]=e,t[1]=n):n=t[1];let a;return t[2]!==n?(a=s.jsx(ys,{children:n}),t[2]=n,t[3]=a):a=t[3],a}function lo(t){const e=R.c(11),{onImportFromGithub:n}=t,a=Q();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ht,{className:"size-3.5"}),e[0]=i):i=e[0];let l;e[1]!==a?(l=a("sidebar.agentsSection.import"),e[1]=a,e[2]=l):l=e[2];let o;e[3]!==n||e[4]!==l?(o=s.jsxs("button",{type:"button",onClick:n,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[i,l]}),e[3]=n,e[4]=l,e[5]=o):o=e[5];let d;e[6]!==a?(d=a("sidebar.agentsSection.codeAgents"),e[6]=a,e[7]=d):d=e[7];let c;return e[8]!==o||e[9]!==d?(c=s.jsx(ys,{action:o,children:d}),e[8]=o,e[9]=d,e[10]=c):c=e[10],c}function io(t){const e=R.c(11),{setOpen:n,emptyCtaClass:a}=t,i=Q();let l;e[0]!==i?(l=i("sidebar.agentsSection.browseAgents"),e[0]=i,e[1]=l):l=e[1];let o;e[2]!==a?(o=X(a),e[2]=a,e[3]=o):o=e[3];let d;e[4]!==n?(d=()=>{Z("agent_browser_opened",{surface:"mobile_drawer"}),n(!0)},e[4]=n,e[5]=d):d=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Qe,{className:"size-4"}),e[6]=c):c=e[6];let u;return e[7]!==l||e[8]!==o||e[9]!==d?(u=s.jsx(ts,{"aria-label":l,className:o,onClick:d,children:c}),e[7]=l,e[8]=o,e[9]=d,e[10]=u):u=e[10],u}function ro(t){const e=R.c(17),{setOpen:n,highlightEmpty:a,emptyCtaClass:i}=t,l=Q();let o;e[0]!==a||e[1]!==l?(o=a?void 0:l("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=l,e[2]=o):o=e[2];let d;e[3]!==i?(d=X(i),e[3]=i,e[4]=d):d=e[4];let c;e[5]!==n?(c=()=>{Z("agent_browser_opened",{surface:"mobile_drawer"}),n(!0)},e[5]=n,e[6]=c):c=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Qe,{}),e[7]=u):u=e[7];let f;e[8]!==l?(f=l("sidebar.agentsSection.newAgent"),e[8]=l,e[9]=f):f=e[9];let p;e[10]!==f?(p=s.jsx("span",{children:f}),e[10]=f,e[11]=p):p=e[11];let r;return e[12]!==o||e[13]!==d||e[14]!==c||e[15]!==p?(r=s.jsx(Qt,{children:s.jsxs(Wt,{tooltip:o,className:d,onClick:c,children:[u,p]})}),e[12]=o,e[13]=d,e[14]=c,e[15]=p,e[16]=r):r=e[16],r}function co(){const t=R.c(4),e=Q();let n;t[0]!==e?(n=e("sidebar.agentsSection.browseAgents"),t[0]=e,t[1]=n):n=t[1];let a;return t[2]!==n?(a=s.jsx(Dt,{className:"sr-only",children:n}),t[2]=n,t[3]=a):a=t[3],a}function uo(t){const e=R.c(8),{emptyCtaClass:n}=t,a=Q();let i;e[0]!==a?(i=a("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=i):i=e[1];let l;e[2]!==n?(l=X(n),e[2]=n,e[3]=l):l=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Qe,{className:"size-4"}),e[4]=o):o=e[4];let d;return e[5]!==i||e[6]!==l?(d=s.jsx(ts,{"aria-label":i,className:l,children:o}),e[5]=i,e[6]=l,e[7]=d):d=e[7],d}function fo(t){const e=R.c(19),{wrapEmptyHint:n,highlightEmpty:a,emptyCtaClass:i}=t,l=Q();let o;e[0]!==a||e[1]!==l?(o=a?void 0:l("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=l,e[2]=o):o=e[2];let d;e[3]!==i?(d=X(i),e[3]=i,e[4]=d):d=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Qe,{}),e[5]=c):c=e[5];let u;e[6]!==l?(u=l("sidebar.agentsSection.newAgent"),e[6]=l,e[7]=u):u=e[7];let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let p;e[10]!==o||e[11]!==d||e[12]!==f?(p=s.jsx(ze,{asChild:!0,children:s.jsxs(Wt,{tooltip:o,className:d,children:[c,f]})}),e[10]=o,e[11]=d,e[12]=f,e[13]=p):p=e[13];let r;e[14]!==p||e[15]!==n?(r=n(p),e[14]=p,e[15]=n,e[16]=r):r=e[16];let m;return e[17]!==r?(m=s.jsx(Qt,{children:r}),e[17]=r,e[18]=m):m=e[18],m}function mo(t){const e=R.c(9),{children:n}=t,a=Q();let i;e[0]!==n?(i=s.jsx($e,{asChild:!0,children:n}),e[0]=n,e[1]=i):i=e[1];let l;e[2]!==a?(l=a("sidebar.agentsSection.selectAnExistingAgent"),e[2]=a,e[3]=l):l=e[3];let o;e[4]!==l?(o=s.jsx(Oe,{side:"right",sideOffset:8,children:l}),e[4]=l,e[5]=o):o=e[5];let d;return e[6]!==i||e[7]!==o?(d=s.jsxs(Re,{defaultOpen:!0,delayDuration:0,children:[i,o]}),e[6]=i,e[7]=o,e[8]=d):d=e[8],d}function go(t){const e=qt(),{create:n}=dn(),{locator:a}=ge(),i=Xt(),l=$s();return async o=>{const d=crypto.randomUUID(),c=o===l?to(t,a,i??""):null;try{await n({id:d,virtual_mcp_id:o,...c?{branch:c}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:d},search:{virtualmcpid:o}})}}function pt(t){const e=R.c(20),{agent:n,selected:a,onClick:i}=t,l=a?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let o;e[0]!==l?(o=X("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",l),e[0]=l,e[1]=o):o=e[1];let d;e[2]!==n.icon||e[3]!==n.title?(d=s.jsx(Zt,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[2]=n.icon,e[3]=n.title,e[4]=d):d=e[4];let c;e[5]!==n.title?(c=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=c):c=e[6];let u;e[7]!==n.description?(u=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[7]=n.description,e[8]=u):u=e[8];let f;e[9]!==c||e[10]!==u?(f=s.jsxs("div",{className:"flex-1 min-w-0",children:[c,u]}),e[9]=c,e[10]=u,e[11]=f):f=e[11];let p;e[12]!==a?(p=a&&s.jsx(Ge,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=a,e[13]=p):p=e[13];let r;return e[14]!==i||e[15]!==o||e[16]!==d||e[17]!==f||e[18]!==p?(r=s.jsxs("button",{type:"button",onClick:i,className:o,children:[d,f,p]}),e[14]=i,e[15]=o,e[16]=d,e[17]=f,e[18]=p,e[19]=r):r=e[19],r}function ys(t){const e=R.c(5),{children:n,action:a}=t;let i;e[0]!==n?(i=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),e[0]=n,e[1]=i):i=e[1];let l;return e[2]!==a||e[3]!==i?(l=s.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[i,a]}),e[2]=a,e[3]=i,e[4]=l):l=e[4],l}function po(t){const e=R.c(44),{onClose:n,onSelectAgent:a,selectedAgentId:i,onImportFromGithub:l}=t,[o,d]=G.useState(""),c=G.useDeferredValue(o),u=c||void 0;let f;e[0]!==u?(f={searchTerm:u},e[0]=u,e[1]=f):f=e[1];const p=Nt(f),r=p??[],{org:m}=ge(),g=mn(),h=go(m.slug),x=un(p),b=c.toLowerCase(),_=r.filter(bo).filter(z=>!x.has(z.id)).filter(jo),y=_.filter(xo),N=_.filter(ho),k=es(m.id),C=!c||k.title.toLowerCase().includes(b),w=!!(a&&C);let j;e[2]!==n||e[3]!==a?(j=()=>{a?.(null),n(),d("")},e[2]=n,e[3]=a,e[4]=j):j=e[4];const S=j;let D;e[5]!==g||e[6]!==h||e[7]!==n||e[8]!==a?(D=z=>{if(a){a(z.id),n(),d("");return}g(),n(),d(""),h(z.id)},e[5]=g,e[6]=h,e[7]=n,e[8]=a,e[9]=D):D=e[9];const I=D,M="flex flex-col max-h-[min(640px,80dvh)]";let v;e[10]!==o?(v=s.jsx(so,{value:o,onChange:d}),e[10]=o,e[11]=v):v=e[11];const A="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5";let T;e[12]!==k||e[13]!==a||e[14]!==S||e[15]!==i||e[16]!==C?(T=a&&C&&k&&s.jsx(pt,{agent:k,selected:!i||i===k.id,onClick:S}),e[12]=k,e[13]=a,e[14]=S,e[15]=i,e[16]=C,e[17]=T):T=e[17];const O=(y.length>0||!c)&&s.jsx(lo,{onImportFromGithub:l});let B;e[18]!==I||e[19]!==a||e[20]!==i?(B=z=>s.jsx(pt,{agent:z,selected:a?i===z.id:void 0,onClick:()=>I(z)},z.id),e[18]=I,e[19]=a,e[20]=i,e[21]=B):B=e[21];const F=y.map(B),$=N.length>0&&s.jsx(ao,{});let U;e[22]!==I||e[23]!==a||e[24]!==i?(U=z=>s.jsx(pt,{agent:z,selected:a?i===z.id:void 0,onClick:()=>I(z)},z.id),e[22]=I,e[23]=a,e[24]=i,e[25]=U):U=e[25];const P=N.map(U);let K;e[26]!==w||e[27]!==c||e[28]!==_.length?(K=_.length===0&&!w&&c&&s.jsx(no,{}),e[26]=w,e[27]=c,e[28]=_.length,e[29]=K):K=e[29];let L;e[30]!==F||e[31]!==$||e[32]!==P||e[33]!==K||e[34]!==T||e[35]!==O?(L=s.jsxs("div",{className:A,children:[T,O,F,$,P,K]}),e[30]=F,e[31]=$,e[32]=P,e[33]=K,e[34]=T,e[35]=O,e[36]=L):L=e[36];let V;e[37]!==n||e[38]!==m?(V=s.jsx(oo,{org:m,onClose:n}),e[37]=n,e[38]=m,e[39]=V):V=e[39];let J;return e[40]!==L||e[41]!==V||e[42]!==v?(J=s.jsxs("div",{className:M,children:[v,L,V]}),e[40]=L,e[41]=V,e[42]=v,e[43]=J):J=e[43],J}function ho(t){return!as(t.metadata)}function xo(t){return as(t.metadata)}function jo(t){return!Js(t.id)}function bo(t){return!Xs(t.id)}function yo(t){const e=R.c(14),{compact:n,trigger:a,onSelectAgent:i,selectedAgentId:l,side:o,align:d}=t===void 0?{}:t,c=n===void 0?!1:n,u=o===void 0?"right":o,f=d===void 0?"start":d,[p,r]=G.useState(!1),[m,g]=G.useState(!1),h=Gt(),{setOpenMobile:x}=ws(),b=fn(),_=b?"border border-border":void 0;let y;e[0]!==b?(y=v=>b?s.jsx(mo,{children:v}):v,e[0]=b,e[1]=y):y=e[1];const N=y;let k;e[2]!==h||e[3]!==x?(k=()=>{r(!1),h&&x(!1)},e[2]=h,e[3]=x,e[4]=k):k=e[4];const C=k;let w;e[5]!==C||e[6]!==g?(w=()=>{C(),g(!0)},e[5]=C,e[6]=g,e[7]=w):w=e[7];const j=w,S=p&&s.jsx(G.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(As,{className:"h-4 w-24"})}),children:s.jsx(po,{onClose:C,onSelectAgent:i,selectedAgentId:l,onImportFromGithub:j})}),D=h?s.jsxs(s.Fragment,{children:[a?G.cloneElement(a,{onClick:v=>{a.props.onClick?.(v),r(!0)}}):c?N(s.jsx(io,{setOpen:r,emptyCtaClass:_})):s.jsx(ro,{setOpen:r,highlightEmpty:b,emptyCtaClass:_}),s.jsx(_t,{open:p,onOpenChange:r,direction:"bottom",children:s.jsxs(St,{className:"max-h-[85dvh] p-0",children:[s.jsx(co,{}),S]})})]}):s.jsxs(nt,{open:p,onOpenChange:v=>{v&&!p&&Z("agent_browser_opened",{surface:"desktop_popover"}),r(v)},children:[a?s.jsx(ze,{asChild:!0,children:a}):c?N(s.jsx(ze,{asChild:!0,children:s.jsx(uo,{emptyCtaClass:_})})):s.jsx(fo,{wrapEmptyHint:N,highlightEmpty:b,emptyCtaClass:_}),s.jsx(ot,{className:"w-[380px] p-0 overflow-hidden",side:u,align:f,children:S})]});let I;e[8]!==m||e[9]!==g?(I=s.jsx(rn,{open:m,onOpenChange:g,mode:"agent"}),e[8]=m,e[9]=g,e[10]=I):I=e[10];let M;return e[11]!==D||e[12]!==I?(M=s.jsxs(s.Fragment,{children:[D,I]}),e[11]=D,e[12]=I,e[13]=M):M=e[13],M}function Co(){const t=R.c(2),e=Nt()??[];let n;return t[0]!==e?(n=a=>{if(!a)return;const i=e.find(l=>l.id===a);return i?pn(i.metadata):void 0},t[0]=e,t[1]=n):n=t[1],n}const vo="inline-flex items-center gap-1.5 min-w-0 rounded-md pl-1 pr-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function ko(t){const e=R.c(29),{agentId:n,fallback:a,onOpenHome:i,onPick:l}=t,o=Q(),d=tn(n)??a??null;let c,u,f,p,r;e[0]!==d?.title||e[1]!==i||e[2]!==o?(r=d?.title??o("header.shellBreadcrumb.superAgentDefaultName"),p="flex min-w-0 items-center gap-0",c="button",u=i,f=o("header.shellBreadcrumb.openAgentHome",{name:r}),e[0]=d?.title,e[1]=i,e[2]=o,e[3]=c,e[4]=u,e[5]=f,e[6]=p,e[7]=r):(c=e[3],u=e[4],f=e[5],p=e[6],r=e[7]);const m=d?.icon??null;let g;e[8]!==m||e[9]!==r?(g=s.jsx(Zt,{icon:m,name:r,size:"xs"}),e[8]=m,e[9]=r,e[10]=g):g=e[10];let h;e[11]!==c||e[12]!==u||e[13]!==f||e[14]!==g?(h=s.jsx("button",{type:c,onClick:u,"aria-label":f,className:"flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:g}),e[11]=c,e[12]=u,e[13]=f,e[14]=g,e[15]=h):h=e[15];let x;e[16]!==r?(x=s.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:r}),e[16]=r,e[17]=x):x=e[17];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ve,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=b):b=e[18];let _;e[19]!==x?(_=s.jsxs("button",{type:"button",className:vo,children:[x,b]}),e[19]=x,e[20]=_):_=e[20];let y;e[21]!==n||e[22]!==l||e[23]!==_?(y=s.jsx(yo,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:l,trigger:_}),e[21]=n,e[22]=l,e[23]=_,e[24]=y):y=e[24];let N;return e[25]!==y||e[26]!==p||e[27]!==h?(N=s.jsxs("div",{className:p,children:[h,y]}),e[25]=y,e[26]=p,e[27]=h,e[28]=N):N=e[28],N}function ml(t){const e=R.c(22);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:a}=n,{org:i}=ge(),{threads:l}=os(),o=Nt(),{data:d}=Ct.useSession(),{setTaskId:c,createNewTask:u}=ls(),f=Co();let p;e[2]!==i.id?(p=es(i.id),e[2]=i.id,e[3]=p):p=e[3];const r=p,m=r.id,g=Jt();let h;e[4]!==o||e[5]!==u||e[6]!==m||e[7]!==a||e[8]!==f||e[9]!==d?.user?.id||e[10]!==c||e[11]!==l?(h=k=>{const C=k??m,w=(o??[]).find(S=>S.id===C),j=gn(l,C,d?.user?.id,f(C),!!(w&&sn(w)));j?c(j.id,C):u(C),a?.()},e[4]=o,e[5]=u,e[6]=m,e[7]=a,e[8]=f,e[9]=d?.user?.id,e[10]=c,e[11]=l,e[12]=h):h=e[12];const x=h;let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[13]=b):b=e[13];const _=g===m?r:void 0;let y;e[14]!==g||e[15]!==x?(y=()=>x(g),e[14]=g,e[15]=x,e[16]=y):y=e[16];let N;return e[17]!==g||e[18]!==x||e[19]!==_||e[20]!==y?(N=s.jsx(G.Suspense,{fallback:b,children:s.jsx(ko,{agentId:g,fallback:_,onOpenHome:y,onPick:x})}),e[17]=g,e[18]=x,e[19]=_,e[20]=y,e[21]=N):N=e[21],N}function gl(){const t=R.c(20),e=Q(),{threads:n}=os(),{createNewTask:a}=ls(),i=Jt(),l=Xt();let o;t[0]!==l||t[1]!==n?(o=n.find(x=>x.id===l)?.branch??null,t[0]=l,t[1]=n,t[2]=o):o=t[2];const d=o;let c;t[3]!==i||t[4]!==a||t[5]!==d?(c=()=>{a(i,d)},t[3]=i,t[4]=a,t[5]=d,t[6]=c):c=t[6];const u=c;let f;t[7]!==e?(f=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=f):f=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Os,{size:16}),t[9]=p):p=t[9];let r;t[10]!==u||t[11]!==f?(r=s.jsx($e,{asChild:!0,children:s.jsx("button",{type:"button",onClick:u,"aria-label":f,className:"flex shrink-0 items-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:p})}),t[10]=u,t[11]=f,t[12]=r):r=t[12];let m;t[13]!==e?(m=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=m):m=t[14];let g;t[15]!==m?(g=s.jsx(Oe,{side:"bottom",children:m}),t[15]=m,t[16]=g):g=t[16];let h;return t[17]!==r||t[18]!==g?(h=s.jsxs(Re,{children:[r,g]}),t[17]=r,t[18]=g,t[19]=h):h=t[19],h}function No({open:t,onOpenChange:e,onCreated:n}){const a=Q(),{org:i}=ge(),{data:l}=Ct.useSession(),{stdioEnabled:o}=Ts(),d=Gt(),c=ms(),u=is(),p=rs(u,"").items,r=Bs({resolver:Fs(Bn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),m=r.watch("ui_type"),g=r.watch("connection_url"),h=r.watch("npx_package"),x=Xe({uiType:m,connectionUrl:g??"",npxPackage:h??""})??Et({uiType:m,connectionUrl:g??"",registryItems:p}),b=j=>{const S=j.trim();if(!S)return;const D=!!r.formState.dirtyFields.title,I=!!r.formState.dirtyFields.description,M=!!r.formState.dirtyFields.env_vars,v=T=>{if(T&&(!D&&!r.getValues("title").trim()&&T.title&&r.setValue("title",T.title,{shouldDirty:!1}),!I&&!(r.getValues("description")??"").trim()&&T.description&&r.setValue("description",T.description,{shouldDirty:!1}),!M&&T.envVarKeys?.length)){const O=r.getValues("env_vars")??[],B=new Set(O.map($=>$.key)),F=T.envVarKeys.filter($=>!B.has($));F.length>0&&r.setValue("env_vars",[...O,...F.map($=>({key:$,value:""}))],{shouldDirty:!0})}},A=Pn(S);if(A&&o){r.setValue("ui_type","NPX",{shouldDirty:!0}),r.setValue("npx_package",A.packageName,{shouldDirty:!0}),r.setValue("connection_url","",{shouldDirty:!0}),r.setValue("connection_token",null,{shouldDirty:!0}),v(Xe({uiType:"NPX",npxPackage:A.packageName}));return}if(S.startsWith("http://")||S.startsWith("https://")){const T=m==="HTTP"||m==="SSE"||m==="Websocket"?m:"HTTP";r.setValue("ui_type",T,{shouldDirty:!0}),r.setValue("connection_url",S,{shouldDirty:!0}),v(Xe({uiType:T,connectionUrl:S})??Et({uiType:T,connectionUrl:S,registryItems:p}));return}m==="NPX"&&v(Xe({uiType:"NPX",npxPackage:S}))},_=j=>{j||r.reset(),e(j)},y=async j=>{let S,D=null,I=null,M=null;j.ui_type==="NPX"?(S="STDIO",D="",M=En(j.npx_package||"",j.env_vars||[])):j.ui_type==="STDIO"?(S="STDIO",D="",M=Mn(j.stdio_command||"",j.stdio_args||"",j.stdio_cwd,j.env_vars||[])):(S=j.ui_type,D=j.connection_url||"",I=j.connection_token||null);const v=xn("conn");try{await c.create.mutateAsync({id:v,title:j.title,description:j.description||null,connection_type:S,connection_url:D,connection_token:I,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:l?.user?.id||"system",organization_id:i.id,icon:j.icon??null,app_name:null,app_id:null,connection_headers:M,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),r.reset(),e(!1),n?.(v)}catch{oe.error(a("connections.createConnectionDialog.failedToCreateConnection"))}},N=a("connections.createConnectionDialog.title"),k=a("connections.createConnectionDialog.description"),C=r.formState.isSubmitting?a("connections.createConnectionDialog.saving"):a("connections.createConnectionDialog.createButton"),w=s.jsxs("div",{className:"grid gap-4",children:[s.jsx(ce,{control:r.control,name:"ui_type",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.typeLabel")}),s.jsxs(Nn,{value:j.value,onValueChange:j.onChange,children:[s.jsx(fe,{children:s.jsx(_n,{children:s.jsx(Sn,{})})}),s.jsxs(Dn,{children:[s.jsx(Ue,{value:"HTTP",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(dt,{className:"w-4 h-4"}),a("connections.createConnectionDialog.httpType")]})}),s.jsx(Ue,{value:"SSE",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(dt,{className:"w-4 h-4"}),a("connections.createConnectionDialog.sseType")]})}),s.jsx(Ue,{value:"Websocket",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(dt,{className:"w-4 h-4"}),a("connections.createConnectionDialog.websocketType")]})}),o&&s.jsxs(s.Fragment,{children:[s.jsx(Ue,{value:"NPX",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(et,{className:"w-4 h-4"}),a("connections.createConnectionDialog.npxPackageType")]})}),s.jsx(Ue,{value:"STDIO",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(An,{className:"w-4 h-4"}),a("connections.createConnectionDialog.customCommandType")]})})]})]})]}),s.jsx(me,{})]})}),m==="NPX"&&s.jsx(ce,{control:r.control,name:"npx_package",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.npmPackageLabel")}),s.jsx(fe,{children:s.jsx(_e,{placeholder:a("connections.createConnectionDialog.npmPackagePlaceholder"),...j,value:j.value??"",onPaste:S=>{const D=S.clipboardData.getData("text");D&&(S.preventDefault(),r.setValue("npx_package",D.trim(),{shouldDirty:!0}),b(D))},onBlur:S=>{b(S.target.value),j.onBlur()}})}),s.jsx(me,{})]})}),m==="STDIO"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[s.jsx(ce,{control:r.control,name:"stdio_command",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.commandLabel")}),s.jsx(fe,{children:s.jsx(_e,{placeholder:a("connections.createConnectionDialog.commandPlaceholder"),...j,value:j.value??""})}),s.jsx(me,{})]})}),s.jsx(ce,{control:r.control,name:"stdio_args",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.argumentsLabel")}),s.jsx(fe,{children:s.jsx(_e,{placeholder:a("connections.createConnectionDialog.argumentsPlaceholder"),...j,value:j.value??""})}),s.jsx(me,{})]})})]}),s.jsx(ce,{control:r.control,name:"stdio_cwd",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.workingDirectoryLabel")}),s.jsx(fe,{children:s.jsx(_e,{placeholder:a("connections.createConnectionDialog.workingDirectoryPlaceholder"),...j,value:j.value??""})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:a("connections.createConnectionDialog.workingDirectoryDescription")}),s.jsx(me,{})]})})]}),(m==="NPX"||m==="STDIO")&&s.jsx(ce,{control:r.control,name:"env_vars",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.environmentVariablesLabel")}),s.jsx(fe,{children:s.jsx(Fn,{value:j.value??[],onChange:j.onChange})}),s.jsx(me,{})]})}),m!=="NPX"&&m!=="STDIO"&&s.jsxs(s.Fragment,{children:[s.jsx(ce,{control:r.control,name:"connection_url",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.urlLabel")}),s.jsx(fe,{children:s.jsx(_e,{placeholder:a("connections.createConnectionDialog.urlPlaceholder"),...j,value:j.value??"",onPaste:S=>{const D=S.clipboardData.getData("text");D&&(S.preventDefault(),r.setValue("connection_url",D.trim(),{shouldDirty:!0}),b(D))},onBlur:S=>{b(S.target.value),j.onBlur()}})}),s.jsx(me,{})]})}),s.jsx(ce,{control:r.control,name:"connection_token",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:x?.token?.label??a("connections.createConnectionDialog.tokenLabelDefault")}),s.jsx(fe,{children:s.jsx(_e,{type:"password",placeholder:x?.token?.placeholder??a("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...j,value:j.value??""})}),x?.token?.helperText&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&s.jsxs(s.Fragment,{children:[" ","·"," ",s.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:a("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),s.jsx(me,{})]})})]}),s.jsx(ce,{control:r.control,name:"title",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.nameLabel")}),s.jsx(fe,{children:s.jsx(_e,{placeholder:a("connections.createConnectionDialog.namePlaceholder"),...j})}),s.jsx(me,{})]})}),s.jsx(ce,{control:r.control,name:"description",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.descriptionLabel")}),s.jsx(fe,{children:s.jsx(wn,{placeholder:a("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...j,value:j.value??""})}),s.jsx(me,{})]})})]});return d?s.jsx(_t,{open:t,onOpenChange:_,children:s.jsxs(St,{className:"max-h-[90vh]",children:[s.jsx(nn,{className:"pb-2",children:s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{className:"flex-1 text-left",children:[s.jsx(Dt,{children:N}),s.jsx(on,{className:"mt-1",children:k})]}),s.jsx(ss,{asChild:!0,children:s.jsx(be,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:s.jsx(Tn,{size:16})})})]})}),s.jsx(Pt,{...r,children:s.jsxs("form",{onSubmit:r.handleSubmit(y),children:[s.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:w}),s.jsx(ns,{children:s.jsx(be,{type:"submit",disabled:r.formState.isSubmitting,className:"w-full",children:C})})]})})]})}):s.jsx(cs,{open:t,onOpenChange:_,children:s.jsxs(ds,{className:"sm:max-w-[525px]",children:[s.jsxs(us,{children:[s.jsx(fs,{children:N}),s.jsx(vn,{children:k})]}),s.jsx(Pt,{...r,children:s.jsxs("form",{onSubmit:r.handleSubmit(y),children:[s.jsx("div",{className:"py-4",children:w}),s.jsxs(kn,{children:[s.jsx(be,{type:"button",variant:"outline",onClick:()=>_(!1),children:a("connections.createConnectionDialog.cancelButton")}),s.jsx(be,{type:"submit",disabled:r.formState.isSubmitting,className:"min-w-40",children:C})]})]})})]})})}function _o(t){const e=R.c(72),{mode:n,agentId:a,addedConnectionIds:i,onAdd:l,onCloneAndAdd:o,onConnectAndAdd:d,connectingItemId:c,search:u,onCreateConnection:f,onBrowseNavigate:p,defaultTab:r}=t,m=n===void 0?"add":n,g=r===void 0?"connected":r,h=Q(),{org:x}=ge(),b=G.useDeferredValue(u),_=u!==b;let y;e[0]!==b?(y=b.trim().toLowerCase(),e[0]=b,e[1]=y):y=e[1];const N=y;let k;e[2]!==g?(k=E=>E??g,e[2]=g,e[3]=k):k=e[3];const[C,w]=Ps(Es.connectionsTab(x.slug)+(g==="all"?":home-modal":":agent-modal"),k);let j;e[4]!==C||e[5]!==w?(j=E=>{E!==C&&Z("connections_dialog_tab_changed",{to_tab:E}),w(E)},e[4]=C,e[5]=w,e[6]=j):j=e[6];const S=j;let D;e[7]!==x.id||e[8]!==x.slug?(D={connectionId:Zs,orgId:x.id,orgSlug:x.slug},e[7]=x.id,e[8]=x.slug,e[9]=D):D=e[9];const I=Rn(D),M=b?.trim().split(/\s+/).filter(Boolean)??[],v=M.length>0?{operator:"or",conditions:M.flatMap(Fo)}:void 0,A={...v&&{where:v},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},T=JSON.stringify(A),{data:O,fetchNextPage:B,hasNextPage:F,isFetchingNextPage:$}=On({queryKey:ye.collectionListInfinite(I,x.id,"","CONNECTIONS",T),queryFn:async E=>{const{pageParam:Y}=E,je=Y===void 0?0:Y;return(await I.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...v&&{where:v},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:je}})).structuredContent},initialPageParam:0,getNextPageParam:To,staleTime:3e4}),U=O?.pages.flatMap(Io)??[],P=Cn(U),K=new Set(U.filter(Ao).map(wo)),L=is(),V=rs(L,b),J=Mt(V.loadMore,V.hasMore,V.isLoadingMore),z=Mt(B,F??!1,$),W=C==="all"||!!N,pe=W?V.items.filter(E=>{const Y=jn(E);if(Y&&K.has(Y))return!1;if(!N)return!0;const je=tt(E._meta),ke=[E.title,E.description,E.name,E.server?.title,E.server?.description,E.server?.name,je?.friendly_name,je?.friendlyName].filter(Boolean).join(" ").toLowerCase();return M.some(re=>ke.includes(re.toLowerCase()))}):[],te=pe.filter(Do),se=pe.filter(So);let ae;e[10]!==i?(ae=E=>E.some(Y=>i.has(Y.id)),e[10]=i,e[11]=ae):ae=e[11];const ie=ae;let he;e[12]!==i||e[13]!==a||e[14]!==c||e[15]!==ie||e[16]!==m||e[17]!==l||e[18]!==p||e[19]!==o||e[20]!==h?(he=(E,Y,je,ke,re)=>{const Ye=ie(re),Me=re.find(Ne=>!i.has(Ne.id)),ne=re[0];if(m==="browse"){const Ne=Ln(ne);return s.jsx(ft,{connection:{title:Y,icon:je,description:re.length>1?`${re.length} instances`:ke??void 0},fallbackIcon:s.jsx(et,{}),headerActionsAlwaysVisible:!0,headerActions:s.jsxs(Je,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[s.jsx(Ge,{size:11})," ",h("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{Z("connection_browse_clicked",{app_name:ne.app_name??null,connection_id:ne.id,instances_count:re.length}),p?.(Ne)}},E)}return s.jsx(ft,{connection:{title:Y,icon:je,description:ke},fallbackIcon:s.jsx(et,{}),headerActionsAlwaysVisible:!0,headerActions:s.jsxs("div",{className:"flex items-center gap-1.5",children:[Ye&&s.jsxs(Je,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[s.jsx(Ge,{size:11})," ",h("virtualMcp.connectionDialogContent.added")]}),s.jsx(be,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:Ne=>{Ne.stopPropagation(),Me?(Z("connection_add_clicked",{action:"use_existing",app_name:ne.app_name??null,connection_id:Me.id}),a&&Z("agent_connection_attached",{agent_id:a,connection_id:Me.id,app_name:ne.app_name??null,mode:"existing"}),l(Me.id)):(Z("connection_add_clicked",{action:"clone",app_name:ne.app_name??null,base_connection_id:ne.id}),o(ne))},children:h("virtualMcp.connectionDialogContent.add")})]})},E)},e[12]=i,e[13]=a,e[14]=c,e[15]=ie,e[16]=m,e[17]=l,e[18]=p,e[19]=o,e[20]=h,e[21]=he):he=e[21];const H=he;let q;e[22]!==c||e[23]!==m||e[24]!==d||e[25]!==h?(q=E=>{const Y=tt(E._meta),je=Y?.friendlyName||Y?.friendly_name||E.server?.title||E.title||E.server?.name||E.name||E.id||"",ke=E.server?.description||E.description||null,re=E.server?.icons?.[0]?.src||bn(E.server?.repository)||null,Ye=Y?.official===!0,Me=Y?.verified===!0,ne=Y?.owner==="deco";return s.jsx(ft,{connection:{title:je,description:ke,icon:re},fallbackIcon:s.jsx(et,{}),headerActionsAlwaysVisible:!0,headerActions:s.jsxs("div",{className:"flex items-center gap-1.5",children:[ne&&s.jsxs(Re,{children:[s.jsx($e,{asChild:!0,children:s.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:h("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),s.jsx(Oe,{children:h("virtualMcp.connectionDialogContent.builtByDeco")})]}),!ne&&Ye&&s.jsxs(Re,{children:[s.jsx($e,{asChild:!0,children:s.jsx(Je,{variant:"outline",size:"icon",children:s.jsx(mt,{})})}),s.jsx(Oe,{children:h("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!ne&&!Ye&&Me&&s.jsxs(Re,{children:[s.jsx($e,{asChild:!0,children:s.jsx(Je,{variant:"outline",size:"icon",children:s.jsx(mt,{})})}),s.jsx(Oe,{children:h("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),s.jsx(be,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:Ne=>{Ne.stopPropagation(),Z("connection_add_clicked",{action:"connect_new",registry_item_id:E.id,app_name:Y?.friendlyName||E.server?.name||E.name||null}),d(E)},children:c===E.id?s.jsx(He,{className:"size-3.5"}):h(m==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${E.id}`)},e[22]=c,e[23]=m,e[24]=d,e[25]=h,e[26]=q):q=e[26];const xe=q;let ee;e[27]!==C||e[28]!==S||e[29]!==f||e[30]!==N||e[31]!==h?(ee=!N&&s.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[s.jsx($n,{tabs:[{id:"all",label:h("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:h("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:C,onTabChange:E=>S(E)}),s.jsxs(be,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{Z("connections_dialog_custom_clicked"),f()},children:[s.jsx(Qe,{size:12}),h("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=C,e[28]=S,e[29]=f,e[30]=N,e[31]=h,e[32]=ee):ee=e[32];const Ce=_&&"opacity-50 pointer-events-none";let le;e[33]!==Ce?(le=X("flex-1 overflow-auto p-5 transition-opacity duration-150",Ce),e[33]=Ce,e[34]=le):le=e[34];const De="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let we;e[35]!==H?(we=E=>{if(E.type==="group")return H(E.key,E.title,E.icon,null,E.connections);const Y=E.connection;return H(Y.id,Y.title,Y.icon,Y.description??null,[Y])},e[35]=H,e[36]=we):we=e[36];const at=P.map(we);let Ae;e[37]!==z?(Ae=s.jsx("div",{ref:z,className:"col-span-full h-1"}),e[37]=z,e[38]=Ae):Ae=e[38];let Ie;e[39]!==$?(Ie=$&&s.jsx("div",{className:"col-span-full flex justify-center py-6",children:s.jsx(He,{className:"size-6 text-muted-foreground"})}),e[39]=$,e[40]=Ie):Ie=e[40];const lt=W&&te.length>0&&s.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[s.jsx(mt,{size:13,className:"text-muted-foreground shrink-0"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionVerified")}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=W&&te.map(xe),rt=W&&se.length>0&&s.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[s.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionAllConnections")}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),ct=W&&se.map(xe);let Te;e[41]!==J||e[42]!==L||e[43]!==W?(Te=W&&L.length>0&&s.jsx("div",{ref:J,className:"col-span-full h-1"}),e[41]=J,e[42]=L,e[43]=W,e[44]=Te):Te=e[44];let Be;e[45]!==V.isLoadingMore||e[46]!==W?(Be=W&&V.isLoadingMore&&s.jsx("div",{className:"col-span-full flex justify-center py-6",children:s.jsx(He,{className:"size-6 text-muted-foreground"})}),e[45]=V.isLoadingMore,e[46]=W,e[47]=Be):Be=e[47];let Fe;e[48]!==at||e[49]!==Ae||e[50]!==Ie||e[51]!==lt||e[52]!==it||e[53]!==rt||e[54]!==ct||e[55]!==Te||e[56]!==Be?(Fe=s.jsxs("div",{className:De,children:[at,Ae,Ie,lt,it,rt,ct,Te,Be]}),e[48]=at,e[49]=Ae,e[50]=Ie,e[51]=lt,e[52]=it,e[53]=rt,e[54]=ct,e[55]=Te,e[56]=Be,e[57]=Fe):Fe=e[57];let Pe;e[58]!==C||e[59]!==P.length||e[60]!==se||e[61]!==u||e[62]!==h||e[63]!==te?(Pe=P.length===0&&te.length===0&&se.length===0&&s.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:u?h("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:u}):h(C==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=C,e[59]=P.length,e[60]=se,e[61]=u,e[62]=h,e[63]=te,e[64]=Pe):Pe=e[64];let Ee;e[65]!==le||e[66]!==Fe||e[67]!==Pe?(Ee=s.jsxs("div",{className:le,children:[Fe,Pe]}),e[65]=le,e[66]=Fe,e[67]=Pe,e[68]=Ee):Ee=e[68];let We;return e[69]!==ee||e[70]!==Ee?(We=s.jsxs(s.Fragment,{children:[ee,Ee]}),e[69]=ee,e[70]=Ee,e[71]=We):We=e[71],We}function So(t){return!t.verified&&!tt(t._meta)?.verified&&!t.meta?.verified}function Do(t){return t.verified||tt(t._meta)?.verified||t.meta?.verified}function wo(t){return t.app_name}function Ao(t){return t.app_name}function Io(t){return t?.items??[]}function To(t,e){if(t?.hasMore)return e.reduce(Bo,0)}function Bo(t,e){return t+(e?.items?.length??0)}function Fo(t){return[{field:["title"],operator:"contains",value:t},{field:["description"],operator:"contains",value:t}]}function pl({open:t,onOpenChange:e,defaultTab:n,initialSearch:a="",...i}){const l=Q(),o=i.mode??"add",d="agentId"in i?i.agentId:void 0,c="addedConnectionIds"in i?i.addedConnectionIds??new Set:new Set,u="onAdd"in i&&i.onAdd?i.onAdd:v=>{},f=(v,A,T)=>{d&&Z("agent_connection_attached",{agent_id:d,connection_id:v,app_name:A,mode:T})},[p,r]=G.useState(null),[m,g]=G.useState(a),[h,x]=G.useState(!1),[b,_]=G.useState(t);t!==b&&(_(t),t&&g(a));const{org:y}=ge(),{data:N}=Ct.useSession(),k=ms(),C=vt(),w=qt(),j=v=>{e(!1),w({to:"/$org/settings/connections/$appSlug",params:{org:y.slug,appSlug:v}})},S=()=>{C.invalidateQueries({predicate:v=>{const A=v.queryKey;return A[1]===y.id&&A[3]==="collection"&&A[4]==="CONNECTIONS"}})},D=async(v,A)=>{Z("connection_oauth_succeeded",{connection_id:v,flow:A});const T=new URL(`/api/${y.slug}/mcp/${v}`,window.location.origin);await C.invalidateQueries({queryKey:ye.isMCPAuthenticated(T.href,null)}),S()},I=async v=>{r(v.app_name??v.id);try{const T=`${v.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,B=(await k.create.mutateAsync({title:T,description:v.description??null,connection_type:v.connection_type,connection_url:v.connection_url??null,connection_token:null,icon:v.icon??null,app_name:v.app_name??null,app_id:v.app_id??null,connection_headers:v.connection_headers??null})).id,F=await gt({connectionId:B,orgId:y.id,orgSlug:y.slug,persistFallback:$=>k.update.mutateAsync({id:B,data:{connection_token:$}}).then(()=>{})});if(F.ran&&!F.ok){Z("connection_oauth_failed",{connection_id:B,flow:"clone",error:F.error??"no_token"}),oe.error(l("virtualMcp.addConnectionDialog.authenticationFailedError",{error:F.error??"no token received"})),await k.delete.mutateAsync(B);return}F.ran&&await D(B,"clone"),f(B,v.app_name??null,"clone"),u(B)}catch(A){console.error("Failed to add connection:",A),oe.error(l("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{r(null)}},M=async v=>{if(!(!y||!N?.user?.id)){r(v.id);try{const A=yn(v,y.id,N.user.id,{remoteIndex:0}),T=A.connection_type==="STDIO",O=!!A.connection_url,B=T&&A.connection_headers&&typeof A.connection_headers=="object"&&"command"in A.connection_headers;if(!O&&!B){oe.error(l("virtualMcp.addConnectionDialog.mcpServerConnectionError")),r(null);return}const{id:F}=await k.create.mutateAsync(A),$=await gt({connectionId:F,orgId:y.id,orgSlug:y.slug,persistFallback:U=>k.update.mutateAsync({id:F,data:{connection_token:U}}).then(()=>{})});if($.ran&&!$.ok){Z("connection_oauth_failed",{connection_id:F,flow:"connect_new",error:$.error??"no_token"}),oe.warning(l("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:l("virtualMcp.addConnectionDialog.signInFailedDescription",{error:$.error??"no token received"})}),f(F,A.app_name??null,"new"),u(F);return}$.ran?(await D(F,"connect_new"),oe.success(l("virtualMcp.addConnectionDialog.connectedAuthenticated"))):oe.success(l("virtualMcp.addConnectionDialog.connected")),f(F,A.app_name??null,"new"),u(F)}catch(A){console.error("Failed to connect:",A),oe.error(l("virtualMcp.addConnectionDialog.failedToConnect"))}finally{r(null)}}};return s.jsxs(cs,{open:t,onOpenChange:e,children:[s.jsxs(ds,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[s.jsx(us,{className:"px-6 pt-5 pb-0 shrink-0",children:s.jsx(fs,{className:"text-base font-semibold",children:l(o==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),s.jsx("div",{className:"pt-3 shrink-0",children:s.jsx(hn,{value:m,onChange:g,placeholder:l("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),s.jsx(G.Suspense,{fallback:s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(He,{className:"size-6 text-muted-foreground"})}),children:s.jsx(_o,{mode:o,agentId:d,addedConnectionIds:c,onAdd:u,onCloneAndAdd:I,onConnectAndAdd:M,connectingItemId:p,search:m,onCreateConnection:()=>x(!0),onBrowseNavigate:j,defaultTab:n})})]}),s.jsx(No,{open:h,onOpenChange:x,onCreated:async v=>{x(!1);const A=await gt({connectionId:v,orgId:y.id,orgSlug:y.slug,persistFallback:T=>k.update.mutateAsync({id:v,data:{connection_token:T}}).then(()=>{})});if(A.ran&&!A.ok){Z("connection_oauth_failed",{connection_id:v,flow:"custom_create",error:A.error??"no_token"}),oe.warning(l("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:l("virtualMcp.addConnectionDialog.signInFailedDescription",{error:A.error??"no token received"})}),f(v,null,"custom"),u(v),e(!1);return}A.ran&&await D(v,"custom_create"),f(v,null,"custom"),u(v),e(!1)}})]})}const Rt=new Map;function hl(){const{org:t}=ge(),e=kt(),n=Kn(),a=n.find(x=>x.providerId==="deco"),{data:i,isLoading:l,refetch:o,isFetching:d}=Yt({queryKey:ye.aiProviderCredits(t.id,"deco"),enabled:!!a,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),c=i?.balanceCents??null,u=c!=null?c/100:null,f=G.useRef(new Map);if(c!=null){const x=Rt.get(t.id);f.current.get(t.id)&&x!=null&&c>x&&Z("credits_topped_up_detected",{organization_id:t.id,delta_cents:c-x,previous_balance_cents:x,new_balance_cents:c}),Rt.set(t.id,c),f.current.set(t.id,!0)}const p=!!a,r=c!=null&&c>0,m=c!=null&&c===0,g=c!=null&&c===200,h=n.length>0&&n.every(x=>x.providerId==="deco");return{hasDecoKey:p,decoKeyId:a?.id??null,balanceCents:c,balanceDollars:u,hasCredits:r,isZeroBalance:m,isInitialFreeCredit:g,hasOnlyDecoProvider:h,isLoading:l,isFetching:d,refetch:o}}const Po=4,Eo="TASK";function Mo(t){return t.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,Po)||Eo}function Lo(t,e){return e==null?null:`${Mo(t)}-${String(e).padStart(2,"0")}`}const $o=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function Oo(t){const e=$o.exec(t.trim())?.[1];return e===void 0?null:Number(e)}function Kt(t){const e=R.c(8),{size:n,className:a}=t,i=n===void 0?16:n;let l;e[0]!==i?(l={width:i,height:i},e[0]=i,e[1]=l):l=e[1];let o;e[2]!==a?(o=X("shrink-0 rounded-full object-cover",a),e[2]=a,e[3]=o):o=e[3];let d;return e[4]!==i||e[5]!==l||e[6]!==o?(d=s.jsx("img",{src:en,alt:"Super Agent",width:i,height:i,style:l,className:o}),e[4]=i,e[5]=l,e[6]=o,e[7]=d):d=e[7],d}function xl(t,e){if(!e)return null;const n=e.toLowerCase();return t.find(a=>{const i=a.bucket.toLowerCase();return a.siteSlug?.toLowerCase()===n||i===n||i===`deco-assets-${n}`})??null}const zt=()=>0;function Ro(t){const{orgSlug:e,enabled:n=!0,onUpdate:a,onDelete:i,onResync:l}=t,o=G.useRef(a);o.current=a;const d=G.useRef(i);d.current=i;const c=G.useRef(l);c.current=l;const u=G.useRef(null),f=G.useRef(n),p=G.useRef(e);(!u.current||f.current!==n||p.current!==e)&&(f.current=n,p.current=e,u.current=m=>{if(!n||!e)return()=>{};const g=h=>{let x;try{x=JSON.parse(h.data)}catch{return}x.data&&(h.type===zn?d.current?.(x.data.id):o.current(x.data)),m()};return Hn.subscribe(e,g,()=>c.current?.())}),G.useSyncExternalStore(u.current,zt,zt)}function Ko(t,e){return{queryKey:ye.taskBoardItems(t),refetchInterval:6e4,queryFn:async()=>{const{items:n}=await e.call("TASK_BOARD_ITEM_LIST",{});return{items:n}}}}function zo(){const t=R.c(21),{org:e,locator:n}=ge(),a=vt();let i;t[0]!==n?(i=ye.taskBoardItems(n),t[0]=n,t[1]=i):i=t[1];const l=i;let o;t[2]!==n||t[3]!==a||t[4]!==l?(o=r=>{a.cancelQueries({queryKey:l}),a.setQueryData(l,m=>m&&{...m,items:m.items.some(g=>g.id===r.id)?m.items.map(g=>g.id===r.id?r:g):[r,...m.items]}),a.invalidateQueries({queryKey:ye.taskBoardActivity(n,r.id)})},t[2]=n,t[3]=a,t[4]=l,t[5]=o):o=t[5];let d,c;t[6]!==a||t[7]!==l?(d=()=>{a.invalidateQueries({queryKey:l})},c=r=>{a.cancelQueries({queryKey:l}),a.setQueryData(l,m=>m&&{...m,items:m.items.filter(g=>g.id!==r)})},t[6]=a,t[7]=l,t[8]=d,t[9]=c):(d=t[8],c=t[9]);let u;t[10]!==e.slug||t[11]!==o||t[12]!==d||t[13]!==c?(u={orgSlug:e.slug,onUpdate:o,onResync:d,onDelete:c},t[10]=e.slug,t[11]=o,t[12]=d,t[13]=c,t[14]=u):u=t[14],Ro(u);let f;t[15]!==a||t[16]!==l?(f=r=>{const m=r.subject,g=r.data.status;a.cancelQueries({queryKey:l}),a.setQueryData(l,h=>h&&{...h,items:h.items.map(x=>x.threads.some(b=>b.threadId===m)?{...x,threads:x.threads.map(b=>b.threadId===m?{...b,status:g}:b)}:x)})},t[15]=a,t[16]=l,t[17]=f):f=t[17];let p;t[18]!==e.slug||t[19]!==f?(p={orgSlug:e.slug,onTaskStatus:f},t[18]=e.slug,t[19]=f,t[20]=p):p=t[20],Gn(p)}function jl(){const t=R.c(9),{locator:e}=ge(),n=kt();let a;t[0]!==e||t[1]!==n?(a=Ko(e,n),t[0]=e,t[1]=n,t[2]=a):a=t[2];const i=Yt(a);zo();let l;t[3]!==i.data?.items?(l=i.data?.items??[],t[3]=i.data?.items,t[4]=l):l=t[4];let o;return t[5]!==i.error||t[6]!==i.isLoading||t[7]!==l?(o={items:l,isLoading:i.isLoading,error:i.error},t[5]=i.error,t[6]=i.isLoading,t[7]=l,t[8]=o):o=t[8],o}function bl(){const t=R.c(70),{org:e,locator:n}=ge(),a=kt(),i=vt(),l=Q();let o;t[0]!==n?(o=ye.taskBoardItems(n),t[0]=n,t[1]=o):o=t[1];const d=o;let c;t[2]!==i||t[3]!==d?(c=()=>i.invalidateQueries({queryKey:d}),t[2]=i,t[3]=d,t[4]=c):c=t[4];const u=c;let f;t[5]!==a?(f=P=>a.call("TASK_BOARD_ITEM_CREATE",P),t[5]=a,t[6]=f):f=t[6];let p;t[7]!==u||t[8]!==f?(p={mutationFn:f,onSuccess:u},t[7]=u,t[8]=f,t[9]=p):p=t[9];const r=Le(p);let m;t[10]!==a?(m=P=>a.call("TASK_BOARD_ITEM_UPDATE",P),t[10]=a,t[11]=m):m=t[11];let g;t[12]!==i||t[13]!==d?(g=async P=>{await i.cancelQueries({queryKey:d});const K=i.getQueryData(d);return i.setQueryData(d,L=>L&&{...L,items:L.items.map(V=>V.id===P.id?{...V,...P}:V)}),{previous:K}},t[12]=i,t[13]=d,t[14]=g):g=t[14];let h;t[15]!==e?(h=(P,K)=>{K.status==="done"&&Z("task_marked_done",{organization_id:e.id,task_board_item_id:K.id})},t[15]=e,t[16]=h):h=t[16];let x;t[17]!==i||t[18]!==d?(x=(P,K,L)=>{L?.previous&&i.setQueryData(d,L.previous)},t[17]=i,t[18]=d,t[19]=x):x=t[19];let b;t[20]!==u||t[21]!==n||t[22]!==i?(b=(P,K,L)=>{u(),i.invalidateQueries({queryKey:ye.taskBoardActivity(n,L.id)})},t[20]=u,t[21]=n,t[22]=i,t[23]=b):b=t[23];let _;t[24]!==m||t[25]!==g||t[26]!==h||t[27]!==x||t[28]!==b?(_={mutationFn:m,onMutate:g,onSuccess:h,onError:x,onSettled:b},t[24]=m,t[25]=g,t[26]=h,t[27]=x,t[28]=b,t[29]=_):_=t[29];const y=Le(_);let N;t[30]!==a?(N=P=>a.call("TASK_BOARD_ITEM_DELETE",{id:P}),t[30]=a,t[31]=N):N=t[31];let k;t[32]!==u||t[33]!==l?(k=P=>{oe.error(P instanceof Error&&P.message?P.message:l("taskBoard.taskBoard.deleteError")),u()},t[32]=u,t[33]=l,t[34]=k):k=t[34];let C;t[35]!==u||t[36]!==N||t[37]!==k?(C={mutationFn:N,onSuccess:u,onError:k},t[35]=u,t[36]=N,t[37]=k,t[38]=C):C=t[38];const w=Le(C);let j;t[39]!==a?(j=async P=>{const K=await Promise.allSettled(P.map(L=>a.call("TASK_BOARD_ITEM_DELETE",{id:L})));return{total:P.length,failed:K.filter(Vo).length}},t[39]=a,t[40]=j):j=t[40];let S,D;t[41]!==l?(S=P=>{const{total:K,failed:L}=P;L!==0&&oe.error(l("taskBoard.taskBoard.deleteBulkError",{failed:String(L),total:String(K)}))},D=()=>oe.error(l("taskBoard.taskBoard.deleteError")),t[41]=l,t[42]=S,t[43]=D):(S=t[42],D=t[43]);let I;t[44]!==u||t[45]!==j||t[46]!==S||t[47]!==D?(I={mutationFn:j,onSuccess:S,onError:D,onSettled:u},t[44]=u,t[45]=j,t[46]=S,t[47]=D,t[48]=I):I=t[48];const M=Le(I);let v;t[49]!==a?(v=P=>a.call("TASK_BOARD_ITEM_UPDATE",P),t[49]=a,t[50]=v):v=t[50];let A;t[51]!==u||t[52]!==v?(A={mutationFn:v,onSuccess:u},t[51]=u,t[52]=v,t[53]=A):A=t[53];const T=Le(A);let O;t[54]!==a?(O=P=>a.call("TASK_BOARD_ITEM_RERUN",P),t[54]=a,t[55]=O):O=t[55];let B;t[56]!==u||t[57]!==n||t[58]!==i?(B=(P,K,L)=>{u(),i.invalidateQueries({queryKey:ye.taskBoardActivity(n,L.id)})},t[56]=u,t[57]=n,t[58]=i,t[59]=B):B=t[59];let F;t[60]!==O||t[61]!==B?(F={mutationFn:O,onSettled:B},t[60]=O,t[61]=B,t[62]=F):F=t[62];const $=Le(F);let U;return t[63]!==r||t[64]!==T||t[65]!==w||t[66]!==M||t[67]!==$||t[68]!==y?(U={create:r,update:y,remove:w,removeMany:M,link:T,rerun:$},t[63]=r,t[64]=T,t[65]=w,t[66]=M,t[67]=$,t[68]=y,t[69]=U):U=t[69],U}function Vo(t){return t.status==="rejected"}const Uo=["ended_after_delivery","superseded"];function Ho(t){return!!t&&Uo.includes(t)}function yl(t){return!(t.action==="status_changed"&&typeof t.data?.retry=="number")}function Cl(t){return t.failureKind!=="superseded"}function Cs(t){return t.threads.some(e=>e.status==="requires_action")}function vl(t){return t.status==="in_review"&&!t.assigneeId}function kl(t){return Cs(t)}function Nl(t){return t.status==="in_progress"&&Cs(t)?"text-warning animate-pulse":ks(t.status).iconClassName}function _l(t){return t.threads.some(n=>n.status==="in_progress")?"running":t.threads.some(n=>n.status==="failed"&&!Ho(n.failureKind))?"failed":null}function Sl(t,e,n){const a=t.findIndex(f=>f.id===n),i=e===n?t[a+1]?.id??null:e,l=t.filter(f=>f.id!==n),o=i?l.findIndex(f=>f.id===i):-1,d=o===-1?l.length:o,c=l[d-1],u=l[d];return c&&u?(c.sortOrder+u.sortOrder)/2:c?c.sortOrder+1:u?u.sortOrder-1:0}function Dl(t,e){return Array.from({length:e},(n,a)=>t-(e-1-a)*1e-4)}const Go=["archived"],vs={triage:{labelKey:"taskBoard.config.statusBacklog",icon:Wn,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:bs,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:Hs,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:Xn,iconClassName:"text-warning"},approved:{labelKey:"taskBoard.config.statusApproved",icon:Us,iconClassName:"text-success"},merged:{labelKey:"taskBoard.config.statusMerged",icon:In,iconClassName:"text-primary"},post_deploy_validation:{labelKey:"taskBoard.config.statusPostDeployValidation",icon:Vs,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:Yn,iconClassName:"text-success"},archived:{labelKey:"taskBoard.config.statusArchived",icon:Ms,iconClassName:"text-muted-foreground"}},qo={icon:bs,iconClassName:"text-muted-foreground"},Qo=vs;function ks(t){return Qo[t]??qo}function wl(t,e){const n=vs[t];return{label:n?e(n.labelKey):t,visual:ks(t)}}const Al=["bug","feature","chore","spike","security"],Il={bug:{labelKey:"taskBoard.config.typeBug",icon:Zn,iconClassName:"text-destructive"},feature:{labelKey:"taskBoard.config.typeFeature",icon:Qs,iconClassName:"text-success"},chore:{labelKey:"taskBoard.config.typeChore",icon:qs,iconClassName:"text-muted-foreground"},spike:{labelKey:"taskBoard.config.typeSpike",icon:Gs,iconClassName:"text-yellow-500"},security:{labelKey:"taskBoard.config.typeSecurity",icon:Jn,iconClassName:"text-purple-500"}};function jt(t){return Un.includes(t)}function Tl(t){return wt.filter(e=>t||!jt(e))}function Bl({deliveryEnabled:t,shownLanes:e,occupied:n}){const a=wt.filter(o=>t||!jt(o)||n.includes(o)),i=a.filter(o=>Go.includes(o)||!t&&jt(o)),l=i.filter(o=>!e.includes(o));return{lanes:a.filter(o=>!l.includes(o)),hidden:l,hideable:i}}const Vt="lane:";function Wo(t){return wt.includes(t)}function Fl({overId:t,statusOf:e}){if(t===void 0)return null;const n=String(t),a=n.startsWith(Vt)?n.slice(Vt.length):e(n);return a!==void 0&&Wo(a)?a:null}const Yo=["none","low","medium","high","urgent"],Ze={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50",icon:Ft,iconClassName:"text-muted-foreground/40"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40",icon:zs,iconClassName:"text-muted-foreground"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500",icon:Ft,iconClassName:"text-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning",icon:Ks,iconClassName:"text-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive",icon:Rs,iconClassName:"text-destructive"}};function Pl(t,e=Date.now()){const n=new Date(t).getTime();return Number.isNaN(n)?null:n<e?"overdue":n-e<=Xo*864e5?"soon":null}const Xo=3;function Ut(t){return`color-mix(in oklab, ${t??Vn} var(--user-color-strength), transparent)`}const bt="__unassigned__",yt="__no_repo__",Ke="__any__",Ns={assignee:null,priority:null,due:null,tags:[],repo:null,search:""};function Jo(t){return t.assignee!==null||t.priority!==null||t.due!==null||t.tags.length>0||t.repo!==null||t.search.trim()!==""}function Zo(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)+(t.tags.length>0?1:0)+(t.repo!==null?1:0)+(t.search.trim()!==""?1:0)}const ea=864e5;function ta(t,e){const n=new Date(t),a=new Date(e);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()}function _s(t,e){const n=t.trim();return n===""?!1:e!=null&&Oo(n)===e}function sa(t,e){return t.assigneeId===e?!0:t.assigneeId===xt&&t.assignedBy===e}function El(t,e){const n=e.search.trim().toLowerCase();if(n!==""&&!`${t.title} ${t.description??""}`.toLowerCase().includes(n)&&!_s(n,t.keySeq))return!1;if(e.assignee!==null){if(e.assignee===bt){if(t.assigneeId!==null)return!1}else if(!sa(t,e.assignee))return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const a=new Date(t.dueDate).getTime(),i=Date.now();if(e.due==="overdue"&&a>=i||e.due==="today"&&!ta(a,i)||e.due==="week"&&(a<i||a>i+7*ea))return!1}if(e.tags.length>0){const a=t.tags.map(i=>i.id);if(!e.tags.some(i=>a.includes(i)))return!1}if(e.repo!==null){if(e.repo===yt){if(t.repo!=null)return!1}else if(t.repo?.toLowerCase()!==e.repo.toLowerCase())return!1}return!0}const Ht={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function Se(t,e=!1){return X("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/20",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function na(t){const e=R.c(107),{value:n,members:a,onChange:i,block:l}=t,o=Q(),[d,c]=G.useState(!1);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx($t,{size:14,className:"shrink-0"}),e[0]=u):u=e[0];let f=u,p;e[1]!==o?(p=o("taskBoard.taskFilters.assigneeLabel"),e[1]=o,e[2]=p):p=e[2];let r=p;if(n===bt){let H;e[3]!==o?(H=o("taskBoard.taskFilters.assigneeUnassigned"),e[3]=o,e[4]=H):H=e[4],r=H}else if(n===xt){let H;e[5]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Kt,{size:14}),e[5]=H):H=e[5],f=H;let q;e[6]!==o?(q=o("taskBoard.taskFilters.assigneeSuperAgent"),e[6]=o,e[7]=q):q=e[7],r=q}else if(n){let H,q,xe,ee;if(e[8]!==a||e[9]!==n){let De;e[14]!==n?(De=we=>we.userId===n,e[14]=n,e[15]=De):De=e[15],q=a.find(De),H=Lt,xe=q?.user?.image??void 0,ee=Ot(q?.user?.name),e[8]=a,e[9]=n,e[10]=H,e[11]=q,e[12]=xe,e[13]=ee}else H=e[10],q=e[11],xe=e[12],ee=e[13];let Ce;e[16]!==H||e[17]!==xe||e[18]!==ee?(Ce=s.jsx(H,{url:xe,fallback:ee,shape:"circle",size:"2xs"}),e[16]=H,e[17]=xe,e[18]=ee,e[19]=Ce):Ce=e[19],f=Ce;let le;e[20]!==q?.user?.name||e[21]!==o?(le=q?.user?.name??o("taskBoard.taskFilters.assigneeMember"),e[20]=q?.user?.name,e[21]=o,e[22]=le):le=e[22],r=le}let m;e[23]!==i?(m=H=>{i(H),c(!1)},e[23]=i,e[24]=m):m=e[24];const g=m,h=n!==null;let x;e[25]!==l||e[26]!==h?(x=Se(h,l),e[25]=l,e[26]=h,e[27]=x):x=e[27];const b=x,_=l&&"ml-auto";let y;e[28]!==_?(y=X("shrink-0 opacity-60",_),e[28]=_,e[29]=y):y=e[29];const N=y;let k;e[30]!==r?(k=s.jsx("span",{className:"max-w-[10rem] truncate",children:r}),e[30]=r,e[31]=k):k=e[31];let C;e[32]!==N?(C=s.jsx(Ve,{size:12,className:N}),e[32]=N,e[33]=C):C=e[33];let w;e[34]!==f||e[35]!==k||e[36]!==C||e[37]!==b?(w=s.jsx(ze,{asChild:!0,children:s.jsxs("button",{type:"button",className:b,children:[f,k,C]})}),e[34]=f,e[35]=k,e[36]=C,e[37]=b,e[38]=w):w=e[38];let j;e[39]!==o?(j=o("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=o,e[40]=j):j=e[40];let S;e[41]!==o?(S=o("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[41]=o,e[42]=S):S=e[42];let D;e[43]!==j||e[44]!==S?(D=s.jsx(At,{placeholder:j,"aria-label":S,className:"h-9"}),e[43]=j,e[44]=S,e[45]=D):D=e[45];let I;e[46]!==o?(I=o("taskBoard.taskFilters.assigneeNoMembersFound"),e[46]=o,e[47]=I):I=e[47];let M;e[48]!==I?(M=s.jsx(It,{children:I}),e[48]=I,e[49]=M):M=e[49];let v;e[50]!==o?(v=o("taskBoard.taskFilters.assigneeAnyone"),e[50]=o,e[51]=v):v=e[51];let A;e[52]!==g?(A=()=>g(null),e[52]=g,e[53]=A):A=e[53];let T;e[54]!==o?(T=o("taskBoard.taskFilters.assigneeAnyone"),e[54]=o,e[55]=T):T=e[55];let O;e[56]!==v||e[57]!==A||e[58]!==T?(O=s.jsx(ve,{value:v,onSelect:A,children:T}),e[56]=v,e[57]=A,e[58]=T,e[59]=O):O=e[59];let B;e[60]!==o?(B=o("taskBoard.taskFilters.assigneeUnassigned"),e[60]=o,e[61]=B):B=e[61];let F;e[62]!==g?(F=()=>g(bt),e[62]=g,e[63]=F):F=e[63];let $;e[64]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx($t,{size:16,className:"text-muted-foreground"}),e[64]=$):$=e[64];let U;e[65]!==o?(U=o("taskBoard.taskFilters.assigneeUnassigned"),e[65]=o,e[66]=U):U=e[66];let P;e[67]!==B||e[68]!==F||e[69]!==U?(P=s.jsxs(ve,{value:B,onSelect:F,className:"gap-2",children:[$,U]}),e[67]=B,e[68]=F,e[69]=U,e[70]=P):P=e[70];let K;e[71]!==o?(K=o("taskBoard.taskFilters.assigneeSuperAgent"),e[71]=o,e[72]=K):K=e[72];let L;e[73]!==g?(L=()=>g(xt),e[73]=g,e[74]=L):L=e[74];let V;e[75]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(Kt,{size:16}),e[75]=V):V=e[75];let J;e[76]!==o?(J=o("taskBoard.taskFilters.assigneeSuperAgent"),e[76]=o,e[77]=J):J=e[77];let z;e[78]!==K||e[79]!==L||e[80]!==J?(z=s.jsxs(ve,{value:K,onSelect:L,className:"gap-2",children:[V,J]}),e[78]=K,e[79]=L,e[80]=J,e[81]=z):z=e[81];let W;e[82]!==O||e[83]!==P||e[84]!==z?(W=s.jsxs(qe,{children:[O,P,z]}),e[82]=O,e[83]=P,e[84]=z,e[85]=W):W=e[85];let pe;e[86]!==o?(pe=o("taskBoard.taskFilters.assigneeGroupMembers"),e[86]=o,e[87]=pe):pe=e[87];let te;if(e[88]!==a||e[89]!==g){let H;e[91]!==g?(H=q=>s.jsxs(ve,{value:q.user?.name??q.userId,onSelect:()=>g(q.userId),className:"gap-2",children:[s.jsx(Lt,{url:q.user?.image??void 0,fallback:Ot(q.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:q.user?.name??q.userId})]},q.userId),e[91]=g,e[92]=H):H=e[92],te=a.map(H),e[88]=a,e[89]=g,e[90]=te}else te=e[90];let se;e[93]!==pe||e[94]!==te?(se=s.jsx(qe,{heading:pe,children:te}),e[93]=pe,e[94]=te,e[95]=se):se=e[95];let ae;e[96]!==M||e[97]!==W||e[98]!==se?(ae=s.jsxs(Tt,{children:[M,W,se]}),e[96]=M,e[97]=W,e[98]=se,e[99]=ae):ae=e[99];let ie;e[100]!==D||e[101]!==ae?(ie=s.jsx(ot,{align:"start",className:"w-56 p-0",children:s.jsxs(Bt,{children:[D,ae]})}),e[100]=D,e[101]=ae,e[102]=ie):ie=e[102];let he;return e[103]!==d||e[104]!==w||e[105]!==ie?(he=s.jsxs(nt,{open:d,onOpenChange:c,children:[w,ie]}),e[103]=d,e[104]=w,e[105]=ie,e[106]=he):he=e[106],he}function oa(t){const e=R.c(33),{value:n,onChange:a,block:i}=t,l=Q(),o=n!==null;let d;e[0]!==i||e[1]!==o?(d=Se(o,i),e[0]=i,e[1]=o,e[2]=d):d=e[2];const c=d,u=i&&"ml-auto";let f;e[3]!==u?(f=X("shrink-0 opacity-60",u),e[3]=u,e[4]=f):f=e[4];const p=f;let r;e[5]!==n?(r=n?s.jsx("span",{className:X("size-2 shrink-0 rounded-full",Ze[n].dotClassName)}):s.jsx(qn,{size:14,className:"shrink-0"}),e[5]=n,e[6]=r):r=e[6];let m;e[7]!==l||e[8]!==n?(m=l(n?Ze[n].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=l,e[8]=n,e[9]=m):m=e[9];let g;e[10]!==p?(g=s.jsx(Ve,{size:12,className:p}),e[10]=p,e[11]=g):g=e[11];let h;e[12]!==r||e[13]!==m||e[14]!==g||e[15]!==c?(h=s.jsx(ps,{asChild:!0,children:s.jsxs("button",{type:"button",className:c,children:[r,m,g]})}),e[12]=r,e[13]=m,e[14]=g,e[15]=c,e[16]=h):h=e[16];const x=n??Ke;let b;e[17]!==a?(b=w=>a(w===Ke?null:w),e[17]=a,e[18]=b):b=e[18];let _;e[19]!==l?(_=l("taskBoard.taskFilters.priorityAnyPriority"),e[19]=l,e[20]=_):_=e[20];let y;e[21]!==_?(y=s.jsx(st,{value:Ke,children:_}),e[21]=_,e[22]=y):y=e[22];let N;e[23]!==l?(N=Yo.map(w=>s.jsxs(st,{value:w,className:"gap-2",children:[s.jsx("span",{className:X("size-2 rounded-full",Ze[w].dotClassName)}),l(Ze[w].labelKey)]},w)),e[23]=l,e[24]=N):N=e[24];let k;e[25]!==b||e[26]!==y||e[27]!==N||e[28]!==x?(k=s.jsx(hs,{align:"start",className:"w-40",children:s.jsxs(xs,{value:x,onValueChange:b,children:[y,N]})}),e[25]=b,e[26]=y,e[27]=N,e[28]=x,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==h?(C=s.jsxs(js,{children:[h,k]}),e[30]=k,e[31]=h,e[32]=C):C=e[32],C}function aa(t){const e=R.c(35),{value:n,onChange:a,block:i}=t,l=Q();let o;e[0]!==l||e[1]!==n?(o=n?l(Ht[n]):void 0,e[0]=l,e[1]=n,e[2]=o):o=e[2];const d=o,c=n!==null;let u;e[3]!==i||e[4]!==c?(u=Se(c,i),e[3]=i,e[4]=c,e[5]=u):u=e[5];const f=u,p=i&&"ml-auto";let r;e[6]!==p?(r=X("shrink-0 opacity-60",p),e[6]=p,e[7]=r):r=e[7];const m=r;let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ut,{size:14,className:"shrink-0"}),e[8]=g):g=e[8];let h;e[9]!==d||e[10]!==l?(h=d??l("taskBoard.taskFilters.dueDateLabel"),e[9]=d,e[10]=l,e[11]=h):h=e[11];let x;e[12]!==m?(x=s.jsx(Ve,{size:12,className:m}),e[12]=m,e[13]=x):x=e[13];let b;e[14]!==h||e[15]!==x||e[16]!==f?(b=s.jsx(ps,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,children:[g,h,x]})}),e[14]=h,e[15]=x,e[16]=f,e[17]=b):b=e[17];const _=n??Ke;let y;e[18]!==a?(y=D=>a(D===Ke?null:D),e[18]=a,e[19]=y):y=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(ut,{size:16,className:"text-muted-foreground"}),e[20]=N):N=e[20];let k;e[21]!==l?(k=l("taskBoard.taskFilters.dueDateAnyTime"),e[21]=l,e[22]=k):k=e[22];let C;e[23]!==k?(C=s.jsxs(st,{value:Ke,className:"gap-2",children:[N,k]}),e[23]=k,e[24]=C):C=e[24];let w;e[25]!==l?(w=Object.entries(Ht).map(D=>{const[I,M]=D,v=I==="overdue";return s.jsxs(st,{value:I,className:X("gap-2",v&&"text-destructive"),children:[s.jsx(ut,{size:16,className:X("shrink-0",v?"text-destructive":"text-muted-foreground")}),l(M)]},I)}),e[25]=l,e[26]=w):w=e[26];let j;e[27]!==_||e[28]!==y||e[29]!==C||e[30]!==w?(j=s.jsx(hs,{align:"start",className:"w-44",children:s.jsxs(xs,{value:_,onValueChange:y,children:[C,w]})}),e[27]=_,e[28]=y,e[29]=C,e[30]=w,e[31]=j):j=e[31];let S;return e[32]!==j||e[33]!==b?(S=s.jsxs(js,{children:[b,j]}),e[32]=j,e[33]=b,e[34]=S):S=e[34],S}function la(t){const e=R.c(56),{value:n,tags:a,onChange:i,block:l}=t,o=Q(),[d,c]=G.useState(!1);let u;e[0]!==i||e[1]!==n?(u=B=>i(n.includes(B)?n.filter(F=>F!==B):[...n,B]),e[0]=i,e[1]=n,e[2]=u):u=e[2];const f=u;let p;e[3]!==o||e[4]!==a||e[5]!==n[0]||e[6]!==n.length?(p=n.length===0?o("taskBoard.taskFilters.tagsLabel"):n.length===1?a.find(B=>B.id===n[0])?.name??o("taskBoard.taskFilters.tagsLabel"):o("taskBoard.taskFilters.tagsSelectedCount",{count:n.length}),e[3]=o,e[4]=a,e[5]=n[0],e[6]=n.length,e[7]=p):p=e[7];const r=p,m=n.length>0;let g;e[8]!==l||e[9]!==m?(g=Se(m,l),e[8]=l,e[9]=m,e[10]=g):g=e[10];const h=g,x=l&&"ml-auto";let b;e[11]!==x?(b=X("shrink-0 opacity-60",x),e[11]=x,e[12]=b):b=e[12];const _=b;let y;e[13]!==a||e[14]!==n[0]||e[15]!==n.length?(y=n.length===1?s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Ut(a.find(B=>B.id===n[0])?.color)}}):s.jsx(Ws,{size:14,className:"shrink-0"}),e[13]=a,e[14]=n[0],e[15]=n.length,e[16]=y):y=e[16];let N;e[17]!==r?(N=s.jsx("span",{className:"max-w-[10rem] truncate",children:r}),e[17]=r,e[18]=N):N=e[18];let k;e[19]!==_?(k=s.jsx(Ve,{size:12,className:_}),e[19]=_,e[20]=k):k=e[20];let C;e[21]!==y||e[22]!==N||e[23]!==k||e[24]!==h?(C=s.jsx(ze,{asChild:!0,children:s.jsxs("button",{type:"button",className:h,children:[y,N,k]})}),e[21]=y,e[22]=N,e[23]=k,e[24]=h,e[25]=C):C=e[25];let w;e[26]!==o?(w=o("taskBoard.taskFilters.tagsFilterPlaceholder"),e[26]=o,e[27]=w):w=e[27];let j;e[28]!==o?(j=o("taskBoard.taskFilters.tagsFilterPlaceholder"),e[28]=o,e[29]=j):j=e[29];let S;e[30]!==w||e[31]!==j?(S=s.jsx(At,{placeholder:w,"aria-label":j,className:"h-9"}),e[30]=w,e[31]=j,e[32]=S):S=e[32];let D;e[33]!==o?(D=o("taskBoard.taskFilters.tagsNoTagsFound"),e[33]=o,e[34]=D):D=e[34];let I;e[35]!==D?(I=s.jsx(It,{children:D}),e[35]=D,e[36]=I):I=e[36];let M;if(e[37]!==a||e[38]!==f||e[39]!==n){let B;e[41]!==f||e[42]!==n?(B=F=>s.jsxs(ve,{value:F.name,onSelect:()=>f(F.id),className:"gap-2",children:[s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Ut(F.color)}}),s.jsx("span",{className:"flex-1 truncate",children:F.name}),n.includes(F.id)&&s.jsx(Ge,{size:14,className:"shrink-0 text-foreground"})]},F.id),e[41]=f,e[42]=n,e[43]=B):B=e[43],M=a.map(B),e[37]=a,e[38]=f,e[39]=n,e[40]=M}else M=e[40];let v;e[44]!==M?(v=s.jsx(qe,{children:M}),e[44]=M,e[45]=v):v=e[45];let A;e[46]!==I||e[47]!==v?(A=s.jsxs(Tt,{children:[I,v]}),e[46]=I,e[47]=v,e[48]=A):A=e[48];let T;e[49]!==S||e[50]!==A?(T=s.jsx(ot,{align:"start",className:"w-56 p-0",children:s.jsxs(Bt,{children:[S,A]})}),e[49]=S,e[50]=A,e[51]=T):T=e[51];let O;return e[52]!==d||e[53]!==C||e[54]!==T?(O=s.jsxs(nt,{open:d,onOpenChange:c,children:[C,T]}),e[52]=d,e[53]=C,e[54]=T,e[55]=O):O=e[55],O}function ia(t){const e=R.c(73),{value:n,repos:a,onChange:i,block:l}=t,o=Q(),[d,c]=G.useState(!1);let u;e[0]!==o||e[1]!==n?(u=n===null?o("taskBoard.taskFilters.repoLabel"):n===yt?o("taskBoard.taskFilters.repoNoRepo"):n,e[0]=o,e[1]=n,e[2]=u):u=e[2];const f=u;let p;e[3]!==i?(p=z=>{i(z),c(!1)},e[3]=i,e[4]=p):p=e[4];const r=p,m=n!==null;let g;e[5]!==l||e[6]!==m?(g=Se(m,l),e[5]=l,e[6]=m,e[7]=g):g=e[7];const h=g,x=l&&"ml-auto";let b;e[8]!==x?(b=X("shrink-0 opacity-60",x),e[8]=x,e[9]=b):b=e[9];const _=b;let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ht,{className:"size-3.5 shrink-0"}),e[10]=y):y=e[10];let N;e[11]!==f?(N=s.jsx("span",{className:"max-w-[12rem] truncate",children:f}),e[11]=f,e[12]=N):N=e[12];let k;e[13]!==_?(k=s.jsx(Ve,{size:12,className:_}),e[13]=_,e[14]=k):k=e[14];let C;e[15]!==N||e[16]!==k||e[17]!==h?(C=s.jsx(ze,{asChild:!0,children:s.jsxs("button",{type:"button",className:h,children:[y,N,k]})}),e[15]=N,e[16]=k,e[17]=h,e[18]=C):C=e[18];let w;e[19]!==o?(w=o("taskBoard.taskFilters.repoFilterPlaceholder"),e[19]=o,e[20]=w):w=e[20];let j;e[21]!==o?(j=o("taskBoard.taskFilters.repoFilterPlaceholder"),e[21]=o,e[22]=j):j=e[22];let S;e[23]!==w||e[24]!==j?(S=s.jsx(At,{placeholder:w,"aria-label":j,className:"h-9"}),e[23]=w,e[24]=j,e[25]=S):S=e[25];let D;e[26]!==o?(D=o("taskBoard.taskFilters.repoNoReposFound"),e[26]=o,e[27]=D):D=e[27];let I;e[28]!==D?(I=s.jsx(It,{children:D}),e[28]=D,e[29]=I):I=e[29];let M;e[30]!==o?(M=o("taskBoard.taskFilters.repoAnyRepo"),e[30]=o,e[31]=M):M=e[31];let v;e[32]!==r?(v=()=>r(null),e[32]=r,e[33]=v):v=e[33];let A;e[34]!==o?(A=o("taskBoard.taskFilters.repoAnyRepo"),e[34]=o,e[35]=A):A=e[35];let T;e[36]!==M||e[37]!==v||e[38]!==A?(T=s.jsx(ve,{value:M,onSelect:v,children:A}),e[36]=M,e[37]=v,e[38]=A,e[39]=T):T=e[39];let O;e[40]!==o?(O=o("taskBoard.taskFilters.repoNoRepo"),e[40]=o,e[41]=O):O=e[41];let B;e[42]!==r?(B=()=>r(yt),e[42]=r,e[43]=B):B=e[43];let F;e[44]!==o?(F=o("taskBoard.taskFilters.repoNoRepo"),e[44]=o,e[45]=F):F=e[45];let $;e[46]!==O||e[47]!==B||e[48]!==F?($=s.jsx(ve,{value:O,onSelect:B,children:F}),e[46]=O,e[47]=B,e[48]=F,e[49]=$):$=e[49];let U;e[50]!==T||e[51]!==$?(U=s.jsxs(qe,{children:[T,$]}),e[50]=T,e[51]=$,e[52]=U):U=e[52];let P;if(e[53]!==a||e[54]!==r||e[55]!==n){let z;e[57]!==r||e[58]!==n?(z=W=>s.jsxs(ve,{value:W,onSelect:()=>r(W),className:"gap-2",children:[s.jsx(ht,{className:"size-4 shrink-0"}),s.jsx("span",{className:"flex-1 truncate",children:W}),n===W&&s.jsx(Ge,{size:14,className:"shrink-0 text-foreground"})]},W),e[57]=r,e[58]=n,e[59]=z):z=e[59],P=a.map(z),e[53]=a,e[54]=r,e[55]=n,e[56]=P}else P=e[56];let K;e[60]!==P?(K=s.jsx(qe,{children:P}),e[60]=P,e[61]=K):K=e[61];let L;e[62]!==I||e[63]!==U||e[64]!==K?(L=s.jsxs(Tt,{children:[I,U,K]}),e[62]=I,e[63]=U,e[64]=K,e[65]=L):L=e[65];let V;e[66]!==S||e[67]!==L?(V=s.jsx(ot,{align:"start",className:"w-64 p-0",children:s.jsxs(Bt,{children:[S,L]})}),e[66]=S,e[67]=L,e[68]=V):V=e[68];let J;return e[69]!==d||e[70]!==C||e[71]!==V?(J=s.jsxs(nt,{open:d,onOpenChange:c,children:[C,V]}),e[69]=d,e[70]=C,e[71]=V,e[72]=J):J=e[72],J}function ra(t){const e=R.c(25),{value:n,onChange:a,block:i}=t,l=Q(),[o,d]=G.useState(n!==""),[c,u]=G.useState(!1),[f,p]=G.useState(n);n!==f&&(p(n),n===""&&!c&&d(!1));const r=o||i,m=r?"w-32 sm:w-44":"w-8 px-0 justify-center",g=i&&"h-10 w-full px-3 text-sm sm:w-full";let h;e[0]!==m||e[1]!==g?(h=X("inline-flex h-8 shrink-0 items-center gap-1.5 overflow-hidden rounded-lg border border-border px-2.5 text-xs text-foreground transition-all duration-200 ease-out",m,g),e[0]=m,e[1]=g,e[2]=h):h=e[2];let x;e[3]!==l?(x=l("taskBoard.taskFilters.searchLabel"),e[3]=l,e[4]=x):x=e[4];let b;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>d(!0),e[5]=b):b=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Ys,{size:14}),e[6]=_):_=e[6];let y;e[7]!==x?(y=s.jsx("button",{type:"button","aria-label":x,onClick:b,className:"shrink-0 text-muted-foreground transition-colors hover:text-foreground",children:_}),e[7]=x,e[8]=y):y=e[8];let N;e[9]!==i||e[10]!==r||e[11]!==a||e[12]!==l||e[13]!==n?(N=r&&s.jsx("input",{autoFocus:!i,value:n,onChange:w=>a(w.target.value),onFocus:()=>u(!0),onBlur:()=>{u(!1),n===""&&d(!1)},placeholder:l("taskBoard.taskFilters.searchPlaceholder"),"aria-label":l("taskBoard.taskFilters.searchPlaceholder"),className:"w-full min-w-0 bg-transparent text-xs outline-none placeholder:text-muted-foreground"}),e[9]=i,e[10]=r,e[11]=a,e[12]=l,e[13]=n,e[14]=N):N=e[14];let k;e[15]!==i||e[16]!==a||e[17]!==l||e[18]!==n?(k=n!==""&&s.jsx("button",{type:"button","aria-label":l("taskBoard.taskFilters.searchClearLabel"),onMouseDown:ca,onClick:()=>{a(""),i||d(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:s.jsx(Ls,{size:14})}),e[15]=i,e[16]=a,e[17]=l,e[18]=n,e[19]=k):k=e[19];let C;return e[20]!==h||e[21]!==y||e[22]!==N||e[23]!==k?(C=s.jsxs("div",{className:h,children:[y,N,k]}),e[20]=h,e[21]=y,e[22]=N,e[23]=k,e[24]=C):C=e[24],C}function ca(t){return t.preventDefault()}function da(t){const e=R.c(20),{block:n,onClick:a}=t,i=Q();let l;e[0]!==i?(l=i("taskBoard.taskFilters.boardSettingsLabel"),e[0]=i,e[1]=l):l=e[1];const o=l;let d;e[2]!==n?(d=X(Se(!1,n),n?"h-10 w-full":"w-8 justify-center px-0"),e[2]=n,e[3]=d):d=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Qn,{size:14,className:"shrink-0"}),e[4]=c):c=e[4];let u;e[5]!==n||e[6]!==o?(u=n&&s.jsx("span",{children:o}),e[5]=n,e[6]=o,e[7]=u):u=e[7];let f;e[8]!==o||e[9]!==a||e[10]!==d||e[11]!==u?(f=s.jsxs("button",{type:"button",onClick:a,"aria-label":o,className:d,children:[c,u]}),e[8]=o,e[9]=a,e[10]=d,e[11]=u,e[12]=f):f=e[12];const p=f;if(n)return p;let r;e[13]!==p?(r=s.jsx($e,{asChild:!0,children:p}),e[13]=p,e[14]=r):r=e[14];let m;e[15]!==o?(m=s.jsx(Oe,{side:"top",children:o}),e[15]=o,e[16]=m):m=e[16];let g;return e[17]!==r||e[18]!==m?(g=s.jsxs(Re,{children:[r,m]}),e[17]=r,e[18]=m,e[19]=g):g=e[19],g}function Ss(t){const e=R.c(53),{filters:n,members:a,tags:i,repos:l,onChange:o,onOpenBoardSettings:d,block:c}=t;let u;e[0]!==n||e[1]!==o?(u=C=>o({...n,search:C}),e[0]=n,e[1]=o,e[2]=u):u=e[2];let f;e[3]!==c||e[4]!==n.search||e[5]!==u?(f=s.jsx(ra,{block:c,value:n.search,onChange:u}),e[3]=c,e[4]=n.search,e[5]=u,e[6]=f):f=e[6];let p;e[7]!==n||e[8]!==o?(p=C=>o({...n,assignee:C}),e[7]=n,e[8]=o,e[9]=p):p=e[9];let r;e[10]!==c||e[11]!==n.assignee||e[12]!==a||e[13]!==p?(r=s.jsx(na,{block:c,value:n.assignee,members:a,onChange:p}),e[10]=c,e[11]=n.assignee,e[12]=a,e[13]=p,e[14]=r):r=e[14];let m;e[15]!==n||e[16]!==o?(m=C=>o({...n,priority:C}),e[15]=n,e[16]=o,e[17]=m):m=e[17];let g;e[18]!==c||e[19]!==n.priority||e[20]!==m?(g=s.jsx(oa,{block:c,value:n.priority,onChange:m}),e[18]=c,e[19]=n.priority,e[20]=m,e[21]=g):g=e[21];let h;e[22]!==n||e[23]!==o?(h=C=>o({...n,due:C}),e[22]=n,e[23]=o,e[24]=h):h=e[24];let x;e[25]!==c||e[26]!==n.due||e[27]!==h?(x=s.jsx(aa,{block:c,value:n.due,onChange:h}),e[25]=c,e[26]=n.due,e[27]=h,e[28]=x):x=e[28];let b;e[29]!==n||e[30]!==o?(b=C=>o({...n,tags:C}),e[29]=n,e[30]=o,e[31]=b):b=e[31];let _;e[32]!==c||e[33]!==n.tags||e[34]!==b||e[35]!==i?(_=s.jsx(la,{block:c,value:n.tags,tags:i,onChange:b}),e[32]=c,e[33]=n.tags,e[34]=b,e[35]=i,e[36]=_):_=e[36];let y;e[37]!==c||e[38]!==n||e[39]!==o||e[40]!==l?(y=(l.length>0||n.repo!==null)&&s.jsx(ia,{block:c,value:n.repo,repos:l,onChange:C=>o({...n,repo:C})}),e[37]=c,e[38]=n,e[39]=o,e[40]=l,e[41]=y):y=e[41];let N;e[42]!==c||e[43]!==d?(N=s.jsx(da,{block:c,onClick:d}),e[42]=c,e[43]=d,e[44]=N):N=e[44];let k;return e[45]!==_||e[46]!==y||e[47]!==N||e[48]!==f||e[49]!==r||e[50]!==g||e[51]!==x?(k=s.jsxs(s.Fragment,{children:[f,r,g,x,_,y,N]}),e[45]=_,e[46]=y,e[47]=N,e[48]=f,e[49]=r,e[50]=g,e[51]=x,e[52]=k):k=e[52],k}function Ml(t){const e=R.c(15),{filters:n,members:a,tags:i,repos:l,onChange:o,onOpenBoardSettings:d}=t,c=Q();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(gs,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=u):u=e[0];let f;e[1]!==n||e[2]!==a||e[3]!==o||e[4]!==d||e[5]!==l||e[6]!==i?(f=s.jsx(Ss,{filters:n,members:a,tags:i,repos:l,onChange:o,onOpenBoardSettings:d}),e[1]=n,e[2]=a,e[3]=o,e[4]=d,e[5]=l,e[6]=i,e[7]=f):f=e[7];let p;e[8]!==n||e[9]!==o||e[10]!==c?(p=Jo(n)&&s.jsx("button",{type:"button",onClick:()=>o(Ns),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:c("taskBoard.taskFilters.clearButton")}),e[8]=n,e[9]=o,e[10]=c,e[11]=p):p=e[11];let r;return e[12]!==f||e[13]!==p?(r=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u,f,p]}),e[12]=f,e[13]=p,e[14]=r):r=e[14],r}function Ll(t){const e=R.c(41),{filters:n,members:a,tags:i,repos:l,onChange:o,onOpenBoardSettings:d}=t,c=Q(),[u,f]=G.useState(!1),p=Zo(n),r=p>0;let m;e[0]!==r?(m=Se(r),e[0]=r,e[1]=m):m=e[1];const g=m;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(gs,{size:14,className:"shrink-0"}),e[2]=h):h=e[2];let x;e[3]!==c?(x=c("taskBoard.taskFilters.filterDrawerButtonLabel"),e[3]=c,e[4]=x):x=e[4];let b;e[5]!==p?(b=p>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:p}),e[5]=p,e[6]=b):b=e[6];let _;e[7]!==x||e[8]!==b||e[9]!==g?(_=s.jsx(an,{asChild:!0,children:s.jsxs("button",{type:"button",className:g,children:[h,x,b]})}),e[7]=x,e[8]=b,e[9]=g,e[10]=_):_=e[10];let y;e[11]!==c?(y=c("taskBoard.taskFilters.filterDrawerTitle"),e[11]=c,e[12]=y):y=e[12];let N;e[13]!==y?(N=s.jsx(Dt,{className:"px-4 pt-4 text-base font-medium text-foreground",children:y}),e[13]=y,e[14]=N):N=e[14];let k;e[15]!==n||e[16]!==a||e[17]!==o||e[18]!==d||e[19]!==l||e[20]!==i?(k=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(Ss,{block:!0,filters:n,members:a,tags:i,repos:l,onChange:o,onOpenBoardSettings:d})}),e[15]=n,e[16]=a,e[17]=o,e[18]=d,e[19]=l,e[20]=i,e[21]=k):k=e[21];let C;e[22]!==p||e[23]!==o||e[24]!==c?(C=p>0&&s.jsx(be,{variant:"outline",className:"flex-1",onClick:()=>o(Ns),children:c("taskBoard.taskFilters.clearAllButton")}),e[22]=p,e[23]=o,e[24]=c,e[25]=C):C=e[25];let w;e[26]!==c?(w=c("taskBoard.taskFilters.doneButton"),e[26]=c,e[27]=w):w=e[27];let j;e[28]!==w?(j=s.jsx(ss,{asChild:!0,children:s.jsx(be,{className:"flex-1",children:w})}),e[28]=w,e[29]=j):j=e[29];let S;e[30]!==C||e[31]!==j?(S=s.jsxs(ns,{className:"flex-row gap-2",children:[C,j]}),e[30]=C,e[31]=j,e[32]=S):S=e[32];let D;e[33]!==S||e[34]!==N||e[35]!==k?(D=s.jsxs(St,{className:"p-0",children:[N,k,S]}),e[33]=S,e[34]=N,e[35]=k,e[36]=D):D=e[36];let I;return e[37]!==u||e[38]!==D||e[39]!==_?(I=s.jsxs(_t,{open:u,onOpenChange:f,direction:"bottom",children:[_,D]}),e[37]=u,e[38]=D,e[39]=_,e[40]=I):I=e[40],I}function $l(t,e){return Lo(t,e.keySeq)??e.id}function Ol(t,e){const n=e?.trim();if(n)return t.find(a=>_s(n,a.keySeq))??t.find(a=>a.id===n)}export{pl as A,Bl as B,_l as C,kl as D,Ns as E,Sl as F,Fl as G,El as H,Go as I,Pl as J,Co as K,Vt as L,gl as N,Ze as P,Kt as S,Il as T,$l as a,vl as b,Ko as c,ml as d,zo as e,bl as f,Yo as g,Al as h,Cs as i,Ut as j,ks as k,wl as l,xl as m,Tl as n,yl as o,Cl as p,Ho as q,vs as r,Nl as s,Lo as t,hl as u,jl as v,Ol as w,Ll as x,Ml as y,Dl as z};
@@ -1 +0,0 @@
1
- import{r as p,c as A,j as x,d as N,W as _,n as w,a as P,y as j}from"./index-CW6L2S49.js";import{D as T}from"./use-destination-route-7JP5O6OJ.js";import{e as D,g as G}from"./use-virtual-mcp-BhEuXWFl.js";import{a as U}from"./hooks-bhKP99Ax.js";import{p as $,d as R,w as k}from"./thread-intent-1OmKxTfG.js";import{g as B}from"./github-repo-BpKUwJal.js";const S=p.createContext(null);function M(e){const t=A.c(7),{children:n}=e,[s,r]=p.useState(!1),[a,m]=p.useState(0);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>m(F),t[0]=i):i=t[0];const l=i;let o;t[1]!==s||t[2]!==a?(o={empty:s,setEmpty:r,orderRevision:a,bumpOrderRevision:l},t[1]=s,t[2]=a,t[3]=o):o=t[3];let c;return t[4]!==n||t[5]!==o?(c=x.jsx(S.Provider,{value:o,children:n}),t[4]=n,t[5]=o,t[6]=c):c=t[6],c}function F(e){return e+1}function I(){return p.useContext(S)?.empty??!1}function L(){return p.useContext(S)?.bumpOrderRevision??V}function V(){}function E(e,t){if(!t)return!0;if(e.partial)return!1;const n=$(e.metadata?.runtime);return n===null||n===t}function q(e,t,n,s){let r=null;for(const a of e)a.virtual_mcp_id===t&&a.created_by===n&&(a.hidden||E(a,s)&&(!r||a.updated_at>r.updated_at)&&(r=a));return r}function C(e,t,n,s){return e.find(r=>!r.hidden&&r.virtual_mcp_id===t&&r.created_by===n&&r.title==="New chat"&&!r.harness_id&&E(r,s))}function H(e,t,n,s,r){return r?q(e,t,n,s)??C(e,t,n,s):C(e,t,n,s)}const Q=[];function ee(){const e=A.c(14),t=N(),{org:n,locator:s}=_(),r=w(),a=D(),{data:m}=P.useSession(),i=L(),l=U();let o;e[0]!==i||e[1]!==a||e[2]!==s||e[3]!==l?.threads||e[4]!==t||e[5]!==n.slug||e[6]!==m?.user?.id?(o=(d,f,g)=>{i();const u=(a??[]).find(O=>O.id===d),b=H(l?.threads.get()??Q,d,m?.user?.id,g??(u?R(u.metadata):void 0),!!(u&&B(u))),y=b?.id??crypto.randomUUID();!b&&f?.runtime&&k(sessionStorage,s,y,{runtime:f.runtime});const v=f?.panel?j(f.panel):null;if(!v?.panel){t({to:T.home,params:{org:n.slug},search:{virtualmcpid:d,thread:y}});return}t({to:T.agents,params:{org:n.slug,panel:v.panel},search:{...v.payload,virtualmcpid:d,thread:y}})},e[0]=i,e[1]=a,e[2]=s,e[3]=l?.threads,e[4]=t,e[5]=n.slug,e[6]=m?.user?.id,e[7]=o):o=e[7];const c=o;let h;return e[8]!==i||e[9]!==a||e[10]!==c||e[11]!==n||e[12]!==r?(h=(d,f)=>{i();const g=a.find(u=>u.id===d);if(f?.runtime)return c(d,f,f.runtime);if(g)return c(d,f,R(g.metadata));G(r,n).then(u=>u.find(b=>b.id===d)).catch(W).then(u=>c(d,f,u?R(u.metadata):void 0))},e[8]=i,e[9]=a,e[10]=c,e[11]=n,e[12]=r,e[13]=h):h=e[13],h}function W(){}export{M as S,H as a,I as b,L as c,C as f,ee as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./use-infinite-scroll-BYZDUtLT.js";import{fg as i}from"./index-CW6L2S49.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./use-infinite-scroll-BYZDUtLT.js";import{fg as u,bU as n}from"./index-CW6L2S49.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};