decocms 4.61.1 → 4.62.0

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 (279) hide show
  1. package/dist/client/assets/{AlertCircle-C__5mMuz.js → AlertCircle-pDwFaZ69.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CPAe8LbH.js → AreaChart-CUV8xbg8.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-D9-IQ-Jm.js → ArrowUp-DtY9ye1M.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-zrEVpN9d.js → ArrowUpRight-BF8RC7lQ.js} +1 -1
  5. package/dist/client/assets/{Check-BJiMMf7v.js → Check-c3mV_Uni.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-DRbpAaoA.js → CheckCircle-CE_q_EWl.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-CBLc4m6w.js → ChevronDown-Be1kUurm.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-BjHi2zTb.js → ChevronRight-86cbncTU.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DmNuFMik.js → ChevronUp-7vDXTQHH.js} +1 -1
  10. package/dist/client/assets/{Circle--mEsLc32.js → Circle-Jj2lB_OB.js} +1 -1
  11. package/dist/client/assets/{Copy01-D5lFZSIr.js → Copy01-bnpfrlf8.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-C9eUzaCG.js → DotsVertical-Cw_RGd0K.js} +1 -1
  13. package/dist/client/assets/{Eye-CSrt2uwE.js → Eye-DSKes5cc.js} +1 -1
  14. package/dist/client/assets/{FilterLines-CRMm2AqP.js → FilterLines-AFo6zz8G.js} +1 -1
  15. package/dist/client/assets/{Globe01-SD7o4WjA.js → Globe01-CINqduC_.js} +1 -1
  16. package/dist/client/assets/{Globe04-Biz86Os4.js → Globe04-Df4bCIam.js} +1 -1
  17. package/dist/client/assets/{HardDrive-CbxCnB3J.js → HardDrive-C9RJVCTC.js} +1 -1
  18. package/dist/client/assets/{Key01-DJNC5dou.js → Key01-BufYrbpv.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-CurO7lkf.js → LayoutLeft-Dg-hdc1o.js} +1 -1
  20. package/dist/client/assets/{LinkExternal01-B3st3yUn.js → LinkExternal01-jNsZTUJe.js} +1 -1
  21. package/dist/client/assets/{List-C-Y7abIw.js → List-jTag997N.js} +1 -1
  22. package/dist/client/assets/{Loading02-BqCrbGU_.js → Loading02-DXivv_GE.js} +1 -1
  23. package/dist/client/assets/{Monitor01-DpZudhGT.js → Monitor01-Cgb6dKKW.js} +1 -1
  24. package/dist/client/assets/{Package-DWNnL7Bo.js → Package-Bm7E2eK0.js} +1 -1
  25. package/dist/client/assets/{Palette-Cyg4gkHm.js → Palette-D0cmCBJm.js} +1 -1
  26. package/dist/client/assets/{Play-BsdkOEt3.js → Play-DL5iVtNY.js} +1 -1
  27. package/dist/client/assets/{Plus-CdBUTSrl.js → Plus-SxhLmH-g.js} +1 -1
  28. package/dist/client/assets/{SearchLg-_kiE3lNL.js → SearchLg-DalS_9no.js} +1 -1
  29. package/dist/client/assets/{SearchMd-CPb906Aj.js → SearchMd-DXMQuWHS.js} +1 -1
  30. package/dist/client/assets/{Settings02-BaPvDdXK.js → Settings02-Ci6H3sb0.js} +1 -1
  31. package/dist/client/assets/{Shield01-CA1C0PT_.js → Shield01-CFnvQppZ.js} +1 -1
  32. package/dist/client/assets/{Star01-B19iYHho.js → Star01-ZuQ9gpI3.js} +1 -1
  33. package/dist/client/assets/{Stars01-RBw3Iorj.js → Stars01-MX3VUC0h.js} +1 -1
  34. package/dist/client/assets/{Stars02-DMp85N4F.js → Stars02-ClT22kUl.js} +1 -1
  35. package/dist/client/assets/{Sun-BvLzEM7C.js → Sun-C2eqMrg3.js} +1 -1
  36. package/dist/client/assets/{SwitchHorizontal01-_8RyBCsb.js → SwitchHorizontal01-CTbgmfyn.js} +1 -1
  37. package/dist/client/assets/{Tool01-BRwOHymx.js → Tool01-CcmA_w81.js} +1 -1
  38. package/dist/client/assets/{Tool02-DpdINpQD.js → Tool02-DsdesO-0.js} +1 -1
  39. package/dist/client/assets/{Trash01-BaM_ljKo.js → Trash01-RuXWiql6.js} +1 -1
  40. package/dist/client/assets/{TrendUp01-D_1HcFdI.js → TrendUp01-RmaL7vVA.js} +1 -1
  41. package/dist/client/assets/{Upload01-H_9RE18o.js → Upload01-t4JMvfO4.js} +1 -1
  42. package/dist/client/assets/{User01-CwCos6Py.js → User01-nY_0gSR5.js} +1 -1
  43. package/dist/client/assets/{Users01-CqkgkQyP.js → Users01-COP9ABdE.js} +1 -1
  44. package/dist/client/assets/{Users03-D5qmvjdI.js → Users03-CwOsvMmx.js} +1 -1
  45. package/dist/client/assets/{X-B6q2eNkF.js → X-82Zaa9wO.js} +1 -1
  46. package/dist/client/assets/{XCircle-Vpo_BauK.js → XCircle-DFVEpL7j.js} +1 -1
  47. package/dist/client/assets/{XClose-BAeGDKN0.js → XClose-DGRyO79b.js} +1 -1
  48. package/dist/client/assets/{Zap-DVunWyGl.js → Zap-DGilRzov.js} +1 -1
  49. package/dist/client/assets/{ZapSquare-a7mV4MQr.js → ZapSquare-x5bylaAn.js} +1 -1
  50. package/dist/client/assets/{ZoomOut-CC64T3-s.js → ZoomOut-d0pU1jsr.js} +1 -1
  51. package/dist/client/assets/{access-gate-BHgO0o7t.js → access-gate-B9Uqf_RZ.js} +1 -1
  52. package/dist/client/assets/{add-section-modal-Ax-dPZ4W.js → add-section-modal-F3LoJMj-.js} +1 -1
  53. package/dist/client/assets/agent-icon-Bx7GZZkT.js +1 -0
  54. package/dist/client/assets/agents-list-DA2O4yFI.js +1 -0
  55. package/dist/client/assets/ai-providers-_h8FzskN.js +1 -0
  56. package/dist/client/assets/{alert-B1zCZRQ_.js → alert-D7vvtYHx.js} +1 -1
  57. package/dist/client/assets/{alert-dialog-DBB5CaN8.js → alert-dialog-BbUTua7Y.js} +3 -3
  58. package/dist/client/assets/{app-editor-Bm1z14-p.js → app-editor-Ba6EJE8k.js} +1 -1
  59. package/dist/client/assets/{auth-9zI7uyI_.js → auth-Cduc78Mk.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-DiWk8VnS.js → auth-catchall-BiGQzMvA.js} +1 -1
  61. package/dist/client/assets/auth-entry-B1IjK16Y.js +1 -0
  62. package/dist/client/assets/{auth-split-layout-D2MQFkDk.js → auth-split-layout-B5WaIo2U.js} +1 -1
  63. package/dist/client/assets/{authenticate-and-persist-oauth-D1WuDeU5.js → authenticate-and-persist-oauth-Bsjhlz6M.js} +1 -1
  64. package/dist/client/assets/{automation-list-row-D9qq5pJq.js → automation-list-row-tfqwgW_l.js} +1 -1
  65. package/dist/client/assets/{automation-runs-B4v9bIbU.js → automation-runs-HchqpNoW.js} +1 -1
  66. package/dist/client/assets/automations-3g-k57eu.js +1 -0
  67. package/dist/client/assets/{autosend-CVG-zQs7.js → autosend-CFSFemh9.js} +1 -1
  68. package/dist/client/assets/{avatar-BYTTt2km.js → avatar-ChSwYwdc.js} +1 -1
  69. package/dist/client/assets/{badge-CUmMlsBT.js → badge-BDCVlL_X.js} +1 -1
  70. package/dist/client/assets/{block-document-DsousJkJ.js → block-document-CwHUDj3Z.js} +1 -1
  71. package/dist/client/assets/brand-context-KxYFeM0J.js +1 -0
  72. package/dist/client/assets/{buckets-w58Ia8Bn.js → buckets-BB9qHXCG.js} +1 -1
  73. package/dist/client/assets/{bulk-category-panel-6n-2Zfwo.js → bulk-category-panel-mDoc713s.js} +1 -1
  74. package/dist/client/assets/{calendar-Y3krjFiC.js → calendar-DkErgVju.js} +1 -1
  75. package/dist/client/assets/capability-load-error-C5KrMr5A.js +1 -0
  76. package/dist/client/assets/{card-BKGavoj3.js → card-CZ_4AnzZ.js} +1 -1
  77. package/dist/client/assets/{category-editor-DQT-kjqq.js → category-editor-CoE1JSlR.js} +1 -1
  78. package/dist/client/assets/{chat-context-1Zkmke_h.js → chat-context-DHiffp4D.js} +6 -6
  79. package/dist/client/assets/{checkbox-Ckmw9Mfi.js → checkbox-B0y92ybh.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-BjyaQWg8.js → cli-auth-success-BJQaPA_u.js} +1 -1
  81. package/dist/client/assets/collection-detail-B85L8fXv.js +1 -0
  82. package/dist/client/assets/{collection-display-button-CYSdyqyD.js → collection-display-button-CTkls5Hq.js} +1 -1
  83. package/dist/client/assets/{collection-search-DOi2t6LQ.js → collection-search-B1ZoXYDP.js} +1 -1
  84. package/dist/client/assets/{collection-table-wrapper-DVD9VKmA.js → collection-table-wrapper-CzOELqST.js} +1 -1
  85. package/dist/client/assets/{collection-tabs-Dmvezwf-.js → collection-tabs-DSyyuCu8.js} +1 -1
  86. package/dist/client/assets/{command-C07_gdqU.js → command-NscuxjlL.js} +1 -1
  87. package/dist/client/assets/commerce-onboarding-DS2bNsVf.js +1 -0
  88. package/dist/client/assets/{connect-desktop-dialog-hKwz2gHB.js → connect-desktop-dialog-C_zkxzg2.js} +1 -1
  89. package/dist/client/assets/connection-card-DgJ4fCkV.js +1 -0
  90. package/dist/client/assets/connection-detail-BHWNvMoI.js +1 -0
  91. package/dist/client/assets/{connection-form-helpers-CGNedBLj.js → connection-form-helpers-CoPiWrjw.js} +1 -1
  92. package/dist/client/assets/connections-ByyzNSeZ.js +1 -0
  93. package/dist/client/assets/{decopilot-sse-pool-CBL8Jn9p.js → decopilot-sse-pool-jzNdhqzZ.js} +1 -1
  94. package/dist/client/assets/dialog-BxiPyolh.js +1 -0
  95. package/dist/client/assets/domain-settings-DixzI7vw.js +1 -0
  96. package/dist/client/assets/{drawer-C1W7KPBD.js → drawer-HMFyJ4Dn.js} +1 -1
  97. package/dist/client/assets/{dropdown-menu-D4PeOhjt.js → dropdown-menu-B8LX4IYo.js} +1 -1
  98. package/dist/client/assets/{empty-state-NAWKd2m2.js → empty-state-BJyyJcI7.js} +1 -1
  99. package/dist/client/assets/{extract-connection-data-CeaTTHDG.js → extract-connection-data-CgMMiKb9.js} +1 -1
  100. package/dist/client/assets/{file-explorer-B0DhTQmo.js → file-explorer-B2mELjEV.js} +2 -2
  101. package/dist/client/assets/{file-type-icon-DN87_g0K.js → file-type-icon-aF4rioSK.js} +1 -1
  102. package/dist/client/assets/{files-BtvoHj95.js → files-DlatlTEv.js} +1 -1
  103. package/dist/client/assets/{form-ChRNwWXa.js → form-NWTw1_w9.js} +1 -1
  104. package/dist/client/assets/general-B6MHlXUW.js +1 -0
  105. package/dist/client/assets/github-repo-picker-BgT_NiIP.js +1 -0
  106. package/dist/client/assets/{hooks-k9Lihge2.js → hooks-7RE64ble.js} +1 -1
  107. package/dist/client/assets/index-6OJYzM5S.js +1 -0
  108. package/dist/client/assets/{index-CF7vJTQ1.js → index-BQNtvMv8.js} +1 -1
  109. package/dist/client/assets/index-Bn17GDJi.js +1 -0
  110. package/dist/client/assets/{index-SPy5-3x1.js → index-C6SqXYAf.js} +1 -1
  111. package/dist/client/assets/{index-DBFf6th0.js → index-CGtkbkWC.js} +1 -1
  112. package/dist/client/assets/{index-BzAvU-Br.js → index-CNXl1ql2.js} +5 -5
  113. package/dist/client/assets/{index-D3FFjINn.js → index-CPLWHNIg.js} +5 -5
  114. package/dist/client/assets/{index-Cvg8wlf2.js → index-CtlgC1KW.js} +26 -26
  115. package/dist/client/assets/{index-EnziWkqS.js → index-Cv4TIpz2.js} +1 -1
  116. package/dist/client/assets/index-D6W0Zja4.css +1 -0
  117. package/dist/client/assets/index-DX7CG04Y.js +1 -0
  118. package/dist/client/assets/index-Dz-SEkbI.js +1 -0
  119. package/dist/client/assets/{index-DDqctd2I.js → index-FOhB290E.js} +1 -1
  120. package/dist/client/assets/{index-TIHB_eNq.js → index-Fk54aBQb.js} +1 -1
  121. package/dist/client/assets/{index-redirect-Dy0h6dcP.js → index-redirect-D_1i3wgr.js} +1 -1
  122. package/dist/client/assets/{index-DARNlAjK.js → index-w9OsdEvg.js} +1 -1
  123. package/dist/client/assets/{input-DxEfOo7U.js → input-D0-jk8XC.js} +1 -1
  124. package/dist/client/assets/{integration-icon-CSm7Qy8c.js → integration-icon-BxCXFWwF.js} +1 -1
  125. package/dist/client/assets/invite-member-dialog-CczkEEVJ.js +3 -0
  126. package/dist/client/assets/{label-pwPiXf8V.js → label-CI8zXgUl.js} +1 -1
  127. package/dist/client/assets/{layout-CwJiiVGT.js → layout-DsSv6cI0.js} +1 -1
  128. package/dist/client/assets/{login-B8zzTriK.js → login-vc557tVg.js} +1 -1
  129. package/dist/client/assets/{mcp-oauth-DSz8vxQO.js → mcp-oauth-Crm2yFws.js} +1 -1
  130. package/dist/client/assets/members-BriZzAKO.js +1 -0
  131. package/dist/client/assets/{monaco-editor-CAHRW4WA.js → monaco-editor-BSERZA56.js} +1 -1
  132. package/dist/client/assets/{monitoring-stats-row-CsT90p2N.js → monitoring-stats-row-Bzy4MOqt.js} +3 -3
  133. package/dist/client/assets/{oauth-callback-VPY9HivQ.js → oauth-callback-BweaHAfJ.js} +1 -1
  134. package/dist/client/assets/{oauth-callback-ai-provider-7Otx8tRA.js → oauth-callback-ai-provider-DGFuYZT6.js} +1 -1
  135. package/dist/client/assets/{onboarding-Cg7clNbz.js → onboarding-CGfqD1Pb.js} +1 -1
  136. package/dist/client/assets/{org-install-DOT7wW8z.js → org-install-C4kxLg_g.js} +1 -1
  137. package/dist/client/assets/{org-layout-CAalwLCr.js → org-layout-DzZAcdj6.js} +1 -1
  138. package/dist/client/assets/{organization-choice-C4m3OUFF.js → organization-choice-D69Iyg_P.js} +1 -1
  139. package/dist/client/assets/{orgs-C6fA-Nxo.js → orgs-CvM6zK17.js} +1 -1
  140. package/dist/client/assets/{page-seo-form-BwL8BfIG.js → page-seo-form-C8i2PCcW.js} +1 -1
  141. package/dist/client/assets/page-seo-sheet-Bj1PQ_T3.js +1 -0
  142. package/dist/client/assets/{popover-BWgdS4nk.js → popover-4SjKIFSf.js} +1 -1
  143. package/dist/client/assets/{post-editor-CGwr_HH8.js → post-editor-DwhUQfz3.js} +1 -1
  144. package/dist/client/assets/{primitives-D9ISUiF0.js → primitives-IUnUzi8K.js} +1 -1
  145. package/dist/client/assets/profile-op77lWAk.js +1 -0
  146. package/dist/client/assets/project-app-view-Bw5vRwKV.js +1 -0
  147. package/dist/client/assets/record-editor-CO3ZgdGS.js +1 -0
  148. package/dist/client/assets/registry-DasK6zXw.js +2 -0
  149. package/dist/client/assets/{registry-layout-BUy4U6hp.js → registry-layout-DPozdEQJ.js} +4 -4
  150. package/dist/client/assets/{reports-BSqZJIfK.js → reports-AOzd79LO.js} +1 -1
  151. package/dist/client/assets/{require-capability-CCYSfrX4.js → require-capability-BIrGCy6a.js} +1 -1
  152. package/dist/client/assets/{required-auth-layout-BbJDdJdw.js → required-auth-layout-CQN5hr5X.js} +1 -1
  153. package/dist/client/assets/{reset-password--7kv0fD0.js → reset-password-DyAxea_4.js} +1 -1
  154. package/dist/client/assets/roles-Bmag3QoK.js +1 -0
  155. package/dist/client/assets/{search-input-Bu2qiTLD.js → search-input-DAhQOW8w.js} +1 -1
  156. package/dist/client/assets/secrets-Bca-yEgx.js +1 -0
  157. package/dist/client/assets/{sections-editor-Bsd0iXZp.js → sections-editor-A9ozMN_I.js} +1 -1
  158. package/dist/client/assets/{select-CIDMHDRe.js → select-DymbSi1i.js} +1 -1
  159. package/dist/client/assets/{select-model-BLJUdbv5.js → select-model-CBmm5efp.js} +1 -1
  160. package/dist/client/assets/self-tool-result-DQZF7wnw.js +1 -0
  161. package/dist/client/assets/{seo-editor-BBZtjoTI.js → seo-editor-D8BRx5cO.js} +1 -1
  162. package/dist/client/assets/settings-layout-BbrrKyAB.js +1 -0
  163. package/dist/client/assets/{settings-section-D69S9E0I.js → settings-section-BorHlHtt.js} +1 -1
  164. package/dist/client/assets/{shell-controls-Borp0IEW.js → shell-controls-D4pwQUJp.js} +1 -1
  165. package/dist/client/assets/shell-layout-DSlq9QDA.js +1 -0
  166. package/dist/client/assets/sidebar-BGBaPTiJ.js +1 -0
  167. package/dist/client/assets/{skeleton-CgTyvIfS.js → skeleton-Cs7umMol.js} +1 -1
  168. package/dist/client/assets/sso-CSY_I7_s.js +1 -0
  169. package/dist/client/assets/store-CbwbkmsP.js +1 -0
  170. package/dist/client/assets/store-registry-3IML_T0w.js +2 -0
  171. package/dist/client/assets/studio-tools-Dm4swbDJ.js +1 -0
  172. package/dist/client/assets/{switch-DkvkIrzq.js → switch-DenJ-Rqp.js} +1 -1
  173. package/dist/client/assets/{table-BmCQne9U.js → table-6yLqG5BG.js} +1 -1
  174. package/dist/client/assets/{tabs-WNIrx41Q.js → tabs-B41R3KT7.js} +1 -1
  175. package/dist/client/assets/{textarea-CZTZGoFe.js → textarea-DDx4ded2.js} +1 -1
  176. package/dist/client/assets/{toggle-group-BhyMCiuu.js → toggle-group-DxbzbSVL.js} +1 -1
  177. package/dist/client/assets/{toolbar-DUZ2w4vN.js → toolbar-Dw7sJZzm.js} +1 -1
  178. package/dist/client/assets/{toolbar-icon-button-CyxV7J7K.js → toolbar-icon-button-DRu94yPg.js} +1 -1
  179. package/dist/client/assets/tools-list-gF6CK4rd.js +1 -0
  180. package/dist/client/assets/{tooltip-CiXxbAOc.js → tooltip-2S76Z1GN.js} +1 -1
  181. package/dist/client/assets/use-ai-providers-BRJFSGox.js +1 -0
  182. package/dist/client/assets/use-automations-CtMMZwGK.js +1 -0
  183. package/dist/client/assets/use-capability-Cr4AoWjX.js +1 -0
  184. package/dist/client/assets/{use-clock-tick-DOabyHE5.js → use-clock-tick-YishFSE2.js} +1 -1
  185. package/dist/client/assets/{use-collections-7MdzRrDf.js → use-collections-Bq6tf4lW.js} +1 -1
  186. package/dist/client/assets/use-connection-C0xfUPl-.js +1 -0
  187. package/dist/client/assets/{use-copy-BQO62X_d.js → use-copy-D7Lvwi_8.js} +1 -1
  188. package/dist/client/assets/{use-create-virtual-mcp-DUAN7sfZ.js → use-create-virtual-mcp-CT3JpXjp.js} +1 -1
  189. package/dist/client/assets/{use-debounced-autosave-CNjFdqON.js → use-debounced-autosave-DnYuRWI8.js} +1 -1
  190. package/dist/client/assets/{use-debounced-value-CxU40MZW.js → use-debounced-value-LiVhfciY.js} +1 -1
  191. package/dist/client/assets/use-deco-credits-DTpKn8hS.js +1 -0
  192. package/dist/client/assets/{use-decopilot-events-DYfuIh9O.js → use-decopilot-events-42PTdhf1.js} +1 -1
  193. package/dist/client/assets/use-delete-connection-CKLjJrR4.js +1 -0
  194. package/dist/client/assets/{use-deployment-admin-DB-5VSbV.js → use-deployment-admin-Cfv-0c-V.js} +1 -1
  195. package/dist/client/assets/use-file-configs-DRXMLwD-.js +1 -0
  196. package/dist/client/assets/use-infinite-scroll-BkP7H-cz.js +1 -0
  197. package/dist/client/assets/use-join-requests-l1azjTjY.js +1 -0
  198. package/dist/client/assets/{use-mcp-client-CClO-4jR.js → use-mcp-client-8-W_7yBa.js} +4 -4
  199. package/dist/client/assets/{use-mcp-tools-CP1pJ9FP.js → use-mcp-tools-CUOQhfsg.js} +1 -1
  200. package/dist/client/assets/use-members-CynVAzPM.js +1 -0
  201. package/dist/client/assets/{use-mobile-DE9td55c.js → use-mobile-CcO0QCgb.js} +1 -1
  202. package/dist/client/assets/use-navigate-to-agent-DNjmGLp3.js +1 -0
  203. package/dist/client/assets/use-org-auth-client-mw0sCxV3.js +1 -0
  204. package/dist/client/assets/{use-org-sso-DwW4iwJx.js → use-org-sso-BjHGhVgE.js} +1 -1
  205. package/dist/client/assets/use-organization-roles-Cjha62oV.js +1 -0
  206. package/dist/client/assets/use-organization-settings-B3aKfsZI.js +1 -0
  207. package/dist/client/assets/use-registry-connections-CVi0ypH7.js +1 -0
  208. package/dist/client/assets/use-secrets-C5knhQtS.js +1 -0
  209. package/dist/client/assets/use-status-sounds-C434uotZ.js +1 -0
  210. package/dist/client/assets/{use-view-mode-ChjXBCTX.js → use-view-mode-BeALUlwT.js} +1 -1
  211. package/dist/client/assets/use-virtual-mcp-BjiOjpKa.js +1 -0
  212. package/dist/client/assets/useInfiniteQuery-C5v-SAtB.js +1 -0
  213. package/dist/client/assets/{useRouterState-DfWZ0rC9.js → useRouterState-BRB-iA8I.js} +1 -1
  214. package/dist/client/assets/useSuspenseInfiniteQuery-BeixZw8P.js +1 -0
  215. package/dist/client/assets/{users-Cs7EmdZt.js → users-D2x-LE8o.js} +1 -1
  216. package/dist/client/assets/{variant-calendar-Cq1dm2fI.js → variant-calendar-BcqsqX_c.js} +1 -1
  217. package/dist/client/assets/{view-mode-toggle-B7cgUSvO.js → view-mode-toggle-JDik54gp.js} +1 -1
  218. package/dist/client/index.html +2 -2
  219. package/dist/server/cli.js +1 -1
  220. package/dist/server/server.js +1 -1
  221. package/package.json +1 -1
  222. package/dist/client/assets/agent-icon-GwlSPXVL.js +0 -1
  223. package/dist/client/assets/agents-list-BZzO1NhS.js +0 -1
  224. package/dist/client/assets/ai-providers-Dz0ss86P.js +0 -1
  225. package/dist/client/assets/auth-entry-CoDOxbKh.js +0 -1
  226. package/dist/client/assets/automations-CLCryFUc.js +0 -1
  227. package/dist/client/assets/brand-context-CtJ6cICC.js +0 -1
  228. package/dist/client/assets/capability-load-error-B_5imwHQ.js +0 -1
  229. package/dist/client/assets/collection-detail-eV4RXYAt.js +0 -1
  230. package/dist/client/assets/commerce-onboarding-CJ6BJIWe.js +0 -1
  231. package/dist/client/assets/connection-card-BYuySvJ3.js +0 -1
  232. package/dist/client/assets/connection-detail-dLa-DHol.js +0 -1
  233. package/dist/client/assets/connections-DiDm4jib.js +0 -1
  234. package/dist/client/assets/dialog-WQh-gp8S.js +0 -1
  235. package/dist/client/assets/domain-settings-C-0-psaT.js +0 -1
  236. package/dist/client/assets/general-D8h8sXkB.js +0 -1
  237. package/dist/client/assets/github-repo-picker-qq2y6xuE.js +0 -1
  238. package/dist/client/assets/index-DhnTILyr.css +0 -1
  239. package/dist/client/assets/index-GcBIvq8C.js +0 -1
  240. package/dist/client/assets/index-IOAi6PyX.js +0 -1
  241. package/dist/client/assets/index-j_Vqvu4R.js +0 -1
  242. package/dist/client/assets/index-ssrb4176.js +0 -1
  243. package/dist/client/assets/invite-member-dialog-zkg9eKXe.js +0 -3
  244. package/dist/client/assets/members-e3cQllrC.js +0 -1
  245. package/dist/client/assets/page-seo-sheet-Bp8_sO0F.js +0 -1
  246. package/dist/client/assets/profile-xjJT_rVS.js +0 -1
  247. package/dist/client/assets/project-app-view-R0K36OXj.js +0 -1
  248. package/dist/client/assets/record-editor-RgHYd8Dk.js +0 -1
  249. package/dist/client/assets/registry-DgsZGUYK.js +0 -2
  250. package/dist/client/assets/roles-8cBznTZR.js +0 -1
  251. package/dist/client/assets/secrets-BuA8w6lw.js +0 -1
  252. package/dist/client/assets/settings-layout-jZC7h9Vb.js +0 -1
  253. package/dist/client/assets/shell-layout-BH9Ivq57.js +0 -1
  254. package/dist/client/assets/sidebar-DqxxQz6a.js +0 -1
  255. package/dist/client/assets/sso-SPkRvlC8.js +0 -1
  256. package/dist/client/assets/store-04ZLKBxB.js +0 -1
  257. package/dist/client/assets/store-registry-BgHUDj4S.js +0 -2
  258. package/dist/client/assets/studio-tools-BgAyimPw.js +0 -1
  259. package/dist/client/assets/tools-list-DvZ-3uOc.js +0 -1
  260. package/dist/client/assets/use-ai-providers-ZfoEvmNY.js +0 -1
  261. package/dist/client/assets/use-automations-DmtHpUAX.js +0 -1
  262. package/dist/client/assets/use-capability-BigpWO7w.js +0 -1
  263. package/dist/client/assets/use-connection-0YGfXXXM.js +0 -1
  264. package/dist/client/assets/use-deco-credits-BrZmeIWZ.js +0 -1
  265. package/dist/client/assets/use-delete-connection-BgWgmyGA.js +0 -1
  266. package/dist/client/assets/use-file-configs-xRl8wR9j.js +0 -1
  267. package/dist/client/assets/use-infinite-scroll-C9_S_5KL.js +0 -1
  268. package/dist/client/assets/use-join-requests-BrIr_7zB.js +0 -1
  269. package/dist/client/assets/use-members-BRkIKC2W.js +0 -1
  270. package/dist/client/assets/use-navigate-to-agent-jx-u6VG0.js +0 -1
  271. package/dist/client/assets/use-org-auth-client-BAZD-XfS.js +0 -1
  272. package/dist/client/assets/use-organization-roles-Bnjh1LPW.js +0 -1
  273. package/dist/client/assets/use-organization-settings-DZsps1AQ.js +0 -1
  274. package/dist/client/assets/use-registry-connections-BLLAhhOv.js +0 -1
  275. package/dist/client/assets/use-secrets-D4wr9PP7.js +0 -1
  276. package/dist/client/assets/use-status-sounds-DtENtyxj.js +0 -1
  277. package/dist/client/assets/use-virtual-mcp-0UTR3JZf.js +0 -1
  278. package/dist/client/assets/useInfiniteQuery-C9hUpVEm.js +0 -1
  279. package/dist/client/assets/useSuspenseInfiniteQuery-ZWfPnVGO.js +0 -1
