decocms 3.26.2 → 3.27.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 (272) hide show
  1. package/dist/client/assets/{AlertCircle-9EFUZenf.js → AlertCircle-Dk6vk346.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-97355q5v.js → ArrowUpRight-4oEjocH3.js} +1 -1
  3. package/dist/client/assets/{Check-D-9dblUn.js → Check-xMlMIzVH.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-C2ualSpf.js → CheckCircle-ieh2HpZJ.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-Cf2Q-GlB.js → ChevronDown-DXk0XLak.js} +1 -1
  6. package/dist/client/assets/{ChevronLeft-BaV4nFMQ.js → ChevronLeft-z0R4UDTf.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-CrZy8tHx.js → ChevronRight-TZkuqway.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-BAxoXhnT.js → ChevronUp-CDwUhj6r.js} +1 -1
  9. package/dist/client/assets/{Container-CYcITvPW.js → Container-BuYdkyve.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-SvwN4CeV.js → DotsVertical-dauL8_mz.js} +1 -1
  11. package/dist/client/assets/{Eye-ByuwKsdh.js → Eye-DjmQZ2p3.js} +1 -1
  12. package/dist/client/assets/{FilterLines-BJZdiggU.js → FilterLines-DCVUz1mF.js} +1 -1
  13. package/dist/client/assets/{Globe01-DfGFlik1.js → Globe01-BFX2DjNo.js} +1 -1
  14. package/dist/client/assets/{HardDrive-DNFvbooP.js → HardDrive-ep-sJwLU.js} +1 -1
  15. package/dist/client/assets/{Key01-CzmPnHuw.js → Key01-u8nOkLN5.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-CQ8Vq9nI.js → LayoutLeft-Ozgz9jeL.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-CgI1VTqi.js → LinkExternal01-C_bnt3ki.js} +1 -1
  18. package/dist/client/assets/{Monitor01-Cw6kmClm.js → Monitor01-BBuvzSNf.js} +1 -1
  19. package/dist/client/assets/{Palette-Druykvzw.js → Palette-CJj0LVDj.js} +1 -1
  20. package/dist/client/assets/{Play-CMJ2IWYR.js → Play-BUy7F0as.js} +1 -1
  21. package/dist/client/assets/{Plus-CjrtKB-Y.js → Plus-CSmw6cpp.js} +1 -1
  22. package/dist/client/assets/{RefreshCcw01-3BsQQkRx.js → RefreshCcw01-Ct_5xx8z.js} +1 -1
  23. package/dist/client/assets/{SearchMd-BL2y99rx.js → SearchMd-DXp3IUvU.js} +1 -1
  24. package/dist/client/assets/{Settings02-Cd4DIqaJ.js → Settings02-DttqwSGe.js} +1 -1
  25. package/dist/client/assets/{Shield01-zIbMct6w.js → Shield01-BlrpeOP8.js} +1 -1
  26. package/dist/client/assets/{Star01-eRdSY4QW.js → Star01-s_hRJjwq.js} +1 -1
  27. package/dist/client/assets/{Stars01-v0yz6PCZ.js → Stars01-U1zM7H-d.js} +1 -1
  28. package/dist/client/assets/{Stars02-EuAFDZ5E.js → Stars02-Cg2K8h2t.js} +1 -1
  29. package/dist/client/assets/{Sun-CH2HWLCn.js → Sun-D1pch37z.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-BMnNI1Fi.js → SwitchHorizontal01-DUBxuMB8.js} +1 -1
  31. package/dist/client/assets/{Tool01-Dcq7KP8Y.js → Tool01-CSM07Bd3.js} +1 -1
  32. package/dist/client/assets/{Trash01-Cup7-ZTT.js → Trash01-BOiUMUTV.js} +1 -1
  33. package/dist/client/assets/{Upload01-C9yi1Bdg.js → Upload01-B45bupsd.js} +1 -1
  34. package/dist/client/assets/{User01-thAIxsAs.js → User01-CMlKZMq6.js} +1 -1
  35. package/dist/client/assets/{Users01-DPJm6-u-.js → Users01-CHcmgQX1.js} +1 -1
  36. package/dist/client/assets/{Users03-BlNe2PnN.js → Users03-C19XPgsH.js} +1 -1
  37. package/dist/client/assets/{X-1KR4wibP.js → X-LT7RIKGm.js} +1 -1
  38. package/dist/client/assets/{XCircle-UPVnJx4i.js → XCircle-fZmWWsk8.js} +1 -1
  39. package/dist/client/assets/{XClose-pR-QU0OQ.js → XClose-CXQHotFO.js} +1 -1
  40. package/dist/client/assets/{Zap-Cl-JM7N9.js → Zap-DhYBCL8w.js} +1 -1
  41. package/dist/client/assets/{ZapSquare-B1o2Q9OR.js → ZapSquare-Br5HjwCx.js} +1 -1
  42. package/dist/client/assets/{ZoomOut-D8vQ49we.js → ZoomOut-DiWWUJB1.js} +1 -1
  43. package/dist/client/assets/{access-gate-CWPebMdP.js → access-gate-CAbN0Agd.js} +1 -1
  44. package/dist/client/assets/{accordion-aX0NKKKh.js → accordion-CqS3rCYY.js} +1 -1
  45. package/dist/client/assets/add-section-modal-Xtytp9xF.js +1 -0
  46. package/dist/client/assets/agent-capabilities-CH2iEpSS.js +3 -0
  47. package/dist/client/assets/{agent-icon-DT8dQ9tq.js → agent-icon-DyETFFvd.js} +1 -1
  48. package/dist/client/assets/agent-icons-0as3WkuR.js +4 -0
  49. package/dist/client/assets/{agents-list-DDhPNISh.js → agents-list-CDTD2QQV.js} +1 -1
  50. package/dist/client/assets/ai-providers-CmBK6tVa.js +1 -0
  51. package/dist/client/assets/{alert-DyB_hFGI.js → alert-BvaxqAIW.js} +1 -1
  52. package/dist/client/assets/{alert-dialog-CSkQIwm8.js → alert-dialog-C_C5CWIi.js} +1 -1
  53. package/dist/client/assets/app-editor-BeU6l_dS.js +1 -0
  54. package/dist/client/assets/{auth-catchall-BUwhIhze.js → auth-catchall-DBSfiKWC.js} +1 -1
  55. package/dist/client/assets/{auth-split-layout-CY4CpKKX.js → auth-split-layout-CEZXGHtA.js} +1 -1
  56. package/dist/client/assets/{automation-list-row-5M4PNEWw.js → automation-list-row-s3KQqnbA.js} +1 -1
  57. package/dist/client/assets/automation-runs-RFg521Hi.js +1 -0
  58. package/dist/client/assets/{automations-Cy981ltn.js → automations-C4zBnLxc.js} +1 -1
  59. package/dist/client/assets/{avatar-BHEXMwdE.js → avatar-DI2KQvq0.js} +1 -1
  60. package/dist/client/assets/{badge-Da0IsrqH.js → badge-DqS5s_eb.js} +1 -1
  61. package/dist/client/assets/brand-context-Cg_N2T5g.js +1 -0
  62. package/dist/client/assets/buckets-CGFQSBKU.js +1 -0
  63. package/dist/client/assets/{calendar-BbhbS2FE.js → calendar-CuCfbpTI.js} +1 -1
  64. package/dist/client/assets/{capability-load-error-Dfw4xb8a.js → capability-load-error-DMe1nIxk.js} +1 -1
  65. package/dist/client/assets/{card-BUTabNLA.js → card-C0qmaAJH.js} +1 -1
  66. package/dist/client/assets/chat-context-DEKG6yp4.js +20 -0
  67. package/dist/client/assets/{checkbox--nDaSUZE.js → checkbox-ClCQ7aIa.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-CUSnxWUp.js → cli-auth-success-YaavH1FD.js} +1 -1
  69. package/dist/client/assets/collection-detail-TiY0uzM1.js +1 -0
  70. package/dist/client/assets/{collection-display-button-BfQyXSIv.js → collection-display-button-C6_DwOqJ.js} +1 -1
  71. package/dist/client/assets/{collection-search-LsgoMrVO.js → collection-search-uQS9yrST.js} +1 -1
  72. package/dist/client/assets/{collection-table-wrapper-D3ciIIEv.js → collection-table-wrapper-CTY0qyxJ.js} +1 -1
  73. package/dist/client/assets/{collection-tabs-CQJiHDMR.js → collection-tabs-dTL9gxGq.js} +1 -1
  74. package/dist/client/assets/{collections-C_j8CeI8.js → collections-5f6Mz9W3.js} +1 -1
  75. package/dist/client/assets/{command-BehF6pb8.js → command-DZekvH1G.js} +1 -1
  76. package/dist/client/assets/connect-desktop-dialog-Bi-Fd5NF.js +1 -0
  77. package/dist/client/assets/{connection-card-EXvV7rxl.js → connection-card-CVH5Hy6F.js} +1 -1
  78. package/dist/client/assets/connection-detail-mj8sHl20.js +1 -0
  79. package/dist/client/assets/{connection-form-helpers-DoJomSCQ.js → connection-form-helpers-DFXgro4O.js} +1 -1
  80. package/dist/client/assets/connections-D3Q6bIzz.js +1 -0
  81. package/dist/client/assets/{decopilot-sse-pool-BUhEcft-.js → decopilot-sse-pool-Keqs3wfV.js} +1 -1
  82. package/dist/client/assets/{dialog-Bm1pP7Vu.js → dialog-BE3BWPis.js} +1 -1
  83. package/dist/client/assets/domain-settings-Bq8L3_pf.js +1 -0
  84. package/dist/client/assets/{drawer-B51jkLaX.js → drawer-BSFXr7hp.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-CIu58K9q.js → dropdown-menu-D7fqzmBS.js} +1 -1
  86. package/dist/client/assets/dynamic-plugin-layout-CK3Aqazw.js +1 -0
  87. package/dist/client/assets/{empty-state-1AbmTLd7.js → empty-state-BumLAiri.js} +1 -1
  88. package/dist/client/assets/{empty-state-BfmCVPeb.js → empty-state-Eik7Dn7e.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-LoMqboL3.js → extract-connection-data-BLVQkjXZ.js} +1 -1
  90. package/dist/client/assets/{features-DWJ09Fdz.js → features-BPRhAfHF.js} +1 -1
  91. package/dist/client/assets/file-explorer-D9JJ-ABp.js +2 -0
  92. package/dist/client/assets/{file-type-icon-CX5JEvCQ.js → file-type-icon-I99Qy2JI.js} +1 -1
  93. package/dist/client/assets/{files-QExlaPCQ.js → files-Bo9D7ZcJ.js} +1 -1
  94. package/dist/client/assets/{form-BcPtow5O.js → form-Bn5_lJ6b.js} +1 -1
  95. package/dist/client/assets/general-BKEEaSjd.js +1 -0
  96. package/dist/client/assets/{generate-id-CadHbHqX.js → generate-id-D0pLsbUu.js} +1 -1
  97. package/dist/client/assets/{github-repo-picker-B24_pGAu.js → github-repo-picker-CKp3ba8m.js} +1 -1
  98. package/dist/client/assets/header-tab-button-CbbR6n8q.js +5 -0
  99. package/dist/client/assets/{hover-card-DE2_8MLP.js → hover-card-NLGI_Z11.js} +1 -1
  100. package/dist/client/assets/image-field-Baxidks4.js +1 -0
  101. package/dist/client/assets/{index-BflNEs6l.js → index-B-No0lhl.js} +1 -1
  102. package/dist/client/assets/{index-50-dmJFK.js → index-B6YB9tmn.js} +1 -1
  103. package/dist/client/assets/{index-B1bHiM-j.js → index-BE8dVooN.js} +1 -1
  104. package/dist/client/assets/index-BGdRrrmO.js +1 -0
  105. package/dist/client/assets/{index-J2NhKqyZ.js → index-BM5cVzVa.js} +5 -5
  106. package/dist/client/assets/{index-Dr4Isy1j.js → index-BTFwMarm.js} +1 -1
  107. package/dist/client/assets/{index-r7-3fAFf.js → index-Bgv8YQhF.js} +1 -1
  108. package/dist/client/assets/{index-biiHZ5l9.js → index-Bll1AlZi.js} +26 -26
  109. package/dist/client/assets/{index-D6ELOmUq.js → index-Bz4SrPhc.js} +1 -1
  110. package/dist/client/assets/{index-Bo5bzoUm.js → index-CF_awNaT.js} +1 -1
  111. package/dist/client/assets/{index-YdX5UjUB.js → index-ClpGtndr.js} +1 -1
  112. package/dist/client/assets/{index-CZJ35dl3.css → index-DfYyH4IW.css} +1 -1
  113. package/dist/client/assets/{index-CR_LeyNj.js → index-DxNfIzhJ.js} +1 -1
  114. package/dist/client/assets/{index-CHdFXpqc.js → index-YVfCniqO.js} +1 -1
  115. package/dist/client/assets/index-apuzt69p.js +310 -0
  116. package/dist/client/assets/index-bSiT8Vjd.js +1 -0
  117. package/dist/client/assets/{index-redirect-pPYMz5D6.js → index-redirect-DjHBgih0.js} +1 -1
  118. package/dist/client/assets/{infiniteQueryObserver-B0VBGXv5.js → infiniteQueryObserver-B-dakPwk.js} +1 -1
  119. package/dist/client/assets/{input-5PMMNPU9.js → input-CMMOM0dD.js} +1 -1
  120. package/dist/client/assets/{integration-icon-Dy-a3x5R.js → integration-icon-DblM7d27.js} +1 -1
  121. package/dist/client/assets/{label-CcC4_aKf.js → label-cKO6vIjy.js} +1 -1
  122. package/dist/client/assets/{layout-CbTbCjmA.js → layout-QBDJ_skY.js} +1 -1
  123. package/dist/client/assets/{login-Dn4EF5EK.js → login-BAGu_SJp.js} +1 -1
  124. package/dist/client/assets/members-C7uPVWw3.js +3 -0
  125. package/dist/client/assets/{monaco-editor-CJVi8Ty8.js → monaco-editor-BD33gVrt.js} +1 -1
  126. package/dist/client/assets/{monitoring-stats-row-BAplEVfE.js → monitoring-stats-row-Bvt3RsAI.js} +1 -1
  127. package/dist/client/assets/{oauth-callback-D5XAAL8p.js → oauth-callback-DvAeoSNI.js} +1 -1
  128. package/dist/client/assets/{oauth-callback-ai-provider-tGQCB63I.js → oauth-callback-ai-provider-BuhDe7NV.js} +1 -1
  129. package/dist/client/assets/{onboarding-CgvYwT2C.js → onboarding-DiyHWSGI.js} +1 -1
  130. package/dist/client/assets/{org-install-CV5qvXsE.js → org-install-B1rM2juw.js} +1 -1
  131. package/dist/client/assets/{org-layout-BFil8fwL.js → org-layout-Ck7vt_mB.js} +1 -1
  132. package/dist/client/assets/org-plugin-layout-Cc5oLilE.js +1 -0
  133. package/dist/client/assets/{page-seo-form-Bbna5w2y.js → page-seo-form-CTM0Xp8N.js} +1 -1
  134. package/dist/client/assets/page-seo-sheet-nSdCZ-KL.js +1 -0
  135. package/dist/client/assets/pair-BidrJ4sX.js +39 -0
  136. package/dist/client/assets/{plugin-empty-state-DM8dR2Wk.js → plugin-empty-state-CERz9K1r.js} +1 -1
  137. package/dist/client/assets/{plugin-header-CaWKfaZE.js → plugin-header-CISIxXxk.js} +1 -1
  138. package/dist/client/assets/plugin-layout-UkXtyZlZ.js +1 -0
  139. package/dist/client/assets/{popover-Cvcd3A1d.js → popover-CNh3Ozeq.js} +1 -1
  140. package/dist/client/assets/{post-editor-CM-ESdP7.js → post-editor-C3YLiXXM.js} +3 -3
  141. package/dist/client/assets/{primitives-DWXKnou4.js → primitives-Y0YbWOD4.js} +1 -1
  142. package/dist/client/assets/{profile-DmCC3zYK.js → profile-o29P_MC2.js} +1 -1
  143. package/dist/client/assets/project-app-view-DHVFZPIZ.js +1 -0
  144. package/dist/client/assets/record-editor-DtXRmftd.js +1 -0
  145. package/dist/client/assets/registry-jlRh9TsH.js +2 -0
  146. package/dist/client/assets/registry-layout-zUgwlIce.js +27 -0
  147. package/dist/client/assets/{require-capability-DVI2cKO3.js → require-capability-CQkA6hP5.js} +1 -1
  148. package/dist/client/assets/{required-auth-layout-zYH6NIDF.js → required-auth-layout-Sv9_QEzP.js} +1 -1
  149. package/dist/client/assets/{reset-password-DXXx8e6Q.js → reset-password-C1pH8pyn.js} +1 -1
  150. package/dist/client/assets/{resizable-BbbLszRZ.js → resizable-BTpQlX-z.js} +1 -1
  151. package/dist/client/assets/{roles-vHYrQg5g.js → roles-CL5RMNps.js} +1 -1
  152. package/dist/client/assets/save-referenced-block-JBVOc1Wy.js +1 -0
  153. package/dist/client/assets/{save-status-pJVz5vCQ.js → save-status-Dfy3Cw0L.js} +1 -1
  154. package/dist/client/assets/{schema-form-nZH-67HX.js → schema-form-BLq0KNxn.js} +1 -1
  155. package/dist/client/assets/{scroll-area-BqOijBAI.js → scroll-area-SRbC7c25.js} +1 -1
  156. package/dist/client/assets/{search-input-BgGthWir.js → search-input-JFEU6QlH.js} +1 -1
  157. package/dist/client/assets/secrets-DvkQvbwt.js +1 -0
  158. package/dist/client/assets/sections-editor-HXjdp6eB.js +2 -0
  159. package/dist/client/assets/{select-CNSUv3cw.js → select-CTk6Rsq0.js} +1 -1
  160. package/dist/client/assets/{select-model-0CGh6cKF.js → select-model-D2KMm6n2.js} +1 -1
  161. package/dist/client/assets/seo-editor-ifMY-Fw8.js +1 -0
  162. package/dist/client/assets/{settings-layout-DRYgevr6.js → settings-layout-BCPOwwNR.js} +1 -1
  163. package/dist/client/assets/{settings-section-V9kb8x32.js → settings-section-CcspUfab.js} +1 -1
  164. package/dist/client/assets/{sheet-D99KevZC.js → sheet-DokH5LKH.js} +1 -1
  165. package/dist/client/assets/{shell-controls-DSSWZ7Ia.js → shell-controls-rZZhpuW4.js} +1 -1
  166. package/dist/client/assets/{shell-layout-4LsIVsl3.js → shell-layout-DO1LZiwY.js} +1 -1
  167. package/dist/client/assets/shell-route-loading-DI9OtFHe.js +1 -0
  168. package/dist/client/assets/{sidebar-CPZXU-2w.js → sidebar-hk7mPADd.js} +1 -1
  169. package/dist/client/assets/{skeleton--DN75sg7.js → skeleton-CxMjy9Kg.js} +1 -1
  170. package/dist/client/assets/{sortable.esm-g7bq1nDZ.js → sortable.esm-BnSJaRIy.js} +1 -1
  171. package/dist/client/assets/{spinner-DJD6-9r-.js → spinner-Dstb6AhM.js} +1 -1
  172. package/dist/client/assets/sso-lfWsp7Wf.js +1 -0
  173. package/dist/client/assets/{store-DTK5DubB.js → store-CHpKgn9g.js} +1 -1
  174. package/dist/client/assets/store-registry-D9xAoVoW.js +2 -0
  175. package/dist/client/assets/studio-tools-I8Y7AvNq.js +1 -0
  176. package/dist/client/assets/{switch-D6SWnoi2.js → switch-Ds4XHhlB.js} +1 -1
  177. package/dist/client/assets/{tab-id-D4SJwEQy.js → tab-id-D_jK7L5o.js} +2 -2
  178. package/dist/client/assets/{table-Cx3PhNth.js → table-BvWfaT33.js} +1 -1
  179. package/dist/client/assets/{tabs-DCDCb9Pz.js → tabs-2_PrfGe1.js} +1 -1
  180. package/dist/client/assets/{task-status-P3BULAyA.js → task-status-CyBgq1B0.js} +1 -1
  181. package/dist/client/assets/{textarea-QEULyLXh.js → textarea-D7mZzw_Y.js} +1 -1
  182. package/dist/client/assets/{toggle-group-DhVqXGfs.js → toggle-group-CcV2qfqh.js} +1 -1
  183. package/dist/client/assets/{toolbar-BsB4Mvyv.js → toolbar-Vk0X9zFW.js} +1 -1
  184. package/dist/client/assets/{tools-list-Ch5RlbiL.js → tools-list-DZyHvyxj.js} +1 -1
  185. package/dist/client/assets/{tooltip-bsrBmmjV.js → tooltip-B2vnmSMM.js} +1 -1
  186. package/dist/client/assets/{types-jBdXInU0.js → types-DsBzghfJ.js} +1 -1
  187. package/dist/client/assets/use-ai-providers-BDbyWdvc.js +1 -0
  188. package/dist/client/assets/{use-automations-Db8x6SNU.js → use-automations-DjpksCFK.js} +1 -1
  189. package/dist/client/assets/{use-capability-BPM45mbW.js → use-capability-cYRWRLhr.js} +1 -1
  190. package/dist/client/assets/{use-collections-B5Jh_wGd.js → use-collections-DI2EpqEk.js} +1 -1
  191. package/dist/client/assets/{use-connection-DyJtuHQI.js → use-connection-Cam2HslE.js} +1 -1
  192. package/dist/client/assets/{use-copy-P6tx-uOp.js → use-copy-CyNGh3eK.js} +1 -1
  193. package/dist/client/assets/{use-create-virtual-mcp-CWYOy45e.js → use-create-virtual-mcp-TPoPQ6hG.js} +1 -1
  194. package/dist/client/assets/{use-debounced-autosave-ClLbciGl.js → use-debounced-autosave-b8Qk2OvK.js} +1 -1
  195. package/dist/client/assets/use-delete-connection-DXpw9Kqu.js +1 -0
  196. package/dist/client/assets/use-file-configs-J3tDrhRd.js +1 -0
  197. package/dist/client/assets/{use-infinite-scroll-xQQ6lYk4.js → use-infinite-scroll-CF4jvsDL.js} +1 -1
  198. package/dist/client/assets/{use-list-state-BZmeG7gi.js → use-list-state-C3OBf8IN.js} +1 -1
  199. package/dist/client/assets/{use-mcp-client-CWFUu1lY.js → use-mcp-client-Des-fSV9.js} +2 -2
  200. package/dist/client/assets/{use-mcp-prompts-B5RhBVzg.js → use-mcp-prompts-d7xtcVsP.js} +1 -1
  201. package/dist/client/assets/{use-mcp-tools-DePRGZE5.js → use-mcp-tools-DVBLMBo3.js} +1 -1
  202. package/dist/client/assets/{use-members-Cw70r_Wh.js → use-members-CTowYB9Z.js} +1 -1
  203. package/dist/client/assets/{use-navigate-to-agent-CdsMYUzL.js → use-navigate-to-agent-TzPRxzJx.js} +1 -1
  204. package/dist/client/assets/{use-org-auth-client--i_Sx92M.js → use-org-auth-client-uSzlmndB.js} +1 -1
  205. package/dist/client/assets/{use-org-sso-C1cJTBIx.js → use-org-sso-Bez1Sajf.js} +1 -1
  206. package/dist/client/assets/{use-organization-roles-ATKYiNpl.js → use-organization-roles-DfnjRa-5.js} +1 -1
  207. package/dist/client/assets/{use-organization-settings-Izqk1Gkk.js → use-organization-settings-B5dKExdR.js} +1 -1
  208. package/dist/client/assets/{use-registry-connections-C-WVKjSU.js → use-registry-connections-CWiPZtVM.js} +1 -1
  209. package/dist/client/assets/use-secrets-CrukgaJs.js +1 -0
  210. package/dist/client/assets/{use-status-sounds-BJ_LqdGJ.js → use-status-sounds-B1WepgCG.js} +1 -1
  211. package/dist/client/assets/{use-view-mode-CbT8E3wV.js → use-view-mode-q_aFx9Fj.js} +1 -1
  212. package/dist/client/assets/{use-virtual-mcp-0jbEmvOc.js → use-virtual-mcp-71PpEQrs.js} +1 -1
  213. package/dist/client/assets/useInfiniteQuery-Dl7i7ptk.js +1 -0
  214. package/dist/client/assets/{useRouterState-Dm0UHjU4.js → useRouterState-l6E4h2DF.js} +1 -1
  215. package/dist/client/assets/useSuspenseInfiniteQuery-CmT2FyND.js +1 -0
  216. package/dist/client/assets/user-ZvpM4E3a.js +1 -0
  217. package/dist/client/assets/{view-mode-toggle-G0qNMbJ1.js → view-mode-toggle-oQJDkJzK.js} +1 -1
  218. package/dist/client/assets/workflow-detail-Ba-EIKe1.js +1 -0
  219. package/dist/client/assets/workflow-i0CMnn6N.js +1 -0
  220. package/dist/client/index.html +2 -2
  221. package/dist/server/cli.js +439 -419
  222. package/dist/server/migrate.js +95 -95
  223. package/dist/server/server.js +287 -282
  224. package/package.json +1 -1
  225. package/dist/client/assets/add-section-modal-DbuGc2qc.js +0 -1
  226. package/dist/client/assets/agent-capabilities-BJLQSkAN.js +0 -3
  227. package/dist/client/assets/agent-icons-DRrDyR7j.js +0 -4
  228. package/dist/client/assets/ai-providers-GxPLAPId.js +0 -1
  229. package/dist/client/assets/app-editor-BsxVHV86.js +0 -1
  230. package/dist/client/assets/automation-runs-BJTRztep.js +0 -1
  231. package/dist/client/assets/brand-context-DTmvDRqf.js +0 -1
  232. package/dist/client/assets/buckets-Cv3AB_TT.js +0 -1
  233. package/dist/client/assets/chat-context-Bu6qpu9K.js +0 -20
  234. package/dist/client/assets/collection-detail-DHxXW6T4.js +0 -1
  235. package/dist/client/assets/connect-desktop-dialog-DPqrgnkS.js +0 -1
  236. package/dist/client/assets/connection-detail-58UbdFd3.js +0 -1
  237. package/dist/client/assets/connections-BMZIGugH.js +0 -1
  238. package/dist/client/assets/domain-settings-DHsRsnmX.js +0 -1
  239. package/dist/client/assets/dynamic-plugin-layout-DWE13BKk.js +0 -1
  240. package/dist/client/assets/file-explorer-Dmpsw-4-.js +0 -2
  241. package/dist/client/assets/general-CLesrOe8.js +0 -1
  242. package/dist/client/assets/header-tab-button-DSX6YPkf.js +0 -5
  243. package/dist/client/assets/image-field-D00iYa4G.js +0 -1
  244. package/dist/client/assets/index-BZvxagUr.js +0 -310
  245. package/dist/client/assets/index-CCs3Chg3.js +0 -1
  246. package/dist/client/assets/index-Db3P8pHg.js +0 -1
  247. package/dist/client/assets/members-BwcNzXwU.js +0 -3
  248. package/dist/client/assets/org-plugin-layout-DyCflrr1.js +0 -1
  249. package/dist/client/assets/page-seo-sheet-D9M3CoUb.js +0 -1
  250. package/dist/client/assets/pair-Ba1UoSSJ.js +0 -39
  251. package/dist/client/assets/plugin-layout-DrVKV-lp.js +0 -1
  252. package/dist/client/assets/project-app-view-C9azYjZP.js +0 -1
  253. package/dist/client/assets/record-editor-DJucp492.js +0 -1
  254. package/dist/client/assets/registry-hKns5OCc.js +0 -2
  255. package/dist/client/assets/registry-layout-DPaKDLDg.js +0 -27
  256. package/dist/client/assets/save-referenced-block-q2CPWVkl.js +0 -1
  257. package/dist/client/assets/secrets-YkTDT7yT.js +0 -1
  258. package/dist/client/assets/sections-editor-CSz4pxMw.js +0 -2
  259. package/dist/client/assets/seo-editor-CspZxazh.js +0 -1
  260. package/dist/client/assets/shell-route-loading-5KSwc3hj.js +0 -1
  261. package/dist/client/assets/sso-D04DjSnZ.js +0 -1
  262. package/dist/client/assets/store-registry-nABlp_7k.js +0 -2
  263. package/dist/client/assets/unwrap-tool-result-BYXdCQMg.js +0 -1
  264. package/dist/client/assets/use-ai-providers-v0sCRzMO.js +0 -1
  265. package/dist/client/assets/use-delete-connection-C60uGs0b.js +0 -1
  266. package/dist/client/assets/use-file-configs-CC8ghNUa.js +0 -1
  267. package/dist/client/assets/use-secrets-BpdIBEe6.js +0 -1
  268. package/dist/client/assets/useInfiniteQuery-BGg7INCQ.js +0 -1
  269. package/dist/client/assets/useSuspenseInfiniteQuery-B4dQiTEq.js +0 -1
  270. package/dist/client/assets/user-DRDdFgUw.js +0 -1
  271. package/dist/client/assets/workflow-D1PUPL3K.js +0 -1
  272. package/dist/client/assets/workflow-detail-CRUxUbKb.js +0 -1
