decocms 4.20.0 → 4.21.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-fvueL_xF.js → AlertCircle-DrgnpYmf.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-B8e_kS_o.js → ArrowUpRight-CEF-CsVj.js} +1 -1
- package/dist/client/assets/{CheckCircle-BuLolNoz.js → CheckCircle-xbzaC4iQ.js} +1 -1
- package/dist/client/assets/{ChevronDown-BVhPkusr.js → ChevronDown-DDeoixaJ.js} +1 -1
- package/dist/client/assets/{ChevronRight-DWJre8x6.js → ChevronRight-Cc93D1fP.js} +1 -1
- package/dist/client/assets/{ChevronUp-BQEvRgGj.js → ChevronUp-C2DYINXH.js} +1 -1
- package/dist/client/assets/{DotsVertical-CizsKw_f.js → DotsVertical-CB1RTV9h.js} +1 -1
- package/dist/client/assets/{Eye-Bs5kJbQj.js → Eye-DHiUyPMS.js} +1 -1
- package/dist/client/assets/{FilterLines-DkyirgNq.js → FilterLines-C174NPGB.js} +1 -1
- package/dist/client/assets/{Globe01-1Duj5nc9.js → Globe01-y8c9C4nH.js} +1 -1
- package/dist/client/assets/{Globe04-B_PFHoFA.js → Globe04-v8yJBvO0.js} +1 -1
- package/dist/client/assets/{HardDrive-yFfC5xm0.js → HardDrive-vkw_bVtH.js} +1 -1
- package/dist/client/assets/{Key01-yELEs55d.js → Key01-8wUzNiiB.js} +1 -1
- package/dist/client/assets/{LayoutLeft-B8v8VnhF.js → LayoutLeft-DFSfhhoN.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BeBfH4UH.js → LinkExternal01-CPcvHi4V.js} +1 -1
- package/dist/client/assets/{Monitor01-I5w2u5cl.js → Monitor01-DQ9B5dBT.js} +1 -1
- package/dist/client/assets/{Palette-2k0LGtWY.js → Palette-BP0gnn-x.js} +1 -1
- package/dist/client/assets/{Play-DBtiZA8s.js → Play-6woe_bCf.js} +1 -1
- package/dist/client/assets/{Plus-PibSsVpf.js → Plus-sSvDtP2D.js} +1 -1
- package/dist/client/assets/{SearchLg-BRTezKss.js → SearchLg-BHGwQ11F.js} +1 -1
- package/dist/client/assets/{SearchMd-BTNnGyy3.js → SearchMd-DcwBMfFO.js} +1 -1
- package/dist/client/assets/{Settings02-CY97oanA.js → Settings02-B0ZT4yzH.js} +1 -1
- package/dist/client/assets/{Shield01-BoUN_OZ6.js → Shield01-16ivhP9D.js} +1 -1
- package/dist/client/assets/{Star01-BZduijjB.js → Star01-BwzFDtQr.js} +1 -1
- package/dist/client/assets/{Stars01-Bu0HCLHG.js → Stars01-D_GgsBTV.js} +1 -1
- package/dist/client/assets/{Stars02-6klFcI-2.js → Stars02-CgeR-sX4.js} +1 -1
- package/dist/client/assets/{Sun-DUxMw-A7.js → Sun-vVeG2mZ0.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B6UmJSYs.js → SwitchHorizontal01-DTag6ZGf.js} +1 -1
- package/dist/client/assets/{Tool01-BFAevrF8.js → Tool01-BUi-a5a2.js} +1 -1
- package/dist/client/assets/{Trash01-D0QRAqOQ.js → Trash01-YsCUBRvj.js} +1 -1
- package/dist/client/assets/{Upload01-EuHXdv3V.js → Upload01-CTPdQzyc.js} +1 -1
- package/dist/client/assets/{User01-D9eWwQIs.js → User01-C4JQrjGt.js} +1 -1
- package/dist/client/assets/{Users01-BUauqBZ_.js → Users01-TIl6xBro.js} +1 -1
- package/dist/client/assets/{Users03-2JfQbsor.js → Users03-Cw_16vbZ.js} +1 -1
- package/dist/client/assets/{X-EWTzHhAB.js → X-CAjmVwOR.js} +1 -1
- package/dist/client/assets/{XCircle-CMWDGWoe.js → XCircle-D3nhMqns.js} +1 -1
- package/dist/client/assets/{XClose-C70SByPL.js → XClose-B93vthJT.js} +1 -1
- package/dist/client/assets/{Zap-DmRAdzHA.js → Zap-8CUqVoBU.js} +1 -1
- package/dist/client/assets/{ZapSquare-m8-tAjqY.js → ZapSquare-BDUSHcAn.js} +1 -1
- package/dist/client/assets/{ZoomOut-DuR5hATb.js → ZoomOut-BN-KB_0J.js} +1 -1
- package/dist/client/assets/{access-gate-ChyViNer.js → access-gate-B6S-WMth.js} +1 -1
- package/dist/client/assets/{add-section-modal-DcsSdNbI.js → add-section-modal-CQq5kJUo.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CkTBI47V.js → agent-capabilities-BLdjNi42.js} +1 -1
- package/dist/client/assets/{agent-icon-Ccnm2Z0l.js → agent-icon-HIFEO6vs.js} +1 -1
- package/dist/client/assets/{agents-list-D0Q_shBE.js → agents-list-YngYFo7C.js} +1 -1
- package/dist/client/assets/{ai-providers-hZ3nXBVp.js → ai-providers-BbExXFlh.js} +1 -1
- package/dist/client/assets/{alert-Bmu4uI4E.js → alert-BBmFOgXs.js} +1 -1
- package/dist/client/assets/{alert-dialog-DKYTVxoF.js → alert-dialog-ClCDLHyi.js} +1 -1
- package/dist/client/assets/{app-editor-fkZD1psx.js → app-editor-dXgIlUYv.js} +1 -1
- package/dist/client/assets/{auth-C57-53QJ.js → auth-CxjVr2Fw.js} +1 -1
- package/dist/client/assets/{auth-catchall-BVQ8GPnj.js → auth-catchall-DCUDZpnm.js} +1 -1
- package/dist/client/assets/{auth-entry-WJnHhFOb.js → auth-entry-CDU8nxvN.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BFacVy-k.js → auth-split-layout-VRGxSLqT.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BbxvPh9z.js → authenticate-and-persist-oauth-CZ-MLzKy.js} +1 -1
- package/dist/client/assets/{automation-list-row-Cc5bWN7g.js → automation-list-row-B57SiMbH.js} +1 -1
- package/dist/client/assets/{automation-runs-DuN_PRlY.js → automation-runs-LATF_NNh.js} +1 -1
- package/dist/client/assets/{automations-DCF7YXMN.js → automations-BBkP1No_.js} +1 -1
- package/dist/client/assets/{avatar-BGR3mJWX.js → avatar-BAkTMYHj.js} +1 -1
- package/dist/client/assets/{badge-CNzuslYc.js → badge-CxIGH9s7.js} +1 -1
- package/dist/client/assets/{block-document-Rs_-uqbx.js → block-document-sOmo01vI.js} +1 -1
- package/dist/client/assets/{brand-context-n3bkkIxn.js → brand-context-rYfc__eE.js} +1 -1
- package/dist/client/assets/{breadcrumb-F3ceHoA_.js → breadcrumb-WlMbFTff.js} +1 -1
- package/dist/client/assets/{buckets-CzK9FfCk.js → buckets-oHa98Efr.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BOlV-PNB.js → bulk-category-panel-C9FEvCBV.js} +1 -1
- package/dist/client/assets/{capability-load-error-BaU1mfmp.js → capability-load-error-Bj6xKhKF.js} +1 -1
- package/dist/client/assets/{card-uar-Llj6.js → card-9jdGQNnr.js} +1 -1
- package/dist/client/assets/{category-editor-CyjkVV-t.js → category-editor-Y8aXIh-A.js} +1 -1
- package/dist/client/assets/{chat-context-B_GYpd-x.js → chat-context-OmrHZlWm.js} +1 -1
- package/dist/client/assets/{checkbox-Cg59Apn_.js → checkbox-DnPlj3-W.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CV8Pj6nQ.js → cli-auth-success-CkMPwuV_.js} +1 -1
- package/dist/client/assets/{collection-detail-CF0aFOQI.js → collection-detail-C28Se3ZZ.js} +1 -1
- package/dist/client/assets/{collection-display-button-D7jPH2Sp.js → collection-display-button-DOUzSfH_.js} +1 -1
- package/dist/client/assets/{collection-search-DNMU9xiK.js → collection-search-BHP0uS8b.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Bs64o1w1.js → collection-table-wrapper-DeKnxXxy.js} +1 -1
- package/dist/client/assets/{collection-tabs-HTuG7m53.js → collection-tabs-CvLerKx4.js} +1 -1
- package/dist/client/assets/{command-CKwwwdwL.js → command-D9kK6qBS.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-D8R4jMaG.js → commerce-onboarding-Dwo4yg2j.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-B1Uehm8B.js → connect-desktop-dialog-3SiI_mFd.js} +1 -1
- package/dist/client/assets/{connection-card-ONV47foE.js → connection-card-MLfvU4EZ.js} +1 -1
- package/dist/client/assets/{connection-detail-Cahx3A1M.js → connection-detail-AC0jwDBB.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-D0x_dljo.js → connection-form-helpers-oKSRt7Z9.js} +1 -1
- package/dist/client/assets/{connections-DK_BYS2j.js → connections-DNvp-Wd0.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-BffyZvt0.js → decopilot-sse-pool-BdE-V58A.js} +1 -1
- package/dist/client/assets/{decopilot-CD0oVGNq.js → decopilot-xPgbGeJc.js} +1 -1
- package/dist/client/assets/{dialog-Bn-SsN7r.js → dialog-D_ieAQTy.js} +1 -1
- package/dist/client/assets/{domain-settings-DS5rL2Da.js → domain-settings-ByTW2skH.js} +1 -1
- package/dist/client/assets/{drawer-Dl8ZduZ1.js → drawer-BP70Rujn.js} +1 -1
- package/dist/client/assets/{dropdown-menu-6y2uMgMG.js → dropdown-menu-Ctb60TB7.js} +1 -1
- package/dist/client/assets/{empty-state-BTvy620M.js → empty-state-BS7npFnj.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BjKYuwWP.js → extract-connection-data-RxV5HgFK.js} +1 -1
- package/dist/client/assets/{file-explorer-E8quHWZ_.js → file-explorer-CqV9i4IM.js} +2 -2
- package/dist/client/assets/{file-type-icon-CE2B9xOu.js → file-type-icon-DALXnNwz.js} +1 -1
- package/dist/client/assets/{files-B2DjojBx.js → files-hG4e0Y52.js} +1 -1
- package/dist/client/assets/{form-idiAJ3cQ.js → form-DaxgojJl.js} +1 -1
- package/dist/client/assets/{general-romn3an0.js → general-mdgztBV6.js} +1 -1
- package/dist/client/assets/github-repo-picker-CZI-ClVg.js +1 -0
- package/dist/client/assets/{hooks-DnMUYEJm.js → hooks-ChlRS_Cr.js} +1 -1
- package/dist/client/assets/{index-Czx85elG.js → index-6Q-DcRF4.js} +1 -1
- package/dist/client/assets/{index-o2f1Qtp0.js → index-7osCyUPH.js} +1 -1
- package/dist/client/assets/index-BMeJsDzW.js +1 -0
- package/dist/client/assets/{index-BnRPTHOV.js → index-Bo5LvjuQ.js} +1 -1
- package/dist/client/assets/{index-CAJbosoK.js → index-CYTkc5bj.js} +1 -1
- package/dist/client/assets/{index-2ClMIr_f.js → index-CrIRvXb3.js} +1 -1
- package/dist/client/assets/{index-cUCo7bOt.js → index-CvxPzQfb.js} +1 -1
- package/dist/client/assets/{index-DVGV6Z39.js → index-DSNOu07Q.js} +14 -14
- package/dist/client/assets/{index-BKl9EaBX.js → index-DgNLMhiy.js} +11 -11
- package/dist/client/assets/{index-Dwo8qrSo.js → index-DoOMda_E.js} +1 -1
- package/dist/client/assets/{index-C1Yz9IVw.js → index-DpMErrhr.js} +1 -1
- package/dist/client/assets/{index-redirect-D0TsDJ0J.js → index-redirect-TiE2LCg3.js} +1 -1
- package/dist/client/assets/{index-D_qKXidH.js → index-xZ8IGJ2g.js} +1 -1
- package/dist/client/assets/{index-CwF0iCh9.js → index-yloThw-p.js} +1 -1
- package/dist/client/assets/{input-BOAhqJfl.js → input-CjQtu1h5.js} +1 -1
- package/dist/client/assets/{integration-icon-De8oIkAM.js → integration-icon-DvmR_kCi.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DcCkNb6R.js → invite-member-dialog-BHrSHQE6.js} +1 -1
- package/dist/client/assets/{label-M7D3mHbo.js → label-CyPUYQaT.js} +1 -1
- package/dist/client/assets/{library-tab-BcGl3LL0.js → library-tab-CrasAutb.js} +1 -1
- package/dist/client/assets/{login-B-lg9zHi.js → login-C4Xj3ZGq.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Bqh2iXyU.js → mcp-oauth-Cjq6PMkC.js} +1 -1
- package/dist/client/assets/{members-Cn3yJYEX.js → members-C-oUAFwh.js} +1 -1
- package/dist/client/assets/monaco-editor-kdhsccRw.js +9 -0
- package/dist/client/assets/{monitoring-stats-row-DBPwRip-.js → monitoring-stats-row-DeKE4QGN.js} +1 -1
- package/dist/client/assets/{oauth-callback-DfQUfAPE.js → oauth-callback-CTt195fk.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DHQn7UxH.js → oauth-callback-ai-provider-CXZF8sn_.js} +1 -1
- package/dist/client/assets/{onboarding-gVSii3nG.js → onboarding-BgKa_2mX.js} +1 -1
- package/dist/client/assets/{org-install-DBIkIw4n.js → org-install-CFWrpbg8.js} +1 -1
- package/dist/client/assets/{org-layout-_amBV8qk.js → org-layout-B7y5gvzJ.js} +1 -1
- package/dist/client/assets/{organization-choice-C65_8mn-.js → organization-choice-LKw28vSy.js} +1 -1
- package/dist/client/assets/{page-seo-form-DF10hR6Z.js → page-seo-form-DmWg08s4.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Cg02Z-pf.js +1 -0
- package/dist/client/assets/{popover-CXVI9zcY.js → popover-Dk6C_xyw.js} +1 -1
- package/dist/client/assets/{post-editor-CmP4kwPp.js → post-editor-DoYb2wDl.js} +1 -1
- package/dist/client/assets/{primitives-CXKpY77J.js → primitives-D3eMc46F.js} +1 -1
- package/dist/client/assets/{profile-BKgW7-eE.js → profile-D3nqggYc.js} +1 -1
- package/dist/client/assets/project-app-view-B9CUuk6-.js +1 -0
- package/dist/client/assets/record-editor-CjPHKje-.js +1 -0
- package/dist/client/assets/registry-8Yn6aIkw.js +2 -0
- package/dist/client/assets/{registry-layout-CjFD6LVz.js → registry-layout-BljHeZAP.js} +1 -1
- package/dist/client/assets/{require-capability-BfQmAGBA.js → require-capability-ByiCIEvf.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DItbqeb4.js → required-auth-layout-B1_k8uZH.js} +1 -1
- package/dist/client/assets/{reset-password-I6F4qQIK.js → reset-password-14ERSLOr.js} +1 -1
- package/dist/client/assets/{roles-DbR6jIl5.js → roles-Dk6u6yco.js} +1 -1
- package/dist/client/assets/{scroll-area-B04opuPz.js → scroll-area-DVEw9jTn.js} +1 -1
- package/dist/client/assets/{search-input-Cm1y4rxU.js → search-input-Cw7dukB_.js} +1 -1
- package/dist/client/assets/{secrets-DAl_Wdxf.js → secrets-CswlU-Ba.js} +1 -1
- package/dist/client/assets/{sections-editor-DW7wEDL4.js → sections-editor-Bnz1L7UN.js} +1 -1
- package/dist/client/assets/{select-Cwfs7iaB.js → select-bneCBMXH.js} +1 -1
- package/dist/client/assets/{select-model-C_jz2BLZ.js → select-model-1JGm9WVZ.js} +1 -1
- package/dist/client/assets/{seo-editor-bTH7AI1_.js → seo-editor-D0gZRnH2.js} +1 -1
- package/dist/client/assets/{settings-layout-B4_cfywb.js → settings-layout-f8IHCdTn.js} +1 -1
- package/dist/client/assets/{settings-section-B6QUzH-0.js → settings-section-CTfa0pnb.js} +1 -1
- package/dist/client/assets/{sheet-CU9kLnB6.js → sheet-B3x8ZiS-.js} +1 -1
- package/dist/client/assets/{shell-controls-Duj4feK-.js → shell-controls-C4LCUc-y.js} +1 -1
- package/dist/client/assets/{shell-layout-DUO_iA4i.js → shell-layout-CSNtx2tN.js} +1 -1
- package/dist/client/assets/{sidebar-BrFBmcgg.js → sidebar-C8N0hRhw.js} +1 -1
- package/dist/client/assets/{skeleton-C4BeMI87.js → skeleton-C5L5O22N.js} +1 -1
- package/dist/client/assets/{sso-DTQut84V.js → sso-CmKVccvq.js} +1 -1
- package/dist/client/assets/{store-FdYKISpn.js → store-DnZXwM23.js} +1 -1
- package/dist/client/assets/store-registry-DzUKthzk.js +2 -0
- package/dist/client/assets/{studio-tools-CSRFF36j.js → studio-tools-kXfq3pN5.js} +1 -1
- package/dist/client/assets/{switch-B-7u58O2.js → switch-BL5aJnqG.js} +1 -1
- package/dist/client/assets/{table-DuYXo-3u.js → table-77ubNeic.js} +1 -1
- package/dist/client/assets/{tabs-C4g2MzIZ.js → tabs-Dh_kZG_m.js} +1 -1
- package/dist/client/assets/{task-row-wmR0M6xG.js → task-row-LdEr6awi.js} +1 -1
- package/dist/client/assets/{task-status-DrPYL0wv.js → task-status-DNIO7fCq.js} +1 -1
- package/dist/client/assets/{textarea-0R2PUdzR.js → textarea-D5nE7rMP.js} +1 -1
- package/dist/client/assets/{toggle-group-C6LCxibS.js → toggle-group-oUYd1Jxm.js} +1 -1
- package/dist/client/assets/{toolbar-NzP3bIos.js → toolbar-BSesNl59.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DP-ERd9P.js → toolbar-icon-button-Da4GFxZS.js} +1 -1
- package/dist/client/assets/{tools-list-Bh4EyiYf.js → tools-list-JC_5uk0t.js} +1 -1
- package/dist/client/assets/{tooltip--S3w6lli.js → tooltip-B3h8W9fM.js} +1 -1
- package/dist/client/assets/{types-BBgTtKoT.js → types-H_rr3OSP.js} +1 -1
- package/dist/client/assets/{use-ai-providers-3hRiq9_3.js → use-ai-providers-lTSdzFgc.js} +1 -1
- package/dist/client/assets/{use-automations-Djl_cGl_.js → use-automations-1J-hXDhd.js} +1 -1
- package/dist/client/assets/{use-capability-CwOpVM9e.js → use-capability-Cgr7yHYD.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CkDkvL_z.js → use-clock-tick-D7gbCPid.js} +1 -1
- package/dist/client/assets/{use-collections-BJeRHXQ8.js → use-collections-Bb5vIdWQ.js} +1 -1
- package/dist/client/assets/{use-connection-J4P7z5LH.js → use-connection-C0zEwTpO.js} +1 -1
- package/dist/client/assets/{use-copy-Bop0FG2T.js → use-copy-ClKjk1Nz.js} +1 -1
- package/dist/client/assets/use-create-virtual-mcp-BcrC97GS.js +1 -0
- package/dist/client/assets/{use-debounced-autosave-DUoyIh6J.js → use-debounced-autosave-CEbGGyRe.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CyR2-wj_.js → use-debounced-value-BCxrmAGw.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-HaKMG4Bv.js → use-decopilot-events-CkQ3Rugh.js} +1 -1
- package/dist/client/assets/{use-delete-connection-62qkg1sQ.js → use-delete-connection-COjWhEca.js} +1 -1
- package/dist/client/assets/{use-file-configs-D0sQJaoO.js → use-file-configs-CxoqQtr4.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CA7I5BYA.js → use-infinite-scroll-DqqX0EF_.js} +1 -1
- package/dist/client/assets/{use-join-requests-BDixGjz3.js → use-join-requests-BFV1IEGJ.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BCHJCFx3.js → use-mcp-client-C62ZsAPE.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CJSX4NOe.js → use-mcp-prompts-F7AgPwEV.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-B35odQSn.js → use-mcp-tools-UjXU5ids.js} +1 -1
- package/dist/client/assets/{use-members-CXuC_SPQ.js → use-members-B-1xXj0d.js} +1 -1
- package/dist/client/assets/{use-mobile-DU6KNVMW.js → use-mobile-CTYLPqKT.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-S-0TjswQ.js → use-navigate-to-agent-ZLpx01PW.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CjO_tYkz.js → use-org-auth-client-NLz6RBvg.js} +1 -1
- package/dist/client/assets/{use-org-sso-DZajVFLk.js → use-org-sso-nbZu8iS1.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D9RukcGZ.js → use-organization-roles-BEuKNbP8.js} +1 -1
- package/dist/client/assets/{use-organization-settings-b-TmfHXN.js → use-organization-settings-Dys1xzl0.js} +1 -1
- package/dist/client/assets/{use-registry-connections-EOJMhrOu.js → use-registry-connections-By0sWOC0.js} +1 -1
- package/dist/client/assets/{use-secrets-CKNnHXc_.js → use-secrets-CIN5lIiD.js} +1 -1
- package/dist/client/assets/{use-status-sounds-ChnvWprY.js → use-status-sounds-Bl8mPZM3.js} +1 -1
- package/dist/client/assets/{use-view-mode-ieA6nZlk.js → use-view-mode-DE98MrNw.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BJXS5t1N.js → use-virtual-mcp-D_g2q7bN.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-YzbBhr0w.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Cgpvcam3.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-J_BLn57E.js → useSuspenseQueries-g9RVw8Va.js} +1 -1
- package/dist/client/assets/{variant-calendar-DQgC5-M3.js → variant-calendar-CHjE3Ibi.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-B-tfHZAv.js → view-mode-toggle-B3xxjWBP.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +152 -130
- package/dist/server/server.js +132 -132
- package/package.json +1 -1
- package/dist/client/assets/github-repo-picker-DW4v1O0K.js +0 -1
- package/dist/client/assets/index-DtiYz6rd.js +0 -1
- package/dist/client/assets/monaco-editor-Dt-aMMVv.js +0 -9
- package/dist/client/assets/page-seo-sheet-CAWUwbED.js +0 -1
- package/dist/client/assets/project-app-view-B4d3nv0r.js +0 -1
- package/dist/client/assets/record-editor-BtCsIEuv.js +0 -1
- package/dist/client/assets/registry-CKIr4RjN.js +0 -2
- package/dist/client/assets/store-registry-BLt82Ml-.js +0 -2
- package/dist/client/assets/use-create-virtual-mcp-B1FMXx2o.js +0 -1
- package/dist/client/assets/useInfiniteQuery-lZCTtdY-.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B7_e3nrE.js +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as L,j as t,G as V,a as se,m as Z,r as P,V as U,i as B,d as oe,t as H,K as J,k as re,l as Q,q as ie,a2 as le}from"./index-BKl9EaBX.js";import{c as ae,a as ce,d as ue,e as de}from"./dialog-Bn-SsN7r.js";import{C as Y}from"./checkbox-Cg59Apn_.js";import{C as me}from"./collection-search-DNMU9xiK.js";import{u as fe}from"./use-debounced-value-CyR2-wj_.js";import{b as pe,u as ge}from"./use-connection-J4P7z5LH.js";import{W as xe,u as M,S as ee}from"./use-mcp-client-BCHJCFx3.js";import{b as te}from"./Settings02-CY97oanA.js";import{z as he}from"./agent-icon-Ccnm2Z0l.js";import{a as ye}from"./authenticate-and-persist-oauth-BbxvPh9z.js";import{u as be}from"./use-mcp-tools-B35odQSn.js";import{e as we}from"./extract-connection-data-BjKYuwWP.js";import{c as Ne}from"./use-navigate-to-agent-S-0TjswQ.js";import{f as Ie}from"./github-installations-DzN1UQ4x.js";function F(s){const e=L.c(4),{size:n,className:r}=s;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=m):m=e[0];let a;return e[1]!==r||e[2]!==n?(a=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:r,children:m}),e[1]=r,e[2]=n,e[3]=a):a=e[3],a}function je(s,e){const n=L.c(12),{org:r}=V();let m;n[0]!==r.id?(m=xe.REGISTRY(r.id),n[0]=r.id,n[1]=m):m=n[1];const a=m;let f;n[2]!==r.id||n[3]!==r.slug||n[4]!==a?(f={connectionId:a,orgId:r.id,orgSlug:r.slug},n[2]=r.id,n[3]=r.slug,n[4]=a,n[5]=f):f=n[5];const d=M(f);let g;n[6]!==s?(g={name:s},n[6]=s,n[7]=g):g=n[7];const y=e?.enabled??!0;let o;return n[8]!==d||n[9]!==g||n[10]!==y?(o={client:d,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:g,enabled:y,staleTime:3e5,select:Ce},n[8]=d,n[9]=g,n[10]=y,n[11]=o):o=n[11],be(o)}function Ce(s){return s.structuredContent?.item??null}const Se="deco/mcp-github";function ve(s){const{org:e}=V(),{data:n}=se.useSession(),r=pe(),m=Z(),[a,f]=P.useState("idle"),[d,g]=P.useState(null),[y,o]=P.useState(null),{data:p,isLoading:c}=je(Se,{enabled:s.enabled}),b=P.useRef(!1);s.enabled&&p&&!c&&!b.current&&n?.user?.id&&a==="idle"&&(b.current=!0,x());async function x(){if(!(!p||!n?.user?.id||!e))try{f("installing"),g(null);const h=we(p,e.id,n.user.id,{remoteIndex:0});if(!h.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:N}=await r.create.mutateAsync(h);f("authenticating");const u=await ye({connectionId:N,orgId:e.id,orgSlug:e.slug,persistFallback:i=>r.update.mutateAsync({id:N,data:{connection_token:i}}).then(()=>{})});if(u.ran&&!u.ok){try{await r.delete.mutateAsync(N)}catch{}throw new Error(u.error&&u.error!=="no token received"?u.error:"No token received from GitHub")}U(m,e.id),o(h),f("ready")}catch(h){g(h instanceof Error?h.message:String(h)),f("error")}}function I(){f("idle"),g(null),o(null),b.current=!1}return s.enabled&&c&&a==="idle"?{status:"installing",error:null,connection:null,retry:I}:{status:a,error:d,connection:y,retry:I}}const D=[{key:"auto-respond-to-issues",triggerType:"github.issues.opened",nameSuffix:"auto-respond to issues",label:"Auto-respond to new issues",defaultEnabled:!0,instructions:({owner:s,name:e})=>`A new GitHub issue has been opened in ${s}/${e}. Read the issue, explore relevant code, create a branch, implement the fix, and open a PR referencing the issue number.`},{key:"review-incoming-prs",triggerType:"github.pull_request.opened",nameSuffix:"review incoming PRs",label:"Review incoming pull requests",defaultEnabled:!0,instructions:({owner:s,name:e})=>`A pull request was opened in ${s}/${e}. Read the diff, summarize what changed, flag risks (security, perf, breaking changes), and leave a review comment.`},{key:"note-merged-prs",triggerType:"github.pull_request.closed",nameSuffix:"note merged/closed PRs",label:"Note merged or closed PRs",defaultEnabled:!1,instructions:({owner:s,name:e})=>`A pull request was closed in ${s}/${e}. If it was merged, update changelog/release notes as appropriate.`}];function Te(s,e){const n=new Set;if(s.paramsSchema)for(const m of Object.keys(s.paramsSchema))n.add(m);if(Array.isArray(s.params))for(const m of s.params)n.add(m.name);else if(s.params&&typeof s.params=="object")for(const m of Object.keys(s.params))n.add(m);if(n.has("repo"))return{repo:`${e.owner}/${e.name}`};const r={};return n.has("owner")&&(r.owner=e.owner),n.has("name")&&(r.name=e.name),n.has("repository")&&(r.repository=`${e.owner}/${e.name}`),r}async function Ee({githubCallTool:s,selfCallTool:e,virtualMcpId:n,repo:r,connectionId:m,selectedKeys:a}){const f=await s({name:"TRIGGER_LIST",arguments:{}}),d=f.structuredContent??f,g=new Map((d.triggers??[]).map(c=>[c.type,c])),y=D.filter(c=>a.has(c.key)),o=await Promise.allSettled(y.map(async c=>{const b=g.get(c.triggerType);if(!b)throw new Error(`Trigger ${c.triggerType} not exposed`);const x=await e({name:"AUTOMATION_CREATE",arguments:{name:`${r.name}: ${c.nameSuffix}`,virtual_mcp_id:n,messages:c.instructions(r),active:!0}}),I=(x.structuredContent??x).id;if(!I)throw new Error(`AUTOMATION_CREATE returned no id for ${c.key}`);await e({name:"AUTOMATION_TRIGGER_ADD",arguments:{automation_id:I,type:"event",connection_id:m,event_type:c.triggerType,params:Te(b,r)}})})),p=o.filter(c=>c.status==="rejected").length;return p>0&&console.error("Some GitHub automations failed to set up:",o.filter(c=>c.status==="rejected")),{total:o.length,failed:p}}const q={contents:"write",metadata:"read",pull_requests:"write",issues:"write"};function ke(s){if(!s||typeof s!="object"||Array.isArray(s))return q;const e=s;return Object.values(e).some(n=>typeof n!="string")?q:e}function _e(s){if(!(typeof s!="number"||!Number.isFinite(s)||!Number.isInteger(s)||s<=0))return s}function Ae(s){const e=s.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 n=_e(e.repositoryId);return{sourceConnectionId:typeof e.sourceConnectionId=="string"?e.sourceConnectionId:void 0,installationId:e.installationId,repositoryId:n,owner:e.owner,repo:e.repo,permissions:ke(e.permissions),grantProvider:e.grantProvider==="github-mcp"?"github-mcp":void 0}}function Re(s){return(s??[]).filter(e=>Ae(e)===null)}const W="GitHub MCP did not return refreshable repo grant metadata";function z(s){if(typeof s!="string")return null;const e=s.trim();return e.length>0?e:null}function Oe(s){try{const e=new URL(s);return(e.protocol==="http:"||e.protocol==="https:")&&!e.username&&!e.password}catch{return!1}}function Ge(s){return typeof s=="number"&&Number.isFinite(s)&&Number.isInteger(s)&&s>0?s:void 0}async function X(s){const{orgSlug:e,sourceConnection:n,installationId:r,owner:m,repo:a,githubCallTool:f,selfCallTool:d,orgShared:g}=s,y=await f({name:"MINT_REPO_TOKEN",arguments:{installationId:r,owner:m,repo:a,permissions:q}}),o=y.structuredContent;if(y.isError||!o?.token){const v=y.content?.find($=>$.type==="text")?.text;throw new Error(v?`Failed to mint a repo-scoped GitHub token: ${v}`:"Failed to mint a repo-scoped GitHub token")}const p=z(o.refreshToken),c=z(o.tokenEndpoint),b=z(o.clientId);if(!p||!c||!b)throw new Error(W);if(!Oe(c))throw new Error(W);const x=z(o.repository?.owner),I=z(o.repository?.name),h="GitHub MCP returned refresh metadata for a different repository";if(o.repository?.owner!==void 0&&(!x||x.toLowerCase()!==m.toLowerCase()))throw new Error(h);if(o.repository?.name!==void 0&&(!I||I.toLowerCase()!==a.toLowerCase()))throw new Error(h);const j=Ge(o.repository?.id),N=o.expiresAt?Date.parse(o.expiresAt):NaN,u=Number.isFinite(N)?Math.max(0,Math.floor((N-Date.now())/1e3)):null,C=(typeof o.expiresIn=="number"&&Number.isFinite(o.expiresIn)&&Number.isInteger(o.expiresIn)&&o.expiresIn>0?o.expiresIn:null)??u,w=await d({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:{title:`GitHub: ${m}/${a}`,description:`Repo-scoped GitHub access for ${m}/${a}`,icon:n.icon,app_name:n.app_name,app_id:n.app_id,connection_type:n.connection_type,connection_url:n.connection_url,metadata:{...g?{orgShared:!0}:{},repoScope:{installationId:r,repositoryId:j,owner:m,repo:a,permissions:q,grantProvider:"github-mcp"}}}}}),S=w.structuredContent??w,T=S.item?.id??S.id;if(!T)throw new Error("Failed to create the repo-scoped GitHub connection");if(!(await fetch(`/api/${e}/connections/${T}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:o.token,refreshToken:p,expiresIn:C,scope:o.scope??null,clientId:b,tokenEndpoint:c})})).ok)throw await d({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:T,force:!0}}).catch(()=>{}),new Error("Failed to persist the repo-scoped token");return{childConnectionId:T}}function et(s){const e=L.c(23),{open:n,onOpenChange:r,title:m,hideAutoRespondCheckbox:a,onImportComplete:f,mode:d}=s,g=a===void 0?!1:a,y=d===void 0?"agent":d,o=m??(y==="connection"?"Add repo":"Import from GitHub"),[p,c]=P.useState(null);let b;e[0]!==o?(b=t.jsx(ae,{className:"sr-only",children:t.jsx(ce,{children:o})}),e[0]=o,e[1]=b):b=e[1];let x;e[2]!==o||e[3]!==p?(x=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:p?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>c(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(te,{size:16})}),t.jsx("img",{src:p.avatarUrl,alt:p.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:p.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(F,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:o})]})}),e[2]=o,e[3]=p,e[4]=x):x=e[4];let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(B,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=I):I=e[5];let h;e[6]!==r?(h=()=>r(!1),e[6]=r,e[7]=h):h=e[7];const j=g||y==="connection";let N;e[8]!==y||e[9]!==f||e[10]!==n||e[11]!==p||e[12]!==h||e[13]!==j?(N=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(P.Suspense,{fallback:I,children:t.jsx(Pe,{open:n,onComplete:h,selectedInstallation:p,onSelectInstallation:c,hideAutoRespondCheckbox:j,onImportComplete:f,mode:y})})}),e[8]=y,e[9]=f,e[10]=n,e[11]=p,e[12]=h,e[13]=j,e[14]=N):N=e[14];let u;e[15]!==b||e[16]!==x||e[17]!==N?(u=t.jsxs(ue,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[b,x,N]}),e[15]=b,e[16]=x,e[17]=N,e[18]=u):u=e[18];let i;return e[19]!==r||e[20]!==n||e[21]!==u?(i=t.jsx(de,{open:n,onOpenChange:r,children:u}),e[19]=r,e[20]=n,e[21]=u,e[22]=i):i=e[22],i}function Pe({open:s,onComplete:e,selectedInstallation:n,onSelectInstallation:r,hideAutoRespondCheckbox:m,onImportComplete:a,mode:f="agent"}){const{org:d}=V(),g=Z(),y=Ne(),[o,p]=P.useState(null),[c,b]=P.useState(!0),[x,I]=P.useState(()=>new Set(D.filter(l=>l.defaultEnabled).map(l=>l.key))),h=D.filter(l=>l.defaultEnabled).map(l=>l.key),j=m?new Set(h):c?x:new Set,N=ge({slug:"mcp-github"}),u=Re(N),i=ve({enabled:s&&u.length===0}),C=u.length===1?u[0]??null:o,w=M({connectionId:C?.id??"",orgId:d.id,orgSlug:d.slug}),S=M({connectionId:ee,orgId:d.id,orgSlug:d.slug}),T=async(l,k)=>{try{const G=await w.callTool({name:"get_file_contents",arguments:{owner:l.owner,repo:l.name,path:k}});if(G.isError)return null;const R=G.content?.find(O=>O.type==="resource")?.resource?.text;if(!R)return null;try{const O=JSON.parse(R);return typeof O=="string"?O:JSON.stringify(O)}catch{return R}}catch{return null}},_=(l,k)=>{Promise.all([T(k,"AGENTS.md"),T(k,"CLAUDE.md")]).then(async([A,G])=>{const E=A??G??null;E&&(await S.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:l,data:{metadata:{instructions:E}}}}),U(g,d.id))}).catch(A=>{console.error("GitHub instructions fetch failed:",A)})},v=async({virtualMcpId:l,repo:k,connectionId:A,selectedKeys:G})=>{const{total:E,failed:R}=await Ee({githubCallTool:O=>w.callTool(O),selfCallTool:O=>S.callTool(O),virtualMcpId:l,repo:k,connectionId:A,selectedKeys:G});R>0&&H.warning(`Set up ${E-R}/${E} GitHub automations. Add the rest from the automations view.`)},$=oe({mutationFn:async l=>{if(!C||!n)throw new Error("No GitHub connection or installation");const k=n.installationId;if(f==="connection"){const{childConnectionId:E}=await X({orgSlug:d.slug,sourceConnection:C,installationId:k,owner:l.owner,repo:l.name,githubCallTool:R=>w.callTool(R),selfCallTool:R=>S.callTool(R),orgShared:!0});return{virtualMcpId:null,repo:l,connectionId:E,item:null}}const{childConnectionId:A}=await X({orgSlug:d.slug,sourceConnection:C,installationId:k,owner:l.owner,repo:l.name,githubCallTool:E=>w.callTool(E),selfCallTool:E=>S.callTool(E)});let G=null;try{const E=await S.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:l.name,description:l.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:l.owner,name:l.name,url:l.url,installationId:k,connectionId:A},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:A}]}}}),R=E.structuredContent??E,O=R.item?.id;if(!R.item||!O)throw new Error("Failed to create the imported agent");return G=O,j.size>0&&await v({virtualMcpId:O,repo:l,connectionId:A,selectedKeys:j}).catch(ne=>{console.error("Failed to set up GitHub automations:",ne),H.warning("Imported repo, but failed to set up GitHub automations. You can add triggers manually from the automations view.")}),{virtualMcpId:O,repo:l,connectionId:A,item:R.item}}catch(E){throw G&&await S.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:G}}).catch(()=>{}),await S.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:A,force:!0}}).catch(()=>{}),E}},onSuccess:({virtualMcpId:l,repo:k,connectionId:A,item:G})=>{if(f==="connection"||!l||!G){U(g,d.id),H.success(`Added ${k.name}`),e();return}if(g.setQueryData(J.collectionItem(S,d.id,"","VIRTUAL_MCP",l),{item:G}),U(g,d.id),_(l,k),a){a({virtualMcpId:l,repo:k,connectionId:A});return}H.success(`Imported ${k.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),y(l)},onError:l=>{H.error("Failed to import repo: "+(l instanceof Error?l.message:"Unknown error"))}});return i.status==="installing"||i.status==="authenticating"?t.jsx(K,{status:i.status,error:null,retry:i.retry}):i.status==="error"?t.jsx(K,{status:"error",error:i.error,retry:i.retry}):u.length===0&&i.status==="idle"?t.jsx(K,{status:"installing",error:null,retry:i.retry}):u.length>1&&!C?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),u.map(l=>t.jsxs("button",{type:"button",onClick:()=>p(l),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[l.icon?t.jsx("img",{src:l.icon,alt:l.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(F,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:l.title})]},l.id))]}):C?n?t.jsx(Le,{connectionId:C.id,orgId:d.id,orgSlug:d.slug,installation:n,onSelectRepo:l=>$.mutate(l),isSaving:$.isPending,autoRespondEnabled:c,onAutoRespondChange:b,selectedAutomationKeys:x,onAutomationKeysChange:I,hideAutoRespondCheckbox:m}):t.jsx($e,{connectionId:C.id,orgId:d.id,orgSlug:d.slug,onSelect:r,showBackButton:u.length>1,onBack:()=>p(null)}):null}function $e(s){const e=L.c(31),{connectionId:n,orgId:r,orgSlug:m,onSelect:a,showBackButton:f,onBack:d}=s;let g;e[0]!==r||e[1]!==m?(g={connectionId:ee,orgId:r,orgSlug:m},e[0]=r,e[1]=m,e[2]=g):g=e[2];const y=M(g);let o;e[3]!==n||e[4]!==r?(o=J.githubUserOrgs(r,n),e[3]=n,e[4]=r,e[5]=o):o=e[5];let p;e[6]!==n||e[7]!==y?(p=()=>Ie(w=>y.callTool(w),n),e[6]=n,e[7]=y,e[8]=p):p=e[8];let c;e[9]!==o||e[10]!==p?(c={queryKey:o,queryFn:p},e[9]=o,e[10]=p,e[11]=c):c=e[11];const b=re(c);if(b.isLoading){let w;return e[12]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(B,{size:18,className:"animate-spin text-muted-foreground"})}),e[12]=w):w=e[12],w}if(b.isError){let w;return e[13]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"})}),e[13]=w):w=e[13],w}const x=b.data;if(!x)return null;let I;e[14]!==d||e[15]!==f?(I=f&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:d,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(te,{size:12}),"Change connection"]})}),e[14]=d,e[15]=f,e[16]=I):I=e[16];let h;if(e[17]!==x.installations||e[18]!==a){let w;e[20]!==a?(w=S=>t.jsxs("button",{type:"button",onClick:()=>a(S),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:S.avatarUrl,alt:S.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},S.installationId),e[20]=a,e[21]=w):w=e[21],h=x.installations.map(w),e[17]=x.installations,e[18]=a,e[19]=h}else h=e[19];let j;e[22]!==h?(j=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:h}),e[22]=h,e[23]=j):j=e[23];const N=x.appSlug?`https://github.com/apps/${x.appSlug}/installations/new`:"https://github.com/settings/installations";let u;e[24]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[24]=u):u=e[24];let i;e[25]!==N?(i=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:N,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",u]})}),e[25]=N,e[26]=i):i=e[26];let C;return e[27]!==i||e[28]!==I||e[29]!==j?(C=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[I,j,i]}),e[27]=i,e[28]=I,e[29]=j,e[30]=C):C=e[30],C}function Le(s){const e=L.c(27),{connectionId:n,orgId:r,orgSlug:m,installation:a,onSelectRepo:f,isSaving:d,autoRespondEnabled:g,onAutoRespondChange:y,selectedAutomationKeys:o,onAutomationKeysChange:p,hideAutoRespondCheckbox:c}=s,[b,x]=P.useState(""),I=fe(b,300),h=P.useDeferredValue(I),j=b!==h;let N;e[0]!==j||e[1]!==b?(N=t.jsx(me,{placeholder:"Search repositories...",value:b,onChange:x,isSearching:j}),e[0]=j,e[1]=b,e[2]=N):N=e[2];const u=j?"opacity-40":"opacity-100";let i;e[3]!==u?(i=Q("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",u),e[3]=u,e[4]=i):i=e[4];let C;e[5]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(B,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=C):C=e[5];let w;e[6]!==n||e[7]!==h||e[8]!==a||e[9]!==d||e[10]!==f||e[11]!==r||e[12]!==m?(w=t.jsx(P.Suspense,{fallback:C,children:t.jsx(He,{connectionId:n,orgId:r,orgSlug:m,installation:a,query:h,onSelectRepo:f,isSaving:d})}),e[6]=n,e[7]=h,e[8]=a,e[9]=d,e[10]=f,e[11]=r,e[12]=m,e[13]=w):w=e[13];let S;e[14]!==i||e[15]!==w?(S=t.jsx("div",{className:i,children:w}),e[14]=i,e[15]=w,e[16]=S):S=e[16];let T;e[17]!==g||e[18]!==c||e[19]!==y||e[20]!==p||e[21]!==o?(T=!c&&t.jsxs("div",{className:"border-t border-border shrink-0",children:[t.jsxs("label",{className:"flex items-center gap-2 px-4 py-3 cursor-pointer select-none",children:[t.jsx(Y,{checked:g,onCheckedChange:v=>y(v===!0)}),t.jsx("span",{className:"text-xs text-foreground",children:"Set up GitHub automations for this repo"})]}),g&&t.jsx("div",{className:"px-4 pb-3 pl-9 flex flex-col gap-1.5",children:D.map(v=>t.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[t.jsx(Y,{checked:o.has(v.key),onCheckedChange:$=>{const l=new Set(o);$===!0?l.add(v.key):l.delete(v.key),p(l)}}),t.jsx("span",{className:"text-xs text-muted-foreground",children:v.label})]},v.key))})]}),e[17]=g,e[18]=c,e[19]=y,e[20]=p,e[21]=o,e[22]=T):T=e[22];let _;return e[23]!==N||e[24]!==S||e[25]!==T?(_=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[N,S,T]}),e[23]=N,e[24]=S,e[25]=T,e[26]=_):_=e[26],_}function He(s){const e=L.c(29),{connectionId:n,orgId:r,orgSlug:m,installation:a,query:f,onSelectRepo:d,isSaving:g}=s;let y;e[0]!==n||e[1]!==r||e[2]!==m?(y={connectionId:n,orgId:r,orgSlug:m},e[0]=n,e[1]=r,e[2]=m,e[3]=y):y=e[3];const o=M(y),p=a.type==="User"?"user":"org",c=f?`${p}:${a.login} ${f} in:name`:`${p}:${a.login}`;let b;e[4]!==n||e[5]!==a.login||e[6]!==r||e[7]!==f?(b=J.githubOrgRepos(r,n,a.login,f),e[4]=n,e[5]=a.login,e[6]=r,e[7]=f,e[8]=b):b=e[8];let x;e[9]!==o||e[10]!==c?(x=async u=>{const{signal:i}=u,w=(await o.callTool({name:"search_repositories",arguments:{query:c,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!w)throw new Error("No response from search_repositories");return(JSON.parse(w).items??[]).map(ze)},e[9]=o,e[10]=c,e[11]=x):x=e[11];let I;e[12]!==b||e[13]!==x?(I={queryKey:b,queryFn:x},e[12]=b,e[13]=x,e[14]=I):I=e[14];const{data:h}=ie(I);if(h.length===0){let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=u):u=e[15];let i;e[16]!==f?(i=f&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=f,e[17]=i):i=e[17];let C;return e[18]!==i?(C=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[u,i]}),e[18]=i,e[19]=C):C=e[19],C}let j;if(e[20]!==g||e[21]!==d||e[22]!==h){let u;e[24]!==g||e[25]!==d?(u=i=>t.jsxs("button",{type:"button",onClick:()=>d(i),disabled:g,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(F,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:i.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[i.private?t.jsx(le,{size:10}):t.jsx(he,{size:10}),i.private?"Private":"Public"]})]},i.fullName),e[24]=g,e[25]=d,e[26]=u):u=e[26],j=h.map(u),e[20]=g,e[21]=d,e[22]=h,e[23]=j}else j=e[23];let N;return e[27]!==j?(N=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:j}),e[27]=j,e[28]=N):N=e[28],N}function ze(s){return{name:s.name,fullName:s.full_name,owner:s.full_name.split("/")[0]??"",url:s.html_url,private:s.private,description:s.description,updatedAt:s.updated_at}}function K(s){const e=L.c(33),{status:n,error:r,retry:m}=s;if(n==="error"){let w;e[0]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(F,{className:"size-5 text-destructive"})}),e[0]=w):w=e[0];let S;e[1]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=S):S=e[1];const T=r??"Something went wrong while connecting to GitHub.";let _;e[2]!==T?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[S,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:T})]}),e[2]=T,e[3]=_):_=e[3];let v;e[4]!==m?(v=t.jsx("button",{type:"button",onClick:m,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=m,e[5]=v):v=e[5];let $;return e[6]!==_||e[7]!==v?($=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[w,_,v]}),e[6]=_,e[7]=v,e[8]=$):$=e[8],$}const a=n==="authenticating";let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(F,{className:"size-5 text-foreground"})}),e[9]=f):f=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsxs("div",{className:"relative size-10",children:[f,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(B,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=d):d=e[10];const g=a?"Authenticating with GitHub":"Setting up GitHub";let y;e[11]!==g?(y=t.jsx("p",{className:"text-sm font-medium",children:g}),e[11]=g,e[12]=y):y=e[12];const o=a?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let p;e[13]!==o?(p=t.jsx("p",{className:"text-xs text-muted-foreground",children:o}),e[13]=o,e[14]=p):p=e[14];let c;e[15]!==y||e[16]!==p?(c=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[y,p]}),e[15]=y,e[16]=p,e[17]=c):c=e[17];const b=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let x;e[18]!==b?(x=Q("size-1.5 rounded-full",b),e[18]=b,e[19]=x):x=e[19];let I;e[20]!==x?(I=t.jsx("span",{className:x}),e[20]=x,e[21]=I):I=e[21];const h=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let j;e[22]!==h?(j=Q("size-1.5 rounded-full",h),e[22]=h,e[23]=j):j=e[23];let N;e[24]!==j?(N=t.jsx("span",{className:j}),e[24]=j,e[25]=N):N=e[25];let u;e[26]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=u):u=e[26];let i;e[27]!==I||e[28]!==N?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[I,N,u]}),e[27]=I,e[28]=N,e[29]=i):i=e[29];let C;return e[30]!==i||e[31]!==c?(C=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[d,c,i]}),e[30]=i,e[31]=c,e[32]=C):C=e[32],C}export{F as G,et as a,Re as g,X as p,ve as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as w,j as s,C as qe,r as T,l as D,v as ie,D as Ss,F as Ns,a as pe,G as V,b as ee,H as _s,I as Cs,t as re,J as ws,M as ks,m as Is,B as Ae,y as zs,P as As,K as $s,k as Ts,i as Ot,e as it,u as ot,E as Dt,o as Ms,s as Os,n as Ds,p as Ps,d as Es,x as Fs,R as Pt,O as Rs,T as Ls}from"./index-BKl9EaBX.js";import{u as be,S as at,a as ct,b as oe,c as K,d as B,e as dt,f as Et,g as Bs,h as Hs,i as tt,j as Us,k as Gs,l as qs}from"./sidebar-BrFBmcgg.js";import{u as mt}from"./use-mobile-DU6KNVMW.js";import{S as J}from"./skeleton-C4BeMI87.js";import{i as Ft}from"./LayoutLeft-B8v8VnhF.js";import{T as Z}from"./toolbar-icon-button-DP-ERd9P.js";import{P as De,a as ge,b as Pe}from"./popover-CXVI9zcY.js";import{D as Rt,a as Lt,b as Bt}from"./drawer-Dl8ZduZ1.js";import{A as Oe}from"./avatar-BGR3mJWX.js";import{a as ae,b as ce,c as st,T as de}from"./tooltip--S3w6lli.js";import{a as pt}from"./Eye-Bs5kJbQj.js";import{n as Ws,i as Ks}from"./Globe01-1Duj5nc9.js";import{i as Xs}from"./ZoomOut-DuR5hATb.js";import{i as Vs,a as Qs}from"./ZapSquare-m8-tAjqY.js";import{i as Ht}from"./Monitor01-I5w2u5cl.js";import{n as Ys,a as Js}from"./Sun-DUxMw-A7.js";import{a as We,b as Zs}from"./Settings02-CY97oanA.js";import{i as en}from"./Shield01-BoUN_OZ6.js";import{a as tn}from"./Users03-2JfQbsor.js";import{a as gt,b as bt,c as Ut,d as sn,A as $e,e as jt,i as nn,s as ln,f as rn}from"./agent-icon-Ccnm2Z0l.js";import"./index-Czx85elG.js";import{n as Ke}from"./Stars02-6klFcI-2.js";import{G as on,a as an}from"./github-repo-picker-DW4v1O0K.js";import{I as cn}from"./invite-member-dialog-DcCkNb6R.js";import{u as Gt,A as dn,g as mn}from"./agent-capabilities-CkTBI47V.js";import{u as un,v as fn,C as xn}from"./connect-desktop-dialog-B1Uehm8B.js";import{i as Xe}from"./ChevronUp-BQEvRgGj.js";import{s as qt}from"./XClose-C70SByPL.js";import{u as hn,a as pn}from"./use-join-requests-BDixGjz3.js";import{i as Wt}from"./ChevronRight-DWJre8x6.js";import{u as gn,R as bn,a as jn,b as ut,r as vn}from"./shell-layout-DUO_iA4i.js";import{i as yn}from"./FilterLines-DkyirgNq.js";import{T as Sn,a as Nn}from"./toggle-group-C6LCxibS.js";import{u as _n,S as Cn,a as Ue,i as wn}from"./use-mcp-client-BCHJCFx3.js";import{u as Kt,a as Xt}from"./use-virtual-mcp-BJXS5t1N.js";import{u as kn,a as ft,b as Vt,T as In}from"./hooks-DnMUYEJm.js";import{c as zn,a as An,b as $n,d as Tn,e as Mn}from"./dialog-Bn-SsN7r.js";import{C as On,a as Dn,b as Pn,c as En,d as Fn}from"./command-CKwwwdwL.js";import{u as Qt}from"./studio-tools-CSRFF36j.js";import{i as Rn}from"./Zap-DmRAdzHA.js";import{S as Yt,M as Ln}from"./shell-controls-Duj4feK-.js";import{T as Jt}from"./task-row-wmR0M6xG.js";import{t as xt}from"./ChevronDown-BVhPkusr.js";import{S as Bn}from"./task-status-DrPYL0wv.js";import{S as Zt,u as Hn,g as Un,a as Gn,b as qn}from"./use-navigate-to-agent-S-0TjswQ.js";import{S as Wn,C as Kn}from"./chat-context-B_GYpd-x.js";import{B as vt,a as Xn,b as Vn}from"./breadcrumb-F3ceHoA_.js";import{T as W}from"./toolbar-NzP3bIos.js";import{s as Te}from"./Plus-PibSsVpf.js";import{i as es}from"./SearchMd-BTNnGyy3.js";import{A as Qn,a as Yn,b as Jn,c as Zn,d as el,e as tl,f as sl}from"./alert-dialog-DKYTVxoF.js";import{F as nl,a as ll,b as rl,c as il,d as ol,f as al,e as cl}from"./form-idiAJ3cQ.js";import{I as dl}from"./input-BOAhqJfl.js";import"./sheet-CU9kLnB6.js";import"./X-EWTzHhAB.js";import"./User01-D9eWwQIs.js";import"./AlertCircle-fvueL_xF.js";import"./Tool01-BFAevrF8.js";import"./SwitchHorizontal01-B6UmJSYs.js";import"./XCircle-CMWDGWoe.js";import"./ArrowUpRight-B8e_kS_o.js";import"./CheckCircle-BuLolNoz.js";import"./DotsVertical-CizsKw_f.js";import"./Star01-BZduijjB.js";import"./Globe04-B_PFHoFA.js";import"./HardDrive-yFfC5xm0.js";import"./Key01-yELEs55d.js";import"./LinkExternal01-BeBfH4UH.js";import"./Palette-2k0LGtWY.js";import"./Play-DBtiZA8s.js";import"./SearchLg-BRTezKss.js";import"./Stars01-Bu0HCLHG.js";import"./Trash01-D0QRAqOQ.js";import"./Upload01-EuHXdv3V.js";import"./Users01-BUauqBZ_.js";import"./checkbox-Cg59Apn_.js";import"./collection-search-DNMU9xiK.js";import"./use-debounced-value-CyR2-wj_.js";import"./use-connection-J4P7z5LH.js";import"./use-collections-BJeRHXQ8.js";import"./authenticate-and-persist-oauth-BbxvPh9z.js";import"./mcp-oauth-Bqh2iXyU.js";import"./auth-C57-53QJ.js";import"./use-mcp-tools-B35odQSn.js";import"./extract-connection-data-BjKYuwWP.js";import"./github-installations-DzN1UQ4x.js";import"./select-Cwfs7iaB.js";import"./textarea-0R2PUdzR.js";import"./use-org-auth-client-CjO_tYkz.js";import"./use-organization-roles-D9RukcGZ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-ONV47foE.js";import"./use-registry-connections-EOJMhrOu.js";import"./use-organization-settings-b-TmfHXN.js";import"./useInfiniteQuery-lZCTtdY-.js";import"./use-infinite-scroll-CA7I5BYA.js";import"./card-uar-Llj6.js";import"./integration-icon-De8oIkAM.js";import"./collection-tabs-HTuG7m53.js";import"./badge-CNzuslYc.js";import"./connection-form-helpers-D0x_dljo.js";import"./useSuspenseInfiniteQuery-B7_e3nrE.js";import"./use-ai-providers-3hRiq9_3.js";import"./use-capability-CwOpVM9e.js";import"./required-auth-layout-DItbqeb4.js";import"./tab-id-CLpu897Q.js";import"./use-org-sso-DZajVFLk.js";import"./decopilot-sse-pool-BffyZvt0.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./index-CwF0iCh9.js";import"./use-clock-tick-CkDkvL_z.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-decopilot-events-HaKMG4Bv.js";import"./label-M7D3mHbo.js";function ml(t){const e=w.c(5),{onPointerDown:n,onDoubleClick:l}=t,{state:r,isMobile:i}=be();if(i||r==="collapsed")return null;let o,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={left:"var(--sidebar-width)"},a=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[0]=o,e[1]=a):(o=e[0],a=e[1]);let d;return e[2]!==l||e[3]!==n?(d=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:o,children:a}),e[2]=l,e[3]=n,e[4]=d):d=e[4],d}const ht=240,ul=400,fl="sidebar.width";function Me(t){return Math.max(ht,Math.min(ul,t))}function xl(){const t=w.c(11),[e,n]=qe(fl,hl),l=T.useRef(null);let r;t[0]!==n||t[1]!==e?(r=m=>{m.preventDefault();const u=m.clientX,f=Me(e),h=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),p=h?Array.from(h.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of p)b.style.transition="none";const x=b=>{const j=Me(f+(b.clientX-u));h?.style.setProperty("--sidebar-width",`${j}px`)},g=b=>{const j=Me(f+(b.clientX-u));n(j);for(const v of p)v.style.transition="";window.removeEventListener("pointermove",x),window.removeEventListener("pointerup",g),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",x),window.addEventListener("pointerup",g)},t[0]=n,t[1]=e,t[2]=r):r=t[2];const i=r;let o;t[3]!==n?(o=()=>{n(ht)},t[3]=n,t[4]=o):o=t[4];const a=o;let d;t[5]!==e?(d=Me(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:l,onStartResize:i,resetWidth:a},t[7]=i,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function hl(t){return typeof t=="number"?Me(t):ht}function ts(){return[]}function ss(t){const e=w.c(3),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=l):l=e[0];let r;return e[1]!==n?(r=s.jsxs(at,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(ct,{children:s.jsx(oe,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=r):r=e[2],r}function ns(t){const e=w.c(18),{item:n}=t,{isMobile:l,setOpenMobile:r}=be();let i;e[0]!==l||e[1]!==n||e[2]!==r?(i=()=>{ie("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&r(!1)},e[0]=l,e[1]=n,e[2]=r,e[3]=i):i=e[3];const o=i,a=n.key,d=n.isActive&&"z-10";let c;e[4]!==d?(c=D(d),e[4]=d,e[5]=c):c=e[5];let m;e[6]!==n.label?(m=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=m):m=e[7];let u;e[8]!==o||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==m?(u=s.jsxs(K,{onClick:o,isActive:n.isActive,tooltip:n.label,children:[n.icon,m]}),e[8]=o,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=m,e[13]=u):u=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==u?(f=s.jsx(B,{className:c,children:u},a),e[14]=n.key,e[15]=c,e[16]=u,e[17]=f):f=e[17],f}function pl(t){const e=w.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(dt,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=n.group.label,r=n.group.defaultExpanded;let i;e[2]!==n.group.items?(i=n.group.items.map(bl),e[2]=n.group.items,e[3]=i):i=e[3];let o;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==i?(o=s.jsx(ss,{label:l,defaultExpanded:r,children:i}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=i,e[7]=o):o=e[7],o}case"items":{let l;e[8]!==n.items?(l=n.items.map(gl),e[8]=n.items,e[9]=l):l=e[9];let r;return e[10]!==l?(r=s.jsx(at,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(ct,{children:s.jsx(oe,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=r):r=e[11],r}case"custom":return n.content}}function gl(t){return s.jsx(ns,{item:t},t.key)}function bl(t){return s.jsx(ns,{item:t},t.key)}function jl(t){const e=w.c(14),{sections:n,footer:l,additionalContent:r,variant:i,contentClassName:o}=t,a=i===void 0?"sidebar":i;let d;e[0]!==o?(d=D("flex flex-col flex-1 px-2 py-2 gap-0.5",o),e[0]=o,e[1]=d):d=e[1];let c;e[2]!==n?(c=n.map(vl),e[2]=n,e[3]=c):c=e[3];let m;e[4]!==r?(m=r&&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:r}),e[4]=r,e[5]=m):m=e[5];let u;e[6]!==d||e[7]!==c||e[8]!==m?(u=s.jsxs(Et,{className:d,children:[c,m]}),e[6]=d,e[7]=c,e[8]=m,e[9]=u):u=e[9];let f;return e[10]!==l||e[11]!==u||e[12]!==a?(f=s.jsxs(Bs,{variant:a,children:[u,l]}),e[10]=l,e[11]=u,e[12]=a,e[13]=f):f=e[13],f}function vl(t,e){return s.jsx(pl,{section:t},e)}function ls(t){const e=w.c(2);let n;return e[0]!==t?(n=s.jsx(jl,{...t}),e[0]=t,e[1]=n):n=e[1],n}ls.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(J,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function yl(t){const e=w.c(16),{onToggle:n,className:l}=t,i=Ss().logo??Ns,o=typeof i=="string"?i:i.light,a=typeof i=="string"?i:i.dark;let d;e[0]!==l?(d=D("flex flex-row items-center gap-2 md:gap-0.5 shrink-0 h-12 pl-1 pr-2 pt-0.25 pb-0","group-data-[collapsible=icon]/sidebar:hidden",l),e[0]=l,e[1]=d):d=e[1];let c;e[2]!==o?(c=s.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),e[2]=o,e[3]=c):c=e[3];let m;e[4]!==a?(m=s.jsx("img",{src:a,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),e[4]=a,e[5]=m):m=e[5];let u;e[6]!==c||e[7]!==m?(u=s.jsx("span",{className:"flex items-center shrink-0 pl-1",children:s.jsxs("span",{className:"flex items-center shrink-0 px-2",children:[c,m]})}),e[6]=c,e[7]=m,e[8]=u):u=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ft,{size:16}),e[9]=f):f=e[9];let h;e[10]!==n?(h=s.jsx(Z,{onClick:n,"aria-label":"Toggle sidebar",children:f}),e[10]=n,e[11]=h):h=e[11];let p;return e[12]!==d||e[13]!==u||e[14]!==h?(p=s.jsxs(Hs,{className:d,children:[u,h]}),e[12]=d,e[13]=u,e[14]=h,e[15]=p):p=e[15],p}function yt(t){const e=w.c(18),{item:n,onClose:l}=t,r=n.isActive&&"z-10";let i;e[0]!==r?(i=D(r),e[0]=r,e[1]=i):i=e[1];let o;e[2]!==n||e[3]!==l?(o=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=o):o=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let d;e[7]!==n.label?(d=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=d):d=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==o||e[12]!==a||e[13]!==d?(c=s.jsxs(K,{onClick:o,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=n.isActive,e[10]=n.label,e[11]=o,e[12]=a,e[13]=d,e[14]=c):c=e[14];let m;return e[15]!==i||e[16]!==c?(m=s.jsx(B,{className:i,children:c}),e[15]=i,e[16]=c,e[17]=m):m=e[17],m}function Sl(t){const e=w.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(dt,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=n.group.label,i=n.group.defaultExpanded;let o;if(e[2]!==l||e[3]!==n.group.items){let d;e[5]!==l?(d=c=>s.jsx(yt,{item:c,onClose:l},c.key),e[5]=l,e[6]=d):d=e[6],o=n.group.items.map(d),e[2]=l,e[3]=n.group.items,e[4]=o}else o=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==o?(a=s.jsx(ss,{label:r,defaultExpanded:i,children:o}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=o,e[10]=a):a=e[10],a}case"items":{let r;if(e[11]!==l||e[12]!==n.items){let o;e[14]!==l?(o=a=>s.jsx(yt,{item:a,onClose:l},a.key),e[14]=l,e[15]=o):o=e[15],r=n.items.map(o),e[11]=l,e[12]=n.items,e[13]=r}else r=e[13];let i;return e[16]!==r?(i=s.jsx(at,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(ct,{children:s.jsx(oe,{className:"gap-1.5",children:r})})}),e[16]=r,e[17]=i):i=e[17],i}case"custom":return n.content}}function Nl(t){const e=w.c(17),{sections:n,onClose:l,footer:r,additionalContent:i}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"h-12 shrink-0"}),e[0]=o):o=e[0];let a;e[1]!==l?(a=s.jsx(T.Suspense,{fallback:o,children:s.jsx(yl,{onToggle:l})}),e[1]=l,e[2]=a):a=e[2];let d;if(e[3]!==l||e[4]!==n){let f;e[6]!==l?(f=(h,p)=>s.jsx(Sl,{section:h,onClose:l},p),e[6]=l,e[7]=f):f=e[7],d=n.map(f),e[3]=l,e[4]=n,e[5]=d}else d=e[5];let c;e[8]!==i?(c=i&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:i}),e[8]=i,e[9]=c):c=e[9];let m;e[10]!==d||e[11]!==c?(m=s.jsxs(Et,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[d,c]}),e[10]=d,e[11]=c,e[12]=m):m=e[12];let u;return e[13]!==r||e[14]!==a||e[15]!==m?(u=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[a,m,r]}),e[13]=r,e[14]=a,e[15]=m,e[16]=u):u=e[16],u}function Le(t){const e=w.c(22),{item:n,onClose:l}=t;if(n.href){const d=n.external?"_blank":void 0,c=n.external?"noopener noreferrer":void 0;let m;e[0]!==n.icon?(m=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[0]=n.icon,e[1]=m):m=e[1];let u;e[2]!==n.label?(u=s.jsx("span",{className:"flex-1",children:n.label}),e[2]=n.label,e[3]=u):u=e[3];let f;return e[4]!==n.href||e[5]!==l||e[6]!==d||e[7]!==c||e[8]!==m||e[9]!==u?(f=s.jsxs("a",{href:n.href,target:d,rel:c,className:"flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",onClick:l,children:[m,u]}),e[4]=n.href,e[5]=l,e[6]=d,e[7]=c,e[8]=m,e[9]=u,e[10]=f):f=e[10],f}let r;e[11]!==n||e[12]!==l?(r=()=>{n.onClick?.(),l()},e[11]=n,e[12]=l,e[13]=r):r=e[13];let i;e[14]!==n.icon?(i=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[14]=n.icon,e[15]=i):i=e[15];let o;e[16]!==n.label?(o=s.jsx("span",{className:"flex-1",children:n.label}),e[16]=n.label,e[17]=o):o=e[17];let a;return e[18]!==r||e[19]!==i||e[20]!==o?(a=s.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",children:[i,o]}),e[18]=r,e[19]=i,e[20]=o,e[21]=a):a=e[21],a}function St(t){const e=w.c(126),{user:n,userImage:l,menuItems:r,signOutItem:i,themeOptions:o,preferences:a,setPreferences:d,close:c,isMobile:m}=t;if(m){const U=n?.name??"U";let q;e[0]!==U||e[1]!==l?(q=s.jsx(Oe,{url:l,fallback:U,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=U,e[1]=l,e[2]=q):q=e[2];const te=n?.name??"User";let Q;e[3]!==te?(Q=s.jsx("p",{className:"text-sm font-medium truncate",children:te}),e[3]=te,e[4]=Q):Q=e[4];const je=n?.email;let Y;e[5]!==je?(Y=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:je}),e[5]=je,e[6]=Y):Y=e[6];let xe;e[7]!==Q||e[8]!==Y?(xe=s.jsxs("div",{className:"flex-1 min-w-0",children:[Q,Y]}),e[7]=Q,e[8]=Y,e[9]=xe):xe=e[9];let ve;e[10]!==n?(ve=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(kl)},e[10]=n,e[11]=ve):ve=e[11];let se;e[12]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(pt,{size:14}),e[12]=se):se=e[12];let he;e[13]!==ve?(he=s.jsx(ae,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:ve,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:se})}),e[13]=ve,e[14]=he):he=e[14];let ye;e[15]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(ce,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[15]=ye):ye=e[15];let I;e[16]!==he?(I=s.jsx(st,{delayDuration:300,children:s.jsxs(de,{children:[he,ye]})}),e[16]=he,e[17]=I):I=e[17];let P;e[18]!==I||e[19]!==q||e[20]!==xe?(P=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[q,xe,I]}),e[18]=I,e[19]=q,e[20]=xe,e[21]=P):P=e[21];let G;if(e[22]!==c||e[23]!==r){let le;e[25]!==c?(le=Re=>s.jsx(Le,{item:Re,onClose:c},Re.key),e[25]=c,e[26]=le):le=e[26],G=r.map(le),e[22]=c,e[23]=r,e[24]=G}else G=e[24];let R;e[27]!==c||e[28]!==i?(R=s.jsx(Le,{item:i,onClose:c}),e[27]=c,e[28]=i,e[29]=R):R=e[29];let ne;e[30]!==G||e[31]!==R?(ne=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:[G,R]})}),e[30]=G,e[31]=R,e[32]=ne):ne=e[32];let Se;if(e[33]!==a.theme||e[34]!==d||e[35]!==o){let le;e[37]!==a.theme||e[38]!==d?(le=Re=>{const{value:Je,icon:js,label:vs}=Re;return s.jsx("button",{type:"button","aria-label":vs,onClick:()=>d(ys=>({...ys,theme:Je})),className:D("size-8 rounded-md flex items-center justify-center transition-colors",a.theme===Je?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:js},Je)},e[37]=a.theme,e[38]=d,e[39]=le):le=e[39],Se=o.map(le),e[33]=a.theme,e[34]=d,e[35]=o,e[36]=Se}else Se=e[36];let Ne;e[40]!==Se?(Ne=s.jsx("div",{className:"flex items-center gap-0.5",children:Se}),e[40]=Se,e[41]=Ne):Ne=e[41];const Qe=a.enableSounds?"Disable sounds":"Enable sounds";let _e;e[42]!==d?(_e=()=>d(wl),e[42]=d,e[43]=_e):_e=e[43];const Ye=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let Ce;e[44]!==Ye?(Ce=D("size-8 rounded-md flex items-center justify-center transition-colors",Ye),e[44]=Ye,e[45]=Ce):Ce=e[45];let we;e[46]!==a.enableSounds?(we=a.enableSounds?s.jsx(gt,{size:14}):s.jsx(bt,{size:14}),e[46]=a.enableSounds,e[47]=we):we=e[47];let ke;e[48]!==Qe||e[49]!==_e||e[50]!==Ce||e[51]!==we?(ke=s.jsx("button",{type:"button","aria-label":Qe,onClick:_e,className:Ce,children:we}),e[48]=Qe,e[49]=_e,e[50]=Ce,e[51]=we,e[52]=ke):ke=e[52];let Ee;e[53]===Symbol.for("react.memo_cache_sentinel")?(Ee=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.20.0"]}),e[53]=Ee):Ee=e[53];let Ie;e[54]!==ke?(Ie=s.jsxs("div",{className:"flex items-center gap-2",children:[ke,Ee]}),e[54]=ke,e[55]=Ie):Ie=e[55];let ze;e[56]!==Ne||e[57]!==Ie?(ze=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[Ne,Ie]}),e[56]=Ne,e[57]=Ie,e[58]=ze):ze=e[58];let Fe;return e[59]!==P||e[60]!==ne||e[61]!==ze?(Fe=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[P,ne,ze]}),e[59]=P,e[60]=ne,e[61]=ze,e[62]=Fe):Fe=e[62],Fe}const u=n?.name??"U";let f;e[63]!==u||e[64]!==l?(f=s.jsx(Oe,{url:l,fallback:u,shape:"circle",size:"sm",className:"shrink-0"}),e[63]=u,e[64]=l,e[65]=f):f=e[65];const h=n?.name??"User";let p;e[66]!==h?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:h}),e[66]=h,e[67]=p):p=e[67];const x=n?.email;let g;e[68]!==x?(g=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:x}),e[68]=x,e[69]=g):g=e[69];let b;e[70]!==p||e[71]!==g?(b=s.jsxs("div",{className:"flex-1 min-w-0",children:[p,g]}),e[70]=p,e[71]=g,e[72]=b):b=e[72];let j;e[73]!==n?(j=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Cl)},e[73]=n,e[74]=j):j=e[74];let v;e[75]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(pt,{size:14}),e[75]=v):v=e[75];let y;e[76]!==j?(y=s.jsx(ae,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:v})}),e[76]=j,e[77]=y):y=e[77];let C;e[78]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(ce,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[78]=C):C=e[78];let k;e[79]!==y?(k=s.jsx(st,{delayDuration:300,children:s.jsxs(de,{children:[y,C]})}),e[79]=y,e[80]=k):k=e[80];let S;e[81]!==k||e[82]!==f||e[83]!==b?(S=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[f,b,k]}),e[81]=k,e[82]=f,e[83]=b,e[84]=S):S=e[84];let N;if(e[85]!==c||e[86]!==r){let U;e[88]!==c?(U=q=>s.jsx(Le,{item:q,onClose:c},q.key),e[88]=c,e[89]=U):U=e[89],N=r.map(U),e[85]=c,e[86]=r,e[87]=N}else N=e[87];let _;e[90]!==c||e[91]!==i?(_=s.jsx(Le,{item:i,onClose:c}),e[90]=c,e[91]=i,e[92]=_):_=e[92];let z;e[93]!==N||e[94]!==_?(z=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[N,_]}),e[93]=N,e[94]=_,e[95]=z):z=e[95];let O;if(e[96]!==a.theme||e[97]!==d||e[98]!==o){let U;e[100]!==a.theme||e[101]!==d?(U=q=>{const{value:te,icon:Q,label:je}=q;return s.jsx("button",{type:"button","aria-label":je,onClick:()=>d(Y=>({...Y,theme:te})),className:D("size-7 rounded-md flex items-center justify-center transition-colors",a.theme===te?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Q},te)},e[100]=a.theme,e[101]=d,e[102]=U):U=e[102],O=o.map(U),e[96]=a.theme,e[97]=d,e[98]=o,e[99]=O}else O=e[99];let A;e[103]!==O?(A=s.jsx("div",{className:"flex items-center gap-0.5",children:O}),e[103]=O,e[104]=A):A=e[104];const $=a.enableSounds?"Disable sounds":"Enable sounds";let E;e[105]!==d?(E=()=>d(_l),e[105]=d,e[106]=E):E=e[106];const H=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let F;e[107]!==H?(F=D("size-7 rounded-md flex items-center justify-center transition-colors",H),e[107]=H,e[108]=F):F=e[108];let L;e[109]!==a.enableSounds?(L=a.enableSounds?s.jsx(gt,{size:14}):s.jsx(bt,{size:14}),e[109]=a.enableSounds,e[110]=L):L=e[110];let M;e[111]!==$||e[112]!==E||e[113]!==F||e[114]!==L?(M=s.jsx("button",{type:"button","aria-label":$,onClick:E,className:F,children:L}),e[111]=$,e[112]=E,e[113]=F,e[114]=L,e[115]=M):M=e[115];let X;e[116]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.20.0"]}),e[116]=X):X=e[116];let me;e[117]!==M?(me=s.jsxs("div",{className:"flex items-center gap-2",children:[M,X]}),e[117]=M,e[118]=me):me=e[118];let ue;e[119]!==A||e[120]!==me?(ue=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[A,me]}),e[119]=A,e[120]=me,e[121]=ue):ue=e[121];let fe;return e[122]!==S||e[123]!==z||e[124]!==ue?(fe=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[S,z,ue]})}),e[122]=S,e[123]=z,e[124]=ue,e[125]=fe):fe=e[125],fe}function _l(t){return{...t,enableSounds:!t.enableSounds}}function Cl(){re.success("User ID copied")}function wl(t){return{...t,enableSounds:!t.enableSounds}}function kl(){re.success("User ID copied")}function nt(){const t=w.c(34),{data:e}=pe.useSession(),{org:n}=V(),l=ee();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org",shouldThrow:!1},t[0]=r):r=t[0];const o=_s(r)?.params.org,[a,d]=Cs(),c=mt(),[m,u]=T.useState(!1),f=e?.user,h=f?.image;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=()=>u(!1),t[1]=p):p=t[1];const x=p;let g;t[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(We,{size:16}),t[2]=g):g=t[2];let b;t[3]!==l||t[4]!==o?(b={key:"preferences",label:"Preferences",icon:g,onClick:()=>{l({to:"/$org/settings/profile",params:{org:o??""}})}},t[3]=l,t[4]=o,t[5]=b):b=t[5];let j;t[6]!==n||t[7]!==l?(j=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(Ws,{size:16}),onClick:()=>{l({to:"/$org/install",params:{org:n.slug}})}}]:[],t[6]=n,t[7]=l,t[8]=j):j=t[8];let v;t[9]===Symbol.for("react.memo_cache_sentinel")?(v={key:"terms",label:"Terms of Use",icon:s.jsx(Xs,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[9]=v):v=t[9];let y;t[10]===Symbol.for("react.memo_cache_sentinel")?(y={key:"privacy",label:"Privacy Policy",icon:s.jsx(en,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[10]=y):y=t[10];let C;t[11]===Symbol.for("react.memo_cache_sentinel")?(C={key:"github",label:"decocms/studio",icon:s.jsx(ws,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[11]=C):C=t[11];let k;t[12]===Symbol.for("react.memo_cache_sentinel")?(k={key:"community",label:"Community",icon:s.jsx(tn,{size:16}),href:"https://decocms.com/discord",external:!0},t[12]=k):k=t[12];let S;t[13]===Symbol.for("react.memo_cache_sentinel")?(S={key:"homepage",label:"Homepage",icon:s.jsx(Ks,{size:16}),href:"https://decocms.com",external:!0},t[13]=S):S=t[13];let N;t[14]!==b||t[15]!==j?(N=[b,...j,v,y,C,k,S],t[14]=b,t[15]=j,t[16]=N):N=t[16];const _=N;let z;t[17]===Symbol.for("react.memo_cache_sentinel")?(z={key:"logout",label:"Sign out",icon:s.jsx(Vs,{size:16}),onClick:zl},t[17]=z):z=t[17];const O=z;let A;t[18]===Symbol.for("react.memo_cache_sentinel")?(A={value:"light",icon:s.jsx(Ys,{size:14}),label:"Light theme"},t[18]=A):A=t[18];let $;t[19]===Symbol.for("react.memo_cache_sentinel")?($={value:"dark",icon:s.jsx(Js,{size:14}),label:"Dark theme"},t[19]=$):$=t[19];let E;t[20]===Symbol.for("react.memo_cache_sentinel")?(E=[A,$,{value:"system",icon:s.jsx(Ht,{size:14}),label:"System theme"}],t[20]=E):E=t[20];const H=E;let F;t[21]!==c||t[22]!==_||t[23]!==a||t[24]!==d||t[25]!==f||t[26]!==h?(F={user:f,userImage:h,menuItems:_,signOutItem:O,themeOptions:H,preferences:a,setPreferences:d,close:x,isMobile:c},t[21]=c,t[22]=_,t[23]=a,t[24]=d,t[25]=f,t[26]=h,t[27]=F):F=t[27];const L=F;let M;return t[28]!==c||t[29]!==m||t[30]!==L||t[31]!==f?.name||t[32]!==h?(M=s.jsx(s.Fragment,{children:c?s.jsxs(Rt,{open:m,onOpenChange:u,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>u(!0),className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx(Oe,{url:h,fallback:f?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??"Account"})]}),s.jsxs(Lt,{className:"h-[80dvh] p-0",children:[s.jsx(Bt,{className:"sr-only",children:"Account"}),s.jsx(St,{...L})]})]}):s.jsxs(De,{open:m,onOpenChange:u,children:[s.jsx(ge,{asChild:!0,children:s.jsxs(K,{tooltip:f?.name??"Account",className:"rounded-md",children:[s.jsx(Oe,{url:h,fallback:f?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??"Account"})]})}),s.jsx(Pe,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Il,children:s.jsx(St,{...L})})]})}),t[28]=c,t[29]=m,t[30]=L,t[31]=f?.name,t[32]=h,t[33]=M):M=t[33],M}function Il(t){return t.preventDefault()}function zl(){ie("signed_out",{source:"account_popover"}),ks(),pe.signOut()}const Nt=["requires_action","in_progress","failed","expired","completed"];function Al(t){const e=new Map(Nt.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return Nt.map(n=>({status:n,threads:e.get(n)}))}function lt(){const t=w.c(22),e=un(),[n,l]=T.useState(!1);let r;if(t[0]!==e.capabilities||t[1]!==e.hostname||t[2]!==e.machineId||t[3]!==e.online){const x=fn(e.capabilities);r=e.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:e.hostname??e.machineId??"Desktop linked"}),s.jsx("span",{className:"text-muted-foreground",children:x.length>0?`Available: ${x.join(", ")}`:"No CLI agents detected"})]}):s.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),t[0]=e.capabilities,t[1]=e.hostname,t[2]=e.machineId,t[3]=e.online,t[4]=r}else r=t[4];const i=r;let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(!0),t[5]=o):o=t[5];const a=e.online?"Desktop linked":"Connect your desktop";let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ht,{size:16}),t[6]=d):d=t[6];let c;t[7]!==e.online?(c=e.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),t[7]=e.online,t[8]=c):c=t[8];let m;t[9]!==a||t[10]!==c?(m=s.jsx(ae,{asChild:!0,children:s.jsxs(Z,{onClick:o,"aria-label":a,children:[d,c]})}),t[9]=a,t[10]=c,t[11]=m):m=t[11];let u;t[12]!==i?(u=s.jsx(ce,{side:"bottom",children:i}),t[12]=i,t[13]=u):u=t[13];let f;t[14]!==m||t[15]!==u?(f=s.jsxs(de,{children:[m,u]}),t[14]=m,t[15]=u,t[16]=f):f=t[16];let h;t[17]!==n?(h=s.jsx(xn,{open:n,onOpenChange:l}),t[17]=n,t[18]=h):h=t[18];let p;return t[19]!==f||t[20]!==h?(p=s.jsxs(s.Fragment,{children:[f,h]}),t[19]=f,t[20]=h,t[21]=p):p=t[21],p}function $l({invitation:t}){const[e,n]=T.useState(!1),[l,r]=T.useState(!1),i=Is(),o=async()=>{n(!0);try{const c=await pe.organization.acceptInvitation({invitationId:t.id});if(c.error){re.error(c.error.message),n(!1);return}}catch{re.error("Failed to accept invitation"),n(!1);return}re.success("Invitation accepted!"),zs();let d;try{d=(await pe.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=d?`/${d}`:"/"},a=async()=>{r(!0);try{const d=await pe.organization.rejectInvitation({invitationId:t.id});d.error?(re.error(d.error.message),r(!1)):(re.success("Invitation declined"),i.invalidateQueries())}catch{re.error("Failed to decline invitation"),r(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),s.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx(Ae,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:o,disabled:e||l,"aria-label":"Accept invitation",children:s.jsx(Xe,{size:14})}),s.jsx(Ae,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:a,disabled:e||l,"aria-label":"Decline invitation",children:s.jsx(qt,{size:14})})]})]})}function Tl(t){const e=w.c(29),{request:n}=t,{approve:l,deny:r}=hn(),i=l.isPending||r.isPending,o=n.user?.name??n.user?.email??n.userId,a=n.user?.image??void 0;let d;e[0]!==o?(d=o.charAt(0).toUpperCase(),e[0]=o,e[1]=d):d=e[1];let c;e[2]!==a||e[3]!==d?(c=s.jsx(Oe,{url:a,fallback:d,shape:"circle",size:"sm"}),e[2]=a,e[3]=d,e[4]=c):c=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Requested to join"}),e[5]=m):m=e[5];let u;e[6]!==o?(u=s.jsxs("div",{className:"flex-1 min-w-0",children:[m,s.jsx("p",{className:"text-sm font-medium truncate",children:o})]}),e[6]=o,e[7]=u):u=e[7];let f;e[8]!==l||e[9]!==n.id?(f=()=>l.mutate(n.id),e[8]=l,e[9]=n.id,e[10]=f):f=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Xe,{size:14}),e[11]=h):h=e[11];let p;e[12]!==i||e[13]!==f?(p=s.jsx(Ae,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:f,disabled:i,"aria-label":"Approve join request",children:h}),e[12]=i,e[13]=f,e[14]=p):p=e[14];let x;e[15]!==r||e[16]!==n.id?(x=()=>r.mutate(n.id),e[15]=r,e[16]=n.id,e[17]=x):x=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(qt,{size:14}),e[18]=g):g=e[18];let b;e[19]!==i||e[20]!==x?(b=s.jsx(Ae,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:x,disabled:i,"aria-label":"Deny join request",children:g}),e[19]=i,e[20]=x,e[21]=b):b=e[21];let j;e[22]!==b||e[23]!==p?(j=s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[p,b]}),e[22]=b,e[23]=p,e[24]=j):j=e[24];let v;return e[25]!==j||e[26]!==c||e[27]!==u?(v=s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[c,u,j]}),e[25]=j,e[26]=c,e[27]=u,e[28]=v):v=e[28],v}function Ml(t){const e=w.c(14),{release:n,isSeen:l,onSelect:r}=t;let i;e[0]!==l?(i=!l&&s.jsx("span",{"aria-label":"New release",className:"absolute left-2 top-1/2 -translate-y-1/2 size-1.5 rounded-full bg-primary"}),e[0]=l,e[1]=i):i=e[1];let o;e[2]!==n.eyebrow?(o=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[2]=n.eyebrow,e[3]=o):o=e[3];let a;e[4]!==n.title?(a=s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[4]=n.title,e[5]=a):a=e[5];let d;e[6]!==o||e[7]!==a?(d=s.jsxs("div",{className:"flex-1 min-w-0",children:[o,a]}),e[6]=o,e[7]=a,e[8]=d):d=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Wt,{size:16,className:"text-muted-foreground shrink-0"}),e[9]=c):c=e[9];let m;return e[10]!==r||e[11]!==i||e[12]!==d?(m=s.jsxs("button",{type:"button",onClick:r,className:"relative w-full flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors text-left",children:[i,d,c]}),e[10]=r,e[11]=i,e[12]=d,e[13]=m):m=e[13],m}function Ol(){const t=T.useContext(As),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(l=>l.status==="pending"&&new Date(l.expiresAt)>new Date)}function rs(){const t=w.c(11),{isSeen:e,markSeen:n,unseenCount:l}=gn(),r=Ol(),i=pn();let o;if(t[0]!==e||t[1]!==r||t[2]!==i){const c=[...i].sort(Rl).map(Fl),m=[...r].sort(El).map(Pl);let u;t[4]!==e?(u=h=>({type:"release",release:h,isSeen:e(h.id)}),t[4]=e,t[5]=u):u=t[5];const f=[...bn].sort(Dl).map(u);o=[...c,...m,...f],t[0]=e,t[1]=r,t[2]=i,t[3]=o}else o=t[3];const a=l+r.length+i.length;let d;return t[6]!==n||t[7]!==r||t[8]!==o||t[9]!==a?(d={items:o,pendingInvitations:r,redDotCount:a,markReleaseSeen:n},t[6]=n,t[7]=r,t[8]=o,t[9]=a,t[10]=d):d=t[10],d}function Dl(t,e){return new Date(e.date).getTime()-new Date(t.date).getTime()}function Pl(t){return{type:"invitation",invitation:t}}function El(t,e){return new Date(t.expiresAt).getTime()-new Date(e.expiresAt).getTime()}function Fl(t){return{type:"join-request",request:t}}function Rl(t,e){return new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()}class is extends T.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function os(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Ll(){const t=w.c(17),e=ee(),{org:n}=V(),{hasDecoKey:l,balanceDollars:r}=Gt();if(!l)return null;let i;t[0]!==r?(i=r!=null?`Credits: $${r.toFixed(2)}`:"Credits",t[0]=r,t[1]=i):i=t[1];let o;t[2]!==r?(o=D(r!=null&&os(r)),t[2]=r,t[3]=o):o=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ut,{}),t[7]=d):d=t[7];let c;t[8]!==r?(c=r!=null?`$${r.toFixed(2)}`:"Credits",t[8]=r,t[9]=c):c=t[9];let m;t[10]!==c?(m=s.jsx("span",{children:c}),t[10]=c,t[11]=m):m=t[11];let u;return t[12]!==i||t[13]!==o||t[14]!==a||t[15]!==m?(u=s.jsx(oe,{children:s.jsx(B,{children:s.jsxs(K,{tooltip:i,className:o,onClick:a,children:[d,m]})})}),t[12]=i,t[13]=o,t[14]=a,t[15]=m,t[16]=u):u=t[16],u}function Bl(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(is,{children:s.jsx(T.Suspense,{fallback:null,children:s.jsx(Ll,{})})}),t[0]=e):e=t[0],e}function Hl(){const t=w.c(17),e=ee(),{org:n}=V(),{hasDecoKey:l,balanceDollars:r}=Gt();if(!l)return null;let i;t[0]!==r?(i=r!=null?`Credits: $${r.toFixed(2)}`:"Credits",t[0]=r,t[1]=i):i=t[1];const o=i;let a;t[2]!==e||t[3]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[2]=e,t[3]=n.slug,t[4]=a):a=t[4];let d;t[5]!==r?(d=D(r!=null&&os(r)),t[5]=r,t[6]=d):d=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ut,{className:"size-4"}),t[7]=c):c=t[7];let m;t[8]!==a||t[9]!==d||t[10]!==o?(m=s.jsx(ae,{asChild:!0,children:s.jsx(Z,{"aria-label":o,onClick:a,className:d,children:c})}),t[8]=a,t[9]=d,t[10]=o,t[11]=m):m=t[11];let u;t[12]!==o?(u=s.jsx(ce,{side:"top",children:o}),t[12]=o,t[13]=u):u=t[13];let f;return t[14]!==m||t[15]!==u?(f=s.jsxs(de,{delayDuration:300,children:[m,u]}),t[14]=m,t[15]=u,t[16]=f):f=t[16],f}function Ul(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(is,{children:s.jsx(T.Suspense,{fallback:null,children:s.jsx(Hl,{})})}),t[0]=e):e=t[0],e}function as(t){const e=w.c(15),{children:n}=t,{items:l,markReleaseSeen:r}=rs(),[i,o]=T.useState(null);let a;if(e[0]!==l||e[1]!==i){let x;e[3]!==i?(x=g=>g.type==="release"&&g.release.id===i,e[3]=i,e[4]=x):x=e[4],a=l.find(x),e[0]=l,e[1]=i,e[2]=a}else a=e[2];const d=a,c=d?.type==="release"?d.release:null;let m;e[5]!==r?(m=x=>{o(x),r(x)},e[5]=r,e[6]=m):m=e[6];const u=m;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=x=>{x||o(null)},e[7]=f):f=e[7];let h;e[8]!==u||e[9]!==l||e[10]!==c?(h=s.jsx(Pe,{side:"right",align:"start",sideOffset:16,collisionPadding:16,className:"w-[min(400px,calc(100vw-2rem))] p-0 h-[min(650px,calc(100dvh-4rem))] flex flex-col",children:c?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 border-b border-border shrink-0",children:[s.jsx(Ae,{size:"icon",variant:"ghost","aria-label":"Back to inbox",className:"size-7 text-muted-foreground",onClick:()=>o(null),children:s.jsx(Zs,{size:16})}),s.jsx("h3",{className:"text-sm font-medium truncate",children:c.title})]}),s.jsx("div",{className:"overflow-y-auto flex-1 p-5",children:s.jsx(jn,{release:c})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:s.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),l.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[s.jsx(Ke,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Nothing here yet"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Invitations, join requests, and release updates will appear here"})]}):s.jsx("div",{className:"overflow-y-auto flex-1",children:l.map(x=>x.type==="join-request"?s.jsx(Tl,{request:x.request},`req-${x.request.id}`):x.type==="invitation"?s.jsx($l,{invitation:x.invitation},`inv-${x.invitation.id}`):s.jsx(Ml,{release:x.release,isSeen:x.isSeen,onSelect:()=>u(x.release.id)},`rel-${x.release.id}`))})]})}),e[8]=u,e[9]=l,e[10]=c,e[11]=h):h=e[11];let p;return e[12]!==n||e[13]!==h?(p=s.jsxs(De,{onOpenChange:f,children:[n,h]}),e[12]=n,e[13]=h,e[14]=p):p=e[14],p}function cs(){const{redDotCount:t}=rs();return t>0}function Gl(){const t=w.c(6),e=cs();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Ke,{}),t[0]=n):n=t[0];let l;t[1]!==e?(l=e&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e,t[2]=l):l=t[2];let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("span",{children:"Inbox"}),t[3]=r):r=t[3];let i;return t[4]!==l?(i=s.jsx(as,{children:s.jsx(ge,{asChild:!0,children:s.jsxs(K,{tooltip:"Inbox",className:"relative",children:[n,l,r]})})}),t[4]=l,t[5]=i):i=t[5],i}function ql(){const t=w.c(8),e=cs();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Ke,{className:"size-4"}),t[0]=n):n=t[0];let l;t[1]!==e?(l=e&&s.jsx("span",{className:"absolute top-0.5 right-0.5 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e,t[2]=l):l=t[2];let r;t[3]!==l?(r=s.jsx(ge,{asChild:!0,children:s.jsx(ae,{asChild:!0,children:s.jsxs(Z,{"aria-label":"Inbox",children:[n,l]})})}),t[3]=l,t[4]=r):r=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ce,{side:"top",children:"Inbox"}),t[5]=i):i=t[5];let o;return t[6]!==r?(o=s.jsx(as,{children:s.jsxs(de,{delayDuration:300,children:[r,i]})}),t[6]=r,t[7]=o):o=t[7],o}function Wl(){const t=w.c(7),e=ee(),{org:n}=V();let l;t[0]!==e||t[1]!==n.slug?(l=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=l):l=t[2];let r,i;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(We,{}),i=s.jsx("span",{children:"Settings"}),t[3]=r,t[4]=i):(r=t[3],i=t[4]);let o;return t[5]!==l?(o=s.jsxs(K,{tooltip:"Settings",onClick:l,children:[r,i]}),t[5]=l,t[6]=o):o=t[6],o}function Kl(){const t=w.c(9),e=ee(),{org:n}=V();let l;t[0]!==e||t[1]!==n.slug?(l=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=l):l=t[2];let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(We,{className:"size-4"}),t[3]=r):r=t[3];let i;t[4]!==l?(i=s.jsx(ae,{asChild:!0,children:s.jsx(Z,{"aria-label":"Settings",onClick:l,children:r})}),t[4]=l,t[5]=i):i=t[5];let o;t[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ce,{side:"top",children:"Settings"}),t[6]=o):o=t[6];let a;return t[7]!==i?(a=s.jsxs(de,{delayDuration:300,children:[i,o]}),t[7]=i,t[8]=a):a=t[8],a}function Xl(){const t=w.c(10),[e,n]=T.useState(!1),[l,r]=T.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(B,{children:s.jsx(cn,{trigger:s.jsxs(K,{tooltip:"Invite members",children:[s.jsx(sn,{}),s.jsx("span",{children:"Invite members"})]})})}),t[0]=i):i=t[0];let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(B,{children:s.jsxs(K,{tooltip:"Add repo",onClick:()=>n(!0),children:[s.jsx(on,{}),s.jsx("span",{children:"Add repo"})]})}),t[1]=o):o=t[1];let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs(oe,{className:"gap-0.5",children:[i,o,s.jsx(B,{children:s.jsxs(K,{tooltip:"Add connection",onClick:()=>r(!0),children:[s.jsx(Qs,{}),s.jsx("span",{children:"Add connection"})]})})]}),t[2]=a):a=t[2];let d;t[3]!==e?(d=s.jsx(an,{open:e,onOpenChange:n,mode:"connection"}),t[3]=e,t[4]=d):d=t[4];let c;t[5]!==l?(c=s.jsx(dn,{open:l,onOpenChange:r,mode:"browse"}),t[5]=l,t[6]=c):c=t[6];let m;return t[7]!==d||t[8]!==c?(m=s.jsxs(s.Fragment,{children:[a,d,c]}),t[7]=d,t[8]=c,t[9]=m):m=t[9],m}function Vl(){const t=w.c(8),{state:e}=be();if(e==="collapsed"){let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Bl,{}),t[0]=o):o=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(B,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(lt,{})})}),t[1]=a):a=t[1];let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(B,{children:s.jsx(Gl,{})}),t[2]=d):d=t[2];let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(B,{children:s.jsx(Wl,{})}),t[3]=c):c=t[3];let m;return t[4]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsxs(tt,{className:"px-2 pb-3 gap-1",children:[o,s.jsxs(oe,{children:[a,d,c,s.jsx(B,{children:s.jsx(nt,{})})]})]}),t[4]=m):m=t[4],m}let l,r;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Xl,{}),r=s.jsx(dt,{className:"mx-0"}),t[5]=l,t[6]=r):(l=t[5],r=t[6]);let i;return t[7]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(tt,{className:"px-2 pb-3 gap-1.5",children:[l,r,s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(oe,{children:s.jsx(B,{children:s.jsx(nt,{})})})}),s.jsx(Kl,{}),s.jsx(ql,{}),s.jsx(lt,{}),s.jsx(Ul,{})]})]}),t[7]=i):i=t[7],i}function Ql(){const t=w.c(8),e=ee(),{org:n}=V(),{setOpenMobile:l}=be();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(oe,{children:s.jsx(B,{children:s.jsx(nt,{})})})}),t[0]=r):r=t[0];let i;t[1]!==e||t[2]!==n.slug||t[3]!==l?(i=()=>{e({to:"/$org/settings",params:{org:n.slug}}),l(!1)},t[1]=e,t[2]=n.slug,t[3]=l,t[4]=i):i=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(We,{className:"size-4"}),t[5]=o):o=t[5];let a;return t[6]!==i?(a=s.jsx(tt,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[r,s.jsx(Z,{"aria-label":"Settings",onClick:i,children:o})]})}),t[6]=i,t[7]=a):a=t[7],a}function _t(t){const e=w.c(15),{className:n,wrapperClassName:l,children:r}=t,[i,o]=T.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=b=>{b&&o(b.scrollHeight>b.clientHeight+1)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=b=>{const j=b.currentTarget;o(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const m=c;let u;e[2]!==l?(u=D("relative",l),e[2]=l,e[3]=u):u=e[3];let f;e[4]!==r||e[5]!==n?(f=s.jsx("div",{ref:d,onScroll:m,className:n,children:r}),e[4]=r,e[5]=n,e[6]=f):f=e[6];const h=i?"opacity-100":"opacity-0";let p;e[7]!==h?(p=D("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]=p):p=e[8];let x;e[9]!==p?(x=s.jsx("div",{"aria-hidden":!0,className:p}),e[9]=p,e[10]=x):x=e[10];let g;return e[11]!==u||e[12]!==f||e[13]!==x?(g=s.jsxs("div",{className:u,children:[f,x]}),e[11]=u,e[12]=f,e[13]=x,e[14]=g):g=e[14],g}function Yl(t){const e=w.c(8),{virtualMcpId:n,size:l,showAutomationBadge:r}=t,i=l===void 0?"sm":l;let o;e[0]!==i||e[1]!==n?(o=n?s.jsx(Jl,{virtualMcpId:n,size:i}):s.jsx($e,{icon:null,name:"?",size:i}),e[0]=i,e[1]=n,e[2]=o):o=e[2];let a;e[3]!==r?(a=r&&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(Rn,{size:10,className:"text-white"})}),e[3]=r,e[4]=a):a=e[4];let d;return e[5]!==o||e[6]!==a?(d=s.jsxs("div",{className:"relative shrink-0",children:[o,a]}),e[5]=o,e[6]=a,e[7]=d):d=e[7],d}function Jl(t){const e=w.c(6),{virtualMcpId:n,size:l}=t,r=Kt(n);if(!r){let a;return e[0]!==l?(a=s.jsx($e,{icon:null,name:"?",size:l}),e[0]=l,e[1]=a):a=e[1],a}const i=r.icon??null;let o;return e[2]!==r.title||e[3]!==l||e[4]!==i?(o=s.jsx($e,{icon:i,name:r.title,size:l}),e[2]=r.title,e[3]=l,e[4]=i,e[5]=o):o=e[5],o}function Ct(t){const e=w.c(36),{open:n,onOpenChange:l}=t,[r,i]=T.useState(""),{org:o}=V(),{setTaskId:a}=ut(),d=Qt();let c,m,u;e[0]!==o.id||e[1]!==r?(u=r.trim(),m=Ts,c=$s.globalSearch(o.id,u),e[0]=o.id,e[1]=r,e[2]=c,e[3]=m,e[4]=u):(c=e[2],m=e[3],u=e[4]);const f=n&&u.length>0;let h;e[5]!==d||e[6]!==u?(h=async()=>await d.call("GLOBAL_SEARCH",{query:u,limit:20}),e[5]=d,e[6]=u,e[7]=h):h=e[7];let p;e[8]!==c||e[9]!==f||e[10]!==h?(p={queryKey:c,enabled:f,queryFn:h,staleTime:1e4},e[8]=c,e[9]=f,e[10]=h,e[11]=p):p=e[11];const{data:x,isFetching:g}=m(p);let b;e[12]!==x?.items?(b=x?.items??[],e[12]=x?.items,e[13]=b):b=e[13];const j=b;let v;e[14]!==l?(v=$=>{$||i(""),l($)},e[14]=l,e[15]=v):v=e[15];const y=v;let C;e[16]!==y||e[17]!==a?(C=$=>{y(!1),a($.id,$.virtual_mcp_id??void 0)},e[16]=y,e[17]=a,e[18]=C):C=e[18];const k=C;let S;e[19]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsxs(zn,{className:"sr-only",children:[s.jsx(An,{children:"Search"}),s.jsx($n,{children:"Search across your organization's resources."})]}),e[19]=S):S=e[19];let N;e[20]!==r?(N=s.jsx(Pn,{value:r,onValueChange:i,placeholder:"Search..."}),e[20]=r,e[21]=N):N=e[21];let _;e[22]!==k||e[23]!==g||e[24]!==j||e[25]!==u?(_=u?g&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):j.length===0?s.jsx(On,{children:"No results."}):j.map($=>$.type==="thread"?s.jsxs(Dn,{value:`thread:${$.id}:${$.title}`,onSelect:()=>k($),className:"gap-2.5",children:[s.jsx(Yl,{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 thread"})}),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]=k,e[23]=g,e[24]=j,e[25]=u,e[26]=_):_=e[26];let z;e[27]!==_?(z=s.jsx(En,{children:_}),e[27]=_,e[28]=z):z=e[28];let O;e[29]!==N||e[30]!==z?(O=s.jsxs(Tn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[S,s.jsxs(Fn,{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,z]})]}),e[29]=N,e[30]=z,e[31]=O):O=e[31];let A;return e[32]!==y||e[33]!==n||e[34]!==O?(A=s.jsx(Mn,{open:n,onOpenChange:y,children:O}),e[32]=y,e[33]=n,e[34]=O,e[35]=A):A=e[35],A}const Zl="sidebar.group.expanded.";function er(t,e){const n=w.c(3),[l,r]=qe(`${Zl}${t}`,e);let i;return n[0]!==l||n[1]!==r?(i=[l,r],n[0]=l,n[1]=r,n[2]=i):i=n[2],i}function ds(t){const e=w.c(12),{onClick:n,isFetching:l,indented:r}=t,i=r?"-ml-4 pl-6 pr-2":"px-2";let o;e[0]!==i?(o=D("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",i,"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]=i,e[1]=o):o=e[1];let a;e[2]!==l?(a=l&&s.jsx(Ot,{size:14,className:"animate-spin"}),e[2]=l,e[3]=a):a=e[3];const d=l?"Loading…":"Show more";let c;e[4]!==d?(c=s.jsx("span",{children:d}),e[4]=d,e[5]=c):c=e[5];let m;return e[6]!==l||e[7]!==n||e[8]!==o||e[9]!==a||e[10]!==c?(m=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:l,className:o,children:[a,c]}),e[6]=l,e[7]=n,e[8]=o,e[9]=a,e[10]=c,e[11]=m):m=e[11],m}function tr(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function sr(t){return t.member==="mine"&&!t.currentUserId}const ms=4;let He=0;const rt=[];function nr(){for(;He<ms&&rt.length>0;){const t=rt.shift();t&&t()}}function us(t){return new Promise((e,n)=>{const l=()=>{He++,t().then(e,n).finally(()=>{He--,nr()})};He<ms?l():rt.push(l)})}const Ve=10;function wt(t,e,n,l,r){const i={hidden:!1};l.member==="mine"&&l.currentUserId&&(i.created_by=l.currentUserId),l.type==="automation"&&(i.has_trigger=!0),l.type==="manual"&&(i.has_trigger=!1);const o={where:i,limit:r,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function lr(t,e,n,l){let r=0;for(const i of t)fs(i,e,n,l)&&r++;return r}function Ze(t,e,n,l){return lr(t,e,n,l)}function rr(t,e){return!!(t>=Ve||t===0&&e)}function kt(t,e){return t<e}function ir(t,e){return e===!1?!1:e===!0?!0:t}function fs(t,e,n,l){return!(t.hidden||(t.status??"completed")!==n||l.member==="mine"&&l.currentUserId&&t.created_by!==l.currentUserId||l.type==="automation"&&!t.trigger_id||l.type==="manual"&&t.trigger_id)}const Ge=new Map,Be=new Map;function or(t,e){return e?t>=Ve?!0:null:!1}function It(t){return Ge.get(t)}function ar(t,e){Ge.set(t,e)}function cr(t,e,n){const l=Ge.get(t);if(l!==void 0){n(l);return}let r=Be.get(t);r||(r=us(e).then(i=>(Ge.set(t,i),Be.delete(t),i)).catch(()=>(Be.delete(t),Promise.reject(new Error("group probe failed")))),Be.set(t,r)),r.then(n,()=>n(!1))}function zt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ve,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function dr(t,e,n,l,r){let i=0;for(const o of t)e.has(o.id)||fs(o,n,l,r)&&i++;return i}function mr(t,e,n,l){const r=w.c(8),{org:i}=V(),o=tr(i.id,t,e,n);let a;r[0]!==n?(a=sr(n),r[0]=n,r[1]=a):a=r[1];const d=a,[c,m]=T.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==o&&m({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const u=kn(),{threads:f,hasMore:h}=ft(),p=Ze(f,t,e,n),x=rr(p,h),g=or(p,h),b=Qt();if(c.identity===o&&c.serverHasMore===null){const S=g??It(o);S!==void 0&&m({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:S})}!d&&c.identity===o&&c.serverHasMore===null&&g===null&&It(o)===void 0&&c.probeSubscribedIdentity!==o&&(m(S=>S.identity===o?{...S,isProbing:!0,probeSubscribedIdentity:o}:S),cr(o,async()=>{const S=wt(t,e,0,n,1),N=await b.call("COLLECTION_THREADS_LIST",S),{totalCount:_}=zt(N),z=Ze(u.threads.get(),t,e,n);return _===void 0?!1:kt(z,_)},S=>{m(N=>N.identity!==o?N:{...N,isProbing:!1,serverHasMore:S})}));const v=async function(){if(c.isFetching||c.isProbing||d)return;const N=o;m(_=>_.identity===N?{..._,isFetching:!0}:_);try{const _=Ze(f,t,e,n),z=wt(t,e,_,n,Ve),O=await us(()=>b.call("COLLECTION_THREADS_LIST",z)),{items:A,hasMore:$,totalCount:E}=zt(O),H=new Set(f.map(ur)),F=dr(A,H,t,e,n),L=_;u.mergeThreads(A),m(M=>{if(M.identity!==N)return M;let X;return E!==void 0?X=kt(L+F,E):X=A.length===0||F===0?!1:$,ar(N,X),{...M,isFetching:!1,serverHasMore:X}})}catch(_){const z=_,O=z instanceof Error?z.message:String(z);re.error(`Could not load more tasks: ${O}`),m(A=>A.identity===N?{...A,isFetching:!1}:A)}},y=c.isFetching||c.isProbing,C=!d&&!y&&ir(x,c.serverHasMore);let k;return r[2]!==y||r[3]!==v||r[4]!==C||r[5]!==c.isProbing||r[6]!==c.serverHasMore?(k={hasMore:C,isFetching:y,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:v},r[2]=y,r[3]=v,r[4]=C,r[5]=c.isProbing,r[6]=c.serverHasMore,r[7]=k):k=r[7],k}function ur(t){return t.id}function fr(t){const e=w.c(18),{status:n,threads:l,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a}=t,{isFetching:d,isProbing:c,loadMore:m,hasMore:u,serverHasMore:f}=mr("status",n,a),[h,p]=T.useState(!1);!h&&l.length===0&&f===!0&&!d&&!c&&(p(!0),queueMicrotask(()=>{m()}));let x;if(e[0]!==r||e[1]!==a||e[2]!==o||e[3]!==i||e[4]!==l){let j;e[6]!==r||e[7]!==a||e[8]!==o||e[9]!==i?(j=v=>s.jsx(Jt,{task:v,isActive:r===v.id,onClick:()=>i(v),onArchive:v.created_by===a.currentUserId?()=>o(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[6]=r,e[7]=a,e[8]=o,e[9]=i,e[10]=j):j=e[10],x=l.map(j),e[0]=r,e[1]=a,e[2]=o,e[3]=i,e[4]=l,e[5]=x}else x=e[5];let g;e[11]!==u||e[12]!==d||e[13]!==m?(g=(u||d)&&s.jsx(ds,{onClick:()=>{m()},isFetching:d,indented:!0}),e[11]=u,e[12]=d,e[13]=m,e[14]=g):g=e[14];let b;return e[15]!==x||e[16]!==g?(b=s.jsxs(s.Fragment,{children:[x,g]}),e[15]=x,e[16]=g,e[17]=b):b=e[17],b}function xr(t){const e=w.c(35),{status:n,threads:l,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a}=t,d=Bn[n],c=d.icon,[m,u]=er(`status-${n}`,!1);let f;e[0]!==m||e[1]!==u?(f=function(){u(!m)},e[0]=m,e[1]=u,e[2]=f):f=e[2];const h=f;let p;e[3]!==h?(p=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),h())},e[3]=h,e[4]=p):p=e[4];let x;e[5]!==c||e[6]!==d.iconClassName?(x=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(c,{size:12,className:d.iconClassName})}),e[5]=c,e[6]=d.iconClassName,e[7]=x):x=e[7];let g;e[8]!==m?(g=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:m?s.jsx(xt,{size:14}):s.jsx(Wt,{size:14})}),e[8]=m,e[9]=g):g=e[9];let b;e[10]!==x||e[11]!==g?(b=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[x,g]}),e[10]=x,e[11]=g,e[12]=b):b=e[12];let j;e[13]!==d.label?(j=s.jsx("span",{className:"flex-1 truncate",children:d.label}),e[13]=d.label,e[14]=j):j=e[14];let v;e[15]!==l.length?(v=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:l.length})}),e[15]=l.length,e[16]=v):v=e[16];let y;e[17]!==m||e[18]!==h||e[19]!==p||e[20]!==b||e[21]!==j||e[22]!==v?(y=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,onClick:h,onKeyDown:p,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[b,j,v]}),e[17]=m,e[18]=h,e[19]=p,e[20]=b,e[21]=j,e[22]=v,e[23]=y):y=e[23];let C;e[24]!==r||e[25]!==m||e[26]!==a||e[27]!==o||e[28]!==i||e[29]!==n||e[30]!==l?(C=m&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(fr,{status:n,threads:l,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a})}),e[24]=r,e[25]=m,e[26]=a,e[27]=o,e[28]=i,e[29]=n,e[30]=l,e[31]=C):C=e[31];let k;return e[32]!==y||e[33]!==C?(k=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[y,C]}),e[32]=y,e[33]=C,e[34]=k):k=e[34],k}function At(t){const e=w.c(34),{threads:n,groupBy:l,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:m,filtersActive:u}=t;if(n.length===0&&!d&&!c){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ke,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];const g=u?"No threads match your filters":"No threads yet";let b;return e[1]!==g?(b=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,s.jsx("p",{className:"text-sm",children:g})]}),e[1]=g,e[2]=b):b=e[2],b}if(l==="status"){let x;if(e[3]!==r||e[4]!==a||e[5]!==o||e[6]!==i||e[7]!==n){let b;e[9]!==r||e[10]!==a||e[11]!==o||e[12]!==i?(b=j=>s.jsx(xr,{status:j.status,threads:j.threads,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a},j.status),e[9]=r,e[10]=a,e[11]=o,e[12]=i,e[13]=b):b=e[13],x=Al(n).map(b),e[3]=r,e[4]=a,e[5]=o,e[6]=i,e[7]=n,e[8]=x}else x=e[8];let g;return e[14]!==x?(g=s.jsx(s.Fragment,{children:x}),e[14]=x,e[15]=g):g=e[15],g}let f;if(e[16]!==r||e[17]!==a||e[18]!==o||e[19]!==i||e[20]!==n){let x;e[22]!==r||e[23]!==a||e[24]!==o||e[25]!==i?(x=g=>s.jsx(Jt,{task:g,isActive:r===g.id,onClick:()=>i(g),onArchive:g.created_by===a.currentUserId?()=>o(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[22]=r,e[23]=a,e[24]=o,e[25]=i,e[26]=x):x=e[26],f=n.map(x),e[16]=r,e[17]=a,e[18]=o,e[19]=i,e[20]=n,e[21]=f}else f=e[21];let h;e[27]!==d||e[28]!==c||e[29]!==m?(h=(d||c)&&s.jsx(ds,{onClick:m,isFetching:c}),e[27]=d,e[28]=c,e[29]=m,e[30]=h):h=e[30];let p;return e[31]!==f||e[32]!==h?(p=s.jsxs(s.Fragment,{children:[f,h]}),e[31]=f,e[32]=h,e[33]=p):p=e[33],p}function $t(t){const e=w.c(17),{label:n,onClick:l,active:r,children:i}=t,[o,a]=T.useState(!1);let d,c,m,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),m=()=>a(!0),u=()=>a(!1),e[0]=d,e[1]=c,e[2]=m,e[3]=u):(d=e[0],c=e[1],m=e[2],u=e[3]);const f=r&&"bg-sidebar-accent text-foreground";let h;e[4]!==f?(h=D(f),e[4]=f,e[5]=h):h=e[5];let p;e[6]!==i||e[7]!==n||e[8]!==l||e[9]!==h?(p=s.jsx(ae,{asChild:!0,children:s.jsx(Z,{"aria-label":n,onClick:l,onPointerEnter:d,onPointerLeave:c,onFocus:m,onBlur:u,className:h,children:i})}),e[6]=i,e[7]=n,e[8]=l,e[9]=h,e[10]=p):p=e[10];let x;e[11]!==n?(x=s.jsx(ce,{side:"bottom",children:n}),e[11]=n,e[12]=x):x=e[12];let g;return e[13]!==o||e[14]!==p||e[15]!==x?(g=s.jsxs(de,{open:o,children:[p,x]}),e[13]=o,e[14]=p,e[15]=x,e[16]=g):g=e[16],g}function et(t){const e=w.c(13),{label:n,value:l,onChange:r,options:i}=t;let o;e[0]!==n?(o=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=o):o=e[1];let a;e[2]!==r?(a=u=>u&&r(u),e[2]=r,e[3]=a):a=e[3];let d;e[4]!==i?(d=i.map(hr),e[4]=i,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==l?(c=s.jsx(Nn,{type:"single",size:"sm",value:l,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:d}),e[6]=a,e[7]=d,e[8]=l,e[9]=c):c=e[9];let m;return e[10]!==o||e[11]!==c?(m=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,c]}),e[10]=o,e[11]=c,e[12]=m):m=e[12],m}function hr(t){return s.jsxs(Sn,{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 xs({onNavigate:t}={}){const{data:e}=pe.useSession(),n=e?.user?.id,{org:l}=V(),r=_n({connectionId:Cn,orgId:l.id,orgSlug:l.slug}),i=Ue(l.id).id,o=Xt(),{threads:a,hasMore:d,isFetchingMore:c,fetchNextPage:m}=ft(),u=a.filter(I=>!I.hidden),{hide:f}=Vt(),h=ee(),{setTaskId:p,createNewTask:x}=ut(),g=it({strict:!1}),b=ot({strict:!1}),j=g.taskId??null,v=b.virtualmcpid??a.find(I=>I.id===j)?.virtual_mcp_id??null,y=()=>{t?.()},C=[...u].sort((I,P)=>(P.updated_at??"").localeCompare(I.updated_at??"")),[k,S]=T.useState("all"),[N,_]=T.useState("flat"),[z,O]=qe("sidebar-threads-scope-all",!1),[A,$]=T.useState(!1),[E,H]=T.useState(!1),F={type:k,member:"mine",currentUserId:n??null},L=I=>n?I.filter(P=>P.created_by===n):[],M=I=>k==="automation"?I.filter(P=>!!P.trigger_id):k==="manual"?I.filter(P=>!P.trigger_id):I,X=L(C),me=M(X),ue=M(C),fe=z?ue:me,U=I=>{if(n&&I.created_by&&I.created_by!==n)return;const P=I.id===j;if(f(I.id),!P)return;const G=X.find(R=>R.id!==I.id&&R.virtual_mcp_id===I.virtual_mcp_id);y(),G?p(G.id,G.virtual_mcp_id):h({to:"/$org",params:{org:l.slug}})},q=I=>{y(),p(I.id,I.virtual_mcp_id)},te=async I=>{try{const P=await r.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:I,limit:1,offset:0}});return((P.structuredContent??P).items?.length??0)===0}catch{return!1}},Q=async()=>{const I=v??i;ie("sidebar_new_thread_clicked",{virtual_mcp_id:I});const P=X.find(G=>G.virtual_mcp_id===I&&G.title==="New chat");if(P&&await te(P.id)){y(),p(P.id,I);return}y(),x(I)},{state:je,isMobile:Y,toggleSidebar:xe}=be();if(je==="collapsed"&&!Y){const I=Ue(l.id),P=new Map((o??[]).map(R=>[R.id,R])),G=R=>(R?P.get(R):void 0)??(R===i?I:void 0);return s.jsxs(oe,{className:"min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(B,{children:s.jsx(K,{"aria-label":"Toggle sidebar",tooltip:"Toggle sidebar",onClick:xe,children:s.jsx(Ft,{size:16})})}),s.jsx(B,{children:s.jsx(K,{tooltip:"New thread",onClick:()=>{Q()},children:s.jsx(jt,{size:16})})}),fe.map(R=>{const ne=G(R.virtual_mcp_id);return s.jsx(B,{children:s.jsx(K,{tooltip:R.title||"New chat",isActive:R.id===j,onClick:()=>q(R),children:s.jsx($e,{icon:ne?.icon??null,name:ne?.title??"Agent",size:"2xs"})})},R.id)})]})}const se=N!=="flat"||k!=="all"||z===!0,he=s.jsxs(De,{children:[s.jsxs(de,{children:[s.jsx(ae,{asChild:!0,children:s.jsx(ge,{asChild:!0,children:s.jsxs(Z,{"aria-label":"Filter threads",active:se,children:[s.jsx(yn,{size:16}),se&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(ce,{side:"bottom",children:"Filter threads"})]}),s.jsxs(Pe,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(et,{label:"View",value:N,onChange:I=>{ie("tasks_panel_group_by_changed",{to_value:I}),_(I)},options:[{value:"flat",label:"List",icon:s.jsx(ln,{size:13})},{value:"status",label:"Status",icon:s.jsx(rn,{size:13})}]}),s.jsx(et,{label:"Type",value:k,onChange:I=>{ie("tasks_panel_filter_changed",{to_value:I}),S(I)},options:[{value:"all",label:"All"},{value:"manual",label:"Chats"},{value:"automation",label:"Auto"}]}),s.jsx(et,{label:"Scope",value:z?"team":"mine",onChange:I=>O(I==="team"),options:[{value:"mine",label:"Mine"},{value:"team",label:"Team"}]})]})]}),ye=I=>s.jsx(st,{delayDuration:300,children:s.jsxs("div",{className:D("shrink-0 px-1 flex items-center justify-between",I?"h-10":"h-10 md:h-7 mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!I&&s.jsx(Yt,{}),he]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx($t,{label:"Search threads",onClick:()=>{ie("tasks_panel_search_opened"),H(!0),$(!0)},children:s.jsx(nn,{size:16})}),s.jsx($t,{label:"New thread",onClick:()=>{Q()},children:s.jsx(jt,{size:16})})]})]})});return Y?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[ye(!0),s.jsx(_t,{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(At,{threads:fe,groupBy:N,activeTaskId:j,onSelectTask:q,onArchiveTask:U,filters:F,hasMore:d,isFetchingMore:c,onLoadMore:()=>{m()},filtersActive:se})}),E&&s.jsx(Ct,{open:A,onOpenChange:$})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[ye(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(_t,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(At,{threads:fe,groupBy:N,activeTaskId:j,onSelectTask:q,onArchiveTask:U,filters:F,hasMore:d,isFetchingMore:c,onLoadMore:()=>{m()},filtersActive:se})})}),E&&s.jsx(Ct,{open:A,onOpenChange:$})]})}const pr=5,gr=[{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 hs(){const t=w.c(3),{state:e}=be();if(e==="collapsed"){let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:pr}).map(vr)}),t[0]=r):r=t[0],r}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(J,{className:"size-6 rounded-md"}),s.jsx(J,{className:"size-6 rounded-md"}),s.jsx(J,{className:"size-6 rounded-md"})]}),s.jsx(J,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:gr.map(br)})]}),t[2]=l):l=t[2],l}function br(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(J,{className:"size-5 rounded-full shrink-0"}),s.jsx(J,{className:D("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(jr)})]},e)}function jr(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(J,{className:"h-3 flex-1 rounded-sm"})},e)}function vr(t,e){return s.jsx(J,{className:"size-10 rounded-lg mx-auto"},e)}function yr(){const t=w.c(4),e=ts();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Vl,{}),t[0]=n):n=t[0];let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Dt,{children:s.jsx(T.Suspense,{fallback:s.jsx(hs,{}),children:s.jsx(xs,{})})}),t[1]=l):l=t[1];let r;return t[2]!==e?(r=s.jsx(Zt,{children:s.jsx(ls,{sections:e,footer:n,additionalContent:l})}),t[2]=e,t[3]=r):r=t[3],r}function Sr(t){const e=w.c(8),{onClose:n}=t,l=ts();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ql,{}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(hs,{}),e[1]=i):i=e[1];let o;e[2]!==n?(o=s.jsx(Dt,{children:s.jsx(T.Suspense,{fallback:i,children:s.jsx(xs,{onNavigate:n})})}),e[2]=n,e[3]=o):o=e[3];let a;return e[4]!==n||e[5]!==l||e[6]!==o?(a=s.jsx(Zt,{children:s.jsx(Nl,{sections:l,onClose:n,footer:r,additionalContent:o})}),e[4]=n,e[5]=l,e[6]=o,e[7]=a):a=e[7],a}function ps(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Nr=Ms({name:Os().min(2,"Organization name is required")});function _r(t){const e=w.c(41),{open:n,onOpenChange:l}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={resolver:Ds(Nr),defaultValues:{name:""}},e[0]=r):r=e[0];const i=Ps(r);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={mutationFn:wr,onSuccess:Cr},e[1]=o):o=e[1];const a=Es(o),d=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(Jn,{children:[s.jsx(Zn,{children:"Create a new organization"}),s.jsx(el,{children:"Set up a new organization to collaborate with others."})]}),e[2]=c):c=e[2];let m;if(e[3]!==a||e[4]!==i){let S;e[6]!==a?(S=N=>a.mutateAsync(N),e[6]=a,e[7]=S):S=e[7],m=i.handleSubmit(S),e[3]=a,e[4]=i,e[5]=m}else m=e[5];let u;e[8]!==i.formState.isSubmitting?(u=S=>{const{field:N}=S;return s.jsxs(rl,{children:[s.jsx(il,{children:"Organization Name"}),s.jsx(ol,{children:s.jsx(dl,{...N,placeholder:"Acme Inc.",disabled:i.formState.isSubmitting})}),s.jsx(al,{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:"","/",ps(N.value)]})]}),s.jsx(cl,{})]})},e[8]=i.formState.isSubmitting,e[9]=u):u=e[9];let f;e[10]!==i.control||e[11]!==u?(f=s.jsx(nl,{control:i.control,name:"name",render:u}),e[10]=i.control,e[11]=u,e[12]=f):f=e[12];let h;e[13]!==d?(h=d&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:d}),e[13]=d,e[14]=h):h=e[14];let p;e[15]!==a||e[16]!==i?(p=()=>{a.reset(),i.reset()},e[15]=a,e[16]=i,e[17]=p):p=e[17];let x;e[18]!==i.formState.isSubmitting||e[19]!==p?(x=s.jsx(Qn,{disabled:i.formState.isSubmitting,onClick:p,children:"Cancel"}),e[18]=i.formState.isSubmitting,e[19]=p,e[20]=x):x=e[20];const g=!i.formState.isValid||i.formState.isSubmitting;let b;e[21]!==i.formState.isSubmitting?(b=i.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(Wn,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=i.formState.isSubmitting,e[22]=b):b=e[22];let j;e[23]!==g||e[24]!==b?(j=s.jsx(Ae,{type:"submit",variant:"default",disabled:g,children:b}),e[23]=g,e[24]=b,e[25]=j):j=e[25];let v;e[26]!==j||e[27]!==x?(v=s.jsxs(tl,{children:[x,j]}),e[26]=j,e[27]=x,e[28]=v):v=e[28];let y;e[29]!==v||e[30]!==m||e[31]!==f||e[32]!==h?(y=s.jsxs("form",{className:"space-y-6",onSubmit:m,autoComplete:"off",children:[f,h,v]}),e[29]=v,e[30]=m,e[31]=f,e[32]=h,e[33]=y):y=e[33];let C;e[34]!==i||e[35]!==y?(C=s.jsxs(Yn,{children:[c,s.jsx(ll,{...i,children:y})]}),e[34]=i,e[35]=y,e[36]=C):C=e[36];let k;return e[37]!==l||e[38]!==n||e[39]!==C?(k=s.jsx(sl,{open:n,onOpenChange:l,children:C}),e[37]=l,e[38]=n,e[39]=C,e[40]=k):k=e[40],k}function Cr(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function wr(t){const e=ps(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await pe.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const l=n?.data?.slug??e;if(!l)throw new Error("Failed to create organization");return{orgSlug:l}}function kr(t){let e=0;for(let l=0;l<t.length;l++)e=t.charCodeAt(l)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function gs(t){const e=w.c(13),{org:n,size:l}=t,r=l===void 0?"sm":l,i=r==="xs"?"size-5":"size-6",o=r==="xs"?"text-[9px]":"text-xs";let a;e[0]!==i?(a=D(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=a):a=e[1];let d;e[2]!==n.logo||e[3]!==n.name?(d=n.logo?void 0:kr(n.name),e[2]=n.logo,e[3]=n.name,e[4]=d):d=e[4];let c;e[5]!==n.logo||e[6]!==n.name||e[7]!==o?(c=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:D("font-semibold leading-none",o),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=o,e[8]=c):c=e[8];let m;return e[9]!==a||e[10]!==d||e[11]!==c?(m=s.jsx("div",{className:a,style:d,children:c}),e[9]=a,e[10]=d,e[11]=c,e[12]=m):m=e[12],m}function Ir(t){const e=w.c(24),{orgParam:n,onSelectOrg:l,onCreateOrg:r}=t,{data:i}=Fs();let o;e[0]!==n?(o=(_,z)=>_.slug===n?-1:z.slug===n?1:_.name.localeCompare(z.name),e[0]=n,e[1]=o):o=e[1];const a=[...i??[]].sort(o),[d,c]=T.useState(""),m=d.toLowerCase(),u=m?a.filter(_=>_.name.toLowerCase().includes(m)||_.slug.toLowerCase().includes(m)):a;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(es,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=f):f=e[2];let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=_=>c(_.target.value),e[3]=h):h=e[3];let p;e[4]!==d?(p=_=>_.key==="Escape"&&d&&c(""),e[4]=d,e[5]=p):p=e[5];let x;e[6]!==d||e[7]!==p?(x=s.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:d,onChange:h,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]=x):x=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Te,{size:16}),e[9]=g):g=e[9];let b;e[10]!==r?(b=s.jsx("button",{type:"button",onClick:r,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:g}),e[10]=r,e[11]=b):b=e[11];let j;e[12]!==x||e[13]!==b?(j=s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[f,x,b]}),e[12]=x,e[13]=b,e[14]=j):j=e[14];const v="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1",y=u.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 C;e[15]!==l||e[16]!==n?(C=_=>s.jsxs("button",{type:"button",onClick:()=>l(_.slug),className:D("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",_.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(gs,{org:_,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:_.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:_.slug})]}),_.slug===n&&s.jsx(Xe,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},_.id),e[15]=l,e[16]=n,e[17]=C):C=e[17];const k=u.map(C);let S;e[18]!==y||e[19]!==k?(S=s.jsxs("div",{className:v,children:[y,k]}),e[18]=y,e[19]=k,e[20]=S):S=e[20];let N;return e[21]!==S||e[22]!==j?(N=s.jsxs(s.Fragment,{children:[j,S]}),e[21]=S,e[22]=j,e[23]=N):N=e[23],N}function zr(t){const e=w.c(22),{trigger:n,orgParam:l,align:r,side:i}=t,o=r===void 0?"start":r,a=i===void 0?"bottom":i,d=ee(),[c,m]=T.useState(!1),[u,f]=T.useState(!1);let h;e[0]!==n?(h=s.jsx(ge,{asChild:!0,children:n}),e[0]=n,e[1]=h):h=e[1];const p=String(c);let x;e[2]!==d?(x=k=>{m(!1),d({to:"/$org",params:{org:k}})},e[2]=d,e[3]=x):x=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{m(!1),f(!0)},e[4]=g):g=e[4];let b;e[5]!==l||e[6]!==p||e[7]!==x?(b=s.jsx(Ir,{orgParam:l,onSelectOrg:x,onCreateOrg:g},p),e[5]=l,e[6]=p,e[7]=x,e[8]=b):b=e[8];let j;e[9]!==o||e[10]!==a||e[11]!==b?(j=s.jsx(Pe,{side:a,align:o,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:$r,onCloseAutoFocus:Ar,children:b}),e[9]=o,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(De,{open:c,onOpenChange:m,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(_r,{open:u,onOpenChange:f}),e[17]=u,e[18]=y):y=e[18];let C;return e[19]!==y||e[20]!==v?(C=s.jsxs(s.Fragment,{children:[v,y]}),e[19]=y,e[20]=v,e[21]=C):C=e[21],C}function Ar(t){return t.preventDefault()}function $r(t){t.preventDefault(),t.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function Tr(t){const e=w.c(21),{value:n,onChange:l,placeholder:r,onKeyDown:i,className:o,isSearching:a,disabled:d}=t,c=r===void 0?"Search...":r;let m;e[0]!==o?(m=D("shrink-0 w-full border-b border-border h-12",o),e[0]=o,e[1]=m):m=e[1];const u=d?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==u?(f=D("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(Ot,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(es,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=h):h=e[5];let p;e[6]!==l?(p=j=>l(j.target.value),e[6]=l,e[7]=p):p=e[7];let x;e[8]!==d||e[9]!==i||e[10]!==c||e[11]!==p||e[12]!==n?(x=s.jsx("input",{type:"text",value:n,onChange:p,onKeyDown:i,placeholder:c,disabled:d,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=d,e[9]=i,e[10]=c,e[11]=p,e[12]=n,e[13]=x):x=e[13];let g;e[14]!==f||e[15]!==h||e[16]!==x?(g=s.jsxs("label",{className:f,children:[h,x]}),e[14]=f,e[15]=h,e[16]=x,e[17]=g):g=e[17];let b;return e[18]!==m||e[19]!==g?(b=s.jsx("div",{className:m,children:g}),e[18]=m,e[19]=g,e[20]=b):b=e[20],b}const Mr="Select an existing agent";function Or(t){const e=w.c(5),{children:n}=t;let l;e[0]!==n?(l=s.jsx(ae,{asChild:!0,children:n}),e[0]=n,e[1]=l):l=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ce,{side:"right",sideOffset:8,children:Mr}),e[2]=r):r=e[2];let i;return e[3]!==l?(i=s.jsxs(de,{defaultOpen:!0,delayDuration:0,children:[l,r]}),e[3]=l,e[4]=i):i=e[4],i}function Dr(t){const e=ee(),{create:n}=Vt(),{locator:l}=V(),r=it({strict:!1}),i=ot({strict:!1});return async o=>{const a=crypto.randomUUID(),d=o===i.virtualmcpid?vn(t,l,r.taskId??""):null;try{await n({id:a,virtual_mcp_id:o,...d?{branch:d}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:o}})}}function Tt(t){const e=w.c(20),{agent:n,selected:l,onClick:r}=t,i=l?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let o;e[0]!==i?(o=D("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",i),e[0]=i,e[1]=o):o=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx($e,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let d;e[5]!==n.title?(d=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=d):d=e[6];let c;e[7]!==n.description?(c=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[7]=n.description,e[8]=c):c=e[8];let m;e[9]!==d||e[10]!==c?(m=s.jsxs("div",{className:"flex-1 min-w-0",children:[d,c]}),e[9]=d,e[10]=c,e[11]=m):m=e[11];let u;e[12]!==l?(u=l&&s.jsx(Xe,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=l,e[13]=u):u=e[13];let f;return e[14]!==r||e[15]!==o||e[16]!==a||e[17]!==m||e[18]!==u?(f=s.jsxs("button",{type:"button",onClick:r,className:o,children:[a,m,u]}),e[14]=r,e[15]=o,e[16]=a,e[17]=m,e[18]=u,e[19]=f):f=e[19],f}function Pr(t){const e=w.c(23),{onClose:n,onSelectAgent:l,selectedAgentId:r}=t,[i,o]=T.useState(""),a=Xt(),d=a??[],{org:c}=V(),{data:m}=pe.useSession(),u=m?.user?.id??"anon",f=Un(a),h=Gn(),p=Dr(c.slug),x=mn(a),g=i.toLowerCase(),b=d.filter(Er).filter(M=>!x.has(M.id)).filter(M=>!i||M.title.toLowerCase().includes(g)),j=Ue(c.id),v=!i||j.title.toLowerCase().includes(g);let y;e[0]!==n||e[1]!==l?(y=()=>{l?.(null),n(),o("")},e[0]=n,e[1]=l,e[2]=y):y=e[2];const C=y,k=M=>{if(l){l(M.id),n(),o("");return}qn({orgId:c.id,userId:u},M.id,f),h(),n(),o(""),p(M.id)},S="flex flex-col max-h-[min(640px,80dvh)]";let N;e[3]!==i?(N=s.jsx(Tr,{value:i,onChange:o,placeholder:"Search agents..."}),e[3]=i,e[4]=N):N=e[4];const _="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-1",z=l&&v&&j&&s.jsx(Tt,{agent:j,selected:!r||r===j.id,onClick:C}),O=b.map(M=>s.jsx(Tt,{agent:M,selected:l?r===M.id:void 0,onClick:()=>k(M)},M.id));let A;e[5]!==i||e[6]!==b.length?(A=b.length===0&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:i?"No agents found":"No agents yet"}),e[5]=i,e[6]=b.length,e[7]=A):A=e[7];let $;e[8]!==z||e[9]!==O||e[10]!==A?($=s.jsxs("div",{className:_,children:[z,O,A]}),e[8]=z,e[9]=O,e[10]=A,e[11]=$):$=e[11];let E;e[12]!==c.slug?(E={org:c.slug},e[12]=c.slug,e[13]=E):E=e[13];let H;e[14]!==n?(H=()=>n(),e[14]=n,e[15]=H):H=e[15];let F;e[16]!==H||e[17]!==E?(F=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Pt,{to:"/$org/settings/agents",params:E,onClick:H,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[16]=H,e[17]=E,e[18]=F):F=e[18];let L;return e[19]!==F||e[20]!==N||e[21]!==$?(L=s.jsxs("div",{className:S,children:[N,$,F]}),e[19]=F,e[20]=N,e[21]=$,e[22]=L):L=e[22],L}function Er(t){return!wn(t.id)}function Fr(t){const e=w.c(23);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:l,trigger:r,onSelectAgent:i,selectedAgentId:o,side:a,align:d}=n,c=l===void 0?!1:l,m=a===void 0?"right":a,u=d===void 0?"start":d,[f,h]=T.useState(!1),p=mt(),{setOpenMobile:x}=be(),g=Hn(),b=g?"border border-border":void 0;let j;e[2]!==g?(j=_=>g?s.jsx(Or,{children:_}):_,e[2]=g,e[3]=j):j=e[3];const v=j;let y;e[4]!==p||e[5]!==x?(y=()=>{h(!1),p&&x(!1)},e[4]=p,e[5]=x,e[6]=y):y=e[6];const C=y;let k;e[7]!==C||e[8]!==i||e[9]!==f||e[10]!==o?(k=f&&s.jsx(T.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(J,{className:"h-4 w-24"})}),children:s.jsx(Pr,{onClose:C,onSelectAgent:i,selectedAgentId:o})}),e[7]=C,e[8]=i,e[9]=f,e[10]=o,e[11]=k):k=e[11];const S=k;let N;return e[12]!==u||e[13]!==c||e[14]!==b||e[15]!==g||e[16]!==p||e[17]!==f||e[18]!==S||e[19]!==m||e[20]!==r||e[21]!==v?(N=s.jsx(s.Fragment,{children:p?s.jsxs(s.Fragment,{children:[r?s.jsx("button",{type:"button",onClick:()=>h(!0),className:"contents",children:r}):c?v(s.jsx(Z,{"aria-label":"Browse agents",className:D(b),onClick:()=>{ie("agent_browser_opened",{surface:"mobile_drawer"}),h(!0)},children:s.jsx(Te,{className:"size-4"})})):s.jsx(B,{children:v(s.jsxs(K,{tooltip:g?void 0:"Browse agents",className:D(b),onClick:()=>{ie("agent_browser_opened",{surface:"mobile_drawer"}),h(!0)},children:[s.jsx(Te,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(Rt,{open:f,onOpenChange:h,direction:"bottom",children:s.jsxs(Lt,{className:"max-h-[85dvh] p-0",children:[s.jsx(Bt,{className:"sr-only",children:"Browse agents"}),S]})})]}):s.jsxs(De,{open:f,onOpenChange:_=>{_&&!f&&ie("agent_browser_opened",{surface:"desktop_popover"}),h(_)},children:[r?s.jsx(ge,{asChild:!0,children:r}):c?v(s.jsx(ge,{asChild:!0,children:s.jsx(Z,{"aria-label":"Browse agents",className:D(b),children:s.jsx(Te,{className:"size-4"})})})):s.jsx(B,{children:v(s.jsx(ge,{asChild:!0,children:s.jsxs(K,{tooltip:g?void 0:"Browse agents",className:D(b),children:[s.jsx(Te,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(Pe,{className:"w-[380px] p-0 overflow-hidden",side:m,align:u,children:S})]})}),e[12]=u,e[13]=c,e[14]=b,e[15]=g,e[16]=p,e[17]=f,e[18]=S,e[19]=m,e[20]=r,e[21]=v,e[22]=N):N=e[22],N}const bs="wco-no-drag inline-flex items-center gap-1.5 min-w-0 rounded-md px-1.5 py-1 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Rr(t){const e=w.c(19),{agentId:n,onOpenHome:l,onPick:r}=t,i=Kt(n),o=i?.title??"Decopilot",a=`Open ${o} home`,d=i?.icon??null;let c;e[0]!==d||e[1]!==o?(c=s.jsx($e,{icon:d,name:o,size:"2xs"}),e[0]=d,e[1]=o,e[2]=c):c=e[2];let m;e[3]!==l||e[4]!==a||e[5]!==c?(m=s.jsx("button",{type:"button",onClick:l,"aria-label":a,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:c}),e[3]=l,e[4]=a,e[5]=c,e[6]=m):m=e[6];let u;e[7]!==o?(u=s.jsx("span",{className:"truncate font-medium max-w-[10rem]",children:o}),e[7]=o,e[8]=u):u=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(xt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[9]=f):f=e[9];let h;e[10]!==u?(h=s.jsxs("button",{type:"button",className:bs,children:[u,f]}),e[10]=u,e[11]=h):h=e[11];let p;e[12]!==n||e[13]!==r||e[14]!==h?(p=s.jsx(Fr,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:r,trigger:h}),e[12]=n,e[13]=r,e[14]=h,e[15]=p):p=e[15];let x;return e[16]!==m||e[17]!==p?(x=s.jsxs("div",{className:"flex items-center gap-0.5",children:[m,p]}),e[16]=m,e[17]=p,e[18]=x):x=e[18],x}function Mt(){const t=w.c(33),{org:e}=V(),{state:n}=be(),l=n==="collapsed",r=ee();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[0]=i):i=t[0];const o=it(i);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[1]=a):a=t[1];const d=ot(a),{threads:c}=ft(),{setTaskId:m,createNewTask:u}=ut();let f;t[2]!==e.id?(f=Ue(e.id),t[2]=e.id,t[3]=f):f=t[3];const h=f.id,p=o.taskId?d.virtualmcpid??h:h;let x;t[4]!==u||t[5]!==h||t[6]!==r||t[7]!==e.slug||t[8]!==m||t[9]!==c?(x=z=>{if(!z||z===h){r({to:"/$org",params:{org:e.slug}});return}const O=c.find(A=>!A.hidden&&A.virtual_mcp_id===z&&A.title==="New chat"&&(!A.status||A.status==="in_progress"));O?m(O.id,z):u(z)},t[4]=u,t[5]=h,t[6]=r,t[7]=e.slug,t[8]=m,t[9]=c,t[10]=x):x=t[10];const g=x;let b;t[11]!==e.slug?(b={org:e.slug},t[11]=e.slug,t[12]=b):b=t[12];let j;t[13]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(W.Logo,{}),t[13]=j):j=t[13];let v;t[14]!==b?(v=s.jsx(Pt,{to:"/$org",params:b,"aria-label":"Organization home",title:"Home",className:"wco-no-drag flex items-center shrink-0 cursor-pointer rounded-md px-1 hover:bg-accent/60 transition-colors",children:j}),t[14]=b,t[15]=v):v=t[15];let y;t[16]!==e||t[17]!==l?(y=!l&&s.jsx(zr,{orgParam:e.slug,trigger:s.jsxs("button",{type:"button",className:bs,children:[s.jsx(gs,{org:e,size:"xs"}),s.jsx("span",{className:"truncate font-medium max-w-[10rem]",children:e.name}),s.jsx(xt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"})]})}),t[16]=e,t[17]=l,t[18]=y):y=t[18];let C;t[19]!==v||t[20]!==y?(C=s.jsxs(vt,{className:"gap-0.5",children:[v,y]}),t[19]=v,t[20]=y,t[21]=C):C=t[21];let k;t[22]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("span",{className:"h-4 w-24 rounded bg-muted animate-pulse"}),t[22]=k):k=t[22];let S;t[23]!==p||t[24]!==g?(S=()=>g(p),t[23]=p,t[24]=g,t[25]=S):S=t[25];let N;t[26]!==p||t[27]!==g||t[28]!==S?(N=s.jsx(vt,{children:s.jsx(T.Suspense,{fallback:k,children:s.jsx(Rr,{agentId:p,onOpenHome:S,onPick:g})})}),t[26]=p,t[27]=g,t[28]=S,t[29]=N):N=t[29];let _;return t[30]!==N||t[31]!==C?(_=s.jsx(Xn,{className:"wco-no-drag",children:s.jsxs(Vn,{className:"flex-nowrap",children:[C,N]})}),t[30]=N,t[31]=C,t[32]=_):_=t[32],_}const Lr="sidebar.open";function Br(){const t=w.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ls,{}),t[0]=e):e=t[0],e}function Yo(){const t=w.c(24),e=mt(),[n,l]=qe(Lr,!1),{width:r,wrapperRef:i,onStartResize:o,resetWidth:a}=xl();let d;t[0]!==e?(d=e?s.jsxs(W.Header,{className:"grid-cols-1 px-1 pr-1",children:[s.jsxs("div",{className:"grid w-full grid-cols-[auto_auto_auto_1fr_auto_auto] items-center gap-2",children:[s.jsx(Yt,{}),s.jsx(Mt,{}),s.jsx(lt,{}),s.jsx("div",{"aria-hidden":!0,className:"min-w-0"}),s.jsx(W.TogglesSlot,{}),s.jsx(W.TabsSlot,{className:"min-w-0 justify-self-end"})]}),s.jsx(W.CenterSlot,{}),s.jsx(W.RightSlot,{})]}):s.jsxs(W.Header,{children:[s.jsx(W.LeftColumn,{children:s.jsx(Mt,{})}),s.jsx(W.CenterSlot,{}),s.jsxs(W.RightColumn,{children:[s.jsxs("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end items-center gap-0.5",children:[s.jsx(W.TogglesSlot,{}),s.jsx(W.TabsSlot,{})]}),s.jsx(W.RightSlot,{})]})]}),t[0]=e,t[1]=d):d=t[1];const c=`${r}px`;let m;t[2]!==c?(m={"--sidebar-width":c,"--sidebar-width-icon":"3.5rem"},t[2]=c,t[3]=m):m=t[3];const u=m;let f;t[4]!==e||t[5]!==o||t[6]!==a?(f=!e&&s.jsxs(s.Fragment,{children:[s.jsx(yr,{}),s.jsx(ml,{onPointerDown:o,onDoubleClick:a})]}),t[4]=e,t[5]=o,t[6]=a,t[7]=f):f=t[7];let h;t[8]===Symbol.for("react.memo_cache_sentinel")?(h={background:"transparent",containerType:"inline-size"},t[8]=h):h=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Us,{className:"flex flex-col",style:h,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(T.Suspense,{fallback:s.jsx(Br,{}),children:s.jsx(Rs,{})})})})}),t[9]=p):p=t[9];let x;t[10]!==u||t[11]!==f||t[12]!==i?(x=s.jsxs(Gs,{ref:i,className:"flex-1 bg-sidebar relative min-h-0",style:u,children:[f,p]}),t[10]=u,t[11]=f,t[12]=i,t[13]=x):x=t[13];let g;t[14]!==e?(g=e&&s.jsx(Ln,{renderSidebar:Hr}),t[14]=e,t[15]=g):g=t[15];let b;t[16]!==d||t[17]!==x||t[18]!==g?(b=s.jsx(Kn,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[d,x,g]})}),t[16]=d,t[17]=x,t[18]=g,t[19]=b):b=t[19];let j;return t[20]!==l||t[21]!==n||t[22]!==b?(j=s.jsx(In,{children:s.jsx(W.Provider,{children:s.jsx(qs,{open:n,onOpenChange:l,children:b})})}),t[20]=l,t[21]=n,t[22]=b,t[23]=j):j=t[23],j}function Hr(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(Sr,{onClose:e})})})}export{Yo as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{c as L,j as f,r as p,ad as O}from"./index-BKl9EaBX.js";import{l as I,F as $}from"./index-CAJbosoK.js";import{S as N}from"./chat-context-B_GYpd-x.js";async function K(e){const t=e.getModel();if(!t)throw new Error("[Monaco] No model found in editor");const n=t.getValue(),i=n.replace(/export default (async )?function/,"export default $1function __default")+`
|
|
2
|
-
type __ExpandRecursively<T> = T extends (...args: infer A) => infer R
|
|
3
|
-
? (...args: __ExpandRecursively<A>) => __ExpandRecursively<R>
|
|
4
|
-
: T extends object
|
|
5
|
-
? T extends infer O ? { [K in keyof O]: __ExpandRecursively<O[K]> } : never
|
|
6
|
-
: T;
|
|
7
|
-
type __InferredOutput = __ExpandRecursively<Awaited<ReturnType<typeof __default>>>;
|
|
8
|
-
declare const __outputValue: __InferredOutput;
|
|
9
|
-
`;t.setValue(i);const r=t.findMatches("__outputValue",!1,!1,!1,null,!1);if(!r||r.length===0)return t.setValue(n),null;const l=r[0];if(!l)return t.setValue(n),null;const c={lineNumber:l.range.startLineNumber,column:l.range.startColumn+1};try{const x=await(await I.init()).languages.typescript.getTypeScriptWorker();if(!x)return t.setValue(n),null;const m=await x(t.uri);await new Promise(_=>setTimeout(_,100));const E=t.getOffsetAt(c),y=await m.getQuickInfoAtPosition(t.uri.toString(),E);if(t.setValue(n),y){const b=y.displayParts.map(T=>T.text).join("").replace(/^const __outputValue:\s*/,"");return h(b)}else return null}catch(o){return t.setValue(n),console.error("Error getting return type:",o),null}}function h(e){if(e=e.trim(),e==="string")return{type:"string"};if(e==="number")return{type:"number"};if(e==="boolean")return{type:"boolean"};if(e==="null")return{type:"null"};if(e==="undefined")return{type:"null"};if(e==="unknown"||e==="any")return{};if(e==="never")return{not:{}};if(e.endsWith("[]")){const s=e.slice(0,-2);return{type:"array",items:h(s)}}const t=e.match(/^Array<(.+)>$/);if(t&&t[1])return{type:"array",items:h(t[1])};const n=e.match(/^Record<(.+),\s*(.+)>$/);if(n&&n[2])return{type:"object",additionalProperties:h(n[2].trim())};if(e.includes("|")){const s=A(e);if(s.length>1)return s.every(r=>/^["']/.test(r.trim()))?{type:"string",enum:s.map(r=>r.trim().replace(/^["']|["']$/g,""))}:{anyOf:s.map(r=>h(r.trim()))}}return/^["'].*["']$/.test(e)?{type:"string",const:e.slice(1,-1)}:/^-?\d+(\.\d+)?$/.test(e)?{type:"number",const:parseFloat(e)}:e.startsWith("{")&&e.endsWith("}")?D(e):{description:`TypeScript type: ${e}`}}function A(e){const t=[];let n=0,s="";for(let i=0;i<e.length;i++){const r=e[i];if(r==="{"||r==="<"||r==="("||r==="[")n++;else if(r==="}"||r===">"||r===")"||r==="]")n--;else if(r==="|"&&n===0){t.push(s.trim()),s="";continue}s+=r}return s.trim()&&t.push(s.trim()),t}function D(e){const t=e.slice(1,-1).trim();if(!t)return{type:"object",properties:{}};const n={},s=[];let i=0,r="";for(let c=0;c<t.length;c++){const o=t[c];if(o==="{"||o==="<"||o==="("||o==="[")i++;else if(o==="}"||o===">"||o===")"||o==="]")i--;else if(o===";"&&i===0){r.trim()&&C(r.trim(),n,s),r="";continue}r+=o}r.trim()&&C(r.trim(),n,s);const l={type:"object",properties:n};return s.length>0&&(l.required=s),l}function C(e,t,n){const s=e.match(/^(\w+)(\?)?:\s*(.+)$/s);if(s){const i=s[1],r=s[2],l=s[3];i&&l&&(t[i]=h(l.trim()),r||n.push(i))}}class z extends p.Component{constructor(t){super(t),this.state={hasError:!1,mountKey:0}}static getDerivedStateFromError(t){if(t.message?.includes("InstantiationService has been disposed"))return{hasError:!0};throw t}componentDidCatch(t){t.message?.includes("InstantiationService has been disposed")&&this.setState(n=>({hasError:!1,mountKey:n.mountKey+1}))}render(){return this.state.hasError?f.jsx("div",{className:"flex items-center justify-center h-full w-full bg-white dark:bg-[#1e1e1e] text-gray-400",children:f.jsx(N,{size:"sm"})}):p.cloneElement(this.props.children,{mountKey:this.state.mountKey})}}let w=null;const W=async()=>{if(w)return w;const[e,t,n]=await Promise.all([O(()=>import("./standalone-BioU5qLH.js"),[]),O(()=>import("./typescript-Ca_eWjgL.js"),[]),O(()=>import("./estree-CRgMSIiv.js"),[])]);return w={format:e.format,plugins:[t.default,n.default]},w};I.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const J={parser:"typescript",semi:!0,singleQuote:!1,tabWidth:2,trailingComma:"es5",printWidth:80},M={fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,stickyScroll:{enabled:!1},wordWrap:"on",folding:!0,bracketPairColorization:{enabled:!0},suggestOnTriggerCharacters:!0,quickSuggestions:{other:!0,comments:!1,strings:!0},minimap:{enabled:!1},parameterHints:{enabled:!0},inlineSuggest:{enabled:!0},autoClosingBrackets:"always",autoClosingQuotes:"always",autoSurround:"languageDefined",padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},F=f.jsx("div",{className:"flex items-center justify-center h-full w-full text-gray-400",children:f.jsx(N,{size:"sm"})});function q({code:e,onChange:t,onSave:n,readOnly:s=!1,height:i=300,language:r="typescript",foldOnMount:l=!1,disableDiagnostics:c=!1,mountKey:o=0}){const x=p.useRef(null),m=p.useRef(null),E=p.useRef(n);E.current=n;const y=p.useRef(r);y.current=r;const _=p.useId(),b=`${_}-${o}`,j=r==="typescript"?`file:///workflow-${_.replace(/:/g,"-")}-${o}.tsx`:void 0,T=s?{...M,readOnly:!0}:M,V=async u=>{const a=u.getModel();if(!a){console.warn("No model found");return}const g=a.getValue();if(y.current==="json"){try{const d=JSON.parse(g),R=JSON.stringify(d,null,2);if(R!==g){const v=a.getFullModelRange();u.executeEdits("json-format",[{range:v,text:R}])}}catch(d){console.error("JSON formatting failed:",d)}return}try{const{format:d,plugins:R}=await W(),v=await d(g,{...J,plugins:R});if(v!==g){const k=a.getFullModelRange();u.executeEdits("prettier",[{range:k,text:v}])}}catch(d){console.error("Prettier formatting failed:",d)}},S=async(u,a)=>{x.current=u,l&&m.current&&(m.current.style.visibility="hidden",await u.getAction("editor.foldLevel2")?.run(),m.current.style.visibility="visible"),r==="typescript"&&(a.languages.typescript.typescriptDefaults.setCompilerOptions({target:a.languages.typescript.ScriptTarget.ESNext,module:a.languages.typescript.ModuleKind.ESNext,moduleResolution:a.languages.typescript.ModuleResolutionKind.NodeJs,allowNonTsExtensions:!0,allowJs:!0,strict:!1,noEmit:!0,esModuleInterop:!0,jsx:a.languages.typescript.JsxEmit.React,allowSyntheticDefaultImports:!0}),a.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:c,noSyntaxValidation:c})),u.addCommand(a.KeyMod.CtrlCmd|a.KeyCode.KeyS,async()=>{await V(u);const g=await K(u),P=u.getValue();E.current?.(P,g)})};return f.jsx("div",{ref:m,className:"h-full",children:f.jsx($,{height:i,language:r,theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:e,path:j,onChange:t,onMount:S,loading:F,options:T},b)})}function U(e){const t=L.c(2);let n;return t[0]!==e?(n=f.jsx(z,{children:f.jsx(q,{...e})}),t[0]=e,t[1]=n):n=t[1],n}export{U as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as it,r as E,j as e,i as rt}from"./index-BKl9EaBX.js";import{S as mt,b as pt,c as st,d as at}from"./sheet-CU9kLnB6.js";import{S as nt}from"./scroll-area-B04opuPz.js";import{r as lt,c as ct,u as dt,a as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-DF10hR6Z.js";import{v as xt}from"./index-DVGV6Z39.js";import"./X-EWTzHhAB.js";import"./agent-icon-Ccnm2Z0l.js";import"./AlertCircle-fvueL_xF.js";import"./Tool01-BFAevrF8.js";import"./SwitchHorizontal01-B6UmJSYs.js";import"./Settings02-CY97oanA.js";import"./XCircle-CMWDGWoe.js";import"./ArrowUpRight-B8e_kS_o.js";import"./ZapSquare-m8-tAjqY.js";import"./Users03-2JfQbsor.js";import"./CheckCircle-BuLolNoz.js";import"./ChevronUp-BQEvRgGj.js";import"./ChevronDown-BVhPkusr.js";import"./ChevronRight-DWJre8x6.js";import"./DotsVertical-CizsKw_f.js";import"./Stars02-6klFcI-2.js";import"./Eye-Bs5kJbQj.js";import"./ZoomOut-DuR5hATb.js";import"./Globe01-1Duj5nc9.js";import"./FilterLines-DkyirgNq.js";import"./Star01-BZduijjB.js";import"./Globe04-B_PFHoFA.js";import"./HardDrive-yFfC5xm0.js";import"./Key01-yELEs55d.js";import"./LayoutLeft-B8v8VnhF.js";import"./LinkExternal01-BeBfH4UH.js";import"./Monitor01-I5w2u5cl.js";import"./Sun-DUxMw-A7.js";import"./Palette-2k0LGtWY.js";import"./Play-DBtiZA8s.js";import"./Plus-PibSsVpf.js";import"./SearchLg-BRTezKss.js";import"./SearchMd-BTNnGyy3.js";import"./Shield01-BoUN_OZ6.js";import"./Stars01-Bu0HCLHG.js";import"./Trash01-D0QRAqOQ.js";import"./Upload01-EuHXdv3V.js";import"./User01-D9eWwQIs.js";import"./Users01-BUauqBZ_.js";import"./XClose-C70SByPL.js";import"./Zap-DmRAdzHA.js";import"./use-clock-tick-CkDkvL_z.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Bop0FG2T.js";import"./tooltip--S3w6lli.js";import"./file-type-icon-CE2B9xOu.js";import"./dialog-Bn-SsN7r.js";import"./use-mobile-DU6KNVMW.js";import"./tab-id-CLpu897Q.js";import"./content-blocks-o63cs2vh.js";import"./types-BBgTtKoT.js";import"./use-mcp-client-BCHJCFx3.js";import"./auth-C57-53QJ.js";import"./chat-context-B_GYpd-x.js";import"./hooks-DnMUYEJm.js";import"./decopilot-sse-pool-BffyZvt0.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-BJXS5t1N.js";import"./use-collections-BJeRHXQ8.js";import"./use-ai-providers-3hRiq9_3.js";import"./studio-tools-CSRFF36j.js";import"./use-decopilot-events-HaKMG4Bv.js";import"./use-organization-settings-b-TmfHXN.js";import"./shell-layout-DUO_iA4i.js";import"./avatar-BGR3mJWX.js";import"./alert-dialog-DKYTVxoF.js";import"./required-auth-layout-DItbqeb4.js";import"./use-org-sso-DZajVFLk.js";import"./integration-icon-De8oIkAM.js";import"./use-navigate-to-agent-S-0TjswQ.js";import"./use-connection-J4P7z5LH.js";import"./use-mcp-prompts-CJSX4NOe.js";import"./form-idiAJ3cQ.js";import"./label-M7D3mHbo.js";import"./input-BOAhqJfl.js";import"./select-Cwfs7iaB.js";import"./switch-B-7u58O2.js";import"./library-tab-BcGl3LL0.js";import"./drawer-Dl8ZduZ1.js";import"./collection-search-DNMU9xiK.js";import"./tabs-C4g2MzIZ.js";import"./toggle-group-C6LCxibS.js";import"./agent-capabilities-CkTBI47V.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-ONV47foE.js";import"./use-registry-connections-EOJMhrOu.js";import"./useInfiniteQuery-lZCTtdY-.js";import"./use-infinite-scroll-CA7I5BYA.js";import"./extract-connection-data-BjKYuwWP.js";import"./card-uar-Llj6.js";import"./collection-tabs-HTuG7m53.js";import"./badge-CNzuslYc.js";import"./textarea-0R2PUdzR.js";import"./connection-form-helpers-D0x_dljo.js";import"./authenticate-and-persist-oauth-BbxvPh9z.js";import"./mcp-oauth-Bqh2iXyU.js";import"./useSuspenseInfiniteQuery-B7_e3nrE.js";import"./connect-desktop-dialog-B1Uehm8B.js";import"./decopilot-CD0oVGNq.js";import"./checkbox-Cg59Apn_.js";import"./skeleton-C4BeMI87.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B6QUzH-0.js";import"./popover-CXVI9zcY.js";import"./command-CKwwwdwL.js";import"./index-CwF0iCh9.js";import"./index-BnRPTHOV.js";import"./toolbar-NzP3bIos.js";import"./use-debounced-value-CyR2-wj_.js";import"./dropdown-menu-6y2uMgMG.js";import"./index-CAJbosoK.js";import"./question-004-sINsf4GQ.js";import"./task-row-wmR0M6xG.js";import"./task-status-DrPYL0wv.js";import"./use-status-sounds-ChnvWprY.js";import"./empty-state-BTvy620M.js";import"./use-mcp-tools-B35odQSn.js";import"./use-capability-CwOpVM9e.js";import"./tools-list-Bh4EyiYf.js";import"./use-debounced-autosave-DUoyIh6J.js";import"./index-cUCo7bOt.js";import"./sidebar-BrFBmcgg.js";import"./search-input-Cm1y4rxU.js";import"./github-repo-picker-DW4v1O0K.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-CKNnHXc_.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-DP-ERd9P.js";import"./automation-runs-DuN_PRlY.js";import"./table-DuYXo-3u.js";import"./use-members-CXuC_SPQ.js";import"./use-org-auth-client-CjO_tYkz.js";import"./use-automations-Djl_cGl_.js";import"./use-file-configs-D0sQJaoO.js";import"./monaco-editor-Dt-aMMVv.js";import"./select-model-C_jz2BLZ.js";import"./automation-list-row-Cc5bWN7g.js";function ri(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 M=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 V=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 z=F,A=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,B=m.kind==="site"&&o&&n,H=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 $=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const q=O;let l;t[13]!==A?(l=e.jsx(mt,{className:"text-sm font-semibold",children:A}),t[13]=A,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]!==q||t[22]!==$||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==H||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==B||t[37]!==_?(S=!o||!T&&!B?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:H}):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:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:$,onBumpFormKey:q}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=q,t[22]=$,t[23]=M,t[24]=v,t[25]=h,t[26]=H,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=B,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]!==z||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:z,children:f}),t[42]=z,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{ri as SeoSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as $,G as H,j as A}from"./index-BKl9EaBX.js";import{l as L,g as E,s as y}from"./scroll-area-B04opuPz.js";import{p as O,u as k}from"./use-mcp-client-BCHJCFx3.js";import{b as q,c as B}from"./use-mcp-tools-B35odQSn.js";import{u as G}from"./index-DVGV6Z39.js";import{c as Y}from"./content-blocks-o63cs2vh.js";import{g as K,M as V,a as w}from"./types-BBgTtKoT.js";import{u as z,b as F}from"./chat-context-B_GYpd-x.js";import{b as J}from"./shell-layout-DUO_iA4i.js";import"./agent-icon-Ccnm2Z0l.js";import"./AlertCircle-fvueL_xF.js";import"./Tool01-BFAevrF8.js";import"./SwitchHorizontal01-B6UmJSYs.js";import"./Settings02-CY97oanA.js";import"./XCircle-CMWDGWoe.js";import"./ArrowUpRight-B8e_kS_o.js";import"./ZapSquare-m8-tAjqY.js";import"./Users03-2JfQbsor.js";import"./CheckCircle-BuLolNoz.js";import"./ChevronUp-BQEvRgGj.js";import"./ChevronDown-BVhPkusr.js";import"./ChevronRight-DWJre8x6.js";import"./DotsVertical-CizsKw_f.js";import"./Stars02-6klFcI-2.js";import"./Eye-Bs5kJbQj.js";import"./ZoomOut-DuR5hATb.js";import"./Globe01-1Duj5nc9.js";import"./FilterLines-DkyirgNq.js";import"./Star01-BZduijjB.js";import"./Globe04-B_PFHoFA.js";import"./HardDrive-yFfC5xm0.js";import"./Key01-yELEs55d.js";import"./LayoutLeft-B8v8VnhF.js";import"./LinkExternal01-BeBfH4UH.js";import"./Monitor01-I5w2u5cl.js";import"./Sun-DUxMw-A7.js";import"./Palette-2k0LGtWY.js";import"./Play-DBtiZA8s.js";import"./Plus-PibSsVpf.js";import"./SearchLg-BRTezKss.js";import"./SearchMd-BTNnGyy3.js";import"./Shield01-BoUN_OZ6.js";import"./Stars01-Bu0HCLHG.js";import"./Trash01-D0QRAqOQ.js";import"./Upload01-EuHXdv3V.js";import"./User01-D9eWwQIs.js";import"./Users01-BUauqBZ_.js";import"./XClose-C70SByPL.js";import"./X-EWTzHhAB.js";import"./Zap-DmRAdzHA.js";import"./use-clock-tick-CkDkvL_z.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Bop0FG2T.js";import"./tooltip--S3w6lli.js";import"./file-type-icon-CE2B9xOu.js";import"./dialog-Bn-SsN7r.js";import"./use-mobile-DU6KNVMW.js";import"./tab-id-CLpu897Q.js";import"./hooks-DnMUYEJm.js";import"./decopilot-sse-pool-BffyZvt0.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./studio-tools-CSRFF36j.js";import"./sheet-CU9kLnB6.js";import"./integration-icon-De8oIkAM.js";import"./use-virtual-mcp-BJXS5t1N.js";import"./use-collections-BJeRHXQ8.js";import"./use-navigate-to-agent-S-0TjswQ.js";import"./use-connection-J4P7z5LH.js";import"./use-mcp-prompts-CJSX4NOe.js";import"./form-idiAJ3cQ.js";import"./label-M7D3mHbo.js";import"./input-BOAhqJfl.js";import"./select-Cwfs7iaB.js";import"./auth-C57-53QJ.js";import"./library-tab-BcGl3LL0.js";import"./drawer-Dl8ZduZ1.js";import"./collection-search-DNMU9xiK.js";import"./tabs-C4g2MzIZ.js";import"./toggle-group-C6LCxibS.js";import"./agent-capabilities-CkTBI47V.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-ONV47foE.js";import"./use-registry-connections-EOJMhrOu.js";import"./use-organization-settings-b-TmfHXN.js";import"./useInfiniteQuery-lZCTtdY-.js";import"./use-infinite-scroll-CA7I5BYA.js";import"./extract-connection-data-BjKYuwWP.js";import"./card-uar-Llj6.js";import"./collection-tabs-HTuG7m53.js";import"./badge-CNzuslYc.js";import"./textarea-0R2PUdzR.js";import"./connection-form-helpers-D0x_dljo.js";import"./authenticate-and-persist-oauth-BbxvPh9z.js";import"./mcp-oauth-Bqh2iXyU.js";import"./useSuspenseInfiniteQuery-B7_e3nrE.js";import"./use-ai-providers-3hRiq9_3.js";import"./connect-desktop-dialog-B1Uehm8B.js";import"./decopilot-CD0oVGNq.js";import"./checkbox-Cg59Apn_.js";import"./skeleton-C4BeMI87.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-BGR3mJWX.js";import"./settings-section-B6QUzH-0.js";import"./popover-CXVI9zcY.js";import"./command-CKwwwdwL.js";import"./index-CwF0iCh9.js";import"./index-BnRPTHOV.js";import"./alert-dialog-DKYTVxoF.js";import"./toolbar-NzP3bIos.js";import"./use-debounced-value-CyR2-wj_.js";import"./dropdown-menu-6y2uMgMG.js";import"./index-CAJbosoK.js";import"./question-004-sINsf4GQ.js";import"./task-row-wmR0M6xG.js";import"./task-status-DrPYL0wv.js";import"./use-status-sounds-ChnvWprY.js";import"./use-decopilot-events-HaKMG4Bv.js";import"./empty-state-BTvy620M.js";import"./use-capability-CwOpVM9e.js";import"./tools-list-Bh4EyiYf.js";import"./switch-B-7u58O2.js";import"./use-debounced-autosave-DUoyIh6J.js";import"./index-cUCo7bOt.js";import"./sidebar-BrFBmcgg.js";import"./search-input-Cm1y4rxU.js";import"./github-repo-picker-DW4v1O0K.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-CKNnHXc_.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-DP-ERd9P.js";import"./automation-runs-DuN_PRlY.js";import"./table-DuYXo-3u.js";import"./use-members-CXuC_SPQ.js";import"./use-org-auth-client-CjO_tYkz.js";import"./use-automations-Djl_cGl_.js";import"./use-file-configs-D0sQJaoO.js";import"./monaco-editor-Dt-aMMVv.js";import"./select-model-C_jz2BLZ.js";import"./automation-list-row-Cc5bWN7g.js";import"./required-auth-layout-DItbqeb4.js";import"./use-org-sso-DZajVFLk.js";const Q={};function W(S){const t=$.c(37),{client:r,resourceURI:h,tool:o,connectionId:p,orgId:l,args:M}=S,{sendMessage:I}=z(),{setAppContext:u,clearAppContext:n}=F(),{setChatOpen:f,openTab:g}=J(),e=`${p}:${o.name}`;let a;t[0]!==g?(a=C=>C==="inline"?(g("0"),"inline"):"fullscreen",t[0]=g,t[1]=a):a=t[1];const m=a,s=M??Q;let c;t[2]!==r||t[3]!==o.name||t[4]!==s?(c={client:r,toolName:o.name,toolArguments:s},t[2]=r,t[3]=o.name,t[4]=s,t[5]=c):c=t[5];const{data:i}=B(c);let x;if(t[6]!==o._meta||t[7]!==o.name){const C=E(o._meta);x=y(o.name,C),t[6]=o._meta,t[7]=o.name,t[8]=x}else x=t[8];const U=x;let d;t[9]!==o.inputSchema?(d=o.inputSchema??{type:"object"},t[9]=o.inputSchema,t[10]=d):d=t[10];let N;t[11]!==U||t[12]!==d||t[13]!==o?(N={...o,name:U,inputSchema:d},t[11]=U,t[12]=d,t[13]=o,t[14]=N):N=t[14];const b=N;let _;t[15]!==I||t[16]!==f?(_=C=>{const D=Y(C.content);D.content.length>0&&(f(!0),I({tiptapDoc:D}))},t[15]=I,t[16]=f,t[17]=_):_=t[17];const j=_;let P;t[18]!==b?(P={tool:b},t[18]=b,t[19]=P):P=t[19];let T;t[20]!==u||t[21]!==e?(T=C=>u(e,C),t[20]=u,t[21]=e,t[22]=T):T=t[22];let R;t[23]!==n||t[24]!==e?(R=()=>n(e),t[23]=n,t[24]=e,t[25]=R):R=t[25];let v;return t[26]!==r||t[27]!==j||t[28]!==m||t[29]!==l||t[30]!==h||t[31]!==P||t[32]!==T||t[33]!==R||t[34]!==s||t[35]!==i?(v=A.jsx(V,{resourceURI:h,orgId:l,toolInfo:P,toolInput:s,toolResult:i,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:r,onMessage:j,onUpdateModelContext:T,onTeardown:R,onRequestDisplayMode:m,className:"h-full"}),t[26]=r,t[27]=j,t[28]=m,t[29]=l,t[30]=h,t[31]=P,t[32]=T,t[33]=R,t[34]=s,t[35]=i,t[36]=v):v=t[36],v}function De(S){const t=$.c(24),{connectionId:r,toolName:h,args:o}=S,{org:p}=H(),l=G();let M;t[0]!==r||t[1]!==l?(M=O(r)&&l.vmEntry?.sandboxProviderKind==="user-desktop"&&l.previewUrl?`${l.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=r,t[1]=l,t[2]=M):M=t[2];const I=M;let u;t[3]!==r||t[4]!==I||t[5]!==p.id||t[6]!==p.slug?(u={connectionId:r,orgId:p.id,orgSlug:p.slug,mcpUrl:I},t[3]=r,t[4]=I,t[5]=p.id,t[6]=p.slug,t[7]=u):u=t[7];const n=k(u);let f;t[8]!==n?(f={client:n},t[8]=n,t[9]=f):f=t[9];const{data:g}=q(f);let e,a,m;t[10]!==h||t[11]!==g.tools?(e=L(decodeURIComponent(h)),m=g.tools.find(i=>i.name===e)??g.tools.find(i=>{const x=E(i._meta);if(!x)return!1;if(y(i.name,x)===e)return!0;const d=y(e,x);return d!==e&&i.name===d}),a=m?._meta?K(m._meta):void 0,t[10]=h,t[11]=g.tools,t[12]=e,t[13]=a,t[14]=m):(e=t[12],a=t[13],m=t[14]);const s=a;if(!m||!s){let i;return t[15]!==e?(i=A.jsx("div",{className:"flex items-center justify-center h-full w-full",children:A.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',e,'" not found or has no UI']})}),t[15]=e,t[16]=i):i=t[16],i}let c;return t[17]!==o||t[18]!==n||t[19]!==r||t[20]!==p.id||t[21]!==s||t[22]!==m?(c=A.jsx(W,{client:n,resourceURI:s,tool:m,connectionId:r,orgId:p.id,args:o}),t[17]=o,t[18]=n,t[19]=r,t[20]=p.id,t[21]=s,t[22]=m,t[23]=c):c=t[23],c}export{De as AppViewContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as S,j as r}from"./index-BKl9EaBX.js";import{I as T}from"./input-BOAhqJfl.js";import{L as C}from"./label-M7D3mHbo.js";import{T as L}from"./textarea-0R2PUdzR.js";import{au as A,av as R,at as D,aw as J,ax as K}from"./index-DVGV6Z39.js";import{u as M,s as P}from"./primitives-CXKpY77J.js";import"./library-tab-BcGl3LL0.js";import"./SwitchHorizontal01-B6UmJSYs.js";import"./chat-context-B_GYpd-x.js";import"./hooks-DnMUYEJm.js";import"./use-mcp-client-BCHJCFx3.js";import"./auth-C57-53QJ.js";import"./decopilot-sse-pool-BffyZvt0.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-BJXS5t1N.js";import"./use-collections-BJeRHXQ8.js";import"./use-ai-providers-3hRiq9_3.js";import"./studio-tools-CSRFF36j.js";import"./use-decopilot-events-HaKMG4Bv.js";import"./tab-id-CLpu897Q.js";import"./use-organization-settings-b-TmfHXN.js";import"./scroll-area-B04opuPz.js";import"./agent-icon-Ccnm2Z0l.js";import"./AlertCircle-fvueL_xF.js";import"./Tool01-BFAevrF8.js";import"./Settings02-CY97oanA.js";import"./XCircle-CMWDGWoe.js";import"./ArrowUpRight-B8e_kS_o.js";import"./ZapSquare-m8-tAjqY.js";import"./Users03-2JfQbsor.js";import"./CheckCircle-BuLolNoz.js";import"./ChevronUp-BQEvRgGj.js";import"./ChevronDown-BVhPkusr.js";import"./ChevronRight-DWJre8x6.js";import"./DotsVertical-CizsKw_f.js";import"./Stars02-6klFcI-2.js";import"./Eye-Bs5kJbQj.js";import"./ZoomOut-DuR5hATb.js";import"./Globe01-1Duj5nc9.js";import"./FilterLines-DkyirgNq.js";import"./Star01-BZduijjB.js";import"./Globe04-B_PFHoFA.js";import"./HardDrive-yFfC5xm0.js";import"./Key01-yELEs55d.js";import"./LayoutLeft-B8v8VnhF.js";import"./LinkExternal01-BeBfH4UH.js";import"./Monitor01-I5w2u5cl.js";import"./Sun-DUxMw-A7.js";import"./Palette-2k0LGtWY.js";import"./Play-DBtiZA8s.js";import"./Plus-PibSsVpf.js";import"./SearchLg-BRTezKss.js";import"./SearchMd-BTNnGyy3.js";import"./Shield01-BoUN_OZ6.js";import"./Stars01-Bu0HCLHG.js";import"./Trash01-D0QRAqOQ.js";import"./Upload01-EuHXdv3V.js";import"./User01-D9eWwQIs.js";import"./Users01-BUauqBZ_.js";import"./XClose-C70SByPL.js";import"./X-EWTzHhAB.js";import"./Zap-DmRAdzHA.js";import"./use-clock-tick-CkDkvL_z.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Bop0FG2T.js";import"./tooltip--S3w6lli.js";import"./file-type-icon-CE2B9xOu.js";import"./dialog-Bn-SsN7r.js";import"./use-mobile-DU6KNVMW.js";import"./content-blocks-o63cs2vh.js";import"./types-BBgTtKoT.js";import"./shell-layout-DUO_iA4i.js";import"./avatar-BGR3mJWX.js";import"./alert-dialog-DKYTVxoF.js";import"./required-auth-layout-DItbqeb4.js";import"./use-org-sso-DZajVFLk.js";import"./sheet-CU9kLnB6.js";import"./integration-icon-De8oIkAM.js";import"./use-navigate-to-agent-S-0TjswQ.js";import"./use-connection-J4P7z5LH.js";import"./use-mcp-prompts-CJSX4NOe.js";import"./form-idiAJ3cQ.js";import"./select-Cwfs7iaB.js";import"./drawer-Dl8ZduZ1.js";import"./collection-search-DNMU9xiK.js";import"./tabs-C4g2MzIZ.js";import"./toggle-group-C6LCxibS.js";import"./agent-capabilities-CkTBI47V.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-ONV47foE.js";import"./use-registry-connections-EOJMhrOu.js";import"./useInfiniteQuery-lZCTtdY-.js";import"./use-infinite-scroll-CA7I5BYA.js";import"./extract-connection-data-BjKYuwWP.js";import"./card-uar-Llj6.js";import"./collection-tabs-HTuG7m53.js";import"./badge-CNzuslYc.js";import"./connection-form-helpers-D0x_dljo.js";import"./authenticate-and-persist-oauth-BbxvPh9z.js";import"./mcp-oauth-Bqh2iXyU.js";import"./useSuspenseInfiniteQuery-B7_e3nrE.js";import"./connect-desktop-dialog-B1Uehm8B.js";import"./decopilot-CD0oVGNq.js";import"./checkbox-Cg59Apn_.js";import"./skeleton-C4BeMI87.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-B6QUzH-0.js";import"./popover-CXVI9zcY.js";import"./command-CKwwwdwL.js";import"./index-CwF0iCh9.js";import"./index-BnRPTHOV.js";import"./toolbar-NzP3bIos.js";import"./use-debounced-value-CyR2-wj_.js";import"./dropdown-menu-6y2uMgMG.js";import"./index-CAJbosoK.js";import"./question-004-sINsf4GQ.js";import"./task-row-wmR0M6xG.js";import"./task-status-DrPYL0wv.js";import"./use-status-sounds-ChnvWprY.js";import"./empty-state-BTvy620M.js";import"./use-mcp-tools-B35odQSn.js";import"./use-capability-CwOpVM9e.js";import"./tools-list-Bh4EyiYf.js";import"./switch-B-7u58O2.js";import"./use-debounced-autosave-DUoyIh6J.js";import"./index-cUCo7bOt.js";import"./sidebar-BrFBmcgg.js";import"./search-input-Cm1y4rxU.js";import"./github-repo-picker-DW4v1O0K.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-CKNnHXc_.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./toolbar-icon-button-DP-ERd9P.js";import"./automation-runs-DuN_PRlY.js";import"./table-DuYXo-3u.js";import"./use-members-CXuC_SPQ.js";import"./use-org-auth-client-CjO_tYkz.js";import"./use-automations-Djl_cGl_.js";import"./use-file-configs-D0sQJaoO.js";import"./monaco-editor-Dt-aMMVv.js";import"./select-model-C_jz2BLZ.js";import"./automation-list-row-Cc5bWN7g.js";const $={authors:[{key:"name",label:"Name",widget:"text"},{key:"email",label:"Email",widget:"text",placeholder:"author@example.com"},{key:"jobTitle",label:"Job title",widget:"text"},{key:"company",label:"Company",widget:"text"},{key:"avatar",label:"Avatar",widget:"image"}]},q={authors:"Author"};function Er(B){const t=S.c(34),{orgSlug:v,virtualMcpId:j,branch:w,kind:p,blockKey:g,block:f}=B;let y;t[0]!==w||t[1]!==v||t[2]!==j?(y={orgSlug:v,virtualMcpId:j,branch:w},t[0]=w,t[1]=v,t[2]=j,t[3]=y):y=t[3];const m=A(y);let d;t[4]!==f||t[5]!==p?(d=R(f,p),t[4]=f,t[5]=p,t[6]=d):d=t[6];const F=d;let h;t[7]!==g||t[8]!==p||t[9]!==m?(h=e=>{m.mutate({blockKey:g,data:J(g,p,e)})},t[7]=g,t[8]=p,t[9]=m,t[10]=h):h=t[10];const[i,E]=M(F,h);let k;t[11]!==i||t[12]!==E?(k=(e,o)=>E({...i,[e]:o}),t[11]=i,t[12]=E,t[13]=k):k=t[13];const a=k,N=q[p];let s;t[14]!==N?(s=r.jsx("span",{className:"text-sm font-medium",children:N}),t[14]=N,t[15]=s):s=t[15];let l;t[16]!==m.isError||t[17]!==m.isPending?(l=r.jsx(D,{isPending:m.isPending,isError:m.isError}),t[16]=m.isError,t[17]=m.isPending,t[18]=l):l=t[18];let n;t[19]!==s||t[20]!==l?(n=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[s,l]}),t[19]=s,t[20]=l,t[21]=n):n=t[21];const I=$[p];let c;if(t[22]!==i||t[23]!==a||t[24]!==I){let e;t[26]!==i||t[27]!==a?(e=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(K,{schema:{type:"string",format:"image-uri",title:o.label},value:i[o.key],onChange:u=>a(o.key,u),path:o.key,label:o.label}):r.jsxs(r.Fragment,{children:[r.jsx(C,{htmlFor:o.key,children:o.label}),o.widget==="textarea"?r.jsx(L,{id:o.key,value:P(i[o.key]),onChange:u=>a(o.key,u.target.value),rows:3}):r.jsx(T,{id:o.key,value:P(i[o.key]),placeholder:o.placeholder,onChange:u=>a(o.key,u.target.value),className:"h-10"})]})},o.key),t[26]=i,t[27]=a,t[28]=e):e=t[28],c=I.map(e),t[22]=i,t[23]=a,t[24]=I,t[25]=c}else c=t[25];let x;t[29]!==c?(x=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:c})}),t[29]=c,t[30]=x):x=t[30];let b;return t[31]!==x||t[32]!==n?(b=r.jsxs("div",{className:"flex h-full flex-col",children:[n,x]}),t[31]=x,t[32]=n,t[33]=b):b=t[33],b}export{Er as RecordEditor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-CjFD6LVz.js","assets/index-BKl9EaBX.js","assets/index-B1I1Oi0g.css","assets/XCircle-CMWDGWoe.js","assets/CheckCircle-BuLolNoz.js","assets/Settings02-CY97oanA.js","assets/use-mcp-client-BCHJCFx3.js","assets/auth-C57-53QJ.js","assets/useInfiniteQuery-lZCTtdY-.js","assets/use-infinite-scroll-CA7I5BYA.js","assets/studio-tools-CSRFF36j.js","assets/badge-CNzuslYc.js","assets/input-BOAhqJfl.js","assets/dropdown-menu-6y2uMgMG.js","assets/ChevronUp-BQEvRgGj.js","assets/ChevronRight-DWJre8x6.js","assets/DotsVertical-CizsKw_f.js","assets/table-DuYXo-3u.js","assets/toggle-group-C6LCxibS.js","assets/use-view-mode-ieA6nZlk.js","assets/use-mobile-DU6KNVMW.js","assets/FilterLines-DkyirgNq.js","assets/Globe01-1Duj5nc9.js","assets/SearchMd-BTNnGyy3.js","assets/dialog-Bn-SsN7r.js","assets/X-EWTzHhAB.js","assets/AlertCircle-fvueL_xF.js","assets/Upload01-EuHXdv3V.js","assets/alert-dialog-DKYTVxoF.js","assets/card-uar-Llj6.js","assets/Trash01-D0QRAqOQ.js","assets/label-M7D3mHbo.js","assets/select-Cwfs7iaB.js","assets/tooltip--S3w6lli.js","assets/ChevronDown-BVhPkusr.js","assets/switch-B-7u58O2.js","assets/textarea-0R2PUdzR.js","assets/checkbox-Cg59Apn_.js","assets/Eye-Bs5kJbQj.js","assets/LinkExternal01-BeBfH4UH.js","assets/use-copy-Bop0FG2T.js","assets/Key01-yELEs55d.js","assets/Plus-PibSsVpf.js","assets/mcp-oauth-Bqh2iXyU.js","assets/Play-DBtiZA8s.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as s,j as e,r as i,i as a,ad as o}from"./index-BKl9EaBX.js";import{R as m}from"./require-capability-BfQmAGBA.js";import"./use-capability-CwOpVM9e.js";import"./access-gate-ChyViNer.js";import"./capability-load-error-BaU1mfmp.js";const n=i.lazy(()=>o(()=>import("./registry-layout-CjFD6LVz.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])));function f(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-CjFD6LVz.js","assets/index-BKl9EaBX.js","assets/index-B1I1Oi0g.css","assets/XCircle-CMWDGWoe.js","assets/CheckCircle-BuLolNoz.js","assets/Settings02-CY97oanA.js","assets/use-mcp-client-BCHJCFx3.js","assets/auth-C57-53QJ.js","assets/useInfiniteQuery-lZCTtdY-.js","assets/use-infinite-scroll-CA7I5BYA.js","assets/studio-tools-CSRFF36j.js","assets/badge-CNzuslYc.js","assets/input-BOAhqJfl.js","assets/dropdown-menu-6y2uMgMG.js","assets/ChevronUp-BQEvRgGj.js","assets/ChevronRight-DWJre8x6.js","assets/DotsVertical-CizsKw_f.js","assets/table-DuYXo-3u.js","assets/toggle-group-C6LCxibS.js","assets/use-view-mode-ieA6nZlk.js","assets/use-mobile-DU6KNVMW.js","assets/FilterLines-DkyirgNq.js","assets/Globe01-1Duj5nc9.js","assets/SearchMd-BTNnGyy3.js","assets/dialog-Bn-SsN7r.js","assets/X-EWTzHhAB.js","assets/AlertCircle-fvueL_xF.js","assets/Upload01-EuHXdv3V.js","assets/alert-dialog-DKYTVxoF.js","assets/card-uar-Llj6.js","assets/Trash01-D0QRAqOQ.js","assets/label-M7D3mHbo.js","assets/select-Cwfs7iaB.js","assets/tooltip--S3w6lli.js","assets/ChevronDown-BVhPkusr.js","assets/switch-B-7u58O2.js","assets/textarea-0R2PUdzR.js","assets/checkbox-Cg59Apn_.js","assets/Eye-Bs5kJbQj.js","assets/LinkExternal01-BeBfH4UH.js","assets/use-copy-Bop0FG2T.js","assets/Key01-yELEs55d.js","assets/Plus-PibSsVpf.js","assets/mcp-oauth-Bqh2iXyU.js","assets/Play-DBtiZA8s.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as m,b as n,e as c,j as t,i as p,r as l,ad as f}from"./index-BKl9EaBX.js";import{R as u}from"./require-capability-BfQmAGBA.js";import"./use-capability-CwOpVM9e.js";import"./access-gate-ChyViNer.js";import"./capability-load-error-BaU1mfmp.js";const g=l.lazy(()=>f(()=>import("./registry-layout-CjFD6LVz.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(p,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as g}from"./index-BKl9EaBX.js";import{b as f}from"./use-virtual-mcp-BJXS5t1N.js";import{c as p}from"./use-navigate-to-agent-S-0TjswQ.js";function A(i){const e=g.c(9);let n;e[0]!==i?(n=i===void 0?{}:i,e[0]=i,e[1]=n):n=e[1];const d=n,{navigateOnCreate:u}=d,c=u===void 0?!1:u,t=f(),r=p();let s;e[2]!==t.create||e[3]!==c||e[4]!==r?(s=async()=>{const l=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!1});return c&&r(l.id,{search:{main:"instructions"}}),{id:l.id,virtualMcp:l}},e[2]=t.create,e[3]=c,e[4]=r,e[5]=s):s=e[5];const o=s;let a;return e[6]!==t.create.isPending||e[7]!==o?(a={createVirtualMCP:o,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=o,e[8]=a):a=e[8],a}export{A as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./use-infinite-scroll-CA7I5BYA.js";import{cD as i}from"./index-BKl9EaBX.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./use-infinite-scroll-CA7I5BYA.js";import{cD as u,av as n}from"./index-BKl9EaBX.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
|