decocms 4.227.2 → 4.227.4

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 (232) hide show
  1. package/dist/client/assets/{AlertCircle-DAvQg4aT.js → AlertCircle-BxoPdbFz.js} +1 -1
  2. package/dist/client/assets/{AreaChart-hnUk7qbp.js → AreaChart-DuOQliqI.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-D_UEaNhR.js → ArrowLeft-CPxxghrd.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-ByRypNMa.js → ArrowUp-DNwmrUqU.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-CvvyqqpF.js → ArrowUpRight-HhKtLccN.js} +1 -1
  6. package/dist/client/assets/{Check-D-BD1I4L.js → Check-C8T20Rfi.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-Bx7AMUH5.js → CheckCircle-D6Ca0HBb.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-CM8jbN16.js → ChevronDown-CK3YylTJ.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-B-rwXuOv.js → ChevronRight-C8uCToRq.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-DyAG8Bu9.js → ChevronUp-l37QboT4.js} +1 -1
  11. package/dist/client/assets/{Copy01-DbwtP3jg.js → Copy01-D-kdbZhl.js} +1 -1
  12. package/dist/client/assets/{CpuChip01-DpKNQ0cZ.js → CpuChip01-CjQ3ND7e.js} +1 -1
  13. package/dist/client/assets/{CreditCard01--Hmoe_Hu.js → CreditCard01-Dc3Ty-VI.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-BwM59KRx.js → DotsVertical-fUGBDguo.js} +1 -1
  15. package/dist/client/assets/{Eye-YFvNBTsY.js → Eye-BfuUNhkc.js} +1 -1
  16. package/dist/client/assets/{FilterLines-CkiK4853.js → FilterLines-C0onaXl7.js} +1 -1
  17. package/dist/client/assets/{Globe01-A_7ohZyS.js → Globe01-BbE0QJ6P.js} +1 -1
  18. package/dist/client/assets/{Globe04-BZrmCYkB.js → Globe04-DcUvfOo1.js} +1 -1
  19. package/dist/client/assets/{HardDrive-BFJuR338.js → HardDrive-B3Xc8obQ.js} +1 -1
  20. package/dist/client/assets/{Key01-DM7EtZwL.js → Key01-DV39al-i.js} +1 -1
  21. package/dist/client/assets/{LayoutLeft-j3vvuBRu.js → LayoutLeft-DDEfqO5j.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-grPTiGSz.js → LinkExternal01-CIYWL03C.js} +1 -1
  23. package/dist/client/assets/{LogOut01-DybmQAmc.js → LogOut01-BCkD2Zqw.js} +1 -1
  24. package/dist/client/assets/{Monitor01-wDu0s4kH.js → Monitor01-BKhy9Y3D.js} +1 -1
  25. package/dist/client/assets/{Palette-CmhyLWIP.js → Palette-C5qTLhMQ.js} +1 -1
  26. package/dist/client/assets/{Play-DcITh1db.js → Play-Dzjel9-m.js} +1 -1
  27. package/dist/client/assets/{Plus-BATfE6x_.js → Plus-Ca4c8_Jk.js} +1 -1
  28. package/dist/client/assets/{SearchLg-Ds6fWNT0.js → SearchLg-D_pIaKJg.js} +1 -1
  29. package/dist/client/assets/{SearchMd-Iebu6css.js → SearchMd-DFG6UfmN.js} +1 -1
  30. package/dist/client/assets/{Settings02-3oorvi46.js → Settings02-BuHOHy6P.js} +1 -1
  31. package/dist/client/assets/{Share07-DpdRFtAa.js → Share07-DnhRmctQ.js} +1 -1
  32. package/dist/client/assets/{Shield01-CuyYpQe4.js → Shield01-BXgSkd0M.js} +1 -1
  33. package/dist/client/assets/{Star01-CHk0yOEf.js → Star01-C1dxFrqZ.js} +1 -1
  34. package/dist/client/assets/{Stars01-8R2kADEg.js → Stars01-ROC3UwK7.js} +1 -1
  35. package/dist/client/assets/{Stars02-Br7thB51.js → Stars02-CyQ8IuHL.js} +1 -1
  36. package/dist/client/assets/{Sun-DYUIquoy.js → Sun-UuA5GXqj.js} +1 -1
  37. package/dist/client/assets/{SwitchHorizontal01-lPNW9HBu.js → SwitchHorizontal01-BwnHuSrD.js} +1 -1
  38. package/dist/client/assets/{Tool01-CODdwe9c.js → Tool01-DUFEW2_8.js} +1 -1
  39. package/dist/client/assets/{Tool02-km907orb.js → Tool02-Uezt8pP7.js} +1 -1
  40. package/dist/client/assets/{Trash01-DL4g0jxd.js → Trash01-Bi5esH6w.js} +1 -1
  41. package/dist/client/assets/{TrendUp01-CjG-LBHk.js → TrendUp01-DpLOOEdB.js} +1 -1
  42. package/dist/client/assets/{Upload01-CZWh5eba.js → Upload01-BX9G1g5Z.js} +1 -1
  43. package/dist/client/assets/{User01-CsohlGrv.js → User01-oV5xCCSW.js} +1 -1
  44. package/dist/client/assets/{Users01-CpXFtQRo.js → Users01-D3uVeaNX.js} +1 -1
  45. package/dist/client/assets/{Users03-C51r6jhM.js → Users03-DhgFLsWt.js} +1 -1
  46. package/dist/client/assets/{X-_FosCW3a.js → X-DBeVjMqY.js} +1 -1
  47. package/dist/client/assets/{XCircle-DzlELjN4.js → XCircle-6ov_WsTa.js} +1 -1
  48. package/dist/client/assets/{XClose-Rp1e__tf.js → XClose-CUaIOdad.js} +1 -1
  49. package/dist/client/assets/{YAxis-DfxVq-a7.js → YAxis-BHpjTNCY.js} +1 -1
  50. package/dist/client/assets/{Zap-BjmENJ_r.js → Zap-C94-JrJ4.js} +1 -1
  51. package/dist/client/assets/{ZapSquare-QVU0Bw_K.js → ZapSquare-DZVM8Dcz.js} +1 -1
  52. package/dist/client/assets/{access-gate-CXyj0eGj.js → access-gate-CUhCSOWB.js} +1 -1
  53. package/dist/client/assets/{agent-icon-BqxgeJKx.js → agent-icon-C-uCizu6.js} +1 -1
  54. package/dist/client/assets/{agents-list-CVKBOwfR.js → agents-list-GeqDHBOh.js} +1 -1
  55. package/dist/client/assets/{ai-providers-BqjPygJA.js → ai-providers-B2czIkxj.js} +1 -1
  56. package/dist/client/assets/{alert-dialog-DzRLkBkE.js → alert-dialog-B15DE0RO.js} +1 -1
  57. package/dist/client/assets/{alert-BAY9uycW.js → alert-mpsJ_9uJ.js} +1 -1
  58. package/dist/client/assets/{api-keys-m9K6s8yu.js → api-keys-7RKCW0Tq.js} +1 -1
  59. package/dist/client/assets/{app-editor-DOVRw3A3.js → app-editor-BreYw2kS.js} +1 -1
  60. package/dist/client/assets/{auth-CEn3fGcC.js → auth-CV1zhX36.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-D1pXwGYe.js → auth-catchall-bcANTm2d.js} +1 -1
  62. package/dist/client/assets/{auth-entry-DROUAEUq.js → auth-entry-CCTCN4Uu.js} +1 -1
  63. package/dist/client/assets/{auth-split-layout-CvP9_KEu.js → auth-split-layout-BgAhPtwC.js} +1 -1
  64. package/dist/client/assets/{authenticate-and-persist-oauth-BY9KwOCe.js → authenticate-and-persist-oauth-Cc2Sdi17.js} +1 -1
  65. package/dist/client/assets/{automation-list-row-D1sfCQUF.js → automation-list-row-D0vDbJnE.js} +1 -1
  66. package/dist/client/assets/{automation-runs-TkScrM5V.js → automation-runs-CmyeiouZ.js} +1 -1
  67. package/dist/client/assets/{automations-C1XoyZwp.js → automations-4bY9xLfX.js} +1 -1
  68. package/dist/client/assets/{avatar-7i8epUPj.js → avatar-4HLIsMrD.js} +1 -1
  69. package/dist/client/assets/{badge-BawSKT5v.js → badge-rhfdnLjV.js} +1 -1
  70. package/dist/client/assets/{billing-DFtGVm3h.js → billing-Bd5bXdj5.js} +1 -1
  71. package/dist/client/assets/{block-document-O5fWouRZ.js → block-document-BuKr7gAC.js} +1 -1
  72. package/dist/client/assets/{brand-context-fzgtTc0x.js → brand-context-D2s7Eq7V.js} +1 -1
  73. package/dist/client/assets/{buckets-BL8amo1V.js → buckets-DjM3qvZg.js} +1 -1
  74. package/dist/client/assets/{bulk-category-panel-BIkVXeZb.js → bulk-category-panel-Cpxb378n.js} +1 -1
  75. package/dist/client/assets/{capability-load-error-C0Eb32Py.js → capability-load-error-BtcwImlW.js} +1 -1
  76. package/dist/client/assets/{card-Bpbi4aqf.js → card-BEg0hb-A.js} +1 -1
  77. package/dist/client/assets/{cards-BlDe7Duv.js → cards-BHLJ91gh.js} +1 -1
  78. package/dist/client/assets/{category-editor-Dkq94Fkc.js → category-editor-D-tigj0E.js} +1 -1
  79. package/dist/client/assets/{chart-DIPyli_t.js → chart-DnV9GkKu.js} +1 -1
  80. package/dist/client/assets/{chat-context-B3_cbUxH.js → chat-context-DwnDMuNT.js} +1 -1
  81. package/dist/client/assets/{checkbox-BoXjDGEK.js → checkbox-DD6pzZWb.js} +1 -1
  82. package/dist/client/assets/{cli-auth-success-DqFV-8S1.js → cli-auth-success-CGOLEFmy.js} +1 -1
  83. package/dist/client/assets/{collection-detail-VljYrPMe.js → collection-detail-C80uHGsa.js} +1 -1
  84. package/dist/client/assets/{collection-display-button-V9PlmBHF.js → collection-display-button-BCKryrdW.js} +1 -1
  85. package/dist/client/assets/{collection-search-Bzns8dHW.js → collection-search-l96-O1Ot.js} +1 -1
  86. package/dist/client/assets/{collection-table-wrapper-cCNxuygC.js → collection-table-wrapper-DhxLLhmB.js} +1 -1
  87. package/dist/client/assets/{collection-tabs-BMgwVZgb.js → collection-tabs-CICCV3dO.js} +1 -1
  88. package/dist/client/assets/{command-BFJ_8ZWV.js → command-qXbj-xHw.js} +1 -1
  89. package/dist/client/assets/{commerce-onboarding-CNSDPFO2.js → commerce-onboarding-Dp_tmTb1.js} +1 -1
  90. package/dist/client/assets/{connect-CnZOM0AM.js → connect-dwQuW8SR.js} +1 -1
  91. package/dist/client/assets/{connection-BJKp5psp.js → connection-C9KsSTJc.js} +1 -1
  92. package/dist/client/assets/{connection-card-mlKF0iG2.js → connection-card-BJwbFF4x.js} +1 -1
  93. package/dist/client/assets/{connection-detail-D-g7AGTG.js → connection-detail-BoD2tRLj.js} +1 -1
  94. package/dist/client/assets/{connection-form-helpers-CGi5OwFy.js → connection-form-helpers-E5lmZK_D.js} +1 -1
  95. package/dist/client/assets/{connections-D8EPUF-q.js → connections-HVxI33wt.js} +1 -1
  96. package/dist/client/assets/{decopilot-sse-pool-Cjto5iA0.js → decopilot-sse-pool-DIiI-cw8.js} +1 -1
  97. package/dist/client/assets/{dialog-DPcl0vgb.js → dialog-6mdevW-b.js} +1 -1
  98. package/dist/client/assets/{domain-settings-BbCpkClN.js → domain-settings-oI9HD5hR.js} +1 -1
  99. package/dist/client/assets/{drawer-Jq6f433W.js → drawer-BJsaLtBW.js} +1 -1
  100. package/dist/client/assets/{dropdown-menu-HYhhxxLk.js → dropdown-menu-DTiBmBHC.js} +1 -1
  101. package/dist/client/assets/{empty-state-C2rtu2Wx.js → empty-state-CQ_eip_l.js} +1 -1
  102. package/dist/client/assets/{extract-connection-data-DwHDg7Bz.js → extract-connection-data-ema7DWVc.js} +1 -1
  103. package/dist/client/assets/{file-explorer-BoCdMo6w.js → file-explorer-Btn3Zb3S.js} +1 -1
  104. package/dist/client/assets/{file-type-icon-NHDWjnoQ.js → file-type-icon-BjPqiHTD.js} +1 -1
  105. package/dist/client/assets/{form-BxxpTcrO.js → form-DmFZHxbp.js} +1 -1
  106. package/dist/client/assets/{general-CYP0cSzP.js → general-CagElKtf.js} +1 -1
  107. package/dist/client/assets/{github-repo-picker-CrusklQ3.js → github-repo-picker-Bh_L1bP_.js} +1 -1
  108. package/dist/client/assets/{hooks-D8tAhtBV.js → hooks-D9F3YMGm.js} +1 -1
  109. package/dist/client/assets/{index-O6KsQ9_y.js → index-BMigV0ZL.js} +1 -1
  110. package/dist/client/assets/{index-Dp2WMN-1.js → index-BT8zWWzA.js} +1 -1
  111. package/dist/client/assets/{index-BW6PXXON.js → index-BwpToX1a.js} +1 -1
  112. package/dist/client/assets/{index-Dn4o0gyJ.js → index-C1VEfRWM.js} +1 -1
  113. package/dist/client/assets/{index-wf6luzPg.js → index-D1BI0vSU.js} +1 -1
  114. package/dist/client/assets/{index-DyZhB1DR.js → index-DAou5qbp.js} +28 -28
  115. package/dist/client/assets/{index-BOZt6N7G.js → index-DpPUxazo.js} +1 -1
  116. package/dist/client/assets/{index-BCEVoVuV.js → index-DruUd288.js} +1 -1
  117. package/dist/client/assets/{index-CdzLfduy.js → index-MJNx9CEi.js} +1 -1
  118. package/dist/client/assets/{index-redirect-CwtlM4Bp.js → index-redirect-DvX1gGPs.js} +1 -1
  119. package/dist/client/assets/{index-Dc3L_Wsj.js → index-z1Tz0Iwx.js} +3 -3
  120. package/dist/client/assets/{infra-billing-C3Sk12n8.js → infra-billing-Ct4z9TEZ.js} +1 -1
  121. package/dist/client/assets/{input-CM3ahCdh.js → input-DJ1TcPON.js} +1 -1
  122. package/dist/client/assets/{integration-icon-XzxOzAee.js → integration-icon--2jNJul0.js} +1 -1
  123. package/dist/client/assets/{invite-member-dialog-DMna758M.js → invite-member-dialog-BGZaPwNT.js} +1 -1
  124. package/dist/client/assets/{label-DsIG5Oi8.js → label-Ddfb2KpZ.js} +1 -1
  125. package/dist/client/assets/{layout-BHOBpDd7.js → layout-Cb7h_-So.js} +1 -1
  126. package/dist/client/assets/{login-B_uEOikk.js → login-Cr6HX4DR.js} +1 -1
  127. package/dist/client/assets/{mcp-oauth-DJmroWMG.js → mcp-oauth-HkuxMYZ8.js} +1 -1
  128. package/dist/client/assets/{members-CnD5R6ir.js → members-3046t80k.js} +1 -1
  129. package/dist/client/assets/{monaco-editor-BxJEjLr1.js → monaco-editor-J3TIb0qc.js} +1 -1
  130. package/dist/client/assets/{monitoring-stats-row-DfloWnJv.js → monitoring-stats-row-C8HcwddK.js} +1 -1
  131. package/dist/client/assets/{multi-select-Hao7VjgN.js → multi-select-BkF-EvHu.js} +1 -1
  132. package/dist/client/assets/{oauth-callback-D9goABHx.js → oauth-callback-CUhxPMyD.js} +1 -1
  133. package/dist/client/assets/{oauth-callback-ai-provider-BUcB53LE.js → oauth-callback-ai-provider-BOnQkcSH.js} +1 -1
  134. package/dist/client/assets/{onboarding-BDnViBw4.js → onboarding-DPvOYSiV.js} +1 -1
  135. package/dist/client/assets/{org-layout-Ca-KZV-1.js → org-layout--fciznTk.js} +1 -1
  136. package/dist/client/assets/{organization-choice-BVGHH_wA.js → organization-choice-D8H5eJe4.js} +1 -1
  137. package/dist/client/assets/{orgs-CU0Mm9IH.js → orgs-CWOFi0u8.js} +1 -1
  138. package/dist/client/assets/{page-seo-form-5AtfB6vY.js → page-seo-form-1RV4Rin-.js} +1 -1
  139. package/dist/client/assets/{popover-CbKTrVoq.js → popover-hOO23nku.js} +1 -1
  140. package/dist/client/assets/{post-editor-5cDzr-nQ.js → post-editor-Dltcwhq5.js} +1 -1
  141. package/dist/client/assets/{primitives-Fd_02Wmp.js → primitives-DjkP5bd3.js} +1 -1
  142. package/dist/client/assets/{profile-B8QqXmHT.js → profile-Dcm0gago.js} +1 -1
  143. package/dist/client/assets/{project-app-view-DLeWEy6Y.js → project-app-view-BvuEzjWf.js} +1 -1
  144. package/dist/client/assets/record-editor-rEDJ9oo0.js +1 -0
  145. package/dist/client/assets/{redirect-editor-BHxgL8Wk.js → redirect-editor-uWdLukot.js} +1 -1
  146. package/dist/client/assets/registry-DCCoQC1t.js +2 -0
  147. package/dist/client/assets/{registry-layout-DXFD-m0I.js → registry-layout-CWA3Ts5T.js} +1 -1
  148. package/dist/client/assets/{reports-BkTlDGhP.js → reports-C3iXA9CF.js} +1 -1
  149. package/dist/client/assets/{require-capability-Dr3eEfOr.js → require-capability-BKriAO7I.js} +1 -1
  150. package/dist/client/assets/{required-auth-layout-_wV-zmRd.js → required-auth-layout-C8o-NfIh.js} +1 -1
  151. package/dist/client/assets/{reset-password-Y0WfKSG6.js → reset-password-Co_Fa5gT.js} +1 -1
  152. package/dist/client/assets/{roles-DVSTInpM.js → roles-qwQn_16r.js} +1 -1
  153. package/dist/client/assets/{search-input-DUPUXUmv.js → search-input-XlcNibV1.js} +1 -1
  154. package/dist/client/assets/{secrets-WizO0Fo9.js → secrets-CR4z_BSH.js} +1 -1
  155. package/dist/client/assets/{sections-editor-Cn2STC83.js → sections-editor-DZd-1Idg.js} +1 -1
  156. package/dist/client/assets/{select-CvqnJHyE.js → select-D6vE0d7f.js} +1 -1
  157. package/dist/client/assets/{select-model-BhRFI_Tb.js → select-model-BVnyGhom.js} +1 -1
  158. package/dist/client/assets/{self-tool-result-ChJdQffT.js → self-tool-result-CuRYGHE3.js} +1 -1
  159. package/dist/client/assets/{seo-editor-JYj-hSdN.js → seo-editor-BoNfg1us.js} +1 -1
  160. package/dist/client/assets/{settings-layout-B5GrNwZb.js → settings-layout-C0BhpAC0.js} +1 -1
  161. package/dist/client/assets/{settings-section-BND9rmi-.js → settings-section-v4Yo7QNy.js} +1 -1
  162. package/dist/client/assets/{shell-controls-CCToi4PQ.js → shell-controls-CtuRwz3w.js} +1 -1
  163. package/dist/client/assets/{shell-layout-Cy1Rb1Jo.js → shell-layout-DCsbzbJ_.js} +1 -1
  164. package/dist/client/assets/{sidebar-0-wk4uiq.js → sidebar-B0yo2ePn.js} +1 -1
  165. package/dist/client/assets/{skeleton-BptX-H5C.js → skeleton-Dxh-38GB.js} +1 -1
  166. package/dist/client/assets/{spinner-DLa1l1g3.js → spinner-Rxv3Lrut.js} +1 -1
  167. package/dist/client/assets/{sso-BqOBxfSB.js → sso-BhlqX-m_.js} +1 -1
  168. package/dist/client/assets/store-registry-GgYQiNZd.js +2 -0
  169. package/dist/client/assets/{store-bQ_gsVuo.js → store-z1pTlJQL.js} +1 -1
  170. package/dist/client/assets/{studio-tools-Y9UrW8T1.js → studio-tools-BYZuG6rc.js} +1 -1
  171. package/dist/client/assets/{switch-JcVxwPXB.js → switch-BP0vTKjf.js} +1 -1
  172. package/dist/client/assets/{synced-repos-B_OwBsVg.js → synced-repos-BjXQx61E.js} +1 -1
  173. package/dist/client/assets/{tab-id-DkNf_uXQ.js → tab-id-OdpcDweE.js} +1 -1
  174. package/dist/client/assets/{table-BRZ3_SZL.js → table-Cz905mKv.js} +1 -1
  175. package/dist/client/assets/{tabs-DwtnGTYW.js → tabs-DLXrCUtn.js} +1 -1
  176. package/dist/client/assets/{textarea-B-F33ndx.js → textarea-3Flx-UaB.js} +1 -1
  177. package/dist/client/assets/{toggle-group-B2JqTusN.js → toggle-group-CznT1DBP.js} +1 -1
  178. package/dist/client/assets/{toolbar-BrjsHmFc.js → toolbar-CmlWeOVi.js} +1 -1
  179. package/dist/client/assets/{tooltip-CQVveWFw.js → tooltip-C1zn23N8.js} +1 -1
  180. package/dist/client/assets/{track-Bjrsco_L.js → track-MWP2zcvT.js} +1 -1
  181. package/dist/client/assets/{types-Bc24Kz2K.js → types-C5MUVslf.js} +1 -1
  182. package/dist/client/assets/{use-ai-providers-CBjes-Ik.js → use-ai-providers-CBZLIX6f.js} +1 -1
  183. package/dist/client/assets/{use-api-keys-CtGZCWal.js → use-api-keys-DPh6CMBd.js} +1 -1
  184. package/dist/client/assets/{use-automations-C1wQybtR.js → use-automations-DkDffSYl.js} +1 -1
  185. package/dist/client/assets/{use-autosave-CfqBuLkL.js → use-autosave-Cd6RJiU0.js} +1 -1
  186. package/dist/client/assets/{use-capability-CjlMWLe-.js → use-capability-B7J0oYG8.js} +1 -1
  187. package/dist/client/assets/{use-clock-tick-BbDy6OgV.js → use-clock-tick-iY7xcsXX.js} +1 -1
  188. package/dist/client/assets/{use-commerce-diagnostic-DNtNvPVL.js → use-commerce-diagnostic-C5hEjcNM.js} +1 -1
  189. package/dist/client/assets/{use-connection-DUxQABDJ.js → use-connection-CfFnOCMK.js} +1 -1
  190. package/dist/client/assets/{use-copy-BZNLkz9O.js → use-copy-CueBFoRP.js} +1 -1
  191. package/dist/client/assets/{use-create-virtual-mcp-ygt2tZmu.js → use-create-virtual-mcp-9TFnnITL.js} +1 -1
  192. package/dist/client/assets/{use-debounced-autosave-BJuk64HR.js → use-debounced-autosave-4ue-_hxf.js} +1 -1
  193. package/dist/client/assets/{use-debounced-value-B1Vs-NqF.js → use-debounced-value-BZW5sBhN.js} +1 -1
  194. package/dist/client/assets/{use-decopilot-events-hURZvkKZ.js → use-decopilot-events-CJ1roHR_.js} +1 -1
  195. package/dist/client/assets/{use-delete-connection-DAR4Qhgz.js → use-delete-connection-CDiqTiNm.js} +1 -1
  196. package/dist/client/assets/{use-deployment-admin-DjDEaMv9.js → use-deployment-admin-Cl8NRM1A.js} +1 -1
  197. package/dist/client/assets/{use-file-configs-CsYw9NsM.js → use-file-configs-BrZaep0P.js} +1 -1
  198. package/dist/client/assets/{use-infinite-scroll-Dkz8qiwE.js → use-infinite-scroll-Cahr21QY.js} +1 -1
  199. package/dist/client/assets/{use-infra-billing-QRsAN1a0.js → use-infra-billing-DUznGTKk.js} +1 -1
  200. package/dist/client/assets/{use-join-requests-Cb7W-PA0.js → use-join-requests-CkMJJeHW.js} +1 -1
  201. package/dist/client/assets/{use-mcp-client-CMmud-Kt.js → use-mcp-client-BEMVuBLT.js} +1 -1
  202. package/dist/client/assets/{use-mcp-tools-0qHxFXMI.js → use-mcp-tools-CvhpviZx.js} +1 -1
  203. package/dist/client/assets/{use-members-DlXm_bIX.js → use-members-_CLphY6I.js} +1 -1
  204. package/dist/client/assets/{use-mobile-BPoCXhpO.js → use-mobile-CykRB0tu.js} +1 -1
  205. package/dist/client/assets/{use-navigate-to-agent-C2wbbsxr.js → use-navigate-to-agent-DOD2yCjT.js} +1 -1
  206. package/dist/client/assets/{use-open-billing-url-C3lLN6F5.js → use-open-billing-url-D8dq_H7K.js} +1 -1
  207. package/dist/client/assets/{use-org-auth-client-CFo1-xna.js → use-org-auth-client-DBbREaTX.js} +1 -1
  208. package/dist/client/assets/{use-org-sso-BOiuRdNv.js → use-org-sso-DyY2B-d-.js} +1 -1
  209. package/dist/client/assets/{use-organization-roles-CBQpOAZH.js → use-organization-roles-C-4eBRnd.js} +1 -1
  210. package/dist/client/assets/{use-organization-settings-CBwDOa3H.js → use-organization-settings-DDHANVKw.js} +1 -1
  211. package/dist/client/assets/{use-registry-connections-DFi9FbWn.js → use-registry-connections-Cl1GGVoR.js} +1 -1
  212. package/dist/client/assets/{use-secrets-BZz4t2Pk.js → use-secrets-EfltMjzn.js} +1 -1
  213. package/dist/client/assets/{use-section-preview-base-Begu9jDQ.js → use-section-preview-base-CVueZ4Lk.js} +1 -1
  214. package/dist/client/assets/{use-status-sounds-ColPM_OW.js → use-status-sounds-neALLfIc.js} +1 -1
  215. package/dist/client/assets/{use-tags-C1dsWK7Y.js → use-tags-D2mt0_rV.js} +1 -1
  216. package/dist/client/assets/{use-view-mode-kZo1OQlw.js → use-view-mode-Dlgck5Qx.js} +1 -1
  217. package/dist/client/assets/{use-virtual-mcp-DbnluG_X.js → use-virtual-mcp-Ch7j4pLP.js} +1 -1
  218. package/dist/client/assets/useInfiniteQuery-DUGP976J.js +1 -0
  219. package/dist/client/assets/{useRouterState-CIF8Z351.js → useRouterState-DyWDf-R6.js} +1 -1
  220. package/dist/client/assets/useSuspenseInfiniteQuery-DKnqlHqK.js +1 -0
  221. package/dist/client/assets/{users-C1ID5IDW.js → users-76vDH8RP.js} +1 -1
  222. package/dist/client/assets/{variant-calendar-CgHP3uWa.js → variant-calendar-CqTxDVTA.js} +1 -1
  223. package/dist/client/assets/{view-mode-toggle-5zpVlb5L.js → view-mode-toggle-DmS5G0LB.js} +1 -1
  224. package/dist/client/index.html +1 -1
  225. package/dist/server/cli.js +386 -386
  226. package/dist/server/server.js +263 -263
  227. package/package.json +1 -1
  228. package/dist/client/assets/record-editor-DTeLPtBn.js +0 -1
  229. package/dist/client/assets/registry-DHwSarLX.js +0 -2
  230. package/dist/client/assets/store-registry-J9rvSZp8.js +0 -2
  231. package/dist/client/assets/useInfiniteQuery-DLTkWKe_.js +0 -1
  232. package/dist/client/assets/useSuspenseInfiniteQuery-BObn8d99.js +0 -1