@@ -1 +1 @@
1
- import{e as k,a as se,j as o,B as z,bJ as X,o as Z,F as me,b as Y,a4 as we,s as fe,K as re,bK as Se,bL as je,L as U,r as Q,bM as ve,bN as ke,n as oe,f as Ne,q as Oe,g as he,d as _e,$ as Ae,bO as Ce,bP as le,bQ as Ee,bR as Te,S as $e,O as ze,bS as Me}from"./index-biiHZ5l9.js";import{A as ge}from"./avatar-BHEXMwdE.js";import{t as Ie,a as Le}from"./Users03-BlNe2PnN.js";import{i as Fe,a as Pe,s as K,n as De}from"./Stars02-EuAFDZ5E.js";import{s as Re}from"./XClose-pR-QU0OQ.js";import{i as q}from"./CheckCircle-C2ualSpf.js";import{i as ce}from"./FilterLines-BJZdiggU.js";import{i as J}from"./Zap-Cl-JM7N9.js";import{a as Ke,b as qe,c as Ue,D as He}from"./dialog-Bm1pP7Vu.js";import{R as Ge}from"./required-auth-layout-zYH6NIDF.js";import{s as Be,n as We,v as Je,A as Qe}from"./tab-id-D4SJwEQy.js";import{g as Ye,m as Ve,S as Xe}from"./use-mcp-client-CWFUu1lY.js";import{c as Ze}from"./use-organization-settings-Izqk1Gkk.js";import{u as et}from"./use-org-sso-C1cJTBIx.js";function tt(t){const e=k.c(27),{orgName:n,orgSlug:s,orgLogo:r,domain:a}=t;let i;e[0]!==s?(i={mutationFn:async()=>{const x=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:s})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:x=>{window.location.href=`/${x.slug??s}`},onError:st},e[0]=s,e[1]=i):i=e[1];const l=se(i),d=nt;let c;e[2]!==r||e[3]!==n?(c=r?o.jsx(ge,{url:r,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(Ie,{className:"h-6 w-6 text-primary"})}),e[2]=r,e[3]=n,e[4]=c):c=e[4];let m;e[5]!==n?(m=o.jsxs("h3",{className:"text-lg font-medium",children:["Join ",n,"?"]}),e[5]=n,e[6]=m):m=e[6];let u;e[7]!==a?(u=o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",o.jsxs("strong",{children:["@",a]})," email can join this organization."]}),e[7]=a,e[8]=u):u=e[8];let p;e[9]!==m||e[10]!==u?(p=o.jsxs("div",{className:"space-y-2",children:[m,u]}),e[9]=m,e[10]=u,e[11]=p):p=e[11];let g;e[12]!==l?(g=()=>l.mutate(),e[12]=l,e[13]=g):g=e[13];const y=l.isPending?"Joining…":`Enter ${n}`;let f;e[14]!==l.isPending||e[15]!==g||e[16]!==y?(f=o.jsx(z,{onClick:g,disabled:l.isPending,children:y}),e[14]=l.isPending,e[15]=g,e[16]=y,e[17]=f):f=e[17];let h;e[18]!==l.isPending?(h=o.jsx(z,{variant:"ghost",onClick:d,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=h):h=e[19];let b;e[20]!==f||e[21]!==h?(b=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,h]}),e[20]=f,e[21]=h,e[22]=b):b=e[22];let S;return e[23]!==b||e[24]!==c||e[25]!==p?(S=o.jsxs(X,{children:[c,p,b]}),e[23]=b,e[24]=c,e[25]=p,e[26]=S):S=e[26],S}function nt(){window.location.href="/"}function st(t){Z.error(t instanceof Error?t.message:"Failed to join organization")}function de(t){const e=k.c(17),{orgSlug:n,orgName:s,reason:r}=t,a=ot,i=r==="not-found",l=i?Fe:me,d=i?"Organization not found":"No access";let c;e[0]!==i||e[1]!==s||e[2]!==n?(c=i?o.jsxs(o.Fragment,{children:["We couldn't find an organization called ",o.jsx("strong",{children:n}),"."]}):o.jsxs(o.Fragment,{children:["You don't have access to ",o.jsx("strong",{children:s??n}),".",o.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=i,e[1]=s,e[2]=n,e[3]=c):c=e[3];const m=c;let u;e[4]!==l?(u=o.jsx("div",{className:"bg-muted p-3 rounded-full",children:o.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=u):u=e[5];let p;e[6]!==d?(p=o.jsx("h3",{className:"text-lg font-medium",children:d}),e[6]=d,e[7]=p):p=e[7];let g;e[8]!==m?(g=o.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[8]=m,e[9]=g):g=e[9];let y;e[10]!==p||e[11]!==g?(y=o.jsxs("div",{className:"space-y-2",children:[p,g]}),e[10]=p,e[11]=g,e[12]=y):y=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(z,{onClick:a,children:"Go to home"}),e[13]=f):f=e[13];let h;return e[14]!==u||e[15]!==y?(h=o.jsxs(X,{children:[u,y,f]}),e[14]=u,e[15]=y,e[16]=h):h=e[16],h}function ot(){window.location.href="/"}function at(t){const e=k.c(39),{invitationId:n,orgName:s,orgSlug:r,orgLogo:a}=t;let i;e[0]!==n?(i=async()=>{const O=await Y.organization.acceptInvitation({invitationId:n});if(O.error)throw new Error(O.error.message);return O.data},e[0]=n,e[1]=i):i=e[1];let l;e[2]!==r?(l=()=>{we(),window.location.href=`/${r}`},e[2]=r,e[3]=l):l=e[3];let d;e[4]!==i||e[5]!==l?(d={mutationFn:i,onSuccess:l,onError:lt},e[4]=i,e[5]=l,e[6]=d):d=e[6];const c=se(d);let m;e[7]!==n?(m=async()=>{const O=await Y.organization.rejectInvitation({invitationId:n});if(O.error)throw new Error(O.error.message);return O.data},e[7]=n,e[8]=m):m=e[8];let u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=rt,e[9]=u):u=e[9];let p;e[10]!==m?(p={mutationFn:m,onSuccess:u,onError:it},e[10]=m,e[11]=p):p=e[11];const g=se(p),y=c.isPending||g.isPending;let f;e[12]!==a||e[13]!==s?(f=a?o.jsx(ge,{url:a,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(Pe,{className:"h-6 w-6 text-primary"})}),e[12]=a,e[13]=s,e[14]=f):f=e[14];let h;e[15]!==s?(h=o.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",o.jsx("strong",{children:s})]}),e[15]=s,e[16]=h):h=e[16];let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=b):b=e[17];let S;e[18]!==h?(S=o.jsxs("div",{className:"space-y-2",children:[h,b]}),e[18]=h,e[19]=S):S=e[19];let x;e[20]!==c?(x=()=>c.mutate(),e[20]=c,e[21]=x):x=e[21];const v=c.isPending?"Accepting…":"Accept invitation";let _;e[22]!==y||e[23]!==x||e[24]!==v?(_=o.jsx(z,{onClick:x,disabled:y,children:v}),e[22]=y,e[23]=x,e[24]=v,e[25]=_):_=e[25];let N;e[26]!==g?(N=()=>g.mutate(),e[26]=g,e[27]=N):N=e[27];const w=g.isPending?"Declining…":"Decline";let A;e[28]!==y||e[29]!==N||e[30]!==w?(A=o.jsx(z,{variant:"ghost",onClick:N,disabled:y,children:w}),e[28]=y,e[29]=N,e[30]=w,e[31]=A):A=e[31];let C;e[32]!==_||e[33]!==A?(C=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,A]}),e[32]=_,e[33]=A,e[34]=C):C=e[34];let E;return e[35]!==S||e[36]!==C||e[37]!==f?(E=o.jsxs(X,{children:[f,S,C]}),e[35]=S,e[36]=C,e[37]=f,e[38]=E):E=e[38],E}function it(t){Z.error(t instanceof Error?t.message:"Failed to decline invitation")}function rt(){Z.success("Invitation declined"),window.location.href="/"}function lt(t){Z.error(t instanceof Error?t.message:"Failed to accept invitation")}function ct(t){const e=k.c(7);let n;e[0]!==t?(n=re.orgAccessStatus(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==t?(s=async()=>{const a=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!a.ok)throw new Error(`org-access-status failed (${a.status})`);return await a.json()},e[2]=t,e[3]=s):s=e[3];let r;return e[4]!==n||e[5]!==s?(r={queryKey:n,queryFn:s,refetchOnWindowFocus:!1},e[4]=n,e[5]=s,e[6]=r):r=e[6],fe(r)}function dt({orgSlug:t}){const{data:e}=ct(t);return(e.status==="not-found"||e.status==="no-access")&&(Se()?.org===t&&je(),localStorage.getItem(U.lastOrgSlug())===t)?(localStorage.removeItem(U.lastOrgSlug()),window.location.href="/",null):e.status==="not-found"?o.jsx(de,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?o.jsx(at,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?o.jsx(tt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="member"?(window.location.reload(),null):o.jsx(de,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function ut(t){const e=k.c(20),{release:n,onCtaClick:s,onLearnMoreClick:r}=t;let a;e[0]!==n.eyebrow?(a=n.eyebrow&&o.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[0]=n.eyebrow,e[1]=a):a=e[1];let i;e[2]!==n.title?(i=o.jsx("h3",{className:"text-base font-semibold text-foreground",children:n.title}),e[2]=n.title,e[3]=i):i=e[3];let l;e[4]!==a||e[5]!==i?(l=o.jsxs("div",{children:[a,i]}),e[4]=a,e[5]=i,e[6]=l):l=e[6];let d;e[7]!==n.bullets?(d=n.bullets.map(mt),e[7]=n.bullets,e[8]=d):d=e[8];let c;e[9]!==d?(c=o.jsx("ul",{className:"flex flex-col gap-3",children:d}),e[9]=d,e[10]=c):c=e[10];let m;e[11]!==s||e[12]!==r||e[13]!==n.cta||e[14]!==n.learnMoreHref?(m=(n.cta||n.learnMoreHref)&&o.jsxs("div",{className:"flex items-center justify-between pt-1",children:[n.learnMoreHref?o.jsx("a",{href:n.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:r,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):o.jsx("span",{}),n.cta&&o.jsx(z,{asChild:!0,size:"sm",onClick:s,children:o.jsx("a",{href:n.cta.href,children:n.cta.label})})]}),e[11]=s,e[12]=r,e[13]=n.cta,e[14]=n.learnMoreHref,e[15]=m):m=e[15];let u;return e[16]!==l||e[17]!==c||e[18]!==m?(u=o.jsxs("div",{className:"flex flex-col gap-3",children:[l,c,m]}),e[16]=l,e[17]=c,e[18]=m,e[19]=u):u=e[19],u}function mt(t,e){return o.jsxs("li",{className:"flex items-start gap-3",children:[o.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),o.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const pe=[{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:q,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:K,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:J,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:K,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:q,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:J,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:K,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:q,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:J,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:K,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ce,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:q,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:Le,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:J,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:q,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:K,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ce,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:K,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:De,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],V="studio.release-feed.v1",ae=new Set;let I="",L={},ie=!1;function ft(){if(ie)return I||"{}";try{return localStorage.getItem(V)??"{}"}catch{return I||"{}"}}function ye(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function ue(){const t=ft();return t!==I&&(I=t,L=ye(t)),L}function ht(t){ae.add(t);const e=n=>{if(!(n.key!==V&&n.key!==null)){try{const s=localStorage.getItem(V)??"{}",a={...ye(s),...L};L=a,I=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{ae.delete(t),window.removeEventListener("storage",e)}}function gt(t){L=t,I=JSON.stringify(t);try{localStorage.setItem(V,I),ie=!1}catch{ie=!0}ae.forEach(e=>e())}function pt(){const t=k.c(7),e=Q.useSyncExternalStore(ht,ue,ue);let n;t[0]!==e?(n=d=>!!e[d],t[0]=e,t[1]=n):n=t[1];const s=n,r=yt;let a;t[2]!==e?(a=pe.reduce((d,c)=>e[c.id]?d:d+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let l;return t[4]!==s||t[5]!==i?(l={isSeen:s,markSeen:r,unseenCount:i},t[4]=s,t[5]=i,t[6]=l):l=t[6],l}function yt(t){L[t]||gt({...L,[t]:{seenAt:new Date().toISOString()}})}const bt=720*60*60*1e3;function xt(t){const[e,n,s]=t.split("-").map(Number);return!e||!n||!s?new Date(t).getTime():new Date(e,n-1,s).getTime()}function wt(t){const e=pe[0];if(!e)return null;const n=xt(e.date),s=t-n;return s<0||s>bt?null:e}function St(){const t=k.c(21),{isSeen:e,markSeen:n}=pt();let s,r,a;if(t[0]!==e){a=Symbol.for("react.early_return_sentinel");e:{if(s=wt(Date.now()),!s){a=null;break e}r=e(s.id)}t[0]=e,t[1]=s,t[2]=r,t[3]=a}else s=t[1],r=t[2],a=t[3];if(a!==Symbol.for("react.early_return_sentinel"))return a;if(r)return null;let i;t[4]!==s.id||t[5]!==n?(i=()=>n(s.id),t[4]=s.id,t[5]=n,t[6]=i):i=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(Re,{size:14}),t[7]=l):l=t[7];let d;t[8]!==i?(d=o.jsx(z,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-2 top-2 size-7 text-muted-foreground",onClick:i,children:l}),t[8]=i,t[9]=d):d=t[9];let c,m;t[10]!==s.id||t[11]!==n?(c=()=>n(s.id),m=()=>n(s.id),t[10]=s.id,t[11]=n,t[12]=c,t[13]=m):(c=t[12],m=t[13]);let u;t[14]!==s||t[15]!==c||t[16]!==m?(u=o.jsx(ut,{release:s,onCtaClick:c,onLearnMoreClick:m}),t[14]=s,t[15]=c,t[16]=m,t[17]=u):u=t[17];let p;return t[18]!==d||t[19]!==u?(p=o.jsxs("div",{role:"dialog","aria-label":"Release announcement",className:"fixed bottom-6 right-6 z-50 w-[min(360px,calc(100vw-3rem))] rounded-lg border border-border bg-background p-4 shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[d,u]}),t[18]=d,t[19]=u,t[20]=p):p=t[20],p}const be=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),M=be?"⌘":"Ctrl",$={keyboardShortcuts:{keys:[M,"K"],description:"Keyboard shortcuts"},focusChatInput:{keys:[M,"L"],description:"Focus chat input"},saveAndFormat:{keys:[M,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[M,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[M,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",M,"S"],description:"New task"},toggleDaemon:{keys:[M,"D"],description:"Toggle daemon logs"}},jt=[{label:"General",shortcuts:[$.keyboardShortcuts,$.newTask,$.toggleDaemon]},{label:"Editor",shortcuts:[$.saveAndFormat]},{label:"Chat",shortcuts:[$.focusChatInput,$.togglePlanMode,$.sendMessage,$.newLine]},{label:"Questions",shortcuts:[$.selectOption]},{label:"Monitoring",shortcuts:[$.applyFilter]}];function vt(t){return be?t.metaKey:t.ctrlKey}function kt(t){const e=k.c(5),{open:n,onOpenChange:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(qe,{children:o.jsx(Ue,{children:"Keyboard Shortcuts"})}),e[0]=r):r=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsxs(Ke,{className:"sm:max-w-md",children:[r,o.jsx("div",{className:"flex flex-col gap-4",children:jt.map(Nt)})]}),e[1]=a):a=e[1];let i;return e[2]!==s||e[3]!==n?(i=o.jsx(He,{open:n,onOpenChange:s,children:a}),e[2]=s,e[3]=n,e[4]=i):i=e[4],i}function Nt(t){return o.jsxs("div",{children:[o.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),o.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Ot)})]},t.label)}function Ot(t){return o.jsxs("div",{className:"flex items-center justify-between py-1",children:[o.jsx("span",{className:"text-sm",children:t.description}),o.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(_t)})]},t.description)}function _t(t){return o.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}function At({activeOrg:t}){return t&&(ve(t.id,{name:t.name??void 0,slug:t.slug??void 0}),ke()),null}function Ct(t,e,n){if(!n)return null;const s=Be(t,e);return s?s.threads.get().find(a=>a.id===n)?.branch??null:null}function xe(t){return{queryKey:re.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function Xt(t){const e=k.c(10);let n;e[0]!==t?(n=xe(t),e[0]=t,e[1]=n):n=e[1];const s=oe(n);let r;e[2]!==s.data?.prompts?(r=s.data?.prompts??[],e[2]=s.data?.prompts,e[3]=r):r=e[3];let a;e[4]!==s.data?.tiles?(a=s.data?.tiles??[],e[4]=s.data?.tiles,e[5]=a):a=e[5];let i;return e[6]!==s.isLoading||e[7]!==r||e[8]!==a?(i={isLoading:s.isLoading,prompts:r,tiles:a},e[6]=s.isLoading,e[7]=r,e[8]=a,e[9]=i):i=e[9],i}function Et(t){const e=k.c(17),{orgSlug:n,orgName:s,domain:r}=t;let a;e[0]!==n?(a=()=>{window.location.href=`/api/${encodeURIComponent(n)}/sso/authorize`},e[0]=n,e[1]=a):a=e[1];const i=a,l=Tt;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(me,{className:"h-6 w-6 text-primary"})}),e[2]=d):d=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=c):c=e[3];let m;e[4]!==r||e[5]!==s?(m=s?o.jsxs(o.Fragment,{children:[o.jsx("strong",{children:s})," requires SSO authentication",r?` via ${r}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=r,e[5]=s,e[6]=m):m=e[6];let u;e[7]!==m?(u=o.jsxs("div",{className:"space-y-2",children:[c,o.jsx("p",{className:"text-sm text-muted-foreground",children:m})]}),e[7]=m,e[8]=u):u=e[8];let p;e[9]!==i?(p=o.jsx(z,{onClick:i,children:"Sign in with SSO"}),e[9]=i,e[10]=p):p=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(z,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=g):g=e[11];let y;e[12]!==p?(y=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[p,g]}),e[12]=p,e[13]=y):y=e[13];let f;return e[14]!==u||e[15]!==y?(f=o.jsxs(X,{children:[d,u,y]}),e[14]=u,e[15]=y,e[16]=f):f=e[16],f}function Tt(){window.location.href="/"}function $t(t){const e=k.c(8),{org:n,children:s}=t,a=Ze(n.id,n.slug)?.enabled_plugins??null;let i;e[0]!==n.id||e[1]!==n.name||e[2]!==a?(i={id:n.id,organizationId:n.id,slug:"_org",name:n.name,enabledPlugins:a,ui:null},e[0]=n.id,e[1]=n.name,e[2]=a,e[3]=i):i=e[3];const l=i;let d;return e[4]!==s||e[5]!==n||e[6]!==l?(d=o.jsx(Me,{org:n,project:l,children:s}),e[4]=s,e[5]=n,e[6]=l,e[7]=d):d=e[7],d}function zt(){const t=Ne(),e=We(),{org:n,locator:s}=Oe(),r=he({strict:!1}),a=_e({strict:!1}),i=r.org??"",l=r.taskId??"",d=(f,h,b=!0)=>t({to:"/$org/$taskId",params:{org:i,taskId:f},search:h,replace:b}),c=(f,h=!0)=>d(l,f,h),m=f=>c(h=>({...h,chat:f?1:0})),u=(f,h,b)=>d(f,S=>{const x={chat:1};h?x.virtualmcpid=h:S.virtualmcpid&&(x.virtualmcpid=S.virtualmcpid);const v=S.main;return v&&typeof v=="string"&&!Je(v)&&(x.main=v),b?.autosend&&(x.autosend=Qe),x},!1);return{setChatOpen:m,setTaskId:u,createNewTask:async f=>{const h=crypto.randomUUID(),b=f??a.virtualmcpid??Ye(n.id).id,x=b===a.virtualmcpid?Ct(n.slug,s,l):null;try{await e?.create({id:h,virtual_mcp_id:b,...x?{branch:x}:{}})}catch{}u(h,b)},openTab:f=>d(l||crypto.randomUUID(),h=>({...h,main:f})),toggleMain:()=>c(f=>{if(f.main!==void 0&&f.main!=="0")return{...f,main:"0"};const b={...f};return delete b.main,b})}}function Mt(){const t=k.c(51);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const s=Ae(e)?.params.org;let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const{taskId:a}=he(r),[i,l]=Q.useState(!1),d=s??"";let c;t[2]!==d?(c=xe(d),t[2]=d,t[3]=c):c=t[3];const m=!!s&&!a;let u;t[4]!==c||t[5]!==m?(u={...c,enabled:m},t[4]=c,t[5]=m,t[6]=u):u=t[6],oe(u);const{data:p}=Y.useSession(),g=p?.user?.id;let y;t[7]!==s||t[8]!==g?(y=s&&g?Ce(g,s):null,t[7]=s,t[8]=g,t[9]=y):y=t[9];const f=y;let h,b;t[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{const j=T=>{vt(T)&&T.code==="KeyK"&&(T.preventDefault(),l(!0))};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},b=[],t[10]=h,t[11]=b):(h=t[10],b=t[11]),Q.useEffect(h,b);let S;t[12]!==s?(S=re.activeOrganization(s),t[12]=s,t[13]=S):S=t[13];let x;t[14]!==s||t[15]!==g?(x=async()=>{if(!s)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await Y.organization.getFullOrganization({query:{organizationSlug:s}}).finally(It),T=le(j);return j&&!T&&localStorage.setItem(U.lastOrgSlug(),s),g&&j&&Te(g,s,j),j},t[14]=s,t[15]=g,t[16]=x):x=t[16];const v=f?f.data:void 0,_=f?.updatedAt;let N;t[17]!==x||t[18]!==v||t[19]!==_||t[20]!==S?(N={queryKey:S,queryFn:x,initialData:v,initialDataUpdatedAt:_,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=x,t[18]=v,t[19]=_,t[20]=S,t[21]=N):N=t[21];const{data:w}=fe(N),A=w?.id,C=w?.slug,{data:E}=et(A,C),O=A??"",ee=C??"";let F;t[22]!==O||t[23]!==ee?(F=Ve({connectionId:Xe,orgId:O,orgSlug:ee}),t[22]=O,t[23]=ee,t[24]=F):F=t[24];const te=!!A&&!!C;let H;if(t[25]!==F||t[26]!==te?(H={...F,enabled:te},t[25]=F,t[26]=te,t[27]=H):H=t[27],oe(H),!w){let j;t[28]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx($e,{}),t[28]=j):j=t[28];let T;return t[29]!==s?(T=o.jsx(Q.Suspense,{fallback:j,children:o.jsx(dt,{orgSlug:s})}),t[29]=s,t[30]=T):T=t[30],T}if(le(w)){localStorage.getItem(U.lastOrgSlug())===s&&localStorage.removeItem(U.lastOrgSlug());let j;return t[31]!==w.name?(j=o.jsx(Ee,{orgName:w.name}),t[31]=w.name,t[32]=j):j=t[32],j}if(E?.ssoRequired&&!E.authenticated){let j;return t[33]!==w.id||t[34]!==w.name||t[35]!==w.slug||t[36]!==E.domain?(j=o.jsx(Et,{orgId:w.id,orgSlug:w.slug,orgName:w.name,domain:E.domain}),t[33]=w.id,t[34]=w.name,t[35]=w.slug,t[36]=E.domain,t[37]=j):j=t[37],j}const ne=w.logo??null;let P;t[38]!==w||t[39]!==ne?(P={...w,logo:ne},t[38]=w,t[39]=ne,t[40]=P):P=t[40];let D;t[41]!==w?(D=o.jsx(At,{activeOrg:w}),t[41]=w,t[42]=D):D=t[42];let G,B;t[43]===Symbol.for("react.memo_cache_sentinel")?(G=o.jsx(ze,{}),B=o.jsx(St,{}),t[43]=G,t[44]=B):(G=t[43],B=t[44]);let R;t[45]!==i?(R=o.jsx(kt,{open:i,onOpenChange:l}),t[45]=i,t[46]=R):R=t[46];let W;return t[47]!==P||t[48]!==D||t[49]!==R?(W=o.jsxs($t,{org:P,children:[D,G,B,R]}),t[47]=P,t[48]=D,t[49]=R,t[50]=W):W=t[50],W}function It(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Lt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Ge,{children:o.jsx(Mt,{})}),t[0]=e):e=t[0],e}const Zt=Object.freeze(Object.defineProperty({__proto__:null,default:Lt,usePanelActions:zt},Symbol.toStringTag,{value:"Module"}));export{$ as K,pe as R,pt as a,ut as b,Xt as c,xe as h,vt as i,Ct as r,Zt as s,zt as u};
1
+ import{e as k,a as se,j as o,B as z,bJ as X,o as Z,F as me,b as Y,a4 as we,s as fe,K as re,bK as Se,bL as je,L as U,r as Q,bM as ve,bN as ke,n as oe,f as Ne,q as Oe,g as he,d as _e,$ as Ae,bO as Ce,bP as le,bQ as Ee,bR as Te,S as $e,O as ze,bS as Me}from"./index-Bll1AlZi.js";import{A as ge}from"./avatar-DI2KQvq0.js";import{t as Ie,a as Le}from"./Users03-C19XPgsH.js";import{i as Fe,a as Pe,s as q,n as De}from"./Stars02-Cg2K8h2t.js";import{s as Re}from"./XClose-CXQHotFO.js";import{i as K}from"./CheckCircle-ieh2HpZJ.js";import{i as ce}from"./FilterLines-DCVUz1mF.js";import{i as J}from"./Zap-DhYBCL8w.js";import{a as qe,b as Ke,c as Ue,D as He}from"./dialog-BE3BWPis.js";import{R as Ge}from"./required-auth-layout-Sv9_QEzP.js";import{q as Be,m as We,s as Je,A as Qe}from"./tab-id-D_jK7L5o.js";import{g as Ye,m as Ve,a as Xe}from"./use-mcp-client-Des-fSV9.js";import{c as Ze}from"./use-organization-settings-B5dKExdR.js";import{u as et}from"./use-org-sso-Bez1Sajf.js";function tt(t){const e=k.c(27),{orgName:n,orgSlug:s,orgLogo:r,domain:a}=t;let i;e[0]!==s?(i={mutationFn:async()=>{const x=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:s})}),v=await x.json();if(!x.ok||!v.success)throw new Error(v.error??"Failed to join organization");return v},onSuccess:x=>{window.location.href=`/${x.slug??s}`},onError:st},e[0]=s,e[1]=i):i=e[1];const l=se(i),d=nt;let c;e[2]!==r||e[3]!==n?(c=r?o.jsx(ge,{url:r,fallback:n.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(Ie,{className:"h-6 w-6 text-primary"})}),e[2]=r,e[3]=n,e[4]=c):c=e[4];let m;e[5]!==n?(m=o.jsxs("h3",{className:"text-lg font-medium",children:["Join ",n,"?"]}),e[5]=n,e[6]=m):m=e[6];let u;e[7]!==a?(u=o.jsxs("p",{className:"text-sm text-muted-foreground",children:["Anyone with an ",o.jsxs("strong",{children:["@",a]})," email can join this organization."]}),e[7]=a,e[8]=u):u=e[8];let p;e[9]!==m||e[10]!==u?(p=o.jsxs("div",{className:"space-y-2",children:[m,u]}),e[9]=m,e[10]=u,e[11]=p):p=e[11];let g;e[12]!==l?(g=()=>l.mutate(),e[12]=l,e[13]=g):g=e[13];const y=l.isPending?"Joining…":`Enter ${n}`;let f;e[14]!==l.isPending||e[15]!==g||e[16]!==y?(f=o.jsx(z,{onClick:g,disabled:l.isPending,children:y}),e[14]=l.isPending,e[15]=g,e[16]=y,e[17]=f):f=e[17];let h;e[18]!==l.isPending?(h=o.jsx(z,{variant:"ghost",onClick:d,disabled:l.isPending,children:"Go to home"}),e[18]=l.isPending,e[19]=h):h=e[19];let b;e[20]!==f||e[21]!==h?(b=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[f,h]}),e[20]=f,e[21]=h,e[22]=b):b=e[22];let S;return e[23]!==b||e[24]!==c||e[25]!==p?(S=o.jsxs(X,{children:[c,p,b]}),e[23]=b,e[24]=c,e[25]=p,e[26]=S):S=e[26],S}function nt(){window.location.href="/"}function st(t){Z.error(t instanceof Error?t.message:"Failed to join organization")}function de(t){const e=k.c(17),{orgSlug:n,orgName:s,reason:r}=t,a=ot,i=r==="not-found",l=i?Fe:me,d=i?"Organization not found":"No access";let c;e[0]!==i||e[1]!==s||e[2]!==n?(c=i?o.jsxs(o.Fragment,{children:["We couldn't find an organization called ",o.jsx("strong",{children:n}),"."]}):o.jsxs(o.Fragment,{children:["You don't have access to ",o.jsx("strong",{children:s??n}),".",o.jsx("br",{}),"Ask an admin to invite you."]}),e[0]=i,e[1]=s,e[2]=n,e[3]=c):c=e[3];const m=c;let u;e[4]!==l?(u=o.jsx("div",{className:"bg-muted p-3 rounded-full",children:o.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),e[4]=l,e[5]=u):u=e[5];let p;e[6]!==d?(p=o.jsx("h3",{className:"text-lg font-medium",children:d}),e[6]=d,e[7]=p):p=e[7];let g;e[8]!==m?(g=o.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[8]=m,e[9]=g):g=e[9];let y;e[10]!==p||e[11]!==g?(y=o.jsxs("div",{className:"space-y-2",children:[p,g]}),e[10]=p,e[11]=g,e[12]=y):y=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(z,{onClick:a,children:"Go to home"}),e[13]=f):f=e[13];let h;return e[14]!==u||e[15]!==y?(h=o.jsxs(X,{children:[u,y,f]}),e[14]=u,e[15]=y,e[16]=h):h=e[16],h}function ot(){window.location.href="/"}function at(t){const e=k.c(39),{invitationId:n,orgName:s,orgSlug:r,orgLogo:a}=t;let i;e[0]!==n?(i=async()=>{const O=await Y.organization.acceptInvitation({invitationId:n});if(O.error)throw new Error(O.error.message);return O.data},e[0]=n,e[1]=i):i=e[1];let l;e[2]!==r?(l=()=>{we(),window.location.href=`/${r}`},e[2]=r,e[3]=l):l=e[3];let d;e[4]!==i||e[5]!==l?(d={mutationFn:i,onSuccess:l,onError:lt},e[4]=i,e[5]=l,e[6]=d):d=e[6];const c=se(d);let m;e[7]!==n?(m=async()=>{const O=await Y.organization.rejectInvitation({invitationId:n});if(O.error)throw new Error(O.error.message);return O.data},e[7]=n,e[8]=m):m=e[8];let u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=rt,e[9]=u):u=e[9];let p;e[10]!==m?(p={mutationFn:m,onSuccess:u,onError:it},e[10]=m,e[11]=p):p=e[11];const g=se(p),y=c.isPending||g.isPending;let f;e[12]!==a||e[13]!==s?(f=a?o.jsx(ge,{url:a,fallback:s.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-12 w-12"}):o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(Pe,{className:"h-6 w-6 text-primary"})}),e[12]=a,e[13]=s,e[14]=f):f=e[14];let h;e[15]!==s?(h=o.jsxs("h3",{className:"text-lg font-medium",children:["You've been invited to ",o.jsx("strong",{children:s})]}),e[15]=s,e[16]=h):h=e[16];let b;e[17]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx("p",{className:"text-sm text-muted-foreground",children:"Accept the invitation to join this organization."}),e[17]=b):b=e[17];let S;e[18]!==h?(S=o.jsxs("div",{className:"space-y-2",children:[h,b]}),e[18]=h,e[19]=S):S=e[19];let x;e[20]!==c?(x=()=>c.mutate(),e[20]=c,e[21]=x):x=e[21];const v=c.isPending?"Accepting…":"Accept invitation";let _;e[22]!==y||e[23]!==x||e[24]!==v?(_=o.jsx(z,{onClick:x,disabled:y,children:v}),e[22]=y,e[23]=x,e[24]=v,e[25]=_):_=e[25];let N;e[26]!==g?(N=()=>g.mutate(),e[26]=g,e[27]=N):N=e[27];const w=g.isPending?"Declining…":"Decline";let A;e[28]!==y||e[29]!==N||e[30]!==w?(A=o.jsx(z,{variant:"ghost",onClick:N,disabled:y,children:w}),e[28]=y,e[29]=N,e[30]=w,e[31]=A):A=e[31];let C;e[32]!==_||e[33]!==A?(C=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,A]}),e[32]=_,e[33]=A,e[34]=C):C=e[34];let E;return e[35]!==S||e[36]!==C||e[37]!==f?(E=o.jsxs(X,{children:[f,S,C]}),e[35]=S,e[36]=C,e[37]=f,e[38]=E):E=e[38],E}function it(t){Z.error(t instanceof Error?t.message:"Failed to decline invitation")}function rt(){Z.success("Invitation declined"),window.location.href="/"}function lt(t){Z.error(t instanceof Error?t.message:"Failed to accept invitation")}function ct(t){const e=k.c(7);let n;e[0]!==t?(n=re.orgAccessStatus(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==t?(s=async()=>{const a=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!a.ok)throw new Error(`org-access-status failed (${a.status})`);return await a.json()},e[2]=t,e[3]=s):s=e[3];let r;return e[4]!==n||e[5]!==s?(r={queryKey:n,queryFn:s,refetchOnWindowFocus:!1},e[4]=n,e[5]=s,e[6]=r):r=e[6],fe(r)}function dt({orgSlug:t}){const{data:e}=ct(t);return(e.status==="not-found"||e.status==="no-access")&&(Se()?.org===t&&je(),localStorage.getItem(U.lastOrgSlug())===t)?(localStorage.removeItem(U.lastOrgSlug()),window.location.href="/",null):e.status==="not-found"?o.jsx(de,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?o.jsx(at,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?o.jsx(tt,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="member"?(window.location.reload(),null):o.jsx(de,{orgSlug:t,orgName:e.organization.name,reason:"no-access"})}function ut(t){const e=k.c(20),{release:n,onCtaClick:s,onLearnMoreClick:r}=t;let a;e[0]!==n.eyebrow?(a=n.eyebrow&&o.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[0]=n.eyebrow,e[1]=a):a=e[1];let i;e[2]!==n.title?(i=o.jsx("h3",{className:"text-base font-semibold text-foreground",children:n.title}),e[2]=n.title,e[3]=i):i=e[3];let l;e[4]!==a||e[5]!==i?(l=o.jsxs("div",{children:[a,i]}),e[4]=a,e[5]=i,e[6]=l):l=e[6];let d;e[7]!==n.bullets?(d=n.bullets.map(mt),e[7]=n.bullets,e[8]=d):d=e[8];let c;e[9]!==d?(c=o.jsx("ul",{className:"flex flex-col gap-3",children:d}),e[9]=d,e[10]=c):c=e[10];let m;e[11]!==s||e[12]!==r||e[13]!==n.cta||e[14]!==n.learnMoreHref?(m=(n.cta||n.learnMoreHref)&&o.jsxs("div",{className:"flex items-center justify-between pt-1",children:[n.learnMoreHref?o.jsx("a",{href:n.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:r,className:"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline",children:"Learn More"}):o.jsx("span",{}),n.cta&&o.jsx(z,{asChild:!0,size:"sm",onClick:s,children:o.jsx("a",{href:n.cta.href,children:n.cta.label})})]}),e[11]=s,e[12]=r,e[13]=n.cta,e[14]=n.learnMoreHref,e[15]=m):m=e[15];let u;return e[16]!==l||e[17]!==c||e[18]!==m?(u=o.jsxs("div",{className:"flex flex-col gap-3",children:[l,c,m]}),e[16]=l,e[17]=c,e[18]=m,e[19]=u):u=e[19],u}function mt(t,e){return o.jsxs("li",{className:"flex items-start gap-3",children:[o.jsx(t.icon,{size:20,className:"text-muted-foreground mt-0.5 shrink-0"}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),o.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}const pe=[{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:K,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:q,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:J,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:q,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:K,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:J,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:q,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:K,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:J,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:q,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:ce,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:K,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:Le,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:J,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:K,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:q,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:ce,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:q,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:De,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],V="studio.release-feed.v1",ae=new Set;let I="",L={},ie=!1;function ft(){if(ie)return I||"{}";try{return localStorage.getItem(V)??"{}"}catch{return I||"{}"}}function ye(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function ue(){const t=ft();return t!==I&&(I=t,L=ye(t)),L}function ht(t){ae.add(t);const e=n=>{if(!(n.key!==V&&n.key!==null)){try{const s=localStorage.getItem(V)??"{}",a={...ye(s),...L};L=a,I=JSON.stringify(a)}catch{}t()}};return window.addEventListener("storage",e),()=>{ae.delete(t),window.removeEventListener("storage",e)}}function gt(t){L=t,I=JSON.stringify(t);try{localStorage.setItem(V,I),ie=!1}catch{ie=!0}ae.forEach(e=>e())}function pt(){const t=k.c(7),e=Q.useSyncExternalStore(ht,ue,ue);let n;t[0]!==e?(n=d=>!!e[d],t[0]=e,t[1]=n):n=t[1];const s=n,r=yt;let a;t[2]!==e?(a=pe.reduce((d,c)=>e[c.id]?d:d+1,0),t[2]=e,t[3]=a):a=t[3];const i=a;let l;return t[4]!==s||t[5]!==i?(l={isSeen:s,markSeen:r,unseenCount:i},t[4]=s,t[5]=i,t[6]=l):l=t[6],l}function yt(t){L[t]||gt({...L,[t]:{seenAt:new Date().toISOString()}})}const bt=720*60*60*1e3;function xt(t){const[e,n,s]=t.split("-").map(Number);return!e||!n||!s?new Date(t).getTime():new Date(e,n-1,s).getTime()}function wt(t){const e=pe[0];if(!e)return null;const n=xt(e.date),s=t-n;return s<0||s>bt?null:e}function St(){const t=k.c(21),{isSeen:e,markSeen:n}=pt();let s,r,a;if(t[0]!==e){a=Symbol.for("react.early_return_sentinel");e:{if(s=wt(Date.now()),!s){a=null;break e}r=e(s.id)}t[0]=e,t[1]=s,t[2]=r,t[3]=a}else s=t[1],r=t[2],a=t[3];if(a!==Symbol.for("react.early_return_sentinel"))return a;if(r)return null;let i;t[4]!==s.id||t[5]!==n?(i=()=>n(s.id),t[4]=s.id,t[5]=n,t[6]=i):i=t[6];let l;t[7]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(Re,{size:14}),t[7]=l):l=t[7];let d;t[8]!==i?(d=o.jsx(z,{size:"icon",variant:"ghost","aria-label":"Dismiss release announcement",className:"absolute right-2 top-2 size-7 text-muted-foreground",onClick:i,children:l}),t[8]=i,t[9]=d):d=t[9];let c,m;t[10]!==s.id||t[11]!==n?(c=()=>n(s.id),m=()=>n(s.id),t[10]=s.id,t[11]=n,t[12]=c,t[13]=m):(c=t[12],m=t[13]);let u;t[14]!==s||t[15]!==c||t[16]!==m?(u=o.jsx(ut,{release:s,onCtaClick:c,onLearnMoreClick:m}),t[14]=s,t[15]=c,t[16]=m,t[17]=u):u=t[17];let p;return t[18]!==d||t[19]!==u?(p=o.jsxs("div",{role:"dialog","aria-label":"Release announcement",className:"fixed bottom-6 right-6 z-50 w-[min(360px,calc(100vw-3rem))] rounded-lg border border-border bg-background p-4 shadow-lg animate-in fade-in slide-in-from-bottom-2 duration-300",children:[d,u]}),t[18]=d,t[19]=u,t[20]=p):p=t[20],p}const be=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),M=be?"⌘":"Ctrl",$={keyboardShortcuts:{keys:[M,"K"],description:"Keyboard shortcuts"},focusChatInput:{keys:[M,"L"],description:"Focus chat input"},saveAndFormat:{keys:[M,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[M,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[M,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",M,"S"],description:"New task"},toggleDaemon:{keys:[M,"D"],description:"Toggle daemon logs"}},jt=[{label:"General",shortcuts:[$.keyboardShortcuts,$.newTask,$.toggleDaemon]},{label:"Editor",shortcuts:[$.saveAndFormat]},{label:"Chat",shortcuts:[$.focusChatInput,$.togglePlanMode,$.sendMessage,$.newLine]},{label:"Questions",shortcuts:[$.selectOption]},{label:"Monitoring",shortcuts:[$.applyFilter]}];function vt(t){return be?t.metaKey:t.ctrlKey}function kt(t){const e=k.c(5),{open:n,onOpenChange:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(Ke,{children:o.jsx(Ue,{children:"Keyboard Shortcuts"})}),e[0]=r):r=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsxs(qe,{className:"sm:max-w-md",children:[r,o.jsx("div",{className:"flex flex-col gap-4",children:jt.map(Nt)})]}),e[1]=a):a=e[1];let i;return e[2]!==s||e[3]!==n?(i=o.jsx(He,{open:n,onOpenChange:s,children:a}),e[2]=s,e[3]=n,e[4]=i):i=e[4],i}function Nt(t){return o.jsxs("div",{children:[o.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),o.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(Ot)})]},t.label)}function Ot(t){return o.jsxs("div",{className:"flex items-center justify-between py-1",children:[o.jsx("span",{className:"text-sm",children:t.description}),o.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(_t)})]},t.description)}function _t(t){return o.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}function At({activeOrg:t}){return t&&(ve(t.id,{name:t.name??void 0,slug:t.slug??void 0}),ke()),null}function Ct(t,e,n){if(!n)return null;const s=Be(t,e);return s?s.threads.get().find(a=>a.id===n)?.branch??null:null}function xe(t){return{queryKey:re.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function Xt(t){const e=k.c(10);let n;e[0]!==t?(n=xe(t),e[0]=t,e[1]=n):n=e[1];const s=oe(n);let r;e[2]!==s.data?.prompts?(r=s.data?.prompts??[],e[2]=s.data?.prompts,e[3]=r):r=e[3];let a;e[4]!==s.data?.tiles?(a=s.data?.tiles??[],e[4]=s.data?.tiles,e[5]=a):a=e[5];let i;return e[6]!==s.isLoading||e[7]!==r||e[8]!==a?(i={isLoading:s.isLoading,prompts:r,tiles:a},e[6]=s.isLoading,e[7]=r,e[8]=a,e[9]=i):i=e[9],i}function Et(t){const e=k.c(17),{orgSlug:n,orgName:s,domain:r}=t;let a;e[0]!==n?(a=()=>{window.location.href=`/api/${encodeURIComponent(n)}/sso/authorize`},e[0]=n,e[1]=a):a=e[1];const i=a,l=Tt;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(me,{className:"h-6 w-6 text-primary"})}),e[2]=d):d=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),e[3]=c):c=e[3];let m;e[4]!==r||e[5]!==s?(m=s?o.jsxs(o.Fragment,{children:[o.jsx("strong",{children:s})," requires SSO authentication",r?` via ${r}`:"","."]}):"This organization requires SSO authentication to access.",e[4]=r,e[5]=s,e[6]=m):m=e[6];let u;e[7]!==m?(u=o.jsxs("div",{className:"space-y-2",children:[c,o.jsx("p",{className:"text-sm text-muted-foreground",children:m})]}),e[7]=m,e[8]=u):u=e[8];let p;e[9]!==i?(p=o.jsx(z,{onClick:i,children:"Sign in with SSO"}),e[9]=i,e[10]=p):p=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(z,{variant:"ghost",onClick:l,children:"Go back"}),e[11]=g):g=e[11];let y;e[12]!==p?(y=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[p,g]}),e[12]=p,e[13]=y):y=e[13];let f;return e[14]!==u||e[15]!==y?(f=o.jsxs(X,{children:[d,u,y]}),e[14]=u,e[15]=y,e[16]=f):f=e[16],f}function Tt(){window.location.href="/"}function $t(t){const e=k.c(8),{org:n,children:s}=t,a=Ze(n.id,n.slug)?.enabled_plugins??null;let i;e[0]!==n.id||e[1]!==n.name||e[2]!==a?(i={id:n.id,organizationId:n.id,slug:"_org",name:n.name,enabledPlugins:a,ui:null},e[0]=n.id,e[1]=n.name,e[2]=a,e[3]=i):i=e[3];const l=i;let d;return e[4]!==s||e[5]!==n||e[6]!==l?(d=o.jsx(Me,{org:n,project:l,children:s}),e[4]=s,e[5]=n,e[6]=l,e[7]=d):d=e[7],d}function zt(){const t=Ne(),e=We(),{org:n,locator:s}=Oe(),r=he({strict:!1}),a=_e({strict:!1}),i=r.org??"",l=r.taskId??"",d=(f,h,b=!0)=>t({to:"/$org/$taskId",params:{org:i,taskId:f},search:h,replace:b}),c=(f,h=!0)=>d(l,f,h),m=f=>c(h=>({...h,chat:f?1:0})),u=(f,h,b)=>d(f,S=>{const x={chat:1};h?x.virtualmcpid=h:S.virtualmcpid&&(x.virtualmcpid=S.virtualmcpid);const v=S.main;return v&&typeof v=="string"&&!Je(v)&&(x.main=v),b?.autosend&&(x.autosend=Qe),x},!1);return{setChatOpen:m,setTaskId:u,createNewTask:async f=>{const h=crypto.randomUUID(),b=f??a.virtualmcpid??Ye(n.id).id,x=b===a.virtualmcpid?Ct(n.slug,s,l):null;try{await e?.create({id:h,virtual_mcp_id:b,...x?{branch:x}:{}})}catch{}u(h,b)},openTab:f=>d(l||crypto.randomUUID(),h=>({...h,main:f})),toggleMain:()=>c(f=>{if(f.main!==void 0&&f.main!=="0")return{...f,main:"0"};const b={...f};return delete b.main,b})}}function Mt(){const t=k.c(51);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const s=Ae(e)?.params.org;let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const{taskId:a}=he(r),[i,l]=Q.useState(!1),d=s??"";let c;t[2]!==d?(c=xe(d),t[2]=d,t[3]=c):c=t[3];const m=!!s&&!a;let u;t[4]!==c||t[5]!==m?(u={...c,enabled:m},t[4]=c,t[5]=m,t[6]=u):u=t[6],oe(u);const{data:p}=Y.useSession(),g=p?.user?.id;let y;t[7]!==s||t[8]!==g?(y=s&&g?Ce(g,s):null,t[7]=s,t[8]=g,t[9]=y):y=t[9];const f=y;let h,b;t[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{const j=T=>{vt(T)&&T.code==="KeyK"&&(T.preventDefault(),l(!0))};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},b=[],t[10]=h,t[11]=b):(h=t[10],b=t[11]),Q.useEffect(h,b);let S;t[12]!==s?(S=re.activeOrganization(s),t[12]=s,t[13]=S):S=t[13];let x;t[14]!==s||t[15]!==g?(x=async()=>{if(!s)return null;performance.mark("mesh:active-org-fetch:start");const{data:j}=await Y.organization.getFullOrganization({query:{organizationSlug:s}}).finally(It),T=le(j);return j&&!T&&localStorage.setItem(U.lastOrgSlug(),s),g&&j&&Te(g,s,j),j},t[14]=s,t[15]=g,t[16]=x):x=t[16];const v=f?f.data:void 0,_=f?.updatedAt;let N;t[17]!==x||t[18]!==v||t[19]!==_||t[20]!==S?(N={queryKey:S,queryFn:x,initialData:v,initialDataUpdatedAt:_,gcTime:1/0,refetchOnWindowFocus:!1},t[17]=x,t[18]=v,t[19]=_,t[20]=S,t[21]=N):N=t[21];const{data:w}=fe(N),A=w?.id,C=w?.slug,{data:E}=et(A,C),O=A??"",ee=C??"";let F;t[22]!==O||t[23]!==ee?(F=Ve({connectionId:Xe,orgId:O,orgSlug:ee}),t[22]=O,t[23]=ee,t[24]=F):F=t[24];const te=!!A&&!!C;let H;if(t[25]!==F||t[26]!==te?(H={...F,enabled:te},t[25]=F,t[26]=te,t[27]=H):H=t[27],oe(H),!w){let j;t[28]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx($e,{}),t[28]=j):j=t[28];let T;return t[29]!==s?(T=o.jsx(Q.Suspense,{fallback:j,children:o.jsx(dt,{orgSlug:s})}),t[29]=s,t[30]=T):T=t[30],T}if(le(w)){localStorage.getItem(U.lastOrgSlug())===s&&localStorage.removeItem(U.lastOrgSlug());let j;return t[31]!==w.name?(j=o.jsx(Ee,{orgName:w.name}),t[31]=w.name,t[32]=j):j=t[32],j}if(E?.ssoRequired&&!E.authenticated){let j;return t[33]!==w.id||t[34]!==w.name||t[35]!==w.slug||t[36]!==E.domain?(j=o.jsx(Et,{orgId:w.id,orgSlug:w.slug,orgName:w.name,domain:E.domain}),t[33]=w.id,t[34]=w.name,t[35]=w.slug,t[36]=E.domain,t[37]=j):j=t[37],j}const ne=w.logo??null;let P;t[38]!==w||t[39]!==ne?(P={...w,logo:ne},t[38]=w,t[39]=ne,t[40]=P):P=t[40];let D;t[41]!==w?(D=o.jsx(At,{activeOrg:w}),t[41]=w,t[42]=D):D=t[42];let G,B;t[43]===Symbol.for("react.memo_cache_sentinel")?(G=o.jsx(ze,{}),B=o.jsx(St,{}),t[43]=G,t[44]=B):(G=t[43],B=t[44]);let R;t[45]!==i?(R=o.jsx(kt,{open:i,onOpenChange:l}),t[45]=i,t[46]=R):R=t[46];let W;return t[47]!==P||t[48]!==D||t[49]!==R?(W=o.jsxs($t,{org:P,children:[D,G,B,R]}),t[47]=P,t[48]=D,t[49]=R,t[50]=W):W=t[50],W}function It(){performance.mark("mesh:active-org-fetch:end"),performance.measure("mesh:active-org-fetch","mesh:active-org-fetch:start","mesh:active-org-fetch:end")}function Lt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Ge,{children:o.jsx(Mt,{})}),t[0]=e):e=t[0],e}const Zt=Object.freeze(Object.defineProperty({__proto__:null,default:Lt,usePanelActions:zt},Symbol.toStringTag,{value:"Module"}));export{$ as K,pe as R,pt as a,ut as b,Xt as c,xe as h,vt as i,Ct as r,Zt as s,zt as u};
@@ -0,0 +1 @@
1
+ import{e as N,c as K,j as s,l as Vt,r as T,t as Z,q as fe,b as Ce,X as Ns,K as Wt,n as qt,f as Oe,g as Cs,d as Fn,P as Gn,Y as Bn,Z as Ln,T as Hn,W as Un,I as Kn,H as Vn,a as Wn,B as At,$ as qn,a0 as Yn,o as $e,a1 as Xn,a2 as Qn,a3 as Zn,G as Jn,a4 as er,a5 as tr,a6 as sr,a7 as nr,a8 as xt,a9 as rr,aa as or,ab as ir,ac as lr,ad as ar,ae as cr,af as ws,ag as dr,ah as ur,ai as mr,aj as fr,ak as xr,al as pr,am as hr,an as gr,ao as br,ap as jr,aq as vr,p as yr,E as ks}from"./index-Bll1AlZi.js";import{u as _r}from"./useRouterState-l6E4h2DF.js";import{c as Sr,i as Nr,a as Cr}from"./ZoomOut-DiWWUJB1.js";import{u as Xe,c as xe,d as ke,e as Pt,f as zt,g as Ae,h as Is,i as Ms,j as wr,k as kr,l as Lt}from"./sidebar-hk7mPADd.js";import{T as we}from"./toolbar-Vk0X9zFW.js";import{u as $s,T as Ve,a as We,b as qe,c as ts}from"./tooltip-B2vnmSMM.js";import{S as Se}from"./skeleton-CxMjy9Kg.js";import{P as Rt,a as ut,b as Dt}from"./popover-CNh3Ozeq.js";import{b as As,a as Ts,D as Os}from"./drawer-BSFXr7hp.js";import{i as Ps}from"./SearchMd-DXp3IUvU.js";import{s as Ir}from"./Star01-s_hRJjwq.js";import{s as Ne}from"./Plus-CSmw6cpp.js";import{i as Mr,a as zs,u as Rs,g as $r}from"./use-mcp-client-Des-fSV9.js";import{a as Ds,u as pt,b as Ar}from"./use-virtual-mcp-71PpEQrs.js";import{u as Tr}from"./use-create-virtual-mcp-TPoPQ6hG.js";import{I as Or,a as Pr,u as zr,W as Rr,H as Dr,S as Er,G as Fr}from"./github-repo-picker-CKp3ba8m.js";import{A as Te,W as ss,X as ns,Y as Es,Z as Gr,_ as Br,$ as Lr}from"./agent-icon-DyETFFvd.js";import{u as Fs,d as Hr,l as Gs}from"./tab-id-D_jK7L5o.js";import{r as Ur,a as Kr,R as Vr,b as Wr,u as Bs}from"./shell-layout-DO1LZiwY.js";import{u as qr,a as Yr,b as Xr,s as Qr,c as Zr,r as Jr,d as eo,e as to,f as so,p as no,T as Ls,g as ro,h as oo,i as io,j as lo,k as ao,l as co,m as uo,n as mo,S as rs,o as Hs}from"./use-navigate-to-agent-TzPRxzJx.js";import{A as os}from"./avatar-DI2KQvq0.js";import{i as Us}from"./Check-xMlMIzVH.js";import{a as is}from"./Eye-DjmQZ2p3.js";import{n as fo,i as xo}from"./Globe01-BFX2DjNo.js";import{i as po,a as Ks}from"./ZapSquare-Br5HjwCx.js";import{i as ho}from"./Monitor01-BBuvzSNf.js";import{n as go,a as bo}from"./Sun-D1pch37z.js";import{a as ht}from"./Settings02-DttqwSGe.js";import{i as jo}from"./Shield01-BlrpeOP8.js";import{a as vo}from"./Users03-C19XPgsH.js";import{s as Vs}from"./XClose-CXQHotFO.js";import{f as yo,a as _o,b as So,c as No,d as Co,e as wo,A as ko}from"./alert-dialog-C_C5CWIi.js";import{F as Io,a as Mo,b as $o,c as Ao,d as To,e as Oo,f as Po}from"./form-Bn5_lJ6b.js";import{I as zo}from"./input-CMMOM0dD.js";import{S as Ro}from"./spinner-Dstb6AhM.js";import"./index-BE8dVooN.js";import{i as Do,a as Eo}from"./RefreshCcw01-Ct_5xx8z.js";import{n as Yt}from"./Stars02-Cg2K8h2t.js";import{A as Ws,g as Fo,u as Go,a as ls,K as Bo,P as Lo,s as Ho,S as Uo,v as Ko,D as Vo,c as Wo,b as qo,C as Yo}from"./sortable.esm-BnSJaRIy.js";import{i as Xt}from"./ChevronRight-TZkuqway.js";import{u as qs}from"./use-mcp-tools-DVBLMBo3.js";import{u as Ys}from"./use-ai-providers-BDbyWdvc.js";import{i as Xo}from"./FilterLines-DCVUz1mF.js";import{t as Qo}from"./Users01-CHcmgQX1.js";import{b as as,c as Xs,S as cs,a as ds,d as us}from"./select-CTk6Rsq0.js";import{b as Zo,c as Jo,e as ei,a as ti,D as si}from"./dialog-BE3BWPis.js";import{C as ni,e as ri,c as oi,d as ii,b as li}from"./command-DZekvH1G.js";import{u as Qs}from"./studio-tools-I8Y7AvNq.js";import{i as Zs}from"./Zap-DhYBCL8w.js";import{u as ai}from"./use-org-auth-client-uSzlmndB.js";import{H as ci,a as di,b as ui}from"./hover-card-NLGI_Z11.js";import{g as mi,S as fi}from"./task-status-CyBgq1B0.js";import{f as xi}from"./format-time-Cy7tTmZp.js";import{t as Js}from"./ChevronDown-DXk0XLak.js";function pi(t){const e=N.c(21),{value:n,onChange:r,placeholder:o,onKeyDown:i,className:l,isSearching:a,disabled:c}=t,d=o===void 0?"Search...":o;let u;e[0]!==l?(u=K("shrink-0 w-full border-b border-border h-12",l),e[0]=l,e[1]=u):u=e[1];const m=c?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==m?(f=K("flex items-center gap-2.5 h-12 px-4",m),e[2]=m,e[3]=f):f=e[3];let g;e[4]!==a?(g=a?s.jsx(Vt,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(Ps,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=g):g=e[5];let h;e[6]!==r?(h=j=>r(j.target.value),e[6]=r,e[7]=h):h=e[7];let x;e[8]!==c||e[9]!==i||e[10]!==d||e[11]!==h||e[12]!==n?(x=s.jsx("input",{type:"text",value:n,onChange:h,onKeyDown:i,placeholder:d,disabled:c,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=c,e[9]=i,e[10]=d,e[11]=h,e[12]=n,e[13]=x):x=e[13];let p;e[14]!==f||e[15]!==g||e[16]!==x?(p=s.jsxs("label",{className:f,children:[g,x]}),e[14]=f,e[15]=g,e[16]=x,e[17]=p):p=e[17];let b;return e[18]!==u||e[19]!==p?(b=s.jsx("div",{className:u,children:p}),e[18]=u,e[19]=p,e[20]=b):b=e[20],b}const hi="Select an existing agent";function gi(t){const e=N.c(5),{children:n}=t;let r;e[0]!==n?(r=s.jsx(Ve,{asChild:!0,children:n}),e[0]=n,e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(We,{side:"right",sideOffset:8,children:hi}),e[2]=o):o=e[2];let i;return e[3]!==r?(i=s.jsxs(qe,{defaultOpen:!0,delayDuration:0,children:[r,o]}),e[3]=r,e[4]=i):i=e[4],i}function bi(){const t=N.c(5),{enableDecoImport:e}=Ns(),{data:n}=Ce.useSession();let r;t[0]!==n?.user?.email?(r=Wt.decoProfile(n?.user?.email),t[0]=n?.user?.email,t[1]=r):r=t[1];const o=!!e&&!!n?.user?.email;let i;t[2]!==r||t[3]!==o?(i={queryKey:r,queryFn:ji,enabled:o,staleTime:3e5},t[2]=r,t[3]=o,t[4]=i):i=t[4];const{data:l}=qt(i);return l?.isDecoUser??!1}async function ji(){const t=await fetch("/api/deco-sites/profile");return t.ok?t.json():{isDecoUser:!1}}function vi(t){const e=Oe(),{create:n}=Fs(),{locator:r}=fe(),o=Cs({strict:!1}),i=Fn({strict:!1});return async l=>{const a=crypto.randomUUID(),c=l===i.virtualmcpid?Ur(t,r,o.taskId??""):null;try{await n({id:a,virtual_mcp_id:l,...c?{branch:c}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:l}})}}function yi(t){const e=N.c(9),{agent:n,onClick:r}=t;let o;e[0]!==n.icon||e[1]!==n.title?(o=s.jsx(Te,{icon:n.icon,name:n.title,size:"md",className:"transition-transform group-hover:scale-105"}),e[0]=n.icon,e[1]=n.title,e[2]=o):o=e[2];let i;e[3]!==n.title?(i=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground line-clamp-2 w-full",children:n.title}),e[3]=n.title,e[4]=i):i=e[4];let l;return e[5]!==r||e[6]!==o||e[7]!==i?(l=s.jsxs("button",{type:"button",onClick:r,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[o,i]}),e[5]=r,e[6]=o,e[7]=i,e[8]=l):l=e[8],l}function _i(t){const e=N.c(65),{onClose:n,onOpenImportDeco:r,onOpenGithubImport:o}=t,[i,l]=T.useState(""),a=Ds(),{org:c}=fe(),{data:d}=Ce.useSession(),u=d?.user?.id??"anon",m=a.filter(Ci).map(Ni),f=Yr();let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={navigateOnCreate:!0},e[0]=g):g=e[0];const{createVirtualMCP:h,isCreating:x}=Tr(g),{createFromTemplate:p,isCreating:b}=zr(),j=bi(),y=vi(c.slug),v=i.toLowerCase(),_=a.filter(Si).filter(le=>!i||le.title.toLowerCase().includes(v)),k=le=>{Xr({orgId:c.id,userId:u},le.id,m),f(),n(),l(""),y(le.id)},S="flex flex-col max-h-[min(640px,80dvh)]";let C;e[1]!==i?(C=s.jsx(pi,{value:i,onChange:l,placeholder:"Search agents..."}),e[1]=i,e[2]=C):C=e[2];const I="overflow-y-auto flex-1 min-h-0 px-3 pb-3";let $;e[3]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx("div",{className:"px-1 pt-3 pb-2",children:s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Agents"})}),e[3]=$):$=e[3];const z="grid grid-cols-3 gap-1";let A;e[4]!==h||e[5]!==n?(A=async()=>{Z("agent_create_new_clicked",{source:"browse_popover"}),await h(),n()},e[4]=h,e[5]=n,e[6]=A):A=e[6];let w,P;e[7]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx(Ne,{size:16,className:"text-muted-foreground"})}),P=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Create new"}),e[7]=w,e[8]=P):(w=e[7],P=e[8]);let H;e[9]!==x||e[10]!==A?(H=s.jsxs("button",{type:"button",disabled:x,onClick:A,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[w,P]}),e[9]=x,e[10]=A,e[11]=H):H=e[11];let O;e[12]!==p||e[13]!==n?(O=async()=>{Z("agent_create_clicked",{source:"browse_popover",method:"website"}),await p(Rr),n()},e[12]=p,e[13]=n,e[14]=O):O=e[14];let B,R;e[15]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx(Ir,{className:"size-5 text-muted-foreground"})}),R=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Start Website"}),e[15]=B,e[16]=R):(B=e[15],R=e[16]);let L;e[17]!==b||e[18]!==O?(L=s.jsxs("button",{type:"button",disabled:b,onClick:O,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[B,R]}),e[17]=b,e[18]=O,e[19]=L):L=e[19];let D;e[20]!==p||e[21]!==n?(D=async()=>{Z("agent_create_clicked",{source:"browse_popover",method:"hydrogen"}),await p(Dr),n()},e[20]=p,e[21]=n,e[22]=D):D=e[22];let G,F;e[23]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx("img",{src:Er,alt:"",className:"size-5 object-contain"})}),F=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Shopify Headless Store"}),e[23]=G,e[24]=F):(G=e[23],F=e[24]);let E;e[25]!==b||e[26]!==D?(E=s.jsxs("button",{type:"button",disabled:b,onClick:D,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[G,F]}),e[25]=b,e[26]=D,e[27]=E):E=e[27];let V;e[28]!==n||e[29]!==o?(V=()=>{Z("agent_import_clicked",{source:"github"}),o(),n()},e[28]=n,e[29]=o,e[30]=V):V=e[30];let W,X;e[31]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx(Fr,{className:"size-5 text-muted-foreground"})}),X=s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Import GitHub"}),e[31]=W,e[32]=X):(W=e[31],X=e[32]);let re;e[33]!==V?(re=s.jsxs("button",{type:"button",onClick:V,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[W,X]}),e[33]=V,e[34]=re):re=e[34];let Y;e[35]!==j||e[36]!==n||e[37]!==r?(Y=j&&s.jsxs("button",{type:"button",onClick:()=>{Z("agent_import_clicked",{source:"deco"}),r(),n()},className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"",className:"size-5 object-contain"})}),s.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Import deco.cx"})]}),e[35]=j,e[36]=n,e[37]=r,e[38]=Y):Y=e[38];const oe=_.map(le=>s.jsx(yi,{agent:le,onClick:()=>k(le)},le.id));let q;e[39]!==H||e[40]!==L||e[41]!==E||e[42]!==re||e[43]!==Y||e[44]!==oe?(q=s.jsxs("div",{className:z,children:[H,L,E,re,Y,oe]}),e[39]=H,e[40]=L,e[41]=E,e[42]=re,e[43]=Y,e[44]=oe,e[45]=q):q=e[45];let J;e[46]!==x||e[47]!==i||e[48]!==_.length?(J=_.length===0&&!x&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:i?"No agents found":"No agents yet"}),e[46]=x,e[47]=i,e[48]=_.length,e[49]=J):J=e[49];let Q;e[50]!==q||e[51]!==J||e[52]!==$?(Q=s.jsxs("div",{className:I,children:[$,q,J]}),e[50]=q,e[51]=J,e[52]=$,e[53]=Q):Q=e[53];let ee;e[54]!==c.slug?(ee={org:c.slug},e[54]=c.slug,e[55]=ee):ee=e[55];let te;e[56]!==n?(te=()=>n(),e[56]=n,e[57]=te):te=e[57];let se;e[58]!==ee||e[59]!==te?(se=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Gn,{to:"/$org/settings/agents",params:ee,onClick:te,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[58]=ee,e[59]=te,e[60]=se):se=e[60];let ie;return e[61]!==Q||e[62]!==C||e[63]!==se?(ie=s.jsxs("div",{className:S,children:[C,Q,se]}),e[61]=Q,e[62]=C,e[63]=se,e[64]=ie):ie=e[64],ie}function Si(t){return!Mr(t.id)}function Ni(t){return t.id}function Ci(t){return t.pinned}function en(t){const e=N.c(26);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:r}=n,o=r===void 0?!1:r,[i,l]=T.useState(!1),[a,c]=T.useState(!1),[d,u]=T.useState(!1),m=$s(),{setOpenMobile:f}=Xe(),g=qr(),h=g?"border border-border":void 0;let x;e[2]!==g?(x=I=>g?s.jsx(gi,{children:I}):I,e[2]=g,e[3]=x):x=e[3];const p=x;let b;e[4]!==m||e[5]!==f?(b=()=>{l(!1),m&&f(!1)},e[4]=m,e[5]=f,e[6]=b):b=e[6];const j=b;let y;e[7]!==j||e[8]!==i?(y=i&&s.jsx(T.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(Se,{className:"h-4 w-24"})}),children:s.jsx(_i,{onClose:j,onOpenImportDeco:()=>c(!0),onOpenGithubImport:()=>{u(!0),j()}})}),e[7]=j,e[8]=i,e[9]=y):y=e[9];const v=y;let _;e[10]!==o||e[11]!==h||e[12]!==g||e[13]!==m||e[14]!==i||e[15]!==v||e[16]!==p?(_=m?s.jsxs(s.Fragment,{children:[o?p(s.jsx(we,{"aria-label":"Browse agents",className:K(h),onClick:()=>{Z("agent_browser_opened",{surface:"mobile_drawer"}),l(!0)},children:s.jsx(Ne,{className:"size-4"})})):s.jsx(xe,{children:p(s.jsxs(ke,{tooltip:g?void 0:"Browse agents",className:K(h),onClick:()=>{Z("agent_browser_opened",{surface:"mobile_drawer"}),l(!0)},children:[s.jsx(Ne,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(As,{open:i,onOpenChange:l,direction:"bottom",children:s.jsxs(Ts,{className:"max-h-[85dvh] p-0",children:[s.jsx(Os,{className:"sr-only",children:"Browse agents"}),v]})})]}):s.jsxs(Rt,{open:i,onOpenChange:I=>{I&&!i&&Z("agent_browser_opened",{surface:"desktop_popover"}),l(I)},children:[o?p(s.jsx(ut,{asChild:!0,children:s.jsx(we,{"aria-label":"Browse agents",className:K(h),children:s.jsx(Ne,{className:"size-4"})})})):s.jsx(xe,{children:p(s.jsx(ut,{asChild:!0,children:s.jsxs(ke,{tooltip:g?void 0:"Browse agents",className:K(h),children:[s.jsx(Ne,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(Dt,{className:"w-[380px] p-0 overflow-hidden",side:"right",align:"start",children:v})]}),e[10]=o,e[11]=h,e[12]=g,e[13]=m,e[14]=i,e[15]=v,e[16]=p,e[17]=_):_=e[17];let k;e[18]!==a?(k=s.jsx(Or,{open:a,onOpenChange:c}),e[18]=a,e[19]=k):k=e[19];let S;e[20]!==d?(S=s.jsx(Pr,{open:d,onOpenChange:u}),e[20]=d,e[21]=S):S=e[21];let C;return e[22]!==_||e[23]!==k||e[24]!==S?(C=s.jsxs(s.Fragment,{children:[_,k,S]}),e[22]=_,e[23]=k,e[24]=S,e[25]=C):C=e[25],C}function tn(){const t=N.c(24),{org:e}=fe(),n=Oe(),o=_r().location.pathname,i=e.slug,{state:l,isMobile:a}=Xe(),c=!a&&l==="collapsed";let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Sr,{className:"size-4!"}),t[0]=d):d=t[0];const u=o===`/${i}`||o===`/${i}/`;let m;t[1]!==n||t[2]!==i?(m=()=>{n({to:"/$org",params:{org:i}})},t[1]=n,t[2]=i,t[3]=m):m=t[3];let f;t[4]!==u||t[5]!==m?(f={key:"home",label:"Home",icon:d,isActive:u,onClick:m},t[4]=u,t[5]=m,t[6]=f):f=t[6];const g=f;let h;t[7]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Nr,{className:"size-4!"}),t[7]=h):h=t[7];let x;t[8]!==o||t[9]!==i?(x=o.startsWith(`/${i}/files`),t[8]=o,t[9]=i,t[10]=x):x=t[10];let p;t[11]!==n||t[12]!==i?(p=()=>{n({to:"/$org/files",params:{org:i}})},t[11]=n,t[12]=i,t[13]=p):p=t[13];let b;t[14]!==x||t[15]!==p?(b={key:"files",label:"Library",icon:h,isActive:x,onClick:p},t[14]=x,t[15]=p,t[16]=b):b=t[16];const j=b;let y;t[17]!==j||t[18]!==g?(y={type:"items",items:[g,j]},t[17]=j,t[18]=g,t[19]=y):y=t[19];let v;if(t[20]!==c||t[21]!==y){if(v=[y],c){let _;t[23]===Symbol.for("react.memo_cache_sentinel")?(_={type:"custom",key:"new-task",content:s.jsx(Pt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(zt,{children:s.jsx(Ae,{className:"gap-1.5",children:s.jsx(en,{})})})})},t[23]=_):_=t[23],v.push(_)}t[20]=c,t[21]=y,t[22]=v}else v=t[22];return v}function Tt(t){const e=N.c(12);let n,r,o,i;e[0]!==t?({className:n,orientation:o,decorative:i,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=i):(n=e[1],r=e[2],o=e[3],i=e[4]);const l=o===void 0?"horizontal":o,a=i===void 0?!0:i;let c;e[5]!==n?(c=K("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",n),e[5]=n,e[6]=c):c=e[6];let d;return e[7]!==a||e[8]!==l||e[9]!==r||e[10]!==c?(d=s.jsx(Bn,{"data-slot":"separator-root",decorative:a,orientation:l,className:c,...r}),e[7]=a,e[8]=l,e[9]=r,e[10]=c,e[11]=d):d=e[11],d}function sn(t){const e=N.c(3),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=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]=r):r=e[0];let o;return e[1]!==n?(o=s.jsxs(Pt,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[r,s.jsx(zt,{children:s.jsx(Ae,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=o):o=e[2],o}function nn(t){const e=N.c(18),{item:n}=t,{isMobile:r,setOpenMobile:o}=Xe();let i;e[0]!==r||e[1]!==n||e[2]!==o?(i=()=>{Z("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:r}),n.onClick?.(),r&&o(!1)},e[0]=r,e[1]=n,e[2]=o,e[3]=i):i=e[3];const l=i,a=n.key,c=n.isActive&&"z-10";let d;e[4]!==c?(d=K(c),e[4]=c,e[5]=d):d=e[5];let u;e[6]!==n.label?(u=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=u):u=e[7];let m;e[8]!==l||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==u?(m=s.jsxs(ke,{onClick:l,isActive:n.isActive,tooltip:n.label,children:[n.icon,u]}),e[8]=l,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=u,e[13]=m):m=e[13];let f;return e[14]!==n.key||e[15]!==d||e[16]!==m?(f=s.jsx(xe,{className:d,children:m},a),e[14]=n.key,e[15]=d,e[16]=m,e[17]=f):f=e[17],f}function wi(t){const e=N.c(12),{section:n}=t;switch(n.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Is,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=n.group.label,o=n.group.defaultExpanded;let i;e[2]!==n.group.items?(i=n.group.items.map(Ii),e[2]=n.group.items,e[3]=i):i=e[3];let l;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==i?(l=s.jsx(sn,{label:r,defaultExpanded:o,children:i}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=i,e[7]=l):l=e[7],l}case"items":{let r;e[8]!==n.items?(r=n.items.map(ki),e[8]=n.items,e[9]=r):r=e[9];let o;return e[10]!==r?(o=s.jsx(Pt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(zt,{children:s.jsx(Ae,{className:"gap-1.5",children:r})})}),e[10]=r,e[11]=o):o=e[11],o}case"custom":return n.content}}function ki(t){return s.jsx(nn,{item:t},t.key)}function Ii(t){return s.jsx(nn,{item:t},t.key)}function Mi(t){const e=N.c(14),{sections:n,footer:r,additionalContent:o,variant:i,contentClassName:l}=t,a=i===void 0?"sidebar":i;let c;e[0]!==l?(c=K("flex flex-col flex-1 px-2 py-2 gap-0.5",l),e[0]=l,e[1]=c):c=e[1];let d;e[2]!==n?(d=n.map($i),e[2]=n,e[3]=d):d=e[3];let u;e[4]!==o?(u=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[4]=o,e[5]=u):u=e[5];let m;e[6]!==c||e[7]!==d||e[8]!==u?(m=s.jsxs(Ms,{className:c,children:[d,u]}),e[6]=c,e[7]=d,e[8]=u,e[9]=m):m=e[9];let f;return e[10]!==r||e[11]!==m||e[12]!==a?(f=s.jsxs(wr,{variant:a,children:[m,r]}),e[10]=r,e[11]=m,e[12]=a,e[13]=f):f=e[13],f}function $i(t,e){return s.jsx(wi,{section:t},e)}function rn(t){const e=N.c(2);let n;return e[0]!==t?(n=s.jsx(Mi,{...t}),e[0]=t,e[1]=n):n=e[1],n}rn.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(Se,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Ai(){const t=N.c(7),n=Ns().logo??Ln,r=typeof n=="string"?n:n.light,o=typeof n=="string"?n:n.dark;let i;t[0]!==r?(i=s.jsx("img",{src:r,alt:"Logo",className:"size-6 object-contain dark:hidden"}),t[0]=r,t[1]=i):i=t[1];let l;t[2]!==o?(l=s.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),t[2]=o,t[3]=l):l=t[3];let a;return t[4]!==i||t[5]!==l?(a=s.jsxs(kr,{className:"flex flex-row items-center shrink-0 h-12 px-3 pb-0",children:[i,l]}),t[4]=i,t[5]=l,t[6]=a):a=t[6],a}function ms(t){const e=N.c(18),{item:n,onClose:r}=t,o=n.isActive&&"z-10";let i;e[0]!==o?(i=K(o),e[0]=o,e[1]=i):i=e[1];let l;e[2]!==n||e[3]!==r?(l=()=>{n.onClick?.(),r()},e[2]=n,e[3]=r,e[4]=l):l=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 c;e[7]!==n.label?(c=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=c):c=e[8];let d;e[9]!==n.isActive||e[10]!==n.label||e[11]!==l||e[12]!==a||e[13]!==c?(d=s.jsxs(ke,{onClick:l,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,c]}),e[9]=n.isActive,e[10]=n.label,e[11]=l,e[12]=a,e[13]=c,e[14]=d):d=e[14];let u;return e[15]!==i||e[16]!==d?(u=s.jsx(xe,{className:i,children:d}),e[15]=i,e[16]=d,e[17]=u):u=e[17],u}function Ti(t){const e=N.c(18),{section:n,onClose:r}=t;switch(n.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Is,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=n.group.label,i=n.group.defaultExpanded;let l;if(e[2]!==r||e[3]!==n.group.items){let c;e[5]!==r?(c=d=>s.jsx(ms,{item:d,onClose:r},d.key),e[5]=r,e[6]=c):c=e[6],l=n.group.items.map(c),e[2]=r,e[3]=n.group.items,e[4]=l}else l=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==l?(a=s.jsx(sn,{label:o,defaultExpanded:i,children:l}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=l,e[10]=a):a=e[10],a}case"items":{let o;if(e[11]!==r||e[12]!==n.items){let l;e[14]!==r?(l=a=>s.jsx(ms,{item:a,onClose:r},a.key),e[14]=r,e[15]=l):l=e[15],o=n.items.map(l),e[11]=r,e[12]=n.items,e[13]=o}else o=e[13];let i;return e[16]!==o?(i=s.jsx(Pt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(zt,{children:s.jsx(Ae,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=i):i=e[17],i}case"custom":return n.content}}function Oi(t){const e=N.c(14),{sections:n,onClose:r,footer:o,additionalContent:i}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(T.Suspense,{fallback:s.jsx("div",{className:"h-10 shrink-0"}),children:s.jsx(Ai,{})}),e[0]=l):l=e[0];let a;if(e[1]!==r||e[2]!==n){let m;e[4]!==r?(m=(f,g)=>s.jsx(Ti,{section:f,onClose:r},g),e[4]=r,e[5]=m):m=e[5],a=n.map(m),e[1]=r,e[2]=n,e[3]=a}else a=e[3];let c;e[6]!==i?(c=i&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:i}),e[6]=i,e[7]=c):c=e[7];let d;e[8]!==a||e[9]!==c?(d=s.jsxs(Ms,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[a,c]}),e[8]=a,e[9]=c,e[10]=d):d=e[10];let u;return e[11]!==o||e[12]!==d?(u=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[l,d,o]}),e[11]=o,e[12]=d,e[13]=u):u=e[13],u}function on(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Pi=Hn({name:Un().min(2,"Organization name is required")});function zi(t){const e=N.c(41),{open:n,onOpenChange:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={resolver:Kn(Pi),defaultValues:{name:""}},e[0]=o):o=e[0];const i=Vn(o);let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l={mutationFn:Di,onSuccess:Ri},e[1]=l):l=e[1];const a=Wn(l),c=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(So,{children:[s.jsx(No,{children:"Create a new organization"}),s.jsx(Co,{children:"Set up a new organization to collaborate with others."})]}),e[2]=d):d=e[2];let u;if(e[3]!==a||e[4]!==i){let S;e[6]!==a?(S=C=>a.mutateAsync(C),e[6]=a,e[7]=S):S=e[7],u=i.handleSubmit(S),e[3]=a,e[4]=i,e[5]=u}else u=e[5];let m;e[8]!==i.formState.isSubmitting?(m=S=>{const{field:C}=S;return s.jsxs($o,{children:[s.jsx(Ao,{children:"Organization Name"}),s.jsx(To,{children:s.jsx(zo,{...C,placeholder:"Acme Inc.",disabled:i.formState.isSubmitting})}),s.jsx(Oo,{children:"The name of your company or organization"}),C.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:"","/",on(C.value)]})]}),s.jsx(Po,{})]})},e[8]=i.formState.isSubmitting,e[9]=m):m=e[9];let f;e[10]!==i.control||e[11]!==m?(f=s.jsx(Io,{control:i.control,name:"name",render:m}),e[10]=i.control,e[11]=m,e[12]=f):f=e[12];let g;e[13]!==c?(g=c&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:c}),e[13]=c,e[14]=g):g=e[14];let h;e[15]!==a||e[16]!==i?(h=()=>{a.reset(),i.reset()},e[15]=a,e[16]=i,e[17]=h):h=e[17];let x;e[18]!==i.formState.isSubmitting||e[19]!==h?(x=s.jsx(yo,{disabled:i.formState.isSubmitting,onClick:h,children:"Cancel"}),e[18]=i.formState.isSubmitting,e[19]=h,e[20]=x):x=e[20];const p=!i.formState.isValid||i.formState.isSubmitting;let b;e[21]!==i.formState.isSubmitting?(b=i.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(Ro,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=i.formState.isSubmitting,e[22]=b):b=e[22];let j;e[23]!==p||e[24]!==b?(j=s.jsx(At,{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]!==x?(y=s.jsxs(wo,{children:[x,j]}),e[26]=j,e[27]=x,e[28]=y):y=e[28];let v;e[29]!==y||e[30]!==u||e[31]!==f||e[32]!==g?(v=s.jsxs("form",{className:"space-y-6",onSubmit:u,autoComplete:"off",children:[f,g,y]}),e[29]=y,e[30]=u,e[31]=f,e[32]=g,e[33]=v):v=e[33];let _;e[34]!==i||e[35]!==v?(_=s.jsxs(_o,{children:[d,s.jsx(Mo,{...i,children:v})]}),e[34]=i,e[35]=v,e[36]=_):_=e[36];let k;return e[37]!==r||e[38]!==n||e[39]!==_?(k=s.jsx(ko,{open:n,onOpenChange:r,children:_}),e[37]=r,e[38]=n,e[39]=_,e[40]=k):k=e[40],k}function Ri(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function Di(t){const e=on(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await Ce.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const r=n?.data?.slug??e;if(!r)throw new Error("Failed to create organization");return{orgSlug:r}}function Ht(t){let e=0;for(let r=0;r<t.length;r++)e=t.charCodeAt(r)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function Ei(t){const e=N.c(13),{org:n,size:r}=t,o=r===void 0?"sm":r,i=o==="xs"?"size-5":"size-6",l=o==="xs"?"text-[9px]":"text-xs";let a;e[0]!==i?(a=K(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=a):a=e[1];let c;e[2]!==n.logo||e[3]!==n.name?(c=n.logo?void 0:Ht(n.name),e[2]=n.logo,e[3]=n.name,e[4]=c):c=e[4];let d;e[5]!==n.logo||e[6]!==n.name||e[7]!==l?(d=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:K("font-semibold leading-none",l),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=l,e[8]=d):d=e[8];let u;return e[9]!==a||e[10]!==c||e[11]!==d?(u=s.jsx("div",{className:a,style:c,children:d}),e[9]=a,e[10]=c,e[11]=d,e[12]=u):u=e[12],u}function wt(t){const e=N.c(22),{item:n,onClose:r}=t;if(n.href){const c=n.external?"_blank":void 0,d=n.external?"noopener noreferrer":void 0;let u;e[0]!==n.icon?(u=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[0]=n.icon,e[1]=u):u=e[1];let m;e[2]!==n.label?(m=s.jsx("span",{className:"flex-1",children:n.label}),e[2]=n.label,e[3]=m):m=e[3];let f;return e[4]!==n.href||e[5]!==r||e[6]!==c||e[7]!==d||e[8]!==u||e[9]!==m?(f=s.jsxs("a",{href:n.href,target:c,rel:d,className:"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",onClick:r,children:[u,m]}),e[4]=n.href,e[5]=r,e[6]=c,e[7]=d,e[8]=u,e[9]=m,e[10]=f):f=e[10],f}let o;e[11]!==n||e[12]!==r?(o=()=>{n.onClick?.(),r()},e[11]=n,e[12]=r,e[13]=o):o=e[13];let i;e[14]!==n.icon?(i=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[14]=n.icon,e[15]=i):i=e[15];let l;e[16]!==n.label?(l=s.jsx("span",{className:"flex-1",children:n.label}),e[16]=n.label,e[17]=l):l=e[17];let a;return e[18]!==o||e[19]!==i||e[20]!==l?(a=s.jsxs("button",{type:"button",onClick:o,className:"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",children:[i,l]}),e[18]=o,e[19]=i,e[20]=l,e[21]=a):a=e[21],a}function fs(t){const e=N.c(31),{orgParam:n,onSelectOrg:r,onCreateOrg:o}=t,{data:i}=Zn();let l;e[0]!==n?(l=(w,P)=>w.slug===n?-1:P.slug===n?1:w.name.localeCompare(P.name),e[0]=n,e[1]=l):l=e[1];const a=[...i??[]].sort(l),[c,d]=T.useState(!1),[u,m]=T.useState(""),f=u.toLowerCase(),g=f?a.filter(w=>w.name.toLowerCase().includes(f)||w.slug.toLowerCase().includes(f)):a;let h;e[2]!==c?(h=function(){c&&m(""),d(Fi)},e[2]=c,e[3]=h):h=e[3];const x=h;let p;e[4]!==u||e[5]!==c||e[6]!==x?(p=c?s.jsx("input",{autoFocus:!0,type:"text",value:u,onChange:w=>m(w.target.value),onKeyDown:w=>w.key==="Escape"&&x(),placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}):s.jsx("span",{className:"text-sm font-medium text-muted-foreground/60",children:"Your Organizations"}),e[4]=u,e[5]=c,e[6]=x,e[7]=p):p=e[7];let b;e[8]!==c?(b=c?s.jsx(Vs,{size:16}):s.jsx(Ps,{size:16}),e[8]=c,e[9]=b):b=e[9];let j;e[10]!==b||e[11]!==x?(j=s.jsx("button",{type:"button",onClick:x,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:b}),e[10]=b,e[11]=x,e[12]=j):j=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Ne,{size:16}),e[13]=y):y=e[13];let v;e[14]!==o?(v=s.jsx("button",{type:"button",onClick:o,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:y}),e[14]=o,e[15]=v):v=e[15];let _;e[16]!==j||e[17]!==v?(_=s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[j,v]}),e[16]=j,e[17]=v,e[18]=_):_=e[18];let k;e[19]!==p||e[20]!==_?(k=s.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[p,_]}),e[19]=p,e[20]=_,e[21]=k):k=e[21];const S="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1",C=g.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:u?`No organizations match "${u}"`:"No organizations available"});let I;e[22]!==r||e[23]!==n?(I=w=>s.jsxs("button",{type:"button",onClick:()=>r(w.slug),className:K("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(Ei,{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(Us,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},w.id),e[22]=r,e[23]=n,e[24]=I):I=e[24];const $=g.map(I);let z;e[25]!==C||e[26]!==$?(z=s.jsxs("div",{className:S,children:[C,$]}),e[25]=C,e[26]=$,e[27]=z):z=e[27];let A;return e[28]!==z||e[29]!==k?(A=s.jsxs(s.Fragment,{children:[k,z]}),e[28]=z,e[29]=k,e[30]=A):A=e[30],A}function Fi(t){return!t}function xs(t){const e=N.c(142),{user:n,userImage:r,menuItems:o,signOutItem:i,themeOptions:l,preferences:a,setPreferences:c,orgParam:d,onSelectOrg:u,onCreateOrg:m,close:f,isMobile:g,open:h}=t;if(g){const q=n?.name??"U";let J;e[0]!==q||e[1]!==r?(J=s.jsx(os,{url:r,fallback:q,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=q,e[1]=r,e[2]=J):J=e[2];const Q=n?.name??"User";let ee;e[3]!==Q?(ee=s.jsx("p",{className:"text-sm font-medium truncate",children:Q}),e[3]=Q,e[4]=ee):ee=e[4];const te=n?.email;let se;e[5]!==te?(se=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:te}),e[5]=te,e[6]=se):se=e[6];let ie;e[7]!==ee||e[8]!==se?(ie=s.jsxs("div",{className:"flex-1 min-w-0",children:[ee,se]}),e[7]=ee,e[8]=se,e[9]=ie):ie=e[9];let le;e[10]!==n?(le=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Hi)},e[10]=n,e[11]=le):le=e[11];let Ie;e[12]===Symbol.for("react.memo_cache_sentinel")?(Ie=s.jsx(is,{size:14}),e[12]=Ie):Ie=e[12];let Pe;e[13]!==le?(Pe=s.jsx(Ve,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:le,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:Ie})}),e[13]=le,e[14]=Pe):Pe=e[14];let ze;e[15]===Symbol.for("react.memo_cache_sentinel")?(ze=s.jsx(We,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[15]=ze):ze=e[15];let pe;e[16]!==Pe?(pe=s.jsx(ts,{delayDuration:300,children:s.jsxs(qe,{children:[Pe,ze]})}),e[16]=Pe,e[17]=pe):pe=e[17];let Re;e[18]!==pe||e[19]!==J||e[20]!==ie?(Re=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[J,ie,pe]}),e[18]=pe,e[19]=J,e[20]=ie,e[21]=Re):Re=e[21];const mt=String(h);let De;e[22]!==m||e[23]!==u||e[24]!==d||e[25]!==mt?(De=s.jsx("div",{className:"border-b border-border pb-2",children:s.jsx(fs,{orgParam:d,onSelectOrg:u,onCreateOrg:m},mt)}),e[22]=m,e[23]=u,e[24]=d,e[25]=mt,e[26]=De):De=e[26];let Ee;if(e[27]!==f||e[28]!==o){let de;e[30]!==f?(de=He=>s.jsx(wt,{item:He,onClose:f},He.key),e[30]=f,e[31]=de):de=e[31],Ee=o.map(de),e[27]=f,e[28]=o,e[29]=Ee}else Ee=e[29];let Me;e[32]!==f||e[33]!==i?(Me=s.jsx(wt,{item:i,onClose:f}),e[32]=f,e[33]=i,e[34]=Me):Me=e[34];let ae;e[35]!==Ee||e[36]!==Me?(ae=s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[Ee,Me]}),e[35]=Ee,e[36]=Me,e[37]=ae):ae=e[37];let Fe;e[38]!==De||e[39]!==ae?(Fe=s.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[De,ae]}),e[38]=De,e[39]=ae,e[40]=Fe):Fe=e[40];let Ge;if(e[41]!==a.theme||e[42]!==c||e[43]!==l){let de;e[45]!==a.theme||e[46]!==c?(de=He=>{const{value:ye,icon:Ue,label:Ke}=He;return s.jsx("button",{type:"button","aria-label":Ke,onClick:()=>c(Qe=>({...Qe,theme:ye})),className:K("size-8 rounded-md flex items-center justify-center transition-colors",a.theme===ye?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Ue},ye)},e[45]=a.theme,e[46]=c,e[47]=de):de=e[47],Ge=l.map(de),e[41]=a.theme,e[42]=c,e[43]=l,e[44]=Ge}else Ge=e[44];let Ye;e[48]!==Ge?(Ye=s.jsx("div",{className:"flex items-center gap-0.5",children:Ge}),e[48]=Ge,e[49]=Ye):Ye=e[49];const ft=a.enableSounds?"Disable sounds":"Enable sounds";let be;e[50]!==c?(be=()=>c(Li),e[50]=c,e[51]=be):be=e[51];const je=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let ue;e[52]!==je?(ue=K("size-8 rounded-md flex items-center justify-center transition-colors",je),e[52]=je,e[53]=ue):ue=e[53];let he;e[54]!==a.enableSounds?(he=a.enableSounds?s.jsx(ss,{size:14}):s.jsx(ns,{size:14}),e[54]=a.enableSounds,e[55]=he):he=e[55];let me;e[56]!==ft||e[57]!==be||e[58]!==ue||e[59]!==he?(me=s.jsx("button",{type:"button","aria-label":ft,onClick:be,className:ue,children:he}),e[56]=ft,e[57]=be,e[58]=ue,e[59]=he,e[60]=me):me=e[60];let Be;e[61]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","3.27.0"]}),e[61]=Be):Be=e[61];let ge;e[62]!==me?(ge=s.jsxs("div",{className:"flex items-center gap-2",children:[me,Be]}),e[62]=me,e[63]=ge):ge=e[63];let ve;e[64]!==Ye||e[65]!==ge?(ve=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[Ye,ge]}),e[64]=Ye,e[65]=ge,e[66]=ve):ve=e[66];let Le;return e[67]!==Re||e[68]!==Fe||e[69]!==ve?(Le=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[Re,Fe,ve]}),e[67]=Re,e[68]=Fe,e[69]=ve,e[70]=Le):Le=e[70],Le}const x=n?.name??"U";let p;e[71]!==x||e[72]!==r?(p=s.jsx(os,{url:r,fallback:x,shape:"circle",size:"sm",className:"shrink-0"}),e[71]=x,e[72]=r,e[73]=p):p=e[73];const b=n?.name??"User";let j;e[74]!==b?(j=s.jsx("p",{className:"text-sm font-medium truncate",children:b}),e[74]=b,e[75]=j):j=e[75];const y=n?.email;let v;e[76]!==y?(v=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y}),e[76]=y,e[77]=v):v=e[77];let _;e[78]!==j||e[79]!==v?(_=s.jsxs("div",{className:"flex-1 min-w-0",children:[j,v]}),e[78]=j,e[79]=v,e[80]=_):_=e[80];let k;e[81]!==n?(k=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Bi)},e[81]=n,e[82]=k):k=e[82];let S;e[83]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(is,{size:14}),e[83]=S):S=e[83];let C;e[84]!==k?(C=s.jsx(Ve,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:k,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:S})}),e[84]=k,e[85]=C):C=e[85];let I;e[86]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(We,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[86]=I):I=e[86];let $;e[87]!==C?($=s.jsx(ts,{delayDuration:300,children:s.jsxs(qe,{children:[C,I]})}),e[87]=C,e[88]=$):$=e[88];let z;e[89]!==$||e[90]!==p||e[91]!==_?(z=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[p,_,$]}),e[89]=$,e[90]=p,e[91]=_,e[92]=z):z=e[92];let A;if(e[93]!==f||e[94]!==o){let q;e[96]!==f?(q=J=>s.jsx(wt,{item:J,onClose:f},J.key),e[96]=f,e[97]=q):q=e[97],A=o.map(q),e[93]=f,e[94]=o,e[95]=A}else A=e[95];let w;e[98]!==f||e[99]!==i?(w=s.jsx(wt,{item:i,onClose:f}),e[98]=f,e[99]=i,e[100]=w):w=e[100];let P;e[101]!==A||e[102]!==w?(P=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[A,w]}),e[101]=A,e[102]=w,e[103]=P):P=e[103];let H;if(e[104]!==a.theme||e[105]!==c||e[106]!==l){let q;e[108]!==a.theme||e[109]!==c?(q=J=>{const{value:Q,icon:ee,label:te}=J;return s.jsx("button",{type:"button","aria-label":te,onClick:()=>c(se=>({...se,theme:Q})),className:K("size-7 rounded-md flex items-center justify-center transition-colors",a.theme===Q?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:ee},Q)},e[108]=a.theme,e[109]=c,e[110]=q):q=e[110],H=l.map(q),e[104]=a.theme,e[105]=c,e[106]=l,e[107]=H}else H=e[107];let O;e[111]!==H?(O=s.jsx("div",{className:"flex items-center gap-0.5",children:H}),e[111]=H,e[112]=O):O=e[112];const B=a.enableSounds?"Disable sounds":"Enable sounds";let R;e[113]!==c?(R=()=>c(Gi),e[113]=c,e[114]=R):R=e[114];const L=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let D;e[115]!==L?(D=K("size-7 rounded-md flex items-center justify-center transition-colors",L),e[115]=L,e[116]=D):D=e[116];let G;e[117]!==a.enableSounds?(G=a.enableSounds?s.jsx(ss,{size:14}):s.jsx(ns,{size:14}),e[117]=a.enableSounds,e[118]=G):G=e[118];let F;e[119]!==B||e[120]!==R||e[121]!==D||e[122]!==G?(F=s.jsx("button",{type:"button","aria-label":B,onClick:R,className:D,children:G}),e[119]=B,e[120]=R,e[121]=D,e[122]=G,e[123]=F):F=e[123];let E;e[124]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","3.27.0"]}),e[124]=E):E=e[124];let V;e[125]!==F?(V=s.jsxs("div",{className:"flex items-center gap-2",children:[F,E]}),e[125]=F,e[126]=V):V=e[126];let W;e[127]!==O||e[128]!==V?(W=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[O,V]}),e[127]=O,e[128]=V,e[129]=W):W=e[129];let X;e[130]!==z||e[131]!==P||e[132]!==W?(X=s.jsxs("div",{className:"w-60 shrink-0 flex flex-col border-r border-border bg-sidebar/75",children:[z,P,W]}),e[130]=z,e[131]=P,e[132]=W,e[133]=X):X=e[133];const re=String(h);let Y;e[134]!==m||e[135]!==u||e[136]!==d||e[137]!==re?(Y=s.jsx("div",{className:"flex-1 flex flex-col min-w-0 min-h-0 overflow-hidden",children:s.jsx(fs,{orgParam:d,onSelectOrg:u,onCreateOrg:m},re)}),e[134]=m,e[135]=u,e[136]=d,e[137]=re,e[138]=Y):Y=e[138];let oe;return e[139]!==X||e[140]!==Y?(oe=s.jsxs("div",{className:"flex min-h-[380px] w-full overflow-hidden",children:[X,Y]}),e[139]=X,e[140]=Y,e[141]=oe):oe=e[141],oe}function Gi(t){return{...t,enableSounds:!t.enableSounds}}function Bi(){$e.success("User ID copied")}function Li(t){return{...t,enableSounds:!t.enableSounds}}function Hi(){$e.success("User ID copied")}function Ut(){const t=N.c(44),{data:e}=Ce.useSession(),{org:n}=fe(),r=Oe();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org",shouldThrow:!1},t[0]=o):o=t[0];const l=qn(o)?.params.org,[a,c]=Yn(),d=$s(),[u,m]=T.useState(!1),[f,g]=T.useState(!1),h=e?.user,x=h?.image;let p;t[1]!==r?(p=X=>{m(!1),r({to:"/$org",params:{org:X}})},t[1]=r,t[2]=p):p=t[2];const b=p;let j;t[3]===Symbol.for("react.memo_cache_sentinel")?(j=()=>m(!1),t[3]=j):j=t[3];const y=j;let v;t[4]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(ht,{size:16}),t[4]=v):v=t[4];let _;t[5]!==r||t[6]!==l?(_={key:"preferences",label:"Preferences",icon:v,onClick:()=>{r({to:"/$org/settings/profile",params:{org:l??""}})}},t[5]=r,t[6]=l,t[7]=_):_=t[7];let k;t[8]!==n||t[9]!==r?(k=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(fo,{size:16}),onClick:()=>{r({to:"/$org/install",params:{org:n.slug}})}}]:[],t[8]=n,t[9]=r,t[10]=k):k=t[10];let S;t[11]===Symbol.for("react.memo_cache_sentinel")?(S={key:"terms",label:"Terms of Use",icon:s.jsx(Cr,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[11]=S):S=t[11];let C;t[12]===Symbol.for("react.memo_cache_sentinel")?(C={key:"privacy",label:"Privacy Policy",icon:s.jsx(jo,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[12]=C):C=t[12];let I;t[13]===Symbol.for("react.memo_cache_sentinel")?(I={key:"github",label:"decocms/studio",icon:s.jsx(Xn,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[13]=I):I=t[13];let $;t[14]===Symbol.for("react.memo_cache_sentinel")?($={key:"community",label:"Community",icon:s.jsx(vo,{size:16}),href:"https://decocms.com/discord",external:!0},t[14]=$):$=t[14];let z;t[15]===Symbol.for("react.memo_cache_sentinel")?(z={key:"homepage",label:"Homepage",icon:s.jsx(xo,{size:16}),href:"https://decocms.com",external:!0},t[15]=z):z=t[15];let A;t[16]!==_||t[17]!==k?(A=[_,...k,S,C,I,$,z],t[16]=_,t[17]=k,t[18]=A):A=t[18];const w=A;let P;t[19]===Symbol.for("react.memo_cache_sentinel")?(P={key:"logout",label:"Sign out",icon:s.jsx(po,{size:16}),onClick:Ki},t[19]=P):P=t[19];const H=P;let O;t[20]===Symbol.for("react.memo_cache_sentinel")?(O={value:"light",icon:s.jsx(go,{size:14}),label:"Light theme"},t[20]=O):O=t[20];let B;t[21]===Symbol.for("react.memo_cache_sentinel")?(B={value:"dark",icon:s.jsx(bo,{size:14}),label:"Dark theme"},t[21]=B):B=t[21];let R;t[22]===Symbol.for("react.memo_cache_sentinel")?(R=[O,B,{value:"system",icon:s.jsx(ho,{size:14}),label:"System theme"}],t[22]=R):R=t[22];const L=R;let D;t[23]===Symbol.for("react.memo_cache_sentinel")?(D=()=>{m(!1),g(!0)},t[23]=D):D=t[23];let G;t[24]!==b||t[25]!==d||t[26]!==w||t[27]!==u||t[28]!==l||t[29]!==a||t[30]!==c||t[31]!==h||t[32]!==x?(G={user:h,userImage:x,menuItems:w,signOutItem:H,themeOptions:L,preferences:a,setPreferences:c,orgParam:l,onSelectOrg:b,onCreateOrg:D,close:y,isMobile:d,open:u},t[24]=b,t[25]=d,t[26]=w,t[27]=u,t[28]=l,t[29]=a,t[30]=c,t[31]=h,t[32]=x,t[33]=G):G=t[33];const F=G;let E;t[34]!==n||t[35]!==d||t[36]!==u||t[37]!==F?(E=d?s.jsxs(As,{open:u,onOpenChange:m,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>m(!0),className:"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",children:[s.jsx("div",{className:"shrink-0 size-5 rounded-md flex items-center justify-center border border-border/50 overflow-hidden",style:n?.logo?void 0:Ht(n?.name??""),children:n?.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"font-semibold leading-none text-[8px]",children:(n?.name??"?").slice(0,2).toUpperCase()})}),s.jsx("span",{className:"truncate",children:n?.name??"Account"})]}),s.jsxs(Ts,{className:"h-[80dvh] p-0",children:[s.jsx(Os,{className:"sr-only",children:"Account"}),s.jsx(xs,{...F})]})]}):s.jsxs(Rt,{open:u,onOpenChange:m,children:[s.jsx(ut,{asChild:!0,children:s.jsxs(ke,{tooltip:n?.name??"Account",className:"rounded-md",children:[s.jsx("div",{className:"shrink-0 size-6 rounded-md flex items-center justify-center border border-border/50 overflow-hidden",style:n?.logo?void 0:Ht(n?.name??""),children:n?.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"font-semibold leading-none text-[9px]",children:(n?.name??"?").slice(0,2).toUpperCase()})}),s.jsx("span",{className:"truncate",children:n?.name??"Account"})]})}),s.jsx(Dt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[520px] p-0 flex max-h-[520px]",onCloseAutoFocus:Ui,children:s.jsx(xs,{...F})})]}),t[34]=n,t[35]=d,t[36]=u,t[37]=F,t[38]=E):E=t[38];let V;t[39]!==f?(V=s.jsx(zi,{open:f,onOpenChange:g}),t[39]=f,t[40]=V):V=t[40];let W;return t[41]!==E||t[42]!==V?(W=s.jsxs(s.Fragment,{children:[E,V]}),t[41]=E,t[42]=V,t[43]=W):W=t[43],W}function Ui(t){return t.preventDefault()}function Ki(){Z("signed_out",{source:"account_popover"}),Qn(),Ce.signOut()}function Vi({invitation:t}){const[e,n]=T.useState(!1),[r,o]=T.useState(!1),i=Jn(),l=async()=>{n(!0);try{const d=await Ce.organization.acceptInvitation({invitationId:t.id});if(d.error){$e.error(d.error.message),n(!1);return}}catch{$e.error("Failed to accept invitation"),n(!1);return}$e.success("Invitation accepted!"),er();let c;try{c=(await Ce.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},a=async()=>{o(!0);try{const c=await Ce.organization.rejectInvitation({invitationId:t.id});c.error?($e.error(c.error.message),o(!1)):($e.success("Invitation declined"),i.invalidateQueries())}catch{$e.error("Failed to decline invitation"),o(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),s.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx(At,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:l,disabled:e||r,"aria-label":"Accept invitation",children:s.jsx(Us,{size:14})}),s.jsx(At,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:a,disabled:e||r,"aria-label":"Decline invitation",children:s.jsx(Vs,{size:14})})]})]})}function Wi(t){const e=N.c(14),{release:n,isSeen:r,onSelect:o}=t;let i;e[0]!==r?(i=!r&&s.jsx("span",{"aria-label":"New release",className:"absolute left-2 top-1/2 -translate-y-1/2 size-1.5 rounded-full bg-primary"}),e[0]=r,e[1]=i):i=e[1];let l;e[2]!==n.eyebrow?(l=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[2]=n.eyebrow,e[3]=l):l=e[3];let a;e[4]!==n.title?(a=s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[4]=n.title,e[5]=a):a=e[5];let c;e[6]!==l||e[7]!==a?(c=s.jsxs("div",{className:"flex-1 min-w-0",children:[l,a]}),e[6]=l,e[7]=a,e[8]=c):c=e[8];let d;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Xt,{size:16,className:"text-muted-foreground shrink-0"}),e[9]=d):d=e[9];let u;return e[10]!==o||e[11]!==i||e[12]!==c?(u=s.jsxs("button",{type:"button",onClick:o,className:"relative w-full flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors text-left",children:[i,c,d]}),e[10]=o,e[11]=i,e[12]=c,e[13]=u):u=e[13],u}function qi(){const t=T.useContext(tr),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(r=>r.status==="pending"&&new Date(r.expiresAt)>new Date)}function ln(){const t=N.c(10),{isSeen:e,markSeen:n,unseenCount:r}=Kr(),o=qi();let i;if(t[0]!==e||t[1]!==o){const c=[...o].sort(Qi).map(Xi);let d;t[3]!==e?(d=m=>({type:"release",release:m,isSeen:e(m.id)}),t[3]=e,t[4]=d):d=t[4];const u=[...Vr].sort(Yi).map(d);i=[...c,...u],t[0]=e,t[1]=o,t[2]=i}else i=t[2];const l=r+o.length;let a;return t[5]!==n||t[6]!==o||t[7]!==i||t[8]!==l?(a={items:i,pendingInvitations:o,redDotCount:l,markReleaseSeen:n},t[5]=n,t[6]=o,t[7]=i,t[8]=l,t[9]=a):a=t[9],a}function Yi(t,e){return new Date(e.date).getTime()-new Date(t.date).getTime()}function Xi(t){return{type:"invitation",invitation:t}}function Qi(t,e){return new Date(t.expiresAt).getTime()-new Date(e.expiresAt).getTime()}class an extends T.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 cn(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Zi(){const t=N.c(25),e=Oe(),{org:n}=fe();let r;t[0]!==n.id||t[1]!==n.slug?(r={connectionId:zs,orgId:n.id,orgSlug:n.slug},t[0]=n.id,t[1]=n.slug,t[2]=r):r=t[2];const o=Rs(r);let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i={providerId:"deco"},t[3]=i):i=t[3];let l;t[4]!==o?(l={client:o,toolName:"AI_PROVIDER_CREDITS",toolArguments:i,staleTime:6e4,select:Ji},t[4]=o,t[5]=l):l=t[5];const{data:a,isPending:c,isError:d}=qs(l),u=a?.balanceCents!=null?a.balanceCents/100:null;let m;t[6]!==u||t[7]!==d||t[8]!==c?(m=c||d||u==null?"Credits":`Credits: $${u.toFixed(2)}`,t[6]=u,t[7]=d,t[8]=c,t[9]=m):m=t[9];const f=m;let g;t[10]!==u?(g=K(u!=null&&cn(u)),t[10]=u,t[11]=g):g=t[11];let h;t[12]!==e||t[13]!==n.slug?(h=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[12]=e,t[13]=n.slug,t[14]=h):h=t[14];let x;t[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Es,{}),t[15]=x):x=t[15];let p;t[16]!==u?(p=u!=null?`$${u.toFixed(2)}`:"Credits",t[16]=u,t[17]=p):p=t[17];let b;t[18]!==p?(b=s.jsx("span",{children:p}),t[18]=p,t[19]=b):b=t[19];let j;return t[20]!==g||t[21]!==h||t[22]!==b||t[23]!==f?(j=s.jsx(Ae,{children:s.jsx(xe,{children:s.jsxs(ke,{tooltip:f,className:g,onClick:h,children:[x,b]})})}),t[20]=g,t[21]=h,t[22]=b,t[23]=f,t[24]=j):j=t[24],j}function Ji(t){return t.structuredContent}function el(){const t=N.c(1);if(!Ys().some(tl))return null;let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Zi,{}),t[0]=r):r=t[0],r}function tl(t){return t.providerId==="deco"}function sl(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(an,{children:s.jsx(T.Suspense,{fallback:null,children:s.jsx(el,{})})}),t[0]=e):e=t[0],e}function nl(){const t=N.c(25),e=Oe(),{org:n}=fe();let r;t[0]!==n.id||t[1]!==n.slug?(r={connectionId:zs,orgId:n.id,orgSlug:n.slug},t[0]=n.id,t[1]=n.slug,t[2]=r):r=t[2];const o=Rs(r);let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i={providerId:"deco"},t[3]=i):i=t[3];let l;t[4]!==o?(l={client:o,toolName:"AI_PROVIDER_CREDITS",toolArguments:i,staleTime:6e4,select:rl},t[4]=o,t[5]=l):l=t[5];const{data:a,isPending:c,isError:d}=qs(l),u=a?.balanceCents!=null?a.balanceCents/100:null;let m;t[6]!==u||t[7]!==d||t[8]!==c?(m=c||d||u==null?"Credits":`Credits: $${u.toFixed(2)}`,t[6]=u,t[7]=d,t[8]=c,t[9]=m):m=t[9];const f=m;let g;t[10]!==e||t[11]!==n.slug?(g=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[10]=e,t[11]=n.slug,t[12]=g):g=t[12];let h;t[13]!==u?(h=K(u!=null&&cn(u)),t[13]=u,t[14]=h):h=t[14];let x;t[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Es,{className:"size-4"}),t[15]=x):x=t[15];let p;t[16]!==g||t[17]!==h||t[18]!==f?(p=s.jsx(Ve,{asChild:!0,children:s.jsx(we,{"aria-label":f,onClick:g,className:h,children:x})}),t[16]=g,t[17]=h,t[18]=f,t[19]=p):p=t[19];let b;t[20]!==f?(b=s.jsx(We,{side:"top",children:f}),t[20]=f,t[21]=b):b=t[21];let j;return t[22]!==p||t[23]!==b?(j=s.jsxs(qe,{delayDuration:300,children:[p,b]}),t[22]=p,t[23]=b,t[24]=j):j=t[24],j}function rl(t){return t.structuredContent}function ol(){const t=N.c(1);if(!Ys().some(il))return null;let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(nl,{}),t[0]=r):r=t[0],r}function il(t){return t.providerId==="deco"}function ll(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(an,{children:s.jsx(T.Suspense,{fallback:null,children:s.jsx(ol,{})})}),t[0]=e):e=t[0],e}function dn(t){const e=N.c(15),{children:n}=t,{items:r,markReleaseSeen:o}=ln(),[i,l]=T.useState(null);let a;if(e[0]!==r||e[1]!==i){let x;e[3]!==i?(x=p=>p.type==="release"&&p.release.id===i,e[3]=i,e[4]=x):x=e[4],a=r.find(x),e[0]=r,e[1]=i,e[2]=a}else a=e[2];const c=a,d=c?.type==="release"?c.release:null;let u;e[5]!==o?(u=x=>{l(x),o(x)},e[5]=o,e[6]=u):u=e[6];const m=u;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=x=>{x||l(null)},e[7]=f):f=e[7];let g;e[8]!==m||e[9]!==r||e[10]!==d?(g=s.jsx(Dt,{side:"right",align:"start",sideOffset:16,collisionPadding:16,className:"w-[min(400px,calc(100vw-2rem))] p-0 h-[min(650px,calc(100dvh-4rem))] flex flex-col",children:d?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 border-b border-border shrink-0",children:[s.jsx(At,{size:"icon",variant:"ghost","aria-label":"Back to inbox",className:"size-7 text-muted-foreground",onClick:()=>l(null),children:s.jsx(Do,{size:16})}),s.jsx("h3",{className:"text-sm font-medium truncate",children:d.title})]}),s.jsx("div",{className:"overflow-y-auto flex-1 p-5",children:s.jsx(Wr,{release:d})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:s.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),r.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[s.jsx(Yt,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Nothing here yet"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Invitations and release updates will appear here"})]}):s.jsx("div",{className:"overflow-y-auto flex-1",children:r.map(x=>x.type==="invitation"?s.jsx(Vi,{invitation:x.invitation},`inv-${x.invitation.id}`):s.jsx(Wi,{release:x.release,isSeen:x.isSeen,onSelect:()=>m(x.release.id)},`rel-${x.release.id}`))})]})}),e[8]=m,e[9]=r,e[10]=d,e[11]=g):g=e[11];let h;return e[12]!==n||e[13]!==g?(h=s.jsxs(Rt,{onOpenChange:f,children:[n,g]}),e[12]=n,e[13]=g,e[14]=h):h=e[14],h}function un(){const{redDotCount:t}=ln();return t>0}function al(){const t=N.c(6),e=un();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Yt,{}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e,t[2]=r):r=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("span",{children:"Inbox"}),t[3]=o):o=t[3];let i;return t[4]!==r?(i=s.jsx(dn,{children:s.jsx(ut,{asChild:!0,children:s.jsxs(ke,{tooltip:"Inbox",className:"relative",children:[n,r,o]})})}),t[4]=r,t[5]=i):i=t[5],i}function cl(){const t=N.c(8),e=un();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Yt,{className:"size-4"}),t[0]=n):n=t[0];let r;t[1]!==e?(r=e&&s.jsx("span",{className:"absolute top-0.5 right-0.5 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e,t[2]=r):r=t[2];let o;t[3]!==r?(o=s.jsx(ut,{asChild:!0,children:s.jsx(Ve,{asChild:!0,children:s.jsxs(we,{"aria-label":"Inbox",children:[n,r]})})}),t[3]=r,t[4]=o):o=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(We,{side:"top",children:"Inbox"}),t[5]=i):i=t[5];let l;return t[6]!==o?(l=s.jsx(dn,{children:s.jsxs(qe,{delayDuration:300,children:[o,i]})}),t[6]=o,t[7]=l):l=t[7],l}function dl(){const t=N.c(3),[e,n]=T.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(ke,{tooltip:"Connections",onClick:()=>{Z("connections_dialog_opened",{source:"sidebar_footer",mode:"browse"}),n(!0)},children:[s.jsx(Ks,{}),s.jsx("span",{children:"Connections"})]}),t[0]=r):r=t[0];let o;return t[1]!==e?(o=s.jsxs(s.Fragment,{children:[r,s.jsx(Ws,{mode:"browse",open:e,onOpenChange:n,defaultTab:"all"})]}),t[1]=e,t[2]=o):o=t[2],o}function ul(){const t=N.c(3),[e,n]=T.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(qe,{delayDuration:300,children:[s.jsx(Ve,{asChild:!0,children:s.jsx(we,{"aria-label":"Connections",onClick:()=>{Z("connections_dialog_opened",{source:"sidebar_footer",mode:"browse"}),n(!0)},children:s.jsx(Ks,{className:"size-4"})})}),s.jsx(We,{side:"top",children:"Connections"})]}),t[0]=r):r=t[0];let o;return t[1]!==e?(o=s.jsxs(s.Fragment,{children:[r,s.jsx(Ws,{mode:"browse",open:e,onOpenChange:n,defaultTab:"all"})]}),t[1]=e,t[2]=o):o=t[2],o}function ml(){const t=N.c(7),e=Oe(),{org:n}=fe();let r;t[0]!==e||t[1]!==n.slug?(r=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=r):r=t[2];let o,i;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ht,{}),i=s.jsx("span",{children:"Settings"}),t[3]=o,t[4]=i):(o=t[3],i=t[4]);let l;return t[5]!==r?(l=s.jsxs(ke,{tooltip:"Settings",onClick:r,children:[o,i]}),t[5]=r,t[6]=l):l=t[6],l}function fl(){const t=N.c(9),e=Oe(),{org:n}=fe();let r;t[0]!==e||t[1]!==n.slug?(r=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=r):r=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ht,{className:"size-4"}),t[3]=o):o=t[3];let i;t[4]!==r?(i=s.jsx(Ve,{asChild:!0,children:s.jsx(we,{"aria-label":"Settings",onClick:r,children:o})}),t[4]=r,t[5]=i):i=t[5];let l;t[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(We,{side:"top",children:"Settings"}),t[6]=l):l=t[6];let a;return t[7]!==i?(a=s.jsxs(qe,{delayDuration:300,children:[i,l]}),t[7]=i,t[8]=a):a=t[8],a}function xl(){const t=N.c(6),{state:e}=Xe();if(e==="collapsed"){let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(sl,{}),t[0]=o):o=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(xe,{children:s.jsx(dl,{})}),t[1]=i):i=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(xe,{children:s.jsx(al,{})}),t[2]=l):l=t[2];let a;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(xe,{children:s.jsx(ml,{})}),t[3]=a):a=t[3];let c;return t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(Lt,{className:"px-2 pb-3 gap-1",children:[o,s.jsxs(Ae,{children:[i,l,a,s.jsx(xe,{children:s.jsx(Ut,{})})]})]}),t[4]=c):c=t[4],c}let r;return t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Lt,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Ae,{children:s.jsx(xe,{children:s.jsx(Ut,{})})})}),s.jsx(fl,{}),s.jsx(cl,{}),s.jsx(ul,{}),s.jsx(ll,{})]})}),t[5]=r):r=t[5],r}function pl(){const t=N.c(8),e=Oe(),{org:n}=fe(),{setOpenMobile:r}=Xe();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Ae,{children:s.jsx(xe,{children:s.jsx(Ut,{})})})}),t[0]=o):o=t[0];let i;t[1]!==e||t[2]!==n.slug||t[3]!==r?(i=()=>{e({to:"/$org/settings",params:{org:n.slug}}),r(!1)},t[1]=e,t[2]=n.slug,t[3]=r,t[4]=i):i=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ht,{className:"size-4"}),t[5]=l):l=t[5];let a;return t[6]!==i?(a=s.jsx(Lt,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[o,s.jsx(we,{"aria-label":"Settings",onClick:i,children:l})]})}),t[6]=i,t[7]=a):a=t[7],a}function hl(t,e){return t.filter(n=>!(e.ownerUserId!==void 0&&n.created_by!==e.ownerUserId||e.hasTrigger!==void 0&&!!n.trigger_id!==e.hasTrigger||!!n.hidden!==e.hidden))}function gl(t){const e=N.c(8),{virtualMcpId:n,size:r,showAutomationBadge:o}=t,i=r===void 0?"sm":r;let l;e[0]!==i||e[1]!==n?(l=n?s.jsx(bl,{virtualMcpId:n,size:i}):s.jsx(Te,{icon:null,name:"?",size:i}),e[0]=i,e[1]=n,e[2]=l):l=e[2];let a;e[3]!==o?(a=o&&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(Zs,{size:10,className:"text-white"})}),e[3]=o,e[4]=a):a=e[4];let c;return e[5]!==l||e[6]!==a?(c=s.jsxs("div",{className:"relative shrink-0",children:[l,a]}),e[5]=l,e[6]=a,e[7]=c):c=e[7],c}function bl(t){const e=N.c(6),{virtualMcpId:n,size:r}=t,o=pt(n);if(!o){let a;return e[0]!==r?(a=s.jsx(Te,{icon:null,name:"?",size:r}),e[0]=r,e[1]=a):a=e[1],a}const i=o.icon??null;let l;return e[2]!==o.title||e[3]!==r||e[4]!==i?(l=s.jsx(Te,{icon:i,name:o.title,size:r}),e[2]=o.title,e[3]=r,e[4]=i,e[5]=l):l=e[5],l}function jl(t){const e=N.c(36),{open:n,onOpenChange:r}=t,[o,i]=T.useState(""),{org:l}=fe(),{setTaskId:a}=Bs(),c=Qs();let d,u,m;e[0]!==l.id||e[1]!==o?(m=o.trim(),u=qt,d=Wt.globalSearch(l.id,m),e[0]=l.id,e[1]=o,e[2]=d,e[3]=u,e[4]=m):(d=e[2],u=e[3],m=e[4]);const f=n&&m.length>0;let g;e[5]!==c||e[6]!==m?(g=async()=>await c.call("GLOBAL_SEARCH",{query:m,limit:20}),e[5]=c,e[6]=m,e[7]=g):g=e[7];let h;e[8]!==d||e[9]!==f||e[10]!==g?(h={queryKey:d,enabled:f,queryFn:g,staleTime:1e4},e[8]=d,e[9]=f,e[10]=g,e[11]=h):h=e[11];const{data:x,isFetching:p}=u(h);let b;e[12]!==x?.items?(b=x?.items??[],e[12]=x?.items,e[13]=b):b=e[13];const j=b;let y;e[14]!==r?(y=w=>{w||i(""),r(w)},e[14]=r,e[15]=y):y=e[15];const v=y;let _;e[16]!==v||e[17]!==a?(_=w=>{v(!1),a(w.id,w.virtual_mcp_id??void 0)},e[16]=v,e[17]=a,e[18]=_):_=e[18];const k=_;let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsxs(Zo,{className:"sr-only",children:[s.jsx(Jo,{children:"Search"}),s.jsx(ei,{children:"Search across your organization's resources."})]}),e[19]=S):S=e[19];let C;e[20]!==o?(C=s.jsx(oi,{value:o,onValueChange:i,placeholder:"Search..."}),e[20]=o,e[21]=C):C=e[21];let I;e[22]!==k||e[23]!==p||e[24]!==j||e[25]!==m?(I=m?p&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):j.length===0?s.jsx(ni,{children:"No results."}):j.map(w=>w.type==="thread"?s.jsxs(ri,{value:`thread:${w.id}:${w.title}`,onSelect:()=>k(w),className:"gap-2.5",children:[s.jsx(gl,{virtualMcpId:w.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:w.title||"Untitled thread"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(w.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${w.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=k,e[23]=p,e[24]=j,e[25]=m,e[26]=I):I=e[26];let $;e[27]!==I?($=s.jsx(ii,{children:I}),e[27]=I,e[28]=$):$=e[28];let z;e[29]!==C||e[30]!==$?(z=s.jsxs(ti,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[S,s.jsxs(li,{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:[C,$]})]}),e[29]=C,e[30]=$,e[31]=z):z=e[31];let A;return e[32]!==v||e[33]!==n||e[34]!==z?(A=s.jsx(si,{open:n,onOpenChange:v,children:z}),e[32]=v,e[33]=n,e[34]=z,e[35]=A):A=e[35],A}function vl(t){return t==="owner"||t==="admin"}function yl(){const t=N.c(11),{locator:e}=fe(),n=ai(),{data:r}=Ce.useSession(),o=r?.user?.id;let i;t[0]!==e?(i=Wt.members(e),t[0]=e,t[1]=i):i=t[1];let l;t[2]!==n?(l=()=>n.organization.listMembers(),t[2]=n,t[3]=l):l=t[3];const a=!!o;let c;t[4]!==i||t[5]!==l||t[6]!==a?(c={queryKey:i,queryFn:l,enabled:a,staleTime:6e4},t[4]=i,t[5]=l,t[6]=a,t[7]=c):c=t[7];const{data:d}=qt(c);let u;if(t[8]!==d?.data?.members||t[9]!==o){const f=(d?.data?.members??[]).find(g=>g.userId===o)?.role;u=vl(f??void 0),t[8]=d?.data?.members,t[9]=o,t[10]=u}else u=t[10];return u}var Qt="ContextMenu",[_l]=dr(Qt,[ws]),ce=ws(),[Sl,mn]=_l(Qt),fn=t=>{const{__scopeContextMenu:e,children:n,onOpenChange:r,dir:o,modal:i=!0}=t,[l,a]=T.useState(!1),c=ce(e),d=ar(r),u=T.useCallback(m=>{a(m),d(m)},[d]);return s.jsx(Sl,{scope:e,open:l,onOpenChange:u,modal:i,children:s.jsx(cr,{...c,dir:o,open:l,onOpenChange:u,modal:i,children:n})})};fn.displayName=Qt;var xn="ContextMenuTrigger",pn=T.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=t,i=mn(xn,n),l=ce(n),a=T.useRef({x:0,y:0}),c=T.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),d=T.useRef(0),u=T.useCallback(()=>window.clearTimeout(d.current),[]),m=f=>{a.current={x:f.clientX,y:f.clientY},i.onOpenChange(!0)};return T.useEffect(()=>u,[u]),T.useEffect(()=>{r&&u()},[r,u]),s.jsxs(s.Fragment,{children:[s.jsx(sr,{...l,virtualRef:c}),s.jsx(nr.span,{"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:xt(t.onContextMenu,f=>{u(),m(f),f.preventDefault()}),onPointerDown:r?t.onPointerDown:xt(t.onPointerDown,kt(f=>{u(),d.current=window.setTimeout(()=>m(f),700)})),onPointerMove:r?t.onPointerMove:xt(t.onPointerMove,kt(u)),onPointerCancel:r?t.onPointerCancel:xt(t.onPointerCancel,kt(u)),onPointerUp:r?t.onPointerUp:xt(t.onPointerUp,kt(u))})]})});pn.displayName=xn;var Nl="ContextMenuPortal",hn=t=>{const{__scopeContextMenu:e,...n}=t,r=ce(e);return s.jsx(ir,{...r,...n})};hn.displayName=Nl;var gn="ContextMenuContent",bn=T.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=mn(gn,n),i=ce(n),l=T.useRef(!1);return s.jsx(lr,{...i,...r,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),!a.defaultPrevented&&l.current&&a.preventDefault(),l.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),!a.defaultPrevented&&!o.modal&&(l.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});bn.displayName=gn;var Cl="ContextMenuGroup",wl=T.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(ur,{...o,...r,ref:e})});wl.displayName=Cl;var kl="ContextMenuLabel",Il=T.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(mr,{...o,...r,ref:e})});Il.displayName=kl;var Ml="ContextMenuItem",jn=T.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(rr,{...o,...r,ref:e})});jn.displayName=Ml;var $l="ContextMenuCheckboxItem",Al=T.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(fr,{...o,...r,ref:e})});Al.displayName=$l;var Tl="ContextMenuRadioGroup",Ol=T.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(xr,{...o,...r,ref:e})});Ol.displayName=Tl;var Pl="ContextMenuRadioItem",zl=T.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(pr,{...o,...r,ref:e})});zl.displayName=Pl;var Rl="ContextMenuItemIndicator",Dl=T.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(hr,{...o,...r,ref:e})});Dl.displayName=Rl;var El="ContextMenuSeparator",vn=T.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(or,{...o,...r,ref:e})});vn.displayName=El;var Fl="ContextMenuArrow",Gl=T.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(gr,{...o,...r,ref:e})});Gl.displayName=Fl;var Bl="ContextMenuSubTrigger",Ll=T.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(br,{...o,...r,ref:e})});Ll.displayName=Bl;var Hl="ContextMenuSubContent",Ul=T.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,o=ce(n);return s.jsx(jr,{...o,...r,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ul.displayName=Hl;function kt(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var Kl=fn,Vl=pn,Wl=hn,ql=bn,Yl=jn,Xl=vn;function yn(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(Kl,{"data-slot":"context-menu",...n}),e[2]=n,e[3]=r):r=e[3],r}function _n(t){const e=N.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=s.jsx(Vl,{"data-slot":"context-menu-trigger",...n}),e[2]=n,e[3]=r):r=e[3],r}function Sn(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=K("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==r||e[6]!==o?(i=s.jsx(Wl,{children:s.jsx(ql,{"data-slot":"context-menu-content",className:o,...r})}),e[5]=r,e[6]=o,e[7]=i):i=e[7],i}function It(t){const e=N.c(12);let n,r,o,i;e[0]!==t?({className:n,inset:r,variant:i,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=i):(n=e[1],r=e[2],o=e[3],i=e[4]);const l=i===void 0?"default":i;let a;e[5]!==n?(a=K("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),e[5]=n,e[6]=a):a=e[6];let c;return e[7]!==r||e[8]!==o||e[9]!==a||e[10]!==l?(c=s.jsx(Yl,{"data-slot":"context-menu-item","data-inset":r,"data-variant":l,className:a,...o}),e[7]=r,e[8]=o,e[9]=a,e[10]=l,e[11]=c):c=e[11],c}function ps(t){const e=N.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let o;e[3]!==n?(o=K("bg-border -mx-1 my-1 h-px",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==r||e[6]!==o?(i=s.jsx(Xl,{"data-slot":"context-menu-separator",className:o,...r}),e[5]=r,e[6]=o,e[7]=i):i=e[7],i}function Nn(t){const e=N.c(26),{virtualMcpId:n,isOrgPinned:r,canManageOrgPin:o,onNewTaskInGroup:i,onShowSettings:l,onToggleOrgPin:a,onHideGroup:c}=t;let d;e[0]!==i||e[1]!==n?(d=()=>i(n),e[0]=i,e[1]=n,e[2]=d):d=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ne,{size:14,className:"mr-2"}),e[3]=u):u=e[3];let m;e[4]!==d?(m=s.jsxs(It,{onSelect:d,children:[u,"New task"]}),e[4]=d,e[5]=m):m=e[5];let f;e[6]!==l||e[7]!==n?(f=()=>l(n),e[6]=l,e[7]=n,e[8]=f):f=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ht,{size:14,className:"mr-2"}),e[9]=g):g=e[9];let h;e[10]!==f?(h=s.jsxs(It,{onSelect:f,children:[g,"Settings"]}),e[10]=f,e[11]=h):h=e[11];let x;e[12]!==o||e[13]!==r||e[14]!==a||e[15]!==n?(x=o&&s.jsxs(s.Fragment,{children:[s.jsx(ps,{}),s.jsxs(It,{onSelect:()=>a(n,!r),children:[s.jsx(Gr,{size:14,className:"mr-2"}),r?"Unpin for all members":"Pin for all members"]})]}),e[12]=o,e[13]=r,e[14]=a,e[15]=n,e[16]=x):x=e[16];let p;e[17]!==r||e[18]!==c||e[19]!==n?(p=!r&&s.jsxs(s.Fragment,{children:[s.jsx(ps,{}),s.jsxs(It,{onSelect:()=>c(n),children:[s.jsx(Eo,{size:14,className:"mr-2"}),"Hide"]})]}),e[17]=r,e[18]=c,e[19]=n,e[20]=p):p=e[20];let b;return e[21]!==m||e[22]!==h||e[23]!==x||e[24]!==p?(b=s.jsxs(s.Fragment,{children:[m,h,x,p]}),e[21]=m,e[22]=h,e[23]=x,e[24]=p,e[25]=b):b=e[25],b}function Ql(t){return t==="ephemeral"||t.startsWith("thread:")}const hs=new Map;function Cn(t){let e=hs.get(t);return e||(e={tick:0,subscribers:new Set,intervalId:null},hs.set(t,e)),e}function Zl(t,e){const n=Cn(t);return n.subscribers.add(e),n.intervalId===null&&(n.intervalId=setInterval(()=>{n.tick+=1;for(const r of n.subscribers)r()},t)),()=>{n.subscribers.delete(e),n.subscribers.size===0&&n.intervalId!==null&&(clearInterval(n.intervalId),n.intervalId=null)}}function Jl(t){const e=N.c(3),n=t;let r,o;return e[0]!==n?(r=i=>Zl(n,i),o=()=>Cn(n).tick,e[0]=n,e[1]=r,e[2]=o):(r=e[1],o=e[2]),T.useSyncExternalStore(r,o,ea)}function ea(){return 0}function Et(t){const e=N.c(45),{task:n,isActive:r,onClick:o,onArchive:i,showAutomationBadge:l,showAgentIcon:a,hideStatusIdle:c}=t,d=mi(n.status),u=d.icon,m=n.metadata?.kind==="tool_call_run",f=pt(m?void 0:n.virtual_mcp_id);let g;e[0]!==f?(g=Fo(f),e[0]=f,e[1]=g):g=e[1];const h=g;Jl(6e4);const x=l||!!n.trigger_id,p=n.id,b="button",j=0;let y;e[2]!==o?(y=F=>{F.target===F.currentTarget&&(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),o())},e[2]=o,e[3]=y):y=e[3];const v=r?"bg-accent text-accent-foreground":"hover:bg-accent/60";let _;e[4]!==v?(_=K("group/row flex items-center gap-2 px-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",v),e[4]=v,e[5]=_):_=e[5];let k;e[6]!==m||e[7]!==a||e[8]!==f?.icon||e[9]!==f?.title?(k=a&&!m&&s.jsx(Te,{icon:f?.icon??null,name:f?.title??"?",size:"2xs"}),e[6]=m,e[7]=a,e[8]=f?.icon,e[9]=f?.title,e[10]=k):k=e[10];let S;e[11]!==x?(S=x&&s.jsx(Zs,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[11]=x,e[12]=S):S=e[12];const C=n.title||"Untitled task";let I;e[13]!==C?(I=s.jsx("div",{className:"text-sm text-foreground truncate",children:C}),e[13]=C,e[14]=I):I=e[14];let $;e[15]!==I||e[16]!==S?($=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[S,I]}),e[15]=I,e[16]=S,e[17]=$):$=e[17];let z;e[18]!==h||e[19]!==r||e[20]!==n.branch||e[21]!==n.updated_at?(z=n.updated_at&&s.jsxs("div",{className:K("flex items-center gap-1 text-[11px] min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Ql(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):h?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[h.owner,"/",h.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:xi(new Date(n.updated_at))})]}),e[18]=h,e[19]=r,e[20]=n.branch,e[21]=n.updated_at,e[22]=z):z=e[22];let A;e[23]!==$||e[24]!==z?(A=s.jsxs("div",{className:"flex-1 min-w-0",children:[$,z]}),e[23]=$,e[24]=z,e[25]=A):A=e[25];const w="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",P=!c&&s.jsx("span",{className:"[grid-area:slot] flex size-7 items-center justify-center pointer-events-none transition-opacity group-hover/row:opacity-0","aria-label":d.label,children:s.jsx(u,{size:14,className:K(d.iconClassName,n.status==="in_progress"&&"animate-spin")})});let H;e[26]!==i?(H=F=>{F.stopPropagation(),i()},e[26]=i,e[27]=H):H=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(vr,{size:14}),e[28]=O):O=e[28];let B;e[29]!==H?(B=s.jsx(Ve,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":"Archive task",onClick:H,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-7 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:O})}),e[29]=H,e[30]=B):B=e[30];let R;e[31]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(We,{side:"right",children:"Archive"}),e[31]=R):R=e[31];let L;e[32]!==B?(L=s.jsxs(qe,{children:[B,R]}),e[32]=B,e[33]=L):L=e[33];let D;e[34]!==P||e[35]!==L?(D=s.jsxs("div",{className:w,children:[P,L]}),e[34]=P,e[35]=L,e[36]=D):D=e[36];let G;return e[37]!==o||e[38]!==A||e[39]!==D||e[40]!==y||e[41]!==_||e[42]!==k||e[43]!==n.id?(G=s.jsxs("div",{"data-task-id":p,role:b,tabIndex:j,onClick:o,onKeyDown:y,className:_,children:[k,A,D]}),e[37]=o,e[38]=A,e[39]=D,e[40]=y,e[41]=_,e[42]=k,e[43]=n.id,e[44]=G):G=e[44],G}function Zt(t){const e=N.c(10),{onClick:n,isFetching:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=K("flex items-center gap-2 px-2 py-1.5 rounded-md text-sm text-muted-foreground","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]=o):o=e[0];let i;e[1]!==r?(i=r&&s.jsx(Vt,{size:14,className:"animate-spin"}),e[1]=r,e[2]=i):i=e[2];const l=r?"Loading…":"Show more";let a;e[3]!==l?(a=s.jsx("span",{children:l}),e[3]=l,e[4]=a):a=e[4];let c;return e[5]!==r||e[6]!==n||e[7]!==i||e[8]!==a?(c=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:r,className:o,children:[i,a]}),e[5]=r,e[6]=n,e[7]=i,e[8]=a,e[9]=c):c=e[9],c}function ta(t,e,n,r){return[t,e,n,r.type,r.member,r.currentUserId??""].join("|")}function sa(t){return t.member==="mine"&&!t.currentUserId}const wn=4;let $t=0;const Kt=[];function na(){for(;$t<wn&&Kt.length>0;){const t=Kt.shift();t&&t()}}function kn(t){return new Promise((e,n)=>{const r=()=>{$t++,t().then(e,n).finally(()=>{$t--,na()})};$t<wn?r():Kt.push(r)})}const Ft=10;function gs(t,e,n,r,o){const i={hidden:!1};t==="agent"&&(i.virtual_mcp_id=e),r.member==="mine"&&r.currentUserId&&(i.created_by=r.currentUserId),r.type==="automation"&&(i.has_trigger=!0),r.type==="manual"&&(i.has_trigger=!1);const l={where:i,limit:o,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return t==="status"&&(l.status=e),l}function ra(t,e,n,r){let o=0;for(const i of t)Jt(i,e,n,r)&&o++;return o}function Bt(t,e,n,r){return ra(t,e,n,r)}function oa(t,e,n){const r=new Map;for(const o of t){const i=o.virtual_mcp_id;i&&Jt(o,e,i,n)&&r.set(i,(r.get(i)??0)+1)}return r}function ia(t,e){return!!(t>=Ft||t===0&&e)}function bs(t,e){return t<e}function la(t,e){return e===!1?!1:e===!0?!0:t}function Jt(t,e,n,r){return!(t.hidden||e==="agent"&&t.virtual_mcp_id!==n||e==="status"&&(t.status??"completed")!==n||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Ot=new Map,Mt=new Map;function aa(t,e){return e?t>=Ft?!0:null:!1}function js(t){return Ot.get(t)}function ca(t,e){Ot.set(t,e)}function da(t,e,n){const r=Ot.get(t);if(r!==void 0){n(r);return}let o=Mt.get(t);o||(o=kn(e).then(i=>(Ot.set(t,i),Mt.delete(t),i)).catch(()=>(Mt.delete(t),Promise.reject(new Error("group probe failed")))),Mt.set(t,o)),o.then(n,()=>n(!1))}function vs(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ft,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function ua(t,e,n,r,o){let i=0;for(const l of t)e.has(l.id)||Jt(l,n,r,o)&&i++;return i}function es(t,e,n,r){const o=N.c(8),{org:i}=fe(),l=ta(i.id,t,e,n);let a;o[0]!==n?(a=sa(n),o[0]=n,o[1]=a):a=o[1];const c=a,[d,u]=T.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});d.identity!==l&&u({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const m=Hr(),{threads:f,hasMore:g}=Gs(),h=r??Bt(f,t,e,n),x=ia(h,g),p=aa(h,g),b=Qs();if(d.identity===l&&d.serverHasMore===null){const S=p??js(l);S!==void 0&&u({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:d.probeSubscribedIdentity,serverHasMore:S})}!c&&d.identity===l&&d.serverHasMore===null&&p===null&&js(l)===void 0&&d.probeSubscribedIdentity!==l&&(u(S=>S.identity===l?{...S,isProbing:!0,probeSubscribedIdentity:l}:S),da(l,async()=>{const S=gs(t,e,0,n,1),C=await b.call("COLLECTION_THREADS_LIST",S),{totalCount:I}=vs(C),$=Bt(m.threads.get(),t,e,n);return I===void 0?!1:bs($,I)},S=>{u(C=>C.identity!==l?C:{...C,isProbing:!1,serverHasMore:S})}));const y=async function(){if(d.isFetching||d.isProbing||c)return;const C=l;u(I=>I.identity===C?{...I,isFetching:!0}:I);try{const I=Bt(f,t,e,n),$=gs(t,e,I,n,Ft),z=await kn(()=>b.call("COLLECTION_THREADS_LIST",$)),{items:A,hasMore:w,totalCount:P}=vs(z),H=new Set(f.map(ma)),O=ua(A,H,t,e,n),B=I;m.mergeThreads(A),u(R=>{if(R.identity!==C)return R;let L;return P!==void 0?L=bs(B+O,P):L=A.length===0||O===0?!1:w,ca(C,L),{...R,isFetching:!1,serverHasMore:L}})}catch(I){const $=I,z=$ instanceof Error?$.message:String($);$e.error(`Could not load more tasks: ${z}`),u(A=>A.identity===C?{...A,isFetching:!1}:A)}},v=d.isFetching||d.isProbing,_=!c&&!v&&la(x,d.serverHasMore);let k;return o[2]!==v||o[3]!==y||o[4]!==_||o[5]!==d.isProbing||o[6]!==d.serverHasMore?(k={hasMore:_,isFetching:v,isProbing:d.isProbing,serverHasMore:d.serverHasMore,loadMore:y},o[2]=v,o[3]=y,o[4]=_,o[5]=d.isProbing,o[6]=d.serverHasMore,o[7]=k):k=o[7],k}function ma(t){return t.id}function In(t){const e=N.c(61),{virtualMcpId:n,threads:r,activeTaskId:o,filters:i,onSelectTask:l,onArchiveTask:a,onNewTaskInGroup:c,onShowSettings:d,onHideGroup:u,isOrgPinned:m,canManageOrgPin:f,onToggleOrgPin:g,sortable:h,groupVisibleCount:x}=t,p=m===void 0?!1:m,b=f===void 0?!1:f,j=pt(n),y=r[0];let v;e[0]!==y||e[1]!==c||e[2]!==l||e[3]!==n?(v=()=>{y?l(y):c(n)},e[0]=y,e[1]=c,e[2]=l,e[3]=n,e[4]=v):v=e[4];const _=v,k=h?.isDragging?!1:void 0;let S;e[5]!==h?.isDragging||e[6]!==n?(S=q=>{h?.isDragging||q&&Z("sidebar_group_hover_popover_opened",{virtual_mcp_id:n})},e[5]=h?.isDragging,e[6]=n,e[7]=S):S=e[7];const C=!!(y&&o&&y.id===o),I=h?"Drag to reorder":void 0;let $;e[8]!==h?($=h?{...h.attributes,...h.listeners}:{},e[8]=h,e[9]=$):$=e[9];const z=h&&"cursor-pointer active:cursor-grabbing touch-none",A=h?.isDragging&&"cursor-grabbing";let w;e[10]!==A||e[11]!==z?(w=K("group-data-[state=collapsed]/sidebar:!size-10 group-data-[state=collapsed]/sidebar:!max-w-none group-data-[state=collapsed]/sidebar:!overflow-visible group-data-[state=collapsed]/sidebar:[&_svg]:opacity-100",z,A),e[10]=A,e[11]=z,e[12]=w):w=e[12];const P=j?.icon??null,H=j?.title??"?";let O;e[13]!==P||e[14]!==H?(O=s.jsx(Te,{icon:P,name:H,size:"sm+",className:"rounded-lg"}),e[13]=P,e[14]=H,e[15]=O):O=e[15];let B;e[16]!==_||e[17]!==w||e[18]!==O||e[19]!==C||e[20]!==I||e[21]!==$?(B=s.jsx(xe,{children:s.jsx(_n,{asChild:!0,children:s.jsx(ci,{asChild:!0,children:s.jsx(ke,{onClick:_,isActive:C,title:I,...$,className:w,children:O})})})}),e[16]=_,e[17]=w,e[18]=O,e[19]=C,e[20]=I,e[21]=$,e[22]=B):B=e[22];const R=g??fa;let L;e[23]!==b||e[24]!==p||e[25]!==u||e[26]!==c||e[27]!==d||e[28]!==R||e[29]!==n?(L=s.jsx(Sn,{className:"w-56",children:s.jsx(Nn,{virtualMcpId:n,isOrgPinned:p,canManageOrgPin:b,onNewTaskInGroup:c,onShowSettings:d,onToggleOrgPin:R,onHideGroup:u})}),e[23]=b,e[24]=p,e[25]=u,e[26]=c,e[27]=d,e[28]=R,e[29]=n,e[30]=L):L=e[30];let D;e[31]!==B||e[32]!==L?(D=s.jsxs(yn,{children:[B,L]}),e[31]=B,e[32]=L,e[33]=D):D=e[33];const G=j?.title??"Agent";let F;e[34]!==G?(F=s.jsx("span",{className:"truncate",children:G}),e[34]=G,e[35]=F):F=e[35];let E;e[36]!==c||e[37]!==n?(E=()=>c(n),e[36]=c,e[37]=n,e[38]=E):E=e[38];let V;e[39]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(Ne,{size:14}),e[39]=V):V=e[39];let W;e[40]!==E?(W=s.jsx("button",{type:"button","aria-label":"New task in this agent",onClick:E,className:"flex size-6 items-center justify-center rounded-md hover:bg-accent text-muted-foreground hover:text-foreground",children:V}),e[40]=E,e[41]=W):W=e[41];let X;e[42]!==F||e[43]!==W?(X=s.jsxs("div",{className:"flex items-center justify-between px-1 pb-1 text-xs font-medium",children:[F,W]}),e[42]=F,e[43]=W,e[44]=X):X=e[44];let re;e[45]!==o||e[46]!==i||e[47]!==x||e[48]!==a||e[49]!==l||e[50]!==r||e[51]!==n?(re=s.jsx(xa,{virtualMcpId:n,threads:r,activeTaskId:o,filters:i,groupVisibleCount:x,onSelectTask:l,onArchiveTask:a}),e[45]=o,e[46]=i,e[47]=x,e[48]=a,e[49]=l,e[50]=r,e[51]=n,e[52]=re):re=e[52];let Y;e[53]!==X||e[54]!==re?(Y=s.jsxs(di,{side:"right",align:"start",sideOffset:8,className:"w-72 p-2",children:[X,re]}),e[53]=X,e[54]=re,e[55]=Y):Y=e[55];let oe;return e[56]!==D||e[57]!==Y||e[58]!==k||e[59]!==S?(oe=s.jsxs(ui,{open:k,openDelay:120,closeDelay:150,onOpenChange:S,children:[D,Y]}),e[56]=D,e[57]=Y,e[58]=k,e[59]=S,e[60]=oe):oe=e[60],oe}function fa(){}function xa(t){const e=N.c(6),{virtualMcpId:n,threads:r,activeTaskId:o,filters:i,groupVisibleCount:l,onSelectTask:a,onArchiveTask:c}=t,d=es("agent",n,i,l);let u;return e[0]!==o||e[1]!==c||e[2]!==a||e[3]!==d||e[4]!==r?(u=s.jsx("div",{className:"flex flex-col gap-0.5 max-h-[60vh] overflow-y-auto",children:r.length===0&&!d.hasMore&&!d.isFetching?s.jsx("div",{className:"px-2 py-1.5 text-xs text-muted-foreground",children:"No tasks yet"}):s.jsxs(s.Fragment,{children:[r.map(m=>s.jsx(Et,{task:m,isActive:o===m.id,onClick:()=>a(m),onArchive:()=>c(m),showAutomationBadge:!!m.trigger_id},m.id)),(d.hasMore||d.isFetching)&&s.jsx(Zt,{onClick:()=>{d.loadMore()},isFetching:d.isFetching})]})}),e[0]=o,e[1]=c,e[2]=a,e[3]=d,e[4]=r,e[5]=u):u=e[5],u}function pa(t,e,n,r,o,i,l){const a=N.c(18),c=l===void 0?"expanded":l;let d;a[0]===Symbol.for("react.memo_cache_sentinel")?(d={activationConstraint:{distance:8}},a[0]=d):d=a[0];let u;a[1]===Symbol.for("react.memo_cache_sentinel")?(u={coordinateGetter:Ho},a[1]=u):u=a[1];const m=Go(ls(Lo,d),ls(Bo,u));let f;a[2]!==r||a[3]!==o||a[4]!==e||a[5]!==t?(f=Qr(t,e,r,o),a[2]=r,a[3]=o,a[4]=e,a[5]=t,a[6]=f):f=a[6];const g=f;let h;a[7]!==i||a[8]!==n||a[9]!==o||a[10]!==e||a[11]!==g||a[12]!==c?(h=b=>{const{active:j,over:y}=b;if(!y||j.id===y.id)return;const v=String(j.id),_=String(y.id);if(!Zr(v,_,o))return;const k=Jr(g,v,_),S=eo(e,n,o,k);e==="org"?to(n.orgId,S):so(n,S),Z("sidebar_group_reordered",{virtual_mcp_id:v,over_virtual_mcp_id:_,surface:c,section:e}),i()},a[7]=i,a[8]=n,a[9]=o,a[10]=e,a[11]=g,a[12]=c,a[13]=h):h=a[13];const x=h;let p;return a[14]!==x||a[15]!==m||a[16]!==g?(p={sensors:m,sortableIds:g,handleDragEnd:x},a[14]=x,a[15]=m,a[16]=g,a[17]=p):p=a[17],p}function ha(t){const e=N.c(2),{collapsed:n}=t;if(n===void 0?!1:n){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{role:"separator","aria-orientation":"horizontal",className:"mx-auto my-1 h-px w-6 shrink-0 bg-border"}),e[0]=i):i=e[0],i}let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{role:"separator","aria-orientation":"horizontal",className:"my-1.5 h-px w-full shrink-0 bg-border"}),e[1]=o):o=e[1],o}function ga(t){const e=N.c(12),{id:n,children:r}=t;let o;e[0]!==n?(o={id:n},e[0]=n,e[1]=o):o=e[1];const{attributes:i,listeners:l,setNodeRef:a,transform:c,transition:d,isDragging:u}=qo(o);let m;if(e[2]!==i||e[3]!==r||e[4]!==u||e[5]!==l||e[6]!==a||e[7]!==c||e[8]!==d){const g={transform:Yo.Transform.toString(c),transition:d,zIndex:u?100:void 0};m=r({setNodeRef:a,style:g,isDragging:u,attributes:i,listeners:l}),e[2]=i,e[3]=r,e[4]=u,e[5]=l,e[6]=a,e[7]=c,e[8]=d,e[9]=m}else m=e[9];let f;return e[10]!==m?(f=s.jsx(s.Fragment,{children:m}),e[10]=m,e[11]=f):f=e[11],f}function ys(t){const e=N.c(18),{section:n,groups:r,orderScope:o,decopilotId:i,orgPinnedIds:l,onReorder:a,surface:c,renderGroup:d,renderSortable:u,renderFixed:m}=t,{sensors:f,sortableIds:g,handleDragEnd:h}=pa(r,n,o,i,l,a,c);if(r.length===0)return null;const x=g;let p;if(e[0]!==r||e[1]!==m||e[2]!==d||e[3]!==u||e[4]!==g){let y;e[6]!==m||e[7]!==d||e[8]!==u||e[9]!==g?(y=v=>{const _=d(v);return g.includes(v.virtualMcpId)?s.jsx(ga,{id:v.virtualMcpId,children:k=>{const{setNodeRef:S,style:C,isDragging:I,attributes:$,listeners:z}=k;return s.jsx("div",{ref:S,style:C,className:K(I&&"opacity-50"),children:u(_,{attributes:$,listeners:z,isDragging:I})})}},v.virtualMcpId):s.jsx("div",{children:m(_)},v.virtualMcpId)},e[6]=m,e[7]=d,e[8]=u,e[9]=g,e[10]=y):y=e[10],p=r.map(y),e[0]=r,e[1]=m,e[2]=d,e[3]=u,e[4]=g,e[5]=p}else p=e[5];let b;e[11]!==x||e[12]!==p?(b=s.jsx(Uo,{items:x,strategy:Ko,children:p}),e[11]=x,e[12]=p,e[13]=b):b=e[13];let j;return e[14]!==h||e[15]!==f||e[16]!==b?(j=s.jsx(Vo,{sensors:f,collisionDetection:Wo,onDragEnd:h,children:b}),e[14]=h,e[15]=f,e[16]=b,e[17]=j):j=e[17],j}function Mn(t){const e=N.c(23),{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,surface:a,collapsedSeparator:c,renderGroup:d,renderSortable:u,renderFixed:m}=t;let f;if(e[0]!==c||e[1]!==o||e[2]!==n||e[3]!==l||e[4]!==r||e[5]!==i||e[6]!==m||e[7]!==d||e[8]!==u||e[9]!==a){const{decopilot:g,orgPinned:h,user:x,toolCallRuns:p}=no(n,o,i),b=h.length>0&&x.length>0;let j;e[11]!==o||e[12]!==l||e[13]!==r||e[14]!==i||e[15]!==m||e[16]!==d||e[17]!==u||e[18]!==a?(j={orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,surface:a,renderGroup:d,renderSortable:u,renderFixed:m},e[11]=o,e[12]=l,e[13]=r,e[14]=i,e[15]=m,e[16]=d,e[17]=u,e[18]=a,e[19]=j):j=e[19];const y=j;let v;e[20]!==c||e[21]!==b?(v=b&&s.jsx(ha,{collapsed:c}),e[20]=c,e[21]=b,e[22]=v):v=e[22],f=s.jsxs(s.Fragment,{children:[g&&m(d(g)),s.jsx(ys,{section:"org",groups:h,...y}),v,s.jsx(ys,{section:"user",groups:x,...y}),p&&m(d(p))]}),e[0]=c,e[1]=o,e[2]=n,e[3]=l,e[4]=r,e[5]=i,e[6]=m,e[7]=d,e[8]=u,e[9]=a,e[10]=f}else f=e[10];return f}function ba(t){const e=N.c(7),{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,renderGroup:a}=t;let c;return e[0]!==o||e[1]!==n||e[2]!==l||e[3]!==r||e[4]!==i||e[5]!==a?(c=s.jsx(Mn,{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,surface:"collapsed_rail",collapsedSeparator:!0,renderGroup:a,renderFixed:va,renderSortable:ja}),e[0]=o,e[1]=n,e[2]=l,e[3]=r,e[4]=i,e[5]=a,e[6]=c):c=e[6],c}function ja(t,e){return s.jsx(In,{...t,sortable:{attributes:e.attributes,listeners:e.listeners,isDragging:e.isDragging}},t.virtualMcpId)}function va(t){return s.jsx(In,{...t},t.virtualMcpId)}const ya="sidebar.group.expanded.";function $n(t,e){const n=N.c(3),[r,o]=yr(`${ya}${t}`,e);let i;return n[0]!==r||n[1]!==o?(i=[r,o],n[0]=r,n[1]=o,n[2]=i):i=n[2],i}function An(t){const e=N.c(59),{virtualMcpId:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,onNewTaskInGroup:a,onShowSettings:c,onHideGroup:d,isOrgPinned:u,canManageOrgPin:m,onToggleOrgPin:f,filters:g,groupVisibleCount:h,sortable:x}=t,p=u===void 0?!1:u,b=m===void 0?!1:m,[j,y]=$n(n,!1),v=n===Ls,_=x?.isDragging??!1;let k;e[0]!==j||e[1]!==y?(k=function(){y(!j)},e[0]=j,e[1]=y,e[2]=k):k=e[2];const S=k;let C;e[3]!==v||e[4]!==x?(C=x&&!v?{...x.attributes,...x.listeners}:{},e[3]=v,e[4]=x,e[5]=C):C=e[5];let I;e[6]!==S?(I=E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),S())},e[6]=S,e[7]=I):I=e[7];const $=x&&!v&&"touch-none active:cursor-grabbing",z=_&&"shadow-md bg-accent/40 cursor-grabbing";let A;e[8]!==$||e[9]!==z?(A=K("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",$,z),e[8]=$,e[9]=z,e[10]=A):A=e[10];let w;e[11]!==v||e[12]!==n?(w=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(Sa,{virtualMcpId:n,isToolCallRuns:v})}),e[11]=v,e[12]=n,e[13]=w):w=e[13];let P;e[14]!==j?(P=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:j?s.jsx(Js,{size:14}):s.jsx(Xt,{size:14})}),e[14]=j,e[15]=P):P=e[15];let H;e[16]!==P||e[17]!==w?(H=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[w,P]}),e[16]=P,e[17]=w,e[18]=H):H=e[18];let O;e[19]!==v||e[20]!==n?(O=s.jsx("span",{className:"flex-1 truncate",children:s.jsx(Ca,{virtualMcpId:n,isToolCallRuns:v})}),e[19]=v,e[20]=n,e[21]=O):O=e[21];let B;e[22]!==v||e[23]!==a||e[24]!==n?(B=!v&&s.jsx("button",{type:"button","aria-label":"New task in this agent",onClick:E=>{E.stopPropagation(),a(n)},className:"opacity-0 group-hover/group:opacity-100 focus-visible:opacity-100 transition-opacity flex size-7 items-center justify-center rounded-md hover:bg-accent text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(Ne,{size:14})}),e[22]=v,e[23]=a,e[24]=n,e[25]=B):B=e[25];let R;e[26]!==j||e[27]!==S||e[28]!==H||e[29]!==O||e[30]!==B||e[31]!==C||e[32]!==I||e[33]!==A?(R=s.jsxs("div",{...C,role:"button",tabIndex:0,"aria-expanded":j,onClick:S,onKeyDown:I,className:A,children:[H,O,B]}),e[26]=j,e[27]=S,e[28]=H,e[29]=O,e[30]=B,e[31]=C,e[32]=I,e[33]=A,e[34]=R):R=e[34];const L=R;let D;e[35]!==b||e[36]!==L||e[37]!==p||e[38]!==v||e[39]!==d||e[40]!==a||e[41]!==c||e[42]!==f||e[43]!==n?(D=v?L:s.jsxs(yn,{children:[s.jsx(_n,{asChild:!0,children:L}),s.jsx(Sn,{className:"w-56",children:s.jsx(Nn,{virtualMcpId:n,isOrgPinned:p,canManageOrgPin:b,onNewTaskInGroup:a,onShowSettings:c,onToggleOrgPin:f??_a,onHideGroup:d})})]}),e[35]=b,e[36]=L,e[37]=p,e[38]=v,e[39]=d,e[40]=a,e[41]=c,e[42]=f,e[43]=n,e[44]=D):D=e[44];let G;e[45]!==o||e[46]!==j||e[47]!==g||e[48]!==h||e[49]!==v||e[50]!==l||e[51]!==a||e[52]!==i||e[53]!==r||e[54]!==n?(G=j&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:v?r.map(E=>s.jsx(Et,{task:E,isActive:o===E.id,onClick:()=>i(E),onArchive:()=>l(E),showAutomationBadge:!!E.trigger_id},E.id)):s.jsx(ka,{virtualMcpId:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,onNewTaskInGroup:a,filters:g,groupVisibleCount:h})}),e[45]=o,e[46]=j,e[47]=g,e[48]=h,e[49]=v,e[50]=l,e[51]=a,e[52]=i,e[53]=r,e[54]=n,e[55]=G):G=e[55];let F;return e[56]!==D||e[57]!==G?(F=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[D,G]}),e[56]=D,e[57]=G,e[58]=F):F=e[58],F}function _a(){}function Sa(t){const e=N.c(3),{virtualMcpId:n,isToolCallRuns:r}=t;if(r){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Te,{icon:null,name:"⚙",size:"2xs"}),e[0]=i):i=e[0],i}let o;return e[1]!==n?(o=s.jsx(Na,{virtualMcpId:n}),e[1]=n,e[2]=o):o=e[2],o}function Na(t){const e=N.c(4),{virtualMcpId:n}=t,r=pt(n);if(!r){let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Te,{icon:null,name:"?",size:"2xs"}),e[0]=l):l=e[0],l}const o=r.icon??null;let i;return e[1]!==r.title||e[2]!==o?(i=s.jsx(Te,{icon:o,name:r.title,size:"2xs"}),e[1]=r.title,e[2]=o,e[3]=i):i=e[3],i}function Ca(t){const e=N.c(3),{virtualMcpId:n,isToolCallRuns:r}=t;if(r){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(s.Fragment,{children:"Automation runs"}),e[0]=i):i=e[0],i}let o;return e[1]!==n?(o=s.jsx(wa,{virtualMcpId:n}),e[1]=n,e[2]=o):o=e[2],o}function wa(t){const e=N.c(2),{virtualMcpId:n}=t,o=pt(n)?.title??"Agent";let i;return e[0]!==o?(i=s.jsx(s.Fragment,{children:o}),e[0]=o,e[1]=i):i=e[1],i}function ka(t){const e=N.c(10),{virtualMcpId:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,onNewTaskInGroup:a,filters:c,groupVisibleCount:d}=t,u=es("agent",n,c,d),{isFetching:m,isProbing:f,loadMore:g,serverHasMore:h}=u,[x,p]=T.useState(!1);!x&&r.length===0&&h===!0&&!m&&!f&&(p(!0),queueMicrotask(()=>{g()}));const{hasMore:b}=u;let j;return e[0]!==o||e[1]!==b||e[2]!==m||e[3]!==g||e[4]!==l||e[5]!==a||e[6]!==i||e[7]!==r||e[8]!==n?(j=s.jsx(s.Fragment,{children:r.length===0?s.jsxs("button",{type:"button",onClick:()=>a(n),className:"flex items-center gap-2 px-2 py-1.5 rounded-md cursor-pointer text-sm text-muted-foreground hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[s.jsx(Ne,{size:14}),s.jsx("span",{children:"New thread"})]}):s.jsxs(s.Fragment,{children:[r.map(y=>s.jsx(Et,{task:y,isActive:o===y.id,onClick:()=>i(y),onArchive:()=>l(y),showAutomationBadge:!!y.trigger_id},y.id)),(b||m)&&s.jsx(Zt,{onClick:()=>{g()},isFetching:m})]})}),e[0]=o,e[1]=b,e[2]=m,e[3]=g,e[4]=l,e[5]=a,e[6]=i,e[7]=r,e[8]=n,e[9]=j):j=e[9],j}function Ia(t){const e=N.c(16),{status:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,filters:a}=t,{isFetching:c,isProbing:d,loadMore:u,hasMore:m,serverHasMore:f}=es("status",n,a),[g,h]=T.useState(!1);!g&&r.length===0&&f===!0&&!c&&!d&&(h(!0),queueMicrotask(()=>{u()}));let x;if(e[0]!==o||e[1]!==l||e[2]!==i||e[3]!==r){let j;e[5]!==o||e[6]!==l||e[7]!==i?(j=y=>s.jsx(Et,{task:y,isActive:o===y.id,onClick:()=>i(y),onArchive:()=>l(y),showAutomationBadge:!!y.trigger_id,showAgentIcon:!0,hideStatusIdle:!0},y.id),e[5]=o,e[6]=l,e[7]=i,e[8]=j):j=e[8],x=r.map(j),e[0]=o,e[1]=l,e[2]=i,e[3]=r,e[4]=x}else x=e[4];let p;e[9]!==m||e[10]!==c||e[11]!==u?(p=(m||c)&&s.jsx(Zt,{onClick:()=>{u()},isFetching:c}),e[9]=m,e[10]=c,e[11]=u,e[12]=p):p=e[12];let b;return e[13]!==x||e[14]!==p?(b=s.jsxs(s.Fragment,{children:[x,p]}),e[13]=x,e[14]=p,e[15]=b):b=e[15],b}function Ma(t){const e=N.c(35),{status:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,filters:a}=t,c=fi[n],d=c.icon,[u,m]=$n(`status-${n}`,!1);let f;e[0]!==u||e[1]!==m?(f=function(){m(!u)},e[0]=u,e[1]=m,e[2]=f):f=e[2];const g=f;let h;e[3]!==g?(h=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),g())},e[3]=g,e[4]=h):h=e[4];let x;e[5]!==d||e[6]!==c.iconClassName?(x=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(d,{size:12,className:c.iconClassName})}),e[5]=d,e[6]=c.iconClassName,e[7]=x):x=e[7];let p;e[8]!==u?(p=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(Js,{size:14}):s.jsx(Xt,{size:14})}),e[8]=u,e[9]=p):p=e[9];let b;e[10]!==x||e[11]!==p?(b=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[x,p]}),e[10]=x,e[11]=p,e[12]=b):b=e[12];let j;e[13]!==c.label?(j=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=j):j=e[14];let y;e[15]!==r.length?(y=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:r.length})}),e[15]=r.length,e[16]=y):y=e[16];let v;e[17]!==u||e[18]!==g||e[19]!==h||e[20]!==b||e[21]!==j||e[22]!==y?(v=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:g,onKeyDown:h,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:[b,j,y]}),e[17]=u,e[18]=g,e[19]=h,e[20]=b,e[21]=j,e[22]=y,e[23]=v):v=e[23];let _;e[24]!==o||e[25]!==u||e[26]!==a||e[27]!==l||e[28]!==i||e[29]!==n||e[30]!==r?(_=u&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(Ia,{status:n,threads:r,activeTaskId:o,onSelectTask:i,onArchiveTask:l,filters:a})}),e[24]=o,e[25]=u,e[26]=a,e[27]=l,e[28]=i,e[29]=n,e[30]=r,e[31]=_):_=e[31];let k;return e[32]!==v||e[33]!==_?(k=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[v,_]}),e[32]=v,e[33]=_,e[34]=k):k=e[34],k}function $a(t){const e=N.c(7),{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,renderGroup:a}=t;let c;return e[0]!==o||e[1]!==n||e[2]!==l||e[3]!==r||e[4]!==i||e[5]!==a?(c=s.jsx(Mn,{groups:n,orderScope:r,decopilotId:o,orgPinnedIds:i,onReorder:l,surface:"expanded",renderGroup:a,renderFixed:Ta,renderSortable:Aa}),e[0]=o,e[1]=n,e[2]=l,e[3]=r,e[4]=i,e[5]=a,e[6]=c):c=e[6],c}function Aa(t,e){return s.jsx(An,{...t,sortable:e},t.virtualMcpId)}function Ta(t){return s.jsx(An,{...t},t.virtualMcpId)}function Oa(t,e,n,r){return[t.orgId,t.userId,r,n.slice().sort().join(","),e.map(o=>o.virtualMcpId).sort().join(",")].join("|")}function Pa(t,e,n,r,o){const i=N.c(5),l=Oa(t,e,r,o),[a,c]=T.useState("");a!==l&&(ro(t,e,n,r),c(l));let d;return i[0]!==n||i[1]!==r||i[2]!==t||i[3]!==e?(d=oo(t,e,n,r),i[0]=n,i[1]=r,i[2]=t,i[3]=e,i[4]=d):d=i[4],d}const Tn={all:"All tasks",manual:"Chats",automation:"Automation"},On={all:"All members",mine:"Mine only"},_s={agent:"Agent",status:"Status"};function Pn(){const t=N.c(92),{data:e}=Ce.useSession(),n=e?.user?.id,r=n??"anon",{org:o}=fe(),i=$r(o.id).id,a=Ds().filter(Ua).map(Ha),c=yl(),d=Ar();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u={},t[0]=u):u=t[0];const[m,f]=T.useState(u),g=new Set(a),h={},x=[];let p;t[1]!==m?(p=Object.entries(m),t[1]=m,t[2]=p):p=t[2];for(const[M,U]of p)g.has(M)!==U?h[M]=U:x.push(M);x.length>0&&f(M=>{const U={...M};for(const ne of x)delete U[ne];return U});const b=new Set(a);for(const[M,U]of Object.entries(h))U?b.add(M):b.delete(M);const j=[...b],y=new Set(j),{threads:v}=Gs(),_=hl(v,{hidden:!1}),{hide:k}=Fs(),S=Oe(),{setTaskId:C,createNewTask:I}=Bs();let $;t[3]===Symbol.for("react.memo_cache_sentinel")?($={strict:!1},t[3]=$):$=t[3];const A=Cs($).taskId??null,w=[..._].sort(La),[P,H]=T.useState("all"),[O,B]=T.useState("mine"),[R,L]=T.useState("agent"),[D,G]=T.useState(!1),[F,E]=T.useState(!1),[V,W]=T.useState(0),X=io(),re=V+X;let Y;t[4]!==o.id||t[5]!==r?(Y={orgId:o.id,userId:r},t[4]=o.id,t[5]=r,t[6]=Y):Y=t[6];const oe=Y,q={type:P,member:O,currentUserId:n??null},J=oa(w,"agent",q),Q=Pa(oe,lo(w,i),i,j,re);let ee;t[7]!==n||t[8]!==O?(ee=M=>O==="mine"&&n?M.filter(U=>U.created_by===n):M,t[7]=n,t[8]=O,t[9]=ee):ee=t[9];const te=ee;let se;t[10]!==P?(se=M=>P==="automation"?M.filter(Ba):P==="manual"?M.filter(Ga):M,t[10]=P,t[11]=se):se=t[11];const ie=se,le=M=>{const U=M.id===A;if(k(M.id),!U)return;const ne=w.find(_e=>_e.id!==M.id&&_e.virtual_mcp_id===M.virtual_mcp_id);ne?C(ne.id,ne.virtual_mcp_id):S({to:"/$org",params:{org:o.slug}})};let Ie;t[12]!==I?(Ie=M=>{Z("sidebar_group_new_clicked",{virtual_mcp_id:M}),I(M)},t[12]=I,t[13]=Ie):Ie=t[13];const Pe=Ie,ze=ao();let pe;t[14]!==ze?(pe=M=>{Z("sidebar_group_settings_clicked",{virtual_mcp_id:M}),ze(M,{search:{main:"instructions"}})},t[14]=ze,t[15]=pe):pe=t[15];const Re=pe,mt=M=>{if(y.has(M))return;Z("sidebar_group_hide_clicked",{virtual_mcp_id:M});const U=Q.find(ne=>ne.virtualMcpId===M);if(U)for(const ne of U.threads)k(ne.id);uo(oe,M,j),W(Fa)},De=async(M,U)=>{if(c&&h[M]===void 0){Z("sidebar_group_org_pin_toggled",{virtual_mcp_id:M,pinned:U}),f(ne=>({...ne,[M]:U}));try{await d.update.mutateAsync({id:M,data:{pinned:U}})}catch{mo(oe,M,!U),f(ne=>{const _e={...ne};return delete _e[M],_e})}}},Ee=M=>{const U=M===i||M===Ls;return{isOrgPinned:y.has(M),canManageOrgPin:U?!1:c,onToggleOrgPin:U?void 0:De}},Me=M=>{const U=ie(te(M.threads));return{virtualMcpId:M.virtualMcpId,threads:U,activeTaskId:A,filters:q,groupVisibleCount:J.get(M.virtualMcpId)??0,onSelectTask:ne=>C(ne.id,ne.virtual_mcp_id),onArchiveTask:le,onNewTaskInGroup:Pe,onShowSettings:Re,onHideGroup:mt,...Ee(M.virtualMcpId)}},ae=P!=="all"||O!=="mine",{state:Fe,isMobile:Ge}=Xe();if(Fe==="collapsed"&&!Ge){let M;if(t[16]!==ae||t[17]!==Q||t[18]!==te||t[19]!==ie){let dt;t[21]!==ae||t[22]!==te||t[23]!==ie?(dt=Dn=>{const En=ie(te(Dn.threads));return!(ae&&En.length===0)},t[21]=ae,t[22]=te,t[23]=ie,t[24]=dt):dt=t[24],M=Q.filter(dt),t[16]=ae,t[17]=Q,t[18]=te,t[19]=ie,t[20]=M}else M=t[20];const U=M,ne=R==="agent"&&Q.length===0;let _e;t[25]!==ne?(_e=s.jsx(rs,{value:ne}),t[25]=ne,t[26]=_e):_e=t[26];let Ct;return t[27]===Symbol.for("react.memo_cache_sentinel")?(Ct=()=>W(Ea),t[27]=Ct):Ct=t[27],s.jsxs(s.Fragment,{children:[_e,s.jsx(Ae,{className:"min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:s.jsx(ba,{groups:U,orderScope:oe,decopilotId:i,orgPinnedIds:j,onReorder:Ct,renderGroup:dt=>Me(dt)})})]})}const ft="flex flex-col h-full min-h-0",be=R==="agent"&&Q.length===0;let je;t[28]!==be?(je=s.jsx(rs,{value:be}),t[28]=be,t[29]=je):je=t[29];let ue;t[30]!==G?(ue=()=>{Z("tasks_panel_search_opened"),E(!0),G(!0)},t[30]=G,t[31]=ue):ue=t[31];let he;t[32]===Symbol.for("react.memo_cache_sentinel")?(he=s.jsx(Br,{size:16}),t[32]=he):he=t[32];let me;t[33]!==ue?(me=s.jsx(we,{"aria-label":"Search threads",onClick:ue,children:he}),t[33]=ue,t[34]=me):me=t[34];const Be=_s[R==="agent"?"status":"agent"];let ge;t[35]!==Be?(ge=Be.toLowerCase(),t[35]=Be,t[36]=ge):ge=t[36];const ve=`Group by ${ge}`,Le=_s[R];let de;t[37]!==Le?(de=Le.toLowerCase(),t[37]=Le,t[38]=de):de=t[38];const He=`Grouped by ${de}`;let ye,Ue;t[39]!==R?(ye=()=>{const M=R==="agent"?"status":"agent";Z("tasks_panel_group_by_changed",{to_value:M}),L(M)},Ue=R==="agent"?s.jsx(Qo,{size:16}):s.jsx(Lr,{size:16}),t[39]=R,t[40]=ye,t[41]=Ue):(ye=t[40],Ue=t[41]);let Ke;t[42]!==ve||t[43]!==He||t[44]!==ye||t[45]!==Ue?(Ke=s.jsx(we,{"aria-label":ve,title:He,onClick:ye,children:Ue}),t[42]=ve,t[43]=He,t[44]=ye,t[45]=Ue,t[46]=Ke):Ke=t[46];let Qe;t[47]===Symbol.for("react.memo_cache_sentinel")?(Qe=s.jsx(Xo,{size:16}),t[47]=Qe):Qe=t[47];let Ze;t[48]!==ae?(Ze=ae&&s.jsx("span",{className:"absolute top-0.5 right-0.5 size-2 rounded-full bg-red-500 ring-1 ring-sidebar pointer-events-none"}),t[48]=ae,t[49]=Ze):Ze=t[49];let Je;t[50]!==Ze?(Je=s.jsx(ut,{asChild:!0,children:s.jsxs(we,{"aria-label":"Filter tasks",children:[Qe,Ze]})}),t[50]=Ze,t[51]=Je):Je=t[51];let et;t[52]!==O?(et=M=>{const U=M;U!==O&&Z("tasks_panel_member_filter_changed",{to_value:U}),B(U)},t[52]=O,t[53]=et):et=t[53];let gt;t[54]===Symbol.for("react.memo_cache_sentinel")?(gt=s.jsx(cs,{size:"sm",className:"w-full",children:s.jsx(ds,{})}),t[54]=gt):gt=t[54];let bt;t[55]===Symbol.for("react.memo_cache_sentinel")?(bt=Object.keys(On),t[55]=bt):bt=t[55];let jt;t[56]===Symbol.for("react.memo_cache_sentinel")?(jt=s.jsx(as,{children:bt.map(Da)}),t[56]=jt):jt=t[56];let tt;t[57]!==O||t[58]!==et?(tt=s.jsx(Ss,{label:"Members",children:s.jsxs(us,{value:O,onValueChange:et,children:[gt,jt]})}),t[57]=O,t[58]=et,t[59]=tt):tt=t[59];let st;t[60]!==P?(st=M=>{const U=M;U!==P&&Z("tasks_panel_filter_changed",{to_value:U}),H(U)},t[60]=P,t[61]=st):st=t[61];let vt;t[62]===Symbol.for("react.memo_cache_sentinel")?(vt=s.jsx(cs,{size:"sm",className:"w-full",children:s.jsx(ds,{})}),t[62]=vt):vt=t[62];let yt;t[63]===Symbol.for("react.memo_cache_sentinel")?(yt=Object.keys(Tn),t[63]=yt):yt=t[63];let _t;t[64]===Symbol.for("react.memo_cache_sentinel")?(_t=s.jsx(as,{children:yt.map(Ra)}),t[64]=_t):_t=t[64];let nt;t[65]!==st||t[66]!==P?(nt=s.jsx(Ss,{label:"Type",children:s.jsxs(us,{value:P,onValueChange:st,children:[vt,_t]})}),t[65]=st,t[66]=P,t[67]=nt):nt=t[67];let rt;t[68]!==tt||t[69]!==nt?(rt=s.jsx(Dt,{align:"start",sideOffset:8,collisionPadding:16,className:"w-72 p-3",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[tt,nt]})}),t[68]=tt,t[69]=nt,t[70]=rt):rt=t[70];let ot;t[71]!==Je||t[72]!==rt?(ot=s.jsxs(Rt,{children:[Je,rt]}),t[71]=Je,t[72]=rt,t[73]=ot):ot=t[73];let it;t[74]!==me||t[75]!==Ke||t[76]!==ot?(it=s.jsxs("div",{className:"flex items-center gap-0.5",children:[me,Ke,ot]}),t[74]=me,t[75]=Ke,t[76]=ot,t[77]=it):it=t[77];let St;t[78]===Symbol.for("react.memo_cache_sentinel")?(St=s.jsx(en,{compact:!0}),t[78]=St):St=t[78];let lt;t[79]!==it?(lt=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[it,St]}),t[79]=it,t[80]=lt):lt=t[80];const Rn="flex-1 min-h-0 overflow-y-auto overscroll-contain flex flex-col gap-0.5 -mr-2 pr-2",Gt=R==="status"?s.jsx(s.Fragment,{children:co(ie(te(w))).map(M=>s.jsx(Ma,{status:M.status,threads:M.threads,activeTaskId:A,onSelectTask:U=>C(U.id,U.virtual_mcp_id),onArchiveTask:le,filters:q},M.status))}):s.jsx($a,{groups:Q,orderScope:oe,decopilotId:i,orgPinnedIds:j,onReorder:()=>W(za),renderGroup:M=>({...Me(M)})});let at;t[81]!==Gt?(at=s.jsx("div",{className:Rn,children:Gt}),t[81]=Gt,t[82]=at):at=t[82];let ct;t[83]!==F||t[84]!==D||t[85]!==G?(ct=F&&s.jsx(jl,{open:D,onOpenChange:G}),t[83]=F,t[84]=D,t[85]=G,t[86]=ct):ct=t[86];let Nt;return t[87]!==je||t[88]!==lt||t[89]!==at||t[90]!==ct?(Nt=s.jsxs("div",{className:ft,children:[je,lt,at,ct]}),t[87]=je,t[88]=lt,t[89]=at,t[90]=ct,t[91]=Nt):Nt=t[91],Nt}function za(t){return t+1}function Ra(t){return s.jsx(Xs,{value:t,children:Tn[t]},t)}function Da(t){return s.jsx(Xs,{value:t,children:On[t]},t)}function Ea(t){return t+1}function Fa(t){return t+1}function Ga(t){return!t.trigger_id}function Ba(t){return!!t.trigger_id}function La(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function Ha(t){return t.id}function Ua(t){return t.pinned}function Ss(t){const e=N.c(7),{label:n,children: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 i;e[2]!==r?(i=s.jsx("div",{className:"w-36 shrink-0",children:r}),e[2]=r,e[3]=i):i=e[3];let l;return e[4]!==o||e[5]!==i?(l=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,i]}),e[4]=o,e[5]=i,e[6]=l):l=e[6],l}const Ka=5,Va=[{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 zn(){const t=N.c(3),{state:e}=Xe();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:Ka}).map(Ya)}),t[0]=o):o=t[0],o}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(Se,{className:"size-6 rounded-md"}),s.jsx(Se,{className:"size-6 rounded-md"}),s.jsx(Se,{className:"size-6 rounded-md"})]}),s.jsx(Se,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=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:Va.map(Wa)})]}),t[2]=r):r=t[2],r}function Wa(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(Se,{className:"size-5 rounded-full shrink-0"}),s.jsx(Se,{className:K("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(qa)})]},e)}function qa(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(Se,{className:"h-3 flex-1 rounded-sm"})},e)}function Ya(t,e){return s.jsx(Se,{className:"size-10 rounded-lg mx-auto"},e)}function Xc(){const t=N.c(4),e=tn();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(xl,{}),t[0]=n):n=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ks,{children:s.jsxs(T.Suspense,{fallback:s.jsxs(s.Fragment,{children:[s.jsx(Tt,{className:"mb-2"}),s.jsx(zn,{})]}),children:[s.jsx(Tt,{className:"mb-2"}),s.jsx(Pn,{})]})}),t[1]=r):r=t[1];let o;return t[2]!==e?(o=s.jsx(Hs,{children:s.jsx(rn,{sections:e,footer:n,additionalContent:r})}),t[2]=e,t[3]=o):o=t[3],o}function Qc(t){const e=N.c(5),{onClose:n}=t,r=tn();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(pl,{}),e[0]=o):o=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ks,{children:s.jsxs(T.Suspense,{fallback:s.jsxs(s.Fragment,{children:[s.jsx(Tt,{className:"mb-2"}),s.jsx(zn,{})]}),children:[s.jsx(Tt,{className:"mb-2"}),s.jsx(Pn,{})]})}),e[1]=i):i=e[1];let l;return e[2]!==n||e[3]!==r?(l=s.jsx(Hs,{children:s.jsx(Oi,{sections:r,onClose:n,footer:o,additionalContent:i})}),e[2]=n,e[3]=r,e[4]=l):l=e[4],l}function Zc(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{"data-testid":"shell-route-loading",className:"absolute inset-0 flex items-center justify-center",children:s.jsx(Vt,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}export{_n as C,Xc as S,Qc as a,Zc as b,It as c,ps as d,Sn as e,yn as f};
@@ -1 +1 @@
1
- import{e as S,c as w,j as r,r as T,bn as A,bt as H,B as P}from"./index-biiHZ5l9.js";import{i as R}from"./LayoutLeft-CQ8Vq9nI.js";import{u as V,c as D,a as B,T as E,b as z}from"./tooltip-bsrBmmjV.js";import{b as W,d as G,S as L,c as q,a as F}from"./sheet-D99KevZC.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function se(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function ie(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function le(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(G,{className:"sr-only",children:[r.jsx(L,{children:"Sidebar"}),r.jsx(q,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(F,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function re(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function ne(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function xe(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{ne as S,ie as a,se as b,me as c,xe as d,ue as e,pe as f,be as g,ce as h,fe as i,le as j,oe as k,de as l,re as m,O as u};
1
+ import{e as S,c as w,j as r,r as T,bn as A,bt as H,B as P}from"./index-Bll1AlZi.js";import{i as R}from"./LayoutLeft-Ozgz9jeL.js";import{u as V,c as D,a as B,T as E,b as z}from"./tooltip-B2vnmSMM.js";import{b as W,d as G,S as L,c as q,a as F}from"./sheet-DokH5LKH.js";const J="15rem",K="18rem",Q="4.5rem",k=T.createContext(null);function O(){const l=T.useContext(k);if(!l)throw new Error("useSidebar must be used within a SidebarProvider.");return l}function se(l){const e=S.c(19),{children:t,defaultOpen:s,open:a,onOpenChange:i}=l,d=s===void 0?!1:s,n=V(),[o,h]=T.useState(d),[u,g]=T.useState(!1),c=a!==void 0,b=c?a:o;let N;e[0]!==c||e[1]!==i?(N=_=>{c||h(_),i?.(_)},e[0]=c,e[1]=i,e[2]=N):N=e[2];const f=N;let j;e[3]!==n||e[4]!==b||e[5]!==f?(j=()=>{n?g(U):f(!b)},e[3]=n,e[4]=b,e[5]=f,e[6]=j):j=e[6];const y=j,m=b?"expanded":"collapsed";let p;e[7]!==n||e[8]!==b||e[9]!==u||e[10]!==f||e[11]!==m||e[12]!==y?(p={state:m,open:b,setOpen:f,isMobile:n,openMobile:u,setOpenMobile:g,toggleSidebar:y},e[7]=n,e[8]=b,e[9]=u,e[10]=f,e[11]=m,e[12]=y,e[13]=p):p=e[13];const v=p;let x;e[14]!==t?(x=r.jsx(D,{delayDuration:0,children:t}),e[14]=t,e[15]=x):x=e[15];let C;return e[16]!==v||e[17]!==x?(C=r.jsx(k.Provider,{value:v,children:x}),e[16]=v,e[17]=x,e[18]=C):C=e[18],C}function U(l){return!l}function ie(l){const e=S.c(14);let t,s,a,i;e[0]!==l?({className:s,style:i,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i):(t=e[1],s=e[2],a=e[3],i=e[4]);let d;e[5]!==i?(d={"--sidebar-width":J,"--sidebar-width-icon":Q,...i},e[5]=i,e[6]=d):d=e[6];const n=d;let o;e[7]!==s?(o=w("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=o):o=e[8];let h;return e[9]!==t||e[10]!==a||e[11]!==n||e[12]!==o?(h=r.jsx("div",{"data-slot":"sidebar-wrapper",style:n,className:o,...a,children:t}),e[9]=t,e[10]=a,e[11]=n,e[12]=o,e[13]=h):h=e[13],h}function le(l){const e=S.c(36);let t,s,a,i,d;e[0]!==l?({side:i,variant:d,className:s,children:t,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5]);const n=i===void 0?"left":i,o=d===void 0?"sidebar":d,{isMobile:h,state:u,openMobile:g,setOpenMobile:c}=O();if(h){let C;e[6]===Symbol.for("react.memo_cache_sentinel")?(C={"--sidebar-width":K},e[6]=C):C=e[6];let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=r.jsxs(G,{className:"sr-only",children:[r.jsx(L,{children:"Sidebar"}),r.jsx(q,{children:"Displays the mobile sidebar."})]}),e[7]=_):_=e[7];let $;e[8]!==t?($=r.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let M;e[10]!==n||e[11]!==$?(M=r.jsxs(F,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:C,side:n,children:[_,$]}),e[10]=n,e[11]=$,e[12]=M):M=e[12];let I;return e[13]!==g||e[14]!==a||e[15]!==c||e[16]!==M?(I=r.jsx(W,{open:g,onOpenChange:c,...a,children:M}),e[13]=g,e[14]=a,e[15]=c,e[16]=M,e[17]=I):I=e[17],I}const b=u==="expanded",N=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let f;e[18]!==N?(f=w("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","transition-[width] duration-150 ease-out motion-reduce:transition-none",N),e[18]=N,e[19]=f):f=e[19];const j=b?void 0:"icon",y=b?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let m;e[20]!==s||e[21]!==y?(m=w("flex flex-col h-full transition-[width] duration-150 ease-out motion-reduce:transition-none",y,s),e[20]=s,e[21]=y,e[22]=m):m=e[22];let p;e[23]!==t?(p=r.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=p):p=e[24];let v;e[25]!==a||e[26]!==m||e[27]!==p?(v=r.jsx("div",{"data-slot":"sidebar-container",className:m,...a,children:p}),e[25]=a,e[26]=m,e[27]=p,e[28]=v):v=e[28];let x;return e[29]!==n||e[30]!==u||e[31]!==f||e[32]!==j||e[33]!==v||e[34]!==o?(x=r.jsx("div",{className:f,"data-state":u,"data-collapsible":j,"data-variant":o,"data-side":n,"data-slot":"sidebar",children:v}),e[29]=n,e[30]=u,e[31]=f,e[32]=j,e[33]=v,e[34]=o,e[35]=x):x=e[35],x}function re(l){const e=S.c(18);let t,s,a;e[0]!==l?({className:t,onClick:s,...a}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:i}=O();let d;e[4]!==t?(d=w("size-7",t),e[4]=t,e[5]=d):d=e[5];let n;e[6]!==s||e[7]!==i?(n=b=>{s?.(b),i()},e[6]=s,e[7]=i,e[8]=n):n=e[8];let o,h;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(R,{}),h=r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=o,e[10]=h):(o=e[9],h=e[10]);let u;e[11]!==a||e[12]!==d||e[13]!==n?(u=r.jsx(E,{asChild:!0,children:r.jsxs(P,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:d,onClick:n,...a,children:[o,h]})}),e[11]=a,e[12]=d,e[13]=n,e[14]=u):u=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=r.jsxs(B,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",r.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(X)})]}),e[15]=g):g=e[15];let c;return e[16]!==u?(c=r.jsx(D,{delayDuration:300,children:r.jsxs(z,{children:[u,g]})}),e[16]=u,e[17]=c):c=e[17],c}function X(l){return r.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:l},l)}function ne(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function oe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function de(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ce(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function fe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function ue(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function pe(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function be(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("flex w-full min-w-0 list-none flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}function me(l){const e=S.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=w("group/menu-item relative w-full list-none",t),e[3]=t,e[4]=a):a=e[4];let i;return e[5]!==s||e[6]!==a?(i=r.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=i):i=e[7],i}const Y=H("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] duration-150 ease-out motion-reduce:transition-none focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate group-data-[state=collapsed]/sidebar:[&>span:last-child]:hidden [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:max-w-[calc(var(--sidebar-width-icon)-1rem)]! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:mx-auto group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function xe(l){const e=S.c(28);let t,s,a,i,d,n,o;e[0]!==l?({asChild:a,isActive:i,variant:d,size:n,tooltip:o,className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=i,e[5]=d,e[6]=n,e[7]=o):(t=e[1],s=e[2],a=e[3],i=e[4],d=e[5],n=e[6],o=e[7]);const h=a===void 0?!1:a,u=i===void 0?!1:i,g=d===void 0?"default":d,c=n===void 0?"default":n,b=h?A:"button",{isMobile:N}=O();let f;e[8]!==t||e[9]!==c||e[10]!==g?(f=w(Y({variant:g,size:c}),t),e[8]=t,e[9]=c,e[10]=g,e[11]=f):f=e[11];let j;e[12]!==b||e[13]!==u||e[14]!==s||e[15]!==c||e[16]!==f?(j=r.jsx(b,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":c,"data-active":u,className:f,...s}),e[12]=b,e[13]=u,e[14]=s,e[15]=c,e[16]=f,e[17]=j):j=e[17];const y=j;if(!o)return y;if(typeof o=="string"){let x;e[18]!==o?(x={children:o},e[18]=o,e[19]=x):x=e[19],o=x}let m;e[20]!==y?(m=r.jsx(E,{asChild:!0,children:y}),e[20]=y,e[21]=m):m=e[21];let p;e[22]!==N||e[23]!==o?(p=r.jsx(B,{side:"right",align:"center",hidden:N,...o}),e[22]=N,e[23]=o,e[24]=p):p=e[24];let v;return e[25]!==m||e[26]!==p?(v=r.jsxs(z,{children:[m,p]}),e[25]=m,e[26]=p,e[27]=v):v=e[27],v}export{ne as S,ie as a,se as b,me as c,xe as d,ue as e,pe as f,be as g,ce as h,fe as i,le as j,oe as k,de as l,re as m,O as u};
@@ -1 +1 @@
1
- import{e as n,c,j as i}from"./index-biiHZ5l9.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};
1
+ import{e as n,c,j as i}from"./index-Bll1AlZi.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};