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 +1 @@
1
- import{G as he,c as v,l as I,j as t,b as O,r as C,B as ge,a as F,t as R,w as Pe,bY as Oe,m as Te,K as Ie,bZ as Ae,W as ie,_ as ae,d as Re,s as qe,a1 as xe,a2 as be,a4 as je,o as L,b0 as ve,L as Fe,a6 as ue,a5 as ne,b_ as Le,b$ as He,z as Ee,c0 as Me,f as De,k as Be,c1 as Ue,c2 as Ve,c3 as Ge,a0 as We}from"./index-CW6L2S49.js";import{t as Ke}from"./ChevronUp-DDdMqJL1.js";import{i as Ye}from"./ChevronRight-DuX1hKVe.js";import{h as Je}from"./TrendUp01-0nrjwpEZ.js";import{I as Qe,T as ke}from"./toolbar-icon-button-BO82E-n0.js";import{i as G}from"./Check-Bu3XsPtR.js";import{i as Ze}from"./ChevronSelectorVertical-CUY38lF0.js";import{s as Xe}from"./Plus-BsdY3vta.js";import{c as me,e as te,d as W,b as es,C as ss,a as ts}from"./command-Bz-l73oK.js";import{a as as,b as ns,P as rs}from"./popover-Cfo1Nvgv.js";import{A as oe,f as is,e as os,aS as ls,aT as cs}from"./agent-icon-RpsSZWOm.js";import{C as ds}from"./create-organization-dialog-CZnpESma.js";import{s as gs}from"./XClose-D_sSgqWY.js";import{u as us}from"./use-destination-route-7JP5O6OJ.js";import{u as Se,L as Y}from"./use-project-scope-BgyywlH_.js";import{d as ms}from"./use-virtual-mcp-BhEuXWFl.js";import{i as fs}from"./ArrowLeft-B_C58IhS.js";import{t as ps,b as fe}from"./Users03-C9WBhoi4.js";import{i as hs}from"./CreditCard01-gu6q0yZd.js";import{i as xs}from"./HardDrive-DjrfIOu4.js";import{i as bs}from"./Key01-m5a-9O7E.js";import{n as js}from"./LinkExternal01-DFZf17HG.js";import{t as vs}from"./Stars01-D7oX_8Wb.js";import{s as ks}from"./User01-yXo0r48U.js";import{i as Ss}from"./Zap-BwqaqJR6.js";import{u as ys}from"./use-join-requests-DLCB2F3F.js";function ye(){const{state:a,isMobile:e}=he();return a==="collapsed"&&!e}function Ns(a){let e=0;for(let d=0;d<a.length;d++)e=a.charCodeAt(d)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function le(a){const e=v.c(13),{org:s,size:d}=a,i=d===void 0?"sm":d,n=i==="xs"?"size-5":"size-6",r=i==="xs"?"text-[9px]":"text-xs";let o;e[0]!==n?(o=I(n,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=n,e[1]=o):o=e[1];let l;e[2]!==s.logo||e[3]!==s.name?(l=s.logo?void 0:Ns(s.name),e[2]=s.logo,e[3]=s.name,e[4]=l):l=e[4];let c;e[5]!==s.logo||e[6]!==s.name||e[7]!==r?(c=s.logo?t.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):t.jsx("span",{className:I("font-semibold leading-none",r),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=r,e[8]=c):c=e[8];let g;return e[9]!==o||e[10]!==l||e[11]!==c?(g=t.jsx("div",{className:o,style:l,children:c}),e[9]=o,e[10]=l,e[11]=c,e[12]=g):g=e[12],g}function $s({invitation:a,onChanged:e}){const s=O(),[d,i]=C.useState(!1),n=a.organizationName??s("header.orgSwitcher.unknownOrganization"),r=async()=>{i(!0);try{const c=await F.organization.acceptInvitation({invitationId:a.id});if(c.error){R.error(c.error.message),i(!1);return}}catch{R.error(s("header.orgSwitcher.failedToAcceptInvitation")),i(!1);return}R.success(s("header.orgSwitcher.joined",{name:n})),Pe();let l;try{l=(await F.organization.getFullOrganization({query:{organizationId:a.organizationId}}))?.data?.slug}catch{}window.location.href=l?`/${l}`:"/"},o=async()=>{i(!0);try{const l=await F.organization.rejectInvitation({invitationId:a.id});if(l.error){R.error(l.error.message),i(!1);return}R.success(s("header.orgSwitcher.invitationDeclined")),i(!1),e()}catch{R.error(s("header.orgSwitcher.failedToDeclineInvitation")),i(!1)}};return t.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[t.jsx(le,{org:{name:n},size:"sm"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate text-sm font-medium",children:n}),t.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[t.jsx(ge,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:d,children:s("header.orgSwitcher.accept")}),t.jsx(ge,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:o,disabled:d,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:n}),children:t.jsx(gs,{size:14})})]})]})}function Ne(){const a=C.useContext(Oe),{data:e,refetch:s}=a.hooks.useListUserInvitations();return{invitations:(e??[]).filter(i=>i.status==="pending"&&new Date(i.expiresAt)>new Date),refetch:()=>s?.()}}function _s(a){const e=v.c(13),s=a.trim(),{data:d}=F.useSession(),i=d?.user?.id??"",n=s.length>0&&!!i,r=Ie.projectSearch(i,s);let o;e[0]!==s?(o=async k=>{const{signal:j}=k,S=await fetch(`/api/_me/projects/search?q=${encodeURIComponent(s)}`,{signal:j});if(!S.ok)throw new Error(`Project search failed: ${S.status}`);return await S.json()},e[0]=s,e[1]=o):o=e[1];let l;e[2]!==n||e[3]!==r||e[4]!==o?(l={queryKey:r,queryFn:o,enabled:n,placeholderData:Ae,staleTime:3e4,retry:!1},e[2]=n,e[3]=r,e[4]=o,e[5]=l):l=e[5];const{data:c,isFetching:g,isPlaceholderData:u,isError:f}=Te(l);let m;e[6]!==c?.items?(m=c?.items??[],e[6]=c?.items,e[7]=m):m=e[7];const h=n&&g,b=n&&u;let p;return e[8]!==f||e[9]!==m||e[10]!==h||e[11]!==b?(p={hits:m,isSearching:h,isStale:b,isError:f},e[8]=f,e[9]=m,e[10]=h,e[11]=b,e[12]=p):p=e[12],p}function pe(a){const e=v.c(15),{id:s,label:d,createLabel:i,onCreate:n}=a;let r;e[0]!==s||e[1]!==d?(r=t.jsx("span",{id:s,className:"truncate",children:d}),e[0]=s,e[1]=d,e[2]=r):r=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Xe,{size:14}),e[3]=o):o=e[3];let l;e[4]!==i||e[5]!==n?(l=t.jsx(xe,{asChild:!0,children:t.jsx("button",{type:"button","aria-label":i,className:"-my-1 shrink-0 cursor-pointer rounded-md p-1 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",onClick:n,children:o})}),e[4]=i,e[5]=n,e[6]=l):l=e[6];let c;e[7]!==i?(c=t.jsx(be,{side:"right",children:i}),e[7]=i,e[8]=c):c=e[8];let g;e[9]!==l||e[10]!==c?(g=t.jsxs(je,{children:[l,c]}),e[9]=l,e[10]=c,e[11]=g):g=e[11];let u;return e[12]!==r||e[13]!==g?(u=t.jsxs("div",{className:"flex w-full items-center justify-between gap-2 px-2 py-1.5 text-xs font-medium text-muted-foreground",children:[r,g]}),e[12]=r,e[13]=g,e[14]=u):u=e[14],u}const K="min-h-9 items-center",T={allProjects:"scope:__all__",project:a=>`scope:${a}`,org:a=>`org:${a}`,foreignProject:(a,e)=>`travel:${a}:${e}`};function zs(a){const e=v.c(11),{active:s,rows:d}=a,i=O();let n,r,o,l;if(e[0]!==s||e[1]!==d||e[2]!==i){l=Symbol.for("react.early_return_sentinel");e:{const g=d.get(s);if(g?.kind!=="travel"){l=null;break e}n="border-t border-border px-3 py-2 text-xs text-warning",r=i("sidebar.picker.verbTravel",{name:g.label}),o=g.leaves&&t.jsxs("span",{className:"text-muted-foreground",children:[" ",i("sidebar.picker.verbLeaves",{name:g.leaves})]})}e[0]=s,e[1]=d,e[2]=i,e[3]=n,e[4]=r,e[5]=o,e[6]=l}else n=e[3],r=e[4],o=e[5],l=e[6];if(l!==Symbol.for("react.early_return_sentinel"))return l;let c;return e[7]!==n||e[8]!==r||e[9]!==o?(c=t.jsxs("div",{className:n,children:[r,o]}),e[7]=n,e[8]=r,e[9]=o,e[10]=c):c=e[10],c}function Cs(a){const e=v.c(27),{onClose:s,onCreateOrg:d}=a,i=O(),n=C.useId(),r=C.useId(),o=Re(),{org:l}=ie(),{scopeId:c,projects:g,setScope:u}=Se(),{hasMore:f}=ms(),[m,h]=C.useState(""),[b,p]=C.useState(T.allProjects),k=C.useDeferredValue(m);let j;e[0]!==k?(j=k.trim(),e[0]=k,e[1]=j):j=e[1];const S=j,$=S.length>0,{data:w}=qe(),{invitations:z,refetch:N}=Ne();let y;e[2]!==l.slug?(y=(x,_)=>x.slug===l.slug?-1:_.slug===l.slug?1:0,e[2]=l.slug,e[3]=y):y=e[3];const P=(w??[]).slice().sort(y),{hits:J,isSearching:ze,isStale:Ce,isError:Q}=_s($?S:""),Z=us();let H;e[4]!==Z?(H=Z.startsWith("/$org/settings"),e[4]=Z,e[5]=H):H=e[5];const E=H,q=new Map;let M;e[6]!==E||e[7]!==o||e[8]!==s||e[9]!==l.slug||e[10]!==u?(M=x=>{L("scope_set",{scoped:x!==null,fromSettings:E}),E?o({to:"/$org",params:{org:l.slug},search:{virtualmcpid:x??void 0}}):u(x),s()},e[6]=E,e[7]=o,e[8]=s,e[9]=l.slug,e[10]=u,e[11]=M):M=e[11];const X=M;let D;e[12]!==o||e[13]!==s?(D=(x,_)=>{L("org_project_travel",{scoped:!!_}),o({to:"/$org",params:{org:x},search:_?{virtualmcpid:_}:{}}),s()},e[12]=o,e[13]=s,e[14]=D):D=e[14];const ce=D;let B;e[15]!==o||e[16]!==s||e[17]!==l.slug?(B=()=>{L("picker_new_project"),o({to:"/$org/agents/{-$panel}",params:{org:l.slug,panel:void 0},search:{virtualmcpid:void 0}}),s()},e[15]=o,e[16]=s,e[17]=l.slug,e[18]=B):B=e[18];const we=B;q.set(T.allProjects,{kind:"scope",label:i("sidebar.scope.allProjects")});let A;e[19]!==i?(A=i("sidebar.picker.searchPlaceholder"),e[19]=i,e[20]=A):A=e[20];let U;e[21]!==m||e[22]!==A?(U=t.jsx(ts,{value:m,onValueChange:h,placeholder:A}),e[21]=m,e[22]=A,e[23]=U):U=e[23];const ee=es,se=$?t.jsxs(t.Fragment,{children:[Q&&t.jsx(me,{children:i("sidebar.picker.searchFailed")}),!Q&&!ze&&J.length===0&&t.jsx(me,{children:i("sidebar.picker.noMatches",{query:S})}),!Q&&J.length>0&&t.jsx(te,{heading:i("sidebar.picker.projectsHeading"),className:I(Ce&&"opacity-50"),children:J.map(x=>t.jsx(ws,{hit:x,currentOrgSlug:l.slug,currentOrgName:l.name,scopeId:c,rows:q,onScope:X,onTravel:ce},`${x.orgSlug}:${x.id}`))})]}):t.jsxs(t.Fragment,{children:[t.jsx(pe,{id:n,label:i("sidebar.picker.projectsHeading"),createLabel:i("sidebar.picker.newProject"),onCreate:we}),t.jsxs(te,{"aria-labelledby":n,children:[t.jsxs(W,{value:T.allProjects,className:K,onSelect:()=>X(null),children:[t.jsx("span",{className:"min-w-0 flex-1 truncate",children:i("sidebar.scope.allProjects")}),c===null&&t.jsx(G,{size:14})]}),g.map(x=>{const _=T.project(x.id);return q.set(_,{kind:"scope",label:x.title}),t.jsxs(W,{value:_,className:K,onSelect:()=>X(x.id),children:[t.jsx(oe,{icon:x.icon,name:x.title,size:"2xs",className:"shrink-0"}),t.jsx("span",{className:"min-w-0 flex-1 truncate",children:x.title}),c===x.id&&t.jsx(G,{size:14})]},x.id)}),f&&t.jsx("p",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:i("sidebar.picker.moreExist")})]}),t.jsx(pe,{id:r,label:i("sidebar.picker.orgsHeading"),createLabel:i("sidebar.picker.newOrganization"),onCreate:d}),t.jsxs(te,{"aria-labelledby":r,children:[z.map(x=>t.jsx($s,{invitation:x,onChanged:N},x.id)),P.map(x=>{const _=x.slug===l.slug,de=T.org(x.slug);return q.set(de,{kind:_?"scope":"travel",label:x.name,..._?{}:{leaves:l.name}}),t.jsxs(W,{value:de,className:K,onSelect:()=>_?s():ce(x.slug),children:[t.jsx(le,{org:x,size:"xs"}),t.jsx("span",{className:"min-w-0 flex-1 truncate",children:x.name}),_&&t.jsx(G,{size:14})]},x.id)})]})]});let V;return e[24]!==ee||e[25]!==se?(V=t.jsx(ee,{children:se}),e[24]=ee,e[25]=se,e[26]=V):V=e[26],t.jsxs(ss,{shouldFilter:!1,value:b,onValueChange:p,className:"max-h-[min(560px,70dvh)]",children:[U,V,t.jsx(zs,{active:b,rows:q})]})}function ws(a){const e=v.c(31),{hit:s,currentOrgSlug:d,currentOrgName:i,scopeId:n,rows:r,onScope:o,onTravel:l}=a,c=s.orgSlug===d;let g;e[0]!==i||e[1]!==s.id||e[2]!==s.orgSlug||e[3]!==s.title||e[4]!==c||e[5]!==r?(g=c?T.project(s.id):T.foreignProject(s.orgSlug,s.id),r.set(g,{kind:c?"scope":"travel",label:s.title,leaves:c?void 0:i}),e[0]=i,e[1]=s.id,e[2]=s.orgSlug,e[3]=s.title,e[4]=c,e[5]=r,e[6]=g):g=e[6];let u;e[7]!==s.id||e[8]!==s.orgSlug||e[9]!==c||e[10]!==o||e[11]!==l?(u=()=>c?o(s.id):l(s.orgSlug,s.id),e[7]=s.id,e[8]=s.orgSlug,e[9]=c,e[10]=o,e[11]=l,e[12]=u):u=e[12];let f;e[13]!==s.icon||e[14]!==s.title?(f=t.jsx(oe,{icon:s.icon,name:s.title,size:"2xs",className:"shrink-0"}),e[13]=s.icon,e[14]=s.title,e[15]=f):f=e[15];let m;e[16]!==s.title?(m=t.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.title}),e[16]=s.title,e[17]=m):m=e[17];let h;e[18]!==s.orgName?(h=t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:s.orgName}),e[18]=s.orgName,e[19]=h):h=e[19];let b;e[20]!==s.id||e[21]!==c||e[22]!==n?(b=c&&n===s.id&&t.jsx(G,{size:14}),e[20]=s.id,e[21]=c,e[22]=n,e[23]=b):b=e[23];let p;return e[24]!==u||e[25]!==f||e[26]!==m||e[27]!==h||e[28]!==b||e[29]!==g?(p=t.jsxs(W,{value:g,className:K,onSelect:u,children:[f,m,h,b]}),e[24]=u,e[25]=f,e[26]=m,e[27]=h,e[28]=b,e[29]=g,e[30]=p):p=e[30],p}function $e(a){const e=v.c(28),{collapsed:s}=a,d=s===void 0?!1:s,i=O(),{org:n}=ie(),{project:r}=Se(),{invitations:o}=Ne(),[l,c]=C.useState(!1),[g,u]=C.useState(!1);let f;if(e[0]!==d||e[1]!==o.length||e[2]!==n||e[3]!==r||e[4]!==i){const w=r?i("sidebar.picker.projectInOrg",{project:r.title,org:n.name}):n.name;let z;e[6]!==n||e[7]!==r?(z=r?t.jsx(oe,{icon:r.icon,name:r.title,size:"xs",className:"shrink-0"}):t.jsx(le,{org:n,size:"sm"}),e[6]=n,e[7]=r,e[8]=z):z=e[8];let N;e[9]!==o.length?(N=o.length>0&&t.jsx("span",{className:"absolute -right-1 -top-1 size-2.5 rounded-full bg-destructive ring-2 ring-background"}),e[9]=o.length,e[10]=N):N=e[10];let y;e[11]!==z||e[12]!==N?(y=t.jsxs("div",{className:"relative inline-flex shrink-0",children:[z,N]}),e[11]=z,e[12]=N,e[13]=y):y=e[13];const P=y;f=d?t.jsx(ae,{tooltip:w,"data-tour":Y.switcher,children:P}):t.jsxs("button",{type:"button","data-tour":Y.switcher,"aria-label":i("sidebar.picker.ariaLabel",{name:w}),className:I("flex min-w-0 flex-1 items-center gap-2 rounded-lg py-1.5 pl-1 pr-1.5 text-left md:h-[34px] md:py-0","[transition:background-color_180ms_ease] hover:bg-sidebar-accent",Qe),children:[P,t.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:r?r.title:n.name}),t.jsx(Ze,{size:14,className:"shrink-0 text-muted-foreground"})]}),e[0]=d,e[1]=o.length,e[2]=n,e[3]=r,e[4]=i,e[5]=f}else f=e[5];const m=f;let h;e[14]!==m?(h=t.jsx(as,{asChild:!0,children:m}),e[14]=m,e[15]=h):h=e[15];const b=d?"right":"bottom";let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Cs,{onClose:()=>c(!1),onCreateOrg:()=>{c(!1),u(!0)}}),e[16]=p):p=e[16];let k;e[17]!==b?(k=t.jsx(ns,{side:b,align:"start",className:"w-[min(340px,calc(100vw-2rem))] p-0",children:p}),e[17]=b,e[18]=k):k=e[18];let j;e[19]!==l||e[20]!==h||e[21]!==k?(j=t.jsxs(rs,{open:l,onOpenChange:c,children:[h,k]}),e[19]=l,e[20]=h,e[21]=k,e[22]=j):j=e[22];let S;e[23]!==g?(S=t.jsx(ds,{open:g,onOpenChange:u}),e[23]=g,e[24]=S):S=e[24];let $;return e[25]!==j||e[26]!==S?($=t.jsxs(t.Fragment,{children:[j,S]}),e[25]=j,e[26]=S,e[27]=$):$=e[27],$}function xt(){const a=v.c(2),e=ye();let s;return a[0]!==e?(s=t.jsxs(t.Fragment,{children:[t.jsx($e,{collapsed:e}),t.jsx(Os,{collapsed:e})]}),a[0]=e,a[1]=s):s=a[1],s}function Ps(a){const e=v.c(11),{onClose:s,children:d}=a,i=O();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx($e,{}),e[0]=n):n=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1];let o;e[2]!==i?(o=i("sidebar.header.closeSidebar"),e[2]=i,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ve,{size:16}),e[4]=l):l=e[4];let c;e[5]!==s||e[6]!==o?(c=t.jsx(ke,{onClick:s,"aria-label":o,children:l}),e[5]=s,e[6]=o,e[7]=c):c=e[7];let g;return e[8]!==d||e[9]!==c?(g=t.jsxs(t.Fragment,{children:[n,d,r,c]}),e[8]=d,e[9]=c,e[10]=g):g=e[10],g}function Os(a){const e=v.c(12),{collapsed:s}=a,d=O(),{toggleSidebar:i}=he();let n;e[0]!==d?(n=d("sidebar.header.toggleSidebar"),e[0]=d,e[1]=n):n=e[1];const r=n;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(ve,{size:16}),e[2]=o):o=e[2];let l;e[3]!==r||e[4]!==i?(l=t.jsx(xe,{asChild:!0,children:t.jsx(ke,{"aria-label":r,onClick:i,className:"shrink-0 rounded-lg md:size-[34px] group-data-[state=collapsed]/sidebar:mx-auto",children:o})}),e[3]=r,e[4]=i,e[5]=l):l=e[5];const c=!s;let g;e[6]!==r||e[7]!==c?(g=t.jsx(be,{side:"right",hidden:c,children:r}),e[6]=r,e[7]=c,e[8]=g):g=e[8];let u;return e[9]!==l||e[10]!==g?(u=t.jsxs(je,{children:[l,g]}),e[9]=l,e[10]=g,e[11]=u):u=e[11],u}function re(a){const e=v.c(30),{icon:s,label:d,isActive:i,link:n,onSelect:r,ariaLabel:o,className:l,dataTour:c,children:g}=a,u=i===void 0?!1:i,f=ye(),m=o??d,h=f?m:void 0;let b;e[0]!==l||e[1]!==c||e[2]!==u||e[3]!==h?(b={isActive:u,tooltip:h,className:l,"data-tour":c},e[0]=l,e[1]=c,e[2]=u,e[3]=h,e[4]=b):b=e[4];const p=b;let k;e[5]!==d?(k=t.jsx("span",{className:"truncate",children:d}),e[5]=d,e[6]=k):k=e[6];let j;e[7]!==s||e[8]!==k?(j=t.jsxs(t.Fragment,{children:[s,k]}),e[7]=s,e[8]=k,e[9]=j):j=e[9];const S=j;if(n){const z=u?"page":void 0;let N;e[10]!==S||e[11]!==n||e[12]!==m||e[13]!==r||e[14]!==z?(N=t.jsx(Fe,{...n,"aria-label":m,"aria-current":z,onClick:r,children:S}),e[10]=S,e[11]=n,e[12]=m,e[13]=r,e[14]=z,e[15]=N):N=e[15];let y;e[16]!==p||e[17]!==N?(y=t.jsx(ae,{asChild:!0,...p,children:N}),e[16]=p,e[17]=N,e[18]=y):y=e[18];let P;return e[19]!==g||e[20]!==y?(P=t.jsxs(ue,{children:[y,g]}),e[19]=g,e[20]=y,e[21]=P):P=e[21],P}let $;e[22]!==S||e[23]!==m||e[24]!==r||e[25]!==p?($=t.jsx(ae,{...p,"aria-label":m,onClick:r,children:S}),e[22]=S,e[23]=m,e[24]=r,e[25]=p,e[26]=$):$=e[26];let w;return e[27]!==g||e[28]!==$?(w=t.jsxs(ue,{children:[$,g]}),e[27]=g,e[28]=$,e[29]=w):w=e[29],w}function Ts(a){const e=v.c(5),{label:s,link:d,onSelect:i}=a;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(fs,{size:16}),e[0]=n):n=e[0];let r;return e[1]!==s||e[2]!==d||e[3]!==i?(r=t.jsx("div",{className:"-mx-2 border-b border-sidebar-border px-2 py-2",children:t.jsx(ne,{className:"shrink-0",children:t.jsx(re,{icon:n,label:s,className:"text-sidebar-foreground/70",link:d,onSelect:i})})}),e[1]=s,e[2]=d,e[3]=i,e[4]=r):r=e[4],r}function Is(){const a=v.c(8),e=O(),{capabilities:s,isPrivileged:d,loading:i,error:n}=Le(),r=ys().length,o=He();let l;return a[0]!==s||a[1]!==n||a[2]!==d||a[3]!==r||a[4]!==i||a[5]!==e||a[6]!==o?(l=[{key:"account",label:"",items:[{key:"profile",label:e("settings.nav.profile"),icon:t.jsx(ks,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:e("settings.nav.organization"),items:[{key:"general",label:e("settings.nav.general"),icon:t.jsx(ps,{size:14}),to:"/$org/settings/general",requires:"org:manage"},{key:"billing",label:e("settings.nav.billing"),icon:t.jsx(hs,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:e("settings.nav.connect"),icon:t.jsx(js,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:e("settings.nav.tasks"),icon:t.jsx(is,{size:14}),to:"/$org/settings/task-board",requires:"org:manage"}]},{key:"build",label:e("settings.nav.build"),items:[{key:"connections",label:e("settings.nav.connections"),icon:t.jsx(os,{size:14}),to:"/$org/settings/connections"},{key:"agents",label:e("settings.nav.agents"),icon:t.jsx(fe,{size:14}),to:"/$org/settings/agents"},{key:"automations",label:e("settings.nav.automations"),icon:t.jsx(Ss,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"},{key:"skills",label:e("settings.nav.skills"),icon:t.jsx(vs,{size:14}),to:"/$org/settings/skills"}]},{key:"manage",label:e("settings.nav.manage"),items:[{key:"monitor",label:e("settings.nav.monitor"),icon:t.jsx(ls,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:e("settings.nav.members"),icon:t.jsx(fe,{size:14}),to:"/$org/settings/members",group:"members",badge:r}]},{key:"advanced",label:e("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:e("settings.nav.secrets"),icon:t.jsx(bs,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:e("settings.nav.storage"),icon:t.jsx(xs,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"store",label:e("settings.nav.store"),icon:t.jsx(cs,{size:14}),to:"/$org/settings/store",requires:"registry:manage"},{key:"sso",label:e("settings.nav.security"),icon:t.jsx(Ee,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(g=>({...g,items:g.items.flatMap(u=>{if(u.group){const[f]=o[u.group];return f?[{...u,to:f.to}]:Me(u.group)?[]:[u]}return i||n?[u]:u.privilegedOnly?d?[u]:[]:u.requires?d||s[u.requires]?[u]:[]:[u]})})).filter(As),a[0]=s,a[1]=n,a[2]=d,a[3]=r,a[4]=i,a[5]=e,a[6]=o,a[7]=l):l=a[7],l}function As(a){return a.items.length>0}function _e(){const a=v.c(8);let e;a[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},a[0]=e):e=a[0];const{org:s}=De(e);let d;a[1]===Symbol.for("react.memo_cache_sentinel")?(d={select:Rs},a[1]=d):d=a[1];const i=Be(d);let n;if(a[2]!==s||a[3]!==i){const l=c=>{const g=c.replace("$org",s);return i===g||i.startsWith(`${g}/`)};n=c=>[c.to,...c.group?Ue(c.group):[]].some(l),a[2]=s,a[3]=i,a[4]=n}else n=a[4];const r=n;let o;return a[5]!==r||a[6]!==s?(o={org:s,isActive:r},a[5]=r,a[6]=s,a[7]=o):o=a[7],o}function Rs(a){return a.location.pathname}const qs="pt-1.5";function Fs(a){const e=v.c(15),{header:s,back:d,body:i,footer:n,sheet:r}=a;let o;e[0]!==s?(o=s&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex h-12 shrink-0 flex-row items-center gap-2 px-2 group-data-[state=collapsed]/sidebar:h-auto group-data-[state=collapsed]/sidebar:flex-col group-data-[state=collapsed]/sidebar:py-2",children:s}),t.jsx("div",{className:"mt-1.5 h-px shrink-0 bg-sidebar-border"})]}),e[0]=s,e[1]=o):o=e[1];let l;e[2]!==d?(l=d&&t.jsx("div",{className:"shrink-0 px-2",children:d}),e[2]=d,e[3]=l):l=e[3];let c;e[4]!==i?(c=t.jsx(Ve,{className:"gap-0 overflow-y-auto px-2 pt-2 pb-2 group-data-[state=collapsed]/sidebar:[scrollbar-width:none] group-data-[state=collapsed]/sidebar:[&::-webkit-scrollbar]:hidden",children:i}),e[4]=i,e[5]=c):c=e[5];let g;e[6]!==n||e[7]!==o||e[8]!==l||e[9]!==c?(g=t.jsxs(t.Fragment,{children:[o,l,c,n]}),e[6]=n,e[7]=o,e[8]=l,e[9]=c,e[10]=g):g=e[10];const u=g;if(r){let m;return e[11]!==u?(m=t.jsx("div",{className:"group/sidebar flex h-full w-full flex-col bg-sidebar text-sidebar-foreground","data-sidebar":"sidebar","data-state":"expanded","data-tour":Y.nav,children:u}),e[11]=u,e[12]=m):m=e[12],m}let f;return e[13]!==u?(f=t.jsx(Ge,{className:qs,"data-tour":Y.nav,children:u}),e[13]=u,e[14]=f):f=e[14],f}function Ls(){const a=v.c(9),{isActive:e}=_e();let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s={},a[0]=s):s=a[0];const[d,i]=C.useState(s);let n;a[1]!==e||a[2]!==d?(n=g=>d[g.key]??(!g.collapsible||g.items.some(e)),a[1]=e,a[2]=d,a[3]=n):n=a[3];const r=n;let o;a[4]!==r?(o=g=>i(u=>({...u,[g.key]:!r(g)})),a[4]=r,a[5]=o):o=a[5];const l=o;let c;return a[6]!==r||a[7]!==l?(c={isOpen:r,toggle:l},a[6]=r,a[7]=l,a[8]=c):c=a[8],c}function Hs(a){const e=v.c(21),{group:s,open:d,onToggle:i,className:n}=a;let r,o,l,c,g;if(e[0]!==n||e[1]!==s.collapsible||e[2]!==s.label||e[3]!==i||e[4]!==d){g=Symbol.for("react.early_return_sentinel");e:{const h=I("text-xs font-medium text-muted-foreground/60 truncate",n);if(!s.collapsible){g=t.jsx("p",{className:h,children:s.label});break e}r="button",o=i,l=d,c=I("flex w-full items-center gap-1 rounded-md hover:text-muted-foreground",h)}e[0]=n,e[1]=s.collapsible,e[2]=s.label,e[3]=i,e[4]=d,e[5]=r,e[6]=o,e[7]=l,e[8]=c,e[9]=g}else r=e[5],o=e[6],l=e[7],c=e[8],g=e[9];if(g!==Symbol.for("react.early_return_sentinel"))return g;let u;e[10]!==d?(u=d?t.jsx(Ke,{size:12}):t.jsx(Ye,{size:12}),e[10]=d,e[11]=u):u=e[11];let f;e[12]!==s.label?(f=t.jsx("span",{className:"truncate",children:s.label}),e[12]=s.label,e[13]=f):f=e[13];let m;return e[14]!==r||e[15]!==o||e[16]!==l||e[17]!==c||e[18]!==u||e[19]!==f?(m=t.jsxs("button",{type:r,onClick:o,"aria-expanded":l,className:c,children:[u,f]}),e[14]=r,e[15]=o,e[16]=l,e[17]=c,e[18]=u,e[19]=f,e[20]=m):m=e[20],m}function Es(a){const e=v.c(5),{icon:s,badge:d}=a;let i;e[0]!==d?(i=d?t.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,e[0]=d,e[1]=i):i=e[1];let n;return e[2]!==s||e[3]!==i?(n=t.jsxs("span",{className:"relative shrink-0",children:[s,i]}),e[2]=s,e[3]=i,e[4]=n):n=e[4],n}function Ms(a){const e=v.c(22),{onNavigate:s}=a,d=O(),i=Is(),{org:n,isActive:r}=_e(),{isOpen:o,toggle:l}=Ls();let c;if(e[0]!==i||e[1]!==r||e[2]!==o||e[3]!==s||e[4]!==n||e[5]!==l){let b;e[7]!==r||e[8]!==o||e[9]!==s||e[10]!==n||e[11]!==l?(b=(p,k)=>t.jsxs("div",{className:"flex flex-col",children:[p.label&&t.jsx(Hs,{group:p,open:o(p),onToggle:()=>l(p),className:I("px-2 pt-1.5 pb-0.5",k>0&&"mt-3")}),o(p)&&t.jsx(ne,{className:"gap-0.5",children:p.items.map(j=>t.jsx(re,{icon:t.jsx(Es,{icon:j.icon,badge:j.badge}),label:j.label,isActive:r(j),link:{to:j.to,params:{org:n}},className:"gap-2.5",onSelect:()=>{L("settings_nav_clicked",{section_key:j.key,group_key:p.key}),s?.()}},j.key))})]},p.key),e[7]=r,e[8]=o,e[9]=s,e[10]=n,e[11]=l,e[12]=b):b=e[12],c=i.map(b),e[0]=i,e[1]=r,e[2]=o,e[3]=s,e[4]=n,e[5]=l,e[6]=c}else c=e[6];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[13]=g):g=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"shrink-0",children:t.jsx(Je,{size:14})}),e[14]=u):u=e[14];let f;e[15]!==d?(f=d("settings.nav.signOut"),e[15]=d,e[16]=f):f=e[16];let m;e[17]!==f?(m=t.jsxs("div",{className:"mt-auto flex flex-col",children:[g,t.jsx(ne,{className:"gap-0.5",children:t.jsx(re,{icon:u,label:f,className:"gap-2.5",onSelect:Ds})})]}),e[17]=f,e[18]=m):m=e[18];let h;return e[19]!==c||e[20]!==m?(h=t.jsxs(t.Fragment,{children:[c,m]}),e[19]=c,e[20]=m,e[21]=h):h=e[21],h}function Ds(){L("signed_out",{source:"settings_sidebar"}),We(),F.signOut()}function Bs(a){const e=v.c(8),{onNavigate:s}=a,d=O(),{org:i}=ie();let n;e[0]!==d?(n=d("settings.nav.backToHome"),e[0]=d,e[1]=n):n=e[1];let r;e[2]!==i.slug?(r={to:"/$org/home",params:{org:i.slug}},e[2]=i.slug,e[3]=r):r=e[3];let o;return e[4]!==s||e[5]!==n||e[6]!==r?(o=t.jsx(Ts,{label:n,link:r,onSelect:s}),e[4]=s,e[5]=n,e[6]=r,e[7]=o):o=e[7],o}function Us(){const a=v.c(1);let e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"px-4 pb-1",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.321.3"]})}),a[0]=e):e=a[0],e}function bt(a){const e=v.c(9),{onClose:s}=a;let d,i,n;e[0]!==s?(d=t.jsx(Ps,{onClose:s}),i=t.jsx(Bs,{onNavigate:s}),n=t.jsx(Ms,{onNavigate:s}),e[0]=s,e[1]=d,e[2]=i,e[3]=n):(d=e[1],i=e[2],n=e[3]);let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Us,{}),e[4]=r):r=e[4];let o;return e[5]!==d||e[6]!==i||e[7]!==n?(o=t.jsx(Fs,{sheet:!0,header:d,back:i,body:n,footer:r}),e[5]=d,e[6]=i,e[7]=n,e[8]=o):o=e[8],o}export{re as S,xt as a,Fs as b,Us as c,Ms as d,Bs as e,Ps as f,Ts as g,bt as h,ye as u};
1
+ import{G as he,c as v,l as I,j as t,b as O,r as C,B as ge,a as F,t as R,w as Pe,bY as Oe,m as Te,K as Ie,bZ as Ae,W as ie,_ as ae,d as Re,s as qe,a1 as xe,a2 as be,a4 as je,o as L,b0 as ve,L as Fe,a6 as ue,a5 as ne,b_ as Le,b$ as He,z as Ee,c0 as Me,f as De,k as Be,c1 as Ue,c2 as Ve,c3 as Ge,a0 as We}from"./index-Ds9_YQQm.js";import{t as Ke}from"./ChevronUp-rYvSsRjP.js";import{i as Ye}from"./ChevronRight-BkCMOd4C.js";import{h as Je}from"./TrendUp01-DaIUMzmz.js";import{I as Qe,T as ke}from"./toolbar-icon-button-BI33A1DT.js";import{i as G}from"./Check-D5XzCZva.js";import{i as Ze}from"./ChevronSelectorVertical-C7ueTKUo.js";import{s as Xe}from"./Plus-BKIxzM6s.js";import{c as me,e as te,d as W,b as es,C as ss,a as ts}from"./command-CiqpOqS9.js";import{a as as,b as ns,P as rs}from"./popover-BKkJ1_Xg.js";import{A as oe,f as is,e as os,aS as ls,aT as cs}from"./agent-icon-BQA3BxVU.js";import{C as ds}from"./create-organization-dialog-Bn2HCOk4.js";import{s as gs}from"./XClose-Bw26wZe2.js";import{u as us}from"./use-destination-route-DzHgzZDH.js";import{u as Se,L as Y}from"./use-project-scope-BAnUVA3r.js";import{d as ms}from"./use-virtual-mcp-C2SUHuV8.js";import{i as fs}from"./ArrowLeft-DjieScGW.js";import{t as ps,b as fe}from"./Users03-B7DS8i2Z.js";import{i as hs}from"./CreditCard01-3vvlQGFk.js";import{i as xs}from"./HardDrive-CdioWthT.js";import{i as bs}from"./Key01-D2vuY6hS.js";import{n as js}from"./LinkExternal01-C9li9a1P.js";import{t as vs}from"./Stars01-DF4f96O4.js";import{s as ks}from"./User01-mzLrMAfi.js";import{i as Ss}from"./Zap-BxV_wNn9.js";import{u as ys}from"./use-join-requests-B74l_G0c.js";function ye(){const{state:a,isMobile:e}=he();return a==="collapsed"&&!e}function Ns(a){let e=0;for(let d=0;d<a.length;d++)e=a.charCodeAt(d)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function le(a){const e=v.c(13),{org:s,size:d}=a,i=d===void 0?"sm":d,n=i==="xs"?"size-5":"size-6",r=i==="xs"?"text-[9px]":"text-xs";let o;e[0]!==n?(o=I(n,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=n,e[1]=o):o=e[1];let l;e[2]!==s.logo||e[3]!==s.name?(l=s.logo?void 0:Ns(s.name),e[2]=s.logo,e[3]=s.name,e[4]=l):l=e[4];let c;e[5]!==s.logo||e[6]!==s.name||e[7]!==r?(c=s.logo?t.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):t.jsx("span",{className:I("font-semibold leading-none",r),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=r,e[8]=c):c=e[8];let g;return e[9]!==o||e[10]!==l||e[11]!==c?(g=t.jsx("div",{className:o,style:l,children:c}),e[9]=o,e[10]=l,e[11]=c,e[12]=g):g=e[12],g}function $s({invitation:a,onChanged:e}){const s=O(),[d,i]=C.useState(!1),n=a.organizationName??s("header.orgSwitcher.unknownOrganization"),r=async()=>{i(!0);try{const c=await F.organization.acceptInvitation({invitationId:a.id});if(c.error){R.error(c.error.message),i(!1);return}}catch{R.error(s("header.orgSwitcher.failedToAcceptInvitation")),i(!1);return}R.success(s("header.orgSwitcher.joined",{name:n})),Pe();let l;try{l=(await F.organization.getFullOrganization({query:{organizationId:a.organizationId}}))?.data?.slug}catch{}window.location.href=l?`/${l}`:"/"},o=async()=>{i(!0);try{const l=await F.organization.rejectInvitation({invitationId:a.id});if(l.error){R.error(l.error.message),i(!1);return}R.success(s("header.orgSwitcher.invitationDeclined")),i(!1),e()}catch{R.error(s("header.orgSwitcher.failedToDeclineInvitation")),i(!1)}};return t.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[t.jsx(le,{org:{name:n},size:"sm"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate text-sm font-medium",children:n}),t.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[t.jsx(ge,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:d,children:s("header.orgSwitcher.accept")}),t.jsx(ge,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:o,disabled:d,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:n}),children:t.jsx(gs,{size:14})})]})]})}function Ne(){const a=C.useContext(Oe),{data:e,refetch:s}=a.hooks.useListUserInvitations();return{invitations:(e??[]).filter(i=>i.status==="pending"&&new Date(i.expiresAt)>new Date),refetch:()=>s?.()}}function _s(a){const e=v.c(13),s=a.trim(),{data:d}=F.useSession(),i=d?.user?.id??"",n=s.length>0&&!!i,r=Ie.projectSearch(i,s);let o;e[0]!==s?(o=async k=>{const{signal:j}=k,S=await fetch(`/api/_me/projects/search?q=${encodeURIComponent(s)}`,{signal:j});if(!S.ok)throw new Error(`Project search failed: ${S.status}`);return await S.json()},e[0]=s,e[1]=o):o=e[1];let l;e[2]!==n||e[3]!==r||e[4]!==o?(l={queryKey:r,queryFn:o,enabled:n,placeholderData:Ae,staleTime:3e4,retry:!1},e[2]=n,e[3]=r,e[4]=o,e[5]=l):l=e[5];const{data:c,isFetching:g,isPlaceholderData:u,isError:f}=Te(l);let m;e[6]!==c?.items?(m=c?.items??[],e[6]=c?.items,e[7]=m):m=e[7];const h=n&&g,b=n&&u;let p;return e[8]!==f||e[9]!==m||e[10]!==h||e[11]!==b?(p={hits:m,isSearching:h,isStale:b,isError:f},e[8]=f,e[9]=m,e[10]=h,e[11]=b,e[12]=p):p=e[12],p}function pe(a){const e=v.c(15),{id:s,label:d,createLabel:i,onCreate:n}=a;let r;e[0]!==s||e[1]!==d?(r=t.jsx("span",{id:s,className:"truncate",children:d}),e[0]=s,e[1]=d,e[2]=r):r=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Xe,{size:14}),e[3]=o):o=e[3];let l;e[4]!==i||e[5]!==n?(l=t.jsx(xe,{asChild:!0,children:t.jsx("button",{type:"button","aria-label":i,className:"-my-1 shrink-0 cursor-pointer rounded-md p-1 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",onClick:n,children:o})}),e[4]=i,e[5]=n,e[6]=l):l=e[6];let c;e[7]!==i?(c=t.jsx(be,{side:"right",children:i}),e[7]=i,e[8]=c):c=e[8];let g;e[9]!==l||e[10]!==c?(g=t.jsxs(je,{children:[l,c]}),e[9]=l,e[10]=c,e[11]=g):g=e[11];let u;return e[12]!==r||e[13]!==g?(u=t.jsxs("div",{className:"flex w-full items-center justify-between gap-2 px-2 py-1.5 text-xs font-medium text-muted-foreground",children:[r,g]}),e[12]=r,e[13]=g,e[14]=u):u=e[14],u}const K="min-h-9 items-center",T={allProjects:"scope:__all__",project:a=>`scope:${a}`,org:a=>`org:${a}`,foreignProject:(a,e)=>`travel:${a}:${e}`};function zs(a){const e=v.c(11),{active:s,rows:d}=a,i=O();let n,r,o,l;if(e[0]!==s||e[1]!==d||e[2]!==i){l=Symbol.for("react.early_return_sentinel");e:{const g=d.get(s);if(g?.kind!=="travel"){l=null;break e}n="border-t border-border px-3 py-2 text-xs text-warning",r=i("sidebar.picker.verbTravel",{name:g.label}),o=g.leaves&&t.jsxs("span",{className:"text-muted-foreground",children:[" ",i("sidebar.picker.verbLeaves",{name:g.leaves})]})}e[0]=s,e[1]=d,e[2]=i,e[3]=n,e[4]=r,e[5]=o,e[6]=l}else n=e[3],r=e[4],o=e[5],l=e[6];if(l!==Symbol.for("react.early_return_sentinel"))return l;let c;return e[7]!==n||e[8]!==r||e[9]!==o?(c=t.jsxs("div",{className:n,children:[r,o]}),e[7]=n,e[8]=r,e[9]=o,e[10]=c):c=e[10],c}function Cs(a){const e=v.c(27),{onClose:s,onCreateOrg:d}=a,i=O(),n=C.useId(),r=C.useId(),o=Re(),{org:l}=ie(),{scopeId:c,projects:g,setScope:u}=Se(),{hasMore:f}=ms(),[m,h]=C.useState(""),[b,p]=C.useState(T.allProjects),k=C.useDeferredValue(m);let j;e[0]!==k?(j=k.trim(),e[0]=k,e[1]=j):j=e[1];const S=j,$=S.length>0,{data:w}=qe(),{invitations:z,refetch:N}=Ne();let y;e[2]!==l.slug?(y=(x,_)=>x.slug===l.slug?-1:_.slug===l.slug?1:0,e[2]=l.slug,e[3]=y):y=e[3];const P=(w??[]).slice().sort(y),{hits:J,isSearching:ze,isStale:Ce,isError:Q}=_s($?S:""),Z=us();let H;e[4]!==Z?(H=Z.startsWith("/$org/settings"),e[4]=Z,e[5]=H):H=e[5];const E=H,q=new Map;let M;e[6]!==E||e[7]!==o||e[8]!==s||e[9]!==l.slug||e[10]!==u?(M=x=>{L("scope_set",{scoped:x!==null,fromSettings:E}),E?o({to:"/$org",params:{org:l.slug},search:{virtualmcpid:x??void 0}}):u(x),s()},e[6]=E,e[7]=o,e[8]=s,e[9]=l.slug,e[10]=u,e[11]=M):M=e[11];const X=M;let D;e[12]!==o||e[13]!==s?(D=(x,_)=>{L("org_project_travel",{scoped:!!_}),o({to:"/$org",params:{org:x},search:_?{virtualmcpid:_}:{}}),s()},e[12]=o,e[13]=s,e[14]=D):D=e[14];const ce=D;let B;e[15]!==o||e[16]!==s||e[17]!==l.slug?(B=()=>{L("picker_new_project"),o({to:"/$org/agents/{-$panel}",params:{org:l.slug,panel:void 0},search:{virtualmcpid:void 0}}),s()},e[15]=o,e[16]=s,e[17]=l.slug,e[18]=B):B=e[18];const we=B;q.set(T.allProjects,{kind:"scope",label:i("sidebar.scope.allProjects")});let A;e[19]!==i?(A=i("sidebar.picker.searchPlaceholder"),e[19]=i,e[20]=A):A=e[20];let U;e[21]!==m||e[22]!==A?(U=t.jsx(ts,{value:m,onValueChange:h,placeholder:A}),e[21]=m,e[22]=A,e[23]=U):U=e[23];const ee=es,se=$?t.jsxs(t.Fragment,{children:[Q&&t.jsx(me,{children:i("sidebar.picker.searchFailed")}),!Q&&!ze&&J.length===0&&t.jsx(me,{children:i("sidebar.picker.noMatches",{query:S})}),!Q&&J.length>0&&t.jsx(te,{heading:i("sidebar.picker.projectsHeading"),className:I(Ce&&"opacity-50"),children:J.map(x=>t.jsx(ws,{hit:x,currentOrgSlug:l.slug,currentOrgName:l.name,scopeId:c,rows:q,onScope:X,onTravel:ce},`${x.orgSlug}:${x.id}`))})]}):t.jsxs(t.Fragment,{children:[t.jsx(pe,{id:n,label:i("sidebar.picker.projectsHeading"),createLabel:i("sidebar.picker.newProject"),onCreate:we}),t.jsxs(te,{"aria-labelledby":n,children:[t.jsxs(W,{value:T.allProjects,className:K,onSelect:()=>X(null),children:[t.jsx("span",{className:"min-w-0 flex-1 truncate",children:i("sidebar.scope.allProjects")}),c===null&&t.jsx(G,{size:14})]}),g.map(x=>{const _=T.project(x.id);return q.set(_,{kind:"scope",label:x.title}),t.jsxs(W,{value:_,className:K,onSelect:()=>X(x.id),children:[t.jsx(oe,{icon:x.icon,name:x.title,size:"2xs",className:"shrink-0"}),t.jsx("span",{className:"min-w-0 flex-1 truncate",children:x.title}),c===x.id&&t.jsx(G,{size:14})]},x.id)}),f&&t.jsx("p",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:i("sidebar.picker.moreExist")})]}),t.jsx(pe,{id:r,label:i("sidebar.picker.orgsHeading"),createLabel:i("sidebar.picker.newOrganization"),onCreate:d}),t.jsxs(te,{"aria-labelledby":r,children:[z.map(x=>t.jsx($s,{invitation:x,onChanged:N},x.id)),P.map(x=>{const _=x.slug===l.slug,de=T.org(x.slug);return q.set(de,{kind:_?"scope":"travel",label:x.name,..._?{}:{leaves:l.name}}),t.jsxs(W,{value:de,className:K,onSelect:()=>_?s():ce(x.slug),children:[t.jsx(le,{org:x,size:"xs"}),t.jsx("span",{className:"min-w-0 flex-1 truncate",children:x.name}),_&&t.jsx(G,{size:14})]},x.id)})]})]});let V;return e[24]!==ee||e[25]!==se?(V=t.jsx(ee,{children:se}),e[24]=ee,e[25]=se,e[26]=V):V=e[26],t.jsxs(ss,{shouldFilter:!1,value:b,onValueChange:p,className:"max-h-[min(560px,70dvh)]",children:[U,V,t.jsx(zs,{active:b,rows:q})]})}function ws(a){const e=v.c(31),{hit:s,currentOrgSlug:d,currentOrgName:i,scopeId:n,rows:r,onScope:o,onTravel:l}=a,c=s.orgSlug===d;let g;e[0]!==i||e[1]!==s.id||e[2]!==s.orgSlug||e[3]!==s.title||e[4]!==c||e[5]!==r?(g=c?T.project(s.id):T.foreignProject(s.orgSlug,s.id),r.set(g,{kind:c?"scope":"travel",label:s.title,leaves:c?void 0:i}),e[0]=i,e[1]=s.id,e[2]=s.orgSlug,e[3]=s.title,e[4]=c,e[5]=r,e[6]=g):g=e[6];let u;e[7]!==s.id||e[8]!==s.orgSlug||e[9]!==c||e[10]!==o||e[11]!==l?(u=()=>c?o(s.id):l(s.orgSlug,s.id),e[7]=s.id,e[8]=s.orgSlug,e[9]=c,e[10]=o,e[11]=l,e[12]=u):u=e[12];let f;e[13]!==s.icon||e[14]!==s.title?(f=t.jsx(oe,{icon:s.icon,name:s.title,size:"2xs",className:"shrink-0"}),e[13]=s.icon,e[14]=s.title,e[15]=f):f=e[15];let m;e[16]!==s.title?(m=t.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.title}),e[16]=s.title,e[17]=m):m=e[17];let h;e[18]!==s.orgName?(h=t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:s.orgName}),e[18]=s.orgName,e[19]=h):h=e[19];let b;e[20]!==s.id||e[21]!==c||e[22]!==n?(b=c&&n===s.id&&t.jsx(G,{size:14}),e[20]=s.id,e[21]=c,e[22]=n,e[23]=b):b=e[23];let p;return e[24]!==u||e[25]!==f||e[26]!==m||e[27]!==h||e[28]!==b||e[29]!==g?(p=t.jsxs(W,{value:g,className:K,onSelect:u,children:[f,m,h,b]}),e[24]=u,e[25]=f,e[26]=m,e[27]=h,e[28]=b,e[29]=g,e[30]=p):p=e[30],p}function $e(a){const e=v.c(28),{collapsed:s}=a,d=s===void 0?!1:s,i=O(),{org:n}=ie(),{project:r}=Se(),{invitations:o}=Ne(),[l,c]=C.useState(!1),[g,u]=C.useState(!1);let f;if(e[0]!==d||e[1]!==o.length||e[2]!==n||e[3]!==r||e[4]!==i){const w=r?i("sidebar.picker.projectInOrg",{project:r.title,org:n.name}):n.name;let z;e[6]!==n||e[7]!==r?(z=r?t.jsx(oe,{icon:r.icon,name:r.title,size:"xs",className:"shrink-0"}):t.jsx(le,{org:n,size:"sm"}),e[6]=n,e[7]=r,e[8]=z):z=e[8];let N;e[9]!==o.length?(N=o.length>0&&t.jsx("span",{className:"absolute -right-1 -top-1 size-2.5 rounded-full bg-destructive ring-2 ring-background"}),e[9]=o.length,e[10]=N):N=e[10];let y;e[11]!==z||e[12]!==N?(y=t.jsxs("div",{className:"relative inline-flex shrink-0",children:[z,N]}),e[11]=z,e[12]=N,e[13]=y):y=e[13];const P=y;f=d?t.jsx(ae,{tooltip:w,"data-tour":Y.switcher,children:P}):t.jsxs("button",{type:"button","data-tour":Y.switcher,"aria-label":i("sidebar.picker.ariaLabel",{name:w}),className:I("flex min-w-0 flex-1 items-center gap-2 rounded-lg py-1.5 pl-1 pr-1.5 text-left md:h-[34px] md:py-0","[transition:background-color_180ms_ease] hover:bg-sidebar-accent",Qe),children:[P,t.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:r?r.title:n.name}),t.jsx(Ze,{size:14,className:"shrink-0 text-muted-foreground"})]}),e[0]=d,e[1]=o.length,e[2]=n,e[3]=r,e[4]=i,e[5]=f}else f=e[5];const m=f;let h;e[14]!==m?(h=t.jsx(as,{asChild:!0,children:m}),e[14]=m,e[15]=h):h=e[15];const b=d?"right":"bottom";let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Cs,{onClose:()=>c(!1),onCreateOrg:()=>{c(!1),u(!0)}}),e[16]=p):p=e[16];let k;e[17]!==b?(k=t.jsx(ns,{side:b,align:"start",className:"w-[min(340px,calc(100vw-2rem))] p-0",children:p}),e[17]=b,e[18]=k):k=e[18];let j;e[19]!==l||e[20]!==h||e[21]!==k?(j=t.jsxs(rs,{open:l,onOpenChange:c,children:[h,k]}),e[19]=l,e[20]=h,e[21]=k,e[22]=j):j=e[22];let S;e[23]!==g?(S=t.jsx(ds,{open:g,onOpenChange:u}),e[23]=g,e[24]=S):S=e[24];let $;return e[25]!==j||e[26]!==S?($=t.jsxs(t.Fragment,{children:[j,S]}),e[25]=j,e[26]=S,e[27]=$):$=e[27],$}function xt(){const a=v.c(2),e=ye();let s;return a[0]!==e?(s=t.jsxs(t.Fragment,{children:[t.jsx($e,{collapsed:e}),t.jsx(Os,{collapsed:e})]}),a[0]=e,a[1]=s):s=a[1],s}function Ps(a){const e=v.c(11),{onClose:s,children:d}=a,i=O();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx($e,{}),e[0]=n):n=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1];let o;e[2]!==i?(o=i("sidebar.header.closeSidebar"),e[2]=i,e[3]=o):o=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ve,{size:16}),e[4]=l):l=e[4];let c;e[5]!==s||e[6]!==o?(c=t.jsx(ke,{onClick:s,"aria-label":o,children:l}),e[5]=s,e[6]=o,e[7]=c):c=e[7];let g;return e[8]!==d||e[9]!==c?(g=t.jsxs(t.Fragment,{children:[n,d,r,c]}),e[8]=d,e[9]=c,e[10]=g):g=e[10],g}function Os(a){const e=v.c(12),{collapsed:s}=a,d=O(),{toggleSidebar:i}=he();let n;e[0]!==d?(n=d("sidebar.header.toggleSidebar"),e[0]=d,e[1]=n):n=e[1];const r=n;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(ve,{size:16}),e[2]=o):o=e[2];let l;e[3]!==r||e[4]!==i?(l=t.jsx(xe,{asChild:!0,children:t.jsx(ke,{"aria-label":r,onClick:i,className:"shrink-0 rounded-lg md:size-[34px] group-data-[state=collapsed]/sidebar:mx-auto",children:o})}),e[3]=r,e[4]=i,e[5]=l):l=e[5];const c=!s;let g;e[6]!==r||e[7]!==c?(g=t.jsx(be,{side:"right",hidden:c,children:r}),e[6]=r,e[7]=c,e[8]=g):g=e[8];let u;return e[9]!==l||e[10]!==g?(u=t.jsxs(je,{children:[l,g]}),e[9]=l,e[10]=g,e[11]=u):u=e[11],u}function re(a){const e=v.c(30),{icon:s,label:d,isActive:i,link:n,onSelect:r,ariaLabel:o,className:l,dataTour:c,children:g}=a,u=i===void 0?!1:i,f=ye(),m=o??d,h=f?m:void 0;let b;e[0]!==l||e[1]!==c||e[2]!==u||e[3]!==h?(b={isActive:u,tooltip:h,className:l,"data-tour":c},e[0]=l,e[1]=c,e[2]=u,e[3]=h,e[4]=b):b=e[4];const p=b;let k;e[5]!==d?(k=t.jsx("span",{className:"truncate",children:d}),e[5]=d,e[6]=k):k=e[6];let j;e[7]!==s||e[8]!==k?(j=t.jsxs(t.Fragment,{children:[s,k]}),e[7]=s,e[8]=k,e[9]=j):j=e[9];const S=j;if(n){const z=u?"page":void 0;let N;e[10]!==S||e[11]!==n||e[12]!==m||e[13]!==r||e[14]!==z?(N=t.jsx(Fe,{...n,"aria-label":m,"aria-current":z,onClick:r,children:S}),e[10]=S,e[11]=n,e[12]=m,e[13]=r,e[14]=z,e[15]=N):N=e[15];let y;e[16]!==p||e[17]!==N?(y=t.jsx(ae,{asChild:!0,...p,children:N}),e[16]=p,e[17]=N,e[18]=y):y=e[18];let P;return e[19]!==g||e[20]!==y?(P=t.jsxs(ue,{children:[y,g]}),e[19]=g,e[20]=y,e[21]=P):P=e[21],P}let $;e[22]!==S||e[23]!==m||e[24]!==r||e[25]!==p?($=t.jsx(ae,{...p,"aria-label":m,onClick:r,children:S}),e[22]=S,e[23]=m,e[24]=r,e[25]=p,e[26]=$):$=e[26];let w;return e[27]!==g||e[28]!==$?(w=t.jsxs(ue,{children:[$,g]}),e[27]=g,e[28]=$,e[29]=w):w=e[29],w}function Ts(a){const e=v.c(5),{label:s,link:d,onSelect:i}=a;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(fs,{size:16}),e[0]=n):n=e[0];let r;return e[1]!==s||e[2]!==d||e[3]!==i?(r=t.jsx("div",{className:"-mx-2 border-b border-sidebar-border px-2 py-2",children:t.jsx(ne,{className:"shrink-0",children:t.jsx(re,{icon:n,label:s,className:"text-sidebar-foreground/70",link:d,onSelect:i})})}),e[1]=s,e[2]=d,e[3]=i,e[4]=r):r=e[4],r}function Is(){const a=v.c(8),e=O(),{capabilities:s,isPrivileged:d,loading:i,error:n}=Le(),r=ys().length,o=He();let l;return a[0]!==s||a[1]!==n||a[2]!==d||a[3]!==r||a[4]!==i||a[5]!==e||a[6]!==o?(l=[{key:"account",label:"",items:[{key:"profile",label:e("settings.nav.profile"),icon:t.jsx(ks,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:e("settings.nav.organization"),items:[{key:"general",label:e("settings.nav.general"),icon:t.jsx(ps,{size:14}),to:"/$org/settings/general",requires:"org:manage"},{key:"billing",label:e("settings.nav.billing"),icon:t.jsx(hs,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:e("settings.nav.connect"),icon:t.jsx(js,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:e("settings.nav.tasks"),icon:t.jsx(is,{size:14}),to:"/$org/settings/task-board",requires:"org:manage"}]},{key:"build",label:e("settings.nav.build"),items:[{key:"connections",label:e("settings.nav.connections"),icon:t.jsx(os,{size:14}),to:"/$org/settings/connections"},{key:"agents",label:e("settings.nav.agents"),icon:t.jsx(fe,{size:14}),to:"/$org/settings/agents"},{key:"automations",label:e("settings.nav.automations"),icon:t.jsx(Ss,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"},{key:"skills",label:e("settings.nav.skills"),icon:t.jsx(vs,{size:14}),to:"/$org/settings/skills"}]},{key:"manage",label:e("settings.nav.manage"),items:[{key:"monitor",label:e("settings.nav.monitor"),icon:t.jsx(ls,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:e("settings.nav.members"),icon:t.jsx(fe,{size:14}),to:"/$org/settings/members",group:"members",badge:r}]},{key:"advanced",label:e("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:e("settings.nav.secrets"),icon:t.jsx(bs,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:e("settings.nav.storage"),icon:t.jsx(xs,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"store",label:e("settings.nav.store"),icon:t.jsx(cs,{size:14}),to:"/$org/settings/store",requires:"registry:manage"},{key:"sso",label:e("settings.nav.security"),icon:t.jsx(Ee,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(g=>({...g,items:g.items.flatMap(u=>{if(u.group){const[f]=o[u.group];return f?[{...u,to:f.to}]:Me(u.group)?[]:[u]}return i||n?[u]:u.privilegedOnly?d?[u]:[]:u.requires?d||s[u.requires]?[u]:[]:[u]})})).filter(As),a[0]=s,a[1]=n,a[2]=d,a[3]=r,a[4]=i,a[5]=e,a[6]=o,a[7]=l):l=a[7],l}function As(a){return a.items.length>0}function _e(){const a=v.c(8);let e;a[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},a[0]=e):e=a[0];const{org:s}=De(e);let d;a[1]===Symbol.for("react.memo_cache_sentinel")?(d={select:Rs},a[1]=d):d=a[1];const i=Be(d);let n;if(a[2]!==s||a[3]!==i){const l=c=>{const g=c.replace("$org",s);return i===g||i.startsWith(`${g}/`)};n=c=>[c.to,...c.group?Ue(c.group):[]].some(l),a[2]=s,a[3]=i,a[4]=n}else n=a[4];const r=n;let o;return a[5]!==r||a[6]!==s?(o={org:s,isActive:r},a[5]=r,a[6]=s,a[7]=o):o=a[7],o}function Rs(a){return a.location.pathname}const qs="pt-1.5";function Fs(a){const e=v.c(15),{header:s,back:d,body:i,footer:n,sheet:r}=a;let o;e[0]!==s?(o=s&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex h-12 shrink-0 flex-row items-center gap-2 px-2 group-data-[state=collapsed]/sidebar:h-auto group-data-[state=collapsed]/sidebar:flex-col group-data-[state=collapsed]/sidebar:py-2",children:s}),t.jsx("div",{className:"mt-1.5 h-px shrink-0 bg-sidebar-border"})]}),e[0]=s,e[1]=o):o=e[1];let l;e[2]!==d?(l=d&&t.jsx("div",{className:"shrink-0 px-2",children:d}),e[2]=d,e[3]=l):l=e[3];let c;e[4]!==i?(c=t.jsx(Ve,{className:"gap-0 overflow-y-auto px-2 pt-2 pb-2 group-data-[state=collapsed]/sidebar:[scrollbar-width:none] group-data-[state=collapsed]/sidebar:[&::-webkit-scrollbar]:hidden",children:i}),e[4]=i,e[5]=c):c=e[5];let g;e[6]!==n||e[7]!==o||e[8]!==l||e[9]!==c?(g=t.jsxs(t.Fragment,{children:[o,l,c,n]}),e[6]=n,e[7]=o,e[8]=l,e[9]=c,e[10]=g):g=e[10];const u=g;if(r){let m;return e[11]!==u?(m=t.jsx("div",{className:"group/sidebar flex h-full w-full flex-col bg-sidebar text-sidebar-foreground","data-sidebar":"sidebar","data-state":"expanded","data-tour":Y.nav,children:u}),e[11]=u,e[12]=m):m=e[12],m}let f;return e[13]!==u?(f=t.jsx(Ge,{className:qs,"data-tour":Y.nav,children:u}),e[13]=u,e[14]=f):f=e[14],f}function Ls(){const a=v.c(9),{isActive:e}=_e();let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s={},a[0]=s):s=a[0];const[d,i]=C.useState(s);let n;a[1]!==e||a[2]!==d?(n=g=>d[g.key]??(!g.collapsible||g.items.some(e)),a[1]=e,a[2]=d,a[3]=n):n=a[3];const r=n;let o;a[4]!==r?(o=g=>i(u=>({...u,[g.key]:!r(g)})),a[4]=r,a[5]=o):o=a[5];const l=o;let c;return a[6]!==r||a[7]!==l?(c={isOpen:r,toggle:l},a[6]=r,a[7]=l,a[8]=c):c=a[8],c}function Hs(a){const e=v.c(21),{group:s,open:d,onToggle:i,className:n}=a;let r,o,l,c,g;if(e[0]!==n||e[1]!==s.collapsible||e[2]!==s.label||e[3]!==i||e[4]!==d){g=Symbol.for("react.early_return_sentinel");e:{const h=I("text-xs font-medium text-muted-foreground/60 truncate",n);if(!s.collapsible){g=t.jsx("p",{className:h,children:s.label});break e}r="button",o=i,l=d,c=I("flex w-full items-center gap-1 rounded-md hover:text-muted-foreground",h)}e[0]=n,e[1]=s.collapsible,e[2]=s.label,e[3]=i,e[4]=d,e[5]=r,e[6]=o,e[7]=l,e[8]=c,e[9]=g}else r=e[5],o=e[6],l=e[7],c=e[8],g=e[9];if(g!==Symbol.for("react.early_return_sentinel"))return g;let u;e[10]!==d?(u=d?t.jsx(Ke,{size:12}):t.jsx(Ye,{size:12}),e[10]=d,e[11]=u):u=e[11];let f;e[12]!==s.label?(f=t.jsx("span",{className:"truncate",children:s.label}),e[12]=s.label,e[13]=f):f=e[13];let m;return e[14]!==r||e[15]!==o||e[16]!==l||e[17]!==c||e[18]!==u||e[19]!==f?(m=t.jsxs("button",{type:r,onClick:o,"aria-expanded":l,className:c,children:[u,f]}),e[14]=r,e[15]=o,e[16]=l,e[17]=c,e[18]=u,e[19]=f,e[20]=m):m=e[20],m}function Es(a){const e=v.c(5),{icon:s,badge:d}=a;let i;e[0]!==d?(i=d?t.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,e[0]=d,e[1]=i):i=e[1];let n;return e[2]!==s||e[3]!==i?(n=t.jsxs("span",{className:"relative shrink-0",children:[s,i]}),e[2]=s,e[3]=i,e[4]=n):n=e[4],n}function Ms(a){const e=v.c(22),{onNavigate:s}=a,d=O(),i=Is(),{org:n,isActive:r}=_e(),{isOpen:o,toggle:l}=Ls();let c;if(e[0]!==i||e[1]!==r||e[2]!==o||e[3]!==s||e[4]!==n||e[5]!==l){let b;e[7]!==r||e[8]!==o||e[9]!==s||e[10]!==n||e[11]!==l?(b=(p,k)=>t.jsxs("div",{className:"flex flex-col",children:[p.label&&t.jsx(Hs,{group:p,open:o(p),onToggle:()=>l(p),className:I("px-2 pt-1.5 pb-0.5",k>0&&"mt-3")}),o(p)&&t.jsx(ne,{className:"gap-0.5",children:p.items.map(j=>t.jsx(re,{icon:t.jsx(Es,{icon:j.icon,badge:j.badge}),label:j.label,isActive:r(j),link:{to:j.to,params:{org:n}},className:"gap-2.5",onSelect:()=>{L("settings_nav_clicked",{section_key:j.key,group_key:p.key}),s?.()}},j.key))})]},p.key),e[7]=r,e[8]=o,e[9]=s,e[10]=n,e[11]=l,e[12]=b):b=e[12],c=i.map(b),e[0]=i,e[1]=r,e[2]=o,e[3]=s,e[4]=n,e[5]=l,e[6]=c}else c=e[6];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[13]=g):g=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"shrink-0",children:t.jsx(Je,{size:14})}),e[14]=u):u=e[14];let f;e[15]!==d?(f=d("settings.nav.signOut"),e[15]=d,e[16]=f):f=e[16];let m;e[17]!==f?(m=t.jsxs("div",{className:"mt-auto flex flex-col",children:[g,t.jsx(ne,{className:"gap-0.5",children:t.jsx(re,{icon:u,label:f,className:"gap-2.5",onSelect:Ds})})]}),e[17]=f,e[18]=m):m=e[18];let h;return e[19]!==c||e[20]!==m?(h=t.jsxs(t.Fragment,{children:[c,m]}),e[19]=c,e[20]=m,e[21]=h):h=e[21],h}function Ds(){L("signed_out",{source:"settings_sidebar"}),We(),F.signOut()}function Bs(a){const e=v.c(8),{onNavigate:s}=a,d=O(),{org:i}=ie();let n;e[0]!==d?(n=d("settings.nav.backToHome"),e[0]=d,e[1]=n):n=e[1];let r;e[2]!==i.slug?(r={to:"/$org/home",params:{org:i.slug}},e[2]=i.slug,e[3]=r):r=e[3];let o;return e[4]!==s||e[5]!==n||e[6]!==r?(o=t.jsx(Ts,{label:n,link:r,onSelect:s}),e[4]=s,e[5]=n,e[6]=r,e[7]=o):o=e[7],o}function Us(){const a=v.c(1);let e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"px-4 pb-1",children:t.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.321.5"]})}),a[0]=e):e=a[0],e}function bt(a){const e=v.c(9),{onClose:s}=a;let d,i,n;e[0]!==s?(d=t.jsx(Ps,{onClose:s}),i=t.jsx(Bs,{onNavigate:s}),n=t.jsx(Ms,{onNavigate:s}),e[0]=s,e[1]=d,e[2]=i,e[3]=n):(d=e[1],i=e[2],n=e[3]);let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Us,{}),e[4]=r):r=e[4];let o;return e[5]!==d||e[6]!==i||e[7]!==n?(o=t.jsx(Fs,{sheet:!0,header:d,back:i,body:n,footer:r}),e[5]=d,e[6]=i,e[7]=n,e[8]=o):o=e[8],o}export{re as S,xt as a,Fs as b,Us as c,Ms as d,Bs as e,Ps as f,Ts as g,bt as h,ye as u};
@@ -1 +1 @@
1
- import{c as u,b as d,G as h,j as b,b0 as S,bj as p,bk as x,bl as g}from"./index-CW6L2S49.js";import{T as j}from"./toolbar-icon-button-BO82E-n0.js";function y(m){const e=u.c(7),{className:o}=m,n=d(),{toggleSidebar:i}=h();let t;e[0]!==n?(t=n("layouts.shellControls.toggleSidebar"),e[0]=n,e[1]=t):t=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=b.jsx(S,{size:16}),e[2]=s):s=e[2];let l;return e[3]!==o||e[4]!==t||e[5]!==i?(l=b.jsx(j,{onClick:i,"aria-label":t,className:o,children:s}),e[3]=o,e[4]=t,e[5]=i,e[6]=l):l=e[6],l}function M(m){const e=u.c(16),{renderSidebar:o}=m,n=d(),{openMobile:i,setOpenMobile:t}=h();let s;e[0]!==n?(s=n("layouts.shellControls.navigationTitle"),e[0]=n,e[1]=s):s=e[1];let l;e[2]!==s?(l=b.jsx(p,{className:"sr-only",children:s}),e[2]=s,e[3]=l):l=e[3];let a;e[4]!==t?(a=()=>t(!1),e[4]=t,e[5]=a):a=e[5];let r;e[6]!==o||e[7]!==a?(r=o({onClose:a}),e[6]=o,e[7]=a,e[8]=r):r=e[8];let c;e[9]!==l||e[10]!==r?(c=b.jsxs(x,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[l,r]}),e[9]=l,e[10]=r,e[11]=c):c=e[11];let f;return e[12]!==i||e[13]!==t||e[14]!==c?(f=b.jsx(g,{open:i,onOpenChange:t,children:c}),e[12]=i,e[13]=t,e[14]=c,e[15]=f):f=e[15],f}export{M,y as S};
1
+ import{c as u,b as d,G as h,j as b,b0 as S,bj as p,bk as x,bl as g}from"./index-Ds9_YQQm.js";import{T as j}from"./toolbar-icon-button-BI33A1DT.js";function y(m){const e=u.c(7),{className:o}=m,n=d(),{toggleSidebar:i}=h();let t;e[0]!==n?(t=n("layouts.shellControls.toggleSidebar"),e[0]=n,e[1]=t):t=e[1];let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=b.jsx(S,{size:16}),e[2]=s):s=e[2];let l;return e[3]!==o||e[4]!==t||e[5]!==i?(l=b.jsx(j,{onClick:i,"aria-label":t,className:o,children:s}),e[3]=o,e[4]=t,e[5]=i,e[6]=l):l=e[6],l}function M(m){const e=u.c(16),{renderSidebar:o}=m,n=d(),{openMobile:i,setOpenMobile:t}=h();let s;e[0]!==n?(s=n("layouts.shellControls.navigationTitle"),e[0]=n,e[1]=s):s=e[1];let l;e[2]!==s?(l=b.jsx(p,{className:"sr-only",children:s}),e[2]=s,e[3]=l):l=e[3];let a;e[4]!==t?(a=()=>t(!1),e[4]=t,e[5]=a):a=e[5];let r;e[6]!==o||e[7]!==a?(r=o({onClose:a}),e[6]=o,e[7]=a,e[8]=r):r=e[8];let c;e[9]!==l||e[10]!==r?(c=b.jsxs(x,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[l,r]}),e[9]=l,e[10]=r,e[11]=c):c=e[11];let f;return e[12]!==i||e[13]!==t||e[14]!==c?(f=b.jsx(g,{open:i,onOpenChange:t,children:c}),e[12]=i,e[13]=t,e[14]=c,e[15]=f):f=e[15],f}export{M,y as S};
@@ -1 +1 @@
1
- import{c as R,b as Y,e as qe,j as n,B as F,t as ze,cP as Re,z as pt,a as $e,w as Mt,x as yt,K as Be,cQ as zt,cR as Ft,J as De,l as et,bn as qt,r as H,d as bt,W as ot,m as Ke,o as tt,b9 as at,v as Kt,cS as Bt,cT as Ht,cU as Ut,cV as Jt,cW as Gt,u as Vt,Z as Wt,ca as Yt,cX as Qt,cY as Xe,cZ as Xt,k as Zt,c_ as en,O as tn,c$ as nn}from"./index-CW6L2S49.js";import{A as Qe}from"./avatar-D7BI9kIY.js";import{t as xt,b as rt}from"./Users03-C9WBhoi4.js";import{d as sn}from"./TrendUp01-0nrjwpEZ.js";import{b7 as on,az as an,b4 as Z,b8 as rn,n as ln,A as cn,b9 as dn,f as lt,h as un,g as mn,ba as fn,d as gn}from"./agent-icon-RpsSZWOm.js";import{s as hn}from"./XClose-D_sSgqWY.js";import{D as pn,u as yn,c as bn,d as xn,b as Sn,A as wn}from"./thread-route-xvjmSQIh.js";import{l as St,a as vn,u as jn}from"./use-project-scope-BgyywlH_.js";import{u as kn,D as ee}from"./use-destination-route-7JP5O6OJ.js";import{u as wt,a as Tn}from"./use-panel-navigate-fLU7dGE0.js";import{i as ne}from"./CheckCircle-DKTcHnyM.js";import{i as ct}from"./Tool02-C5-ESFs5.js";import{i as Ze}from"./Monitor01-Cym0a0IH.js";import{i as se}from"./Zap-BwqaqJR6.js";import{c as vt,d as jt,b as kt,D as Tt,h as Nn,e as An}from"./dialog-lVg2I_FW.js";import{i as _n}from"./Share07-DQRfeucj.js";import{s as dt}from"./Plus-BsdY3vta.js";import{a as Pn}from"./Settings02-B3BHuFlc.js";import{d as ie,e as We,a as Cn,c as En,b as On,f as In}from"./command-Bz-l73oK.js";import{e as Ln,m as Dn}from"./use-mcp-client-BkpxeCP2.js";import{S as Nt,a as $n}from"./constants-DNuUCxmW.js";import{S as Rn,a as Mn}from"./hooks-bhKP99Ax.js";import{u as zn}from"./use-is-desktop-app-BNujXJc_.js";import{R as Fn}from"./required-auth-layout-BASPIPDt.js";import{f as qn}from"./use-organization-settings-BPN8rXNO.js";import{u as Kn}from"./use-org-sso-BjH4Z9oA.js";function Bn(t){const e=R.c(49),{orgName:o,orgSlug:a,orgLogo:s,domain:r}=t,i=Y();let u;e[0]!==a||e[1]!==i?(u=async()=>{const k=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),_=await k.json();if(!k.ok||!_.success)throw new Error(_.error??i("common.autoDomainJoinScreen.joinError"));return _},e[0]=a,e[1]=i,e[2]=u):u=e[2];let f;e[3]!==a?(f=k=>{window.location.href=`/${k.slug??a}`},e[3]=a,e[4]=f):f=e[4];let b;e[5]!==i?(b=k=>{ze.error(k instanceof Error?k.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=b):b=e[6];let j;e[7]!==u||e[8]!==f||e[9]!==b?(j={mutationFn:u,onSuccess:f,onError:b},e[7]=u,e[8]=f,e[9]=b,e[10]=j):j=e[10];const c=qe(j),w=Hn;let p;e[11]!==s||e[12]!==o?(p=s?n.jsx(Qe,{url:s,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(xt,{className:"h-6 w-6 text-primary"})}),e[11]=s,e[12]=o,e[13]=p):p=e[13];let l;e[14]!==o||e[15]!==i?(l=i("common.autoDomainJoinScreen.joinPrompt",{orgName:o}),e[14]=o,e[15]=i,e[16]=l):l=e[16];let g;e[17]!==l?(g=n.jsx("h3",{className:"text-lg font-medium",children:l}),e[17]=l,e[18]=g):g=e[18];let d;e[19]!==r||e[20]!==i?(d=i("common.autoDomainJoinScreen.joinDescription",{domain:r}),e[19]=r,e[20]=i,e[21]=d):d=e[21];let x;e[22]!==d?(x=n.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[22]=d,e[23]=x):x=e[23];let S;e[24]!==g||e[25]!==x?(S=n.jsxs("div",{className:"space-y-2",children:[g,x]}),e[24]=g,e[25]=x,e[26]=S):S=e[26];let y;e[27]!==c?(y=()=>c.mutate(),e[27]=c,e[28]=y):y=e[28];let m;e[29]!==c.isPending||e[30]!==o||e[31]!==i?(m=c.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:o}),e[29]=c.isPending,e[30]=o,e[31]=i,e[32]=m):m=e[32];let A;e[33]!==c.isPending||e[34]!==y||e[35]!==m?(A=n.jsx(F,{onClick:y,disabled:c.isPending,children:m}),e[33]=c.isPending,e[34]=y,e[35]=m,e[36]=A):A=e[36];const P=c.isPending;let T;e[37]!==i?(T=i("common.autoDomainJoinScreen.goHome"),e[37]=i,e[38]=T):T=e[38];let v;e[39]!==c.isPending||e[40]!==T?(v=n.jsx(F,{variant:"ghost",onClick:w,disabled:P,children:T}),e[39]=c.isPending,e[40]=T,e[41]=v):v=e[41];let h;e[42]!==A||e[43]!==v?(h=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[A,v]}),e[42]=A,e[43]=v,e[44]=h):h=e[44];let N;return e[45]!==S||e[46]!==h||e[47]!==p?(N=n.jsxs(Re,{children:[p,S,h]}),e[45]=S,e[46]=h,e[47]=p,e[48]=N):N=e[48],N}function Hn(){window.location.href="/"}function ut(t){const e=R.c(25),{orgSlug:o,orgName:a,reason:s}=t,r=Y(),i=Un,u=s==="not-found",f=u?sn:pt;let b;e[0]!==u||e[1]!==r?(b=r(u?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=u,e[1]=r,e[2]=b):b=e[2];const j=b;let c;e[3]!==u||e[4]!==a||e[5]!==o||e[6]!==r?(c=u?n.jsxs(n.Fragment,{children:[r("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:o}),"."]}):n.jsxs(n.Fragment,{children:[r("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:a??o}),".",n.jsx("br",{}),r("common.noAccessScreen.askAdminToInvite")]}),e[3]=u,e[4]=a,e[5]=o,e[6]=r,e[7]=c):c=e[7];const w=c;let p;e[8]!==f?(p=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(f,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=f,e[9]=p):p=e[9];let l;e[10]!==j?(l=n.jsx("h3",{className:"text-lg font-medium",children:j}),e[10]=j,e[11]=l):l=e[11];let g;e[12]!==w?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:w}),e[12]=w,e[13]=g):g=e[13];let d;e[14]!==l||e[15]!==g?(d=n.jsxs("div",{className:"space-y-2",children:[l,g]}),e[14]=l,e[15]=g,e[16]=d):d=e[16];let x;e[17]!==r?(x=r("common.noAccessScreen.goToHome"),e[17]=r,e[18]=x):x=e[18];let S;e[19]!==x?(S=n.jsx(F,{onClick:i,children:x}),e[19]=x,e[20]=S):S=e[20];let y;return e[21]!==p||e[22]!==d||e[23]!==S?(y=n.jsxs(Re,{children:[p,d,S]}),e[21]=p,e[22]=d,e[23]=S,e[24]=y):y=e[24],y}function Un(){window.location.href="/"}function Jn(t){const e=R.c(59),{invitationId:o,orgName:a,orgSlug:s,orgLogo:r}=t,i=Y();let u;e[0]!==o?(u=async()=>{const O=await $e.organization.acceptInvitation({invitationId:o});if(O.error)throw new Error(O.error.message);return O.data},e[0]=o,e[1]=u):u=e[1];let f;e[2]!==s?(f=()=>{Mt(),window.location.href=`/${s}`},e[2]=s,e[3]=f):f=e[3];let b;e[4]!==i?(b=O=>{ze.error(O instanceof Error?O.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=b):b=e[5];let j;e[6]!==u||e[7]!==f||e[8]!==b?(j={mutationFn:u,onSuccess:f,onError:b},e[6]=u,e[7]=f,e[8]=b,e[9]=j):j=e[9];const c=qe(j);let w;e[10]!==o?(w=async()=>{const O=await $e.organization.rejectInvitation({invitationId:o});if(O.error)throw new Error(O.error.message);return O.data},e[10]=o,e[11]=w):w=e[11];let p,l;e[12]!==i?(p=()=>{ze.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},l=O=>{ze.error(O instanceof Error?O.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=p,e[14]=l):(p=e[13],l=e[14]);let g;e[15]!==w||e[16]!==p||e[17]!==l?(g={mutationFn:w,onSuccess:p,onError:l},e[15]=w,e[16]=p,e[17]=l,e[18]=g):g=e[18];const d=qe(g),x=c.isPending||d.isPending;let S;e[19]!==r||e[20]!==a?(S=r?n.jsx(Qe,{url:r,fallback:a.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(on,{className:"h-6 w-6 text-primary"})}),e[19]=r,e[20]=a,e[21]=S):S=e[21];let y;e[22]!==a||e[23]!==i?(y=i("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=i,e[24]=y):y=e[24];let m;e[25]!==y?(m=n.jsx("h3",{className:"text-lg font-medium",children:y}),e[25]=y,e[26]=m):m=e[26];let A;e[27]!==i?(A=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=A):A=e[28];let P;e[29]!==A?(P=n.jsx("p",{className:"text-sm text-muted-foreground",children:A}),e[29]=A,e[30]=P):P=e[30];let T;e[31]!==m||e[32]!==P?(T=n.jsxs("div",{className:"space-y-2",children:[m,P]}),e[31]=m,e[32]=P,e[33]=T):T=e[33];let v;e[34]!==c?(v=()=>c.mutate(),e[34]=c,e[35]=v):v=e[35];let h;e[36]!==c.isPending||e[37]!==i?(h=c.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=c.isPending,e[37]=i,e[38]=h):h=e[38];let N;e[39]!==x||e[40]!==v||e[41]!==h?(N=n.jsx(F,{onClick:v,disabled:x,children:h}),e[39]=x,e[40]=v,e[41]=h,e[42]=N):N=e[42];let k;e[43]!==d?(k=()=>d.mutate(),e[43]=d,e[44]=k):k=e[44];let _;e[45]!==d.isPending||e[46]!==i?(_=d.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=d.isPending,e[46]=i,e[47]=_):_=e[47];let E;e[48]!==x||e[49]!==k||e[50]!==_?(E=n.jsx(F,{variant:"ghost",onClick:k,disabled:x,children:_}),e[48]=x,e[49]=k,e[50]=_,e[51]=E):E=e[51];let C;e[52]!==N||e[53]!==E?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,E]}),e[52]=N,e[53]=E,e[54]=C):C=e[54];let I;return e[55]!==T||e[56]!==C||e[57]!==S?(I=n.jsxs(Re,{children:[S,T,C]}),e[55]=T,e[56]=C,e[57]=S,e[58]=I):I=e[58],I}function Gn(t){const e=R.c(23),{orgName:o,orgLogo:a}=t,s=Y();let r;e[0]!==a||e[1]!==o?(r=a?n.jsx(Qe,{url:a,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(an,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=o,e[2]=r):r=e[2];let i;e[3]!==s?(i=s("common.requestPendingScreen.title"),e[3]=s,e[4]=i):i=e[4];let u;e[5]!==i?(u=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=u):u=e[6];let f;e[7]!==o||e[8]!==s?(f=s("common.requestPendingScreen.description",{orgName:o}),e[7]=o,e[8]=s,e[9]=f):f=e[9];let b;e[10]!==f?(b=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[10]=f,e[11]=b):b=e[11];let j;e[12]!==u||e[13]!==b?(j=n.jsxs("div",{className:"space-y-2",children:[u,b]}),e[12]=u,e[13]=b,e[14]=j):j=e[14];let c;e[15]!==s?(c=s("common.requestPendingScreen.goHome"),e[15]=s,e[16]=c):c=e[16];let w;e[17]!==c?(w=n.jsx(F,{variant:"ghost",onClick:Vn,children:c}),e[17]=c,e[18]=w):w=e[18];let p;return e[19]!==r||e[20]!==j||e[21]!==w?(p=n.jsxs(Re,{children:[r,j,w]}),e[19]=r,e[20]=j,e[21]=w,e[22]=p):p=e[22],p}function Vn(){window.location.href="/"}function Wn(t){const e=R.c(45),{orgName:o,orgSlug:a,orgLogo:s,domain:r}=t,i=Y();let u;e[0]!==a?(u=async()=>{const N=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),k=await N.json();if(!N.ok||!k.success)throw new Error(k.error??"Failed to request access");return k},e[0]=a,e[1]=u):u=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=Qn,e[2]=f):f=e[2];let b;e[3]!==i?(b=N=>{ze.error(N instanceof Error?N.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=b):b=e[4];let j;e[5]!==u||e[6]!==b?(j={mutationFn:u,onSuccess:f,onError:b},e[5]=u,e[6]=b,e[7]=j):j=e[7];const c=qe(j);let w;e[8]!==s||e[9]!==o?(w=s?n.jsx(Qe,{url:s,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(xt,{className:"h-6 w-6 text-primary"})}),e[8]=s,e[9]=o,e[10]=w):w=e[10];let p;e[11]!==o||e[12]!==i?(p=i("common.requestToJoinScreen.title",{orgName:o}),e[11]=o,e[12]=i,e[13]=p):p=e[13];let l;e[14]!==p?(l=n.jsx("h3",{className:"text-lg font-medium",children:p}),e[14]=p,e[15]=l):l=e[15];let g;e[16]!==r||e[17]!==i?(g=i("common.requestToJoinScreen.description",{domain:r}),e[16]=r,e[17]=i,e[18]=g):g=e[18];let d;e[19]!==g?(d=n.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[19]=g,e[20]=d):d=e[20];let x;e[21]!==l||e[22]!==d?(x=n.jsxs("div",{className:"space-y-2",children:[l,d]}),e[21]=l,e[22]=d,e[23]=x):x=e[23];let S;e[24]!==c?(S=()=>c.mutate(),e[24]=c,e[25]=S):S=e[25];let y;e[26]!==c.isPending||e[27]!==i?(y=c.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=c.isPending,e[27]=i,e[28]=y):y=e[28];let m;e[29]!==c.isPending||e[30]!==S||e[31]!==y?(m=n.jsx(F,{onClick:S,disabled:c.isPending,children:y}),e[29]=c.isPending,e[30]=S,e[31]=y,e[32]=m):m=e[32];const A=c.isPending;let P;e[33]!==i?(P=i("common.requestToJoinScreen.goToHome"),e[33]=i,e[34]=P):P=e[34];let T;e[35]!==c.isPending||e[36]!==P?(T=n.jsx(F,{variant:"ghost",onClick:Yn,disabled:A,children:P}),e[35]=c.isPending,e[36]=P,e[37]=T):T=e[37];let v;e[38]!==m||e[39]!==T?(v=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[m,T]}),e[38]=m,e[39]=T,e[40]=v):v=e[40];let h;return e[41]!==x||e[42]!==v||e[43]!==w?(h=n.jsxs(Re,{children:[w,x,v]}),e[41]=x,e[42]=v,e[43]=w,e[44]=h):h=e[44],h}function Yn(){window.location.href="/"}function Qn(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Xn(t){const e=R.c(7);let o;e[0]!==t?(o=Be.orgAccessStatus(t),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==t?(a=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=a):a=e[3];let s;return e[4]!==o||e[5]!==a?(s={queryKey:o,queryFn:a,refetchOnWindowFocus:!1},e[4]=o,e[5]=a,e[6]=s):s=e[6],yt(s)}function Zn({orgSlug:t}){const{data:e}=Xn(t);if(e.status!=="member"){zt()?.org===t&&Ft();const o=localStorage.getItem(De.lastOrgSlug())===t;if(o&&localStorage.removeItem(De.lastOrgSlug()),o&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(ut,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(Jn,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(Bn,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(Wn,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(Gn,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(ut,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function At(t){const e=R.c(42),{ariaLabel:o,dismissLabel:a,eyebrow:s,title:r,description:i,icon:u,children:f,footerLeading:b,actions:j,onDismiss:c,tone:w}=t,p=w===void 0?"neutral":w,l=b||j;let g;e[0]!==p?(g=p==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=p,e[1]=g):g=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(hn,{size:14}),e[2]=d):d=e[2];let x;e[3]!==a||e[4]!==c?(x=n.jsx(F,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:c,children:d}),e[3]=a,e[4]=c,e[5]=x):x=e[5];const S=u&&"flex items-start gap-3",y=f&&"pb-3";let m;e[6]!==S||e[7]!==y?(m=et("p-4 pr-11",S,y),e[6]=S,e[7]=y,e[8]=m):m=e[8];let A;e[9]!==u?(A=u&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:u}),e[9]=u,e[10]=A):A=e[10];let P;e[11]!==s?(P=s&&n.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[11]=s,e[12]=P):P=e[12];let T;e[13]!==r?(T=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:r}),e[13]=r,e[14]=T):T=e[14];let v;e[15]!==i?(v=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=v):v=e[16];let h;e[17]!==T||e[18]!==v||e[19]!==P?(h=n.jsxs("div",{children:[P,T,v]}),e[17]=T,e[18]=v,e[19]=P,e[20]=h):h=e[20];let N;e[21]!==f?(N=f&&n.jsx("div",{className:"mt-3",children:f}),e[21]=f,e[22]=N):N=e[22];let k;e[23]!==h||e[24]!==N?(k=n.jsxs("div",{className:"min-w-0 flex-1",children:[h,N]}),e[23]=h,e[24]=N,e[25]=k):k=e[25];let _;e[26]!==k||e[27]!==m||e[28]!==A?(_=n.jsxs("div",{className:m,children:[A,k]}),e[26]=k,e[27]=m,e[28]=A,e[29]=_):_=e[29];let E;e[30]!==j||e[31]!==b||e[32]!==l||e[33]!==p?(E=l&&n.jsxs("div",{className:et("flex items-center justify-between gap-3 px-4 py-2.5",p==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:b}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:j})]}),e[30]=j,e[31]=b,e[32]=l,e[33]=p,e[34]=E):E=e[34];let C;return e[35]!==o||e[36]!==_||e[37]!==E||e[38]!==g||e[39]!==x||e[40]!==p?(C=n.jsxs("div",{role:"dialog","aria-label":o,"data-slot":"announcement-card","data-tone":p,className:"relative w-full overflow-hidden rounded-lg border border-border bg-background shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[g,x,_,E]}),e[35]=o,e[36]=_,e[37]=E,e[38]=g,e[39]=x,e[40]=p,e[41]=C):C=e[41],C}const es=[{scope:"shell",anchor:"switcher",titleKey:"layoutTour.switcher.title",descKey:"layoutTour.switcher.description",side:"right"},{scope:"shell",anchor:"nav",titleKey:"layoutTour.nav.title",descKey:"layoutTour.nav.description",side:"right"},{scope:"shell",anchor:"tasks",titleKey:"layoutTour.tasks.title",descKey:"layoutTour.tasks.description",side:"right"},{scope:"project",anchor:"siteEditor",titleKey:"layoutTour.siteEditor.title",descKey:"layoutTour.siteEditor.description",side:"right"},{scope:"project",anchor:"automations",titleKey:"layoutTour.automations.title",descKey:"layoutTour.automations.description",side:"right"},{scope:"shell",anchor:"settings",titleKey:"layoutTour.settings.title",descKey:"layoutTour.settings.description",side:"right"},{scope:"shell",anchor:"projects",titleKey:"layoutTour.projects.title",descKey:"layoutTour.projects.description",side:"right"},{scope:"shell",anchor:"account",titleKey:"layoutTour.account.title",descKey:"layoutTour.account.description",side:"right"},{scope:"siteEditor",anchor:"surfaceTabs",titleKey:"layoutTour.surfaceTabs.title",descKey:"layoutTour.surfaceTabs.description",side:"bottom"},{scope:"siteEditor",anchor:"branchPicker",titleKey:"layoutTour.branchPicker.title",descKey:"layoutTour.branchPicker.description",side:"bottom"},{scope:"orgHome",anchor:"recentActivity",titleKey:"layoutTour.recentActivity.title",descKey:"layoutTour.recentActivity.description",side:"top"}];function ts(t){return es.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function ns(t,e){return ts(e).map(o=>({element:St(o.anchor),popover:{title:t(o.titleKey),description:t(o.descKey),side:o.side,align:"center"}}))}const ss=St("switcher"),os=30;function _t(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function is(t,e){return ns(t,e).filter(o=>typeof o.element=="string"&&_t(o.element))}function as(t,e){return{showProgress:!0,progressText:t("layoutTour.progress"),nextBtnText:t("layoutTour.next"),prevBtnText:t("layoutTour.prev"),doneBtnText:t("layoutTour.done"),showButtons:["next","previous"],smoothScroll:!0,allowClose:!0,disableActiveInteraction:!0,stagePadding:6,stageRadius:8,waitForElement:0,skipMissingElement:!0,popoverClass:"layout-tour-popover",onPopoverRender:(o,{driver:a})=>{if(o.footerButtons.querySelector(".layout-tour-skip"))return;const s=document.createElement("button");s.type="button",s.className="driver-popover-footer-btn layout-tour-skip",s.textContent=t("layoutTour.skip"),s.addEventListener("click",()=>a.destroy()),o.footerButtons.insertBefore(s,o.footerButtons.firstChild)},onDestroyed:()=>{Me=!1},steps:e}}let Me=!1;async function rs(){return(await qt(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function ls(t,e){if(Me)return;Me=!0;let o=0;const a=()=>{if(!_t(ss)&&o++<os){requestAnimationFrame(a);return}const s=is(t,e);if(s.length===0){Me=!1;return}rs().then(r=>{r(as(t,s)).drive()}).catch(()=>{Me=!1})};a()}function Ro(t){if(!t.hasSource)return[];const e=["site-editor"];return t.cmsMode!=="off"&&e.push("content"),t.runtime==="sandbox"&&e.push("code"),e}function Pt(t){return t==="site-editor"||t==="content"||t==="code"||t.startsWith("code:")}function Mo(t){return t.reportsOnly&&!t.onReportAgent&&Pt(t.tabId)}const cs=[{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:rt,title:"Unified org switcher",body:"Organizations and agents now share one control at the top of the sidebar. Search it to jump straight to any agent, including ones in your other organizations."},{icon:Z,title:"Your org at a glance",body:"The organization home now opens on the agents your team built and the tasks they are running — no empty board to fill in first."},{icon:Ze,title:"Simplified CMS",body:"The CMS opens over the page you are previewing rather than somewhere else, so changing a section never costs you your place."}],cta:{label:"Take the tour",action:"start-tour"}},{id:"native-app-linux-beta",date:"2026-08-20",eyebrow:"Now Available",title:"Studio for Linux is now in beta",bullets:[{icon:Ze,title:"Native Linux desktop app",body:"Studio now ships as an AppImage for 64-bit x86 Linux, bringing the local desktop workflow to Linux."},{icon:ne,title:"Verified, no-root install",body:"The installer verifies the download, installs Studio to ~/.local/bin, and adds it to your application launcher without sudo."},{icon:se,title:"Beta today, broader support next",body:"We're validating more distributions and desktop environments. Arm builds are not available yet, and your feedback will shape general availability."}],cta:{label:"Install Studio",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases/tag/native-v4.242.0"},{id:"native-app-macos",date:"2026-07-30",eyebrow:"Now Available",title:"New beta studio app",bullets:[{icon:se,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:Z,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:rn,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:Ze,title:"Apple Silicon only — Windows coming soon",body:"Today's builds target macOS on Apple Silicon; Windows is next."}],cta:{label:"Install on Mac",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases"},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:Z,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:ne,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:se,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:Z,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:ne,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:se,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:ne,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:Z,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:se,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:Z,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:ne,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:se,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:Z,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:ne,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:se,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:Z,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ct,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:ne,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:rt,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:se,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:ne,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:Z,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ct,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:Z,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:ln,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],Ct=cs,Ye="studio.release-feed.v1",nt=new Set;let ae="",re={},st=!1;function ds(){if(st)return ae||"{}";try{return localStorage.getItem(Ye)??"{}"}catch{return ae||"{}"}}function Et(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function mt(){const t=ds();return t!==ae&&(ae=t,re=Et(t)),re}function us(t){nt.add(t);const e=o=>{if(!(o.key!==Ye&&o.key!==null)){try{const a=localStorage.getItem(Ye)??"{}",r={...Et(a),...re};re=r,ae=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{nt.delete(t),window.removeEventListener("storage",e)}}function ms(t){re=t,ae=JSON.stringify(t);try{localStorage.setItem(Ye,ae),st=!1}catch{st=!0}nt.forEach(e=>e())}function fs(){const t=R.c(7),e=H.useSyncExternalStore(us,mt,mt);let o;t[0]!==e?(o=f=>!!e[f],t[0]=e,t[1]=o):o=t[1];const a=o,s=gs;let r;t[2]!==e?(r=Ct.reduce((f,b)=>e[b.id]?f:f+1,0),t[2]=e,t[3]=r):r=t[3];const i=r;let u;return t[4]!==a||t[5]!==i?(u={isSeen:a,markSeen:s,unseenCount:i},t[4]=a,t[5]=i,t[6]=u):u=t[6],u}function gs(t){re[t]||ms({...re,[t]:{seenAt:new Date().toISOString()}})}const hs=720*60*60*1e3,ps=10080*60*1e3;function ys(t){const[e,o,a]=t.split("-").map(Number);return!e||!o||!a?new Date(t).getTime():new Date(e,o-1,a).getTime()}function bs(t){const e=Ct[0];if(!e)return null;const o=ys(e.date),a=t-o;return a<0||a>hs?null:e}function xs(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Ss(t,e){const o=xs(t);return o===null?!1:e-o>=ps}function ws(){const t=R.c(52),e=Y(),o=vn(),a=kn(),s=wt(),r=!!o,i=a===ee.home&&!o;let u;t[0]!==s||t[1]!==r?(u=r&&!!s&&Pt(s),t[0]=s,t[1]=r,t[2]=u):u=t[2];const f=u,{data:b}=$e.useSession(),{isSeen:j,markSeen:c}=fs(),[w,p]=H.useState(!1);let l,g,d;if(t[3]!==j||t[4]!==b?.user?.createdAt){d=Symbol.for("react.early_return_sentinel");e:{const I=Date.now();if(l=bs(I),!l){d=null;break e}if(!Ss(b?.user?.createdAt,I)){d=null;break e}g=j(l.id)}t[3]=j,t[4]=b?.user?.createdAt,t[5]=l,t[6]=g,t[7]=d}else l=t[5],g=t[6],d=t[7];if(d!==Symbol.for("react.early_return_sentinel"))return d;if(g)return null;let x;t[8]!==l.id||t[9]!==r||t[10]!==c||t[11]!==i||t[12]!==f||t[13]!==e?(x=()=>{c(l.id),ls(e,{onOrgHome:i,inProject:r,onSiteEditor:f})},t[8]=l.id,t[9]=r,t[10]=c,t[11]=i,t[12]=f,t[13]=e,t[14]=x):x=t[14];const S=x;let y;t[15]!==e?(y=e("announcements.release.ariaLabel"),t[15]=e,t[16]=y):y=t[16];let m;t[17]!==e?(m=e("announcements.release.dismiss"),t[17]=e,t[18]=m):m=t[18];const A=l.eyebrow,P=l.title;let T;t[19]!==l.id||t[20]!==c?(T=()=>c(l.id),t[19]=l.id,t[20]=c,t[21]=T):T=t[21];let v;t[22]!==l.id||t[23]!==l.learnMoreHref||t[24]!==c||t[25]!==e?(v=l.learnMoreHref?n.jsx("a",{href:l.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>c(l.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[22]=l.id,t[23]=l.learnMoreHref,t[24]=c,t[25]=e,t[26]=v):v=t[26];let h;t[27]!==l.cta||t[28]!==l.id||t[29]!==c||t[30]!==S?(h=l.cta?"href"in l.cta?n.jsx(F,{asChild:!0,size:"sm",onClick:()=>c(l.id),children:n.jsx("a",{href:l.cta.href,children:l.cta.label})}):l.cta.action==="start-tour"?n.jsx(F,{size:"sm",onClick:S,children:l.cta.label}):n.jsx(F,{size:"sm",onClick:()=>p(!0),children:l.cta.label}):null,t[27]=l.cta,t[28]=l.id,t[29]=c,t[30]=S,t[31]=h):h=t[31];let N;t[32]!==l.bullets?(N=l.bullets.map(vs),t[32]=l.bullets,t[33]=N):N=t[33];let k;t[34]!==N?(k=n.jsx("ul",{className:"flex flex-col gap-3",children:N}),t[34]=N,t[35]=k):k=t[35];let _;t[36]!==l.id||t[37]!==c?(_=I=>{p(I),I||c(l.id)},t[36]=l.id,t[37]=c,t[38]=_):_=t[38];let E;t[39]!==w||t[40]!==_?(E=n.jsx(pn,{open:w,onOpenChange:_}),t[39]=w,t[40]=_,t[41]=E):E=t[41];let C;return t[42]!==l.eyebrow||t[43]!==l.title||t[44]!==h||t[45]!==k||t[46]!==E||t[47]!==y||t[48]!==m||t[49]!==T||t[50]!==v?(C=n.jsxs(At,{ariaLabel:y,dismissLabel:m,eyebrow:A,title:P,onDismiss:T,footerLeading:v,actions:h,children:[k,E]}),t[42]=l.eyebrow,t[43]=l.title,t[44]=h,t[45]=k,t[46]=E,t[47]=y,t[48]=m,t[49]=T,t[50]=v,t[51]=C):C=t[51],C}function vs(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const Ot=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),oe=Ot?"⌘":"Ctrl",B={commandPalette:{keys:[oe,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[oe,"["],description:"Back to previous"},focusChatInput:{keys:[oe,"L"],description:"Focus chat input"},saveAndFormat:{keys:[oe,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[oe,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[oe,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",oe,"S"],description:"New task"},toggleDaemon:{keys:[oe,"D"],description:"Toggle daemon logs"}},js=[{label:"General",shortcuts:[B.commandPalette,B.keyboardShortcuts,B.back,B.newTask,B.toggleDaemon]},{label:"Editor",shortcuts:[B.saveAndFormat]},{label:"Chat",shortcuts:[B.focusChatInput,B.togglePlanMode,B.sendMessage,B.newLine]},{label:"Questions",shortcuts:[B.selectOption]},{label:"Monitoring",shortcuts:[B.applyFilter]}];function ft(t){return Ot?t.metaKey:t.ctrlKey}function ks(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function Ts(t){const e=R.c(11),{open:o,onOpenChange:a}=t,s=Y();let r;e[0]!==s?(r=s("common.keyboardShortcutsDialog.title"),e[0]=s,e[1]=r):r=e[1];let i;e[2]!==r?(i=n.jsx(vt,{children:n.jsx(jt,{children:r})}),e[2]=r,e[3]=i):i=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex flex-col gap-4",children:js.map(Ns)}),e[4]=u):u=e[4];let f;e[5]!==i?(f=n.jsxs(kt,{className:"sm:max-w-md",children:[i,u]}),e[5]=i,e[6]=f):f=e[6];let b;return e[7]!==a||e[8]!==o||e[9]!==f?(b=n.jsx(Tt,{open:o,onOpenChange:a,children:f}),e[7]=a,e[8]=o,e[9]=f,e[10]=b):b=e[10],b}function Ns(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(As)})]},t.label)}function As(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(_s)})]},t.description)}function _s(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const gt=8;function Ps(t){const{org:e}=ot(),o=Ln({connectionId:Nt,orgId:e.id,orgSlug:e.slug}),{data:a}=Ke({queryKey:Be.globalSearch(e.id,t,gt),enabled:!!o&&t.trim().length>=2,staleTime:15e3,retry:!1,queryFn:async()=>{if(!o)return[];try{return(await o.callTool({name:"GLOBAL_SEARCH",arguments:{query:t,limit:gt}})).structuredContent?.items??[]}catch{return[]}}});return a??[]}function Cs(t){const e=R.c(165),{open:o,onOpenChange:a}=t,s=Y(),r=bt(),{org:i}=ot(),{projects:u,hasProjects:f}=jn(),[b,j]=H.useState(""),c=H.useDeferredValue(b),w=Ps(c);let p;e[0]!==a?(p=()=>{a(!1),j("")},e[0]=a,e[1]=p):p=e[1];const l=p;let g;e[2]!==l?(g=(L,Rt)=>{tt("command_palette_used",{kind:Rt}),L(),l()},e[2]=l,e[3]=g):g=e[3];const d=g;let x;e[4]!==r||e[5]!==i.slug?(x=L=>{if(L.type==="task"){r({to:ee.tasks,params:{org:i.slug,taskKey:L.key??void 0}});return}r({to:ee.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:L.virtual_mcp_id??void 0,thread:L.id}})},e[4]=r,e[5]=i.slug,e[6]=x):x=e[6];const S=x;let y;e[7]!==i.slug?(y={org:i.slug},e[7]=i.slug,e[8]=y):y=e[8];const m=y;let A;e[9]!==s?(A=s("sidebar.navDestinations.home"),e[9]=s,e[10]=A):A=e[10];let P;e[11]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx(un,{}),e[11]=P):P=e[11];let T;e[12]!==m||e[13]!==A?(T={key:"home",label:A,icon:P,to:ee.home,params:m},e[12]=m,e[13]=A,e[14]=T):T=e[14];let v;e[15]!==s?(v=s("sidebar.navDestinations.reports"),e[15]=s,e[16]=v):v=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(mn,{}),e[17]=h):h=e[17];let N;e[18]!==m||e[19]!==v?(N={key:"reports",label:v,icon:h,to:ee.reports,params:m},e[18]=m,e[19]=v,e[20]=N):N=e[20];let k;e[21]!==s?(k=s("sidebar.navDestinations.tasks"),e[21]=s,e[22]=k):k=e[22];let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(lt,{}),e[23]=_):_=e[23];let E;e[24]!==i.slug?(E={org:i.slug,taskKey:void 0},e[24]=i.slug,e[25]=E):E=e[25];let C;e[26]!==k||e[27]!==E?(C={key:"tasks",label:k,icon:_,to:ee.tasks,params:E},e[26]=k,e[27]=E,e[28]=C):C=e[28];let I;e[29]!==s?(I=s("sidebar.navDestinations.library"),e[29]=s,e[30]=I):I=e[30];let O;e[31]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(_n,{}),e[31]=O):O=e[31];let $;e[32]!==m||e[33]!==I?($={key:"library",label:I,icon:O,to:ee.library,params:m},e[32]=m,e[33]=I,e[34]=$):$=e[34];let M;e[35]!==s?(M=s("sidebar.navDestinations.discover"),e[35]=s,e[36]=M):M=e[36];let te;e[37]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsx(fn,{}),e[37]=te):te=e[37];let Q;e[38]!==m||e[39]!==M?(Q={key:"discover",label:M,icon:te,to:ee.discover,params:m},e[38]=m,e[39]=M,e[40]=Q):Q=e[40];let U;e[41]!==N||e[42]!==C||e[43]!==$||e[44]!==Q||e[45]!==T?(U=[T,N,C,$,Q],e[41]=N,e[42]=C,e[43]=$,e[44]=Q,e[45]=T,e[46]=U):U=e[46];const X=U;let J;e[47]!==l||e[48]!==a?(J=L=>L?a(!0):l(),e[47]=l,e[48]=a,e[49]=J):J=e[49];let G;e[50]!==s?(G=s("commandPalette.title"),e[50]=s,e[51]=G):G=e[51];let q;e[52]!==s?(q=s("commandPalette.description"),e[52]=s,e[53]=q):q=e[53];let K;e[54]!==s?(K=s("commandPalette.placeholder"),e[54]=s,e[55]=K):K=e[55];let V;e[56]!==K||e[57]!==b?(V=n.jsx(Cn,{placeholder:K,value:b,onValueChange:j}),e[56]=K,e[57]=b,e[58]=V):V=e[58];let W;e[59]!==s?(W=s("commandPalette.empty"),e[59]=s,e[60]=W):W=e[60];let D;e[61]!==W?(D=n.jsx(En,{children:W}),e[61]=W,e[62]=D):D=e[62];let z;e[63]!==s?(z=s("commandPalette.goTo"),e[63]=s,e[64]=z):z=e[64];let le;e[65]!==X||e[66]!==d||e[67]!==r?(le=X.map(L=>n.jsxs(ie,{onSelect:()=>d(()=>r({to:L.to,params:L.params}),"destination"),children:[L.icon,n.jsx("span",{children:L.label})]},L.key)),e[65]=X,e[66]=d,e[67]=r,e[68]=le):le=e[68];let ce;e[69]!==z||e[70]!==le?(ce=n.jsx(We,{heading:z,children:le}),e[69]=z,e[70]=le,e[71]=ce):ce=e[71];let de;e[72]!==d||e[73]!==f||e[74]!==r||e[75]!==i.slug||e[76]!==u||e[77]!==s?(de=f&&n.jsx(We,{heading:s("commandPalette.projects"),children:u.map(L=>n.jsxs(ie,{value:`project ${L.title}`,onSelect:()=>d(()=>r({to:ee.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:L.id}}),"project"),children:[n.jsx(cn,{icon:L.icon,name:L.title,size:"2xs"}),n.jsx("span",{children:L.title})]},L.id))}),e[72]=d,e[73]=f,e[74]=r,e[75]=i.slug,e[76]=u,e[77]=s,e[78]=de):de=e[78];let ue;e[79]!==s?(ue=s("commandPalette.actions"),e[79]=s,e[80]=ue):ue=e[80];let me;e[81]!==s?(me=s("commandPalette.newProject"),e[81]=s,e[82]=me):me=e[82];let fe;e[83]!==d||e[84]!==r||e[85]!==i.slug?(fe=()=>d(()=>r({to:ee.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:void 0}}),"new_project"),e[83]=d,e[84]=r,e[85]=i.slug,e[86]=fe):fe=e[86];let He;e[87]===Symbol.for("react.memo_cache_sentinel")?(He=n.jsx(dt,{}),e[87]=He):He=e[87];let ge;e[88]!==s?(ge=s("commandPalette.newProject"),e[88]=s,e[89]=ge):ge=e[89];let he;e[90]!==ge?(he=n.jsx("span",{children:ge}),e[90]=ge,e[91]=he):he=e[91];let pe;e[92]!==me||e[93]!==fe||e[94]!==he?(pe=n.jsxs(ie,{value:me,onSelect:fe,children:[He,he]}),e[92]=me,e[93]=fe,e[94]=he,e[95]=pe):pe=e[95];let ye;e[96]!==s?(ye=s("commandPalette.inviteTeammate"),e[96]=s,e[97]=ye):ye=e[97];let be;e[98]!==d||e[99]!==r||e[100]!==m?(be=()=>d(()=>r({to:"/$org/settings/members",params:m}),"invite"),e[98]=d,e[99]=r,e[100]=m,e[101]=be):be=e[101];let Ue;e[102]===Symbol.for("react.memo_cache_sentinel")?(Ue=n.jsx(gn,{}),e[102]=Ue):Ue=e[102];let xe;e[103]!==s?(xe=s("commandPalette.inviteTeammate"),e[103]=s,e[104]=xe):xe=e[104];let Se;e[105]!==xe?(Se=n.jsx("span",{children:xe}),e[105]=xe,e[106]=Se):Se=e[106];let we;e[107]!==ye||e[108]!==be||e[109]!==Se?(we=n.jsxs(ie,{value:ye,onSelect:be,children:[Ue,Se]}),e[107]=ye,e[108]=be,e[109]=Se,e[110]=we):we=e[110];let ve;e[111]!==s?(ve=s("commandPalette.addConnection"),e[111]=s,e[112]=ve):ve=e[112];let je;e[113]!==d||e[114]!==r||e[115]!==m?(je=()=>d(()=>r({to:"/$org/settings/connections",params:m,search:{tab:"all"}}),"add_connection"),e[113]=d,e[114]=r,e[115]=m,e[116]=je):je=e[116];let Je;e[117]===Symbol.for("react.memo_cache_sentinel")?(Je=n.jsx(dt,{}),e[117]=Je):Je=e[117];let ke;e[118]!==s?(ke=s("commandPalette.addConnection"),e[118]=s,e[119]=ke):ke=e[119];let Te;e[120]!==ke?(Te=n.jsx("span",{children:ke}),e[120]=ke,e[121]=Te):Te=e[121];let Ne;e[122]!==ve||e[123]!==je||e[124]!==Te?(Ne=n.jsxs(ie,{value:ve,onSelect:je,children:[Je,Te]}),e[122]=ve,e[123]=je,e[124]=Te,e[125]=Ne):Ne=e[125];let Ae;e[126]!==s?(Ae=s("commandPalette.settings"),e[126]=s,e[127]=Ae):Ae=e[127];let _e;e[128]!==d||e[129]!==r||e[130]!==m?(_e=()=>d(()=>r({to:"/$org/settings/general",params:m}),"settings"),e[128]=d,e[129]=r,e[130]=m,e[131]=_e):_e=e[131];let Ge;e[132]===Symbol.for("react.memo_cache_sentinel")?(Ge=n.jsx(Pn,{}),e[132]=Ge):Ge=e[132];let Pe;e[133]!==s?(Pe=s("commandPalette.settings"),e[133]=s,e[134]=Pe):Pe=e[134];let Ce;e[135]!==Pe?(Ce=n.jsx("span",{children:Pe}),e[135]=Pe,e[136]=Ce):Ce=e[136];let Ee;e[137]!==Ae||e[138]!==_e||e[139]!==Ce?(Ee=n.jsxs(ie,{value:Ae,onSelect:_e,children:[Ge,Ce]}),e[137]=Ae,e[138]=_e,e[139]=Ce,e[140]=Ee):Ee=e[140];let Oe;e[141]!==ue||e[142]!==pe||e[143]!==we||e[144]!==Ne||e[145]!==Ee?(Oe=n.jsxs(We,{heading:ue,children:[pe,we,Ne,Ee]}),e[141]=ue,e[142]=pe,e[143]=we,e[144]=Ne,e[145]=Ee,e[146]=Oe):Oe=e[146];let Ie;e[147]!==d||e[148]!==w||e[149]!==S||e[150]!==s?(Ie=w.length>0&&n.jsx(We,{heading:s("commandPalette.results"),children:w.map(L=>n.jsxs(ie,{value:`${L.title} ${L.id}`,onSelect:()=>d(()=>S(L),L.type),children:[L.type==="thread"?n.jsx(dn,{}):n.jsx(lt,{}),n.jsx("span",{className:"truncate",children:L.title}),L.type==="task"&&L.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:L.key})]},`${L.type}:${L.id}`))}),e[147]=d,e[148]=w,e[149]=S,e[150]=s,e[151]=Ie):Ie=e[151];let Le;e[152]!==D||e[153]!==ce||e[154]!==de||e[155]!==Oe||e[156]!==Ie?(Le=n.jsxs(On,{children:[D,ce,de,Oe,Ie]}),e[152]=D,e[153]=ce,e[154]=de,e[155]=Oe,e[156]=Ie,e[157]=Le):Le=e[157];let Ve;return e[158]!==o||e[159]!==J||e[160]!==G||e[161]!==q||e[162]!==V||e[163]!==Le?(Ve=n.jsxs(In,{open:o,onOpenChange:J,title:G,description:q,shouldFilter:!1,children:[V,Le]}),e[158]=o,e[159]=J,e[160]=G,e[161]=q,e[162]=V,e[163]=Le,e[164]=Ve):Ve=e[164],Ve}const Fe=new Rn(!1);function Es(){Fe.set(!0)}function Os(){Fe.set(!1)}function Is(){const t=R.c(2),e=H.useSyncExternalStore(Fe.subscribe,Fe.get);let o;return t[0]!==e?(o=[e,Fe.set],t[0]=e,t[1]=o):o=t[1],o}const Ls=300*1e3,Ds=2;function $s(t,e,o){return!e||e===o?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function Rs(t,e){return t.count>=Ds&&t.version!==null&&t.version!==e}function Ms(){const t=R.c(43),e=Y(),o=zn();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={mutationFn:Fs},t[0]=a):a=t[0];const s=qe(a);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:Be.appVersionCheck(),queryFn:zs,refetchInterval:Ls,refetchIntervalInBackground:!0,staleTime:0},t[1]=r):r=t[1];const{data:i,dataUpdatedAt:u}=Ke(r),[f,b]=H.useState(0);let j;t[2]===Symbol.for("react.memo_cache_sentinel")?(j={version:null,count:0},t[2]=j):j=t[2];const[c,w]=H.useState(j);u!==f&&(b(u),w(M=>$s(M,i,"4.321.3")));const[p,l]=H.useState(null),g=o;let d;t[3]!==o||t[4]!==s?(d=()=>window.location.reload(),t[3]=o,t[4]=s,t[5]=d):d=t[5];const x=d,S="announcements.version.refresh";if(!Rs(c,p))return null;let y;t[6]!==e?(y=e("announcements.version.ariaLabel"),t[6]=e,t[7]=y):y=t[7];let m;t[8]!==e?(m=e("announcements.version.dismiss"),t[8]=e,t[9]=m):m=t[9];let A;t[10]!==e?(A=e("announcements.version.eyebrow"),t[10]=e,t[11]=A):A=t[11];let P;t[12]!==e?(P=e("announcements.version.title"),t[12]=e,t[13]=P):P=t[13];const T="announcements.version.description";let v;t[14]!==e||t[15]!==T?(v=e(T),t[14]=e,t[15]=T,t[16]=v):v=t[16];let h;t[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(at,{size:16}),t[17]=h):h=t[17];let N;t[18]!==c.version?(N=()=>l(c.version),t[18]=c.version,t[19]=N):N=t[19];let k;t[20]!==e?(k=e("announcements.version.currentSession",{version:"4.321.3"}),t[20]=e,t[21]=k):k=t[21];let _;t[22]!==S||t[23]!==e?(_=e(S),t[22]=S,t[23]=e,t[24]=_):_=t[24];const E=g;let C;t[25]!==E?(C=et(E),t[25]=E,t[26]=C):C=t[26];let I;t[27]!==C?(I=n.jsx(at,{size:14,className:C}),t[27]=C,t[28]=I):I=t[28];let O;t[29]!==x||t[30]!==g||t[31]!==_||t[32]!==I?(O=n.jsxs(F,{size:"sm",disabled:g,onClick:x,children:[_,I]}),t[29]=x,t[30]=g,t[31]=_,t[32]=I,t[33]=O):O=t[33];let $;return t[34]!==N||t[35]!==k||t[36]!==O||t[37]!==y||t[38]!==m||t[39]!==A||t[40]!==P||t[41]!==v?($=n.jsx(At,{ariaLabel:y,dismissLabel:m,eyebrow:A,title:P,description:v,icon:h,tone:"system",onDismiss:N,footerLeading:k,actions:O}),t[34]=N,t[35]=k,t[36]=O,t[37]=y,t[38]=m,t[39]=A,t[40]=P,t[41]=v,t[42]=$):$=t[42],$}async function zs(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}async function Fs(){const t=await fetch("/_local/update/restart",{method:"POST"});if(!t.ok)throw new Error(`restart failed: ${t.status}`)}function qs(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const Ks=Date.parse("2026-07-21T00:00:00Z"),ht=t=>qs(De.ptBrAnnouncementSeen(t));function Bs(){const t=R.c(35),e=Y(),[o,a]=Kt(),{data:s,isPending:r}=$e.useSession(),i=s?.user,u=i?.id,f=i?.createdAt,b=f!=null&&new Date(f).getTime()<Ks,j=Bt()==="pt-BR",c=!r&&!!u&&b&&j&&o.language==="en"&&!ht(u).has(),[w,p]=H.useState(!1),[l,g]=H.useState(!1);!w&&!r&&(p(!0),c&&u&&(ht(u).mark(),a(Us),g(!0),tt("pt_br_auto_switch_shown")));let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=te=>{tt("pt_br_auto_switch_closed",{action:te}),g(!1)},t[0]=d):d=t[0];const x=d;let S;t[1]!==a?(S=()=>{a(Hs),x("switch-back")},t[1]=a,t[2]=S):S=t[2];const y=S;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=te=>!te&&x("dismiss"),t[3]=m):m=t[3];let A;t[4]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=A):A=t[4];let P;t[5]!==e?(P=e("announcements.ptBr.title"),t[5]=e,t[6]=P):P=t[6];let T;t[7]!==P?(T=n.jsx(jt,{children:P}),t[7]=P,t[8]=T):T=t[8];let v;t[9]!==e?(v=e("announcements.ptBr.description"),t[9]=e,t[10]=v):v=t[10];let h;t[11]!==v?(h=n.jsx(Nn,{children:v}),t[11]=v,t[12]=h):h=t[12];let N;t[13]!==T||t[14]!==h?(N=n.jsxs(vt,{children:[T,h]}),t[13]=T,t[14]=h,t[15]=N):N=t[15];let k;t[16]!==e?(k=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=k):k=t[17];let _;t[18]!==y||t[19]!==k?(_=n.jsx(F,{variant:"outline",onClick:y,children:k}),t[18]=y,t[19]=k,t[20]=_):_=t[20];let E;t[21]===Symbol.for("react.memo_cache_sentinel")?(E=()=>x("ok"),t[21]=E):E=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let I;t[24]!==C?(I=n.jsx(F,{onClick:E,children:C}),t[24]=C,t[25]=I):I=t[25];let O;t[26]!==_||t[27]!==I?(O=n.jsxs(An,{children:[_,I]}),t[26]=_,t[27]=I,t[28]=O):O=t[28];let $;t[29]!==O||t[30]!==N?($=n.jsxs(kt,{className:"sm:max-w-md",children:[A,N,O]}),t[29]=O,t[30]=N,t[31]=$):$=t[31];let M;return t[32]!==l||t[33]!==$?(M=n.jsx(Tt,{open:l,onOpenChange:m,children:$}),t[32]=l,t[33]=$,t[34]=M):M=t[34],M}function Hs(t){return{...t,language:"en"}}function Us(t){return{...t,language:"pt-BR"}}function Js(t){const e=Ht(t);return typeof e=="string"?e:void 0}function Gs(){return Js("experiment-pipeline-check"),null}function Vs(t){const e=R.c(1),{activeOrg:o}=t;if(!o)return null;Ut(o.id,{name:o.name??void 0,slug:o.slug??void 0}),Jt();let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Gs,{}),e[0]=a):a=e[0],a}function Ws(t){const{prev:e,virtualMcpId:o,decopilotId:a,savedLayout:s,opts:r,autosendValue:i}=t,u={mainpanel:void 0};o?u.virtualmcpid=o:e.virtualmcpid&&(u.virtualmcpid=e.virtualmcpid);const f=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,j=(o??f)!==f;let c,w;return r?.panel?w=r.panel:s?(w=s.tab,s.sidepanel!==void 0&&(c=s.sidepanel),s.mainpanel!==void 0&&(u.mainpanel=s.mainpanel)):!j&&e.tabId&&!Gt(e.tabId)&&(w=e.tabId),c!==void 0&&(u.sidepanel=c),r?.autosend&&(u.autosend=i),{tabId:w,search:u}}const It="studio:thread-layout:v3",Ys=50;function Lt(t){const e={};return t===null||typeof t!="object"||(typeof t.tab=="string"&&(e.tab=t.tab),typeof t.mainpanel=="boolean"&&(e.mainpanel=t.mainpanel),typeof t.sidepanel=="boolean"&&(e.sidepanel=t.sidepanel)),e}function Qs(t,e,o,a=Ys){const s=t.filter(([r])=>r!==e);for(s.push([e,Lt(o)]);s.length>a;)s.shift();return s}function it(){try{const t=sessionStorage.getItem(It);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(o=>Array.isArray(o)&&o.length===2&&typeof o[0]=="string"):[]}catch{return[]}}function Dt(t){try{sessionStorage.setItem(It,JSON.stringify(t))}catch{}}function Xs(t,e){t&&Dt(Qs(it(),t,e))}function Zs(t){if(!t)return null;const e=it().find(([o])=>o===t);return e?Lt(e[1]):null}function zo(t){if(!t)return;const e=it(),o=e.filter(([a])=>a!==t);o.length!==e.length&&Dt(o)}function $t(t){return{queryKey:Be.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function Fo(t){const e=R.c(10);let o;e[0]!==t?(o=$t(t),e[0]=t,e[1]=o):o=e[1];const a=Ke(o);let s;e[2]!==a.data?.prompts?(s=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=s):s=e[3];let r;e[4]!==a.data?.tiles?(r=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=r):r=e[5];let i;return e[6]!==a.isLoading||e[7]!==s||e[8]!==r?(i={isLoading:a.isLoading,prompts:s,tiles:r},e[6]=a.isLoading,e[7]=s,e[8]=r,e[9]=i):i=e[9],i}function eo(t){const e=R.c(31),{orgSlug:o,orgName:a,domain:s}=t,r=Y();let i;e[0]!==o?(i=()=>{window.location.href=`/api/${encodeURIComponent(o)}/sso/authorize`},e[0]=o,e[1]=i):i=e[1];const u=i,f=to;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(pt,{className:"h-6 w-6 text-primary"})}),e[2]=b):b=e[2];let j;e[3]!==r?(j=r("common.ssoRequiredScreen.title"),e[3]=r,e[4]=j):j=e[4];let c;e[5]!==j?(c=n.jsx("h3",{className:"text-lg font-medium",children:j}),e[5]=j,e[6]=c):c=e[6];let w;e[7]!==s||e[8]!==a||e[9]!==r?(w=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",r("common.ssoRequiredScreen.requiresSsoAuth"),s?` ${r("common.ssoRequiredScreen.via",{domain:s})}`:"","."]}):r("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=s,e[8]=a,e[9]=r,e[10]=w):w=e[10];let p;e[11]!==w?(p=n.jsx("p",{className:"text-sm text-muted-foreground",children:w}),e[11]=w,e[12]=p):p=e[12];let l;e[13]!==c||e[14]!==p?(l=n.jsxs("div",{className:"space-y-2",children:[c,p]}),e[13]=c,e[14]=p,e[15]=l):l=e[15];let g;e[16]!==r?(g=r("common.ssoRequiredScreen.signInWithSso"),e[16]=r,e[17]=g):g=e[17];let d;e[18]!==u||e[19]!==g?(d=n.jsx(F,{onClick:u,children:g}),e[18]=u,e[19]=g,e[20]=d):d=e[20];let x;e[21]!==r?(x=r("common.ssoRequiredScreen.goBack"),e[21]=r,e[22]=x):x=e[22];let S;e[23]!==x?(S=n.jsx(F,{variant:"ghost",onClick:f,children:x}),e[23]=x,e[24]=S):S=e[24];let y;e[25]!==S||e[26]!==d?(y=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[d,S]}),e[25]=S,e[26]=d,e[27]=y):y=e[27];let m;return e[28]!==y||e[29]!==l?(m=n.jsxs(Re,{children:[b,l,y]}),e[28]=y,e[29]=l,e[30]=m):m=e[30],m}function to(){window.location.href="/"}function no(t){const e=R.c(8),{org:o,children:a}=t,r=qn(o.id,o.slug)?.enabled_plugins??null;let i;e[0]!==o.id||e[1]!==o.name||e[2]!==r?(i={id:o.id,organizationId:o.id,slug:"_org",name:o.name,enabledPlugins:r,ui:null},e[0]=o.id,e[1]=o.name,e[2]=r,e[3]=i):i=e[3];const u=i;let f;return e[4]!==a||e[5]!==o||e[6]!==u?(f=n.jsx(nn,{org:o,project:u,children:a}),e[4]=a,e[5]=o,e[6]=u,e[7]=f):f=e[7],f}function so(){const t=bt(),e=Mn(),{org:o}=ot(),a=Vt({strict:!1}),s=wt(),{openPanel:r,closePanel:i}=Tn(),u=yn(),f=bn(),b=xn(),j=Sn(),c=(g,d=!0)=>t({to:".",search:g,replace:d}),w=()=>c(g=>({...g,sidepanel:!0})),p=(g,d,x)=>{const S=!!f&&f===g;f&&!S&&Xs(f,{tab:s,mainpanel:a.mainpanel,sidepanel:a.sidepanel});const y=S?null:Zs(g),m=$n(o.id).id,A=Ws({prev:{virtualmcpid:u,tabId:s},virtualMcpId:d,decopilotId:m,savedLayout:y,opts:x,autosendValue:wn});return j(g,()=>A.search,{virtualMcpId:d,view:{tabId:A.tabId}})};return{openSidePanel:w,setTaskId:p,createNewTask:async(g,d,x)=>{const S=crypto.randomUUID(),y=g??b;try{await e?.create({id:S,virtual_mcp_id:y,...d?{branch:d}:{}})}catch{}p(S,y,x)},openTab:r,closeTab:i}}const oo=new Set(["/$org/","/$org/home"]);function io(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:ao},t[0]=e):e=t[0],Zt(e)}function ao(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&oo.has(e)}function ro(){const t=R.c(55);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const a=Wt(e)?.params.org,[s,r]=H.useState(!1),[i,u]=Is(),f=Yt(),b=io(),j=a??"";let c;t[1]!==j?(c=$t(j),t[1]=j,t[2]=c):c=t[2];const w=!!a&&b;let p;t[3]!==c||t[4]!==w?(p={...c,enabled:w},t[3]=c,t[4]=w,t[5]=p):p=t[5],Ke(p);const{data:l}=$e.useSession(),g=l?.user?.id;let d;t[6]!==a||t[7]!==g?(d=a&&g?Qt(g,a):null,t[6]=a,t[7]=g,t[8]=d):d=t[8];const x=d;let S,y;t[9]!==f?(S=()=>{const D=z=>{if(ft(z)&&z.code==="KeyK"){z.preventDefault(),Es();return}if(z.key==="?"&&!ks(z.target)){z.preventDefault(),r(!0);return}ft(z)&&z.code==="BracketLeft"&&f.history.canGoBack()&&(z.preventDefault(),f.history.back())};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},y=[f],t[9]=f,t[10]=S,t[11]=y):(S=t[10],y=t[11]),H.useEffect(S,y);let m;t[12]!==a?(m=Be.activeOrganization(a),t[12]=a,t[13]=m):m=t[13];let A;t[14]!==a||t[15]!==g?(A=async()=>{if(!a)return null;performance.mark("mesh:active-org-fetch:start");const{data:D}=await $e.organization.getFullOrganization({query:{organizationSlug:a}}).finally(lo),z=Xe(D);return D&&!z&&localStorage.setItem(De.lastOrgSlug(),a),g&&D&&en(g,a,D),D},t[14]=a,t[15]=g,t[16]=A):A=t[16];const P=x?x.data:void 0,T=x?.updatedAt;let v;t[17]!==P||t[18]!==T||t[19]!==m||t[20]!==A?(v={queryKey:m,queryFn:A,initialData:P,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=P,t[18]=T,t[19]=m,t[20]=A,t[21]=v):v=t[21];const{data:h}=yt(v),N=h?.id,k=h?.slug,{data:_}=Kn(N,k),E=!!_?.ssoRequired&&!_.authenticated,C=N??"",I=k??"";let O;t[22]!==C||t[23]!==I?(O=Dn({connectionId:Nt,orgId:C,orgSlug:I}),t[22]=C,t[23]=I,t[24]=O):O=t[24];const $=!!N&&!!k;let M;if(t[25]!==O||t[26]!==$?(M={...O,enabled:$},t[25]=O,t[26]=$,t[27]=M):M=t[27],Ke(M),(!h||Xe(h)||E)&&Os(),!h){let D;return t[28]!==a?(D=n.jsx(Zn,{orgSlug:a}),t[28]=a,t[29]=D):D=t[29],D}if(Xe(h)){localStorage.getItem(De.lastOrgSlug())===a&&localStorage.removeItem(De.lastOrgSlug());let D;return t[30]!==h.name?(D=n.jsx(Xt,{orgName:h.name}),t[30]=h.name,t[31]=D):D=t[31],D}if(E){let D;return t[32]!==h.id||t[33]!==h.name||t[34]!==h.slug||t[35]!==_.domain?(D=n.jsx(eo,{orgId:h.id,orgSlug:h.slug,orgName:h.name,domain:_.domain}),t[32]=h.id,t[33]=h.name,t[34]=h.slug,t[35]=_.domain,t[36]=D):D=t[36],D}const Q=h.logo??null;let U;t[37]!==h||t[38]!==Q?(U={...h,logo:Q},t[37]=h,t[38]=Q,t[39]=U):U=t[39];let X;t[40]!==h?(X=n.jsx(Vs,{activeOrg:h}),t[40]=h,t[41]=X):X=t[41];let J;t[42]===Symbol.for("react.memo_cache_sentinel")?(J=n.jsx(tn,{}),t[42]=J):J=t[42];let G;t[43]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(ws,{}),n.jsx(Ms,{})]}),t[43]=G):G=t[43];let q;t[44]!==i||t[45]!==u?(q=i&&n.jsx(Cs,{open:i,onOpenChange:u}),t[44]=i,t[45]=u,t[46]=q):q=t[46];let K;t[47]!==s?(K=n.jsx(Ts,{open:s,onOpenChange:r}),t[47]=s,t[48]=K):K=t[48];let V;t[49]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(Bs,{}),t[49]=V):V=t[49];let W;return t[50]!==U||t[51]!==X||t[52]!==q||t[53]!==K?(W=n.jsxs(no,{org:U,children:[X,J,G,q,K,V]}),t[50]=U,t[51]=X,t[52]=q,t[53]=K,t[54]=W):W=t[54],W}function lo(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function co(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Fn,{children:n.jsx(ro,{})}),t[0]=e):e=t[0],e}const qo=Object.freeze(Object.defineProperty({__proto__:null,default:co,usePanelActions:so},Symbol.toStringTag,{value:"Module"}));export{B as K,ft as a,Fo as b,qo as c,zo as f,Pt as i,Es as o,Ro as r,Mo as s,so as u};
1
+ import{c as R,b as Y,e as qe,j as n,B as F,t as ze,cP as Re,z as pt,a as $e,w as Mt,x as yt,K as Be,cQ as zt,cR as Ft,J as De,l as et,bn as qt,r as H,d as bt,W as ot,m as Ke,o as tt,b9 as at,v as Kt,cS as Bt,cT as Ht,cU as Ut,cV as Jt,cW as Gt,u as Vt,Z as Wt,ca as Yt,cX as Qt,cY as Xe,cZ as Xt,k as Zt,c_ as en,O as tn,c$ as nn}from"./index-Ds9_YQQm.js";import{A as Qe}from"./avatar-65M-tykE.js";import{t as xt,b as rt}from"./Users03-B7DS8i2Z.js";import{d as sn}from"./TrendUp01-DaIUMzmz.js";import{b7 as on,az as an,b4 as Z,b8 as rn,n as ln,A as cn,b9 as dn,f as lt,h as un,g as mn,ba as fn,d as gn}from"./agent-icon-BQA3BxVU.js";import{s as hn}from"./XClose-Bw26wZe2.js";import{D as pn,u as yn,c as bn,d as xn,b as Sn,A as wn}from"./thread-route-CYj4FJe7.js";import{l as St,a as vn,u as jn}from"./use-project-scope-BAnUVA3r.js";import{u as kn,D as ee}from"./use-destination-route-DzHgzZDH.js";import{u as wt,a as Tn}from"./use-panel-navigate-Dev670TY.js";import{i as ne}from"./CheckCircle-iUtdabgI.js";import{i as ct}from"./Tool02-DpNDBEil.js";import{i as Ze}from"./Monitor01-BxqJ2lfk.js";import{i as se}from"./Zap-BxV_wNn9.js";import{c as vt,d as jt,b as kt,D as Tt,h as Nn,e as An}from"./dialog-B49rrPcE.js";import{i as _n}from"./Share07-BJIuab_2.js";import{s as dt}from"./Plus-BKIxzM6s.js";import{a as Pn}from"./Settings02-CniOGh2R.js";import{d as ie,e as We,a as Cn,c as En,b as On,f as In}from"./command-CiqpOqS9.js";import{e as Ln,m as Dn}from"./use-mcp-client-BzmGxRuq.js";import{S as Nt,a as $n}from"./constants-DNuUCxmW.js";import{S as Rn,a as Mn}from"./hooks-BduZvxu6.js";import{u as zn}from"./use-is-desktop-app-BNujXJc_.js";import{R as Fn}from"./required-auth-layout-BIgCtLKM.js";import{f as qn}from"./use-organization-settings-CpiPY2sA.js";import{u as Kn}from"./use-org-sso-CWXniPVe.js";function Bn(t){const e=R.c(49),{orgName:o,orgSlug:a,orgLogo:s,domain:r}=t,i=Y();let u;e[0]!==a||e[1]!==i?(u=async()=>{const k=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),_=await k.json();if(!k.ok||!_.success)throw new Error(_.error??i("common.autoDomainJoinScreen.joinError"));return _},e[0]=a,e[1]=i,e[2]=u):u=e[2];let f;e[3]!==a?(f=k=>{window.location.href=`/${k.slug??a}`},e[3]=a,e[4]=f):f=e[4];let b;e[5]!==i?(b=k=>{ze.error(k instanceof Error?k.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=b):b=e[6];let j;e[7]!==u||e[8]!==f||e[9]!==b?(j={mutationFn:u,onSuccess:f,onError:b},e[7]=u,e[8]=f,e[9]=b,e[10]=j):j=e[10];const c=qe(j),w=Hn;let p;e[11]!==s||e[12]!==o?(p=s?n.jsx(Qe,{url:s,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(xt,{className:"h-6 w-6 text-primary"})}),e[11]=s,e[12]=o,e[13]=p):p=e[13];let l;e[14]!==o||e[15]!==i?(l=i("common.autoDomainJoinScreen.joinPrompt",{orgName:o}),e[14]=o,e[15]=i,e[16]=l):l=e[16];let g;e[17]!==l?(g=n.jsx("h3",{className:"text-lg font-medium",children:l}),e[17]=l,e[18]=g):g=e[18];let d;e[19]!==r||e[20]!==i?(d=i("common.autoDomainJoinScreen.joinDescription",{domain:r}),e[19]=r,e[20]=i,e[21]=d):d=e[21];let x;e[22]!==d?(x=n.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[22]=d,e[23]=x):x=e[23];let S;e[24]!==g||e[25]!==x?(S=n.jsxs("div",{className:"space-y-2",children:[g,x]}),e[24]=g,e[25]=x,e[26]=S):S=e[26];let y;e[27]!==c?(y=()=>c.mutate(),e[27]=c,e[28]=y):y=e[28];let m;e[29]!==c.isPending||e[30]!==o||e[31]!==i?(m=c.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:o}),e[29]=c.isPending,e[30]=o,e[31]=i,e[32]=m):m=e[32];let A;e[33]!==c.isPending||e[34]!==y||e[35]!==m?(A=n.jsx(F,{onClick:y,disabled:c.isPending,children:m}),e[33]=c.isPending,e[34]=y,e[35]=m,e[36]=A):A=e[36];const P=c.isPending;let T;e[37]!==i?(T=i("common.autoDomainJoinScreen.goHome"),e[37]=i,e[38]=T):T=e[38];let v;e[39]!==c.isPending||e[40]!==T?(v=n.jsx(F,{variant:"ghost",onClick:w,disabled:P,children:T}),e[39]=c.isPending,e[40]=T,e[41]=v):v=e[41];let h;e[42]!==A||e[43]!==v?(h=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[A,v]}),e[42]=A,e[43]=v,e[44]=h):h=e[44];let N;return e[45]!==S||e[46]!==h||e[47]!==p?(N=n.jsxs(Re,{children:[p,S,h]}),e[45]=S,e[46]=h,e[47]=p,e[48]=N):N=e[48],N}function Hn(){window.location.href="/"}function ut(t){const e=R.c(25),{orgSlug:o,orgName:a,reason:s}=t,r=Y(),i=Un,u=s==="not-found",f=u?sn:pt;let b;e[0]!==u||e[1]!==r?(b=r(u?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=u,e[1]=r,e[2]=b):b=e[2];const j=b;let c;e[3]!==u||e[4]!==a||e[5]!==o||e[6]!==r?(c=u?n.jsxs(n.Fragment,{children:[r("common.noAccessScreen.couldNotFind")," ",n.jsx("strong",{children:o}),"."]}):n.jsxs(n.Fragment,{children:[r("common.noAccessScreen.noAccessTo")," ",n.jsx("strong",{children:a??o}),".",n.jsx("br",{}),r("common.noAccessScreen.askAdminToInvite")]}),e[3]=u,e[4]=a,e[5]=o,e[6]=r,e[7]=c):c=e[7];const w=c;let p;e[8]!==f?(p=n.jsx("div",{className:"bg-muted p-3 rounded-full",children:n.jsx(f,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=f,e[9]=p):p=e[9];let l;e[10]!==j?(l=n.jsx("h3",{className:"text-lg font-medium",children:j}),e[10]=j,e[11]=l):l=e[11];let g;e[12]!==w?(g=n.jsx("p",{className:"text-sm text-muted-foreground",children:w}),e[12]=w,e[13]=g):g=e[13];let d;e[14]!==l||e[15]!==g?(d=n.jsxs("div",{className:"space-y-2",children:[l,g]}),e[14]=l,e[15]=g,e[16]=d):d=e[16];let x;e[17]!==r?(x=r("common.noAccessScreen.goToHome"),e[17]=r,e[18]=x):x=e[18];let S;e[19]!==x?(S=n.jsx(F,{onClick:i,children:x}),e[19]=x,e[20]=S):S=e[20];let y;return e[21]!==p||e[22]!==d||e[23]!==S?(y=n.jsxs(Re,{children:[p,d,S]}),e[21]=p,e[22]=d,e[23]=S,e[24]=y):y=e[24],y}function Un(){window.location.href="/"}function Jn(t){const e=R.c(59),{invitationId:o,orgName:a,orgSlug:s,orgLogo:r}=t,i=Y();let u;e[0]!==o?(u=async()=>{const O=await $e.organization.acceptInvitation({invitationId:o});if(O.error)throw new Error(O.error.message);return O.data},e[0]=o,e[1]=u):u=e[1];let f;e[2]!==s?(f=()=>{Mt(),window.location.href=`/${s}`},e[2]=s,e[3]=f):f=e[3];let b;e[4]!==i?(b=O=>{ze.error(O instanceof Error?O.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=b):b=e[5];let j;e[6]!==u||e[7]!==f||e[8]!==b?(j={mutationFn:u,onSuccess:f,onError:b},e[6]=u,e[7]=f,e[8]=b,e[9]=j):j=e[9];const c=qe(j);let w;e[10]!==o?(w=async()=>{const O=await $e.organization.rejectInvitation({invitationId:o});if(O.error)throw new Error(O.error.message);return O.data},e[10]=o,e[11]=w):w=e[11];let p,l;e[12]!==i?(p=()=>{ze.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},l=O=>{ze.error(O instanceof Error?O.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=p,e[14]=l):(p=e[13],l=e[14]);let g;e[15]!==w||e[16]!==p||e[17]!==l?(g={mutationFn:w,onSuccess:p,onError:l},e[15]=w,e[16]=p,e[17]=l,e[18]=g):g=e[18];const d=qe(g),x=c.isPending||d.isPending;let S;e[19]!==r||e[20]!==a?(S=r?n.jsx(Qe,{url:r,fallback:a.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(on,{className:"h-6 w-6 text-primary"})}),e[19]=r,e[20]=a,e[21]=S):S=e[21];let y;e[22]!==a||e[23]!==i?(y=i("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=i,e[24]=y):y=e[24];let m;e[25]!==y?(m=n.jsx("h3",{className:"text-lg font-medium",children:y}),e[25]=y,e[26]=m):m=e[26];let A;e[27]!==i?(A=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=A):A=e[28];let P;e[29]!==A?(P=n.jsx("p",{className:"text-sm text-muted-foreground",children:A}),e[29]=A,e[30]=P):P=e[30];let T;e[31]!==m||e[32]!==P?(T=n.jsxs("div",{className:"space-y-2",children:[m,P]}),e[31]=m,e[32]=P,e[33]=T):T=e[33];let v;e[34]!==c?(v=()=>c.mutate(),e[34]=c,e[35]=v):v=e[35];let h;e[36]!==c.isPending||e[37]!==i?(h=c.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=c.isPending,e[37]=i,e[38]=h):h=e[38];let N;e[39]!==x||e[40]!==v||e[41]!==h?(N=n.jsx(F,{onClick:v,disabled:x,children:h}),e[39]=x,e[40]=v,e[41]=h,e[42]=N):N=e[42];let k;e[43]!==d?(k=()=>d.mutate(),e[43]=d,e[44]=k):k=e[44];let _;e[45]!==d.isPending||e[46]!==i?(_=d.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=d.isPending,e[46]=i,e[47]=_):_=e[47];let E;e[48]!==x||e[49]!==k||e[50]!==_?(E=n.jsx(F,{variant:"ghost",onClick:k,disabled:x,children:_}),e[48]=x,e[49]=k,e[50]=_,e[51]=E):E=e[51];let C;e[52]!==N||e[53]!==E?(C=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[N,E]}),e[52]=N,e[53]=E,e[54]=C):C=e[54];let I;return e[55]!==T||e[56]!==C||e[57]!==S?(I=n.jsxs(Re,{children:[S,T,C]}),e[55]=T,e[56]=C,e[57]=S,e[58]=I):I=e[58],I}function Gn(t){const e=R.c(23),{orgName:o,orgLogo:a}=t,s=Y();let r;e[0]!==a||e[1]!==o?(r=a?n.jsx(Qe,{url:a,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(an,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=o,e[2]=r):r=e[2];let i;e[3]!==s?(i=s("common.requestPendingScreen.title"),e[3]=s,e[4]=i):i=e[4];let u;e[5]!==i?(u=n.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=u):u=e[6];let f;e[7]!==o||e[8]!==s?(f=s("common.requestPendingScreen.description",{orgName:o}),e[7]=o,e[8]=s,e[9]=f):f=e[9];let b;e[10]!==f?(b=n.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[10]=f,e[11]=b):b=e[11];let j;e[12]!==u||e[13]!==b?(j=n.jsxs("div",{className:"space-y-2",children:[u,b]}),e[12]=u,e[13]=b,e[14]=j):j=e[14];let c;e[15]!==s?(c=s("common.requestPendingScreen.goHome"),e[15]=s,e[16]=c):c=e[16];let w;e[17]!==c?(w=n.jsx(F,{variant:"ghost",onClick:Vn,children:c}),e[17]=c,e[18]=w):w=e[18];let p;return e[19]!==r||e[20]!==j||e[21]!==w?(p=n.jsxs(Re,{children:[r,j,w]}),e[19]=r,e[20]=j,e[21]=w,e[22]=p):p=e[22],p}function Vn(){window.location.href="/"}function Wn(t){const e=R.c(45),{orgName:o,orgSlug:a,orgLogo:s,domain:r}=t,i=Y();let u;e[0]!==a?(u=async()=>{const N=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),k=await N.json();if(!N.ok||!k.success)throw new Error(k.error??"Failed to request access");return k},e[0]=a,e[1]=u):u=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=Qn,e[2]=f):f=e[2];let b;e[3]!==i?(b=N=>{ze.error(N instanceof Error?N.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=b):b=e[4];let j;e[5]!==u||e[6]!==b?(j={mutationFn:u,onSuccess:f,onError:b},e[5]=u,e[6]=b,e[7]=j):j=e[7];const c=qe(j);let w;e[8]!==s||e[9]!==o?(w=s?n.jsx(Qe,{url:s,fallback:o.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(xt,{className:"h-6 w-6 text-primary"})}),e[8]=s,e[9]=o,e[10]=w):w=e[10];let p;e[11]!==o||e[12]!==i?(p=i("common.requestToJoinScreen.title",{orgName:o}),e[11]=o,e[12]=i,e[13]=p):p=e[13];let l;e[14]!==p?(l=n.jsx("h3",{className:"text-lg font-medium",children:p}),e[14]=p,e[15]=l):l=e[15];let g;e[16]!==r||e[17]!==i?(g=i("common.requestToJoinScreen.description",{domain:r}),e[16]=r,e[17]=i,e[18]=g):g=e[18];let d;e[19]!==g?(d=n.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[19]=g,e[20]=d):d=e[20];let x;e[21]!==l||e[22]!==d?(x=n.jsxs("div",{className:"space-y-2",children:[l,d]}),e[21]=l,e[22]=d,e[23]=x):x=e[23];let S;e[24]!==c?(S=()=>c.mutate(),e[24]=c,e[25]=S):S=e[25];let y;e[26]!==c.isPending||e[27]!==i?(y=c.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=c.isPending,e[27]=i,e[28]=y):y=e[28];let m;e[29]!==c.isPending||e[30]!==S||e[31]!==y?(m=n.jsx(F,{onClick:S,disabled:c.isPending,children:y}),e[29]=c.isPending,e[30]=S,e[31]=y,e[32]=m):m=e[32];const A=c.isPending;let P;e[33]!==i?(P=i("common.requestToJoinScreen.goToHome"),e[33]=i,e[34]=P):P=e[34];let T;e[35]!==c.isPending||e[36]!==P?(T=n.jsx(F,{variant:"ghost",onClick:Yn,disabled:A,children:P}),e[35]=c.isPending,e[36]=P,e[37]=T):T=e[37];let v;e[38]!==m||e[39]!==T?(v=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[m,T]}),e[38]=m,e[39]=T,e[40]=v):v=e[40];let h;return e[41]!==x||e[42]!==v||e[43]!==w?(h=n.jsxs(Re,{children:[w,x,v]}),e[41]=x,e[42]=v,e[43]=w,e[44]=h):h=e[44],h}function Yn(){window.location.href="/"}function Qn(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Xn(t){const e=R.c(7);let o;e[0]!==t?(o=Be.orgAccessStatus(t),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==t?(a=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=a):a=e[3];let s;return e[4]!==o||e[5]!==a?(s={queryKey:o,queryFn:a,refetchOnWindowFocus:!1},e[4]=o,e[5]=a,e[6]=s):s=e[6],yt(s)}function Zn({orgSlug:t}){const{data:e}=Xn(t);if(e.status!=="member"){zt()?.org===t&&Ft();const o=localStorage.getItem(De.lastOrgSlug())===t;if(o&&localStorage.removeItem(De.lastOrgSlug()),o&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?n.jsx(ut,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?n.jsx(Jn,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?n.jsx(Bn,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?n.jsx(Wn,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?n.jsx(Gn,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):n.jsx(ut,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function At(t){const e=R.c(42),{ariaLabel:o,dismissLabel:a,eyebrow:s,title:r,description:i,icon:u,children:f,footerLeading:b,actions:j,onDismiss:c,tone:w}=t,p=w===void 0?"neutral":w,l=b||j;let g;e[0]!==p?(g=p==="system"&&n.jsx("div",{className:"h-0.5 bg-special"}),e[0]=p,e[1]=g):g=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(hn,{size:14}),e[2]=d):d=e[2];let x;e[3]!==a||e[4]!==c?(x=n.jsx(F,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:c,children:d}),e[3]=a,e[4]=c,e[5]=x):x=e[5];const S=u&&"flex items-start gap-3",y=f&&"pb-3";let m;e[6]!==S||e[7]!==y?(m=et("p-4 pr-11",S,y),e[6]=S,e[7]=y,e[8]=m):m=e[8];let A;e[9]!==u?(A=u&&n.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:u}),e[9]=u,e[10]=A):A=e[10];let P;e[11]!==s?(P=s&&n.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[11]=s,e[12]=P):P=e[12];let T;e[13]!==r?(T=n.jsx("h3",{className:"text-base font-semibold text-foreground",children:r}),e[13]=r,e[14]=T):T=e[14];let v;e[15]!==i?(v=i&&n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=v):v=e[16];let h;e[17]!==T||e[18]!==v||e[19]!==P?(h=n.jsxs("div",{children:[P,T,v]}),e[17]=T,e[18]=v,e[19]=P,e[20]=h):h=e[20];let N;e[21]!==f?(N=f&&n.jsx("div",{className:"mt-3",children:f}),e[21]=f,e[22]=N):N=e[22];let k;e[23]!==h||e[24]!==N?(k=n.jsxs("div",{className:"min-w-0 flex-1",children:[h,N]}),e[23]=h,e[24]=N,e[25]=k):k=e[25];let _;e[26]!==k||e[27]!==m||e[28]!==A?(_=n.jsxs("div",{className:m,children:[A,k]}),e[26]=k,e[27]=m,e[28]=A,e[29]=_):_=e[29];let E;e[30]!==j||e[31]!==b||e[32]!==l||e[33]!==p?(E=l&&n.jsxs("div",{className:et("flex items-center justify-between gap-3 px-4 py-2.5",p==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[n.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:b}),n.jsx("div",{className:"flex shrink-0 items-center gap-2",children:j})]}),e[30]=j,e[31]=b,e[32]=l,e[33]=p,e[34]=E):E=e[34];let C;return e[35]!==o||e[36]!==_||e[37]!==E||e[38]!==g||e[39]!==x||e[40]!==p?(C=n.jsxs("div",{role:"dialog","aria-label":o,"data-slot":"announcement-card","data-tone":p,className:"relative w-full overflow-hidden rounded-lg border border-border bg-background shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[g,x,_,E]}),e[35]=o,e[36]=_,e[37]=E,e[38]=g,e[39]=x,e[40]=p,e[41]=C):C=e[41],C}const es=[{scope:"shell",anchor:"switcher",titleKey:"layoutTour.switcher.title",descKey:"layoutTour.switcher.description",side:"right"},{scope:"shell",anchor:"nav",titleKey:"layoutTour.nav.title",descKey:"layoutTour.nav.description",side:"right"},{scope:"shell",anchor:"tasks",titleKey:"layoutTour.tasks.title",descKey:"layoutTour.tasks.description",side:"right"},{scope:"project",anchor:"siteEditor",titleKey:"layoutTour.siteEditor.title",descKey:"layoutTour.siteEditor.description",side:"right"},{scope:"project",anchor:"automations",titleKey:"layoutTour.automations.title",descKey:"layoutTour.automations.description",side:"right"},{scope:"shell",anchor:"settings",titleKey:"layoutTour.settings.title",descKey:"layoutTour.settings.description",side:"right"},{scope:"shell",anchor:"projects",titleKey:"layoutTour.projects.title",descKey:"layoutTour.projects.description",side:"right"},{scope:"shell",anchor:"account",titleKey:"layoutTour.account.title",descKey:"layoutTour.account.description",side:"right"},{scope:"siteEditor",anchor:"surfaceTabs",titleKey:"layoutTour.surfaceTabs.title",descKey:"layoutTour.surfaceTabs.description",side:"bottom"},{scope:"siteEditor",anchor:"branchPicker",titleKey:"layoutTour.branchPicker.title",descKey:"layoutTour.branchPicker.description",side:"bottom"},{scope:"orgHome",anchor:"recentActivity",titleKey:"layoutTour.recentActivity.title",descKey:"layoutTour.recentActivity.description",side:"top"}];function ts(t){return es.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function ns(t,e){return ts(e).map(o=>({element:St(o.anchor),popover:{title:t(o.titleKey),description:t(o.descKey),side:o.side,align:"center"}}))}const ss=St("switcher"),os=30;function _t(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function is(t,e){return ns(t,e).filter(o=>typeof o.element=="string"&&_t(o.element))}function as(t,e){return{showProgress:!0,progressText:t("layoutTour.progress"),nextBtnText:t("layoutTour.next"),prevBtnText:t("layoutTour.prev"),doneBtnText:t("layoutTour.done"),showButtons:["next","previous"],smoothScroll:!0,allowClose:!0,disableActiveInteraction:!0,stagePadding:6,stageRadius:8,waitForElement:0,skipMissingElement:!0,popoverClass:"layout-tour-popover",onPopoverRender:(o,{driver:a})=>{if(o.footerButtons.querySelector(".layout-tour-skip"))return;const s=document.createElement("button");s.type="button",s.className="driver-popover-footer-btn layout-tour-skip",s.textContent=t("layoutTour.skip"),s.addEventListener("click",()=>a.destroy()),o.footerButtons.insertBefore(s,o.footerButtons.firstChild)},onDestroyed:()=>{Me=!1},steps:e}}let Me=!1;async function rs(){return(await qt(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function ls(t,e){if(Me)return;Me=!0;let o=0;const a=()=>{if(!_t(ss)&&o++<os){requestAnimationFrame(a);return}const s=is(t,e);if(s.length===0){Me=!1;return}rs().then(r=>{r(as(t,s)).drive()}).catch(()=>{Me=!1})};a()}function Ro(t){if(!t.hasSource)return[];const e=["site-editor"];return t.cmsMode!=="off"&&e.push("content"),t.runtime==="sandbox"&&e.push("code"),e}function Pt(t){return t==="site-editor"||t==="content"||t==="code"||t.startsWith("code:")}function Mo(t){return t.reportsOnly&&!t.onReportAgent&&Pt(t.tabId)}const cs=[{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:rt,title:"Unified org switcher",body:"Organizations and agents now share one control at the top of the sidebar. Search it to jump straight to any agent, including ones in your other organizations."},{icon:Z,title:"Your org at a glance",body:"The organization home now opens on the agents your team built and the tasks they are running — no empty board to fill in first."},{icon:Ze,title:"Simplified CMS",body:"The CMS opens over the page you are previewing rather than somewhere else, so changing a section never costs you your place."}],cta:{label:"Take the tour",action:"start-tour"}},{id:"native-app-linux-beta",date:"2026-08-20",eyebrow:"Now Available",title:"Studio for Linux is now in beta",bullets:[{icon:Ze,title:"Native Linux desktop app",body:"Studio now ships as an AppImage for 64-bit x86 Linux, bringing the local desktop workflow to Linux."},{icon:ne,title:"Verified, no-root install",body:"The installer verifies the download, installs Studio to ~/.local/bin, and adds it to your application launcher without sudo."},{icon:se,title:"Beta today, broader support next",body:"We're validating more distributions and desktop environments. Arm builds are not available yet, and your feedback will shape general availability."}],cta:{label:"Install Studio",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases/tag/native-v4.242.0"},{id:"native-app-macos",date:"2026-07-30",eyebrow:"Now Available",title:"New beta studio app",bullets:[{icon:se,title:"Faster CMS previews",body:"Every draft gets its own git worktree on your machine, so previews render instantly as you edit."},{icon:Z,title:"Native Claude Code & Codex support",body:"State-of-the-art coding agents, running natively against your local files."},{icon:rn,title:"Boosted performance",body:"Entirely rewritten in Rust with a smaller memory footprint than the Bun-based runtime — fast even on modest machines."},{icon:Ze,title:"Apple Silicon only — Windows coming soon",body:"Today's builds target macOS on Apple Silicon; Windows is next."}],cta:{label:"Install on Mac",action:"download-app"},learnMoreHref:"https://github.com/decocms/studio/releases"},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:Z,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:ne,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:se,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:Z,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:ne,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:se,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:ne,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:Z,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:se,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:Z,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:ne,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:se,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:Z,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:ne,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:se,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:Z,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ct,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:ne,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:rt,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:se,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:ne,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:Z,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ct,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:Z,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:ln,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],Ct=cs,Ye="studio.release-feed.v1",nt=new Set;let ae="",re={},st=!1;function ds(){if(st)return ae||"{}";try{return localStorage.getItem(Ye)??"{}"}catch{return ae||"{}"}}function Et(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function mt(){const t=ds();return t!==ae&&(ae=t,re=Et(t)),re}function us(t){nt.add(t);const e=o=>{if(!(o.key!==Ye&&o.key!==null)){try{const a=localStorage.getItem(Ye)??"{}",r={...Et(a),...re};re=r,ae=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{nt.delete(t),window.removeEventListener("storage",e)}}function ms(t){re=t,ae=JSON.stringify(t);try{localStorage.setItem(Ye,ae),st=!1}catch{st=!0}nt.forEach(e=>e())}function fs(){const t=R.c(7),e=H.useSyncExternalStore(us,mt,mt);let o;t[0]!==e?(o=f=>!!e[f],t[0]=e,t[1]=o):o=t[1];const a=o,s=gs;let r;t[2]!==e?(r=Ct.reduce((f,b)=>e[b.id]?f:f+1,0),t[2]=e,t[3]=r):r=t[3];const i=r;let u;return t[4]!==a||t[5]!==i?(u={isSeen:a,markSeen:s,unseenCount:i},t[4]=a,t[5]=i,t[6]=u):u=t[6],u}function gs(t){re[t]||ms({...re,[t]:{seenAt:new Date().toISOString()}})}const hs=720*60*60*1e3,ps=10080*60*1e3;function ys(t){const[e,o,a]=t.split("-").map(Number);return!e||!o||!a?new Date(t).getTime():new Date(e,o-1,a).getTime()}function bs(t){const e=Ct[0];if(!e)return null;const o=ys(e.date),a=t-o;return a<0||a>hs?null:e}function xs(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function Ss(t,e){const o=xs(t);return o===null?!1:e-o>=ps}function ws(){const t=R.c(52),e=Y(),o=vn(),a=kn(),s=wt(),r=!!o,i=a===ee.home&&!o;let u;t[0]!==s||t[1]!==r?(u=r&&!!s&&Pt(s),t[0]=s,t[1]=r,t[2]=u):u=t[2];const f=u,{data:b}=$e.useSession(),{isSeen:j,markSeen:c}=fs(),[w,p]=H.useState(!1);let l,g,d;if(t[3]!==j||t[4]!==b?.user?.createdAt){d=Symbol.for("react.early_return_sentinel");e:{const I=Date.now();if(l=bs(I),!l){d=null;break e}if(!Ss(b?.user?.createdAt,I)){d=null;break e}g=j(l.id)}t[3]=j,t[4]=b?.user?.createdAt,t[5]=l,t[6]=g,t[7]=d}else l=t[5],g=t[6],d=t[7];if(d!==Symbol.for("react.early_return_sentinel"))return d;if(g)return null;let x;t[8]!==l.id||t[9]!==r||t[10]!==c||t[11]!==i||t[12]!==f||t[13]!==e?(x=()=>{c(l.id),ls(e,{onOrgHome:i,inProject:r,onSiteEditor:f})},t[8]=l.id,t[9]=r,t[10]=c,t[11]=i,t[12]=f,t[13]=e,t[14]=x):x=t[14];const S=x;let y;t[15]!==e?(y=e("announcements.release.ariaLabel"),t[15]=e,t[16]=y):y=t[16];let m;t[17]!==e?(m=e("announcements.release.dismiss"),t[17]=e,t[18]=m):m=t[18];const A=l.eyebrow,P=l.title;let T;t[19]!==l.id||t[20]!==c?(T=()=>c(l.id),t[19]=l.id,t[20]=c,t[21]=T):T=t[21];let v;t[22]!==l.id||t[23]!==l.learnMoreHref||t[24]!==c||t[25]!==e?(v=l.learnMoreHref?n.jsx("a",{href:l.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>c(l.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[22]=l.id,t[23]=l.learnMoreHref,t[24]=c,t[25]=e,t[26]=v):v=t[26];let h;t[27]!==l.cta||t[28]!==l.id||t[29]!==c||t[30]!==S?(h=l.cta?"href"in l.cta?n.jsx(F,{asChild:!0,size:"sm",onClick:()=>c(l.id),children:n.jsx("a",{href:l.cta.href,children:l.cta.label})}):l.cta.action==="start-tour"?n.jsx(F,{size:"sm",onClick:S,children:l.cta.label}):n.jsx(F,{size:"sm",onClick:()=>p(!0),children:l.cta.label}):null,t[27]=l.cta,t[28]=l.id,t[29]=c,t[30]=S,t[31]=h):h=t[31];let N;t[32]!==l.bullets?(N=l.bullets.map(vs),t[32]=l.bullets,t[33]=N):N=t[33];let k;t[34]!==N?(k=n.jsx("ul",{className:"flex flex-col gap-3",children:N}),t[34]=N,t[35]=k):k=t[35];let _;t[36]!==l.id||t[37]!==c?(_=I=>{p(I),I||c(l.id)},t[36]=l.id,t[37]=c,t[38]=_):_=t[38];let E;t[39]!==w||t[40]!==_?(E=n.jsx(pn,{open:w,onOpenChange:_}),t[39]=w,t[40]=_,t[41]=E):E=t[41];let C;return t[42]!==l.eyebrow||t[43]!==l.title||t[44]!==h||t[45]!==k||t[46]!==E||t[47]!==y||t[48]!==m||t[49]!==T||t[50]!==v?(C=n.jsxs(At,{ariaLabel:y,dismissLabel:m,eyebrow:A,title:P,onDismiss:T,footerLeading:v,actions:h,children:[k,E]}),t[42]=l.eyebrow,t[43]=l.title,t[44]=h,t[45]=k,t[46]=E,t[47]=y,t[48]=m,t[49]=T,t[50]=v,t[51]=C):C=t[51],C}function vs(t,e){return n.jsxs("li",{className:"flex items-start gap-3",children:[n.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),n.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const Ot=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),oe=Ot?"⌘":"Ctrl",B={commandPalette:{keys:[oe,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[oe,"["],description:"Back to previous"},focusChatInput:{keys:[oe,"L"],description:"Focus chat input"},saveAndFormat:{keys:[oe,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[oe,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[oe,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",oe,"S"],description:"New task"},toggleDaemon:{keys:[oe,"D"],description:"Toggle daemon logs"}},js=[{label:"General",shortcuts:[B.commandPalette,B.keyboardShortcuts,B.back,B.newTask,B.toggleDaemon]},{label:"Editor",shortcuts:[B.saveAndFormat]},{label:"Chat",shortcuts:[B.focusChatInput,B.togglePlanMode,B.sendMessage,B.newLine]},{label:"Questions",shortcuts:[B.selectOption]},{label:"Monitoring",shortcuts:[B.applyFilter]}];function ft(t){return Ot?t.metaKey:t.ctrlKey}function ks(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function Ts(t){const e=R.c(11),{open:o,onOpenChange:a}=t,s=Y();let r;e[0]!==s?(r=s("common.keyboardShortcutsDialog.title"),e[0]=s,e[1]=r):r=e[1];let i;e[2]!==r?(i=n.jsx(vt,{children:n.jsx(jt,{children:r})}),e[2]=r,e[3]=i):i=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex flex-col gap-4",children:js.map(Ns)}),e[4]=u):u=e[4];let f;e[5]!==i?(f=n.jsxs(kt,{className:"sm:max-w-md",children:[i,u]}),e[5]=i,e[6]=f):f=e[6];let b;return e[7]!==a||e[8]!==o||e[9]!==f?(b=n.jsx(Tt,{open:o,onOpenChange:a,children:f}),e[7]=a,e[8]=o,e[9]=f,e[10]=b):b=e[10],b}function Ns(t){return n.jsxs("div",{children:[n.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),n.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(As)})]},t.label)}function As(t){return n.jsxs("div",{className:"flex items-center justify-between py-1",children:[n.jsx("span",{className:"text-sm",children:t.description}),n.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(_s)})]},t.description)}function _s(t){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const gt=8;function Ps(t){const{org:e}=ot(),o=Ln({connectionId:Nt,orgId:e.id,orgSlug:e.slug}),{data:a}=Ke({queryKey:Be.globalSearch(e.id,t,gt),enabled:!!o&&t.trim().length>=2,staleTime:15e3,retry:!1,queryFn:async()=>{if(!o)return[];try{return(await o.callTool({name:"GLOBAL_SEARCH",arguments:{query:t,limit:gt}})).structuredContent?.items??[]}catch{return[]}}});return a??[]}function Cs(t){const e=R.c(165),{open:o,onOpenChange:a}=t,s=Y(),r=bt(),{org:i}=ot(),{projects:u,hasProjects:f}=jn(),[b,j]=H.useState(""),c=H.useDeferredValue(b),w=Ps(c);let p;e[0]!==a?(p=()=>{a(!1),j("")},e[0]=a,e[1]=p):p=e[1];const l=p;let g;e[2]!==l?(g=(L,Rt)=>{tt("command_palette_used",{kind:Rt}),L(),l()},e[2]=l,e[3]=g):g=e[3];const d=g;let x;e[4]!==r||e[5]!==i.slug?(x=L=>{if(L.type==="task"){r({to:ee.tasks,params:{org:i.slug,taskKey:L.key??void 0}});return}r({to:ee.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:L.virtual_mcp_id??void 0,thread:L.id}})},e[4]=r,e[5]=i.slug,e[6]=x):x=e[6];const S=x;let y;e[7]!==i.slug?(y={org:i.slug},e[7]=i.slug,e[8]=y):y=e[8];const m=y;let A;e[9]!==s?(A=s("sidebar.navDestinations.home"),e[9]=s,e[10]=A):A=e[10];let P;e[11]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx(un,{}),e[11]=P):P=e[11];let T;e[12]!==m||e[13]!==A?(T={key:"home",label:A,icon:P,to:ee.home,params:m},e[12]=m,e[13]=A,e[14]=T):T=e[14];let v;e[15]!==s?(v=s("sidebar.navDestinations.reports"),e[15]=s,e[16]=v):v=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(mn,{}),e[17]=h):h=e[17];let N;e[18]!==m||e[19]!==v?(N={key:"reports",label:v,icon:h,to:ee.reports,params:m},e[18]=m,e[19]=v,e[20]=N):N=e[20];let k;e[21]!==s?(k=s("sidebar.navDestinations.tasks"),e[21]=s,e[22]=k):k=e[22];let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(lt,{}),e[23]=_):_=e[23];let E;e[24]!==i.slug?(E={org:i.slug,taskKey:void 0},e[24]=i.slug,e[25]=E):E=e[25];let C;e[26]!==k||e[27]!==E?(C={key:"tasks",label:k,icon:_,to:ee.tasks,params:E},e[26]=k,e[27]=E,e[28]=C):C=e[28];let I;e[29]!==s?(I=s("sidebar.navDestinations.library"),e[29]=s,e[30]=I):I=e[30];let O;e[31]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(_n,{}),e[31]=O):O=e[31];let $;e[32]!==m||e[33]!==I?($={key:"library",label:I,icon:O,to:ee.library,params:m},e[32]=m,e[33]=I,e[34]=$):$=e[34];let M;e[35]!==s?(M=s("sidebar.navDestinations.discover"),e[35]=s,e[36]=M):M=e[36];let te;e[37]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsx(fn,{}),e[37]=te):te=e[37];let Q;e[38]!==m||e[39]!==M?(Q={key:"discover",label:M,icon:te,to:ee.discover,params:m},e[38]=m,e[39]=M,e[40]=Q):Q=e[40];let U;e[41]!==N||e[42]!==C||e[43]!==$||e[44]!==Q||e[45]!==T?(U=[T,N,C,$,Q],e[41]=N,e[42]=C,e[43]=$,e[44]=Q,e[45]=T,e[46]=U):U=e[46];const X=U;let J;e[47]!==l||e[48]!==a?(J=L=>L?a(!0):l(),e[47]=l,e[48]=a,e[49]=J):J=e[49];let G;e[50]!==s?(G=s("commandPalette.title"),e[50]=s,e[51]=G):G=e[51];let q;e[52]!==s?(q=s("commandPalette.description"),e[52]=s,e[53]=q):q=e[53];let K;e[54]!==s?(K=s("commandPalette.placeholder"),e[54]=s,e[55]=K):K=e[55];let V;e[56]!==K||e[57]!==b?(V=n.jsx(Cn,{placeholder:K,value:b,onValueChange:j}),e[56]=K,e[57]=b,e[58]=V):V=e[58];let W;e[59]!==s?(W=s("commandPalette.empty"),e[59]=s,e[60]=W):W=e[60];let D;e[61]!==W?(D=n.jsx(En,{children:W}),e[61]=W,e[62]=D):D=e[62];let z;e[63]!==s?(z=s("commandPalette.goTo"),e[63]=s,e[64]=z):z=e[64];let le;e[65]!==X||e[66]!==d||e[67]!==r?(le=X.map(L=>n.jsxs(ie,{onSelect:()=>d(()=>r({to:L.to,params:L.params}),"destination"),children:[L.icon,n.jsx("span",{children:L.label})]},L.key)),e[65]=X,e[66]=d,e[67]=r,e[68]=le):le=e[68];let ce;e[69]!==z||e[70]!==le?(ce=n.jsx(We,{heading:z,children:le}),e[69]=z,e[70]=le,e[71]=ce):ce=e[71];let de;e[72]!==d||e[73]!==f||e[74]!==r||e[75]!==i.slug||e[76]!==u||e[77]!==s?(de=f&&n.jsx(We,{heading:s("commandPalette.projects"),children:u.map(L=>n.jsxs(ie,{value:`project ${L.title}`,onSelect:()=>d(()=>r({to:ee.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:L.id}}),"project"),children:[n.jsx(cn,{icon:L.icon,name:L.title,size:"2xs"}),n.jsx("span",{children:L.title})]},L.id))}),e[72]=d,e[73]=f,e[74]=r,e[75]=i.slug,e[76]=u,e[77]=s,e[78]=de):de=e[78];let ue;e[79]!==s?(ue=s("commandPalette.actions"),e[79]=s,e[80]=ue):ue=e[80];let me;e[81]!==s?(me=s("commandPalette.newProject"),e[81]=s,e[82]=me):me=e[82];let fe;e[83]!==d||e[84]!==r||e[85]!==i.slug?(fe=()=>d(()=>r({to:ee.agents,params:{org:i.slug,panel:void 0},search:{virtualmcpid:void 0}}),"new_project"),e[83]=d,e[84]=r,e[85]=i.slug,e[86]=fe):fe=e[86];let He;e[87]===Symbol.for("react.memo_cache_sentinel")?(He=n.jsx(dt,{}),e[87]=He):He=e[87];let ge;e[88]!==s?(ge=s("commandPalette.newProject"),e[88]=s,e[89]=ge):ge=e[89];let he;e[90]!==ge?(he=n.jsx("span",{children:ge}),e[90]=ge,e[91]=he):he=e[91];let pe;e[92]!==me||e[93]!==fe||e[94]!==he?(pe=n.jsxs(ie,{value:me,onSelect:fe,children:[He,he]}),e[92]=me,e[93]=fe,e[94]=he,e[95]=pe):pe=e[95];let ye;e[96]!==s?(ye=s("commandPalette.inviteTeammate"),e[96]=s,e[97]=ye):ye=e[97];let be;e[98]!==d||e[99]!==r||e[100]!==m?(be=()=>d(()=>r({to:"/$org/settings/members",params:m}),"invite"),e[98]=d,e[99]=r,e[100]=m,e[101]=be):be=e[101];let Ue;e[102]===Symbol.for("react.memo_cache_sentinel")?(Ue=n.jsx(gn,{}),e[102]=Ue):Ue=e[102];let xe;e[103]!==s?(xe=s("commandPalette.inviteTeammate"),e[103]=s,e[104]=xe):xe=e[104];let Se;e[105]!==xe?(Se=n.jsx("span",{children:xe}),e[105]=xe,e[106]=Se):Se=e[106];let we;e[107]!==ye||e[108]!==be||e[109]!==Se?(we=n.jsxs(ie,{value:ye,onSelect:be,children:[Ue,Se]}),e[107]=ye,e[108]=be,e[109]=Se,e[110]=we):we=e[110];let ve;e[111]!==s?(ve=s("commandPalette.addConnection"),e[111]=s,e[112]=ve):ve=e[112];let je;e[113]!==d||e[114]!==r||e[115]!==m?(je=()=>d(()=>r({to:"/$org/settings/connections",params:m,search:{tab:"all"}}),"add_connection"),e[113]=d,e[114]=r,e[115]=m,e[116]=je):je=e[116];let Je;e[117]===Symbol.for("react.memo_cache_sentinel")?(Je=n.jsx(dt,{}),e[117]=Je):Je=e[117];let ke;e[118]!==s?(ke=s("commandPalette.addConnection"),e[118]=s,e[119]=ke):ke=e[119];let Te;e[120]!==ke?(Te=n.jsx("span",{children:ke}),e[120]=ke,e[121]=Te):Te=e[121];let Ne;e[122]!==ve||e[123]!==je||e[124]!==Te?(Ne=n.jsxs(ie,{value:ve,onSelect:je,children:[Je,Te]}),e[122]=ve,e[123]=je,e[124]=Te,e[125]=Ne):Ne=e[125];let Ae;e[126]!==s?(Ae=s("commandPalette.settings"),e[126]=s,e[127]=Ae):Ae=e[127];let _e;e[128]!==d||e[129]!==r||e[130]!==m?(_e=()=>d(()=>r({to:"/$org/settings/general",params:m}),"settings"),e[128]=d,e[129]=r,e[130]=m,e[131]=_e):_e=e[131];let Ge;e[132]===Symbol.for("react.memo_cache_sentinel")?(Ge=n.jsx(Pn,{}),e[132]=Ge):Ge=e[132];let Pe;e[133]!==s?(Pe=s("commandPalette.settings"),e[133]=s,e[134]=Pe):Pe=e[134];let Ce;e[135]!==Pe?(Ce=n.jsx("span",{children:Pe}),e[135]=Pe,e[136]=Ce):Ce=e[136];let Ee;e[137]!==Ae||e[138]!==_e||e[139]!==Ce?(Ee=n.jsxs(ie,{value:Ae,onSelect:_e,children:[Ge,Ce]}),e[137]=Ae,e[138]=_e,e[139]=Ce,e[140]=Ee):Ee=e[140];let Oe;e[141]!==ue||e[142]!==pe||e[143]!==we||e[144]!==Ne||e[145]!==Ee?(Oe=n.jsxs(We,{heading:ue,children:[pe,we,Ne,Ee]}),e[141]=ue,e[142]=pe,e[143]=we,e[144]=Ne,e[145]=Ee,e[146]=Oe):Oe=e[146];let Ie;e[147]!==d||e[148]!==w||e[149]!==S||e[150]!==s?(Ie=w.length>0&&n.jsx(We,{heading:s("commandPalette.results"),children:w.map(L=>n.jsxs(ie,{value:`${L.title} ${L.id}`,onSelect:()=>d(()=>S(L),L.type),children:[L.type==="thread"?n.jsx(dn,{}):n.jsx(lt,{}),n.jsx("span",{className:"truncate",children:L.title}),L.type==="task"&&L.key&&n.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:L.key})]},`${L.type}:${L.id}`))}),e[147]=d,e[148]=w,e[149]=S,e[150]=s,e[151]=Ie):Ie=e[151];let Le;e[152]!==D||e[153]!==ce||e[154]!==de||e[155]!==Oe||e[156]!==Ie?(Le=n.jsxs(On,{children:[D,ce,de,Oe,Ie]}),e[152]=D,e[153]=ce,e[154]=de,e[155]=Oe,e[156]=Ie,e[157]=Le):Le=e[157];let Ve;return e[158]!==o||e[159]!==J||e[160]!==G||e[161]!==q||e[162]!==V||e[163]!==Le?(Ve=n.jsxs(In,{open:o,onOpenChange:J,title:G,description:q,shouldFilter:!1,children:[V,Le]}),e[158]=o,e[159]=J,e[160]=G,e[161]=q,e[162]=V,e[163]=Le,e[164]=Ve):Ve=e[164],Ve}const Fe=new Rn(!1);function Es(){Fe.set(!0)}function Os(){Fe.set(!1)}function Is(){const t=R.c(2),e=H.useSyncExternalStore(Fe.subscribe,Fe.get);let o;return t[0]!==e?(o=[e,Fe.set],t[0]=e,t[1]=o):o=t[1],o}const Ls=300*1e3,Ds=2;function $s(t,e,o){return!e||e===o?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function Rs(t,e){return t.count>=Ds&&t.version!==null&&t.version!==e}function Ms(){const t=R.c(43),e=Y(),o=zn();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={mutationFn:Fs},t[0]=a):a=t[0];const s=qe(a);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:Be.appVersionCheck(),queryFn:zs,refetchInterval:Ls,refetchIntervalInBackground:!0,staleTime:0},t[1]=r):r=t[1];const{data:i,dataUpdatedAt:u}=Ke(r),[f,b]=H.useState(0);let j;t[2]===Symbol.for("react.memo_cache_sentinel")?(j={version:null,count:0},t[2]=j):j=t[2];const[c,w]=H.useState(j);u!==f&&(b(u),w(M=>$s(M,i,"4.321.5")));const[p,l]=H.useState(null),g=o;let d;t[3]!==o||t[4]!==s?(d=()=>window.location.reload(),t[3]=o,t[4]=s,t[5]=d):d=t[5];const x=d,S="announcements.version.refresh";if(!Rs(c,p))return null;let y;t[6]!==e?(y=e("announcements.version.ariaLabel"),t[6]=e,t[7]=y):y=t[7];let m;t[8]!==e?(m=e("announcements.version.dismiss"),t[8]=e,t[9]=m):m=t[9];let A;t[10]!==e?(A=e("announcements.version.eyebrow"),t[10]=e,t[11]=A):A=t[11];let P;t[12]!==e?(P=e("announcements.version.title"),t[12]=e,t[13]=P):P=t[13];const T="announcements.version.description";let v;t[14]!==e||t[15]!==T?(v=e(T),t[14]=e,t[15]=T,t[16]=v):v=t[16];let h;t[17]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(at,{size:16}),t[17]=h):h=t[17];let N;t[18]!==c.version?(N=()=>l(c.version),t[18]=c.version,t[19]=N):N=t[19];let k;t[20]!==e?(k=e("announcements.version.currentSession",{version:"4.321.5"}),t[20]=e,t[21]=k):k=t[21];let _;t[22]!==S||t[23]!==e?(_=e(S),t[22]=S,t[23]=e,t[24]=_):_=t[24];const E=g;let C;t[25]!==E?(C=et(E),t[25]=E,t[26]=C):C=t[26];let I;t[27]!==C?(I=n.jsx(at,{size:14,className:C}),t[27]=C,t[28]=I):I=t[28];let O;t[29]!==x||t[30]!==g||t[31]!==_||t[32]!==I?(O=n.jsxs(F,{size:"sm",disabled:g,onClick:x,children:[_,I]}),t[29]=x,t[30]=g,t[31]=_,t[32]=I,t[33]=O):O=t[33];let $;return t[34]!==N||t[35]!==k||t[36]!==O||t[37]!==y||t[38]!==m||t[39]!==A||t[40]!==P||t[41]!==v?($=n.jsx(At,{ariaLabel:y,dismissLabel:m,eyebrow:A,title:P,description:v,icon:h,tone:"system",onDismiss:N,footerLeading:k,actions:O}),t[34]=N,t[35]=k,t[36]=O,t[37]=y,t[38]=m,t[39]=A,t[40]=P,t[41]=v,t[42]=$):$=t[42],$}async function zs(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}async function Fs(){const t=await fetch("/_local/update/restart",{method:"POST"});if(!t.ok)throw new Error(`restart failed: ${t.status}`)}function qs(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const Ks=Date.parse("2026-07-21T00:00:00Z"),ht=t=>qs(De.ptBrAnnouncementSeen(t));function Bs(){const t=R.c(35),e=Y(),[o,a]=Kt(),{data:s,isPending:r}=$e.useSession(),i=s?.user,u=i?.id,f=i?.createdAt,b=f!=null&&new Date(f).getTime()<Ks,j=Bt()==="pt-BR",c=!r&&!!u&&b&&j&&o.language==="en"&&!ht(u).has(),[w,p]=H.useState(!1),[l,g]=H.useState(!1);!w&&!r&&(p(!0),c&&u&&(ht(u).mark(),a(Us),g(!0),tt("pt_br_auto_switch_shown")));let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=te=>{tt("pt_br_auto_switch_closed",{action:te}),g(!1)},t[0]=d):d=t[0];const x=d;let S;t[1]!==a?(S=()=>{a(Hs),x("switch-back")},t[1]=a,t[2]=S):S=t[2];const y=S;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=te=>!te&&x("dismiss"),t[3]=m):m=t[3];let A;t[4]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=A):A=t[4];let P;t[5]!==e?(P=e("announcements.ptBr.title"),t[5]=e,t[6]=P):P=t[6];let T;t[7]!==P?(T=n.jsx(jt,{children:P}),t[7]=P,t[8]=T):T=t[8];let v;t[9]!==e?(v=e("announcements.ptBr.description"),t[9]=e,t[10]=v):v=t[10];let h;t[11]!==v?(h=n.jsx(Nn,{children:v}),t[11]=v,t[12]=h):h=t[12];let N;t[13]!==T||t[14]!==h?(N=n.jsxs(vt,{children:[T,h]}),t[13]=T,t[14]=h,t[15]=N):N=t[15];let k;t[16]!==e?(k=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=k):k=t[17];let _;t[18]!==y||t[19]!==k?(_=n.jsx(F,{variant:"outline",onClick:y,children:k}),t[18]=y,t[19]=k,t[20]=_):_=t[20];let E;t[21]===Symbol.for("react.memo_cache_sentinel")?(E=()=>x("ok"),t[21]=E):E=t[21];let C;t[22]!==e?(C=e("announcements.ptBr.ok"),t[22]=e,t[23]=C):C=t[23];let I;t[24]!==C?(I=n.jsx(F,{onClick:E,children:C}),t[24]=C,t[25]=I):I=t[25];let O;t[26]!==_||t[27]!==I?(O=n.jsxs(An,{children:[_,I]}),t[26]=_,t[27]=I,t[28]=O):O=t[28];let $;t[29]!==O||t[30]!==N?($=n.jsxs(kt,{className:"sm:max-w-md",children:[A,N,O]}),t[29]=O,t[30]=N,t[31]=$):$=t[31];let M;return t[32]!==l||t[33]!==$?(M=n.jsx(Tt,{open:l,onOpenChange:m,children:$}),t[32]=l,t[33]=$,t[34]=M):M=t[34],M}function Hs(t){return{...t,language:"en"}}function Us(t){return{...t,language:"pt-BR"}}function Js(t){const e=Ht(t);return typeof e=="string"?e:void 0}function Gs(){return Js("experiment-pipeline-check"),null}function Vs(t){const e=R.c(1),{activeOrg:o}=t;if(!o)return null;Ut(o.id,{name:o.name??void 0,slug:o.slug??void 0}),Jt();let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Gs,{}),e[0]=a):a=e[0],a}function Ws(t){const{prev:e,virtualMcpId:o,decopilotId:a,savedLayout:s,opts:r,autosendValue:i}=t,u={mainpanel:void 0};o?u.virtualmcpid=o:e.virtualmcpid&&(u.virtualmcpid=e.virtualmcpid);const f=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,j=(o??f)!==f;let c,w;return r?.panel?w=r.panel:s?(w=s.tab,s.sidepanel!==void 0&&(c=s.sidepanel),s.mainpanel!==void 0&&(u.mainpanel=s.mainpanel)):!j&&e.tabId&&!Gt(e.tabId)&&(w=e.tabId),c!==void 0&&(u.sidepanel=c),r?.autosend&&(u.autosend=i),{tabId:w,search:u}}const It="studio:thread-layout:v3",Ys=50;function Lt(t){const e={};return t===null||typeof t!="object"||(typeof t.tab=="string"&&(e.tab=t.tab),typeof t.mainpanel=="boolean"&&(e.mainpanel=t.mainpanel),typeof t.sidepanel=="boolean"&&(e.sidepanel=t.sidepanel)),e}function Qs(t,e,o,a=Ys){const s=t.filter(([r])=>r!==e);for(s.push([e,Lt(o)]);s.length>a;)s.shift();return s}function it(){try{const t=sessionStorage.getItem(It);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(o=>Array.isArray(o)&&o.length===2&&typeof o[0]=="string"):[]}catch{return[]}}function Dt(t){try{sessionStorage.setItem(It,JSON.stringify(t))}catch{}}function Xs(t,e){t&&Dt(Qs(it(),t,e))}function Zs(t){if(!t)return null;const e=it().find(([o])=>o===t);return e?Lt(e[1]):null}function zo(t){if(!t)return;const e=it(),o=e.filter(([a])=>a!==t);o.length!==e.length&&Dt(o)}function $t(t){return{queryKey:Be.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function Fo(t){const e=R.c(10);let o;e[0]!==t?(o=$t(t),e[0]=t,e[1]=o):o=e[1];const a=Ke(o);let s;e[2]!==a.data?.prompts?(s=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=s):s=e[3];let r;e[4]!==a.data?.tiles?(r=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=r):r=e[5];let i;return e[6]!==a.isLoading||e[7]!==s||e[8]!==r?(i={isLoading:a.isLoading,prompts:s,tiles:r},e[6]=a.isLoading,e[7]=s,e[8]=r,e[9]=i):i=e[9],i}function eo(t){const e=R.c(31),{orgSlug:o,orgName:a,domain:s}=t,r=Y();let i;e[0]!==o?(i=()=>{window.location.href=`/api/${encodeURIComponent(o)}/sso/authorize`},e[0]=o,e[1]=i):i=e[1];const u=i,f=to;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:n.jsx(pt,{className:"h-6 w-6 text-primary"})}),e[2]=b):b=e[2];let j;e[3]!==r?(j=r("common.ssoRequiredScreen.title"),e[3]=r,e[4]=j):j=e[4];let c;e[5]!==j?(c=n.jsx("h3",{className:"text-lg font-medium",children:j}),e[5]=j,e[6]=c):c=e[6];let w;e[7]!==s||e[8]!==a||e[9]!==r?(w=a?n.jsxs(n.Fragment,{children:[n.jsx("strong",{children:a})," ",r("common.ssoRequiredScreen.requiresSsoAuth"),s?` ${r("common.ssoRequiredScreen.via",{domain:s})}`:"","."]}):r("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=s,e[8]=a,e[9]=r,e[10]=w):w=e[10];let p;e[11]!==w?(p=n.jsx("p",{className:"text-sm text-muted-foreground",children:w}),e[11]=w,e[12]=p):p=e[12];let l;e[13]!==c||e[14]!==p?(l=n.jsxs("div",{className:"space-y-2",children:[c,p]}),e[13]=c,e[14]=p,e[15]=l):l=e[15];let g;e[16]!==r?(g=r("common.ssoRequiredScreen.signInWithSso"),e[16]=r,e[17]=g):g=e[17];let d;e[18]!==u||e[19]!==g?(d=n.jsx(F,{onClick:u,children:g}),e[18]=u,e[19]=g,e[20]=d):d=e[20];let x;e[21]!==r?(x=r("common.ssoRequiredScreen.goBack"),e[21]=r,e[22]=x):x=e[22];let S;e[23]!==x?(S=n.jsx(F,{variant:"ghost",onClick:f,children:x}),e[23]=x,e[24]=S):S=e[24];let y;e[25]!==S||e[26]!==d?(y=n.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[d,S]}),e[25]=S,e[26]=d,e[27]=y):y=e[27];let m;return e[28]!==y||e[29]!==l?(m=n.jsxs(Re,{children:[b,l,y]}),e[28]=y,e[29]=l,e[30]=m):m=e[30],m}function to(){window.location.href="/"}function no(t){const e=R.c(8),{org:o,children:a}=t,r=qn(o.id,o.slug)?.enabled_plugins??null;let i;e[0]!==o.id||e[1]!==o.name||e[2]!==r?(i={id:o.id,organizationId:o.id,slug:"_org",name:o.name,enabledPlugins:r,ui:null},e[0]=o.id,e[1]=o.name,e[2]=r,e[3]=i):i=e[3];const u=i;let f;return e[4]!==a||e[5]!==o||e[6]!==u?(f=n.jsx(nn,{org:o,project:u,children:a}),e[4]=a,e[5]=o,e[6]=u,e[7]=f):f=e[7],f}function so(){const t=bt(),e=Mn(),{org:o}=ot(),a=Vt({strict:!1}),s=wt(),{openPanel:r,closePanel:i}=Tn(),u=yn(),f=bn(),b=xn(),j=Sn(),c=(g,d=!0)=>t({to:".",search:g,replace:d}),w=()=>c(g=>({...g,sidepanel:!0})),p=(g,d,x)=>{const S=!!f&&f===g;f&&!S&&Xs(f,{tab:s,mainpanel:a.mainpanel,sidepanel:a.sidepanel});const y=S?null:Zs(g),m=$n(o.id).id,A=Ws({prev:{virtualmcpid:u,tabId:s},virtualMcpId:d,decopilotId:m,savedLayout:y,opts:x,autosendValue:wn});return j(g,()=>A.search,{virtualMcpId:d,view:{tabId:A.tabId}})};return{openSidePanel:w,setTaskId:p,createNewTask:async(g,d,x)=>{const S=crypto.randomUUID(),y=g??b;try{await e?.create({id:S,virtual_mcp_id:y,...d?{branch:d}:{}})}catch{}p(S,y,x)},openTab:r,closeTab:i}}const oo=new Set(["/$org/","/$org/home"]);function io(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:ao},t[0]=e):e=t[0],Zt(e)}function ao(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&oo.has(e)}function ro(){const t=R.c(55);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const a=Wt(e)?.params.org,[s,r]=H.useState(!1),[i,u]=Is(),f=Yt(),b=io(),j=a??"";let c;t[1]!==j?(c=$t(j),t[1]=j,t[2]=c):c=t[2];const w=!!a&&b;let p;t[3]!==c||t[4]!==w?(p={...c,enabled:w},t[3]=c,t[4]=w,t[5]=p):p=t[5],Ke(p);const{data:l}=$e.useSession(),g=l?.user?.id;let d;t[6]!==a||t[7]!==g?(d=a&&g?Qt(g,a):null,t[6]=a,t[7]=g,t[8]=d):d=t[8];const x=d;let S,y;t[9]!==f?(S=()=>{const D=z=>{if(ft(z)&&z.code==="KeyK"){z.preventDefault(),Es();return}if(z.key==="?"&&!ks(z.target)){z.preventDefault(),r(!0);return}ft(z)&&z.code==="BracketLeft"&&f.history.canGoBack()&&(z.preventDefault(),f.history.back())};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},y=[f],t[9]=f,t[10]=S,t[11]=y):(S=t[10],y=t[11]),H.useEffect(S,y);let m;t[12]!==a?(m=Be.activeOrganization(a),t[12]=a,t[13]=m):m=t[13];let A;t[14]!==a||t[15]!==g?(A=async()=>{if(!a)return null;performance.mark("mesh:active-org-fetch:start");const{data:D}=await $e.organization.getFullOrganization({query:{organizationSlug:a}}).finally(lo),z=Xe(D);return D&&!z&&localStorage.setItem(De.lastOrgSlug(),a),g&&D&&en(g,a,D),D},t[14]=a,t[15]=g,t[16]=A):A=t[16];const P=x?x.data:void 0,T=x?.updatedAt;let v;t[17]!==P||t[18]!==T||t[19]!==m||t[20]!==A?(v={queryKey:m,queryFn:A,initialData:P,initialDataUpdatedAt:T,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=P,t[18]=T,t[19]=m,t[20]=A,t[21]=v):v=t[21];const{data:h}=yt(v),N=h?.id,k=h?.slug,{data:_}=Kn(N,k),E=!!_?.ssoRequired&&!_.authenticated,C=N??"",I=k??"";let O;t[22]!==C||t[23]!==I?(O=Dn({connectionId:Nt,orgId:C,orgSlug:I}),t[22]=C,t[23]=I,t[24]=O):O=t[24];const $=!!N&&!!k;let M;if(t[25]!==O||t[26]!==$?(M={...O,enabled:$},t[25]=O,t[26]=$,t[27]=M):M=t[27],Ke(M),(!h||Xe(h)||E)&&Os(),!h){let D;return t[28]!==a?(D=n.jsx(Zn,{orgSlug:a}),t[28]=a,t[29]=D):D=t[29],D}if(Xe(h)){localStorage.getItem(De.lastOrgSlug())===a&&localStorage.removeItem(De.lastOrgSlug());let D;return t[30]!==h.name?(D=n.jsx(Xt,{orgName:h.name}),t[30]=h.name,t[31]=D):D=t[31],D}if(E){let D;return t[32]!==h.id||t[33]!==h.name||t[34]!==h.slug||t[35]!==_.domain?(D=n.jsx(eo,{orgId:h.id,orgSlug:h.slug,orgName:h.name,domain:_.domain}),t[32]=h.id,t[33]=h.name,t[34]=h.slug,t[35]=_.domain,t[36]=D):D=t[36],D}const Q=h.logo??null;let U;t[37]!==h||t[38]!==Q?(U={...h,logo:Q},t[37]=h,t[38]=Q,t[39]=U):U=t[39];let X;t[40]!==h?(X=n.jsx(Vs,{activeOrg:h}),t[40]=h,t[41]=X):X=t[41];let J;t[42]===Symbol.for("react.memo_cache_sentinel")?(J=n.jsx(tn,{}),t[42]=J):J=t[42];let G;t[43]===Symbol.for("react.memo_cache_sentinel")?(G=n.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[n.jsx(ws,{}),n.jsx(Ms,{})]}),t[43]=G):G=t[43];let q;t[44]!==i||t[45]!==u?(q=i&&n.jsx(Cs,{open:i,onOpenChange:u}),t[44]=i,t[45]=u,t[46]=q):q=t[46];let K;t[47]!==s?(K=n.jsx(Ts,{open:s,onOpenChange:r}),t[47]=s,t[48]=K):K=t[48];let V;t[49]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(Bs,{}),t[49]=V):V=t[49];let W;return t[50]!==U||t[51]!==X||t[52]!==q||t[53]!==K?(W=n.jsxs(no,{org:U,children:[X,J,G,q,K,V]}),t[50]=U,t[51]=X,t[52]=q,t[53]=K,t[54]=W):W=t[54],W}function lo(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function co(){const t=R.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Fn,{children:n.jsx(ro,{})}),t[0]=e):e=t[0],e}const qo=Object.freeze(Object.defineProperty({__proto__:null,default:co,usePanelActions:so},Symbol.toStringTag,{value:"Module"}));export{B as K,ft as a,Fo as b,qo as c,zo as f,Pt as i,Es as o,Ro as r,Mo as s,so as u};
@@ -1,4 +1,4 @@
1
- import{c as b,v as Q,j as r,h as Z,B as U,b6 as g,r as ee,l as M,ap as O}from"./index-CW6L2S49.js";import{b as te,D as se,d as ne,i as re}from"./dialog-lVg2I_FW.js";import{i as ie}from"./Zap-BwqaqJR6.js";import{M as H}from"./markdown-BiJIqYGv.js";import{n as le}from"./Download01-AtmH14NN.js";import{k as K,b as oe,l as ae,p as ce}from"./folder-icon-DoL1wgM6.js";import{a as $,s as fe,i as R}from"./ZoomOut-DL9fn9Rn.js";import{a as de}from"./Image01-CGO7yG2R.js";import{F as me}from"./editor-DHSROqSc.js";import{F as q}from"./file-type-icon-iSdqxvCJ.js";import{p as ue,b as j}from"./location-oTTXFrSF.js";function he(s){if(!s||s.includes("\\")||s.includes("..")||s.includes("\0"))return!0;try{const e=decodeURIComponent(s);return!!(e.includes("\\")||e.includes("..")||e.includes("\0"))}catch{return!0}}function pe(s){if(he(s))throw new Error(`Invalid block key: ${s||"(empty)"}`)}function xe(s){try{return decodeURIComponent(s)}catch{return s}}function ge(s){return pe(s),encodeURIComponent(s)}function Ae(s){return`.deco/blocks/${ge(s)}.json`}const He=1e4,we=3;function B(s){return s.trim()?(s.startsWith("/")?s:`/${s}`).replace(/\/+/g,"/"):"/"}function _(s){return s.startsWith("/")?s.slice(1):s}function Ke(s){const e=_(s);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}function W(s){return s.trim()?s.startsWith("/")?s:`/${s}`:"/"}function je(s){const e=W(s);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function qe(s,e){const t=e.replace(/^\/+|\/+$/g,"");return W(t?`${s==="/"?"":s}/${t}`:s)}function Ve(s,e){return e==="directory"?s:je(s)}function Ye(s){const e=s.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function be(s){const e=_(s);return e?e.split("/").filter(Boolean).length:0}function Je(s,e,t,i=!1){return{files:[...new Set([...s,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:i||!!t.truncated}}function Qe(s,e){return be(s)>=we&&!e.has(s)}function Ze(s,e,t=[]){const i=_(s);if(e.includes(i)||t.includes(i))return!0;if(!i)return!1;const n=`${i}/`;return e.some(o=>o.startsWith(n))||t.some(o=>o.startsWith(n))}function et(s){const e=_(s),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const i=e.slice(t.length,-5);return xe(i)}function ve(s){if(!s)return"plaintext";const e=s.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}const ye="#94a3b8";function tt(s){const e=s.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:$,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:$,color:"#d9a441"}:e.endsWith(".json")?{Icon:fe,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:$,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:$,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:de,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:R,color:"#64748b"}:{Icon:R,color:ye}}function st(s){const e=B(s).split("/").filter(Boolean),t=["/"];let i="";for(const n of e.slice(0,-1))i+=`/${n}`,t.push(i);return t}function nt(s,e=[]){const t={path:"/",children:[]},i=new Map,n=c=>{let l=i.get(c.path);return l||(l=new Map,i.set(c.path,l)),l},o=c=>{const f=B(c).split("/").filter(Boolean);let d=t,u="";for(const m of f){u+=`/${m}`;const v=n(d);let h=v.get(m);h?h.kind==="file"&&(h.kind="directory"):(h={name:m,path:u,kind:"directory",children:[]},d.children.push(h),v.set(m,h)),d=h}};for(const c of s){const f=B(c).split("/").filter(Boolean);let d=t,u="";f.forEach((m,v)=>{u+=`/${m}`;const h=v===f.length-1,w=n(d);let x=w.get(m);x||(x={name:m,path:u,kind:h?"file":"directory",children:[]},d.children.push(x),w.set(m,x)),d=x})}for(const c of e)o(W(c));const a=c=>{c.sort((l,f)=>l.kind!==f.kind?l.kind==="directory"?-1:1:l.name.localeCompare(f.name));for(const l of c)l.children.length>0&&a(l.children)};return a(t.children),t.children}function ke(s,e,t=0){const i=[];for(const n of s)if(n.name!==".gitkeep"&&(i.push({node:n,depth:t}),n.kind==="directory"&&n.children.length>0&&e.has(n.path)))for(const o of ke(n.children,e,t+1))i.push(o);return i}function rt(s){const e=[];for(const t of s.split(`
1
+ import{c as b,v as Q,j as r,h as Z,B as U,b6 as g,r as ee,l as M,ap as O}from"./index-Ds9_YQQm.js";import{b as te,D as se,d as ne,i as re}from"./dialog-B49rrPcE.js";import{i as ie}from"./Zap-BxV_wNn9.js";import{M as H}from"./markdown-Bj8bPaFr.js";import{n as le}from"./Download01-hGLAd0mm.js";import{k as K,b as oe,l as ae,p as ce}from"./folder-icon-CrwX1TKL.js";import{a as $,s as fe,i as R}from"./ZoomOut-CXTlcyBa.js";import{a as de}from"./Image01-Db6iL1L-.js";import{F as me}from"./editor-BCbV0AET.js";import{F as q}from"./file-type-icon-DOGxWp7T.js";import{p as ue,b as j}from"./location-oTTXFrSF.js";function he(s){if(!s||s.includes("\\")||s.includes("..")||s.includes("\0"))return!0;try{const e=decodeURIComponent(s);return!!(e.includes("\\")||e.includes("..")||e.includes("\0"))}catch{return!0}}function pe(s){if(he(s))throw new Error(`Invalid block key: ${s||"(empty)"}`)}function xe(s){try{return decodeURIComponent(s)}catch{return s}}function ge(s){return pe(s),encodeURIComponent(s)}function Ae(s){return`.deco/blocks/${ge(s)}.json`}const He=1e4,we=3;function B(s){return s.trim()?(s.startsWith("/")?s:`/${s}`).replace(/\/+/g,"/"):"/"}function _(s){return s.startsWith("/")?s.slice(1):s}function Ke(s){const e=_(s);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}function W(s){return s.trim()?s.startsWith("/")?s:`/${s}`:"/"}function je(s){const e=W(s);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function qe(s,e){const t=e.replace(/^\/+|\/+$/g,"");return W(t?`${s==="/"?"":s}/${t}`:s)}function Ve(s,e){return e==="directory"?s:je(s)}function Ye(s){const e=s.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function be(s){const e=_(s);return e?e.split("/").filter(Boolean).length:0}function Je(s,e,t,i=!1){return{files:[...new Set([...s,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:i||!!t.truncated}}function Qe(s,e){return be(s)>=we&&!e.has(s)}function Ze(s,e,t=[]){const i=_(s);if(e.includes(i)||t.includes(i))return!0;if(!i)return!1;const n=`${i}/`;return e.some(o=>o.startsWith(n))||t.some(o=>o.startsWith(n))}function et(s){const e=_(s),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const i=e.slice(t.length,-5);return xe(i)}function ve(s){if(!s)return"plaintext";const e=s.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}const ye="#94a3b8";function tt(s){const e=s.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:$,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:$,color:"#d9a441"}:e.endsWith(".json")?{Icon:fe,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:$,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:$,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:de,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:R,color:"#64748b"}:{Icon:R,color:ye}}function st(s){const e=B(s).split("/").filter(Boolean),t=["/"];let i="";for(const n of e.slice(0,-1))i+=`/${n}`,t.push(i);return t}function nt(s,e=[]){const t={path:"/",children:[]},i=new Map,n=c=>{let l=i.get(c.path);return l||(l=new Map,i.set(c.path,l)),l},o=c=>{const f=B(c).split("/").filter(Boolean);let d=t,u="";for(const m of f){u+=`/${m}`;const v=n(d);let h=v.get(m);h?h.kind==="file"&&(h.kind="directory"):(h={name:m,path:u,kind:"directory",children:[]},d.children.push(h),v.set(m,h)),d=h}};for(const c of s){const f=B(c).split("/").filter(Boolean);let d=t,u="";f.forEach((m,v)=>{u+=`/${m}`;const h=v===f.length-1,w=n(d);let x=w.get(m);x||(x={name:m,path:u,kind:h?"file":"directory",children:[]},d.children.push(x),w.set(m,x)),d=x})}for(const c of e)o(W(c));const a=c=>{c.sort((l,f)=>l.kind!==f.kind?l.kind==="directory"?-1:1:l.name.localeCompare(f.name));for(const l of c)l.children.length>0&&a(l.children)};return a(t.children),t.children}function ke(s,e,t=0){const i=[];for(const n of s)if(n.name!==".gitkeep"&&(i.push({node:n,depth:t}),n.kind==="directory"&&n.children.length>0&&e.has(n.path)))for(const o of ke(n.children,e,t+1))i.push(o);return i}function rt(s){const e=[];for(const t of s.split(`
2
2
  `)){if(!t)continue;const i=t.indexOf(":");if(i<0)continue;const n=t.indexOf(":",i+1);if(n<0)continue;const o=Number.parseInt(t.slice(i+1,n),10);Number.isFinite(o)&&e.push({path:W(t.slice(0,i)),line:o,text:t.slice(n+1)})}return e}function it(s,e,t){const i=e.trim().toLowerCase();if(!i)return[];const n=[];for(const o of s)if((o.split("/").pop()??o).toLowerCase().includes(i)&&(n.push(W(o)),n.length>=t))break;return n}const G=24;function lt(s,e){const t=s.replace(/^\s+/,""),i=e.trim().toLowerCase();if(!i)return{leadingEllipsis:!1,segments:[{text:t,match:!1}]};const n=t.toLowerCase().indexOf(i);if(n<0)return{leadingEllipsis:!1,segments:[{text:t,match:!1}]};const o=n>G,a=o?t.slice(n-G):t,c=a.toLowerCase(),l=[];let f=0;for(;;){const d=c.indexOf(i,f);if(d<0){f<a.length&&l.push({text:a.slice(f),match:!1});break}d>f&&l.push({text:a.slice(f,d),match:!1}),l.push({text:a.slice(d,d+i.length),match:!0}),f=d+i.length}return{leadingEllipsis:o,segments:l}}function ot(s){const e=[],t=new Map;for(const i of s){let n=t.get(i.path);n||(n={path:i.path,matches:[]},t.set(i.path,n),e.push(n)),n.matches.push(i)}return e}function at(s){return s.split(`
3
3
  `).map(e=>e.replace(/^\d+\t/,"")).join(`
4
4
  `)}function Ne(s){const e=b.c(11),{value:t,filename:i}=s,[n]=Q(),o=n.theme==="dark"||n.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let a;e[0]!==i?(a=ve(i),e[0]=i,e[1]=a):a=e[1];const c=o?"vs-dark":"light";let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsx(Z,{className:"size-5 text-muted-foreground"})}),e[2]=l):l=e[2];let f,d;e[3]===Symbol.for("react.memo_cache_sentinel")?(f={enabled:!1},d={top:12,bottom:12},e[3]=f,e[4]=d):(f=e[3],d=e[4]);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:f,padding:d,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=u):u=e[5];let m;return e[6]!==i||e[7]!==a||e[8]!==c||e[9]!==t?(m=r.jsx(me,{path:i,language:a,value:t,theme:c,loading:l,options:u},i),e[6]=i,e[7]=a,e[8]=c,e[9]=t,e[10]=m):m=e[10],m}function We(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`}const Se=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),Ce=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),X=2*1024*1024;function Ee(s,e){const t=s.split(".").pop()?.toLowerCase()??"";return Se.has(t)?"image":t==="pdf"?"pdf":t==="html"||t==="htm"?"html":t==="md"||t==="markdown"?e<=X?"markdown":"download":Ce.has(t)&&e<=X?"text":"download"}function Pe(){const s=b.c(2);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(g,{className:"h-6 w-2/3"}),s[0]=e):e=s[0];let t;return s[1]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,r.jsxs("div",{className:"flex flex-col gap-1.5",children:[r.jsx(g,{className:"h-3 w-full"}),r.jsx(g,{className:"h-3 w-5/6"}),r.jsx(g,{className:"h-3 w-2/3"})]})]})}),s[1]=t):t=s[1],t}function V(s){const e=b.c(20),{file:t,note:i}=s;let n;e[0]!==t.filename?(n=r.jsx(q,{filename:t.filename,className:"h-12 w-10"}),e[0]=t.filename,e[1]=n):n=e[1];let o;e[2]!==t.filename?(o=r.jsx("span",{className:"text-sm font-medium text-foreground",children:t.filename}),e[2]=t.filename,e[3]=o):o=e[3];let a;e[4]!==t.size?(a=We(t.size),e[4]=t.size,e[5]=a):a=e[5];const c=i?` · ${i}`:"";let l;e[6]!==a||e[7]!==c?(l=r.jsxs("span",{className:"text-xs text-muted-foreground",children:[a,c]}),e[6]=a,e[7]=c,e[8]=l):l=e[8];let f;e[9]!==o||e[10]!==l?(f=r.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[o,l]}),e[9]=o,e[10]=l,e[11]=f):f=e[11];let d;e[12]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(le,{size:14}),e[12]=d):d=e[12];let u;e[13]!==t.downloadUrl||e[14]!==t.filename?(u=r.jsx(U,{asChild:!0,variant:"outline",size:"sm",children:r.jsxs("a",{href:t.downloadUrl,download:t.filename,children:[d,"Download"]})}),e[13]=t.downloadUrl,e[14]=t.filename,e[15]=u):u=e[15];let m;return e[16]!==n||e[17]!==f||e[18]!==u?(m=r.jsx("div",{className:"flex h-full w-full items-center justify-center",children:r.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[n,f,u]})}),e[16]=n,e[17]=f,e[18]=u,e[19]=m):m=e[19],m}function A(s){const e=b.c(9),{file:t,markdown:i}=s,{data:n,isPending:o,isError:a}=K(t.downloadUrl);if(o){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(Pe,{}),e[0]=l):l=e[0],l}if(a||!n){let l;return e[1]!==t?(l=r.jsx(V,{file:t,note:"preview unavailable"}),e[1]=t,e[2]=l):l=e[2],l}if(i){const l=`file-preview-${t.key}`;let f;return e[3]!==n||e[4]!==l?(f=r.jsx("div",{className:"h-full overflow-y-auto",children:r.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:r.jsx(H,{id:l,text:n})})}),e[3]=n,e[4]=l,e[5]=f):f=e[5],f}let c;return e[6]!==n||e[7]!==t.filename?(c=r.jsx(Ne,{value:n,filename:t.filename}),e[6]=n,e[7]=t.filename,e[8]=c):c=e[8],c}function ze(s){const e=b.c(15),{file:t}=s;switch(Ee(t.filename,t.size)){case"image":{let n;return e[0]!==t.downloadUrl||e[1]!==t.filename?(n=r.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:r.jsx("img",{src:t.downloadUrl,alt:t.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=t.downloadUrl,e[1]=t.filename,e[2]=n):n=e[2],n}case"pdf":{let n;return e[3]!==t.downloadUrl||e[4]!==t.filename?(n=r.jsx("iframe",{src:t.downloadUrl,title:t.filename,className:"block h-full w-full bg-white"}),e[3]=t.downloadUrl,e[4]=t.filename,e[5]=n):n=e[5],n}case"html":{let n;return e[6]!==t.downloadUrl||e[7]!==t.filename?(n=r.jsx("iframe",{src:t.downloadUrl,title:t.filename,sandbox:"allow-scripts allow-downloads",className:"block h-full w-full bg-white"}),e[6]=t.downloadUrl,e[7]=t.filename,e[8]=n):n=e[8],n}case"markdown":{let n;return e[9]!==t?(n=r.jsx(A,{file:t,markdown:!0}),e[9]=t,e[10]=n):n=e[10],n}case"text":{let n;return e[11]!==t?(n=r.jsx(A,{file:t,markdown:!1}),e[11]=t,e[12]=n):n=e[12],n}default:{let n;return e[13]!==t?(n=r.jsx(V,{file:t}),e[13]=t,e[14]=n):n=e[14],n}}}function Fe(s){const e=b.c(18),{skillPath:t,onClose:i,variant:n}=s,o=ue(t),{volume:a,dirPath:c}=o,l=oe(),f=l(a??"",`${c}/SKILL.md`),d=K(f),u=ae(a??"",c);let m;e[0]!==c?(m=j(c),e[0]=c,e[1]=m):m=e[1];const v=m;let h;e[2]!==d.data?(h=d.data?ce(d.data):null,e[2]=d.data,e[3]=h):h=e[3];const w=h,x=$e;let C;e[4]===Symbol.for("react.memo_cache_sentinel")?(C=(p,S)=>x(p.path)?-1:x(S.path)?1:j(p.path).localeCompare(j(S.path)),e[4]=C):C=e[4];const D=(u.data??[]).filter(Le).sort(C),[I,Y]=ee.useState(null),y=I===null?null:D.find(p=>p.path===I)??null,E=w?.name??v;let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P=r.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:r.jsx(ie,{size:18})}),e[5]=P):P=e[5];let k;e[6]!==E||e[7]!==n?(k=n==="dialog"?r.jsx(ne,{className:"flex-1 truncate text-base font-medium text-foreground",children:E}):r.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:E}),e[6]=E,e[7]=n,e[8]=k):k=e[8];let N;e[9]!==i||e[10]!==n?(N=n==="dialog"?r.jsx(re,{asChild:!0,children:r.jsx(U,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:r.jsx(O,{size:16})})}):r.jsx(U,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:i,children:r.jsx(O,{size:16})}),e[9]=i,e[10]=n,e[11]=N):N=e[11];let z;e[12]!==k||e[13]!==N?(z=r.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[P,k,N]}),e[12]=k,e[13]=N,e[14]=z):z=e[14];let F;e[15]===Symbol.for("react.memo_cache_sentinel")?(F=r.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[15]=F):F=e[15];const J="relative flex min-w-0 flex-1 flex-col overflow-y-auto",T=y?r.jsx(ze,{file:{key:y.path,filename:j(y.path),size:y.size,downloadUrl:l(a??"",y.path)}}):d.isPending?r.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[r.jsx(g,{className:"h-4 w-1/3"}),r.jsx(g,{className:"h-3 w-full"}),r.jsx(g,{className:"h-3 w-5/6"}),r.jsx(g,{className:"h-3 w-2/3"})]}):d.isError||!w?r.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This skill is no longer available."}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex flex-col gap-4 border-b border-border p-6",children:[r.jsx("p",{className:"text-sm font-medium text-foreground",children:"Description"}),r.jsx("p",{className:"text-base text-muted-foreground",children:w.description??"Claude Code skill"})]}),r.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:r.jsx(H,{id:`skill-preview-${t}`,text:w.body})})]});let L;return e[16]!==T?(L=r.jsx("div",{className:J,children:T}),e[16]=T,e[17]=L):L=e[17],r.jsxs(r.Fragment,{children:[z,r.jsxs("div",{className:"flex min-h-0 flex-1",children:[r.jsxs("div",{className:"flex w-[220px] shrink-0 flex-col gap-1 overflow-y-auto border-r border-border bg-muted p-3",children:[F,u.isPending?r.jsx(g,{className:"mx-2 h-4 w-24"}):D.map(p=>{const S=x(p.path)?y===null:I===p.path;return r.jsxs("button",{type:"button",onClick:()=>Y(x(p.path)?null:p.path),className:M("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",S?"bg-background shadow-sm":"hover:bg-muted/60"),children:[r.jsx(q,{filename:j(p.path),className:"h-6 w-5 shrink-0"}),r.jsx("span",{className:M("truncate text-sm",S?"text-foreground":"text-muted-foreground"),children:j(p.path)})]},p.path)})]}),L]})]})}function Le(s){return s.kind==="file"}function $e(s){return j(s)==="SKILL.md"}function ct(s){const e=b.c(8),{skillPath:t,onClose:i}=s;let n;e[0]!==i?(n=c=>{c||i()},e[0]=i,e[1]=n):n=e[1];let o;e[2]!==i||e[3]!==t?(o=r.jsx(te,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",closeButtonClassName:"hidden",children:r.jsx(Fe,{skillPath:t,onClose:i,variant:"dialog"})}),e[2]=i,e[3]=t,e[4]=o):o=e[4];let a;return e[5]!==n||e[6]!==o?(a=r.jsx(se,{open:!0,onOpenChange:n,children:o}),e[5]=n,e[6]=o,e[7]=a):a=e[7],a}export{Je as A,we as E,Pe as F,ct as S,pe as a,ze as b,xe as c,Ae as d,He as e,We as f,ve as g,nt as h,Ke as i,ke as j,ot as k,Ve as l,W as m,tt as n,je as o,st as p,lt as q,Qe as r,at as s,_ as t,qe as u,Ye as v,Ze as w,it as x,rt as y,et as z};
@@ -1 +1 @@
1
- import{b as te,W as se,n as oe,r as T,j as t,B as Q,P as L,b6 as ae,C as ce,t as w,c as ie,l as de,K as H,b4 as me}from"./index-CW6L2S49.js";import{i as ue}from"./DotsVertical-PUVVFLTP.js";import{i as pe}from"./GitBranch01-BritbDKe.js";import{a as ge}from"./Package-BA5DvHbm.js";import{s as fe}from"./Trash01-DgYh1NxX.js";import{i as he}from"./Upload01-jkHCXrUI.js";import{i as le}from"./Zap-BwqaqJR6.js";import{S as xe}from"./search-input-B-_TRDC7.js";import{c as je,D as ke,b as ve,a as ye}from"./dropdown-menu-QVhpTnbw.js";import{A as Se,a as be,b as we,c as Ce,d as De,e as Ne,f as Pe,g as Ee}from"./alert-dialog-BwkydmfJ.js";import{E as J}from"./empty-state-BoTu9lkL.js";import{C as Ae}from"./collection-tabs-4YD6nwky.js";import{p as Te,q as Me,u as Ie,r as Oe,F as ze}from"./folder-icon-DoL1wgM6.js";import{H as V,d as $e}from"./location-oTTXFrSF.js";import{S as Fe}from"./skill-preview-Cq3_PFMf.js";import"./SearchMd-CQywkGC8.js";import"./Check-Bu3XsPtR.js";import"./ChevronRight-DuX1hKVe.js";import"./badge-C7G_dwIu.js";import"./Eye-Z_2DhwO_.js";import"./dialog-lVg2I_FW.js";import"./markdown-BiJIqYGv.js";import"./Copy01-BbXi4FYi.js";import"./Download01-AtmH14NN.js";import"./ZoomOut-DL9fn9Rn.js";import"./use-panel-navigate-fLU7dGE0.js";import"./use-destination-route-7JP5O6OJ.js";import"./Image01-CGO7yG2R.js";import"./editor-DHSROqSc.js";import"./file-type-icon-iSdqxvCJ.js";const Z=200,Re=new Set(["node_modules","__pycache__"]);function U(s){const[,...e]=s.webkitRelativePath.split("/");return e.length>0?e.join("/"):s.name}function Le(s){return U(s).split("/").every(e=>!e.startsWith(".")&&!Re.has(e))}function _e(s){return s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function Be(s,e){const l=new Map;for(const r of s){const c=U(r).split("/");c.pop();const a=["skills",e,...c].join("/");l.set(a,[...l.get(a)??[],r])}return l}async function Ke(s,e){const r=(await Promise.allSettled([...s].map(([c,a])=>e({dir:c,files:a})))).find(c=>c.status==="rejected");if(r)throw r.reason}function qe(s,e){const l=Te(e),r=`skills/${s}`;return{id:`home/${r}`,name:l.name??s,description:l.description,source:"home",volume:V,path:r,sandboxPath:`org/${V}/${r}`}}const _="*";function B(s){return s.volume==="home"}function re(s,e){const l=s.indexOf(":");return l===-1?{label:e,glyph:le}:{label:s.slice(l+1),glyph:s.startsWith("repo:")?pe:ge}}function He(s){const e=ie.c(48),{entry:l,pending:r,onOpen:c,onDelete:a}=s,o=te(),{org:u}=se();let C;e[0]!==l.source||e[1]!==u.name?(C=re(l.source,u.name),e[0]=l.source,e[1]=u.name,e[2]=C):C=e[2];const{label:M,glyph:O}=C;let D;e[3]!==l?(D=B(l),e[3]=l,e[4]=D):D=e[4];const z=D,N=r?"opacity-60":"hover:bg-muted/50";let f;e[5]!==N?(f=de("relative transition-colors group overflow-hidden flex flex-col h-full",N),e[5]=N,e[6]=f):f=e[6];let d;e[7]!==l.name||e[8]!==c||e[9]!==r?(d=!r&&t.jsx("button",{type:"button",onClick:c,className:"absolute inset-0 z-0","aria-label":l.name}),e[7]=l.name,e[8]=c,e[9]=r,e[10]=d):d=e[10];const P=z?"default":"system",$=!z;let h;e[11]!==O||e[12]!==P||e[13]!==$?(h=t.jsx(ze,{glyph:O,tone:P,readOnly:$,className:"size-8 shrink-0"}),e[11]=O,e[12]=P,e[13]=$,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==o?(x=a&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(je,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:t.jsx(ue,{size:16})})}),t.jsx(ve,{align:"end",children:t.jsxs(ye,{variant:"destructive",onClick:K=>{K.stopPropagation(),a()},children:[t.jsx(fe,{size:16}),o("settings.skills.deleteButton")]})})]})}),e[15]=a,e[16]=o,e[17]=x):x=e[17];let j;e[18]!==h||e[19]!==x?(j=t.jsxs("div",{className:"flex items-start justify-between",children:[h,x]}),e[18]=h,e[19]=x,e[20]=j):j=e[20];let b;e[21]!==l.name?(b=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.name}),e[21]=l.name,e[22]=b):b=e[22];let k;e[23]!==l.description||e[24]!==o?(k=l.description||o("settings.skills.noDescription"),e[23]=l.description,e[24]=o,e[25]=k):k=e[25];let m;e[26]!==k?(m=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:k}),e[26]=k,e[27]=m):m=e[27];let v;e[28]!==b||e[29]!==m?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[b,m]}),e[28]=b,e[29]=m,e[30]=v):v=e[30];let p;e[31]!==j||e[32]!==v?(p=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[j,v]}),e[31]=j,e[32]=v,e[33]=p):p=e[33];let y;e[34]!==M||e[35]!==r||e[36]!==o?(y=r?o("settings.skills.importing"):M,e[34]=M,e[35]=r,e[36]=o,e[37]=y):y=e[37];let g;e[38]!==y?(g=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y})})}),e[38]=y,e[39]=g):g=e[39];let S;e[40]!==p||e[41]!==g?(S=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[p,g]}),e[40]=p,e[41]=g,e[42]=S):S=e[42];let I;return e[43]!==r||e[44]!==S||e[45]!==f||e[46]!==d?(I=t.jsxs(me,{"aria-busy":r,className:f,children:[d,S]}),e[43]=r,e[44]=S,e[45]=f,e[46]=d,e[47]=I):I=e[47],I}function ee(s){const e=ie.c(2),{children:l}=s;let r;return e[0]!==l?(r=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:l}),e[0]=l,e[1]=r):r=e[1],r}function yt(){const s=te(),{org:e}=se(),l=Me(),{remove:r,upload:c}=Ie("home"),a=oe(),o=T.useRef(null),[u,C]=T.useState(""),[M,O]=T.useState(_),[D,z]=T.useState(!1),[N,f]=T.useState(null),[d,P]=T.useState(null),[$,h]=T.useState(null),x=()=>{a.invalidateQueries({queryKey:H.slashSkills(e.id)}),a.invalidateQueries({queryKey:H.orgFsSkills(e.id)})},j=i=>a.setQueryData(H.slashSkills(e.id),n=>i(n??[]));async function b(i){const n=[...i??[]];if(o.current&&(o.current.value=""),n.length===0)return;const E=n[0]?.webkitRelativePath??"";if(!E){w.error(s("settings.skills.importNeedsFolder"));return}const q=E.split("/")[0]??"",R=n.filter(Le),G=R.find(A=>U(A)==="SKILL.md");if(!G){w.error(s("settings.skills.importMissingSkillMd"));return}if(R.length>Z){w.error(s("settings.skills.importTooManyFiles",{count:String(R.length),max:String(Z)}));return}const F=_e(q),X=`skills/${F}`;let Y=!1;z(!0);try{if(await Oe(e.slug,"home",X)){w.error(s("settings.skills.importSlugTaken",{slug:F}));return}Y=!0;const A=qe(F,await G.text());j(ne=>[A,...ne]),h(A.id),await Ke(Be(R,F),c.mutateAsync),w.success(s("settings.skills.importSuccess",{name:F}))}catch(A){Y&&await r.mutateAsync(X).catch(()=>{}),w.error(A instanceof Error?A.message:s("settings.skills.importError"))}finally{h(null),x(),z(!1)}}const k=u.toLowerCase(),m=(l.data??[]).filter(i=>i.name.toLowerCase().includes(k)||(i.description??"").toLowerCase().includes(k)).sort((i,n)=>Number(B(n))-Number(B(i))||i.name.localeCompare(n.name)),v=new Set((l.data??[]).map(i=>i.source)),p=new Map;for(const i of m)p.set(i.source,(p.get(i.source)??0)+1);const y=[{id:_,label:s("settings.skills.filterAll"),count:m.length},...[...v].map(i=>({id:i,label:re(i,e.name).label,count:p.get(i)??0}))],g=v.has(M)?M:_,S=g===_?m:m.filter(i=>i.source===g),I=i=>f($e(i.volume,i.path)),K=async()=>{if(!d)return;const{id:i,path:n}=d;P(null),j(E=>E.filter(q=>q.id!==i));try{await r.mutateAsync(n),w.success(s("settings.skills.deleteSuccess"))}catch(E){w.error(E instanceof Error?E.message:s("settings.skills.deleteError"))}finally{x()}},W=t.jsxs(Q,{size:"sm",disabled:D,onClick:()=>o.current?.click(),children:[t.jsx(he,{size:14}),s(D?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs(L,{children:[t.jsx(L.Content,{children:t.jsx(L.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(L.Title,{children:s("settings.skills.pageTitle")}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx(xe,{value:u,onChange:C,placeholder:s("settings.skills.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:i=>{i.key==="Escape"&&(C(""),i.target.blur())}}),W,t.jsx("input",{ref:o,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:i=>{b(i.target.files)}})]}),y.length>2&&t.jsx(Ae,{tabs:y,activeTab:g,onTabChange:O}),l.isPending?t.jsx("div",{className:"@container",children:t.jsx(ee,{children:Array.from({length:8},(i,n)=>t.jsx(ae,{className:"h-[168px] rounded-xl"},n))})}):l.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(J,{image:t.jsx(ce,{size:48,className:"text-muted-foreground"}),title:s("settings.skills.errorTitle"),description:l.error instanceof Error?l.error.message:s("settings.skills.errorDescription"),actions:t.jsx(Q,{size:"sm",variant:"outline",onClick:()=>{l.refetch()},children:s("settings.skills.retry")})})}):S.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(J,{image:t.jsx(le,{size:48,className:"text-muted-foreground"}),title:s(u?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:u?s("settings.skills.noResultsDescription",{search:u}):s("settings.skills.emptyDescription"),actions:!u&&W})}):t.jsx("div",{className:"@container",children:t.jsx(ee,{children:S.map(i=>{const n=i.id===$;return t.jsx(He,{entry:i,pending:n,onOpen:()=>I(i),onDelete:B(i)&&!n?()=>P(i):void 0},i.id)})})})]})})}),N&&t.jsx(Fe,{skillPath:N,onClose:()=>f(null)},N),t.jsx(Se,{open:d!==null,onOpenChange:i=>!i&&P(null),children:t.jsxs(be,{children:[t.jsxs(we,{children:[t.jsx(Ce,{children:s("settings.skills.deleteDialogTitle")}),t.jsx(De,{children:s("settings.skills.deleteDialogDescription",{name:d?.name??""})})]}),t.jsxs(Ne,{children:[t.jsx(Pe,{children:s("settings.skills.cancel")}),t.jsx(Ee,{onClick:K,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.skills.deleteButton")})]})]})})]})}export{yt as default};
1
+ import{b as te,W as se,n as oe,r as T,j as t,B as Q,P as L,b6 as ae,C as ce,t as w,c as ie,l as de,K as H,b4 as me}from"./index-Ds9_YQQm.js";import{i as ue}from"./DotsVertical-D1_N6gFC.js";import{i as pe}from"./GitBranch01-CfKitZQX.js";import{a as ge}from"./Package-sAm7St0O.js";import{s as fe}from"./Trash01-DXHCqEe6.js";import{i as he}from"./Upload01-CPO6AwG4.js";import{i as le}from"./Zap-BxV_wNn9.js";import{S as xe}from"./search-input-CfcUKbcR.js";import{c as je,D as ke,b as ve,a as ye}from"./dropdown-menu-DIF5PQaU.js";import{A as Se,a as be,b as we,c as Ce,d as De,e as Ne,f as Pe,g as Ee}from"./alert-dialog-C2u5xYM5.js";import{E as J}from"./empty-state-BJDGKBD3.js";import{C as Ae}from"./collection-tabs-D9skai09.js";import{p as Te,q as Me,u as Ie,r as Oe,F as ze}from"./folder-icon-CrwX1TKL.js";import{H as V,d as $e}from"./location-oTTXFrSF.js";import{S as Fe}from"./skill-preview-BgXO28GZ.js";import"./SearchMd-DjN-DKoK.js";import"./Check-D5XzCZva.js";import"./ChevronRight-BkCMOd4C.js";import"./badge-BlkJw9ZT.js";import"./Eye-msF77noH.js";import"./dialog-B49rrPcE.js";import"./markdown-Bj8bPaFr.js";import"./Copy01-D5UYujbX.js";import"./Download01-hGLAd0mm.js";import"./ZoomOut-CXTlcyBa.js";import"./use-panel-navigate-Dev670TY.js";import"./use-destination-route-DzHgzZDH.js";import"./Image01-Db6iL1L-.js";import"./editor-BCbV0AET.js";import"./file-type-icon-DOGxWp7T.js";const Z=200,Re=new Set(["node_modules","__pycache__"]);function U(s){const[,...e]=s.webkitRelativePath.split("/");return e.length>0?e.join("/"):s.name}function Le(s){return U(s).split("/").every(e=>!e.startsWith(".")&&!Re.has(e))}function _e(s){return s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function Be(s,e){const l=new Map;for(const r of s){const c=U(r).split("/");c.pop();const a=["skills",e,...c].join("/");l.set(a,[...l.get(a)??[],r])}return l}async function Ke(s,e){const r=(await Promise.allSettled([...s].map(([c,a])=>e({dir:c,files:a})))).find(c=>c.status==="rejected");if(r)throw r.reason}function qe(s,e){const l=Te(e),r=`skills/${s}`;return{id:`home/${r}`,name:l.name??s,description:l.description,source:"home",volume:V,path:r,sandboxPath:`org/${V}/${r}`}}const _="*";function B(s){return s.volume==="home"}function re(s,e){const l=s.indexOf(":");return l===-1?{label:e,glyph:le}:{label:s.slice(l+1),glyph:s.startsWith("repo:")?pe:ge}}function He(s){const e=ie.c(48),{entry:l,pending:r,onOpen:c,onDelete:a}=s,o=te(),{org:u}=se();let C;e[0]!==l.source||e[1]!==u.name?(C=re(l.source,u.name),e[0]=l.source,e[1]=u.name,e[2]=C):C=e[2];const{label:M,glyph:O}=C;let D;e[3]!==l?(D=B(l),e[3]=l,e[4]=D):D=e[4];const z=D,N=r?"opacity-60":"hover:bg-muted/50";let f;e[5]!==N?(f=de("relative transition-colors group overflow-hidden flex flex-col h-full",N),e[5]=N,e[6]=f):f=e[6];let d;e[7]!==l.name||e[8]!==c||e[9]!==r?(d=!r&&t.jsx("button",{type:"button",onClick:c,className:"absolute inset-0 z-0","aria-label":l.name}),e[7]=l.name,e[8]=c,e[9]=r,e[10]=d):d=e[10];const P=z?"default":"system",$=!z;let h;e[11]!==O||e[12]!==P||e[13]!==$?(h=t.jsx(ze,{glyph:O,tone:P,readOnly:$,className:"size-8 shrink-0"}),e[11]=O,e[12]=P,e[13]=$,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==o?(x=a&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(je,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:t.jsx(ue,{size:16})})}),t.jsx(ve,{align:"end",children:t.jsxs(ye,{variant:"destructive",onClick:K=>{K.stopPropagation(),a()},children:[t.jsx(fe,{size:16}),o("settings.skills.deleteButton")]})})]})}),e[15]=a,e[16]=o,e[17]=x):x=e[17];let j;e[18]!==h||e[19]!==x?(j=t.jsxs("div",{className:"flex items-start justify-between",children:[h,x]}),e[18]=h,e[19]=x,e[20]=j):j=e[20];let b;e[21]!==l.name?(b=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.name}),e[21]=l.name,e[22]=b):b=e[22];let k;e[23]!==l.description||e[24]!==o?(k=l.description||o("settings.skills.noDescription"),e[23]=l.description,e[24]=o,e[25]=k):k=e[25];let m;e[26]!==k?(m=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:k}),e[26]=k,e[27]=m):m=e[27];let v;e[28]!==b||e[29]!==m?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[b,m]}),e[28]=b,e[29]=m,e[30]=v):v=e[30];let p;e[31]!==j||e[32]!==v?(p=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[j,v]}),e[31]=j,e[32]=v,e[33]=p):p=e[33];let y;e[34]!==M||e[35]!==r||e[36]!==o?(y=r?o("settings.skills.importing"):M,e[34]=M,e[35]=r,e[36]=o,e[37]=y):y=e[37];let g;e[38]!==y?(g=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y})})}),e[38]=y,e[39]=g):g=e[39];let S;e[40]!==p||e[41]!==g?(S=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[p,g]}),e[40]=p,e[41]=g,e[42]=S):S=e[42];let I;return e[43]!==r||e[44]!==S||e[45]!==f||e[46]!==d?(I=t.jsxs(me,{"aria-busy":r,className:f,children:[d,S]}),e[43]=r,e[44]=S,e[45]=f,e[46]=d,e[47]=I):I=e[47],I}function ee(s){const e=ie.c(2),{children:l}=s;let r;return e[0]!==l?(r=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:l}),e[0]=l,e[1]=r):r=e[1],r}function yt(){const s=te(),{org:e}=se(),l=Me(),{remove:r,upload:c}=Ie("home"),a=oe(),o=T.useRef(null),[u,C]=T.useState(""),[M,O]=T.useState(_),[D,z]=T.useState(!1),[N,f]=T.useState(null),[d,P]=T.useState(null),[$,h]=T.useState(null),x=()=>{a.invalidateQueries({queryKey:H.slashSkills(e.id)}),a.invalidateQueries({queryKey:H.orgFsSkills(e.id)})},j=i=>a.setQueryData(H.slashSkills(e.id),n=>i(n??[]));async function b(i){const n=[...i??[]];if(o.current&&(o.current.value=""),n.length===0)return;const E=n[0]?.webkitRelativePath??"";if(!E){w.error(s("settings.skills.importNeedsFolder"));return}const q=E.split("/")[0]??"",R=n.filter(Le),G=R.find(A=>U(A)==="SKILL.md");if(!G){w.error(s("settings.skills.importMissingSkillMd"));return}if(R.length>Z){w.error(s("settings.skills.importTooManyFiles",{count:String(R.length),max:String(Z)}));return}const F=_e(q),X=`skills/${F}`;let Y=!1;z(!0);try{if(await Oe(e.slug,"home",X)){w.error(s("settings.skills.importSlugTaken",{slug:F}));return}Y=!0;const A=qe(F,await G.text());j(ne=>[A,...ne]),h(A.id),await Ke(Be(R,F),c.mutateAsync),w.success(s("settings.skills.importSuccess",{name:F}))}catch(A){Y&&await r.mutateAsync(X).catch(()=>{}),w.error(A instanceof Error?A.message:s("settings.skills.importError"))}finally{h(null),x(),z(!1)}}const k=u.toLowerCase(),m=(l.data??[]).filter(i=>i.name.toLowerCase().includes(k)||(i.description??"").toLowerCase().includes(k)).sort((i,n)=>Number(B(n))-Number(B(i))||i.name.localeCompare(n.name)),v=new Set((l.data??[]).map(i=>i.source)),p=new Map;for(const i of m)p.set(i.source,(p.get(i.source)??0)+1);const y=[{id:_,label:s("settings.skills.filterAll"),count:m.length},...[...v].map(i=>({id:i,label:re(i,e.name).label,count:p.get(i)??0}))],g=v.has(M)?M:_,S=g===_?m:m.filter(i=>i.source===g),I=i=>f($e(i.volume,i.path)),K=async()=>{if(!d)return;const{id:i,path:n}=d;P(null),j(E=>E.filter(q=>q.id!==i));try{await r.mutateAsync(n),w.success(s("settings.skills.deleteSuccess"))}catch(E){w.error(E instanceof Error?E.message:s("settings.skills.deleteError"))}finally{x()}},W=t.jsxs(Q,{size:"sm",disabled:D,onClick:()=>o.current?.click(),children:[t.jsx(he,{size:14}),s(D?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs(L,{children:[t.jsx(L.Content,{children:t.jsx(L.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(L.Title,{children:s("settings.skills.pageTitle")}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx(xe,{value:u,onChange:C,placeholder:s("settings.skills.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:i=>{i.key==="Escape"&&(C(""),i.target.blur())}}),W,t.jsx("input",{ref:o,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:i=>{b(i.target.files)}})]}),y.length>2&&t.jsx(Ae,{tabs:y,activeTab:g,onTabChange:O}),l.isPending?t.jsx("div",{className:"@container",children:t.jsx(ee,{children:Array.from({length:8},(i,n)=>t.jsx(ae,{className:"h-[168px] rounded-xl"},n))})}):l.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(J,{image:t.jsx(ce,{size:48,className:"text-muted-foreground"}),title:s("settings.skills.errorTitle"),description:l.error instanceof Error?l.error.message:s("settings.skills.errorDescription"),actions:t.jsx(Q,{size:"sm",variant:"outline",onClick:()=>{l.refetch()},children:s("settings.skills.retry")})})}):S.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(J,{image:t.jsx(le,{size:48,className:"text-muted-foreground"}),title:s(u?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:u?s("settings.skills.noResultsDescription",{search:u}):s("settings.skills.emptyDescription"),actions:!u&&W})}):t.jsx("div",{className:"@container",children:t.jsx(ee,{children:S.map(i=>{const n=i.id===$;return t.jsx(He,{entry:i,pending:n,onOpen:()=>I(i),onDelete:B(i)&&!n?()=>P(i):void 0},i.id)})})})]})})}),N&&t.jsx(Fe,{skillPath:N,onClose:()=>f(null)},N),t.jsx(Se,{open:d!==null,onOpenChange:i=>!i&&P(null),children:t.jsxs(be,{children:[t.jsxs(we,{children:[t.jsx(Ce,{children:s("settings.skills.deleteDialogTitle")}),t.jsx(De,{children:s("settings.skills.deleteDialogDescription",{name:d?.name??""})})]}),t.jsxs(Ne,{children:[t.jsx(Pe,{children:s("settings.skills.cancel")}),t.jsx(Ee,{onClick:K,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:s("settings.skills.deleteButton")})]})]})})]})}export{yt as default};