decocms 4.491.3 → 4.493.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/{ActiveShapeUtils-CO9ka_yi.js → ActiveShapeUtils-5xWWHSL1.js} +1 -1
- package/dist/client/assets/{AlertCircle-C3fpFT5I.js → AlertCircle-B5gBB9h_.js} +1 -1
- package/dist/client/assets/{AreaChart-BvjH9pmK.js → AreaChart-BTyzss2a.js} +1 -1
- package/dist/client/assets/{ArrowLeft-C1IFj0Ic.js → ArrowLeft-B7455tPl.js} +1 -1
- package/dist/client/assets/{ArrowUp-DR-Jhbl1.js → ArrowUp-CP6XCJnB.js} +1 -1
- package/dist/client/assets/{BarChart-CJ_IiQ71.js → BarChart-Ch51NWPz.js} +1 -1
- package/dist/client/assets/{Building02-uHT4KVtK.js → Building02-BZItaEYx.js} +1 -1
- package/dist/client/assets/{CategoricalChart-zte0bRec.js → CategoricalChart-DqN5Jy74.js} +1 -1
- package/dist/client/assets/{CheckCircle-BKHstO_Q.js → CheckCircle-C3CiaCW4.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DAO6R1Op.js → ChevronSelectorVertical-DIPs2sw-.js} +1 -1
- package/dist/client/assets/{ChevronUp-CceLPRrE.js → ChevronUp-nynZHATg.js} +1 -1
- package/dist/client/assets/{Copy01-Dx3ZT0bA.js → Copy01-CdRMK9o7.js} +1 -1
- package/dist/client/assets/{CreditCard01-Dko0T335.js → CreditCard01-DVQTLvKO.js} +1 -1
- package/dist/client/assets/{DotsVertical-aHYBPlin.js → DotsVertical-3XBYz4yU.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-B8QqSSmC.js → ErrorBarContext-Csmpy3UX.js} +1 -1
- package/dist/client/assets/{Globe04-BDe-0jS0.js → Globe04-DoxNod_i.js} +1 -1
- package/dist/client/assets/{Image01-Cxa392ef.js → Image01-DdBetDCI.js} +1 -1
- package/dist/client/assets/{Key01-BHiUNW_5.js → Key01-DcSonP-G.js} +1 -1
- package/dist/client/assets/{Link01-BRZRc4wX.js → Link01-3BacRGrf.js} +1 -1
- package/dist/client/assets/{LinkBroken01-kK_na_OL.js → LinkBroken01-BZFZ6N-h.js} +1 -1
- package/dist/client/assets/{Monitor01-Cl4JLYVa.js → Monitor01-DU19-CHk.js} +1 -1
- package/dist/client/assets/{Play-CzTcIQz_.js → Play-B7i_-ibU.js} +1 -1
- package/dist/client/assets/{Plus-nldAzVeQ.js → Plus-XYNDZJ4s.js} +1 -1
- package/dist/client/assets/{SearchMd-BiZNveM1.js → SearchMd-BFitEH5z.js} +1 -1
- package/dist/client/assets/{Sector-DOgIwKt7.js → Sector-CYOl8Efm.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-o0DdjJD9.js → ShoppingBag01-Ci8H67G0.js} +1 -1
- package/dist/client/assets/{Sun-BYGxydmh.js → Sun-D1Mdg8Cq.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Bx3d-jDI.js → SwitchHorizontal01-BHr8jCjb.js} +1 -1
- package/dist/client/assets/{Tool01-Blw6F5iV.js → Tool01-DQnW-zjg.js} +1 -1
- package/dist/client/assets/{Trash01-DAoFHSpp.js → Trash01-DZ8laRwu.js} +1 -1
- package/dist/client/assets/{Upload01-CtKBhqsv.js → Upload01-CrRTpeMX.js} +1 -1
- package/dist/client/assets/{User01-Awky2MVQ.js → User01-9bZ-cKa7.js} +1 -1
- package/dist/client/assets/{UserSquare-BMOlWqCu.js → UserSquare-CuRnLJZ6.js} +1 -1
- package/dist/client/assets/{Users01-D7ZFKC4W.js → Users01-cUGZjxDe.js} +1 -1
- package/dist/client/assets/{XAxis-BLZT-vtl.js → XAxis-DDG3qYHW.js} +1 -1
- package/dist/client/assets/{XClose-DBJ7sD1T.js → XClose-DjFCAP5F.js} +1 -1
- package/dist/client/assets/{ZoomOut-CQckFmS9.js → ZoomOut-BggitXDv.js} +1 -1
- package/dist/client/assets/{access-gate-DEyXiK2N.js → access-gate-Cu8JZecz.js} +1 -1
- package/dist/client/assets/add-connection-dialog-DBnkMFp9.js +1 -0
- package/dist/client/assets/agent-analytics-B1wni80p.js +2 -0
- package/dist/client/assets/agent-app-DY95_zYY.js +1 -0
- package/dist/client/assets/agent-assets-B18leh3z.js +1 -0
- package/dist/client/assets/agent-automation-CWXHzvtY.js +20 -0
- package/dist/client/assets/agent-automations-C0tbQ1R9.js +1 -0
- package/dist/client/assets/agent-connect-sources-CKiU44XZ.js +1 -0
- package/dist/client/assets/agent-deck-C8T7Jj3o.js +1 -0
- package/dist/client/assets/agent-e2e-LdVq-drf.js +1 -0
- package/dist/client/assets/agent-experiments-ClDYYnWj.js +1 -0
- package/dist/client/assets/agent-file-CjZFekiU.js +1 -0
- package/dist/client/assets/agent-hosting-zrg11_-A.js +1 -0
- package/dist/client/assets/agent-icon-BewGjsar.js +1 -0
- package/dist/client/assets/agent-library-BAUPDsyD.js +1 -0
- package/dist/client/assets/agent-library-file-CHlnBg90.js +1 -0
- package/dist/client/assets/agent-monitor-CKpvG_Lm.js +1 -0
- package/dist/client/assets/agent-overview-Di3y0uXp.js +1 -0
- package/dist/client/assets/agent-settings-C-kNuurj.js +1 -0
- package/dist/client/assets/{agent-site-editor-Dv8qh0xB.js → agent-site-editor-16duoEZY.js} +5 -5
- package/dist/client/assets/agent-site-editor-code-BUJylH9_.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-EotWUMUT.js → agent-site-editor-content-B64VGP55.js} +6 -6
- package/dist/client/assets/agent-site-editor-preview-DIihiuj0.js +518 -0
- package/dist/client/assets/agent-view-SjLiGW-o.js +1 -0
- package/dist/client/assets/{agent-view-guard-Bf5Bn5K4.js → agent-view-guard-CoiTTfLB.js} +1 -1
- package/dist/client/assets/agents-list-CFQQdh1t.js +1 -0
- package/dist/client/assets/{ai-providers-VCM02Z-N.js → ai-providers-CTzk8MgQ.js} +2 -2
- package/dist/client/assets/{alert-CGA3Ty0D.js → alert-Dyx5I-Y3.js} +1 -1
- package/dist/client/assets/{alert-dialog-kjq4dW3k.js → alert-dialog-BXEG2ySJ.js} +2 -2
- package/dist/client/assets/{analytics-sections-Cjkr8Muu.js → analytics-sections-BeEYJnmv.js} +1 -1
- package/dist/client/assets/api-keys-CH5G5_Qp.js +1 -0
- package/dist/client/assets/api-keys-JMxYvHms.js +1 -0
- package/dist/client/assets/app-editor-DqEmpUhy.js +1 -0
- package/dist/client/assets/asset-utils-Euq8y8zU.js +1 -0
- package/dist/client/assets/{auth-Cps-90jQ.js → auth-Dwu4WH32.js} +1 -1
- package/dist/client/assets/{auth-catchall-Batt4Wp1.js → auth-catchall-D9Xe8fii.js} +1 -1
- package/dist/client/assets/auth-entry-CCIy-Mhs.js +1 -0
- package/dist/client/assets/{auth-split-layout-lt03dL19.js → auth-split-layout-DXUbMgnq.js} +1 -1
- package/dist/client/assets/authenticate-and-persist-oauth-BEdNWkUl.js +1 -0
- package/dist/client/assets/{automation-list-row-C9YrfX3o.js → automation-list-row-Du4blVfm.js} +1 -1
- package/dist/client/assets/automation-runs-BsFnE3d4.js +1 -0
- package/dist/client/assets/automations-Cpff9O08.js +1 -0
- package/dist/client/assets/autosend-BaKgBZDQ.js +1 -0
- package/dist/client/assets/{avatar-TL9HUab0.js → avatar-BEl6nltF.js} +1 -1
- package/dist/client/assets/{badge-CKM84j2S.js → badge-DFdotQFQ.js} +1 -1
- package/dist/client/assets/{block-document-w2kAyl6z.js → block-document-BlUE8Eks.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-PwUYRK7b.js → blocks-preview-workspace-context-DSOKao_H.js} +1 -1
- package/dist/client/assets/{blog-schema-Cx6xDQRb.js → blog-schema-B_yGbArL.js} +1 -1
- package/dist/client/assets/{board-analytics-DT3f2AVB.js → board-analytics-UmA2i-Sq.js} +1 -1
- package/dist/client/assets/buckets-CJ11qX_5.js +1 -0
- package/dist/client/assets/{build-improve-prompt-doc-R0amEUpn.js → build-improve-prompt-doc-QS7b7hRr.js} +1 -1
- package/dist/client/assets/{calendar-DaaBbvOH.js → calendar-CT7cVD7N.js} +1 -1
- package/dist/client/assets/capability-load-error-yZzl8b80.js +1 -0
- package/dist/client/assets/category-editor-CTdWf8oW.js +1 -0
- package/dist/client/assets/{chart-DZbYggl3.js → chart-C-785ZEj.js} +1 -1
- package/dist/client/assets/chat-context-DJGYyGlB.js +39 -0
- package/dist/client/assets/chat-draft-DbBgaLY_.js +1 -0
- package/dist/client/assets/{checkbox-B2kVXKBD.js → checkbox-DmaIcPoL.js} +1 -1
- package/dist/client/assets/choose-editor-CirVpDXw.js +1 -0
- package/dist/client/assets/claim-phase-copy-BnoHLlrM.js +1 -0
- package/dist/client/assets/{cli-auth-success-DtMJnqjK.js → cli-auth-success-XcMuETZQ.js} +1 -1
- package/dist/client/assets/{client-icons-D3ZaOjXM.js → client-icons-DLhjrwzL.js} +1 -1
- package/dist/client/assets/{collapsible-vN3Y9B-p.js → collapsible-CgZ4-XuF.js} +1 -1
- package/dist/client/assets/collection-detail-gYU6aRKx.js +1 -0
- package/dist/client/assets/collection-display-button-YyNX5Efp.js +1 -0
- package/dist/client/assets/{collection-search-BoB9COGX.js → collection-search-BC0JMMNp.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CxJ6Bp-f.js → collection-table-wrapper-DFn43mg0.js} +1 -1
- package/dist/client/assets/{collection-tabs-Cw7XLgNG.js → collection-tabs-DeQ7zbGh.js} +1 -1
- package/dist/client/assets/column-rules-b8eo73o4.js +3 -0
- package/dist/client/assets/{combobox-PSOtDaya.js → combobox-DeXU4vSR.js} +1 -1
- package/dist/client/assets/command-D2QlwSrW.js +1 -0
- package/dist/client/assets/{companion-mcps-section-gXkjR-XD.js → companion-mcps-section-DtzaYg0J.js} +1 -1
- package/dist/client/assets/config-DP6xvcYW.js +1 -0
- package/dist/client/assets/{connect-Dn2pI97X.js → connect-ClKIaF8K.js} +3 -3
- package/dist/client/assets/connect-layout-CyyX0xPx.js +1 -0
- package/dist/client/assets/{connection-FKmTBjan.js → connection-BjzBHJVc.js} +1 -1
- package/dist/client/assets/connection-card-BVD8Ppl9.js +1 -0
- package/dist/client/assets/connection-detail-DfYF7TR9.js +1 -0
- package/dist/client/assets/connection-form-helpers-5EXuPZ4G.js +1 -0
- package/dist/client/assets/connections-D1tC1_hB.js +1 -0
- package/dist/client/assets/context-DzTTGbcd.js +1 -0
- package/dist/client/assets/{context-menu-BLhcVqO0.js → context-menu-Can7-rLt.js} +1 -1
- package/dist/client/assets/{core.esm-DbclD67Y.js → core.esm-Cvui6jds.js} +1 -1
- package/dist/client/assets/create-organization-dialog-CD66iA3E.js +1 -0
- package/dist/client/assets/daily-pulse-Bz92WYIP.js +1 -0
- package/dist/client/assets/device-hint-DZcinuip.js +1 -0
- package/dist/client/assets/discover-BRALl0mU.js +1 -0
- package/dist/client/assets/domain-settings-DiitZO4z.js +1 -0
- package/dist/client/assets/{drawer-CXs6iEYK.js → drawer-BPz4t5dt.js} +1 -1
- package/dist/client/assets/{editor-CPkkN1Zr.js → editor-2jNHgdUN.js} +3 -3
- package/dist/client/assets/{empty-state-D45gZaZ-.js → empty-state-D8iC8fkc.js} +1 -1
- package/dist/client/assets/{empty-state-DnQ_qEjI.js → empty-state-Zf0MeIMv.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Q_j_fmQx.js → extract-connection-data-BTBLhbEe.js} +1 -1
- package/dist/client/assets/{feature-gate-CFL9eB8c.js → feature-gate-Dhf-LwS1.js} +1 -1
- package/dist/client/assets/feature-paywall-CHcwEHRJ.js +1 -0
- package/dist/client/assets/file-explorer-BhYSdjXu.js +2 -0
- package/dist/client/assets/{file-preview-DT-0IR-r.js → file-preview-DvxQuX3P.js} +1 -1
- package/dist/client/assets/file-share-button-C1EB3dOc.js +3 -0
- package/dist/client/assets/{file-type-icon-Du5QihE_.js → file-type-icon-DzYK4NqY.js} +1 -1
- package/dist/client/assets/flat-project-D2zrr-4_.js +1 -0
- package/dist/client/assets/{folder-icon-DXEgDwxo.js → folder-icon-C_Jv4E7N.js} +2 -2
- package/dist/client/assets/{form-BBtB5neb.js → form-BCYpCYIL.js} +1 -1
- package/dist/client/assets/general-D8kDc8NB.js +1 -0
- package/dist/client/assets/home-CiV29kW5.js +1 -0
- package/dist/client/assets/{icon-button-BiR7Hy07.js → icon-button-sHj7Q6Fp.js} +1 -1
- package/dist/client/assets/index-6UUldwCZ.js +1 -0
- package/dist/client/assets/index-BVmIdqXu.js +1 -0
- package/dist/client/assets/{index-C-3lNbMm.js → index-BhyQWjoM.js} +6 -6
- package/dist/client/assets/{index-D_7jfHk6.js → index-Bm9FTdjr.js} +43 -43
- package/dist/client/assets/{index-DWUcsrDk.js → index-CspW_Aw1.js} +2 -2
- package/dist/client/assets/{index-BvwJHqHQ.js → index-CuOTEpMz.js} +2 -2
- package/dist/client/assets/{index-D1CuHcEn.js → index-D2iZ6syL.js} +1 -1
- package/dist/client/assets/{index-CmC6v99h.js → index-DmfwrRER.js} +5 -5
- package/dist/client/assets/{index-CoDuotD7.js → index-GgiP6YIr.js} +1 -1
- package/dist/client/assets/{index-KqttCHw1.js → index-KCu_K9eF.js} +1 -1
- package/dist/client/assets/{index-CeMEs5dC.js → index-YEKHk89C.js} +2 -2
- package/dist/client/assets/{index-redirect-_9q4bmDQ.js → index-redirect-C_FoZNOn.js} +1 -1
- package/dist/client/assets/{index-DltLvtZg.js → index-s6P2p4h7.js} +1 -1
- package/dist/client/assets/{index-D8mID9PZ.js → index-wABYnbOM.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DG8sBe4B.js → infiniteQueryObserver-zxl9Rj5F.js} +1 -1
- package/dist/client/assets/infra-billing-heizZxEC.js +1 -0
- package/dist/client/assets/{input-DQp1LVsq.js → input-BkQDO0Ef.js} +5 -5
- package/dist/client/assets/input-Bvc3OT4I.js +1 -0
- package/dist/client/assets/{integration-icon-BM3EOzpn.js → integration-icon-DoYtKqdf.js} +1 -1
- package/dist/client/assets/jira-icon-BeORJXLw.js +1 -0
- package/dist/client/assets/{label-DxOPcXJe.js → label-BL2W0Pcn.js} +1 -1
- package/dist/client/assets/{layout-bHPl4zx9.js → layout-vy24lHLj.js} +1 -1
- package/dist/client/assets/legacy-agents-deep-B5L4MOtR.js +1 -0
- package/dist/client/assets/{legacy-main-redirect-z5zSFE1g.js → legacy-main-redirect-Pp-THt9D.js} +1 -1
- package/dist/client/assets/library-DZte0T9-.js +1 -0
- package/dist/client/assets/{library-tab-Z6y7ewdW.js → library-tab-2usQWRYi.js} +3 -3
- package/dist/client/assets/login-CwsPhEpC.js +1 -0
- package/dist/client/assets/{markdown-6zdu9t3J.js → markdown-B3PJYX-4.js} +3 -3
- package/dist/client/assets/{mcp-app-renderer-D5zA7BfR.js → mcp-app-renderer-BLT3VM-G.js} +1 -1
- package/dist/client/assets/mcp-oauth-4gmyTyah.js +1 -0
- package/dist/client/assets/mcp-oauth-BTa4N28L.js +1 -0
- package/dist/client/assets/members-Dba6HROK.js +1 -0
- package/dist/client/assets/{memory-C67vpugN.js → memory-DAV2Pmj2.js} +2 -2
- package/dist/client/assets/{mini-report-page-jD0aWOQw.js → mini-report-page-B9WE5YW-.js} +1 -1
- package/dist/client/assets/{mock-board-DX11vRZx.js → mock-board-D9i0Vi9l.js} +1 -1
- package/dist/client/assets/{monaco-editor-BfKI4VlA.js → monaco-editor-DANiMmsL.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-DB55KTTw.js → monitoring-stats-row-B1hQA0Lu.js} +1 -1
- package/dist/client/assets/{multi-select-DVylmGoB.js → multi-select-BJgtMlC2.js} +1 -1
- package/dist/client/assets/mustache-GMlXm0yl.js +4 -0
- package/dist/client/assets/new-project-dialog-C-thpPQ-.js +1 -0
- package/dist/client/assets/{oauth-callback-Cqdj0zbM.js → oauth-callback-DZwrYGu7.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Cwy6YGO7.js → oauth-callback-ai-provider-B7d3QWP4.js} +1 -1
- package/dist/client/assets/onboarding-DK0DTXli.js +1 -0
- package/dist/client/assets/openai-conversation-BMdPtMrp.js +3 -0
- package/dist/client/assets/optimistic-project-sidebar-views-B4v48qUS.js +1 -0
- package/dist/client/assets/{organization-choice-CG-C6xsW.js → organization-choice-BIWVNvRP.js} +1 -1
- package/dist/client/assets/orgs-D5AZUxP6.js +1 -0
- package/dist/client/assets/{page-seo-form-C6V8K2um.js → page-seo-form-gaHyPBMV.js} +1 -1
- package/dist/client/assets/pair-DXTFiJNl.js +48 -0
- package/dist/client/assets/plan-ladder-BUDRjzbj.js +1 -0
- package/dist/client/assets/{popover-C2vJrXky.js → popover-jNB4XciF.js} +1 -1
- package/dist/client/assets/post-calendar-D8EAMZvz.js +1 -0
- package/dist/client/assets/post-editor-BQa57f7n.js +2 -0
- package/dist/client/assets/preview-content-B6K8Jkd_.js +1 -0
- package/dist/client/assets/preview-dialog-Dl22mWwN.js +1 -0
- package/dist/client/assets/{preview-panel-CaQ4Pbpr.js → preview-panel-LWLVsrdx.js} +1 -1
- package/dist/client/assets/product-picker-dialog-RglVwX1Q.js +1 -0
- package/dist/client/assets/profile-BWcfZQ7V.js +1 -0
- package/dist/client/assets/project-app-view-qeunpPC-.js +1 -0
- package/dist/client/assets/project-feed-Dm758F3_.js +1 -0
- package/dist/client/assets/{project-icon-DU1uywdD.js → project-icon-D2vCEWQy.js} +1 -1
- package/dist/client/assets/project-reports-6TMbK6-4.js +1 -0
- package/dist/client/assets/project-tasks-3mU9NrZf.js +1 -0
- package/dist/client/assets/projects-DyGysCyv.js +1 -0
- package/dist/client/assets/{projects-empty-state-BsW_dfGL.js → projects-empty-state-BuMMPopD.js} +1 -1
- package/dist/client/assets/prompts-BrbpQc3X.js +1 -0
- package/dist/client/assets/record-editor-hwH5zZn-.js +1 -0
- package/dist/client/assets/redirect-editor-Dc4HBQwl.js +1 -0
- package/dist/client/assets/{reports-CMClJ0_S.js → reports-D7gOlgZm.js} +2 -2
- package/dist/client/assets/reports-DPHZG4Rx.js +1 -0
- package/dist/client/assets/reports-onboarding-DGmwN9iV.js +1 -0
- package/dist/client/assets/reports-tab-Bb7ApLUW.js +2 -0
- package/dist/client/assets/repositories-GlkzQQVy.js +1 -0
- package/dist/client/assets/repository-binding-D2wL-4Vr.js +1 -0
- package/dist/client/assets/repository-import-picker-DtM7QfYh.js +1 -0
- package/dist/client/assets/repository-picker-28zwGBgK.js +1 -0
- package/dist/client/assets/require-capability-Dm4XTD9Y.js +1 -0
- package/dist/client/assets/{required-auth-layout-CDif9NZC.js → required-auth-layout-CbgA2xIU.js} +1 -1
- package/dist/client/assets/reset-password-15IQ61HR.js +1 -0
- package/dist/client/assets/{resizable-CIqqPf7O.js → resizable-CGWosOTw.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-S311kwwr.js → resolve-tab-icon-BEIojUgL.js} +1 -1
- package/dist/client/assets/review-settings-BAqWAPVV.js +1 -0
- package/dist/client/assets/{rich-text-link-control-CMeXviAY.js → rich-text-link-control-CE4nCWAz.js} +1 -1
- package/dist/client/assets/roles-etRZjRQM.js +1 -0
- package/dist/client/assets/route-BCQ2a7UE.js +1 -0
- package/dist/client/assets/route-CdaJ86mX.js +1 -0
- package/dist/client/assets/route-DCLsEeq7.js +1 -0
- package/dist/client/assets/{runnable-block-editor-BWSWYcJ-.js → runnable-block-editor-xVvcrNA2.js} +4 -4
- package/dist/client/assets/sandbox-lifecycle-context-BKjyczlw.js +1 -0
- package/dist/client/assets/{schema-D1veJPjJ.js → schema-C_wSANSe.js} +1 -1
- package/dist/client/assets/{scroll-area-Ce9NeF1s.js → scroll-area-BT00diUA.js} +1 -1
- package/dist/client/assets/{search-input-DpJBHwWo.js → search-input-D-uP0R3f.js} +1 -1
- package/dist/client/assets/search-toggle-Hgq_Klme.js +1 -0
- package/dist/client/assets/{secret-picker-B_ADx-sY.js → secret-picker-BitsdCaD.js} +1 -1
- package/dist/client/assets/secrets-C_yZKBHs.js +1 -0
- package/dist/client/assets/sections-editor-DrNkE-5_.js +1 -0
- package/dist/client/assets/{select-CZdnCwuC.js → select-BVEgIanS.js} +1 -1
- package/dist/client/assets/select-model-CTmCsZzT.js +1 -0
- package/dist/client/assets/seo-editor-Cr-VPdNi.js +1 -0
- package/dist/client/assets/{separator-BtrJ5AFz.js → separator-CJOPtNz-.js} +1 -1
- package/dist/client/assets/settings-tab-zoRR23UC.js +4 -0
- package/dist/client/assets/sheet-D-h-caij.js +1 -0
- package/dist/client/assets/shell-layout-Ckss0QqA.js +1 -0
- package/dist/client/assets/skills-Dx8G-x-T.js +1 -0
- package/dist/client/assets/{slider-BpZoep6A.js → slider-DtTzb8JT.js} +1 -1
- package/dist/client/assets/{sortable.esm-DyjKGVzh.js → sortable.esm-DCsYtWcb.js} +1 -1
- package/dist/client/assets/sso-DDpjWaoO.js +1 -0
- package/dist/client/assets/{suggestion-DmBBrXFD.js → suggestion-Bso4uBRF.js} +2 -2
- package/dist/client/assets/{switch-hSsSQMgC.js → switch-DZo6rAtc.js} +1 -1
- package/dist/client/assets/{symbol-CkeqKRPe.js → symbol-Co3D-iSE.js} +1 -1
- package/dist/client/assets/synced-repos-B1f0culo.js +1 -0
- package/dist/client/assets/{tab-icon-glyph-BRREqFJ3.js → tab-icon-glyph-ClCao4gx.js} +1 -1
- package/dist/client/assets/{table-Dfov51xE.js → table-Gm-jWCpy.js} +1 -1
- package/dist/client/assets/{tabs-Df848FrP.js → tabs-CXsAC8nO.js} +1 -1
- package/dist/client/assets/{task-board-ChFrokIN.js → task-board-Bgw_xVJW.js} +1 -1
- package/dist/client/assets/{task-route-4t67EvVC.js → task-route-BxRkc6kt.js} +1 -1
- package/dist/client/assets/{task-status-cI-KMHji.js → task-status-B92ESgef.js} +1 -1
- package/dist/client/assets/taskboard-analytics-BEBBYmzN.js +1 -0
- package/dist/client/assets/{tasks-Dcje4OJR.js → tasks-BS9sXVdl.js} +3 -3
- package/dist/client/assets/tasks-DckB4c8m.js +1 -0
- package/dist/client/assets/{textarea-DaHaRA0Z.js → textarea-bcNEcwC6.js} +1 -1
- package/dist/client/assets/thread-analytics-BE8EaB4a.js +1 -0
- package/dist/client/assets/thread-button-BdyWFdme.js +1 -0
- package/dist/client/assets/{thread-intent-Cxso0qKW.js → thread-intent-DzHkd78g.js} +4 -4
- package/dist/client/assets/thread-route-CIiqv6HG.js +1 -0
- package/dist/client/assets/thread-route-mhniW_q8.js +1 -0
- package/dist/client/assets/thread-sheet-body-C1CJm0mZ.js +1 -0
- package/dist/client/assets/time-range-picker-BUGifbSV.js +1 -0
- package/dist/client/assets/{toggle-group-BFX-9eHs.js → toggle-group-5iPAspL-.js} +1 -1
- package/dist/client/assets/{tool-namespace-BHB8Go32.js → tool-namespace-CYa7zzrf.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-D9aCXzS4.js → toolbar-icon-button-CZBCq2Ko.js} +1 -1
- package/dist/client/assets/{tooltip-BULKkf4A.js → tooltip-XZmQWwgB.js} +1 -1
- package/dist/client/assets/{tooltipContext-1NNpJuJd.js → tooltipContext-BpyR0oly.js} +1 -1
- package/dist/client/assets/{track-CpjpKs1v.js → track-Ba2I9E5t.js} +1 -1
- package/dist/client/assets/{types-Blm6OQRg.js → types-2TlDAuAc.js} +3 -3
- package/dist/client/assets/{url-slug-d-Er1jOR.js → url-slug-B-L2Z8me.js} +1 -1
- package/dist/client/assets/{usage-stats-Dqycj-p-.js → usage-stats-BihPbkIg.js} +8 -8
- package/dist/client/assets/use-ai-providers-BP69qr77.js +1 -0
- package/dist/client/assets/use-automations-Biu6cV7d.js +1 -0
- package/dist/client/assets/{use-autosave-DBCPQM6l.js → use-autosave-9jHQ-y1f.js} +1 -1
- package/dist/client/assets/use-chat-layout-state-J-94EUwt.js +1 -0
- package/dist/client/assets/use-chat-navigation-BXZpM5MQ.js +1 -0
- package/dist/client/assets/{use-clock-tick-DGTQe72H.js → use-clock-tick-rPXqIJP8.js} +1 -1
- package/dist/client/assets/use-connect-companion-BupOmQ7x.js +1 -0
- package/dist/client/assets/use-connection-DUF3XC9E.js +1 -0
- package/dist/client/assets/{use-copy-CRIUfo35.js → use-copy-B01v9eRq.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DzmQH3J8.js → use-create-virtual-mcp-BxoXyDoq.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DIokBBqe.js → use-date-fns-locale-CPtrEugx.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BRSYFOGW.js → use-debounced-autosave-C__Xzre-.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DCB8Le0h.js → use-debounced-value-D5_QO1dT.js} +1 -1
- package/dist/client/assets/use-deco-credits-DkZSWK0d.js +1 -0
- package/dist/client/assets/{use-decopilot-events-uItZ_pJe.js → use-decopilot-events-1iPDcTcf.js} +1 -1
- package/dist/client/assets/use-delete-connection-DUG0172F.js +1 -0
- package/dist/client/assets/{use-deployment-admin-BSf-NdBG.js → use-deployment-admin-COeWRtXj.js} +1 -1
- package/dist/client/assets/use-ensure-project-folder-A0But3O1.js +1 -0
- package/dist/client/assets/{use-fast-preview-draft-url-8LcTSnsj.js → use-fast-preview-draft-url-BRdebqFC.js} +1 -1
- package/dist/client/assets/use-file-configs-B8mqylSR.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-B02yfFGd.js → use-infinite-scroll-DewChEmc.js} +1 -1
- package/dist/client/assets/use-join-requests-CDGwHERc.js +1 -0
- package/dist/client/assets/use-main-panel-tabs-D7q-AygO.js +1 -0
- package/dist/client/assets/use-mcp-auth-status-CUurQWMq.js +1 -0
- package/dist/client/assets/{use-mcp-client-MUIIizLf.js → use-mcp-client-Dh_4AZgb.js} +4 -4
- package/dist/client/assets/{use-mcp-prompts-C3siW74f.js → use-mcp-prompts-LJf01t7x.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CPLGkZB5.js → use-mcp-tools-p8MJKmfB.js} +1 -1
- package/dist/client/assets/use-members-DQe3FYGy.js +1 -0
- package/dist/client/assets/{use-mobile-DF1FX6Xv.js → use-mobile-UYmsi-dp.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-DDZo26Jw.js +1 -0
- package/dist/client/assets/use-new-blocks-editor-nCMzaJ9Q.js +1 -0
- package/dist/client/assets/{use-open-billing-url-CqJ0vDkP.js → use-open-billing-url-C0JU6CzN.js} +1 -1
- package/dist/client/assets/use-org-auth-client-CPbs0OVW.js +1 -0
- package/dist/client/assets/use-org-fs-gQ0RuIPK.js +1 -0
- package/dist/client/assets/use-org-repo-syncs-KkmagwRy.js +1 -0
- package/dist/client/assets/{use-org-sso-BEGhJLya.js → use-org-sso-DWtbATGD.js} +1 -1
- package/dist/client/assets/use-organization-roles-BKQWBZmO.js +1 -0
- package/dist/client/assets/use-organization-settings-xcc5-6DS.js +1 -0
- package/dist/client/assets/{use-panel-navigate-C4UE8Qkr.js → use-panel-navigate-A1obvdVI.js} +1 -1
- package/dist/client/assets/{use-project-scope-BMVXwaQ4.js → use-project-scope-BxCbtcTE.js} +1 -1
- package/dist/client/assets/use-releases-G79MSxhR.js +1 -0
- package/dist/client/assets/use-reports-diagnostic-a7ERyr_7.js +1 -0
- package/dist/client/assets/use-sandbox-events-CSN74_aC.js +2 -0
- package/dist/client/assets/use-secrets-CmTpPaF9.js +1 -0
- package/dist/client/assets/use-section-preview-base-DbQlCGNR.js +1 -0
- package/dist/client/assets/use-tags-Ch6_1it4.js +1 -0
- package/dist/client/assets/use-task-board-analytics-v7nFgyEB.js +1 -0
- package/dist/client/assets/{use-task-board-events-BDjHMnwS.js → use-task-board-events-DHjlo-9e.js} +1 -1
- package/dist/client/assets/use-task-board-item-prs-CoXnP9ys.js +1 -0
- package/dist/client/assets/use-task-board-items-erbHwxMh.js +1 -0
- package/dist/client/assets/use-task-metadata-DmWCG43J.js +1 -0
- package/dist/client/assets/{use-thread-analytics-DJQ2zz_B.js → use-thread-analytics-DJfFmK1j.js} +1 -1
- package/dist/client/assets/use-thread-outputs-7J4Ek_Zs.js +1 -0
- package/dist/client/assets/useInfiniteQuery-vZqvTY4f.js +1 -0
- package/dist/client/assets/{useQueries-DKVO6hGe.js → useQueries-DoURbZYb.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DdGuWYX3.js +1 -0
- package/dist/client/assets/{users-DbpeSClG.js → users-BfQBxfCk.js} +1 -1
- package/dist/client/assets/{utils-Cxy1EsFU.js → utils-DAEMarMy.js} +1 -1
- package/dist/client/assets/variant-calendar-DNADqO99.js +1 -0
- package/dist/client/assets/{variant-matcher-override-BD9nzwGm.js → variant-matcher-override-BDRgB-Pq.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CVVPadaN.js → view-mode-toggle-DPJfZa3C.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CYDFCAA6.js → virtual-mcp-C54PVPPw.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BXtoXPGx.js → watch-sse-pool-DmOqvBBq.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +633 -633
- package/package.json +1 -1
- package/dist/client/assets/LinkExternal01-CILXo-bC.js +0 -1
- package/dist/client/assets/X-DzPShgV5.js +0 -1
- package/dist/client/assets/add-connection-dialog-Eph5CbUo.js +0 -1
- package/dist/client/assets/agent-analytics-DSdixv-f.js +0 -2
- package/dist/client/assets/agent-app-CT6U3s2r.js +0 -1
- package/dist/client/assets/agent-assets-G93-pOM9.js +0 -1
- package/dist/client/assets/agent-automation-DP6Bv0AB.js +0 -20
- package/dist/client/assets/agent-automations-YDqRnDcc.js +0 -1
- package/dist/client/assets/agent-connect-sources-CSrFX52j.js +0 -1
- package/dist/client/assets/agent-deck-D9Bphszm.js +0 -1
- package/dist/client/assets/agent-e2e-k9wCqssu.js +0 -1
- package/dist/client/assets/agent-experiments-CPSBbmYr.js +0 -1
- package/dist/client/assets/agent-file-BAkSJWMw.js +0 -1
- package/dist/client/assets/agent-hosting-B1Ag0zD8.js +0 -1
- package/dist/client/assets/agent-icon-CnnNyirr.js +0 -1
- package/dist/client/assets/agent-library-Ch3sHhuh.js +0 -1
- package/dist/client/assets/agent-library-file-Bq6m6SHP.js +0 -1
- package/dist/client/assets/agent-monitor-DyddEd79.js +0 -1
- package/dist/client/assets/agent-overview-BlP2a40h.js +0 -1
- package/dist/client/assets/agent-settings-CaxlA04S.js +0 -1
- package/dist/client/assets/agent-site-editor-code-D0j_GVVh.js +0 -2
- package/dist/client/assets/agent-site-editor-preview-DaqE_qX4.js +0 -518
- package/dist/client/assets/agent-view-UQmbv7nk.js +0 -1
- package/dist/client/assets/agents-list-CJcm3Kq8.js +0 -1
- package/dist/client/assets/api-keys-BjTJSB_i.js +0 -1
- package/dist/client/assets/api-keys-BrfzhtIS.js +0 -1
- package/dist/client/assets/app-editor-CJudcxBz.js +0 -1
- package/dist/client/assets/asset-utils-Cdgz7yau.js +0 -1
- package/dist/client/assets/auth-entry-BUqhj_6T.js +0 -1
- package/dist/client/assets/authenticate-and-persist-oauth-eDHShxj5.js +0 -1
- package/dist/client/assets/automation-runs-BZA4OsIt.js +0 -1
- package/dist/client/assets/automations-DpWIQ3oV.js +0 -1
- package/dist/client/assets/autosend-BQ3F90GX.js +0 -1
- package/dist/client/assets/buckets-AVx7AXso.js +0 -1
- package/dist/client/assets/capability-load-error-BVlvKXjS.js +0 -1
- package/dist/client/assets/category-editor-B-jccGXu.js +0 -1
- package/dist/client/assets/chat-context-UMp8QwjT.js +0 -39
- package/dist/client/assets/chat-draft-CYy-Qv-a.js +0 -1
- package/dist/client/assets/choose-editor-BDo9cuNm.js +0 -1
- package/dist/client/assets/claim-phase-copy-DG8E1-gc.js +0 -1
- package/dist/client/assets/collection-detail-CBqQPzi0.js +0 -1
- package/dist/client/assets/collection-display-button-XaptFv9u.js +0 -1
- package/dist/client/assets/column-rules-Bq3eiowV.js +0 -3
- package/dist/client/assets/command-Doiz3O29.js +0 -1
- package/dist/client/assets/config-B01oZvpJ.js +0 -1
- package/dist/client/assets/connect-layout-CoxrwG6t.js +0 -1
- package/dist/client/assets/connection-card-Cvk5T5vt.js +0 -1
- package/dist/client/assets/connection-detail-BRdQkO7d.js +0 -1
- package/dist/client/assets/connection-form-helpers-D4Q7rLyt.js +0 -1
- package/dist/client/assets/connections-C8qSBDCe.js +0 -1
- package/dist/client/assets/context-Bt7kDQzj.js +0 -1
- package/dist/client/assets/create-organization-dialog-D-t_ZE2o.js +0 -1
- package/dist/client/assets/daily-pulse-DYPs4tl1.js +0 -1
- package/dist/client/assets/device-hint-CbxzMdRC.js +0 -1
- package/dist/client/assets/dialog-DRpbbWU1.js +0 -1
- package/dist/client/assets/discover-3ATGdKP8.js +0 -1
- package/dist/client/assets/domain-settings-C4-yAgIW.js +0 -1
- package/dist/client/assets/feature-paywall-0RYA-1Op.js +0 -1
- package/dist/client/assets/file-explorer-Cyg7RguR.js +0 -2
- package/dist/client/assets/file-share-button-C8ZBUx_e.js +0 -3
- package/dist/client/assets/flat-project-BpQGs-gN.js +0 -1
- package/dist/client/assets/general-B3jgLFML.js +0 -1
- package/dist/client/assets/home-DYCk_i5V.js +0 -1
- package/dist/client/assets/index-Cx0uPPmh.js +0 -1
- package/dist/client/assets/index-qeM6EfxB.js +0 -1
- package/dist/client/assets/infra-billing-BFh6IlFL.js +0 -1
- package/dist/client/assets/input-B0doV0os.js +0 -1
- package/dist/client/assets/input-BQ74PHN6.js +0 -1
- package/dist/client/assets/jira-icon-C1bLqdEg.js +0 -1
- package/dist/client/assets/legacy-agents-deep-BBjNU_wv.js +0 -1
- package/dist/client/assets/library-CVuXHyjV.js +0 -1
- package/dist/client/assets/login-DNhk4MX6.js +0 -1
- package/dist/client/assets/mcp-oauth-C5T-IVs8.js +0 -1
- package/dist/client/assets/members-BftWOm2t.js +0 -1
- package/dist/client/assets/mustache-D-VzFUJG.js +0 -4
- package/dist/client/assets/new-project-dialog-CXEwhrv6.js +0 -1
- package/dist/client/assets/onboarding-BisuojYF.js +0 -1
- package/dist/client/assets/openai-conversation-BICNFmxp.js +0 -3
- package/dist/client/assets/optimistic-project-sidebar-views-BINKTU3_.js +0 -1
- package/dist/client/assets/orgs-DCjydoUZ.js +0 -1
- package/dist/client/assets/pair-knnOGTuF.js +0 -47
- package/dist/client/assets/plan-ladder-DlpzxobM.js +0 -1
- package/dist/client/assets/post-calendar-3X9xGSKe.js +0 -1
- package/dist/client/assets/post-editor-BS-N2LHp.js +0 -2
- package/dist/client/assets/preview-content-CWMTMNmp.js +0 -1
- package/dist/client/assets/preview-dialog-CmtjgV1o.js +0 -1
- package/dist/client/assets/product-picker-dialog-904WCGJu.js +0 -1
- package/dist/client/assets/profile-aIUaVWtC.js +0 -1
- package/dist/client/assets/project-app-view-ChZmhZ13.js +0 -1
- package/dist/client/assets/project-feed-t8IHFF-d.js +0 -1
- package/dist/client/assets/project-reports-BF24m5b-.js +0 -1
- package/dist/client/assets/project-tasks-Wmmy6hRq.js +0 -1
- package/dist/client/assets/projects-CxEhyr52.js +0 -1
- package/dist/client/assets/prompts-Cad3gM_K.js +0 -1
- package/dist/client/assets/record-editor-Cu0LbDVm.js +0 -1
- package/dist/client/assets/redirect-editor-B65ggNrM.js +0 -1
- package/dist/client/assets/reports-B3_ASbsZ.js +0 -1
- package/dist/client/assets/reports-onboarding-DzC8BMPj.js +0 -1
- package/dist/client/assets/reports-tab-flC8aPMq.js +0 -2
- package/dist/client/assets/repositories-BRVHvY5X.js +0 -1
- package/dist/client/assets/repository-binding-DpX8yLri.js +0 -1
- package/dist/client/assets/repository-import-picker-CO5nKRxA.js +0 -1
- package/dist/client/assets/repository-picker-C2HnHK1A.js +0 -1
- package/dist/client/assets/require-capability-Do1773Hs.js +0 -1
- package/dist/client/assets/reset-password-Dh0gWEkU.js +0 -1
- package/dist/client/assets/review-settings-C9jJxNAv.js +0 -1
- package/dist/client/assets/roles-BOnFVbcr.js +0 -1
- package/dist/client/assets/route-Bvv7axF1.js +0 -1
- package/dist/client/assets/route-DNZvy3kt.js +0 -1
- package/dist/client/assets/route-DdkXah7z.js +0 -1
- package/dist/client/assets/sandbox-lifecycle-context-BJE24h7z.js +0 -1
- package/dist/client/assets/search-toggle-Br3rmrbk.js +0 -1
- package/dist/client/assets/secrets-t0Aczfol.js +0 -1
- package/dist/client/assets/sections-editor-CEBB7XW8.js +0 -1
- package/dist/client/assets/select-model-ER05JMp8.js +0 -1
- package/dist/client/assets/seo-editor-DHXJaGsL.js +0 -1
- package/dist/client/assets/settings-tab-CTiWw7bm.js +0 -4
- package/dist/client/assets/sheet-Gpaizien.js +0 -1
- package/dist/client/assets/shell-layout-B0-NcUCt.js +0 -1
- package/dist/client/assets/skills-BHEjjAUu.js +0 -1
- package/dist/client/assets/sso-Dgg4nP6H.js +0 -1
- package/dist/client/assets/synced-repos-B1QJsQos.js +0 -1
- package/dist/client/assets/taskboard-analytics-C5y5DQZh.js +0 -1
- package/dist/client/assets/tasks-B6PT7ia3.js +0 -1
- package/dist/client/assets/thread-analytics-5o8rlytc.js +0 -1
- package/dist/client/assets/thread-button-DwjwmudD.js +0 -1
- package/dist/client/assets/thread-route-BcAw7-v0.js +0 -1
- package/dist/client/assets/thread-route-CW2be8Kx.js +0 -1
- package/dist/client/assets/thread-sheet-body-B6geJ00B.js +0 -1
- package/dist/client/assets/time-range-picker-Bu58tMJr.js +0 -1
- package/dist/client/assets/use-ai-providers-C1bb7SnA.js +0 -1
- package/dist/client/assets/use-automations-zlAoF9SL.js +0 -1
- package/dist/client/assets/use-chat-layout-state-DDDFQN6Y.js +0 -1
- package/dist/client/assets/use-chat-navigation-BF9opsK8.js +0 -1
- package/dist/client/assets/use-connect-companion-DcLSyBxl.js +0 -1
- package/dist/client/assets/use-connection-5LUEsGlJ.js +0 -1
- package/dist/client/assets/use-deco-credits-BgPf-IIH.js +0 -1
- package/dist/client/assets/use-delete-connection-BLZ4VLoa.js +0 -1
- package/dist/client/assets/use-ensure-project-folder-BUpbRP81.js +0 -1
- package/dist/client/assets/use-file-configs-By7UB_YZ.js +0 -1
- package/dist/client/assets/use-join-requests-Cb1ihQM1.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-xXeWrfnF.js +0 -1
- package/dist/client/assets/use-mcp-auth-status-B-gyzfqG.js +0 -1
- package/dist/client/assets/use-members-vjX9lJhj.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-p65xWFDF.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-DZnaAqkX.js +0 -1
- package/dist/client/assets/use-org-auth-client-CuZ7oLTb.js +0 -1
- package/dist/client/assets/use-org-fs-DPxqVRhB.js +0 -1
- package/dist/client/assets/use-org-repo-syncs-BG16MD5Q.js +0 -1
- package/dist/client/assets/use-organization-roles-DOROP0yS.js +0 -1
- package/dist/client/assets/use-organization-settings-CB0-LYjl.js +0 -1
- package/dist/client/assets/use-releases-DO5M1M4y.js +0 -1
- package/dist/client/assets/use-reports-diagnostic-C3LmmHKo.js +0 -1
- package/dist/client/assets/use-sandbox-events-E2bKOQlM.js +0 -2
- package/dist/client/assets/use-secrets-C2sdbGJM.js +0 -1
- package/dist/client/assets/use-section-preview-base-26sYGS0B.js +0 -1
- package/dist/client/assets/use-tags-CFN9IU6i.js +0 -1
- package/dist/client/assets/use-task-board-analytics-BmwRnCgb.js +0 -1
- package/dist/client/assets/use-task-board-item-prs-DY1JtBFR.js +0 -1
- package/dist/client/assets/use-task-board-items-DUgOnZAe.js +0 -1
- package/dist/client/assets/use-task-metadata-BCqsxDXx.js +0 -1
- package/dist/client/assets/use-thread-outputs-DfIiLAuO.js +0 -1
- package/dist/client/assets/useInfiniteQuery-eYXaZ_bo.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-i_drPWHc.js +0 -1
- package/dist/client/assets/variant-calendar-BR3Tvz7m.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as He,U as Tt,V as bt,K as Ne,m as St}from"./index-D_7jfHk6.js";import{s as De}from"./thread-intent-Cxso0qKW.js";function Tn(e){const t=He.c(12);let n;t[0]!==e?(n=bt.localPreviewUrl(e??""),t[0]=e,t[1]=n):n=t[1];const r=n,[i,o]=Tt(r,null);let c;t[2]!==i||t[3]!==e?(c=e?De(i):null,t[2]=i,t[3]=e,t[4]=c):c=t[4];const l=c;let u,T;t[5]!==o?(u=P=>o(De(P)),T=()=>o(null),t[5]=o,t[6]=u,t[7]=T):(u=t[6],T=t[7]);let R;return t[8]!==u||t[9]!==T||t[10]!==l?(R={url:l,setUrl:u,clear:T},t[8]=u,t[9]=T,t[10]=l,t[11]=R):R=t[11],R}class Rt extends Error{constructor(t,n,r=[]){super(n),this.blocks=t,this.fields=r,this.name="BlockConflictError"}blocks;fields}function Ke(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Et(e,t,n){return["decofile-write",e,t,n]}function bn(e,t,n){return{id:Et(e,t,n).join(":")}}function qe(e){return`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}`}async function kt(e,t){const n=await e.json().catch(()=>({}));throw new Error(n.error??`${t} failed (${e.status})`)}function Ot(e,t,n){e.setQueryData(Ne.decofileDraft(Ke(t)),n)}function Sn(e){const t=He.c(4);let n;t[0]!==e?(n=Ne.decofileDraft(e?Ke(e):""),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r={queryKey:n,enabled:!1,queryFn:Pt,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=r):r=t[3];const{data:i}=St(r);return i??null}async function Pt(){throw new Error("decofileDraft is populated by reads/writes, not fetched")}async function Rn(e,t){const n=await fetch(qe(t),{cache:"no-store"});if(!n.ok){const i=new Error(`Failed to fetch decofile: ${n.status}`);throw i.status=n.status,i}const r=await n.json();return r.token&&Ot(e,t,{version:r.version,token:r.token,apiHost:r.apiHost??window.location.host}),r.decofile}async function En(e,t){const n=await fetch(qe(e),{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(n.status===409){const i=await n.json().catch(()=>({}));throw i.code==="block-conflict"?new Rt(i.blocks??[],i.error??"Block changed"):new Error(i.error??`Save failed (${n.status})`)}if(!n.ok)return kt(n,"Save");const r=await n.json();return{...r,apiHost:r.apiHost??window.location.host}}function wt(e){return e.replace(/\/+$/,"")||"/"}function kn(e){return e.trim().replace(/^\/+|\/+$/g,"")}function $t(e){const t=e.trim();return!(!t.startsWith("/")||t.startsWith("//")||t.includes("..")||t.includes("\\"))}function On(e){const t=e.trim();return t?$t(t)?null:"Path must start with / and must not contain .. or //.":"Path is required."}const ge=/:([A-Za-z0-9_-]+)|\*/g;function Pn(e){const t=[];for(const n of e.matchAll(ge)){const r=n[1]??"*";t.includes(r)||t.push(r)}return t}function ze(e){return e.replace(/\{([^{}]*)\}\?/g,"$1")}function wn(e){e=ze(e);const t=[];let n=0;for(const r of e.matchAll(ge))r.index>n&&t.push({type:"text",text:e.slice(n,r.index)}),t.push({type:"param",name:r[1]??"*"}),n=r.index+r[0].length;return n<e.length&&t.push({type:"text",text:e.slice(n)}),t}function $n(e,t){return ze(e).replace(ge,(n,r)=>{const i=t[r??"*"]?.trim();return i?r!==void 0?encodeURIComponent(i):i.split("/").filter(Boolean).map(encodeURIComponent).join("/")||n:n})}function Ie(e){if(!e.startsWith("#")||!e.includes("@"))return null;const t=e.indexOf("@");return{moduleResolveType:e.slice(1,t),blockId:e.slice(t+1)}}function jn(e){return e.includes("@")}function Ue(e){const t=e.lastIndexOf("@");return t<0||t===e.length-1?null:e.slice(t+1)}function Mn(e,t){if(e===t)return!0;const n=Ue(e);return n?t===n||Ue(t)===n:!1}function J(e,t){const n=e.manifest?.blocks??{};for(const[r,i]of Object.entries(n))if(t in i)return r;return null}function Ln(e,t){return J(e,t)!==null}function ve(e,t){const n=J(e,t);return n!==null&&n.includes("sections")}function jt(e,t){const n=J(e,t);return n!==null&&n.includes("apps")}function Mt(e,t){const n=J(e,t);return n!==null&&n.includes("matchers")}function ee(e){return!(!e||/\.\w+$/.test(e)||e==="__proto__"||e==="constructor")}function me(e){try{return decodeURIComponent(e).startsWith("Preview ")}catch{return e.startsWith("Preview ")}}const Vn="oklch(0.7278 0.151 289)",Lt="website/matchers/always.ts",Ge="website/matchers/never.ts",te="website/flags/multivariate.ts",Y="website/flags/multivariate/section.ts";function _e(){return{__resolveType:Lt}}function F(e){const t=e.split("/");return(t[t.length-1]??e).replace(/\.(tsx?|jsx?|html?)$/,"").replace(/[-_]/g," ").replace(/\b\w/g,r=>r.toUpperCase())||e}const Vt=12,Bt=8,le=32,Ct=40,Dt="__SECTION_REF__";function fe(e){const t=e.type;return t==="array"||Array.isArray(t)&&t.includes("array")}function xe(e,t){let n=e.items;if(!n)return!1;if(typeof n.$ref=="string"&&(n=t(n.$ref)),Array.isArray(n.anyOf)||Array.isArray(n.oneOf))return!0;const i=n.properties?.__resolveType?.enum;return Array.isArray(i)&&typeof i[0]=="string"}const It="VideoWidget";function x(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Qe(e){return typeof btoa=="function"?btoa(e):Buffer.from(e).toString("base64")}function he(e){const t=e.match(/^site\/apps\/([^/]+)\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function Ae(e){const t=e.match(/^([^/]+)\/apps\/([^/.]+)\.tsx?$/);return t?{vendor:t[1],app:t[2]}:null}function Xe(e,t){return[`site/apps/${e}/${t}.ts`,`site/apps/${e}/${t}.tsx`,`${e}/apps/${t}.ts`,`${e}/apps/${t}.tsx`]}function Te(e,t){const n=t.manifest?.blocks??{};for(const l of Object.values(n))if(l[e])return l[e];const r=he(e)??Ae(e);if(r){for(const l of Xe(r.vendor,r.app))for(const u of Object.values(n))if(u[l])return u[l]}const i=Qe(e);for(const l of Object.values(n))if(l[i])return l[i];const o=t.schema??{};return(o.$defs??o.definitions??{})[i]?{$ref:`#/definitions/${i}`}:{}}function Ze(e,t){if(jt(e,t))return!0;const n=he(t)??Ae(t);if(!n)return!1;const r=e.manifest?.blocks?.apps??{};if(Xe(n.vendor,n.app).some(c=>c in r))return!0;const i=Qe(t),o=e.schema?.$defs??e.schema?.definitions??{};return i in o}function Ut(e){return e==="site/apps/site.ts"?!1:he(e)!==null||Ae(e)!==null}function Je(e,t){return et(t,{resolveType:e})}function Bn(e,t){return et(t,{ref:e})}function et(e,t){const n=e.schema??{},r="resolveType"in t?Te(t.resolveType,e):{},i=n.$defs??n.definitions??{},o=n.root??{},c=s=>{if(s.startsWith("#/root/")){const a=s.slice(7);return o[a]??{}}const f=s.split("/").pop()??"",v=i[f];return v||(f===Dt?o.sections??{}:{})};let l;typeof r.$ref=="string"?l=c(r.$ref):Object.keys(r).length>0?l=r:l=n;const u=s=>typeof s.$ref=="string"?c(s.$ref):s,T=s=>{const v=u(s).properties?.type;if(v){if(typeof v.const=="string")return v.const;if(typeof v.default=="string")return v.default;if(Array.isArray(v.enum)&&typeof v.enum[0]=="string")return v.enum[0]}},R=(s,f)=>{const v=u(s);return typeof v.title=="string"&&!v.title.startsWith("#")?v.title:f},P=(s,f=new Set)=>{if(typeof s.$ref!="string"||s.properties||s.anyOf||s.allOf||s.oneOf||s.type)return s;const v=s.$ref.split("/").pop()??"";return!v||f.has(v)?s:P(c(s.$ref),new Set([...f,v]))},H=s=>{const f=s.properties?.__resolveType?.enum;return Array.isArray(f)&&typeof f[0]=="string"?f[0]:void 0},Re=s=>H(s)!==void 0,Ee=(s,f=new Set)=>{if(typeof s.$ref!="string")return[];const v=s.$ref.split("/").pop()??"";if(!v||f.has(v))return[];const a=c(s.$ref),k=a.anyOf??a.oneOf;if(!Array.isArray(k))return[];const E=new Set([...f,v]);return k.flatMap(O=>Re(O)?[O]:Ee(O,E))},j=s=>{const f=s.hide;return f===!0||f==="true"},ke=s=>typeof s=="string"&&(s.includes("://")||!/\s/.test(s)&&(s.includes("|")||s.includes("&")||s.includes("@"))),G=(s,f=new Set,v=0)=>{if(v>Vt)return{};if(typeof s.$ref=="string"){const k=s.$ref.split("/").pop()??"";return f.has(k)?{}:G(c(s.$ref),new Set([...f,k]),v+1)}let a={};s.properties&&typeof s.properties=="object"&&(a={...a,...s.properties}),Array.isArray(s.required)&&(a.__required=[...x(a.__required),...x(s.required)]);for(const k of["allOf","anyOf","oneOf"]){const E=s[k];if(Array.isArray(E))for(const O of E){const L=x(a.__required),I=G(O,f,v+1);a={...a,...I};const w=k==="allOf"?[...L,...x(I.__required)]:L;w.length>0?a.__required=w:delete a.__required}}return a},M=(s,f=0,v=new Set)=>{let a=s,k;if(typeof s.$ref=="string"){a=c(s.$ref);const S=s.$ref.split("/").pop()??"";k=S,S===It&&!a.format&&(a={...a,format:"video-uri"})}a=P(a);const E=k!==void 0&&v.has(k),O=k!==void 0?new Set([...v,k]):v,L=(S,y,h,m=!0)=>!E&&(!m||h<=Ct)&&y<Bt?M(S,y,O):void 0;let I;{const S=a.anyOf??a.oneOf;if(Array.isArray(S)){const y=S.filter(m=>!(m.type==="null"||m.type===null)),h=m=>{if(typeof m.const=="string"||typeof m.const=="number")return m.const;if(Array.isArray(m.enum)&&m.enum.length===1&&(typeof m.enum[0]=="string"||typeof m.enum[0]=="number"))return m.enum[0]};y.length>0&&y.every(m=>h(m)!==void 0)&&(I=y.map(m=>h(m)))}}let w,N,$e=!1;if(a.type)w=Array.isArray(a.type)?String(a.type.find(S=>S!=="null")??a.type[0]):String(a.type);else if(a.anyOf||a.oneOf){const y=(a.anyOf??a.oneOf).filter(h=>!(h.type==="null"||h.type===null));if(y.length===0)w="null";else if(y.length===1){const h=y[0];N=h,w=h.type?Array.isArray(h.type)?String(h.type[0]):String(h.type):typeof h.$ref=="string"?"object":"string"}else{if(I){const p=d=>typeof s[d]=="string"?s[d]:typeof a[d]=="string"?a[d]:void 0;return{type:"string",title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,enum:I,format:p("format"),options:p("options")}}const h=y.filter(Re),m=y.map(p=>P(p)).find(fe),se=y.filter(p=>!fe(P(p))).every(p=>typeof p.$ref=="string"||h.includes(p)),_t=h.some(p=>{const d=p.properties?.__resolveType?.enum;return Array.isArray(d)&&d[0]===te}),Me=()=>{const p=new Map;for(const b of[...h,...y.filter(_=>!h.includes(_)).flatMap(_=>Ee(_))]){const _=H(b);_&&!p.has(_)&&p.set(_,b)}const d=[...p].map(([b,_])=>({resolveType:b,title:typeof _.title=="string"?_.title:F(b),description:typeof _.description=="string"?_.description:void 0,schema:L(_,f+1,p.size)})),g=[];for(const b of y){if(h.includes(b)||typeof b.$ref!="string")continue;const _=c(b.$ref);let C;const ae=_.properties?.__resolveType;if(Array.isArray(ae?.enum)&&typeof ae.enum[0]=="string"&&(C=ae.enum[0]),!C&&Array.isArray(_.allOf))for(const At of _.allOf){const ce=At.properties?.__resolveType?.enum;if(Array.isArray(ce)&&typeof ce[0]=="string"){C=ce[0];break}}C&&g.push({resolveType:C,title:typeof _.title=="string"&&!_.title.startsWith("#")?_.title:F(C),description:typeof _.description=="string"?_.description:void 0,schema:L(_,f+1,y.length)})}const A=new Set(d.map(b=>b.resolveType)),$=[...d,...g.filter(b=>!A.has(b.resolveType))],V=y.filter(b=>!h.includes(b)),B=V.length===1&&!E?M(V[0],f+1,O):void 0;return{type:"block-ref",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,anyOfRefs:$,plainSchema:B,hidden:j(a)||j(s)?!0:void 0}};if(m){if(!xe(m,c)&&y.length>1&&se){const d=M(m,f+1,O),g=typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:d.title,A=typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:d.description;return{...d,type:"array",title:g,description:A,loaderRef:h.length>0?{...Me(),title:g,description:A}:void 0}}if(_t){const d=M(m,f+1,O);return{...d,type:"array",title:typeof a.title=="string"?a.title:d.title,description:typeof a.description=="string"?a.description:d.description}}}if(h.length>0)return Me();const Le=p=>{const d=u(p);if(typeof d.title=="string"&&Ie(d.title))return!0;const g=d.properties?.__resolveType?.enum;if(Array.isArray(g)&&typeof g[0]=="string")return!0;if(Array.isArray(d.allOf))for(const A of d.allOf){const $=A.properties?.__resolveType?.enum;if(Array.isArray($)&&typeof $[0]=="string")return!0}return!1},Ve=y.map(p=>T(p));if(y.length>1&&Ve.every(p=>typeof p=="string")&&!y.some(Le)){const p=y.map((d,g)=>{const A=u(d),$=Ve[g];return{resolveType:$,title:R(d,$),description:typeof A.description=="string"?A.description:void 0,discriminatorValue:$,schema:L(A,f+1,y.length,!1)}});return{type:"block-ref",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,discriminatorKey:"type",anyOfRefs:p,hidden:j(a)||j(s)?!0:void 0}}const Be=p=>{if(Le(p))return!1;const d=u(p);return d.type==="object"||!!d.properties},ht=p=>{const d=P(p);return fe(d)?!xe(d,c):!1},Ce=f<le&&y.every(p=>Be(p)||ht(p))&&y.some(Be);if(y.every(p=>typeof p.$ref=="string")&&!Ce){const p=[];for(const d of y){const g=c(d.$ref);let A,$;if(typeof g.title=="string"){const B=Ie(g.title);B&&(A=B.blockId,$=B.blockId)}if(!A&&Array.isArray(g.allOf))for(const B of g.allOf){const C=((B.properties??{}).__resolveType??{}).enum;if(Array.isArray(C)&&typeof C[0]=="string"){A=C[0];break}}if(!A){const b=g.properties?.__resolveType?.enum;Array.isArray(b)&&typeof b[0]=="string"&&(A=b[0])}A||(A=d.$ref.split("/").pop()??"");const V=A.includes("/")?void 0:T(d);!V&&!A.includes("/")||p.push({resolveType:V??A,title:$??(typeof g.title=="string"&&!g.title.startsWith("#")?g.title:F(A)),description:typeof g.description=="string"?g.description:void 0,discriminatorValue:V,schema:L(g,f+1,y.length)})}return{type:"block-ref",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:void 0,anyOfRefs:p,hidden:j(a)||j(s)?!0:void 0}}if(Ce){const p=g=>{if(typeof g.const=="string"||typeof g.const=="number"||typeof g.const=="boolean")return g.const;if(Array.isArray(g.enum)&&g.enum.length===1&&(typeof g.enum[0]=="string"||typeof g.enum[0]=="number"||typeof g.enum[0]=="boolean"))return g.enum[0]},d=y.map((g,A)=>{const $=u(g).properties??{},V={};for(const[B,b]of Object.entries($)){const _=p(b);_!==void 0&&(V[B]=_)}return{title:R(g,`Option ${A+1}`),schema:M(g,f+1),discriminators:Object.keys(V).length?V:void 0}});return{type:"inline-union",title:typeof s.title=="string"?s.title:typeof a.title=="string"?a.title:void 0,description:typeof a.description=="string"?a.description:void 0,inlineUnionBranches:d,hidden:j(a)||j(s)?!0:void 0}}w="object"}}else a.allOf?(w="object",$e=ke(a.title)):typeof s.$ref=="string"&&(w="object");let ie,je;if(f<le&&!E){const S=G(a),y=x(S.__required);y.length>0&&(je=y);const h=Object.entries(S).filter(([m])=>!m.startsWith("__")&&m!=="@type");if(h.length>0){ie={};for(const[m,se]of h)ie[m]=M(se,f+1,O)}}let oe;if((w==="array"||a.type==="array")&&f<le&&!E){const S=a.items;if(S){oe=M(S,f+1,O);const y=u(S);typeof y.title=="string"&&y.title.includes("{{")&&(oe.titleBy=y.title)}}const U=S=>{const y=N?.[S];return typeof y=="string"?y:void 0},mt=()=>{if("default"in s)return s.default;if("default"in a)return a.default;if(N&&"default"in N)return N.default};return{type:w??"string",title:typeof s.title=="string"?s.title:!$e&&typeof a.title=="string"?a.title:U("title"),description:typeof s.description=="string"?s.description:typeof a.description=="string"?a.description:U("description"),default:mt(),enum:Array.isArray(a.enum)?a.enum:I??void 0,format:typeof s.format=="string"?s.format:typeof a.format=="string"?a.format:U("format"),properties:ie,required:je,items:oe,recursiveRef:E&&typeof s.$ref=="string"&&(w==="object"||w==="array"||a.type==="array")?s.$ref:void 0,hidden:j(a)||j(s)?!0:void 0,titleBy:typeof a.titleBy=="string"?a.titleBy:U("titleBy"),image:typeof a.image=="string"?a.image:U("image"),options:typeof s.options=="string"?s.options:typeof a.options=="string"?a.options:U("options")}};if("ref"in t)return M({$ref:t.ref});const Oe=l.properties??{},vt=Object.keys(Oe).every(s=>s.startsWith("__"));if(Array.isArray(l.allOf)&&l.allOf.length===1&&vt){const s=Oe.__resolveType,f=Array.isArray(s?.enum)&&typeof s.enum[0]=="string"?s.enum[0]:typeof s?.const=="string"?s.const:typeof s?.default=="string"?s.default:void 0;for(const v of l.allOf){const a=P(v);if(!(Array.isArray(a.anyOf)||Array.isArray(a.oneOf))||a.properties)continue;const E=M(a,0);if(E.type==="inline-union"&&E.inlineUnionBranches){const O=ke(E.title);return{...E,title:O?void 0:E.title,inlineUnionBranches:f?E.inlineUnionBranches.map(L=>({...L,discriminators:{...L.discriminators??{},__resolveType:f}})):E.inlineUnionBranches}}}}const Pe=G(l),re={};for(const[s,f]of Object.entries(Pe))s.startsWith("__")||s==="@type"||(re[s]=M(f,0));if(Object.keys(re).length===0)return null;const we=x(Pe.__required);return{type:"object",title:typeof l.title=="string"?l.title:void 0,properties:re,required:we.length>0?we:void 0}}function Cn(e,t){const n=t.schema??{},r=Te(e,t),i=n.$defs??n.definitions??{},o=typeof r.$ref=="string"?i[r.$ref.split("/").pop()??""]??{}:r,c=o.properties??{};if(Object.keys(c).some(T=>!T.startsWith("__")))return!1;if(o.additionalProperties===!0)return!0;const u=c.__resolveType;return!!u&&Array.isArray(u.enum)&&u.enum[0]===e}function Dn(e){const t=r=>{switch(typeof r){case"number":return{type:"number"};case"boolean":return{type:"boolean"};case"object":{if(r===null)return{type:"string"};if(Array.isArray(r))return{type:"array",items:t(r[0])};const i={};for(const[o,c]of Object.entries(r))o.startsWith("__")||(i[o]=t(c));return{type:"object",properties:i}}default:return{type:"string"}}},n={};for(const[r,i]of Object.entries(e))r.startsWith("__")||(n[r]=t(i));return Object.keys(n).length===0?null:{type:"object",properties:n}}function be(e,t){const n=t.schema??{},r=Te(e,t),i=n.$defs??n.definitions??{},o=typeof r.$ref=="string"?i[r.$ref.split("/").pop()??""]??{}:Object.keys(r).length>0?r:{...n,...r},c=o.icon,l=o.logo,u=o,T=P=>P===!0||P==="true",R=T(u.hide)||T(u.ignore)||T(u.unlisted);return{title:typeof o.title=="string"?o.title:void 0,description:typeof o.description=="string"?o.description:void 0,icon:typeof c=="string"?c:void 0,logo:typeof l=="string"?l:void 0,hidden:R||void 0}}const xt=["website/sections/Rendering/Lazy.tsx","website/sections/Rendering/SingleDeferred.tsx"],Fe="website/sections/Rendering/Lazy.tsx";function D(e){return xt.some(t=>e.endsWith(t))}const tt=["website/pages/Page.tsx","$live/pages/LivePage.tsx"],nt=new Set(tt),Ft=tt[0],Wt=new Set(["site/sections/Theme/Theme.tsx"]);function ne(e){return!!(Wt.has(e)||D(e)||e.toLowerCase().includes("preview"))}function Yt(e){const t=e.manifest?.blocks??{};for(const n of Object.values(t))for(const r of Object.keys(n))if(nt.has(r))return r;return Ft}function ue(e){if(!e)return[];if(e.anyOfRefs?.length)return e.anyOfRefs;if(e.items)return ue(e.items);if(e.properties){const t=[];for(const n of Object.values(e.properties))t.push(...ue(n));return t}return[]}function Ht(e){const t=e.manifest?.blocks??{},n=[];for(const[r,i]of Object.entries(t))if(r.includes("sections"))for(const o of Object.keys(i)){if(ne(o))continue;const c=be(o,e);n.push({resolveType:o,title:c.title??F(o),description:c.description,previewBlock:o,isSavedBlock:!1})}return n}function In(e){const t=e.manifest?.blocks??{},n=new Map;for(const[r,i]of Object.entries(t))if(r.includes("sections"))for(const o of Object.keys(i))ne(o)||n.has(o)||n.set(o,{resolveType:o,title:F(o)});return[...n.values()].sort((r,i)=>r.title.localeCompare(i.title))}function rt(e,t){const n=t.__resolveType;if(typeof n!="string")return"";if(n!==Y)return n;const r=t.variants;if(!Array.isArray(r))return n;for(const i of r){const o=i?.value;if(!o)continue;let c=o.__resolveType;if(typeof c=="string"&&D(c)&&(c=o.section?.__resolveType??c),typeof c=="string"&&ve(e,c))return c}return n}function Nt(e,t){return rt(e,t)!==t.__resolveType}function it(e,t){const n=[];for(const[r,i]of Object.entries(t)){if(r.includes("/")||me(r)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i,c=o.__resolveType;typeof c!="string"||nt.has(c)||typeof o.path=="string"||ne(c)||!(ve(e,c)||c===Y&&Nt(e,o))||n.push({resolveType:r,title:r,description:typeof o.name=="string"?o.name:void 0,previewBlock:r,isSavedBlock:!0})}return n}function Kt(e,t){const n=ee(t.resolveType),r=n?{}:be(t.resolveType,e);return{resolveType:t.resolveType,title:t.title||r.title||F(t.resolveType),description:t.description??r.description,previewBlock:t.resolveType,isSavedBlock:n}}function Un(e,t){const n=Yt(e),r=Je(n,e),i=ue(r?.properties?.sections),o=new Map,c=l=>{if(!ne(l.resolveType)){if(ee(l.resolveType)){me(l.resolveType)||o.set(l.resolveType,l);return}ve(e,l.resolveType)&&(o.has(l.resolveType)||o.set(l.resolveType,l))}};for(const l of Ht(e))c(l);for(const l of i)c(Kt(e,l));for(const l of it(e,t))c(l);return[...o.values()].sort((l,u)=>l.title.localeCompare(u.title))}function xn(e){const t=e.site;if(!t||typeof t!="object"||Array.isArray(t))return;const n=t.theme;if(!(!n||typeof n!="object"||Array.isArray(n)))return n}const Se="website/loaders/redirect.ts",Fn=new Set([Se,"website/loaders/redirects.ts"]),Wn={temporary:307,permanent:301},We=e=>typeof e=="string"?e:"",qt=e=>e==="permanent"?"permanent":"temporary";function ot(e){const t=e&&typeof e.redirect=="object"&&e.redirect!==null&&!Array.isArray(e.redirect)?e.redirect:{};return{from:We(t.from),to:We(t.to),type:qt(t.type),discardQueryParameters:t.discardQueryParameters===!0}}function zt(e){const t=[];for(const[n,r]of Object.entries(e)){if(!r||typeof r!="object"||Array.isArray(r))continue;const i=r;if(i.__resolveType!==Se)continue;const{from:o,to:c,type:l,discardQueryParameters:u}=ot(i);t.push({key:n,from:o,to:c,type:l,discardQueryParameters:u})}return t}function Yn(e){return ot(e)}function Hn(e){const t={from:e.from,to:e.to,type:e.type};return e.discardQueryParameters&&(t.discardQueryParameters=!0),{redirect:t,__resolveType:Se}}function Gt(e){return(e.split(/[?#]/)[0]??"").replace(/^\/+/,"").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,32)||"redirect"}const Qt=1e3;function Nn(e,t){const n=Gt(t);for(let r=0;r<Qt;r++){const i=`redirects-${n}-${crypto.randomUUID()}`;if(!Object.hasOwn(e,i))return i}throw new Error("Could not generate a unique redirect block key")}function Xt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6)),t=t.replace(/-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,""),t=t.replace(/-[0-9a-f]{8,}$/i,"");try{return decodeURIComponent(t)}catch{return t}}function Kn(e,t){const{pageId:n,path:r,pathTemplate:i}=t;if(n){const o=e.find(l=>l.key===n);if(o)return o;const c=e.find(l=>l.key.endsWith(`-${n}`));if(c)return c}if(i){const o=Ye(e,i);if(o)return o}if(r){const o=Ye(e,r);if(o)return o}return null}function Ye(e,t,n){const r=wt;if(n){const o=e.find(c=>c.key===n);if(o)return o}const i=e.filter(o=>r(o.path)===r(t));return i.length===0?null:i.length===1?i[0]??null:[...i].sort((o,c)=>o.key.localeCompare(c.key))[0]??null}const st=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]),q="site",at="site/apps/site.ts";function pe(e,t){return e===q?!0:t.__resolveType===at}function qn(e,t){return e?Jt(e).length>0||zt(e).length>0?!0:t?nn(e,t).length>0||en(e,t)?!0:tn(e,t).length>0:!1:!1}function Zt(e,t){if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;return typeof n.__resolveType!="string"||!st.has(n.__resolveType)||typeof n.path!="string"?null:{key:e,name:typeof n.name=="string"?n.name:Xt(e),path:n.path}}function Jt(e){const t=[];for(const[n,r]of Object.entries(e)){const i=Zt(n,r);i&&t.push(i)}return t}function ct(e,t){if(typeof t.name=="string"){const n=t.name.trim();if(n)return n}return e.replace(/[-_]/g," ").replace(/\b\w/g,n=>n.toUpperCase())}function ye(e,t,n){const r=typeof t.__resolveType=="string"?t.__resolveType:"",i=r?be(r,n):{};if(i.title)return i.title;if(typeof t.name=="string"){const o=t.name.trim();if(o)return o}return e.replace(/[-_]/g," ").replace(/\b\w/g,o=>o.toUpperCase())}function en(e,t){const n=e[q];if(n&&typeof n=="object"&&!Array.isArray(n)){const r=n,i=r.__resolveType;if(typeof i=="string"&&(pe(q,r)||Ze(t,i)))return{key:q,name:ye(q,r,t),resolveType:i}}for(const[r,i]of Object.entries(e)){if(r.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;if(!pe(r,o))continue;const c=typeof o.__resolveType=="string"?o.__resolveType:at;return{key:r,name:ye(r,o,t),resolveType:c}}return null}function tn(e,t){const n=[];for(const[r,i]of Object.entries(e)){if(r.includes("/")||!i||typeof i!="object"||Array.isArray(i))continue;const o=i,c=o.__resolveType;typeof c=="string"&&(st.has(c)||typeof o.path!="string"&&(pe(r,o)||!Ze(t,c)&&!Ut(c)||n.push({key:r,name:ye(r,o,t),resolveType:c})))}return n.sort((r,i)=>r.name.localeCompare(i.name))}function nn(e,t){return it(t,e).map(n=>{const r=e[n.resolveType],i=rt(t,r);return{key:n.resolveType,name:n.description??ct(n.resolveType,r),resolveType:i}}).sort((n,r)=>n.name.localeCompare(r.name))}const rn=new Set(["website/pages/Page.tsx","$live/pages/LivePage.tsx"]);function on(e){return e.includes("matchers")||e.includes("Match")}function lt(e,t){const n=e.__resolveType;return typeof n!="string"||!n||rn.has(n)?!1:t?Mt(t,n):on(n)}function zn(e,t){const n=[];for(const[r,i]of Object.entries(t)){if(r.includes("/")||!ee(r)||me(r)||!i||typeof i!="object"||Array.isArray(i))continue;const o=i;lt(o,e)&&n.push({blockKey:r,matcherResolveType:o.__resolveType??"",name:typeof o.name=="string"?o.name:void 0})}return n.sort((r,i)=>(r.name??r.blockKey).localeCompare(i.name??i.blockKey))}function z(e,t,n){if(!e)return!1;const r=e.__resolveType;if(typeof r!="string"||!ee(r)||!Object.hasOwn(t,r))return!1;const i=t[r];return!i||typeof i!="object"||Array.isArray(i)?!1:lt(i,n)}function Gn(e,t,n){return z(e,t,n)?e?.__resolveType??null:null}function ft(e,t,n){if(!e)return null;const r=e.__resolveType??"";if(!r)return null;if(z(e,t,n)){const c=t[r]??{},l=c.__resolveType??r,{__resolveType:u,name:T,...R}=c;return{resolveType:l,data:R,blockKey:r}}const{__resolveType:i,...o}=e;return{resolveType:r,data:o}}function sn(e,t,n){const r=ft(e,t,n);return r?{__resolveType:r.resolveType,...r.data}:{__resolveType:""}}function Qn(e,t,n){if(e)return z(e,t,n)?sn(e,t,n):e}function an(e,t,n,r){if(!e)return"Default";if(z(e,t,r)){const i=e.__resolveType??"",o=t[i];return ct(i,o)}return n(e)}function Xn(e,t,n){return{__resolveType:e,...t,name:n}}function Zn(e){return{__resolveType:e}}function Jn(e,t,n){const r=ft(e,t,n);return r?{resolveType:r.resolveType,formValue:r.data}:{resolveType:"",formValue:{}}}function er(e,t){const n={__resolveType:e};if(!e||!t)return n;const r=Je(e,t),i=r?.type==="inline-union"?r.inlineUnionBranches?.[0]?.discriminators:void 0;return i?{...n,...i}:n}function ut(e){const t=e.__resolveType??"";return D(t)?e.section??e:e}function Z(e){const i=(D(e.__resolveType??"")?e.section:e)?.variants?.[0];return i?.rule?.__resolveType!==Ge?null:i?.value??null}function tr(e){const t=ut(e);return{__resolveType:Y,variants:[{value:t,rule:{__resolveType:Ge}}]}}function nr(e){const t=e.__resolveType??"";if(!t)return null;if(D(t))return e.section??null;const n=Z(e);return n?D(n.__resolveType??"")?n:{__resolveType:Fe,section:ut(n)}:{__resolveType:Fe,section:e}}function Q(e){const t=e.__resolveType??"";if(!t)return null;if(D(t)){const n=e.section,r=n?.__resolveType??"";return!r||!n?null:{resolveType:r,data:n}}return{resolveType:t,data:e}}function rr(e){const t=Z(e);if(t)return Q(t);if(D(e.__resolveType??"")){const r=e.section;if(!r)return null;const i=Z(r);return Q(i||r)}return Q(e)}function ir(e){return Z(e)}const cn=["website/matchers/always.ts","$live/matchers/MatchAlways.ts"];function pt(e){if(!e)return!1;const t=e.__resolveType??"";return t===""?Object.keys(e).length===0:cn.includes(t)||t.includes("always")}function ln(e){const t=e.variants??[];if(t.length===0)return-1;const n=t.findIndex(r=>pt(r.rule));return n!==-1?n:t.length-1}function or(e,t,n){const r=n.variants??[];if(r.length===0)return null;const i=ln(n),o=r[i]?.value;if(!o)return null;const c=structuredClone(o);return t.isLazy?{...e,section:c}:c}function yt(e,t){return t.isMultivariate?t.isLazy?e.section??null:e:null}function sr(e,t){return Array.isArray(e.variants)?e.variants.map((n,r)=>({label:t(n.rule)||`Variant ${r+1}`,value:n.value??{},rule:n.rule})):[]}function ar(e,t){const n=e.__resolveType??"";if(!n)return null;if(D(n)){const r=e.section??e,i=r.__resolveType??n;if(!i.includes("/")&&i in t){const o=t[i]??{};return{data:{...o},resolveType:o.__resolveType??i}}return{data:{...r},resolveType:i}}if(!n.includes("/")&&n in t){const r=t[n]??{};return{data:{...r},resolveType:r.__resolveType??n}}return{data:{...e},resolveType:n}}function fn(e,t){const n=e.__resolveType??"";return D(n)?{...e,section:t}:t}function un(e,t,n){return t.isLazy?{...e,section:n}:n}function cr(e,t,n){const r=[...e.variants??[]],i=r[t];if(!i)return e;const o=i.value??{};return r[t]={...i,value:fn(o,n)},{...e,variants:r}}function lr(e,t,n){const r=[...e.variants??[]];return r[t]?(r[t]={...r[t],rule:n},{...e,variants:r}):e}function fr(e,t){const n=[...e.variants??[]],r=n[t];return r?(n.splice(t+1,0,structuredClone(r)),{...e,variants:n}):e}function ur(e,t,n){const r=[...e.variants??[]];if(t===n||t<0||n<0||t>=r.length||n>=r.length)return e;const[i]=r.splice(t,1);return i?(r.splice(n,0,i),{...e,variants:r}):e}function pr(e,t){const n=[...e.variants??[]];return n.length<=1?null:(n.splice(t,1),{...e,variants:n})}function de(e){return{rule:_e(),value:structuredClone(e)}}function dt(e,t){return{...t,__resolveType:Y,variants:e}}function yr(e){return e.isHidden!==!0&&e.isSavedBlock!==!0}function pn(e,t){if(t.isHidden)return null;if(t.isMultivariate){const r=yt(e,t)?.variants??[],i=r[r.length-1]?.value;return i?structuredClone(i):null}if(t.isLazy){const n=e.section;return n?structuredClone(n):null}return structuredClone(e)}function yn(e,t,n){if(t.isMultivariate||t.isHidden)return null;const r=pn(e,t);if(!r)return null;const i=dt([de(r),de(r)]);return t.isLazy?{...e,section:i}:i}function dr(e,t,n){if(t.isHidden||t.isSavedBlock)return null;if(t.isMultivariate){const i=yt(e,t);if(!i)return null;const o=i.variants??[],c=o[o.length-1]?.value;if(!c)return null;const l=dt([...o,de(c)],i);return{section:un(e,t,l),newVariantIndex:o.length}}const r=yn(e,t);return r?{section:r,newVariantIndex:1}:null}function dn(e){return e.anyOfRefs?.some(t=>t.resolveType!==te?!1:t.schema?.properties?.variants?.items?.properties?.value?.type==="array")??!1}function gr(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return t.__resolveType===Y&&Array.isArray(t.variants)}function gt(e){return!e||typeof e!="object"||Array.isArray(e)?!1:e.__resolveType===te}function vr(e){if(!gt(e))return null;const t=e.variants;if(!Array.isArray(t))return null;const n=t[0]?.value;return Array.isArray(n)?n:null}function mr(e,t){if(!gt(e))return t;const n=structuredClone(e),r=[...n.variants??[]];return r.length===0?r.push({rule:_e(),value:t}):r[0]={...r[0],value:t},{...n,variants:r}}function _r(e,t){const r=e[t]?.sections;if(!r||Array.isArray(r))return 1;const i=r;return Array.isArray(i.variants)?i.variants.length:1}function hr(e,t,n){const i=e[t]?.sections;if(Array.isArray(i))return n===0?i:[];if(i&&typeof i=="object"){const o=i.variants;if(Array.isArray(o)){const c=o[n];return Array.isArray(c?.value)?c.value:[]}}return[]}function Ar(e,t,n){if(Array.isArray(e))return[{label:"Default",sections:e}];if(e&&typeof e=="object"){const r=e;if(Array.isArray(r.variants)){const i=r.variants,o=i.map(u=>an(u.rule,t,n)),c=o.reduce((u,T)=>(u[T]=(u[T]??0)+1,u),{}),l={};return i.map((u,T)=>{const R=o[T]??`Variant ${T+1}`,P=c[R]??1;let H=R;return P>1&&(l[R]=(l[R]??0)+1,H=`${R} ${l[R]}`),{label:H||`Variant ${T+1}`,sections:Array.isArray(u.value)?u.value:[],rule:u.rule}})}}return[]}function K(e){return{rule:_e(),value:e}}function W(e,t){return{...t,__resolveType:te,variants:e}}function Tr(e,t){const n=structuredClone(t);if(Array.isArray(e))return W([K(e),K(n)]);if(e&&typeof e=="object"){const r=e;return Array.isArray(r.variants)?W([...r.variants,K(n)],r):null}return W([K([]),K(n)])}function br(e){const t=e.variants;return Array.isArray(t)?t.length-1:1}function Sr(e,t){const n=e[t];if(!n)return null;const r=[...e];return r.splice(t+1,0,structuredClone(n)),r}function Rr(e,t){if(t.length===0)return W([],e);if(t.length===1){const n=t[0],r=n?.rule;if(!pt(r))return W(t,e);if(Array.isArray(n?.value))return n.value}return W(t,e)}function gn(e,t,n){const r=[];for(const[o,c]of Object.entries(e))o!==t&&r.push(c);const i=new Set;for(;r.length>0;){const o=r.pop();if(!(!o||typeof o!="object")&&!i.has(o)){if(i.add(o),Array.isArray(o)){for(const c of o)r.push(c);continue}n(o);for(const c of Object.values(o))r.push(c)}}}function Er(e,t,n){if(!t)return 0;let r=0;return gn(e,t,i=>{i.__resolveType===t&&z(i,e,n)&&r++}),r}function X(e){return e.includes("/sections/")||e.includes("multivariate/section")||e===Y}function vn(e){if(e.type==="block-ref"&&e.anyOfRefs?.length)return e.anyOfRefs.some(n=>X(n.resolveType));if(e.anyOfRefs?.length)return e.anyOfRefs.some(n=>X(n.resolveType));const t=e.properties?.__resolveType;return t?.type==="block-ref"&&t.anyOfRefs?.length?t.anyOfRefs.some(n=>X(n.resolveType)):!1}function kr(e){return e.type!=="block-ref"||!e.anyOfRefs?.length?!1:e.anyOfRefs.some(t=>X(t.resolveType))}function Or(e,t){if(t==="global"||t==="sections"||dn(e))return!0;const n=e.type==="array"?e.items:void 0;return n?vn(n):!1}const Pr={claiming:{long:"Reserving sandbox",short:"Reserving sandbox"},"waiting-for-capacity":{long:"Waiting for cluster capacity",short:"Waiting for capacity"},"pulling-image":{long:"Downloading sandbox image",short:"Downloading image"},"starting-container":{long:"Starting your sandbox",short:"Starting container"},"warming-daemon":{long:"Connecting to your sandbox",short:"Connecting to sandbox"}};export{jn as $,Ot as A,kt as B,Pr as C,Ft as D,Kn as E,zt as F,Vn as G,In as H,en as I,_r as J,Tr as K,Nn as L,Hn as M,Ge as N,Rn as O,ee as P,te as Q,Wn as R,at as S,Y as T,F as U,Rt as V,Fn as W,me as X,Mn as Y,Ie as Z,Ue as _,Xt as a,Lt as a0,dn as a1,Bn as a2,Ln as a3,Or as a4,zn as a5,sn as a6,Zn as a7,Qn as a8,ue as a9,ur as aA,un as aB,or as aC,pr as aD,fr as aE,lr as aF,nr as aG,ir as aH,tr as aI,Rr as aJ,Er as aK,cr as aL,ln as aM,Sr as aN,xn as aO,Yn as aP,Ar as aa,kr as ab,Un as ac,_e as ad,pt as ae,an as af,Gn as ag,Jn as ah,z as ai,Xn as aj,er as ak,gr as al,gt as am,vr as an,mr as ao,Cn as ap,Dn as aq,Sn as ar,rr as as,yr as at,yt as au,sr as av,ar as aw,ft as ax,dr as ay,br as az,X as b,D as c,kn as d,Pn as e,$n as f,ct as g,qn as h,pe as i,Jt as j,nn as k,Ye as l,hr as m,wt as n,Yt as o,Zt as p,Et as q,Je as r,wn as s,be as t,Tn as u,On as v,Ut as w,ye as x,bn as y,En as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as E,j as t,B as K,h as G,av as Ze,aw as re,b as W,E as Ee,r as A,X as fe,d8 as Ge,d7 as Oe,au as et,n as Re,l as Y,bg as tt,al as st,u as ot,L as se,t as lt,f as he,bZ as Me}from"./index-D_7jfHk6.js";import{E as Fe}from"./empty-state-DnQ_qEjI.js";import{u as ge}from"./use-mcp-client-MUIIizLf.js";import{F as ae,a as nt,b as ce,d as de}from"./form-BBtB5neb.js";import{I as pe}from"./input-B0doV0os.js";import{T as xe}from"./textarea-DaHaRA0Z.js";import{D as je,O as it,M as rt}from"./index-CeMEs5dC.js";import{aB as at,aa as ct,by as dt,M as mt,S as ut,T as pt,aV as xt,K as ye}from"./agent-icon-CnnNyirr.js";import{M as ft}from"./mcp-app-renderer-D5zA7BfR.js";import{g as ht,M as we}from"./types-Blm6OQRg.js";import{a as gt,b as jt,A as bt}from"./alert-CGA3Ty0D.js";import{S as Ce,b as Ie,a as Te,d as $e,c as me}from"./select-CZdnCwuC.js";import{c as Nt,b as Pe,T as ke,a as De}from"./tooltip-BULKkf4A.js";import{i as vt}from"./AlertCircle-C3fpFT5I.js";import{a as St}from"./Copy01-Dx3ZT0bA.js";import{i as yt}from"./Play-CzTcIQz_.js";import{g as wt}from"./connection-slug-CITJ0kGN.js";import{u as Ct,T as It}from"./use-mcp-auth-status-B-gyzfqG.js";import{a as ze,u as Be}from"./use-connection-5LUEsGlJ.js";import{u as Tt}from"./use-mcp-tools-CPLGkZB5.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Ae}from"./integration-icon-BM3EOzpn.js";import{e as Pt,q as kt}from"./chat-context-UMp8QwjT.js";import{a as Dt}from"./shell-layout-B0-NcUCt.js";import{M as At}from"./monaco-editor-BfKI4VlA.js";import{E as Et}from"./empty-state-D45gZaZ-.js";import{n as Ot}from"./LinkBroken01-kK_na_OL.js";import"./auth-Cps-90jQ.js";import"./label-DxOPcXJe.js";import"./Key01-BHiUNW_5.js";import"./extract-connection-data-Q_j_fmQx.js";import"./metadata-D72DunRR.js";import"./connection-FKmTBjan.js";import"./url-slug-d-Er1jOR.js";import"./Plus-nldAzVeQ.js";import"./index-CoDuotD7.js";import"./index-KqttCHw1.js";import"./index-BdQq_4o_.js";import"./index-DltLvtZg.js";import"./popover-C2vJrXky.js";import"./repository-binding-DpX8yLri.js";import"./SearchMd-BiZNveM1.js";import"./use-mobile-DF1FX6Xv.js";import"./use-create-virtual-mcp-DzmQH3J8.js";import"./use-navigate-to-agent-p65xWFDF.js";import"./thread-intent-Cxso0qKW.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BXtoXPGx.js";import"./task-board-ChFrokIN.js";import"./schema-D1veJPjJ.js";import"./slugify-CEUa2lfQ.js";import"./Tool01-Blw6F5iV.js";import"./ArrowUp-DR-Jhbl1.js";import"./ArrowLeft-C1IFj0Ic.js";import"./ShoppingBag01-o0DdjJD9.js";import"./ZoomOut-CQckFmS9.js";import"./Building02-uHT4KVtK.js";import"./CheckCircle-BKHstO_Q.js";import"./ChevronUp-CceLPRrE.js";import"./ChevronSelectorVertical-DAO6R1Op.js";import"./UserSquare-BMOlWqCu.js";import"./CreditCard01-Dko0T335.js";import"./DotsVertical-aHYBPlin.js";import"./Image01-Cxa392ef.js";import"./Globe04-BDe-0jS0.js";import"./SwitchHorizontal01-Bx3d-jDI.js";import"./Link01-BRZRc4wX.js";import"./LinkExternal01-CILXo-bC.js";import"./Monitor01-Cl4JLYVa.js";import"./Sun-BYGxydmh.js";import"./Trash01-DAoFHSpp.js";import"./Upload01-CtKBhqsv.js";import"./User01-Awky2MVQ.js";import"./Users01-D7ZFKC4W.js";import"./XClose-DBJ7sD1T.js";import"./X-DzPShgV5.js";import"./index-D1CuHcEn.js";import"./badge-CKM84j2S.js";import"./mcp-oauth-C5T-IVs8.js";import"./use-panel-navigate-C4UE8Qkr.js";import"./thread-route-CW2be8Kx.js";import"./use-project-scope-BMVXwaQ4.js";import"./autosend-BQ3F90GX.js";import"./use-decopilot-events-uItZ_pJe.js";import"./use-ai-providers-C1bb7SnA.js";import"./use-chat-navigation-BF9opsK8.js";import"./location-BjlyegC2.js";import"./use-organization-settings-CB0-LYjl.js";import"./avatar-TL9HUab0.js";import"./use-clock-tick-DGTQe72H.js";import"./dialog-DRpbbWU1.js";import"./command-Doiz3O29.js";import"./project-icon-DU1uywdD.js";import"./new-project-dialog-CXEwhrv6.js";import"./repository-import-picker-CO5nKRxA.js";import"./repository-picker-C2HnHK1A.js";import"./useInfiniteQuery-eYXaZ_bo.js";import"./infiniteQueryObserver-DG8sBe4B.js";import"./collection-search-BoB9COGX.js";import"./use-debounced-value-DCB8Le0h.js";import"./required-auth-layout-CDif9NZC.js";import"./use-org-sso-BEGhJLya.js";import"./editor-CPkkN1Zr.js";function Rt(s){const e=E.c(15),{onSave:n,onUndo:o,isDirty:l,isSaving:i,saveLabel:a,undoLabel:c}=s,d=a===void 0?"Save":a,r=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==o||e[3]!==r?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:o,disabled:i,"aria-label":r,children:[x,r]}),e[1]=i,e[2]=o,e[3]=r,e[4]=h):h=e[4];let u;e[5]!==i?(u=i?t.jsx(G,{className:"size-3.5"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=u):u=e[6];let g;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==u?(g=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[u,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=u,e[11]=g):g=e[11];let p;return e[12]!==h||e[13]!==g?(p=t.jsxs(t.Fragment,{children:[h,g]}),e[12]=h,e[13]=g,e[14]=p):p=e[14],p}Ze({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Mt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(o=>o==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function Ft(s){const e=E.c(43),{form:n}=s,o=W();let l;e[0]!==o?(l=o("details.prompt.details"),e[0]=o,e[1]=l):l=e[1];let i;e[2]!==l?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:l}),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==o?(a=C=>{const{field:b}=C;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...b,placeholder:o("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=o,e[5]=a):a=e[5];let c;e[6]!==n.control||e[7]!==a?(c=t.jsx(ae,{control:n.control,name:"title",render:a}),e[6]=n.control,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==o?(d=C=>{const{field:b}=C;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:o("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...b,value:b.value??"",placeholder:o("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=o,e[10]=d):d=e[10];let r;e[11]!==n.control||e[12]!==d?(r=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=r):r=e[13];let x;e[14]!==c||e[15]!==r?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,r]}),e[14]=c,e[15]=r,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let u;e[20]!==o?(u=o("details.prompt.message"),e[20]=o,e[21]=u):u=e[21];let g;e[22]!==u?(g=t.jsx("div",{className:"text-sm font-medium text-foreground",children:u}),e[22]=u,e[23]=g):g=e[23];let p;e[24]!==o?(p=o("details.prompt.messageDescription"),e[24]=o,e[25]=p):p=e[25];let j;e[26]!==p?(j=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=j):j=e[27];let N;e[28]!==o?(N=C=>{const{field:b}=C;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...b,value:b.value??"",placeholder:o("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=o,e[29]=N):N=e[29];let v;e[30]!==n.control||e[31]!==N?(v=t.jsx(ae,{control:n.control,name:"body",render:N}),e[30]=n.control,e[31]=N,e[32]=v):v=e[32];let y;e[33]!==g||e[34]!==j||e[35]!==v?(y=t.jsxs("div",{className:"flex flex-col gap-2",children:[g,j,v]}),e[33]=g,e[34]=j,e[35]=v,e[36]=y):y=e[36];let w;e[37]!==y||e[38]!==h?(w=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[h,y]}),e[37]=y,e[38]=h,e[39]=w):w=e[39];let P;return e[40]!==n||e[41]!==w?(P=t.jsx(nt,{...n,children:w}),e[40]=n,e[41]=w,e[42]=P):P=e[42],P}function zt(s){const e=E.c(42),{providerId:n,promptId:o}=s,l=W(),{org:i}=fe(),a=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==a?(c={connectionId:a,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=a,e[3]=c):c=e[3];const d=ge(c),r=Ge(n,"PROMPT",o,d),x=Oe(n,"PROMPT",d),h=x.update.isPending;let u;e[4]!==r?(u=r?{title:r.title,description:r.description??null,body:ue(r)}:void 0,e[4]=r,e[5]=u):u=e[5];let g;e[6]!==u?(g={values:u},e[6]=u,e[7]=g):g=e[7];const p=et(g);let j;e[8]!==p||e[9]!==r?(j=()=>{r&&p.reset({title:r.title,description:r.description??null,body:ue(r)})},e[8]=p,e[9]=r,e[10]=j):j=e[10];const N=j;let v;e[11]!==x.update||e[12]!==p||e[13]!==o?(v=p.handleSubmit(async I=>{const T=await x.update.mutateAsync({id:o,data:{title:I.title,description:I.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:I.body}}]}});p.reset({title:T.title,description:T.description??null,body:ue(T)})}),e[11]=x.update,e[12]=p,e[13]=o,e[14]=v):v=e[14];const y=v;if(!r){let I;e[15]!==l?(I=l("details.prompt.notFoundTitle"),e[15]=l,e[16]=I):I=e[16];let T;e[17]!==l?(T=l("details.prompt.notFoundDescription"),e[17]=l,e[18]=T):T=e[18];let R;return e[19]!==I||e[20]!==T?(R=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:I,description:T})}),e[19]=I,e[20]=T,e[21]=R):R=e[21],R}let w;e[22]!==y?(w=()=>{y()},e[22]=y,e[23]=w):w=e[23];let P;e[24]!==p.formState.isDirty||e[25]!==h||e[26]!==N||e[27]!==w?(P=t.jsx(Rt,{onSave:w,onUndo:N,isDirty:p.formState.isDirty,isSaving:h}),e[24]=p.formState.isDirty,e[25]=h,e[26]=N,e[27]=w,e[28]=P):P=e[28];let C;e[29]!==r.title||e[30]!==P?(C=t.jsx(Re.Title,{actions:P,children:r.title}),e[29]=r.title,e[30]=P,e[31]=C):C=e[31];let b;e[32]!==r.description?(b=r.description&&t.jsx("p",{className:"px-4 py-3 text-sm text-muted-foreground",children:r.description}),e[32]=r.description,e[33]=b):b=e[33];let k;e[34]!==b||e[35]!==C?(k=t.jsxs(t.Fragment,{children:[C,b]}),e[34]=b,e[35]=C,e[36]=k):k=e[36];let D;e[37]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(Ft,{form:p})}),e[37]=p,e[38]=D):D=e[38];let O;return e[39]!==k||e[40]!==D?(O=t.jsxs(je,{children:[k,D]}),e[39]=k,e[40]=D,e[41]=O):O=e[41],O}function Bt(s){const e=E.c(10),{itemId:n}=s,o=W();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Mt(),e[0]=l):l=e[0];const i=l;if(!i){let c;e[1]!==o?(c=o("details.prompt.notFoundTitle"),e[1]=o,e[2]=c):c=e[2];let d;e[3]!==o?(d=o("details.prompt.missingConnectionDescription"),e[3]=o,e[4]=d):d=e[4];let r;return e[5]!==c||e[6]!==d?(r=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=r):r=e[7],r}let a;return e[8]!==n?(a=t.jsx(Ee,{children:t.jsx(A.Suspense,{fallback:null,children:t.jsx(zt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=a):a=e[9],a}function Le(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("min-w-0 overflow-hidden",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function Ue(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden text-muted-foreground",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function X(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function oe(s){const e=E.c(10);let n,o,l;e[0]!==s?({asChild:n,className:o,...l}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=l):(n=e[1],o=e[2],l=e[3]);const i=n?tt:"a";let a;e[4]!==o?(a=Y("hover:text-foreground transition-colors truncate",o),e[4]=o,e[5]=a):a=e[5];let c;return e[6]!==i||e[7]!==l||e[8]!==a?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=i,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function _e(s){const e=E.c(8);let n,o;e[0]!==s?({className:n,...o}=s,e[0]=s,e[1]=n,e[2]=o):(n=e[1],o=e[2]);let l;e[3]!==n?(l=Y("text-foreground font-medium truncate",n),e[3]=n,e[4]=l):l=e[4];let i;return e[5]!==o||e[6]!==l?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...o}),e[5]=o,e[6]=l,e[7]=i):i=e[7],i}function le(s){const e=E.c(12);let n,o,l;e[0]!==s?({children:n,className:o,...l}=s,e[0]=s,e[1]=n,e[2]=o,e[3]=l):(n=e[1],o=e[2],l=e[3]);let i;e[4]!==o?(i=Y("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",o),e[4]=o,e[5]=i):i=e[5];let a;e[6]!==n?(a=n??t.jsx(st,{}),e[6]=n,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==i||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...l,children:a}),e[8]=l,e[9]=i,e[10]=a,e[11]=c):c=e[11],c}const Lt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=E.c(12),{toolName:n,connectionId:o,siblings:l,onSelectInstance:i,onBack:a}=s,c=W();let d;e[0]!==o?(d={connectionId:o},e[0]=o,e[1]=d):d=e[1];const r=Ct(d);if(!r.isAuthenticated){let u;return e[2]!==r.supportsOAuth||e[3]!==a||e[4]!==c?(u=t.jsx("div",{className:"flex h-full items-center justify-center",children:r.supportsOAuth?t.jsx(it,{onAuthenticate:()=>a(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=r.supportsOAuth,e[3]=a,e[4]=c,e[5]=u):u=e[5],u}const x=`${o}:${n}`;let h;return e[6]!==o||e[7]!==i||e[8]!==l||e[9]!==x||e[10]!==n?(h=t.jsx(_t,{toolName:n,connectionId:o,siblings:l,onSelectInstance:i},x),e[6]=o,e[7]=i,e[8]=l,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function _t({toolName:s,connectionId:e,siblings:n,onSelectInstance:o}){const l=W(),{replayId:i}=ot({strict:!1}),a=(()=>{if(!i)return null;const m=`replay-${i}`,f=sessionStorage.getItem(m);if(!f)return null;sessionStorage.removeItem(m);try{return JSON.parse(f)}catch{return null}})(),c=(()=>{if(!a)return null;const m={};for(const[f,$]of Object.entries(a))$!==null&&typeof $=="object"?m[f]=JSON.stringify($,null,2):m[f]=$;return m})(),[d,r]=A.useState(c??{}),[x,h]=A.useState(a?JSON.stringify(a,null,2):"{}"),[u,g]=A.useState(null),[p,j]=A.useState(null),[N,v]=A.useState(null),[y,w]=A.useState(null),[P,C]=A.useState(!1),[b,k]=A.useState(null),{org:D}=fe(),O=ze(e),I=Pt(),T=kt(),{openSidePanel:R}=Dt(),U=`${e}:${s}`,F=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),_=Tt({client:F}),S=_.data?.tools?.find(m=>m.name===s),M=ht(S?._meta),V=m=>{if(!I)return;const f=$t(m.content);f.content.length>0&&(R(),I.sendMessage({tiptapDoc:f}))},[z,B]=A.useState("json"),[q,Q]=A.useState(!1);M&&!q&&(B("ui"),Q(!0));const J=S?.inputSchema?.properties,be=J?Object.keys(J):[],Z=be.length>0,ee={};if(Z&&S?.inputSchema?.properties)for(const m of be)ee[m]=S.inputSchema.required?.includes(m)?"":void 0;const ne=m=>Object.prototype.hasOwnProperty.call(d,m),Je=async()=>{C(!0),w(null),g(null),j(null),v(null),k(null);const m=performance.now();try{if(!F)throw new Error("MCP client is not available");const f=Z?{...ee,...d}:(()=>{const L=x.trim();if(!L)return{};const H=JSON.parse(L);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();Z&&S?.inputSchema?.properties&&Object.entries(S.inputSchema.properties).forEach(([L,H])=>{if((H.type==="object"||H.type==="array")&&typeof f[L]=="string")try{f[L]=JSON.parse(f[L])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof f[L]=="string"&&f[L]!==""){const Se=Number(f[L]);Number.isNaN(Se)||(f[L]=Se)}});const $=await F.callTool({name:s,arguments:f}),te=$.structuredContent??$,Qe=performance.now(),Xe=Math.round(Qe-m);g(te),j($),v(f);const Ye=JSON.stringify(te),ve=new TextEncoder().encode(Ye).length;k({duration:`${Xe}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(f){const $=f instanceof Error?f.message:String(f);w($||"Unknown error occurred");const te=performance.now();k({duration:`${Math.round(te-m)}ms`})}finally{C(!1)}},ie=(m,f)=>{r($=>({...$,[m]:f}))},Ve=()=>{g(null),j(null),v(null),w(null),k(null)},qe=S?.name??Lt(s),He=t.jsx(Le,{children:t.jsxs(Ue,{children:[t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections",params:{org:D.slug},children:l("details.tool.connections")})})}),t.jsx(le,{}),O&&t.jsxs(t.Fragment,{children:[t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:wt(O)},search:{tab:"tools"},children:O.title})})}),t.jsx(le,{})]}),t.jsx(X,{children:t.jsx(_e,{children:qe})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:o,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(Te,{})}),t.jsx($e,{children:n.map(m=>t.jsx(me,{value:m.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ae,{icon:m.icon,name:m.title,size:"xs",className:"shrink-0"}),m.title]})},m.id))})]}),Ke=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:l("details.tool.parameters")}),S?.inputSchema?.required&&S.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",l("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Z&&S?.inputSchema?.properties?Object.entries(S.inputSchema.properties).map(([m,f])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[m,S.inputSchema?.required?.includes(m)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:f.type})]}),f.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:f.description}),f.type==="object"||f.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(m)?d[m]??"":ee[m]??"",onChange:$=>ie(m,$.target.value),placeholder:l("details.tool.enterAsJson",{key:m}),rows:3}):f.type==="boolean"?t.jsxs(Ce,{value:ne(m)?String(d[m]??""):"",onValueChange:$=>ie(m,$==="true"),children:[t.jsx(Ie,{children:t.jsx(Te,{placeholder:l("details.tool.selectTrueOrFalse")})}),t.jsxs($e,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(m)?d[m]??"":ee[m]??"",onChange:$=>ie(m,$.target.value),placeholder:l("details.tool.enter",{key:m})})]},m)):S?.inputSchema&&!Z?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:l("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:m=>h(m.target.value),placeholder:l("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:l("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),l("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Je,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),l("details.tool.executeTool")]})})]}),We=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:l("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(pt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),M&&t.jsx(Nt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>B("ui"),children:t.jsx(xt,{size:14})})}),t.jsx(De,{children:l("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:z==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>B("json"),children:t.jsx(ye,{size:14})})}),t.jsx(De,{children:l("details.tool.jsonView")})]})]})})]})]}),y&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(gt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(vt,{className:"h-4 w-4"}),t.jsx(jt,{className:"mb-0",children:l("details.tool.executionFailed")})]}),t.jsx(bt,{className:"text-xs text-destructive",children:y})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:M&&z==="ui"&&F?t.jsx(A.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(G,{className:"size-4"}),t.jsx("span",{className:"text-sm",children:l("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:M,toolInfo:S?{tool:S}:void 0,toolInput:N??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:F,onMessage:V,onUpdateModelContext:m=>T?.setAppContext(U,m),onTeardown:()=>T?.clearAppContext(U),className:"h-full"})}):u?t.jsxs(t.Fragment,{children:[t.jsx(At,{code:JSON.stringify(u,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(u,null,2)),lt.success(l("details.tool.copiedToClipboard"))},children:t.jsx(St,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:l("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{leading:He,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Ae,{icon:O?.icon||null,name:O?.title||s,size:"xl",className:"shrink-0"}),t.jsx(Re.Title,{children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[_.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):_.isLoading?t.jsx(G,{className:"size-[10px] text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:_.isSuccess?"ready":_.isLoading?"connecting":"error"})]}),t.jsx(It,{annotations:S?.annotations,_meta:S?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:S?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:l("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Ke}),We]})})]})})}function Jt(s){const e=E.c(21),{itemId:n,siblings:o,onBack:l}=s,i=W(),[a,c]=A.useState(o[0]?.id??"");let d;e[0]!==a||e[1]!==o?(d=o.find(p=>p.id===a)?.id??o[0]?.id??"",e[0]=a,e[1]=o,e[2]=d):d=e[2];const r=d;if(!ze(r||void 0)||!r){let p;e[3]!==i?(p=i("details.tool.connectionNotFound"),e[3]=i,e[4]=p):p=e[4];let j;e[5]!==p?(j=t.jsx("h3",{className:"text-lg font-semibold",children:p}),e[5]=p,e[6]=j):j=e[6];let N;e[7]!==i?(N=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=N):N=e[8];let v;e[9]!==N?(v=t.jsx("p",{className:"text-sm text-muted-foreground",children:N}),e[9]=N,e[10]=v):v=e[10];let y;return e[11]!==j||e[12]!==v?(y=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[j,v]})}),e[11]=j,e[12]=v,e[13]=y):y=e[13],y}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(G,{className:"size-8 text-muted-foreground"})}),e[14]=h):h=e[14];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=p=>A.startTransition(()=>c(p)),e[15]=u):u=e[15];let g;return e[16]!==r||e[17]!==l||e[18]!==o||e[19]!==n?(g=t.jsx(A.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:r,siblings:o,onSelectInstance:u,onBack:l})}),e[16]=r,e[17]=l,e[18]=o,e[19]=n,e[20]=g):g=e[20],g}const Vt={prompt:Bt};function qt(){const s=E.c(9),e=Me();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=he(n),l=decodeURIComponent(o.itemId);let i;s[1]!==o.appSlug?(i={slug:o.appSlug},s[1]=o.appSlug,s[2]=i):i=s[2];const a=Be(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,r=Ht;let x;return s[5]!==d||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:d,onUpdate:r}),s[5]=d,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Ht(s){return Promise.resolve()}function Kt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Wt(){const s=E.c(52),e=Me();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const o=he(n),l=W(),i=decodeURIComponent(o.collectionName),a=decodeURIComponent(o.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:r}=fe();let x;s[3]!==o.appSlug?(x={slug:o.appSlug},s[3]=o.appSlug,s[4]=x):x=s[4];const u=Be(x)[0]??null,g=u?.id??"",p=g||"no-connection",j=g??null;let N;s[5]!==r.id||s[6]!==r.slug||s[7]!==j?(N={connectionId:j,orgId:r.id,orgSlug:r.slug},s[5]=r.id,s[6]=r.slug,s[7]=j,s[8]=N):N=s[8];const v=ge(N),y=Oe(p,i,v);let w;s[9]!==y||s[10]!==a?(w=async J=>{a&&await y.update.mutateAsync({id:a,data:J})},s[9]=y,s[10]=a,s[11]=w):w=s[11];const P=w;let C;s[12]!==i?(C=i?.toLowerCase(),s[12]=i,s[13]=C):C=s[13];const b=C,k=b&&Vt[b];let D;s[14]!==i?(D=Kt(i),s[14]=i,s[15]=D):D=s[15];const O=D;let I;s[16]!==r.slug?(I=t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections",params:{org:r.slug},children:"Connections"})})}),s[16]=r.slug,s[17]=I):I=s[17];let T;s[18]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(le,{}),s[18]=T):T=s[18];let R;s[19]!==i||s[20]!==u||s[21]!==r.slug||s[22]!==o.appSlug?(R=u&&t.jsxs(t.Fragment,{children:[t.jsx(X,{children:t.jsx(oe,{asChild:!0,children:t.jsx(se,{to:"/$org/settings/connections/$appSlug",params:{org:r.slug,appSlug:o.appSlug},search:{tab:i},children:u.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=u,s[21]=r.slug,s[22]=o.appSlug,s[23]=R):R=s[23];let U;s[24]!==O?(U=t.jsx(X,{children:t.jsx(_e,{children:O})}),s[24]=O,s[25]=U):U=s[25];let F;s[26]!==R||s[27]!==U||s[28]!==I?(F=t.jsx(Le,{children:t.jsxs(Ue,{children:[I,T,R,U]})}),s[26]=R,s[27]=U,s[28]=I,s[29]=F):F=s[29];const _=F;if(k){let J;return s[30]!==k||s[31]!==d||s[32]!==P||s[33]!==a?(J=t.jsx(k,{itemId:a,onBack:d,onUpdate:P}),s[30]=k,s[31]=d,s[32]=P,s[33]=a,s[34]=J):J=s[34],J}let S;s[35]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Ot,{size:36,className:"text-muted-foreground"}),s[35]=S):S=s[35];let M;s[36]!==l?(M=l("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=l,s[37]=M):M=s[37];let V;s[38]!==l?(V=l("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=l,s[39]=V):V=s[39];let z;s[40]!==l?(z=l("orgs.collectionDetail.goBackButton"),s[40]=l,s[41]=z):z=s[41];let B;s[42]!==d||s[43]!==z?(B={onClick:d,children:z},s[42]=d,s[43]=z,s[44]=B):B=s[44];let q;s[45]!==M||s[46]!==V||s[47]!==B?(q=t.jsx(Et,{icon:S,title:M,description:V,buttonProps:B}),s[45]=M,s[46]=V,s[47]=B,s[48]=q):q=s[48];let Q;return s[49]!==_||s[50]!==q?(Q=t.jsx(je,{leading:_,children:q}),s[49]=_,s[50]=q,s[51]=Q):Q=s[51],Q}function Qt(){const s=E.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(qt,{}),s[1]=a):a=s[1],a}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Wt,{}),s[2]=i):i=s[2],i}function Ko(){const s=E.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ee,{children:t.jsx(A.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(G,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Qt,{})})}),s[0]=e):e=s[0],e}export{Ko as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as R,b as S,j as s,G as z,a9 as A,l as F,F as V,B as $,H as E,I as _}from"./index-D_7jfHk6.js";import{i as I,n as L}from"./ArrowUp-DR-Jhbl1.js";import{a as O,i as P,c as Y}from"./SwitchHorizontal01-Bx3d-jDI.js";import{T as G,a as H,c as K,b as W}from"./tooltip-BULKkf4A.js";import{V as q}from"./view-mode-toggle-CVVPadaN.js";import{B as J}from"./badge-CKM84j2S.js";const M=[];function ie(t){const e=R.c(35),{viewMode:i,onViewModeChange:h,sortKey:T,sortDirection:g,onSort:j,sortOptions:B,filters:D}=t,b=B===void 0?M:B,o=D===void 0?M:D,l=S();let v;e[0]!==o?(v=o.filter(U),e[0]=o,e[1]=v):v=e[1];const N=v.length;let r;e[2]!==l?(r=l("collections.collectionDisplayButton.displayAndFilters"),e[2]=l,e[3]=r):r=e[3];let w;e[4]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(O,{size:16}),e[4]=w):w=e[4];let n;e[5]!==N?(n=N>0&&s.jsx(J,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[5]=N,e[6]=n):n=e[6];let a;e[7]!==r||e[8]!==n?(a=s.jsx(G,{asChild:!0,children:s.jsx(V,{asChild:!0,children:s.jsxs($,{variant:"outline",size:"icon",className:"relative","aria-label":r,children:[w,n]})})}),e[7]=r,e[8]=n,e[9]=a):a=e[9];let c;e[10]!==l?(c=l("collections.collectionDisplayButton.displayAndFilters"),e[10]=l,e[11]=c):c=e[11];let d;e[12]!==c?(d=s.jsx(H,{children:c}),e[12]=c,e[13]=d):d=e[13];let x;e[14]!==a||e[15]!==d?(x=s.jsx(K,{children:s.jsxs(W,{children:[a,d]})}),e[14]=a,e[15]=d,e[16]=x):x=e[16];let p;e[17]!==h||e[18]!==i?(p=h&&i&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:i,onValueChange:h,fullWidth:!0,options:[{value:"table",icon:s.jsx(P,{})},{value:"cards",icon:s.jsx(Y,{})}]})}),e[17]=h,e[18]=i,e[19]=p):p=e[19];let m;e[20]!==j||e[21]!==g||e[22]!==T||e[23]!==b||e[24]!==l?(m=b.length>0&&j&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:l("collections.collectionDisplayButton.sortBy")}),b.map(C=>{const k=T===C.id;return s.jsx(z,{onClick:()=>j(C.id),className:F("h-8 px-2 py-0 cursor-pointer",k&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[k&&s.jsx(A,{size:16,className:"text-foreground shrink-0"}),!k&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:C.label}),k&&g&&(g==="asc"?s.jsx(I,{size:16,className:"text-foreground shrink-0"}):s.jsx(L,{size:16,className:"text-foreground shrink-0"}))]})},C.id)})]}),e[20]=j,e[21]=g,e[22]=T,e[23]=b,e[24]=l,e[25]=m):m=e[25];let u;e[26]!==o?(u=o.map(Q),e[26]=o,e[27]=u):u=e[27];let f;e[28]!==p||e[29]!==m||e[30]!==u?(f=s.jsxs(E,{align:"end",className:"w-[200px] p-0 gap-0",children:[p,m,u]}),e[28]=p,e[29]=m,e[30]=u,e[31]=f):f=e[31];let y;return e[32]!==x||e[33]!==f?(y=s.jsxs(_,{children:[x,f]}),e[32]=x,e[33]=f,e[34]=y):y=e[34],y}function Q(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const i=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:F("h-8 px-2 py-0 cursor-pointer",i&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[i&&s.jsx(A,{size:16,className:"text-foreground shrink-0"}),!i&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function U(t){return t.value!=="ALL"}export{ie as C};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{c as E,X as F,o as W,r as q,a2 as J,K as z,m as te,e as se,b as H,l as D,j as o,t as V,B as X,f9 as le,L as Y}from"./index-D_7jfHk6.js";import{s as ae}from"./Plus-nldAzVeQ.js";import{s as ne}from"./XClose-DBJ7sD1T.js";import{B as K}from"./badge-CKM84j2S.js";import{f as ie,C as oe,c as re,a as ce,e as de,b as me}from"./command-Doiz3O29.js";import{I as ue}from"./icon-button-BiR7Hy07.js";import{c as fe,S as pe,a as xe,b as he,e as ge}from"./sheet-Gpaizien.js";import{S as je}from"./switch-hSsSQMgC.js";import{T as ke}from"./textarea-DaHaRA0Z.js";import{h as Se}from"./task-board-ChFrokIN.js";import{p as be}from"./use-org-fs-DPxqVRhB.js";import{c as Re}from"./watch-sse-pool-BXtoXPGx.js";import{u as Z,a as ve}from"./use-automations-zlAoF9SL.js";function Be(){const s=E.c(7),{org:e}=F(),a=J();let t;s[0]!==e.id?(t=z.taskBoardPrompts(e.id),s[0]=e.id,s[1]=t):t=s[1];let n;s[2]!==a?(n=async()=>(await a.call("TASK_BOARD_PROMPT_LIST",{})).prompts,s[2]=a,s[3]=n):n=s[3];let i;return s[4]!==t||s[5]!==n?(i={queryKey:t,staleTime:6e4,queryFn:n},s[4]=t,s[5]=n,s[6]=i):i=s[6],te(i)}function Ce(){const s=E.c(8),{org:e}=F(),a=J(),t=W();let n;s[0]!==a?(n=async c=>{const{columnKey:r,rules:p}=c;if(p){const d=p.prompt.trim();await(d||p.skills.length?a.call("TASK_BOARD_PROMPT_UPSERT",{columnKey:r,prompt:d,skills:p.skills}):a.call("TASK_BOARD_PROMPT_DELETE",{columnKey:r}))}},s[0]=a,s[1]=n):n=s[1];let i;s[2]!==e||s[3]!==t?(i=()=>t.invalidateQueries({queryKey:z.taskBoardPrompts(e.id)}),s[2]=e,s[3]=t,s[4]=i):i=s[4];let l;return s[5]!==n||s[6]!==i?(l={mutationFn:n,onSettled:i},s[5]=n,s[6]=i,s[7]=l):l=s[7],se(l)}const U=()=>0;function Ge(){const s=E.c(6),{org:e}=F(),a=W();let t;s[0]!==e.id||s[1]!==a?(t=()=>a.invalidateQueries({queryKey:z.taskBoardPrompts(e.id)}),s[0]=e.id,s[1]=a,s[2]=t):t=s[2];const n=t;let i;s[3]!==e.slug||s[4]!==n?(i=()=>Re.subscribe(e.slug,n,n),s[3]=e.slug,s[4]=n,s[5]=i):i=s[5];const l=i;q.useSyncExternalStore(l,U,U)}function Ne(s){const e=E.c(8),a=Be();let t;e[0]!==s||e[1]!==a.data?(t=a.data?.find(l=>l.columnKey===s),e[0]=s,e[1]=a.data,e[2]=t):t=e[2];let n;e[3]!==a.data?(n=a.data?.find(Te)?.skills??[],e[3]=a.data,e[4]=n):n=e[4];let i;return e[5]!==t||e[6]!==n?(i={scope:t,boardSkills:n},e[5]=t,e[6]=n,e[7]=i):i=e[7],i}function Te(s){return s.columnKey===null}function Ve(s){const e=E.c(7),{data:a}=Z();let t;e[0]!==a?(t=a??[],e[0]=a,e[1]=t):t=e[1];let n;if(e[2]!==s||e[3]!==t){let i;e[5]!==s?(i=l=>l.board_triggers.some(c=>c.type==="board_column_transition"&&c.column_key===s),e[5]=s,e[6]=i):i=e[6],n=t.filter(i),e[2]=s,e[3]=t,e[4]=n}else n=e[4];return n}function ye(s){const e=E.c(7),{data:a}=Z();let t;e[0]!==a?(t=a??[],e[0]=a,e[1]=t):t=e[1];let n;if(e[2]!==s||e[3]!==t){let i;e[5]!==s?(i=l=>l.board_triggers.some(c=>c.column_key===s),e[5]=s,e[6]=i):i=e[6],n=t.filter(i),e[2]=s,e[3]=t,e[4]=n}else n=e[4];return n}function Pe(s){const e=E.c(33),{columnKey:a}=s,t=H(),{org:n}=F(),i=ye(a),{update:l}=ve();let c;e[0]!==t?(c=t("taskBoard.columnRules.automationsLabel"),e[0]=t,e[1]=c):c=e[1];let r;e[2]!==c?(r=o.jsx(Q,{children:c}),e[2]=c,e[3]=r):r=e[3];let p;if(e[4]!==i||e[5]!==n.slug||e[6]!==t||e[7]!==l){let S;e[9]!==n.slug||e[10]!==t||e[11]!==l?(S=h=>o.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-border px-3 py-2",children:[o.jsxs(Y,{to:"/$org/projects/$agentId/automations/$automationId",params:{org:n.slug,agentId:h.virtual_mcp_id,automationId:h.id},className:"flex min-w-0 flex-1 items-center gap-2 text-sm text-foreground hover:underline",children:[o.jsx("span",{className:"truncate",children:h.name}),h.system_key&&o.jsx(K,{variant:"muted",children:t("automations.builtin.badge")})]}),o.jsx(je,{checked:h.active,disabled:l.isPending,onCheckedChange:R=>l.mutate({id:h.id,active:R}),"aria-label":t("taskBoard.columnRules.toggleAutomation",{name:h.name})})]},h.id),e[9]=n.slug,e[10]=t,e[11]=l,e[12]=S):S=e[12],p=i.map(S),e[4]=i,e[5]=n.slug,e[6]=t,e[7]=l,e[8]=p}else p=e[8];let d;e[13]!==i.length||e[14]!==t?(d=i.length===0&&o.jsxs(o.Fragment,{children:[t("taskBoard.columnRules.noAutomations")," "]}),e[13]=i.length,e[14]=t,e[15]=d):d=e[15];const j=n.slug;let f;e[16]!==n.id?(f=le(n.id),e[16]=n.id,e[17]=f):f=e[17];let x;e[18]!==n.slug||e[19]!==f?(x={org:j,agentId:f},e[18]=n.slug,e[19]=f,e[20]=x):x=e[20];let m;e[21]!==t?(m=t("taskBoard.columnRules.addAutomation"),e[21]=t,e[22]=m):m=e[22];let u;e[23]!==x||e[24]!==m?(u=o.jsx(Y,{to:"/$org/projects/$agentId/automations",params:x,className:"text-foreground underline underline-offset-2",children:m}),e[23]=x,e[24]=m,e[25]=u):u=e[25];let k;e[26]!==d||e[27]!==u?(k=o.jsxs("p",{className:"text-meta",children:[d,u]}),e[26]=d,e[27]=u,e[28]=k):k=e[28];let b;return e[29]!==k||e[30]!==r||e[31]!==p?(b=o.jsxs("section",{className:"flex flex-col gap-2",children:[r,p,k]}),e[29]=k,e[30]=r,e[31]=p,e[32]=b):b=e[32],b}function Xe(s){const e=E.c(21),{columnKey:a,label:t,open:n,onOpenChange:i}=s,{scope:l,boardSkills:c}=Ne(a);let r;e[0]!==t?(r=o.jsx(fe,{className:"border-b",children:o.jsx(pe,{children:t})}),e[0]=t,e[1]=r):r=e[1];const p=l?.prompt??"";let d;e[2]!==l?.skills?(d=l?.skills??[],e[2]=l?.skills,e[3]=d):d=e[3];let j;e[4]!==p||e[5]!==d?(j={prompt:p,skills:d},e[4]=p,e[5]=d,e[6]=j):j=e[6];let f;e[7]!==i?(f=()=>i(!1),e[7]=i,e[8]=f):f=e[8];let x;e[9]!==c||e[10]!==a||e[11]!==j||e[12]!==f?(x=o.jsx($e,{columnKey:a,initial:j,boardSkills:c,onDone:f}),e[9]=c,e[10]=a,e[11]=j,e[12]=f,e[13]=x):x=e[13];let m;e[14]!==r||e[15]!==x?(m=o.jsxs(xe,{className:"w-full gap-0 sm:max-w-md","aria-describedby":void 0,children:[r,x]}),e[14]=r,e[15]=x,e[16]=m):m=e[16];let u;return e[17]!==n||e[18]!==i||e[19]!==m?(u=o.jsx(o.Fragment,{children:o.jsx(he,{open:n,onOpenChange:i,children:m})}),e[17]=n,e[18]=i,e[19]=m,e[20]=u):u=e[20],u}function $e(s){const e=E.c(58),{columnKey:a,initial:t,boardSkills:n,onDone:i}=s,l=H(),c=Ce(),[r,p]=q.useState(t.prompt),[d,j]=q.useState(t.skills);let f;e[0]!==a||e[1]!==t.prompt||e[2]!==t.skills||e[3]!==i||e[4]!==r||e[5]!==c||e[6]!==d||e[7]!==l?(f=()=>c.mutate({columnKey:a,...r!==t.prompt||d.join(`
|
|
2
|
-
`)!==t.skills.join(`
|
|
3
|
-
`)?{rules:{prompt:r,skills:d}}:{}},{onSuccess:()=>{V.success(l("taskBoard.columnRules.saved")),i()},onError:g=>V.error(g instanceof Error?g.message:l("taskBoard.columnRules.failed"))}),e[0]=a,e[1]=t.prompt,e[2]=t.skills,e[3]=i,e[4]=r,e[5]=c,e[6]=d,e[7]=l,e[8]=f):f=e[8];const x=f;let m;e[9]!==a?(m=o.jsx(Pe,{columnKey:a}),e[9]=a,e[10]=m):m=e[10];let u;e[11]!==l?(u=l("taskBoard.columnRules.promptLabel"),e[11]=l,e[12]=u):u=e[12];let k;e[13]!==u?(k=o.jsx(Q,{children:u}),e[13]=u,e[14]=k):k=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=g=>p(g.target.value),e[15]=b):b=e[15];let S;e[16]!==l?(S=l("taskBoard.columnRules.promptPlaceholder"),e[16]=l,e[17]=S):S=e[17];let h;e[18]!==l?(h=l("taskBoard.columnRules.promptLabel"),e[18]=l,e[19]=h):h=e[19];let R;e[20]!==r||e[21]!==S||e[22]!==h?(R=o.jsx(ke,{value:r,rows:5,maxLength:Se,onChange:b,placeholder:S,"aria-label":h}),e[20]=r,e[21]=S,e[22]=h,e[23]=R):R=e[23];let v;e[24]!==k||e[25]!==R?(v=o.jsxs("section",{className:"flex flex-col gap-2",children:[k,R]}),e[24]=k,e[25]=R,e[26]=v):v=e[26];let C;e[27]!==l?(C=l("taskBoard.columnRules.skillsLabel"),e[27]=l,e[28]=C):C=e[28];let N;e[29]!==C?(N=o.jsx(Q,{children:C}),e[29]=C,e[30]=N):N=e[30];let T;e[31]!==n||e[32]!==d?(T=o.jsx(Ee,{fill:!0,value:d,onChange:j,inherited:n}),e[31]=n,e[32]=d,e[33]=T):T=e[33];let y;e[34]!==N||e[35]!==T?(y=o.jsxs("section",{className:"flex min-h-64 flex-1 flex-col gap-2",children:[N,T]}),e[34]=N,e[35]=T,e[36]=y):y=e[36];let A;e[37]!==y||e[38]!==m||e[39]!==v?(A=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto p-4",children:[m,v,y]}),e[37]=y,e[38]=m,e[39]=v,e[40]=A):A=e[40];let B;e[41]!==l?(B=l("taskBoard.columnRules.cancel"),e[41]=l,e[42]=B):B=e[42];let w;e[43]!==i||e[44]!==B?(w=o.jsx(X,{variant:"outline",onClick:i,children:B}),e[43]=i,e[44]=B,e[45]=w):w=e[45];const O=c.isPending;let P;e[46]!==l?(P=l("taskBoard.columnRules.save"),e[46]=l,e[47]=P):P=e[47];let I;e[48]!==c.isPending||e[49]!==x||e[50]!==P?(I=o.jsx(X,{disabled:O,onClick:x,children:P}),e[48]=c.isPending,e[49]=x,e[50]=P,e[51]=I):I=e[51];let $;e[52]!==w||e[53]!==I?($=o.jsxs(ge,{className:"flex-row justify-end border-t",children:[w,I]}),e[52]=w,e[53]=I,e[54]=$):$=e[54];let L;return e[55]!==A||e[56]!==$?(L=o.jsxs(o.Fragment,{children:[A,$]}),e[55]=A,e[56]=$,e[57]=L):L=e[57],L}function Q(s){const e=E.c(2),{children:a}=s;let t;return e[0]!==a?(t=o.jsx("h3",{className:"text-sm font-medium text-foreground",children:a}),e[0]=a,e[1]=t):t=e[1],t}const Ae=[];function Ee(s){const e=E.c(71),{value:a,onChange:t,inherited:n,fill:i}=s,l=n===void 0?Ae:n,c=i===void 0?!1:i,r=H(),p=be();let d;e[0]!==p.data?(d=B=>p.data?.find(w=>w.id===B)?.name??B,e[0]=p.data,e[1]=d):d=e[1];const j=d;let f,x,m,u,k,b,S,h,R,v;if(e[2]!==p.data||e[3]!==c||e[4]!==l||e[5]!==j||e[6]!==t||e[7]!==r||e[8]!==a){let B;e[19]!==l||e[20]!==a?(B=g=>!g.disableModelInvocation&&!a.includes(g.id)&&!l.includes(g.id),e[19]=l,e[20]=a,e[21]=B):B=e[21];const w=(p.data??[]).filter(B);if(e[22]!==c||e[23]!==l||e[24]!==j||e[25]!==t||e[26]!==r||e[27]!==a){let g;e[30]!==l?(g=_=>!l.includes(_),e[30]=l,e[31]=g):g=e[31];const G=a.filter(g),M=c&&"min-h-0 flex-1";e[32]!==M?(v=D("flex flex-col gap-2",M),e[32]=M,e[33]=v):v=e[33],u=G.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1.5",children:G.map(_=>o.jsxs(K,{variant:"outline",className:"py-0 pr-0 pl-2",children:[j(_),o.jsx(ue,{label:r("taskBoard.columnRules.removeSkill",{skill:j(_)}),onClick:()=>t(a.filter(ee=>ee!==_)),className:"size-5 text-muted-foreground",children:o.jsx(ne,{size:12})})]},_))}),e[22]=c,e[23]=l,e[24]=j,e[25]=t,e[26]=r,e[27]=a,e[28]=u,e[29]=v}else u=e[28],v=e[29];m=ie;const O=c&&"min-h-0 flex-1";e[34]!==O?(h=D("h-auto border",O),e[34]=O,e[35]=h):h=e[35];let P;e[36]!==r?(P=r("taskBoard.columnRules.searchSkills"),e[36]=r,e[37]=P):P=e[37],e[38]!==P?(R=o.jsx(oe,{placeholder:P,className:"h-9"}),e[38]=P,e[39]=R):R=e[39],x=re;const I=c?"max-h-none flex-1":"max-h-56";e[40]!==I?(b=D(I),e[40]=I,e[41]=b):b=e[41];let $;e[42]!==r?($=r("taskBoard.columnRules.noSkills"),e[42]=r,e[43]=$):$=e[43],e[44]!==$?(S=o.jsx(ce,{children:$}),e[44]=$,e[45]=S):S=e[45],f=de;let L;e[46]!==t||e[47]!==a?(L=g=>o.jsxs(me,{value:`${g.name} ${g.id}`,onSelect:()=>t([...a,g.id]),children:[o.jsx(ae,{size:14,className:"shrink-0 text-muted-foreground"}),o.jsxs("span",{className:"flex min-w-0 flex-col",children:[o.jsx("span",{className:"truncate text-sm",children:g.name}),g.description&&o.jsx("span",{className:"text-meta line-clamp-1",children:g.description})]})]},g.id),e[46]=t,e[47]=a,e[48]=L):L=e[48],k=w.map(L),e[2]=p.data,e[3]=c,e[4]=l,e[5]=j,e[6]=t,e[7]=r,e[8]=a,e[9]=f,e[10]=x,e[11]=m,e[12]=u,e[13]=k,e[14]=b,e[15]=S,e[16]=h,e[17]=R,e[18]=v}else f=e[9],x=e[10],m=e[11],u=e[12],k=e[13],b=e[14],S=e[15],h=e[16],R=e[17],v=e[18];let C;e[49]!==f||e[50]!==k?(C=o.jsx(f,{children:k}),e[49]=f,e[50]=k,e[51]=C):C=e[51];let N;e[52]!==x||e[53]!==C||e[54]!==b||e[55]!==S?(N=o.jsxs(x,{className:b,children:[S,C]}),e[52]=x,e[53]=C,e[54]=b,e[55]=S,e[56]=N):N=e[56];let T;e[57]!==m||e[58]!==N||e[59]!==h||e[60]!==R?(T=o.jsxs(m,{className:h,children:[R,N]}),e[57]=m,e[58]=N,e[59]=h,e[60]=R,e[61]=T):T=e[61];let y;e[62]!==l||e[63]!==j||e[64]!==r?(y=l.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-meta",children:r("taskBoard.columnRules.inheritedHint")}),o.jsx("div",{className:"flex flex-wrap gap-1.5",children:l.map(B=>o.jsx(K,{variant:"muted",children:j(B)},B))})]}),e[62]=l,e[63]=j,e[64]=r,e[65]=y):y=e[65];let A;return e[66]!==u||e[67]!==T||e[68]!==y||e[69]!==v?(A=o.jsxs("div",{className:v,children:[u,T,y]}),e[66]=u,e[67]=T,e[68]=y,e[69]=v,e[70]=A):A=e[70],A}export{Xe as C,Ee as S,Ve as a,Be as b,Ce as c,Ge as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as v,l as h,j as r,aH as N}from"./index-D_7jfHk6.js";import{_ as b}from"./index-DltLvtZg.js";import{D as j,d as w,h as y,c as C,b as z}from"./dialog-DRpbbWU1.js";import{i as D}from"./SearchMd-BiZNveM1.js";function $(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=v.c(28);let t,s,o,l,n,_,u;e[0]!==a?({title:_,description:u,children:t,className:s,filter:o,shouldFilter:n,...l}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=n,e[6]=_,e[7]=u):(t=e[1],s=e[2],o=e[3],l=e[4],n=e[5],_=e[6],u=e[7]);const f=_===void 0?"Command Palette":_,x=u===void 0?"Search for a command to run...":u;let g;e[8]!==f?(g=r.jsx(w,{children:f}),e[8]=f,e[9]=g):g=e[9];let i;e[10]!==x?(i=r.jsx(y,{children:x}),e[10]=x,e[11]=i):i=e[11];let d;e[12]!==g||e[13]!==i?(d=r.jsxs(C,{className:"sr-only",children:[g,i]}),e[12]=g,e[13]=i,e[14]=d):d=e[14];let c;e[15]!==s?(c=h("overflow-hidden p-0",s),e[15]=s,e[16]=c):c=e[16];let m;e[17]!==t||e[18]!==o||e[19]!==n?(m=r.jsx($,{filter:o,shouldFilter:n,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:not([class*='size-'])]:h-5 [&_[cmdk-item]_svg:not([class*='size-'])]:w-5",children:t}),e[17]=t,e[18]=o,e[19]=n,e[20]=m):m=e[20];let p;e[21]!==c||e[22]!==m?(p=r.jsx(z,{className:c,closeButtonClassName:"hidden",children:m}),e[21]=c,e[22]=m,e[23]=p):p=e[23];let k;return e[24]!==l||e[25]!==d||e[26]!==p?(k=r.jsxs(j,{...l,children:[d,p]}),e[24]=l,e[25]=d,e[26]=p,e[27]=k):k=e[27],k}function R(a){const e=v.c(23);let t,s,o,l,n;e[0]!==a?({className:s,size:l,variant:n,action:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=n):(t=e[1],s=e[2],o=e[3],l=e[4],n=e[5]);const _=l===void 0?"default":l,u=n===void 0?"underline":n,f=_==="sm"?"h-9":"h-10",x=u==="boxed",g=x?"rounded-xl border border-input bg-transparent focus-within:border-ring":"border-b";let i;e[6]!==f||e[7]!==g?(i=h("flex items-center gap-2 px-3",f,g),e[6]=f,e[7]=g,e[8]=i):i=e[8];let d;e[9]!==x?(d=!x&&r.jsx(D,{className:"size-4 shrink-0 text-muted-foreground"}),e[9]=x,e[10]=d):d=e[10];let c;e[11]!==s||e[12]!==f?(c=h("placeholder:text-muted-foreground flex w-full rounded-md bg-transparent text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",f,s),e[11]=s,e[12]=f,e[13]=c):c=e[13];let m;e[14]!==o||e[15]!==c?(m=r.jsx(b.Input,{"data-slot":"command-input",className:c,...o}),e[14]=o,e[15]=c,e[16]=m):m=e[16];let p;return e[17]!==t||e[18]!==i||e[19]!==d||e[20]!==m||e[21]!==u?(p=r.jsxs("div",{"data-slot":"command-input-wrapper","data-variant":u,className:i,children:[d,m,t]}),e[17]=t,e[18]=i,e[19]=d,e[20]=m,e[21]=u,e[22]=p):p=e[22],p}function V(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=v.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=r.jsx(b.Empty,{"data-slot":"command-empty",className:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function F(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function P(a){const e=v.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=h("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=r.jsx(b.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}const I=N("[&_svg:not([class*='text-'])]:text-muted-foreground relative flex min-h-8 cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{highlight:{selected:"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",hover:"w-full hover:bg-accent hover:text-accent-foreground"},size:{default:"",lg:"min-h-11 gap-3 rounded-lg px-2.5 py-2"}},defaultVariants:{highlight:"selected",size:"default"}});function T(a){const e=v.c(10);let t,s,o;e[0]!==a?({className:t,size:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let l;e[4]!==t||e[5]!==o?(l=h(I({size:o}),t),e[4]=t,e[5]=o,e[6]=l):l=e[6];let n;return e[7]!==s||e[8]!==l?(n=r.jsx(b.Item,{"data-slot":"command-item",className:l,...s}),e[7]=s,e[8]=l,e[9]=n):n=e[9],n}export{R as C,B as a,T as b,V as c,L as d,F as e,$ as f,I as g,P as h};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as C,m as h}from"./core.esm-DbclD67Y.js";import{i as k}from"./AlertCircle-C3fpFT5I.js";import{aF as x,aG as b,aH as f,aI as _,a as K,aJ as v,aK as B,aL as S,a5 as A,y as w,t as O,aM as I}from"./agent-icon-CnnNyirr.js";import{aO as L,aA as T,d2 as g,$ as D}from"./index-D_7jfHk6.js";import{i as E}from"./CheckCircle-BKHstO_Q.js";import{s as M}from"./Image01-Cxa392ef.js";import{e as R,C as l}from"./task-board-ChFrokIN.js";const $=L("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]),F=["ended_after_delivery","superseded"];function P(e){return!!e&&F.includes(e)}function ee(e){return!(e.action==="status_changed"&&typeof e.data?.retry=="number")}function te(e){return e.failureKind!=="superseded"}function p(e){return e.threads.some(t=>t.status==="requires_action")}function ae(e){return e.status==="in_review"&&!e.assigneeId}function se(e){return p(e)}function ne(e){return e.status==="in_progress"&&p(e)?"text-warning animate-pulse":N(e.status).iconClassName}function oe(e){return e.threads.some(a=>a.status==="in_progress")?"running":e.threads.some(a=>a.status==="failed"&&!P(a.failureKind))?"failed":null}function re(e,t,a){const s=e.findIndex(n=>n.id===a),o=t===a?e[s+1]?.id??null:t,r=e.filter(n=>n.id!==a),u=o?r.findIndex(n=>n.id===o):-1,d=u===-1?r.length:u,i=r[d-1],c=r[d];return i&&c?(i.sortOrder+c.sortOrder)/2:i?i.sortOrder+1:c?c.sortOrder-1:0}function ie(e,t){return Array.from({length:t},(a,s)=>e-(t-1-s)*1e-4)}const U=["archived"],y={triage:{labelKey:"taskBoard.config.statusBacklog",icon:k,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:g,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:A,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:M,iconClassName:"text-warning"},qa:{labelKey:"taskBoard.config.statusQa",icon:S,iconClassName:"text-warning"},customer_approval:{labelKey:"taskBoard.config.statusCustomerApproval",icon:B,iconClassName:"text-warning"},ready_for_deployment:{labelKey:"taskBoard.config.statusReadyForDeployment",icon:v,iconClassName:"text-success"},post_deploy_validation:{labelKey:"taskBoard.config.statusPostDeployValidation",icon:K,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:E,iconClassName:"text-success"},archived:{labelKey:"taskBoard.config.statusArchived",icon:T,iconClassName:"text-muted-foreground"}},H={icon:g,iconClassName:"text-muted-foreground"},G=y;function N(e){return G[e]??H}function ce(e,t){const a=y[e];return{label:a?t(a.labelKey):e,visual:N(e)}}const le=["bug","feature","chore","spike","security"],ue={bug:{labelKey:"taskBoard.config.typeBug",icon:$,iconClassName:"text-destructive"},feature:{labelKey:"taskBoard.config.typeFeature",icon:I,iconClassName:"text-success"},chore:{labelKey:"taskBoard.config.typeChore",icon:O,iconClassName:"text-muted-foreground"},spike:{labelKey:"taskBoard.config.typeSpike",icon:w,iconClassName:"text-yellow-500"},security:{labelKey:"taskBoard.config.typeSecurity",icon:D,iconClassName:"text-purple-500"}};function de({shownLanes:e}){const t=l.filter(s=>U.includes(s)),a=t.filter(s=>!e.includes(s));return{lanes:l.filter(s=>!a.includes(s)),hidden:a,hideable:t}}const q=44;function fe({lanes:e,collapsed:t,hasHiddenTail:a}){const s=e.map(o=>t.includes(o)?`${q}px`:"minmax(280px, 1fr)");return a&&s.push("280px"),s.join(" ")}const m="lane:",me=e=>{const t=C(e);return t.length>0?t:h(e)};function V(e){return l.includes(e)}function ge({overId:e,statusOf:t}){if(e===void 0)return null;const a=String(e),s=a.startsWith(m)?a.slice(m.length):t(a);return s!==void 0&&V(s)?s:null}function pe(e,t){return Math.max(0,Math.floor((t-Date.parse(e))/864e5))}const ye=["none","low","medium","high","urgent"],Ne={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50",icon:f,iconClassName:"text-muted-foreground/40"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40",icon:_,iconClassName:"text-muted-foreground"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500",icon:f,iconClassName:"text-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning",icon:b,iconClassName:"text-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive",icon:x,iconClassName:"text-destructive"}};function Ce(e,t=Date.now()){const a=new Date(e).getTime();return Number.isNaN(a)?null:a<t?"overdue":a-t<=W*864e5?"soon":null}const W=3;function he(e){return`color-mix(in oklab, ${e??R} var(--user-color-strength), transparent)`}export{U as H,m as L,ye as P,y as S,le as T,ae as a,Ne as b,ue as c,N as d,te as e,ee as f,P as g,oe as h,p as i,de as j,me as k,ce as l,fe as m,se as n,re as o,ge as p,Ce as q,ie as r,ne as s,he as t,pe as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as v,b as N,j as s,a7 as w,al as k,B as y}from"./index-D_7jfHk6.js";import{i as z}from"./X-DzPShgV5.js";import{aN as _,ay as C}from"./agent-icon-CnnNyirr.js";const S="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function $(){const t=v.c(13),e=N();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),t[0]=l):l=t[0];let n;t[1]!==e?(n=e("routes.reportsOnboarding.connectModal.quote"),t[1]=e,t[2]=n):n=t[2];let o;t[3]!==n?(o=s.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",n,"”"]}),t[3]=n,t[4]=o):o=t[4];let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("img",{src:S,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=c):c=t[5];let r;t[6]!==e?(r=e("routes.reportsOnboarding.connectModal.quoteAuthor"),t[6]=e,t[7]=r):r=t[7];let i;t[8]!==r?(i=s.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[c,s.jsx("span",{className:"text-base font-medium",children:r})]}),t[8]=r,t[9]=i):i=t[9];let a;return t[10]!==o||t[11]!==i?(a=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[l,o,i]}),t[10]=o,t[11]=i,t[12]=a):a=t[12],a}function M(){const t=v.c(19),e=N();let l;t[0]!==e?(l=e("routes.reportsOnboarding.connectModal.trustRevoke"),t[0]=e,t[1]=l):l=t[1];let n;t[2]!==l?(n={Icon:_,label:l},t[2]=l,t[3]=n):n=t[3];let o;t[4]!==e?(o=e("routes.reportsOnboarding.connectModal.trustEncrypted"),t[4]=e,t[5]=o):o=t[5];let c;t[6]!==o?(c={Icon:w,label:o},t[6]=o,t[7]=c):c=t[7];let r;t[8]!==e?(r=e("routes.reportsOnboarding.connectModal.trustNeverSold"),t[8]=e,t[9]=r):r=t[9];let i;t[10]!==r?(i={Icon:C,label:r},t[10]=r,t[11]=i):i=t[11];let a;t[12]!==n||t[13]!==c||t[14]!==i?(a=[n,c,i],t[12]=n,t[13]=c,t[14]=i,t[15]=a):a=t[15];const m=a;let f;t[16]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"h-px w-full bg-white/15"}),t[16]=f):f=t[16];let d;return t[17]!==m?(d=s.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[f,s.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:m.map(q)})]}),t[17]=m,t[18]=d):d=t[18],d}function q(t){const{Icon:e,label:l}=t;return s.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[s.jsx(e,{className:"size-4 shrink-0 opacity-85"}),l]},l)}function A(t){const e=v.c(22),{siteHost:l,footer:n,onClose:o,children:c}=t,r=N(),i=l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null;let a;e[0]!==o||e[1]!==r?(a=o&&s.jsx("button",{type:"button",onClick:o,"aria-label":r("routes.reportsOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:s.jsx(z,{size:18})}),e[0]=o,e[1]=r,e[2]=a):a=e[2];let m,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),f=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=m,e[4]=f):(m=e[3],f=e[4]);let d;e[5]!==i||e[6]!==l?(d=l&&s.jsxs(s.Fragment,{children:[s.jsx(k,{size:16,className:"shrink-0 text-foreground/25"}),i&&s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:s.jsx("img",{src:i,alt:"",className:"size-full"})}),s.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:l})]}),e[5]=i,e[6]=l,e[7]=d):d=e[7];let x;e[8]!==d?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[m,f,d]}),e[8]=d,e[9]=x):x=e[9];let g;e[10]!==n?(g=s.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:n}),e[10]=n,e[11]=g):g=e[11];let h;e[12]!==c||e[13]!==x||e[14]!==g?(h=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[x,c,g]}),e[12]=c,e[13]=x,e[14]=g,e[15]=h):h=e[15];let u,b;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),b=s.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=u,e[17]=b):(u=e[16],b=e[17]);let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[u,b,s.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[s.jsx("div",{className:"flex-1"}),s.jsx($,{}),s.jsx("div",{className:"flex-1"}),s.jsx(M,{})]})]}),e[18]=p):p=e[18];let j;return e[19]!==a||e[20]!==h?(j=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[a,h,p]}),e[19]=a,e[20]=h,e[21]=j):j=e[21],j}function I(t){const e=v.c(5),{ready:l,pending:n,label:o,onClick:c,children:r}=t,i=n||!l,a=l&&!n?r:null;let m;return e[0]!==o||e[1]!==c||e[2]!==i||e[3]!==a?(m=s.jsxs(y,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal py-3 text-center text-base font-medium leading-tight",onClick:c,disabled:i,children:[o,a]}),e[0]=o,e[1]=c,e[2]=i,e[3]=a,e[4]=m):m=e[4],m}export{A as C,I as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as M,X as S,a2 as $,K as F,a8 as R,b as K,l as A,j as c,f1 as q}from"./index-D_7jfHk6.js";import{u as O}from"./useInfiniteQuery-eYXaZ_bo.js";import{g as D}from"./connection-slug-CITJ0kGN.js";import{I as V}from"./integration-icon-BM3EOzpn.js";function W(t){const e=M.c(21),{org:s}=S(),o=$();let l;e[0]!==t?(l=t?.trim().split(/\s+/).filter(Boolean)??[],e[0]=t,e[1]=l):l=e[1];const r=l;let n;e[2]!==s.id||e[3]!==t?(n=F.storeDiscovery(s.id,`deco-json:${t??""}`),e[2]=s.id,e[3]=t,e[4]=n):n=e[4];let a;e[5]!==o||e[6]!==r?(a=I=>{const{pageParam:_}=I;return o.call("COLLECTION_REGISTRY_APP_LIST",{limit:24,cursor:_,where:r.length?{operator:"or",conditions:r.flatMap(B)}:void 0})},e[5]=o,e[6]=r,e[7]=a):a=e[7];let u;e[8]!==n||e[9]!==a?(u={queryKey:n,queryFn:a,initialPageParam:void 0,getNextPageParam:z,staleTime:3e5,placeholderData:R,throwOnError:!0},e[8]=n,e[9]=a,e[10]=u):u=e[10];const i=O(u);let p;e[11]!==i.data?.pages?(p=i.data?.pages.flatMap(Y)??[],e[11]=i.data?.pages,e[12]=p):p=e[12];const m=p;let f;e[13]!==i?(f=()=>{i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},e[13]=i,e[14]=f):f=e[14];let d;return e[15]!==m||e[16]!==i.hasNextPage||e[17]!==i.isFetchingNextPage||e[18]!==i.isLoading||e[19]!==f?(d={items:m,hasMore:i.hasNextPage,isLoadingMore:i.isFetchingNextPage,isInitialLoading:i.isLoading,loadMore:f},e[15]=m,e[16]=i.hasNextPage,e[17]=i.isFetchingNextPage,e[18]=i.isLoading,e[19]=f,e[20]=d):d=e[20],d}function Y(t){return t.items}function z(t){return t.nextCursor}function B(t){return[["title"],["description"],["id"],["server","name"]].map(e=>({field:e,operator:"contains",value:t}))}function Z(t){const e=new Map;for(const l of t){const r=D(l),n=e.get(r);n?n.push(l):e.set(r,[l])}const s=[],o=new Set;for(const l of t){const r=D(l);if(o.has(r))continue;o.add(r);const n=e.get(r),a=n[0];n.length===1?s.push({type:"single",connection:a}):s.push({type:"group",key:r,icon:a.icon,title:a.app_name?a.title.replace(/\s*\(\d+\)\s*$/,""):a.title,connections:n})}return s}function ee(t){const e=M.c(43),{connection:s,onClick:o,headerActions:l,headerActionsAlwaysVisible:r,footer:n,className:a,fallbackIcon:u,selected:i}=t,p=r===void 0?!1:r,m=K(),f=o&&"cursor-pointer hover:bg-muted/50";let d;e[0]!==a||e[1]!==f?(d=A("transition-colors group overflow-hidden flex flex-col h-full",f,a),e[0]=a,e[1]=f,e[2]=d):d=e[2];const I=o?"button":void 0,_=o?0:void 0,T=o&&i!==void 0?i:void 0;let g;e[3]!==o?(g=o?L=>{L.target===L.currentTarget&&(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),o())}:void 0,e[3]=o,e[4]=g):g=e[4];let x;e[5]!==s.icon||e[6]!==s.title||e[7]!==u?(x=c.jsx(V,{icon:s.icon,name:s.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:u}),e[5]=s.icon,e[6]=s.title,e[7]=u,e[8]=x):x=e[8];let h;e[9]!==l||e[10]!==p?(h=l&&c.jsx("div",{className:A("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:Q,children:l}),e[9]=l,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==h?(v=c.jsx("div",{className:"relative",children:h}),e[12]=h,e[13]=v):v=e[13];let N;e[14]!==v||e[15]!==x?(N=c.jsxs("div",{className:"flex items-start justify-between",children:[x,v]}),e[14]=v,e[15]=x,e[16]=N):N=e[16];let y;e[17]!==s.title?(y=c.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[17]=s.title,e[18]=y):y=e[18];let P;e[19]!==s.description||e[20]!==m?(P=s.description||m("connections.connectionCard.noDescription"),e[19]=s.description,e[20]=m,e[21]=P):P=e[21];let j;e[22]!==P?(j=c.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=j):j=e[23];let C;e[24]!==y||e[25]!==j?(C=c.jsxs("div",{className:"flex flex-col gap-1",children:[y,j]}),e[24]=y,e[25]=j,e[26]=C):C=e[26];let b;e[27]!==N||e[28]!==C?(b=c.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[N,C]}),e[27]=N,e[28]=C,e[29]=b):b=e[29];let k;e[30]!==n?(k=n&&c.jsx("div",{className:"border-t border-border mt-auto",children:c.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:G,children:n})}),e[30]=n,e[31]=k):k=e[31];let w;e[32]!==b||e[33]!==k?(w=c.jsxs("div",{className:"flex flex-col flex-1",children:[b,k]}),e[32]=b,e[33]=k,e[34]=w):w=e[34];let E;return e[35]!==o||e[36]!==w||e[37]!==d||e[38]!==I||e[39]!==_||e[40]!==T||e[41]!==g?(E=c.jsx(q,{className:d,onClick:o,role:I,tabIndex:_,"aria-pressed":T,onKeyDown:g,children:w}),e[35]=o,e[36]=w,e[37]=d,e[38]=I,e[39]=_,e[40]=T,e[41]=g,e[42]=E):E=e[42],E}function G(t){return t.stopPropagation()}function Q(t){return t.stopPropagation()}export{ee as C,Z as g,W as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{av as ve,cS as Oe,cQ as Me,aw as de,bP as ze,c as U,b as V,j as t,h as Ne,B,r as X,l as Se,X as te,a2 as Ee,D as me,K as ee,d as se,p as ye,al as _e,f1 as Re,aS as Ue,n as Fe,fp as ue,R as Ve,I as Le,F as Be,H as Ge,G as xe,E as qe,f as He,fy as Ke,o as Qe,au as Xe,at as We,t as Y}from"./index-D_7jfHk6.js";import{g as Ye}from"./extract-connection-data-Q_j_fmQx.js";import{E as Ce}from"./empty-state-DnQ_qEjI.js";import{E as Je,c as Ze,r as et,b as tt,d as st}from"./connection-form-helpers-D4Q7rLyt.js";import{c as nt,S as it,D as ot}from"./index-CeMEs5dC.js";import{u as we,T as at}from"./use-mcp-auth-status-B-gyzfqG.js";import{a as lt}from"./use-members-vjX9lJhj.js";import{A as rt}from"./avatar-TL9HUab0.js";import{a as Ie,b as ke,u as ct}from"./use-connection-5LUEsGlJ.js";import{u as Te}from"./use-mcp-client-MUIIizLf.js";import{u as dt}from"./use-mcp-tools-CPLGkZB5.js";import{a as mt}from"./use-mcp-prompts-C3siW74f.js";import{i as ut,a as xt}from"./mcp-oauth-C5T-IVs8.js";import{I as ae}from"./integration-icon-BM3EOzpn.js";import{s as pt}from"./Plus-nldAzVeQ.js";import{bd as ft,ay as ht,au as gt,u as ne}from"./agent-icon-CnnNyirr.js";import{a as Ae,e as jt,s as bt}from"./Tool01-Blw6F5iV.js";import{s as re}from"./Trash01-DAoFHSpp.js";import{b as vt,a as Nt,c as St,S as yt,d as _t}from"./sheet-Gpaizien.js";import{F as q,b as H,c as K,d as L,f as Q,e as Ct,a as wt}from"./form-BBtB5neb.js";import{I as J}from"./input-B0doV0os.js";import{u as It,D as kt}from"./use-delete-connection-BLZ4VLoa.js";import{c as Tt}from"./monitoring-stats-row-DB55KTTw.js";import{d as At,C as Pt,a as Dt}from"./chart-DZbYggl3.js";import{B as $t,a as Ot}from"./BarChart-CJ_IiQ71.js";import{C as Mt}from"./tooltipContext-1NNpJuJd.js";import{b as zt}from"./repository-binding-DpX8yLri.js";import{T as ie,a as Et,c as oe,b as Rt}from"./tabs-Df848FrP.js";import{g as Pe}from"./connection-slug-CITJ0kGN.js";import{n as Ut}from"./ShoppingBag01-o0DdjJD9.js";import{g as ce}from"./types-Blm6OQRg.js";import{M as Ft}from"./mcp-app-renderer-D5zA7BfR.js";import{C as Vt}from"./collection-search-BoB9COGX.js";import{B as Lt}from"./badge-CKM84j2S.js";import{S as pe,b as fe,a as he,d as ge,c as G}from"./select-CZdnCwuC.js";import{i as Bt}from"./CheckCircle-BKHstO_Q.js";import{t as Gt}from"./ChevronUp-CceLPRrE.js";import{n as qt}from"./LinkBroken01-kK_na_OL.js";import{c as Ht}from"./UserSquare-BMOlWqCu.js";import{s as Kt}from"./XClose-DBJ7sD1T.js";import{p as Qt,i as Xt}from"./connection-FKmTBjan.js";import"./metadata-D72DunRR.js";import"./Key01-BHiUNW_5.js";import"./auth-Cps-90jQ.js";import"./index-CoDuotD7.js";import"./index-KqttCHw1.js";import"./index-BdQq_4o_.js";import"./index-DltLvtZg.js";import"./popover-C2vJrXky.js";import"./tooltip-BULKkf4A.js";import"./index-D1CuHcEn.js";import"./SearchMd-BiZNveM1.js";import"./use-mobile-DF1FX6Xv.js";import"./use-create-virtual-mcp-DzmQH3J8.js";import"./use-navigate-to-agent-p65xWFDF.js";import"./thread-intent-Cxso0qKW.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BXtoXPGx.js";import"./task-board-ChFrokIN.js";import"./schema-D1veJPjJ.js";import"./slugify-CEUa2lfQ.js";import"./Image01-Cxa392ef.js";import"./use-org-auth-client-CuZ7oLTb.js";import"./User01-Awky2MVQ.js";import"./AlertCircle-C3fpFT5I.js";import"./ArrowUp-DR-Jhbl1.js";import"./ArrowLeft-C1IFj0Ic.js";import"./ZoomOut-CQckFmS9.js";import"./Building02-uHT4KVtK.js";import"./ChevronSelectorVertical-DAO6R1Op.js";import"./Copy01-Dx3ZT0bA.js";import"./CreditCard01-Dko0T335.js";import"./DotsVertical-aHYBPlin.js";import"./Globe04-BDe-0jS0.js";import"./SwitchHorizontal01-Bx3d-jDI.js";import"./Link01-BRZRc4wX.js";import"./LinkExternal01-CILXo-bC.js";import"./Monitor01-Cl4JLYVa.js";import"./Sun-BYGxydmh.js";import"./Play-CzTcIQz_.js";import"./Upload01-CtKBhqsv.js";import"./Users01-D7ZFKC4W.js";import"./X-DzPShgV5.js";import"./label-DxOPcXJe.js";import"./alert-dialog-kjq4dW3k.js";import"./AreaChart-BvjH9pmK.js";import"./CategoricalChart-zte0bRec.js";import"./XAxis-BLZT-vtl.js";import"./symbol-CkeqKRPe.js";import"./ActiveShapeUtils-CO9ka_yi.js";import"./Sector-DOgIwKt7.js";import"./ErrorBarContext-B8QqSSmC.js";import"./url-slug-d-Er1jOR.js";const Wt=ve({scopes:ze(de()).describe("List of scopes available"),stateSchema:Oe(de(),Me()).describe("JSON Schema (draft-07) defining the state structure")}),Yt=[{name:"MCP_CONFIGURATION",inputSchema:ve({}),outputSchema:Wt}];function Jt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l}=s,a=V();let r;e[0]!==n.id?(r={connectionId:n.id},e[0]=n.id,e[1]=r):r=e[1];const d=we(r),x=!(n.connection_type==="VIRTUAL")&&d.supportsOAuth&&!d.isAuthenticated,f=n.status!=="active",m=x||f?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==m?(h=Se("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",m),e[2]=m,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let j;e[7]!==n.title?(j=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=j):j=e[8];let N;e[9]!==n.status||e[10]!==f||e[11]!==x||e[12]!==a?(N=x?t.jsx("span",{className:"text-xs text-destructive font-medium",children:a("details.connectionInstancesPanel.needsAuthorization")}):f?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?a("details.connectionInstancesPanel.disabledError"):a("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=f,e[11]=x,e[12]=a,e[13]=N):N=e[13];let _;e[14]!==j||e[15]!==N?(_=t.jsxs("div",{className:"flex-1 min-w-0",children:[j,N]}),e[14]=j,e[15]=N,e[16]=_):_=e[16];let y;e[17]!==n||e[18]!==x||e[19]!==o||e[20]!==a?(y=x&&t.jsx(B,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>o(n),children:a("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=x,e[19]=o,e[20]=a,e[21]=y):y=e[21];let C;e[22]!==n||e[23]!==f||e[24]!==l||e[25]!==a?(C=f?t.jsxs(B,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>l(n,"active"),children:[t.jsx(ft,{size:13}),a("details.connectionInstancesPanel.enable")]}):t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>l(n,"inactive"),title:a("details.connectionInstancesPanel.disable"),"aria-label":a("details.connectionInstancesPanel.disable"),children:t.jsx(ht,{size:13})}),e[22]=n,e[23]=f,e[24]=l,e[25]=a,e[26]=C):C=e[26];let D;e[27]!==n||e[28]!==c?(D=()=>c(n),e[27]=n,e[28]=c,e[29]=D):D=e[29];let w;e[30]!==a?(w=a("details.connectionInstancesPanel.configure"),e[30]=a,e[31]=w):w=e[31];let $;e[32]!==a?($=a("details.connectionInstancesPanel.configure"),e[32]=a,e[33]=$):$=e[33];let O;e[34]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(Ae,{size:13}),e[34]=O):O=e[34];let P;e[35]!==D||e[36]!==w||e[37]!==$?(P=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:D,title:w,"aria-label":$,children:O}),e[35]=D,e[36]=w,e[37]=$,e[38]=P):P=e[38];let T;e[39]!==n||e[40]!==i?(T=()=>i(n),e[39]=n,e[40]=i,e[41]=T):T=e[41];let S;e[42]!==a?(S=a("details.connectionInstancesPanel.delete"),e[42]=a,e[43]=S):S=e[43];let b;e[44]!==a?(b=a("details.connectionInstancesPanel.delete"),e[44]=a,e[45]=b):b=e[45];let z;e[46]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(re,{size:13}),e[46]=z):z=e[46];let E;e[47]!==T||e[48]!==S||e[49]!==b?(E=t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:T,title:S,"aria-label":b,children:z}),e[47]=T,e[48]=S,e[49]=b,e[50]=E):E=e[50];let M;e[51]!==P||e[52]!==E||e[53]!==y||e[54]!==C?(M=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y,C,P,E]}),e[51]=P,e[52]=E,e[53]=y,e[54]=C,e[55]=M):M=e[55];let A;return e[56]!==M||e[57]!==h||e[58]!==g||e[59]!==_?(A=t.jsxs("div",{className:h,children:[g,_,M]}),e[56]=M,e[57]=h,e[58]=g,e[59]=_,e[60]=A):A=e[60],A}function Zt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,o=V();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let l;e[3]!==n.title?(l=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=l):l=e[4];let a;e[5]!==n||e[6]!==c?(a=()=>c(n),e[5]=n,e[6]=c,e[7]=a):a=e[7];let r;e[8]!==o?(r=o("details.connectionInstancesPanel.configure"),e[8]=o,e[9]=r):r=e[9];let d;e[10]!==o?(d=o("details.connectionInstancesPanel.configure"),e[10]=o,e[11]=d):d=e[11];let u;e[12]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ae,{size:13}),e[12]=u):u=e[12];let x;e[13]!==a||e[14]!==r||e[15]!==d?(x=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(B,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:r,"aria-label":d,children:u})}),e[13]=a,e[14]=r,e[15]=d,e[16]=x):x=e[16];let f;return e[17]!==i||e[18]!==l||e[19]!==x?(f=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,l,x]}),e[17]=i,e[18]=l,e[19]=x,e[20]=f):f=e[20],f}function es(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l,onAdd:a,isAdding:r}=s,d=V();if(n.length===0)return null;let u;e[0]!==n.length||e[1]!==d?(u=n.length===1?d("details.connectionInstancesPanel.instance"):d("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=d,e[2]=u):u=e[2];let x;e[3]!==u?(x=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[3]=u,e[4]=x):x=e[4];let f;e[5]!==r?(f=r?t.jsx(Ne,{className:"size-[13px]"}):t.jsx(pt,{size:13}),e[5]=r,e[6]=f):f=e[6];let m;e[7]!==d?(m=d("details.connectionInstancesPanel.addInstance"),e[7]=d,e[8]=m):m=e[8];let h;e[9]!==r||e[10]!==a||e[11]!==f||e[12]!==m?(h=t.jsxs(B,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:a,disabled:r,children:[f,m]}),e[9]=r,e[10]=a,e[11]=f,e[12]=m,e[13]=h):h=e[13];let g;e[14]!==x||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[x,h]}),e[14]=x,e[15]=h,e[16]=g):g=e[16];let j;if(e[17]!==n||e[18]!==o||e[19]!==c||e[20]!==i||e[21]!==l){let y;e[23]!==o||e[24]!==c||e[25]!==i||e[26]!==l?(y=C=>t.jsx(X.Suspense,{fallback:t.jsx(Zt,{instance:C,onConfigure:c}),children:t.jsx(Jt,{instance:C,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l})},C.id),e[23]=o,e[24]=c,e[25]=i,e[26]=l,e[27]=y):y=e[27],j=n.map(y),e[17]=n,e[18]=o,e[19]=c,e[20]=i,e[21]=l,e[22]=j}else j=e[22];let N;e[28]!==j?(N=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:j}),e[28]=j,e[29]=N):N=e[29];let _;return e[30]!==g||e[31]!==N?(_=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,N]}),e[30]=g,e[31]=N,e[32]=_):_=e[32],_}function ts(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const o=(c.errorMessage??"").trim()||"Unknown error";n.set(o,(n.get(o)??0)+1)}return[...n.entries()].map(([c,o])=>({message:c,count:o})).sort((c,o)=>o.count-c.count).slice(0,e)}const ss=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function ns(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const is={calls:{label:"Tool calls"},errors:{label:"Errors"}};function os(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:o}=s,i=V(),l=Ee(),a=ns(o),{data:r}=me({queryKey:ee.connectionActivity(n,o,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),{data:d}=me({queryKey:ee.connectionActivityErrors(n,o,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,isError:!0,limit:1,offset:0}),staleTime:3e5}),u=Tt(r?.logs??[],a,void 0,r?.total,d?.total),x=u.data,f=u.totalCalls>0,m=ts(r?.logs??[]),h=u.totalCalls>0?Math.round(u.totalErrors/u.totalCalls*100):0;let g;e[0]!==i?(g=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=g):g=e[1];let j;return e[2]!==g?(j=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:g}),e[2]=g,e[3]=j):j=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:u.totalCalls.toLocaleString()}),j]}),u.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:u.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),u.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(u.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),f?t.jsxs("div",{children:[t.jsx(At,{config:is,className:"h-16 w-full",children:t.jsxs($t,{data:x,barCategoryGap:"4%",children:[t.jsx(Pt,{content:t.jsx(Dt,{labelFormatter:rs}),cursor:{fill:"var(--muted)"}}),t.jsx(Ot,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:x.map(ls)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:x[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:x[x.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:i("details.connectionActivity.noActivityInThisPeriod")})}),m.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),h>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:h.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:m.map(as)})]})]})}function as(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function ls(s,e){return t.jsx(Mt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function rs(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function cs(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function ds(s){const e=U.c(22),{connectionId:n}=s,c=V(),[o,i]=X.useState("14d"),{org:l}=te();let a;e[0]!==c?(a=c("details.connectionActivity.activity"),e[0]=c,e[1]=a):a=e[1];let r;e[2]!==a?(r=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:a})}),e[2]=a,e[3]=r):r=e[3];let d;e[4]!==c?(d=c("details.connectionActivity.timeframe"),e[4]=c,e[5]=d):d=e[5];let u;e[6]!==o?(u=ss.map(j=>t.jsx("button",{type:"button","aria-pressed":o===j.value,onClick:()=>i(j.value),className:Se("px-2.5 py-1 text-xs font-medium rounded-lg transition-colors",o===j.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:j.label},j.value)),e[6]=o,e[7]=u):u=e[7];let x;e[8]!==d||e[9]!==u?(x=t.jsx("div",{role:"group","aria-label":d,className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:u}),e[8]=d,e[9]=u,e[10]=x):x=e[10];let f;e[11]!==r||e[12]!==x?(f=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[r,x]}),e[11]=r,e[12]=x,e[13]=f):f=e[13];let m;e[14]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(cs,{}),e[14]=m):m=e[14];let h;e[15]!==n||e[16]!==l.id||e[17]!==o?(h=t.jsx(X.Suspense,{fallback:m,children:t.jsx(os,{connectionId:n,orgId:l.id,timeframe:o})}),e[15]=n,e[16]=l.id,e[17]=o,e[18]=h):h=e[18];let g;return e[19]!==f||e[20]!==h?(g=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[f,h]}),e[19]=f,e[20]=h,e[21]=g):g=e[21],g}function ms(s){const e=U.c(15),{virtualMcp:n,org:c}=s,o=se();let i;e[0]!==o||e[1]!==c||e[2]!==n.id?(i=()=>{const x=crypto.randomUUID();o({to:"/$org/projects/$agentId",params:{org:c,agentId:n.id},search:{thread:x}})},e[0]=o,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(ye,{size:16}),e[4]=l):l=e[4];let a;e[5]!==n.icon||e[6]!==n.title?(a=t.jsx(ae,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:l}),e[5]=n.icon,e[6]=n.title,e[7]=a):a=e[7];let r;e[8]!==n.title?(r=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=r):r=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(_e,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=d):d=e[10];let u;return e[11]!==i||e[12]!==a||e[13]!==r?(u=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[a,r,d]}),e[11]=i,e[12]=a,e[13]=r,e[14]=u):u=e[14],u}function us(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let o;if(e[0]!==c||e[1]!==n){let l;e[3]!==c?(l=a=>t.jsx(ms,{virtualMcp:a,org:c},a.id),e[3]=c,e[4]=l):l=e[4],o=n.map(l),e[0]=c,e[1]=n,e[2]=o}else o=e[2];let i;return e[5]!==o?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:o})}),e[5]=o,e[6]=i):i=e[6],i}function xs(s){const e=U.c(13),{connection:n}=s,c=V(),{org:o}=te();let i;e[0]!==n.id?(i={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=i):i=e[1];const l=zt(i);if(!(l.length>0)){let f;return e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(t.Fragment,{}),e[2]=f):f=e[2],f}let r;e[3]!==c?(r=c("details.connectionAgentsPanel.usedByAgents"),e[3]=c,e[4]=r):r=e[4];let d;e[5]!==r?(d=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:r})}),e[5]=r,e[6]=d):d=e[6];let u;e[7]!==o.slug||e[8]!==l?(u=t.jsx("div",{className:"px-5 py-4",children:t.jsx(us,{virtualMcps:l,org:o.slug})}),e[7]=o.slug,e[8]=l,e[9]=u):u=e[9];let x;return e[10]!==d||e[11]!==u?(x=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[d,u]}),e[10]=d,e[11]=u,e[12]=x):x=e[12],x}function ps(s){const e=U.c(35),{tools:n,connectionId:c,org:o}=s,i=V(),l=se(),{org:a}=te();let r;e[0]!==c||e[1]!==a.id||e[2]!==a.slug?(r={connectionId:c,orgId:a.id,orgSlug:a.slug},e[0]=c,e[1]=a.id,e[2]=a.slug,e[3]=r):r=e[3];const d=Te(r),u=Ie(c);let x;e[4]!==u||e[5]!==c?(x=u?Pe(u):c,e[4]=u,e[5]=c,e[6]=x):x=e[6];const f=x,[m,h]=X.useState("");let g,j,N,_;if(e[7]!==f||e[8]!==d||e[9]!==l||e[10]!==o||e[11]!==m||e[12]!==i||e[13]!==n){const D=(n??[]).filter(fs),w=m.toLowerCase().trim(),$=w?D.filter(b=>b.name.toLowerCase().includes(w)||b.description&&b.description.toLowerCase().includes(w)):D;let O;e[18]!==f||e[19]!==l||e[20]!==o?(O=b=>{l({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:o,appSlug:f,collectionName:"tools",itemId:encodeURIComponent(b.name)}})},e[18]=f,e[19]=l,e[20]=o,e[21]=O):O=e[21];const P=O;N="flex flex-col h-full overflow-hidden";let T;e[22]!==i?(T=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=T):T=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=b=>{b.key==="Escape"&&(h(""),b.target.blur())},e[24]=S):S=e[24],e[25]!==m||e[26]!==T?(_=t.jsx(Vt,{value:m,onChange:h,placeholder:T,onKeyDown:S}),e[25]=m,e[26]=T,e[27]=_):_=e[27],g="flex-1 overflow-auto p-5",j=$.length===0?t.jsx(Ce,{image:null,title:i(m?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(m?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:$.map(b=>{const z=ce(b._meta);return t.jsxs(Re,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>P(b),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(X.Suspense,{fallback:t.jsx(Ue,{className:"h-full w-full"}),children:t.jsx(Ft,{resourceURI:z,toolInfo:{tool:b},displayMode:"inline",minHeight:200,maxHeight:200,client:d})})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:b.annotations?.title??b.name}),t.jsx(at,{annotations:b.annotations,_meta:b._meta})]}),b.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:b.description})]})]},b.name)})}),e[7]=f,e[8]=d,e[9]=l,e[10]=o,e[11]=m,e[12]=i,e[13]=n,e[14]=g,e[15]=j,e[16]=N,e[17]=_}else g=e[14],j=e[15],N=e[16],_=e[17];let y;e[28]!==g||e[29]!==j?(y=t.jsx("div",{className:g,children:j}),e[28]=g,e[29]=j,e[30]=y):y=e[30];let C;return e[31]!==N||e[32]!==_||e[33]!==y?(C=t.jsxs("div",{className:N,children:[_,y]}),e[31]=N,e[32]=_,e[33]=y,e[34]=C):C=e[34],C}function fs(s){return!!ce(s._meta)}const je=[];function De(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=l=>l.charAt(0).toUpperCase()+l.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),o=e.map(n),i=e[e.length-1];return o.length>=2&&i&&c.has(i)?[o.pop(),...o].join(" "):o.join(" ")}function le(s){const e=U.c(5),{label:n}=s,c=V();let o;e[0]!==n||e[1]!==c?(o=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=o):o=e[2];let i;return e[3]!==o?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o})}),e[3]=o,e[4]=i):i=e[4],i}function hs(s){const e=U.c(68),{tools:n,prompts:c,resources:o,connectionId:i,org:l}=s,a=c===void 0?je:c,r=o===void 0?je:o,d=V(),u=se(),x=Ie(i??"");let f;e[0]!==x||e[1]!==i?(f=x?Pe(x):i,e[0]=x,e[1]=i,e[2]=f):f=e[2];const m=f;let h;e[3]!==m||e[4]!==i||e[5]!==u||e[6]!==l?(h=function(I){!i||!l||u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:m,collectionName:"tools",itemId:encodeURIComponent(I)}})},e[3]=m,e[4]=i,e[5]=u,e[6]=l,e[7]=h):h=e[7];const g=h;let j;e[8]!==i||e[9]!==l||e[10]!==n?(j=i&&l&&n.some(bs),e[8]=i,e[9]=l,e[10]=n,e[11]=j):j=e[11];const N=j;if(n.length+a.length+r.length===0){let v;e[12]!==d?(v=d("details.connectionCapabilities.capabilities"),e[12]=d,e[13]=v):v=e[13];let I;e[14]!==v?(I=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:v}),e[14]=v,e[15]=I):I=e[15];let k;e[16]!==d?(k=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[16]=d,e[17]=k):k=e[17];let F;e[18]!==k?(F=t.jsx("p",{className:"text-sm text-muted-foreground",children:k}),e[18]=k,e[19]=F):F=e[19];let W;return e[20]!==I||e[21]!==F?(W=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[I,F]}),e[20]=I,e[21]=F,e[22]=W):W=e[22],W}let y;e[23]!==d||e[24]!==n.length?(y=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[23]=d,e[24]=n.length,e[25]=y):y=e[25];let C;e[26]!==y?(C=t.jsx(ie,{value:"tools",variant:"underline",children:y}),e[26]=y,e[27]=C):C=e[27];let D;e[28]!==N||e[29]!==d?(D=N&&t.jsx(ie,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[28]=N,e[29]=d,e[30]=D):D=e[30];let w;e[31]!==d?(w=d("details.connectionCapabilities.promptsTab"),e[31]=d,e[32]=w):w=e[32];let $;e[33]!==w?($=t.jsx(ie,{value:"prompts",variant:"underline",children:w}),e[33]=w,e[34]=$):$=e[34];let O;e[35]!==d?(O=d("details.connectionCapabilities.resourcesTab"),e[35]=d,e[36]=O):O=e[36];let P;e[37]!==O?(P=t.jsx(ie,{value:"resources",variant:"underline",children:O}),e[37]=O,e[38]=P):P=e[38];let T;e[39]!==$||e[40]!==P||e[41]!==C||e[42]!==D?(T=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(Et,{variant:"underline",className:"gap-1",children:[C,D,$,P]})}),e[39]=$,e[40]=P,e[41]=C,e[42]=D,e[43]=T):T=e[43];let S;e[44]!==g||e[45]!==n?(S=n.length>0?n.map(v=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>g(v.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(jt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:De(v.name)}),v.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:v.description})]}),t.jsx(_e,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},v.name)):t.jsx(le,{label:"tools"}),e[44]=g,e[45]=n,e[46]=S):S=e[46];let b;e[47]!==S?(b=t.jsx(oe,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:S})}),e[47]=S,e[48]=b):b=e[48];let z;e[49]!==i||e[50]!==N||e[51]!==l||e[52]!==n?(z=N&&t.jsx(oe,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ps,{tools:n,connectionId:i,org:l})}),e[49]=i,e[50]=N,e[51]=l,e[52]=n,e[53]=z):z=e[53];let E;e[54]!==a?(E=a.length>0?a.map(js):t.jsx(le,{label:"prompts"}),e[54]=a,e[55]=E):E=e[55];let M;e[56]!==E?(M=t.jsx(oe,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:E})}),e[56]=E,e[57]=M):M=e[57];let A;e[58]!==r?(A=r.length>0?r.map(gs):t.jsx(le,{label:"resources"}),e[58]=r,e[59]=A):A=e[59];let R;e[60]!==A?(R=t.jsx(oe,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[60]=A,e[61]=R):R=e[61];let p;return e[62]!==T||e[63]!==b||e[64]!==z||e[65]!==M||e[66]!==R?(p=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Rt,{defaultValue:"tools",variant:"underline",children:[T,b,z,M,R]})}),e[62]=T,e[63]=b,e[64]=z,e[65]=M,e[66]=R,e[67]=p):p=e[67],p}function gs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(gt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function js(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Ut,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:De(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function bs(s){return ce(s._meta)}function vs(s){const e=U.c(13),{connection:n,displayTitle:c}=s,o=c??n.title;let i;e[0]!==n.icon||e[1]!==o?(i=t.jsx(ae,{icon:n.icon,name:o,size:"md",className:"shrink-0"}),e[0]=n.icon,e[1]=o,e[2]=i):i=e[2];let l;e[3]!==o?(l=t.jsx(Fe.Title,{children:o}),e[3]=o,e[4]=l):l=e[4];let a;e[5]!==n.description?(a=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=a):a=e[6];let r;e[7]!==l||e[8]!==a?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[l,a]}),e[7]=l,e[8]=a,e[9]=r):r=e[9];let d;return e[10]!==i||e[11]!==r?(d=t.jsxs("div",{className:"flex items-center px-4 md:px-8 bg-background border-b border-border shrink-0 gap-3 py-4",children:[i,r]}),e[10]=i,e[11]=r,e[12]=d):d=e[12],d}function Ns({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:o}){const i=V(),l=ue({control:s.control,name:"ui_type"}),a=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Ve(),d=(()=>{if(typeof a!="string"||!a)return!1;try{const m=new URL(a);return m.hostname==="api.githubcopilot.com"&&m.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),u=r||e.connection_type==="STDIO",x=e.connection_type==="VIRTUAL",f=x?Qt(e.connection_url):null;return x?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.type")}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(ye,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),f&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:f})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(q,{control:s.control,name:"ui_type",render:({field:m})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),l!=="NPX"&&l!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(pe,{value:m.value,onValueChange:m.onChange,children:[t.jsx(L,{children:t.jsxs(fe,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(ne,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(he,{})]})}),t.jsxs(ge,{children:[t.jsx(G,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(G,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(G,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),u&&t.jsxs(t.Fragment,{children:[t.jsx(G,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(G,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(q,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(H,{className:"flex-1 min-w-0",children:t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(pe,{value:m.value,onValueChange:m.onChange,children:[t.jsx(L,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(G,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(G,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(G,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),u&&t.jsxs(t.Fragment,{children:[t.jsx(G,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(qt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(G,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ht,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(Q,{})]})}),l==="NPX"&&t.jsx(q,{control:s.control,name:"npx_package",render:({field:m})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})}),l==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(q,{control:s.control,name:"stdio_command",render:({field:m})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})}),t.jsx(q,{control:s.control,name:"stdio_args",render:({field:m})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(Q,{})]})})]}),t.jsx(q,{control:s.control,name:"stdio_cwd",render:({field:m})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(L,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),t.jsx(Q,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(q,{control:s.control,name:"env_vars",render:({field:m})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(L,{children:t.jsx(Je,{value:m.value??[],onChange:m.onChange})}),t.jsx(Q,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(q,{control:s.control,name:"connection_token",render:({field:m})=>t.jsxs(H,{className:"flex flex-col gap-3",children:[t.jsx(K,{className:"text-xs text-muted-foreground font-medium",children:i(d?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Le,{children:[t.jsx(Be,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(Lt,{variant:"success",className:"gap-1.5",children:[t.jsx(Bt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Gt,{size:12})]})})}),t.jsxs(Ge,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(bt,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:o,children:[t.jsx(re,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&m.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>m.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity rounded-lg",title:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Kt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(L,{children:t.jsx(J,{type:"password",placeholder:i(d?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...m,value:m.value||"",className:"h-10 rounded-lg"})}),d&&t.jsxs(Ct,{children:[i("details.connectionSidebar.createAPatAt")," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(Q,{})]})})]})}function Ss(s){return s.command==="npx"}function ys(s){return s.args?.find(e=>!e.startsWith("-"))??""}function _s(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function be(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Xt(s.connection_headers)){const c=s.connection_headers,o=et(c.envVars);if(Ss(c)){const l=ys(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:l,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:o}}const i=_s(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:o}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function Cs(s){let e,n=null,c=!1,o=null,i=null;return s.ui_type==="NPX"?(e="STDIO",n="",i=tt(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",i=st(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",c=s.connection_token!==null&&s.connection_token!==void 0,o=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:o},...i&&{connection_headers:i},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ws({connection:s,connectionId:e,org:n,isUpdating:c,tools:o,prompts:i,resources:l,siblings:a}){const r=V(),d=se({from:"/$org/settings/connections/$appSlug"}),u=Qe(),x=ke(),{org:f}=te(),m=It({onSuccess:()=>{a.length<=1&&d({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=X.useState(null),[j,N]=X.useState(!1),_=we({connectionId:e}),{data:y}=lt(),C=y?.data?.members??[],D=h??s,w=C.find(p=>p.userId===D.created_by),O=s?.connection_type==="VIRTUAL"||_.isAuthenticated,P={...s,tools:o},T=nt(P,Yt),S=Xe({resolver:We(Ze),values:be(h??s)}),b=S.formState.isDirty,z=async()=>{if(!await S.trigger())return;const v=S.getValues(),I=Cs(v),k=h?.id??e;await x.update.mutateAsync({id:k,data:I}),S.reset(v)},E=()=>{S.reset(be(h??s))},M=async p=>{const v=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:I,tokenInfo:k,error:F}=await xt({connectionId:p,orgSlug:f.slug,...v?{scope:v}:{}});if(F||!I){Y.error(r("details.connection.authFailed",{error:F??""}));return}if(k)try{const Z=await fetch(`/api/${f.slug}/connections/${p}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:k.accessToken,refreshToken:k.refreshToken,expiresIn:k.expiresIn,scope:k.scope,clientId:k.clientId,clientSecret:k.clientSecret,tokenEndpoint:k.tokenEndpoint})});if(!Z.ok)console.error("Failed to save OAuth token:",await Z.text()),await x.update.mutateAsync({id:p,data:{connection_token:I}});else try{await x.update.mutateAsync({id:p,data:{}})}catch($e){console.warn("Failed to refresh connection tools after OAuth:",$e)}}catch(Z){console.error("Error saving OAuth token:",Z),await x.update.mutateAsync({id:p,data:{connection_token:I}})}else await x.update.mutateAsync({id:p,data:{connection_token:I}});const W=new URL(`/api/${f.slug}/mcp/${p}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(W.href,null)}),await u.invalidateQueries({queryKey:ee.mcpClientPrefix()}),Y.success(r("details.connection.authSuccess"))},A=()=>M(s.id),R=async()=>{try{const p=await fetch(`/api/${f.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!p.ok){const I=await p.text();Y.error(r("details.connection.failedRemoveOAuth",{error:I}));return}const v=new URL(`/api/${f.slug}/mcp/${s.id}`,window.location.origin);await u.invalidateQueries({queryKey:ee.isMCPAuthenticated(v.href,null)}),Y.success(r("details.connection.oauthRemoved"))}catch(p){console.error("Error removing OAuth token:",p),Y.error(r("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(kt,{...m}),t.jsx(vt,{open:h!==null,onOpenChange:p=>{p||g(null)},children:t.jsxs(Nt,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(St,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(yt,{className:"text-base",children:h?.title??s.title}),t.jsx(_t,{className:"text-xs",children:r("details.connection.settingsDescription")}),w&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:r("details.connection.connectedBy")}),t.jsx(rt,{url:w.user?.image??void 0,fallback:w.user?.name??w.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:w.user?.name||w.user?.email})]})]}),t.jsxs(wt,{...S,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(q,{control:S.control,name:"title",render:({field:p})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.nameLabel")}),t.jsx(L,{children:t.jsx(J,{...p})}),t.jsx(Q,{})]})}),t.jsx(q,{control:S.control,name:"description",render:({field:p})=>t.jsxs(H,{children:[t.jsx(K,{children:r("details.connection.descriptionLabel")}),t.jsx(L,{children:t.jsx(J,{...p,value:p.value||""})}),t.jsx(Q,{})]})})]}),t.jsx(Ns,{form:S,connection:h??s,hasOAuthToken:_.hasOAuthToken,onReauthenticate:A,onRemoveOAuth:R}),t.jsx(it,{connection:h??s,form:S,hasMcpBinding:T,isMCPAuthenticated:O,supportsOAuth:_.supportsOAuth,isServerError:_.isServerError,onAuthenticate:A,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(B,{onClick:z,disabled:!b||c,className:"flex-1",children:r(c?"details.connection.savingButton":"details.connection.saveButton")}),b&&t.jsx(B,{variant:"outline",onClick:E,children:r("details.connection.undoButton")}),t.jsxs(B,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const p=h??s;g(null),m.requestDelete(p)},children:[t.jsx(re,{size:15}),r("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(ot,{children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(vs,{connection:s,displayTitle:(()=>{const p=a[0]??s;return p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(ds,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(es,{instances:a,onConfigure:p=>g(p),onAuthenticate:p=>M(p.id),onDelete:p=>m.requestDelete(p),onToggleStatus:async(p,v)=>{try{await x.update.mutateAsync({id:p.id,data:{status:v}}),Y.success(r(v==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{Y.error(r("details.connection.failedUpdateConnection"))}},isAdding:j,onAdd:async()=>{N(!0);try{const p=a[0]??s,v=p.title.replace(/\s*\(\d+\)\s*$/,""),I=a.length+1,k=`${v} (${I})`,F=Ye("conn");await x.create.mutateAsync({id:F,title:k,description:p.description??null,connection_type:p.connection_type,connection_url:p.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:p.created_by,organization_id:p.organization_id,icon:p.icon??null,app_name:p.app_name??null,app_id:p.app_id??null,connection_headers:p.connection_headers??null,oauth_config:null,configuration_state:p.configuration_state??null,metadata:null,tools:null,bindings:null});const W=new URL(`/api/${f.slug}/mcp/${F}`,window.location.origin),Z=await ut({url:W.href,token:null,orgId:f.id});Z.supportsOAuth&&!Z.isAuthenticated&&await M(F)}catch(p){console.error("Failed to add connection instance:",p),Y.error(r("details.connection.failedAddInstance"))}finally{N(!1)}}}),t.jsx(xs,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(hs,{tools:o,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function Is(){const s=U.c(43),e=V();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=se(n);let o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug"},s[1]=o):o=s[1];const{appSlug:i,org:l}=He(o),{org:a}=te(),r=ke();let d;s[2]!==i?(d={slug:i},s[2]=i,s[3]=d):d=s[3];const u=ct(d),[x,f]=X.useState(null),m=u.find(A=>A.id===x)??u[0]??null;m&&m.id!==x&&f(m.id);const h=m?.id??"",g=Te({connectionId:h||null,orgId:a.id,orgSlug:a.slug});let j;s[4]!==g?(j={client:g},s[4]=g,s[5]=j):j=s[5];const{data:N}=dt(j),_=N?N.tools.map($s):(m?.tools??[]).map(Ds);let y;e:{if(u.length<=1){y=_;break e}const A=new Set,R=[],p=As;for(const v of u){const I=v.id===h?_:p(v.tools);for(const k of I)A.has(k.name)||(A.add(k.name),R.push(k))}y=R.length>0?R:_}const C=y;let D;s[6]!==g?(D={client:g},s[6]=g,s[7]=D):D=s[7];const{data:w}=mt(D);let $;s[8]!==g?($={client:g},s[8]=g,s[9]=$):$=s[9];const{data:O}=Ke($);let P;s[10]!==w?.prompts?(P=w?.prompts??[],s[10]=w?.prompts,s[11]=P):P=s[11];let T;s[12]!==P?(T=P.map(Ts),s[12]=P,s[13]=T):T=s[13];const S=T;let b;s[14]!==O?.resources?(b=O?.resources??[],s[14]=O?.resources,s[15]=b):b=s[15];let z;s[16]!==b?(z=b.map(ks),s[16]=b,s[17]=z):z=s[17];const E=z;if(!m){let A;s[18]!==e?(A=e("details.connection.notFoundTitle"),s[18]=e,s[19]=A):A=s[19];let R;s[20]!==e?(R=e("details.connection.notFoundDescription"),s[20]=e,s[21]=R):R=s[21];let p;s[22]!==c||s[23]!==l?(p=()=>c({to:"/$org/settings/connections",params:{org:l}}),s[22]=c,s[23]=l,s[24]=p):p=s[24];let v;s[25]!==e?(v=e("details.connection.backButton"),s[25]=e,s[26]=v):v=s[26];let I;s[27]!==p||s[28]!==v?(I=t.jsx(B,{variant:"outline",onClick:p,children:v}),s[27]=p,s[28]=v,s[29]=I):I=s[29];let k;return s[30]!==A||s[31]!==R||s[32]!==I?(k=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ce,{title:A,description:R,actions:I})}),s[30]=A,s[31]=R,s[32]=I,s[33]=k):k=s[33],k}let M;return s[34]!==r.update.isPending||s[35]!==C||s[36]!==m||s[37]!==h||s[38]!==l||s[39]!==S||s[40]!==E||s[41]!==u?(M=t.jsx(ws,{org:l,connection:m,connectionId:h,isUpdating:r.update.isPending,tools:C,prompts:S,resources:E,siblings:u}),s[34]=r.update.isPending,s[35]=C,s[36]=m,s[37]=h,s[38]=l,s[39]=S,s[40]=E,s[41]=u,s[42]=M):M=s[42],M}function ks(s){return{name:s.name,description:s.description,uri:s.uri}}function Ts(s){return{name:s.name,description:s.description}}function As(s){return(s??[]).map(Ps)}function Ps(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ds(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function $s(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Os(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(qe,{children:t.jsx(X.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ne,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Is,{})})}),s[0]=e):e=s[0],e}function Si(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Os,{}),s[0]=e):e=s[0],e}export{Si as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{av as R,cS as A,cQ as I,aw as o,bP as j,bO as z,c as L,j as u,B as C}from"./index-D_7jfHk6.js";import{I as H}from"./input-B0doV0os.js";import{s as W}from"./Plus-nldAzVeQ.js";import{s as q}from"./Trash01-DAoFHSpp.js";const K=R({key:o().min(1,"Key is required"),value:o()}),M=R({title:o().min(1,"Name is required"),description:o().nullable().optional(),icon:o().nullable().optional(),ui_type:z(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:o().optional(),connection_token:o().nullable().optional(),npx_package:o().optional(),stdio_command:o().optional(),stdio_args:o().optional(),stdio_cwd:o().optional(),env_vars:j(K).optional(),configuration_scopes:j(o()).nullable().optional(),configuration_state:A(o(),I()).nullable().optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(n=>(n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket")&&n.connection_url?.trim()?o().url().safeParse(n.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function O(n){const e=n.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(i=>e.includes(i))||["sk_","rk_","whsec_","pk_live","sk_live"].some(i=>e.startsWith(i))||["_key","_secret","_token","_password","_auth","_pat"].some(i=>e.endsWith(i)))}function X(n){const e=L.c(34),{value:t,onChange:r,keyPlaceholder:a,valuePlaceholder:i,className:v}=n,m=a===void 0?"VARIABLE_NAME":a,h=i===void 0?"value...":i;let b;e[0]!==r||e[1]!==t?(b=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=b):b=e[2];const N=b;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((p,s)=>s!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const y=x;let P;e[6]!==r||e[7]!==t?(P=(l,p)=>{const s=[...t],c=s[l];c&&(s[l]={key:p,value:c.value},r(s))},e[6]=r,e[7]=t,e[8]=P):P=e[8];const g=P;let T;e[9]!==r||e[10]!==t?(T=(l,p)=>{const s=[...t],c=s[l];c&&(s[l]={key:c.key,value:p},r(s))},e[9]=r,e[10]=t,e[11]=T):T=e[11];const k=T;let f;if(e[12]!==g||e[13]!==y||e[14]!==k||e[15]!==m||e[16]!==t||e[17]!==h){let l;e[19]!==g||e[20]!==y||e[21]!==k||e[22]!==m||e[23]!==h?(l=(p,s)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(H,{placeholder:m,value:p.key,onChange:c=>g(s,c.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),u.jsx(H,{type:O(p.key)?"password":"text",placeholder:h,value:p.value,onChange:c=>k(s,c.target.value),className:"h-10 rounded-lg flex-1"}),u.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>y(s),children:u.jsx(q,{size:16})})]},s),e[19]=g,e[20]=y,e[21]=k,e[22]=m,e[23]=h,e[24]=l):l=e[24],f=t.map(l),e[12]=g,e[13]=y,e[14]=k,e[15]=m,e[16]=t,e[17]=h,e[18]=f}else f=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=u.jsx(W,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let d;e[26]!==N?(d=u.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:N,children:[w,"Add Environment Variable"]}),e[26]=N,e[27]=d):d=e[27];let _;e[28]!==f||e[29]!==d?(_=u.jsxs("div",{className:"flex flex-col gap-2",children:[f,d]}),e[28]=f,e[29]=d,e[30]=_):_=e[30];let E;return e[31]!==v||e[32]!==_?(E=u.jsx("div",{className:v,children:_}),e[31]=v,e[32]=_,e[33]=E):E=e[33],E}function V(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function D(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function S(n){const e=n.trim();if(!e)return"";try{const t=new URL(e),r=t.pathname.length>1?t.pathname.replace(/\/+$/,""):t.pathname;return`${t.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function F(n){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const t=e[0]?.toLowerCase();if(t!=="npx"&&t!=="bunx")return null;const a=e.slice(1).find(i=>!i.startsWith("-"));return a?{packageName:a}:null}function Y(n){const{uiType:e}=n,t=S(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===S("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const r=(n.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function Q(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=S(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(i=>(i.server?.remotes??[]).some(m=>S(m.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",a=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:a}:null}function J(n,e){const t={command:"npx",args:["-y",n]},r=V(e);return Object.keys(r).length>0&&(t.envVars=r),t}function Z(n,e,t,r){const a={command:n};e.trim()&&(a.args=e.trim().split(/\s+/)),t?.trim()&&(a.cwd=t.trim());const i=V(r);return Object.keys(i).length>0&&(a.envVars=i),a}export{X as E,Q as a,J as b,M as c,Z as d,Y as i,F as p,D as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as z,c as W,b as te,j as t,B as L,h as de,l as he,G as ie,F as We,I as Xe,H as Ge,E as Qe,X as ke,d as Te,u as qe,a as we,R as Je,ae as ye,U as Ye,V as Ze,au as et,at as tt,n as pe,q as ee,o as nt,a2 as st,t as R,aW as ot,K as it}from"./index-D_7jfHk6.js";import{a as Ae,g as ct,e as lt}from"./extract-connection-data-Q_j_fmQx.js";import{C as rt}from"./collection-display-button-XaptFv9u.js";import{S as at}from"./search-input-DpJBHwWo.js";import{C as dt}from"./collection-tabs-Cw7XLgNG.js";import{C as Ce,u as Ie,g as ut}from"./connection-card-Cvk5T5vt.js";import{E as gt}from"./empty-state-DnQ_qEjI.js";import{u as mt,D as pt}from"./use-delete-connection-BLZ4VLoa.js";import{u as ft}from"./use-infinite-scroll-B02yfFGd.js";import{u as Pe}from"./use-mobile-DF1FX6Xv.js";import{g as ae}from"./connection-slug-CITJ0kGN.js";import{A as ht,a as xt,b as jt,c as St,g as yt,d as Ct,e as vt,f as bt}from"./alert-dialog-kjq4dW3k.js";import{n as xe}from"./LinkBroken01-kK_na_OL.js";import{g as _t,a as Nt}from"./metadata-D72DunRR.js";import{d as Me,h as $e,c as Oe,e as Fe,b as Ue,D as Ve}from"./dialog-DRpbbWU1.js";import{D as Dt,a as kt,d as Tt,b as wt,e as At,f as It,g as Pt}from"./drawer-CXs6iEYK.js";import{F as Q,b as q,c as J,d as Y,f as Z,a as Ne}from"./form-BBtB5neb.js";import{I as se}from"./input-B0doV0os.js";import{S as Mt,b as $t,a as Ot,d as Ft,c as re}from"./select-CZdnCwuC.js";import{T as Ut}from"./textarea-DaHaRA0Z.js";import{b as ze,u as Vt}from"./use-connection-5LUEsGlJ.js";import{m as zt}from"./use-mcp-client-MUIIizLf.js";import{b as Et}from"./repository-binding-DpX8yLri.js";import{g as Lt}from"./types-Blm6OQRg.js";import{A as Bt,bA as Kt,ay as Ht,bd as Rt,u as Se}from"./agent-icon-CnnNyirr.js";import{s as Ee}from"./Plus-nldAzVeQ.js";import{c as Wt}from"./UserSquare-BMOlWqCu.js";import{s as Le}from"./XClose-DBJ7sD1T.js";import{s as Xt}from"./use-project-scope-BMVXwaQ4.js";import{i as fe,a as De,E as Gt,c as Qt,p as qt,b as Jt,d as Yt}from"./connection-form-helpers-D4Q7rLyt.js";import{a as Zt}from"./authenticate-and-persist-oauth-eDHShxj5.js";import{I as en}from"./integration-icon-BM3EOzpn.js";import{C as Be}from"./checkbox-B2kVXKBD.js";import{i as tn}from"./DotsVertical-aHYBPlin.js";import{s as Ke}from"./Image01-Cxa392ef.js";import{s as He}from"./Trash01-DAoFHSpp.js";import"./connection-FKmTBjan.js";import"./url-slug-d-Er1jOR.js";import"./ArrowUp-DR-Jhbl1.js";import"./SwitchHorizontal01-Bx3d-jDI.js";import"./tooltip-BULKkf4A.js";import"./index-D1CuHcEn.js";import"./view-mode-toggle-CVVPadaN.js";import"./badge-CKM84j2S.js";import"./SearchMd-BiZNveM1.js";import"./useInfiniteQuery-eYXaZ_bo.js";import"./infiniteQueryObserver-DG8sBe4B.js";import"./slugify-CEUa2lfQ.js";import"./X-DzPShgV5.js";import"./label-DxOPcXJe.js";import"./index-BdQq_4o_.js";import"./ChevronUp-CceLPRrE.js";import"./auth-Cps-90jQ.js";import"./AlertCircle-C3fpFT5I.js";import"./Tool01-Blw6F5iV.js";import"./ArrowLeft-C1IFj0Ic.js";import"./ShoppingBag01-o0DdjJD9.js";import"./ZoomOut-CQckFmS9.js";import"./Building02-uHT4KVtK.js";import"./CheckCircle-BKHstO_Q.js";import"./ChevronSelectorVertical-DAO6R1Op.js";import"./Copy01-Dx3ZT0bA.js";import"./CreditCard01-Dko0T335.js";import"./Globe04-BDe-0jS0.js";import"./Key01-BHiUNW_5.js";import"./Link01-BRZRc4wX.js";import"./LinkExternal01-CILXo-bC.js";import"./Monitor01-Cl4JLYVa.js";import"./Sun-BYGxydmh.js";import"./Play-CzTcIQz_.js";import"./Upload01-CtKBhqsv.js";import"./User01-Awky2MVQ.js";import"./Users01-D7ZFKC4W.js";import"./mcp-oauth-C5T-IVs8.js";function nn(s){const e=`deco-filters-${s}`,[n,g]=z.useState(()=>{try{const i=globalThis.localStorage?.getItem(e);if(i)return JSON.parse(i)}catch(i){console.error("Failed to parse stored filters:",i)}return[]});return[n,i=>{g(i);try{globalThis.localStorage?.setItem(e,JSON.stringify(i))}catch(l){console.error("Failed to save filters:",l)}}]}function sn(s){const e=W.c(7),[n,g]=z.useState(s),[o,i]=z.useState(s?"desc":null);let l;e[0]!==o||e[1]!==n?(l=p=>{n!==p?(g(p),i("asc")):o==="asc"?i("desc"):o==="desc"&&(g(void 0),i(null))},e[0]=o,e[1]=n,e[2]=l):l=e[2];const r=l;let d;return e[3]!==r||e[4]!==o||e[5]!==n?(d={sortKey:n,sortDirection:o,handleSort:r},e[3]=r,e[4]=o,e[5]=n,e[6]=d):d=e[6],d}function on(s,e){const n=W.c(12),g=e===void 0?"cards":e,o=Pe(),i=z.useRef(o),l=s?`deco-view-mode-${s}`:"deco-view-mode";let r;n[0]!==g||n[1]!==l?(r=()=>{const j=globalThis.localStorage?.getItem(l);return j==="cards"||j==="table"?j:g},n[0]=g,n[1]=l,n[2]=r):r=n[2];const[d,p]=z.useState(r);let m;n[3]!==l?(m=j=>{p(j),globalThis.localStorage?.setItem(l,j)},n[3]=l,n[4]=m):m=n[4];const u=m;let a,x;n[5]!==o||n[6]!==d?(a=()=>{!i.current&&o&&d==="table"&&p("cards"),i.current=o},x=[o,d],n[5]=o,n[6]=d,n[7]=a,n[8]=x):(a=n[7],x=n[8]),z.useEffect(a,x);let f;return n[9]!==u||n[10]!==d?(f=[d,u],n[9]=u,n[10]=d,n[11]=f):f=n[11],f}function cn(s){const e=W.c(20),{namespace:n,resource:g,defaultSortKey:o,defaultViewMode:i}=s,l=o===void 0?"title":o,r=i===void 0?"table":i,[d,p]=z.useState(""),m=z.useDeferredValue(d),u=`${n}-${g}`,[a,x]=nn(u),f=`studio-${g}-filter-visible-${n}`;let j;e[0]!==f?(j=()=>globalThis.localStorage?.getItem(f)==="true",e[0]=f,e[1]=j):j=e[1];const[S,C]=z.useState(j);let y;e[2]!==f?(y=$=>{C($),globalThis.localStorage?.setItem(f,String($))},e[2]=f,e[3]=y):y=e[3];const c=y;let h;e[4]!==S||e[5]!==c?(h=()=>{c(!S)},e[4]=S,e[5]=c,e[6]=h):h=e[6];const A=h,[T,w]=on(`studio-${g}-${n}`,r),{sortKey:M,sortDirection:I,handleSort:O}=sn(l),P=M;let D;return e[7]!==S||e[8]!==a||e[9]!==O||e[10]!==d||e[11]!==m||e[12]!==c||e[13]!==x||e[14]!==w||e[15]!==I||e[16]!==P||e[17]!==A||e[18]!==T?(D={search:d,searchTerm:m,setSearch:p,filters:a,setFilters:x,filterBarVisible:S,setFilterBarVisible:c,toggleFilterBar:A,viewMode:T,setViewMode:w,sortKey:P,sortDirection:I,handleSort:O},e[7]=S,e[8]=a,e[9]=O,e[10]=d,e[11]=m,e[12]=c,e[13]=x,e[14]=w,e[15]=I,e[16]=P,e[17]=A,e[18]=T,e[19]=D):D=e[19],D}function ln(s){const e=W.c(35),{open:n,onOpenChange:g,count:o,onConfirm:i}=s,l=te(),r=o===1?"orgs.bulkDeleteDialog.deleteTitleSingular":"orgs.bulkDeleteDialog.deleteTitlePlural";let d;e[0]!==o||e[1]!==l||e[2]!==r?(d=l(r,{count:o}),e[0]=o,e[1]=l,e[2]=r,e[3]=d):d=e[3];let p;e[4]!==d?(p=t.jsx(ht,{children:d}),e[4]=d,e[5]=p):p=e[5];const m=o===1?"orgs.bulkDeleteDialog.deleteDescriptionSingular":"orgs.bulkDeleteDialog.deleteDescriptionPlural";let u;e[6]!==l||e[7]!==m?(u=l(m),e[6]=l,e[7]=m,e[8]=u):u=e[8];let a;e[9]!==u?(a=t.jsx(xt,{children:u}),e[9]=u,e[10]=a):a=e[10];let x;e[11]!==p||e[12]!==a?(x=t.jsxs(jt,{children:[p,a]}),e[11]=p,e[12]=a,e[13]=x):x=e[13];let f;e[14]!==l?(f=l("orgs.bulkDeleteDialog.cancelButton"),e[14]=l,e[15]=f):f=e[15];let j;e[16]!==f?(j=t.jsx(St,{children:f}),e[16]=f,e[17]=j):j=e[17];const S=o===1?"orgs.bulkDeleteDialog.deleteButtonSingular":"orgs.bulkDeleteDialog.deleteButtonPlural";let C;e[18]!==o||e[19]!==l||e[20]!==S?(C=l(S,{count:o}),e[18]=o,e[19]=l,e[20]=S,e[21]=C):C=e[21];let y;e[22]!==i||e[23]!==C?(y=t.jsx(yt,{onClick:i,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:C}),e[22]=i,e[23]=C,e[24]=y):y=e[24];let c;e[25]!==y||e[26]!==j?(c=t.jsxs(Ct,{children:[j,y]}),e[25]=y,e[26]=j,e[27]=c):c=e[27];let h;e[28]!==c||e[29]!==x?(h=t.jsxs(vt,{children:[x,c]}),e[28]=c,e[29]=x,e[30]=h):h=e[30];let A;return e[31]!==g||e[32]!==n||e[33]!==h?(A=t.jsx(bt,{open:n,onOpenChange:g,children:h}),e[31]=g,e[32]=n,e[33]=h,e[34]=A):A=e[34],A}function rn(s){const e=W.c(39),{item:n,canManage:g,allConnections:o,connectedAppNames:i,connectingItemId:l,onNavigateConnected:r,onConnect:d}=s,p=te();let m,u;e[0]!==i||e[1]!==n?(m=Ae(n)??"",u=i.has(m),e[0]=i,e[1]=n,e[2]=m,e[3]=u):(m=e[2],u=e[3]);const a=u;let x;e[4]!==n._meta?(x=_t(n._meta),e[4]=n._meta,e[5]=x):x=e[5];const f=x,j=f?.friendlyName||f?.friendly_name||n.server?.title||n.title||n.server?.name||n.name||n.id||"",S=n.server?.description||n.description||null;let C;e[6]!==n.server?.icons?.[0]?.src||e[7]!==n.server?.repository?(C=n.server?.icons?.[0]?.src||Nt(n.server?.repository)||null,e[6]=n.server?.icons?.[0]?.src,e[7]=n.server?.repository,e[8]=C):C=e[8];const y=C;let c;if(e[9]!==o||e[10]!==m){let V;e[12]!==m?(V=b=>b.connection_type!=="VIRTUAL"&&b.app_name===m,e[12]=m,e[13]=V):V=e[13],c=o.filter(V),e[9]=o,e[10]=m,e[11]=c}else c=e[11];const h=c,A=a||g;let T,w;e[14]!==h||e[15]!==a||e[16]!==n||e[17]!==d||e[18]!==r?(T=()=>{if(a){const V=h[0];V&&r(V);return}w()},w=()=>d(n),e[14]=h,e[15]=a,e[16]=n,e[17]=d,e[18]=r,e[19]=T,e[20]=w):(T=e[19],w=e[20]);let M;e[21]!==S||e[22]!==y||e[23]!==j?(M={title:j,description:S,icon:y},e[21]=S,e[22]=y,e[23]=j,e[24]=M):M=e[24];let I;e[25]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(xe,{}),e[25]=I):I=e[25];const O=A?T:void 0;let P;e[26]!==g||e[27]!==l||e[28]!==w||e[29]!==a||e[30]!==n.id||e[31]!==p?(P=a?t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:p("orgs.catalogItemCard.connected")}):g&&t.jsx(L,{variant:"outline",size:"sm",className:"h-7 px-3 text-sm font-medium",disabled:l!==null,onClick:V=>{V.stopPropagation(),w()},children:l===n.id?t.jsx(de,{className:"size-3.5"}):p("orgs.catalogItemCard.connect")}),e[26]=g,e[27]=l,e[28]=w,e[29]=a,e[30]=n.id,e[31]=p,e[32]=P):P=e[32];let D;e[33]!==P?(D=t.jsx("div",{className:"flex items-center gap-2",children:P}),e[33]=P,e[34]=D):D=e[34];let $;return e[35]!==M||e[36]!==O||e[37]!==D?($=t.jsx(Ce,{connection:M,fallbackIcon:I,onClick:O,headerActionsAlwaysVisible:!0,headerActions:D}),e[35]=M,e[36]=O,e[37]=D,e[38]=$):$=e[38],$}function an(s){return s?.length?{appToolName:s.find(n=>!!Lt(n._meta))?.name??null}:null}const dn=3;function un(s){const e=new Map;for(const n of s)for(const g of n.connections??[]){const o=e.get(g.connection_id)??[];o.push(n),e.set(g.connection_id,o)}return e}function gn(s){const e=W.c(21),{projects:n}=s,g=te();if(n.length===0){let u;e[0]!==g?(u=g("projects.connections.orgWide"),e[0]=g,e[1]=u):u=e[1];let a;return e[2]!==u?(a=t.jsx("span",{className:"text-xs text-muted-foreground",children:u}),e[2]=u,e[3]=a):a=e[3],a}let o,i,l;if(e[4]!==n){const u=n.slice(0,dn);l="flex min-w-0 items-center gap-2",o="flex shrink-0 -space-x-1.5",i=u.map(mn),e[4]=n,e[5]=o,e[6]=i,e[7]=l}else o=e[5],i=e[6],l=e[7];let r;e[8]!==o||e[9]!==i?(r=t.jsx("div",{className:o,children:i}),e[8]=o,e[9]=i,e[10]=r):r=e[10];let d;e[11]!==n[0]?.title||e[12]!==n.length||e[13]!==g?(d=n.length===1?n[0]?.title:g("projects.connections.usedBy",{count:n.length}),e[11]=n[0]?.title,e[12]=n.length,e[13]=g,e[14]=d):d=e[14];let p;e[15]!==d?(p=t.jsx("span",{className:"truncate text-xs text-muted-foreground",children:d}),e[15]=d,e[16]=p):p=e[16];let m;return e[17]!==l||e[18]!==r||e[19]!==p?(m=t.jsxs("div",{className:l,children:[r,p]}),e[17]=l,e[18]=r,e[19]=p,e[20]=m):m=e[20],m}function mn(s){return t.jsx("span",{className:"rounded-md ring-2 ring-card",title:s.title,children:t.jsx(Bt,{icon:s.icon,name:s.title,size:"xs"})},s.id)}function Re(s){const e=W.c(8),{selectionMode:n,children:g}=s,o=n?"w-8 opacity-100":"w-0 opacity-0 group-hover:w-8 group-hover:opacity-100";let i;e[0]!==o?(i=he("overflow-hidden transition-all duration-150 ease-out",o),e[0]=o,e[1]=i):i=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(We,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:fn,children:t.jsx(tn,{size:20})})}),e[2]=l):l=e[2];let r;e[3]!==g?(r=t.jsxs(Xe,{children:[l,t.jsx(Ge,{align:"end",onClick:pn,children:g})]}),e[3]=g,e[4]=r):r=e[4];let d;return e[5]!==i||e[6]!==r?(d=t.jsx("div",{className:i,children:r}),e[5]=i,e[6]=r,e[7]=d):d=e[7],d}function pn(s){return s.stopPropagation()}function fn(s){return s.stopPropagation()}function hn(s){const e=W.c(57),{group:n,onOpen:g,selectionMode:o,selectedIds:i,onToggleSelect:l}=s,r=te();let d;if(e[0]!==n.connections||e[1]!==i){let N;e[3]!==i?(N=U=>i.has(U.id),e[3]=i,e[4]=N):N=e[4],d=n.connections.every(N),e[0]=n.connections,e[1]=i,e[2]=d}else d=e[2];const p=d;let m;if(e[5]!==n.connections||e[6]!==i){let N;e[8]!==i?(N=U=>i.has(U.id),e[8]=i,e[9]=N):N=e[9],m=n.connections.some(N),e[5]=n.connections,e[6]=i,e[7]=m}else m=e[7];const u=m;let a;e[10]!==p||e[11]!==n.connections||e[12]!==l||e[13]!==i?(a=()=>{for(const N of n.connections)p?i.has(N.id)&&l(N.id):i.has(N.id)||l(N.id)},e[10]=p,e[11]=n.connections,e[12]=l,e[13]=i,e[14]=a):a=e[14];const x=a,f=n.title,j=n.icon;let S;e[15]!==n.connections.length||e[16]!==r?(S=r("orgs.connectionSelectionUi.instancesCount",{count:n.connections.length}),e[15]=n.connections.length,e[16]=r,e[17]=S):S=e[17];let C;e[18]!==n.icon||e[19]!==n.title||e[20]!==S?(C={title:f,icon:j,description:S},e[18]=n.icon,e[19]=n.title,e[20]=S,e[21]=C):C=e[21];let y;e[22]!==g||e[23]!==o||e[24]!==x?(y=()=>o?x():g(),e[22]=g,e[23]=o,e[24]=x,e[25]=y):y=e[25];const c=o&&p&&"ring-2 ring-primary",h=o&&u&&!p&&"ring-1 ring-primary/50";let A;e[26]!==h||e[27]!==c?(A=he(c,h),e[26]=h,e[27]=c,e[28]=A):A=e[28];const T=o?p?!0:u&&"mixed":void 0;let w;e[29]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(xe,{}),e[29]=w):w=e[29];let M;e[30]!==p||e[31]!==n.connections.length||e[32]!==o||e[33]!==u||e[34]!==r||e[35]!==x?(M=o?t.jsx(Be,{checked:p?!0:u?"indeterminate":!1,onCheckedChange:x}):t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:r("orgs.connectionSelectionUi.connected")}),t.jsxs("span",{className:"text-xs text-muted-foreground font-normal tabular-nums",children:["x",n.connections.length]})]}),e[30]=p,e[31]=n.connections.length,e[32]=o,e[33]=u,e[34]=r,e[35]=x,e[36]=M):M=e[36];let I;e[37]!==g?(I=N=>{N.stopPropagation(),g()},e[37]=g,e[38]=I):I=e[38];let O;e[39]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(Ke,{size:16}),e[39]=O):O=e[39];let P;e[40]!==r?(P=r("orgs.connectionSelectionUi.open"),e[40]=r,e[41]=P):P=e[41];let D;e[42]!==I||e[43]!==P?(D=t.jsxs(ie,{onClick:I,children:[O,P]}),e[42]=I,e[43]=P,e[44]=D):D=e[44];let $;e[45]!==o||e[46]!==D?($=t.jsx(Re,{selectionMode:o,children:D}),e[45]=o,e[46]=D,e[47]=$):$=e[47];let V;e[48]!==M||e[49]!==$?(V=t.jsxs("div",{className:"flex items-center gap-1",children:[M,$]}),e[48]=M,e[49]=$,e[50]=V):V=e[50];let b;return e[51]!==A||e[52]!==T||e[53]!==V||e[54]!==C||e[55]!==y?(b=t.jsx(t.Fragment,{children:t.jsx(Ce,{connection:C,onClick:y,className:A,selected:T,fallbackIcon:w,headerActionsAlwaysVisible:!0,headerActions:V})}),e[51]=A,e[52]=T,e[53]=V,e[54]=C,e[55]=y,e[56]=b):b=e[56],b}function xn(s){const e=W.c(36),{connection:n,isSelected:g,selectionMode:o,canManage:i,canManageAgents:l,onToggleSelect:r,onOpen:d,onToggleStatus:p,onDelete:m}=s,u=te();let a;e[0]!==g||e[1]!==r||e[2]!==o||e[3]!==u?(a=o?t.jsx(Be,{checked:g,onCheckedChange:r,onClick:jn}):t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:u("orgs.connectionSelectionUi.connected")}),e[0]=g,e[1]=r,e[2]=o,e[3]=u,e[4]=a):a=e[4];let x;e[5]!==d?(x=T=>{T.stopPropagation(),d()},e[5]=d,e[6]=x):x=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Ke,{size:16}),e[7]=f):f=e[7];let j;e[8]!==u?(j=u("orgs.connectionSelectionUi.open"),e[8]=u,e[9]=j):j=e[9];let S;e[10]!==x||e[11]!==j?(S=t.jsxs(ie,{onClick:x,children:[f,j]}),e[10]=x,e[11]=j,e[12]=S):S=e[12];let C;e[13]!==i||e[14]!==l||e[15]!==r||e[16]!==u?(C=(i||l)&&t.jsxs(ie,{onClick:T=>{T.stopPropagation(),r()},children:[t.jsx(Kt,{size:16}),u("orgs.connectionSelectionUi.select")]}),e[13]=i,e[14]=l,e[15]=r,e[16]=u,e[17]=C):C=e[17];let y;e[18]!==i||e[19]!==n||e[20]!==p||e[21]!==u?(y=i&&(n.status==="active"?t.jsxs(ie,{onClick:T=>{T.stopPropagation(),p("inactive")},children:[t.jsx(Ht,{size:16}),u("orgs.connectionSelectionUi.disable")]}):t.jsxs(ie,{onClick:T=>{T.stopPropagation(),p("active")},children:[t.jsx(Rt,{size:16}),u("orgs.connectionSelectionUi.enable")]})),e[18]=i,e[19]=n,e[20]=p,e[21]=u,e[22]=y):y=e[22];let c;e[23]!==i||e[24]!==m||e[25]!==u?(c=i&&t.jsxs(ie,{variant:"destructive",onClick:T=>{T.stopPropagation(),m()},children:[t.jsx(He,{size:16}),u("orgs.connectionSelectionUi.delete")]}),e[23]=i,e[24]=m,e[25]=u,e[26]=c):c=e[26];let h;e[27]!==o||e[28]!==S||e[29]!==C||e[30]!==y||e[31]!==c?(h=t.jsxs(Re,{selectionMode:o,children:[S,C,y,c]}),e[27]=o,e[28]=S,e[29]=C,e[30]=y,e[31]=c,e[32]=h):h=e[32];let A;return e[33]!==a||e[34]!==h?(A=t.jsxs("div",{className:"flex items-center gap-1",children:[a,h]}),e[33]=a,e[34]=h,e[35]=A):A=e[35],A}function jn(s){return s.stopPropagation()}function Sn(s){const e=W.c(29),{count:n,total:g,canManage:o,canManageAgents:i,onSelectAll:l,onDeselectAll:r,onDelete:d,onAddToAgent:p,onToggleStatus:m,onCancel:u}=s,a=te();if(n===0)return null;let x;e[0]!==n||e[1]!==a?(x=a("orgs.connectionSelectionUi.selectedCount",{count:n}),e[0]=n,e[1]=a,e[2]=x):x=e[2];let f;e[3]!==x?(f=t.jsx("div",{className:"text-xs text-muted-foreground pr-1 tabular-nums",children:x}),e[3]=x,e[4]=f):f=e[4];let j;e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==a||e[9]!==g?(j=n<g?t.jsx(L,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:l,children:a("orgs.connectionSelectionUi.selectAll",{total:g})}):t.jsx(L,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:r,children:a("orgs.connectionSelectionUi.clearSelection")}),e[5]=n,e[6]=r,e[7]=l,e[8]=a,e[9]=g,e[10]=j):j=e[10];let S;e[11]!==i||e[12]!==p||e[13]!==a?(S=i&&t.jsxs(L,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:p,children:[t.jsx(Ee,{size:13}),a("orgs.connectionSelectionUi.addToAgent")]}),e[11]=i,e[12]=p,e[13]=a,e[14]=S):S=e[14];let C;e[15]!==o||e[16]!==d||e[17]!==m||e[18]!==a?(C=o&&t.jsxs(t.Fragment,{children:[t.jsx(L,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>m("active"),children:a("orgs.connectionSelectionUi.enable")}),t.jsx(L,{variant:"outline",size:"sm",className:"h-7 text-xs px-2",onClick:()=>m("inactive"),children:a("orgs.connectionSelectionUi.disable")}),t.jsxs(L,{variant:"destructive",size:"sm",className:"h-7 text-xs px-2",onClick:d,children:[t.jsx(He,{size:13}),a("orgs.connectionSelectionUi.delete")]})]}),e[15]=o,e[16]=d,e[17]=m,e[18]=a,e[19]=C):C=e[19];let y;e[20]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(Le,{size:13}),e[20]=y):y=e[20];let c;e[21]!==u?(c=t.jsx(L,{variant:"ghost",size:"sm",className:"h-7 text-xs px-2",onClick:u,children:y}),e[21]=u,e[22]=c):c=e[22];let h;return e[23]!==f||e[24]!==j||e[25]!==S||e[26]!==C||e[27]!==c?(h=t.jsx("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2",children:t.jsxs("div",{className:"rounded-xl border border-border bg-background/95 shadow-lg backdrop-blur px-3 py-2 flex items-center gap-2",children:[f,j,S,C,c]})}),e[23]=f,e[24]=j,e[25]=S,e[26]=C,e[27]=c,e[28]=h):h=e[28],h}function yn(s){const e=W.c(47),{open:n,onOpenChange:g,agents:o,onConfirm:i}=s,l=te(),[r,d]=z.useState(null);let p;e[0]!==g?(p=D=>{D||d(null),g(D)},e[0]=g,e[1]=p):p=e[1];const m=p;let u;e[2]!==l?(u=l("orgs.connectionSelectionUi.addToAgentTitle"),e[2]=l,e[3]=u):u=e[3];let a;e[4]!==u?(a=t.jsx(Me,{children:u}),e[4]=u,e[5]=a):a=e[5];let x;e[6]!==l?(x=l("orgs.connectionSelectionUi.addToAgentDescription"),e[6]=l,e[7]=x):x=e[7];let f;e[8]!==x?(f=t.jsx($e,{children:x}),e[8]=x,e[9]=f):f=e[9];let j;e[10]!==a||e[11]!==f?(j=t.jsxs(Oe,{children:[a,f]}),e[10]=a,e[11]=f,e[12]=j):j=e[12];let S;e[13]!==o||e[14]!==r||e[15]!==l?(S=o.length===0?t.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:l("orgs.connectionSelectionUi.noAgentsFound")}):o.map(D=>t.jsxs("button",{type:"button",onClick:()=>d(D.id),className:he("flex items-center gap-3 w-full rounded-lg px-3 py-2 text-left transition-colors",r===D.id?"bg-primary/10 ring-1 ring-primary":"hover:bg-muted/50"),children:[t.jsx(en,{icon:D.icon,name:D.title,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:D.title}),D.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:D.description})]})]},D.id)),e[13]=o,e[14]=r,e[15]=l,e[16]=S):S=e[16];let C;e[17]!==S?(C=t.jsx("div",{className:"max-h-60 overflow-auto py-2 space-y-1",children:S}),e[17]=S,e[18]=C):C=e[18];let y;e[19]!==m?(y=()=>m(!1),e[19]=m,e[20]=y):y=e[20];let c;e[21]!==l?(c=l("orgs.connectionSelectionUi.cancel"),e[21]=l,e[22]=c):c=e[22];let h;e[23]!==c||e[24]!==y?(h=t.jsx(L,{variant:"outline",onClick:y,children:c}),e[23]=c,e[24]=y,e[25]=h):h=e[25];const A=!r;let T;e[26]!==m||e[27]!==i||e[28]!==r?(T=()=>{r&&(i(r),m(!1))},e[26]=m,e[27]=i,e[28]=r,e[29]=T):T=e[29];let w;e[30]!==l?(w=l("orgs.connectionSelectionUi.add"),e[30]=l,e[31]=w):w=e[31];let M;e[32]!==A||e[33]!==T||e[34]!==w?(M=t.jsx(L,{disabled:A,onClick:T,children:w}),e[32]=A,e[33]=T,e[34]=w,e[35]=M):M=e[35];let I;e[36]!==h||e[37]!==M?(I=t.jsxs(Fe,{children:[h,M]}),e[36]=h,e[37]=M,e[38]=I):I=e[38];let O;e[39]!==I||e[40]!==j||e[41]!==C?(O=t.jsxs(Ue,{className:"sm:max-w-[400px]",children:[j,C,I]}),e[39]=I,e[40]=j,e[41]=C,e[42]=O):O=e[42];let P;return e[43]!==m||e[44]!==n||e[45]!==O?(P=t.jsx(Ve,{open:n,onOpenChange:m,children:O}),e[43]=m,e[44]=n,e[45]=O,e[46]=P):P=e[46],P}function Cn({listState:s,activeTab:e,typeFilter:n,statusFilter:g}){const o=te(),{org:i}=ke(),l=nt(),r=Te(),{data:d}=we.useSession(),p=ze(),m=Vt(s),u=mt(),{granted:a}=ye("connections:manage"),{granted:x}=ye("agents:manage"),[f,j]=z.useState(new Set),S=f.size>0,[C,y]=z.useState(!1),[c,h]=z.useState(!1),[A,T]=z.useState(null),w=Et(),M=un(Xt(w)),I=m.filter(_=>!(n!=="ALL"&&_.connection_type!==n||g!=="ALL"&&_.status!==g)),O=ut(I),P=_=>{j(v=>{const B=new Set(v);return B.has(_)?B.delete(_):B.add(_),B})},D=()=>{j(new Set)},$=Ie(s.searchTerm),V=$.items,b=ft($.loadMore,$.hasMore,$.isLoadingMore),N=new Set(m.filter(_=>_.app_name).map(_=>_.app_name)),U=s.search.length>0,X=e==="all"||U?V.filter(_=>{if(U){const v=Ae(_);if(v&&N.has(v))return!1}return!0}):[],G=e==="connected"||U?O:[],k=async _=>{if(!(!i||!d?.user?.id)){ee("connection_add_clicked",{action:"connect_new",registry_item_id:_.id,source:"connections_page"}),T(_.id);try{const v=lt(_,i.id,d.user.id,{remoteIndex:0}),B=v.connection_type==="STDIO",K=!!v.connection_url,H=B&&v.connection_headers&&typeof v.connection_headers=="object"&&"command"in v.connection_headers;if(!K&&!H){R.error(o("orgs.connections.cannotConnectNoMethod")),T(null);return}const ve=await p.create.mutateAsync(v),{id:oe}=ve,ce=await Zt({connectionId:oe,orgId:i.id,orgSlug:i.slug,persistFallback:le=>p.update.mutateAsync({id:oe,data:{connection_token:le}}).then(()=>{})});if(ce.ran&&!ce.ok){ee("connection_oauth_failed",{connection_id:oe,flow:"connections_page_connect",error:ce.error??"no_token"}),R.error(o("orgs.connections.authenticationFailed",{error:ce.error??"no token received"}));return}if(ce.ran){ee("connection_oauth_succeeded",{connection_id:oe,flow:"connections_page_connect"});const le=new URL(`/api/${i.slug}/mcp/${oe}`,window.location.origin);await l.invalidateQueries({queryKey:it.isMCPAuthenticated(le.href,null)}),F(),R.success(o("orgs.connections.authenticationSuccessful"))}let me=null;try{const le=await l.fetchQuery(zt({connectionId:oe,orgId:i.id,orgSlug:i.slug}));me=an((await le.listTools()).tools)}catch{}const be=ae(ve),_e=me?me.appToolName?{to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:i.slug,appSlug:be,collectionName:"tools",itemId:encodeURIComponent(me.appToolName)}}:{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:be}}:null;R.success(o("orgs.connections.connectedSuccessfully"),_e?{action:{label:o("orgs.connections.openConnection"),onClick:()=>r(_e)}}:void 0)}catch(v){R.error(o("orgs.connections.failedToConnect",{error:v instanceof Error?v.message:String(v)}))}finally{T(null)}}},E=st(),F=()=>{l.invalidateQueries({predicate:_=>{const v=_.queryKey;return v[1]===i.id&&v[3]==="collection"&&v[4]==="CONNECTIONS"}})},ue=async()=>{y(!1);const _=[...f];ee("connections_bulk_delete",{count:_.length});const B=(await Promise.allSettled(_.map(K=>E.call("COLLECTION_CONNECTIONS_DELETE",{id:K,force:!0})))).filter(K=>K.status==="fulfilled").length;F(),R.success(o("orgs.connections.deletedConnections",{count:B})),D()},je=async(_,v)=>{try{await p.update.mutateAsync({id:_,data:{status:v}}),F(),R.success(o(v==="active"?"orgs.connections.connectionEnabled":"orgs.connections.connectionDisabled"))}catch{R.error(o("orgs.connections.failedToUpdateConnection"))}},ge=async _=>{const v=[...f];ee("connections_bulk_status_toggled",{count:v.length,to_status:_});const K=(await Promise.allSettled(v.map(H=>p.update.mutateAsync({id:H,data:{status:_}})))).filter(H=>H.status==="fulfilled").length;F(),R.success(_==="active"?o("orgs.connections.enabledConnections",{count:K}):o("orgs.connections.disabledConnections",{count:K})),D()},ne=async _=>{const v=w.find(H=>H.id===_);if(!v)return;ee("connections_bulk_add_to_agent",{agent_id:_,count:f.size});const B=new Set(v.connections.map(H=>H.connection_id)),K=[...f].filter(H=>!B.has(H)).map(H=>({connection_id:H,selected_tools:null,selected_resources:null,selected_prompts:null}));if(K.length===0){R.info(o("orgs.connections.allConnectionsAlreadyInAgent"));return}try{await E.call("COLLECTION_VIRTUAL_MCP_UPDATE",{id:_,data:{connections:[...v.connections,...K]}}),ot(l,i.id),R.success(o("orgs.connections.addedConnectionsToAgent",{count:K.length,agentTitle:v.title})),D()}catch{R.error(o("orgs.connections.failedToAddConnectionsToAgent"))}};return t.jsxs(t.Fragment,{children:[t.jsx(pt,{...u}),t.jsx(ln,{open:C,onOpenChange:y,count:f.size,onConfirm:ue}),t.jsx(yn,{open:c,onOpenChange:h,agents:w,onConfirm:ne}),$.isInitialLoading&&e==="all"?t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(de,{className:"size-8 text-muted-foreground"})}):t.jsx("div",{children:(U?X.length===0&&I.length===0:e==="all"?X.length===0:I.length===0)?t.jsx(gt,{image:t.jsx("img",{src:"/emptystate-mcp.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),title:o("orgs.connections.noConnectionsFound"),description:s.search?o("orgs.connections.noConnectionsMatchSearch",{search:s.search}):o(a?"orgs.connections.createConnectionToGetStarted":"orgs.connections.askAdminToAddConnection")}):t.jsxs("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:[G.map(_=>{if(_.type==="group")return t.jsx(hn,{group:_,onOpen:()=>{r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:_.key}})},selectionMode:S,selectedIds:f,onToggleSelect:P},_.key);const v=_.connection,B=f.has(v.id);return t.jsx(Ce,{connection:v,fallbackIcon:t.jsx(xe,{}),onClick:()=>S?P(v.id):r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:ae(v)}}),className:he(B&&"ring-2 ring-primary bg-primary/5"),selected:S?B:void 0,footer:t.jsx(gn,{projects:M.get(v.id)??[]}),headerActionsAlwaysVisible:!0,headerActions:t.jsx(xn,{connection:v,isSelected:B,selectionMode:S,canManage:a,canManageAgents:x,onToggleSelect:()=>P(v.id),onOpen:()=>r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:ae(v)}}),onToggleStatus:K=>je(v.id,K),onDelete:()=>u.requestDelete(v)})},v.id)}),X.map(_=>t.jsx(rn,{item:_,canManage:a,allConnections:m,connectedAppNames:N,connectingItemId:A,onNavigateConnected:v=>r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:ae(v)}}),onConnect:k},_.id)),(e==="all"||U)&&t.jsx("div",{ref:b,className:"col-span-full h-4"}),(e==="all"||U)&&$.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(de,{className:"size-6 text-muted-foreground"})})]})}),S&&t.jsx(Sn,{count:f.size,total:I.length,canManage:a,canManageAgents:x,onSelectAll:()=>{j(new Set(I.map(_=>_.id)))},onDeselectAll:()=>j(new Set),onDelete:()=>y(!0),onAddToAgent:()=>h(!0),onToggleStatus:ge,onCancel:D})]})}function vn(){const s=te(),{org:e}=ke(),n=Te(),g=qe({strict:!1}),{data:o}=we.useSession(),{stdioEnabled:i}=Je(),l=Pe(),{granted:r}=ye("connections:manage"),d=cn({namespace:e.slug,resource:"connections"}),p=ze(),[m,u]=Ye(Ze.connectionsTab(e.slug),b=>g.tab==="all"||g.tab==="connected"?g.tab:b??"all"),[a,x]=z.useState("ALL"),[f,j]=z.useState("ALL"),C=Ie(d.searchTerm).items,y=d.search!==d.searchTerm,c=et({resolver:tt(Qt),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),h=c.watch("ui_type"),A=c.watch("connection_url"),T=c.watch("npx_package"),w=fe({uiType:h,connectionUrl:A??"",npxPackage:T??""})??De({uiType:h,connectionUrl:A??"",registryItems:C}),M=r&&g.action==="create",I=()=>{ee("connections_custom_dialog_opened",{source:"connections_page"}),n({to:"/$org/settings/connections",params:{org:e.slug},search:{action:"create"}})},O=()=>{n({to:"/$org/settings/connections",params:{org:e.slug},search:{}})},P=async b=>{let N,U=null,X=null,G=null;b.ui_type==="NPX"?(N="STDIO",U="",G=Jt(b.npx_package||"",b.env_vars||[])):b.ui_type==="STDIO"?(N="STDIO",U="",G=Yt(b.stdio_command||"",b.stdio_args||"",b.stdio_cwd,b.env_vars||[])):(N=b.ui_type,U=b.connection_url||"",X=b.connection_token||null);const k=ct("conn");ee("connection_custom_created",{connection_type:N,ui_type:b.ui_type}),await p.create.mutateAsync({id:k,title:b.title,description:b.description||null,connection_type:N,connection_url:U,connection_token:X,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:o?.user?.id||"system",organization_id:e.id,icon:b.icon??null,app_name:null,app_id:null,connection_headers:G,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null}),O(),c.reset(),n({to:"/$org/settings/connections/$appSlug",params:{org:e.slug,appSlug:ae({app_name:null,connection_url:U,title:b.title,id:k})}})},D=b=>{b||(M&&O(),c.reset())},$=b=>{const N=b.trim();if(!N)return;const U=!!c.formState.dirtyFields.title,X=!!c.formState.dirtyFields.description,G=!!c.formState.dirtyFields.env_vars,k=F=>{if(F&&(!U&&!c.getValues("title").trim()&&F.title&&c.setValue("title",F.title,{shouldDirty:!1}),!X&&!(c.getValues("description")??"").trim()&&F.description&&c.setValue("description",F.description,{shouldDirty:!1}),!G&&F.envVarKeys?.length)){const ue=c.getValues("env_vars")??[],je=new Set(ue.map(ne=>ne.key)),ge=F.envVarKeys.filter(ne=>!je.has(ne));ge.length>0&&c.setValue("env_vars",[...ue,...ge.map(ne=>({key:ne,value:""}))],{shouldDirty:!0})}},E=qt(N);if(E&&i){c.setValue("ui_type","NPX",{shouldDirty:!0}),c.setValue("npx_package",E.packageName,{shouldDirty:!0}),c.setValue("connection_url","",{shouldDirty:!0}),c.setValue("connection_token",null,{shouldDirty:!0}),k(fe({uiType:"NPX",npxPackage:E.packageName}));return}if(N.startsWith("http://")||N.startsWith("https://")){const F=h==="HTTP"||h==="SSE"||h==="Websocket"?h:"HTTP";c.setValue("ui_type",F,{shouldDirty:!0}),c.setValue("connection_url",N,{shouldDirty:!0}),k(fe({uiType:F,connectionUrl:N})??De({uiType:F,connectionUrl:N,registryItems:C}));return}h==="NPX"&&k(fe({uiType:"NPX",npxPackage:N}))},V=r?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(L,{size:"sm",variant:"default",onClick:I,children:[t.jsx(Ee,{size:14,className:"sm:hidden"}),t.jsx("span",{className:"hidden sm:inline",children:s("orgs.connections.customConnection")})]})}):null;return t.jsx(t.Fragment,{children:t.jsxs(pe,{children:[(()=>{const b=s("orgs.connections.createConnection"),N=s("orgs.connections.createConnectionDescription"),U=c.formState.isSubmitting?s("orgs.connections.saving"):s("orgs.connections.createConnection"),X=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(Q,{control:c.control,name:"ui_type",render:({field:k})=>t.jsxs(q,{children:[t.jsx(J,{children:s("orgs.connections.type")}),t.jsxs(Mt,{value:k.value,onValueChange:k.onChange,children:[t.jsx(Y,{children:t.jsx($t,{children:t.jsx(Ot,{})})}),t.jsxs(Ft,{children:[t.jsx(re,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"HTTP"]})}),t.jsx(re,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"SSE"]})}),t.jsx(re,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Se,{className:"w-4 h-4"}),"Websocket"]})}),i&&t.jsxs(t.Fragment,{children:[t.jsx(re,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(xe,{className:"w-4 h-4"}),s("orgs.connections.npxPackage")]})}),t.jsx(re,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Wt,{className:"w-4 h-4"}),s("orgs.connections.customCommand")]})})]})]})]}),t.jsx(Z,{})]})}),h==="NPX"&&t.jsx(Q,{control:c.control,name:"npx_package",render:({field:k})=>t.jsxs(q,{children:[t.jsx(J,{children:s("orgs.connections.npmPackage")}),t.jsx(Y,{children:t.jsx(se,{placeholder:s("orgs.connections.npmPackagePlaceholder"),...k,value:k.value??"",onPaste:E=>{const F=E.clipboardData.getData("text");F&&(E.preventDefault(),c.setValue("npx_package",F.trim(),{shouldDirty:!0}),$(F))},onBlur:E=>{$(E.target.value),k.onBlur()}})}),t.jsx(Z,{})]})}),h==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(Q,{control:c.control,name:"stdio_command",render:({field:k})=>t.jsxs(q,{children:[t.jsx(J,{children:s("orgs.connections.command")}),t.jsx(Y,{children:t.jsx(se,{placeholder:s("orgs.connections.commandPlaceholder"),...k,value:k.value??""})}),t.jsx(Z,{})]})}),t.jsx(Q,{control:c.control,name:"stdio_args",render:({field:k})=>t.jsxs(q,{children:[t.jsx(J,{children:s("orgs.connections.arguments")}),t.jsx(Y,{children:t.jsx(se,{placeholder:s("orgs.connections.argumentsPlaceholder"),...k,value:k.value??""})}),t.jsx(Z,{})]})})]}),t.jsx(Q,{control:c.control,name:"stdio_cwd",render:({field:k})=>t.jsxs(q,{children:[t.jsx(J,{children:s("orgs.connections.workingDirectory")}),t.jsx(Y,{children:t.jsx(se,{placeholder:s("orgs.connections.workingDirectoryPlaceholder"),...k,value:k.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s("orgs.connections.directoryExecutionNote")}),t.jsx(Z,{})]})})]}),(h==="NPX"||h==="STDIO")&&t.jsx(Q,{control:c.control,name:"env_vars",render:({field:k})=>t.jsxs(q,{children:[t.jsx(J,{children:s("orgs.connections.environmentVariables")}),t.jsx(Y,{children:t.jsx(Gt,{value:k.value??[],onChange:k.onChange})}),t.jsx(Z,{})]})}),h!=="NPX"&&h!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{control:c.control,name:"connection_url",render:({field:k})=>t.jsxs(q,{children:[t.jsx(J,{children:s("orgs.connections.url")}),t.jsx(Y,{children:t.jsx(se,{placeholder:s("orgs.connections.urlPlaceholder"),...k,value:k.value??"",onPaste:E=>{const F=E.clipboardData.getData("text");F&&(E.preventDefault(),c.setValue("connection_url",F.trim(),{shouldDirty:!0}),$(F))},onBlur:E=>{$(E.target.value),k.onBlur()}})}),t.jsx(Z,{})]})}),t.jsx(Q,{control:c.control,name:"connection_token",render:({field:k})=>t.jsxs(q,{children:[t.jsx(J,{children:w?.token?.label??s("orgs.connections.tokenOptional")}),t.jsx(Y,{children:t.jsx(se,{type:"password",placeholder:w?.token?.placeholder??s("orgs.connections.tokenPlaceholder"),...k,value:k.value??""})}),w?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[w.token.helperText,w.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:s("orgs.connections.openGitHubPatSettings")})]})]}),t.jsx(Z,{})]})})]}),t.jsx(Q,{control:c.control,name:"title",render:({field:k})=>t.jsxs(q,{children:[t.jsx(J,{children:s("orgs.connections.name")}),t.jsx(Y,{children:t.jsx(se,{placeholder:s("orgs.connections.namePlaceholder"),...k})}),t.jsx(Z,{})]})}),t.jsx(Q,{control:c.control,name:"description",render:({field:k})=>t.jsxs(q,{children:[t.jsx(J,{children:s("orgs.connections.description")}),t.jsx(Y,{children:t.jsx(Ut,{placeholder:s("orgs.connections.descriptionPlaceholder"),rows:3,...k,value:k.value??""})}),t.jsx(Z,{})]})})]}),G=M;return l?t.jsx(Dt,{open:G,onOpenChange:D,children:t.jsxs(kt,{className:"max-h-[90vh]",children:[t.jsx(Tt,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(wt,{children:b}),t.jsx(At,{className:"mt-1",children:N})]}),t.jsx(It,{asChild:!0,children:t.jsx(L,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1","aria-label":s("orgs.connections.close"),children:t.jsx(Le,{size:16})})})]})}),t.jsx(Ne,{...c,children:t.jsxs("form",{onSubmit:c.handleSubmit(P),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:X}),t.jsx(Pt,{children:t.jsx(L,{type:"submit",disabled:c.formState.isSubmitting,className:"w-full",children:U})})]})})]})}):t.jsx(Ve,{open:G,onOpenChange:D,children:t.jsxs(Ue,{className:"sm:max-w-[525px]",children:[t.jsxs(Oe,{children:[t.jsx(Me,{children:b}),t.jsx($e,{children:N})]}),t.jsx(Ne,{...c,children:t.jsxs("form",{onSubmit:c.handleSubmit(P),children:[t.jsx("div",{className:"py-4",children:X}),t.jsxs(Fe,{children:[t.jsx(L,{type:"button",variant:"outline",onClick:()=>D(!1),children:s("orgs.connections.cancel")}),t.jsx(L,{type:"submit",disabled:c.formState.isSubmitting,className:"min-w-40",children:U})]})]})})]})})})(),t.jsx(pe.Content,{children:t.jsx(pe.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(pe.Title,{actions:V,children:s("orgs.connections.pageTitle")}),t.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(at,{value:d.search,onChange:d.setSearch,placeholder:s("orgs.connections.searchPlaceholder"),className:"w-full md:w-[375px]",onKeyDown:b=>{b.key==="Escape"&&(d.setSearch(""),b.target.blur())}}),t.jsx(rt,{sortKey:d.sortKey,sortDirection:d.sortDirection,onSort:d.handleSort,sortOptions:[{id:"title",label:s("orgs.connections.sortName")},{id:"description",label:s("orgs.connections.sortDescription")},{id:"connection_type",label:s("orgs.connections.sortType")},{id:"updated_by",label:s("orgs.connections.sortUpdatedBy")},{id:"updated_at",label:s("orgs.connections.sortUpdated")}],filters:[{label:s("orgs.connections.filterType"),value:a,onChange:b=>x(b||"ALL"),options:[{id:"ALL",label:s("orgs.connections.filterAll")},{id:"HTTP",label:"HTTP"},{id:"SSE",label:"SSE"},{id:"Websocket",label:"WebSocket"},{id:"STDIO",label:"STDIO"}]},{label:s("orgs.connections.filterStatus"),value:f,onChange:b=>j(b||"ALL"),options:[{id:"ALL",label:s("orgs.connections.filterAll")},{id:"active",label:s("orgs.connections.filterActive")},{id:"inactive",label:s("orgs.connections.filterInactive")},{id:"error",label:s("orgs.connections.filterError")}]}]})]})}),t.jsx(dt,{placement:"page",tabs:[{id:"all",label:s("orgs.connections.tabAll")},{id:"connected",label:s("orgs.connections.tabConnected")}],activeTab:m,onTabChange:b=>{const N=b;N!==m&&ee("connections_page_tab_changed",{to_tab:N}),u(N)}}),t.jsx(z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(de,{className:"size-8 text-muted-foreground"})}),children:t.jsx("div",{style:{opacity:y?.5:1,transition:y?"opacity 0.2s 0.2s linear":"opacity 0s 0s linear",pointerEvents:y?"none":"auto"},children:t.jsx(Cn,{listState:d,activeTab:m,typeFilter:a,statusFilter:f})})})]})})})]})})}function Ks(){const s=W.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Qe,{children:t.jsx(z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(de,{className:"size-8 text-muted-foreground"})}),children:t.jsx(vn,{})})}),s[0]=e):e=s[0],e}export{Ks as default};
|