decocms 4.150.13 → 4.150.14

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 (230) hide show
  1. package/dist/client/assets/{AlertCircle-Eoiskkdw.js → AlertCircle-B91-aNwq.js} +1 -1
  2. package/dist/client/assets/{AreaChart-D1UwNZ2i.js → AreaChart-C3lLe-TO.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-Cqu5i0aZ.js → ArrowUp-Cn7neu_D.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-CWi3fozt.js → ArrowUpRight-4ON7683p.js} +1 -1
  5. package/dist/client/assets/{Check-BdHuJuPw.js → Check-Cw5nys_P.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-myPjsJGU.js → CheckCircle-CvK6qQD1.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-DEyjLxYx.js → ChevronDown-CFrsDGDp.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-BBN141em.js → ChevronRight-CSfYVYCd.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DJfqG7zj.js → ChevronUp-poM-SIFg.js} +1 -1
  10. package/dist/client/assets/{Copy01-gvtGLLcY.js → Copy01-DAfIqFmi.js} +1 -1
  11. package/dist/client/assets/{CpuChip01-kG4BiE9Y.js → CpuChip01-D-1zqWEP.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-5WbYSo6Z.js → DotsVertical-Db0Ic0C_.js} +1 -1
  13. package/dist/client/assets/{Eye-CZFxMqY9.js → Eye-B4xf2XfM.js} +1 -1
  14. package/dist/client/assets/{FilterLines-ubYrwRwC.js → FilterLines-Do81h0db.js} +1 -1
  15. package/dist/client/assets/{HardDrive-F_HbtdSs.js → HardDrive-BJwWSvdh.js} +1 -1
  16. package/dist/client/assets/{Key01-D9NzOa5l.js → Key01-CDx4-itV.js} +1 -1
  17. package/dist/client/assets/{LayoutLeft-BuxvHUKx.js → LayoutLeft-C54Zd3v3.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-DJvk8I2A.js → LinkExternal01-BMWoL9cX.js} +1 -1
  19. package/dist/client/assets/{LogOut01-DN8933ou.js → LogOut01-DnW0PXgG.js} +1 -1
  20. package/dist/client/assets/{Monitor01-Cd36dx-4.js → Monitor01-ClNoinKc.js} +1 -1
  21. package/dist/client/assets/{Palette-D0m6ZhK3.js → Palette-DrK1WdFE.js} +1 -1
  22. package/dist/client/assets/{Play-D_aQs7dj.js → Play-uJQecXtC.js} +1 -1
  23. package/dist/client/assets/{Plus-XPxaBtTZ.js → Plus-BUQ_ZClP.js} +1 -1
  24. package/dist/client/assets/{SearchLg-Dlw09bmE.js → SearchLg-D1RJLuDz.js} +1 -1
  25. package/dist/client/assets/{SearchMd-D-oUO6X0.js → SearchMd-CBewQIvn.js} +1 -1
  26. package/dist/client/assets/{Settings02-B_QAMj-P.js → Settings02-BiO67z5n.js} +1 -1
  27. package/dist/client/assets/{Shield01-m7YUf-pl.js → Shield01-_WXbYKas.js} +1 -1
  28. package/dist/client/assets/{Star01-4a_Jxita.js → Star01-ZJ4rnXKf.js} +1 -1
  29. package/dist/client/assets/{Stars01-C8PrtncY.js → Stars01-Bik9Ugxe.js} +1 -1
  30. package/dist/client/assets/{Stars02-COchQugv.js → Stars02-DaESD09_.js} +1 -1
  31. package/dist/client/assets/{Sun-Bdj4gRC5.js → Sun-Bfx3j4KE.js} +1 -1
  32. package/dist/client/assets/{SwitchHorizontal01-IoYlCupu.js → SwitchHorizontal01-C1V7p22w.js} +1 -1
  33. package/dist/client/assets/{Tool01-B96hoDFN.js → Tool01-DTGcj4gI.js} +1 -1
  34. package/dist/client/assets/{Tool02-AsfUGp__.js → Tool02-BPYivh6T.js} +1 -1
  35. package/dist/client/assets/{Trash01-g9SUeAN0.js → Trash01-Yia2FbxW.js} +1 -1
  36. package/dist/client/assets/{TrendUp01-BAGSq_YF.js → TrendUp01-RRDYPFKj.js} +1 -1
  37. package/dist/client/assets/{Upload01-L2syNbDQ.js → Upload01-BBKw6S0o.js} +1 -1
  38. package/dist/client/assets/{User01-CbL87ZBv.js → User01-XCN4nng1.js} +1 -1
  39. package/dist/client/assets/{Users01-BMwIQhmY.js → Users01-Cw6_yNSf.js} +1 -1
  40. package/dist/client/assets/{Users03-BJNH9N4K.js → Users03-dKCb2h3Y.js} +1 -1
  41. package/dist/client/assets/{X-th7ARgOR.js → X-ab3eO-rs.js} +1 -1
  42. package/dist/client/assets/{XCircle-CfjuVDux.js → XCircle-D7fA26xB.js} +1 -1
  43. package/dist/client/assets/{XClose-BV56nJYO.js → XClose-CEZC5ftU.js} +1 -1
  44. package/dist/client/assets/{Zap-Cu4-I_Ac.js → Zap-Bnq6xGd1.js} +1 -1
  45. package/dist/client/assets/{ZapSquare-k4WUcduv.js → ZapSquare-B_ajjEhK.js} +1 -1
  46. package/dist/client/assets/{access-gate-B0jUQZZH.js → access-gate-D4Hh5FVh.js} +1 -1
  47. package/dist/client/assets/{add-section-modal-Dz_K3qJ2.js → add-section-modal-CvOwBfxj.js} +1 -1
  48. package/dist/client/assets/{agent-icon-DCQPTD-I.js → agent-icon-BUu7SJOh.js} +1 -1
  49. package/dist/client/assets/{agents-list-opUfTjSK.js → agents-list-D4CPAK9X.js} +1 -1
  50. package/dist/client/assets/{ai-providers-C3-viUvZ.js → ai-providers-EhzLkNiR.js} +1 -1
  51. package/dist/client/assets/{alert-BGIkzGI9.js → alert-DtU_bvr8.js} +1 -1
  52. package/dist/client/assets/{alert-dialog-P11DPMoL.js → alert-dialog-zLyeS92X.js} +2 -2
  53. package/dist/client/assets/{app-editor-ccFWMS20.js → app-editor-DO1eS78p.js} +1 -1
  54. package/dist/client/assets/{auth-BqANqm0A.js → auth-IA0Wt4Bs.js} +1 -1
  55. package/dist/client/assets/{auth-catchall-BOnc_g4-.js → auth-catchall-Bi6p1Ud-.js} +1 -1
  56. package/dist/client/assets/{auth-entry-DMFjUxSN.js → auth-entry-Cf5TR3Q3.js} +1 -1
  57. package/dist/client/assets/{auth-split-layout-B07StbUi.js → auth-split-layout-QuPERvo-.js} +1 -1
  58. package/dist/client/assets/{authenticate-and-persist-oauth-sNdJBe3I.js → authenticate-and-persist-oauth-4QL_KMam.js} +1 -1
  59. package/dist/client/assets/{automation-list-row-BgdzPrn2.js → automation-list-row-CtIVsj_5.js} +1 -1
  60. package/dist/client/assets/{automation-runs-kY0Hd5bJ.js → automation-runs-BuBLPadb.js} +1 -1
  61. package/dist/client/assets/{automations-duhQRZ_h.js → automations-BhzxbiZ6.js} +1 -1
  62. package/dist/client/assets/{avatar-C7VBTxjb.js → avatar-DgcrciBf.js} +1 -1
  63. package/dist/client/assets/{badge-Bu9TYgek.js → badge-COsNQLUw.js} +1 -1
  64. package/dist/client/assets/{block-document-Dx-Kq5IV.js → block-document-T6uBj3ms.js} +1 -1
  65. package/dist/client/assets/{brand-context-CWx4XQkj.js → brand-context-CVZ_cStr.js} +1 -1
  66. package/dist/client/assets/{buckets-CW6FQIkN.js → buckets-Ds5bb2Zd.js} +1 -1
  67. package/dist/client/assets/{bulk-category-panel-Dz7CZ_Ps.js → bulk-category-panel-Pm1Yz9Zw.js} +1 -1
  68. package/dist/client/assets/{calendar-DOxmGM7p.js → calendar-Dpf15FtT.js} +1 -1
  69. package/dist/client/assets/{capability-load-error-DTwJskAo.js → capability-load-error-B5z2_UsL.js} +1 -1
  70. package/dist/client/assets/{card-B0f_2u3D.js → card-BNBA4cwH.js} +1 -1
  71. package/dist/client/assets/{category-editor-eF5ieM9X.js → category-editor-BA0Xc6on.js} +1 -1
  72. package/dist/client/assets/{chat-context-aAijaY3A.js → chat-context-BcKRD-qD.js} +1 -1
  73. package/dist/client/assets/{checkbox-d1Rt9GUt.js → checkbox-BL555xYH.js} +1 -1
  74. package/dist/client/assets/{cli-auth-success-BTkf7YGZ.js → cli-auth-success-Bd5Du6DE.js} +1 -1
  75. package/dist/client/assets/{collection-detail-XE42oRb-.js → collection-detail-Ck4V0vb_.js} +1 -1
  76. package/dist/client/assets/{collection-display-button-DUa_Df-A.js → collection-display-button-D-rssnYt.js} +1 -1
  77. package/dist/client/assets/{collection-search-DVfGAujX.js → collection-search-DGVCb7gA.js} +1 -1
  78. package/dist/client/assets/{collection-table-wrapper-BsO2CtT4.js → collection-table-wrapper-CojajOCR.js} +1 -1
  79. package/dist/client/assets/{collection-tabs-u5enzkVl.js → collection-tabs-BK4jiFiJ.js} +1 -1
  80. package/dist/client/assets/{command-uPNVzZmX.js → command-DZI3kP4g.js} +1 -1
  81. package/dist/client/assets/{commerce-onboarding-EbYviyIl.js → commerce-onboarding-DQP4ReNS.js} +1 -1
  82. package/dist/client/assets/{companions-core-Dg0TNpYb.js → companions-core-DWa4u1b0.js} +1 -1
  83. package/dist/client/assets/{connect-Da9YwgpD.js → connect-DGFBfdn3.js} +1 -1
  84. package/dist/client/assets/{connection-Du_RJnpr.js → connection-BRPkDcWg.js} +1 -1
  85. package/dist/client/assets/{connection-card-CSYIgKfu.js → connection-card-cUEom3hx.js} +1 -1
  86. package/dist/client/assets/{connection-detail-COQvrxlN.js → connection-detail-CTTCkN-R.js} +1 -1
  87. package/dist/client/assets/{connection-form-helpers-C1xXkycr.js → connection-form-helpers-B-oUsYK9.js} +1 -1
  88. package/dist/client/assets/{connections-f5IaRiLS.js → connections-BOxnUR6z.js} +1 -1
  89. package/dist/client/assets/{decopilot-sse-pool-B-6W79yQ.js → decopilot-sse-pool-C_01nXFf.js} +1 -1
  90. package/dist/client/assets/{dialog-CJkJPlAS.js → dialog-BKADi3bx.js} +1 -1
  91. package/dist/client/assets/{domain-settings-B-OR8tCr.js → domain-settings-DgqnFb0l.js} +1 -1
  92. package/dist/client/assets/{drawer-Vmj6vj2H.js → drawer-D7Oy8gIG.js} +1 -1
  93. package/dist/client/assets/{dropdown-menu-DabrgiLz.js → dropdown-menu-CNiSo_qs.js} +1 -1
  94. package/dist/client/assets/{empty-state-fv8rbuQT.js → empty-state-DqSQaubj.js} +1 -1
  95. package/dist/client/assets/{extract-connection-data-C2XmdMG4.js → extract-connection-data-DW5ENvhS.js} +1 -1
  96. package/dist/client/assets/{file-explorer-DmkInB_B.js → file-explorer-BSNQq6hn.js} +1 -1
  97. package/dist/client/assets/{form-BNZvnkRb.js → form-Fzb0rJTW.js} +1 -1
  98. package/dist/client/assets/{general-m1pdndCH.js → general-1GBG93xy.js} +1 -1
  99. package/dist/client/assets/{github-repo-picker-BZBSEeFT.js → github-repo-picker-BYSh6D5p.js} +1 -1
  100. package/dist/client/assets/{hooks-S0-VfPJM.js → hooks-4mRuOKRy.js} +5 -5
  101. package/dist/client/assets/{index-B6ykVoku.js → index-Bts1u0J_.js} +1 -1
  102. package/dist/client/assets/{index-vAlUDtly.js → index-BztDXv-J.js} +3 -3
  103. package/dist/client/assets/{index-Bp9fmXVF.js → index-CI6Q_QAk.js} +1 -1
  104. package/dist/client/assets/{index-BR5NjjJc.js → index-CR8JsTmS.js} +1 -1
  105. package/dist/client/assets/{index-Bc4pTCDJ.js → index-CRmv56i2.js} +1 -1
  106. package/dist/client/assets/index-CWTjeYOh.js +1 -0
  107. package/dist/client/assets/{index-BAZmyVC-.css → index-CbTRSuOH.css} +1 -1
  108. package/dist/client/assets/{index-DfcOr-zj.js → index-D6eR-lCa.js} +1 -1
  109. package/dist/client/assets/{index-oCG8H3JL.js → index-DB_ltYEd.js} +6 -6
  110. package/dist/client/assets/{index-CE-pZQ5n.js → index-DWVYmT2K.js} +1 -1
  111. package/dist/client/assets/{index-CsXIUaax.js → index-cIDyPB3B.js} +41 -41
  112. package/dist/client/assets/{index-C8ZRu3O2.js → index-pf9WIzdb.js} +1 -1
  113. package/dist/client/assets/{index-redirect-ejiq3ej6.js → index-redirect-_GLliss8.js} +1 -1
  114. package/dist/client/assets/{input-B6QX4Bsc.js → input-HN_bxtAQ.js} +1 -1
  115. package/dist/client/assets/{integration-icon-CAdntIjt.js → integration-icon-BjzWQyhn.js} +1 -1
  116. package/dist/client/assets/{invite-member-dialog-34FD2jh4.js → invite-member-dialog-DAtZKWFO.js} +1 -1
  117. package/dist/client/assets/{label-CEg7qY-f.js → label-WEwHbgNa.js} +1 -1
  118. package/dist/client/assets/{layout-BzEtom0U.js → layout-CLv1bCzT.js} +1 -1
  119. package/dist/client/assets/{login-CFRyKNLt.js → login-XCWqN1gF.js} +1 -1
  120. package/dist/client/assets/{mcp-oauth-Dl2k8oDk.js → mcp-oauth-Bna-E66_.js} +1 -1
  121. package/dist/client/assets/{members-DJ1Auc8C.js → members-ovr8p4aB.js} +1 -1
  122. package/dist/client/assets/{monaco-editor-BVhG6A-M.js → monaco-editor-xaI7s5kF.js} +1 -1
  123. package/dist/client/assets/{monitoring-stats-row-SqogCnFC.js → monitoring-stats-row-CmdFUB4i.js} +1 -1
  124. package/dist/client/assets/{multi-select-UF9SWQ6e.js → multi-select-B0qocmeY.js} +1 -1
  125. package/dist/client/assets/{oauth-callback-ai-provider-9-U3XUKP.js → oauth-callback-ai-provider-Cx6PyJQv.js} +1 -1
  126. package/dist/client/assets/{oauth-callback-DZO2ZJBO.js → oauth-callback-g6ZHZC-H.js} +1 -1
  127. package/dist/client/assets/{onboarding-CyrprJFg.js → onboarding-Crb1jiVb.js} +1 -1
  128. package/dist/client/assets/{org-layout-B728gB0l.js → org-layout-DZBP-2GO.js} +1 -1
  129. package/dist/client/assets/{organization-choice-Ccuwzodh.js → organization-choice-C_akLq78.js} +1 -1
  130. package/dist/client/assets/{orgs-CPUy2U55.js → orgs-B_89Kdou.js} +1 -1
  131. package/dist/client/assets/{page-seo-form-DlEVMpaI.js → page-seo-form-D9rc6Mye.js} +1 -1
  132. package/dist/client/assets/{popover-DEaCMzZP.js → popover-Mcyd1rJW.js} +1 -1
  133. package/dist/client/assets/{post-editor-Bb5IfTCU.js → post-editor-B4wUDwBb.js} +1 -1
  134. package/dist/client/assets/{primitives-BTgHbvPp.js → primitives-Cg_9YIfi.js} +1 -1
  135. package/dist/client/assets/{profile-CxkMLIYl.js → profile-PO6imsIY.js} +1 -1
  136. package/dist/client/assets/project-app-view-DZMl5lBQ.js +1 -0
  137. package/dist/client/assets/record-editor-DD85VkKs.js +1 -0
  138. package/dist/client/assets/{redirect-editor-DD7PcldO.js → redirect-editor-DBR2nOIY.js} +1 -1
  139. package/dist/client/assets/registry-D-iopBq7.js +2 -0
  140. package/dist/client/assets/{registry-layout-CfaJe34R.js → registry-layout-DXcfcP7u.js} +1 -1
  141. package/dist/client/assets/{reports-BFgBFsZV.js → reports-DD0UMnsc.js} +2 -2
  142. package/dist/client/assets/{require-capability-BV5_KDVM.js → require-capability-Duuzb-1_.js} +1 -1
  143. package/dist/client/assets/{required-auth-layout-CWHGEbNY.js → required-auth-layout-PQuo7896.js} +1 -1
  144. package/dist/client/assets/{reset-password-cg551v26.js → reset-password-CU6E7Bhy.js} +1 -1
  145. package/dist/client/assets/{roles-DkFyVRXC.js → roles-BB2l3MZv.js} +1 -1
  146. package/dist/client/assets/{search-input-BiAm-dHP.js → search-input-BOnpigZ_.js} +1 -1
  147. package/dist/client/assets/{secrets-CbL3TEVq.js → secrets-Dqkkx2T1.js} +1 -1
  148. package/dist/client/assets/{sections-editor-YtQ-pXxY.js → sections-editor-vVXk2bQB.js} +1 -1
  149. package/dist/client/assets/{select-DWrifuH3.js → select-BNOwmKae.js} +1 -1
  150. package/dist/client/assets/{select-model-L_zaW5VV.js → select-model-Clsr7M33.js} +1 -1
  151. package/dist/client/assets/{self-tool-result-ILtZLxoN.js → self-tool-result-DfFc8ew3.js} +1 -1
  152. package/dist/client/assets/{seo-editor-7FbWYb3Z.js → seo-editor-QGR4jMSw.js} +1 -1
  153. package/dist/client/assets/{settings-layout-CAkmdzMT.js → settings-layout-DKgu9jEA.js} +1 -1
  154. package/dist/client/assets/{settings-section-CZBB9hU0.js → settings-section-CGHdGROt.js} +1 -1
  155. package/dist/client/assets/{shell-controls-llKLpxpW.js → shell-controls-BCKV1NvA.js} +1 -1
  156. package/dist/client/assets/{shell-layout-BTLWrDNT.js → shell-layout-DJnG6tBW.js} +1 -1
  157. package/dist/client/assets/sidebar-C0kiKg50.js +1 -0
  158. package/dist/client/assets/{skeleton-Dr0ihbmb.js → skeleton-BgYjZjTE.js} +1 -1
  159. package/dist/client/assets/{spinner-ChQk-fuJ.js → spinner-Dl88nySH.js} +1 -1
  160. package/dist/client/assets/{sso-CZy_Z0iZ.js → sso-JSunbF6z.js} +1 -1
  161. package/dist/client/assets/{store-yTKa6R4e.js → store-DcVw_Ezl.js} +1 -1
  162. package/dist/client/assets/store-registry-lJb1V408.js +2 -0
  163. package/dist/client/assets/{studio-tools-WL-_7DVR.js → studio-tools-BVEjmDQb.js} +1 -1
  164. package/dist/client/assets/{switch-lBLWR9-v.js → switch-_5lfqgQ6.js} +1 -1
  165. package/dist/client/assets/{tab-id-BME_CqCy.js → tab-id-BleB6Ron.js} +1 -1
  166. package/dist/client/assets/{table-DX49ZzwB.js → table-CNfTtf-n.js} +1 -1
  167. package/dist/client/assets/{tabs-EJLJDayr.js → tabs-kRgqoap0.js} +1 -1
  168. package/dist/client/assets/{textarea-C_aquDFn.js → textarea-D1aVc8E7.js} +1 -1
  169. package/dist/client/assets/{toggle-group-Q0IrBn5K.js → toggle-group-DvK-vqBY.js} +1 -1
  170. package/dist/client/assets/toolbar-CxCN0jhr.js +1 -0
  171. package/dist/client/assets/{tooltip-fIVhp5ou.js → tooltip-Cn1IcDmc.js} +1 -1
  172. package/dist/client/assets/{use-ai-providers-DEYBcyVN.js → use-ai-providers-BYGZHRPH.js} +1 -1
  173. package/dist/client/assets/{use-automations-NZO0H-p1.js → use-automations-BEOa2pC2.js} +1 -1
  174. package/dist/client/assets/{use-autosave-CUy33u2t.js → use-autosave-BIJ2p_MC.js} +1 -1
  175. package/dist/client/assets/{use-capability-Dzali0wY.js → use-capability-BxJkR1VB.js} +1 -1
  176. package/dist/client/assets/{use-clock-tick-DR9o8Vl7.js → use-clock-tick-BrU-wGRy.js} +1 -1
  177. package/dist/client/assets/{use-connection-B06hUHgo.js → use-connection-BNKQq_v1.js} +1 -1
  178. package/dist/client/assets/{use-copy-2CfnxQXo.js → use-copy-7m3Ed17j.js} +1 -1
  179. package/dist/client/assets/{use-create-virtual-mcp-DEF-DvFp.js → use-create-virtual-mcp-_D1SJTWG.js} +1 -1
  180. package/dist/client/assets/{use-debounced-autosave-ChmgSDUl.js → use-debounced-autosave-D0cLeexL.js} +1 -1
  181. package/dist/client/assets/{use-debounced-value-CFLMM6Qe.js → use-debounced-value-BY8ovYWq.js} +1 -1
  182. package/dist/client/assets/use-deco-credits-3FINi23O.js +1 -0
  183. package/dist/client/assets/{use-decopilot-events-ByGtTT-X.js → use-decopilot-events-B47pZ2AI.js} +1 -1
  184. package/dist/client/assets/{use-delete-connection-D0aJn94j.js → use-delete-connection-CyuPr25u.js} +1 -1
  185. package/dist/client/assets/{use-deployment-admin-CbjYP-TY.js → use-deployment-admin-CbEdVnhP.js} +1 -1
  186. package/dist/client/assets/{use-file-configs-Du58T_Jv.js → use-file-configs-BCgCMPp3.js} +1 -1
  187. package/dist/client/assets/{use-infinite-scroll-C3O-KBl8.js → use-infinite-scroll-INj7iNdP.js} +1 -1
  188. package/dist/client/assets/{use-join-requests-Bl54Lsyw.js → use-join-requests-DSkrOZR8.js} +1 -1
  189. package/dist/client/assets/{use-mcp-auth-status-P3A3uVfF.js → use-mcp-auth-status-C1MLJaDO.js} +1 -1
  190. package/dist/client/assets/{use-mcp-client-DpsAHhsu.js → use-mcp-client-Zm5H8-Zl.js} +2 -2
  191. package/dist/client/assets/{use-mcp-tools-D5d64p3C.js → use-mcp-tools-Do7r-2lV.js} +1 -1
  192. package/dist/client/assets/{use-members-CmlnN6Aw.js → use-members-B11q_xQz.js} +1 -1
  193. package/dist/client/assets/{use-mobile-DGf5vwNF.js → use-mobile-BengO0lS.js} +1 -1
  194. package/dist/client/assets/{use-navigate-to-agent-BtA6n79A.js → use-navigate-to-agent-DmiY1Q8V.js} +1 -1
  195. package/dist/client/assets/{use-org-auth-client-BmTFN65s.js → use-org-auth-client-C8Z6Cidd.js} +1 -1
  196. package/dist/client/assets/{use-org-sso-DWfsG4pV.js → use-org-sso-O3jknVxq.js} +1 -1
  197. package/dist/client/assets/{use-organization-roles-DcrcrZqB.js → use-organization-roles-CQv8oHgS.js} +1 -1
  198. package/dist/client/assets/{use-organization-settings-DOeb2tV3.js → use-organization-settings-Oq0J09-V.js} +1 -1
  199. package/dist/client/assets/{use-registry-connections-CWaA6tdp.js → use-registry-connections-CI3I17-c.js} +1 -1
  200. package/dist/client/assets/{use-secrets-en8tthJo.js → use-secrets-DjYfC3W_.js} +1 -1
  201. package/dist/client/assets/{use-status-sounds-CW8S7oZ-.js → use-status-sounds-DTAB4Phc.js} +1 -1
  202. package/dist/client/assets/{use-tags-Q5fBrYNZ.js → use-tags-Dj1xCgYD.js} +1 -1
  203. package/dist/client/assets/{use-view-mode-W11-AL0e.js → use-view-mode-CKxVad5H.js} +1 -1
  204. package/dist/client/assets/{use-virtual-mcp-CNAeRFsi.js → use-virtual-mcp-Cm3s396Y.js} +1 -1
  205. package/dist/client/assets/useInfiniteQuery-C5nBw6Jw.js +1 -0
  206. package/dist/client/assets/{useQueries-mGQBH8qb.js → useQueries-C4YD28d8.js} +1 -1
  207. package/dist/client/assets/{useRouterState-DstVuNgC.js → useRouterState-D1i-KnUG.js} +1 -1
  208. package/dist/client/assets/useSuspenseInfiniteQuery-ClXYbJmm.js +1 -0
  209. package/dist/client/assets/{users-CcHMTpxs.js → users-BoMbND0s.js} +1 -1
  210. package/dist/client/assets/{variant-calendar-BnAhmw2x.js → variant-calendar-qTp_LhSU.js} +1 -1
  211. package/dist/client/assets/{view-mode-toggle-BjeJK31L.js → view-mode-toggle-D5GwXJYe.js} +1 -1
  212. package/dist/client/index.html +6 -16
  213. package/dist/server/cli.js +1 -1
  214. package/dist/server/server.js +1 -1
  215. package/package.json +1 -1
  216. package/dist/client/assets/index-vd6CkgrG.js +0 -1
  217. package/dist/client/assets/org-install-DGCT_s6M.js +0 -1
  218. package/dist/client/assets/project-app-view-CbsnI5_S.js +0 -1
  219. package/dist/client/assets/record-editor-CDJ26ss0.js +0 -1
  220. package/dist/client/assets/registry-Uwc000L6.js +0 -2
  221. package/dist/client/assets/sidebar-Dy1VWxxx.js +0 -1
  222. package/dist/client/assets/store-registry-C4rA423j.js +0 -2
  223. package/dist/client/assets/toolbar-DtyhtDGB.js +0 -1
  224. package/dist/client/assets/use-deco-credits-Bf0twN-A.js +0 -1
  225. package/dist/client/assets/useInfiniteQuery-BsbgCJ-c.js +0 -1
  226. package/dist/client/assets/useSuspenseInfiniteQuery-3ceZ8_NX.js +0 -1
  227. package/dist/client/icons/apple-touch-icon-180.png +0 -0
  228. package/dist/client/icons/icon-192.png +0 -0
  229. package/dist/client/icons/icon-512.png +0 -0
  230. package/dist/client/manifest.webmanifest +0 -32
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decocms",
3
- "version": "4.150.13",
3
+ "version": "4.150.14",
4
4
  "description": "Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools",
