decocms 4.77.3 → 4.78.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-DFFB807G.js → AlertCircle-D6YyJJmm.js} +1 -1
- package/dist/client/assets/{AreaChart-oIJCSonG.js → AreaChart-CXzSMWrS.js} +1 -1
- package/dist/client/assets/{ArrowUp-CFU7eduC.js → ArrowUp-D3YFKg7G.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-D37SsWBk.js → ArrowUpRight-DgvFsQng.js} +1 -1
- package/dist/client/assets/{Check-BAiULwRg.js → Check-Bf3Fz6mT.js} +1 -1
- package/dist/client/assets/{CheckCircle-BwwAyNzV.js → CheckCircle-DBI4XJwz.js} +1 -1
- package/dist/client/assets/{ChevronDown-Cpk84lU5.js → ChevronDown-TeMcV6Wa.js} +1 -1
- package/dist/client/assets/{ChevronRight-UlscOqp6.js → ChevronRight-QSLgw-q7.js} +1 -1
- package/dist/client/assets/{ChevronUp-CqCnswy_.js → ChevronUp-g5JVf1F_.js} +1 -1
- package/dist/client/assets/{Circle-pOPoWDQn.js → Circle-Cu4ym4Ez.js} +1 -1
- package/dist/client/assets/{Copy01-BEB5hDKQ.js → Copy01-DgzGIIpj.js} +1 -1
- package/dist/client/assets/{DotsVertical-BFfMlorx.js → DotsVertical-yY90ybrp.js} +1 -1
- package/dist/client/assets/{Eye-Bbh_ejV6.js → Eye-vRl0ZCJB.js} +1 -1
- package/dist/client/assets/{FilterLines-Dm0WP1zI.js → FilterLines-BbWZ4lL4.js} +1 -1
- package/dist/client/assets/{Flag01-e55mynPF.js → Flag01-CXRHMIef.js} +1 -1
- package/dist/client/assets/{Globe01-DVm51A__.js → Globe01-B7g_9reV.js} +1 -1
- package/dist/client/assets/{Globe04-DA8QsMrW.js → Globe04-C3Z6OIxj.js} +1 -1
- package/dist/client/assets/{HardDrive-BJ2MS6we.js → HardDrive-DymMXEyR.js} +1 -1
- package/dist/client/assets/{Image01-Y4d3ZI2r.js → Image01-Bx4AOGxs.js} +1 -1
- package/dist/client/assets/{Key01-xPUeBTf6.js → Key01-Cmvx37G1.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CNWN8tpf.js → LayoutLeft-q_h77zns.js} +1 -1
- package/dist/client/assets/{LinkExternal01-B6bTrNoI.js → LinkExternal01-BEoe9Fb2.js} +1 -1
- package/dist/client/assets/{List-gTaMGV9z.js → List-5170zK7Q.js} +1 -1
- package/dist/client/assets/{Monitor01-BdI_dCjX.js → Monitor01-Kb5okFQS.js} +1 -1
- package/dist/client/assets/{Package-WlP_SelV.js → Package-yySHtAk6.js} +1 -1
- package/dist/client/assets/{Palette-DwivsXKp.js → Palette-Dacxdv_I.js} +1 -1
- package/dist/client/assets/{Play-BPQdBfbt.js → Play-BoazbAxP.js} +1 -1
- package/dist/client/assets/{Plus-C8FiAr3i.js → Plus-t7Jm0GJ3.js} +1 -1
- package/dist/client/assets/{SearchLg-CMWIHllt.js → SearchLg-CB9_TW_3.js} +1 -1
- package/dist/client/assets/{SearchMd-Gwm-384G.js → SearchMd-B8rhT4Rt.js} +1 -1
- package/dist/client/assets/{Settings02-D5c8FtUa.js → Settings02-D4nrXgvn.js} +1 -1
- package/dist/client/assets/{Shield01-Dn6encQp.js → Shield01-Y3jps5Gy.js} +1 -1
- package/dist/client/assets/{Star01-C32-NjaL.js → Star01-DBp7dbGs.js} +1 -1
- package/dist/client/assets/{Stars01-C8WemEnv.js → Stars01-BJhn7N1A.js} +1 -1
- package/dist/client/assets/{Stars02-CzKVb8lE.js → Stars02-BmKcMhZX.js} +1 -1
- package/dist/client/assets/{Sun-BPhwV-Eh.js → Sun-DWvykssV.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-C8Rnw5uG.js → SwitchHorizontal01-DJDXmWgC.js} +1 -1
- package/dist/client/assets/{Tool01-CSravChF.js → Tool01-Ct7fGWUY.js} +1 -1
- package/dist/client/assets/{Tool02-csu1mOp1.js → Tool02-Cr2Rz6tq.js} +1 -1
- package/dist/client/assets/{Trash01-DZTkGJqE.js → Trash01-C3QDvJF1.js} +1 -1
- package/dist/client/assets/{TrendUp01-Dw2DNRxA.js → TrendUp01-WsDlxYhZ.js} +1 -1
- package/dist/client/assets/{Upload01-s2ES1URH.js → Upload01-C2W1llVr.js} +1 -1
- package/dist/client/assets/{User01-D0_zDlJM.js → User01-Deo29J7j.js} +1 -1
- package/dist/client/assets/{UserPlus01-DjFNU1Mn.js → UserPlus01-C_-L6kJr.js} +1 -1
- package/dist/client/assets/{Users01-CAC4FOXB.js → Users01-CLZ2kdTu.js} +1 -1
- package/dist/client/assets/{Users03-Iz-TpUuJ.js → Users03-uM7w0XRw.js} +1 -1
- package/dist/client/assets/{X-CTTK5Zj2.js → X-DYT1GSz1.js} +1 -1
- package/dist/client/assets/{XCircle-CiVL5z-e.js → XCircle-C965t8pI.js} +1 -1
- package/dist/client/assets/{XClose-DxMKQUUD.js → XClose-D8I17tPk.js} +1 -1
- package/dist/client/assets/{Zap-CrYnUVJy.js → Zap-p_vD-N15.js} +1 -1
- package/dist/client/assets/{ZapSquare-BDp8YrcS.js → ZapSquare-r-I1hrGR.js} +1 -1
- package/dist/client/assets/{ZoomOut-CvmU5uj5.js → ZoomOut-CyT94sXk.js} +1 -1
- package/dist/client/assets/{access-gate-Bw06fv-s.js → access-gate-C5tHnpFu.js} +1 -1
- package/dist/client/assets/{add-section-modal-BUwFQaqb.js → add-section-modal-D3vMc3LK.js} +1 -1
- package/dist/client/assets/{agent-icon-jdj2JAEm.js → agent-icon-jLUxIfUX.js} +1 -1
- package/dist/client/assets/agents-list-3dntZgUX.js +1 -0
- package/dist/client/assets/{ai-providers-azn7N2Yk.js → ai-providers-DUfJcGkX.js} +1 -1
- package/dist/client/assets/{alert-U_1RTm6v.js → alert-JyDMBG9Y.js} +1 -1
- package/dist/client/assets/{alert-dialog-DtmlB9JL.js → alert-dialog-BZCxnnaY.js} +1 -1
- package/dist/client/assets/app-editor-BBLUJ0bm.js +1 -0
- package/dist/client/assets/{auth-BR_fNNK7.js → auth-B0oxX-rw.js} +1 -1
- package/dist/client/assets/{auth-catchall-Dwo94U32.js → auth-catchall-BZvzipnV.js} +1 -1
- package/dist/client/assets/{auth-entry-CsuZU0Hz.js → auth-entry-BLM6BHE1.js} +1 -1
- package/dist/client/assets/{auth-split-layout-HOd3Qhyr.js → auth-split-layout-CsaahkY7.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BuaZSTeD.js → authenticate-and-persist-oauth-DxQqW3T-.js} +1 -1
- package/dist/client/assets/{automation-list-row-BuCXNsSo.js → automation-list-row-f7HB0lEO.js} +1 -1
- package/dist/client/assets/{automation-runs-nQ99AMoV.js → automation-runs-C0bPxXfe.js} +1 -1
- package/dist/client/assets/automations-CZpHalR8.js +1 -0
- package/dist/client/assets/{autosend-CIDdvZqc.js → autosend-pcmp17-1.js} +1 -1
- package/dist/client/assets/{avatar-DJpRqbqg.js → avatar-BaaCzkz5.js} +1 -1
- package/dist/client/assets/{badge-zT-Fh3qN.js → badge-DDX6uCig.js} +1 -1
- package/dist/client/assets/{block-document-2XwXLkCF.js → block-document-DivAhnA1.js} +1 -1
- package/dist/client/assets/{brand-context-CzRgrT9p.js → brand-context-BTW63ubn.js} +1 -1
- package/dist/client/assets/{buckets-BbJLX44L.js → buckets-dkoo4cSZ.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CAMc8JnB.js → bulk-category-panel-BKU51QgX.js} +1 -1
- package/dist/client/assets/{calendar-CibxNjt0.js → calendar-CtB-1ORd.js} +1 -1
- package/dist/client/assets/{capability-load-error-BEzrfkB_.js → capability-load-error-BQX8z6t0.js} +1 -1
- package/dist/client/assets/{card-CEUspnmz.js → card-zqYafqG3.js} +1 -1
- package/dist/client/assets/category-editor-DIxkWtHT.js +1 -0
- package/dist/client/assets/{chat-context-CAoh3qxf.js → chat-context-C_Qfrzll.js} +1 -1
- package/dist/client/assets/{checkbox-C7atZRmN.js → checkbox-D33J0J5s.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DAwaPZJZ.js → cli-auth-success-a675Crj5.js} +1 -1
- package/dist/client/assets/{collection-detail-D0xuaTFw.js → collection-detail-DOr4XVAb.js} +1 -1
- package/dist/client/assets/{collection-display-button-WEEgaqOV.js → collection-display-button-DRpwr1d2.js} +1 -1
- package/dist/client/assets/{collection-search-BLJH2aa6.js → collection-search-BBYUHwp3.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Bs9ViQbC.js → collection-table-wrapper-DG4oL_XO.js} +1 -1
- package/dist/client/assets/{collection-tabs-D10lR104.js → collection-tabs-CM7SC5Ph.js} +1 -1
- package/dist/client/assets/{command-Cih9cb-G.js → command-BgHIgal-.js} +1 -1
- package/dist/client/assets/commerce-onboarding-DEDSkHug.js +1 -0
- package/dist/client/assets/companions-core-BKQjoMFT.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-B4c48mz3.js → connect-desktop-dialog-C3MAVbqi.js} +1 -1
- package/dist/client/assets/{connection-card-DPw_9IvV.js → connection-card-akwzMfSt.js} +1 -1
- package/dist/client/assets/{connection-detail-CDG1VEQ1.js → connection-detail-CRcTfmPM.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-svNTHB1P.js → connection-form-helpers-D-nDOfy5.js} +1 -1
- package/dist/client/assets/{connections-DOceib-0.js → connections-BpPH-rGd.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-pi1pVqbX.js → decopilot-sse-pool-_1OoFfRR.js} +1 -1
- package/dist/client/assets/{dialog-BboVhzku.js → dialog-C_G4Nj_a.js} +1 -1
- package/dist/client/assets/{domain-settings-Dg0Enr4v.js → domain-settings-BU3PLHXT.js} +1 -1
- package/dist/client/assets/{drawer-D5XLtSzP.js → drawer-DIzHaW1L.js} +1 -1
- package/dist/client/assets/{dropdown-menu-DcV4HAvf.js → dropdown-menu-C3HeQI9N.js} +1 -1
- package/dist/client/assets/{empty-state-C6JrR5eZ.js → empty-state-Bn6jIdxN.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DEmXsdA0.js → extract-connection-data-DoTSwnq5.js} +1 -1
- package/dist/client/assets/file-explorer-C7jnlKJt.js +2 -0
- package/dist/client/assets/{file-type-icon-BR1G8n26.js → file-type-icon-Chdi7BrE.js} +1 -1
- package/dist/client/assets/{files-uX2RLUIk.js → files-CDQzPvRQ.js} +1 -1
- package/dist/client/assets/{form-p6ZihW38.js → form-CqMXK7Rg.js} +1 -1
- package/dist/client/assets/{general-pRqMY7to.js → general-BHXdL9DJ.js} +1 -1
- package/dist/client/assets/github-repo-picker-iGTmhvfh.js +1 -0
- package/dist/client/assets/github-repo-scope-DjMZbiKa.js +1 -0
- package/dist/client/assets/{hooks-DYM3Q-Vq.js → hooks-B2bKZJz3.js} +1 -1
- package/dist/client/assets/{index-BN6_Cjv8.js → index-94TmFXEM.js} +1 -1
- package/dist/client/assets/{index-Bbk1PCkR.js → index-B5PgsjuZ.js} +1 -1
- package/dist/client/assets/{index-BEqdT-CX.js → index-BB5lA5jj.js} +3 -3
- package/dist/client/assets/{index-DmYBKzjc.js → index-BKb79pgL.js} +1 -1
- package/dist/client/assets/index-BcGQg-Kx.js +2 -0
- package/dist/client/assets/{index-Bnro1Vjb.js → index-Bvhurd-Z.js} +28 -28
- package/dist/client/assets/{index-BXTPhNSj.js → index-CuPxvnMd.js} +1 -1
- package/dist/client/assets/{index-BTfVRtBq.js → index-DZrgCtW9.js} +1 -1
- package/dist/client/assets/index-DvVn4R_K.js +1 -0
- package/dist/client/assets/{index-hWnZ5W-G.js → index-IeYTwdqM.js} +1 -1
- package/dist/client/assets/{index-S6xdCjXr.js → index-JYMtN_ka.js} +1 -1
- package/dist/client/assets/{index-Dz8rxMiO.js → index-OTCSzql6.js} +1 -1
- package/dist/client/assets/{index-B06wwOYR.js → index-nfm9K1x2.js} +1 -1
- package/dist/client/assets/{index-redirect-CTPXAnic.js → index-redirect-9xlH9kRG.js} +1 -1
- package/dist/client/assets/{index-BXfKOYdf.js → index-xN4b_CkF.js} +1 -1
- package/dist/client/assets/{input-CqfDyI-C.js → input-CcKrVAr2.js} +1 -1
- package/dist/client/assets/{integration-icon-Dhyv93zr.js → integration-icon-BFsmKVHF.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BhSkjT-N.js → invite-member-dialog-6XRVfRTx.js} +1 -1
- package/dist/client/assets/{label-DbwTUWd9.js → label-CW15sZLz.js} +1 -1
- package/dist/client/assets/{layout-BBgXJHVj.js → layout-C1yYJmDo.js} +1 -1
- package/dist/client/assets/{login-Ml29AK4n.js → login-B35xc8Gt.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CeGeftbL.js → mcp-oauth-Bx9msuxY.js} +1 -1
- package/dist/client/assets/{members-D5IT4H1V.js → members-CtdxOI6T.js} +1 -1
- package/dist/client/assets/{monaco-editor-YwujFe9g.js → monaco-editor-tITHyCTj.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CQqHLPvk.js → monitoring-stats-row-5NJQerF_.js} +1 -1
- package/dist/client/assets/{multi-select-B1FaaLCf.js → multi-select-DjU5xocW.js} +1 -1
- package/dist/client/assets/{oauth-callback-B-ebprV-.js → oauth-callback-DMSxm1aa.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DPqgkHzz.js → oauth-callback-ai-provider-DNKUFr1T.js} +1 -1
- package/dist/client/assets/{onboarding-3CEMDgie.js → onboarding-DhudMezE.js} +1 -1
- package/dist/client/assets/{org-install-C-mvhkMd.js → org-install-BI6Tqb8M.js} +1 -1
- package/dist/client/assets/{org-layout-CXafMRKl.js → org-layout-BzM8m0Yo.js} +1 -1
- package/dist/client/assets/{organization-choice-D3k9ZPpO.js → organization-choice-CLoSaGiq.js} +1 -1
- package/dist/client/assets/{orgs-Xyph7dZi.js → orgs-BXyQQf2t.js} +1 -1
- package/dist/client/assets/{page-seo-form-55rMBIi9.js → page-seo-form-b_KQgaAh.js} +1 -1
- package/dist/client/assets/page-seo-sheet-ClLCRUIN.js +1 -0
- package/dist/client/assets/{popover-BJYBT3EY.js → popover-BhnGTRIN.js} +1 -1
- package/dist/client/assets/post-editor-BftvN04C.js +1 -0
- package/dist/client/assets/{primitives-QqbAbc1Q.js → primitives-ueS43w85.js} +1 -1
- package/dist/client/assets/{profile-CgJpwyXB.js → profile-BQf3SBqt.js} +1 -1
- package/dist/client/assets/project-app-view-DjP2PmND.js +1 -0
- package/dist/client/assets/provision-repo-scoped-github-connection-2iDn-wQ1.js +1 -0
- package/dist/client/assets/record-editor-Du8LTIQ8.js +1 -0
- package/dist/client/assets/redirect-editor-CZu9GWo3.js +1 -0
- package/dist/client/assets/registry-g2WwGfcO.js +2 -0
- package/dist/client/assets/{registry-layout-qd98OrCw.js → registry-layout-DupWO7LC.js} +1 -1
- package/dist/client/assets/{reports-Don6tc4i.js → reports-BlIjKH8H.js} +1 -1
- package/dist/client/assets/{require-capability-9_BT8d0_.js → require-capability-D7ZefDTd.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BXaZVxWQ.js → required-auth-layout-COJ1HesY.js} +1 -1
- package/dist/client/assets/{reset-password-BTQg39kb.js → reset-password-ByTmxDaH.js} +1 -1
- package/dist/client/assets/{roles-CMByu1Mi.js → roles-Cgr1guoV.js} +1 -1
- package/dist/client/assets/{search-input-CYwO2ZSV.js → search-input-IdLCT-wl.js} +1 -1
- package/dist/client/assets/{secrets-BHEJh0I9.js → secrets-DF0jWkhd.js} +1 -1
- package/dist/client/assets/{sections-editor-BjlPsEWB.js → sections-editor-Br2ZrjF9.js} +2 -2
- package/dist/client/assets/{select-Bh2Z8rK3.js → select-BDKopoZs.js} +1 -1
- package/dist/client/assets/{select-model-BHB_Fir_.js → select-model-DQ3GcF2Q.js} +1 -1
- package/dist/client/assets/{self-tool-result-BkP7cEqy.js → self-tool-result-Dehaso5-.js} +1 -1
- package/dist/client/assets/seo-editor-DxU1V_q7.js +1 -0
- package/dist/client/assets/{settings-layout-DX2Oqcs9.js → settings-layout-BTr-31q1.js} +1 -1
- package/dist/client/assets/{settings-section-HiisdE7T.js → settings-section-Bs2y0W38.js} +1 -1
- package/dist/client/assets/{shell-controls-Dsv9TiVE.js → shell-controls-BNwC-U3m.js} +1 -1
- package/dist/client/assets/{shell-layout-CcPRSmgX.js → shell-layout-DBwpg5fa.js} +1 -1
- package/dist/client/assets/{sidebar-CRtkHPvX.js → sidebar-BiKcuUlz.js} +1 -1
- package/dist/client/assets/{skeleton-C-LbiBGP.js → skeleton-DO-zgL8S.js} +1 -1
- package/dist/client/assets/{sso-CHr6NXev.js → sso-BVw4m6Is.js} +1 -1
- package/dist/client/assets/{store-CJu8MR_n.js → store-BBq6XldJ.js} +1 -1
- package/dist/client/assets/store-registry-BIIvqrwe.js +2 -0
- package/dist/client/assets/{studio-tools-Cdt3UzXo.js → studio-tools-QgTnVt0y.js} +1 -1
- package/dist/client/assets/{switch-BL8XQR8K.js → switch-7KE_HjZk.js} +1 -1
- package/dist/client/assets/{table-VOE9WRkg.js → table-C23nDXu-.js} +1 -1
- package/dist/client/assets/{tabs-DPmfTv0c.js → tabs-B0oOCjef.js} +1 -1
- package/dist/client/assets/{textarea-B9g6Z2-r.js → textarea-D3iFRZ9o.js} +1 -1
- package/dist/client/assets/{toggle-group-BnuMLJr8.js → toggle-group-MA_94m4S.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BBh2Csxi.js → toolbar-icon-button-Be0Xxrx6.js} +1 -1
- package/dist/client/assets/{toolbar-65iromlk.js → toolbar-w5KxuBt-.js} +1 -1
- package/dist/client/assets/{tooltip-C7c-Tgru.js → tooltip-LRHFL41r.js} +1 -1
- package/dist/client/assets/{use-ai-providers-C7iVrgY-.js → use-ai-providers-BeYG-EjG.js} +1 -1
- package/dist/client/assets/{use-automations-CELpHT79.js → use-automations-CAUzSd8j.js} +1 -1
- package/dist/client/assets/{use-autosave-B1tnyn5H.js → use-autosave-C6ffzJDR.js} +1 -1
- package/dist/client/assets/{use-capability-DsC1r5oD.js → use-capability-Dch03R8X.js} +1 -1
- package/dist/client/assets/{use-clock-tick-F8Oybd0p.js → use-clock-tick-CVibzfL9.js} +1 -1
- package/dist/client/assets/{use-collections-Dy7WD_eH.js → use-collections-D9omaJJu.js} +1 -1
- package/dist/client/assets/{use-connection-DUpx0NEA.js → use-connection-hO51hV8J.js} +1 -1
- package/dist/client/assets/{use-copy-C0FUXmsm.js → use-copy-tGW1Vaes.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Bbp45Sum.js → use-create-virtual-mcp-CdWTTl06.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-IEMI4Muz.js → use-debounced-autosave-cTAMJ-st.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BqHYI-kn.js → use-debounced-value-C8BZDtz1.js} +1 -1
- package/dist/client/assets/{use-deco-credits-56-eyw-E.js → use-deco-credits-D8dtxTPg.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-btxE-D2k.js → use-decopilot-events-4o9NNSez.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BCTMhr9Z.js → use-delete-connection-BqJkmcK6.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D9-LjGCb.js → use-deployment-admin-D_HkirOy.js} +1 -1
- package/dist/client/assets/{use-file-configs-CYmkQ98g.js → use-file-configs-CZiarNuS.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DYbbFqLK.js → use-infinite-scroll-DgcSj6JD.js} +1 -1
- package/dist/client/assets/{use-join-requests-DZ4YwkLh.js → use-join-requests-BqCHI8Zj.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-Dy_Y2kKR.js → use-mcp-auth-status-CLsbHDCg.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DvvHwezb.js → use-mcp-client-W9fEi0Ml.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Be4djRS3.js → use-mcp-tools-uwmJZn0p.js} +1 -1
- package/dist/client/assets/{use-members-BZPSqMOT.js → use-members-B6EJ964p.js} +1 -1
- package/dist/client/assets/{use-mobile-DbBFg2WD.js → use-mobile-BQOMgKS3.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CBi1-FBB.js → use-navigate-to-agent-DqqHYLVD.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-PHOIKqSH.js → use-org-auth-client-Y5-GC6qM.js} +1 -1
- package/dist/client/assets/{use-org-sso-BA_UxewI.js → use-org-sso-Dqg59TFA.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DDd0H73X.js → use-organization-roles-CeuO8sTI.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CpbybQHD.js → use-organization-settings-CQJ8RPRh.js} +1 -1
- package/dist/client/assets/use-registry-app-DVOJoUv5.js +1 -0
- package/dist/client/assets/{use-registry-connections-CX_dlku1.js → use-registry-connections-DdQfbjwO.js} +1 -1
- package/dist/client/assets/{use-secrets-ChIMRFxc.js → use-secrets-CIsNwBX2.js} +1 -1
- package/dist/client/assets/{use-status-sounds-BrRSDeZW.js → use-status-sounds-DFGyya-5.js} +1 -1
- package/dist/client/assets/{use-view-mode-C9HP0iNa.js → use-view-mode-DJMiJaWa.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CNKe_WaY.js → use-virtual-mcp-DpSXhS0n.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CyvFYQl8.js +1 -0
- package/dist/client/assets/{useRouterState-Bq6lDwd7.js → useRouterState-DpJ4EK7e.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-C33XLke-.js +1 -0
- package/dist/client/assets/{users-DMEyTKsO.js → users-EWx6DB7t.js} +1 -1
- package/dist/client/assets/{variant-calendar-CYVo9qj3.js → variant-calendar-DchPOrHH.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CyQ3mWd3.js → view-mode-toggle-hMQMe6tZ.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/agents-list-DZ3h25ic.js +0 -1
- package/dist/client/assets/app-editor-Be08LQCr.js +0 -1
- package/dist/client/assets/automations-DB43wI7K.js +0 -1
- package/dist/client/assets/category-editor-DSqWbwsH.js +0 -1
- package/dist/client/assets/commerce-onboarding-OnAQudmo.js +0 -1
- package/dist/client/assets/companions-core-Zwoux9HO.js +0 -1
- package/dist/client/assets/file-explorer-LHYs3ZjT.js +0 -2
- package/dist/client/assets/github-repo-picker-B_QoRL-b.js +0 -1
- package/dist/client/assets/index-BoB4jtNg.js +0 -1
- package/dist/client/assets/index-CbMrlBFr.js +0 -2
- package/dist/client/assets/page-seo-sheet-D7RIqvrG.js +0 -1
- package/dist/client/assets/post-editor-DLBj2cKN.js +0 -1
- package/dist/client/assets/project-app-view-9_icLawb.js +0 -1
- package/dist/client/assets/provision-repo-scoped-github-connection-CB4ICKHq.js +0 -1
- package/dist/client/assets/record-editor-oee2Qj_I.js +0 -1
- package/dist/client/assets/redirect-editor-BtYgxzY9.js +0 -1
- package/dist/client/assets/registry-Dl1tv9V3.js +0 -2
- package/dist/client/assets/seo-editor-DwFM6IEi.js +0 -1
- package/dist/client/assets/store-registry-EZCYrXqX.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BnNR1NVs.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-3QrNhYz_.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as I,b as ne,C as X,D as xs,j as s,B as je,r as M,F as ps,E as We,a as te,v as gs,K as Ct,d as Le,p as J,G as Ce,l as O,H as bs,I as js,J as vs,M as ys,P as Ss,q as _s,t as oe,s as Ns,i as wt,e as Ve,u as we,L as Cs,R as ws,U as ks,V as Is,W as As,m as zs,X as $s,O as Ts,Y as Os}from"./index-BEqdT-CX.js";import{u as re,S as qe,a as Ke,b as ee,c as K,d as H,e as kt,f as Ms,g as It,h as Es,i as he,j as Ps,k as Ds,l as Fs}from"./sidebar-CRtkHPvX.js";import{u as Ye}from"./use-mobile-DbBFg2WD.js";import{C as Rs,p as Ee,s as Ls,b as Hs,S as Bs,d as Us,e as Gs,c as Ws,n as Vs}from"./self-tool-result-BkP7cEqy.js";import{f as qs,a as At,e as zt,g as Ks,D as Ys,h as Xs,d as Qs}from"./dialog-BboVhzku.js";import{f as Js}from"./tab-id-BijBBRwE.js";import{u as $t}from"./use-mcp-client-DvvHwezb.js";import{C as Zs,W as Tt,g as en,S as Ot,a as _e,i as tn,b as sn}from"./constants-D_FQAPnt.js";import{i as Mt}from"./XCircle-CiVL5z-e.js";import{S as se}from"./skeleton-C-LbiBGP.js";import{i as Et}from"./LayoutLeft-CNWN8tpf.js";import{t as Xe}from"./ChevronDown-Cpk84lU5.js";import{T as le,a as ae,b as ce,c as Pt}from"./tooltip-C7c-Tgru.js";import{u as Dt,a as Qe}from"./use-virtual-mcp-CNKe_WaY.js";import{A as de,t as nn,a as on,i as rn,b as ln,c as ot,d as an,s as cn,e as dn}from"./agent-icon-jdj2JAEm.js";import{P as fe,a as ke,b as Ie}from"./popover-BJYBT3EY.js";import{i as Ft}from"./Check-BAiULwRg.js";import{s as xe}from"./Plus-C8FiAr3i.js";import{i as Rt}from"./SearchMd-Gwm-384G.js";import{s as mn}from"./XClose-DxMKQUUD.js";import{A as un,a as fn,b as hn,c as xn,d as pn,e as gn,f as bn}from"./alert-dialog-DtmlB9JL.js";import{F as jn,a as vn,b as yn,c as Sn,d as _n,e as Nn,f as Cn}from"./form-p6ZihW38.js";import{I as wn}from"./input-CqfDyI-C.js";import{S as kn,u as In,C as An}from"./chat-context-CAoh3qxf.js";import{T as me}from"./toolbar-icon-button-BBh2Csxi.js";import{D as Lt,a as Ht,b as Bt}from"./drawer-D5XLtSzP.js";import{G as zn,a as $n}from"./github-repo-picker-B_QoRL-b.js";import{u as Ut,a as Je,b as Tn,T as On}from"./hooks-DYM3Q-Vq.js";import{r as Mn,u as Ze,f as En}from"./shell-layout-CcPRSmgX.js";import{u as Pn,g as Dn,a as Fn,b as Rn,S as Gt}from"./use-navigate-to-agent-CBi1-FBB.js";import{g as Ln,a as Wt,u as Hn,A as Bn,b as Un}from"./use-deco-credits-56-eyw-E.js";import{f as Gn}from"./reusable-new-chat-CouMjkYR.js";import{A as He}from"./avatar-DJpRqbqg.js";import{a as Wn}from"./Copy01-BEB5hDKQ.js";import{n as Vn,i as qn}from"./Globe01-DVm51A__.js";import{i as Kn}from"./ZoomOut-CvmU5uj5.js";import{i as rt,a as Yn}from"./ZapSquare-BDp8YrcS.js";import{i as Be}from"./Monitor01-BdI_dCjX.js";import{n as Xn,a as Qn}from"./Sun-BPhwV-Eh.js";import{a as Ae}from"./Settings02-D5c8FtUa.js";import{i as Jn}from"./Shield01-Dn6encQp.js";import{a as Zn}from"./Users03-Iz-TpUuJ.js";import{u as ei}from"./use-deployment-admin-D9-LjGCb.js";import"./index-B06wwOYR.js";import{t as Vt}from"./UserPlus01-DjFNU1Mn.js";import{I as qt}from"./invite-member-dialog-BhSkjT-N.js";import{v as ti,C as lt}from"./connect-desktop-dialog-B4c48mz3.js";import{u as ze}from"./use-organization-settings-CpbybQHD.js";import{i as si}from"./FilterLines-Dm0WP1zI.js";import{T as ni,a as ii}from"./toggle-group-BnuMLJr8.js";import{C as oi,a as ri,b as li,c as ai,d as ci}from"./command-Cih9cb-G.js";import{u as Kt}from"./studio-tools-Cdt3UzXo.js";import{i as Yt}from"./Zap-CrYnUVJy.js";import{S as Xt,M as di}from"./shell-controls-Dsv9TiVE.js";import{n as mi}from"./Stars02-CzKVb8lE.js";import{g as ui,u as fi,S as hi}from"./use-clock-tick-F8Oybd0p.js";import{a as xi}from"./format-time-BnbuEtat.js";import{i as pi}from"./ChevronRight-UlscOqp6.js";import{T as Q}from"./toolbar-65iromlk.js";import"./X-CTTK5Zj2.js";import"./integration-icon-Dhyv93zr.js";import"./Tool02-csu1mOp1.js";import"./CheckCircle-BwwAyNzV.js";import"./companions-core-Zwoux9HO.js";import"./extract-connection-data-DEmXsdA0.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./Eye-Bbh_ejV6.js";import"./use-debounced-value-BqHYI-kn.js";import"./authenticate-and-persist-oauth-BuaZSTeD.js";import"./mcp-oauth-CeGeftbL.js";import"./auth-BR_fNNK7.js";import"./ArrowUpRight-D37SsWBk.js";import"./use-collections-Dy7WD_eH.js";import"./AlertCircle-DFFB807G.js";import"./Tool01-CSravChF.js";import"./ArrowUp-CFU7eduC.js";import"./TrendUp01-Dw2DNRxA.js";import"./ChevronUp-CqCnswy_.js";import"./Circle-pOPoWDQn.js";import"./DotsVertical-BFfMlorx.js";import"./Flag01-e55mynPF.js";import"./Star01-C32-NjaL.js";import"./Globe04-DA8QsMrW.js";import"./SwitchHorizontal01-C8Rnw5uG.js";import"./HardDrive-BJ2MS6we.js";import"./Image01-Y4d3ZI2r.js";import"./Key01-xPUeBTf6.js";import"./LinkExternal01-B6bTrNoI.js";import"./List-gTaMGV9z.js";import"./Package-WlP_SelV.js";import"./Palette-DwivsXKp.js";import"./Play-BPQdBfbt.js";import"./SearchLg-CMWIHllt.js";import"./Stars01-C8WemEnv.js";import"./Trash01-DZTkGJqE.js";import"./Upload01-s2ES1URH.js";import"./User01-D0_zDlJM.js";import"./Users01-CAC4FOXB.js";import"./label-DbwTUWd9.js";import"./autosend-CIDdvZqc.js";import"./use-ai-providers-C7iVrgY-.js";import"./use-decopilot-events-btxE-D2k.js";import"./decopilot-sse-pool-pi1pVqbX.js";import"./backoff-CrEUbyZT.js";import"./collection-search-BLJH2aa6.js";import"./use-connection-DUpx0NEA.js";import"./use-mcp-tools-Be4djRS3.js";import"./delay-CnY5UFtP.js";import"./required-auth-layout-BXaZVxWQ.js";import"./use-org-sso-BA_UxewI.js";import"./connection-card-DPw_9IvV.js";import"./use-registry-connections-CX_dlku1.js";import"./useInfiniteQuery-BnNR1NVs.js";import"./use-infinite-scroll-DYbbFqLK.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-CEUspnmz.js";import"./select-Bh2Z8rK3.js";import"./textarea-B9g6Z2-r.js";import"./connection-form-helpers-svNTHB1P.js";import"./collection-tabs-D10lR104.js";import"./badge-zT-Fh3qN.js";import"./useSuspenseInfiniteQuery-3QrNhYz_.js";import"./use-org-auth-client-PHOIKqSH.js";import"./use-organization-roles-DDd0H73X.js";import"./index-Dz8rxMiO.js";import"./differenceInSeconds-NQ4PDo0z.js";function gi(t){const e=I.c(15),{siteUrl:n}=t,o=ne(),{org:i}=X();let r;e[0]!==o||e[1]!==i.id||e[2]!==i.slug?(r=()=>{localStorage.setItem(xs.sidebarOpen(),JSON.stringify(!1)),o({to:"/$org/$taskId",params:{org:i.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:en(i.id),main:Js(Tt.COMMERCE_DISCOVERY(i.id),Zs),sidepanel:0}})},e[0]=o,e[1]=i.id,e[2]=i.slug,e[3]=r):r=e[3];const l=r;let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(qs,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=a):a=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(At,{className:"sr-only",children:"Conecte suas ferramentas para ver o diagnóstico completo"}),e[5]=m):m=e[5];let c;e[6]!==l?(c=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Não foi possível carregar as integrações. Você pode continuar e abrir o relatório mesmo assim."}),s.jsxs(je,{type:"button",size:"xl",className:"w-full",onClick:l,children:["Continuar",s.jsx(Mt,{size:18})]})]}),e[6]=l,e[7]=c):c=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Rs,{}),e[8]=d):d=e[8];let u;e[9]!==l||e[10]!==n?(u=s.jsx(M.Suspense,{fallback:d,children:s.jsx(yi,{siteUrlFromUrl:n,onComplete:l})}),e[9]=l,e[10]=n,e[11]=u):u=e[11];let f;return e[12]!==c||e[13]!==u?(f=s.jsx(zt,{open:!0,children:s.jsxs(Ks,{children:[a,s.jsxs(ps,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:vi,onPointerDownOutside:ji,onInteractOutside:bi,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[m,s.jsx(We,{fallback:c,children:u})]})]})}),e[12]=c,e[13]=u,e[14]=f):f=e[14],f}function bi(t){return t.preventDefault()}function ji(t){return t.preventDefault()}function vi(t){return t.preventDefault()}function yi({siteUrlFromUrl:t,onComplete:e}){const{org:n}=X(),{data:o}=te.useSession(),i=Tt.COMMERCE_DISCOVERY(n.id),r=$t({connectionId:Ot,orgId:n.id,orgSlug:n.slug}),a=gs({queryKey:Ct.commerceDiscoveryConnection(n.id,i),queryFn:async()=>{const v=await r.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:i}});return Ee(v)},retry:!1}).data.item,m=typeof a?.metadata?.siteUrl=="string"?a.metadata.siteUrl:void 0,c=t||m,d=Ls(c),[u,f]=M.useState(!0),[h,x]=M.useState(null),g=Le({mutationFn:async v=>Ee(await r.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:v}})),retry:!1}),p=Le({mutationFn:async v=>Ee(await r.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:v}})),retry:!1}),b=Hs({siteUrl:c,email:o?.user?.email}),j=async()=>{x(null),J("commerce_onboarding_open_report_clicked",{domain:d??void 0,organization_id:n.id});const v=c?Vs(c):null;if(v?.ok)try{let y=await p.mutateAsync(v.value);if(y.triggered||(J("commerce_onboarding_run_reclaim",{domain:d??void 0,organization_id:n.id,reason:y.reason??"not_upgraded"}),await g.mutateAsync(v.value),y=await p.mutateAsync(v.value)),!y.triggered){J("commerce_onboarding_run_failed",{domain:d??void 0,organization_id:n.id,error:y.reason??"not_triggered"}),x("Não foi possível gerar o relatório para este site. Recarregue a página e tente novamente.");return}}catch(y){J("commerce_onboarding_run_failed",{domain:d??void 0,organization_id:n.id,error:y instanceof Error?y.message:String(y)}),x("Algo deu errado ao gerar seu relatório. Tente novamente em instantes.");return}e()};return s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col lg:flex-row",children:[s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 p-4 lg:gap-6 lg:bg-sidebar lg:p-10",children:[d?s.jsx(Bs,{host:d}):null,s.jsx(Us,{org:n,cdConnectionId:i,siteUrl:c,onReadinessChange:f}),s.jsxs("div",{className:"flex shrink-0 flex-col gap-3",children:[s.jsx(Gs,{href:b,orgId:n.id,className:"lg:hidden"}),h?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:h}):null,s.jsxs(je,{type:"button",size:"xl",className:"w-full rounded-2xl text-base font-medium whitespace-normal h-auto py-3",onClick:()=>{j()},disabled:p.isPending||!u,children:[p.isPending?"Abrindo relatório...":u?"Ver relatório completo":"Conecte uma ferramenta para continuar",!p.isPending&&u?s.jsx(Mt,{size:18}):null]})]})]}),s.jsx("aside",{className:"hidden lg:flex lg:w-[380px] lg:shrink-0 lg:items-center lg:justify-center lg:overflow-y-auto lg:border-l lg:border-border lg:bg-muted",children:s.jsx(Ws,{href:b,orgId:n.id})})]})}function Si(t){const e=I.c(5),{onPointerDown:n,onDoubleClick:o}=t,{state:i,isMobile:r}=re();if(r||i==="collapsed")return null;let l,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={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]=l,e[1]=a):(l=e[0],a=e[1]);let m;return e[2]!==o||e[3]!==n?(m=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:n,onDoubleClick:o,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:l,children:a}),e[2]=o,e[3]=n,e[4]=m):m=e[4],m}const et=240,_i=400,Ni="sidebar.width";function pe(t){return Math.max(et,Math.min(_i,t))}function Ci(){const t=I.c(11),[e,n]=Ce(Ni,wi),o=M.useRef(null);let i;t[0]!==n||t[1]!==e?(i=d=>{d.preventDefault();const u=d.clientX,f=pe(e),h=o.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=h?Array.from(h.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of x)b.style.transition="none";const g=b=>{const j=pe(f+(b.clientX-u));h?.style.setProperty("--sidebar-width",`${j}px`)},p=b=>{const j=pe(f+(b.clientX-u));n(j);for(const v of x)v.style.transition="";window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",p),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",g),window.addEventListener("pointerup",p)},t[0]=n,t[1]=e,t[2]=i):i=t[2];const r=i;let l;t[3]!==n?(l=()=>{n(et)},t[3]=n,t[4]=l):l=t[4];const a=l;let m;t[5]!==e?(m=pe(e),t[5]=e,t[6]=m):m=t[6];let c;return t[7]!==r||t[8]!==a||t[9]!==m?(c={width:m,wrapperRef:o,onStartResize:r,resetWidth:a},t[7]=r,t[8]=a,t[9]=m,t[10]=c):c=t[10],c}function wi(t){return typeof t=="number"?pe(t):et}function Qt(){return[]}function Jt(t){const e=I.c(3),{children:n}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=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]=o):o=e[0];let i;return e[1]!==n?(i=s.jsxs(qe,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[o,s.jsx(Ke,{children:s.jsx(ee,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=i):i=e[2],i}function Zt(t){const e=I.c(18),{item:n}=t,{isMobile:o,setOpenMobile:i}=re();let r;e[0]!==o||e[1]!==n||e[2]!==i?(r=()=>{J("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:o}),n.onClick?.(),o&&i(!1)},e[0]=o,e[1]=n,e[2]=i,e[3]=r):r=e[3];const l=r,a=n.key,m=n.isActive&&"z-10";let c;e[4]!==m?(c=O(m),e[4]=m,e[5]=c):c=e[5];let d;e[6]!==n.label?(d=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=d):d=e[7];let u;e[8]!==l||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==d?(u=s.jsxs(K,{onClick:l,isActive:n.isActive,tooltip:n.label,children:[n.icon,d]}),e[8]=l,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=d,e[13]=u):u=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==u?(f=s.jsx(H,{className:c,children:u},a),e[14]=n.key,e[15]=c,e[16]=u,e[17]=f):f=e[17],f}function ki(t){const e=I.c(12),{section:n}=t;switch(n.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(kt,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=n.group.label,i=n.group.defaultExpanded;let r;e[2]!==n.group.items?(r=n.group.items.map(Ai),e[2]=n.group.items,e[3]=r):r=e[3];let l;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==r?(l=s.jsx(Jt,{label:o,defaultExpanded:i,children:r}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=r,e[7]=l):l=e[7],l}case"items":{let o;e[8]!==n.items?(o=n.items.map(Ii),e[8]=n.items,e[9]=o):o=e[9];let i;return e[10]!==o?(i=s.jsx(qe,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ke,{children:s.jsx(ee,{className:"gap-1.5",children:o})})}),e[10]=o,e[11]=i):i=e[11],i}case"custom":return n.content}}function Ii(t){return s.jsx(Zt,{item:t},t.key)}function Ai(t){return s.jsx(Zt,{item:t},t.key)}function zi(t){const e=I.c(17),{sections:n,footer:o,additionalContent:i,header:r,variant:l,contentClassName:a}=t,m=l===void 0?"sidebar":l;let c;e[0]!==r?(c=r&&s.jsx(Ms,{className:"sidebar-titlebar wco-drag shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:r}),e[0]=r,e[1]=c):c=e[1];let d;e[2]!==a?(d=O("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=d):d=e[3];let u;e[4]!==n?(u=n.map($i),e[4]=n,e[5]=u):u=e[5];let f;e[6]!==i?(f=i&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:i}),e[6]=i,e[7]=f):f=e[7];let h;e[8]!==d||e[9]!==u||e[10]!==f?(h=s.jsxs(It,{className:d,children:[u,f]}),e[8]=d,e[9]=u,e[10]=f,e[11]=h):h=e[11];let x;return e[12]!==o||e[13]!==c||e[14]!==h||e[15]!==m?(x=s.jsxs(Es,{variant:m,children:[c,h,o]}),e[12]=o,e[13]=c,e[14]=h,e[15]=m,e[16]=x):x=e[16],x}function $i(t,e){return s.jsx(ki,{section:t},e)}function es(t){const e=I.c(2);let n;return e[0]!==t?(n=s.jsx(zi,{...t}),e[0]=t,e[1]=n):n=e[1],n}es.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 ts(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ti=bs({name:js().min(2,"Organization name is required")});function Oi(t){const e=I.c(41),{open:n,onOpenChange:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={resolver:vs(Ti),defaultValues:{name:""}},e[0]=i):i=e[0];const r=ys(i);let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l={mutationFn:Ei,onSuccess:Mi},e[1]=l):l=e[1];const a=Le(l),m=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(hn,{children:[s.jsx(xn,{children:"Create a new organization"}),s.jsx(pn,{children:"Set up a new organization to collaborate with others."})]}),e[2]=c):c=e[2];let d;if(e[3]!==a||e[4]!==r){let _;e[6]!==a?(_=N=>a.mutateAsync(N),e[6]=a,e[7]=_):_=e[7],d=r.handleSubmit(_),e[3]=a,e[4]=r,e[5]=d}else d=e[5];let u;e[8]!==r.formState.isSubmitting?(u=_=>{const{field:N}=_;return s.jsxs(yn,{children:[s.jsx(Sn,{children:"Organization Name"}),s.jsx(_n,{children:s.jsx(wn,{...N,placeholder:"Acme Inc.",disabled:r.formState.isSubmitting})}),s.jsx(Nn,{children:"The name of your company or organization"}),N.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:"","/",ts(N.value)]})]}),s.jsx(Cn,{})]})},e[8]=r.formState.isSubmitting,e[9]=u):u=e[9];let f;e[10]!==r.control||e[11]!==u?(f=s.jsx(jn,{control:r.control,name:"name",render:u}),e[10]=r.control,e[11]=u,e[12]=f):f=e[12];let h;e[13]!==m?(h=m&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:m}),e[13]=m,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==r?(x=()=>{a.reset(),r.reset()},e[15]=a,e[16]=r,e[17]=x):x=e[17];let g;e[18]!==r.formState.isSubmitting||e[19]!==x?(g=s.jsx(un,{disabled:r.formState.isSubmitting,onClick:x,children:"Cancel"}),e[18]=r.formState.isSubmitting,e[19]=x,e[20]=g):g=e[20];const p=!r.formState.isValid||r.formState.isSubmitting;let b;e[21]!==r.formState.isSubmitting?(b=r.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(kn,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=r.formState.isSubmitting,e[22]=b):b=e[22];let j;e[23]!==p||e[24]!==b?(j=s.jsx(je,{type:"submit",variant:"default",disabled:p,children:b}),e[23]=p,e[24]=b,e[25]=j):j=e[25];let v;e[26]!==j||e[27]!==g?(v=s.jsxs(gn,{children:[g,j]}),e[26]=j,e[27]=g,e[28]=v):v=e[28];let y;e[29]!==v||e[30]!==d||e[31]!==f||e[32]!==h?(y=s.jsxs("form",{className:"space-y-6",onSubmit:d,autoComplete:"off",children:[f,h,v]}),e[29]=v,e[30]=d,e[31]=f,e[32]=h,e[33]=y):y=e[33];let S;e[34]!==r||e[35]!==y?(S=s.jsxs(fn,{children:[c,s.jsx(vn,{...r,children:y})]}),e[34]=r,e[35]=y,e[36]=S):S=e[36];let C;return e[37]!==o||e[38]!==n||e[39]!==S?(C=s.jsx(bn,{open:n,onOpenChange:o,children:S}),e[37]=o,e[38]=n,e[39]=S,e[40]=C):C=e[40],C}function Mi(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function Ei(t){const e=ts(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await te.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const o=n?.data?.slug??e;if(!o)throw new Error("Failed to create organization");return{orgSlug:o}}function ss(){const t=M.useContext(Ss),{data:e,refetch:n}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(i=>i.status==="pending"&&new Date(i.expiresAt)>new Date),refetch:()=>n?.()}}function Pi(t){let e=0;for(let o=0;o<t.length;o++)e=t.charCodeAt(o)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function $e(t){const e=I.c(13),{org:n,size:o}=t,i=o===void 0?"sm":o,r=i==="xs"?"size-5":"size-6",l=i==="xs"?"text-[9px]":"text-xs";let a;e[0]!==r?(a=O(r,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=r,e[1]=a):a=e[1];let m;e[2]!==n.logo||e[3]!==n.name?(m=n.logo?void 0:Pi(n.name),e[2]=n.logo,e[3]=n.name,e[4]=m):m=e[4];let c;e[5]!==n.logo||e[6]!==n.name||e[7]!==l?(c=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:O("font-semibold leading-none",l),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=l,e[8]=c):c=e[8];let d;return e[9]!==a||e[10]!==m||e[11]!==c?(d=s.jsx("div",{className:a,style:m,children:c}),e[9]=a,e[10]=m,e[11]=c,e[12]=d):d=e[12],d}function Di({invitation:t,onChanged:e}){const[n,o]=M.useState(!1),i=t.organizationName??"Unknown organization",r=async()=>{o(!0);try{const m=await te.organization.acceptInvitation({invitationId:t.id});if(m.error){oe.error(m.error.message),o(!1);return}}catch{oe.error("Failed to accept invitation"),o(!1);return}oe.success(`Joined ${i}`),Ns();let a;try{a=(await te.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=a?`/${a}`:"/"},l=async()=>{o(!0);try{const a=await te.organization.rejectInvitation({invitationId:t.id});if(a.error){oe.error(a.error.message),o(!1);return}oe.success("Invitation declined"),o(!1),e()}catch{oe.error("Failed to decline invitation"),o(!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($e,{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:l,disabled:n,"aria-label":`Decline invitation to ${i}`,children:s.jsx(mn,{size:14})})]})]})}function Fi(t){const e=I.c(29),{orgParam:n,onSelectOrg:o,onCreateOrg:i}=t,{data:r}=_s(),{invitations:l,refetch:a}=ss();let m;e[0]!==n?(m=(k,$)=>k.slug===n?-1:$.slug===n?1:k.name.localeCompare($.name),e[0]=n,e[1]=m):m=e[1];const c=[...r??[]].sort(m),[d,u]=M.useState(""),f=d.toLowerCase(),h=f?c.filter(k=>k.name.toLowerCase().includes(f)||k.slug.toLowerCase().includes(f)):c;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Rt,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=x):x=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=k=>u(k.target.value),e[3]=g):g=e[3];let p;e[4]!==d?(p=k=>k.key==="Escape"&&d&&u(""),e[4]=d,e[5]=p):p=e[5];let b;e[6]!==d||e[7]!==p?(b=s.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:d,onChange:g,onKeyDown:p,placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[6]=d,e[7]=p,e[8]=b):b=e[8];let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(xe,{size:16}),e[9]=j):j=e[9];let v;e[10]!==i?(v=s.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:j}),e[10]=i,e[11]=v):v=e[11];let y;e[12]!==b||e[13]!==v?(y=s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[x,b,v]}),e[12]=b,e[13]=v,e[14]=y):y=e[14];const S="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let C;e[15]!==l||e[16]!==d||e[17]!==a?(C=!d&&l.map(k=>s.jsx(Di,{invitation:k,onChanged:a},k.id)),e[15]=l,e[16]=d,e[17]=a,e[18]=C):C=e[18];const _=h.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:d?`No organizations match "${d}"`:"No organizations available"});let N;e[19]!==o||e[20]!==n?(N=k=>s.jsxs("button",{type:"button",onClick:()=>o(k.slug),className:O("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",k.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx($e,{org:k,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:k.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:k.slug})]}),k.slug===n&&s.jsx(Ft,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},k.id),e[19]=o,e[20]=n,e[21]=N):N=e[21];const w=h.map(N);let A;e[22]!==C||e[23]!==_||e[24]!==w?(A=s.jsxs("div",{className:S,children:[C,_,w]}),e[22]=C,e[23]=_,e[24]=w,e[25]=A):A=e[25];let z;return e[26]!==A||e[27]!==y?(z=s.jsxs(s.Fragment,{children:[y,A]}),e[26]=A,e[27]=y,e[28]=z):z=e[28],z}function ns(t){const e=I.c(22),{trigger:n,orgParam:o,align:i,side:r}=t,l=i===void 0?"start":i,a=r===void 0?"bottom":r,m=ne(),[c,d]=M.useState(!1),[u,f]=M.useState(!1);let h;e[0]!==n?(h=s.jsx(fe,{asChild:!0,children:n}),e[0]=n,e[1]=h):h=e[1];const x=String(c);let g;e[2]!==m?(g=C=>{d(!1),m({to:"/$org",params:{org:C}})},e[2]=m,e[3]=g):g=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{d(!1),f(!0)},e[4]=p):p=e[4];let b;e[5]!==o||e[6]!==x||e[7]!==g?(b=s.jsx(Fi,{orgParam:o,onSelectOrg:g,onCreateOrg:p},x),e[5]=o,e[6]=x,e[7]=g,e[8]=b):b=e[8];let j;e[9]!==l||e[10]!==a||e[11]!==b?(j=s.jsx(ke,{side:a,align:l,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:Li,onCloseAutoFocus:Ri,children:b}),e[9]=l,e[10]=a,e[11]=b,e[12]=j):j=e[12];let v;e[13]!==c||e[14]!==h||e[15]!==j?(v=s.jsxs(Ie,{open:c,onOpenChange:d,children:[h,j]}),e[13]=c,e[14]=h,e[15]=j,e[16]=v):v=e[16];let y;e[17]!==u?(y=s.jsx(Oi,{open:u,onOpenChange:f}),e[17]=u,e[18]=y):y=e[18];let S;return e[19]!==y||e[20]!==v?(S=s.jsxs(s.Fragment,{children:[v,y]}),e[19]=y,e[20]=v,e[21]=S):S=e[21],S}function Ri(t){return t.preventDefault()}function Li(t){t.preventDefault(),t.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function Hi(t){const e=I.c(21),{value:n,onChange:o,placeholder:i,onKeyDown:r,className:l,isSearching:a,disabled:m}=t,c=i===void 0?"Search...":i;let d;e[0]!==l?(d=O("shrink-0 w-full border-b border-border h-12",l),e[0]=l,e[1]=d):d=e[1];const u=m?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==u?(f=O("flex items-center gap-2.5 h-12 px-4",u),e[2]=u,e[3]=f):f=e[3];let h;e[4]!==a?(h=a?s.jsx(wt,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(Rt,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=h):h=e[5];let x;e[6]!==o?(x=j=>o(j.target.value),e[6]=o,e[7]=x):x=e[7];let g;e[8]!==m||e[9]!==r||e[10]!==c||e[11]!==x||e[12]!==n?(g=s.jsx("input",{type:"text",value:n,onChange:x,onKeyDown:r,placeholder:c,disabled:m,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=m,e[9]=r,e[10]=c,e[11]=x,e[12]=n,e[13]=g):g=e[13];let p;e[14]!==f||e[15]!==h||e[16]!==g?(p=s.jsxs("label",{className:f,children:[h,g]}),e[14]=f,e[15]=h,e[16]=g,e[17]=p):p=e[17];let b;return e[18]!==d||e[19]!==p?(b=s.jsx("div",{className:d,children:p}),e[18]=d,e[19]=p,e[20]=b):b=e[20],b}const Bi="Select an existing agent";function Ui(t){const e=I.c(5),{children:n}=t;let o;e[0]!==n?(o=s.jsx(le,{asChild:!0,children:n}),e[0]=n,e[1]=o):o=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ae,{side:"right",sideOffset:8,children:Bi}),e[2]=i):i=e[2];let r;return e[3]!==o?(r=s.jsxs(ce,{defaultOpen:!0,delayDuration:0,children:[o,i]}),e[3]=o,e[4]=r):r=e[4],r}function Gi(t){const e=ne(),{create:n}=Ut(),{locator:o}=X(),i=Ve({strict:!1}),r=we({strict:!1});return async l=>{const a=crypto.randomUUID(),m=l===r.virtualmcpid?Mn(t,o,i.taskId??""):null;try{await n({id:a,virtual_mcp_id:l,...m?{branch:m}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:l}})}}function Pe(t){const e=I.c(20),{agent:n,selected:o,onClick:i}=t,r=o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let l;e[0]!==r?(l=O("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]=l):l=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(de,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let m;e[5]!==n.title?(m=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=m):m=e[6];let c;e[7]!==n.description?(c=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[7]=n.description,e[8]=c):c=e[8];let d;e[9]!==m||e[10]!==c?(d=s.jsxs("div",{className:"flex-1 min-w-0",children:[m,c]}),e[9]=m,e[10]=c,e[11]=d):d=e[11];let u;e[12]!==o?(u=o&&s.jsx(Ft,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=o,e[13]=u):u=e[13];let f;return e[14]!==i||e[15]!==l||e[16]!==a||e[17]!==d||e[18]!==u?(f=s.jsxs("button",{type:"button",onClick:i,className:l,children:[a,d,u]}),e[14]=i,e[15]=l,e[16]=a,e[17]=d,e[18]=u,e[19]=f):f=e[19],f}function at(t){const e=I.c(5),{children:n,action:o}=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]!==o||e[3]!==i?(r=s.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[i,o]}),e[2]=o,e[3]=i,e[4]=r):r=e[4],r}function Wi(t){const e=I.c(27),{onClose:n,onSelectAgent:o,selectedAgentId:i,onImportFromGithub:r}=t,[l,a]=M.useState(""),m=Dt(),c=m??[],{org:d}=X(),{data:u}=te.useSession(),f=u?.user?.id??"anon",h=Dn(m),x=Fn(),g=Gi(d.slug),p=Ln(m),b=l.toLowerCase(),j=c.filter(Yi).filter(V=>!p.has(V.id)).filter(Ki).filter(V=>!l||V.title.toLowerCase().includes(b)),v=j.filter(qi),y=j.filter(Vi),S=_e(d.id),C=!l||S.title.toLowerCase().includes(b),_=!!(o&&C);let N;e[0]!==n||e[1]!==o?(N=()=>{o?.(null),n(),a("")},e[0]=n,e[1]=o,e[2]=N):N=e[2];const w=N,A=V=>{if(o){o(V.id),n(),a("");return}Rn({orgId:d.id,userId:f},V.id,h),x(),n(),a(""),g(V.id)},z="flex flex-col max-h-[min(640px,80dvh)]";let k;e[3]!==l?(k=s.jsx(Hi,{value:l,onChange:a,placeholder:"Search agents..."}),e[3]=l,e[4]=k):k=e[4];const $="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",D=o&&C&&S&&s.jsx(Pe,{agent:S,selected:!i||i===S.id,onClick:w}),R=y.length>0&&s.jsx(at,{children:"Agents"}),B=y.map(V=>s.jsx(Pe,{agent:V,selected:o?i===V.id:void 0,onClick:()=>A(V)},V.id)),L=(v.length>0||!l)&&s.jsx(at,{action:s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[s.jsx($n,{className:"size-3.5"}),"Import"]}),children:"Code Agents"}),P=v.map(V=>s.jsx(Pe,{agent:V,selected:o?i===V.id:void 0,onClick:()=>A(V)},V.id));let E;e[5]!==_||e[6]!==l||e[7]!==j.length?(E=j.length===0&&!_&&l&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:"No agents found"}),e[5]=_,e[6]=l,e[7]=j.length,e[8]=E):E=e[8];let F;e[9]!==E||e[10]!==D||e[11]!==R||e[12]!==B||e[13]!==L||e[14]!==P?(F=s.jsxs("div",{className:$,children:[D,R,B,L,P,E]}),e[9]=E,e[10]=D,e[11]=R,e[12]=B,e[13]=L,e[14]=P,e[15]=F):F=e[15];let U;e[16]!==d.slug?(U={org:d.slug},e[16]=d.slug,e[17]=U):U=e[17];let G;e[18]!==n?(G=()=>n(),e[18]=n,e[19]=G):G=e[19];let W;e[20]!==U||e[21]!==G?(W=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Cs,{to:"/$org/settings/agents",params:U,onClick:G,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[20]=U,e[21]=G,e[22]=W):W=e[22];let Y;return e[23]!==F||e[24]!==W||e[25]!==k?(Y=s.jsxs("div",{className:z,children:[k,F,W]}),e[23]=F,e[24]=W,e[25]=k,e[26]=Y):Y=e[26],Y}function Vi(t){return!Wt(t.metadata)}function qi(t){return Wt(t.metadata)}function Ki(t){return!sn(t.id)}function Yi(t){return!tn(t.id)}function Xi(t){const e=I.c(31);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:o,trigger:i,onSelectAgent:r,selectedAgentId:l,side:a,align:m}=n,c=o===void 0?!1:o,d=a===void 0?"right":a,u=m===void 0?"start":m,[f,h]=M.useState(!1),[x,g]=M.useState(!1),p=Ye(),{setOpenMobile:b}=re(),j=Pn(),v=j?"border border-border":void 0;let y;e[2]!==j?(y=R=>j?s.jsx(Ui,{children:R}):R,e[2]=j,e[3]=y):y=e[3];const S=y;let C;e[4]!==p||e[5]!==b?(C=()=>{h(!1),p&&b(!1)},e[4]=p,e[5]=b,e[6]=C):C=e[6];const _=C;let N;e[7]!==_?(N=()=>{_(),g(!0)},e[7]=_,e[8]=N):N=e[8];const w=N;let A;e[9]!==_||e[10]!==w||e[11]!==r||e[12]!==f||e[13]!==l?(A=f&&s.jsx(M.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(Wi,{onClose:_,onSelectAgent:r,selectedAgentId:l,onImportFromGithub:w})}),e[9]=_,e[10]=w,e[11]=r,e[12]=f,e[13]=l,e[14]=A):A=e[14];const z=A;let k;e[15]!==u||e[16]!==c||e[17]!==v||e[18]!==j||e[19]!==p||e[20]!==f||e[21]!==z||e[22]!==d||e[23]!==i||e[24]!==S?(k=p?s.jsxs(s.Fragment,{children:[i?s.jsx("button",{type:"button",onClick:()=>h(!0),className:"contents",children:i}):c?S(s.jsx(me,{"aria-label":"Browse agents",className:O(v),onClick:()=>{J("agent_browser_opened",{surface:"mobile_drawer"}),h(!0)},children:s.jsx(xe,{className:"size-4"})})):s.jsx(H,{children:S(s.jsxs(K,{tooltip:j?void 0:"Browse agents",className:O(v),onClick:()=>{J("agent_browser_opened",{surface:"mobile_drawer"}),h(!0)},children:[s.jsx(xe,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(Lt,{open:f,onOpenChange:h,direction:"bottom",children:s.jsxs(Ht,{className:"max-h-[85dvh] p-0",children:[s.jsx(Bt,{className:"sr-only",children:"Browse agents"}),z]})})]}):s.jsxs(Ie,{open:f,onOpenChange:R=>{R&&!f&&J("agent_browser_opened",{surface:"desktop_popover"}),h(R)},children:[i?s.jsx(fe,{asChild:!0,children:i}):c?S(s.jsx(fe,{asChild:!0,children:s.jsx(me,{"aria-label":"Browse agents",className:O(v),children:s.jsx(xe,{className:"size-4"})})})):s.jsx(H,{children:S(s.jsx(fe,{asChild:!0,children:s.jsxs(K,{tooltip:j?void 0:"Browse agents",className:O(v),children:[s.jsx(xe,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(ke,{className:"w-[380px] p-0 overflow-hidden",side:d,align:u,children:z})]}),e[15]=u,e[16]=c,e[17]=v,e[18]=j,e[19]=p,e[20]=f,e[21]=z,e[22]=d,e[23]=i,e[24]=S,e[25]=k):k=e[25];let $;e[26]!==x?($=s.jsx(zn,{open:x,onOpenChange:g,mode:"agent"}),e[26]=x,e[27]=$):$=e[27];let D;return e[28]!==$||e[29]!==k?(D=s.jsxs(s.Fragment,{children:[k,$]}),e[28]=$,e[29]=k,e[30]=D):D=e[30],D}const Qi="wco-no-drag inline-flex items-center gap-1.5 min-w-0 rounded-md pl-1 pr-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Ji(t){const e=I.c(19),{agentId:n,fallback:o,onOpenHome:i,onPick:r}=t,l=Qe(n)??o??null,a=l?.title??"Super Agent",m=`Open ${a} home`,c=l?.icon??null;let d;e[0]!==c||e[1]!==a?(d=s.jsx(de,{icon:c,name:a,size:"xs"}),e[0]=c,e[1]=a,e[2]=d):d=e[2];let u;e[3]!==i||e[4]!==m||e[5]!==d?(u=s.jsx("button",{type:"button",onClick:i,"aria-label":m,className:"wco-no-drag flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:d}),e[3]=i,e[4]=m,e[5]=d,e[6]=u):u=e[6];let f;e[7]!==a?(f=s.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:a}),e[7]=a,e[8]=f):f=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Xe,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[9]=h):h=e[9];let x;e[10]!==f?(x=s.jsxs("button",{type:"button",className:Qi,children:[f,h]}),e[10]=f,e[11]=x):x=e[11];let g;e[12]!==n||e[13]!==r||e[14]!==x?(g=s.jsx(Xi,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:r,trigger:x}),e[12]=n,e[13]=r,e[14]=x,e[15]=g):g=e[15];let p;return e[16]!==u||e[17]!==g?(p=s.jsxs("div",{className:"flex min-w-0 items-center gap-0",children:[u,g]}),e[16]=u,e[17]=g,e[18]=p):p=e[18],p}function Ue(t){const e=I.c(26);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{showName:o}=n,{org:i}=X(),{state:r,isMobile:l}=re(),a=ss().invitations.length>0,m=r==="collapsed"||l,c=a?`${i.name} — switch organization (pending invitation)`:`${i.name} — switch organization`;let d;e[2]!==i?(d=s.jsx($e,{org:i,size:"sm"}),e[2]=i,e[3]=d):d=e[3];let u;e[4]!==a||e[5]!==m?(u=a&&s.jsx("span",{className:O("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",m?"-top-1":"top-1/2 -translate-y-1/2")}),e[4]=a,e[5]=m,e[6]=u):u=e[6];let f;e[7]!==d||e[8]!==u?(f=s.jsxs("span",{className:"relative inline-flex",children:[d,u]}),e[7]=d,e[8]=u,e[9]=f):f=e[9];let h;e[10]!==i.name||e[11]!==o?(h=o&&s.jsx("span",{className:"truncate text-sm font-medium text-foreground max-w-[10rem]",children:i.name}),e[10]=i.name,e[11]=o,e[12]=h):h=e[12];let x;e[13]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Xe,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[13]=x):x=e[13];let g;e[14]!==c||e[15]!==f||e[16]!==h?(g=s.jsx(le,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":c,className:"wco-no-drag flex items-center gap-1.5 shrink-0 rounded-lg pl-[5px] pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[f,h,x]})}),e[14]=c,e[15]=f,e[16]=h,e[17]=g):g=e[17];let p;e[18]!==i.slug||e[19]!==g?(p=s.jsx(ns,{orgParam:i.slug,trigger:g}),e[18]=i.slug,e[19]=g,e[20]=p):p=e[20];let b;e[21]!==i.name?(b=s.jsx(ae,{side:"bottom",children:i.name}),e[21]=i.name,e[22]=b):b=e[22];let j;return e[23]!==b||e[24]!==p?(j=s.jsxs(ce,{children:[p,b]}),e[23]=b,e[24]=p,e[25]=j):j=e[25],j}function Te(t){const e=I.c(24);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:o}=n,{org:i}=X(),r=ne();let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},e[2]=l):l=e[2];const a=Ve(l);let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m={strict:!1},e[3]=m):m=e[3];const c=we(m),{threads:d}=Je(),{data:u}=te.useSession(),{setTaskId:f,createNewTask:h}=Ze();let x;e[4]!==i.id?(x=_e(i.id),e[4]=i.id,e[5]=x):x=e[5];const g=x,p=g.id,b=a.taskId?c.virtualmcpid??p:p;let j;e[6]!==h||e[7]!==p||e[8]!==r||e[9]!==o||e[10]!==i.slug||e[11]!==u?.user?.id||e[12]!==f||e[13]!==d?(j=N=>{if(!N||N===p){r({to:"/$org",params:{org:i.slug}}),o?.();return}const w=Gn(d,N,u?.user?.id);w?f(w.id,N):h(N),o?.()},e[6]=h,e[7]=p,e[8]=r,e[9]=o,e[10]=i.slug,e[11]=u?.user?.id,e[12]=f,e[13]=d,e[14]=j):j=e[14];const v=j;let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[15]=y):y=e[15];const S=b===p?g:void 0;let C;e[16]!==b||e[17]!==v?(C=()=>v(b),e[16]=b,e[17]=v,e[18]=C):C=e[18];let _;return e[19]!==b||e[20]!==v||e[21]!==S||e[22]!==C?(_=s.jsx(M.Suspense,{fallback:y,children:s.jsx(Ji,{agentId:b,fallback:S,onOpenHome:C,onPick:v})}),e[19]=b,e[20]=v,e[21]=S,e[22]=C,e[23]=_):_=e[23],_}function ct(t){const e=I.c(18),{item:n,onClose:o}=t,i=n.isActive&&"z-10";let r;e[0]!==i?(r=O(i),e[0]=i,e[1]=r):r=e[1];let l;e[2]!==n||e[3]!==o?(l=()=>{n.onClick?.(),o()},e[2]=n,e[3]=o,e[4]=l):l=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let m;e[7]!==n.label?(m=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=m):m=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==l||e[12]!==a||e[13]!==m?(c=s.jsxs(K,{onClick:l,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,m]}),e[9]=n.isActive,e[10]=n.label,e[11]=l,e[12]=a,e[13]=m,e[14]=c):c=e[14];let d;return e[15]!==r||e[16]!==c?(d=s.jsx(H,{className:r,children:c}),e[15]=r,e[16]=c,e[17]=d):d=e[17],d}function Zi(t){const e=I.c(18),{section:n,onClose:o}=t;switch(n.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(kt,{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 l;if(e[2]!==o||e[3]!==n.group.items){let m;e[5]!==o?(m=c=>s.jsx(ct,{item:c,onClose:o},c.key),e[5]=o,e[6]=m):m=e[6],l=n.group.items.map(m),e[2]=o,e[3]=n.group.items,e[4]=l}else l=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==l?(a=s.jsx(Jt,{label:i,defaultExpanded:r,children:l}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=l,e[10]=a):a=e[10],a}case"items":{let i;if(e[11]!==o||e[12]!==n.items){let l;e[14]!==o?(l=a=>s.jsx(ct,{item:a,onClose:o},a.key),e[14]=o,e[15]=l):l=e[15],i=n.items.map(l),e[11]=o,e[12]=n.items,e[13]=i}else i=e[13];let r;return e[16]!==i?(r=s.jsx(qe,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ke,{children:s.jsx(ee,{className:"gap-1.5",children:i})})}),e[16]=i,e[17]=r):r=e[17],r}case"custom":return n.content}}function eo(t){const e=I.c(24),{sections:n,onClose:o,footer:i,additionalContent:r}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ue,{}),e[0]=l):l=e[0];let a;e[1]!==o?(a=s.jsx(Te,{onNavigate:o}),e[1]=o,e[2]=a):a=e[2];let m;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"flex-1"}),e[3]=m):m=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Et,{size:16}),e[4]=c):c=e[4];let d;e[5]!==o?(d=s.jsx(me,{onClick:o,"aria-label":"Close sidebar",children:c}),e[5]=o,e[6]=d):d=e[6];let u;e[7]!==a||e[8]!==d?(u=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[l,a,m,d]}),e[7]=a,e[8]=d,e[9]=u):u=e[9];let f;if(e[10]!==o||e[11]!==n){let p;e[13]!==o?(p=(b,j)=>s.jsx(Zi,{section:b,onClose:o},j),e[13]=o,e[14]=p):p=e[14],f=n.map(p),e[10]=o,e[11]=n,e[12]=f}else f=e[12];let h;e[15]!==r?(h=r&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:r}),e[15]=r,e[16]=h):h=e[16];let x;e[17]!==f||e[18]!==h?(x=s.jsxs(It,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[f,h]}),e[17]=f,e[18]=h,e[19]=x):x=e[19];let g;return e[20]!==i||e[21]!==u||e[22]!==x?(g=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[u,x,i]}),e[20]=i,e[21]=u,e[22]=x,e[23]=g):g=e[23],g}function ue(t){const e=I.c(26),{item:n,onClose:o}=t;let i;e[0]!==n.className?(i=O("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",n.className),e[0]=n.className,e[1]=i):i=e[1];const r=i;if(n.href){const d=n.external?"_blank":void 0,u=n.external?"noopener noreferrer":void 0;let f;e[2]!==n.icon?(f=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[2]=n.icon,e[3]=f):f=e[3];let h;e[4]!==n.label?(h=s.jsx("span",{className:"flex-1",children:n.label}),e[4]=n.label,e[5]=h):h=e[5];let x;return e[6]!==r||e[7]!==n.href||e[8]!==o||e[9]!==d||e[10]!==u||e[11]!==f||e[12]!==h?(x=s.jsxs("a",{href:n.href,target:d,rel:u,className:r,onClick:o,children:[f,h]}),e[6]=r,e[7]=n.href,e[8]=o,e[9]=d,e[10]=u,e[11]=f,e[12]=h,e[13]=x):x=e[13],x}let l;e[14]!==n||e[15]!==o?(l=()=>{n.onClick?.(),o()},e[14]=n,e[15]=o,e[16]=l):l=e[16];let a;e[17]!==n.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[17]=n.icon,e[18]=a):a=e[18];let m;e[19]!==n.label?(m=s.jsx("span",{className:"flex-1",children:n.label}),e[19]=n.label,e[20]=m):m=e[20];let c;return e[21]!==r||e[22]!==l||e[23]!==a||e[24]!==m?(c=s.jsxs("button",{type:"button",onClick:l,className:r,children:[a,m]}),e[21]=r,e[22]=l,e[23]=a,e[24]=m,e[25]=c):c=e[25],c}function to(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:"Impersonating"}),t[0]=e):e=t[0],e}function dt(t){const e=I.c(30),{user:n,userImage:o,isImpersonating:i,isMobile:r}=t,l=r?"py-4 border-b border-border":"py-3 mx-1 mt-1";let a;e[0]!==l?(a=O("flex items-center gap-3 px-4",l),e[0]=l,e[1]=a):a=e[1];const m=n?.name??"U";let c;e[2]!==m||e[3]!==o?(c=s.jsx(He,{url:o,fallback:m,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=m,e[3]=o,e[4]=c):c=e[4];const d=n?.name??"User";let u;e[5]!==d?(u=s.jsx("p",{className:"text-sm font-medium truncate",children:d}),e[5]=d,e[6]=u):u=e[6];let f;e[7]!==i?(f=i&&s.jsx(to,{}),e[7]=i,e[8]=f):f=e[8];let h;e[9]!==u||e[10]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[u,f]}),e[9]=u,e[10]=f,e[11]=h):h=e[11];const x=n?.email;let g;e[12]!==x?(g=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:x}),e[12]=x,e[13]=g):g=e[13];let p;e[14]!==g||e[15]!==h?(p=s.jsxs("div",{className:"flex-1 min-w-0",children:[h,g]}),e[14]=g,e[15]=h,e[16]=p):p=e[16];let b;e[17]!==n?(b=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(so)},e[17]=n,e[18]=b):b=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Wn,{size:14}),e[19]=j):j=e[19];let v;e[20]!==b?(v=s.jsx(le,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:b,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:j})}),e[20]=b,e[21]=v):v=e[21];let y;e[22]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ae,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[22]=y):y=e[22];let S;e[23]!==v?(S=s.jsx(Pt,{delayDuration:300,children:s.jsxs(ce,{children:[v,y]})}),e[23]=v,e[24]=S):S=e[24];let C;return e[25]!==p||e[26]!==S||e[27]!==a||e[28]!==c?(C=s.jsxs("div",{className:a,children:[c,p,S]}),e[25]=p,e[26]=S,e[27]=a,e[28]=c,e[29]=C):C=e[29],C}function so(){oe.success("User ID copied")}function mt(t){const e=I.c(32),{themeOptions:n,preferences:o,setPreferences:i,isMobile:r}=t,l=r?"size-8":"size-7",a=r?"px-3 py-3":"px-2 py-1.5";let m;e[0]!==a?(m=O("flex items-center justify-between border-t border-border/50",a),e[0]=a,e[1]=m):m=e[1];let c;if(e[2]!==l||e[3]!==o.theme||e[4]!==i||e[5]!==n){let y;e[7]!==l||e[8]!==o.theme||e[9]!==i?(y=S=>{const{value:C,icon:_,label:N}=S;return s.jsx("button",{type:"button","aria-label":N,onClick:()=>i(w=>({...w,theme:C})),className:O(l,"rounded-md flex items-center justify-center transition-colors",o.theme===C?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:_},C)},e[7]=l,e[8]=o.theme,e[9]=i,e[10]=y):y=e[10],c=n.map(y),e[2]=l,e[3]=o.theme,e[4]=i,e[5]=n,e[6]=c}else c=e[6];let d;e[11]!==c?(d=s.jsx("div",{className:"flex items-center gap-0.5",children:c}),e[11]=c,e[12]=d):d=e[12];const u=o.enableSounds?"Disable sounds":"Enable sounds";let f;e[13]!==i?(f=()=>i(no),e[13]=i,e[14]=f):f=e[14];const h=o.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let x;e[15]!==l||e[16]!==h?(x=O(l,"rounded-md flex items-center justify-center transition-colors",h),e[15]=l,e[16]=h,e[17]=x):x=e[17];let g;e[18]!==o.enableSounds?(g=o.enableSounds?s.jsx(on,{size:14}):s.jsx(rn,{size:14}),e[18]=o.enableSounds,e[19]=g):g=e[19];let p;e[20]!==u||e[21]!==f||e[22]!==x||e[23]!==g?(p=s.jsx("button",{type:"button","aria-label":u,onClick:f,className:x,children:g}),e[20]=u,e[21]=f,e[22]=x,e[23]=g,e[24]=p):p=e[24];let b;e[25]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.77.3"]}),e[25]=b):b=e[25];let j;e[26]!==p?(j=s.jsxs("div",{className:"flex items-center gap-2",children:[p,b]}),e[26]=p,e[27]=j):j=e[27];let v;return e[28]!==j||e[29]!==m||e[30]!==d?(v=s.jsxs("div",{className:m,children:[d,j]}),e[28]=j,e[29]=m,e[30]=d,e[31]=v):v=e[31],v}function no(t){return{...t,enableSounds:!t.enableSounds}}function ut(t){const e=I.c(54),{user:n,userImage:o,menuItems:i,signOutItem:r,stopImpersonatingItem:l,isImpersonating:a,themeOptions:m,preferences:c,setPreferences:d,close:u,isMobile:f}=t;if(f){let y;e[0]!==a||e[1]!==n||e[2]!==o?(y=s.jsx(dt,{user:n,userImage:o,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=n,e[2]=o,e[3]=y):y=e[3];let S;if(e[4]!==u||e[5]!==i){let z;e[7]!==u?(z=k=>s.jsx(ue,{item:k,onClose:u},k.key),e[7]=u,e[8]=z):z=e[8],S=i.map(z),e[4]=u,e[5]=i,e[6]=S}else S=e[6];let C;e[9]!==u||e[10]!==l?(C=l&&s.jsx(ue,{item:l,onClose:u}),e[9]=u,e[10]=l,e[11]=C):C=e[11];let _;e[12]!==u||e[13]!==r?(_=s.jsx(ue,{item:r,onClose:u}),e[12]=u,e[13]=r,e[14]=_):_=e[14];let N;e[15]!==S||e[16]!==C||e[17]!==_?(N=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[S,C,_]})}),e[15]=S,e[16]=C,e[17]=_,e[18]=N):N=e[18];let w;e[19]!==c||e[20]!==d||e[21]!==m?(w=s.jsx(mt,{themeOptions:m,preferences:c,setPreferences:d,isMobile:!0}),e[19]=c,e[20]=d,e[21]=m,e[22]=w):w=e[22];let A;return e[23]!==y||e[24]!==N||e[25]!==w?(A=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y,N,w]}),e[23]=y,e[24]=N,e[25]=w,e[26]=A):A=e[26],A}let h;e[27]!==a||e[28]!==n||e[29]!==o?(h=s.jsx(dt,{user:n,userImage:o,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=n,e[29]=o,e[30]=h):h=e[30];let x;if(e[31]!==u||e[32]!==i){let y;e[34]!==u?(y=S=>s.jsx(ue,{item:S,onClose:u},S.key),e[34]=u,e[35]=y):y=e[35],x=i.map(y),e[31]=u,e[32]=i,e[33]=x}else x=e[33];let g;e[36]!==u||e[37]!==l?(g=l&&s.jsx(ue,{item:l,onClose:u}),e[36]=u,e[37]=l,e[38]=g):g=e[38];let p;e[39]!==u||e[40]!==r?(p=s.jsx(ue,{item:r,onClose:u}),e[39]=u,e[40]=r,e[41]=p):p=e[41];let b;e[42]!==x||e[43]!==g||e[44]!==p?(b=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,g,p]}),e[42]=x,e[43]=g,e[44]=p,e[45]=b):b=e[45];let j;e[46]!==c||e[47]!==d||e[48]!==m?(j=s.jsx(mt,{themeOptions:m,preferences:c,setPreferences:d,isMobile:!1}),e[46]=c,e[47]=d,e[48]=m,e[49]=j):j=e[49];let v;return e[50]!==h||e[51]!==b||e[52]!==j?(v=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[h,b,j]})}),e[50]=h,e[51]=b,e[52]=j,e[53]=v):v=e[53],v}function ge(){const t=I.c(43),{data:e}=te.useSession(),{org:n}=X(),o=ne();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const l=ws(i)?.params.org,[a,m]=ks(),c=Ye(),{isAdmin:d}=ei(),[u,f]=M.useState(!1),h=e?.user,x=h?.image,g=!!e?.session?.impersonatedBy;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=()=>f(!1),t[1]=p):p=t[1];const b=p;let j;t[2]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Ae,{size:16}),t[2]=j):j=t[2];let v;t[3]!==o||t[4]!==l?(v={key:"preferences",label:"Preferences",icon:j,onClick:()=>{o({to:"/$org/settings/profile",params:{org:l??""}})}},t[3]=o,t[4]=l,t[5]=v):v=t[5];let y;t[6]!==n||t[7]!==o?(y=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(Vn,{size:16}),onClick:()=>{o({to:"/$org/install",params:{org:n.slug}})}}]:[],t[6]=n,t[7]=o,t[8]=y):y=t[8];let S;t[9]===Symbol.for("react.memo_cache_sentinel")?(S={key:"terms",label:"Terms of Use",icon:s.jsx(Kn,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[9]=S):S=t[9];let C;t[10]===Symbol.for("react.memo_cache_sentinel")?(C={key:"privacy",label:"Privacy Policy",icon:s.jsx(Jn,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[10]=C):C=t[10];let _;t[11]===Symbol.for("react.memo_cache_sentinel")?(_={key:"github",label:"decocms/studio",icon:s.jsx(Is,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[11]=_):_=t[11];let N;t[12]===Symbol.for("react.memo_cache_sentinel")?(N={key:"community",label:"Community",icon:s.jsx(Zn,{size:16}),href:"https://decocms.com/discord",external:!0},t[12]=N):N=t[12];let w;t[13]===Symbol.for("react.memo_cache_sentinel")?(w={key:"homepage",label:"Homepage",icon:s.jsx(qn,{size:16}),href:"https://decocms.com",external:!0},t[13]=w):w=t[13];let A;t[14]!==d||t[15]!==o?(A=d?[{key:"admin-dashboard",label:"Admin Dashboard",icon:s.jsx(nn,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[14]=d,t[15]=o,t[16]=A):A=t[16];let z;t[17]!==A||t[18]!==v||t[19]!==y?(z=[v,...y,S,C,_,N,w,...A],t[17]=A,t[18]=v,t[19]=y,t[20]=z):z=t[20];const k=z;let $;t[21]===Symbol.for("react.memo_cache_sentinel")?($={key:"logout",label:"Sign out",icon:s.jsx(rt,{size:16}),onClick:ro},t[21]=$):$=t[21];const D=$;let R;t[22]!==g?(R=g?{key:"stop-impersonating",label:"Stop impersonation",icon:s.jsx(rt,{size:16}),onClick:oo,className:"text-warning"}:null,t[22]=g,t[23]=R):R=t[23];const B=R;let L;t[24]===Symbol.for("react.memo_cache_sentinel")?(L={value:"light",icon:s.jsx(Xn,{size:14}),label:"Light theme"},t[24]=L):L=t[24];let P;t[25]===Symbol.for("react.memo_cache_sentinel")?(P={value:"dark",icon:s.jsx(Qn,{size:14}),label:"Dark theme"},t[25]=P):P=t[25];let E;t[26]===Symbol.for("react.memo_cache_sentinel")?(E=[L,P,{value:"system",icon:s.jsx(Be,{size:14}),label:"System theme"}],t[26]=E):E=t[26];const F=E;let U;t[27]!==g||t[28]!==c||t[29]!==k||t[30]!==a||t[31]!==m||t[32]!==B||t[33]!==h||t[34]!==x?(U={user:h,userImage:x,menuItems:k,signOutItem:D,stopImpersonatingItem:B,isImpersonating:g,themeOptions:F,preferences:a,setPreferences:m,close:b,isMobile:c},t[27]=g,t[28]=c,t[29]=k,t[30]=a,t[31]=m,t[32]=B,t[33]=h,t[34]=x,t[35]=U):U=t[35];const G=U;let W;return t[36]!==g||t[37]!==c||t[38]!==u||t[39]!==G||t[40]!==h?.name||t[41]!==x?(W=s.jsx(s.Fragment,{children:c?s.jsxs(Lt,{open:u,onOpenChange:f,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>f(!0),className:O("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",g&&"border-2 border-dashed border-warning"),children:[s.jsx(He,{url:x,fallback:h?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:h?.name??"Account"})]}),s.jsxs(Ht,{className:"h-[80dvh] p-0",children:[s.jsx(Bt,{className:"sr-only",children:"Account"}),s.jsx(ut,{...G})]})]}):s.jsxs(Ie,{open:u,onOpenChange:f,children:[s.jsx(fe,{asChild:!0,children:s.jsxs(K,{tooltip:h?.name??"Account",className:O("rounded-md",g&&"border-2 border-dashed border-warning"),children:[s.jsx(He,{url:x,fallback:h?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:h?.name??"Account"})]})}),s.jsx(ke,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:io,children:s.jsx(ut,{...G})})]})}),t[36]=g,t[37]=c,t[38]=u,t[39]=G,t[40]=h?.name,t[41]=x,t[42]=W):W=t[42],W}function io(t){return t.preventDefault()}async function oo(){const{error:t}=await te.admin.stopImpersonating();if(t){oe.error(t.message||"Failed to stop impersonation");return}window.location.href="/"}function ro(){J("signed_out",{source:"account_popover"}),As(),te.signOut()}function be(t){const e=I.c(43),{variant:n}=t===void 0?{}:t,o=n===void 0?"icon":n,i=In(),[r,l]=M.useState(!1);let a,m;if(e[0]!==i.capabilities||e[1]!==i.hostname||e[2]!==i.machineId||e[3]!==i.online){const v=ti(i.capabilities);a=i.online?"Desktop linked":"Connect desktop",m=i.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:i.hostname??i.machineId??"Desktop linked"}),s.jsx("span",{className:"text-muted-foreground",children:v.length>0?`Available: ${v.join(", ")}`:"No CLI agents detected"})]}):s.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=i.capabilities,e[1]=i.hostname,e[2]=i.machineId,e[3]=i.online,e[4]=a,e[5]=m}else a=e[4],m=e[5];const c=m;if(o==="full"){let v,y;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=()=>l(!0),y=s.jsx(Be,{}),e[6]=v,e[7]=y):(v=e[6],y=e[7]);let S;e[8]!==a?(S=s.jsx("span",{children:a}),e[8]=a,e[9]=S):S=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 _;e[12]!==a||e[13]!==S||e[14]!==C?(_=s.jsx(le,{asChild:!0,children:s.jsxs(K,{tooltip:a,onClick:v,children:[y,S,C]})}),e[12]=a,e[13]=S,e[14]=C,e[15]=_):_=e[15];let N;e[16]!==c?(N=s.jsx(ae,{side:"right",children:c}),e[16]=c,e[17]=N):N=e[17];let w;e[18]!==_||e[19]!==N?(w=s.jsxs(ce,{children:[_,N]}),e[18]=_,e[19]=N,e[20]=w):w=e[20];let A;e[21]!==r?(A=s.jsx(lt,{open:r,onOpenChange:l}),e[21]=r,e[22]=A):A=e[22];let z;return e[23]!==A||e[24]!==w?(z=s.jsxs(s.Fragment,{children:[w,A]}),e[23]=A,e[24]=w,e[25]=z):z=e[25],z}let d;e[26]===Symbol.for("react.memo_cache_sentinel")?(d=()=>l(!0),e[26]=d):d=e[26];const u=i.online?"Desktop linked":"Connect your desktop";let f;e[27]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Be,{size:16}),e[27]=f):f=e[27];let h;e[28]!==i.online?(h=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]=h):h=e[29];let x;e[30]!==u||e[31]!==h?(x=s.jsx(le,{asChild:!0,children:s.jsxs(me,{onClick:d,"aria-label":u,children:[f,h]})}),e[30]=u,e[31]=h,e[32]=x):x=e[32];let g;e[33]!==c?(g=s.jsx(ae,{side:"bottom",children:c}),e[33]=c,e[34]=g):g=e[34];let p;e[35]!==x||e[36]!==g?(p=s.jsxs(ce,{children:[x,g]}),e[35]=x,e[36]=g,e[37]=p):p=e[37];let b;e[38]!==r?(b=s.jsx(lt,{open:r,onOpenChange:l}),e[38]=r,e[39]=b):b=e[39];let j;return e[40]!==b||e[41]!==p?(j=s.jsxs(s.Fragment,{children:[p,b]}),e[40]=b,e[41]=p,e[42]=j):j=e[42],j}class lo extends M.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 ao(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function co(){const t=I.c(17),e=ne(),{org:n}=X(),{hasDecoKey:o,balanceDollars:i}=Hn();if(!o)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 l;t[2]!==i?(l=O(i!=null&&ao(i)),t[2]=i,t[3]=l):l=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let m;t[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ln,{}),t[7]=m):m=t[7];let c;t[8]!==i?(c=i!=null?`$${i.toFixed(2)}`:"Credits",t[8]=i,t[9]=c):c=t[9];let d;t[10]!==c?(d=s.jsx("span",{children:c}),t[10]=c,t[11]=d):d=t[11];let u;return t[12]!==r||t[13]!==l||t[14]!==a||t[15]!==d?(u=s.jsx(ee,{children:s.jsx(H,{children:s.jsxs(K,{tooltip:r,className:l,onClick:a,children:[m,d]})})}),t[12]=r,t[13]=l,t[14]=a,t[15]=d,t[16]=u):u=t[16],u}function ft(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(lo,{children:s.jsx(M.Suspense,{fallback:null,children:s.jsx(co,{})})}),t[0]=e):e=t[0],e}function De(){const t=I.c(7),e=ne(),{org:n}=X();let o;t[0]!==e||t[1]!==n.slug?(o=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=o):o=t[2];let i,r;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ae,{}),r=s.jsx("span",{children:"Settings"}),t[3]=i,t[4]=r):(i=t[3],r=t[4]);let l;return t[5]!==o?(l=s.jsxs(K,{tooltip:"Settings",onClick:o,children:[i,r]}),t[5]=o,t[6]=l):l=t[6],l}function mo(){const t=I.c(6),e=ne(),{org:n}=X();let o;t[0]!==e||t[1]!==n.slug?(o=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=o):o=t[2];let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ae,{size:15}),t[3]=i):i=t[3];let r;return t[4]!==o?(r=s.jsx("button",{type:"button","aria-label":"Settings",onClick:o,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:i}),t[4]=o,t[5]=r):r=t[5],r}function ht(){const t=I.c(4),[e,n]=M.useState(!1);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(H,{children:s.jsx(qt,{trigger:s.jsxs(K,{tooltip:"Invite members",children:[s.jsx(Vt,{}),s.jsx("span",{children:"Invite members"})]})})}),t[0]=o):o=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(ee,{className:"gap-0.5",children:[o,s.jsx(H,{children:s.jsxs(K,{tooltip:"Add connection",onClick:()=>n(!0),children:[s.jsx(Yn,{}),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(Bn,{open:e,onOpenChange:n,mode:"browse"})]}),t[2]=e,t[3]=r):r=t[3],r}function xt(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ee,{className:"gap-0.5",children:s.jsx(H,{children:s.jsx(qt,{trigger:s.jsxs(K,{tooltip:"Invite members",children:[s.jsx(Vt,{}),s.jsx("span",{children:"Invite members"})]})})})}),t[0]=e):e=t[0],e}function uo(){const t=I.c(17),{state:e}=re(),n=e==="collapsed";if(ze()){if(n){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(xt,{}),t[0]=f):f=t[0];let h;t[1]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(H,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(be,{})})}),t[1]=h):h=t[1];let x;t[2]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(H,{children:s.jsx(De,{})}),t[2]=x):x=t[2];let g;return t[3]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs(he,{className:"px-2 pb-3 gap-1",children:[f,s.jsxs(ee,{children:[h,x,s.jsx(H,{children:s.jsx(ge,{})})]})]}),t[3]=g):g=t[3],g}let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(xt,{}),t[4]=c):c=t[4];let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(H,{children:s.jsx(be,{variant:"full"})}),t[5]=d):d=t[5];let u;return t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs(he,{className:"px-2 pb-3 gap-0.5",children:[c,s.jsxs(ee,{className:"gap-0.5",children:[d,s.jsx(H,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(ge,{})}),s.jsx(mo,{})]})})]})]}),t[6]=u):u=t[6],u}if(n){let c,d;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ht,{}),d=s.jsx(ft,{}),t[7]=c,t[8]=d):(c=t[7],d=t[8]);let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(H,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(be,{})})}),t[9]=u):u=t[9];let f;t[10]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(H,{children:s.jsx(De,{})}),t[10]=f):f=t[10];let h;return t[11]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsxs(he,{className:"px-2 pb-3 gap-1",children:[c,d,s.jsxs(ee,{children:[u,f,s.jsx(H,{children:s.jsx(ge,{})})]})]}),t[11]=h):h=t[11],h}let i,r;t[12]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ht,{}),r=s.jsx(ft,{}),t[12]=i,t[13]=r):(i=t[12],r=t[13]);let l;t[14]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(H,{children:s.jsx(be,{variant:"full"})}),t[14]=l):l=t[14];let a;t[15]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(H,{children:s.jsx(De,{})}),t[15]=a):a=t[15];let m;return t[16]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsxs(he,{className:"px-2 pb-3 gap-0.5",children:[i,r,s.jsxs(ee,{className:"gap-0.5",children:[l,a,s.jsx(H,{children:s.jsx(ge,{})})]})]}),t[16]=m):m=t[16],m}function fo(){const t=I.c(8),e=ne(),{org:n}=X(),{setOpenMobile:o}=re();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(ee,{children:s.jsx(H,{children:s.jsx(ge,{})})})}),t[0]=i):i=t[0];let r;t[1]!==e||t[2]!==n.slug||t[3]!==o?(r=()=>{e({to:"/$org/settings",params:{org:n.slug}}),o(!1)},t[1]=e,t[2]=n.slug,t[3]=o,t[4]=r):r=t[4];let l;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ae,{className:"size-4"}),t[5]=l):l=t[5];let a;return t[6]!==r?(a=s.jsx(he,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[i,s.jsx(me,{"aria-label":"Settings",onClick:r,children:l})]})}),t[6]=r,t[7]=a):a=t[7],a}function pt(t){const e=I.c(15),{className:n,wrapperClassName:o,children:i}=t,[r,l]=M.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=b=>{b&&l(b.scrollHeight>b.clientHeight+1)},e[0]=a):a=e[0];const m=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=b=>{const j=b.currentTarget;l(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const d=c;let u;e[2]!==o?(u=O("relative",o),e[2]=o,e[3]=u):u=e[3];let f;e[4]!==i||e[5]!==n?(f=s.jsx("div",{ref:m,onScroll:d,className:n,children:i}),e[4]=i,e[5]=n,e[6]=f):f=e[6];const h=r?"opacity-100":"opacity-0";let x;e[7]!==h?(x=O("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",h),e[7]=h,e[8]=x):x=e[8];let g;e[9]!==x?(g=s.jsx("div",{"aria-hidden":!0,className:x}),e[9]=x,e[10]=g):g=e[10];let p;return e[11]!==u||e[12]!==f||e[13]!==g?(p=s.jsxs("div",{className:u,children:[f,g]}),e[11]=u,e[12]=f,e[13]=g,e[14]=p):p=e[14],p}function ho(t){const e=I.c(8),{virtualMcpId:n,size:o,showAutomationBadge:i}=t,r=o===void 0?"sm":o;let l;e[0]!==r||e[1]!==n?(l=n?s.jsx(xo,{virtualMcpId:n,size:r}):s.jsx(de,{icon:null,name:"?",size:r}),e[0]=r,e[1]=n,e[2]=l):l=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(Yt,{size:10,className:"text-white"})}),e[3]=i,e[4]=a):a=e[4];let m;return e[5]!==l||e[6]!==a?(m=s.jsxs("div",{className:"relative shrink-0",children:[l,a]}),e[5]=l,e[6]=a,e[7]=m):m=e[7],m}function xo(t){const e=I.c(6),{virtualMcpId:n,size:o}=t,i=Qe(n);if(!i){let a;return e[0]!==o?(a=s.jsx(de,{icon:null,name:"?",size:o}),e[0]=o,e[1]=a):a=e[1],a}const r=i.icon??null;let l;return e[2]!==i.title||e[3]!==o||e[4]!==r?(l=s.jsx(de,{icon:r,name:i.title,size:o}),e[2]=i.title,e[3]=o,e[4]=r,e[5]=l):l=e[5],l}function gt(t){const e=I.c(36),{open:n,onOpenChange:o}=t,[i,r]=M.useState(""),{org:l}=X(),{setTaskId:a}=Ze(),m=Kt();let c,d,u;e[0]!==l.id||e[1]!==i?(u=i.trim(),d=zs,c=Ct.globalSearch(l.id,u),e[0]=l.id,e[1]=i,e[2]=c,e[3]=d,e[4]=u):(c=e[2],d=e[3],u=e[4]);const f=n&&u.length>0;let h;e[5]!==m||e[6]!==u?(h=async()=>await m.call("GLOBAL_SEARCH",{query:u,limit:20}),e[5]=m,e[6]=u,e[7]=h):h=e[7];let x;e[8]!==c||e[9]!==f||e[10]!==h?(x={queryKey:c,enabled:f,queryFn:h,staleTime:1e4},e[8]=c,e[9]=f,e[10]=h,e[11]=x):x=e[11];const{data:g,isFetching:p}=d(x);let b;e[12]!==g?.items?(b=g?.items??[],e[12]=g?.items,e[13]=b):b=e[13];const j=b;let v;e[14]!==o?(v=$=>{$||r(""),o($)},e[14]=o,e[15]=v):v=e[15];const y=v;let S;e[16]!==y||e[17]!==a?(S=$=>{y(!1),a($.id,$.virtual_mcp_id??void 0)},e[16]=y,e[17]=a,e[18]=S):S=e[18];const C=S;let _;e[19]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsxs(Ys,{className:"sr-only",children:[s.jsx(At,{children:"Search"}),s.jsx(Xs,{children:"Search across your organization's resources."})]}),e[19]=_):_=e[19];let N;e[20]!==i?(N=s.jsx(li,{value:i,onValueChange:r,placeholder:"Search..."}),e[20]=i,e[21]=N):N=e[21];let w;e[22]!==C||e[23]!==p||e[24]!==j||e[25]!==u?(w=u?p&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):j.length===0?s.jsx(oi,{children:"No results."}):j.map($=>$.type==="thread"?s.jsxs(ri,{value:`thread:${$.id}:${$.title}`,onSelect:()=>C($),className:"gap-2.5",children:[s.jsx(ho,{virtualMcpId:$.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:$.title||"Untitled chat"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date($.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${$.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=C,e[23]=p,e[24]=j,e[25]=u,e[26]=w):w=e[26];let A;e[27]!==w?(A=s.jsx(ai,{children:w}),e[27]=w,e[28]=A):A=e[28];let z;e[29]!==N||e[30]!==A?(z=s.jsxs(Qs,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[_,s.jsxs(ci,{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:[N,A]})]}),e[29]=N,e[30]=A,e[31]=z):z=e[31];let k;return e[32]!==y||e[33]!==n||e[34]!==z?(k=s.jsx(zt,{open:n,onOpenChange:y,children:z}),e[32]=y,e[33]=n,e[34]=z,e[35]=k):k=e[35],k}function po(t){return t==="ephemeral"||t.startsWith("thread:")}function is(t){const e=I.c(40),{task:n,isActive:o,onClick:i,onArchive:r,showAutomationBadge:l,showAgentIcon:a,hideStatusIdle:m,indented:c}=t,d=ui(n.status),u=d.icon,f=n.metadata?.kind==="tool_call_run",h=Qe(f?void 0:n.virtual_mcp_id);let x;e[0]!==h?(x=Un(h),e[0]=h,e[1]=x):x=e[1];const g=x;fi(6e4);const p=l||!!n.trigger_id,b=n.id,j="button",v=0;let y;e[2]!==i?(y=F=>{F.target===F.currentTarget&&(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),i())},e[2]=i,e[3]=y):y=e[3];const S=c?"-ml-4 pl-6":"pl-[7px]",C=o?"bg-accent text-accent-foreground":"hover:bg-accent/60";let _;e[4]!==S||e[5]!==C?(_=O("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",S,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",C),e[4]=S,e[5]=C,e[6]=_):_=e[6];let N;e[7]!==f||e[8]!==a||e[9]!==h?.icon||e[10]!==h?.title?(N=a&&!f&&s.jsx(de,{icon:h?.icon??null,name:h?.title??"?",size:"2xs"}),e[7]=f,e[8]=a,e[9]=h?.icon,e[10]=h?.title,e[11]=N):N=e[11];let w;e[12]!==p?(w=p&&s.jsx(Yt,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[12]=p,e[13]=w):w=e[13];const A=n.title||"Untitled task";let z;e[14]!==A?(z=s.jsx("div",{className:"text-sm text-foreground truncate",children:A}),e[14]=A,e[15]=z):z=e[15];let k;e[16]!==w||e[17]!==z?(k=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[w,z]}),e[16]=w,e[17]=z,e[18]=k):k=e[18];let $;e[19]!==g||e[20]!==o||e[21]!==n.branch||e[22]!==n.updated_at?($=n.updated_at&&s.jsxs("div",{className:O("flex items-center gap-1 text-[11px] min-w-0",o?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!po(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):g?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[g.owner,"/",g.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:xi(new Date(n.updated_at))})]}),e[19]=g,e[20]=o,e[21]=n.branch,e[22]=n.updated_at,e[23]=$):$=e[23];let D;e[24]!==k||e[25]!==$?(D=s.jsxs("div",{className:"flex-1 min-w-0",children:[k,$]}),e[24]=k,e[25]=$,e[26]=D):D=e[26];const R="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",B=!m&&s.jsx("span",{className:O("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",r&&"group-hover/row:opacity-0"),"aria-label":d.label,children:s.jsx(u,{size:14,className:O(d.iconClassName,n.status==="in_progress"&&"animate-spin")})});let L;e[27]!==r?(L=r&&s.jsxs(ce,{children:[s.jsx(le,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":"Archive task",onClick:F=>{F.stopPropagation(),r()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-8 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx($s,{size:14})})}),s.jsx(ae,{side:"right",children:"Archive"})]}),e[27]=r,e[28]=L):L=e[28];let P;e[29]!==B||e[30]!==L?(P=s.jsxs("div",{className:R,children:[B,L]}),e[29]=B,e[30]=L,e[31]=P):P=e[31];let E;return e[32]!==i||e[33]!==D||e[34]!==P||e[35]!==y||e[36]!==_||e[37]!==N||e[38]!==n.id?(E=s.jsxs("div",{"data-task-id":b,role:j,tabIndex:v,onClick:i,onKeyDown:y,className:_,children:[N,D,P]}),e[32]=i,e[33]=D,e[34]=P,e[35]=y,e[36]=_,e[37]=N,e[38]=n.id,e[39]=E):E=e[39],E}const bt=["requires_action","in_progress","failed","expired","completed"];function go(t){const e=new Map(bt.map(n=>[n,[]]));for(const n of t){const o=n.status??"completed";(e.get(o)??e.get("completed")).push(n)}return bt.map(n=>({status:n,threads:e.get(n)}))}const bo="sidebar.group.expanded.";function jo(t,e){const n=I.c(3),[o,i]=Ce(`${bo}${t}`,e);let r;return n[0]!==o||n[1]!==i?(r=[o,i],n[0]=o,n[1]=i,n[2]=r):r=n[2],r}function os(t){const e=I.c(12),{onClick:n,isFetching:o,indented:i}=t,r=i?"-ml-4 pl-6 pr-2":"px-2";let l;e[0]!==r?(l=O("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]=l):l=e[1];let a;e[2]!==o?(a=o&&s.jsx(wt,{size:14,className:"animate-spin"}),e[2]=o,e[3]=a):a=e[3];const m=o?"Loading…":"Show more";let c;e[4]!==m?(c=s.jsx("span",{children:m}),e[4]=m,e[5]=c):c=e[5];let d;return e[6]!==o||e[7]!==n||e[8]!==l||e[9]!==a||e[10]!==c?(d=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:o,className:l,children:[a,c]}),e[6]=o,e[7]=n,e[8]=l,e[9]=a,e[10]=c,e[11]=d):d=e[11],d}function vo(t,e,n,o){return[t,e,n,o.type,o.member,o.currentUserId??""].join("|")}function yo(t){return t.member==="mine"&&!t.currentUserId}const rs=4;let Se=0;const Ge=[];function So(){for(;Se<rs&&Ge.length>0;){const t=Ge.shift();t&&t()}}function ls(t){return new Promise((e,n)=>{const o=()=>{Se++,t().then(e,n).finally(()=>{Se--,So()})};Se<rs?o():Ge.push(o)})}const Oe=10;function jt(t,e,n,o,i){const r={hidden:!1};o.member==="mine"&&o.currentUserId&&(r.created_by=o.currentUserId),o.type==="automation"&&(r.has_trigger=!0),o.type==="manual"&&(r.has_trigger=!1);const l={where:r,limit:i,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return l.status=e,l}function _o(t,e,n,o){let i=0;for(const r of t)as(r,e,n,o)&&i++;return i}function Fe(t,e,n,o){return _o(t,e,n,o)}function No(t,e){return!!(t>=Oe||t===0&&e)}function vt(t,e){return t<e}function Co(t,e){return e===!1?!1:e===!0?!0:t}function as(t,e,n,o){return!(t.hidden||(t.status??"completed")!==n||o.member==="mine"&&o.currentUserId&&t.created_by!==o.currentUserId||o.type==="automation"&&!t.trigger_id||o.type==="manual"&&t.trigger_id)}const Ne=new Map,ye=new Map;function wo(t,e){return e?t>=Oe?!0:null:!1}function yt(t){return Ne.get(t)}function ko(t,e){Ne.set(t,e)}function Io(t,e,n){const o=Ne.get(t);if(o!==void 0){n(o);return}let i=ye.get(t);i||(i=ls(e).then(r=>(Ne.set(t,r),ye.delete(t),r)).catch(()=>(ye.delete(t),Promise.reject(new Error("group probe failed")))),ye.set(t,i)),i.then(n,()=>n(!1))}function St(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Oe,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ao(t,e,n,o,i){let r=0;for(const l of t)e.has(l.id)||as(l,n,o,i)&&r++;return r}function zo(t,e,n,o){const i=I.c(8),{org:r}=X(),l=vo(r.id,t,e,n);let a;i[0]!==n?(a=yo(n),i[0]=n,i[1]=a):a=i[1];const m=a,[c,d]=M.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==l&&d({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const u=Tn(),{threads:f,hasMore:h}=Je(),x=Fe(f,t,e,n),g=No(x,h),p=wo(x,h),b=Kt();if(c.identity===l&&c.serverHasMore===null){const _=p??yt(l);_!==void 0&&d({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:_})}!m&&c.identity===l&&c.serverHasMore===null&&p===null&&yt(l)===void 0&&c.probeSubscribedIdentity!==l&&(d(_=>_.identity===l?{..._,isProbing:!0,probeSubscribedIdentity:l}:_),Io(l,async()=>{const _=jt(t,e,0,n,1),N=await b.call("COLLECTION_THREADS_LIST",_),{totalCount:w}=St(N),A=Fe(u.threads.get(),t,e,n);return w===void 0?!1:vt(A,w)},_=>{d(N=>N.identity!==l?N:{...N,isProbing:!1,serverHasMore:_})}));const v=async function(){if(c.isFetching||c.isProbing||m)return;const N=l;d(w=>w.identity===N?{...w,isFetching:!0}:w);try{const w=Fe(f,t,e,n),A=jt(t,e,w,n,Oe),z=await ls(()=>b.call("COLLECTION_THREADS_LIST",A)),{items:k,hasMore:$,totalCount:D}=St(z),R=new Set(f.map($o)),B=Ao(k,R,t,e,n),L=w;u.mergeThreads(k),d(P=>{if(P.identity!==N)return P;let E;return D!==void 0?E=vt(L+B,D):E=k.length===0||B===0?!1:$,ko(N,E),{...P,isFetching:!1,serverHasMore:E}})}catch(w){const A=w,z=A instanceof Error?A.message:String(A);oe.error(`Could not load more tasks: ${z}`),d(k=>k.identity===N?{...k,isFetching:!1}:k)}},y=c.isFetching||c.isProbing,S=!m&&!y&&Co(g,c.serverHasMore);let C;return i[2]!==y||i[3]!==v||i[4]!==S||i[5]!==c.isProbing||i[6]!==c.serverHasMore?(C={hasMore:S,isFetching:y,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:v},i[2]=y,i[3]=v,i[4]=S,i[5]=c.isProbing,i[6]=c.serverHasMore,i[7]=C):C=i[7],C}function $o(t){return t.id}function To(t){const e=I.c(20),{status:n,threads:o,activeTaskId:i,onSelectTask:r,onArchiveTask:l,canArchive:a,filters:m}=t,{isFetching:c,isProbing:d,loadMore:u,hasMore:f,serverHasMore:h}=zo("status",n,m),[x,g]=M.useState(!1);!x&&o.length===0&&h===!0&&!c&&!d&&(g(!0),queueMicrotask(()=>{u()}));let p;if(e[0]!==i||e[1]!==a||e[2]!==m||e[3]!==l||e[4]!==r||e[5]!==o){let v;e[7]!==i||e[8]!==a||e[9]!==m||e[10]!==l||e[11]!==r?(v=y=>s.jsx(is,{task:y,isActive:i===y.id,onClick:()=>r(y),onArchive:a&&y.created_by===m.currentUserId?()=>l(y):void 0,showAutomationBadge:!!y.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},y.id),e[7]=i,e[8]=a,e[9]=m,e[10]=l,e[11]=r,e[12]=v):v=e[12],p=o.map(v),e[0]=i,e[1]=a,e[2]=m,e[3]=l,e[4]=r,e[5]=o,e[6]=p}else p=e[6];let b;e[13]!==f||e[14]!==c||e[15]!==u?(b=(f||c)&&s.jsx(os,{onClick:()=>{u()},isFetching:c,indented:!0}),e[13]=f,e[14]=c,e[15]=u,e[16]=b):b=e[16];let j;return e[17]!==p||e[18]!==b?(j=s.jsxs(s.Fragment,{children:[p,b]}),e[17]=p,e[18]=b,e[19]=j):j=e[19],j}function Oo(t){const e=I.c(36),{status:n,threads:o,activeTaskId:i,onSelectTask:r,onArchiveTask:l,canArchive:a,filters:m}=t,c=hi[n],d=c.icon,[u,f]=jo(`status-${n}`,!1);let h;e[0]!==u||e[1]!==f?(h=function(){f(!u)},e[0]=u,e[1]=f,e[2]=h):h=e[2];const x=h;let g;e[3]!==x?(g=N=>{N.target===N.currentTarget&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),x())},e[3]=x,e[4]=g):g=e[4];let p;e[5]!==d||e[6]!==c.iconClassName?(p=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(d,{size:12,className:c.iconClassName})}),e[5]=d,e[6]=c.iconClassName,e[7]=p):p=e[7];let b;e[8]!==u?(b=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:u?s.jsx(Xe,{size:14}):s.jsx(pi,{size:14})}),e[8]=u,e[9]=b):b=e[9];let j;e[10]!==p||e[11]!==b?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[p,b]}),e[10]=p,e[11]=b,e[12]=j):j=e[12];let v;e[13]!==c.label?(v=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=v):v=e[14];let y;e[15]!==o.length?(y=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:o.length})}),e[15]=o.length,e[16]=y):y=e[16];let S;e[17]!==u||e[18]!==x||e[19]!==g||e[20]!==j||e[21]!==v||e[22]!==y?(S=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:x,onKeyDown:g,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[j,v,y]}),e[17]=u,e[18]=x,e[19]=g,e[20]=j,e[21]=v,e[22]=y,e[23]=S):S=e[23];let C;e[24]!==i||e[25]!==a||e[26]!==u||e[27]!==m||e[28]!==l||e[29]!==r||e[30]!==n||e[31]!==o?(C=u&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(To,{status:n,threads:o,activeTaskId:i,onSelectTask:r,onArchiveTask:l,canArchive:a,filters:m})}),e[24]=i,e[25]=a,e[26]=u,e[27]=m,e[28]=l,e[29]=r,e[30]=n,e[31]=o,e[32]=C):C=e[32];let _;return e[33]!==S||e[34]!==C?(_=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[S,C]}),e[33]=S,e[34]=C,e[35]=_):_=e[35],_}function _t(t){const e=I.c(38),{threads:n,groupBy:o,activeTaskId:i,onSelectTask:r,onArchiveTask:l,filters:a,hasMore:m,isFetchingMore:c,onLoadMore:d,filtersActive:u}=t;if(n.length===0&&!m&&!c){let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(mi,{className:"size-6 opacity-60"}),e[0]=p):p=e[0];const b=u?"No chats match your filters":"No chats yet";let j;return e[1]!==b?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[p,s.jsx("p",{className:"text-sm",children:b})]}),e[1]=b,e[2]=j):j=e[2],j}const f=n.length>1||m;if(o==="status"){let p;if(e[3]!==i||e[4]!==f||e[5]!==a||e[6]!==l||e[7]!==r||e[8]!==n){let j;e[10]!==i||e[11]!==f||e[12]!==a||e[13]!==l||e[14]!==r?(j=v=>s.jsx(Oo,{status:v.status,threads:v.threads,activeTaskId:i,onSelectTask:r,onArchiveTask:l,canArchive:f,filters:a},v.status),e[10]=i,e[11]=f,e[12]=a,e[13]=l,e[14]=r,e[15]=j):j=e[15],p=go(n).map(j),e[3]=i,e[4]=f,e[5]=a,e[6]=l,e[7]=r,e[8]=n,e[9]=p}else p=e[9];let b;return e[16]!==p?(b=s.jsx(s.Fragment,{children:p}),e[16]=p,e[17]=b):b=e[17],b}let h;if(e[18]!==i||e[19]!==f||e[20]!==a||e[21]!==l||e[22]!==r||e[23]!==n){let p;e[25]!==i||e[26]!==f||e[27]!==a||e[28]!==l||e[29]!==r?(p=b=>s.jsx(is,{task:b,isActive:i===b.id,onClick:()=>r(b),onArchive:f&&b.created_by===a.currentUserId?()=>l(b):void 0,showAutomationBadge:!!b.trigger_id,showAgentIcon:!0},b.id),e[25]=i,e[26]=f,e[27]=a,e[28]=l,e[29]=r,e[30]=p):p=e[30],h=n.map(p),e[18]=i,e[19]=f,e[20]=a,e[21]=l,e[22]=r,e[23]=n,e[24]=h}else h=e[24];let x;e[31]!==m||e[32]!==c||e[33]!==d?(x=(m||c)&&s.jsx(os,{onClick:d,isFetching:c}),e[31]=m,e[32]=c,e[33]=d,e[34]=x):x=e[34];let g;return e[35]!==h||e[36]!==x?(g=s.jsxs(s.Fragment,{children:[h,x]}),e[35]=h,e[36]=x,e[37]=g):g=e[37],g}function Mo(t,e,n){if(!n)return;const o=t.findIndex(i=>i.id===e);if(o!==-1){for(let i=o+1;i<t.length;i++){const r=t[i];if(r?.created_by===n)return r}for(let i=o-1;i>=0;i--){const r=t[i];if(r?.created_by===n)return r}}}function Nt(t){const e=I.c(17),{label:n,onClick:o,active:i,children:r}=t,[l,a]=M.useState(!1);let m,c,d,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>a(!0),c=()=>a(!1),d=()=>a(!0),u=()=>a(!1),e[0]=m,e[1]=c,e[2]=d,e[3]=u):(m=e[0],c=e[1],d=e[2],u=e[3]);const f=i&&"bg-sidebar-accent text-foreground";let h;e[4]!==f?(h=O("md:size-[34px] rounded-lg",f),e[4]=f,e[5]=h):h=e[5];let x;e[6]!==r||e[7]!==n||e[8]!==o||e[9]!==h?(x=s.jsx(le,{asChild:!0,children:s.jsx(me,{"aria-label":n,onClick:o,onPointerEnter:m,onPointerLeave:c,onFocus:d,onBlur:u,className:h,children:r})}),e[6]=r,e[7]=n,e[8]=o,e[9]=h,e[10]=x):x=e[10];let g;e[11]!==n?(g=s.jsx(ae,{side:"bottom",children:n}),e[11]=n,e[12]=g):g=e[12];let p;return e[13]!==l||e[14]!==x||e[15]!==g?(p=s.jsxs(ce,{open:l,children:[x,g]}),e[13]=l,e[14]=x,e[15]=g,e[16]=p):p=e[16],p}function Re(t){const e=I.c(13),{label:n,value:o,onChange:i,options:r}=t;let l;e[0]!==n?(l=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=l):l=e[1];let a;e[2]!==i?(a=u=>u&&i(u),e[2]=i,e[3]=a):a=e[3];let m;e[4]!==r?(m=r.map(Eo),e[4]=r,e[5]=m):m=e[5];let c;e[6]!==a||e[7]!==m||e[8]!==o?(c=s.jsx(ii,{type:"single",size:"sm",value:o,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:m}),e[6]=a,e[7]=m,e[8]=o,e[9]=c):c=e[9];let d;return e[10]!==l||e[11]!==c?(d=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l,c]}),e[10]=l,e[11]=c,e[12]=d):d=e[12],d}function Eo(t){return s.jsxs(ni,{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 cs({onNavigate:t}={}){const{data:e}=te.useSession(),n=e?.user?.id,{org:o}=X(),i=$t({connectionId:Ot,orgId:o.id,orgSlug:o.slug}),r=_e(o.id).id,l=Dt(),{threads:a,hasMore:m,isFetchingMore:c,fetchNextPage:d}=Je(),u=a.filter(T=>!T.hidden),{hide:f,setScope:h}=Ut(),x=ne(),{setTaskId:g,createNewTask:p}=Ze(),b=Ve({strict:!1}),j=we({strict:!1}),v=b.taskId??null,y=j.virtualmcpid??a.find(T=>T.id===v)?.virtual_mcp_id??null,S=()=>{t?.()},C=[...u].sort((T,q)=>(q.updated_at??"").localeCompare(T.updated_at??"")),[_,N]=M.useState("all"),[w,A]=M.useState("flat"),[z,k]=Ce("sidebar-threads-scope-all",!1),[$,D]=M.useState(!1),[R,B]=M.useState(!1),L={type:_,member:"mine",currentUserId:n??null},P={};z||(P.created_by="me"),h(P);const E=T=>n?T.filter(q=>q.created_by===n):[],F=T=>_==="automation"?T.filter(q=>!!q.trigger_id):_==="manual"?T.filter(q=>!q.trigger_id):T,U=E(C),G=F(U),W=F(C),Y=z?W:G,V=T=>{if(n&&T.created_by&&T.created_by!==n)return;const q=T.id===v;if(f(T.id),En(T.id),!q)return;const ie=Mo(Y,T.id,n);S(),ie?g(ie.id,ie.virtual_mcp_id):x({to:"/$org",params:{org:o.slug}})},Me=T=>{S(),g(T.id,T.virtual_mcp_id)},ms=async T=>{try{const q=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:T,limit:1,offset:0}});return((q.structuredContent??q).items?.length??0)===0}catch{return!1}},tt=async()=>{const T=y??r;J("sidebar_new_thread_clicked",{virtual_mcp_id:T});const q=U.find(ie=>ie.virtual_mcp_id===T&&ie.title==="New chat");if(q&&await ms(q.id)){S(),g(q.id,T);return}S(),p(T)},{state:us,isMobile:st,toggleSidebar:fs}=re();if(us==="collapsed"&&!st){const T=_e(o.id),q=new Map((l??[]).map(Z=>[Z.id,Z])),ie=Z=>(Z?q.get(Z):void 0)??(Z===r?T:void 0);return s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(ns,{orgParam:o.slug,side:"right",align:"start",trigger:s.jsx(K,{tooltip:o.name,children:s.jsx($e,{org:o,size:"sm"})})})}),s.jsxs(ee,{className:"mt-2 min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(H,{children:s.jsx(K,{"aria-label":"Toggle sidebar",tooltip:"Toggle sidebar",onClick:fs,children:s.jsx(Et,{size:16})})}),s.jsx(H,{children:s.jsx(K,{tooltip:"New chat",onClick:()=>{tt()},children:s.jsx(ot,{size:16})})}),Y.map(Z=>{const it=ie(Z.virtual_mcp_id);return s.jsx(H,{children:s.jsx(K,{tooltip:Z.title||"New chat",isActive:Z.id===v,onClick:()=>Me(Z),children:s.jsx(de,{icon:it?.icon??null,name:it?.title??"Agent",size:"xs"})})},Z.id)})]})]})}const ve=w!=="flat"||_!=="all"||z===!0,hs=s.jsxs(Ie,{children:[s.jsxs(ce,{children:[s.jsx(le,{asChild:!0,children:s.jsx(fe,{asChild:!0,children:s.jsxs(me,{"aria-label":"Filter chats",active:ve,className:"md:size-[34px] rounded-lg",children:[s.jsx(si,{size:16}),ve&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(ae,{side:"bottom",children:"Filter chats"})]}),s.jsxs(ke,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(Re,{label:"View",value:w,onChange:T=>{J("tasks_panel_group_by_changed",{to_value:T}),A(T)},options:[{value:"flat",label:"List",icon:s.jsx(cn,{size:13})},{value:"status",label:"Status",icon:s.jsx(dn,{size:13})}]}),s.jsx(Re,{label:"Type",value:_,onChange:T=>{J("tasks_panel_filter_changed",{to_value:T}),N(T)},options:[{value:"all",label:"All"},{value:"manual",label:"Chats"},{value:"automation",label:"Auto"}]}),s.jsx(Re,{label:"Scope",value:z?"team":"mine",onChange:T=>k(T==="team"),options:[{value:"mine",label:"Mine"},{value:"team",label:"Team"}]})]})]}),nt=T=>s.jsx(Pt,{delayDuration:300,children:s.jsxs("div",{className:O("shrink-0 flex items-center justify-between",T?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!T&&s.jsx(Xt,{className:"md:size-[34px] rounded-lg"}),hs]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(Nt,{label:"Search chats",onClick:()=>{J("tasks_panel_search_opened"),B(!0),D(!0)},children:s.jsx(an,{size:16})}),s.jsx(Nt,{label:"New chat",onClick:()=>{tt()},children:s.jsx(ot,{size:16})})]})]})});return st?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[nt(!0),s.jsx(pt,{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(_t,{threads:Y,groupBy:w,activeTaskId:v,onSelectTask:Me,onArchiveTask:V,filters:L,hasMore:m,isFetchingMore:c,onLoadMore:()=>{d()},filtersActive:ve})}),R&&s.jsx(gt,{open:$,onOpenChange:D})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[nt(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(pt,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(_t,{threads:Y,groupBy:w,activeTaskId:v,onSelectTask:Me,onArchiveTask:V,filters:L,hasMore:m,isFetchingMore:c,onLoadMore:()=>{d()},filtersActive:ve})})}),R&&s.jsx(gt,{open:$,onOpenChange:D})]})}const Po=5,Do=[{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 ds(){const t=I.c(3),{state:e}=re();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:Po}).map(Lo)}),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 o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=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:Do.map(Fo)})]}),t[2]=o):o=t[2],o}function Fo(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:O("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(Ro)})]},e)}function Ro(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 Lo(t,e){return s.jsx(se,{className:"size-10 rounded-lg mx-auto"},e)}function Ho(){const t=I.c(2);if(ze()){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ue,{showName:!0}),t[0]=o):o=t[0],o}let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(s.Fragment,{children:[s.jsx(Ue,{}),s.jsx(Te,{})]}),t[1]=n):n=t[1],n}function Bo(){const t=I.c(5),e=Qt();let n,o;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(uo,{}),o=s.jsx(Ho,{}),t[0]=n,t[1]=o):(n=t[0],o=t[1]);let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(We,{children:s.jsx(M.Suspense,{fallback:s.jsx(ds,{}),children:s.jsx(cs,{})})}),t[2]=i):i=t[2];let r;return t[3]!==e?(r=s.jsx(Gt,{children:s.jsx(es,{sections:e,footer:n,header:o,additionalContent:i})}),t[3]=e,t[4]=r):r=t[4],r}function Uo(t){const e=I.c(8),{onClose:n}=t,o=Qt();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(fo,{}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ds,{}),e[1]=r):r=e[1];let l;e[2]!==n?(l=s.jsx(We,{children:s.jsx(M.Suspense,{fallback:r,children:s.jsx(cs,{onNavigate:n})})}),e[2]=n,e[3]=l):l=e[3];let a;return e[4]!==n||e[5]!==o||e[6]!==l?(a=s.jsx(Gt,{children:s.jsx(eo,{sections:o,onClose:n,footer:i,additionalContent:l})}),e[4]=n,e[5]=o,e[6]=l,e[7]=a):a=e[7],a}const Go="sidebar.open";function Wo(){const t=I.c(1),{state:e}=re(),n=ze();if(e!=="collapsed"||n)return null;let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Te,{}),t[0]=o):o=t[0],o}function Vo(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Os,{}),t[0]=e):e=t[0],e}function ha(){const t=I.c(43),e=Ye(),n=ze();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const{connect:i,siteUrl:r}=we(o),l=i==="1",[a,m]=Ce(Go,!1),{width:c,wrapperRef:d,onStartResize:u,resetWidth:f}=Ci(),h=!e;let x,g;t[1]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs(Q.LeftColumn,{children:[s.jsx(Wo,{}),s.jsx(Q.TogglesSlot,{})]}),g=s.jsx(Q.CenterSlot,{}),t[1]=x,t[2]=g):(x=t[1],g=t[2]);let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs(Q.Header,{children:[x,g,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[3]=p):p=t[3];const b=p;let j;t[4]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Xt,{}),t[4]=j):j=t[4];let v;t[5]!==n?(v=!n&&s.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:s.jsx(Te,{})}),t[5]=n,t[6]=v):v=t[6];let y,S,C,_,N;t[7]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(be,{}),C=s.jsx(Q.TogglesSlot,{}),_=s.jsx(Q.TabsSlot,{className:"shrink-0"}),N=s.jsx(Q.CenterSlot,{}),y=s.jsx(Q.RightSlot,{}),t[7]=y,t[8]=S,t[9]=C,t[10]=_,t[11]=N):(y=t[7],S=t[8],C=t[9],_=t[10],N=t[11]);let w;t[12]!==v?(w=s.jsx(Q.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[j,v,S,C,_,N,y]})}),t[12]=v,t[13]=w):w=t[13];const A=w;let z;t[14]===Symbol.for("react.memo_cache_sentinel")?(z={background:"transparent",containerType:"inline-size"},t[14]=z):z=t[14];let k;t[15]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Ps,{className:"flex flex-col min-h-0",style:z,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(M.Suspense,{fallback:s.jsx(Vo,{}),children:s.jsx(Ts,{})})})})}),t[15]=k):k=t[15];const $=k,D=!h&&(e?A:b),R=`${c}px`;let B;t[16]!==R?(B={"--sidebar-width":R,"--sidebar-width-icon":"3.125rem"},t[16]=R,t[17]=B):B=t[17];const L=B;let P;t[18]!==e||t[19]!==u||t[20]!==f?(P=!e&&s.jsxs(s.Fragment,{children:[s.jsx(Bo,{}),s.jsx(Si,{onPointerDown:u,onDoubleClick:f})]}),t[18]=e,t[19]=u,t[20]=f,t[21]=P):P=t[21];let E;t[22]!==h?(E=h?s.jsxs("div",{className:"flex flex-col flex-1 min-w-0 min-h-0 h-full",children:[b,$]}):$,t[22]=h,t[23]=E):E=t[23];let F;t[24]!==L||t[25]!==P||t[26]!==E||t[27]!==d?(F=s.jsxs(Ds,{ref:d,className:"flex-1 bg-sidebar relative min-h-0",style:L,children:[P,E]}),t[24]=L,t[25]=P,t[26]=E,t[27]=d,t[28]=F):F=t[28];let U;t[29]!==e?(U=e&&s.jsx(di,{renderSidebar:qo}),t[29]=e,t[30]=U):U=t[30];let G;t[31]!==r||t[32]!==l?(G=l&&s.jsx(gi,{siteUrl:r}),t[31]=r,t[32]=l,t[33]=G):G=t[33];let W;t[34]!==D||t[35]!==F||t[36]!==U||t[37]!==G?(W=s.jsx(An,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[D,F,U,G]})}),t[34]=D,t[35]=F,t[36]=U,t[37]=G,t[38]=W):W=t[38];let Y;return t[39]!==m||t[40]!==a||t[41]!==W?(Y=s.jsx(On,{children:s.jsx(Q.Provider,{children:s.jsx(Fs,{open:a,onOpenChange:m,children:W})})}),t[39]=m,t[40]=a,t[41]=W,t[42]=Y):Y=t[42],Y}function qo(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(Uo,{onClose:e})})})}export{ha as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Bnro1Vjb.js","assets/index-BEqdT-CX.js","assets/index-Dmfh0AkN.css","assets/ArrowUp-CFU7eduC.js","assets/chat-context-CAoh3qxf.js","assets/autosend-CIDdvZqc.js","assets/hooks-DYM3Q-Vq.js","assets/use-mcp-client-DvvHwezb.js","assets/constants-D_FQAPnt.js","assets/auth-BR_fNNK7.js","assets/decopilot-sse-pool-pi1pVqbX.js","assets/backoff-CrEUbyZT.js","assets/delay-CnY5UFtP.js","assets/studio-tools-Cdt3UzXo.js","assets/use-virtual-mcp-CNKe_WaY.js","assets/use-collections-Dy7WD_eH.js","assets/use-ai-providers-C7iVrgY-.js","assets/use-decopilot-events-btxE-D2k.js","assets/tab-id-BijBBRwE.js","assets/use-organization-settings-CpbybQHD.js","assets/automation-runs-nQ99AMoV.js","assets/select-Bh2Z8rK3.js","assets/tooltip-C7c-Tgru.js","assets/Check-BAiULwRg.js","assets/ChevronDown-Cpk84lU5.js","assets/ChevronUp-CqCnswy_.js","assets/useInfiniteQuery-BnNR1NVs.js","assets/use-infinite-scroll-DYbbFqLK.js","assets/use-connection-DUpx0NEA.js","assets/card-CEUspnmz.js","assets/sidebar-CRtkHPvX.js","assets/LayoutLeft-CNWN8tpf.js","assets/use-mobile-DbBFg2WD.js","assets/X-CTTK5Zj2.js","assets/table-VOE9WRkg.js","assets/empty-state-C6JrR5eZ.js","assets/use-members-BZPSqMOT.js","assets/use-org-auth-client-PHOIKqSH.js","assets/use-clock-tick-F8Oybd0p.js","assets/AlertCircle-DFFB807G.js","assets/CheckCircle-BwwAyNzV.js","assets/Circle-pOPoWDQn.js","assets/agent-icon-jdj2JAEm.js","assets/UserPlus01-DjFNU1Mn.js","assets/Tool01-CSravChF.js","assets/Settings02-D5c8FtUa.js","assets/Tool02-csu1mOp1.js","assets/XCircle-CiVL5z-e.js","assets/ArrowUpRight-D37SsWBk.js","assets/TrendUp01-Dw2DNRxA.js","assets/ZapSquare-BDp8YrcS.js","assets/ZoomOut-CvmU5uj5.js","assets/Users03-Iz-TpUuJ.js","assets/ChevronRight-UlscOqp6.js","assets/Stars02-CzKVb8lE.js","assets/Copy01-BEB5hDKQ.js","assets/DotsVertical-BFfMlorx.js","assets/Globe01-DVm51A__.js","assets/Eye-Bbh_ejV6.js","assets/FilterLines-Dm0WP1zI.js","assets/Flag01-e55mynPF.js","assets/Star01-C32-NjaL.js","assets/Globe04-DA8QsMrW.js","assets/SwitchHorizontal01-C8Rnw5uG.js","assets/HardDrive-BJ2MS6we.js","assets/Image01-Y4d3ZI2r.js","assets/Key01-xPUeBTf6.js","assets/LinkExternal01-B6bTrNoI.js","assets/List-gTaMGV9z.js","assets/Monitor01-BdI_dCjX.js","assets/Sun-BPhwV-Eh.js","assets/Package-WlP_SelV.js","assets/Palette-DwivsXKp.js","assets/Play-BPQdBfbt.js","assets/Plus-C8FiAr3i.js","assets/SearchLg-CMWIHllt.js","assets/SearchMd-Gwm-384G.js","assets/Shield01-Dn6encQp.js","assets/Stars01-C8WemEnv.js","assets/Trash01-DZTkGJqE.js","assets/Upload01-s2ES1URH.js","assets/User01-D0_zDlJM.js","assets/Users01-CAC4FOXB.js","assets/XClose-DxMKQUUD.js","assets/Zap-CrYnUVJy.js","assets/use-automations-CELpHT79.js","assets/useSuspenseInfiniteQuery-3QrNhYz_.js","assets/avatar-DJpRqbqg.js","assets/format-time-BnbuEtat.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/use-copy-C0FUXmsm.js","assets/file-type-icon-BR1G8n26.js","assets/dialog-BboVhzku.js","assets/monaco-editor-YwujFe9g.js","assets/index-BTfVRtBq.js","assets/index-BXfKOYdf.js","assets/shell-layout-CcPRSmgX.js","assets/alert-dialog-DtmlB9JL.js","assets/required-auth-layout-BXaZVxWQ.js","assets/use-org-sso-BA_UxewI.js","assets/integration-icon-Dhyv93zr.js","assets/use-navigate-to-agent-CBi1-FBB.js","assets/reusable-new-chat-CouMjkYR.js","assets/AreaChart-oIJCSonG.js","assets/form-p6ZihW38.js","assets/label-DbwTUWd9.js","assets/input-CqfDyI-C.js","assets/drawer-D5XLtSzP.js","assets/collection-search-BLJH2aa6.js","assets/tabs-DPmfTv0c.js","assets/toggle-group-BnuMLJr8.js","assets/use-deco-credits-56-eyw-E.js","assets/extract-connection-data-DEmXsdA0.js","assets/connection-card-DPw_9IvV.js","assets/use-registry-connections-CX_dlku1.js","assets/retry-CErkP7V6.js","assets/connection-slug-eyAPH6o3.js","assets/textarea-B9g6Z2-r.js","assets/connection-form-helpers-svNTHB1P.js","assets/authenticate-and-persist-oauth-BuaZSTeD.js","assets/mcp-oauth-CeGeftbL.js","assets/collection-tabs-D10lR104.js","assets/badge-zT-Fh3qN.js","assets/connect-desktop-dialog-B4c48mz3.js","assets/select-model-BHB_Fir_.js","assets/checkbox-C7atZRmN.js","assets/skeleton-C-LbiBGP.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-HiisdE7T.js","assets/command-Cih9cb-G.js","assets/index-Dz8rxMiO.js","assets/popover-BJYBT3EY.js","assets/dropdown-menu-DcV4HAvf.js","assets/index-S6xdCjXr.js","assets/toolbar-65iromlk.js","assets/use-debounced-value-BqHYI-kn.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-BrRSDeZW.js","assets/use-mcp-tools-Be4djRS3.js","assets/use-capability-DsC1r5oD.js","assets/use-debounced-autosave-IEMI4Muz.js","assets/index-BXTPhNSj.js","assets/search-input-CYwO2ZSV.js","assets/use-mcp-auth-status-Dy_Y2kKR.js","assets/switch-BL8XQR8K.js","assets/github-repo-picker-B_QoRL-b.js","assets/provision-repo-scoped-github-connection-CB4ICKHq.js","assets/use-secrets-ChIMRFxc.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/companions-core-Zwoux9HO.js","assets/toolbar-icon-button-BBh2Csxi.js","assets/calendar-CibxNjt0.js","assets/use-file-configs-CYmkQ98g.js","assets/automation-list-row-BuCXNsSo.js","assets/index-DDGTF8rc.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as z,l as k,j as s,r as I,C as At,n as Qt,m as Yt,d as wt,K as $t,B as xe,aX as ms,i as fs}from"./index-BEqdT-CX.js";import{g as re}from"./get-initials-D-f_fDFw.js";import{A as ie}from"./avatar-DJpRqbqg.js";import{e as Et,a as xs,t as ps,f as gs,g as ut,b as Je,s as hs,c as Ht,h as bs,d as js,i as Ns}from"./UserPlus01-DjFNU1Mn.js";import{i as ys}from"./List-gTaMGV9z.js";import{s as Ot}from"./Plus-C8FiAr3i.js";import{e as vs}from"./constants-D_FQAPnt.js";import{u as Vt}from"./use-members-BZPSqMOT.js";import{u as Ft}from"./studio-tools-Cdt3UzXo.js";import{t as Ss,T as Cs,S as pe}from"./decopilot-sse-pool-pi1pVqbX.js";import{u as ws}from"./use-decopilot-events-btxE-D2k.js";import{a as _s}from"./format-time-BnbuEtat.js";import{i as Xt}from"./AlertCircle-DFFB807G.js";import{i as Jt}from"./CheckCircle-BwwAyNzV.js";import{i as Ds}from"./Circle-pOPoWDQn.js";import{s as ks}from"./Eye-Bbh_ejV6.js";import{a as Is,d as Ts,e as zs}from"./dialog-BboVhzku.js";import{a as mt,c as ft,d as Ve,D as xt}from"./dropdown-menu-DcV4HAvf.js";import{P as _t,a as Dt,b as kt}from"./popover-BJYBT3EY.js";import{b as Wt,C as Zt,a as fe,e as pt,d as es,c as ts}from"./command-Cih9cb-G.js";import{C as As}from"./calendar-CibxNjt0.js";import{u as $s}from"./use-copy-C0FUXmsm.js";import{i as Es}from"./Check-BAiULwRg.js";import{i as Os}from"./ChevronRight-UlscOqp6.js";import{a as Fs}from"./Copy01-BEB5hDKQ.js";import{n as Bs}from"./LinkExternal01-B6bTrNoI.js";import{s as It}from"./User01-D0_zDlJM.js";import{i as Pt}from"./X-CTTK5Zj2.js";import{g as Rs,b as Ps,e as Ms,f as Ls,a as Us,D as qs}from"./drawer-D5XLtSzP.js";import{t as Bt}from"./ChevronDown-Cpk84lU5.js";import{i as ss}from"./FilterLines-Dm0WP1zI.js";import{s as Ks}from"./Flag01-e55mynPF.js";import{u as Gs}from"./shell-layout-CcPRSmgX.js";import{u as Qs}from"./use-organization-settings-CpbybQHD.js";function ue(t){const e=z.c(8),{size:l,className:a}=t,n=l===void 0?16:l;let i;e[0]!==n?(i={width:n,height:n},e[0]=n,e[1]=i):i=e[1];let r;e[2]!==a?(r=k("shrink-0 rounded-full object-cover",a),e[2]=a,e[3]=r):r=e[3];let o;return e[4]!==n||e[5]!==i||e[6]!==r?(o=s.jsx("img",{src:vs,alt:"Super Agent",width:n,height:n,style:i,className:r}),e[4]=n,e[5]=i,e[6]=r,e[7]=o):o=e[7],o}const Mt=()=>0;function Ys(t){const{orgSlug:e,enabled:l=!0,onUpdate:a,onDelete:n}=t,i=I.useRef(a);i.current=a;const r=I.useRef(n);r.current=n;const o=I.useRef(null),d=I.useRef(l),u=I.useRef(e);(!o.current||d.current!==l||u.current!==e)&&(d.current=l,u.current=e,o.current=m=>{if(!l||!e)return()=>{};const c=x=>{let b;try{b=JSON.parse(x.data)}catch{return}b.data&&(x.type===Cs?r.current?.(b.data.id):i.current(b.data)),m()};return Ss.subscribe(e,c)}),I.useSyncExternalStore(o.current,Mt,Mt)}function Hs(){const t=z.c(27),{org:e,locator:l}=At(),a=Ft(),n=Qt();let i;t[0]!==l?(i=$t.taskBoardItems(l),t[0]=l,t[1]=i):i=t[1];const r=i;let o;t[2]!==a?(o=async()=>(await a.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=a,t[3]=o):o=t[3];let d;t[4]!==r||t[5]!==o?(d={queryKey:r,queryFn:o},t[4]=r,t[5]=o,t[6]=d):d=t[6];const u=Yt(d);let g,m;t[7]!==n||t[8]!==r?(g=h=>{n.setQueryData(r,v=>{const p=v??[],N=h;return p.some(y=>y.id===N.id)?p.map(y=>y.id===N.id?N:y):[N,...p]})},m=h=>{n.setQueryData(r,v=>v?.filter(p=>p.id!==h))},t[7]=n,t[8]=r,t[9]=g,t[10]=m):(g=t[9],m=t[10]);let c;t[11]!==e.slug||t[12]!==g||t[13]!==m?(c={orgSlug:e.slug,onUpdate:g,onDelete:m},t[11]=e.slug,t[12]=g,t[13]=m,t[14]=c):c=t[14],Ys(c);let x;t[15]!==n||t[16]!==r?(x=h=>{const v=h.subject,p=h.data.status;n.setQueryData(r,N=>N?.map(y=>y.threads.some(w=>w.threadId===v)?{...y,threads:y.threads.map(w=>w.threadId===v?{...w,status:p}:w)}:y))},t[15]=n,t[16]=r,t[17]=x):x=t[17];let b;t[18]!==e.slug||t[19]!==x?(b={orgSlug:e.slug,onTaskStatus:x},t[18]=e.slug,t[19]=x,t[20]=b):b=t[20],ws(b);let f;t[21]!==u.data?(f=u.data??[],t[21]=u.data,t[22]=f):f=t[22];let j;return t[23]!==u.error||t[24]!==u.isLoading||t[25]!==f?(j={items:f,isLoading:u.isLoading,error:u.error},t[23]=u.error,t[24]=u.isLoading,t[25]=f,t[26]=j):j=t[26],j}function Vs(){const t=z.c(30),{locator:e}=At(),l=Ft(),a=Qt();let n;t[0]!==e?(n=$t.taskBoardItems(e),t[0]=e,t[1]=n):n=t[1];const i=n;let r;t[2]!==a||t[3]!==i?(r=()=>a.invalidateQueries({queryKey:i}),t[2]=a,t[3]=i,t[4]=r):r=t[4];const o=r;let d;t[5]!==l?(d=N=>l.call("TASK_BOARD_ITEM_CREATE",N),t[5]=l,t[6]=d):d=t[6];let u;t[7]!==o||t[8]!==d?(u={mutationFn:d,onSuccess:o},t[7]=o,t[8]=d,t[9]=u):u=t[9];const g=wt(u);let m;t[10]!==l?(m=N=>l.call("TASK_BOARD_ITEM_UPDATE",N),t[10]=l,t[11]=m):m=t[11];let c,x;t[12]!==a||t[13]!==i?(c=async N=>{await a.cancelQueries({queryKey:i});const y=a.getQueryData(i);return a.setQueryData(i,w=>w?.map(C=>C.id===N.id?{...C,...N}:C)),{previous:y}},x=(N,y,w)=>{w?.previous&&a.setQueryData(i,w.previous)},t[12]=a,t[13]=i,t[14]=c,t[15]=x):(c=t[14],x=t[15]);let b;t[16]!==o||t[17]!==m||t[18]!==c||t[19]!==x?(b={mutationFn:m,onMutate:c,onError:x,onSettled:o},t[16]=o,t[17]=m,t[18]=c,t[19]=x,t[20]=b):b=t[20];const f=wt(b);let j;t[21]!==l?(j=N=>l.call("TASK_BOARD_ITEM_DELETE",{id:N}),t[21]=l,t[22]=j):j=t[22];let h;t[23]!==o||t[24]!==j?(h={mutationFn:j,onSuccess:o},t[23]=o,t[24]=j,t[25]=h):h=t[25];const v=wt(h);let p;return t[26]!==g||t[27]!==v||t[28]!==f?(p={create:g,update:f,remove:v},t[26]=g,t[27]=v,t[28]=f,t[29]=p):p=t[29],p}function Tt(t){return t.threads.some(e=>e.status==="requires_action")}function ls(t){return t.threads[0]}const ns=["triage","todo","in_progress","in_review","done"],ae={triage:{label:"Backlog",icon:Xt,iconClassName:"text-muted-foreground"},todo:{label:"To Do",icon:Ds,iconClassName:"text-muted-foreground"},in_progress:{label:"In Progress",icon:Et,iconClassName:"text-primary"},in_review:{label:"In Review",icon:ks,iconClassName:"text-warning"},done:{label:"Done",icon:Jt,iconClassName:"text-success"}},as=["none","low","medium","high","urgent"],oe={none:{label:"No priority",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50"},low:{label:"Low",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40"},medium:{label:"Medium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500"},high:{label:"High",flagClassName:"text-warning",dotClassName:"bg-warning"},urgent:{label:"Urgent",flagClassName:"text-destructive",dotClassName:"bg-destructive"}};function Xs(t){const e=z.c(10),{locator:l}=At(),a=Ft();let n;e[0]!==t||e[1]!==l?(n=$t.taskBoardItemPrs(l,t??""),e[0]=t,e[1]=l,e[2]=n):n=e[2];const i=!!t;let r;e[3]!==t||e[4]!==a?(r=async()=>(await a.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:t})).prs,e[3]=t,e[4]=a,e[5]=r):r=e[5];let o;return e[6]!==n||e[7]!==i||e[8]!==r?(o={queryKey:n,enabled:i,queryFn:r},e[6]=n,e[7]=i,e[8]=r,e[9]=o):o=e[9],Yt(o)}function Js(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function Lt(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Ws=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),Xe="inline-flex h-9 items-center gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent",Zs={failed:{label:"Error",className:"text-destructive",icon:bs},requires_action:{label:"Needs input",className:"text-warning",icon:Ht},in_progress:{label:"Running",className:"text-primary",icon:Et,spin:!0},completed:{label:"Completed",className:"text-success",icon:Jt},expired:{label:"Expired",className:"text-muted-foreground",icon:Xt}};function el(t){const e=z.c(164),{open:l,onClose:a,item:n,defaultStatus:i,onSubmit:r,onDelete:o,onOpenThread:d,isSaving:u}=t,{data:g}=Vt();let m;e[0]!==g?.data?.members?(m=g?.data?.members??[],e[0]=g?.data?.members,e[1]=m):m=e[1];const c=m,{handleCopy:x,copied:b}=$s(),[f,j]=I.useState(n?.title??""),[h,v]=I.useState(n?.description??""),[p,N]=I.useState(n?.status??i??"triage"),[y,w]=I.useState(n?.priority??"medium"),[C,O]=I.useState(n?.assigneeId??null),L=n?.dueDate;let Y;e[2]!==L?(Y=Lt(L),e[2]=L,e[3]=Y):Y=e[3];const[T,U]=I.useState(Y),[q,R]=I.useState(!1),[B,F]=I.useState(!1);let P;e[4]!==i||e[5]!==n?.assigneeId||e[6]!==n?.description||e[7]!==n?.dueDate||e[8]!==n?.priority||e[9]!==n?.status||e[10]!==n?.title?(P=()=>{j(n?.title??""),v(n?.description??""),N(n?.status??i??"triage"),w(n?.priority??"medium"),O(n?.assigneeId??null),U(Lt(n?.dueDate))},e[4]=i,e[5]=n?.assigneeId,e[6]=n?.description,e[7]=n?.dueDate,e[8]=n?.priority,e[9]=n?.status,e[10]=n?.title,e[11]=P):P=e[11];const A=P;let H;e[12]!==a||e[13]!==A?(H=()=>{a(),A()},e[12]=a,e[13]=A,e[14]=H):H=e[14];const _=H;let $;e[15]!==C||e[16]!==h||e[17]!==T||e[18]!==r||e[19]!==y||e[20]!==p||e[21]!==f?($=()=>{const S=f.trim();S&&r({title:S,description:h.trim()||null,status:p,priority:y,assigneeId:C,dueDate:T?Js(T):null})},e[15]=C,e[16]=h,e[17]=T,e[18]=r,e[19]=y,e[20]=p,e[21]=f,e[22]=$):$=e[22];const K=$,M=C===pe;let Q;if(e[23]!==C||e[24]!==c){let S;e[26]!==C?(S=W=>W.userId===C,e[26]=C,e[27]=S):S=e[27],Q=c.find(S),e[23]=C,e[24]=c,e[25]=Q}else Q=e[25];const G=Q;let se;e[28]!==n||e[29]!==c?(se=n?.assignedBy?c.find(S=>S.userId===n.assignedBy):void 0,e[28]=n,e[29]=c,e[30]=se):se=e[30];const E=se,te=ae[p].icon;let ce;e[31]!==n?(ce=n?ls(n):void 0,e[31]=n,e[32]=ce):ce=e[32];const le=ce;let V;e[33]!==_?(V=S=>!S&&_(),e[33]=_,e[34]=V):V=e[34];const me=n?"Edit task":"New task";let Z;e[35]!==me?(Z=s.jsx(Is,{className:"sr-only",children:me}),e[35]=me,e[36]=Z):Z=e[36];let ee;e[37]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(Pt,{size:16}),e[37]=ee):ee=e[37];let X;e[38]!==_?(X=s.jsx("button",{type:"button","aria-label":"Close",onClick:_,className:"absolute right-2.5 top-2.5 z-10 flex size-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:ee}),e[38]=_,e[39]=X):X=e[39];let ne;e[40]===Symbol.for("react.memo_cache_sentinel")?(ne=S=>{j(S.target.value),S.target.style.height="auto",S.target.style.height=`${S.target.scrollHeight}px`},e[40]=ne):ne=e[40];let J;e[41]!==f?(J=s.jsx("textarea",{ref:sl,value:f,onChange:ne,onKeyDown:tl,placeholder:"Task title...",autoFocus:!0,rows:1,className:"w-full resize-none overflow-hidden border-0 bg-transparent text-xl font-medium leading-snug text-foreground outline-none placeholder:text-foreground/30"}),e[41]=f,e[42]=J):J=e[42];let D;e[43]===Symbol.for("react.memo_cache_sentinel")?(D=S=>v(S.target.value),e[43]=D):D=e[43];let de;e[44]!==h?(de=s.jsx("textarea",{value:h,onChange:D,placeholder:"Describe a task for an agent...",className:"min-h-[96px] w-full flex-1 resize-none border-0 bg-transparent text-[15px] leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/50 sm:min-h-[120px]"}),e[44]=h,e[45]=de):de=e[45];let ge;e[46]!==b||e[47]!==h||e[48]!==x?(ge=h&&s.jsx(xe,{type:"button",variant:"ghost",size:"icon","aria-label":"Copy description",className:"absolute right-0 top-0 size-7 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100",onClick:()=>x(h),children:b?s.jsx(Es,{size:14}):s.jsx(Fs,{size:14})}),e[46]=b,e[47]=h,e[48]=x,e[49]=ge):ge=e[49];let he;e[50]!==de||e[51]!==ge?(he=s.jsxs("div",{className:"group relative flex flex-1 flex-col",children:[de,ge]}),e[50]=de,e[51]=ge,e[52]=he):he=e[52];let be;e[53]!==E||e[54]!==G||e[55]!==d||e[56]!==le?(be=le&&s.jsx(ll,{thread:le,startedBy:E??G,onOpen:d}),e[53]=E,e[54]=G,e[55]=d,e[56]=le,e[57]=be):be=e[57];let je;e[58]!==n?(je=n?.id&&s.jsx(rl,{itemId:n.id}),e[58]=n,e[59]=je):je=e[59];let Ne;e[60]!==J||e[61]!==he||e[62]!==be||e[63]!==je?(Ne=s.jsxs("div",{className:"flex min-w-0 flex-col gap-6 p-6 sm:flex-1 sm:overflow-y-auto sm:p-8",children:[J,he,be,je]}),e[60]=J,e[61]=he,e[62]=be,e[63]=je,e[64]=Ne):Ne=e[64];let We;e[65]===Symbol.for("react.memo_cache_sentinel")?(We=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:"Properties"}),e[65]=We):We=e[65];const bt=ae[p];let ye;e[66]!==te||e[67]!==bt.iconClassName?(ye=s.jsx(te,{size:16,className:bt.iconClassName}),e[66]=te,e[67]=bt.iconClassName,e[68]=ye):ye=e[68];const jt=ae[p];let ve;e[69]!==ye||e[70]!==jt.label?(ve=s.jsx(mt,{asChild:!0,children:s.jsxs("button",{type:"button",className:Xe,children:[ye,jt.label]})}),e[69]=ye,e[70]=jt.label,e[71]=ve):ve=e[71];let Ze;e[72]===Symbol.for("react.memo_cache_sentinel")?(Ze=s.jsx(ft,{align:"start",className:"w-44",children:ns.map(S=>{const W=ae[S].icon;return s.jsxs(Ve,{onSelect:()=>N(S),className:"gap-2",children:[s.jsx(W,{size:16,className:ae[S].iconClassName}),ae[S].label]},S)})}),e[72]=Ze):Ze=e[72];let Se;e[73]!==ve?(Se=s.jsxs(xt,{children:[ve,Ze]}),e[73]=ve,e[74]=Se):Se=e[74];const Nt=y==="none"&&"text-muted-foreground";let Ce;e[75]!==Nt?(Ce=k(Xe,Nt),e[75]=Nt,e[76]=Ce):Ce=e[76];let we;e[77]!==y?(we=y==="none"?s.jsxs(s.Fragment,{children:[s.jsx(xs,{size:16}),"Set priority"]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:k("size-2 rounded-full",oe[y].dotClassName)}),oe[y].label]}),e[77]=y,e[78]=we):we=e[78];let _e;e[79]!==Ce||e[80]!==we?(_e=s.jsx(mt,{asChild:!0,children:s.jsx("button",{type:"button",className:Ce,children:we})}),e[79]=Ce,e[80]=we,e[81]=_e):_e=e[81];let et;e[82]===Symbol.for("react.memo_cache_sentinel")?(et=s.jsx(ft,{align:"start",className:"w-40",children:as.map(S=>s.jsxs(Ve,{onSelect:()=>w(S),children:[s.jsx("span",{className:k("size-2 rounded-full",oe[S].dotClassName)}),oe[S].label]},S))}),e[82]=et):et=e[82];let De;e[83]!==_e?(De=s.jsxs(xt,{children:[_e,et]}),e[83]=_e,e[84]=De):De=e[84];const yt=!C&&"text-muted-foreground";let ke;e[85]!==yt?(ke=k(Xe,yt),e[85]=yt,e[86]=ke):ke=e[86];let Ie;e[87]!==E||e[88]!==G||e[89]!==M?(Ie=M&&E?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(ie,{url:E.user?.image??void 0,fallback:re(E.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:E.user?.name??"Super Agent"})]}),s.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[s.jsxs("span",{className:"inline-flex items-center",children:[s.jsx(ie,{url:E.user?.image??void 0,fallback:re(E.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(ue,{size:16,className:"ring-2 ring-background"})]}),"Super Agent"]})]}):M?s.jsxs(s.Fragment,{children:[s.jsx(ue,{size:16}),"Super Agent"]}):G?s.jsxs(s.Fragment,{children:[s.jsx(ie,{url:G.user?.image??void 0,fallback:re(G.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:G.user?.name??"Unassigned"})]}):s.jsxs(s.Fragment,{children:[s.jsx(ps,{size:16,className:"text-muted-foreground"}),"Assign"]}),e[87]=E,e[88]=G,e[89]=M,e[90]=Ie):Ie=e[90];let Te;e[91]!==ke||e[92]!==Ie?(Te=s.jsx(_t,{asChild:!0,children:s.jsx("button",{type:"button",className:ke,children:Ie})}),e[91]=ke,e[92]=Ie,e[93]=Te):Te=e[93];let tt;e[94]===Symbol.for("react.memo_cache_sentinel")?(tt=s.jsx(Wt,{placeholder:"Assign to…",className:"h-9"}),e[94]=tt):tt=e[94];let st;e[95]===Symbol.for("react.memo_cache_sentinel")?(st=s.jsx(Zt,{children:"No members found."}),e[95]=st):st=e[95];let lt;e[96]===Symbol.for("react.memo_cache_sentinel")?(lt=()=>{O(pe),F(!1)},e[96]=lt):lt=e[96];let nt;e[97]===Symbol.for("react.memo_cache_sentinel")?(nt=s.jsxs(fe,{value:"Super Agent",onSelect:lt,className:"gap-2",children:[s.jsx(ue,{size:16}),s.jsx("span",{className:"truncate",children:"Super Agent"})]}),e[97]=nt):nt=e[97];let at;e[98]===Symbol.for("react.memo_cache_sentinel")?(at=()=>{O(null),F(!1)},e[98]=at):at=e[98];let rt;e[99]===Symbol.for("react.memo_cache_sentinel")?(rt=s.jsxs(pt,{children:[nt,s.jsxs(fe,{value:"Unassigned",onSelect:at,className:"gap-2",children:[s.jsx(It,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"truncate",children:"Unassigned"})]})]}),e[99]=rt):rt=e[99];let ze;if(e[100]!==c){let S;e[102]===Symbol.for("react.memo_cache_sentinel")?(S=W=>s.jsxs(fe,{value:W.user?.name??W.userId,onSelect:()=>{O(W.userId),F(!1)},className:"gap-2",children:[s.jsx(ie,{url:W.user?.image??void 0,fallback:re(W.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:W.user?.name??W.userId})]},W.userId),e[102]=S):S=e[102],ze=c.map(S),e[100]=c,e[101]=ze}else ze=e[101];let Ae;e[103]!==ze?(Ae=s.jsx(Dt,{align:"start",className:"w-56 p-0",children:s.jsxs(es,{children:[tt,s.jsxs(ts,{children:[st,rt,s.jsx(pt,{heading:"Members",children:ze})]})]})}),e[103]=ze,e[104]=Ae):Ae=e[104];let $e;e[105]!==B||e[106]!==Te||e[107]!==Ae?($e=s.jsxs(kt,{open:B,onOpenChange:F,modal:!0,children:[Te,Ae]}),e[105]=B,e[106]=Te,e[107]=Ae,e[108]=$e):$e=e[108];let Ee;e[109]!==E||e[110]!==M?(Ee=M&&E&&s.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[s.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),s.jsxs("span",{className:k(Xe,"pointer-events-none"),children:[s.jsx(ue,{size:16}),"Super Agent"]})]}),e[109]=E,e[110]=M,e[111]=Ee):Ee=e[111];let Oe;e[112]!==$e||e[113]!==Ee?(Oe=s.jsxs("div",{className:"flex flex-col",children:[$e,Ee]}),e[112]=$e,e[113]=Ee,e[114]=Oe):Oe=e[114];const vt=!T&&"text-muted-foreground";let Fe;e[115]!==vt?(Fe=k(Xe,vt),e[115]=vt,e[116]=Fe):Fe=e[116];let it;e[117]===Symbol.for("react.memo_cache_sentinel")?(it=s.jsx(Je,{size:16,className:"text-muted-foreground"}),e[117]=it):it=e[117];let Be;e[118]!==T?(Be=T?Ws.format(T):"Due date",e[118]=T,e[119]=Be):Be=e[119];let Re;e[120]!==T?(Re=T&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":"Clear due date",className:"-mr-1 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:S=>{S.stopPropagation(),U(null)},onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),S.stopPropagation(),U(null))},children:s.jsx(Pt,{size:12})}),e[120]=T,e[121]=Re):Re=e[121];let Pe;e[122]!==Fe||e[123]!==Be||e[124]!==Re?(Pe=s.jsx(_t,{asChild:!0,children:s.jsxs("button",{type:"button",className:Fe,children:[it,Be,Re]})}),e[122]=Fe,e[123]=Be,e[124]=Re,e[125]=Pe):Pe=e[125];const St=T??void 0;let ot;e[126]===Symbol.for("react.memo_cache_sentinel")?(ot=S=>{U(S??null),S&&R(!1)},e[126]=ot):ot=e[126];let Me;e[127]!==St?(Me=s.jsx(Dt,{className:"w-auto p-0",align:"start",children:s.jsx(As,{mode:"single",selected:St,onSelect:ot,initialFocus:!0})}),e[127]=St,e[128]=Me):Me=e[128];let Le;e[129]!==q||e[130]!==Pe||e[131]!==Me?(Le=s.jsxs(kt,{open:q,onOpenChange:R,children:[Pe,Me]}),e[129]=q,e[130]=Pe,e[131]=Me,e[132]=Le):Le=e[132];let Ue;e[133]!==Se||e[134]!==De||e[135]!==Oe||e[136]!==Le?(Ue=s.jsxs("div",{className:"flex w-full shrink-0 flex-col gap-4 border-t border-border p-6 sm:w-[220px] sm:border-t-0 sm:border-l sm:px-6 sm:py-10",children:[We,s.jsxs("div",{className:"flex flex-wrap gap-2 sm:flex-col",children:[Se,De,Oe,Le]})]}),e[133]=Se,e[134]=De,e[135]=Oe,e[136]=Le,e[137]=Ue):Ue=e[137];let qe;e[138]!==Ne||e[139]!==Ue?(qe=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden",children:[Ne,Ue]}),e[138]=Ne,e[139]=Ue,e[140]=qe):qe=e[140];let Ke;e[141]!==n||e[142]!==o?(Ke=n&&o?s.jsx(xe,{variant:"ghost",size:"icon","aria-label":"Delete task",className:"size-10 text-muted-foreground hover:text-destructive",onClick:o,children:s.jsx(hs,{size:16})}):s.jsx("span",{}),e[141]=n,e[142]=o,e[143]=Ke):Ke=e[143];let Ge;e[144]!==u||e[145]!==f?(Ge=!f.trim()||u,e[144]=u,e[145]=f,e[146]=Ge):Ge=e[146];let ct;e[147]===Symbol.for("react.memo_cache_sentinel")?(ct=s.jsx(Ot,{size:16}),e[147]=ct):ct=e[147];const Ct=n?"Save":"Create task";let Qe;e[148]!==K||e[149]!==Ge||e[150]!==Ct?(Qe=s.jsxs(xe,{size:"sm",disabled:Ge,onClick:K,children:[ct,Ct]}),e[148]=K,e[149]=Ge,e[150]=Ct,e[151]=Qe):Qe=e[151];let Ye;e[152]!==Ke||e[153]!==Qe?(Ye=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[Ke,Qe]}),e[152]=Ke,e[153]=Qe,e[154]=Ye):Ye=e[154];let He;e[155]!==Z||e[156]!==X||e[157]!==qe||e[158]!==Ye?(He=s.jsxs(Ts,{className:"flex max-h-[90vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[85vh] sm:max-h-[640px] sm:max-w-[850px]",closeButtonClassName:"hidden",children:[Z,X,qe,Ye]}),e[155]=Z,e[156]=X,e[157]=qe,e[158]=Ye,e[159]=He):He=e[159];let dt;return e[160]!==l||e[161]!==V||e[162]!==He?(dt=s.jsx(zs,{open:l,onOpenChange:V,children:He}),e[160]=l,e[161]=V,e[162]=He,e[163]=dt):dt=e[163],dt}function tl(t){t.key==="Enter"&&t.preventDefault()}function sl(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function ll(t){const e=z.c(14),{thread:l,startedBy:a,onOpen:n}=t,i=l.status?Zs[l.status]:null,r=l.lastMessage??l.title;let o,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ue,{size:16}),d=s.jsx("span",{className:"text-sm text-foreground",children:"Super Agent"}),e[0]=o,e[1]=d):(o=e[0],d=e[1]);let u;e[2]!==a?(u=a&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-sm text-muted-foreground/50",children:"started by"}),s.jsx(ie,{url:a.user?.image??void 0,fallback:re(a.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate text-sm text-foreground",children:a.user?.name??"someone"})]}),e[2]=a,e[3]=u):u=e[3];let g;e[4]!==u?(g=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[o,d,u]}),e[4]=u,e[5]=g):g=e[5];let m;e[6]!==r||e[7]!==n||e[8]!==i||e[9]!==l?(m=i&&s.jsxs("button",{type:"button",disabled:!n,onClick:()=>n?.(l),className:"flex items-center gap-2 border-t border-border px-4 py-2 text-left transition-colors enabled:hover:bg-muted disabled:cursor-default",children:[s.jsxs("span",{className:k("flex items-center gap-1.5",i.className),children:[s.jsx(i.icon,{size:16,className:k(i.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:i.label})]}),r&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:r}),n&&s.jsx(Os,{size:16,className:"ml-auto shrink-0 text-muted-foreground"})]}),e[6]=r,e[7]=n,e[8]=i,e[9]=l,e[10]=m):m=e[10];let c;return e[11]!==g||e[12]!==m?(c=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[g,m]}),e[11]=g,e[12]=m,e[13]=c):c=e[13],c}function nl(t){return t.merged?{label:"Merged",className:"text-special",icon:gs}:t.state==="closed"?{label:"Closed",className:"text-destructive",icon:ut}:t.draft?{label:"Draft",className:"text-muted-foreground",icon:ut}:{label:"Open",className:"text-success",icon:ut}}function al(t){const e=z.c(38),{pr:l}=t;let a,n,i,r,o,d,u,g;if(e[0]!==l){n=nl(l);let y;e[9]!==l.body?(y=l.body?.trim(),e[9]=l.body,e[10]=y):y=e[10],a=y,o=l.url,d="_blank",u="noreferrer",g="flex flex-col gap-1 border-t border-border px-4 py-2 transition-colors hover:bg-muted",r="flex items-center gap-2",i=k("flex items-center gap-1.5",n.className),e[0]=l,e[1]=a,e[2]=n,e[3]=i,e[4]=r,e[5]=o,e[6]=d,e[7]=u,e[8]=g}else a=e[1],n=e[2],i=e[3],r=e[4],o=e[5],d=e[6],u=e[7],g=e[8];let m;e[11]!==n.icon?(m=s.jsx(n.icon,{size:16}),e[11]=n.icon,e[12]=m):m=e[12];let c;e[13]!==n.label?(c=s.jsx("span",{className:"text-sm",children:n.label}),e[13]=n.label,e[14]=c):c=e[14];let x;e[15]!==i||e[16]!==m||e[17]!==c?(x=s.jsxs("span",{className:i,children:[m,c]}),e[15]=i,e[16]=m,e[17]=c,e[18]=x):x=e[18];const b=l.title??`${l.repoOwner}/${l.repoName}`;let f;e[19]!==b?(f=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:b}),e[19]=b,e[20]=f):f=e[20];let j;e[21]!==l.number?(j=s.jsxs("span",{className:"shrink-0 text-sm text-muted-foreground",children:["#",l.number]}),e[21]=l.number,e[22]=j):j=e[22];let h;e[23]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Bs,{size:16,className:"shrink-0 text-muted-foreground"}),e[23]=h):h=e[23];let v;e[24]!==f||e[25]!==j||e[26]!==r||e[27]!==x?(v=s.jsxs("span",{className:r,children:[x,f,j,h]}),e[24]=f,e[25]=j,e[26]=r,e[27]=x,e[28]=v):v=e[28];let p;e[29]!==a?(p=a?s.jsx("span",{className:"line-clamp-3 whitespace-pre-line text-xs text-muted-foreground",children:a}):null,e[29]=a,e[30]=p):p=e[30];let N;return e[31]!==v||e[32]!==p||e[33]!==o||e[34]!==d||e[35]!==u||e[36]!==g?(N=s.jsxs("a",{href:o,target:d,rel:u,className:g,children:[v,p]}),e[31]=v,e[32]=p,e[33]=o,e[34]=d,e[35]=u,e[36]=g,e[37]=N):N=e[37],N}function rl(t){const e=z.c(5),{itemId:l}=t,{data:a,isLoading:n}=Xs(l);if(!n&&(!a||a.length===0))return null;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[s.jsx(ut,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm text-foreground",children:"Pull requests"})]}),e[0]=i):i=e[0];let r;e[1]!==a?(r=a?a.map(il):s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-4 py-2 text-sm text-muted-foreground",children:[s.jsx(Et,{size:16,className:"animate-spin"}),s.jsx("span",{children:"Loading…"})]}),e[1]=a,e[2]=r):r=e[2];let o;return e[3]!==r?(o=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[i,r]}),e[3]=r,e[4]=o):o=e[4],o}function il(t){return s.jsx(al,{pr:t},t.url)}const zt="__unassigned__",gt={assignee:null,priority:null,due:null};function ol(t){return t.assignee!==null||t.priority!==null||t.due!==null}function cl(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const dl=864e5;function ul(t,e){const l=new Date(t),a=new Date(e);return l.getFullYear()===a.getFullYear()&&l.getMonth()===a.getMonth()&&l.getDate()===a.getDate()}function ml(t,e){if(e.assignee!==null){if(e.assignee===zt){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==e.assignee)return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const l=new Date(t.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&l>=a||e.due==="today"&&!ul(l,a)||e.due==="week"&&(l<a||l>a+7*dl))return!1}return!0}const Ut=[{value:"overdue",label:"Overdue"},{value:"today",label:"Due today"},{value:"week",label:"Due this week"},{value:"none",label:"No due date"}];function ht(t,e=!1){return k("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function fl(t){const e=z.c(62),{value:l,members:a,onChange:n,block:i}=t,[r,o]=I.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(It,{size:14,className:"shrink-0"}),e[0]=d):d=e[0];let u=d,g="Assignee";if(l===zt)g="Unassigned";else if(l===pe){let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(ue,{size:14}),e[1]=_):_=e[1],u=_,g="Super Agent"}else if(l){let _,$,K,M;if(e[2]!==a||e[3]!==l){let G;e[8]!==l?(G=se=>se.userId===l,e[8]=l,e[9]=G):G=e[9],$=a.find(G),_=ie,K=$?.user?.image??void 0,M=re($?.user?.name),e[2]=a,e[3]=l,e[4]=_,e[5]=$,e[6]=K,e[7]=M}else _=e[4],$=e[5],K=e[6],M=e[7];let Q;e[10]!==_||e[11]!==K||e[12]!==M?(Q=s.jsx(_,{url:K,fallback:M,shape:"circle",size:"2xs"}),e[10]=_,e[11]=K,e[12]=M,e[13]=Q):Q=e[13],u=Q,g=$?.user?.name??"Member"}let m;e[14]!==n?(m=_=>{n(_),o(!1)},e[14]=n,e[15]=m):m=e[15];const c=m,x=l!==null;let b;e[16]!==i||e[17]!==x?(b=ht(x,i),e[16]=i,e[17]=x,e[18]=b):b=e[18];const f=b,j=i&&"ml-auto";let h;e[19]!==j?(h=k("shrink-0 opacity-60",j),e[19]=j,e[20]=h):h=e[20];const v=h;let p;e[21]!==g?(p=s.jsx("span",{className:"max-w-[10rem] truncate",children:g}),e[21]=g,e[22]=p):p=e[22];let N;e[23]!==v?(N=s.jsx(Bt,{size:12,className:v}),e[23]=v,e[24]=N):N=e[24];let y;e[25]!==u||e[26]!==p||e[27]!==N||e[28]!==f?(y=s.jsx(_t,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,children:[u,p,N]})}),e[25]=u,e[26]=p,e[27]=N,e[28]=f,e[29]=y):y=e[29];let w;e[30]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Wt,{placeholder:"Filter by assignee…",className:"h-9"}),e[30]=w):w=e[30];let C;e[31]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Zt,{children:"No members found."}),e[31]=C):C=e[31];let O;e[32]!==c?(O=s.jsx(fe,{value:"Anyone",onSelect:()=>c(null),children:"Anyone"}),e[32]=c,e[33]=O):O=e[33];let L;e[34]!==c?(L=()=>c(zt),e[34]=c,e[35]=L):L=e[35];let Y;e[36]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(It,{size:16,className:"text-muted-foreground"}),e[36]=Y):Y=e[36];let T;e[37]!==L?(T=s.jsxs(fe,{value:"Unassigned",onSelect:L,className:"gap-2",children:[Y,"Unassigned"]}),e[37]=L,e[38]=T):T=e[38];let U;e[39]!==c?(U=()=>c(pe),e[39]=c,e[40]=U):U=e[40];let q;e[41]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(ue,{size:16}),e[41]=q):q=e[41];let R;e[42]!==U?(R=s.jsxs(fe,{value:"Super Agent",onSelect:U,className:"gap-2",children:[q,"Super Agent"]}),e[42]=U,e[43]=R):R=e[43];let B;e[44]!==O||e[45]!==T||e[46]!==R?(B=s.jsxs(pt,{children:[O,T,R]}),e[44]=O,e[45]=T,e[46]=R,e[47]=B):B=e[47];let F;if(e[48]!==a||e[49]!==c){let _;e[51]!==c?(_=$=>s.jsxs(fe,{value:$.user?.name??$.userId,onSelect:()=>c($.userId),className:"gap-2",children:[s.jsx(ie,{url:$.user?.image??void 0,fallback:re($.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:$.user?.name??$.userId})]},$.userId),e[51]=c,e[52]=_):_=e[52],F=a.map(_),e[48]=a,e[49]=c,e[50]=F}else F=e[50];let P;e[53]!==F?(P=s.jsx(pt,{heading:"Members",children:F}),e[53]=F,e[54]=P):P=e[54];let A;e[55]!==B||e[56]!==P?(A=s.jsx(Dt,{align:"start",className:"w-56 p-0",children:s.jsxs(es,{children:[w,s.jsxs(ts,{children:[C,B,P]})]})}),e[55]=B,e[56]=P,e[57]=A):A=e[57];let H;return e[58]!==r||e[59]!==A||e[60]!==y?(H=s.jsxs(kt,{open:r,onOpenChange:o,children:[y,A]}),e[58]=r,e[59]=A,e[60]=y,e[61]=H):H=e[61],H}function xl(t){const e=z.c(23),{value:l,onChange:a,block:n}=t,i=l!==null;let r;e[0]!==n||e[1]!==i?(r=ht(i,n),e[0]=n,e[1]=i,e[2]=r):r=e[2];const o=r,d=n&&"ml-auto";let u;e[3]!==d?(u=k("shrink-0 opacity-60",d),e[3]=d,e[4]=u):u=e[4];const g=u;let m;e[5]!==l?(m=l?s.jsx("span",{className:k("size-2 shrink-0 rounded-full",oe[l].dotClassName)}):s.jsx(Ks,{size:14,className:"shrink-0"}),e[5]=l,e[6]=m):m=e[6];const c=l?oe[l].label:"Priority";let x;e[7]!==g?(x=s.jsx(Bt,{size:12,className:g}),e[7]=g,e[8]=x):x=e[8];let b;e[9]!==m||e[10]!==c||e[11]!==x||e[12]!==o?(b=s.jsx(mt,{asChild:!0,children:s.jsxs("button",{type:"button",className:o,children:[m,c,x]})}),e[9]=m,e[10]=c,e[11]=x,e[12]=o,e[13]=b):b=e[13];let f,j;e[14]!==a?(j=s.jsx(Ve,{onSelect:()=>a(null),children:"Any priority"}),f=as.map(p=>s.jsxs(Ve,{onSelect:()=>a(p),className:"gap-2",children:[s.jsx("span",{className:k("size-2 rounded-full",oe[p].dotClassName)}),oe[p].label]},p)),e[14]=a,e[15]=f,e[16]=j):(f=e[15],j=e[16]);let h;e[17]!==f||e[18]!==j?(h=s.jsxs(ft,{align:"start",className:"w-40",children:[j,f]}),e[17]=f,e[18]=j,e[19]=h):h=e[19];let v;return e[20]!==h||e[21]!==b?(v=s.jsxs(xt,{children:[b,h]}),e[20]=h,e[21]=b,e[22]=v):v=e[22],v}function pl(t){const e=z.c(27),{value:l,onChange:a,block:n}=t;let i;e[0]!==l?(i=Ut.find(C=>C.value===l)?.label,e[0]=l,e[1]=i):i=e[1];const r=i,o=l!==null;let d;e[2]!==n||e[3]!==o?(d=ht(o,n),e[2]=n,e[3]=o,e[4]=d):d=e[4];const u=d,g=n&&"ml-auto";let m;e[5]!==g?(m=k("shrink-0 opacity-60",g),e[5]=g,e[6]=m):m=e[6];const c=m;let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Je,{size:14,className:"shrink-0"}),e[7]=x):x=e[7];const b=r??"Due date";let f;e[8]!==c?(f=s.jsx(Bt,{size:12,className:c}),e[8]=c,e[9]=f):f=e[9];let j;e[10]!==b||e[11]!==f||e[12]!==u?(j=s.jsx(mt,{asChild:!0,children:s.jsxs("button",{type:"button",className:u,children:[x,b,f]})}),e[10]=b,e[11]=f,e[12]=u,e[13]=j):j=e[13];let h;e[14]!==a?(h=()=>a(null),e[14]=a,e[15]=h):h=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Je,{size:16,className:"text-muted-foreground"}),e[16]=v):v=e[16];let p;e[17]!==h?(p=s.jsxs(Ve,{onSelect:h,className:"gap-2",children:[v,"Any time"]}),e[17]=h,e[18]=p):p=e[18];let N;e[19]!==a?(N=Ut.map(C=>{const O=C.value==="overdue";return s.jsxs(Ve,{onSelect:()=>a(C.value),className:k("gap-2",O&&"text-destructive"),children:[s.jsx(Je,{size:16,className:k("shrink-0",O?"text-destructive":"text-muted-foreground")}),C.label]},C.value)}),e[19]=a,e[20]=N):N=e[20];let y;e[21]!==p||e[22]!==N?(y=s.jsxs(ft,{align:"start",className:"w-44",children:[p,N]}),e[21]=p,e[22]=N,e[23]=y):y=e[23];let w;return e[24]!==y||e[25]!==j?(w=s.jsxs(xt,{children:[j,y]}),e[24]=y,e[25]=j,e[26]=w):w=e[26],w}function rs(t){const e=z.c(26),{filters:l,members:a,onChange:n,block:i}=t;let r;e[0]!==l||e[1]!==n?(r=x=>n({...l,assignee:x}),e[0]=l,e[1]=n,e[2]=r):r=e[2];let o;e[3]!==i||e[4]!==l.assignee||e[5]!==a||e[6]!==r?(o=s.jsx(fl,{block:i,value:l.assignee,members:a,onChange:r}),e[3]=i,e[4]=l.assignee,e[5]=a,e[6]=r,e[7]=o):o=e[7];let d;e[8]!==l||e[9]!==n?(d=x=>n({...l,priority:x}),e[8]=l,e[9]=n,e[10]=d):d=e[10];let u;e[11]!==i||e[12]!==l.priority||e[13]!==d?(u=s.jsx(xl,{block:i,value:l.priority,onChange:d}),e[11]=i,e[12]=l.priority,e[13]=d,e[14]=u):u=e[14];let g;e[15]!==l||e[16]!==n?(g=x=>n({...l,due:x}),e[15]=l,e[16]=n,e[17]=g):g=e[17];let m;e[18]!==i||e[19]!==l.due||e[20]!==g?(m=s.jsx(pl,{block:i,value:l.due,onChange:g}),e[18]=i,e[19]=l.due,e[20]=g,e[21]=m):m=e[21];let c;return e[22]!==o||e[23]!==u||e[24]!==m?(c=s.jsxs(s.Fragment,{children:[o,u,m]}),e[22]=o,e[23]=u,e[24]=m,e[25]=c):c=e[25],c}function gl(t){const e=z.c(11),{filters:l,members:a,onChange:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ss,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=i):i=e[0];let r;e[1]!==l||e[2]!==a||e[3]!==n?(r=s.jsx(rs,{filters:l,members:a,onChange:n}),e[1]=l,e[2]=a,e[3]=n,e[4]=r):r=e[4];let o;e[5]!==l||e[6]!==n?(o=ol(l)&&s.jsx("button",{type:"button",onClick:()=>n(gt),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Clear"}),e[5]=l,e[6]=n,e[7]=o):o=e[7];let d;return e[8]!==r||e[9]!==o?(d=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i,r,o]}),e[8]=r,e[9]=o,e[10]=d):d=e[10],d}function hl(t){const e=z.c(26),{filters:l,members:a,onChange:n}=t,[i,r]=I.useState(!1),o=cl(l),d=o>0;let u;e[0]!==d?(u=ht(d),e[0]=d,e[1]=u):u=e[1];const g=u;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ss,{size:14,className:"shrink-0"}),e[2]=m):m=e[2];let c;e[3]!==o?(c=o>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:o}),e[3]=o,e[4]=c):c=e[4];let x;e[5]!==c||e[6]!==g?(x=s.jsx(Rs,{asChild:!0,children:s.jsxs("button",{type:"button",className:g,children:[m,"Filters",c]})}),e[5]=c,e[6]=g,e[7]=x):x=e[7];let b;e[8]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ps,{className:"px-4 pt-4 text-base font-medium text-foreground",children:"Filters"}),e[8]=b):b=e[8];let f;e[9]!==l||e[10]!==a||e[11]!==n?(f=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(rs,{block:!0,filters:l,members:a,onChange:n})}),e[9]=l,e[10]=a,e[11]=n,e[12]=f):f=e[12];let j;e[13]!==o||e[14]!==n?(j=o>0&&s.jsx(xe,{variant:"outline",className:"flex-1",onClick:()=>n(gt),children:"Clear all"}),e[13]=o,e[14]=n,e[15]=j):j=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Ms,{asChild:!0,children:s.jsx(xe,{className:"flex-1",children:"Done"})}),e[16]=h):h=e[16];let v;e[17]!==j?(v=s.jsxs(Ls,{className:"flex-row gap-2",children:[j,h]}),e[17]=j,e[18]=v):v=e[18];let p;e[19]!==v||e[20]!==f?(p=s.jsxs(Us,{className:"p-0",children:[b,f,v]}),e[19]=v,e[20]=f,e[21]=p):p=e[21];let N;return e[22]!==i||e[23]!==p||e[24]!==x?(N=s.jsxs(qs,{open:i,onOpenChange:r,direction:"bottom",children:[x,p]}),e[22]=i,e[23]=p,e[24]=x,e[25]=N):N=e[25],N}const qt=380,bl=90,Kt=5,jl="cubic-bezier(0.22, 0.61, 0.36, 1)",Nl=8;function yl(t,e){const l=I.useRef(new Map);I.useLayoutEffect(()=>{const a=t.current;if(!a)return;const n=a.querySelectorAll("[data-flip-id]"),i=l.current,r=new Map,o=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,d=[];for(const c of n){const x=c.dataset.flipId;if(!x)continue;const b=c.getBoundingClientRect();r.set(x,b);const f=i.get(x);if(!f)continue;const j=f.left-b.left,h=f.top-b.top;(j||h)&&d.push({el:c,dx:j,dy:h,lane:Math.abs(j)>Nl})}if(l.current=r,o||d.length===0)return;for(const c of d){const x=c.lane?` rotate(${c.dx>0?Kt:-Kt}deg)`:"";c.el.style.transition="none",c.el.style.transform=`translate(${c.dx}px, ${c.dy}px)${x}`,c.lane&&(c.el.style.zIndex="10")}let u=0;const g=[],m=requestAnimationFrame(()=>{for(const c of d){const x=c.lane?u++*bl:0;c.el.style.transition=`transform ${qt}ms ${jl} ${x}ms`,c.el.style.transform="",g.push(window.setTimeout(()=>{c.el.style.transition="",c.el.style.transform="",c.el.style.zIndex=""},qt+x+30))}});return()=>{cancelAnimationFrame(m);for(const c of g)clearTimeout(c)}},[e,t])}ms(()=>import("./index-Bnro1Vjb.js").then(t=>t.aY),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154])).catch(()=>{});function vl(){const t=z.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(us,{})})})}),t[0]=e):e=t[0],e}const Sl=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function Cl(t){const e=new Date(t),l=e.getTime()<Date.now();return{label:Sl.format(e),overdue:l}}const Rt="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground";function is(){const t=z.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=k(Rt,"border-warning/30 text-warning"),t[0]=e):e=t[0];let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("span",{className:e,title:"The agent is waiting for your input",children:[s.jsx(Ht,{size:14}),"Needs input"]}),t[1]=l):l=t[1],l}function os(t){const e=z.c(7),{priority:l}=t,a=oe[l];let n;e[0]!==a.dotClassName?(n=k("size-2 rounded-full",a.dotClassName),e[0]=a.dotClassName,e[1]=n):n=e[1];let i;e[2]!==n?(i=s.jsx("span",{className:n}),e[2]=n,e[3]=i):i=e[3];let r;return e[4]!==a.label||e[5]!==i?(r=s.jsxs("span",{className:Rt,children:[i,a.label]}),e[4]=a.label,e[5]=i,e[6]=r):r=e[6],r}function cs(t){const e=z.c(7),{iso:l}=t;let a,n;if(e[0]!==l){const{label:o,overdue:d}=Cl(l);a=o,n=k(Rt,d&&"border-destructive/30 text-destructive"),e[0]=l,e[1]=a,e[2]=n}else a=e[1],n=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Je,{size:14}),e[3]=i):i=e[3];let r;return e[4]!==a||e[5]!==n?(r=s.jsxs("span",{className:n,children:[i,a]}),e[4]=a,e[5]=n,e[6]=r):r=e[6],r}function ds(t){const e=z.c(11),{item:l,assignee:a,assignedBy:n}=t;if(l.assigneeId===pe){const i=n?.user?.name?`Assigned to Super Agent by ${n.user.name}`:"Assigned to Super Agent";let r;e[0]!==n?(r=n&&s.jsx(ie,{url:n.user?.image??void 0,fallback:re(n.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),e[0]=n,e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ue,{size:16,className:"ring-2 ring-background"}),e[2]=o):o=e[2];let d;return e[3]!==i||e[4]!==r?(d=s.jsxs("span",{className:"inline-flex items-center",title:i,children:[r,o]}),e[3]=i,e[4]=r,e[5]=d):d=e[5],d}if(a){const i=a.user?.image??void 0,r=a.user?.name;let o;e[6]!==r?(o=re(r),e[6]=r,e[7]=o):o=e[7];let d;return e[8]!==i||e[9]!==o?(d=s.jsx(ie,{url:i,fallback:o,shape:"circle",size:"2xs"}),e[8]=i,e[9]=o,e[10]=d):d=e[10],d}return null}function us(){const t=z.c(65),{items:e,isLoading:l}=Hs(),a=Vs(),n=Qs(),{data:i}=Vt();let r,o;t[0]!==i?.data?.members?(r=i?.data?.members??[],o=new Map(r.map(wl)),t[0]=i?.data?.members,t[1]=r,t[2]=o):(r=t[1],o=t[2]);const d=o,[u,g]=I.useState("board"),[m,c]=I.useState(gt),[x,b]=I.useState(!1),[f,j]=I.useState(null),[h,v]=I.useState(null),{setTaskId:p}=Gs();let N,y,w,C;if(t[3]!==a||t[4]!==m||t[5]!==l||t[6]!==e||t[7]!==u||t[8]!==d||t[9]!==r||t[10]!==n){C=Symbol.for("react.early_return_sentinel");e:{let A;t[15]!==m?(A=D=>ml(D,m),t[15]=m,t[16]=A):A=t[16];const H=e.filter(A);let _;t[17]===Symbol.for("react.memo_cache_sentinel")?(_=()=>{j(null),v(null),b(!0)},t[17]=_):_=t[17];const $=_;let K;t[18]===Symbol.for("react.memo_cache_sentinel")?(K=D=>{j(null),v(D),b(!0)},t[18]=K):K=t[18];const M=K;let Q;t[19]===Symbol.for("react.memo_cache_sentinel")?(Q=D=>{j(D),b(!0)},t[19]=Q):Q=t[19];const se=Q;if(l&&e.length===0){let D;t[20]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(fs,{size:20,className:"animate-spin text-muted-foreground"})}),t[20]=D):D=t[20],C=D;break e}N="flex min-h-0 flex-1 flex-col";let E;t[21]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:"Tasks"}),t[21]=E):E=t[21];let te;t[22]!==m||t[23]!==e.length||t[24]!==r?(te=e.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sm:hidden",children:s.jsx(hl,{filters:m,members:r,onChange:c})}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(gl,{filters:m,members:r,onChange:c})})]}),t[22]=m,t[23]=e.length,t[24]=r,t[25]=te):te=t[25];const ce=u==="list";let le;t[26]===Symbol.for("react.memo_cache_sentinel")?(le=()=>g("list"),t[26]=le):le=t[26];let V;t[27]!==ce?(V=s.jsx(Gt,{active:ce,onClick:le,icon:ys,label:"List"}),t[27]=ce,t[28]=V):V=t[28];const me=u==="board";let Z;t[29]===Symbol.for("react.memo_cache_sentinel")?(Z=()=>g("board"),t[29]=Z):Z=t[29];let ee;t[30]!==me?(ee=s.jsx(Gt,{active:me,onClick:Z,icon:js,label:"Board"}),t[30]=me,t[31]=ee):ee=t[31];let X;t[32]!==V||t[33]!==ee?(X=s.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[V,ee]}),t[32]=V,t[33]=ee,t[34]=X):X=t[34];let ne;t[35]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsxs(xe,{size:"sm",onClick:$,children:[s.jsx(Ot,{size:16}),"New task"]}),t[35]=ne):ne=t[35];let J;t[36]!==X?(J=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[X,ne]}),t[36]=X,t[37]=J):J=t[37],t[38]!==te||t[39]!==J?(y=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 pt-6 sm:px-8 sm:pt-8",children:[E,s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[te,J]})]}),t[38]=te,t[39]=J,t[40]=y):y=t[40],w=e.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsx("div",{className:"rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:"No tasks yet. Start one with New task."})}):H.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:["No tasks match these filters.",s.jsx(xe,{variant:"outline",size:"sm",onClick:()=>c(gt),children:"Clear filters"})]})}):u==="board"?s.jsx(_l,{items:H,memberByUserId:d,onOpen:se,onCreate:M,onMove:(D,de)=>a.update.mutate({id:D,status:de}),onAutoFix:n?D=>a.update.mutate({id:D.id,assigneeId:pe}):void 0}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:s.jsx("div",{className:"mx-auto flex max-w-[820px] flex-col gap-2",children:H.map(D=>s.jsx(Il,{item:D,assignee:D.assigneeId?d.get(D.assigneeId):void 0,assignedBy:D.assignedBy?d.get(D.assignedBy):void 0,onOpen:()=>se(D)},D.id))})})}t[3]=a,t[4]=m,t[5]=l,t[6]=e,t[7]=u,t[8]=d,t[9]=r,t[10]=n,t[11]=N,t[12]=y,t[13]=w,t[14]=C}else N=t[11],y=t[12],w=t[13],C=t[14];if(C!==Symbol.for("react.early_return_sentinel"))return C;const O=x?f?.id??`new-${h??"default"}`:"closed";let L;t[41]===Symbol.for("react.memo_cache_sentinel")?(L=()=>b(!1),t[41]=L):L=t[41];const Y=f??void 0,T=h??void 0,U=a.create.isPending||a.update.isPending;let q;t[42]!==a.create||t[43]!==a.update||t[44]!==f?(q=A=>{f?a.update.mutate({id:f.id,...A}):a.create.mutate(A),b(!1)},t[42]=a.create,t[43]=a.update,t[44]=f,t[45]=q):q=t[45];let R;t[46]!==a.remove||t[47]!==f?(R=f?()=>{a.remove.mutate(f.id),b(!1)}:void 0,t[46]=a.remove,t[47]=f,t[48]=R):R=t[48];let B;t[49]!==p?(B=A=>{A.virtualMcpId&&(b(!1),p(A.threadId,A.virtualMcpId,{main:A.hasPreview?"preview":"board"}))},t[49]=p,t[50]=B):B=t[50];let F;t[51]!==x||t[52]!==q||t[53]!==R||t[54]!==B||t[55]!==O||t[56]!==Y||t[57]!==T||t[58]!==U?(F=s.jsx(el,{open:x,onClose:L,item:Y,defaultStatus:T,isSaving:U,onSubmit:q,onDelete:R,onOpenThread:B},O),t[51]=x,t[52]=q,t[53]=R,t[54]=B,t[55]=O,t[56]=Y,t[57]=T,t[58]=U,t[59]=F):F=t[59];let P;return t[60]!==N||t[61]!==F||t[62]!==y||t[63]!==w?(P=s.jsxs("div",{className:N,children:[y,w,F]}),t[60]=N,t[61]=F,t[62]=y,t[63]=w,t[64]=P):P=t[64],P}function wl(t){return[t.userId,t]}function Gt(t){const e=z.c(11),{active:l,onClick:a,icon:n,label:i}=t,r=`${i} view`,o=l?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let d;e[0]!==o?(d=k("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",o),e[0]=o,e[1]=d):d=e[1];let u;e[2]!==n?(u=s.jsx(n,{size:14}),e[2]=n,e[3]=u):u=e[3];let g;return e[4]!==l||e[5]!==i||e[6]!==a||e[7]!==r||e[8]!==d||e[9]!==u?(g=s.jsxs("button",{type:"button",onClick:a,"aria-label":r,"aria-pressed":l,className:d,children:[u,i]}),e[4]=l,e[5]=i,e[6]=a,e[7]=r,e[8]=d,e[9]=u,e[10]=g):g=e[10],g}function _l(t){const e=z.c(12),{items:l,memberByUserId:a,onOpen:n,onCreate:i,onMove:r,onAutoFix:o}=t,[d,u]=I.useState(null),g=I.useRef(null);let m;e[0]!==l?(m=l.map(Dl).join(","),e[0]=l,e[1]=m):m=e[1],yl(g,m);let x;e[2]!==l||e[3]!==a||e[4]!==o||e[5]!==i||e[6]!==r||e[7]!==n||e[8]!==d?(x=ns.map(f=>{const j=l.filter(p=>p.status===f),h=ae[f],v=h.icon;return s.jsxs("div",{onDragOver:p=>{p.preventDefault(),u(f)},onDragLeave:p=>{p.currentTarget.contains(p.relatedTarget)||u(null)},onDrop:p=>{p.preventDefault();const N=p.dataTransfer.getData("text/plain");N&&r(N,f),u(null)},className:k("flex w-[300px] shrink-0 flex-col rounded-xl p-1 transition-colors",d===f&&"bg-muted/50"),children:[s.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-2 bg-background px-2 py-1.5",children:[s.jsx(v,{size:15,className:k("shrink-0",h.iconClassName)}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:h.label}),s.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:j.length}),s.jsx("button",{type:"button","aria-label":`New task in ${h.label}`,title:`New task in ${h.label}`,onClick:()=>i(f),className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:s.jsx(Ot,{size:15})})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2 pt-1",children:j.map(p=>s.jsx(kl,{item:p,assignee:p.assigneeId?a.get(p.assigneeId):void 0,assignedBy:p.assignedBy?a.get(p.assignedBy):void 0,onOpen:()=>n(p),onAutoFix:o?()=>o(p):void 0},p.id))})]},f)}),e[2]=l,e[3]=a,e[4]=o,e[5]=i,e[6]=r,e[7]=n,e[8]=d,e[9]=x):x=e[9];let b;return e[10]!==x?(b=s.jsx("div",{ref:g,className:"min-h-0 flex-1 overflow-x-auto overflow-y-auto",children:s.jsx("div",{className:"mx-auto flex w-full max-w-[1680px] gap-3 px-4 pt-6 pb-16 sm:px-8",children:x})}),e[10]=x,e[11]=b):b=e[11],b}function Dl(t){return`${t.id}:${t.status}`}function kl(t){const e=z.c(33),{item:l,assignee:a,assignedBy:n,onOpen:i,onAutoFix:r}=t,o=ae[l.status],d=o.icon,u=ls(l)?.lastMessage,g=r&&(l.status==="triage"||l.status==="todo")&&l.assigneeId!==pe,m=l.id;let c;e[0]!==l.id?(c=C=>{C.dataTransfer.setData("text/plain",l.id),C.dataTransfer.effectAllowed="move"},e[0]=l.id,e[1]=c):c=e[1];const x=l.title;let b;e[2]!==o.iconClassName?(b=k("mt-px shrink-0",o.iconClassName),e[2]=o.iconClassName,e[3]=b):b=e[3];let f;e[4]!==d||e[5]!==b?(f=s.jsx(d,{size:16,className:b}),e[4]=d,e[5]=b,e[6]=f):f=e[6];let j;e[7]!==l.title?(j=s.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium leading-snug text-foreground line-clamp-2",children:l.title}),e[7]=l.title,e[8]=j):j=e[8];let h;e[9]!==n||e[10]!==a||e[11]!==l?(h=s.jsx(ds,{item:l,assignee:a,assignedBy:n}),e[9]=n,e[10]=a,e[11]=l,e[12]=h):h=e[12];let v;e[13]!==f||e[14]!==j||e[15]!==h?(v=s.jsxs("div",{className:"flex items-start gap-2",children:[f,j,h]}),e[13]=f,e[14]=j,e[15]=h,e[16]=v):v=e[16];let p;e[17]!==u?(p=u&&s.jsx("p",{className:"line-clamp-2 pl-6 text-xs leading-snug text-muted-foreground",children:u}),e[17]=u,e[18]=p):p=e[18];let N;e[19]!==l?(N=(Tt(l)||l.priority!=="none"||!!l.dueDate)&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-6",children:[Tt(l)&&s.jsx(is,{}),l.priority!=="none"&&s.jsx(os,{priority:l.priority}),l.dueDate&&s.jsx(cs,{iso:l.dueDate})]}),e[19]=l,e[20]=N):N=e[20];let y;e[21]!==r||e[22]!==g?(y=g&&s.jsxs("button",{type:"button",onClick:C=>{C.stopPropagation(),r()},className:"flex items-center gap-1.5 self-end rounded-md border border-border bg-background px-2 py-1 text-xs font-medium text-foreground transition-colors hover:bg-accent",children:[s.jsx(Ns,{size:12}),"Auto-fix"]}),e[21]=r,e[22]=g,e[23]=y):y=e[23];let w;return e[24]!==l.id||e[25]!==l.title||e[26]!==i||e[27]!==N||e[28]!==y||e[29]!==c||e[30]!==v||e[31]!==p?(w=s.jsxs("button",{type:"button",draggable:!0,"data-flip-id":m,onDragStart:c,onClick:i,className:"group flex cursor-grab flex-col gap-2 rounded-xl bg-card px-3 py-2.5 text-left card-shadow transition-colors will-change-transform hover:bg-accent/60 active:cursor-grabbing",title:x,children:[v,p,N,y]}),e[24]=l.id,e[25]=l.title,e[26]=i,e[27]=N,e[28]=y,e[29]=c,e[30]=v,e[31]=p,e[32]=w):w=e[32],w}function Il(t){const e=z.c(30),{item:l,assignee:a,assignedBy:n,onOpen:i}=t,r=ae[l.status],o=r.icon;let d;e[0]!==r.iconClassName?(d=k("shrink-0",r.iconClassName),e[0]=r.iconClassName,e[1]=d):d=e[1];let u;e[2]!==o||e[3]!==d?(u=s.jsx(o,{size:16,className:d}),e[2]=o,e[3]=d,e[4]=u):u=e[4];let g;e[5]!==l.title?(g=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l.title}),e[5]=l.title,e[6]=g):g=e[6];let m;e[7]!==l?(m=Tt(l)&&s.jsx(is,{}),e[7]=l,e[8]=m):m=e[8];let c;e[9]!==l.priority?(c=l.priority!=="none"&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(os,{priority:l.priority})}),e[9]=l.priority,e[10]=c):c=e[10];let x;e[11]!==l.dueDate?(x=l.dueDate&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(cs,{iso:l.dueDate})}),e[11]=l.dueDate,e[12]=x):x=e[12];let b;e[13]!==n||e[14]!==a||e[15]!==l?(b=s.jsx(ds,{item:l,assignee:a,assignedBy:n}),e[13]=n,e[14]=a,e[15]=l,e[16]=b):b=e[16];let f;e[17]!==l.createdAt?(f=_s(new Date(l.createdAt)),e[17]=l.createdAt,e[18]=f):f=e[18];let j;e[19]!==f?(j=s.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:f}),e[19]=f,e[20]=j):j=e[20];let h;return e[21]!==i||e[22]!==u||e[23]!==g||e[24]!==m||e[25]!==c||e[26]!==x||e[27]!==b||e[28]!==j?(h=s.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-accent/60",children:[u,g,m,c,x,b,j]}),e[21]=i,e[22]=u,e[23]=g,e[24]=m,e[25]=c,e[26]=x,e[27]=b,e[28]=j,e[29]=h):h=e[29],h}const un=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:us,default:vl},Symbol.toStringTag,{value:"Module"}));export{oe as P,ae as S,el as T,Vs as a,ue as b,us as c,un as i,Hs as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as it,r as E,j as e,i as rt}from"./index-BEqdT-CX.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-CRtkHPvX.js";import{A as nt}from"./automation-runs-nQ99AMoV.js";import{r as lt,u as ct,a as dt,b as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-55rMBIi9.js";import{r as xt}from"./index-Bnro1Vjb.js";import"./LayoutLeft-CNWN8tpf.js";import"./use-mobile-DbBFg2WD.js";import"./X-CTTK5Zj2.js";import"./tooltip-C7c-Tgru.js";import"./select-Bh2Z8rK3.js";import"./Check-BAiULwRg.js";import"./ChevronDown-Cpk84lU5.js";import"./ChevronUp-CqCnswy_.js";import"./useInfiniteQuery-BnNR1NVs.js";import"./use-infinite-scroll-DYbbFqLK.js";import"./use-connection-DUpx0NEA.js";import"./use-collections-Dy7WD_eH.js";import"./use-mcp-client-DvvHwezb.js";import"./constants-D_FQAPnt.js";import"./auth-BR_fNNK7.js";import"./use-virtual-mcp-CNKe_WaY.js";import"./card-CEUspnmz.js";import"./table-VOE9WRkg.js";import"./empty-state-C6JrR5eZ.js";import"./use-members-BZPSqMOT.js";import"./use-org-auth-client-PHOIKqSH.js";import"./use-clock-tick-F8Oybd0p.js";import"./AlertCircle-DFFB807G.js";import"./CheckCircle-BwwAyNzV.js";import"./Circle-pOPoWDQn.js";import"./agent-icon-jdj2JAEm.js";import"./UserPlus01-DjFNU1Mn.js";import"./Tool01-CSravChF.js";import"./ArrowUp-CFU7eduC.js";import"./Settings02-D5c8FtUa.js";import"./Tool02-csu1mOp1.js";import"./XCircle-CiVL5z-e.js";import"./ArrowUpRight-D37SsWBk.js";import"./TrendUp01-Dw2DNRxA.js";import"./ZapSquare-BDp8YrcS.js";import"./ZoomOut-CvmU5uj5.js";import"./Users03-Iz-TpUuJ.js";import"./ChevronRight-UlscOqp6.js";import"./Stars02-CzKVb8lE.js";import"./Copy01-BEB5hDKQ.js";import"./DotsVertical-BFfMlorx.js";import"./Globe01-DVm51A__.js";import"./Eye-Bbh_ejV6.js";import"./FilterLines-Dm0WP1zI.js";import"./Flag01-e55mynPF.js";import"./Star01-C32-NjaL.js";import"./Globe04-DA8QsMrW.js";import"./SwitchHorizontal01-C8Rnw5uG.js";import"./HardDrive-BJ2MS6we.js";import"./Image01-Y4d3ZI2r.js";import"./Key01-xPUeBTf6.js";import"./LinkExternal01-B6bTrNoI.js";import"./List-gTaMGV9z.js";import"./Monitor01-BdI_dCjX.js";import"./Sun-BPhwV-Eh.js";import"./Package-WlP_SelV.js";import"./Palette-DwivsXKp.js";import"./Play-BPQdBfbt.js";import"./Plus-C8FiAr3i.js";import"./SearchLg-CMWIHllt.js";import"./SearchMd-Gwm-384G.js";import"./Shield01-Dn6encQp.js";import"./Stars01-C8WemEnv.js";import"./Trash01-DZTkGJqE.js";import"./Upload01-s2ES1URH.js";import"./User01-D0_zDlJM.js";import"./Users01-CAC4FOXB.js";import"./XClose-DxMKQUUD.js";import"./Zap-CrYnUVJy.js";import"./use-automations-CELpHT79.js";import"./studio-tools-Cdt3UzXo.js";import"./useSuspenseInfiniteQuery-3QrNhYz_.js";import"./avatar-DJpRqbqg.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-C0FUXmsm.js";import"./file-type-icon-BR1G8n26.js";import"./dialog-BboVhzku.js";import"./tab-id-BijBBRwE.js";import"./hooks-DYM3Q-Vq.js";import"./decopilot-sse-pool-pi1pVqbX.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-CAoh3qxf.js";import"./autosend-CIDdvZqc.js";import"./use-ai-providers-C7iVrgY-.js";import"./use-decopilot-events-btxE-D2k.js";import"./use-organization-settings-CpbybQHD.js";import"./monaco-editor-YwujFe9g.js";import"./index-BTfVRtBq.js";import"./index-BXfKOYdf.js";import"./shell-layout-CcPRSmgX.js";import"./alert-dialog-DtmlB9JL.js";import"./required-auth-layout-BXaZVxWQ.js";import"./use-org-sso-BA_UxewI.js";import"./integration-icon-Dhyv93zr.js";import"./use-navigate-to-agent-CBi1-FBB.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-oIJCSonG.js";import"./form-p6ZihW38.js";import"./label-DbwTUWd9.js";import"./input-CqfDyI-C.js";import"./switch-BL8XQR8K.js";import"./drawer-D5XLtSzP.js";import"./collection-search-BLJH2aa6.js";import"./tabs-DPmfTv0c.js";import"./toggle-group-BnuMLJr8.js";import"./use-deco-credits-56-eyw-E.js";import"./extract-connection-data-DEmXsdA0.js";import"./connection-card-DPw_9IvV.js";import"./use-registry-connections-CX_dlku1.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-B9g6Z2-r.js";import"./connection-form-helpers-svNTHB1P.js";import"./authenticate-and-persist-oauth-BuaZSTeD.js";import"./mcp-oauth-CeGeftbL.js";import"./collection-tabs-D10lR104.js";import"./badge-zT-Fh3qN.js";import"./connect-desktop-dialog-B4c48mz3.js";import"./select-model-BHB_Fir_.js";import"./checkbox-C7atZRmN.js";import"./skeleton-C-LbiBGP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-HiisdE7T.js";import"./command-Cih9cb-G.js";import"./index-Dz8rxMiO.js";import"./popover-BJYBT3EY.js";import"./dropdown-menu-DcV4HAvf.js";import"./index-S6xdCjXr.js";import"./toolbar-65iromlk.js";import"./use-debounced-value-BqHYI-kn.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BrRSDeZW.js";import"./use-mcp-tools-Be4djRS3.js";import"./use-capability-DsC1r5oD.js";import"./use-debounced-autosave-IEMI4Muz.js";import"./index-BXTPhNSj.js";import"./search-input-CYwO2ZSV.js";import"./use-mcp-auth-status-Dy_Y2kKR.js";import"./github-repo-picker-B_QoRL-b.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-ChIMRFxc.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Zwoux9HO.js";import"./index-CbMrlBFr.js";import"./get-initials-D-f_fDFw.js";import"./calendar-CibxNjt0.js";import"./toolbar-icon-button-BBh2Csxi.js";import"./use-file-configs-CYmkQ98g.js";import"./automation-list-row-BuCXNsSo.js";function hi(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const A=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const M=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const V=F,q=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,z=m.kind==="site"&&o&&n,B=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==q?(l=e.jsx(mt,{className:"text-sm font-semibold",children:q}),t[13]=q,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==$||t[22]!==H||t[23]!==A||t[24]!==v||t[25]!==h||t[26]!==B||t[27]!==x||t[28]!==M||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==z||t[37]!==_?(S=!o||!T&&!z?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:B}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:A,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:M})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=A,t[24]=v,t[25]=h,t[26]=B,t[27]=x,t[28]=M,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=z,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==V||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:V,children:f}),t[42]=V,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{hi as SeoSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as H,j as t,B as Z}from"./index-BEqdT-CX.js";import{n as ee}from"./LinkExternal01-B6bTrNoI.js";import{az as te,g as ie}from"./agent-icon-jdj2JAEm.js";import{I as J}from"./input-CqfDyI-C.js";import{L as G}from"./label-DbwTUWd9.js";import{M as oe}from"./multi-select-B1FaaLCf.js";import{b as Q,c as se,T as W,a as re}from"./tabs-DPmfTv0c.js";import{T as le}from"./textarea-B9g6Z2-r.js";import{v as ae,w as me,o as pe,x as ne,y as ce,I as de,z as fe,A as ue,B as xe}from"./index-Bnro1Vjb.js";import{b as he,a as ge,B as ve}from"./block-document-2XwXLkCF.js";import{u as je}from"./use-autosave-B1tnyn5H.js";import{s as E,E as be,R as ye,A as Ce}from"./primitives-QqbAbc1Q.js";import"./AlertCircle-DFFB807G.js";import"./UserPlus01-DjFNU1Mn.js";import"./Tool01-CSravChF.js";import"./ArrowUp-CFU7eduC.js";import"./Settings02-D5c8FtUa.js";import"./Tool02-csu1mOp1.js";import"./XCircle-CiVL5z-e.js";import"./ArrowUpRight-D37SsWBk.js";import"./TrendUp01-Dw2DNRxA.js";import"./ZapSquare-BDp8YrcS.js";import"./ZoomOut-CvmU5uj5.js";import"./Users03-Iz-TpUuJ.js";import"./CheckCircle-BwwAyNzV.js";import"./Check-BAiULwRg.js";import"./ChevronDown-Cpk84lU5.js";import"./ChevronRight-UlscOqp6.js";import"./ChevronUp-CqCnswy_.js";import"./Circle-pOPoWDQn.js";import"./Stars02-CzKVb8lE.js";import"./Copy01-BEB5hDKQ.js";import"./DotsVertical-BFfMlorx.js";import"./Globe01-DVm51A__.js";import"./Eye-Bbh_ejV6.js";import"./FilterLines-Dm0WP1zI.js";import"./Flag01-e55mynPF.js";import"./Star01-C32-NjaL.js";import"./Globe04-DA8QsMrW.js";import"./SwitchHorizontal01-C8Rnw5uG.js";import"./HardDrive-BJ2MS6we.js";import"./Image01-Y4d3ZI2r.js";import"./Key01-xPUeBTf6.js";import"./LayoutLeft-CNWN8tpf.js";import"./List-gTaMGV9z.js";import"./Monitor01-BdI_dCjX.js";import"./Sun-BPhwV-Eh.js";import"./Package-WlP_SelV.js";import"./Palette-DwivsXKp.js";import"./Play-BPQdBfbt.js";import"./Plus-C8FiAr3i.js";import"./SearchLg-CMWIHllt.js";import"./SearchMd-Gwm-384G.js";import"./Shield01-Dn6encQp.js";import"./Stars01-C8WemEnv.js";import"./Trash01-DZTkGJqE.js";import"./Upload01-s2ES1URH.js";import"./User01-D0_zDlJM.js";import"./Users01-CAC4FOXB.js";import"./XClose-DxMKQUUD.js";import"./X-CTTK5Zj2.js";import"./Zap-CrYnUVJy.js";import"./badge-zT-Fh3qN.js";import"./checkbox-C7atZRmN.js";import"./command-Cih9cb-G.js";import"./index-Dz8rxMiO.js";import"./dialog-BboVhzku.js";import"./popover-BJYBT3EY.js";import"./chat-context-CAoh3qxf.js";import"./autosend-CIDdvZqc.js";import"./hooks-DYM3Q-Vq.js";import"./use-mcp-client-DvvHwezb.js";import"./constants-D_FQAPnt.js";import"./auth-BR_fNNK7.js";import"./decopilot-sse-pool-pi1pVqbX.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-Cdt3UzXo.js";import"./use-virtual-mcp-CNKe_WaY.js";import"./use-collections-Dy7WD_eH.js";import"./use-ai-providers-C7iVrgY-.js";import"./use-decopilot-events-btxE-D2k.js";import"./tab-id-BijBBRwE.js";import"./use-organization-settings-CpbybQHD.js";import"./automation-runs-nQ99AMoV.js";import"./select-Bh2Z8rK3.js";import"./tooltip-C7c-Tgru.js";import"./useInfiniteQuery-BnNR1NVs.js";import"./use-infinite-scroll-DYbbFqLK.js";import"./use-connection-DUpx0NEA.js";import"./card-CEUspnmz.js";import"./sidebar-CRtkHPvX.js";import"./use-mobile-DbBFg2WD.js";import"./table-VOE9WRkg.js";import"./empty-state-C6JrR5eZ.js";import"./use-members-BZPSqMOT.js";import"./use-org-auth-client-PHOIKqSH.js";import"./use-clock-tick-F8Oybd0p.js";import"./use-automations-CELpHT79.js";import"./useSuspenseInfiniteQuery-3QrNhYz_.js";import"./avatar-DJpRqbqg.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-C0FUXmsm.js";import"./file-type-icon-BR1G8n26.js";import"./monaco-editor-YwujFe9g.js";import"./index-BTfVRtBq.js";import"./index-BXfKOYdf.js";import"./shell-layout-CcPRSmgX.js";import"./alert-dialog-DtmlB9JL.js";import"./required-auth-layout-BXaZVxWQ.js";import"./use-org-sso-BA_UxewI.js";import"./integration-icon-Dhyv93zr.js";import"./use-navigate-to-agent-CBi1-FBB.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-oIJCSonG.js";import"./form-p6ZihW38.js";import"./drawer-D5XLtSzP.js";import"./collection-search-BLJH2aa6.js";import"./toggle-group-BnuMLJr8.js";import"./use-deco-credits-56-eyw-E.js";import"./extract-connection-data-DEmXsdA0.js";import"./connection-card-DPw_9IvV.js";import"./use-registry-connections-CX_dlku1.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-svNTHB1P.js";import"./authenticate-and-persist-oauth-BuaZSTeD.js";import"./mcp-oauth-CeGeftbL.js";import"./collection-tabs-D10lR104.js";import"./connect-desktop-dialog-B4c48mz3.js";import"./select-model-BHB_Fir_.js";import"./skeleton-C-LbiBGP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-HiisdE7T.js";import"./dropdown-menu-DcV4HAvf.js";import"./index-S6xdCjXr.js";import"./toolbar-65iromlk.js";import"./use-debounced-value-BqHYI-kn.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BrRSDeZW.js";import"./use-mcp-tools-Be4djRS3.js";import"./use-capability-DsC1r5oD.js";import"./use-debounced-autosave-IEMI4Muz.js";import"./index-BXTPhNSj.js";import"./search-input-CYwO2ZSV.js";import"./use-mcp-auth-status-Dy_Y2kKR.js";import"./switch-BL8XQR8K.js";import"./github-repo-picker-B_QoRL-b.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-ChIMRFxc.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Zwoux9HO.js";import"./index-CbMrlBFr.js";import"./get-initials-D-f_fDFw.js";import"./calendar-CibxNjt0.js";import"./toolbar-icon-button-BBh2Csxi.js";import"./use-file-configs-CYmkQ98g.js";import"./automation-list-row-BuCXNsSo.js";function ke(g){return Array.isArray(g)?g.map(e=>({key:E(e?.key),value:E(e?.value)})):[]}function wo(g){const e=H.c(66),{orgSlug:o,virtualMcpId:m,branch:i,blockKey:f,block:a,decofile:l,meta:c,previewBaseUrl:h}=g;let x;e[0]!==i||e[1]!==o||e[2]!==m?(x={orgSlug:o,virtualMcpId:m,branch:i},e[0]=i,e[1]=o,e[2]=m,e[3]=x):x=e[3];const r=ae(x);let p;e[4]!==a?(p=me(a,"posts"),e[4]=a,e[5]=p):p=e[5];const d=p;let n;e[6]!==f||e[7]!==r?(n=F=>{r.mutate({blockKey:f,data:ne(f,"posts",ce(F))})},e[6]=f,e[7]=r,e[8]=n):n=e[8];const[s,N]=je(d,n);let S;e[9]!==s||e[10]!==N?(S=(F,Y)=>N({...s,[F]:Y}),e[9]=s,e[10]=N,e[11]=S):S=e[11];const v=S;let w;e[12]!==l||e[13]!==s||e[14]!==h?(w=he({decofile:l,post:s,previewBaseUrl:h}),e[12]=l,e[13]=s,e[14]=h,e[15]=w):w=e[15];const j=w;let b;e[16]!==s.title?(b=E(s.title)||"Untitled post",e[16]=s.title,e[17]=b):b=e[17];let y;e[18]!==b?(y=t.jsx("span",{className:"truncate text-sm font-medium",children:b}),e[18]=b,e[19]=y):y=e[19];let C;e[20]!==r.isError||e[21]!==r.isPending?(C=t.jsx(pe,{isPending:r.isPending,isError:r.isError}),e[20]=r.isError,e[21]=r.isPending,e[22]=C):C=e[22];const P=!j,_=j?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let k;e[23]!==j?(k=()=>{j&&window.open(j,"_blank","noopener,noreferrer")},e[23]=j,e[24]=k):k=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 u;e[26]!==_||e[27]!==k||e[28]!==P?(u=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",disabled:P,title:_,onClick:k,children:[B,"See preview"]}),e[26]=_,e[27]=k,e[28]=P,e[29]=u):u=e[29];let T;e[30]!==u||e[31]!==C?(T=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[C,u]}),e[30]=u,e[31]=C,e[32]=T):T=e[32];let R;e[33]!==T||e[34]!==y?(R=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[y,T]}),e[33]=T,e[34]=y,e[35]=R):R=e[35];let A;e[36]!==s.title?(A=E(s.title),e[36]=s.title,e[37]=A):A=e[37];let L;e[38]!==v?(L=F=>v("title",F),e[38]=v,e[39]=L):L=e[39];let I;e[40]!==A||e[41]!==L?(I=t.jsx(be,{value:A,onChange:L,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[40]=A,e[41]=L,e[42]=I):I=e[42];let K;e[43]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsxs(Q,{value:"content",children:[t.jsx(te,{}),"Content"]}),e[43]=K):K=e[43];let O;e[44]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs(se,{children:[K,t.jsxs(Q,{value:"settings",children:[t.jsx(ie,{}),"Settings"]})]}),e[44]=O):O=e[44];let M;e[45]!==s.sections?(M=ge(s.sections),e[45]=s.sections,e[46]=M):M=e[46];let U;e[47]!==v?(U=F=>v("sections",F),e[47]=v,e[48]=U):U=e[48];let V;e[49]!==c||e[50]!==M||e[51]!==U?(V=t.jsx(W,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(ve,{value:M,onChange:U,meta:c,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[49]=c,e[50]=M,e[51]=U,e[52]=V):V=e[52];let $;e[53]!==l||e[54]!==s||e[55]!==v?($=t.jsx(W,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Ne,{post:s,decofile:l,onChange:v})})}),e[53]=l,e[54]=s,e[55]=v,e[56]=$):$=e[56];let z;e[57]!==V||e[58]!==$?(z=t.jsxs(re,{defaultValue:"content",className:"mt-6 gap-4",children:[O,V,$]}),e[57]=V,e[58]=$,e[59]=z):z=e[59];let D;e[60]!==I||e[61]!==z?(D=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,z]})}),e[60]=I,e[61]=z,e[62]=D):D=e[62];let q;return e[63]!==R||e[64]!==D?(q=t.jsxs("div",{className:"flex h-full flex-col",children:[R,D]}),e[63]=R,e[64]=D,e[65]=q):q=e[65],q}function Ne(g){const e=H.c(57),{post:o,decofile:m,onChange:i}=g;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(G,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=f):f=e[0];let a;e[1]!==o.excerpt?(a=E(o.excerpt),e[1]=o.excerpt,e[2]=a):a=e[2];let l;e[3]!==i?(l=u=>i("excerpt",u.target.value),e[3]=i,e[4]=l):l=e[4];let c;e[5]!==a||e[6]!==l?(c=t.jsxs("div",{className:"space-y-2",children:[f,t.jsx(le,{id:"post-excerpt",value:a,onChange:l,rows:2})]}),e[5]=a,e[6]=l,e[7]=c):c=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(G,{htmlFor:"post-slug",children:"Slug"}),e[8]=h):h=e[8];let x;e[9]!==o.slug?(x=E(o.slug),e[9]=o.slug,e[10]=x):x=e[10];let r;e[11]!==i?(r=u=>i("slug",u.target.value),e[11]=i,e[12]=r):r=e[12];let p;e[13]!==x||e[14]!==r?(p=t.jsxs("div",{className:"space-y-2",children:[h,t.jsx(J,{id:"post-slug",value:x,onChange:r,placeholder:"my-post",className:"h-10"})]}),e[13]=x,e[14]=r,e[15]=p):p=e[15];let d;e[16]===Symbol.for("react.memo_cache_sentinel")?(d={type:"string",format:"date",title:"Date"},e[16]=d):d=e[16];let n;e[17]!==o.date?(n=E(o.date),e[17]=o.date,e[18]=n):n=e[18];let s;e[19]!==i?(s=u=>i("date",u),e[19]=i,e[20]=s):s=e[20];let N;e[21]!==n||e[22]!==s?(N=t.jsx(xe,{schema:d,value:n,onChange:s,path:"post-date",label:"Date"}),e[21]=n,e[22]=s,e[23]=N):N=e[23];let S;e[24]!==N||e[25]!==p?(S=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p,N]}),e[24]=N,e[25]=p,e[26]=S):S=e[26];let v;e[27]===Symbol.for("react.memo_cache_sentinel")?(v={type:"string",format:"image-uri",title:"Cover image"},e[27]=v):v=e[27];let w;e[28]!==i?(w=u=>i("image",u),e[28]=i,e[29]=w):w=e[29];let j;e[30]!==o.image||e[31]!==w?(j=t.jsx(de,{schema:v,value:o.image,onChange:w,path:"post-image",label:"Cover image"}),e[30]=o.image,e[31]=w,e[32]=j):j=e[32];let b;e[33]!==i?(b=u=>i("authors",u),e[33]=i,e[34]=b):b=e[34];let y;e[35]!==m||e[36]!==o.authors||e[37]!==b?(y=t.jsx(X,{label:"Authors",decofile:m,kind:"authors",valueField:"email",toRef:we,selected:o.authors,onChange:b}),e[35]=m,e[36]=o.authors,e[37]=b,e[38]=y):y=e[38];let C;e[39]!==i?(C=u=>i("categories",u),e[39]=i,e[40]=C):C=e[40];let P;e[41]!==m||e[42]!==o.categories||e[43]!==C?(P=t.jsx(X,{label:"Categories",decofile:m,kind:"categories",valueField:"slug",toRef:Se,selected:o.categories,onChange:C}),e[41]=m,e[42]=o.categories,e[43]=C,e[44]=P):P=e[44];let _;e[45]!==i?(_=u=>i("extraProps",u),e[45]=i,e[46]=_):_=e[46];let k;e[47]!==o.extraProps||e[48]!==_?(k=t.jsx(Pe,{value:o.extraProps,onChange:_}),e[47]=o.extraProps,e[48]=_,e[49]=k):k=e[49];let B;return e[50]!==S||e[51]!==j||e[52]!==y||e[53]!==P||e[54]!==k||e[55]!==c?(B=t.jsxs("div",{className:"space-y-5",children:[c,S,j,y,P,k]}),e[50]=S,e[51]=j,e[52]=y,e[53]=P,e[54]=k,e[55]=c,e[56]=B):B=e[56],B}function Se(g){return{name:E(g.name),slug:E(g.slug)}}function we(g){return{...g}}function Pe(g){const e=H.c(15),{value:o,onChange:m}=g;let i,f,a,l;if(e[0]!==m||e[1]!==o){i=ke(o);const x=(r,p)=>m(i.map((d,n)=>n===r?{...d,...p}:d));f="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(G,{children:"Extra props"}),e[6]=a):a=e[6],l=i.length>0&&t.jsx("ul",{className:"space-y-2",children:i.map((r,p)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(J,{value:r.key,onChange:d=>x(p,{key:d.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(J,{value:r.value,onChange:d=>x(p,{value:d.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(ye,{label:"Remove prop",onClick:()=>m(i.filter((d,n)=>n!==p))})]},p))}),e[0]=m,e[1]=o,e[2]=i,e[3]=f,e[4]=a,e[5]=l}else i=e[2],f=e[3],a=e[4],l=e[5];let c;e[7]!==i||e[8]!==m?(c=t.jsx(Ce,{label:"Add prop",onClick:()=>m([...i,{key:"",value:""}])}),e[7]=i,e[8]=m,e[9]=c):c=e[9];let h;return e[10]!==f||e[11]!==a||e[12]!==l||e[13]!==c?(h=t.jsxs("div",{className:f,children:[a,l,c]}),e[10]=f,e[11]=a,e[12]=l,e[13]=c,e[14]=h):h=e[14],h}function X(g){const e=H.c(17),{label:o,decofile:m,kind:i,valueField:f,toRef:a,selected:l,onChange:c}=g;let h;e[0]!==m||e[1]!==i||e[2]!==l||e[3]!==a||e[4]!==f?(h=fe({records:ue(m,i),selected:l,valueField:f,toRef:a}),e[0]=m,e[1]=i,e[2]=l,e[3]=a,e[4]=f,e[5]=h):h=e[5];const{options:x,selectedValues:r,refsForValues:p}=h;let d;e[6]!==o?(d=t.jsx(G,{children:o}),e[6]=o,e[7]=d):d=e[7];let n;e[8]!==o||e[9]!==c||e[10]!==x||e[11]!==p||e[12]!==r?(n=x.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",o.toLowerCase()," yet — create some in the"," ",o.toLowerCase()," collection."]}):t.jsx(oe,{options:x,defaultValue:r,onValueChange:N=>c(p(N)),placeholder:`Select ${o.toLowerCase()}`,maxCount:4}),e[8]=o,e[9]=c,e[10]=x,e[11]=p,e[12]=r,e[13]=n):n=e[13];let s;return e[14]!==d||e[15]!==n?(s=t.jsxs("div",{className:"space-y-2",children:[d,n]}),e[14]=d,e[15]=n,e[16]=s):s=e[16],s}export{wo as PostEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as L,C as H,j as U}from"./index-BEqdT-CX.js";import{a as O,g as $,s as E}from"./automation-runs-nQ99AMoV.js";import{u as k}from"./use-mcp-client-DvvHwezb.js";import{p as B}from"./constants-D_FQAPnt.js";import{b as V,c as Y}from"./use-mcp-tools-Be4djRS3.js";import{u as q}from"./index-Bnro1Vjb.js";import{c as G}from"./monaco-editor-YwujFe9g.js";import{g as K,M as W,a as D}from"./index-BXfKOYdf.js";import{b as z,a as F}from"./chat-context-CAoh3qxf.js";import{u as J}from"./shell-layout-CcPRSmgX.js";import{O as Q}from"./tab-id-BijBBRwE.js";import"./select-Bh2Z8rK3.js";import"./tooltip-C7c-Tgru.js";import"./Check-BAiULwRg.js";import"./ChevronDown-Cpk84lU5.js";import"./ChevronUp-CqCnswy_.js";import"./useInfiniteQuery-BnNR1NVs.js";import"./use-infinite-scroll-DYbbFqLK.js";import"./use-connection-DUpx0NEA.js";import"./use-collections-Dy7WD_eH.js";import"./use-virtual-mcp-CNKe_WaY.js";import"./card-CEUspnmz.js";import"./sidebar-CRtkHPvX.js";import"./LayoutLeft-CNWN8tpf.js";import"./use-mobile-DbBFg2WD.js";import"./X-CTTK5Zj2.js";import"./table-VOE9WRkg.js";import"./empty-state-C6JrR5eZ.js";import"./use-members-BZPSqMOT.js";import"./use-org-auth-client-PHOIKqSH.js";import"./use-clock-tick-F8Oybd0p.js";import"./AlertCircle-DFFB807G.js";import"./CheckCircle-BwwAyNzV.js";import"./Circle-pOPoWDQn.js";import"./agent-icon-jdj2JAEm.js";import"./UserPlus01-DjFNU1Mn.js";import"./Tool01-CSravChF.js";import"./ArrowUp-CFU7eduC.js";import"./Settings02-D5c8FtUa.js";import"./Tool02-csu1mOp1.js";import"./XCircle-CiVL5z-e.js";import"./ArrowUpRight-D37SsWBk.js";import"./TrendUp01-Dw2DNRxA.js";import"./ZapSquare-BDp8YrcS.js";import"./ZoomOut-CvmU5uj5.js";import"./Users03-Iz-TpUuJ.js";import"./ChevronRight-UlscOqp6.js";import"./Stars02-CzKVb8lE.js";import"./Copy01-BEB5hDKQ.js";import"./DotsVertical-BFfMlorx.js";import"./Globe01-DVm51A__.js";import"./Eye-Bbh_ejV6.js";import"./FilterLines-Dm0WP1zI.js";import"./Flag01-e55mynPF.js";import"./Star01-C32-NjaL.js";import"./Globe04-DA8QsMrW.js";import"./SwitchHorizontal01-C8Rnw5uG.js";import"./HardDrive-BJ2MS6we.js";import"./Image01-Y4d3ZI2r.js";import"./Key01-xPUeBTf6.js";import"./LinkExternal01-B6bTrNoI.js";import"./List-gTaMGV9z.js";import"./Monitor01-BdI_dCjX.js";import"./Sun-BPhwV-Eh.js";import"./Package-WlP_SelV.js";import"./Palette-DwivsXKp.js";import"./Play-BPQdBfbt.js";import"./Plus-C8FiAr3i.js";import"./SearchLg-CMWIHllt.js";import"./SearchMd-Gwm-384G.js";import"./Shield01-Dn6encQp.js";import"./Stars01-C8WemEnv.js";import"./Trash01-DZTkGJqE.js";import"./Upload01-s2ES1URH.js";import"./User01-D0_zDlJM.js";import"./Users01-CAC4FOXB.js";import"./XClose-DxMKQUUD.js";import"./Zap-CrYnUVJy.js";import"./use-automations-CELpHT79.js";import"./studio-tools-Cdt3UzXo.js";import"./useSuspenseInfiniteQuery-3QrNhYz_.js";import"./avatar-DJpRqbqg.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-C0FUXmsm.js";import"./file-type-icon-BR1G8n26.js";import"./dialog-BboVhzku.js";import"./hooks-DYM3Q-Vq.js";import"./decopilot-sse-pool-pi1pVqbX.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./integration-icon-Dhyv93zr.js";import"./use-navigate-to-agent-CBi1-FBB.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-oIJCSonG.js";import"./form-p6ZihW38.js";import"./label-DbwTUWd9.js";import"./input-CqfDyI-C.js";import"./auth-BR_fNNK7.js";import"./drawer-D5XLtSzP.js";import"./collection-search-BLJH2aa6.js";import"./autosend-CIDdvZqc.js";import"./tabs-DPmfTv0c.js";import"./toggle-group-BnuMLJr8.js";import"./use-deco-credits-56-eyw-E.js";import"./extract-connection-data-DEmXsdA0.js";import"./connection-card-DPw_9IvV.js";import"./use-registry-connections-CX_dlku1.js";import"./use-organization-settings-CpbybQHD.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-B9g6Z2-r.js";import"./connection-form-helpers-svNTHB1P.js";import"./authenticate-and-persist-oauth-BuaZSTeD.js";import"./mcp-oauth-CeGeftbL.js";import"./collection-tabs-D10lR104.js";import"./badge-zT-Fh3qN.js";import"./use-ai-providers-C7iVrgY-.js";import"./connect-desktop-dialog-B4c48mz3.js";import"./select-model-BHB_Fir_.js";import"./checkbox-C7atZRmN.js";import"./skeleton-C-LbiBGP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-HiisdE7T.js";import"./command-Cih9cb-G.js";import"./index-Dz8rxMiO.js";import"./popover-BJYBT3EY.js";import"./dropdown-menu-DcV4HAvf.js";import"./index-S6xdCjXr.js";import"./alert-dialog-DtmlB9JL.js";import"./toolbar-65iromlk.js";import"./use-debounced-value-BqHYI-kn.js";import"./index-BTfVRtBq.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BrRSDeZW.js";import"./use-decopilot-events-btxE-D2k.js";import"./use-capability-DsC1r5oD.js";import"./use-debounced-autosave-IEMI4Muz.js";import"./index-BXTPhNSj.js";import"./search-input-CYwO2ZSV.js";import"./use-mcp-auth-status-Dy_Y2kKR.js";import"./switch-BL8XQR8K.js";import"./github-repo-picker-B_QoRL-b.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-ChIMRFxc.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Zwoux9HO.js";import"./index-CbMrlBFr.js";import"./get-initials-D-f_fDFw.js";import"./calendar-CibxNjt0.js";import"./toolbar-icon-button-BBh2Csxi.js";import"./use-file-configs-CYmkQ98g.js";import"./automation-list-row-BuCXNsSo.js";import"./required-auth-layout-BXaZVxWQ.js";import"./use-org-sso-BA_UxewI.js";const X="studio://navigate";function Z(M){const[t]=M;if(M.length!==1||t?.type!=="resource_link"||!t.uri.startsWith(X))return{isNavigate:!1};let o=null;try{o=new URL(t.uri).searchParams.get("main")}catch{}return{isNavigate:!0,tab:o&&Q.has(o)?o:null}}const tt={};function ot(M){const t=L.c(38),{client:o,resourceURI:I,tool:i,connectionId:p,orgId:a,args:v}=M,{sendMessage:C}=z(),{setAppContext:d,clearAppContext:l}=F(),{openSidePanel:g,openTab:s}=J(),r=`${p}:${i.name}`;let c;t[0]!==s?(c=x=>x==="inline"?(s("0"),"inline"):"fullscreen",t[0]=s,t[1]=c):c=t[1];const m=c,n=v??tt;let u;t[2]!==o||t[3]!==i.name||t[4]!==n?(u={client:o,toolName:i.name,toolArguments:n},t[2]=o,t[3]=i.name,t[4]=n,t[5]=u):u=t[5];const{data:e}=Y(u);let h;if(t[6]!==i._meta||t[7]!==i.name){const x=$(i._meta);h=E(i.name,x),t[6]=i._meta,t[7]=i.name,t[8]=h}else h=t[8];const A=h;let f;t[9]!==i.inputSchema?(f=i.inputSchema??{type:"object"},t[9]=i.inputSchema,t[10]=f):f=t[10];let R;t[11]!==A||t[12]!==f||t[13]!==i?(R={...i,name:A,inputSchema:f},t[11]=A,t[12]=f,t[13]=i,t[14]=R):R=t[14];const b=R;let _;t[15]!==g||t[16]!==s||t[17]!==C?(_=x=>{const j=Z(x.content);if(j.isNavigate){j.tab&&s(j.tab);return}const w=G(x.content);w.content.length>0&&(g("chat"),C({tiptapDoc:w}))},t[15]=g,t[16]=s,t[17]=C,t[18]=_):_=t[18];const y=_;let P;t[19]!==b?(P={tool:b},t[19]=b,t[20]=P):P=t[20];let N;t[21]!==d||t[22]!==r?(N=x=>d(r,x),t[21]=d,t[22]=r,t[23]=N):N=t[23];let T;t[24]!==l||t[25]!==r?(T=()=>l(r),t[24]=l,t[25]=r,t[26]=T):T=t[26];let S;return t[27]!==o||t[28]!==y||t[29]!==m||t[30]!==a||t[31]!==I||t[32]!==P||t[33]!==N||t[34]!==T||t[35]!==n||t[36]!==e?(S=U.jsx(W,{resourceURI:I,orgId:a,toolInfo:P,toolInput:n,toolResult:e,displayMode:"fullscreen",minHeight:D.fullscreen.minHeight,maxHeight:D.fullscreen.maxHeight,client:o,onMessage:y,onUpdateModelContext:N,onTeardown:T,onRequestDisplayMode:m,className:"h-full"}),t[27]=o,t[28]=y,t[29]=m,t[30]=a,t[31]=I,t[32]=P,t[33]=N,t[34]=T,t[35]=n,t[36]=e,t[37]=S):S=t[37],S}function Ji(M){const t=L.c(24),{connectionId:o,toolName:I,args:i}=M,{org:p}=H(),a=q();let v;t[0]!==o||t[1]!==a?(v=B(o)&&a.vmEntry?.sandboxProviderKind==="user-desktop"&&a.previewUrl?`${a.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=o,t[1]=a,t[2]=v):v=t[2];const C=v;let d;t[3]!==o||t[4]!==C||t[5]!==p.id||t[6]!==p.slug?(d={connectionId:o,orgId:p.id,orgSlug:p.slug,mcpUrl:C},t[3]=o,t[4]=C,t[5]=p.id,t[6]=p.slug,t[7]=d):d=t[7];const l=k(d);let g;t[8]!==l?(g={client:l},t[8]=l,t[9]=g):g=t[9];const{data:s}=V(g);let r,c,m;t[10]!==I||t[11]!==s.tools?(r=O(decodeURIComponent(I)),m=s.tools.find(e=>e.name===r)??s.tools.find(e=>{const h=$(e._meta);if(!h)return!1;if(E(e.name,h)===r)return!0;const f=E(r,h);return f!==r&&e.name===f}),c=m?._meta?K(m._meta):void 0,t[10]=I,t[11]=s.tools,t[12]=r,t[13]=c,t[14]=m):(r=t[12],c=t[13],m=t[14]);const n=c;if(!m||!n){let e;return t[15]!==r?(e=U.jsx("div",{className:"flex items-center justify-center h-full w-full",children:U.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',r,'" not found or has no UI']})}),t[15]=r,t[16]=e):e=t[16],e}let u;return t[17]!==i||t[18]!==l||t[19]!==o||t[20]!==p.id||t[21]!==n||t[22]!==m?(u=U.jsx(ot,{client:l,resourceURI:n,tool:m,connectionId:o,orgId:p.id,args:i}),t[17]=i,t[18]=l,t[19]=o,t[20]=p.id,t[21]=n,t[22]=m,t[23]=u):u=t[23],u}export{Ji as AppViewContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const p={contents:"write",metadata:"read",pull_requests:"write",issues:"write"};function G(t){if(!t||typeof t!="object"||Array.isArray(t))return p;const e=t;return Object.values(e).some(o=>typeof o!="string")?p:e}function x(t){if(!(typeof t!="number"||!Number.isFinite(t)||!Number.isInteger(t)||t<=0))return t}function k(t){const e=t.metadata?.repoScope;if(!e||typeof e.installationId!="number"||!Number.isFinite(e.installationId)||!Number.isInteger(e.installationId)||e.installationId<=0||typeof e.owner!="string"||typeof e.repo!="string"||e.owner.length===0||e.repo.length===0)return null;const o=x(e.repositoryId);return{sourceConnectionId:typeof e.sourceConnectionId=="string"?e.sourceConnectionId:void 0,installationId:e.installationId,repositoryId:o,owner:e.owner,repo:e.repo,permissions:G(e.permissions),grantProvider:e.grantProvider==="github-mcp"?"github-mcp":void 0}}function A(t){return(t??[]).filter(e=>k(e)===null)}async function v(t,e){const r=(await t({name:"GITHUB_LIST_USER_ORGS",arguments:{connectionId:e}})).content?.[0]?.text;if(!r)throw new Error("No response from GITHUB_LIST_USER_ORGS");try{return JSON.parse(r)}catch{throw new Error("Invalid response from GITHUB_LIST_USER_ORGS")}}function M(t,e){const o=e.toLowerCase();return t.find(r=>r.login.toLowerCase()===o)}const C="GitHub MCP did not return refreshable repo grant metadata";function a(t){if(typeof t!="string")return null;const e=t.trim();return e.length>0?e:null}function L(t){try{const e=new URL(t);return(e.protocol==="http:"||e.protocol==="https:")&&!e.username&&!e.password}catch{return!1}}function H(t){return typeof t=="number"&&Number.isFinite(t)&&Number.isInteger(t)&&t>0?t:void 0}async function U(t){const{orgSlug:e,sourceConnection:o,installationId:r,owner:i,repo:s,githubCallTool:_,selfCallTool:l,orgShared:N}=t,u=await _({name:"MINT_REPO_TOKEN",arguments:{installationId:r,owner:i,repo:s,permissions:p}}),n=u.structuredContent;if(u.isError||!n?.token){const b=u.content?.find(O=>O.type==="text")?.text;throw new Error(b?`Failed to mint a repo-scoped GitHub token: ${b}`:"Failed to mint a repo-scoped GitHub token")}const m=a(n.refreshToken),d=a(n.tokenEndpoint),f=a(n.clientId);if(!m||!d||!f)throw new Error(C);if(!L(d))throw new Error(C);const I=a(n.repository?.owner),h=a(n.repository?.name),E="GitHub MCP returned refresh metadata for a different repository";if(n.repository?.owner!==void 0&&(!I||I.toLowerCase()!==i.toLowerCase()))throw new Error(E);if(n.repository?.name!==void 0&&(!h||h.toLowerCase()!==s.toLowerCase()))throw new Error(E);const S=H(n.repository?.id),w=n.expiresAt?Date.parse(n.expiresAt):NaN,T=Number.isFinite(w)?Math.max(0,Math.floor((w-Date.now())/1e3)):null,R=(typeof n.expiresIn=="number"&&Number.isFinite(n.expiresIn)&&Number.isInteger(n.expiresIn)&&n.expiresIn>0?n.expiresIn:null)??T,y=await l({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:{title:`GitHub: ${i}/${s}`,description:`Repo-scoped GitHub access for ${i}/${s}`,icon:o.icon,app_name:o.app_name,app_id:o.app_id,connection_type:o.connection_type,connection_url:o.connection_url,metadata:{...N?{orgShared:!0}:{},repoScope:{installationId:r,repositoryId:S,owner:i,repo:s,permissions:p,grantProvider:"github-mcp"}}}}}),g=y.structuredContent??y,c=g.item?.id??g.id;if(!c)throw new Error("Failed to create the repo-scoped GitHub connection");if(!(await fetch(`/api/${e}/connections/${c}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:n.token,refreshToken:m,expiresIn:R,scope:n.scope??null,clientId:f,tokenEndpoint:d})})).ok)throw await l({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:c,force:!0}}).catch(()=>{}),new Error("Failed to persist the repo-scoped token");return{childConnectionId:c}}export{M as a,k as b,v as f,A as g,U as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as C,j as o}from"./index-BEqdT-CX.js";import{I as B}from"./input-CqfDyI-C.js";import{L as T}from"./label-DbwTUWd9.js";import{S as L,a as A,b as R,c as z,d as O}from"./select-Bh2Z8rK3.js";import{T as V}from"./textarea-B9g6Z2-r.js";import{v as D,w as J,o as K,x as M,I as _}from"./index-Bnro1Vjb.js";import{s as F}from"./primitives-QqbAbc1Q.js";import{u as $}from"./use-autosave-B1tnyn5H.js";import"./tooltip-C7c-Tgru.js";import"./Check-BAiULwRg.js";import"./ChevronDown-Cpk84lU5.js";import"./ChevronUp-CqCnswy_.js";import"./ArrowUp-CFU7eduC.js";import"./chat-context-CAoh3qxf.js";import"./autosend-CIDdvZqc.js";import"./hooks-DYM3Q-Vq.js";import"./use-mcp-client-DvvHwezb.js";import"./constants-D_FQAPnt.js";import"./auth-BR_fNNK7.js";import"./decopilot-sse-pool-pi1pVqbX.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-Cdt3UzXo.js";import"./use-virtual-mcp-CNKe_WaY.js";import"./use-collections-Dy7WD_eH.js";import"./use-ai-providers-C7iVrgY-.js";import"./use-decopilot-events-btxE-D2k.js";import"./tab-id-BijBBRwE.js";import"./use-organization-settings-CpbybQHD.js";import"./automation-runs-nQ99AMoV.js";import"./useInfiniteQuery-BnNR1NVs.js";import"./use-infinite-scroll-DYbbFqLK.js";import"./use-connection-DUpx0NEA.js";import"./card-CEUspnmz.js";import"./sidebar-CRtkHPvX.js";import"./LayoutLeft-CNWN8tpf.js";import"./use-mobile-DbBFg2WD.js";import"./X-CTTK5Zj2.js";import"./table-VOE9WRkg.js";import"./empty-state-C6JrR5eZ.js";import"./use-members-BZPSqMOT.js";import"./use-org-auth-client-PHOIKqSH.js";import"./use-clock-tick-F8Oybd0p.js";import"./AlertCircle-DFFB807G.js";import"./CheckCircle-BwwAyNzV.js";import"./Circle-pOPoWDQn.js";import"./agent-icon-jdj2JAEm.js";import"./UserPlus01-DjFNU1Mn.js";import"./Tool01-CSravChF.js";import"./Settings02-D5c8FtUa.js";import"./Tool02-csu1mOp1.js";import"./XCircle-CiVL5z-e.js";import"./ArrowUpRight-D37SsWBk.js";import"./TrendUp01-Dw2DNRxA.js";import"./ZapSquare-BDp8YrcS.js";import"./ZoomOut-CvmU5uj5.js";import"./Users03-Iz-TpUuJ.js";import"./ChevronRight-UlscOqp6.js";import"./Stars02-CzKVb8lE.js";import"./Copy01-BEB5hDKQ.js";import"./DotsVertical-BFfMlorx.js";import"./Globe01-DVm51A__.js";import"./Eye-Bbh_ejV6.js";import"./FilterLines-Dm0WP1zI.js";import"./Flag01-e55mynPF.js";import"./Star01-C32-NjaL.js";import"./Globe04-DA8QsMrW.js";import"./SwitchHorizontal01-C8Rnw5uG.js";import"./HardDrive-BJ2MS6we.js";import"./Image01-Y4d3ZI2r.js";import"./Key01-xPUeBTf6.js";import"./LinkExternal01-B6bTrNoI.js";import"./List-gTaMGV9z.js";import"./Monitor01-BdI_dCjX.js";import"./Sun-BPhwV-Eh.js";import"./Package-WlP_SelV.js";import"./Palette-DwivsXKp.js";import"./Play-BPQdBfbt.js";import"./Plus-C8FiAr3i.js";import"./SearchLg-CMWIHllt.js";import"./SearchMd-Gwm-384G.js";import"./Shield01-Dn6encQp.js";import"./Stars01-C8WemEnv.js";import"./Trash01-DZTkGJqE.js";import"./Upload01-s2ES1URH.js";import"./User01-D0_zDlJM.js";import"./Users01-CAC4FOXB.js";import"./XClose-DxMKQUUD.js";import"./Zap-CrYnUVJy.js";import"./use-automations-CELpHT79.js";import"./useSuspenseInfiniteQuery-3QrNhYz_.js";import"./avatar-DJpRqbqg.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-C0FUXmsm.js";import"./file-type-icon-BR1G8n26.js";import"./dialog-BboVhzku.js";import"./monaco-editor-YwujFe9g.js";import"./index-BTfVRtBq.js";import"./index-BXfKOYdf.js";import"./shell-layout-CcPRSmgX.js";import"./alert-dialog-DtmlB9JL.js";import"./required-auth-layout-BXaZVxWQ.js";import"./use-org-sso-BA_UxewI.js";import"./integration-icon-Dhyv93zr.js";import"./use-navigate-to-agent-CBi1-FBB.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-oIJCSonG.js";import"./form-p6ZihW38.js";import"./drawer-D5XLtSzP.js";import"./collection-search-BLJH2aa6.js";import"./tabs-DPmfTv0c.js";import"./toggle-group-BnuMLJr8.js";import"./use-deco-credits-56-eyw-E.js";import"./extract-connection-data-DEmXsdA0.js";import"./connection-card-DPw_9IvV.js";import"./use-registry-connections-CX_dlku1.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-svNTHB1P.js";import"./authenticate-and-persist-oauth-BuaZSTeD.js";import"./mcp-oauth-CeGeftbL.js";import"./collection-tabs-D10lR104.js";import"./badge-zT-Fh3qN.js";import"./connect-desktop-dialog-B4c48mz3.js";import"./select-model-BHB_Fir_.js";import"./checkbox-C7atZRmN.js";import"./skeleton-C-LbiBGP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-HiisdE7T.js";import"./command-Cih9cb-G.js";import"./index-Dz8rxMiO.js";import"./popover-BJYBT3EY.js";import"./dropdown-menu-DcV4HAvf.js";import"./index-S6xdCjXr.js";import"./toolbar-65iromlk.js";import"./use-debounced-value-BqHYI-kn.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BrRSDeZW.js";import"./use-mcp-tools-Be4djRS3.js";import"./use-capability-DsC1r5oD.js";import"./use-debounced-autosave-IEMI4Muz.js";import"./index-BXTPhNSj.js";import"./search-input-CYwO2ZSV.js";import"./use-mcp-auth-status-Dy_Y2kKR.js";import"./switch-BL8XQR8K.js";import"./github-repo-picker-B_QoRL-b.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-ChIMRFxc.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Zwoux9HO.js";import"./index-CbMrlBFr.js";import"./get-initials-D-f_fDFw.js";import"./calendar-CibxNjt0.js";import"./toolbar-icon-button-BBh2Csxi.js";import"./use-file-configs-CYmkQ98g.js";import"./automation-list-row-BuCXNsSo.js";const q={authors:[{key:"name",label:"Name",widget:"text"},{key:"type",label:"Type",widget:"select",options:[{value:"Person",label:"Person"},{value:"Organization",label:"Organization"}]},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},G={authors:"Author"};function $o(g){const t=C.c(34),{orgSlug:j,virtualMcpId:w,branch:S,kind:e,blockKey:h,block:E}=g;let y;t[0]!==S||t[1]!==j||t[2]!==w?(y={orgSlug:j,virtualMcpId:w,branch:S},t[0]=S,t[1]=j,t[2]=w,t[3]=y):y=t[3];const m=D(y);let d;t[4]!==E||t[5]!==e?(d=J(E,e),t[4]=E,t[5]=e,t[6]=d):d=t[6];const f=d;let k;t[7]!==h||t[8]!==e||t[9]!==m?(k=a=>{m.mutate({blockKey:h,data:M(h,e,a)})},t[7]=h,t[8]=e,t[9]=m,t[10]=k):k=t[10];const[i,N]=$(f,k);let b;t[11]!==i||t[12]!==N?(b=(a,r)=>N({...i,[a]:r}),t[11]=i,t[12]=N,t[13]=b):b=t[13];const p=b,I=G[e];let l;t[14]!==I?(l=o.jsx("span",{className:"text-sm font-medium",children:I}),t[14]=I,t[15]=l):l=t[15];let n;t[16]!==m.isError||t[17]!==m.isPending?(n=o.jsx(K,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=n):n=t[18];let c;t[19]!==l||t[20]!==n?(c=o.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[l,n]}),t[19]=l,t[20]=n,t[21]=c):c=t[21];const P=q[e];let u;if(t[22]!==i||t[23]!==p||t[24]!==P){let a;t[26]!==i||t[27]!==p?(a=r=>o.jsx("div",{className:"space-y-2",children:r.widget==="image"?o.jsx(_,{schema:{type:"string",format:"image-uri",title:r.label},value:i[r.key],onChange:s=>p(r.key,s),path:r.key,label:r.label}):r.widget==="select"?o.jsxs(o.Fragment,{children:[o.jsx(T,{htmlFor:r.key,children:r.label}),o.jsxs(L,{value:F(i[r.key])||r.options?.[0]?.value,onValueChange:s=>p(r.key,s),children:[o.jsx(A,{id:r.key,className:"h-10 w-full",children:o.jsx(R,{placeholder:r.label})}),o.jsx(z,{children:(r.options??[]).map(H)})]})]}):o.jsxs(o.Fragment,{children:[o.jsx(T,{htmlFor:r.key,children:r.label}),r.widget==="textarea"?o.jsx(V,{id:r.key,value:F(i[r.key]),onChange:s=>p(r.key,s.target.value),rows:3}):o.jsx(B,{id:r.key,value:F(i[r.key]),placeholder:r.placeholder,onChange:s=>p(r.key,s.target.value),className:"h-10"})]})},r.key),t[26]=i,t[27]=p,t[28]=a):a=t[28],u=P.map(a),t[22]=i,t[23]=p,t[24]=P,t[25]=u}else u=t[25];let x;t[29]!==u?(x=o.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:o.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:u})}),t[29]=u,t[30]=x):x=t[30];let v;return t[31]!==x||t[32]!==c?(v=o.jsxs("div",{className:"flex h-full flex-col",children:[c,x]}),t[31]=x,t[32]=c,t[33]=v):v=t[33],v}function H(g){return o.jsx(O,{value:g.value,children:g.label},g.value)}export{$o as RecordEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as X,j as t}from"./index-BEqdT-CX.js";import{C as Y}from"./checkbox-C7atZRmN.js";import{I as K}from"./input-CqfDyI-C.js";import{L as q}from"./label-DbwTUWd9.js";import{c as z,S as G,d as H,a as J,b as Z}from"./select-Bh2Z8rK3.js";import{k as ee,aV as te,o as re,aW as M,aX as ie}from"./index-Bnro1Vjb.js";import{u as oe}from"./use-autosave-B1tnyn5H.js";import"./Check-BAiULwRg.js";import"./tooltip-C7c-Tgru.js";import"./ChevronDown-Cpk84lU5.js";import"./ChevronUp-CqCnswy_.js";import"./ArrowUp-CFU7eduC.js";import"./chat-context-CAoh3qxf.js";import"./autosend-CIDdvZqc.js";import"./hooks-DYM3Q-Vq.js";import"./use-mcp-client-DvvHwezb.js";import"./constants-D_FQAPnt.js";import"./auth-BR_fNNK7.js";import"./decopilot-sse-pool-pi1pVqbX.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-Cdt3UzXo.js";import"./use-virtual-mcp-CNKe_WaY.js";import"./use-collections-Dy7WD_eH.js";import"./use-ai-providers-C7iVrgY-.js";import"./use-decopilot-events-btxE-D2k.js";import"./tab-id-BijBBRwE.js";import"./use-organization-settings-CpbybQHD.js";import"./automation-runs-nQ99AMoV.js";import"./useInfiniteQuery-BnNR1NVs.js";import"./use-infinite-scroll-DYbbFqLK.js";import"./use-connection-DUpx0NEA.js";import"./card-CEUspnmz.js";import"./sidebar-CRtkHPvX.js";import"./LayoutLeft-CNWN8tpf.js";import"./use-mobile-DbBFg2WD.js";import"./X-CTTK5Zj2.js";import"./table-VOE9WRkg.js";import"./empty-state-C6JrR5eZ.js";import"./use-members-BZPSqMOT.js";import"./use-org-auth-client-PHOIKqSH.js";import"./use-clock-tick-F8Oybd0p.js";import"./AlertCircle-DFFB807G.js";import"./CheckCircle-BwwAyNzV.js";import"./Circle-pOPoWDQn.js";import"./agent-icon-jdj2JAEm.js";import"./UserPlus01-DjFNU1Mn.js";import"./Tool01-CSravChF.js";import"./Settings02-D5c8FtUa.js";import"./Tool02-csu1mOp1.js";import"./XCircle-CiVL5z-e.js";import"./ArrowUpRight-D37SsWBk.js";import"./TrendUp01-Dw2DNRxA.js";import"./ZapSquare-BDp8YrcS.js";import"./ZoomOut-CvmU5uj5.js";import"./Users03-Iz-TpUuJ.js";import"./ChevronRight-UlscOqp6.js";import"./Stars02-CzKVb8lE.js";import"./Copy01-BEB5hDKQ.js";import"./DotsVertical-BFfMlorx.js";import"./Globe01-DVm51A__.js";import"./Eye-Bbh_ejV6.js";import"./FilterLines-Dm0WP1zI.js";import"./Flag01-e55mynPF.js";import"./Star01-C32-NjaL.js";import"./Globe04-DA8QsMrW.js";import"./SwitchHorizontal01-C8Rnw5uG.js";import"./HardDrive-BJ2MS6we.js";import"./Image01-Y4d3ZI2r.js";import"./Key01-xPUeBTf6.js";import"./LinkExternal01-B6bTrNoI.js";import"./List-gTaMGV9z.js";import"./Monitor01-BdI_dCjX.js";import"./Sun-BPhwV-Eh.js";import"./Package-WlP_SelV.js";import"./Palette-DwivsXKp.js";import"./Play-BPQdBfbt.js";import"./Plus-C8FiAr3i.js";import"./SearchLg-CMWIHllt.js";import"./SearchMd-Gwm-384G.js";import"./Shield01-Dn6encQp.js";import"./Stars01-C8WemEnv.js";import"./Trash01-DZTkGJqE.js";import"./Upload01-s2ES1URH.js";import"./User01-D0_zDlJM.js";import"./Users01-CAC4FOXB.js";import"./XClose-DxMKQUUD.js";import"./Zap-CrYnUVJy.js";import"./use-automations-CELpHT79.js";import"./useSuspenseInfiniteQuery-3QrNhYz_.js";import"./avatar-DJpRqbqg.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-C0FUXmsm.js";import"./file-type-icon-BR1G8n26.js";import"./dialog-BboVhzku.js";import"./monaco-editor-YwujFe9g.js";import"./index-BTfVRtBq.js";import"./index-BXfKOYdf.js";import"./shell-layout-CcPRSmgX.js";import"./alert-dialog-DtmlB9JL.js";import"./required-auth-layout-BXaZVxWQ.js";import"./use-org-sso-BA_UxewI.js";import"./integration-icon-Dhyv93zr.js";import"./use-navigate-to-agent-CBi1-FBB.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-oIJCSonG.js";import"./form-p6ZihW38.js";import"./drawer-D5XLtSzP.js";import"./collection-search-BLJH2aa6.js";import"./tabs-DPmfTv0c.js";import"./toggle-group-BnuMLJr8.js";import"./use-deco-credits-56-eyw-E.js";import"./extract-connection-data-DEmXsdA0.js";import"./connection-card-DPw_9IvV.js";import"./use-registry-connections-CX_dlku1.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-B9g6Z2-r.js";import"./connection-form-helpers-svNTHB1P.js";import"./authenticate-and-persist-oauth-BuaZSTeD.js";import"./mcp-oauth-CeGeftbL.js";import"./collection-tabs-D10lR104.js";import"./badge-zT-Fh3qN.js";import"./connect-desktop-dialog-B4c48mz3.js";import"./select-model-BHB_Fir_.js";import"./skeleton-C-LbiBGP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-HiisdE7T.js";import"./command-Cih9cb-G.js";import"./index-Dz8rxMiO.js";import"./popover-BJYBT3EY.js";import"./dropdown-menu-DcV4HAvf.js";import"./index-S6xdCjXr.js";import"./toolbar-65iromlk.js";import"./use-debounced-value-BqHYI-kn.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-BrRSDeZW.js";import"./use-mcp-tools-Be4djRS3.js";import"./use-capability-DsC1r5oD.js";import"./use-debounced-autosave-IEMI4Muz.js";import"./index-BXTPhNSj.js";import"./search-input-CYwO2ZSV.js";import"./use-mcp-auth-status-Dy_Y2kKR.js";import"./switch-BL8XQR8K.js";import"./github-repo-picker-B_QoRL-b.js";import"./provision-repo-scoped-github-connection-CB4ICKHq.js";import"./use-secrets-ChIMRFxc.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./companions-core-Zwoux9HO.js";import"./index-CbMrlBFr.js";import"./get-initials-D-f_fDFw.js";import"./calendar-CibxNjt0.js";import"./toolbar-icon-button-BBh2Csxi.js";import"./use-file-configs-CYmkQ98g.js";import"./automation-list-row-BuCXNsSo.js";const me=[{value:"temporary",label:`Temporary (${M.temporary})`},{value:"permanent",label:`Permanent (${M.permanent})`}];function ti(S){const e=X.c(62),{orgSlug:V,virtualMcpId:$,branch:A,blockKey:B,block:D}=S;let _;e[0]!==A||e[1]!==V||e[2]!==$?(_={orgSlug:V,virtualMcpId:$,branch:A},e[0]=A,e[1]=V,e[2]=$,e[3]=_):_=e[3];const m=ee(_);let g;e[4]!==D?(g=te(D),e[4]=D,e[5]=g):g=e[5];const W=g;let v;e[6]!==B||e[7]!==m?(v=o=>{m.mutate({blockKey:B,data:ie(o)})},e[6]=B,e[7]=m,e[8]=v):v=e[8];const[r,O]=oe(W,v);let N;e[9]!==r||e[10]!==O?(N=o=>O({...r,...o}),e[9]=r,e[10]=O,e[11]=N):N=e[11];const i=N;let P;e[12]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("span",{className:"text-sm font-medium",children:"Redirect"}),e[12]=P):P=e[12];let p;e[13]!==m.isError||e[14]!==m.isPending?(p=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[P,t.jsx(re,{isPending:m.isPending,isError:m.isError})]}),e[13]=m.isError,e[14]=m.isPending,e[15]=p):p=e[15];let T;e[16]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(q,{htmlFor:"redirect-from",children:"From"}),e[16]=T):T=e[16];let s;e[17]!==i?(s=o=>i({from:o.target.value}),e[17]=i,e[18]=s):s=e[18];let l;e[19]!==r.from||e[20]!==s?(l=t.jsx(K,{id:"redirect-from",value:r.from,placeholder:"/old-path",onChange:s,className:"h-10"}),e[19]=r.from,e[20]=s,e[21]=l):l=e[21];let E;e[22]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsxs("p",{className:"text-xs text-muted-foreground",children:["The source path to match. Supports URLPattern syntax (e.g."," ",t.jsx("code",{children:"/product/:slug"}),")."]}),e[22]=E):E=e[22];let a;e[23]!==l?(a=t.jsxs("div",{className:"space-y-2",children:[T,l,E]}),e[23]=l,e[24]=a):a=e[24];let R;e[25]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(q,{htmlFor:"redirect-to",children:"To"}),e[25]=R):R=e[25];let c;e[26]!==i?(c=o=>i({to:o.target.value}),e[26]=i,e[27]=c):c=e[27];let n;e[28]!==r.to||e[29]!==c?(n=t.jsx(K,{id:"redirect-to",value:r.to,placeholder:"/new-path",onChange:c,className:"h-10"}),e[28]=r.to,e[29]=c,e[30]=n):n=e[30];let k;e[31]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("p",{className:"text-xs text-muted-foreground",children:"The destination — a relative path or an absolute URL."}),e[31]=k):k=e[31];let d;e[32]!==n?(d=t.jsxs("div",{className:"space-y-2",children:[R,n,k]}),e[32]=n,e[33]=d):d=e[33];let C;e[34]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(q,{htmlFor:"redirect-type",children:"Type"}),e[34]=C):C=e[34];let f;e[35]!==i?(f=o=>i({type:o}),e[35]=i,e[36]=f):f=e[36];let w;e[37]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(J,{id:"redirect-type",className:"h-10 w-full",children:t.jsx(Z,{placeholder:"Type"})}),e[37]=w):w=e[37];let I;e[38]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(z,{children:me.map(pe)}),e[38]=I):I=e[38];let h;e[39]!==r.type||e[40]!==f?(h=t.jsxs(G,{value:r.type,onValueChange:f,children:[w,I]}),e[39]=r.type,e[40]=f,e[41]=h):h=e[41];let F;e[42]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx("strong",{children:"Temporary"}),e[42]=F):F=e[42];let L;e[43]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Use ",F," when the redirect may change;"," ",t.jsx("strong",{children:"Permanent"})," lets browsers cache it."]}),e[43]=L):L=e[43];let x;e[44]!==h?(x=t.jsxs("div",{className:"space-y-2",children:[C,h,L]}),e[44]=h,e[45]=x):x=e[45];let u;e[46]!==i?(u=o=>i({discardQueryParameters:o===!0}),e[46]=i,e[47]=u):u=e[47];let y;e[48]!==r.discardQueryParameters||e[49]!==u?(y=t.jsx(Y,{checked:r.discardQueryParameters,onCheckedChange:u}),e[48]=r.discardQueryParameters,e[49]=u,e[50]=y):y=e[50];let Q;e[51]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsx("span",{className:"text-sm",children:"Discard query parameters"}),e[51]=Q):Q=e[51];let j;e[52]!==y?(j=t.jsxs("label",{className:"flex cursor-pointer items-center gap-2.5",children:[y,Q]}),e[52]=y,e[53]=j):j=e[53];let b;e[54]!==a||e[55]!==d||e[56]!==x||e[57]!==j?(b=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:t.jsxs("div",{className:"mx-auto max-w-xl space-y-6",children:[a,d,x,j]})}),e[54]=a,e[55]=d,e[56]=x,e[57]=j,e[58]=b):b=e[58];let U;return e[59]!==b||e[60]!==p?(U=t.jsxs("div",{className:"flex h-full flex-col",children:[p,b]}),e[59]=b,e[60]=p,e[61]=U):U=e[61],U}function pe(S){return t.jsx(H,{value:S.value,children:S.label},S.value)}export{ti as RedirectEditor};
|