@@ -1 +1 @@
1
- import{c as f,m as d,r as p,j as r}from"./index-Dc3L_Wsj.js";import{r as w}from"./sidebar-0-wk4uiq.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};
1
+ import{c as f,m as d,r as p,j as r}from"./index-z1Tz0Iwx.js";import{r as w}from"./sidebar-B0yo2ePn.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};
@@ -1 +1 @@
1
- import{c as R,F as _,a as V,u as b,r as k,j as x,R as y,N as E}from"./index-Dc3L_Wsj.js";import{a as M}from"./use-mcp-client-CMmud-Kt.js";import{u as N}from"./use-virtual-mcp-DbnluG_X.js";import{u as U}from"./hooks-D8tAhtBV.js";import{f as $}from"./use-organization-settings-CBwDOa3H.js";import{f as v}from"./reusable-new-chat-CouMjkYR.js";import"./auth-CEn3fGcC.js";import"./decopilot-sse-pool-Cjto5iA0.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-Y9UrW8T1.js";function Q(){const t=R.c(19),{org:e}=_();let a;t[0]!==e.id?(a=M(e.id),t[0]=e.id,t[1]=a):a=t[1];const I=a.id,{data:S}=V.useSession(),{threads:m,status:j}=U(),{mainAgentId:u,isPending:A}=$(),C=N();let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[2]=r):r=t[2];const{connect:d,siteUrl:f,main:g}=b(r),[P]=k.useState(w);if(A||j.kind==="loading"){let n;return t[3]===Symbol.for("react.memo_cache_sentinel")?(n=x.jsx(y,{}),t[3]=n):n=t[3],n}const s=u!=null&&(C??[]).some(n=>n.id===u)?u:I,p=S?.user?.id;let l;t[4]!==s||t[5]!==p||t[6]!==m?(l=v(m,s,p),t[4]=s,t[5]=p,t[6]=m,t[7]=l):l=t[7];const h=l?.id??P;let i;t[8]!==e.slug||t[9]!==h?(i={org:e.slug,taskId:h},t[8]=e.slug,t[9]=h,t[10]=i):i=t[10];let o;t[11]!==d||t[12]!==s||t[13]!==g||t[14]!==f?(o={virtualmcpid:s,connect:d,siteUrl:f,main:g},t[11]=d,t[12]=s,t[13]=g,t[14]=f,t[15]=o):o=t[15];let c;return t[16]!==i||t[17]!==o?(c=x.jsx(E,{to:"/$org/$taskId",params:i,search:o,replace:!0}),t[16]=i,t[17]=o,t[18]=c):c=t[18],c}function w(){return crypto.randomUUID()}export{Q as default};
1
+ import{c as R,F as _,a as V,u as b,r as k,j as x,R as y,N as E}from"./index-z1Tz0Iwx.js";import{a as M}from"./use-mcp-client-BEMVuBLT.js";import{u as N}from"./use-virtual-mcp-Ch7j4pLP.js";import{u as U}from"./hooks-D9F3YMGm.js";import{f as $}from"./use-organization-settings-DDHANVKw.js";import{f as v}from"./reusable-new-chat-CouMjkYR.js";import"./auth-CV1zhX36.js";import"./decopilot-sse-pool-DIiI-cw8.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-BYZuG6rc.js";function Q(){const t=R.c(19),{org:e}=_();let a;t[0]!==e.id?(a=M(e.id),t[0]=e.id,t[1]=a):a=t[1];const I=a.id,{data:S}=V.useSession(),{threads:m,status:j}=U(),{mainAgentId:u,isPending:A}=$(),C=N();let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[2]=r):r=t[2];const{connect:d,siteUrl:f,main:g}=b(r),[P]=k.useState(w);if(A||j.kind==="loading"){let n;return t[3]===Symbol.for("react.memo_cache_sentinel")?(n=x.jsx(y,{}),t[3]=n):n=t[3],n}const s=u!=null&&(C??[]).some(n=>n.id===u)?u:I,p=S?.user?.id;let l;t[4]!==s||t[5]!==p||t[6]!==m?(l=v(m,s,p),t[4]=s,t[5]=p,t[6]=m,t[7]=l):l=t[7];const h=l?.id??P;let i;t[8]!==e.slug||t[9]!==h?(i={org:e.slug,taskId:h},t[8]=e.slug,t[9]=h,t[10]=i):i=t[10];let o;t[11]!==d||t[12]!==s||t[13]!==g||t[14]!==f?(o={virtualmcpid:s,connect:d,siteUrl:f,main:g},t[11]=d,t[12]=s,t[13]=g,t[14]=f,t[15]=o):o=t[15];let c;return t[16]!==i||t[17]!==o?(c=x.jsx(E,{to:"/$org/$taskId",params:i,search:o,replace:!0}),t[16]=i,t[17]=o,t[18]=c):c=t[18],c}function w(){return crypto.randomUUID()}export{Q as default};
@@ -1 +1 @@
1
- import{c as C,d as Y,F as B,b as A,G as It,j as s,B as nt,r as L,E as rt,H as Et,x as Tt,K as Rt,e as Ye,p as V,I as at,m as z,a as ue,J as Ft,v as Lt,t as ct,M as Ut,P as Gt,u as Te,O as Bt,R as Ht}from"./index-Dc3L_Wsj.js";import{u as K,S as Re,a as Fe,b as U,c as E,d as T,e as mt,f as Wt,g as dt,h as Vt,i as Ae,j as Kt,k as Yt,l as Xt}from"./sidebar-0-wk4uiq.js";import{u as ft}from"./use-mobile-BPoCXhpO.js";import{a as qt,p as ze,s as Qt,b as Jt,n as Zt}from"./self-tool-result-ChJdQffT.js";import{f as es,b as ts,e as ss,g as ls}from"./dialog-DPcl0vgb.js";import{f as ut,i as os,D as is}from"./tab-id-DkNf_uXQ.js";import{C as pt,W as xt,g as ns,u as rs,S as as,a as cs}from"./use-mcp-client-CMmud-Kt.js";import{i as ht}from"./XCircle-DzlELjN4.js";import{u as ms,a as Le,b as Ue}from"./use-organization-settings-CBwDOa3H.js";import{C as ds,a as fs,O as ke,A as Ge,u as us,b as ps,c as xs,d as bt,e as gt,T as hs,f as bs,g as gs}from"./use-commerce-diagnostic-DNtNvPVL.js";import{S as W}from"./skeleton-BptX-H5C.js";import{i as Be}from"./LayoutLeft-j3vvuBRu.js";import{T as He,a as me}from"./toolbar-BrjsHmFc.js";import{P as js,a as vs,b as Ss}from"./popover-CbKTrVoq.js";import{D as ys,a as _s,b as Ns}from"./drawer-Jq6f433W.js";import{A as Ie}from"./avatar-7i8epUPj.js";import{T as jt,a as vt,b as St,c as yt}from"./tooltip-CQVveWFw.js";import{a as Cs}from"./Copy01-DbwtP3jg.js";import{n as ws,i as _t}from"./Globe01-A_7ohZyS.js";import{t as ks,i as $s,a as Ms,b as Ds,c as Os,d as Nt,e as Xe,f as Ps,g as zs,h as As,n as Is}from"./agent-icon-BqxgeJKx.js";import{n as Es}from"./LinkExternal01-grPTiGSz.js";import{i as qe}from"./LogOut01-DybmQAmc.js";import{i as Ts}from"./Monitor01-wDu0s4kH.js";import{n as Rs,a as Fs}from"./Sun-DYUIquoy.js";import{a as $e}from"./Settings02-3oorvi46.js";import{i as Ls}from"./Shield01-CuyYpQe4.js";import{a as Us}from"./Users03-C51r6jhM.js";import{u as Gs}from"./use-deployment-admin-DjDEaMv9.js";import{u as Bs}from"./use-is-desktop-app-BNujXJc_.js";import{a as Hs}from"./ZapSquare-QVU0Bw_K.js";import{I as Ct}from"./invite-member-dialog-DMna758M.js";import{S as We,M as Ws}from"./shell-controls-CCToi4PQ.js";import{i as Vs}from"./Share07-DpdRFtAa.js";import{u as Ks}from"./use-virtual-mcp-DbnluG_X.js";import{a as Ys,g as Xs}from"./agent-capabilities-C4tLW0Za.js";import{u as wt,T as qs}from"./hooks-D8tAhtBV.js";import{u as kt}from"./shell-layout-Cy1Rb1Jo.js";import{f as $t}from"./reusable-new-chat-CouMjkYR.js";import{S as Mt}from"./use-navigate-to-agent-C2wbbsxr.js";import{C as Qs}from"./chat-context-B3_cbUxH.js";import"./X-_FosCW3a.js";import"./alert-dialog-DzRLkBkE.js";import"./form-BxxpTcrO.js";import"./label-DsIG5Oi8.js";import"./input-CM3ahCdh.js";import"./spinner-DLa1l1g3.js";import"./integration-icon-XzxOzAee.js";import"./Tool02-km907orb.js";import"./extract-connection-data-DwHDg7Bz.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-C2HwF4Ce.js";import"./CheckCircle-Bx7AMUH5.js";import"./Check-D-BD1I4L.js";import"./Eye-YFvNBTsY.js";import"./use-debounced-value-B1Vs-NqF.js";import"./authenticate-and-persist-oauth-BY9KwOCe.js";import"./mcp-oauth-DJmroWMG.js";import"./auth-CEn3fGcC.js";import"./track-Bjrsco_L.js";import"./studio-tools-Y9UrW8T1.js";import"./ChevronRight-B-rwXuOv.js";import"./ChevronDown-CM8jbN16.js";import"./Plus-BATfE6x_.js";import"./SearchMd-Iebu6css.js";import"./XClose-Rp1e__tf.js";import"./github-repo-picker-CrusklQ3.js";import"./collection-search-Bzns8dHW.js";import"./use-connection-DUxQABDJ.js";import"./ArrowLeft-D_UEaNhR.js";import"./use-mcp-tools-0qHxFXMI.js";import"./connection-card-mlKF0iG2.js";import"./use-registry-connections-DFi9FbWn.js";import"./useInfiniteQuery-DLTkWKe_.js";import"./use-infinite-scroll-Dkz8qiwE.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-eyAPH6o3.js";import"./card-Bpbi4aqf.js";import"./select-CvqnJHyE.js";import"./ChevronUp-DyAG8Bu9.js";import"./textarea-B-F33ndx.js";import"./Star01-CHk0yOEf.js";import"./connection-form-helpers-CGi5OwFy.js";import"./Trash01-DL4g0jxd.js";import"./collection-tabs-BMgwVZgb.js";import"./badge-BawSKT5v.js";import"./useSuspenseInfiniteQuery-BObn8d99.js";import"./use-ai-providers-CBjes-Ik.js";import"./FilterLines-CkiK4853.js";import"./toggle-group-B2JqTusN.js";import"./command-BFJ_8ZWV.js";import"./index-BCEVoVuV.js";import"./Zap-BjmENJ_r.js";import"./Stars02-Br7thB51.js";import"./use-clock-tick-BbDy6OgV.js";import"./AlertCircle-DAvQg4aT.js";import"./DotsVertical-BwM59KRx.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-CsohlGrv.js";import"./Tool01-CODdwe9c.js";import"./ArrowUp-ByRypNMa.js";import"./ArrowUpRight-CvvyqqpF.js";import"./TrendUp01-CjG-LBHk.js";import"./CpuChip01-DpKNQ0cZ.js";import"./CreditCard01--Hmoe_Hu.js";import"./Globe04-BZrmCYkB.js";import"./SwitchHorizontal01-lPNW9HBu.js";import"./HardDrive-BFJuR338.js";import"./Key01-DM7EtZwL.js";import"./Palette-CmhyLWIP.js";import"./Play-DcITh1db.js";import"./SearchLg-Ds6fWNT0.js";import"./Stars01-8R2kADEg.js";import"./Upload01-CZWh5eba.js";import"./Users01-CpXFtQRo.js";import"./use-org-auth-client-CFo1-xna.js";import"./use-organization-roles-CBQpOAZH.js";import"./decopilot-sse-pool-Cjto5iA0.js";import"./required-auth-layout-_wV-zmRd.js";import"./use-org-sso-BOiuRdNv.js";import"./use-decopilot-events-hURZvkKZ.js";function Js(t){const e=C.c(22),{siteUrl:l}=t,i=Y(),{org:o}=B(),n=A();let a;e[0]!==i||e[1]!==o.id||e[2]!==o.slug?(a=()=>{localStorage.setItem(It.sidebarOpen(),JSON.stringify(!1)),i({to:"/$org/$taskId",params:{org:o.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:ns(o.id),main:ut(xt.COMMERCE_DISCOVERY(o.id),pt),sidepanel:0}})},e[0]=i,e[1]=o.id,e[2]=o.slug,e[3]=a):a=e[3];const r=a;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(es,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=f):f=e[4];let c;e[5]!==n?(c=n("routes.commerceOnboarding.connectModal.dialogTitle"),e[5]=n,e[6]=c):c=e[6];let d;e[7]!==c?(d=s.jsx(ts,{className:"sr-only",children:c}),e[7]=c,e[8]=d):d=e[8];let m;e[9]!==r||e[10]!==n?(m=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:n("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(nt,{type:"button",size:"xl",className:"w-full",onClick:r,children:[n("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(ht,{size:18})]})]}),e[9]=r,e[10]=n,e[11]=m):m=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(qt,{}),e[12]=p):p=e[12];let u;e[13]!==r||e[14]!==l?(u=s.jsx(L.Suspense,{fallback:p,children:s.jsx(sl,{siteUrlFromUrl:l,onComplete:r})}),e[13]=r,e[14]=l,e[15]=u):u=e[15];let x;e[16]!==m||e[17]!==u?(x=s.jsx(rt,{fallback:m,children:u}),e[16]=m,e[17]=u,e[18]=x):x=e[18];let b;return e[19]!==d||e[20]!==x?(b=s.jsx(ss,{open:!0,children:s.jsxs(ls,{children:[f,s.jsxs(Et,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:tl,onPointerDownOutside:el,onInteractOutside:Zs,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[d,x]})]})}),e[19]=d,e[20]=x,e[21]=b):b=e[21],b}function Zs(t){return t.preventDefault()}function el(t){return t.preventDefault()}function tl(t){return t.preventDefault()}function sl({siteUrlFromUrl:t,onComplete:e}){const l=A(),{org:i}=B(),o=xt.COMMERCE_DISCOVERY(i.id),n=rs({connectionId:as,orgId:i.id,orgSlug:i.slug}),r=Tt({queryKey:Rt.commerceDiscoveryConnection(i.id,o),queryFn:async()=>{const j=await n.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return ze(j)},retry:!1}).data.item,f=typeof r?.metadata?.siteUrl=="string"?r.metadata.siteUrl:void 0,c=t||f,d=Qt(c),[m,p]=L.useState(!0),[u,x]=L.useState(null),b=Ye({mutationFn:async j=>ze(await n.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:j}})),retry:!1}),h=Ye({mutationFn:async j=>ze(await n.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:j}})),retry:!1}),g=async()=>{x(null),V("commerce_onboarding_open_report_clicked",{domain:d??void 0,organization_id:i.id});const j=c?Zt(c):null;if(j?.ok)try{let S=await h.mutateAsync(j.value);if(S.triggered||(V("commerce_onboarding_run_reclaim",{domain:d??void 0,organization_id:i.id,reason:S.reason??"not_upgraded"}),await b.mutateAsync(j.value),S=await h.mutateAsync(j.value)),!S.triggered){V("commerce_onboarding_run_failed",{domain:d??void 0,organization_id:i.id,error:S.reason??"not_triggered"}),x(l("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(S){V("commerce_onboarding_run_failed",{domain:d??void 0,organization_id:i.id,error:S instanceof Error?S.message:String(S)}),x(l("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},y=ms("demo_mode"),v=m||y;return s.jsx(ds,{siteHost:d,footer:s.jsxs(s.Fragment,{children:[u?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:u}):null,s.jsxs("div",{className:"flex gap-3",children:[s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx(fs,{ready:v,pending:h.isPending,label:h.isPending?l("routes.commerceOnboarding.connectModal.openingReport"):l("routes.commerceOnboarding.connectModal.viewDiagnostic"),onClick:()=>{g()},children:s.jsx(ht,{size:18})})}),v?null:s.jsx(nt,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 rounded-lg py-3 text-base font-medium leading-tight",disabled:h.isPending,onClick:()=>{g()},children:l("routes.commerceOnboarding.connectModal.skip")})]})]}),children:s.jsx(Jt,{org:i,cdConnectionId:o,siteUrl:c,onReadinessChange:p})})}function ll(t){const e=C.c(11),{onPointerDown:l,onDoubleClick:i}=t,o=A(),{state:n,isMobile:a}=K();if(a||n==="collapsed")return null;let r;e[0]!==o?(r=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=r):r=e[1];let f;e[2]!==o?(f=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=f):f=e[3];let c,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},d=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=d):(c=e[4],d=e[5]);let m;return e[6]!==i||e[7]!==l||e[8]!==r||e[9]!==f?(m=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":r,title:f,onPointerDown:l,onDoubleClick:i,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:d}),e[6]=i,e[7]=l,e[8]=r,e[9]=f,e[10]=m):m=e[10],m}const Ve=240,ol=400,il="sidebar.width";function fe(t){return Math.max(Ve,Math.min(ol,t))}function nl(){const t=C.c(11),[e,l]=at(il,rl),i=L.useRef(null);let o;t[0]!==l||t[1]!==e?(o=d=>{d.preventDefault();const m=d.clientX,p=fe(e),u=i.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=u?Array.from(u.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of x)g.style.transition="none";const b=g=>{const y=fe(p+(g.clientX-m));u?.style.setProperty("--sidebar-width",`${y}px`)},h=g=>{const y=fe(p+(g.clientX-m));l(y);for(const v of x)v.style.transition="";window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",h),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",b),window.addEventListener("pointerup",h)},t[0]=l,t[1]=e,t[2]=o):o=t[2];const n=o;let a;t[3]!==l?(a=()=>{l(Ve)},t[3]=l,t[4]=a):a=t[4];const r=a;let f;t[5]!==e?(f=fe(e),t[5]=e,t[6]=f):f=t[6];let c;return t[7]!==n||t[8]!==r||t[9]!==f?(c={width:f,wrapperRef:i,onStartResize:n,resetWidth:r},t[7]=n,t[8]=r,t[9]=f,t[10]=c):c=t[10],c}function rl(t){return typeof t=="number"?fe(t):Ve}function Dt(){return[]}function Ot(t){const e=C.c(3),{children:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=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]=i):i=e[0];let o;return e[1]!==l?(o=s.jsxs(Re,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[i,s.jsx(Fe,{children:s.jsx(U,{className:"gap-0.5",children:l})})]}),e[1]=l,e[2]=o):o=e[2],o}function Pt(t){const e=C.c(18),{item:l}=t,{isMobile:i,setOpenMobile:o}=K();let n;e[0]!==i||e[1]!==l||e[2]!==o?(n=()=>{V("nav_item_clicked",{nav_key:l.key,nav_label:l.label,is_active:!!l.isActive,is_mobile:i}),l.onClick?.(),i&&o(!1)},e[0]=i,e[1]=l,e[2]=o,e[3]=n):n=e[3];const a=n,r=l.key,f=l.isActive&&"z-10";let c;e[4]!==f?(c=z(f),e[4]=f,e[5]=c):c=e[5];let d;e[6]!==l.label?(d=s.jsx("span",{children:l.label}),e[6]=l.label,e[7]=d):d=e[7];let m;e[8]!==a||e[9]!==l.icon||e[10]!==l.isActive||e[11]!==l.label||e[12]!==d?(m=s.jsxs(E,{onClick:a,isActive:l.isActive,tooltip:l.label,children:[l.icon,d]}),e[8]=a,e[9]=l.icon,e[10]=l.isActive,e[11]=l.label,e[12]=d,e[13]=m):m=e[13];let p;return e[14]!==l.key||e[15]!==c||e[16]!==m?(p=s.jsx(T,{className:c,children:m},r),e[14]=l.key,e[15]=c,e[16]=m,e[17]=p):p=e[17],p}function al(t){const e=C.c(12),{section:l}=t;switch(l.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(mt,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=l.group.label,o=l.group.defaultExpanded;let n;e[2]!==l.group.items?(n=l.group.items.map(ml),e[2]=l.group.items,e[3]=n):n=e[3];let a;return e[4]!==l.group.defaultExpanded||e[5]!==l.group.label||e[6]!==n?(a=s.jsx(Ot,{label:i,defaultExpanded:o,children:n}),e[4]=l.group.defaultExpanded,e[5]=l.group.label,e[6]=n,e[7]=a):a=e[7],a}case"items":{let i;e[8]!==l.items?(i=l.items.map(cl),e[8]=l.items,e[9]=i):i=e[9];let o;return e[10]!==i?(o=s.jsx(Re,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Fe,{children:s.jsx(U,{className:"gap-1.5",children:i})})}),e[10]=i,e[11]=o):o=e[11],o}case"custom":return l.content}}function cl(t){return s.jsx(Pt,{item:t},t.key)}function ml(t){return s.jsx(Pt,{item:t},t.key)}function dl(t){const e=C.c(17),{sections:l,footer:i,additionalContent:o,header:n,variant:a,contentClassName:r}=t,f=a===void 0?"sidebar":a;let c;e[0]!==n?(c=n&&s.jsx(Wt,{className:"shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:n}),e[0]=n,e[1]=c):c=e[1];let d;e[2]!==r?(d=z("flex flex-col flex-1 px-2 pb-2 gap-0.5",r),e[2]=r,e[3]=d):d=e[3];let m;e[4]!==l?(m=l.map(fl),e[4]=l,e[5]=m):m=e[5];let p;e[6]!==o?(p=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[6]=o,e[7]=p):p=e[7];let u;e[8]!==d||e[9]!==m||e[10]!==p?(u=s.jsxs(dt,{className:d,children:[m,p]}),e[8]=d,e[9]=m,e[10]=p,e[11]=u):u=e[11];let x;return e[12]!==i||e[13]!==c||e[14]!==u||e[15]!==f?(x=s.jsxs(Vt,{variant:f,children:[c,u,i]}),e[12]=i,e[13]=c,e[14]=u,e[15]=f,e[16]=x):x=e[16],x}function fl(t,e){return s.jsx(al,{section:t},e)}function zt(t){const e=C.c(2);let l;return e[0]!==t?(l=s.jsx(dl,{...t}),e[0]=t,e[1]=l):l=e[1],l}zt.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,l)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(W,{className:"h-full bg-sidebar-accent rounded-md"})},l))})};function Qe(t){const e=C.c(18),{item:l,onClose:i}=t,o=l.isActive&&"z-10";let n;e[0]!==o?(n=z(o),e[0]=o,e[1]=n):n=e[1];let a;e[2]!==l||e[3]!==i?(a=()=>{l.onClick?.(),i()},e[2]=l,e[3]=i,e[4]=a):a=e[4];let r;e[5]!==l.icon?(r=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:l.icon}),e[5]=l.icon,e[6]=r):r=e[6];let f;e[7]!==l.label?(f=s.jsx("span",{children:l.label}),e[7]=l.label,e[8]=f):f=e[8];let c;e[9]!==l.isActive||e[10]!==l.label||e[11]!==a||e[12]!==r||e[13]!==f?(c=s.jsxs(E,{onClick:a,isActive:l.isActive,tooltip:l.label,className:"h-10! text-sm!",children:[r,f]}),e[9]=l.isActive,e[10]=l.label,e[11]=a,e[12]=r,e[13]=f,e[14]=c):c=e[14];let d;return e[15]!==n||e[16]!==c?(d=s.jsx(T,{className:n,children:c}),e[15]=n,e[16]=c,e[17]=d):d=e[17],d}function ul(t){const e=C.c(18),{section:l,onClose:i}=t;switch(l.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(mt,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=l.group.label,n=l.group.defaultExpanded;let a;if(e[2]!==i||e[3]!==l.group.items){let f;e[5]!==i?(f=c=>s.jsx(Qe,{item:c,onClose:i},c.key),e[5]=i,e[6]=f):f=e[6],a=l.group.items.map(f),e[2]=i,e[3]=l.group.items,e[4]=a}else a=e[4];let r;return e[7]!==l.group.defaultExpanded||e[8]!==l.group.label||e[9]!==a?(r=s.jsx(Ot,{label:o,defaultExpanded:n,children:a}),e[7]=l.group.defaultExpanded,e[8]=l.group.label,e[9]=a,e[10]=r):r=e[10],r}case"items":{let o;if(e[11]!==i||e[12]!==l.items){let a;e[14]!==i?(a=r=>s.jsx(Qe,{item:r,onClose:i},r.key),e[14]=i,e[15]=a):a=e[15],o=l.items.map(a),e[11]=i,e[12]=l.items,e[13]=o}else o=e[13];let n;return e[16]!==o?(n=s.jsx(Re,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Fe,{children:s.jsx(U,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=n):n=e[17],n}case"custom":return l.content}}function pl(t){const e=C.c(27),{sections:l,onClose:i,footer:o,additionalContent:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(ke,{}),e[0]=a):a=e[0];let r;e[1]!==i?(r=s.jsx(Ge,{onNavigate:i}),e[1]=i,e[2]=r):r=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"flex-1"}),e[3]=f):f=e[3];const c=A();let d;e[4]!==c?(d=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=d):d=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Be,{size:16}),e[6]=m):m=e[6];let p;e[7]!==i||e[8]!==d?(p=s.jsx(He,{onClick:i,"aria-label":d,children:m}),e[7]=i,e[8]=d,e[9]=p):p=e[9];let u;e[10]!==r||e[11]!==p?(u=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[a,r,f,p]}),e[10]=r,e[11]=p,e[12]=u):u=e[12];let x;if(e[13]!==i||e[14]!==l){let y;e[16]!==i?(y=(v,j)=>s.jsx(ul,{section:v,onClose:i},j),e[16]=i,e[17]=y):y=e[17],x=l.map(y),e[13]=i,e[14]=l,e[15]=x}else x=e[15];let b;e[18]!==n?(b=n&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:n}),e[18]=n,e[19]=b):b=e[19];let h;e[20]!==b||e[21]!==x?(h=s.jsxs(dt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[x,b]}),e[20]=b,e[21]=x,e[22]=h):h=e[22];let g;return e[23]!==o||e[24]!==h||e[25]!==u?(g=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[u,h,o]}),e[23]=o,e[24]=h,e[25]=u,e[26]=g):g=e[26],g}function de(t){const e=C.c(26),{item:l,onClose:i}=t;let o;e[0]!==l.className?(o=z("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",l.className),e[0]=l.className,e[1]=o):o=e[1];const n=o;if(l.href){const d=l.external?"_blank":void 0,m=l.external?"noopener noreferrer":void 0;let p;e[2]!==l.icon?(p=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.icon}),e[2]=l.icon,e[3]=p):p=e[3];let u;e[4]!==l.label?(u=s.jsx("span",{className:"flex-1",children:l.label}),e[4]=l.label,e[5]=u):u=e[5];let x;return e[6]!==n||e[7]!==l.href||e[8]!==i||e[9]!==d||e[10]!==m||e[11]!==p||e[12]!==u?(x=s.jsxs("a",{href:l.href,target:d,rel:m,className:n,onClick:i,children:[p,u]}),e[6]=n,e[7]=l.href,e[8]=i,e[9]=d,e[10]=m,e[11]=p,e[12]=u,e[13]=x):x=e[13],x}let a;e[14]!==l||e[15]!==i?(a=()=>{l.onClick?.(),i()},e[14]=l,e[15]=i,e[16]=a):a=e[16];let r;e[17]!==l.icon?(r=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.icon}),e[17]=l.icon,e[18]=r):r=e[18];let f;e[19]!==l.label?(f=s.jsx("span",{className:"flex-1",children:l.label}),e[19]=l.label,e[20]=f):f=e[20];let c;return e[21]!==n||e[22]!==a||e[23]!==r||e[24]!==f?(c=s.jsxs("button",{type:"button",onClick:a,className:n,children:[r,f]}),e[21]=n,e[22]=a,e[23]=r,e[24]=f,e[25]=c):c=e[25],c}function xl(){const t=C.c(4),e=A();let l;t[0]!==e?(l=e("common.accountPopover.impersonating"),t[0]=e,t[1]=l):l=t[1];let i;return t[2]!==l?(i=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:l}),t[2]=l,t[3]=i):i=t[3],i}function Je(t){const e=C.c(38),{user:l,userImage:i,isImpersonating:o,isMobile:n}=t,a=A(),r=n?"py-4 border-b border-border":"py-3 mx-1 mt-1";let f;e[0]!==r?(f=z("flex items-center gap-3 px-4",r),e[0]=r,e[1]=f):f=e[1];const c=l?.name??"U";let d;e[2]!==c||e[3]!==i?(d=s.jsx(Ie,{url:i,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=i,e[4]=d):d=e[4];let m;e[5]!==a||e[6]!==l?.name?(m=l?.name??a("common.accountPopover.defaultUserName"),e[5]=a,e[6]=l?.name,e[7]=m):m=e[7];let p;e[8]!==m?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=p):p=e[9];let u;e[10]!==o?(u=o&&s.jsx(xl,{}),e[10]=o,e[11]=u):u=e[11];let x;e[12]!==p||e[13]!==u?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[p,u]}),e[12]=p,e[13]=u,e[14]=x):x=e[14];const b=l?.email;let h;e[15]!==b?(h=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b}),e[15]=b,e[16]=h):h=e[16];let g;e[17]!==h||e[18]!==x?(g=s.jsxs("div",{className:"flex-1 min-w-0",children:[x,h]}),e[17]=h,e[18]=x,e[19]=g):g=e[19];let y;e[20]!==a||e[21]!==l?(y=()=>{l?.id&&navigator.clipboard.writeText(l.id).then(()=>{ct.success(a("common.accountPopover.userIdCopied"))})},e[20]=a,e[21]=l,e[22]=y):y=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Cs,{size:14}),e[23]=v):v=e[23];let j;e[24]!==y?(j=s.jsx(jt,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:y,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:v})}),e[24]=y,e[25]=j):j=e[25];let S;e[26]!==a?(S=a("common.accountPopover.copyUserId"),e[26]=a,e[27]=S):S=e[27];let w;e[28]!==S?(w=s.jsx(vt,{side:"right",children:s.jsx("p",{className:"text-xs",children:S})}),e[28]=S,e[29]=w):w=e[29];let _;e[30]!==j||e[31]!==w?(_=s.jsx(St,{delayDuration:300,children:s.jsxs(yt,{children:[j,w]})}),e[30]=j,e[31]=w,e[32]=_):_=e[32];let N;return e[33]!==g||e[34]!==_||e[35]!==f||e[36]!==d?(N=s.jsxs("div",{className:f,children:[d,g,_]}),e[33]=g,e[34]=_,e[35]=f,e[36]=d,e[37]=N):N=e[37],N}function Ze(t){const e=C.c(35),{themeOptions:l,preferences:i,setPreferences:o,isMobile:n}=t,a=A(),r=n?"size-8":"size-7",f=n?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==f?(c=z("flex items-center justify-between border-t border-border/50",f),e[0]=f,e[1]=c):c=e[1];let d;if(e[2]!==r||e[3]!==i.theme||e[4]!==o||e[5]!==l){let S;e[7]!==r||e[8]!==i.theme||e[9]!==o?(S=w=>{const{value:_,icon:N,label:k}=w;return s.jsx("button",{type:"button","aria-label":k,onClick:()=>o($=>({...$,theme:_})),className:z(r,"rounded-md flex items-center justify-center transition-colors",i.theme===_?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:N},_)},e[7]=r,e[8]=i.theme,e[9]=o,e[10]=S):S=e[10],d=l.map(S),e[2]=r,e[3]=i.theme,e[4]=o,e[5]=l,e[6]=d}else d=e[6];let m;e[11]!==d?(m=s.jsx("div",{className:"flex items-center gap-0.5",children:d}),e[11]=d,e[12]=m):m=e[12];let p;e[13]!==i.enableSounds||e[14]!==a?(p=i.enableSounds?a("common.accountPopover.disableSounds"):a("common.accountPopover.enableSounds"),e[13]=i.enableSounds,e[14]=a,e[15]=p):p=e[15];let u;e[16]!==o?(u=()=>o(hl),e[16]=o,e[17]=u):u=e[17];const x=i.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let b;e[18]!==r||e[19]!==x?(b=z(r,"rounded-md flex items-center justify-center transition-colors",x),e[18]=r,e[19]=x,e[20]=b):b=e[20];let h;e[21]!==i.enableSounds?(h=i.enableSounds?s.jsx(Ms,{size:14}):s.jsx(Ds,{size:14}),e[21]=i.enableSounds,e[22]=h):h=e[22];let g;e[23]!==p||e[24]!==u||e[25]!==b||e[26]!==h?(g=s.jsx("button",{type:"button","aria-label":p,onClick:u,className:b,children:h}),e[23]=p,e[24]=u,e[25]=b,e[26]=h,e[27]=g):g=e[27];let y;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.227.2"]}),e[28]=y):y=e[28];let v;e[29]!==g?(v=s.jsxs("div",{className:"flex items-center gap-2",children:[g,y]}),e[29]=g,e[30]=v):v=e[30];let j;return e[31]!==v||e[32]!==c||e[33]!==m?(j=s.jsxs("div",{className:c,children:[m,v]}),e[31]=v,e[32]=c,e[33]=m,e[34]=j):j=e[34],j}function hl(t){return{...t,enableSounds:!t.enableSounds}}function et(t){const e=C.c(54),{user:l,userImage:i,menuItems:o,signOutItem:n,stopImpersonatingItem:a,isImpersonating:r,themeOptions:f,preferences:c,setPreferences:d,close:m,isMobile:p}=t;if(p){let j;e[0]!==r||e[1]!==l||e[2]!==i?(j=s.jsx(Je,{user:l,userImage:i,isImpersonating:r,isMobile:!0}),e[0]=r,e[1]=l,e[2]=i,e[3]=j):j=e[3];let S;if(e[4]!==m||e[5]!==o){let M;e[7]!==m?(M=O=>s.jsx(de,{item:O,onClose:m},O.key),e[7]=m,e[8]=M):M=e[8],S=o.map(M),e[4]=m,e[5]=o,e[6]=S}else S=e[6];let w;e[9]!==m||e[10]!==a?(w=a&&s.jsx(de,{item:a,onClose:m}),e[9]=m,e[10]=a,e[11]=w):w=e[11];let _;e[12]!==m||e[13]!==n?(_=s.jsx(de,{item:n,onClose:m}),e[12]=m,e[13]=n,e[14]=_):_=e[14];let N;e[15]!==S||e[16]!==w||e[17]!==_?(N=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[S,w,_]})}),e[15]=S,e[16]=w,e[17]=_,e[18]=N):N=e[18];let k;e[19]!==c||e[20]!==d||e[21]!==f?(k=s.jsx(Ze,{themeOptions:f,preferences:c,setPreferences:d,isMobile:!0}),e[19]=c,e[20]=d,e[21]=f,e[22]=k):k=e[22];let $;return e[23]!==j||e[24]!==N||e[25]!==k?($=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[j,N,k]}),e[23]=j,e[24]=N,e[25]=k,e[26]=$):$=e[26],$}let u;e[27]!==r||e[28]!==l||e[29]!==i?(u=s.jsx(Je,{user:l,userImage:i,isImpersonating:r,isMobile:!1}),e[27]=r,e[28]=l,e[29]=i,e[30]=u):u=e[30];let x;if(e[31]!==m||e[32]!==o){let j;e[34]!==m?(j=S=>s.jsx(de,{item:S,onClose:m},S.key),e[34]=m,e[35]=j):j=e[35],x=o.map(j),e[31]=m,e[32]=o,e[33]=x}else x=e[33];let b;e[36]!==m||e[37]!==a?(b=a&&s.jsx(de,{item:a,onClose:m}),e[36]=m,e[37]=a,e[38]=b):b=e[38];let h;e[39]!==m||e[40]!==n?(h=s.jsx(de,{item:n,onClose:m}),e[39]=m,e[40]=n,e[41]=h):h=e[41];let g;e[42]!==x||e[43]!==b||e[44]!==h?(g=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,b,h]}),e[42]=x,e[43]=b,e[44]=h,e[45]=g):g=e[45];let y;e[46]!==c||e[47]!==d||e[48]!==f?(y=s.jsx(Ze,{themeOptions:f,preferences:c,setPreferences:d,isMobile:!1}),e[46]=c,e[47]=d,e[48]=f,e[49]=y):y=e[49];let v;return e[50]!==u||e[51]!==g||e[52]!==y?(v=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[u,g,y]})}),e[50]=u,e[51]=g,e[52]=y,e[53]=v):v=e[53],v}function Ee(){const t=C.c(107),e=A(),{data:l}=ue.useSession(),{org:i}=B(),o=Y();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org",shouldThrow:!1},t[0]=n):n=t[0];const r=Ft(n)?.params.org,[f,c]=Lt(),d=ft(),{isAdmin:m}=Gs(),p=Bs(),[u,x]=L.useState(!1),[b,h]=L.useState(!1),g=l?.user,y=g?.image,v=!!l?.session?.impersonatedBy;let j;t[1]===Symbol.for("react.memo_cache_sentinel")?(j=()=>x(!1),t[1]=j):j=t[1];const S=j;let w;t[2]!==e?(w=e("common.accountPopover.preferences"),t[2]=e,t[3]=w):w=t[3];let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx($e,{size:16}),t[4]=_):_=t[4];let N;t[5]!==o||t[6]!==r?(N=()=>{o({to:"/$org/settings/profile",params:{org:r??""}})},t[5]=o,t[6]=r,t[7]=N):N=t[7];let k;t[8]!==w||t[9]!==N?(k={key:"preferences",label:w,icon:_,onClick:N},t[8]=w,t[9]=N,t[10]=k):k=t[10];let $;t[11]!==i||t[12]!==o?($=i?[{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(Es,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:i.slug}})}}]:[],t[11]=i,t[12]=o,t[13]=$):$=t[13];let M;t[14]!==p||t[15]!==e?(M=os()&&!p?[{key:"install-on-mac",label:e("downloadApp.installOnMac"),icon:s.jsx(ws,{size:16}),onClick:()=>h(!0)}]:[],t[14]=p,t[15]=e,t[16]=M):M=t[16];let O;t[17]!==e?(O=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=O):O=t[18];let I;t[19]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx($s,{size:16}),t[19]=I):I=t[19];let D;t[20]!==O?(D={key:"terms",label:O,icon:I,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=O,t[21]=D):D=t[21];let P;t[22]!==e?(P=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=P):P=t[23];let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(Ls,{size:16}),t[24]=G):G=t[24];let R;t[25]!==P?(R={key:"privacy",label:P,icon:G,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=P,t[26]=R):R=t[26];let F;t[27]!==e?(F=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=F):F=t[28];let H;t[29]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Ut,{className:"w-4 h-4"}),t[29]=H):H=t[29];let X;t[30]!==F?(X={key:"github",label:F,icon:H,href:"https://github.com/decocms/studio",external:!0},t[30]=F,t[31]=X):X=t[31];let q;t[32]!==e?(q=e("common.accountPopover.community"),t[32]=e,t[33]=q):q=t[33];let pe;t[34]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(Us,{size:16}),t[34]=pe):pe=t[34];let Q;t[35]!==q?(Q={key:"community",label:q,icon:pe,href:"https://decocms.com/discord",external:!0},t[35]=q,t[36]=Q):Q=t[36];let J;t[37]!==e?(J=e("common.accountPopover.homepage"),t[37]=e,t[38]=J):J=t[38];let xe;t[39]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx(_t,{size:16}),t[39]=xe):xe=t[39];let Z;t[40]!==J?(Z={key:"homepage",label:J,icon:xe,href:"https://decocms.com",external:!0},t[40]=J,t[41]=Z):Z=t[41];let ee;t[42]!==m||t[43]!==o||t[44]!==e?(ee=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(ks,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=m,t[43]=o,t[44]=e,t[45]=ee):ee=t[45];let he;t[46]!==D||t[47]!==R||t[48]!==X||t[49]!==Q||t[50]!==Z||t[51]!==ee||t[52]!==k||t[53]!==$||t[54]!==M?(he=[k,...$,...M,D,R,X,Q,Z,...ee],t[46]=D,t[47]=R,t[48]=X,t[49]=Q,t[50]=Z,t[51]=ee,t[52]=k,t[53]=$,t[54]=M,t[55]=he):he=t[55];const Me=he;let te;t[56]!==e?(te=e("common.accountPopover.signOut"),t[56]=e,t[57]=te):te=t[57];let be;t[58]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(qe,{size:16}),t[58]=be):be=t[58];let ge;t[59]!==te?(ge={key:"logout",label:te,icon:be,onClick:gl},t[59]=te,t[60]=ge):ge=t[60];const De=ge;let je;t[61]!==v||t[62]!==e?(je=v?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(qe,{size:16}),onClick:async()=>{const{error:Ke}=await ue.admin.stopImpersonating();if(Ke){ct.error(Ke.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=v,t[62]=e,t[63]=je):je=t[63];const Oe=je;let ve;t[64]===Symbol.for("react.memo_cache_sentinel")?(ve=s.jsx(Rs,{size:14}),t[64]=ve):ve=t[64];let se;t[65]!==e?(se=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=se):se=t[66];let le;t[67]!==se?(le={value:"light",icon:ve,label:se},t[67]=se,t[68]=le):le=t[68];let Se;t[69]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx(Fs,{size:14}),t[69]=Se):Se=t[69];let oe;t[70]!==e?(oe=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=oe):oe=t[71];let ie;t[72]!==oe?(ie={value:"dark",icon:Se,label:oe},t[72]=oe,t[73]=ie):ie=t[73];let ye;t[74]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Ts,{size:14}),t[74]=ye):ye=t[74];let ne;t[75]!==e?(ne=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=ne):ne=t[76];let re;t[77]!==ne?(re={value:"system",icon:ye,label:ne},t[77]=ne,t[78]=re):re=t[78];let _e;t[79]!==le||t[80]!==ie||t[81]!==re?(_e=[le,ie,re],t[79]=le,t[80]=ie,t[81]=re,t[82]=_e):_e=t[82];const Pe=_e;let Ne;t[83]!==v||t[84]!==d||t[85]!==Me||t[86]!==f||t[87]!==c||t[88]!==De||t[89]!==Oe||t[90]!==Pe||t[91]!==g||t[92]!==y?(Ne={user:g,userImage:y,menuItems:Me,signOutItem:De,stopImpersonatingItem:Oe,isImpersonating:v,themeOptions:Pe,preferences:f,setPreferences:c,close:S,isMobile:d},t[83]=v,t[84]=d,t[85]=Me,t[86]=f,t[87]=c,t[88]=De,t[89]=Oe,t[90]=Pe,t[91]=g,t[92]=y,t[93]=Ne):Ne=t[93];const Ce=Ne;let ae;t[94]!==v||t[95]!==d||t[96]!==u||t[97]!==Ce||t[98]!==e||t[99]!==g?.name||t[100]!==y?(ae=d?s.jsxs(ys,{open:u,onOpenChange:x,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>x(!0),className:z("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",v&&"border-2 border-dashed border-warning"),children:[s.jsx(Ie,{url:y,fallback:g?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:g?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(_s,{className:"h-[80dvh] p-0",children:[s.jsx(Ns,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(et,{...Ce})]})]}):s.jsxs(js,{open:u,onOpenChange:x,children:[s.jsx(vs,{asChild:!0,children:s.jsxs(E,{tooltip:g?.name??e("common.accountPopover.defaultAccountLabel"),className:z("rounded-md",v&&"border-2 border-dashed border-warning"),children:[s.jsx(Ie,{url:y,fallback:g?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:g?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(Ss,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:bl,children:s.jsx(et,{...Ce})})]}),t[94]=v,t[95]=d,t[96]=u,t[97]=Ce,t[98]=e,t[99]=g?.name,t[100]=y,t[101]=ae):ae=t[101];let ce;t[102]!==b?(ce=s.jsx(is,{open:b,onOpenChange:h}),t[102]=b,t[103]=ce):ce=t[103];let we;return t[104]!==ae||t[105]!==ce?(we=s.jsxs(s.Fragment,{children:[ae,ce]}),t[104]=ae,t[105]=ce,t[106]=we):we=t[106],we}function bl(t){return t.preventDefault()}function gl(){V("signed_out",{source:"account_popover"}),Gt(),ue.signOut()}class jl extends L.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,l){}render(){return this.state.hasError?null:this.props.children}}function vl(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Sl(){const t=C.c(17),e=Y(),{org:l}=B(),{hasDecoKey:i,balanceDollars:o}=us();if(!i)return null;let n;t[0]!==o?(n=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=n):n=t[1];let a;t[2]!==o?(a=z(o!=null&&vl(o)),t[2]=o,t[3]=a):a=t[3];let r;t[4]!==e||t[5]!==l.slug?(r=()=>e({to:"/$org/settings/ai-providers",params:{org:l.slug}}),t[4]=e,t[5]=l.slug,t[6]=r):r=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Os,{}),t[7]=f):f=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let d;t[10]!==c?(d=s.jsx("span",{children:c}),t[10]=c,t[11]=d):d=t[11];let m;return t[12]!==n||t[13]!==a||t[14]!==r||t[15]!==d?(m=s.jsx(U,{children:s.jsx(T,{children:s.jsxs(E,{tooltip:n,className:a,onClick:r,children:[f,d]})})}),t[12]=n,t[13]=a,t[14]=r,t[15]=d,t[16]=m):m=t[16],m}function tt(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(jl,{children:s.jsx(L.Suspense,{fallback:null,children:s.jsx(Sl,{})})}),t[0]=e):e=t[0],e}function yl(){const t=C.c(14),e=A(),l=Y(),{org:i}=B();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==l||t[3]!==i.slug?(n=()=>l({to:"/$org/settings",params:{org:i.slug}}),t[2]=l,t[3]=i.slug,t[4]=n):n=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx($e,{}),t[5]=a):a=t[5];let r;t[6]!==e?(r=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=r):r=t[7];let f;t[8]!==r?(f=s.jsx("span",{children:r}),t[8]=r,t[9]=f):f=t[9];let c;return t[10]!==o||t[11]!==n||t[12]!==f?(c=s.jsxs(E,{tooltip:o,onClick:n,children:[a,f]}),t[10]=o,t[11]=n,t[12]=f,t[13]=c):c=t[13],c}function _l(){const t=C.c(9),e=A(),l=Y(),{org:i}=B();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==l||t[3]!==i.slug?(n=()=>l({to:"/$org/settings",params:{org:i.slug}}),t[2]=l,t[3]=i.slug,t[4]=n):n=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx($e,{size:15}),t[5]=a):a=t[5];let r;return t[6]!==o||t[7]!==n?(r=s.jsx("button",{type:"button","aria-label":o,onClick:n,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:a}),t[6]=o,t[7]=n,t[8]=r):r=t[8],r}function st(){const t=C.c(29),e=A(),[l,i]=L.useState(!1);let o;t[0]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=o):o=t[1];let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Nt,{}),t[2]=n):n=t[2];let a;t[3]!==e?(a=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=a):a=t[4];let r;t[5]!==a?(r=s.jsx("span",{children:a}),t[5]=a,t[6]=r):r=t[6];let f;t[7]!==o||t[8]!==r?(f=s.jsx(T,{children:s.jsx(Ct,{trigger:s.jsxs(E,{tooltip:o,children:[n,r]})})}),t[7]=o,t[8]=r,t[9]=f):f=t[9];let c;t[10]!==e?(c=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=c):c=t[11];let d,m;t[12]===Symbol.for("react.memo_cache_sentinel")?(d=()=>i(!0),m=s.jsx(Hs,{}),t[12]=d,t[13]=m):(d=t[12],m=t[13]);let p;t[14]!==e?(p=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=p):p=t[15];let u;t[16]!==p?(u=s.jsx("span",{children:p}),t[16]=p,t[17]=u):u=t[17];let x;t[18]!==c||t[19]!==u?(x=s.jsx(T,{children:s.jsxs(E,{tooltip:c,onClick:d,children:[m,u]})}),t[18]=c,t[19]=u,t[20]=x):x=t[20];let b;t[21]!==x||t[22]!==f?(b=s.jsxs(U,{className:"gap-0.5",children:[f,x]}),t[21]=x,t[22]=f,t[23]=b):b=t[23];let h;t[24]!==l?(h=s.jsx(ps,{open:l,onOpenChange:i,mode:"browse"}),t[24]=l,t[25]=h):h=t[25];let g;return t[26]!==b||t[27]!==h?(g=s.jsxs(s.Fragment,{children:[b,h]}),t[26]=b,t[27]=h,t[28]=g):g=t[28],g}function lt(){const t=C.c(10),e=A();let l;t[0]!==e?(l=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=l):l=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Nt,{}),t[2]=i):i=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let n;t[5]!==o?(n=s.jsx("span",{children:o}),t[5]=o,t[6]=n):n=t[6];let a;return t[7]!==l||t[8]!==n?(a=s.jsx(U,{className:"gap-0.5",children:s.jsx(T,{children:s.jsx(Ct,{trigger:s.jsxs(E,{tooltip:l,children:[i,n]})})})}),t[7]=l,t[8]=n,t[9]=a):a=t[9],a}function Nl(){const t=C.c(17),{state:e}=K(),l=e==="collapsed",i=Le(),o=!i;if(l){let c;t[0]!==o?(c=o&&s.jsx(tt,{}),t[0]=o,t[1]=c):c=t[1];let d;t[2]!==i?(d=i?s.jsx(lt,{}):s.jsx(st,{}),t[2]=i,t[3]=d):d=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(T,{children:s.jsx(yl,{})}),t[4]=m):m=t[4];let p;t[5]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs(U,{children:[m,s.jsx(T,{children:s.jsx(Ee,{})})]}),t[5]=p):p=t[5];let u;return t[6]!==c||t[7]!==d?(u=s.jsxs(Ae,{className:"px-2 pb-3 gap-1",children:[c,d,p]}),t[6]=c,t[7]=d,t[8]=u):u=t[8],u}let n;t[9]!==o?(n=o&&s.jsx(tt,{}),t[9]=o,t[10]=n):n=t[10];let a;t[11]!==i?(a=i?s.jsx(lt,{}):s.jsx(st,{}),t[11]=i,t[12]=a):a=t[12];let r;t[13]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(U,{className:"gap-0.5",children:s.jsx(T,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Ee,{})}),s.jsx(_l,{})]})})}),t[13]=r):r=t[13];let f;return t[14]!==n||t[15]!==a?(f=s.jsxs(Ae,{className:"px-2 pb-3 gap-0.5",children:[n,a,r]}),t[14]=n,t[15]=a,t[16]=f):f=t[16],f}function Cl(){const t=C.c(11),e=A(),l=Y(),{org:i}=B(),{setOpenMobile:o}=K();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(U,{children:s.jsx(T,{children:s.jsx(Ee,{})})})}),t[0]=n):n=t[0];let a;t[1]!==e?(a=e("sidebar.sidebarFooterMobile.settings"),t[1]=e,t[2]=a):a=t[2];let r;t[3]!==l||t[4]!==i.slug||t[5]!==o?(r=()=>{l({to:"/$org/settings",params:{org:i.slug}}),o(!1)},t[3]=l,t[4]=i.slug,t[5]=o,t[6]=r):r=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx($e,{className:"size-4"}),t[7]=f):f=t[7];let c;return t[8]!==a||t[9]!==r?(c=s.jsx(Ae,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[n,s.jsx(He,{"aria-label":a,onClick:r,children:f})]})}),t[8]=a,t[9]=r,t[10]=c):c=t[10],c}function ot(t){const e=C.c(15),{className:l,wrapperClassName:i,children:o}=t,[n,a]=L.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=g=>{g&&a(g.scrollHeight>g.clientHeight+1)},e[0]=r):r=e[0];const f=r;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=g=>{const y=g.currentTarget;a(y.scrollHeight-y.scrollTop>y.clientHeight+1)},e[1]=c):c=e[1];const d=c;let m;e[2]!==i?(m=z("relative",i),e[2]=i,e[3]=m):m=e[3];let p;e[4]!==o||e[5]!==l?(p=s.jsx("div",{ref:f,onScroll:d,className:l,children:o}),e[4]=o,e[5]=l,e[6]=p):p=e[6];const u=n?"opacity-100":"opacity-0";let x;e[7]!==u?(x=z("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",u),e[7]=u,e[8]=x):x=e[8];let b;e[9]!==x?(b=s.jsx("div",{"aria-hidden":!0,className:x}),e[9]=x,e[10]=b):b=e[10];let h;return e[11]!==m||e[12]!==p||e[13]!==b?(h=s.jsxs("div",{className:m,children:[p,b]}),e[11]=m,e[12]=p,e[13]=b,e[14]=h):h=e[14],h}function it(t){const e=C.c(17),{label:l,onClick:i,active:o,children:n}=t,[a,r]=L.useState(!1);let f,c,d,m;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>r(!0),c=()=>r(!1),d=()=>r(!0),m=()=>r(!1),e[0]=f,e[1]=c,e[2]=d,e[3]=m):(f=e[0],c=e[1],d=e[2],m=e[3]);const p=o&&"bg-sidebar-accent text-foreground";let u;e[4]!==p?(u=z("md:size-[34px] rounded-lg",p),e[4]=p,e[5]=u):u=e[5];let x;e[6]!==n||e[7]!==l||e[8]!==i||e[9]!==u?(x=s.jsx(jt,{asChild:!0,children:s.jsx(He,{"aria-label":l,onClick:i,onPointerEnter:f,onPointerLeave:c,onFocus:d,onBlur:m,className:u,children:n})}),e[6]=n,e[7]=l,e[8]=i,e[9]=u,e[10]=x):x=e[10];let b;e[11]!==l?(b=s.jsx(vt,{side:"bottom",children:l}),e[11]=l,e[12]=b):b=e[12];let h;return e[13]!==a||e[14]!==x||e[15]!==b?(h=s.jsxs(yt,{open:a,children:[x,b]}),e[13]=a,e[14]=x,e[15]=b,e[16]=h):h=e[16],h}function wl(t){const e=C.c(61);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:i}=l,o=A(),{org:n}=B();let a;e[2]!==i?(a={onNavigate:i},e[2]=i,e[3]=a):a=e[3];const r=xs(a),{state:f,isMobile:c,toggleSidebar:d}=K();if(f==="collapsed"&&!c){let v;e[4]!==n?(v=s.jsx(gt,{org:n,size:"sm"}),e[4]=n,e[5]=v):v=e[5];let j;e[6]!==n.name||e[7]!==v?(j=s.jsx(E,{tooltip:n.name,children:v}),e[6]=n.name,e[7]=v,e[8]=j):j=e[8];let S;e[9]!==n.slug||e[10]!==j?(S=s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(bt,{orgParam:n.slug,side:"right",align:"start",trigger:j})}),e[9]=n.slug,e[10]=j,e[11]=S):S=e[11];let w;e[12]!==o?(w=o("sidebar.taskGroupsList.toggleSidebar"),e[12]=o,e[13]=w):w=e[13];let _;e[14]!==o?(_=o("sidebar.taskGroupsList.toggleSidebar"),e[14]=o,e[15]=_):_=e[15];let N;e[16]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Be,{size:16}),e[16]=N):N=e[16];let k;e[17]!==w||e[18]!==_||e[19]!==d?(k=s.jsx(T,{children:s.jsx(E,{"aria-label":w,tooltip:_,onClick:d,children:N})}),e[17]=w,e[18]=_,e[19]=d,e[20]=k):k=e[20];let $;e[21]!==o?($=o("sidebar.taskGroupsList.searchChats"),e[21]=o,e[22]=$):$=e[22];let M;e[23]!==o?(M=o("sidebar.taskGroupsList.searchChats"),e[23]=o,e[24]=M):M=e[24];let O;e[25]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Xe,{size:16}),e[25]=O):O=e[25];let I;e[26]!==r.openSearch||e[27]!==$||e[28]!==M?(I=s.jsx(T,{children:s.jsx(E,{"aria-label":$,tooltip:M,onClick:r.openSearch,children:O})}),e[26]=r.openSearch,e[27]=$,e[28]=M,e[29]=I):I=e[29];let D;e[30]!==I||e[31]!==k?(D=s.jsxs(U,{className:"mt-2 min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[k,I]}),e[30]=I,e[31]=k,e[32]=D):D=e[32];let P;return e[33]!==r.reclaimDialog||e[34]!==r.searchDialog||e[35]!==D||e[36]!==S?(P=s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[S,D,r.searchDialog,r.reclaimDialog]}),e[33]=r.reclaimDialog,e[34]=r.searchDialog,e[35]=D,e[36]=S,e[37]=P):P=e[37],P}let p;e[38]!==r||e[39]!==o?(p=v=>s.jsx(St,{delayDuration:300,children:s.jsxs("div",{className:z("shrink-0 flex items-center justify-between",v?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!v&&s.jsx(We,{className:"md:size-[34px] rounded-lg"}),s.jsx(hs,{panel:r})]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(it,{label:o("sidebar.taskGroupsList.searchChats"),onClick:r.openSearch,children:s.jsx(Xe,{size:16})}),s.jsx(it,{label:o("sidebar.taskGroupsList.newChat"),onClick:r.newThread,children:s.jsx(Ps,{size:16})})]})]})}),e[38]=r,e[39]=o,e[40]=p):p=e[40];const u=p;let x;e[41]!==r?(x=s.jsx(bs,{panel:r}),e[41]=r,e[42]=x):x=e[42];const b=x;if(c){let v;e[43]!==u?(v=u(!0),e[43]=u,e[44]=v):v=e[44];let j;e[45]!==b?(j=s.jsx(ot,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:b}),e[45]=b,e[46]=j):j=e[46];let S;return e[47]!==r.reclaimDialog||e[48]!==r.searchDialog||e[49]!==v||e[50]!==j?(S=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[v,j,r.searchDialog,r.reclaimDialog]}),e[47]=r.reclaimDialog,e[48]=r.searchDialog,e[49]=v,e[50]=j,e[51]=S):S=e[51],S}let h;e[52]!==u?(h=u(!1),e[52]=u,e[53]=h):h=e[53];let g;e[54]!==b?(g=s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(ot,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:b})}),e[54]=b,e[55]=g):g=e[55];let y;return e[56]!==r.reclaimDialog||e[57]!==r.searchDialog||e[58]!==h||e[59]!==g?(y=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[h,g,r.searchDialog,r.reclaimDialog]}),e[56]=r.reclaimDialog,e[57]=r.searchDialog,e[58]=h,e[59]=g,e[60]=y):y=e[60],y}const kl=5,$l=[{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 Ml(){const t=C.c(3),{state:e}=K();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:kl}).map(Pl)}),t[0]=o):o=t[0],o}let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(W,{className:"size-6 rounded-md"}),s.jsx(W,{className:"size-6 rounded-md"}),s.jsx(W,{className:"size-6 rounded-md"})]}),s.jsx(W,{className:"h-6 w-20 rounded-md"})]}),t[1]=l):l=t[1];let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[l,s.jsx("div",{className:"flex flex-col gap-0.5",children:$l.map(Dl)})]}),t[2]=i):i=t[2],i}function Dl(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(W,{className:"size-5 rounded-full shrink-0"}),s.jsx(W,{className:z("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(Ol)})]},e)}function Ol(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(W,{className:"h-3 flex-1 rounded-sm"})},e)}function Pl(t,e){return s.jsx(W,{className:"size-10 rounded-lg mx-auto"},e)}function zl(){const t=C.c(2),{org:e}=B();let l;return t[0]!==e.id?(l=cs(e.id),t[0]=e.id,t[1]=l):l=t[1],l.id}function Al(t){const e=C.c(36);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:i}=l,o=A(),n=Y();let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[2]=a):a=e[2];const r=Te(a),{diagnostic:f,connectionId:c}=gs(),d=zl(),{threads:m}=wt(),{data:p}=ue.useSession(),{setTaskId:u,createNewTask:x}=kt(),b=!r.virtualmcpid||r.virtualmcpid===d;let h;e[3]!==x||e[4]!==d||e[5]!==n||e[6]!==i||e[7]!==b||e[8]!==p?.user?.id||e[9]!==u||e[10]!==m?(h=_=>{if(V("nav_destination_clicked",{destination:_}),i?.(),b){n({to:".",search:k=>({...k,main:_}),replace:!0});return}const N=$t(m,d,p?.user?.id);N?u(N.id,d,{main:_}):x(d,void 0,{main:_})},e[3]=x,e[4]=d,e[5]=n,e[6]=i,e[7]=b,e[8]=p?.user?.id,e[9]=u,e[10]=m,e[11]=h):h=e[11];const g=h,y=r.main===0||!r.main?b?"overview":null:r.main;let v;e[12]!==y||e[13]!==g?(v=(_,N,k)=>({key:_,label:N,icon:k,isActive:y===_,onSelect:()=>g(_)}),e[12]=y,e[13]=g,e[14]=v):v=e[14];const j=v;let S;if(e[15]!==j||e[16]!==o){let _;e[18]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(zs,{size:16}),e[18]=_):_=e[18],S=j("overview",o("sidebar.navDestinations.home"),_),e[15]=j,e[16]=o,e[17]=S}else S=e[17];let w;if(e[19]!==c||e[20]!==j||e[21]!==f||e[22]!==o||e[23]!==S){if(w=[S],f){let k;if(e[25]!==c||e[26]!==j||e[27]!==o){let $;e[29]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(As,{size:16}),e[29]=$):$=e[29],k=j(ut(c,pt),o("sidebar.navDestinations.reports"),$),e[25]=c,e[26]=j,e[27]=o,e[28]=k}else k=e[28];w.push(k)}let _,N;if(e[30]!==j||e[31]!==o){let k;e[34]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Is,{size:16}),e[34]=k):k=e[34],_=j("board",o("sidebar.navDestinations.tasks"),k);let $;e[35]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(Vs,{size:16}),e[35]=$):$=e[35],N=j("files",o("sidebar.navDestinations.library"),$),e[30]=j,e[31]=o,e[32]=_,e[33]=N}else _=e[32],N=e[33];w.push(_,N),e[19]=c,e[20]=j,e[21]=f,e[22]=o,e[23]=S,e[24]=w}else w=e[24];return w}function Il(t){const e=C.c(10);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:i}=l;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[2]=o):o=e[2];const n=Te(o),a=Ks()??[],{threads:r}=wt(),{data:f}=ue.useSession(),{setTaskId:c,createNewTask:d}=kt();let m;return e[3]!==d||e[4]!==i||e[5]!==n||e[6]!==f?.user?.id||e[7]!==c||e[8]!==r?(m=p=>{const u=Xs(p);return{key:p.id,label:u?.name||p.title,icon:s.jsx(_t,{size:16}),isActive:n.virtualmcpid===p.id,onSelect:()=>{V("nav_destination_clicked",{destination:"coding_agent"}),i?.();const x=$t(r,p.id,f?.user?.id);x?c(x.id,p.id):d(p.id)}}},e[3]=d,e[4]=i,e[5]=n,e[6]=f?.user?.id,e[7]=c,e[8]=r,e[9]=m):m=e[9],a.filter(El).map(m)}function El(t){return Ys(t.metadata)}function Tl(t){const e=C.c(18),{onNavigate:l}=t;let i;e[0]!==l?(i={onNavigate:l},e[0]=l,e[1]=i):i=e[1];const o=Al(i);let n;e[2]!==l?(n={onNavigate:l},e[2]=l,e[3]=n):n=e[3];const a=Il(n),{state:r,isMobile:f}=K(),c=r==="collapsed"&&!f;let d;e[4]!==c?(d=h=>s.jsx(T,{children:s.jsxs(E,{onClick:h.onSelect,isActive:h.isActive,tooltip:c?h.label:void 0,children:[h.icon,s.jsx("span",{className:"truncate",children:h.label})]})},h.key),e[4]=c,e[5]=d):d=e[5];const m=d;let p;e[6]!==o||e[7]!==m?(p=o.map(m),e[6]=o,e[7]=m,e[8]=p):p=e[8];let u;e[9]!==a.length?(u=a.length>0&&s.jsx("li",{"aria-hidden":!0,className:"h-2"}),e[9]=a.length,e[10]=u):u=e[10];let x;e[11]!==a||e[12]!==m?(x=a.map(m),e[11]=a,e[12]=m,e[13]=x):x=e[13];let b;return e[14]!==p||e[15]!==u||e[16]!==x?(b=s.jsxs(U,{className:"gap-1",children:[p,u,x]}),e[14]=p,e[15]=u,e[16]=x,e[17]=b):b=e[17],b}function Rl(t){const e=C.c(29);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:i}=l,o=A(),{org:n}=B(),{state:a,isMobile:r,toggleSidebar:f}=K(),c=a==="collapsed"&&!r;let d;e[2]!==i?(d=s.jsx(Tl,{onNavigate:i}),e[2]=i,e[3]=d):d=e[3];const m=d;if(c){let u;e[4]!==n?(u=s.jsx(gt,{org:n,size:"sm"}),e[4]=n,e[5]=u):u=e[5];let x;e[6]!==n.name||e[7]!==u?(x=s.jsx(E,{tooltip:n.name,children:u}),e[6]=n.name,e[7]=u,e[8]=x):x=e[8];let b;e[9]!==n.slug||e[10]!==x?(b=s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(bt,{orgParam:n.slug,side:"right",align:"start",trigger:x})}),e[9]=n.slug,e[10]=x,e[11]=b):b=e[11];let h;e[12]!==o?(h=o("sidebar.taskGroupsList.toggleSidebar"),e[12]=o,e[13]=h):h=e[13];let g;e[14]!==o?(g=o("sidebar.taskGroupsList.toggleSidebar"),e[14]=o,e[15]=g):g=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Be,{size:16}),e[16]=y):y=e[16];let v;e[17]!==h||e[18]!==g||e[19]!==f?(v=s.jsx(U,{className:"mt-2 gap-1.5",children:s.jsx(T,{children:s.jsx(E,{"aria-label":h,tooltip:g,onClick:f,children:y})})}),e[17]=h,e[18]=g,e[19]=f,e[20]=v):v=e[20];let j;e[21]!==m?(j=s.jsx("div",{className:"mt-1.5 min-h-0 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:m}),e[21]=m,e[22]=j):j=e[22];let S;return e[23]!==j||e[24]!==b||e[25]!==v?(S=s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[b,v,j]}),e[23]=j,e[24]=b,e[25]=v,e[26]=S):S=e[26],S}let p;return e[27]!==m?(p=s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:m})}),e[27]=m,e[28]=p):p=e[28],p}function Fl(){const t=C.c(3),e=Le();if(Ue()){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs(s.Fragment,{children:[s.jsx(ke,{showName:!0}),s.jsx(We,{className:"ml-auto md:size-[34px] rounded-lg"})]}),t[0]=o):o=t[0],o}if(e){let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ke,{showName:!0}),t[1]=o):o=t[1],o}let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(s.Fragment,{children:[s.jsx(ke,{}),s.jsx(Ge,{})]}),t[2]=i):i=t[2],i}function At(t){const e=C.c(4),{onNavigate:l}=t,i=Ue();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ml,{}),e[0]=o):o=e[0];let n;return e[1]!==i||e[2]!==l?(n=s.jsx(rt,{children:s.jsx(L.Suspense,{fallback:o,children:i?s.jsx(Rl,{onNavigate:l}):s.jsx(wl,{onNavigate:l})})}),e[1]=i,e[2]=l,e[3]=n):n=e[3],n}function Ll(){const t=C.c(5),e=Dt();let l,i,o;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Nl,{}),i=s.jsx(Fl,{}),o=s.jsx(At,{}),t[0]=l,t[1]=i,t[2]=o):(l=t[0],i=t[1],o=t[2]);let n;return t[3]!==e?(n=s.jsx(Mt,{children:s.jsx(zt,{sections:e,footer:l,header:i,additionalContent:o})}),t[3]=e,t[4]=n):n=t[4],n}function Ul(t){const e=C.c(7),{onClose:l}=t,i=Dt();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Cl,{}),e[0]=o):o=e[0];let n;e[1]!==l?(n=s.jsx(At,{onNavigate:l}),e[1]=l,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==i||e[5]!==n?(a=s.jsx(Mt,{children:s.jsx(pl,{sections:i,onClose:l,footer:o,additionalContent:n})}),e[3]=l,e[4]=i,e[5]=n,e[6]=a):a=e[6],a}const Gl="sidebar.open";function Bl(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ht,{}),t[0]=e):e=t[0],e}function an(){const t=C.c(37),e=ft(),l=Le(),i=Ue();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const{connect:n,siteUrl:a}=Te(o),r=n==="1",[f,c]=at(Gl,!1),{width:d,wrapperRef:m,onStartResize:p,resetWidth:u}=nl(),x=e;let b;t[1]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(We,{}),t[1]=b):b=t[1];let h;t[2]!==i||t[3]!==l?(h=!l&&!i&&s.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:s.jsx(Ge,{})}),t[2]=i,t[3]=l,t[4]=h):h=t[4];let g,y,v,j;t[5]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(me.TogglesSlot,{}),y=s.jsx(me.TabsSlot,{className:"shrink-0"}),v=s.jsx(me.CenterSlot,{}),j=s.jsx(me.RightSlot,{}),t[5]=g,t[6]=y,t[7]=v,t[8]=j):(g=t[5],y=t[6],v=t[7],j=t[8]);let S;t[9]!==h?(S=s.jsx(me.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[b,h,g,y,v,j]})}),t[9]=h,t[10]=S):S=t[10];const w=S;let _;t[11]===Symbol.for("react.memo_cache_sentinel")?(_={background:"transparent",containerType:"inline-size"},t[11]=_):_=t[11];let N;t[12]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Kt,{className:"flex flex-col min-h-0",style:_,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(L.Suspense,{fallback:s.jsx(Bl,{}),children:s.jsx(Bt,{})})})})}),t[12]=N):N=t[12];const k=N,$=x&&w,M=`${d}px`;let O;t[13]!==M?(O={"--sidebar-width":M,"--sidebar-width-icon":"3.125rem"},t[13]=M,t[14]=O):O=t[14];const I=O;let D;t[15]!==e||t[16]!==p||t[17]!==u?(D=!e&&s.jsxs(s.Fragment,{children:[s.jsx(Ll,{}),s.jsx(ll,{onPointerDown:p,onDoubleClick:u})]}),t[15]=e,t[16]=p,t[17]=u,t[18]=D):D=t[18];let P;t[19]!==I||t[20]!==D||t[21]!==m?(P=s.jsxs(Yt,{ref:m,className:"flex-1 bg-sidebar relative min-h-0",style:I,children:[D,k]}),t[19]=I,t[20]=D,t[21]=m,t[22]=P):P=t[22];let G;t[23]!==e?(G=e&&s.jsx(Ws,{renderSidebar:Hl}),t[23]=e,t[24]=G):G=t[24];let R;t[25]!==a||t[26]!==r?(R=r&&s.jsx(Js,{siteUrl:a}),t[25]=a,t[26]=r,t[27]=R):R=t[27];let F;t[28]!==$||t[29]!==P||t[30]!==G||t[31]!==R?(F=s.jsx(Qs,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[$,P,G,R]})}),t[28]=$,t[29]=P,t[30]=G,t[31]=R,t[32]=F):F=t[32];let H;return t[33]!==c||t[34]!==f||t[35]!==F?(H=s.jsx(qs,{children:s.jsx(me.Provider,{children:s.jsx(Xt,{open:f,onOpenChange:c,children:F})})}),t[33]=c,t[34]=f,t[35]=F,t[36]=H):H=t[36],H}function Hl(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(Ul,{onClose:e})})})}export{an as default};
1
+ import{c as C,d as Y,F as B,b as A,G as It,j as s,B as nt,r as L,E as rt,H as Et,x as Tt,K as Rt,e as Ye,p as V,I as at,m as z,a as ue,J as Ft,v as Lt,t as ct,M as Ut,P as Gt,u as Te,O as Bt,R as Ht}from"./index-z1Tz0Iwx.js";import{u as K,S as Re,a as Fe,b as U,c as E,d as T,e as mt,f as Wt,g as dt,h as Vt,i as Ae,j as Kt,k as Yt,l as Xt}from"./sidebar-B0yo2ePn.js";import{u as ft}from"./use-mobile-CykRB0tu.js";import{a as qt,p as ze,s as Qt,b as Jt,n as Zt}from"./self-tool-result-CuRYGHE3.js";import{f as es,b as ts,e as ss,g as ls}from"./dialog-6mdevW-b.js";import{f as ut,i as os,D as is}from"./tab-id-OdpcDweE.js";import{C as pt,W as xt,g as ns,u as rs,S as as,a as cs}from"./use-mcp-client-BEMVuBLT.js";import{i as ht}from"./XCircle-6ov_WsTa.js";import{u as ms,a as Le,b as Ue}from"./use-organization-settings-DDHANVKw.js";import{C as ds,a as fs,O as ke,A as Ge,u as us,b as ps,c as xs,d as bt,e as gt,T as hs,f as bs,g as gs}from"./use-commerce-diagnostic-C5hEjcNM.js";import{S as W}from"./skeleton-Dxh-38GB.js";import{i as Be}from"./LayoutLeft-DDEfqO5j.js";import{T as He,a as me}from"./toolbar-CmlWeOVi.js";import{P as js,a as vs,b as Ss}from"./popover-hOO23nku.js";import{D as ys,a as _s,b as Ns}from"./drawer-BJsaLtBW.js";import{A as Ie}from"./avatar-4HLIsMrD.js";import{T as jt,a as vt,b as St,c as yt}from"./tooltip-C1zn23N8.js";import{a as Cs}from"./Copy01-D-kdbZhl.js";import{n as ws,i as _t}from"./Globe01-BbE0QJ6P.js";import{t as ks,i as $s,a as Ms,b as Ds,c as Os,d as Nt,e as Xe,f as Ps,g as zs,h as As,n as Is}from"./agent-icon-C-uCizu6.js";import{n as Es}from"./LinkExternal01-CIYWL03C.js";import{i as qe}from"./LogOut01-BCkD2Zqw.js";import{i as Ts}from"./Monitor01-BKhy9Y3D.js";import{n as Rs,a as Fs}from"./Sun-UuA5GXqj.js";import{a as $e}from"./Settings02-BuHOHy6P.js";import{i as Ls}from"./Shield01-BXgSkd0M.js";import{a as Us}from"./Users03-DhgFLsWt.js";import{u as Gs}from"./use-deployment-admin-Cl8NRM1A.js";import{u as Bs}from"./use-is-desktop-app-BNujXJc_.js";import{a as Hs}from"./ZapSquare-DZVM8Dcz.js";import{I as Ct}from"./invite-member-dialog-BGZaPwNT.js";import{S as We,M as Ws}from"./shell-controls-CtuRwz3w.js";import{i as Vs}from"./Share07-DnhRmctQ.js";import{u as Ks}from"./use-virtual-mcp-Ch7j4pLP.js";import{a as Ys,g as Xs}from"./agent-capabilities-C4tLW0Za.js";import{u as wt,T as qs}from"./hooks-D9F3YMGm.js";import{u as kt}from"./shell-layout-DCsbzbJ_.js";import{f as $t}from"./reusable-new-chat-CouMjkYR.js";import{S as Mt}from"./use-navigate-to-agent-DOD2yCjT.js";import{C as Qs}from"./chat-context-DwnDMuNT.js";import"./X-DBeVjMqY.js";import"./alert-dialog-B15DE0RO.js";import"./form-DmFZHxbp.js";import"./label-Ddfb2KpZ.js";import"./input-DJ1TcPON.js";import"./spinner-Rxv3Lrut.js";import"./integration-icon--2jNJul0.js";import"./Tool02-Uezt8pP7.js";import"./extract-connection-data-ema7DWVc.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-C2HwF4Ce.js";import"./CheckCircle-D6Ca0HBb.js";import"./Check-C8T20Rfi.js";import"./Eye-BfuUNhkc.js";import"./use-debounced-value-BZW5sBhN.js";import"./authenticate-and-persist-oauth-Cc2Sdi17.js";import"./mcp-oauth-HkuxMYZ8.js";import"./auth-CV1zhX36.js";import"./track-MWP2zcvT.js";import"./studio-tools-BYZuG6rc.js";import"./ChevronRight-C8uCToRq.js";import"./ChevronDown-CK3YylTJ.js";import"./Plus-Ca4c8_Jk.js";import"./SearchMd-DFG6UfmN.js";import"./XClose-CUaIOdad.js";import"./github-repo-picker-Bh_L1bP_.js";import"./collection-search-l96-O1Ot.js";import"./use-connection-CfFnOCMK.js";import"./ArrowLeft-CPxxghrd.js";import"./use-mcp-tools-CvhpviZx.js";import"./connection-card-BJwbFF4x.js";import"./use-registry-connections-Cl1GGVoR.js";import"./useInfiniteQuery-DUGP976J.js";import"./use-infinite-scroll-Cahr21QY.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./connection-slug-eyAPH6o3.js";import"./card-BEg0hb-A.js";import"./select-D6vE0d7f.js";import"./ChevronUp-l37QboT4.js";import"./textarea-3Flx-UaB.js";import"./Star01-C1dxFrqZ.js";import"./connection-form-helpers-E5lmZK_D.js";import"./Trash01-Bi5esH6w.js";import"./collection-tabs-CICCV3dO.js";import"./badge-rhfdnLjV.js";import"./useSuspenseInfiniteQuery-DKnqlHqK.js";import"./use-ai-providers-CBZLIX6f.js";import"./FilterLines-C0onaXl7.js";import"./toggle-group-CznT1DBP.js";import"./command-qXbj-xHw.js";import"./index-DruUd288.js";import"./Zap-C94-JrJ4.js";import"./Stars02-CyQ8IuHL.js";import"./use-clock-tick-iY7xcsXX.js";import"./AlertCircle-BxoPdbFz.js";import"./DotsVertical-fUGBDguo.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-oV5xCCSW.js";import"./Tool01-DUFEW2_8.js";import"./ArrowUp-DNwmrUqU.js";import"./ArrowUpRight-HhKtLccN.js";import"./TrendUp01-DpLOOEdB.js";import"./CpuChip01-CjQ3ND7e.js";import"./CreditCard01-Dc3Ty-VI.js";import"./Globe04-DcUvfOo1.js";import"./SwitchHorizontal01-BwnHuSrD.js";import"./HardDrive-B3Xc8obQ.js";import"./Key01-DV39al-i.js";import"./Palette-C5qTLhMQ.js";import"./Play-Dzjel9-m.js";import"./SearchLg-D_pIaKJg.js";import"./Stars01-ROC3UwK7.js";import"./Upload01-BX9G1g5Z.js";import"./Users01-D3uVeaNX.js";import"./use-org-auth-client-DBbREaTX.js";import"./use-organization-roles-C-4eBRnd.js";import"./decopilot-sse-pool-DIiI-cw8.js";import"./required-auth-layout-C8o-NfIh.js";import"./use-org-sso-DyY2B-d-.js";import"./use-decopilot-events-CJ1roHR_.js";function Js(t){const e=C.c(22),{siteUrl:l}=t,i=Y(),{org:o}=B(),n=A();let a;e[0]!==i||e[1]!==o.id||e[2]!==o.slug?(a=()=>{localStorage.setItem(It.sidebarOpen(),JSON.stringify(!1)),i({to:"/$org/$taskId",params:{org:o.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:ns(o.id),main:ut(xt.COMMERCE_DISCOVERY(o.id),pt),sidepanel:0}})},e[0]=i,e[1]=o.id,e[2]=o.slug,e[3]=a):a=e[3];const r=a;let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(es,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=f):f=e[4];let c;e[5]!==n?(c=n("routes.commerceOnboarding.connectModal.dialogTitle"),e[5]=n,e[6]=c):c=e[6];let d;e[7]!==c?(d=s.jsx(ts,{className:"sr-only",children:c}),e[7]=c,e[8]=d):d=e[8];let m;e[9]!==r||e[10]!==n?(m=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:n("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(nt,{type:"button",size:"xl",className:"w-full",onClick:r,children:[n("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(ht,{size:18})]})]}),e[9]=r,e[10]=n,e[11]=m):m=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(qt,{}),e[12]=p):p=e[12];let u;e[13]!==r||e[14]!==l?(u=s.jsx(L.Suspense,{fallback:p,children:s.jsx(sl,{siteUrlFromUrl:l,onComplete:r})}),e[13]=r,e[14]=l,e[15]=u):u=e[15];let x;e[16]!==m||e[17]!==u?(x=s.jsx(rt,{fallback:m,children:u}),e[16]=m,e[17]=u,e[18]=x):x=e[18];let b;return e[19]!==d||e[20]!==x?(b=s.jsx(ss,{open:!0,children:s.jsxs(ls,{children:[f,s.jsxs(Et,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:tl,onPointerDownOutside:el,onInteractOutside:Zs,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[d,x]})]})}),e[19]=d,e[20]=x,e[21]=b):b=e[21],b}function Zs(t){return t.preventDefault()}function el(t){return t.preventDefault()}function tl(t){return t.preventDefault()}function sl({siteUrlFromUrl:t,onComplete:e}){const l=A(),{org:i}=B(),o=xt.COMMERCE_DISCOVERY(i.id),n=rs({connectionId:as,orgId:i.id,orgSlug:i.slug}),r=Tt({queryKey:Rt.commerceDiscoveryConnection(i.id,o),queryFn:async()=>{const j=await n.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:o}});return ze(j)},retry:!1}).data.item,f=typeof r?.metadata?.siteUrl=="string"?r.metadata.siteUrl:void 0,c=t||f,d=Qt(c),[m,p]=L.useState(!0),[u,x]=L.useState(null),b=Ye({mutationFn:async j=>ze(await n.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:j}})),retry:!1}),h=Ye({mutationFn:async j=>ze(await n.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:j}})),retry:!1}),g=async()=>{x(null),V("commerce_onboarding_open_report_clicked",{domain:d??void 0,organization_id:i.id});const j=c?Zt(c):null;if(j?.ok)try{let S=await h.mutateAsync(j.value);if(S.triggered||(V("commerce_onboarding_run_reclaim",{domain:d??void 0,organization_id:i.id,reason:S.reason??"not_upgraded"}),await b.mutateAsync(j.value),S=await h.mutateAsync(j.value)),!S.triggered){V("commerce_onboarding_run_failed",{domain:d??void 0,organization_id:i.id,error:S.reason??"not_triggered"}),x(l("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(S){V("commerce_onboarding_run_failed",{domain:d??void 0,organization_id:i.id,error:S instanceof Error?S.message:String(S)}),x(l("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()},y=ms("demo_mode"),v=m||y;return s.jsx(ds,{siteHost:d,footer:s.jsxs(s.Fragment,{children:[u?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:u}):null,s.jsxs("div",{className:"flex gap-3",children:[s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx(fs,{ready:v,pending:h.isPending,label:h.isPending?l("routes.commerceOnboarding.connectModal.openingReport"):l("routes.commerceOnboarding.connectModal.viewDiagnostic"),onClick:()=>{g()},children:s.jsx(ht,{size:18})})}),v?null:s.jsx(nt,{type:"button",variant:"secondary",size:"lg",className:"h-auto min-h-12 shrink-0 rounded-lg py-3 text-base font-medium leading-tight",disabled:h.isPending,onClick:()=>{g()},children:l("routes.commerceOnboarding.connectModal.skip")})]})]}),children:s.jsx(Jt,{org:i,cdConnectionId:o,siteUrl:c,onReadinessChange:p})})}function ll(t){const e=C.c(11),{onPointerDown:l,onDoubleClick:i}=t,o=A(),{state:n,isMobile:a}=K();if(a||n==="collapsed")return null;let r;e[0]!==o?(r=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=r):r=e[1];let f;e[2]!==o?(f=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=f):f=e[3];let c,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},d=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=d):(c=e[4],d=e[5]);let m;return e[6]!==i||e[7]!==l||e[8]!==r||e[9]!==f?(m=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":r,title:f,onPointerDown:l,onDoubleClick:i,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:d}),e[6]=i,e[7]=l,e[8]=r,e[9]=f,e[10]=m):m=e[10],m}const Ve=240,ol=400,il="sidebar.width";function fe(t){return Math.max(Ve,Math.min(ol,t))}function nl(){const t=C.c(11),[e,l]=at(il,rl),i=L.useRef(null);let o;t[0]!==l||t[1]!==e?(o=d=>{d.preventDefault();const m=d.clientX,p=fe(e),u=i.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=u?Array.from(u.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of x)g.style.transition="none";const b=g=>{const y=fe(p+(g.clientX-m));u?.style.setProperty("--sidebar-width",`${y}px`)},h=g=>{const y=fe(p+(g.clientX-m));l(y);for(const v of x)v.style.transition="";window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",h),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",b),window.addEventListener("pointerup",h)},t[0]=l,t[1]=e,t[2]=o):o=t[2];const n=o;let a;t[3]!==l?(a=()=>{l(Ve)},t[3]=l,t[4]=a):a=t[4];const r=a;let f;t[5]!==e?(f=fe(e),t[5]=e,t[6]=f):f=t[6];let c;return t[7]!==n||t[8]!==r||t[9]!==f?(c={width:f,wrapperRef:i,onStartResize:n,resetWidth:r},t[7]=n,t[8]=r,t[9]=f,t[10]=c):c=t[10],c}function rl(t){return typeof t=="number"?fe(t):Ve}function Dt(){return[]}function Ot(t){const e=C.c(3),{children:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=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]=i):i=e[0];let o;return e[1]!==l?(o=s.jsxs(Re,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[i,s.jsx(Fe,{children:s.jsx(U,{className:"gap-0.5",children:l})})]}),e[1]=l,e[2]=o):o=e[2],o}function Pt(t){const e=C.c(18),{item:l}=t,{isMobile:i,setOpenMobile:o}=K();let n;e[0]!==i||e[1]!==l||e[2]!==o?(n=()=>{V("nav_item_clicked",{nav_key:l.key,nav_label:l.label,is_active:!!l.isActive,is_mobile:i}),l.onClick?.(),i&&o(!1)},e[0]=i,e[1]=l,e[2]=o,e[3]=n):n=e[3];const a=n,r=l.key,f=l.isActive&&"z-10";let c;e[4]!==f?(c=z(f),e[4]=f,e[5]=c):c=e[5];let d;e[6]!==l.label?(d=s.jsx("span",{children:l.label}),e[6]=l.label,e[7]=d):d=e[7];let m;e[8]!==a||e[9]!==l.icon||e[10]!==l.isActive||e[11]!==l.label||e[12]!==d?(m=s.jsxs(E,{onClick:a,isActive:l.isActive,tooltip:l.label,children:[l.icon,d]}),e[8]=a,e[9]=l.icon,e[10]=l.isActive,e[11]=l.label,e[12]=d,e[13]=m):m=e[13];let p;return e[14]!==l.key||e[15]!==c||e[16]!==m?(p=s.jsx(T,{className:c,children:m},r),e[14]=l.key,e[15]=c,e[16]=m,e[17]=p):p=e[17],p}function al(t){const e=C.c(12),{section:l}=t;switch(l.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(mt,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=l.group.label,o=l.group.defaultExpanded;let n;e[2]!==l.group.items?(n=l.group.items.map(ml),e[2]=l.group.items,e[3]=n):n=e[3];let a;return e[4]!==l.group.defaultExpanded||e[5]!==l.group.label||e[6]!==n?(a=s.jsx(Ot,{label:i,defaultExpanded:o,children:n}),e[4]=l.group.defaultExpanded,e[5]=l.group.label,e[6]=n,e[7]=a):a=e[7],a}case"items":{let i;e[8]!==l.items?(i=l.items.map(cl),e[8]=l.items,e[9]=i):i=e[9];let o;return e[10]!==i?(o=s.jsx(Re,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Fe,{children:s.jsx(U,{className:"gap-1.5",children:i})})}),e[10]=i,e[11]=o):o=e[11],o}case"custom":return l.content}}function cl(t){return s.jsx(Pt,{item:t},t.key)}function ml(t){return s.jsx(Pt,{item:t},t.key)}function dl(t){const e=C.c(17),{sections:l,footer:i,additionalContent:o,header:n,variant:a,contentClassName:r}=t,f=a===void 0?"sidebar":a;let c;e[0]!==n?(c=n&&s.jsx(Wt,{className:"shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:n}),e[0]=n,e[1]=c):c=e[1];let d;e[2]!==r?(d=z("flex flex-col flex-1 px-2 pb-2 gap-0.5",r),e[2]=r,e[3]=d):d=e[3];let m;e[4]!==l?(m=l.map(fl),e[4]=l,e[5]=m):m=e[5];let p;e[6]!==o?(p=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[6]=o,e[7]=p):p=e[7];let u;e[8]!==d||e[9]!==m||e[10]!==p?(u=s.jsxs(dt,{className:d,children:[m,p]}),e[8]=d,e[9]=m,e[10]=p,e[11]=u):u=e[11];let x;return e[12]!==i||e[13]!==c||e[14]!==u||e[15]!==f?(x=s.jsxs(Vt,{variant:f,children:[c,u,i]}),e[12]=i,e[13]=c,e[14]=u,e[15]=f,e[16]=x):x=e[16],x}function fl(t,e){return s.jsx(al,{section:t},e)}function zt(t){const e=C.c(2);let l;return e[0]!==t?(l=s.jsx(dl,{...t}),e[0]=t,e[1]=l):l=e[1],l}zt.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,l)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(W,{className:"h-full bg-sidebar-accent rounded-md"})},l))})};function Qe(t){const e=C.c(18),{item:l,onClose:i}=t,o=l.isActive&&"z-10";let n;e[0]!==o?(n=z(o),e[0]=o,e[1]=n):n=e[1];let a;e[2]!==l||e[3]!==i?(a=()=>{l.onClick?.(),i()},e[2]=l,e[3]=i,e[4]=a):a=e[4];let r;e[5]!==l.icon?(r=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:l.icon}),e[5]=l.icon,e[6]=r):r=e[6];let f;e[7]!==l.label?(f=s.jsx("span",{children:l.label}),e[7]=l.label,e[8]=f):f=e[8];let c;e[9]!==l.isActive||e[10]!==l.label||e[11]!==a||e[12]!==r||e[13]!==f?(c=s.jsxs(E,{onClick:a,isActive:l.isActive,tooltip:l.label,className:"h-10! text-sm!",children:[r,f]}),e[9]=l.isActive,e[10]=l.label,e[11]=a,e[12]=r,e[13]=f,e[14]=c):c=e[14];let d;return e[15]!==n||e[16]!==c?(d=s.jsx(T,{className:n,children:c}),e[15]=n,e[16]=c,e[17]=d):d=e[17],d}function ul(t){const e=C.c(18),{section:l,onClose:i}=t;switch(l.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(mt,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=l.group.label,n=l.group.defaultExpanded;let a;if(e[2]!==i||e[3]!==l.group.items){let f;e[5]!==i?(f=c=>s.jsx(Qe,{item:c,onClose:i},c.key),e[5]=i,e[6]=f):f=e[6],a=l.group.items.map(f),e[2]=i,e[3]=l.group.items,e[4]=a}else a=e[4];let r;return e[7]!==l.group.defaultExpanded||e[8]!==l.group.label||e[9]!==a?(r=s.jsx(Ot,{label:o,defaultExpanded:n,children:a}),e[7]=l.group.defaultExpanded,e[8]=l.group.label,e[9]=a,e[10]=r):r=e[10],r}case"items":{let o;if(e[11]!==i||e[12]!==l.items){let a;e[14]!==i?(a=r=>s.jsx(Qe,{item:r,onClose:i},r.key),e[14]=i,e[15]=a):a=e[15],o=l.items.map(a),e[11]=i,e[12]=l.items,e[13]=o}else o=e[13];let n;return e[16]!==o?(n=s.jsx(Re,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Fe,{children:s.jsx(U,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=n):n=e[17],n}case"custom":return l.content}}function pl(t){const e=C.c(27),{sections:l,onClose:i,footer:o,additionalContent:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(ke,{}),e[0]=a):a=e[0];let r;e[1]!==i?(r=s.jsx(Ge,{onNavigate:i}),e[1]=i,e[2]=r):r=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"flex-1"}),e[3]=f):f=e[3];const c=A();let d;e[4]!==c?(d=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=d):d=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Be,{size:16}),e[6]=m):m=e[6];let p;e[7]!==i||e[8]!==d?(p=s.jsx(He,{onClick:i,"aria-label":d,children:m}),e[7]=i,e[8]=d,e[9]=p):p=e[9];let u;e[10]!==r||e[11]!==p?(u=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[a,r,f,p]}),e[10]=r,e[11]=p,e[12]=u):u=e[12];let x;if(e[13]!==i||e[14]!==l){let y;e[16]!==i?(y=(v,j)=>s.jsx(ul,{section:v,onClose:i},j),e[16]=i,e[17]=y):y=e[17],x=l.map(y),e[13]=i,e[14]=l,e[15]=x}else x=e[15];let b;e[18]!==n?(b=n&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:n}),e[18]=n,e[19]=b):b=e[19];let h;e[20]!==b||e[21]!==x?(h=s.jsxs(dt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[x,b]}),e[20]=b,e[21]=x,e[22]=h):h=e[22];let g;return e[23]!==o||e[24]!==h||e[25]!==u?(g=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[u,h,o]}),e[23]=o,e[24]=h,e[25]=u,e[26]=g):g=e[26],g}function de(t){const e=C.c(26),{item:l,onClose:i}=t;let o;e[0]!==l.className?(o=z("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",l.className),e[0]=l.className,e[1]=o):o=e[1];const n=o;if(l.href){const d=l.external?"_blank":void 0,m=l.external?"noopener noreferrer":void 0;let p;e[2]!==l.icon?(p=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.icon}),e[2]=l.icon,e[3]=p):p=e[3];let u;e[4]!==l.label?(u=s.jsx("span",{className:"flex-1",children:l.label}),e[4]=l.label,e[5]=u):u=e[5];let x;return e[6]!==n||e[7]!==l.href||e[8]!==i||e[9]!==d||e[10]!==m||e[11]!==p||e[12]!==u?(x=s.jsxs("a",{href:l.href,target:d,rel:m,className:n,onClick:i,children:[p,u]}),e[6]=n,e[7]=l.href,e[8]=i,e[9]=d,e[10]=m,e[11]=p,e[12]=u,e[13]=x):x=e[13],x}let a;e[14]!==l||e[15]!==i?(a=()=>{l.onClick?.(),i()},e[14]=l,e[15]=i,e[16]=a):a=e[16];let r;e[17]!==l.icon?(r=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:l.icon}),e[17]=l.icon,e[18]=r):r=e[18];let f;e[19]!==l.label?(f=s.jsx("span",{className:"flex-1",children:l.label}),e[19]=l.label,e[20]=f):f=e[20];let c;return e[21]!==n||e[22]!==a||e[23]!==r||e[24]!==f?(c=s.jsxs("button",{type:"button",onClick:a,className:n,children:[r,f]}),e[21]=n,e[22]=a,e[23]=r,e[24]=f,e[25]=c):c=e[25],c}function xl(){const t=C.c(4),e=A();let l;t[0]!==e?(l=e("common.accountPopover.impersonating"),t[0]=e,t[1]=l):l=t[1];let i;return t[2]!==l?(i=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:l}),t[2]=l,t[3]=i):i=t[3],i}function Je(t){const e=C.c(38),{user:l,userImage:i,isImpersonating:o,isMobile:n}=t,a=A(),r=n?"py-4 border-b border-border":"py-3 mx-1 mt-1";let f;e[0]!==r?(f=z("flex items-center gap-3 px-4",r),e[0]=r,e[1]=f):f=e[1];const c=l?.name??"U";let d;e[2]!==c||e[3]!==i?(d=s.jsx(Ie,{url:i,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=i,e[4]=d):d=e[4];let m;e[5]!==a||e[6]!==l?.name?(m=l?.name??a("common.accountPopover.defaultUserName"),e[5]=a,e[6]=l?.name,e[7]=m):m=e[7];let p;e[8]!==m?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=p):p=e[9];let u;e[10]!==o?(u=o&&s.jsx(xl,{}),e[10]=o,e[11]=u):u=e[11];let x;e[12]!==p||e[13]!==u?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[p,u]}),e[12]=p,e[13]=u,e[14]=x):x=e[14];const b=l?.email;let h;e[15]!==b?(h=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b}),e[15]=b,e[16]=h):h=e[16];let g;e[17]!==h||e[18]!==x?(g=s.jsxs("div",{className:"flex-1 min-w-0",children:[x,h]}),e[17]=h,e[18]=x,e[19]=g):g=e[19];let y;e[20]!==a||e[21]!==l?(y=()=>{l?.id&&navigator.clipboard.writeText(l.id).then(()=>{ct.success(a("common.accountPopover.userIdCopied"))})},e[20]=a,e[21]=l,e[22]=y):y=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Cs,{size:14}),e[23]=v):v=e[23];let j;e[24]!==y?(j=s.jsx(jt,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:y,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:v})}),e[24]=y,e[25]=j):j=e[25];let S;e[26]!==a?(S=a("common.accountPopover.copyUserId"),e[26]=a,e[27]=S):S=e[27];let w;e[28]!==S?(w=s.jsx(vt,{side:"right",children:s.jsx("p",{className:"text-xs",children:S})}),e[28]=S,e[29]=w):w=e[29];let _;e[30]!==j||e[31]!==w?(_=s.jsx(St,{delayDuration:300,children:s.jsxs(yt,{children:[j,w]})}),e[30]=j,e[31]=w,e[32]=_):_=e[32];let N;return e[33]!==g||e[34]!==_||e[35]!==f||e[36]!==d?(N=s.jsxs("div",{className:f,children:[d,g,_]}),e[33]=g,e[34]=_,e[35]=f,e[36]=d,e[37]=N):N=e[37],N}function Ze(t){const e=C.c(35),{themeOptions:l,preferences:i,setPreferences:o,isMobile:n}=t,a=A(),r=n?"size-8":"size-7",f=n?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==f?(c=z("flex items-center justify-between border-t border-border/50",f),e[0]=f,e[1]=c):c=e[1];let d;if(e[2]!==r||e[3]!==i.theme||e[4]!==o||e[5]!==l){let S;e[7]!==r||e[8]!==i.theme||e[9]!==o?(S=w=>{const{value:_,icon:N,label:k}=w;return s.jsx("button",{type:"button","aria-label":k,onClick:()=>o($=>({...$,theme:_})),className:z(r,"rounded-md flex items-center justify-center transition-colors",i.theme===_?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:N},_)},e[7]=r,e[8]=i.theme,e[9]=o,e[10]=S):S=e[10],d=l.map(S),e[2]=r,e[3]=i.theme,e[4]=o,e[5]=l,e[6]=d}else d=e[6];let m;e[11]!==d?(m=s.jsx("div",{className:"flex items-center gap-0.5",children:d}),e[11]=d,e[12]=m):m=e[12];let p;e[13]!==i.enableSounds||e[14]!==a?(p=i.enableSounds?a("common.accountPopover.disableSounds"):a("common.accountPopover.enableSounds"),e[13]=i.enableSounds,e[14]=a,e[15]=p):p=e[15];let u;e[16]!==o?(u=()=>o(hl),e[16]=o,e[17]=u):u=e[17];const x=i.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let b;e[18]!==r||e[19]!==x?(b=z(r,"rounded-md flex items-center justify-center transition-colors",x),e[18]=r,e[19]=x,e[20]=b):b=e[20];let h;e[21]!==i.enableSounds?(h=i.enableSounds?s.jsx(Ms,{size:14}):s.jsx(Ds,{size:14}),e[21]=i.enableSounds,e[22]=h):h=e[22];let g;e[23]!==p||e[24]!==u||e[25]!==b||e[26]!==h?(g=s.jsx("button",{type:"button","aria-label":p,onClick:u,className:b,children:h}),e[23]=p,e[24]=u,e[25]=b,e[26]=h,e[27]=g):g=e[27];let y;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.227.4"]}),e[28]=y):y=e[28];let v;e[29]!==g?(v=s.jsxs("div",{className:"flex items-center gap-2",children:[g,y]}),e[29]=g,e[30]=v):v=e[30];let j;return e[31]!==v||e[32]!==c||e[33]!==m?(j=s.jsxs("div",{className:c,children:[m,v]}),e[31]=v,e[32]=c,e[33]=m,e[34]=j):j=e[34],j}function hl(t){return{...t,enableSounds:!t.enableSounds}}function et(t){const e=C.c(54),{user:l,userImage:i,menuItems:o,signOutItem:n,stopImpersonatingItem:a,isImpersonating:r,themeOptions:f,preferences:c,setPreferences:d,close:m,isMobile:p}=t;if(p){let j;e[0]!==r||e[1]!==l||e[2]!==i?(j=s.jsx(Je,{user:l,userImage:i,isImpersonating:r,isMobile:!0}),e[0]=r,e[1]=l,e[2]=i,e[3]=j):j=e[3];let S;if(e[4]!==m||e[5]!==o){let M;e[7]!==m?(M=O=>s.jsx(de,{item:O,onClose:m},O.key),e[7]=m,e[8]=M):M=e[8],S=o.map(M),e[4]=m,e[5]=o,e[6]=S}else S=e[6];let w;e[9]!==m||e[10]!==a?(w=a&&s.jsx(de,{item:a,onClose:m}),e[9]=m,e[10]=a,e[11]=w):w=e[11];let _;e[12]!==m||e[13]!==n?(_=s.jsx(de,{item:n,onClose:m}),e[12]=m,e[13]=n,e[14]=_):_=e[14];let N;e[15]!==S||e[16]!==w||e[17]!==_?(N=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[S,w,_]})}),e[15]=S,e[16]=w,e[17]=_,e[18]=N):N=e[18];let k;e[19]!==c||e[20]!==d||e[21]!==f?(k=s.jsx(Ze,{themeOptions:f,preferences:c,setPreferences:d,isMobile:!0}),e[19]=c,e[20]=d,e[21]=f,e[22]=k):k=e[22];let $;return e[23]!==j||e[24]!==N||e[25]!==k?($=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[j,N,k]}),e[23]=j,e[24]=N,e[25]=k,e[26]=$):$=e[26],$}let u;e[27]!==r||e[28]!==l||e[29]!==i?(u=s.jsx(Je,{user:l,userImage:i,isImpersonating:r,isMobile:!1}),e[27]=r,e[28]=l,e[29]=i,e[30]=u):u=e[30];let x;if(e[31]!==m||e[32]!==o){let j;e[34]!==m?(j=S=>s.jsx(de,{item:S,onClose:m},S.key),e[34]=m,e[35]=j):j=e[35],x=o.map(j),e[31]=m,e[32]=o,e[33]=x}else x=e[33];let b;e[36]!==m||e[37]!==a?(b=a&&s.jsx(de,{item:a,onClose:m}),e[36]=m,e[37]=a,e[38]=b):b=e[38];let h;e[39]!==m||e[40]!==n?(h=s.jsx(de,{item:n,onClose:m}),e[39]=m,e[40]=n,e[41]=h):h=e[41];let g;e[42]!==x||e[43]!==b||e[44]!==h?(g=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,b,h]}),e[42]=x,e[43]=b,e[44]=h,e[45]=g):g=e[45];let y;e[46]!==c||e[47]!==d||e[48]!==f?(y=s.jsx(Ze,{themeOptions:f,preferences:c,setPreferences:d,isMobile:!1}),e[46]=c,e[47]=d,e[48]=f,e[49]=y):y=e[49];let v;return e[50]!==u||e[51]!==g||e[52]!==y?(v=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[u,g,y]})}),e[50]=u,e[51]=g,e[52]=y,e[53]=v):v=e[53],v}function Ee(){const t=C.c(107),e=A(),{data:l}=ue.useSession(),{org:i}=B(),o=Y();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org",shouldThrow:!1},t[0]=n):n=t[0];const r=Ft(n)?.params.org,[f,c]=Lt(),d=ft(),{isAdmin:m}=Gs(),p=Bs(),[u,x]=L.useState(!1),[b,h]=L.useState(!1),g=l?.user,y=g?.image,v=!!l?.session?.impersonatedBy;let j;t[1]===Symbol.for("react.memo_cache_sentinel")?(j=()=>x(!1),t[1]=j):j=t[1];const S=j;let w;t[2]!==e?(w=e("common.accountPopover.preferences"),t[2]=e,t[3]=w):w=t[3];let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx($e,{size:16}),t[4]=_):_=t[4];let N;t[5]!==o||t[6]!==r?(N=()=>{o({to:"/$org/settings/profile",params:{org:r??""}})},t[5]=o,t[6]=r,t[7]=N):N=t[7];let k;t[8]!==w||t[9]!==N?(k={key:"preferences",label:w,icon:_,onClick:N},t[8]=w,t[9]=N,t[10]=k):k=t[10];let $;t[11]!==i||t[12]!==o?($=i?[{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(Es,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:i.slug}})}}]:[],t[11]=i,t[12]=o,t[13]=$):$=t[13];let M;t[14]!==p||t[15]!==e?(M=os()&&!p?[{key:"install-on-mac",label:e("downloadApp.installOnMac"),icon:s.jsx(ws,{size:16}),onClick:()=>h(!0)}]:[],t[14]=p,t[15]=e,t[16]=M):M=t[16];let O;t[17]!==e?(O=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=O):O=t[18];let I;t[19]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx($s,{size:16}),t[19]=I):I=t[19];let D;t[20]!==O?(D={key:"terms",label:O,icon:I,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=O,t[21]=D):D=t[21];let P;t[22]!==e?(P=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=P):P=t[23];let G;t[24]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(Ls,{size:16}),t[24]=G):G=t[24];let R;t[25]!==P?(R={key:"privacy",label:P,icon:G,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=P,t[26]=R):R=t[26];let F;t[27]!==e?(F=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=F):F=t[28];let H;t[29]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Ut,{className:"w-4 h-4"}),t[29]=H):H=t[29];let X;t[30]!==F?(X={key:"github",label:F,icon:H,href:"https://github.com/decocms/studio",external:!0},t[30]=F,t[31]=X):X=t[31];let q;t[32]!==e?(q=e("common.accountPopover.community"),t[32]=e,t[33]=q):q=t[33];let pe;t[34]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(Us,{size:16}),t[34]=pe):pe=t[34];let Q;t[35]!==q?(Q={key:"community",label:q,icon:pe,href:"https://decocms.com/discord",external:!0},t[35]=q,t[36]=Q):Q=t[36];let J;t[37]!==e?(J=e("common.accountPopover.homepage"),t[37]=e,t[38]=J):J=t[38];let xe;t[39]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx(_t,{size:16}),t[39]=xe):xe=t[39];let Z;t[40]!==J?(Z={key:"homepage",label:J,icon:xe,href:"https://decocms.com",external:!0},t[40]=J,t[41]=Z):Z=t[41];let ee;t[42]!==m||t[43]!==o||t[44]!==e?(ee=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(ks,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=m,t[43]=o,t[44]=e,t[45]=ee):ee=t[45];let he;t[46]!==D||t[47]!==R||t[48]!==X||t[49]!==Q||t[50]!==Z||t[51]!==ee||t[52]!==k||t[53]!==$||t[54]!==M?(he=[k,...$,...M,D,R,X,Q,Z,...ee],t[46]=D,t[47]=R,t[48]=X,t[49]=Q,t[50]=Z,t[51]=ee,t[52]=k,t[53]=$,t[54]=M,t[55]=he):he=t[55];const Me=he;let te;t[56]!==e?(te=e("common.accountPopover.signOut"),t[56]=e,t[57]=te):te=t[57];let be;t[58]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(qe,{size:16}),t[58]=be):be=t[58];let ge;t[59]!==te?(ge={key:"logout",label:te,icon:be,onClick:gl},t[59]=te,t[60]=ge):ge=t[60];const De=ge;let je;t[61]!==v||t[62]!==e?(je=v?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(qe,{size:16}),onClick:async()=>{const{error:Ke}=await ue.admin.stopImpersonating();if(Ke){ct.error(Ke.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=v,t[62]=e,t[63]=je):je=t[63];const Oe=je;let ve;t[64]===Symbol.for("react.memo_cache_sentinel")?(ve=s.jsx(Rs,{size:14}),t[64]=ve):ve=t[64];let se;t[65]!==e?(se=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=se):se=t[66];let le;t[67]!==se?(le={value:"light",icon:ve,label:se},t[67]=se,t[68]=le):le=t[68];let Se;t[69]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx(Fs,{size:14}),t[69]=Se):Se=t[69];let oe;t[70]!==e?(oe=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=oe):oe=t[71];let ie;t[72]!==oe?(ie={value:"dark",icon:Se,label:oe},t[72]=oe,t[73]=ie):ie=t[73];let ye;t[74]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Ts,{size:14}),t[74]=ye):ye=t[74];let ne;t[75]!==e?(ne=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=ne):ne=t[76];let re;t[77]!==ne?(re={value:"system",icon:ye,label:ne},t[77]=ne,t[78]=re):re=t[78];let _e;t[79]!==le||t[80]!==ie||t[81]!==re?(_e=[le,ie,re],t[79]=le,t[80]=ie,t[81]=re,t[82]=_e):_e=t[82];const Pe=_e;let Ne;t[83]!==v||t[84]!==d||t[85]!==Me||t[86]!==f||t[87]!==c||t[88]!==De||t[89]!==Oe||t[90]!==Pe||t[91]!==g||t[92]!==y?(Ne={user:g,userImage:y,menuItems:Me,signOutItem:De,stopImpersonatingItem:Oe,isImpersonating:v,themeOptions:Pe,preferences:f,setPreferences:c,close:S,isMobile:d},t[83]=v,t[84]=d,t[85]=Me,t[86]=f,t[87]=c,t[88]=De,t[89]=Oe,t[90]=Pe,t[91]=g,t[92]=y,t[93]=Ne):Ne=t[93];const Ce=Ne;let ae;t[94]!==v||t[95]!==d||t[96]!==u||t[97]!==Ce||t[98]!==e||t[99]!==g?.name||t[100]!==y?(ae=d?s.jsxs(ys,{open:u,onOpenChange:x,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>x(!0),className:z("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",v&&"border-2 border-dashed border-warning"),children:[s.jsx(Ie,{url:y,fallback:g?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:g?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(_s,{className:"h-[80dvh] p-0",children:[s.jsx(Ns,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx(et,{...Ce})]})]}):s.jsxs(js,{open:u,onOpenChange:x,children:[s.jsx(vs,{asChild:!0,children:s.jsxs(E,{tooltip:g?.name??e("common.accountPopover.defaultAccountLabel"),className:z("rounded-md",v&&"border-2 border-dashed border-warning"),children:[s.jsx(Ie,{url:y,fallback:g?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:g?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(Ss,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:bl,children:s.jsx(et,{...Ce})})]}),t[94]=v,t[95]=d,t[96]=u,t[97]=Ce,t[98]=e,t[99]=g?.name,t[100]=y,t[101]=ae):ae=t[101];let ce;t[102]!==b?(ce=s.jsx(is,{open:b,onOpenChange:h}),t[102]=b,t[103]=ce):ce=t[103];let we;return t[104]!==ae||t[105]!==ce?(we=s.jsxs(s.Fragment,{children:[ae,ce]}),t[104]=ae,t[105]=ce,t[106]=we):we=t[106],we}function bl(t){return t.preventDefault()}function gl(){V("signed_out",{source:"account_popover"}),Gt(),ue.signOut()}class jl extends L.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,l){}render(){return this.state.hasError?null:this.props.children}}function vl(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Sl(){const t=C.c(17),e=Y(),{org:l}=B(),{hasDecoKey:i,balanceDollars:o}=us();if(!i)return null;let n;t[0]!==o?(n=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=n):n=t[1];let a;t[2]!==o?(a=z(o!=null&&vl(o)),t[2]=o,t[3]=a):a=t[3];let r;t[4]!==e||t[5]!==l.slug?(r=()=>e({to:"/$org/settings/ai-providers",params:{org:l.slug}}),t[4]=e,t[5]=l.slug,t[6]=r):r=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Os,{}),t[7]=f):f=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let d;t[10]!==c?(d=s.jsx("span",{children:c}),t[10]=c,t[11]=d):d=t[11];let m;return t[12]!==n||t[13]!==a||t[14]!==r||t[15]!==d?(m=s.jsx(U,{children:s.jsx(T,{children:s.jsxs(E,{tooltip:n,className:a,onClick:r,children:[f,d]})})}),t[12]=n,t[13]=a,t[14]=r,t[15]=d,t[16]=m):m=t[16],m}function tt(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(jl,{children:s.jsx(L.Suspense,{fallback:null,children:s.jsx(Sl,{})})}),t[0]=e):e=t[0],e}function yl(){const t=C.c(14),e=A(),l=Y(),{org:i}=B();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==l||t[3]!==i.slug?(n=()=>l({to:"/$org/settings",params:{org:i.slug}}),t[2]=l,t[3]=i.slug,t[4]=n):n=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx($e,{}),t[5]=a):a=t[5];let r;t[6]!==e?(r=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=r):r=t[7];let f;t[8]!==r?(f=s.jsx("span",{children:r}),t[8]=r,t[9]=f):f=t[9];let c;return t[10]!==o||t[11]!==n||t[12]!==f?(c=s.jsxs(E,{tooltip:o,onClick:n,children:[a,f]}),t[10]=o,t[11]=n,t[12]=f,t[13]=c):c=t[13],c}function _l(){const t=C.c(9),e=A(),l=Y(),{org:i}=B();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==l||t[3]!==i.slug?(n=()=>l({to:"/$org/settings",params:{org:i.slug}}),t[2]=l,t[3]=i.slug,t[4]=n):n=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx($e,{size:15}),t[5]=a):a=t[5];let r;return t[6]!==o||t[7]!==n?(r=s.jsx("button",{type:"button","aria-label":o,onClick:n,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:a}),t[6]=o,t[7]=n,t[8]=r):r=t[8],r}function st(){const t=C.c(29),e=A(),[l,i]=L.useState(!1);let o;t[0]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=o):o=t[1];let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Nt,{}),t[2]=n):n=t[2];let a;t[3]!==e?(a=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=a):a=t[4];let r;t[5]!==a?(r=s.jsx("span",{children:a}),t[5]=a,t[6]=r):r=t[6];let f;t[7]!==o||t[8]!==r?(f=s.jsx(T,{children:s.jsx(Ct,{trigger:s.jsxs(E,{tooltip:o,children:[n,r]})})}),t[7]=o,t[8]=r,t[9]=f):f=t[9];let c;t[10]!==e?(c=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=c):c=t[11];let d,m;t[12]===Symbol.for("react.memo_cache_sentinel")?(d=()=>i(!0),m=s.jsx(Hs,{}),t[12]=d,t[13]=m):(d=t[12],m=t[13]);let p;t[14]!==e?(p=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=p):p=t[15];let u;t[16]!==p?(u=s.jsx("span",{children:p}),t[16]=p,t[17]=u):u=t[17];let x;t[18]!==c||t[19]!==u?(x=s.jsx(T,{children:s.jsxs(E,{tooltip:c,onClick:d,children:[m,u]})}),t[18]=c,t[19]=u,t[20]=x):x=t[20];let b;t[21]!==x||t[22]!==f?(b=s.jsxs(U,{className:"gap-0.5",children:[f,x]}),t[21]=x,t[22]=f,t[23]=b):b=t[23];let h;t[24]!==l?(h=s.jsx(ps,{open:l,onOpenChange:i,mode:"browse"}),t[24]=l,t[25]=h):h=t[25];let g;return t[26]!==b||t[27]!==h?(g=s.jsxs(s.Fragment,{children:[b,h]}),t[26]=b,t[27]=h,t[28]=g):g=t[28],g}function lt(){const t=C.c(10),e=A();let l;t[0]!==e?(l=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=l):l=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Nt,{}),t[2]=i):i=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let n;t[5]!==o?(n=s.jsx("span",{children:o}),t[5]=o,t[6]=n):n=t[6];let a;return t[7]!==l||t[8]!==n?(a=s.jsx(U,{className:"gap-0.5",children:s.jsx(T,{children:s.jsx(Ct,{trigger:s.jsxs(E,{tooltip:l,children:[i,n]})})})}),t[7]=l,t[8]=n,t[9]=a):a=t[9],a}function Nl(){const t=C.c(17),{state:e}=K(),l=e==="collapsed",i=Le(),o=!i;if(l){let c;t[0]!==o?(c=o&&s.jsx(tt,{}),t[0]=o,t[1]=c):c=t[1];let d;t[2]!==i?(d=i?s.jsx(lt,{}):s.jsx(st,{}),t[2]=i,t[3]=d):d=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(T,{children:s.jsx(yl,{})}),t[4]=m):m=t[4];let p;t[5]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs(U,{children:[m,s.jsx(T,{children:s.jsx(Ee,{})})]}),t[5]=p):p=t[5];let u;return t[6]!==c||t[7]!==d?(u=s.jsxs(Ae,{className:"px-2 pb-3 gap-1",children:[c,d,p]}),t[6]=c,t[7]=d,t[8]=u):u=t[8],u}let n;t[9]!==o?(n=o&&s.jsx(tt,{}),t[9]=o,t[10]=n):n=t[10];let a;t[11]!==i?(a=i?s.jsx(lt,{}):s.jsx(st,{}),t[11]=i,t[12]=a):a=t[12];let r;t[13]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(U,{className:"gap-0.5",children:s.jsx(T,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Ee,{})}),s.jsx(_l,{})]})})}),t[13]=r):r=t[13];let f;return t[14]!==n||t[15]!==a?(f=s.jsxs(Ae,{className:"px-2 pb-3 gap-0.5",children:[n,a,r]}),t[14]=n,t[15]=a,t[16]=f):f=t[16],f}function Cl(){const t=C.c(11),e=A(),l=Y(),{org:i}=B(),{setOpenMobile:o}=K();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(U,{children:s.jsx(T,{children:s.jsx(Ee,{})})})}),t[0]=n):n=t[0];let a;t[1]!==e?(a=e("sidebar.sidebarFooterMobile.settings"),t[1]=e,t[2]=a):a=t[2];let r;t[3]!==l||t[4]!==i.slug||t[5]!==o?(r=()=>{l({to:"/$org/settings",params:{org:i.slug}}),o(!1)},t[3]=l,t[4]=i.slug,t[5]=o,t[6]=r):r=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx($e,{className:"size-4"}),t[7]=f):f=t[7];let c;return t[8]!==a||t[9]!==r?(c=s.jsx(Ae,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[n,s.jsx(He,{"aria-label":a,onClick:r,children:f})]})}),t[8]=a,t[9]=r,t[10]=c):c=t[10],c}function ot(t){const e=C.c(15),{className:l,wrapperClassName:i,children:o}=t,[n,a]=L.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=g=>{g&&a(g.scrollHeight>g.clientHeight+1)},e[0]=r):r=e[0];const f=r;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=g=>{const y=g.currentTarget;a(y.scrollHeight-y.scrollTop>y.clientHeight+1)},e[1]=c):c=e[1];const d=c;let m;e[2]!==i?(m=z("relative",i),e[2]=i,e[3]=m):m=e[3];let p;e[4]!==o||e[5]!==l?(p=s.jsx("div",{ref:f,onScroll:d,className:l,children:o}),e[4]=o,e[5]=l,e[6]=p):p=e[6];const u=n?"opacity-100":"opacity-0";let x;e[7]!==u?(x=z("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",u),e[7]=u,e[8]=x):x=e[8];let b;e[9]!==x?(b=s.jsx("div",{"aria-hidden":!0,className:x}),e[9]=x,e[10]=b):b=e[10];let h;return e[11]!==m||e[12]!==p||e[13]!==b?(h=s.jsxs("div",{className:m,children:[p,b]}),e[11]=m,e[12]=p,e[13]=b,e[14]=h):h=e[14],h}function it(t){const e=C.c(17),{label:l,onClick:i,active:o,children:n}=t,[a,r]=L.useState(!1);let f,c,d,m;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>r(!0),c=()=>r(!1),d=()=>r(!0),m=()=>r(!1),e[0]=f,e[1]=c,e[2]=d,e[3]=m):(f=e[0],c=e[1],d=e[2],m=e[3]);const p=o&&"bg-sidebar-accent text-foreground";let u;e[4]!==p?(u=z("md:size-[34px] rounded-lg",p),e[4]=p,e[5]=u):u=e[5];let x;e[6]!==n||e[7]!==l||e[8]!==i||e[9]!==u?(x=s.jsx(jt,{asChild:!0,children:s.jsx(He,{"aria-label":l,onClick:i,onPointerEnter:f,onPointerLeave:c,onFocus:d,onBlur:m,className:u,children:n})}),e[6]=n,e[7]=l,e[8]=i,e[9]=u,e[10]=x):x=e[10];let b;e[11]!==l?(b=s.jsx(vt,{side:"bottom",children:l}),e[11]=l,e[12]=b):b=e[12];let h;return e[13]!==a||e[14]!==x||e[15]!==b?(h=s.jsxs(yt,{open:a,children:[x,b]}),e[13]=a,e[14]=x,e[15]=b,e[16]=h):h=e[16],h}function wl(t){const e=C.c(61);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:i}=l,o=A(),{org:n}=B();let a;e[2]!==i?(a={onNavigate:i},e[2]=i,e[3]=a):a=e[3];const r=xs(a),{state:f,isMobile:c,toggleSidebar:d}=K();if(f==="collapsed"&&!c){let v;e[4]!==n?(v=s.jsx(gt,{org:n,size:"sm"}),e[4]=n,e[5]=v):v=e[5];let j;e[6]!==n.name||e[7]!==v?(j=s.jsx(E,{tooltip:n.name,children:v}),e[6]=n.name,e[7]=v,e[8]=j):j=e[8];let S;e[9]!==n.slug||e[10]!==j?(S=s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(bt,{orgParam:n.slug,side:"right",align:"start",trigger:j})}),e[9]=n.slug,e[10]=j,e[11]=S):S=e[11];let w;e[12]!==o?(w=o("sidebar.taskGroupsList.toggleSidebar"),e[12]=o,e[13]=w):w=e[13];let _;e[14]!==o?(_=o("sidebar.taskGroupsList.toggleSidebar"),e[14]=o,e[15]=_):_=e[15];let N;e[16]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Be,{size:16}),e[16]=N):N=e[16];let k;e[17]!==w||e[18]!==_||e[19]!==d?(k=s.jsx(T,{children:s.jsx(E,{"aria-label":w,tooltip:_,onClick:d,children:N})}),e[17]=w,e[18]=_,e[19]=d,e[20]=k):k=e[20];let $;e[21]!==o?($=o("sidebar.taskGroupsList.searchChats"),e[21]=o,e[22]=$):$=e[22];let M;e[23]!==o?(M=o("sidebar.taskGroupsList.searchChats"),e[23]=o,e[24]=M):M=e[24];let O;e[25]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Xe,{size:16}),e[25]=O):O=e[25];let I;e[26]!==r.openSearch||e[27]!==$||e[28]!==M?(I=s.jsx(T,{children:s.jsx(E,{"aria-label":$,tooltip:M,onClick:r.openSearch,children:O})}),e[26]=r.openSearch,e[27]=$,e[28]=M,e[29]=I):I=e[29];let D;e[30]!==I||e[31]!==k?(D=s.jsxs(U,{className:"mt-2 min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[k,I]}),e[30]=I,e[31]=k,e[32]=D):D=e[32];let P;return e[33]!==r.reclaimDialog||e[34]!==r.searchDialog||e[35]!==D||e[36]!==S?(P=s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[S,D,r.searchDialog,r.reclaimDialog]}),e[33]=r.reclaimDialog,e[34]=r.searchDialog,e[35]=D,e[36]=S,e[37]=P):P=e[37],P}let p;e[38]!==r||e[39]!==o?(p=v=>s.jsx(St,{delayDuration:300,children:s.jsxs("div",{className:z("shrink-0 flex items-center justify-between",v?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!v&&s.jsx(We,{className:"md:size-[34px] rounded-lg"}),s.jsx(hs,{panel:r})]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(it,{label:o("sidebar.taskGroupsList.searchChats"),onClick:r.openSearch,children:s.jsx(Xe,{size:16})}),s.jsx(it,{label:o("sidebar.taskGroupsList.newChat"),onClick:r.newThread,children:s.jsx(Ps,{size:16})})]})]})}),e[38]=r,e[39]=o,e[40]=p):p=e[40];const u=p;let x;e[41]!==r?(x=s.jsx(bs,{panel:r}),e[41]=r,e[42]=x):x=e[42];const b=x;if(c){let v;e[43]!==u?(v=u(!0),e[43]=u,e[44]=v):v=e[44];let j;e[45]!==b?(j=s.jsx(ot,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:b}),e[45]=b,e[46]=j):j=e[46];let S;return e[47]!==r.reclaimDialog||e[48]!==r.searchDialog||e[49]!==v||e[50]!==j?(S=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[v,j,r.searchDialog,r.reclaimDialog]}),e[47]=r.reclaimDialog,e[48]=r.searchDialog,e[49]=v,e[50]=j,e[51]=S):S=e[51],S}let h;e[52]!==u?(h=u(!1),e[52]=u,e[53]=h):h=e[53];let g;e[54]!==b?(g=s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(ot,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:b})}),e[54]=b,e[55]=g):g=e[55];let y;return e[56]!==r.reclaimDialog||e[57]!==r.searchDialog||e[58]!==h||e[59]!==g?(y=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[h,g,r.searchDialog,r.reclaimDialog]}),e[56]=r.reclaimDialog,e[57]=r.searchDialog,e[58]=h,e[59]=g,e[60]=y):y=e[60],y}const kl=5,$l=[{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 Ml(){const t=C.c(3),{state:e}=K();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:kl}).map(Pl)}),t[0]=o):o=t[0],o}let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(W,{className:"size-6 rounded-md"}),s.jsx(W,{className:"size-6 rounded-md"}),s.jsx(W,{className:"size-6 rounded-md"})]}),s.jsx(W,{className:"h-6 w-20 rounded-md"})]}),t[1]=l):l=t[1];let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[l,s.jsx("div",{className:"flex flex-col gap-0.5",children:$l.map(Dl)})]}),t[2]=i):i=t[2],i}function Dl(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(W,{className:"size-5 rounded-full shrink-0"}),s.jsx(W,{className:z("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(Ol)})]},e)}function Ol(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(W,{className:"h-3 flex-1 rounded-sm"})},e)}function Pl(t,e){return s.jsx(W,{className:"size-10 rounded-lg mx-auto"},e)}function zl(){const t=C.c(2),{org:e}=B();let l;return t[0]!==e.id?(l=cs(e.id),t[0]=e.id,t[1]=l):l=t[1],l.id}function Al(t){const e=C.c(36);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:i}=l,o=A(),n=Y();let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[2]=a):a=e[2];const r=Te(a),{diagnostic:f,connectionId:c}=gs(),d=zl(),{threads:m}=wt(),{data:p}=ue.useSession(),{setTaskId:u,createNewTask:x}=kt(),b=!r.virtualmcpid||r.virtualmcpid===d;let h;e[3]!==x||e[4]!==d||e[5]!==n||e[6]!==i||e[7]!==b||e[8]!==p?.user?.id||e[9]!==u||e[10]!==m?(h=_=>{if(V("nav_destination_clicked",{destination:_}),i?.(),b){n({to:".",search:k=>({...k,main:_}),replace:!0});return}const N=$t(m,d,p?.user?.id);N?u(N.id,d,{main:_}):x(d,void 0,{main:_})},e[3]=x,e[4]=d,e[5]=n,e[6]=i,e[7]=b,e[8]=p?.user?.id,e[9]=u,e[10]=m,e[11]=h):h=e[11];const g=h,y=r.main===0||!r.main?b?"overview":null:r.main;let v;e[12]!==y||e[13]!==g?(v=(_,N,k)=>({key:_,label:N,icon:k,isActive:y===_,onSelect:()=>g(_)}),e[12]=y,e[13]=g,e[14]=v):v=e[14];const j=v;let S;if(e[15]!==j||e[16]!==o){let _;e[18]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(zs,{size:16}),e[18]=_):_=e[18],S=j("overview",o("sidebar.navDestinations.home"),_),e[15]=j,e[16]=o,e[17]=S}else S=e[17];let w;if(e[19]!==c||e[20]!==j||e[21]!==f||e[22]!==o||e[23]!==S){if(w=[S],f){let k;if(e[25]!==c||e[26]!==j||e[27]!==o){let $;e[29]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(As,{size:16}),e[29]=$):$=e[29],k=j(ut(c,pt),o("sidebar.navDestinations.reports"),$),e[25]=c,e[26]=j,e[27]=o,e[28]=k}else k=e[28];w.push(k)}let _,N;if(e[30]!==j||e[31]!==o){let k;e[34]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Is,{size:16}),e[34]=k):k=e[34],_=j("board",o("sidebar.navDestinations.tasks"),k);let $;e[35]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(Vs,{size:16}),e[35]=$):$=e[35],N=j("files",o("sidebar.navDestinations.library"),$),e[30]=j,e[31]=o,e[32]=_,e[33]=N}else _=e[32],N=e[33];w.push(_,N),e[19]=c,e[20]=j,e[21]=f,e[22]=o,e[23]=S,e[24]=w}else w=e[24];return w}function Il(t){const e=C.c(10);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:i}=l;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[2]=o):o=e[2];const n=Te(o),a=Ks()??[],{threads:r}=wt(),{data:f}=ue.useSession(),{setTaskId:c,createNewTask:d}=kt();let m;return e[3]!==d||e[4]!==i||e[5]!==n||e[6]!==f?.user?.id||e[7]!==c||e[8]!==r?(m=p=>{const u=Xs(p);return{key:p.id,label:u?.name||p.title,icon:s.jsx(_t,{size:16}),isActive:n.virtualmcpid===p.id,onSelect:()=>{V("nav_destination_clicked",{destination:"coding_agent"}),i?.();const x=$t(r,p.id,f?.user?.id);x?c(x.id,p.id):d(p.id)}}},e[3]=d,e[4]=i,e[5]=n,e[6]=f?.user?.id,e[7]=c,e[8]=r,e[9]=m):m=e[9],a.filter(El).map(m)}function El(t){return Ys(t.metadata)}function Tl(t){const e=C.c(18),{onNavigate:l}=t;let i;e[0]!==l?(i={onNavigate:l},e[0]=l,e[1]=i):i=e[1];const o=Al(i);let n;e[2]!==l?(n={onNavigate:l},e[2]=l,e[3]=n):n=e[3];const a=Il(n),{state:r,isMobile:f}=K(),c=r==="collapsed"&&!f;let d;e[4]!==c?(d=h=>s.jsx(T,{children:s.jsxs(E,{onClick:h.onSelect,isActive:h.isActive,tooltip:c?h.label:void 0,children:[h.icon,s.jsx("span",{className:"truncate",children:h.label})]})},h.key),e[4]=c,e[5]=d):d=e[5];const m=d;let p;e[6]!==o||e[7]!==m?(p=o.map(m),e[6]=o,e[7]=m,e[8]=p):p=e[8];let u;e[9]!==a.length?(u=a.length>0&&s.jsx("li",{"aria-hidden":!0,className:"h-2"}),e[9]=a.length,e[10]=u):u=e[10];let x;e[11]!==a||e[12]!==m?(x=a.map(m),e[11]=a,e[12]=m,e[13]=x):x=e[13];let b;return e[14]!==p||e[15]!==u||e[16]!==x?(b=s.jsxs(U,{className:"gap-1",children:[p,u,x]}),e[14]=p,e[15]=u,e[16]=x,e[17]=b):b=e[17],b}function Rl(t){const e=C.c(29);let l;e[0]!==t?(l=t===void 0?{}:t,e[0]=t,e[1]=l):l=e[1];const{onNavigate:i}=l,o=A(),{org:n}=B(),{state:a,isMobile:r,toggleSidebar:f}=K(),c=a==="collapsed"&&!r;let d;e[2]!==i?(d=s.jsx(Tl,{onNavigate:i}),e[2]=i,e[3]=d):d=e[3];const m=d;if(c){let u;e[4]!==n?(u=s.jsx(gt,{org:n,size:"sm"}),e[4]=n,e[5]=u):u=e[5];let x;e[6]!==n.name||e[7]!==u?(x=s.jsx(E,{tooltip:n.name,children:u}),e[6]=n.name,e[7]=u,e[8]=x):x=e[8];let b;e[9]!==n.slug||e[10]!==x?(b=s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(bt,{orgParam:n.slug,side:"right",align:"start",trigger:x})}),e[9]=n.slug,e[10]=x,e[11]=b):b=e[11];let h;e[12]!==o?(h=o("sidebar.taskGroupsList.toggleSidebar"),e[12]=o,e[13]=h):h=e[13];let g;e[14]!==o?(g=o("sidebar.taskGroupsList.toggleSidebar"),e[14]=o,e[15]=g):g=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Be,{size:16}),e[16]=y):y=e[16];let v;e[17]!==h||e[18]!==g||e[19]!==f?(v=s.jsx(U,{className:"mt-2 gap-1.5",children:s.jsx(T,{children:s.jsx(E,{"aria-label":h,tooltip:g,onClick:f,children:y})})}),e[17]=h,e[18]=g,e[19]=f,e[20]=v):v=e[20];let j;e[21]!==m?(j=s.jsx("div",{className:"mt-1.5 min-h-0 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:m}),e[21]=m,e[22]=j):j=e[22];let S;return e[23]!==j||e[24]!==b||e[25]!==v?(S=s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[b,v,j]}),e[23]=j,e[24]=b,e[25]=v,e[26]=S):S=e[26],S}let p;return e[27]!==m?(p=s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:m})}),e[27]=m,e[28]=p):p=e[28],p}function Fl(){const t=C.c(3),e=Le();if(Ue()){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs(s.Fragment,{children:[s.jsx(ke,{showName:!0}),s.jsx(We,{className:"ml-auto md:size-[34px] rounded-lg"})]}),t[0]=o):o=t[0],o}if(e){let o;return t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ke,{showName:!0}),t[1]=o):o=t[1],o}let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(s.Fragment,{children:[s.jsx(ke,{}),s.jsx(Ge,{})]}),t[2]=i):i=t[2],i}function At(t){const e=C.c(4),{onNavigate:l}=t,i=Ue();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ml,{}),e[0]=o):o=e[0];let n;return e[1]!==i||e[2]!==l?(n=s.jsx(rt,{children:s.jsx(L.Suspense,{fallback:o,children:i?s.jsx(Rl,{onNavigate:l}):s.jsx(wl,{onNavigate:l})})}),e[1]=i,e[2]=l,e[3]=n):n=e[3],n}function Ll(){const t=C.c(5),e=Dt();let l,i,o;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Nl,{}),i=s.jsx(Fl,{}),o=s.jsx(At,{}),t[0]=l,t[1]=i,t[2]=o):(l=t[0],i=t[1],o=t[2]);let n;return t[3]!==e?(n=s.jsx(Mt,{children:s.jsx(zt,{sections:e,footer:l,header:i,additionalContent:o})}),t[3]=e,t[4]=n):n=t[4],n}function Ul(t){const e=C.c(7),{onClose:l}=t,i=Dt();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Cl,{}),e[0]=o):o=e[0];let n;e[1]!==l?(n=s.jsx(At,{onNavigate:l}),e[1]=l,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==i||e[5]!==n?(a=s.jsx(Mt,{children:s.jsx(pl,{sections:i,onClose:l,footer:o,additionalContent:n})}),e[3]=l,e[4]=i,e[5]=n,e[6]=a):a=e[6],a}const Gl="sidebar.open";function Bl(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ht,{}),t[0]=e):e=t[0],e}function an(){const t=C.c(37),e=ft(),l=Le(),i=Ue();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const{connect:n,siteUrl:a}=Te(o),r=n==="1",[f,c]=at(Gl,!1),{width:d,wrapperRef:m,onStartResize:p,resetWidth:u}=nl(),x=e;let b;t[1]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(We,{}),t[1]=b):b=t[1];let h;t[2]!==i||t[3]!==l?(h=!l&&!i&&s.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:s.jsx(Ge,{})}),t[2]=i,t[3]=l,t[4]=h):h=t[4];let g,y,v,j;t[5]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(me.TogglesSlot,{}),y=s.jsx(me.TabsSlot,{className:"shrink-0"}),v=s.jsx(me.CenterSlot,{}),j=s.jsx(me.RightSlot,{}),t[5]=g,t[6]=y,t[7]=v,t[8]=j):(g=t[5],y=t[6],v=t[7],j=t[8]);let S;t[9]!==h?(S=s.jsx(me.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[b,h,g,y,v,j]})}),t[9]=h,t[10]=S):S=t[10];const w=S;let _;t[11]===Symbol.for("react.memo_cache_sentinel")?(_={background:"transparent",containerType:"inline-size"},t[11]=_):_=t[11];let N;t[12]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Kt,{className:"flex flex-col min-h-0",style:_,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(L.Suspense,{fallback:s.jsx(Bl,{}),children:s.jsx(Bt,{})})})})}),t[12]=N):N=t[12];const k=N,$=x&&w,M=`${d}px`;let O;t[13]!==M?(O={"--sidebar-width":M,"--sidebar-width-icon":"3.125rem"},t[13]=M,t[14]=O):O=t[14];const I=O;let D;t[15]!==e||t[16]!==p||t[17]!==u?(D=!e&&s.jsxs(s.Fragment,{children:[s.jsx(Ll,{}),s.jsx(ll,{onPointerDown:p,onDoubleClick:u})]}),t[15]=e,t[16]=p,t[17]=u,t[18]=D):D=t[18];let P;t[19]!==I||t[20]!==D||t[21]!==m?(P=s.jsxs(Yt,{ref:m,className:"flex-1 bg-sidebar relative min-h-0",style:I,children:[D,k]}),t[19]=I,t[20]=D,t[21]=m,t[22]=P):P=t[22];let G;t[23]!==e?(G=e&&s.jsx(Ws,{renderSidebar:Hl}),t[23]=e,t[24]=G):G=t[24];let R;t[25]!==a||t[26]!==r?(R=r&&s.jsx(Js,{siteUrl:a}),t[25]=a,t[26]=r,t[27]=R):R=t[27];let F;t[28]!==$||t[29]!==P||t[30]!==G||t[31]!==R?(F=s.jsx(Qs,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[$,P,G,R]})}),t[28]=$,t[29]=P,t[30]=G,t[31]=R,t[32]=F):F=t[32];let H;return t[33]!==c||t[34]!==f||t[35]!==F?(H=s.jsx(qs,{children:s.jsx(me.Provider,{children:s.jsx(Xt,{open:f,onOpenChange:c,children:F})})}),t[33]=c,t[34]=f,t[35]=F,t[36]=H):H=t[36],H}function Hl(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(Ul,{onClose:e})})})}export{an as default};