@@ -1 +0,0 @@
1
- import{c as I,j as s,a2 as Ze,r as L,l as E,R as me,H as Os,I as Ms,J as Ps,M as Ds,d as Fs,B as ht,a as ae,a3 as Es,b as xe,W as Rs,t as re,X as Ls,i as Qt,a4 as ne,e as jt,u as vt,L as Bs,a5 as Hs,a6 as Gs,a7 as Us,a8 as Ws,K as qs,m as Ks,a9 as Xs,U as Jt,O as Vs,aa as Ys}from"./index-Cvg8wlf2.js";import{u as pe,S as yt,a as St,b as se,c as Q,d as U,e as Zt,f as Qs,g as es,h as Js,i as Re,j as Zs,k as en,l as tn}from"./sidebar-DqxxQz6a.js";import{u as Nt}from"./use-mobile-DE9td55c.js";import{S as oe}from"./skeleton-CgTyvIfS.js";import{i as ts}from"./LayoutLeft-CurO7lkf.js";import{t as _t}from"./ChevronDown-CBLc4m6w.js";import{a as ue,b as fe,T as he,c as xt}from"./tooltip-CiXxbAOc.js";import{a as Ye,i as sn,b as nn,S as ln}from"./constants-CaIX_f5U.js";import{u as ss,a as Ct}from"./use-virtual-mcp-0UTR3JZf.js";import{A as je,b as It,c as zt,d as rn,e as on,f as ns,g as $t,i as an,s as cn,h as dn}from"./agent-icon-GwlSPXVL.js";import{P as Ee,a as et,b as tt}from"./popover-BWgdS4nk.js";import{i as is}from"./Check-BJiMMf7v.js";import{s as Le}from"./Plus-CdBUTSrl.js";import{i as ls}from"./SearchMd-CPb906Aj.js";import{s as mn}from"./XClose-BAeGDKN0.js";import{A as un,a as fn,b as hn,c as xn,d as pn,e as gn,f as bn}from"./alert-dialog-DBB5CaN8.js";import{F as jn,a as vn,b as yn,c as Sn,d as Nn,f as _n,e as Cn}from"./form-ChRNwWXa.js";import{I as wn}from"./input-DxEfOo7U.js";import{S as kn,u as An,C as In}from"./chat-context-1Zkmke_h.js";import{T as ve}from"./toolbar-icon-button-CyxV7J7K.js";import{D as rs,a as os,b as as}from"./drawer-C1W7KPBD.js";import{G as zn,a as $n}from"./github-repo-picker-qq2y6xuE.js";import{u as cs,a as wt,b as Tn,T as On}from"./hooks-k9Lihge2.js";import{r as Mn,u as kt,f as Pn}from"./shell-layout-BH9Ivq57.js";import{u as Dn,g as Fn,a as En,b as Rn,S as ds}from"./use-navigate-to-agent-jx-u6VG0.js";import{g as Ln,a as ms,u as Bn,A as Hn,b as Gn}from"./use-deco-credits-BrZmeIWZ.js";import{f as Un}from"./reusable-new-chat-CouMjkYR.js";import{A as Qe}from"./avatar-BYTTt2km.js";import{a as Tt}from"./Copy01-D5lFZSIr.js";import{n as Wn,i as qn}from"./Globe01-SD7o4WjA.js";import{i as Kn}from"./ZoomOut-CC64T3-s.js";import{i as Ot,a as Xn}from"./ZapSquare-a7mV4MQr.js";import{i as pt}from"./Monitor01-DpZudhGT.js";import{n as Vn,a as Yn}from"./Sun-BvLzEM7C.js";import{a as st}from"./Settings02-BaPvDdXK.js";import{i as Qn}from"./Shield01-CA1C0PT_.js";import{a as Jn}from"./Users03-D5qmvjdI.js";import{u as Zn}from"./use-deployment-admin-DB-5VSbV.js";import"./index-DARNlAjK.js";import{I as us}from"./invite-member-dialog-zkg9eKXe.js";import{v as ei,C as Mt}from"./connect-desktop-dialog-hKwz2gHB.js";import{u as nt}from"./use-organization-settings-DZsps1AQ.js";import{i as ti}from"./FilterLines-CRMm2AqP.js";import{T as si,a as ni}from"./toggle-group-BhyMCiuu.js";import{u as ii}from"./use-mcp-client-CClO-4jR.js";import{D as li,a as ri,f as oi,d as ai,e as ci}from"./dialog-WQh-gp8S.js";import{C as di,a as mi,b as ui,c as fi,d as hi}from"./command-C07_gdqU.js";import{u as fs}from"./studio-tools-BgAyimPw.js";import{i as hs}from"./Zap-DVunWyGl.js";import{S as xs,M as xi}from"./shell-controls-Borp0IEW.js";import{n as pi}from"./Stars02-DMp85N4F.js";import{g as gi,u as bi,S as ji}from"./use-clock-tick-DOabyHE5.js";import{a as vi}from"./format-time-BnbuEtat.js";import{i as yi}from"./ChevronRight-BjHi2zTb.js";import{T as te}from"./toolbar-DUZ2w4vN.js";import"./X-B6q2eNkF.js";import"./use-collections-7MdzRrDf.js";import"./AlertCircle-C__5mMuz.js";import"./Tool01-BRwOHymx.js";import"./ArrowUp-D9-IQ-Jm.js";import"./Tool02-DpdINpQD.js";import"./XCircle-Vpo_BauK.js";import"./ArrowUpRight-zrEVpN9d.js";import"./TrendUp01-D_1HcFdI.js";import"./Loading02-BqCrbGU_.js";import"./CheckCircle-DRbpAaoA.js";import"./ChevronUp-DmNuFMik.js";import"./Circle--mEsLc32.js";import"./DotsVertical-C9eUzaCG.js";import"./Eye-CSrt2uwE.js";import"./Star01-B19iYHho.js";import"./Globe04-Biz86Os4.js";import"./SwitchHorizontal01-_8RyBCsb.js";import"./HardDrive-CbxCnB3J.js";import"./Key01-DJNC5dou.js";import"./LinkExternal01-B3st3yUn.js";import"./List-C-Y7abIw.js";import"./Package-DWNnL7Bo.js";import"./Palette-Cyg4gkHm.js";import"./Play-BsdkOEt3.js";import"./SearchLg-_kiE3lNL.js";import"./Stars01-RBw3Iorj.js";import"./Trash01-BaM_ljKo.js";import"./Upload01-H_9RE18o.js";import"./User01-CwCos6Py.js";import"./Users01-CqkgkQyP.js";import"./label-pwPiXf8V.js";import"./autosend-CVG-zQs7.js";import"./use-ai-providers-ZfoEvmNY.js";import"./use-decopilot-events-DYfuIh9O.js";import"./decopilot-sse-pool-CBL8Jn9p.js";import"./backoff-CrEUbyZT.js";import"./tab-id-bb-jjgGv.js";import"./collection-search-DOi2t6LQ.js";import"./use-debounced-value-CxU40MZW.js";import"./use-connection-0YGfXXXM.js";import"./authenticate-and-persist-oauth-D1WuDeU5.js";import"./mcp-oauth-DSz8vxQO.js";import"./auth-9zI7uyI_.js";import"./use-mcp-tools-CP1pJ9FP.js";import"./extract-connection-data-CeaTTHDG.js";import"./github-installations-D2vHSx02.js";import"./delay-CnY5UFtP.js";import"./required-auth-layout-BbJDdJdw.js";import"./use-org-sso-DwW4iwJx.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BYuySvJ3.js";import"./use-registry-connections-BLLAhhOv.js";import"./useInfiniteQuery-C9hUpVEm.js";import"./use-infinite-scroll-C9_S_5KL.js";import"./card-BKGavoj3.js";import"./integration-icon-CSm7Qy8c.js";import"./collection-tabs-Dmvezwf-.js";import"./badge-CUmMlsBT.js";import"./select-CIDMHDRe.js";import"./textarea-CZTZGoFe.js";import"./connection-form-helpers-CGNedBLj.js";import"./useSuspenseInfiniteQuery-ZWfPnVGO.js";import"./use-org-auth-client-BAZD-XfS.js";import"./use-organization-roles-Bnjh1LPW.js";import"./index-ssrb4176.js";import"./differenceInSeconds-NQ4PDo0z.js";function Si(t){const e=I.c(5),{onPointerDown:n,onDoubleClick:l}=t,{state:i,isMobile:r}=pe();if(r||i==="collapsed")return null;let o,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={left:"var(--sidebar-width)"},a=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[0]=o,e[1]=a):(o=e[0],a=e[1]);let m;return e[2]!==l||e[3]!==n?(m=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:o,children:a}),e[2]=l,e[3]=n,e[4]=m):m=e[4],m}const At=240,Ni=400,_i="sidebar.width";function Be(t){return Math.max(At,Math.min(Ni,t))}function Ci(){const t=I.c(11),[e,n]=Ze(_i,wi),l=L.useRef(null);let i;t[0]!==n||t[1]!==e?(i=d=>{d.preventDefault();const u=d.clientX,h=Be(e),f=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=f?Array.from(f.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of x)b.style.transition="none";const g=b=>{const j=Be(h+(b.clientX-u));f?.style.setProperty("--sidebar-width",`${j}px`)},p=b=>{const j=Be(h+(b.clientX-u));n(j);for(const y of x)y.style.transition="";window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",p),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",g),window.addEventListener("pointerup",p)},t[0]=n,t[1]=e,t[2]=i):i=t[2];const r=i;let o;t[3]!==n?(o=()=>{n(At)},t[3]=n,t[4]=o):o=t[4];const a=o;let m;t[5]!==e?(m=Be(e),t[5]=e,t[6]=m):m=t[6];let c;return t[7]!==r||t[8]!==a||t[9]!==m?(c={width:m,wrapperRef:l,onStartResize:r,resetWidth:a},t[7]=r,t[8]=a,t[9]=m,t[10]=c):c=t[10],c}function wi(t){return typeof t=="number"?Be(t):At}function ps(){return[]}function gs(t){const e=I.c(3),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=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]=l):l=e[0];let i;return e[1]!==n?(i=s.jsxs(yt,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(St,{children:s.jsx(se,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=i):i=e[2],i}function bs(t){const e=I.c(18),{item:n}=t,{isMobile:l,setOpenMobile:i}=pe();let r;e[0]!==l||e[1]!==n||e[2]!==i?(r=()=>{me("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&i(!1)},e[0]=l,e[1]=n,e[2]=i,e[3]=r):r=e[3];const o=r,a=n.key,m=n.isActive&&"z-10";let c;e[4]!==m?(c=E(m),e[4]=m,e[5]=c):c=e[5];let d;e[6]!==n.label?(d=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=d):d=e[7];let u;e[8]!==o||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==d?(u=s.jsxs(Q,{onClick:o,isActive:n.isActive,tooltip:n.label,children:[n.icon,d]}),e[8]=o,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=d,e[13]=u):u=e[13];let h;return e[14]!==n.key||e[15]!==c||e[16]!==u?(h=s.jsx(U,{className:c,children:u},a),e[14]=n.key,e[15]=c,e[16]=u,e[17]=h):h=e[17],h}function ki(t){const e=I.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Zt,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=n.group.label,i=n.group.defaultExpanded;let r;e[2]!==n.group.items?(r=n.group.items.map(Ii),e[2]=n.group.items,e[3]=r):r=e[3];let o;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==r?(o=s.jsx(gs,{label:l,defaultExpanded:i,children:r}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=r,e[7]=o):o=e[7],o}case"items":{let l;e[8]!==n.items?(l=n.items.map(Ai),e[8]=n.items,e[9]=l):l=e[9];let i;return e[10]!==l?(i=s.jsx(yt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(St,{children:s.jsx(se,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=i):i=e[11],i}case"custom":return n.content}}function Ai(t){return s.jsx(bs,{item:t},t.key)}function Ii(t){return s.jsx(bs,{item:t},t.key)}function zi(t){const e=I.c(17),{sections:n,footer:l,additionalContent:i,header:r,variant:o,contentClassName:a}=t,m=o===void 0?"sidebar":o;let c;e[0]!==r?(c=r&&s.jsx(Qs,{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 d;e[2]!==a?(d=E("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=d):d=e[3];let u;e[4]!==n?(u=n.map($i),e[4]=n,e[5]=u):u=e[5];let h;e[6]!==i?(h=i&&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:i}),e[6]=i,e[7]=h):h=e[7];let f;e[8]!==d||e[9]!==u||e[10]!==h?(f=s.jsxs(es,{className:d,children:[u,h]}),e[8]=d,e[9]=u,e[10]=h,e[11]=f):f=e[11];let x;return e[12]!==l||e[13]!==c||e[14]!==f||e[15]!==m?(x=s.jsxs(Js,{variant:m,children:[c,f,l]}),e[12]=l,e[13]=c,e[14]=f,e[15]=m,e[16]=x):x=e[16],x}function $i(t,e){return s.jsx(ki,{section:t},e)}function js(t){const e=I.c(2);let n;return e[0]!==t?(n=s.jsx(zi,{...t}),e[0]=t,e[1]=n):n=e[1],n}js.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(oe,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function vs(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ti=Os({name:Ms().min(2,"Organization name is required")});function Oi(t){const e=I.c(41),{open:n,onOpenChange:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={resolver:Ps(Ti),defaultValues:{name:""}},e[0]=i):i=e[0];const r=Ds(i);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={mutationFn:Pi,onSuccess:Mi},e[1]=o):o=e[1];const a=Fs(o),m=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(hn,{children:[s.jsx(xn,{children:"Create a new organization"}),s.jsx(pn,{children:"Set up a new organization to collaborate with others."})]}),e[2]=c):c=e[2];let d;if(e[3]!==a||e[4]!==r){let N;e[6]!==a?(N=S=>a.mutateAsync(S),e[6]=a,e[7]=N):N=e[7],d=r.handleSubmit(N),e[3]=a,e[4]=r,e[5]=d}else d=e[5];let u;e[8]!==r.formState.isSubmitting?(u=N=>{const{field:S}=N;return s.jsxs(yn,{children:[s.jsx(Sn,{children:"Organization Name"}),s.jsx(Nn,{children:s.jsx(wn,{...S,placeholder:"Acme Inc.",disabled:r.formState.isSubmitting})}),s.jsx(_n,{children:"The name of your company or organization"}),S.value&&s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",s.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",vs(S.value)]})]}),s.jsx(Cn,{})]})},e[8]=r.formState.isSubmitting,e[9]=u):u=e[9];let h;e[10]!==r.control||e[11]!==u?(h=s.jsx(jn,{control:r.control,name:"name",render:u}),e[10]=r.control,e[11]=u,e[12]=h):h=e[12];let f;e[13]!==m?(f=m&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:m}),e[13]=m,e[14]=f):f=e[14];let x;e[15]!==a||e[16]!==r?(x=()=>{a.reset(),r.reset()},e[15]=a,e[16]=r,e[17]=x):x=e[17];let g;e[18]!==r.formState.isSubmitting||e[19]!==x?(g=s.jsx(un,{disabled:r.formState.isSubmitting,onClick:x,children:"Cancel"}),e[18]=r.formState.isSubmitting,e[19]=x,e[20]=g):g=e[20];const p=!r.formState.isValid||r.formState.isSubmitting;let b;e[21]!==r.formState.isSubmitting?(b=r.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(kn,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=r.formState.isSubmitting,e[22]=b):b=e[22];let j;e[23]!==p||e[24]!==b?(j=s.jsx(ht,{type:"submit",variant:"default",disabled:p,children:b}),e[23]=p,e[24]=b,e[25]=j):j=e[25];let y;e[26]!==j||e[27]!==g?(y=s.jsxs(gn,{children:[g,j]}),e[26]=j,e[27]=g,e[28]=y):y=e[28];let v;e[29]!==y||e[30]!==d||e[31]!==h||e[32]!==f?(v=s.jsxs("form",{className:"space-y-6",onSubmit:d,autoComplete:"off",children:[h,f,y]}),e[29]=y,e[30]=d,e[31]=h,e[32]=f,e[33]=v):v=e[33];let _;e[34]!==r||e[35]!==v?(_=s.jsxs(fn,{children:[c,s.jsx(vn,{...r,children:v})]}),e[34]=r,e[35]=v,e[36]=_):_=e[36];let C;return e[37]!==l||e[38]!==n||e[39]!==_?(C=s.jsx(bn,{open:n,onOpenChange:l,children:_}),e[37]=l,e[38]=n,e[39]=_,e[40]=C):C=e[40],C}function Mi(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function Pi(t){const e=vs(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await ae.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const l=n?.data?.slug??e;if(!l)throw new Error("Failed to create organization");return{orgSlug:l}}function ys(){const t=L.useContext(Es),{data:e,refetch:n}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(i=>i.status==="pending"&&new Date(i.expiresAt)>new Date),refetch:()=>n?.()}}function Di(t){let e=0;for(let l=0;l<t.length;l++)e=t.charCodeAt(l)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function it(t){const e=I.c(13),{org:n,size:l}=t,i=l===void 0?"sm":l,r=i==="xs"?"size-5":"size-6",o=i==="xs"?"text-[9px]":"text-xs";let a;e[0]!==r?(a=E(r,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=r,e[1]=a):a=e[1];let m;e[2]!==n.logo||e[3]!==n.name?(m=n.logo?void 0:Di(n.name),e[2]=n.logo,e[3]=n.name,e[4]=m):m=e[4];let c;e[5]!==n.logo||e[6]!==n.name||e[7]!==o?(c=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:E("font-semibold leading-none",o),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=o,e[8]=c):c=e[8];let d;return e[9]!==a||e[10]!==m||e[11]!==c?(d=s.jsx("div",{className:a,style:m,children:c}),e[9]=a,e[10]=m,e[11]=c,e[12]=d):d=e[12],d}function Fi({invitation:t,onChanged:e}){const[n,l]=L.useState(!1),i=t.organizationName??"Unknown organization",r=async()=>{l(!0);try{const m=await ae.organization.acceptInvitation({invitationId:t.id});if(m.error){re.error(m.error.message),l(!1);return}}catch{re.error("Failed to accept invitation"),l(!1);return}re.success(`Joined ${i}`),Ls();let a;try{a=(await ae.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=a?`/${a}`:"/"},o=async()=>{l(!0);try{const a=await ae.organization.rejectInvitation({invitationId:t.id});if(a.error){re.error(a.error.message),l(!1);return}re.success("Invitation declined"),l(!1),e()}catch{re.error("Failed to decline invitation"),l(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[s.jsx(it,{org:{name:i},size:"sm"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"truncate text-sm font-medium",children:i}),s.jsx("p",{className:"truncate text-xs text-muted-foreground",children:"Invited to join"})]}),s.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[s.jsx(ht,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:n,children:"Accept"}),s.jsx(ht,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:o,disabled:n,"aria-label":`Decline invitation to ${i}`,children:s.jsx(mn,{size:14})})]})]})}function Ei(t){const e=I.c(29),{orgParam:n,onSelectOrg:l,onCreateOrg:i}=t,{data:r}=Rs(),{invitations:o,refetch:a}=ys();let m;e[0]!==n?(m=(w,z)=>w.slug===n?-1:z.slug===n?1:w.name.localeCompare(z.name),e[0]=n,e[1]=m):m=e[1];const c=[...r??[]].sort(m),[d,u]=L.useState(""),h=d.toLowerCase(),f=h?c.filter(w=>w.name.toLowerCase().includes(h)||w.slug.toLowerCase().includes(h)):c;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ls,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=x):x=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=w=>u(w.target.value),e[3]=g):g=e[3];let p;e[4]!==d?(p=w=>w.key==="Escape"&&d&&u(""),e[4]=d,e[5]=p):p=e[5];let b;e[6]!==d||e[7]!==p?(b=s.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:d,onChange:g,onKeyDown:p,placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[6]=d,e[7]=p,e[8]=b):b=e[8];let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Le,{size:16}),e[9]=j):j=e[9];let y;e[10]!==i?(y=s.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:j}),e[10]=i,e[11]=y):y=e[11];let v;e[12]!==b||e[13]!==y?(v=s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[x,b,y]}),e[12]=b,e[13]=y,e[14]=v):v=e[14];const _="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let C;e[15]!==o||e[16]!==d||e[17]!==a?(C=!d&&o.map(w=>s.jsx(Fi,{invitation:w,onChanged:a},w.id)),e[15]=o,e[16]=d,e[17]=a,e[18]=C):C=e[18];const N=f.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:d?`No organizations match "${d}"`:"No organizations available"});let S;e[19]!==l||e[20]!==n?(S=w=>s.jsxs("button",{type:"button",onClick:()=>l(w.slug),className:E("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",w.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(it,{org:w,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:w.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:w.slug})]}),w.slug===n&&s.jsx(is,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},w.id),e[19]=l,e[20]=n,e[21]=S):S=e[21];const A=f.map(S);let k;e[22]!==C||e[23]!==N||e[24]!==A?(k=s.jsxs("div",{className:_,children:[C,N,A]}),e[22]=C,e[23]=N,e[24]=A,e[25]=k):k=e[25];let $;return e[26]!==k||e[27]!==v?($=s.jsxs(s.Fragment,{children:[v,k]}),e[26]=k,e[27]=v,e[28]=$):$=e[28],$}function Ss(t){const e=I.c(22),{trigger:n,orgParam:l,align:i,side:r}=t,o=i===void 0?"start":i,a=r===void 0?"bottom":r,m=xe(),[c,d]=L.useState(!1),[u,h]=L.useState(!1);let f;e[0]!==n?(f=s.jsx(Ee,{asChild:!0,children:n}),e[0]=n,e[1]=f):f=e[1];const x=String(c);let g;e[2]!==m?(g=C=>{d(!1),m({to:"/$org",params:{org:C}})},e[2]=m,e[3]=g):g=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{d(!1),h(!0)},e[4]=p):p=e[4];let b;e[5]!==l||e[6]!==x||e[7]!==g?(b=s.jsx(Ei,{orgParam:l,onSelectOrg:g,onCreateOrg:p},x),e[5]=l,e[6]=x,e[7]=g,e[8]=b):b=e[8];let j;e[9]!==o||e[10]!==a||e[11]!==b?(j=s.jsx(et,{side:a,align:o,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:Li,onCloseAutoFocus:Ri,children:b}),e[9]=o,e[10]=a,e[11]=b,e[12]=j):j=e[12];let y;e[13]!==c||e[14]!==f||e[15]!==j?(y=s.jsxs(tt,{open:c,onOpenChange:d,children:[f,j]}),e[13]=c,e[14]=f,e[15]=j,e[16]=y):y=e[16];let v;e[17]!==u?(v=s.jsx(Oi,{open:u,onOpenChange:h}),e[17]=u,e[18]=v):v=e[18];let _;return e[19]!==v||e[20]!==y?(_=s.jsxs(s.Fragment,{children:[y,v]}),e[19]=v,e[20]=y,e[21]=_):_=e[21],_}function Ri(t){return t.preventDefault()}function Li(t){t.preventDefault(),t.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function Bi(t){const e=I.c(21),{value:n,onChange:l,placeholder:i,onKeyDown:r,className:o,isSearching:a,disabled:m}=t,c=i===void 0?"Search...":i;let d;e[0]!==o?(d=E("shrink-0 w-full border-b border-border h-12",o),e[0]=o,e[1]=d):d=e[1];const u=m?"cursor-not-allowed opacity-50":"cursor-text";let h;e[2]!==u?(h=E("flex items-center gap-2.5 h-12 px-4",u),e[2]=u,e[3]=h):h=e[3];let f;e[4]!==a?(f=a?s.jsx(Qt,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(ls,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=f):f=e[5];let x;e[6]!==l?(x=j=>l(j.target.value),e[6]=l,e[7]=x):x=e[7];let g;e[8]!==m||e[9]!==r||e[10]!==c||e[11]!==x||e[12]!==n?(g=s.jsx("input",{type:"text",value:n,onChange:x,onKeyDown:r,placeholder:c,disabled:m,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=m,e[9]=r,e[10]=c,e[11]=x,e[12]=n,e[13]=g):g=e[13];let p;e[14]!==h||e[15]!==f||e[16]!==g?(p=s.jsxs("label",{className:h,children:[f,g]}),e[14]=h,e[15]=f,e[16]=g,e[17]=p):p=e[17];let b;return e[18]!==d||e[19]!==p?(b=s.jsx("div",{className:d,children:p}),e[18]=d,e[19]=p,e[20]=b):b=e[20],b}const Hi="Select an existing agent";function Gi(t){const e=I.c(5),{children:n}=t;let l;e[0]!==n?(l=s.jsx(ue,{asChild:!0,children:n}),e[0]=n,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(fe,{side:"right",sideOffset:8,children:Hi}),e[2]=i):i=e[2];let r;return e[3]!==l?(r=s.jsxs(he,{defaultOpen:!0,delayDuration:0,children:[l,i]}),e[3]=l,e[4]=r):r=e[4],r}function Ui(t){const e=xe(),{create:n}=cs(),{locator:l}=ne(),i=jt({strict:!1}),r=vt({strict:!1});return async o=>{const a=crypto.randomUUID(),m=o===r.virtualmcpid?Mn(t,l,i.taskId??""):null;try{await n({id:a,virtual_mcp_id:o,...m?{branch:m}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:o}})}}function dt(t){const e=I.c(20),{agent:n,selected:l,onClick:i}=t,r=l?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let o;e[0]!==r?(o=E("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",r),e[0]=r,e[1]=o):o=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(je,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let m;e[5]!==n.title?(m=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=m):m=e[6];let c;e[7]!==n.description?(c=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[7]=n.description,e[8]=c):c=e[8];let d;e[9]!==m||e[10]!==c?(d=s.jsxs("div",{className:"flex-1 min-w-0",children:[m,c]}),e[9]=m,e[10]=c,e[11]=d):d=e[11];let u;e[12]!==l?(u=l&&s.jsx(is,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=l,e[13]=u):u=e[13];let h;return e[14]!==i||e[15]!==o||e[16]!==a||e[17]!==d||e[18]!==u?(h=s.jsxs("button",{type:"button",onClick:i,className:o,children:[a,d,u]}),e[14]=i,e[15]=o,e[16]=a,e[17]=d,e[18]=u,e[19]=h):h=e[19],h}function Pt(t){const e=I.c(5),{children:n,action:l}=t;let i;e[0]!==n?(i=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),e[0]=n,e[1]=i):i=e[1];let r;return e[2]!==l||e[3]!==i?(r=s.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[i,l]}),e[2]=l,e[3]=i,e[4]=r):r=e[4],r}function Wi(t){const e=I.c(27),{onClose:n,onSelectAgent:l,selectedAgentId:i,onImportFromGithub:r}=t,[o,a]=L.useState(""),m=ss(),c=m??[],{org:d}=ne(),{data:u}=ae.useSession(),h=u?.user?.id??"anon",f=Fn(m),x=En(),g=Ui(d.slug),p=Ln(m),b=o.toLowerCase(),j=c.filter(Vi).filter(B=>!p.has(B.id)).filter(Xi).filter(B=>!o||B.title.toLowerCase().includes(b)),y=j.filter(Ki),v=j.filter(qi),_=Ye(d.id),C=!o||_.title.toLowerCase().includes(b),N=!!(l&&C);let S;e[0]!==n||e[1]!==l?(S=()=>{l?.(null),n(),a("")},e[0]=n,e[1]=l,e[2]=S):S=e[2];const A=S,k=B=>{if(l){l(B.id),n(),a("");return}Rn({orgId:d.id,userId:h},B.id,f),x(),n(),a(""),g(B.id)},$="flex flex-col max-h-[min(640px,80dvh)]";let w;e[3]!==o?(w=s.jsx(Bi,{value:o,onChange:a,placeholder:"Search agents..."}),e[3]=o,e[4]=w):w=e[4];const z="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",O=l&&C&&_&&s.jsx(dt,{agent:_,selected:!i||i===_.id,onClick:A}),P=v.length>0&&s.jsx(Pt,{children:"Agents"}),R=v.map(B=>s.jsx(dt,{agent:B,selected:l?i===B.id:void 0,onClick:()=>k(B)},B.id)),D=(y.length>0||!o)&&s.jsx(Pt,{action:s.jsxs("button",{type:"button",onClick:r,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:[s.jsx($n,{className:"size-3.5"}),"Import"]}),children:"Code Agents"}),F=y.map(B=>s.jsx(dt,{agent:B,selected:l?i===B.id:void 0,onClick:()=>k(B)},B.id));let M;e[5]!==N||e[6]!==o||e[7]!==j.length?(M=j.length===0&&!N&&o&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:"No agents found"}),e[5]=N,e[6]=o,e[7]=j.length,e[8]=M):M=e[8];let W;e[9]!==M||e[10]!==O||e[11]!==P||e[12]!==R||e[13]!==D||e[14]!==F?(W=s.jsxs("div",{className:z,children:[O,P,R,D,F,M]}),e[9]=M,e[10]=O,e[11]=P,e[12]=R,e[13]=D,e[14]=F,e[15]=W):W=e[15];let K;e[16]!==d.slug?(K={org:d.slug},e[16]=d.slug,e[17]=K):K=e[17];let G;e[18]!==n?(G=()=>n(),e[18]=n,e[19]=G):G=e[19];let q;e[20]!==K||e[21]!==G?(q=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Bs,{to:"/$org/settings/agents",params:K,onClick:G,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[20]=K,e[21]=G,e[22]=q):q=e[22];let J;return e[23]!==W||e[24]!==q||e[25]!==w?(J=s.jsxs("div",{className:$,children:[w,W,q]}),e[23]=W,e[24]=q,e[25]=w,e[26]=J):J=e[26],J}function qi(t){return!ms(t.metadata)}function Ki(t){return ms(t.metadata)}function Xi(t){return!nn(t.id)}function Vi(t){return!sn(t.id)}function Yi(t){const e=I.c(31);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:l,trigger:i,onSelectAgent:r,selectedAgentId:o,side:a,align:m}=n,c=l===void 0?!1:l,d=a===void 0?"right":a,u=m===void 0?"start":m,[h,f]=L.useState(!1),[x,g]=L.useState(!1),p=Nt(),{setOpenMobile:b}=pe(),j=Dn(),y=j?"border border-border":void 0;let v;e[2]!==j?(v=P=>j?s.jsx(Gi,{children:P}):P,e[2]=j,e[3]=v):v=e[3];const _=v;let C;e[4]!==p||e[5]!==b?(C=()=>{f(!1),p&&b(!1)},e[4]=p,e[5]=b,e[6]=C):C=e[6];const N=C;let S;e[7]!==N?(S=()=>{N(),g(!0)},e[7]=N,e[8]=S):S=e[8];const A=S;let k;e[9]!==N||e[10]!==A||e[11]!==r||e[12]!==h||e[13]!==o?(k=h&&s.jsx(L.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(oe,{className:"h-4 w-24"})}),children:s.jsx(Wi,{onClose:N,onSelectAgent:r,selectedAgentId:o,onImportFromGithub:A})}),e[9]=N,e[10]=A,e[11]=r,e[12]=h,e[13]=o,e[14]=k):k=e[14];const $=k;let w;e[15]!==u||e[16]!==c||e[17]!==y||e[18]!==j||e[19]!==p||e[20]!==h||e[21]!==$||e[22]!==d||e[23]!==i||e[24]!==_?(w=p?s.jsxs(s.Fragment,{children:[i?s.jsx("button",{type:"button",onClick:()=>f(!0),className:"contents",children:i}):c?_(s.jsx(ve,{"aria-label":"Browse agents",className:E(y),onClick:()=>{me("agent_browser_opened",{surface:"mobile_drawer"}),f(!0)},children:s.jsx(Le,{className:"size-4"})})):s.jsx(U,{children:_(s.jsxs(Q,{tooltip:j?void 0:"Browse agents",className:E(y),onClick:()=>{me("agent_browser_opened",{surface:"mobile_drawer"}),f(!0)},children:[s.jsx(Le,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(rs,{open:h,onOpenChange:f,direction:"bottom",children:s.jsxs(os,{className:"max-h-[85dvh] p-0",children:[s.jsx(as,{className:"sr-only",children:"Browse agents"}),$]})})]}):s.jsxs(tt,{open:h,onOpenChange:P=>{P&&!h&&me("agent_browser_opened",{surface:"desktop_popover"}),f(P)},children:[i?s.jsx(Ee,{asChild:!0,children:i}):c?_(s.jsx(Ee,{asChild:!0,children:s.jsx(ve,{"aria-label":"Browse agents",className:E(y),children:s.jsx(Le,{className:"size-4"})})})):s.jsx(U,{children:_(s.jsx(Ee,{asChild:!0,children:s.jsxs(Q,{tooltip:j?void 0:"Browse agents",className:E(y),children:[s.jsx(Le,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(et,{className:"w-[380px] p-0 overflow-hidden",side:d,align:u,children:$})]}),e[15]=u,e[16]=c,e[17]=y,e[18]=j,e[19]=p,e[20]=h,e[21]=$,e[22]=d,e[23]=i,e[24]=_,e[25]=w):w=e[25];let z;e[26]!==x?(z=s.jsx(zn,{open:x,onOpenChange:g,mode:"agent"}),e[26]=x,e[27]=z):z=e[27];let O;return e[28]!==z||e[29]!==w?(O=s.jsxs(s.Fragment,{children:[w,z]}),e[28]=z,e[29]=w,e[30]=O):O=e[30],O}const Qi="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 Ji(t){const e=I.c(19),{agentId:n,fallback:l,onOpenHome:i,onPick:r}=t,o=Ct(n)??l??null,a=o?.title??"Super Agent",m=`Open ${a} home`,c=o?.icon??null;let d;e[0]!==c||e[1]!==a?(d=s.jsx(je,{icon:c,name:a,size:"xs"}),e[0]=c,e[1]=a,e[2]=d):d=e[2];let u;e[3]!==i||e[4]!==m||e[5]!==d?(u=s.jsx("button",{type:"button",onClick:i,"aria-label":m,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:d}),e[3]=i,e[4]=m,e[5]=d,e[6]=u):u=e[6];let h;e[7]!==a?(h=s.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:a}),e[7]=a,e[8]=h):h=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(_t,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[9]=f):f=e[9];let x;e[10]!==h?(x=s.jsxs("button",{type:"button",className:Qi,children:[h,f]}),e[10]=h,e[11]=x):x=e[11];let g;e[12]!==n||e[13]!==r||e[14]!==x?(g=s.jsx(Yi,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:r,trigger:x}),e[12]=n,e[13]=r,e[14]=x,e[15]=g):g=e[15];let p;return e[16]!==u||e[17]!==g?(p=s.jsxs("div",{className:"flex min-w-0 items-center gap-0",children:[u,g]}),e[16]=u,e[17]=g,e[18]=p):p=e[18],p}function gt(t){const e=I.c(26);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{showName:l}=n,{org:i}=ne(),{state:r,isMobile:o}=pe(),a=ys().invitations.length>0,m=r==="collapsed"||o,c=a?`${i.name} — switch organization (pending invitation)`:`${i.name} — switch organization`;let d;e[2]!==i?(d=s.jsx(it,{org:i,size:"sm"}),e[2]=i,e[3]=d):d=e[3];let u;e[4]!==a||e[5]!==m?(u=a&&s.jsx("span",{className:E("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[4]=a,e[5]=m,e[6]=u):u=e[6];let h;e[7]!==d||e[8]!==u?(h=s.jsxs("span",{className:"relative inline-flex",children:[d,u]}),e[7]=d,e[8]=u,e[9]=h):h=e[9];let f;e[10]!==i.name||e[11]!==l?(f=l&&s.jsx("span",{className:"truncate text-sm font-medium text-foreground max-w-[10rem]",children:i.name}),e[10]=i.name,e[11]=l,e[12]=f):f=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(_t,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[13]=x):x=e[13];let g;e[14]!==c||e[15]!==h||e[16]!==f?(g=s.jsx(ue,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":c,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:[h,f,x]})}),e[14]=c,e[15]=h,e[16]=f,e[17]=g):g=e[17];let p;e[18]!==i.slug||e[19]!==g?(p=s.jsx(Ss,{orgParam:i.slug,trigger:g}),e[18]=i.slug,e[19]=g,e[20]=p):p=e[20];let b;e[21]!==i.name?(b=s.jsx(fe,{side:"bottom",children:i.name}),e[21]=i.name,e[22]=b):b=e[22];let j;return e[23]!==b||e[24]!==p?(j=s.jsxs(he,{children:[p,b]}),e[23]=b,e[24]=p,e[25]=j):j=e[25],j}function lt(t){const e=I.c(24);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:l}=n,{org:i}=ne(),r=xe();let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[2]=o):o=e[2];const a=jt(o);let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m={strict:!1},e[3]=m):m=e[3];const c=vt(m),{threads:d}=wt(),{data:u}=ae.useSession(),{setTaskId:h,createNewTask:f}=kt();let x;e[4]!==i.id?(x=Ye(i.id),e[4]=i.id,e[5]=x):x=e[5];const g=x,p=g.id,b=a.taskId?c.virtualmcpid??p:p;let j;e[6]!==f||e[7]!==p||e[8]!==r||e[9]!==l||e[10]!==i.slug||e[11]!==u?.user?.id||e[12]!==h||e[13]!==d?(j=S=>{if(!S||S===p){r({to:"/$org",params:{org:i.slug}}),l?.();return}const A=Un(d,S,u?.user?.id);A?h(A.id,S):f(S),l?.()},e[6]=f,e[7]=p,e[8]=r,e[9]=l,e[10]=i.slug,e[11]=u?.user?.id,e[12]=h,e[13]=d,e[14]=j):j=e[14];const y=j;let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[15]=v):v=e[15];const _=b===p?g:void 0;let C;e[16]!==b||e[17]!==y?(C=()=>y(b),e[16]=b,e[17]=y,e[18]=C):C=e[18];let N;return e[19]!==b||e[20]!==y||e[21]!==_||e[22]!==C?(N=s.jsx(L.Suspense,{fallback:v,children:s.jsx(Ji,{agentId:b,fallback:_,onOpenHome:C,onPick:y})}),e[19]=b,e[20]=y,e[21]=_,e[22]=C,e[23]=N):N=e[23],N}function Dt(t){const e=I.c(18),{item:n,onClose:l}=t,i=n.isActive&&"z-10";let r;e[0]!==i?(r=E(i),e[0]=i,e[1]=r):r=e[1];let o;e[2]!==n||e[3]!==l?(o=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=o):o=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let m;e[7]!==n.label?(m=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=m):m=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==o||e[12]!==a||e[13]!==m?(c=s.jsxs(Q,{onClick:o,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,m]}),e[9]=n.isActive,e[10]=n.label,e[11]=o,e[12]=a,e[13]=m,e[14]=c):c=e[14];let d;return e[15]!==r||e[16]!==c?(d=s.jsx(U,{className:r,children:c}),e[15]=r,e[16]=c,e[17]=d):d=e[17],d}function Zi(t){const e=I.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Zt,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=n.group.label,r=n.group.defaultExpanded;let o;if(e[2]!==l||e[3]!==n.group.items){let m;e[5]!==l?(m=c=>s.jsx(Dt,{item:c,onClose:l},c.key),e[5]=l,e[6]=m):m=e[6],o=n.group.items.map(m),e[2]=l,e[3]=n.group.items,e[4]=o}else o=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==o?(a=s.jsx(gs,{label:i,defaultExpanded:r,children:o}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=o,e[10]=a):a=e[10],a}case"items":{let i;if(e[11]!==l||e[12]!==n.items){let o;e[14]!==l?(o=a=>s.jsx(Dt,{item:a,onClose:l},a.key),e[14]=l,e[15]=o):o=e[15],i=n.items.map(o),e[11]=l,e[12]=n.items,e[13]=i}else i=e[13];let r;return e[16]!==i?(r=s.jsx(yt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(St,{children:s.jsx(se,{className:"gap-1.5",children:i})})}),e[16]=i,e[17]=r):r=e[17],r}case"custom":return n.content}}function el(t){const e=I.c(24),{sections:n,onClose:l,footer:i,additionalContent:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(gt,{}),e[0]=o):o=e[0];let a;e[1]!==l?(a=s.jsx(lt,{onNavigate:l}),e[1]=l,e[2]=a):a=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"flex-1"}),e[3]=m):m=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ts,{size:16}),e[4]=c):c=e[4];let d;e[5]!==l?(d=s.jsx(ve,{onClick:l,"aria-label":"Close sidebar",children:c}),e[5]=l,e[6]=d):d=e[6];let u;e[7]!==a||e[8]!==d?(u=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[o,a,m,d]}),e[7]=a,e[8]=d,e[9]=u):u=e[9];let h;if(e[10]!==l||e[11]!==n){let p;e[13]!==l?(p=(b,j)=>s.jsx(Zi,{section:b,onClose:l},j),e[13]=l,e[14]=p):p=e[14],h=n.map(p),e[10]=l,e[11]=n,e[12]=h}else h=e[12];let f;e[15]!==r?(f=r&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:r}),e[15]=r,e[16]=f):f=e[16];let x;e[17]!==h||e[18]!==f?(x=s.jsxs(es,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[h,f]}),e[17]=h,e[18]=f,e[19]=x):x=e[19];let g;return e[20]!==i||e[21]!==u||e[22]!==x?(g=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[u,x,i]}),e[20]=i,e[21]=u,e[22]=x,e[23]=g):g=e[23],g}function Fe(t){const e=I.c(26),{item:n,onClose:l}=t;let i;e[0]!==n.className?(i=E("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",n.className),e[0]=n.className,e[1]=i):i=e[1];const r=i;if(n.href){const d=n.external?"_blank":void 0,u=n.external?"noopener noreferrer":void 0;let h;e[2]!==n.icon?(h=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[2]=n.icon,e[3]=h):h=e[3];let f;e[4]!==n.label?(f=s.jsx("span",{className:"flex-1",children:n.label}),e[4]=n.label,e[5]=f):f=e[5];let x;return e[6]!==r||e[7]!==n.href||e[8]!==l||e[9]!==d||e[10]!==u||e[11]!==h||e[12]!==f?(x=s.jsxs("a",{href:n.href,target:d,rel:u,className:r,onClick:l,children:[h,f]}),e[6]=r,e[7]=n.href,e[8]=l,e[9]=d,e[10]=u,e[11]=h,e[12]=f,e[13]=x):x=e[13],x}let o;e[14]!==n||e[15]!==l?(o=()=>{n.onClick?.(),l()},e[14]=n,e[15]=l,e[16]=o):o=e[16];let a;e[17]!==n.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[17]=n.icon,e[18]=a):a=e[18];let m;e[19]!==n.label?(m=s.jsx("span",{className:"flex-1",children:n.label}),e[19]=n.label,e[20]=m):m=e[20];let c;return e[21]!==r||e[22]!==o||e[23]!==a||e[24]!==m?(c=s.jsxs("button",{type:"button",onClick:o,className:r,children:[a,m]}),e[21]=r,e[22]=o,e[23]=a,e[24]=m,e[25]=c):c=e[25],c}function Ft(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-amber-100 dark:bg-amber-500/20 px-2 py-0.5 text-[10px] font-medium text-amber-700 dark:text-amber-400",children:"Impersonating"}),t[0]=e):e=t[0],e}function Et(t){const e=I.c(144),{user:n,userImage:l,menuItems:i,signOutItem:r,stopImpersonatingItem:o,isImpersonating:a,themeOptions:m,preferences:c,setPreferences:d,close:u,isMobile:h}=t;if(h){const V=n?.name??"U";let Z;e[0]!==V||e[1]!==l?(Z=s.jsx(Qe,{url:l,fallback:V,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=V,e[1]=l,e[2]=Z):Z=e[2];const ge=n?.name??"User";let ee;e[3]!==ge?(ee=s.jsx("p",{className:"text-sm font-medium truncate",children:ge}),e[3]=ge,e[4]=ee):ee=e[4];let le;e[5]!==a?(le=a&&s.jsx(Ft,{}),e[5]=a,e[6]=le):le=e[6];let ie;e[7]!==ee||e[8]!==le?(ie=s.jsxs("div",{className:"flex items-center gap-2",children:[ee,le]}),e[7]=ee,e[8]=le,e[9]=ie):ie=e[9];const T=n?.email;let H;e[10]!==T?(H=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:T}),e[10]=T,e[11]=H):H=e[11];let Y;e[12]!==ie||e[13]!==H?(Y=s.jsxs("div",{className:"flex-1 min-w-0",children:[ie,H]}),e[12]=ie,e[13]=H,e[14]=Y):Y=e[14];let X;e[15]!==n?(X=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(il)},e[15]=n,e[16]=X):X=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Tt,{size:14}),e[17]=be):be=e[17];let Se;e[18]!==X?(Se=s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:X,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:be})}),e[18]=X,e[19]=Se):Se=e[19];let Ue;e[20]===Symbol.for("react.memo_cache_sentinel")?(Ue=s.jsx(fe,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[20]=Ue):Ue=e[20];let Ne;e[21]!==Se?(Ne=s.jsx(xt,{delayDuration:300,children:s.jsxs(he,{children:[Se,Ue]})}),e[21]=Se,e[22]=Ne):Ne=e[22];let _e;e[23]!==Ne||e[24]!==Z||e[25]!==Y?(_e=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[Z,Y,Ne]}),e[23]=Ne,e[24]=Z,e[25]=Y,e[26]=_e):_e=e[26];let Ce;if(e[27]!==u||e[28]!==i){let de;e[30]!==u?(de=Ke=>s.jsx(Fe,{item:Ke,onClose:u},Ke.key),e[30]=u,e[31]=de):de=e[31],Ce=i.map(de),e[27]=u,e[28]=i,e[29]=Ce}else Ce=e[29];let we;e[32]!==u||e[33]!==o?(we=o&&s.jsx(Fe,{item:o,onClose:u}),e[32]=u,e[33]=o,e[34]=we):we=e[34];let ke;e[35]!==u||e[36]!==r?(ke=s.jsx(Fe,{item:r,onClose:u}),e[35]=u,e[36]=r,e[37]=ke):ke=e[37];let Ae;e[38]!==Ce||e[39]!==we||e[40]!==ke?(Ae=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:[Ce,we,ke]})}),e[38]=Ce,e[39]=we,e[40]=ke,e[41]=Ae):Ae=e[41];let Ie;if(e[42]!==c.theme||e[43]!==d||e[44]!==m){let de;e[46]!==c.theme||e[47]!==d?(de=Ke=>{const{value:ct,icon:zs,label:$s}=Ke;return s.jsx("button",{type:"button","aria-label":$s,onClick:()=>d(Ts=>({...Ts,theme:ct})),className:E("size-8 rounded-md flex items-center justify-center transition-colors",c.theme===ct?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:zs},ct)},e[46]=c.theme,e[47]=d,e[48]=de):de=e[48],Ie=m.map(de),e[42]=c.theme,e[43]=d,e[44]=m,e[45]=Ie}else Ie=e[45];let ze;e[49]!==Ie?(ze=s.jsx("div",{className:"flex items-center gap-0.5",children:Ie}),e[49]=Ie,e[50]=ze):ze=e[50];const ot=c.enableSounds?"Disable sounds":"Enable sounds";let $e;e[51]!==d?($e=()=>d(nl),e[51]=d,e[52]=$e):$e=e[52];const at=c.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let Te;e[53]!==at?(Te=E("size-8 rounded-md flex items-center justify-center transition-colors",at),e[53]=at,e[54]=Te):Te=e[54];let Oe;e[55]!==c.enableSounds?(Oe=c.enableSounds?s.jsx(It,{size:14}):s.jsx(zt,{size:14}),e[55]=c.enableSounds,e[56]=Oe):Oe=e[56];let Me;e[57]!==ot||e[58]!==$e||e[59]!==Te||e[60]!==Oe?(Me=s.jsx("button",{type:"button","aria-label":ot,onClick:$e,className:Te,children:Oe}),e[57]=ot,e[58]=$e,e[59]=Te,e[60]=Oe,e[61]=Me):Me=e[61];let We;e[62]===Symbol.for("react.memo_cache_sentinel")?(We=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.61.1"]}),e[62]=We):We=e[62];let Pe;e[63]!==Me?(Pe=s.jsxs("div",{className:"flex items-center gap-2",children:[Me,We]}),e[63]=Me,e[64]=Pe):Pe=e[64];let De;e[65]!==ze||e[66]!==Pe?(De=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[ze,Pe]}),e[65]=ze,e[66]=Pe,e[67]=De):De=e[67];let qe;return e[68]!==_e||e[69]!==Ae||e[70]!==De?(qe=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[_e,Ae,De]}),e[68]=_e,e[69]=Ae,e[70]=De,e[71]=qe):qe=e[71],qe}const f=n?.name??"U";let x;e[72]!==f||e[73]!==l?(x=s.jsx(Qe,{url:l,fallback:f,shape:"circle",size:"sm",className:"shrink-0"}),e[72]=f,e[73]=l,e[74]=x):x=e[74];const g=n?.name??"User";let p;e[75]!==g?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:g}),e[75]=g,e[76]=p):p=e[76];let b;e[77]!==a?(b=a&&s.jsx(Ft,{}),e[77]=a,e[78]=b):b=e[78];let j;e[79]!==p||e[80]!==b?(j=s.jsxs("div",{className:"flex items-center gap-2",children:[p,b]}),e[79]=p,e[80]=b,e[81]=j):j=e[81];const y=n?.email;let v;e[82]!==y?(v=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y}),e[82]=y,e[83]=v):v=e[83];let _;e[84]!==j||e[85]!==v?(_=s.jsxs("div",{className:"flex-1 min-w-0",children:[j,v]}),e[84]=j,e[85]=v,e[86]=_):_=e[86];let C;e[87]!==n?(C=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(sl)},e[87]=n,e[88]=C):C=e[88];let N;e[89]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Tt,{size:14}),e[89]=N):N=e[89];let S;e[90]!==C?(S=s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:C,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:N})}),e[90]=C,e[91]=S):S=e[91];let A;e[92]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(fe,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[92]=A):A=e[92];let k;e[93]!==S?(k=s.jsx(xt,{delayDuration:300,children:s.jsxs(he,{children:[S,A]})}),e[93]=S,e[94]=k):k=e[94];let $;e[95]!==k||e[96]!==x||e[97]!==_?($=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[x,_,k]}),e[95]=k,e[96]=x,e[97]=_,e[98]=$):$=e[98];let w;if(e[99]!==u||e[100]!==i){let V;e[102]!==u?(V=Z=>s.jsx(Fe,{item:Z,onClose:u},Z.key),e[102]=u,e[103]=V):V=e[103],w=i.map(V),e[99]=u,e[100]=i,e[101]=w}else w=e[101];let z;e[104]!==u||e[105]!==o?(z=o&&s.jsx(Fe,{item:o,onClose:u}),e[104]=u,e[105]=o,e[106]=z):z=e[106];let O;e[107]!==u||e[108]!==r?(O=s.jsx(Fe,{item:r,onClose:u}),e[107]=u,e[108]=r,e[109]=O):O=e[109];let P;e[110]!==w||e[111]!==z||e[112]!==O?(P=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[w,z,O]}),e[110]=w,e[111]=z,e[112]=O,e[113]=P):P=e[113];let R;if(e[114]!==c.theme||e[115]!==d||e[116]!==m){let V;e[118]!==c.theme||e[119]!==d?(V=Z=>{const{value:ge,icon:ee,label:le}=Z;return s.jsx("button",{type:"button","aria-label":le,onClick:()=>d(ie=>({...ie,theme:ge})),className:E("size-7 rounded-md flex items-center justify-center transition-colors",c.theme===ge?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:ee},ge)},e[118]=c.theme,e[119]=d,e[120]=V):V=e[120],R=m.map(V),e[114]=c.theme,e[115]=d,e[116]=m,e[117]=R}else R=e[117];let D;e[121]!==R?(D=s.jsx("div",{className:"flex items-center gap-0.5",children:R}),e[121]=R,e[122]=D):D=e[122];const F=c.enableSounds?"Disable sounds":"Enable sounds";let M;e[123]!==d?(M=()=>d(tl),e[123]=d,e[124]=M):M=e[124];const W=c.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let K;e[125]!==W?(K=E("size-7 rounded-md flex items-center justify-center transition-colors",W),e[125]=W,e[126]=K):K=e[126];let G;e[127]!==c.enableSounds?(G=c.enableSounds?s.jsx(It,{size:14}):s.jsx(zt,{size:14}),e[127]=c.enableSounds,e[128]=G):G=e[128];let q;e[129]!==F||e[130]!==M||e[131]!==K||e[132]!==G?(q=s.jsx("button",{type:"button","aria-label":F,onClick:M,className:K,children:G}),e[129]=F,e[130]=M,e[131]=K,e[132]=G,e[133]=q):q=e[133];let J;e[134]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.61.1"]}),e[134]=J):J=e[134];let B;e[135]!==q?(B=s.jsxs("div",{className:"flex items-center gap-2",children:[q,J]}),e[135]=q,e[136]=B):B=e[136];let ce;e[137]!==D||e[138]!==B?(ce=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[D,B]}),e[137]=D,e[138]=B,e[139]=ce):ce=e[139];let ye;return e[140]!==$||e[141]!==P||e[142]!==ce?(ye=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[$,P,ce]})}),e[140]=$,e[141]=P,e[142]=ce,e[143]=ye):ye=e[143],ye}function tl(t){return{...t,enableSounds:!t.enableSounds}}function sl(){re.success("User ID copied")}function nl(t){return{...t,enableSounds:!t.enableSounds}}function il(){re.success("User ID copied")}function He(){const t=I.c(43),{data:e}=ae.useSession(),{org:n}=ne(),l=xe();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const o=Hs(i)?.params.org,[a,m]=Gs(),c=Nt(),{isAdmin:d}=Zn(),[u,h]=L.useState(!1),f=e?.user,x=f?.image,g=!!e?.session?.impersonatedBy;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=()=>h(!1),t[1]=p):p=t[1];const b=p;let j;t[2]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(st,{size:16}),t[2]=j):j=t[2];let y;t[3]!==l||t[4]!==o?(y={key:"preferences",label:"Preferences",icon:j,onClick:()=>{l({to:"/$org/settings/profile",params:{org:o??""}})}},t[3]=l,t[4]=o,t[5]=y):y=t[5];let v;t[6]!==n||t[7]!==l?(v=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(Wn,{size:16}),onClick:()=>{l({to:"/$org/install",params:{org:n.slug}})}}]:[],t[6]=n,t[7]=l,t[8]=v):v=t[8];let _;t[9]===Symbol.for("react.memo_cache_sentinel")?(_={key:"terms",label:"Terms of Use",icon:s.jsx(Kn,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[9]=_):_=t[9];let C;t[10]===Symbol.for("react.memo_cache_sentinel")?(C={key:"privacy",label:"Privacy Policy",icon:s.jsx(Qn,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[10]=C):C=t[10];let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N={key:"github",label:"decocms/studio",icon:s.jsx(Us,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[11]=N):N=t[11];let S;t[12]===Symbol.for("react.memo_cache_sentinel")?(S={key:"community",label:"Community",icon:s.jsx(Jn,{size:16}),href:"https://decocms.com/discord",external:!0},t[12]=S):S=t[12];let A;t[13]===Symbol.for("react.memo_cache_sentinel")?(A={key:"homepage",label:"Homepage",icon:s.jsx(qn,{size:16}),href:"https://decocms.com",external:!0},t[13]=A):A=t[13];let k;t[14]!==d||t[15]!==l?(k=d?[{key:"admin-dashboard",label:"Admin Dashboard",icon:s.jsx(rn,{size:16}),onClick:()=>l({to:"/_admin"}),className:"text-amber-700 dark:text-amber-400"}]:[],t[14]=d,t[15]=l,t[16]=k):k=t[16];let $;t[17]!==k||t[18]!==y||t[19]!==v?($=[y,...v,_,C,N,S,A,...k],t[17]=k,t[18]=y,t[19]=v,t[20]=$):$=t[20];const w=$;let z;t[21]===Symbol.for("react.memo_cache_sentinel")?(z={key:"logout",label:"Sign out",icon:s.jsx(Ot,{size:16}),onClick:ol},t[21]=z):z=t[21];const O=z;let P;t[22]!==g?(P=g?{key:"stop-impersonating",label:"Stop impersonation",icon:s.jsx(Ot,{size:16}),onClick:rl,className:"text-amber-700 dark:text-amber-400"}:null,t[22]=g,t[23]=P):P=t[23];const R=P;let D;t[24]===Symbol.for("react.memo_cache_sentinel")?(D={value:"light",icon:s.jsx(Vn,{size:14}),label:"Light theme"},t[24]=D):D=t[24];let F;t[25]===Symbol.for("react.memo_cache_sentinel")?(F={value:"dark",icon:s.jsx(Yn,{size:14}),label:"Dark theme"},t[25]=F):F=t[25];let M;t[26]===Symbol.for("react.memo_cache_sentinel")?(M=[D,F,{value:"system",icon:s.jsx(pt,{size:14}),label:"System theme"}],t[26]=M):M=t[26];const W=M;let K;t[27]!==g||t[28]!==c||t[29]!==w||t[30]!==a||t[31]!==m||t[32]!==R||t[33]!==f||t[34]!==x?(K={user:f,userImage:x,menuItems:w,signOutItem:O,stopImpersonatingItem:R,isImpersonating:g,themeOptions:W,preferences:a,setPreferences:m,close:b,isMobile:c},t[27]=g,t[28]=c,t[29]=w,t[30]=a,t[31]=m,t[32]=R,t[33]=f,t[34]=x,t[35]=K):K=t[35];const G=K;let q;return t[36]!==g||t[37]!==c||t[38]!==u||t[39]!==G||t[40]!==f?.name||t[41]!==x?(q=s.jsx(s.Fragment,{children:c?s.jsxs(rs,{open:u,onOpenChange:h,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>h(!0),className:E("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",g&&"border-2 border-dashed border-amber-500"),children:[s.jsx(Qe,{url:x,fallback:f?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??"Account"})]}),s.jsxs(os,{className:"h-[80dvh] p-0",children:[s.jsx(as,{className:"sr-only",children:"Account"}),s.jsx(Et,{...G})]})]}):s.jsxs(tt,{open:u,onOpenChange:h,children:[s.jsx(Ee,{asChild:!0,children:s.jsxs(Q,{tooltip:f?.name??"Account",className:E("rounded-md",g&&"border-2 border-dashed border-amber-500"),children:[s.jsx(Qe,{url:x,fallback:f?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??"Account"})]})}),s.jsx(et,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:ll,children:s.jsx(Et,{...G})})]})}),t[36]=g,t[37]=c,t[38]=u,t[39]=G,t[40]=f?.name,t[41]=x,t[42]=q):q=t[42],q}function ll(t){return t.preventDefault()}async function rl(){const{error:t}=await ae.admin.stopImpersonating();if(t){re.error(t.message||"Failed to stop impersonation");return}window.location.href="/"}function ol(){me("signed_out",{source:"account_popover"}),Ws(),ae.signOut()}function Ge(t){const e=I.c(43),{variant:n}=t===void 0?{}:t,l=n===void 0?"icon":n,i=An(),[r,o]=L.useState(!1);let a,m;if(e[0]!==i.capabilities||e[1]!==i.hostname||e[2]!==i.machineId||e[3]!==i.online){const y=ei(i.capabilities);a=i.online?"Desktop linked":"Connect desktop",m=i.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:i.hostname??i.machineId??"Desktop linked"}),s.jsx("span",{className:"text-muted-foreground",children:y.length>0?`Available: ${y.join(", ")}`:"No CLI agents detected"})]}):s.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=i.capabilities,e[1]=i.hostname,e[2]=i.machineId,e[3]=i.online,e[4]=a,e[5]=m}else a=e[4],m=e[5];const c=m;if(l==="full"){let y,v;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=()=>o(!0),v=s.jsx(pt,{}),e[6]=y,e[7]=v):(y=e[6],v=e[7]);let _;e[8]!==a?(_=s.jsx("span",{children:a}),e[8]=a,e[9]=_):_=e[9];let C;e[10]!==i.online?(C=i.online&&s.jsx("span",{className:"ml-auto size-2 rounded-full bg-success animate-pulse"}),e[10]=i.online,e[11]=C):C=e[11];let N;e[12]!==a||e[13]!==_||e[14]!==C?(N=s.jsx(ue,{asChild:!0,children:s.jsxs(Q,{tooltip:a,onClick:y,children:[v,_,C]})}),e[12]=a,e[13]=_,e[14]=C,e[15]=N):N=e[15];let S;e[16]!==c?(S=s.jsx(fe,{side:"right",children:c}),e[16]=c,e[17]=S):S=e[17];let A;e[18]!==N||e[19]!==S?(A=s.jsxs(he,{children:[N,S]}),e[18]=N,e[19]=S,e[20]=A):A=e[20];let k;e[21]!==r?(k=s.jsx(Mt,{open:r,onOpenChange:o}),e[21]=r,e[22]=k):k=e[22];let $;return e[23]!==k||e[24]!==A?($=s.jsxs(s.Fragment,{children:[A,k]}),e[23]=k,e[24]=A,e[25]=$):$=e[25],$}let d;e[26]===Symbol.for("react.memo_cache_sentinel")?(d=()=>o(!0),e[26]=d):d=e[26];const u=i.online?"Desktop linked":"Connect your desktop";let h;e[27]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(pt,{size:16}),e[27]=h):h=e[27];let f;e[28]!==i.online?(f=i.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[28]=i.online,e[29]=f):f=e[29];let x;e[30]!==u||e[31]!==f?(x=s.jsx(ue,{asChild:!0,children:s.jsxs(ve,{onClick:d,"aria-label":u,children:[h,f]})}),e[30]=u,e[31]=f,e[32]=x):x=e[32];let g;e[33]!==c?(g=s.jsx(fe,{side:"bottom",children:c}),e[33]=c,e[34]=g):g=e[34];let p;e[35]!==x||e[36]!==g?(p=s.jsxs(he,{children:[x,g]}),e[35]=x,e[36]=g,e[37]=p):p=e[37];let b;e[38]!==r?(b=s.jsx(Mt,{open:r,onOpenChange:o}),e[38]=r,e[39]=b):b=e[39];let j;return e[40]!==b||e[41]!==p?(j=s.jsxs(s.Fragment,{children:[p,b]}),e[40]=b,e[41]=p,e[42]=j):j=e[42],j}class al extends L.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function cl(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function dl(){const t=I.c(17),e=xe(),{org:n}=ne(),{hasDecoKey:l,balanceDollars:i}=Bn();if(!l)return null;let r;t[0]!==i?(r=i!=null?`Credits: $${i.toFixed(2)}`:"Credits",t[0]=i,t[1]=r):r=t[1];let o;t[2]!==i?(o=E(i!=null&&cl(i)),t[2]=i,t[3]=o):o=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let m;t[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(on,{}),t[7]=m):m=t[7];let c;t[8]!==i?(c=i!=null?`$${i.toFixed(2)}`:"Credits",t[8]=i,t[9]=c):c=t[9];let d;t[10]!==c?(d=s.jsx("span",{children:c}),t[10]=c,t[11]=d):d=t[11];let u;return t[12]!==r||t[13]!==o||t[14]!==a||t[15]!==d?(u=s.jsx(se,{children:s.jsx(U,{children:s.jsxs(Q,{tooltip:r,className:o,onClick:a,children:[m,d]})})}),t[12]=r,t[13]=o,t[14]=a,t[15]=d,t[16]=u):u=t[16],u}function Rt(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(al,{children:s.jsx(L.Suspense,{fallback:null,children:s.jsx(dl,{})})}),t[0]=e):e=t[0],e}function mt(){const t=I.c(7),e=xe(),{org:n}=ne();let l;t[0]!==e||t[1]!==n.slug?(l=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=l):l=t[2];let i,r;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(st,{}),r=s.jsx("span",{children:"Settings"}),t[3]=i,t[4]=r):(i=t[3],r=t[4]);let o;return t[5]!==l?(o=s.jsxs(Q,{tooltip:"Settings",onClick:l,children:[i,r]}),t[5]=l,t[6]=o):o=t[6],o}function ml(){const t=I.c(6),e=xe(),{org:n}=ne();let l;t[0]!==e||t[1]!==n.slug?(l=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=l):l=t[2];let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(st,{size:15}),t[3]=i):i=t[3];let r;return t[4]!==l?(r=s.jsx("button",{type:"button","aria-label":"Settings",onClick:l,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[4]=l,t[5]=r):r=t[5],r}function Lt(){const t=I.c(4),[e,n]=L.useState(!1);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(U,{children:s.jsx(us,{trigger:s.jsxs(Q,{tooltip:"Invite members",children:[s.jsx(ns,{}),s.jsx("span",{children:"Invite members"})]})})}),t[0]=l):l=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(se,{className:"gap-0.5",children:[l,s.jsx(U,{children:s.jsxs(Q,{tooltip:"Add connection",onClick:()=>n(!0),children:[s.jsx(Xn,{}),s.jsx("span",{children:"Add connection"})]})})]}),t[1]=i):i=t[1];let r;return t[2]!==e?(r=s.jsxs(s.Fragment,{children:[i,s.jsx(Hn,{open:e,onOpenChange:n,mode:"browse"})]}),t[2]=e,t[3]=r):r=t[3],r}function Bt(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(se,{className:"gap-0.5",children:s.jsx(U,{children:s.jsx(us,{trigger:s.jsxs(Q,{tooltip:"Invite members",children:[s.jsx(ns,{}),s.jsx("span",{children:"Invite members"})]})})})}),t[0]=e):e=t[0],e}function ul(){const t=I.c(17),{state:e}=pe(),n=e==="collapsed";if(nt()){if(n){let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Bt,{}),t[0]=h):h=t[0];let f;t[1]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(U,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(Ge,{})})}),t[1]=f):f=t[1];let x;t[2]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(U,{children:s.jsx(mt,{})}),t[2]=x):x=t[2];let g;return t[3]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs(Re,{className:"px-2 pb-3 gap-1",children:[h,s.jsxs(se,{children:[f,x,s.jsx(U,{children:s.jsx(He,{})})]})]}),t[3]=g):g=t[3],g}let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Bt,{}),t[4]=c):c=t[4];let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(U,{children:s.jsx(Ge,{variant:"full"})}),t[5]=d):d=t[5];let u;return t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs(Re,{className:"px-2 pb-3 gap-0.5",children:[c,s.jsxs(se,{className:"gap-0.5",children:[d,s.jsx(U,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(He,{})}),s.jsx(ml,{})]})})]})]}),t[6]=u):u=t[6],u}if(n){let c,d;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Lt,{}),d=s.jsx(Rt,{}),t[7]=c,t[8]=d):(c=t[7],d=t[8]);let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(U,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(Ge,{})})}),t[9]=u):u=t[9];let h;t[10]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(U,{children:s.jsx(mt,{})}),t[10]=h):h=t[10];let f;return t[11]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs(Re,{className:"px-2 pb-3 gap-1",children:[c,d,s.jsxs(se,{children:[u,h,s.jsx(U,{children:s.jsx(He,{})})]})]}),t[11]=f):f=t[11],f}let i,r;t[12]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Lt,{}),r=s.jsx(Rt,{}),t[12]=i,t[13]=r):(i=t[12],r=t[13]);let o;t[14]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(U,{children:s.jsx(Ge,{variant:"full"})}),t[14]=o):o=t[14];let a;t[15]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(U,{children:s.jsx(mt,{})}),t[15]=a):a=t[15];let m;return t[16]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsxs(Re,{className:"px-2 pb-3 gap-0.5",children:[i,r,s.jsxs(se,{className:"gap-0.5",children:[o,a,s.jsx(U,{children:s.jsx(He,{})})]})]}),t[16]=m):m=t[16],m}function fl(){const t=I.c(8),e=xe(),{org:n}=ne(),{setOpenMobile:l}=pe();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(se,{children:s.jsx(U,{children:s.jsx(He,{})})})}),t[0]=i):i=t[0];let r;t[1]!==e||t[2]!==n.slug||t[3]!==l?(r=()=>{e({to:"/$org/settings",params:{org:n.slug}}),l(!1)},t[1]=e,t[2]=n.slug,t[3]=l,t[4]=r):r=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(st,{className:"size-4"}),t[5]=o):o=t[5];let a;return t[6]!==r?(a=s.jsx(Re,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[i,s.jsx(ve,{"aria-label":"Settings",onClick:r,children:o})]})}),t[6]=r,t[7]=a):a=t[7],a}function Ht(t){const e=I.c(15),{className:n,wrapperClassName:l,children:i}=t,[r,o]=L.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=b=>{b&&o(b.scrollHeight>b.clientHeight+1)},e[0]=a):a=e[0];const m=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=b=>{const j=b.currentTarget;o(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const d=c;let u;e[2]!==l?(u=E("relative",l),e[2]=l,e[3]=u):u=e[3];let h;e[4]!==i||e[5]!==n?(h=s.jsx("div",{ref:m,onScroll:d,className:n,children:i}),e[4]=i,e[5]=n,e[6]=h):h=e[6];const f=r?"opacity-100":"opacity-0";let x;e[7]!==f?(x=E("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",f),e[7]=f,e[8]=x):x=e[8];let g;e[9]!==x?(g=s.jsx("div",{"aria-hidden":!0,className:x}),e[9]=x,e[10]=g):g=e[10];let p;return e[11]!==u||e[12]!==h||e[13]!==g?(p=s.jsxs("div",{className:u,children:[h,g]}),e[11]=u,e[12]=h,e[13]=g,e[14]=p):p=e[14],p}function hl(t){const e=I.c(8),{virtualMcpId:n,size:l,showAutomationBadge:i}=t,r=l===void 0?"sm":l;let o;e[0]!==r||e[1]!==n?(o=n?s.jsx(xl,{virtualMcpId:n,size:r}):s.jsx(je,{icon:null,name:"?",size:r}),e[0]=r,e[1]=n,e[2]=o):o=e[2];let a;e[3]!==i?(a=i&&s.jsx("span",{"aria-label":"Automation-triggered",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(hs,{size:10,className:"text-white"})}),e[3]=i,e[4]=a):a=e[4];let m;return e[5]!==o||e[6]!==a?(m=s.jsxs("div",{className:"relative shrink-0",children:[o,a]}),e[5]=o,e[6]=a,e[7]=m):m=e[7],m}function xl(t){const e=I.c(6),{virtualMcpId:n,size:l}=t,i=Ct(n);if(!i){let a;return e[0]!==l?(a=s.jsx(je,{icon:null,name:"?",size:l}),e[0]=l,e[1]=a):a=e[1],a}const r=i.icon??null;let o;return e[2]!==i.title||e[3]!==l||e[4]!==r?(o=s.jsx(je,{icon:r,name:i.title,size:l}),e[2]=i.title,e[3]=l,e[4]=r,e[5]=o):o=e[5],o}function Gt(t){const e=I.c(36),{open:n,onOpenChange:l}=t,[i,r]=L.useState(""),{org:o}=ne(),{setTaskId:a}=kt(),m=fs();let c,d,u;e[0]!==o.id||e[1]!==i?(u=i.trim(),d=Ks,c=qs.globalSearch(o.id,u),e[0]=o.id,e[1]=i,e[2]=c,e[3]=d,e[4]=u):(c=e[2],d=e[3],u=e[4]);const h=n&&u.length>0;let f;e[5]!==m||e[6]!==u?(f=async()=>await m.call("GLOBAL_SEARCH",{query:u,limit:20}),e[5]=m,e[6]=u,e[7]=f):f=e[7];let x;e[8]!==c||e[9]!==h||e[10]!==f?(x={queryKey:c,enabled:h,queryFn:f,staleTime:1e4},e[8]=c,e[9]=h,e[10]=f,e[11]=x):x=e[11];const{data:g,isFetching:p}=d(x);let b;e[12]!==g?.items?(b=g?.items??[],e[12]=g?.items,e[13]=b):b=e[13];const j=b;let y;e[14]!==l?(y=z=>{z||r(""),l(z)},e[14]=l,e[15]=y):y=e[15];const v=y;let _;e[16]!==v||e[17]!==a?(_=z=>{v(!1),a(z.id,z.virtual_mcp_id??void 0)},e[16]=v,e[17]=a,e[18]=_):_=e[18];const C=_;let N;e[19]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsxs(li,{className:"sr-only",children:[s.jsx(ri,{children:"Search"}),s.jsx(oi,{children:"Search across your organization's resources."})]}),e[19]=N):N=e[19];let S;e[20]!==i?(S=s.jsx(ui,{value:i,onValueChange:r,placeholder:"Search..."}),e[20]=i,e[21]=S):S=e[21];let A;e[22]!==C||e[23]!==p||e[24]!==j||e[25]!==u?(A=u?p&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):j.length===0?s.jsx(di,{children:"No results."}):j.map(z=>z.type==="thread"?s.jsxs(mi,{value:`thread:${z.id}:${z.title}`,onSelect:()=>C(z),className:"gap-2.5",children:[s.jsx(hl,{virtualMcpId:z.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:z.title||"Untitled chat"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(z.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${z.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=C,e[23]=p,e[24]=j,e[25]=u,e[26]=A):A=e[26];let k;e[27]!==A?(k=s.jsx(fi,{children:A}),e[27]=A,e[28]=k):k=e[28];let $;e[29]!==S||e[30]!==k?($=s.jsxs(ai,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[N,s.jsxs(hi,{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:[S,k]})]}),e[29]=S,e[30]=k,e[31]=$):$=e[31];let w;return e[32]!==v||e[33]!==n||e[34]!==$?(w=s.jsx(ci,{open:n,onOpenChange:v,children:$}),e[32]=v,e[33]=n,e[34]=$,e[35]=w):w=e[35],w}function pl(t){return t==="ephemeral"||t.startsWith("thread:")}function Ns(t){const e=I.c(40),{task:n,isActive:l,onClick:i,onArchive:r,showAutomationBadge:o,showAgentIcon:a,hideStatusIdle:m,indented:c}=t,d=gi(n.status),u=d.icon,h=n.metadata?.kind==="tool_call_run",f=Ct(h?void 0:n.virtual_mcp_id);let x;e[0]!==f?(x=Gn(f),e[0]=f,e[1]=x):x=e[1];const g=x;bi(6e4);const p=o||!!n.trigger_id,b=n.id,j="button",y=0;let v;e[2]!==i?(v=W=>{W.target===W.currentTarget&&(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),i())},e[2]=i,e[3]=v):v=e[3];const _=c?"-ml-4 pl-6":"pl-[7px]",C=l?"bg-accent text-accent-foreground":"hover:bg-accent/60";let N;e[4]!==_||e[5]!==C?(N=E("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",_,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",C),e[4]=_,e[5]=C,e[6]=N):N=e[6];let S;e[7]!==h||e[8]!==a||e[9]!==f?.icon||e[10]!==f?.title?(S=a&&!h&&s.jsx(je,{icon:f?.icon??null,name:f?.title??"?",size:"2xs"}),e[7]=h,e[8]=a,e[9]=f?.icon,e[10]=f?.title,e[11]=S):S=e[11];let A;e[12]!==p?(A=p&&s.jsx(hs,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[12]=p,e[13]=A):A=e[13];const k=n.title||"Untitled task";let $;e[14]!==k?($=s.jsx("div",{className:"text-sm text-foreground truncate",children:k}),e[14]=k,e[15]=$):$=e[15];let w;e[16]!==A||e[17]!==$?(w=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[A,$]}),e[16]=A,e[17]=$,e[18]=w):w=e[18];let z;e[19]!==g||e[20]!==l||e[21]!==n.branch||e[22]!==n.updated_at?(z=n.updated_at&&s.jsxs("div",{className:E("flex items-center gap-1 text-[11px] min-w-0",l?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!pl(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):g?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[g.owner,"/",g.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:vi(new Date(n.updated_at))})]}),e[19]=g,e[20]=l,e[21]=n.branch,e[22]=n.updated_at,e[23]=z):z=e[23];let O;e[24]!==w||e[25]!==z?(O=s.jsxs("div",{className:"flex-1 min-w-0",children:[w,z]}),e[24]=w,e[25]=z,e[26]=O):O=e[26];const P="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",R=!m&&s.jsx("span",{className:E("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",r&&"group-hover/row:opacity-0"),"aria-label":d.label,children:s.jsx(u,{size:14,className:E(d.iconClassName,n.status==="in_progress"&&"animate-spin")})});let D;e[27]!==r?(D=r&&s.jsxs(he,{children:[s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":"Archive task",onClick:W=>{W.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(Xs,{size:14})})}),s.jsx(fe,{side:"right",children:"Archive"})]}),e[27]=r,e[28]=D):D=e[28];let F;e[29]!==R||e[30]!==D?(F=s.jsxs("div",{className:P,children:[R,D]}),e[29]=R,e[30]=D,e[31]=F):F=e[31];let M;return e[32]!==i||e[33]!==O||e[34]!==F||e[35]!==v||e[36]!==N||e[37]!==S||e[38]!==n.id?(M=s.jsxs("div",{"data-task-id":b,role:j,tabIndex:y,onClick:i,onKeyDown:v,className:N,children:[S,O,F]}),e[32]=i,e[33]=O,e[34]=F,e[35]=v,e[36]=N,e[37]=S,e[38]=n.id,e[39]=M):M=e[39],M}const Ut=["requires_action","in_progress","failed","expired","completed"];function gl(t){const e=new Map(Ut.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return Ut.map(n=>({status:n,threads:e.get(n)}))}const bl="sidebar.group.expanded.";function jl(t,e){const n=I.c(3),[l,i]=Ze(`${bl}${t}`,e);let r;return n[0]!==l||n[1]!==i?(r=[l,i],n[0]=l,n[1]=i,n[2]=r):r=n[2],r}function _s(t){const e=I.c(12),{onClick:n,isFetching:l,indented:i}=t,r=i?"-ml-4 pl-6 pr-2":"px-2";let o;e[0]!==r?(o=E("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",r,"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[0]=r,e[1]=o):o=e[1];let a;e[2]!==l?(a=l&&s.jsx(Qt,{size:14,className:"animate-spin"}),e[2]=l,e[3]=a):a=e[3];const m=l?"Loading…":"Show more";let c;e[4]!==m?(c=s.jsx("span",{children:m}),e[4]=m,e[5]=c):c=e[5];let d;return e[6]!==l||e[7]!==n||e[8]!==o||e[9]!==a||e[10]!==c?(d=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:l,className:o,children:[a,c]}),e[6]=l,e[7]=n,e[8]=o,e[9]=a,e[10]=c,e[11]=d):d=e[11],d}function vl(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function yl(t){return t.member==="mine"&&!t.currentUserId}const Cs=4;let Ve=0;const bt=[];function Sl(){for(;Ve<Cs&&bt.length>0;){const t=bt.shift();t&&t()}}function ws(t){return new Promise((e,n)=>{const l=()=>{Ve++,t().then(e,n).finally(()=>{Ve--,Sl()})};Ve<Cs?l():bt.push(l)})}const rt=10;function Wt(t,e,n,l,i){const r={hidden:!1};l.member==="mine"&&l.currentUserId&&(r.created_by=l.currentUserId),l.type==="automation"&&(r.has_trigger=!0),l.type==="manual"&&(r.has_trigger=!1);const o={where:r,limit:i,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function Nl(t,e,n,l){let i=0;for(const r of t)ks(r,e,n,l)&&i++;return i}function ut(t,e,n,l){return Nl(t,e,n,l)}function _l(t,e){return!!(t>=rt||t===0&&e)}function qt(t,e){return t<e}function Cl(t,e){return e===!1?!1:e===!0?!0:t}function ks(t,e,n,l){return!(t.hidden||(t.status??"completed")!==n||l.member==="mine"&&l.currentUserId&&t.created_by!==l.currentUserId||l.type==="automation"&&!t.trigger_id||l.type==="manual"&&t.trigger_id)}const Je=new Map,Xe=new Map;function wl(t,e){return e?t>=rt?!0:null:!1}function Kt(t){return Je.get(t)}function kl(t,e){Je.set(t,e)}function Al(t,e,n){const l=Je.get(t);if(l!==void 0){n(l);return}let i=Xe.get(t);i||(i=ws(e).then(r=>(Je.set(t,r),Xe.delete(t),r)).catch(()=>(Xe.delete(t),Promise.reject(new Error("group probe failed")))),Xe.set(t,i)),i.then(n,()=>n(!1))}function Xt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===rt,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Il(t,e,n,l,i){let r=0;for(const o of t)e.has(o.id)||ks(o,n,l,i)&&r++;return r}function zl(t,e,n,l){const i=I.c(8),{org:r}=ne(),o=vl(r.id,t,e,n);let a;i[0]!==n?(a=yl(n),i[0]=n,i[1]=a):a=i[1];const m=a,[c,d]=L.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==o&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const u=Tn(),{threads:h,hasMore:f}=wt(),x=ut(h,t,e,n),g=_l(x,f),p=wl(x,f),b=fs();if(c.identity===o&&c.serverHasMore===null){const N=p??Kt(o);N!==void 0&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!m&&c.identity===o&&c.serverHasMore===null&&p===null&&Kt(o)===void 0&&c.probeSubscribedIdentity!==o&&(d(N=>N.identity===o?{...N,isProbing:!0,probeSubscribedIdentity:o}:N),Al(o,async()=>{const N=Wt(t,e,0,n,1),S=await b.call("COLLECTION_THREADS_LIST",N),{totalCount:A}=Xt(S),k=ut(u.threads.get(),t,e,n);return A===void 0?!1:qt(k,A)},N=>{d(S=>S.identity!==o?S:{...S,isProbing:!1,serverHasMore:N})}));const y=async function(){if(c.isFetching||c.isProbing||m)return;const S=o;d(A=>A.identity===S?{...A,isFetching:!0}:A);try{const A=ut(h,t,e,n),k=Wt(t,e,A,n,rt),$=await ws(()=>b.call("COLLECTION_THREADS_LIST",k)),{items:w,hasMore:z,totalCount:O}=Xt($),P=new Set(h.map($l)),R=Il(w,P,t,e,n),D=A;u.mergeThreads(w),d(F=>{if(F.identity!==S)return F;let M;return O!==void 0?M=qt(D+R,O):M=w.length===0||R===0?!1:z,kl(S,M),{...F,isFetching:!1,serverHasMore:M}})}catch(A){const k=A,$=k instanceof Error?k.message:String(k);re.error(`Could not load more tasks: ${$}`),d(w=>w.identity===S?{...w,isFetching:!1}:w)}},v=c.isFetching||c.isProbing,_=!m&&!v&&Cl(g,c.serverHasMore);let C;return i[2]!==v||i[3]!==y||i[4]!==_||i[5]!==c.isProbing||i[6]!==c.serverHasMore?(C={hasMore:_,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:y},i[2]=v,i[3]=y,i[4]=_,i[5]=c.isProbing,i[6]=c.serverHasMore,i[7]=C):C=i[7],C}function $l(t){return t.id}function Tl(t){const e=I.c(20),{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m}=t,{isFetching:c,isProbing:d,loadMore:u,hasMore:h,serverHasMore:f}=zl("status",n,m),[x,g]=L.useState(!1);!x&&l.length===0&&f===!0&&!c&&!d&&(g(!0),queueMicrotask(()=>{u()}));let p;if(e[0]!==i||e[1]!==a||e[2]!==m||e[3]!==o||e[4]!==r||e[5]!==l){let y;e[7]!==i||e[8]!==a||e[9]!==m||e[10]!==o||e[11]!==r?(y=v=>s.jsx(Ns,{task:v,isActive:i===v.id,onClick:()=>r(v),onArchive:a&&v.created_by===m.currentUserId?()=>o(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=i,e[8]=a,e[9]=m,e[10]=o,e[11]=r,e[12]=y):y=e[12],p=l.map(y),e[0]=i,e[1]=a,e[2]=m,e[3]=o,e[4]=r,e[5]=l,e[6]=p}else p=e[6];let b;e[13]!==h||e[14]!==c||e[15]!==u?(b=(h||c)&&s.jsx(_s,{onClick:()=>{u()},isFetching:c,indented:!0}),e[13]=h,e[14]=c,e[15]=u,e[16]=b):b=e[16];let j;return e[17]!==p||e[18]!==b?(j=s.jsxs(s.Fragment,{children:[p,b]}),e[17]=p,e[18]=b,e[19]=j):j=e[19],j}function Ol(t){const e=I.c(36),{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m}=t,c=ji[n],d=c.icon,[u,h]=jl(`status-${n}`,!1);let f;e[0]!==u||e[1]!==h?(f=function(){h(!u)},e[0]=u,e[1]=h,e[2]=f):f=e[2];const x=f;let g;e[3]!==x?(g=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),x())},e[3]=x,e[4]=g):g=e[4];let p;e[5]!==d||e[6]!==c.iconClassName?(p=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(d,{size:12,className:c.iconClassName})}),e[5]=d,e[6]=c.iconClassName,e[7]=p):p=e[7];let b;e[8]!==u?(b=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:u?s.jsx(_t,{size:14}):s.jsx(yi,{size:14})}),e[8]=u,e[9]=b):b=e[9];let j;e[10]!==p||e[11]!==b?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[p,b]}),e[10]=p,e[11]=b,e[12]=j):j=e[12];let y;e[13]!==c.label?(y=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=y):y=e[14];let v;e[15]!==l.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:l.length})}),e[15]=l.length,e[16]=v):v=e[16];let _;e[17]!==u||e[18]!==x||e[19]!==g||e[20]!==j||e[21]!==y||e[22]!==v?(_=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:x,onKeyDown:g,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,y,v]}),e[17]=u,e[18]=x,e[19]=g,e[20]=j,e[21]=y,e[22]=v,e[23]=_):_=e[23];let C;e[24]!==i||e[25]!==a||e[26]!==u||e[27]!==m||e[28]!==o||e[29]!==r||e[30]!==n||e[31]!==l?(C=u&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(Tl,{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m})}),e[24]=i,e[25]=a,e[26]=u,e[27]=m,e[28]=o,e[29]=r,e[30]=n,e[31]=l,e[32]=C):C=e[32];let N;return e[33]!==_||e[34]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[_,C]}),e[33]=_,e[34]=C,e[35]=N):N=e[35],N}function Vt(t){const e=I.c(38),{threads:n,groupBy:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,filters:a,hasMore:m,isFetchingMore:c,onLoadMore:d,filtersActive:u}=t;if(n.length===0&&!m&&!c){let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(pi,{className:"size-6 opacity-60"}),e[0]=p):p=e[0];const b=u?"No chats match your filters":"No chats yet";let j;return e[1]!==b?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[p,s.jsx("p",{className:"text-sm",children:b})]}),e[1]=b,e[2]=j):j=e[2],j}const h=n.length>1||m;if(l==="status"){let p;if(e[3]!==i||e[4]!==h||e[5]!==a||e[6]!==o||e[7]!==r||e[8]!==n){let j;e[10]!==i||e[11]!==h||e[12]!==a||e[13]!==o||e[14]!==r?(j=y=>s.jsx(Ol,{status:y.status,threads:y.threads,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:h,filters:a},y.status),e[10]=i,e[11]=h,e[12]=a,e[13]=o,e[14]=r,e[15]=j):j=e[15],p=gl(n).map(j),e[3]=i,e[4]=h,e[5]=a,e[6]=o,e[7]=r,e[8]=n,e[9]=p}else p=e[9];let b;return e[16]!==p?(b=s.jsx(s.Fragment,{children:p}),e[16]=p,e[17]=b):b=e[17],b}let f;if(e[18]!==i||e[19]!==h||e[20]!==a||e[21]!==o||e[22]!==r||e[23]!==n){let p;e[25]!==i||e[26]!==h||e[27]!==a||e[28]!==o||e[29]!==r?(p=b=>s.jsx(Ns,{task:b,isActive:i===b.id,onClick:()=>r(b),onArchive:h&&b.created_by===a.currentUserId?()=>o(b):void 0,showAutomationBadge:!!b.trigger_id,showAgentIcon:!0},b.id),e[25]=i,e[26]=h,e[27]=a,e[28]=o,e[29]=r,e[30]=p):p=e[30],f=n.map(p),e[18]=i,e[19]=h,e[20]=a,e[21]=o,e[22]=r,e[23]=n,e[24]=f}else f=e[24];let x;e[31]!==m||e[32]!==c||e[33]!==d?(x=(m||c)&&s.jsx(_s,{onClick:d,isFetching:c}),e[31]=m,e[32]=c,e[33]=d,e[34]=x):x=e[34];let g;return e[35]!==f||e[36]!==x?(g=s.jsxs(s.Fragment,{children:[f,x]}),e[35]=f,e[36]=x,e[37]=g):g=e[37],g}function Ml(t,e,n){if(!n)return;const l=t.findIndex(i=>i.id===e);if(l!==-1){for(let i=l+1;i<t.length;i++){const r=t[i];if(r?.created_by===n)return r}for(let i=l-1;i>=0;i--){const r=t[i];if(r?.created_by===n)return r}}}function Yt(t){const e=I.c(17),{label:n,onClick:l,active:i,children:r}=t,[o,a]=L.useState(!1);let m,c,d,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>a(!0),c=()=>a(!1),d=()=>a(!0),u=()=>a(!1),e[0]=m,e[1]=c,e[2]=d,e[3]=u):(m=e[0],c=e[1],d=e[2],u=e[3]);const h=i&&"bg-sidebar-accent text-foreground";let f;e[4]!==h?(f=E("md:size-[34px] rounded-lg",h),e[4]=h,e[5]=f):f=e[5];let x;e[6]!==r||e[7]!==n||e[8]!==l||e[9]!==f?(x=s.jsx(ue,{asChild:!0,children:s.jsx(ve,{"aria-label":n,onClick:l,onPointerEnter:m,onPointerLeave:c,onFocus:d,onBlur:u,className:f,children:r})}),e[6]=r,e[7]=n,e[8]=l,e[9]=f,e[10]=x):x=e[10];let g;e[11]!==n?(g=s.jsx(fe,{side:"bottom",children:n}),e[11]=n,e[12]=g):g=e[12];let p;return e[13]!==o||e[14]!==x||e[15]!==g?(p=s.jsxs(he,{open:o,children:[x,g]}),e[13]=o,e[14]=x,e[15]=g,e[16]=p):p=e[16],p}function ft(t){const e=I.c(13),{label:n,value:l,onChange:i,options:r}=t;let o;e[0]!==n?(o=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=o):o=e[1];let a;e[2]!==i?(a=u=>u&&i(u),e[2]=i,e[3]=a):a=e[3];let m;e[4]!==r?(m=r.map(Pl),e[4]=r,e[5]=m):m=e[5];let c;e[6]!==a||e[7]!==m||e[8]!==l?(c=s.jsx(ni,{type:"single",size:"sm",value:l,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:m}),e[6]=a,e[7]=m,e[8]=l,e[9]=c):c=e[9];let d;return e[10]!==o||e[11]!==c?(d=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,c]}),e[10]=o,e[11]=c,e[12]=d):d=e[12],d}function Pl(t){return s.jsxs(si,{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 As({onNavigate:t}={}){const{data:e}=ae.useSession(),n=e?.user?.id,{org:l}=ne(),i=ii({connectionId:ln,orgId:l.id,orgSlug:l.slug}),r=Ye(l.id).id,o=ss(),{threads:a,hasMore:m,isFetchingMore:c,fetchNextPage:d}=wt(),u=a.filter(T=>!T.hidden),{hide:h}=cs(),f=xe(),{setTaskId:x,createNewTask:g}=kt(),p=jt({strict:!1}),b=vt({strict:!1}),j=p.taskId??null,y=b.virtualmcpid??a.find(T=>T.id===j)?.virtual_mcp_id??null,v=()=>{t?.()},_=[...u].sort((T,H)=>(H.updated_at??"").localeCompare(T.updated_at??"")),[C,N]=L.useState("all"),[S,A]=L.useState("flat"),[k,$]=Ze("sidebar-threads-scope-all",!1),[w,z]=L.useState(!1),[O,P]=L.useState(!1),R={type:C,member:"mine",currentUserId:n??null},D=T=>n?T.filter(H=>H.created_by===n):[],F=T=>C==="automation"?T.filter(H=>!!H.trigger_id):C==="manual"?T.filter(H=>!H.trigger_id):T,M=D(_),W=F(M),K=F(_),G=k?K:W,q=T=>{if(n&&T.created_by&&T.created_by!==n)return;const H=T.id===j;if(h(T.id),Pn(T.id),!H)return;const Y=Ml(G,T.id,n);v(),Y?x(Y.id,Y.virtual_mcp_id):f({to:"/$org",params:{org:l.slug}})},J=T=>{v(),x(T.id,T.virtual_mcp_id)},B=async T=>{try{const H=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:T,limit:1,offset:0}});return((H.structuredContent??H).items?.length??0)===0}catch{return!1}},ce=async()=>{const T=y??r;me("sidebar_new_thread_clicked",{virtual_mcp_id:T});const H=M.find(Y=>Y.virtual_mcp_id===T&&Y.title==="New chat");if(H&&await B(H.id)){v(),x(H.id,T);return}v(),g(T)},{state:ye,isMobile:V,toggleSidebar:Z}=pe();if(ye==="collapsed"&&!V){const T=Ye(l.id),H=new Map((o??[]).map(X=>[X.id,X])),Y=X=>(X?H.get(X):void 0)??(X===r?T:void 0);return s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(Ss,{orgParam:l.slug,side:"right",align:"start",trigger:s.jsx(Q,{tooltip:l.name,children:s.jsx(it,{org:l,size:"sm"})})})}),s.jsxs(se,{className:"mt-2 min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(U,{children:s.jsx(Q,{"aria-label":"Toggle sidebar",tooltip:"Toggle sidebar",onClick:Z,children:s.jsx(ts,{size:16})})}),s.jsx(U,{children:s.jsx(Q,{tooltip:"New chat",onClick:()=>{ce()},children:s.jsx($t,{size:16})})}),G.map(X=>{const be=Y(X.virtual_mcp_id);return s.jsx(U,{children:s.jsx(Q,{tooltip:X.title||"New chat",isActive:X.id===j,onClick:()=>J(X),children:s.jsx(je,{icon:be?.icon??null,name:be?.title??"Agent",size:"xs"})})},X.id)})]})]})}const ee=S!=="flat"||C!=="all"||k===!0,le=s.jsxs(tt,{children:[s.jsxs(he,{children:[s.jsx(ue,{asChild:!0,children:s.jsx(Ee,{asChild:!0,children:s.jsxs(ve,{"aria-label":"Filter chats",active:ee,className:"md:size-[34px] rounded-lg",children:[s.jsx(ti,{size:16}),ee&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(fe,{side:"bottom",children:"Filter chats"})]}),s.jsxs(et,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(ft,{label:"View",value:S,onChange:T=>{me("tasks_panel_group_by_changed",{to_value:T}),A(T)},options:[{value:"flat",label:"List",icon:s.jsx(cn,{size:13})},{value:"status",label:"Status",icon:s.jsx(dn,{size:13})}]}),s.jsx(ft,{label:"Type",value:C,onChange:T=>{me("tasks_panel_filter_changed",{to_value:T}),N(T)},options:[{value:"all",label:"All"},{value:"manual",label:"Chats"},{value:"automation",label:"Auto"}]}),s.jsx(ft,{label:"Scope",value:k?"team":"mine",onChange:T=>$(T==="team"),options:[{value:"mine",label:"Mine"},{value:"team",label:"Team"}]})]})]}),ie=T=>s.jsx(xt,{delayDuration:300,children:s.jsxs("div",{className:E("shrink-0 flex items-center justify-between",T?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!T&&s.jsx(xs,{className:"md:size-[34px] rounded-lg"}),le]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(Yt,{label:"Search chats",onClick:()=>{me("tasks_panel_search_opened"),P(!0),z(!0)},children:s.jsx(an,{size:16})}),s.jsx(Yt,{label:"New chat",onClick:()=>{ce()},children:s.jsx($t,{size:16})})]})]})});return V?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[ie(!0),s.jsx(Ht,{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(Vt,{threads:G,groupBy:S,activeTaskId:j,onSelectTask:J,onArchiveTask:q,filters:R,hasMore:m,isFetchingMore:c,onLoadMore:()=>{d()},filtersActive:ee})}),O&&s.jsx(Gt,{open:w,onOpenChange:z})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[ie(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(Ht,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(Vt,{threads:G,groupBy:S,activeTaskId:j,onSelectTask:J,onArchiveTask:q,filters:R,hasMore:m,isFetchingMore:c,onLoadMore:()=>{d()},filtersActive:ee})})}),O&&s.jsx(Gt,{open:w,onOpenChange:z})]})}const Dl=5,Fl=[{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 Is(){const t=I.c(3),{state:e}=pe();if(e==="collapsed"){let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:Dl}).map(Ll)}),t[0]=i):i=t[0],i}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=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(oe,{className:"size-6 rounded-md"}),s.jsx(oe,{className:"size-6 rounded-md"}),s.jsx(oe,{className:"size-6 rounded-md"})]}),s.jsx(oe,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:Fl.map(El)})]}),t[2]=l):l=t[2],l}function El(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(oe,{className:"size-5 rounded-full shrink-0"}),s.jsx(oe,{className:E("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(Rl)})]},e)}function Rl(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(oe,{className:"h-3 flex-1 rounded-sm"})},e)}function Ll(t,e){return s.jsx(oe,{className:"size-10 rounded-lg mx-auto"},e)}function Bl(){const t=I.c(2);if(nt()){let l;return t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(gt,{showName:!0}),t[0]=l):l=t[0],l}let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(s.Fragment,{children:[s.jsx(gt,{}),s.jsx(lt,{})]}),t[1]=n):n=t[1],n}function Hl(){const t=I.c(5),e=ps();let n,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ul,{}),l=s.jsx(Bl,{}),t[0]=n,t[1]=l):(n=t[0],l=t[1]);let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Jt,{children:s.jsx(L.Suspense,{fallback:s.jsx(Is,{}),children:s.jsx(As,{})})}),t[2]=i):i=t[2];let r;return t[3]!==e?(r=s.jsx(ds,{children:s.jsx(js,{sections:e,footer:n,header:l,additionalContent:i})}),t[3]=e,t[4]=r):r=t[4],r}function Gl(t){const e=I.c(8),{onClose:n}=t,l=ps();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(fl,{}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Is,{}),e[1]=r):r=e[1];let o;e[2]!==n?(o=s.jsx(Jt,{children:s.jsx(L.Suspense,{fallback:r,children:s.jsx(As,{onNavigate:n})})}),e[2]=n,e[3]=o):o=e[3];let a;return e[4]!==n||e[5]!==l||e[6]!==o?(a=s.jsx(ds,{children:s.jsx(el,{sections:l,onClose:n,footer:i,additionalContent:o})}),e[4]=n,e[5]=l,e[6]=o,e[7]=a):a=e[7],a}const Ul="sidebar.open";function Wl(){const t=I.c(1),{state:e}=pe(),n=nt();if(e!=="collapsed"||n)return null;let l;return t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(lt,{}),t[0]=l):l=t[0],l}function ql(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ys,{}),t[0]=e):e=t[0],e}function ca(){const t=I.c(38),e=Nt(),n=nt(),[l,i]=Ze(Ul,!1),{width:r,wrapperRef:o,onStartResize:a,resetWidth:m}=Ci(),c=!e;let d,u;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(te.LeftColumn,{children:[s.jsx(Wl,{}),s.jsx(te.TogglesSlot,{})]}),u=s.jsx(te.CenterSlot,{}),t[0]=d,t[1]=u):(d=t[0],u=t[1]);let h;t[2]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsxs(te.Header,{children:[d,u,s.jsxs(te.RightColumn,{children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end items-center gap-0.5",children:s.jsx(te.TabsSlot,{})}),s.jsx(te.RightSlot,{})]})]}),t[2]=h):h=t[2];const f=h;let x;t[3]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(xs,{}),t[3]=x):x=t[3];let g;t[4]!==n?(g=!n&&s.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:s.jsx(lt,{})}),t[4]=n,t[5]=g):g=t[5];let p,b,j,y,v;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ge,{}),b=s.jsx(te.TogglesSlot,{}),j=s.jsx(te.TabsSlot,{className:"shrink-0"}),y=s.jsx(te.CenterSlot,{}),v=s.jsx(te.RightSlot,{}),t[6]=p,t[7]=b,t[8]=j,t[9]=y,t[10]=v):(p=t[6],b=t[7],j=t[8],y=t[9],v=t[10]);let _;t[11]!==g?(_=s.jsx(te.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[x,g,p,b,j,y,v]})}),t[11]=g,t[12]=_):_=t[12];const C=_;let N;t[13]===Symbol.for("react.memo_cache_sentinel")?(N={background:"transparent",containerType:"inline-size"},t[13]=N):N=t[13];let S;t[14]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Zs,{className:"flex flex-col min-h-0",style:N,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(L.Suspense,{fallback:s.jsx(ql,{}),children:s.jsx(Vs,{})})})})}),t[14]=S):S=t[14];const A=S,k=!c&&(e?C:f),$=`${r}px`;let w;t[15]!==$?(w={"--sidebar-width":$,"--sidebar-width-icon":"3.125rem"},t[15]=$,t[16]=w):w=t[16];const z=w;let O;t[17]!==e||t[18]!==a||t[19]!==m?(O=!e&&s.jsxs(s.Fragment,{children:[s.jsx(Hl,{}),s.jsx(Si,{onPointerDown:a,onDoubleClick:m})]}),t[17]=e,t[18]=a,t[19]=m,t[20]=O):O=t[20];let P;t[21]!==c?(P=c?s.jsxs("div",{className:"flex flex-col flex-1 min-w-0 min-h-0 h-full",children:[f,A]}):A,t[21]=c,t[22]=P):P=t[22];let R;t[23]!==z||t[24]!==O||t[25]!==P||t[26]!==o?(R=s.jsxs(en,{ref:o,className:"flex-1 bg-sidebar relative min-h-0",style:z,children:[O,P]}),t[23]=z,t[24]=O,t[25]=P,t[26]=o,t[27]=R):R=t[27];let D;t[28]!==e?(D=e&&s.jsx(xi,{renderSidebar:Kl}),t[28]=e,t[29]=D):D=t[29];let F;t[30]!==k||t[31]!==R||t[32]!==D?(F=s.jsx(In,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[k,R,D]})}),t[30]=k,t[31]=R,t[32]=D,t[33]=F):F=t[33];let M;return t[34]!==i||t[35]!==l||t[36]!==F?(M=s.jsx(On,{children:s.jsx(te.Provider,{children:s.jsx(tn,{open:l,onOpenChange:i,children:F})})}),t[34]=i,t[35]=l,t[36]=F,t[37]=M):M=t[37],M}function Kl(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(Gl,{onClose:e})})})}export{ca as default};
@@ -1 +0,0 @@
1
- import{c as d,a4 as f,a as g,r as x,j as l,aa as h,N as j}from"./index-Cvg8wlf2.js";import{a as I}from"./constants-CaIX_f5U.js";import{a as C}from"./hooks-k9Lihge2.js";import{f as R}from"./reusable-new-chat-CouMjkYR.js";import"./use-mcp-client-CClO-4jR.js";import"./auth-9zI7uyI_.js";import"./decopilot-sse-pool-CBL8Jn9p.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";function P(){const t=d.c(9),{org:o}=f(),r=I(o.id).id,{data:c}=g.useSession(),{threads:m,status:u}=C(),[p]=x.useState(S);if(u.kind==="loading"){let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(h,{}),t[0]=i):i=t[0],i}const n=R(m,r,c?.user?.id)?.id??p;let e;t[1]!==o.slug||t[2]!==n?(e={org:o.slug,taskId:n},t[1]=o.slug,t[2]=n,t[3]=e):e=t[3];let s;t[4]!==r?(s={virtualmcpid:r},t[4]=r,t[5]=s):s=t[5];let a;return t[6]!==e||t[7]!==s?(a=l.jsx(j,{to:"/$org/$taskId",params:e,search:s,replace:!0}),t[6]=e,t[7]=s,t[8]=a):a=t[8],a}function S(){return crypto.randomUUID()}export{P as default};
@@ -1 +0,0 @@
1
- import{c as M,a4 as st,m as pt,n as bt,d as Je,K as lt,r as z,j as s,l as B,B as Ze,i as ht}from"./index-Cvg8wlf2.js";import{g as $e}from"./get-initials-D-f_fDFw.js";import{A as Be}from"./avatar-BYTTt2km.js";import{B as Nt}from"./badge-CUmMlsBT.js";import{i as jt,a as at,b as vt}from"./Loading02-BqCrbGU_.js";import{i as yt}from"./List-C-Y7abIw.js";import{s as Dt}from"./Plus-CdBUTSrl.js";import{u as nt}from"./use-members-BRkIKC2W.js";import{u as ot}from"./studio-tools-BgAyimPw.js";import{a as Ct}from"./format-time-BnbuEtat.js";import{i as St}from"./AlertCircle-C__5mMuz.js";import{i as Tt}from"./CheckCircle-DRbpAaoA.js";import{i as It}from"./Circle--mEsLc32.js";import{s as wt}from"./Eye-CSrt2uwE.js";import{d as _t,e as kt,a as zt}from"./dialog-WQh-gp8S.js";import{a as Ve,c as We,d as Ee,D as Xe}from"./dropdown-menu-D4PeOhjt.js";import{P as Ot,a as Et,b as At}from"./popover-BWgdS4nk.js";import{C as $t}from"./calendar-Y3krjFiC.js";import{t as Ae}from"./ChevronDown-CBLc4m6w.js";import{s as Bt}from"./Trash01-BaM_ljKo.js";import{s as Mt}from"./User01-CwCos6Py.js";import{i as Pt}from"./X-B6q2eNkF.js";function Lt(){const t=M.c(13),{locator:e}=st(),l=ot();let n;t[0]!==e?(n=lt.taskBoardItems(e),t[0]=e,t[1]=n):n=t[1];let a;t[2]!==l?(a=async()=>(await l.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=l,t[3]=a):a=t[3];let i;t[4]!==n||t[5]!==a?(i={queryKey:n,queryFn:a},t[4]=n,t[5]=a,t[6]=i):i=t[6];const c=pt(i);let o;t[7]!==c.data?(o=c.data??[],t[7]=c.data,t[8]=o):o=t[8];let r;return t[9]!==c.error||t[10]!==c.isLoading||t[11]!==o?(r={items:o,isLoading:c.isLoading,error:c.error},t[9]=c.error,t[10]=c.isLoading,t[11]=o,t[12]=r):r=t[12],r}function Ft(){const t=M.c(30),{locator:e}=st(),l=ot(),n=bt();let a;t[0]!==e?(a=lt.taskBoardItems(e),t[0]=e,t[1]=a):a=t[1];const i=a;let c;t[2]!==n||t[3]!==i?(c=()=>n.invalidateQueries({queryKey:i}),t[2]=n,t[3]=i,t[4]=c):c=t[4];const o=c;let r;t[5]!==l?(r=v=>l.call("TASK_BOARD_ITEM_CREATE",v),t[5]=l,t[6]=r):r=t[6];let d;t[7]!==o||t[8]!==r?(d={mutationFn:r,onSuccess:o},t[7]=o,t[8]=r,t[9]=d):d=t[9];const u=Je(d);let f;t[10]!==l?(f=v=>l.call("TASK_BOARD_ITEM_UPDATE",v),t[10]=l,t[11]=f):f=t[11];let p,g;t[12]!==n||t[13]!==i?(p=async v=>{await n.cancelQueries({queryKey:i});const T=n.getQueryData(i);return n.setQueryData(i,y=>y?.map(C=>C.id===v.id?{...C,...v}:C)),{previous:T}},g=(v,T,y)=>{y?.previous&&n.setQueryData(i,y.previous)},t[12]=n,t[13]=i,t[14]=p,t[15]=g):(p=t[14],g=t[15]);let m;t[16]!==o||t[17]!==f||t[18]!==p||t[19]!==g?(m={mutationFn:f,onMutate:p,onError:g,onSettled:o},t[16]=o,t[17]=f,t[18]=p,t[19]=g,t[20]=m):m=t[20];const h=Je(m);let b;t[21]!==l?(b=v=>l.call("TASK_BOARD_ITEM_DELETE",{id:v}),t[21]=l,t[22]=b):b=t[22];let D;t[23]!==o||t[24]!==b?(D={mutationFn:b,onSuccess:o},t[23]=o,t[24]=b,t[25]=D):D=t[25];const j=Je(D);let N;return t[26]!==u||t[27]!==j||t[28]!==h?(N={create:u,update:h,remove:j},t[26]=u,t[27]=j,t[28]=h,t[29]=N):N=t[29],N}const rt=["triage","todo","in_progress","in_review","done"],U={triage:{label:"Triage",icon:St,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:It,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:jt,iconClassName:"text-blue-500"},in_review:{label:"In Review",icon:wt,iconClassName:"text-amber-500"},done:{label:"Done",icon:Tt,iconClassName:"text-green-600"}},Rt=["low","medium","high","urgent"],ye={low:{label:"Low",badgeClassName:"bg-muted text-muted-foreground",flagClassName:"text-muted-foreground"},medium:{label:"Medium",badgeClassName:"bg-blue-500/10 text-blue-600",flagClassName:"text-blue-500"},high:{label:"High",badgeClassName:"bg-orange-500/10 text-orange-600",flagClassName:"text-orange-500"},urgent:{label:"Urgent",badgeClassName:"bg-red-500/10 text-red-600",flagClassName:"text-red-500"}};function Kt(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function et(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Ut=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function Qt(t){const e=M.c(133),{open:l,onClose:n,item:a,onSubmit:i,onDelete:c,isSaving:o}=t,{data:r}=nt(),d=r?.data?.members??[],[u,f]=z.useState(a?.title??""),[p,g]=z.useState(a?.description??""),[m,h]=z.useState(a?.status??"triage"),[b,D]=z.useState(a?.priority??"medium"),[j,N]=z.useState(a?.assigneeId??null),v=a?.dueDate;let T;e[0]!==v?(T=et(v),e[0]=v,e[1]=T):T=e[1];const[y,C]=z.useState(T),[Q,w]=z.useState(!1);let _;e[2]!==a?.assigneeId||e[3]!==a?.description||e[4]!==a?.dueDate||e[5]!==a?.priority||e[6]!==a?.status||e[7]!==a?.title||e[8]!==N||e[9]!==g||e[10]!==C?(_=()=>{f(a?.title??""),g(a?.description??""),h(a?.status??"triage"),D(a?.priority??"medium"),N(a?.assigneeId??null),C(et(a?.dueDate))},e[2]=a?.assigneeId,e[3]=a?.description,e[4]=a?.dueDate,e[5]=a?.priority,e[6]=a?.status,e[7]=a?.title,e[8]=N,e[9]=g,e[10]=C,e[11]=_):_=e[11];const O=_;let k;e[12]!==n||e[13]!==O?(k=()=>{n(),O()},e[12]=n,e[13]=O,e[14]=k):k=e[14];const E=k;let P;e[15]!==j||e[16]!==p||e[17]!==y||e[18]!==i||e[19]!==b||e[20]!==m||e[21]!==u?(P=()=>{const x=u.trim();x&&i({title:x,description:p.trim()||null,status:m,priority:b,assigneeId:j,dueDate:y?Kt(y):null})},e[15]=j,e[16]=p,e[17]=y,e[18]=i,e[19]=b,e[20]=m,e[21]=u,e[22]=P):P=e[22];const L=P;let F;e[23]!==j?(F=x=>x.userId===j,e[23]=j,e[24]=F):F=e[24];const R=d.find(F),A=kt;let I;e[25]!==E?(I=x=>!x&&E(),e[25]=E,e[26]=I):I=e[26];const $=_t,q="flex h-[85vh] max-h-[720px] flex-col gap-0 overflow-hidden p-0 sm:max-w-[820px]",S="hidden",De=a?"Edit task":"New task";let Y;e[27]!==De?(Y=s.jsx(zt,{className:"sr-only",children:De}),e[27]=De,e[28]=Y):Y=e[28];const dt="flex min-h-0 flex-1 flex-col overflow-y-auto",mt="flex flex-col gap-4 border-b border-border px-6 pt-6 pb-5";let Ce;e[29]===Symbol.for("react.memo_cache_sentinel")?(Ce=x=>f(x.target.value),e[29]=Ce):Ce=e[29];let G;e[30]!==u?(G=s.jsx("input",{value:u,onChange:Ce,placeholder:"Task title",autoFocus:!0,className:"w-full border-0 bg-transparent text-xl font-semibold text-foreground outline-none placeholder:text-muted-foreground/70"}),e[30]=u,e[31]=G):G=e[31];const ut="flex flex-wrap items-center gap-2",Me=U[m].icon,Pe=U[m];let Se;e[32]!==Me||e[33]!==Pe.iconClassName?(Se=s.jsx(Me,{size:13,className:Pe.iconClassName}),e[32]=Me,e[33]=Pe.iconClassName,e[34]=Se):Se=e[34];const Le=Se,Fe=U[m];let Te;e[35]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsx(Ae,{size:12,className:"text-muted-foreground"}),e[35]=Te):Te=e[35];let H;e[36]!==Le||e[37]!==Fe.label?(H=s.jsx(Ve,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[Le,Fe.label,Te]})}),e[36]=Le,e[37]=Fe.label,e[38]=H):H=e[38];let Ie;e[39]===Symbol.for("react.memo_cache_sentinel")?(Ie=s.jsx(We,{align:"start",className:"w-44",children:rt.map(x=>{const K=U[x].icon;return s.jsxs(Ee,{onSelect:()=>h(x),className:"gap-2",children:[s.jsx(K,{size:13,className:U[x].iconClassName}),U[x].label]},x)})}),e[39]=Ie):Ie=e[39];let J;e[40]!==H?(J=s.jsxs(Xe,{children:[H,Ie]}),e[40]=H,e[41]=J):J=e[41];const Re=ye[b];let V;e[42]!==Re.badgeClassName?(V=B("size-2 rounded-full",Re.badgeClassName),e[42]=Re.badgeClassName,e[43]=V):V=e[43];let W;e[44]!==V?(W=s.jsx("span",{className:V}),e[44]=V,e[45]=W):W=e[45];const Ke=ye[b];let we;e[46]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Ae,{size:12,className:"text-muted-foreground"}),e[46]=we):we=e[46];let X;e[47]!==W||e[48]!==Ke.label?(X=s.jsx(Ve,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[W,Ke.label,we]})}),e[47]=W,e[48]=Ke.label,e[49]=X):X=e[49];let _e;e[50]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsx(We,{align:"start",className:"w-40",children:Rt.map(x=>s.jsx(Ee,{onSelect:()=>D(x),children:ye[x].label},x))}),e[50]=_e):_e=e[50];let Z;e[51]!==X?(Z=s.jsxs(Xe,{children:[X,_e]}),e[51]=X,e[52]=Z):Z=e[52];const Ue=Xe,Qe=Ve,ft=!0,xt="button",gt="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",qe=R?s.jsx(Be,{url:R.user?.image??void 0,fallback:$e(R.user?.name),shape:"circle",size:"2xs"}):s.jsx(Mt,{size:13,className:"text-muted-foreground"}),Ye=R?.user?.name??"Unassigned";let ke;e[53]===Symbol.for("react.memo_cache_sentinel")?(ke=s.jsx(Ae,{size:12,className:"text-muted-foreground"}),e[53]=ke):ke=e[53];let ee;e[54]!==qe||e[55]!==Ye?(ee=s.jsxs("button",{type:xt,className:gt,children:[qe,Ye,ke]}),e[54]=qe,e[55]=Ye,e[56]=ee):ee=e[56];let te;e[57]!==Qe||e[58]!==ee?(te=s.jsx(Qe,{asChild:ft,children:ee}),e[57]=Qe,e[58]=ee,e[59]=te):te=e[59];let se;e[60]!==N?(se=s.jsx(Ee,{onSelect:()=>N(null),children:"Unassigned"}),e[60]=N,e[61]=se):se=e[61];let le;if(e[62]!==d||e[63]!==N){let x;e[65]!==N?(x=K=>s.jsxs(Ee,{onSelect:()=>N(K.userId),className:"gap-2",children:[s.jsx(Be,{url:K.user?.image??void 0,fallback:$e(K.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:K.user?.name??K.userId})]},K.userId),e[65]=N,e[66]=x):x=e[66],le=d.map(x),e[62]=d,e[63]=N,e[64]=le}else le=e[64];let ae;e[67]!==se||e[68]!==le?(ae=s.jsxs(We,{align:"start",className:"w-56",children:[se,le]}),e[67]=se,e[68]=le,e[69]=ae):ae=e[69];let ne;e[70]!==Ue||e[71]!==te||e[72]!==ae?(ne=s.jsxs(Ue,{children:[te,ae]}),e[70]=Ue,e[71]=te,e[72]=ae,e[73]=ne):ne=e[73];let ze;e[74]===Symbol.for("react.memo_cache_sentinel")?(ze=s.jsx(at,{size:13,className:"text-muted-foreground"}),e[74]=ze):ze=e[74];let oe;e[75]!==y?(oe=y?Ut.format(y):"Due date",e[75]=y,e[76]=oe):oe=e[76];let re;e[77]!==y||e[78]!==C?(re=y?s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-0.5 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:x=>{x.stopPropagation(),C(null)},onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),x.stopPropagation(),C(null))},children:s.jsx(Pt,{size:12})}):s.jsx(Ae,{size:12,className:"text-muted-foreground"}),e[77]=y,e[78]=C,e[79]=re):re=e[79];let ie;e[80]!==oe||e[81]!==re?(ie=s.jsx(Ot,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[ze,oe,re]})}),e[80]=oe,e[81]=re,e[82]=ie):ie=e[82];const Ge=y??void 0;let ce;e[83]!==C||e[84]!==w?(ce=x=>{C(x??null),x&&w(!1)},e[83]=C,e[84]=w,e[85]=ce):ce=e[85];let de;e[86]!==Ge||e[87]!==ce?(de=s.jsx(Et,{className:"w-auto p-0",align:"start",children:s.jsx($t,{mode:"single",selected:Ge,onSelect:ce,initialFocus:!0})}),e[86]=Ge,e[87]=ce,e[88]=de):de=e[88];let me;e[89]!==Q||e[90]!==w||e[91]!==ie||e[92]!==de?(me=s.jsxs(At,{open:Q,onOpenChange:w,children:[ie,de]}),e[89]=Q,e[90]=w,e[91]=ie,e[92]=de,e[93]=me):me=e[93];let ue;e[94]!==J||e[95]!==Z||e[96]!==ne||e[97]!==me?(ue=s.jsxs("div",{className:ut,children:[J,Z,ne,me]}),e[94]=J,e[95]=Z,e[96]=ne,e[97]=me,e[98]=ue):ue=e[98];let fe;e[99]!==G||e[100]!==ue?(fe=s.jsxs("div",{className:mt,children:[G,ue]}),e[99]=G,e[100]=ue,e[101]=fe):fe=e[101];let xe;e[102]!==g?(xe=x=>g(x.target.value),e[102]=g,e[103]=xe):xe=e[103];let ge;e[104]!==p||e[105]!==xe?(ge=s.jsx("div",{className:"flex flex-1 flex-col px-6 py-5",children:s.jsx("textarea",{value:p,onChange:xe,placeholder:"Add a description…",className:"min-h-[320px] w-full flex-1 resize-none border-0 bg-transparent text-sm leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/70"})}),e[104]=p,e[105]=xe,e[106]=ge):ge=e[106];let pe;e[107]!==fe||e[108]!==ge?(pe=s.jsxs("div",{className:dt,children:[fe,ge]}),e[107]=fe,e[108]=ge,e[109]=pe):pe=e[109];let be;e[110]!==a||e[111]!==c?(be=a&&c&&s.jsx(Ze,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"text-muted-foreground hover:text-destructive",onClick:c,children:s.jsx(Bt,{size:14})}),e[110]=a,e[111]=c,e[112]=be):be=e[112];let he;e[113]!==o||e[114]!==u?(he=!u.trim()||o,e[113]=o,e[114]=u,e[115]=he):he=e[115];const He=a?"Save":"Create task";let Ne;e[116]!==L||e[117]!==he||e[118]!==He?(Ne=s.jsx(Ze,{size:"sm",className:"ml-auto",disabled:he,onClick:L,children:He}),e[116]=L,e[117]=he,e[118]=He,e[119]=Ne):Ne=e[119];let je;e[120]!==be||e[121]!==Ne?(je=s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-6 py-3",children:[be,Ne]}),e[120]=be,e[121]=Ne,e[122]=je):je=e[122];let ve;e[123]!==$||e[124]!==Y||e[125]!==pe||e[126]!==je?(ve=s.jsxs($,{className:q,closeButtonClassName:S,children:[Y,pe,je]}),e[123]=$,e[124]=Y,e[125]=pe,e[126]=je,e[127]=ve):ve=e[127];let Oe;return e[128]!==A||e[129]!==l||e[130]!==ve||e[131]!==I?(Oe=s.jsx(A,{open:l,onOpenChange:I,children:ve}),e[128]=A,e[129]=l,e[130]=ve,e[131]=I,e[132]=Oe):Oe=e[132],Oe}function qt(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(ct,{})})})}),t[0]=e):e=t[0],e}const Yt=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function it(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:Yt.format(e),overdue:l}}function Gt(t){const e=M.c(8),{iso:l}=t;let n;e[0]!==l?(n=it(l),e[0]=l,e[1]=n):n=e[1];const{label:a,overdue:i}=n,c=i?"bg-red-500/10 text-red-600":"bg-muted text-muted-foreground";let o;e[2]!==c?(o=B("inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[10px]",c),e[2]=c,e[3]=o):o=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(at,{size:10}),e[4]=r):r=e[4];let d;return e[5]!==a||e[6]!==o?(d=s.jsxs("span",{className:o,children:[r,a]}),e[5]=a,e[6]=o,e[7]=d):d=e[7],d}function ct(){const t=M.c(45),{items:e,isLoading:l}=Lt(),n=Ft(),{data:a}=nt();let i;if(t[0]!==a?.data?.members){const S=a?.data?.members??[];i=new Map(S.map(Ht)),t[0]=a?.data?.members,t[1]=i}else i=t[1];const c=i,[o,r]=z.useState("board"),[d,u]=z.useState(!1),[f,p]=z.useState(null);let g;t[2]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{p(null),u(!0)},t[2]=g):g=t[2];const m=g;let h;t[3]===Symbol.for("react.memo_cache_sentinel")?(h=S=>{p(S),u(!0)},t[3]=h):h=t[3];const b=h;if(l&&e.length===0){let S;return t[4]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(ht,{size:20,className:"animate-spin text-muted-foreground"})}),t[4]=S):S=t[4],S}const D=o==="board"?"max-w-[1400px]":"max-w-[900px]";let j;t[5]!==D?(j=B("mx-auto flex w-full flex-col gap-6 px-10 pt-10 pb-16",D),t[5]=D,t[6]=j):j=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Tasks"}),t[7]=N):N=t[7];let v;t[8]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs(Ze,{size:"sm",onClick:m,children:[s.jsx(Dt,{size:16}),"New task"]}),t[8]=v):v=t[8];const T=o==="list";let y;t[9]===Symbol.for("react.memo_cache_sentinel")?(y=()=>r("list"),t[9]=y):y=t[9];let C;t[10]!==T?(C=s.jsx(tt,{active:T,onClick:y,icon:yt,label:"List"}),t[10]=T,t[11]=C):C=t[11];const Q=o==="board";let w;t[12]===Symbol.for("react.memo_cache_sentinel")?(w=()=>r("board"),t[12]=w):w=t[12];let _;t[13]!==Q?(_=s.jsx(tt,{active:Q,onClick:w,icon:vt,label:"Board"}),t[13]=Q,t[14]=_):_=t[14];let O;t[15]!==_||t[16]!==C?(O=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[v,s.jsxs("div",{className:"ml-auto inline-flex rounded-lg bg-muted p-0.5",children:[C,_]})]}),t[15]=_,t[16]=C,t[17]=O):O=t[17];let k;t[18]!==n.update||t[19]!==e||t[20]!==o||t[21]!==c?(k=e.length===0?s.jsx("div",{className:"rounded-xl border border-border bg-card px-4 py-12 text-center text-sm text-muted-foreground",children:"No tasks yet. Start one with New task."}):o==="board"?s.jsx(Jt,{items:e,memberByUserId:c,onOpen:b,onMove:(S,De)=>n.update.mutate({id:S,status:De})}):s.jsx("div",{className:"flex flex-col gap-2",children:e.map(S=>s.jsx(Wt,{item:S,assignee:S.assigneeId?c.get(S.assigneeId):void 0,onOpen:()=>b(S)},S.id))}),t[18]=n.update,t[19]=e,t[20]=o,t[21]=c,t[22]=k):k=t[22];let E;t[23]!==O||t[24]!==k||t[25]!==j?(E=s.jsxs("div",{className:j,children:[N,O,k]}),t[23]=O,t[24]=k,t[25]=j,t[26]=E):E=t[26];const P=d?f?.id??"new":"closed";let L;t[27]===Symbol.for("react.memo_cache_sentinel")?(L=()=>u(!1),t[27]=L):L=t[27];const F=f??void 0,R=n.create.isPending||n.update.isPending;let A;t[28]!==n.create||t[29]!==n.update||t[30]!==f?(A=S=>{f?n.update.mutate({id:f.id,...S}):n.create.mutate(S),u(!1)},t[28]=n.create,t[29]=n.update,t[30]=f,t[31]=A):A=t[31];let I;t[32]!==n.remove||t[33]!==f?(I=f?()=>{n.remove.mutate(f.id),u(!1)}:void 0,t[32]=n.remove,t[33]=f,t[34]=I):I=t[34];let $;t[35]!==d||t[36]!==P||t[37]!==F||t[38]!==R||t[39]!==A||t[40]!==I?($=s.jsx(Qt,{open:d,onClose:L,item:F,isSaving:R,onSubmit:A,onDelete:I},P),t[35]=d,t[36]=P,t[37]=F,t[38]=R,t[39]=A,t[40]=I,t[41]=$):$=t[41];let q;return t[42]!==E||t[43]!==$?(q=s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[E,$]}),t[42]=E,t[43]=$,t[44]=q):q=t[44],q}function Ht(t){return[t.userId,t]}function tt(t){const e=M.c(11),{active:l,onClick:n,icon:a,label:i}=t,c=`${i} view`,o=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let r;e[0]!==o?(r=B("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",o),e[0]=o,e[1]=r):r=e[1];let d;e[2]!==a?(d=s.jsx(a,{size:14}),e[2]=a,e[3]=d):d=e[3];let u;return e[4]!==l||e[5]!==i||e[6]!==n||e[7]!==c||e[8]!==r||e[9]!==d?(u=s.jsxs("button",{type:"button",onClick:n,"aria-label":c,"aria-pressed":l,className:r,children:[d,i]}),e[4]=l,e[5]=i,e[6]=n,e[7]=c,e[8]=r,e[9]=d,e[10]=u):u=e[10],u}function Jt(t){const e=M.c(8),{items:l,memberByUserId:n,onOpen:a,onMove:i}=t,[c,o]=z.useState(null);let r;e[0]!==l||e[1]!==n||e[2]!==i||e[3]!==a||e[4]!==c?(r=rt.map(u=>{const f=l.filter(m=>m.status===u),p=U[u],g=p.icon;return s.jsxs("div",{onDragOver:m=>{m.preventDefault(),o(u)},onDragLeave:m=>{m.currentTarget.contains(m.relatedTarget)||o(null)},onDrop:m=>{m.preventDefault();const h=m.dataTransfer.getData("text/plain");h&&i(h,u),o(null)},className:B("flex flex-col rounded-xl p-1 transition-colors",c===u&&"bg-muted/50"),children:[s.jsxs("div",{className:"flex items-center gap-2 p-2",children:[s.jsx(g,{size:14,className:B("shrink-0",p.iconClassName)}),s.jsx("span",{className:"text-xs text-foreground",children:p.label}),s.jsx("span",{className:"text-[11px] text-muted-foreground",children:f.length})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2",children:f.map(m=>s.jsx(Vt,{item:m,assignee:m.assigneeId?n.get(m.assigneeId):void 0,onOpen:()=>a(m)},m.id))})]},u)}),e[0]=l,e[1]=n,e[2]=i,e[3]=a,e[4]=c,e[5]=r):r=e[5];let d;return e[6]!==r?(d=s.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-5",children:r}),e[6]=r,e[7]=d):d=e[7],d}function Vt(t){const e=M.c(44),{item:l,assignee:n,onOpen:a}=t,i=ye[l.priority];let c,o,r,d,u,f,p,g,m,h;if(e[0]!==n||e[1]!==l.dueDate||e[2]!==l.id||e[3]!==l.title||e[4]!==a||e[5]!==i.badgeClassName||e[6]!==i.label){const j=l.dueDate?it(l.dueDate):null;u="button",f=!0,e[17]!==l.id?(p=y=>{y.dataTransfer.setData("text/plain",l.id),y.dataTransfer.effectAllowed="move"},e[17]=l.id,e[18]=p):p=e[18],g=a,m="flex cursor-grab flex-col gap-1.5 rounded-[10px] border border-border bg-card px-3 py-2.5 text-left transition-colors hover:border-ring/40 active:cursor-grabbing",h=l.title;let N;e[19]!==l.title?(N=s.jsx("span",{className:"min-w-0 flex-1 truncate text-[12px] font-medium leading-snug text-foreground",children:l.title}),e[19]=l.title,e[20]=N):N=e[20];let v;e[21]!==n?(v=n&&s.jsx(Be,{url:n.user?.image??void 0,fallback:$e(n.user?.name),shape:"circle",size:"2xs"}),e[21]=n,e[22]=v):v=e[22],e[23]!==N||e[24]!==v?(o=s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[N,v]}),e[23]=N,e[24]=v,e[25]=o):o=e[25],c="flex items-center justify-between gap-2";let T;e[26]!==i.badgeClassName?(T=B("inline-flex items-center rounded-md px-1.5 py-0.5 text-[10px] font-medium",i.badgeClassName),e[26]=i.badgeClassName,e[27]=T):T=e[27],e[28]!==i.label||e[29]!==T?(r=s.jsx("span",{className:T,children:i.label}),e[28]=i.label,e[29]=T,e[30]=r):r=e[30],d=j&&s.jsx("span",{className:B("text-[11px] text-muted-foreground",j.overdue&&"text-red-600"),children:j.label}),e[0]=n,e[1]=l.dueDate,e[2]=l.id,e[3]=l.title,e[4]=a,e[5]=i.badgeClassName,e[6]=i.label,e[7]=c,e[8]=o,e[9]=r,e[10]=d,e[11]=u,e[12]=f,e[13]=p,e[14]=g,e[15]=m,e[16]=h}else c=e[7],o=e[8],r=e[9],d=e[10],u=e[11],f=e[12],p=e[13],g=e[14],m=e[15],h=e[16];let b;e[31]!==c||e[32]!==r||e[33]!==d?(b=s.jsxs("div",{className:c,children:[r,d]}),e[31]=c,e[32]=r,e[33]=d,e[34]=b):b=e[34];let D;return e[35]!==o||e[36]!==b||e[37]!==u||e[38]!==f||e[39]!==p||e[40]!==g||e[41]!==m||e[42]!==h?(D=s.jsxs("button",{type:u,draggable:f,onDragStart:p,onClick:g,className:m,title:h,children:[o,b]}),e[35]=o,e[36]=b,e[37]=u,e[38]=f,e[39]=p,e[40]=g,e[41]=m,e[42]=h,e[43]=D):D=e[43],D}function Wt(t){const e=M.c(28),{item:l,assignee:n,onOpen:a}=t,i=U[l.status],c=i.icon;let o;e[0]!==i.iconClassName?(o=B("shrink-0",i.iconClassName),e[0]=i.iconClassName,e[1]=o):o=e[1];let r;e[2]!==c||e[3]!==o?(r=s.jsx(c,{size:15,className:o}),e[2]=c,e[3]=o,e[4]=r):r=e[4];let d;e[5]!==l.title?(d=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l.title}),e[5]=l.title,e[6]=d):d=e[6];const u=ye[l.priority];let f;e[7]!==u.badgeClassName?(f=B("shrink-0 text-[10px]",u.badgeClassName),e[7]=u.badgeClassName,e[8]=f):f=e[8];const p=ye[l.priority];let g;e[9]!==f||e[10]!==p.label?(g=s.jsx(Nt,{className:f,children:p.label}),e[9]=f,e[10]=p.label,e[11]=g):g=e[11];let m;e[12]!==l.dueDate?(m=l.dueDate&&s.jsx(Gt,{iso:l.dueDate}),e[12]=l.dueDate,e[13]=m):m=e[13];let h;e[14]!==n?(h=n&&s.jsx(Be,{url:n.user?.image??void 0,fallback:$e(n.user?.name),shape:"circle",size:"2xs"}),e[14]=n,e[15]=h):h=e[15];let b;e[16]!==l.createdAt?(b=Ct(new Date(l.createdAt)),e[16]=l.createdAt,e[17]=b):b=e[17];let D;e[18]!==b?(D=s.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground/70",children:b}),e[18]=b,e[19]=D):D=e[19];let j;return e[20]!==a||e[21]!==D||e[22]!==r||e[23]!==d||e[24]!==g||e[25]!==m||e[26]!==h?(j=s.jsxs("button",{type:"button",onClick:a,className:"flex items-center gap-3 rounded-xl border border-border bg-card px-4 py-3 text-left transition-colors hover:border-ring/40",children:[r,d,g,m,h,D]}),e[20]=a,e[21]=D,e[22]=r,e[23]=d,e[24]=g,e[25]=m,e[26]=h,e[27]=j):j=e[27],j}const js=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:ct,default:qt},Symbol.toStringTag,{value:"Module"}));export{ye as P,U as S,Qt as T,Ft as a,ct as b,js as i,Lt as u};
@@ -1 +0,0 @@
1
- import{r as n,aU as P,dL as R,cM as Ee,cO as ke,cQ as Se,bP as xe,dM as V}from"./index-Cvg8wlf2.js";var de=1,Ie=.9,Ce=.8,Re=.17,Y=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Y&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Y>h&&(h=x*Y)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var L='[cmdk-group=""]',_='[cmdk-group-items=""]',Pe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",qe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),j=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:z=!1,vimBindings:A=!0,...O}=t,H=P(),ne=P(),N=P(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:qe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;q().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${L}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=q().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(L))==null?void 0:o.querySelector(Pe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function q(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function Q(e){let o=q()[e];o&&k.setState("value",o.getAttribute(F))}function X(e){var o;let s=D(),a=q(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(L),a;for(;s&&!a;)s=e>0?Ne(s,L):Te(s,L),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):X(e)}let ie=()=>Q(q().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):X(1)},ce=e=>{e.preventDefault(),e.metaKey?Q(0):e.altKey?ue(-1):X(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),Q(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),U(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Le=n.forwardRef((t,l)=>{var r,f;let u=P(),c=n.useRef(null),d=n.useContext(ge),v=j(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;z(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function z(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:V(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:z,onClick:A?void 0:I},t.children)}),Ve=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=P(),v=n.useRef(null),b=n.useRef(null),i=P(),p=j(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:V(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),U(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),je=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:V(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=j();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=j();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:V(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},U(t,i=>n.createElement("div",{ref:V(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),Ue=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),ze=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},U(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Xe=Object.assign(be,{List:Be,Item:Le,Input:Oe,Group:Ve,Separator:je,Dialog:Ue,Empty:ze,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=j();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function U({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Xe as _};
@@ -1,3 +0,0 @@
1
- import{I as M,r as N,a4 as R,n as L,a as V,M as B,d as K,R as p,t as c,K as j,j as s,B as C}from"./index-Cvg8wlf2.js";import{e as O,b as q,d as z,D as Q,a as k,c as H}from"./dialog-WQh-gp8S.js";import{a as U,F as b,b as v,c as Y,d as w,e as S}from"./form-ChRNwWXa.js";import{S as G,a as J,b as W,c as X,d as Z}from"./select-CIDMHDRe.js";import{T as _}from"./textarea-CZTZGoFe.js";import{u as ee}from"./use-org-auth-client-BAZD-XfS.js";import{u as se}from"./use-organization-roles-Bnjh1LPW.js";const te=M().email("Invalid email address");function ne(r){if(!r.trim())return[];const m=r.split(/[,;\n]/).map(a=>a.trim().toLowerCase()).filter(a=>a.length>0);return Array.from(new Set(m))}function de({trigger:r}){const[m,a]=N.useState(!1),{locator:g}=R(),E=ee(),x=L(),{data:F}=V.useSession(),f=F?.user?.email,{roles:P,isLoading:y}=se(),T=P.filter(t=>t.role!=="owner"),i=B({mode:"onChange",defaultValues:{emailsText:"",role:"user"}}),$=i.watch("emailsText"),I=i.watch("role"),l=ne($).filter(t=>{const e=te.safeParse(t).success,n=!f||t!==f.toLowerCase();return e&&n}),o=K({mutationFn:async({emails:t,role:e})=>{if(!e)throw new Error("Please select a role");const n=await Promise.allSettled(t.map(async d=>{const h=await E.organization.inviteMember({email:d,role:e});if(h.error)throw new Error(h.error.message);return h.data})),u=n.filter(d=>d.status==="rejected");if(u.length>0)throw new Error(`Failed to invite ${u.length} member${u.length>1?"s":""}`);return n},onSuccess:(t,{emails:e,role:n})=>{p("member_invited",{count:e.length,role:n}),x.invalidateQueries({queryKey:j.members(g)}),x.invalidateQueries({queryKey:j.invitations(g)}),c.success(e.length===1?"Member invited successfully!":`${e.length} members invited successfully!`),i.reset({emailsText:"",role:"user"}),a(!1)},onError:(t,{emails:e,role:n})=>{p("member_invite_failed",{count:e.length,role:n,error:t instanceof Error?t.message:String(t)}),c.error(t instanceof Error?t.message:"Failed to invite members")}}),A=t=>{if(l.length===0){c.error("Please enter at least one valid email address");return}if(!t.role){c.error("Please select a role");return}o.mutate({emails:l,role:t.role})},D=l.length>0&&!!I;return s.jsxs(O,{open:m,onOpenChange:a,children:[s.jsx(q,{asChild:!0,children:r}),s.jsxs(z,{className:"sm:max-w-lg",children:[s.jsx(Q,{children:s.jsx(k,{children:"Invite members"})}),s.jsx(U,{...i,children:s.jsxs("form",{onSubmit:i.handleSubmit(A),className:"space-y-4",children:[s.jsx(b,{control:i.control,name:"emailsText",render:({field:t})=>s.jsxs(v,{children:[s.jsx(Y,{children:"Email addresses"}),s.jsx(w,{children:s.jsx(_,{...t,disabled:o.isPending,placeholder:`Enter email addresses separated by commas or new lines
2
- e.g. user1@example.com, user2@example.com
3
- or one per line`,className:"min-h-[120px] resize-none"})}),s.jsx(S,{})]})}),s.jsx(b,{control:i.control,name:"role",render:({field:t})=>s.jsxs(v,{children:[s.jsx(w,{children:s.jsxs(G,{value:t.value,onValueChange:t.onChange,disabled:o.isPending||y,children:[s.jsx(J,{className:"w-full",children:s.jsx(W,{placeholder:"Select a role"})}),s.jsx(X,{children:T.map(e=>{const n=[];return e.isBuiltin||(e.allowsAllStaticPermissions?n.push("Full org access"):e.staticPermissionCount&&e.staticPermissionCount>0&&n.push(`${e.staticPermissionCount} org perm${e.staticPermissionCount!==1?"s":""}`),e.allowsAllConnections?n.push("All connections"):e.connectionCount&&e.connectionCount>0&&n.push(`${e.connectionCount} connection${e.connectionCount!==1?"s":""}`),(e.connectionCount!==0||e.allowsAllConnections)&&(e.allowsAllTools?n.push("all tools"):e.toolCount&&e.toolCount>0&&n.push(`${e.toolCount} tool${e.toolCount!==1?"s":""}`))),s.jsx(Z,{value:e.role,children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:e.label}),!e.isBuiltin&&n.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:n.join(", ")})]})},e.role)})})]})}),s.jsx(S,{})]})}),s.jsxs(H,{children:[s.jsx(C,{variant:"outline",onClick:()=>{i.reset({emailsText:"",role:"user"}),a(!1)},type:"button",disabled:o.isPending,children:"Cancel"}),s.jsx(C,{type:"submit",disabled:o.isPending||!D,children:o.isPending?"Inviting...":`Invite ${l.length||0} Member${l.length!==1?"s":""}`})]})]})})]})]})}export{de as I};
@@ -1 +0,0 @@
1
- import{c as G,j as s,B as ze,a4 as pe,P as Mt,n as Qe,d as Me,K as ce,t as oe,m as Ct,r as re,l as ke,i as Xe,U as Rt,R as Re}from"./index-Cvg8wlf2.js";import{C as zt}from"./collection-display-button-CYSdyqyD.js";import{S as Pt}from"./search-input-Bu2qiTLD.js";import{P as Ae}from"./index-CF7vJTQ1.js";import{C as Et}from"./collection-table-wrapper-DVD9VKmA.js";import{E as We}from"./empty-state-NAWKd2m2.js";import{I as kt}from"./invite-member-dialog-zkg9eKXe.js";import{b as Dt,S as $t,a as Ot}from"./settings-section-D69S9E0I.js";import{u as qt,a as Lt}from"./use-join-requests-BrIr_7zB.js";import{A as De}from"./avatar-BYTTt2km.js";import{f as Ft}from"./format-time-BnbuEtat.js";import{g as Ve}from"./get-initials-D-f_fDFw.js";import{u as Bt}from"./use-members-BRkIKC2W.js";import{u as $e}from"./studio-tools-BgAyimPw.js";import{u as yt}from"./use-org-auth-client-BAZD-XfS.js";import{u as Kt}from"./use-organization-roles-Bnjh1LPW.js";import{a as Vt,b as Qt,c as Ut,T as Gt}from"./tooltip-CiXxbAOc.js";import{a as st,e as nt,g as it,b as at,c as lt,d as ot,A as rt,f as ct}from"./alert-dialog-DBB5CaN8.js";import{B as Ue}from"./badge-CUmMlsBT.js";import{C as mt}from"./card-BKGavoj3.js";import{D as St,a as Nt,c as wt,e as Jt,f as Ht,g as Wt,d as et,j as Yt}from"./dropdown-menu-D4PeOhjt.js";import{i as _t}from"./DotsVertical-C9eUzaCG.js";import{i as Zt}from"./Key01-DJNC5dou.js";import{i as Xt}from"./Shield01-CA1C0PT_.js";import{a as es}from"./SwitchHorizontal01-_8RyBCsb.js";import{s as ts}from"./Trash01-BaM_ljKo.js";import{s as Tt}from"./XClose-BAeGDKN0.js";import{b as dt,a as ut,d as ft,c as pt,S as ht}from"./select-CIDMHDRe.js";import{C as gt}from"./checkbox-Ckmw9Mfi.js";import{e as Ye,a as Ze,f as xt,C as ss,c as ns,d as is,b as as}from"./command-C07_gdqU.js";import{a as ls,b as os,P as rs}from"./popover-BWgdS4nk.js";import{t as cs}from"./ChevronDown-CBLc4m6w.js";import{s as ms}from"./Plus-CdBUTSrl.js";import{R as ds}from"./require-capability-CCYSfrX4.js";import"./ArrowUp-D9-IQ-Jm.js";import"./Check-BJiMMf7v.js";import"./List-C-Y7abIw.js";import"./view-mode-toggle-B7cgUSvO.js";import"./SearchMd-CPb906Aj.js";import"./sidebar-DqxxQz6a.js";import"./LayoutLeft-CurO7lkf.js";import"./use-mobile-DE9td55c.js";import"./X-B6q2eNkF.js";import"./table-BmCQne9U.js";import"./dialog-WQh-gp8S.js";import"./form-ChRNwWXa.js";import"./label-pwPiXf8V.js";import"./textarea-CZTZGoFe.js";import"./ArrowUpRight-zrEVpN9d.js";import"./use-capability-BigpWO7w.js";import"./User01-CwCos6Py.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ChevronRight-BjHi2zTb.js";import"./Circle--mEsLc32.js";import"./ChevronUp-DmNuFMik.js";import"./index-ssrb4176.js";import"./access-gate-BHgO0o7t.js";import"./capability-load-error-B_5imwHQ.js";function us(){const t=G.c(9),e=qt(),{approve:n,deny:l}=Lt();if(e.length===0)return null;let i;if(t[0]!==n||t[1]!==l||t[2]!==e){let o;t[4]!==n||t[5]!==l?(o=r=>s.jsx(Dt,{icon:s.jsx(De,{url:r.user?.image??void 0,fallback:(r.user?.name??r.user?.email??"?").charAt(0).toUpperCase(),shape:"circle",size:"sm"}),title:r.user?.name??r.user?.email??r.userId,description:r.user?.email,action:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ze,{size:"sm",variant:"outline",onClick:()=>l.mutate(r.id),disabled:l.isPending||n.isPending,children:"Deny"}),s.jsx(ze,{size:"sm",onClick:()=>n.mutate(r.id),disabled:n.isPending||l.isPending,children:"Approve"})]})},r.id),t[4]=n,t[5]=l,t[6]=o):o=t[6],i=e.map(o),t[0]=n,t[1]=l,t[2]=e,t[3]=i}else i=t[3];let a;return t[7]!==i?(a=s.jsx($t,{title:"Join requests",description:"People who requested to join via a domain in approval mode.",children:s.jsx(Ot,{children:i})}),t[7]=i,t[8]=a):a=t[8],a}function fs(){const t=G.c(7),{locator:e}=pe(),n=$e();let l;t[0]!==e?(l=ce.invitations(e),t[0]=e,t[1]=l):l=t[1];let i;t[2]!==n?(i=async()=>(await n.call("ORGANIZATION_GET",{}))?.invitations??[],t[2]=n,t[3]=i):i=t[3];let a;return t[4]!==l||t[5]!==i?(a={queryKey:l,queryFn:i},t[4]=l,t[5]=i,t[6]=a):a=t[6],Mt(a)}function ps(){const t=G.c(10),{locator:e}=pe(),n=yt(),l=Qe();let i;t[0]!==n?(i=async f=>{const g=await n.organization.cancelInvitation({invitationId:f});if(g?.error)throw new Error(g.error.message);return g.data},t[0]=n,t[1]=i):i=t[1];let a;t[2]!==e||t[3]!==l?(a=()=>{l.invalidateQueries({queryKey:ce.invitations(e)}),oe.success("Invitation cancelled")},t[2]=e,t[3]=l,t[4]=a):a=t[4];let o;t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:hs},t[5]=i,t[6]=a,t[7]=o):o=t[7];const r=Me(o);let u;return t[8]!==r?(u={cancel:r},t[8]=r,t[9]=u):u=t[9],u}function hs(t){oe.error(t instanceof Error?t.message:"Failed to cancel invitation")}function gs(){const t=G.c(7),{locator:e}=pe(),n=$e();let l;t[0]!==e?(l=ce.tags(e),t[0]=e,t[1]=l):l=t[1];let i;t[2]!==n?(i=async()=>{const{tags:o}=await n.call("TAGS_LIST",{});return o},t[2]=n,t[3]=i):i=t[3];let a;return t[4]!==l||t[5]!==i?(a={queryKey:l,queryFn:i,staleTime:3e4},t[4]=l,t[5]=i,t[6]=a):a=t[6],Ct(a)}function xs(){const t=G.c(8),e=Qe(),{locator:n}=pe(),l=$e();let i;t[0]!==l?(i=async r=>{const{tag:u}=await l.call("TAGS_CREATE",{name:r});return u},t[0]=l,t[1]=i):i=t[1];let a;t[2]!==n||t[3]!==e?(a=()=>{e.invalidateQueries({queryKey:ce.tags(n)})},t[2]=n,t[3]=e,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:bs},t[5]=i,t[6]=a,t[7]=o):o=t[7],Me(o)}function bs(t){oe.error(t instanceof Error?t.message:"Failed to create tag")}function js(t){const e=G.c(10),{locator:n}=pe(),l=$e();let i;e[0]!==n||e[1]!==t?(i=ce.memberTags(n,t),e[0]=n,e[1]=t,e[2]=i):i=e[2];let a;e[3]!==t||e[4]!==l?(a=async()=>{const{tags:u}=await l.call("MEMBER_TAGS_GET",{memberId:t});return u},e[3]=t,e[4]=l,e[5]=a):a=e[5];const o=!!t;let r;return e[6]!==i||e[7]!==a||e[8]!==o?(r={queryKey:i,queryFn:a,staleTime:3e4,enabled:o},e[6]=i,e[7]=a,e[8]=o,e[9]=r):r=e[9],Ct(r)}function vs(){const t=G.c(8),e=Qe(),{locator:n}=pe(),l=$e();let i;t[0]!==l?(i=async r=>{const{memberId:u,tagIds:f}=r;return await l.call("MEMBER_TAGS_SET",{memberId:u,tagIds:f})},t[0]=l,t[1]=i):i=t[1];let a;t[2]!==n||t[3]!==e?(a=(r,u)=>{e.invalidateQueries({queryKey:ce.memberTags(n,u.memberId)})},t[2]=n,t[3]=e,t[4]=a):a=t[4];let o;return t[5]!==i||t[6]!==a?(o={mutationFn:i,onSuccess:a,onError:Cs},t[5]=i,t[6]=a,t[7]=o):o=t[7],Me(o)}function Cs(t){oe.error(t instanceof Error?t.message:"Failed to update member tags")}function It(t){const e=G.c(44),{memberId:n,className:l,disabled:i,placeholder:a,maxDisplay:o}=t,r=i===void 0?!1:i,u=a===void 0?"Add tags...":a,f=o===void 0?2:o,[g,b]=re.useState(!1),[p,I]=re.useState(""),{data:M,isLoading:j}=gs(),D=M===void 0?[]:M,{data:v,isLoading:$}=js(n),C=v===void 0?[]:v,E=xs(),N=vs(),R=j||$,S=C.map(Ss);let z;e[0]!==p?(z=x=>x.name.toLowerCase().includes(p.toLowerCase()),e[0]=p,e[1]=z):z=e[1];const A=D.filter(z);let y;e[2]!==p?(y=x=>x.name.toLowerCase()===p.toLowerCase(),e[2]=p,e[3]=y):y=e[3];const K=D.find(y),w=p.trim()&&!K,k=async x=>{const fe=S.includes(x.id)?S.filter(xe=>xe!==x.id):[...S,x.id];await N.mutateAsync({memberId:n,tagIds:fe})},_=async()=>{if(!p.trim())return;const x=await E.mutateAsync(p.trim());await N.mutateAsync({memberId:n,tagIds:[...S,x.id]}),I("")},c=async x=>{const se=S.filter(fe=>fe!==x);await N.mutateAsync({memberId:n,tagIds:se})},h=E.isPending||N.isPending,L=os;let P;e[4]!==g?(P=()=>b(!g),e[4]=g,e[5]=P):P=e[5];let O;e[6]!==l?(O=ke("h-auto min-h-8 px-2 py-1 justify-start font-normal","hover:bg-accent/50",l),e[6]=l,e[7]=O):O=e[7];const V=r||R,q=R?s.jsx(Xe,{size:14,className:"animate-spin text-muted-foreground"}):C.length>0?s.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[C.slice(0,f).map(ys),C.length>f&&s.jsxs(Ue,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:["+",C.length-f]})]}):s.jsx("span",{className:"text-muted-foreground text-xs",children:u});let Q;e[8]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(cs,{size:14,className:"ml-1 shrink-0 opacity-50"}),e[8]=Q):Q=e[8];let F;e[9]!==V||e[10]!==q||e[11]!==P||e[12]!==O?(F=s.jsx(rs,{asChild:!0,children:s.jsxs(ze,{variant:"ghost",size:"sm",onClick:P,className:O,disabled:V,children:[q,Q]})}),e[9]=V,e[10]=q,e[11]=P,e[12]=O,e[13]=F):F=e[13];const U=ls,J="w-56 p-0",H="start";let W;e[14]===Symbol.for("react.memo_cache_sentinel")?(W=()=>b(!1),e[14]=W):W=e[14];const ne=is,he=!1;let Y;e[15]!==p?(Y=s.jsx(as,{placeholder:"Search or create...",value:p,onValueChange:I,className:"h-9"}),e[15]=p,e[16]=Y):Y=e[16];const ie=ns,me=C.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(Ye,{heading:"Selected",children:C.map(x=>s.jsx(Ze,{onSelect:()=>k(x),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gt,{checked:!0,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:x.name})]}),s.jsx("button",{onClick:se=>{se.stopPropagation(),c(x.id)},className:"opacity-50 hover:opacity-100",disabled:h,children:s.jsx(Tt,{size:14})})]})},x.id))}),s.jsx(xt,{})]}),Pe=Ye,ge="Available",Ee=A.length===0&&!w&&s.jsx(ss,{children:"No tags found."}),ue=A.filter(x=>!S.includes(x.id)).map(x=>s.jsx(Ze,{onSelect:()=>k(x),className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gt,{checked:!1,className:"[&_svg]:!text-primary-foreground"}),s.jsx("span",{children:x.name})]})},x.id));let ae;e[17]!==Pe||e[18]!==Ee||e[19]!==ue?(ae=s.jsxs(Pe,{heading:ge,children:[Ee,ue]}),e[17]=Pe,e[18]=Ee,e[19]=ue,e[20]=ae):ae=e[20];let le;e[21]!==_||e[22]!==h||e[23]!==p||e[24]!==w?(le=w&&s.jsxs(s.Fragment,{children:[s.jsx(xt,{}),s.jsx(Ye,{children:s.jsx(Ze,{onSelect:_,className:"cursor-pointer",disabled:h,children:s.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[h?s.jsx(Xe,{size:14,className:"animate-spin"}):s.jsx(ms,{size:14}),s.jsxs("span",{children:['Create "',p.trim(),'"']})]})})})]}),e[21]=_,e[22]=h,e[23]=p,e[24]=w,e[25]=le):le=e[25];let Z;e[26]!==ie||e[27]!==me||e[28]!==ae||e[29]!==le?(Z=s.jsxs(ie,{children:[me,ae,le]}),e[26]=ie,e[27]=me,e[28]=ae,e[29]=le,e[30]=Z):Z=e[30];let X;e[31]!==ne||e[32]!==Y||e[33]!==Z?(X=s.jsxs(ne,{shouldFilter:he,children:[Y,Z]}),e[31]=ne,e[32]=Y,e[33]=Z,e[34]=X):X=e[34];let ee;e[35]!==U||e[36]!==W||e[37]!==X?(ee=s.jsx(U,{className:J,align:H,onEscapeKeyDown:W,children:X}),e[35]=U,e[36]=W,e[37]=X,e[38]=ee):ee=e[38];let te;return e[39]!==L||e[40]!==g||e[41]!==F||e[42]!==ee?(te=s.jsxs(L,{open:g,onOpenChange:b,children:[F,ee]}),e[39]=L,e[40]=g,e[41]=F,e[42]=ee,e[43]=te):te=e[43],te}function ys(t){return s.jsx(Ue,{variant:"secondary",className:"text-xs px-1.5 py-0 h-5",children:t.name},t.id)}function Ss(t){return t.id}const bt=["bg-neutral-400","bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500","bg-slate-500"],Ns={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function ws(t){const e=new Map;for(const[n,l]of Object.entries(Ns))e.set(n,l);for(let n=0;n<t.length;n++){const l=t[n];l&&!e.has(l.role)&&e.set(l.role,bt[n%bt.length]??"bg-neutral-400")}return e}function Ke(t){const e=G.c(79),{role:n,memberId:l,isOwner:i,roleColorMap:a,selectableRoles:o,onRoleChange:r,size:u,className:f}=t,g=u===void 0?"xs":u;let b,p,I,M,j,D,v,$,C,E,N;if(e[0]!==f||e[1]!==i||e[2]!==l||e[3]!==r||e[4]!==n||e[5]!==a||e[6]!==o||e[7]!==g){N=Symbol.for("react.early_return_sentinel");e:{const _=a.get(n)??"bg-neutral-400";if(i){let c;e[19]!==l||e[20]!==r?(c=J=>r(l,J),e[19]=l,e[20]=r,e[21]=c):c=e[21];let h;e[22]!==n?(h=s.jsx("span",{className:"capitalize truncate",children:n}),e[22]=n,e[23]=h):h=e[23];const L=s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("div",{className:ke("size-2 rounded-full shrink-0",_)}),h]});let P;e[24]!==L?(P=s.jsx(dt,{children:L}),e[24]=L,e[25]=P):P=e[25];let O;e[26]!==f||e[27]!==g||e[28]!==P?(O=s.jsx(ut,{size:g,className:f,children:P}),e[26]=f,e[27]=g,e[28]=P,e[29]=O):O=e[29];let V;if(e[30]!==a||e[31]!==o){let J;e[33]!==a?(J=H=>{const W=a.get(H.role)??"bg-neutral-400";return s.jsx(ft,{value:H.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:ke("size-3 rounded-full",W)}),s.jsx("span",{className:"capitalize",children:H.label})]})},H.role)},e[33]=a,e[34]=J):J=e[34],V=o.map(J),e[30]=a,e[31]=o,e[32]=V}else V=e[32];let q;e[35]!==V?(q=s.jsx(pt,{children:V}),e[35]=V,e[36]=q):q=e[36];let Q;e[37]!==i||e[38]!==n||e[39]!==c||e[40]!==O||e[41]!==q?(Q=s.jsx(Vt,{asChild:!0,children:s.jsx("div",{className:"w-fit",children:s.jsxs(ht,{value:n,onValueChange:c,disabled:i,children:[O,q]})})}),e[37]=i,e[38]=n,e[39]=c,e[40]=O,e[41]=q,e[42]=Q):Q=e[42];let F;e[43]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(Qt,{children:s.jsx("p",{children:"The owner role cannot be changed"})}),e[43]=F):F=e[43];let U;e[44]!==Q?(U=s.jsx(Ut,{children:s.jsxs(Gt,{children:[Q,F]})}),e[44]=Q,e[45]=U):U=e[45],N=U;break e}I=ht,$=n,e[46]!==l||e[47]!==r?(C=c=>r(l,c),e[46]=l,e[47]=r,e[48]=C):C=e[48],E=i,p=ut,D=g,v=f,b=dt,j="flex items-center gap-2 min-w-0",M=ke("size-2 rounded-full shrink-0",_)}e[0]=f,e[1]=i,e[2]=l,e[3]=r,e[4]=n,e[5]=a,e[6]=o,e[7]=g,e[8]=b,e[9]=p,e[10]=I,e[11]=M,e[12]=j,e[13]=D,e[14]=v,e[15]=$,e[16]=C,e[17]=E,e[18]=N}else b=e[8],p=e[9],I=e[10],M=e[11],j=e[12],D=e[13],v=e[14],$=e[15],C=e[16],E=e[17],N=e[18];if(N!==Symbol.for("react.early_return_sentinel"))return N;let R;e[49]!==M?(R=s.jsx("div",{className:M}),e[49]=M,e[50]=R):R=e[50];let S;e[51]!==n?(S=s.jsx("span",{className:"capitalize truncate",children:n}),e[51]=n,e[52]=S):S=e[52];let z;e[53]!==R||e[54]!==S||e[55]!==j?(z=s.jsxs("div",{className:j,children:[R,S]}),e[53]=R,e[54]=S,e[55]=j,e[56]=z):z=e[56];let A;e[57]!==b||e[58]!==z?(A=s.jsx(b,{children:z}),e[57]=b,e[58]=z,e[59]=A):A=e[59];let y;e[60]!==p||e[61]!==A||e[62]!==D||e[63]!==v?(y=s.jsx(p,{size:D,className:v,children:A}),e[60]=p,e[61]=A,e[62]=D,e[63]=v,e[64]=y):y=e[64];let K;if(e[65]!==a||e[66]!==o){let _;e[68]!==a?(_=c=>{const h=a.get(c.role)??"bg-neutral-400";return s.jsx(ft,{value:c.role,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:ke("size-3 rounded-full",h)}),s.jsx("span",{className:"capitalize",children:c.label})]})},c.role)},e[68]=a,e[69]=_):_=e[69],K=o.map(_),e[65]=a,e[66]=o,e[67]=K}else K=e[67];let w;e[70]!==K?(w=s.jsx(pt,{children:K}),e[70]=K,e[71]=w):w=e[71];let k;return e[72]!==I||e[73]!==y||e[74]!==w||e[75]!==$||e[76]!==C||e[77]!==E?(k=s.jsxs(I,{value:$,onValueChange:C,disabled:E,children:[y,w]}),e[72]=I,e[73]=y,e[74]=w,e[75]=$,e[76]=C,e[77]=E,e[78]=k):k=e[78],k}function jt(t){const e=G.c(51),{member:n,roles:l,onChangeRole:i,onRemove:a,isUpdating:o}=t,r=o===void 0?!1:o,u=n.role==="owner";let f,g,b,p,I,M,j,D,v;if(e[0]!==u||e[1]!==r||e[2]!==n.id||e[3]!==n.role||e[4]!==i||e[5]!==l){let y;e[15]!==n.role?(y=c=>c.role!==n.role&&c.role!=="owner",e[15]=n.role,e[16]=y):y=e[16];const K=l.filter(y);p=St;let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(_t,{size:20}),e[17]=w):w=e[17],e[18]!==u?(v=s.jsx(Nt,{asChild:!0,children:s.jsx(ze,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:u,onClick:Ts,children:w})}),e[18]=u,e[19]=v):v=e[19],b=wt,j="end",D=_s,g=Jt;let k;e[20]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(es,{size:16}),e[20]=k):k=e[20],e[21]!==r?(M=s.jsxs(Ht,{disabled:r,children:[k,"Change Role"]}),e[21]=r,e[22]=M):M=e[22],f=Wt;let _;e[23]!==r||e[24]!==n.id||e[25]!==i?(_=c=>{const h=[];return c.isBuiltin||(c.allowsAllStaticPermissions?h.push("Full org access"):c.staticPermissionCount&&c.staticPermissionCount>0&&h.push(`${c.staticPermissionCount} org perm${c.staticPermissionCount!==1?"s":""}`),c.allowsAllConnections?h.push("All connections"):c.connectionCount&&c.connectionCount>0&&h.push(`${c.connectionCount} connection${c.connectionCount!==1?"s":""}`),(c.connectionCount!==0||c.allowsAllConnections)&&(c.allowsAllTools?h.push("all tools"):c.toolCount&&c.toolCount>0&&h.push(`${c.toolCount} tool${c.toolCount!==1?"s":""}`))),s.jsxs(et,{onClick:L=>{L.stopPropagation(),i(n.id,c.role)},disabled:r,children:[c.isBuiltin?s.jsx(Xt,{size:16}):s.jsx(Zt,{size:16}),s.jsxs("span",{className:"flex flex-col",children:[s.jsx("span",{children:c.label}),!c.isBuiltin&&h.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:h.join(", ")})]})]},c.role)},e[23]=r,e[24]=n.id,e[25]=i,e[26]=_):_=e[26],I=K.map(_),e[0]=u,e[1]=r,e[2]=n.id,e[3]=n.role,e[4]=i,e[5]=l,e[6]=f,e[7]=g,e[8]=b,e[9]=p,e[10]=I,e[11]=M,e[12]=j,e[13]=D,e[14]=v}else f=e[6],g=e[7],b=e[8],p=e[9],I=e[10],M=e[11],j=e[12],D=e[13],v=e[14];let $;e[27]!==f||e[28]!==I?($=s.jsx(f,{children:I}),e[27]=f,e[28]=I,e[29]=$):$=e[29];let C;e[30]!==g||e[31]!==M||e[32]!==$?(C=s.jsxs(g,{children:[M,$]}),e[30]=g,e[31]=M,e[32]=$,e[33]=C):C=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(Yt,{}),e[34]=E):E=e[34];let N;e[35]!==n.id||e[36]!==a?(N=y=>{y.stopPropagation(),a(n.id)},e[35]=n.id,e[36]=a,e[37]=N):N=e[37];let R;e[38]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(ts,{size:16}),e[38]=R):R=e[38];let S;e[39]!==N?(S=s.jsxs(et,{variant:"destructive",onClick:N,children:[R,"Remove Member"]}),e[39]=N,e[40]=S):S=e[40];let z;e[41]!==b||e[42]!==S||e[43]!==j||e[44]!==D||e[45]!==C?(z=s.jsxs(b,{align:j,onClick:D,children:[C,E,S]}),e[41]=b,e[42]=S,e[43]=j,e[44]=D,e[45]=C,e[46]=z):z=e[46];let A;return e[47]!==p||e[48]!==z||e[49]!==v?(A=s.jsxs(p,{children:[v,z]}),e[47]=p,e[48]=z,e[49]=v,e[50]=A):A=e[50],A}function _s(t){return t.stopPropagation()}function Ts(t){return t.stopPropagation()}function vt(t){const e=G.c(8),{invitationId:n,onCancel:l,isCancelling:i}=t,a=i===void 0?!1:i;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Nt,{asChild:!0,children:s.jsx(ze,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:As,children:s.jsx(_t,{size:20})})}),e[0]=o):o=e[0];let r;e[1]!==n||e[2]!==l?(r=g=>{g.stopPropagation(),l(n)},e[1]=n,e[2]=l,e[3]=r):r=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Tt,{size:16}),e[4]=u):u=e[4];let f;return e[5]!==a||e[6]!==r?(f=s.jsxs(St,{children:[o,s.jsx(wt,{align:"end",onClick:Is,children:s.jsxs(et,{variant:"destructive",onClick:r,disabled:a,children:[u,"Cancel Invitation"]})})]}),e[5]=a,e[6]=r,e[7]=f):f=e[7],f}function Is(t){return t.stopPropagation()}function As(t){return t.stopPropagation()}function Ms(){const t=G.c(103),{data:e}=Bt(),{data:n}=fs(),l=ps(),i=Qe(),{locator:a}=pe(),o=yt(),[r,u]=re.useState(null),[f,g]=re.useState(null),[b,p]=re.useState(""),[I,M]=re.useState("table"),[j,D]=re.useState("member"),[v,$]=re.useState("asc"),C=e?.data?.members;let E;t[0]!==j?(E=m=>{j===m?$(Fs):(D(m),$("asc"))},t[0]=j,t[1]=E):E=t[1];const N=E;let R=C??[],S=n??[];if(b){const m=b.toLowerCase();R=R.filter(d=>d.user?.name?.toLowerCase().includes(m)||d.user?.email?.toLowerCase().includes(m)||d.role?.toLowerCase().includes(m)),S=S.filter(d=>d.email?.toLowerCase().includes(m)||d.role?.toLowerCase().includes(m))}if(j&&v){let m;t[2]!==v||t[3]!==j?(m=(d,T)=>{let B,de;e:switch(j){case"member":{B=d.user?.name||"",de=T.user?.name||"";break e}case"role":{B=d.role||"",de=T.role||"";break e}case"joined":{B=d.createdAt?typeof d.createdAt=="string"?d.createdAt:d.createdAt.toISOString():"",de=T.createdAt?typeof T.createdAt=="string"?T.createdAt:T.createdAt.toISOString():"";break e}default:return 0}return v==="asc"?B.localeCompare(de):de.localeCompare(B)},t[2]=v,t[3]=j,t[4]=m):m=t[4],R=[...R].sort(m)}const z=R;let A;t[5]!==o?(A=async m=>{const d=await o.organization.removeMember({memberIdOrEmail:m});if(d?.error)throw new Error(d.error.message)},t[5]=o,t[6]=A):A=t[6];let y;t[7]!==a||t[8]!==i?(y=()=>{Re("member_removed"),i.invalidateQueries({queryKey:ce.members(a)}),oe.success("Member has been removed from the organization"),u(null)},t[7]=a,t[8]=i,t[9]=y):y=t[9];let K;t[10]!==A||t[11]!==y?(K={mutationFn:A,onSuccess:y,onError:Ls},t[10]=A,t[11]=y,t[12]=K):K=t[12];const w=Me(K);let k;t[13]!==o?(k=async m=>{const{memberId:d,role:T}=m,B=await o.organization.updateMemberRole({memberId:d,role:[T]});if(B?.error)throw new Error(B.error.message)},t[13]=o,t[14]=k):k=t[14];let _;t[15]!==a||t[16]!==i?(_=(m,d)=>{Re("member_role_updated",{new_role:d.role}),i.invalidateQueries({queryKey:ce.members(a)}),oe.success("Member's role has been updated")},t[15]=a,t[16]=i,t[17]=_):_=t[17];let c;t[18]!==k||t[19]!==_?(c={mutationFn:k,onSuccess:_,onError:qs},t[18]=k,t[19]=_,t[20]=c):c=t[20];const h=Me(c);let L;t[21]!==o?(L=async m=>{const{invitationId:d,role:T,email:B}=m,de=await o.organization.cancelInvitation({invitationId:d});if(de?.error)throw new Error(de.error.message);const tt=await o.organization.inviteMember({email:B,role:T});if(tt?.error)throw new Error(tt.error.message)},t[21]=o,t[22]=L):L=t[22];let P;t[23]!==a||t[24]!==i?(P=(m,d)=>{Re("invitation_role_updated",{new_role:d.role}),i.invalidateQueries({queryKey:ce.invitations(a)}),oe.success("Invitation role has been updated")},t[23]=a,t[24]=i,t[25]=P):P=t[25];let O;t[26]!==L||t[27]!==P?(O={mutationFn:L,onSuccess:P,onError:Os},t[26]=L,t[27]=P,t[28]=O):O=t[28];const V=Me(O),{roles:q,customRoles:Q}=Kt();let F;t[29]!==Q?(F=ws(Q),t[29]=Q,t[30]=F):F=t[30];const U=F;let J;t[31]!==q?(J=q.filter($s),t[31]=q,t[32]=J):J=t[32];const H=J;let W;t[33]===Symbol.for("react.memo_cache_sentinel")?(W={id:"member",header:"Member",render:Ds,cellClassName:"flex-1 min-w-0",sortable:!0},t[33]=W):W=t[33];let ne;t[34]!==U||t[35]!==H||t[36]!==V||t[37]!==h?(ne={id:"role",header:"Role",render:m=>m.type==="member"?s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:m.data.role==="owner",roleColorMap:U,selectableRoles:H,onRoleChange:(d,T)=>h.mutate({memberId:d,role:T}),className:"w-36"}):s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:!1,roleColorMap:U,selectableRoles:H,onRoleChange:(d,T)=>V.mutate({invitationId:d,role:T,email:m.data.email}),className:"w-36"}),cellClassName:"w-36 shrink-0",sortable:!0},t[34]=U,t[35]=H,t[36]=V,t[37]=h,t[38]=ne):ne=t[38];let he,Y;t[39]===Symbol.for("react.memo_cache_sentinel")?(he={id:"tags",header:"Tags",render:ks,cellClassName:"w-40 shrink-0"},Y={id:"joined",header:"Joined",render:Es,cellClassName:"w-48 shrink-0",sortable:!0},t[39]=he,t[40]=Y):(he=t[39],Y=t[40]);let ie;t[41]!==l.cancel.isPending||t[42]!==q||t[43]!==h?(ie={id:"actions",header:"",render:m=>m.type==="member"?s.jsx(jt,{member:m.data,roles:q,onChangeRole:(d,T)=>h.mutate({memberId:d,role:T}),onRemove:u,isUpdating:h.isPending}):s.jsx(vt,{invitationId:m.data.id,onCancel:g,isCancelling:l.cancel.isPending}),cellClassName:"w-12 shrink-0"},t[41]=l.cancel.isPending,t[42]=q,t[43]=h,t[44]=ie):ie=t[44];let me;t[45]!==ne||t[46]!==ie?(me=[W,ne,he,Y,ie],t[45]=ne,t[46]=ie,t[47]=me):me=t[47];const Pe=me;let ge;t[48]===Symbol.for("react.memo_cache_sentinel")?(ge=s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(kt,{trigger:s.jsx(ze,{children:"Invite Member"})})}),t[48]=ge):ge=t[48];const Ee=ge,ue=[...z.map(Ps),...S.filter(zs).map(Rs)],ae=Ae,le=!!f;let Z;t[49]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>g(null),t[49]=Z):Z=t[49];let X;t[50]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsxs(at,{children:[s.jsx(lt,{children:"Cancel Invitation"}),s.jsx(ot,{children:"Are you sure you want to cancel this invitation? The invitee will no longer be able to join the organization with this invitation."})]}),t[50]=X):X=t[50];let ee;t[51]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(rt,{children:"Keep Invitation"}),t[51]=ee):ee=t[51];let te;t[52]!==l.cancel||t[53]!==f?(te=()=>{f&&(l.cancel.mutate(f),g(null))},t[52]=l.cancel,t[53]=f,t[54]=te):te=t[54];let x;t[55]!==l.cancel.isPending||t[56]!==te?(x=s.jsxs(st,{children:[X,s.jsxs(nt,{children:[ee,s.jsx(it,{onClick:te,disabled:l.cancel.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Cancel Invitation"})]})]}),t[55]=l.cancel.isPending,t[56]=te,t[57]=x):x=t[57];let se;t[58]!==le||t[59]!==x?(se=s.jsx(ct,{open:le,onOpenChange:Z,children:x}),t[58]=le,t[59]=x,t[60]=se):se=t[60];const fe=!!r;let xe;t[61]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>u(null),t[61]=xe):xe=t[61];let Oe;t[62]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsxs(at,{children:[s.jsx(lt,{children:"Remove Member"}),s.jsx(ot,{children:"Are you sure you want to remove this member from the organization? This action cannot be undone."})]}),t[62]=Oe):Oe=t[62];let qe;t[63]===Symbol.for("react.memo_cache_sentinel")?(qe=s.jsx(rt,{children:"Cancel"}),t[63]=qe):qe=t[63];let be;t[64]!==r||t[65]!==w?(be=()=>r&&w.mutate(r),t[64]=r,t[65]=w,t[66]=be):be=t[66];let je;t[67]!==w.isPending||t[68]!==be?(je=s.jsxs(st,{children:[Oe,s.jsxs(nt,{children:[qe,s.jsx(it,{onClick:be,disabled:w.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]}),t[67]=w.isPending,t[68]=be,t[69]=je):je=t[69];let ve;t[70]!==fe||t[71]!==je?(ve=s.jsx(ct,{open:fe,onOpenChange:xe,children:je}),t[70]=fe,t[71]=je,t[72]=ve):ve=t[72];const Ge=Ae,Je=Ae,At="flex flex-col gap-6";let Ce,ye;t[73]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(us,{}),ye=s.jsx(Ae.Title,{children:"Members"}),t[73]=Ce,t[74]=ye):(Ce=t[73],ye=t[74]);let Le;t[75]===Symbol.for("react.memo_cache_sentinel")?(Le=m=>{m.key==="Escape"&&(p(""),m.target.blur())},t[75]=Le):Le=t[75];let Se;t[76]!==b?(Se=s.jsx(Pt,{value:b,onChange:p,placeholder:"Search members...",className:"w-full md:w-[375px]",onKeyDown:Le}),t[76]=b,t[77]=Se):Se=t[77];let Fe;t[78]===Symbol.for("react.memo_cache_sentinel")?(Fe=[{id:"member",label:"Name"},{id:"role",label:"Role"},{id:"joined",label:"Joined"}],t[78]=Fe):Fe=t[78];let Ne;t[79]!==N||t[80]!==v||t[81]!==j||t[82]!==I?(Ne=s.jsx(zt,{viewMode:I,onViewModeChange:M,sortKey:j,sortDirection:v,onSort:N,sortOptions:Fe}),t[79]=N,t[80]=v,t[81]=j,t[82]=I,t[83]=Ne):Ne=t[83];let we;t[84]!==Se||t[85]!==Ne?(we=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[Se,Ne]}),Ee]}),t[84]=Se,t[85]=Ne,t[86]=we):we=t[86];const He=I==="cards"?s.jsx("div",{children:ue.length===0?s.jsx(We,{title:"No members found",description:b?`No members match "${b}"`:"Invite members to get started."}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:ue.map(m=>{if(m.type==="invitation")return s.jsxs(mt,{className:"transition-colors relative opacity-75",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(vt,{invitationId:m.data.id,onCancel:g,isCancelling:l.cancel.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(De,{fallback:Ve(m.data.email),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:m.data.email}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(Ue,{variant:"outline",className:"w-fit text-amber-600 border-amber-400",children:"Pending"})}),s.jsx(Ke,{role:m.data.role,memberId:m.data.id,isOwner:!1,roleColorMap:U,selectableRoles:H,onRoleChange:(T,B)=>V.mutate({invitationId:T,role:B,email:m.data.email}),className:"w-fit"})]})]})]},`inv-${m.data.id}`);const d=m.data;return s.jsxs(mt,{className:"transition-colors relative",children:[s.jsx("div",{className:"absolute top-4 right-4 z-10",children:s.jsx(jt,{member:d,roles:q,onChangeRole:(T,B)=>h.mutate({memberId:T,role:B}),onRemove:u,isUpdating:h.isPending})}),s.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[s.jsx(De,{url:d.user?.image??void 0,fallback:Ve(d.user?.name),shape:"circle",size:"lg",className:"shrink-0"}),s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:d.user?.name||"Unknown"}),s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:d.user?.email}),s.jsx(Ke,{role:d.role,memberId:d.id,isOwner:d.role==="owner",roleColorMap:U,selectableRoles:H,onRoleChange:(T,B)=>h.mutate({memberId:T,role:B}),className:"w-fit"}),s.jsx(It,{memberId:d.id,maxDisplay:3})]})]})]},d.id)})})}):s.jsx(Et,{columns:Pe,data:ue,isLoading:!1,sortKey:j,sortDirection:v,onSort:N,emptyState:b?s.jsx(We,{title:"No members found",description:`No members match "${b}"`}):s.jsx(We,{title:"No members found",description:"Invite members to get started."})});let _e;t[87]!==Ce||t[88]!==ye||t[89]!==we||t[90]!==He?(_e=s.jsxs("div",{className:At,children:[Ce,ye,we,He]}),t[87]=Ce,t[88]=ye,t[89]=we,t[90]=He,t[91]=_e):_e=t[91];let Te;t[92]!==Je.Body||t[93]!==_e?(Te=s.jsx(Je.Body,{children:_e}),t[92]=Je.Body,t[93]=_e,t[94]=Te):Te=t[94];let Ie;t[95]!==Ge.Content||t[96]!==Te?(Ie=s.jsx(Ge.Content,{children:Te}),t[95]=Ge.Content,t[96]=Te,t[97]=Ie):Ie=t[97];let Be;return t[98]!==ae||t[99]!==se||t[100]!==ve||t[101]!==Ie?(Be=s.jsxs(ae,{children:[se,ve,Ie]}),t[98]=ae,t[99]=se,t[100]=ve,t[101]=Ie,t[102]=Be):Be=t[102],Be}function Rs(t){return{type:"invitation",data:t}}function zs(t){return t.status==="pending"}function Ps(t){return{type:"member",data:t}}function Es(t){return t.type==="member"?s.jsx("span",{className:"text-sm text-foreground",children:t.data.createdAt?Ft(t.data.createdAt):"N/A"}):s.jsx(Ue,{variant:"outline",children:"Pending"})}function ks(t){return t.type==="member"?s.jsx(It,{memberId:t.data.id,maxDisplay:2}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"-"})}function Ds(t){return t.type==="member"?s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(De,{url:t.data.user?.image??void 0,fallback:Ve(t.data.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.data.user?.name||"Unknown"}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:t.data.user?.email})]})]}):s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(De,{fallback:Ve(t.data.email),shape:"circle",size:"sm"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:t.data.email}),s.jsx("div",{className:"text-sm text-muted-foreground truncate",children:"Invitation sent"})]})]})}function $s(t){return t.role!=="owner"}function Os(t,e){Re("invitation_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to update invitation role")}function qs(t,e){Re("member_role_update_failed",{new_role:e.role,error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to update role")}function Ls(t){Re("member_remove_failed",{error:t instanceof Error?t.message:String(t)}),oe.error(t instanceof Error?t.message:"Failed to remove member")}function Fs(t){return t==="asc"?"desc":t==="desc"?null:"asc"}function Bs(){const t=G.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed to load members"})})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Rt,{fallback:e,children:s.jsx(re.Suspense,{fallback:s.jsx(Ae,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(Xe,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Ms,{})})}),t[1]=n):n=t[1],n}function Jn(){const t=G.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ds,{capability:"members:manage",area:"members",children:s.jsx(Bs,{})}),t[0]=e):e=t[0],e}export{Jn as default};
@@ -1 +0,0 @@
1
- import{c as it,r as E,j as e,i as rt}from"./index-Cvg8wlf2.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-DqxxQz6a.js";import{A as nt}from"./automation-runs-B4v9bIbU.js";import{r as lt,u as ct,a as dt,b as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-BwL8BfIG.js";import{r as xt}from"./index-D3FFjINn.js";import"./LayoutLeft-CurO7lkf.js";import"./use-mobile-DE9td55c.js";import"./X-B6q2eNkF.js";import"./tooltip-CiXxbAOc.js";import"./select-CIDMHDRe.js";import"./Check-BJiMMf7v.js";import"./ChevronDown-CBLc4m6w.js";import"./ChevronUp-DmNuFMik.js";import"./useInfiniteQuery-C9hUpVEm.js";import"./use-infinite-scroll-C9_S_5KL.js";import"./use-connection-0YGfXXXM.js";import"./use-collections-7MdzRrDf.js";import"./use-mcp-client-CClO-4jR.js";import"./constants-CaIX_f5U.js";import"./auth-9zI7uyI_.js";import"./use-virtual-mcp-0UTR3JZf.js";import"./card-BKGavoj3.js";import"./table-BmCQne9U.js";import"./empty-state-NAWKd2m2.js";import"./use-members-BRkIKC2W.js";import"./use-org-auth-client-BAZD-XfS.js";import"./use-clock-tick-DOabyHE5.js";import"./AlertCircle-C__5mMuz.js";import"./CheckCircle-DRbpAaoA.js";import"./Circle--mEsLc32.js";import"./agent-icon-GwlSPXVL.js";import"./Tool01-BRwOHymx.js";import"./ArrowUp-D9-IQ-Jm.js";import"./Settings02-BaPvDdXK.js";import"./Tool02-DpdINpQD.js";import"./XCircle-Vpo_BauK.js";import"./ArrowUpRight-zrEVpN9d.js";import"./TrendUp01-D_1HcFdI.js";import"./ZapSquare-a7mV4MQr.js";import"./Users03-D5qmvjdI.js";import"./Loading02-BqCrbGU_.js";import"./ChevronRight-BjHi2zTb.js";import"./Stars02-DMp85N4F.js";import"./Copy01-D5lFZSIr.js";import"./ZoomOut-CC64T3-s.js";import"./DotsVertical-C9eUzaCG.js";import"./Globe01-SD7o4WjA.js";import"./Eye-CSrt2uwE.js";import"./FilterLines-CRMm2AqP.js";import"./Star01-B19iYHho.js";import"./Globe04-Biz86Os4.js";import"./SwitchHorizontal01-_8RyBCsb.js";import"./HardDrive-CbxCnB3J.js";import"./Key01-DJNC5dou.js";import"./LinkExternal01-B3st3yUn.js";import"./List-C-Y7abIw.js";import"./Monitor01-DpZudhGT.js";import"./Sun-BvLzEM7C.js";import"./Package-DWNnL7Bo.js";import"./Palette-Cyg4gkHm.js";import"./Play-BsdkOEt3.js";import"./Plus-CdBUTSrl.js";import"./SearchLg-_kiE3lNL.js";import"./SearchMd-CPb906Aj.js";import"./Shield01-CA1C0PT_.js";import"./Stars01-RBw3Iorj.js";import"./Trash01-BaM_ljKo.js";import"./Upload01-H_9RE18o.js";import"./User01-CwCos6Py.js";import"./Users01-CqkgkQyP.js";import"./XClose-BAeGDKN0.js";import"./Zap-DVunWyGl.js";import"./use-automations-DmtHpUAX.js";import"./studio-tools-BgAyimPw.js";import"./useSuspenseInfiniteQuery-ZWfPnVGO.js";import"./badge-CUmMlsBT.js";import"./checkbox-Ckmw9Mfi.js";import"./command-C07_gdqU.js";import"./index-ssrb4176.js";import"./dialog-WQh-gp8S.js";import"./popover-BWgdS4nk.js";import"./avatar-BYTTt2km.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BQO62X_d.js";import"./file-type-icon-DN87_g0K.js";import"./tab-id-bb-jjgGv.js";import"./monaco-editor-CAHRW4WA.js";import"./index-DBFf6th0.js";import"./chat-context-1Zkmke_h.js";import"./autosend-CVG-zQs7.js";import"./hooks-k9Lihge2.js";import"./decopilot-sse-pool-CBL8Jn9p.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-ZfoEvmNY.js";import"./use-decopilot-events-DYfuIh9O.js";import"./use-organization-settings-DZsps1AQ.js";import"./index-DDqctd2I.js";import"./shell-layout-BH9Ivq57.js";import"./alert-dialog-DBB5CaN8.js";import"./required-auth-layout-BbJDdJdw.js";import"./use-org-sso-DwW4iwJx.js";import"./integration-icon-CSm7Qy8c.js";import"./use-navigate-to-agent-jx-u6VG0.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CPAe8LbH.js";import"./form-ChRNwWXa.js";import"./label-pwPiXf8V.js";import"./input-DxEfOo7U.js";import"./switch-DkvkIrzq.js";import"./drawer-C1W7KPBD.js";import"./collection-search-DOi2t6LQ.js";import"./tabs-WNIrx41Q.js";import"./toggle-group-BhyMCiuu.js";import"./use-deco-credits-BrZmeIWZ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BYuySvJ3.js";import"./use-registry-connections-BLLAhhOv.js";import"./extract-connection-data-CeaTTHDG.js";import"./collection-tabs-Dmvezwf-.js";import"./textarea-CZTZGoFe.js";import"./connection-form-helpers-CGNedBLj.js";import"./authenticate-and-persist-oauth-D1WuDeU5.js";import"./mcp-oauth-DSz8vxQO.js";import"./connect-desktop-dialog-hKwz2gHB.js";import"./select-model-BLJUdbv5.js";import"./skeleton-CgTyvIfS.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-D69S9E0I.js";import"./dropdown-menu-D4PeOhjt.js";import"./index-SPy5-3x1.js";import"./toolbar-DUZ2w4vN.js";import"./use-debounced-value-CxU40MZW.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DtENtyxj.js";import"./use-mcp-tools-CP1pJ9FP.js";import"./use-capability-BigpWO7w.js";import"./tools-list-DvZ-3uOc.js";import"./use-debounced-autosave-CNjFdqON.js";import"./index-CF7vJTQ1.js";import"./search-input-Bu2qiTLD.js";import"./github-repo-picker-qq2y6xuE.js";import"./github-installations-D2vHSx02.js";import"./use-secrets-D4wr9PP7.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./index-j_Vqvu4R.js";import"./get-initials-D-f_fDFw.js";import"./calendar-Y3krjFiC.js";import"./toolbar-icon-button-CyxV7J7K.js";import"./use-file-configs-xRl8wR9j.js";import"./automation-list-row-D9qq5pJq.js";function Si(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const A=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const M=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const V=F,q=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,z=m.kind==="site"&&o&&n,B=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==q?(l=e.jsx(mt,{className:"text-sm font-semibold",children:q}),t[13]=q,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==$||t[22]!==H||t[23]!==A||t[24]!==v||t[25]!==h||t[26]!==B||t[27]!==x||t[28]!==M||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==z||t[37]!==_?(S=!o||!T&&!z?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:B}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:A,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:M})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=A,t[24]=v,t[25]=h,t[26]=B,t[27]=x,t[28]=M,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=z,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==V||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:V,children:f}),t[42]=V,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{Si as SeoSheet};
@@ -1 +0,0 @@
1
- import{c as V,j as t,a as D,M as F,af as q,a6 as B,R as N,t as T}from"./index-Cvg8wlf2.js";import{P as L}from"./index-CF7vJTQ1.js";import{A as U}from"./avatar-BYTTt2km.js";import{S as I}from"./switch-DkvkIrzq.js";import{S as G,a as Y,d as $,c as K}from"./select-CIDMHDRe.js";import{a as M,T as z}from"./toggle-group-BhyMCiuu.js";import{I as O}from"./input-DxEfOo7U.js";import{i as H}from"./Monitor01-DpZudhGT.js";import{n as J,a as Q}from"./Sun-BvLzEM7C.js";import{i as W}from"./Play-BsdkOEt3.js";import{u as X}from"./use-debounced-autosave-CNjFdqON.js";import{p as Z,q as ee}from"./question-004-sINsf4GQ.js";import"./index-DARNlAjK.js";import{c as te,b as A,S as E,a as R}from"./settings-section-D69S9E0I.js";import"./sidebar-DqxxQz6a.js";import"./LayoutLeft-CurO7lkf.js";import"./use-mobile-DE9td55c.js";import"./X-B6q2eNkF.js";import"./tooltip-CiXxbAOc.js";import"./User01-CwCos6Py.js";import"./Check-BJiMMf7v.js";import"./ChevronDown-CBLc4m6w.js";import"./ChevronUp-DmNuFMik.js";import"./card-BKGavoj3.js";import"./ArrowUpRight-zrEVpN9d.js";function se(){const e=V.c(19),{data:s,isPending:o}=D.useSession(),v=s?.user,p=v?.image,h=v?.name??"";let S;e[0]!==h?(S={values:{name:h}},e[0]=h,e[1]=S):S=e[1];const n=F(S);let _;e[2]!==n?(_={save:async()=>{const g=n.control._formState.dirtyFields;if(Object.keys(g).length===0)return;const r=n.getValues(),f=n.control._defaultValues;n.reset(r,{keepValues:!0});try{await D.updateUser({name:r.name}),N("profile_updated",{fields:["name"]}),T.success("Profile updated successfully")}catch{n.reset(f,{keepValues:!0}),T.error("Failed to update profile")}}},e[2]=n,e[3]=_):_=e[3];const{schedule:x,flush:m}=X(_);if(o)return null;const j=v?.name??"U";let i;e[4]!==j||e[5]!==p?(i=t.jsx(A,{title:"Avatar",action:t.jsx(U,{url:p,fallback:j,shape:"circle",size:"base"})}),e[4]=j,e[5]=p,e[6]=i):i=e[6];let l;e[7]!==m||e[8]!==x?(l=g=>{const{field:r}=g;return t.jsx(O,{id:"display-name",...r,onChange:f=>{r.onChange(f),x()},onBlur:()=>{r.onBlur(),m()},onKeyDown:f=>{f.key==="Enter"&&m()},placeholder:"Your name",className:"w-[280px]"})},e[7]=m,e[8]=x,e[9]=l):l=e[9];let d;e[10]!==n.control||e[11]!==l?(d=t.jsx(A,{title:"Display name",action:t.jsx(q,{control:n.control,name:"name",render:l})}),e[10]=n.control,e[11]=l,e[12]=d):d=e[12];const b=v?.email;let a;e[13]!==b?(a=t.jsx(A,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:b})}),e[13]=b,e[14]=a):a=e[14];let u;return e[15]!==i||e[16]!==d||e[17]!==a?(u=t.jsx(E,{children:t.jsxs(R,{children:[i,d,a]})}),e[15]=i,e[16]=d,e[17]=a,e[18]=u):u=e[18],u}function oe(){const e=V.c(48),[s,o]=B();let v;e[0]!==o?(v=async c=>{if(c&&await Notification.requestPermission()!=="granted"){N("preferences_notifications_permission_denied"),T.error("Notifications denied. Please enable them in your browser settings."),o(ae);return}N("preferences_notifications_toggled",{enabled:c}),o(y=>({...y,enableNotifications:c}))},e[0]=o,e[1]=v):v=e[1];const p=v;let h;e[2]!==o?(h=c=>{c&&(N("preferences_theme_changed",{to_value:c}),o(y=>({...y,theme:c})))},e[2]=o,e[3]=h):h=e[3];let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(z,{value:"light","aria-label":"Light theme",children:t.jsx(J,{size:14})}),e[4]=S):S=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(z,{value:"dark","aria-label":"Dark theme",children:t.jsx(Q,{size:14})}),e[5]=n):n=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(z,{value:"system","aria-label":"System theme",children:t.jsx(H,{size:14})}),e[6]=_):_=e[6];let x;e[7]!==s.theme||e[8]!==h?(x=t.jsx(A,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(M,{type:"single",size:"sm",variant:"outline",value:s.theme,onValueChange:h,children:[S,n,_]})}),e[7]=s.theme,e[8]=h,e[9]=x):x=e[9];let m;e[10]!==p||e[11]!==s.enableNotifications?(m=typeof Notification<"u"?()=>p(!s.enableNotifications):void 0,e[10]=p,e[11]=s.enableNotifications,e[12]=m):m=e[12];let j;e[13]!==p||e[14]!==s.enableNotifications?(j=t.jsx(I,{disabled:typeof Notification>"u",checked:s.enableNotifications,onCheckedChange:p}),e[13]=p,e[14]=s.enableNotifications,e[15]=j):j=e[15];let i;e[16]!==m||e[17]!==j?(i=t.jsx(A,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:m,action:j}),e[16]=m,e[17]=j,e[18]=i):i=e[18];let l;e[19]!==s.enableSounds||e[20]!==o?(l=()=>{N("preferences_sounds_toggled",{enabled:!s.enableSounds}),o(le)},e[19]=s.enableSounds,e[20]=o,e[21]=l):l=e[21];let d;e[22]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:ne,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=d):d=e[22];let b;e[23]!==o?(b=c=>{N("preferences_sounds_toggled",{enabled:c}),o(y=>({...y,enableSounds:c}))},e[23]=o,e[24]=b):b=e[24];let a;e[25]!==s.enableSounds||e[26]!==b?(a=t.jsxs("div",{className:"flex items-center gap-2",children:[d,t.jsx(I,{checked:s.enableSounds,onCheckedChange:b})]}),e[25]=s.enableSounds,e[26]=b,e[27]=a):a=e[27];let u;e[28]!==a||e[29]!==l?(u=t.jsx(A,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:l,action:a}),e[28]=a,e[29]=l,e[30]=u):u=e[30];let g;e[31]!==o?(g=c=>{N("preferences_tool_approval_changed",{to_value:c}),o(y=>({...y,toolApprovalLevel:c}))},e[31]=o,e[32]=g):g=e[32];let r;e[33]!==s.toolApprovalLevel?(r={readonly:"Ask before edit",auto:"Auto approve"}[s.toolApprovalLevel]??"Ask before edit",e[33]=s.toolApprovalLevel,e[34]=r):r=e[34];let f;e[35]!==r?(f=t.jsx(Y,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:r})}),e[35]=r,e[36]=f):f=e[36];let C;e[37]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx($,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=C):C=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(K,{children:[C,t.jsx($,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=k):k=e[38];let P;e[39]!==s.toolApprovalLevel||e[40]!==g||e[41]!==f?(P=t.jsx(A,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(G,{value:s.toolApprovalLevel,onValueChange:g,children:[f,k]})}),e[39]=s.toolApprovalLevel,e[40]=g,e[41]=f,e[42]=P):P=e[42];let w;return e[43]!==u||e[44]!==P||e[45]!==x||e[46]!==i?(w=t.jsx(E,{title:"Preferences",children:t.jsxs(R,{children:[x,i,u,P]})}),e[43]=u,e[44]=P,e[45]=x,e[46]=i,e[47]=w):w=e[47],w}function ne(){N("preferences_sounds_previewed"),Z(ee.dataUri).catch(ie)}function ie(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function ae(e){return{...e,enableNotifications:!1}}function re(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(L,{children:t.jsx(L.Content,{children:t.jsx(L.Body,{children:t.jsxs(te,{children:[t.jsx(L.Title,{children:"Profile & Preferences"}),t.jsx(se,{}),t.jsx(oe,{})]})})})}),e[0]=s):s=e[0],s}function De(){const e=V.c(1);let s;return e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(re,{}),e[0]=s):s=e[0],s}export{De as default};
@@ -1 +0,0 @@
1
- import{c as $,a4 as H,j as v}from"./index-Cvg8wlf2.js";import{a as L,g as E,s as b}from"./automation-runs-B4v9bIbU.js";import{u as O}from"./use-mcp-client-CClO-4jR.js";import{p as k}from"./constants-CaIX_f5U.js";import{b as q,c as B}from"./use-mcp-tools-CP1pJ9FP.js";import{u as Y}from"./index-D3FFjINn.js";import{c as G}from"./monaco-editor-CAHRW4WA.js";import{g as K,M as V,a as w}from"./index-DDqctd2I.js";import{b as z,a as F}from"./chat-context-1Zkmke_h.js";import{u as J}from"./shell-layout-BH9Ivq57.js";import"./select-CIDMHDRe.js";import"./tooltip-CiXxbAOc.js";import"./Check-BJiMMf7v.js";import"./ChevronDown-CBLc4m6w.js";import"./ChevronUp-DmNuFMik.js";import"./useInfiniteQuery-C9hUpVEm.js";import"./use-infinite-scroll-C9_S_5KL.js";import"./use-connection-0YGfXXXM.js";import"./use-collections-7MdzRrDf.js";import"./use-virtual-mcp-0UTR3JZf.js";import"./card-BKGavoj3.js";import"./sidebar-DqxxQz6a.js";import"./LayoutLeft-CurO7lkf.js";import"./use-mobile-DE9td55c.js";import"./X-B6q2eNkF.js";import"./table-BmCQne9U.js";import"./empty-state-NAWKd2m2.js";import"./use-members-BRkIKC2W.js";import"./use-org-auth-client-BAZD-XfS.js";import"./use-clock-tick-DOabyHE5.js";import"./AlertCircle-C__5mMuz.js";import"./CheckCircle-DRbpAaoA.js";import"./Circle--mEsLc32.js";import"./agent-icon-GwlSPXVL.js";import"./Tool01-BRwOHymx.js";import"./ArrowUp-D9-IQ-Jm.js";import"./Settings02-BaPvDdXK.js";import"./Tool02-DpdINpQD.js";import"./XCircle-Vpo_BauK.js";import"./ArrowUpRight-zrEVpN9d.js";import"./TrendUp01-D_1HcFdI.js";import"./ZapSquare-a7mV4MQr.js";import"./Users03-D5qmvjdI.js";import"./Loading02-BqCrbGU_.js";import"./ChevronRight-BjHi2zTb.js";import"./Stars02-DMp85N4F.js";import"./Copy01-D5lFZSIr.js";import"./ZoomOut-CC64T3-s.js";import"./DotsVertical-C9eUzaCG.js";import"./Globe01-SD7o4WjA.js";import"./Eye-CSrt2uwE.js";import"./FilterLines-CRMm2AqP.js";import"./Star01-B19iYHho.js";import"./Globe04-Biz86Os4.js";import"./SwitchHorizontal01-_8RyBCsb.js";import"./HardDrive-CbxCnB3J.js";import"./Key01-DJNC5dou.js";import"./LinkExternal01-B3st3yUn.js";import"./List-C-Y7abIw.js";import"./Monitor01-DpZudhGT.js";import"./Sun-BvLzEM7C.js";import"./Package-DWNnL7Bo.js";import"./Palette-Cyg4gkHm.js";import"./Play-BsdkOEt3.js";import"./Plus-CdBUTSrl.js";import"./SearchLg-_kiE3lNL.js";import"./SearchMd-CPb906Aj.js";import"./Shield01-CA1C0PT_.js";import"./Stars01-RBw3Iorj.js";import"./Trash01-BaM_ljKo.js";import"./Upload01-H_9RE18o.js";import"./User01-CwCos6Py.js";import"./Users01-CqkgkQyP.js";import"./XClose-BAeGDKN0.js";import"./Zap-DVunWyGl.js";import"./use-automations-DmtHpUAX.js";import"./studio-tools-BgAyimPw.js";import"./useSuspenseInfiniteQuery-ZWfPnVGO.js";import"./badge-CUmMlsBT.js";import"./checkbox-Ckmw9Mfi.js";import"./command-C07_gdqU.js";import"./index-ssrb4176.js";import"./dialog-WQh-gp8S.js";import"./popover-BWgdS4nk.js";import"./avatar-BYTTt2km.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BQO62X_d.js";import"./file-type-icon-DN87_g0K.js";import"./tab-id-bb-jjgGv.js";import"./hooks-k9Lihge2.js";import"./decopilot-sse-pool-CBL8Jn9p.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./integration-icon-CSm7Qy8c.js";import"./use-navigate-to-agent-jx-u6VG0.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CPAe8LbH.js";import"./form-ChRNwWXa.js";import"./label-pwPiXf8V.js";import"./input-DxEfOo7U.js";import"./auth-9zI7uyI_.js";import"./drawer-C1W7KPBD.js";import"./collection-search-DOi2t6LQ.js";import"./autosend-CVG-zQs7.js";import"./tabs-WNIrx41Q.js";import"./toggle-group-BhyMCiuu.js";import"./use-deco-credits-BrZmeIWZ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BYuySvJ3.js";import"./use-registry-connections-BLLAhhOv.js";import"./use-organization-settings-DZsps1AQ.js";import"./extract-connection-data-CeaTTHDG.js";import"./collection-tabs-Dmvezwf-.js";import"./textarea-CZTZGoFe.js";import"./connection-form-helpers-CGNedBLj.js";import"./authenticate-and-persist-oauth-D1WuDeU5.js";import"./mcp-oauth-DSz8vxQO.js";import"./use-ai-providers-ZfoEvmNY.js";import"./connect-desktop-dialog-hKwz2gHB.js";import"./select-model-BLJUdbv5.js";import"./skeleton-CgTyvIfS.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-D69S9E0I.js";import"./dropdown-menu-D4PeOhjt.js";import"./index-SPy5-3x1.js";import"./alert-dialog-DBB5CaN8.js";import"./toolbar-DUZ2w4vN.js";import"./use-debounced-value-CxU40MZW.js";import"./index-DBFf6th0.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DtENtyxj.js";import"./use-decopilot-events-DYfuIh9O.js";import"./use-capability-BigpWO7w.js";import"./tools-list-DvZ-3uOc.js";import"./switch-DkvkIrzq.js";import"./use-debounced-autosave-CNjFdqON.js";import"./index-CF7vJTQ1.js";import"./search-input-Bu2qiTLD.js";import"./github-repo-picker-qq2y6xuE.js";import"./github-installations-D2vHSx02.js";import"./use-secrets-D4wr9PP7.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./index-j_Vqvu4R.js";import"./get-initials-D-f_fDFw.js";import"./calendar-Y3krjFiC.js";import"./toolbar-icon-button-CyxV7J7K.js";import"./use-file-configs-xRl8wR9j.js";import"./automation-list-row-D9qq5pJq.js";import"./required-auth-layout-BbJDdJdw.js";import"./use-org-sso-DwW4iwJx.js";const Q={};function W(A){const t=$.c(37),{client:i,resourceURI:h,tool:o,connectionId:p,orgId:l,args:M}=A,{sendMessage:I}=z(),{setAppContext:u,clearAppContext:n}=F(),{openSidePanel:f,openTab:g}=J(),r=`${p}:${o.name}`;let a;t[0]!==g?(a=C=>C==="inline"?(g("0"),"inline"):"fullscreen",t[0]=g,t[1]=a):a=t[1];const m=a,s=M??Q;let c;t[2]!==i||t[3]!==o.name||t[4]!==s?(c={client:i,toolName:o.name,toolArguments:s},t[2]=i,t[3]=o.name,t[4]=s,t[5]=c):c=t[5];const{data:e}=B(c);let x;if(t[6]!==o._meta||t[7]!==o.name){const C=E(o._meta);x=b(o.name,C),t[6]=o._meta,t[7]=o.name,t[8]=x}else x=t[8];const U=x;let d;t[9]!==o.inputSchema?(d=o.inputSchema??{type:"object"},t[9]=o.inputSchema,t[10]=d):d=t[10];let N;t[11]!==U||t[12]!==d||t[13]!==o?(N={...o,name:U,inputSchema:d},t[11]=U,t[12]=d,t[13]=o,t[14]=N):N=t[14];const j=N;let S;t[15]!==f||t[16]!==I?(S=C=>{const D=G(C.content);D.content.length>0&&(f("chat"),I({tiptapDoc:D}))},t[15]=f,t[16]=I,t[17]=S):S=t[17];const y=S;let P;t[18]!==j?(P={tool:j},t[18]=j,t[19]=P):P=t[19];let T;t[20]!==u||t[21]!==r?(T=C=>u(r,C),t[20]=u,t[21]=r,t[22]=T):T=t[22];let R;t[23]!==n||t[24]!==r?(R=()=>n(r),t[23]=n,t[24]=r,t[25]=R):R=t[25];let _;return t[26]!==i||t[27]!==y||t[28]!==m||t[29]!==l||t[30]!==h||t[31]!==P||t[32]!==T||t[33]!==R||t[34]!==s||t[35]!==e?(_=v.jsx(V,{resourceURI:h,orgId:l,toolInfo:P,toolInput:s,toolResult:e,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:i,onMessage:y,onUpdateModelContext:T,onTeardown:R,onRequestDisplayMode:m,className:"h-full"}),t[26]=i,t[27]=y,t[28]=m,t[29]=l,t[30]=h,t[31]=P,t[32]=T,t[33]=R,t[34]=s,t[35]=e,t[36]=_):_=t[36],_}function Br(A){const t=$.c(24),{connectionId:i,toolName:h,args:o}=A,{org:p}=H(),l=Y();let M;t[0]!==i||t[1]!==l?(M=k(i)&&l.vmEntry?.sandboxProviderKind==="user-desktop"&&l.previewUrl?`${l.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=i,t[1]=l,t[2]=M):M=t[2];const I=M;let u;t[3]!==i||t[4]!==I||t[5]!==p.id||t[6]!==p.slug?(u={connectionId:i,orgId:p.id,orgSlug:p.slug,mcpUrl:I},t[3]=i,t[4]=I,t[5]=p.id,t[6]=p.slug,t[7]=u):u=t[7];const n=O(u);let f;t[8]!==n?(f={client:n},t[8]=n,t[9]=f):f=t[9];const{data:g}=q(f);let r,a,m;t[10]!==h||t[11]!==g.tools?(r=L(decodeURIComponent(h)),m=g.tools.find(e=>e.name===r)??g.tools.find(e=>{const x=E(e._meta);if(!x)return!1;if(b(e.name,x)===r)return!0;const d=b(r,x);return d!==r&&e.name===d}),a=m?._meta?K(m._meta):void 0,t[10]=h,t[11]=g.tools,t[12]=r,t[13]=a,t[14]=m):(r=t[12],a=t[13],m=t[14]);const s=a;if(!m||!s){let e;return t[15]!==r?(e=v.jsx("div",{className:"flex items-center justify-center h-full w-full",children:v.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',r,'" not found or has no UI']})}),t[15]=r,t[16]=e):e=t[16],e}let c;return t[17]!==o||t[18]!==n||t[19]!==i||t[20]!==p.id||t[21]!==s||t[22]!==m?(c=v.jsx(W,{client:n,resourceURI:s,tool:m,connectionId:i,orgId:p.id,args:o}),t[17]=o,t[18]=n,t[19]=i,t[20]=p.id,t[21]=s,t[22]=m,t[23]=c):c=t[23],c}export{Br as AppViewContent};
@@ -1 +0,0 @@
1
- import{c as S,j as r}from"./index-Cvg8wlf2.js";import{I as T}from"./input-DxEfOo7U.js";import{L as C}from"./label-pwPiXf8V.js";import{T as L}from"./textarea-CZTZGoFe.js";import{v as A,w as R,o as D,x as J,I as K}from"./index-D3FFjINn.js";import{u as M,s as P}from"./primitives-D9ISUiF0.js";import"./ArrowUp-D9-IQ-Jm.js";import"./chat-context-1Zkmke_h.js";import"./autosend-CVG-zQs7.js";import"./hooks-k9Lihge2.js";import"./use-mcp-client-CClO-4jR.js";import"./constants-CaIX_f5U.js";import"./auth-9zI7uyI_.js";import"./decopilot-sse-pool-CBL8Jn9p.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-BgAyimPw.js";import"./use-virtual-mcp-0UTR3JZf.js";import"./use-collections-7MdzRrDf.js";import"./use-ai-providers-ZfoEvmNY.js";import"./use-decopilot-events-DYfuIh9O.js";import"./tab-id-bb-jjgGv.js";import"./use-organization-settings-DZsps1AQ.js";import"./automation-runs-B4v9bIbU.js";import"./select-CIDMHDRe.js";import"./tooltip-CiXxbAOc.js";import"./Check-BJiMMf7v.js";import"./ChevronDown-CBLc4m6w.js";import"./ChevronUp-DmNuFMik.js";import"./useInfiniteQuery-C9hUpVEm.js";import"./use-infinite-scroll-C9_S_5KL.js";import"./use-connection-0YGfXXXM.js";import"./card-BKGavoj3.js";import"./sidebar-DqxxQz6a.js";import"./LayoutLeft-CurO7lkf.js";import"./use-mobile-DE9td55c.js";import"./X-B6q2eNkF.js";import"./table-BmCQne9U.js";import"./empty-state-NAWKd2m2.js";import"./use-members-BRkIKC2W.js";import"./use-org-auth-client-BAZD-XfS.js";import"./use-clock-tick-DOabyHE5.js";import"./AlertCircle-C__5mMuz.js";import"./CheckCircle-DRbpAaoA.js";import"./Circle--mEsLc32.js";import"./agent-icon-GwlSPXVL.js";import"./Tool01-BRwOHymx.js";import"./Settings02-BaPvDdXK.js";import"./Tool02-DpdINpQD.js";import"./XCircle-Vpo_BauK.js";import"./ArrowUpRight-zrEVpN9d.js";import"./TrendUp01-D_1HcFdI.js";import"./ZapSquare-a7mV4MQr.js";import"./Users03-D5qmvjdI.js";import"./Loading02-BqCrbGU_.js";import"./ChevronRight-BjHi2zTb.js";import"./Stars02-DMp85N4F.js";import"./Copy01-D5lFZSIr.js";import"./ZoomOut-CC64T3-s.js";import"./DotsVertical-C9eUzaCG.js";import"./Globe01-SD7o4WjA.js";import"./Eye-CSrt2uwE.js";import"./FilterLines-CRMm2AqP.js";import"./Star01-B19iYHho.js";import"./Globe04-Biz86Os4.js";import"./SwitchHorizontal01-_8RyBCsb.js";import"./HardDrive-CbxCnB3J.js";import"./Key01-DJNC5dou.js";import"./LinkExternal01-B3st3yUn.js";import"./List-C-Y7abIw.js";import"./Monitor01-DpZudhGT.js";import"./Sun-BvLzEM7C.js";import"./Package-DWNnL7Bo.js";import"./Palette-Cyg4gkHm.js";import"./Play-BsdkOEt3.js";import"./Plus-CdBUTSrl.js";import"./SearchLg-_kiE3lNL.js";import"./SearchMd-CPb906Aj.js";import"./Shield01-CA1C0PT_.js";import"./Stars01-RBw3Iorj.js";import"./Trash01-BaM_ljKo.js";import"./Upload01-H_9RE18o.js";import"./User01-CwCos6Py.js";import"./Users01-CqkgkQyP.js";import"./XClose-BAeGDKN0.js";import"./Zap-DVunWyGl.js";import"./use-automations-DmtHpUAX.js";import"./useSuspenseInfiniteQuery-ZWfPnVGO.js";import"./badge-CUmMlsBT.js";import"./checkbox-Ckmw9Mfi.js";import"./command-C07_gdqU.js";import"./index-ssrb4176.js";import"./dialog-WQh-gp8S.js";import"./popover-BWgdS4nk.js";import"./avatar-BYTTt2km.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-BQO62X_d.js";import"./file-type-icon-DN87_g0K.js";import"./monaco-editor-CAHRW4WA.js";import"./index-DBFf6th0.js";import"./index-DDqctd2I.js";import"./shell-layout-BH9Ivq57.js";import"./alert-dialog-DBB5CaN8.js";import"./required-auth-layout-BbJDdJdw.js";import"./use-org-sso-DwW4iwJx.js";import"./integration-icon-CSm7Qy8c.js";import"./use-navigate-to-agent-jx-u6VG0.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CPAe8LbH.js";import"./form-ChRNwWXa.js";import"./drawer-C1W7KPBD.js";import"./collection-search-DOi2t6LQ.js";import"./tabs-WNIrx41Q.js";import"./toggle-group-BhyMCiuu.js";import"./use-deco-credits-BrZmeIWZ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BYuySvJ3.js";import"./use-registry-connections-BLLAhhOv.js";import"./extract-connection-data-CeaTTHDG.js";import"./collection-tabs-Dmvezwf-.js";import"./connection-form-helpers-CGNedBLj.js";import"./authenticate-and-persist-oauth-D1WuDeU5.js";import"./mcp-oauth-DSz8vxQO.js";import"./connect-desktop-dialog-hKwz2gHB.js";import"./select-model-BLJUdbv5.js";import"./skeleton-CgTyvIfS.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-D69S9E0I.js";import"./dropdown-menu-D4PeOhjt.js";import"./index-SPy5-3x1.js";import"./toolbar-DUZ2w4vN.js";import"./use-debounced-value-CxU40MZW.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DtENtyxj.js";import"./use-mcp-tools-CP1pJ9FP.js";import"./use-capability-BigpWO7w.js";import"./tools-list-DvZ-3uOc.js";import"./switch-DkvkIrzq.js";import"./use-debounced-autosave-CNjFdqON.js";import"./index-CF7vJTQ1.js";import"./search-input-Bu2qiTLD.js";import"./github-repo-picker-qq2y6xuE.js";import"./github-installations-D2vHSx02.js";import"./use-secrets-D4wr9PP7.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./index-j_Vqvu4R.js";import"./get-initials-D-f_fDFw.js";import"./calendar-Y3krjFiC.js";import"./toolbar-icon-button-CyxV7J7K.js";import"./use-file-configs-xRl8wR9j.js";import"./automation-list-row-D9qq5pJq.js";const $={authors:[{key:"name",label:"Name",widget:"text"},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},q={authors:"Author"};function Lr(B){const t=S.c(34),{orgSlug:v,virtualMcpId:j,branch:w,kind:p,blockKey:g,block:f}=B;let y;t[0]!==w||t[1]!==v||t[2]!==j?(y={orgSlug:v,virtualMcpId:j,branch:w},t[0]=w,t[1]=v,t[2]=j,t[3]=y):y=t[3];const m=A(y);let d;t[4]!==f||t[5]!==p?(d=R(f,p),t[4]=f,t[5]=p,t[6]=d):d=t[6];const F=d;let h;t[7]!==g||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:g,data:J(g,p,e)})},t[7]=g,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=M(F,h);let k;t[11]!==i||t[12]!==E?(k=(e,o)=>E({...i,[e]:o}),t[11]=i,t[12]=E,t[13]=k):k=t[13];const a=k,N=q[p];let s;t[14]!==N?(s=r.jsx("span",{className:"text-sm font-medium",children:N}),t[14]=N,t[15]=s):s=t[15];let l;t[16]!==m.isError||t[17]!==m.isPending?(l=r.jsx(D,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=l):l=t[18];let n;t[19]!==s||t[20]!==l?(n=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[s,l]}),t[19]=s,t[20]=l,t[21]=n):n=t[21];const I=$[p];let c;if(t[22]!==i||t[23]!==a||t[24]!==I){let e;t[26]!==i||t[27]!==a?(e=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(K,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:u=>a(o.key,u),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(C,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:P(i[o.key]),onChange:u=>a(o.key,u.target.value),rows:3}):r.jsx(T,{id:o.key,value:P(i[o.key]),placeholder:o.placeholder,onChange:u=>a(o.key,u.target.value),className:"h-10"})]})},o.key),t[26]=i,t[27]=a,t[28]=e):e=t[28],c=I.map(e),t[22]=i,t[23]=a,t[24]=I,t[25]=c}else c=t[25];let x;t[29]!==c?(x=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:c})}),t[29]=c,t[30]=x):x=t[30];let b;return t[31]!==x||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,x]}),t[31]=x,t[32]=n,t[33]=b):b=t[33],b}export{Lr as RecordEditor};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BUy4U6hp.js","assets/index-Cvg8wlf2.js","assets/index-DhnTILyr.css","assets/Tool02-DpdINpQD.js","assets/CheckCircle-DRbpAaoA.js","assets/Settings02-BaPvDdXK.js","assets/use-mcp-client-CClO-4jR.js","assets/constants-CaIX_f5U.js","assets/auth-9zI7uyI_.js","assets/useInfiniteQuery-C9hUpVEm.js","assets/use-infinite-scroll-C9_S_5KL.js","assets/studio-tools-BgAyimPw.js","assets/badge-CUmMlsBT.js","assets/input-DxEfOo7U.js","assets/dropdown-menu-D4PeOhjt.js","assets/Check-BJiMMf7v.js","assets/ChevronRight-BjHi2zTb.js","assets/Circle--mEsLc32.js","assets/table-BmCQne9U.js","assets/toggle-group-BhyMCiuu.js","assets/use-view-mode-ChjXBCTX.js","assets/use-mobile-DE9td55c.js","assets/DotsVertical-C9eUzaCG.js","assets/FilterLines-CRMm2AqP.js","assets/Globe01-SD7o4WjA.js","assets/SearchMd-CPb906Aj.js","assets/dialog-WQh-gp8S.js","assets/X-B6q2eNkF.js","assets/AlertCircle-C__5mMuz.js","assets/Upload01-H_9RE18o.js","assets/alert-dialog-DBB5CaN8.js","assets/card-BKGavoj3.js","assets/Trash01-BaM_ljKo.js","assets/label-pwPiXf8V.js","assets/select-CIDMHDRe.js","assets/tooltip-CiXxbAOc.js","assets/ChevronDown-CBLc4m6w.js","assets/ChevronUp-DmNuFMik.js","assets/switch-DkvkIrzq.js","assets/textarea-CZTZGoFe.js","assets/XCircle-Vpo_BauK.js","assets/checkbox-Ckmw9Mfi.js","assets/Eye-CSrt2uwE.js","assets/LinkExternal01-B3st3yUn.js","assets/use-copy-BQO62X_d.js","assets/Copy01-D5lFZSIr.js","assets/Key01-DJNC5dou.js","assets/Plus-CdBUTSrl.js","assets/mcp-oauth-DSz8vxQO.js","assets/Play-BsdkOEt3.js"])))=>i.map(i=>d[i]);
2
- import{c as s,j as e,r as i,i as a,aW as o}from"./index-Cvg8wlf2.js";import{R as m}from"./require-capability-CCYSfrX4.js";import"./use-capability-BigpWO7w.js";import"./access-gate-BHgO0o7t.js";import"./capability-load-error-B_5imwHQ.js";const n=i.lazy(()=>o(()=>import("./registry-layout-BUy4U6hp.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,48,49])));function f(){const r=s.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(i.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};