decocms 4.574.9 → 4.575.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-BrBujzmj.js → AlertCircle-B9jzXYca.js} +1 -1
- package/dist/client/assets/{AreaChart-Bs4ZyKEJ.js → AreaChart-iov00wo5.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B2qsUhAF.js → ArrowLeft-CZ3DAg0q.js} +1 -1
- package/dist/client/assets/{ArrowUp-Bq_XWrMf.js → ArrowUp-Besm0IZ2.js} +1 -1
- package/dist/client/assets/{CartesianChart-BzQXSn72.js → CartesianChart-C3iUwk_u.js} +1 -1
- package/dist/client/assets/{CategoricalChart-B34tgPab.js → CategoricalChart-O0wXlREH.js} +1 -1
- package/dist/client/assets/{CheckCircle-BrU3KNn_.js → CheckCircle-Bg_9Wlgi.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-C15U3mNk.js → ChevronSelectorVertical-UvFeI9z1.js} +1 -1
- package/dist/client/assets/{ChevronUp-CxdkHAYX.js → ChevronUp-CM8EW0Js.js} +1 -1
- package/dist/client/assets/{CreditCard01-gy5ViYmH.js → CreditCard01-Bhqkelsq.js} +1 -1
- package/dist/client/assets/{Globe04-Qb5La101.js → Globe04-DFEQkAAl.js} +1 -1
- package/dist/client/assets/{Key01-XBNKfFAD.js → Key01-BfEZ7hLZ.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BNA4t2nT.js → LinkBroken01-BSh2E4ld.js} +1 -1
- package/dist/client/assets/{Minus-BQ1U44OY.js → Minus-Ctt_tNjY.js} +1 -1
- package/dist/client/assets/{Monitor01-CTMwaVR_.js → Monitor01-Cp5O9jEx.js} +1 -1
- package/dist/client/assets/{Play-oyq9OzZ5.js → Play-DqrEB0p_.js} +1 -1
- package/dist/client/assets/{Plus-B14W9n_P.js → Plus-BF39I64m.js} +1 -1
- package/dist/client/assets/{ReferenceLine-CBcoZK_U.js → ReferenceLine-y99E66AQ.js} +1 -1
- package/dist/client/assets/{SearchMd-DDYfB5ME.js → SearchMd-BCaWPluh.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-B4Qpz0kc.js → ShoppingBag01-WYt5uke3.js} +1 -1
- package/dist/client/assets/{Sun-SepDLWMM.js → Sun-Dniq03T7.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-B1owjF7D.js → SwitchHorizontal01-CStChVS2.js} +1 -1
- package/dist/client/assets/{Tool01-D4V2T_mI.js → Tool01-wiKWLRCc.js} +1 -1
- package/dist/client/assets/{Tooltip-BrxiV7qQ.js → Tooltip-BOp5DpDI.js} +1 -1
- package/dist/client/assets/{Trash01-CTl0J4n_.js → Trash01-DR_ZbB22.js} +1 -1
- package/dist/client/assets/{Upload01-CE3wDuuV.js → Upload01-BNm-Yhgs.js} +1 -1
- package/dist/client/assets/{UserSquare-D6mrj9zR.js → UserSquare-CoAnLSHH.js} +1 -1
- package/dist/client/assets/{Users01-vnVJQGsa.js → Users01-BKvz85-q.js} +1 -1
- package/dist/client/assets/{XClose-DWFAtfm6.js → XClose-BH2b2x6k.js} +1 -1
- package/dist/client/assets/{Zap-4X8Ik5ls.js → Zap-C46fglVd.js} +1 -1
- package/dist/client/assets/{access-gate-CmrYCcY4.js → access-gate-CJaU-ahh.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-C7VuLdpX.js → add-connection-dialog-Es48OMbQ.js} +1 -1
- package/dist/client/assets/agent-app-CgaBp78a.js +1 -0
- package/dist/client/assets/{agent-assets-CtfeFO-q.js → agent-assets-rGrpA13N.js} +1 -1
- package/dist/client/assets/{agent-automation-CBfmQGxD.js → agent-automation-BgcUa34j.js} +1 -1
- package/dist/client/assets/{agent-automations-C9pDoA5t.js → agent-automations-BgScBsF6.js} +1 -1
- package/dist/client/assets/{agent-calendar-Dpbs8ukc.js → agent-calendar-lX-y2EdU.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CANCMZIX.js → agent-capabilities-BOswsmnU.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CUOKdCzE.js → agent-connect-sources-Bwre-hne.js} +1 -1
- package/dist/client/assets/agent-deck-C5kx-WNw.js +1 -0
- package/dist/client/assets/{agent-e2e-Do0w1Fmk.js → agent-e2e-DsGMzDFD.js} +1 -1
- package/dist/client/assets/agent-experiments-gaiUmFF7.js +1 -0
- package/dist/client/assets/{agent-file-BGZ-rpXM.js → agent-file-CXpwIQY7.js} +1 -1
- package/dist/client/assets/{agent-hosting-BcEptfro.js → agent-hosting-IG9OvJxO.js} +1 -1
- package/dist/client/assets/{agent-icon-C4zAUQeZ.js → agent-icon-B9ymJOYy.js} +1 -1
- package/dist/client/assets/agent-library-B-aIakkE.js +1 -0
- package/dist/client/assets/agent-library-file-DdeRXubH.js +1 -0
- package/dist/client/assets/agent-overview-Cd2TI_CO.js +1 -0
- package/dist/client/assets/{agent-releases-dth3gbg2.js → agent-releases-6VNqQXqs.js} +1 -1
- package/dist/client/assets/agent-settings-tnifGDI-.js +1 -0
- package/dist/client/assets/{agent-site-editor--0x03xZz.js → agent-site-editor-71l5SHI7.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-ust0ErKY.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DmOFTD5k.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-Cr4OmiKF.js +1 -0
- package/dist/client/assets/agent-view-BUyaEcso.js +1 -0
- package/dist/client/assets/{agent-view-guard-DRTikUW7.js → agent-view-guard-p3JMpL2i.js} +1 -1
- package/dist/client/assets/{ai-providers-BIsnOJUw.js → ai-providers-CO7GyDpT.js} +1 -1
- package/dist/client/assets/{alert-ChcrHQqB.js → alert-CQeq0vZr.js} +1 -1
- package/dist/client/assets/{analytics-sections-IEaJPRpN.js → analytics-sections-C-EwM79i.js} +1 -1
- package/dist/client/assets/{api-keys-DyiCkrNJ.js → api-keys-BQO3VvIl.js} +1 -1
- package/dist/client/assets/api-keys-DqZ1Dcsm.js +1 -0
- package/dist/client/assets/app-editor-PmWZjr_j.js +1 -0
- package/dist/client/assets/{asset-utils-BemSLLjv.js → asset-utils-DuLZkUyR.js} +1 -1
- package/dist/client/assets/{auth-DZBq7iRr.js → auth-DYk3j3P5.js} +1 -1
- package/dist/client/assets/{auth-catchall-DrPulr77.js → auth-catchall-N-2cp0nv.js} +1 -1
- package/dist/client/assets/{auth-entry-7YktIufn.js → auth-entry-DcODwlvz.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BIjGKhmF.js → auth-split-layout-DMz1KnE0.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DArrCFGG.js → authenticate-and-persist-oauth-XzlChMFG.js} +1 -1
- package/dist/client/assets/{automation-list-row-DjfCNmU2.js → automation-list-row-ldXN7Wg6.js} +1 -1
- package/dist/client/assets/{automation-runs-HL4m0VQL.js → automation-runs-Dmq-RKIH.js} +1 -1
- package/dist/client/assets/{automations-B1iMF-BH.js → automations-CDBea8A_.js} +1 -1
- package/dist/client/assets/{autosend-VANv9yLj.js → autosend-DPIl8Ow-.js} +1 -1
- package/dist/client/assets/{badge-DaX-o_aM.js → badge-sWV0Lz9X.js} +1 -1
- package/dist/client/assets/{block-document-Cx04oYbY.js → block-document-CX5LKakr.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-DgF7HYHj.js → blocks-preview-workspace-context-C6uAIZcB.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-C8jjKnoC.js → blocks-tab-states-CWrGlMnv.js} +1 -1
- package/dist/client/assets/{blog-schema-O25l7G8m.js → blog-schema-CAFArFfZ.js} +1 -1
- package/dist/client/assets/{buckets-Bb4wZzzE.js → buckets-CHiB8kSO.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BQ6BtFA5.js → build-improve-prompt-doc-DWCL4Usp.js} +1 -1
- package/dist/client/assets/{calendar-CI3L7G9u.js → calendar-Doh9vx1Y.js} +1 -1
- package/dist/client/assets/{capability-load-error-De4jloBS.js → capability-load-error-DAHIgRW0.js} +1 -1
- package/dist/client/assets/category-editor-DmF8nidy.js +1 -0
- package/dist/client/assets/{chart-DFYkssKS.js → chart-CTBX1xJ8.js} +1 -1
- package/dist/client/assets/{chat-context-BFrEkp-x.js → chat-context-CMznzxL2.js} +2 -2
- package/dist/client/assets/{chat-draft-WVue6bVm.js → chat-draft-8vQyW9tQ.js} +1 -1
- package/dist/client/assets/{checkbox-C9g8LYdj.js → checkbox-BR7eeNRm.js} +1 -1
- package/dist/client/assets/{choose-editor-K8PxtGC5.js → choose-editor-DsoM6Awe.js} +1 -1
- package/dist/client/assets/{cli-auth-success-7WGG5Ny7.js → cli-auth-success-Dc-_DzP0.js} +1 -1
- package/dist/client/assets/{client-icons-Dg3AySOi.js → client-icons-DkHG_2rG.js} +1 -1
- package/dist/client/assets/cms-settings-editor-CZhxfLk6.js +1 -0
- package/dist/client/assets/{cms-store-drafts-B7OZSklj.js → cms-store-drafts-DAUHqZGa.js} +1 -1
- package/dist/client/assets/{collapsible-CouDnhO6.js → collapsible-BzRZ6mh6.js} +1 -1
- package/dist/client/assets/{collection-detail-UPbZXX41.js → collection-detail-of5InSbt.js} +1 -1
- package/dist/client/assets/{collection-display-button-D8katl6X.js → collection-display-button-DzdTSCUS.js} +1 -1
- package/dist/client/assets/{collection-search-OjmLQPGA.js → collection-search-CnHLg8Vx.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BC08hxFi.js → collection-table-wrapper-BmuSLoPK.js} +1 -1
- package/dist/client/assets/{collection-tabs-CwlrIKLz.js → collection-tabs-7Ya9gAB2.js} +1 -1
- package/dist/client/assets/{combobox-Fnhph1yB.js → combobox-B41se5lV.js} +1 -1
- package/dist/client/assets/{command-DZp1V8X-.js → command-CG66jyhm.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-1gPvogQd.js → companion-mcps-section-mNALQnmz.js} +1 -1
- package/dist/client/assets/{config-C4Gsnqii.js → config-Bebmx21W.js} +1 -1
- package/dist/client/assets/{connect-DiSxRkvs.js → connect-BOxbOowz.js} +3 -3
- package/dist/client/assets/{connect-layout-DQX9wvNz.js → connect-layout-CRU0oD9B.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-ZMMXP6WV.js → connect-source-dialog-Do1Ol7Lc.js} +1 -1
- package/dist/client/assets/{connection-B5iqnjJS.js → connection-CyPXBq-_.js} +1 -1
- package/dist/client/assets/{connection-card-dWBeLnkC.js → connection-card-DxMw_ATi.js} +1 -1
- package/dist/client/assets/{connection-detail-vQx4JY7p.js → connection-detail-BQWnbjuT.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-C-PfuEYz.js → connection-form-helpers-C2XDuc-v.js} +1 -1
- package/dist/client/assets/{connection-slug-BPPZqv13.js → connection-slug-s2iYHyhO.js} +1 -1
- package/dist/client/assets/{connections-BNB5dOFV.js → connections-pYRqnGDq.js} +1 -1
- package/dist/client/assets/content-tab-DVwMjYF_.js +25 -0
- package/dist/client/assets/context-CRiBUcdZ.js +1 -0
- package/dist/client/assets/{context-menu-DqHkPsZX.js → context-menu-DUt7Fb0Z.js} +1 -1
- package/dist/client/assets/{context-shell-DkPH0WI3.js → context-shell-o6BvAn5f.js} +3 -3
- package/dist/client/assets/{core.esm-CEehG5ej.js → core.esm-Cdwuvp6V.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-C-eZv_C7.js → create-organization-dialog-CRr0zMDH.js} +1 -1
- package/dist/client/assets/{device-hint-juJpe-S9.js → device-hint-CzI0Cxwe.js} +1 -1
- package/dist/client/assets/{discover-COI3hr0O.js → discover-DV2xyl-v.js} +1 -1
- package/dist/client/assets/{domain-settings-BBV7EcxE.js → domain-settings-BpStC20M.js} +1 -1
- package/dist/client/assets/{drawer-CwBC6h27.js → drawer-Bl-xKJR_.js} +1 -1
- package/dist/client/assets/{editor-YZleAELh.js → editor-CozvZeDY.js} +1 -1
- package/dist/client/assets/{editor-classes-CK9ai0gl.js → editor-classes-C0VdDFt2.js} +1 -1
- package/dist/client/assets/{empty-state-CwTtE-MO.js → empty-state-BY5AuJfU.js} +1 -1
- package/dist/client/assets/{empty-state-B9QiU_VY.js → empty-state-DjPM3fy8.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-C1gEvb6G.js → experiments-tab-choice-DxHtCgvZ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CkWpG9Fj.js → extract-connection-data-CzRa4dsB.js} +1 -1
- package/dist/client/assets/{feature-gate-CEDC08jo.js → feature-gate-CecpbIeh.js} +1 -1
- package/dist/client/assets/{feature-paywall-UROHXvVY.js → feature-paywall-AuKILmgq.js} +1 -1
- package/dist/client/assets/{file-explorer-DktEvpiP.js → file-explorer-Djczlqyv.js} +1 -1
- package/dist/client/assets/{file-preview-xiRlJpsu.js → file-preview-BoSukKv4.js} +1 -1
- package/dist/client/assets/{file-share-button-Br7H7qe9.js → file-share-button-BipY8VKx.js} +2 -2
- package/dist/client/assets/{file-type-icon-BRiZbFJM.js → file-type-icon-BKtgVCvA.js} +1 -1
- package/dist/client/assets/{folder-icon-CHiicbmI.js → folder-icon-B6Pmbu2w.js} +1 -1
- package/dist/client/assets/{form-BbCRE2mk.js → form-BcinmXce.js} +1 -1
- package/dist/client/assets/{general-CYLLbCmH.js → general-Cfumen7X.js} +1 -1
- package/dist/client/assets/{github-icon-q1xudgoP.js → github-icon-lmZhrKkb.js} +1 -1
- package/dist/client/assets/{home-CVchwepi.js → home-BXszjMgA.js} +1 -1
- package/dist/client/assets/{home-overview-BGSikjDJ.js → home-overview-CBvIMZLG.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-rqZnV2Vw.js → hosted-reconcile-BwRf3Rhf.js} +1 -1
- package/dist/client/assets/{icon-button-Bq3ZJEeE.js → icon-button-BKgqvpeC.js} +1 -1
- package/dist/client/assets/index-69S-cBsb.css +1 -0
- package/dist/client/assets/index-B-8lp_z-.js +69 -0
- package/dist/client/assets/{index-BD2-Tfve.js → index-B1ZvlDM_.js} +37 -37
- package/dist/client/assets/{index-DLzGeaMa.js → index-BjRujN3I.js} +1 -1
- package/dist/client/assets/index-Bmgq1LY9.js +1 -0
- package/dist/client/assets/{index-CGTT47Gs.js → index-BpS3zp32.js} +1 -1
- package/dist/client/assets/{index-DcLP2Uex.js → index-BrNhih9e.js} +1 -1
- package/dist/client/assets/index-C521Vo2d.js +15 -0
- package/dist/client/assets/{index-CdvPHHMd.js → index-CE2oWWvQ.js} +1 -1
- package/dist/client/assets/{index-KVVHw2gU.js → index-CtHyBR3B.js} +1 -1
- package/dist/client/assets/{index-DRQaomOR.js → index-CuAzu2ov.js} +3 -3
- package/dist/client/assets/{index-CH4-90Yv.js → index-Ddc_z0Ej.js} +1 -1
- package/dist/client/assets/{index-CwSLxVp3.js → index-DnYGmBYM.js} +1 -1
- package/dist/client/assets/{index-WlHdhzWm.js → index-Dodcj-Mw.js} +1 -1
- package/dist/client/assets/{index-BD6O45bL.js → index-dh7qVpYI.js} +1 -1
- package/dist/client/assets/{index-BfxFxvBn.js → index-mDEdivEJ.js} +1 -1
- package/dist/client/assets/{index-D8kKxC0w.js → index-rTnBA7ms.js} +1 -1
- package/dist/client/assets/{index-redirect-cM8n5Bf0.js → index-redirect-BDzsF49E.js} +1 -1
- package/dist/client/assets/{index-BW39Ccy3.js → index-zu23C60L.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CFbscoFz.js → infiniteQueryObserver-CmW3uI_C.js} +1 -1
- package/dist/client/assets/{infra-billing-CVwEnJc4.js → infra-billing-Xe-QR_aA.js} +1 -1
- package/dist/client/assets/{input-mbVW2uET.js → input-BWMKGiG7.js} +1 -1
- package/dist/client/assets/{input-vtcNycLk.js → input-DKvkNLxc.js} +3 -3
- package/dist/client/assets/{integration-icon-C5Anrc8v.js → integration-icon-UdqaK4j5.js} +1 -1
- package/dist/client/assets/{jira-icon-Bmi1xI6r.js → jira-icon-BXLlnoMi.js} +1 -1
- package/dist/client/assets/{label-CZVy73g_.js → label-PfhFwXDB.js} +1 -1
- package/dist/client/assets/{layout-mU_v4Bh-.js → layout-LjvCD25R.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-xczBeRkI.js → legacy-admin-welcome-dialog-F7XO8XgZ.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DOprMiQ8.js → legacy-agents-deep-Ch8Xa93t.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-frLtUhr7.js → legacy-main-redirect-BPNo4KOA.js} +1 -1
- package/dist/client/assets/library-DmUN8KJK.js +1 -0
- package/dist/client/assets/{library-tab-DB25yn1i.js → library-tab-BSfDHVvp.js} +1 -1
- package/dist/client/assets/{login-CmHRnJOc.js → login-CoFOfP_J.js} +1 -1
- package/dist/client/assets/{markdown-Bn6_U_KJ.js → markdown-Mrho5aZm.js} +7 -7
- package/dist/client/assets/{mcp-app-renderer-CLwGZiBS.js → mcp-app-renderer-OepBm0xf.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DLp_LyKE.js → mcp-oauth-CPNuaTw2.js} +1 -1
- package/dist/client/assets/{mcp-oauth-nWMLUxbw.js → mcp-oauth-D2A3WCc8.js} +1 -1
- package/dist/client/assets/{members-ZiG-LF73.js → members-BUCQXk_Z.js} +1 -1
- package/dist/client/assets/{memory-Bc4AG_R5.js → memory-BvgLbCaa.js} +1 -1
- package/dist/client/assets/{mock-board-vq_twtUH.js → mock-board-CkAh1xfR.js} +3 -3
- package/dist/client/assets/{monaco-editor-Cwn1FokD.js → monaco-editor-g0g8FNXa.js} +1 -1
- package/dist/client/assets/{monitoring-Ck9IWyMH.js → monitoring-C21z2Ky6.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CBa0yJyc.js → monitoring-stats-row-CVBzJu2Z.js} +1 -1
- package/dist/client/assets/{multi-select-VgSnOaCE.js → multi-select-BAtpYbAh.js} +1 -1
- package/dist/client/assets/{mustache-DsmTghzT.js → mustache-D54jyG9D.js} +3 -3
- package/dist/client/assets/{named-rule-view-D2hRJFjn.js → named-rule-view-CT0WGqZQ.js} +1 -1
- package/dist/client/assets/{new-project-dialog-Bq2ZRt1E.js → new-project-dialog-C3_nj5Ml.js} +1 -1
- package/dist/client/assets/{oauth-callback-DisZamoA.js → oauth-callback-CBi7ICt6.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CQY9pH53.js → oauth-callback-ai-provider-Dk0zoYp5.js} +1 -1
- package/dist/client/assets/{oauth-consent-BLSOh8Vc.js → oauth-consent-CuhoZHL3.js} +1 -1
- package/dist/client/assets/{onboarding-knc2o8kj.js → onboarding-Cng8wY1E.js} +1 -1
- package/dist/client/assets/{openai-conversation-D0zBymrP.js → openai-conversation-DiGdZuyX.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-CkyuDF51.js → optimistic-project-sidebar-views-BOc7d1-I.js} +1 -1
- package/dist/client/assets/{order-monitor-day--YYykwM7.js → order-monitor-day-DvvGpgk-.js} +1 -1
- package/dist/client/assets/{organization-choice-DihqTAxR.js → organization-choice-DNs_V-xg.js} +1 -1
- package/dist/client/assets/{orgs-05_Ljhax.js → orgs-BLLV0cjQ.js} +1 -1
- package/dist/client/assets/{own-accounts-section-Vq-dKaIp.js → own-accounts-section-C_JhIm_f.js} +1 -1
- package/dist/client/assets/{pair-B-D0jk5j.js → pair-BZWd7l8i.js} +7 -7
- package/dist/client/assets/parse-sections-Chh4kibB.js +20 -0
- package/dist/client/assets/plan-C2Rwz4yq.js +1 -0
- package/dist/client/assets/{plan-ladder-ia9SV_u2.js → plan-ladder-C_hexrUw.js} +1 -1
- package/dist/client/assets/{plan-usage-card-BhMgoOQ-.js → plan-usage-card-BoQTuswG.js} +1 -1
- package/dist/client/assets/{popover-BX49i_9-.js → popover-Bmr7L36n.js} +1 -1
- package/dist/client/assets/post-calendar-DMhH6lZl.js +1 -0
- package/dist/client/assets/post-editor-BXvu8EpI.js +2 -0
- package/dist/client/assets/{preview-content-ByMvryRR.js → preview-content-DYnkU4UJ.js} +1 -1
- package/dist/client/assets/{preview-dialog-CsbNSWkE.js → preview-dialog-DNx4X2e9.js} +1 -1
- package/dist/client/assets/{preview-panel-CBrKmmim.js → preview-panel-CvviPuHY.js} +1 -1
- package/dist/client/assets/{preview-tab-DEjq4YQm.js → preview-tab-BNjaDwVm.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-D8SJ6ifV.js → product-picker-dialog-H-c7S_y6.js} +1 -1
- package/dist/client/assets/{profile-DGZtmJpW.js → profile-CIr-8Y5O.js} +1 -1
- package/dist/client/assets/{project-app-view-CSFErIuG.js → project-app-view-AO2FGSd6.js} +1 -1
- package/dist/client/assets/{project-apps-DsmVr6MW.js → project-apps-DBCPlxgH.js} +1 -1
- package/dist/client/assets/{project-icon-BMNmURUS.js → project-icon-CmnD7zSI.js} +1 -1
- package/dist/client/assets/{project-index-Cf8pv3Xb.js → project-index-DSLcGnuq.js} +1 -1
- package/dist/client/assets/project-reports-S-kufFKe.js +1 -0
- package/dist/client/assets/project-tasks-wzF7Jhs-.js +1 -0
- package/dist/client/assets/{projects-BbuSRcBC.js → projects-ChZ6VlDP.js} +1 -1
- package/dist/client/assets/{projects-empty-state-D2U4ObkW.js → projects-empty-state-DAlIDaDL.js} +1 -1
- package/dist/client/assets/{prompts-ev7-vW68.js → prompts-Bvb1OOOC.js} +1 -1
- package/dist/client/assets/record-editor-N9NTN0AS.js +1 -0
- package/dist/client/assets/redirect-editor-Cr2marAT.js +1 -0
- package/dist/client/assets/{reports-DaISkEl7.js → reports-BXChVA2M.js} +1 -1
- package/dist/client/assets/{reports-onboarding-3NRLE0S7.js → reports-onboarding-mCk-w7k-.js} +1 -1
- package/dist/client/assets/reports-sZEBLifc.js +1 -0
- package/dist/client/assets/{reports-tab-BTnE3zXc.js → reports-tab-DE8i-fZN.js} +2 -2
- package/dist/client/assets/repositories-BgBZ-sk3.js +1 -0
- package/dist/client/assets/{repositories-iO0v9MBk.js → repositories-DBxw960j.js} +1 -1
- package/dist/client/assets/{repository-binding-t2SUt_ly.js → repository-binding-CoMozV78.js} +1 -1
- package/dist/client/assets/{repository-picker-lw8HWu2E.js → repository-picker-Ds67iMZ7.js} +1 -1
- package/dist/client/assets/{require-capability-BpHMNsFK.js → require-capability-C9oBXOPC.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D0fYWaPn.js → required-auth-layout-BZsZN7yA.js} +1 -1
- package/dist/client/assets/{reset-password-GLJcH65P.js → reset-password-7T8Amd8g.js} +1 -1
- package/dist/client/assets/{resizable-vYXdh-GF.js → resizable-CMMESj2f.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-V8LVv3Xn.js → resolve-tab-icon-CWFgluny.js} +1 -1
- package/dist/client/assets/{review-settings-Daf3NI57.js → review-settings-CcRoafom.js} +1 -1
- package/dist/client/assets/{role-color-C4jOHzdR.js → role-color-BGMgsms5.js} +1 -1
- package/dist/client/assets/{roles-CV8Os6WH.js → roles-D_ANLmLE.js} +1 -1
- package/dist/client/assets/route-Bl9oqEzn.js +1 -0
- package/dist/client/assets/{route-D4eWmnLE.js → route-CVEfwKUb.js} +1 -1
- package/dist/client/assets/{route-ChpHpM6U.js → route-OcK1C2mu.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-wSSR64uz.js → sandbox-lifecycle-context-Df97dN_A.js} +1 -1
- package/dist/client/assets/{schema-lfiSlL5j.js → schema-C8mn4zzt.js} +1 -1
- package/dist/client/assets/{schema-rAmMhTAU.js → schema-PUU_l55-.js} +1 -1
- package/dist/client/assets/{scroll-area-BdbZ2pRg.js → scroll-area-DPYxTk2f.js} +1 -1
- package/dist/client/assets/{search-input-DvpyQdwd.js → search-input-CxiWeJ7M.js} +1 -1
- package/dist/client/assets/{search-toggle-EaKGGn7w.js → search-toggle-B2er_d2D.js} +1 -1
- package/dist/client/assets/{secret-picker-ZdBMvgUe.js → secret-picker-BGN25hQY.js} +1 -1
- package/dist/client/assets/{secrets-D35RaSBM.js → secrets-CdS0pLko.js} +1 -1
- package/dist/client/assets/{section-array-field-C3FXtjzL.js → section-array-field-CP-WbNwo.js} +1 -1
- package/dist/client/assets/{sections-BXC8sRej.js → sections-B2VbhORA.js} +1 -1
- package/dist/client/assets/{sections-editor-oQAkX7iV.js → sections-editor-DrJZD-K0.js} +1 -1
- package/dist/client/assets/{select-DzfQ0lJI.js → select-DwKpuPDv.js} +1 -1
- package/dist/client/assets/{select-model-Bc-aj0Ca.js → select-model-CYqVBHX-.js} +1 -1
- package/dist/client/assets/{seo-editor-B-SmTz7B.js → seo-editor-BZHEYA-M.js} +1 -1
- package/dist/client/assets/{separator-CtG551Kh.js → separator-ygeWiuaT.js} +1 -1
- package/dist/client/assets/settings-tab-DAogag92.js +1 -0
- package/dist/client/assets/{sheet-ChvL33ih.js → sheet-Xug5hLAu.js} +1 -1
- package/dist/client/assets/{shell-layout-CUa5MDUh.js → shell-layout-DP2VC2TO.js} +1 -1
- package/dist/client/assets/{site-draft-actions-C7WlFKVv.js → site-draft-actions-CwKZJ4xP.js} +1 -1
- package/dist/client/assets/{site-draft-view-CjzDGxji.js → site-draft-view-DqJzkrit.js} +1 -1
- package/dist/client/assets/site-editor-DBJLt6gM.js +1 -0
- package/dist/client/assets/{site-editor-toast-CWugfiSd.js → site-editor-toast-C2KJeS5V.js} +1 -1
- package/dist/client/assets/{skills-C5QLe26M.js → skills-KjFJGU5i.js} +1 -1
- package/dist/client/assets/{slider-Ecd2IIkn.js → slider-B0Ygf2_6.js} +1 -1
- package/dist/client/assets/{sortable.esm-B7uFfy_P.js → sortable.esm-b0bgkepL.js} +1 -1
- package/dist/client/assets/{sso-0gVFO2bM.js → sso-BRHmZu4z.js} +1 -1
- package/dist/client/assets/{suggestion-DNThc8_w.js → suggestion-x1hGwkT4.js} +2 -2
- package/dist/client/assets/{super-agent-icon-WK3PJICd.js → super-agent-icon-DVvWAvfT.js} +1 -1
- package/dist/client/assets/{switch-rEtvwmeJ.js → switch-B89m7bUN.js} +1 -1
- package/dist/client/assets/{synced-repos-CsB9l6Mv.js → synced-repos-GWj1dwBE.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-DuRegJvy.js → tab-icon-glyph-izlIxfMt.js} +1 -1
- package/dist/client/assets/{table-tgAIcOjU.js → table-lum-yHpJ.js} +1 -1
- package/dist/client/assets/{tabs-CRh6BkF5.js → tabs-qmDGzXtn.js} +1 -1
- package/dist/client/assets/{task-board-DVzbOFVa.js → task-board-CITA4beV.js} +1 -1
- package/dist/client/assets/{task-route-DJww-aBE.js → task-route-DLxggJ7K.js} +1 -1
- package/dist/client/assets/{task-status-CPDhSMht.js → task-status-DDIH9CGS.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-Dmg8kQ7N.js → taskboard-analytics-B4G_sBgg.js} +1 -1
- package/dist/client/assets/{tasks-BSfgBHRO.js → tasks-DbElIgy9.js} +1 -1
- package/dist/client/assets/tasks-Df6DY3du.js +1 -0
- package/dist/client/assets/{textarea-CvTlfpHc.js → textarea-BYx7yH8o.js} +1 -1
- package/dist/client/assets/{thread-analytics-DD_Y3FQw.js → thread-analytics-D3o9NsHQ.js} +1 -1
- package/dist/client/assets/{thread-intent-BhJhZ_UP.js → thread-intent-BMcVCMdR.js} +1 -1
- package/dist/client/assets/{thread-route-DFmD7mlY.js → thread-route-BX8g4tw-.js} +1 -1
- package/dist/client/assets/{thread-route-Df1f7USR.js → thread-route-jIR4gAI_.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-CCNPZBqb.js → thread-sheet-body-BaVm1ZBO.js} +1 -1
- package/dist/client/assets/{time-range-picker-CNJKAQia.js → time-range-picker-EQi5kb2q.js} +1 -1
- package/dist/client/assets/{toggle-group-CEtlbqEu.js → toggle-group-6Dx2ZnVa.js} +1 -1
- package/dist/client/assets/{tool-namespace-xhn6qzed.js → tool-namespace-C8tIomG8.js} +1 -1
- package/dist/client/assets/{tool-set-selector-0qJqj3BN.js → tool-set-selector-Dzh4gju3.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BYM1l_EM.js → toolbar-icon-button-qX2Q8Vi7.js} +1 -1
- package/dist/client/assets/{tooltip-CPWUruKJ.js → tooltip-D2vb17oX.js} +1 -1
- package/dist/client/assets/{tooltipContext-DYzAHA8b.js → tooltipContext-bN8koyv-.js} +1 -1
- package/dist/client/assets/{track-As-I-W_o.js → track-Bx9-uk2h.js} +1 -1
- package/dist/client/assets/{types-BM3wGHXs.js → types-Dynv4Wt5.js} +1 -1
- package/dist/client/assets/{url-slug-C7LbKTWT.js → url-slug-Dqg9nWvP.js} +1 -1
- package/dist/client/assets/{usage-stats-BITMwpzs.js → usage-stats-BxAReiDs.js} +32 -32
- package/dist/client/assets/{use-ai-providers-pPbmGXbG.js → use-ai-providers-CtG5BelZ.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-Bv0WgvtT.js → use-apply-named-rule-DHBY1E38.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-B2dGYQPJ.js +1 -0
- package/dist/client/assets/{use-automations-BEx9jN5g.js → use-automations-TW0JJdqx.js} +1 -1
- package/dist/client/assets/{use-autosave-BxToYayg.js → use-autosave-BezOS47T.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-Dx_FWHJP.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-YDnStvp0.js → use-chat-layout-state-CakVfv2a.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-BJxFUgnP.js → use-cms-publish-actions-DPLfPXzl.js} +1 -1
- package/dist/client/assets/{use-connect-companion-CMi6qABv.js → use-connect-companion-xyuasG3f.js} +1 -1
- package/dist/client/assets/{use-connection-BeyjX32e.js → use-connection-DYtXLDpf.js} +1 -1
- package/dist/client/assets/{use-content-sync-D9WlRyAv.js → use-content-sync-BpVEjJ5G.js} +1 -1
- package/dist/client/assets/{use-copy-Yov8ynUc.js → use-copy-B1cnS_xX.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CqG8akF0.js → use-date-fns-locale-DEbdWDOa.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BwG78Eft.js → use-debounced-autosave-CvHwbalF.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CjUdoTQj.js → use-debounced-value-Z34m5Fyz.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CHVv60jE.js → use-deco-credits-DCZQcwBn.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Dxkyyj-f.js → use-decopilot-events-_iazqvpf.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DcDccx5j.js → use-delete-connection-M267X1bS.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BP73XI6k.js → use-deployment-admin-DOzhh6sJ.js} +1 -1
- package/dist/client/assets/{use-entitlements-B6JBu_O9.js → use-entitlements-DZIIouH3.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-Be4qQSKF.js → use-fast-preview-draft-url-DSbBc_J-.js} +1 -1
- package/dist/client/assets/{use-file-configs-4JpNA1Tb.js → use-file-configs-hDEnq4hr.js} +1 -1
- package/dist/client/assets/{use-id-selection-CdOmebQh.js → use-id-selection-CcHW6d6u.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-vv9gd7Sc.js → use-inbox-feed-BQSYPM61.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DuiGO_jY.js → use-infinite-scroll-lJK8P9ZI.js} +1 -1
- package/dist/client/assets/{use-join-requests-aN5r5Pxn.js → use-join-requests-sJWVcnYg.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-LFa8N1wr.js → use-main-panel-tabs-C788lFWw.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-D1KHm_6z.js → use-mcp-auth-status-CgZY_gyC.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Dwx3joSc.js → use-mcp-client-C_baTEme.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CgaLso39.js → use-mcp-prompts-DpQotIu-.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-KrWmb9CR.js → use-mcp-tools-CVQwrVGE.js} +1 -1
- package/dist/client/assets/{use-mobile-BL_lLwbJ.js → use-mobile-CzZEBajI.js} +1 -1
- package/dist/client/assets/{use-move-blocks-DLKMXFIt.js → use-move-blocks-CeecxxS_.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DquGUsnU.js → use-navigate-to-agent-BMQllV2g.js} +1 -1
- package/dist/client/assets/{use-org-fs-DDN_Ivwy.js → use-org-fs-hvIlZzgN.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-VLN8P34E.js → use-org-repo-syncs-C0ZbZ18y.js} +1 -1
- package/dist/client/assets/{use-org-sso-DCyl-5Yq.js → use-org-sso-C9hOcGok.js} +1 -1
- package/dist/client/assets/{use-organization-settings-ezDxn50S.js → use-organization-settings-D9HfcuG0.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-Dmz_uZfw.js → use-project-native-view-presence-FcTxBNIu.js} +1 -1
- package/dist/client/assets/{use-project-scope-Bv0XQrp-.js → use-project-scope-yhiZWd6i.js} +1 -1
- package/dist/client/assets/{use-recent-apps-C1nVs7iP.js → use-recent-apps-CtwsvbPj.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CG1-7P8p.js → use-reports-diagnostic-BP7gBCmu.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-DGTvdxAG.js → use-sandbox-events-rlHOSL_u.js} +1 -1
- package/dist/client/assets/{use-secrets-BDKLIqQa.js → use-secrets-CjzhxUFP.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-RsRAdpLG.js → use-section-preview-base-BRTpm92u.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-pjufulEj.js → use-sidebar-collapsed-DTqL_ZOd.js} +1 -1
- package/dist/client/assets/{use-tags-DRgt7SdO.js → use-tags-v5mP3DFy.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BBqVIyLD.js → use-task-board-analytics-CXbWAJgx.js} +1 -1
- package/dist/client/assets/{use-task-board-events-C076JDrW.js → use-task-board-events-Do0ZxHPd.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CMWcegEQ.js → use-task-board-item-prs-DjTo2SIU.js} +1 -1
- package/dist/client/assets/{use-task-board-items-C3wN6VZ7.js → use-task-board-items-8MOWqSEt.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-BljQAl60.js → use-task-board-prompts-ECSdw-Pb.js} +1 -1
- package/dist/client/assets/{use-task-metadata-IKal_B89.js → use-task-metadata-X9Mil_QT.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DW15e6qt.js → use-thread-outputs-Dmf6zhrt.js} +1 -1
- package/dist/client/assets/{use-voice-input-Bhc30U5o.js → use-voice-input-BJwAU8da.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CvokX1at.js +1 -0
- package/dist/client/assets/{useQueries-BWsosSvF.js → useQueries-DOrZn37R.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BiaFhRxh.js +1 -0
- package/dist/client/assets/{users-BL-cP3wa.js → users-Daf6ssOQ.js} +1 -1
- package/dist/client/assets/{utils-DgoaBGZ5.js → utils-DfZ0Z1Cp.js} +2 -2
- package/dist/client/assets/{variant-calendar-D9HBG0p_.js → variant-calendar-C_C-crL9.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-DoXeO1c0.js → variant-matcher-override-DNI0CzKx.js} +1 -1
- package/dist/client/assets/{view-header-j_OBPXJD.js → view-header-B99QN9EG.js} +1 -1
- package/dist/client/assets/virtual-mcp-CbvCEWCq.js +1 -0
- package/dist/client/assets/{watch-sse-pool-Bno2kqCn.js → watch-sse-pool-D0y06VhU.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +13 -13
- package/dist/server/migrate-dbos.js +2 -2
- package/dist/server/migrate.js +42 -42
- package/dist/server/server.js +446 -446
- package/package.json +1 -1
- package/dist/client/assets/agent-app-D6yj-pMQ.js +0 -1
- package/dist/client/assets/agent-deck-9cClb9g8.js +0 -1
- package/dist/client/assets/agent-experiments-i1khXsMD.js +0 -1
- package/dist/client/assets/agent-library-D7XfbskT.js +0 -1
- package/dist/client/assets/agent-library-file-BETUEujK.js +0 -1
- package/dist/client/assets/agent-overview-BT1unfrS.js +0 -1
- package/dist/client/assets/agent-settings-CjJHki-K.js +0 -1
- package/dist/client/assets/agent-site-editor-code-B-MqMBV6.js +0 -2
- package/dist/client/assets/agent-site-editor-content-T7SQ0eTX.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-CLHaZdDj.js +0 -1
- package/dist/client/assets/agent-view-BD06Jv6z.js +0 -1
- package/dist/client/assets/api-keys-BEjN8NqZ.js +0 -1
- package/dist/client/assets/app-editor-cC2ECYDV.js +0 -1
- package/dist/client/assets/category-editor-DMUoSfne.js +0 -1
- package/dist/client/assets/cms-settings-editor-BGVlbtsi.js +0 -1
- package/dist/client/assets/content-tab-BjndC62X.js +0 -25
- package/dist/client/assets/context-B-eGOpuA.js +0 -1
- package/dist/client/assets/index-BEFauG6g.js +0 -83
- package/dist/client/assets/index-BkJtJQz4.css +0 -1
- package/dist/client/assets/index-ULZrkDIx.js +0 -1
- package/dist/client/assets/library-H2QdAzSR.js +0 -1
- package/dist/client/assets/parse-sections-DH_6p8mX.js +0 -20
- package/dist/client/assets/plan-C8ZCF1fK.js +0 -1
- package/dist/client/assets/post-calendar-BRPy06yS.js +0 -1
- package/dist/client/assets/post-editor-DO094Qrr.js +0 -2
- package/dist/client/assets/project-reports-DmwAf8Qf.js +0 -1
- package/dist/client/assets/project-tasks-D5vOWT5d.js +0 -1
- package/dist/client/assets/record-editor-B82Hi6oO.js +0 -1
- package/dist/client/assets/redirect-editor-1Kyi1-Qo.js +0 -1
- package/dist/client/assets/reports-D8_7BSxz.js +0 -1
- package/dist/client/assets/repositories-Rj9HwEBO.js +0 -1
- package/dist/client/assets/route-DpfhbI1P.js +0 -1
- package/dist/client/assets/settings-tab--GGe5YhB.js +0 -1
- package/dist/client/assets/site-editor-BgYmGLHo.js +0 -1
- package/dist/client/assets/tasks-BiPHQc84.js +0 -1
- package/dist/client/assets/use-ask-in-chat-COLxNYu8.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-BKzS5s7M.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DIP1SnGb.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DrHv36Dy.js +0 -1
- package/dist/client/assets/virtual-mcp-DUuDRM1F.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,a4 as h,gU as d,j as g,N as m,ae as p,a2 as j}from"./index-
|
|
1
|
+
import{c as f,a4 as h,gU as d,j as g,N as m,ae as p,a2 as j}from"./index-B1ZvlDM_.js";import{L as v}from"./legacy-main-redirect-BPNo4KOA.js";import"./thread-route-BX8g4tw-.js";const x=j("/shell/$org/org-shell/");function L(){const e=f.c(19),{org:a}=h(),l=x.useSearch(),{main:i,virtualmcpid:o}=l;if(i!==void 0){let t;e[0]!==i||e[1]!==a.slug||e[2]!==l||e[3]!==o?(t=d({org:a.slug,agentId:o,main:i,search:l}),e[0]=i,e[1]=a.slug,e[2]=l,e[3]=o,e[4]=t):t=e[4];const s=t;if(s?.kind==="canonical"){let r;return e[5]!==s?(r=g.jsx(v,{target:s}),e[5]=s,e[6]=r):r=e[6],r}}let n;e[7]!==o?(n=o?.trim()||null,e[7]=o,e[8]=n):n=e[8];const u=n;if(u){let t;e[9]!==a.slug||e[10]!==u?(t={org:a.slug,agentId:u},e[9]=a.slug,e[10]=u,e[11]=t):t=e[11];let s;e[12]!==l?(s={...l,virtualmcpid:void 0},e[12]=l,e[13]=s):s=e[13];let r;return e[14]!==t||e[15]!==s?(r=g.jsx(m,{to:p.projects,params:t,search:s,hash:!0,replace:!0}),e[14]=t,e[15]=s,e[16]=r):r=e[16],r}let c;return e[17]!==a.slug?(c=g.jsx(m,{to:p.home,params:{org:a.slug},search:N,hash:!0,replace:!0}),e[17]=a.slug,e[18]=c):c=e[18],c}function N(e){return{...e,virtualmcpid:void 0}}export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,cB as ce,j as p,cH as _,cG as T,cE as C,cL as le,cA as de,cX as ue,cT as fe,cM as me}from"./index-
|
|
1
|
+
import{r as l,cB as ce,j as p,cH as _,cG as T,cE as C,cL as le,cA as de,cX as ue,cT as fe,cM as me}from"./index-B1ZvlDM_.js";import{c as Y}from"./index-BdQq_4o_.js";var X=["PageUp","PageDown"],$=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[z,Se,pe]=le(M),[W]=fe(M,[pe]),[he,B]=W(M),q=l.forwardRef((e,t)=>{const{name:o,min:n=0,max:s=100,step:c=1,orientation:r="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:w=[n],value:h,onValueChange:i=()=>{},onValueCommit:d=()=>{},inverted:v=!1,form:R,...g}=e,m=l.useRef(new Set),f=l.useRef(0),x=r==="horizontal"?ge:ve,[S=[],K]=ce({prop:h,defaultProp:w,onChange:b=>{[...m.current][f.current]?.focus(),i(b)}}),V=l.useRef(S);function j(b){const y=ye(S,b);A(b,y)}function se(b){A(b,f.current)}function ae(){const b=V.current[f.current];S[f.current]!==b&&d(S)}function A(b,y,{commit:k}={commit:!1}){const U=_e(c),H=Ce(Math.round((b-n)/c)*c+n,U),I=Y(H,[n,s]);K((D=[])=>{const P=be(D,I,y);if(De(P,u*c)){f.current=P.indexOf(I);const F=String(P)!==String(D);return F&&k&&d(P),F?P:D}else return D})}return p.jsx(he,{scope:e.__scopeSlider,name:o,disabled:a,min:n,max:s,valueIndexToChangeRef:f,thumbs:m.current,values:S,orientation:r,form:R,children:p.jsx(z.Provider,{scope:e.__scopeSlider,children:p.jsx(z.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:_(g.onPointerDown,()=>{a||(V.current=S)}),min:n,max:s,inverted:v,onSlideStart:a?void 0:j,onSlideMove:a?void 0:se,onSlideEnd:a?void 0:ae,onHomeKeyDown:()=>!a&&A(n,0,{commit:!0}),onEndKeyDown:()=>!a&&A(s,S.length-1,{commit:!0}),onStepKeyDown:({event:b,direction:y})=>{if(!a){const H=X.includes(b.key)||b.shiftKey&&$.includes(b.key)?10:1,I=f.current,D=S[I],P=c*H*y;A(D+P,I,{commit:!0})}}})})})})});q.displayName=M;var[J,Q]=W(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ge=l.forwardRef((e,t)=>{const{min:o,max:n,dir:s,inverted:c,onSlideStart:r,onSlideMove:a,onSlideEnd:u,onStepKeyDown:w,...h}=e,[i,d]=l.useState(null),v=C(t,x=>d(x)),R=l.useRef(void 0),g=de(s),m=g==="ltr",f=m&&!c||!m&&c;function E(x){const S=R.current||i.getBoundingClientRect(),K=[0,S.width],j=O(K,f?[o,n]:[n,o]);return R.current=S,j(x-S.left)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:p.jsx(Z,{dir:g,"data-orientation":"horizontal",...h,ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=E(x.clientX);r?.(S)},onSlideMove:x=>{const S=E(x.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:x=>{const K=G[f?"from-left":"from-right"].includes(x.key);w?.({event:x,direction:K?-1:1})}})})}),ve=l.forwardRef((e,t)=>{const{min:o,max:n,inverted:s,onSlideStart:c,onSlideMove:r,onSlideEnd:a,onStepKeyDown:u,...w}=e,h=l.useRef(null),i=C(t,h),d=l.useRef(void 0),v=!s;function R(g){const m=d.current||h.current.getBoundingClientRect(),f=[0,m.height],x=O(f,v?[n,o]:[o,n]);return d.current=m,x(g-m.top)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:p.jsx(Z,{"data-orientation":"vertical",...w,ref:i,style:{...w.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=R(g.clientY);c?.(m)},onSlideMove:g=>{const m=R(g.clientY);r?.(m)},onSlideEnd:()=>{d.current=void 0,a?.()},onStepKeyDown:g=>{const f=G[v?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:f?-1:1})}})})}),Z=l.forwardRef((e,t)=>{const{__scopeSlider:o,onSlideStart:n,onSlideMove:s,onSlideEnd:c,onHomeKeyDown:r,onEndKeyDown:a,onStepKeyDown:u,...w}=e,h=B(M,o);return p.jsx(T.span,{...w,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):X.concat($).includes(i.key)&&(u(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const d=i.target;d.setPointerCapture(i.pointerId),i.preventDefault(),h.thumbs.has(d)?d.focus():n(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&s(i)}),onPointerUp:_(e.onPointerUp,i=>{const d=i.target;d.hasPointerCapture(i.pointerId)&&(d.releasePointerCapture(i.pointerId),c(i))})})}),ee="SliderTrack",te=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=B(ee,o);return p.jsx(T.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var N="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=B(N,o),c=Q(N,o),r=l.useRef(null),a=C(t,r),u=s.values.length,w=s.values.map(d=>ie(d,s.min,s.max)),h=u>1?Math.min(...w):0,i=100-Math.max(...w);return p.jsx(T.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[c.startEdge]:h+"%",[c.endEdge]:i+"%"}})});ne.displayName=N;var L="SliderThumb",oe=l.forwardRef((e,t)=>{const o=Se(e.__scopeSlider),[n,s]=l.useState(null),c=C(t,a=>s(a)),r=l.useMemo(()=>n?o().findIndex(a=>a.ref.current===n):-1,[o,n]);return p.jsx(we,{...e,ref:c,index:r})}),we=l.forwardRef((e,t)=>{const{__scopeSlider:o,index:n,name:s,...c}=e,r=B(L,o),a=Q(L,o),[u,w]=l.useState(null),h=C(t,E=>w(E)),i=u?r.form||!!u.closest("form"):!0,d=ue(u),v=r.values[n],R=v===void 0?0:ie(v,r.min,r.max),g=Re(n,r.values.length),m=d?.[a.size],f=m?Pe(m,R,a.direction):0;return l.useEffect(()=>{if(u)return r.thumbs.add(u),()=>{r.thumbs.delete(u)}},[u,r.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${R}% + ${f}px)`},children:[p.jsx(z.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(T.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":r.min,"aria-valuenow":v,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...c,ref:h,style:v===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=n})})}),i&&p.jsx(re,{name:s??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:v},n)]})});oe.displayName=L;var xe="RadioBubbleInput",re=l.forwardRef(({__scopeSlider:e,value:t,...o},n)=>{const s=l.useRef(null),c=C(s,n),r=me(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(r!==t&&h){const i=new Event("input",{bubbles:!0});h.call(a,t),a.dispatchEvent(i)}},[r,t]),p.jsx(T.input,{style:{display:"none"},...o,ref:c,defaultValue:t})});re.displayName=xe;function be(e=[],t,o){const n=[...e];return n[o]=t,n.sort((s,c)=>s-c)}function ie(e,t,o){const c=100/(o-t)*(e-t);return Y(c,[0,100])}function Re(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ye(e,t){if(e.length===1)return 0;const o=e.map(s=>Math.abs(s-t)),n=Math.min(...o);return o.indexOf(n)}function Pe(e,t,o){const n=e/2,c=O([0,50],[0,n]);return(n-c(t)*o)*o}function Ee(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function De(e,t){if(t>0){const o=Ee(e);return Math.min(...o)>=t}return!0}function O(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function _e(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const o=Math.pow(10,t);return Math.round(e*o)/o}var Ae=q,Ie=te,Te=ne,Be=oe;export{Te as R,Ie as T,Ae as a,Be as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ue,r as xe,d as ns,a4 as ht,b as Pe,j as t,B as je,t as dt,by as Yt,aj as as,K as bt,i as Et,a5 as As,m as ot,gv as _s,o as cs,h as Ks,bC as Us,ab as Vs,L as qs,u as Hs,n as _t,E as Wt,R as Bs,bW as Js,h5 as Gs,T as Qs,W as Ys,I as Xt}from"./index-
|
|
1
|
+
import{c as ue,r as xe,d as ns,a4 as ht,b as Pe,j as t,B as je,t as dt,by as Yt,aj as as,K as bt,i as Et,a5 as As,m as ot,gv as _s,o as cs,h as Ks,bC as Us,ab as Vs,L as qs,u as Hs,n as _t,E as Wt,R as Bs,bW as Js,h5 as Gs,T as Qs,W as Ys,I as Xt}from"./index-B1ZvlDM_.js";import{S as Ws}from"./search-input-CxiWeJ7M.js";import{E as Ht}from"./empty-state-DjPM3fy8.js";import{R as Xs}from"./require-capability-C9oBXOPC.js";import{f as js}from"./pair-BZWd7l8i.js";import{u as ts}from"./use-connection-DYtXLDpf.js";import{g as Ps}from"./connection-slug-s2iYHyhO.js";import{B as Lt}from"./badge-sWV0Lz9X.js";import{P as ds,a as ms,b as us}from"./popover-Bmr7L36n.js";import{c as Pt,T as Dt,a as Rt,b as Zs}from"./tooltip-D2vb17oX.js";import{G as fs,e as Ut,bY as el,aP as Ns,Y as tl}from"./agent-icon-B9ymJOYy.js";import{i as sl}from"./Key01-BfEZ7hLZ.js";import{i as ll}from"./Play-DqrEB0p_.js";import{MonacoCodeEditor as bs}from"./monaco-editor-g0g8FNXa.js";import{u as rl}from"./use-mcp-client-C_baTEme.js";import{a as il}from"./repository-binding-CoMozV78.js";import{n as Ot}from"./LinkBroken01-BSh2E4ld.js";import{c as ol}from"./SwitchHorizontal01-CStChVS2.js";import{s as nl}from"./Plus-BF39I64m.js";import{s as al}from"./Trash01-DR_ZbB22.js";import{M as zt}from"./multi-select-BAtpYbAh.js";import{b as yt,a as wt,c as ze,d as St,S as Ct}from"./select-DwKpuPDv.js";import{e as ys,T as cl}from"./time-range-picker-EQi5kb2q.js";import{T as dl}from"./textarea-BYx7yH8o.js";import{C as Ds}from"./collection-tabs-7Ya9gAB2.js";import{S as ml}from"./switch-B89m7bUN.js";import{L as ul}from"./label-PfhFwXDB.js";import{I as It}from"./integration-icon-UdqaK4j5.js";import{A as fl,a as xl,b as pl}from"./alert-CQeq0vZr.js";import{K as gt}from"./monitoring-stats-row-CVBzJu2Z.js";import{b as Bt}from"./use-entitlements-DZIIouH3.js";import{g as gl,b as ws,f as Nt,c as Zt,d as hl,e as Ss,a as xs,h as vl,i as ps,T as jl,j as Nl,r as bl,k as yl}from"./thread-sheet-body-BaVm1ZBO.js";import{u as wl}from"./useSuspenseInfiniteQuery-BiaFhRxh.js";import{c as Sl,S as Cl,b as Rs,a as Ls}from"./sheet-Xug5hLAu.js";import{c as _e,b as vt,d as Jt,e as Gt,T as ge,a as Qt}from"./table-lum-yHpJ.js";import{n as ss,t as ls}from"./ChevronUp-CM8EW0Js.js";import{u as Os}from"./use-id-selection-CcHW6d6u.js";import{u as Fs}from"./use-infinite-scroll-lJK8P9ZI.js";import{u as Il}from"./useInfiniteQuery-CvokX1at.js";import{g as Tl}from"./task-status-DDIH9CGS.js";import{u as kl,d as Ml}from"./use-automations-TW0JJdqx.js";import{A as _l}from"./automation-runs-Dmq-RKIH.js";import{i as Pl}from"./ArrowLeft-CZ3DAg0q.js";import{E as Cs}from"./empty-state-BY5AuJfU.js";import{O as $s}from"./watch-sse-pool-D0y06VhU.js";import{t as Dl}from"./task-key-BCHdFiOO.js";import{b as Rl,r as Ll,O as Ol,e as Fl}from"./order-monitor-day-DvvGpgk-.js";import{F as $l}from"./feature-gate-CecpbIeh.js";import"./SearchMd-BCaWPluh.js";import"./access-gate-CJaU-ahh.js";import"./capability-load-error-DAHIgRW0.js";import"./Tool01-wiKWLRCc.js";import"./collapsible-BzRZ6mh6.js";import"./use-copy-B1cnS_xX.js";import"./usage-stats-BxAReiDs.js";import"./tool-namespace-C8tIomG8.js";import"./form-BcinmXce.js";import"./utils-CVEq3hMx.js";import"./markdown-Mrho5aZm.js";import"./chat-context-CMznzxL2.js";import"./autosend-DPIl8Ow-.js";import"./thread-route-BX8g4tw-.js";import"./use-project-scope-yhiZWd6i.js";import"./thread-intent-BMcVCMdR.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./use-ai-providers-CtG5BelZ.js";import"./use-decopilot-events-_iazqvpf.js";import"./use-organization-settings-D9HfcuG0.js";import"./schema-PUU_l55-.js";import"./task-board-CITA4beV.js";import"./use-mobile-CzZEBajI.js";import"./shell-layout-DP2VC2TO.js";import"./Globe04-DFEQkAAl.js";import"./UserSquare-CoAnLSHH.js";import"./use-deployment-admin-DOzhh6sJ.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-BH2b2x6k.js";import"./CheckCircle-Bg_9Wlgi.js";import"./Monitor01-Cp5O9jEx.js";import"./Zap-C46fglVd.js";import"./command-CG66jyhm.js";import"./index-CtHyBR3B.js";import"./project-icon-CmnD7zSI.js";import"./use-navigate-to-agent-BMQllV2g.js";import"./use-debounced-value-Z34m5Fyz.js";import"./new-project-dialog-C3_nj5Ml.js";import"./repository-picker-Ds67iMZ7.js";import"./github-icon-lmZhrKkb.js";import"./collection-search-CnHLg8Vx.js";import"./ShoppingBag01-WYt5uke3.js";import"./legacy-admin-welcome-dialog-F7XO8XgZ.js";import"./drawer-Bl-xKJR_.js";import"./required-auth-layout-BZsZN7yA.js";import"./use-org-sso-C9hOcGok.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-OepBm0xf.js";import"./types-Dynv4Wt5.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./AlertCircle-B9jzXYca.js";import"./use-mcp-prompts-DpQotIu-.js";import"./use-thread-outputs-Dmf6zhrt.js";import"./file-type-icon-BKtgVCvA.js";import"./index-BjRujN3I.js";import"./ArrowUp-Besm0IZ2.js";import"./ChevronSelectorVertical-UvFeI9z1.js";import"./CreditCard01-Bhqkelsq.js";import"./Minus-Ctt_tNjY.js";import"./Sun-Dniq03T7.js";import"./Upload01-BNm-Yhgs.js";import"./Users01-BKvz85-q.js";import"./editor-CozvZeDY.js";import"./auth-DYk3j3P5.js";import"./checkbox-BR7eeNRm.js";import"./index-BdQq_4o_.js";import"./scroll-area-DPYxTk2f.js";import"./calendar-Doh9vx1Y.js";import"./chart-CTBX1xJ8.js";import"./CategoricalChart-O0wXlREH.js";import"./index-rTnBA7ms.js";import"./tooltipContext-bN8koyv-.js";import"./CartesianChart-C3iUwk_u.js";import"./AreaChart-iov00wo5.js";import"./infiniteQueryObserver-CmW3uI_C.js";import"./useQueries-DOrZn37R.js";import"./ReferenceLine-y99E66AQ.js";import"./feature-paywall-AuKILmgq.js";import"./plan-ladder-C_hexrUw.js";const rs={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},zl=["eq","contains","exists","in"];function El(s){return zl.includes(s)}function jt(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),i=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${i}`}).join(",")}function Al(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...m]=e.split(":"),n=l?decodeURIComponent(l):"";if(n.trim())return{key:n,operator:i&&El(i)?i:"eq",value:decodeURIComponent(m.join(":")||"")}}).filter(e=>e!==void 0)}function Vt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
|
|
2
2
|
`)}function Is(s){return s.trim()?s.split(`
|
|
3
3
|
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...i]=e.split("=");return{key:l||"",operator:"eq",value:i.join("=")}}if(e.includes("~")){const[l,...i]=e.split("~");return{key:l||"",operator:"contains",value:i.join("~")}}if(e.includes("@")){const[l,...i]=e.split("@");return{key:l||"",operator:"in",value:i.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Kl(s){const e={},l={},i=[],m={};for(const n of s)if(n.key.trim())switch(n.operator){case"eq":n.value&&(e[n.key]=n.value);break;case"contains":n.value&&(l[n.key]=`%${n.value}%`);break;case"exists":i.push(n.key);break;case"in":n.value&&(m[n.key]=n.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:i.length>0?i:void 0,propertyInValues:Object.keys(m).length>0?m:void 0}}function Ts(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};const e=s._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let l;try{l=JSON.stringify(s,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const i=l.length;return i<=rs.maxJsonRenderSize?{content:l,isTruncated:!1,originalSize:i}:{content:l.slice(0,rs.maxJsonRenderSize)+`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dF as _}from"./index-
|
|
1
|
+
import{dF as _}from"./index-B1ZvlDM_.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,f as u,au as p,j as s,aY as x,N as a}from"./index-
|
|
1
|
+
import{c as f,f as u,au as p,j as s,aY as x,N as a}from"./index-B1ZvlDM_.js";import{C as j}from"./capability-load-error-DAHIgRW0.js";function d(){const t=f.c(19);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=u(o),{capabilities:l,isPrivileged:m,loading:g,error:c}=p();if(g){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(x,{}),t[1]=e):e=t[1],e}if(c){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("monitoring:view")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("members:manage")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}let n;return t[17]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[17]=r,t[18]=n):n=t[18],n}export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,aq as le,as as re,b as se,a4 as ce,l as de,j as s,m as ue,n as ae,r as D,d as he,aQ as Q,R as J,P as z,aY as fe,B as me}from"./index-BD2-Tfve.js";import{u as pe}from"./use-mobile-BL_lLwbJ.js";import{h as ge,c as be,u as xe,m as ye}from"./use-sidebar-collapsed-pjufulEj.js";import{a as ie,R as je,b as Se}from"./resizable-vYXdh-GF.js";import{c as ve,r as Ce,m as Te}from"./use-chat-layout-state-YDnStvp0.js";import{M as Le,o as Ne}from"./agent-icon-C4zAUQeZ.js";import{c as X,T as Z,a as ee}from"./tooltip-CPWUruKJ.js";import{T as te}from"./toolbar-icon-button-BYM1l_EM.js";import{u as we}from"./use-project-scope-Bv0XQrp-.js";import{b as Pe}from"./repository-binding-t2SUt_ly.js";function ne(l,e){const a=typeof l=="number"?l:Number(l);return!Number.isFinite(a)||a<=0||a>=100?e:a}function ze(l,e){const a=w.c(8);let o;a[0]!==e?(o=c=>ne(c,e),a[0]=e,a[1]=o):o=a[1];const[t,i]=le(l,o);let n;a[2]!==e||a[3]!==t?(n=ne(t,e),a[2]=e,a[3]=t,a[4]=n):n=a[4];let u;return a[5]!==i||a[6]!==n?(u=[n,i],a[5]=i,a[6]=n,a[7]=u):u=a[7],u}const _e=33;function Oe(){const l=w.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=re.sidePanelWidth(),l[0]=e):e=l[0],ze(e,_e)}function Ee(l){const e=w.c(64),{actions:a,navigation:o}=l,t=se(),{org:i}=ce(),n=we(),u=Pe(n),c=ge(),{toggleSidebar:d}=be(),h=xe(),r=oe();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={select:Me},e[0]=f):f=e[0];const m=de(f),b=m?.mainView==="overview";let x;e[1]!==u?.title||e[2]!==t?(x=u?.title??t("common.loading"),e[1]=u?.title,e[2]=t,e[3]=x):x=e[3];const y=x;let j;e[4]!==b||e[5]!==m?.mainView||e[6]!==m?.pageTitle||e[7]!==y||e[8]!==n||e[9]!==t?(j=b?n?y:t("sidebar.navDestinations.home"):m?.mainView==="files"?t("sidebar.navDestinations.context"):t(m?.pageTitle??"page.view"),e[4]=b,e[5]=m?.mainView,e[6]=m?.pageTitle,e[7]=y,e[8]=n,e[9]=t,e[10]=j):j=e[10];const S=j,C=n??"";let T;e[11]!==i.slug||e[12]!==C?(T={to:"/$org/projects/$agentId",params:{org:i.slug,agentId:C}},e[11]=i.slug,e[12]=C,e[13]=T):T=e[13];const p=T;let g;if(e[14]!==c||e[15]!==b||e[16]!==i.slug||e[17]!==p||e[18]!==y||e[19]!==n||e[20]!==t||e[21]!==S){if(g=[],c){let v;e[23]!==t?(v=t("sidebar.navDestinations.settings"),e[23]=t,e[24]=v):v=e[24];let B;e[25]!==i.slug?(B={to:"/$org/settings/general",params:{org:i.slug}},e[25]=i.slug,e[26]=B):B=e[26];let K;e[27]!==v||e[28]!==B?(K={key:"settings",label:v,link:B},e[27]=v,e[28]=B,e[29]=K):K=e[29],g.push(K)}else if(n&&!b){let v;e[30]!==p||e[31]!==y?(v={key:"project",label:y,link:p},e[30]=p,e[31]=y,e[32]=v):v=e[32],g.push(v)}let V;e[33]!==S?(V={key:"page",label:S},e[33]=S,e[34]=V):V=e[34],g.push(V),e[14]=c,e[15]=b,e[16]=i.slug,e[17]=p,e[18]=y,e[19]=n,e[20]=t,e[21]=S,e[22]=g}else g=e[22];const L=h,N=!!r&&!r.threadless&&r.threadOpen;let P;e[35]!==r||e[36]!==L||e[37]!==t?(P=L&&r&&!r.threadless&&s.jsxs(X,{children:[s.jsx(Z,{asChild:!0,children:s.jsx(te,{"aria-label":t(r.threadOpen?"page.closeThread":"page.openThread"),"aria-pressed":r.threadOpen,active:r.threadOpen,onClick:r.toggleThread,children:s.jsx(Le,{size:16})})}),s.jsx(ee,{side:"bottom",children:t(r.threadOpen?"page.closeThread":"page.openThread")})]}),e[35]=r,e[36]=L,e[37]=t,e[38]=P):P=e[38];const q=P,W=(!L||N)&&"md:hidden";let _;e[39]!==W?(_=ue(W),e[39]=W,e[40]=_):_=e[40];let O;e[41]!==t?(O=t("page.expandSidebar"),e[41]=t,e[42]=O):O=e[42];let A;e[43]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ne,{size:16}),e[43]=A):A=e[43];let E;e[44]!==_||e[45]!==O||e[46]!==d?(E=s.jsx(Z,{asChild:!0,children:s.jsx(te,{className:_,onClick:d,"aria-label":O,children:A})}),e[44]=_,e[45]=O,e[46]=d,e[47]=E):E=e[47];let M;e[48]!==t?(M=t("page.expandSidebar"),e[48]=t,e[49]=M):M=e[49];let R;e[50]!==M?(R=s.jsx(ee,{side:"bottom",children:M}),e[50]=M,e[51]=R):R=e[51];let k;e[52]!==E||e[53]!==R?(k=s.jsxs(X,{children:[E,R]}),e[52]=E,e[53]=R,e[54]=k):k=e[54];let I;e[55]!==q||e[56]!==k?(I=s.jsxs(s.Fragment,{children:[k,q]}),e[55]=q,e[56]=k,e[57]=I):I=e[57];let H;return e[58]!==a||e[59]!==g||e[60]!==o||e[61]!==i.name||e[62]!==I?(H=s.jsx(ae.Header,{leading:I,breadcrumbs:g,scope:i.name,actions:a,navigation:o}),e[58]=a,e[59]=g,e[60]=o,e[61]=i.name,e[62]=I,e[63]=H):H=e[63],H}function Me(l){return l.matches.findLast(Re)?.staticData}function Re(l){return l.staticData.pageTitle}const $="chat-layout-thread",F="chat-layout-content",G=D.createContext(null);function ke(){return U()}function oe(){return D.use(G)}function U(){const l=D.use(G);if(!l)throw new Error("ChatLayout regions require a ChatLayout");return l}function Ie(l){const e=w.c(23),{children:a,...o}=l,t=pe(),i=he(),n=D.useRef(null),[u,c]=Oe(),{threadOpen:d,contentOpen:h}=o,r=ve(o),f=d&&h?u:r.side,m=100-f,b=p=>{const g=p.getLayout(),L=g[$],N=g[F];typeof L!="number"||typeof N!="number"||Math.abs(L-f)<.001&&Math.abs(N-m)<.001||p.setLayout({[$]:f,[F]:m})},x=Ce({visibility:o,threadVisibilityExplicit:o.threadVisibilityExplicit});let y;e[0]!==t||e[1]!==o||e[2]!==x?(y={...o,isMobile:t,mobileSurface:x},e[0]=t,e[1]=o,e[2]=x,e[3]=y):y=e[3];const j=y;let S;e[4]!==t||e[5]!==o||e[6]!==i||e[7]!==d||e[8]!==j?(S=!o.threadless&&s.jsx(ye,{open:t?j.mobileSurface==="chat":d,onToggle:()=>{t?i({to:".",search:p=>({...p,...Te(j.mobileSurface==="chat"?"main":"chat")}),replace:!0}):o.toggleThread()}}),e[4]=t,e[5]=o,e[6]=i,e[7]=d,e[8]=j,e[9]=S):S=e[9];let C;e[10]!==a||e[11]!==h||e[12]!==m||e[13]!==t||e[14]!==c||e[15]!==b||e[16]!==d||e[17]!==f?(C=t?s.jsx("div",{"data-slot":"chat-layout",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background",children:a}):s.jsx(je,{ref:p=>{if(n.current=p,!p)return;let g=!0;return queueMicrotask(()=>{g&&b(p)}),()=>{g=!1,n.current===p&&(n.current=null)}},defaultLayout:{[$]:f,[F]:m},orientation:"horizontal","data-slot":"chat-layout",className:"flex-1 min-h-0 pt-1 pb-1 pr-1 pl-0 [&>[data-chat-layout-panel-open]]:!min-w-[320px]",style:{overflow:"visible"},onLayoutChanged:(p,g)=>{const{isUserInteraction:L}=g;if(!L){const P=n.current;P&&b(P);return}const N=p[$];d&&h&&typeof N=="number"&&N>0&&N<100&&c(N)},children:a}),e[10]=a,e[11]=h,e[12]=m,e[13]=t,e[14]=c,e[15]=b,e[16]=d,e[17]=f,e[18]=C):C=e[18];let T;return e[19]!==S||e[20]!==C||e[21]!==j?(T=s.jsxs(G,{value:j,children:[S,C]}),e[19]=S,e[20]=C,e[21]=j,e[22]=T):T=e[22],T}function Be(l){const e=w.c(16),{children:a,topbar:o}=l,t=U();if(t.isMobile){let r;return e[0]!==a||e[1]!==t.mobileSurface||e[2]!==o?(r=t.mobileSurface==="chat"?s.jsxs(z,{variant:"plain","data-slot":"chat-layout-thread",children:[o,s.jsx(z.Content,{"data-testid":"chat-panel",children:a})]}):null,e[0]=a,e[1]=t.mobileSurface,e[2]=o,e[3]=r):r=e[3],r}const i=t.threadOpen?"":void 0;let n;e[4]!==a||e[5]!==t.threadOpen||e[6]!==o?(n=t.threadOpen&&s.jsxs(s.Fragment,{children:[o,s.jsx(z.Content,{"data-testid":"chat-panel",children:a})]}),e[4]=a,e[5]=t.threadOpen,e[6]=o,e[7]=n):n=e[7];let u;e[8]!==n?(u=s.jsx("div",{className:"h-full min-h-0 p-0.5",children:s.jsx(z,{"data-testid":"side-panel",children:n})}),e[8]=n,e[9]=u):u=e[9];let c;e[10]!==i||e[11]!==u?(c=s.jsx(ie,{id:$,defaultSize:"33%",minSize:"20%",collapsible:!0,collapsedSize:"0%","data-chat-layout-panel-open":i,className:"min-w-0 overflow-hidden bg-sidebar",children:u}),e[10]=i,e[11]=u,e[12]=c):c=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Se,{className:"bg-sidebar"}),e[13]=d):d=e[13];let h;return e[14]!==c?(h=s.jsxs(s.Fragment,{children:[c,d]}),e[14]=c,e[15]=h):h=e[15],h}function $e({children:l,routeId:e}){return l}function Y(l){const e=w.c(23),{children:a,actions:o,drawer:t,aside:i}=l,n=U();if(n.isMobile&&n.mobileSurface!=="main")return null;const u=n.isMobile?"plain":"card";let c;e[0]!==o||e[1]!==n.contentNavigation?(c=s.jsx(Ee,{navigation:n.contentNavigation,actions:o}),e[0]=o,e[1]=n.contentNavigation,e[2]=c):c=e[2];let d;e[3]!==a||e[4]!==n.contentKey?(d=s.jsx(Q,{children:s.jsx($e,{routeId:n.contentKey,children:a})}),e[3]=a,e[4]=n.contentKey,e[5]=d):d=e[5];let h;e[6]!==n.contentKey||e[7]!==d?(h=s.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:s.jsx(J,{children:d},n.contentKey)}),e[6]=n.contentKey,e[7]=d,e[8]=h):h=e[8];let r;e[9]!==t||e[10]!==h?(r=s.jsxs(z.Content,{children:[h,t]}),e[9]=t,e[10]=h,e[11]=r):r=e[11];let f;e[12]!==c||e[13]!==r?(f=s.jsxs(ae.Breadcrumbs.Provider,{children:[c,r]}),e[12]=c,e[13]=r,e[14]=f):f=e[14];let m;e[15]!==u||e[16]!==f?(m=s.jsx(z,{"data-testid":"main-panel",variant:u,children:f}),e[15]=u,e[16]=f,e[17]=m):m=e[17];const b=m;let x;return e[18]!==i||e[19]!==n.contentOpen||e[20]!==n.isMobile||e[21]!==b?(x=n.isMobile?b:s.jsx(ie,{id:F,defaultSize:"67%",minSize:"20%",collapsible:!0,collapsedSize:"0%","data-chat-layout-panel-open":n.contentOpen?"":void 0,className:"min-w-0 overflow-hidden bg-sidebar",children:s.jsxs("div",{className:"flex h-full min-h-0",children:[s.jsx("div",{className:"h-full min-h-0 min-w-0 flex-1 p-0.5",children:b}),i&&s.jsx("div",{className:"h-full min-h-0 w-[42%] min-w-80 shrink-0 p-0.5",children:s.jsx(z,{"data-testid":"aside-panel",children:s.jsx(J,{children:s.jsx(Q,{children:i})},D.isValidElement(i)?i.key??void 0:void 0)})})]})}),e[18]=i,e[19]=n.contentOpen,e[20]=n.isMobile,e[21]=b,e[22]=x):x=e[22],x}function De(){const l=w.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Y,{children:s.jsx(fe,{})}),l[0]=e):e=l[0],e}function Ae(l){const e=w.c(18),{error:a,reset:o}=l,t=se();let i;e[0]!==t?(i=t("common.errorBoundary.somethingWentWrong"),e[0]=t,e[1]=i):i=e[1];let n;e[2]!==i?(n=s.jsx("h2",{className:"text-lg font-medium",children:i}),e[2]=i,e[3]=n):n=e[3];let u;e[4]!==a.message||e[5]!==t?(u=a.message||t("common.errorBoundary.unexpectedError"),e[4]=a.message,e[5]=t,e[6]=u):u=e[6];let c;e[7]!==u?(c=s.jsx("p",{className:"max-w-lg whitespace-pre-wrap text-sm text-muted-foreground",children:u}),e[7]=u,e[8]=c):c=e[8];let d;e[9]!==t?(d=t("common.errorBoundary.tryAgain"),e[9]=t,e[10]=d):d=e[10];let h;e[11]!==o||e[12]!==d?(h=s.jsx(me,{variant:"outline",onClick:o,children:d}),e[11]=o,e[12]=d,e[13]=h):h=e[13];let r;return e[14]!==n||e[15]!==c||e[16]!==h?(r=s.jsx(Y,{children:s.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-4 p-6 text-center",children:[n,c,h]})}),e[14]=n,e[15]=c,e[16]=h,e[17]=r):r=e[17],r}const He=Object.assign(Ie,{Thread:Be,Content:Y}),Xe=Object.freeze(Object.defineProperty({__proto__:null,ChatLayout:He,ChatLayoutError:Ae,ChatLayoutPending:De,useChatLayout:ke,useOptionalChatLayout:oe},Symbol.toStringTag,{value:"Module"}));export{He as C,Ee as R,Xe as i,ke as u};
|
|
1
|
+
import{c as w,aq as le,as as re,b as se,a4 as ce,l as de,j as s,m as ue,n as ae,r as D,d as he,aQ as Q,R as J,P as z,aY as fe,B as me}from"./index-B1ZvlDM_.js";import{u as pe}from"./use-mobile-CzZEBajI.js";import{h as ge,c as be,u as xe,m as ye}from"./use-sidebar-collapsed-DTqL_ZOd.js";import{a as ie,R as je,b as Se}from"./resizable-CMMESj2f.js";import{c as ve,r as Ce,m as Te}from"./use-chat-layout-state-CakVfv2a.js";import{M as Le,o as Ne}from"./agent-icon-B9ymJOYy.js";import{c as X,T as Z,a as ee}from"./tooltip-D2vb17oX.js";import{T as te}from"./toolbar-icon-button-qX2Q8Vi7.js";import{u as we}from"./use-project-scope-yhiZWd6i.js";import{b as Pe}from"./repository-binding-CoMozV78.js";function ne(l,e){const a=typeof l=="number"?l:Number(l);return!Number.isFinite(a)||a<=0||a>=100?e:a}function ze(l,e){const a=w.c(8);let o;a[0]!==e?(o=c=>ne(c,e),a[0]=e,a[1]=o):o=a[1];const[t,i]=le(l,o);let n;a[2]!==e||a[3]!==t?(n=ne(t,e),a[2]=e,a[3]=t,a[4]=n):n=a[4];let u;return a[5]!==i||a[6]!==n?(u=[n,i],a[5]=i,a[6]=n,a[7]=u):u=a[7],u}const _e=33;function Oe(){const l=w.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=re.sidePanelWidth(),l[0]=e):e=l[0],ze(e,_e)}function Ee(l){const e=w.c(64),{actions:a,navigation:o}=l,t=se(),{org:i}=ce(),n=we(),u=Pe(n),c=ge(),{toggleSidebar:d}=be(),h=xe(),r=oe();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={select:Me},e[0]=f):f=e[0];const m=de(f),b=m?.mainView==="overview";let x;e[1]!==u?.title||e[2]!==t?(x=u?.title??t("common.loading"),e[1]=u?.title,e[2]=t,e[3]=x):x=e[3];const y=x;let j;e[4]!==b||e[5]!==m?.mainView||e[6]!==m?.pageTitle||e[7]!==y||e[8]!==n||e[9]!==t?(j=b?n?y:t("sidebar.navDestinations.home"):m?.mainView==="files"?t("sidebar.navDestinations.context"):t(m?.pageTitle??"page.view"),e[4]=b,e[5]=m?.mainView,e[6]=m?.pageTitle,e[7]=y,e[8]=n,e[9]=t,e[10]=j):j=e[10];const S=j,C=n??"";let T;e[11]!==i.slug||e[12]!==C?(T={to:"/$org/projects/$agentId",params:{org:i.slug,agentId:C}},e[11]=i.slug,e[12]=C,e[13]=T):T=e[13];const p=T;let g;if(e[14]!==c||e[15]!==b||e[16]!==i.slug||e[17]!==p||e[18]!==y||e[19]!==n||e[20]!==t||e[21]!==S){if(g=[],c){let v;e[23]!==t?(v=t("sidebar.navDestinations.settings"),e[23]=t,e[24]=v):v=e[24];let B;e[25]!==i.slug?(B={to:"/$org/settings/general",params:{org:i.slug}},e[25]=i.slug,e[26]=B):B=e[26];let K;e[27]!==v||e[28]!==B?(K={key:"settings",label:v,link:B},e[27]=v,e[28]=B,e[29]=K):K=e[29],g.push(K)}else if(n&&!b){let v;e[30]!==p||e[31]!==y?(v={key:"project",label:y,link:p},e[30]=p,e[31]=y,e[32]=v):v=e[32],g.push(v)}let V;e[33]!==S?(V={key:"page",label:S},e[33]=S,e[34]=V):V=e[34],g.push(V),e[14]=c,e[15]=b,e[16]=i.slug,e[17]=p,e[18]=y,e[19]=n,e[20]=t,e[21]=S,e[22]=g}else g=e[22];const L=h,N=!!r&&!r.threadless&&r.threadOpen;let P;e[35]!==r||e[36]!==L||e[37]!==t?(P=L&&r&&!r.threadless&&s.jsxs(X,{children:[s.jsx(Z,{asChild:!0,children:s.jsx(te,{"aria-label":t(r.threadOpen?"page.closeThread":"page.openThread"),"aria-pressed":r.threadOpen,active:r.threadOpen,onClick:r.toggleThread,children:s.jsx(Le,{size:16})})}),s.jsx(ee,{side:"bottom",children:t(r.threadOpen?"page.closeThread":"page.openThread")})]}),e[35]=r,e[36]=L,e[37]=t,e[38]=P):P=e[38];const q=P,W=(!L||N)&&"md:hidden";let _;e[39]!==W?(_=ue(W),e[39]=W,e[40]=_):_=e[40];let O;e[41]!==t?(O=t("page.expandSidebar"),e[41]=t,e[42]=O):O=e[42];let A;e[43]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ne,{size:16}),e[43]=A):A=e[43];let E;e[44]!==_||e[45]!==O||e[46]!==d?(E=s.jsx(Z,{asChild:!0,children:s.jsx(te,{className:_,onClick:d,"aria-label":O,children:A})}),e[44]=_,e[45]=O,e[46]=d,e[47]=E):E=e[47];let M;e[48]!==t?(M=t("page.expandSidebar"),e[48]=t,e[49]=M):M=e[49];let R;e[50]!==M?(R=s.jsx(ee,{side:"bottom",children:M}),e[50]=M,e[51]=R):R=e[51];let k;e[52]!==E||e[53]!==R?(k=s.jsxs(X,{children:[E,R]}),e[52]=E,e[53]=R,e[54]=k):k=e[54];let I;e[55]!==q||e[56]!==k?(I=s.jsxs(s.Fragment,{children:[k,q]}),e[55]=q,e[56]=k,e[57]=I):I=e[57];let H;return e[58]!==a||e[59]!==g||e[60]!==o||e[61]!==i.name||e[62]!==I?(H=s.jsx(ae.Header,{leading:I,breadcrumbs:g,scope:i.name,actions:a,navigation:o}),e[58]=a,e[59]=g,e[60]=o,e[61]=i.name,e[62]=I,e[63]=H):H=e[63],H}function Me(l){return l.matches.findLast(Re)?.staticData}function Re(l){return l.staticData.pageTitle}const $="chat-layout-thread",F="chat-layout-content",G=D.createContext(null);function ke(){return U()}function oe(){return D.use(G)}function U(){const l=D.use(G);if(!l)throw new Error("ChatLayout regions require a ChatLayout");return l}function Ie(l){const e=w.c(23),{children:a,...o}=l,t=pe(),i=he(),n=D.useRef(null),[u,c]=Oe(),{threadOpen:d,contentOpen:h}=o,r=ve(o),f=d&&h?u:r.side,m=100-f,b=p=>{const g=p.getLayout(),L=g[$],N=g[F];typeof L!="number"||typeof N!="number"||Math.abs(L-f)<.001&&Math.abs(N-m)<.001||p.setLayout({[$]:f,[F]:m})},x=Ce({visibility:o,threadVisibilityExplicit:o.threadVisibilityExplicit});let y;e[0]!==t||e[1]!==o||e[2]!==x?(y={...o,isMobile:t,mobileSurface:x},e[0]=t,e[1]=o,e[2]=x,e[3]=y):y=e[3];const j=y;let S;e[4]!==t||e[5]!==o||e[6]!==i||e[7]!==d||e[8]!==j?(S=!o.threadless&&s.jsx(ye,{open:t?j.mobileSurface==="chat":d,onToggle:()=>{t?i({to:".",search:p=>({...p,...Te(j.mobileSurface==="chat"?"main":"chat")}),replace:!0}):o.toggleThread()}}),e[4]=t,e[5]=o,e[6]=i,e[7]=d,e[8]=j,e[9]=S):S=e[9];let C;e[10]!==a||e[11]!==h||e[12]!==m||e[13]!==t||e[14]!==c||e[15]!==b||e[16]!==d||e[17]!==f?(C=t?s.jsx("div",{"data-slot":"chat-layout",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background",children:a}):s.jsx(je,{ref:p=>{if(n.current=p,!p)return;let g=!0;return queueMicrotask(()=>{g&&b(p)}),()=>{g=!1,n.current===p&&(n.current=null)}},defaultLayout:{[$]:f,[F]:m},orientation:"horizontal","data-slot":"chat-layout",className:"flex-1 min-h-0 pt-1 pb-1 pr-1 pl-0 [&>[data-chat-layout-panel-open]]:!min-w-[320px]",style:{overflow:"visible"},onLayoutChanged:(p,g)=>{const{isUserInteraction:L}=g;if(!L){const P=n.current;P&&b(P);return}const N=p[$];d&&h&&typeof N=="number"&&N>0&&N<100&&c(N)},children:a}),e[10]=a,e[11]=h,e[12]=m,e[13]=t,e[14]=c,e[15]=b,e[16]=d,e[17]=f,e[18]=C):C=e[18];let T;return e[19]!==S||e[20]!==C||e[21]!==j?(T=s.jsxs(G,{value:j,children:[S,C]}),e[19]=S,e[20]=C,e[21]=j,e[22]=T):T=e[22],T}function Be(l){const e=w.c(16),{children:a,topbar:o}=l,t=U();if(t.isMobile){let r;return e[0]!==a||e[1]!==t.mobileSurface||e[2]!==o?(r=t.mobileSurface==="chat"?s.jsxs(z,{variant:"plain","data-slot":"chat-layout-thread",children:[o,s.jsx(z.Content,{"data-testid":"chat-panel",children:a})]}):null,e[0]=a,e[1]=t.mobileSurface,e[2]=o,e[3]=r):r=e[3],r}const i=t.threadOpen?"":void 0;let n;e[4]!==a||e[5]!==t.threadOpen||e[6]!==o?(n=t.threadOpen&&s.jsxs(s.Fragment,{children:[o,s.jsx(z.Content,{"data-testid":"chat-panel",children:a})]}),e[4]=a,e[5]=t.threadOpen,e[6]=o,e[7]=n):n=e[7];let u;e[8]!==n?(u=s.jsx("div",{className:"h-full min-h-0 p-0.5",children:s.jsx(z,{"data-testid":"side-panel",children:n})}),e[8]=n,e[9]=u):u=e[9];let c;e[10]!==i||e[11]!==u?(c=s.jsx(ie,{id:$,defaultSize:"33%",minSize:"20%",collapsible:!0,collapsedSize:"0%","data-chat-layout-panel-open":i,className:"min-w-0 overflow-hidden bg-sidebar",children:u}),e[10]=i,e[11]=u,e[12]=c):c=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Se,{className:"bg-sidebar"}),e[13]=d):d=e[13];let h;return e[14]!==c?(h=s.jsxs(s.Fragment,{children:[c,d]}),e[14]=c,e[15]=h):h=e[15],h}function $e({children:l,routeId:e}){return l}function Y(l){const e=w.c(23),{children:a,actions:o,drawer:t,aside:i}=l,n=U();if(n.isMobile&&n.mobileSurface!=="main")return null;const u=n.isMobile?"plain":"card";let c;e[0]!==o||e[1]!==n.contentNavigation?(c=s.jsx(Ee,{navigation:n.contentNavigation,actions:o}),e[0]=o,e[1]=n.contentNavigation,e[2]=c):c=e[2];let d;e[3]!==a||e[4]!==n.contentKey?(d=s.jsx(Q,{children:s.jsx($e,{routeId:n.contentKey,children:a})}),e[3]=a,e[4]=n.contentKey,e[5]=d):d=e[5];let h;e[6]!==n.contentKey||e[7]!==d?(h=s.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:s.jsx(J,{children:d},n.contentKey)}),e[6]=n.contentKey,e[7]=d,e[8]=h):h=e[8];let r;e[9]!==t||e[10]!==h?(r=s.jsxs(z.Content,{children:[h,t]}),e[9]=t,e[10]=h,e[11]=r):r=e[11];let f;e[12]!==c||e[13]!==r?(f=s.jsxs(ae.Breadcrumbs.Provider,{children:[c,r]}),e[12]=c,e[13]=r,e[14]=f):f=e[14];let m;e[15]!==u||e[16]!==f?(m=s.jsx(z,{"data-testid":"main-panel",variant:u,children:f}),e[15]=u,e[16]=f,e[17]=m):m=e[17];const b=m;let x;return e[18]!==i||e[19]!==n.contentOpen||e[20]!==n.isMobile||e[21]!==b?(x=n.isMobile?b:s.jsx(ie,{id:F,defaultSize:"67%",minSize:"20%",collapsible:!0,collapsedSize:"0%","data-chat-layout-panel-open":n.contentOpen?"":void 0,className:"min-w-0 overflow-hidden bg-sidebar",children:s.jsxs("div",{className:"flex h-full min-h-0",children:[s.jsx("div",{className:"h-full min-h-0 min-w-0 flex-1 p-0.5",children:b}),i&&s.jsx("div",{className:"h-full min-h-0 w-[42%] min-w-80 shrink-0 p-0.5",children:s.jsx(z,{"data-testid":"aside-panel",children:s.jsx(J,{children:s.jsx(Q,{children:i})},D.isValidElement(i)?i.key??void 0:void 0)})})]})}),e[18]=i,e[19]=n.contentOpen,e[20]=n.isMobile,e[21]=b,e[22]=x):x=e[22],x}function De(){const l=w.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Y,{children:s.jsx(fe,{})}),l[0]=e):e=l[0],e}function Ae(l){const e=w.c(18),{error:a,reset:o}=l,t=se();let i;e[0]!==t?(i=t("common.errorBoundary.somethingWentWrong"),e[0]=t,e[1]=i):i=e[1];let n;e[2]!==i?(n=s.jsx("h2",{className:"text-lg font-medium",children:i}),e[2]=i,e[3]=n):n=e[3];let u;e[4]!==a.message||e[5]!==t?(u=a.message||t("common.errorBoundary.unexpectedError"),e[4]=a.message,e[5]=t,e[6]=u):u=e[6];let c;e[7]!==u?(c=s.jsx("p",{className:"max-w-lg whitespace-pre-wrap text-sm text-muted-foreground",children:u}),e[7]=u,e[8]=c):c=e[8];let d;e[9]!==t?(d=t("common.errorBoundary.tryAgain"),e[9]=t,e[10]=d):d=e[10];let h;e[11]!==o||e[12]!==d?(h=s.jsx(me,{variant:"outline",onClick:o,children:d}),e[11]=o,e[12]=d,e[13]=h):h=e[13];let r;return e[14]!==n||e[15]!==c||e[16]!==h?(r=s.jsx(Y,{children:s.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-4 p-6 text-center",children:[n,c,h]})}),e[14]=n,e[15]=c,e[16]=h,e[17]=r):r=e[17],r}const He=Object.assign(Ie,{Thread:Be,Content:Y}),Xe=Object.freeze(Object.defineProperty({__proto__:null,ChatLayout:He,ChatLayoutError:Ae,ChatLayoutPending:De,useChatLayout:ke,useOptionalChatLayout:oe},Symbol.toStringTag,{value:"Module"}));export{He as C,Ee as R,Xe as i,ke as u};
|
package/dist/client/assets/{infiniteQueryObserver-CFbscoFz.js → infiniteQueryObserver-CmW3uI_C.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ey as g,ez as d,eA as v}from"./index-
|
|
1
|
+
import{ey as g,ez as d,eA as v}from"./index-B1ZvlDM_.js";var b=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:c,isRefetching:u,isError:a,isRefetchError:P}=i,r=s.fetchMeta?.fetchMore?.direction,h=a&&r==="forward",o=c&&r==="forward",n=a&&r==="backward",f=c&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,s.data),hasPreviousPage:d(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{b as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as k,j as s,hW as de,b as Y,hX as ue,r as le,hY as xe,hZ as re,gv as T,gL as K,B as J,bC as V,a7 as pe}from"./index-BD2-Tfve.js";import{i as he}from"./CreditCard01-gy5ViYmH.js";import{B as R}from"./badge-DaX-o_aM.js";import{M as je}from"./multi-select-VgSnOaCE.js";import{S as be,d as ve,c as Be,a as Ne,b as Se}from"./select-DzfQ0lJI.js";import{T as $,a as ye,b as ie,c as F,d as Te,e as we}from"./table-tgAIcOjU.js";import{C as ke,X as Ue,Y as Ce}from"./CartesianChart-BzQXSn72.js";import{T as De}from"./Tooltip-BrxiV7qQ.js";import{a as _e,A as Le}from"./AreaChart-Bs4ZyKEJ.js";import{c2 as Me}from"./CategoricalChart-B34tgPab.js";import{R as Re}from"./require-capability-BpHMNsFK.js";import"./checkbox-C9g8LYdj.js";import"./Minus-BQ1U44OY.js";import"./ChevronUp-CxdkHAYX.js";import"./command-DZp1V8X-.js";import"./index-KVVHw2gU.js";import"./SearchMd-DDYfB5ME.js";import"./popover-BX49i_9-.js";import"./index-BdQq_4o_.js";import"./index-DLzGeaMa.js";import"./index-D8kKxC0w.js";import"./access-gate-CmrYCcY4.js";import"./capability-load-error-De4jloBS.js";const Q=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1}),ne=["B","KB","MB","GB","TB","PB"];function oe(t){if(t<=0)return"0 B";const e=Math.min(ne.length-1,Math.floor(Math.log(t)/Math.log(1024))),n=t/1024**e;return`${n.toFixed(n>=100||e===0?0:1)} ${ne[e]}`}const X=50,$e="https://assets.decocache.com/decocms/45f9e905-046b-4aeb-8420-0377a7d0d041/deco_Transferencia.pdf",Fe=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function ce(t){return new Date(`${t.slice(0,10)}T00:00:00Z`)}function ee(t){return ce(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"})}function Ie(){const t=new Date;return Array.from({length:12},(e,n)=>{const l=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()-n,1));return{value:l.toISOString().slice(0,10),label:l.toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"})}})}function Pe(t){return new Date(`${t}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})}function ae(t){const e=k.c(30),{usage:n,metric:l,colorNum:o,formatValue:f,height:i}=t,a=`var(--chart-${o})`,d=`infra-billing-${l}`;let g;e[0]!==n?(g=n.map(Ae),e[0]=n,e[1]=g):g=e[1];const x=g;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b={left:0,right:4,top:8,bottom:0},e[2]=b):b=e[2];let r,p;e[3]!==a?(r=s.jsx("stop",{offset:"0%",stopColor:a,stopOpacity:.25}),p=s.jsx("stop",{offset:"100%",stopColor:a,stopOpacity:0}),e[3]=a,e[4]=r,e[5]=p):(r=e[4],p=e[5]);let h;e[6]!==d||e[7]!==r||e[8]!==p?(h=s.jsx("defs",{children:s.jsxs("linearGradient",{id:d,x1:"0",y1:"0",x2:"0",y2:"1",children:[r,p]})}),e[6]=d,e[7]=r,e[8]=p,e[9]=h):h=e[9];let u;e[10]!==f||e[11]!==i?(u=i>100&&s.jsxs(s.Fragment,{children:[s.jsx(ke,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(Ue,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},interval:"preserveStartEnd",tickMargin:8}),s.jsx(Ce,{orientation:"right",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},tickFormatter:f,width:68})]}),e[10]=f,e[11]=i,e[12]=u):u=e[12];let B,v;e[13]===Symbol.for("react.memo_cache_sentinel")?(B={stroke:"var(--border)",strokeDasharray:"4 4"},v={background:"var(--background)",border:"1px solid var(--border)",borderRadius:8,fontSize:12},e[13]=B,e[14]=v):(B=e[13],v=e[14]);let j;e[15]!==f?(j=s.jsx(De,{cursor:B,contentStyle:v,formatter:C=>f(Number(C)||0)}),e[15]=f,e[16]=j):j=e[16];const y=`url(#${d})`;let N;e[17]!==a||e[18]!==l||e[19]!==y?(N=s.jsx(_e,{type:"linear",dataKey:l,stroke:a,strokeWidth:2,fill:y,dot:!1}),e[17]=a,e[18]=l,e[19]=y,e[20]=N):N=e[20];let m;e[21]!==x||e[22]!==N||e[23]!==h||e[24]!==u||e[25]!==j?(m=s.jsxs(Le,{data:x,margin:b,children:[h,u,j,N]}),e[21]=x,e[22]=N,e[23]=h,e[24]=u,e[25]=j,e[26]=m):m=e[26];let S;return e[27]!==i||e[28]!==m?(S=s.jsx(Me,{width:"100%",height:i,children:m}),e[27]=i,e[28]=m,e[29]=S):S=e[29],S}function Ae(t){return{...t,label:Pe(t.date)}}function Z(t,e){return t.reduce((n,l)=>n+l[e],0)}function Ee(){const t=k.c(39),e=Y(),{sites:n,isLoading:l}=ue(),[o,f]=le.useState(null),i=Ie(),[a,d]=le.useState(i[0].value);let g;t[0]!==o||t[1]!==n?(g=o??n.slice(0,X),t[0]=o,t[1]=n,t[2]=g):g=t[2];const x=g,b=!o&&n.length>X,{data:r,isLoading:p}=xe(x,a),h=re();if(l){let c;return t[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(V,{className:"h-64 w-full"}),t[3]=c):c=t[3],c}if(n.length===0){let c;t[4]!==e?(c=e("settings.infraBilling.noSites"),t[4]=e,t[5]=c):c=t[5];let w;return t[6]!==c?(w=s.jsx(T,{className:"p-6 text-sm text-muted-foreground",children:c}),t[6]=c,t[7]=w):w=t[7],w}const u=r?.usage??[],B=r?.pageviewsAvailable??!1,v=!!r&&!r.usageUnavailable,j=(c,w)=>v?w(Z(u,c)):"—",y=[{key:"pageviews",title:e("settings.infraBilling.pageviews"),description:e("settings.infraBilling.pageviewsDescription"),colorNum:1,total:B&&v?Q.format(Z(u,"pageviews")):"—"},{key:"requests",title:e("settings.infraBilling.requests"),description:e("settings.infraBilling.requestsDescription"),colorNum:2,total:j("requests",Ze)},{key:"dataTransferBytes",title:e("settings.infraBilling.dataTransfer"),description:e("settings.infraBilling.dataTransferDescription"),colorNum:3,total:j("dataTransferBytes",oe)}],N=Oe;let m;t[8]!==r?.teams?(m=r?.teams??[],t[8]=r?.teams,t[9]=m):m=t[9];const S=m;let C;t[10]!==r?.siteSlugsWithoutTeam?(C=r?.siteSlugsWithoutTeam??[],t[10]=r?.siteSlugsWithoutTeam,t[11]=C):C=t[11];const G=C,U=S.length===1?S[0]:void 0,D=U?.billing??null,te=S.length+(G.length>0?1:0)>1,W=Z(u,"pageviews"),se=W>0?Z(u,"requests")/W:0,me=B&&v&&W>0?se.toFixed(se<10?1:0):"—";let I;t[12]!==r?.billingUnavailable||t[13]!==U||t[14]!==e||t[15]!==S.length?(I=r?.billingUnavailable?e("settings.infraBilling.billingUnavailable"):S.length>1?e("settings.infraBilling.multipleTeams",{count:String(S.length)}):U?fe(U,e):e("settings.infraBilling.noTeam"),t[12]=r?.billingUnavailable,t[13]=U,t[14]=e,t[15]=S.length,t[16]=I):I=t[16];const ge=I;let _;t[17]!==n?(_=n.map(qe),t[17]=n,t[18]=_):_=t[18];let L;t[19]!==e?(L=e("settings.infraBilling.siteLabel"),t[19]=e,t[20]=L):L=t[20];let P;t[21]!==x||t[22]!==_||t[23]!==L?(P=s.jsx(je,{className:"w-auto min-w-56 max-w-full",options:_,defaultValue:x,maxCount:2,placeholder:L,onValueChange:f}),t[21]=x,t[22]=_,t[23]=L,t[24]=P):P=t[24];let M;t[25]!==e?(M=e("settings.infraBilling.monthLabel"),t[25]=e,t[26]=M):M=t[26];let A;t[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ne,{}),t[27]=A):A=t[27];let E;t[28]!==M?(E=s.jsx(Se,{className:"w-48","aria-label":M,children:A}),t[28]=M,t[29]=E):E=t[29];let z;t[30]!==x.length||t[31]!==e?(z=x.length===0&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.pickASite")}),t[30]=x.length,t[31]=e,t[32]=z):z=t[32];let q;t[33]!==e||t[34]!==b?(q=b&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.tooManySites",{count:String(X)})}),t[33]=e,t[34]=b,t[35]=q):q=t[35];let O;return t[36]!==r?.usageUnavailable||t[37]!==e?(O=r?.usageUnavailable&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.warehouseUnavailable")}),t[36]=r?.usageUnavailable,t[37]=e,t[38]=O):O=t[38],s.jsxs("div",{className:"flex flex-col gap-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-4",children:[P,s.jsxs(be,{value:a,onValueChange:d,children:[E,s.jsx(ve,{children:i.map(ze)})]})]}),z,q,O,x.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(K,{title:e("settings.infraBilling.summaryTitle"),children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 px-4",children:[s.jsxs(T,{className:"flex-1 flex flex-col gap-4 p-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(he,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:e("settings.infraBilling.detailsTitle")})]}),U&&D?.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:h.isPending,onClick:()=>h.mutate(U.siteSlugs),children:e("settings.infraBilling.manageButton")})]}),s.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[D?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.currentPlan")}),p?s.jsx(V,{className:"h-5 w-16"}):s.jsx(R,{variant:D.planType==="free"?"secondary":"success",children:e(`settings.infraBilling.plan.${D.planType}`)})]}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:D.nextBillingDate?ee(D.nextBillingDate):"—"})]})]}):!p&&s.jsx("p",{className:"text-xs text-muted-foreground",children:ge}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.requestsPerPageview")}),s.jsx("span",{className:"font-medium tabular-nums",children:me})]})]})]}),y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-2 p-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:i.find(w=>w.value===a)?.label})]}),p?s.jsx(V,{className:"h-8 w-24"}):s.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:c.total}),s.jsx("div",{className:"-mx-2",children:s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:64})})]},c.key))]})}),s.jsx(K,{title:e("settings.infraBilling.metricsTitle"),children:s.jsx("div",{className:"flex flex-col xl:flex-row gap-4 px-4",children:y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-3 p-4",children:[s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:c.description})]}),s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:220})]},c.key))})}),s.jsx(K,{title:e("settings.infraBilling.invoicesTitle"),children:s.jsx("div",{className:"flex flex-col gap-4 px-4",children:r?r.billingUnavailable?s.jsx(T,{className:"p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.billingUnavailable")}):s.jsxs(s.Fragment,{children:[S.map(c=>s.jsx(Ye,{team:c,showSites:te},c.siteSlugs.join(","))),G.length>0&&s.jsxs(T,{className:"flex flex-col gap-1 p-4",children:[te&&s.jsx("span",{className:"text-sm font-medium",children:G.join(", ")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e("settings.infraBilling.noTeam")})]})]}):s.jsx(T,{size:"flush",children:s.jsx(V,{className:"m-4 h-24"})})})})]})]})}function ze(t){return s.jsx(Be,{value:t.value,children:t.label},t.value)}function qe(t){return{label:t,value:t}}function Oe(t){return t==="dataTransferBytes"?oe:Ve}function Ve(t){return Q.format(t)}function Ze(t){return Q.format(t)}function fe(t,e){return t.unavailableReason==="partial_team"?e("settings.infraBilling.partialTeam"):e("settings.infraBilling.billingUnavailable")}function Ye(t){const e=k.c(13),{team:n,showSites:l}=t,o=Y(),f=re(),i=n.billing;let a;e[0]!==i||e[1]!==f||e[2]!==l||e[3]!==o||e[4]!==n.siteSlugs?(a=l&&s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border p-4",children:[s.jsx("span",{className:"text-sm font-medium",children:n.siteSlugs.join(", ")}),i&&s.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[s.jsx(R,{variant:i.planType==="free"?"secondary":"success",children:o(`settings.infraBilling.plan.${i.planType}`)}),i.nextBillingDate&&s.jsxs("span",{className:"flex gap-1.5",children:[s.jsx("span",{className:"text-muted-foreground",children:o("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:ee(i.nextBillingDate)})]}),i.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:f.isPending,onClick:()=>f.mutate(n.siteSlugs),children:o("settings.infraBilling.manageButton")})]})]}),e[0]=i,e[1]=f,e[2]=l,e[3]=o,e[4]=n.siteSlugs,e[5]=a):a=e[5];let d;e[6]!==i||e[7]!==o||e[8]!==n?(d=i?i.invoices.length===0?s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:o("settings.infraBilling.noInvoices")}):s.jsx(Ge,{invoices:i.invoices}):s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:fe(n,o)}),e[6]=i,e[7]=o,e[8]=n,e[9]=d):d=e[9];let g;return e[10]!==a||e[11]!==d?(g=s.jsxs(T,{size:"flush",className:"gap-0 overflow-x-auto",children:[a,d]}),e[10]=a,e[11]=d,e[12]=g):g=e[12],g}function Ge(t){const e=k.c(40),{invoices:n}=t,l=Y();let o;e[0]!==n?(o=n.some(We),e[0]=n,e[1]=o):o=e[1];const f=o;let i;e[2]!==l?(i=l("settings.infraBilling.invoiceReference"),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==i?(a=s.jsx($,{children:i}),e[4]=i,e[5]=a):a=e[5];let d;e[6]!==l?(d=l("settings.infraBilling.invoiceDue"),e[6]=l,e[7]=d):d=e[7];let g;e[8]!==d?(g=s.jsx($,{children:d}),e[8]=d,e[9]=g):g=e[9];let x;e[10]!==l?(x=l("settings.infraBilling.invoiceAmount"),e[10]=l,e[11]=x):x=e[11];let b;e[12]!==x?(b=s.jsx($,{children:x}),e[12]=x,e[13]=b):b=e[13];let r;e[14]!==l?(r=l("settings.infraBilling.invoiceStatus"),e[14]=l,e[15]=r):r=e[15];let p;e[16]!==r?(p=s.jsx($,{children:r}),e[16]=r,e[17]=p):p=e[17];let h;e[18]!==l?(h=l("settings.infraBilling.invoiceDocuments"),e[18]=l,e[19]=h):h=e[19];let u;e[20]!==h?(u=s.jsx($,{children:h}),e[20]=h,e[21]=u):u=e[21];let B;e[22]!==u||e[23]!==a||e[24]!==g||e[25]!==b||e[26]!==p?(B=s.jsx(ye,{children:s.jsxs(ie,{children:[a,g,b,p,u]})}),e[22]=u,e[23]=a,e[24]=g,e[25]=b,e[26]=p,e[27]=B):B=e[27];let v;if(e[28]!==n||e[29]!==l||e[30]!==f){let N;e[32]!==l||e[33]!==f?(N=m=>s.jsxs(ie,{children:[s.jsx(F,{children:m.referenceMonth?ce(m.referenceMonth).toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"}):"—"}),s.jsx(F,{children:m.dueDate?ee(m.dueDate):"—"}),s.jsx(F,{className:"tabular-nums",children:Fe.format(m.value)}),s.jsx(F,{children:s.jsx(Ke,{status:m.status})}),s.jsxs(F,{className:"flex gap-2",children:[m.nfUrl&&s.jsx(H,{href:m.nfUrl,label:l("settings.infraBilling.invoiceNf")}),m.bankSlipUrl&&s.jsx(H,{href:m.bankSlipUrl,label:l("settings.infraBilling.invoiceBankSlip")}),!m.bankSlipUrl&&!f&&m.nfUrl&&s.jsx(H,{href:$e,label:l("settings.infraBilling.invoiceBankTransfer")}),!m.nfUrl&&!m.bankSlipUrl&&"—"]})]},m.id),e[32]=l,e[33]=f,e[34]=N):N=e[34],v=n.map(N),e[28]=n,e[29]=l,e[30]=f,e[31]=v}else v=e[31];let j;e[35]!==v?(j=s.jsx(Te,{children:v}),e[35]=v,e[36]=j):j=e[36];let y;return e[37]!==B||e[38]!==j?(y=s.jsxs(we,{children:[B,j]}),e[37]=B,e[38]=j,e[39]=y):y=e[39],y}function We(t){return!!t.bankSlipUrl}function H(t){const e=k.c(4),{href:n,label:l}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(pe,{size:14}),e[0]=o):o=e[0];let f;return e[1]!==n||e[2]!==l?(f=s.jsx(J,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",children:[o,l]})}),e[1]=n,e[2]=l,e[3]=f):f=e[3],f}function Ke(t){const e=k.c(14),{status:n}=t,l=Y(),o=n.toLowerCase();if(o==="paid"){let i;e[0]!==l?(i=l("settings.infraBilling.statusPaid"),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==i?(a=s.jsx(R,{variant:"success",children:i}),e[2]=i,e[3]=a):a=e[3],a}if(o==="overdue"){let i;e[4]!==l?(i=l("settings.infraBilling.statusOverdue"),e[4]=l,e[5]=i):i=e[5];let a;return e[6]!==i?(a=s.jsx(R,{variant:"destructive",children:i}),e[6]=i,e[7]=a):a=e[7],a}if(o==="registered"){let i;e[8]!==l?(i=l("settings.infraBilling.statusPending"),e[8]=l,e[9]=i):i=e[9];let a;return e[10]!==i?(a=s.jsx(R,{variant:"warning",children:i}),e[10]=i,e[11]=a):a=e[11],a}let f;return e[12]!==n?(f=s.jsx(R,{variant:"secondary",children:n}),e[12]=n,e[13]=f):f=e[13],f}function Xe(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(de,{group:"billing",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}function vt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"members:manage",area:"billing",children:s.jsx(Xe,{})}),t[0]=e):e=t[0],e}export{vt as default};
|
|
1
|
+
import{c as k,j as s,hW as de,b as Y,hX as ue,r as le,hY as xe,hZ as re,gv as T,gL as K,B as J,bC as V,a7 as pe}from"./index-B1ZvlDM_.js";import{i as he}from"./CreditCard01-Bhqkelsq.js";import{B as R}from"./badge-sWV0Lz9X.js";import{M as je}from"./multi-select-BAtpYbAh.js";import{S as be,d as ve,c as Be,a as Ne,b as Se}from"./select-DwKpuPDv.js";import{T as $,a as ye,b as ie,c as F,d as Te,e as we}from"./table-lum-yHpJ.js";import{C as ke,X as Ue,Y as Ce}from"./CartesianChart-C3iUwk_u.js";import{T as De}from"./Tooltip-BOp5DpDI.js";import{a as _e,A as Le}from"./AreaChart-iov00wo5.js";import{c2 as Me}from"./CategoricalChart-O0wXlREH.js";import{R as Re}from"./require-capability-C9oBXOPC.js";import"./checkbox-BR7eeNRm.js";import"./Minus-Ctt_tNjY.js";import"./ChevronUp-CM8EW0Js.js";import"./command-CG66jyhm.js";import"./index-CtHyBR3B.js";import"./SearchMd-BCaWPluh.js";import"./popover-Bmr7L36n.js";import"./index-BdQq_4o_.js";import"./index-BjRujN3I.js";import"./index-rTnBA7ms.js";import"./access-gate-CJaU-ahh.js";import"./capability-load-error-DAHIgRW0.js";const Q=new Intl.NumberFormat(void 0,{notation:"compact",maximumFractionDigits:1}),ne=["B","KB","MB","GB","TB","PB"];function oe(t){if(t<=0)return"0 B";const e=Math.min(ne.length-1,Math.floor(Math.log(t)/Math.log(1024))),n=t/1024**e;return`${n.toFixed(n>=100||e===0?0:1)} ${ne[e]}`}const X=50,$e="https://assets.decocache.com/decocms/45f9e905-046b-4aeb-8420-0377a7d0d041/deco_Transferencia.pdf",Fe=new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"});function ce(t){return new Date(`${t.slice(0,10)}T00:00:00Z`)}function ee(t){return ce(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric",timeZone:"UTC"})}function Ie(){const t=new Date;return Array.from({length:12},(e,n)=>{const l=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth()-n,1));return{value:l.toISOString().slice(0,10),label:l.toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"})}})}function Pe(t){return new Date(`${t}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"})}function ae(t){const e=k.c(30),{usage:n,metric:l,colorNum:o,formatValue:f,height:i}=t,a=`var(--chart-${o})`,d=`infra-billing-${l}`;let g;e[0]!==n?(g=n.map(Ae),e[0]=n,e[1]=g):g=e[1];const x=g;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b={left:0,right:4,top:8,bottom:0},e[2]=b):b=e[2];let r,p;e[3]!==a?(r=s.jsx("stop",{offset:"0%",stopColor:a,stopOpacity:.25}),p=s.jsx("stop",{offset:"100%",stopColor:a,stopOpacity:0}),e[3]=a,e[4]=r,e[5]=p):(r=e[4],p=e[5]);let h;e[6]!==d||e[7]!==r||e[8]!==p?(h=s.jsx("defs",{children:s.jsxs("linearGradient",{id:d,x1:"0",y1:"0",x2:"0",y2:"1",children:[r,p]})}),e[6]=d,e[7]=r,e[8]=p,e[9]=h):h=e[9];let u;e[10]!==f||e[11]!==i?(u=i>100&&s.jsxs(s.Fragment,{children:[s.jsx(ke,{strokeDasharray:"4 4",stroke:"var(--border)",strokeOpacity:.5,vertical:!1}),s.jsx(Ue,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},interval:"preserveStartEnd",tickMargin:8}),s.jsx(Ce,{orientation:"right",axisLine:!1,tickLine:!1,tick:{fontSize:11,fill:"var(--muted-foreground)"},tickFormatter:f,width:68})]}),e[10]=f,e[11]=i,e[12]=u):u=e[12];let B,v;e[13]===Symbol.for("react.memo_cache_sentinel")?(B={stroke:"var(--border)",strokeDasharray:"4 4"},v={background:"var(--background)",border:"1px solid var(--border)",borderRadius:8,fontSize:12},e[13]=B,e[14]=v):(B=e[13],v=e[14]);let j;e[15]!==f?(j=s.jsx(De,{cursor:B,contentStyle:v,formatter:C=>f(Number(C)||0)}),e[15]=f,e[16]=j):j=e[16];const y=`url(#${d})`;let N;e[17]!==a||e[18]!==l||e[19]!==y?(N=s.jsx(_e,{type:"linear",dataKey:l,stroke:a,strokeWidth:2,fill:y,dot:!1}),e[17]=a,e[18]=l,e[19]=y,e[20]=N):N=e[20];let m;e[21]!==x||e[22]!==N||e[23]!==h||e[24]!==u||e[25]!==j?(m=s.jsxs(Le,{data:x,margin:b,children:[h,u,j,N]}),e[21]=x,e[22]=N,e[23]=h,e[24]=u,e[25]=j,e[26]=m):m=e[26];let S;return e[27]!==i||e[28]!==m?(S=s.jsx(Me,{width:"100%",height:i,children:m}),e[27]=i,e[28]=m,e[29]=S):S=e[29],S}function Ae(t){return{...t,label:Pe(t.date)}}function Z(t,e){return t.reduce((n,l)=>n+l[e],0)}function Ee(){const t=k.c(39),e=Y(),{sites:n,isLoading:l}=ue(),[o,f]=le.useState(null),i=Ie(),[a,d]=le.useState(i[0].value);let g;t[0]!==o||t[1]!==n?(g=o??n.slice(0,X),t[0]=o,t[1]=n,t[2]=g):g=t[2];const x=g,b=!o&&n.length>X,{data:r,isLoading:p}=xe(x,a),h=re();if(l){let c;return t[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(V,{className:"h-64 w-full"}),t[3]=c):c=t[3],c}if(n.length===0){let c;t[4]!==e?(c=e("settings.infraBilling.noSites"),t[4]=e,t[5]=c):c=t[5];let w;return t[6]!==c?(w=s.jsx(T,{className:"p-6 text-sm text-muted-foreground",children:c}),t[6]=c,t[7]=w):w=t[7],w}const u=r?.usage??[],B=r?.pageviewsAvailable??!1,v=!!r&&!r.usageUnavailable,j=(c,w)=>v?w(Z(u,c)):"—",y=[{key:"pageviews",title:e("settings.infraBilling.pageviews"),description:e("settings.infraBilling.pageviewsDescription"),colorNum:1,total:B&&v?Q.format(Z(u,"pageviews")):"—"},{key:"requests",title:e("settings.infraBilling.requests"),description:e("settings.infraBilling.requestsDescription"),colorNum:2,total:j("requests",Ze)},{key:"dataTransferBytes",title:e("settings.infraBilling.dataTransfer"),description:e("settings.infraBilling.dataTransferDescription"),colorNum:3,total:j("dataTransferBytes",oe)}],N=Oe;let m;t[8]!==r?.teams?(m=r?.teams??[],t[8]=r?.teams,t[9]=m):m=t[9];const S=m;let C;t[10]!==r?.siteSlugsWithoutTeam?(C=r?.siteSlugsWithoutTeam??[],t[10]=r?.siteSlugsWithoutTeam,t[11]=C):C=t[11];const G=C,U=S.length===1?S[0]:void 0,D=U?.billing??null,te=S.length+(G.length>0?1:0)>1,W=Z(u,"pageviews"),se=W>0?Z(u,"requests")/W:0,me=B&&v&&W>0?se.toFixed(se<10?1:0):"—";let I;t[12]!==r?.billingUnavailable||t[13]!==U||t[14]!==e||t[15]!==S.length?(I=r?.billingUnavailable?e("settings.infraBilling.billingUnavailable"):S.length>1?e("settings.infraBilling.multipleTeams",{count:String(S.length)}):U?fe(U,e):e("settings.infraBilling.noTeam"),t[12]=r?.billingUnavailable,t[13]=U,t[14]=e,t[15]=S.length,t[16]=I):I=t[16];const ge=I;let _;t[17]!==n?(_=n.map(qe),t[17]=n,t[18]=_):_=t[18];let L;t[19]!==e?(L=e("settings.infraBilling.siteLabel"),t[19]=e,t[20]=L):L=t[20];let P;t[21]!==x||t[22]!==_||t[23]!==L?(P=s.jsx(je,{className:"w-auto min-w-56 max-w-full",options:_,defaultValue:x,maxCount:2,placeholder:L,onValueChange:f}),t[21]=x,t[22]=_,t[23]=L,t[24]=P):P=t[24];let M;t[25]!==e?(M=e("settings.infraBilling.monthLabel"),t[25]=e,t[26]=M):M=t[26];let A;t[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ne,{}),t[27]=A):A=t[27];let E;t[28]!==M?(E=s.jsx(Se,{className:"w-48","aria-label":M,children:A}),t[28]=M,t[29]=E):E=t[29];let z;t[30]!==x.length||t[31]!==e?(z=x.length===0&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.pickASite")}),t[30]=x.length,t[31]=e,t[32]=z):z=t[32];let q;t[33]!==e||t[34]!==b?(q=b&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.tooManySites",{count:String(X)})}),t[33]=e,t[34]=b,t[35]=q):q=t[35];let O;return t[36]!==r?.usageUnavailable||t[37]!==e?(O=r?.usageUnavailable&&s.jsx(T,{className:"mx-4 p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.warehouseUnavailable")}),t[36]=r?.usageUnavailable,t[37]=e,t[38]=O):O=t[38],s.jsxs("div",{className:"flex flex-col gap-8",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-4",children:[P,s.jsxs(be,{value:a,onValueChange:d,children:[E,s.jsx(ve,{children:i.map(ze)})]})]}),z,q,O,x.length>0&&s.jsxs(s.Fragment,{children:[s.jsx(K,{title:e("settings.infraBilling.summaryTitle"),children:s.jsxs("div",{className:"flex flex-col lg:flex-row gap-4 px-4",children:[s.jsxs(T,{className:"flex-1 flex flex-col gap-4 p-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(he,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium",children:e("settings.infraBilling.detailsTitle")})]}),U&&D?.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:h.isPending,onClick:()=>h.mutate(U.siteSlugs),children:e("settings.infraBilling.manageButton")})]}),s.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[D?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.currentPlan")}),p?s.jsx(V,{className:"h-5 w-16"}):s.jsx(R,{variant:D.planType==="free"?"secondary":"success",children:e(`settings.infraBilling.plan.${D.planType}`)})]}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:D.nextBillingDate?ee(D.nextBillingDate):"—"})]})]}):!p&&s.jsx("p",{className:"text-xs text-muted-foreground",children:ge}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("span",{className:"text-muted-foreground",children:e("settings.infraBilling.requestsPerPageview")}),s.jsx("span",{className:"font-medium tabular-nums",children:me})]})]})]}),y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-2 p-4",children:[s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:i.find(w=>w.value===a)?.label})]}),p?s.jsx(V,{className:"h-8 w-24"}):s.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:c.total}),s.jsx("div",{className:"-mx-2",children:s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:64})})]},c.key))]})}),s.jsx(K,{title:e("settings.infraBilling.metricsTitle"),children:s.jsx("div",{className:"flex flex-col xl:flex-row gap-4 px-4",children:y.map(c=>s.jsxs(T,{className:"flex-1 flex flex-col gap-3 p-4",children:[s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-sm font-medium",children:c.title}),s.jsx("span",{className:"text-xs text-muted-foreground",children:c.description})]}),s.jsx(ae,{usage:u,metric:c.key,colorNum:c.colorNum,formatValue:N(c.key),height:220})]},c.key))})}),s.jsx(K,{title:e("settings.infraBilling.invoicesTitle"),children:s.jsx("div",{className:"flex flex-col gap-4 px-4",children:r?r.billingUnavailable?s.jsx(T,{className:"p-4 text-sm text-muted-foreground",children:e("settings.infraBilling.billingUnavailable")}):s.jsxs(s.Fragment,{children:[S.map(c=>s.jsx(Ye,{team:c,showSites:te},c.siteSlugs.join(","))),G.length>0&&s.jsxs(T,{className:"flex flex-col gap-1 p-4",children:[te&&s.jsx("span",{className:"text-sm font-medium",children:G.join(", ")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e("settings.infraBilling.noTeam")})]})]}):s.jsx(T,{size:"flush",children:s.jsx(V,{className:"m-4 h-24"})})})})]})]})}function ze(t){return s.jsx(Be,{value:t.value,children:t.label},t.value)}function qe(t){return{label:t,value:t}}function Oe(t){return t==="dataTransferBytes"?oe:Ve}function Ve(t){return Q.format(t)}function Ze(t){return Q.format(t)}function fe(t,e){return t.unavailableReason==="partial_team"?e("settings.infraBilling.partialTeam"):e("settings.infraBilling.billingUnavailable")}function Ye(t){const e=k.c(13),{team:n,showSites:l}=t,o=Y(),f=re(),i=n.billing;let a;e[0]!==i||e[1]!==f||e[2]!==l||e[3]!==o||e[4]!==n.siteSlugs?(a=l&&s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-border p-4",children:[s.jsx("span",{className:"text-sm font-medium",children:n.siteSlugs.join(", ")}),i&&s.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm",children:[s.jsx(R,{variant:i.planType==="free"?"secondary":"success",children:o(`settings.infraBilling.plan.${i.planType}`)}),i.nextBillingDate&&s.jsxs("span",{className:"flex gap-1.5",children:[s.jsx("span",{className:"text-muted-foreground",children:o("settings.infraBilling.nextBilling")}),s.jsx("span",{className:"font-medium tabular-nums",children:ee(i.nextBillingDate)})]}),i.canManageSubscription&&s.jsx(J,{variant:"outline",size:"sm",disabled:f.isPending,onClick:()=>f.mutate(n.siteSlugs),children:o("settings.infraBilling.manageButton")})]})]}),e[0]=i,e[1]=f,e[2]=l,e[3]=o,e[4]=n.siteSlugs,e[5]=a):a=e[5];let d;e[6]!==i||e[7]!==o||e[8]!==n?(d=i?i.invoices.length===0?s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:o("settings.infraBilling.noInvoices")}):s.jsx(Ge,{invoices:i.invoices}):s.jsx("p",{className:"p-4 text-sm text-muted-foreground",children:fe(n,o)}),e[6]=i,e[7]=o,e[8]=n,e[9]=d):d=e[9];let g;return e[10]!==a||e[11]!==d?(g=s.jsxs(T,{size:"flush",className:"gap-0 overflow-x-auto",children:[a,d]}),e[10]=a,e[11]=d,e[12]=g):g=e[12],g}function Ge(t){const e=k.c(40),{invoices:n}=t,l=Y();let o;e[0]!==n?(o=n.some(We),e[0]=n,e[1]=o):o=e[1];const f=o;let i;e[2]!==l?(i=l("settings.infraBilling.invoiceReference"),e[2]=l,e[3]=i):i=e[3];let a;e[4]!==i?(a=s.jsx($,{children:i}),e[4]=i,e[5]=a):a=e[5];let d;e[6]!==l?(d=l("settings.infraBilling.invoiceDue"),e[6]=l,e[7]=d):d=e[7];let g;e[8]!==d?(g=s.jsx($,{children:d}),e[8]=d,e[9]=g):g=e[9];let x;e[10]!==l?(x=l("settings.infraBilling.invoiceAmount"),e[10]=l,e[11]=x):x=e[11];let b;e[12]!==x?(b=s.jsx($,{children:x}),e[12]=x,e[13]=b):b=e[13];let r;e[14]!==l?(r=l("settings.infraBilling.invoiceStatus"),e[14]=l,e[15]=r):r=e[15];let p;e[16]!==r?(p=s.jsx($,{children:r}),e[16]=r,e[17]=p):p=e[17];let h;e[18]!==l?(h=l("settings.infraBilling.invoiceDocuments"),e[18]=l,e[19]=h):h=e[19];let u;e[20]!==h?(u=s.jsx($,{children:h}),e[20]=h,e[21]=u):u=e[21];let B;e[22]!==u||e[23]!==a||e[24]!==g||e[25]!==b||e[26]!==p?(B=s.jsx(ye,{children:s.jsxs(ie,{children:[a,g,b,p,u]})}),e[22]=u,e[23]=a,e[24]=g,e[25]=b,e[26]=p,e[27]=B):B=e[27];let v;if(e[28]!==n||e[29]!==l||e[30]!==f){let N;e[32]!==l||e[33]!==f?(N=m=>s.jsxs(ie,{children:[s.jsx(F,{children:m.referenceMonth?ce(m.referenceMonth).toLocaleDateString(void 0,{month:"long",year:"numeric",timeZone:"UTC"}):"—"}),s.jsx(F,{children:m.dueDate?ee(m.dueDate):"—"}),s.jsx(F,{className:"tabular-nums",children:Fe.format(m.value)}),s.jsx(F,{children:s.jsx(Ke,{status:m.status})}),s.jsxs(F,{className:"flex gap-2",children:[m.nfUrl&&s.jsx(H,{href:m.nfUrl,label:l("settings.infraBilling.invoiceNf")}),m.bankSlipUrl&&s.jsx(H,{href:m.bankSlipUrl,label:l("settings.infraBilling.invoiceBankSlip")}),!m.bankSlipUrl&&!f&&m.nfUrl&&s.jsx(H,{href:$e,label:l("settings.infraBilling.invoiceBankTransfer")}),!m.nfUrl&&!m.bankSlipUrl&&"—"]})]},m.id),e[32]=l,e[33]=f,e[34]=N):N=e[34],v=n.map(N),e[28]=n,e[29]=l,e[30]=f,e[31]=v}else v=e[31];let j;e[35]!==v?(j=s.jsx(Te,{children:v}),e[35]=v,e[36]=j):j=e[36];let y;return e[37]!==B||e[38]!==j?(y=s.jsxs(we,{children:[B,j]}),e[37]=B,e[38]=j,e[39]=y):y=e[39],y}function We(t){return!!t.bankSlipUrl}function H(t){const e=k.c(4),{href:n,label:l}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(pe,{size:14}),e[0]=o):o=e[0];let f;return e[1]!==n||e[2]!==l?(f=s.jsx(J,{variant:"outline",size:"sm",asChild:!0,children:s.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",children:[o,l]})}),e[1]=n,e[2]=l,e[3]=f):f=e[3],f}function Ke(t){const e=k.c(14),{status:n}=t,l=Y(),o=n.toLowerCase();if(o==="paid"){let i;e[0]!==l?(i=l("settings.infraBilling.statusPaid"),e[0]=l,e[1]=i):i=e[1];let a;return e[2]!==i?(a=s.jsx(R,{variant:"success",children:i}),e[2]=i,e[3]=a):a=e[3],a}if(o==="overdue"){let i;e[4]!==l?(i=l("settings.infraBilling.statusOverdue"),e[4]=l,e[5]=i):i=e[5];let a;return e[6]!==i?(a=s.jsx(R,{variant:"destructive",children:i}),e[6]=i,e[7]=a):a=e[7],a}if(o==="registered"){let i;e[8]!==l?(i=l("settings.infraBilling.statusPending"),e[8]=l,e[9]=i):i=e[9];let a;return e[10]!==i?(a=s.jsx(R,{variant:"warning",children:i}),e[10]=i,e[11]=a):a=e[11],a}let f;return e[12]!==n?(f=s.jsx(R,{variant:"secondary",children:n}),e[12]=n,e[13]=f):f=e[13],f}function Xe(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(de,{group:"billing",children:s.jsx(Ee,{})}),t[0]=e):e=t[0],e}function vt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Re,{capability:"members:manage",area:"billing",children:s.jsx(Xe,{})}),t[0]=e):e=t[0],e}export{vt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as H,r as C,b as Z,j as h,t as A,a5 as ye,x as xe,aS as ke,w as we,B as be,v as Pe,D as Ce,q as le,a4 as ce,K as Y,E as Q,g8 as ue,g9 as re,ga as z,m as Se}from"./index-BD2-Tfve.js";import{S as de,s as _e}from"./suggestion-DNThc8_w.js";import{l as Fe,n as De,o as Ie,k as B,p as je,P as ne,q as ve,c as Me,u as Re,r as Le,j as Ee,f as Ae,F as Ne,s as Te,b as Qe}from"./usage-stats-BITMwpzs.js";import{aZ as Oe}from"./agent-icon-C4zAUQeZ.js";import"./chat-context-BFrEkp-x.js";import{m as Ue,i as $e,b as qe}from"./index-CH4-90Yv.js";import{u as me}from"./use-mcp-client-Dwx3joSc.js";import{a as Ke}from"./repository-binding-t2SUt_ly.js";import{g as se,s as fe}from"./tool-namespace-xhn6qzed.js";import{l as oe,g as pe}from"./use-mcp-prompts-CgaLso39.js";import{f as ze,b as Be}from"./use-org-fs-DDN_Ivwy.js";async function He(t,e,r,s,i,o){if(!Ue(e)){A.error("Selected model does not support file uploads");return}const l=r.type||"application/octet-stream";if(!$e(l,e)){const g=qe(e).parts.map(m=>o(m)).join(", "),k=e?.title??"This model";i?i({fileName:r.name,modelName:k,accepted:g}):A.error(`"${r.name}" can't be attached`,{description:`${k} accepts ${g}.`});return}const c=10*1024*1024;if(r.size>c){A.error(`File "${r.name}" exceeds 10MB limit`);return}try{const g=new FileReader,k=new Promise((n,u)=>{g.onload=()=>{const d=g.result;if(typeof d!="string"){u(new Error("Failed to read file as data URL"));return}const b=d.includes(",")?d.split(",")[1]??d:d;n(b)},g.onerror=u});g.readAsDataURL(r);const m=await k,p={id:crypto.randomUUID(),name:r.name,mimeType:r.type||"application/octet-stream",size:r.size,data:m};Fe(t,{from:s,to:s},p)}catch(g){console.error("Failed to process file:",g),A.error(`Failed to load file "${r.name}"`)}}function Je(t,e,r,s){if(r)return!1;const i=e.dataTransfer?.files;if(!i||i.length===0)return!1;const o=t.posAtCoords({left:e.clientX,top:e.clientY});if(!o)return!1;e.preventDefault();const l=Array.from(i);return(async()=>{let c=o.pos;for(const g of l)await s(g,c),c=t.state.selection.to})(),!0}function Ve(t){const e=H.c(9),{editor:r,selectedModel:s,onUnsupportedFile:i}=t,o=Z(),l=C.useRef(Xe);let c,g;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o?(c=()=>{l.current=async(p,n)=>{await He(r,s,p,n,i,o)}},g=[r,s,i,o],e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=c,e[5]=g):(c=e[4],g=e[5]),C.useEffect(c,g);let k,m;return e[6]!==r?(k=()=>{if(r?.isDestroyed)return;const p=new De("fileDropHandler");r.state.plugins.find(d=>d.spec.key===p)&&r.unregisterPlugin(p);const u=new Ie({key:p,props:{handleDrop:(d,b,F,_)=>Je(d,b,_,(S,j)=>l.current(S,j)),handlePaste:(d,b)=>{const F=b.clipboardData?.items;if(!F)return!1;const _=Array.from(F).filter(We);return _.length===0?!1:(b.preventDefault(),(async()=>{let S=d.state.selection.from;for(const j of _){const I=j.getAsFile();I&&(await l.current?.(I,S),S=d.state.selection.to)}})(),!0)}}});return r.registerPlugin(u),()=>{r?.isDestroyed||r.unregisterPlugin(p)}},m=[r],e[6]=r,e[7]=k,e[8]=m):(k=e[7],m=e[8]),C.useEffect(k,m),null}function We(t){return t.kind==="file"}function Xe(){return Promise.resolve()}function bt(t){const e=H.c(43),{info:r,onClose:s}=t,i=Z(),o=r!==null;let l;e[0]!==s?(l=v=>!v&&s(),e[0]=s,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=c):c=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=h.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=g):g=e[3];let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=h.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:h.jsx(ye,{size:18})}),e[4]=k):k=e[4];let m;e[5]!==i?(m=i("chat.uploader.fileTypeNotSupported"),e[5]=i,e[6]=m):m=e[6];let p;e[7]!==m?(p=h.jsx(xe,{className:"text-xl font-semibold tracking-tight",children:m}),e[7]=m,e[8]=p):p=e[8];const n=r?.fileName;let u;e[9]!==n?(u=h.jsxs("span",{className:"font-medium text-foreground",children:["“",n,"”"]}),e[9]=n,e[10]=u):u=e[10];let d;e[11]!==i?(d=i("chat.uploader.cantAttachToChat"),e[11]=i,e[12]=d):d=e[12];let b;e[13]!==d||e[14]!==u?(b=h.jsxs(ke,{className:"mt-1.5 text-sm leading-relaxed",children:[u," ",d]}),e[13]=d,e[14]=u,e[15]=b):b=e[15];let F;e[16]!==b||e[17]!==p?(F=h.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[g,h.jsxs(we,{className:"relative gap-4",children:[k,h.jsxs("div",{children:[p,b]})]})]}),e[16]=b,e[17]=p,e[18]=F):F=e[18];const _=r?.modelName??"";let S;e[19]!==i||e[20]!==_?(S=i("chat.uploader.accepts",{modelName:_}),e[19]=i,e[20]=_,e[21]=S):S=e[21];let j;e[22]!==S?(j=h.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:S}),e[22]=S,e[23]=j):j=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=h.jsx(Oe,{size:14,className:"text-muted-foreground"}),e[24]=I):I=e[24];const R=r?.accepted;let D;e[25]!==R?(D=h.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[I,h.jsx("span",{className:"capitalize",children:R})]}),e[25]=R,e[26]=D):D=e[26];let a;e[27]!==j||e[28]!==D?(a=h.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:h.jsxs("div",{className:"surface p-4",children:[j,D]})}),e[27]=j,e[28]=D,e[29]=a):a=e[29];let f;e[30]!==i?(f=i("chat.uploader.gotIt"),e[30]=i,e[31]=f):f=e[31];let x;e[32]!==s||e[33]!==f?(x=h.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:h.jsx(be,{onClick:s,children:f})}),e[32]=s,e[33]=f,e[34]=x):x=e[34];let P;e[35]!==F||e[36]!==a||e[37]!==x?(P=h.jsxs(Pe,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ye,children:[F,a,x]}),e[35]=F,e[36]=a,e[37]=x,e[38]=P):P=e[38];let M;return e[39]!==o||e[40]!==l||e[41]!==P?(M=h.jsx(Ce,{open:o,onOpenChange:l,children:P}),e[39]=o,e[40]=l,e[41]=P,e[42]=M):M=e[42],M}function Ye(t){return t.preventDefault()}function Pt(){const t=H.c(3),[e,r]=C.useState(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>r(null),t[0]=s):s=t[0];let i;return t[1]!==e?(i={unsupportedFile:e,onUnsupportedFile:r,clearUnsupportedFile:s},t[1]=e,t[2]=i):i=t[2],i}function he(t,e){return e||t}const Ze=t=>{const e=H.c(50),{editor:r,virtualMcpId:s,suggestionOpenRef:i}=t,o=Z(),l=le(),{org:c}=ce(),g=Ke();let k;e[0]!==c.id||e[1]!==c.slug||e[2]!==s?(k={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=c.id,e[1]=c.slug,e[2]=s,e[3]=k):k=e[3];const m=me(k);let p;e[4]!==c.id||e[5]!==s?(p=Y.virtualMcpResources(s,c.id),e[4]=c.id,e[5]=s,e[6]=p):p=e[6];const n=p,[u,d]=C.useState("categories");let b;e[7]!==u?(b=()=>u,e[7]=u,e[8]=b):b=e[8];const F=C.useEffectEvent(b),_=C.useRef(null),S=C.useRef(!1),j=s??"default";let I;e[9]!==u||e[10]!==c.id||e[11]!==j?(I=["at-mention",c.id,j,u],e[9]=u,e[10]=c.id,e[11]=j,e[12]=I):I=e[12];const R=I;let D;e[13]!==o?(D=o("chat.mentionAt.agentsTitle"),e[13]=o,e[14]=D):D=e[14];let a;e[15]!==o?(a=o("chat.mentionAt.agentsDescription"),e[15]=o,e[16]=a):a=e[16];let f;e[17]!==D||e[18]!==a?(f={name:"agents",title:D,description:a,kind:"category",drillable:!0},e[17]=D,e[18]=a,e[19]=f):f=e[19];let x;e[20]!==o?(x=o("chat.mentionAt.resourcesTitle"),e[20]=o,e[21]=x):x=e[21];let P;e[22]!==o?(P=o("chat.mentionAt.resourcesDescription"),e[22]=o,e[23]=P):P=e[23];let M;e[24]!==P||e[25]!==x?(M={name:"resources",title:x,description:P,kind:"category",drillable:!0},e[24]=P,e[25]=x,e[26]=M):M=e[26];let v;e[27]!==M||e[28]!==f?(v=[f,M],e[27]=M,e[28]=f,e[29]=v):v=e[29];const $=v;let O;e[30]!==m||e[31]!==r||e[32]!==o?(O=async U=>{const{item:w,range:K}=U;if(Q("chat_picker_item_selected",{picker:"@",item_kind:w.kind,item_name:w.name}),w.kind!=="category"&&(S.current=!0),w.kind==="category")return d(w.name==="agents"?"agents":"resources"),!1;if(w.kind==="agent"&&w.agentId){B(r,K,{id:w.agentId,name:w.name,metadata:{agentId:w.agentId,title:w.name},char:"@"}),d("categories");return}if(w.kind==="resource"&&w.uri&&m){try{const T=await ue(m,w.uri);B(r,K,{id:w.uri,name:w.uri,metadata:T.contents,char:"@"})}catch(T){console.error("[at-mention] Failed to fetch resource:",T),A.error(o("chat.mentionAt.failedToLoadResource"))}d("categories");return}},e[30]=m,e[31]=r,e[32]=o,e[33]=O):O=e[33];const q=O;let y;e[34]!==g||e[35]!==$||e[36]!==m||e[37]!==F||e[38]!==l||e[39]!==n||e[40]!==s?(y=async U=>{const{query:w}=U,K=F();if(K==="categories"){if(!w.trim())return $;const L=w.toLowerCase(),E=g.filter(N=>N.status==="active"&&(!N.id||!re(N.id))&&N.id!==s&&(N.title.toLowerCase().includes(L)||N.description?.toLowerCase().includes(L))).map(Ge),X=await(async()=>{if(!m)return[];let N=l.getQueryData(n);return N||(N=await l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4})),(N?.resources??[]).filter(te=>te.uri.toLowerCase().includes(L)||te.name?.toLowerCase().includes(L)||te.description?.toLowerCase().includes(L)).map(et)})();return[...E,...X]}if(K==="agents"){let L=g.filter(E=>E.status==="active"&&(!E.id||!re(E.id))&&E.id!==s);if(w.trim()){const E=w.toLowerCase();L=L.filter(X=>X.title.toLowerCase().includes(E)||X.description?.toLowerCase().includes(E))}return L.map(tt)}if(!m)return[];let T=l.getQueryData(n);T?l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4}).catch(st):T=await l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4});let W=T?.resources??[];if(w.trim()){const L=w.toLowerCase();W=W.filter(E=>E.uri.toLowerCase().includes(L)||E.name?.toLowerCase().includes(L)||E.description?.toLowerCase().includes(L))}return W.map(rt)},e[34]=g,e[35]=$,e[36]=m,e[37]=F,e[38]=l,e[39]=n,e[40]=s,e[41]=y):y=e[41];const G=y;let J;e[42]!==i?(J=U=>{if(i&&(i.current=U),U)_.current=Date.now(),S.current=!1,Q("chat_picker_opened",{picker:"@"});else{const w=_.current;Q("chat_picker_closed",{picker:"@",outcome:S.current?"selected":"dismissed",duration_ms:w?Date.now()-w:null}),_.current=null,d("categories")}},e[42]=i,e[43]=J):J=e[43];const ee=J;let V;return e[44]!==r||e[45]!==G||e[46]!==q||e[47]!==ee||e[48]!==R?(V=h.jsx(de,{editor:r,char:"@",pluginKey:"atDropdownMenu",queryKey:R,queryFn:G,onSelect:q,onOpenChange:ee}),e[44]=r,e[45]=G,e[46]=q,e[47]=ee,e[48]=R,e[49]=V):V=e[49],V};function Ge(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function et(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}function tt(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function st(){}function rt(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function ie(t,e,r,s,i,o,l){try{const c=await pe(r,s,o);B(t,e,{id:s,name:fe(s,i),metadata:c.messages,char:"/",kind:"prompt",args:o})}catch(c){console.error("[slash] Failed to fetch prompt:",c),A.error(l.t("chat.mentionSlash.failedLoadPrompt"))}}async function nt(t,e,r,s,i){try{const o=await ue(r,s);B(t,e,{id:s,name:s,metadata:o.contents,char:"/",kind:"resource"})}catch(o){console.error("[slash] Failed to fetch resource:",o),A.error(i.t("chat.mentionSlash.failedLoadResource"))}}async function ot(t,e,r,s,i){try{const{files:o,omittedPaths:l}=await ze(r,s.volume,s.path),c={sandboxPath:s.sandboxPath,volume:s.volume,path:s.path,files:o,omittedPaths:l};B(t,e,{id:s.id,name:s.name,metadata:c,char:"/",kind:"skill"})}catch(o){console.error("[slash] Failed to fetch skill:",o),A.error(i.t("chat.mentionSlash.failedLoadSkill"))}}const it=({editor:t,virtualMcpId:e,suggestionOpenRef:r})=>{const s=Z(),i=le(),{org:o}=ce(),l=me({connectionId:e,orgId:o.id,orgSlug:o.slug}),c=Y.virtualMcpPrompts(e,o.id),g=Y.virtualMcpResources(e,o.id),k=Y.slashSkills(o.id),m=["slash-mention",o.id,e??"default"],[p,n]=C.useState(null),[u,d]=C.useState(null),b=je(t);b&&(b.onEditChip=async a=>{if(l)try{const x=(await ae(i,c,l)).find(P=>P.name===a.promptId);if(!x?.arguments||x.arguments.length===0)return;d({...a,prompt:x})}catch(f){console.error("[slash] Failed to load prompt for editing:",f),A.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=C.useRef(null),_=C.useRef(!1),S=async({item:a,range:f})=>{if(Q("chat_picker_item_selected",{picker:"/",item_kind:a.kind,item_name:a.name}),_.current=!0,!!l)if(a.kind==="prompt"){if(a.arguments&&a.arguments.length>0){n({range:f,item:a});return}const x=se(a._meta);await ie(t,f,l,a.name,x,void 0,{t:s})}else a.kind==="skill"?a.skill&&await ot(t,f,o.slug,a.skill,{t:s}):a.uri&&await nt(t,f,l,a.uri,{t:s})},j=async a=>{if(!p||!l)return;const{range:f,item:x}=p,P=se(x._meta);await ie(t,f,l,x.name,P,a,{t:s}),n(null)},I=async a=>{if(!(!u||!l)){if(!ve(t,u.pos,u.promptId)){A.error(s("chat.mentionSlash.failedUpdatePrompt")),d(null);return}try{const f=await pe(l,u.promptId,a),x=se(u.prompt._meta);t.chain().focus().setNodeSelection(u.pos).deleteSelection().insertContentAt(u.pos,Me({id:u.promptId,name:fe(u.promptId,x),metadata:f.messages,char:"/",kind:"prompt",args:a})).run(),Q("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:u.promptId})}catch(f){console.error("[slash] Failed to update prompt:",f),A.error(s("chat.mentionSlash.failedUpdatePrompt"))}d(null)}},R=async a=>{const{query:f}=a;if(!l)return[];const[x,P,M]=await Promise.all([ae(i,c,l),lt(i,g,l),at(i,k,o.slug)]),v=f.trim().toLowerCase(),$=(x??[]).filter(y=>!v||y.name.toLowerCase().includes(v)||y.title?.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name,title:y.title,description:y.description,kind:"prompt",arguments:y.arguments,_meta:y._meta})),O=(P??[]).filter(y=>!v||y.uri.toLowerCase().includes(v)||y.name?.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name??y.uri,title:y.name,description:y.description,kind:"resource",uri:y.uri})),q=(M??[]).filter(y=>!v||y.name.toLowerCase().includes(v)||y.id.toLowerCase().includes(v)||y.description?.toLowerCase().includes(v)).map(y=>({name:y.name,title:y.name,description:y.description??void 0,kind:"skill",skill:y}));return[...$,...O,...q]},D=p?.item.kind==="prompt"?{name:p.item.name,title:p.item.title,arguments:p.item.arguments,description:p.item.description,_meta:p.item._meta}:null;return h.jsxs(h.Fragment,{children:[h.jsx(de,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:m,queryFn:R,onSelect:S,onOpenChange:a=>{if(r&&(r.current=a),a)F.current=Date.now(),_.current=!1,Q("chat_picker_opened",{picker:"/"});else{const f=F.current;Q("chat_picker_closed",{picker:"/",outcome:_.current?"selected":"dismissed",duration_ms:f?Date.now()-f:null}),F.current=null}}}),h.jsx(ne,{prompt:D,setPrompt:()=>n(null),onSubmit:j}),h.jsx(ne,{prompt:u?.prompt??null,setPrompt:()=>d(null),onSubmit:I,defaultValues:u?.args},u?`edit-${u.promptId}-${u.pos}`:"edit-idle")]})};async function ae(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}),s?.prompts??[]}async function at(t,e,r){const s=t.getQueryData(e),i=()=>t.fetchQuery({queryKey:e,queryFn:()=>Be(r),staleTime:6e4});return s?(i().catch(()=>{}),s):i().catch(()=>[])}async function lt(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}),s?.resources??[]}const ge="Ask anything, / for prompts & skills, @ for agents & resources...";function ct(t){return[Te.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1}),_e.configure({placeholder:()=>t.current??ge,showOnlyWhenEditable:!1}),Ae,Ne]}function Ct({tiptapDoc:t,setTiptapDoc:e,disabled:r=!1,enterToSubmit:s=!1,placeholder:i,onSubmit:o,suggestionOpenRef:l,children:c}){const g=C.useRef(o),k=C.useRef(e),m=C.useRef(s),p=C.useRef(i),n=Re({extensions:ct(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":i??ge,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-base p-[18px]"},handleKeyDown:(u,d)=>d.key==="Enter"&&!d.shiftKey&&m.current&&!l?.current?(d.preventDefault(),g.current?.(),!0):!1},onUpdate:({editor:u})=>{k.current(u?.getJSON())}});return C.useEffect(()=>{n?.setEditable(!r)},[n,r]),C.useEffect(()=>{g.current=o},[o]),C.useEffect(()=>{k.current=e},[e]),C.useEffect(()=>{m.current=s},[s]),C.useEffect(()=>{p.current=i},[i]),C.useEffect(()=>{if(!n||n.isDestroyed)return;const u=JSON.stringify(n.getJSON()),d=JSON.stringify(t||{type:"doc",content:[]});u!==d&&n.commands.setContent(t||{type:"doc",content:[]})},[n,t]),h.jsx(Le.Provider,{value:{editor:n},children:c})}function St(t){const e=H.c(29),{disabled:r,virtualMcpId:s,showFileUploader:i,selectedModel:o,onUnsupportedFile:l,suggestionOpenRef:c,ref:g,className:k}=t,m=r===void 0?!1:r,p=i===void 0?!1:i,{editor:n}=Ee();let u,d;if(e[0]!==n?(u=()=>({focus:()=>{n?.commands.focus()},clear:()=>{n?.commands.clearContent(!0)},appendText:x=>{if(!n)return;const P=n.state.doc.textContent.trim()==="";n.commands.focus("end"),P||n.commands.insertContent(" "),n.commands.insertContent(x)},syncVoiceText:(x,P)=>{if(n&&(n.commands.setContent(x||{type:"doc",content:[]}),P)){n.commands.focus("end");const M=n.state.doc.textContent.trim().length>0;n.commands.insertContent({type:"text",text:M?" "+P:P})}},restoreContent:x=>{n&&n.commands.setContent(x||{type:"doc",content:[]})}}),d=[n],e[0]=n,e[1]=u,e[2]=d):(u=e[1],d=e[2]),C.useImperativeHandle(g??null,u,d),!n)return null;const b=m&&"cursor-not-allowed opacity-70",F=m&&"[&_.ProseMirror]:cursor-not-allowed";let _;e[3]!==k||e[4]!==b||e[5]!==F?(_=Se("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",k,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",b,F),e[3]=k,e[4]=b,e[5]=F,e[6]=_):_=e[6];let S;e[7]!==n||e[8]!==_?(S=h.jsx(Qe,{editor:n,className:_}),e[7]=n,e[8]=_,e[9]=S):S=e[9];const j=s??null;let I;e[10]!==n||e[11]!==c||e[12]!==j?(I=h.jsx(C.Suspense,{fallback:null,children:h.jsx(it,{editor:n,virtualMcpId:j,suggestionOpenRef:c})}),e[10]=n,e[11]=c,e[12]=j,e[13]=I):I=e[13];const R=s??null;let D;e[14]!==n||e[15]!==c||e[16]!==R?(D=h.jsx(C.Suspense,{fallback:null,children:h.jsx(Ze,{editor:n,virtualMcpId:R,suggestionOpenRef:c})}),e[14]=n,e[15]=c,e[16]=R,e[17]=D):D=e[17];let a;e[18]!==m||e[19]!==n||e[20]!==l||e[21]!==o||e[22]!==p?(a=p&&o&&!m?h.jsx(Ve,{editor:n,selectedModel:o,onUnsupportedFile:l}):null,e[18]=m,e[19]=n,e[20]=l,e[21]=o,e[22]=p,e[23]=a):a=e[23];let f;return e[24]!==I||e[25]!==D||e[26]!==a||e[27]!==S?(f=h.jsxs(h.Fragment,{children:[S,I,D,a]}),e[24]=I,e[25]=D,e[26]=a,e[27]=S,e[28]=f):f=e[28],f}export{Ct as T,bt as U,St as a,He as p,Pt as u};
|
|
1
|
+
import{c as H,r as C,b as G,j as h,t as E,a5 as ye,x as xe,aS as ke,w as we,B as be,v as Pe,D as Ce,q as le,a4 as ce,K as Y,E as Q,ga as ue,gb as re,gc as z,m as Se}from"./index-B1ZvlDM_.js";import{S as de,s as _e}from"./suggestion-x1hGwkT4.js";import{K as Fe,t as De,A as Ie,p as B,L as ve,P as ne,O as je,h as Me,e as Le,Q as Re,o as Ae,l as Ee,F as Ne,s as Te,f as Qe}from"./usage-stats-BxAReiDs.js";import{b0 as Oe}from"./agent-icon-B9ymJOYy.js";import"./chat-context-CMznzxL2.js";import{m as Ue,i as $e,b as qe}from"./index-Ddc_z0Ej.js";import{u as me}from"./use-mcp-client-C_baTEme.js";import{a as Ke}from"./repository-binding-CoMozV78.js";import{g as se,s as fe}from"./tool-namespace-C8tIomG8.js";import{l as oe,g as pe}from"./use-mcp-prompts-DpQotIu-.js";import{f as ze,b as Be}from"./use-org-fs-hvIlZzgN.js";async function He(t,e,r,s,i,o){if(!Ue(e)){E.error("Selected model does not support file uploads");return}const l=r.type||"application/octet-stream";if(!$e(l,e)){const g=qe(e).parts.map(m=>o(m)).join(", "),k=e?.title??"This model";i?i({fileName:r.name,modelName:k,accepted:g}):E.error(`"${r.name}" can't be attached`,{description:`${k} accepts ${g}.`});return}const c=10*1024*1024;if(r.size>c){E.error(`File "${r.name}" exceeds 10MB limit`);return}try{const g=new FileReader,k=new Promise((n,u)=>{g.onload=()=>{const d=g.result;if(typeof d!="string"){u(new Error("Failed to read file as data URL"));return}const b=d.includes(",")?d.split(",")[1]??d:d;n(b)},g.onerror=u});g.readAsDataURL(r);const m=await k,p={id:crypto.randomUUID(),name:r.name,mimeType:r.type||"application/octet-stream",size:r.size,data:m};Fe(t,{from:s,to:s},p)}catch(g){console.error("Failed to process file:",g),E.error(`Failed to load file "${r.name}"`)}}function Je(t,e,r,s){if(r)return!1;const i=e.dataTransfer?.files;if(!i||i.length===0)return!1;const o=t.posAtCoords({left:e.clientX,top:e.clientY});if(!o)return!1;e.preventDefault();const l=Array.from(i);return(async()=>{let c=o.pos;for(const g of l)await s(g,c),c=t.state.selection.to})(),!0}function Ve(t){const e=H.c(9),{editor:r,selectedModel:s,onUnsupportedFile:i}=t,o=G(),l=C.useRef(Xe);let c,g;e[0]!==r||e[1]!==i||e[2]!==s||e[3]!==o?(c=()=>{l.current=async(p,n)=>{await He(r,s,p,n,i,o)}},g=[r,s,i,o],e[0]=r,e[1]=i,e[2]=s,e[3]=o,e[4]=c,e[5]=g):(c=e[4],g=e[5]),C.useEffect(c,g);let k,m;return e[6]!==r?(k=()=>{if(r?.isDestroyed)return;const p=new De("fileDropHandler");r.state.plugins.find(d=>d.spec.key===p)&&r.unregisterPlugin(p);const u=new Ie({key:p,props:{handleDrop:(d,b,F,_)=>Je(d,b,_,(S,v)=>l.current(S,v)),handlePaste:(d,b)=>{const F=b.clipboardData?.items;if(!F)return!1;const _=Array.from(F).filter(We);return _.length===0?!1:(b.preventDefault(),(async()=>{let S=d.state.selection.from;for(const v of _){const I=v.getAsFile();I&&(await l.current?.(I,S),S=d.state.selection.to)}})(),!0)}}});return r.registerPlugin(u),()=>{r?.isDestroyed||r.unregisterPlugin(p)}},m=[r],e[6]=r,e[7]=k,e[8]=m):(k=e[7],m=e[8]),C.useEffect(k,m),null}function We(t){return t.kind==="file"}function Xe(){return Promise.resolve()}function bt(t){const e=H.c(43),{info:r,onClose:s}=t,i=G(),o=r!==null;let l;e[0]!==s?(l=j=>!j&&s(),e[0]=s,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=["radial-gradient(ellipse 40% 200% at -5% 100%, rgba(251,191,36,0.35) 0%, transparent 100%)","radial-gradient(ellipse 40% 200% at 105% -10%, rgba(244,114,182,0.25) 0%, transparent 100%)"],e[2]=c):c=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=h.jsx("div",{className:"absolute inset-x-0 top-0 h-36 pointer-events-none",style:{backgroundImage:c.join(", "),maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),e[3]=g):g=e[3];let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=h.jsx("div",{className:"flex items-center justify-center size-9 rounded-lg bg-warning/15 text-warning",children:h.jsx(ye,{size:18})}),e[4]=k):k=e[4];let m;e[5]!==i?(m=i("chat.uploader.fileTypeNotSupported"),e[5]=i,e[6]=m):m=e[6];let p;e[7]!==m?(p=h.jsx(xe,{className:"text-xl font-semibold tracking-tight",children:m}),e[7]=m,e[8]=p):p=e[8];const n=r?.fileName;let u;e[9]!==n?(u=h.jsxs("span",{className:"font-medium text-foreground",children:["“",n,"”"]}),e[9]=n,e[10]=u):u=e[10];let d;e[11]!==i?(d=i("chat.uploader.cantAttachToChat"),e[11]=i,e[12]=d):d=e[12];let b;e[13]!==d||e[14]!==u?(b=h.jsxs(ke,{className:"mt-1.5 text-sm leading-relaxed",children:[u," ",d]}),e[13]=d,e[14]=u,e[15]=b):b=e[15];let F;e[16]!==b||e[17]!==p?(F=h.jsxs("div",{className:"relative px-8 pt-8 pb-2 overflow-hidden",children:[g,h.jsxs(we,{className:"relative gap-4",children:[k,h.jsxs("div",{children:[p,b]})]})]}),e[16]=b,e[17]=p,e[18]=F):F=e[18];const _=r?.modelName??"";let S;e[19]!==i||e[20]!==_?(S=i("chat.uploader.accepts",{modelName:_}),e[19]=i,e[20]=_,e[21]=S):S=e[21];let v;e[22]!==S?(v=h.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:S}),e[22]=S,e[23]=v):v=e[23];let I;e[24]===Symbol.for("react.memo_cache_sentinel")?(I=h.jsx(Oe,{size:14,className:"text-muted-foreground"}),e[24]=I):I=e[24];const L=r?.accepted;let D;e[25]!==L?(D=h.jsxs("div",{className:"flex items-center gap-2 text-sm text-foreground",children:[I,h.jsx("span",{className:"capitalize",children:L})]}),e[25]=L,e[26]=D):D=e[26];let a;e[27]!==v||e[28]!==D?(a=h.jsx("div",{className:"px-8 pt-3 pb-6 space-y-3",children:h.jsxs("div",{className:"surface p-4",children:[v,D]})}),e[27]=v,e[28]=D,e[29]=a):a=e[29];let f;e[30]!==i?(f=i("chat.uploader.gotIt"),e[30]=i,e[31]=f):f=e[31];let x;e[32]!==s||e[33]!==f?(x=h.jsx("div",{className:"px-8 py-4 border-t border-border bg-muted/30 flex items-center justify-end",children:h.jsx(be,{onClick:s,children:f})}),e[32]=s,e[33]=f,e[34]=x):x=e[34];let P;e[35]!==F||e[36]!==a||e[37]!==x?(P=h.jsxs(Pe,{className:"sm:max-w-[480px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ye,children:[F,a,x]}),e[35]=F,e[36]=a,e[37]=x,e[38]=P):P=e[38];let M;return e[39]!==o||e[40]!==l||e[41]!==P?(M=h.jsx(Ce,{open:o,onOpenChange:l,children:P}),e[39]=o,e[40]=l,e[41]=P,e[42]=M):M=e[42],M}function Ye(t){return t.preventDefault()}function Pt(){const t=H.c(3),[e,r]=C.useState(null);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=()=>r(null),t[0]=s):s=t[0];let i;return t[1]!==e?(i={unsupportedFile:e,onUnsupportedFile:r,clearUnsupportedFile:s},t[1]=e,t[2]=i):i=t[2],i}function he(t,e){return e||t}const Ge=t=>{const e=H.c(50),{editor:r,virtualMcpId:s,suggestionOpenRef:i}=t,o=G(),l=le(),{org:c}=ce(),g=Ke();let k;e[0]!==c.id||e[1]!==c.slug||e[2]!==s?(k={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=c.id,e[1]=c.slug,e[2]=s,e[3]=k):k=e[3];const m=me(k);let p;e[4]!==c.id||e[5]!==s?(p=Y.virtualMcpResources(s,c.id),e[4]=c.id,e[5]=s,e[6]=p):p=e[6];const n=p,[u,d]=C.useState("categories");let b;e[7]!==u?(b=()=>u,e[7]=u,e[8]=b):b=e[8];const F=C.useEffectEvent(b),_=C.useRef(null),S=C.useRef(!1),v=s??"default";let I;e[9]!==u||e[10]!==c.id||e[11]!==v?(I=["at-mention",c.id,v,u],e[9]=u,e[10]=c.id,e[11]=v,e[12]=I):I=e[12];const L=I;let D;e[13]!==o?(D=o("chat.mentionAt.agentsTitle"),e[13]=o,e[14]=D):D=e[14];let a;e[15]!==o?(a=o("chat.mentionAt.agentsDescription"),e[15]=o,e[16]=a):a=e[16];let f;e[17]!==D||e[18]!==a?(f={name:"agents",title:D,description:a,kind:"category",drillable:!0},e[17]=D,e[18]=a,e[19]=f):f=e[19];let x;e[20]!==o?(x=o("chat.mentionAt.resourcesTitle"),e[20]=o,e[21]=x):x=e[21];let P;e[22]!==o?(P=o("chat.mentionAt.resourcesDescription"),e[22]=o,e[23]=P):P=e[23];let M;e[24]!==P||e[25]!==x?(M={name:"resources",title:x,description:P,kind:"category",drillable:!0},e[24]=P,e[25]=x,e[26]=M):M=e[26];let j;e[27]!==M||e[28]!==f?(j=[f,M],e[27]=M,e[28]=f,e[29]=j):j=e[29];const $=j;let O;e[30]!==m||e[31]!==r||e[32]!==o?(O=async U=>{const{item:w,range:K}=U;if(Q("chat_picker_item_selected",{picker:"@",item_kind:w.kind,item_name:w.name}),w.kind!=="category"&&(S.current=!0),w.kind==="category")return d(w.name==="agents"?"agents":"resources"),!1;if(w.kind==="agent"&&w.agentId){B(r,K,{id:w.agentId,name:w.name,metadata:{agentId:w.agentId,title:w.name},char:"@"}),d("categories");return}if(w.kind==="resource"&&w.uri&&m){try{const T=await ue(m,w.uri);B(r,K,{id:w.uri,name:w.uri,metadata:T.contents,char:"@"})}catch(T){console.error("[at-mention] Failed to fetch resource:",T),E.error(o("chat.mentionAt.failedToLoadResource"))}d("categories");return}},e[30]=m,e[31]=r,e[32]=o,e[33]=O):O=e[33];const q=O;let y;e[34]!==g||e[35]!==$||e[36]!==m||e[37]!==F||e[38]!==l||e[39]!==n||e[40]!==s?(y=async U=>{const{query:w}=U,K=F();if(K==="categories"){if(!w.trim())return $;const R=w.toLowerCase(),A=g.filter(N=>N.status==="active"&&(!N.id||!re(N.id))&&N.id!==s&&(N.title.toLowerCase().includes(R)||N.description?.toLowerCase().includes(R))).map(Ze),X=await(async()=>{if(!m)return[];let N=l.getQueryData(n);return N||(N=await l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4})),(N?.resources??[]).filter(te=>te.uri.toLowerCase().includes(R)||te.name?.toLowerCase().includes(R)||te.description?.toLowerCase().includes(R)).map(et)})();return[...A,...X]}if(K==="agents"){let R=g.filter(A=>A.status==="active"&&(!A.id||!re(A.id))&&A.id!==s);if(w.trim()){const A=w.toLowerCase();R=R.filter(X=>X.title.toLowerCase().includes(A)||X.description?.toLowerCase().includes(A))}return R.map(tt)}if(!m)return[];let T=l.getQueryData(n);T?l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4}).catch(st):T=await l.fetchQuery({queryKey:n,queryFn:()=>z(m),staleTime:6e4});let W=T?.resources??[];if(w.trim()){const R=w.toLowerCase();W=W.filter(A=>A.uri.toLowerCase().includes(R)||A.name?.toLowerCase().includes(R)||A.description?.toLowerCase().includes(R))}return W.map(rt)},e[34]=g,e[35]=$,e[36]=m,e[37]=F,e[38]=l,e[39]=n,e[40]=s,e[41]=y):y=e[41];const Z=y;let J;e[42]!==i?(J=U=>{if(i&&(i.current=U),U)_.current=Date.now(),S.current=!1,Q("chat_picker_opened",{picker:"@"});else{const w=_.current;Q("chat_picker_closed",{picker:"@",outcome:S.current?"selected":"dismissed",duration_ms:w?Date.now()-w:null}),_.current=null,d("categories")}},e[42]=i,e[43]=J):J=e[43];const ee=J;let V;return e[44]!==r||e[45]!==Z||e[46]!==q||e[47]!==ee||e[48]!==L?(V=h.jsx(de,{editor:r,char:"@",pluginKey:"atDropdownMenu",queryKey:L,queryFn:Z,onSelect:q,onOpenChange:ee}),e[44]=r,e[45]=Z,e[46]=q,e[47]=ee,e[48]=L,e[49]=V):V=e[49],V};function Ze(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function et(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}function tt(t){return{name:t.title,title:t.title,description:t.description??void 0,icon:t.icon??null,kind:"agent",agentId:t.id}}function st(){}function rt(t){return{name:he(t.uri,t.name),title:t.name,description:t.description,kind:"resource",uri:t.uri}}async function ie(t,e,r,s,i,o,l){try{const c=await pe(r,s,o);B(t,e,{id:s,name:fe(s,i),metadata:c.messages,char:"/",kind:"prompt",args:o})}catch(c){console.error("[slash] Failed to fetch prompt:",c),E.error(l.t("chat.mentionSlash.failedLoadPrompt"))}}async function nt(t,e,r,s,i){try{const o=await ue(r,s);B(t,e,{id:s,name:s,metadata:o.contents,char:"/",kind:"resource"})}catch(o){console.error("[slash] Failed to fetch resource:",o),E.error(i.t("chat.mentionSlash.failedLoadResource"))}}async function ot(t,e,r,s,i){try{const{files:o,omittedPaths:l}=await ze(r,s.volume,s.path),c={sandboxPath:s.sandboxPath,volume:s.volume,path:s.path,files:o,omittedPaths:l};B(t,e,{id:s.id,name:s.name,metadata:c,char:"/",kind:"skill"})}catch(o){console.error("[slash] Failed to fetch skill:",o),E.error(i.t("chat.mentionSlash.failedLoadSkill"))}}const it=({editor:t,virtualMcpId:e,suggestionOpenRef:r})=>{const s=G(),i=le(),{org:o}=ce(),l=me({connectionId:e,orgId:o.id,orgSlug:o.slug}),c=Y.virtualMcpPrompts(e,o.id),g=Y.virtualMcpResources(e,o.id),k=Y.slashSkills(o.id),m=["slash-mention",o.id,e??"default"],[p,n]=C.useState(null),[u,d]=C.useState(null),b=ve(t);b&&(b.onEditChip=async a=>{if(l)try{const x=(await ae(i,c,l)).find(P=>P.name===a.promptId);if(!x?.arguments||x.arguments.length===0)return;d({...a,prompt:x})}catch(f){console.error("[slash] Failed to load prompt for editing:",f),E.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=C.useRef(null),_=C.useRef(!1),S=async({item:a,range:f})=>{if(Q("chat_picker_item_selected",{picker:"/",item_kind:a.kind,item_name:a.name}),_.current=!0,!!l)if(a.kind==="prompt"){if(a.arguments&&a.arguments.length>0){n({range:f,item:a});return}const x=se(a._meta);await ie(t,f,l,a.name,x,void 0,{t:s})}else a.kind==="skill"?a.skill&&await ot(t,f,o.slug,a.skill,{t:s}):a.uri&&await nt(t,f,l,a.uri,{t:s})},v=async a=>{if(!p||!l)return;const{range:f,item:x}=p,P=se(x._meta);await ie(t,f,l,x.name,P,a,{t:s}),n(null)},I=async a=>{if(!(!u||!l)){if(!je(t,u.pos,u.promptId)){E.error(s("chat.mentionSlash.failedUpdatePrompt")),d(null);return}try{const f=await pe(l,u.promptId,a),x=se(u.prompt._meta);t.chain().focus().setNodeSelection(u.pos).deleteSelection().insertContentAt(u.pos,Me({id:u.promptId,name:fe(u.promptId,x),metadata:f.messages,char:"/",kind:"prompt",args:a})).run(),Q("chat_picker_item_selected",{picker:"/edit",item_kind:"prompt",item_name:u.promptId})}catch(f){console.error("[slash] Failed to update prompt:",f),E.error(s("chat.mentionSlash.failedUpdatePrompt"))}d(null)}},L=async a=>{const{query:f}=a;if(!l)return[];const[x,P,M]=await Promise.all([ae(i,c,l),lt(i,g,l),at(i,k,o.slug)]),j=f.trim().toLowerCase(),$=(x??[]).filter(y=>!j||y.name.toLowerCase().includes(j)||y.title?.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name,title:y.title,description:y.description,kind:"prompt",arguments:y.arguments,_meta:y._meta})),O=(P??[]).filter(y=>!j||y.uri.toLowerCase().includes(j)||y.name?.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name??y.uri,title:y.name,description:y.description,kind:"resource",uri:y.uri})),q=(M??[]).filter(y=>!j||y.name.toLowerCase().includes(j)||y.id.toLowerCase().includes(j)||y.description?.toLowerCase().includes(j)).map(y=>({name:y.name,title:y.name,description:y.description??void 0,kind:"skill",skill:y}));return[...$,...O,...q]},D=p?.item.kind==="prompt"?{name:p.item.name,title:p.item.title,arguments:p.item.arguments,description:p.item.description,_meta:p.item._meta}:null;return h.jsxs(h.Fragment,{children:[h.jsx(de,{editor:t,char:"/",pluginKey:"slashDropdownMenu",queryKey:m,queryFn:L,onSelect:S,onOpenChange:a=>{if(r&&(r.current=a),a)F.current=Date.now(),_.current=!1,Q("chat_picker_opened",{picker:"/"});else{const f=F.current;Q("chat_picker_closed",{picker:"/",outcome:_.current?"selected":"dismissed",duration_ms:f?Date.now()-f:null}),F.current=null}}}),h.jsx(ne,{prompt:D,setPrompt:()=>n(null),onSubmit:v}),h.jsx(ne,{prompt:u?.prompt??null,setPrompt:()=>d(null),onSubmit:I,defaultValues:u?.args},u?`edit-${u.promptId}-${u.pos}`:"edit-idle")]})};async function ae(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>oe(r),staleTime:6e4}).catch(()=>{}),s?.prompts??[]}async function at(t,e,r){const s=t.getQueryData(e),i=()=>t.fetchQuery({queryKey:e,queryFn:()=>Be(r),staleTime:6e4});return s?(i().catch(()=>{}),s):i().catch(()=>[])}async function lt(t,e,r){let s=t.getQueryData(e);return s?t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}):s=await t.fetchQuery({queryKey:e,queryFn:()=>z(r),staleTime:6e4}).catch(()=>{}),s?.resources??[]}const ge="Ask anything, / for prompts & skills, @ for agents & resources...";function ct(t){return[Te.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1}),_e.configure({placeholder:()=>t.current??ge,showOnlyWhenEditable:!1}),Ee,Ne]}function Ct({tiptapDoc:t,setTiptapDoc:e,disabled:r=!1,enterToSubmit:s=!1,placeholder:i,onSubmit:o,suggestionOpenRef:l,children:c}){const g=C.useRef(o),k=C.useRef(e),m=C.useRef(s),p=C.useRef(i),n=Le({extensions:ct(p),content:t||"",editorProps:{attributes:{"data-chat-input":"true",role:"textbox","aria-multiline":"true","aria-label":i??ge,class:"prose prose-sm max-w-none focus:outline-none w-full h-full text-base p-[18px]"},handleKeyDown:(u,d)=>d.key==="Enter"&&!d.shiftKey&&m.current&&!l?.current?(d.preventDefault(),g.current?.(),!0):!1},onUpdate:({editor:u})=>{k.current(u?.getJSON())}});return C.useEffect(()=>{n?.setEditable(!r)},[n,r]),C.useEffect(()=>{g.current=o},[o]),C.useEffect(()=>{k.current=e},[e]),C.useEffect(()=>{m.current=s},[s]),C.useEffect(()=>{p.current=i},[i]),C.useEffect(()=>{if(!n||n.isDestroyed)return;const u=JSON.stringify(n.getJSON()),d=JSON.stringify(t||{type:"doc",content:[]});u!==d&&n.commands.setContent(t||{type:"doc",content:[]})},[n,t]),h.jsx(Re.Provider,{value:{editor:n},children:c})}function St(t){const e=H.c(29),{disabled:r,virtualMcpId:s,showFileUploader:i,selectedModel:o,onUnsupportedFile:l,suggestionOpenRef:c,ref:g,className:k}=t,m=r===void 0?!1:r,p=i===void 0?!1:i,{editor:n}=Ae();let u,d;if(e[0]!==n?(u=()=>({focus:()=>{n?.commands.focus()},clear:()=>{n?.commands.clearContent(!0)},appendText:x=>{if(!n)return;const P=n.state.doc.textContent.trim()==="";n.commands.focus("end"),P||n.commands.insertContent(" "),n.commands.insertContent(x)},syncVoiceText:(x,P)=>{if(n&&(n.commands.setContent(x||{type:"doc",content:[]}),P)){n.commands.focus("end");const M=n.state.doc.textContent.trim().length>0;n.commands.insertContent({type:"text",text:M?" "+P:P})}},restoreContent:x=>{n&&n.commands.setContent(x||{type:"doc",content:[]})}}),d=[n],e[0]=n,e[1]=u,e[2]=d):(u=e[1],d=e[2]),C.useImperativeHandle(g??null,u,d),!n)return null;const b=m&&"cursor-not-allowed opacity-70",F=m&&"[&_.ProseMirror]:cursor-not-allowed";let _;e[3]!==k||e[4]!==b||e[5]!==F?(_=Se("overflow-y-auto relative flex-1 max-h-[164px] min-h-[20px] w-full flex flex-col",k,"[&_.ProseMirror]:outline-none [&_.ProseMirror]:min-h-[20px] [&_.ProseMirror]:flex-1","[&_.ProseMirror_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.ProseMirror_p.is-editor-empty:first-child::before]:text-muted-foreground","[&_.ProseMirror_p.is-editor-empty:first-child::before]:opacity-50","[&_.ProseMirror_p.is-editor-empty:first-child::before]:float-left","[&_.ProseMirror_p.is-editor-empty:first-child::before]:pointer-events-none","[&_.ProseMirror_p.is-editor-empty:first-child::before]:h-0","[&_.ProseMirror_p.is-editor-empty:first-child::before]:w-full","[&_.ProseMirror_p.is-editor-empty:first-child::before]:break-words",b,F),e[3]=k,e[4]=b,e[5]=F,e[6]=_):_=e[6];let S;e[7]!==n||e[8]!==_?(S=h.jsx(Qe,{editor:n,className:_}),e[7]=n,e[8]=_,e[9]=S):S=e[9];const v=s??null;let I;e[10]!==n||e[11]!==c||e[12]!==v?(I=h.jsx(C.Suspense,{fallback:null,children:h.jsx(it,{editor:n,virtualMcpId:v,suggestionOpenRef:c})}),e[10]=n,e[11]=c,e[12]=v,e[13]=I):I=e[13];const L=s??null;let D;e[14]!==n||e[15]!==c||e[16]!==L?(D=h.jsx(C.Suspense,{fallback:null,children:h.jsx(Ge,{editor:n,virtualMcpId:L,suggestionOpenRef:c})}),e[14]=n,e[15]=c,e[16]=L,e[17]=D):D=e[17];let a;e[18]!==m||e[19]!==n||e[20]!==l||e[21]!==o||e[22]!==p?(a=p&&o&&!m?h.jsx(Ve,{editor:n,selectedModel:o,onUnsupportedFile:l}):null,e[18]=m,e[19]=n,e[20]=l,e[21]=o,e[22]=p,e[23]=a):a=e[23];let f;return e[24]!==I||e[25]!==D||e[26]!==a||e[27]!==S?(f=h.jsxs(h.Fragment,{children:[S,I,D,a]}),e[24]=I,e[25]=D,e[26]=a,e[27]=S,e[28]=f):f=e[28],f}export{Ct as T,bt as U,St as a,He as p,Pt as u};
|