decocms 4.32.0 → 4.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-Db_5w_pO.js → AlertCircle-2s5kOZgj.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-B2VxdxbH.js → ArrowUpRight-B0lt2R6O.js} +1 -1
- package/dist/client/assets/{Check-VVh423TU.js → Check-B0N6s4EL.js} +1 -1
- package/dist/client/assets/{CheckCircle-auAoHYRc.js → CheckCircle-CIPdmx9R.js} +1 -1
- package/dist/client/assets/{ChevronDown-mDFyCzyV.js → ChevronDown-bR9-OAOH.js} +1 -1
- package/dist/client/assets/{ChevronRight-Ceh-WF7H.js → ChevronRight-BSSGG1g5.js} +1 -1
- package/dist/client/assets/{ChevronUp-D03XJ0vS.js → ChevronUp-Fslp9Fpy.js} +1 -1
- package/dist/client/assets/{Circle-DNMct17O.js → Circle-BPZeoRCx.js} +1 -1
- package/dist/client/assets/{Copy01-CuSfBG1R.js → Copy01-Cz1rKXRy.js} +1 -1
- package/dist/client/assets/{DotsVertical-Cr4sUrn_.js → DotsVertical-15z7dV29.js} +1 -1
- package/dist/client/assets/{Eye-aR-oC6dj.js → Eye-DcJnhbvA.js} +1 -1
- package/dist/client/assets/{FilterLines-Cr2IL8ug.js → FilterLines-cTy8iFZe.js} +1 -1
- package/dist/client/assets/{Globe01-DkdmhUM8.js → Globe01-DIfUBpGL.js} +1 -1
- package/dist/client/assets/{Globe04-TuZvt3ov.js → Globe04-mbYkrh9z.js} +1 -1
- package/dist/client/assets/{HardDrive-CrxPr3va.js → HardDrive-j5KCJ6XY.js} +1 -1
- package/dist/client/assets/{Key01-CfvrTjDF.js → Key01-f-QyjpHL.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Cog6SqwZ.js → LayoutLeft-DWh3M4u4.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BYpL3ACE.js → LinkExternal01-BGZKsGqI.js} +1 -1
- package/dist/client/assets/{List-D5svP-6k.js → List-BWsSMZPj.js} +1 -1
- package/dist/client/assets/{Loading02-D2Hh17zb.js → Loading02-DlI7_e_g.js} +1 -1
- package/dist/client/assets/{Monitor01-cNkbuWdj.js → Monitor01-C0S2ni9X.js} +1 -1
- package/dist/client/assets/{Palette-Dz_ldMx7.js → Palette-Dvhw-PUQ.js} +1 -1
- package/dist/client/assets/{Play-CVarwVeR.js → Play-DC8NP2kr.js} +1 -1
- package/dist/client/assets/{Plus-DNCXili3.js → Plus-CtK3Oiw2.js} +1 -1
- package/dist/client/assets/{SearchLg-DvsDitCO.js → SearchLg-Bnks7xJg.js} +1 -1
- package/dist/client/assets/{SearchMd-87dvi4KF.js → SearchMd-DyX5r8jM.js} +1 -1
- package/dist/client/assets/{Settings02-D7asukv0.js → Settings02-H_IB225h.js} +1 -1
- package/dist/client/assets/{Shield01-BT2HQXan.js → Shield01-BC699jIY.js} +1 -1
- package/dist/client/assets/{Star01-B90wIaBV.js → Star01-BbsQJ_sS.js} +1 -1
- package/dist/client/assets/{Stars01-D1lDEQh2.js → Stars01-CR3bUaN7.js} +1 -1
- package/dist/client/assets/{Stars02-LnA0-zz4.js → Stars02-BK7UYCtg.js} +1 -1
- package/dist/client/assets/{Sun-DLqplG3r.js → Sun-uxTaoEYF.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-C9ua90Hw.js → SwitchHorizontal01-CB2NLb2L.js} +1 -1
- package/dist/client/assets/{Tool01-dGPltLKJ.js → Tool01-C0uN9zWM.js} +1 -1
- package/dist/client/assets/{Trash01-BJe3gUZc.js → Trash01-Ua8N5kjP.js} +1 -1
- package/dist/client/assets/{Upload01-DIYVb8n9.js → Upload01-hPJNmduj.js} +1 -1
- package/dist/client/assets/{User01-DcNAHFa-.js → User01-BxMdEKOJ.js} +1 -1
- package/dist/client/assets/{Users01-q9IKnEsX.js → Users01-BAVKi7TL.js} +1 -1
- package/dist/client/assets/{Users03-BMw5o14D.js → Users03-BFPLupFq.js} +1 -1
- package/dist/client/assets/{X-CYIGv8wX.js → X-DEwIfp2g.js} +1 -1
- package/dist/client/assets/{XCircle-29rFa-09.js → XCircle-CIONSbDG.js} +1 -1
- package/dist/client/assets/{XClose-DT64mUwh.js → XClose-C6H98gBi.js} +1 -1
- package/dist/client/assets/{Zap-Br_Hg1wB.js → Zap-BIltjucc.js} +1 -1
- package/dist/client/assets/{ZapSquare-0BsdXZY9.js → ZapSquare-C8hQ9jTF.js} +1 -1
- package/dist/client/assets/{ZoomOut-Dqj1q_yU.js → ZoomOut-PMoRB_Bg.js} +1 -1
- package/dist/client/assets/{access-gate-033kBvzX.js → access-gate-DOeBybsR.js} +1 -1
- package/dist/client/assets/{add-section-modal-DRg-YhLT.js → add-section-modal-CCUIjz6m.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CRvnIg9m.js → agent-capabilities-kcySA6Rm.js} +1 -1
- package/dist/client/assets/{agent-icon-EdtPDJXM.js → agent-icon-CbBVbeed.js} +1 -1
- package/dist/client/assets/{agents-list-COIOrWTd.js → agents-list-xvCGZ9XI.js} +1 -1
- package/dist/client/assets/{ai-providers--C84J8bO.js → ai-providers-Bo_gc-mT.js} +1 -1
- package/dist/client/assets/{alert-BG1upMQ5.js → alert-D3io7I88.js} +1 -1
- package/dist/client/assets/{alert-dialog-BbHr6pLd.js → alert-dialog-B0nYWSj5.js} +1 -1
- package/dist/client/assets/app-editor-CkNgnA56.js +1 -0
- package/dist/client/assets/{auth-BEQgA40y.js → auth-D5wBpl7f.js} +1 -1
- package/dist/client/assets/{auth-catchall-CfZrCH1R.js → auth-catchall-DF5Q_pqe.js} +1 -1
- package/dist/client/assets/{auth-entry-Cr25LD_X.js → auth-entry-CCaGhNGQ.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DSPfwaoV.js → auth-split-layout-w0JcTw7T.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-nkmQY5vG.js → authenticate-and-persist-oauth-Chvo_Jes.js} +1 -1
- package/dist/client/assets/{automation-list-row-xAynmOqb.js → automation-list-row-Cbdiek4K.js} +1 -1
- package/dist/client/assets/{automation-runs-D98OdVC5.js → automation-runs-CGER5GBv.js} +1 -1
- package/dist/client/assets/automations-D0NTvKnQ.js +1 -0
- package/dist/client/assets/{autosend-REHFoRRR.js → autosend-CmGYW3q_.js} +1 -1
- package/dist/client/assets/{avatar-B2d04wRu.js → avatar-CDXoUCLJ.js} +1 -1
- package/dist/client/assets/{badge-DiKw8RbW.js → badge-Ctcfruzq.js} +1 -1
- package/dist/client/assets/{block-document-CPFtVEpa.js → block-document-sswZnu5y.js} +1 -1
- package/dist/client/assets/{brand-context-DHN-dSvf.js → brand-context-DM1UEpwM.js} +1 -1
- package/dist/client/assets/{breadcrumb-CC9Gfd5p.js → breadcrumb-DAdC6SnD.js} +1 -1
- package/dist/client/assets/{buckets-CKM582z_.js → buckets-Ctfn_0G2.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-B4j7bMVg.js → bulk-category-panel-D8tuJJzY.js} +1 -1
- package/dist/client/assets/{calendar-Dh7ySVQi.js → calendar-CeqPOUkw.js} +1 -1
- package/dist/client/assets/{capability-load-error-Dg3eOVDS.js → capability-load-error-DtbGeAKW.js} +1 -1
- package/dist/client/assets/{card-D5CauofV.js → card-DQi9rgCg.js} +1 -1
- package/dist/client/assets/category-editor-hoS8HpqO.js +1 -0
- package/dist/client/assets/{chat-context-BsRUICZs.js → chat-context-IHOJkkXf.js} +7 -7
- package/dist/client/assets/{checkbox-DhHH_mmR.js → checkbox-BURTh-Sz.js} +1 -1
- package/dist/client/assets/{cli-auth-success-NNi-TvQO.js → cli-auth-success-_TBsui5t.js} +1 -1
- package/dist/client/assets/{collection-detail-L5hLAtjn.js → collection-detail-DaSVHCzi.js} +1 -1
- package/dist/client/assets/{collection-display-button-D5THp447.js → collection-display-button-XYmA1Q40.js} +1 -1
- package/dist/client/assets/{collection-search-BgFXdSC0.js → collection-search-BNR-_kgt.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-328T8nSg.js → collection-table-wrapper-DmpUOM4F.js} +1 -1
- package/dist/client/assets/{collection-tabs-Cxl16cFM.js → collection-tabs-DapcRZt3.js} +1 -1
- package/dist/client/assets/{command-Cx8bKs7m.js → command-C1J-e-lQ.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-DmVh_p0A.js → commerce-onboarding-Tn_GYu6Z.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-BWEylyh-.js → connect-desktop-dialog-CiAszx6Y.js} +1 -1
- package/dist/client/assets/{connection-card-CmLZ3i0M.js → connection-card-Cz90MoMh.js} +1 -1
- package/dist/client/assets/{connection-detail-tk24zTUu.js → connection-detail-C0v5B3ex.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-C1s-KSGU.js → connection-form-helpers-0tgODnl3.js} +1 -1
- package/dist/client/assets/{connections-qp5myPzL.js → connections-DdugII7h.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CiyJzTNT.js → decopilot-sse-pool-CQTNPxQf.js} +1 -1
- package/dist/client/assets/{dialog-BFPr54WG.js → dialog-BrzV8etc.js} +1 -1
- package/dist/client/assets/{domain-settings-DHynySRj.js → domain-settings-m2vjPoAZ.js} +1 -1
- package/dist/client/assets/{drawer-DcfPm_vi.js → drawer-gV6ZWrch.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BlfYJTRx.js → dropdown-menu-BddT-o91.js} +1 -1
- package/dist/client/assets/{empty-state-CeXPb2VU.js → empty-state-BWAXUEsn.js} +1 -1
- package/dist/client/assets/{extract-connection-data-5BWVDciX.js → extract-connection-data-D7-1aZ_S.js} +1 -1
- package/dist/client/assets/file-explorer-SPwatRtZ.js +2 -0
- package/dist/client/assets/{file-type-icon-D2xX1xnm.js → file-type-icon-Bjl2ymkp.js} +1 -1
- package/dist/client/assets/{files-Bzd-uxW7.js → files-WWFluIiz.js} +1 -1
- package/dist/client/assets/{form-Trt6kqr0.js → form-BRUQyl6J.js} +1 -1
- package/dist/client/assets/{general-C_FzX3UD.js → general-CTJEme6U.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CTMAbHxR.js → github-repo-picker-Do5QoiKl.js} +1 -1
- package/dist/client/assets/{hooks-BSiz_AKB.js → hooks-BZdqB8Qy.js} +1 -1
- package/dist/client/assets/index-9TeU21xo.js +1 -0
- package/dist/client/assets/{index-GJfKnZn_.js → index-BDZEdWj1.js} +1 -1
- package/dist/client/assets/{index-C8Vaq4GI.js → index-BNLg4KKP.js} +1 -1
- package/dist/client/assets/{index-BMxNGICG.js → index-BoSB3Za-.js} +1 -1
- package/dist/client/assets/{index-CLj_5r89.js → index-C7I160AA.js} +3 -3
- package/dist/client/assets/{index-DtEv5T2k.js → index-CKS3i0IK.js} +1 -1
- package/dist/client/assets/{index-CsAnNpRc.js → index-CWK3z81c.js} +1 -1
- package/dist/client/assets/{index-gz1tAOXr.js → index-CZEILacv.js} +28 -28
- package/dist/client/assets/{index-uAuiYVKB.js → index-Cn1sj9aZ.js} +5 -5
- package/dist/client/assets/{index-35Tak7qk.js → index-D2gueFhN.js} +1 -1
- package/dist/client/assets/{index-CqLJnBFj.js → index-D2onA9qc.js} +1 -1
- package/dist/client/assets/index-DU7aSFO-.js +1 -0
- package/dist/client/assets/{index-CPelPFhM.js → index-kon1iupd.js} +1 -1
- package/dist/client/assets/{index-redirect-DDeVol4f.js → index-redirect-C5XTPHMs.js} +1 -1
- package/dist/client/assets/{index-CfigvylE.js → index-wSXh3klb.js} +1 -1
- package/dist/client/assets/{input-BdpM0TEL.js → input-DH_VnByH.js} +1 -1
- package/dist/client/assets/{integration-icon-Bf1Nt7-n.js → integration-icon-D0K1bih8.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BPpBeslC.js → invite-member-dialog-ClFLROQn.js} +2 -2
- package/dist/client/assets/{label-DjarSga4.js → label-e6rWM2hU.js} +1 -1
- package/dist/client/assets/{login-DoEfLmln.js → login-DtuNg2zJ.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DWePFULn.js → mcp-oauth-BCaCUxes.js} +1 -1
- package/dist/client/assets/{members-B3B7IloN.js → members-Ba9Rlcr-.js} +1 -1
- package/dist/client/assets/{monaco-editor-D4hwKq5W.js → monaco-editor-C_AEiYQZ.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-B7f4HN3G.js → monitoring-stats-row-CYKbRIBk.js} +1 -1
- package/dist/client/assets/{oauth-callback-BoH2P_bn.js → oauth-callback-B-Obhqp0.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CuMMS3lP.js → oauth-callback-ai-provider-Ba_FEG1I.js} +1 -1
- package/dist/client/assets/{onboarding-wUH-DGeU.js → onboarding-CQkojCLg.js} +1 -1
- package/dist/client/assets/{org-install-DXT9J0I8.js → org-install-CZscDtN4.js} +1 -1
- package/dist/client/assets/{org-layout-BrLrP4eq.js → org-layout-BA5rlSp0.js} +1 -1
- package/dist/client/assets/{organization-choice-C6lztIt3.js → organization-choice-Cz7kgb2K.js} +1 -1
- package/dist/client/assets/{page-seo-form-DQA0wg3R.js → page-seo-form-pa11jA1G.js} +1 -1
- package/dist/client/assets/page-seo-sheet-BsxyjdmC.js +1 -0
- package/dist/client/assets/{popover-CKlhZKOG.js → popover-B0KbxhEe.js} +1 -1
- package/dist/client/assets/post-editor-DK313FK0.js +1 -0
- package/dist/client/assets/{primitives-CAgzIvjA.js → primitives-Cc0JBmYV.js} +1 -1
- package/dist/client/assets/{profile-CY7AQM7b.js → profile-BCIfg20R.js} +1 -1
- package/dist/client/assets/project-app-view-BoVLQZ3E.js +1 -0
- package/dist/client/assets/record-editor-BnxxykzH.js +1 -0
- package/dist/client/assets/registry-CxXpBXKD.js +2 -0
- package/dist/client/assets/{registry-layout-D25VdidL.js → registry-layout-D_d52MHW.js} +1 -1
- package/dist/client/assets/{require-capability-CYDVRBkW.js → require-capability-Bck21HDw.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DGQr874S.js → required-auth-layout-DF__PTv1.js} +1 -1
- package/dist/client/assets/{reset-password-Ci3XAz4n.js → reset-password-DZD1v0KD.js} +1 -1
- package/dist/client/assets/{roles-oTvdi6Hw.js → roles-BfLpKNWG.js} +1 -1
- package/dist/client/assets/{search-input-DJ05ViVl.js → search-input-D8sB5-Ny.js} +1 -1
- package/dist/client/assets/{secrets-HOer9kv3.js → secrets-BCprY6aP.js} +1 -1
- package/dist/client/assets/{sections-editor-5ju1cxyx.js → sections-editor-D_hyAIGN.js} +2 -2
- package/dist/client/assets/{select-CeXH3gjW.js → select-DN-2P4pj.js} +1 -1
- package/dist/client/assets/{select-model-DYpThBVD.js → select-model-B2UNE9H0.js} +1 -1
- package/dist/client/assets/seo-editor-CfDwbt3_.js +1 -0
- package/dist/client/assets/{settings-layout-kdDgoGQC.js → settings-layout-v5WgWzIt.js} +1 -1
- package/dist/client/assets/{settings-section-CyBwf4qC.js → settings-section-DkyvVCpj.js} +1 -1
- package/dist/client/assets/{shell-controls-CD6bdY9w.js → shell-controls-CLwAtNRs.js} +1 -1
- package/dist/client/assets/{shell-layout-IYwmwgpp.js → shell-layout-KPAYSy0b.js} +1 -1
- package/dist/client/assets/{sidebar-B_c4VYke.js → sidebar-CTn5usMP.js} +1 -1
- package/dist/client/assets/{skeleton-Dl1AhqdL.js → skeleton-D4gGgavd.js} +1 -1
- package/dist/client/assets/{sso-1rsjb8hb.js → sso-DPp9OlNK.js} +1 -1
- package/dist/client/assets/{store-BHrgdJmn.js → store-Dw0CvhII.js} +1 -1
- package/dist/client/assets/store-registry-DNboZUWm.js +2 -0
- package/dist/client/assets/{studio-tools-F5G0urN7.js → studio-tools-PotpJQ3D.js} +1 -1
- package/dist/client/assets/{switch-B9wSH4oe.js → switch-Cmmmt6PD.js} +1 -1
- package/dist/client/assets/{table-C2Aqsz0m.js → table-DTgM4O4Z.js} +1 -1
- package/dist/client/assets/{tabs-W14caGou.js → tabs-t0q9T5Fa.js} +1 -1
- package/dist/client/assets/{textarea-ConjZ7fN.js → textarea-BYIN4Jzx.js} +1 -1
- package/dist/client/assets/{toggle-group-CYFywiUW.js → toggle-group-DYrBrZmA.js} +1 -1
- package/dist/client/assets/{toolbar-DR2I0_KA.js → toolbar-BdWX93yt.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Cf6OwFTU.js → toolbar-icon-button-Cxc_k7ol.js} +1 -1
- package/dist/client/assets/{tools-list-DL49NRaT.js → tools-list-BGKY_7Nz.js} +1 -1
- package/dist/client/assets/{tooltip-C51X6QKO.js → tooltip-Df6PcMNU.js} +1 -1
- package/dist/client/assets/{types-C0d4Ohpx.js → types-B8loWUG_.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BqQDQsEQ.js → use-ai-providers-DoUITmq_.js} +1 -1
- package/dist/client/assets/{use-automations-tqGwPES0.js → use-automations-TLSZt6TY.js} +1 -1
- package/dist/client/assets/{use-capability-CqEMs0z_.js → use-capability-1pbErDsM.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Bz8Z9860.js → use-clock-tick-BTJdRGzd.js} +1 -1
- package/dist/client/assets/{use-collections-Y12o4qWE.js → use-collections-u9zczYmq.js} +1 -1
- package/dist/client/assets/{use-connection-D5Vs5qOp.js → use-connection-D2zKUXMW.js} +1 -1
- package/dist/client/assets/{use-copy-Dc9VZjfD.js → use-copy-DyeDOflU.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-fbAeF2Sf.js → use-create-virtual-mcp-BWPnYTVH.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BPwP00mx.js → use-debounced-autosave-DpZx2Woz.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DfUpwXh9.js → use-debounced-value-Din3ks-5.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-C70DCxcq.js → use-decopilot-events-c_F3xZZq.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BBFdYZGQ.js → use-delete-connection-DMAQk9_a.js} +1 -1
- package/dist/client/assets/{use-file-configs-DGZxsbJi.js → use-file-configs-C5vV28ov.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BU44dmI-.js → use-infinite-scroll-D4CUGMlc.js} +1 -1
- package/dist/client/assets/{use-join-requests-DyX59dkl.js → use-join-requests-DUokiFjq.js} +1 -1
- package/dist/client/assets/{use-mcp-client-3hG4jk-y.js → use-mcp-client-Q0KtyZCi.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-K_jp9fAb.js → use-mcp-prompts-BmiZpXIz.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DkI8MzuJ.js → use-mcp-tools-CZX0T0Gj.js} +1 -1
- package/dist/client/assets/{use-members-CcCdz_hQ.js → use-members-CKOvIbDB.js} +1 -1
- package/dist/client/assets/{use-mobile-BJ6No951.js → use-mobile-DMF4iRSr.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-B6McR-Jr.js +1 -0
- package/dist/client/assets/{use-org-auth-client-B7yAA88H.js → use-org-auth-client-rtyqEqJT.js} +1 -1
- package/dist/client/assets/{use-org-sso-DcXTIOxB.js → use-org-sso-CyoKQ5KE.js} +1 -1
- package/dist/client/assets/{use-organization-roles-C6Eyg5qk.js → use-organization-roles-N3nyzKDF.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BzhOQtxD.js → use-organization-settings-CKQ7HE6e.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DnT_Dh3O.js → use-registry-connections-D9xYxJqe.js} +1 -1
- package/dist/client/assets/{use-secrets-BBj5PT7D.js → use-secrets-DQ0uwPps.js} +1 -1
- package/dist/client/assets/{use-status-sounds-B0huGKlG.js → use-status-sounds-o42lSNJw.js} +1 -1
- package/dist/client/assets/{use-view-mode-BL1OAyYV.js → use-view-mode-BExxXwj9.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-D3UxifiP.js → use-virtual-mcp-7ayI9UXm.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BsgsE7HF.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DrOgYVoj.js +1 -0
- package/dist/client/assets/{variant-calendar-Dx_VP5De.js → variant-calendar-H6YqPrcv.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DFM8ec78.js → view-mode-toggle-DFfA-LaB.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/app-editor-DFt6eACm.js +0 -1
- package/dist/client/assets/automations-DVf2_2C_.js +0 -1
- package/dist/client/assets/category-editor-SUwhv1rI.js +0 -1
- package/dist/client/assets/config-ByOdiANb.js +0 -1
- package/dist/client/assets/file-explorer-CwWWlUiZ.js +0 -2
- package/dist/client/assets/index-Cwk7SIrW.js +0 -1
- package/dist/client/assets/index-g8i--Kvx.js +0 -1
- package/dist/client/assets/page-seo-sheet-DurRfIZb.js +0 -1
- package/dist/client/assets/post-editor--rN0Vw5m.js +0 -1
- package/dist/client/assets/project-app-view-CHytmdja.js +0 -1
- package/dist/client/assets/record-editor-CNuCZ1ZI.js +0 -1
- package/dist/client/assets/registry-BZBmEaE-.js +0 -2
- package/dist/client/assets/seo-editor-BIKFI9Fl.js +0 -1
- package/dist/client/assets/store-registry-B0GhK-Yr.js +0 -2
- package/dist/client/assets/use-navigate-to-agent-CZiiGkPG.js +0 -1
- package/dist/client/assets/useInfiniteQuery-8DjDwhQn.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BYjapKbe.js +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as yt,r as w,j as o,l as gt,t as ut,i as St}from"./index-CLj_5r89.js";import{i as _t}from"./ChevronRight-Ceh-WF7H.js";import{A as jt}from"./automation-runs-D98OdVC5.js";import{A as kt}from"./add-section-modal-DRg-YhLT.js";import{aC as Bt,aD as wt,aE as At,x as Nt,y as Ct,aF as Rt,ac as Et,aG as Kt,as as Ft}from"./index-gz1tAOXr.js";import"./select-CeXH3gjW.js";import"./tooltip-C51X6QKO.js";import"./Check-VVh423TU.js";import"./ChevronDown-mDFyCzyV.js";import"./ChevronUp-D03XJ0vS.js";import"./useInfiniteQuery-8DjDwhQn.js";import"./use-infinite-scroll-BU44dmI-.js";import"./use-connection-D5Vs5qOp.js";import"./use-collections-Y12o4qWE.js";import"./use-mcp-client-3hG4jk-y.js";import"./constants-B72Xmt_K.js";import"./auth-BEQgA40y.js";import"./use-virtual-mcp-D3UxifiP.js";import"./card-D5CauofV.js";import"./sidebar-B_c4VYke.js";import"./LayoutLeft-Cog6SqwZ.js";import"./use-mobile-BJ6No951.js";import"./X-CYIGv8wX.js";import"./table-C2Aqsz0m.js";import"./empty-state-CeXPb2VU.js";import"./use-members-CcCdz_hQ.js";import"./use-org-auth-client-B7yAA88H.js";import"./use-clock-tick-Bz8Z9860.js";import"./AlertCircle-Db_5w_pO.js";import"./CheckCircle-auAoHYRc.js";import"./Circle-DNMct17O.js";import"./agent-icon-EdtPDJXM.js";import"./Tool01-dGPltLKJ.js";import"./SwitchHorizontal01-C9ua90Hw.js";import"./Settings02-D7asukv0.js";import"./XCircle-29rFa-09.js";import"./ArrowUpRight-B2VxdxbH.js";import"./ZapSquare-0BsdXZY9.js";import"./Users03-BMw5o14D.js";import"./Loading02-D2Hh17zb.js";import"./Stars02-LnA0-zz4.js";import"./Copy01-CuSfBG1R.js";import"./ZoomOut-Dqj1q_yU.js";import"./DotsVertical-Cr4sUrn_.js";import"./Globe01-DkdmhUM8.js";import"./Eye-aR-oC6dj.js";import"./FilterLines-Cr2IL8ug.js";import"./Star01-B90wIaBV.js";import"./Globe04-TuZvt3ov.js";import"./HardDrive-CrxPr3va.js";import"./Key01-CfvrTjDF.js";import"./LinkExternal01-BYpL3ACE.js";import"./List-D5svP-6k.js";import"./Monitor01-cNkbuWdj.js";import"./Sun-DLqplG3r.js";import"./Palette-Dz_ldMx7.js";import"./Play-CVarwVeR.js";import"./Plus-DNCXili3.js";import"./SearchLg-DvsDitCO.js";import"./SearchMd-87dvi4KF.js";import"./Shield01-BT2HQXan.js";import"./Stars01-D1lDEQh2.js";import"./Trash01-BJe3gUZc.js";import"./Upload01-DIYVb8n9.js";import"./User01-DcNAHFa-.js";import"./Users01-q9IKnEsX.js";import"./XClose-DT64mUwh.js";import"./Zap-Br_Hg1wB.js";import"./use-automations-tqGwPES0.js";import"./studio-tools-F5G0urN7.js";import"./useSuspenseInfiniteQuery-BYjapKbe.js";import"./badge-DiKw8RbW.js";import"./checkbox-DhHH_mmR.js";import"./command-Cx8bKs7m.js";import"./index-CPelPFhM.js";import"./dialog-BFPr54WG.js";import"./popover-CKlhZKOG.js";import"./avatar-B2d04wRu.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Dc9VZjfD.js";import"./file-type-icon-D2xX1xnm.js";import"./tab-id-DznSzCvK.js";import"./monaco-editor-D4hwKq5W.js";import"./index-CfigvylE.js";import"./chat-context-BsRUICZs.js";import"./autosend-REHFoRRR.js";import"./hooks-BSiz_AKB.js";import"./decopilot-sse-pool-CiyJzTNT.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-BqQDQsEQ.js";import"./use-decopilot-events-C70DCxcq.js";import"./use-organization-settings-BzhOQtxD.js";import"./types-C0d4Ohpx.js";import"./shell-layout-IYwmwgpp.js";import"./alert-dialog-BbHr6pLd.js";import"./required-auth-layout-DGQr874S.js";import"./use-org-sso-DcXTIOxB.js";import"./integration-icon-Bf1Nt7-n.js";import"./use-navigate-to-agent-CZiiGkPG.js";import"./reusable-new-chat-qqWu133U.js";import"./use-mcp-prompts-K_jp9fAb.js";import"./form-Trt6kqr0.js";import"./label-DjarSga4.js";import"./input-BdpM0TEL.js";import"./drawer-DcfPm_vi.js";import"./collection-search-BgFXdSC0.js";import"./tabs-W14caGou.js";import"./toggle-group-CYFywiUW.js";import"./agent-capabilities-CRvnIg9m.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CmLZ3i0M.js";import"./use-registry-connections-DnT_Dh3O.js";import"./extract-connection-data-5BWVDciX.js";import"./collection-tabs-Cxl16cFM.js";import"./textarea-ConjZ7fN.js";import"./connection-form-helpers-C1s-KSGU.js";import"./authenticate-and-persist-oauth-nkmQY5vG.js";import"./mcp-oauth-DWePFULn.js";import"./connect-desktop-dialog-BWEylyh-.js";import"./select-model-DYpThBVD.js";import"./skeleton-Dl1AhqdL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CyBwf4qC.js";import"./dropdown-menu-BlfYJTRx.js";import"./index-CsAnNpRc.js";import"./toolbar-DR2I0_KA.js";import"./use-debounced-value-DfUpwXh9.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B0huGKlG.js";import"./use-mcp-tools-DkI8MzuJ.js";import"./use-capability-CqEMs0z_.js";import"./tools-list-DL49NRaT.js";import"./switch-B9wSH4oe.js";import"./use-debounced-autosave-BPwP00mx.js";import"./index-BMxNGICG.js";import"./search-input-DJ05ViVl.js";import"./github-repo-picker-CTMAbHxR.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-BBj5PT7D.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./config-ByOdiANb.js";import"./toolbar-icon-button-Cf6OwFTU.js";import"./calendar-Dh7ySVQi.js";import"./use-file-configs-DGZxsbJi.js";import"./automation-list-row-xAynmOqb.js";function Tt(l,t){const s=(l.title||l.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),f=/^[A-Za-z]/.test(s)&&s.length>0?s:"Section",a=Bt(t,f);return{blockKey:a,data:{__resolveType:l.resolveType,name:a}}}function jr(l){const t=yt.c(77),{orgSlug:s,virtualMcpId:f,branch:a,blockKey:i,block:n,meta:m,decofile:c,title:Z,excludeFields:G,schemaPending:at,previewBaseUrl:nt}=l,H=at===void 0?!1:at,u=nt===void 0?null:nt,x=typeof n?.__resolveType=="string"?n.__resolveType:"";let C;t[0]!==G||t[1]!==m||t[2]!==x?(C=wt(x,m,G),t[0]=G,t[1]=m,t[2]=x,t[3]=C):C=t[3];const h=C;let R;t[4]!==h?(R=!!h&&Object.keys(h.properties??{}).length>0,t[4]=h,t[5]=R):R=t[5];const J=R;let E;t[6]!==n||t[7]!==i||t[8]!==m||t[9]!==Z?(E=Z??(n?At(i,n,m):i),t[6]=n,t[7]=i,t[8]=m,t[9]=Z,t[10]=E):E=t[10];const v=E;let K;t[11]!==a||t[12]!==s||t[13]!==f?(K={orgSlug:s,virtualMcpId:f,branch:a},t[11]=a,t[12]=s,t[13]=f,t[14]=K):K=t[14];const{save:b,flush:Q,isPending:W}=Nt(K);let F;t[15]!==a||t[16]!==s||t[17]!==f?(F={orgSlug:s,virtualMcpId:f,branch:a},t[15]=a,t[16]=s,t[17]=f,t[18]=F):F=t[18];const X=Ct(F);let T;t[19]!==b?(T=Et((e,r)=>b(e,r)),t[19]=b,t[20]=T):T=t[20];const Y=T,[ht,xt]=w.useState(i),[tt,ct]=w.useState(null),[et,dt]=w.useState(0);let $;t[21]===Symbol.for("react.memo_cache_sentinel")?($=[],t[21]=$):$=t[21];const[p,ft]=w.useState($),[ot,rt]=w.useState(!1),P=w.useRef(null);ht!==i&&(xt(i),ct(null),dt(Pt),ft([]));let O;t[22]!==n?(O=n??{},t[22]=n,t[23]=O):O=t[23];const it=O;let y;t[24]!==tt?(y=tt??{},t[24]=tt,t[25]=y):y=t[25];let z;t[26]!==it||t[27]!==y?(z={...it,...y},t[26]=it,t[27]=y,t[28]=z):z=t[28];const mt=z;let L;t[29]!==i||t[30]!==x||t[31]!==b?(L=e=>{const r=e;ct(r),b(i,{...r,__resolveType:x})},t[29]=i,t[30]=x,t[31]=b,t[32]=L):L=t[32];const st=L;let V;t[33]===Symbol.for("react.memo_cache_sentinel")?(V=e=>{ft(e)},t[33]=V):V=t[33];const pt=V;let q;t[34]!==c||t[35]!==Q||t[36]!==X?(q=async(e,r)=>{try{const{blockKey:d,data:N}=Tt(e,c);await X.mutateAsync({blockKey:d,data:N}),ut.success(`Created section "${d}"`),r({__resolveType:d}),Q()}catch(d){const N=d,bt=N instanceof Error?N.message:"Could not add section";throw ut.error(bt),N}},t[34]=c,t[35]=Q,t[36]=X,t[37]=q):q=t[37];const g=q;let I;t[38]===Symbol.for("react.memo_cache_sentinel")?(I=e=>{P.current=e.append,rt(!0)},t[38]=I):I=t[38];const vt=I;let U;t[39]!==g?(U=async e=>{const r=P.current;if(r)try{await g(e,d=>{r(d),rt(!1),P.current=null})}catch{}},t[39]=g,t[40]=U):U=t[40];const lt=U;let D;t[41]!==p||t[42]!==v?(D=p.length>0?[v,...p]:[],t[41]=p,t[42]=v,t[43]=D):D=t[43];const A=D;let S;t[44]!==p||t[45]!==A||t[46]!==v?(S=A.length>0?o.jsx("nav",{"aria-label":"Editing breadcrumb",className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:A.map((e,r)=>{const d=r===A.length-1;return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[r>0&&o.jsx(_t,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{pt(r===0?[]:Rt(p,r)),dt($t)},title:e,className:gt("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",d?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:e})]},`${e}-${r}`)})}):o.jsx("span",{className:"text-sm font-medium",children:v}),t[44]=p,t[45]=A,t[46]=v,t[47]=S):S=t[47];let _;t[48]!==W?(_=o.jsx(Kt,{isPending:W,isError:!1}),t[48]=W,t[49]=_):_=t[49];let j;t[50]!==S||t[51]!==_?(j=o.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[S,_]}),t[50]=S,t[51]=_,t[52]=j):j=t[52];let k;t[53]!==i||t[54]!==p||t[55]!==c||t[56]!==mt||t[57]!==et||t[58]!==g||t[59]!==st||t[60]!==J||t[61]!==m||t[62]!==u||t[63]!==Y||t[64]!==h||t[65]!==H?(k=o.jsx(jt,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsx("div",{className:"mx-auto max-w-xl",children:J?o.jsx(Ft,{schema:h,value:mt,onChange:st,basePath:"",breadcrumbPath:p,onBreadcrumbChange:pt,decofile:c,meta:m,onSaveReferencedBlock:Y,previewBaseUrl:u,onAddSectionItem:g,onRequestAddSection:vt},`${i}:${et}`):H?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(St,{size:16,className:"animate-spin"}),"Loading app schema…"]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:"No editable schema found for this app."})})})}),t[53]=i,t[54]=p,t[55]=c,t[56]=mt,t[57]=et,t[58]=g,t[59]=st,t[60]=J,t[61]=m,t[62]=u,t[63]=Y,t[64]=h,t[65]=H,t[66]=k):k=t[66];let B;t[67]!==ot||t[68]!==c||t[69]!==lt||t[70]!==m||t[71]!==u?(B=u&&o.jsx(kt,{open:ot,onOpenChange:e=>{rt(e),e||(P.current=null)},meta:m,decofile:c,previewBaseUrl:u,onSelect:e=>{lt(e)}}),t[67]=ot,t[68]=c,t[69]=lt,t[70]=m,t[71]=u,t[72]=B):B=t[72];let M;return t[73]!==j||t[74]!==k||t[75]!==B?(M=o.jsxs("div",{className:"flex h-full flex-col",children:[j,k,B]}),t[73]=j,t[74]=k,t[75]=B,t[76]=M):M=t[76],M}function $t(l){return l+1}function Pt(l){return l+1}export{jr as AppEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,j as o,Z as L,b as M,r as T,B as $,M as N}from"./index-CLj_5r89.js";import{s as q}from"./Plus-DNCXili3.js";import{i as S}from"./Zap-Br_Hg1wB.js";import{S as D}from"./search-input-DJ05ViVl.js";import{P as l}from"./index-BMxNGICG.js";import{E as b}from"./empty-state-CeXPb2VU.js";import{c as O}from"./use-automations-tqGwPES0.js";import{c as V}from"./use-navigate-to-agent-CZiiGkPG.js";import{A as Z}from"./automation-list-row-xAynmOqb.js";import{e as F}from"./constants-B72Xmt_K.js";import{a as G}from"./use-virtual-mcp-D3UxifiP.js";import{R as H}from"./require-capability-CYDVRBkW.js";import"./SearchMd-87dvi4KF.js";import"./sidebar-B_c4VYke.js";import"./LayoutLeft-Cog6SqwZ.js";import"./use-mobile-BJ6No951.js";import"./X-CYIGv8wX.js";import"./tooltip-C51X6QKO.js";import"./use-mcp-client-3hG4jk-y.js";import"./auth-BEQgA40y.js";import"./studio-tools-F5G0urN7.js";import"./hooks-BSiz_AKB.js";import"./decopilot-sse-pool-CiyJzTNT.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-qqWu133U.js";import"./alert-dialog-BbHr6pLd.js";import"./dropdown-menu-BlfYJTRx.js";import"./Check-VVh423TU.js";import"./ChevronRight-Ceh-WF7H.js";import"./Circle-DNMct17O.js";import"./Stars02-LnA0-zz4.js";import"./DotsVertical-Cr4sUrn_.js";import"./Trash01-BJe3gUZc.js";import"./agent-icon-EdtPDJXM.js";import"./AlertCircle-Db_5w_pO.js";import"./Tool01-dGPltLKJ.js";import"./SwitchHorizontal01-C9ua90Hw.js";import"./Settings02-D7asukv0.js";import"./XCircle-29rFa-09.js";import"./ArrowUpRight-B2VxdxbH.js";import"./ZapSquare-0BsdXZY9.js";import"./Users03-BMw5o14D.js";import"./Loading02-D2Hh17zb.js";import"./CheckCircle-auAoHYRc.js";import"./ChevronDown-mDFyCzyV.js";import"./ChevronUp-D03XJ0vS.js";import"./Copy01-CuSfBG1R.js";import"./ZoomOut-Dqj1q_yU.js";import"./Globe01-DkdmhUM8.js";import"./Eye-aR-oC6dj.js";import"./FilterLines-Cr2IL8ug.js";import"./Star01-B90wIaBV.js";import"./Globe04-TuZvt3ov.js";import"./HardDrive-CrxPr3va.js";import"./Key01-CfvrTjDF.js";import"./LinkExternal01-BYpL3ACE.js";import"./List-D5svP-6k.js";import"./Monitor01-cNkbuWdj.js";import"./Sun-DLqplG3r.js";import"./Palette-Dz_ldMx7.js";import"./Play-CVarwVeR.js";import"./SearchLg-DvsDitCO.js";import"./Shield01-BT2HQXan.js";import"./Stars01-D1lDEQh2.js";import"./Upload01-DIYVb8n9.js";import"./User01-DcNAHFa-.js";import"./Users01-q9IKnEsX.js";import"./XClose-DT64mUwh.js";import"./use-collections-Y12o4qWE.js";import"./use-capability-CqEMs0z_.js";import"./access-gate-033kBvzX.js";import"./capability-load-error-Dg3eOVDS.js";function J(){const t=B.c(16),{org:i}=L(),{data:w}=O(void 0),u=w===void 0?[]:w,R=G(),k=V(),d=M(),[f,E]=T.useState(""),g=f.toLowerCase(),y=new Map(R.map(K)),C=u.filter(e=>{if(!g||e.name.toLowerCase().includes(g))return!0;if(e.virtual_mcp_id){const a=y.get(e.virtual_mcp_id);if(a&&a.title.toLowerCase().includes(g))return!0}return!1}),P=(e,a)=>{const A=a&&y.has(a)?a:F(i.id);N("automations_list_row_clicked",{automation_id:e,agent_id:A,source:"settings_automations"}),k(A,{search:{main:"automation:"+e}})};let n;t[0]!==d||t[1]!==i.slug?(n=()=>{N("automations_empty_state_browse_agents_clicked"),d({to:"/$org/settings/agents",params:{org:i.slug}})},t[0]=d,t[1]=i.slug,t[2]=n):n=t[2];const z=n,x=l,h=l,j=l;let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(l.Title,{children:"Automations"}),t[3]=p):p=t[3];const _=u.length>0&&o.jsx(D,{value:f,onChange:E,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let r;t[4]!==_?(r=o.jsxs("div",{className:"flex flex-col gap-6",children:[p,_]}),t[4]=_,t[5]=r):r=t[5];const v=u.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:o.jsxs($,{size:"sm",onClick:z,children:[o.jsx(q,{size:14}),"Browse agents"]})})}):C.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(b,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${f}"`})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:C.map(e=>o.jsx(Z,{automation:e,showAgent:!0,onClick:()=>P(e.id,e.virtual_mcp_id)},e.id))});let s;t[6]!==j.Body||t[7]!==r||t[8]!==v?(s=o.jsxs(j.Body,{children:[r,v]}),t[6]=j.Body,t[7]=r,t[8]=v,t[9]=s):s=t[9];let m;t[10]!==h.Content||t[11]!==s?(m=o.jsx(h.Content,{children:s}),t[10]=h.Content,t[11]=s,t[12]=m):m=t[12];let c;return t[13]!==x||t[14]!==m?(c=o.jsx(x,{children:m}),t[13]=x,t[14]=m,t[15]=c):c=t[15],c}function K(t){return[t.id,t]}function fo(){const t=B.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(H,{capability:"automations:manage",area:"automations",children:o.jsx(J,{})}),t[0]=i):i=t[0],i}export{fo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as q,r as S,l as Q,j as t,B as I,i as V,t as U}from"./index-CLj_5r89.js";import{i as X}from"./XCircle-29rFa-09.js";import{aG as Y,aa as T}from"./agent-icon-EdtPDJXM.js";import{n as Z}from"./LinkExternal01-BYpL3ACE.js";import{f as K,a as _,b as tt,c as et,d as ot,e as rt,A as it,g as st}from"./alert-dialog-BbHr6pLd.js";import{I as L}from"./input-BdpM0TEL.js";import{L as G}from"./label-DjarSga4.js";import{aH as at,aI as mt,aR as nt,aG as lt,aJ as B,aL as pt,aS as ct}from"./index-gz1tAOXr.js";import{c as dt,B as ut,a as gt}from"./block-document-CPFtVEpa.js";import{u as xt,s as v,E as ft}from"./primitives-CAgzIvjA.js";import{t as ht}from"./ChevronDown-mDFyCzyV.js";import{J as jt,K as yt,I as vt}from"./automation-runs-D98OdVC5.js";import"./AlertCircle-Db_5w_pO.js";import"./Tool01-dGPltLKJ.js";import"./SwitchHorizontal01-C9ua90Hw.js";import"./Settings02-D7asukv0.js";import"./ArrowUpRight-B2VxdxbH.js";import"./ZapSquare-0BsdXZY9.js";import"./Users03-BMw5o14D.js";import"./Loading02-D2Hh17zb.js";import"./CheckCircle-auAoHYRc.js";import"./Check-VVh423TU.js";import"./ChevronRight-Ceh-WF7H.js";import"./ChevronUp-D03XJ0vS.js";import"./Circle-DNMct17O.js";import"./Stars02-LnA0-zz4.js";import"./Copy01-CuSfBG1R.js";import"./ZoomOut-Dqj1q_yU.js";import"./DotsVertical-Cr4sUrn_.js";import"./Globe01-DkdmhUM8.js";import"./Eye-aR-oC6dj.js";import"./FilterLines-Cr2IL8ug.js";import"./Star01-B90wIaBV.js";import"./Globe04-TuZvt3ov.js";import"./HardDrive-CrxPr3va.js";import"./Key01-CfvrTjDF.js";import"./LayoutLeft-Cog6SqwZ.js";import"./List-D5svP-6k.js";import"./Monitor01-cNkbuWdj.js";import"./Sun-DLqplG3r.js";import"./Palette-Dz_ldMx7.js";import"./Play-CVarwVeR.js";import"./Plus-DNCXili3.js";import"./SearchLg-DvsDitCO.js";import"./SearchMd-87dvi4KF.js";import"./Shield01-BT2HQXan.js";import"./Stars01-D1lDEQh2.js";import"./Trash01-BJe3gUZc.js";import"./Upload01-DIYVb8n9.js";import"./User01-DcNAHFa-.js";import"./Users01-q9IKnEsX.js";import"./XClose-DT64mUwh.js";import"./X-CYIGv8wX.js";import"./Zap-Br_Hg1wB.js";import"./chat-context-BsRUICZs.js";import"./autosend-REHFoRRR.js";import"./hooks-BSiz_AKB.js";import"./use-mcp-client-3hG4jk-y.js";import"./constants-B72Xmt_K.js";import"./auth-BEQgA40y.js";import"./decopilot-sse-pool-CiyJzTNT.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-D3UxifiP.js";import"./use-collections-Y12o4qWE.js";import"./use-ai-providers-BqQDQsEQ.js";import"./studio-tools-F5G0urN7.js";import"./use-decopilot-events-C70DCxcq.js";import"./tab-id-DznSzCvK.js";import"./use-organization-settings-BzhOQtxD.js";import"./tooltip-C51X6QKO.js";import"./dialog-BFPr54WG.js";import"./drawer-DcfPm_vi.js";import"./collection-search-BgFXdSC0.js";import"./use-mobile-BJ6No951.js";import"./use-mcp-prompts-K_jp9fAb.js";import"./shell-layout-IYwmwgpp.js";import"./avatar-B2d04wRu.js";import"./required-auth-layout-DGQr874S.js";import"./use-org-sso-DcXTIOxB.js";import"./form-Trt6kqr0.js";import"./select-CeXH3gjW.js";import"./tabs-W14caGou.js";import"./toggle-group-CYFywiUW.js";import"./agent-capabilities-CRvnIg9m.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CmLZ3i0M.js";import"./use-registry-connections-DnT_Dh3O.js";import"./use-connection-D5Vs5qOp.js";import"./useInfiniteQuery-8DjDwhQn.js";import"./use-infinite-scroll-BU44dmI-.js";import"./extract-connection-data-5BWVDciX.js";import"./card-D5CauofV.js";import"./integration-icon-Bf1Nt7-n.js";import"./collection-tabs-Cxl16cFM.js";import"./badge-DiKw8RbW.js";import"./textarea-ConjZ7fN.js";import"./connection-form-helpers-C1s-KSGU.js";import"./authenticate-and-persist-oauth-nkmQY5vG.js";import"./mcp-oauth-DWePFULn.js";import"./useSuspenseInfiniteQuery-BYjapKbe.js";import"./connect-desktop-dialog-BWEylyh-.js";import"./select-model-DYpThBVD.js";import"./checkbox-DhHH_mmR.js";import"./skeleton-Dl1AhqdL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CyBwf4qC.js";import"./command-Cx8bKs7m.js";import"./index-CPelPFhM.js";import"./popover-CKlhZKOG.js";import"./dropdown-menu-BlfYJTRx.js";import"./index-CsAnNpRc.js";import"./file-type-icon-D2xX1xnm.js";import"./toolbar-DR2I0_KA.js";import"./use-debounced-value-DfUpwXh9.js";import"./index-CfigvylE.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B0huGKlG.js";import"./empty-state-CeXPb2VU.js";import"./use-mcp-tools-DkI8MzuJ.js";import"./types-C0d4Ohpx.js";import"./use-capability-CqEMs0z_.js";import"./tools-list-DL49NRaT.js";import"./switch-B9wSH4oe.js";import"./use-debounced-autosave-BPwP00mx.js";import"./index-BMxNGICG.js";import"./sidebar-B_c4VYke.js";import"./search-input-DJ05ViVl.js";import"./github-repo-picker-CTMAbHxR.js";import"./use-navigate-to-agent-CZiiGkPG.js";import"./reusable-new-chat-qqWu133U.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-BBj5PT7D.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-members-CcCdz_hQ.js";import"./use-org-auth-client-B7yAA88H.js";import"./config-ByOdiANb.js";import"./toolbar-icon-button-Cf6OwFTU.js";import"./calendar-Dh7ySVQi.js";import"./use-file-configs-DGZxsbJi.js";import"./monaco-editor-D4hwKq5W.js";import"./use-automations-tqGwPES0.js";import"./automation-list-row-xAynmOqb.js";import"./table-C2Aqsz0m.js";import"./use-clock-tick-Bz8Z9860.js";import"./format-time-Cy7tTmZp.js";import"./use-copy-Dc9VZjfD.js";function bt(k){const e=q.c(18),{icon:f,title:n,defaultOpen:b,children:d}=k,D=b===void 0?!1:b,[x,A]=S.useState(D);let l;e[0]!==f?(l=t.jsx(f,{size:15}),e[0]=f,e[1]=l):l=e[1];let i;e[2]!==n?(i=t.jsx("span",{className:"flex-1 text-left",children:n}),e[2]=n,e[3]=i):i=e[3];const h=x&&"rotate-180";let r;e[4]!==h?(r=Q("transition-transform",h),e[4]=h,e[5]=r):r=e[5];let p;e[6]!==r?(p=t.jsx(ht,{size:15,className:r}),e[6]=r,e[7]=p):p=e[7];let c;e[8]!==l||e[9]!==i||e[10]!==p?(c=t.jsx(jt,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[l,i,p]})}),e[8]=l,e[9]=i,e[10]=p,e[11]=c):c=e[11];let s;e[12]!==d?(s=t.jsx(yt,{className:"px-2 pt-4",children:d}),e[12]=d,e[13]=s):s=e[13];let u;return e[14]!==x||e[15]!==c||e[16]!==s?(u=t.jsxs(vt,{open:x,onOpenChange:A,className:"mt-4",children:[c,s]}),e[14]=x,e[15]=c,e[16]=s,e[17]=u):u=e[17],u}function lr({orgSlug:k,virtualMcpId:e,branch:f,blockKey:n,block:b,decofile:d,meta:D,onManagePosts:x,onOpenPost:A,previewBaseUrl:l}){const i=at({orgSlug:k,virtualMcpId:e,branch:f}),h=mt(b,"categories"),[r,p,c]=xt(h,o=>{i.mutate({blockKey:n,data:B(n,"categories",o)})}),s=(o,w)=>p({...r,[o]:w}),u=dt({decofile:d,category:r,previewBaseUrl:l}),a=v(r.slug),[R,j]=S.useState(a),[m,C]=S.useState(null),[N,$]=S.useState(!1),z=a?nt(d).filter(o=>o.categorySlugs.includes(a)):[],y=z.length,H=o=>s("slug",o),J=async(o,w)=>{const W=v(r.name);$(!0);try{let g=0;for(const{key:P,payload:O}of pt(d,"posts")){const F=ct(O,o,{name:W,slug:w});F!==O&&(await i.mutateAsync({blockKey:P,data:B(P,"posts",F)}),g+=1)}const E={...r,slug:w};await i.mutateAsync({blockKey:n,data:B(n,"categories",E)}),c(E),U.success(g>0?`Renamed slug and updated ${g} ${g===1?"post":"posts"}`:"Renamed slug"),C(null)}catch(g){j(o),C(null),U.error(g instanceof Error?g.message:"Rename failed")}finally{$(!1)}},M=()=>{const o=R.trim();if(o===a){R!==o&&j(o);return}if(!o){j(a);return}if(y===0){H(o);return}C({oldSlug:a,newSlug:o,count:y})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:v(r.name)||"Untitled category"}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(lt,{isPending:i.isPending,isError:i.isError}),u&&t.jsxs(I,{type:"button",variant:"outline",size:"sm",title:"Open the category preview in a new tab",onClick:()=>window.open(u,"_blank","noopener,noreferrer"),children:[t.jsx(Z,{size:14}),"See category preview"]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(ft,{value:v(r.name),onChange:o=>s("name",o),placeholder:"Category name",className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(G,{htmlFor:"category-slug",children:"Slug"}),t.jsx(L,{id:"category-slug",value:R,onChange:o=>j(o.target.value),onBlur:M,placeholder:"my-category",className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(G,{htmlFor:"category-description",children:"Description"}),t.jsx(L,{id:"category-description",value:v(r.description),onChange:o=>s("description",o.target.value),placeholder:"Short description for this category",className:"h-10"})]}),t.jsx(bt,{icon:Y,title:"Content",defaultOpen:!0,children:t.jsx(ut,{value:gt(r.sections),onChange:o=>s("sections",o),meta:D,emptyMessage:"This category has no content yet. Use ⊕ to add your first block."})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(T,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"text-sm",children:[y," ",y===1?"post":"posts"," in this category"]})]}),t.jsxs(I,{type:"button",variant:"outline",size:"sm",disabled:!a,title:a?"Pick posts to add to this category":"Set a slug to add posts to this category",onClick:()=>x(a),children:["Add posts",t.jsx(X,{size:14})]})]}),y>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:z.map(o=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>A(o.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(T,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:o.title||"Untitled post"}),o.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:o.slug})]})]})},o.key))})]})]})})]}),t.jsx(K,{open:!!m,onOpenChange:o=>{o||N||(j(a),C(null))},children:t.jsxs(_,{children:[t.jsxs(tt,{children:[t.jsx(et,{children:"Rename category slug?"}),t.jsx(ot,{children:m?`Changing the slug from "${m.oldSlug}" to "${m.newSlug}" will update ${m.count} ${m.count===1?"post":"posts"} that reference this category.`:null})]}),t.jsxs(rt,{children:[t.jsx(it,{disabled:N,children:"Cancel"}),t.jsx(st,{onClick:o=>{o.preventDefault(),m&&J(m.oldSlug,m.newSlug)},disabled:N,children:N?t.jsxs(t.Fragment,{children:[t.jsx(V,{size:14,className:"animate-spin"}),"Renaming…"]}):"Rename & update posts"})]})]})})]})}export{lr as CategoryEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as y,Z as A,k as v,p as w,d as E,K as D}from"./index-CLj_5r89.js";import{u as R}from"./studio-tools-F5G0urN7.js";import{i as B}from"./AlertCircle-Db_5w_pO.js";import{i as K}from"./CheckCircle-auAoHYRc.js";import{i as O}from"./Circle-DNMct17O.js";import{s as L}from"./Eye-aR-oC6dj.js";import{i as M}from"./Loading02-D2Hh17zb.js";function U(){const e=y.c(13),{locator:u}=A(),r=R();let t;e[0]!==u?(t=D.taskBoardItems(u),e[0]=u,e[1]=t):t=e[1];let i;e[2]!==r?(i=async()=>(await r.call("TASK_BOARD_ITEM_LIST",{})).items,e[2]=r,e[3]=i):i=e[3];let a;e[4]!==t||e[5]!==i?(a={queryKey:t,queryFn:i},e[4]=t,e[5]=i,e[6]=a):a=e[6];const o=v(a);let s;e[7]!==o.data?(s=o.data??[],e[7]=o.data,e[8]=s):s=e[8];let l;return e[9]!==o.error||e[10]!==o.isLoading||e[11]!==s?(l={items:s,isLoading:o.isLoading,error:o.error},e[9]=o.error,e[10]=o.isLoading,e[11]=s,e[12]=l):l=e[12],l}function G(){const e=y.c(30),{locator:u}=A(),r=R(),t=w();let i;e[0]!==u?(i=D.taskBoardItems(u),e[0]=u,e[1]=i):i=e[1];const a=i;let o;e[2]!==t||e[3]!==a?(o=()=>t.invalidateQueries({queryKey:a}),e[2]=t,e[3]=a,e[4]=o):o=e[4];const s=o;let l;e[5]!==r?(l=n=>r.call("TASK_BOARD_ITEM_CREATE",n),e[5]=r,e[6]=l):l=e[6];let f;e[7]!==s||e[8]!==l?(f={mutationFn:l,onSuccess:s},e[7]=s,e[8]=l,e[9]=f):f=e[9];const p=E(f);let c;e[10]!==r?(c=n=>r.call("TASK_BOARD_ITEM_UPDATE",n),e[10]=r,e[11]=c):c=e[11];let m,d;e[12]!==t||e[13]!==a?(m=async n=>{await t.cancelQueries({queryKey:a});const N=t.getQueryData(a);return t.setQueryData(a,_=>_?.map(x=>x.id===n.id?{...x,...n}:x)),{previous:N}},d=(n,N,_)=>{_?.previous&&t.setQueryData(a,_.previous)},e[12]=t,e[13]=a,e[14]=m,e[15]=d):(m=e[14],d=e[15]);let b;e[16]!==s||e[17]!==c||e[18]!==m||e[19]!==d?(b={mutationFn:c,onMutate:m,onError:d,onSettled:s},e[16]=s,e[17]=c,e[18]=m,e[19]=d,e[20]=b):b=e[20];const I=E(b);let g;e[21]!==r?(g=n=>r.call("TASK_BOARD_ITEM_DELETE",{id:n}),e[21]=r,e[22]=g):g=e[22];let T;e[23]!==s||e[24]!==g?(T={mutationFn:g,onSuccess:s},e[23]=s,e[24]=g,e[25]=T):T=e[25];const S=E(T);let C;return e[26]!==p||e[27]!==S||e[28]!==I?(C={create:p,update:I,remove:S},e[26]=p,e[27]=S,e[28]=I,e[29]=C):C=e[29],C}const Y=["triage","todo","in_progress","in_review","done"],j={triage:{label:"Triage",icon:B,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:O,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:M,iconClassName:"text-blue-500"},in_review:{label:"In Review",icon:L,iconClassName:"text-amber-500"},done:{label:"Done",icon:K,iconClassName:"text-green-600"}},H=["low","medium","high","urgent"],Z={low:{label:"Low",badgeClassName:"bg-muted text-muted-foreground",flagClassName:"text-muted-foreground"},medium:{label:"Medium",badgeClassName:"bg-blue-500/10 text-blue-600",flagClassName:"text-blue-500"},high:{label:"High",badgeClassName:"bg-orange-500/10 text-orange-600",flagClassName:"text-orange-500"},urgent:{label:"Urgent",badgeClassName:"bg-red-500/10 text-red-600",flagClassName:"text-red-500"}};export{Z as P,j as S,Y as a,H as b,G as c,U as u};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as Z,r as u,j as r,i as se,B as he,dZ as Mt,aL as Dt,aR as ie,d_ as Rt,d$ as Pt,e0 as Et,e1 as kt,bK as Tt,e2 as Ot,e3 as qe,aN as At,e4 as Lt,e5 as Ft,e6 as It,e7 as $t,e8 as _t,e9 as zt,ea as Wt,eb as Gt,ec as Kt,l as ae,p as Bt,t as W,K as $e}from"./index-CLj_5r89.js";import{F as Vt,l as Ut}from"./index-CfigvylE.js";import{i as qt,aC as Qt,aD as Ht,aE as ue,aF as Xt,aa as _e}from"./agent-icon-EdtPDJXM.js";import{a as Jt}from"./Tool01-dGPltLKJ.js";import{s as Yt}from"./XClose-DT64mUwh.js";import{A as Zt}from"./automation-runs-D98OdVC5.js";import{T as ze,a as We,b as Ge}from"./tooltip-C51X6QKO.js";import{f as en,a as tn,b as nn,c as rn,d as on,e as sn,A as an,g as ln}from"./alert-dialog-BbHr6pLd.js";import{a as cn}from"./chat-context-BsRUICZs.js";import{u as dn}from"./shell-layout-IYwmwgpp.js";import{s as fe,a as Ke,f as un}from"./index-gz1tAOXr.js";import{a as fn,b as mn,c as pn,D as xn,d as hn,e as gn}from"./dialog-BFPr54WG.js";import{I as Be}from"./input-BdpM0TEL.js";import{t as vn}from"./ChevronDown-mDFyCzyV.js";import{i as yn}from"./ChevronRight-Ceh-WF7H.js";import{a as Cn}from"./ZoomOut-Dqj1q_yU.js";import{E as wn,v as Ve,w as Ce,x as bn,y as jn,z as Nn,A as V,C as me,g as we,D as be,G as Sn,I as Mn,J as je,K as pe,M as Ne,N as Dn,O as Rn}from"./index-CsAnNpRc.js";import"./AlertCircle-Db_5w_pO.js";import"./SwitchHorizontal01-C9ua90Hw.js";import"./Settings02-D7asukv0.js";import"./XCircle-29rFa-09.js";import"./ArrowUpRight-B2VxdxbH.js";import"./ZapSquare-0BsdXZY9.js";import"./Users03-BMw5o14D.js";import"./Loading02-D2Hh17zb.js";import"./CheckCircle-auAoHYRc.js";import"./Check-VVh423TU.js";import"./ChevronUp-D03XJ0vS.js";import"./Circle-DNMct17O.js";import"./Stars02-LnA0-zz4.js";import"./Copy01-CuSfBG1R.js";import"./DotsVertical-Cr4sUrn_.js";import"./Globe01-DkdmhUM8.js";import"./Eye-aR-oC6dj.js";import"./FilterLines-Cr2IL8ug.js";import"./Star01-B90wIaBV.js";import"./Globe04-TuZvt3ov.js";import"./HardDrive-CrxPr3va.js";import"./Key01-CfvrTjDF.js";import"./LayoutLeft-Cog6SqwZ.js";import"./LinkExternal01-BYpL3ACE.js";import"./List-D5svP-6k.js";import"./Monitor01-cNkbuWdj.js";import"./Sun-DLqplG3r.js";import"./Palette-Dz_ldMx7.js";import"./Play-CVarwVeR.js";import"./Plus-DNCXili3.js";import"./SearchLg-DvsDitCO.js";import"./SearchMd-87dvi4KF.js";import"./Shield01-BT2HQXan.js";import"./Stars01-D1lDEQh2.js";import"./Trash01-BJe3gUZc.js";import"./Upload01-DIYVb8n9.js";import"./User01-DcNAHFa-.js";import"./Users01-q9IKnEsX.js";import"./X-CYIGv8wX.js";import"./Zap-Br_Hg1wB.js";import"./select-CeXH3gjW.js";import"./useInfiniteQuery-8DjDwhQn.js";import"./use-infinite-scroll-BU44dmI-.js";import"./use-connection-D5Vs5qOp.js";import"./use-collections-Y12o4qWE.js";import"./use-mcp-client-3hG4jk-y.js";import"./constants-B72Xmt_K.js";import"./auth-BEQgA40y.js";import"./use-virtual-mcp-D3UxifiP.js";import"./card-D5CauofV.js";import"./sidebar-B_c4VYke.js";import"./use-mobile-BJ6No951.js";import"./table-C2Aqsz0m.js";import"./empty-state-CeXPb2VU.js";import"./use-members-CcCdz_hQ.js";import"./use-org-auth-client-B7yAA88H.js";import"./use-clock-tick-Bz8Z9860.js";import"./use-automations-tqGwPES0.js";import"./studio-tools-F5G0urN7.js";import"./useSuspenseInfiniteQuery-BYjapKbe.js";import"./badge-DiKw8RbW.js";import"./checkbox-DhHH_mmR.js";import"./command-Cx8bKs7m.js";import"./index-CPelPFhM.js";import"./popover-CKlhZKOG.js";import"./avatar-B2d04wRu.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Dc9VZjfD.js";import"./file-type-icon-D2xX1xnm.js";import"./tab-id-DznSzCvK.js";import"./monaco-editor-D4hwKq5W.js";import"./delay-CnY5UFtP.js";import"./types-C0d4Ohpx.js";import"./hooks-BSiz_AKB.js";import"./decopilot-sse-pool-CiyJzTNT.js";import"./backoff-CrEUbyZT.js";import"./integration-icon-Bf1Nt7-n.js";import"./use-navigate-to-agent-CZiiGkPG.js";import"./reusable-new-chat-qqWu133U.js";import"./use-mcp-prompts-K_jp9fAb.js";import"./form-Trt6kqr0.js";import"./label-DjarSga4.js";import"./autosend-REHFoRRR.js";import"./use-ai-providers-BqQDQsEQ.js";import"./use-decopilot-events-C70DCxcq.js";import"./use-organization-settings-BzhOQtxD.js";import"./required-auth-layout-DGQr874S.js";import"./use-org-sso-DcXTIOxB.js";import"./drawer-DcfPm_vi.js";import"./collection-search-BgFXdSC0.js";import"./tabs-W14caGou.js";import"./toggle-group-CYFywiUW.js";import"./agent-capabilities-CRvnIg9m.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CmLZ3i0M.js";import"./use-registry-connections-DnT_Dh3O.js";import"./extract-connection-data-5BWVDciX.js";import"./collection-tabs-Cxl16cFM.js";import"./textarea-ConjZ7fN.js";import"./connection-form-helpers-C1s-KSGU.js";import"./authenticate-and-persist-oauth-nkmQY5vG.js";import"./mcp-oauth-DWePFULn.js";import"./connect-desktop-dialog-BWEylyh-.js";import"./select-model-DYpThBVD.js";import"./skeleton-Dl1AhqdL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CyBwf4qC.js";import"./dropdown-menu-BlfYJTRx.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B0huGKlG.js";import"./toolbar-DR2I0_KA.js";import"./use-mcp-tools-DkI8MzuJ.js";import"./use-capability-CqEMs0z_.js";import"./tools-list-DL49NRaT.js";import"./switch-B9wSH4oe.js";import"./use-debounced-autosave-BPwP00mx.js";import"./index-BMxNGICG.js";import"./search-input-DJ05ViVl.js";import"./github-repo-picker-CTMAbHxR.js";import"./use-debounced-value-DfUpwXh9.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-BBj5PT7D.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./config-ByOdiANb.js";import"./toolbar-icon-button-Cf6OwFTU.js";import"./calendar-Dh7ySVQi.js";import"./use-file-configs-DGZxsbJi.js";import"./automation-list-row-xAynmOqb.js";const Pn={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function En(s){const e=Z.c(51),{open:i,mode:a,initialName:c,parentLabel:m,isPending:x,onSubmit:p,onOpenChange:g}=s,M=c===void 0?"":c,d=x===void 0?!1:x,[h,y]=u.useState(M),[B,U]=u.useState(i),C=Pn[a];i!==B&&(U(i),i&&y(M));let I;e[0]!==d||e[1]!==g?(I=_=>{!_&&!d&&g(!1)},e[0]=d,e[1]=g,e[2]=I):I=e[2];const H=I;let q;e[3]!==d||e[4]!==h||e[5]!==p?(q=async _=>{_.preventDefault();const K=h.trim();!K||d||await p(K)},e[3]=d,e[4]=h,e[5]=p,e[6]=q):q=e[6];const Q=q;let $;e[7]!==C.title?($=r.jsx(fn,{children:C.title}),e[7]=C.title,e[8]=$):$=e[8];let T;e[9]!==C.description?(T=r.jsx(mn,{children:C.description}),e[9]=C.description,e[10]=T):T=e[10];let G;e[11]!==$||e[12]!==T?(G=r.jsxs(pn,{children:[$,T]}),e[11]=$,e[12]=T,e[13]=G):G=e[13];let O;e[14]!==m?(O=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),r.jsx(Be,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=m,e[15]=O):O=e[15];let A;e[16]===Symbol.for("react.memo_cache_sentinel")?(A=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=A):A=e[16];let R;e[17]===Symbol.for("react.memo_cache_sentinel")?(R=_=>y(_.target.value),e[17]=R):R=e[17];let P;e[18]!==C.placeholder||e[19]!==d||e[20]!==h?(P=r.jsxs("div",{className:"space-y-1.5",children:[A,r.jsx(Be,{id:"file-explorer-name",value:h,onChange:R,placeholder:C.placeholder,autoFocus:!0,disabled:d})]}),e[18]=C.placeholder,e[19]=d,e[20]=h,e[21]=P):P=e[21];let j;e[22]!==P||e[23]!==O?(j=r.jsxs("div",{className:"space-y-4 py-4",children:[O,P]}),e[22]=P,e[23]=O,e[24]=j):j=e[24];let N;e[25]!==g?(N=()=>g(!1),e[25]=g,e[26]=N):N=e[26];let E;e[27]!==d||e[28]!==N?(E=r.jsx(he,{type:"button",variant:"outline",onClick:N,disabled:d,children:"Cancel"}),e[27]=d,e[28]=N,e[29]=E):E=e[29];let k;e[30]!==d||e[31]!==h?(k=!h.trim()||d,e[30]=d,e[31]=h,e[32]=k):k=e[32];let w;e[33]!==C.submit||e[34]!==d?(w=d?r.jsxs(r.Fragment,{children:[r.jsx(se,{size:14,className:"animate-spin"}),"Saving…"]}):C.submit,e[33]=C.submit,e[34]=d,e[35]=w):w=e[35];let L;e[36]!==k||e[37]!==w?(L=r.jsx(he,{type:"submit",disabled:k,children:w}),e[36]=k,e[37]=w,e[38]=L):L=e[38];let b;e[39]!==E||e[40]!==L?(b=r.jsxs(xn,{children:[E,L]}),e[39]=E,e[40]=L,e[41]=b):b=e[41];let S;e[42]!==Q||e[43]!==j||e[44]!==b||e[45]!==G?(S=r.jsx(hn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:Q,children:[G,j,b]})}),e[42]=Q,e[43]=j,e[44]=b,e[45]=G,e[46]=S):S=e[46];let z;return e[47]!==H||e[48]!==i||e[49]!==S?(z=r.jsx(gn,{open:i,onOpenChange:H,children:S}),e[47]=H,e[48]=i,e[49]=S,e[50]=z):z=e[50],z}var Me="ContextMenu",[kn]=At(Me,[qe]),F=qe(),[Tn,Qe]=kn(Me),He=s=>{const{__scopeContextMenu:e,children:i,onOpenChange:a,dir:c,modal:m=!0}=s,[x,p]=u.useState(!1),g=F(e),M=Tt(a),d=u.useCallback(h=>{p(h),M(h)},[M]);return r.jsx(Tn,{scope:e,open:x,onOpenChange:d,modal:m,children:r.jsx(Ot,{...g,dir:c,open:x,onOpenChange:d,modal:m,children:i})})};He.displayName=Me;var Xe="ContextMenuTrigger",Je=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,disabled:a=!1,...c}=s,m=Qe(Xe,i),x=F(i),p=u.useRef({x:0,y:0}),g=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...p.current})}),M=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(M.current),[]),h=y=>{p.current={x:y.clientX,y:y.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(Mt,{...x,virtualRef:g}),r.jsx(Dt.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...c,ref:e,style:{WebkitTouchCallout:"none",...s.style},onContextMenu:a?s.onContextMenu:ie(s.onContextMenu,y=>{d(),h(y),y.preventDefault()}),onPointerDown:a?s.onPointerDown:ie(s.onPointerDown,xe(y=>{d(),M.current=window.setTimeout(()=>h(y),700)})),onPointerMove:a?s.onPointerMove:ie(s.onPointerMove,xe(d)),onPointerCancel:a?s.onPointerCancel:ie(s.onPointerCancel,xe(d)),onPointerUp:a?s.onPointerUp:ie(s.onPointerUp,xe(d))})]})});Je.displayName=Xe;var On="ContextMenuPortal",Ye=s=>{const{__scopeContextMenu:e,...i}=s,a=F(e);return r.jsx(Et,{...a,...i})};Ye.displayName=On;var Ze="ContextMenuContent",et=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=Qe(Ze,i),m=F(i),x=u.useRef(!1);return r.jsx(kt,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:p=>{s.onCloseAutoFocus?.(p),!p.defaultPrevented&&x.current&&p.preventDefault(),x.current=!1},onInteractOutside:p=>{s.onInteractOutside?.(p),!p.defaultPrevented&&!c.modal&&(x.current=!0)},style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});et.displayName=Ze;var An="ContextMenuGroup",Ln=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Lt,{...c,...a,ref:e})});Ln.displayName=An;var Fn="ContextMenuLabel",In=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Ft,{...c,...a,ref:e})});In.displayName=Fn;var $n="ContextMenuItem",tt=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Rt,{...c,...a,ref:e})});tt.displayName=$n;var _n="ContextMenuCheckboxItem",zn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(It,{...c,...a,ref:e})});zn.displayName=_n;var Wn="ContextMenuRadioGroup",Gn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx($t,{...c,...a,ref:e})});Gn.displayName=Wn;var Kn="ContextMenuRadioItem",Bn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(_t,{...c,...a,ref:e})});Bn.displayName=Kn;var Vn="ContextMenuItemIndicator",Un=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(zt,{...c,...a,ref:e})});Un.displayName=Vn;var qn="ContextMenuSeparator",nt=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Pt,{...c,...a,ref:e})});nt.displayName=qn;var Qn="ContextMenuArrow",Hn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Wt,{...c,...a,ref:e})});Hn.displayName=Qn;var Xn="ContextMenuSubTrigger",Jn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Gt,{...c,...a,ref:e})});Jn.displayName=Xn;var Yn="ContextMenuSubContent",Zn=u.forwardRef((s,e)=>{const{__scopeContextMenu:i,...a}=s,c=F(i);return r.jsx(Kt,{...c,...a,ref:e,style:{...s.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Zn.displayName=Yn;function xe(s){return e=>e.pointerType!=="mouse"?s(e):void 0}var er=He,tr=Je,nr=Ye,rr=et,or=tt,ir=nt;function sr(s){const e=Z.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(er,{"data-slot":"context-menu",...i}),e[2]=i,e[3]=a):a=e[3],a}function ar(s){const e=Z.c(4);let i;e[0]!==s?({...i}=s,e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==i?(a=r.jsx(tr,{"data-slot":"context-menu-trigger",...i}),e[2]=i,e[3]=a):a=e[3],a}function lr(s){const e=Z.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ae("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",i),e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(nr,{children:r.jsx(rr,{"data-slot":"context-menu-content",className:c,...a})}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}function te(s){const e=Z.c(12);let i,a,c,m;e[0]!==s?({className:i,inset:a,variant:m,...c}=s,e[0]=s,e[1]=i,e[2]=a,e[3]=c,e[4]=m):(i=e[1],a=e[2],c=e[3],m=e[4]);const x=m===void 0?"default":m;let p;e[5]!==i?(p=ae("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=p):p=e[6];let g;return e[7]!==a||e[8]!==c||e[9]!==p||e[10]!==x?(g=r.jsx(or,{"data-slot":"context-menu-item","data-inset":a,"data-variant":x,className:p,...c}),e[7]=a,e[8]=c,e[9]=p,e[10]=x,e[11]=g):g=e[11],g}function Ue(s){const e=Z.c(8);let i,a;e[0]!==s?({className:i,...a}=s,e[0]=s,e[1]=i,e[2]=a):(i=e[1],a=e[2]);let c;e[3]!==i?(c=ae("bg-border -mx-1 my-1 h-px",i),e[3]=i,e[4]=c):c=e[4];let m;return e[5]!==a||e[6]!==c?(m=r.jsx(ir,{"data-slot":"context-menu-separator",className:c,...a}),e[5]=a,e[6]=c,e[7]=m):m=e[7],m}const cr="#d9a441";function dr(s){const e=Z.c(45),{node:i,depth:a,isExpanded:c,isSelected:m,isLoading:x,fileVisual:p,onOpen:g,onSelect:M,onNewFile:d,onNewFolder:h,onCopyPath:y,onCopyRelativePath:B,onRename:U,onDelete:C}=s,I=x===void 0?!1:x,H=i.kind==="directory",{Icon:q,color:Q}=p,$=m&&"bg-accent";let T;e[0]!==$?(T=ae("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",$),e[0]=$,e[1]=T):T=e[1];const G=`${a*14+8}px`;let O;e[2]!==G?(O={paddingLeft:G},e[2]=G,e[3]=O):O=e[3];let A;e[4]!==g||e[5]!==M?(A=()=>{M(),g()},e[4]=g,e[5]=M,e[6]=A):A=e[6];let R;e[7]!==q||e[8]!==Q||e[9]!==H||e[10]!==c||e[11]!==I?(R=H?r.jsxs(r.Fragment,{children:[I?r.jsx(se,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):c?r.jsx(vn,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(yn,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(Cn,{size:16,className:"shrink-0",style:{color:cr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(q,{size:16,className:"shrink-0",style:{color:Q}})]}),e[7]=q,e[8]=Q,e[9]=H,e[10]=c,e[11]=I,e[12]=R):R=e[12];let P;e[13]!==i.name?(P=r.jsx("span",{className:"truncate",children:i.name}),e[13]=i.name,e[14]=P):P=e[14];let j;e[15]!==T||e[16]!==O||e[17]!==A||e[18]!==R||e[19]!==P?(j=r.jsx(ar,{asChild:!0,children:r.jsxs("button",{type:"button",className:T,style:O,onClick:A,children:[R,P]})}),e[15]=T,e[16]=O,e[17]=A,e[18]=R,e[19]=P,e[20]=j):j=e[20];let N;e[21]!==d?(N=r.jsx(te,{onSelect:d,children:"New File"}),e[21]=d,e[22]=N):N=e[22];let E;e[23]!==h?(E=r.jsx(te,{onSelect:h,children:"New Folder"}),e[23]=h,e[24]=E):E=e[24];let k;e[25]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Ue,{}),e[25]=k):k=e[25];let w;e[26]!==y?(w=r.jsx(te,{onSelect:y,children:"Copy Path"}),e[26]=y,e[27]=w):w=e[27];let L;e[28]!==B?(L=r.jsx(te,{onSelect:B,children:"Copy Relative Path"}),e[28]=B,e[29]=L):L=e[29];let b;e[30]===Symbol.for("react.memo_cache_sentinel")?(b=r.jsx(Ue,{}),e[30]=b):b=e[30];let S;e[31]!==U?(S=r.jsx(te,{onSelect:U,children:"Rename"}),e[31]=U,e[32]=S):S=e[32];let z;e[33]!==C?(z=r.jsx(te,{variant:"destructive",onSelect:C,children:"Delete"}),e[33]=C,e[34]=z):z=e[34];let _;e[35]!==N||e[36]!==E||e[37]!==w||e[38]!==L||e[39]!==S||e[40]!==z?(_=r.jsxs(lr,{className:"w-52",children:[N,E,k,w,L,b,S,z]}),e[35]=N,e[36]=E,e[37]=w,e[38]=L,e[39]=S,e[40]=z,e[41]=_):_=e[41];let K;return e[42]!==_||e[43]!==j?(K=r.jsxs(sr,{children:[j,_]}),e[42]=_,e[43]=j,e[44]=K):K=e[44],K}Ut.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function Se(s,e,i,a){return`/api/${s}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(i)}/${a}`}function ur(s){const e=V(s);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}const fr="#94a3b8";function mr(s){const e=s.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:ue,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:ue,color:"#d9a441"}:e.endsWith(".json")?{Icon:Xt,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:ue,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:ue,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:Jt,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:_e,color:"#64748b"}:{Icon:_e,color:fr}}function Zi({orgSlug:s,virtualMcpId:e,branch:i,openPath:a}){const[c,m]=u.useState({files:[],directories:[],truncated:!1}),{files:x,directories:p}=c,[g,M]=u.useState(new Set),[d,h]=u.useState(null),[y,B]=u.useState(null),[U,C]=u.useState([]),[I,H]=u.useState(""),[q,Q]=u.useState(!1),[$,T]=u.useState(!1),[,G]=u.useState(new Set),[O,A]=u.useState(new Set),R=u.useRef(0),P=u.useRef(null),j=u.useRef(new Set),N=u.useRef(new Map);function E(t){G(n=>{const o=typeof t=="function"?t(n):t;return j.current=o,o})}const[k,w]=u.useState(new Map),L=u.useRef(null),[b,S]=u.useState(null),{sendMessage:z}=cn(),{setChatOpen:_}=dn(),K=Bt(),[D,X]=u.useState(null),[J,ge]=u.useState(null),[ne,le]=u.useState(!1);async function re(t,n){const o=await fetch(Se(s,e,i,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const l=await o.json().catch(()=>({}));throw new Error(l.error??`Request failed (${o.status})`)}return o.json()}async function ce(){K.invalidateQueries({queryKey:Ke(s,e,i)})}function De(t,n){navigator.clipboard.writeText(n).then(()=>W.success(`${t} copied`),()=>W.error(`Failed to copy ${t.toLowerCase()}`))}function rt(t){const n=Dn(t);if(!n)return;const o=`${s}/${e}/${i}`;K.setQueryData($e.decofile(o),l=>{if(!l)return l;const{[n]:f,...v}=l;return v}),K.invalidateQueries({queryKey:$e.liveMeta(o)})}function ot(t){const n=t.kind==="file"?[t.path]:x.filter(o=>o.startsWith(".deco/blocks/")).map(o=>me(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)rt(o)}function it(t){const n=me(t);return U.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const l=k.get(o);return!!(l?.loaded&&l.editorValue!==l.savedContent)})}function Re(t){C(n=>n.map(o=>t(o)).filter(o=>o!==null)),h(n=>n&&t(n)),w(n=>{const o=new Map;for(const[l,f]of n){const v=t(l);v&&o.set(v,f)}return o}),B(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function st(t){const n=me(t);B(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Re(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function at(t){if(!D)return;const n=pe(D.parentDir,t);if(Ne(n,x,p))throw new Error(`"${t}" already exists`);await re("write",{path:V(n),content:""}),await oe(),await ce(),X(null),ve(n)}async function lt(t){if(!D)return;const n=pe(D.parentDir,t);if(Ne(n,x,p))throw new Error(`"${t}" already exists`);const o=V(n);await re("mkdir",{path:o}),m(l=>({...l,directories:l.directories.includes(o)?l.directories:[...l.directories,o]})),await oe(),await ce(),X(null),M(l=>{const f=new Set(l);for(const v of Ce(n))f.add(v);return f.add(n),f}),B({name:t,path:n,kind:"directory",children:[]})}async function ct(t){if(!D)return;const n=D.node.path,o=je(n),l=pe(o,t);if(l===n){X(null);return}if(Ne(l,x,p))throw new Error(`"${t}" already exists`);await re("rename",{from:V(n),to:V(l)}),Re(f=>f===n?l:f.startsWith(`${n}/`)?pe(l,f.slice(n.length+1)):f),await oe(),await ce(),X(null)}async function dt(t){le(!0);try{await re("unlink",{path:V(t.path),recursive:t.kind==="directory"}),ot(t),st(t.path),await oe(),await ce(),ge(null),W.success(`Deleted "${t.name}"`)}catch(n){W.error(n instanceof Error?n.message:"Delete failed")}finally{le(!1)}}async function ut(t){const n=Mn(t);if(n){W.error(n);return}le(!0);try{D?.mode==="new-file"?(await at(t),W.success(`Created "${t}"`)):D?.mode==="new-folder"?(await lt(t),W.success(`Created folder "${t}"`)):D?.mode==="rename"&&(await ct(t),W.success(`Renamed to "${t}"`))}catch(o){W.error(o instanceof Error?o.message:"Operation failed")}finally{le(!1)}}const Pe=u.useRef(!1);Pe.current||(Pe.current=!0,P.current=oe());const[ft,mt]=u.useState(null);if(a&&a!==ft){mt(a);const t=a;queueMicrotask(()=>{ur(t)&&ve(t).catch(n=>{W.error(n instanceof Error?n.message:"Failed to open file")})})}async function Ee(t){const n=await re("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function ke(t,n,o){if(o!==R.current)return!1;let l=!1;return m(f=>{const v=n?Rn(f.files,f.directories,t,f.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return l=!!v.truncated,{files:v.files,directories:v.directories,truncated:l}}),l&&W.warning("File list truncated — some files may be hidden"),l}async function pt(t){const n=N.current.get(t);if(n)return n;const o=R.current,l=(async()=>{const f=await Ee({pattern:"**/*",path:V(t),limit:Ve}),v=ke(f,!0,o);return!v&&o===R.current&&E(Y=>{const de=new Set(Y);return de.add(t),de}),v})();N.current.set(t,l);try{return await l}finally{N.current.delete(t)}}async function Te(t){if(!be(t,j.current))return!1;A(n=>new Set(n).add(t));try{return await pt(t)}finally{A(n=>{const o=new Set(n);return o.delete(t),o})}}async function xt(t){const n=new Set(j.current);for(const o of Ce(t)){if(!be(o,n))continue;if(await Te(o))throw new Error("Folder listing truncated — expand again to load more");n.add(o)}}async function oe(){const t=++R.current;N.current.clear(),Q(!0),E(new Set),M(new Set),A(new Set);try{const n=await Ee({pattern:"**/*",limit:Ve,maxDepth:wn});ke(n,!1,t),T(!0)}catch{$&&W.error("Failed to refresh file tree")}finally{Q(!1)}}async function Oe(t){if(!k.get(t)?.loaded){w(o=>{const l=new Map(o);return l.set(t,{savedContent:"",editorValue:"",loaded:!1}),l});try{const o=await fetch(Se(s,e,i,"read"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:V(t),full:!0})});if(!o.ok)return;const l=await o.json(),f=Sn(l.content??"");w(v=>{const Y=new Map(v);return Y.set(t,{savedContent:f,editorValue:f,loaded:!0}),Y})}catch{}}}async function ht(t,n){try{const o=await fetch(Se(s,e,i,"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:V(t),content:n})});if(!o.ok){fe("file save failed",{path:t,status:o.status});return}fe("file saved via sandbox /write",{path:t}),K.invalidateQueries({queryKey:Ke(s,e,i)});try{const l=await un(s,e,i);fe("git status after save",l)}catch(l){fe("git status after save failed",{path:t,error:l instanceof Error?l.message:String(l)})}w(l=>{const f=new Map(l),v=f.get(t);return v&&f.set(t,{...v,savedContent:n}),f})}catch{}}function gt(t){h(t),B({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),S(null),U.includes(t)||C(n=>[...n,t]),Oe(t)}function vt(t){C(n=>{const o=n.filter(l=>l!==t);return d===t&&h(o[o.length-1]??null),o}),w(n=>{const o=new Map(n);return o.delete(t),o})}function Ae(t){M(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function yt(t){if(be(t,j.current))try{if(await Te(t))return}catch(n){W.error(n instanceof Error?n.message:"Failed to load folder");return}Ae(t)}async function Ct(t,n){if(n){Ae(t);return}await yt(t)}async function ve(t){await P.current,await xt(t);const n=Ce(t);M(o=>{const l=new Set(o);for(const f of n)l.add(f);return l}),gt(t)}function wt(){return y?.kind==="directory"?y.path:y?.kind==="file"?je(y.path):d?je(d):"/"}function Le(t){const n=wt();X({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const bt=bn(x,p),Fe=jn(bt,g),Ie=I?Fe.filter(t=>t.node.name.toLowerCase().includes(I.toLowerCase())):Fe,ee=d?k.get(d):null,jt=ee?.loaded&&ee.editorValue!==ee.savedContent,ye=J?it(J.path):[],Nt=(t,n)=>{L.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await ht(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),l=t.getModel();if(!o||!l||!d)return;const f=l.getValueInRange(o);S({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:f})})};function St(t){if(!b)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${b.filePath}\``,`**Lines:** ${b.lineStart}–${b.lineEnd}`];if(b.selectedCode){const o=we(b.filePath),l=b.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,l,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),_(!0),z({parts:[{type:"text",text:n.join(`
|
|
2
|
-
`)}]}),S(null)}return q&&!$?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(qt,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:I,onChange:t=>H(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(ze,{children:[r.jsx(We,{asChild:!0,children:r.jsx(he,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>Le("new-file"),children:r.jsx(Qt,{size:14})})}),r.jsx(Ge,{side:"bottom",children:"New file"})]}),r.jsxs(ze,{children:[r.jsx(We,{asChild:!0,children:r.jsx(he,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>Le("new-folder"),children:r.jsx(Ht,{size:14})})}),r.jsx(Ge,{side:"bottom",children:"New folder"})]})]}),r.jsx(Zt,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[Ie.map(t=>{const{node:n,depth:o}=t,l=n.kind==="directory",f=g.has(n.path),v=y?.path===n.path,Y=Nn(n.path,n.kind),de=l&&O.has(n.path);return r.jsx(dr,{node:n,depth:o,isExpanded:f,isSelected:v,isLoading:de,fileVisual:mr(n.name),onSelect:()=>B(n),onOpen:()=>{l?Ct(n.path,f):ve(n.path)},onNewFile:()=>X({mode:"new-file",node:n,parentDir:Y}),onNewFolder:()=>X({mode:"new-folder",node:n,parentDir:Y}),onCopyPath:()=>De("Path",me(n.path)),onCopyRelativePath:()=>De("Relative path",V(n.path)),onRename:()=>X({mode:"rename",node:n,parentDir:Y}),onDelete:()=>ge(n)},n.path)}),$&&Ie.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:I?`No files match "${I}"`:"No files found"})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[U.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:U.map(t=>{const n=k.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,l=d===t,f=t.split("/").pop()??t;return r.jsxs("div",{className:ae("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",l?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{h(t),Oe(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":l,children:[r.jsx("span",{className:"truncate max-w-32",children:f}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:v=>{v.stopPropagation(),vt(t)},children:r.jsx(Yt,{size:12})})]},t)})}),b&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&St(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&S(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:"Send",children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:"Send"}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&ee?.loaded?r.jsx(Vt,{language:we(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:ee.editorValue,path:d,onChange:t=>{const n=d;n&&w(o=>{const l=new Map(o),f=l.get(n);return f&&l.set(n,{...f,editorValue:t??""}),l})},onMount:Nt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!ee?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(se,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[jt?"Modified":"Saved"," ·"," ",we(d)]})]})]}),r.jsx(En,{open:D!==null,mode:D?.mode??"new-file",initialName:D?.mode==="rename"?D.node.name:"",parentLabel:D&&D.mode!=="rename"?D.parentDir==="/"?"/":V(D.parentDir):void 0,isPending:ne,onSubmit:ut,onOpenChange:t=>{!t&&!ne&&X(null)}}),r.jsx(en,{open:J!==null,onOpenChange:t=>{!t&&!ne&&ge(null)},children:r.jsxs(tn,{children:[r.jsxs(nn,{children:[r.jsxs(rn,{children:["Delete ",J?.kind==="directory"?"folder":"file","?"]}),r.jsxs(on,{children:["This will permanently delete"," ",r.jsx("span",{className:"font-mono",children:J?.name}),J?.kind==="directory"?" and everything inside it.":".",ye.length>0&&r.jsxs(r.Fragment,{children:[" ",ye.length===1?"One open file has unsaved changes that will be lost.":`${ye.length} open files have unsaved changes that will be lost.`]})]})]}),r.jsxs(sn,{children:[r.jsx(an,{disabled:ne,children:"Cancel"}),r.jsx(ln,{disabled:ne||!J,onClick:t=>{t.preventDefault(),J&&dt(J)},children:"Delete"})]})]})})]})}export{Zi as FileExplorer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as M,r as O,j as s,l as E,B as Ze,i as xt}from"./index-CLj_5r89.js";import{g as Be}from"./get-initials-D-f_fDFw.js";import{A as Pe}from"./avatar-B2d04wRu.js";import{B as pt}from"./badge-DiKw8RbW.js";import{b as et,s as gt,n as bt}from"./Loading02-D2Hh17zb.js";import{i as ht}from"./List-D5svP-6k.js";import{s as jt}from"./Plus-DNCXili3.js";import{s as lt}from"./User01-DcNAHFa-.js";import{u as at}from"./use-members-CcCdz_hQ.js";import{S as Y,a as nt,P as ye,b as Nt,u as vt,c as yt}from"./config-ByOdiANb.js";import{f as ot}from"./format-time-Cy7tTmZp.js";import{d as Dt,e as Ct,a as St}from"./dialog-BFPr54WG.js";import{a as Qe,c as Ve,d as Ae,D as We}from"./dropdown-menu-BlfYJTRx.js";import{a as wt,b as It,P as kt}from"./popover-CKlhZKOG.js";import{C as Tt}from"./calendar-Dh7ySVQi.js";import{t as $e}from"./ChevronDown-mDFyCzyV.js";import{s as zt}from"./Trash01-BJe3gUZc.js";import{i as _t}from"./X-CYIGv8wX.js";import"./use-org-auth-client-B7yAA88H.js";import"./studio-tools-F5G0urN7.js";import"./AlertCircle-Db_5w_pO.js";import"./CheckCircle-auAoHYRc.js";import"./Circle-DNMct17O.js";import"./Eye-aR-oC6dj.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./Check-VVh423TU.js";import"./ChevronRight-Ceh-WF7H.js";function Ot(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function tt(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const At=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function $t(t){const e=M.c(133),{open:a,onClose:n,item:l,onSubmit:d,onDelete:f,isSaving:r}=t,{data:c}=at(),o=c?.data?.members??[],[i,x]=O.useState(l?.title??""),[g,b]=O.useState(l?.description??""),[m,h]=O.useState(l?.status??"triage"),[D,C]=O.useState(l?.priority??"medium"),[p,v]=O.useState(l?.assigneeId??null),S=l?.dueDate;let w;e[0]!==S?(w=tt(S),e[0]=S,e[1]=w):w=e[1];const[j,N]=O.useState(w),[T,I]=O.useState(!1);let z;e[2]!==l?.assigneeId||e[3]!==l?.description||e[4]!==l?.dueDate||e[5]!==l?.priority||e[6]!==l?.status||e[7]!==l?.title||e[8]!==v||e[9]!==b||e[10]!==N?(z=()=>{x(l?.title??""),b(l?.description??""),h(l?.status??"triage"),C(l?.priority??"medium"),v(l?.assigneeId??null),N(tt(l?.dueDate))},e[2]=l?.assigneeId,e[3]=l?.description,e[4]=l?.dueDate,e[5]=l?.priority,e[6]=l?.status,e[7]=l?.title,e[8]=v,e[9]=b,e[10]=N,e[11]=z):z=e[11];const A=z;let _;e[12]!==n||e[13]!==A?(_=()=>{n(),A()},e[12]=n,e[13]=A,e[14]=_):_=e[14];const $=_;let L;e[15]!==p||e[16]!==g||e[17]!==j||e[18]!==d||e[19]!==D||e[20]!==m||e[21]!==i?(L=()=>{const u=i.trim();u&&d({title:u,description:g.trim()||null,status:m,priority:D,assigneeId:p,dueDate:j?Ot(j):null})},e[15]=p,e[16]=g,e[17]=j,e[18]=d,e[19]=D,e[20]=m,e[21]=i,e[22]=L):L=e[22];const F=L;let R;e[23]!==p?(R=u=>u.userId===p,e[23]=p,e[24]=R):R=e[24];const U=o.find(R),B=Ct;let k;e[25]!==$?(k=u=>!u&&$(),e[25]=$,e[26]=k):k=e[26];const P=Dt,K="flex h-[85vh] max-h-[720px] flex-col gap-0 overflow-hidden p-0 sm:max-w-[820px]",y="hidden",De=l?"Edit task":"New task";let q;e[27]!==De?(q=s.jsx(St,{className:"sr-only",children:De}),e[27]=De,e[28]=q):q=e[28];const it="flex min-h-0 flex-1 flex-col overflow-y-auto",ct="flex flex-col gap-4 border-b border-border px-6 pt-6 pb-5";let Ce;e[29]===Symbol.for("react.memo_cache_sentinel")?(Ce=u=>x(u.target.value),e[29]=Ce):Ce=e[29];let H;e[30]!==i?(H=s.jsx("input",{value:i,onChange:Ce,placeholder:"Task title",autoFocus:!0,className:"w-full border-0 bg-transparent text-xl font-semibold text-foreground outline-none placeholder:text-muted-foreground/70"}),e[30]=i,e[31]=H):H=e[31];const dt="flex flex-wrap items-center gap-2",Ee=Y[m].icon,Me=Y[m];let Se;e[32]!==Ee||e[33]!==Me.iconClassName?(Se=s.jsx(Ee,{size:13,className:Me.iconClassName}),e[32]=Ee,e[33]=Me.iconClassName,e[34]=Se):Se=e[34];const Le=Se,Fe=Y[m];let we;e[35]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx($e,{size:12,className:"text-muted-foreground"}),e[35]=we):we=e[35];let J;e[36]!==Le||e[37]!==Fe.label?(J=s.jsx(Qe,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[Le,Fe.label,we]})}),e[36]=Le,e[37]=Fe.label,e[38]=J):J=e[38];let Ie;e[39]===Symbol.for("react.memo_cache_sentinel")?(Ie=s.jsx(Ve,{align:"start",className:"w-44",children:nt.map(u=>{const G=Y[u].icon;return s.jsxs(Ae,{onSelect:()=>h(u),className:"gap-2",children:[s.jsx(G,{size:13,className:Y[u].iconClassName}),Y[u].label]},u)})}),e[39]=Ie):Ie=e[39];let Q;e[40]!==J?(Q=s.jsxs(We,{children:[J,Ie]}),e[40]=J,e[41]=Q):Q=e[41];const Re=ye[D];let V;e[42]!==Re.badgeClassName?(V=E("size-2 rounded-full",Re.badgeClassName),e[42]=Re.badgeClassName,e[43]=V):V=e[43];let W;e[44]!==V?(W=s.jsx("span",{className:V}),e[44]=V,e[45]=W):W=e[45];const Ue=ye[D];let ke;e[46]===Symbol.for("react.memo_cache_sentinel")?(ke=s.jsx($e,{size:12,className:"text-muted-foreground"}),e[46]=ke):ke=e[46];let X;e[47]!==W||e[48]!==Ue.label?(X=s.jsx(Qe,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[W,Ue.label,ke]})}),e[47]=W,e[48]=Ue.label,e[49]=X):X=e[49];let Te;e[50]===Symbol.for("react.memo_cache_sentinel")?(Te=s.jsx(Ve,{align:"start",className:"w-40",children:Nt.map(u=>s.jsx(Ae,{onSelect:()=>C(u),children:ye[u].label},u))}),e[50]=Te):Te=e[50];let Z;e[51]!==X?(Z=s.jsxs(We,{children:[X,Te]}),e[51]=X,e[52]=Z):Z=e[52];const Ge=We,Ye=Qe,mt=!0,ut="button",ft="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",Ke=U?s.jsx(Pe,{url:U.user?.image??void 0,fallback:Be(U.user?.name),shape:"circle",size:"2xs"}):s.jsx(lt,{size:13,className:"text-muted-foreground"}),qe=U?.user?.name??"Unassigned";let ze;e[53]===Symbol.for("react.memo_cache_sentinel")?(ze=s.jsx($e,{size:12,className:"text-muted-foreground"}),e[53]=ze):ze=e[53];let ee;e[54]!==Ke||e[55]!==qe?(ee=s.jsxs("button",{type:ut,className:ft,children:[Ke,qe,ze]}),e[54]=Ke,e[55]=qe,e[56]=ee):ee=e[56];let te;e[57]!==Ye||e[58]!==ee?(te=s.jsx(Ye,{asChild:mt,children:ee}),e[57]=Ye,e[58]=ee,e[59]=te):te=e[59];let se;e[60]!==v?(se=s.jsx(Ae,{onSelect:()=>v(null),children:"Unassigned"}),e[60]=v,e[61]=se):se=e[61];let le;if(e[62]!==o||e[63]!==v){let u;e[65]!==v?(u=G=>s.jsxs(Ae,{onSelect:()=>v(G.userId),className:"gap-2",children:[s.jsx(Pe,{url:G.user?.image??void 0,fallback:Be(G.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:G.user?.name??G.userId})]},G.userId),e[65]=v,e[66]=u):u=e[66],le=o.map(u),e[62]=o,e[63]=v,e[64]=le}else le=e[64];let ae;e[67]!==se||e[68]!==le?(ae=s.jsxs(Ve,{align:"start",className:"w-56",children:[se,le]}),e[67]=se,e[68]=le,e[69]=ae):ae=e[69];let ne;e[70]!==Ge||e[71]!==te||e[72]!==ae?(ne=s.jsxs(Ge,{children:[te,ae]}),e[70]=Ge,e[71]=te,e[72]=ae,e[73]=ne):ne=e[73];let _e;e[74]===Symbol.for("react.memo_cache_sentinel")?(_e=s.jsx(et,{size:13,className:"text-muted-foreground"}),e[74]=_e):_e=e[74];let oe;e[75]!==j?(oe=j?At.format(j):"Due date",e[75]=j,e[76]=oe):oe=e[76];let re;e[77]!==j||e[78]!==N?(re=j?s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-0.5 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:u=>{u.stopPropagation(),N(null)},onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),u.stopPropagation(),N(null))},children:s.jsx(_t,{size:12})}):s.jsx($e,{size:12,className:"text-muted-foreground"}),e[77]=j,e[78]=N,e[79]=re):re=e[79];let ie;e[80]!==oe||e[81]!==re?(ie=s.jsx(wt,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs text-foreground transition-colors hover:bg-muted",children:[_e,oe,re]})}),e[80]=oe,e[81]=re,e[82]=ie):ie=e[82];const He=j??void 0;let ce;e[83]!==N||e[84]!==I?(ce=u=>{N(u??null),u&&I(!1)},e[83]=N,e[84]=I,e[85]=ce):ce=e[85];let de;e[86]!==He||e[87]!==ce?(de=s.jsx(It,{className:"w-auto p-0",align:"start",children:s.jsx(Tt,{mode:"single",selected:He,onSelect:ce,initialFocus:!0})}),e[86]=He,e[87]=ce,e[88]=de):de=e[88];let me;e[89]!==T||e[90]!==I||e[91]!==ie||e[92]!==de?(me=s.jsxs(kt,{open:T,onOpenChange:I,children:[ie,de]}),e[89]=T,e[90]=I,e[91]=ie,e[92]=de,e[93]=me):me=e[93];let ue;e[94]!==Q||e[95]!==Z||e[96]!==ne||e[97]!==me?(ue=s.jsxs("div",{className:dt,children:[Q,Z,ne,me]}),e[94]=Q,e[95]=Z,e[96]=ne,e[97]=me,e[98]=ue):ue=e[98];let fe;e[99]!==H||e[100]!==ue?(fe=s.jsxs("div",{className:ct,children:[H,ue]}),e[99]=H,e[100]=ue,e[101]=fe):fe=e[101];let xe;e[102]!==b?(xe=u=>b(u.target.value),e[102]=b,e[103]=xe):xe=e[103];let pe;e[104]!==g||e[105]!==xe?(pe=s.jsx("div",{className:"flex flex-1 flex-col px-6 py-5",children:s.jsx("textarea",{value:g,onChange:xe,placeholder:"Add a description…",className:"min-h-[320px] w-full flex-1 resize-none border-0 bg-transparent text-sm leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/70"})}),e[104]=g,e[105]=xe,e[106]=pe):pe=e[106];let ge;e[107]!==fe||e[108]!==pe?(ge=s.jsxs("div",{className:it,children:[fe,pe]}),e[107]=fe,e[108]=pe,e[109]=ge):ge=e[109];let be;e[110]!==l||e[111]!==f?(be=l&&f&&s.jsx(Ze,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"text-muted-foreground hover:text-destructive",onClick:f,children:s.jsx(zt,{size:14})}),e[110]=l,e[111]=f,e[112]=be):be=e[112];let he;e[113]!==r||e[114]!==i?(he=!i.trim()||r,e[113]=r,e[114]=i,e[115]=he):he=e[115];const Je=l?"Save":"Create task";let je;e[116]!==F||e[117]!==he||e[118]!==Je?(je=s.jsx(Ze,{size:"sm",className:"ml-auto",disabled:he,onClick:F,children:Je}),e[116]=F,e[117]=he,e[118]=Je,e[119]=je):je=e[119];let Ne;e[120]!==be||e[121]!==je?(Ne=s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-6 py-3",children:[be,je]}),e[120]=be,e[121]=je,e[122]=Ne):Ne=e[122];let ve;e[123]!==P||e[124]!==q||e[125]!==ge||e[126]!==Ne?(ve=s.jsxs(P,{className:K,closeButtonClassName:y,children:[q,ge,Ne]}),e[123]=P,e[124]=q,e[125]=ge,e[126]=Ne,e[127]=ve):ve=e[127];let Oe;return e[128]!==B||e[129]!==a||e[130]!==ve||e[131]!==k?(Oe=s.jsx(B,{open:a,onOpenChange:k,children:ve}),e[128]=B,e[129]=a,e[130]=ve,e[131]=k,e[132]=Oe):Oe=e[132],Oe}function ps(){const t=M.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(Et,{})})})}),t[0]=e):e=t[0],e}const Bt=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function rt(t){const e=new Date(t),a=e.getTime()<Date.now();return{label:Bt.format(e),overdue:a}}function Pt(t){const e=M.c(8),{iso:a}=t;let n;e[0]!==a?(n=rt(a),e[0]=a,e[1]=n):n=e[1];const{label:l,overdue:d}=n,f=d?"bg-red-500/10 text-red-600":"bg-muted text-muted-foreground";let r;e[2]!==f?(r=E("inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[10px]",f),e[2]=f,e[3]=r):r=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(et,{size:10}),e[4]=c):c=e[4];let o;return e[5]!==l||e[6]!==r?(o=s.jsxs("span",{className:r,children:[c,l]}),e[5]=l,e[6]=r,e[7]=o):o=e[7],o}function Et(){const t=M.c(45),{items:e,isLoading:a}=vt(),n=yt(),{data:l}=at();let d;if(t[0]!==l?.data?.members){const y=l?.data?.members??[];d=new Map(y.map(Mt)),t[0]=l?.data?.members,t[1]=d}else d=t[1];const f=d,[r,c]=O.useState("board"),[o,i]=O.useState(!1),[x,g]=O.useState(null);let b;t[2]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{g(null),i(!0)},t[2]=b):b=t[2];const m=b;let h;t[3]===Symbol.for("react.memo_cache_sentinel")?(h=y=>{g(y),i(!0)},t[3]=h):h=t[3];const D=h;if(a&&e.length===0){let y;return t[4]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(xt,{size:20,className:"animate-spin text-muted-foreground"})}),t[4]=y):y=t[4],y}const C=r==="board"?"max-w-[1400px]":"max-w-[900px]";let p;t[5]!==C?(p=E("mx-auto flex w-full flex-col gap-6 px-10 pt-10 pb-16",C),t[5]=C,t[6]=p):p=t[6];let v;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Board"}),t[7]=v):v=t[7];let S;t[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsxs(Ze,{size:"sm",onClick:m,children:[s.jsx(jt,{size:16}),"New task"]}),t[8]=S):S=t[8];const w=r==="list";let j;t[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>c("list"),t[9]=j):j=t[9];let N;t[10]!==w?(N=s.jsx(st,{active:w,onClick:j,icon:ht,label:"List"}),t[10]=w,t[11]=N):N=t[11];const T=r==="board";let I;t[12]===Symbol.for("react.memo_cache_sentinel")?(I=()=>c("board"),t[12]=I):I=t[12];let z;t[13]!==T?(z=s.jsx(st,{active:T,onClick:I,icon:bt,label:"Board"}),t[13]=T,t[14]=z):z=t[14];let A;t[15]!==z||t[16]!==N?(A=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[S,s.jsxs("div",{className:"ml-auto inline-flex rounded-lg bg-muted p-0.5",children:[N,z]})]}),t[15]=z,t[16]=N,t[17]=A):A=t[17];let _;t[18]!==n.update||t[19]!==e||t[20]!==r||t[21]!==f?(_=e.length===0?s.jsx("div",{className:"rounded-xl border border-border bg-card px-4 py-12 text-center text-sm text-muted-foreground",children:"No tasks yet. Start one with New task."}):r==="board"?s.jsx(Lt,{items:e,memberByUserId:f,onOpen:D,onMove:(y,De)=>n.update.mutate({id:y,status:De})}):s.jsx("div",{className:"flex flex-col gap-2",children:e.map(y=>s.jsx(Rt,{item:y,assignee:y.assigneeId?f.get(y.assigneeId):void 0,onOpen:()=>D(y)},y.id))}),t[18]=n.update,t[19]=e,t[20]=r,t[21]=f,t[22]=_):_=t[22];let $;t[23]!==A||t[24]!==_||t[25]!==p?($=s.jsxs("div",{className:p,children:[v,A,_]}),t[23]=A,t[24]=_,t[25]=p,t[26]=$):$=t[26];const L=o?x?.id??"new":"closed";let F;t[27]===Symbol.for("react.memo_cache_sentinel")?(F=()=>i(!1),t[27]=F):F=t[27];const R=x??void 0,U=n.create.isPending||n.update.isPending;let B;t[28]!==n.create||t[29]!==n.update||t[30]!==x?(B=y=>{x?n.update.mutate({id:x.id,...y}):n.create.mutate(y),i(!1)},t[28]=n.create,t[29]=n.update,t[30]=x,t[31]=B):B=t[31];let k;t[32]!==n.remove||t[33]!==x?(k=x?()=>{n.remove.mutate(x.id),i(!1)}:void 0,t[32]=n.remove,t[33]=x,t[34]=k):k=t[34];let P;t[35]!==o||t[36]!==L||t[37]!==R||t[38]!==U||t[39]!==B||t[40]!==k?(P=s.jsx($t,{open:o,onClose:F,item:R,isSaving:U,onSubmit:B,onDelete:k},L),t[35]=o,t[36]=L,t[37]=R,t[38]=U,t[39]=B,t[40]=k,t[41]=P):P=t[41];let K;return t[42]!==$||t[43]!==P?(K=s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[$,P]}),t[42]=$,t[43]=P,t[44]=K):K=t[44],K}function Mt(t){return[t.userId,t]}function st(t){const e=M.c(11),{active:a,onClick:n,icon:l,label:d}=t,f=`${d} view`,r=a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let c;e[0]!==r?(c=E("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",r),e[0]=r,e[1]=c):c=e[1];let o;e[2]!==l?(o=s.jsx(l,{size:14}),e[2]=l,e[3]=o):o=e[3];let i;return e[4]!==a||e[5]!==d||e[6]!==n||e[7]!==f||e[8]!==c||e[9]!==o?(i=s.jsxs("button",{type:"button",onClick:n,"aria-label":f,"aria-pressed":a,className:c,children:[o,d]}),e[4]=a,e[5]=d,e[6]=n,e[7]=f,e[8]=c,e[9]=o,e[10]=i):i=e[10],i}function Lt(t){const e=M.c(8),{items:a,memberByUserId:n,onOpen:l,onMove:d}=t,[f,r]=O.useState(null);let c;e[0]!==a||e[1]!==n||e[2]!==d||e[3]!==l||e[4]!==f?(c=nt.map(i=>{const x=a.filter(m=>m.status===i),g=Y[i],b=g.icon;return s.jsxs("div",{onDragOver:m=>{m.preventDefault(),r(i)},onDragLeave:m=>{m.currentTarget.contains(m.relatedTarget)||r(null)},onDrop:m=>{m.preventDefault();const h=m.dataTransfer.getData("text/plain");h&&d(h,i),r(null)},className:E("flex flex-col rounded-xl p-1 transition-colors",f===i&&"bg-muted/50"),children:[s.jsxs("div",{className:"flex items-center gap-2 p-2",children:[s.jsx(b,{size:14,className:E("shrink-0",g.iconClassName)}),s.jsx("span",{className:"text-xs text-foreground",children:g.label}),s.jsx("span",{className:"text-[11px] text-muted-foreground",children:x.length})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2",children:x.map(m=>s.jsx(Ft,{item:m,assignee:m.assigneeId?n.get(m.assigneeId):void 0,onOpen:()=>l(m)},m.id))})]},i)}),e[0]=a,e[1]=n,e[2]=d,e[3]=l,e[4]=f,e[5]=c):c=e[5];let o;return e[6]!==c?(o=s.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-5",children:c}),e[6]=c,e[7]=o):o=e[7],o}function Ft(t){const e=M.c(38),{item:a,assignee:n,onOpen:l}=t,d=ye[a.priority];let f;e[0]!==a.dueDate?(f=a.dueDate?rt(a.dueDate):null,e[0]=a.dueDate,e[1]=f):f=e[1];const r=f;let c;e[2]!==a.id?(c=I=>{I.dataTransfer.setData("text/plain",a.id),I.dataTransfer.effectAllowed="move"},e[2]=a.id,e[3]=c):c=e[3];let o;e[4]!==a.title?(o=s.jsx("span",{className:"min-w-0 truncate text-[13px] font-medium leading-snug text-foreground",children:a.title}),e[4]=a.title,e[5]=o):o=e[5];let i;e[6]!==n?(i=n?s.jsx(Pe,{url:n.user?.image??void 0,fallback:Be(n.user?.name),shape:"circle",size:"2xs"}):s.jsx(lt,{size:13,className:"text-muted-foreground/60"}),e[6]=n,e[7]=i):i=e[7];const x=n?.user?.name;let g;e[8]!==i||e[9]!==x?(g=s.jsx(Xe,{icon:i,value:x}),e[8]=i,e[9]=x,e[10]=g):g=e[10];const b=r?.overdue?"text-red-500":"text-muted-foreground/60";let m;e[11]!==b?(m=E(b),e[11]=b,e[12]=m):m=e[12];let h;e[13]!==m?(h=s.jsx(et,{size:13,className:m}),e[13]=m,e[14]=h):h=e[14];const D=r?.label,C=r?.overdue?"text-red-600":void 0;let p;e[15]!==D||e[16]!==C||e[17]!==h?(p=s.jsx(Xe,{icon:h,value:D,valueClassName:C}),e[15]=D,e[16]=C,e[17]=h,e[18]=p):p=e[18];let v;e[19]!==d.flagClassName?(v=s.jsx(gt,{size:13,className:d.flagClassName}),e[19]=d.flagClassName,e[20]=v):v=e[20];let S;e[21]!==d.label||e[22]!==v?(S=s.jsx(Xe,{icon:v,value:d.label}),e[21]=d.label,e[22]=v,e[23]=S):S=e[23];let w;e[24]!==p||e[25]!==S||e[26]!==g?(w=s.jsxs("div",{className:"flex flex-col gap-1.5 text-[12px] text-muted-foreground",children:[g,p,S]}),e[24]=p,e[25]=S,e[26]=g,e[27]=w):w=e[27];let j;e[28]!==a.createdAt?(j=ot(new Date(a.createdAt)),e[28]=a.createdAt,e[29]=j):j=e[29];let N;e[30]!==j?(N=s.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:j}),e[30]=j,e[31]=N):N=e[31];let T;return e[32]!==l||e[33]!==w||e[34]!==N||e[35]!==c||e[36]!==o?(T=s.jsxs("button",{type:"button",draggable:!0,onDragStart:c,onClick:l,className:"flex cursor-grab flex-col gap-2.5 rounded-[10px] border border-border bg-card px-3.5 py-3 text-left transition-colors hover:border-ring/40 active:cursor-grabbing",children:[o,w,N]}),e[32]=l,e[33]=w,e[34]=N,e[35]=c,e[36]=o,e[37]=T):T=e[37],T}function Xe(t){const e=M.c(10),{icon:a,value:n,valueClassName:l}=t;let d;e[0]!==a?(d=s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:a}),e[0]=a,e[1]=d):d=e[1];const f=n?l:"text-muted-foreground/50";let r;e[2]!==f?(r=E("min-w-0 truncate",f),e[2]=f,e[3]=r):r=e[3];const c=n??"—";let o;e[4]!==r||e[5]!==c?(o=s.jsx("span",{className:r,children:c}),e[4]=r,e[5]=c,e[6]=o):o=e[6];let i;return e[7]!==d||e[8]!==o?(i=s.jsxs("div",{className:"flex items-center gap-2",children:[d,o]}),e[7]=d,e[8]=o,e[9]=i):i=e[9],i}function Rt(t){const e=M.c(28),{item:a,assignee:n,onOpen:l}=t,d=Y[a.status],f=d.icon;let r;e[0]!==d.iconClassName?(r=E("shrink-0",d.iconClassName),e[0]=d.iconClassName,e[1]=r):r=e[1];let c;e[2]!==f||e[3]!==r?(c=s.jsx(f,{size:15,className:r}),e[2]=f,e[3]=r,e[4]=c):c=e[4];let o;e[5]!==a.title?(o=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:a.title}),e[5]=a.title,e[6]=o):o=e[6];const i=ye[a.priority];let x;e[7]!==i.badgeClassName?(x=E("shrink-0 text-[10px]",i.badgeClassName),e[7]=i.badgeClassName,e[8]=x):x=e[8];const g=ye[a.priority];let b;e[9]!==x||e[10]!==g.label?(b=s.jsx(pt,{className:x,children:g.label}),e[9]=x,e[10]=g.label,e[11]=b):b=e[11];let m;e[12]!==a.dueDate?(m=a.dueDate&&s.jsx(Pt,{iso:a.dueDate}),e[12]=a.dueDate,e[13]=m):m=e[13];let h;e[14]!==n?(h=n&&s.jsx(Pe,{url:n.user?.image??void 0,fallback:Be(n.user?.name),shape:"circle",size:"2xs"}),e[14]=n,e[15]=h):h=e[15];let D;e[16]!==a.createdAt?(D=ot(new Date(a.createdAt)),e[16]=a.createdAt,e[17]=D):D=e[17];let C;e[18]!==D?(C=s.jsx("span",{className:"shrink-0 text-[11px] text-muted-foreground/70",children:D}),e[18]=D,e[19]=C):C=e[19];let p;return e[20]!==l||e[21]!==C||e[22]!==c||e[23]!==o||e[24]!==b||e[25]!==m||e[26]!==h?(p=s.jsxs("button",{type:"button",onClick:l,className:"flex items-center gap-3 rounded-xl border border-border bg-card px-4 py-3 text-left transition-colors hover:border-ring/40",children:[c,o,b,m,h,C]}),e[20]=l,e[21]=C,e[22]=c,e[23]=o,e[24]=b,e[25]=m,e[26]=h,e[27]=p):p=e[27],p}export{ps as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as $,j as s,Y as He,r as F,Z as te,b as ue,l as E,M as oe,_ as bs,$ as js,a as xe,a0 as vs,a1 as ys,t as re,a2 as Ss,a3 as Ns,K as _s,k as Cs,a4 as ws,i as Lt,e as lt,u as rt,P as Bt,G as ks,H as As,I as Is,J as zs,d as $s,B as Je,a5 as Ts,T as Ms,U as Os,a6 as Ps,X as Ds,a7 as Es}from"./index-CLj_5r89.js";import{u as pe,S as ot,a as at,b as ae,c as J,d as K,e as Rt,f as Ht,g as Fs,h as Ls,i as Ze,j as Bs,k as Rs,l as Hs}from"./sidebar-B_c4VYke.js";import{u as ct}from"./use-mobile-BJ6No951.js";import{n as Gs}from"./Loading02-D2Hh17zb.js";import{u as Us}from"./use-organization-settings-BzhOQtxD.js";import{S as se}from"./skeleton-Dl1AhqdL.js";import{i as Gt}from"./LayoutLeft-Cog6SqwZ.js";import{T as ve}from"./toolbar-icon-button-Cf6OwFTU.js";import{P as Ge,a as ze,b as Ue}from"./popover-CKlhZKOG.js";import{D as Ut,a as Wt,b as qt}from"./drawer-DcfPm_vi.js";import{A as Le}from"./avatar-B2d04wRu.js";import{a as ce,b as de,c as et,T as me}from"./tooltip-C51X6QKO.js";import{a as gt}from"./Copy01-CuSfBG1R.js";import{n as Ws,i as qs}from"./Globe01-DkdmhUM8.js";import{i as Ks}from"./ZoomOut-Dqj1q_yU.js";import{i as Xs,a as Vs}from"./ZapSquare-0BsdXZY9.js";import{i as tt}from"./Monitor01-cNkbuWdj.js";import{n as Ys,a as Qs}from"./Sun-DLqplG3r.js";import{a as dt}from"./Settings02-D7asukv0.js";import{i as Js}from"./Shield01-BT2HQXan.js";import{a as Zs}from"./Users03-BMw5o14D.js";import{a as bt,b as jt,c as en,d as tn,A as ye,e as vt,i as sn,s as nn,f as ln}from"./agent-icon-EdtPDJXM.js";import"./index-GJfKnZn_.js";import{I as rn}from"./invite-member-dialog-BPpBeslC.js";import{u as on,A as an,g as cn,a as dn,b as Kt}from"./agent-capabilities-CRvnIg9m.js";import{u as mn,v as un,C as yt}from"./connect-desktop-dialog-BWEylyh-.js";import{i as fn}from"./FilterLines-Cr2IL8ug.js";import{T as hn,a as xn}from"./toggle-group-CYFywiUW.js";import{u as pn}from"./use-mcp-client-3hG4jk-y.js";import{S as gn,a as Be,i as bn,b as jn}from"./constants-B72Xmt_K.js";import{u as mt,a as Xt}from"./use-virtual-mcp-D3UxifiP.js";import{u as vn,a as ut,b as Vt,T as yn}from"./hooks-BSiz_AKB.js";import{u as ft,r as Sn}from"./shell-layout-IYwmwgpp.js";import{c as Nn,a as _n,b as Cn,d as wn,e as kn}from"./dialog-BFPr54WG.js";import{C as An,a as In,b as zn,c as $n,d as Tn}from"./command-Cx8bKs7m.js";import{u as Yt}from"./studio-tools-F5G0urN7.js";import{i as Qt}from"./Zap-Br_Hg1wB.js";import{S as Jt,M as Mn}from"./shell-controls-CD6bdY9w.js";import{n as On}from"./Stars02-LnA0-zz4.js";import{g as Pn,u as Dn,S as En}from"./use-clock-tick-Bz8Z9860.js";import{f as Fn}from"./format-time-Cy7tTmZp.js";import{t as ht}from"./ChevronDown-mDFyCzyV.js";import{i as Ln}from"./ChevronRight-Ceh-WF7H.js";import{S as Zt,u as Bn,g as Rn,a as Hn,b as Gn}from"./use-navigate-to-agent-CZiiGkPG.js";import{S as Un,C as Wn}from"./chat-context-BsRUICZs.js";import{B as St,a as qn,b as Kn}from"./breadcrumb-CC9Gfd5p.js";import{i as es}from"./Check-VVh423TU.js";import{s as $e}from"./Plus-DNCXili3.js";import{i as ts}from"./SearchMd-87dvi4KF.js";import{s as Xn}from"./XClose-DT64mUwh.js";import{A as Vn,a as Yn,b as Qn,c as Jn,d as Zn,e as ei,f as ti}from"./alert-dialog-BbHr6pLd.js";import{F as si,a as ni,b as ii,c as li,d as ri,f as oi,e as ai}from"./form-Trt6kqr0.js";import{I as ci}from"./input-BdpM0TEL.js";import{G as di,a as mi}from"./github-repo-picker-CTMAbHxR.js";import{f as ui}from"./reusable-new-chat-qqWu133U.js";import{T as Q}from"./toolbar-DR2I0_KA.js";import"./X-CYIGv8wX.js";import"./User01-DcNAHFa-.js";import"./AlertCircle-Db_5w_pO.js";import"./Tool01-dGPltLKJ.js";import"./SwitchHorizontal01-C9ua90Hw.js";import"./XCircle-29rFa-09.js";import"./ArrowUpRight-B2VxdxbH.js";import"./CheckCircle-auAoHYRc.js";import"./ChevronUp-D03XJ0vS.js";import"./Circle-DNMct17O.js";import"./DotsVertical-Cr4sUrn_.js";import"./Eye-aR-oC6dj.js";import"./Star01-B90wIaBV.js";import"./Globe04-TuZvt3ov.js";import"./HardDrive-CrxPr3va.js";import"./Key01-CfvrTjDF.js";import"./LinkExternal01-BYpL3ACE.js";import"./List-D5svP-6k.js";import"./Palette-Dz_ldMx7.js";import"./Play-CVarwVeR.js";import"./SearchLg-DvsDitCO.js";import"./Stars01-D1lDEQh2.js";import"./Trash01-BJe3gUZc.js";import"./Upload01-DIYVb8n9.js";import"./Users01-q9IKnEsX.js";import"./select-CeXH3gjW.js";import"./textarea-ConjZ7fN.js";import"./use-org-auth-client-B7yAA88H.js";import"./use-organization-roles-C6Eyg5qk.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CmLZ3i0M.js";import"./use-registry-connections-DnT_Dh3O.js";import"./use-connection-D5Vs5qOp.js";import"./use-collections-Y12o4qWE.js";import"./useInfiniteQuery-8DjDwhQn.js";import"./use-infinite-scroll-BU44dmI-.js";import"./extract-connection-data-5BWVDciX.js";import"./card-D5CauofV.js";import"./integration-icon-Bf1Nt7-n.js";import"./collection-search-BgFXdSC0.js";import"./collection-tabs-Cxl16cFM.js";import"./badge-DiKw8RbW.js";import"./connection-form-helpers-C1s-KSGU.js";import"./authenticate-and-persist-oauth-nkmQY5vG.js";import"./mcp-oauth-DWePFULn.js";import"./auth-BEQgA40y.js";import"./useSuspenseInfiniteQuery-BYjapKbe.js";import"./use-ai-providers-BqQDQsEQ.js";import"./decopilot-sse-pool-CiyJzTNT.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./required-auth-layout-DGQr874S.js";import"./autosend-REHFoRRR.js";import"./tab-id-DznSzCvK.js";import"./use-org-sso-DcXTIOxB.js";import"./index-CPelPFhM.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-decopilot-events-C70DCxcq.js";import"./label-DjarSga4.js";import"./checkbox-DhHH_mmR.js";import"./use-debounced-value-DfUpwXh9.js";import"./use-mcp-tools-DkI8MzuJ.js";import"./github-installations-DzN1UQ4x.js";function fi(t){const e=$.c(5),{onPointerDown:n,onDoubleClick:l}=t,{state:i,isMobile:r}=pe();if(r||i==="collapsed")return null;let o,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={left:"var(--sidebar-width)"},a=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[0]=o,e[1]=a):(o=e[0],a=e[1]);let d;return e[2]!==l||e[3]!==n?(d=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:o,children:a}),e[2]=l,e[3]=n,e[4]=d):d=e[4],d}const xt=240,hi=400,xi="sidebar.width";function Te(t){return Math.max(xt,Math.min(hi,t))}function pi(){const t=$.c(11),[e,n]=He(xi,gi),l=F.useRef(null);let i;t[0]!==n||t[1]!==e?(i=m=>{m.preventDefault();const u=m.clientX,f=Te(e),x=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),g=x?Array.from(x.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const p of g)p.style.transition="none";const j=p=>{const b=Te(f+(p.clientX-u));x?.style.setProperty("--sidebar-width",`${b}px`)},h=p=>{const b=Te(f+(p.clientX-u));n(b);for(const y of g)y.style.transition="";window.removeEventListener("pointermove",j),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",j),window.addEventListener("pointerup",h)},t[0]=n,t[1]=e,t[2]=i):i=t[2];const r=i;let o;t[3]!==n?(o=()=>{n(xt)},t[3]=n,t[4]=o):o=t[4];const a=o;let d;t[5]!==e?(d=Te(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==r||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:l,onStartResize:r,resetWidth:a},t[7]=r,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function gi(t){return typeof t=="number"?Te(t):xt}function ss(){const t=$.c(8),{org:e}=te(),n=ue(),l=Us();let i;if(t[0]!==n||t[1]!==e||t[2]!==l){if(i=[],l){let r;t[4]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Gs,{className:"size-4!"}),t[4]=r):r=t[4];let o;t[5]!==n||t[6]!==e?(o={type:"items",items:[{key:"board",label:"Board",icon:r,onClick:()=>n({to:"/$org/board",params:{org:e.slug}})}]},t[5]=n,t[6]=e,t[7]=o):o=t[7],i.push(o)}t[0]=n,t[1]=e,t[2]=l,t[3]=i}else i=t[3];return i}function ns(t){const e=$.c(3),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=l):l=e[0];let i;return e[1]!==n?(i=s.jsxs(ot,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(at,{children:s.jsx(ae,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=i):i=e[2],i}function is(t){const e=$.c(18),{item:n}=t,{isMobile:l,setOpenMobile:i}=pe();let r;e[0]!==l||e[1]!==n||e[2]!==i?(r=()=>{oe("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&i(!1)},e[0]=l,e[1]=n,e[2]=i,e[3]=r):r=e[3];const o=r,a=n.key,d=n.isActive&&"z-10";let c;e[4]!==d?(c=E(d),e[4]=d,e[5]=c):c=e[5];let m;e[6]!==n.label?(m=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=m):m=e[7];let u;e[8]!==o||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==m?(u=s.jsxs(J,{onClick:o,isActive:n.isActive,tooltip:n.label,children:[n.icon,m]}),e[8]=o,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=m,e[13]=u):u=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==u?(f=s.jsx(K,{className:c,children:u},a),e[14]=n.key,e[15]=c,e[16]=u,e[17]=f):f=e[17],f}function bi(t){const e=$.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Rt,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=n.group.label,i=n.group.defaultExpanded;let r;e[2]!==n.group.items?(r=n.group.items.map(vi),e[2]=n.group.items,e[3]=r):r=e[3];let o;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==r?(o=s.jsx(ns,{label:l,defaultExpanded:i,children:r}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=r,e[7]=o):o=e[7],o}case"items":{let l;e[8]!==n.items?(l=n.items.map(ji),e[8]=n.items,e[9]=l):l=e[9];let i;return e[10]!==l?(i=s.jsx(ot,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(at,{children:s.jsx(ae,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=i):i=e[11],i}case"custom":return n.content}}function ji(t){return s.jsx(is,{item:t},t.key)}function vi(t){return s.jsx(is,{item:t},t.key)}function yi(t){const e=$.c(14),{sections:n,footer:l,additionalContent:i,variant:r,contentClassName:o}=t,a=r===void 0?"sidebar":r;let d;e[0]!==o?(d=E("flex flex-col flex-1 px-2 pb-2 gap-0.5",o),e[0]=o,e[1]=d):d=e[1];let c;e[2]!==n?(c=n.map(Si),e[2]=n,e[3]=c):c=e[3];let m;e[4]!==i?(m=i&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:i}),e[4]=i,e[5]=m):m=e[5];let u;e[6]!==d||e[7]!==c||e[8]!==m?(u=s.jsxs(Ht,{className:d,children:[c,m]}),e[6]=d,e[7]=c,e[8]=m,e[9]=u):u=e[9];let f;return e[10]!==l||e[11]!==u||e[12]!==a?(f=s.jsxs(Fs,{variant:a,children:[u,l]}),e[10]=l,e[11]=u,e[12]=a,e[13]=f):f=e[13],f}function Si(t,e){return s.jsx(bi,{section:t},e)}function ls(t){const e=$.c(2);let n;return e[0]!==t?(n=s.jsx(yi,{...t}),e[0]=t,e[1]=n):n=e[1],n}ls.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(se,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Ni(t){const e=$.c(16),{onToggle:n,className:l}=t,r=bs().logo??js,o=typeof r=="string"?r:r.light,a=typeof r=="string"?r:r.dark;let d;e[0]!==l?(d=E("flex flex-row items-center gap-2 md:gap-0.5 shrink-0 h-12 pl-1 pr-2 pt-0.25 pb-0","group-data-[collapsible=icon]/sidebar:hidden",l),e[0]=l,e[1]=d):d=e[1];let c;e[2]!==o?(c=s.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),e[2]=o,e[3]=c):c=e[3];let m;e[4]!==a?(m=s.jsx("img",{src:a,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),e[4]=a,e[5]=m):m=e[5];let u;e[6]!==c||e[7]!==m?(u=s.jsx("span",{className:"flex items-center shrink-0 pl-1",children:s.jsxs("span",{className:"flex items-center shrink-0 px-2",children:[c,m]})}),e[6]=c,e[7]=m,e[8]=u):u=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Gt,{size:16}),e[9]=f):f=e[9];let x;e[10]!==n?(x=s.jsx(ve,{onClick:n,"aria-label":"Toggle sidebar",children:f}),e[10]=n,e[11]=x):x=e[11];let g;return e[12]!==d||e[13]!==u||e[14]!==x?(g=s.jsxs(Ls,{className:d,children:[u,x]}),e[12]=d,e[13]=u,e[14]=x,e[15]=g):g=e[15],g}function Nt(t){const e=$.c(18),{item:n,onClose:l}=t,i=n.isActive&&"z-10";let r;e[0]!==i?(r=E(i),e[0]=i,e[1]=r):r=e[1];let o;e[2]!==n||e[3]!==l?(o=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=o):o=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let d;e[7]!==n.label?(d=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=d):d=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==o||e[12]!==a||e[13]!==d?(c=s.jsxs(J,{onClick:o,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=n.isActive,e[10]=n.label,e[11]=o,e[12]=a,e[13]=d,e[14]=c):c=e[14];let m;return e[15]!==r||e[16]!==c?(m=s.jsx(K,{className:r,children:c}),e[15]=r,e[16]=c,e[17]=m):m=e[17],m}function _i(t){const e=$.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Rt,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=n.group.label,r=n.group.defaultExpanded;let o;if(e[2]!==l||e[3]!==n.group.items){let d;e[5]!==l?(d=c=>s.jsx(Nt,{item:c,onClose:l},c.key),e[5]=l,e[6]=d):d=e[6],o=n.group.items.map(d),e[2]=l,e[3]=n.group.items,e[4]=o}else o=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==o?(a=s.jsx(ns,{label:i,defaultExpanded:r,children:o}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=o,e[10]=a):a=e[10],a}case"items":{let i;if(e[11]!==l||e[12]!==n.items){let o;e[14]!==l?(o=a=>s.jsx(Nt,{item:a,onClose:l},a.key),e[14]=l,e[15]=o):o=e[15],i=n.items.map(o),e[11]=l,e[12]=n.items,e[13]=i}else i=e[13];let r;return e[16]!==i?(r=s.jsx(ot,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(at,{children:s.jsx(ae,{className:"gap-1.5",children:i})})}),e[16]=i,e[17]=r):r=e[17],r}case"custom":return n.content}}function Ci(t){const e=$.c(17),{sections:n,onClose:l,footer:i,additionalContent:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"h-12 shrink-0"}),e[0]=o):o=e[0];let a;e[1]!==l?(a=s.jsx(F.Suspense,{fallback:o,children:s.jsx(Ni,{onToggle:l})}),e[1]=l,e[2]=a):a=e[2];let d;if(e[3]!==l||e[4]!==n){let f;e[6]!==l?(f=(x,g)=>s.jsx(_i,{section:x,onClose:l},g),e[6]=l,e[7]=f):f=e[7],d=n.map(f),e[3]=l,e[4]=n,e[5]=d}else d=e[5];let c;e[8]!==r?(c=r&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:r}),e[8]=r,e[9]=c):c=e[9];let m;e[10]!==d||e[11]!==c?(m=s.jsxs(Ht,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[d,c]}),e[10]=d,e[11]=c,e[12]=m):m=e[12];let u;return e[13]!==i||e[14]!==a||e[15]!==m?(u=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[a,m,i]}),e[13]=i,e[14]=a,e[15]=m,e[16]=u):u=e[16],u}function De(t){const e=$.c(22),{item:n,onClose:l}=t;if(n.href){const d=n.external?"_blank":void 0,c=n.external?"noopener noreferrer":void 0;let m;e[0]!==n.icon?(m=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[0]=n.icon,e[1]=m):m=e[1];let u;e[2]!==n.label?(u=s.jsx("span",{className:"flex-1",children:n.label}),e[2]=n.label,e[3]=u):u=e[3];let f;return e[4]!==n.href||e[5]!==l||e[6]!==d||e[7]!==c||e[8]!==m||e[9]!==u?(f=s.jsxs("a",{href:n.href,target:d,rel:c,className:"flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",onClick:l,children:[m,u]}),e[4]=n.href,e[5]=l,e[6]=d,e[7]=c,e[8]=m,e[9]=u,e[10]=f):f=e[10],f}let i;e[11]!==n||e[12]!==l?(i=()=>{n.onClick?.(),l()},e[11]=n,e[12]=l,e[13]=i):i=e[13];let r;e[14]!==n.icon?(r=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[14]=n.icon,e[15]=r):r=e[15];let o;e[16]!==n.label?(o=s.jsx("span",{className:"flex-1",children:n.label}),e[16]=n.label,e[17]=o):o=e[17];let a;return e[18]!==i||e[19]!==r||e[20]!==o?(a=s.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",children:[r,o]}),e[18]=i,e[19]=r,e[20]=o,e[21]=a):a=e[21],a}function _t(t){const e=$.c(126),{user:n,userImage:l,menuItems:i,signOutItem:r,themeOptions:o,preferences:a,setPreferences:d,close:c,isMobile:m}=t;if(m){const U=n?.name??"U";let q;e[0]!==U||e[1]!==l?(q=s.jsx(Le,{url:l,fallback:U,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=U,e[1]=l,e[2]=q):q=e[2];const R=n?.name??"User";let Z;e[3]!==R?(Z=s.jsx("p",{className:"text-sm font-medium truncate",children:R}),e[3]=R,e[4]=Z):Z=e[4];const ge=n?.email;let ee;e[5]!==ge?(ee=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:ge}),e[5]=ge,e[6]=ee):ee=e[6];let fe;e[7]!==Z||e[8]!==ee?(fe=s.jsxs("div",{className:"flex-1 min-w-0",children:[Z,ee]}),e[7]=Z,e[8]=ee,e[9]=fe):fe=e[9];let be;e[10]!==n?(be=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Ii)},e[10]=n,e[11]=be):be=e[11];let ne;e[12]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsx(gt,{size:14}),e[12]=ne):ne=e[12];let he;e[13]!==be?(he=s.jsx(ce,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:be,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:ne})}),e[13]=be,e[14]=he):he=e[14];let je;e[15]===Symbol.for("react.memo_cache_sentinel")?(je=s.jsx(de,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[15]=je):je=e[15];let T;e[16]!==he?(T=s.jsx(et,{delayDuration:300,children:s.jsxs(me,{children:[he,je]})}),e[16]=he,e[17]=T):T=e[17];let H;e[18]!==T||e[19]!==q||e[20]!==fe?(H=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[q,fe,T]}),e[18]=T,e[19]=q,e[20]=fe,e[21]=H):H=e[21];let X;if(e[22]!==c||e[23]!==i){let le;e[25]!==c?(le=Pe=>s.jsx(De,{item:Pe,onClose:c},Pe.key),e[25]=c,e[26]=le):le=e[26],X=i.map(le),e[22]=c,e[23]=i,e[24]=X}else X=e[24];let W;e[27]!==c||e[28]!==r?(W=s.jsx(De,{item:r,onClose:c}),e[27]=c,e[28]=r,e[29]=W):W=e[29];let ie;e[30]!==X||e[31]!==W?(ie=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:[X,W]})}),e[30]=X,e[31]=W,e[32]=ie):ie=e[32];let Se;if(e[33]!==a.theme||e[34]!==d||e[35]!==o){let le;e[37]!==a.theme||e[38]!==d?(le=Pe=>{const{value:Xe,icon:xs,label:ps}=Pe;return s.jsx("button",{type:"button","aria-label":ps,onClick:()=>d(gs=>({...gs,theme:Xe})),className:E("size-8 rounded-md flex items-center justify-center transition-colors",a.theme===Xe?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:xs},Xe)},e[37]=a.theme,e[38]=d,e[39]=le):le=e[39],Se=o.map(le),e[33]=a.theme,e[34]=d,e[35]=o,e[36]=Se}else Se=e[36];let Ne;e[40]!==Se?(Ne=s.jsx("div",{className:"flex items-center gap-0.5",children:Se}),e[40]=Se,e[41]=Ne):Ne=e[41];const qe=a.enableSounds?"Disable sounds":"Enable sounds";let _e;e[42]!==d?(_e=()=>d(Ai),e[42]=d,e[43]=_e):_e=e[43];const Ke=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let Ce;e[44]!==Ke?(Ce=E("size-8 rounded-md flex items-center justify-center transition-colors",Ke),e[44]=Ke,e[45]=Ce):Ce=e[45];let we;e[46]!==a.enableSounds?(we=a.enableSounds?s.jsx(bt,{size:14}):s.jsx(jt,{size:14}),e[46]=a.enableSounds,e[47]=we):we=e[47];let ke;e[48]!==qe||e[49]!==_e||e[50]!==Ce||e[51]!==we?(ke=s.jsx("button",{type:"button","aria-label":qe,onClick:_e,className:Ce,children:we}),e[48]=qe,e[49]=_e,e[50]=Ce,e[51]=we,e[52]=ke):ke=e[52];let Me;e[53]===Symbol.for("react.memo_cache_sentinel")?(Me=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.32.0"]}),e[53]=Me):Me=e[53];let Ae;e[54]!==ke?(Ae=s.jsxs("div",{className:"flex items-center gap-2",children:[ke,Me]}),e[54]=ke,e[55]=Ae):Ae=e[55];let Ie;e[56]!==Ne||e[57]!==Ae?(Ie=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[Ne,Ae]}),e[56]=Ne,e[57]=Ae,e[58]=Ie):Ie=e[58];let Oe;return e[59]!==H||e[60]!==ie||e[61]!==Ie?(Oe=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[H,ie,Ie]}),e[59]=H,e[60]=ie,e[61]=Ie,e[62]=Oe):Oe=e[62],Oe}const u=n?.name??"U";let f;e[63]!==u||e[64]!==l?(f=s.jsx(Le,{url:l,fallback:u,shape:"circle",size:"sm",className:"shrink-0"}),e[63]=u,e[64]=l,e[65]=f):f=e[65];const x=n?.name??"User";let g;e[66]!==x?(g=s.jsx("p",{className:"text-sm font-medium truncate",children:x}),e[66]=x,e[67]=g):g=e[67];const j=n?.email;let h;e[68]!==j?(h=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:j}),e[68]=j,e[69]=h):h=e[69];let p;e[70]!==g||e[71]!==h?(p=s.jsxs("div",{className:"flex-1 min-w-0",children:[g,h]}),e[70]=g,e[71]=h,e[72]=p):p=e[72];let b;e[73]!==n?(b=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(ki)},e[73]=n,e[74]=b):b=e[74];let y;e[75]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(gt,{size:14}),e[75]=y):y=e[75];let v;e[76]!==b?(v=s.jsx(ce,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:b,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:y})}),e[76]=b,e[77]=v):v=e[77];let w;e[78]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(de,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[78]=w):w=e[78];let C;e[79]!==v?(C=s.jsx(et,{delayDuration:300,children:s.jsxs(me,{children:[v,w]})}),e[79]=v,e[80]=C):C=e[80];let N;e[81]!==C||e[82]!==f||e[83]!==p?(N=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[f,p,C]}),e[81]=C,e[82]=f,e[83]=p,e[84]=N):N=e[84];let S;if(e[85]!==c||e[86]!==i){let U;e[88]!==c?(U=q=>s.jsx(De,{item:q,onClose:c},q.key),e[88]=c,e[89]=U):U=e[89],S=i.map(U),e[85]=c,e[86]=i,e[87]=S}else S=e[87];let A;e[90]!==c||e[91]!==r?(A=s.jsx(De,{item:r,onClose:c}),e[90]=c,e[91]=r,e[92]=A):A=e[92];let k;e[93]!==S||e[94]!==A?(k=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[S,A]}),e[93]=S,e[94]=A,e[95]=k):k=e[95];let z;if(e[96]!==a.theme||e[97]!==d||e[98]!==o){let U;e[100]!==a.theme||e[101]!==d?(U=q=>{const{value:R,icon:Z,label:ge}=q;return s.jsx("button",{type:"button","aria-label":ge,onClick:()=>d(ee=>({...ee,theme:R})),className:E("size-7 rounded-md flex items-center justify-center transition-colors",a.theme===R?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Z},R)},e[100]=a.theme,e[101]=d,e[102]=U):U=e[102],z=o.map(U),e[96]=a.theme,e[97]=d,e[98]=o,e[99]=z}else z=e[99];let _;e[103]!==z?(_=s.jsx("div",{className:"flex items-center gap-0.5",children:z}),e[103]=z,e[104]=_):_=e[104];const I=a.enableSounds?"Disable sounds":"Enable sounds";let M;e[105]!==d?(M=()=>d(wi),e[105]=d,e[106]=M):M=e[106];const L=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let P;e[107]!==L?(P=E("size-7 rounded-md flex items-center justify-center transition-colors",L),e[107]=L,e[108]=P):P=e[108];let D;e[109]!==a.enableSounds?(D=a.enableSounds?s.jsx(bt,{size:14}):s.jsx(jt,{size:14}),e[109]=a.enableSounds,e[110]=D):D=e[110];let O;e[111]!==I||e[112]!==M||e[113]!==P||e[114]!==D?(O=s.jsx("button",{type:"button","aria-label":I,onClick:M,className:P,children:D}),e[111]=I,e[112]=M,e[113]=P,e[114]=D,e[115]=O):O=e[115];let B;e[116]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.32.0"]}),e[116]=B):B=e[116];let G;e[117]!==O?(G=s.jsxs("div",{className:"flex items-center gap-2",children:[O,B]}),e[117]=O,e[118]=G):G=e[118];let V;e[119]!==_||e[120]!==G?(V=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[_,G]}),e[119]=_,e[120]=G,e[121]=V):V=e[121];let Y;return e[122]!==N||e[123]!==k||e[124]!==V?(Y=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[N,k,V]})}),e[122]=N,e[123]=k,e[124]=V,e[125]=Y):Y=e[125],Y}function wi(t){return{...t,enableSounds:!t.enableSounds}}function ki(){re.success("User ID copied")}function Ai(t){return{...t,enableSounds:!t.enableSounds}}function Ii(){re.success("User ID copied")}function st(){const t=$.c(34),{data:e}=xe.useSession(),{org:n}=te(),l=ue();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const o=vs(i)?.params.org,[a,d]=ys(),c=ct(),[m,u]=F.useState(!1),f=e?.user,x=f?.image;let g;t[1]===Symbol.for("react.memo_cache_sentinel")?(g=()=>u(!1),t[1]=g):g=t[1];const j=g;let h;t[2]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(dt,{size:16}),t[2]=h):h=t[2];let p;t[3]!==l||t[4]!==o?(p={key:"preferences",label:"Preferences",icon:h,onClick:()=>{l({to:"/$org/settings/profile",params:{org:o??""}})}},t[3]=l,t[4]=o,t[5]=p):p=t[5];let b;t[6]!==n||t[7]!==l?(b=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(Ws,{size:16}),onClick:()=>{l({to:"/$org/install",params:{org:n.slug}})}}]:[],t[6]=n,t[7]=l,t[8]=b):b=t[8];let y;t[9]===Symbol.for("react.memo_cache_sentinel")?(y={key:"terms",label:"Terms of Use",icon:s.jsx(Ks,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[9]=y):y=t[9];let v;t[10]===Symbol.for("react.memo_cache_sentinel")?(v={key:"privacy",label:"Privacy Policy",icon:s.jsx(Js,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[10]=v):v=t[10];let w;t[11]===Symbol.for("react.memo_cache_sentinel")?(w={key:"github",label:"decocms/studio",icon:s.jsx(Ss,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[11]=w):w=t[11];let C;t[12]===Symbol.for("react.memo_cache_sentinel")?(C={key:"community",label:"Community",icon:s.jsx(Zs,{size:16}),href:"https://decocms.com/discord",external:!0},t[12]=C):C=t[12];let N;t[13]===Symbol.for("react.memo_cache_sentinel")?(N={key:"homepage",label:"Homepage",icon:s.jsx(qs,{size:16}),href:"https://decocms.com",external:!0},t[13]=N):N=t[13];let S;t[14]!==p||t[15]!==b?(S=[p,...b,y,v,w,C,N],t[14]=p,t[15]=b,t[16]=S):S=t[16];const A=S;let k;t[17]===Symbol.for("react.memo_cache_sentinel")?(k={key:"logout",label:"Sign out",icon:s.jsx(Xs,{size:16}),onClick:$i},t[17]=k):k=t[17];const z=k;let _;t[18]===Symbol.for("react.memo_cache_sentinel")?(_={value:"light",icon:s.jsx(Ys,{size:14}),label:"Light theme"},t[18]=_):_=t[18];let I;t[19]===Symbol.for("react.memo_cache_sentinel")?(I={value:"dark",icon:s.jsx(Qs,{size:14}),label:"Dark theme"},t[19]=I):I=t[19];let M;t[20]===Symbol.for("react.memo_cache_sentinel")?(M=[_,I,{value:"system",icon:s.jsx(tt,{size:14}),label:"System theme"}],t[20]=M):M=t[20];const L=M;let P;t[21]!==c||t[22]!==A||t[23]!==a||t[24]!==d||t[25]!==f||t[26]!==x?(P={user:f,userImage:x,menuItems:A,signOutItem:z,themeOptions:L,preferences:a,setPreferences:d,close:j,isMobile:c},t[21]=c,t[22]=A,t[23]=a,t[24]=d,t[25]=f,t[26]=x,t[27]=P):P=t[27];const D=P;let O;return t[28]!==c||t[29]!==m||t[30]!==D||t[31]!==f?.name||t[32]!==x?(O=s.jsx(s.Fragment,{children:c?s.jsxs(Ut,{open:m,onOpenChange:u,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>u(!0),className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx(Le,{url:x,fallback:f?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??"Account"})]}),s.jsxs(Wt,{className:"h-[80dvh] p-0",children:[s.jsx(qt,{className:"sr-only",children:"Account"}),s.jsx(_t,{...D})]})]}):s.jsxs(Ge,{open:m,onOpenChange:u,children:[s.jsx(ze,{asChild:!0,children:s.jsxs(J,{tooltip:f?.name??"Account",className:"rounded-md",children:[s.jsx(Le,{url:x,fallback:f?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??"Account"})]})}),s.jsx(Ue,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:zi,children:s.jsx(_t,{...D})})]})}),t[28]=c,t[29]=m,t[30]=D,t[31]=f?.name,t[32]=x,t[33]=O):O=t[33],O}function zi(t){return t.preventDefault()}function $i(){oe("signed_out",{source:"account_popover"}),Ns(),xe.signOut()}function nt(t){const e=$.c(43),{variant:n}=t===void 0?{}:t,l=n===void 0?"icon":n,i=mn(),[r,o]=F.useState(!1);let a,d;if(e[0]!==i.capabilities||e[1]!==i.hostname||e[2]!==i.machineId||e[3]!==i.online){const y=un(i.capabilities);a=i.online?"Desktop linked":"Connect desktop",d=i.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:i.hostname??i.machineId??"Desktop linked"}),s.jsx("span",{className:"text-muted-foreground",children:y.length>0?`Available: ${y.join(", ")}`:"No CLI agents detected"})]}):s.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=i.capabilities,e[1]=i.hostname,e[2]=i.machineId,e[3]=i.online,e[4]=a,e[5]=d}else a=e[4],d=e[5];const c=d;if(l==="full"){let y,v;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=()=>o(!0),v=s.jsx(tt,{}),e[6]=y,e[7]=v):(y=e[6],v=e[7]);let w;e[8]!==a?(w=s.jsx("span",{children:a}),e[8]=a,e[9]=w):w=e[9];let C;e[10]!==i.online?(C=i.online&&s.jsx("span",{className:"ml-auto size-2 rounded-full bg-success animate-pulse"}),e[10]=i.online,e[11]=C):C=e[11];let N;e[12]!==a||e[13]!==w||e[14]!==C?(N=s.jsx(ce,{asChild:!0,children:s.jsxs(J,{tooltip:a,onClick:y,children:[v,w,C]})}),e[12]=a,e[13]=w,e[14]=C,e[15]=N):N=e[15];let S;e[16]!==c?(S=s.jsx(de,{side:"right",children:c}),e[16]=c,e[17]=S):S=e[17];let A;e[18]!==N||e[19]!==S?(A=s.jsxs(me,{children:[N,S]}),e[18]=N,e[19]=S,e[20]=A):A=e[20];let k;e[21]!==r?(k=s.jsx(yt,{open:r,onOpenChange:o}),e[21]=r,e[22]=k):k=e[22];let z;return e[23]!==k||e[24]!==A?(z=s.jsxs(s.Fragment,{children:[A,k]}),e[23]=k,e[24]=A,e[25]=z):z=e[25],z}let m;e[26]===Symbol.for("react.memo_cache_sentinel")?(m=()=>o(!0),e[26]=m):m=e[26];const u=i.online?"Desktop linked":"Connect your desktop";let f;e[27]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(tt,{size:16}),e[27]=f):f=e[27];let x;e[28]!==i.online?(x=i.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[28]=i.online,e[29]=x):x=e[29];let g;e[30]!==u||e[31]!==x?(g=s.jsx(ce,{asChild:!0,children:s.jsxs(ve,{onClick:m,"aria-label":u,children:[f,x]})}),e[30]=u,e[31]=x,e[32]=g):g=e[32];let j;e[33]!==c?(j=s.jsx(de,{side:"bottom",children:c}),e[33]=c,e[34]=j):j=e[34];let h;e[35]!==g||e[36]!==j?(h=s.jsxs(me,{children:[g,j]}),e[35]=g,e[36]=j,e[37]=h):h=e[37];let p;e[38]!==r?(p=s.jsx(yt,{open:r,onOpenChange:o}),e[38]=r,e[39]=p):p=e[39];let b;return e[40]!==p||e[41]!==h?(b=s.jsxs(s.Fragment,{children:[h,p]}),e[40]=p,e[41]=h,e[42]=b):b=e[42],b}class Ti extends F.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function Mi(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Oi(){const t=$.c(17),e=ue(),{org:n}=te(),{hasDecoKey:l,balanceDollars:i}=on();if(!l)return null;let r;t[0]!==i?(r=i!=null?`Credits: $${i.toFixed(2)}`:"Credits",t[0]=i,t[1]=r):r=t[1];let o;t[2]!==i?(o=E(i!=null&&Mi(i)),t[2]=i,t[3]=o):o=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(en,{}),t[7]=d):d=t[7];let c;t[8]!==i?(c=i!=null?`$${i.toFixed(2)}`:"Credits",t[8]=i,t[9]=c):c=t[9];let m;t[10]!==c?(m=s.jsx("span",{children:c}),t[10]=c,t[11]=m):m=t[11];let u;return t[12]!==r||t[13]!==o||t[14]!==a||t[15]!==m?(u=s.jsx(ae,{children:s.jsx(K,{children:s.jsxs(J,{tooltip:r,className:o,onClick:a,children:[d,m]})})}),t[12]=r,t[13]=o,t[14]=a,t[15]=m,t[16]=u):u=t[16],u}function Ct(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ti,{children:s.jsx(F.Suspense,{fallback:null,children:s.jsx(Oi,{})})}),t[0]=e):e=t[0],e}function wt(){const t=$.c(7),e=ue(),{org:n}=te();let l;t[0]!==e||t[1]!==n.slug?(l=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=l):l=t[2];let i,r;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(dt,{}),r=s.jsx("span",{children:"Settings"}),t[3]=i,t[4]=r):(i=t[3],r=t[4]);let o;return t[5]!==l?(o=s.jsxs(J,{tooltip:"Settings",onClick:l,children:[i,r]}),t[5]=l,t[6]=o):o=t[6],o}function kt(){const t=$.c(4),[e,n]=F.useState(!1);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(K,{children:s.jsx(rn,{trigger:s.jsxs(J,{tooltip:"Invite members",children:[s.jsx(tn,{}),s.jsx("span",{children:"Invite members"})]})})}),t[0]=l):l=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(ae,{className:"gap-0.5",children:[l,s.jsx(K,{children:s.jsxs(J,{tooltip:"Add connection",onClick:()=>n(!0),children:[s.jsx(Vs,{}),s.jsx("span",{children:"Add connection"})]})})]}),t[1]=i):i=t[1];let r;return t[2]!==e?(r=s.jsxs(s.Fragment,{children:[i,s.jsx(an,{open:e,onOpenChange:n,mode:"browse"})]}),t[2]=e,t[3]=r):r=t[3],r}function Pi(){const t=$.c(10),{state:e}=pe();if(e==="collapsed"){let d,c;t[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(kt,{}),c=s.jsx(Ct,{}),t[0]=d,t[1]=c):(d=t[0],c=t[1]);let m;t[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(K,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(nt,{})})}),t[2]=m):m=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(K,{children:s.jsx(wt,{})}),t[3]=u):u=t[3];let f;return t[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs(Ze,{className:"px-2 pb-3 gap-1",children:[d,c,s.jsxs(ae,{children:[m,u,s.jsx(K,{children:s.jsx(st,{})})]})]}),t[4]=f):f=t[4],f}let l,i;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(kt,{}),i=s.jsx(Ct,{}),t[5]=l,t[6]=i):(l=t[5],i=t[6]);let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(K,{children:s.jsx(nt,{variant:"full"})}),t[7]=r):r=t[7];let o;t[8]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(K,{children:s.jsx(wt,{})}),t[8]=o):o=t[8];let a;return t[9]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs(Ze,{className:"px-2 pb-3 gap-0.5",children:[l,i,s.jsxs(ae,{className:"gap-0.5",children:[r,o,s.jsx(K,{children:s.jsx(st,{})})]})]}),t[9]=a):a=t[9],a}function Di(){const t=$.c(8),e=ue(),{org:n}=te(),{setOpenMobile:l}=pe();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(ae,{children:s.jsx(K,{children:s.jsx(st,{})})})}),t[0]=i):i=t[0];let r;t[1]!==e||t[2]!==n.slug||t[3]!==l?(r=()=>{e({to:"/$org/settings",params:{org:n.slug}}),l(!1)},t[1]=e,t[2]=n.slug,t[3]=l,t[4]=r):r=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(dt,{className:"size-4"}),t[5]=o):o=t[5];let a;return t[6]!==r?(a=s.jsx(Ze,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[i,s.jsx(ve,{"aria-label":"Settings",onClick:r,children:o})]})}),t[6]=r,t[7]=a):a=t[7],a}function At(t){const e=$.c(15),{className:n,wrapperClassName:l,children:i}=t,[r,o]=F.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=p=>{p&&o(p.scrollHeight>p.clientHeight+1)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=p=>{const b=p.currentTarget;o(b.scrollHeight-b.scrollTop>b.clientHeight+1)},e[1]=c):c=e[1];const m=c;let u;e[2]!==l?(u=E("relative",l),e[2]=l,e[3]=u):u=e[3];let f;e[4]!==i||e[5]!==n?(f=s.jsx("div",{ref:d,onScroll:m,className:n,children:i}),e[4]=i,e[5]=n,e[6]=f):f=e[6];const x=r?"opacity-100":"opacity-0";let g;e[7]!==x?(g=E("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",x),e[7]=x,e[8]=g):g=e[8];let j;e[9]!==g?(j=s.jsx("div",{"aria-hidden":!0,className:g}),e[9]=g,e[10]=j):j=e[10];let h;return e[11]!==u||e[12]!==f||e[13]!==j?(h=s.jsxs("div",{className:u,children:[f,j]}),e[11]=u,e[12]=f,e[13]=j,e[14]=h):h=e[14],h}function Ei(t){const e=$.c(8),{virtualMcpId:n,size:l,showAutomationBadge:i}=t,r=l===void 0?"sm":l;let o;e[0]!==r||e[1]!==n?(o=n?s.jsx(Fi,{virtualMcpId:n,size:r}):s.jsx(ye,{icon:null,name:"?",size:r}),e[0]=r,e[1]=n,e[2]=o):o=e[2];let a;e[3]!==i?(a=i&&s.jsx("span",{"aria-label":"Automation-triggered",className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(Qt,{size:10,className:"text-white"})}),e[3]=i,e[4]=a):a=e[4];let d;return e[5]!==o||e[6]!==a?(d=s.jsxs("div",{className:"relative shrink-0",children:[o,a]}),e[5]=o,e[6]=a,e[7]=d):d=e[7],d}function Fi(t){const e=$.c(6),{virtualMcpId:n,size:l}=t,i=mt(n);if(!i){let a;return e[0]!==l?(a=s.jsx(ye,{icon:null,name:"?",size:l}),e[0]=l,e[1]=a):a=e[1],a}const r=i.icon??null;let o;return e[2]!==i.title||e[3]!==l||e[4]!==r?(o=s.jsx(ye,{icon:r,name:i.title,size:l}),e[2]=i.title,e[3]=l,e[4]=r,e[5]=o):o=e[5],o}function It(t){const e=$.c(36),{open:n,onOpenChange:l}=t,[i,r]=F.useState(""),{org:o}=te(),{setTaskId:a}=ft(),d=Yt();let c,m,u;e[0]!==o.id||e[1]!==i?(u=i.trim(),m=Cs,c=_s.globalSearch(o.id,u),e[0]=o.id,e[1]=i,e[2]=c,e[3]=m,e[4]=u):(c=e[2],m=e[3],u=e[4]);const f=n&&u.length>0;let x;e[5]!==d||e[6]!==u?(x=async()=>await d.call("GLOBAL_SEARCH",{query:u,limit:20}),e[5]=d,e[6]=u,e[7]=x):x=e[7];let g;e[8]!==c||e[9]!==f||e[10]!==x?(g={queryKey:c,enabled:f,queryFn:x,staleTime:1e4},e[8]=c,e[9]=f,e[10]=x,e[11]=g):g=e[11];const{data:j,isFetching:h}=m(g);let p;e[12]!==j?.items?(p=j?.items??[],e[12]=j?.items,e[13]=p):p=e[13];const b=p;let y;e[14]!==l?(y=I=>{I||r(""),l(I)},e[14]=l,e[15]=y):y=e[15];const v=y;let w;e[16]!==v||e[17]!==a?(w=I=>{v(!1),a(I.id,I.virtual_mcp_id??void 0)},e[16]=v,e[17]=a,e[18]=w):w=e[18];const C=w;let N;e[19]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsxs(Nn,{className:"sr-only",children:[s.jsx(_n,{children:"Search"}),s.jsx(Cn,{children:"Search across your organization's resources."})]}),e[19]=N):N=e[19];let S;e[20]!==i?(S=s.jsx(zn,{value:i,onValueChange:r,placeholder:"Search..."}),e[20]=i,e[21]=S):S=e[21];let A;e[22]!==C||e[23]!==h||e[24]!==b||e[25]!==u?(A=u?h&&b.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):b.length===0?s.jsx(An,{children:"No results."}):b.map(I=>I.type==="thread"?s.jsxs(In,{value:`thread:${I.id}:${I.title}`,onSelect:()=>C(I),className:"gap-2.5",children:[s.jsx(Ei,{virtualMcpId:I.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:I.title||"Untitled thread"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(I.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${I.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=C,e[23]=h,e[24]=b,e[25]=u,e[26]=A):A=e[26];let k;e[27]!==A?(k=s.jsx($n,{children:A}),e[27]=A,e[28]=k):k=e[28];let z;e[29]!==S||e[30]!==k?(z=s.jsxs(wn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[N,s.jsxs(Tn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[S,k]})]}),e[29]=S,e[30]=k,e[31]=z):z=e[31];let _;return e[32]!==v||e[33]!==n||e[34]!==z?(_=s.jsx(kn,{open:n,onOpenChange:v,children:z}),e[32]=v,e[33]=n,e[34]=z,e[35]=_):_=e[35],_}function Li(t){return t==="ephemeral"||t.startsWith("thread:")}function rs(t){const e=$.c(40),{task:n,isActive:l,onClick:i,onArchive:r,showAutomationBadge:o,showAgentIcon:a,hideStatusIdle:d,indented:c}=t,m=Pn(n.status),u=m.icon,f=n.metadata?.kind==="tool_call_run",x=mt(f?void 0:n.virtual_mcp_id);let g;e[0]!==x?(g=cn(x),e[0]=x,e[1]=g):g=e[1];const j=g;Dn(6e4);const h=o||!!n.trigger_id,p=n.id,b="button",y=0;let v;e[2]!==i?(v=G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),i())},e[2]=i,e[3]=v):v=e[3];const w=c?"-ml-4 pl-6":"pl-2",C=l?"bg-accent text-accent-foreground":"hover:bg-accent/60";let N;e[4]!==w||e[5]!==C?(N=E("group/row flex items-center gap-2 py-1.5 pr-2 rounded-md cursor-pointer transition-colors",w,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",C),e[4]=w,e[5]=C,e[6]=N):N=e[6];let S;e[7]!==f||e[8]!==a||e[9]!==x?.icon||e[10]!==x?.title?(S=a&&!f&&s.jsx(ye,{icon:x?.icon??null,name:x?.title??"?",size:"2xs"}),e[7]=f,e[8]=a,e[9]=x?.icon,e[10]=x?.title,e[11]=S):S=e[11];let A;e[12]!==h?(A=h&&s.jsx(Qt,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[12]=h,e[13]=A):A=e[13];const k=n.title||"Untitled task";let z;e[14]!==k?(z=s.jsx("div",{className:"text-sm text-foreground truncate",children:k}),e[14]=k,e[15]=z):z=e[15];let _;e[16]!==A||e[17]!==z?(_=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[A,z]}),e[16]=A,e[17]=z,e[18]=_):_=e[18];let I;e[19]!==j||e[20]!==l||e[21]!==n.branch||e[22]!==n.updated_at?(I=n.updated_at&&s.jsxs("div",{className:E("flex items-center gap-1 text-[11px] min-w-0",l?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Li(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):j?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[j.owner,"/",j.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Fn(new Date(n.updated_at))})]}),e[19]=j,e[20]=l,e[21]=n.branch,e[22]=n.updated_at,e[23]=I):I=e[23];let M;e[24]!==_||e[25]!==I?(M=s.jsxs("div",{className:"flex-1 min-w-0",children:[_,I]}),e[24]=_,e[25]=I,e[26]=M):M=e[26];const L="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",P=!d&&s.jsx("span",{className:E("[grid-area:slot] flex size-7 items-center justify-center pointer-events-none transition-opacity",r&&"group-hover/row:opacity-0"),"aria-label":m.label,children:s.jsx(u,{size:14,className:E(m.iconClassName,n.status==="in_progress"&&"animate-spin")})});let D;e[27]!==r?(D=r&&s.jsxs(me,{children:[s.jsx(ce,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":"Archive task",onClick:G=>{G.stopPropagation(),r()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-7 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(ws,{size:14})})}),s.jsx(de,{side:"right",children:"Archive"})]}),e[27]=r,e[28]=D):D=e[28];let O;e[29]!==P||e[30]!==D?(O=s.jsxs("div",{className:L,children:[P,D]}),e[29]=P,e[30]=D,e[31]=O):O=e[31];let B;return e[32]!==i||e[33]!==M||e[34]!==O||e[35]!==v||e[36]!==N||e[37]!==S||e[38]!==n.id?(B=s.jsxs("div",{"data-task-id":p,role:b,tabIndex:y,onClick:i,onKeyDown:v,className:N,children:[S,M,O]}),e[32]=i,e[33]=M,e[34]=O,e[35]=v,e[36]=N,e[37]=S,e[38]=n.id,e[39]=B):B=e[39],B}const zt=["requires_action","in_progress","failed","expired","completed"];function Bi(t){const e=new Map(zt.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return zt.map(n=>({status:n,threads:e.get(n)}))}const Ri="sidebar.group.expanded.";function Hi(t,e){const n=$.c(3),[l,i]=He(`${Ri}${t}`,e);let r;return n[0]!==l||n[1]!==i?(r=[l,i],n[0]=l,n[1]=i,n[2]=r):r=n[2],r}function os(t){const e=$.c(12),{onClick:n,isFetching:l,indented:i}=t,r=i?"-ml-4 pl-6 pr-2":"px-2";let o;e[0]!==r?(o=E("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",r,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[0]=r,e[1]=o):o=e[1];let a;e[2]!==l?(a=l&&s.jsx(Lt,{size:14,className:"animate-spin"}),e[2]=l,e[3]=a):a=e[3];const d=l?"Loading…":"Show more";let c;e[4]!==d?(c=s.jsx("span",{children:d}),e[4]=d,e[5]=c):c=e[5];let m;return e[6]!==l||e[7]!==n||e[8]!==o||e[9]!==a||e[10]!==c?(m=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:l,className:o,children:[a,c]}),e[6]=l,e[7]=n,e[8]=o,e[9]=a,e[10]=c,e[11]=m):m=e[11],m}function Gi(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function Ui(t){return t.member==="mine"&&!t.currentUserId}const as=4;let Fe=0;const it=[];function Wi(){for(;Fe<as&&it.length>0;){const t=it.shift();t&&t()}}function cs(t){return new Promise((e,n)=>{const l=()=>{Fe++,t().then(e,n).finally(()=>{Fe--,Wi()})};Fe<as?l():it.push(l)})}const We=10;function $t(t,e,n,l,i){const r={hidden:!1};l.member==="mine"&&l.currentUserId&&(r.created_by=l.currentUserId),l.type==="automation"&&(r.has_trigger=!0),l.type==="manual"&&(r.has_trigger=!1);const o={where:r,limit:i,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function qi(t,e,n,l){let i=0;for(const r of t)ds(r,e,n,l)&&i++;return i}function Ve(t,e,n,l){return qi(t,e,n,l)}function Ki(t,e){return!!(t>=We||t===0&&e)}function Tt(t,e){return t<e}function Xi(t,e){return e===!1?!1:e===!0?!0:t}function ds(t,e,n,l){return!(t.hidden||(t.status??"completed")!==n||l.member==="mine"&&l.currentUserId&&t.created_by!==l.currentUserId||l.type==="automation"&&!t.trigger_id||l.type==="manual"&&t.trigger_id)}const Re=new Map,Ee=new Map;function Vi(t,e){return e?t>=We?!0:null:!1}function Mt(t){return Re.get(t)}function Yi(t,e){Re.set(t,e)}function Qi(t,e,n){const l=Re.get(t);if(l!==void 0){n(l);return}let i=Ee.get(t);i||(i=cs(e).then(r=>(Re.set(t,r),Ee.delete(t),r)).catch(()=>(Ee.delete(t),Promise.reject(new Error("group probe failed")))),Ee.set(t,i)),i.then(n,()=>n(!1))}function Ot(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===We,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ji(t,e,n,l,i){let r=0;for(const o of t)e.has(o.id)||ds(o,n,l,i)&&r++;return r}function Zi(t,e,n,l){const i=$.c(8),{org:r}=te(),o=Gi(r.id,t,e,n);let a;i[0]!==n?(a=Ui(n),i[0]=n,i[1]=a):a=i[1];const d=a,[c,m]=F.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==o&&m({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const u=vn(),{threads:f,hasMore:x}=ut(),g=Ve(f,t,e,n),j=Ki(g,x),h=Vi(g,x),p=Yt();if(c.identity===o&&c.serverHasMore===null){const N=h??Mt(o);N!==void 0&&m({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!d&&c.identity===o&&c.serverHasMore===null&&h===null&&Mt(o)===void 0&&c.probeSubscribedIdentity!==o&&(m(N=>N.identity===o?{...N,isProbing:!0,probeSubscribedIdentity:o}:N),Qi(o,async()=>{const N=$t(t,e,0,n,1),S=await p.call("COLLECTION_THREADS_LIST",N),{totalCount:A}=Ot(S),k=Ve(u.threads.get(),t,e,n);return A===void 0?!1:Tt(k,A)},N=>{m(S=>S.identity!==o?S:{...S,isProbing:!1,serverHasMore:N})}));const y=async function(){if(c.isFetching||c.isProbing||d)return;const S=o;m(A=>A.identity===S?{...A,isFetching:!0}:A);try{const A=Ve(f,t,e,n),k=$t(t,e,A,n,We),z=await cs(()=>p.call("COLLECTION_THREADS_LIST",k)),{items:_,hasMore:I,totalCount:M}=Ot(z),L=new Set(f.map(el)),P=Ji(_,L,t,e,n),D=A;u.mergeThreads(_),m(O=>{if(O.identity!==S)return O;let B;return M!==void 0?B=Tt(D+P,M):B=_.length===0||P===0?!1:I,Yi(S,B),{...O,isFetching:!1,serverHasMore:B}})}catch(A){const k=A,z=k instanceof Error?k.message:String(k);re.error(`Could not load more tasks: ${z}`),m(_=>_.identity===S?{..._,isFetching:!1}:_)}},v=c.isFetching||c.isProbing,w=!d&&!v&&Xi(j,c.serverHasMore);let C;return i[2]!==v||i[3]!==y||i[4]!==w||i[5]!==c.isProbing||i[6]!==c.serverHasMore?(C={hasMore:w,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:y},i[2]=v,i[3]=y,i[4]=w,i[5]=c.isProbing,i[6]=c.serverHasMore,i[7]=C):C=i[7],C}function el(t){return t.id}function tl(t){const e=$.c(20),{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:d}=t,{isFetching:c,isProbing:m,loadMore:u,hasMore:f,serverHasMore:x}=Zi("status",n,d),[g,j]=F.useState(!1);!g&&l.length===0&&x===!0&&!c&&!m&&(j(!0),queueMicrotask(()=>{u()}));let h;if(e[0]!==i||e[1]!==a||e[2]!==d||e[3]!==o||e[4]!==r||e[5]!==l){let y;e[7]!==i||e[8]!==a||e[9]!==d||e[10]!==o||e[11]!==r?(y=v=>s.jsx(rs,{task:v,isActive:i===v.id,onClick:()=>r(v),onArchive:a&&v.created_by===d.currentUserId?()=>o(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=i,e[8]=a,e[9]=d,e[10]=o,e[11]=r,e[12]=y):y=e[12],h=l.map(y),e[0]=i,e[1]=a,e[2]=d,e[3]=o,e[4]=r,e[5]=l,e[6]=h}else h=e[6];let p;e[13]!==f||e[14]!==c||e[15]!==u?(p=(f||c)&&s.jsx(os,{onClick:()=>{u()},isFetching:c,indented:!0}),e[13]=f,e[14]=c,e[15]=u,e[16]=p):p=e[16];let b;return e[17]!==h||e[18]!==p?(b=s.jsxs(s.Fragment,{children:[h,p]}),e[17]=h,e[18]=p,e[19]=b):b=e[19],b}function sl(t){const e=$.c(36),{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:d}=t,c=En[n],m=c.icon,[u,f]=Hi(`status-${n}`,!1);let x;e[0]!==u||e[1]!==f?(x=function(){f(!u)},e[0]=u,e[1]=f,e[2]=x):x=e[2];const g=x;let j;e[3]!==g?(j=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),g())},e[3]=g,e[4]=j):j=e[4];let h;e[5]!==m||e[6]!==c.iconClassName?(h=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(m,{size:12,className:c.iconClassName})}),e[5]=m,e[6]=c.iconClassName,e[7]=h):h=e[7];let p;e[8]!==u?(p=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:u?s.jsx(ht,{size:14}):s.jsx(Ln,{size:14})}),e[8]=u,e[9]=p):p=e[9];let b;e[10]!==h||e[11]!==p?(b=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[h,p]}),e[10]=h,e[11]=p,e[12]=b):b=e[12];let y;e[13]!==c.label?(y=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=y):y=e[14];let v;e[15]!==l.length?(v=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:l.length})}),e[15]=l.length,e[16]=v):v=e[16];let w;e[17]!==u||e[18]!==g||e[19]!==j||e[20]!==b||e[21]!==y||e[22]!==v?(w=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:g,onKeyDown:j,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[b,y,v]}),e[17]=u,e[18]=g,e[19]=j,e[20]=b,e[21]=y,e[22]=v,e[23]=w):w=e[23];let C;e[24]!==i||e[25]!==a||e[26]!==u||e[27]!==d||e[28]!==o||e[29]!==r||e[30]!==n||e[31]!==l?(C=u&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(tl,{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:d})}),e[24]=i,e[25]=a,e[26]=u,e[27]=d,e[28]=o,e[29]=r,e[30]=n,e[31]=l,e[32]=C):C=e[32];let N;return e[33]!==w||e[34]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[w,C]}),e[33]=w,e[34]=C,e[35]=N):N=e[35],N}function Pt(t){const e=$.c(38),{threads:n,groupBy:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:m,filtersActive:u}=t;if(n.length===0&&!d&&!c){let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(On,{className:"size-6 opacity-60"}),e[0]=h):h=e[0];const p=u?"No threads match your filters":"No threads yet";let b;return e[1]!==p?(b=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[h,s.jsx("p",{className:"text-sm",children:p})]}),e[1]=p,e[2]=b):b=e[2],b}const f=n.length>1||d;if(l==="status"){let h;if(e[3]!==i||e[4]!==f||e[5]!==a||e[6]!==o||e[7]!==r||e[8]!==n){let b;e[10]!==i||e[11]!==f||e[12]!==a||e[13]!==o||e[14]!==r?(b=y=>s.jsx(sl,{status:y.status,threads:y.threads,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:f,filters:a},y.status),e[10]=i,e[11]=f,e[12]=a,e[13]=o,e[14]=r,e[15]=b):b=e[15],h=Bi(n).map(b),e[3]=i,e[4]=f,e[5]=a,e[6]=o,e[7]=r,e[8]=n,e[9]=h}else h=e[9];let p;return e[16]!==h?(p=s.jsx(s.Fragment,{children:h}),e[16]=h,e[17]=p):p=e[17],p}let x;if(e[18]!==i||e[19]!==f||e[20]!==a||e[21]!==o||e[22]!==r||e[23]!==n){let h;e[25]!==i||e[26]!==f||e[27]!==a||e[28]!==o||e[29]!==r?(h=p=>s.jsx(rs,{task:p,isActive:i===p.id,onClick:()=>r(p),onArchive:f&&p.created_by===a.currentUserId?()=>o(p):void 0,showAutomationBadge:!!p.trigger_id,showAgentIcon:!0},p.id),e[25]=i,e[26]=f,e[27]=a,e[28]=o,e[29]=r,e[30]=h):h=e[30],x=n.map(h),e[18]=i,e[19]=f,e[20]=a,e[21]=o,e[22]=r,e[23]=n,e[24]=x}else x=e[24];let g;e[31]!==d||e[32]!==c||e[33]!==m?(g=(d||c)&&s.jsx(os,{onClick:m,isFetching:c}),e[31]=d,e[32]=c,e[33]=m,e[34]=g):g=e[34];let j;return e[35]!==x||e[36]!==g?(j=s.jsxs(s.Fragment,{children:[x,g]}),e[35]=x,e[36]=g,e[37]=j):j=e[37],j}function Dt(t){const e=$.c(17),{label:n,onClick:l,active:i,children:r}=t,[o,a]=F.useState(!1);let d,c,m,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),m=()=>a(!0),u=()=>a(!1),e[0]=d,e[1]=c,e[2]=m,e[3]=u):(d=e[0],c=e[1],m=e[2],u=e[3]);const f=i&&"bg-sidebar-accent text-foreground";let x;e[4]!==f?(x=E(f),e[4]=f,e[5]=x):x=e[5];let g;e[6]!==r||e[7]!==n||e[8]!==l||e[9]!==x?(g=s.jsx(ce,{asChild:!0,children:s.jsx(ve,{"aria-label":n,onClick:l,onPointerEnter:d,onPointerLeave:c,onFocus:m,onBlur:u,className:x,children:r})}),e[6]=r,e[7]=n,e[8]=l,e[9]=x,e[10]=g):g=e[10];let j;e[11]!==n?(j=s.jsx(de,{side:"bottom",children:n}),e[11]=n,e[12]=j):j=e[12];let h;return e[13]!==o||e[14]!==g||e[15]!==j?(h=s.jsxs(me,{open:o,children:[g,j]}),e[13]=o,e[14]=g,e[15]=j,e[16]=h):h=e[16],h}function Ye(t){const e=$.c(13),{label:n,value:l,onChange:i,options:r}=t;let o;e[0]!==n?(o=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=o):o=e[1];let a;e[2]!==i?(a=u=>u&&i(u),e[2]=i,e[3]=a):a=e[3];let d;e[4]!==r?(d=r.map(nl),e[4]=r,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==l?(c=s.jsx(xn,{type:"single",size:"sm",value:l,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:d}),e[6]=a,e[7]=d,e[8]=l,e[9]=c):c=e[9];let m;return e[10]!==o||e[11]!==c?(m=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,c]}),e[10]=o,e[11]=c,e[12]=m):m=e[12],m}function nl(t){return s.jsxs(hn,{value:t.value,className:"h-6 gap-1.5 rounded-md border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function ms({onNavigate:t}={}){const{data:e}=xe.useSession(),n=e?.user?.id,{org:l}=te(),i=pn({connectionId:gn,orgId:l.id,orgSlug:l.slug}),r=Be(l.id).id,o=Xt(),{threads:a,hasMore:d,isFetchingMore:c,fetchNextPage:m}=ut(),u=a.filter(T=>!T.hidden),{hide:f}=Vt(),x=ue(),{setTaskId:g,createNewTask:j}=ft(),h=lt({strict:!1}),p=rt({strict:!1}),b=h.taskId??null,y=p.virtualmcpid??a.find(T=>T.id===b)?.virtual_mcp_id??null,v=()=>{t?.()},w=[...u].sort((T,H)=>(H.updated_at??"").localeCompare(T.updated_at??"")),[C,N]=F.useState("all"),[S,A]=F.useState("flat"),[k,z]=He("sidebar-threads-scope-all",!1),[_,I]=F.useState(!1),[M,L]=F.useState(!1),P={type:C,member:"mine",currentUserId:n??null},D=T=>n?T.filter(H=>H.created_by===n):[],O=T=>C==="automation"?T.filter(H=>!!H.trigger_id):C==="manual"?T.filter(H=>!H.trigger_id):T,B=D(w),G=O(B),V=O(w),Y=k?V:G,U=T=>{if(n&&T.created_by&&T.created_by!==n)return;const H=T.id===b;if(f(T.id),!H)return;const X=B.find(W=>W.id!==T.id&&W.virtual_mcp_id===T.virtual_mcp_id);v(),X?g(X.id,X.virtual_mcp_id):x({to:"/$org",params:{org:l.slug}})},q=T=>{v(),g(T.id,T.virtual_mcp_id)},R=async T=>{try{const H=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:T,limit:1,offset:0}});return((H.structuredContent??H).items?.length??0)===0}catch{return!1}},Z=async()=>{const T=y??r;oe("sidebar_new_thread_clicked",{virtual_mcp_id:T});const H=B.find(X=>X.virtual_mcp_id===T&&X.title==="New chat");if(H&&await R(H.id)){v(),g(H.id,T);return}v(),j(T)},{state:ge,isMobile:ee,toggleSidebar:fe}=pe();if(ge==="collapsed"&&!ee){const T=Be(l.id),H=new Map((o??[]).map(W=>[W.id,W])),X=W=>(W?H.get(W):void 0)??(W===r?T:void 0);return s.jsxs(ae,{className:"min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(K,{children:s.jsx(J,{"aria-label":"Toggle sidebar",tooltip:"Toggle sidebar",onClick:fe,children:s.jsx(Gt,{size:16})})}),s.jsx(K,{children:s.jsx(J,{tooltip:"New thread",onClick:()=>{Z()},children:s.jsx(vt,{size:16})})}),Y.map(W=>{const ie=X(W.virtual_mcp_id);return s.jsx(K,{children:s.jsx(J,{tooltip:W.title||"New chat",isActive:W.id===b,onClick:()=>q(W),children:s.jsx(ye,{icon:ie?.icon??null,name:ie?.title??"Agent",size:"2xs"})})},W.id)})]})}const ne=S!=="flat"||C!=="all"||k===!0,he=s.jsxs(Ge,{children:[s.jsxs(me,{children:[s.jsx(ce,{asChild:!0,children:s.jsx(ze,{asChild:!0,children:s.jsxs(ve,{"aria-label":"Filter threads",active:ne,children:[s.jsx(fn,{size:16}),ne&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(de,{side:"bottom",children:"Filter threads"})]}),s.jsxs(Ue,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(Ye,{label:"View",value:S,onChange:T=>{oe("tasks_panel_group_by_changed",{to_value:T}),A(T)},options:[{value:"flat",label:"List",icon:s.jsx(nn,{size:13})},{value:"status",label:"Status",icon:s.jsx(ln,{size:13})}]}),s.jsx(Ye,{label:"Type",value:C,onChange:T=>{oe("tasks_panel_filter_changed",{to_value:T}),N(T)},options:[{value:"all",label:"All"},{value:"manual",label:"Chats"},{value:"automation",label:"Auto"}]}),s.jsx(Ye,{label:"Scope",value:k?"team":"mine",onChange:T=>z(T==="team"),options:[{value:"mine",label:"Mine"},{value:"team",label:"Team"}]})]})]}),je=T=>s.jsx(et,{delayDuration:300,children:s.jsxs("div",{className:E("shrink-0 px-1 flex items-center justify-between",T?"h-10":"h-10 md:h-7 mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!T&&s.jsx(Jt,{}),he]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(Dt,{label:"Search threads",onClick:()=>{oe("tasks_panel_search_opened"),L(!0),I(!0)},children:s.jsx(sn,{size:16})}),s.jsx(Dt,{label:"New thread",onClick:()=>{Z()},children:s.jsx(vt,{size:16})})]})]})});return ee?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[je(!0),s.jsx(At,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(Pt,{threads:Y,groupBy:S,activeTaskId:b,onSelectTask:q,onArchiveTask:U,filters:P,hasMore:d,isFetchingMore:c,onLoadMore:()=>{m()},filtersActive:ne})}),M&&s.jsx(It,{open:_,onOpenChange:I})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[je(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(At,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(Pt,{threads:Y,groupBy:S,activeTaskId:b,onSelectTask:q,onArchiveTask:U,filters:P,hasMore:d,isFetchingMore:c,onLoadMore:()=>{m()},filtersActive:ne})})}),M&&s.jsx(It,{open:_,onOpenChange:I})]})}const il=5,ll=[{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 us(){const t=$.c(3),{state:e}=pe();if(e==="collapsed"){let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:il}).map(al)}),t[0]=i):i=t[0],i}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(se,{className:"size-6 rounded-md"}),s.jsx(se,{className:"size-6 rounded-md"}),s.jsx(se,{className:"size-6 rounded-md"})]}),s.jsx(se,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:ll.map(rl)})]}),t[2]=l):l=t[2],l}function rl(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(se,{className:"size-5 rounded-full shrink-0"}),s.jsx(se,{className:E("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(ol)})]},e)}function ol(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(se,{className:"h-3 flex-1 rounded-sm"})},e)}function al(t,e){return s.jsx(se,{className:"size-10 rounded-lg mx-auto"},e)}function cl(){const t=$.c(4),e=ss();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Pi,{}),t[0]=n):n=t[0];let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Bt,{children:s.jsx(F.Suspense,{fallback:s.jsx(us,{}),children:s.jsx(ms,{})})}),t[1]=l):l=t[1];let i;return t[2]!==e?(i=s.jsx(Zt,{children:s.jsx(ls,{sections:e,footer:n,additionalContent:l})}),t[2]=e,t[3]=i):i=t[3],i}function dl(t){const e=$.c(8),{onClose:n}=t,l=ss();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Di,{}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(us,{}),e[1]=r):r=e[1];let o;e[2]!==n?(o=s.jsx(Bt,{children:s.jsx(F.Suspense,{fallback:r,children:s.jsx(ms,{onNavigate:n})})}),e[2]=n,e[3]=o):o=e[3];let a;return e[4]!==n||e[5]!==l||e[6]!==o?(a=s.jsx(Zt,{children:s.jsx(Ci,{sections:l,onClose:n,footer:i,additionalContent:o})}),e[4]=n,e[5]=l,e[6]=o,e[7]=a):a=e[7],a}function fs(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const ml=ks({name:As().min(2,"Organization name is required")});function ul(t){const e=$.c(41),{open:n,onOpenChange:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={resolver:Is(ml),defaultValues:{name:""}},e[0]=i):i=e[0];const r=zs(i);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={mutationFn:hl,onSuccess:fl},e[1]=o):o=e[1];const a=$s(o),d=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(Qn,{children:[s.jsx(Jn,{children:"Create a new organization"}),s.jsx(Zn,{children:"Set up a new organization to collaborate with others."})]}),e[2]=c):c=e[2];let m;if(e[3]!==a||e[4]!==r){let N;e[6]!==a?(N=S=>a.mutateAsync(S),e[6]=a,e[7]=N):N=e[7],m=r.handleSubmit(N),e[3]=a,e[4]=r,e[5]=m}else m=e[5];let u;e[8]!==r.formState.isSubmitting?(u=N=>{const{field:S}=N;return s.jsxs(ii,{children:[s.jsx(li,{children:"Organization Name"}),s.jsx(ri,{children:s.jsx(ci,{...S,placeholder:"Acme Inc.",disabled:r.formState.isSubmitting})}),s.jsx(oi,{children:"The name of your company or organization"}),S.value&&s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",s.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",fs(S.value)]})]}),s.jsx(ai,{})]})},e[8]=r.formState.isSubmitting,e[9]=u):u=e[9];let f;e[10]!==r.control||e[11]!==u?(f=s.jsx(si,{control:r.control,name:"name",render:u}),e[10]=r.control,e[11]=u,e[12]=f):f=e[12];let x;e[13]!==d?(x=d&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:d}),e[13]=d,e[14]=x):x=e[14];let g;e[15]!==a||e[16]!==r?(g=()=>{a.reset(),r.reset()},e[15]=a,e[16]=r,e[17]=g):g=e[17];let j;e[18]!==r.formState.isSubmitting||e[19]!==g?(j=s.jsx(Vn,{disabled:r.formState.isSubmitting,onClick:g,children:"Cancel"}),e[18]=r.formState.isSubmitting,e[19]=g,e[20]=j):j=e[20];const h=!r.formState.isValid||r.formState.isSubmitting;let p;e[21]!==r.formState.isSubmitting?(p=r.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(Un,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=r.formState.isSubmitting,e[22]=p):p=e[22];let b;e[23]!==h||e[24]!==p?(b=s.jsx(Je,{type:"submit",variant:"default",disabled:h,children:p}),e[23]=h,e[24]=p,e[25]=b):b=e[25];let y;e[26]!==b||e[27]!==j?(y=s.jsxs(ei,{children:[j,b]}),e[26]=b,e[27]=j,e[28]=y):y=e[28];let v;e[29]!==y||e[30]!==m||e[31]!==f||e[32]!==x?(v=s.jsxs("form",{className:"space-y-6",onSubmit:m,autoComplete:"off",children:[f,x,y]}),e[29]=y,e[30]=m,e[31]=f,e[32]=x,e[33]=v):v=e[33];let w;e[34]!==r||e[35]!==v?(w=s.jsxs(Yn,{children:[c,s.jsx(ni,{...r,children:v})]}),e[34]=r,e[35]=v,e[36]=w):w=e[36];let C;return e[37]!==l||e[38]!==n||e[39]!==w?(C=s.jsx(ti,{open:n,onOpenChange:l,children:w}),e[37]=l,e[38]=n,e[39]=w,e[40]=C):C=e[40],C}function fl(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function hl(t){const e=fs(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await xe.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const l=n?.data?.slug??e;if(!l)throw new Error("Failed to create organization");return{orgSlug:l}}function hs(){const t=F.useContext(Ts),{data:e,refetch:n}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(i=>i.status==="pending"&&new Date(i.expiresAt)>new Date),refetch:()=>n?.()}}function xl(t){let e=0;for(let l=0;l<t.length;l++)e=t.charCodeAt(l)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function pt(t){const e=$.c(13),{org:n,size:l}=t,i=l===void 0?"sm":l,r=i==="xs"?"size-5":"size-6",o=i==="xs"?"text-[9px]":"text-xs";let a;e[0]!==r?(a=E(r,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=r,e[1]=a):a=e[1];let d;e[2]!==n.logo||e[3]!==n.name?(d=n.logo?void 0:xl(n.name),e[2]=n.logo,e[3]=n.name,e[4]=d):d=e[4];let c;e[5]!==n.logo||e[6]!==n.name||e[7]!==o?(c=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:E("font-semibold leading-none",o),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=o,e[8]=c):c=e[8];let m;return e[9]!==a||e[10]!==d||e[11]!==c?(m=s.jsx("div",{className:a,style:d,children:c}),e[9]=a,e[10]=d,e[11]=c,e[12]=m):m=e[12],m}function pl({invitation:t,onChanged:e}){const[n,l]=F.useState(!1),i=t.organizationName??"Unknown organization",r=async()=>{l(!0);try{const d=await xe.organization.acceptInvitation({invitationId:t.id});if(d.error){re.error(d.error.message),l(!1);return}}catch{re.error("Failed to accept invitation"),l(!1);return}re.success(`Joined ${i}`),Os();let a;try{a=(await xe.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=a?`/${a}`:"/"},o=async()=>{l(!0);try{const a=await xe.organization.rejectInvitation({invitationId:t.id});if(a.error){re.error(a.error.message),l(!1);return}re.success("Invitation declined"),l(!1),e()}catch{re.error("Failed to decline invitation"),l(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[s.jsx(pt,{org:{name:i},size:"sm"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"truncate text-sm font-medium",children:i}),s.jsx("p",{className:"truncate text-xs text-muted-foreground",children:"Invited to join"})]}),s.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[s.jsx(Je,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:n,children:"Accept"}),s.jsx(Je,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:o,disabled:n,"aria-label":`Decline invitation to ${i}`,children:s.jsx(Xn,{size:14})})]})]})}function gl(t){const e=$.c(29),{orgParam:n,onSelectOrg:l,onCreateOrg:i}=t,{data:r}=Ms(),{invitations:o,refetch:a}=hs();let d;e[0]!==n?(d=(_,I)=>_.slug===n?-1:I.slug===n?1:_.name.localeCompare(I.name),e[0]=n,e[1]=d):d=e[1];const c=[...r??[]].sort(d),[m,u]=F.useState(""),f=m.toLowerCase(),x=f?c.filter(_=>_.name.toLowerCase().includes(f)||_.slug.toLowerCase().includes(f)):c;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ts,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=g):g=e[2];let j;e[3]===Symbol.for("react.memo_cache_sentinel")?(j=_=>u(_.target.value),e[3]=j):j=e[3];let h;e[4]!==m?(h=_=>_.key==="Escape"&&m&&u(""),e[4]=m,e[5]=h):h=e[5];let p;e[6]!==m||e[7]!==h?(p=s.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:m,onChange:j,onKeyDown:h,placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[6]=m,e[7]=h,e[8]=p):p=e[8];let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx($e,{size:16}),e[9]=b):b=e[9];let y;e[10]!==i?(y=s.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:b}),e[10]=i,e[11]=y):y=e[11];let v;e[12]!==p||e[13]!==y?(v=s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[g,p,y]}),e[12]=p,e[13]=y,e[14]=v):v=e[14];const w="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let C;e[15]!==o||e[16]!==m||e[17]!==a?(C=!m&&o.map(_=>s.jsx(pl,{invitation:_,onChanged:a},_.id)),e[15]=o,e[16]=m,e[17]=a,e[18]=C):C=e[18];const N=x.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:m?`No organizations match "${m}"`:"No organizations available"});let S;e[19]!==l||e[20]!==n?(S=_=>s.jsxs("button",{type:"button",onClick:()=>l(_.slug),className:E("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",_.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(pt,{org:_,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:_.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:_.slug})]}),_.slug===n&&s.jsx(es,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},_.id),e[19]=l,e[20]=n,e[21]=S):S=e[21];const A=x.map(S);let k;e[22]!==C||e[23]!==N||e[24]!==A?(k=s.jsxs("div",{className:w,children:[C,N,A]}),e[22]=C,e[23]=N,e[24]=A,e[25]=k):k=e[25];let z;return e[26]!==k||e[27]!==v?(z=s.jsxs(s.Fragment,{children:[v,k]}),e[26]=k,e[27]=v,e[28]=z):z=e[28],z}function bl(t){const e=$.c(22),{trigger:n,orgParam:l,align:i,side:r}=t,o=i===void 0?"start":i,a=r===void 0?"bottom":r,d=ue(),[c,m]=F.useState(!1),[u,f]=F.useState(!1);let x;e[0]!==n?(x=s.jsx(ze,{asChild:!0,children:n}),e[0]=n,e[1]=x):x=e[1];const g=String(c);let j;e[2]!==d?(j=C=>{m(!1),d({to:"/$org",params:{org:C}})},e[2]=d,e[3]=j):j=e[3];let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{m(!1),f(!0)},e[4]=h):h=e[4];let p;e[5]!==l||e[6]!==g||e[7]!==j?(p=s.jsx(gl,{orgParam:l,onSelectOrg:j,onCreateOrg:h},g),e[5]=l,e[6]=g,e[7]=j,e[8]=p):p=e[8];let b;e[9]!==o||e[10]!==a||e[11]!==p?(b=s.jsx(Ue,{side:a,align:o,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:vl,onCloseAutoFocus:jl,children:p}),e[9]=o,e[10]=a,e[11]=p,e[12]=b):b=e[12];let y;e[13]!==c||e[14]!==x||e[15]!==b?(y=s.jsxs(Ge,{open:c,onOpenChange:m,children:[x,b]}),e[13]=c,e[14]=x,e[15]=b,e[16]=y):y=e[16];let v;e[17]!==u?(v=s.jsx(ul,{open:u,onOpenChange:f}),e[17]=u,e[18]=v):v=e[18];let w;return e[19]!==v||e[20]!==y?(w=s.jsxs(s.Fragment,{children:[y,v]}),e[19]=v,e[20]=y,e[21]=w):w=e[21],w}function jl(t){return t.preventDefault()}function vl(t){t.preventDefault(),t.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function yl(t){const e=$.c(21),{value:n,onChange:l,placeholder:i,onKeyDown:r,className:o,isSearching:a,disabled:d}=t,c=i===void 0?"Search...":i;let m;e[0]!==o?(m=E("shrink-0 w-full border-b border-border h-12",o),e[0]=o,e[1]=m):m=e[1];const u=d?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==u?(f=E("flex items-center gap-2.5 h-12 px-4",u),e[2]=u,e[3]=f):f=e[3];let x;e[4]!==a?(x=a?s.jsx(Lt,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(ts,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=x):x=e[5];let g;e[6]!==l?(g=b=>l(b.target.value),e[6]=l,e[7]=g):g=e[7];let j;e[8]!==d||e[9]!==r||e[10]!==c||e[11]!==g||e[12]!==n?(j=s.jsx("input",{type:"text",value:n,onChange:g,onKeyDown:r,placeholder:c,disabled:d,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=d,e[9]=r,e[10]=c,e[11]=g,e[12]=n,e[13]=j):j=e[13];let h;e[14]!==f||e[15]!==x||e[16]!==j?(h=s.jsxs("label",{className:f,children:[x,j]}),e[14]=f,e[15]=x,e[16]=j,e[17]=h):h=e[17];let p;return e[18]!==m||e[19]!==h?(p=s.jsx("div",{className:m,children:h}),e[18]=m,e[19]=h,e[20]=p):p=e[20],p}const Sl="Select an existing agent";function Nl(t){const e=$.c(5),{children:n}=t;let l;e[0]!==n?(l=s.jsx(ce,{asChild:!0,children:n}),e[0]=n,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(de,{side:"right",sideOffset:8,children:Sl}),e[2]=i):i=e[2];let r;return e[3]!==l?(r=s.jsxs(me,{defaultOpen:!0,delayDuration:0,children:[l,i]}),e[3]=l,e[4]=r):r=e[4],r}function _l(t){const e=ue(),{create:n}=Vt(),{locator:l}=te(),i=lt({strict:!1}),r=rt({strict:!1});return async o=>{const a=crypto.randomUUID(),d=o===r.virtualmcpid?Sn(t,l,i.taskId??""):null;try{await n({id:a,virtual_mcp_id:o,...d?{branch:d}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:o}})}}function Qe(t){const e=$.c(20),{agent:n,selected:l,onClick:i}=t,r=l?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let o;e[0]!==r?(o=E("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",r),e[0]=r,e[1]=o):o=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(ye,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let d;e[5]!==n.title?(d=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=d):d=e[6];let c;e[7]!==n.description?(c=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[7]=n.description,e[8]=c):c=e[8];let m;e[9]!==d||e[10]!==c?(m=s.jsxs("div",{className:"flex-1 min-w-0",children:[d,c]}),e[9]=d,e[10]=c,e[11]=m):m=e[11];let u;e[12]!==l?(u=l&&s.jsx(es,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=l,e[13]=u):u=e[13];let f;return e[14]!==i||e[15]!==o||e[16]!==a||e[17]!==m||e[18]!==u?(f=s.jsxs("button",{type:"button",onClick:i,className:o,children:[a,m,u]}),e[14]=i,e[15]=o,e[16]=a,e[17]=m,e[18]=u,e[19]=f):f=e[19],f}function Et(t){const e=$.c(5),{children:n,action:l}=t;let i;e[0]!==n?(i=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),e[0]=n,e[1]=i):i=e[1];let r;return e[2]!==l||e[3]!==i?(r=s.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[i,l]}),e[2]=l,e[3]=i,e[4]=r):r=e[4],r}function Cl(t){const e=$.c(27),{onClose:n,onSelectAgent:l,selectedAgentId:i,onImportFromGithub:r}=t,[o,a]=F.useState(""),d=Xt(),c=d??[],{org:m}=te(),{data:u}=xe.useSession(),f=u?.user?.id??"anon",x=Rn(d),g=Hn(),j=_l(m.slug),h=dn(d),p=o.toLowerCase(),b=c.filter(Il).filter(R=>!h.has(R.id)).filter(Al).filter(R=>!o||R.title.toLowerCase().includes(p)),y=b.filter(kl),v=b.filter(wl),w=Be(m.id),C=!o||w.title.toLowerCase().includes(p),N=!!(l&&C);let S;e[0]!==n||e[1]!==l?(S=()=>{l?.(null),n(),a("")},e[0]=n,e[1]=l,e[2]=S):S=e[2];const A=S,k=R=>{if(l){l(R.id),n(),a("");return}Gn({orgId:m.id,userId:f},R.id,x),g(),n(),a(""),j(R.id)},z="flex flex-col max-h-[min(640px,80dvh)]";let _;e[3]!==o?(_=s.jsx(yl,{value:o,onChange:a,placeholder:"Search agents..."}),e[3]=o,e[4]=_):_=e[4];const I="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",M=l&&C&&w&&s.jsx(Qe,{agent:w,selected:!i||i===w.id,onClick:A}),L=v.length>0&&s.jsx(Et,{children:"Agents"}),P=v.map(R=>s.jsx(Qe,{agent:R,selected:l?i===R.id:void 0,onClick:()=>k(R)},R.id)),D=(y.length>0||!o)&&s.jsx(Et,{action:s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[s.jsx(mi,{className:"size-3.5"}),"Import"]}),children:"Code Agents"}),O=y.map(R=>s.jsx(Qe,{agent:R,selected:l?i===R.id:void 0,onClick:()=>k(R)},R.id));let B;e[5]!==N||e[6]!==o||e[7]!==b.length?(B=b.length===0&&!N&&o&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:"No agents found"}),e[5]=N,e[6]=o,e[7]=b.length,e[8]=B):B=e[8];let G;e[9]!==B||e[10]!==M||e[11]!==L||e[12]!==P||e[13]!==D||e[14]!==O?(G=s.jsxs("div",{className:I,children:[M,L,P,D,O,B]}),e[9]=B,e[10]=M,e[11]=L,e[12]=P,e[13]=D,e[14]=O,e[15]=G):G=e[15];let V;e[16]!==m.slug?(V={org:m.slug},e[16]=m.slug,e[17]=V):V=e[17];let Y;e[18]!==n?(Y=()=>n(),e[18]=n,e[19]=Y):Y=e[19];let U;e[20]!==V||e[21]!==Y?(U=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Ps,{to:"/$org/settings/agents",params:V,onClick:Y,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[20]=V,e[21]=Y,e[22]=U):U=e[22];let q;return e[23]!==G||e[24]!==U||e[25]!==_?(q=s.jsxs("div",{className:z,children:[_,G,U]}),e[23]=G,e[24]=U,e[25]=_,e[26]=q):q=e[26],q}function wl(t){return!Kt(t.metadata)}function kl(t){return Kt(t.metadata)}function Al(t){return!jn(t.id)}function Il(t){return!bn(t.id)}function zl(t){const e=$.c(31);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:l,trigger:i,onSelectAgent:r,selectedAgentId:o,side:a,align:d}=n,c=l===void 0?!1:l,m=a===void 0?"right":a,u=d===void 0?"start":d,[f,x]=F.useState(!1),[g,j]=F.useState(!1),h=ct(),{setOpenMobile:p}=pe(),b=Bn(),y=b?"border border-border":void 0;let v;e[2]!==b?(v=L=>b?s.jsx(Nl,{children:L}):L,e[2]=b,e[3]=v):v=e[3];const w=v;let C;e[4]!==h||e[5]!==p?(C=()=>{x(!1),h&&p(!1)},e[4]=h,e[5]=p,e[6]=C):C=e[6];const N=C;let S;e[7]!==N?(S=()=>{N(),j(!0)},e[7]=N,e[8]=S):S=e[8];const A=S;let k;e[9]!==N||e[10]!==A||e[11]!==r||e[12]!==f||e[13]!==o?(k=f&&s.jsx(F.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(se,{className:"h-4 w-24"})}),children:s.jsx(Cl,{onClose:N,onSelectAgent:r,selectedAgentId:o,onImportFromGithub:A})}),e[9]=N,e[10]=A,e[11]=r,e[12]=f,e[13]=o,e[14]=k):k=e[14];const z=k;let _;e[15]!==u||e[16]!==c||e[17]!==y||e[18]!==b||e[19]!==h||e[20]!==f||e[21]!==z||e[22]!==m||e[23]!==i||e[24]!==w?(_=h?s.jsxs(s.Fragment,{children:[i?s.jsx("button",{type:"button",onClick:()=>x(!0),className:"contents",children:i}):c?w(s.jsx(ve,{"aria-label":"Browse agents",className:E(y),onClick:()=>{oe("agent_browser_opened",{surface:"mobile_drawer"}),x(!0)},children:s.jsx($e,{className:"size-4"})})):s.jsx(K,{children:w(s.jsxs(J,{tooltip:b?void 0:"Browse agents",className:E(y),onClick:()=>{oe("agent_browser_opened",{surface:"mobile_drawer"}),x(!0)},children:[s.jsx($e,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(Ut,{open:f,onOpenChange:x,direction:"bottom",children:s.jsxs(Wt,{className:"max-h-[85dvh] p-0",children:[s.jsx(qt,{className:"sr-only",children:"Browse agents"}),z]})})]}):s.jsxs(Ge,{open:f,onOpenChange:L=>{L&&!f&&oe("agent_browser_opened",{surface:"desktop_popover"}),x(L)},children:[i?s.jsx(ze,{asChild:!0,children:i}):c?w(s.jsx(ze,{asChild:!0,children:s.jsx(ve,{"aria-label":"Browse agents",className:E(y),children:s.jsx($e,{className:"size-4"})})})):s.jsx(K,{children:w(s.jsx(ze,{asChild:!0,children:s.jsxs(J,{tooltip:b?void 0:"Browse agents",className:E(y),children:[s.jsx($e,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(Ue,{className:"w-[380px] p-0 overflow-hidden",side:m,align:u,children:z})]}),e[15]=u,e[16]=c,e[17]=y,e[18]=b,e[19]=h,e[20]=f,e[21]=z,e[22]=m,e[23]=i,e[24]=w,e[25]=_):_=e[25];let I;e[26]!==g?(I=s.jsx(di,{open:g,onOpenChange:j,mode:"agent"}),e[26]=g,e[27]=I):I=e[27];let M;return e[28]!==I||e[29]!==_?(M=s.jsxs(s.Fragment,{children:[_,I]}),e[28]=I,e[29]=_,e[30]=M):M=e[30],M}const $l="wco-no-drag inline-flex items-center gap-1.5 min-w-0 rounded-md px-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Tl(t){const e=$.c(19),{agentId:n,fallback:l,onOpenHome:i,onPick:r}=t,o=mt(n)??l??null,a=o?.title??"Super Agent",d=`Open ${a} home`,c=o?.icon??null;let m;e[0]!==c||e[1]!==a?(m=s.jsx(ye,{icon:c,name:a,size:"xs"}),e[0]=c,e[1]=a,e[2]=m):m=e[2];let u;e[3]!==i||e[4]!==d||e[5]!==m?(u=s.jsx("button",{type:"button",onClick:i,"aria-label":d,className:"wco-no-drag flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:m}),e[3]=i,e[4]=d,e[5]=m,e[6]=u):u=e[6];let f;e[7]!==a?(f=s.jsx("span",{className:"truncate font-medium max-w-[10rem]",children:a}),e[7]=a,e[8]=f):f=e[8];let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ht,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[9]=x):x=e[9];let g;e[10]!==f?(g=s.jsxs("button",{type:"button",className:$l,children:[f,x]}),e[10]=f,e[11]=g):g=e[11];let j;e[12]!==n||e[13]!==r||e[14]!==g?(j=s.jsx(zl,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:r,trigger:g}),e[12]=n,e[13]=r,e[14]=g,e[15]=j):j=e[15];let h;return e[16]!==u||e[17]!==j?(h=s.jsxs("div",{className:"flex items-center gap-1",children:[u,j]}),e[16]=u,e[17]=j,e[18]=h):h=e[18],h}function Ft(){const t=$.c(43),{org:e}=te(),{state:n,isMobile:l}=pe(),i=ue();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const o=lt(r);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[1]=a):a=t[1];const d=rt(a),{threads:c}=ut(),{setTaskId:m,createNewTask:u}=ft(),f=hs().invitations.length>0,x=n==="collapsed"||l;let g;t[2]!==e.id?(g=Be(e.id),t[2]=e.id,t[3]=g):g=t[3];const j=g,h=j.id,p=o.taskId?d.virtualmcpid??h:h;let b;t[4]!==u||t[5]!==h||t[6]!==i||t[7]!==e.slug||t[8]!==m||t[9]!==c?(b=O=>{if(!O||O===h){i({to:"/$org",params:{org:e.slug}});return}const B=ui(c,O);B?m(B.id,O):u(O)},t[4]=u,t[5]=h,t[6]=i,t[7]=e.slug,t[8]=m,t[9]=c,t[10]=b):b=t[10];const y=b,v=f?`${e.name} — switch organization (pending invitation)`:`${e.name} — switch organization`;let w;t[11]!==e?(w=s.jsx(pt,{org:e,size:"sm"}),t[11]=e,t[12]=w):w=t[12];let C;t[13]!==f||t[14]!==x?(C=f&&s.jsx("span",{className:E("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",x?"-top-1":"top-1/2 -translate-y-1/2")}),t[13]=f,t[14]=x,t[15]=C):C=t[15];let N;t[16]!==w||t[17]!==C?(N=s.jsxs("span",{className:"relative inline-flex",children:[w,C]}),t[16]=w,t[17]=C,t[18]=N):N=t[18];let S;t[19]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ht,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[19]=S):S=t[19];let A;t[20]!==v||t[21]!==N?(A=s.jsx(ce,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":v,className:"wco-no-drag flex items-center gap-1.5 shrink-0 rounded-md pl-3 pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[N,S]})}),t[20]=v,t[21]=N,t[22]=A):A=t[22];let k;t[23]!==e.slug||t[24]!==A?(k=s.jsx(bl,{orgParam:e.slug,trigger:A}),t[23]=e.slug,t[24]=A,t[25]=k):k=t[25];let z;t[26]!==e.name?(z=s.jsx(de,{side:"bottom",children:e.name}),t[26]=e.name,t[27]=z):z=t[27];let _;t[28]!==k||t[29]!==z?(_=s.jsx(St,{children:s.jsxs(me,{children:[k,z]})}),t[28]=k,t[29]=z,t[30]=_):_=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),t[31]=I):I=t[31];const M=p===h?j:void 0;let L;t[32]!==p||t[33]!==y?(L=()=>y(p),t[32]=p,t[33]=y,t[34]=L):L=t[34];let P;t[35]!==p||t[36]!==y||t[37]!==M||t[38]!==L?(P=s.jsx(St,{children:s.jsx(F.Suspense,{fallback:I,children:s.jsx(Tl,{agentId:p,fallback:M,onOpenHome:L,onPick:y})})}),t[35]=p,t[36]=y,t[37]=M,t[38]=L,t[39]=P):P=t[39];let D;return t[40]!==_||t[41]!==P?(D=s.jsx(qn,{className:"wco-no-drag",children:s.jsxs(Kn,{className:"flex-nowrap gap-1.5 sm:gap-1.5",children:[_,P]})}),t[40]=_,t[41]=P,t[42]=D):D=t[42],D}const Ml="sidebar.open";function Ol(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Es,{}),t[0]=e):e=t[0],e}function Xo(){const t=$.c(24),e=ct(),[n,l]=He(Ml,!1),{width:i,wrapperRef:r,onStartResize:o,resetWidth:a}=pi();let d;t[0]!==e?(d=e?s.jsxs(Q.Header,{className:"grid-cols-1 px-1 pr-1",children:[s.jsxs("div",{className:"grid w-full grid-cols-[auto_auto_auto_1fr_auto_auto] items-center gap-2",children:[s.jsx(Jt,{}),s.jsx(Ft,{}),s.jsx(nt,{}),s.jsx("div",{"aria-hidden":!0,className:"min-w-0"}),s.jsx(Q.TogglesSlot,{}),s.jsx(Q.TabsSlot,{className:"min-w-0 justify-self-end"})]}),s.jsx(Q.CenterSlot,{}),s.jsx(Q.RightSlot,{})]}):s.jsxs(Q.Header,{children:[s.jsxs(Q.LeftColumn,{children:[s.jsx(Ft,{}),s.jsx(Q.TogglesSlot,{})]}),s.jsx(Q.CenterSlot,{}),s.jsxs(Q.RightColumn,{children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end items-center gap-0.5",children:s.jsx(Q.TabsSlot,{})}),s.jsx(Q.RightSlot,{})]})]}),t[0]=e,t[1]=d):d=t[1];const c=`${i}px`;let m;t[2]!==c?(m={"--sidebar-width":c,"--sidebar-width-icon":"3.5rem"},t[2]=c,t[3]=m):m=t[3];const u=m;let f;t[4]!==e||t[5]!==o||t[6]!==a?(f=!e&&s.jsxs(s.Fragment,{children:[s.jsx(cl,{}),s.jsx(fi,{onPointerDown:o,onDoubleClick:a})]}),t[4]=e,t[5]=o,t[6]=a,t[7]=f):f=t[7];let x;t[8]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},t[8]=x):x=t[8];let g;t[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Bs,{className:"flex flex-col",style:x,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(F.Suspense,{fallback:s.jsx(Ol,{}),children:s.jsx(Ds,{})})})})}),t[9]=g):g=t[9];let j;t[10]!==u||t[11]!==f||t[12]!==r?(j=s.jsxs(Rs,{ref:r,className:"flex-1 bg-sidebar relative min-h-0",style:u,children:[f,g]}),t[10]=u,t[11]=f,t[12]=r,t[13]=j):j=t[13];let h;t[14]!==e?(h=e&&s.jsx(Mn,{renderSidebar:Pl}),t[14]=e,t[15]=h):h=t[15];let p;t[16]!==d||t[17]!==j||t[18]!==h?(p=s.jsx(Wn,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[d,j,h]})}),t[16]=d,t[17]=j,t[18]=h,t[19]=p):p=t[19];let b;return t[20]!==l||t[21]!==n||t[22]!==p?(b=s.jsx(yn,{children:s.jsx(Q.Provider,{children:s.jsx(Hs,{open:n,onOpenChange:l,children:p})})}),t[20]=l,t[21]=n,t[22]=p,t[23]=b):b=t[23],b}function Pl(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(dl,{onClose:e})})})}export{Xo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as it,r as b,j as e,i as rt}from"./index-CLj_5r89.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-B_c4VYke.js";import{A as nt}from"./automation-runs-D98OdVC5.js";import{r as lt,c as ct,u as dt,a as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-DQA0wg3R.js";import{F as xt}from"./index-gz1tAOXr.js";import"./LayoutLeft-Cog6SqwZ.js";import"./use-mobile-BJ6No951.js";import"./X-CYIGv8wX.js";import"./tooltip-C51X6QKO.js";import"./select-CeXH3gjW.js";import"./Check-VVh423TU.js";import"./ChevronDown-mDFyCzyV.js";import"./ChevronUp-D03XJ0vS.js";import"./useInfiniteQuery-8DjDwhQn.js";import"./use-infinite-scroll-BU44dmI-.js";import"./use-connection-D5Vs5qOp.js";import"./use-collections-Y12o4qWE.js";import"./use-mcp-client-3hG4jk-y.js";import"./constants-B72Xmt_K.js";import"./auth-BEQgA40y.js";import"./use-virtual-mcp-D3UxifiP.js";import"./card-D5CauofV.js";import"./table-C2Aqsz0m.js";import"./empty-state-CeXPb2VU.js";import"./use-members-CcCdz_hQ.js";import"./use-org-auth-client-B7yAA88H.js";import"./use-clock-tick-Bz8Z9860.js";import"./AlertCircle-Db_5w_pO.js";import"./CheckCircle-auAoHYRc.js";import"./Circle-DNMct17O.js";import"./agent-icon-EdtPDJXM.js";import"./Tool01-dGPltLKJ.js";import"./SwitchHorizontal01-C9ua90Hw.js";import"./Settings02-D7asukv0.js";import"./XCircle-29rFa-09.js";import"./ArrowUpRight-B2VxdxbH.js";import"./ZapSquare-0BsdXZY9.js";import"./Users03-BMw5o14D.js";import"./Loading02-D2Hh17zb.js";import"./ChevronRight-Ceh-WF7H.js";import"./Stars02-LnA0-zz4.js";import"./Copy01-CuSfBG1R.js";import"./ZoomOut-Dqj1q_yU.js";import"./DotsVertical-Cr4sUrn_.js";import"./Globe01-DkdmhUM8.js";import"./Eye-aR-oC6dj.js";import"./FilterLines-Cr2IL8ug.js";import"./Star01-B90wIaBV.js";import"./Globe04-TuZvt3ov.js";import"./HardDrive-CrxPr3va.js";import"./Key01-CfvrTjDF.js";import"./LinkExternal01-BYpL3ACE.js";import"./List-D5svP-6k.js";import"./Monitor01-cNkbuWdj.js";import"./Sun-DLqplG3r.js";import"./Palette-Dz_ldMx7.js";import"./Play-CVarwVeR.js";import"./Plus-DNCXili3.js";import"./SearchLg-DvsDitCO.js";import"./SearchMd-87dvi4KF.js";import"./Shield01-BT2HQXan.js";import"./Stars01-D1lDEQh2.js";import"./Trash01-BJe3gUZc.js";import"./Upload01-DIYVb8n9.js";import"./User01-DcNAHFa-.js";import"./Users01-q9IKnEsX.js";import"./XClose-DT64mUwh.js";import"./Zap-Br_Hg1wB.js";import"./use-automations-tqGwPES0.js";import"./studio-tools-F5G0urN7.js";import"./useSuspenseInfiniteQuery-BYjapKbe.js";import"./badge-DiKw8RbW.js";import"./checkbox-DhHH_mmR.js";import"./command-Cx8bKs7m.js";import"./index-CPelPFhM.js";import"./dialog-BFPr54WG.js";import"./popover-CKlhZKOG.js";import"./avatar-B2d04wRu.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Dc9VZjfD.js";import"./file-type-icon-D2xX1xnm.js";import"./tab-id-DznSzCvK.js";import"./monaco-editor-D4hwKq5W.js";import"./index-CfigvylE.js";import"./chat-context-BsRUICZs.js";import"./autosend-REHFoRRR.js";import"./hooks-BSiz_AKB.js";import"./decopilot-sse-pool-CiyJzTNT.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-BqQDQsEQ.js";import"./use-decopilot-events-C70DCxcq.js";import"./use-organization-settings-BzhOQtxD.js";import"./types-C0d4Ohpx.js";import"./shell-layout-IYwmwgpp.js";import"./alert-dialog-BbHr6pLd.js";import"./required-auth-layout-DGQr874S.js";import"./use-org-sso-DcXTIOxB.js";import"./integration-icon-Bf1Nt7-n.js";import"./use-navigate-to-agent-CZiiGkPG.js";import"./reusable-new-chat-qqWu133U.js";import"./use-mcp-prompts-K_jp9fAb.js";import"./form-Trt6kqr0.js";import"./label-DjarSga4.js";import"./input-BdpM0TEL.js";import"./switch-B9wSH4oe.js";import"./drawer-DcfPm_vi.js";import"./collection-search-BgFXdSC0.js";import"./tabs-W14caGou.js";import"./toggle-group-CYFywiUW.js";import"./agent-capabilities-CRvnIg9m.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CmLZ3i0M.js";import"./use-registry-connections-DnT_Dh3O.js";import"./extract-connection-data-5BWVDciX.js";import"./collection-tabs-Cxl16cFM.js";import"./textarea-ConjZ7fN.js";import"./connection-form-helpers-C1s-KSGU.js";import"./authenticate-and-persist-oauth-nkmQY5vG.js";import"./mcp-oauth-DWePFULn.js";import"./connect-desktop-dialog-BWEylyh-.js";import"./select-model-DYpThBVD.js";import"./skeleton-Dl1AhqdL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CyBwf4qC.js";import"./dropdown-menu-BlfYJTRx.js";import"./index-CsAnNpRc.js";import"./toolbar-DR2I0_KA.js";import"./use-debounced-value-DfUpwXh9.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B0huGKlG.js";import"./use-mcp-tools-DkI8MzuJ.js";import"./use-capability-CqEMs0z_.js";import"./tools-list-DL49NRaT.js";import"./use-debounced-autosave-BPwP00mx.js";import"./index-BMxNGICG.js";import"./search-input-DJ05ViVl.js";import"./github-repo-picker-CTMAbHxR.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-BBj5PT7D.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./config-ByOdiANb.js";import"./toolbar-icon-button-Cf6OwFTU.js";import"./calendar-Dh7ySVQi.js";import"./use-file-configs-DGZxsbJi.js";import"./automation-list-row-xAynmOqb.js";function ai(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=b.useState(k),[tt,i]=b.useState(null),[J,g]=b.useState(void 0),[x,y]=b.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const A=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const M=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const V=F,q=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,z=m.kind==="site"&&o&&n,B=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==q?(l=e.jsx(mt,{className:"text-sm font-semibold",children:q}),t[13]=q,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==$||t[22]!==H||t[23]!==A||t[24]!==v||t[25]!==h||t[26]!==B||t[27]!==x||t[28]!==M||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==z||t[37]!==_?(S=!o||!T&&!z?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:B}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:A,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:M})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=A,t[24]=v,t[25]=h,t[26]=B,t[27]=x,t[28]=M,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=z,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let E;return t[42]!==V||t[43]!==N||t[44]!==f?(E=e.jsx(at,{open:N,onOpenChange:V,children:f}),t[42]=V,t[43]=N,t[44]=f,t[45]=E):E=t[45],E}function yt(u){return u+1}function wt(u){return u+1}export{ai as SeoSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as J,j as t,B as Z}from"./index-CLj_5r89.js";import{n as ee}from"./LinkExternal01-BYpL3ACE.js";import{aG as te,t as oe}from"./agent-icon-EdtPDJXM.js";import{I as q}from"./input-BdpM0TEL.js";import{L as H}from"./label-DjarSga4.js";import{a1 as ie}from"./automation-runs-D98OdVC5.js";import{b as Q,c as se,T as W,a as le}from"./tabs-W14caGou.js";import{T as re}from"./textarea-ConjZ7fN.js";import{aH as ae,aI as me,aG as pe,aJ as ne,aK as ce,aL as de,aM as fe}from"./index-gz1tAOXr.js";import{b as ue,a as xe,B as he}from"./block-document-CPFtVEpa.js";import{u as ge,s as F,E as ve,R as ye,A as je}from"./primitives-CAgzIvjA.js";import"./AlertCircle-Db_5w_pO.js";import"./Tool01-dGPltLKJ.js";import"./SwitchHorizontal01-C9ua90Hw.js";import"./Settings02-D7asukv0.js";import"./XCircle-29rFa-09.js";import"./ArrowUpRight-B2VxdxbH.js";import"./ZapSquare-0BsdXZY9.js";import"./Users03-BMw5o14D.js";import"./Loading02-D2Hh17zb.js";import"./CheckCircle-auAoHYRc.js";import"./Check-VVh423TU.js";import"./ChevronDown-mDFyCzyV.js";import"./ChevronRight-Ceh-WF7H.js";import"./ChevronUp-D03XJ0vS.js";import"./Circle-DNMct17O.js";import"./Stars02-LnA0-zz4.js";import"./Copy01-CuSfBG1R.js";import"./ZoomOut-Dqj1q_yU.js";import"./DotsVertical-Cr4sUrn_.js";import"./Globe01-DkdmhUM8.js";import"./Eye-aR-oC6dj.js";import"./FilterLines-Cr2IL8ug.js";import"./Star01-B90wIaBV.js";import"./Globe04-TuZvt3ov.js";import"./HardDrive-CrxPr3va.js";import"./Key01-CfvrTjDF.js";import"./LayoutLeft-Cog6SqwZ.js";import"./List-D5svP-6k.js";import"./Monitor01-cNkbuWdj.js";import"./Sun-DLqplG3r.js";import"./Palette-Dz_ldMx7.js";import"./Play-CVarwVeR.js";import"./Plus-DNCXili3.js";import"./SearchLg-DvsDitCO.js";import"./SearchMd-87dvi4KF.js";import"./Shield01-BT2HQXan.js";import"./Stars01-D1lDEQh2.js";import"./Trash01-BJe3gUZc.js";import"./Upload01-DIYVb8n9.js";import"./User01-DcNAHFa-.js";import"./Users01-q9IKnEsX.js";import"./XClose-DT64mUwh.js";import"./X-CYIGv8wX.js";import"./Zap-Br_Hg1wB.js";import"./select-CeXH3gjW.js";import"./tooltip-C51X6QKO.js";import"./useInfiniteQuery-8DjDwhQn.js";import"./use-infinite-scroll-BU44dmI-.js";import"./use-connection-D5Vs5qOp.js";import"./use-collections-Y12o4qWE.js";import"./use-mcp-client-3hG4jk-y.js";import"./constants-B72Xmt_K.js";import"./auth-BEQgA40y.js";import"./use-virtual-mcp-D3UxifiP.js";import"./card-D5CauofV.js";import"./sidebar-B_c4VYke.js";import"./use-mobile-BJ6No951.js";import"./table-C2Aqsz0m.js";import"./empty-state-CeXPb2VU.js";import"./use-members-CcCdz_hQ.js";import"./use-org-auth-client-B7yAA88H.js";import"./use-clock-tick-Bz8Z9860.js";import"./use-automations-tqGwPES0.js";import"./studio-tools-F5G0urN7.js";import"./useSuspenseInfiniteQuery-BYjapKbe.js";import"./badge-DiKw8RbW.js";import"./checkbox-DhHH_mmR.js";import"./command-Cx8bKs7m.js";import"./index-CPelPFhM.js";import"./dialog-BFPr54WG.js";import"./popover-CKlhZKOG.js";import"./avatar-B2d04wRu.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Dc9VZjfD.js";import"./file-type-icon-D2xX1xnm.js";import"./tab-id-DznSzCvK.js";import"./monaco-editor-D4hwKq5W.js";import"./index-CfigvylE.js";import"./chat-context-BsRUICZs.js";import"./autosend-REHFoRRR.js";import"./hooks-BSiz_AKB.js";import"./decopilot-sse-pool-CiyJzTNT.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-BqQDQsEQ.js";import"./use-decopilot-events-C70DCxcq.js";import"./use-organization-settings-BzhOQtxD.js";import"./types-C0d4Ohpx.js";import"./shell-layout-IYwmwgpp.js";import"./alert-dialog-BbHr6pLd.js";import"./required-auth-layout-DGQr874S.js";import"./use-org-sso-DcXTIOxB.js";import"./integration-icon-Bf1Nt7-n.js";import"./use-navigate-to-agent-CZiiGkPG.js";import"./reusable-new-chat-qqWu133U.js";import"./use-mcp-prompts-K_jp9fAb.js";import"./form-Trt6kqr0.js";import"./drawer-DcfPm_vi.js";import"./collection-search-BgFXdSC0.js";import"./toggle-group-CYFywiUW.js";import"./agent-capabilities-CRvnIg9m.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CmLZ3i0M.js";import"./use-registry-connections-DnT_Dh3O.js";import"./extract-connection-data-5BWVDciX.js";import"./collection-tabs-Cxl16cFM.js";import"./connection-form-helpers-C1s-KSGU.js";import"./authenticate-and-persist-oauth-nkmQY5vG.js";import"./mcp-oauth-DWePFULn.js";import"./connect-desktop-dialog-BWEylyh-.js";import"./select-model-DYpThBVD.js";import"./skeleton-Dl1AhqdL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CyBwf4qC.js";import"./dropdown-menu-BlfYJTRx.js";import"./index-CsAnNpRc.js";import"./toolbar-DR2I0_KA.js";import"./use-debounced-value-DfUpwXh9.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B0huGKlG.js";import"./use-mcp-tools-DkI8MzuJ.js";import"./use-capability-CqEMs0z_.js";import"./tools-list-DL49NRaT.js";import"./switch-B9wSH4oe.js";import"./use-debounced-autosave-BPwP00mx.js";import"./index-BMxNGICG.js";import"./search-input-DJ05ViVl.js";import"./github-repo-picker-CTMAbHxR.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-BBj5PT7D.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./config-ByOdiANb.js";import"./toolbar-icon-button-Cf6OwFTU.js";import"./calendar-Dh7ySVQi.js";import"./use-file-configs-DGZxsbJi.js";import"./automation-list-row-xAynmOqb.js";function be(A){return Array.isArray(A)?A.map(e=>({key:F(e?.key),value:F(e?.value)})):[]}function ci(A){const e=J.c(66),{orgSlug:i,virtualMcpId:d,branch:o,blockKey:l,block:p,decofile:m,meta:u,previewBaseUrl:x}=A;let y;e[0]!==o||e[1]!==i||e[2]!==d?(y={orgSlug:i,virtualMcpId:d,branch:o},e[0]=o,e[1]=i,e[2]=d,e[3]=y):y=e[3];const s=ae(y);let n;e[4]!==p?(n=me(p,"posts"),e[4]=p,e[5]=n):n=e[5];const j=n;let b;e[6]!==l||e[7]!==s?(b=T=>{s.mutate({blockKey:l,data:ne(l,"posts",T)})},e[6]=l,e[7]=s,e[8]=b):b=e[8];const[r,_]=ge(j,b);let C;e[9]!==r||e[10]!==_?(C=(T,Y)=>_({...r,[T]:Y}),e[9]=r,e[10]=_,e[11]=C):C=e[11];const h=C;let S;e[12]!==m||e[13]!==r||e[14]!==x?(S=ue({decofile:m,post:r,previewBaseUrl:x}),e[12]=m,e[13]=r,e[14]=x,e[15]=S):S=e[15];const f=S;let a;e[16]!==r.title?(a=F(r.title)||"Untitled post",e[16]=r.title,e[17]=a):a=e[17];let c;e[18]!==a?(c=t.jsx("span",{className:"truncate text-sm font-medium",children:a}),e[18]=a,e[19]=c):c=e[19];let g;e[20]!==s.isError||e[21]!==s.isPending?(g=t.jsx(pe,{isPending:s.isPending,isError:s.isError}),e[20]=s.isError,e[21]=s.isPending,e[22]=g):g=e[22];const k=!f,P=f?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let N;e[23]!==f?(N=()=>{f&&window.open(f,"_blank","noopener,noreferrer")},e[23]=f,e[24]=N):N=e[24];let B;e[25]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ee,{size:14}),e[25]=B):B=e[25];let w;e[26]!==P||e[27]!==N||e[28]!==k?(w=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",disabled:k,title:P,onClick:N,children:[B,"See preview"]}),e[26]=P,e[27]=N,e[28]=k,e[29]=w):w=e[29];let E;e[30]!==w||e[31]!==g?(E=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[g,w]}),e[30]=w,e[31]=g,e[32]=E):E=e[32];let v;e[33]!==E||e[34]!==c?(v=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,E]}),e[33]=E,e[34]=c,e[35]=v):v=e[35];let L;e[36]!==r.title?(L=F(r.title),e[36]=r.title,e[37]=L):L=e[37];let R;e[38]!==h?(R=T=>h("title",T),e[38]=h,e[39]=R):R=e[39];let I;e[40]!==L||e[41]!==R?(I=t.jsx(ve,{value:L,onChange:R,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[40]=L,e[41]=R,e[42]=I):I=e[42];let G;e[43]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsxs(Q,{value:"content",children:[t.jsx(te,{}),"Content"]}),e[43]=G):G=e[43];let K;e[44]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsxs(se,{children:[G,t.jsxs(Q,{value:"settings",children:[t.jsx(oe,{}),"Settings"]})]}),e[44]=K):K=e[44];let U;e[45]!==r.sections?(U=xe(r.sections),e[45]=r.sections,e[46]=U):U=e[46];let $;e[47]!==h?($=T=>h("sections",T),e[47]=h,e[48]=$):$=e[48];let M;e[49]!==u||e[50]!==U||e[51]!==$?(M=t.jsx(W,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(he,{value:U,onChange:$,meta:u,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[49]=u,e[50]=U,e[51]=$,e[52]=M):M=e[52];let D;e[53]!==m||e[54]!==r||e[55]!==h?(D=t.jsx(W,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Ce,{post:r,decofile:m,onChange:h})})}),e[53]=m,e[54]=r,e[55]=h,e[56]=D):D=e[56];let V;e[57]!==M||e[58]!==D?(V=t.jsxs(le,{defaultValue:"content",className:"mt-6 gap-4",children:[K,M,D]}),e[57]=M,e[58]=D,e[59]=V):V=e[59];let z;e[60]!==I||e[61]!==V?(z=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[I,V]})}),e[60]=I,e[61]=V,e[62]=z):z=e[62];let O;return e[63]!==v||e[64]!==z?(O=t.jsxs("div",{className:"flex h-full flex-col",children:[v,z]}),e[63]=v,e[64]=z,e[65]=O):O=e[65],O}function Ce(A){const e=J.c(59),{post:i,decofile:d,onChange:o}=A;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(H,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=l):l=e[0];let p;e[1]!==i.excerpt?(p=F(i.excerpt),e[1]=i.excerpt,e[2]=p):p=e[2];let m;e[3]!==o?(m=v=>o("excerpt",v.target.value),e[3]=o,e[4]=m):m=e[4];let u;e[5]!==p||e[6]!==m?(u=t.jsxs("div",{className:"space-y-2",children:[l,t.jsx(re,{id:"post-excerpt",value:p,onChange:m,rows:2})]}),e[5]=p,e[6]=m,e[7]=u):u=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(H,{htmlFor:"post-slug",children:"Slug"}),e[8]=x):x=e[8];let y;e[9]!==i.slug?(y=F(i.slug),e[9]=i.slug,e[10]=y):y=e[10];let s;e[11]!==o?(s=v=>o("slug",v.target.value),e[11]=o,e[12]=s):s=e[12];let n;e[13]!==y||e[14]!==s?(n=t.jsxs("div",{className:"space-y-2",children:[x,t.jsx(q,{id:"post-slug",value:y,onChange:s,placeholder:"my-post",className:"h-10"})]}),e[13]=y,e[14]=s,e[15]=n):n=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j={type:"string",format:"date",title:"Date"},e[16]=j):j=e[16];let b;e[17]!==i.date?(b=F(i.date),e[17]=i.date,e[18]=b):b=e[18];let r;e[19]!==o?(r=v=>o("date",v),e[19]=o,e[20]=r):r=e[20];let _;e[21]!==b||e[22]!==r?(_=t.jsx(fe,{schema:j,value:b,onChange:r,path:"post-date",label:"Date"}),e[21]=b,e[22]=r,e[23]=_):_=e[23];let C;e[24]!==_||e[25]!==n?(C=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n,_]}),e[24]=_,e[25]=n,e[26]=C):C=e[26];let h;e[27]===Symbol.for("react.memo_cache_sentinel")?(h={type:"string",format:"image-uri",title:"Cover image"},e[27]=h):h=e[27];let S;e[28]!==o?(S=v=>o("image",v),e[28]=o,e[29]=S):S=e[29];let f;e[30]!==i.image||e[31]!==S?(f=t.jsx(ce,{schema:h,value:i.image,onChange:S,path:"post-image",label:"Cover image"}),e[30]=i.image,e[31]=S,e[32]=f):f=e[32];let a;e[33]===Symbol.for("react.memo_cache_sentinel")?(a=["email"],e[33]=a):a=e[33];let c;e[34]!==o?(c=v=>o("authors",v),e[34]=o,e[35]=c):c=e[35];let g;e[36]!==d||e[37]!==i.authors||e[38]!==c?(g=t.jsx(X,{label:"Authors",decofile:d,kind:"authors",valueField:"email",extraFields:a,selected:i.authors,onChange:c}),e[36]=d,e[37]=i.authors,e[38]=c,e[39]=g):g=e[39];let k;e[40]===Symbol.for("react.memo_cache_sentinel")?(k=["slug"],e[40]=k):k=e[40];let P;e[41]!==o?(P=v=>o("categories",v),e[41]=o,e[42]=P):P=e[42];let N;e[43]!==d||e[44]!==i.categories||e[45]!==P?(N=t.jsx(X,{label:"Categories",decofile:d,kind:"categories",valueField:"slug",extraFields:k,selected:i.categories,onChange:P}),e[43]=d,e[44]=i.categories,e[45]=P,e[46]=N):N=e[46];let B;e[47]!==o?(B=v=>o("extraProps",v),e[47]=o,e[48]=B):B=e[48];let w;e[49]!==i.extraProps||e[50]!==B?(w=t.jsx(ke,{value:i.extraProps,onChange:B}),e[49]=i.extraProps,e[50]=B,e[51]=w):w=e[51];let E;return e[52]!==C||e[53]!==f||e[54]!==g||e[55]!==N||e[56]!==w||e[57]!==u?(E=t.jsxs("div",{className:"space-y-5",children:[u,C,f,g,N,w]}),e[52]=C,e[53]=f,e[54]=g,e[55]=N,e[56]=w,e[57]=u,e[58]=E):E=e[58],E}function ke(A){const e=J.c(15),{value:i,onChange:d}=A;let o,l,p,m;if(e[0]!==d||e[1]!==i){o=be(i);const y=(s,n)=>d(o.map((j,b)=>b===s?{...j,...n}:j));l="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(H,{children:"Extra props"}),e[6]=p):p=e[6],m=o.length>0&&t.jsx("ul",{className:"space-y-2",children:o.map((s,n)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(q,{value:s.key,onChange:j=>y(n,{key:j.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(q,{value:s.value,onChange:j=>y(n,{value:j.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(ye,{label:"Remove prop",onClick:()=>d(o.filter((j,b)=>b!==n))})]},n))}),e[0]=d,e[1]=i,e[2]=o,e[3]=l,e[4]=p,e[5]=m}else o=e[2],l=e[3],p=e[4],m=e[5];let u;e[7]!==o||e[8]!==d?(u=t.jsx(je,{label:"Add prop",onClick:()=>d([...o,{key:"",value:""}])}),e[7]=o,e[8]=d,e[9]=u):u=e[9];let x;return e[10]!==l||e[11]!==p||e[12]!==m||e[13]!==u?(x=t.jsxs("div",{className:l,children:[p,m,u]}),e[10]=l,e[11]=p,e[12]=m,e[13]=u,e[14]=x):x=e[14],x}function X(A){const e=J.c(31),{label:i,decofile:d,kind:o,valueField:l,extraFields:p,selected:m,onChange:u}=A;let x,y,s;if(e[0]!==d||e[1]!==o||e[2]!==l){x=de(d,o);let f;e[6]!==l?(f=(c,g)=>F(c[l])||g,e[6]=l,e[7]=f):f=e[7],s=f;let a;e[8]!==s?(a=c=>{const{key:g,payload:k}=c;return{value:s(k,g),label:F(k.name)||s(k,g)}},e[8]=s,e[9]=a):a=e[9],y=x.map(a),e[0]=d,e[1]=o,e[2]=l,e[3]=x,e[4]=y,e[5]=s}else x=e[3],y=e[4],s=e[5];const n=y;let j;if(e[10]!==m||e[11]!==l){const f=Array.isArray(m)?m:[];let a;e[13]!==l?(a=c=>F(c[l]),e[13]=l,e[14]=a):a=e[14],j=f.map(a).filter(Boolean),e[10]=m,e[11]=l,e[12]=j}else j=e[12];const b=j;let r;e[15]!==p||e[16]!==u||e[17]!==x||e[18]!==l||e[19]!==s?(r=f=>{u(f.map(a=>{const c=x.find(k=>{const{key:P,payload:N}=k;return s(N,P)===a});if(!c)return{name:a,[l]:a};const g={name:F(c.payload.name)};for(const k of p)g[k]=c.payload[k]??a;return g}))},e[15]=p,e[16]=u,e[17]=x,e[18]=l,e[19]=s,e[20]=r):r=e[20];const _=r;let C;e[21]!==i?(C=t.jsx(H,{children:i}),e[21]=i,e[22]=C):C=e[22];let h;e[23]!==b||e[24]!==_||e[25]!==i||e[26]!==n?(h=n.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",i.toLowerCase()," yet — create some in the"," ",i.toLowerCase()," collection."]}):t.jsx(ie,{options:n,defaultValue:b,onValueChange:_,placeholder:`Select ${i.toLowerCase()}`,maxCount:4}),e[23]=b,e[24]=_,e[25]=i,e[26]=n,e[27]=h):h=e[27];let S;return e[28]!==C||e[29]!==h?(S=t.jsxs("div",{className:"space-y-2",children:[C,h]}),e[28]=C,e[29]=h,e[30]=S):S=e[30],S}export{ci as PostEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as $,Z as H,j as A}from"./index-CLj_5r89.js";import{a as L,g as E,s as b}from"./automation-runs-D98OdVC5.js";import{u as O}from"./use-mcp-client-3hG4jk-y.js";import{p as k}from"./constants-B72Xmt_K.js";import{b as q,c as B}from"./use-mcp-tools-DkI8MzuJ.js";import{u as Y}from"./index-gz1tAOXr.js";import{c as G}from"./monaco-editor-D4hwKq5W.js";import{g as K,M as V,a as w}from"./types-C0d4Ohpx.js";import{a as Z,u as z}from"./chat-context-BsRUICZs.js";import{u as F}from"./shell-layout-IYwmwgpp.js";import"./select-CeXH3gjW.js";import"./tooltip-C51X6QKO.js";import"./Check-VVh423TU.js";import"./ChevronDown-mDFyCzyV.js";import"./ChevronUp-D03XJ0vS.js";import"./useInfiniteQuery-8DjDwhQn.js";import"./use-infinite-scroll-BU44dmI-.js";import"./use-connection-D5Vs5qOp.js";import"./use-collections-Y12o4qWE.js";import"./use-virtual-mcp-D3UxifiP.js";import"./card-D5CauofV.js";import"./sidebar-B_c4VYke.js";import"./LayoutLeft-Cog6SqwZ.js";import"./use-mobile-BJ6No951.js";import"./X-CYIGv8wX.js";import"./table-C2Aqsz0m.js";import"./empty-state-CeXPb2VU.js";import"./use-members-CcCdz_hQ.js";import"./use-org-auth-client-B7yAA88H.js";import"./use-clock-tick-Bz8Z9860.js";import"./AlertCircle-Db_5w_pO.js";import"./CheckCircle-auAoHYRc.js";import"./Circle-DNMct17O.js";import"./agent-icon-EdtPDJXM.js";import"./Tool01-dGPltLKJ.js";import"./SwitchHorizontal01-C9ua90Hw.js";import"./Settings02-D7asukv0.js";import"./XCircle-29rFa-09.js";import"./ArrowUpRight-B2VxdxbH.js";import"./ZapSquare-0BsdXZY9.js";import"./Users03-BMw5o14D.js";import"./Loading02-D2Hh17zb.js";import"./ChevronRight-Ceh-WF7H.js";import"./Stars02-LnA0-zz4.js";import"./Copy01-CuSfBG1R.js";import"./ZoomOut-Dqj1q_yU.js";import"./DotsVertical-Cr4sUrn_.js";import"./Globe01-DkdmhUM8.js";import"./Eye-aR-oC6dj.js";import"./FilterLines-Cr2IL8ug.js";import"./Star01-B90wIaBV.js";import"./Globe04-TuZvt3ov.js";import"./HardDrive-CrxPr3va.js";import"./Key01-CfvrTjDF.js";import"./LinkExternal01-BYpL3ACE.js";import"./List-D5svP-6k.js";import"./Monitor01-cNkbuWdj.js";import"./Sun-DLqplG3r.js";import"./Palette-Dz_ldMx7.js";import"./Play-CVarwVeR.js";import"./Plus-DNCXili3.js";import"./SearchLg-DvsDitCO.js";import"./SearchMd-87dvi4KF.js";import"./Shield01-BT2HQXan.js";import"./Stars01-D1lDEQh2.js";import"./Trash01-BJe3gUZc.js";import"./Upload01-DIYVb8n9.js";import"./User01-DcNAHFa-.js";import"./Users01-q9IKnEsX.js";import"./XClose-DT64mUwh.js";import"./Zap-Br_Hg1wB.js";import"./use-automations-tqGwPES0.js";import"./studio-tools-F5G0urN7.js";import"./useSuspenseInfiniteQuery-BYjapKbe.js";import"./badge-DiKw8RbW.js";import"./checkbox-DhHH_mmR.js";import"./command-Cx8bKs7m.js";import"./index-CPelPFhM.js";import"./dialog-BFPr54WG.js";import"./popover-CKlhZKOG.js";import"./avatar-B2d04wRu.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Dc9VZjfD.js";import"./file-type-icon-D2xX1xnm.js";import"./tab-id-DznSzCvK.js";import"./hooks-BSiz_AKB.js";import"./decopilot-sse-pool-CiyJzTNT.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./integration-icon-Bf1Nt7-n.js";import"./use-navigate-to-agent-CZiiGkPG.js";import"./reusable-new-chat-qqWu133U.js";import"./use-mcp-prompts-K_jp9fAb.js";import"./form-Trt6kqr0.js";import"./label-DjarSga4.js";import"./input-BdpM0TEL.js";import"./auth-BEQgA40y.js";import"./drawer-DcfPm_vi.js";import"./collection-search-BgFXdSC0.js";import"./autosend-REHFoRRR.js";import"./tabs-W14caGou.js";import"./toggle-group-CYFywiUW.js";import"./agent-capabilities-CRvnIg9m.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CmLZ3i0M.js";import"./use-registry-connections-DnT_Dh3O.js";import"./use-organization-settings-BzhOQtxD.js";import"./extract-connection-data-5BWVDciX.js";import"./collection-tabs-Cxl16cFM.js";import"./textarea-ConjZ7fN.js";import"./connection-form-helpers-C1s-KSGU.js";import"./authenticate-and-persist-oauth-nkmQY5vG.js";import"./mcp-oauth-DWePFULn.js";import"./use-ai-providers-BqQDQsEQ.js";import"./connect-desktop-dialog-BWEylyh-.js";import"./select-model-DYpThBVD.js";import"./skeleton-Dl1AhqdL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CyBwf4qC.js";import"./dropdown-menu-BlfYJTRx.js";import"./index-CsAnNpRc.js";import"./alert-dialog-BbHr6pLd.js";import"./toolbar-DR2I0_KA.js";import"./use-debounced-value-DfUpwXh9.js";import"./index-CfigvylE.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-B0huGKlG.js";import"./use-decopilot-events-C70DCxcq.js";import"./use-capability-CqEMs0z_.js";import"./tools-list-DL49NRaT.js";import"./switch-B9wSH4oe.js";import"./use-debounced-autosave-BPwP00mx.js";import"./index-BMxNGICG.js";import"./search-input-DJ05ViVl.js";import"./github-repo-picker-CTMAbHxR.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-BBj5PT7D.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./config-ByOdiANb.js";import"./toolbar-icon-button-Cf6OwFTU.js";import"./calendar-Dh7ySVQi.js";import"./use-file-configs-DGZxsbJi.js";import"./automation-list-row-xAynmOqb.js";import"./required-auth-layout-DGQr874S.js";import"./use-org-sso-DcXTIOxB.js";const J={};function Q(S){const t=$.c(37),{client:e,resourceURI:h,tool:o,connectionId:p,orgId:l,args:M}=S,{sendMessage:I}=Z(),{setAppContext:d,clearAppContext:n}=z(),{setChatOpen:f,openTab:g}=F(),r=`${p}:${o.name}`;let a;t[0]!==g?(a=C=>C==="inline"?(g("0"),"inline"):"fullscreen",t[0]=g,t[1]=a):a=t[1];const m=a,s=M??J;let c;t[2]!==e||t[3]!==o.name||t[4]!==s?(c={client:e,toolName:o.name,toolArguments:s},t[2]=e,t[3]=o.name,t[4]=s,t[5]=c):c=t[5];const{data:i}=B(c);let x;if(t[6]!==o._meta||t[7]!==o.name){const C=E(o._meta);x=b(o.name,C),t[6]=o._meta,t[7]=o.name,t[8]=x}else x=t[8];const U=x;let u;t[9]!==o.inputSchema?(u=o.inputSchema??{type:"object"},t[9]=o.inputSchema,t[10]=u):u=t[10];let N;t[11]!==U||t[12]!==u||t[13]!==o?(N={...o,name:U,inputSchema:u},t[11]=U,t[12]=u,t[13]=o,t[14]=N):N=t[14];const j=N;let _;t[15]!==I||t[16]!==f?(_=C=>{const D=G(C.content);D.content.length>0&&(f(!0),I({tiptapDoc:D}))},t[15]=I,t[16]=f,t[17]=_):_=t[17];const y=_;let P;t[18]!==j?(P={tool:j},t[18]=j,t[19]=P):P=t[19];let T;t[20]!==d||t[21]!==r?(T=C=>d(r,C),t[20]=d,t[21]=r,t[22]=T):T=t[22];let R;t[23]!==n||t[24]!==r?(R=()=>n(r),t[23]=n,t[24]=r,t[25]=R):R=t[25];let v;return t[26]!==e||t[27]!==y||t[28]!==m||t[29]!==l||t[30]!==h||t[31]!==P||t[32]!==T||t[33]!==R||t[34]!==s||t[35]!==i?(v=A.jsx(V,{resourceURI:h,orgId:l,toolInfo:P,toolInput:s,toolResult:i,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:e,onMessage:y,onUpdateModelContext:T,onTeardown:R,onRequestDisplayMode:m,className:"h-full"}),t[26]=e,t[27]=y,t[28]=m,t[29]=l,t[30]=h,t[31]=P,t[32]=T,t[33]=R,t[34]=s,t[35]=i,t[36]=v):v=t[36],v}function Hr(S){const t=$.c(24),{connectionId:e,toolName:h,args:o}=S,{org:p}=H(),l=Y();let M;t[0]!==e||t[1]!==l?(M=k(e)&&l.vmEntry?.sandboxProviderKind==="user-desktop"&&l.previewUrl?`${l.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=e,t[1]=l,t[2]=M):M=t[2];const I=M;let d;t[3]!==e||t[4]!==I||t[5]!==p.id||t[6]!==p.slug?(d={connectionId:e,orgId:p.id,orgSlug:p.slug,mcpUrl:I},t[3]=e,t[4]=I,t[5]=p.id,t[6]=p.slug,t[7]=d):d=t[7];const n=O(d);let f;t[8]!==n?(f={client:n},t[8]=n,t[9]=f):f=t[9];const{data:g}=q(f);let r,a,m;t[10]!==h||t[11]!==g.tools?(r=L(decodeURIComponent(h)),m=g.tools.find(i=>i.name===r)??g.tools.find(i=>{const x=E(i._meta);if(!x)return!1;if(b(i.name,x)===r)return!0;const u=b(r,x);return u!==r&&i.name===u}),a=m?._meta?K(m._meta):void 0,t[10]=h,t[11]=g.tools,t[12]=r,t[13]=a,t[14]=m):(r=t[12],a=t[13],m=t[14]);const s=a;if(!m||!s){let i;return t[15]!==r?(i=A.jsx("div",{className:"flex items-center justify-center h-full w-full",children:A.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',r,'" not found or has no UI']})}),t[15]=r,t[16]=i):i=t[16],i}let c;return t[17]!==o||t[18]!==n||t[19]!==e||t[20]!==p.id||t[21]!==s||t[22]!==m?(c=A.jsx(Q,{client:n,resourceURI:s,tool:m,connectionId:e,orgId:p.id,args:o}),t[17]=o,t[18]=n,t[19]=e,t[20]=p.id,t[21]=s,t[22]=m,t[23]=c):c=t[23],c}export{Hr as AppViewContent};
|