5
5
  "author": "Deco team",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- import{c as C,b as H,j as s,y as il,B as Ns,d as ve,F as re,G as rl,r as B,E as Zt,H as al,x as cl,K as ws,e as is,p as oe,I as Ot,m as G,a as $t,J as dl,v as ml,t as es,M as fl,P as ul,n as pl,R as hl,k as xl,f as gl,u as Cs,O as bl,U as jl}from"./index-CsXIUaax.js";import{u as xt,S as ts,a as ss,b as ie,c as ne,d as ee,e as ks,f as vl,g as Ms,h as yl,i as Vt,j as _l,k as Sl,l as Nl}from"./sidebar-Dy1VWxxx.js";import{u as Ts}from"./use-mobile-DGf5vwNF.js";import{C as wl,p as Ut,s as Cl,a as kl,n as Ml}from"./self-tool-result-ILtZLxoN.js";import{f as Tl,b as Is,e as Ps,g as Il,h as Pl,a as $l,d as Al}from"./dialog-CJkJPlAS.js";import{f as zl}from"./tab-id-BME_CqCy.js";import{C as Ol,W as $s,g as El,u as Rl,S as Fl,a as Dl}from"./use-mcp-client-DpsAHhsu.js";import{i as As}from"./XCircle-CfjuVDux.js";import{u as Ll,a as ls}from"./use-organization-settings-DOeb2tV3.js";import{i as zs}from"./ChevronRight-BBN141em.js";import{i as Gl}from"./X-th7ARgOR.js";import{s as Hl,a as Bl,t as Ul,i as Wl,b as ql,c as Kl,d as Vl,e as Os,A as At,f as rs,g as Yl,h as Xl,j as Ql}from"./agent-icon-DCQPTD-I.js";import{S as me}from"./skeleton-Dr0ihbmb.js";import{i as Es}from"./LayoutLeft-BuxvHUKx.js";import{O as Yt,A as os,u as Jl,a as Zl,b as eo,c as to}from"./use-deco-credits-Bf0twN-A.js";import{T as Et,a as pt}from"./toolbar-DtyhtDGB.js";import{P as Rs,a as Fs,b as Ds}from"./popover-DEaCMzZP.js";import{D as so,a as lo,b as oo}from"./drawer-Vmj6vj2H.js";import{A as Xt}from"./avatar-C7VBTxjb.js";import{T as Rt,a as Ft,b as Ls,c as Dt}from"./tooltip-fIVhp5ou.js";import{a as no}from"./Copy01-gvtGLLcY.js";import{n as io,i as ro}from"./Tool02-AsfUGp__.js";import{n as ao}from"./LinkExternal01-DJvk8I2A.js";import{i as as}from"./LogOut01-DN8933ou.js";import{i as co}from"./Monitor01-Cd36dx-4.js";import{n as mo,a as fo}from"./Sun-Bdj4gRC5.js";import{a as Lt}from"./Settings02-B_QAMj-P.js";import{i as uo}from"./Shield01-m7YUf-pl.js";import{a as po}from"./Users03-BJNH9N4K.js";import{u as ho}from"./use-deployment-admin-CbjYP-TY.js";import"./index-DfcOr-zj.js";import{a as xo}from"./ZapSquare-k4WUcduv.js";import{I as Gs}from"./invite-member-dialog-34FD2jh4.js";import{i as go}from"./FilterLines-ubYrwRwC.js";import{T as bo,a as jo}from"./toggle-group-Q0IrBn5K.js";import{u as vo,a as Hs,b as yo,T as _o}from"./hooks-S0-VfPJM.js";import{u as Bs,f as So}from"./shell-layout-BTLWrDNT.js";import{C as No,a as wo,b as Co,c as ko,d as Mo,e as To}from"./command-uPNVzZmX.js";import{u as Us}from"./studio-tools-WL-_7DVR.js";import{u as Ws}from"./use-virtual-mcp-CNAeRFsi.js";import{i as qs}from"./Zap-Cu4-I_Ac.js";import{S as Ks,M as Io}from"./shell-controls-llKLpxpW.js";import{n as Po}from"./Stars02-COchQugv.js";import{g as $o,u as Ao,S as zo}from"./use-clock-tick-DR9o8Vl7.js";import{a as Oo}from"./format-time-BnbuEtat.js";import{g as Eo}from"./agent-capabilities-cXfbMfjV.js";import{t as Ro}from"./ChevronDown-DEyjLxYx.js";import{S as Vs}from"./use-navigate-to-agent-BtA6n79A.js";import{C as Fo}from"./chat-context-aAijaY3A.js";import"./integration-icon-CAdntIjt.js";import"./companions-core-Dg0TNpYb.js";import"./extract-connection-data-C2XmdMG4.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-C2RHf8fG.js";import"./CheckCircle-myPjsJGU.js";import"./form-BNZvnkRb.js";import"./label-CEg7qY-f.js";import"./input-B6QX4Bsc.js";import"./Check-BdHuJuPw.js";import"./Eye-CZFxMqY9.js";import"./use-debounced-value-CFLMM6Qe.js";import"./useQueries-mGQBH8qb.js";import"./authenticate-and-persist-oauth-sNdJBe3I.js";import"./mcp-oauth-Dl2k8oDk.js";import"./auth-BqANqm0A.js";import"./AlertCircle-Eoiskkdw.js";import"./Tool01-B96hoDFN.js";import"./ArrowUp-Cqu5i0aZ.js";import"./ArrowUpRight-CWi3fozt.js";import"./TrendUp01-BAGSq_YF.js";import"./ChevronUp-DJfqG7zj.js";import"./DotsVertical-5WbYSo6Z.js";import"./CpuChip01-kG4BiE9Y.js";import"./Star01-4a_Jxita.js";import"./Palette-D0m6ZhK3.js";import"./SwitchHorizontal01-IoYlCupu.js";import"./HardDrive-F_HbtdSs.js";import"./Key01-D9NzOa5l.js";import"./Play-D_aQs7dj.js";import"./Plus-XPxaBtTZ.js";import"./SearchLg-Dlw09bmE.js";import"./SearchMd-D-oUO6X0.js";import"./Stars01-C8PrtncY.js";import"./Trash01-g9SUeAN0.js";import"./Upload01-L2syNbDQ.js";import"./User01-CbL87ZBv.js";import"./Users01-BMwIQhmY.js";import"./XClose-BV56nJYO.js";import"./alert-dialog-P11DPMoL.js";import"./spinner-ChQk-fuJ.js";import"./github-repo-picker-BZBSEeFT.js";import"./collection-search-DVfGAujX.js";import"./use-connection-B06hUHgo.js";import"./use-mcp-tools-D5d64p3C.js";import"./reusable-new-chat-CouMjkYR.js";import"./connection-card-CSYIgKfu.js";import"./use-registry-connections-CWaA6tdp.js";import"./useInfiniteQuery-BsbgCJ-c.js";import"./use-infinite-scroll-C3O-KBl8.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-eyAPH6o3.js";import"./card-B0f_2u3D.js";import"./select-DWrifuH3.js";import"./textarea-C_aquDFn.js";import"./connection-form-helpers-C1xXkycr.js";import"./collection-tabs-u5enzkVl.js";import"./badge-Bu9TYgek.js";import"./useSuspenseInfiniteQuery-3ceZ8_NX.js";import"./use-ai-providers-DEYBcyVN.js";import"./use-org-auth-client-BmTFN65s.js";import"./use-organization-roles-DcrcrZqB.js";import"./decopilot-sse-pool-B-6W79yQ.js";import"./required-auth-layout-CWHGEbNY.js";import"./use-org-sso-DWfsG4pV.js";import"./index-C8ZRu3O2.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-decopilot-events-ByGtTT-X.js";const Do="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function Lo(){const t=C.c(13),e=H();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),t[0]=l):l=t[0];let n;t[1]!==e?(n=e("routes.commerceOnboarding.connectModal.quote"),t[1]=e,t[2]=n):n=t[2];let o;t[3]!==n?(o=s.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",n,"”"]}),t[3]=n,t[4]=o):o=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("img",{src:Do,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=r):r=t[5];let i;t[6]!==e?(i=e("routes.commerceOnboarding.connectModal.quoteAuthor"),t[6]=e,t[7]=i):i=t[7];let a;t[8]!==i?(a=s.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[r,s.jsx("span",{className:"text-base font-medium",children:i})]}),t[8]=i,t[9]=a):a=t[9];let d;return t[10]!==o||t[11]!==a?(d=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[l,o,a]}),t[10]=o,t[11]=a,t[12]=d):d=t[12],d}function Go(){const t=C.c(19),e=H();let l;t[0]!==e?(l=e("routes.commerceOnboarding.connectModal.trustRevoke"),t[0]=e,t[1]=l):l=t[1];let n;t[2]!==l?(n={Icon:Hl,label:l},t[2]=l,t[3]=n):n=t[3];let o;t[4]!==e?(o=e("routes.commerceOnboarding.connectModal.trustEncrypted"),t[4]=e,t[5]=o):o=t[5];let r;t[6]!==o?(r={Icon:il,label:o},t[6]=o,t[7]=r):r=t[7];let i;t[8]!==e?(i=e("routes.commerceOnboarding.connectModal.trustNeverSold"),t[8]=e,t[9]=i):i=t[9];let a;t[10]!==i?(a={Icon:Bl,label:i},t[10]=i,t[11]=a):a=t[11];let d;t[12]!==n||t[13]!==r||t[14]!==a?(d=[n,r,a],t[12]=n,t[13]=r,t[14]=a,t[15]=d):d=t[15];const c=d;let m;t[16]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"h-px w-full bg-white/15"}),t[16]=m):m=t[16];let f;return t[17]!==c?(f=s.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[m,s.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:c.map(Ho)})]}),t[17]=c,t[18]=f):f=t[18],f}function Ho(t){const{Icon:e,label:l}=t;return s.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[s.jsx(e,{className:"size-4 shrink-0 opacity-85"}),l]},l)}function Bo(t){const e=C.c(22),{siteHost:l,footer:n,onClose:o,children:r}=t,i=H(),a=l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null;let d;e[0]!==o||e[1]!==i?(d=o&&s.jsx("button",{type:"button",onClick:o,"aria-label":i("routes.commerceOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:s.jsx(Gl,{size:18})}),e[0]=o,e[1]=i,e[2]=d):d=e[2];let c,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),m=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=c,e[4]=m):(c=e[3],m=e[4]);let f;e[5]!==a||e[6]!==l?(f=l&&s.jsxs(s.Fragment,{children:[s.jsx(zs,{size:16,className:"shrink-0 text-foreground/25"}),a&&s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:s.jsx("img",{src:a,alt:"",className:"size-full"})}),s.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:l})]}),e[5]=a,e[6]=l,e[7]=f):f=e[7];let u;e[8]!==f?(u=s.jsxs("div",{className:"flex items-center gap-2",children:[c,m,f]}),e[8]=f,e[9]=u):u=e[9];let h;e[10]!==n?(h=s.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:n}),e[10]=n,e[11]=h):h=e[11];let p;e[12]!==r||e[13]!==u||e[14]!==h?(p=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[u,r,h]}),e[12]=r,e[13]=u,e[14]=h,e[15]=p):p=e[15];let b,x;e[16]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),x=s.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=b,e[17]=x):(b=e[16],x=e[17]);let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[b,x,s.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[s.jsx("div",{className:"flex-1"}),s.jsx(Lo,{}),s.jsx("div",{className:"flex-1"}),s.jsx(Go,{})]})]}),e[18]=g):g=e[18];let j;return e[19]!==d||e[20]!==p?(j=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[d,p,g]}),e[19]=d,e[20]=p,e[21]=j):j=e[21],j}function Uo(t){const e=C.c(5),{ready:l,pending:n,label:o,onClick:r,children:i}=t,a=n||!l,d=l&&!n?i:null;let c;return e[0]!==o||e[1]!==r||e[2]!==a||e[3]!==d?(c=s.jsxs(Ns,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:r,disabled:a,children:[o,d]}),e[0]=o,e[1]=r,e[2]=a,e[3]=d,e[4]=c):c=e[4],c}function Wo(t){const e=C.c(22),{siteUrl:l}=t,n=ve(),{org:o}=re(),r=H();let i;e[0]!==n||e[1]!==o.id||e[2]!==o.slug?(i=()=>{localStorage.setItem(rl.sidebarOpen(),JSON.stringify(!1)),n({to:"/$org/$taskId",params:{org:o.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:El(o.id),main:zl($s.COMMERCE_DISCOVERY(o.id),Ol),sidepanel:0}})},e[0]=n,e[1]=o.id,e[2]=o.slug,e[3]=i):i=e[3];const a=i;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Tl,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=d):d=e[4];let c;e[5]!==r?(c=r("routes.commerceOnboarding.connectModal.dialogTitle"),e[5]=r,e[6]=c):c=e[6];let m;e[7]!==c?(m=s.jsx(Is,{className:"sr-only",children:c}),e[7]=c,e[8]=m):m=e[8];let f;e[9]!==a||e[10]!==r?(f=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:r("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(Ns,{type:"button",size:"xl",className:"w-full",onClick:a,children:[r("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(As,{size:18})]})]}),e[9]=a,e[10]=r,e[11]=f):f=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(wl,{}),e[12]=u):u=e[12];let h;e[13]!==a||e[14]!==l?(h=s.jsx(B.Suspense,{fallback:u,children:s.jsx(Yo,{siteUrlFromUrl:l,onComplete:a})}),e[13]=a,e[14]=l,e[15]=h):h=e[15];let p;e[16]!==f||e[17]!==h?(p=s.jsx(Zt,{fallback:f,children:h}),e[16]=f,e[17]=h,e[18]=p):p=e[18];let b;return e[19]!==m||e[20]!==p?(b=s.jsx(Ps,{open:!0,children:s.jsxs(Il,{children:[d,s.jsxs(al,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:Vo,onPointerDownOutside:Ko,onInteractOutside:qo,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[m,p]})]})}),e[19]=m,e[20]=p,e[21]=b):b=e[21],b}function qo(t){return t.preventDefault()}function Ko(t){return t.preventDefault()}function Vo(t){return t.preventDefault()}function Yo({siteUrlFromUrl:t,onComplete:e}){const l=H(),{org:n}=re(),o=$s.COMMERCE_DISCOVERY(n.id),r=Rl({connectionId:Fl,orgId:n.id,orgSlug:n.slug}),a=cl({queryKey:ws.commerceDiscoveryConnection(n.id,o),queryFn:async()=>{const v=await r.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return Ut(v)},retry:!1}).data.item,d=typeof a?.metadata?.siteUrl=="string"?a.metadata.siteUrl:void 0,c=t||d,m=Cl(c),[f,u]=B.useState(!0),[h,p]=B.useState(null),b=is({mutationFn:async v=>Ut(await r.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:v}})),retry:!1}),x=is({mutationFn:async v=>Ut(await r.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:v}})),retry:!1}),g=async()=>{p(null),oe("commerce_onboarding_open_report_clicked",{domain:m??void 0,organization_id:n.id});const v=c?Ml(c):null;if(v?.ok)try{let S=await x.mutateAsync(v.value);if(S.triggered||(oe("commerce_onboarding_run_reclaim",{domain:m??void 0,organization_id:n.id,reason:S.reason??"not_upgraded"}),await b.mutateAsync(v.value),S=await x.mutateAsync(v.value)),!S.triggered){oe("commerce_onboarding_run_failed",{domain:m??void 0,organization_id:n.id,error:S.reason??"not_triggered"}),p(l("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(S){oe("commerce_onboarding_run_failed",{domain:m??void 0,organization_id:n.id,error:S instanceof Error?S.message:String(S)}),p(l("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},j=Ll("demo_mode"),_=f||j;return s.jsx(Bo,{siteHost:m,footer:s.jsxs(s.Fragment,{children:[h?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:h}):null,s.jsx(Uo,{ready:_,pending:x.isPending,label:x.isPending?l("routes.commerceOnboarding.connectModal.openingReport"):l(_?"routes.commerceOnboarding.connectModal.viewFullReport":"routes.commerceOnboarding.connectModal.connectToolToContinue"),onClick:()=>{g()},children:s.jsx(As,{size:18})})]}),children:s.jsx(kl,{org:n,cdConnectionId:o,siteUrl:c,onReadinessChange:u})})}function Xo(t){const e=C.c(11),{onPointerDown:l,onDoubleClick:n}=t,o=H(),{state:r,isMobile:i}=xt();if(i||r==="collapsed")return null;let a;e[0]!==o?(a=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=a):a=e[1];let d;e[2]!==o?(d=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=d):d=e[3];let c,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},m=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=m):(c=e[4],m=e[5]);let f;return e[6]!==n||e[7]!==l||e[8]!==a||e[9]!==d?(f=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":a,title:d,onPointerDown:l,onDoubleClick:n,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:m}),e[6]=n,e[7]=l,e[8]=a,e[9]=d,e[10]=f):f=e[10],f}const ns=240,Qo=400,Jo="sidebar.width";function vt(t){return Math.max(ns,Math.min(Qo,t))}function Zo(){const t=C.c(11),[e,l]=Ot(Jo,en),n=B.useRef(null);let o;t[0]!==l||t[1]!==e?(o=m=>{m.preventDefault();const f=m.clientX,u=vt(e),h=n.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),p=h?Array.from(h.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of p)g.style.transition="none";const b=g=>{const j=vt(u+(g.clientX-f));h?.style.setProperty("--sidebar-width",`${j}px`)},x=g=>{const j=vt(u+(g.clientX-f));l(j);for(const _ of p)_.style.transition="";window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",x),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",b),window.addEventListener("pointerup",x)},t[0]=l,t[1]=e,t[2]=o):o=t[2];const r=o;let i;t[3]!==l?(i=()=>{l(ns)},t[3]=l,t[4]=i):i=t[4];const a=i;let d;t[5]!==e?(d=vt(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==r||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:n,onStartResize:r,resetWidth:a},t[7]=r,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function en(t){return typeof t=="number"?vt(t):ns}function Ys(){return[]}function Xs(t){const e=C.c(3),{children:l}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=n):n=e[0];let o;return e[1]!==l?(o=s.jsxs(ts,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[n,s.jsx(ss,{children:s.jsx(ie,{className:"gap-0.5",children:l})})]}),e[1]=l,e[2]=o):o=e[2],o}function Qs(t){const e=C.c(18),{item:l}=t,{isMobile:n,setOpenMobile:o}=xt();let r;e[0]!==n||e[1]!==l||e[2]!==o?(r=()=>{oe("nav_item_clicked",{nav_key:l.key,nav_label:l.label,is_active:!!l.isActive,is_mobile:n}),l.onClick?.(),n&&o(!1)},e[0]=n,e[1]=l,e[2]=o,e[3]=r):r=e[3];const i=r,a=l.key,d=l.isActive&&"z-10";let c;e[4]!==d?(c=G(d),e[4]=d,e[5]=c):c=e[5];let m;e[6]!==l.label?(m=s.jsx("span",{children:l.label}),e[6]=l.label,e[7]=m):m=e[7];let f;e[8]!==i||e[9]!==l.icon||e[10]!==l.isActive||e[11]!==l.label||e[12]!==m?(f=s.jsxs(ne,{onClick:i,isActive:l.isActive,tooltip:l.label,children:[l.icon,m]}),e[8]=i,e[9]=l.icon,e[10]=l.isActive,e[11]=l.label,e[12]=m,e[13]=f):f=e[13];let u;return e[14]!==l.key||e[15]!==c||e[16]!==f?(u=s.jsx(ee,{className:c,children:f},a),e[14]=l.key,e[15]=c,e[16]=f,e[17]=u):u=e[17],u}function tn(t){const e=C.c(12),{section:l}=t;switch(l.type){case"divider":{let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ks,{className:"my-2"}),e[0]=n):n=e[0],n}case"spacer":{let n;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex-1"}),e[1]=n):n=e[1],n}case"group":{const n=l.group.label,o=l.group.defaultExpanded;let r;e[2]!==l.group.items?(r=l.group.items.map(ln),e[2]=l.group.items,e[3]=r):r=e[3];let i;return e[4]!==l.group.defaultExpanded||e[5]!==l.group.label||e[6]!==r?(i=s.jsx(Xs,{label:n,defaultExpanded:o,children:r}),e[4]=l.group.defaultExpanded,e[5]=l.group.label,e[6]=r,e[7]=i):i=e[7],i}case"items":{let n;e[8]!==l.items?(n=l.items.map(sn),e[8]=l.items,e[9]=n):n=e[9];let o;return e[10]!==n?(o=s.jsx(ts,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(ss,{children:s.jsx(ie,{className:"gap-1.5",children:n})})}),e[10]=n,e[11]=o):o=e[11],o}case"custom":return l.content}}function sn(t){return s.jsx(Qs,{item:t},t.key)}function ln(t){return s.jsx(Qs,{item:t},t.key)}function on(t){const e=C.c(17),{sections:l,footer:n,additionalContent:o,header:r,variant:i,contentClassName:a}=t,d=i===void 0?"sidebar":i;let c;e[0]!==r?(c=r&&s.jsx(vl,{className:"sidebar-titlebar wco-drag shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:r}),e[0]=r,e[1]=c):c=e[1];let m;e[2]!==a?(m=G("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=m):m=e[3];let f;e[4]!==l?(f=l.map(nn),e[4]=l,e[5]=f):f=e[5];let u;e[6]!==o?(u=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[6]=o,e[7]=u):u=e[7];let h;e[8]!==m||e[9]!==f||e[10]!==u?(h=s.jsxs(Ms,{className:m,children:[f,u]}),e[8]=m,e[9]=f,e[10]=u,e[11]=h):h=e[11];let p;return e[12]!==n||e[13]!==c||e[14]!==h||e[15]!==d?(p=s.jsxs(yl,{variant:d,children:[c,h,n]}),e[12]=n,e[13]=c,e[14]=h,e[15]=d,e[16]=p):p=e[16],p}function nn(t,e){return s.jsx(tn,{section:t},e)}function Js(t){const e=C.c(2);let l;return e[0]!==t?(l=s.jsx(on,{...t}),e[0]=t,e[1]=l):l=e[1],l}Js.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,l)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(me,{className:"h-full bg-sidebar-accent rounded-md"})},l))})};function cs(t){const e=C.c(18),{item:l,onClose:n}=t,o=l.isActive&&"z-10";let r;e[0]!==o?(r=G(o),e[0]=o,e[1]=r):r=e[1];let i;e[2]!==l||e[3]!==n?(i=()=>{l.onClick?.(),n()},e[2]=l,e[3]=n,e[4]=i):i=e[4];let a;e[5]!==l.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:l.icon}),e[5]=l.icon,e[6]=a):a=e[6];let d;e[7]!==l.label?(d=s.jsx("span",{children:l.label}),e[7]=l.label,e[8]=d):d=e[8];let c;e[9]!==l.isActive||e[10]!==l.label||e[11]!==i||e[12]!==a||e[13]!==d?(c=s.jsxs(ne,{onClick:i,isActive:l.isActive,tooltip:l.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=l.isActive,e[10]=l.label,e[11]=i,e[12]=a,e[13]=d,e[14]=c):c=e[14];let m;return e[15]!==r||e[16]!==c?(m=s.jsx(ee,{className:r,children:c}),e[15]=r,e[16]=c,e[17]=m):m=e[17],m}function rn(t){const e=C.c(18),{section:l,onClose:n}=t;switch(l.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ks,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=l.group.label,r=l.group.defaultExpanded;let i;if(e[2]!==n||e[3]!==l.group.items){let d;e[5]!==n?(d=c=>s.jsx(cs,{item:c,onClose:n},c.key),e[5]=n,e[6]=d):d=e[6],i=l.group.items.map(d),e[2]=n,e[3]=l.group.items,e[4]=i}else i=e[4];let a;return e[7]!==l.group.defaultExpanded||e[8]!==l.group.label||e[9]!==i?(a=s.jsx(Xs,{label:o,defaultExpanded:r,children:i}),e[7]=l.group.defaultExpanded,e[8]=l.group.label,e[9]=i,e[10]=a):a=e[10],a}case"items":{let o;if(e[11]!==n||e[12]!==l.items){let i;e[14]!==n?(i=a=>s.jsx(cs,{item:a,onClose:n},a.key),e[14]=n,e[15]=i):i=e[15],o=l.items.map(i),e[11]=n,e[12]=l.items,e[13]=o}else o=e[13];let r;return e[16]!==o?(r=s.jsx(ts,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(ss,{children:s.jsx(ie,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=r):r=e[17],r}case"custom":return l.content}}function an(t){const e=C.c(27),{sections:l,onClose:n,footer:o,additionalContent:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Yt,{}),e[0]=i):i=e[0];let a;e[1]!==n?(a=s.jsx(os,{onNavigate:n}),e[1]=n,e[2]=a):a=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"flex-1"}),e[3]=d):d=e[3];const c=H();let m;e[4]!==c?(m=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=m):m=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Es,{size:16}),e[6]=f):f=e[6];let u;e[7]!==n||e[8]!==m?(u=s.jsx(Et,{onClick:n,"aria-label":m,children:f}),e[7]=n,e[8]=m,e[9]=u):u=e[9];let h;e[10]!==a||e[11]!==u?(h=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[i,a,d,u]}),e[10]=a,e[11]=u,e[12]=h):h=e[12];let p;if(e[13]!==n||e[14]!==l){let j;e[16]!==n?(j=(_,v)=>s.jsx(rn,{section:_,onClose:n},v),e[16]=n,e[17]=j):j=e[17],p=l.map(j),e[13]=n,e[14]=l,e[15]=p}else p=e[15];let b;e[18]!==r?(b=r&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:r}),e[18]=r,e[19]=b):b=e[19];let x;e[20]!==b||e[21]!==p?(x=s.jsxs(Ms,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[p,b]}),e[20]=b,e[21]=p,e[22]=x):x=e[22];let g;return e[23]!==o||e[24]!==x||e[25]!==h?(g=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[h,x,o]}),e[23]=o,e[24]=x,e[25]=h,e[26]=g):g=e[26],g}function ht(t){const e=C.c(26),{item:l,onClose:n}=t;let o;e[0]!==l.className?(o=G("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",l.className),e[0]=l.className,e[1]=o):o=e[1];const r=o;if(l.href){const m=l.external?"_blank":void 0,f=l.external?"noopener noreferrer":void 0;let u;e[2]!==l.icon?(u=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.icon}),e[2]=l.icon,e[3]=u):u=e[3];let h;e[4]!==l.label?(h=s.jsx("span",{className:"flex-1",children:l.label}),e[4]=l.label,e[5]=h):h=e[5];let p;return e[6]!==r||e[7]!==l.href||e[8]!==n||e[9]!==m||e[10]!==f||e[11]!==u||e[12]!==h?(p=s.jsxs("a",{href:l.href,target:m,rel:f,className:r,onClick:n,children:[u,h]}),e[6]=r,e[7]=l.href,e[8]=n,e[9]=m,e[10]=f,e[11]=u,e[12]=h,e[13]=p):p=e[13],p}let i;e[14]!==l||e[15]!==n?(i=()=>{l.onClick?.(),n()},e[14]=l,e[15]=n,e[16]=i):i=e[16];let a;e[17]!==l.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.icon}),e[17]=l.icon,e[18]=a):a=e[18];let d;e[19]!==l.label?(d=s.jsx("span",{className:"flex-1",children:l.label}),e[19]=l.label,e[20]=d):d=e[20];let c;return e[21]!==r||e[22]!==i||e[23]!==a||e[24]!==d?(c=s.jsxs("button",{type:"button",onClick:i,className:r,children:[a,d]}),e[21]=r,e[22]=i,e[23]=a,e[24]=d,e[25]=c):c=e[25],c}function cn(){const t=C.c(4),e=H();let l;t[0]!==e?(l=e("common.accountPopover.impersonating"),t[0]=e,t[1]=l):l=t[1];let n;return t[2]!==l?(n=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:l}),t[2]=l,t[3]=n):n=t[3],n}function ds(t){const e=C.c(38),{user:l,userImage:n,isImpersonating:o,isMobile:r}=t,i=H(),a=r?"py-4 border-b border-border":"py-3 mx-1 mt-1";let d;e[0]!==a?(d=G("flex items-center gap-3 px-4",a),e[0]=a,e[1]=d):d=e[1];const c=l?.name??"U";let m;e[2]!==c||e[3]!==n?(m=s.jsx(Xt,{url:n,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=n,e[4]=m):m=e[4];let f;e[5]!==i||e[6]!==l?.name?(f=l?.name??i("common.accountPopover.defaultUserName"),e[5]=i,e[6]=l?.name,e[7]=f):f=e[7];let u;e[8]!==f?(u=s.jsx("p",{className:"text-sm font-medium truncate",children:f}),e[8]=f,e[9]=u):u=e[9];let h;e[10]!==o?(h=o&&s.jsx(cn,{}),e[10]=o,e[11]=h):h=e[11];let p;e[12]!==u||e[13]!==h?(p=s.jsxs("div",{className:"flex items-center gap-2",children:[u,h]}),e[12]=u,e[13]=h,e[14]=p):p=e[14];const b=l?.email;let x;e[15]!==b?(x=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b}),e[15]=b,e[16]=x):x=e[16];let g;e[17]!==x||e[18]!==p?(g=s.jsxs("div",{className:"flex-1 min-w-0",children:[p,x]}),e[17]=x,e[18]=p,e[19]=g):g=e[19];let j;e[20]!==i||e[21]!==l?(j=()=>{l?.id&&navigator.clipboard.writeText(l.id).then(()=>{es.success(i("common.accountPopover.userIdCopied"))})},e[20]=i,e[21]=l,e[22]=j):j=e[22];let _;e[23]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(no,{size:14}),e[23]=_):_=e[23];let v;e[24]!==j?(v=s.jsx(Rt,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:_})}),e[24]=j,e[25]=v):v=e[25];let S;e[26]!==i?(S=i("common.accountPopover.copyUserId"),e[26]=i,e[27]=S):S=e[27];let w;e[28]!==S?(w=s.jsx(Ft,{side:"right",children:s.jsx("p",{className:"text-xs",children:S})}),e[28]=S,e[29]=w):w=e[29];let N;e[30]!==v||e[31]!==w?(N=s.jsx(Ls,{delayDuration:300,children:s.jsxs(Dt,{children:[v,w]})}),e[30]=v,e[31]=w,e[32]=N):N=e[32];let y;return e[33]!==g||e[34]!==N||e[35]!==d||e[36]!==m?(y=s.jsxs("div",{className:d,children:[m,g,N]}),e[33]=g,e[34]=N,e[35]=d,e[36]=m,e[37]=y):y=e[37],y}function ms(t){const e=C.c(35),{themeOptions:l,preferences:n,setPreferences:o,isMobile:r}=t,i=H(),a=r?"size-8":"size-7",d=r?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==d?(c=G("flex items-center justify-between border-t border-border/50",d),e[0]=d,e[1]=c):c=e[1];let m;if(e[2]!==a||e[3]!==n.theme||e[4]!==o||e[5]!==l){let S;e[7]!==a||e[8]!==n.theme||e[9]!==o?(S=w=>{const{value:N,icon:y,label:k}=w;return s.jsx("button",{type:"button","aria-label":k,onClick:()=>o(T=>({...T,theme:N})),className:G(a,"rounded-md flex items-center justify-center transition-colors",n.theme===N?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:y},N)},e[7]=a,e[8]=n.theme,e[9]=o,e[10]=S):S=e[10],m=l.map(S),e[2]=a,e[3]=n.theme,e[4]=o,e[5]=l,e[6]=m}else m=e[6];let f;e[11]!==m?(f=s.jsx("div",{className:"flex items-center gap-0.5",children:m}),e[11]=m,e[12]=f):f=e[12];let u;e[13]!==n.enableSounds||e[14]!==i?(u=n.enableSounds?i("common.accountPopover.disableSounds"):i("common.accountPopover.enableSounds"),e[13]=n.enableSounds,e[14]=i,e[15]=u):u=e[15];let h;e[16]!==o?(h=()=>o(dn),e[16]=o,e[17]=h):h=e[17];const p=n.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let b;e[18]!==a||e[19]!==p?(b=G(a,"rounded-md flex items-center justify-center transition-colors",p),e[18]=a,e[19]=p,e[20]=b):b=e[20];let x;e[21]!==n.enableSounds?(x=n.enableSounds?s.jsx(ql,{size:14}):s.jsx(Kl,{size:14}),e[21]=n.enableSounds,e[22]=x):x=e[22];let g;e[23]!==u||e[24]!==h||e[25]!==b||e[26]!==x?(g=s.jsx("button",{type:"button","aria-label":u,onClick:h,className:b,children:x}),e[23]=u,e[24]=h,e[25]=b,e[26]=x,e[27]=g):g=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.150.13"]}),e[28]=j):j=e[28];let _;e[29]!==g?(_=s.jsxs("div",{className:"flex items-center gap-2",children:[g,j]}),e[29]=g,e[30]=_):_=e[30];let v;return e[31]!==_||e[32]!==c||e[33]!==f?(v=s.jsxs("div",{className:c,children:[f,_]}),e[31]=_,e[32]=c,e[33]=f,e[34]=v):v=e[34],v}function dn(t){return{...t,enableSounds:!t.enableSounds}}function fs(t){const e=C.c(54),{user:l,userImage:n,menuItems:o,signOutItem:r,stopImpersonatingItem:i,isImpersonating:a,themeOptions:d,preferences:c,setPreferences:m,close:f,isMobile:u}=t;if(u){let v;e[0]!==a||e[1]!==l||e[2]!==n?(v=s.jsx(ds,{user:l,userImage:n,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=l,e[2]=n,e[3]=v):v=e[3];let S;if(e[4]!==f||e[5]!==o){let A;e[7]!==f?(A=I=>s.jsx(ht,{item:I,onClose:f},I.key),e[7]=f,e[8]=A):A=e[8],S=o.map(A),e[4]=f,e[5]=o,e[6]=S}else S=e[6];let w;e[9]!==f||e[10]!==i?(w=i&&s.jsx(ht,{item:i,onClose:f}),e[9]=f,e[10]=i,e[11]=w):w=e[11];let N;e[12]!==f||e[13]!==r?(N=s.jsx(ht,{item:r,onClose:f}),e[12]=f,e[13]=r,e[14]=N):N=e[14];let y;e[15]!==S||e[16]!==w||e[17]!==N?(y=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[S,w,N]})}),e[15]=S,e[16]=w,e[17]=N,e[18]=y):y=e[18];let k;e[19]!==c||e[20]!==m||e[21]!==d?(k=s.jsx(ms,{themeOptions:d,preferences:c,setPreferences:m,isMobile:!0}),e[19]=c,e[20]=m,e[21]=d,e[22]=k):k=e[22];let T;return e[23]!==v||e[24]!==y||e[25]!==k?(T=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,y,k]}),e[23]=v,e[24]=y,e[25]=k,e[26]=T):T=e[26],T}let h;e[27]!==a||e[28]!==l||e[29]!==n?(h=s.jsx(ds,{user:l,userImage:n,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=l,e[29]=n,e[30]=h):h=e[30];let p;if(e[31]!==f||e[32]!==o){let v;e[34]!==f?(v=S=>s.jsx(ht,{item:S,onClose:f},S.key),e[34]=f,e[35]=v):v=e[35],p=o.map(v),e[31]=f,e[32]=o,e[33]=p}else p=e[33];let b;e[36]!==f||e[37]!==i?(b=i&&s.jsx(ht,{item:i,onClose:f}),e[36]=f,e[37]=i,e[38]=b):b=e[38];let x;e[39]!==f||e[40]!==r?(x=s.jsx(ht,{item:r,onClose:f}),e[39]=f,e[40]=r,e[41]=x):x=e[41];let g;e[42]!==p||e[43]!==b||e[44]!==x?(g=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[p,b,x]}),e[42]=p,e[43]=b,e[44]=x,e[45]=g):g=e[45];let j;e[46]!==c||e[47]!==m||e[48]!==d?(j=s.jsx(ms,{themeOptions:d,preferences:c,setPreferences:m,isMobile:!1}),e[46]=c,e[47]=m,e[48]=d,e[49]=j):j=e[49];let _;return e[50]!==h||e[51]!==g||e[52]!==j?(_=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[h,g,j]})}),e[50]=h,e[51]=g,e[52]=j,e[53]=_):_=e[53],_}function Qt(){const t=C.c(99),e=H(),{data:l}=$t.useSession(),{org:n}=re(),o=ve();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org",shouldThrow:!1},t[0]=r):r=t[0];const a=dl(r)?.params.org,[d,c]=ml(),m=Ts(),{isAdmin:f}=ho(),[u,h]=B.useState(!1),p=l?.user,b=p?.image,x=!!l?.session?.impersonatedBy;let g;t[1]===Symbol.for("react.memo_cache_sentinel")?(g=()=>h(!1),t[1]=g):g=t[1];const j=g;let _;t[2]!==e?(_=e("common.accountPopover.preferences"),t[2]=e,t[3]=_):_=t[3];let v;t[4]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Lt,{size:16}),t[4]=v):v=t[4];let S;t[5]!==o||t[6]!==a?(S=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=S):S=t[7];let w;t[8]!==_||t[9]!==S?(w={key:"preferences",label:_,icon:v,onClick:S},t[8]=_,t[9]=S,t[10]=w):w=t[10];let N;t[11]!==n||t[12]!==o||t[13]!==e?(N=n?[{key:"install-app",label:e("common.accountPopover.addToHomeScreen"),icon:s.jsx(io,{size:16}),onClick:()=>{o({to:"/$org/install",params:{org:n.slug}})}},{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(ao,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:n.slug}})}}]:[],t[11]=n,t[12]=o,t[13]=e,t[14]=N):N=t[14];let y;t[15]!==e?(y=e("common.accountPopover.termsOfUse"),t[15]=e,t[16]=y):y=t[16];let k;t[17]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Wl,{size:16}),t[17]=k):k=t[17];let T;t[18]!==y?(T={key:"terms",label:y,icon:k,href:"https://www.decocms.com/terms-of-use",external:!0},t[18]=y,t[19]=T):T=t[19];let A;t[20]!==e?(A=e("common.accountPopover.privacyPolicy"),t[20]=e,t[21]=A):A=t[21];let I;t[22]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(uo,{size:16}),t[22]=I):I=t[22];let O;t[23]!==A?(O={key:"privacy",label:A,icon:I,href:"https://www.decocms.com/privacy-policy",external:!0},t[23]=A,t[24]=O):O=t[24];let P;t[25]!==e?(P=e("common.accountPopover.githubRepo"),t[25]=e,t[26]=P):P=t[26];let E;t[27]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(fl,{className:"w-4 h-4"}),t[27]=E):E=t[27];let z;t[28]!==P?(z={key:"github",label:P,icon:E,href:"https://github.com/decocms/studio",external:!0},t[28]=P,t[29]=z):z=t[29];let R;t[30]!==e?(R=e("common.accountPopover.community"),t[30]=e,t[31]=R):R=t[31];let $;t[32]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(po,{size:16}),t[32]=$):$=t[32];let D;t[33]!==R?(D={key:"community",label:R,icon:$,href:"https://decocms.com/discord",external:!0},t[33]=R,t[34]=D):D=t[34];let L;t[35]!==e?(L=e("common.accountPopover.homepage"),t[35]=e,t[36]=L):L=t[36];let F;t[37]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(ro,{size:16}),t[37]=F):F=t[37];let q;t[38]!==L?(q={key:"homepage",label:L,icon:F,href:"https://decocms.com",external:!0},t[38]=L,t[39]=q):q=t[39];let Y;t[40]!==f||t[41]!==o||t[42]!==e?(Y=f?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(Ul,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[40]=f,t[41]=o,t[42]=e,t[43]=Y):Y=t[43];let fe;t[44]!==O||t[45]!==z||t[46]!==D||t[47]!==q||t[48]!==Y||t[49]!==w||t[50]!==N||t[51]!==T?(fe=[w,...N,T,O,z,D,q,...Y],t[44]=O,t[45]=z,t[46]=D,t[47]=q,t[48]=Y,t[49]=w,t[50]=N,t[51]=T,t[52]=fe):fe=t[52];const ue=fe;let X;t[53]!==e?(X=e("common.accountPopover.signOut"),t[53]=e,t[54]=X):X=t[54];let be;t[55]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(as,{size:16}),t[55]=be):be=t[55];let ae;t[56]!==X?(ae={key:"logout",label:X,icon:be,onClick:fn},t[56]=X,t[57]=ae):ae=t[57];const gt=ae;let ce;t[58]!==x||t[59]!==e?(ce=x?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(as,{size:16}),onClick:async()=>{const{error:K}=await $t.admin.stopImpersonating();if(K){es.error(K.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[58]=x,t[59]=e,t[60]=ce):ce=t[60];const ye=ce;let _e;t[61]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsx(mo,{size:14}),t[61]=_e):_e=t[61];let pe;t[62]!==e?(pe=e("common.accountPopover.lightTheme"),t[62]=e,t[63]=pe):pe=t[63];let he;t[64]!==pe?(he={value:"light",icon:_e,label:pe},t[64]=pe,t[65]=he):he=t[65];let V;t[66]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(fo,{size:14}),t[66]=V):V=t[66];let te;t[67]!==e?(te=e("common.accountPopover.darkTheme"),t[67]=e,t[68]=te):te=t[68];let Q;t[69]!==te?(Q={value:"dark",icon:V,label:te},t[69]=te,t[70]=Q):Q=t[70];let de;t[71]===Symbol.for("react.memo_cache_sentinel")?(de=s.jsx(co,{size:14}),t[71]=de):de=t[71];let J;t[72]!==e?(J=e("common.accountPopover.systemTheme"),t[72]=e,t[73]=J):J=t[73];let se;t[74]!==J?(se={value:"system",icon:de,label:J},t[74]=J,t[75]=se):se=t[75];let xe;t[76]!==he||t[77]!==Q||t[78]!==se?(xe=[he,Q,se],t[76]=he,t[77]=Q,t[78]=se,t[79]=xe):xe=t[79];const bt=xe;let je;t[80]!==x||t[81]!==m||t[82]!==ue||t[83]!==d||t[84]!==c||t[85]!==gt||t[86]!==ye||t[87]!==bt||t[88]!==p||t[89]!==b?(je={user:p,userImage:b,menuItems:ue,signOutItem:gt,stopImpersonatingItem:ye,isImpersonating:x,themeOptions:bt,preferences:d,setPreferences:c,close:j,isMobile:m},t[80]=x,t[81]=m,t[82]=ue,t[83]=d,t[84]=c,t[85]=gt,t[86]=ye,t[87]=bt,t[88]=p,t[89]=b,t[90]=je):je=t[90];const ge=je;let jt;return t[91]!==x||t[92]!==m||t[93]!==u||t[94]!==ge||t[95]!==e||t[96]!==p?.name||t[97]!==b?(jt=s.jsx(s.Fragment,{children:m?s.jsxs(so,{open:u,onOpenChange:h,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>h(!0),className:G("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",x&&"border-2 border-dashed border-warning"),children:[s.jsx(Xt,{url:b,fallback:p?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:p?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(lo,{className:"h-[80dvh] p-0",children:[s.jsx(oo,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(fs,{...ge})]})]}):s.jsxs(Rs,{open:u,onOpenChange:h,children:[s.jsx(Fs,{asChild:!0,children:s.jsxs(ne,{tooltip:p?.name??e("common.accountPopover.defaultAccountLabel"),className:G("rounded-md",x&&"border-2 border-dashed border-warning"),children:[s.jsx(Xt,{url:b,fallback:p?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:p?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(Ds,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:mn,children:s.jsx(fs,{...ge})})]})}),t[91]=x,t[92]=m,t[93]=u,t[94]=ge,t[95]=e,t[96]=p?.name,t[97]=b,t[98]=jt):jt=t[98],jt}function mn(t){return t.preventDefault()}function fn(){oe("signed_out",{source:"account_popover"}),ul(),$t.signOut()}class un extends B.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,l){}render(){return this.state.hasError?null:this.props.children}}function pn(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function hn(){const t=C.c(17),e=ve(),{org:l}=re(),{hasDecoKey:n,balanceDollars:o}=Jl();if(!n)return null;let r;t[0]!==o?(r=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=r):r=t[1];let i;t[2]!==o?(i=G(o!=null&&pn(o)),t[2]=o,t[3]=i):i=t[3];let a;t[4]!==e||t[5]!==l.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:l.slug}}),t[4]=e,t[5]=l.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Vl,{}),t[7]=d):d=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let m;t[10]!==c?(m=s.jsx("span",{children:c}),t[10]=c,t[11]=m):m=t[11];let f;return t[12]!==r||t[13]!==i||t[14]!==a||t[15]!==m?(f=s.jsx(ie,{children:s.jsx(ee,{children:s.jsxs(ne,{tooltip:r,className:i,onClick:a,children:[d,m]})})}),t[12]=r,t[13]=i,t[14]=a,t[15]=m,t[16]=f):f=t[16],f}function us(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(un,{children:s.jsx(B.Suspense,{fallback:null,children:s.jsx(hn,{})})}),t[0]=e):e=t[0],e}function xn(){const t=C.c(14),e=H(),l=ve(),{org:n}=re();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let r;t[2]!==l||t[3]!==n.slug?(r=()=>l({to:"/$org/settings",params:{org:n.slug}}),t[2]=l,t[3]=n.slug,t[4]=r):r=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Lt,{}),t[5]=i):i=t[5];let a;t[6]!==e?(a=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=a):a=t[7];let d;t[8]!==a?(d=s.jsx("span",{children:a}),t[8]=a,t[9]=d):d=t[9];let c;return t[10]!==o||t[11]!==r||t[12]!==d?(c=s.jsxs(ne,{tooltip:o,onClick:r,children:[i,d]}),t[10]=o,t[11]=r,t[12]=d,t[13]=c):c=t[13],c}function gn(){const t=C.c(9),e=H(),l=ve(),{org:n}=re();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let r;t[2]!==l||t[3]!==n.slug?(r=()=>l({to:"/$org/settings",params:{org:n.slug}}),t[2]=l,t[3]=n.slug,t[4]=r):r=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Lt,{size:15}),t[5]=i):i=t[5];let a;return t[6]!==o||t[7]!==r?(a=s.jsx("button",{type:"button","aria-label":o,onClick:r,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:i}),t[6]=o,t[7]=r,t[8]=a):a=t[8],a}function ps(){const t=C.c(29),e=H(),[l,n]=B.useState(!1);let o;t[0]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=o):o=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Os,{}),t[2]=r):r=t[2];let i;t[3]!==e?(i=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=i):i=t[4];let a;t[5]!==i?(a=s.jsx("span",{children:i}),t[5]=i,t[6]=a):a=t[6];let d;t[7]!==o||t[8]!==a?(d=s.jsx(ee,{children:s.jsx(Gs,{trigger:s.jsxs(ne,{tooltip:o,children:[r,a]})})}),t[7]=o,t[8]=a,t[9]=d):d=t[9];let c;t[10]!==e?(c=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=c):c=t[11];let m,f;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=()=>n(!0),f=s.jsx(xo,{}),t[12]=m,t[13]=f):(m=t[12],f=t[13]);let u;t[14]!==e?(u=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=u):u=t[15];let h;t[16]!==u?(h=s.jsx("span",{children:u}),t[16]=u,t[17]=h):h=t[17];let p;t[18]!==c||t[19]!==h?(p=s.jsx(ee,{children:s.jsxs(ne,{tooltip:c,onClick:m,children:[f,h]})}),t[18]=c,t[19]=h,t[20]=p):p=t[20];let b;t[21]!==p||t[22]!==d?(b=s.jsxs(ie,{className:"gap-0.5",children:[d,p]}),t[21]=p,t[22]=d,t[23]=b):b=t[23];let x;t[24]!==l?(x=s.jsx(Zl,{open:l,onOpenChange:n,mode:"browse"}),t[24]=l,t[25]=x):x=t[25];let g;return t[26]!==b||t[27]!==x?(g=s.jsxs(s.Fragment,{children:[b,x]}),t[26]=b,t[27]=x,t[28]=g):g=t[28],g}function hs(){const t=C.c(10),e=H();let l;t[0]!==e?(l=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=l):l=t[1];let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Os,{}),t[2]=n):n=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let r;t[5]!==o?(r=s.jsx("span",{children:o}),t[5]=o,t[6]=r):r=t[6];let i;return t[7]!==l||t[8]!==r?(i=s.jsx(ie,{className:"gap-0.5",children:s.jsx(ee,{children:s.jsx(Gs,{trigger:s.jsxs(ne,{tooltip:l,children:[n,r]})})})}),t[7]=l,t[8]=r,t[9]=i):i=t[9],i}function bn(){const t=C.c(17),{state:e}=xt(),l=e==="collapsed",n=ls(),o=!n;if(l){let c;t[0]!==o?(c=o&&s.jsx(us,{}),t[0]=o,t[1]=c):c=t[1];let m;t[2]!==n?(m=n?s.jsx(hs,{}):s.jsx(ps,{}),t[2]=n,t[3]=m):m=t[3];let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ee,{children:s.jsx(xn,{})}),t[4]=f):f=t[4];let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs(ie,{children:[f,s.jsx(ee,{children:s.jsx(Qt,{})})]}),t[5]=u):u=t[5];let h;return t[6]!==c||t[7]!==m?(h=s.jsxs(Vt,{className:"px-2 pb-3 gap-1",children:[c,m,u]}),t[6]=c,t[7]=m,t[8]=h):h=t[8],h}let r;t[9]!==o?(r=o&&s.jsx(us,{}),t[9]=o,t[10]=r):r=t[10];let i;t[11]!==n?(i=n?s.jsx(hs,{}):s.jsx(ps,{}),t[11]=n,t[12]=i):i=t[12];let a;t[13]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(ie,{className:"gap-0.5",children:s.jsx(ee,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Qt,{})}),s.jsx(gn,{})]})})}),t[13]=a):a=t[13];let d;return t[14]!==r||t[15]!==i?(d=s.jsxs(Vt,{className:"px-2 pb-3 gap-0.5",children:[r,i,a]}),t[14]=r,t[15]=i,t[16]=d):d=t[16],d}function jn(){const t=C.c(11),e=H(),l=ve(),{org:n}=re(),{setOpenMobile:o}=xt();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(ie,{children:s.jsx(ee,{children:s.jsx(Qt,{})})})}),t[0]=r):r=t[0];let i;t[1]!==e?(i=e("sidebar.sidebarFooterMobile.settings"),t[1]=e,t[2]=i):i=t[2];let a;t[3]!==l||t[4]!==n.slug||t[5]!==o?(a=()=>{l({to:"/$org/settings",params:{org:n.slug}}),o(!1)},t[3]=l,t[4]=n.slug,t[5]=o,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Lt,{className:"size-4"}),t[7]=d):d=t[7];let c;return t[8]!==i||t[9]!==a?(c=s.jsx(Vt,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[r,s.jsx(Et,{"aria-label":i,onClick:a,children:d})]})}),t[8]=i,t[9]=a,t[10]=c):c=t[10],c}function xs(t){const e=C.c(15),{className:l,wrapperClassName:n,children:o}=t,[r,i]=B.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=g=>{g&&i(g.scrollHeight>g.clientHeight+1)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=g=>{const j=g.currentTarget;i(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const m=c;let f;e[2]!==n?(f=G("relative",n),e[2]=n,e[3]=f):f=e[3];let u;e[4]!==o||e[5]!==l?(u=s.jsx("div",{ref:d,onScroll:m,className:l,children:o}),e[4]=o,e[5]=l,e[6]=u):u=e[6];const h=r?"opacity-100":"opacity-0";let p;e[7]!==h?(p=G("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",h),e[7]=h,e[8]=p):p=e[8];let b;e[9]!==p?(b=s.jsx("div",{"aria-hidden":!0,className:p}),e[9]=p,e[10]=b):b=e[10];let x;return e[11]!==f||e[12]!==u||e[13]!==b?(x=s.jsxs("div",{className:f,children:[u,b]}),e[11]=f,e[12]=u,e[13]=b,e[14]=x):x=e[14],x}function vn(t){const e=C.c(9),{virtualMcpId:l,size:n,showAutomationBadge:o}=t,r=n===void 0?"sm":n,i=H();let a;e[0]!==r||e[1]!==l?(a=l?s.jsx(yn,{virtualMcpId:l,size:r}):s.jsx(At,{icon:null,name:"?",size:r}),e[0]=r,e[1]=l,e[2]=a):a=e[2];let d;e[3]!==o||e[4]!==i?(d=o&&s.jsx("span",{"aria-label":i("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(qs,{size:10,className:"text-white"})}),e[3]=o,e[4]=i,e[5]=d):d=e[5];let c;return e[6]!==a||e[7]!==d?(c=s.jsxs("div",{className:"relative shrink-0",children:[a,d]}),e[6]=a,e[7]=d,e[8]=c):c=e[8],c}function yn(t){const e=C.c(6),{virtualMcpId:l,size:n}=t,o=Ws(l);if(!o){let a;return e[0]!==n?(a=s.jsx(At,{icon:null,name:"?",size:n}),e[0]=n,e[1]=a):a=e[1],a}const r=o.icon??null;let i;return e[2]!==o.title||e[3]!==n||e[4]!==r?(i=s.jsx(At,{icon:r,name:o.title,size:n}),e[2]=o.title,e[3]=n,e[4]=r,e[5]=i):i=e[5],i}function Wt(t){const e=C.c(51),{open:l,onOpenChange:n}=t,[o,r]=B.useState(""),{org:i}=re(),{setTaskId:a}=Bs(),d=Us(),c=H();let m,f,u;e[0]!==i.id||e[1]!==o?(u=o.trim(),f=pl,m=ws.globalSearch(i.id,u),e[0]=i.id,e[1]=o,e[2]=m,e[3]=f,e[4]=u):(m=e[2],f=e[3],u=e[4]);let h;e[5]!==d||e[6]!==u?(h=async()=>await d.call("GLOBAL_SEARCH",{query:u,limit:u?20:10}),e[5]=d,e[6]=u,e[7]=h):h=e[7];let p;e[8]!==l||e[9]!==m||e[10]!==h?(p={queryKey:m,enabled:l,queryFn:h,staleTime:1e4},e[8]=l,e[9]=m,e[10]=h,e[11]=p):p=e[11];const{data:b,isFetching:x}=f(p);let g;e[12]!==b?.items?(g=b?.items??[],e[12]=b?.items,e[13]=g):g=e[13];const j=g;let _;e[14]!==n?(_=$=>{$||r(""),n($)},e[14]=n,e[15]=_):_=e[15];const v=_;let S;e[16]!==v||e[17]!==a?(S=$=>{v(!1),a($.id,$.virtual_mcp_id??void 0)},e[16]=v,e[17]=a,e[18]=S):S=e[18];const w=S;let N;e[19]!==c?(N=c("tasksPanel.globalSearchDialog.title"),e[19]=c,e[20]=N):N=e[20];let y;e[21]!==N?(y=s.jsx(Is,{children:N}),e[21]=N,e[22]=y):y=e[22];let k;e[23]!==c?(k=c("tasksPanel.globalSearchDialog.description"),e[23]=c,e[24]=k):k=e[24];let T;e[25]!==k?(T=s.jsx(Pl,{children:k}),e[25]=k,e[26]=T):T=e[26];let A;e[27]!==T||e[28]!==y?(A=s.jsxs($l,{className:"sr-only",children:[y,T]}),e[27]=T,e[28]=y,e[29]=A):A=e[29];let I;e[30]!==c?(I=c("tasksPanel.globalSearchDialog.placeholder"),e[30]=c,e[31]=I):I=e[31];let O;e[32]!==o||e[33]!==I?(O=s.jsx(Mo,{value:o,onValueChange:r,placeholder:I}),e[32]=o,e[33]=I,e[34]=O):O=e[34];let P;e[35]!==w||e[36]!==x||e[37]!==j||e[38]!==c||e[39]!==u?(P=s.jsx(No,{children:x&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.searching")}):j.length===0?s.jsx(wo,{children:c("tasksPanel.globalSearchDialog.noResults")}):s.jsx(Co,{heading:u?void 0:c("tasksPanel.globalSearchDialog.recent"),children:j.map($=>$.type==="thread"?s.jsxs(ko,{value:`thread:${$.id}:${$.title}`,onSelect:()=>w($),className:"gap-2.5",children:[s.jsx(vn,{virtualMcpId:$.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:$.title||c("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date($.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${$.id}`):null)})}),e[35]=w,e[36]=x,e[37]=j,e[38]=c,e[39]=u,e[40]=P):P=e[40];let E;e[41]!==O||e[42]!==P?(E=s.jsxs(To,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[O,P]}),e[41]=O,e[42]=P,e[43]=E):E=e[43];let z;e[44]!==A||e[45]!==E?(z=s.jsxs(Al,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[A,E]}),e[44]=A,e[45]=E,e[46]=z):z=e[46];let R;return e[47]!==v||e[48]!==l||e[49]!==z?(R=s.jsx(Ps,{open:l,onOpenChange:v,children:z}),e[47]=v,e[48]=l,e[49]=z,e[50]=R):R=e[50],R}function _n(t){return t==="ephemeral"||t.startsWith("thread:")}function Zs(t){const e=C.c(45),{task:l,isActive:n,onClick:o,onArchive:r,showAutomationBadge:i,showAgentIcon:a,hideStatusIdle:d,indented:c}=t,m=H(),f=$o(l.status),u=f.icon,h=l.metadata?.kind==="tool_call_run",p=Ws(h?void 0:l.virtual_mcp_id);let b;e[0]!==p?(b=Eo(p),e[0]=p,e[1]=b):b=e[1];const x=b;Ao(6e4);const g=i||!!l.trigger_id,j=l.id,_="button",v=0;let S;e[2]!==o?(S=F=>{F.target===F.currentTarget&&(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),o())},e[2]=o,e[3]=S):S=e[3];const w=c?"-ml-4 pl-6":"pl-[7px]",N=n?"bg-accent text-accent-foreground":"hover:bg-accent/60";let y;e[4]!==w||e[5]!==N?(y=G("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",w,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",N),e[4]=w,e[5]=N,e[6]=y):y=e[6];let k;e[7]!==h||e[8]!==a||e[9]!==p?.icon||e[10]!==p?.title?(k=a&&!h&&s.jsx(At,{icon:p?.icon??null,name:p?.title??"?",size:"2xs"}),e[7]=h,e[8]=a,e[9]=p?.icon,e[10]=p?.title,e[11]=k):k=e[11];let T;e[12]!==g||e[13]!==m?(T=g&&s.jsx(qs,{size:12,"aria-label":m("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-blue-500"}),e[12]=g,e[13]=m,e[14]=T):T=e[14];let A;e[15]!==m||e[16]!==l.title?(A=l.title||m("tasksPanel.taskRow.untitledTask"),e[15]=m,e[16]=l.title,e[17]=A):A=e[17];let I;e[18]!==A?(I=s.jsx("div",{className:"text-sm text-foreground truncate",children:A}),e[18]=A,e[19]=I):I=e[19];let O;e[20]!==T||e[21]!==I?(O=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[T,I]}),e[20]=T,e[21]=I,e[22]=O):O=e[22];let P;e[23]!==x||e[24]!==n||e[25]!==l.branch||e[26]!==l.updated_at?(P=l.updated_at&&s.jsxs("div",{className:G("flex items-center gap-1 text-[11px] min-w-0",n?"text-accent-foreground/70":"text-muted-foreground/60"),children:[l.branch&&!_n(l.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:l.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):x?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[x.owner,"/",x.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Oo(new Date(l.updated_at))})]}),e[23]=x,e[24]=n,e[25]=l.branch,e[26]=l.updated_at,e[27]=P):P=e[27];let E;e[28]!==O||e[29]!==P?(E=s.jsxs("div",{className:"flex-1 min-w-0",children:[O,P]}),e[28]=O,e[29]=P,e[30]=E):E=e[30];const z="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",R=!d&&s.jsx("span",{className:G("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",r&&"group-hover/row:opacity-0"),"aria-label":m("tasksPanel.taskRow.statusLabel",{status:f.label}),children:s.jsx(u,{size:14,className:G(f.iconClassName,l.status==="in_progress"&&"animate-spin")})});let $;e[31]!==r||e[32]!==m?($=r&&s.jsxs(Dt,{children:[s.jsx(Rt,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":m("tasksPanel.taskRow.archiveTask"),onClick:F=>{F.stopPropagation(),r()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-8 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(hl,{size:14})})}),s.jsx(Ft,{side:"right",children:m("tasksPanel.taskRow.archive")})]}),e[31]=r,e[32]=m,e[33]=$):$=e[33];let D;e[34]!==R||e[35]!==$?(D=s.jsxs("div",{className:z,children:[R,$]}),e[34]=R,e[35]=$,e[36]=D):D=e[36];let L;return e[37]!==o||e[38]!==E||e[39]!==D||e[40]!==S||e[41]!==y||e[42]!==k||e[43]!==l.id?(L=s.jsxs("div",{"data-task-id":j,role:_,tabIndex:v,onClick:o,onKeyDown:S,className:y,children:[k,E,D]}),e[37]=o,e[38]=E,e[39]=D,e[40]=S,e[41]=y,e[42]=k,e[43]=l.id,e[44]=L):L=e[44],L}const gs=["requires_action","in_progress","failed","expired","completed"];function Sn(t){const e=new Map(gs.map(l=>[l,[]]));for(const l of t){const n=l.status??"completed";(e.get(n)??e.get("completed")).push(l)}return gs.map(l=>({status:l,threads:e.get(l)}))}const Nn="sidebar.group.expanded.";function wn(t,e){const l=C.c(3),[n,o]=Ot(`${Nn}${t}`,e);let r;return l[0]!==n||l[1]!==o?(r=[n,o],l[0]=n,l[1]=o,l[2]=r):r=l[2],r}function el(t){const e=C.c(18),{onClick:l,isFetching:n,indented:o}=t,r=H();let i;e[0]!==r?(i=r("sidebar.showMoreButton.ariaLabel"),e[0]=r,e[1]=i):i=e[1];const a=o?"-ml-4 pl-6 pr-2":"px-2";let d;e[2]!==a?(d=G("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",a,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=a,e[3]=d):d=e[3];let c;e[4]!==n?(c=n&&s.jsx(xl,{size:14,className:"animate-spin"}),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==n||e[7]!==r?(m=r(n?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=n,e[7]=r,e[8]=m):m=e[8];let f;e[9]!==m?(f=s.jsx("span",{children:m}),e[9]=m,e[10]=f):f=e[10];let u;return e[11]!==n||e[12]!==l||e[13]!==i||e[14]!==d||e[15]!==c||e[16]!==f?(u=s.jsxs("button",{type:"button","aria-label":i,onClick:l,disabled:n,className:d,children:[c,f]}),e[11]=n,e[12]=l,e[13]=i,e[14]=d,e[15]=c,e[16]=f,e[17]=u):u=e[17],u}function Cn(t,e,l,n){return[t,e,l,n.type,n.member,n.currentUserId??""].join("|")}function kn(t){return t.member==="mine"&&!t.currentUserId}const tl=4;let Pt=0;const Jt=[];function Mn(){for(;Pt<tl&&Jt.length>0;){const t=Jt.shift();t&&t()}}function sl(t){return new Promise((e,l)=>{const n=()=>{Pt++,t().then(e,l).finally(()=>{Pt--,Mn()})};Pt<tl?n():Jt.push(n)})}const Gt=10;function bs(t,e,l,n,o){const r={hidden:!1};n.member==="mine"&&n.currentUserId&&(r.created_by=n.currentUserId),n.type==="automation"&&(r.has_trigger=!0),n.type==="manual"&&(r.has_trigger=!1);const i={where:r,limit:o,offset:l,orderBy:[{field:["updated_at"],direction:"desc"}]};return i.status=e,i}function Tn(t,e,l,n){let o=0;for(const r of t)ll(r,e,l,n)&&o++;return o}function qt(t,e,l,n){return Tn(t,e,l,n)}function In(t,e){return!!(t>=Gt||t===0&&e)}function js(t,e){return t<e}function Pn(t,e){return e===!1?!1:e===!0?!0:t}function ll(t,e,l,n){return!(t.hidden||(t.status??"completed")!==l||n.member==="mine"&&n.currentUserId&&t.created_by!==n.currentUserId||n.type==="automation"&&!t.trigger_id||n.type==="manual"&&t.trigger_id)}const zt=new Map,It=new Map;function $n(t,e){return e?t>=Gt?!0:null:!1}function vs(t){return zt.get(t)}function An(t,e){zt.set(t,e)}function zn(t,e,l){const n=zt.get(t);if(n!==void 0){l(n);return}let o=It.get(t);o||(o=sl(e).then(r=>(zt.set(t,r),It.delete(t),r)).catch(()=>(It.delete(t),Promise.reject(new Error("group probe failed")))),It.set(t,o)),o.then(l,()=>l(!1))}function ys(t){const e=t,l=Array.isArray(e.items)?e.items:[];return{items:l,hasMore:e.hasMore??l.length===Gt,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function On(t,e,l,n,o){let r=0;for(const i of t)e.has(i.id)||ll(i,l,n,o)&&r++;return r}function En(t,e,l,n){const o=C.c(8),{org:r}=re(),i=Cn(r.id,t,e,l);let a;o[0]!==l?(a=kn(l),o[0]=l,o[1]=a):a=o[1];const d=a,[c,m]=B.useState({isFetching:!1,isProbing:!1,identity:i,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==i&&m({isFetching:!1,isProbing:!1,identity:i,probeSubscribedIdentity:null,serverHasMore:null});const f=vo(),{threads:u,hasMore:h}=Hs(),p=qt(u,t,e,l),b=In(p,h),x=$n(p,h),g=Us();if(c.identity===i&&c.serverHasMore===null){const N=x??vs(i);N!==void 0&&m({isFetching:!1,isProbing:!1,identity:i,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!d&&c.identity===i&&c.serverHasMore===null&&x===null&&vs(i)===void 0&&c.probeSubscribedIdentity!==i&&(m(N=>N.identity===i?{...N,isProbing:!0,probeSubscribedIdentity:i}:N),zn(i,async()=>{const N=bs(t,e,0,l,1),y=await g.call("COLLECTION_THREADS_LIST",N),{totalCount:k}=ys(y),T=qt(f.threads.get(),t,e,l);return k===void 0?!1:js(T,k)},N=>{m(y=>y.identity!==i?y:{...y,isProbing:!1,serverHasMore:N})}));const _=async function(){if(c.isFetching||c.isProbing||d)return;const y=i;m(k=>k.identity===y?{...k,isFetching:!0}:k);try{const k=qt(u,t,e,l),T=bs(t,e,k,l,Gt),A=await sl(()=>g.call("COLLECTION_THREADS_LIST",T)),{items:I,hasMore:O,totalCount:P}=ys(A),E=new Set(u.map(Rn)),z=On(I,E,t,e,l),R=k;f.mergeThreads(I),m($=>{if($.identity!==y)return $;let D;return P!==void 0?D=js(R+z,P):D=I.length===0||z===0?!1:O,An(y,D),{...$,isFetching:!1,serverHasMore:D}})}catch(k){const T=k,A=T instanceof Error?T.message:String(T);es.error(`Could not load more tasks: ${A}`),m(I=>I.identity===y?{...I,isFetching:!1}:I)}},v=c.isFetching||c.isProbing,S=!d&&!v&&Pn(b,c.serverHasMore);let w;return o[2]!==v||o[3]!==_||o[4]!==S||o[5]!==c.isProbing||o[6]!==c.serverHasMore?(w={hasMore:S,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:_},o[2]=v,o[3]=_,o[4]=S,o[5]=c.isProbing,o[6]=c.serverHasMore,o[7]=w):w=o[7],w}function Rn(t){return t.id}function Fn(t){const e=C.c(20),{status:l,threads:n,activeTaskId:o,onSelectTask:r,onArchiveTask:i,canArchive:a,filters:d}=t,{isFetching:c,isProbing:m,loadMore:f,hasMore:u,serverHasMore:h}=En("status",l,d),[p,b]=B.useState(!1);!p&&n.length===0&&h===!0&&!c&&!m&&(b(!0),queueMicrotask(()=>{f()}));let x;if(e[0]!==o||e[1]!==a||e[2]!==d||e[3]!==i||e[4]!==r||e[5]!==n){let _;e[7]!==o||e[8]!==a||e[9]!==d||e[10]!==i||e[11]!==r?(_=v=>s.jsx(Zs,{task:v,isActive:o===v.id,onClick:()=>r(v),onArchive:a&&v.created_by===d.currentUserId?()=>i(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=o,e[8]=a,e[9]=d,e[10]=i,e[11]=r,e[12]=_):_=e[12],x=n.map(_),e[0]=o,e[1]=a,e[2]=d,e[3]=i,e[4]=r,e[5]=n,e[6]=x}else x=e[6];let g;e[13]!==u||e[14]!==c||e[15]!==f?(g=(u||c)&&s.jsx(el,{onClick:()=>{f()},isFetching:c,indented:!0}),e[13]=u,e[14]=c,e[15]=f,e[16]=g):g=e[16];let j;return e[17]!==x||e[18]!==g?(j=s.jsxs(s.Fragment,{children:[x,g]}),e[17]=x,e[18]=g,e[19]=j):j=e[19],j}function Dn(t){const e=C.c(36),{status:l,threads:n,activeTaskId:o,onSelectTask:r,onArchiveTask:i,canArchive:a,filters:d}=t,c=zo[l],m=c.icon,[f,u]=wn(`status-${l}`,!1);let h;e[0]!==f||e[1]!==u?(h=function(){u(!f)},e[0]=f,e[1]=u,e[2]=h):h=e[2];const p=h;let b;e[3]!==p?(b=y=>{y.target===y.currentTarget&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),p())},e[3]=p,e[4]=b):b=e[4];let x;e[5]!==m||e[6]!==c.iconClassName?(x=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(m,{size:12,className:c.iconClassName})}),e[5]=m,e[6]=c.iconClassName,e[7]=x):x=e[7];let g;e[8]!==f?(g=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:f?s.jsx(Ro,{size:14}):s.jsx(zs,{size:14})}),e[8]=f,e[9]=g):g=e[9];let j;e[10]!==x||e[11]!==g?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[x,g]}),e[10]=x,e[11]=g,e[12]=j):j=e[12];let _;e[13]!==c.label?(_=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=_):_=e[14];let v;e[15]!==n.length?(v=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:n.length})}),e[15]=n.length,e[16]=v):v=e[16];let S;e[17]!==f||e[18]!==p||e[19]!==b||e[20]!==j||e[21]!==_||e[22]!==v?(S=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":f,onClick:p,onKeyDown:b,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[j,_,v]}),e[17]=f,e[18]=p,e[19]=b,e[20]=j,e[21]=_,e[22]=v,e[23]=S):S=e[23];let w;e[24]!==o||e[25]!==a||e[26]!==f||e[27]!==d||e[28]!==i||e[29]!==r||e[30]!==l||e[31]!==n?(w=f&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(Fn,{status:l,threads:n,activeTaskId:o,onSelectTask:r,onArchiveTask:i,canArchive:a,filters:d})}),e[24]=o,e[25]=a,e[26]=f,e[27]=d,e[28]=i,e[29]=r,e[30]=l,e[31]=n,e[32]=w):w=e[32];let N;return e[33]!==S||e[34]!==w?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[S,w]}),e[33]=S,e[34]=w,e[35]=N):N=e[35],N}function _s(t){const e=C.c(38),{threads:l,groupBy:n,activeTaskId:o,onSelectTask:r,onArchiveTask:i,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:m,filtersActive:f}=t;if(l.length===0&&!d&&!c){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Po,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];const g=f?"No chats match your filters":"No chats yet";let j;return e[1]!==g?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,s.jsx("p",{className:"text-sm",children:g})]}),e[1]=g,e[2]=j):j=e[2],j}const u=l.length>1||d;if(n==="status"){let x;if(e[3]!==o||e[4]!==u||e[5]!==a||e[6]!==i||e[7]!==r||e[8]!==l){let j;e[10]!==o||e[11]!==u||e[12]!==a||e[13]!==i||e[14]!==r?(j=_=>s.jsx(Dn,{status:_.status,threads:_.threads,activeTaskId:o,onSelectTask:r,onArchiveTask:i,canArchive:u,filters:a},_.status),e[10]=o,e[11]=u,e[12]=a,e[13]=i,e[14]=r,e[15]=j):j=e[15],x=Sn(l).map(j),e[3]=o,e[4]=u,e[5]=a,e[6]=i,e[7]=r,e[8]=l,e[9]=x}else x=e[9];let g;return e[16]!==x?(g=s.jsx(s.Fragment,{children:x}),e[16]=x,e[17]=g):g=e[17],g}let h;if(e[18]!==o||e[19]!==u||e[20]!==a||e[21]!==i||e[22]!==r||e[23]!==l){let x;e[25]!==o||e[26]!==u||e[27]!==a||e[28]!==i||e[29]!==r?(x=g=>s.jsx(Zs,{task:g,isActive:o===g.id,onClick:()=>r(g),onArchive:u&&g.created_by===a.currentUserId?()=>i(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[25]=o,e[26]=u,e[27]=a,e[28]=i,e[29]=r,e[30]=x):x=e[30],h=l.map(x),e[18]=o,e[19]=u,e[20]=a,e[21]=i,e[22]=r,e[23]=l,e[24]=h}else h=e[24];let p;e[31]!==d||e[32]!==c||e[33]!==m?(p=(d||c)&&s.jsx(el,{onClick:m,isFetching:c}),e[31]=d,e[32]=c,e[33]=m,e[34]=p):p=e[34];let b;return e[35]!==h||e[36]!==p?(b=s.jsxs(s.Fragment,{children:[h,p]}),e[35]=h,e[36]=p,e[37]=b):b=e[37],b}function Ln(t,e,l){if(!l)return;const n=t.findIndex(o=>o.id===e);if(n!==-1){for(let o=n+1;o<t.length;o++){const r=t[o];if(r?.created_by===l)return r}for(let o=n-1;o>=0;o--){const r=t[o];if(r?.created_by===l)return r}}}function Ss(t){const e=C.c(17),{label:l,onClick:n,active:o,children:r}=t,[i,a]=B.useState(!1);let d,c,m,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),m=()=>a(!0),f=()=>a(!1),e[0]=d,e[1]=c,e[2]=m,e[3]=f):(d=e[0],c=e[1],m=e[2],f=e[3]);const u=o&&"bg-sidebar-accent text-foreground";let h;e[4]!==u?(h=G("md:size-[34px] rounded-lg",u),e[4]=u,e[5]=h):h=e[5];let p;e[6]!==r||e[7]!==l||e[8]!==n||e[9]!==h?(p=s.jsx(Rt,{asChild:!0,children:s.jsx(Et,{"aria-label":l,onClick:n,onPointerEnter:d,onPointerLeave:c,onFocus:m,onBlur:f,className:h,children:r})}),e[6]=r,e[7]=l,e[8]=n,e[9]=h,e[10]=p):p=e[10];let b;e[11]!==l?(b=s.jsx(Ft,{side:"bottom",children:l}),e[11]=l,e[12]=b):b=e[12];let x;return e[13]!==i||e[14]!==p||e[15]!==b?(x=s.jsxs(Dt,{open:i,children:[p,b]}),e[13]=i,e[14]=p,e[15]=b,e[16]=x):x=e[16],x}function Kt(t){const e=C.c(13),{label:l,value:n,onChange:o,options:r}=t;let i;e[0]!==l?(i=s.jsx("span",{className:"text-sm text-muted-foreground",children:l}),e[0]=l,e[1]=i):i=e[1];let a;e[2]!==o?(a=f=>f&&o(f),e[2]=o,e[3]=a):a=e[3];let d;e[4]!==r?(d=r.map(Gn),e[4]=r,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==n?(c=s.jsx(jo,{type:"single",size:"sm",value:n,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:d}),e[6]=a,e[7]=d,e[8]=n,e[9]=c):c=e[9];let m;return e[10]!==i||e[11]!==c?(m=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[i,c]}),e[10]=i,e[11]=c,e[12]=m):m=e[12],m}function Gn(t){return s.jsxs(bo,{value:t.value,className:"h-6 gap-1.5 rounded-md border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function ol(t){const e=C.c(220);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:n}=l,o=H(),{data:r}=$t.useSession(),i=r?.user?.id,{org:a}=re();let d;e[2]!==a.id?(d=Dl(a.id),e[2]=a.id,e[3]=d):d=e[3];const c=d.id,{threads:m,hasMore:f,isFetchingMore:u,fetchNextPage:h}=Hs(),p=m.filter(Wn),{hide:b,setScope:x}=yo(),g=ve(),{setTaskId:j,createNewTask:_}=Bs();let v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v={strict:!1},e[4]=v):v=e[4];const S=gl(v);let w;e[5]===Symbol.for("react.memo_cache_sentinel")?(w={strict:!1},e[5]=w):w=e[5];const N=Cs(w),y=S.taskId??null;let k;e[6]!==y||e[7]!==m||e[8]!==N.virtualmcpid?(k=N.virtualmcpid??m.find(M=>M.id===y)?.virtual_mcp_id??null,e[6]=y,e[7]=m,e[8]=N.virtualmcpid,e[9]=k):k=e[9];const T=k;let A;e[10]!==n?(A=()=>{n?.()},e[10]=n,e[11]=A):A=e[11];const I=A,O=[...p].sort(Un),[P,E]=B.useState("all"),[z,R]=B.useState("flat"),[$,D]=Ot("sidebar-threads-scope-all",!1),[L,F]=B.useState(!1),[q,Y]=B.useState(!1),fe=i??null;let ue;e[12]!==fe||e[13]!==P?(ue={type:P,member:"mine",currentUserId:fe},e[12]=fe,e[13]=P,e[14]=ue):ue=e[14];const X=ue,be={};$||(be.created_by="me"),x(be);let ae;e[15]!==i?(ae=M=>i?M.filter(U=>U.created_by===i):[],e[15]=i,e[16]=ae):ae=e[16];const gt=ae;let ce;e[17]!==P?(ce=M=>P==="automation"?M.filter(Bn):P==="manual"?M.filter(Hn):M,e[17]=P,e[18]=ce):ce=e[18];const ye=ce,_e=gt(O),pe=ye(_e),he=ye(O),V=$?he:pe;let te;e[19]!==y||e[20]!==I||e[21]!==i||e[22]!==b||e[23]!==g||e[24]!==a.slug||e[25]!==j||e[26]!==V?(te=M=>{if(i&&M.created_by&&M.created_by!==i)return;const U=M.id===y;if(b(M.id),So(M.id),!U)return;const W=Ln(V,M.id,i);I(),W?j(W.id,W.virtual_mcp_id):g({to:"/$org",params:{org:a.slug}})},e[19]=y,e[20]=I,e[21]=i,e[22]=b,e[23]=g,e[24]=a.slug,e[25]=j,e[26]=V,e[27]=te):te=e[27];const Q=te;let de;e[28]!==I||e[29]!==j?(de=M=>{I(),j(M.id,M.virtual_mcp_id)},e[28]=I,e[29]=j,e[30]=de):de=e[30];const J=de;let se;e[31]!==T||e[32]!==y||e[33]!==m||e[34]!==I||e[35]!==_||e[36]!==c?(se=()=>{const M=T??c,U=m.find(W=>W.id===y)?.branch??null;oe("sidebar_new_thread_clicked",{virtual_mcp_id:M}),I(),_(M,U)},e[31]=T,e[32]=y,e[33]=m,e[34]=I,e[35]=_,e[36]=c,e[37]=se):se=e[37];const xe=se,{state:bt,isMobile:je,toggleSidebar:ge}=xt();if(bt==="collapsed"&&!je){let M;e[38]!==a?(M=s.jsx(to,{org:a,size:"sm"}),e[38]=a,e[39]=M):M=e[39];let U;e[40]!==a.name||e[41]!==M?(U=s.jsx(ne,{tooltip:a.name,children:M}),e[40]=a.name,e[41]=M,e[42]=U):U=e[42];let W;e[43]!==a.slug||e[44]!==U?(W=s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(eo,{orgParam:a.slug,side:"right",align:"start",trigger:U})}),e[43]=a.slug,e[44]=U,e[45]=W):W=e[45];let Z;e[46]!==o?(Z=o("sidebar.taskGroupsList.toggleSidebar"),e[46]=o,e[47]=Z):Z=e[47];let le;e[48]!==o?(le=o("sidebar.taskGroupsList.toggleSidebar"),e[48]=o,e[49]=le):le=e[49];let kt;e[50]===Symbol.for("react.memo_cache_sentinel")?(kt=s.jsx(Es,{size:16}),e[50]=kt):kt=e[50];let rt;e[51]!==Z||e[52]!==le||e[53]!==ge?(rt=s.jsx(ee,{children:s.jsx(ne,{"aria-label":Z,tooltip:le,onClick:ge,children:kt})}),e[51]=Z,e[52]=le,e[53]=ge,e[54]=rt):rt=e[54];let at;e[55]!==o?(at=o("sidebar.taskGroupsList.searchChats"),e[55]=o,e[56]=at):at=e[56];let ct;e[57]!==o?(ct=o("sidebar.taskGroupsList.searchChats"),e[57]=o,e[58]=ct):ct=e[58];let dt;e[59]!==Y||e[60]!==F?(dt=()=>{oe("tasks_panel_search_opened"),Y(!0),F(!0)},e[59]=Y,e[60]=F,e[61]=dt):dt=e[61];let Mt;e[62]===Symbol.for("react.memo_cache_sentinel")?(Mt=s.jsx(rs,{size:16}),e[62]=Mt):Mt=e[62];let mt;e[63]!==at||e[64]!==ct||e[65]!==dt?(mt=s.jsx(ee,{children:s.jsx(ne,{"aria-label":at,tooltip:ct,onClick:dt,children:Mt})}),e[63]=at,e[64]=ct,e[65]=dt,e[66]=mt):mt=e[66];let ft;e[67]!==rt||e[68]!==mt?(ft=s.jsxs(ie,{className:"mt-2 min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[rt,mt]}),e[67]=rt,e[68]=mt,e[69]=ft):ft=e[69];let ut;e[70]!==q||e[71]!==L||e[72]!==F?(ut=q&&s.jsx(Wt,{open:L,onOpenChange:F}),e[70]=q,e[71]=L,e[72]=F,e[73]=ut):ut=e[73];let Tt;return e[74]!==W||e[75]!==ft||e[76]!==ut?(Tt=s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[W,ft,ut]}),e[74]=W,e[75]=ft,e[76]=ut,e[77]=Tt):Tt=e[77],Tt}const K=z!=="flat"||P!=="all"||$===!0;let Se;e[78]!==o?(Se=o("sidebar.taskGroupsList.filterChats"),e[78]=o,e[79]=Se):Se=e[79];let yt;e[80]===Symbol.for("react.memo_cache_sentinel")?(yt=s.jsx(go,{size:16}),e[80]=yt):yt=e[80];let Ne;e[81]!==K?(Ne=K&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[81]=K,e[82]=Ne):Ne=e[82];let we;e[83]!==K||e[84]!==Se||e[85]!==Ne?(we=s.jsx(Rt,{asChild:!0,children:s.jsx(Fs,{asChild:!0,children:s.jsxs(Et,{"aria-label":Se,active:K,className:"md:size-[34px] rounded-lg",children:[yt,Ne]})})}),e[83]=K,e[84]=Se,e[85]=Ne,e[86]=we):we=e[86];let Ce;e[87]!==o?(Ce=o("sidebar.taskGroupsList.filterChats"),e[87]=o,e[88]=Ce):Ce=e[88];let ke;e[89]!==Ce?(ke=s.jsx(Ft,{side:"bottom",children:Ce}),e[89]=Ce,e[90]=ke):ke=e[90];let Me;e[91]!==we||e[92]!==ke?(Me=s.jsxs(Dt,{children:[we,ke]}),e[91]=we,e[92]=ke,e[93]=Me):Me=e[93];let Te;e[94]!==o?(Te=o("sidebar.taskGroupsList.filterView"),e[94]=o,e[95]=Te):Te=e[95];let Ie;e[96]!==R?(Ie=M=>{oe("tasks_panel_group_by_changed",{to_value:M}),R(M)},e[96]=R,e[97]=Ie):Ie=e[97];let Pe;e[98]!==o?(Pe=o("sidebar.taskGroupsList.viewList"),e[98]=o,e[99]=Pe):Pe=e[99];let _t;e[100]===Symbol.for("react.memo_cache_sentinel")?(_t=s.jsx(Yl,{size:13}),e[100]=_t):_t=e[100];let $e;e[101]!==Pe?($e={value:"flat",label:Pe,icon:_t},e[101]=Pe,e[102]=$e):$e=e[102];let Ae;e[103]!==o?(Ae=o("sidebar.taskGroupsList.viewStatus"),e[103]=o,e[104]=Ae):Ae=e[104];let St;e[105]===Symbol.for("react.memo_cache_sentinel")?(St=s.jsx(Xl,{size:13}),e[105]=St):St=e[105];let ze;e[106]!==Ae?(ze={value:"status",label:Ae,icon:St},e[106]=Ae,e[107]=ze):ze=e[107];let Oe;e[108]!==$e||e[109]!==ze?(Oe=[$e,ze],e[108]=$e,e[109]=ze,e[110]=Oe):Oe=e[110];let Ee;e[111]!==z||e[112]!==Te||e[113]!==Ie||e[114]!==Oe?(Ee=s.jsx(Kt,{label:Te,value:z,onChange:Ie,options:Oe}),e[111]=z,e[112]=Te,e[113]=Ie,e[114]=Oe,e[115]=Ee):Ee=e[115];let Re;e[116]!==o?(Re=o("sidebar.taskGroupsList.filterType"),e[116]=o,e[117]=Re):Re=e[117];let Fe;e[118]!==E?(Fe=M=>{oe("tasks_panel_filter_changed",{to_value:M}),E(M)},e[118]=E,e[119]=Fe):Fe=e[119];let De;e[120]!==o?(De=o("sidebar.taskGroupsList.typeAll"),e[120]=o,e[121]=De):De=e[121];let Le;e[122]!==De?(Le={value:"all",label:De},e[122]=De,e[123]=Le):Le=e[123];let Ge;e[124]!==o?(Ge=o("sidebar.taskGroupsList.typeChats"),e[124]=o,e[125]=Ge):Ge=e[125];let He;e[126]!==Ge?(He={value:"manual",label:Ge},e[126]=Ge,e[127]=He):He=e[127];let Be;e[128]!==o?(Be=o("sidebar.taskGroupsList.typeAuto"),e[128]=o,e[129]=Be):Be=e[129];let Ue;e[130]!==Be?(Ue={value:"automation",label:Be},e[130]=Be,e[131]=Ue):Ue=e[131];let We;e[132]!==Le||e[133]!==He||e[134]!==Ue?(We=[Le,He,Ue],e[132]=Le,e[133]=He,e[134]=Ue,e[135]=We):We=e[135];let qe;e[136]!==Re||e[137]!==Fe||e[138]!==We||e[139]!==P?(qe=s.jsx(Kt,{label:Re,value:P,onChange:Fe,options:We}),e[136]=Re,e[137]=Fe,e[138]=We,e[139]=P,e[140]=qe):qe=e[140];let Ke;e[141]!==o?(Ke=o("sidebar.taskGroupsList.filterScope"),e[141]=o,e[142]=Ke):Ke=e[142];const Ht=$?"team":"mine";let Ve;e[143]!==D?(Ve=M=>D(M==="team"),e[143]=D,e[144]=Ve):Ve=e[144];let Ye;e[145]!==o?(Ye=o("sidebar.taskGroupsList.scopeMine"),e[145]=o,e[146]=Ye):Ye=e[146];let Xe;e[147]!==Ye?(Xe={value:"mine",label:Ye},e[147]=Ye,e[148]=Xe):Xe=e[148];let Qe;e[149]!==o?(Qe=o("sidebar.taskGroupsList.scopeTeam"),e[149]=o,e[150]=Qe):Qe=e[150];let Je;e[151]!==Qe?(Je={value:"team",label:Qe},e[151]=Qe,e[152]=Je):Je=e[152];let Ze;e[153]!==Xe||e[154]!==Je?(Ze=[Xe,Je],e[153]=Xe,e[154]=Je,e[155]=Ze):Ze=e[155];let et;e[156]!==Ke||e[157]!==Ht||e[158]!==Ve||e[159]!==Ze?(et=s.jsx(Kt,{label:Ke,value:Ht,onChange:Ve,options:Ze}),e[156]=Ke,e[157]=Ht,e[158]=Ve,e[159]=Ze,e[160]=et):et=e[160];let tt;e[161]!==Ee||e[162]!==qe||e[163]!==et?(tt=s.jsxs(Ds,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[Ee,qe,et]}),e[161]=Ee,e[162]=qe,e[163]=et,e[164]=tt):tt=e[164];let Nt;e[165]!==Me||e[166]!==tt?(Nt=s.jsxs(Rs,{children:[Me,tt]}),e[165]=Me,e[166]=tt,e[167]=Nt):Nt=e[167];const Bt=Nt;let wt;e[168]!==Bt||e[169]!==xe||e[170]!==Y||e[171]!==F||e[172]!==o?(wt=M=>s.jsx(Ls,{delayDuration:300,children:s.jsxs("div",{className:G("shrink-0 flex items-center justify-between",M?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!M&&s.jsx(Ks,{className:"md:size-[34px] rounded-lg"}),Bt]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(Ss,{label:o("sidebar.taskGroupsList.searchChats"),onClick:()=>{oe("tasks_panel_search_opened"),Y(!0),F(!0)},children:s.jsx(rs,{size:16})}),s.jsx(Ss,{label:o("sidebar.taskGroupsList.newChat"),onClick:()=>{xe()},children:s.jsx(Ql,{size:16})})]})]})}),e[168]=Bt,e[169]=xe,e[170]=Y,e[171]=F,e[172]=o,e[173]=wt):wt=e[173];const st=wt;if(je){let M;e[174]!==st?(M=st(!0),e[174]=st,e[175]=M):M=e[175];let U;e[176]!==h?(U=()=>{h()},e[176]=h,e[177]=U):U=e[177];let W;e[178]!==y||e[179]!==X||e[180]!==K||e[181]!==z||e[182]!==Q||e[183]!==J||e[184]!==f||e[185]!==u||e[186]!==U||e[187]!==V?(W=s.jsx(xs,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(_s,{threads:V,groupBy:z,activeTaskId:y,onSelectTask:J,onArchiveTask:Q,filters:X,hasMore:f,isFetchingMore:u,onLoadMore:U,filtersActive:K})}),e[178]=y,e[179]=X,e[180]=K,e[181]=z,e[182]=Q,e[183]=J,e[184]=f,e[185]=u,e[186]=U,e[187]=V,e[188]=W):W=e[188];let Z;e[189]!==q||e[190]!==L||e[191]!==F?(Z=q&&s.jsx(Wt,{open:L,onOpenChange:F}),e[189]=q,e[190]=L,e[191]=F,e[192]=Z):Z=e[192];let le;return e[193]!==M||e[194]!==W||e[195]!==Z?(le=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[M,W,Z]}),e[193]=M,e[194]=W,e[195]=Z,e[196]=le):le=e[196],le}let lt;e[197]!==st?(lt=st(!1),e[197]=st,e[198]=lt):lt=e[198];let ot;e[199]!==h?(ot=()=>{h()},e[199]=h,e[200]=ot):ot=e[200];let nt;e[201]!==y||e[202]!==X||e[203]!==K||e[204]!==z||e[205]!==Q||e[206]!==J||e[207]!==f||e[208]!==u||e[209]!==ot||e[210]!==V?(nt=s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(xs,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(_s,{threads:V,groupBy:z,activeTaskId:y,onSelectTask:J,onArchiveTask:Q,filters:X,hasMore:f,isFetchingMore:u,onLoadMore:ot,filtersActive:K})})}),e[201]=y,e[202]=X,e[203]=K,e[204]=z,e[205]=Q,e[206]=J,e[207]=f,e[208]=u,e[209]=ot,e[210]=V,e[211]=nt):nt=e[211];let it;e[212]!==q||e[213]!==L||e[214]!==F?(it=q&&s.jsx(Wt,{open:L,onOpenChange:F}),e[212]=q,e[213]=L,e[214]=F,e[215]=it):it=e[215];let Ct;return e[216]!==lt||e[217]!==nt||e[218]!==it?(Ct=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[lt,nt,it]}),e[216]=lt,e[217]=nt,e[218]=it,e[219]=Ct):Ct=e[219],Ct}function Hn(t){return!t.trigger_id}function Bn(t){return!!t.trigger_id}function Un(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function Wn(t){return!t.hidden}const qn=5,Kn=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function nl(){const t=C.c(3),{state:e}=xt();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:qn}).map(Xn)}),t[0]=o):o=t[0],o}let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(me,{className:"size-6 rounded-md"}),s.jsx(me,{className:"size-6 rounded-md"}),s.jsx(me,{className:"size-6 rounded-md"})]}),s.jsx(me,{className:"h-6 w-20 rounded-md"})]}),t[1]=l):l=t[1];let n;return t[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[l,s.jsx("div",{className:"flex flex-col gap-0.5",children:Kn.map(Vn)})]}),t[2]=n):n=t[2],n}function Vn(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(me,{className:"size-5 rounded-full shrink-0"}),s.jsx(me,{className:G("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(Yn)})]},e)}function Yn(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(me,{className:"h-3 flex-1 rounded-sm"})},e)}function Xn(t,e){return s.jsx(me,{className:"size-10 rounded-lg mx-auto"},e)}function Qn(){const t=C.c(2);if(ls()){let n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Yt,{showName:!0}),t[0]=n):n=t[0],n}let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(s.Fragment,{children:[s.jsx(Yt,{}),s.jsx(os,{})]}),t[1]=l):l=t[1],l}function Jn(){const t=C.c(5),e=Ys();let l,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(bn,{}),n=s.jsx(Qn,{}),t[0]=l,t[1]=n):(l=t[0],n=t[1]);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Zt,{children:s.jsx(B.Suspense,{fallback:s.jsx(nl,{}),children:s.jsx(ol,{})})}),t[2]=o):o=t[2];let r;return t[3]!==e?(r=s.jsx(Vs,{children:s.jsx(Js,{sections:e,footer:l,header:n,additionalContent:o})}),t[3]=e,t[4]=r):r=t[4],r}function Zn(t){const e=C.c(8),{onClose:l}=t,n=Ys();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(jn,{}),e[0]=o):o=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(nl,{}),e[1]=r):r=e[1];let i;e[2]!==l?(i=s.jsx(Zt,{children:s.jsx(B.Suspense,{fallback:r,children:s.jsx(ol,{onNavigate:l})})}),e[2]=l,e[3]=i):i=e[3];let a;return e[4]!==l||e[5]!==n||e[6]!==i?(a=s.jsx(Vs,{children:s.jsx(an,{sections:n,onClose:l,footer:o,additionalContent:i})}),e[4]=l,e[5]=n,e[6]=i,e[7]=a):a=e[7],a}const ei="sidebar.open";function ti(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(jl,{}),t[0]=e):e=t[0],e}function pa(){const t=C.c(36),e=Ts(),l=ls();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const{connect:o,siteUrl:r}=Cs(n),i=o==="1",[a,d]=Ot(ei,!1),{width:c,wrapperRef:m,onStartResize:f,resetWidth:u}=Zo(),h=e;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ks,{}),t[1]=p):p=t[1];let b;t[2]!==l?(b=!l&&s.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:s.jsx(os,{})}),t[2]=l,t[3]=b):b=t[3];let x,g,j,_;t[4]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(pt.TogglesSlot,{}),g=s.jsx(pt.TabsSlot,{className:"shrink-0"}),j=s.jsx(pt.CenterSlot,{}),_=s.jsx(pt.RightSlot,{}),t[4]=x,t[5]=g,t[6]=j,t[7]=_):(x=t[4],g=t[5],j=t[6],_=t[7]);let v;t[8]!==b?(v=s.jsx(pt.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[p,b,x,g,j,_]})}),t[8]=b,t[9]=v):v=t[9];const S=v;let w;t[10]===Symbol.for("react.memo_cache_sentinel")?(w={background:"transparent",containerType:"inline-size"},t[10]=w):w=t[10];let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(_l,{className:"flex flex-col min-h-0",style:w,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(B.Suspense,{fallback:s.jsx(ti,{}),children:s.jsx(bl,{})})})})}),t[11]=N):N=t[11];const y=N,k=h&&S,T=`${c}px`;let A;t[12]!==T?(A={"--sidebar-width":T,"--sidebar-width-icon":"3.125rem"},t[12]=T,t[13]=A):A=t[13];const I=A;let O;t[14]!==e||t[15]!==f||t[16]!==u?(O=!e&&s.jsxs(s.Fragment,{children:[s.jsx(Jn,{}),s.jsx(Xo,{onPointerDown:f,onDoubleClick:u})]}),t[14]=e,t[15]=f,t[16]=u,t[17]=O):O=t[17];let P;t[18]!==I||t[19]!==O||t[20]!==m?(P=s.jsxs(Sl,{ref:m,className:"flex-1 bg-sidebar relative min-h-0",style:I,children:[O,y]}),t[18]=I,t[19]=O,t[20]=m,t[21]=P):P=t[21];let E;t[22]!==e?(E=e&&s.jsx(Io,{renderSidebar:si}),t[22]=e,t[23]=E):E=t[23];let z;t[24]!==r||t[25]!==i?(z=i&&s.jsx(Wo,{siteUrl:r}),t[24]=r,t[25]=i,t[26]=z):z=t[26];let R;t[27]!==k||t[28]!==P||t[29]!==E||t[30]!==z?(R=s.jsx(Fo,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[k,P,E,z]})}),t[27]=k,t[28]=P,t[29]=E,t[30]=z,t[31]=R):R=t[31];let $;return t[32]!==d||t[33]!==a||t[34]!==R?($=s.jsx(_o,{children:s.jsx(pt.Provider,{children:s.jsx(Nl,{open:a,onOpenChange:d,children:R})})}),t[32]=d,t[33]=a,t[34]=R,t[35]=$):$=t[35],$}function si(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(Zn,{onClose:e})})})}export{pa as default};
@@ -1 +0,0 @@
1
- import{c as S,r as P,a_ as $,f as D,s as U,b as M,a$ as H,j as a,L as q}from"./index-CsXIUaax.js";const B="#f6f4ed",F="#ffffff",G=[{src:"/icons/icon-192.png",sizes:"192x192",type:"image/png"},{src:"/icons/icon-512.png",sizes:"512x512",type:"image/png"}];function J(e,n){const s=`${n}/${e.slug}`,i=[...e.logo?[{src:e.logo,sizes:"192x192",purpose:"any"},{src:e.logo,sizes:"512x512",purpose:"any"},{src:e.logo,sizes:"any",purpose:"any"}]:[],...G],r={id:s,name:e.name,short_name:e.name,start_url:s,scope:s,display:"standalone",display_override:["window-controls-overlay"],background_color:F,theme_color:B,icons:i};return`data:application/manifest+json,${encodeURIComponent(JSON.stringify(r))}`}function z(e){const n=document.querySelector(`link[rel="${e}"]`);if(n)return n;const s=document.createElement("link");return s.rel=e,document.head.appendChild(s),s}function K(e){const n=document.querySelector(`meta[name="${e}"]`);if(n)return n;const s=document.createElement("meta");return s.name=e,document.head.appendChild(s),s}function Q(e){const n=S.c(5),s=e?.name??"",i=e?.slug??"",r=e?.logo??"";let o,t;n[0]!==r||n[1]!==s||n[2]!==i?(o=()=>{if(!i||!s||typeof document>"u"||typeof window>"u")return;const u=z("manifest"),d=z("apple-touch-icon"),m=K("apple-mobile-web-app-title"),c={manifest:u.getAttribute("href"),appleIcon:d.getAttribute("href"),appleTitle:m.getAttribute("content"),title:document.title};return u.setAttribute("href",J({name:s,slug:i,logo:r||null},window.location.origin)),r&&d.setAttribute("href",r),m.setAttribute("content",s),document.title=s,$(),()=>{c.manifest!==null&&u.setAttribute("href",c.manifest),c.appleIcon!==null&&d.setAttribute("href",c.appleIcon),c.appleTitle!==null&&m.setAttribute("content",c.appleTitle),document.title=c.title,$()}},t=[s,i,r],n[0]=r,n[1]=s,n[2]=i,n[3]=o,n[4]=t):(o=n[3],t=n[4]),P.useLayoutEffect(o,t)}function W(){const e=S.c(50);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:s}=D(n),{data:i}=U();let r;e[1]!==i||e[2]!==s?(r=i?.find(A=>A.slug===s),e[1]=i,e[2]=s,e[3]=r):r=e[3];const o=r,t=M();let u;e[4]!==o?(u=o?{name:o.name,slug:o.slug,logo:o.logo??null}:null,e[4]=o,e[5]=u):u=e[5],Q(u);const{canPrompt:d,installed:m,ios:c,promptInstall:_}=H(),[O,C]=P.useState(null);let v;e[6]!==o?.name||e[7]!==t?(v=o?.name??t("routes.orgInstall.defaultOrgName"),e[6]=o?.name,e[7]=t,e[8]=v):v=e[8];const l=v,R=o?.logo;let w;e[9]!==l||e[10]!==_||e[11]!==t?(w=async()=>{const A=await _();C(A==="accepted"?t("routes.orgInstall.installing",{name:l}):A==="dismissed"?t("routes.orgInstall.installDismissed"):null)},e[9]=l,e[10]=_,e[11]=t,e[12]=w):w=e[12];const E=w,L=R||"/icons/icon-192.png";let f;e[13]!==l||e[14]!==L?(f=a.jsx("img",{src:L,alt:l,className:"size-20 rounded-2xl border border-border/50 object-cover"}),e[13]=l,e[14]=L,e[15]=f):f=e[15];let p;e[16]!==l||e[17]!==t?(p=t("routes.orgInstall.addToHomeScreen",{name:l}),e[16]=l,e[17]=t,e[18]=p):p=e[18];let g;e[19]!==p?(g=a.jsx("h1",{className:"text-xl font-semibold text-foreground",children:p}),e[19]=p,e[20]=g):g=e[20];let x;e[21]!==l||e[22]!==t?(x=t("routes.orgInstall.installDescription",{name:l}),e[21]=l,e[22]=t,e[23]=x):x=e[23];let h;e[24]!==x?(h=a.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[24]=x,e[25]=h):h=e[25];let b;e[26]!==h||e[27]!==g?(b=a.jsxs("div",{className:"flex flex-col gap-2",children:[g,h]}),e[26]=h,e[27]=g,e[28]=b):b=e[28];let y;e[29]!==d||e[30]!==E||e[31]!==m||e[32]!==c||e[33]!==l||e[34]!==O||e[35]!==t?(y=m?a.jsx("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:t("routes.orgInstall.alreadyInstalled",{name:l})}):c?a.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted px-4 py-3 text-sm text-foreground",children:[a.jsx("p",{className:"font-medium",children:t("routes.orgInstall.installOnIos")}),a.jsx("p",{className:"text-muted-foreground",children:t("routes.orgInstall.iosInstructions")})]}):d?a.jsxs("div",{className:"flex flex-col items-center gap-3",children:[a.jsx("button",{type:"button",onClick:E,className:"rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:t("routes.orgInstall.addToHomeScreenButton",{name:l})}),O&&a.jsx("p",{className:"text-sm text-muted-foreground",children:O})]}):a.jsx("p",{className:"rounded-lg bg-muted px-4 py-3 text-sm text-muted-foreground",children:t("routes.orgInstall.fallbackInstructions",{name:l})}),e[29]=d,e[30]=E,e[31]=m,e[32]=c,e[33]=l,e[34]=O,e[35]=t,e[36]=y):y=e[36];const T=s??"";let I;e[37]!==T?(I={org:T},e[37]=T,e[38]=I):I=e[38];let j;e[39]!==l||e[40]!==t?(j=t("routes.orgInstall.backLink",{name:l}),e[39]=l,e[40]=t,e[41]=j):j=e[41];let N;e[42]!==I||e[43]!==j?(N=a.jsx(q,{to:"/$org",params:I,className:"text-sm text-primary hover:underline",replace:!0,children:j}),e[42]=I,e[43]=j,e[44]=N):N=e[44];let k;return e[45]!==b||e[46]!==y||e[47]!==N||e[48]!==f?(k=a.jsx("div",{className:"flex min-h-dvh items-center justify-center bg-background p-6",children:a.jsxs("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:[f,b,y,N]})}),e[45]=b,e[46]=y,e[47]=N,e[48]=f,e[49]=k):k=e[49],k}export{W as default};
@@ -1 +0,0 @@
1
- import{c as L,F as H,j as U}from"./index-CsXIUaax.js";import{a as O,g as $,s as E}from"./automation-runs-kY0Hd5bJ.js";import{r as k,u as B}from"./use-mcp-client-DpsAHhsu.js";import{b as V,c as Y}from"./use-mcp-tools-D5d64p3C.js";import{u as q}from"./index-oCG8H3JL.js";import{c as G}from"./monaco-editor-BVhG6A-M.js";import{g as F,M as K,a as D}from"./index-BR5NjjJc.js";import{a as W,u as z}from"./chat-context-aAijaY3A.js";import{u as J}from"./shell-layout-BTLWrDNT.js";import{O as Q}from"./tab-id-BME_CqCy.js";import"./select-DWrifuH3.js";import"./tooltip-fIVhp5ou.js";import"./Check-BdHuJuPw.js";import"./ChevronDown-DEyjLxYx.js";import"./ChevronUp-DJfqG7zj.js";import"./useInfiniteQuery-BsbgCJ-c.js";import"./use-infinite-scroll-C3O-KBl8.js";import"./use-connection-B06hUHgo.js";import"./use-virtual-mcp-CNAeRFsi.js";import"./card-B0f_2u3D.js";import"./sidebar-Dy1VWxxx.js";import"./LayoutLeft-BuxvHUKx.js";import"./use-mobile-DGf5vwNF.js";import"./X-th7ARgOR.js";import"./table-DX49ZzwB.js";import"./empty-state-fv8rbuQT.js";import"./use-members-CmlnN6Aw.js";import"./use-org-auth-client-BmTFN65s.js";import"./use-clock-tick-DR9o8Vl7.js";import"./AlertCircle-Eoiskkdw.js";import"./CheckCircle-myPjsJGU.js";import"./DotsVertical-5WbYSo6Z.js";import"./agent-icon-DCQPTD-I.js";import"./Tool01-B96hoDFN.js";import"./ArrowUp-Cqu5i0aZ.js";import"./Settings02-B_QAMj-P.js";import"./Tool02-AsfUGp__.js";import"./XCircle-CfjuVDux.js";import"./ArrowUpRight-CWi3fozt.js";import"./TrendUp01-BAGSq_YF.js";import"./ZapSquare-k4WUcduv.js";import"./Users03-BJNH9N4K.js";import"./ChevronRight-BBN141em.js";import"./Stars02-COchQugv.js";import"./Copy01-gvtGLLcY.js";import"./CpuChip01-kG4BiE9Y.js";import"./Eye-CZFxMqY9.js";import"./FilterLines-ubYrwRwC.js";import"./Star01-4a_Jxita.js";import"./Palette-D0m6ZhK3.js";import"./SwitchHorizontal01-IoYlCupu.js";import"./HardDrive-F_HbtdSs.js";import"./Key01-D9NzOa5l.js";import"./LinkExternal01-DJvk8I2A.js";import"./LogOut01-DN8933ou.js";import"./Monitor01-Cd36dx-4.js";import"./Sun-Bdj4gRC5.js";import"./Play-D_aQs7dj.js";import"./Plus-XPxaBtTZ.js";import"./SearchLg-Dlw09bmE.js";import"./SearchMd-D-oUO6X0.js";import"./Shield01-m7YUf-pl.js";import"./Stars01-C8PrtncY.js";import"./Trash01-g9SUeAN0.js";import"./Upload01-L2syNbDQ.js";import"./User01-CbL87ZBv.js";import"./Users01-BMwIQhmY.js";import"./XClose-BV56nJYO.js";import"./Zap-Cu4-I_Ac.js";import"./use-automations-NZO0H-p1.js";import"./studio-tools-WL-_7DVR.js";import"./useSuspenseInfiniteQuery-3ceZ8_NX.js";import"./avatar-C7VBTxjb.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-2CfnxQXo.js";import"./dialog-CJkJPlAS.js";import"./hooks-S0-VfPJM.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-B-6W79yQ.js";import"./calendar-DOxmGM7p.js";import"./integration-icon-CAdntIjt.js";import"./use-navigate-to-agent-BtA6n79A.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-D1UwNZ2i.js";import"./form-BNZvnkRb.js";import"./label-CEg7qY-f.js";import"./input-B6QX4Bsc.js";import"./spinner-ChQk-fuJ.js";import"./auth-BqANqm0A.js";import"./drawer-Vmj6vj2H.js";import"./collection-search-DVfGAujX.js";import"./index-vAlUDtly.js";import"./get-initials-D-f_fDFw.js";import"./popover-DEaCMzZP.js";import"./dropdown-menu-DabrgiLz.js";import"./github-repo-picker-BZBSEeFT.js";import"./use-debounced-value-CFLMM6Qe.js";import"./authenticate-and-persist-oauth-sNdJBe3I.js";import"./mcp-oauth-Dl2k8oDk.js";import"./extract-connection-data-C2XmdMG4.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-C2RHf8fG.js";import"./use-decopilot-events-ByGtTT-X.js";import"./use-tags-Q5fBrYNZ.js";import"./command-uPNVzZmX.js";import"./index-C8ZRu3O2.js";import"./use-organization-settings-DOeb2tV3.js";import"./companions-core-Dg0TNpYb.js";import"./tabs-EJLJDayr.js";import"./toggle-group-Q0IrBn5K.js";import"./use-deco-credits-Bf0twN-A.js";import"./alert-dialog-P11DPMoL.js";import"./toolbar-DtyhtDGB.js";import"./skeleton-Dr0ihbmb.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-CSYIgKfu.js";import"./use-registry-connections-CWaA6tdp.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-C_aquDFn.js";import"./connection-form-helpers-C1xXkycr.js";import"./collection-tabs-u5enzkVl.js";import"./badge-Bu9TYgek.js";import"./use-ai-providers-DEYBcyVN.js";import"./select-model-L_zaW5VV.js";import"./checkbox-d1Rt9GUt.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CZBB9hU0.js";import"./use-is-desktop-app-BNujXJc_.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CW8S7oZ-.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-Dzali0wY.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-P3A3uVfF.js";import"./use-debounced-autosave-ChmgSDUl.js";import"./index-B6ykVoku.js";import"./search-input-BiAm-dHP.js";import"./switch-lBLWR9-v.js";import"./use-secrets-en8tthJo.js";import"./useQueries-mGQBH8qb.js";import"./use-file-configs-Du58T_Jv.js";import"./automation-list-row-BgdzPrn2.js";import"./required-auth-layout-CWHGEbNY.js";import"./use-org-sso-DWfsG4pV.js";const X="studio://navigate";function Z(M){const[t]=M;if(M.length!==1||t?.type!=="resource_link"||!t.uri.startsWith(X))return{isNavigate:!1};let o=null;try{o=new URL(t.uri).searchParams.get("main")}catch{}return{isNavigate:!0,tab:o&&Q.has(o)?o:null}}const tt={};function ot(M){const t=L.c(38),{client:o,resourceURI:I,tool:e,connectionId:p,orgId:a,args:v}=M,{sendMessage:C}=W(),{setAppContext:f,clearAppContext:l}=z(),{openSidePanel:g,openTab:s}=J(),i=`${p}:${e.name}`;let c;t[0]!==s?(c=x=>x==="inline"?(s("0"),"inline"):"fullscreen",t[0]=s,t[1]=c):c=t[1];const m=c,n=v??tt;let u;t[2]!==o||t[3]!==e.name||t[4]!==n?(u={client:o,toolName:e.name,toolArguments:n},t[2]=o,t[3]=e.name,t[4]=n,t[5]=u):u=t[5];const{data:r}=Y(u);let h;if(t[6]!==e._meta||t[7]!==e.name){const x=$(e._meta);h=E(e.name,x),t[6]=e._meta,t[7]=e.name,t[8]=h}else h=t[8];const A=h;let d;t[9]!==e.inputSchema?(d=e.inputSchema??{type:"object"},t[9]=e.inputSchema,t[10]=d):d=t[10];let R;t[11]!==A||t[12]!==d||t[13]!==e?(R={...e,name:A,inputSchema:d},t[11]=A,t[12]=d,t[13]=e,t[14]=R):R=t[14];const b=R;let _;t[15]!==g||t[16]!==s||t[17]!==C?(_=x=>{const j=Z(x.content);if(j.isNavigate){j.tab&&s(j.tab);return}const w=G(x.content);w.content.length>0&&(g("chat"),C({tiptapDoc:w}))},t[15]=g,t[16]=s,t[17]=C,t[18]=_):_=t[18];const y=_;let P;t[19]!==b?(P={tool:b},t[19]=b,t[20]=P):P=t[20];let N;t[21]!==f||t[22]!==i?(N=x=>f(i,x),t[21]=f,t[22]=i,t[23]=N):N=t[23];let T;t[24]!==l||t[25]!==i?(T=()=>l(i),t[24]=l,t[25]=i,t[26]=T):T=t[26];let S;return t[27]!==o||t[28]!==y||t[29]!==m||t[30]!==a||t[31]!==I||t[32]!==P||t[33]!==N||t[34]!==T||t[35]!==n||t[36]!==r?(S=U.jsx(K,{resourceURI:I,orgId:a,toolInfo:P,toolInput:n,toolResult:r,displayMode:"fullscreen",minHeight:D.fullscreen.minHeight,maxHeight:D.fullscreen.maxHeight,client:o,onMessage:y,onUpdateModelContext:N,onTeardown:T,onRequestDisplayMode:m,className:"h-full"}),t[27]=o,t[28]=y,t[29]=m,t[30]=a,t[31]=I,t[32]=P,t[33]=N,t[34]=T,t[35]=n,t[36]=r,t[37]=S):S=t[37],S}function Ve(M){const t=L.c(24),{connectionId:o,toolName:I,args:e}=M,{org:p}=H(),a=q();let v;t[0]!==o||t[1]!==a?(v=k(o)&&a.vmEntry?.sandboxProviderKind==="user-desktop"&&a.previewUrl?`${a.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=o,t[1]=a,t[2]=v):v=t[2];const C=v;let f;t[3]!==o||t[4]!==C||t[5]!==p.id||t[6]!==p.slug?(f={connectionId:o,orgId:p.id,orgSlug:p.slug,mcpUrl:C},t[3]=o,t[4]=C,t[5]=p.id,t[6]=p.slug,t[7]=f):f=t[7];const l=B(f);let g;t[8]!==l?(g={client:l},t[8]=l,t[9]=g):g=t[9];const{data:s}=V(g);let i,c,m;t[10]!==I||t[11]!==s.tools?(i=O(decodeURIComponent(I)),m=s.tools.find(r=>r.name===i)??s.tools.find(r=>{const h=$(r._meta);if(!h)return!1;if(E(r.name,h)===i)return!0;const d=E(i,h);return d!==i&&r.name===d}),c=m?._meta?F(m._meta):void 0,t[10]=I,t[11]=s.tools,t[12]=i,t[13]=c,t[14]=m):(i=t[12],c=t[13],m=t[14]);const n=c;if(!m||!n){let r;return t[15]!==i?(r=U.jsx("div",{className:"flex items-center justify-center h-full w-full",children:U.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',i,'" not found or has no UI']})}),t[15]=i,t[16]=r):r=t[16],r}let u;return t[17]!==e||t[18]!==l||t[19]!==o||t[20]!==p.id||t[21]!==n||t[22]!==m?(u=U.jsx(ot,{client:l,resourceURI:n,tool:m,connectionId:o,orgId:p.id,args:e}),t[17]=e,t[18]=l,t[19]=o,t[20]=p.id,t[21]=n,t[22]=m,t[23]=u):u=t[23],u}export{Ve as AppViewContent};
@@ -1 +0,0 @@
1
- import{c as L,b as A,j as r}from"./index-CsXIUaax.js";import{I as O}from"./input-B6QX4Bsc.js";import{L as F}from"./label-CEg7qY-f.js";import{S as R,a as z,b as V,c as D,d as J}from"./select-DWrifuH3.js";import{T as M}from"./textarea-C_aquDFn.js";import{O as Q,P as Y,Q as $,I as q,T as G,Y as H}from"./index-oCG8H3JL.js";import{s as I}from"./primitives-BTgHbvPp.js";import{u as U}from"./use-autosave-CUy33u2t.js";import"./tooltip-fIVhp5ou.js";import"./Check-BdHuJuPw.js";import"./ChevronDown-DEyjLxYx.js";import"./ChevronUp-DJfqG7zj.js";import"./ArrowUp-Cqu5i0aZ.js";import"./chat-context-aAijaY3A.js";import"./tab-id-BME_CqCy.js";import"./dialog-CJkJPlAS.js";import"./X-th7ARgOR.js";import"./Copy01-gvtGLLcY.js";import"./hooks-S0-VfPJM.js";import"./use-mcp-client-DpsAHhsu.js";import"./auth-BqANqm0A.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-B-6W79yQ.js";import"./studio-tools-WL-_7DVR.js";import"./use-virtual-mcp-CNAeRFsi.js";import"./use-ai-providers-DEYBcyVN.js";import"./use-decopilot-events-ByGtTT-X.js";import"./use-organization-settings-DOeb2tV3.js";import"./automation-runs-kY0Hd5bJ.js";import"./useInfiniteQuery-BsbgCJ-c.js";import"./use-infinite-scroll-C3O-KBl8.js";import"./use-connection-B06hUHgo.js";import"./card-B0f_2u3D.js";import"./sidebar-Dy1VWxxx.js";import"./LayoutLeft-BuxvHUKx.js";import"./use-mobile-DGf5vwNF.js";import"./table-DX49ZzwB.js";import"./empty-state-fv8rbuQT.js";import"./use-members-CmlnN6Aw.js";import"./use-org-auth-client-BmTFN65s.js";import"./use-clock-tick-DR9o8Vl7.js";import"./AlertCircle-Eoiskkdw.js";import"./CheckCircle-myPjsJGU.js";import"./DotsVertical-5WbYSo6Z.js";import"./agent-icon-DCQPTD-I.js";import"./Tool01-B96hoDFN.js";import"./Settings02-B_QAMj-P.js";import"./Tool02-AsfUGp__.js";import"./XCircle-CfjuVDux.js";import"./ArrowUpRight-CWi3fozt.js";import"./TrendUp01-BAGSq_YF.js";import"./ZapSquare-k4WUcduv.js";import"./Users03-BJNH9N4K.js";import"./ChevronRight-BBN141em.js";import"./Stars02-COchQugv.js";import"./CpuChip01-kG4BiE9Y.js";import"./Eye-CZFxMqY9.js";import"./FilterLines-ubYrwRwC.js";import"./Star01-4a_Jxita.js";import"./Palette-D0m6ZhK3.js";import"./SwitchHorizontal01-IoYlCupu.js";import"./HardDrive-F_HbtdSs.js";import"./Key01-D9NzOa5l.js";import"./LinkExternal01-DJvk8I2A.js";import"./LogOut01-DN8933ou.js";import"./Monitor01-Cd36dx-4.js";import"./Sun-Bdj4gRC5.js";import"./Play-D_aQs7dj.js";import"./Plus-XPxaBtTZ.js";import"./SearchLg-Dlw09bmE.js";import"./SearchMd-D-oUO6X0.js";import"./Shield01-m7YUf-pl.js";import"./Stars01-C8PrtncY.js";import"./Trash01-g9SUeAN0.js";import"./Upload01-L2syNbDQ.js";import"./User01-CbL87ZBv.js";import"./Users01-BMwIQhmY.js";import"./XClose-BV56nJYO.js";import"./Zap-Cu4-I_Ac.js";import"./use-automations-NZO0H-p1.js";import"./useSuspenseInfiniteQuery-3ceZ8_NX.js";import"./avatar-C7VBTxjb.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-2CfnxQXo.js";import"./monaco-editor-BVhG6A-M.js";import"./spinner-ChQk-fuJ.js";import"./index-BR5NjjJc.js";import"./calendar-DOxmGM7p.js";import"./shell-layout-BTLWrDNT.js";import"./required-auth-layout-CWHGEbNY.js";import"./use-org-sso-DWfsG4pV.js";import"./integration-icon-CAdntIjt.js";import"./use-navigate-to-agent-BtA6n79A.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-D1UwNZ2i.js";import"./form-BNZvnkRb.js";import"./drawer-Vmj6vj2H.js";import"./collection-search-DVfGAujX.js";import"./index-vAlUDtly.js";import"./get-initials-D-f_fDFw.js";import"./popover-DEaCMzZP.js";import"./dropdown-menu-DabrgiLz.js";import"./github-repo-picker-BZBSEeFT.js";import"./use-debounced-value-CFLMM6Qe.js";import"./authenticate-and-persist-oauth-sNdJBe3I.js";import"./mcp-oauth-Dl2k8oDk.js";import"./use-mcp-tools-D5d64p3C.js";import"./extract-connection-data-C2XmdMG4.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-C2RHf8fG.js";import"./use-tags-Q5fBrYNZ.js";import"./command-uPNVzZmX.js";import"./index-C8ZRu3O2.js";import"./companions-core-Dg0TNpYb.js";import"./tabs-EJLJDayr.js";import"./toggle-group-Q0IrBn5K.js";import"./use-deco-credits-Bf0twN-A.js";import"./alert-dialog-P11DPMoL.js";import"./toolbar-DtyhtDGB.js";import"./skeleton-Dr0ihbmb.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-CSYIgKfu.js";import"./use-registry-connections-CWaA6tdp.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-C1xXkycr.js";import"./collection-tabs-u5enzkVl.js";import"./badge-Bu9TYgek.js";import"./select-model-L_zaW5VV.js";import"./checkbox-d1Rt9GUt.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CZBB9hU0.js";import"./use-is-desktop-app-BNujXJc_.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CW8S7oZ-.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-Dzali0wY.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-P3A3uVfF.js";import"./use-debounced-autosave-ChmgSDUl.js";import"./index-B6ykVoku.js";import"./search-input-BiAm-dHP.js";import"./switch-lBLWR9-v.js";import"./use-secrets-en8tthJo.js";import"./useQueries-mGQBH8qb.js";import"./use-file-configs-Du58T_Jv.js";import"./automation-list-row-BgdzPrn2.js";const W={authors:[{key:"name",labelKey:"sandbox.recordEditor.fieldName",widget:"text"},{key:"type",labelKey:"sandbox.recordEditor.fieldType",widget:"select",options:[{value:"Person",labelKey:"sandbox.recordEditor.optionPerson"},{value:"Organization",labelKey:"sandbox.recordEditor.optionOrganization"}]},{key:"email",labelKey:"sandbox.recordEditor.fieldEmail",widget:"text",placeholderKey:"sandbox.recordEditor.placeholderEmail"},{key:"jobTitle",labelKey:"sandbox.recordEditor.fieldJobTitle",widget:"text"},{key:"company",labelKey:"sandbox.recordEditor.fieldCompany",widget:"text"},{key:"avatar",labelKey:"sandbox.recordEditor.fieldAvatar",widget:"image"}]},X={authors:"sandbox.recordEditor.titleAuthor"};function Dr(C){const t=L.c(40),{orgSlug:K,virtualMcpId:h,branch:w,kind:a,blockKey:g,block:P}=C,i=A(),f=Q(h);let b;t[0]!==w||t[1]!==K||t[2]!==f||t[3]!==h?(b={orgSlug:K,virtualMcpId:h,branch:w,packagePath:f},t[0]=w,t[1]=K,t[2]=f,t[3]=h,t[4]=b):b=t[4];const p=Y(b);let k;t[5]!==P||t[6]!==a?(k=$(P,a),t[5]=P,t[6]=a,t[7]=k):k=t[7];const B=k;let v;t[8]!==g||t[9]!==a||t[10]!==p?(v=l=>{p.mutate({blockKey:g,data:G(g,a,l)})},t[8]=g,t[9]=a,t[10]=p,t[11]=v):v=t[11];const[e,S]=U(B,v);let j;t[12]!==e||t[13]!==S?(j=(l,o)=>S({...e,[l]:o}),t[12]=e,t[13]=S,t[14]=j):j=t[14];const s=j,T=X[a];let n;t[15]!==i||t[16]!==T?(n=i(T),t[15]=i,t[16]=T,t[17]=n):n=t[17];let c;t[18]!==n?(c=r.jsx("span",{className:"text-sm font-medium",children:n}),t[18]=n,t[19]=c):c=t[19];let d;t[20]!==p.isError||t[21]!==p.isPending?(d=r.jsx(q,{isPending:p.isPending,isError:p.isError}),t[20]=p.isError,t[21]=p.isPending,t[22]=d):d=t[22];let y;t[23]!==c||t[24]!==d?(y=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,d]}),t[23]=c,t[24]=d,t[25]=y):y=t[25];const N=W[a];let x;if(t[26]!==e||t[27]!==s||t[28]!==i||t[29]!==N){let l;t[31]!==e||t[32]!==s||t[33]!==i?(l=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(H,{schema:{type:"string",format:"image-uri",title:i(o.labelKey)},value:e[o.key],onChange:m=>s(o.key,m),path:o.key,label:i(o.labelKey)}):o.widget==="select"?r.jsxs(r.Fragment,{children:[r.jsx(F,{htmlFor:o.key,children:i(o.labelKey)}),r.jsxs(R,{value:I(e[o.key])||o.options?.[0]?.value,onValueChange:m=>s(o.key,m),children:[r.jsx(z,{id:o.key,className:"h-10 w-full",children:r.jsx(V,{placeholder:i(o.labelKey)})}),r.jsx(D,{children:(o.options??[]).map(m=>r.jsx(J,{value:m.value,children:i(m.labelKey)},m.value))})]})]}):r.jsxs(r.Fragment,{children:[r.jsx(F,{htmlFor:o.key,children:i(o.labelKey)}),o.widget==="textarea"?r.jsx(M,{id:o.key,value:I(e[o.key]),onChange:m=>s(o.key,m.target.value),rows:3}):r.jsx(O,{id:o.key,value:I(e[o.key]),placeholder:o.placeholderKey?i(o.placeholderKey):void 0,onChange:m=>s(o.key,m.target.value),className:"h-10"})]})},o.key),t[31]=e,t[32]=s,t[33]=i,t[34]=l):l=t[34],x=N.map(l),t[26]=e,t[27]=s,t[28]=i,t[29]=N,t[30]=x}else x=t[30];let u;t[35]!==x?(u=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:x})}),t[35]=x,t[36]=u):u=t[36];let E;return t[37]!==y||t[38]!==u?(E=r.jsxs("div",{className:"flex h-full flex-col",children:[y,u]}),t[37]=y,t[38]=u,t[39]=E):E=t[39],E}export{Dr as RecordEditor};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-CfaJe34R.js","assets/index-CsXIUaax.js","assets/index-BAZmyVC-.css","assets/Tool02-AsfUGp__.js","assets/CheckCircle-myPjsJGU.js","assets/Settings02-B_QAMj-P.js","assets/use-mcp-client-DpsAHhsu.js","assets/auth-BqANqm0A.js","assets/useInfiniteQuery-BsbgCJ-c.js","assets/use-infinite-scroll-C3O-KBl8.js","assets/studio-tools-WL-_7DVR.js","assets/badge-Bu9TYgek.js","assets/input-B6QX4Bsc.js","assets/dropdown-menu-DabrgiLz.js","assets/Check-BdHuJuPw.js","assets/ChevronRight-BBN141em.js","assets/DotsVertical-5WbYSo6Z.js","assets/table-DX49ZzwB.js","assets/toggle-group-Q0IrBn5K.js","assets/use-view-mode-W11-AL0e.js","assets/use-mobile-DGf5vwNF.js","assets/FilterLines-ubYrwRwC.js","assets/SearchMd-D-oUO6X0.js","assets/dialog-CJkJPlAS.js","assets/X-th7ARgOR.js","assets/AlertCircle-Eoiskkdw.js","assets/Upload01-L2syNbDQ.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-P11DPMoL.js","assets/card-B0f_2u3D.js","assets/Trash01-g9SUeAN0.js","assets/label-CEg7qY-f.js","assets/select-DWrifuH3.js","assets/tooltip-fIVhp5ou.js","assets/ChevronDown-DEyjLxYx.js","assets/ChevronUp-DJfqG7zj.js","assets/switch-lBLWR9-v.js","assets/textarea-C_aquDFn.js","assets/XCircle-CfjuVDux.js","assets/checkbox-d1Rt9GUt.js","assets/Eye-CZFxMqY9.js","assets/LinkExternal01-DJvk8I2A.js","assets/use-copy-2CfnxQXo.js","assets/Copy01-gvtGLLcY.js","assets/Key01-D9NzOa5l.js","assets/Plus-XPxaBtTZ.js","assets/mcp-oauth-Dl2k8oDk.js","assets/Play-D_aQs7dj.js"])))=>i.map(i=>d[i]);
2
- import{c as i,j as e,r as s,k as a,aG as o}from"./index-CsXIUaax.js";import{R as m}from"./require-capability-BV5_KDVM.js";import"./use-capability-Dzali0wY.js";import"./access-gate-B0jUQZZH.js";import"./capability-load-error-DTwJskAo.js";const n=s.lazy(()=>o(()=>import("./registry-layout-CfaJe34R.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])));function f(){const r=i.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
@@ -1 +0,0 @@
1
- import{c as b,m as g,j as o,cJ as P,cK as H,H as R,cL as A,cM as L,cN as V,cO as W,r as T,B as q,b6 as G,bu as F}from"./index-CsXIUaax.js";import{i as J}from"./LayoutLeft-BuxvHUKx.js";import{u as K}from"./use-mobile-DGf5vwNF.js";import{i as Q}from"./X-th7ARgOR.js";import{b as z,T as B,a as D,c as k}from"./tooltip-fIVhp5ou.js";function U(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(H,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function X(i){const e=b.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=o.jsx(L,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function Y(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(W,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Z(i){const e=b.c(20);let t,s,a,l,d;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:d,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"right":l,r=d===void 0?!1:d;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(Y,{}),e[6]=m):m=e[6];const u=n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",h=n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",p=n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let x;e[7]!==s||e[8]!==u||e[9]!==h||e[10]!==f||e[11]!==p?(x=g("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",u,h,f,p,s),e[7]=s,e[8]=u,e[9]=h,e[10]=f,e[11]=p,e[12]=x):x=e[12];let c;e[13]!==r?(c=!r&&o.jsxs(V,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[o.jsx(Q,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=r,e[14]=c):c=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==x||e[18]!==c?(v=o.jsxs(X,{children:[m,o.jsxs(R,{"data-slot":"sheet-content",className:x,...a,children:[t,c]})]}),e[15]=t,e[16]=a,e[17]=x,e[18]=c,e[19]=v):v=e[19],v}function ee(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function te(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(P,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx(A,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const ae="15rem",le="18rem",ie="4.5rem",E=T.createContext(null);function I(){const i=T.useContext(E);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function be(i){const e=b.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:l}=i,d=s===void 0?!1:s,n=K(),[r,m]=T.useState(d),[u,h]=T.useState(!1),f=a!==void 0,p=f?a:r;let x;e[0]!==f||e[1]!==l?(x=$=>{f||m($),l?.($)},e[0]=f,e[1]=l,e[2]=x):x=e[2];const c=x;let v;e[3]!==n||e[4]!==p||e[5]!==c?(v=()=>{n?h(oe):c(!p)},e[3]=n,e[4]=p,e[5]=c,e[6]=v):v=e[6];const y=v,w=p?"expanded":"collapsed";let j;e[7]!==n||e[8]!==p||e[9]!==u||e[10]!==c||e[11]!==w||e[12]!==y?(j={state:w,open:p,setOpen:c,isMobile:n,openMobile:u,setOpenMobile:h,toggleSidebar:y},e[7]=n,e[8]=p,e[9]=u,e[10]=c,e[11]=w,e[12]=y,e[13]=j):j=e[13];const S=j;let N;e[14]!==t?(N=o.jsx(z,{delayDuration:0,children:t}),e[14]=t,e[15]=N):N=e[15];let C;return e[16]!==S||e[17]!==N?(C=o.jsx(E.Provider,{value:S,children:N}),e[16]=S,e[17]=N,e[18]=C):C=e[18],C}function oe(i){return!i}function me(i){const e=b.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let d;e[5]!==l?(d={"--sidebar-width":ae,"--sidebar-width-icon":ie,...l},e[5]=l,e[6]=d):d=e[6];const n=d;let r;e[7]!==s?(r=g("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=r):r=e[8];let m;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==r?(m=o.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:r,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=r,e[13]=m):m=e[13],m}function he(i){const e=b.c(36);let t,s,a,l,d;e[0]!==i?({side:l,variant:d,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5]);const n=l===void 0?"left":l,r=d===void 0?"sidebar":d,{isMobile:m,state:u,openMobile:h,setOpenMobile:f}=I();if(m){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":le},e[6]=C):C=e[6];let $;e[7]===Symbol.for("react.memo_cache_sentinel")?($=o.jsxs(ee,{className:"sr-only",children:[o.jsx(te,{children:"Sidebar"}),o.jsx(se,{children:"Displays the mobile sidebar."})]}),e[7]=$):$=e[7];let _;e[8]!==t?(_=o.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=_):_=e[9];let M;e[10]!==n||e[11]!==_?(M=o.jsxs(Z,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[$,_]}),e[10]=n,e[11]=_,e[12]=M):M=e[12];let O;return e[13]!==h||e[14]!==a||e[15]!==f||e[16]!==M?(O=o.jsx(U,{open:h,onOpenChange:f,...a,children:M}),e[13]=h,e[14]=a,e[15]=f,e[16]=M,e[17]=O):O=e[17],O}const p=u==="expanded",x=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let c;e[18]!==x?(c=g("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",x),e[18]=x,e[19]=c):c=e[19];const v=p?void 0:"icon",y=p?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let w;e[20]!==s||e[21]!==y?(w=g("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=w):w=e[22];let j;e[23]!==t?(j=o.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let S;e[25]!==a||e[26]!==w||e[27]!==j?(S=o.jsx("div",{"data-slot":"sidebar-container",className:w,...a,children:j}),e[25]=a,e[26]=w,e[27]=j,e[28]=S):S=e[28];let N;return e[29]!==n||e[30]!==u||e[31]!==c||e[32]!==v||e[33]!==S||e[34]!==r?(N=o.jsx("div",{className:c,"data-state":u,"data-collapsible":v,"data-variant":r,"data-side":n,"data-slot":"sidebar",children:S}),e[29]=n,e[30]=u,e[31]=c,e[32]=v,e[33]=S,e[34]=r,e[35]=N):N=e[35],N}function xe(i){const e=b.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=I();let d;e[4]!==t?(d=g("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==l?(n=p=>{s?.(p),l()},e[6]=s,e[7]=l,e[8]=n):n=e[8];let r,m;e[9]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(J,{}),m=o.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=r,e[10]=m):(r=e[9],m=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=o.jsx(B,{asChild:!0,children:o.jsxs(q,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[r,m]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",o.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(ne)})]}),e[15]=h):h=e[15];let f;return e[16]!==u?(f=o.jsx(z,{delayDuration:300,children:o.jsxs(k,{children:[u,h]})}),e[16]=u,e[17]=f):f=e[17],f}function ne(i){return o.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function ge(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ve(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function je(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function we(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ne(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Se(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ye(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Ce(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function $e(i){const e=b.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=o.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const re=F("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function _e(i){const e=b.c(28);let t,s,a,l,d,n,r;e[0]!==i?({asChild:a,isActive:l,variant:d,size:n,tooltip:r,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=d,e[6]=n,e[7]=r):(t=e[1],s=e[2],a=e[3],l=e[4],d=e[5],n=e[6],r=e[7]);const m=a===void 0?!1:a,u=l===void 0?!1:l,h=d===void 0?"default":d,f=n===void 0?"default":n,p=m?G:"button",{isMobile:x}=I();let c;e[8]!==t||e[9]!==f||e[10]!==h?(c=g(re({variant:h,size:f}),t),e[8]=t,e[9]=f,e[10]=h,e[11]=c):c=e[11];let v;e[12]!==p||e[13]!==u||e[14]!==s||e[15]!==f||e[16]!==c?(v=o.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":u,className:c,...s}),e[12]=p,e[13]=u,e[14]=s,e[15]=f,e[16]=c,e[17]=v):v=e[17];const y=v;if(!r)return y;if(typeof r=="string"){let N;e[18]!==r?(N={children:r},e[18]=r,e[19]=N):N=e[19],r=N}let w;e[20]!==y?(w=o.jsx(B,{asChild:!0,children:y}),e[20]=y,e[21]=w):w=e[21];let j;e[22]!==x||e[23]!==r?(j=o.jsx(D,{side:"right",align:"center",hidden:x,...r}),e[22]=x,e[23]=r,e[24]=j):j=e[24];let S;return e[25]!==w||e[26]!==j?(S=o.jsxs(k,{children:[w,j]}),e[25]=w,e[26]=j,e[27]=S):S=e[27],S}export{Se as S,ye as a,Ce as b,_e as c,$e as d,we as e,ve as f,Ne as g,he as h,je as i,ge as j,me as k,be as l,te as m,se as n,ee as o,Z as p,U as q,xe as r,I as u};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-CfaJe34R.js","assets/index-CsXIUaax.js","assets/index-BAZmyVC-.css","assets/Tool02-AsfUGp__.js","assets/CheckCircle-myPjsJGU.js","assets/Settings02-B_QAMj-P.js","assets/use-mcp-client-DpsAHhsu.js","assets/auth-BqANqm0A.js","assets/useInfiniteQuery-BsbgCJ-c.js","assets/use-infinite-scroll-C3O-KBl8.js","assets/studio-tools-WL-_7DVR.js","assets/badge-Bu9TYgek.js","assets/input-B6QX4Bsc.js","assets/dropdown-menu-DabrgiLz.js","assets/Check-BdHuJuPw.js","assets/ChevronRight-BBN141em.js","assets/DotsVertical-5WbYSo6Z.js","assets/table-DX49ZzwB.js","assets/toggle-group-Q0IrBn5K.js","assets/use-view-mode-W11-AL0e.js","assets/use-mobile-DGf5vwNF.js","assets/FilterLines-ubYrwRwC.js","assets/SearchMd-D-oUO6X0.js","assets/dialog-CJkJPlAS.js","assets/X-th7ARgOR.js","assets/AlertCircle-Eoiskkdw.js","assets/Upload01-L2syNbDQ.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-P11DPMoL.js","assets/card-B0f_2u3D.js","assets/Trash01-g9SUeAN0.js","assets/label-CEg7qY-f.js","assets/select-DWrifuH3.js","assets/tooltip-fIVhp5ou.js","assets/ChevronDown-DEyjLxYx.js","assets/ChevronUp-DJfqG7zj.js","assets/switch-lBLWR9-v.js","assets/textarea-C_aquDFn.js","assets/XCircle-CfjuVDux.js","assets/checkbox-d1Rt9GUt.js","assets/Eye-CZFxMqY9.js","assets/LinkExternal01-DJvk8I2A.js","assets/use-copy-2CfnxQXo.js","assets/Copy01-gvtGLLcY.js","assets/Key01-D9NzOa5l.js","assets/Plus-XPxaBtTZ.js","assets/mcp-oauth-Dl2k8oDk.js","assets/Play-D_aQs7dj.js"])))=>i.map(i=>d[i]);
2
- import{c as m,d as n,f as c,j as t,k as f,r as l,aG as p}from"./index-CsXIUaax.js";import{R as u}from"./require-capability-BV5_KDVM.js";import"./use-capability-Dzali0wY.js";import"./access-gate-B0jUQZZH.js";import"./capability-load-error-DTwJskAo.js";const g=l.lazy(()=>p(()=>import("./registry-layout-CfaJe34R.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
@@ -1 +0,0 @@
1
- import{c as u,m as T,j as i,r as b,b as p,f as k,af as j,L as N,aI as y,aZ as L}from"./index-CsXIUaax.js";function B(t){const e=u.c(14);let l,s,o,n,r;e[0]!==t?({active:l,className:s,ref:n,type:r,...o}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=o,e[4]=n,e[5]=r):(l=e[1],s=e[2],o=e[3],n=e[4],r=e[5]);const c=r===void 0?"button":r,a=l?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let f;e[6]!==s||e[7]!==a?(f=T("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md transition-colors","max-md:[&_svg]:size-5","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",a,s),e[6]=s,e[7]=a,e[8]=f):f=e[8];let g;return e[9]!==o||e[10]!==n||e[11]!==f||e[12]!==c?(g=i.jsx("button",{ref:n,type:c,className:f,...o}),e[9]=o,e[10]=n,e[11]=f,e[12]=c,e[13]=g):g=e[13],g}const S=b.createContext(null);function h(){const t=b.use(S);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function v(t){const e=u.c(8),{children:l}=t,[s,o]=b.useState(null),[n,r]=b.useState(null),[c,a]=b.useState(null),[f,g]=b.useState(null);let d;e[0]!==c||e[1]!==f||e[2]!==n||e[3]!==s?(d={togglesEl:s,setTogglesEl:o,tabsEl:n,setTabsEl:r,centerEl:c,setCenterEl:a,rightEl:f,setRightEl:g},e[0]=c,e[1]=f,e[2]=n,e[3]=s,e[4]=d):d=e[4];let x;return e[5]!==l||e[6]!==d?(x=i.jsx(S,{value:d,children:l}),e[5]=l,e[6]=d,e[7]=x):x=e[7],x}function m(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx(v,{children:i.jsx("div",{className:"flex flex-col h-full min-h-0",children:l})}),e[0]=l,e[1]=s):s=e[1],s}function $(t){const e=u.c(10);let l,s,o;e[0]!==t?({children:l,className:s,...o}=t,e[0]=t,e[1]=l,e[2]=s,e[3]=o):(l=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=T("app-titlebar wco-drag relative z-10 shrink-0 grid grid-cols-3 items-center pl-1 pr-2 h-12 bg-sidebar",s),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==l||e[7]!==o||e[8]!==n?(r=i.jsx("div",{className:n,...o,children:l}),e[6]=l,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function C(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:l}),e[0]=l,e[1]=s):s=e[1],s}function w(t){const e=u.c(2),{children:l}=t;let s;return e[0]!==l?(s=i.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:l}),e[0]=l,e[1]=s):s=e[1],s}function R(){const t=u.c(13),e=p(),s=y().logo??L,o=typeof s=="string"?s:s.light,n=typeof s=="string"?s:s.dark;let r;t[0]!==e?(r=e("agentShellLayout.toolbar.logo"),t[0]=e,t[1]=r):r=t[1];let c;t[2]!==o||t[3]!==r?(c=i.jsx("img",{src:o,alt:r,className:"size-6 object-contain dark:hidden"}),t[2]=o,t[3]=r,t[4]=c):c=t[4];let a;t[5]!==e?(a=e("agentShellLayout.toolbar.logo"),t[5]=e,t[6]=a):a=t[6];let f;t[7]!==n||t[8]!==a?(f=i.jsx("img",{src:n,alt:a,className:"size-6 object-contain hidden dark:block"}),t[7]=n,t[8]=a,t[9]=f):f=t[9];let g;return t[10]!==c||t[11]!==f?(g=i.jsxs("span",{className:"wco-hide flex items-center shrink-0 px-2",children:[c,f]}),t[10]=c,t[11]=f,t[12]=g):g=t[12],g}function E(){const t=u.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(b.Suspense,{fallback:i.jsx("span",{className:"wco-hide shrink-0 size-6 mx-2"}),children:i.jsx(R,{})}),t[0]=e):e=t[0],e}function _(){const t=u.c(12),e=p();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org"},t[0]=l):l=t[0];const{org:s}=k(l);let o;t[1]!==s?(o={org:s},t[1]=s,t[2]=o):o=t[2];let n;t[3]!==e?(n=e("agentShellLayout.toolbar.backToHome"),t[3]=e,t[4]=n):n=t[4];let r;t[5]!==e?(r=e("agentShellLayout.toolbar.backToHome"),t[5]=e,t[6]=r):r=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(E,{}),t[7]=c):c=t[7];let a;return t[8]!==o||t[9]!==n||t[10]!==r?(a=i.jsx(N,{to:"/$org",params:o,"aria-label":n,title:r,className:"wco-no-drag flex items-center shrink-0 cursor-pointer pl-1",children:c}),t[8]=o,t[9]=n,t[10]=r,t[11]=a):a=t[11],a}function z(){const t=u.c(2),{setCenterEl:e}=h();let l;return t[0]!==e?(l=i.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=l):l=t[1],l}function P(t){const e=u.c(3),{children:l}=t,{centerEl:s}=h();if(!s)return null;let o;return e[0]!==s||e[1]!==l?(o=j.createPortal(l,s),e[0]=s,e[1]=l,e[2]=o):o=e[2],o}function H(t){const e=u.c(5),{className:l}=t,{setTabsEl:s}=h();let o;e[0]!==l?(o=T("shrink-0 flex items-center",l),e[0]=l,e[1]=o):o=e[1];let n;return e[2]!==s||e[3]!==o?(n=i.jsx("div",{ref:s,className:o}),e[2]=s,e[3]=o,e[4]=n):n=e[4],n}function I(t){const e=u.c(3),{children:l}=t,{tabsEl:s}=h();if(!s)return null;let o;return e[0]!==l||e[1]!==s?(o=j.createPortal(l,s),e[0]=l,e[1]=s,e[2]=o):o=e[2],o}function D(t){const e=u.c(5),{className:l}=t,{setTogglesEl:s}=h();let o;e[0]!==l?(o=T("contents",l),e[0]=l,e[1]=o):o=e[1];let n;return e[2]!==s||e[3]!==o?(n=i.jsx("div",{ref:s,className:o}),e[2]=s,e[3]=o,e[4]=n):n=e[4],n}function O(){const t=u.c(2),{setRightEl:e}=h();let l;return t[0]!==e?(l=i.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=l):l=t[1],l}m.Provider=v;m.Header=$;m.LeftColumn=C;m.RightColumn=w;m.Logo=E;m.LogoLink=_;m.CenterSlot=z;m.Center=P;m.TabsSlot=H;m.Tabs=I;m.TogglesSlot=D;m.RightSlot=O;export{B as T,m as a};
@@ -1 +0,0 @@
1
- import{X as Kt,Y as Ut,c as F,b as V,Z as pt,_ as ht,e as Gt,j as t,a as ae,B as ne,r as H,aJ as qt,d as st,s as Xt,m as X,t as K,w as Wt,k as ke,p as R,F as oe,f as ot,u as it,L as Qt,D as Yt,I as Jt,G as Zt,K as at,o as en,n as tn}from"./index-CsXIUaax.js";import{t as xt}from"./ChevronDown-DEyjLxYx.js";import{A as jt,j as nn,a5 as sn}from"./agent-icon-DCQPTD-I.js";import{T as Ce,a as ye,c as Se}from"./tooltip-fIVhp5ou.js";import{u as vt,d as bt,c as Ct}from"./sidebar-Dy1VWxxx.js";import{a as rt,i as on,f as an,S as rn,u as ln}from"./use-mcp-client-DpsAHhsu.js";import{a as cn,u as dn}from"./use-virtual-mcp-CNAeRFsi.js";import{a as Le,b as yt,P as St}from"./popover-DEaCMzZP.js";import{i as Ee}from"./Check-BdHuJuPw.js";import{s as we}from"./Plus-XPxaBtTZ.js";import{i as wt}from"./SearchMd-D-oUO6X0.js";import{s as Nt}from"./XClose-BV56nJYO.js";import{c as un,d as mn,b as fn,f as gn,e as pn,a as hn,A as xn}from"./alert-dialog-P11DPMoL.js";import{F as Q,a as nt,b as Y,c as J,d as Z,f as jn,e as ee}from"./form-BNZvnkRb.js";import{I as ie}from"./input-B6QX4Bsc.js";import{S as vn}from"./spinner-ChQk-fuJ.js";import{T as _t}from"./toolbar-DtyhtDGB.js";import{S as bn}from"./skeleton-Dr0ihbmb.js";import{D as Dt,a as kt,b as At,c as Cn,e as yn,f as Sn,g as wn}from"./drawer-Vmj6vj2H.js";import{u as It}from"./use-mobile-DGf5vwNF.js";import{a as Nn,G as _n}from"./github-repo-picker-BZBSEeFT.js";import{g as Dn,b as kn,a as Pt}from"./hooks-S0-VfPJM.js";import{u as An,g as In,a as Pn,b as Tn}from"./use-navigate-to-agent-BtA6n79A.js";import{a as On,c as Tt}from"./agent-capabilities-cXfbMfjV.js";import{u as Ot}from"./shell-layout-BTLWrDNT.js";import{f as zn}from"./reusable-new-chat-CouMjkYR.js";import{C as Mn}from"./collection-search-DVfGAujX.js";import{g as Fn,a as $n,b as Bn,e as Ln}from"./extract-connection-data-C2XmdMG4.js";import{u as zt,a as Mt,g as En,C as Ye}from"./connection-card-CSYIgKfu.js";import{e as Ft,d as $t,a as Bt,b as Lt,h as Vn,c as Rn}from"./dialog-CJkJPlAS.js";import{S as Hn,a as Kn,b as Un,c as Gn,d as De}from"./select-DWrifuH3.js";import{T as qn}from"./textarea-C_aquDFn.js";import{b as Et}from"./use-connection-B06hUHgo.js";import{a as Be,b as Je}from"./Tool02-AsfUGp__.js";import{s as Ze}from"./Star01-4a_Jxita.js";import{c as Xn,i as Fe,a as ut,E as Wn,p as Qn,b as Yn,d as Jn}from"./connection-form-helpers-C1xXkycr.js";import{a as et}from"./authenticate-and-persist-oauth-sNdJBe3I.js";import{g as Zn}from"./connection-slug-eyAPH6o3.js";import{C as es}from"./collection-tabs-u5enzkVl.js";import{u as mt}from"./use-infinite-scroll-C3O-KBl8.js";import{B as $e}from"./badge-Bu9TYgek.js";import{u as ts}from"./useSuspenseInfiniteQuery-3ceZ8_NX.js";import{g as Ve}from"./metadata-dUsYcpuu.js";import{u as ns}from"./studio-tools-WL-_7DVR.js";import{u as ss}from"./use-ai-providers-DEYBcyVN.js";function ft(n){return n.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const os=Kt({name:Ut().min(2,"Organization name is required")});function is(n){const e=F.c(66),{open:s,onOpenChange:o}=n,i=V();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={resolver:pt(os),defaultValues:{name:""}},e[0]=a):a=e[0];const r=ht(a);let d;e[1]!==i?(d=async E=>{const M=ft(E.name);if(!M)throw new Error(i("common.createOrganizationDialog.invalidSlug"));const G=await ae.organization.create({name:E.name,slug:M});if(G?.error)throw new Error(G.error.message||i("common.createOrganizationDialog.failedToCreate"));const U=G?.data?.slug??M;if(!U)throw new Error(i("common.createOrganizationDialog.failedToCreate"));return{orgSlug:U}},e[1]=i,e[2]=d):d=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=as,e[3]=c):c=e[3];let m;e[4]!==d?(m={mutationFn:d,onSuccess:c},e[4]=d,e[5]=m):m=e[5];const u=Gt(m);let p;e[6]!==u.error||e[7]!==i?(p=u.error instanceof Error?u.error.message:u.error?i("common.createOrganizationDialog.failedToCreateGeneric"):null,e[6]=u.error,e[7]=i,e[8]=p):p=e[8];const l=p;let x;e[9]!==i?(x=i("common.createOrganizationDialog.title"),e[9]=i,e[10]=x):x=e[10];let y;e[11]!==x?(y=t.jsx(un,{children:x}),e[11]=x,e[12]=y):y=e[12];let h;e[13]!==i?(h=i("common.createOrganizationDialog.description"),e[13]=i,e[14]=h):h=e[14];let f;e[15]!==h?(f=t.jsx(mn,{children:h}),e[15]=h,e[16]=f):f=e[16];let j;e[17]!==y||e[18]!==f?(j=t.jsxs(fn,{children:[y,f]}),e[17]=y,e[18]=f,e[19]=j):j=e[19];let v;if(e[20]!==u||e[21]!==r){let E;e[23]!==u?(E=M=>u.mutateAsync(M),e[23]=u,e[24]=E):E=e[24],v=r.handleSubmit(E),e[20]=u,e[21]=r,e[22]=v}else v=e[22];let b;e[25]!==r.formState.isSubmitting||e[26]!==i?(b=E=>{const{field:M}=E;return t.jsxs(Y,{children:[t.jsx(J,{children:i("common.createOrganizationDialog.nameLabel")}),t.jsx(Z,{children:t.jsx(ie,{...M,placeholder:i("common.createOrganizationDialog.namePlaceholder"),disabled:r.formState.isSubmitting})}),t.jsx(jn,{children:i("common.createOrganizationDialog.nameDescription")}),M.value&&t.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[i("common.createOrganizationDialog.urlLabel")," ",t.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",ft(M.value)]})]}),t.jsx(ee,{})]})},e[25]=r.formState.isSubmitting,e[26]=i,e[27]=b):b=e[27];let w;e[28]!==r.control||e[29]!==b?(w=t.jsx(Q,{control:r.control,name:"name",render:b}),e[28]=r.control,e[29]=b,e[30]=w):w=e[30];let N;e[31]!==l?(N=l&&t.jsx("div",{className:"text-destructive text-sm mt-2",children:l}),e[31]=l,e[32]=N):N=e[32];const P=r.formState.isSubmitting;let O;e[33]!==u||e[34]!==r?(O=()=>{u.reset(),r.reset()},e[33]=u,e[34]=r,e[35]=O):O=e[35];let g;e[36]!==i?(g=i("common.createOrganizationDialog.cancel"),e[36]=i,e[37]=g):g=e[37];let _;e[38]!==r.formState.isSubmitting||e[39]!==O||e[40]!==g?(_=t.jsx(gn,{disabled:P,onClick:O,children:g}),e[38]=r.formState.isSubmitting,e[39]=O,e[40]=g,e[41]=_):_=e[41];const T=!r.formState.isValid||r.formState.isSubmitting;let S;e[42]!==r.formState.isSubmitting||e[43]!==i?(S=r.formState.isSubmitting?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(vn,{size:"xs"})," ",i("common.createOrganizationDialog.creating")]}):i("common.createOrganizationDialog.createButton"),e[42]=r.formState.isSubmitting,e[43]=i,e[44]=S):S=e[44];let C;e[45]!==T||e[46]!==S?(C=t.jsx(ne,{type:"submit",variant:"default",disabled:T,children:S}),e[45]=T,e[46]=S,e[47]=C):C=e[47];let I;e[48]!==_||e[49]!==C?(I=t.jsxs(pn,{children:[_,C]}),e[48]=_,e[49]=C,e[50]=I):I=e[50];let k;e[51]!==v||e[52]!==w||e[53]!==N||e[54]!==I?(k=t.jsxs("form",{className:"space-y-6",onSubmit:v,autoComplete:"off",children:[w,N,I]}),e[51]=v,e[52]=w,e[53]=N,e[54]=I,e[55]=k):k=e[55];let A;e[56]!==r||e[57]!==k?(A=t.jsx(nt,{...r,children:k}),e[56]=r,e[57]=k,e[58]=A):A=e[58];let z;e[59]!==j||e[60]!==A?(z=t.jsxs(hn,{children:[j,A]}),e[59]=j,e[60]=A,e[61]=z):z=e[61];let L;return e[62]!==o||e[63]!==s||e[64]!==z?(L=t.jsx(xn,{open:s,onOpenChange:o,children:z}),e[62]=o,e[63]=s,e[64]=z,e[65]=L):L=e[65],L}function as(n){const{orgSlug:e}=n;window.location.href=`/${e}`}function Vt(){const n=H.useContext(qt),{data:e,refetch:s}=n.hooks.useListUserInvitations();return{invitations:(e??[]).filter(i=>i.status==="pending"&&new Date(i.expiresAt)>new Date),refetch:()=>s?.()}}function rs(n){let e=0;for(let o=0;o<n.length;o++)e=n.charCodeAt(o)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function lt(n){const e=F.c(13),{org:s,size:o}=n,i=o===void 0?"sm":o,a=i==="xs"?"size-5":"size-6",r=i==="xs"?"text-[9px]":"text-xs";let d;e[0]!==a?(d=X(a,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=a,e[1]=d):d=e[1];let c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:rs(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let m;e[5]!==s.logo||e[6]!==s.name||e[7]!==r?(m=s.logo?t.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):t.jsx("span",{className:X("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]=m):m=e[8];let u;return e[9]!==d||e[10]!==c||e[11]!==m?(u=t.jsx("div",{className:d,style:c,children:m}),e[9]=d,e[10]=c,e[11]=m,e[12]=u):u=e[12],u}function ls({invitation:n,onChanged:e}){const s=V(),[o,i]=H.useState(!1),a=n.organizationName??s("header.orgSwitcher.unknownOrganization"),r=async()=>{i(!0);try{const m=await ae.organization.acceptInvitation({invitationId:n.id});if(m.error){K.error(m.error.message),i(!1);return}}catch{K.error(s("header.orgSwitcher.failedToAcceptInvitation")),i(!1);return}K.success(s("header.orgSwitcher.joined",{name:a})),Wt();let c;try{c=(await ae.organization.getFullOrganization({query:{organizationId:n.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},d=async()=>{i(!0);try{const c=await ae.organization.rejectInvitation({invitationId:n.id});if(c.error){K.error(c.error.message),i(!1);return}K.success(s("header.orgSwitcher.invitationDeclined")),i(!1),e()}catch{K.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(lt,{org:{name:a},size:"sm"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate text-sm font-medium",children:a}),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(ne,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:o,children:s("header.orgSwitcher.accept")}),t.jsx(ne,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:d,disabled:o,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:a}),children:t.jsx(Nt,{size:14})})]})]})}function cs(n){const e=F.c(32),{orgParam:s,onSelectOrg:o,onCreateOrg:i}=n,a=V(),{data:r}=Xt(),{invitations:d,refetch:c}=Vt();let m;e[0]!==s?(m=(k,A)=>k.slug===s?-1:A.slug===s?1:k.name.localeCompare(A.name),e[0]=s,e[1]=m):m=e[1];const u=[...r??[]].sort(m),[p,l]=H.useState(""),x=p.toLowerCase(),y=x?u.filter(k=>k.name.toLowerCase().includes(x)||k.slug.toLowerCase().includes(x)):u;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(wt,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=h):h=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=k=>l(k.target.value),e[3]=f):f=e[3];let j;e[4]!==p?(j=k=>k.key==="Escape"&&p&&l(""),e[4]=p,e[5]=j):j=e[5];let v;e[6]!==a?(v=a("header.orgSwitcher.searchOrganizations"),e[6]=a,e[7]=v):v=e[7];let b;e[8]!==p||e[9]!==j||e[10]!==v?(b=t.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:p,onChange:f,onKeyDown:j,placeholder:v,className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[8]=p,e[9]=j,e[10]=v,e[11]=b):b=e[11];let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(we,{size:16}),e[12]=w):w=e[12];let N;e[13]!==i?(N=t.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:w}),e[13]=i,e[14]=N):N=e[14];let P;e[15]!==b||e[16]!==N?(P=t.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[h,b,N]}),e[15]=b,e[16]=N,e[17]=P):P=e[17];const O="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let g;e[18]!==d||e[19]!==p||e[20]!==c?(g=!p&&d.map(k=>t.jsx(ls,{invitation:k,onChanged:c},k.id)),e[18]=d,e[19]=p,e[20]=c,e[21]=g):g=e[21];const _=y.length===0&&t.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:p?a("header.orgSwitcher.noOrganizationsMatch",{query:p}):a("header.orgSwitcher.noOrganizationsAvailable")});let T;e[22]!==o||e[23]!==s?(T=k=>t.jsxs("button",{type:"button",onClick:()=>o(k.slug),className:X("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",k.slug===s?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[t.jsx(lt,{org:k,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:k.name}),t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:k.slug})]}),k.slug===s&&t.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},k.id),e[22]=o,e[23]=s,e[24]=T):T=e[24];const S=y.map(T);let C;e[25]!==g||e[26]!==_||e[27]!==S?(C=t.jsxs("div",{className:O,children:[g,_,S]}),e[25]=g,e[26]=_,e[27]=S,e[28]=C):C=e[28];let I;return e[29]!==C||e[30]!==P?(I=t.jsxs(t.Fragment,{children:[P,C]}),e[29]=C,e[30]=P,e[31]=I):I=e[31],I}function ds(n){const e=F.c(22),{trigger:s,orgParam:o,align:i,side:a}=n,r=i===void 0?"start":i,d=a===void 0?"bottom":a,c=st(),[m,u]=H.useState(!1),[p,l]=H.useState(!1);let x;e[0]!==s?(x=t.jsx(Le,{asChild:!0,children:s}),e[0]=s,e[1]=x):x=e[1];const y=String(m);let h;e[2]!==c?(h=P=>{u(!1),c({to:"/$org",params:{org:P}})},e[2]=c,e[3]=h):h=e[3];let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{u(!1),l(!0)},e[4]=f):f=e[4];let j;e[5]!==o||e[6]!==y||e[7]!==h?(j=t.jsx(cs,{orgParam:o,onSelectOrg:h,onCreateOrg:f},y),e[5]=o,e[6]=y,e[7]=h,e[8]=j):j=e[8];let v;e[9]!==r||e[10]!==d||e[11]!==j?(v=t.jsx(yt,{side:d,align:r,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:ms,onCloseAutoFocus:us,children:j}),e[9]=r,e[10]=d,e[11]=j,e[12]=v):v=e[12];let b;e[13]!==m||e[14]!==x||e[15]!==v?(b=t.jsxs(St,{open:m,onOpenChange:u,children:[x,v]}),e[13]=m,e[14]=x,e[15]=v,e[16]=b):b=e[16];let w;e[17]!==p?(w=t.jsx(is,{open:p,onOpenChange:l}),e[17]=p,e[18]=w):w=e[18];let N;return e[19]!==w||e[20]!==b?(N=t.jsxs(t.Fragment,{children:[b,w]}),e[19]=w,e[20]=b,e[21]=N):N=e[21],N}function us(n){return n.preventDefault()}function ms(n){n.preventDefault(),n.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function fs(n){const e=F.c(21),{value:s,onChange:o,placeholder:i,onKeyDown:a,className:r,isSearching:d,disabled:c}=n,m=i===void 0?"Search...":i;let u;e[0]!==r?(u=X("shrink-0 w-full border-b border-border h-12",r),e[0]=r,e[1]=u):u=e[1];const p=c?"cursor-not-allowed opacity-50":"cursor-text";let l;e[2]!==p?(l=X("flex items-center gap-2.5 h-12 px-4",p),e[2]=p,e[3]=l):l=e[3];let x;e[4]!==d?(x=d?t.jsx(ke,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):t.jsx(wt,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=d,e[5]=x):x=e[5];let y;e[6]!==o?(y=v=>o(v.target.value),e[6]=o,e[7]=y):y=e[7];let h;e[8]!==c||e[9]!==a||e[10]!==m||e[11]!==y||e[12]!==s?(h=t.jsx("input",{type:"text",value:s,onChange:y,onKeyDown:a,placeholder:m,disabled:c,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=c,e[9]=a,e[10]=m,e[11]=y,e[12]=s,e[13]=h):h=e[13];let f;e[14]!==l||e[15]!==x||e[16]!==h?(f=t.jsxs("label",{className:l,children:[x,h]}),e[14]=l,e[15]=x,e[16]=h,e[17]=f):f=e[17];let j;return e[18]!==u||e[19]!==f?(j=t.jsx("div",{className:u,children:f}),e[18]=u,e[19]=f,e[20]=j):j=e[20],j}function gs(n,e,s){if(!s)return null;const o=Dn(n,e);return o?o.threads.get().find(a=>a.id===s)?.branch??null:null}function ps(n){const e=F.c(6),{value:s,onChange:o}=n,i=V();let a;e[0]!==i?(a=i("sidebar.agentsSection.searchAgents"),e[0]=i,e[1]=a):a=e[1];let r;return e[2]!==o||e[3]!==a||e[4]!==s?(r=t.jsx(fs,{value:s,onChange:o,placeholder:a}),e[2]=o,e[3]=a,e[4]=s,e[5]=r):r=e[5],r}function hs(){const n=F.c(4),e=V();let s;n[0]!==e?(s=e("sidebar.agentsSection.noAgentsFound"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:s}),n[2]=s,n[3]=o):o=n[3],o}function xs(n){const e=F.c(10),{org:s,onClose:o}=n,i=V();let a;e[0]!==s.slug?(a={org:s.slug},e[0]=s.slug,e[1]=a):a=e[1];let r;e[2]!==o?(r=()=>o(),e[2]=o,e[3]=r):r=e[3];let d;e[4]!==i?(d=i("sidebar.agentsSection.seeAllAgents"),e[4]=i,e[5]=d):d=e[5];let c;return e[6]!==a||e[7]!==r||e[8]!==d?(c=t.jsx("div",{className:"border-t border-border px-3 py-2.5",children:t.jsx(Qt,{to:"/$org/settings/agents",params:a,onClick:r,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:d})}),e[6]=a,e[7]=r,e[8]=d,e[9]=c):c=e[9],c}function js(){const n=F.c(4),e=V();let s;n[0]!==e?(s=e("sidebar.agentsSection.agents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(Rt,{children:s}),n[2]=s,n[3]=o):o=n[3],o}function vs(n){const e=F.c(11),{onImportFromGithub:s}=n,o=V();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(_n,{className:"size-3.5"}),e[0]=i):i=e[0];let a;e[1]!==o?(a=o("sidebar.agentsSection.import"),e[1]=o,e[2]=a):a=e[2];let r;e[3]!==s||e[4]!==a?(r=t.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[i,a]}),e[3]=s,e[4]=a,e[5]=r):r=e[5];let d;e[6]!==o?(d=o("sidebar.agentsSection.codeAgents"),e[6]=o,e[7]=d):d=e[7];let c;return e[8]!==r||e[9]!==d?(c=t.jsx(Rt,{action:r,children:d}),e[8]=r,e[9]=d,e[10]=c):c=e[10],c}function bs(n){const e=F.c(11),{setOpen:s,emptyCtaClass:o}=n,i=V();let a;e[0]!==i?(a=i("sidebar.agentsSection.browseAgents"),e[0]=i,e[1]=a):a=e[1];let r;e[2]!==o?(r=X(o),e[2]=o,e[3]=r):r=e[3];let d;e[4]!==s?(d=()=>{R("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=d):d=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(we,{className:"size-4"}),e[6]=c):c=e[6];let m;return e[7]!==a||e[8]!==r||e[9]!==d?(m=t.jsx(_t,{"aria-label":a,className:r,onClick:d,children:c}),e[7]=a,e[8]=r,e[9]=d,e[10]=m):m=e[10],m}function Cs(n){const e=F.c(17),{setOpen:s,highlightEmpty:o,emptyCtaClass:i}=n,a=V();let r;e[0]!==o||e[1]!==a?(r=o?void 0:a("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a,e[2]=r):r=e[2];let d;e[3]!==i?(d=X(i),e[3]=i,e[4]=d):d=e[4];let c;e[5]!==s?(c=()=>{R("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=c):c=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(we,{}),e[7]=m):m=e[7];let u;e[8]!==a?(u=a("sidebar.agentsSection.newAgent"),e[8]=a,e[9]=u):u=e[9];let p;e[10]!==u?(p=t.jsx("span",{children:u}),e[10]=u,e[11]=p):p=e[11];let l;return e[12]!==r||e[13]!==d||e[14]!==c||e[15]!==p?(l=t.jsx(bt,{children:t.jsxs(Ct,{tooltip:r,className:d,onClick:c,children:[m,p]})}),e[12]=r,e[13]=d,e[14]=c,e[15]=p,e[16]=l):l=e[16],l}function ys(){const n=F.c(4),e=V();let s;n[0]!==e?(s=e("sidebar.agentsSection.browseAgents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(At,{className:"sr-only",children:s}),n[2]=s,n[3]=o):o=n[3],o}function Ss(n){const e=F.c(8),{emptyCtaClass:s}=n,o=V();let i;e[0]!==o?(i=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i):i=e[1];let a;e[2]!==s?(a=X(s),e[2]=s,e[3]=a):a=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(we,{className:"size-4"}),e[4]=r):r=e[4];let d;return e[5]!==i||e[6]!==a?(d=t.jsx(_t,{"aria-label":i,className:a,children:r}),e[5]=i,e[6]=a,e[7]=d):d=e[7],d}function ws(n){const e=F.c(19),{wrapEmptyHint:s,highlightEmpty:o,emptyCtaClass:i}=n,a=V();let r;e[0]!==o||e[1]!==a?(r=o?void 0:a("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a,e[2]=r):r=e[2];let d;e[3]!==i?(d=X(i),e[3]=i,e[4]=d):d=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(we,{}),e[5]=c):c=e[5];let m;e[6]!==a?(m=a("sidebar.agentsSection.newAgent"),e[6]=a,e[7]=m):m=e[7];let u;e[8]!==m?(u=t.jsx("span",{children:m}),e[8]=m,e[9]=u):u=e[9];let p;e[10]!==r||e[11]!==d||e[12]!==u?(p=t.jsx(Le,{asChild:!0,children:t.jsxs(Ct,{tooltip:r,className:d,children:[c,u]})}),e[10]=r,e[11]=d,e[12]=u,e[13]=p):p=e[13];let l;e[14]!==p||e[15]!==s?(l=s(p),e[14]=p,e[15]=s,e[16]=l):l=e[16];let x;return e[17]!==l?(x=t.jsx(bt,{children:l}),e[17]=l,e[18]=x):x=e[18],x}function Ns(n){const e=F.c(9),{children:s}=n,o=V();let i;e[0]!==s?(i=t.jsx(Ce,{asChild:!0,children:s}),e[0]=s,e[1]=i):i=e[1];let a;e[2]!==o?(a=o("sidebar.agentsSection.selectAnExistingAgent"),e[2]=o,e[3]=a):a=e[3];let r;e[4]!==a?(r=t.jsx(ye,{side:"right",sideOffset:8,children:a}),e[4]=a,e[5]=r):r=e[5];let d;return e[6]!==i||e[7]!==r?(d=t.jsxs(Se,{defaultOpen:!0,delayDuration:0,children:[i,r]}),e[6]=i,e[7]=r,e[8]=d):d=e[8],d}function _s(n){const e=st(),{create:s}=kn(),{locator:o}=oe(),i=ot({strict:!1}),a=it({strict:!1});return async r=>{const d=crypto.randomUUID(),c=r===a.virtualmcpid?gs(n,o,i.taskId??""):null;try{await s({id:d,virtual_mcp_id:r,...c?{branch:c}:{}})}catch{}e({to:"/$org/$taskId",params:{org:n,taskId:d},search:{virtualmcpid:r}})}}function tt(n){const e=F.c(20),{agent:s,selected:o,onClick:i}=n,a=o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let r;e[0]!==a?(r=X("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",a),e[0]=a,e[1]=r):r=e[1];let d;e[2]!==s.icon||e[3]!==s.title?(d=t.jsx(jt,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[2]=s.icon,e[3]=s.title,e[4]=d):d=e[4];let c;e[5]!==s.title?(c=t.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=c):c=e[6];let m;e[7]!==s.description?(m=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=m):m=e[8];let u;e[9]!==c||e[10]!==m?(u=t.jsxs("div",{className:"flex-1 min-w-0",children:[c,m]}),e[9]=c,e[10]=m,e[11]=u):u=e[11];let p;e[12]!==o?(p=o&&t.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=o,e[13]=p):p=e[13];let l;return e[14]!==i||e[15]!==r||e[16]!==d||e[17]!==u||e[18]!==p?(l=t.jsxs("button",{type:"button",onClick:i,className:r,children:[d,u,p]}),e[14]=i,e[15]=r,e[16]=d,e[17]=u,e[18]=p,e[19]=l):l=e[19],l}function Rt(n){const e=F.c(5),{children:s,action:o}=n;let i;e[0]!==s?(i=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==o||e[3]!==i?(a=t.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[i,o]}),e[2]=o,e[3]=i,e[4]=a):a=e[4],a}function Ds(n){const e=F.c(23),{onClose:s,onSelectAgent:o,selectedAgentId:i,onImportFromGithub:a}=n,[r,d]=H.useState(""),c=cn(),m=c??[],{org:u}=oe(),{data:p}=ae.useSession(),l=p?.user?.id??"anon",x=In(c),y=Pn(),h=_s(u.slug),f=On(c),j=r.toLowerCase(),v=m.filter(Ps).filter(B=>!f.has(B.id)).filter(Is).filter(B=>!r||B.title.toLowerCase().includes(j)),b=v.filter(As),w=v.filter(ks),N=rt(u.id),P=!r||N.title.toLowerCase().includes(j),O=!!(o&&P);let g;e[0]!==s||e[1]!==o?(g=()=>{o?.(null),s(),d("")},e[0]=s,e[1]=o,e[2]=g):g=e[2];const _=g,T=B=>{if(o){o(B.id),s(),d("");return}Tn({orgId:u.id,userId:l},B.id,x),y(),s(),d(""),h(B.id)},S="flex flex-col max-h-[min(640px,80dvh)]";let C;e[3]!==r?(C=t.jsx(ps,{value:r,onChange:d}),e[3]=r,e[4]=C):C=e[4];const I="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",k=o&&P&&N&&t.jsx(tt,{agent:N,selected:!i||i===N.id,onClick:_}),A=(b.length>0||!r)&&t.jsx(vs,{onImportFromGithub:a}),z=b.map(B=>t.jsx(tt,{agent:B,selected:o?i===B.id:void 0,onClick:()=>T(B)},B.id)),L=w.length>0&&t.jsx(js,{}),E=w.map(B=>t.jsx(tt,{agent:B,selected:o?i===B.id:void 0,onClick:()=>T(B)},B.id));let M;e[5]!==O||e[6]!==r||e[7]!==v.length?(M=v.length===0&&!O&&r&&t.jsx(hs,{}),e[5]=O,e[6]=r,e[7]=v.length,e[8]=M):M=e[8];let G;e[9]!==M||e[10]!==k||e[11]!==A||e[12]!==z||e[13]!==L||e[14]!==E?(G=t.jsxs("div",{className:I,children:[k,A,z,L,E,M]}),e[9]=M,e[10]=k,e[11]=A,e[12]=z,e[13]=L,e[14]=E,e[15]=G):G=e[15];let U;e[16]!==s||e[17]!==u?(U=t.jsx(xs,{org:u,onClose:s}),e[16]=s,e[17]=u,e[18]=U):U=e[18];let de;return e[19]!==G||e[20]!==U||e[21]!==C?(de=t.jsxs("div",{className:S,children:[C,G,U]}),e[19]=G,e[20]=U,e[21]=C,e[22]=de):de=e[22],de}function ks(n){return!Tt(n.metadata)}function As(n){return Tt(n.metadata)}function Is(n){return!an(n.id)}function Ps(n){return!on(n.id)}function Ts(n){const e=F.c(31);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{compact:o,trigger:i,onSelectAgent:a,selectedAgentId:r,side:d,align:c}=s,m=o===void 0?!1:o,u=d===void 0?"right":d,p=c===void 0?"start":c,[l,x]=H.useState(!1),[y,h]=H.useState(!1),f=It(),{setOpenMobile:j}=vt(),v=An(),b=v?"border border-border":void 0;let w;e[2]!==v?(w=A=>v?t.jsx(Ns,{children:A}):A,e[2]=v,e[3]=w):w=e[3];const N=w;let P;e[4]!==f||e[5]!==j?(P=()=>{x(!1),f&&j(!1)},e[4]=f,e[5]=j,e[6]=P):P=e[6];const O=P;let g;e[7]!==O?(g=()=>{O(),h(!0)},e[7]=O,e[8]=g):g=e[8];const _=g;let T;e[9]!==O||e[10]!==_||e[11]!==a||e[12]!==l||e[13]!==r?(T=l&&t.jsx(H.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(bn,{className:"h-4 w-24"})}),children:t.jsx(Ds,{onClose:O,onSelectAgent:a,selectedAgentId:r,onImportFromGithub:_})}),e[9]=O,e[10]=_,e[11]=a,e[12]=l,e[13]=r,e[14]=T):T=e[14];const S=T;let C;e[15]!==p||e[16]!==m||e[17]!==b||e[18]!==v||e[19]!==f||e[20]!==l||e[21]!==S||e[22]!==u||e[23]!==i||e[24]!==N?(C=f?t.jsxs(t.Fragment,{children:[i?t.jsx("button",{type:"button",onClick:()=>x(!0),className:"contents",children:i}):m?N(t.jsx(bs,{setOpen:x,emptyCtaClass:b})):t.jsx(Cs,{setOpen:x,highlightEmpty:v,emptyCtaClass:b}),t.jsx(Dt,{open:l,onOpenChange:x,direction:"bottom",children:t.jsxs(kt,{className:"max-h-[85dvh] p-0",children:[t.jsx(ys,{}),S]})})]}):t.jsxs(St,{open:l,onOpenChange:A=>{A&&!l&&R("agent_browser_opened",{surface:"desktop_popover"}),x(A)},children:[i?t.jsx(Le,{asChild:!0,children:i}):m?N(t.jsx(Le,{asChild:!0,children:t.jsx(Ss,{emptyCtaClass:b})})):t.jsx(ws,{wrapEmptyHint:N,highlightEmpty:v,emptyCtaClass:b}),t.jsx(yt,{className:"w-[380px] p-0 overflow-hidden",side:u,align:p,children:S})]}),e[15]=p,e[16]=m,e[17]=b,e[18]=v,e[19]=f,e[20]=l,e[21]=S,e[22]=u,e[23]=i,e[24]=N,e[25]=C):C=e[25];let I;e[26]!==y?(I=t.jsx(Nn,{open:y,onOpenChange:h,mode:"agent"}),e[26]=y,e[27]=I):I=e[27];let k;return e[28]!==I||e[29]!==C?(k=t.jsxs(t.Fragment,{children:[C,I]}),e[28]=I,e[29]=C,e[30]=k):k=e[30],k}const Os="wco-no-drag inline-flex items-center gap-1.5 min-w-0 rounded-md pl-1 pr-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function zs(n){const e=F.c(29),{agentId:s,fallback:o,onOpenHome:i,onPick:a}=n,r=V(),d=dn(s)??o??null;let c,m,u,p,l;e[0]!==d?.title||e[1]!==i||e[2]!==r?(l=d?.title??r("header.shellBreadcrumb.superAgentDefaultName"),p="flex min-w-0 items-center gap-0",c="button",m=i,u=r("header.shellBreadcrumb.openAgentHome",{name:l}),e[0]=d?.title,e[1]=i,e[2]=r,e[3]=c,e[4]=m,e[5]=u,e[6]=p,e[7]=l):(c=e[3],m=e[4],u=e[5],p=e[6],l=e[7]);const x=d?.icon??null;let y;e[8]!==x||e[9]!==l?(y=t.jsx(jt,{icon:x,name:l,size:"xs"}),e[8]=x,e[9]=l,e[10]=y):y=e[10];let h;e[11]!==c||e[12]!==m||e[13]!==u||e[14]!==y?(h=t.jsx("button",{type:c,onClick:m,"aria-label":u,className:"wco-no-drag flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:y}),e[11]=c,e[12]=m,e[13]=u,e[14]=y,e[15]=h):h=e[15];let f;e[16]!==l?(f=t.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:l}),e[16]=l,e[17]=f):f=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(xt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=j):j=e[18];let v;e[19]!==f?(v=t.jsxs("button",{type:"button",className:Os,children:[f,j]}),e[19]=f,e[20]=v):v=e[20];let b;e[21]!==s||e[22]!==a||e[23]!==v?(b=t.jsx(Ts,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:a,trigger:v}),e[21]=s,e[22]=a,e[23]=v,e[24]=b):b=e[24];let w;return e[25]!==b||e[26]!==p||e[27]!==h?(w=t.jsxs("div",{className:p,children:[h,b]}),e[25]=b,e[26]=p,e[27]=h,e[28]=w):w=e[28],w}function $o(n){const e=F.c(30);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{showName:o}=s,i=V(),{org:a}=oe(),{state:r,isMobile:d}=vt(),c=Vt().invitations.length>0,m=r==="collapsed"||d;let u;e[2]!==c||e[3]!==a.name||e[4]!==i?(u=c?i("header.shellBreadcrumb.switchOrganizationPendingInvitation",{name:a.name}):i("header.shellBreadcrumb.switchOrganization",{name:a.name}),e[2]=c,e[3]=a.name,e[4]=i,e[5]=u):u=e[5];let p;e[6]!==a?(p=t.jsx(lt,{org:a,size:"sm"}),e[6]=a,e[7]=p):p=e[7];let l;e[8]!==c||e[9]!==m?(l=c&&t.jsx("span",{className:X("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",m?"-top-1":"top-1/2 -translate-y-1/2")}),e[8]=c,e[9]=m,e[10]=l):l=e[10];let x;e[11]!==p||e[12]!==l?(x=t.jsxs("span",{className:"relative inline-flex",children:[p,l]}),e[11]=p,e[12]=l,e[13]=x):x=e[13];let y;e[14]!==a.name||e[15]!==o?(y=o&&t.jsx("span",{className:"truncate text-sm font-medium text-foreground max-w-[10rem]",children:a.name}),e[14]=a.name,e[15]=o,e[16]=y):y=e[16];let h;e[17]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(xt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[17]=h):h=e[17];let f;e[18]!==u||e[19]!==x||e[20]!==y?(f=t.jsx(Ce,{asChild:!0,children:t.jsxs("button",{type:"button","aria-label":u,className:"wco-no-drag flex items-center gap-1.5 shrink-0 rounded-lg pl-[5px] pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[x,y,h]})}),e[18]=u,e[19]=x,e[20]=y,e[21]=f):f=e[21];let j;e[22]!==a.slug||e[23]!==f?(j=t.jsx(ds,{orgParam:a.slug,trigger:f}),e[22]=a.slug,e[23]=f,e[24]=j):j=e[24];let v;e[25]!==a.name?(v=t.jsx(ye,{side:"bottom",children:a.name}),e[25]=a.name,e[26]=v):v=e[26];let b;return e[27]!==v||e[28]!==j?(b=t.jsxs(Se,{children:[j,v]}),e[27]=v,e[28]=j,e[29]=b):b=e[29],b}function Bo(n){const e=F.c(22);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{onNavigate:o}=s,{org:i}=oe();let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[2]=a):a=e[2];const r=ot(a);let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[3]=d):d=e[3];const c=it(d),{threads:m}=Pt(),{data:u}=ae.useSession(),{setTaskId:p,createNewTask:l}=Ot();let x;e[4]!==i.id?(x=rt(i.id),e[4]=i.id,e[5]=x):x=e[5];const y=x,h=y.id,f=r.taskId?c.virtualmcpid??h:h;let j;e[6]!==l||e[7]!==h||e[8]!==o||e[9]!==u?.user?.id||e[10]!==p||e[11]!==m?(j=O=>{const g=O??h,_=zn(m,g,u?.user?.id);_?p(_.id,g):l(g),o?.()},e[6]=l,e[7]=h,e[8]=o,e[9]=u?.user?.id,e[10]=p,e[11]=m,e[12]=j):j=e[12];const v=j;let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[13]=b):b=e[13];const w=f===h?y:void 0;let N;e[14]!==f||e[15]!==v?(N=()=>v(f),e[14]=f,e[15]=v,e[16]=N):N=e[16];let P;return e[17]!==f||e[18]!==v||e[19]!==w||e[20]!==N?(P=t.jsx(H.Suspense,{fallback:b,children:t.jsx(zs,{agentId:f,fallback:w,onOpenHome:N,onPick:v})}),e[17]=f,e[18]=v,e[19]=w,e[20]=N,e[21]=P):P=e[21],P}function Lo(){const n=F.c(24),e=V(),{org:s}=oe();let o;n[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},n[0]=o):o=n[0];const i=ot(o);let a;n[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},n[1]=a):a=n[1];const r=it(a),{threads:d}=Pt(),{createNewTask:c}=Ot();let m;n[2]!==s.id?(m=rt(s.id),n[2]=s.id,n[3]=m):m=n[3];const u=m.id,p=i.taskId?r.virtualmcpid??u:u;let l;n[4]!==i.taskId||n[5]!==d?(l=(i.taskId?d.find(P=>P.id===i.taskId)?.branch:null)??null,n[4]=i.taskId,n[5]=d,n[6]=l):l=n[6];const x=l;let y;n[7]!==p||n[8]!==c||n[9]!==x?(y=()=>{c(p,x)},n[7]=p,n[8]=c,n[9]=x,n[10]=y):y=n[10];const h=y;let f;n[11]!==e?(f=e("sidebar.taskGroupsList.newChat"),n[11]=e,n[12]=f):f=n[12];let j;n[13]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(nn,{size:16}),n[13]=j):j=n[13];let v;n[14]!==h||n[15]!==f?(v=t.jsx(Ce,{asChild:!0,children:t.jsx("button",{type:"button",onClick:h,"aria-label":f,className:"wco-no-drag flex shrink-0 items-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:j})}),n[14]=h,n[15]=f,n[16]=v):v=n[16];let b;n[17]!==e?(b=e("sidebar.taskGroupsList.newChat"),n[17]=e,n[18]=b):b=n[18];let w;n[19]!==b?(w=t.jsx(ye,{side:"bottom",children:b}),n[19]=b,n[20]=w):w=n[20];let N;return n[21]!==v||n[22]!==w?(N=t.jsxs(Se,{children:[v,w]}),n[21]=v,n[22]=w,n[23]=N):N=n[23],N}function Ms({open:n,onOpenChange:e,onCreated:s}){const o=V(),{org:i}=oe(),{data:a}=ae.useSession(),{stdioEnabled:r}=Yt(),d=It(),c=Et(),m=zt(),p=Mt(m,"").items,l=ht({resolver:pt(Xn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),x=l.watch("ui_type"),y=l.watch("connection_url"),h=l.watch("npx_package"),f=Fe({uiType:x,connectionUrl:y??"",npxPackage:h??""})??ut({uiType:x,connectionUrl:y??"",registryItems:p}),j=g=>{const _=g.trim();if(!_)return;const T=!!l.formState.dirtyFields.title,S=!!l.formState.dirtyFields.description,C=!!l.formState.dirtyFields.env_vars,I=A=>{if(A&&(!T&&!l.getValues("title").trim()&&A.title&&l.setValue("title",A.title,{shouldDirty:!1}),!S&&!(l.getValues("description")??"").trim()&&A.description&&l.setValue("description",A.description,{shouldDirty:!1}),!C&&A.envVarKeys?.length)){const z=l.getValues("env_vars")??[],L=new Set(z.map(M=>M.key)),E=A.envVarKeys.filter(M=>!L.has(M));E.length>0&&l.setValue("env_vars",[...z,...E.map(M=>({key:M,value:""}))],{shouldDirty:!0})}},k=Qn(_);if(k&&r){l.setValue("ui_type","NPX",{shouldDirty:!0}),l.setValue("npx_package",k.packageName,{shouldDirty:!0}),l.setValue("connection_url","",{shouldDirty:!0}),l.setValue("connection_token",null,{shouldDirty:!0}),I(Fe({uiType:"NPX",npxPackage:k.packageName}));return}if(_.startsWith("http://")||_.startsWith("https://")){const A=x==="HTTP"||x==="SSE"||x==="Websocket"?x:"HTTP";l.setValue("ui_type",A,{shouldDirty:!0}),l.setValue("connection_url",_,{shouldDirty:!0}),I(Fe({uiType:A,connectionUrl:_})??ut({uiType:A,connectionUrl:_,registryItems:p}));return}x==="NPX"&&I(Fe({uiType:"NPX",npxPackage:_}))},v=g=>{g||l.reset(),e(g)},b=async g=>{let _,T=null,S=null,C=null;g.ui_type==="NPX"?(_="STDIO",T="",C=Yn(g.npx_package||"",g.env_vars||[])):g.ui_type==="STDIO"?(_="STDIO",T="",C=Jn(g.stdio_command||"",g.stdio_args||"",g.stdio_cwd,g.env_vars||[])):(_=g.ui_type,T=g.connection_url||"",S=g.connection_token||null);const I=Fn("conn");try{await c.create.mutateAsync({id:I,title:g.title,description:g.description||null,connection_type:_,connection_url:T,connection_token:S,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:a?.user?.id||"system",organization_id:i.id,icon:g.icon??null,app_name:null,app_id:null,connection_headers:C,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),l.reset(),e(!1),s?.(I)}catch{K.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},w=o("connections.createConnectionDialog.title"),N=o("connections.createConnectionDialog.description"),P=l.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),O=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(Q,{control:l.control,name:"ui_type",render:({field:g})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.typeLabel")}),t.jsxs(Hn,{value:g.value,onValueChange:g.onChange,children:[t.jsx(Z,{children:t.jsx(Kn,{children:t.jsx(Un,{})})}),t.jsxs(Gn,{children:[t.jsx(De,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ze,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),t.jsx(De,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ze,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),t.jsx(De,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ze,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),r&&t.jsxs(t.Fragment,{children:[t.jsx(De,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Be,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),t.jsx(De,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(sn,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),t.jsx(ee,{})]})}),x==="NPX"&&t.jsx(Q,{control:l.control,name:"npx_package",render:({field:g})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.npmPackageLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...g,value:g.value??"",onPaste:_=>{const T=_.clipboardData.getData("text");T&&(_.preventDefault(),l.setValue("npx_package",T.trim(),{shouldDirty:!0}),j(T))},onBlur:_=>{j(_.target.value),g.onBlur()}})}),t.jsx(ee,{})]})}),x==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(Q,{control:l.control,name:"stdio_command",render:({field:g})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.commandLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...g,value:g.value??""})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:l.control,name:"stdio_args",render:({field:g})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.argumentsLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...g,value:g.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(Q,{control:l.control,name:"stdio_cwd",render:({field:g})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...g,value:g.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),t.jsx(ee,{})]})})]}),(x==="NPX"||x==="STDIO")&&t.jsx(Q,{control:l.control,name:"env_vars",render:({field:g})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),t.jsx(Z,{children:t.jsx(Wn,{value:g.value??[],onChange:g.onChange})}),t.jsx(ee,{})]})}),x!=="NPX"&&x!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{control:l.control,name:"connection_url",render:({field:g})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.urlLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...g,value:g.value??"",onPaste:_=>{const T=_.clipboardData.getData("text");T&&(_.preventDefault(),l.setValue("connection_url",T.trim(),{shouldDirty:!0}),j(T))},onBlur:_=>{j(_.target.value),g.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:l.control,name:"connection_token",render:({field:g})=>t.jsxs(Y,{children:[t.jsx(J,{children:f?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),t.jsx(Z,{children:t.jsx(ie,{type:"password",placeholder:f?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...g,value:g.value??""})}),f?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[f.token.helperText,f.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),t.jsx(ee,{})]})})]}),t.jsx(Q,{control:l.control,name:"title",render:({field:g})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.nameLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...g})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:l.control,name:"description",render:({field:g})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.descriptionLabel")}),t.jsx(Z,{children:t.jsx(qn,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...g,value:g.value??""})}),t.jsx(ee,{})]})})]});return d?t.jsx(Dt,{open:n,onOpenChange:v,children:t.jsxs(kt,{className:"max-h-[90vh]",children:[t.jsx(Cn,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(At,{children:w}),t.jsx(yn,{className:"mt-1",children:N})]}),t.jsx(Sn,{asChild:!0,children:t.jsx(ne,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(Nt,{size:16})})})]})}),t.jsx(nt,{...l,children:t.jsxs("form",{onSubmit:l.handleSubmit(b),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:O}),t.jsx(wn,{children:t.jsx(ne,{type:"submit",disabled:l.formState.isSubmitting,className:"w-full",children:P})})]})})]})}):t.jsx(Ft,{open:n,onOpenChange:v,children:t.jsxs($t,{className:"sm:max-w-[525px]",children:[t.jsxs(Bt,{children:[t.jsx(Lt,{children:w}),t.jsx(Vn,{children:N})]}),t.jsx(nt,{...l,children:t.jsxs("form",{onSubmit:l.handleSubmit(b),children:[t.jsx("div",{className:"py-4",children:O}),t.jsxs(Rn,{children:[t.jsx(ne,{type:"button",variant:"outline",onClick:()=>v(!1),children:o("connections.createConnectionDialog.cancelButton")}),t.jsx(ne,{type:"submit",disabled:l.formState.isSubmitting,className:"min-w-40",children:P})]})]})})]})})}function Fs(n){const e=F.c(72),{mode:s,agentId:o,addedConnectionIds:i,onAdd:a,onCloneAndAdd:r,onConnectAndAdd:d,connectingItemId:c,search:m,onCreateConnection:u,onBrowseNavigate:p,defaultTab:l}=n,x=s===void 0?"add":s,y=l===void 0?"connected":l,h=V(),{org:f}=oe(),j=H.useDeferredValue(m),v=m!==j;let b;e[0]!==j?(b=j.trim().toLowerCase(),e[0]=j,e[1]=b):b=e[1];const w=b;let N;e[2]!==y?(N=D=>D??y,e[2]=y,e[3]=N):N=e[3];const[P,O]=Jt(Zt.connectionsTab(f.slug)+(y==="all"?":home-modal":":agent-modal"),N);let g;e[4]!==P||e[5]!==O?(g=D=>{D!==P&&R("connections_dialog_tab_changed",{to_tab:D}),O(D)},e[4]=P,e[5]=O,e[6]=g):g=e[6];const _=g;let T;e[7]!==f.id||e[8]!==f.slug?(T={connectionId:rn,orgId:f.id,orgSlug:f.slug},e[7]=f.id,e[8]=f.slug,e[9]=T):T=e[9];const S=ln(T),C=j?.trim().split(/\s+/).filter(Boolean)??[],I=C.length>0?{operator:"or",conditions:C.flatMap(Ks)}:void 0,k={...I&&{where:I},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},A=JSON.stringify(k),{data:z,fetchNextPage:L,hasNextPage:E,isFetchingNextPage:M}=ts({queryKey:at.collectionListInfinite(S,f.id,"","CONNECTIONS",A),queryFn:async D=>{const{pageParam:$}=D,se=$===void 0?0:$;return(await S.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...I&&{where:I},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:se}})).structuredContent},initialPageParam:0,getNextPageParam:Rs,staleTime:3e4}),G=z?.pages.flatMap(Vs)??[],U=En(G),de=new Set(G.filter(Es).map(Ls)),B=zt(),re=Mt(B,j),Re=mt(re.loadMore,re.hasMore,re.isLoadingMore),He=mt(L,E??!1,M),W=P==="all"||!!w,ct=W?re.items.filter(D=>{const $=$n(D);if($&&de.has($))return!1;if(!w)return!0;const se=Ve(D._meta),le=[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,se?.friendly_name,se?.friendlyName].filter(Boolean).join(" ").toLowerCase();return C.some(te=>le.includes(te.toLowerCase()))}):[],Ne=ct.filter(Bs),_e=ct.filter($s);let Ae;e[10]!==i?(Ae=D=>D.some($=>i.has($.id)),e[10]=i,e[11]=Ae):Ae=e[11];const Ke=Ae;let Ie;e[12]!==i||e[13]!==o||e[14]!==c||e[15]!==Ke||e[16]!==x||e[17]!==a||e[18]!==p||e[19]!==r||e[20]!==h?(Ie=(D,$,se,le,te)=>{const Me=Ke(te),be=te.find(ce=>!i.has(ce.id)),q=te[0];if(x==="browse"){const ce=Zn(q);return t.jsx(Ye,{connection:{title:$,icon:se,description:te.length>1?`${te.length} instances`:le??void 0},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs($e,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ee,{size:11})," ",h("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{R("connection_browse_clicked",{app_name:q.app_name??null,connection_id:q.id,instances_count:te.length}),p?.(ce)}},D)}return t.jsx(Ye,{connection:{title:$,icon:se,description:le},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[Me&&t.jsxs($e,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ee,{size:11})," ",h("virtualMcp.connectionDialogContent.added")]}),t.jsx(ne,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:ce=>{ce.stopPropagation(),be?(R("connection_add_clicked",{action:"use_existing",app_name:q.app_name??null,connection_id:be.id}),o&&R("agent_connection_attached",{agent_id:o,connection_id:be.id,app_name:q.app_name??null,mode:"existing"}),a(be.id)):(R("connection_add_clicked",{action:"clone",app_name:q.app_name??null,base_connection_id:q.id}),r(q))},children:h("virtualMcp.connectionDialogContent.add")})]})},D)},e[12]=i,e[13]=o,e[14]=c,e[15]=Ke,e[16]=x,e[17]=a,e[18]=p,e[19]=r,e[20]=h,e[21]=Ie):Ie=e[21];const Pe=Ie;let Te;e[22]!==c||e[23]!==x||e[24]!==d||e[25]!==h?(Te=D=>{const $=Ve(D._meta),se=$?.friendlyName||$?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",le=D.server?.description||D.description||null,te=D.server?.icons?.[0]?.src||Bn(D.server?.repository)||null,Me=$?.official===!0,be=$?.verified===!0,q=$?.owner==="deco";return t.jsx(Ye,{connection:{title:se,description:le,icon:te},fallbackIcon:t.jsx(Be,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[q&&t.jsxs(Se,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:t.jsx("img",{src:"/logos/deco logo.svg",alt:h("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),t.jsx(ye,{children:h("virtualMcp.connectionDialogContent.builtByDeco")})]}),!q&&Me&&t.jsxs(Se,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx($e,{variant:"outline",size:"icon",children:t.jsx(Je,{})})}),t.jsx(ye,{children:h("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!q&&!Me&&be&&t.jsxs(Se,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx($e,{variant:"outline",size:"icon",children:t.jsx(Je,{})})}),t.jsx(ye,{children:h("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),t.jsx(ne,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:ce=>{ce.stopPropagation(),R("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:$?.friendlyName||D.server?.name||D.name||null}),d(D)},children:c===D.id?t.jsx(ke,{size:14,className:"animate-spin"}):h(x==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${D.id}`)},e[22]=c,e[23]=x,e[24]=d,e[25]=h,e[26]=Te):Te=e[26];const dt=Te;let ue;e[27]!==P||e[28]!==_||e[29]!==u||e[30]!==w||e[31]!==h?(ue=!w&&t.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[t.jsx(es,{tabs:[{id:"all",label:h("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:h("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:P,onTabChange:D=>_(D)}),t.jsxs(ne,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{R("connections_dialog_custom_clicked"),u()},children:[t.jsx(we,{size:12}),h("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=P,e[28]=_,e[29]=u,e[30]=w,e[31]=h,e[32]=ue):ue=e[32];const Ue=v&&"opacity-50 pointer-events-none";let me;e[33]!==Ue?(me=X("flex-1 overflow-auto p-5 transition-opacity duration-150",Ue),e[33]=Ue,e[34]=me):me=e[34];const Ht="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Oe;e[35]!==Pe?(Oe=D=>{if(D.type==="group")return Pe(D.key,D.title,D.icon,null,D.connections);const $=D.connection;return Pe($.id,$.title,$.icon,$.description??null,[$])},e[35]=Pe,e[36]=Oe):Oe=e[36];const Ge=U.map(Oe);let fe;e[37]!==He?(fe=t.jsx("div",{ref:He,className:"col-span-full h-1"}),e[37]=He,e[38]=fe):fe=e[38];let ge;e[39]!==M?(ge=M&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),e[39]=M,e[40]=ge):ge=e[40];const qe=W&&Ne.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx(Je,{size:13,className:"text-muted-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionVerified")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),Xe=W&&Ne.map(dt),We=W&&_e.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionAllConnections")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),Qe=W&&_e.map(dt);let pe;e[41]!==Re||e[42]!==B||e[43]!==W?(pe=W&&B.length>0&&t.jsx("div",{ref:Re,className:"col-span-full h-1"}),e[41]=Re,e[42]=B,e[43]=W,e[44]=pe):pe=e[44];let he;e[45]!==re.isLoadingMore||e[46]!==W?(he=W&&re.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),e[45]=re.isLoadingMore,e[46]=W,e[47]=he):he=e[47];let xe;e[48]!==Ge||e[49]!==fe||e[50]!==ge||e[51]!==qe||e[52]!==Xe||e[53]!==We||e[54]!==Qe||e[55]!==pe||e[56]!==he?(xe=t.jsxs("div",{className:Ht,children:[Ge,fe,ge,qe,Xe,We,Qe,pe,he]}),e[48]=Ge,e[49]=fe,e[50]=ge,e[51]=qe,e[52]=Xe,e[53]=We,e[54]=Qe,e[55]=pe,e[56]=he,e[57]=xe):xe=e[57];let je;e[58]!==P||e[59]!==U.length||e[60]!==_e||e[61]!==m||e[62]!==h||e[63]!==Ne?(je=U.length===0&&Ne.length===0&&_e.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:m?h("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:m}):h(P==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=P,e[59]=U.length,e[60]=_e,e[61]=m,e[62]=h,e[63]=Ne,e[64]=je):je=e[64];let ve;e[65]!==me||e[66]!==xe||e[67]!==je?(ve=t.jsxs("div",{className:me,children:[xe,je]}),e[65]=me,e[66]=xe,e[67]=je,e[68]=ve):ve=e[68];let ze;return e[69]!==ue||e[70]!==ve?(ze=t.jsxs(t.Fragment,{children:[ue,ve]}),e[69]=ue,e[70]=ve,e[71]=ze):ze=e[71],ze}function $s(n){return!n.verified&&!Ve(n._meta)?.verified&&!n.meta?.verified}function Bs(n){return n.verified||Ve(n._meta)?.verified||n.meta?.verified}function Ls(n){return n.app_name}function Es(n){return n.app_name}function Vs(n){return n?.items??[]}function Rs(n,e){if(n?.hasMore)return e.reduce(Hs,0)}function Hs(n,e){return n+(e?.items?.length??0)}function Ks(n){return[{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}function Eo({open:n,onOpenChange:e,defaultTab:s,initialSearch:o="",...i}){const a=V(),r=i.mode??"add",d="agentId"in i?i.agentId:void 0,c="addedConnectionIds"in i?i.addedConnectionIds??new Set:new Set,m="onAdd"in i&&i.onAdd?i.onAdd:S=>{},u=(S,C,I)=>{d&&R("agent_connection_attached",{agent_id:d,connection_id:S,app_name:C,mode:I})},[p,l]=H.useState(null),[x,y]=H.useState(o),[h,f]=H.useState(!1),{org:j}=oe(),{data:v}=ae.useSession(),b=Et(),w=en(),N=st(),P=S=>{e(!1),N({to:"/$org/settings/connections/$appSlug",params:{org:j.slug,appSlug:S}})},O=()=>{w.invalidateQueries({predicate:S=>{const C=S.queryKey;return C[1]===j.id&&C[3]==="collection"&&C[4]==="CONNECTIONS"}})},g=async(S,C)=>{R("connection_oauth_succeeded",{connection_id:S,flow:C});const I=new URL(`/api/${j.slug}/mcp/${S}`,window.location.origin);await w.invalidateQueries({queryKey:at.isMCPAuthenticated(I.href,null)}),O()},_=async S=>{l(S.app_name??S.id);try{const I=`${S.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,A=(await b.create.mutateAsync({title:I,description:S.description??null,connection_type:S.connection_type,connection_url:S.connection_url??null,connection_token:null,icon:S.icon??null,app_name:S.app_name??null,app_id:S.app_id??null,connection_headers:S.connection_headers??null})).id,z=await et({connectionId:A,orgId:j.id,orgSlug:j.slug,persistFallback:L=>b.update.mutateAsync({id:A,data:{connection_token:L}}).then(()=>{})});if(z.ran&&!z.ok){R("connection_oauth_failed",{connection_id:A,flow:"clone",error:z.error??"no_token"}),K.error(a("virtualMcp.addConnectionDialog.authenticationFailedError",{error:z.error??"no token received"})),await b.delete.mutateAsync(A);return}z.ran&&await g(A,"clone"),u(A,S.app_name??null,"clone"),m(A)}catch(C){console.error("Failed to add connection:",C),K.error(a("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{l(null)}},T=async S=>{if(!(!j||!v?.user?.id)){l(S.id);try{const C=Ln(S,j.id,v.user.id,{remoteIndex:0}),I=C.connection_type==="STDIO",k=!!C.connection_url,A=I&&C.connection_headers&&typeof C.connection_headers=="object"&&"command"in C.connection_headers;if(!k&&!A){K.error(a("virtualMcp.addConnectionDialog.mcpServerConnectionError")),l(null);return}const{id:z}=await b.create.mutateAsync(C),L=await et({connectionId:z,orgId:j.id,orgSlug:j.slug,persistFallback:E=>b.update.mutateAsync({id:z,data:{connection_token:E}}).then(()=>{})});if(L.ran&&!L.ok){R("connection_oauth_failed",{connection_id:z,flow:"connect_new",error:L.error??"no_token"}),K.warning(a("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:a("virtualMcp.addConnectionDialog.signInFailedDescription",{error:L.error??"no token received"})}),u(z,C.app_name??null,"new"),m(z);return}L.ran?(await g(z,"connect_new"),K.success(a("virtualMcp.addConnectionDialog.connectedAuthenticated"))):K.success(a("virtualMcp.addConnectionDialog.connected")),u(z,C.app_name??null,"new"),m(z)}catch(C){console.error("Failed to connect:",C),K.error(a("virtualMcp.addConnectionDialog.failedToConnect"))}finally{l(null)}}};return t.jsxs(Ft,{open:n,onOpenChange:e,children:[t.jsxs($t,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[t.jsx(Bt,{className:"px-6 pt-5 pb-0 shrink-0",children:t.jsx(Lt,{className:"text-base font-semibold",children:a(r==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),t.jsx("div",{className:"pt-3 shrink-0",children:t.jsx(Mn,{value:x,onChange:y,placeholder:a("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),t.jsx(H.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Fs,{mode:r,agentId:d,addedConnectionIds:c,onAdd:m,onCloneAndAdd:_,onConnectAndAdd:T,connectingItemId:p,search:x,onCreateConnection:()=>f(!0),onBrowseNavigate:P,defaultTab:s})})]}),t.jsx(Ms,{open:h,onOpenChange:f,onCreated:async S=>{f(!1);const C=await et({connectionId:S,orgId:j.id,orgSlug:j.slug,persistFallback:I=>b.update.mutateAsync({id:S,data:{connection_token:I}}).then(()=>{})});if(C.ran&&!C.ok){R("connection_oauth_failed",{connection_id:S,flow:"custom_create",error:C.error??"no_token"}),K.warning(a("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:a("virtualMcp.addConnectionDialog.signInFailedDescription",{error:C.error??"no token received"})}),u(S,null,"custom"),m(S),e(!1);return}C.ran&&await g(S,"custom_create"),u(S,null,"custom"),m(S),e(!1)}})]})}const gt=new Map;function Vo(){const{org:n}=oe(),e=ns(),s=ss(),o=s.find(f=>f.providerId==="deco"),{data:i,isLoading:a,refetch:r,isFetching:d}=tn({queryKey:at.aiProviderCredits(n.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),c=i?.balanceCents??null,m=c!=null?c/100:null,u=H.useRef(new Map);if(c!=null){const f=gt.get(n.id);u.current.get(n.id)&&f!=null&&c>f&&R("credits_topped_up_detected",{organization_id:n.id,delta_cents:c-f,previous_balance_cents:f,new_balance_cents:c}),gt.set(n.id,c),u.current.set(n.id,!0)}const p=!!o,l=c!=null&&c>0,x=c!=null&&c===0,y=c!=null&&c===200,h=s.length>0&&s.every(f=>f.providerId==="deco");return{hasDecoKey:p,decoKeyId:o?.id??null,balanceCents:c,balanceDollars:m,hasCredits:l,isZeroBalance:x,isInitialFreeCredit:y,hasOnlyDecoProvider:h,isLoading:a,isFetching:d,refetch:r}}export{Bo as A,Lo as N,$o as O,Eo as a,ds as b,lt as c,Vo as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./use-infinite-scroll-C3O-KBl8.js";import{dX as i}from"./index-CsXIUaax.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./use-infinite-scroll-C3O-KBl8.js";import{dX as u,W as n}from"./index-CsXIUaax.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
Binary file
Binary file
@@ -1,32 +0,0 @@
1
- {
2
- "name": "deco Studio",
3
- "short_name": "deco Studio",
4
- "description": "Hire specialized agents, give them access to your tools, and let them deliver real projects — with planning, verification, and observability built in.",
5
- "id": "/",
6
- "start_url": "/",
7
- "scope": "/",
8
- "display": "standalone",
9
- "display_override": ["window-controls-overlay"],
10
- "background_color": "#ffffff",
11
- "theme_color": "#f6f4ed",
12
- "icons": [
13
- {
14
- "src": "/favicon.svg",
15
- "sizes": "any",
16
- "type": "image/svg+xml",
17
- "purpose": "any"
18
- },
19
- {
20
- "src": "/icons/icon-192.png",
21
- "sizes": "192x192",
22
- "type": "image/png",
23
- "purpose": "any"
24
- },
25
- {
26
- "src": "/icons/icon-512.png",
27
- "sizes": "512x512",
28
- "type": "image/png",
29
- "purpose": "any"
30
- }
31
- ]
32
- }